@skeletonlabs/skeleton 0.124.2 → 0.132.4
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/components/Accordion/Accordion.svelte +4 -0
- package/components/Accordion/Accordion.svelte.d.ts +4 -0
- package/components/Accordion/AccordionItem.svelte +14 -5
- package/components/Accordion/AccordionItem.svelte.d.ts +4 -1
- package/components/ConicGradient/settings.d.ts +0 -2
- package/components/ConicGradient/settings.js +0 -1
- package/components/FileButton/FileButton.svelte +1 -1
- package/components/FileDropzone/FileDropzone.svelte +1 -1
- package/components/InputChip/InputChip.svelte +3 -3
- package/components/ListBox/ListBoxItem.svelte +3 -3
- package/components/ListBox/ListBoxItem.svelte.d.ts +2 -1
- package/components/Paginator/Paginator.svelte +3 -3
- package/components/Radio/RadioItem.svelte +2 -2
- package/components/Radio/RadioItem.svelte.d.ts +2 -1
- package/components/RangeSlider/RangeSlider.svelte.d.ts +4 -4
- package/components/Stepper/Step.svelte +3 -3
- package/components/Tab/Tab.svelte +2 -2
- package/components/Tab/Tab.svelte.d.ts +2 -1
- package/index.d.ts +3 -3
- package/index.js +9 -3
- package/package.json +10 -11
- package/styles/elements/forms.css +5 -9
- package/styles/elements/modals.css +15 -0
- package/styles/elements/popups.css +16 -0
- package/styles/elements.css +2 -2
- package/styles/typography.css +3 -3
- package/tailwind/core.cjs +1 -1
- package/tailwind/generated/intellisense-classes.cjs +1 -1
- package/tailwind/generated/intellisense-classes.d.cts +65 -208
- package/tailwind/intellisense.cjs +2 -2
- package/tailwind/skeleton.cjs +1 -1
- package/types/index.d.ts +1 -0
- package/types/index.js +1 -0
- package/types/tailwind.d.ts +4 -0
- package/types/tailwind.js +2 -0
- package/utilities/CodeBlock/CodeBlock.svelte +12 -8
- package/utilities/CodeBlock/CodeBlock.svelte.d.ts +9 -1
- package/utilities/Drawer/Drawer.svelte +50 -37
- package/utilities/Drawer/Drawer.svelte.d.ts +8 -2
- package/utilities/Drawer/types.d.ts +8 -2
- package/utilities/LightSwitch/LightSwitch.svelte +43 -53
- package/utilities/LightSwitch/LightSwitch.svelte.d.ts +18 -4
- package/utilities/LightSwitch/lightswitch.d.ts +20 -0
- package/utilities/LightSwitch/lightswitch.js +71 -0
- package/utilities/LocalStorageStore/LocalStorageStore.js +1 -1
- package/utilities/Modal/Modal.svelte +96 -64
- package/utilities/Modal/Modal.svelte.d.ts +11 -0
- package/utilities/Modal/types.d.ts +9 -5
- package/utilities/Popup/popup.d.ts +7 -0
- package/utilities/Popup/popup.js +218 -0
- package/utilities/Popup/types.d.ts +32 -0
- package/utilities/Popup/types.js +3 -0
- package/utilities/Toast/Toast.svelte +17 -13
- package/utilities/Toast/Toast.svelte.d.ts +5 -3
- package/utilities/Toast/stores.js +9 -26
- package/utilities/Toast/types.d.ts +6 -1
- package/styles/elements/menus.css +0 -29
- package/styles/elements/tooltips.css +0 -83
- package/utilities/LightSwitch/stores.d.ts +0 -2
- package/utilities/LightSwitch/stores.js +0 -5
- package/utilities/Menu/menu.d.ts +0 -18
- package/utilities/Menu/menu.js +0 -151
- package/utilities/Modal/examples/ModalExampleEmbed.svelte +0 -17
- package/utilities/Modal/examples/ModalExampleEmbed.svelte.d.ts +0 -17
- package/utilities/Modal/examples/ModalExampleForm.svelte +0 -41
- package/utilities/Modal/examples/ModalExampleForm.svelte.d.ts +0 -17
- package/utilities/Modal/examples/ModalExampleImage.svelte +0 -19
- package/utilities/Modal/examples/ModalExampleImage.svelte.d.ts +0 -16
- package/utilities/Modal/examples/ModalExampleList.svelte +0 -26
- package/utilities/Modal/examples/ModalExampleList.svelte.d.ts +0 -17
- package/utilities/Tooltip/tooltip.d.ts +0 -35
- package/utilities/Tooltip/tooltip.js +0 -94
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@ A fully featured Svelte UI toolkit for Svelte + Tailwind. Skeleton allows you to
|
|
|
11
11
|
## 🔗 Useful Links
|
|
12
12
|
|
|
13
13
|
- [Documentation](https://skeleton.dev/)
|
|
14
|
-
- [Contribution Guide](https://skeleton.dev/docs/
|
|
14
|
+
- [Contribution Guide](https://skeleton.dev/docs/contributing)
|
|
15
15
|
- [Project Roadmap](https://github.com/skeletonlabs/skeleton/wiki/%F0%9F%9B%A3%EF%B8%8F-The-Skeleton-Roadmap)
|
|
16
16
|
|
|
17
17
|
## 👋 Community
|
|
@@ -6,6 +6,8 @@ export let spacing = "space-y-1";
|
|
|
6
6
|
export let padding = "py-2 px-4";
|
|
7
7
|
export let hover = "hover:bg-primary-hover-token";
|
|
8
8
|
export let rounded = "rounded-container-token";
|
|
9
|
+
export let caretOpen = "rotate-180";
|
|
10
|
+
export let caretClosed = "";
|
|
9
11
|
export let regionControl = "";
|
|
10
12
|
export let regionPanel = "space-y-4";
|
|
11
13
|
export let regionCaret = "";
|
|
@@ -16,6 +18,8 @@ setContext("duration", duration);
|
|
|
16
18
|
setContext("padding", padding);
|
|
17
19
|
setContext("hover", hover);
|
|
18
20
|
setContext("rounded", rounded);
|
|
21
|
+
setContext("caretOpen", caretOpen);
|
|
22
|
+
setContext("caretClosed", caretClosed);
|
|
19
23
|
setContext("regionControl", regionControl);
|
|
20
24
|
setContext("regionPanel", regionPanel);
|
|
21
25
|
setContext("regionCaret", regionCaret);
|
|
@@ -14,6 +14,10 @@ declare const __propDef: {
|
|
|
14
14
|
hover?: string | undefined;
|
|
15
15
|
/** Provide classes to set the accordion item rounded styles.*/
|
|
16
16
|
rounded?: string | undefined;
|
|
17
|
+
/** Set the rotation of the item caret in the open state.*/
|
|
18
|
+
caretOpen?: string | undefined;
|
|
19
|
+
/** Set the rotation of the item caret in the closed state.*/
|
|
20
|
+
caretClosed?: string | undefined;
|
|
17
21
|
/** Provide arbitrary classes to the trigger button region.*/
|
|
18
22
|
regionControl?: string | undefined;
|
|
19
23
|
/** Provide arbitrary classes to content panel region.*/
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
<script>import { getContext } from "svelte";
|
|
2
|
+
import { createEventDispatcher } from "svelte/internal";
|
|
2
3
|
import { slide } from "svelte/transition";
|
|
4
|
+
const dispatch = createEventDispatcher();
|
|
3
5
|
export let open = false;
|
|
4
6
|
export let id = String(Math.random());
|
|
5
7
|
const cBase = "";
|
|
@@ -12,15 +14,22 @@ export let duration = getContext("duration");
|
|
|
12
14
|
export let padding = getContext("padding");
|
|
13
15
|
export let hover = getContext("hover");
|
|
14
16
|
export let rounded = getContext("rounded");
|
|
17
|
+
export let caretOpen = getContext("caretOpen");
|
|
18
|
+
export let caretClosed = getContext("caretClosed");
|
|
15
19
|
export let regionControl = getContext("regionControl");
|
|
16
20
|
export let regionPanel = getContext("regionPanel");
|
|
17
21
|
export let regionCaret = getContext("regionCaret");
|
|
18
|
-
function setActive() {
|
|
22
|
+
function setActive(event) {
|
|
19
23
|
if (autocollapse === true) {
|
|
20
24
|
active.set(id);
|
|
21
|
-
|
|
25
|
+
} else {
|
|
26
|
+
open = !open;
|
|
22
27
|
}
|
|
23
|
-
|
|
28
|
+
onToggle(event);
|
|
29
|
+
}
|
|
30
|
+
function onToggle(event) {
|
|
31
|
+
const currentOpenState = autocollapse ? $active === id : open;
|
|
32
|
+
dispatch("toggle", { event, id: `accordion-control-${id}`, open: currentOpenState, autocollapse });
|
|
24
33
|
}
|
|
25
34
|
if (autocollapse && open)
|
|
26
35
|
setActive();
|
|
@@ -34,7 +43,7 @@ $:
|
|
|
34
43
|
$:
|
|
35
44
|
classesControl = `${cControl} ${padding} ${hover} ${rounded} ${regionControl}`;
|
|
36
45
|
$:
|
|
37
|
-
classesCaretState = openState ?
|
|
46
|
+
classesCaretState = openState ? caretOpen : caretClosed;
|
|
38
47
|
$:
|
|
39
48
|
classesControlCaret = `${cControlCaret} ${regionCaret} ${classesCaretState}`;
|
|
40
49
|
$:
|
|
@@ -46,6 +55,7 @@ $:
|
|
|
46
55
|
<div class="accordion-item {classesBase}" data-testid="accordion-item">
|
|
47
56
|
<!-- Control -->
|
|
48
57
|
<button
|
|
58
|
+
type="button"
|
|
49
59
|
class="accordion-control {classesControl}"
|
|
50
60
|
id="accordion-control-{id}"
|
|
51
61
|
on:click={setActive}
|
|
@@ -53,7 +63,6 @@ $:
|
|
|
53
63
|
on:keydown
|
|
54
64
|
on:keyup
|
|
55
65
|
on:keypress
|
|
56
|
-
on:toggle
|
|
57
66
|
aria-expanded={openState}
|
|
58
67
|
aria-controls="accordion-panel-{id}"
|
|
59
68
|
>
|
|
@@ -20,6 +20,10 @@ declare const __propDef: {
|
|
|
20
20
|
/** Provide classes to set the accordion item rounded styles.*/
|
|
21
21
|
rounded?: string | undefined;
|
|
22
22
|
/** Provide arbitrary classes to the trigger button region.*/
|
|
23
|
+
caretOpen?: string | undefined;
|
|
24
|
+
/** Provide arbitrary classes to content panel region.*/
|
|
25
|
+
caretClosed?: string | undefined;
|
|
26
|
+
/** Provide arbitrary classes to the trigger button region.*/
|
|
23
27
|
regionControl?: string | undefined;
|
|
24
28
|
/** Provide arbitrary classes to content panel region.*/
|
|
25
29
|
regionPanel?: string | undefined;
|
|
@@ -31,7 +35,6 @@ declare const __propDef: {
|
|
|
31
35
|
keydown: KeyboardEvent;
|
|
32
36
|
keyup: KeyboardEvent;
|
|
33
37
|
keypress: KeyboardEvent;
|
|
34
|
-
toggle: Event;
|
|
35
38
|
} & {
|
|
36
39
|
[evt: string]: CustomEvent<any>;
|
|
37
40
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// Provides the full set of Tailwind colors via Javascript
|
|
2
2
|
// https://tailwindcss.com/docs/customizing-colors#default-color-palette
|
|
3
|
-
export const tailwindNumbers = ['50', '100', '200', '300', '400', '500', '600', '700', '800', '900'];
|
|
4
3
|
export const tailwindDefaultColors = [
|
|
5
4
|
{
|
|
6
5
|
label: 'slate',
|
|
@@ -13,7 +13,7 @@ function prunedRestProps() {
|
|
|
13
13
|
<div class="file-button {$$props.class ?? ''}" data-testid="file-button">
|
|
14
14
|
<!-- NOTE: Don't use `hidden` as it prevents `required` from operating -->
|
|
15
15
|
<div class="h-0 overflow-hidden">
|
|
16
|
-
<input type="file" bind:this={elemFileInput}
|
|
16
|
+
<input type="file" bind:this={elemFileInput} {name} {...prunedRestProps()} on:change />
|
|
17
17
|
</div>
|
|
18
18
|
<!-- Button -->
|
|
19
19
|
<button
|
|
@@ -7,7 +7,7 @@ export let regionInterfaceText = "";
|
|
|
7
7
|
export let slotLead = "mb-4";
|
|
8
8
|
export let slotMessage = "";
|
|
9
9
|
export let slotMeta = "opacity-75";
|
|
10
|
-
const cBase = "textarea relative";
|
|
10
|
+
const cBase = "textarea relative flex justify-center items-center";
|
|
11
11
|
const cInput = "absolute top-0 left-0 right-0 bottom-0 z-[1] opacity-0 disabled:!opacity-0 cursor-pointer";
|
|
12
12
|
const cInterface = "flex justify-center items-center text-center";
|
|
13
13
|
$:
|
|
@@ -75,7 +75,7 @@ $:
|
|
|
75
75
|
<div class="input-chip {classesBase}" class:opacity-50={$$restProps.disabled}>
|
|
76
76
|
<!-- NOTE: Don't use `hidden` as it prevents `required` from operating -->
|
|
77
77
|
<div class="h-0 overflow-hidden">
|
|
78
|
-
<select bind:value {name} multiple {required}>
|
|
78
|
+
<select bind:value {name} multiple {required} tabindex="-1">
|
|
79
79
|
<!-- NOTE: options are required! -->
|
|
80
80
|
{#each value as option}<option value={option}>{option}</option>{/each}
|
|
81
81
|
</select>
|
|
@@ -100,7 +100,7 @@ $:
|
|
|
100
100
|
{#each value as c, i (c)}
|
|
101
101
|
<!-- Wrapping div required for FLIP animation -->
|
|
102
102
|
<div animate:flip={{ duration }}>
|
|
103
|
-
<
|
|
103
|
+
<button
|
|
104
104
|
class="chip {chips}"
|
|
105
105
|
on:click={(e) => {
|
|
106
106
|
removeChip(e, i, c);
|
|
@@ -113,7 +113,7 @@ $:
|
|
|
113
113
|
>
|
|
114
114
|
<span>{c}</span>
|
|
115
115
|
<span>✕</span>
|
|
116
|
-
</
|
|
116
|
+
</button>
|
|
117
117
|
</div>
|
|
118
118
|
{/each}
|
|
119
119
|
</div>
|
|
@@ -50,13 +50,13 @@ $:
|
|
|
50
50
|
classesLabel = `${cLabel}`;
|
|
51
51
|
</script>
|
|
52
52
|
|
|
53
|
+
<!-- WARNING: avoid click handlers on <label>; will fire twice -->
|
|
53
54
|
<label
|
|
54
55
|
class="listbox-item {classesBase}"
|
|
55
56
|
role="option"
|
|
56
57
|
aria-selected={selected}
|
|
57
58
|
tabindex="0"
|
|
58
59
|
data-testid="listbox-item"
|
|
59
|
-
on:click
|
|
60
60
|
on:keydown={onKeyDown}
|
|
61
61
|
on:keydown
|
|
62
62
|
on:keyup
|
|
@@ -65,9 +65,9 @@ $:
|
|
|
65
65
|
<!-- NOTE: Don't use `hidden` as it prevents `required` from operating -->
|
|
66
66
|
<div class="h-0 w-0 overflow-hidden">
|
|
67
67
|
{#if multiple}
|
|
68
|
-
<input bind:this={elemInput} type="checkbox" {name} {value} bind:checked tabindex="-1" />
|
|
68
|
+
<input bind:this={elemInput} type="checkbox" {name} {value} bind:checked tabindex="-1" on:click on:change />
|
|
69
69
|
{:else}
|
|
70
|
-
<input bind:this={elemInput} type="radio" bind:group {name} {value} tabindex="-1" />
|
|
70
|
+
<input bind:this={elemInput} type="radio" bind:group {name} {value} tabindex="-1" on:click on:change />
|
|
71
71
|
{/if}
|
|
72
72
|
</div>
|
|
73
73
|
<!-- <slot /> -->
|
|
@@ -15,10 +15,11 @@ declare const __propDef: {
|
|
|
15
15
|
padding?: string | undefined;
|
|
16
16
|
};
|
|
17
17
|
events: {
|
|
18
|
-
click: MouseEvent;
|
|
19
18
|
keydown: KeyboardEvent;
|
|
20
19
|
keyup: KeyboardEvent;
|
|
21
20
|
keypress: KeyboardEvent;
|
|
21
|
+
click: MouseEvent;
|
|
22
|
+
change: Event;
|
|
22
23
|
} & {
|
|
23
24
|
[evt: string]: CustomEvent<any>;
|
|
24
25
|
};
|
|
@@ -6,7 +6,7 @@ export let select = "select min-w-[150px]";
|
|
|
6
6
|
export let justify = "justify-between";
|
|
7
7
|
export let text = "text-xs";
|
|
8
8
|
export let amountText = "Items";
|
|
9
|
-
export let buttonClasses = "variant-filled";
|
|
9
|
+
export let buttonClasses = "btn-icon variant-filled";
|
|
10
10
|
export let buttonTextPrevious = "←";
|
|
11
11
|
export let buttonTextNext = "→";
|
|
12
12
|
const cBase = "flex flex-col md:flex-row items-center space-y-4 md:space-y-0 md:space-x-4";
|
|
@@ -48,10 +48,10 @@ $:
|
|
|
48
48
|
</span>
|
|
49
49
|
<!-- Arrows -->
|
|
50
50
|
<div class="paginator-arrows space-x-2">
|
|
51
|
-
<button class="
|
|
51
|
+
<button type="button" class="{buttonClasses}" on:click={() => { onPrev() }} disabled={disabled || settings.offset === 0}>
|
|
52
52
|
{@html buttonTextPrevious}
|
|
53
53
|
</button>
|
|
54
|
-
<button class="
|
|
54
|
+
<button type="button" class="{buttonClasses}" on:click={() => { onNext() }} disabled={disabled || (settings.offset + 1) * settings.limit >= settings.size}>
|
|
55
55
|
{@html buttonTextNext}
|
|
56
56
|
</button>
|
|
57
57
|
</div>
|
|
@@ -32,6 +32,7 @@ function prunedRestProps() {
|
|
|
32
32
|
}
|
|
33
33
|
</script>
|
|
34
34
|
|
|
35
|
+
<!-- WARNING: avoid click handlers on <label>; will fire twice -->
|
|
35
36
|
<label
|
|
36
37
|
class="radio-item {classesBase}"
|
|
37
38
|
role="radio"
|
|
@@ -39,7 +40,6 @@ function prunedRestProps() {
|
|
|
39
40
|
aria-label={label}
|
|
40
41
|
tabindex="0"
|
|
41
42
|
data-testid="radio-item"
|
|
42
|
-
on:click
|
|
43
43
|
on:keydown={onKeyDown}
|
|
44
44
|
on:keydown
|
|
45
45
|
on:keyup
|
|
@@ -47,7 +47,7 @@ function prunedRestProps() {
|
|
|
47
47
|
>
|
|
48
48
|
<!-- NOTE: Don't use `hidden` as it prevents `required` from operating -->
|
|
49
49
|
<div class="h-0 w-0 overflow-hidden">
|
|
50
|
-
<input bind:this={elemInput} type="radio" bind:group {name} {value} {...prunedRestProps()} tabindex="-1" />
|
|
50
|
+
<input bind:this={elemInput} type="radio" bind:group {name} {value} {...prunedRestProps()} tabindex="-1" on:click on:change />
|
|
51
51
|
</div>
|
|
52
52
|
<slot />
|
|
53
53
|
</label>
|
|
@@ -18,10 +18,11 @@ declare const __propDef: {
|
|
|
18
18
|
fill?: string | undefined;
|
|
19
19
|
};
|
|
20
20
|
events: {
|
|
21
|
-
click: MouseEvent;
|
|
22
21
|
keydown: KeyboardEvent;
|
|
23
22
|
keyup: KeyboardEvent;
|
|
24
23
|
keypress: KeyboardEvent;
|
|
24
|
+
click: MouseEvent;
|
|
25
|
+
change: Event;
|
|
25
26
|
} & {
|
|
26
27
|
[evt: string]: CustomEvent<any>;
|
|
27
28
|
};
|
|
@@ -6,13 +6,13 @@ declare const __propDef: {
|
|
|
6
6
|
name: string;
|
|
7
7
|
/** Provide a unique input id. Auto-generated by default*/
|
|
8
8
|
id?: string | undefined;
|
|
9
|
-
/** Set the input step offset.*/
|
|
10
|
-
value?: number | undefined;
|
|
11
9
|
/** Set the input value.*/
|
|
12
|
-
|
|
10
|
+
value?: number | undefined;
|
|
13
11
|
/** Set the input minimum range.*/
|
|
14
|
-
|
|
12
|
+
min?: number | undefined;
|
|
15
13
|
/** Set the input maximum range.*/
|
|
14
|
+
max?: number | undefined;
|
|
15
|
+
/** Set the input step offset.*/
|
|
16
16
|
step?: number | undefined;
|
|
17
17
|
/** Enables tick marks. See browser support below.*/
|
|
18
18
|
ticked?: boolean | undefined;
|
|
@@ -61,9 +61,9 @@ onDestroy(() => {
|
|
|
61
61
|
<!-- Navigation -->
|
|
62
62
|
{#if $state.total > 1}
|
|
63
63
|
<div class="step-navigation {classesNavigation}" transition:fade|local={{ duration: 100 }}>
|
|
64
|
-
<button class="btn {buttonBack}" on:click={onBack} disabled={$state.current === 0}>{@html buttonBackLabel}</button>
|
|
64
|
+
<button type="button" class="btn {buttonBack}" on:click={onBack} disabled={$state.current === 0}>{@html buttonBackLabel}</button>
|
|
65
65
|
{#if stepIndex < $state.total - 1}
|
|
66
|
-
<button class="btn {buttonNext}" on:click={onNext} disabled={locked}>
|
|
66
|
+
<button type="button" class="btn {buttonNext}" on:click={onNext} disabled={locked}>
|
|
67
67
|
{#if locked}
|
|
68
68
|
<svg class="w-3 aspect-square" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">
|
|
69
69
|
<path
|
|
@@ -74,7 +74,7 @@ onDestroy(() => {
|
|
|
74
74
|
<span>{@html buttonNextLabel}</span>
|
|
75
75
|
</button>
|
|
76
76
|
{:else}
|
|
77
|
-
<button class="btn {buttonComplete}" on:click={onComplete}>{@html buttonCompleteLabel}</button>
|
|
77
|
+
<button type="submit" class="btn {buttonComplete}" on:click={onComplete}>{@html buttonCompleteLabel}</button>
|
|
78
78
|
{/if}
|
|
79
79
|
</div>
|
|
80
80
|
{/if}
|
|
@@ -31,6 +31,7 @@ function prunedRestProps() {
|
|
|
31
31
|
}
|
|
32
32
|
</script>
|
|
33
33
|
|
|
34
|
+
<!-- WARNING: avoid click handlers on <label>; will fire twice -->
|
|
34
35
|
<label
|
|
35
36
|
class="tab {classesBase}"
|
|
36
37
|
role="tab"
|
|
@@ -38,7 +39,6 @@ function prunedRestProps() {
|
|
|
38
39
|
aria-selected={selected}
|
|
39
40
|
tabindex="0"
|
|
40
41
|
data-testid="tab"
|
|
41
|
-
on:click
|
|
42
42
|
on:keypress={onKeypress}
|
|
43
43
|
on:keypress
|
|
44
44
|
on:keydown
|
|
@@ -46,7 +46,7 @@ function prunedRestProps() {
|
|
|
46
46
|
>
|
|
47
47
|
<!-- NOTE: Don't use `hidden` as it prevents `required` from operating -->
|
|
48
48
|
<div class="h-0 w-0 overflow-hidden">
|
|
49
|
-
<input bind:this={elemInput} type="radio" bind:group {name} {value} {...prunedRestProps()} tabindex="-1" />
|
|
49
|
+
<input bind:this={elemInput} type="radio" bind:group {name} {value} {...prunedRestProps()} tabindex="-1" on:click on:change />
|
|
50
50
|
</div>
|
|
51
51
|
<!-- Interface -->
|
|
52
52
|
<div class="tab-interface {classesInterface}">
|
|
@@ -22,10 +22,11 @@ declare const __propDef: {
|
|
|
22
22
|
rounded?: string | undefined;
|
|
23
23
|
};
|
|
24
24
|
events: {
|
|
25
|
-
click: MouseEvent;
|
|
26
25
|
keypress: KeyboardEvent;
|
|
27
26
|
keydown: KeyboardEvent;
|
|
28
27
|
keyup: KeyboardEvent;
|
|
28
|
+
click: MouseEvent;
|
|
29
|
+
change: Event;
|
|
29
30
|
} & {
|
|
30
31
|
[evt: string]: CustomEvent<any>;
|
|
31
32
|
};
|
package/index.d.ts
CHANGED
|
@@ -3,20 +3,20 @@ export type { DrawerSettings } from './utilities/Drawer/types';
|
|
|
3
3
|
export type { ModalSettings, ModalComponent } from './utilities/Modal/types';
|
|
4
4
|
export type { ToastSettings } from './utilities/Toast/types';
|
|
5
5
|
export type { TableSource } from './components/Table/types';
|
|
6
|
+
export type { PopupSettings } from './utilities/Popup/types';
|
|
6
7
|
export type CssClasses = string;
|
|
7
8
|
export { storeHighlightJs } from './utilities/CodeBlock/stores';
|
|
8
9
|
export { drawerStore } from './utilities/Drawer/stores';
|
|
9
10
|
export { modalStore } from './utilities/Modal/stores';
|
|
10
11
|
export { toastStore } from './utilities/Toast/stores';
|
|
11
|
-
export { storePrefersDarkScheme, storeLightSwitch } from './utilities/LightSwitch/stores';
|
|
12
12
|
export { type DataTableModel, type DataTableOptions, createDataTableStore, dataTableHandler, tableInteraction, tableA11y } from './utilities/DataTable/DataTable';
|
|
13
|
+
export { modeOsPrefers, modeUserPrefers, modeCurrent, getModeOsPrefers, getModeUserPrefers, getModeAutoPrefers, setModeUserPrefers, setModeCurrent, setInitialClassState, autoModeWatcher } from './utilities/LightSwitch/lightswitch';
|
|
13
14
|
export { localStorageStore } from './utilities/LocalStorageStore/LocalStorageStore';
|
|
14
15
|
export { tableSourceMapper, tableSourceValues, tableMapperValues } from './components/Table/utils';
|
|
15
16
|
export { clipboard } from './actions/Clipboard/clipboard';
|
|
16
17
|
export { filter } from './actions/Filters/filter';
|
|
17
18
|
export { focusTrap } from './actions/FocusTrap/focusTrap';
|
|
18
|
-
export {
|
|
19
|
-
export { tooltip } from './utilities/Tooltip/tooltip';
|
|
19
|
+
export { popup } from './utilities/Popup/popup';
|
|
20
20
|
export { default as Accordion } from './components/Accordion/Accordion.svelte';
|
|
21
21
|
export { default as AccordionItem } from './components/Accordion/AccordionItem.svelte';
|
|
22
22
|
export { default as AppBar } from './components/AppBar/AppBar.svelte';
|
package/index.js
CHANGED
|
@@ -4,13 +4,20 @@ export { storeHighlightJs } from './utilities/CodeBlock/stores';
|
|
|
4
4
|
export { drawerStore } from './utilities/Drawer/stores';
|
|
5
5
|
export { modalStore } from './utilities/Modal/stores';
|
|
6
6
|
export { toastStore } from './utilities/Toast/stores';
|
|
7
|
-
export { storePrefersDarkScheme, storeLightSwitch } from './utilities/LightSwitch/stores';
|
|
8
7
|
// Utilities ---
|
|
8
|
+
// Data Table
|
|
9
9
|
export {
|
|
10
10
|
// Utilities
|
|
11
11
|
createDataTableStore, dataTableHandler,
|
|
12
12
|
// Svelte Actions
|
|
13
13
|
tableInteraction, tableA11y } from './utilities/DataTable/DataTable';
|
|
14
|
+
// Lightswitch
|
|
15
|
+
export {
|
|
16
|
+
// Stores
|
|
17
|
+
modeOsPrefers, modeUserPrefers, modeCurrent,
|
|
18
|
+
// Methods
|
|
19
|
+
getModeOsPrefers, getModeUserPrefers, getModeAutoPrefers, setModeUserPrefers, setModeCurrent, setInitialClassState, autoModeWatcher } from './utilities/LightSwitch/lightswitch';
|
|
20
|
+
// Local Storage Store
|
|
14
21
|
export { localStorageStore } from './utilities/LocalStorageStore/LocalStorageStore';
|
|
15
22
|
// Component Utilities
|
|
16
23
|
export { tableSourceMapper, tableSourceValues, tableMapperValues } from './components/Table/utils';
|
|
@@ -19,8 +26,7 @@ export { clipboard } from './actions/Clipboard/clipboard';
|
|
|
19
26
|
export { filter } from './actions/Filters/filter';
|
|
20
27
|
export { focusTrap } from './actions/FocusTrap/focusTrap';
|
|
21
28
|
// Utility Actions
|
|
22
|
-
export {
|
|
23
|
-
export { tooltip } from './utilities/Tooltip/tooltip';
|
|
29
|
+
export { popup } from './utilities/Popup/popup';
|
|
24
30
|
// Svelte Components ---
|
|
25
31
|
export { default as Accordion } from './components/Accordion/Accordion.svelte';
|
|
26
32
|
export { default as AccordionItem } from './components/Accordion/AccordionItem.svelte';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skeletonlabs/skeleton",
|
|
3
|
-
"version": "v0.
|
|
3
|
+
"version": "v0.132.4",
|
|
4
4
|
"description": "A SvelteKit component library.",
|
|
5
5
|
"author": "endigo9740 <chris@skeletonlabs.dev>",
|
|
6
6
|
"repository": {
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"homepage": "https://skeleton.dev/",
|
|
15
15
|
"devDependencies": {
|
|
16
|
+
"@floating-ui/dom": "^1.2.1",
|
|
16
17
|
"@sveltejs/adapter-auto": "^1.0.2",
|
|
17
18
|
"@sveltejs/kit": "^1.1.3",
|
|
18
19
|
"@sveltejs/package": "1.0.2",
|
|
@@ -110,10 +111,10 @@
|
|
|
110
111
|
"./styles/elements/forms.css": "./styles/elements/forms.css",
|
|
111
112
|
"./styles/elements/lists.css": "./styles/elements/lists.css",
|
|
112
113
|
"./styles/elements/logo-clouds.css": "./styles/elements/logo-clouds.css",
|
|
113
|
-
"./styles/elements/
|
|
114
|
+
"./styles/elements/modals.css": "./styles/elements/modals.css",
|
|
114
115
|
"./styles/elements/placeholders.css": "./styles/elements/placeholders.css",
|
|
116
|
+
"./styles/elements/popups.css": "./styles/elements/popups.css",
|
|
115
117
|
"./styles/elements/tables.css": "./styles/elements/tables.css",
|
|
116
|
-
"./styles/elements/tooltips.css": "./styles/elements/tooltips.css",
|
|
117
118
|
"./styles/elements.css": "./styles/elements.css",
|
|
118
119
|
"./styles/highlight-js.css": "./styles/highlight-js.css",
|
|
119
120
|
"./styles/tailwind.css": "./styles/tailwind.css",
|
|
@@ -142,6 +143,8 @@
|
|
|
142
143
|
"./themes/theme-seasonal.css": "./themes/theme-seasonal.css",
|
|
143
144
|
"./themes/theme-skeleton.css": "./themes/theme-skeleton.css",
|
|
144
145
|
"./themes/theme-vintage.css": "./themes/theme-vintage.css",
|
|
146
|
+
"./types": "./types/index.js",
|
|
147
|
+
"./types/tailwind": "./types/tailwind.js",
|
|
145
148
|
"./utilities/CodeBlock/CodeBlock.svelte": "./utilities/CodeBlock/CodeBlock.svelte",
|
|
146
149
|
"./utilities/CodeBlock/stores": "./utilities/CodeBlock/stores.js",
|
|
147
150
|
"./utilities/DataTable/DataTable": "./utilities/DataTable/DataTable.js",
|
|
@@ -151,20 +154,16 @@
|
|
|
151
154
|
"./utilities/Drawer/stores": "./utilities/Drawer/stores.js",
|
|
152
155
|
"./utilities/Drawer/types": "./utilities/Drawer/types.js",
|
|
153
156
|
"./utilities/LightSwitch/LightSwitch.svelte": "./utilities/LightSwitch/LightSwitch.svelte",
|
|
154
|
-
"./utilities/LightSwitch/
|
|
157
|
+
"./utilities/LightSwitch/lightswitch": "./utilities/LightSwitch/lightswitch.js",
|
|
155
158
|
"./utilities/LocalStorageStore/LocalStorageStore": "./utilities/LocalStorageStore/LocalStorageStore.js",
|
|
156
|
-
"./utilities/Menu/menu": "./utilities/Menu/menu.js",
|
|
157
159
|
"./utilities/Modal/Modal.svelte": "./utilities/Modal/Modal.svelte",
|
|
158
|
-
"./utilities/Modal/examples/ModalExampleEmbed.svelte": "./utilities/Modal/examples/ModalExampleEmbed.svelte",
|
|
159
|
-
"./utilities/Modal/examples/ModalExampleForm.svelte": "./utilities/Modal/examples/ModalExampleForm.svelte",
|
|
160
|
-
"./utilities/Modal/examples/ModalExampleImage.svelte": "./utilities/Modal/examples/ModalExampleImage.svelte",
|
|
161
|
-
"./utilities/Modal/examples/ModalExampleList.svelte": "./utilities/Modal/examples/ModalExampleList.svelte",
|
|
162
160
|
"./utilities/Modal/stores": "./utilities/Modal/stores.js",
|
|
163
161
|
"./utilities/Modal/types": "./utilities/Modal/types.js",
|
|
162
|
+
"./utilities/Popup/popup": "./utilities/Popup/popup.js",
|
|
163
|
+
"./utilities/Popup/types": "./utilities/Popup/types.js",
|
|
164
164
|
"./utilities/Toast/Toast.svelte": "./utilities/Toast/Toast.svelte",
|
|
165
165
|
"./utilities/Toast/stores": "./utilities/Toast/stores.js",
|
|
166
|
-
"./utilities/Toast/types": "./utilities/Toast/types.js"
|
|
167
|
-
"./utilities/Tooltip/tooltip": "./utilities/Tooltip/tooltip.js"
|
|
166
|
+
"./utilities/Toast/types": "./utilities/Toast/types.js"
|
|
168
167
|
},
|
|
169
168
|
"svelte": "./index.js"
|
|
170
169
|
}
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
/* Ring */
|
|
75
75
|
@apply !ring-0;
|
|
76
76
|
/* Border */
|
|
77
|
-
@apply border-token border-surface-400-500-token focus:border-primary-500;
|
|
77
|
+
@apply border-token border-surface-400-500-token focus-within:border-primary-500;
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
/* Base Inputs */
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
|
|
92
92
|
/* Select (size/multiple) */
|
|
93
93
|
.select {
|
|
94
|
-
@apply p-2 space-y-1;
|
|
94
|
+
@apply p-2 pr-8 space-y-1;
|
|
95
95
|
}
|
|
96
96
|
.select[size] {
|
|
97
97
|
@apply bg-none;
|
|
@@ -109,16 +109,12 @@
|
|
|
109
109
|
@apply !mb-3;
|
|
110
110
|
}
|
|
111
111
|
.select option {
|
|
112
|
-
@apply px-4 py-2 rounded-token;
|
|
112
|
+
@apply px-4 py-2 rounded-token cursor-pointer;
|
|
113
113
|
}
|
|
114
114
|
.select option:checked {
|
|
115
115
|
/* https://stackoverflow.com/questions/50618602/change-color-of-selected-option-in-select-multiple */
|
|
116
|
-
background: rgb(var(--color-
|
|
117
|
-
@apply text-
|
|
118
|
-
}
|
|
119
|
-
.dark .select option:checked {
|
|
120
|
-
/* https://stackoverflow.com/questions/50618602/change-color-of-selected-option-in-select-multiple */
|
|
121
|
-
background: rgb(var(--color-surface-50)) linear-gradient(0deg, rgb(var(--color-surface-50)) 0%, rgb(var(--color-surface-50)) 100%);
|
|
116
|
+
background: rgb(var(--color-primary-500)) linear-gradient(0deg, rgb(var(--color-primary-500)) 0%, rgb(var(--color-primary-500)) 100%);
|
|
117
|
+
@apply text-on-primary-token;
|
|
122
118
|
}
|
|
123
119
|
|
|
124
120
|
/* Checkbox & Radio */
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/* Tailwind Elements: popups.css */
|
|
2
|
+
|
|
3
|
+
/* === Popup === */
|
|
4
|
+
|
|
5
|
+
[data-popup] {
|
|
6
|
+
/* https://floating-ui.com/docs/computeposition#usage */
|
|
7
|
+
@apply absolute top-0 left-0; /* max-w-max */
|
|
8
|
+
/* Set hidden on page load */
|
|
9
|
+
@apply hidden;
|
|
10
|
+
/* Transitions */
|
|
11
|
+
@apply transition-opacity duration-200;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
[data-popup] .arrow {
|
|
15
|
+
@apply absolute rotate-45 w-2 h-2;
|
|
16
|
+
}
|
package/styles/elements.css
CHANGED
package/styles/typography.css
CHANGED
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
/* For use outside of Skeleton's CodeBlock component */
|
|
54
54
|
|
|
55
55
|
pre:not(.unstyled):not(.code-block pre):is(:not(.prose *)) {
|
|
56
|
-
@apply font-mono text-base bg-
|
|
56
|
+
@apply font-mono text-base bg-neutral-900/90 text-white p-4 whitespace-pre-wrap overflow-x-auto rounded-container-token;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
code:not(.unstyled):is(:not(.prose *)):is(:not(pre *)) {
|
|
@@ -84,10 +84,10 @@
|
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
ins {
|
|
87
|
-
@apply bg-
|
|
87
|
+
@apply font-mono bg-success-500 text-on-success-token;
|
|
88
88
|
}
|
|
89
89
|
del {
|
|
90
|
-
@apply bg-
|
|
90
|
+
@apply font-mono bg-error-500 text-on-error-token;
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
/* === Date/Time === */
|
package/tailwind/core.cjs
CHANGED