flowbite-svelte 1.10.5 → 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 (218) 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 +8 -9
  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 +6 -5
  142. package/dist/skeleton/CardPlaceholder.svelte +11 -12
  143. package/dist/skeleton/ImagePlaceholder.svelte +39 -12
  144. package/dist/skeleton/ListPlaceholder.svelte +26 -8
  145. package/dist/skeleton/Skeleton.svelte +24 -9
  146. package/dist/skeleton/TestimonialPlaceholder.svelte +27 -8
  147. package/dist/skeleton/TextPlaceholder.svelte +49 -26
  148. package/dist/skeleton/VideoPlaceholder.svelte +2 -3
  149. package/dist/skeleton/WidgetPlaceholder.svelte +1 -2
  150. package/dist/skeleton/theme.d.ts +9 -8
  151. package/dist/speed-dial/SpeedDial.svelte +3 -3
  152. package/dist/speed-dial/SpeedDialButton.svelte +3 -3
  153. package/dist/speed-dial/theme.d.ts +3 -2
  154. package/dist/spinner/Spinner.svelte +2 -3
  155. package/dist/spinner/theme.d.ts +2 -1
  156. package/dist/stepindicator/StepIndicator.svelte +10 -9
  157. package/dist/stepindicator/theme.d.ts +2 -1
  158. package/dist/stepper/BreadcrumbStepper.svelte +9 -10
  159. package/dist/stepper/DetailedStepper.svelte +4 -4
  160. package/dist/stepper/ProgressStepper.svelte +8 -11
  161. package/dist/stepper/Stepper.svelte +12 -18
  162. package/dist/stepper/TimelineStepper.svelte +4 -4
  163. package/dist/stepper/VerticalStepper.svelte +4 -4
  164. package/dist/table/Table.svelte +3 -3
  165. package/dist/table/TableBody.svelte +1 -2
  166. package/dist/table/TableBodyCell.svelte +1 -2
  167. package/dist/table/TableBodyRow.svelte +2 -3
  168. package/dist/table/TableHead.svelte +2 -3
  169. package/dist/table/TableHeadCell.svelte +1 -2
  170. package/dist/table/TableSearch.svelte +9 -9
  171. package/dist/table/theme.d.ts +6 -6
  172. package/dist/tabs/TabItem.svelte +5 -4
  173. package/dist/tabs/Tabs.svelte +3 -4
  174. package/dist/tabs/theme.d.ts +3 -2
  175. package/dist/timeline/Activity.svelte +1 -2
  176. package/dist/timeline/ActivityItem.svelte +9 -9
  177. package/dist/timeline/Group.svelte +4 -4
  178. package/dist/timeline/GroupItem.svelte +6 -6
  179. package/dist/timeline/Timeline.svelte +2 -3
  180. package/dist/timeline/TimelineItem.svelte +7 -7
  181. package/dist/timeline/theme.d.ts +7 -6
  182. package/dist/toast/Toast.svelte +5 -5
  183. package/dist/toast/theme.d.ts +2 -1
  184. package/dist/toolbar/Toolbar.svelte +2 -3
  185. package/dist/toolbar/ToolbarButton.svelte +4 -5
  186. package/dist/toolbar/ToolbarGroup.svelte +2 -3
  187. package/dist/toolbar/theme.d.ts +4 -3
  188. package/dist/tooltip/Tooltip.svelte +1 -2
  189. package/dist/tooltip/theme.d.ts +2 -1
  190. package/dist/types.d.ts +2 -3
  191. package/dist/typography/anchor/A.svelte +3 -4
  192. package/dist/typography/anchor/theme.d.ts +2 -1
  193. package/dist/typography/blockquote/Blockquote.svelte +3 -4
  194. package/dist/typography/blockquote/theme.d.ts +2 -1
  195. package/dist/typography/descriptionlist/DescriptionList.svelte +2 -3
  196. package/dist/typography/descriptionlist/theme.d.ts +2 -1
  197. package/dist/typography/heading/Heading.svelte +2 -3
  198. package/dist/typography/heading/theme.d.ts +2 -1
  199. package/dist/typography/hr/Hr.svelte +4 -5
  200. package/dist/typography/hr/theme.d.ts +2 -1
  201. package/dist/typography/img/EnhancedImg.svelte +4 -5
  202. package/dist/typography/img/Img.svelte +4 -5
  203. package/dist/typography/img/theme.d.ts +2 -1
  204. package/dist/typography/layout/Layout.svelte +2 -3
  205. package/dist/typography/layout/theme.d.ts +2 -1
  206. package/dist/typography/list/Li.svelte +1 -2
  207. package/dist/typography/list/List.svelte +2 -3
  208. package/dist/typography/list/theme.d.ts +2 -1
  209. package/dist/typography/mark/Mark.svelte +1 -1
  210. package/dist/typography/mark/theme.d.ts +2 -1
  211. package/dist/typography/paragraph/P.svelte +2 -3
  212. package/dist/typography/paragraph/theme.d.ts +2 -1
  213. package/dist/typography/secondary/Secondary.svelte +1 -2
  214. package/dist/typography/secondary/theme.d.ts +2 -1
  215. package/dist/typography/span/Span.svelte +2 -3
  216. package/dist/typography/span/theme.d.ts +2 -1
  217. package/dist/video/Video.svelte +2 -2
  218. package/package.json +1 -1
@@ -2,7 +2,8 @@
2
2
  import { setContext } from "svelte";
3
3
  import { writable } from "svelte/store";
4
4
  import { accordion } from "./";
5
- import { type AccordionProps, cn } from "..";
5
+ import clsx from "clsx";
6
+ import { type AccordionProps } from "..";
6
7
  import { getTheme } from "../theme/themeUtils";
7
8
 
8
9
  let { children, flush, activeClass, inactiveClass, multiple = false, class: className, transitionType, ...restProps }: AccordionProps = $props();
@@ -18,11 +19,10 @@
18
19
 
19
20
  setContext("ctx", ctx);
20
21
  setContext("ctxTransitionType", transitionType);
21
- const base = $derived(cn(accordion({ flush }), className));
22
- const finalClass = $derived(cn(base, theme));
22
+ const base = $derived(accordion({ flush, class: clsx(theme, className) }));
23
23
  </script>
24
24
 
25
- <div {...restProps} class={finalClass}>
25
+ <div {...restProps} class={base}>
26
26
  {@render children()}
27
27
  </div>
28
28
 
@@ -2,8 +2,9 @@
2
2
  import { slide } from "svelte/transition";
3
3
  import { getContext } from "svelte";
4
4
  import { writable } from "svelte/store";
5
+ import clsx from "clsx";
5
6
  import { accordionItem, type AccordionItemTheme } from ".";
6
- import { type AccordionCtxType, type AccordionItemProps, type ParamsType, cn } from "..";
7
+ import { type AccordionCtxType, type AccordionItemProps, type ParamsType } from "..";
7
8
  import { getTheme } from "../theme/themeUtils";
8
9
 
9
10
  let { children, header, arrowup, arrowdown, open = $bindable(false), activeClass, inactiveClass, transitionType = slide, transitionParams, class: className, headerClass, contentClass }: AccordionItemProps = $props();
@@ -29,11 +30,11 @@
29
30
 
30
31
  const { base, button, content, active, inactive } = $derived(accordionItem({ flush: ctx.flush, open }));
31
32
 
32
- let buttonClass = $derived(cn(button(), open && !ctx.flush && (activeClass || ctx.activeClass || active()), !open && !ctx.flush && (inactiveClass || ctx.inactiveClass || inactive()), className));
33
+ let buttonClass = $derived(clsx(open && !ctx.flush && (activeClass || ctx.activeClass || active()), !open && !ctx.flush && (inactiveClass || ctx.inactiveClass || inactive())));
33
34
  </script>
34
35
 
35
- <h2 class={cn(base({ class: headerClass }), (theme as AccordionItemTheme)?.base)}>
36
- <button type="button" onclick={handleToggle} class={cn(buttonClass, (theme as AccordionItemTheme)?.button)} aria-expanded={open}>
36
+ <h2 class={base({ class: clsx((theme as AccordionItemTheme)?.base, headerClass) })}>
37
+ <button type="button" onclick={handleToggle} class={button({ class: clsx(buttonClass, (theme as AccordionItemTheme)?.button, className) })} aria-expanded={open}>
37
38
  {#if header}
38
39
  {@render header()}
39
40
  {#if open}
@@ -58,14 +59,14 @@
58
59
  {#if useTransition}
59
60
  {#if open && transitionType !== "none"}
60
61
  <div transition:transitionType={transitionParams as ParamsType}>
61
- <div class={cn(content({ class: contentClass }), (theme as AccordionItemTheme)?.content)}>
62
+ <div class={content({ class: clsx((theme as AccordionItemTheme)?.content, contentClass) })}>
62
63
  {@render children()}
63
64
  </div>
64
65
  </div>
65
66
  {/if}
66
67
  {:else}
67
68
  <div class={open ? "block" : "hidden"}>
68
- <div class={cn(content({ class: contentClass }), (theme as AccordionItemTheme)?.content)}>
69
+ <div class={content({ class: clsx(contentClass, (theme as AccordionItemTheme)?.content) })}>
69
70
  {@render children()}
70
71
  </div>
71
72
  </div>
@@ -1,3 +1,4 @@
1
+ import type { ClassValue } from "svelte/elements";
1
2
  export declare const accordion: import("tailwind-variants").TVReturnType<{
2
3
  color: {
3
4
  primary: string;
@@ -90,6 +91,6 @@ export declare const accordionItem: import("tailwind-variants").TVReturnType<{
90
91
  active: string;
91
92
  inactive: string;
92
93
  }, undefined, unknown, unknown, undefined>>;
93
- export type AccordionTheme = string;
94
+ export type AccordionTheme = ClassValue;
94
95
  export type AccordionItemSlots = keyof typeof accordionItem.slots;
95
- export type AccordionItemTheme = Partial<Record<AccordionItemSlots, string>>;
96
+ export type AccordionItemTheme = Partial<Record<AccordionItemSlots, ClassValue>>;
@@ -1,7 +1,8 @@
1
1
  <script lang="ts">
2
2
  import { fade } from "svelte/transition";
3
3
  import { alert } from ".";
4
- import { type AlertProps, type ParamsType, CloseButton, cn } from "..";
4
+ import clsx from "clsx";
5
+ import { type AlertProps, type ParamsType, CloseButton } from "..";
5
6
  import { getTheme } from "../theme/themeUtils";
6
7
 
7
8
  let { children, icon, alertStatus = $bindable(true), closeIcon: CloseIcon, color = "primary", rounded = true, border, class: className, dismissable, transition = fade, params, onclick = () => (alertStatus = false), ...restProps }: AlertProps = $props();
@@ -10,17 +11,14 @@
10
11
  const theme = getTheme("alert");
11
12
 
12
13
  let divCls = $derived(
13
- cn(
14
- alert({
15
- color,
16
- rounded,
17
- border,
18
- icon: !!icon,
19
- dismissable
20
- }),
21
- className,
22
- theme
23
- )
14
+ alert({
15
+ color,
16
+ rounded,
17
+ border,
18
+ icon: !!icon,
19
+ dismissable,
20
+ class: clsx(theme, className)
21
+ })
24
22
  );
25
23
  </script>
26
24
 
@@ -1,4 +1,5 @@
1
1
  import { type VariantProps } from "tailwind-variants";
2
+ import type { ClassValue } from "svelte/elements";
2
3
  type AlertVariants = VariantProps<typeof alert>;
3
4
  declare const alert: import("tailwind-variants").TVReturnType<{
4
5
  color: {
@@ -107,4 +108,4 @@ declare const alert: import("tailwind-variants").TVReturnType<{
107
108
  };
108
109
  }, undefined, "p-4 gap-3 text-sm", unknown, unknown, undefined>>;
109
110
  export { alert, type AlertVariants };
110
- export type AlertTheme = string;
111
+ export type AlertTheme = ClassValue;
@@ -1,6 +1,7 @@
1
1
  <script lang="ts">
2
2
  import { avatar } from ".";
3
- import { type AvatarProps, Indicator, cn } from "..";
3
+ import clsx from "clsx";
4
+ import { type AvatarProps, Indicator } from "..";
4
5
  import { getTheme } from "../theme/themeUtils";
5
6
 
6
7
  let { children, indicator, src, href, target, cornerStyle = "circular", border = false, stacked = false, dot, class: className, alt, size = "md", onclick, ...restProps }: AvatarProps = $props();
@@ -11,16 +12,13 @@
11
12
  dot = dot && { placement: "top-right", color: "gray", size: "lg", ...dot };
12
13
 
13
14
  let avatarClass = $derived(
14
- cn(
15
- avatar({
16
- cornerStyle,
17
- border,
18
- stacked,
19
- size
20
- }),
21
- className,
22
- theme
23
- )
15
+ avatar({
16
+ cornerStyle,
17
+ border,
18
+ stacked,
19
+ size,
20
+ class: clsx(theme, className)
21
+ })
24
22
  );
25
23
  </script>
26
24
 
@@ -1,3 +1,4 @@
1
+ import type { ClassValue } from "svelte/elements";
1
2
  declare const avatar: import("tailwind-variants").TVReturnType<{
2
3
  cornerStyle: {
3
4
  rounded: string;
@@ -60,4 +61,4 @@ declare const avatar: import("tailwind-variants").TVReturnType<{
60
61
  };
61
62
  }, undefined, "relative flex items-center justify-center bg-gray-100 dark:bg-gray-600 text-gray-600 dark:text-gray-300", unknown, unknown, undefined>>;
62
63
  export { avatar };
63
- export type AvatarTheme = string;
64
+ export type AvatarTheme = ClassValue;
@@ -1,7 +1,8 @@
1
1
  <script lang="ts">
2
2
  import { badge, type BadgeTheme } from ".";
3
+ import clsx from "clsx";
3
4
  import { fade } from "svelte/transition";
4
- import { type ParamsType, type BadgeProps, CloseButton, cn } from "..";
5
+ import { type ParamsType, type BadgeProps, CloseButton } from "..";
5
6
  import { getTheme } from "../theme/themeUtils";
6
7
 
7
8
  let { children, icon, badgeStatus = $bindable(true), color = "primary", large = false, dismissable = false, class: className, border, href, target, rounded, transition = fade, params, aClass, onclose, ...restProps }: BadgeProps = $props();
@@ -18,9 +19,9 @@
18
19
  </script>
19
20
 
20
21
  {#if badgeStatus}
21
- <div {...restProps} transition:transition={params as ParamsType} class={cn(base(), className, (theme as BadgeTheme)?.base)}>
22
+ <div {...restProps} transition:transition={params as ParamsType} class={base({ class: clsx((theme as BadgeTheme)?.base, className) })}>
22
23
  {#if href}
23
- <a {href} {target} class={cn(linkClass(), aClass, (theme as BadgeTheme)?.linkClass)}>
24
+ <a {href} {target} class={linkClass({ class: clsx((theme as BadgeTheme)?.linkClass, aClass) })}>
24
25
  {@render children()}
25
26
  </a>
26
27
  {:else}
@@ -1,4 +1,5 @@
1
1
  import { type VariantProps } from "tailwind-variants";
2
+ import type { ClassValue } from "svelte/elements";
2
3
  type BadgeVariants = VariantProps<typeof badge>;
3
4
  declare const badge: import("tailwind-variants").TVReturnType<{
4
5
  color: {
@@ -246,4 +247,4 @@ declare const badge: import("tailwind-variants").TVReturnType<{
246
247
  }, undefined, unknown, unknown, undefined>>;
247
248
  export { badge, type BadgeVariants };
248
249
  export type BadgeSlots = keyof typeof badge.slots;
249
- export type BadgeTheme = Partial<Record<BadgeSlots, string>>;
250
+ export type BadgeTheme = Partial<Record<BadgeSlots, ClassValue>>;
@@ -1,7 +1,8 @@
1
1
  <script lang="ts">
2
2
  import { fade } from "svelte/transition";
3
3
  import { banner, type BannerTheme } from ".";
4
- import { type ParamsType, type BannerProps, CloseButton, cn } from "..";
4
+ import clsx from "clsx";
5
+ import { type ParamsType, type BannerProps, CloseButton } from "..";
5
6
  import { getTheme } from "../theme/themeUtils";
6
7
 
7
8
  let { children, header, open = $bindable(true), dismissable = true, color = "gray", type, class: className, innerClass, transition = fade, params, closeClass, ...restProps }: BannerProps = $props();
@@ -13,15 +14,15 @@
13
14
  </script>
14
15
 
15
16
  {#if open}
16
- <div tabindex="-1" class={cn(base(), className, (theme as BannerTheme)?.base)} {...restProps} transition:transition={params as ParamsType}>
17
- <div class={cn(insideDiv(), innerClass, (theme as BannerTheme)?.insideDiv)}>
17
+ <div tabindex="-1" class={base({ class: clsx((theme as BannerTheme)?.base, className) })} {...restProps} transition:transition={params as ParamsType}>
18
+ <div class={insideDiv({ class: clsx((theme as BannerTheme)?.insideDiv, innerClass) })}>
18
19
  {@render children?.()}
19
20
  </div>
20
21
 
21
22
  {#if dismissable}
22
23
  <div class="flex items-center justify-end">
23
24
  <CloseButton
24
- class={cn(dismissableClass(), closeClass, (theme as BannerTheme)?.dismissable)}
25
+ class={dismissableClass({ class: clsx((theme as BannerTheme)?.dismissable, closeClass) })}
25
26
  {color}
26
27
  ariaLabel="Remove banner"
27
28
  onclick={() => {
@@ -1,4 +1,5 @@
1
1
  import { type VariantProps } from "tailwind-variants";
2
+ import type { ClassValue } from "svelte/elements";
2
3
  export type BannerVariants = VariantProps<typeof banner>;
3
4
  declare const banner: import("tailwind-variants").TVReturnType<{
4
5
  type: {
@@ -228,4 +229,4 @@ declare const banner: import("tailwind-variants").TVReturnType<{
228
229
  }, undefined, unknown, unknown, undefined>>;
229
230
  export { banner };
230
231
  export type BannerSlots = keyof typeof banner.slots;
231
- export type BannerTheme = Partial<Record<BannerSlots, string>>;
232
+ export type BannerTheme = Partial<Record<BannerSlots, ClassValue>>;
@@ -2,6 +2,7 @@
2
2
  import { setContext } from "svelte";
3
3
  import { writable } from "svelte/store";
4
4
  import { bottomNav } from ".";
5
+ import clsx from "clsx";
5
6
  import { type BottomNavProps, type BottomNavContextType, cn, type BottomNavTheme } from "..";
6
7
  import { getTheme } from "../theme/themeUtils";
7
8
 
@@ -24,12 +25,12 @@
24
25
  });
25
26
  </script>
26
27
 
27
- <div {...restProps} class={cn(outer(), outerClass, (theme as BottomNavTheme)?.outer)}>
28
+ <div {...restProps} class={outer({ class: clsx((theme as BottomNavTheme)?.outer, outerClass) })}>
28
29
  {#if header}
29
30
  {@render header()}
30
31
  {/if}
31
32
 
32
- <div class={cn(inner(), innerClass, (theme as BottomNavTheme)?.inner)}>
33
+ <div class={inner({ class: clsx((theme as BottomNavTheme)?.inner, innerClass) })}>
33
34
  {@render children()}
34
35
  </div>
35
36
  </div>
@@ -1,6 +1,7 @@
1
1
  <script lang="ts">
2
2
  import { bottomNavHeader } from ".";
3
- import { type BottomNavHeaderProps, cn, type BottomNavHeaderTheme } from "..";
3
+ import clsx from "clsx";
4
+ import { type BottomNavHeaderProps, type BottomNavHeaderTheme } from "..";
4
5
  import { getTheme } from "../theme/themeUtils";
5
6
 
6
7
  let { children, outerClass, innerClass, ...restProps }: BottomNavHeaderProps = $props();
@@ -11,8 +12,8 @@
11
12
  const { innerDiv, outerDiv } = $derived(bottomNavHeader());
12
13
  </script>
13
14
 
14
- <div {...restProps} class={cn(outerDiv(), outerClass, (theme as BottomNavHeaderTheme)?.outerDiv)}>
15
- <div class={cn(innerDiv(), innerClass, (theme as BottomNavHeaderTheme)?.innerDiv)} role="group">
15
+ <div {...restProps} class={outerDiv({ class: clsx((theme as BottomNavHeaderTheme)?.outerDiv, outerClass) })}>
16
+ <div class={innerDiv({ class: clsx((theme as BottomNavHeaderTheme)?.innerDiv, innerClass) })} role="group">
16
17
  {@render children()}
17
18
  </div>
18
19
  </div>
@@ -1,6 +1,7 @@
1
1
  <script lang="ts">
2
2
  import { bottomNavHeaderItem } from ".";
3
- import { type BottomNavHeaderItemProps, cn } from "..";
3
+ import clsx from "clsx";
4
+ import { type BottomNavHeaderItemProps } from "..";
4
5
  import { getTheme } from "../theme/themeUtils";
5
6
 
6
7
  let { itemName, active, class: className, ...restProps }: BottomNavHeaderItemProps = $props();
@@ -8,10 +9,10 @@
8
9
  // Theme context
9
10
  const theme = getTheme("bottomNavHeaderItem");
10
11
 
11
- let base = $derived(bottomNavHeaderItem({ active }));
12
+ let base = $derived(bottomNavHeaderItem({ active, class: clsx(theme, className) }));
12
13
  </script>
13
14
 
14
- <button {...restProps} class={cn(base, className, theme)}>
15
+ <button {...restProps} class={base}>
15
16
  {itemName}
16
17
  </button>
17
18
 
@@ -2,7 +2,8 @@
2
2
  import { getContext } from "svelte";
3
3
  import type { HTMLButtonAttributes, HTMLAnchorAttributes } from "svelte/elements";
4
4
  import { bottomNavItem, type BottomNavItemTheme } from ".";
5
- import { type BottomNavItemProps, type BottomNavContextType, type BottomNavVariantType, cn } from "..";
5
+ import clsx from "clsx";
6
+ import { type BottomNavItemProps, type BottomNavContextType, type BottomNavVariantType } from "..";
6
7
  import { getTheme } from "../theme/themeUtils";
7
8
 
8
9
  let { children, btnName, appBtnPosition = "middle", target, activeClass, href = "", btnClass, spanClass, active: manualActive, ...restProps }: BottomNavItemProps = $props();
@@ -26,11 +27,11 @@
26
27
  let isActive = $derived(manualActive !== undefined ? !!manualActive : navUrl ? (href === "/" ? navUrl === "/" : href && (navUrl === href || navUrl.startsWith(href + "/") || (href !== "/" && navUrl.replace(/^https?:\/\/[^/]+/, "").startsWith(href)))) : false);
27
28
 
28
29
  function getCommonClass() {
29
- return cn(base(), isActive && (activeClass ?? context.activeClass), btnClass, (theme as BottomNavItemTheme)?.base);
30
+ return base({ class: clsx(isActive && (activeClass ?? context.activeClass), (theme as BottomNavItemTheme)?.base, btnClass) });
30
31
  }
31
32
 
32
33
  function getSpanClass() {
33
- return cn(span(), isActive && (activeClass ?? context.activeClass), spanClass, (theme as BottomNavItemTheme)?.span);
34
+ return span({ class: clsx(isActive && (activeClass ?? context.activeClass), (theme as BottomNavItemTheme)?.span, spanClass) });
34
35
  }
35
36
 
36
37
  /* eslint-disable @typescript-eslint/no-explicit-any */
@@ -1,3 +1,4 @@
1
+ import type { ClassValue } from "svelte/elements";
1
2
  export declare const bottomNav: import("tailwind-variants").TVReturnType<{
2
3
  position: {
3
4
  static: {
@@ -342,10 +343,10 @@ export declare const bottomNavHeaderItem: import("tailwind-variants").TVReturnTy
342
343
  };
343
344
  }, undefined, "px-5 py-1.5 text-xs font-medium rounded-lg", unknown, unknown, undefined>>;
344
345
  export type BottomNavSlots = keyof typeof bottomNav.slots;
345
- export type BottomNavTheme = Partial<Record<BottomNavSlots, string>>;
346
+ export type BottomNavTheme = Partial<Record<BottomNavSlots, ClassValue>>;
346
347
  export type BottomNavItemSlots = keyof typeof bottomNavItem.slots;
347
- export type BottomNavItemTheme = Partial<Record<BottomNavItemSlots, string>>;
348
+ export type BottomNavItemTheme = Partial<Record<BottomNavItemSlots, ClassValue>>;
348
349
  export type BottomnavheaderSlots = keyof typeof bottomNavHeader.slots;
349
- export type BottomNavHeaderTheme = Partial<Record<BottomnavheaderSlots, string>>;
350
+ export type BottomNavHeaderTheme = Partial<Record<BottomnavheaderSlots, ClassValue>>;
350
351
  export type bottomNavHeaderItemSlots = keyof typeof bottomNavHeaderItem.slots;
351
- export type BottomNavHeaderItemTheme = Partial<Record<bottomNavHeaderItemSlots, string>>;
352
+ export type BottomNavHeaderItemTheme = Partial<Record<bottomNavHeaderItemSlots, ClassValue>>;
@@ -1,6 +1,7 @@
1
1
  <script lang="ts">
2
2
  import { breadcrumb } from ".";
3
- import { type BreadcrumbProps, cn, type BreadcrumbTheme } from "..";
3
+ import clsx from "clsx";
4
+ import { type BreadcrumbProps, type BreadcrumbTheme } from "..";
4
5
  import { getTheme } from "../theme/themeUtils";
5
6
 
6
7
  let { children, solid = false, class: className, olClass, ariaLabel = "Breadcrumb", ...restProps }: BreadcrumbProps = $props();
@@ -8,8 +9,8 @@
8
9
  const theme = getTheme("breadcrumb");
9
10
 
10
11
  const { nav, list } = breadcrumb({ solid });
11
- let classNav = $derived(cn(nav(), className, (theme as BreadcrumbTheme)?.nav));
12
- let classList = $derived(cn(list(), olClass, (theme as BreadcrumbTheme)?.list));
12
+ let classNav = $derived(nav({ class: clsx((theme as BreadcrumbTheme)?.nav, className) }));
13
+ let classList = $derived(list({ class: clsx((theme as BreadcrumbTheme)?.list, olClass) }));
13
14
  </script>
14
15
 
15
16
  <nav aria-label={ariaLabel} {...restProps} class={classNav}>
@@ -1,6 +1,7 @@
1
1
  <script lang="ts">
2
2
  import { breadcrumbItem } from "./index";
3
- import { type BreadcrumbItemProps, cn, type BreadcrumbItemTheme } from "..";
3
+ import clsx from "clsx";
4
+ import { type BreadcrumbItemProps, type BreadcrumbItemTheme } from "..";
4
5
  import { getTheme } from "../theme/themeUtils";
5
6
 
6
7
  let { children, icon, home = false, href, linkClass, spanClass, homeClass, class: className, ...restProps }: BreadcrumbItemProps = $props();
@@ -15,9 +16,9 @@
15
16
  );
16
17
  </script>
17
18
 
18
- <li {...restProps} class={cn(base(), className, (theme as BreadcrumbItemTheme)?.base)}>
19
+ <li {...restProps} class={base({ class: clsx((theme as BreadcrumbItemTheme)?.base, className) })}>
19
20
  {#if home}
20
- <a class={cn(base({ home: true }), homeClass, (theme as BreadcrumbItemTheme)?.base)} {href}>
21
+ <a class={base({ home: true, class: clsx((theme as BreadcrumbItemTheme)?.base, homeClass) })} {href}>
21
22
  {#if icon}
22
23
  {@render icon()}
23
24
  {:else}
@@ -32,17 +33,17 @@
32
33
  {#if icon}
33
34
  {@render icon()}
34
35
  {:else}
35
- <svg class={cn(separator(), (theme as BreadcrumbItemTheme)?.separator)} fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
36
+ <svg class={separator({ class: clsx((theme as BreadcrumbItemTheme)?.separator) })} fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
36
37
  <path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd" />
37
38
  </svg>
38
39
  {/if}
39
40
 
40
41
  {#if href}
41
- <a class={cn(base({ home: false, hasHref: true }), linkClass, (theme as BreadcrumbItemTheme)?.base)} {href}>
42
+ <a class={base({ home: false, hasHref: true, class: clsx((theme as BreadcrumbItemTheme)?.base, linkClass) })} {href}>
42
43
  {@render children()}
43
44
  </a>
44
45
  {:else}
45
- <span class={cn(base({ home: false, hasHref: false }), spanClass, (theme as BreadcrumbItemTheme)?.base)}>
46
+ <span class={base({ home: false, hasHref: false, class: clsx((theme as BreadcrumbItemTheme)?.base, spanClass) })}>
46
47
  {@render children()}
47
48
  </span>
48
49
  {/if}
@@ -1,3 +1,4 @@
1
+ import type { ClassValue } from "svelte/elements";
1
2
  export declare const breadcrumb: import("tailwind-variants").TVReturnType<{
2
3
  solid: {
3
4
  true: {
@@ -67,6 +68,6 @@ export declare const breadcrumbItem: import("tailwind-variants").TVReturnType<{
67
68
  separator: string;
68
69
  }, undefined, unknown, unknown, undefined>>;
69
70
  export type BreadcrumbSlots = keyof typeof breadcrumb.slots;
70
- export type BreadcrumbTheme = Partial<Record<BreadcrumbSlots, string>>;
71
+ export type BreadcrumbTheme = Partial<Record<BreadcrumbSlots, ClassValue>>;
71
72
  export type BreadcrumbItemSlots = keyof typeof breadcrumbItem.slots;
72
- export type BreadcrumbItemTheme = Partial<Record<BreadcrumbItemSlots, string>>;
73
+ export type BreadcrumbItemTheme = Partial<Record<BreadcrumbItemSlots, ClassValue>>;
@@ -1,14 +1,15 @@
1
1
  <script lang="ts">
2
2
  import { setContext } from "svelte";
3
3
  import { buttonGroup } from ".";
4
- import { type ButtonGroupProps, cn } from "..";
4
+ import clsx from "clsx";
5
+ import { type ButtonGroupProps } from "..";
5
6
  import { getTheme } from "../theme/themeUtils";
6
7
 
7
8
  let { children, size = "md", disabled, class: className, ...restProps }: ButtonGroupProps = $props();
8
9
 
9
10
  const theme = getTheme("buttonGroup");
10
11
 
11
- let groupClass = $derived(cn(buttonGroup({ size }), className, theme));
12
+ let groupClass = $derived(buttonGroup({ size, class: clsx(theme, className) }));
12
13
  setContext("group", size);
13
14
  setContext("disabled", disabled);
14
15
  </script>
@@ -1,3 +1,4 @@
1
+ import type { ClassValue } from "svelte/elements";
1
2
  declare const buttonGroup: import("tailwind-variants").TVReturnType<{
2
3
  size: {
3
4
  sm: string;
@@ -18,4 +19,4 @@ declare const buttonGroup: import("tailwind-variants").TVReturnType<{
18
19
  };
19
20
  }, undefined, "inline-flex rounded-lg shadow-xs", unknown, unknown, undefined>>;
20
21
  export { buttonGroup };
21
- export type ButtonGroupTheme = string;
22
+ export type ButtonGroupTheme = ClassValue;
@@ -1,6 +1,7 @@
1
1
  <script lang="ts">
2
2
  import { getContext } from "svelte";
3
- import { type SizeType, type ButtonProps, cn } from "..";
3
+ import clsx from "clsx";
4
+ import { type SizeType, type ButtonProps } from "..";
4
5
  import { getTheme } from "../theme/themeUtils";
5
6
  import { button, type ButtonTheme } from ".";
6
7
 
@@ -16,7 +17,7 @@
16
17
  let isDisabled = $derived(Boolean(ctxDisabled) || Boolean(disabled));
17
18
 
18
19
  const { base, outline: outline_, shadow: shadow_ } = $derived(button({ color: actualColor, size: actualSize, disabled: isDisabled, pill, group: !!group }));
19
- let btnCls = $derived(cn(base(), outline && outline_(), shadow && shadow_(), className, (theme as ButtonTheme)?.base));
20
+ let btnCls = $derived(base({ class: clsx(outline && outline_(), shadow && shadow_(), (theme as ButtonTheme)?.base, className) }));
20
21
  </script>
21
22
 
22
23
  {#if restProps.href === undefined}
@@ -1,7 +1,8 @@
1
1
  <script lang="ts">
2
2
  import { getContext } from "svelte";
3
3
  import { gradientButton, type GradientButtonTheme } from ".";
4
- import { type GradientButtonProps, type SizeType, Button, cn } from "..";
4
+ import clsx from "clsx";
5
+ import { type GradientButtonProps, type SizeType, Button } from "..";
5
6
  import { getTheme } from "../theme/themeUtils";
6
7
 
7
8
  const group: SizeType = getContext("group");
@@ -14,13 +15,13 @@
14
15
  </script>
15
16
 
16
17
  {#if outline}
17
- <div class={cn(base(), className, (theme as GradientButtonTheme)?.base)}>
18
- <Button {...restProps} class={cn(outlineWrapper(), btnClass, (theme as GradientButtonTheme)?.outlineWrapper)} {disabled} {href} {size}>
18
+ <div class={base({ class: clsx((theme as GradientButtonTheme)?.base, className) })}>
19
+ <Button {...restProps} class={outlineWrapper({ class: clsx((theme as GradientButtonTheme)?.outlineWrapper, btnClass) })} {disabled} {href} {size}>
19
20
  {@render children?.()}
20
21
  </Button>
21
22
  </div>
22
23
  {:else}
23
- <Button {...restProps} class={cn(base(), className, (theme as GradientButtonTheme)?.base)} {disabled} {href} {size}>
24
+ <Button {...restProps} class={base({ class: clsx((theme as GradientButtonTheme)?.base, className) })} {disabled} {href} {size}>
24
25
  {@render children?.()}
25
26
  </Button>
26
27
  {/if}
@@ -1,4 +1,5 @@
1
1
  import { type VariantProps } from "tailwind-variants";
2
+ import type { ClassValue } from "svelte/elements";
2
3
  export type ButtonVariants = VariantProps<typeof button>;
3
4
  export declare const button: import("tailwind-variants").TVReturnType<{
4
5
  color: {
@@ -703,6 +704,6 @@ export declare const gradientButton: import("tailwind-variants").TVReturnType<{
703
704
  outlineWrapper: string;
704
705
  }, undefined, unknown, unknown, undefined>>;
705
706
  export type ButtonSlots = keyof typeof button.slots;
706
- export type ButtonTheme = Partial<Record<ButtonSlots, string>>;
707
+ export type ButtonTheme = Partial<Record<ButtonSlots, ClassValue>>;
707
708
  export type GradientButtonSlots = keyof typeof gradientButton.slots;
708
- export type GradientButtonTheme = Partial<Record<GradientButtonSlots, string>>;
709
+ export type GradientButtonTheme = Partial<Record<GradientButtonSlots, ClassValue>>;
@@ -1,5 +1,5 @@
1
1
  <script lang="ts">
2
- import { type CardProps, cn } from "..";
2
+ import { type CardProps } from "..";
3
3
  import { getTheme } from "../theme/themeUtils";
4
4
  import clsx from "clsx";
5
5
  import { card, type CardTheme } from ".";
@@ -22,7 +22,7 @@
22
22
 
23
23
  {#snippet childSlot()}
24
24
  {#if img}
25
- <img class={cn(image({ class: clsx(imgClass) }), (theme as CardTheme)?.image)} src={img} alt={img} />
25
+ <img class={image({ class: clsx((theme as CardTheme)?.image, imgClass) })} src={img} alt={img} />
26
26
  {@render children()}
27
27
  {:else}
28
28
  {@render children()}
@@ -30,11 +30,11 @@
30
30
  {/snippet}
31
31
 
32
32
  {#if restProps.href === undefined}
33
- <div {...restProps} class={cn(base({ class: clsx(className) }), (theme as CardTheme)?.base)}>
33
+ <div {...restProps} class={base({ class: clsx((theme as CardTheme)?.base, className) })}>
34
34
  {@render childSlot()}
35
35
  </div>
36
36
  {:else}
37
- <a {...restProps} class={cn(base({ class: clsx(className) }), (theme as CardTheme)?.base)}>
37
+ <a {...restProps} class={base({ class: clsx((theme as CardTheme)?.base, className) })}>
38
38
  {@render childSlot()}
39
39
  </a>
40
40
  {/if}
@@ -1,4 +1,5 @@
1
1
  import { type VariantProps } from "tailwind-variants";
2
+ import type { ClassValue } from "svelte/elements";
2
3
  export type CardVariants = VariantProps<typeof card>;
3
4
  export declare const card: import("tailwind-variants").TVReturnType<{
4
5
  size: {
@@ -392,4 +393,4 @@ export declare const card: import("tailwind-variants").TVReturnType<{
392
393
  image: string;
393
394
  }, undefined, unknown, unknown, undefined>>;
394
395
  export type CardSlots = keyof typeof card.slots;
395
- export type CardTheme = Partial<Record<CardSlots, string>>;
396
+ export type CardTheme = Partial<Record<CardSlots, ClassValue>>;
@@ -3,7 +3,8 @@
3
3
  import { writable } from "svelte/store";
4
4
  import { canChangeSlide } from "./CarouselSlide";
5
5
  import { carousel } from "./theme";
6
- import { type CarouselProps, type State, Slide, cn } from "..";
6
+ import clsx from "clsx";
7
+ import { type CarouselProps, type State, Slide } from "..";
7
8
  import { getTheme } from "../theme/themeUtils";
8
9
 
9
10
  const SLIDE_DURATION_RATIO = 0.25;
@@ -168,12 +169,12 @@
168
169
 
169
170
  <!-- The move listeners go here, so things keep working if the touch strays out of the element. -->
170
171
  <svelte:document onmousemove={onDragMove} onmouseup={onDragStop} ontouchmove={onDragMove} ontouchend={onDragStop} />
171
- <div bind:this={carouselDiv} class={cn("relative", divClass)} onmousedown={onDragStart} ontouchstart={onDragStart} onmousemove={onDragMove} onmouseup={onDragStop} ontouchmove={onDragMove} ontouchend={onDragStop} role="button" aria-label={ariaLabel} tabindex="0">
172
- <div {...restProps} class={cn(carousel(), activeDragGesture === undefined ? "transition-transform" : "", className, theme)} {@attach loop}>
172
+ <div bind:this={carouselDiv} class={clsx("relative", divClass)} onmousedown={onDragStart} ontouchstart={onDragStart} onmousemove={onDragMove} onmouseup={onDragStop} ontouchmove={onDragMove} ontouchend={onDragStop} role="button" aria-label={ariaLabel} tabindex="0">
173
+ <div {...restProps} class={carousel({ class: clsx(activeDragGesture === undefined ? "transition-transform" : "", theme, className) })} {@attach loop}>
173
174
  {#if slide}
174
175
  {@render slide({ index, Slide })}
175
176
  {:else}
176
- <Slide image={images[index]} class={cn(imgClass)} {transition} />
177
+ <Slide image={images[index]} class={clsx(imgClass)} {transition} />
177
178
  {/if}
178
179
  </div>
179
180
  {@render children?.(index)}