flowbite-svelte 1.7.1 → 1.8.0
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/drawer/theme.d.ts +3 -3
- package/dist/forms/floating-label/FloatingLabelInput.svelte +1 -1
- package/dist/forms/tags/theme.d.ts +6 -6
- package/dist/theme/index.d.ts +3 -3
- package/dist/uiHelpers.svelte.d.ts +3 -4
- package/dist/uiHelpers.svelte.js +52 -50
- package/dist/utils/index.d.ts +2 -1
- package/dist/utils/index.js +5 -1
- package/package.json +17 -9
- /package/dist/utils/{actions.svelte.d.ts → actions.d.ts} +0 -0
- /package/dist/utils/{actions.svelte.js → actions.js} +0 -0
package/dist/drawer/theme.d.ts
CHANGED
|
@@ -136,16 +136,16 @@ export declare const drawer: import("tailwind-variants").TVReturnType<{
|
|
|
136
136
|
export declare const drawerhead: import("tailwind-variants").TVReturnType<{
|
|
137
137
|
[key: string]: {
|
|
138
138
|
[key: string]: import("tailwind-variants").ClassValue | {
|
|
139
|
-
button?: import("tailwind-variants").ClassValue;
|
|
140
139
|
base?: import("tailwind-variants").ClassValue;
|
|
140
|
+
button?: import("tailwind-variants").ClassValue;
|
|
141
141
|
svg?: import("tailwind-variants").ClassValue;
|
|
142
142
|
};
|
|
143
143
|
};
|
|
144
144
|
} | {
|
|
145
145
|
[x: string]: {
|
|
146
146
|
[x: string]: import("tailwind-variants").ClassValue | {
|
|
147
|
-
button?: import("tailwind-variants").ClassValue;
|
|
148
147
|
base?: import("tailwind-variants").ClassValue;
|
|
148
|
+
button?: import("tailwind-variants").ClassValue;
|
|
149
149
|
svg?: import("tailwind-variants").ClassValue;
|
|
150
150
|
};
|
|
151
151
|
};
|
|
@@ -156,8 +156,8 @@ export declare const drawerhead: import("tailwind-variants").TVReturnType<{
|
|
|
156
156
|
}, undefined, {
|
|
157
157
|
[key: string]: {
|
|
158
158
|
[key: string]: import("tailwind-variants").ClassValue | {
|
|
159
|
-
button?: import("tailwind-variants").ClassValue;
|
|
160
159
|
base?: import("tailwind-variants").ClassValue;
|
|
160
|
+
button?: import("tailwind-variants").ClassValue;
|
|
161
161
|
svg?: import("tailwind-variants").ClassValue;
|
|
162
162
|
};
|
|
163
163
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
export declare const tags: import("tailwind-variants").TVReturnType<{
|
|
2
2
|
[key: string]: {
|
|
3
3
|
[key: string]: import("tailwind-variants").ClassValue | {
|
|
4
|
-
close?: import("tailwind-variants").ClassValue;
|
|
5
|
-
input?: import("tailwind-variants").ClassValue;
|
|
6
4
|
base?: import("tailwind-variants").ClassValue;
|
|
7
5
|
span?: import("tailwind-variants").ClassValue;
|
|
6
|
+
close?: import("tailwind-variants").ClassValue;
|
|
7
|
+
input?: import("tailwind-variants").ClassValue;
|
|
8
8
|
tag?: import("tailwind-variants").ClassValue;
|
|
9
9
|
};
|
|
10
10
|
};
|
|
11
11
|
} | {
|
|
12
12
|
[x: string]: {
|
|
13
13
|
[x: string]: import("tailwind-variants").ClassValue | {
|
|
14
|
-
close?: import("tailwind-variants").ClassValue;
|
|
15
|
-
input?: import("tailwind-variants").ClassValue;
|
|
16
14
|
base?: import("tailwind-variants").ClassValue;
|
|
17
15
|
span?: import("tailwind-variants").ClassValue;
|
|
16
|
+
close?: import("tailwind-variants").ClassValue;
|
|
17
|
+
input?: import("tailwind-variants").ClassValue;
|
|
18
18
|
tag?: import("tailwind-variants").ClassValue;
|
|
19
19
|
};
|
|
20
20
|
};
|
|
@@ -27,10 +27,10 @@ export declare const tags: import("tailwind-variants").TVReturnType<{
|
|
|
27
27
|
}, undefined, {
|
|
28
28
|
[key: string]: {
|
|
29
29
|
[key: string]: import("tailwind-variants").ClassValue | {
|
|
30
|
-
close?: import("tailwind-variants").ClassValue;
|
|
31
|
-
input?: import("tailwind-variants").ClassValue;
|
|
32
30
|
base?: import("tailwind-variants").ClassValue;
|
|
33
31
|
span?: import("tailwind-variants").ClassValue;
|
|
32
|
+
close?: import("tailwind-variants").ClassValue;
|
|
33
|
+
input?: import("tailwind-variants").ClassValue;
|
|
34
34
|
tag?: import("tailwind-variants").ClassValue;
|
|
35
35
|
};
|
|
36
36
|
};
|
package/dist/theme/index.d.ts
CHANGED
|
@@ -2751,16 +2751,16 @@ export declare const baseThemes: {
|
|
|
2751
2751
|
drawerhead: import("tailwind-variants").TVReturnType<{
|
|
2752
2752
|
[key: string]: {
|
|
2753
2753
|
[key: string]: import("tailwind-variants").ClassValue | {
|
|
2754
|
-
button?: import("tailwind-variants").ClassValue;
|
|
2755
2754
|
base?: import("tailwind-variants").ClassValue;
|
|
2755
|
+
button?: import("tailwind-variants").ClassValue;
|
|
2756
2756
|
svg?: import("tailwind-variants").ClassValue;
|
|
2757
2757
|
};
|
|
2758
2758
|
};
|
|
2759
2759
|
} | {
|
|
2760
2760
|
[x: string]: {
|
|
2761
2761
|
[x: string]: import("tailwind-variants").ClassValue | {
|
|
2762
|
-
button?: import("tailwind-variants").ClassValue;
|
|
2763
2762
|
base?: import("tailwind-variants").ClassValue;
|
|
2763
|
+
button?: import("tailwind-variants").ClassValue;
|
|
2764
2764
|
svg?: import("tailwind-variants").ClassValue;
|
|
2765
2765
|
};
|
|
2766
2766
|
};
|
|
@@ -2771,8 +2771,8 @@ export declare const baseThemes: {
|
|
|
2771
2771
|
}, undefined, {
|
|
2772
2772
|
[key: string]: {
|
|
2773
2773
|
[key: string]: import("tailwind-variants").ClassValue | {
|
|
2774
|
-
button?: import("tailwind-variants").ClassValue;
|
|
2775
2774
|
base?: import("tailwind-variants").ClassValue;
|
|
2775
|
+
button?: import("tailwind-variants").ClassValue;
|
|
2776
2776
|
svg?: import("tailwind-variants").ClassValue;
|
|
2777
2777
|
};
|
|
2778
2778
|
};
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
export
|
|
1
|
+
export function uiHelpers(): {
|
|
2
2
|
isOpen: boolean;
|
|
3
3
|
toggle: () => void;
|
|
4
4
|
close: () => void;
|
|
5
5
|
open: () => void;
|
|
6
6
|
};
|
|
7
|
-
export
|
|
8
|
-
update(newCallbackFunction:
|
|
7
|
+
export function clickOutside(element: any, callbackFunction: any): {
|
|
8
|
+
update(newCallbackFunction: any): void;
|
|
9
9
|
destroy(): void;
|
|
10
10
|
};
|
|
11
|
-
export declare function idGenerator(): string;
|
package/dist/uiHelpers.svelte.js
CHANGED
|
@@ -1,54 +1,56 @@
|
|
|
1
1
|
export function uiHelpers() {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
2
|
+
let isOpen = $state(false);
|
|
3
|
+
|
|
4
|
+
function toggle() {
|
|
5
|
+
isOpen = !isOpen;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
function close() {
|
|
9
|
+
isOpen = false;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function open() {
|
|
13
|
+
isOpen = true;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
return {
|
|
17
|
+
get isOpen() {
|
|
18
|
+
return isOpen;
|
|
19
|
+
},
|
|
20
|
+
set isOpen(value) {
|
|
21
|
+
isOpen = value;
|
|
22
|
+
},
|
|
23
|
+
|
|
24
|
+
toggle,
|
|
25
|
+
close,
|
|
26
|
+
open
|
|
27
|
+
};
|
|
23
28
|
}
|
|
29
|
+
|
|
24
30
|
export function clickOutside(element, callbackFunction) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
let n = Date.now();
|
|
52
|
-
export function idGenerator() {
|
|
53
|
-
return (++n).toString(36);
|
|
31
|
+
const onClick = (event) => {
|
|
32
|
+
if (typeof callbackFunction === "function") {
|
|
33
|
+
const targetNode = event.target;
|
|
34
|
+
if (!element.contains(targetNode)) {
|
|
35
|
+
callbackFunction(event);
|
|
36
|
+
}
|
|
37
|
+
} else {
|
|
38
|
+
console.error("Callback function is not a function");
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
element.ownerDocument.body.addEventListener("click", onClick);
|
|
43
|
+
|
|
44
|
+
return {
|
|
45
|
+
update(newCallbackFunction) {
|
|
46
|
+
if (typeof newCallbackFunction === "function") {
|
|
47
|
+
callbackFunction = newCallbackFunction;
|
|
48
|
+
} else {
|
|
49
|
+
console.error("New callback function is not a function");
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
destroy() {
|
|
53
|
+
element.ownerDocument.body.removeEventListener("click", onClick);
|
|
54
|
+
}
|
|
55
|
+
};
|
|
54
56
|
}
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type ClassValue } from "clsx";
|
|
2
2
|
export { default as CloseButton } from "./CloseButton.svelte";
|
|
3
3
|
export { closeButtonVariants } from "./theme";
|
|
4
|
-
export { trapFocus } from "./actions
|
|
4
|
+
export { trapFocus } from "./actions";
|
|
5
5
|
export { default as Popper } from "./Popper.svelte";
|
|
6
6
|
export declare function cn(...inputs: ClassValue[]): string;
|
|
7
|
+
export declare function idGenerator(): string;
|
package/dist/utils/index.js
CHANGED
|
@@ -2,8 +2,12 @@ import { clsx } from "clsx";
|
|
|
2
2
|
import { twMerge } from "tailwind-merge";
|
|
3
3
|
export { default as CloseButton } from "./CloseButton.svelte";
|
|
4
4
|
export { closeButtonVariants } from "./theme";
|
|
5
|
-
export { trapFocus } from "./actions
|
|
5
|
+
export { trapFocus } from "./actions";
|
|
6
6
|
export { default as Popper } from "./Popper.svelte";
|
|
7
7
|
export function cn(...inputs) {
|
|
8
8
|
return twMerge(clsx(inputs));
|
|
9
9
|
}
|
|
10
|
+
let n = Date.now();
|
|
11
|
+
export function idGenerator() {
|
|
12
|
+
return (++n).toString(36);
|
|
13
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flowbite-svelte",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.0",
|
|
4
4
|
"description": "Flowbite components for Svelte",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"author": {
|
|
@@ -17,10 +17,13 @@
|
|
|
17
17
|
"@docsearch/js": "^3.9.0",
|
|
18
18
|
"@eslint/compat": "^1.3.0",
|
|
19
19
|
"@eslint/js": "^9.29.0",
|
|
20
|
-
"@
|
|
20
|
+
"@flowbite-svelte-plugins/chart": "^0.2.4",
|
|
21
|
+
"@flowbite-svelte-plugins/datatable": "^0.3.4",
|
|
22
|
+
"@flowbite-svelte-plugins/texteditor": "^0.9.3",
|
|
23
|
+
"@playwright/test": "^1.53.1",
|
|
21
24
|
"@sveltejs/adapter-auto": "^6.0.1",
|
|
22
25
|
"@sveltejs/adapter-vercel": "^5.7.2",
|
|
23
|
-
"@sveltejs/kit": "^2.
|
|
26
|
+
"@sveltejs/kit": "^2.22.0",
|
|
24
27
|
"@sveltejs/package": "2.3.11",
|
|
25
28
|
"@sveltejs/vite-plugin-svelte": "^5.1.0",
|
|
26
29
|
"@svitejs/changesets-changelog-github-compact": "^1.2.0",
|
|
@@ -28,23 +31,27 @@
|
|
|
28
31
|
"@testing-library/jest-dom": "^6.6.3",
|
|
29
32
|
"@testing-library/svelte": "^5.2.8",
|
|
30
33
|
"@testing-library/user-event": "^14.6.1",
|
|
34
|
+
"@tiptap/core": "^2.22.3",
|
|
31
35
|
"dayjs": "^1.11.13",
|
|
32
36
|
"deepmerge": "^4.3.1",
|
|
33
37
|
"eslint": "^9.29.0",
|
|
34
38
|
"eslint-config-prettier": "^10.1.5",
|
|
35
|
-
"eslint-plugin-svelte": "^3.9.
|
|
36
|
-
"flowbite-svelte-icons": "^2.2.
|
|
39
|
+
"eslint-plugin-svelte": "^3.9.3",
|
|
40
|
+
"flowbite-svelte-icons": "^2.2.1",
|
|
41
|
+
"flowbite-typography": "^1.0.5",
|
|
37
42
|
"globals": "^16.2.0",
|
|
38
43
|
"jsdom": "^26.1.0",
|
|
44
|
+
"lowlight": "^3.3.0",
|
|
39
45
|
"mdsvex": "^0.12.6",
|
|
40
46
|
"mdsvexamples": "^0.5.0",
|
|
41
47
|
"prettier": "^3.5.3",
|
|
42
48
|
"prettier-plugin-svelte": "^3.4.0",
|
|
43
|
-
"prettier-plugin-tailwindcss": "^0.6.
|
|
49
|
+
"prettier-plugin-tailwindcss": "^0.6.13",
|
|
44
50
|
"prism-themes": "^1.9.0",
|
|
45
51
|
"publint": "^0.3.12",
|
|
46
|
-
"
|
|
47
|
-
"svelte
|
|
52
|
+
"simple-datatables": "^10.0.0",
|
|
53
|
+
"svelte": "^5.34.7",
|
|
54
|
+
"svelte-check": "^4.2.2",
|
|
48
55
|
"svelte-doc-llm": "^0.2.2",
|
|
49
56
|
"svelte-lib-helpers": "^0.4.30",
|
|
50
57
|
"svelte-meta-tags": "^4.4.0",
|
|
@@ -54,7 +61,8 @@
|
|
|
54
61
|
"typescript": "^5.8.3",
|
|
55
62
|
"typescript-eslint": "8.31.1",
|
|
56
63
|
"vite": "^6.3.5",
|
|
57
|
-
"
|
|
64
|
+
"vite-plugin-devtools-json": "^0.2.0",
|
|
65
|
+
"vitest": "^3.2.4"
|
|
58
66
|
},
|
|
59
67
|
"peerDependencies": {
|
|
60
68
|
"svelte": "^5.0.0",
|
|
File without changes
|
|
File without changes
|