flowbite-svelte 1.24.1 → 1.26.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.
Files changed (110) hide show
  1. package/dist/command-palette/CommandPalette.svelte +1 -1
  2. package/dist/command-palette/CommandPalette.svelte.d.ts +1 -1
  3. package/dist/index.d.ts +1 -0
  4. package/dist/index.js +1 -0
  5. package/dist/kanban/KanbanCard.svelte +1 -1
  6. package/dist/kanban/KanbanCard.svelte.d.ts +1 -1
  7. package/dist/scroll-spy/ScrollSpy.svelte +1 -1
  8. package/dist/scroll-spy/ScrollSpy.svelte.d.ts +1 -1
  9. package/dist/spinner/Spinner.svelte +72 -14
  10. package/dist/spinner/Spinner.svelte.d.ts +2 -1
  11. package/dist/spinner/theme.d.ts +23 -2
  12. package/dist/spinner/theme.js +29 -22
  13. package/dist/split-pane/Divider.svelte +3 -2
  14. package/dist/split-pane/Divider.svelte.d.ts +1 -1
  15. package/dist/split-pane/Pane.svelte +1 -1
  16. package/dist/split-pane/Pane.svelte.d.ts +1 -1
  17. package/dist/split-pane/SplitPane.svelte +35 -91
  18. package/dist/split-pane/SplitPane.svelte.d.ts +1 -1
  19. package/dist/step-indicator/StepIndicator.svelte +1 -1
  20. package/dist/step-indicator/StepIndicator.svelte.d.ts +1 -1
  21. package/dist/stepper/BreadcrumbStepper.svelte +1 -1
  22. package/dist/stepper/BreadcrumbStepper.svelte.d.ts +1 -1
  23. package/dist/stepper/DetailedStepper.svelte +1 -1
  24. package/dist/stepper/DetailedStepper.svelte.d.ts +1 -1
  25. package/dist/stepper/ProgressStepper.svelte +1 -1
  26. package/dist/stepper/ProgressStepper.svelte.d.ts +1 -1
  27. package/dist/stepper/Stepper.svelte +1 -1
  28. package/dist/stepper/Stepper.svelte.d.ts +1 -1
  29. package/dist/stepper/TimelineStepper.svelte +1 -1
  30. package/dist/stepper/TimelineStepper.svelte.d.ts +1 -1
  31. package/dist/stepper/VerticalStepper.svelte +1 -1
  32. package/dist/stepper/VerticalStepper.svelte.d.ts +1 -1
  33. package/dist/table/Table.svelte +1 -1
  34. package/dist/table/Table.svelte.d.ts +1 -1
  35. package/dist/table/TableBody.svelte +1 -1
  36. package/dist/table/TableBody.svelte.d.ts +1 -1
  37. package/dist/table/TableBodyCell.svelte +1 -1
  38. package/dist/table/TableBodyCell.svelte.d.ts +1 -1
  39. package/dist/table/TableBodyRow.svelte +1 -1
  40. package/dist/table/TableBodyRow.svelte.d.ts +1 -1
  41. package/dist/table/TableHead.svelte +1 -1
  42. package/dist/table/TableHead.svelte.d.ts +1 -1
  43. package/dist/table/TableHeadCell.svelte +1 -1
  44. package/dist/table/TableHeadCell.svelte.d.ts +1 -1
  45. package/dist/table/TableSearch.svelte +1 -1
  46. package/dist/table/TableSearch.svelte.d.ts +1 -1
  47. package/dist/tabs/TabItem.svelte +1 -1
  48. package/dist/tabs/TabItem.svelte.d.ts +1 -1
  49. package/dist/tabs/Tabs.svelte +1 -1
  50. package/dist/tabs/Tabs.svelte.d.ts +1 -1
  51. package/dist/theme/themes.d.ts +1 -0
  52. package/dist/theme/themes.js +1 -0
  53. package/dist/timeline/Activity.svelte +1 -1
  54. package/dist/timeline/Activity.svelte.d.ts +1 -1
  55. package/dist/timeline/ActivityItem.svelte +1 -1
  56. package/dist/timeline/ActivityItem.svelte.d.ts +1 -1
  57. package/dist/timeline/Group.svelte +1 -1
  58. package/dist/timeline/Group.svelte.d.ts +1 -1
  59. package/dist/timeline/GroupItem.svelte +1 -1
  60. package/dist/timeline/GroupItem.svelte.d.ts +1 -1
  61. package/dist/timeline/Timeline.svelte +1 -1
  62. package/dist/timeline/Timeline.svelte.d.ts +1 -1
  63. package/dist/timeline/TimelineItem.svelte +1 -1
  64. package/dist/timeline/TimelineItem.svelte.d.ts +1 -1
  65. package/dist/toast/Toast.svelte +1 -1
  66. package/dist/toast/Toast.svelte.d.ts +1 -1
  67. package/dist/tooltip/Tooltip.svelte +1 -1
  68. package/dist/tooltip/Tooltip.svelte.d.ts +1 -1
  69. package/dist/types.d.ts +15 -0
  70. package/dist/typography/a/A.svelte +1 -1
  71. package/dist/typography/a/A.svelte.d.ts +1 -1
  72. package/dist/typography/blockquote/Blockquote.svelte +1 -1
  73. package/dist/typography/blockquote/Blockquote.svelte.d.ts +1 -1
  74. package/dist/typography/descriptionlist/DescriptionList.svelte +1 -1
  75. package/dist/typography/descriptionlist/DescriptionList.svelte.d.ts +1 -1
  76. package/dist/typography/heading/Heading.svelte +1 -1
  77. package/dist/typography/heading/Heading.svelte.d.ts +1 -1
  78. package/dist/typography/img/EnhancedImg.svelte +1 -1
  79. package/dist/typography/img/EnhancedImg.svelte.d.ts +1 -1
  80. package/dist/typography/img/Img.svelte +1 -1
  81. package/dist/typography/img/Img.svelte.d.ts +1 -1
  82. package/dist/typography/layout/Layout.svelte +1 -1
  83. package/dist/typography/layout/Layout.svelte.d.ts +1 -1
  84. package/dist/typography/list/Li.svelte +1 -1
  85. package/dist/typography/list/Li.svelte.d.ts +1 -1
  86. package/dist/typography/list/List.svelte +1 -1
  87. package/dist/typography/list/List.svelte.d.ts +1 -1
  88. package/dist/typography/mark/Mark.svelte +1 -1
  89. package/dist/typography/mark/Mark.svelte.d.ts +1 -1
  90. package/dist/typography/paragraph/P.svelte +1 -1
  91. package/dist/typography/paragraph/P.svelte.d.ts +1 -1
  92. package/dist/typography/secondary/Secondary.svelte +1 -1
  93. package/dist/typography/secondary/Secondary.svelte.d.ts +1 -1
  94. package/dist/typography/span/Span.svelte +1 -1
  95. package/dist/typography/span/Span.svelte.d.ts +1 -1
  96. package/dist/utils/Arrow.svelte +1 -1
  97. package/dist/utils/Arrow.svelte.d.ts +1 -1
  98. package/dist/utils/Popper.svelte +1 -1
  99. package/dist/utils/Popper.svelte.d.ts +1 -1
  100. package/dist/utils/nonPassiveTouch.d.ts +3 -0
  101. package/dist/utils/nonPassiveTouch.js +8 -0
  102. package/dist/video/Video.svelte +1 -1
  103. package/dist/video/Video.svelte.d.ts +1 -1
  104. package/dist/virtual-masonry/VirtualMasonry.svelte +185 -0
  105. package/dist/virtual-masonry/VirtualMasonry.svelte.d.ts +44 -0
  106. package/dist/virtual-masonry/index.d.ts +3 -0
  107. package/dist/virtual-masonry/index.js +2 -0
  108. package/dist/virtual-masonry/theme.d.ts +40 -0
  109. package/dist/virtual-masonry/theme.js +18 -0
  110. package/package.json +5 -1
@@ -194,7 +194,7 @@
194
194
  @component
195
195
  [Go to docs](https://flowbite-svelte.com/)
196
196
  ## Type
197
- [CommandPaletteProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2190)
197
+ [CommandPaletteProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2191)
198
198
  ## Props
199
199
  @prop open = $bindable(false)
200
200
  @prop items = []
@@ -2,7 +2,7 @@ import type { CommandPaletteProps } from "../types";
2
2
  /**
3
3
  * [Go to docs](https://flowbite-svelte.com/)
4
4
  * ## Type
5
- * [CommandPaletteProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2190)
5
+ * [CommandPaletteProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2191)
6
6
  * ## Props
7
7
  * @prop open = $bindable(false)
8
8
  * @prop items = []
package/dist/index.d.ts CHANGED
@@ -84,3 +84,4 @@ export * from "./kanban";
84
84
  export * from "./split-pane";
85
85
  export * from "./tour";
86
86
  export * from "./scroll-spy";
87
+ export * from "./virtual-masonry";
package/dist/index.js CHANGED
@@ -90,3 +90,4 @@ export * from "./kanban";
90
90
  export * from "./split-pane";
91
91
  export * from "./tour";
92
92
  export * from "./scroll-spy";
93
+ export * from "./virtual-masonry";
@@ -47,7 +47,7 @@
47
47
  @component
48
48
  [Go to docs](https://flowbite-svelte.com/)
49
49
  ## Type
50
- [KanbanCardProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2119)
50
+ [KanbanCardProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2120)
51
51
  ## Props
52
52
  @prop card
53
53
  @prop isDragging = false
@@ -2,7 +2,7 @@ import type { KanbanCardProps } from "../types";
2
2
  /**
3
3
  * [Go to docs](https://flowbite-svelte.com/)
4
4
  * ## Type
5
- * [KanbanCardProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2119)
5
+ * [KanbanCardProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2120)
6
6
  * ## Props
7
7
  * @prop card
8
8
  * @prop isDragging = false
@@ -255,7 +255,7 @@
255
255
  @component
256
256
  [Go to docs](https://flowbite-svelte.com/)
257
257
  ## Type
258
- [ScrollSpyProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2205)
258
+ [ScrollSpyProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2206)
259
259
  ## Props
260
260
  @prop items
261
261
  @prop position = "top"
@@ -2,7 +2,7 @@ import type { ScrollSpyProps } from "../types";
2
2
  /**
3
3
  * [Go to docs](https://flowbite-svelte.com/)
4
4
  * ## Type
5
- * [ScrollSpyProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2205)
5
+ * [ScrollSpyProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2206)
6
6
  * ## Props
7
7
  * @prop items
8
8
  * @prop position = "top"
@@ -4,23 +4,80 @@
4
4
  import type { SpinnerProps } from "../types";
5
5
  import { getTheme } from "../theme/themeUtils";
6
6
 
7
- let { color = "primary", size = "8", class: className, currentFill = "currentFill", currentColor = "currentColor", ...restProps }: SpinnerProps = $props();
7
+ let { type = "default", color = "primary", size = "8", class: className, currentFill = "inherit", currentColor = "currentColor", ...restProps }: SpinnerProps = $props();
8
8
 
9
9
  const theme = getTheme("spinner");
10
-
11
- let spinnerClass = $derived(spinner({ color, size, class: clsx(theme, className) }));
10
+ let spinnerClass = $derived(spinner({ type, color, size, class: clsx(theme, className) }));
12
11
  </script>
13
12
 
14
- <svg {...restProps} role="status" class={spinnerClass} viewBox="0 0 100 101" fill="none" xmlns="http://www.w3.org/2000/svg">
15
- <path
16
- d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z"
17
- fill={currentColor}
18
- />
19
- <path
20
- d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z"
21
- fill={currentFill}
22
- />
23
- </svg>
13
+ {#if type === "default"}
14
+ <svg {...restProps} role="status" class={spinnerClass} viewBox="0 0 100 101" fill="none">
15
+ <path
16
+ d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z"
17
+ fill={currentColor}
18
+ />
19
+ <path
20
+ d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z"
21
+ fill={currentFill}
22
+ />
23
+ </svg>
24
+ {:else if type === "dots"}
25
+ <svg {...restProps} role="status" class={spinnerClass} viewBox="0 0 120 30" fill="currentColor">
26
+ <circle cx="15" cy="15" r="15">
27
+ <animate attributeName="r" values="15;9;15" dur="0.8s" repeatCount="indefinite" />
28
+ <animate attributeName="fill-opacity" values="1;.5;1" dur="0.8s" repeatCount="indefinite" />
29
+ </circle>
30
+ <circle cx="60" cy="15" r="9" fill-opacity="0.3">
31
+ <animate attributeName="r" values="9;15;9" dur="0.8s" begin="0.2s" repeatCount="indefinite" />
32
+ <animate attributeName="fill-opacity" values=".5;1;.5" dur="0.8s" begin="0.2s" repeatCount="indefinite" />
33
+ </circle>
34
+ <circle cx="105" cy="15" r="15">
35
+ <animate attributeName="r" values="15;9;15" dur="0.8s" begin="0.4s" repeatCount="indefinite" />
36
+ <animate attributeName="fill-opacity" values="1;.5;1" dur="0.8s" begin="0.4s" repeatCount="indefinite" />
37
+ </circle>
38
+ </svg>
39
+ {:else if type === "bars"}
40
+ <svg {...restProps} role="status" class={spinnerClass} viewBox="0 0 135 140" fill="currentColor">
41
+ <rect y="10" width="15" height="120" rx="6">
42
+ <animate attributeName="height" values="120;60;120" dur="1.2s" repeatCount="indefinite" />
43
+ <animate attributeName="y" values="10;40;10" dur="1.2s" repeatCount="indefinite" />
44
+ </rect>
45
+ <rect x="30" y="10" width="15" height="120" rx="6">
46
+ <animate attributeName="height" values="120;60;120" dur="1.2s" begin="0.2s" repeatCount="indefinite" />
47
+ <animate attributeName="y" values="10;40;10" dur="1.2s" begin="0.2s" repeatCount="indefinite" />
48
+ </rect>
49
+ <rect x="60" y="10" width="15" height="120" rx="6">
50
+ <animate attributeName="height" values="120;60;120" dur="1.2s" begin="0.4s" repeatCount="indefinite" />
51
+ <animate attributeName="y" values="10;40;10" dur="1.2s" begin="0.4s" repeatCount="indefinite" />
52
+ </rect>
53
+ </svg>
54
+ {:else if type === "pulse"}
55
+ <svg {...restProps} role="status" class={spinnerClass} viewBox="0 0 100 100">
56
+ <circle cx="50" cy="50" r="8" fill={currentFill}>
57
+ <animate attributeName="r" values="8;45" dur="1.5s" repeatCount="indefinite" />
58
+ <animate attributeName="opacity" values="0.9;0" dur="1.5s" repeatCount="indefinite" />
59
+ </circle>
60
+ <circle cx="50" cy="50" r="8" fill={currentFill}>
61
+ <animate attributeName="r" values="8;45" begin="0.5s" dur="1.5s" repeatCount="indefinite" />
62
+ <animate attributeName="opacity" values="0.9;0" begin="0.5s" dur="1.5s" repeatCount="indefinite" />
63
+ </circle>
64
+ <circle cx="50" cy="50" r="8" fill={currentFill}>
65
+ <animate attributeName="r" values="8;45" begin="1s" dur="1.5s" repeatCount="indefinite" />
66
+ <animate attributeName="opacity" values="0.9;0" begin="1s" dur="1.5s" repeatCount="indefinite" />
67
+ </circle>
68
+ </svg>
69
+ {:else if type === "orbit"}
70
+ <svg {...restProps} role="status" class={spinnerClass} viewBox="0 0 100 100" fill="currentColor">
71
+ <g>
72
+ <!-- Three dots evenly spaced around center -->
73
+ <circle cx="50" cy="20" r="8" />
74
+ <circle cx="73.66" cy="65" r="8" />
75
+ <circle cx="26.34" cy="65" r="8" />
76
+
77
+ <animateTransform attributeName="transform" type="rotate" from="0 50 50" to="360 50 50" dur="1.2s" repeatCount="indefinite" />
78
+ </g>
79
+ </svg>
80
+ {/if}
24
81
 
25
82
  <!--
26
83
  @component
@@ -28,10 +85,11 @@
28
85
  ## Type
29
86
  [SpinnerProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1554)
30
87
  ## Props
88
+ @prop type = "default"
31
89
  @prop color = "primary"
32
90
  @prop size = "8"
33
91
  @prop class: className
34
- @prop currentFill = "currentFill"
92
+ @prop currentFill = "inherit"
35
93
  @prop currentColor = "currentColor"
36
94
  @prop ...restProps
37
95
  -->
@@ -4,10 +4,11 @@ import type { SpinnerProps } from "../types";
4
4
  * ## Type
5
5
  * [SpinnerProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1554)
6
6
  * ## Props
7
+ * @prop type = "default"
7
8
  * @prop color = "primary"
8
9
  * @prop size = "8"
9
10
  * @prop class: className
10
- * @prop currentFill = "currentFill"
11
+ * @prop currentFill = "inherit"
11
12
  * @prop currentColor = "currentColor"
12
13
  * @prop ...restProps
13
14
  */
@@ -1,6 +1,13 @@
1
1
  import { type VariantProps } from "tailwind-variants";
2
2
  export type SpinnerVaraiants = VariantProps<typeof spinner>;
3
3
  export declare const spinner: import("tailwind-variants").TVReturnType<{
4
+ type: {
5
+ default: string;
6
+ dots: string;
7
+ bars: string;
8
+ pulse: string;
9
+ orbit: string;
10
+ };
4
11
  color: {
5
12
  primary: string;
6
13
  secondary: string;
@@ -32,7 +39,14 @@ export declare const spinner: import("tailwind-variants").TVReturnType<{
32
39
  "12": string;
33
40
  "16": string;
34
41
  };
35
- }, undefined, "inline-block animate-spin text-gray-300", {
42
+ }, undefined, "inline-block", {
43
+ type: {
44
+ default: string;
45
+ dots: string;
46
+ bars: string;
47
+ pulse: string;
48
+ orbit: string;
49
+ };
36
50
  color: {
37
51
  primary: string;
38
52
  secondary: string;
@@ -65,6 +79,13 @@ export declare const spinner: import("tailwind-variants").TVReturnType<{
65
79
  "16": string;
66
80
  };
67
81
  }, undefined, import("tailwind-variants").TVReturnType<{
82
+ type: {
83
+ default: string;
84
+ dots: string;
85
+ bars: string;
86
+ pulse: string;
87
+ orbit: string;
88
+ };
68
89
  color: {
69
90
  primary: string;
70
91
  secondary: string;
@@ -96,4 +117,4 @@ export declare const spinner: import("tailwind-variants").TVReturnType<{
96
117
  "12": string;
97
118
  "16": string;
98
119
  };
99
- }, undefined, "inline-block animate-spin text-gray-300", unknown, unknown, undefined>>;
120
+ }, undefined, "inline-block", unknown, unknown, undefined>>;
@@ -1,29 +1,35 @@
1
1
  import { tv } from "tailwind-variants";
2
2
  export const spinner = tv({
3
- base: "inline-block animate-spin text-gray-300",
3
+ base: "inline-block",
4
4
  variants: {
5
+ type: {
6
+ default: "animate-spin",
7
+ dots: "inline-flex items-center justify-center",
8
+ bars: "inline-flex items-center justify-center",
9
+ pulse: "animate-pulse",
10
+ orbit: ""
11
+ },
5
12
  color: {
6
- // primary, secondary, gray, red, orange, amber, yellow, lime, green, emerald, teal, cyan, sky, blue, indigo, violet, purple, fuchsia, pink, rose
7
- primary: "fill-primary-600",
8
- secondary: "fill-secondary-600",
9
- gray: "fill-gray-600 dark:fill-gray-300",
10
- red: "fill-red-600",
11
- orange: "fill-orange-500",
12
- amber: "fill-amber-500",
13
- yellow: "fill-yellow-400",
14
- lime: "fill-lime-500",
15
- green: "fill-green-500",
16
- emerald: "fill-emerald-500",
17
- teal: "fill-teal-500",
18
- cyan: "fill-cyan-500",
19
- sky: "fill-sky-500",
20
- blue: "fill-blue-600",
21
- indigo: "fill-indigo-600",
22
- violet: "fill-violet-600",
23
- purple: "fill-purple-600",
24
- fuchsia: "fill-fuchsia-600",
25
- pink: "fill-pink-600",
26
- rose: "fill-rose-600"
13
+ primary: "fill-primary-600 text-gray-300",
14
+ secondary: "fill-secondary-600 text-gray-300",
15
+ gray: "fill-gray-600 dark:fill-gray-300 text-gray-300",
16
+ red: "fill-red-600 text-gray-300",
17
+ orange: "fill-orange-500 text-gray-300",
18
+ amber: "fill-amber-500 text-gray-300",
19
+ yellow: "fill-yellow-400 text-gray-300",
20
+ lime: "fill-lime-500 text-gray-300",
21
+ green: "fill-green-500 text-gray-300",
22
+ emerald: "fill-emerald-500 text-gray-300",
23
+ teal: "fill-teal-500 text-gray-300",
24
+ cyan: "fill-cyan-500 text-gray-300",
25
+ sky: "fill-sky-500 text-gray-300",
26
+ blue: "fill-blue-600 text-gray-300",
27
+ indigo: "fill-indigo-600 text-gray-300",
28
+ violet: "fill-violet-600 text-gray-300",
29
+ purple: "fill-purple-600 text-gray-300",
30
+ fuchsia: "fill-fuchsia-600 text-gray-300",
31
+ pink: "fill-pink-600 text-gray-300",
32
+ rose: "fill-rose-600 text-gray-300"
27
33
  },
28
34
  size: {
29
35
  "4": "w-4 h-4",
@@ -36,6 +42,7 @@ export const spinner = tv({
36
42
  }
37
43
  },
38
44
  defaultVariants: {
45
+ type: "default",
39
46
  color: "primary",
40
47
  size: "8"
41
48
  }
@@ -3,6 +3,7 @@
3
3
  import { divider, dividerHitArea } from "./theme";
4
4
  import { getTheme } from "../theme/themeUtils";
5
5
  import clsx from "clsx";
6
+ import { nonPassiveTouch } from "../utils/nonPassiveTouch";
6
7
 
7
8
  let { direction, index, onMouseDown, onTouchStart, onKeyDown, isDragging, currentSize, class: className = "" }: DividerProps = $props();
8
9
 
@@ -26,7 +27,7 @@
26
27
  aria-valuetext={`${roundedSize} percent`}
27
28
  class={divider({ direction, isDragging, class: clsx(themePane, className) })}
28
29
  onmousedown={(e) => onMouseDown(e, index)}
29
- ontouchstart={(e) => onTouchStart(e, index)}
30
+ use:nonPassiveTouch={(e) => onTouchStart(e, index)}
30
31
  onkeydown={(e) => onKeyDown(e, index)}
31
32
  >
32
33
  <div class={dividerHitArea({ direction, class: clsx(themeDividerHitArea, className) })}></div>
@@ -36,7 +37,7 @@
36
37
  @component
37
38
  [Go to docs](https://flowbite-svelte.com/)
38
39
  ## Type
39
- [DividerProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2148)
40
+ [DividerProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2149)
40
41
  ## Props
41
42
  @prop direction
42
43
  @prop index
@@ -2,7 +2,7 @@ import type { DividerProps } from "../types";
2
2
  /**
3
3
  * [Go to docs](https://flowbite-svelte.com/)
4
4
  * ## Type
5
- * [DividerProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2148)
5
+ * [DividerProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2149)
6
6
  * ## Props
7
7
  * @prop direction
8
8
  * @prop index
@@ -47,7 +47,7 @@
47
47
  @component
48
48
  [Go to docs](https://flowbite-svelte.com/)
49
49
  ## Type
50
- [PaneProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2142)
50
+ [PaneProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2143)
51
51
  ## Props
52
52
  @prop children
53
53
  @prop class: className = ""
@@ -2,7 +2,7 @@ import type { PaneProps } from "../types";
2
2
  /**
3
3
  * [Go to docs](https://flowbite-svelte.com/)
4
4
  * ## Type
5
- * [PaneProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2142)
5
+ * [PaneProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2143)
6
6
  * ## Props
7
7
  * @prop children
8
8
  * @prop class: className = ""
@@ -311,97 +311,46 @@
311
311
  document.body.style.userSelect = "";
312
312
  }
313
313
 
314
- function resize(e: MouseEvent, index: number) {
315
- if (!isDragging || !container) return;
316
- if (index < 0 || index + 1 >= sizes.length) return;
317
-
318
- const currentPos = currentDirection === "horizontal" ? e.clientX : e.clientY;
319
- const delta = currentPos - startPos;
320
-
321
- if (Math.abs(delta) < MIN_DELTA) return; // Ignore very small movements
322
-
323
- const containerSize = currentDirection === "horizontal" ? container.offsetWidth : container.offsetHeight;
324
-
325
- // Bail out if container has zero or near-zero dimensions
326
- if (containerSize < 1) return;
327
-
328
- const deltaPercent = (delta / containerSize) * 100;
329
-
330
- // Calculate min as percentage based on current container size
331
- const minPercent = (minSize / containerSize) * 100;
332
-
333
- // Store original sizes
334
- const oldSize1 = sizes[index];
335
- const oldSize2 = sizes[index + 1];
336
- const totalSize = oldSize1 + oldSize2;
337
-
338
- // Calculate desired new sizes
339
- let newSize1 = oldSize1 + deltaPercent;
340
- let newSize2 = oldSize2 - deltaPercent;
314
+ function clampPaneSizes(index: number, targetSize: number, minPercent: number, total: number): boolean {
315
+ if (index < 0 || index + 1 >= sizes.length) return false;
341
316
 
342
- // Apply minimum constraints - clamp to valid range
343
- newSize1 = Math.max(minPercent, newSize1);
344
- newSize2 = totalSize - newSize1;
317
+ let newSize1 = Math.min(total - minPercent, Math.max(minPercent, targetSize));
318
+ let newSize2 = total - newSize1;
345
319
 
346
- // Check if second pane violates minimum constraint after first pane clamping
347
320
  if (newSize2 < minPercent) {
348
321
  newSize2 = minPercent;
349
- newSize1 = totalSize - newSize2;
322
+ newSize1 = total - newSize2;
350
323
  }
351
324
 
352
- // Only update if changed significantly
353
- if (Math.abs(newSize1 - oldSize1) > MIN_CHANGE_THRESHOLD) {
325
+ if (Math.abs(newSize1 - sizes[index]) > MIN_CHANGE_THRESHOLD) {
354
326
  sizes[index] = newSize1;
355
327
  sizes[index + 1] = newSize2;
356
- startPos = currentPos;
328
+ return true;
357
329
  }
330
+
331
+ return false;
358
332
  }
359
333
 
360
- function resizeTouch(e: TouchEvent, index: number) {
334
+ function applyResize(currentPos: number, index: number) {
361
335
  if (!isDragging || !container) return;
362
336
  if (index < 0 || index + 1 >= sizes.length) return;
363
337
 
364
- e.preventDefault(); // Prevent scrolling while dragging
365
-
366
- const touch = e.touches[0];
367
- const currentPos = currentDirection === "horizontal" ? touch.clientX : touch.clientY;
368
338
  const delta = currentPos - startPos;
339
+ if (Math.abs(delta) < MIN_DELTA) return;
369
340
 
370
- if (Math.abs(delta) < MIN_DELTA) return; // Ignore very small movements
371
-
372
- const containerSize = currentDirection === "horizontal" ? container.offsetWidth : container.offsetHeight;
373
-
374
- // Bail out if container has zero or near-zero dimensions
375
- if (containerSize < 1) return;
376
-
377
- const deltaPercent = (delta / containerSize) * 100;
341
+ const currentContainerSize = currentDirection === "horizontal" ? container.offsetWidth : container.offsetHeight;
342
+ if (currentContainerSize < 1) return;
378
343
 
379
- // Calculate min as percentage based on current container size
380
- const minPercent = (minSize / containerSize) * 100;
344
+ const deltaPercent = (delta / currentContainerSize) * 100;
345
+ const minPercent = (minSize / currentContainerSize) * 100;
381
346
 
382
- // Store original sizes
383
347
  const oldSize1 = sizes[index];
384
348
  const oldSize2 = sizes[index + 1];
385
349
  const totalSize = oldSize1 + oldSize2;
386
350
 
387
- // Calculate desired new sizes
388
- let newSize1 = oldSize1 + deltaPercent;
389
- let newSize2 = oldSize2 - deltaPercent;
390
-
391
- // Apply minimum constraints - clamp to valid range
392
- newSize1 = Math.max(minPercent, newSize1);
393
- newSize2 = totalSize - newSize1;
394
-
395
- // Check if second pane violates minimum constraint after first pane clamping
396
- if (newSize2 < minPercent) {
397
- newSize2 = minPercent;
398
- newSize1 = totalSize - newSize2;
399
- }
351
+ const targetSize = oldSize1 + deltaPercent;
400
352
 
401
- // Only update if changed significantly
402
- if (Math.abs(newSize1 - oldSize1) > MIN_CHANGE_THRESHOLD) {
403
- sizes[index] = newSize1;
404
- sizes[index + 1] = newSize2;
353
+ if (clampPaneSizes(index, targetSize, minPercent, totalSize)) {
405
354
  startPos = currentPos;
406
355
  }
407
356
  }
@@ -410,41 +359,24 @@
410
359
  if (!container) return;
411
360
  if (index < 0 || index + 1 >= sizes.length) return;
412
361
 
413
- const step = keyboardStep;
414
- let handled = false;
415
-
416
362
  const isHorizontal = currentDirection === "horizontal";
417
363
  const increaseKeys = isHorizontal ? ["ArrowRight"] : ["ArrowDown"];
418
364
  const decreaseKeys = isHorizontal ? ["ArrowLeft"] : ["ArrowUp"];
419
365
 
420
366
  const containerSize = isHorizontal ? container.offsetWidth : container.offsetHeight;
421
- // Bail out if container has zero or near-zero dimensions
422
367
  if (containerSize < 1) return;
423
368
 
424
369
  const minPercent = (minSize / containerSize) * 100;
425
-
426
370
  const total = sizes[index] + sizes[index + 1];
427
371
 
428
- const applyClamp = (target: number) => {
429
- let newSize1 = Math.min(total - minPercent, Math.max(minPercent, target));
430
- let newSize2 = total - newSize1;
431
-
432
- if (newSize2 < minPercent) {
433
- newSize2 = minPercent;
434
- newSize1 = total - newSize2;
435
- }
436
-
437
- if (Math.abs(newSize1 - sizes[index]) > MIN_CHANGE_THRESHOLD) {
438
- sizes[index] = newSize1;
439
- sizes[index + 1] = newSize2;
440
- handled = true;
441
- }
442
- };
372
+ let handled = false;
443
373
 
444
374
  if (increaseKeys.includes(e.key)) {
445
- applyClamp(sizes[index] + step);
375
+ const targetSize = sizes[index] + keyboardStep;
376
+ handled = clampPaneSizes(index, targetSize, minPercent, total);
446
377
  } else if (decreaseKeys.includes(e.key)) {
447
- applyClamp(sizes[index] - step);
378
+ const targetSize = sizes[index] - keyboardStep;
379
+ handled = clampPaneSizes(index, targetSize, minPercent, total);
448
380
  } else if (e.key === "Enter" || e.key === " ") {
449
381
  // Reset to equal sizes
450
382
  const equal = 100 / registeredPanes;
@@ -456,6 +388,18 @@
456
388
  e.preventDefault();
457
389
  }
458
390
  }
391
+
392
+ function resize(e: MouseEvent, index: number) {
393
+ const currentPos = currentDirection === "horizontal" ? e.clientX : e.clientY;
394
+ applyResize(currentPos, index);
395
+ }
396
+
397
+ function resizeTouch(e: TouchEvent, index: number) {
398
+ e.preventDefault(); // Prevent scrolling while dragging
399
+ const touch = e.touches[0];
400
+ const currentPos = currentDirection === "horizontal" ? touch.clientX : touch.clientY;
401
+ applyResize(currentPos, index);
402
+ }
459
403
  </script>
460
404
 
461
405
  <div bind:this={container} class={splitpane({ direction: currentDirection, class: clsx(theme, className) })}>
@@ -466,7 +410,7 @@
466
410
  @component
467
411
  [Go to docs](https://flowbite-svelte.com/)
468
412
  ## Type
469
- [SplitPaneProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2128)
413
+ [SplitPaneProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2129)
470
414
  ## Props
471
415
  @prop direction = "horizontal"
472
416
  @prop minSize = 100
@@ -15,7 +15,7 @@ import type { SplitPaneProps } from "../types";
15
15
  /**
16
16
  * [Go to docs](https://flowbite-svelte.com/)
17
17
  * ## Type
18
- * [SplitPaneProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2128)
18
+ * [SplitPaneProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2129)
19
19
  * ## Props
20
20
  * @prop direction = "horizontal"
21
21
  * @prop minSize = 100
@@ -66,7 +66,7 @@
66
66
  @component
67
67
  [Go to docs](https://flowbite-svelte.com/)
68
68
  ## Type
69
- [StepIndicatorProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1562)
69
+ [StepIndicatorProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1563)
70
70
  ## Props
71
71
  @prop steps = ["Step 1", "Step 2", "Step 3", "Step 4", "Step 5"]
72
72
  @prop currentStep = 1
@@ -2,7 +2,7 @@ import type { StepIndicatorProps } from "../types";
2
2
  /**
3
3
  * [Go to docs](https://flowbite-svelte.com/)
4
4
  * ## Type
5
- * [StepIndicatorProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1562)
5
+ * [StepIndicatorProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1563)
6
6
  * ## Props
7
7
  * @prop steps = ["Step 1", "Step 2", "Step 3", "Step 4", "Step 5"]
8
8
  * @prop currentStep = 1
@@ -55,7 +55,7 @@
55
55
  @component
56
56
  [Go to docs](https://flowbite-svelte.com/)
57
57
  ## Type
58
- [BreadcrumbStepperProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1642)
58
+ [BreadcrumbStepperProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1643)
59
59
  ## Props
60
60
  @prop children
61
61
  @prop steps = []
@@ -2,7 +2,7 @@ import type { BreadcrumbStepperProps } from "../types";
2
2
  /**
3
3
  * [Go to docs](https://flowbite-svelte.com/)
4
4
  * ## Type
5
- * [BreadcrumbStepperProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1642)
5
+ * [BreadcrumbStepperProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1643)
6
6
  * ## Props
7
7
  * @prop children
8
8
  * @prop steps = []
@@ -42,7 +42,7 @@
42
42
  @component
43
43
  [Go to docs](https://flowbite-svelte.com/)
44
44
  ## Type
45
- [DetailedStepperProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1611)
45
+ [DetailedStepperProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1612)
46
46
  ## Props
47
47
  @prop children
48
48
  @prop steps = []
@@ -2,7 +2,7 @@ import type { DetailedStepperProps } from "../types";
2
2
  /**
3
3
  * [Go to docs](https://flowbite-svelte.com/)
4
4
  * ## Type
5
- * [DetailedStepperProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1611)
5
+ * [DetailedStepperProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1612)
6
6
  * ## Props
7
7
  * @prop children
8
8
  * @prop steps = []
@@ -54,7 +54,7 @@
54
54
  @component
55
55
  [Go to docs](https://flowbite-svelte.com/)
56
56
  ## Type
57
- [ProgressStepperProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1596)
57
+ [ProgressStepperProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1597)
58
58
  ## Props
59
59
  @prop children
60
60
  @prop steps = []