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.
- package/dist/accordion/Accordion.svelte +4 -4
- package/dist/accordion/AccordionItem.svelte +7 -6
- package/dist/accordion/theme.d.ts +3 -2
- package/dist/alert/Alert.svelte +10 -12
- package/dist/alert/theme.d.ts +2 -1
- package/dist/avatar/Avatar.svelte +9 -11
- package/dist/avatar/theme.d.ts +2 -1
- package/dist/badge/Badge.svelte +4 -3
- package/dist/badge/theme.d.ts +2 -1
- package/dist/banner/Banner.svelte +5 -4
- package/dist/banner/theme.d.ts +2 -1
- package/dist/bottom-navigation/BottomNav.svelte +3 -2
- package/dist/bottom-navigation/BottomNavHeader.svelte +4 -3
- package/dist/bottom-navigation/BottomNavHeaderItem.svelte +4 -3
- package/dist/bottom-navigation/BottomNavItem.svelte +4 -3
- package/dist/bottom-navigation/theme.d.ts +5 -4
- package/dist/breadcrumb/Breadcrumb.svelte +4 -3
- package/dist/breadcrumb/BreadcrumbItem.svelte +7 -6
- package/dist/breadcrumb/theme.d.ts +3 -2
- package/dist/button-group/ButtonGroup.svelte +3 -2
- package/dist/button-group/theme.d.ts +2 -1
- package/dist/buttons/Button.svelte +3 -2
- package/dist/buttons/GradientButton.svelte +5 -4
- package/dist/buttons/theme.d.ts +3 -2
- package/dist/card/Card.svelte +4 -4
- package/dist/card/theme.d.ts +2 -1
- package/dist/carousel/Carousel.svelte +5 -4
- package/dist/carousel/CarouselIndicators.svelte +4 -3
- package/dist/carousel/ControlButton.svelte +7 -4
- package/dist/carousel/Controls.svelte +4 -3
- package/dist/carousel/Slide.svelte +3 -2
- package/dist/carousel/Thumbnail.svelte +2 -2
- package/dist/carousel/Thumbnails.svelte +3 -3
- package/dist/carousel/theme.d.ts +20 -9
- package/dist/carousel/theme.js +4 -1
- package/dist/clipboard/Clipboard.svelte +2 -2
- package/dist/clipboard/theme.d.ts +2 -1
- package/dist/darkmode/DarkMode.svelte +3 -2
- package/dist/darkmode/theme.d.ts +2 -1
- package/dist/datepicker/Datepicker.svelte +27 -23
- package/dist/datepicker/theme.d.ts +1 -1
- package/dist/drawer/Drawer.svelte +4 -3
- package/dist/drawer/Drawerhead.svelte +5 -4
- package/dist/drawer/theme.d.ts +3 -2
- package/dist/dropdown/Dropdown.svelte +3 -2
- package/dist/dropdown/DropdownDivider.svelte +3 -2
- package/dist/dropdown/DropdownGroup.svelte +3 -2
- package/dist/dropdown/DropdownHeader.svelte +3 -2
- package/dist/dropdown/DropdownItem.svelte +4 -3
- package/dist/dropdown/theme.d.ts +6 -5
- package/dist/footer/Footer.svelte +4 -3
- package/dist/footer/FooterBrand.svelte +6 -5
- package/dist/footer/FooterCopyright.svelte +5 -4
- package/dist/footer/FooterIcon.svelte +3 -2
- package/dist/footer/FooterLink.svelte +4 -3
- package/dist/footer/FooterLinkGroup.svelte +3 -2
- package/dist/footer/theme.d.ts +7 -6
- package/dist/forms/button-toggle/ButtonToggle.svelte +7 -6
- package/dist/forms/button-toggle/ButtonToggleGroup.svelte +6 -5
- package/dist/forms/button-toggle/CheckIcon.svelte +3 -2
- package/dist/forms/button-toggle/theme.d.ts +5 -4
- package/dist/forms/checkbox/Checkbox.svelte +6 -5
- package/dist/forms/checkbox/CheckboxButton.svelte +3 -2
- package/dist/forms/checkbox/theme.d.ts +3 -2
- package/dist/forms/dropzone/Dropzone.svelte +3 -2
- package/dist/forms/dropzone/theme.d.ts +2 -1
- package/dist/forms/fileupload/Fileupload.svelte +5 -4
- package/dist/forms/fileupload/theme.d.ts +2 -1
- package/dist/forms/floating-label/FloatingLabelInput.svelte +7 -6
- package/dist/forms/floating-label/theme.d.ts +2 -1
- package/dist/forms/helper/Helper.svelte +3 -2
- package/dist/forms/helper/theme.d.ts +2 -1
- package/dist/forms/input-addon/InputAddon.svelte +3 -2
- package/dist/forms/input-field/Input.svelte +11 -10
- package/dist/forms/input-field/theme.d.ts +2 -1
- package/dist/forms/label/Label.svelte +3 -2
- package/dist/forms/label/theme.d.ts +2 -1
- package/dist/forms/phoneinput/PhoneInput.svelte +7 -7
- package/dist/forms/phoneinput/theme.d.ts +1 -1
- package/dist/forms/radio/Radio.svelte +4 -3
- package/dist/forms/radio/RadioButton.svelte +3 -2
- package/dist/forms/radio/theme.d.ts +3 -2
- package/dist/forms/range/Range.svelte +3 -2
- package/dist/forms/range/theme.d.ts +2 -1
- package/dist/forms/search/Search.svelte +8 -7
- package/dist/forms/search/theme.d.ts +2 -1
- package/dist/forms/select/MultiSelect.svelte +7 -6
- package/dist/forms/select/Select.svelte +5 -4
- package/dist/forms/select/theme.d.ts +3 -2
- package/dist/forms/tags/Tags.svelte +7 -6
- package/dist/forms/tags/theme.d.ts +2 -1
- package/dist/forms/textarea/Textarea.svelte +11 -10
- package/dist/forms/textarea/theme.d.ts +2 -1
- package/dist/forms/timepicker/Timepicker.svelte +38 -37
- package/dist/forms/timepicker/theme.d.ts +2 -1
- package/dist/forms/toggle/Toggle.svelte +5 -4
- package/dist/forms/toggle/theme.d.ts +2 -1
- package/dist/gallery/Gallery.svelte +4 -3
- package/dist/gallery/theme.d.ts +2 -1
- package/dist/indicator/Indicator.svelte +5 -3
- package/dist/indicator/theme.d.ts +2 -1
- package/dist/kbd/Kbd.svelte +3 -2
- package/dist/kbd/theme.d.ts +2 -1
- package/dist/list-group/Listgroup.svelte +6 -5
- package/dist/list-group/ListgroupItem.svelte +7 -6
- package/dist/list-group/theme.d.ts +3 -2
- package/dist/mega-menu/MegaMenu.svelte +6 -5
- package/dist/mega-menu/theme.d.ts +2 -1
- package/dist/modal/Modal.svelte +7 -7
- package/dist/modal/theme.d.ts +2 -1
- package/dist/navbar/Menu.svelte +1 -2
- package/dist/navbar/NavBrand.svelte +1 -2
- package/dist/navbar/NavContainer.svelte +1 -2
- package/dist/navbar/NavHamburger.svelte +2 -3
- package/dist/navbar/NavHamburger.svelte.d.ts +1 -2
- package/dist/navbar/NavLi.svelte +1 -2
- package/dist/navbar/NavUl.svelte +4 -5
- package/dist/navbar/Navbar.svelte +2 -2
- package/dist/navbar/theme.d.ts +6 -5
- package/dist/pagination/Pagination.svelte +2 -2
- package/dist/pagination/PaginationButton.svelte +10 -13
- package/dist/pagination/PaginationItem.svelte +1 -2
- package/dist/pagination/PaginationNav.svelte +7 -7
- package/dist/pagination/theme.d.ts +5 -4
- package/dist/popover/Popover.svelte +4 -5
- package/dist/popover/theme.d.ts +2 -1
- package/dist/progress/Progressbar.svelte +6 -7
- package/dist/progress/Progressradial.svelte +7 -8
- package/dist/progress/theme.d.ts +2 -2
- package/dist/rating/AdvancedRating.svelte +5 -6
- package/dist/rating/Rating.svelte +2 -3
- package/dist/rating/Review.svelte +7 -8
- package/dist/rating/ScoreRating.svelte +8 -8
- package/dist/rating/theme.d.ts +5 -4
- package/dist/sidebar/Sidebar.svelte +27 -62
- package/dist/sidebar/SidebarBrand.svelte +3 -4
- package/dist/sidebar/SidebarButton.svelte +1 -2
- package/dist/sidebar/SidebarCta.svelte +3 -4
- package/dist/sidebar/SidebarDropdownWrapper.svelte +6 -7
- package/dist/sidebar/SidebarItem.svelte +5 -4
- package/dist/sidebar/theme.d.ts +12 -23
- package/dist/sidebar/theme.js +6 -45
- package/dist/skeleton/CardPlaceholder.svelte +11 -12
- package/dist/skeleton/ImagePlaceholder.svelte +39 -12
- package/dist/skeleton/ListPlaceholder.svelte +26 -8
- package/dist/skeleton/Skeleton.svelte +24 -9
- package/dist/skeleton/TestimonialPlaceholder.svelte +27 -8
- package/dist/skeleton/TextPlaceholder.svelte +49 -26
- package/dist/skeleton/VideoPlaceholder.svelte +2 -3
- package/dist/skeleton/WidgetPlaceholder.svelte +1 -2
- package/dist/skeleton/theme.d.ts +9 -8
- package/dist/speed-dial/SpeedDial.svelte +3 -3
- package/dist/speed-dial/SpeedDialButton.svelte +3 -3
- package/dist/speed-dial/theme.d.ts +3 -2
- package/dist/spinner/Spinner.svelte +2 -3
- package/dist/spinner/theme.d.ts +2 -1
- package/dist/stepindicator/StepIndicator.svelte +10 -9
- package/dist/stepindicator/theme.d.ts +2 -1
- package/dist/stepper/BreadcrumbStepper.svelte +9 -10
- package/dist/stepper/DetailedStepper.svelte +4 -4
- package/dist/stepper/ProgressStepper.svelte +8 -11
- package/dist/stepper/Stepper.svelte +12 -18
- package/dist/stepper/TimelineStepper.svelte +4 -4
- package/dist/stepper/VerticalStepper.svelte +4 -4
- package/dist/table/Table.svelte +3 -3
- package/dist/table/TableBody.svelte +1 -2
- package/dist/table/TableBodyCell.svelte +1 -2
- package/dist/table/TableBodyRow.svelte +2 -3
- package/dist/table/TableHead.svelte +2 -3
- package/dist/table/TableHeadCell.svelte +1 -2
- package/dist/table/TableSearch.svelte +9 -9
- package/dist/table/theme.d.ts +6 -6
- package/dist/tabs/TabItem.svelte +5 -4
- package/dist/tabs/Tabs.svelte +3 -4
- package/dist/tabs/theme.d.ts +3 -2
- package/dist/timeline/Activity.svelte +1 -2
- package/dist/timeline/ActivityItem.svelte +9 -9
- package/dist/timeline/Group.svelte +4 -4
- package/dist/timeline/GroupItem.svelte +6 -6
- package/dist/timeline/Timeline.svelte +2 -3
- package/dist/timeline/TimelineItem.svelte +7 -7
- package/dist/timeline/theme.d.ts +7 -6
- package/dist/toast/Toast.svelte +5 -5
- package/dist/toast/theme.d.ts +2 -1
- package/dist/toolbar/Toolbar.svelte +2 -3
- package/dist/toolbar/ToolbarButton.svelte +4 -5
- package/dist/toolbar/ToolbarGroup.svelte +2 -3
- package/dist/toolbar/theme.d.ts +4 -3
- package/dist/tooltip/Tooltip.svelte +1 -2
- package/dist/tooltip/theme.d.ts +2 -1
- package/dist/types.d.ts +2 -3
- package/dist/typography/anchor/A.svelte +3 -4
- package/dist/typography/anchor/theme.d.ts +2 -1
- package/dist/typography/blockquote/Blockquote.svelte +3 -4
- package/dist/typography/blockquote/theme.d.ts +2 -1
- package/dist/typography/descriptionlist/DescriptionList.svelte +2 -3
- package/dist/typography/descriptionlist/theme.d.ts +2 -1
- package/dist/typography/heading/Heading.svelte +2 -3
- package/dist/typography/heading/theme.d.ts +2 -1
- package/dist/typography/hr/Hr.svelte +4 -5
- package/dist/typography/hr/theme.d.ts +2 -1
- package/dist/typography/img/EnhancedImg.svelte +4 -5
- package/dist/typography/img/Img.svelte +4 -5
- package/dist/typography/img/theme.d.ts +2 -1
- package/dist/typography/layout/Layout.svelte +2 -3
- package/dist/typography/layout/theme.d.ts +2 -1
- package/dist/typography/list/Li.svelte +1 -2
- package/dist/typography/list/List.svelte +2 -3
- package/dist/typography/list/theme.d.ts +2 -1
- package/dist/typography/mark/Mark.svelte +1 -1
- package/dist/typography/mark/theme.d.ts +2 -1
- package/dist/typography/paragraph/P.svelte +2 -3
- package/dist/typography/paragraph/theme.d.ts +2 -1
- package/dist/typography/secondary/Secondary.svelte +1 -2
- package/dist/typography/secondary/theme.d.ts +2 -1
- package/dist/typography/span/Span.svelte +2 -3
- package/dist/typography/span/theme.d.ts +2 -1
- package/dist/video/Video.svelte +2 -2
- 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={
|
|
56
|
-
<button {...restProps} onclick={handleDropdown} type="button" class={
|
|
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={
|
|
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={
|
|
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={
|
|
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={
|
|
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
|
|
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={
|
|
26
|
-
<a onclick={context.closeSidebar} {...restProps} {href} aria-current={(activeItem ?? sidebarUrl === href) ? "page" : undefined} class={
|
|
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={
|
|
31
|
+
<span class={clsx(spanClass)}>{label}</span>
|
|
31
32
|
{#if subtext}
|
|
32
33
|
{@render subtext()}
|
|
33
34
|
{/if}
|
package/dist/sidebar/theme.d.ts
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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,
|
|
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 =
|
|
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,
|
|
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,
|
|
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,
|
|
308
|
+
export type SidebarDropdownWrapperTheme = Partial<Record<SidebarDropdownWrapperSlots, ClassValue>>;
|
package/dist/sidebar/theme.js
CHANGED
|
@@ -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:
|
|
20
|
-
false:
|
|
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" } //
|
|
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
|
-
//
|
|
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"
|
|
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={
|
|
16
|
-
<div class={
|
|
17
|
-
<svg width="48" height="48" class={
|
|
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={
|
|
22
|
-
<div class={
|
|
23
|
-
<div class={
|
|
24
|
-
<div class={
|
|
25
|
-
<div class={
|
|
26
|
-
<svg class={
|
|
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={
|
|
30
|
-
<div class={
|
|
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={
|
|
21
|
-
<div class={
|
|
22
|
-
<svg width="48" height="48" class={
|
|
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={
|
|
28
|
-
<div
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
<div
|
|
34
|
-
|
|
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={
|
|
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
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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
|
|
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={
|
|
16
|
-
<div
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
<div
|
|
22
|
-
|
|
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={
|
|
16
|
-
<div
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
|
23
|
-
|
|
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={
|
|
20
|
-
<div
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
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
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
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={
|
|
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>
|