@skeletonlabs/skeleton 1.6.2 → 1.7.0-dev.e2cc14c3
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/components/AppRail/AppRailAnchor.svelte +5 -1
- package/dist/components/AppRail/AppRailAnchor.svelte.d.ts +4 -0
- package/dist/components/AppRail/AppRailTile.svelte +2 -1
- package/dist/components/AppRail/AppRailTile.svelte.d.ts +6 -0
- package/dist/components/Autocomplete/Autocomplete.svelte +1 -1
- package/dist/components/Autocomplete/Autocomplete.svelte.d.ts +1 -1
- package/dist/components/Avatar/Avatar.svelte.d.ts +2 -1
- package/dist/components/ConicGradient/ConicGradient.svelte +3 -2
- package/dist/components/ConicGradient/ConicGradient.svelte.d.ts +3 -1
- package/dist/components/ListBox/ListBoxItem.svelte +18 -1
- package/dist/components/Paginator/Paginator.svelte +139 -45
- package/dist/components/Paginator/Paginator.svelte.d.ts +22 -10
- package/dist/components/Paginator/icons.d.ts +4 -0
- package/dist/components/Paginator/icons.js +4 -0
- package/dist/components/SlideToggle/SlideToggle.svelte +2 -1
- package/dist/components/SlideToggle/SlideToggle.svelte.d.ts +3 -1
- package/dist/components/Stepper/Step.svelte +13 -3
- package/dist/components/Stepper/Step.svelte.d.ts +4 -2
- package/dist/components/Stepper/Stepper.svelte.d.ts +5 -4
- package/dist/components/Stepper/types.d.ts +9 -0
- package/dist/components/Stepper/types.js +1 -0
- package/dist/components/Table/Table.svelte +1 -1
- package/dist/components/Table/Table.svelte.d.ts +1 -1
- package/dist/components/TableOfContents/TableOfContents.svelte +4 -3
- package/dist/index.d.ts +21 -21
- package/dist/index.js +13 -13
- package/dist/styles/all.css +1 -1
- package/dist/styles/partials/typography-prose.css +41 -43
- package/dist/styles/skeleton.css +1 -1
- package/dist/tailwind/generated/intellisense-classes.cjs +1 -1
- package/dist/tailwind/generated/intellisense-classes.d.cts +73 -0
- package/dist/tailwind/intellisense.cjs +1 -1
- package/dist/tailwind/tokens/backgrounds.cjs +1 -0
- package/dist/utilities/CodeBlock/CodeBlock.svelte +2 -2
- package/dist/utilities/DataTable/DataTable.d.ts +3 -3
- package/dist/utilities/DataTable/DataTable.js +2 -2
- package/dist/utilities/DataTable/types.d.ts +1 -1
- package/dist/utilities/Drawer/Drawer.svelte +11 -7
- package/dist/utilities/Drawer/Drawer.svelte.d.ts +4 -0
- package/dist/utilities/Drawer/stores.d.ts +1 -1
- package/dist/utilities/LightSwitch/LightSwitch.svelte +3 -2
- package/dist/utilities/LightSwitch/lightswitch.js +1 -1
- package/dist/utilities/Modal/Modal.svelte +17 -5
- package/dist/utilities/Modal/Modal.svelte.d.ts +3 -1
- package/dist/utilities/Modal/stores.d.ts +1 -1
- package/dist/utilities/Popup/popup.d.ts +1 -1
- package/dist/utilities/Popup/popup.js +8 -3
- package/dist/utilities/Toast/Toast.svelte +2 -2
- package/dist/utilities/Toast/stores.d.ts +1 -1
- package/package.json +16 -13
|
@@ -36,9 +36,13 @@ declare const __propDef: {
|
|
|
36
36
|
describedby?: string | undefined;
|
|
37
37
|
};
|
|
38
38
|
events: {
|
|
39
|
+
touchstart: TouchEvent;
|
|
40
|
+
touchend: TouchEvent;
|
|
39
41
|
keypress: KeyboardEvent;
|
|
40
42
|
/** {{ event }} backdrop - Fires on backdrop interaction.*/
|
|
41
43
|
backdrop: CustomEvent<any>;
|
|
44
|
+
/** {{ event }} drawer - Fires on drawer interaction.*/
|
|
45
|
+
drawer: CustomEvent<any>;
|
|
42
46
|
} & {
|
|
43
47
|
[evt: string]: CustomEvent<any>;
|
|
44
48
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DrawerSettings } from './types';
|
|
1
|
+
import type { DrawerSettings } from './types.js';
|
|
2
2
|
export declare const drawerStore: {
|
|
3
3
|
subscribe: (this: void, run: import("svelte/store").Subscriber<DrawerSettings>, invalidate?: ((value?: DrawerSettings | undefined) => void) | undefined) => import("svelte/store").Unsubscriber;
|
|
4
4
|
set: (this: void, value: DrawerSettings) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script>import { onMount } from "svelte";
|
|
2
|
-
import { modeCurrent, setModeUserPrefers, setModeCurrent, setInitialClassState, getModeOsPrefers } from "./lightswitch";
|
|
2
|
+
import { modeCurrent, setModeUserPrefers, setModeCurrent, setInitialClassState, getModeOsPrefers } from "./lightswitch.js";
|
|
3
3
|
export let bgLight = "bg-surface-50";
|
|
4
4
|
export let bgDark = "bg-surface-900";
|
|
5
5
|
export let fillLight = "fill-surface-50";
|
|
@@ -49,7 +49,8 @@ $:
|
|
|
49
49
|
</script>
|
|
50
50
|
|
|
51
51
|
<svelte:head>
|
|
52
|
-
|
|
52
|
+
<!-- Workaround for a svelte parsing error: https://github.com/sveltejs/eslint-plugin-svelte/issues/492 -->
|
|
53
|
+
{@html `<\u{73}cript nonce="%sveltekit.nonce%">(${setInitialClassState.toString()})();</script>`}
|
|
53
54
|
</svelte:head>
|
|
54
55
|
|
|
55
56
|
<div
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Lightswitch Service
|
|
2
2
|
import { get } from 'svelte/store';
|
|
3
3
|
// DO NOT replace this ⬇ import, it has to be imported directly
|
|
4
|
-
import { localStorageStore } from '../LocalStorageStore/LocalStorageStore';
|
|
4
|
+
import { localStorageStore } from '../LocalStorageStore/LocalStorageStore.js';
|
|
5
5
|
// Stores ---
|
|
6
6
|
// TRUE: light, FALSE: dark
|
|
7
7
|
/** Store: OS Preference Mode */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script>import { createEventDispatcher } from "svelte";
|
|
2
2
|
import { fade, fly } from "svelte/transition";
|
|
3
3
|
const dispatch = createEventDispatcher();
|
|
4
|
-
import { modalStore } from "./stores";
|
|
5
|
-
import { focusTrap } from "../../actions/FocusTrap/focusTrap";
|
|
4
|
+
import { modalStore } from "./stores.js";
|
|
5
|
+
import { focusTrap } from "../../actions/FocusTrap/focusTrap.js";
|
|
6
6
|
export let position = "items-center";
|
|
7
7
|
export let components = {};
|
|
8
8
|
export let duration = 150;
|
|
@@ -37,6 +37,7 @@ const buttonTextDefaults = {
|
|
|
37
37
|
buttonTextSubmit
|
|
38
38
|
};
|
|
39
39
|
let currentComponent;
|
|
40
|
+
let registeredInteractionWithBackdrop = false;
|
|
40
41
|
modalStore.subscribe((modals) => {
|
|
41
42
|
if (!modals.length)
|
|
42
43
|
return;
|
|
@@ -47,16 +48,25 @@ modalStore.subscribe((modals) => {
|
|
|
47
48
|
buttonTextSubmit = modals[0].buttonTextSubmit || buttonTextDefaults.buttonTextSubmit;
|
|
48
49
|
currentComponent = typeof modals[0].component === "string" ? components[modals[0].component] : modals[0].component;
|
|
49
50
|
});
|
|
50
|
-
function
|
|
51
|
+
function onBackdropInteractionBegin(event) {
|
|
51
52
|
if (!(event.target instanceof Element))
|
|
52
53
|
return;
|
|
53
54
|
const classList = event.target.classList;
|
|
54
55
|
if (classList.contains("modal-backdrop") || classList.contains("modal-transition")) {
|
|
56
|
+
registeredInteractionWithBackdrop = true;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
function onBackdropInteractionEnd(event) {
|
|
60
|
+
if (!(event.target instanceof Element))
|
|
61
|
+
return;
|
|
62
|
+
const classList = event.target.classList;
|
|
63
|
+
if ((classList.contains("modal-backdrop") || classList.contains("modal-transition")) && registeredInteractionWithBackdrop) {
|
|
55
64
|
if ($modalStore[0].response)
|
|
56
65
|
$modalStore[0].response(void 0);
|
|
57
66
|
modalStore.close();
|
|
58
67
|
dispatch("backdrop", event);
|
|
59
68
|
}
|
|
69
|
+
registeredInteractionWithBackdrop = false;
|
|
60
70
|
}
|
|
61
71
|
function onClose() {
|
|
62
72
|
if ($modalStore[0].response)
|
|
@@ -128,8 +138,10 @@ $:
|
|
|
128
138
|
<div
|
|
129
139
|
class="modal-backdrop {classesBackdrop}"
|
|
130
140
|
data-testid="modal-backdrop"
|
|
131
|
-
on:mousedown={
|
|
132
|
-
on:
|
|
141
|
+
on:mousedown={onBackdropInteractionBegin}
|
|
142
|
+
on:mouseup={onBackdropInteractionEnd}
|
|
143
|
+
on:touchstart
|
|
144
|
+
on:touchend
|
|
133
145
|
transition:fade={{ duration }}
|
|
134
146
|
use:focusTrap={true}
|
|
135
147
|
>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import type { ModalComponent } from './types';
|
|
2
|
+
import type { ModalComponent } from './types.js';
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
5
|
[x: string]: any;
|
|
@@ -51,6 +51,8 @@ declare const __propDef: {
|
|
|
51
51
|
regionFooter?: string | undefined;
|
|
52
52
|
};
|
|
53
53
|
events: {
|
|
54
|
+
touchstart: TouchEvent;
|
|
55
|
+
touchend: TouchEvent;
|
|
54
56
|
/** {{ event }} backdrop - Fires on backdrop interaction.*/
|
|
55
57
|
backdrop: CustomEvent<any>;
|
|
56
58
|
} & {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ModalSettings } from './types';
|
|
1
|
+
import type { ModalSettings } from './types.js';
|
|
2
2
|
export declare const modalStore: {
|
|
3
3
|
subscribe: (this: void, run: import("svelte/store").Subscriber<ModalSettings[]>, invalidate?: ((value?: ModalSettings[] | undefined) => void) | undefined) => import("svelte/store").Unsubscriber;
|
|
4
4
|
set: (this: void, value: ModalSettings[]) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Writable } from 'svelte/store';
|
|
2
|
-
import type { PopupSettings } from './types';
|
|
2
|
+
import type { PopupSettings } from './types.js';
|
|
3
3
|
export declare const storePopup: Writable<any>;
|
|
4
4
|
export declare function popup(triggerNode: HTMLElement, args: PopupSettings): {
|
|
5
5
|
update(newArgs: PopupSettings): void;
|
|
@@ -17,7 +17,7 @@ export function popup(triggerNode, args) {
|
|
|
17
17
|
let elemArrow;
|
|
18
18
|
function setDomElements() {
|
|
19
19
|
elemPopup = document.querySelector(`[data-popup="${args.target}"]`) ?? document.createElement('div');
|
|
20
|
-
elemArrow = elemPopup
|
|
20
|
+
elemArrow = elemPopup.querySelector(`.arrow`) ?? document.createElement('div');
|
|
21
21
|
}
|
|
22
22
|
setDomElements(); // init
|
|
23
23
|
// Render Floating UI Popup
|
|
@@ -76,7 +76,7 @@ export function popup(triggerNode, args) {
|
|
|
76
76
|
// https://floating-ui.com/docs/arrow
|
|
77
77
|
if (elemArrow) {
|
|
78
78
|
const { x: arrowX, y: arrowY } = middlewareData.arrow;
|
|
79
|
-
// @ts-
|
|
79
|
+
// @ts-expect-error implicit any
|
|
80
80
|
const staticSide = {
|
|
81
81
|
top: 'bottom',
|
|
82
82
|
right: 'left',
|
|
@@ -173,9 +173,14 @@ export function popup(triggerNode, args) {
|
|
|
173
173
|
close();
|
|
174
174
|
return;
|
|
175
175
|
}
|
|
176
|
+
// Update focusable elements (important for Autocomplete)
|
|
177
|
+
focusablePopupElements = Array.from(elemPopup?.querySelectorAll(focusableAllowedList));
|
|
176
178
|
// On Tab or ArrowDown key
|
|
177
179
|
const triggerMenuFocused = popupState.open && document.activeElement === triggerNode;
|
|
178
|
-
if (triggerMenuFocused &&
|
|
180
|
+
if (triggerMenuFocused &&
|
|
181
|
+
(key === 'ArrowDown' || key === 'Tab') &&
|
|
182
|
+
focusableAllowedList.length > 0 &&
|
|
183
|
+
focusablePopupElements.length > 0) {
|
|
179
184
|
event.preventDefault();
|
|
180
185
|
focusablePopupElements[0].focus();
|
|
181
186
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script>import { crossfade } from "svelte/transition";
|
|
2
2
|
import { cubicInOut } from "svelte/easing";
|
|
3
3
|
import { flip } from "svelte/animate";
|
|
4
|
-
import { toastStore } from "./stores";
|
|
4
|
+
import { toastStore } from "./stores.js";
|
|
5
5
|
export let position = "b";
|
|
6
6
|
export let max = 3;
|
|
7
7
|
export let duration = 250;
|
|
@@ -17,7 +17,7 @@ export let buttonAction = "btn variant-filled";
|
|
|
17
17
|
export let buttonDismiss = "btn-icon btn-icon-sm variant-filled";
|
|
18
18
|
export let buttonDismissLabel = "\u2715";
|
|
19
19
|
const cWrapper = "flex fixed top-0 left-0 right-0 bottom-0 pointer-events-none";
|
|
20
|
-
const cSnackbar = "flex flex-col
|
|
20
|
+
const cSnackbar = "flex flex-col gap-y-2";
|
|
21
21
|
const cToast = "flex justify-between items-center pointer-events-auto";
|
|
22
22
|
const cToastActions = "flex items-center space-x-2";
|
|
23
23
|
let cPosition;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ToastSettings, Toast } from './types';
|
|
1
|
+
import type { ToastSettings, Toast } from './types.js';
|
|
2
2
|
export declare const toastStore: {
|
|
3
3
|
subscribe: (this: void, run: import("svelte/store").Subscriber<Toast[]>, invalidate?: ((value?: Toast[] | undefined) => void) | undefined) => import("svelte/store").Unsubscriber;
|
|
4
4
|
/** Add a new toast to the queue. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skeletonlabs/skeleton",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0-dev.e2cc14c3",
|
|
4
4
|
"description": "A SvelteKit component library.",
|
|
5
5
|
"author": "endigo9740 <chris@skeletonlabs.dev>",
|
|
6
6
|
"repository": {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"autoprefixer": "10.4.14",
|
|
42
42
|
"eslint": "8.37.0",
|
|
43
43
|
"eslint-config-prettier": "8.8.0",
|
|
44
|
-
"eslint-plugin-
|
|
44
|
+
"eslint-plugin-svelte": "^2.29.0",
|
|
45
45
|
"jsdom": "21.1.1",
|
|
46
46
|
"postcss": "8.4.21",
|
|
47
47
|
"postcss-import": "15.1.0",
|
|
@@ -70,7 +70,10 @@
|
|
|
70
70
|
},
|
|
71
71
|
"./styles/*": "./dist/styles/*",
|
|
72
72
|
"./themes/*": "./dist/themes/*",
|
|
73
|
-
"./tailwind/skeleton.cjs":
|
|
73
|
+
"./tailwind/skeleton.cjs": {
|
|
74
|
+
"types": "./dist/tailwind/skeleton.cts",
|
|
75
|
+
"default": "./dist/tailwind/skeleton.cjs"
|
|
76
|
+
}
|
|
74
77
|
},
|
|
75
78
|
"files": [
|
|
76
79
|
"./dist/**/*.svelte",
|
|
@@ -83,16 +86,6 @@
|
|
|
83
86
|
"./dist/themes/*",
|
|
84
87
|
"!./dist/**/*.test.*"
|
|
85
88
|
],
|
|
86
|
-
"typesVersions": {
|
|
87
|
-
">4.0": {
|
|
88
|
-
"index": [
|
|
89
|
-
"./dist/index.d.ts"
|
|
90
|
-
],
|
|
91
|
-
"tailwind/skeleton.cjs": [
|
|
92
|
-
"./dist/tailwind/skeleton.d.cts"
|
|
93
|
-
]
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
89
|
"scripts": {
|
|
97
90
|
"dev": "vite dev",
|
|
98
91
|
"build": "vite build",
|
|
@@ -106,5 +99,15 @@
|
|
|
106
99
|
"coverage": "vitest run --coverage",
|
|
107
100
|
"sync": "svelte-kit sync",
|
|
108
101
|
"build:jss": "node ./scripts/generate-jss.js --package"
|
|
102
|
+
},
|
|
103
|
+
"typesVersions": {
|
|
104
|
+
">4.0": {
|
|
105
|
+
"index.d.ts": [
|
|
106
|
+
"./dist/index.d.ts"
|
|
107
|
+
],
|
|
108
|
+
"tailwind/skeleton.cjs": [
|
|
109
|
+
"./dist/tailwind/skeleton.d.cts"
|
|
110
|
+
]
|
|
111
|
+
}
|
|
109
112
|
}
|
|
110
113
|
}
|