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
@@ -6,7 +6,6 @@
6
6
  import { sidebarDropdownWrapper, type SidebarDropdownWrapperTheme } from ".";
7
7
  import type { SidebarDropdownWrapperProps, ParamsType } from "../types";
8
8
  import clsx from "clsx";
9
- import { cn } from "..";
10
9
  import { getTheme } from "../theme/themeUtils";
11
10
 
12
11
  type SidebarContext = {
@@ -52,30 +51,30 @@
52
51
  }
53
52
  </script>
54
53
 
55
- <li class={cn(base(), clsx(className), (theme as SidebarDropdownWrapperTheme)?.base)}>
56
- <button {...restProps} onclick={handleDropdown} type="button" class={cn(btn(), clsx(btnClass), (theme as SidebarDropdownWrapperTheme)?.btn)} aria-controls="sidebar-dropdown">
54
+ <li class={base({ class: clsx((theme as SidebarDropdownWrapperTheme)?.base, className) })}>
55
+ <button {...restProps} onclick={handleDropdown} type="button" class={btn({ class: clsx((theme as SidebarDropdownWrapperTheme)?.btn, btnClass) })} aria-controls="sidebar-dropdown">
57
56
  {#if icon}
58
57
  {@render icon()}
59
58
  {/if}
60
- <span class={cn(span(), clsx(spanClass), (theme as SidebarDropdownWrapperTheme)?.span)}>{label}</span>
59
+ <span class={span({ class: clsx((theme as SidebarDropdownWrapperTheme)?.span, spanClass) })}>{label}</span>
61
60
  {#if isOpen}
62
61
  {#if arrowup}
63
62
  {@render arrowup()}
64
63
  {:else}
65
- <svg class={cn(svg(), clsx(svgClass), (theme as SidebarDropdownWrapperTheme)?.svg)} aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 10 6">
64
+ <svg class={svg({ class: clsx((theme as SidebarDropdownWrapperTheme)?.svg, svgClass) })} aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 10 6">
66
65
  <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5 5 1 1 5" />
67
66
  </svg>
68
67
  {/if}
69
68
  {:else if arrowdown}
70
69
  {@render arrowdown()}
71
70
  {:else}
72
- <svg class={cn(svg(), clsx(svgClass), (theme as SidebarDropdownWrapperTheme)?.svg)} aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 10 6">
71
+ <svg class={svg({ class: clsx((theme as SidebarDropdownWrapperTheme)?.svg, svgClass) })} aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 10 6">
73
72
  <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 1 4 4 4-4" />
74
73
  </svg>
75
74
  {/if}
76
75
  </button>
77
76
  {#if isOpen}
78
- <ul class={cn(ul(), clsx(ulClass), (theme as SidebarDropdownWrapperTheme)?.ul)} transition:transition={params as ParamsType}>
77
+ <ul class={ul({ class: clsx((theme as SidebarDropdownWrapperTheme)?.ul, ulClass) })} transition:transition={params as ParamsType}>
79
78
  {@render children()}
80
79
  </ul>
81
80
  {/if}
@@ -1,6 +1,7 @@
1
1
  <script lang="ts">
2
2
  import { getContext } from "svelte";
3
- import { type SidebarCtxType, type SidebarItemProps, cn } from "..";
3
+ import clsx from "clsx";
4
+ import { type SidebarCtxType, type SidebarItemProps } from "..";
4
5
 
5
6
  let { icon, subtext, href, label, spanClass = "ms-3", activeClass, nonActiveClass, aClass, active, class: className, ...restProps }: SidebarItemProps = $props();
6
7
 
@@ -22,12 +23,12 @@
22
23
  let aCls = $derived((activeItem ?? sidebarUrl === href) ? (activeClass ?? context.activeClass) : (nonActiveClass ?? context.nonActiveClass));
23
24
  </script>
24
25
 
25
- <li class={cn(className)}>
26
- <a onclick={context.closeSidebar} {...restProps} {href} aria-current={(activeItem ?? sidebarUrl === href) ? "page" : undefined} class={cn(aCls, aClass)}>
26
+ <li class={clsx(className)}>
27
+ <a onclick={context.closeSidebar} {...restProps} {href} aria-current={(activeItem ?? sidebarUrl === href) ? "page" : undefined} class={clsx(aCls, aClass)}>
27
28
  {#if icon}
28
29
  {@render icon()}
29
30
  {/if}
30
- <span class={cn(spanClass)}>{label}</span>
31
+ <span class={clsx(spanClass)}>{label}</span>
31
32
  {#if subtext}
32
33
  {@render subtext()}
33
34
  {/if}
@@ -1,4 +1,5 @@
1
1
  import { type VariantProps } from "tailwind-variants";
2
+ import type { ClassValue } from "svelte/elements";
2
3
  export type SidebarVariants = VariantProps<typeof sidebar>;
3
4
  export declare const sidebar: import("tailwind-variants").TVReturnType<{
4
5
  position: {
@@ -13,12 +14,8 @@ export declare const sidebar: import("tailwind-variants").TVReturnType<{
13
14
  };
14
15
  };
15
16
  isOpen: {
16
- true: {
17
- base: string;
18
- };
19
- false: {
20
- base: string;
21
- };
17
+ true: string;
18
+ false: string;
22
19
  };
23
20
  breakpoint: {
24
21
  sm: {
@@ -66,12 +63,8 @@ export declare const sidebar: import("tailwind-variants").TVReturnType<{
66
63
  };
67
64
  };
68
65
  isOpen: {
69
- true: {
70
- base: string;
71
- };
72
- false: {
73
- base: string;
74
- };
66
+ true: string;
67
+ false: string;
75
68
  };
76
69
  breakpoint: {
77
70
  sm: {
@@ -119,12 +112,8 @@ export declare const sidebar: import("tailwind-variants").TVReturnType<{
119
112
  };
120
113
  };
121
114
  isOpen: {
122
- true: {
123
- base: string;
124
- };
125
- false: {
126
- base: string;
127
- };
115
+ true: string;
116
+ false: string;
128
117
  };
129
118
  breakpoint: {
130
119
  sm: {
@@ -161,7 +150,7 @@ export declare const sidebar: import("tailwind-variants").TVReturnType<{
161
150
  backdrop: string;
162
151
  }, undefined, unknown, unknown, undefined>>;
163
152
  export type SidebarSlots = keyof typeof sidebar.slots;
164
- export type SidebarTheme = Partial<Record<SidebarSlots, string>>;
153
+ export type SidebarTheme = Partial<Record<SidebarSlots, ClassValue>>;
165
154
  export declare const sidebarButton: import("tailwind-variants").TVReturnType<{
166
155
  breakpoint: {
167
156
  sm: string;
@@ -187,7 +176,7 @@ export declare const sidebarButton: import("tailwind-variants").TVReturnType<{
187
176
  "2xl": string;
188
177
  };
189
178
  }, undefined, "inline-flex items-center p-0 mt-0 ms-3 text-sm text-gray-500 rounded-lg hover:bg-gray-100 focus:outline-hidden focus:ring-2 focus:ring-gray-200 dark:text-gray-400 dark:hover:bg-gray-700 dark:focus:ring-gray-600", unknown, unknown, undefined>>;
190
- export type SidebarButtonTheme = string;
179
+ export type SidebarButtonTheme = ClassValue;
191
180
  export declare const sidebarCta: import("tailwind-variants").TVReturnType<{
192
181
  [key: string]: {
193
182
  [key: string]: import("tailwind-variants").ClassValue | {
@@ -226,7 +215,7 @@ export declare const sidebarCta: import("tailwind-variants").TVReturnType<{
226
215
  span: string;
227
216
  }, undefined, unknown, unknown, undefined>>;
228
217
  export type SidebarCtaSlots = keyof typeof sidebarCta.slots;
229
- export type SidebarCtaTheme = Partial<Record<SidebarCtaSlots, string>>;
218
+ export type SidebarCtaTheme = Partial<Record<SidebarCtaSlots, ClassValue>>;
230
219
  export declare const sidebarBrand: import("tailwind-variants").TVReturnType<{
231
220
  [key: string]: {
232
221
  [key: string]: import("tailwind-variants").ClassValue | {
@@ -265,7 +254,7 @@ export declare const sidebarBrand: import("tailwind-variants").TVReturnType<{
265
254
  span: string;
266
255
  }, undefined, unknown, unknown, undefined>>;
267
256
  export type SidebarBrandSlots = keyof typeof sidebarBrand.slots;
268
- export type SidebarBrandTheme = Partial<Record<SidebarBrandSlots, string>>;
257
+ export type SidebarBrandTheme = Partial<Record<SidebarBrandSlots, ClassValue>>;
269
258
  export declare const sidebarDropdownWrapper: import("tailwind-variants").TVReturnType<{
270
259
  [key: string]: {
271
260
  [key: string]: import("tailwind-variants").ClassValue | {
@@ -316,4 +305,4 @@ export declare const sidebarDropdownWrapper: import("tailwind-variants").TVRetur
316
305
  ul: string;
317
306
  }, undefined, unknown, unknown, undefined>>;
318
307
  export type SidebarDropdownWrapperSlots = keyof typeof sidebarDropdownWrapper.slots;
319
- export type SidebarDropdownWrapperTheme = Partial<Record<SidebarDropdownWrapperSlots, string>>;
308
+ export type SidebarDropdownWrapperTheme = Partial<Record<SidebarDropdownWrapperSlots, ClassValue>>;
@@ -1,4 +1,3 @@
1
- // theme.ts
2
1
  import { tv } from "tailwind-variants";
3
2
  export const sidebar = tv({
4
3
  slots: {
@@ -14,10 +13,9 @@ export const sidebar = tv({
14
13
  absolute: { base: "absolute" },
15
14
  static: { base: "static" }
16
15
  },
17
- // Reintroducing isOpen, but this will only apply when isLargeScreen AND alwaysOpen is false
18
16
  isOpen: {
19
- true: { base: "block" }, // When explicitly open (hamburger menu clicked)
20
- false: { base: "hidden" } // When explicitly closed
17
+ true: "block",
18
+ false: "hidden"
21
19
  },
22
20
  breakpoint: {
23
21
  sm: { base: "sm:block" },
@@ -27,58 +25,21 @@ export const sidebar = tv({
27
25
  "2xl": { base: "2xl:block" }
28
26
  },
29
27
  alwaysOpen: {
30
- true: { base: "block" } // This variant will ensure it's always block regardless of breakpoints
28
+ true: { base: "block" } // Always display the sidebar when alwaysOpen is true
31
29
  },
32
30
  backdrop: {
33
31
  true: { backdrop: "bg-gray-900 opacity-75" }
34
32
  }
35
33
  },
36
34
  compoundVariants: [
37
- // Rule for responsive display when NOT alwaysOpen
38
- {
39
- alwaysOpen: false, // Only apply these if the sidebar is NOT always open
40
- breakpoint: "sm",
41
- class: { base: "sm:block" }
42
- },
43
- {
44
- alwaysOpen: false,
45
- breakpoint: "md",
46
- class: { base: "md:block" }
47
- },
48
- {
49
- alwaysOpen: false,
50
- breakpoint: "lg",
51
- class: { base: "lg:block" }
52
- },
53
- {
54
- alwaysOpen: false,
55
- breakpoint: "xl",
56
- class: { base: "xl:block" }
57
- },
58
- {
59
- alwaysOpen: false,
60
- breakpoint: "2xl",
61
- class: { base: "2xl:block" }
62
- },
63
- // Override: When alwaysOpen is true, it should always be visible, ignoring `isOpen` and `breakpoint`
35
+ // When alwaysOpen is true, override the breakpoint display classes
64
36
  {
65
37
  alwaysOpen: true,
66
38
  class: {
67
- base: "!block" // Force block display
68
- }
69
- },
70
- // Another compound variant to hide it below the breakpoint if not alwaysOpen and not explicitly open
71
- {
72
- alwaysOpen: false,
73
- isOpen: false, // If it's not always open AND not explicitly open (via hamburger)
74
- class: {
75
- base: "hidden" // Hide it by default. Breakpoint rules will override this for larger screens.
39
+ base: "!block"
76
40
  }
77
41
  }
78
- ],
79
- defaultVariants: {
80
- isOpen: false // Default to closed on small screens if not specified
81
- }
42
+ ]
82
43
  });
83
44
  export const sidebarButton = tv({
84
45
  base: "inline-flex items-center p-0 mt-0 ms-3 text-sm text-gray-500 rounded-lg hover:bg-gray-100 focus:outline-hidden focus:ring-2 focus:ring-gray-200 dark:text-gray-400 dark:hover:bg-gray-700 dark:focus:ring-gray-600",
@@ -2,7 +2,6 @@
2
2
  import clsx from "clsx";
3
3
  import { cardPlaceholder, type CardPlaceholderTheme } from ".";
4
4
  import type { CardPlaceholderProps } from "../types";
5
- import { cn } from "..";
6
5
  import { getTheme } from "../theme/themeUtils";
7
6
 
8
7
  let { size = "sm", class: className, ...restProps }: CardPlaceholderProps = $props();
@@ -12,22 +11,22 @@
12
11
  const { base, imageArea, imageIcon, line, footerArea } = $derived(cardPlaceholder({ size }));
13
12
  </script>
14
13
 
15
- <div role="status" {...restProps} class={cn(base(), clsx(className), (theme as CardPlaceholderTheme)?.base)}>
16
- <div class={cn(imageArea(), (theme as CardPlaceholderTheme)?.imageArea)}>
17
- <svg width="48" height="48" class={cn(imageIcon(), (theme as CardPlaceholderTheme)?.imageIcon)} xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" viewBox="0 0 640 512">
14
+ <div role="status" {...restProps} class={base({ class: clsx((theme as CardPlaceholderTheme)?.base, className) })}>
15
+ <div class={imageArea({ class: clsx((theme as CardPlaceholderTheme)?.imageArea) })}>
16
+ <svg width="48" height="48" class={imageIcon({ class: clsx((theme as CardPlaceholderTheme)?.imageIcon) })} xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" viewBox="0 0 640 512">
18
17
  <path d="M480 80C480 35.82 515.8 0 560 0C604.2 0 640 35.82 640 80C640 124.2 604.2 160 560 160C515.8 160 480 124.2 480 80zM0 456.1C0 445.6 2.964 435.3 8.551 426.4L225.3 81.01C231.9 70.42 243.5 64 256 64C268.5 64 280.1 70.42 286.8 81.01L412.7 281.7L460.9 202.7C464.1 196.1 472.2 192 480 192C487.8 192 495 196.1 499.1 202.7L631.1 419.1C636.9 428.6 640 439.7 640 450.9C640 484.6 612.6 512 578.9 512H55.91C25.03 512 .0006 486.1 .0006 456.1L0 456.1z"></path>
19
18
  </svg>
20
19
  </div>
21
- <div class={cn(line({ class: "mb-4 h-2.5 w-1/2" }), (theme as CardPlaceholderTheme)?.line)}></div>
22
- <div class={cn(line({ class: "mb-2.5 h-2" }), (theme as CardPlaceholderTheme)?.line)}></div>
23
- <div class={cn(line({ class: "mb-2.5 h-2" }), (theme as CardPlaceholderTheme)?.line)}></div>
24
- <div class={cn(line({ class: "h-2" }), (theme as CardPlaceholderTheme)?.line)}></div>
25
- <div class={cn(footerArea(), (theme as CardPlaceholderTheme)?.footerArea)}>
26
- <svg class={cn(line({ class: "h-14 w-14" }), (theme as CardPlaceholderTheme)?.line)} aria-hidden="true" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
20
+ <div class={line({ class: clsx("mb-4 h-2.5 w-1/2", (theme as CardPlaceholderTheme)?.line) })}></div>
21
+ <div class={line({ class: clsx("mb-2.5 h-2", (theme as CardPlaceholderTheme)?.line) })}></div>
22
+ <div class={line({ class: clsx("mb-2.5 h-2", (theme as CardPlaceholderTheme)?.line) })}></div>
23
+ <div class={line({ class: clsx("h-2", (theme as CardPlaceholderTheme)?.line) })}></div>
24
+ <div class={footerArea({ class: clsx((theme as CardPlaceholderTheme)?.footerArea) })}>
25
+ <svg class={line({ class: clsx("h-14 w-14", (theme as CardPlaceholderTheme)?.line) })} aria-hidden="true" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
27
26
  <path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-6-3a2 2 0 11-4 0 2 2 0 014 0zm-2 4a5 5 0 00-4.546 2.916A5.986 5.986 0 0010 16a5.986 5.986 0 004.546-2.084A5 5 0 0010 11z" clip-rule="evenodd"></path>
28
27
  </svg>
29
- <div class={cn(line({ class: "mb-2 h-2.5 w-32" }), (theme as CardPlaceholderTheme)?.line)}></div>
30
- <div class={cn(line({ class: "mb-2 h-2 w-32" }), (theme as CardPlaceholderTheme)?.line)}></div>
28
+ <div class={line({ class: clsx("mb-2 h-2.5 w-32", (theme as CardPlaceholderTheme)?.line) })}></div>
29
+ <div class={line({ class: clsx("mb-2 h-2 w-32", (theme as CardPlaceholderTheme)?.line) })}></div>
31
30
  </div>
32
31
  <span class="sr-only">Loading...</span>
33
32
  </div>
@@ -2,7 +2,6 @@
2
2
  import clsx from "clsx";
3
3
  import { imagePlaceholder, type ImagePlaceholderTheme } from ".";
4
4
  import type { ImagePlaceholderProps } from "../types";
5
- import { cn } from "..";
6
5
  import { getTheme } from "../theme/themeUtils";
7
6
 
8
7
  let { size = "md", rounded, imgOnly = false, class: className, ...restProps }: ImagePlaceholderProps = $props();
@@ -17,21 +16,49 @@
17
16
  );
18
17
  </script>
19
18
 
20
- <div role="status" {...restProps} class={cn(base(), clsx(className), (theme as ImagePlaceholderTheme)?.base)}>
21
- <div class={cn(image(), (theme as ImagePlaceholderTheme)?.image)}>
22
- <svg width="48" height="48" class={cn(svg(), (theme as ImagePlaceholderTheme)?.svg)} xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" viewBox="0 0 640 512">
19
+ <div role="status" {...restProps} class={base({ class: clsx(className, (theme as ImagePlaceholderTheme)?.base) })}>
20
+ <div class={image({ class: clsx((theme as ImagePlaceholderTheme)?.image) })}>
21
+ <svg width="48" height="48" class={svg({ class: clsx((theme as ImagePlaceholderTheme)?.svg) })} xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" viewBox="0 0 640 512">
23
22
  <path d="M480 80C480 35.82 515.8 0 560 0C604.2 0 640 35.82 640 80C640 124.2 604.2 160 560 160C515.8 160 480 124.2 480 80zM0 456.1C0 445.6 2.964 435.3 8.551 426.4L225.3 81.01C231.9 70.42 243.5 64 256 64C268.5 64 280.1 70.42 286.8 81.01L412.7 281.7L460.9 202.7C464.1 196.1 472.2 192 480 192C487.8 192 495 196.1 499.1 202.7L631.1 419.1C636.9 428.6 640 439.7 640 450.9C640 484.6 612.6 512 578.9 512H55.91C25.03 512 .0006 486.1 .0006 456.1L0 456.1z"></path>
24
23
  </svg>
25
24
  </div>
26
25
  {#if !imgOnly}
27
- <div class={cn(content(), (theme as ImagePlaceholderTheme)?.content)}>
28
- <div class={cn(line({ class: "mb-4 h-2.5 w-1/2" }), (theme as ImagePlaceholderTheme)?.line)}></div>
29
- <div class={cn(line({ class: "mb-2.5 h-2 w-9/12" }), (theme as ImagePlaceholderTheme)?.line)}></div>
30
- <div class={cn(line({ class: "mb-2.5 h-2" }), (theme as ImagePlaceholderTheme)?.line)}></div>
31
- <div class={cn(line({ class: "mb-2.5 h-2" }), (theme as ImagePlaceholderTheme)?.line)}></div>
32
- <div class={cn(line({ class: "mb-2.5 h-2 w-10/12" }), (theme as ImagePlaceholderTheme)?.line)}></div>
33
- <div class={cn(line({ class: "mb-2.5 h-2 w-11/12" }), (theme as ImagePlaceholderTheme)?.line)}></div>
34
- <div class={cn(line({ class: "h-2 w-9/12" }), (theme as ImagePlaceholderTheme)?.line)}></div>
26
+ <div class={content({ class: clsx((theme as ImagePlaceholderTheme)?.content) })}>
27
+ <div
28
+ class={line({
29
+ class: clsx("mb-4 h-2.5 w-1/2", (theme as ImagePlaceholderTheme)?.line)
30
+ })}
31
+ ></div>
32
+ <div
33
+ class={line({
34
+ class: clsx("mb-2.5 h-2 w-9/12", (theme as ImagePlaceholderTheme)?.line)
35
+ })}
36
+ ></div>
37
+ <div
38
+ class={line({
39
+ class: clsx("mb-2.5 h-2", (theme as ImagePlaceholderTheme)?.line)
40
+ })}
41
+ ></div>
42
+ <div
43
+ class={line({
44
+ class: clsx("mb-2.5 h-2", (theme as ImagePlaceholderTheme)?.line)
45
+ })}
46
+ ></div>
47
+ <div
48
+ class={line({
49
+ class: clsx("mb-2.5 h-2 w-10/12", (theme as ImagePlaceholderTheme)?.line)
50
+ })}
51
+ ></div>
52
+ <div
53
+ class={line({
54
+ class: clsx("mb-2.5 h-2 w-11/12", (theme as ImagePlaceholderTheme)?.line)
55
+ })}
56
+ ></div>
57
+ <div
58
+ class={line({
59
+ class: clsx("h-2 w-9/12", (theme as ImagePlaceholderTheme)?.line)
60
+ })}
61
+ ></div>
35
62
  </div>
36
63
  {/if}
37
64
  <span class="sr-only">Loading...</span>
@@ -2,7 +2,6 @@
2
2
  import clsx from "clsx";
3
3
  import { listPlaceholder, type ListPlaceholderTheme } from ".";
4
4
  import type { ListPlaceholderProps } from "../types";
5
- import { cn } from "..";
6
5
  import { getTheme } from "../theme/themeUtils";
7
6
 
8
7
  let { itemNumber = 5, size = "md", rounded, class: className, ...restProps }: ListPlaceholderProps = $props();
@@ -14,15 +13,34 @@
14
13
  let items = $derived([...Array(itemNumber).keys()]);
15
14
  </script>
16
15
 
17
- <div role="status" {...restProps} class={cn(base(), clsx(className), (theme as ListPlaceholderTheme)?.base)}>
18
- <!-- eslint-disable-next-line @typescript-eslint/no-unused-vars -->
16
+ <div role="status" {...restProps} class={base({ class: clsx(className, (theme as ListPlaceholderTheme)?.base) })}>
19
17
  {#each items as _, i}
20
- <div class={cn(item({ class: i > 0 ? "pt-4" : "" }), (theme as ListPlaceholderTheme)?.item)}>
21
- <div class={cn(itemContent(), (theme as ListPlaceholderTheme)?.itemContent)}>
22
- <div class={cn(itemTitle(), (theme as ListPlaceholderTheme)?.itemTitle)}></div>
23
- <div class={cn(itemSubtitle(), (theme as ListPlaceholderTheme)?.itemSubtitle)}></div>
18
+ <div
19
+ class={item({
20
+ class: clsx(i > 0 ? "pt-4" : "", (theme as ListPlaceholderTheme)?.item)
21
+ })}
22
+ >
23
+ <div
24
+ class={itemContent({
25
+ class: clsx((theme as ListPlaceholderTheme)?.itemContent)
26
+ })}
27
+ >
28
+ <div
29
+ class={itemTitle({
30
+ class: clsx((theme as ListPlaceholderTheme)?.itemTitle)
31
+ })}
32
+ ></div>
33
+ <div
34
+ class={itemSubtitle({
35
+ class: clsx((theme as ListPlaceholderTheme)?.itemSubtitle)
36
+ })}
37
+ ></div>
24
38
  </div>
25
- <div class={cn(itemExtra(), (theme as ListPlaceholderTheme)?.itemExtra)}></div>
39
+ <div
40
+ class={itemExtra({
41
+ class: clsx((theme as ListPlaceholderTheme)?.itemExtra)
42
+ })}
43
+ ></div>
26
44
  </div>
27
45
  {/each}
28
46
  <span class="sr-only">Loading...</span>
@@ -2,7 +2,6 @@
2
2
  import clsx from "clsx";
3
3
  import { skeleton, type SkeletonTheme } from ".";
4
4
  import type { SkeletonProps } from "../types";
5
- import { cn } from "..";
6
5
  import { getTheme } from "../theme/themeUtils";
7
6
 
8
7
  let { size = "sm", class: className, ...restProps }: SkeletonProps = $props();
@@ -12,14 +11,30 @@
12
11
  const { wrapper, line } = $derived(skeleton({ size }));
13
12
  </script>
14
13
 
15
- <div role="status" {...restProps} class={cn(wrapper(), clsx(className), (theme as SkeletonTheme)?.wrapper)}>
16
- <div class={cn(line({ class: "mb-4 h-2.5 w-1/2" }), (theme as SkeletonTheme)?.line)}></div>
17
- <div class={cn(line({ class: "mb-2.5 h-2 w-9/12" }), (theme as SkeletonTheme)?.line)}></div>
18
- <div class={cn(line({ class: "mb-2.5 h-2" }), (theme as SkeletonTheme)?.line)}></div>
19
- <div class={cn(line({ class: "mb-2.5 h-2" }), (theme as SkeletonTheme)?.line)}></div>
20
- <div class={cn(line({ class: "mb-2.5 h-2 w-10/12" }), (theme as SkeletonTheme)?.line)}></div>
21
- <div class={cn(line({ class: "mb-2.5 h-2 w-11/12" }), (theme as SkeletonTheme)?.line)}></div>
22
- <div class={cn(line({ class: "h-2 w-9/12" }), (theme as SkeletonTheme)?.line)}></div>
14
+ <div role="status" {...restProps} class={wrapper({ class: clsx(className, (theme as SkeletonTheme)?.wrapper) })}>
15
+ <div
16
+ class={line({
17
+ class: clsx("mb-4 h-2.5 w-1/2", (theme as SkeletonTheme)?.line)
18
+ })}
19
+ ></div>
20
+ <div
21
+ class={line({
22
+ class: clsx("mb-2.5 h-2 w-9/12", (theme as SkeletonTheme)?.line)
23
+ })}
24
+ ></div>
25
+ <div class={line({ class: clsx("mb-2.5 h-2", (theme as SkeletonTheme)?.line) })}></div>
26
+ <div class={line({ class: clsx("mb-2.5 h-2", (theme as SkeletonTheme)?.line) })}></div>
27
+ <div
28
+ class={line({
29
+ class: clsx("mb-2.5 h-2 w-10/12", (theme as SkeletonTheme)?.line)
30
+ })}
31
+ ></div>
32
+ <div
33
+ class={line({
34
+ class: clsx("mb-2.5 h-2 w-11/12", (theme as SkeletonTheme)?.line)
35
+ })}
36
+ ></div>
37
+ <div class={line({ class: clsx("h-2 w-9/12", (theme as SkeletonTheme)?.line) })}></div>
23
38
  <span class="sr-only">Loading...</span>
24
39
  </div>
25
40
 
@@ -2,7 +2,6 @@
2
2
  import { testimonialPlaceholder, type TestimonialPlaceholderTheme } from ".";
3
3
  import clsx from "clsx";
4
4
  import { type TestimonialPlaceholderProps } from "..";
5
- import { cn } from "..";
6
5
  import { getTheme } from "../theme/themeUtils";
7
6
 
8
7
  let { class: className, ...restProps }: TestimonialPlaceholderProps = $props();
@@ -12,15 +11,35 @@
12
11
  const { wrapper, line1, line2, svg, subContent } = testimonialPlaceholder();
13
12
  </script>
14
13
 
15
- <div role="status" {...restProps} class={cn(wrapper(), clsx(className), (theme as TestimonialPlaceholderTheme)?.wrapper)}>
16
- <div class={cn(line2({ class: "mx-auto mb-2.5 h-2.5 max-w-[640px]" }), (theme as TestimonialPlaceholderTheme)?.line2)}></div>
17
- <div class={cn(line2({ class: "mx-auto h-2.5 max-w-[540px]" }), (theme as TestimonialPlaceholderTheme)?.line2)}></div>
18
- <div class={cn(subContent(), (theme as TestimonialPlaceholderTheme)?.subContent)}>
19
- <svg class={cn(svg(), (theme as TestimonialPlaceholderTheme)?.svg)} aria-hidden="true" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
14
+ <div role="status" {...restProps} class={wrapper({ class: clsx(className, (theme as TestimonialPlaceholderTheme)?.wrapper) })}>
15
+ <div
16
+ class={line2({
17
+ class: clsx("mx-auto mb-2.5 h-2.5 max-w-[640px]", (theme as TestimonialPlaceholderTheme)?.line2)
18
+ })}
19
+ ></div>
20
+ <div
21
+ class={line2({
22
+ class: clsx("mx-auto h-2.5 max-w-[540px]", (theme as TestimonialPlaceholderTheme)?.line2)
23
+ })}
24
+ ></div>
25
+ <div
26
+ class={subContent({
27
+ class: clsx((theme as TestimonialPlaceholderTheme)?.subContent)
28
+ })}
29
+ >
30
+ <svg class={svg({ class: clsx((theme as TestimonialPlaceholderTheme)?.svg) })} aria-hidden="true" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
20
31
  <path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-6-3a2 2 0 11-4 0 2 2 0 014 0zm-2 4a5 5 0 00-4.546 2.916A5.986 5.986 0 0010 16a5.986 5.986 0 004.546-2.084A5 5 0 0010 11z" clip-rule="evenodd"></path>
21
32
  </svg>
22
- <div class={cn(line1({ class: "me-3 h-2.5 w-20" }), (theme as TestimonialPlaceholderTheme)?.line1)}></div>
23
- <div class={cn(line1({ class: "h-2 w-24" }), (theme as TestimonialPlaceholderTheme)?.line1)}></div>
33
+ <div
34
+ class={line1({
35
+ class: clsx("me-3 h-2.5 w-20", (theme as TestimonialPlaceholderTheme)?.line1)
36
+ })}
37
+ ></div>
38
+ <div
39
+ class={line1({
40
+ class: clsx("h-2 w-24", (theme as TestimonialPlaceholderTheme)?.line1)
41
+ })}
42
+ ></div>
24
43
  </div>
25
44
  <span class="sr-only">Loading...</span>
26
45
  </div>
@@ -2,7 +2,6 @@
2
2
  import clsx from "clsx";
3
3
  import { textPlaceholder, type TextPlaceholderTheme } from ".";
4
4
  import type { TextPlaceholderProps } from "../types";
5
- import { cn } from "..";
6
5
  import { getTheme } from "../theme/themeUtils";
7
6
 
8
7
  let { size = "sm", class: className, ...restProps }: TextPlaceholderProps = $props();
@@ -16,36 +15,60 @@
16
15
  );
17
16
  </script>
18
17
 
19
- <div role="status" {...restProps} class={cn(baseWrapper(), clsx(className), (theme as TextPlaceholderTheme)?.baseWrapper)}>
20
- <div class={cn(divWrapper({ class: "w-full" }), (theme as TextPlaceholderTheme)?.divWrapper)}>
21
- <div class={cn(lineA({ class: "h-2.5 w-32" }), (theme as TextPlaceholderTheme)?.lineA)}></div>
22
- <div class={cn(lineB({ class: "h-2.5 w-24" }), (theme as TextPlaceholderTheme)?.lineB)}></div>
23
- <div class={cn(lineB({ class: "h-2.5 w-full" }), (theme as TextPlaceholderTheme)?.lineB)}></div>
18
+ <div role="status" {...restProps} class={baseWrapper({ class: clsx(className, (theme as TextPlaceholderTheme)?.baseWrapper) })}>
19
+ <div
20
+ class={divWrapper({
21
+ class: clsx("w-full", (theme as TextPlaceholderTheme)?.divWrapper)
22
+ })}
23
+ >
24
+ <div class={lineA({ class: clsx("h-2.5 w-32", (theme as TextPlaceholderTheme)?.lineA) })}></div>
25
+ <div class={lineB({ class: clsx("h-2.5 w-24", (theme as TextPlaceholderTheme)?.lineB) })}></div>
26
+ <div class={lineB({ class: clsx("h-2.5 w-full", (theme as TextPlaceholderTheme)?.lineB) })}></div>
24
27
  </div>
25
- <div class={cn(divWrapper({ class: "w-11/12" }), (theme as TextPlaceholderTheme)?.divWrapper)}>
26
- <div class={cn(lineA({ class: "h-2.5 w-full" }), (theme as TextPlaceholderTheme)?.lineA)}></div>
27
- <div class={cn(lineB({ class: "h-2.5 w-full" }), (theme as TextPlaceholderTheme)?.lineB)}></div>
28
- <div class={cn(lineB({ class: "h-2.5 w-24" }), (theme as TextPlaceholderTheme)?.lineB)}></div>
28
+ <div
29
+ class={divWrapper({
30
+ class: clsx("w-11/12", (theme as TextPlaceholderTheme)?.divWrapper)
31
+ })}
32
+ >
33
+ <div class={lineA({ class: clsx("h-2.5 w-full", (theme as TextPlaceholderTheme)?.lineA) })}></div>
34
+ <div class={lineB({ class: clsx("h-2.5 w-full", (theme as TextPlaceholderTheme)?.lineB) })}></div>
35
+ <div class={lineB({ class: clsx("h-2.5 w-24", (theme as TextPlaceholderTheme)?.lineB) })}></div>
29
36
  </div>
30
- <div class={cn(divWrapper({ class: "w-9/12" }), (theme as TextPlaceholderTheme)?.divWrapper)}>
31
- <div class={cn(lineB({ class: "h-2.5 w-full" }), (theme as TextPlaceholderTheme)?.lineB)}></div>
32
- <div class={cn(lineA({ class: "h-2.5 w-80" }), (theme as TextPlaceholderTheme)?.lineA)}></div>
33
- <div class={cn(lineB({ class: "h-2.5 w-full" }), (theme as TextPlaceholderTheme)?.lineB)}></div>
37
+ <div
38
+ class={divWrapper({
39
+ class: clsx("w-9/12", (theme as TextPlaceholderTheme)?.divWrapper)
40
+ })}
41
+ >
42
+ <div class={lineB({ class: clsx("h-2.5 w-full", (theme as TextPlaceholderTheme)?.lineB) })}></div>
43
+ <div class={lineA({ class: clsx("h-2.5 w-80", (theme as TextPlaceholderTheme)?.lineA) })}></div>
44
+ <div class={lineB({ class: clsx("h-2.5 w-full", (theme as TextPlaceholderTheme)?.lineB) })}></div>
34
45
  </div>
35
- <div class={cn(divWrapper({ class: "w-11/12" }), (theme as TextPlaceholderTheme)?.divWrapper)}>
36
- <div class={cn(lineA({ class: "h-2.5 w-full" }), (theme as TextPlaceholderTheme)?.lineA)}></div>
37
- <div class={cn(lineB({ class: "h-2.5 w-full" }), (theme as TextPlaceholderTheme)?.lineB)}></div>
38
- <div class={cn(lineB({ class: "h-2.5 w-24" }), (theme as TextPlaceholderTheme)?.lineB)}></div>
46
+ <div
47
+ class={divWrapper({
48
+ class: clsx("w-11/12", (theme as TextPlaceholderTheme)?.divWrapper)
49
+ })}
50
+ >
51
+ <div class={lineA({ class: clsx("h-2.5 w-full", (theme as TextPlaceholderTheme)?.lineA) })}></div>
52
+ <div class={lineB({ class: clsx("h-2.5 w-full", (theme as TextPlaceholderTheme)?.lineB) })}></div>
53
+ <div class={lineB({ class: clsx("h-2.5 w-24", (theme as TextPlaceholderTheme)?.lineB) })}></div>
39
54
  </div>
40
- <div class={cn(divWrapper({ class: "w-10/12" }), (theme as TextPlaceholderTheme)?.divWrapper)}>
41
- <div class={cn(lineB({ class: "h-2.5 w-32" }), (theme as TextPlaceholderTheme)?.lineB)}></div>
42
- <div class={cn(lineB({ class: "h-2.5 w-24" }), (theme as TextPlaceholderTheme)?.lineB)}></div>
43
- <div class={cn(lineA({ class: "h-2.5 w-full" }), (theme as TextPlaceholderTheme)?.lineA)}></div>
55
+ <div
56
+ class={divWrapper({
57
+ class: clsx("w-10/12", (theme as TextPlaceholderTheme)?.divWrapper)
58
+ })}
59
+ >
60
+ <div class={lineB({ class: clsx("h-2.5 w-32", (theme as TextPlaceholderTheme)?.lineB) })}></div>
61
+ <div class={lineB({ class: clsx("h-2.5 w-24", (theme as TextPlaceholderTheme)?.lineB) })}></div>
62
+ <div class={lineA({ class: clsx("h-2.5 w-full", (theme as TextPlaceholderTheme)?.lineA) })}></div>
44
63
  </div>
45
- <div class={cn(divWrapper({ class: "w-8/12" }), (theme as TextPlaceholderTheme)?.divWrapper)}>
46
- <div class={cn(lineB({ class: "h-2.5 w-full" }), (theme as TextPlaceholderTheme)?.lineB)}></div>
47
- <div class={cn(lineA({ class: "h-2.5 w-80" }), (theme as TextPlaceholderTheme)?.lineA)}></div>
48
- <div class={cn(lineB({ class: "h-2.5 w-full" }), (theme as TextPlaceholderTheme)?.lineB)}></div>
64
+ <div
65
+ class={divWrapper({
66
+ class: clsx("w-8/12", (theme as TextPlaceholderTheme)?.divWrapper)
67
+ })}
68
+ >
69
+ <div class={lineB({ class: clsx("h-2.5 w-full", (theme as TextPlaceholderTheme)?.lineB) })}></div>
70
+ <div class={lineA({ class: clsx("h-2.5 w-80", (theme as TextPlaceholderTheme)?.lineA) })}></div>
71
+ <div class={lineB({ class: clsx("h-2.5 w-full", (theme as TextPlaceholderTheme)?.lineB) })}></div>
49
72
  </div>
50
73
  <span class="sr-only">Loading...</span>
51
74
  </div>
@@ -2,17 +2,16 @@
2
2
  import clsx from "clsx";
3
3
  import { videoPlaceholder } from ".";
4
4
  import type { VideoPlaceholderProps } from "../types";
5
- import { cn } from "..";
6
5
  import { getTheme } from "../theme/themeUtils";
7
6
 
8
7
  let { size = "sm", class: className }: VideoPlaceholderProps = $props();
9
8
 
10
9
  const theme = getTheme("videoPlaceholder");
11
10
 
12
- const base = $derived(videoPlaceholder({ size }));
11
+ const base = $derived(videoPlaceholder({ size, class: clsx(theme, className) }));
13
12
  </script>
14
13
 
15
- <div role="status" class={cn(base, clsx(className), theme)}>
14
+ <div role="status" class={base}>
16
15
  <svg width="48" height="48" class="text-gray-200 dark:text-gray-600" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" viewBox="0 0 384 512">
17
16
  <path d="M361 215C375.3 223.8 384 239.3 384 256C384 272.7 375.3 288.2 361 296.1L73.03 472.1C58.21 482 39.66 482.4 24.52 473.9C9.377 465.4 0 449.4 0 432V80C0 62.64 9.377 46.63 24.52 38.13C39.66 29.64 58.21 29.99 73.03 39.04L361 215z"></path>
18
17
  </svg>