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
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import { widgetPlaceholder, type WidgetPlaceholderTheme } from ".";
|
|
3
3
|
import clsx from "clsx";
|
|
4
4
|
import { type WidgetPlaceholderProps } from "..";
|
|
5
|
-
import { cn } from "..";
|
|
6
5
|
import { getTheme } from "../theme/themeUtils";
|
|
7
6
|
|
|
8
7
|
let { class: className }: WidgetPlaceholderProps = $props();
|
|
@@ -12,7 +11,7 @@
|
|
|
12
11
|
const { base, wrapper, vLine, hLine } = widgetPlaceholder({});
|
|
13
12
|
</script>
|
|
14
13
|
|
|
15
|
-
<div role="status" class={
|
|
14
|
+
<div role="status" class={base({ class: clsx((theme as WidgetPlaceholderTheme)?.base, className) })}>
|
|
16
15
|
<div class={hLine({ class: "mb-2.5 h-2.5 w-32" })}></div>
|
|
17
16
|
<div class={hLine({ class: "mb-10 h-2 w-48" })}></div>
|
|
18
17
|
<div class={wrapper()}>
|
package/dist/skeleton/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 CardPlaceholderVariants = VariantProps<typeof cardPlaceholder>;
|
|
3
4
|
export declare const cardPlaceholder: import("tailwind-variants").TVReturnType<{
|
|
4
5
|
size: {
|
|
@@ -74,7 +75,7 @@ export declare const cardPlaceholder: import("tailwind-variants").TVReturnType<{
|
|
|
74
75
|
footerArea: string;
|
|
75
76
|
}, undefined, unknown, unknown, undefined>>;
|
|
76
77
|
export type CardPlaceholderSlots = keyof typeof cardPlaceholder.slots;
|
|
77
|
-
export type CardPlaceholderTheme = Partial<Record<CardPlaceholderSlots,
|
|
78
|
+
export type CardPlaceholderTheme = Partial<Record<CardPlaceholderSlots, ClassValue>>;
|
|
78
79
|
export type ImagePlaceholderVariants = VariantProps<typeof imagePlaceholder>;
|
|
79
80
|
export declare const imagePlaceholder: import("tailwind-variants").TVReturnType<{
|
|
80
81
|
size: {
|
|
@@ -207,7 +208,7 @@ export declare const imagePlaceholder: import("tailwind-variants").TVReturnType<
|
|
|
207
208
|
line: string;
|
|
208
209
|
}, undefined, unknown, unknown, undefined>>;
|
|
209
210
|
export type ImagePlaceholderSlots = keyof typeof imagePlaceholder.slots;
|
|
210
|
-
export type ImagePlaceholderTheme = Partial<Record<ImagePlaceholderSlots,
|
|
211
|
+
export type ImagePlaceholderTheme = Partial<Record<ImagePlaceholderSlots, ClassValue>>;
|
|
211
212
|
export type ListPlaceholderVariants = VariantProps<typeof listPlaceholder>;
|
|
212
213
|
export declare const listPlaceholder: import("tailwind-variants").TVReturnType<{
|
|
213
214
|
size: {
|
|
@@ -331,7 +332,7 @@ export declare const listPlaceholder: import("tailwind-variants").TVReturnType<{
|
|
|
331
332
|
itemExtra: string;
|
|
332
333
|
}, undefined, unknown, unknown, undefined>>;
|
|
333
334
|
export type ListPlaceholderSlots = keyof typeof listPlaceholder.slots;
|
|
334
|
-
export type ListPlaceholderTheme = Partial<Record<ListPlaceholderSlots,
|
|
335
|
+
export type ListPlaceholderTheme = Partial<Record<ListPlaceholderSlots, ClassValue>>;
|
|
335
336
|
export type SkeletonVariants = VariantProps<typeof skeleton>;
|
|
336
337
|
export declare const skeleton: import("tailwind-variants").TVReturnType<{
|
|
337
338
|
size: {
|
|
@@ -398,7 +399,7 @@ export declare const skeleton: import("tailwind-variants").TVReturnType<{
|
|
|
398
399
|
line: string;
|
|
399
400
|
}, undefined, unknown, unknown, undefined>>;
|
|
400
401
|
export type SkeletonSlots = keyof typeof skeleton.slots;
|
|
401
|
-
export type SkeletonTheme = Partial<Record<SkeletonSlots,
|
|
402
|
+
export type SkeletonTheme = Partial<Record<SkeletonSlots, ClassValue>>;
|
|
402
403
|
export declare const testimonialPlaceholder: import("tailwind-variants").TVReturnType<{
|
|
403
404
|
[key: string]: {
|
|
404
405
|
[key: string]: import("tailwind-variants").ClassValue | {
|
|
@@ -449,7 +450,7 @@ export declare const testimonialPlaceholder: import("tailwind-variants").TVRetur
|
|
|
449
450
|
subContent: string;
|
|
450
451
|
}, undefined, unknown, unknown, undefined>>;
|
|
451
452
|
export type TestimonialPlaceholderSlots = keyof typeof testimonialPlaceholder.slots;
|
|
452
|
-
export type TestimonialPlaceholderTheme = Partial<Record<TestimonialPlaceholderSlots,
|
|
453
|
+
export type TestimonialPlaceholderTheme = Partial<Record<TestimonialPlaceholderSlots, ClassValue>>;
|
|
453
454
|
export type TextPlaceholderVariants = VariantProps<typeof textPlaceholder>;
|
|
454
455
|
export declare const textPlaceholder: import("tailwind-variants").TVReturnType<{
|
|
455
456
|
size: {
|
|
@@ -522,7 +523,7 @@ export declare const textPlaceholder: import("tailwind-variants").TVReturnType<{
|
|
|
522
523
|
lineB: string;
|
|
523
524
|
}, undefined, unknown, unknown, undefined>>;
|
|
524
525
|
export type TextPlaceholderSlots = keyof typeof textPlaceholder.slots;
|
|
525
|
-
export type TextPlaceholderTheme = Partial<Record<TextPlaceholderSlots,
|
|
526
|
+
export type TextPlaceholderTheme = Partial<Record<TextPlaceholderSlots, ClassValue>>;
|
|
526
527
|
export type VideoPlaceholderVariants = VariantProps<typeof videoPlaceholder>;
|
|
527
528
|
export declare const videoPlaceholder: import("tailwind-variants").TVReturnType<{
|
|
528
529
|
size: {
|
|
@@ -549,7 +550,7 @@ export declare const videoPlaceholder: import("tailwind-variants").TVReturnType<
|
|
|
549
550
|
"2xl": string;
|
|
550
551
|
};
|
|
551
552
|
}, undefined, "flex justify-center items-center h-56 bg-gray-300 rounded-lg animate-pulse dark:bg-gray-700", unknown, unknown, undefined>>;
|
|
552
|
-
export type VideoPlaceholderTheme =
|
|
553
|
+
export type VideoPlaceholderTheme = ClassValue;
|
|
553
554
|
export declare const widgetPlaceholder: import("tailwind-variants").TVReturnType<{
|
|
554
555
|
[key: string]: {
|
|
555
556
|
[key: string]: import("tailwind-variants").ClassValue | {
|
|
@@ -594,4 +595,4 @@ export declare const widgetPlaceholder: import("tailwind-variants").TVReturnType
|
|
|
594
595
|
vLine: string;
|
|
595
596
|
}, undefined, unknown, unknown, undefined>>;
|
|
596
597
|
export type WidgetPlaceholderSlots = keyof typeof widgetPlaceholder.slots;
|
|
597
|
-
export type WidgetPlaceholderTheme = Partial<Record<WidgetPlaceholderSlots,
|
|
598
|
+
export type WidgetPlaceholderTheme = Partial<Record<WidgetPlaceholderSlots, ClassValue>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import clsx from "clsx";
|
|
3
|
-
import { Popper
|
|
3
|
+
import { Popper } from "..";
|
|
4
4
|
import { getSideAxis } from "@floating-ui/utils";
|
|
5
5
|
import { setContext } from "svelte";
|
|
6
6
|
import { speedDial, type SpeedDialTheme } from "./theme";
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
let { base, popper } = $derived(speedDial({ vertical }));
|
|
19
19
|
</script>
|
|
20
20
|
|
|
21
|
-
<Popper {...restProps} bind:isOpen {trigger} arrow={false} {placement} class={
|
|
22
|
-
<div class={
|
|
21
|
+
<Popper {...restProps} bind:isOpen {trigger} arrow={false} {placement} class={base({ class: clsx((theme as SpeedDialTheme)?.base, className) })}>
|
|
22
|
+
<div class={popper({ class: clsx((theme as SpeedDialTheme)?.popper, popperClass) })}>
|
|
23
23
|
{@render children()}
|
|
24
24
|
</div>
|
|
25
25
|
</Popper>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { Button, Tooltip
|
|
2
|
+
import { Button, Tooltip } from "..";
|
|
3
3
|
import { getContext } from "svelte";
|
|
4
4
|
import { speedDialButton, type SpeedDialButtonTheme } from "./theme";
|
|
5
5
|
import type { SpeedCtxType, SpeedDialButtonProps } from "../types";
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
const theme = getTheme("speedDialButton");
|
|
14
14
|
|
|
15
15
|
let { base, span } = $derived(speedDialButton({ textOutside, tooltip: tooltip == "none" }));
|
|
16
|
-
let spanClass = $derived(tooltip === "none" ?
|
|
16
|
+
let spanClass = $derived(tooltip === "none" ? span({ class: clsx((theme as SpeedDialButtonTheme)?.span, textClass) }) : "sr-only");
|
|
17
17
|
</script>
|
|
18
18
|
|
|
19
|
-
<Button {pill} {color} {...restProps} class={
|
|
19
|
+
<Button {pill} {color} {...restProps} class={base({ class: clsx((theme as SpeedDialButtonTheme)?.base, className) })}>
|
|
20
20
|
{@render children?.()}
|
|
21
21
|
<span class={spanClass}>{name}</span>
|
|
22
22
|
</Button>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type VariantProps } from "tailwind-variants";
|
|
2
|
+
import type { ClassValue } from "svelte/elements";
|
|
2
3
|
export type SpeedDialVariants = VariantProps<typeof speedDial>;
|
|
3
4
|
export declare const speedDial: import("tailwind-variants").TVReturnType<{
|
|
4
5
|
vertical: {
|
|
@@ -29,7 +30,7 @@ export declare const speedDial: import("tailwind-variants").TVReturnType<{
|
|
|
29
30
|
popper: string;
|
|
30
31
|
}, undefined, unknown, unknown, undefined>>;
|
|
31
32
|
export type SpeedDialSlots = keyof typeof speedDial.slots;
|
|
32
|
-
export type SpeedDialTheme = Partial<Record<SpeedDialSlots,
|
|
33
|
+
export type SpeedDialTheme = Partial<Record<SpeedDialSlots, ClassValue>>;
|
|
33
34
|
export type SpeedDialButtonVariants = VariantProps<typeof speedDialButton>;
|
|
34
35
|
export declare const speedDialButton: import("tailwind-variants").TVReturnType<{
|
|
35
36
|
textOutside: {
|
|
@@ -78,4 +79,4 @@ export declare const speedDialButton: import("tailwind-variants").TVReturnType<{
|
|
|
78
79
|
span: string;
|
|
79
80
|
}, undefined, unknown, unknown, undefined>>;
|
|
80
81
|
export type SpeedDialButtonSlots = keyof typeof speedDialButton.slots;
|
|
81
|
-
export type SpeedDialButtonTheme = Partial<Record<SpeedDialButtonSlots,
|
|
82
|
+
export type SpeedDialButtonTheme = Partial<Record<SpeedDialButtonSlots, ClassValue>>;
|
|
@@ -2,17 +2,16 @@
|
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import { spinner } from ".";
|
|
4
4
|
import type { SpinnerProps } from "../types";
|
|
5
|
-
import { cn } from "..";
|
|
6
5
|
import { getTheme } from "../theme/themeUtils";
|
|
7
6
|
|
|
8
7
|
let { color = "primary", size = "8", class: className, currentFill = "currentFill", currentColor = "currentColor", ...restProps }: SpinnerProps = $props();
|
|
9
8
|
|
|
10
9
|
const theme = getTheme("spinner");
|
|
11
10
|
|
|
12
|
-
let spinnerClass = $derived(spinner({ color, size }));
|
|
11
|
+
let spinnerClass = $derived(spinner({ color, size, class: clsx(theme, className) }));
|
|
13
12
|
</script>
|
|
14
13
|
|
|
15
|
-
<svg {...restProps} role="status" class={
|
|
14
|
+
<svg {...restProps} role="status" class={spinnerClass} viewBox="0 0 100 101" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
16
15
|
<path d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z" fill={currentColor} />
|
|
17
16
|
<path d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z" fill={currentFill} />
|
|
18
17
|
</svg>
|
package/dist/spinner/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 SpinnerVaraiants = VariantProps<typeof spinner>;
|
|
3
4
|
export declare const spinner: import("tailwind-variants").TVReturnType<{
|
|
4
5
|
color: {
|
|
@@ -97,4 +98,4 @@ export declare const spinner: import("tailwind-variants").TVReturnType<{
|
|
|
97
98
|
"16": string;
|
|
98
99
|
};
|
|
99
100
|
}, undefined, "inline-block animate-spin text-gray-300", unknown, unknown, undefined>>;
|
|
100
|
-
export type SpinnerTheme =
|
|
101
|
+
export type SpinnerTheme = ClassValue;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import
|
|
2
|
+
import clsx from "clsx";
|
|
3
|
+
import { type StepIndicatorProps } from "..";
|
|
3
4
|
import { stepIndicator, getStepStateClasses, type StepIndicatorTheme } from ".";
|
|
4
5
|
import { getTheme } from "../theme/themeUtils";
|
|
5
6
|
|
|
@@ -26,24 +27,24 @@
|
|
|
26
27
|
};
|
|
27
28
|
</script>
|
|
28
29
|
|
|
29
|
-
<div {...restProps} class={
|
|
30
|
+
<div {...restProps} class={style.base({ class: clsx((theme as StepIndicatorTheme)?.base, className) })}>
|
|
30
31
|
{#if !hideLabel}
|
|
31
|
-
<h3 class={
|
|
32
|
+
<h3 class={style.label({ class: clsx((theme as StepIndicatorTheme)?.label) })}>{currentStepLabel}</h3>
|
|
32
33
|
{/if}
|
|
33
34
|
|
|
34
|
-
<div class={
|
|
35
|
+
<div class={style.container({ class: clsx((theme as StepIndicatorTheme)?.container) })}>
|
|
35
36
|
{#each steps as step, i}
|
|
36
37
|
{#if i === currentStep - 1}
|
|
37
|
-
<div class={
|
|
38
|
-
<div class={
|
|
38
|
+
<div class={style.stepWrapper({ class: clsx((theme as StepIndicatorTheme)?.stepWrapper) })}>
|
|
39
|
+
<div class={style.step({ class: clsx(getStepStateClasses(i, currentStep), getCustomStepClass(i), (theme as StepIndicatorTheme)?.step) })} data-state="current"></div>
|
|
39
40
|
{#if glow}
|
|
40
|
-
<div class={
|
|
41
|
+
<div class={style.stepGlow({ class: clsx(getCustomStepClass(i), (theme as StepIndicatorTheme)?.stepGlow) })}></div>
|
|
41
42
|
{/if}
|
|
42
43
|
</div>
|
|
43
44
|
{:else if i < currentStep - 1}
|
|
44
|
-
<div class={
|
|
45
|
+
<div class={style.step({ class: clsx(getStepStateClasses(i, currentStep), getCustomStepClass(i), (theme as StepIndicatorTheme)?.step) })} data-state="completed"></div>
|
|
45
46
|
{:else}
|
|
46
|
-
<div class={
|
|
47
|
+
<div class={style.incompleteStep({ class: clsx((theme as StepIndicatorTheme)?.incompleteStep) })} data-state="incomplete"></div>
|
|
47
48
|
{/if}
|
|
48
49
|
{/each}
|
|
49
50
|
</div>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type VariantProps } from "tailwind-variants";
|
|
2
|
+
import type { ClassValue } from "svelte/elements";
|
|
2
3
|
export type StepIndicatorVariants = VariantProps<typeof stepIndicator>;
|
|
3
4
|
export declare const stepIndicator: import("tailwind-variants").TVReturnType<{
|
|
4
5
|
size: {
|
|
@@ -242,5 +243,5 @@ export declare const stepIndicator: import("tailwind-variants").TVReturnType<{
|
|
|
242
243
|
incompleteStep: string;
|
|
243
244
|
}, undefined, unknown, unknown, undefined>>;
|
|
244
245
|
export type StepIndicatorSlots = keyof typeof stepIndicator.slots;
|
|
245
|
-
export type StepIndicatorTheme = Partial<Record<StepIndicatorSlots,
|
|
246
|
+
export type StepIndicatorTheme = Partial<Record<StepIndicatorSlots, ClassValue>>;
|
|
246
247
|
export declare const getStepStateClasses: (stepIndex: number, currentStep: number) => "data-[state=current]" | "data-[state=completed]" | "data-[state=incomplete]";
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { setContext } from "svelte";
|
|
3
3
|
import { breadcrumbStepper, type BreadcrumbStepperTheme } from ".";
|
|
4
|
-
import
|
|
4
|
+
import clsx from "clsx";
|
|
5
|
+
import { type BreadcrumbStepperProps } from "..";
|
|
5
6
|
import { getTheme } from "../theme/themeUtils";
|
|
6
7
|
|
|
7
8
|
let { children, steps = [], classes, ...restProps }: BreadcrumbStepperProps = $props();
|
|
@@ -10,7 +11,7 @@
|
|
|
10
11
|
|
|
11
12
|
setContext("stepperType", "breadcrumb");
|
|
12
13
|
|
|
13
|
-
const base =
|
|
14
|
+
const base = breadcrumbStepper.stepper({ class: clsx((theme as BreadcrumbStepperTheme)?.stepper) });
|
|
14
15
|
</script>
|
|
15
16
|
|
|
16
17
|
<ol class={base} {...restProps}>
|
|
@@ -19,15 +20,13 @@
|
|
|
19
20
|
{:else if steps}
|
|
20
21
|
{#each steps as step, index}
|
|
21
22
|
<li
|
|
22
|
-
class={
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
(theme as BreadcrumbStepperTheme)?.item
|
|
28
|
-
)}
|
|
23
|
+
class={breadcrumbStepper.item({
|
|
24
|
+
status: step.status,
|
|
25
|
+
hasChevron: index < steps.length - 1,
|
|
26
|
+
class: clsx((theme as BreadcrumbStepperTheme)?.item)
|
|
27
|
+
})}
|
|
29
28
|
>
|
|
30
|
-
<span class={
|
|
29
|
+
<span class={breadcrumbStepper.indicator({ status: step.status, class: clsx((theme as BreadcrumbStepperTheme)?.indicator) })}>
|
|
31
30
|
{#if step.status === "completed" && step.icon}
|
|
32
31
|
<step.icon class={step.iconClass || "h-3 w-3"} />
|
|
33
32
|
{:else}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { setContext } from "svelte";
|
|
3
3
|
import { detailedStepper, type DetailedStepperTheme } from ".";
|
|
4
|
-
import { type DetailedStepperProps
|
|
4
|
+
import { type DetailedStepperProps } from "..";
|
|
5
5
|
import clsx from "clsx";
|
|
6
6
|
import { getTheme } from "../theme/themeUtils";
|
|
7
7
|
|
|
@@ -12,13 +12,13 @@
|
|
|
12
12
|
setContext("stepperType", "detailed");
|
|
13
13
|
</script>
|
|
14
14
|
|
|
15
|
-
<ol class={
|
|
15
|
+
<ol class={detailedStepper.stepper({ class: clsx((theme as DetailedStepperTheme)?.stepper, classes?.detailedstepper) })} {...restrorps}>
|
|
16
16
|
{#if children}
|
|
17
17
|
{@render children()}
|
|
18
18
|
{:else if steps}
|
|
19
19
|
{#each steps as step, index}
|
|
20
|
-
<li class={
|
|
21
|
-
<span class={
|
|
20
|
+
<li class={detailedStepper.item({ status: step.status, class: clsx((theme as DetailedStepperTheme)?.item, classes?.detailedstepperitem) })}>
|
|
21
|
+
<span class={detailedStepper.indicator({ status: step.status, class: clsx((theme as DetailedStepperTheme)?.indicator, classes?.detailedstepperindicator) })}>
|
|
22
22
|
{#if step.status === "completed" && step.icon}
|
|
23
23
|
<step.icon class={clsx(step.iconClass)} />
|
|
24
24
|
{:else}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { setContext } from "svelte";
|
|
3
3
|
import { progressStepper } from ".";
|
|
4
|
-
import { type ProgressStepperProps
|
|
4
|
+
import { type ProgressStepperProps } from "..";
|
|
5
5
|
import clsx from "clsx";
|
|
6
6
|
import { getTheme } from "../theme/themeUtils";
|
|
7
7
|
import type { ProgressStepperTheme } from ".";
|
|
@@ -13,22 +13,19 @@
|
|
|
13
13
|
setContext("stepperType", "progress");
|
|
14
14
|
</script>
|
|
15
15
|
|
|
16
|
-
<ol class={
|
|
16
|
+
<ol class={progressStepper.stepper({ class: clsx((theme as ProgressStepperTheme)?.stepper, classes?.progressstepper) })} {...restrorps}>
|
|
17
17
|
{#if children}
|
|
18
18
|
{@render children()}
|
|
19
19
|
{:else if steps}
|
|
20
20
|
{#each steps as step, index}
|
|
21
21
|
<li
|
|
22
|
-
class={
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
clsx(classes?.progressstepperitem),
|
|
28
|
-
(theme as ProgressStepperTheme)?.item
|
|
29
|
-
)}
|
|
22
|
+
class={progressStepper.item({
|
|
23
|
+
status: step.status,
|
|
24
|
+
isLast: index === steps.length - 1,
|
|
25
|
+
class: clsx((theme as ProgressStepperTheme)?.item, classes?.progressstepperitem)
|
|
26
|
+
})}
|
|
30
27
|
>
|
|
31
|
-
<span class={
|
|
28
|
+
<span class={progressStepper.circle({ status: step.status, class: clsx((theme as ProgressStepperTheme)?.circle, classes?.progresssteppercircle) })}>
|
|
32
29
|
{#if step.status === "completed"}
|
|
33
30
|
{#if step.icon}
|
|
34
31
|
<step.icon class={clsx(step.iconClass) || "h-5 w-5 lg:h-6 lg:w-6"} />
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { setContext } from "svelte";
|
|
3
3
|
import { stepper, type StepperTheme } from ".";
|
|
4
|
-
import { type StepperProps
|
|
4
|
+
import { type StepperProps } from "..";
|
|
5
5
|
import clsx from "clsx";
|
|
6
6
|
import { getTheme } from "../theme/themeUtils";
|
|
7
7
|
|
|
@@ -12,30 +12,24 @@
|
|
|
12
12
|
setContext("stepperType", "stepper");
|
|
13
13
|
</script>
|
|
14
14
|
|
|
15
|
-
<ol {...restProps} class={
|
|
15
|
+
<ol {...restProps} class={stepper.base({ class: clsx((theme as StepperTheme)?.base, classes?.stepper) })}>
|
|
16
16
|
{#if children}
|
|
17
17
|
{@render children()}
|
|
18
18
|
{:else if steps}
|
|
19
19
|
{#each steps as step, index}
|
|
20
20
|
<li
|
|
21
|
-
class={
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
clsx(classes?.stepperitem),
|
|
27
|
-
(theme as StepperTheme)?.item
|
|
28
|
-
)}
|
|
21
|
+
class={stepper.item({
|
|
22
|
+
status: step.status,
|
|
23
|
+
isLast: index === steps.length - 1,
|
|
24
|
+
class: clsx((theme as StepperTheme)?.item, classes?.stepperitem)
|
|
25
|
+
})}
|
|
29
26
|
>
|
|
30
27
|
<span
|
|
31
|
-
class={
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
clsx(classes?.steppercontent),
|
|
37
|
-
(theme as StepperTheme)?.content
|
|
38
|
-
)}
|
|
28
|
+
class={stepper.content({
|
|
29
|
+
status: step.status,
|
|
30
|
+
isLast: index === steps.length - 1,
|
|
31
|
+
class: clsx((theme as StepperTheme)?.content, classes?.steppercontent)
|
|
32
|
+
})}
|
|
39
33
|
>
|
|
40
34
|
{#if step.status === "completed"}
|
|
41
35
|
{#if step.icon}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { setContext } from "svelte";
|
|
3
3
|
import { timelineStepper, type TimelineStepperTheme } from ".";
|
|
4
|
-
import { type TimelineStepperProps
|
|
4
|
+
import { type TimelineStepperProps } from "..";
|
|
5
5
|
import clsx from "clsx";
|
|
6
6
|
import { getTheme } from "../theme/themeUtils";
|
|
7
7
|
|
|
@@ -12,13 +12,13 @@
|
|
|
12
12
|
setContext("stepperType", "timeline");
|
|
13
13
|
</script>
|
|
14
14
|
|
|
15
|
-
<ol class={
|
|
15
|
+
<ol class={timelineStepper.base({ class: clsx((theme as TimelineStepperTheme)?.base, classes?.timelinestepper) })} {...restProps}>
|
|
16
16
|
{#if children}
|
|
17
17
|
{@render children()}
|
|
18
18
|
{:else if steps}
|
|
19
19
|
{#each steps as step, index}
|
|
20
|
-
<li class={
|
|
21
|
-
<span class={
|
|
20
|
+
<li class={timelineStepper.item({ isLast: index === steps.length - 1, class: clsx((theme as TimelineStepperTheme)?.item, classes?.timelinestepperitem) })}>
|
|
21
|
+
<span class={timelineStepper.circle({ status: step.status, class: clsx((theme as TimelineStepperTheme)?.circle, classes?.timelinesteppercircle) })}>
|
|
22
22
|
{#if step.status === "completed"}
|
|
23
23
|
{#if step.icon}
|
|
24
24
|
<step.icon class={clsx(step.iconClass) || "h-3.5 w-3.5"} />
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { setContext } from "svelte";
|
|
3
3
|
import { verticalStepper, type VerticalStepperTheme } from ".";
|
|
4
|
-
import { type VerticalStepperProps
|
|
4
|
+
import { type VerticalStepperProps } from "..";
|
|
5
5
|
import clsx from "clsx";
|
|
6
6
|
import { getTheme } from "../theme/themeUtils";
|
|
7
7
|
|
|
@@ -12,14 +12,14 @@
|
|
|
12
12
|
setContext("stepperType", "vertical");
|
|
13
13
|
</script>
|
|
14
14
|
|
|
15
|
-
<ol class={
|
|
15
|
+
<ol class={verticalStepper.stepper({ class: (theme as VerticalStepperTheme)?.stepper })} {...restProps}>
|
|
16
16
|
{#if children}
|
|
17
17
|
{@render children()}
|
|
18
18
|
{:else if steps}
|
|
19
19
|
{#each steps as step, index}
|
|
20
20
|
<li class={clsx(liClass)}>
|
|
21
|
-
<div class={
|
|
22
|
-
<div class={
|
|
21
|
+
<div class={verticalStepper.card({ status: step.status, class: clsx((theme as VerticalStepperTheme)?.card, classes?.verticalsteppercard) })} role="alert">
|
|
22
|
+
<div class={verticalStepper.content({ class: clsx((theme as VerticalStepperTheme)?.content, classes?.verticalsteppercontent) })}>
|
|
23
23
|
<span class="sr-only">{step.label}</span>
|
|
24
24
|
<h3 class="font-medium">{step.id}. {step.label}</h3>
|
|
25
25
|
{#if step.status === "completed"}
|
package/dist/table/Table.svelte
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { setContext } from "svelte";
|
|
3
3
|
import { table as tableCls, TableHead, TableBody, type TableTheme } from ".";
|
|
4
4
|
import clsx from "clsx";
|
|
5
|
-
import { type TableProps, type TableCtxType
|
|
5
|
+
import { type TableProps, type TableCtxType } from "..";
|
|
6
6
|
import { getTheme } from "../theme/themeUtils";
|
|
7
7
|
|
|
8
8
|
let { children, footerSlot, captionSlot, items, divClass = "relative overflow-x-auto", striped, hoverable, border = true, shadow, color = "default", class: className, ...restProps }: TableProps = $props();
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
let bodyItems = $derived(items && items.length > 0 ? items.map((item) => Object.values(item)) : []);
|
|
33
33
|
</script>
|
|
34
34
|
|
|
35
|
-
<div class={
|
|
36
|
-
<table {...restProps} class={
|
|
35
|
+
<div class={base({ class: clsx((theme as TableTheme)?.base, divClass) })}>
|
|
36
|
+
<table {...restProps} class={table({ class: clsx((theme as TableTheme)?.table, className) })}>
|
|
37
37
|
{#if captionSlot}
|
|
38
38
|
{@render captionSlot()}
|
|
39
39
|
{/if}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import { TableBodyRow, TableBodyCell } from ".";
|
|
4
4
|
import type { TableBodyProps, CellValue, BodyRow } from "../types";
|
|
5
|
-
import { cn } from "..";
|
|
6
5
|
import { getTheme } from "../theme/themeUtils";
|
|
7
6
|
|
|
8
7
|
let { children, bodyItems, class: className, ...restProps }: TableBodyProps = $props();
|
|
@@ -18,7 +17,7 @@
|
|
|
18
17
|
}
|
|
19
18
|
</script>
|
|
20
19
|
|
|
21
|
-
<tbody {...restProps} class={
|
|
20
|
+
<tbody {...restProps} class={clsx(theme, className)}>
|
|
22
21
|
{#if bodyItems}
|
|
23
22
|
{#each bodyItems as row}
|
|
24
23
|
<TableBodyRow>
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import { tableBodyCell } from ".";
|
|
4
4
|
import type { TableBodyCellProps } from "../types";
|
|
5
|
-
import { cn } from "..";
|
|
6
5
|
import { getTheme } from "../theme/themeUtils";
|
|
7
6
|
|
|
8
7
|
let { children, class: className, colspan, onclick, ...restProps }: TableBodyCellProps = $props();
|
|
@@ -10,7 +9,7 @@
|
|
|
10
9
|
const theme = getTheme("tableBodyCell");
|
|
11
10
|
</script>
|
|
12
11
|
|
|
13
|
-
<td {...restProps} class={
|
|
12
|
+
<td {...restProps} class={tableBodyCell({ class: clsx(theme, className) })} colspan={colspan ?? 1}>
|
|
14
13
|
{#if onclick}
|
|
15
14
|
<button {onclick}>
|
|
16
15
|
{#if children}
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
import { tableBodyRow } from ".";
|
|
4
4
|
import type { TableBodyRowProps, TableCtxType } 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, class: className, color, striped, hoverable, border, ...restProps }: TableBodyRowProps = $props();
|
|
@@ -17,10 +16,10 @@
|
|
|
17
16
|
let compoStriped = $derived(striped || tableCtx.striped || false);
|
|
18
17
|
let compoBorder = $derived(border || tableCtx.border || false);
|
|
19
18
|
|
|
20
|
-
const base = $derived(tableBodyRow({ color: compoColor, hoverable: compoHoverable, striped: compoStriped, border: compoBorder }));
|
|
19
|
+
const base = $derived(tableBodyRow({ color: compoColor, hoverable: compoHoverable, striped: compoStriped, border: compoBorder, class: clsx(theme, className) }));
|
|
21
20
|
</script>
|
|
22
21
|
|
|
23
|
-
<tr {...restProps} class={
|
|
22
|
+
<tr {...restProps} class={base}>
|
|
24
23
|
{#if children}
|
|
25
24
|
{@render children()}
|
|
26
25
|
{/if}
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
import { TableHeadCell, tableHead } from ".";
|
|
4
4
|
import type { TableHeadProps, TableCtxType, HeadItemType } 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, headerSlot, color, striped, border, class: className, headItems, defaultRow = true, ...restProps }: TableHeadProps = $props();
|
|
@@ -16,7 +15,7 @@
|
|
|
16
15
|
let compoStriped = $derived(striped ? striped : tableCtx.striped || false);
|
|
17
16
|
let compoBorder = $derived(border ? border : tableCtx.border || false);
|
|
18
17
|
|
|
19
|
-
const base = $derived(tableHead({ color: compoColor, border: compoBorder, striped: compoStriped }));
|
|
18
|
+
const base = $derived(tableHead({ color: compoColor, border: compoBorder, striped: compoStriped, class: clsx(theme, className) }));
|
|
20
19
|
|
|
21
20
|
function getItemText(item: HeadItemType): string {
|
|
22
21
|
if (typeof item === "object" && "text" in item) {
|
|
@@ -26,7 +25,7 @@
|
|
|
26
25
|
}
|
|
27
26
|
</script>
|
|
28
27
|
|
|
29
|
-
<thead {...restProps} class={
|
|
28
|
+
<thead {...restProps} class={base}>
|
|
30
29
|
{#if headItems}
|
|
31
30
|
{#if headerSlot}
|
|
32
31
|
{@render headerSlot()}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import { tableHeadCell } from ".";
|
|
4
4
|
import type { TableHeadCellProps } from "../types";
|
|
5
|
-
import { cn } from "..";
|
|
6
5
|
import { getTheme } from "../theme/themeUtils";
|
|
7
6
|
|
|
8
7
|
let { children, class: className, ...restProps }: TableHeadCellProps = $props();
|
|
@@ -10,7 +9,7 @@
|
|
|
10
9
|
const theme = getTheme("tableHeadCell");
|
|
11
10
|
</script>
|
|
12
11
|
|
|
13
|
-
<th {...restProps} class={
|
|
12
|
+
<th {...restProps} class={tableHeadCell({ class: clsx(theme, className) })}>
|
|
14
13
|
{#if children}
|
|
15
14
|
{@render children()}
|
|
16
15
|
{/if}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { setContext } from "svelte";
|
|
3
3
|
import type { TableSearchProps, TableSearchType } from "../types";
|
|
4
|
-
import
|
|
4
|
+
import clsx from "clsx";
|
|
5
5
|
import { tableSearch, type TableSearchTheme } from ".";
|
|
6
6
|
import { getTheme } from "../theme/themeUtils";
|
|
7
7
|
|
|
@@ -15,16 +15,16 @@
|
|
|
15
15
|
const styles = tableSearch({ color: themeColor, striped, hoverable });
|
|
16
16
|
|
|
17
17
|
// Apply custom classes or use theme defaults
|
|
18
|
-
const rootClass =
|
|
19
|
-
const innerDivCls =
|
|
20
|
-
const searchContainerCls =
|
|
21
|
-
const svgContainerCls =
|
|
22
|
-
const svgCls =
|
|
23
|
-
const inputCls =
|
|
24
|
-
const tableCls =
|
|
18
|
+
const rootClass = styles.root({ class: clsx((theme as TableSearchTheme)?.root, divClass) });
|
|
19
|
+
const innerDivCls = styles.innerDiv({ class: clsx((theme as TableSearchTheme)?.innerDiv, innerDivClass) });
|
|
20
|
+
const searchContainerCls = styles.searchContainer({ class: clsx((theme as TableSearchTheme)?.searchContainer, searchClass) });
|
|
21
|
+
const svgContainerCls = styles.svgContainer({ class: clsx((theme as TableSearchTheme)?.svgContainer, svgDivClass) });
|
|
22
|
+
const svgCls = styles.svg({ class: clsx((theme as TableSearchTheme)?.svg, svgClass) });
|
|
23
|
+
const inputCls = styles.input({ class: clsx((theme as TableSearchTheme)?.input, inputClass) });
|
|
24
|
+
const tableCls = styles.table({ class: clsx(tableClass, (theme as TableSearchTheme)?.table, className) });
|
|
25
25
|
|
|
26
26
|
// Handle custom color
|
|
27
|
-
const finalTableClass = color === "custom" && customColor ?
|
|
27
|
+
const finalTableClass = color === "custom" && customColor ? clsx(tableCls, customColor) : tableCls;
|
|
28
28
|
|
|
29
29
|
const tableSearchCtx: TableSearchType = {
|
|
30
30
|
striped,
|