flowbite-svelte 2.0.0-next.0 → 2.0.0-next.2

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 (245) hide show
  1. package/dist/accordion/theme.js +1 -1
  2. package/dist/command-palette/CommandPalette.svelte +1 -1
  3. package/dist/command-palette/CommandPalette.svelte.d.ts +1 -1
  4. package/dist/context.d.ts +3 -1
  5. package/dist/context.js +3 -0
  6. package/dist/datepicker/Datepicker.svelte +6 -2
  7. package/dist/datepicker/theme.js +5 -5
  8. package/dist/footer/theme.js +1 -1
  9. package/dist/forms/floating-label/FloatingLabelInput.svelte +6 -3
  10. package/dist/forms/input-addon/InputAddon.svelte +1 -1
  11. package/dist/forms/input-addon/InputAddon.svelte.d.ts +1 -1
  12. package/dist/forms/input-field/Input.svelte +14 -33
  13. package/dist/forms/label/Label.svelte +1 -1
  14. package/dist/forms/label/Label.svelte.d.ts +1 -1
  15. package/dist/forms/radio/Radio.svelte +4 -15
  16. package/dist/forms/range/Range.svelte +1 -1
  17. package/dist/forms/range/Range.svelte.d.ts +1 -1
  18. package/dist/forms/search/Search.svelte +8 -21
  19. package/dist/forms/search/Search.svelte.d.ts +1 -4
  20. package/dist/forms/select/MultiSelect.svelte +4 -11
  21. package/dist/forms/select/Select.svelte +4 -14
  22. package/dist/forms/tags/Tags.svelte +13 -32
  23. package/dist/forms/tags/Tags.svelte.d.ts +2 -4
  24. package/dist/forms/textarea/Textarea.svelte +12 -46
  25. package/dist/forms/textarea/Textarea.svelte.d.ts +1 -9
  26. package/dist/forms/timepicker/Timepicker.svelte +4 -4
  27. package/dist/forms/timepicker/Timepicker.svelte.d.ts +1 -1
  28. package/dist/forms/toggle/Toggle.svelte +6 -15
  29. package/dist/forms/toggle/Toggle.svelte.d.ts +1 -3
  30. package/dist/gallery/Gallery.svelte +5 -13
  31. package/dist/gallery/Gallery.svelte.d.ts +1 -2
  32. package/dist/gallery/theme.js +1 -1
  33. package/dist/indicator/Indicator.svelte +1 -1
  34. package/dist/indicator/Indicator.svelte.d.ts +1 -1
  35. package/dist/kanban/KanbanCard.svelte +1 -1
  36. package/dist/kanban/KanbanCard.svelte.d.ts +1 -1
  37. package/dist/kbd/Kbd.svelte +1 -1
  38. package/dist/kbd/Kbd.svelte.d.ts +1 -1
  39. package/dist/list-group/Listgroup.svelte +20 -8
  40. package/dist/list-group/Listgroup.svelte.d.ts +2 -3
  41. package/dist/list-group/ListgroupItem.svelte +14 -10
  42. package/dist/list-group/ListgroupItem.svelte.d.ts +4 -2
  43. package/dist/list-group/theme.d.ts +87 -29
  44. package/dist/list-group/theme.js +17 -18
  45. package/dist/mega-menu/MegaMenu.svelte +7 -16
  46. package/dist/mega-menu/MegaMenu.svelte.d.ts +1 -3
  47. package/dist/modal/Modal.svelte +7 -22
  48. package/dist/modal/Modal.svelte.d.ts +1 -5
  49. package/dist/modal/theme.d.ts +1 -0
  50. package/dist/modal/theme.js +2 -1
  51. package/dist/navbar/Menu.svelte +3 -4
  52. package/dist/navbar/Menu.svelte.d.ts +1 -2
  53. package/dist/navbar/NavBrand.svelte +1 -1
  54. package/dist/navbar/NavBrand.svelte.d.ts +1 -1
  55. package/dist/navbar/NavContainer.svelte +1 -1
  56. package/dist/navbar/NavContainer.svelte.d.ts +1 -1
  57. package/dist/navbar/NavHamburger.svelte +10 -16
  58. package/dist/navbar/NavHamburger.svelte.d.ts +1 -3
  59. package/dist/navbar/NavLi.svelte +8 -4
  60. package/dist/navbar/NavLi.svelte.d.ts +1 -1
  61. package/dist/navbar/NavUl.svelte +14 -31
  62. package/dist/navbar/NavUl.svelte.d.ts +1 -4
  63. package/dist/navbar/Navbar.svelte +9 -5
  64. package/dist/navbar/Navbar.svelte.d.ts +2 -2
  65. package/dist/navbar/index.d.ts +1 -0
  66. package/dist/navbar/index.js +1 -0
  67. package/dist/navbar/theme.d.ts +32 -1
  68. package/dist/navbar/theme.js +4 -1
  69. package/dist/pagination/Pagination.svelte +1 -1
  70. package/dist/pagination/Pagination.svelte.d.ts +1 -1
  71. package/dist/pagination/PaginationButton.svelte +1 -1
  72. package/dist/pagination/PaginationButton.svelte.d.ts +1 -1
  73. package/dist/pagination/PaginationItem.svelte +1 -1
  74. package/dist/pagination/PaginationItem.svelte.d.ts +1 -1
  75. package/dist/pagination/PaginationNav.svelte +10 -25
  76. package/dist/pagination/PaginationNav.svelte.d.ts +1 -5
  77. package/dist/popover/Popover.svelte +6 -15
  78. package/dist/popover/Popover.svelte.d.ts +1 -2
  79. package/dist/progress/Progressbar.svelte +1 -1
  80. package/dist/progress/Progressbar.svelte.d.ts +1 -1
  81. package/dist/progress/Progressradial.svelte +1 -1
  82. package/dist/progress/Progressradial.svelte.d.ts +1 -1
  83. package/dist/rating/AdvancedRating.svelte +8 -27
  84. package/dist/rating/AdvancedRating.svelte.d.ts +1 -6
  85. package/dist/rating/CustomIcon.svelte +4 -4
  86. package/dist/rating/CustomIcon.svelte.d.ts +2 -2
  87. package/dist/rating/Heart.svelte +4 -4
  88. package/dist/rating/Heart.svelte.d.ts +2 -2
  89. package/dist/rating/Rating.svelte +5 -13
  90. package/dist/rating/Rating.svelte.d.ts +1 -2
  91. package/dist/rating/RatingComment.svelte +1 -1
  92. package/dist/rating/RatingComment.svelte.d.ts +1 -1
  93. package/dist/rating/Review.svelte +13 -37
  94. package/dist/rating/Review.svelte.d.ts +1 -8
  95. package/dist/rating/ScoreRating.svelte +9 -8
  96. package/dist/rating/ScoreRating.svelte.d.ts +1 -1
  97. package/dist/rating/Star.svelte +4 -4
  98. package/dist/rating/Star.svelte.d.ts +2 -2
  99. package/dist/rating/Thumbup.svelte +4 -4
  100. package/dist/rating/Thumbup.svelte.d.ts +2 -2
  101. package/dist/scroll-spy/ScrollSpy.svelte +1 -1
  102. package/dist/scroll-spy/ScrollSpy.svelte.d.ts +1 -1
  103. package/dist/sidebar/Sidebar.svelte +9 -31
  104. package/dist/sidebar/Sidebar.svelte.d.ts +1 -5
  105. package/dist/sidebar/SidebarBrand.svelte +6 -20
  106. package/dist/sidebar/SidebarBrand.svelte.d.ts +1 -3
  107. package/dist/sidebar/SidebarButton.svelte +3 -2
  108. package/dist/sidebar/SidebarButton.svelte.d.ts +1 -1
  109. package/dist/sidebar/SidebarCta.svelte +6 -20
  110. package/dist/sidebar/SidebarCta.svelte.d.ts +1 -3
  111. package/dist/sidebar/SidebarDropdownWrapper.svelte +9 -44
  112. package/dist/sidebar/SidebarDropdownWrapper.svelte.d.ts +1 -5
  113. package/dist/sidebar/SidebarGroup.svelte +3 -4
  114. package/dist/sidebar/SidebarGroup.svelte.d.ts +1 -2
  115. package/dist/sidebar/SidebarItem.svelte +12 -10
  116. package/dist/sidebar/SidebarItem.svelte.d.ts +2 -5
  117. package/dist/sidebar/index.d.ts +1 -1
  118. package/dist/sidebar/index.js +1 -1
  119. package/dist/sidebar/theme.d.ts +41 -0
  120. package/dist/sidebar/theme.js +23 -3
  121. package/dist/skeleton/CardPlaceholder.svelte +1 -1
  122. package/dist/skeleton/CardPlaceholder.svelte.d.ts +1 -1
  123. package/dist/skeleton/ImagePlaceholder.svelte +1 -1
  124. package/dist/skeleton/ImagePlaceholder.svelte.d.ts +1 -1
  125. package/dist/skeleton/ListPlaceholder.svelte +1 -1
  126. package/dist/skeleton/ListPlaceholder.svelte.d.ts +1 -1
  127. package/dist/skeleton/Skeleton.svelte +1 -1
  128. package/dist/skeleton/Skeleton.svelte.d.ts +1 -1
  129. package/dist/skeleton/TestimonialPlaceholder.svelte +1 -1
  130. package/dist/skeleton/TestimonialPlaceholder.svelte.d.ts +1 -1
  131. package/dist/skeleton/TextPlaceholder.svelte +1 -1
  132. package/dist/skeleton/TextPlaceholder.svelte.d.ts +1 -1
  133. package/dist/skeleton/VideoPlaceholder.svelte +1 -1
  134. package/dist/skeleton/VideoPlaceholder.svelte.d.ts +1 -1
  135. package/dist/skeleton/WidgetPlaceholder.svelte +1 -1
  136. package/dist/skeleton/WidgetPlaceholder.svelte.d.ts +1 -1
  137. package/dist/speed-dial/SpeedDial.svelte +7 -19
  138. package/dist/speed-dial/SpeedDial.svelte.d.ts +1 -2
  139. package/dist/speed-dial/SpeedDialButton.svelte +12 -24
  140. package/dist/speed-dial/SpeedDialButton.svelte.d.ts +3 -4
  141. package/dist/speed-dial/SpeedDialTrigger.svelte +1 -1
  142. package/dist/speed-dial/SpeedDialTrigger.svelte.d.ts +1 -1
  143. package/dist/spinner/Spinner.svelte +1 -1
  144. package/dist/spinner/Spinner.svelte.d.ts +1 -1
  145. package/dist/split-pane/Divider.svelte +1 -1
  146. package/dist/split-pane/Divider.svelte.d.ts +1 -1
  147. package/dist/split-pane/Pane.svelte +1 -1
  148. package/dist/split-pane/Pane.svelte.d.ts +1 -1
  149. package/dist/split-pane/SplitPane.svelte +1 -1
  150. package/dist/split-pane/SplitPane.svelte.d.ts +1 -1
  151. package/dist/step-indicator/StepIndicator.svelte +1 -1
  152. package/dist/step-indicator/StepIndicator.svelte.d.ts +1 -1
  153. package/dist/stepper/BreadcrumbStepper.svelte +1 -1
  154. package/dist/stepper/BreadcrumbStepper.svelte.d.ts +1 -1
  155. package/dist/stepper/DetailedStepper.svelte +1 -1
  156. package/dist/stepper/DetailedStepper.svelte.d.ts +1 -1
  157. package/dist/stepper/ProgressStepper.svelte +1 -1
  158. package/dist/stepper/ProgressStepper.svelte.d.ts +1 -1
  159. package/dist/stepper/Stepper.svelte +1 -1
  160. package/dist/stepper/Stepper.svelte.d.ts +1 -1
  161. package/dist/stepper/TimelineStepper.svelte +1 -1
  162. package/dist/stepper/TimelineStepper.svelte.d.ts +1 -1
  163. package/dist/stepper/VerticalStepper.svelte +1 -1
  164. package/dist/stepper/VerticalStepper.svelte.d.ts +1 -1
  165. package/dist/table/Table.svelte +6 -17
  166. package/dist/table/Table.svelte.d.ts +1 -2
  167. package/dist/table/TableBody.svelte +1 -1
  168. package/dist/table/TableBody.svelte.d.ts +1 -1
  169. package/dist/table/TableBodyCell.svelte +1 -1
  170. package/dist/table/TableBodyCell.svelte.d.ts +1 -1
  171. package/dist/table/TableBodyRow.svelte +1 -1
  172. package/dist/table/TableBodyRow.svelte.d.ts +1 -1
  173. package/dist/table/TableHead.svelte +1 -1
  174. package/dist/table/TableHead.svelte.d.ts +1 -1
  175. package/dist/table/TableHeadCell.svelte +1 -1
  176. package/dist/table/TableHeadCell.svelte.d.ts +1 -1
  177. package/dist/table/TableSearch.svelte +10 -41
  178. package/dist/table/TableSearch.svelte.d.ts +1 -8
  179. package/dist/tabs/TabItem.svelte +1 -1
  180. package/dist/tabs/TabItem.svelte.d.ts +1 -1
  181. package/dist/tabs/Tabs.svelte +8 -15
  182. package/dist/tabs/Tabs.svelte.d.ts +1 -3
  183. package/dist/theme/themeUtils.d.ts +0 -10
  184. package/dist/theme/themeUtils.js +0 -67
  185. package/dist/theme/themes.d.ts +1 -1
  186. package/dist/theme/themes.js +1 -1
  187. package/dist/timeline/Activity.svelte +1 -1
  188. package/dist/timeline/Activity.svelte.d.ts +1 -1
  189. package/dist/timeline/ActivityItem.svelte +12 -46
  190. package/dist/timeline/ActivityItem.svelte.d.ts +1 -9
  191. package/dist/timeline/Group.svelte +7 -24
  192. package/dist/timeline/Group.svelte.d.ts +1 -4
  193. package/dist/timeline/GroupItem.svelte +11 -36
  194. package/dist/timeline/GroupItem.svelte.d.ts +1 -6
  195. package/dist/timeline/Timeline.svelte +1 -1
  196. package/dist/timeline/Timeline.svelte.d.ts +1 -1
  197. package/dist/timeline/TimelineItem.svelte +13 -60
  198. package/dist/timeline/TimelineItem.svelte.d.ts +1 -8
  199. package/dist/toast/Toast.svelte +6 -25
  200. package/dist/toast/Toast.svelte.d.ts +1 -3
  201. package/dist/toast/ToastContainer.svelte +1 -1
  202. package/dist/toast/ToastContainer.svelte.d.ts +1 -1
  203. package/dist/toolbar/Toolbar.svelte +1 -1
  204. package/dist/toolbar/Toolbar.svelte.d.ts +1 -1
  205. package/dist/toolbar/ToolbarButton.svelte +5 -4
  206. package/dist/toolbar/ToolbarButton.svelte.d.ts +2 -1
  207. package/dist/toolbar/ToolbarGroup.svelte +1 -1
  208. package/dist/toolbar/ToolbarGroup.svelte.d.ts +1 -1
  209. package/dist/toolbar/theme.js +1 -1
  210. package/dist/tooltip/Tooltip.svelte +1 -1
  211. package/dist/tooltip/Tooltip.svelte.d.ts +1 -1
  212. package/dist/types.d.ts +9 -144
  213. package/dist/typography/a/A.svelte +1 -1
  214. package/dist/typography/a/A.svelte.d.ts +1 -1
  215. package/dist/typography/blockquote/Blockquote.svelte +1 -1
  216. package/dist/typography/blockquote/Blockquote.svelte.d.ts +1 -1
  217. package/dist/typography/descriptionlist/DescriptionList.svelte +1 -1
  218. package/dist/typography/descriptionlist/DescriptionList.svelte.d.ts +1 -1
  219. package/dist/typography/heading/Heading.svelte +1 -1
  220. package/dist/typography/heading/Heading.svelte.d.ts +1 -1
  221. package/dist/typography/hr/Hr.svelte +11 -29
  222. package/dist/typography/hr/Hr.svelte.d.ts +2 -3
  223. package/dist/typography/img/Img.svelte +6 -21
  224. package/dist/typography/img/Img.svelte.d.ts +1 -3
  225. package/dist/typography/layout/Layout.svelte +1 -1
  226. package/dist/typography/layout/Layout.svelte.d.ts +1 -1
  227. package/dist/typography/list/Li.svelte +1 -1
  228. package/dist/typography/list/Li.svelte.d.ts +1 -1
  229. package/dist/typography/list/List.svelte +1 -1
  230. package/dist/typography/list/List.svelte.d.ts +1 -1
  231. package/dist/typography/mark/Mark.svelte +1 -1
  232. package/dist/typography/mark/Mark.svelte.d.ts +1 -1
  233. package/dist/typography/paragraph/P.svelte +1 -1
  234. package/dist/typography/paragraph/P.svelte.d.ts +1 -1
  235. package/dist/typography/secondary/Secondary.svelte +1 -1
  236. package/dist/typography/secondary/Secondary.svelte.d.ts +1 -1
  237. package/dist/typography/span/Span.svelte +1 -1
  238. package/dist/typography/span/Span.svelte.d.ts +1 -1
  239. package/dist/utils/Arrow.svelte +1 -1
  240. package/dist/utils/Arrow.svelte.d.ts +1 -1
  241. package/dist/utils/Popper.svelte +33 -4
  242. package/dist/utils/Popper.svelte.d.ts +1 -1
  243. package/dist/video/Video.svelte +1 -1
  244. package/dist/video/Video.svelte.d.ts +1 -1
  245. package/package.json +9 -7
@@ -1,46 +1,95 @@
1
1
  import { type VariantProps } from "tailwind-variants";
2
- export type ListgroupVariants = VariantProps<typeof listGroup>;
3
- export type ListgroupItemVariants = VariantProps<typeof listGroupItem>;
2
+ import type { Classes } from "../theme/themeUtils";
3
+ export type ListgroupVariants = VariantProps<typeof listGroup> & Classes<typeof listGroup>;
4
+ export type ListgroupItemVariants = VariantProps<typeof listGroupItem> & Classes<typeof listGroupItem>;
4
5
  export declare const listGroup: import("tailwind-variants").TVReturnType<{
5
6
  rounded: {
6
- true: string;
7
- false: string;
7
+ true: {
8
+ base: string;
9
+ };
10
+ false: {
11
+ base: string;
12
+ };
8
13
  };
9
14
  border: {
10
- true: string;
11
- false: string;
15
+ true: {
16
+ base: string;
17
+ };
18
+ false: {
19
+ base: string;
20
+ };
12
21
  };
13
22
  horizontal: {
14
- true: string;
15
- false: string;
16
- };
17
- }, undefined, "flex bg-white dark:bg-gray-800 text-gray-500 dark:text-gray-400 divide-gray-200 dark:divide-gray-600", {
23
+ true: {
24
+ base: string;
25
+ };
26
+ false: {
27
+ base: string;
28
+ };
29
+ };
30
+ }, {
31
+ base: string;
32
+ item: string;
33
+ icon: string;
34
+ }, undefined, {
18
35
  rounded: {
19
- true: string;
20
- false: string;
36
+ true: {
37
+ base: string;
38
+ };
39
+ false: {
40
+ base: string;
41
+ };
21
42
  };
22
43
  border: {
23
- true: string;
24
- false: string;
44
+ true: {
45
+ base: string;
46
+ };
47
+ false: {
48
+ base: string;
49
+ };
25
50
  };
26
51
  horizontal: {
27
- true: string;
28
- false: string;
29
- };
30
- }, undefined, import("tailwind-variants").TVReturnType<{
52
+ true: {
53
+ base: string;
54
+ };
55
+ false: {
56
+ base: string;
57
+ };
58
+ };
59
+ }, {
60
+ base: string;
61
+ item: string;
62
+ icon: string;
63
+ }, import("tailwind-variants").TVReturnType<{
31
64
  rounded: {
32
- true: string;
33
- false: string;
65
+ true: {
66
+ base: string;
67
+ };
68
+ false: {
69
+ base: string;
70
+ };
34
71
  };
35
72
  border: {
36
- true: string;
37
- false: string;
73
+ true: {
74
+ base: string;
75
+ };
76
+ false: {
77
+ base: string;
78
+ };
38
79
  };
39
80
  horizontal: {
40
- true: string;
41
- false: string;
42
- };
43
- }, undefined, "flex bg-white dark:bg-gray-800 text-gray-500 dark:text-gray-400 divide-gray-200 dark:divide-gray-600", unknown, unknown, undefined>>;
81
+ true: {
82
+ base: string;
83
+ };
84
+ false: {
85
+ base: string;
86
+ };
87
+ };
88
+ }, {
89
+ base: string;
90
+ item: string;
91
+ icon: string;
92
+ }, undefined, unknown, unknown, undefined>>;
44
93
  export declare const listGroupItem: import("tailwind-variants").TVReturnType<{
45
94
  state: {
46
95
  normal: string;
@@ -55,7 +104,10 @@ export declare const listGroupItem: import("tailwind-variants").TVReturnType<{
55
104
  true: string;
56
105
  false: string;
57
106
  };
58
- }, undefined, "py-2 px-4 w-full text-sm font-medium list-none flex items-center text-left gap-2", {
107
+ }, {
108
+ base: string;
109
+ icon: string;
110
+ }, undefined, {
59
111
  state: {
60
112
  normal: string;
61
113
  current: string;
@@ -69,7 +121,10 @@ export declare const listGroupItem: import("tailwind-variants").TVReturnType<{
69
121
  true: string;
70
122
  false: string;
71
123
  };
72
- }, undefined, import("tailwind-variants").TVReturnType<{
124
+ }, {
125
+ base: string;
126
+ icon: string;
127
+ }, import("tailwind-variants").TVReturnType<{
73
128
  state: {
74
129
  normal: string;
75
130
  current: string;
@@ -83,4 +138,7 @@ export declare const listGroupItem: import("tailwind-variants").TVReturnType<{
83
138
  true: string;
84
139
  false: string;
85
140
  };
86
- }, undefined, "py-2 px-4 w-full text-sm font-medium list-none flex items-center text-left gap-2", unknown, unknown, undefined>>;
141
+ }, {
142
+ base: string;
143
+ icon: string;
144
+ }, undefined, unknown, unknown, undefined>>;
@@ -1,24 +1,28 @@
1
1
  import { tv } from "tailwind-variants";
2
2
  export const listGroup = tv({
3
- base: "flex bg-white dark:bg-gray-800 text-gray-500 dark:text-gray-400 divide-gray-200 dark:divide-gray-600",
3
+ slots: {
4
+ base: "flex bg-white dark:bg-gray-800 text-gray-500 dark:text-gray-400 divide-gray-200 dark:divide-gray-600",
5
+ item: "",
6
+ icon: ""
7
+ },
4
8
  variants: {
5
9
  rounded: {
6
- true: "rounded-lg",
7
- false: ""
10
+ true: { base: "rounded-lg" },
11
+ false: { base: "" }
8
12
  },
9
13
  border: {
10
- true: "border border-gray-200 dark:border-gray-700",
11
- false: ""
14
+ true: { base: "border border-gray-200 dark:border-gray-700" },
15
+ false: { base: "" }
12
16
  },
13
17
  horizontal: {
14
- true: "flex-row divide-x",
15
- false: "flex-col divide-y"
18
+ true: { base: "flex-row divide-x" },
19
+ false: { base: "flex-col divide-y" }
16
20
  }
17
21
  },
18
22
  compoundVariants: [
19
23
  {
20
24
  border: true,
21
- class: "divide-gray-200 dark:divide-gray-700"
25
+ class: { base: "divide-gray-200 dark:divide-gray-700" }
22
26
  }
23
27
  ],
24
28
  defaultVariants: {
@@ -28,12 +32,15 @@ export const listGroup = tv({
28
32
  }
29
33
  });
30
34
  export const listGroupItem = tv({
31
- base: "py-2 px-4 w-full text-sm font-medium list-none flex items-center text-left gap-2",
35
+ slots: {
36
+ base: "py-2 px-4 w-full text-sm font-medium list-none flex items-center text-left gap-2",
37
+ icon: "w-4 h-4 me-1.5"
38
+ },
32
39
  variants: {
33
40
  state: {
34
41
  normal: "",
35
42
  current: "text-white bg-primary-700 dark:text-white dark:bg-gray-800",
36
- disabled: "text-gray-900 bg-gray-100 dark:bg-gray-600 dark:text-gray-400"
43
+ disabled: "text-gray-900 bg-gray-100 dark:bg-gray-600 dark:text-gray-400 opacity-50"
37
44
  },
38
45
  active: {
39
46
  true: "",
@@ -55,13 +62,5 @@ export const listGroupItem = tv({
55
62
  state: "normal",
56
63
  class: "hover:bg-gray-100 hover:text-primary-700 dark:hover:bg-gray-600 dark:hover:text-white focus:z-40 focus:outline-hidden focus:ring-2 focus:ring-primary-700 focus:text-primary-700 dark:focus:ring-gray-500 dark:focus:text-white"
57
64
  }
58
- // {
59
- // horizontal: true,
60
- // class: "focus:first:rounded-s-lg focus:last:rounded-e-lg"
61
- // },
62
- // {
63
- // horizontal: false,
64
- // class: "focus:first:rounded-t-lg focus:last:rounded-b-lg"
65
- // }
66
65
  ]
67
66
  });
@@ -3,25 +3,18 @@
3
3
  import clsx from "clsx";
4
4
  import type { MegaMenuProps } from "..";
5
5
  import Popper from "../utils/Popper.svelte";
6
- import { getTheme, warnThemeDeprecation } from "../theme/themeUtils";
7
- import { untrack } from "svelte";
6
+ import { getTheme } from "../theme/themeUtils";
8
7
 
9
- let { children, extra, items = [], full, ulClass, isOpen = $bindable(false), class: className, extraClass, classes, ...restProps }: MegaMenuProps = $props();
8
+ let { children, extra, items = [], full, isOpen = $bindable(false), class: className, classes, ...restProps }: MegaMenuProps = $props();
10
9
 
11
- warnThemeDeprecation(
12
- "MegaMenu",
13
- untrack(() => ({ ulClass, extraClass })),
14
- { ulClass: "ul", extraClass: "extra" }
15
- );
16
-
17
- const styling = $derived(classes ?? { ul: ulClass, extra: extraClass });
10
+ const styling = $derived(classes);
18
11
  const theme = $derived(getTheme("megamenu"));
19
12
  const { base, div, ul, extra: extraCls } = $derived(megamenu({ full, hasExtra: !!extra }));
20
13
  </script>
21
14
 
22
15
  <Popper arrow={false} bind:isOpen trigger="click" placement="bottom" yOnly={full} {...restProps} class={base({ class: clsx(theme?.base, className) })}>
23
- <div class={div({ class: clsx(theme?.div, classes?.div) })}>
24
- <ul class={ul({ class: clsx(theme?.ul, styling.ul) })}>
16
+ <div class={div({ class: clsx(theme?.div, styling?.div) })}>
17
+ <ul class={ul({ class: clsx(theme?.ul, styling?.ul) })}>
25
18
  {#each items as item, index (item.name)}
26
19
  <li>
27
20
  {@render children({ item, index })}
@@ -30,7 +23,7 @@
30
23
  {@render children({ item: items[0], index: 0 })}
31
24
  {/each}
32
25
  </ul>
33
- {#if full && extra}<div class={extraCls({ class: clsx(theme?.extra, styling.extra) })}>{@render extra()}</div>{/if}
26
+ {#if full && extra}<div class={extraCls({ class: clsx(theme?.extra, styling?.extra) })}>{@render extra()}</div>{/if}
34
27
  </div>
35
28
  </Popper>
36
29
 
@@ -38,16 +31,14 @@
38
31
  @component
39
32
  [Go to docs](https://flowbite-svelte.com/)
40
33
  ## Type
41
- [MegaMenuProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1091)
34
+ [MegaMenuProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1048)
42
35
  ## Props
43
36
  @prop children
44
37
  @prop extra
45
38
  @prop items = []
46
39
  @prop full
47
- @prop ulClass
48
40
  @prop isOpen = $bindable(false)
49
41
  @prop class: className
50
- @prop extraClass
51
42
  @prop classes
52
43
  @prop ...restProps
53
44
  -->
@@ -2,16 +2,14 @@ import type { MegaMenuProps } from "..";
2
2
  /**
3
3
  * [Go to docs](https://flowbite-svelte.com/)
4
4
  * ## Type
5
- * [MegaMenuProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1091)
5
+ * [MegaMenuProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1048)
6
6
  * ## Props
7
7
  * @prop children
8
8
  * @prop extra
9
9
  * @prop items = []
10
10
  * @prop full
11
- * @prop ulClass
12
11
  * @prop isOpen = $bindable(false)
13
12
  * @prop class: className
14
- * @prop extraClass
15
13
  * @prop classes
16
14
  * @prop ...restProps
17
15
  */
@@ -2,12 +2,11 @@
2
2
  import type { ModalProps } from "..";
3
3
  import Dialog from "../dialog/Dialog.svelte";
4
4
  import CloseButton from "../utils/CloseButton.svelte";
5
- import { getTheme, warnThemeDeprecation } from "../theme/themeUtils";
5
+ import { getTheme } from "../theme/themeUtils";
6
6
  import clsx from "clsx";
7
7
  import { sineIn } from "svelte/easing";
8
8
  import { fade } from "svelte/transition";
9
9
  import { modal as modalStyle } from "./theme";
10
- import { untrack } from "svelte";
11
10
 
12
11
  let {
13
12
  children,
@@ -17,10 +16,6 @@
17
16
  open = $bindable(false),
18
17
  permanent = false,
19
18
  dismissable = true,
20
- closeBtnClass,
21
- headerClass,
22
- bodyClass,
23
- footerClass,
24
19
  size = "md",
25
20
  placement,
26
21
  class: className,
@@ -31,13 +26,7 @@
31
26
  ...restProps
32
27
  }: ModalProps = $props();
33
28
 
34
- warnThemeDeprecation(
35
- "Modal",
36
- untrack(() => ({ headerClass, bodyClass, footerClass, closeBtnClass })),
37
- { bodyClass: "body", headerClass: "header", footerClass: "footer", closeBtnClass: "close" }
38
- );
39
-
40
- const styling = $derived(classes ?? { header: headerClass, body: bodyClass, footer: footerClass, close: closeBtnClass });
29
+ const styling = $derived(classes);
41
30
 
42
31
  const theme = $derived(getTheme("modal"));
43
32
 
@@ -58,22 +47,22 @@
58
47
  class={base({ fullscreen, class: clsx(theme?.base, className) })}
59
48
  >
60
49
  {#if title || header}
61
- <div class={headerCls({ class: clsx(theme?.header, styling.header) })}>
50
+ <div class={headerCls({ class: clsx(theme?.header, styling?.header) })}>
62
51
  {#if title}
63
52
  <h3>{title}</h3>
64
53
  {#if dismissable && !permanent}
65
- <CloseButton type="submit" formnovalidate class={clsx(styling.close)} />
54
+ <CloseButton type="submit" formnovalidate class={clsx(theme?.close, styling?.close)} />
66
55
  {/if}
67
56
  {:else if header}
68
57
  {@render header()}
69
58
  {/if}
70
59
  </div>
71
60
  {/if}
72
- <div class={body({ class: clsx(theme?.body, styling.body) })}>
61
+ <div class={body({ class: clsx(theme?.body, styling?.body) })}>
73
62
  {@render children?.()}
74
63
  </div>
75
64
  {#if footer}
76
- <div class={footerCls({ class: clsx(theme?.footer, styling.footer) })}>
65
+ <div class={footerCls({ class: clsx(theme?.footer, styling?.footer) })}>
77
66
  {@render footer()}
78
67
  </div>
79
68
  {/if}
@@ -83,7 +72,7 @@
83
72
  @component
84
73
  [Go to docs](https://flowbite-svelte.com/)
85
74
  ## Type
86
- [ModalProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1102)
75
+ [ModalProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1057)
87
76
  ## Props
88
77
  @prop children
89
78
  @prop header
@@ -92,10 +81,6 @@
92
81
  @prop open = $bindable(false)
93
82
  @prop permanent = false
94
83
  @prop dismissable = true
95
- @prop closeBtnClass
96
- @prop headerClass
97
- @prop bodyClass
98
- @prop footerClass
99
84
  @prop size = "md"
100
85
  @prop placement
101
86
  @prop class: className
@@ -2,7 +2,7 @@ import type { ModalProps } from "..";
2
2
  /**
3
3
  * [Go to docs](https://flowbite-svelte.com/)
4
4
  * ## Type
5
- * [ModalProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1102)
5
+ * [ModalProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1057)
6
6
  * ## Props
7
7
  * @prop children
8
8
  * @prop header
@@ -11,10 +11,6 @@ import type { ModalProps } from "..";
11
11
  * @prop open = $bindable(false)
12
12
  * @prop permanent = false
13
13
  * @prop dismissable = true
14
- * @prop closeBtnClass
15
- * @prop headerClass
16
- * @prop bodyClass
17
- * @prop footerClass
18
14
  * @prop size = "md"
19
15
  * @prop placement
20
16
  * @prop class: className
@@ -63,6 +63,7 @@ export declare const modal: import("tailwind-variants").TVReturnType<{
63
63
  header: string;
64
64
  footer: string;
65
65
  body: string;
66
+ close: string;
66
67
  }, undefined, {}, {
67
68
  base: string;
68
69
  form: string;
@@ -7,7 +7,8 @@ export const modal = tv({
7
7
  form: "rounded-lg divide-y",
8
8
  header: "flex items-center p-4 md:p-5 justify-between rounded-t-lg shrink-0 text-xl font-semibold text-gray-900 dark:text-white",
9
9
  footer: "flex items-center p-4 md:p-5 space-x-3 rtl:space-x-reverse rounded-b-lg shrink-0",
10
- body: "p-4 md:p-5 space-y-4 overflow-y-auto overscroll-contain"
10
+ body: "p-4 md:p-5 space-y-4 overflow-y-auto overscroll-contain",
11
+ close: ""
11
12
  },
12
13
  variants: {
13
14
  fullscreen: {
@@ -2,7 +2,7 @@
2
2
  import type { MenuProps } from "../types";
3
3
  import clsx from "clsx";
4
4
 
5
- let { size = "24", color = "currentColor", variation = "outline", ariaLabel = "bars 3", class: className, ...restProps }: MenuProps = $props();
5
+ let { size = "24", color = "currentColor", variation = "outline", class: className, ...restProps }: MenuProps = $props();
6
6
 
7
7
  let viewBox: string = $state("0 0 24 24");
8
8
  let svgpath: string = $state("");
@@ -27,7 +27,7 @@
27
27
  });
28
28
  </script>
29
29
 
30
- <svg xmlns="http://www.w3.org/2000/svg" role="button" tabindex="0" width={size} height={size} class={clsx(className)} {...restProps} aria-label={ariaLabel} fill="none" {viewBox} stroke-width="2">
30
+ <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width={size} height={size} class={clsx(className)} {...restProps} fill="none" {viewBox} stroke-width="2">
31
31
  {@html svgpath}
32
32
  </svg>
33
33
 
@@ -35,12 +35,11 @@
35
35
  @component
36
36
  [Go to docs](https://flowbite-svelte.com/)
37
37
  ## Type
38
- [MenuProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1113)
38
+ [MenuProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1064)
39
39
  ## Props
40
40
  @prop size = "24"
41
41
  @prop color = "currentColor"
42
42
  @prop variation = "outline"
43
- @prop ariaLabel = "bars 3"
44
43
  @prop class: className
45
44
  @prop ...restProps
46
45
  -->
@@ -2,12 +2,11 @@ import type { MenuProps } from "../types";
2
2
  /**
3
3
  * [Go to docs](https://flowbite-svelte.com/)
4
4
  * ## Type
5
- * [MenuProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1113)
5
+ * [MenuProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1064)
6
6
  * ## Props
7
7
  * @prop size = "24"
8
8
  * @prop color = "currentColor"
9
9
  * @prop variation = "outline"
10
- * @prop ariaLabel = "bars 3"
11
10
  * @prop class: className
12
11
  * @prop ...restProps
13
12
  */
@@ -17,7 +17,7 @@
17
17
  @component
18
18
  [Go to docs](https://flowbite-svelte.com/)
19
19
  ## Type
20
- [NavBrandProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1137)
20
+ [NavBrandProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1086)
21
21
  ## Props
22
22
  @prop children
23
23
  @prop class: className
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * [Go to docs](https://flowbite-svelte.com/)
3
3
  * ## Type
4
- * [NavBrandProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1137)
4
+ * [NavBrandProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1086)
5
5
  * ## Props
6
6
  * @prop children
7
7
  * @prop class: className
@@ -17,7 +17,7 @@
17
17
  @component
18
18
  [Go to docs](https://flowbite-svelte.com/)
19
19
  ## Type
20
- [NavContainerProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1139)
20
+ [NavContainerProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1088)
21
21
  ## Props
22
22
  @prop children
23
23
  @prop fluid
@@ -2,7 +2,7 @@ import type { NavContainerProps } from "../types";
2
2
  /**
3
3
  * [Go to docs](https://flowbite-svelte.com/)
4
4
  * ## Type
5
- * [NavContainerProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1139)
5
+ * [NavContainerProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1088)
6
6
  * ## Props
7
7
  * @prop children
8
8
  * @prop fluid
@@ -5,24 +5,19 @@
5
5
  import { navbarHamburger } from "./theme";
6
6
  import type { NavHamburgerProps } from "../types";
7
7
  import type { MouseEventHandler } from "svelte/elements";
8
- import { getTheme, warnThemeDeprecation } from "../theme/themeUtils";
8
+ import { getTheme } from "../theme/themeUtils";
9
9
  import { getNavbarStateContext, getNavbarBreakpointContext } from "../context";
10
- import { untrack } from "svelte";
11
10
 
12
- let { children, onclick, menuClass, class: className, classes, name = "Open main menu", ...restProps }: NavHamburgerProps = $props();
11
+ let { children, onclick, class: className, classes, name = "Open main menu", ...restProps }: NavHamburgerProps = $props();
13
12
 
14
- warnThemeDeprecation(
15
- "NavHamburger",
16
- untrack(() => ({ menuClass })),
17
- { menuClass: "menu" }
18
- );
19
-
20
- const styling = $derived(classes ?? { menu: menuClass });
13
+ const styling = $derived(classes);
21
14
 
22
15
  const theme = $derived(getTheme("navbarHamburger"));
23
16
  const navState = getNavbarStateContext();
24
- const navBreakpoint = getNavbarBreakpointContext();
25
- const { base, menu } = navbarHamburger({ breakpoint: navBreakpoint ?? "md" });
17
+
18
+ // Reactively get the breakpoint - use $derived to ensure it updates
19
+ const navBreakpoint = $derived(getNavbarBreakpointContext());
20
+ const { base, menu } = $derived(navbarHamburger({ breakpoint: navBreakpoint ?? "md" }));
26
21
 
27
22
  const toggle: MouseEventHandler<HTMLButtonElement> = () => {
28
23
  if (!navState) return;
@@ -30,19 +25,18 @@
30
25
  };
31
26
  </script>
32
27
 
33
- <ToolbarButton {name} onclick={onclick || toggle} {...restProps} class={base({ class: clsx(theme?.base, className) })}>
34
- <Menu class={menu({ class: clsx(theme?.menu, styling.menu) })} />
28
+ <ToolbarButton {name} onclick={onclick || toggle} aria-expanded={navState ? !navState.hidden : undefined} {...restProps} class={base({ class: clsx(theme?.base, className) })}>
29
+ <Menu class={menu({ class: clsx(theme?.menu, styling?.menu) })} />
35
30
  </ToolbarButton>
36
31
 
37
32
  <!--
38
33
  @component
39
34
  [Go to docs](https://flowbite-svelte.com/)
40
35
  ## Type
41
- [NavHamburgerProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1143)
36
+ [NavHamburgerProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1092)
42
37
  ## Props
43
38
  @prop children
44
39
  @prop onclick
45
- @prop menuClass
46
40
  @prop class: className
47
41
  @prop classes
48
42
  @prop name = "Open main menu"
@@ -1,11 +1,10 @@
1
1
  /**
2
2
  * [Go to docs](https://flowbite-svelte.com/)
3
3
  * ## Type
4
- * [NavHamburgerProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1143)
4
+ * [NavHamburgerProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1092)
5
5
  * ## Props
6
6
  * @prop children
7
7
  * @prop onclick
8
- * @prop menuClass
9
8
  * @prop class: className
10
9
  * @prop classes
11
10
  * @prop name = "Open main menu"
@@ -125,7 +124,6 @@ declare const NavHamburger: import("svelte").Component<import("../toolbar/theme"
125
124
  menu: string;
126
125
  }, undefined, unknown, unknown, undefined>>> & {
127
126
  href?: undefined;
128
- menuClass?: import("svelte/elements").ClassValue;
129
127
  }, {}, "">;
130
128
  type NavHamburger = ReturnType<typeof NavHamburger>;
131
129
  export default NavHamburger;
@@ -6,7 +6,9 @@
6
6
  import { getNavbarStateContext, getNavbarBreakpointContext } from "../context";
7
7
 
8
8
  let navState = getNavbarStateContext();
9
- let navBreakpoint = getNavbarBreakpointContext();
9
+
10
+ // Reactively get the breakpoint - use $derived to ensure it updates
11
+ let navBreakpoint = $derived(getNavbarBreakpointContext());
10
12
 
11
13
  let { children, onclick, activeClass, nonActiveClass, class: className, ...restProps }: NavLiProps = $props();
12
14
 
@@ -22,9 +24,11 @@
22
24
  );
23
25
 
24
26
  function handleClick(event: MouseEvent) {
27
+ const tagName = (event.currentTarget as HTMLElement).tagName;
25
28
  // Close the mobile menu when a link is clicked
26
- if (navState && restProps.href !== undefined && !navState.hidden) {
27
- navState.hidden = true;
29
+ const state = navState;
30
+ if (state && tagName === "A" && !state.hidden) {
31
+ state.hidden = true;
28
32
  }
29
33
 
30
34
  // Call original onclick handler if provided
@@ -51,7 +55,7 @@
51
55
  @component
52
56
  [Go to docs](https://flowbite-svelte.com/)
53
57
  ## Type
54
- [NavLiProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1164)
58
+ [NavLiProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1109)
55
59
  ## Props
56
60
  @prop children
57
61
  @prop onclick
@@ -2,7 +2,7 @@ import type { NavLiProps } from "../types";
2
2
  /**
3
3
  * [Go to docs](https://flowbite-svelte.com/)
4
4
  * ## Type
5
- * [NavLiProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1164)
5
+ * [NavLiProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1109)
6
6
  * ## Props
7
7
  * @prop children
8
8
  * @prop onclick