flowbite-svelte 1.17.3 → 1.18.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/banner/Banner.svelte +3 -1
- package/dist/banner/Banner.svelte.d.ts +1 -0
- package/dist/bottom-navigation/BottomNav.svelte +1 -1
- package/dist/bottom-navigation/BottomNav.svelte.d.ts +1 -1
- package/dist/bottom-navigation/BottomNavHeader.svelte +1 -1
- package/dist/bottom-navigation/BottomNavHeader.svelte.d.ts +1 -1
- package/dist/bottom-navigation/BottomNavHeaderItem.svelte +1 -1
- package/dist/bottom-navigation/BottomNavHeaderItem.svelte.d.ts +1 -1
- package/dist/bottom-navigation/BottomNavItem.svelte +1 -1
- package/dist/bottom-navigation/BottomNavItem.svelte.d.ts +1 -1
- package/dist/breadcrumb/Breadcrumb.svelte +1 -1
- package/dist/breadcrumb/Breadcrumb.svelte.d.ts +1 -1
- package/dist/breadcrumb/BreadcrumbItem.svelte +1 -1
- package/dist/breadcrumb/BreadcrumbItem.svelte.d.ts +1 -1
- package/dist/button-group/ButtonGroup.svelte +1 -1
- package/dist/button-group/ButtonGroup.svelte.d.ts +1 -1
- package/dist/button-group/theme.js +3 -3
- package/dist/buttons/Button.svelte +1 -1
- package/dist/buttons/Button.svelte.d.ts +1 -1
- package/dist/buttons/GradientButton.svelte +1 -1
- package/dist/buttons/GradientButton.svelte.d.ts +1 -1
- package/dist/card/Card.svelte +15 -4
- package/dist/card/Card.svelte.d.ts +1 -1
- package/dist/card/theme.d.ts +9 -0
- package/dist/card/theme.js +3 -2
- package/dist/dialog/Dialog.svelte +15 -35
- package/dist/dialog/Dialog.svelte.d.ts +0 -1
- package/dist/drawer/Drawer.svelte +1 -1
- package/dist/drawer/Drawer.svelte.d.ts +1 -1
- package/dist/drawer/DrawerHandle.svelte +1 -1
- package/dist/drawer/DrawerHandle.svelte.d.ts +1 -1
- package/dist/drawer/Drawerhead.svelte +1 -1
- package/dist/drawer/Drawerhead.svelte.d.ts +1 -1
- package/dist/dropdown/Dropdown.svelte +3 -2
- package/dist/dropdown/Dropdown.svelte.d.ts +2 -1
- package/dist/dropdown/DropdownDivider.svelte +1 -1
- package/dist/dropdown/DropdownDivider.svelte.d.ts +1 -1
- package/dist/dropdown/DropdownGroup.svelte +1 -1
- package/dist/dropdown/DropdownGroup.svelte.d.ts +1 -1
- package/dist/dropdown/DropdownHeader.svelte +1 -1
- package/dist/dropdown/DropdownHeader.svelte.d.ts +1 -1
- package/dist/dropdown/DropdownItem.svelte +1 -1
- package/dist/dropdown/DropdownItem.svelte.d.ts +1 -1
- package/dist/footer/Footer.svelte +1 -1
- package/dist/footer/Footer.svelte.d.ts +1 -1
- package/dist/footer/FooterBrand.svelte +1 -1
- package/dist/footer/FooterBrand.svelte.d.ts +1 -1
- package/dist/footer/FooterCopyright.svelte +1 -1
- package/dist/footer/FooterCopyright.svelte.d.ts +1 -1
- package/dist/footer/FooterIcon.svelte +1 -1
- package/dist/footer/FooterIcon.svelte.d.ts +1 -1
- package/dist/footer/FooterLink.svelte +1 -1
- package/dist/footer/FooterLink.svelte.d.ts +1 -1
- package/dist/footer/FooterLinkGroup.svelte +1 -1
- package/dist/footer/FooterLinkGroup.svelte.d.ts +1 -1
- package/dist/forms/button-toggle/ButtonToggle.svelte +1 -1
- package/dist/forms/button-toggle/ButtonToggle.svelte.d.ts +1 -1
- package/dist/forms/button-toggle/CheckIcon.svelte +1 -1
- package/dist/forms/button-toggle/CheckIcon.svelte.d.ts +1 -1
- package/dist/forms/checkbox/CheckboxButton.svelte +1 -1
- package/dist/forms/checkbox/CheckboxButton.svelte.d.ts +1 -1
- package/dist/forms/dropzone/Dropzone.svelte +1 -1
- package/dist/forms/dropzone/Dropzone.svelte.d.ts +1 -1
- package/dist/forms/fileupload/Fileupload.svelte +1 -1
- package/dist/forms/fileupload/Fileupload.svelte.d.ts +1 -1
- package/dist/forms/floating-label/FloatingLabelInput.svelte +3 -2
- package/dist/forms/floating-label/FloatingLabelInput.svelte.d.ts +2 -1
- package/dist/forms/timepicker/theme.js +1 -1
- package/dist/types.d.ts +5 -4
- package/dist/utils/Arrow.svelte +1 -1
- package/dist/utils/Arrow.svelte.d.ts +1 -1
- package/dist/utils/Popper.svelte +6 -1
- package/dist/utils/Popper.svelte.d.ts +1 -0
- package/package.json +12 -13
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import { getTheme, warnThemeDeprecation } from "../theme/themeUtils";
|
|
8
8
|
import { createDismissableContext } from "../utils/dismissable";
|
|
9
9
|
|
|
10
|
-
let { children, header, open = $bindable(true), dismissable = true, color = "gray", type, class: className, classes, innerClass, transition = fade, params, closeClass, ...restProps }: BannerProps = $props();
|
|
10
|
+
let { children, header, open = $bindable(true), dismissable = true, color = "gray", type, class: className, classes, innerClass, transition = fade, params, closeClass, onclose, ...restProps }: BannerProps = $props();
|
|
11
11
|
|
|
12
12
|
warnThemeDeprecation("Banner", { innerClass, closeClass }, { innerClass: "insideDiv", closeClass: "dismissable" });
|
|
13
13
|
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
function close(event: MouseEvent) {
|
|
23
23
|
if (ref?.dispatchEvent(new Event("close", { bubbles: true, cancelable: true }))) {
|
|
24
24
|
open = false;
|
|
25
|
+
onclose?.(event);
|
|
25
26
|
}
|
|
26
27
|
}
|
|
27
28
|
createDismissableContext(close);
|
|
@@ -59,5 +60,6 @@
|
|
|
59
60
|
@prop transition = fade
|
|
60
61
|
@prop params
|
|
61
62
|
@prop closeClass
|
|
63
|
+
@prop onclose
|
|
62
64
|
@prop ...restProps
|
|
63
65
|
-->
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
@component
|
|
43
43
|
[Go to docs](https://flowbite-svelte.com/)
|
|
44
44
|
## Type
|
|
45
|
-
[BottomNavProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
45
|
+
[BottomNavProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L247)
|
|
46
46
|
## Props
|
|
47
47
|
@prop children
|
|
48
48
|
@prop header
|
|
@@ -2,7 +2,7 @@ import { type BottomNavProps } from "..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [BottomNavProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [BottomNavProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L247)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop header
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
@component
|
|
27
27
|
[Go to docs](https://flowbite-svelte.com/)
|
|
28
28
|
## Type
|
|
29
|
-
[BottomNavHeaderProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
29
|
+
[BottomNavHeaderProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L266)
|
|
30
30
|
## Props
|
|
31
31
|
@prop children
|
|
32
32
|
@prop class: className
|
|
@@ -2,7 +2,7 @@ import type { BottomNavHeaderProps } from "..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [BottomNavHeaderProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [BottomNavHeaderProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L266)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop class: className
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
@component
|
|
21
21
|
[Go to docs](https://flowbite-svelte.com/)
|
|
22
22
|
## Type
|
|
23
|
-
[BottomNavHeaderItemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
23
|
+
[BottomNavHeaderItemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L272)
|
|
24
24
|
## Props
|
|
25
25
|
@prop itemName
|
|
26
26
|
@prop active
|
|
@@ -2,7 +2,7 @@ import type { BottomNavHeaderItemProps } from "..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [BottomNavHeaderItemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [BottomNavHeaderItemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L272)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop itemName
|
|
8
8
|
* @prop active
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
@component
|
|
68
68
|
[Go to docs](https://flowbite-svelte.com/)
|
|
69
69
|
## Type
|
|
70
|
-
[BottomNavItemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
70
|
+
[BottomNavItemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L256)
|
|
71
71
|
## Props
|
|
72
72
|
@prop children
|
|
73
73
|
@prop btnName
|
|
@@ -2,7 +2,7 @@ import type { BottomNavItemProps } from "..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [BottomNavItemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [BottomNavItemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L256)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop btnName
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
@component
|
|
27
27
|
[Go to docs](https://flowbite-svelte.com/)
|
|
28
28
|
## Type
|
|
29
|
-
[BreadcrumbProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
29
|
+
[BreadcrumbProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L278)
|
|
30
30
|
## Props
|
|
31
31
|
@prop children
|
|
32
32
|
@prop solid = false
|
|
@@ -2,7 +2,7 @@ import type { BreadcrumbProps } from "..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [BreadcrumbProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [BreadcrumbProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L278)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop solid = false
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
@component
|
|
57
57
|
[Go to docs](https://flowbite-svelte.com/)
|
|
58
58
|
## Type
|
|
59
|
-
[BreadcrumbItemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
59
|
+
[BreadcrumbItemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L285)
|
|
60
60
|
## Props
|
|
61
61
|
@prop children
|
|
62
62
|
@prop icon
|
|
@@ -2,7 +2,7 @@ import type { BreadcrumbItemProps } from "..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [BreadcrumbItemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [BreadcrumbItemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L285)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop icon
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
@component
|
|
23
23
|
[Go to docs](https://flowbite-svelte.com/)
|
|
24
24
|
## Type
|
|
25
|
-
[ButtonGroupProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
25
|
+
[ButtonGroupProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L296)
|
|
26
26
|
## Props
|
|
27
27
|
@prop children
|
|
28
28
|
@prop size = "md"
|
|
@@ -2,7 +2,7 @@ import type { ButtonGroupProps } from "..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [ButtonGroupProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [ButtonGroupProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L296)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop size = "md"
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
@component
|
|
45
45
|
[Go to docs](https://flowbite-svelte.com/)
|
|
46
46
|
## Type
|
|
47
|
-
[ButtonProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
47
|
+
[ButtonProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L306)
|
|
48
48
|
## Props
|
|
49
49
|
@prop children
|
|
50
50
|
@prop pill
|
|
@@ -2,7 +2,7 @@ import type { ButtonProps } from "..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [ButtonProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [ButtonProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L306)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop pill
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
@component
|
|
32
32
|
[Go to docs](https://flowbite-svelte.com/)
|
|
33
33
|
## Type
|
|
34
|
-
[GradientButtonProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
34
|
+
[GradientButtonProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L315)
|
|
35
35
|
## Props
|
|
36
36
|
@prop children
|
|
37
37
|
@prop outline
|
|
@@ -2,7 +2,7 @@ import type { GradientButtonProps } from "..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [GradientButtonProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [GradientButtonProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L315)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop outline
|
package/dist/card/Card.svelte
CHANGED
|
@@ -26,10 +26,21 @@
|
|
|
26
26
|
|
|
27
27
|
{#snippet childSlot()}
|
|
28
28
|
{#if img}
|
|
29
|
-
<img
|
|
30
|
-
|
|
29
|
+
<img
|
|
30
|
+
class={image({ class: clsx(theme?.image, styling.image) })}
|
|
31
|
+
src={img}
|
|
32
|
+
alt=""
|
|
33
|
+
loading="lazy"
|
|
34
|
+
onerror={(e) => {
|
|
35
|
+
const target = e.currentTarget as HTMLImageElement;
|
|
36
|
+
if (target) {
|
|
37
|
+
target.style.display = "none";
|
|
38
|
+
}
|
|
39
|
+
}}
|
|
40
|
+
/>
|
|
41
|
+
{@render children?.()}
|
|
31
42
|
{:else}
|
|
32
|
-
{@render children()}
|
|
43
|
+
{@render children?.()}
|
|
33
44
|
{/if}
|
|
34
45
|
{/snippet}
|
|
35
46
|
|
|
@@ -47,7 +58,7 @@
|
|
|
47
58
|
@component
|
|
48
59
|
[Go to docs](https://flowbite-svelte.com/)
|
|
49
60
|
## Type
|
|
50
|
-
[CardProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
61
|
+
[CardProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L356)
|
|
51
62
|
## Props
|
|
52
63
|
@prop children
|
|
53
64
|
@prop color = "gray"
|
|
@@ -2,7 +2,7 @@ import type { CardProps } from "..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [CardProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [CardProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L356)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop color = "gray"
|
package/dist/card/theme.d.ts
CHANGED
|
@@ -82,6 +82,9 @@ export declare const card: import("tailwind-variants").TVReturnType<{
|
|
|
82
82
|
};
|
|
83
83
|
};
|
|
84
84
|
shadow: {
|
|
85
|
+
xs: {
|
|
86
|
+
base: string;
|
|
87
|
+
};
|
|
85
88
|
sm: {
|
|
86
89
|
base: string;
|
|
87
90
|
};
|
|
@@ -212,6 +215,9 @@ export declare const card: import("tailwind-variants").TVReturnType<{
|
|
|
212
215
|
};
|
|
213
216
|
};
|
|
214
217
|
shadow: {
|
|
218
|
+
xs: {
|
|
219
|
+
base: string;
|
|
220
|
+
};
|
|
215
221
|
sm: {
|
|
216
222
|
base: string;
|
|
217
223
|
};
|
|
@@ -342,6 +348,9 @@ export declare const card: import("tailwind-variants").TVReturnType<{
|
|
|
342
348
|
};
|
|
343
349
|
};
|
|
344
350
|
shadow: {
|
|
351
|
+
xs: {
|
|
352
|
+
base: string;
|
|
353
|
+
};
|
|
345
354
|
sm: {
|
|
346
355
|
base: string;
|
|
347
356
|
};
|
package/dist/card/theme.js
CHANGED
|
@@ -36,8 +36,9 @@ export const card = tv({
|
|
|
36
36
|
rose: { base: "border-rose-200 bg-rose-400 dark:bg-rose-800 dark:border-rose-700" }
|
|
37
37
|
},
|
|
38
38
|
shadow: {
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
xs: { base: "shadow-xs" },
|
|
40
|
+
sm: { base: "shadow-sm" },
|
|
41
|
+
normal: { base: "shadow" },
|
|
41
42
|
md: { base: "shadow-md" },
|
|
42
43
|
lg: { base: "shadow-lg" },
|
|
43
44
|
xl: { base: "shadow-xl" },
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { onDestroy } from "svelte";
|
|
3
2
|
import type { DialogProps, ParamsType } from "..";
|
|
4
3
|
import { trapFocus } from "../utils/actions";
|
|
5
|
-
import { dialog } from "./theme";
|
|
6
4
|
import CloseButton from "../utils/CloseButton.svelte";
|
|
7
5
|
import { createDismissableContext } from "../utils/dismissable";
|
|
8
6
|
import clsx from "clsx";
|
|
9
7
|
import { sineIn } from "svelte/easing";
|
|
10
8
|
import { fade } from "svelte/transition";
|
|
9
|
+
import { dialog } from "./theme";
|
|
11
10
|
|
|
12
|
-
let { children, onaction = () => true, oncancel, onsubmit, ontoggle, form = false, modal = true, autoclose = false, focustrap = false, open = $bindable(false), permanent = false, dismissable = true, outsideclose = true, class: className, classes, transition = fade, transitionParams,
|
|
11
|
+
let { children, onaction = () => true, oncancel, onsubmit, ontoggle, form = false, modal = true, autoclose = false, focustrap = false, open = $bindable(false), permanent = false, dismissable = true, outsideclose = true, class: className, classes, transition = fade, transitionParams, ...restProps }: DialogProps = $props();
|
|
13
12
|
|
|
14
13
|
const paramsOptions = $derived(transitionParams ?? { duration: 100, easing: sineIn });
|
|
15
14
|
|
|
@@ -56,25 +55,32 @@
|
|
|
56
55
|
}
|
|
57
56
|
|
|
58
57
|
function _onsubmit(ev: SubmitEvent & { currentTarget: HTMLDialogElement }) {
|
|
59
|
-
// When dialog contains the <form method="dialog"> and when child with type="submit" was pressed
|
|
60
|
-
|
|
61
58
|
onsubmit?.(ev);
|
|
62
59
|
if (ev.defaultPrevented) return;
|
|
63
60
|
|
|
61
|
+
// When dialog contains the <form method="dialog"> and when child with type="submit" was pressed
|
|
62
|
+
if (!(ev.target instanceof HTMLFormElement) || ev.target.method !== "dialog") {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
|
|
64
66
|
ev.preventDefault(); // stop dialog.close()
|
|
65
67
|
|
|
66
68
|
const dlg: HTMLDialogElement = ev.currentTarget;
|
|
67
69
|
|
|
68
|
-
if (ev.submitter
|
|
69
|
-
|
|
70
|
+
if (ev.submitter && "value" in ev.submitter) {
|
|
71
|
+
// this is done by the system but after the submit event
|
|
72
|
+
dlg.returnValue = String(ev.submitter.value ?? "");
|
|
70
73
|
}
|
|
71
74
|
|
|
72
75
|
if (!dlg.returnValue) {
|
|
73
76
|
return cancel(dlg); // if no action - treat that as cancel
|
|
74
77
|
}
|
|
75
78
|
|
|
76
|
-
|
|
77
|
-
|
|
79
|
+
if (typeof onaction === "function") {
|
|
80
|
+
const result = onaction({ action: dlg.returnValue, data: new FormData(ev.target) });
|
|
81
|
+
// explicit false from onaction blocks the form closing
|
|
82
|
+
if (result === false) return;
|
|
83
|
+
}
|
|
78
84
|
|
|
79
85
|
close(dlg);
|
|
80
86
|
}
|
|
@@ -116,31 +122,6 @@
|
|
|
116
122
|
}
|
|
117
123
|
|
|
118
124
|
createDismissableContext(close_handler);
|
|
119
|
-
|
|
120
|
-
let escHandler: ((e: KeyboardEvent) => void) | null = null;
|
|
121
|
-
|
|
122
|
-
$effect(() => {
|
|
123
|
-
if (escHandler) {
|
|
124
|
-
window.removeEventListener("keydown", escHandler);
|
|
125
|
-
escHandler = null;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
if (open && typeof count === "number" && count > 0) {
|
|
129
|
-
escHandler = (e: KeyboardEvent) => {
|
|
130
|
-
if (e.key === "Escape") {
|
|
131
|
-
e.preventDefault();
|
|
132
|
-
e.stopPropagation();
|
|
133
|
-
}
|
|
134
|
-
};
|
|
135
|
-
window.addEventListener("keydown", escHandler);
|
|
136
|
-
}
|
|
137
|
-
});
|
|
138
|
-
|
|
139
|
-
onDestroy(() => {
|
|
140
|
-
if (escHandler) {
|
|
141
|
-
window.removeEventListener("keydown", escHandler);
|
|
142
|
-
}
|
|
143
|
-
});
|
|
144
125
|
</script>
|
|
145
126
|
|
|
146
127
|
{#snippet content()}
|
|
@@ -185,6 +166,5 @@
|
|
|
185
166
|
@prop classes
|
|
186
167
|
@prop transition = fade
|
|
187
168
|
@prop transitionParams
|
|
188
|
-
@prop count
|
|
189
169
|
@prop ...restProps
|
|
190
170
|
-->
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
@component
|
|
109
109
|
[Go to docs](https://flowbite-svelte.com/)
|
|
110
110
|
## Type
|
|
111
|
-
[DrawerProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
111
|
+
[DrawerProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L580)
|
|
112
112
|
## Props
|
|
113
113
|
@prop children
|
|
114
114
|
@prop open = $bindable(false)
|
|
@@ -2,7 +2,7 @@ import type { DrawerProps } from "..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [DrawerProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [DrawerProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L580)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop open = $bindable(false)
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
@component
|
|
23
23
|
[Go to docs](https://flowbite-svelte.com/)
|
|
24
24
|
## Type
|
|
25
|
-
[DrawerHandleProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
25
|
+
[DrawerHandleProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L588)
|
|
26
26
|
## Props
|
|
27
27
|
@prop children
|
|
28
28
|
@prop placement
|
|
@@ -2,7 +2,7 @@ import type { DrawerHandleProps } from "..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [DrawerHandleProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [DrawerHandleProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L588)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop placement
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
@component
|
|
35
35
|
[Go to docs](https://flowbite-svelte.com/)
|
|
36
36
|
## Type
|
|
37
|
-
[DrawerheadProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
37
|
+
[DrawerheadProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L590)
|
|
38
38
|
## Props
|
|
39
39
|
@prop closeIcon
|
|
40
40
|
@prop children
|
|
@@ -2,7 +2,7 @@ import type { DrawerheadProps } from "..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [DrawerheadProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [DrawerheadProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L590)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop closeIcon
|
|
8
8
|
* @prop children
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import { setContext } from "svelte";
|
|
8
8
|
import { dropdown } from "./theme";
|
|
9
9
|
|
|
10
|
-
let { children, simple = false, placement = "bottom", offset = 2, class: className, activeUrl = "", isOpen = $bindable(false), ...restProps }: DropdownProps = $props();
|
|
10
|
+
let { children, simple = false, placement = "bottom", offset = 2, class: className, activeUrl = "", isOpen = $bindable(false), onclose, ...restProps }: DropdownProps = $props();
|
|
11
11
|
|
|
12
12
|
const theme = getTheme("dropdown");
|
|
13
13
|
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
@component
|
|
37
37
|
[Go to docs](https://flowbite-svelte.com/)
|
|
38
38
|
## Type
|
|
39
|
-
[DropdownProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
39
|
+
[DropdownProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L597)
|
|
40
40
|
## Props
|
|
41
41
|
@prop children
|
|
42
42
|
@prop simple = false
|
|
@@ -45,5 +45,6 @@
|
|
|
45
45
|
@prop class: className
|
|
46
46
|
@prop activeUrl = ""
|
|
47
47
|
@prop isOpen = $bindable(false)
|
|
48
|
+
@prop onclose
|
|
48
49
|
@prop ...restProps
|
|
49
50
|
-->
|
|
@@ -2,7 +2,7 @@ import type { DropdownProps } from "..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [DropdownProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [DropdownProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L597)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop simple = false
|
|
@@ -11,6 +11,7 @@ import type { DropdownProps } from "..";
|
|
|
11
11
|
* @prop class: className
|
|
12
12
|
* @prop activeUrl = ""
|
|
13
13
|
* @prop isOpen = $bindable(false)
|
|
14
|
+
* @prop onclose
|
|
14
15
|
* @prop ...restProps
|
|
15
16
|
*/
|
|
16
17
|
declare const Dropdown: import("svelte").Component<DropdownProps, {}, "isOpen">;
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
@component
|
|
16
16
|
[Go to docs](https://flowbite-svelte.com/)
|
|
17
17
|
## Type
|
|
18
|
-
[DropdownDividerProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
18
|
+
[DropdownDividerProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L603)
|
|
19
19
|
## Props
|
|
20
20
|
@prop class: className
|
|
21
21
|
@prop ...restProps
|
|
@@ -2,7 +2,7 @@ import type { DropdownDividerProps } from "..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [DropdownDividerProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [DropdownDividerProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L603)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop class: className
|
|
8
8
|
* @prop ...restProps
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
@component
|
|
18
18
|
[Go to docs](https://flowbite-svelte.com/)
|
|
19
19
|
## Type
|
|
20
|
-
[DropdownGroupProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
20
|
+
[DropdownGroupProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L619)
|
|
21
21
|
## Props
|
|
22
22
|
@prop children
|
|
23
23
|
@prop class: className
|
|
@@ -2,7 +2,7 @@ import type { DropdownGroupProps } from "..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [DropdownGroupProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [DropdownGroupProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L619)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop class: className
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
@component
|
|
18
18
|
[Go to docs](https://flowbite-svelte.com/)
|
|
19
19
|
## Type
|
|
20
|
-
[DropdownHeaderProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
20
|
+
[DropdownHeaderProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L605)
|
|
21
21
|
## Props
|
|
22
22
|
@prop children
|
|
23
23
|
@prop class: className
|
|
@@ -2,7 +2,7 @@ import type { DropdownHeaderProps } from "..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [DropdownHeaderProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [DropdownHeaderProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L605)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop class: className
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
@component
|
|
41
41
|
[Go to docs](https://flowbite-svelte.com/)
|
|
42
42
|
## Type
|
|
43
|
-
[DropdownItemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
43
|
+
[DropdownItemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L611)
|
|
44
44
|
## Props
|
|
45
45
|
@prop aClass
|
|
46
46
|
@prop children
|
|
@@ -2,7 +2,7 @@ import type { DropdownItemProps } from "..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [DropdownItemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [DropdownItemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L611)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop aClass
|
|
8
8
|
* @prop children
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
@component
|
|
20
20
|
[Go to docs](https://flowbite-svelte.com/)
|
|
21
21
|
## Type
|
|
22
|
-
[FooterProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
22
|
+
[FooterProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L626)
|
|
23
23
|
## Props
|
|
24
24
|
@prop children
|
|
25
25
|
@prop footerType = "default"
|
|
@@ -2,7 +2,7 @@ import type { FooterProps } from "..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [FooterProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [FooterProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L626)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop footerType = "default"
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
@component
|
|
32
32
|
[Go to docs](https://flowbite-svelte.com/)
|
|
33
33
|
## Type
|
|
34
|
-
[FooterBrandProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
34
|
+
[FooterBrandProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L631)
|
|
35
35
|
## Props
|
|
36
36
|
@prop children
|
|
37
37
|
@prop aClass
|
|
@@ -2,7 +2,7 @@ import type { FooterBrandProps } from "..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [FooterBrandProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [FooterBrandProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L631)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop aClass
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
@component
|
|
34
34
|
[Go to docs](https://flowbite-svelte.com/)
|
|
35
35
|
## Type
|
|
36
|
-
[FooterCopyrightProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
36
|
+
[FooterCopyrightProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L642)
|
|
37
37
|
## Props
|
|
38
38
|
@prop spanClass
|
|
39
39
|
@prop aClass
|
|
@@ -2,7 +2,7 @@ import type { FooterCopyrightProps } from "..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [FooterCopyrightProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [FooterCopyrightProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L642)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop spanClass
|
|
8
8
|
* @prop aClass
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
@component
|
|
22
22
|
[Go to docs](https://flowbite-svelte.com/)
|
|
23
23
|
## Type
|
|
24
|
-
[FooterIconProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
24
|
+
[FooterIconProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L652)
|
|
25
25
|
## Props
|
|
26
26
|
@prop children
|
|
27
27
|
@prop href
|
|
@@ -2,7 +2,7 @@ import type { FooterIconProps } from "..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [FooterIconProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [FooterIconProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L652)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop href
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
@component
|
|
26
26
|
[Go to docs](https://flowbite-svelte.com/)
|
|
27
27
|
## Type
|
|
28
|
-
[FooterLinkProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
28
|
+
[FooterLinkProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L662)
|
|
29
29
|
## Props
|
|
30
30
|
@prop children
|
|
31
31
|
@prop liClass
|
|
@@ -2,7 +2,7 @@ import type { FooterLinkProps } from "..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [FooterLinkProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [FooterLinkProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L662)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop liClass
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
@component
|
|
18
18
|
[Go to docs](https://flowbite-svelte.com/)
|
|
19
19
|
## Type
|
|
20
|
-
[FooterLinkGroupProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
20
|
+
[FooterLinkGroupProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L658)
|
|
21
21
|
## Props
|
|
22
22
|
@prop class: className
|
|
23
23
|
@prop children
|
|
@@ -2,7 +2,7 @@ import type { FooterLinkGroupProps } from "..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [FooterLinkGroupProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [FooterLinkGroupProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L658)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop class: className
|
|
8
8
|
* @prop children
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
@component
|
|
55
55
|
[Go to docs](https://flowbite-svelte.com/)
|
|
56
56
|
## Type
|
|
57
|
-
[ButtonToggleProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
57
|
+
[ButtonToggleProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L336)
|
|
58
58
|
## Props
|
|
59
59
|
@prop value
|
|
60
60
|
@prop selected = false
|
|
@@ -2,7 +2,7 @@ import type { ButtonToggleProps } from "../..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [ButtonToggleProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [ButtonToggleProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L336)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop value
|
|
8
8
|
* @prop selected = false
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
@component
|
|
13
13
|
[Go to docs](https://flowbite-svelte.com/)
|
|
14
14
|
## Type
|
|
15
|
-
[CheckIconProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
15
|
+
[CheckIconProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L353)
|
|
16
16
|
## Props
|
|
17
17
|
@prop class: className
|
|
18
18
|
@prop ...restProps
|
|
@@ -2,7 +2,7 @@ import type { CheckIconProps } from "../..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [CheckIconProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [CheckIconProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L353)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop class: className
|
|
8
8
|
* @prop ...restProps
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
@component
|
|
23
23
|
[Go to docs](https://flowbite-svelte.com/)
|
|
24
24
|
## Type
|
|
25
|
-
[CheckboxButtonProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
25
|
+
[CheckboxButtonProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L690)
|
|
26
26
|
## Props
|
|
27
27
|
@prop children
|
|
28
28
|
@prop class: className
|
|
@@ -2,7 +2,7 @@ import type { CheckboxButtonProps } from "../..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [CheckboxButtonProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [CheckboxButtonProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L690)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop class: className
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
@component
|
|
53
53
|
[Go to docs](https://flowbite-svelte.com/)
|
|
54
54
|
## Type
|
|
55
|
-
[DropzoneProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
55
|
+
[DropzoneProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L700)
|
|
56
56
|
## Props
|
|
57
57
|
@prop children
|
|
58
58
|
@prop files = $bindable<FileList | null>()
|
|
@@ -2,7 +2,7 @@ import type { DropzoneProps } from "../..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [DropzoneProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [DropzoneProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L700)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop files = $bindable<FileList | null>()
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
@component
|
|
38
38
|
[Go to docs](https://flowbite-svelte.com/)
|
|
39
39
|
## Type
|
|
40
|
-
[FileuploadProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
40
|
+
[FileuploadProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L709)
|
|
41
41
|
## Props
|
|
42
42
|
@prop files = $bindable()
|
|
43
43
|
@prop size = "md"
|
|
@@ -2,7 +2,7 @@ import type { FileuploadProps } from "../..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [FileuploadProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [FileuploadProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L709)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop files = $bindable()
|
|
8
8
|
* @prop size = "md"
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import { getTheme, warnThemeDeprecation } from "../../theme/themeUtils";
|
|
8
8
|
import { createDismissableContext } from "../../utils/dismissable";
|
|
9
9
|
|
|
10
|
-
let { children, id = idGenerator(), value = $bindable(), elementRef = $bindable(), variant = "standard", size = "default", color = "default", class: className, classes, inputClass, labelClass, clearable, clearableSvgClass, clearableColor = "none", clearableClass, clearableOnClick, data = [], maxSuggestions = 5, onSelect, comboClass, ...restProps }: FloatingLabelInputProps = $props();
|
|
10
|
+
let { children, id = idGenerator(), value = $bindable(), elementRef = $bindable(), variant = "standard", size = "default", color = "default", class: className, classes, inputClass, labelClass, clearable, clearableSvgClass, clearableColor = "none", clearableClass, clearableOnClick, data = [], maxSuggestions = 5, onSelect, comboClass, placeholder, ...restProps }: FloatingLabelInputProps = $props();
|
|
11
11
|
|
|
12
12
|
warnThemeDeprecation("FloatingLabelInput", { inputClass, labelClass, clearableSvgClass, clearableClass, comboClass }, { inputClass: "input", labelClass: "label", clearableSvgClass: "svg", clearableClass: "close", comboClass: "combo" });
|
|
13
13
|
const styling = $derived(classes ?? { input: inputClass, label: labelClass, svg: clearableSvgClass, close: clearableClass, combo: comboClass });
|
|
@@ -168,7 +168,7 @@
|
|
|
168
168
|
@component
|
|
169
169
|
[Go to docs](https://flowbite-svelte.com/)
|
|
170
170
|
## Type
|
|
171
|
-
[FloatingLabelInputProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
171
|
+
[FloatingLabelInputProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L723)
|
|
172
172
|
## Props
|
|
173
173
|
@prop children
|
|
174
174
|
@prop id = idGenerator()
|
|
@@ -190,5 +190,6 @@
|
|
|
190
190
|
@prop maxSuggestions = 5
|
|
191
191
|
@prop onSelect
|
|
192
192
|
@prop comboClass
|
|
193
|
+
@prop placeholder
|
|
193
194
|
@prop ...restProps
|
|
194
195
|
-->
|
|
@@ -2,7 +2,7 @@ import type { FloatingLabelInputProps } from "../..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [FloatingLabelInputProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [FloatingLabelInputProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L723)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop id = idGenerator()
|
|
@@ -24,6 +24,7 @@ import type { FloatingLabelInputProps } from "../..";
|
|
|
24
24
|
* @prop maxSuggestions = 5
|
|
25
25
|
* @prop onSelect
|
|
26
26
|
* @prop comboClass
|
|
27
|
+
* @prop placeholder
|
|
27
28
|
* @prop ...restProps
|
|
28
29
|
*/
|
|
29
30
|
declare const FloatingLabelInput: import("svelte").Component<FloatingLabelInputProps, {}, "value" | "elementRef">;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { tv } from "tailwind-variants";
|
|
2
2
|
export const timepicker = tv({
|
|
3
3
|
slots: {
|
|
4
|
-
buttonGroup: "inline-flex rounded-lg shadow-sm",
|
|
4
|
+
buttonGroup: "inline-flex rounded-lg shadow-sm relative",
|
|
5
5
|
input: "block disabled:cursor-not-allowed disabled:opacity-50 rtl:text-right focus:ring-0 focus:outline-none",
|
|
6
6
|
inputWithIcon: "relative px-2 pr-8",
|
|
7
7
|
iconWrapper: "pointer-events-none absolute inset-y-0 end-0 top-0 flex items-center pe-3.5",
|
package/dist/types.d.ts
CHANGED
|
@@ -195,7 +195,7 @@ export interface BadgeProps extends BadgeVariants, Omit<HTMLAttributes<HTMLDivEl
|
|
|
195
195
|
params?: ParamsType;
|
|
196
196
|
aClass?: ClassValue;
|
|
197
197
|
}
|
|
198
|
-
export interface BannerProps extends BannerVariants, Omit<HTMLAttributes<HTMLDivElement>, "color"> {
|
|
198
|
+
export interface BannerProps extends BannerVariants, Omit<HTMLAttributes<HTMLDivElement>, "color" | "onclose"> {
|
|
199
199
|
header?: Snippet;
|
|
200
200
|
open?: boolean;
|
|
201
201
|
dismissable?: boolean;
|
|
@@ -203,6 +203,7 @@ export interface BannerProps extends BannerVariants, Omit<HTMLAttributes<HTMLDiv
|
|
|
203
203
|
transition?: TransitionFunc;
|
|
204
204
|
params?: object;
|
|
205
205
|
closeClass?: ClassValue;
|
|
206
|
+
onclose?: (ev: MouseEvent) => void;
|
|
206
207
|
}
|
|
207
208
|
export type BottomNavContextType = {
|
|
208
209
|
activeClass?: string | null;
|
|
@@ -296,7 +297,6 @@ export interface ButtonToggleContext {
|
|
|
296
297
|
}
|
|
297
298
|
export type CheckIconProps = SVGAttributes<SVGSVGElement>;
|
|
298
299
|
export type CardProps = Omit<CardVariants, "href"> & AnchorDivAttributes & {
|
|
299
|
-
children: Snippet;
|
|
300
300
|
img?: string;
|
|
301
301
|
imgClass?: ClassValue;
|
|
302
302
|
contentClass?: string;
|
|
@@ -501,7 +501,6 @@ export interface DialogProps extends DialogVariants, HTMLDialogAttributes {
|
|
|
501
501
|
outsideclose?: boolean;
|
|
502
502
|
transition?: TransitionFunc;
|
|
503
503
|
transitionParams?: ParamsType;
|
|
504
|
-
count?: number;
|
|
505
504
|
}
|
|
506
505
|
export interface DrawerProps extends DrawerVariants, Omit<DialogProps, "hidden" | "classes" | "shifted"> {
|
|
507
506
|
/** @deprecated Use `outsideclose` instead. Will be removed in next minor version. */
|
|
@@ -640,6 +639,7 @@ export interface FloatingLabelInputProps extends FloatingLabelInputVaratiants, O
|
|
|
640
639
|
maxSuggestions?: number;
|
|
641
640
|
onSelect?: (item: string) => void;
|
|
642
641
|
comboClass?: ClassValue;
|
|
642
|
+
placeholder?: string;
|
|
643
643
|
}
|
|
644
644
|
export interface HelperProps extends HelperVariants, Omit<HTMLAttributes<HTMLParagraphElement>, "color"> {
|
|
645
645
|
}
|
|
@@ -1727,7 +1727,7 @@ export interface VideoProps extends HTMLVideoAttributes {
|
|
|
1727
1727
|
export interface TriggeredToggleEvent extends ToggleEvent {
|
|
1728
1728
|
trigger: HTMLElement;
|
|
1729
1729
|
}
|
|
1730
|
-
export interface PopperProps extends Omit<HTMLAttributes<HTMLDivElement>, "onbeforetoggle" | "ontoggle"> {
|
|
1730
|
+
export interface PopperProps extends Omit<HTMLAttributes<HTMLDivElement>, "onbeforetoggle" | "ontoggle" | "onclose"> {
|
|
1731
1731
|
triggeredBy?: string;
|
|
1732
1732
|
triggerDelay?: number;
|
|
1733
1733
|
trigger?: "hover" | "click";
|
|
@@ -1742,6 +1742,7 @@ export interface PopperProps extends Omit<HTMLAttributes<HTMLDivElement>, "onbef
|
|
|
1742
1742
|
children: Snippet;
|
|
1743
1743
|
onbeforetoggle?: (ev: TriggeredToggleEvent) => void;
|
|
1744
1744
|
ontoggle?: (ev: TriggeredToggleEvent) => void;
|
|
1745
|
+
onclose?: (ev: TriggeredToggleEvent) => void;
|
|
1745
1746
|
transition?: TransitionFunc;
|
|
1746
1747
|
transitionParams?: ParamsType;
|
|
1747
1748
|
isOpen?: boolean;
|
package/dist/utils/Arrow.svelte
CHANGED
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
@component
|
|
51
51
|
[Go to docs](https://flowbite-svelte.com/)
|
|
52
52
|
## Type
|
|
53
|
-
[ArrowProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
53
|
+
[ArrowProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2041)
|
|
54
54
|
## Props
|
|
55
55
|
@prop placement = "top"
|
|
56
56
|
@prop cords
|
|
@@ -2,7 +2,7 @@ import type { ArrowProps } from "../types";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [ArrowProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [ArrowProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2041)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop placement = "top"
|
|
8
8
|
* @prop cords
|
package/dist/utils/Popper.svelte
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import { sineIn } from "svelte/easing";
|
|
8
8
|
import clsx from "clsx";
|
|
9
9
|
|
|
10
|
-
let { triggeredBy, triggerDelay = 200, trigger = "click", placement = "top", offset = 8, arrow = false, yOnly = false, strategy = "absolute", reference, middlewares = [dom.flip(), dom.shift()], onbeforetoggle: _onbeforetoggle, ontoggle: _ontoggle, class: className = "", arrowClass = "", isOpen = $bindable(false), transitionParams, transition = fade, children, ...restProps }: PopperProps = $props();
|
|
10
|
+
let { triggeredBy, triggerDelay = 200, trigger = "click", placement = "top", offset = 8, arrow = false, yOnly = false, strategy = "absolute", reference, middlewares = [dom.flip(), dom.shift()], onbeforetoggle: _onbeforetoggle, ontoggle: _ontoggle, onclose: _onclose, class: className = "", arrowClass = "", isOpen = $bindable(false), transitionParams, transition = fade, children, ...restProps }: PopperProps = $props();
|
|
11
11
|
|
|
12
12
|
let focusable: boolean = true;
|
|
13
13
|
let clickable: boolean = $derived(trigger === "click");
|
|
@@ -137,6 +137,10 @@
|
|
|
137
137
|
|
|
138
138
|
(ev as TriggeredToggleEvent).trigger = invoker;
|
|
139
139
|
_ontoggle?.(ev as TriggeredToggleEvent);
|
|
140
|
+
|
|
141
|
+
if (ev.newState === "closed") {
|
|
142
|
+
_onclose?.(ev as TriggeredToggleEvent);
|
|
143
|
+
}
|
|
140
144
|
}
|
|
141
145
|
|
|
142
146
|
function set_triggers(node: HTMLElement) {
|
|
@@ -227,6 +231,7 @@
|
|
|
227
231
|
@prop middlewares = [dom.flip(), dom.shift()]
|
|
228
232
|
@prop onbeforetoggle: _onbeforetoggle
|
|
229
233
|
@prop ontoggle: _ontoggle
|
|
234
|
+
@prop onclose: _onclose
|
|
230
235
|
@prop class: className = ""
|
|
231
236
|
@prop arrowClass = ""
|
|
232
237
|
@prop isOpen = $bindable(false)
|
|
@@ -16,6 +16,7 @@ import type { PopperProps } from "../types";
|
|
|
16
16
|
* @prop middlewares = [dom.flip(), dom.shift()]
|
|
17
17
|
* @prop onbeforetoggle: _onbeforetoggle
|
|
18
18
|
* @prop ontoggle: _ontoggle
|
|
19
|
+
* @prop onclose: _onclose
|
|
19
20
|
* @prop class: className = ""
|
|
20
21
|
* @prop arrowClass = ""
|
|
21
22
|
* @prop isOpen = $bindable(false)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flowbite-svelte",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.18.0",
|
|
4
4
|
"description": "Flowbite components for Svelte",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"author": {
|
|
@@ -13,19 +13,18 @@
|
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"devDependencies": {
|
|
15
15
|
"@changesets/cli": "^2.29.7",
|
|
16
|
-
"@docsearch/css": "^4.
|
|
17
|
-
"@docsearch/js": "^4.
|
|
16
|
+
"@docsearch/css": "^4.2.0",
|
|
17
|
+
"@docsearch/js": "^4.2.0",
|
|
18
18
|
"@eslint/compat": "^1.4.0",
|
|
19
19
|
"@eslint/js": "^9.37.0",
|
|
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.5",
|
|
23
|
-
"@playwright/test": "^1.
|
|
23
|
+
"@playwright/test": "^1.56.1",
|
|
24
24
|
"@resvg/resvg-js": "^2.6.2",
|
|
25
|
-
"@sveltejs/adapter-
|
|
26
|
-
"@sveltejs/adapter-vercel": "^5.10.3",
|
|
25
|
+
"@sveltejs/adapter-vercel": "^6.0.0",
|
|
27
26
|
"@sveltejs/enhanced-img": "0.8.3",
|
|
28
|
-
"@sveltejs/kit": "^2.
|
|
27
|
+
"@sveltejs/kit": "^2.47.1",
|
|
29
28
|
"@sveltejs/package": "^2.5.4",
|
|
30
29
|
"@sveltejs/vite-plugin-svelte": "^6.2.1",
|
|
31
30
|
"@svitejs/changesets-changelog-github-compact": "^1.2.0",
|
|
@@ -47,13 +46,13 @@
|
|
|
47
46
|
"globals": "^16.4.0",
|
|
48
47
|
"highlight.js": "^11.11.1",
|
|
49
48
|
"jsdom": "^27.0.0",
|
|
50
|
-
"katex": "^0.16.
|
|
49
|
+
"katex": "^0.16.25",
|
|
51
50
|
"lowlight": "^3.3.0",
|
|
52
51
|
"mdsvex": "^0.12.6",
|
|
53
52
|
"mdsvexamples": "^0.5.0",
|
|
54
53
|
"prettier": "^3.6.2",
|
|
55
54
|
"prettier-plugin-svelte": "^3.4.0",
|
|
56
|
-
"prettier-plugin-tailwindcss": "^0.
|
|
55
|
+
"prettier-plugin-tailwindcss": "^0.7.0",
|
|
57
56
|
"prism-themes": "^1.9.0",
|
|
58
57
|
"publint": "^0.3.14",
|
|
59
58
|
"runatics": "^0.1.4",
|
|
@@ -61,8 +60,8 @@
|
|
|
61
60
|
"satori": "^0.18.3",
|
|
62
61
|
"satori-html": "^0.3.2",
|
|
63
62
|
"super-sitemap": "^1.0.5",
|
|
64
|
-
"svelte": "^5.
|
|
65
|
-
"svelte-check": "^4.3.
|
|
63
|
+
"svelte": "^5.40.2",
|
|
64
|
+
"svelte-check": "^4.3.3",
|
|
66
65
|
"svelte-doc-llm": "^0.4.1",
|
|
67
66
|
"svelte-lib-helpers": "^0.4.31",
|
|
68
67
|
"svelte-meta-tags": "^4.4.1",
|
|
@@ -70,8 +69,8 @@
|
|
|
70
69
|
"tailwindcss": "^4.1.14",
|
|
71
70
|
"tsx": "^4.20.6",
|
|
72
71
|
"typescript": "^5.9.3",
|
|
73
|
-
"typescript-eslint": "^8.
|
|
74
|
-
"vite": "^7.1.
|
|
72
|
+
"typescript-eslint": "^8.46.1",
|
|
73
|
+
"vite": "^7.1.10",
|
|
75
74
|
"vite-plugin-devtools-json": "^1.0.0",
|
|
76
75
|
"vitest": "^3.2.4"
|
|
77
76
|
},
|