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,7 @@
2
2
  import clsx from "clsx";
3
3
  import { setContext } from "svelte";
4
4
  import { paginationNav, type PaginationNavTheme } from "./theme";
5
- import { type PaginationNavProps, PaginationButton, cn } from "..";
5
+ import { type PaginationNavProps, PaginationButton } from "..";
6
6
  import { getTheme } from "../theme/themeUtils";
7
7
 
8
8
  function paginationRange(start: number, end: number): number[] {
@@ -58,17 +58,17 @@
58
58
 
59
59
  <nav aria-label={ariaLabel} {...restProps}>
60
60
  {#if layout === "table"}
61
- <div class={cn(tableDiv(), clsx(tableDivClass), (theme as PaginationNavTheme)?.tableDiv)}>
62
- Showing <span class={cn(tableSpan(), clsx(spanClass), (theme as PaginationNavTheme)?.tableSpan)}>{currentPage}</span>
61
+ <div class={tableDiv({ class: clsx((theme as PaginationNavTheme)?.tableDiv, tableDivClass) })}>
62
+ Showing <span class={tableSpan({ class: clsx((theme as PaginationNavTheme)?.tableSpan, spanClass) })}>{currentPage}</span>
63
63
  of
64
- <span class={cn(tableSpan(), clsx(spanClass), (theme as PaginationNavTheme)?.tableSpan)}>{totalPages}</span>
64
+ <span class={tableSpan({ class: clsx((theme as PaginationNavTheme)?.tableSpan, spanClass) })}>{totalPages}</span>
65
65
  Entries
66
66
  </div>
67
67
  {/if}
68
68
 
69
- <ul class={cn(base(), clsx(className), (theme as PaginationNavTheme)?.base)}>
69
+ <ul class={base({ class: clsx((theme as PaginationNavTheme)?.base, className) })}>
70
70
  <li {...restProps}>
71
- <PaginationButton onclick={goToPreviousPage} disabled={currentPage === 1} class={cn(prevItem(), clsx(prevClass), (theme as PaginationNavTheme)?.prevItem)}>
71
+ <PaginationButton onclick={goToPreviousPage} disabled={currentPage === 1} class={prevItem({ class: clsx((theme as PaginationNavTheme)?.prevItem, prevClass) })}>
72
72
  {#if prevContent}
73
73
  {@render prevContent()}
74
74
  {:else}
@@ -86,7 +86,7 @@
86
86
  {/each}
87
87
  {/if}
88
88
  <li {...restProps}>
89
- <PaginationButton onclick={goToNextPage} disabled={currentPage === totalPages} class={cn(nextItem(), clsx(nextClass), (theme as PaginationNavTheme)?.nextItem)}>
89
+ <PaginationButton onclick={goToNextPage} disabled={currentPage === totalPages} class={nextItem({ class: clsx((theme as PaginationNavTheme)?.nextItem, nextClass) })}>
90
90
  {#if nextContent}
91
91
  {@render nextContent()}
92
92
  {:else}
@@ -1,4 +1,5 @@
1
1
  import { type VariantProps } from "tailwind-variants";
2
+ import type { ClassValue } from "svelte/elements";
2
3
  export type PaginationVariants = VariantProps<typeof pagination>;
3
4
  export declare const paginationNav: import("tailwind-variants").TVReturnType<{
4
5
  size: {
@@ -77,7 +78,7 @@ export declare const paginationNav: import("tailwind-variants").TVReturnType<{
77
78
  nextItem: string;
78
79
  }, undefined, unknown, unknown, undefined>>;
79
80
  export type PaginationNavSlots = keyof typeof paginationNav.slots;
80
- export type PaginationNavTheme = Partial<Record<PaginationNavSlots, string>>;
81
+ export type PaginationNavTheme = Partial<Record<PaginationNavSlots, ClassValue>>;
81
82
  export type PaginationItemVariants = VariantProps<typeof paginationItem>;
82
83
  export declare const paginationButton: import("tailwind-variants").TVReturnType<{
83
84
  size: {
@@ -143,7 +144,7 @@ export declare const paginationButton: import("tailwind-variants").TVReturnType<
143
144
  false: string;
144
145
  };
145
146
  }, undefined, "flex items-center font-medium", unknown, unknown, undefined>>;
146
- export type PaginationButtonTheme = string;
147
+ export type PaginationButtonTheme = ClassValue;
147
148
  export declare const paginationItem: import("tailwind-variants").TVReturnType<{
148
149
  size: {
149
150
  default: string;
@@ -196,7 +197,7 @@ export declare const paginationItem: import("tailwind-variants").TVReturnType<{
196
197
  false: string;
197
198
  };
198
199
  }, undefined, "flex items-center font-medium", unknown, unknown, undefined>>;
199
- export type PaginationItemTheme = string;
200
+ export type PaginationItemTheme = ClassValue;
200
201
  export declare const pagination: import("tailwind-variants").TVReturnType<{
201
202
  table: {
202
203
  true: string;
@@ -225,4 +226,4 @@ export declare const pagination: import("tailwind-variants").TVReturnType<{
225
226
  large: string;
226
227
  };
227
228
  }, undefined, "inline-flex -space-x-px rtl:space-x-reverse items-center", unknown, unknown, undefined>>;
228
- export type PaginationTheme = string;
229
+ export type PaginationTheme = ClassValue;
@@ -1,5 +1,4 @@
1
1
  <script lang="ts">
2
- import { cn } from "..";
3
2
  import clsx from "clsx";
4
3
  import Popper from "../utils/Popper.svelte";
5
4
  import { popover, type PopoverTheme } from "./theme";
@@ -13,15 +12,15 @@
13
12
  let { base, title, h3, content } = $derived(popover({ color }));
14
13
  </script>
15
14
 
16
- <Popper {...restProps} bind:isOpen {placement} {trigger} {arrow} class={cn(base(), clsx(className), (theme as PopoverTheme)?.base)}>
15
+ <Popper {...restProps} bind:isOpen {placement} {trigger} {arrow} class={base({ class: clsx((theme as PopoverTheme)?.base, className) })}>
17
16
  {#if typeof titleSlot === "string"}
18
- <div class={cn(title(), (theme as PopoverTheme)?.title)}>
19
- <h3 class={cn(h3(), (theme as PopoverTheme)?.h3)}>{titleSlot}</h3>
17
+ <div class={title({ class: clsx((theme as PopoverTheme)?.title) })}>
18
+ <h3 class={h3({ class: clsx((theme as PopoverTheme)?.h3) })}>{titleSlot}</h3>
20
19
  </div>
21
20
  {:else if titleSlot}
22
21
  {@render titleSlot()}
23
22
  {/if}
24
- <div class={cn(content(), clsx(defaultClass), (theme as PopoverTheme)?.content)}>
23
+ <div class={content({ class: clsx((theme as PopoverTheme)?.content, defaultClass) })}>
25
24
  {@render children()}
26
25
  </div>
27
26
  </Popper>
@@ -1,4 +1,5 @@
1
1
  import { type VariantProps } from "tailwind-variants";
2
+ import type { ClassValue } from "svelte/elements";
2
3
  export type PopoverVariants = VariantProps<typeof popover>;
3
4
  export declare const popover: import("tailwind-variants").TVReturnType<{
4
5
  color: {
@@ -278,4 +279,4 @@ export declare const popover: import("tailwind-variants").TVReturnType<{
278
279
  h3: string;
279
280
  }, undefined, unknown, unknown, undefined>>;
280
281
  export type PopoverSlots = keyof typeof popover.slots;
281
- export type PopoverTheme = Partial<Record<PopoverSlots, string>>;
282
+ export type PopoverTheme = Partial<Record<PopoverSlots, ClassValue>>;
@@ -1,5 +1,4 @@
1
1
  <script lang="ts">
2
- import { cn } from "..";
3
2
  import type { ProgressbarProps } from "../types";
4
3
  import clsx from "clsx";
5
4
  import { cubicOut } from "svelte/easing";
@@ -28,18 +27,18 @@
28
27
  </script>
29
28
 
30
29
  {#if labelOutside}
31
- <div {...restProps} class={cn(outsideDiv({ class: clsx(classes?.outsideDiv) }), (theme as ProgressbarTheme)?.outsideDiv)}>
32
- <span class={cn(oustsideSpan({ class: clsx(classes?.oustsideSpan) }), (theme as ProgressbarTheme)?.oustsideSpan)}>{labelOutside}</span>
33
- <span class={cn(outsideProgress({ class: clsx(classes?.outsideProgress) }), (theme as ProgressbarTheme)?.outsideProgress)}>{progress}%</span>
30
+ <div {...restProps} class={outsideDiv({ class: clsx((theme as ProgressbarTheme)?.outsideDiv, classes?.outsideDiv) })}>
31
+ <span class={oustsideSpan({ class: clsx((theme as ProgressbarTheme)?.oustsideSpan, classes?.oustsideSpan) })}>{labelOutside}</span>
32
+ <span class={outsideProgress({ class: clsx((theme as ProgressbarTheme)?.outsideProgress, classes?.outsideProgress) })}>{progress}%</span>
34
33
  </div>
35
34
  {/if}
36
- <div {...restProps} class={cn(base({ class: clsx(size, classes?.base, className) }), (theme as ProgressbarTheme)?.base)}>
35
+ <div {...restProps} class={base({ class: clsx(size, classes?.base, (theme as ProgressbarTheme)?.base, className) })}>
37
36
  {#if labelInside}
38
- <div class={cn(labelInsideDiv({ class: clsx(classes?.labelInsideDiv, size) }), (theme as ProgressbarTheme)?.labelInsideDiv)} style="width: {_progress.current}%">
37
+ <div class={labelInsideDiv({ class: clsx(size, (theme as ProgressbarTheme)?.labelInsideDiv, classes?.labelInsideDiv) })} style="width: {_progress.current}%">
39
38
  {_progress.current.toFixed(precision)}%
40
39
  </div>
41
40
  {:else}
42
- <div class={cn(insideDiv({ class: clsx(classes?.labelInsideDiv, size) }), (theme as ProgressbarTheme)?.insideDiv)} style="width: {_progress.current}%"></div>
41
+ <div class={insideDiv({ class: clsx(size, (theme as ProgressbarTheme)?.insideDiv, classes?.labelInsideDiv) })} style="width: {_progress.current}%"></div>
43
42
  {/if}
44
43
  </div>
45
44
 
@@ -1,5 +1,4 @@
1
1
  <script lang="ts">
2
- import { cn } from "..";
3
2
  import { progressradial, type ProgressradialTheme } from ".";
4
3
  import type { ProgressradialProps } from "../types";
5
4
  import clsx from "clsx";
@@ -39,23 +38,23 @@
39
38
 
40
39
  <div class="flex flex-col items-center">
41
40
  {#if labelOutside}
42
- <div class={cn(outsideDiv({ class: clsx(classes?.outsideDiv) }), (theme as ProgressradialTheme)?.outsideDiv)}>
43
- <span class={cn(outsideSpan({ class: clsx(classes?.outsideSpan) }), (theme as ProgressradialTheme)?.outsideSpan)}>{labelOutside}</span>
44
- <span class={cn(outsideProgress({ class: clsx(classes?.outsideProgress) }), (theme as ProgressradialTheme)?.outsideProgress)}>{formattedProgress}%</span>
41
+ <div class={outsideDiv({ class: clsx((theme as ProgressradialTheme)?.outsideDiv, classes?.outsideDiv) })}>
42
+ <span class={outsideSpan({ class: clsx((theme as ProgressradialTheme)?.outsideSpan, classes?.outsideSpan) })}>{labelOutside}</span>
43
+ <span class={outsideProgress({ class: clsx((theme as ProgressradialTheme)?.outsideProgress, classes?.outsideProgress) })}>{formattedProgress}%</span>
45
44
  </div>
46
45
  {/if}
47
46
 
48
- <div {...restProps} class={cn(base({ class: clsx(size, classes?.base, className) }), (theme as ProgressradialTheme)?.base)}>
47
+ <div {...restProps} class={base({ class: clsx(size, (theme as ProgressradialTheme)?.base, classes?.base, className) })}>
49
48
  <svg viewBox="0 0 100 100" class="h-full w-full" style="transform: rotate({rotationAngle}deg)">
50
49
  <!-- Background circle -->
51
- <circle cx="50" cy="50" r={radius} class={cn(circleBackground({ class: clsx(classes?.circleBackground) }), (theme as ProgressradialTheme)?.circleBackground)} fill="none" stroke-width={thickness} />
50
+ <circle cx="50" cy="50" r={radius} class={circleBackground({ class: clsx((theme as ProgressradialTheme)?.circleBackground, classes?.circleBackground) })} fill="none" stroke-width={thickness} />
52
51
 
53
52
  <!-- Foreground circle (progress indicator) -->
54
- <circle cx="50" cy="50" r={radius} class={cn(circleForeground({ class: clsx(classes?.circleForeground) }), (theme as ProgressradialTheme)?.circleForeground)} fill="none" stroke-width={thickness} stroke-dasharray={circumference} stroke-dashoffset={strokeDashoffset} stroke-linecap="round" />
53
+ <circle cx="50" cy="50" r={radius} class={circleForeground({ class: clsx((theme as ProgressradialTheme)?.circleForeground, classes?.circleForeground) })} fill="none" stroke-width={thickness} stroke-dasharray={circumference} stroke-dashoffset={strokeDashoffset} stroke-linecap="round" />
55
54
  </svg>
56
55
 
57
56
  {#if labelInside}
58
- <div class={cn(labelInsideDiv({ class: clsx(classes?.labelInsideDiv) }), (theme as ProgressradialTheme)?.labelInsideDiv)}>
57
+ <div class={labelInsideDiv({ class: clsx((theme as ProgressradialTheme)?.labelInsideDiv, classes?.labelInsideDiv) })}>
59
58
  {formattedProgress}%
60
59
  </div>
61
60
  {/if}
@@ -290,7 +290,7 @@ export declare const progressbar: import("tailwind-variants").TVReturnType<{
290
290
  outsideProgress: string;
291
291
  }, undefined, unknown, unknown, undefined>>;
292
292
  export type ProgressbarSlots = keyof typeof progressbar.slots;
293
- export type ProgressbarTheme = Partial<Record<ProgressbarSlots, string>>;
293
+ export type ProgressbarTheme = Partial<Record<ProgressbarSlots, ClassValue>>;
294
294
  export type ProgressradialClasses = Partial<{
295
295
  [K in keyof (typeof progressradial)["slots"]]: ClassValue;
296
296
  }>;
@@ -581,4 +581,4 @@ export declare const progressradial: import("tailwind-variants").TVReturnType<{
581
581
  outsideProgress: string;
582
582
  }, undefined, unknown, unknown, undefined>>;
583
583
  export type ProgressradialSlots = keyof typeof progressradial.slots;
584
- export type ProgressradialTheme = Partial<Record<ProgressradialSlots, string>>;
584
+ export type ProgressradialTheme = Partial<Record<ProgressradialSlots, ClassValue>>;
@@ -2,7 +2,6 @@
2
2
  import clsx from "clsx";
3
3
  import { advancedRating, type AdvancedRatingTheme } from ".";
4
4
  import type { AdvancedRatingProps } from "../types";
5
- import { cn } from "..";
6
5
  import { getTheme } from "../theme/themeUtils";
7
6
 
8
7
  let { rating, globalText, ratings, divClass, spanClass, div2Class, div3Class, span2Class, unit }: AdvancedRatingProps = $props();
@@ -19,12 +18,12 @@
19
18
  {@render globalText()}
20
19
  {/if}
21
20
  {#each ratings as { label, rating }}
22
- <div class={cn(base(), clsx(divClass), (theme as AdvancedRatingTheme)?.base)}>
23
- <span class={cn(span(), clsx(spanClass), (theme as AdvancedRatingTheme)?.span)}>{label}</span>
24
- <div class={cn(div2(), clsx(div2Class), (theme as AdvancedRatingTheme)?.div2)}>
25
- <div class={cn(div3(), clsx(div3Class), (theme as AdvancedRatingTheme)?.div3)} style="width: {rating}%"></div>
21
+ <div class={base({ class: clsx((theme as AdvancedRatingTheme)?.base, divClass) })}>
22
+ <span class={span({ class: clsx((theme as AdvancedRatingTheme)?.span, spanClass) })}>{label}</span>
23
+ <div class={div2({ class: clsx((theme as AdvancedRatingTheme)?.div2, div2Class) })}>
24
+ <div class={div3({ class: clsx((theme as AdvancedRatingTheme)?.div3, div3Class) })} style="width: {rating}%"></div>
26
25
  </div>
27
- <span class={cn(span2(), clsx(span2Class), (theme as AdvancedRatingTheme)?.span2)}>{rating}{unit}</span>
26
+ <span class={span2({ class: clsx((theme as AdvancedRatingTheme)?.span2, span2Class) })}>{rating}{unit}</span>
28
27
  </div>
29
28
  {/each}
30
29
 
@@ -3,7 +3,6 @@
3
3
  import Star from "./Star.svelte";
4
4
  import { rating as ratingVariants, type RatingTheme } from ".";
5
5
  import type { RatingProps } from "../types";
6
- import { cn } from "..";
7
6
  import { getTheme } from "../theme/themeUtils";
8
7
 
9
8
  let { children, text, class: className, size = 24, total = 5, rating = 4, icon: Icon = Star, count = false, pClass, ...restProps }: RatingProps = $props();
@@ -18,10 +17,10 @@
18
17
  let grayStars: number = total - (fullStars + Math.ceil(rateDiffence));
19
18
  </script>
20
19
 
21
- <div {...restProps} class={cn(base({ class: clsx(className) }), (theme as RatingTheme)?.base)}>
20
+ <div {...restProps} class={base({ class: clsx((theme as RatingTheme)?.base, className) })}>
22
21
  {#if count && children}
23
22
  <Icon fillPercent={100} {size} iconIndex={0} groupId={ratingGroupId} />
24
- <p class={cn(p({ class: clsx(pClass) }), (theme as RatingTheme)?.p)}>{rating}</p>
23
+ <p class={p({ class: clsx((theme as RatingTheme)?.p, pClass) })}>{rating}</p>
25
24
  {@render children()}
26
25
  {:else}
27
26
  <!-- eslint-disable @typescript-eslint/no-unused-vars-->
@@ -2,7 +2,6 @@
2
2
  import clsx from "clsx";
3
3
  import { review as reviewVariants, type ReviewTheme } from ".";
4
4
  import type { ReviewProps } from "../types";
5
- import { cn } from "..";
6
5
  import { getTheme } from "../theme/themeUtils";
7
6
 
8
7
  let { children, address, item1, item2, item3, review, articleClass, divClass, div2Class, div3Class, imgClass, ulClass, liClass }: ReviewProps = $props();
@@ -13,15 +12,15 @@
13
12
  </script>
14
13
 
15
14
  {#if review}
16
- <article class={cn(article(), clsx(articleClass), (theme as ReviewTheme)?.article)}>
15
+ <article class={article({ class: clsx((theme as ReviewTheme)?.article, articleClass) })}>
17
16
  <div>
18
- <div class={cn(div(), clsx(divClass), (theme as ReviewTheme)?.div)}>
19
- <img class={cn(img(), clsx(imgClass), (theme as ReviewTheme)?.img)} src={review.imgSrc} alt={review.imgAlt} />
20
- <div class={cn(div2(), clsx(div2Class), (theme as ReviewTheme)?.div2)}>
17
+ <div class={div({ class: clsx((theme as ReviewTheme)?.div, divClass) })}>
18
+ <img class={img({ class: clsx((theme as ReviewTheme)?.img, imgClass) })} src={review.imgSrc} alt={review.imgAlt} />
19
+ <div class={div2({ class: clsx((theme as ReviewTheme)?.div2, div2Class) })}>
21
20
  <p>{review.name}</p>
22
21
  {#if review.address}
23
22
  {#if address}
24
- <div class={cn(div3(), clsx(div3Class), (theme as ReviewTheme)?.div3)}>
23
+ <div class={div3({ class: clsx((theme as ReviewTheme)?.div3, div3Class) })}>
25
24
  {@render address()}
26
25
  </div>
27
26
  {/if}
@@ -29,9 +28,9 @@
29
28
  </div>
30
29
  </div>
31
30
  {#if review.item1 || review.item2 || review.item3}
32
- <ul class={cn(ul(), clsx(ulClass), (theme as ReviewTheme)?.ul)}>
31
+ <ul class={ul({ class: clsx((theme as ReviewTheme)?.ul, ulClass) })}>
33
32
  {#if review.item1}
34
- <li class={cn(li(), clsx(liClass), (theme as ReviewTheme)?.li)}>
33
+ <li class={li({ class: clsx((theme as ReviewTheme)?.li, liClass) })}>
35
34
  {#if item1}
36
35
  {@render item1()}
37
36
  {/if}
@@ -1,7 +1,7 @@
1
1
  <script lang="ts">
2
2
  import { scoreRating, type ScoreRatingTheme } from ".";
3
3
  import type { ScoreRatingProps } from "../types";
4
- import { cn } from "..";
4
+ import clsx from "clsx";
5
5
  import { getTheme } from "../theme/themeUtils";
6
6
 
7
7
  let { ratings, ratings2, headerLabel }: ScoreRatingProps = $props();
@@ -14,17 +14,17 @@
14
14
  <div class="mb-5 flex items-center">
15
15
  {#if headerLabel}
16
16
  {#if headerLabel.desc1}
17
- <p class={cn(desc1(), (theme as ScoreRatingTheme)?.desc1)}>{headerLabel.desc1}</p>
17
+ <p class={desc1({ class: clsx((theme as ScoreRatingTheme)?.desc1) })}>{headerLabel.desc1}</p>
18
18
  {/if}
19
19
  {#if headerLabel.desc2}
20
- <p class={cn(desc2(), (theme as ScoreRatingTheme)?.desc2)}>{headerLabel.desc2}</p>
20
+ <p class={desc2({ class: clsx((theme as ScoreRatingTheme)?.desc2) })}>{headerLabel.desc2}</p>
21
21
  {/if}
22
22
  {#if headerLabel.desc3}
23
- <span class={cn(desc3span(), (theme as ScoreRatingTheme)?.desc3span)}></span>
24
- <p class={cn(desc3p(), (theme as ScoreRatingTheme)?.desc3p)}>{headerLabel.desc3}</p>
23
+ <span class={desc3span({ class: clsx((theme as ScoreRatingTheme)?.desc3span) })}></span>
24
+ <p class={desc3p({ class: clsx((theme as ScoreRatingTheme)?.desc3p) })}>{headerLabel.desc3}</p>
25
25
  {/if}
26
26
  {#if headerLabel.link}
27
- <a href={headerLabel.link.url} class={cn(link(), (theme as ScoreRatingTheme)?.link)}>{headerLabel.link.label}</a>
27
+ <a href={headerLabel.link.url} class={link({ class: clsx((theme as ScoreRatingTheme)?.link) })}>{headerLabel.link.label}</a>
28
28
  {/if}
29
29
  {/if}
30
30
  </div>
@@ -38,7 +38,7 @@
38
38
  </dt>
39
39
  <dd class="mb-3 flex items-center">
40
40
  <div class="me-2 h-2.5 w-full rounded-sm bg-gray-200 dark:bg-gray-700">
41
- <div class={cn(bar(), (theme as ScoreRatingTheme)?.bar)} style="width: {rating * 10}%"></div>
41
+ <div class={bar({ class: clsx((theme as ScoreRatingTheme)?.bar) })} style="width: {rating * 10}%"></div>
42
42
  </div>
43
43
  <span class="text-sm font-medium text-gray-500 dark:text-gray-400">{rating}</span>
44
44
  </dd>
@@ -55,7 +55,7 @@
55
55
  </dt>
56
56
  <dd class="mb-3 flex items-center">
57
57
  <div class="me-2 h-2.5 w-full rounded-sm bg-gray-200 dark:bg-gray-700">
58
- <div class={cn(bar(), (theme as ScoreRatingTheme)?.bar)} style="width: {rating * 10}%"></div>
58
+ <div class={bar({ class: clsx((theme as ScoreRatingTheme)?.bar) })} style="width: {rating * 10}%"></div>
59
59
  </div>
60
60
  <span class="text-sm font-medium text-gray-500 dark:text-gray-400">{rating}</span>
61
61
  </dd>
@@ -1,3 +1,4 @@
1
+ import type { ClassValue } from "svelte/elements";
1
2
  export declare const advancedRating: import("tailwind-variants").TVReturnType<{
2
3
  [key: string]: {
3
4
  [key: string]: import("tailwind-variants").ClassValue | {
@@ -48,7 +49,7 @@ export declare const advancedRating: import("tailwind-variants").TVReturnType<{
48
49
  span2: string;
49
50
  }, undefined, unknown, unknown, undefined>>;
50
51
  export type AdvancedRatingSlots = keyof typeof advancedRating.slots;
51
- export type AdvancedRatingTheme = Partial<Record<AdvancedRatingSlots, string>>;
52
+ export type AdvancedRatingTheme = Partial<Record<AdvancedRatingSlots, ClassValue>>;
52
53
  export declare const rating: import("tailwind-variants").TVReturnType<{
53
54
  [key: string]: {
54
55
  [key: string]: import("tailwind-variants").ClassValue | {
@@ -81,7 +82,7 @@ export declare const rating: import("tailwind-variants").TVReturnType<{
81
82
  p: string;
82
83
  }, undefined, unknown, unknown, undefined>>;
83
84
  export type RatingSlots = keyof typeof rating.slots;
84
- export type RatingTheme = Partial<Record<RatingSlots, string>>;
85
+ export type RatingTheme = Partial<Record<RatingSlots, ClassValue>>;
85
86
  export declare const review: import("tailwind-variants").TVReturnType<{
86
87
  [key: string]: {
87
88
  [key: string]: import("tailwind-variants").ClassValue | {
@@ -144,7 +145,7 @@ export declare const review: import("tailwind-variants").TVReturnType<{
144
145
  li: string;
145
146
  }, undefined, unknown, unknown, undefined>>;
146
147
  export type ReviewSlots = keyof typeof review.slots;
147
- export type ReviewTheme = Partial<Record<ReviewSlots, string>>;
148
+ export type ReviewTheme = Partial<Record<ReviewSlots, ClassValue>>;
148
149
  export declare const scoreRating: import("tailwind-variants").TVReturnType<{
149
150
  [key: string]: {
150
151
  [key: string]: import("tailwind-variants").ClassValue | {
@@ -201,4 +202,4 @@ export declare const scoreRating: import("tailwind-variants").TVReturnType<{
201
202
  bar: string;
202
203
  }, undefined, unknown, unknown, undefined>>;
203
204
  export type ScoreRatingSlots = keyof typeof scoreRating.slots;
204
- export type ScoreRatingTheme = Partial<Record<ScoreRatingSlots, string>>;
205
+ export type ScoreRatingTheme = Partial<Record<ScoreRatingSlots, ClassValue>>;
@@ -5,32 +5,10 @@
5
5
  import { sineIn } from "svelte/easing";
6
6
  import { sidebar, type SidebarTheme } from ".";
7
7
  import { trapFocus, type SidebarProps, type SidebarCtxType } from "..";
8
- import { cn } from "..";
9
8
  import { getTheme } from "../theme/themeUtils";
10
9
  import clsx from "clsx";
11
10
 
12
- let {
13
- children,
14
- isOpen = false, // Controls the *overlay* state on small screens
15
- closeSidebar,
16
- isSingle = true,
17
- breakpoint = "md", // e.g., 'md'
18
- alwaysOpen = false, // When true, sidebar is always visible, no hamburger menu
19
- position = "fixed",
20
- activateClickOutside = true,
21
- backdrop = true,
22
- backdropClass,
23
- transition = fly,
24
- params,
25
- divClass,
26
- ariaLabel,
27
- nonActiveClass,
28
- activeClass,
29
- activeUrl = "",
30
- class: className,
31
- disableBreakpoints = false, // Key prop for Drawer integration
32
- ...restProps
33
- }: SidebarProps = $props();
11
+ let { children, isOpen = false, closeSidebar, isSingle = true, breakpoint = "md", alwaysOpen = false, position = "fixed", activateClickOutside = true, backdrop = true, backdropClass, transition = fly, params, divClass, ariaLabel, nonActiveClass, activeClass, activeUrl = "", class: className, disableBreakpoints = false, ...restProps }: SidebarProps = $props();
34
12
 
35
13
  const theme = getTheme("sidebar");
36
14
 
@@ -43,15 +21,8 @@
43
21
  };
44
22
 
45
23
  let innerWidth: number = $state(-1);
46
- // This derived state is now primarily for trapFocus and transition,
47
- // NOT for rendering the main sidebar element in standalone mode.
48
- // It determines if the screen size *would* make it "large" if alwaysOpen were applied.
49
- let isLargeScreen = $derived(innerWidth >= breakpointValues[breakpoint]);
50
-
51
- // Determine if the sidebar should be "open" based on explicit isOpen or large screen AND alwaysOpen
52
- // This state is what should drive the 'hidden' / 'block' classes for the sidebar itself,
53
- // which will be passed to tailwind-variants.
54
- let shouldBeOpen = $derived(isOpen || (alwaysOpen && isLargeScreen));
24
+ // isLargeScreen should only be true if not disabling breakpoints and it meets the criteria
25
+ let isLargeScreen = $derived(disableBreakpoints ? false : alwaysOpen || innerWidth >= breakpointValues[breakpoint]);
55
26
 
56
27
  const activeUrlStore = writable("");
57
28
  setContext("activeUrl", activeUrlStore);
@@ -59,42 +30,27 @@
59
30
  activeUrlStore.set(activeUrl);
60
31
  });
61
32
 
62
- // Pass shouldBeOpen to sidebar utility for `isOpen` variant and other relevant styling.
63
- // Pass alwaysOpen directly to sidebar utility for the `alwaysOpen` variant.
64
- const {
65
- base,
66
- active,
67
- nonactive,
68
- div,
69
- backdrop: backdropCls
70
- } = $derived(
71
- sidebar({
72
- isOpen: shouldBeOpen, // Now dynamically drives the tv `isOpen` variant
73
- breakpoint: alwaysOpen ? undefined : breakpoint, // Apply breakpoint variant ONLY if not alwaysOpen
74
- position,
75
- backdrop: backdrop && !disableBreakpoints, // Backdrop for standalone sidebar
76
- alwaysOpen // Pass alwaysOpen directly
77
- })
78
- );
33
+ if (disableBreakpoints) isOpen = true;
34
+ const { base, active, nonactive, div, backdrop: backdropCls } = $derived(sidebar({ isOpen, breakpoint, position, backdrop, alwaysOpen: alwaysOpen && !disableBreakpoints }));
79
35
 
80
36
  let sidebarCtx: SidebarCtxType = {
81
37
  get closeSidebar() {
82
38
  return closeSidebar;
83
39
  },
84
40
  get activeClass() {
85
- return cn(active(), clsx(activeClass), (theme as SidebarTheme)?.active);
41
+ return active({ class: clsx((theme as SidebarTheme)?.active, activeClass) });
86
42
  },
87
43
  get nonActiveClass() {
88
- return cn(nonactive(), clsx(nonActiveClass), (theme as SidebarTheme)?.nonactive);
44
+ return nonactive({ class: clsx((theme as SidebarTheme)?.nonactive, nonActiveClass) });
89
45
  },
90
46
  isSingle
91
47
  };
92
48
 
93
- // Transition parameters for the fly effect when opening/closing
94
49
  let transitionParams = params ? params : { x: -320, duration: 200, easing: sineIn };
95
50
 
96
51
  setContext("sidebarContext", sidebarCtx);
97
52
 
53
+ // Handler for Escape key
98
54
  const handleEscape = () => {
99
55
  closeSidebar?.();
100
56
  };
@@ -103,18 +59,27 @@
103
59
  <svelte:window bind:innerWidth />
104
60
 
105
61
  {#if !disableBreakpoints}
106
- <aside use:trapFocus={isOpen ? { onEscape: closeSidebar ? handleEscape : undefined } : null} transition:transition={isOpen && !alwaysOpen ? transitionParams : undefined} {...restProps} class={cn(base(), clsx(clsx(className)), (theme as SidebarTheme)?.base)} aria-label={ariaLabel}>
107
- <div class={cn(div(), clsx(divClass), (theme as SidebarTheme)?.base)}>
108
- {@render children()}
109
- </div>
110
- </aside>
111
-
112
- {#if isOpen && !alwaysOpen && backdrop}
113
- <div role="presentation" class={cn(backdropCls(), clsx(backdropClass), (theme as SidebarTheme)?.backdrop)} onclick={activateClickOutside ? closeSidebar : undefined}></div>
62
+ {#if isOpen || isLargeScreen}
63
+ {#if isOpen && !alwaysOpen}
64
+ {#if backdrop && activateClickOutside}
65
+ <div role="presentation" class={backdropCls({ class: clsx((theme as SidebarTheme)?.backdrop, backdropClass) })} onclick={closeSidebar}></div>
66
+ {:else if backdrop && !activateClickOutside}
67
+ <div role="presentation" class={backdropCls({ class: clsx((theme as SidebarTheme)?.backdrop, backdropClass) })}></div>
68
+ {:else if !backdrop && activateClickOutside}
69
+ <div role="presentation" class="fixed start-0 top-0 z-50 h-full w-full" onclick={closeSidebar}></div>
70
+ {:else if !backdrop && !activateClickOutside}
71
+ <div role="presentation" class="fixed start-0 top-0 z-50 h-full w-full"></div>
72
+ {/if}
73
+ {/if}
74
+ <aside use:trapFocus={!isLargeScreen && isOpen && !alwaysOpen ? { onEscape: closeSidebar ? handleEscape : undefined } : null} transition:transition={!alwaysOpen ? transitionParams : undefined} {...restProps} class={base({ class: clsx((theme as SidebarTheme)?.base, className) })} aria-label={ariaLabel}>
75
+ <div class={div({ class: clsx((theme as SidebarTheme)?.base, divClass) })}>
76
+ {@render children()}
77
+ </div>
78
+ </aside>
114
79
  {/if}
115
80
  {:else}
116
- <aside use:trapFocus={isOpen ? { onEscape: closeSidebar ? handleEscape : undefined } : null} transition:transition={isOpen && !alwaysOpen ? transitionParams : undefined} {...restProps} class={cn(base(), clsx(clsx(className)), (theme as SidebarTheme)?.base)} aria-label={ariaLabel}>
117
- <div class={cn(div(), clsx(divClass), (theme as SidebarTheme)?.base)}>
81
+ <aside use:trapFocus={isOpen ? { onEscape: closeSidebar ? handleEscape : undefined } : null} {...restProps} class={base({ class: clsx((theme as SidebarTheme)?.base, className) })} aria-label={ariaLabel}>
82
+ <div class={div({ class: clsx((theme as SidebarTheme)?.base, divClass) })}>
118
83
  {@render children()}
119
84
  </div>
120
85
  </aside>
@@ -2,7 +2,6 @@
2
2
  import clsx from "clsx";
3
3
  import { sidebarBrand, type SidebarBrandTheme } from ".";
4
4
  import type { SidebarBrandProps } from "../types";
5
- import { cn } from "..";
6
5
  import { getTheme } from "../theme/themeUtils";
7
6
 
8
7
  let { children, site, imgClass, spanClass, class: className, ...restProps }: SidebarBrandProps = $props();
@@ -12,10 +11,10 @@
12
11
  const { base, img, span } = $derived(sidebarBrand());
13
12
  </script>
14
13
 
15
- <a {...restProps} href={site?.href ? site.href : "/"} class={cn(base(), clsx(className), (theme as SidebarBrandTheme)?.base)}>
14
+ <a {...restProps} href={site?.href ? site.href : "/"} class={base({ class: clsx((theme as SidebarBrandTheme)?.base, className) })}>
16
15
  {#if site}
17
- <img src={site.img} class={cn(img(), clsx(imgClass), (theme as SidebarBrandTheme)?.img)} alt={site.name} />
18
- <span class={cn(span(), clsx(spanClass), (theme as SidebarBrandTheme)?.span)}>{site.name}</span>
16
+ <img src={site.img} class={img({ class: clsx((theme as SidebarBrandTheme)?.img, imgClass) })} alt={site.name} />
17
+ <span class={span({ class: clsx((theme as SidebarBrandTheme)?.span, spanClass) })}>{site.name}</span>
19
18
  {:else if children}
20
19
  {@render children()}
21
20
  {/if}
@@ -2,14 +2,13 @@
2
2
  import clsx from "clsx";
3
3
  import { sidebarButton } from ".";
4
4
  import type { SidebarButtonProps } from "../types";
5
- import { cn } from "..";
6
5
  import { getTheme } from "../theme/themeUtils";
7
6
 
8
7
  let { breakpoint = "md", class: className, ...restProps }: SidebarButtonProps = $props();
9
8
 
10
9
  const theme = getTheme("sidebarButton");
11
10
 
12
- const base = $derived(cn(sidebarButton({ breakpoint }), clsx(className), theme));
11
+ const base = $derived(sidebarButton({ breakpoint, class: clsx(theme, className) }));
13
12
  </script>
14
13
 
15
14
  <button {...restProps} type="button" class={base}>
@@ -2,7 +2,6 @@
2
2
  import clsx from "clsx";
3
3
  import { sidebarCta, type SidebarCtaTheme } from ".";
4
4
  import type { SidebarCtaProps } from "../types";
5
- import { cn } from "..";
6
5
  import { getTheme } from "../theme/themeUtils";
7
6
 
8
7
  let { children, icon, divClass, spanClass, label, class: className, ...restProps }: SidebarCtaProps = $props();
@@ -12,9 +11,9 @@
12
11
  const { base, div, span } = $derived(sidebarCta());
13
12
  </script>
14
13
 
15
- <div {...restProps} id="dropdown-cta" class={cn(base(), clsx(className), (theme as SidebarCtaTheme)?.base)} role="alert">
16
- <div class={cn(div(), clsx(divClass), (theme as SidebarCtaTheme)?.div)}>
17
- <span class={cn(span(), clsx(spanClass), (theme as SidebarCtaTheme)?.span)}>{label}</span>
14
+ <div {...restProps} id="dropdown-cta" class={base({ class: clsx((theme as SidebarCtaTheme)?.base, className) })} role="alert">
15
+ <div class={div({ class: clsx((theme as SidebarCtaTheme)?.div, divClass) })}>
16
+ <span class={span({ class: clsx((theme as SidebarCtaTheme)?.span, spanClass) })}>{label}</span>
18
17
  {#if icon}
19
18
  {@render icon()}
20
19
  {/if}