mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-16 02:41:05 +00:00
feat(prettier): add svelteBracketNewLine
This commit is contained in:
parent
7a28d21ceb
commit
398887a3d3
182 changed files with 974 additions and 494 deletions
|
@ -71,7 +71,8 @@
|
|||
on:click|stopPropagation="{() => {
|
||||
isOpen = !isOpen;
|
||||
dispatch(isOpen ? 'open' : 'close');
|
||||
}}">
|
||||
}}"
|
||||
>
|
||||
<Icon render="{isOpen ? Close20 : AppSwitcher20}" {...icon} />
|
||||
<slot name="text">
|
||||
{#if text}<span>{text}</span>{/if}
|
||||
|
@ -82,7 +83,8 @@
|
|||
bind:this="{refPanel}"
|
||||
class:bx--header-panel="{true}"
|
||||
class:bx--header-panel--expanded="{true}"
|
||||
transition:slide="{{ duration: 200 }}">
|
||||
transition:slide="{{ duration: 200 }}"
|
||||
>
|
||||
<slot />
|
||||
</div>
|
||||
{/if}
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
class:bx--header__action--active="{linkIsActive}"
|
||||
class:action-link="{true}"
|
||||
{...$$restProps}
|
||||
href="{href}">
|
||||
href="{href}"
|
||||
>
|
||||
<Icon {...icon} />
|
||||
</a>
|
||||
|
|
|
@ -141,19 +141,22 @@
|
|||
isSearchFocus = false;
|
||||
}
|
||||
}
|
||||
}}" />
|
||||
}}"
|
||||
/>
|
||||
|
||||
<div
|
||||
bind:this="{elTypeSearch}"
|
||||
role="search"
|
||||
class="search-wrapper"
|
||||
class:search-wrapper-hidden="{!searchIsActive}"
|
||||
class:search-focus="{isSearchFocus || searchIsActive}">
|
||||
class:search-focus="{isSearchFocus || searchIsActive}"
|
||||
>
|
||||
<div
|
||||
id="right-panel-action-search"
|
||||
class="search-wrapper-2"
|
||||
role="combobox"
|
||||
aria-expanded="{searchIsActive}">
|
||||
aria-expanded="{searchIsActive}"
|
||||
>
|
||||
<button
|
||||
tabindex="{searchTabIndex}"
|
||||
aria-label="Search"
|
||||
|
@ -170,7 +173,8 @@
|
|||
if (key === 'Enter') {
|
||||
searchIsActive = !searchIsActive;
|
||||
}
|
||||
}}">
|
||||
}}"
|
||||
>
|
||||
<Icon title="Search" tabindex="0" render="{Search20}" />
|
||||
</button>
|
||||
<input
|
||||
|
@ -184,7 +188,8 @@
|
|||
placeholder="Search"
|
||||
on:focus="{() => dispatch('focusInputSearch')}"
|
||||
on:focusout="{() => dispatch('focusOutInputSearch')}"
|
||||
on:input="{dispatchInputs}" />
|
||||
on:input="{dispatchInputs}"
|
||||
/>
|
||||
<button
|
||||
id="right-panel-close-search"
|
||||
tabindex="{closeTabIndex}"
|
||||
|
@ -202,7 +207,8 @@
|
|||
if (key === 'Enter') {
|
||||
searchIsActive = !searchIsActive;
|
||||
}
|
||||
}}">
|
||||
}}"
|
||||
>
|
||||
<Icon title="Close" tabindex="0" render="{Close20}" />
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
@ -10,7 +10,8 @@
|
|||
<ul
|
||||
role="menubar"
|
||||
aria-label="{ariaLabel}"
|
||||
class:bx--header__menu-bar="{true}">
|
||||
class:bx--header__menu-bar="{true}"
|
||||
>
|
||||
<slot />
|
||||
</ul>
|
||||
</nav>
|
||||
|
|
|
@ -26,7 +26,8 @@
|
|||
on:keyup
|
||||
on:keydown
|
||||
on:focus
|
||||
on:blur>
|
||||
on:blur
|
||||
>
|
||||
<span class:bx--text-truncate--end="{true}">{text}</span>
|
||||
</a>
|
||||
</li>
|
||||
|
|
|
@ -37,7 +37,8 @@
|
|||
expanded = false;
|
||||
}
|
||||
}
|
||||
}}" />
|
||||
}}"
|
||||
/>
|
||||
|
||||
<li class:bx--header__submenu="{true}" title="{iconDescription}">
|
||||
<a
|
||||
|
@ -63,11 +64,13 @@
|
|||
on:mouseleave
|
||||
on:keyup
|
||||
on:focus
|
||||
on:blur>
|
||||
on:blur
|
||||
>
|
||||
{text}
|
||||
<ChevronDown16
|
||||
aria-label="{iconDescription}"
|
||||
class="bx--header__menu-arrow" />
|
||||
class="bx--header__menu-arrow"
|
||||
/>
|
||||
</a>
|
||||
<ul role="menu" aria-label="{text}" class:bx--header__menu="{true}">
|
||||
<slot />
|
||||
|
|
|
@ -24,7 +24,8 @@
|
|||
class:bx--header__action="{true}"
|
||||
class:bx--header__action--active="{isActive}"
|
||||
{...$$restProps}
|
||||
on:click>
|
||||
on:click
|
||||
>
|
||||
<slot>
|
||||
{#if icon}
|
||||
<svelte:component this="{icon}" />
|
||||
|
|
|
@ -27,8 +27,10 @@
|
|||
{...$$restProps}
|
||||
transition:fly="{{ x: -200, delay: 50, duration: 250 }}"
|
||||
on:click
|
||||
on:click="{() => (isOpen = !isOpen)}">
|
||||
on:click="{() => (isOpen = !isOpen)}"
|
||||
>
|
||||
<Icon
|
||||
title="{isOpen ? 'Close' : 'Open Menu'}"
|
||||
render="{isOpen ? Close20 : Menu20}" />
|
||||
render="{isOpen ? Close20 : Menu20}"
|
||||
/>
|
||||
</button>
|
||||
|
|
|
@ -24,7 +24,8 @@
|
|||
isOpen = false;
|
||||
}}"
|
||||
class:bx--side-nav__overlay="{true}"
|
||||
class:bx--side-nav__overlay-active="{isOpen}"></div>
|
||||
class:bx--side-nav__overlay-active="{isOpen}"
|
||||
></div>
|
||||
{/if}
|
||||
<nav
|
||||
aria-label="{ariaLabel}"
|
||||
|
@ -33,6 +34,7 @@
|
|||
class:bx--side-nav--ux="{true}"
|
||||
class:bx--side-nav--expanded="{isOpen}"
|
||||
class:bx--side-nav--collapsed="{!isOpen && fixed}"
|
||||
{...$$restProps}>
|
||||
{...$$restProps}
|
||||
>
|
||||
<slot />
|
||||
</nav>
|
||||
|
|
|
@ -33,11 +33,13 @@
|
|||
class:bx--side-nav__link="{true}"
|
||||
class:bx--side-nav__link--current="{isSelected}"
|
||||
{...$$restProps}
|
||||
on:click>
|
||||
on:click
|
||||
>
|
||||
{#if icon}
|
||||
<div
|
||||
class:bx--side-nav__icon="{true}"
|
||||
class:bx--side-nav__icon--small="{true}">
|
||||
class:bx--side-nav__icon--small="{true}"
|
||||
>
|
||||
<Icon {...icon} />
|
||||
</div>
|
||||
{/if}
|
||||
|
|
|
@ -30,7 +30,8 @@
|
|||
on:click
|
||||
on:click="{() => {
|
||||
expanded = !expanded;
|
||||
}}">
|
||||
}}"
|
||||
>
|
||||
{#if icon}
|
||||
<div class:bx--side-nav__icon="{true}">
|
||||
<Icon {...icon} />
|
||||
|
@ -40,7 +41,8 @@
|
|||
<div
|
||||
class:bx--side-nav__icon="{true}"
|
||||
class:bx--side-nav__icon--small="{true}"
|
||||
class:bx--side-nav__submenu-chevron="{true}">
|
||||
class:bx--side-nav__submenu-chevron="{true}"
|
||||
>
|
||||
<Icon title="Open Menu" tabindex="0" render="{ChevronDown16}" />
|
||||
</div>
|
||||
</button>
|
||||
|
|
|
@ -24,7 +24,8 @@
|
|||
href="{href}"
|
||||
class:bx--side-nav__link="{true}"
|
||||
{...$$restProps}
|
||||
on:click>
|
||||
on:click
|
||||
>
|
||||
<span class:bx--side-nav__link-text="{true}">{text}</span>
|
||||
</a>
|
||||
</li>
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
tabindex="{tabindex}"
|
||||
class:bx--skip-to-content="{true}"
|
||||
{...$$restProps}
|
||||
on:click>
|
||||
on:click
|
||||
>
|
||||
<slot>Skip to main content</slot>
|
||||
</a>
|
||||
|
|
|
@ -181,7 +181,8 @@
|
|||
<HeaderAction
|
||||
type="Notifications"
|
||||
icon="{iNotifications}"
|
||||
isOpen="{true}">
|
||||
isOpen="{true}"
|
||||
>
|
||||
<HeaderPanelLinks>
|
||||
<HeaderPanelDivider>Notifications</HeaderPanelDivider>
|
||||
</HeaderPanelLinks>
|
||||
|
@ -209,7 +210,8 @@
|
|||
}}"
|
||||
on:close="{() => {
|
||||
console.log('on:close');
|
||||
}}">
|
||||
}}"
|
||||
>
|
||||
<HeaderPanelLinks>
|
||||
<HeaderPanelDivider>Switcher subject 1</HeaderPanelDivider>
|
||||
<HeaderPanelLink>Switcher item 1</HeaderPanelLink>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue