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
@@ -225,7 +225,7 @@ export declare const table: import("tailwind-variants").TVReturnType<{
225
225
  table: string;
226
226
  }, undefined, unknown, unknown, undefined>>;
227
227
  export type TableSlots = keyof typeof table.slots;
228
- export type TableTheme = Partial<Record<TableSlots, string>>;
228
+ export type TableTheme = Partial<Record<TableSlots, ClassValue>>;
229
229
  export declare const tableBodyRow: import("tailwind-variants").TVReturnType<{
230
230
  color: {
231
231
  default: string;
@@ -326,7 +326,7 @@ export declare const tableBodyRow: import("tailwind-variants").TVReturnType<{
326
326
  true: string;
327
327
  };
328
328
  }, undefined, "", unknown, unknown, undefined>>;
329
- export type TableBodyRowTheme = string;
329
+ export type TableBodyRowTheme = ClassValue;
330
330
  export declare const tableHead: import("tailwind-variants").TVReturnType<{
331
331
  color: {
332
332
  default: string;
@@ -424,11 +424,11 @@ export declare const tableHead: import("tailwind-variants").TVReturnType<{
424
424
  false: string;
425
425
  };
426
426
  }, undefined, "text-xs uppercase", unknown, unknown, undefined>>;
427
- export type TableHeadTheme = string;
427
+ export type TableHeadTheme = ClassValue;
428
428
  export declare const tableBodyCell: import("tailwind-variants").TVReturnType<{} | {} | {}, undefined, "px-6 py-4 whitespace-nowrap font-medium", {} | {}, undefined, import("tailwind-variants").TVReturnType<unknown, undefined, "px-6 py-4 whitespace-nowrap font-medium", unknown, unknown, undefined>>;
429
- export type TableBodyCellTheme = string;
429
+ export type TableBodyCellTheme = ClassValue;
430
430
  export declare const tableHeadCell: import("tailwind-variants").TVReturnType<{} | {} | {}, undefined, "px-6 py-3", {} | {}, undefined, import("tailwind-variants").TVReturnType<unknown, undefined, "px-6 py-3", unknown, unknown, undefined>>;
431
- export type TableHeadCellTheme = string;
431
+ export type TableHeadCellTheme = ClassValue;
432
432
  export type TableSearchClasses = Partial<{
433
433
  root: ClassValue;
434
434
  innerDiv: ClassValue;
@@ -609,4 +609,4 @@ export declare const tableSearch: import("tailwind-variants").TVReturnType<{
609
609
  }, undefined, unknown, unknown, undefined>>;
610
610
  export type TableSearchColor = "default" | "blue" | "green" | "red" | "yellow" | "purple" | "indigo" | "pink" | "custom";
611
611
  export type TableSearchSlots = keyof typeof tableSearch.slots;
612
- export type TableSearchTheme = Partial<Record<TableSearchSlots, string>>;
612
+ export type TableSearchTheme = Partial<Record<TableSearchSlots, ClassValue>>;
@@ -2,7 +2,8 @@
2
2
  import { getContext } from "svelte";
3
3
  import { writable } from "svelte/store";
4
4
  import { tabItem, tabs, type TabItemTheme } from ".";
5
- import { type TabitemProps, type TabCtxType, cn } from "..";
5
+ import clsx from "clsx";
6
+ import { type TabitemProps, type TabCtxType } from "..";
6
7
  import { getTheme } from "../theme/themeUtils";
7
8
 
8
9
  let { children, titleSlot, open = false, title = "Tab title", activeClass, inactiveClass, class: className, disabled, tabStyle, ...restProps }: TabitemProps = $props();
@@ -32,8 +33,8 @@
32
33
  const { base, button, content } = $derived(tabItem({ open, disabled }));
33
34
  </script>
34
35
 
35
- <li {...restProps} class={cn(base(), className, (theme as TabItemTheme)?.base)} role="presentation">
36
- <button type="button" onclick={() => (open = true)} role="tab" id={tabId} aria-controls={ctx.panelId} aria-selected={open} {disabled} class={cn(button(), open ? (activeClass ?? active()) : (inactiveClass ?? inactive()), (theme as TabItemTheme)?.button)}>
36
+ <li {...restProps} class={base({ class: clsx((theme as TabItemTheme)?.base, className) })} role="presentation">
37
+ <button type="button" onclick={() => (open = true)} role="tab" id={tabId} aria-controls={ctx.panelId} aria-selected={open} {disabled} class={button({ class: clsx(open ? (activeClass ?? active()) : (inactiveClass ?? inactive()), (theme as TabItemTheme)?.button) })}>
37
38
  {#if titleSlot}
38
39
  {@render titleSlot()}
39
40
  {:else}
@@ -42,7 +43,7 @@
42
43
  </button>
43
44
 
44
45
  {#if open && children}
45
- <div class={cn(content(), (theme as TabItemTheme)?.content)}>
46
+ <div class={content({ class: clsx((theme as TabItemTheme)?.content) })}>
46
47
  <div use:init>
47
48
  {@render children()}
48
49
  </div>
@@ -4,7 +4,6 @@
4
4
  import { setContext } from "svelte";
5
5
  import { tabs, type TabsTheme } from ".";
6
6
  import type { TabsProps, TabCtxType } from "../types";
7
- import { cn } from "..";
8
7
  import { getTheme } from "../theme/themeUtils";
9
8
 
10
9
  let { children, tabStyle = "none", ulClass, contentClass, divider = true, ...restProps }: TabsProps = $props();
@@ -36,13 +35,13 @@
36
35
  }
37
36
  </script>
38
37
 
39
- <ul role="tablist" {...restProps} class={cn(base(), clsx(ulClass), (theme as TabsTheme)?.base)}>
38
+ <ul role="tablist" {...restProps} class={base({ class: clsx((theme as TabsTheme)?.base, ulClass) })}>
40
39
  {@render children()}
41
40
  </ul>
42
41
  {#if dividerBool}
43
- <div class={cn(dividerClass(), (theme as TabsTheme)?.divider)}></div>
42
+ <div class={dividerClass({ class: clsx((theme as TabsTheme)?.divider) })}></div>
44
43
  {/if}
45
- <div id={panelId} class={cn(content(), clsx(contentClass), (theme as TabsTheme)?.content)} role="tabpanel" aria-labelledby={panelId} use:init></div>
44
+ <div id={panelId} class={content({ class: clsx((theme as TabsTheme)?.content, contentClass) })} role="tabpanel" aria-labelledby={panelId} use:init></div>
46
45
 
47
46
  <!--
48
47
  @component
@@ -1,4 +1,5 @@
1
1
  import { type VariantProps } from "tailwind-variants";
2
+ import type { ClassValue } from "svelte/elements";
2
3
  export type TabsVaraints = VariantProps<typeof tabs>;
3
4
  export declare const tabs: import("tailwind-variants").TVReturnType<{
4
5
  tabStyle: {
@@ -89,7 +90,7 @@ export declare const tabs: import("tailwind-variants").TVReturnType<{
89
90
  inactive: string;
90
91
  }, undefined, unknown, unknown, undefined>>;
91
92
  export type TabsSlots = keyof typeof tabs.slots;
92
- export type TabsTheme = Partial<Record<TabsSlots, string>>;
93
+ export type TabsTheme = Partial<Record<TabsSlots, ClassValue>>;
93
94
  export declare const tabItem: import("tailwind-variants").TVReturnType<{
94
95
  open: {
95
96
  true: {
@@ -137,4 +138,4 @@ export declare const tabItem: import("tailwind-variants").TVReturnType<{
137
138
  content: string;
138
139
  }, undefined, unknown, unknown, undefined>>;
139
140
  export type TabItemSlots = keyof typeof tabItem.slots;
140
- export type TabItemTheme = Partial<Record<TabItemSlots, string>>;
141
+ export type TabItemTheme = Partial<Record<TabItemSlots, ClassValue>>;
@@ -2,7 +2,6 @@
2
2
  import clsx from "clsx";
3
3
  import { activity } from ".";
4
4
  import type { ActivityProps } from "../types";
5
- import { cn } from "..";
6
5
  import { getTheme } from "../theme/themeUtils";
7
6
 
8
7
  let { children, class: className, ...restProps }: ActivityProps = $props();
@@ -10,7 +9,7 @@
10
9
  const theme = getTheme("activity");
11
10
  </script>
12
11
 
13
- <ol {...restProps} class={cn(activity({ class: clsx(className) }), theme)}>
12
+ <ol {...restProps} class={activity({ class: clsx(theme, className) })}>
14
13
  {@render children()}
15
14
  </ol>
16
15
 
@@ -1,7 +1,7 @@
1
1
  <script lang="ts">
2
2
  import { activityItem, type ActivityItemTheme } from "./index";
3
3
  import type { ActivityItemProps } from "../types";
4
- import { cn } from "..";
4
+ import clsx from "clsx";
5
5
  import { getTheme } from "../theme/themeUtils";
6
6
 
7
7
  let { activities, liClass, spanClass, imgClass, outerDivClass, innerDivClass, timeClass, titleClass, textClass, ...restProps }: ActivityItemProps = $props();
@@ -12,19 +12,19 @@
12
12
  </script>
13
13
 
14
14
  {#each activities as { title: name, date, src, alt, text: activity }}
15
- <li {...restProps} class={cn(li({ class: liClass }), (theme as ActivityItemTheme)?.li)}>
16
- <span class={cn(span({ class: spanClass }), (theme as ActivityItemTheme)?.span)}>
17
- <img class={cn(img({ class: imgClass }), (theme as ActivityItemTheme)?.img)} {src} {alt} />
15
+ <li {...restProps} class={li({ class: clsx((theme as ActivityItemTheme)?.li, liClass) })}>
16
+ <span class={span({ class: clsx((theme as ActivityItemTheme)?.span, spanClass) })}>
17
+ <img class={img({ class: clsx((theme as ActivityItemTheme)?.img, imgClass) })} {src} {alt} />
18
18
  </span>
19
- <div class={cn(outerDiv({ class: outerDivClass }), (theme as ActivityItemTheme)?.outerDiv)}>
20
- <div class={cn(innerDiv({ class: innerDivClass }), (theme as ActivityItemTheme)?.innerDiv)}>
21
- <time class={cn(time({ class: timeClass }), (theme as ActivityItemTheme)?.time)}>{date}</time>
22
- <div class={cn(title({ class: titleClass }), (theme as ActivityItemTheme)?.title)}>
19
+ <div class={outerDiv({ class: clsx((theme as ActivityItemTheme)?.outerDiv, outerDivClass) })}>
20
+ <div class={innerDiv({ class: clsx((theme as ActivityItemTheme)?.innerDiv, innerDivClass) })}>
21
+ <time class={time({ class: clsx((theme as ActivityItemTheme)?.time, timeClass) })}>{date}</time>
22
+ <div class={title({ class: clsx((theme as ActivityItemTheme)?.title, titleClass) })}>
23
23
  {@html name}
24
24
  </div>
25
25
  </div>
26
26
  {#if activity}
27
- <div class={cn(text({ class: textClass }), (theme as ActivityItemTheme)?.text)}>
27
+ <div class={text({ class: clsx((theme as ActivityItemTheme)?.text, textClass) })}>
28
28
  {@html activity}
29
29
  </div>
30
30
  {/if}
@@ -1,7 +1,7 @@
1
1
  <script lang="ts">
2
2
  import { group, type GroupTheme } from ".";
3
3
  import type { GroupProps } from "../types";
4
- import { cn } from "..";
4
+ import clsx from "clsx";
5
5
  import { getTheme } from "../theme/themeUtils";
6
6
 
7
7
  let { children, divClass, timeClass, date, olClass, ...restProps }: GroupProps = $props();
@@ -11,9 +11,9 @@
11
11
  const { div, time, ol } = $derived(group());
12
12
  </script>
13
13
 
14
- <div class={cn(div({ class: divClass }), (theme as GroupTheme)?.div)}>
15
- <time class={cn(time({ class: timeClass }), (theme as GroupTheme)?.time)}>{date}</time>
16
- <ol {...restProps} class={cn(ol({ class: olClass }), (theme as GroupTheme)?.ol)}>
14
+ <div class={div({ class: clsx((theme as GroupTheme)?.div, divClass) })}>
15
+ <time class={time({ class: clsx((theme as GroupTheme)?.time, timeClass) })}>{date}</time>
16
+ <ol {...restProps} class={ol({ class: clsx((theme as GroupTheme)?.ol, olClass) })}>
17
17
  {@render children()}
18
18
  </ol>
19
19
  </div>
@@ -1,7 +1,7 @@
1
1
  <script lang="ts">
2
2
  import { groupItem, type GroupItemTheme } from ".";
3
3
  import type { GroupItemProps } from "../types";
4
- import { cn } from "..";
4
+ import clsx from "clsx";
5
5
  import { getTheme } from "../theme/themeUtils";
6
6
 
7
7
  let { timelines, aClass, imgClass, divClass, titleClass, spanClass, ...restProps }: GroupItemProps = $props();
@@ -13,17 +13,17 @@
13
13
 
14
14
  {#each timelines as { name, src, alt, isPrivate, href, comment }}
15
15
  <li {...restProps}>
16
- <a {href} class={cn(a({ class: aClass }), (theme as GroupItemTheme)?.a)}>
17
- <img class={cn(img({ class: imgClass }), (theme as GroupItemTheme)?.img)} {src} {alt} />
18
- <div class={cn(div({ class: divClass }), (theme as GroupItemTheme)?.div)}>
19
- <div class={cn(title({ class: titleClass }), (theme as GroupItemTheme)?.title)}>
16
+ <a {href} class={a({ class: clsx((theme as GroupItemTheme)?.a, aClass) })}>
17
+ <img class={img({ class: clsx((theme as GroupItemTheme)?.img, imgClass) })} {src} {alt} />
18
+ <div class={div({ class: clsx((theme as GroupItemTheme)?.div, divClass) })}>
19
+ <div class={title({ class: clsx((theme as GroupItemTheme)?.title, titleClass) })}>
20
20
  {@html name}
21
21
  </div>
22
22
  {#if comment}
23
23
  <div class="text-sm font-normal">{comment}</div>
24
24
  {/if}
25
25
 
26
- <span class={cn(span({ class: spanClass }), (theme as GroupItemTheme)?.span)}>
26
+ <span class={span({ class: clsx((theme as GroupItemTheme)?.span, spanClass) })}>
27
27
  {#if isPrivate}
28
28
  <svg class="me-1 h-3 w-3" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
29
29
  <path fill-rule="evenodd" d="M3.707 2.293a1 1 0 00-1.414 1.414l14 14a1 1 0 001.414-1.414l-1.473-1.473A10.014 10.014 0 0019.542 10C18.268 5.943 14.478 3 10 3a9.958 9.958 0 00-4.512 1.074l-1.78-1.781zm4.261 4.26l1.514 1.515a2.003 2.003 0 012.45 2.45l1.514 1.514a4 4 0 00-5.478-5.478z" clip-rule="evenodd" />
@@ -3,7 +3,6 @@
3
3
  import { timeline } from ".";
4
4
  import clsx from "clsx";
5
5
  import type { TimelineProps, TimelineVariants } from "../types";
6
- import { cn } from "..";
7
6
  import { getTheme } from "../theme/themeUtils";
8
7
 
9
8
  let { children, order = "default", class: className, ...restProps }: TimelineProps = $props();
@@ -11,10 +10,10 @@
11
10
  const theme = getTheme("timeline");
12
11
 
13
12
  setContext<TimelineVariants["order"]>("order", order);
14
- const olCls = $derived(timeline({ order, class: clsx(className) }));
13
+ const olCls = $derived(timeline({ order, class: clsx(theme, className) }));
15
14
  </script>
16
15
 
17
- <ol {...restProps} class={cn(olCls, theme)}>
16
+ <ol {...restProps} class={olCls}>
18
17
  {@render children()}
19
18
  </ol>
20
19
 
@@ -2,7 +2,7 @@
2
2
  import { getContext } from "svelte";
3
3
  import { timelineItem, type TimelineItemTheme } from ".";
4
4
  import type { TimelineItemProps, TimelineVariants, DateFormat } from "../types";
5
- import { cn } from "..";
5
+ import clsx from "clsx";
6
6
  import { getTheme } from "../theme/themeUtils";
7
7
 
8
8
  let { children, orientationSlot, title, date, dateFormat = "month-year", svgClass, liClass, divClass, timeClass, h3Class, ...restProps }: TimelineItemProps = $props();
@@ -42,31 +42,31 @@
42
42
  }
43
43
  </script>
44
44
 
45
- <li {...restProps} class={cn(li({ class: liClass }), (theme as TimelineItemTheme)?.li)}>
45
+ <li {...restProps} class={li({ class: clsx((theme as TimelineItemTheme)?.li, liClass) })}>
46
46
  {#if order !== "default"}
47
47
  {#if orientationSlot && (order === "vertical" || order === "horizontal")}
48
48
  {@render orientationSlot()}
49
49
  {:else}
50
- <div class={cn(div({ class: divClass }), (theme as TimelineItemTheme)?.div)}>
51
- <svg aria-hidden="true" class={cn(svg({ class: svgClass }), (theme as TimelineItemTheme)?.svg)} fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
50
+ <div class={div({ class: clsx((theme as TimelineItemTheme)?.div, divClass) })}>
51
+ <svg aria-hidden="true" class={svg({ class: clsx((theme as TimelineItemTheme)?.svg, svgClass) })} fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
52
52
  <path fill-rule="evenodd" d="M6 2a1 1 0 00-1 1v1H4a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V6a2 2 0 00-2-2h-1V3a1 1 0 10-2 0v1H7V3a1 1 0 00-1-1zm0 5a1 1 0 000 2h8a1 1 0 100-2H6z" clip-rule="evenodd" />
53
53
  </svg>
54
54
  </div>
55
55
  {/if}
56
56
  {:else if date}
57
- <time datetime={date} class={cn(time({ class: timeClass }), (theme as TimelineItemTheme)?.time)}>
57
+ <time datetime={date} class={time({ class: clsx((theme as TimelineItemTheme)?.time, timeClass) })}>
58
58
  {formatDisplayDate(date, dateFormat)}
59
59
  </time>
60
60
  {/if}
61
61
  {#if title}
62
- <h3 class={cn(h3({ class: h3Class }), (theme as TimelineItemTheme)?.h3)}>
62
+ <h3 class={h3({ class: clsx((theme as TimelineItemTheme)?.h3, h3Class) })}>
63
63
  {title}
64
64
  </h3>
65
65
  {/if}
66
66
 
67
67
  {#if order !== "default"}
68
68
  {#if date}
69
- <time datetime={date} class={cn(time({ class: timeClass }), (theme as TimelineItemTheme)?.time)}>
69
+ <time datetime={date} class={time({ class: clsx((theme as TimelineItemTheme)?.time, timeClass) })}>
70
70
  {formatDisplayDate(date, dateFormat)}
71
71
  </time>
72
72
  {/if}
@@ -1,6 +1,7 @@
1
1
  import { type VariantProps } from "tailwind-variants";
2
+ import type { ClassValue } from "svelte/elements";
2
3
  export declare const activity: import("tailwind-variants").TVReturnType<{} | {} | {}, undefined, "relative border-s border-gray-200 dark:border-gray-700", {} | {}, undefined, import("tailwind-variants").TVReturnType<unknown, undefined, "relative border-s border-gray-200 dark:border-gray-700", unknown, unknown, undefined>>;
3
- export type ActivityTheme = string;
4
+ export type ActivityTheme = ClassValue;
4
5
  export declare const activityItem: import("tailwind-variants").TVReturnType<{
5
6
  [key: string]: {
6
7
  [key: string]: import("tailwind-variants").ClassValue | {
@@ -69,7 +70,7 @@ export declare const activityItem: import("tailwind-variants").TVReturnType<{
69
70
  text: string;
70
71
  }, undefined, unknown, unknown, undefined>>;
71
72
  export type ActivityItemSlots = keyof typeof activityItem.slots;
72
- export type ActivityItemTheme = Partial<Record<ActivityItemSlots, string>>;
73
+ export type ActivityItemTheme = Partial<Record<ActivityItemSlots, ClassValue>>;
73
74
  export declare const group: import("tailwind-variants").TVReturnType<{
74
75
  [key: string]: {
75
76
  [key: string]: import("tailwind-variants").ClassValue | {
@@ -108,7 +109,7 @@ export declare const group: import("tailwind-variants").TVReturnType<{
108
109
  ol: string;
109
110
  }, undefined, unknown, unknown, undefined>>;
110
111
  export type GroupSlots = keyof typeof group.slots;
111
- export type GroupTheme = Partial<Record<GroupSlots, string>>;
112
+ export type GroupTheme = Partial<Record<GroupSlots, ClassValue>>;
112
113
  export declare const groupItem: import("tailwind-variants").TVReturnType<{
113
114
  [key: string]: {
114
115
  [key: string]: import("tailwind-variants").ClassValue | {
@@ -159,7 +160,7 @@ export declare const groupItem: import("tailwind-variants").TVReturnType<{
159
160
  span: string;
160
161
  }, undefined, unknown, unknown, undefined>>;
161
162
  export type GroupItemSlots = keyof typeof groupItem.slots;
162
- export type GroupItemTheme = Partial<Record<GroupItemSlots, string>>;
163
+ export type GroupItemTheme = Partial<Record<GroupItemSlots, ClassValue>>;
163
164
  export type TimelineVariants = VariantProps<typeof timeline>;
164
165
  export declare const timeline: import("tailwind-variants").TVReturnType<{
165
166
  order: {
@@ -186,7 +187,7 @@ export declare const timeline: import("tailwind-variants").TVReturnType<{
186
187
  default: string;
187
188
  };
188
189
  }, undefined, undefined, unknown, unknown, undefined>>;
189
- export type TimelineTheme = string;
190
+ export type TimelineTheme = ClassValue;
190
191
  export declare const timelineItem: import("tailwind-variants").TVReturnType<{
191
192
  order: {
192
193
  default: {
@@ -306,4 +307,4 @@ export declare const timelineItem: import("tailwind-variants").TVReturnType<{
306
307
  svg: string;
307
308
  }, undefined, unknown, unknown, undefined>>;
308
309
  export type TimelineItemSlots = keyof typeof timelineItem.slots;
309
- export type TimelineItemTheme = Partial<Record<TimelineItemSlots, string>>;
310
+ export type TimelineItemTheme = Partial<Record<TimelineItemSlots, ClassValue>>;
@@ -4,7 +4,7 @@
4
4
  import { toast, type ToastTheme } from ".";
5
5
  import type { ToastProps } from "../types";
6
6
  import { fly } from "svelte/transition";
7
- import { cn } from "..";
7
+ import clsx from "clsx";
8
8
  import { getTheme } from "../theme/themeUtils";
9
9
 
10
10
  let { children, icon, toastStatus = $bindable(true), dismissable = true, color = "primary", position, iconClass, contentClass, align = true, params, transition = fly, class: className, onclose, ...restProps }: ToastProps = $props();
@@ -20,19 +20,19 @@
20
20
  </script>
21
21
 
22
22
  {#if toastStatus}
23
- <div role="alert" transition:transition={params as ParamsType} {...restProps} class={cn(base({ class: className }), (theme as ToastTheme)?.base)}>
23
+ <div role="alert" transition:transition={params as ParamsType} {...restProps} class={base({ class: clsx((theme as ToastTheme)?.base, className) })}>
24
24
  {#if icon}
25
- <div class={cn(iconVariants({ class: iconClass }), (theme as ToastTheme)?.icon)}>
25
+ <div class={iconVariants({ class: clsx((theme as ToastTheme)?.icon, iconClass) })}>
26
26
  {@render icon()}
27
27
  </div>
28
28
  {/if}
29
29
 
30
- <div class={cn(content({ class: contentClass }), (theme as ToastTheme)?.content)}>
30
+ <div class={content({ class: clsx((theme as ToastTheme)?.content, contentClass) })}>
31
31
  {@render children()}
32
32
  </div>
33
33
 
34
34
  {#if dismissable}
35
- <CloseButton class={cn(close(), (theme as ToastTheme)?.close)} ariaLabel="Remove toast" {color} onclick={handleClose} />
35
+ <CloseButton class={close({ class: clsx((theme as ToastTheme)?.close) })} ariaLabel="Remove toast" {color} onclick={handleClose} />
36
36
  {/if}
37
37
  </div>
38
38
  {/if}
@@ -1,4 +1,5 @@
1
1
  import { type VariantProps } from "tailwind-variants";
2
+ import type { ClassValue } from "svelte/elements";
2
3
  export type ToastVaraints = VariantProps<typeof toast>;
3
4
  export declare const toast: import("tailwind-variants").TVReturnType<{
4
5
  position: {
@@ -320,4 +321,4 @@ export declare const toast: import("tailwind-variants").TVReturnType<{
320
321
  close: string;
321
322
  }, undefined, unknown, unknown, undefined>>;
322
323
  export type ToastSlots = keyof typeof toast.slots;
323
- export type ToastTheme = Partial<Record<ToastSlots, string>>;
324
+ export type ToastTheme = Partial<Record<ToastSlots, ClassValue>>;
@@ -4,7 +4,6 @@
4
4
  import { toolbar, type ToolbarTheme } from "./";
5
5
  import type { ToolbarProps } from "../types";
6
6
  import clsx from "clsx";
7
- import { cn } from "..";
8
7
  import { getTheme } from "../theme/themeUtils";
9
8
 
10
9
  let { children, end, color, embedded, class: className, ...restProps }: ToolbarProps = $props();
@@ -29,8 +28,8 @@
29
28
  // let divClass: string = twMerge('flex justify-between items-center', !embedded && 'py-2 px-3', className);
30
29
  </script>
31
30
 
32
- <div {...restProps} class={cn(base({ class: clsx(className) }), (theme as ToolbarTheme)?.base)}>
33
- <div class={cn(content(), (theme as ToolbarTheme)?.content)}>
31
+ <div {...restProps} class={base({ class: clsx((theme as ToolbarTheme)?.base, className) })}>
32
+ <div class={content({ class: clsx((theme as ToolbarTheme)?.content) })}>
34
33
  {@render children?.()}
35
34
  </div>
36
35
  {#if end}
@@ -3,7 +3,6 @@
3
3
  import { toolbarButton } from ".";
4
4
  import type { ToolbarButtonProps } from "../types";
5
5
  import clsx from "clsx";
6
- import { cn } from "..";
7
6
  import { getTheme } from "../theme/themeUtils";
8
7
 
9
8
  const background = getContext("background");
@@ -11,23 +10,23 @@
11
10
 
12
11
  const theme = getTheme("toolbarButton");
13
12
 
14
- const buttonClass = $derived(
13
+ const buttonCls = $derived(
15
14
  toolbarButton({
16
15
  color,
17
16
  size,
18
17
  background: !!background,
19
- class: clsx(className)
18
+ class: clsx(theme, className)
20
19
  })
21
20
  );
22
21
  </script>
23
22
 
24
23
  {#if restProps.href === undefined}
25
- <button type="button" {...restProps} class={cn(buttonClass, theme)} aria-label={ariaLabel ?? name}>
24
+ <button type="button" {...restProps} class={buttonCls} aria-label={ariaLabel ?? name}>
26
25
  {#if name}<span class="sr-only">{name}</span>{/if}
27
26
  {@render children?.()}
28
27
  </button>
29
28
  {:else}
30
- <a {...restProps} class={buttonClass} aria-label={ariaLabel ?? name}>
29
+ <a {...restProps} class={buttonCls} aria-label={ariaLabel ?? name}>
31
30
  {#if name}<span class="sr-only">{name}</span>{/if}
32
31
  {@render children?.()}
33
32
  </a>
@@ -4,20 +4,19 @@
4
4
  import { toolbarGroup } from ".";
5
5
  import type { ToolbarGroupProps } from "../types";
6
6
  import clsx from "clsx";
7
- import { cn } from "..";
8
7
  import { getTheme } from "../theme/themeUtils";
9
8
 
10
9
  let { children, spacing, padding, position = "middle", class: className, ...restProps }: ToolbarGroupProps = $props();
11
10
 
12
11
  const theme = getTheme("toolbarGroup");
13
12
 
14
- const groupClass = $derived(toolbarGroup({ spacing, padding, position, class: clsx(className) }));
13
+ const groupCls = $derived(toolbarGroup({ spacing, padding, position, class: clsx(theme, className) }));
15
14
 
16
15
  const options: Writable<boolean> = getContext("toolbar");
17
16
  if (options) $options = true;
18
17
  </script>
19
18
 
20
- <div {...restProps} class={cn(groupClass, theme)}>
19
+ <div {...restProps} class={groupCls}>
21
20
  {@render children?.()}
22
21
  </div>
23
22
 
@@ -1,4 +1,5 @@
1
1
  import { type VariantProps } from "tailwind-variants";
2
+ import type { ClassValue } from "svelte/elements";
2
3
  export type ToolbarVariants = VariantProps<typeof toolbar>;
3
4
  export declare const toolbar: import("tailwind-variants").TVReturnType<{
4
5
  embedded: {
@@ -197,7 +198,7 @@ export declare const toolbar: import("tailwind-variants").TVReturnType<{
197
198
  content: string;
198
199
  }, undefined, unknown, unknown, undefined>>;
199
200
  export type ToolbarSlots = keyof typeof toolbar.slots;
200
- export type ToolbarTheme = Partial<Record<ToolbarSlots, string>>;
201
+ export type ToolbarTheme = Partial<Record<ToolbarSlots, ClassValue>>;
201
202
  export type ToolbarGroupVariants = VariantProps<typeof toolbarGroup>;
202
203
  export declare const toolbarGroup: import("tailwind-variants").TVReturnType<{
203
204
  spacing: {
@@ -245,7 +246,7 @@ export declare const toolbarGroup: import("tailwind-variants").TVReturnType<{
245
246
  last: string;
246
247
  };
247
248
  }, undefined, "flex items-center", unknown, unknown, undefined>>;
248
- export type ToolbarGroupTheme = string;
249
+ export type ToolbarGroupTheme = ClassValue;
249
250
  export type ToolbarButtonVariants = VariantProps<typeof toolbarButton>;
250
251
  export declare const toolbarButton: import("tailwind-variants").TVReturnType<{
251
252
  color: {
@@ -320,4 +321,4 @@ export declare const toolbarButton: import("tailwind-variants").TVReturnType<{
320
321
  false: string;
321
322
  };
322
323
  }, undefined, "focus:outline-hidden whitespace-normal", unknown, unknown, undefined>>;
323
- export type ToolbarButtonTheme = string;
324
+ export type ToolbarButtonTheme = ClassValue;
@@ -3,7 +3,6 @@
3
3
  import Popper from "../utils/Popper.svelte";
4
4
  import { tooltip, type TooltipTheme } from "./theme";
5
5
  import type { TooltipProps, TriggeredToggleEvent } from "..";
6
- import { cn } from "..";
7
6
  import { getTheme } from "../theme/themeUtils";
8
7
 
9
8
  let { type = "dark", color = undefined, trigger = "hover", arrow = true, children, placement = "top", onbeforetoggle: _onbeforetoggle, class: className, isOpen = $bindable(false), ...restProps }: TooltipProps = $props();
@@ -22,7 +21,7 @@
22
21
  }
23
22
  </script>
24
23
 
25
- <Popper {...restProps} bind:isOpen {placement} {trigger} {arrow} class={cn(base({ class: clsx(className) }), (theme as TooltipTheme)?.base)} {onbeforetoggle}>
24
+ <Popper {...restProps} bind:isOpen {placement} {trigger} {arrow} class={base({ class: clsx((theme as TooltipTheme)?.base, className) })} {onbeforetoggle}>
26
25
  <div class="pointer-events-none">{@render children()}</div>
27
26
  </Popper>
28
27
 
@@ -1,4 +1,5 @@
1
1
  import { type VariantProps } from "tailwind-variants";
2
+ import type { ClassValue } from "svelte/elements";
2
3
  export type TooltipVariants = VariantProps<typeof tooltip>;
3
4
  export declare const tooltip: import("tailwind-variants").TVReturnType<{
4
5
  type: {
@@ -233,4 +234,4 @@ export declare const tooltip: import("tailwind-variants").TVReturnType<{
233
234
  arrowBase: string;
234
235
  }, undefined, unknown, unknown, undefined>>;
235
236
  export type TooltipSlots = keyof typeof tooltip.slots;
236
- export type TooltipTheme = Partial<Record<TooltipSlots, string>>;
237
+ export type TooltipTheme = Partial<Record<TooltipSlots, ClassValue>>;
package/dist/types.d.ts CHANGED
@@ -1,8 +1,7 @@
1
1
  import type { fade, fly, scale, slide } from "svelte/transition";
2
2
  import type { Coords, Middleware, Placement, Strategy } from "@floating-ui/dom";
3
- import type { ClassValue } from "clsx";
4
3
  import type { Component, Snippet } from "svelte";
5
- import type { HTMLAnchorAttributes, HTMLAttributes, HTMLBlockquoteAttributes, HTMLButtonAttributes, HTMLDialogAttributes, HTMLImgAttributes, HTMLInputAttributes, HTMLLabelAttributes, HTMLLiAttributes, HTMLOlAttributes, HTMLSelectAttributes, HTMLSourceAttributes, HTMLTableAttributes, HTMLTdAttributes, HTMLTextareaAttributes, HTMLThAttributes, HTMLTrackAttributes, HTMLVideoAttributes, SVGAttributes, FullAutoFill } from "svelte/elements";
4
+ import type { ClassValue, HTMLAnchorAttributes, HTMLAttributes, HTMLBlockquoteAttributes, HTMLButtonAttributes, HTMLDialogAttributes, HTMLImgAttributes, HTMLInputAttributes, HTMLLabelAttributes, HTMLLiAttributes, HTMLOlAttributes, HTMLSelectAttributes, HTMLSourceAttributes, HTMLTableAttributes, HTMLTdAttributes, HTMLTextareaAttributes, HTMLThAttributes, HTMLTrackAttributes, HTMLVideoAttributes, SVGAttributes, FullAutoFill } from "svelte/elements";
6
5
  import { type Writable } from "svelte/store";
7
6
  import type { BlurParams, EasingFunction, FadeParams, FlyParams, ScaleParams, SlideParams, TransitionConfig } from "svelte/transition";
8
7
  import { type VariantProps } from "tailwind-variants";
@@ -1505,7 +1504,7 @@ export interface TabCtxType {
1505
1504
  panelId: string;
1506
1505
  }
1507
1506
  export interface ThemeConfig {
1508
- [key: string]: string | ThemeConfig;
1507
+ [key: string]: ClassValue | ThemeConfig;
1509
1508
  }
1510
1509
  export type TimelineVariants = VariantProps<typeof timeline>;
1511
1510
  export interface ActivityType {
@@ -2,14 +2,13 @@
2
2
  import clsx from "clsx";
3
3
  import { anchor } from "./index";
4
4
  import type { AnchorProps } from "../../types";
5
- import { cn } from "../..";
6
5
  import { getTheme } from "../../theme/themeUtils";
7
6
 
8
7
  let { children, color = "primary", asButton = false, onclick, href = "#", class: className, ...restProps }: AnchorProps = $props();
9
8
 
10
9
  const theme = getTheme("a");
11
10
 
12
- let linkClass = $derived(anchor({ color, class: clsx(className) }));
11
+ let linkCls = $derived(anchor({ color, class: clsx(theme, className) }));
13
12
 
14
13
  // Handle click events when in button mode
15
14
  function handleClick(event: MouseEvent) {
@@ -30,12 +29,12 @@
30
29
 
31
30
  {#if asButton}
32
31
  <!-- Render as a button that looks like a link -->
33
- <button type="button" class={cn(linkClass, theme)} onclick={handleClick} {...buttonProps}>
32
+ <button type="button" class={linkCls} onclick={handleClick} {...buttonProps}>
34
33
  {@render children()}
35
34
  </button>
36
35
  {:else}
37
36
  <!-- Standard anchor behavior -->
38
- <a {href} class={cn(linkClass, theme)} onclick={handleClick} {...restProps}>
37
+ <a {href} class={linkCls} onclick={handleClick} {...restProps}>
39
38
  {@render children()}
40
39
  </a>
41
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 AnchorVariants = VariantProps<typeof anchor>;
3
4
  export declare const anchor: import("tailwind-variants").TVReturnType<{
4
5
  color: {
@@ -70,4 +71,4 @@ export declare const anchor: import("tailwind-variants").TVReturnType<{
70
71
  rose: string;
71
72
  };
72
73
  }, undefined, "inline-flex items-center hover:underline", unknown, unknown, undefined>>;
73
- export type AnchorTheme = string;
74
+ export type AnchorTheme = ClassValue;
@@ -2,26 +2,25 @@
2
2
  import clsx from "clsx";
3
3
  import { blockquote } from "./index";
4
4
  import type { BlockquoteProps } from "../../types";
5
- import { cn } from "../..";
6
5
  import { getTheme } from "../../theme/themeUtils";
7
6
 
8
7
  let { children, class: className, border, italic = true, bg, alignment = "left", size = "lg", ...restProps }: BlockquoteProps = $props();
9
8
 
10
9
  const theme = getTheme("blockquote");
11
10
 
12
- let blockquoteClass = $derived(
11
+ let blockquoteCls = $derived(
13
12
  blockquote({
14
13
  border,
15
14
  italic,
16
15
  bg,
17
16
  alignment,
18
17
  size,
19
- class: clsx(className)
18
+ class: clsx(theme, className)
20
19
  })
21
20
  );
22
21
  </script>
23
22
 
24
- <blockquote {...restProps} class={cn(blockquoteClass, theme)}>
23
+ <blockquote {...restProps} class={blockquoteCls}>
25
24
  {@render children()}
26
25
  </blockquote>
27
26