@skeletonlabs/skeleton 0.80.8 → 0.86.9
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/README.md +1 -1
- package/actions/Filters/svg-filters/Apollo.svelte.d.ts +6 -2
- package/actions/Filters/svg-filters/BlueNight.svelte.d.ts +6 -2
- package/actions/Filters/svg-filters/Emerald.svelte.d.ts +6 -2
- package/actions/Filters/svg-filters/GreenFall.svelte.d.ts +6 -2
- package/actions/Filters/svg-filters/Noir.svelte.d.ts +6 -2
- package/actions/Filters/svg-filters/NoirLight.svelte.d.ts +6 -2
- package/actions/Filters/svg-filters/Rustic.svelte.d.ts +6 -2
- package/actions/Filters/svg-filters/Summer84.svelte.d.ts +6 -2
- package/actions/Filters/svg-filters/XPro.svelte.d.ts +6 -2
- package/components/Accordion/AccordionGroup.svelte +1 -2
- package/components/Accordion/AccordionItem.svelte +1 -1
- package/components/Accordion/AccordionItem.svelte.d.ts +1 -0
- package/components/Alert/Alert.svelte +3 -3
- package/components/AppRail/AppRailTile.svelte +17 -18
- package/components/AppShell/AppShell.svelte +3 -3
- package/components/Breadcrumb/Crumb.svelte +3 -1
- package/components/Breadcrumb/Crumb.svelte.d.ts +5 -0
- package/components/ConicGradient/ConicGradient.svelte +1 -1
- package/components/ConicGradient/ConicGradient.svelte.d.ts +5 -0
- package/components/FileButton/FileButton.svelte +2 -2
- package/components/FileButton/FileButton.svelte.d.ts +3 -0
- package/components/FileDropzone/FileDropzone.svelte +4 -0
- package/components/FileDropzone/FileDropzone.svelte.d.ts +4 -0
- package/components/GradientHeading/GradientHeading.svelte +1 -1
- package/components/ListBox/ListBoxItem.svelte +3 -1
- package/components/ListBox/ListBoxItem.svelte.d.ts +2 -0
- package/components/Paginator/Paginator.svelte +21 -9
- package/components/Paginator/Paginator.svelte.d.ts +5 -1
- package/components/ProgressBar/ProgressBar.svelte +6 -4
- package/components/ProgressBar/ProgressBar.svelte.d.ts +1 -0
- package/components/ProgressRadial/ProgressRadial.svelte +1 -1
- package/components/Radio/RadioGroup.svelte +2 -2
- package/components/Radio/RadioItem.svelte +3 -1
- package/components/Radio/RadioItem.svelte.d.ts +2 -0
- package/components/RangeSlider/RangeSlider.svelte +1 -1
- package/components/SlideToggle/SlideToggle.svelte +8 -5
- package/components/SlideToggle/SlideToggle.svelte.d.ts +4 -1
- package/components/Stepper/Step.svelte +27 -7
- package/components/Stepper/Step.svelte.d.ts +6 -3
- package/components/Stepper/Stepper.svelte +19 -10
- package/components/Stepper/Stepper.svelte.d.ts +6 -3
- package/components/Tab/Tab.svelte +15 -3
- package/components/Tab/Tab.svelte.d.ts +5 -0
- package/components/Table/Table.svelte +3 -3
- package/package.json +18 -20
- package/styles/elements/badges.css +11 -5
- package/styles/elements/buttons.css +33 -9
- package/styles/elements/cards.css +22 -3
- package/styles/elements/chips.css +4 -2
- package/styles/elements/tables.css +1 -1
- package/styles/forms.css +4 -4
- package/styles/tokens/backgrounds.css +119 -29
- package/styles/tokens/borders.css +90 -22
- package/styles/tokens/fills.css +14 -5
- package/styles/tokens/rings.css +90 -22
- package/styles/tokens/text.css +104 -27
- package/styles/tokens.css +0 -3
- package/styles/typography.css +6 -6
- package/tailwind/colors.d.ts +1 -1
- package/tailwind/colors.js +1 -1
- package/tailwind/theme.cjs +4 -2
- package/themes/theme-crimson.css +88 -64
- package/themes/theme-gold-nouveau.css +108 -115
- package/themes/theme-hamlindigo.css +97 -74
- package/themes/theme-modern.css +107 -64
- package/themes/theme-rocket.css +96 -63
- package/themes/theme-sahara.css +104 -65
- package/themes/theme-seafoam.css +100 -66
- package/themes/theme-seasonal.css +111 -65
- package/themes/theme-skeleton.css +99 -75
- package/themes/theme-vintage.css +102 -63
- package/utilities/CodeBlock/CodeBlock.svelte +6 -1
- package/utilities/CodeBlock/CodeBlock.svelte.d.ts +2 -0
- package/utilities/DataTable/DataTable.js +3 -1
- package/utilities/Drawer/Drawer.svelte +11 -10
- package/utilities/Drawer/Drawer.svelte.d.ts +1 -2
- package/utilities/Drawer/stores.d.ts +1 -1
- package/utilities/LightSwitch/LightSwitch.svelte +9 -4
- package/utilities/LightSwitch/LightSwitch.svelte.d.ts +6 -1
- package/utilities/LocalStorageStore/LocalStorageStore.d.ts +3 -1
- package/utilities/LocalStorageStore/LocalStorageStore.js +9 -4
- package/utilities/Menu/menu.js +11 -7
- package/utilities/Modal/Modal.svelte +21 -9
- package/utilities/Modal/Modal.svelte.d.ts +2 -0
- package/utilities/Modal/types.d.ts +8 -0
- package/utilities/Toast/Toast.svelte +2 -2
- package/utilities/Toast/stores.js +18 -1
- package/utilities/Toast/types.d.ts +5 -0
- package/styles/tokens/misc.css +0 -22
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
# 💀 Skeleton
|
|
9
9
|
|
|
10
|
-
A fully featured Svelte UI toolkit for Svelte + Tailwind. Skeleton allows you to build fast and reactive web interfaces using the power of [Svelte](https://svelte.dev/) + [Tailwind CSS](https://tailwindcss.com/). Including official support for [SvelteKit](https://kit.svelte.dev/)
|
|
10
|
+
A fully featured Svelte UI toolkit for Svelte + Tailwind. Skeleton allows you to build fast and reactive web interfaces using the power of [Svelte](https://svelte.dev/) + [Tailwind CSS](https://tailwindcss.com/). Including official support for [SvelteKit](https://kit.svelte.dev/).
|
|
11
11
|
|
|
12
12
|
## 🔗 Useful Links
|
|
13
13
|
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/** @typedef {typeof __propDef.props} ApolloProps */
|
|
2
2
|
/** @typedef {typeof __propDef.events} ApolloEvents */
|
|
3
3
|
/** @typedef {typeof __propDef.slots} ApolloSlots */
|
|
4
|
-
export default class Apollo extends SvelteComponentTyped<{
|
|
4
|
+
export default class Apollo extends SvelteComponentTyped<{
|
|
5
|
+
[x: string]: never;
|
|
6
|
+
}, {
|
|
5
7
|
[evt: string]: CustomEvent<any>;
|
|
6
8
|
}, {}> {
|
|
7
9
|
}
|
|
@@ -10,7 +12,9 @@ export type ApolloEvents = typeof __propDef.events;
|
|
|
10
12
|
export type ApolloSlots = typeof __propDef.slots;
|
|
11
13
|
import { SvelteComponentTyped } from "svelte";
|
|
12
14
|
declare const __propDef: {
|
|
13
|
-
props: {
|
|
15
|
+
props: {
|
|
16
|
+
[x: string]: never;
|
|
17
|
+
};
|
|
14
18
|
events: {
|
|
15
19
|
[evt: string]: CustomEvent<any>;
|
|
16
20
|
};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/** @typedef {typeof __propDef.props} BlueNightProps */
|
|
2
2
|
/** @typedef {typeof __propDef.events} BlueNightEvents */
|
|
3
3
|
/** @typedef {typeof __propDef.slots} BlueNightSlots */
|
|
4
|
-
export default class BlueNight extends SvelteComponentTyped<{
|
|
4
|
+
export default class BlueNight extends SvelteComponentTyped<{
|
|
5
|
+
[x: string]: never;
|
|
6
|
+
}, {
|
|
5
7
|
[evt: string]: CustomEvent<any>;
|
|
6
8
|
}, {}> {
|
|
7
9
|
}
|
|
@@ -10,7 +12,9 @@ export type BlueNightEvents = typeof __propDef.events;
|
|
|
10
12
|
export type BlueNightSlots = typeof __propDef.slots;
|
|
11
13
|
import { SvelteComponentTyped } from "svelte";
|
|
12
14
|
declare const __propDef: {
|
|
13
|
-
props: {
|
|
15
|
+
props: {
|
|
16
|
+
[x: string]: never;
|
|
17
|
+
};
|
|
14
18
|
events: {
|
|
15
19
|
[evt: string]: CustomEvent<any>;
|
|
16
20
|
};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/** @typedef {typeof __propDef.props} EmeraldProps */
|
|
2
2
|
/** @typedef {typeof __propDef.events} EmeraldEvents */
|
|
3
3
|
/** @typedef {typeof __propDef.slots} EmeraldSlots */
|
|
4
|
-
export default class Emerald extends SvelteComponentTyped<{
|
|
4
|
+
export default class Emerald extends SvelteComponentTyped<{
|
|
5
|
+
[x: string]: never;
|
|
6
|
+
}, {
|
|
5
7
|
[evt: string]: CustomEvent<any>;
|
|
6
8
|
}, {}> {
|
|
7
9
|
}
|
|
@@ -10,7 +12,9 @@ export type EmeraldEvents = typeof __propDef.events;
|
|
|
10
12
|
export type EmeraldSlots = typeof __propDef.slots;
|
|
11
13
|
import { SvelteComponentTyped } from "svelte";
|
|
12
14
|
declare const __propDef: {
|
|
13
|
-
props: {
|
|
15
|
+
props: {
|
|
16
|
+
[x: string]: never;
|
|
17
|
+
};
|
|
14
18
|
events: {
|
|
15
19
|
[evt: string]: CustomEvent<any>;
|
|
16
20
|
};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/** @typedef {typeof __propDef.props} GreenFallProps */
|
|
2
2
|
/** @typedef {typeof __propDef.events} GreenFallEvents */
|
|
3
3
|
/** @typedef {typeof __propDef.slots} GreenFallSlots */
|
|
4
|
-
export default class GreenFall extends SvelteComponentTyped<{
|
|
4
|
+
export default class GreenFall extends SvelteComponentTyped<{
|
|
5
|
+
[x: string]: never;
|
|
6
|
+
}, {
|
|
5
7
|
[evt: string]: CustomEvent<any>;
|
|
6
8
|
}, {}> {
|
|
7
9
|
}
|
|
@@ -10,7 +12,9 @@ export type GreenFallEvents = typeof __propDef.events;
|
|
|
10
12
|
export type GreenFallSlots = typeof __propDef.slots;
|
|
11
13
|
import { SvelteComponentTyped } from "svelte";
|
|
12
14
|
declare const __propDef: {
|
|
13
|
-
props: {
|
|
15
|
+
props: {
|
|
16
|
+
[x: string]: never;
|
|
17
|
+
};
|
|
14
18
|
events: {
|
|
15
19
|
[evt: string]: CustomEvent<any>;
|
|
16
20
|
};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/** @typedef {typeof __propDef.props} NoirProps */
|
|
2
2
|
/** @typedef {typeof __propDef.events} NoirEvents */
|
|
3
3
|
/** @typedef {typeof __propDef.slots} NoirSlots */
|
|
4
|
-
export default class Noir extends SvelteComponentTyped<{
|
|
4
|
+
export default class Noir extends SvelteComponentTyped<{
|
|
5
|
+
[x: string]: never;
|
|
6
|
+
}, {
|
|
5
7
|
[evt: string]: CustomEvent<any>;
|
|
6
8
|
}, {}> {
|
|
7
9
|
}
|
|
@@ -10,7 +12,9 @@ export type NoirEvents = typeof __propDef.events;
|
|
|
10
12
|
export type NoirSlots = typeof __propDef.slots;
|
|
11
13
|
import { SvelteComponentTyped } from "svelte";
|
|
12
14
|
declare const __propDef: {
|
|
13
|
-
props: {
|
|
15
|
+
props: {
|
|
16
|
+
[x: string]: never;
|
|
17
|
+
};
|
|
14
18
|
events: {
|
|
15
19
|
[evt: string]: CustomEvent<any>;
|
|
16
20
|
};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/** @typedef {typeof __propDef.props} NoirLightProps */
|
|
2
2
|
/** @typedef {typeof __propDef.events} NoirLightEvents */
|
|
3
3
|
/** @typedef {typeof __propDef.slots} NoirLightSlots */
|
|
4
|
-
export default class NoirLight extends SvelteComponentTyped<{
|
|
4
|
+
export default class NoirLight extends SvelteComponentTyped<{
|
|
5
|
+
[x: string]: never;
|
|
6
|
+
}, {
|
|
5
7
|
[evt: string]: CustomEvent<any>;
|
|
6
8
|
}, {}> {
|
|
7
9
|
}
|
|
@@ -10,7 +12,9 @@ export type NoirLightEvents = typeof __propDef.events;
|
|
|
10
12
|
export type NoirLightSlots = typeof __propDef.slots;
|
|
11
13
|
import { SvelteComponentTyped } from "svelte";
|
|
12
14
|
declare const __propDef: {
|
|
13
|
-
props: {
|
|
15
|
+
props: {
|
|
16
|
+
[x: string]: never;
|
|
17
|
+
};
|
|
14
18
|
events: {
|
|
15
19
|
[evt: string]: CustomEvent<any>;
|
|
16
20
|
};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/** @typedef {typeof __propDef.props} RusticProps */
|
|
2
2
|
/** @typedef {typeof __propDef.events} RusticEvents */
|
|
3
3
|
/** @typedef {typeof __propDef.slots} RusticSlots */
|
|
4
|
-
export default class Rustic extends SvelteComponentTyped<{
|
|
4
|
+
export default class Rustic extends SvelteComponentTyped<{
|
|
5
|
+
[x: string]: never;
|
|
6
|
+
}, {
|
|
5
7
|
[evt: string]: CustomEvent<any>;
|
|
6
8
|
}, {}> {
|
|
7
9
|
}
|
|
@@ -10,7 +12,9 @@ export type RusticEvents = typeof __propDef.events;
|
|
|
10
12
|
export type RusticSlots = typeof __propDef.slots;
|
|
11
13
|
import { SvelteComponentTyped } from "svelte";
|
|
12
14
|
declare const __propDef: {
|
|
13
|
-
props: {
|
|
15
|
+
props: {
|
|
16
|
+
[x: string]: never;
|
|
17
|
+
};
|
|
14
18
|
events: {
|
|
15
19
|
[evt: string]: CustomEvent<any>;
|
|
16
20
|
};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/** @typedef {typeof __propDef.props} Summer84Props */
|
|
2
2
|
/** @typedef {typeof __propDef.events} Summer84Events */
|
|
3
3
|
/** @typedef {typeof __propDef.slots} Summer84Slots */
|
|
4
|
-
export default class Summer84 extends SvelteComponentTyped<{
|
|
4
|
+
export default class Summer84 extends SvelteComponentTyped<{
|
|
5
|
+
[x: string]: never;
|
|
6
|
+
}, {
|
|
5
7
|
[evt: string]: CustomEvent<any>;
|
|
6
8
|
}, {}> {
|
|
7
9
|
}
|
|
@@ -10,7 +12,9 @@ export type Summer84Events = typeof __propDef.events;
|
|
|
10
12
|
export type Summer84Slots = typeof __propDef.slots;
|
|
11
13
|
import { SvelteComponentTyped } from "svelte";
|
|
12
14
|
declare const __propDef: {
|
|
13
|
-
props: {
|
|
15
|
+
props: {
|
|
16
|
+
[x: string]: never;
|
|
17
|
+
};
|
|
14
18
|
events: {
|
|
15
19
|
[evt: string]: CustomEvent<any>;
|
|
16
20
|
};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/** @typedef {typeof __propDef.props} XProProps */
|
|
2
2
|
/** @typedef {typeof __propDef.events} XProEvents */
|
|
3
3
|
/** @typedef {typeof __propDef.slots} XProSlots */
|
|
4
|
-
export default class XPro extends SvelteComponentTyped<{
|
|
4
|
+
export default class XPro extends SvelteComponentTyped<{
|
|
5
|
+
[x: string]: never;
|
|
6
|
+
}, {
|
|
5
7
|
[evt: string]: CustomEvent<any>;
|
|
6
8
|
}, {}> {
|
|
7
9
|
}
|
|
@@ -10,7 +12,9 @@ export type XProEvents = typeof __propDef.events;
|
|
|
10
12
|
export type XProSlots = typeof __propDef.slots;
|
|
11
13
|
import { SvelteComponentTyped } from "svelte";
|
|
12
14
|
declare const __propDef: {
|
|
13
|
-
props: {
|
|
15
|
+
props: {
|
|
16
|
+
[x: string]: never;
|
|
17
|
+
};
|
|
14
18
|
events: {
|
|
15
19
|
[evt: string]: CustomEvent<any>;
|
|
16
20
|
};
|
|
@@ -29,9 +29,8 @@ onMount(() => {
|
|
|
29
29
|
details.forEach((detail) => {
|
|
30
30
|
detail.addEventListener('click', (e) => {
|
|
31
31
|
const active = details.find((d) => d.open);
|
|
32
|
-
if (!e.currentTarget.open && active)
|
|
32
|
+
if (!e.currentTarget.open && active)
|
|
33
33
|
active.open = false;
|
|
34
|
-
}
|
|
35
34
|
});
|
|
36
35
|
});
|
|
37
36
|
}
|
|
@@ -43,7 +43,7 @@ $: classesContent = `${padding} ${regionContent}`;
|
|
|
43
43
|
|
|
44
44
|
<!-- @component The Accordion child element. -->
|
|
45
45
|
|
|
46
|
-
<details bind:open class="accordion-item {classesDetails}" data-testid="accordion-item" on:click on:keydown on:keyup on:keypress>
|
|
46
|
+
<details bind:open class="accordion-item {classesDetails}" data-testid="accordion-item" on:click on:keydown on:keyup on:keypress on:toggle>
|
|
47
47
|
<!-- Summary -->
|
|
48
48
|
<summary id={summaryId} class="accordion-summary {classesSummary}" aria-expanded={open} aria-controls={contentId}>
|
|
49
49
|
<!-- Slot: Lead -->
|
|
@@ -10,9 +10,9 @@ import { fade } from 'svelte/transition';
|
|
|
10
10
|
/** Control visibility of the alert. */
|
|
11
11
|
export let visible = true;
|
|
12
12
|
/** Provide classes to set background color. */
|
|
13
|
-
export let background = 'bg-
|
|
13
|
+
export let background = 'bg-warning-500/20';
|
|
14
14
|
/** Provide classes to set the border styles. */
|
|
15
|
-
export let border = 'border border-
|
|
15
|
+
export let border = 'border border-warning-500';
|
|
16
16
|
/** Provide classes to set text color. */
|
|
17
17
|
export let color = '';
|
|
18
18
|
/** Provide classes to set border radius. */
|
|
@@ -27,7 +27,7 @@ export let slotContent = '';
|
|
|
27
27
|
/** Classes to be applied to the trail slot region. */
|
|
28
28
|
export let slotTrail = '';
|
|
29
29
|
// Base Classes
|
|
30
|
-
let cBaseCard = 'flex flex-col items-start lg:items-center lg:flex-row p-5 space-y-4 lg:space-y-0 lg:space-x-4
|
|
30
|
+
let cBaseCard = 'flex flex-col items-start lg:items-center lg:flex-row p-5 space-y-4 lg:space-y-0 lg:space-x-4';
|
|
31
31
|
let cLead = 'flex justify-center items-center';
|
|
32
32
|
let cContent = 'flex flex-col w-full justify-center space-y-2';
|
|
33
33
|
let cTrail = 'flex items-center space-x-4';
|
|
@@ -15,24 +15,26 @@ export let label = '';
|
|
|
15
15
|
/** Provide abitrary classes to style the icon region. */
|
|
16
16
|
export let regionIcon = '';
|
|
17
17
|
/** Provide abitrary classes to style the label region. */
|
|
18
|
-
export let regionLabel = '
|
|
18
|
+
export let regionLabel = '';
|
|
19
19
|
// Context
|
|
20
20
|
export let selected = getContext('selected');
|
|
21
21
|
export let active = getContext('active');
|
|
22
22
|
export let hover = getContext('hover');
|
|
23
23
|
// Base Classes
|
|
24
|
-
const cBase = 'grid place-content-center place-items-center w-full aspect-square space-y-1.5';
|
|
24
|
+
const cBase = 'unstyled grid place-content-center place-items-center w-full aspect-square space-y-1.5 cursor-pointer';
|
|
25
|
+
const cLabel = 'text-xs text-center';
|
|
25
26
|
// Input Handler
|
|
26
27
|
function onClickHandler(event) {
|
|
27
|
-
/** @event {{ event }} click - Fires when the component is clicked. */
|
|
28
|
-
dispatch('click', event);
|
|
29
28
|
if (!$selected || !value)
|
|
30
29
|
return;
|
|
31
30
|
$selected = value;
|
|
31
|
+
/** @event {{ event }} click - Fires when the component is clicked. */
|
|
32
|
+
dispatch('click', event);
|
|
32
33
|
}
|
|
33
34
|
// Reactive
|
|
34
35
|
$: classesActive = $selected && value && $selected === value ? `${active}` : '';
|
|
35
36
|
$: classesBase = `${cBase} ${hover} ${classesActive} ${$$props.class || ''}`;
|
|
37
|
+
$: classesLabel = `${cLabel} ${regionLabel}`;
|
|
36
38
|
// RestProps
|
|
37
39
|
function prunedRestProps() {
|
|
38
40
|
delete $$restProps.class;
|
|
@@ -42,17 +44,14 @@ function prunedRestProps() {
|
|
|
42
44
|
|
|
43
45
|
<!-- @component A navigation tile for the App Rail. -->
|
|
44
46
|
|
|
45
|
-
<svelte:element
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
>
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
<!-- Label -->
|
|
57
|
-
{#if label}<div class="app-rail-tile-label {regionLabel}">{label}</div>{/if}
|
|
58
|
-
</svelte:element>
|
|
47
|
+
<!-- NOTE: avoid forwarding events on <svelte:element> tags -->
|
|
48
|
+
<!-- https://github.com/skeletonlabs/skeleton/issues/727#issuecomment-1356859261 -->
|
|
49
|
+
<div on:click={onClickHandler} on:keydown on:keyup on:keypress>
|
|
50
|
+
<!-- NOTE: do not add event forwarding to <svelte:element> tags. See issue above. -->
|
|
51
|
+
<svelte:element this={tag} {...prunedRestProps()} class="app-rail-tile {classesBase}">
|
|
52
|
+
<!-- Slot: Default (icon) -->
|
|
53
|
+
<div class="app-rail-tile-icon {regionIcon}"><slot /></div>
|
|
54
|
+
<!-- Label -->
|
|
55
|
+
{#if label}<div class="app-rail-tile-label {classesLabel}">{label}</div>{/if}
|
|
56
|
+
</svelte:element>
|
|
57
|
+
</div>
|
|
@@ -38,7 +38,7 @@ $: classesPageFooter = `${slotPageFooter}`;
|
|
|
38
38
|
$: classesFooter = `${slotFooter}`;
|
|
39
39
|
</script>
|
|
40
40
|
|
|
41
|
-
<
|
|
41
|
+
<div id="appShell" class={classesBase} data-testid="app-shell">
|
|
42
42
|
<!-- Slot: Header -->
|
|
43
43
|
{#if $$slots.header}
|
|
44
44
|
<header id="shell-header" class="flex-none {classesheader}"><slot name="header" /></header>
|
|
@@ -59,7 +59,7 @@ $: classesFooter = `${slotFooter}`;
|
|
|
59
59
|
{/if}
|
|
60
60
|
|
|
61
61
|
<!-- Slot: Page Content (default) -->
|
|
62
|
-
<
|
|
62
|
+
<main id="page-content" class="flex-auto {classesPageContent}"><slot /></main>
|
|
63
63
|
|
|
64
64
|
<!-- Slot: Page Footer -->
|
|
65
65
|
{#if $$slots.pageFooter}
|
|
@@ -77,4 +77,4 @@ $: classesFooter = `${slotFooter}`;
|
|
|
77
77
|
{#if $$slots.footer}
|
|
78
78
|
<footer id="shell-footer" class="flex-none {classesFooter}"><slot name="footer" /></footer>
|
|
79
79
|
{/if}
|
|
80
|
-
</
|
|
80
|
+
</div>
|
|
@@ -16,7 +16,9 @@ const cSeperator = 'font-bold flex fill-surface-500 text-surface-500 w-2';
|
|
|
16
16
|
$: classesBase = `${cBase} ${color} ${$$props.class ?? ''}`;
|
|
17
17
|
</script>
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
<!-- NOTE: avoid forwarding events on <svelte:element> tags -->
|
|
20
|
+
<!-- https://github.com/skeletonlabs/skeleton/issues/727#issuecomment-1356859261 -->
|
|
21
|
+
<li class="crumb {classesBase}" data-testid="crumb" on:click on:keydown on:keyup on:keypress>
|
|
20
22
|
<!-- Anchor -->
|
|
21
23
|
<svelte:element
|
|
22
24
|
this={tag}
|
|
@@ -69,7 +69,7 @@ $: classesCone = `${cCone} ${width}`;
|
|
|
69
69
|
{#if legend && generatedLegendList}
|
|
70
70
|
<ul class="conic-list list {cLabel}">
|
|
71
71
|
{#each generatedLegendList as { color, label, value }}
|
|
72
|
-
<li class="conic-item {hover}">
|
|
72
|
+
<li class="conic-item {hover}" on:click on:keydown on:keyup on:keypress>
|
|
73
73
|
<span class="conic-swatch {cSwatch}" style:background={color} />
|
|
74
74
|
<span class="conic-label flex-auto">{label}</span>
|
|
75
75
|
<strong class="conic-value">{value}%</strong>
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export let files;
|
|
6
6
|
/** Provide a button variant or other class styles. */
|
|
7
|
-
export let button = 'btn-filled-
|
|
7
|
+
export let button = 'btn-filled-secondary';
|
|
8
8
|
let elemFileInput;
|
|
9
9
|
function onButtonClick() {
|
|
10
10
|
elemFileInput.click();
|
|
@@ -19,7 +19,7 @@ function prunedRestProps() {
|
|
|
19
19
|
<!-- Input: File -->
|
|
20
20
|
<input bind:this={elemFileInput} bind:files type="file" {...prunedRestProps()} class="file-button-input hidden" on:change />
|
|
21
21
|
<!-- Button -->
|
|
22
|
-
<button class="file-button-btn btn {button}" on:click={onButtonClick}>
|
|
22
|
+
<button class="file-button-btn btn {button}" type="button" on:click={onButtonClick} on:keydown on:keyup on:keypress>
|
|
23
23
|
<slot />
|
|
24
24
|
</button>
|
|
25
25
|
</div>
|
|
@@ -5,7 +5,7 @@ export let direction = 'bg-gradient-to-r';
|
|
|
5
5
|
/** Provide classes to set "from" gradient color. */
|
|
6
6
|
export let from = 'from-primary-500';
|
|
7
7
|
/** Provide classes to set "to" gradient color. */
|
|
8
|
-
export let to = 'to-
|
|
8
|
+
export let to = 'to-secondary-500';
|
|
9
9
|
// Base Clases
|
|
10
10
|
let cBaseHeading = 'bg-clip-text text-transparent box-decoration-clone';
|
|
11
11
|
// Reactive
|
|
@@ -16,7 +16,7 @@ export let padding = getContext('padding');
|
|
|
16
16
|
export let rounded = getContext('rounded');
|
|
17
17
|
export let hover = getContext('hover');
|
|
18
18
|
// Base Classes
|
|
19
|
-
const cBase = 'flex items-center space-x-4 whitespace-nowrap cursor-pointer';
|
|
19
|
+
const cBase = 'flex items-center space-x-4 whitespace-nowrap cursor-pointer -outline-offset-[3px]';
|
|
20
20
|
// Local
|
|
21
21
|
let elemItem;
|
|
22
22
|
// Input Handler
|
|
@@ -73,6 +73,8 @@ $: classesBase = `${cBase} ${padding} ${rounded} ${classesHighlight} ${$$props.c
|
|
|
73
73
|
{id}
|
|
74
74
|
on:click={onClickHandler}
|
|
75
75
|
on:keydown={onKeyDown}
|
|
76
|
+
on:keyup
|
|
77
|
+
on:keypress
|
|
76
78
|
role="option"
|
|
77
79
|
aria-selected={isSelected}
|
|
78
80
|
tabindex="0"
|
|
@@ -13,9 +13,17 @@ export let justify = 'justify-between';
|
|
|
13
13
|
export let text = 'text-xs';
|
|
14
14
|
/** Provide arbitrary classes to style the select input. */
|
|
15
15
|
export let select = undefined;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
/** Sets selection and buttons to disabled state on-demand. */
|
|
17
|
+
export let disabled = false;
|
|
18
|
+
// Props (Select & Buttons)
|
|
19
|
+
/** Set the text for the amount selection input. */
|
|
20
|
+
export let amountText = 'Items';
|
|
21
|
+
/** Provide abtitrary classes to the next/previous buttons. */
|
|
22
|
+
export let buttonClasses = 'btn-icon btn-filled';
|
|
23
|
+
/** Set the text label for the Previous button. */
|
|
24
|
+
export let buttonTextPrevious = '←';
|
|
25
|
+
/** Set the text label for the Next button. */
|
|
26
|
+
export let buttonTextNext = '→';
|
|
19
27
|
// Base Classes
|
|
20
28
|
const cBase = 'flex flex-col md:flex-row items-center space-y-4 md:space-y-0 md:space-x-4';
|
|
21
29
|
const cLabel = 'w-full md:w-auto';
|
|
@@ -24,7 +32,7 @@ const cPageText = 'whitespace-nowrap';
|
|
|
24
32
|
function onChangeLength() {
|
|
25
33
|
settings.offset = 0;
|
|
26
34
|
/** @event {{ length: number }} amount - Fires when the amount selection input changes. */
|
|
27
|
-
dispatch('amount',
|
|
35
|
+
dispatch('amount', settings.limit);
|
|
28
36
|
}
|
|
29
37
|
function onPrev() {
|
|
30
38
|
settings.offset--;
|
|
@@ -46,17 +54,21 @@ $: classesPageText = `${cPageText} ${text}`;
|
|
|
46
54
|
<div class="paginator {classesBase}" data-testid="paginator">
|
|
47
55
|
<!-- Select Amount -->
|
|
48
56
|
<label class="paginator-label {classesLabel}">
|
|
49
|
-
<select bind:value={settings.limit} on:change={() => { onChangeLength() }} class="paginator-select {classesSelect}" aria-label="Select Amount">
|
|
50
|
-
{#each settings.amounts as amount}<option value={amount}>
|
|
57
|
+
<select bind:value={settings.limit} on:change={() => { onChangeLength() }} class="paginator-select {classesSelect}" {disabled} aria-label="Select Amount">
|
|
58
|
+
{#each settings.amounts as amount}<option value={amount}>{amount} {amountText}</option>{/each}
|
|
51
59
|
</select>
|
|
52
60
|
</label>
|
|
53
61
|
<!-- Details -->
|
|
54
62
|
<span class="paginator-details {classesPageText}">
|
|
55
|
-
{settings.offset * settings.limit + 1}
|
|
63
|
+
{settings.offset * settings.limit + 1} - {Math.min(settings.offset * settings.limit + settings.limit, settings.size)} <span class="opacity-50 px-2">/</span> <strong>{settings.size}</strong>
|
|
56
64
|
</span>
|
|
57
65
|
<!-- Arrows -->
|
|
58
66
|
<div class="paginator-arrows space-x-2">
|
|
59
|
-
<button class="
|
|
60
|
-
|
|
67
|
+
<button class="{buttonClasses}" on:click={() => { onPrev() }} disabled={disabled || settings.offset === 0}>
|
|
68
|
+
{@html buttonTextPrevious}
|
|
69
|
+
</button>
|
|
70
|
+
<button class="{buttonClasses}" on:click={() => { onNext() }} disabled={disabled || (settings.offset + 1) * settings.limit >= settings.size}>
|
|
71
|
+
{@html buttonTextNext}
|
|
72
|
+
</button>
|
|
61
73
|
</div>
|
|
62
74
|
</div>
|
|
@@ -7,7 +7,11 @@ declare const __propDef: {
|
|
|
7
7
|
justify?: string | undefined;
|
|
8
8
|
text?: string | undefined;
|
|
9
9
|
select?: string | undefined;
|
|
10
|
-
|
|
10
|
+
disabled?: boolean | undefined;
|
|
11
|
+
amountText?: string | undefined;
|
|
12
|
+
buttonClasses?: string | undefined;
|
|
13
|
+
buttonTextPrevious?: string | undefined;
|
|
14
|
+
buttonTextNext?: string | undefined;
|
|
11
15
|
};
|
|
12
16
|
events: {
|
|
13
17
|
amount: CustomEvent<any>;
|
|
@@ -6,6 +6,8 @@ export let label = '';
|
|
|
6
6
|
* @type {number}
|
|
7
7
|
*/
|
|
8
8
|
export let value = undefined;
|
|
9
|
+
/** Minimum amount the bar represents. */
|
|
10
|
+
export let min = 0;
|
|
9
11
|
/** Maximum amount the bar represents. */
|
|
10
12
|
export let max = 100;
|
|
11
13
|
/** Provide classes to set track height. */
|
|
@@ -14,7 +16,7 @@ export let height = 'h-2';
|
|
|
14
16
|
export let rounded = 'rounded-token';
|
|
15
17
|
// Props (elements)
|
|
16
18
|
/** Provide arbitrary classes to style the meter element. */
|
|
17
|
-
export let meter = 'bg-
|
|
19
|
+
export let meter = 'bg-secondary-500';
|
|
18
20
|
/** Provide arbitrary classes to style the track element. */
|
|
19
21
|
export let track = 'bg-surface-200-700-token';
|
|
20
22
|
// Base Classes
|
|
@@ -24,7 +26,7 @@ const cBaseTrack = `w-full overflow-hidden`;
|
|
|
24
26
|
const cBaseMeterDeterminate = 'h-full';
|
|
25
27
|
const cBaseMeterIndeterminate = 'h-full w-full';
|
|
26
28
|
// Fill Percent
|
|
27
|
-
$: fillPercent = value ? (100 * value) / max : 0;
|
|
29
|
+
$: fillPercent = value ? (100 * (value - min)) / (max - min) : 0;
|
|
28
30
|
// Reactive Classes
|
|
29
31
|
$: classesTrack = `${cBaseTrack} ${height} ${rounded} ${track} ${$$props.class ?? ''}`;
|
|
30
32
|
$: classesMeter = `${rounded} ${meter}`;
|
|
@@ -36,8 +38,8 @@ $: classesMeter = `${rounded} ${meter}`;
|
|
|
36
38
|
role="progressbar"
|
|
37
39
|
aria-label={label}
|
|
38
40
|
aria-valuenow={value}
|
|
39
|
-
aria-valuemin={
|
|
40
|
-
aria-valuemax={max}
|
|
41
|
+
aria-valuemin={min}
|
|
42
|
+
aria-valuemax={max - min}
|
|
41
43
|
>
|
|
42
44
|
<!-- Label -->
|
|
43
45
|
{#if label}<label for="progress" class="progress-bar-label {cBaseLabel}">{label}</label>{/if}
|
|
@@ -9,7 +9,7 @@ export let value = undefined; // %
|
|
|
9
9
|
/** Sets the base stroke width. Scales responsively. */
|
|
10
10
|
export let stroke = 20; // px
|
|
11
11
|
/** Provide classes to set meter color. */
|
|
12
|
-
export let meter = 'stroke-
|
|
12
|
+
export let meter = 'stroke-secondary-500';
|
|
13
13
|
/** Provide classes to set track color. */
|
|
14
14
|
export let track = 'stroke-surface-200 dark:stroke-surface-700';
|
|
15
15
|
/** Provide classes to set the SVG text fill color. */
|
|
@@ -17,9 +17,9 @@ export let borderColor = 'border-surface-300 dark:border-surface-600';
|
|
|
17
17
|
/** Provide classes to set the RadioItem padding. */
|
|
18
18
|
export let padding = 'px-4 py-2';
|
|
19
19
|
/** Provide classes to set the hover style. */
|
|
20
|
-
export let hover = 'bg-
|
|
20
|
+
export let hover = 'bg-secondary-hover-token';
|
|
21
21
|
/** Provide classes to set the highlighted accent color. */
|
|
22
|
-
export let accent = 'bg-
|
|
22
|
+
export let accent = 'bg-secondary-active-token !text-on-secondary-token';
|
|
23
23
|
/** Provide classes to set the highlighted text color. */
|
|
24
24
|
export let color = 'text-surface-50';
|
|
25
25
|
/** Provide classes to set the highlighted SVG fill color. */
|