flowbite-svelte 1.10.4 → 1.10.6

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 (219) hide show
  1. package/dist/accordion/Accordion.svelte +4 -4
  2. package/dist/accordion/AccordionItem.svelte +7 -6
  3. package/dist/accordion/theme.d.ts +3 -2
  4. package/dist/alert/Alert.svelte +10 -12
  5. package/dist/alert/theme.d.ts +2 -1
  6. package/dist/avatar/Avatar.svelte +9 -11
  7. package/dist/avatar/theme.d.ts +2 -1
  8. package/dist/badge/Badge.svelte +4 -3
  9. package/dist/badge/theme.d.ts +2 -1
  10. package/dist/banner/Banner.svelte +5 -4
  11. package/dist/banner/theme.d.ts +2 -1
  12. package/dist/bottom-navigation/BottomNav.svelte +3 -2
  13. package/dist/bottom-navigation/BottomNavHeader.svelte +4 -3
  14. package/dist/bottom-navigation/BottomNavHeaderItem.svelte +4 -3
  15. package/dist/bottom-navigation/BottomNavItem.svelte +4 -3
  16. package/dist/bottom-navigation/theme.d.ts +5 -4
  17. package/dist/breadcrumb/Breadcrumb.svelte +4 -3
  18. package/dist/breadcrumb/BreadcrumbItem.svelte +7 -6
  19. package/dist/breadcrumb/theme.d.ts +3 -2
  20. package/dist/button-group/ButtonGroup.svelte +3 -2
  21. package/dist/button-group/theme.d.ts +2 -1
  22. package/dist/buttons/Button.svelte +3 -2
  23. package/dist/buttons/GradientButton.svelte +5 -4
  24. package/dist/buttons/theme.d.ts +3 -2
  25. package/dist/card/Card.svelte +4 -4
  26. package/dist/card/theme.d.ts +2 -1
  27. package/dist/carousel/Carousel.svelte +5 -4
  28. package/dist/carousel/CarouselIndicators.svelte +4 -3
  29. package/dist/carousel/ControlButton.svelte +7 -4
  30. package/dist/carousel/Controls.svelte +4 -3
  31. package/dist/carousel/Slide.svelte +3 -2
  32. package/dist/carousel/Thumbnail.svelte +2 -2
  33. package/dist/carousel/Thumbnails.svelte +3 -3
  34. package/dist/carousel/theme.d.ts +20 -9
  35. package/dist/carousel/theme.js +4 -1
  36. package/dist/clipboard/Clipboard.svelte +2 -2
  37. package/dist/clipboard/theme.d.ts +2 -1
  38. package/dist/darkmode/DarkMode.svelte +3 -2
  39. package/dist/darkmode/theme.d.ts +2 -1
  40. package/dist/datepicker/Datepicker.svelte +27 -23
  41. package/dist/datepicker/theme.d.ts +1 -1
  42. package/dist/drawer/Drawer.svelte +4 -3
  43. package/dist/drawer/Drawerhead.svelte +5 -4
  44. package/dist/drawer/theme.d.ts +3 -2
  45. package/dist/dropdown/Dropdown.svelte +3 -2
  46. package/dist/dropdown/DropdownDivider.svelte +3 -2
  47. package/dist/dropdown/DropdownGroup.svelte +3 -2
  48. package/dist/dropdown/DropdownHeader.svelte +3 -2
  49. package/dist/dropdown/DropdownItem.svelte +4 -3
  50. package/dist/dropdown/theme.d.ts +6 -5
  51. package/dist/footer/Footer.svelte +4 -3
  52. package/dist/footer/FooterBrand.svelte +6 -5
  53. package/dist/footer/FooterCopyright.svelte +5 -4
  54. package/dist/footer/FooterIcon.svelte +3 -2
  55. package/dist/footer/FooterLink.svelte +4 -3
  56. package/dist/footer/FooterLinkGroup.svelte +3 -2
  57. package/dist/footer/theme.d.ts +7 -6
  58. package/dist/forms/button-toggle/ButtonToggle.svelte +7 -6
  59. package/dist/forms/button-toggle/ButtonToggleGroup.svelte +6 -5
  60. package/dist/forms/button-toggle/CheckIcon.svelte +3 -2
  61. package/dist/forms/button-toggle/theme.d.ts +5 -4
  62. package/dist/forms/checkbox/Checkbox.svelte +6 -5
  63. package/dist/forms/checkbox/CheckboxButton.svelte +3 -2
  64. package/dist/forms/checkbox/theme.d.ts +3 -2
  65. package/dist/forms/dropzone/Dropzone.svelte +3 -2
  66. package/dist/forms/dropzone/theme.d.ts +2 -1
  67. package/dist/forms/fileupload/Fileupload.svelte +5 -4
  68. package/dist/forms/fileupload/theme.d.ts +2 -1
  69. package/dist/forms/floating-label/FloatingLabelInput.svelte +7 -6
  70. package/dist/forms/floating-label/theme.d.ts +2 -1
  71. package/dist/forms/helper/Helper.svelte +3 -2
  72. package/dist/forms/helper/theme.d.ts +2 -1
  73. package/dist/forms/input-addon/InputAddon.svelte +3 -2
  74. package/dist/forms/input-field/Input.svelte +11 -10
  75. package/dist/forms/input-field/theme.d.ts +2 -1
  76. package/dist/forms/label/Label.svelte +3 -2
  77. package/dist/forms/label/theme.d.ts +2 -1
  78. package/dist/forms/phoneinput/PhoneInput.svelte +7 -7
  79. package/dist/forms/phoneinput/theme.d.ts +1 -1
  80. package/dist/forms/radio/Radio.svelte +4 -3
  81. package/dist/forms/radio/RadioButton.svelte +3 -2
  82. package/dist/forms/radio/theme.d.ts +3 -2
  83. package/dist/forms/range/Range.svelte +3 -2
  84. package/dist/forms/range/theme.d.ts +2 -1
  85. package/dist/forms/search/Search.svelte +8 -7
  86. package/dist/forms/search/theme.d.ts +2 -1
  87. package/dist/forms/select/MultiSelect.svelte +7 -6
  88. package/dist/forms/select/Select.svelte +5 -4
  89. package/dist/forms/select/theme.d.ts +3 -2
  90. package/dist/forms/tags/Tags.svelte +7 -6
  91. package/dist/forms/tags/theme.d.ts +2 -1
  92. package/dist/forms/textarea/Textarea.svelte +11 -10
  93. package/dist/forms/textarea/theme.d.ts +2 -1
  94. package/dist/forms/timepicker/Timepicker.svelte +38 -37
  95. package/dist/forms/timepicker/theme.d.ts +2 -1
  96. package/dist/forms/toggle/Toggle.svelte +5 -4
  97. package/dist/forms/toggle/theme.d.ts +2 -1
  98. package/dist/gallery/Gallery.svelte +4 -3
  99. package/dist/gallery/theme.d.ts +2 -1
  100. package/dist/indicator/Indicator.svelte +5 -3
  101. package/dist/indicator/theme.d.ts +2 -1
  102. package/dist/kbd/Kbd.svelte +3 -2
  103. package/dist/kbd/theme.d.ts +2 -1
  104. package/dist/list-group/Listgroup.svelte +6 -5
  105. package/dist/list-group/ListgroupItem.svelte +7 -6
  106. package/dist/list-group/theme.d.ts +3 -2
  107. package/dist/mega-menu/MegaMenu.svelte +6 -5
  108. package/dist/mega-menu/theme.d.ts +2 -1
  109. package/dist/modal/Modal.svelte +7 -7
  110. package/dist/modal/theme.d.ts +2 -1
  111. package/dist/navbar/Menu.svelte +1 -2
  112. package/dist/navbar/NavBrand.svelte +1 -2
  113. package/dist/navbar/NavContainer.svelte +1 -2
  114. package/dist/navbar/NavHamburger.svelte +2 -3
  115. package/dist/navbar/NavHamburger.svelte.d.ts +1 -2
  116. package/dist/navbar/NavLi.svelte +1 -2
  117. package/dist/navbar/NavUl.svelte +4 -5
  118. package/dist/navbar/Navbar.svelte +2 -2
  119. package/dist/navbar/theme.d.ts +6 -5
  120. package/dist/pagination/Pagination.svelte +2 -2
  121. package/dist/pagination/PaginationButton.svelte +10 -13
  122. package/dist/pagination/PaginationItem.svelte +1 -2
  123. package/dist/pagination/PaginationNav.svelte +7 -7
  124. package/dist/pagination/theme.d.ts +5 -4
  125. package/dist/popover/Popover.svelte +4 -5
  126. package/dist/popover/theme.d.ts +2 -1
  127. package/dist/progress/Progressbar.svelte +6 -7
  128. package/dist/progress/Progressradial.svelte +7 -8
  129. package/dist/progress/theme.d.ts +2 -2
  130. package/dist/rating/AdvancedRating.svelte +5 -6
  131. package/dist/rating/Rating.svelte +2 -3
  132. package/dist/rating/Review.svelte +7 -8
  133. package/dist/rating/ScoreRating.svelte +8 -8
  134. package/dist/rating/theme.d.ts +5 -4
  135. package/dist/sidebar/Sidebar.svelte +27 -62
  136. package/dist/sidebar/SidebarBrand.svelte +3 -4
  137. package/dist/sidebar/SidebarButton.svelte +1 -2
  138. package/dist/sidebar/SidebarCta.svelte +3 -4
  139. package/dist/sidebar/SidebarDropdownWrapper.svelte +6 -7
  140. package/dist/sidebar/SidebarItem.svelte +5 -4
  141. package/dist/sidebar/theme.d.ts +12 -23
  142. package/dist/sidebar/theme.js +6 -45
  143. package/dist/skeleton/CardPlaceholder.svelte +11 -12
  144. package/dist/skeleton/ImagePlaceholder.svelte +39 -12
  145. package/dist/skeleton/ListPlaceholder.svelte +26 -8
  146. package/dist/skeleton/Skeleton.svelte +24 -9
  147. package/dist/skeleton/TestimonialPlaceholder.svelte +27 -8
  148. package/dist/skeleton/TextPlaceholder.svelte +49 -26
  149. package/dist/skeleton/VideoPlaceholder.svelte +2 -3
  150. package/dist/skeleton/WidgetPlaceholder.svelte +1 -2
  151. package/dist/skeleton/theme.d.ts +9 -8
  152. package/dist/speed-dial/SpeedDial.svelte +3 -3
  153. package/dist/speed-dial/SpeedDialButton.svelte +3 -3
  154. package/dist/speed-dial/theme.d.ts +3 -2
  155. package/dist/spinner/Spinner.svelte +2 -3
  156. package/dist/spinner/theme.d.ts +2 -1
  157. package/dist/stepindicator/StepIndicator.svelte +10 -9
  158. package/dist/stepindicator/theme.d.ts +2 -1
  159. package/dist/stepper/BreadcrumbStepper.svelte +9 -10
  160. package/dist/stepper/DetailedStepper.svelte +4 -4
  161. package/dist/stepper/ProgressStepper.svelte +8 -11
  162. package/dist/stepper/Stepper.svelte +12 -18
  163. package/dist/stepper/TimelineStepper.svelte +4 -4
  164. package/dist/stepper/VerticalStepper.svelte +4 -4
  165. package/dist/table/Table.svelte +3 -3
  166. package/dist/table/TableBody.svelte +1 -2
  167. package/dist/table/TableBodyCell.svelte +1 -2
  168. package/dist/table/TableBodyRow.svelte +2 -3
  169. package/dist/table/TableHead.svelte +2 -3
  170. package/dist/table/TableHeadCell.svelte +1 -2
  171. package/dist/table/TableSearch.svelte +9 -9
  172. package/dist/table/theme.d.ts +6 -6
  173. package/dist/tabs/TabItem.svelte +5 -4
  174. package/dist/tabs/Tabs.svelte +3 -4
  175. package/dist/tabs/theme.d.ts +3 -2
  176. package/dist/timeline/Activity.svelte +1 -2
  177. package/dist/timeline/ActivityItem.svelte +9 -9
  178. package/dist/timeline/Group.svelte +4 -4
  179. package/dist/timeline/GroupItem.svelte +6 -6
  180. package/dist/timeline/Timeline.svelte +2 -3
  181. package/dist/timeline/TimelineItem.svelte +7 -7
  182. package/dist/timeline/theme.d.ts +7 -6
  183. package/dist/toast/Toast.svelte +5 -5
  184. package/dist/toast/theme.d.ts +2 -1
  185. package/dist/toolbar/Toolbar.svelte +2 -3
  186. package/dist/toolbar/ToolbarButton.svelte +4 -5
  187. package/dist/toolbar/ToolbarGroup.svelte +2 -3
  188. package/dist/toolbar/theme.d.ts +4 -3
  189. package/dist/tooltip/Tooltip.svelte +1 -2
  190. package/dist/tooltip/theme.d.ts +2 -1
  191. package/dist/types.d.ts +2 -3
  192. package/dist/typography/anchor/A.svelte +3 -4
  193. package/dist/typography/anchor/theme.d.ts +2 -1
  194. package/dist/typography/blockquote/Blockquote.svelte +3 -4
  195. package/dist/typography/blockquote/theme.d.ts +2 -1
  196. package/dist/typography/descriptionlist/DescriptionList.svelte +2 -3
  197. package/dist/typography/descriptionlist/theme.d.ts +2 -1
  198. package/dist/typography/heading/Heading.svelte +2 -3
  199. package/dist/typography/heading/theme.d.ts +2 -1
  200. package/dist/typography/hr/Hr.svelte +4 -5
  201. package/dist/typography/hr/theme.d.ts +2 -1
  202. package/dist/typography/img/EnhancedImg.svelte +4 -5
  203. package/dist/typography/img/Img.svelte +4 -5
  204. package/dist/typography/img/theme.d.ts +2 -1
  205. package/dist/typography/layout/Layout.svelte +2 -3
  206. package/dist/typography/layout/theme.d.ts +2 -1
  207. package/dist/typography/list/Li.svelte +1 -2
  208. package/dist/typography/list/List.svelte +2 -3
  209. package/dist/typography/list/theme.d.ts +2 -1
  210. package/dist/typography/mark/Mark.svelte +1 -1
  211. package/dist/typography/mark/theme.d.ts +2 -1
  212. package/dist/typography/paragraph/P.svelte +2 -3
  213. package/dist/typography/paragraph/theme.d.ts +2 -1
  214. package/dist/typography/secondary/Secondary.svelte +1 -2
  215. package/dist/typography/secondary/theme.d.ts +2 -1
  216. package/dist/typography/span/Span.svelte +2 -3
  217. package/dist/typography/span/theme.d.ts +2 -1
  218. package/dist/video/Video.svelte +2 -2
  219. package/package.json +1 -1
@@ -2,7 +2,8 @@
2
2
  import { getContext } from "svelte";
3
3
  import type { Writable } from "svelte/store";
4
4
  import { carouselIndicators, type CarouselIndicatorsTheme } from "./theme";
5
- import { Indicator, type IndicatorsProps, type State, cn } from "..";
5
+ import clsx from "clsx";
6
+ import { Indicator, type IndicatorsProps, type State } from "..";
6
7
  import { getTheme } from "../theme/themeUtils";
7
8
 
8
9
  let { children, activeClass, inactiveClass, position = "bottom", class: className, ...restProps }: IndicatorsProps = $props();
@@ -26,14 +27,14 @@
26
27
  }
27
28
  </script>
28
29
 
29
- <div class={cn(base(), className, (theme as CarouselIndicatorsTheme)?.base)} {...restProps}>
30
+ <div class={base({ class: clsx((theme as CarouselIndicatorsTheme)?.base, className) })} {...restProps}>
30
31
  {#each $state.images as _, idx}
31
32
  {@const selected = $state.index === idx}
32
33
  <button onclick={() => goToIndex(idx)}>
33
34
  {#if children}
34
35
  {@render children({ selected, index: idx })}
35
36
  {:else}
36
- <Indicator class={cn(indicator({ selected }), selected ? activeClass : inactiveClass, (theme as CarouselIndicatorsTheme)?.indicator)} />
37
+ <Indicator class={indicator({ selected, class: clsx(selected ? activeClass : inactiveClass, (theme as CarouselIndicatorsTheme)?.indicator) })} />
37
38
  {/if}
38
39
  </button>
39
40
  {/each}
@@ -1,18 +1,21 @@
1
1
  <script lang="ts">
2
- import { controlButton } from "./theme";
3
- import { type ControlButtonProps, cn } from "..";
2
+ import { controlButton, type ControlButtonTheme } from "./theme";
3
+ import clsx from "clsx";
4
+ import { type ControlButtonProps } from "..";
4
5
  import { getTheme } from "../theme/themeUtils";
5
6
 
6
7
  let { children, forward, name, class: className, spanClass, ...restProps }: ControlButtonProps = $props();
7
8
 
9
+ const { base, span } = controlButton({ forward });
10
+
8
11
  const theme = getTheme("carouselButton");
9
12
  </script>
10
13
 
11
- <button type="button" class={cn(controlButton({ forward }), className, theme)} {...restProps}>
14
+ <button type="button" class={base({ class: clsx(className, theme) })} {...restProps}>
12
15
  {#if children}
13
16
  {@render children()}
14
17
  {:else}
15
- <span class={cn("inline-flex h-8 w-8 items-center justify-center rounded-full bg-white/30 group-hover:bg-white/50 group-focus:ring-4 group-focus:ring-white group-focus:outline-hidden sm:h-10 sm:w-10 dark:bg-gray-800/30 dark:group-hover:bg-gray-800/60 dark:group-focus:ring-gray-800/70", spanClass)}>
18
+ <span class={span({ class: clsx(spanClass) })}>
16
19
  {#if forward}
17
20
  <svg aria-hidden="true" class="h-5 w-5 sm:h-6 sm:w-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
18
21
  <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7" />
@@ -2,7 +2,8 @@
2
2
  import { getContext } from "svelte";
3
3
  import type { Writable } from "svelte/store";
4
4
  import { canChangeSlide } from "./CarouselSlide";
5
- import { type State, type ControlsProps, ControlButton, cn } from "..";
5
+ import clsx from "clsx";
6
+ import { type State, type ControlsProps, ControlButton } from "..";
6
7
  import { getTheme } from "../theme/themeUtils";
7
8
 
8
9
  let { children, class: className, ...restProps }: ControlsProps = $props();
@@ -45,8 +46,8 @@
45
46
  {#if children}
46
47
  {@render children(changeSlide)}
47
48
  {:else}
48
- <ControlButton name="Previous" forward={false} onclick={() => changeSlide(false)} class={cn(className, theme)} {...restProps} />
49
- <ControlButton name="Next" forward={true} onclick={() => changeSlide(true)} class={cn(className, theme)} {...restProps} />
49
+ <ControlButton name="Previous" forward={false} onclick={() => changeSlide(false)} class={clsx(theme, className)} {...restProps} />
50
+ <ControlButton name="Next" forward={true} onclick={() => changeSlide(true)} class={clsx(theme, className)} {...restProps} />
50
51
  {/if}
51
52
 
52
53
  <!--
@@ -3,7 +3,8 @@
3
3
  import type { Writable } from "svelte/store";
4
4
  import { fly } from "svelte/transition";
5
5
  import { slide } from "./theme";
6
- import { type SlideProps, type State, cn } from "..";
6
+ import clsx from "clsx";
7
+ import { type SlideProps, type State } from "..";
7
8
  import { getTheme } from "../theme/themeUtils";
8
9
 
9
10
  const state = getContext<Writable<State>>("state");
@@ -28,7 +29,7 @@
28
29
  duration: $state.slideDuration
29
30
  });
30
31
 
31
- let imgClass = cn(slide(), className, theme);
32
+ let imgClass = slide({ class: clsx(theme, className) });
32
33
  </script>
33
34
 
34
35
  {#if transition}
@@ -1,6 +1,6 @@
1
1
  <script lang="ts">
2
2
  import { thumbnail } from "./theme";
3
- import { type ThumbnailProps, cn } from "..";
3
+ import { type ThumbnailProps } from "..";
4
4
  import clsx from "clsx";
5
5
  import { getTheme } from "../theme/themeUtils";
6
6
 
@@ -9,7 +9,7 @@
9
9
  const theme = getTheme("thumbnail");
10
10
  </script>
11
11
 
12
- <img {...restProps} class={cn(thumbnail({ selected, class: clsx(className) }), theme)} />
12
+ <img {...restProps} class={thumbnail({ selected, class: clsx(theme, className) })} />
13
13
 
14
14
  <!--
15
15
  @component
@@ -2,7 +2,7 @@
2
2
  import { getContext } from "svelte";
3
3
  import type { Writable } from "svelte/store";
4
4
  import { thumbnails } from "./theme";
5
- import { type ThumbnailsProps, type State, Thumbnail, cn } from "..";
5
+ import { type ThumbnailsProps, type State, Thumbnail } from "..";
6
6
  import clsx from "clsx";
7
7
  import { getTheme } from "../theme/themeUtils";
8
8
 
@@ -50,12 +50,12 @@
50
50
  });
51
51
  </script>
52
52
 
53
- <div class={cn(thumbnails(), className, theme)}>
53
+ <div class={thumbnails({ class: clsx(theme, className) })}>
54
54
  {#each images as image, idx}
55
55
  {@const selected = index === idx}
56
56
  <button onclick={() => btnClick(idx)} aria-label={ariaLabel}>
57
57
  {#if children}
58
- {@render children({ image, selected, imgClass: cn(imgClass), Thumbnail })}
58
+ {@render children({ image, selected, imgClass: clsx(imgClass), Thumbnail })}
59
59
  {:else}
60
60
  <Thumbnail {...image} {selected} class={clsx(imgClass)} />
61
61
  {/if}
@@ -1,7 +1,8 @@
1
1
  import { type VariantProps } from "tailwind-variants";
2
+ import type { ClassValue } from "svelte/elements";
2
3
  export type CarouselVariants = VariantProps<typeof carousel>;
3
4
  export declare const carousel: import("tailwind-variants").TVReturnType<{}, undefined, "grid overflow-hidden relative rounded-lg h-56 sm:h-64 xl:h-80 2xl:h-96", {}, undefined, import("tailwind-variants").TVReturnType<{}, undefined, "grid overflow-hidden relative rounded-lg h-56 sm:h-64 xl:h-80 2xl:h-96", unknown, unknown, undefined>>;
4
- export type CarouselTheme = string;
5
+ export type CarouselTheme = ClassValue;
5
6
  export declare const carouselIndicators: import("tailwind-variants").TVReturnType<{
6
7
  selected: {
7
8
  true: {
@@ -73,26 +74,36 @@ export declare const carouselIndicators: import("tailwind-variants").TVReturnTyp
73
74
  indicator: string;
74
75
  }, undefined, unknown, unknown, undefined>>;
75
76
  export type CarouselIndicatorsSlots = keyof typeof carouselIndicators.slots;
76
- export type CarouselIndicatorsTheme = Partial<Record<CarouselIndicatorsSlots, string>>;
77
+ export type CarouselIndicatorsTheme = Partial<Record<CarouselIndicatorsSlots, ClassValue>>;
77
78
  export declare const controlButton: import("tailwind-variants").TVReturnType<{
78
79
  forward: {
79
80
  true: string;
80
81
  false: string;
81
82
  };
82
- }, undefined, "flex absolute top-0 z-30 justify-center items-center px-4 h-full group focus:outline-hidden text-white dark:text-gray-300", {
83
+ }, {
84
+ base: string;
85
+ span: string;
86
+ }, undefined, {
83
87
  forward: {
84
88
  true: string;
85
89
  false: string;
86
90
  };
87
- }, undefined, import("tailwind-variants").TVReturnType<{
91
+ }, {
92
+ base: string;
93
+ span: string;
94
+ }, import("tailwind-variants").TVReturnType<{
88
95
  forward: {
89
96
  true: string;
90
97
  false: string;
91
98
  };
92
- }, undefined, "flex absolute top-0 z-30 justify-center items-center px-4 h-full group focus:outline-hidden text-white dark:text-gray-300", unknown, unknown, undefined>>;
93
- export type ControlButtonTheme = string;
99
+ }, {
100
+ base: string;
101
+ span: string;
102
+ }, undefined, unknown, unknown, undefined>>;
103
+ export type ControlButtonSlots = keyof typeof controlButton.slots;
104
+ export type ControlButtonTheme = Partial<Record<ControlButtonSlots, ClassValue>>;
94
105
  export declare const thumbnails: import("tailwind-variants").TVReturnType<{} | {} | {}, undefined, "flex flex-row justify-center bg-gray-100 w-full", {} | {}, undefined, import("tailwind-variants").TVReturnType<unknown, undefined, "flex flex-row justify-center bg-gray-100 w-full", unknown, unknown, undefined>>;
95
- export type ThumbnailsTheme = string;
106
+ export type ThumbnailsTheme = ClassValue;
96
107
  export declare const thumbnail: import("tailwind-variants").TVReturnType<{
97
108
  selected: {
98
109
  true: string;
@@ -109,6 +120,6 @@ export declare const thumbnail: import("tailwind-variants").TVReturnType<{
109
120
  false: string;
110
121
  };
111
122
  }, undefined, "", unknown, unknown, undefined>>;
112
- export type ThumbnailTheme = string;
123
+ export type ThumbnailTheme = ClassValue;
113
124
  export declare const slide: import("tailwind-variants").TVReturnType<{} | {} | {}, undefined, "absolute block w-full! h-full object-cover", {} | {}, undefined, import("tailwind-variants").TVReturnType<unknown, undefined, "absolute block w-full! h-full object-cover", unknown, unknown, undefined>>;
114
- export type SlideTheme = string;
125
+ export type SlideTheme = ClassValue;
@@ -23,7 +23,10 @@ export const carouselIndicators = tv({
23
23
  }
24
24
  });
25
25
  export const controlButton = tv({
26
- base: "flex absolute top-0 z-30 justify-center items-center px-4 h-full group focus:outline-hidden text-white dark:text-gray-300",
26
+ slots: {
27
+ base: "flex absolute top-0 z-30 justify-center items-center px-4 h-full group focus:outline-hidden text-white dark:text-gray-300",
28
+ span: "inline-flex h-8 w-8 items-center justify-center rounded-full bg-white/30 group-hover:bg-white/50 group-focus:ring-4 group-focus:ring-white group-focus:outline-hidden sm:h-10 sm:w-10 dark:bg-gray-800/30 dark:group-hover:bg-gray-800/60 dark:group-focus:ring-gray-800/70"
29
+ },
27
30
  variants: {
28
31
  forward: {
29
32
  true: "end-0",
@@ -1,7 +1,7 @@
1
1
  <script lang="ts">
2
2
  import Button from "../buttons/Button.svelte";
3
3
  import clsx from "clsx";
4
- import { type ClipboardProps, cn } from "..";
4
+ import { type ClipboardProps } from "..";
5
5
  import { clipboard } from "./theme";
6
6
  import type { MouseEventHandler } from "svelte/elements";
7
7
  import { getTheme } from "../theme/themeUtils";
@@ -38,7 +38,7 @@
38
38
  };
39
39
  </script>
40
40
 
41
- <Button onclick={copyToClipboard} {...restProps} class={cn(clipboard({ embedded, class: clsx(className) }), theme)}>
41
+ <Button onclick={copyToClipboard} {...restProps} class={clipboard({ embedded, class: clsx(theme, className) })}>
42
42
  {@render children?.(success)}
43
43
  </Button>
44
44
 
@@ -1,4 +1,5 @@
1
1
  import { type VariantProps } from "tailwind-variants";
2
+ import type { ClassValue } from "svelte/elements";
2
3
  export type ClipboardVariants = VariantProps<typeof clipboard>;
3
4
  export declare const clipboard: import("tailwind-variants").TVReturnType<{
4
5
  embedded: {
@@ -16,4 +17,4 @@ export declare const clipboard: import("tailwind-variants").TVReturnType<{
16
17
  false: string;
17
18
  };
18
19
  }, undefined, "gap-2", unknown, unknown, undefined>>;
19
- export type ClipboardTheme = string;
20
+ export type ClipboardTheme = ClassValue;
@@ -1,6 +1,7 @@
1
1
  <script lang="ts">
2
2
  import { darkmode } from ".";
3
- import { type DarkmodeProps, cn } from "..";
3
+ import clsx from "clsx";
4
+ import { type DarkmodeProps } from "..";
4
5
  import { getTheme } from "../theme/themeUtils";
5
6
 
6
7
  // const THEME_PREFERENCE_KEY = 'color-theme';
@@ -33,7 +34,7 @@
33
34
  </script>
34
35
  </svelte:head>
35
36
 
36
- <button onclick={toggleTheme} aria-label={ariaLabel} type="button" {...restProps} class={cn(darkmode(), className, theme)} tabindex={0}>
37
+ <button onclick={toggleTheme} aria-label={ariaLabel} type="button" {...restProps} class={darkmode({ class: clsx(theme, className) })} tabindex={0}>
37
38
  <span class="hidden dark:block">
38
39
  {#if lightIcon}
39
40
  {@render lightIcon()}
@@ -1,2 +1,3 @@
1
+ import type { ClassValue } from "svelte/elements";
1
2
  export declare const darkmode: import("tailwind-variants").TVReturnType<{} | {} | {}, undefined, "text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 focus:outline-hidden rounded-lg text-sm p-2.5", {} | {}, undefined, import("tailwind-variants").TVReturnType<unknown, undefined, "text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 focus:outline-hidden rounded-lg text-sm p-2.5", unknown, unknown, undefined>>;
2
- export type DarkModeTheme = string;
3
+ export type DarkModeTheme = ClassValue;
@@ -1,8 +1,8 @@
1
1
  <script lang="ts">
2
2
  import { onMount } from "svelte";
3
- import clsx from "clsx";
4
3
  import { fade } from "svelte/transition";
5
- import { Button, ToolbarButton, type DatepickerProps, cn } from "..";
4
+ import clsx from "clsx";
5
+ import { Button, ToolbarButton, type DatepickerProps } from "..";
6
6
  import { datepicker, type DatepickerTheme } from "./theme";
7
7
  import { parse, isValid, addDays, startOfMonth, endOfMonth, startOfWeek, endOfWeek, eachDayOfInterval, isSameDay, isWithinInterval } from "date-fns";
8
8
  import { getTheme } from "../theme/themeUtils";
@@ -274,8 +274,8 @@
274
274
  <div bind:this={datepickerContainerElement} class={["relative", inline && "inline-block"]}>
275
275
  {#if !inline}
276
276
  <div class="relative">
277
- <input bind:this={inputElement} type="text" class={cn(input({ color }), inputClass, (theme as DatepickerTheme)?.input)} {placeholder} value={range ? `${formatDate(rangeFrom)} - ${formatDate(rangeTo)}` : formatDate(value)} onfocus={() => (isOpen = true)} oninput={handleInputChangeWithDateFns} onkeydown={handleInputKeydown} {disabled} {required} {inputmode} aria-haspopup="dialog" />
278
- <button type="button" class={cn(button({ class: clsx(classes?.button) }), btnClass, (theme as DatepickerTheme)?.button)} onclick={() => (isOpen = !isOpen)} {disabled} aria-label={isOpen ? "Close date picker" : "Open date picker"}>
277
+ <input bind:this={inputElement} type="text" class={input({ color, class: clsx((theme as DatepickerTheme)?.input, inputClass) })} {placeholder} value={range ? `${formatDate(rangeFrom)} - ${formatDate(rangeTo)}` : formatDate(value)} onfocus={() => (isOpen = true)} oninput={handleInputChangeWithDateFns} onkeydown={handleInputKeydown} {disabled} {required} {inputmode} aria-haspopup="dialog" />
278
+ <button type="button" class={button({ class: clsx(btnClass, (theme as DatepickerTheme)?.button, classes?.button) })} onclick={() => (isOpen = !isOpen)} {disabled} aria-label={isOpen ? "Close date picker" : "Open date picker"}>
279
279
  <svg class="h-4 w-4 text-gray-500 dark:text-gray-400" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20">
280
280
  <path d="M20 4a2 2 0 0 0-2-2h-2V1a1 1 0 0 0-2 0v1h-3V1a1 1 0 0 0-2 0v1H6V1a1 1 0 0 0-2 0v1H2a2 2 0 0 0-2 2v2h20V4ZM0 18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8H0v10Zm5-8h10a1 1 0 0 1 0 2H5a1 1 0 0 1 0-2Z"></path>
281
281
  </svg>
@@ -284,23 +284,30 @@
284
284
  {/if}
285
285
 
286
286
  {#if isOpen || inline}
287
- <div bind:this={calendarRef} id="datepicker-dropdown" class={cn(base({ inline, class: clsx(classes?.base) }), className, (theme as DatepickerTheme)?.base)} transition:fade={{ duration: 100 }} role="dialog" aria-label="Calendar">
287
+ <div bind:this={calendarRef} id="datepicker-dropdown" class={base({ inline, class: clsx((theme as DatepickerTheme)?.base, classes?.base, className) })} transition:fade={{ duration: 100 }} role="dialog" aria-label="Calendar">
288
288
  {#if title}
289
- <h2 class={cn(titleVariant({ class: clsx(classes?.titleVariant) }), (theme as DatepickerTheme)?.titleVariant)}>{title}</h2>
289
+ <h2 class={titleVariant({ class: clsx((theme as DatepickerTheme)?.titleVariant, classes?.titleVariant) })}>{title}</h2>
290
290
  {/if}
291
291
 
292
292
  {#if showMonthSelector}
293
293
  <!-- Month/Year Selector View -->
294
- <div class={cn(nav({ class: clsx(classes?.nav) }), (theme as DatepickerTheme)?.nav)}>
294
+ <div class={nav({ class: clsx((theme as DatepickerTheme)?.nav, classes?.nav) })}>
295
295
  {@render yearNavButton(false)}
296
- <h3 class={cn(polite({ class: clsx(classes?.polite) }), (theme as DatepickerTheme)?.polite)} aria-live="polite">
296
+ <h3 class={polite({ class: clsx((theme as DatepickerTheme)?.polite, classes?.polite) })} aria-live="polite">
297
297
  {currentMonth.getFullYear()}
298
298
  </h3>
299
299
  {@render yearNavButton(true)}
300
300
  </div>
301
301
  <div class="grid grid-cols-4 gap-2 p-4">
302
302
  {#each monthNames as month, index}
303
- <Button type="button" color={monthColor} class={cn(monthButton(), currentMonth.getMonth() === index ? clsx(monthBtnSelected) : clsx(monthBtn), clsx(classes?.monthButton), (theme as DatepickerTheme)?.monthButton)} onclick={(event: MouseEvent) => selectMonth(index, event)}>
303
+ <Button
304
+ type="button"
305
+ color={monthColor}
306
+ class={monthButton({
307
+ class: clsx(currentMonth.getMonth() === index ? monthBtnSelected : monthBtn, classes?.monthButton, (theme as DatepickerTheme)?.monthButton)
308
+ })}
309
+ onclick={(event: MouseEvent) => selectMonth(index, event)}
310
+ >
304
311
  {month}
305
312
  </Button>
306
313
  {/each}
@@ -310,14 +317,14 @@
310
317
  <div class={nav({ class: clsx(classes?.nav) })}>
311
318
  {@render navButton(false)}
312
319
  <!-- MODIFIED: Use translationLocale for month/year display -->
313
- <Button type="button" class={cn(polite({ class: clsx(classes?.polite) }), "cursor-pointer rounded px-2 py-1 hover:bg-gray-100 dark:hover:bg-gray-700")} aria-live="polite" onclick={(event: MouseEvent) => toggleMonthSelector(event)}>
320
+ <Button type="button" class={polite({ class: clsx("cursor-pointer rounded px-2 py-1 hover:bg-gray-100 dark:hover:bg-gray-700", classes?.polite) })} aria-live="polite" onclick={(event: MouseEvent) => toggleMonthSelector(event)}>
314
321
  {currentMonth.toLocaleString(translationLocale, { month: "long", year: "numeric" })}
315
322
  </Button>
316
323
  {@render navButton(true)}
317
324
  </div>
318
- <div class={cn(grid({ class: clsx(classes?.grid) }), (theme as DatepickerTheme)?.grid)} role="grid">
325
+ <div class={grid({ class: clsx((theme as DatepickerTheme)?.grid, classes?.grid) })} role="grid">
319
326
  {#each weekdays as day}
320
- <div class={cn(columnHeader({ class: clsx(classes?.columnHeader) }), (theme as DatepickerTheme)?.columnHeader)} role="columnheader">{day}</div>
327
+ <div class={columnHeader({ class: clsx((theme as DatepickerTheme)?.columnHeader, classes?.columnHeader) })} role="columnheader">{day}</div>
321
328
  {/each}
322
329
  {#each daysInMonth as day}
323
330
  {@const current = day.getMonth() !== currentMonth.getMonth()}
@@ -325,16 +332,13 @@
325
332
  <Button
326
333
  type="button"
327
334
  color={isSelected(day) ? color : "alternative"}
328
- class={cn(
329
- dayButton({
330
- current,
331
- today: isToday(day),
332
- color: isInRange(day) ? color : undefined,
333
- unavailable: !available,
334
- class: clsx(classes?.dayButton, !available && "cursor-not-allowed opacity-50")
335
- }),
336
- (theme as DatepickerTheme)?.dayButton
337
- )}
335
+ class={dayButton({
336
+ current,
337
+ today: isToday(day),
338
+ color: isInRange(day) ? color : undefined,
339
+ unavailable: !available,
340
+ class: clsx((theme as DatepickerTheme)?.dayButton, classes?.dayButton, !available && "cursor-not-allowed opacity-50")
341
+ })}
338
342
  onclick={() => handleDaySelect(day)}
339
343
  onkeydown={handleCalendarKeydown}
340
344
  aria-label={day.toLocaleDateString(translationLocale, { weekday: "long", year: "numeric", month: "long", day: "numeric" })}
@@ -350,7 +354,7 @@
350
354
  {/if}
351
355
 
352
356
  {#if showActionButtons && !showMonthSelector}
353
- <div class={cn(actionButtons({ class: clsx(classes?.actionButtons) }), (theme as DatepickerTheme)?.actionButtons)}>
357
+ <div class={actionButtons({ class: clsx((theme as DatepickerTheme)?.actionButtons, classes?.actionButtons) })}>
354
358
  <Button onclick={() => handleDaySelect(new Date())} {color} size="sm" disabled={!isDateAvailable(new Date())}>Today</Button>
355
359
  <Button onclick={handleClear} color="red" size="sm">Clear</Button>
356
360
  <Button onclick={handleApply} {color} size="sm">Apply</Button>
@@ -389,4 +389,4 @@ export declare const datepicker: import("tailwind-variants").TVReturnType<{
389
389
  monthButton: string;
390
390
  }, undefined, unknown, unknown, undefined>>;
391
391
  export type DatepickerSlots = keyof typeof datepicker.slots;
392
- export type DatepickerTheme = Partial<Record<DatepickerSlots, string>>;
392
+ export type DatepickerTheme = Partial<Record<DatepickerSlots, ClassValue>>;
@@ -1,5 +1,6 @@
1
1
  <script lang="ts">
2
- import { type ParamsType, type DrawerProps, trapFocus, cn } from "..";
2
+ import { type ParamsType, type DrawerProps, trapFocus } from "..";
3
+ import clsx from "clsx";
3
4
  import { fly } from "svelte/transition";
4
5
  import { sineIn } from "svelte/easing";
5
6
  import { drawer, type DrawerTheme } from ".";
@@ -30,8 +31,8 @@
30
31
  <svelte:window bind:innerWidth bind:innerHeight />
31
32
 
32
33
  {#if !hidden}
33
- <div role="presentation" class={cn(backdropCls(), backdropClass, (theme as DrawerTheme)?.backdrop)} onclick={activateClickOutside ? closeDrawer : undefined} style={bodyScrolling ? "pointer-events: none;" : ""}></div>
34
- <div use:trapFocus={{ onEscape: closeDrawer }} {...restProps} class={cn(base(), className, (theme as DrawerTheme)?.base)} transition:transitionType={transitionParams ? transitionParams : (transition_params as ParamsType)} tabindex="-1">
34
+ <div role="presentation" class={backdropCls({ class: clsx((theme as DrawerTheme)?.backdrop, backdropClass) })} onclick={activateClickOutside ? closeDrawer : undefined} style={bodyScrolling ? "pointer-events: none;" : ""}></div>
35
+ <div use:trapFocus={{ onEscape: closeDrawer }} {...restProps} class={base({ class: clsx((theme as DrawerTheme)?.base, className) })} transition:transitionType={transitionParams ? transitionParams : (transition_params as ParamsType)} tabindex="-1">
35
36
  {@render children?.()}
36
37
  </div>
37
38
  {/if}
@@ -1,6 +1,7 @@
1
1
  <script lang="ts">
2
2
  import { drawerhead, type DrawerHeadTheme } from ".";
3
- import { type DrawerheadProps, cn } from "..";
3
+ import clsx from "clsx";
4
+ import { type DrawerheadProps } from "..";
4
5
  import { getTheme } from "../theme/themeUtils";
5
6
 
6
7
  let { closeIcon, children, buttonClass, svgClass, class: className, ...restProps }: DrawerheadProps = $props();
@@ -10,15 +11,15 @@
10
11
  const { base, button, svg } = $derived(drawerhead());
11
12
  </script>
12
13
 
13
- <div class={cn(base(), className, (theme as DrawerHeadTheme)?.base)}>
14
+ <div class={base({ class: clsx((theme as DrawerHeadTheme)?.base, className) })}>
14
15
  {#if children}
15
16
  {@render children()}
16
17
  {/if}
17
18
  {#if closeIcon}
18
19
  {@render closeIcon()}
19
20
  {:else}
20
- <button type="button" {...restProps} class={cn(button(), buttonClass, (theme as DrawerHeadTheme)?.button)}>
21
- <svg class={cn(svg(), svgClass, (theme as DrawerHeadTheme)?.svg)} aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 14">
21
+ <button type="button" {...restProps} class={button({ class: clsx((theme as DrawerHeadTheme)?.button, buttonClass) })}>
22
+ <svg class={svg({ class: clsx((theme as DrawerHeadTheme)?.svg, svgClass) })} aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 14">
22
23
  <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6" />
23
24
  </svg>
24
25
  <span class="sr-only">Close drawer</span>
@@ -1,4 +1,5 @@
1
1
  import { type VariantProps } from "tailwind-variants";
2
+ import type { ClassValue } from "svelte/elements";
2
3
  export type DrawerVariants = VariantProps<typeof drawer>;
3
4
  export declare const drawer: import("tailwind-variants").TVReturnType<{
4
5
  position: {
@@ -171,6 +172,6 @@ export declare const drawerhead: import("tailwind-variants").TVReturnType<{
171
172
  svg: string;
172
173
  }, undefined, unknown, unknown, undefined>>;
173
174
  export type DrawerSlots = keyof typeof drawer.slots;
174
- export type DrawerTheme = Partial<Record<DrawerSlots, string>>;
175
+ export type DrawerTheme = Partial<Record<DrawerSlots, ClassValue>>;
175
176
  export type DrawerHeadSlots = keyof typeof drawerhead.slots;
176
- export type DrawerHeadTheme = Partial<Record<DrawerHeadSlots, string>>;
177
+ export type DrawerHeadTheme = Partial<Record<DrawerHeadSlots, ClassValue>>;
@@ -2,7 +2,8 @@
2
2
  import { setContext } from "svelte";
3
3
  import { writable } from "svelte/store";
4
4
  import { dropdown } from "./";
5
- import { type DropdownProps, Popper, cn, DropdownGroup } from "..";
5
+ import clsx from "clsx";
6
+ import { type DropdownProps, Popper, DropdownGroup } from "..";
6
7
  import { getTheme } from "../theme/themeUtils";
7
8
 
8
9
  let { children, simple = false, placement = "bottom", offset = 2, class: className, activeUrl = "", isOpen = $bindable(false), ...restProps }: DropdownProps = $props();
@@ -20,7 +21,7 @@
20
21
 
21
22
  <!-- Dropdown menu -->
22
23
 
23
- <Popper {...restProps} {placement} {offset} bind:isOpen class={cn(base(), className, theme)}>
24
+ <Popper {...restProps} {placement} {offset} bind:isOpen class={base({ class: clsx(theme, className) })}>
24
25
  {#if simple}
25
26
  <DropdownGroup>
26
27
  {@render children()}
@@ -1,6 +1,7 @@
1
1
  <script lang="ts">
2
2
  import { dropdownDivider } from ".";
3
- import { type DropdownDividerProps, cn } from "..";
3
+ import clsx from "clsx";
4
+ import { type DropdownDividerProps } from "..";
4
5
  import { getTheme } from "../theme/themeUtils";
5
6
 
6
7
  let { class: className, ...restProps }: DropdownDividerProps = $props();
@@ -8,7 +9,7 @@
8
9
  const theme = getTheme("dropdownDivider");
9
10
  </script>
10
11
 
11
- <div {...restProps} class={cn(dropdownDivider(), className, theme)}></div>
12
+ <div {...restProps} class={dropdownDivider({ class: clsx(theme, className) })}></div>
12
13
 
13
14
  <!--
14
15
  @component
@@ -1,6 +1,7 @@
1
1
  <script lang="ts">
2
2
  import { dropdownGroup } from ".";
3
- import { type DropdownGroupProps, cn } from "..";
3
+ import clsx from "clsx";
4
+ import { type DropdownGroupProps } from "..";
4
5
  import { getTheme } from "../theme/themeUtils";
5
6
 
6
7
  let { children, class: className, ...restProps }: DropdownGroupProps = $props();
@@ -8,7 +9,7 @@
8
9
  const theme = getTheme("dropdownGroup");
9
10
  </script>
10
11
 
11
- <ul {...restProps} class={cn(dropdownGroup(), className, theme)}>
12
+ <ul {...restProps} class={dropdownGroup({ class: clsx(theme, className) })}>
12
13
  {@render children()}
13
14
  </ul>
14
15
 
@@ -1,6 +1,7 @@
1
1
  <script lang="ts">
2
2
  import { dropdownHeader } from ".";
3
- import { type DropdownHeaderProps, cn } from "..";
3
+ import clsx from "clsx";
4
+ import { type DropdownHeaderProps } from "..";
4
5
  import { getTheme } from "../theme/themeUtils";
5
6
 
6
7
  let { children, class: className, ...restProps }: DropdownHeaderProps = $props();
@@ -8,7 +9,7 @@
8
9
  const theme = getTheme("dropdownHeader");
9
10
  </script>
10
11
 
11
- <div {...restProps} class={cn(dropdownHeader(), className, theme)}>
12
+ <div {...restProps} class={dropdownHeader({ class: clsx(theme, className) })}>
12
13
  {@render children()}
13
14
  </div>
14
15
 
@@ -1,7 +1,8 @@
1
1
  <script lang="ts">
2
2
  import { getContext } from "svelte";
3
3
  import { dropdownItem, type DropdownItemTheme } from ".";
4
- import { type DropdownItemProps, cn } from "..";
4
+ import clsx from "clsx";
5
+ import { type DropdownItemProps } from "..";
5
6
  import { getTheme } from "../theme/themeUtils";
6
7
 
7
8
  let { aClass, children, activeClass, liClass, class: className, ...restProps }: DropdownItemProps = $props();
@@ -20,10 +21,10 @@
20
21
  });
21
22
 
22
23
  const { anchor, activeAnchor } = dropdownItem();
23
- let finalClass = $derived([active ? cn(activeAnchor(), activeClass, className, (theme as DropdownItemTheme)?.activeAnchor) : cn(anchor(), aClass, className, (theme as DropdownItemTheme)?.anchor)]);
24
+ let finalClass = $derived([active ? activeAnchor({ class: clsx((theme as DropdownItemTheme)?.activeAnchor, activeClass, className) }) : anchor({ class: clsx((theme as DropdownItemTheme)?.anchor, aClass, className) })]);
24
25
  </script>
25
26
 
26
- <li class={cn(liClass)}>
27
+ <li class={liClass}>
27
28
  {#if restProps.href === undefined && restProps.onclick === undefined}
28
29
  <div {...restProps} class={finalClass}>
29
30
  {@render children()}
@@ -1,3 +1,4 @@
1
+ import type { ClassValue } from "svelte/elements";
1
2
  export declare const dropdown: import("tailwind-variants").TVReturnType<{
2
3
  [key: string]: {
3
4
  [key: string]: import("tailwind-variants").ClassValue | {
@@ -30,11 +31,11 @@ export declare const dropdown: import("tailwind-variants").TVReturnType<{
30
31
  backdrop: string;
31
32
  }, undefined, unknown, unknown, undefined>>;
32
33
  export type DropdownSlots = keyof typeof dropdown.slots;
33
- export type DropdownTheme = Partial<Record<DropdownSlots, string>>;
34
+ export type DropdownTheme = Partial<Record<DropdownSlots, ClassValue>>;
34
35
  export declare const dropdownDivider: import("tailwind-variants").TVReturnType<{} | {} | {}, undefined, "my-1 h-px bg-gray-100 dark:bg-gray-500", {} | {}, undefined, import("tailwind-variants").TVReturnType<unknown, undefined, "my-1 h-px bg-gray-100 dark:bg-gray-500", unknown, unknown, undefined>>;
35
- export type DropdownDividerTheme = string;
36
+ export type DropdownDividerTheme = ClassValue;
36
37
  export declare const dropdownHeader: import("tailwind-variants").TVReturnType<{} | {} | {}, undefined, "px-4 py-3 text-sm text-gray-900 dark:text-white", {} | {}, undefined, import("tailwind-variants").TVReturnType<unknown, undefined, "px-4 py-3 text-sm text-gray-900 dark:text-white", unknown, unknown, undefined>>;
37
- export type DropdownHeaderTheme = string;
38
+ export type DropdownHeaderTheme = ClassValue;
38
39
  export declare const dropdownItem: import("tailwind-variants").TVReturnType<{
39
40
  [key: string]: {
40
41
  [key: string]: import("tailwind-variants").ClassValue | {
@@ -67,6 +68,6 @@ export declare const dropdownItem: import("tailwind-variants").TVReturnType<{
67
68
  activeAnchor: string;
68
69
  }, undefined, unknown, unknown, undefined>>;
69
70
  export type DropdownItemSlots = keyof typeof dropdownItem.slots;
70
- export type DropdownItemTheme = Partial<Record<DropdownItemSlots, string>>;
71
+ export type DropdownItemTheme = Partial<Record<DropdownItemSlots, ClassValue>>;
71
72
  export declare const dropdownGroup: import("tailwind-variants").TVReturnType<{} | {} | {}, undefined, "py-2 text-sm text-gray-700 dark:text-gray-200", {} | {}, undefined, import("tailwind-variants").TVReturnType<unknown, undefined, "py-2 text-sm text-gray-700 dark:text-gray-200", unknown, unknown, undefined>>;
72
- export type DropdownGroupTheme = string;
73
+ export type DropdownGroupTheme = ClassValue;
@@ -1,16 +1,17 @@
1
1
  <script lang="ts">
2
2
  import { footer } from ".";
3
- import { type FooterProps, cn } from "..";
3
+ import clsx from "clsx";
4
+ import { type FooterProps } from "..";
4
5
  import { getTheme } from "../theme/themeUtils";
5
6
 
6
7
  let { children, footerType = "default", class: className, ...restProps }: FooterProps = $props();
7
8
 
8
9
  const theme = getTheme("footer");
9
10
 
10
- const footerCls = $derived(footer({ footerType }));
11
+ const footerCls = $derived(footer({ footerType, class: clsx(theme, className) }));
11
12
  </script>
12
13
 
13
- <footer {...restProps} class={cn(footerCls, className, theme)}>
14
+ <footer {...restProps} class={footerCls}>
14
15
  {@render children()}
15
16
  </footer>
16
17