flowbite-svelte 1.31.0 → 1.32.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/accordion/AccordionItem.svelte +3 -2
- package/dist/datepicker/Datepicker.svelte +8 -15
- package/dist/forms/select/MultiSelect.svelte +8 -6
- package/dist/forms/tags/Tags.svelte +1 -1
- package/dist/forms/tags/theme.js +3 -3
- package/dist/types.d.ts +1 -0
- package/package.json +40 -40
- /package/{License → LICENSE} +0 -0
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
header,
|
|
14
14
|
arrowup,
|
|
15
15
|
arrowdown,
|
|
16
|
+
headingTag,
|
|
16
17
|
open = $bindable(false),
|
|
17
18
|
activeClass,
|
|
18
19
|
inactiveClass,
|
|
@@ -70,7 +71,7 @@
|
|
|
70
71
|
let buttonClass = $derived(clsx(open && !ctx?.flush && (styling.active || ctx?.activeClass || active()), !open && !ctx?.flush && (styling.inactive || ctx?.inactiveClass || inactive())));
|
|
71
72
|
</script>
|
|
72
73
|
|
|
73
|
-
<h2 class={base({ class: clsx(theme?.base, className) })}>
|
|
74
|
+
<svelte:element this={headingTag ?? "h2"} class={base({ class: clsx(theme?.base, className) })}>
|
|
74
75
|
<button type="button" onclick={handleToggle} class={button({ class: clsx(buttonClass, theme?.button, styling.button) })} aria-expanded={open}>
|
|
75
76
|
{#if header}
|
|
76
77
|
{@render header()}
|
|
@@ -91,7 +92,7 @@
|
|
|
91
92
|
{/if}
|
|
92
93
|
{/if}
|
|
93
94
|
</button>
|
|
94
|
-
</
|
|
95
|
+
</svelte:element>
|
|
95
96
|
|
|
96
97
|
{#if useTransition}
|
|
97
98
|
{#if open && transitionType !== "none"}
|
|
@@ -55,13 +55,6 @@
|
|
|
55
55
|
isOpen = inline;
|
|
56
56
|
});
|
|
57
57
|
let showMonthSelector: boolean = $state(false);
|
|
58
|
-
let inputElement: HTMLInputElement | null = $state(null);
|
|
59
|
-
|
|
60
|
-
$effect(() => {
|
|
61
|
-
if (inputElement) {
|
|
62
|
-
elementRef = inputElement;
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
58
|
let datepickerContainerElement: HTMLDivElement;
|
|
66
59
|
let currentMonth: Date = $state(new Date());
|
|
67
60
|
$effect(() => {
|
|
@@ -162,15 +155,15 @@
|
|
|
162
155
|
}
|
|
163
156
|
|
|
164
157
|
function handleInputChangeWithDateFns() {
|
|
165
|
-
const inputValue =
|
|
158
|
+
const inputValue = elementRef?.value?.trim();
|
|
166
159
|
if (!inputValue) {
|
|
167
160
|
rangeFrom = undefined;
|
|
168
161
|
rangeTo = undefined;
|
|
169
|
-
|
|
162
|
+
elementRef?.setCustomValidity("");
|
|
170
163
|
return;
|
|
171
164
|
}
|
|
172
165
|
|
|
173
|
-
|
|
166
|
+
elementRef?.setCustomValidity("");
|
|
174
167
|
|
|
175
168
|
if (range) {
|
|
176
169
|
const parts = inputValue.split(" - ");
|
|
@@ -183,7 +176,7 @@
|
|
|
183
176
|
onselect?.({ from: rangeFrom, to: rangeTo });
|
|
184
177
|
return;
|
|
185
178
|
} else {
|
|
186
|
-
|
|
179
|
+
elementRef?.setCustomValidity(`Please enter date range in format: ${getDateFormatPattern()} - ${getDateFormatPattern()}`);
|
|
187
180
|
return;
|
|
188
181
|
}
|
|
189
182
|
}
|
|
@@ -193,12 +186,12 @@
|
|
|
193
186
|
|
|
194
187
|
if (!parsedDate || !isValid(parsedDate)) {
|
|
195
188
|
const formatPattern = getDateFormatPattern();
|
|
196
|
-
|
|
189
|
+
elementRef?.setCustomValidity(`Please enter date in format: ${formatPattern}`);
|
|
197
190
|
return;
|
|
198
191
|
}
|
|
199
192
|
|
|
200
193
|
if (!isDateAvailable(parsedDate)) {
|
|
201
|
-
|
|
194
|
+
elementRef?.setCustomValidity("Selected date is not available");
|
|
202
195
|
return;
|
|
203
196
|
}
|
|
204
197
|
|
|
@@ -353,7 +346,7 @@
|
|
|
353
346
|
case "Escape":
|
|
354
347
|
isOpen = false;
|
|
355
348
|
showMonthSelector = false;
|
|
356
|
-
|
|
349
|
+
elementRef?.focus();
|
|
357
350
|
break;
|
|
358
351
|
default:
|
|
359
352
|
return;
|
|
@@ -421,7 +414,7 @@
|
|
|
421
414
|
<div class="relative">
|
|
422
415
|
<input
|
|
423
416
|
{...inputProps}
|
|
424
|
-
bind:this={
|
|
417
|
+
bind:this={elementRef}
|
|
425
418
|
type="text"
|
|
426
419
|
class={input({ color, class: clsx(theme?.input, inputClass) })}
|
|
427
420
|
{placeholder}
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
class: className,
|
|
25
25
|
classes,
|
|
26
26
|
// Extract select-specific props
|
|
27
|
+
id,
|
|
27
28
|
name,
|
|
28
29
|
form,
|
|
29
30
|
required,
|
|
@@ -124,6 +125,7 @@
|
|
|
124
125
|
// This is useful if the click triggers a re-render and focus is lost momentarily.
|
|
125
126
|
if (multiSelectContainer && multiSelectContainer.contains(event.target as Node)) {
|
|
126
127
|
show = !show;
|
|
128
|
+
event.preventDefault();
|
|
127
129
|
} else {
|
|
128
130
|
show = false; // Close if clicked outside
|
|
129
131
|
}
|
|
@@ -204,12 +206,6 @@
|
|
|
204
206
|
const { base, dropdown, item: dropdownItem, close, select, placeholder: placeholderSpan, svg } = $derived(multiSelect({ disabled, grouped: !!group }));
|
|
205
207
|
</script>
|
|
206
208
|
|
|
207
|
-
<select {name} {form} {required} {autocomplete} {value} hidden multiple {onchange}>
|
|
208
|
-
{#each items as item (item.value)}
|
|
209
|
-
<option value={item.value} disabled={item.disabled}>{item.name}</option>
|
|
210
|
-
{/each}
|
|
211
|
-
</select>
|
|
212
|
-
|
|
213
209
|
<div
|
|
214
210
|
bind:this={multiSelectContainer}
|
|
215
211
|
{...restProps}
|
|
@@ -220,6 +216,12 @@
|
|
|
220
216
|
role="listbox"
|
|
221
217
|
class={base({ size, class: clsx(theme?.base, className) })}
|
|
222
218
|
>
|
|
219
|
+
<select {id} {name} {form} {required} {autocomplete} {value} hidden multiple {onchange}>
|
|
220
|
+
{#each items as item (item.value)}
|
|
221
|
+
<option value={item.value} disabled={item.disabled}>{item.name}</option>
|
|
222
|
+
{/each}
|
|
223
|
+
</select>
|
|
224
|
+
|
|
223
225
|
{#if !selectItems.length}
|
|
224
226
|
<span class={placeholderSpan({ class: clsx(classes?.placeholder) })}>{placeholder}</span>
|
|
225
227
|
{/if}
|
|
@@ -182,7 +182,7 @@
|
|
|
182
182
|
<CloseButton {disabled} size={closeBtnSize} class={close({ class: clsx(theme?.close, styling.close) })} onclick={() => deleteField(index)} />
|
|
183
183
|
</div>
|
|
184
184
|
{/each}
|
|
185
|
-
<div class="relative w-
|
|
185
|
+
<div class="relative min-w-[8rem] flex-1 self-center" bind:this={inputContainer}>
|
|
186
186
|
<input
|
|
187
187
|
{...inputProps}
|
|
188
188
|
{disabled}
|
package/dist/forms/tags/theme.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { tv } from "tailwind-variants";
|
|
2
2
|
export const tags = tv({
|
|
3
3
|
slots: {
|
|
4
|
-
base: "border border-gray-300 dark:border-gray-600 rounded-lg flex focus-within:ring-primary-500 focus-within:ring-1 focus-within:border-primary-500 scrollbar-hidden bg-gray-50 dark:bg-gray-700",
|
|
5
|
-
tag: "flex items-center rounded-lg bg-gray-100 text-gray-900 border border-gray-300 my-1 ml-1
|
|
4
|
+
base: "border border-gray-300 dark:border-gray-600 rounded-lg flex flex-wrap focus-within:ring-primary-500 focus-within:ring-1 focus-within:border-primary-500 scrollbar-hidden bg-gray-50 dark:bg-gray-700 p-2",
|
|
5
|
+
tag: "flex items-center rounded-lg bg-gray-100 text-gray-900 border border-gray-300 my-1 ml-1 p-2 text-sm max-w-full min-w-fit",
|
|
6
6
|
span: "items-center",
|
|
7
7
|
close: "my-auto ml-1",
|
|
8
|
-
input: "block text-sm
|
|
8
|
+
input: "block text-sm my-1 mx-2.5 p-0 bg-transparent border-none outline-none text-gray-900 w-full min-w-fit focus:ring-0 placeholder-gray-400 dark:text-white disabled:cursor-not-allowed disabled:opacity-50",
|
|
9
9
|
info: "mt-1 text-sm text-blue-500 dark:text-blue-400",
|
|
10
10
|
warning: "mt-1 text-sm text-yellow-400 dark:text-yellow-300",
|
|
11
11
|
error: "mt-1 text-sm text-red-500 dark:text-red-400"
|
package/dist/types.d.ts
CHANGED
|
@@ -155,6 +155,7 @@ export interface AccordionItemProps extends AccordionItemVariants, HTMLAttribute
|
|
|
155
155
|
header?: Snippet;
|
|
156
156
|
arrowup?: Snippet;
|
|
157
157
|
arrowdown?: Snippet;
|
|
158
|
+
headingTag?: "h2" | "h3" | "h4" | "h5" | "h6" | "div";
|
|
158
159
|
activeClass?: string;
|
|
159
160
|
inactiveClass?: string;
|
|
160
161
|
transitionType?: TransitionFunc | "none";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flowbite-svelte",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.32.0",
|
|
4
4
|
"description": "Flowbite components for Svelte",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"author": {
|
|
@@ -12,70 +12,70 @@
|
|
|
12
12
|
"homepage": "https://flowbite-svelte.com/",
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"@changesets/cli": "^2.
|
|
16
|
-
"@docsearch/css": "^4.
|
|
17
|
-
"@docsearch/js": "^4.
|
|
18
|
-
"@eslint/compat": "^2.0.
|
|
19
|
-
"@eslint/js": "^
|
|
15
|
+
"@changesets/cli": "^2.30.0",
|
|
16
|
+
"@docsearch/css": "^4.6.2",
|
|
17
|
+
"@docsearch/js": "^4.6.2",
|
|
18
|
+
"@eslint/compat": "^2.0.3",
|
|
19
|
+
"@eslint/js": "^10.0.1",
|
|
20
20
|
"@flowbite-svelte-plugins/chart": "^0.2.4",
|
|
21
21
|
"@flowbite-svelte-plugins/datatable": "^0.4.1",
|
|
22
22
|
"@flowbite-svelte-plugins/texteditor": "^0.25.6",
|
|
23
|
-
"@playwright/test": "^1.
|
|
23
|
+
"@playwright/test": "^1.58.2",
|
|
24
24
|
"@resvg/resvg-js": "^2.6.2",
|
|
25
|
-
"@sveltejs/adapter-vercel": "^6.
|
|
26
|
-
"@sveltejs/kit": "^2.
|
|
25
|
+
"@sveltejs/adapter-vercel": "^6.3.3",
|
|
26
|
+
"@sveltejs/kit": "^2.55.0",
|
|
27
27
|
"@sveltejs/package": "^2.5.7",
|
|
28
|
-
"@sveltejs/vite-plugin-svelte": "^6.2.
|
|
28
|
+
"@sveltejs/vite-plugin-svelte": "^6.2.4",
|
|
29
29
|
"@svitejs/changesets-changelog-github-compact": "^1.2.0",
|
|
30
|
-
"@tailwindcss/vite": "^4.
|
|
30
|
+
"@tailwindcss/vite": "^4.2.2",
|
|
31
31
|
"@testing-library/jest-dom": "^6.9.1",
|
|
32
|
-
"@testing-library/svelte": "^5.
|
|
32
|
+
"@testing-library/svelte": "^5.3.1",
|
|
33
33
|
"@testing-library/user-event": "^14.6.1",
|
|
34
34
|
"@tiptap/core": "3.7.2",
|
|
35
|
-
"@vitest/browser": "^4.
|
|
36
|
-
"@vitest/browser-playwright": "^4.
|
|
37
|
-
"dayjs": "^1.11.
|
|
35
|
+
"@vitest/browser": "^4.1.1",
|
|
36
|
+
"@vitest/browser-playwright": "^4.1.1",
|
|
37
|
+
"dayjs": "^1.11.20",
|
|
38
38
|
"deepmerge": "^4.3.1",
|
|
39
|
-
"eslint": "^
|
|
39
|
+
"eslint": "^10.1.0",
|
|
40
40
|
"eslint-config-prettier": "^10.1.8",
|
|
41
|
-
"eslint-plugin-svelte": "^3.
|
|
41
|
+
"eslint-plugin-svelte": "^3.16.0",
|
|
42
42
|
"flowbite-svelte-admin-dashboard": "^2.1.1",
|
|
43
43
|
"flowbite-svelte-blocks": "^2.1.0",
|
|
44
|
-
"flowbite-svelte-icons": "^3.0
|
|
44
|
+
"flowbite-svelte-icons": "^3.1.0",
|
|
45
45
|
"flowbite-svelte-illustrations": "^1.0.6",
|
|
46
46
|
"flowbite-typography": "^1.0.5",
|
|
47
47
|
"globals": "^16.5.0",
|
|
48
48
|
"highlight.js": "^11.11.1",
|
|
49
|
-
"jsdom": "^27.
|
|
50
|
-
"katex": "^0.16.
|
|
49
|
+
"jsdom": "^27.4.0",
|
|
50
|
+
"katex": "^0.16.43",
|
|
51
51
|
"lowlight": "^3.3.0",
|
|
52
|
-
"mdsvex": "^0.12.
|
|
53
|
-
"mdsvexamples": "^0.5.
|
|
54
|
-
"playwright": "^1.
|
|
55
|
-
"prettier": "^3.
|
|
56
|
-
"prettier-plugin-svelte": "^3.
|
|
52
|
+
"mdsvex": "^0.12.7",
|
|
53
|
+
"mdsvexamples": "^0.5.1",
|
|
54
|
+
"playwright": "^1.58.2",
|
|
55
|
+
"prettier": "^3.8.1",
|
|
56
|
+
"prettier-plugin-svelte": "^3.5.1",
|
|
57
57
|
"prettier-plugin-tailwindcss": "^0.7.2",
|
|
58
58
|
"prism-themes": "^1.9.0",
|
|
59
|
-
"publint": "^0.3.
|
|
59
|
+
"publint": "^0.3.18",
|
|
60
60
|
"runatics": "^0.2.0",
|
|
61
61
|
"runes-meta-tags": "^0.5.0",
|
|
62
|
-
"satori": "^0.
|
|
62
|
+
"satori": "^0.26.0",
|
|
63
63
|
"satori-html": "^0.3.2",
|
|
64
|
-
"super-sitemap": "^1.0.
|
|
65
|
-
"svelte": "^5.
|
|
66
|
-
"svelte-check": "^4.
|
|
64
|
+
"super-sitemap": "^1.0.7",
|
|
65
|
+
"svelte": "^5.55.0",
|
|
66
|
+
"svelte-check": "^4.4.5",
|
|
67
67
|
"svelte-doc-llm": "^0.8.0",
|
|
68
68
|
"svelte-lib-helpers": "^0.4.31",
|
|
69
|
-
"svelte-meta-tags": "^4.5.
|
|
69
|
+
"svelte-meta-tags": "^4.5.1",
|
|
70
70
|
"svelte-rune-highlight": "^0.12.1",
|
|
71
|
-
"tailwindcss": "^4.
|
|
71
|
+
"tailwindcss": "^4.2.2",
|
|
72
72
|
"tsx": "^4.21.0",
|
|
73
73
|
"typescript": "^5.9.3",
|
|
74
|
-
"typescript-eslint": "^8.
|
|
75
|
-
"vite": "^7.3.
|
|
74
|
+
"typescript-eslint": "^8.57.2",
|
|
75
|
+
"vite": "^7.3.1",
|
|
76
76
|
"vite-plugin-devtools-json": "^1.0.0",
|
|
77
|
-
"vitest": "^4.
|
|
78
|
-
"vitest-browser-svelte": "^2.0
|
|
77
|
+
"vitest": "^4.1.1",
|
|
78
|
+
"vitest-browser-svelte": "^2.1.0"
|
|
79
79
|
},
|
|
80
80
|
"peerDependencies": {
|
|
81
81
|
"svelte": "^5.40.0",
|
|
@@ -125,14 +125,14 @@
|
|
|
125
125
|
"url": "git+https://github.com/themesberg/flowbite-svelte.git"
|
|
126
126
|
},
|
|
127
127
|
"dependencies": {
|
|
128
|
-
"@floating-ui/dom": "^1.7.
|
|
129
|
-
"@floating-ui/utils": "^0.2.
|
|
130
|
-
"apexcharts": "^5.
|
|
128
|
+
"@floating-ui/dom": "^1.7.6",
|
|
129
|
+
"@floating-ui/utils": "^0.2.11",
|
|
130
|
+
"apexcharts": "^5.10.4",
|
|
131
131
|
"clsx": "^2.1.1",
|
|
132
132
|
"date-fns": "^4.1.0",
|
|
133
133
|
"esm-env": "^1.2.2",
|
|
134
134
|
"flowbite": "^3.1.2",
|
|
135
|
-
"tailwind-merge": "^3.
|
|
135
|
+
"tailwind-merge": "^3.5.0",
|
|
136
136
|
"tailwind-variants": "^3.2.2"
|
|
137
137
|
},
|
|
138
138
|
"files": [
|
/package/{License → LICENSE}
RENAMED
|
File without changes
|