@skeletonlabs/skeleton 2.10.0 → 3.0.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/index.d.ts +2 -0
- package/dist/core/index.js +1 -0
- package/dist/core/index.js.map +1 -0
- package/dist/plugin/index.cjs +431 -0
- package/dist/plugin/index.cjs.map +1 -0
- package/dist/plugin/index.d.ts +270 -0
- package/dist/themes/index.d.ts +1117 -0
- package/dist/themes/index.js +935 -0
- package/dist/themes/index.js.map +1 -0
- package/package.json +32 -51
- package/README.md +0 -38
- package/dist/actions/Clipboard/clipboard.d.ts +0 -11
- package/dist/actions/Clipboard/clipboard.js +0 -64
- package/dist/actions/Filters/filter.d.ts +0 -6
- package/dist/actions/Filters/filter.js +0 -16
- package/dist/actions/Filters/svg-filters/Apollo.svelte +0 -13
- package/dist/actions/Filters/svg-filters/Apollo.svelte.d.ts +0 -23
- package/dist/actions/Filters/svg-filters/BlueNight.svelte +0 -12
- package/dist/actions/Filters/svg-filters/BlueNight.svelte.d.ts +0 -23
- package/dist/actions/Filters/svg-filters/Emerald.svelte +0 -23
- package/dist/actions/Filters/svg-filters/Emerald.svelte.d.ts +0 -23
- package/dist/actions/Filters/svg-filters/GreenFall.svelte +0 -27
- package/dist/actions/Filters/svg-filters/GreenFall.svelte.d.ts +0 -23
- package/dist/actions/Filters/svg-filters/Noir.svelte +0 -17
- package/dist/actions/Filters/svg-filters/Noir.svelte.d.ts +0 -23
- package/dist/actions/Filters/svg-filters/NoirLight.svelte +0 -19
- package/dist/actions/Filters/svg-filters/NoirLight.svelte.d.ts +0 -23
- package/dist/actions/Filters/svg-filters/Rustic.svelte +0 -14
- package/dist/actions/Filters/svg-filters/Rustic.svelte.d.ts +0 -23
- package/dist/actions/Filters/svg-filters/Summer84.svelte +0 -12
- package/dist/actions/Filters/svg-filters/Summer84.svelte.d.ts +0 -23
- package/dist/actions/Filters/svg-filters/XPro.svelte +0 -12
- package/dist/actions/Filters/svg-filters/XPro.svelte.d.ts +0 -23
- package/dist/actions/FocusTrap/focusTrap.d.ts +0 -4
- package/dist/actions/FocusTrap/focusTrap.js +0 -89
- package/dist/components/Accordion/Accordion.svelte +0 -49
- package/dist/components/Accordion/Accordion.svelte.d.ts +0 -56
- package/dist/components/Accordion/AccordionItem.svelte +0 -126
- package/dist/components/Accordion/AccordionItem.svelte.d.ts +0 -73
- package/dist/components/AppBar/AppBar.svelte +0 -53
- package/dist/components/AppBar/AppBar.svelte.d.ts +0 -49
- package/dist/components/AppRail/AppRail.svelte +0 -41
- package/dist/components/AppRail/AppRail.svelte.d.ts +0 -45
- package/dist/components/AppRail/AppRailAnchor.svelte +0 -47
- package/dist/components/AppRail/AppRailAnchor.svelte.d.ts +0 -38
- package/dist/components/AppRail/AppRailTile.svelte +0 -60
- package/dist/components/AppRail/AppRailTile.svelte.d.ts +0 -45
- package/dist/components/AppShell/AppShell.svelte +0 -72
- package/dist/components/AppShell/AppShell.svelte.d.ts +0 -44
- package/dist/components/Autocomplete/Autocomplete.svelte +0 -98
- package/dist/components/Autocomplete/Autocomplete.svelte.d.ts +0 -58
- package/dist/components/Autocomplete/types.d.ts +0 -10
- package/dist/components/Autocomplete/types.js +0 -2
- package/dist/components/Avatar/Avatar.svelte +0 -52
- package/dist/components/Avatar/Avatar.svelte.d.ts +0 -45
- package/dist/components/ConicGradient/ConicGradient.svelte +0 -75
- package/dist/components/ConicGradient/ConicGradient.svelte.d.ts +0 -37
- package/dist/components/ConicGradient/settings.d.ts +0 -9
- package/dist/components/ConicGradient/settings.js +0 -334
- package/dist/components/ConicGradient/types.d.ts +0 -10
- package/dist/components/ConicGradient/types.js +0 -2
- package/dist/components/FileButton/FileButton.svelte +0 -37
- package/dist/components/FileButton/FileButton.svelte.d.ts +0 -33
- package/dist/components/FileDropzone/FileDropzone.svelte +0 -63
- package/dist/components/FileDropzone/FileDropzone.svelte.d.ts +0 -55
- package/dist/components/InputChip/InputChip.svelte +0 -203
- package/dist/components/InputChip/InputChip.svelte.d.ts +0 -114
- package/dist/components/ListBox/ListBox.svelte +0 -29
- package/dist/components/ListBox/ListBox.svelte.d.ts +0 -40
- package/dist/components/ListBox/ListBoxItem.svelte +0 -117
- package/dist/components/ListBox/ListBoxItem.svelte.d.ts +0 -41
- package/dist/components/Paginator/Paginator.svelte +0 -190
- package/dist/components/Paginator/Paginator.svelte.d.ts +0 -68
- package/dist/components/Paginator/icons.d.ts +0 -4
- package/dist/components/Paginator/icons.js +0 -4
- package/dist/components/Paginator/types.d.ts +0 -10
- package/dist/components/Paginator/types.js +0 -2
- package/dist/components/ProgressBar/ProgressBar.svelte +0 -50
- package/dist/components/ProgressBar/ProgressBar.svelte.d.ts +0 -36
- package/dist/components/ProgressRadial/ProgressRadial.svelte +0 -73
- package/dist/components/ProgressRadial/ProgressRadial.svelte.d.ts +0 -38
- package/dist/components/Radio/RadioGroup.svelte +0 -29
- package/dist/components/Radio/RadioGroup.svelte.d.ts +0 -44
- package/dist/components/Radio/RadioItem.svelte +0 -61
- package/dist/components/Radio/RadioItem.svelte.d.ts +0 -41
- package/dist/components/RangeSlider/RangeSlider.svelte +0 -72
- package/dist/components/RangeSlider/RangeSlider.svelte.d.ts +0 -41
- package/dist/components/Ratings/Ratings.svelte +0 -52
- package/dist/components/Ratings/Ratings.svelte.d.ts +0 -41
- package/dist/components/SlideToggle/SlideToggle.svelte +0 -91
- package/dist/components/SlideToggle/SlideToggle.svelte.d.ts +0 -44
- package/dist/components/Stepper/Step.svelte +0 -97
- package/dist/components/Stepper/Step.svelte.d.ts +0 -56
- package/dist/components/Stepper/Stepper.svelte +0 -107
- package/dist/components/Stepper/Stepper.svelte.d.ts +0 -85
- package/dist/components/Stepper/types.d.ts +0 -25
- package/dist/components/Stepper/types.js +0 -1
- package/dist/components/Tab/Tab.svelte +0 -95
- package/dist/components/Tab/Tab.svelte.d.ts +0 -49
- package/dist/components/Tab/TabAnchor.svelte +0 -45
- package/dist/components/Tab/TabAnchor.svelte.d.ts +0 -44
- package/dist/components/Tab/TabGroup.svelte +0 -42
- package/dist/components/Tab/TabGroup.svelte.d.ts +0 -43
- package/dist/components/Table/Table.svelte +0 -86
- package/dist/components/Table/Table.svelte.d.ts +0 -42
- package/dist/components/Table/actions.d.ts +0 -8
- package/dist/components/Table/actions.js +0 -114
- package/dist/components/Table/types.d.ts +0 -10
- package/dist/components/Table/types.js +0 -1
- package/dist/components/Table/utils.d.ts +0 -7
- package/dist/components/Table/utils.js +0 -33
- package/dist/components/TreeView/RecursiveTreeView.svelte +0 -64
- package/dist/components/TreeView/RecursiveTreeView.svelte.d.ts +0 -63
- package/dist/components/TreeView/RecursiveTreeViewItem.svelte +0 -141
- package/dist/components/TreeView/RecursiveTreeViewItem.svelte.d.ts +0 -38
- package/dist/components/TreeView/TreeView.svelte +0 -68
- package/dist/components/TreeView/TreeView.svelte.d.ts +0 -55
- package/dist/components/TreeView/TreeViewItem.svelte +0 -319
- package/dist/components/TreeView/TreeViewItem.svelte.d.ts +0 -145
- package/dist/components/TreeView/types.d.ts +0 -17
- package/dist/components/TreeView/types.js +0 -1
- package/dist/index.d.ts +0 -75
- package/dist/index.js +0 -79
- package/dist/internal/transitions.d.ts +0 -10
- package/dist/internal/transitions.js +0 -11
- package/dist/transitions/crossfade.d.ts +0 -1
- package/dist/transitions/crossfade.js +0 -21
- package/dist/types.d.ts +0 -8
- package/dist/types.js +0 -1
- package/dist/utilities/CodeBlock/CodeBlock.svelte +0 -70
- package/dist/utilities/CodeBlock/CodeBlock.svelte.d.ts +0 -43
- package/dist/utilities/CodeBlock/stores.d.ts +0 -2
- package/dist/utilities/CodeBlock/stores.js +0 -3
- package/dist/utilities/Drawer/Drawer.svelte +0 -182
- package/dist/utilities/Drawer/Drawer.svelte.d.ts +0 -62
- package/dist/utilities/Drawer/stores.d.ts +0 -34
- package/dist/utilities/Drawer/stores.js +0 -50
- package/dist/utilities/Drawer/types.d.ts +0 -42
- package/dist/utilities/Drawer/types.js +0 -2
- package/dist/utilities/LightSwitch/LightSwitch.svelte +0 -78
- package/dist/utilities/LightSwitch/LightSwitch.svelte.d.ts +0 -39
- package/dist/utilities/LightSwitch/lightswitch.d.ts +0 -21
- package/dist/utilities/LightSwitch/lightswitch.js +0 -72
- package/dist/utilities/LocalStorageStore/LocalStorageStore.d.ts +0 -12
- package/dist/utilities/LocalStorageStore/LocalStorageStore.js +0 -49
- package/dist/utilities/Modal/Modal.svelte +0 -247
- package/dist/utilities/Modal/Modal.svelte.d.ts +0 -72
- package/dist/utilities/Modal/ModalTest.svelte +0 -8
- package/dist/utilities/Modal/ModalTest.svelte.d.ts +0 -17
- package/dist/utilities/Modal/stores.d.ts +0 -36
- package/dist/utilities/Modal/stores.js +0 -54
- package/dist/utilities/Modal/types.d.ts +0 -41
- package/dist/utilities/Modal/types.js +0 -2
- package/dist/utilities/Popup/popup.d.ts +0 -7
- package/dist/utilities/Popup/popup.js +0 -240
- package/dist/utilities/Popup/types.d.ts +0 -40
- package/dist/utilities/Popup/types.js +0 -2
- package/dist/utilities/PrefersReducedMotion/PrefersReducedMotion.d.ts +0 -7
- package/dist/utilities/PrefersReducedMotion/PrefersReducedMotion.js +0 -26
- package/dist/utilities/TableOfContents/TableOfContents.svelte +0 -56
- package/dist/utilities/TableOfContents/TableOfContents.svelte.d.ts +0 -34
- package/dist/utilities/TableOfContents/crawler.d.ts +0 -16
- package/dist/utilities/TableOfContents/crawler.js +0 -78
- package/dist/utilities/TableOfContents/stores.d.ts +0 -6
- package/dist/utilities/TableOfContents/stores.js +0 -5
- package/dist/utilities/TableOfContents/types.d.ts +0 -5
- package/dist/utilities/TableOfContents/types.js +0 -2
- package/dist/utilities/Toast/Toast.svelte +0 -150
- package/dist/utilities/Toast/Toast.svelte.d.ts +0 -55
- package/dist/utilities/Toast/ToastTest.svelte +0 -16
- package/dist/utilities/Toast/ToastTest.svelte.d.ts +0 -20
- package/dist/utilities/Toast/stores.d.ts +0 -37
- package/dist/utilities/Toast/stores.js +0 -107
- package/dist/utilities/Toast/types.d.ts +0 -35
- package/dist/utilities/Toast/types.js +0 -2
- package/dist/utilities/index.d.ts +0 -18
- package/dist/utilities/index.js +0 -25
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<!-- Noir: `filter: url(#Noir)` -->
|
|
2
|
-
<svg id="svg-filter-noir" class="filter absolute -left-full w-0 h-0">
|
|
3
|
-
<filter
|
|
4
|
-
id="Noir"
|
|
5
|
-
x="-20%"
|
|
6
|
-
y="-20%"
|
|
7
|
-
width="140%"
|
|
8
|
-
height="140%"
|
|
9
|
-
filterUnits="objectBoundingBox"
|
|
10
|
-
primitiveUnits="userSpaceOnUse"
|
|
11
|
-
color-interpolation-filters="linearRGB"
|
|
12
|
-
>
|
|
13
|
-
<feColorMatrix type="saturate" values="0" x="0%" y="0%" width="100%" height="100%" in="SourceGraphic" result="colormatrix1" />
|
|
14
|
-
<feBlend mode="lighten" x="0%" y="0%" width="100%" height="100%" in="colormatrix1" in2="colormatrix1" result="blend" />
|
|
15
|
-
<feBlend mode="multiply" x="0%" y="0%" width="100%" height="100%" in="colormatrix1" in2="diffuseLighting" result="blend1" />
|
|
16
|
-
</filter>
|
|
17
|
-
</svg>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} NoirProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} NoirEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} NoirSlots */
|
|
4
|
-
export default class Noir extends SvelteComponentTyped<{
|
|
5
|
-
[x: string]: never;
|
|
6
|
-
}, {
|
|
7
|
-
[evt: string]: CustomEvent<any>;
|
|
8
|
-
}, {}> {
|
|
9
|
-
}
|
|
10
|
-
export type NoirProps = typeof __propDef.props;
|
|
11
|
-
export type NoirEvents = typeof __propDef.events;
|
|
12
|
-
export type NoirSlots = typeof __propDef.slots;
|
|
13
|
-
import { SvelteComponentTyped } from "svelte";
|
|
14
|
-
declare const __propDef: {
|
|
15
|
-
props: {
|
|
16
|
-
[x: string]: never;
|
|
17
|
-
};
|
|
18
|
-
events: {
|
|
19
|
-
[evt: string]: CustomEvent<any>;
|
|
20
|
-
};
|
|
21
|
-
slots: {};
|
|
22
|
-
};
|
|
23
|
-
export {};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
<!-- NoirLight: `filter: url(#NoirLight)` -->
|
|
2
|
-
<svg id="svg-filter-noirlight" class="filter absolute -left-full w-0 h-0">
|
|
3
|
-
<filter
|
|
4
|
-
id="NoirLight"
|
|
5
|
-
x="-20%"
|
|
6
|
-
y="-20%"
|
|
7
|
-
width="140%"
|
|
8
|
-
height="140%"
|
|
9
|
-
filterUnits="objectBoundingBox"
|
|
10
|
-
primitiveUnits="userSpaceOnUse"
|
|
11
|
-
color-interpolation-filters="linearRGB"
|
|
12
|
-
>
|
|
13
|
-
<feColorMatrix type="saturate" values="0" x="0%" y="0%" width="100%" height="100%" in="SourceGraphic" result="colormatrix2" />
|
|
14
|
-
<feBlend mode="saturation" x="0%" y="0%" width="100%" height="100%" in="SourceGraphic" in2="colormatrix2" result="blend2" />
|
|
15
|
-
<feBlend mode="screen" x="0%" y="0%" width="100%" height="100%" in="colormatrix2" in2="blend2" result="blend3" />
|
|
16
|
-
<feColorMatrix type="luminanceToAlpha" x="0%" y="0%" width="100%" height="100%" in="blend3" result="colormatrix3" />
|
|
17
|
-
<feBlend mode="exclusion" x="0%" y="0%" width="100%" height="100%" in="blend3" in2="colormatrix3" result="blend5" />
|
|
18
|
-
</filter>
|
|
19
|
-
</svg>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} NoirLightProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} NoirLightEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} NoirLightSlots */
|
|
4
|
-
export default class NoirLight extends SvelteComponentTyped<{
|
|
5
|
-
[x: string]: never;
|
|
6
|
-
}, {
|
|
7
|
-
[evt: string]: CustomEvent<any>;
|
|
8
|
-
}, {}> {
|
|
9
|
-
}
|
|
10
|
-
export type NoirLightProps = typeof __propDef.props;
|
|
11
|
-
export type NoirLightEvents = typeof __propDef.events;
|
|
12
|
-
export type NoirLightSlots = typeof __propDef.slots;
|
|
13
|
-
import { SvelteComponentTyped } from "svelte";
|
|
14
|
-
declare const __propDef: {
|
|
15
|
-
props: {
|
|
16
|
-
[x: string]: never;
|
|
17
|
-
};
|
|
18
|
-
events: {
|
|
19
|
-
[evt: string]: CustomEvent<any>;
|
|
20
|
-
};
|
|
21
|
-
slots: {};
|
|
22
|
-
};
|
|
23
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
<!-- Rustic: `filter: url(#Rustic)` -->
|
|
2
|
-
<svg id="svg-filter-rustic" class="filter absolute -left-full w-0 h-0">
|
|
3
|
-
<filter id="Rustic" filterUnits="objectBoundingBox" primitiveUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
4
|
-
<feColorMatrix
|
|
5
|
-
type="matrix"
|
|
6
|
-
in="SourceGraphic"
|
|
7
|
-
result="colormatrix"
|
|
8
|
-
values="0.39215686274509803 0.39215686274509803 0.39215686274509803 0 0
|
|
9
|
-
0.3333333333333333 0.3333333333333333 0.3333333333333333 0 0
|
|
10
|
-
0.30980392156862746 0.30980392156862746 0.30980392156862746 0 0
|
|
11
|
-
0 0 0 1 0"
|
|
12
|
-
/>
|
|
13
|
-
</filter>
|
|
14
|
-
</svg>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} RusticProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} RusticEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} RusticSlots */
|
|
4
|
-
export default class Rustic extends SvelteComponentTyped<{
|
|
5
|
-
[x: string]: never;
|
|
6
|
-
}, {
|
|
7
|
-
[evt: string]: CustomEvent<any>;
|
|
8
|
-
}, {}> {
|
|
9
|
-
}
|
|
10
|
-
export type RusticProps = typeof __propDef.props;
|
|
11
|
-
export type RusticEvents = typeof __propDef.events;
|
|
12
|
-
export type RusticSlots = typeof __propDef.slots;
|
|
13
|
-
import { SvelteComponentTyped } from "svelte";
|
|
14
|
-
declare const __propDef: {
|
|
15
|
-
props: {
|
|
16
|
-
[x: string]: never;
|
|
17
|
-
};
|
|
18
|
-
events: {
|
|
19
|
-
[evt: string]: CustomEvent<any>;
|
|
20
|
-
};
|
|
21
|
-
slots: {};
|
|
22
|
-
};
|
|
23
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<!-- Summer84: `filter: url(#Summer84)` -->
|
|
2
|
-
<svg id="svg-filter-summer84" class="filter absolute -left-full w-0 h-0">
|
|
3
|
-
<filter id="Summer84" filterUnits="objectBoundingBox" primitiveUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
4
|
-
<feColorMatrix
|
|
5
|
-
type="matrix"
|
|
6
|
-
values="1.300 0.200 0.000 0.000 0.000
|
|
7
|
-
0.300 0.600 0.200 0.000 0.000
|
|
8
|
-
0.200 1.000 0.200 0.000 0.000
|
|
9
|
-
0.000 0.000 0.000 1.000 0.000"
|
|
10
|
-
/>
|
|
11
|
-
</filter>
|
|
12
|
-
</svg>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} Summer84Props */
|
|
2
|
-
/** @typedef {typeof __propDef.events} Summer84Events */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} Summer84Slots */
|
|
4
|
-
export default class Summer84 extends SvelteComponentTyped<{
|
|
5
|
-
[x: string]: never;
|
|
6
|
-
}, {
|
|
7
|
-
[evt: string]: CustomEvent<any>;
|
|
8
|
-
}, {}> {
|
|
9
|
-
}
|
|
10
|
-
export type Summer84Props = typeof __propDef.props;
|
|
11
|
-
export type Summer84Events = typeof __propDef.events;
|
|
12
|
-
export type Summer84Slots = typeof __propDef.slots;
|
|
13
|
-
import { SvelteComponentTyped } from "svelte";
|
|
14
|
-
declare const __propDef: {
|
|
15
|
-
props: {
|
|
16
|
-
[x: string]: never;
|
|
17
|
-
};
|
|
18
|
-
events: {
|
|
19
|
-
[evt: string]: CustomEvent<any>;
|
|
20
|
-
};
|
|
21
|
-
slots: {};
|
|
22
|
-
};
|
|
23
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<!-- XPro: `filter: url(#XPro)` -->
|
|
2
|
-
<svg id="svg-filter-xpro" class="filter absolute -left-full w-0 h-0">
|
|
3
|
-
<filter id="XPro" filterUnits="objectBoundingBox" primitiveUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
4
|
-
<feColorMatrix
|
|
5
|
-
type="matrix"
|
|
6
|
-
values="1.70 -0.20 0.00 0.00 0.00
|
|
7
|
-
0.10 0.800 0.30 0.00 0.00
|
|
8
|
-
0.20 0.300 0.50 0.00 0.00
|
|
9
|
-
0.00 0.00 0.00 1.00 0.00"
|
|
10
|
-
/>
|
|
11
|
-
</filter>
|
|
12
|
-
</svg>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} XProProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} XProEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} XProSlots */
|
|
4
|
-
export default class XPro extends SvelteComponentTyped<{
|
|
5
|
-
[x: string]: never;
|
|
6
|
-
}, {
|
|
7
|
-
[evt: string]: CustomEvent<any>;
|
|
8
|
-
}, {}> {
|
|
9
|
-
}
|
|
10
|
-
export type XProProps = typeof __propDef.props;
|
|
11
|
-
export type XProEvents = typeof __propDef.events;
|
|
12
|
-
export type XProSlots = typeof __propDef.slots;
|
|
13
|
-
import { SvelteComponentTyped } from "svelte";
|
|
14
|
-
declare const __propDef: {
|
|
15
|
-
props: {
|
|
16
|
-
[x: string]: never;
|
|
17
|
-
};
|
|
18
|
-
events: {
|
|
19
|
-
[evt: string]: CustomEvent<any>;
|
|
20
|
-
};
|
|
21
|
-
slots: {};
|
|
22
|
-
};
|
|
23
|
-
export {};
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
// Action: Focus Trap
|
|
2
|
-
export function focusTrap(node, enabled) {
|
|
3
|
-
const elemWhitelist = 'a[href]:not([tabindex="-1"]), button:not([tabindex="-1"]), input:not([tabindex="-1"]), textarea:not([tabindex="-1"]), select:not([tabindex="-1"]), details:not([tabindex="-1"]), [tabindex]:not([tabindex="-1"])';
|
|
4
|
-
let elemFirst;
|
|
5
|
-
let elemLast;
|
|
6
|
-
// When the first element is selected, shift+tab pressed, jump to the last selectable item.
|
|
7
|
-
function onFirstElemKeydown(e) {
|
|
8
|
-
if (e.shiftKey && e.code === 'Tab') {
|
|
9
|
-
e.preventDefault();
|
|
10
|
-
elemLast.focus();
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
// When the last item selected, tab pressed, jump to the first selectable item.
|
|
14
|
-
function onLastElemKeydown(e) {
|
|
15
|
-
if (!e.shiftKey && e.code === 'Tab') {
|
|
16
|
-
e.preventDefault();
|
|
17
|
-
elemFirst.focus();
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
// Sort focusable elements by tabindex, positive first, then 0
|
|
21
|
-
const sortByTabIndex = (focusableElems) => {
|
|
22
|
-
return focusableElems
|
|
23
|
-
.filter((elem) => elem.tabIndex >= 0)
|
|
24
|
-
.sort((a, b) => {
|
|
25
|
-
if (a.tabIndex === 0 && b.tabIndex > 0)
|
|
26
|
-
return 1; // Move 0 to end of array
|
|
27
|
-
else if (a.tabIndex > 0 && b.tabIndex === 0)
|
|
28
|
-
return -1; // Move 0 to end of array
|
|
29
|
-
else
|
|
30
|
-
return a.tabIndex - b.tabIndex; // Sort non-zero values in ascending order
|
|
31
|
-
});
|
|
32
|
-
};
|
|
33
|
-
// Get element with smallest focusindex value, or first focusable element
|
|
34
|
-
const getFocusTrapTarget = (elemFirst) => {
|
|
35
|
-
// Get elements with data-focusindex attribute
|
|
36
|
-
const focusindexElements = [...node.querySelectorAll('[data-focusindex]')];
|
|
37
|
-
if (!focusindexElements || focusindexElements.length === 0)
|
|
38
|
-
return elemFirst;
|
|
39
|
-
// return smallest focusindex element or elemFirst
|
|
40
|
-
return (focusindexElements.sort((a, b) => {
|
|
41
|
-
return +a.dataset.focusindex - +b.dataset.focusindex;
|
|
42
|
-
})[0] || elemFirst);
|
|
43
|
-
};
|
|
44
|
-
const onScanElements = (fromObserver) => {
|
|
45
|
-
if (enabled === false)
|
|
46
|
-
return;
|
|
47
|
-
// Gather all focusable elements, sorted according to tabindex
|
|
48
|
-
const focusableElems = sortByTabIndex(Array.from(node.querySelectorAll(elemWhitelist)));
|
|
49
|
-
if (focusableElems.length) {
|
|
50
|
-
// Set first/last focusable elements
|
|
51
|
-
elemFirst = focusableElems[0];
|
|
52
|
-
elemLast = focusableElems[focusableElems.length - 1];
|
|
53
|
-
// Auto-focus focusTrapTarget or first focusable element only when not called from observer
|
|
54
|
-
if (!fromObserver)
|
|
55
|
-
getFocusTrapTarget(elemFirst).focus();
|
|
56
|
-
// Listen for keydown on first & last element
|
|
57
|
-
elemFirst.addEventListener('keydown', onFirstElemKeydown);
|
|
58
|
-
elemLast.addEventListener('keydown', onLastElemKeydown);
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
onScanElements(false);
|
|
62
|
-
function onCleanUp() {
|
|
63
|
-
if (elemFirst)
|
|
64
|
-
elemFirst.removeEventListener('keydown', onFirstElemKeydown);
|
|
65
|
-
if (elemLast)
|
|
66
|
-
elemLast.removeEventListener('keydown', onLastElemKeydown);
|
|
67
|
-
}
|
|
68
|
-
// When children of node are changed (added or removed)
|
|
69
|
-
const onObservationChange = (mutationRecords, observer) => {
|
|
70
|
-
if (mutationRecords.length) {
|
|
71
|
-
onCleanUp();
|
|
72
|
-
onScanElements(true);
|
|
73
|
-
}
|
|
74
|
-
return observer;
|
|
75
|
-
};
|
|
76
|
-
const observer = new MutationObserver(onObservationChange);
|
|
77
|
-
observer.observe(node, { childList: true, subtree: true });
|
|
78
|
-
// Lifecycle
|
|
79
|
-
return {
|
|
80
|
-
update(newArgs) {
|
|
81
|
-
enabled = newArgs;
|
|
82
|
-
newArgs ? onScanElements(false) : onCleanUp();
|
|
83
|
-
},
|
|
84
|
-
destroy() {
|
|
85
|
-
onCleanUp();
|
|
86
|
-
observer.disconnect();
|
|
87
|
-
}
|
|
88
|
-
};
|
|
89
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
<script context="module">import { slide } from "svelte/transition";
|
|
2
|
-
import { prefersReducedMotionStore } from "../../index.js";
|
|
3
|
-
</script>
|
|
4
|
-
|
|
5
|
-
<script generics="TransitionIn extends Transition = SlideTransition, TransitionOut extends Transition = SlideTransition">import { writable } from "svelte/store";
|
|
6
|
-
import { setContext } from "svelte";
|
|
7
|
-
export let autocollapse = false;
|
|
8
|
-
export let width = "w-full";
|
|
9
|
-
export let spacing = "space-y-1";
|
|
10
|
-
export let disabled = false;
|
|
11
|
-
export let padding = "py-2 px-4";
|
|
12
|
-
export let hover = "hover:bg-primary-hover-token";
|
|
13
|
-
export let rounded = "rounded-container-token";
|
|
14
|
-
export let caretOpen = "rotate-180";
|
|
15
|
-
export let caretClosed = "";
|
|
16
|
-
export let regionControl = "";
|
|
17
|
-
export let regionPanel = "space-y-4";
|
|
18
|
-
export let regionCaret = "";
|
|
19
|
-
export let transitions = !$prefersReducedMotionStore;
|
|
20
|
-
export let transitionIn = slide;
|
|
21
|
-
export let transitionInParams = { duration: 200 };
|
|
22
|
-
export let transitionOut = slide;
|
|
23
|
-
export let transitionOutParams = { duration: 200 };
|
|
24
|
-
const active = writable(null);
|
|
25
|
-
setContext("active", active);
|
|
26
|
-
setContext("autocollapse", autocollapse);
|
|
27
|
-
setContext("disabled", disabled);
|
|
28
|
-
setContext("padding", padding);
|
|
29
|
-
setContext("hover", hover);
|
|
30
|
-
setContext("rounded", rounded);
|
|
31
|
-
setContext("caretOpen", caretOpen);
|
|
32
|
-
setContext("caretClosed", caretClosed);
|
|
33
|
-
setContext("regionControl", regionControl);
|
|
34
|
-
setContext("regionPanel", regionPanel);
|
|
35
|
-
setContext("regionCaret", regionCaret);
|
|
36
|
-
setContext("transitions", transitions);
|
|
37
|
-
setContext("transitionIn", transitionIn);
|
|
38
|
-
setContext("transitionInParams", transitionInParams);
|
|
39
|
-
setContext("transitionOut", transitionOut);
|
|
40
|
-
setContext("transitionOutParams", transitionOutParams);
|
|
41
|
-
$:
|
|
42
|
-
classesBase = `${width} ${spacing} ${$$props.class ?? ""}`;
|
|
43
|
-
</script>
|
|
44
|
-
|
|
45
|
-
<!-- @component The Accordion parent element. -->
|
|
46
|
-
|
|
47
|
-
<div class="accordion {classesBase}" data-testid="accordion">
|
|
48
|
-
<slot />
|
|
49
|
-
</div>
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import { slide } from 'svelte/transition';
|
|
3
|
-
import { type Transition, type TransitionParams } from '../../index.js';
|
|
4
|
-
type SlideTransition = typeof slide;
|
|
5
|
-
declare class __sveltets_Render<TransitionIn extends Transition = SlideTransition, TransitionOut extends Transition = SlideTransition> {
|
|
6
|
-
props(): {
|
|
7
|
-
[x: string]: any;
|
|
8
|
-
/** Set the auto-collapse mode.*/
|
|
9
|
-
autocollapse?: boolean | undefined;
|
|
10
|
-
/** Provide classes to set the accordion width.*/
|
|
11
|
-
width?: string | undefined;
|
|
12
|
-
/** Provide classes to set the vertical spacing between items.*/
|
|
13
|
-
spacing?: string | undefined;
|
|
14
|
-
/** Set the accordion disabled state for all items.*/
|
|
15
|
-
disabled?: boolean | undefined;
|
|
16
|
-
/** Provide classes to set the accordion item padding styles.*/
|
|
17
|
-
padding?: string | undefined;
|
|
18
|
-
/** Provide classes to set the accordion item hover styles.*/
|
|
19
|
-
hover?: string | undefined;
|
|
20
|
-
/** Provide classes to set the accordion item rounded styles.*/
|
|
21
|
-
rounded?: string | undefined;
|
|
22
|
-
/** Set the rotation of the item caret in the open state.*/
|
|
23
|
-
caretOpen?: string | undefined;
|
|
24
|
-
/** Set the rotation of the item caret in the closed state.*/
|
|
25
|
-
caretClosed?: string | undefined;
|
|
26
|
-
/** Provide arbitrary classes to the trigger button region.*/
|
|
27
|
-
regionControl?: string | undefined;
|
|
28
|
-
/** Provide arbitrary classes to the content panel region.*/
|
|
29
|
-
regionPanel?: string | undefined;
|
|
30
|
-
/** Provide arbitrary classes to the caret icon region.*/
|
|
31
|
-
regionCaret?: string | undefined;
|
|
32
|
-
/** Enable/Disable transitions*/
|
|
33
|
-
transitions?: boolean | undefined;
|
|
34
|
-
/** Provide the transition to used on entry.*/
|
|
35
|
-
transitionIn?: TransitionIn | undefined;
|
|
36
|
-
/** Transition params provided to `transitionIn`.*/
|
|
37
|
-
transitionInParams?: TransitionParams<TransitionIn> | undefined;
|
|
38
|
-
/** Provide the transition to used on exit.*/
|
|
39
|
-
transitionOut?: TransitionOut | undefined;
|
|
40
|
-
/** Transition params provided to `transitionOut`.*/
|
|
41
|
-
transitionOutParams?: TransitionParams<TransitionOut> | undefined;
|
|
42
|
-
};
|
|
43
|
-
events(): {} & {
|
|
44
|
-
[evt: string]: CustomEvent<any>;
|
|
45
|
-
};
|
|
46
|
-
slots(): {
|
|
47
|
-
default: {};
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
export type AccordionProps<TransitionIn extends Transition = SlideTransition, TransitionOut extends Transition = SlideTransition> = ReturnType<__sveltets_Render<TransitionIn, TransitionOut>['props']>;
|
|
51
|
-
export type AccordionEvents<TransitionIn extends Transition = SlideTransition, TransitionOut extends Transition = SlideTransition> = ReturnType<__sveltets_Render<TransitionIn, TransitionOut>['events']>;
|
|
52
|
-
export type AccordionSlots<TransitionIn extends Transition = SlideTransition, TransitionOut extends Transition = SlideTransition> = ReturnType<__sveltets_Render<TransitionIn, TransitionOut>['slots']>;
|
|
53
|
-
/** The Accordion parent element. */
|
|
54
|
-
export default class Accordion<TransitionIn extends Transition = SlideTransition, TransitionOut extends Transition = SlideTransition> extends SvelteComponentTyped<AccordionProps<TransitionIn, TransitionOut>, AccordionEvents<TransitionIn, TransitionOut>, AccordionSlots<TransitionIn, TransitionOut>> {
|
|
55
|
-
}
|
|
56
|
-
export {};
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
<script>import { createEventDispatcher, getContext } from "svelte";
|
|
2
|
-
import { dynamicTransition } from "../../internal/transitions.js";
|
|
3
|
-
const dispatch = createEventDispatcher();
|
|
4
|
-
export let open = false;
|
|
5
|
-
export let id = String(Math.random());
|
|
6
|
-
const cBase = "";
|
|
7
|
-
const cControl = "text-start w-full flex items-center space-x-4";
|
|
8
|
-
const cControlIcons = "fill-current w-3 transition-transform duration-[200ms]";
|
|
9
|
-
const cPanel = "";
|
|
10
|
-
export let autocollapse = getContext("autocollapse");
|
|
11
|
-
export let active = getContext("active");
|
|
12
|
-
export let disabled = getContext("disabled");
|
|
13
|
-
export let padding = getContext("padding");
|
|
14
|
-
export let hover = getContext("hover");
|
|
15
|
-
export let rounded = getContext("rounded");
|
|
16
|
-
export let caretOpen = getContext("caretOpen");
|
|
17
|
-
export let caretClosed = getContext("caretClosed");
|
|
18
|
-
export let regionControl = getContext("regionControl");
|
|
19
|
-
export let regionPanel = getContext("regionPanel");
|
|
20
|
-
export let regionCaret = getContext("regionCaret");
|
|
21
|
-
export let transitions = getContext("transitions");
|
|
22
|
-
export let transitionIn = getContext("transitionIn");
|
|
23
|
-
export let transitionInParams = getContext("transitionInParams");
|
|
24
|
-
export let transitionOut = getContext("transitionOut");
|
|
25
|
-
export let transitionOutParams = getContext("transitionOutParams");
|
|
26
|
-
const svgCaretIcon = `
|
|
27
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">
|
|
28
|
-
<path d="M201.4 374.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 306.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z" />
|
|
29
|
-
</svg>`;
|
|
30
|
-
function setActive(event) {
|
|
31
|
-
if (autocollapse === true) {
|
|
32
|
-
active.set(id);
|
|
33
|
-
} else {
|
|
34
|
-
open = !open;
|
|
35
|
-
}
|
|
36
|
-
onToggle(event);
|
|
37
|
-
}
|
|
38
|
-
function onToggle(event) {
|
|
39
|
-
const currentOpenState = autocollapse ? $active === id : open;
|
|
40
|
-
dispatch("toggle", {
|
|
41
|
-
event,
|
|
42
|
-
id,
|
|
43
|
-
panelId: `accordion-panel-${id}`,
|
|
44
|
-
open: currentOpenState,
|
|
45
|
-
autocollapse
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
if (autocollapse && open)
|
|
49
|
-
setActive();
|
|
50
|
-
$:
|
|
51
|
-
if (open && autocollapse)
|
|
52
|
-
setActive();
|
|
53
|
-
$:
|
|
54
|
-
openState = autocollapse ? $active === id : open;
|
|
55
|
-
$:
|
|
56
|
-
classesBase = `${cBase} ${$$props.class ?? ""}`;
|
|
57
|
-
$:
|
|
58
|
-
classesControl = `${cControl} ${padding} ${hover} ${rounded} ${regionControl}`;
|
|
59
|
-
$:
|
|
60
|
-
classesCaretState = openState ? caretOpen : caretClosed;
|
|
61
|
-
$:
|
|
62
|
-
classesControlCaret = `${cControlIcons} ${regionCaret} ${classesCaretState}`;
|
|
63
|
-
$:
|
|
64
|
-
classesControlIcons = `${cControlIcons} ${regionCaret}`;
|
|
65
|
-
$:
|
|
66
|
-
classesPanel = `${cPanel} ${padding} ${rounded} ${regionPanel}`;
|
|
67
|
-
</script>
|
|
68
|
-
|
|
69
|
-
<!-- @component The Accordion child element. -->
|
|
70
|
-
|
|
71
|
-
<div class="accordion-item {classesBase}" data-testid="accordion-item">
|
|
72
|
-
<!-- Control -->
|
|
73
|
-
<button
|
|
74
|
-
type="button"
|
|
75
|
-
class="accordion-control {classesControl}"
|
|
76
|
-
{id}
|
|
77
|
-
on:click={setActive}
|
|
78
|
-
on:click
|
|
79
|
-
on:keydown
|
|
80
|
-
on:keyup
|
|
81
|
-
on:keypress
|
|
82
|
-
aria-expanded={openState}
|
|
83
|
-
aria-controls="accordion-panel-{id}"
|
|
84
|
-
{disabled}
|
|
85
|
-
>
|
|
86
|
-
<!-- Lead -->
|
|
87
|
-
{#if $$slots.lead}
|
|
88
|
-
<div class="accordion-lead">
|
|
89
|
-
<slot name="lead" />
|
|
90
|
-
</div>
|
|
91
|
-
{/if}
|
|
92
|
-
<!-- Summary -->
|
|
93
|
-
<div class="accordion-summary flex-1">
|
|
94
|
-
<slot name="summary">(summary)</slot>
|
|
95
|
-
</div>
|
|
96
|
-
<!-- Icons -->
|
|
97
|
-
{#if $$slots.iconClosed || $$slots.iconOpen}
|
|
98
|
-
<!-- Custom -->
|
|
99
|
-
<!-- If a custom icon is provided, do not use rotation -->
|
|
100
|
-
<div class="accordion-summary-icons {classesControlIcons}">
|
|
101
|
-
{#if openState}
|
|
102
|
-
<slot name="iconClosed">{@html svgCaretIcon}</slot>
|
|
103
|
-
{:else}
|
|
104
|
-
<slot name="iconOpen">{@html svgCaretIcon}</slot>
|
|
105
|
-
{/if}
|
|
106
|
-
</div>
|
|
107
|
-
{:else}
|
|
108
|
-
<!-- SVG Caret -->
|
|
109
|
-
<div class="accordion-summary-caret {classesControlCaret}">{@html svgCaretIcon}</div>
|
|
110
|
-
{/if}
|
|
111
|
-
</button>
|
|
112
|
-
<!-- Panel -->
|
|
113
|
-
{#if openState}
|
|
114
|
-
<div
|
|
115
|
-
class="accordion-panel {classesPanel}"
|
|
116
|
-
id="accordion-panel-{id}"
|
|
117
|
-
in:dynamicTransition|local={{ transition: transitionIn, params: transitionInParams, enabled: transitions }}
|
|
118
|
-
out:dynamicTransition|local={{ transition: transitionOut, params: transitionOutParams, enabled: transitions }}
|
|
119
|
-
role="region"
|
|
120
|
-
aria-hidden={!openState}
|
|
121
|
-
aria-labelledby={id}
|
|
122
|
-
>
|
|
123
|
-
<slot name="content">(content)</slot>
|
|
124
|
-
</div>
|
|
125
|
-
{/if}
|
|
126
|
-
</div>
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import type { Writable } from 'svelte/store';
|
|
3
|
-
import type { Transition, TransitionParams } from '../../index.js';
|
|
4
|
-
declare class __sveltets_Render<TransitionIn extends Transition, TransitionOut extends Transition> {
|
|
5
|
-
props(): {
|
|
6
|
-
[x: string]: any;
|
|
7
|
-
/** Set open by default on load.*/
|
|
8
|
-
open?: boolean | undefined;
|
|
9
|
-
/** Provide a unique input id. Auto-generated by default*/
|
|
10
|
-
id?: string | undefined;
|
|
11
|
-
/** Set the auto-collapse mode.*/
|
|
12
|
-
autocollapse?: boolean | undefined;
|
|
13
|
-
/** The writable store that houses the auto-collapse active item UUID.*/
|
|
14
|
-
active?: Writable<string | null> | undefined;
|
|
15
|
-
/** Set the disabled state for this item.*/
|
|
16
|
-
disabled?: boolean | undefined;
|
|
17
|
-
/** Provide classes to set the accordion item padding styles.*/
|
|
18
|
-
padding?: string | undefined;
|
|
19
|
-
/** Provide classes to set the accordion item hover styles.*/
|
|
20
|
-
hover?: string | undefined;
|
|
21
|
-
/** Provide classes to set the accordion item rounded styles.*/
|
|
22
|
-
rounded?: string | undefined;
|
|
23
|
-
/** Provide arbitrary classes to the trigger button region.*/
|
|
24
|
-
caretOpen?: string | undefined;
|
|
25
|
-
/** Provide arbitrary classes to content panel region.*/
|
|
26
|
-
caretClosed?: string | undefined;
|
|
27
|
-
/** Provide arbitrary classes to the trigger button region.*/
|
|
28
|
-
regionControl?: string | undefined;
|
|
29
|
-
/** Provide arbitrary classes to content panel region.*/
|
|
30
|
-
regionPanel?: string | undefined;
|
|
31
|
-
/** Provide arbitrary classes default region.*/
|
|
32
|
-
regionCaret?: string | undefined;
|
|
33
|
-
/** Enable/Disable transitions*/
|
|
34
|
-
transitions?: boolean | undefined;
|
|
35
|
-
/** Provide the transition to used on entry.*/
|
|
36
|
-
transitionIn?: TransitionIn | undefined;
|
|
37
|
-
/** Transition params provided to `transitionIn`.*/
|
|
38
|
-
transitionInParams?: TransitionParams<TransitionIn> | undefined;
|
|
39
|
-
/** Provide the transition to used on exit.*/
|
|
40
|
-
transitionOut?: TransitionOut | undefined;
|
|
41
|
-
/** Transition params provided to `transitionOut`.*/
|
|
42
|
-
transitionOutParams?: TransitionParams<TransitionOut> | undefined;
|
|
43
|
-
};
|
|
44
|
-
events(): {
|
|
45
|
-
click: MouseEvent;
|
|
46
|
-
keydown: KeyboardEvent;
|
|
47
|
-
keyup: KeyboardEvent;
|
|
48
|
-
keypress: KeyboardEvent;
|
|
49
|
-
toggle: CustomEvent<{
|
|
50
|
-
event?: Event | undefined;
|
|
51
|
-
id: string;
|
|
52
|
-
panelId: string;
|
|
53
|
-
open: boolean;
|
|
54
|
-
autocollapse: boolean;
|
|
55
|
-
}>;
|
|
56
|
-
} & {
|
|
57
|
-
[evt: string]: CustomEvent<any>;
|
|
58
|
-
};
|
|
59
|
-
slots(): {
|
|
60
|
-
lead: {};
|
|
61
|
-
summary: {};
|
|
62
|
-
iconClosed: {};
|
|
63
|
-
iconOpen: {};
|
|
64
|
-
content: {};
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
export type AccordionItemProps<TransitionIn extends Transition, TransitionOut extends Transition> = ReturnType<__sveltets_Render<TransitionIn, TransitionOut>['props']>;
|
|
68
|
-
export type AccordionItemEvents<TransitionIn extends Transition, TransitionOut extends Transition> = ReturnType<__sveltets_Render<TransitionIn, TransitionOut>['events']>;
|
|
69
|
-
export type AccordionItemSlots<TransitionIn extends Transition, TransitionOut extends Transition> = ReturnType<__sveltets_Render<TransitionIn, TransitionOut>['slots']>;
|
|
70
|
-
/** The Accordion child element. */
|
|
71
|
-
export default class AccordionItem<TransitionIn extends Transition, TransitionOut extends Transition> extends SvelteComponentTyped<AccordionItemProps<TransitionIn, TransitionOut>, AccordionItemEvents<TransitionIn, TransitionOut>, AccordionItemSlots<TransitionIn, TransitionOut>> {
|
|
72
|
-
}
|
|
73
|
-
export {};
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
<script>export let background = "bg-surface-100-800-token";
|
|
2
|
-
export let border = "";
|
|
3
|
-
export let padding = "p-4";
|
|
4
|
-
export let shadow = "";
|
|
5
|
-
export let spacing = "space-y-4";
|
|
6
|
-
export let gridColumns = "grid-cols-[auto_1fr_auto]";
|
|
7
|
-
export let gap = "gap-4";
|
|
8
|
-
export let regionRowMain = "";
|
|
9
|
-
export let regionRowHeadline = "";
|
|
10
|
-
export let slotLead = "";
|
|
11
|
-
export let slotDefault = "";
|
|
12
|
-
export let slotTrail = "";
|
|
13
|
-
export let label = "";
|
|
14
|
-
export let labelledby = "";
|
|
15
|
-
const cBase = "flex flex-col";
|
|
16
|
-
const cRowMain = "grid items-center";
|
|
17
|
-
const cRowHeadline = "";
|
|
18
|
-
const cSlotLead = "flex-none flex justify-between items-center";
|
|
19
|
-
const cSlotDefault = "flex-auto";
|
|
20
|
-
const cSlotTrail = "flex-none flex items-center space-x-4";
|
|
21
|
-
$:
|
|
22
|
-
classesBase = `${cBase} ${background} ${border} ${spacing} ${padding} ${shadow} ${$$props.class ?? ""}`;
|
|
23
|
-
$:
|
|
24
|
-
classesRowMain = `${cRowMain} ${gridColumns} ${gap} ${regionRowMain}`;
|
|
25
|
-
$:
|
|
26
|
-
classesRowHeadline = `${cRowHeadline} ${regionRowHeadline}`;
|
|
27
|
-
$:
|
|
28
|
-
classesSlotLead = `${cSlotLead} ${slotLead}`;
|
|
29
|
-
$:
|
|
30
|
-
classesSlotDefault = `${cSlotDefault} ${slotDefault}`;
|
|
31
|
-
$:
|
|
32
|
-
classesSlotTrail = `${cSlotTrail} ${slotTrail}`;
|
|
33
|
-
</script>
|
|
34
|
-
|
|
35
|
-
<div class="app-bar {classesBase}" data-testid="app-bar" role="toolbar" aria-label={label} aria-labelledby={labelledby}>
|
|
36
|
-
<!-- Row: Main -->
|
|
37
|
-
<div class="app-bar-row-main {classesRowMain}">
|
|
38
|
-
<!-- Slot: lead -->
|
|
39
|
-
{#if $$slots.lead}
|
|
40
|
-
<div class="app-bar-slot-lead {classesSlotLead}"><slot name="lead" /></div>
|
|
41
|
-
{/if}
|
|
42
|
-
<!-- Slot: default -->
|
|
43
|
-
<div class="app-bar-slot-default {classesSlotDefault}"><slot /></div>
|
|
44
|
-
<!-- Slot: trail -->
|
|
45
|
-
{#if $$slots.trail}
|
|
46
|
-
<div class="app-bar-slot-trail {classesSlotTrail}"><slot name="trail" /></div>
|
|
47
|
-
{/if}
|
|
48
|
-
</div>
|
|
49
|
-
<!-- Row: Headline -->
|
|
50
|
-
{#if $$slots.headline}
|
|
51
|
-
<div class="app-bar-row-headline {classesRowHeadline}"><slot name="headline" /></div>
|
|
52
|
-
{/if}
|
|
53
|
-
</div>
|