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
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type VariantProps } from "tailwind-variants";
|
|
2
|
+
import type { ClassValue } from "svelte/elements";
|
|
2
3
|
export type BlockquoteVariants = VariantProps<typeof blockquote>;
|
|
3
4
|
export declare const blockquote: import("tailwind-variants").TVReturnType<{
|
|
4
5
|
border: {
|
|
@@ -100,4 +101,4 @@ export declare const blockquote: import("tailwind-variants").TVReturnType<{
|
|
|
100
101
|
"9xl": string;
|
|
101
102
|
};
|
|
102
103
|
}, undefined, "font-semibold text-gray-900 dark:text-white", unknown, unknown, undefined>>;
|
|
103
|
-
export type BlockquoteTheme =
|
|
104
|
+
export type BlockquoteTheme = ClassValue;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import { descriptionList } from "./index";
|
|
4
4
|
import type { DescriptionListProps } from "../../types";
|
|
5
|
-
import { cn } from "../..";
|
|
6
5
|
import { getTheme } from "../../theme/themeUtils";
|
|
7
6
|
|
|
8
7
|
let { children, tag, class: className, ...restProps }: DescriptionListProps = $props();
|
|
@@ -12,12 +11,12 @@
|
|
|
12
11
|
let descCls = $derived(
|
|
13
12
|
descriptionList({
|
|
14
13
|
tag,
|
|
15
|
-
class: clsx(className)
|
|
14
|
+
class: clsx(theme, className)
|
|
16
15
|
})
|
|
17
16
|
);
|
|
18
17
|
</script>
|
|
19
18
|
|
|
20
|
-
<svelte:element this={tag} {...restProps} class={
|
|
19
|
+
<svelte:element this={tag} {...restProps} class={descCls}>
|
|
21
20
|
{@render children()}
|
|
22
21
|
</svelte:element>
|
|
23
22
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type VariantProps } from "tailwind-variants";
|
|
2
|
+
import type { ClassValue } from "svelte/elements";
|
|
2
3
|
export type DescriptionListVariants = VariantProps<typeof descriptionList>;
|
|
3
4
|
export declare const descriptionList: import("tailwind-variants").TVReturnType<{
|
|
4
5
|
tag: {
|
|
@@ -16,4 +17,4 @@ export declare const descriptionList: import("tailwind-variants").TVReturnType<{
|
|
|
16
17
|
dd: string;
|
|
17
18
|
};
|
|
18
19
|
}, undefined, undefined, unknown, unknown, undefined>>;
|
|
19
|
-
export type DescriptionListTheme =
|
|
20
|
+
export type DescriptionListTheme = ClassValue;
|
|
@@ -2,17 +2,16 @@
|
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import { heading } from "./index";
|
|
4
4
|
import type { HeadingProps } from "../../types";
|
|
5
|
-
import { cn } from "../..";
|
|
6
5
|
import { getTheme } from "../../theme/themeUtils";
|
|
7
6
|
|
|
8
7
|
let { children, tag = "h1", class: className, ...restProps }: HeadingProps = $props();
|
|
9
8
|
|
|
10
9
|
const theme = getTheme("heading");
|
|
11
10
|
|
|
12
|
-
let headingCls = $derived(heading({ tag, class: clsx(className) }));
|
|
11
|
+
let headingCls = $derived(heading({ tag, class: clsx(theme, className) }));
|
|
13
12
|
</script>
|
|
14
13
|
|
|
15
|
-
<svelte:element this={tag} {...restProps} class={
|
|
14
|
+
<svelte:element this={tag} {...restProps} class={headingCls}>
|
|
16
15
|
{@render children()}
|
|
17
16
|
</svelte:element>
|
|
18
17
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type VariantProps } from "tailwind-variants";
|
|
2
|
+
import type { ClassValue } from "svelte/elements";
|
|
2
3
|
export type HeadingVariants = VariantProps<typeof heading>;
|
|
3
4
|
export declare const heading: import("tailwind-variants").TVReturnType<{
|
|
4
5
|
tag: {
|
|
@@ -28,4 +29,4 @@ export declare const heading: import("tailwind-variants").TVReturnType<{
|
|
|
28
29
|
h6: string;
|
|
29
30
|
};
|
|
30
31
|
}, undefined, "font-bold text-gray-900 dark:text-white", unknown, unknown, undefined>>;
|
|
31
|
-
export type HeadingTheme =
|
|
32
|
+
export type HeadingTheme = ClassValue;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import { hr, type HrTheme } from "./index";
|
|
4
4
|
import type { HrProps } from "../../types";
|
|
5
|
-
import { cn } from "../..";
|
|
6
5
|
import { getTheme } from "../../theme/themeUtils";
|
|
7
6
|
|
|
8
7
|
let { children, divClass, class: className, innerDivClass, ...restProps }: HrProps = $props();
|
|
@@ -13,14 +12,14 @@
|
|
|
13
12
|
</script>
|
|
14
13
|
|
|
15
14
|
{#if children}
|
|
16
|
-
<div {...restProps} class={
|
|
17
|
-
<hr class={
|
|
18
|
-
<div class={
|
|
15
|
+
<div {...restProps} class={container({ class: clsx((theme as HrTheme)?.container, divClass) })}>
|
|
16
|
+
<hr class={base({ class: clsx((theme as HrTheme)?.base, className) })} />
|
|
17
|
+
<div class={content({ class: clsx((theme as HrTheme)?.content, innerDivClass) })}>
|
|
19
18
|
{@render children()}
|
|
20
19
|
</div>
|
|
21
20
|
</div>
|
|
22
21
|
{:else}
|
|
23
|
-
<hr class={
|
|
22
|
+
<hr class={base({ class: clsx((theme as HrTheme)?.base, className) })} {...restProps} />
|
|
24
23
|
{/if}
|
|
25
24
|
|
|
26
25
|
<!--
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ClassValue } from "svelte/elements";
|
|
1
2
|
export declare const hr: import("tailwind-variants").TVReturnType<{
|
|
2
3
|
withChildren: {
|
|
3
4
|
true: {
|
|
@@ -33,4 +34,4 @@ export declare const hr: import("tailwind-variants").TVReturnType<{
|
|
|
33
34
|
content: string;
|
|
34
35
|
}, undefined, unknown, unknown, undefined>>;
|
|
35
36
|
export type HrSlots = keyof typeof hr.slots;
|
|
36
|
-
export type HrTheme = Partial<Record<HrSlots,
|
|
37
|
+
export type HrTheme = Partial<Record<HrSlots, ClassValue>>;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import { img, type ImgTheme } from ".";
|
|
4
4
|
import type { EnhandedImgProps } from "../../types";
|
|
5
|
-
import { cn } from "../..";
|
|
6
5
|
import { getTheme } from "../../theme/themeUtils";
|
|
7
6
|
|
|
8
7
|
let { src, href, caption, size, figClass, class: imgClass, captionClass, ...restProps }: EnhandedImgProps = $props();
|
|
@@ -14,14 +13,14 @@
|
|
|
14
13
|
|
|
15
14
|
{#snippet imageSlot()}
|
|
16
15
|
{#if caption}
|
|
17
|
-
<figure class={
|
|
18
|
-
<enhanced:img {src} {...restProps} class={
|
|
19
|
-
<figcaption class={
|
|
16
|
+
<figure class={figure({ class: clsx((theme as ImgTheme)?.figure, figClass) })}>
|
|
17
|
+
<enhanced:img {src} {...restProps} class={base({ class: clsx((theme as ImgTheme)?.base, imgClass) })} />
|
|
18
|
+
<figcaption class={figureCaption({ class: clsx((theme as ImgTheme)?.figureCaption, captionClass) })}>
|
|
20
19
|
{@html caption}
|
|
21
20
|
</figcaption>
|
|
22
21
|
</figure>
|
|
23
22
|
{:else}
|
|
24
|
-
<enhanced:img {src} {...restProps} class={
|
|
23
|
+
<enhanced:img {src} {...restProps} class={base({ class: clsx((theme as ImgTheme)?.base, imgClass) })} />
|
|
25
24
|
{/if}
|
|
26
25
|
{/snippet}
|
|
27
26
|
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import { img, type ImgTheme } from ".";
|
|
4
4
|
import type { ImgProps } from "../../types";
|
|
5
|
-
import { cn } from "../..";
|
|
6
5
|
import { getTheme } from "../../theme/themeUtils";
|
|
7
6
|
|
|
8
7
|
let { size = "none", effect = "none", caption, class: imgClass, figClass, captionClass, href, ...restProps }: ImgProps = $props();
|
|
@@ -14,14 +13,14 @@
|
|
|
14
13
|
|
|
15
14
|
{#snippet imageSlot()}
|
|
16
15
|
{#if caption}
|
|
17
|
-
<figure class={
|
|
18
|
-
<img {...restProps} class={
|
|
19
|
-
<figcaption class={
|
|
16
|
+
<figure class={figure({ class: clsx((theme as ImgTheme)?.figure, figClass) })}>
|
|
17
|
+
<img {...restProps} class={base({ class: clsx((theme as ImgTheme)?.base, imgClass) })} />
|
|
18
|
+
<figcaption class={figureCaption({ class: clsx((theme as ImgTheme)?.figureCaption, captionClass) })}>
|
|
20
19
|
{@html caption}
|
|
21
20
|
</figcaption>
|
|
22
21
|
</figure>
|
|
23
22
|
{:else}
|
|
24
|
-
<img {...restProps} class={
|
|
23
|
+
<img {...restProps} class={base({ class: clsx((theme as ImgTheme)?.base, imgClass) })} />
|
|
25
24
|
{/if}
|
|
26
25
|
{/snippet}
|
|
27
26
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type VariantProps } from "tailwind-variants";
|
|
2
|
+
import type { ClassValue } from "svelte/elements";
|
|
2
3
|
export type ImgVariants = VariantProps<typeof img>;
|
|
3
4
|
export declare const img: import("tailwind-variants").TVReturnType<{
|
|
4
5
|
size: {
|
|
@@ -188,4 +189,4 @@ export declare const img: import("tailwind-variants").TVReturnType<{
|
|
|
188
189
|
figureCaption: string;
|
|
189
190
|
}, undefined, unknown, unknown, undefined>>;
|
|
190
191
|
export type ImgSlots = keyof typeof img.slots;
|
|
191
|
-
export type ImgTheme = Partial<Record<ImgSlots,
|
|
192
|
+
export type ImgTheme = Partial<Record<ImgSlots, ClassValue>>;
|
|
@@ -2,17 +2,16 @@
|
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import { layout } from "./index";
|
|
4
4
|
import type { LayoutProps } from "../../types";
|
|
5
|
-
import { cn } from "../..";
|
|
6
5
|
import { getTheme } from "../../theme/themeUtils";
|
|
7
6
|
|
|
8
7
|
let { children, class: className, ...restProps }: LayoutProps = $props();
|
|
9
8
|
|
|
10
9
|
const theme = getTheme("layout");
|
|
11
10
|
|
|
12
|
-
let
|
|
11
|
+
let divCls = $derived(layout({ class: clsx(theme, className) }));
|
|
13
12
|
</script>
|
|
14
13
|
|
|
15
|
-
<div {...restProps} class={
|
|
14
|
+
<div {...restProps} class={divCls}>
|
|
16
15
|
{@render children()}
|
|
17
16
|
</div>
|
|
18
17
|
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import type { ClassValue } from "svelte/elements";
|
|
1
2
|
export declare const layout: import("tailwind-variants").TVReturnType<{} | {} | {}, undefined, "grid grid-cols-1 sm:grid-cols-2", {} | {}, undefined, import("tailwind-variants").TVReturnType<unknown, undefined, "grid grid-cols-1 sm:grid-cols-2", unknown, unknown, undefined>>;
|
|
2
|
-
export type LayoutTheme =
|
|
3
|
+
export type LayoutTheme = ClassValue;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import { getContext } from "svelte";
|
|
3
3
|
import type { LiProps } from "../../types";
|
|
4
4
|
import clsx from "clsx";
|
|
5
|
-
import { cn } from "../..";
|
|
6
5
|
import { getTheme } from "../../theme/themeUtils";
|
|
7
6
|
|
|
8
7
|
let { children, icon, class: className, ...restProps }: LiProps = $props();
|
|
@@ -11,7 +10,7 @@
|
|
|
11
10
|
|
|
12
11
|
const getCtxClass = getContext<() => string>("ctxClass");
|
|
13
12
|
|
|
14
|
-
let liCls = $derived(
|
|
13
|
+
let liCls = $derived(clsx(getCtxClass(), icon && "flex items-center", theme, className));
|
|
15
14
|
</script>
|
|
16
15
|
|
|
17
16
|
<li {...restProps} class={liCls}>
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
import { list } from "./index";
|
|
4
4
|
import type { ListProps } from "../../types";
|
|
5
5
|
import clsx from "clsx";
|
|
6
|
-
import { cn } from "../..";
|
|
7
6
|
import { getTheme } from "../../theme/themeUtils";
|
|
8
7
|
|
|
9
8
|
let { children, tag = "ul", isContenteditable = false, position = "inside", ctxClass, class: className, ...restProps }: ListProps = $props();
|
|
@@ -18,10 +17,10 @@
|
|
|
18
17
|
contextClass = ctxClass || "";
|
|
19
18
|
});
|
|
20
19
|
|
|
21
|
-
let classList = $derived(list({ position, tag, class: clsx(className) }));
|
|
20
|
+
let classList = $derived(list({ position, tag, class: clsx(theme, className) }));
|
|
22
21
|
</script>
|
|
23
22
|
|
|
24
|
-
<svelte:element this={tag} {...restProps} class={
|
|
23
|
+
<svelte:element this={tag} {...restProps} class={classList} contenteditable={isContenteditable}>
|
|
25
24
|
{@render children()}
|
|
26
25
|
</svelte:element>
|
|
27
26
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type VariantProps } from "tailwind-variants";
|
|
2
|
+
import type { ClassValue } from "svelte/elements";
|
|
2
3
|
export type ListVariants = VariantProps<typeof list>;
|
|
3
4
|
export declare const list: import("tailwind-variants").TVReturnType<{
|
|
4
5
|
tag: {
|
|
@@ -31,4 +32,4 @@ export declare const list: import("tailwind-variants").TVReturnType<{
|
|
|
31
32
|
outside: string;
|
|
32
33
|
};
|
|
33
34
|
}, undefined, "", unknown, unknown, undefined>>;
|
|
34
|
-
export type ListTheme =
|
|
35
|
+
export type ListTheme = ClassValue;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import type { ClassValue } from "svelte/elements";
|
|
1
2
|
export declare const mark: import("tailwind-variants").TVReturnType<{} | {} | {}, undefined, "text-white dark:bg-blue-500 bg-blue-600 px-2 rounded-sm", {} | {}, undefined, import("tailwind-variants").TVReturnType<unknown, undefined, "text-white dark:bg-blue-500 bg-blue-600 px-2 rounded-sm", unknown, unknown, undefined>>;
|
|
2
|
-
export type MarkTheme =
|
|
3
|
+
export type MarkTheme = ClassValue;
|
|
@@ -2,17 +2,16 @@
|
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import { paragraph } from "./index";
|
|
4
4
|
import type { ParagraphProps } from "../../types";
|
|
5
|
-
import { cn } from "../..";
|
|
6
5
|
import { getTheme } from "../../theme/themeUtils";
|
|
7
6
|
|
|
8
7
|
let { children, class: className = "text-gray-900 dark:text-white", height = "normal", align = "left", justify = false, italic, firstUpper = false, whitespace = "normal", size = "base", space = "normal", weight = "normal", ...restProps }: ParagraphProps = $props();
|
|
9
8
|
|
|
10
9
|
const theme = getTheme("p");
|
|
11
10
|
|
|
12
|
-
let classP = $derived(paragraph({ height, size, weight, space, align, justify, italic, firstUpper, whitespace, class: clsx(className) }));
|
|
11
|
+
let classP = $derived(paragraph({ height, size, weight, space, align, justify, italic, firstUpper, whitespace, class: clsx(theme, className) }));
|
|
13
12
|
</script>
|
|
14
13
|
|
|
15
|
-
<p {...restProps} class={
|
|
14
|
+
<p {...restProps} class={classP}>
|
|
16
15
|
{@render children()}
|
|
17
16
|
</p>
|
|
18
17
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type VariantProps } from "tailwind-variants";
|
|
2
|
+
import type { ClassValue } from "svelte/elements";
|
|
2
3
|
export type ParagraphVariants = VariantProps<typeof paragraph>;
|
|
3
4
|
export declare const paragraph: import("tailwind-variants").TVReturnType<{
|
|
4
5
|
size: {
|
|
@@ -223,4 +224,4 @@ export declare const paragraph: import("tailwind-variants").TVReturnType<{
|
|
|
223
224
|
false: string;
|
|
224
225
|
};
|
|
225
226
|
}, undefined, "text-gray-900 dark:text-white", unknown, unknown, undefined>>;
|
|
226
|
-
export type ParagraphTheme =
|
|
227
|
+
export type ParagraphTheme = ClassValue;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import { secondary } from "./index";
|
|
4
4
|
import type { SecondaryProps } from "../../types";
|
|
5
|
-
import { cn } from "../..";
|
|
6
5
|
import { getTheme } from "../../theme/themeUtils";
|
|
7
6
|
|
|
8
7
|
let { children, class: className, ...restProps }: SecondaryProps = $props();
|
|
@@ -10,7 +9,7 @@
|
|
|
10
9
|
const theme = getTheme("secondary");
|
|
11
10
|
</script>
|
|
12
11
|
|
|
13
|
-
<small {...restProps} class={
|
|
12
|
+
<small {...restProps} class={secondary({ class: clsx(theme, className) })}>
|
|
14
13
|
{@render children()}
|
|
15
14
|
</small>
|
|
16
15
|
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import type { ClassValue } from "svelte/elements";
|
|
1
2
|
export declare const secondary: import("tailwind-variants").TVReturnType<{} | {} | {}, undefined, "text-gray-500 dark:text-gray-400 font-semibold", {} | {}, undefined, import("tailwind-variants").TVReturnType<unknown, undefined, "text-gray-500 dark:text-gray-400 font-semibold", unknown, unknown, undefined>>;
|
|
2
|
-
export type SecondaryTheme =
|
|
3
|
+
export type SecondaryTheme = ClassValue;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import { span } from "./index";
|
|
4
4
|
import type { SpanProps } from "../../types";
|
|
5
|
-
import { cn } from "../..";
|
|
6
5
|
import { getTheme } from "../../theme/themeUtils";
|
|
7
6
|
|
|
8
7
|
let { children, class: className, italic, underline, linethrough, uppercase, gradient, highlight, decoration, decorationColor, decorationThickness, ...restProps }: SpanProps = $props();
|
|
@@ -20,12 +19,12 @@
|
|
|
20
19
|
decoration,
|
|
21
20
|
decorationColor,
|
|
22
21
|
decorationThickness,
|
|
23
|
-
class: clsx(className)
|
|
22
|
+
class: clsx(theme, className)
|
|
24
23
|
})
|
|
25
24
|
);
|
|
26
25
|
</script>
|
|
27
26
|
|
|
28
|
-
<span {...restProps} class={
|
|
27
|
+
<span {...restProps} class={classSpan}>
|
|
29
28
|
{#if children}
|
|
30
29
|
{@render children()}
|
|
31
30
|
{/if}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type VariantProps } from "tailwind-variants";
|
|
2
|
+
import type { ClassValue } from "svelte/elements";
|
|
2
3
|
export type SpanVariants = VariantProps<typeof span>;
|
|
3
4
|
export declare const span: import("tailwind-variants").TVReturnType<{
|
|
4
5
|
italic: {
|
|
@@ -244,4 +245,4 @@ export declare const span: import("tailwind-variants").TVReturnType<{
|
|
|
244
245
|
"0": string;
|
|
245
246
|
};
|
|
246
247
|
}, undefined, undefined, unknown, unknown, undefined>>;
|
|
247
|
-
export type SpanTheme =
|
|
248
|
+
export type SpanTheme = ClassValue;
|
package/dist/video/Video.svelte
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { VideoProps } from "../types";
|
|
3
|
-
import
|
|
3
|
+
import clsx from "clsx";
|
|
4
4
|
import { getTheme } from "../theme/themeUtils";
|
|
5
5
|
|
|
6
6
|
let { children, type = "video/mp4", trackSrc, src, srclang = "en", label = "english_captions", class: classname, ...restProps }: VideoProps = $props();
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
const theme = getTheme("span");
|
|
9
9
|
</script>
|
|
10
10
|
|
|
11
|
-
<video {...restProps} class={
|
|
11
|
+
<video {...restProps} class={clsx(theme, classname)}>
|
|
12
12
|
<source {src} {type} />
|
|
13
13
|
{#if children}
|
|
14
14
|
{@render children()}
|