@kayord/ui 2.1.14 → 3.0.0
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/components/ui/accordion/accordion-content.svelte +7 -2
- package/dist/components/ui/accordion/accordion-item.svelte +1 -1
- package/dist/components/ui/accordion/accordion-trigger.svelte +9 -3
- package/dist/components/ui/accordion/accordion.svelte +14 -2
- package/dist/components/ui/alert/alert-action.svelte +15 -0
- package/dist/components/ui/alert/alert-action.svelte.d.ts +5 -0
- package/dist/components/ui/alert/alert-description.svelte +1 -1
- package/dist/components/ui/alert/alert-title.svelte +4 -1
- package/dist/components/ui/alert/alert.svelte +2 -2
- package/dist/components/ui/alert/alert.svelte.d.ts +2 -2
- package/dist/components/ui/alert/index.d.ts +2 -1
- package/dist/components/ui/alert/index.js +3 -2
- package/dist/components/ui/alert-dialog/alert-dialog-action.svelte +12 -3
- package/dist/components/ui/alert-dialog/alert-dialog-action.svelte.d.ts +6 -1
- package/dist/components/ui/alert-dialog/alert-dialog-cancel.svelte +12 -3
- package/dist/components/ui/alert-dialog/alert-dialog-cancel.svelte.d.ts +6 -1
- package/dist/components/ui/alert-dialog/alert-dialog-content.svelte +4 -1
- package/dist/components/ui/alert-dialog/alert-dialog-content.svelte.d.ts +1 -0
- package/dist/components/ui/alert-dialog/alert-dialog-description.svelte +4 -1
- package/dist/components/ui/alert-dialog/alert-dialog-footer.svelte +4 -1
- package/dist/components/ui/alert-dialog/alert-dialog-header.svelte +4 -1
- package/dist/components/ui/alert-dialog/alert-dialog-media.svelte +23 -0
- package/dist/components/ui/alert-dialog/alert-dialog-media.svelte.d.ts +5 -0
- package/dist/components/ui/alert-dialog/alert-dialog-overlay.svelte +1 -1
- package/dist/components/ui/alert-dialog/alert-dialog-title.svelte +4 -1
- package/dist/components/ui/alert-dialog/index.d.ts +2 -1
- package/dist/components/ui/alert-dialog/index.js +3 -2
- package/dist/components/ui/avatar/avatar-badge.svelte +26 -0
- package/dist/components/ui/avatar/avatar-badge.svelte.d.ts +5 -0
- package/dist/components/ui/avatar/avatar-fallback.svelte +4 -1
- package/dist/components/ui/avatar/avatar-group-count.svelte +23 -0
- package/dist/components/ui/avatar/avatar-group-count.svelte.d.ts +5 -0
- package/dist/components/ui/avatar/avatar-group.svelte +23 -0
- package/dist/components/ui/avatar/avatar-group.svelte.d.ts +5 -0
- package/dist/components/ui/avatar/avatar-image.svelte +1 -1
- package/dist/components/ui/avatar/avatar.svelte +9 -2
- package/dist/components/ui/avatar/avatar.svelte.d.ts +4 -1
- package/dist/components/ui/avatar/index.d.ts +4 -1
- package/dist/components/ui/avatar/index.js +5 -2
- package/dist/components/ui/badge/badge.svelte +7 -5
- package/dist/components/ui/badge/badge.svelte.d.ts +8 -2
- package/dist/components/ui/breadcrumb/breadcrumb-ellipsis.svelte +3 -3
- package/dist/components/ui/breadcrumb/breadcrumb-item.svelte +1 -6
- package/dist/components/ui/breadcrumb/breadcrumb-list.svelte +1 -1
- package/dist/components/ui/breadcrumb/breadcrumb-separator.svelte +1 -1
- package/dist/components/ui/breadcrumb/breadcrumb.svelte +8 -1
- package/dist/components/ui/button/button.svelte +18 -13
- package/dist/components/ui/button/button.svelte.d.ts +11 -5
- package/dist/components/ui/button-group/button-group-separator.svelte +4 -1
- package/dist/components/ui/button-group/button-group-text.svelte +2 -1
- package/dist/components/ui/button-group/button-group.svelte +3 -3
- package/dist/components/ui/button-group/button-group.svelte.d.ts +2 -2
- package/dist/components/ui/button-group/index.d.ts +2 -2
- package/dist/components/ui/button-group/index.js +2 -2
- package/dist/components/ui/calendar/calendar-cell.svelte +1 -1
- package/dist/components/ui/calendar/calendar-day.svelte +4 -6
- package/dist/components/ui/calendar/calendar-grid.svelte +1 -5
- package/dist/components/ui/calendar/calendar-month-select.svelte +2 -2
- package/dist/components/ui/calendar/calendar-month.svelte +1 -1
- package/dist/components/ui/calendar/calendar-next-button.svelte +7 -2
- package/dist/components/ui/calendar/calendar-prev-button.svelte +7 -2
- package/dist/components/ui/calendar/calendar-year-select.svelte +1 -1
- package/dist/components/ui/calendar/calendar.svelte +1 -1
- package/dist/components/ui/card/card-action.svelte +1 -1
- package/dist/components/ui/card/card-content.svelte +6 -1
- package/dist/components/ui/card/card-footer.svelte +1 -1
- package/dist/components/ui/card/card-header.svelte +1 -1
- package/dist/components/ui/card/card-title.svelte +6 -1
- package/dist/components/ui/card/card.svelte +7 -2
- package/dist/components/ui/card/card.svelte.d.ts +4 -1
- package/dist/components/ui/carousel/carousel-next.svelte +5 -4
- package/dist/components/ui/carousel/carousel-previous.svelte +5 -4
- package/dist/components/ui/carousel/carousel.svelte +1 -0
- package/dist/components/ui/chart/chart-container.svelte +1 -1
- package/dist/components/ui/chart/chart-tooltip.svelte +1 -0
- package/dist/components/ui/checkbox/checkbox.svelte +5 -5
- package/dist/components/ui/command/command-dialog.svelte +12 -10
- package/dist/components/ui/command/command-dialog.svelte.d.ts +3 -1
- package/dist/components/ui/command/command-group.svelte +4 -1
- package/dist/components/ui/command/command-input.svelte +17 -13
- package/dist/components/ui/command/command-item.svelte +9 -3
- package/dist/components/ui/command/command-list.svelte +1 -1
- package/dist/components/ui/command/command-shortcut.svelte +4 -1
- package/dist/components/ui/command/command.svelte +1 -1
- package/dist/components/ui/context-menu/context-menu-checkbox-item.svelte +7 -4
- package/dist/components/ui/context-menu/context-menu-checkbox-item.svelte.d.ts +1 -0
- package/dist/components/ui/context-menu/context-menu-content.svelte +1 -1
- package/dist/components/ui/context-menu/context-menu-group-heading.svelte +1 -1
- package/dist/components/ui/context-menu/context-menu-item.svelte +1 -1
- package/dist/components/ui/context-menu/context-menu-label.svelte +1 -1
- package/dist/components/ui/context-menu/context-menu-radio-item.svelte +9 -5
- package/dist/components/ui/context-menu/context-menu-radio-item.svelte.d.ts +5 -1
- package/dist/components/ui/context-menu/context-menu-shortcut.svelte +4 -1
- package/dist/components/ui/context-menu/context-menu-sub-content.svelte +1 -1
- package/dist/components/ui/context-menu/context-menu-sub-trigger.svelte +3 -3
- package/dist/components/ui/context-menu/context-menu-trigger.svelte +8 -2
- package/dist/components/ui/dialog/dialog-close.svelte +2 -2
- package/dist/components/ui/dialog/dialog-content.svelte +10 -7
- package/dist/components/ui/dialog/dialog-description.svelte +4 -1
- package/dist/components/ui/dialog/dialog-footer.svelte +17 -2
- package/dist/components/ui/dialog/dialog-footer.svelte.d.ts +4 -1
- package/dist/components/ui/dialog/dialog-header.svelte +1 -6
- package/dist/components/ui/dialog/dialog-overlay.svelte +1 -1
- package/dist/components/ui/dialog/dialog-title.svelte +1 -1
- package/dist/components/ui/dialog/dialog-trigger.svelte +2 -2
- package/dist/components/ui/drawer/drawer-content.svelte +2 -6
- package/dist/components/ui/drawer/drawer-header.svelte +9 -1
- package/dist/components/ui/drawer/drawer-overlay.svelte +1 -1
- package/dist/components/ui/drawer/drawer-title.svelte +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte +9 -6
- package/dist/components/ui/dropdown-menu/dropdown-menu-content.svelte +3 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu-item.svelte +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu-label.svelte +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu-radio-item.svelte +7 -4
- package/dist/components/ui/dropdown-menu/dropdown-menu-shortcut.svelte +4 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu-sub-content.svelte +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu-sub-trigger.svelte +2 -2
- package/dist/components/ui/empty/empty-content.svelte +1 -1
- package/dist/components/ui/empty/empty-description.svelte +1 -1
- package/dist/components/ui/empty/empty-header.svelte +1 -1
- package/dist/components/ui/empty/empty-media.svelte +1 -1
- package/dist/components/ui/empty/empty-title.svelte +1 -1
- package/dist/components/ui/empty/empty.svelte +1 -1
- package/dist/components/ui/field/field-content.svelte +1 -1
- package/dist/components/ui/field/field-description.svelte +2 -2
- package/dist/components/ui/field/field-error.svelte +1 -1
- package/dist/components/ui/field/field-group.svelte +1 -1
- package/dist/components/ui/field/field-label.svelte +2 -3
- package/dist/components/ui/field/field-legend.svelte +1 -1
- package/dist/components/ui/field/field-separator.svelte +1 -1
- package/dist/components/ui/field/field-set.svelte +1 -2
- package/dist/components/ui/field/field-title.svelte +1 -1
- package/dist/components/ui/field/field.svelte +6 -12
- package/dist/components/ui/field/field.svelte.d.ts +8 -8
- package/dist/components/ui/hover-card/hover-card-content.svelte +1 -1
- package/dist/components/ui/input/input.svelte +2 -6
- package/dist/components/ui/input-group/input-group-addon.svelte +5 -5
- package/dist/components/ui/input-group/input-group-addon.svelte.d.ts +2 -2
- package/dist/components/ui/input-group/input-group-button.svelte +4 -4
- package/dist/components/ui/input-group/input-group-button.svelte.d.ts +2 -2
- package/dist/components/ui/input-group/input-group-input.svelte +1 -1
- package/dist/components/ui/input-group/input-group-textarea.svelte +1 -1
- package/dist/components/ui/input-group/input-group.svelte +1 -15
- package/dist/components/ui/input-otp/input-otp-group.svelte +9 -1
- package/dist/components/ui/input-otp/input-otp-separator.svelte +14 -2
- package/dist/components/ui/input-otp/input-otp-slot.svelte +3 -5
- package/dist/components/ui/input-otp/input-otp.svelte +5 -1
- package/dist/components/ui/item/item-content.svelte +4 -1
- package/dist/components/ui/item/item-description.svelte +1 -2
- package/dist/components/ui/item/item-group.svelte +4 -1
- package/dist/components/ui/item/item-media.svelte +4 -3
- package/dist/components/ui/item/item-media.svelte.d.ts +2 -2
- package/dist/components/ui/item/item-separator.svelte +1 -1
- package/dist/components/ui/item/item-title.svelte +4 -1
- package/dist/components/ui/item/item.svelte +6 -5
- package/dist/components/ui/item/item.svelte.d.ts +5 -2
- package/dist/components/ui/kbd/kbd.svelte +1 -3
- package/dist/components/ui/menubar/menubar-checkbox-item.svelte +13 -8
- package/dist/components/ui/menubar/menubar-checkbox-item.svelte.d.ts +1 -0
- package/dist/components/ui/menubar/menubar-content.svelte +2 -2
- package/dist/components/ui/menubar/menubar-item.svelte +1 -1
- package/dist/components/ui/menubar/menubar-label.svelte +1 -1
- package/dist/components/ui/menubar/menubar-radio-item.svelte +11 -5
- package/dist/components/ui/menubar/menubar-radio-item.svelte.d.ts +5 -1
- package/dist/components/ui/menubar/menubar-shortcut.svelte +4 -1
- package/dist/components/ui/menubar/menubar-sub-content.svelte +1 -1
- package/dist/components/ui/menubar/menubar-sub-trigger.svelte +3 -3
- package/dist/components/ui/menubar/menubar-trigger.svelte +1 -1
- package/dist/components/ui/menubar/menubar.svelte +1 -1
- package/dist/components/ui/native-select/native-select.svelte +15 -10
- package/dist/components/ui/native-select/native-select.svelte.d.ts +4 -1
- package/dist/components/ui/navigation-menu/navigation-menu-content.svelte +1 -2
- package/dist/components/ui/navigation-menu/navigation-menu-indicator.svelte +1 -1
- package/dist/components/ui/navigation-menu/navigation-menu-item.svelte +1 -1
- package/dist/components/ui/navigation-menu/navigation-menu-link.svelte +1 -1
- package/dist/components/ui/navigation-menu/navigation-menu-list.svelte +1 -1
- package/dist/components/ui/navigation-menu/navigation-menu-trigger.svelte +2 -4
- package/dist/components/ui/navigation-menu/navigation-menu-trigger.svelte.d.ts +1 -1
- package/dist/components/ui/navigation-menu/navigation-menu-viewport.svelte +1 -1
- package/dist/components/ui/navigation-menu/navigation-menu.svelte +1 -2
- package/dist/components/ui/pagination/index.d.ts +4 -4
- package/dist/components/ui/pagination/index.js +4 -4
- package/dist/components/ui/pagination/pagination-content.svelte +1 -6
- package/dist/components/ui/pagination/pagination-ellipsis.svelte +7 -4
- package/dist/components/ui/pagination/pagination-ellipsis.svelte.d.ts +1 -1
- package/dist/components/ui/pagination/pagination-link.svelte +14 -15
- package/dist/components/ui/pagination/pagination-link.svelte.d.ts +3 -2
- package/dist/components/ui/pagination/pagination-next-button.svelte +9 -11
- package/dist/components/ui/pagination/pagination-next.svelte +10 -20
- package/dist/components/ui/pagination/pagination-next.svelte.d.ts +13 -2
- package/dist/components/ui/pagination/pagination-prev-button.svelte +9 -11
- package/dist/components/ui/pagination/pagination-previous.svelte +10 -20
- package/dist/components/ui/pagination/pagination-previous.svelte.d.ts +13 -2
- package/dist/components/ui/pagination/pagination.svelte +1 -1
- package/dist/components/ui/popover/index.d.ts +4 -1
- package/dist/components/ui/popover/index.js +5 -2
- package/dist/components/ui/popover/popover-content.svelte +1 -1
- package/dist/components/ui/popover/popover-description.svelte +15 -0
- package/dist/components/ui/popover/popover-description.svelte.d.ts +5 -0
- package/dist/components/ui/popover/popover-header.svelte +15 -0
- package/dist/components/ui/popover/popover-header.svelte.d.ts +5 -0
- package/dist/components/ui/popover/popover-title.svelte +15 -0
- package/dist/components/ui/popover/popover-title.svelte.d.ts +5 -0
- package/dist/components/ui/progress/progress.svelte +2 -2
- package/dist/components/ui/radio-group/radio-group-item.svelte +5 -3
- package/dist/components/ui/radio-group/radio-group.svelte +1 -1
- package/dist/components/ui/range-calendar/range-calendar-cell.svelte +1 -1
- package/dist/components/ui/range-calendar/range-calendar-day.svelte +4 -7
- package/dist/components/ui/range-calendar/range-calendar-month-select.svelte +1 -1
- package/dist/components/ui/range-calendar/range-calendar-next-button.svelte +7 -2
- package/dist/components/ui/range-calendar/range-calendar-prev-button.svelte +7 -2
- package/dist/components/ui/range-calendar/range-calendar-year-select.svelte +1 -1
- package/dist/components/ui/range-calendar/range-calendar.svelte +1 -1
- package/dist/components/ui/resizable/resizable-handle.svelte +2 -5
- package/dist/components/ui/resizable/resizable-pane-group.svelte +2 -1
- package/dist/components/ui/scroll-area/scroll-area-scrollbar.svelte +2 -3
- package/dist/components/ui/scroll-area/scroll-area.svelte +1 -1
- package/dist/components/ui/select/select-content.svelte +2 -2
- package/dist/components/ui/select/select-group.svelte +3 -2
- package/dist/components/ui/select/select-item.svelte +3 -3
- package/dist/components/ui/select/select-label.svelte +1 -1
- package/dist/components/ui/select/select-scroll-down-button.svelte +6 -3
- package/dist/components/ui/select/select-scroll-up-button.svelte +6 -3
- package/dist/components/ui/select/select-trigger.svelte +3 -3
- package/dist/components/ui/separator/separator.svelte +3 -1
- package/dist/components/ui/sheet/sheet-content.svelte +20 -27
- package/dist/components/ui/sheet/sheet-content.svelte.d.ts +2 -24
- package/dist/components/ui/sheet/sheet-header.svelte +1 -1
- package/dist/components/ui/sheet/sheet-overlay.svelte +1 -4
- package/dist/components/ui/sheet/sheet-title.svelte +1 -1
- package/dist/components/ui/sidebar/sidebar-content.svelte +1 -1
- package/dist/components/ui/sidebar/sidebar-group-action.svelte +1 -4
- package/dist/components/ui/sidebar/sidebar-group-label.svelte +1 -2
- package/dist/components/ui/sidebar/sidebar-inset.svelte +1 -2
- package/dist/components/ui/sidebar/sidebar-menu-action.svelte +2 -8
- package/dist/components/ui/sidebar/sidebar-menu-badge.svelte +1 -6
- package/dist/components/ui/sidebar/sidebar-menu-button.svelte +2 -2
- package/dist/components/ui/sidebar/sidebar-menu-button.svelte.d.ts +2 -2
- package/dist/components/ui/sidebar/sidebar-menu-sub-button.svelte +1 -5
- package/dist/components/ui/sidebar/sidebar-menu-sub.svelte +1 -2
- package/dist/components/ui/sidebar/sidebar-menu.svelte +1 -1
- package/dist/components/ui/sidebar/sidebar-rail.svelte +4 -4
- package/dist/components/ui/sidebar/sidebar-separator.svelte +1 -1
- package/dist/components/ui/sidebar/sidebar-trigger.svelte +3 -3
- package/dist/components/ui/sidebar/sidebar.svelte +3 -3
- package/dist/components/ui/skeleton/skeleton.svelte +1 -1
- package/dist/components/ui/slider/slider.svelte +8 -8
- package/dist/components/ui/sonner/sonner.svelte +6 -6
- package/dist/components/ui/spinner/spinner.svelte +18 -4
- package/dist/components/ui/spinner/spinner.svelte.d.ts +2 -1
- package/dist/components/ui/switch/switch.svelte +7 -5
- package/dist/components/ui/switch/switch.svelte.d.ts +5 -1
- package/dist/components/ui/table/table-cell.svelte +1 -1
- package/dist/components/ui/table/table-head.svelte +1 -1
- package/dist/components/ui/table/table-row.svelte +1 -4
- package/dist/components/ui/tabs/index.d.ts +2 -2
- package/dist/components/ui/tabs/index.js +2 -2
- package/dist/components/ui/tabs/tabs-content.svelte +6 -1
- package/dist/components/ui/tabs/tabs-list.svelte +29 -5
- package/dist/components/ui/tabs/tabs-list.svelte.d.ts +22 -1
- package/dist/components/ui/tabs/tabs-trigger.svelte +4 -1
- package/dist/components/ui/tabs/tabs.svelte +7 -1
- package/dist/components/ui/textarea/textarea.svelte +1 -1
- package/dist/components/ui/toggle/toggle.svelte +5 -5
- package/dist/components/ui/toggle/toggle.svelte.d.ts +2 -2
- package/dist/components/ui/toggle-group/toggle-group-item.svelte +1 -1
- package/dist/components/ui/toggle-group/toggle-group.svelte +21 -5
- package/dist/components/ui/toggle-group/toggle-group.svelte.d.ts +2 -0
- package/dist/components/ui/tooltip/tooltip-content.svelte +6 -6
- package/dist/components/ui/tooltip/tooltip-provider.svelte +2 -2
- package/dist/components/ui/tooltip/tooltip.svelte +4 -1
- package/package.json +15 -15
|
@@ -5,13 +5,17 @@ export declare const badgeVariants: import("tailwind-variants").TVReturnType<{
|
|
|
5
5
|
secondary: string;
|
|
6
6
|
destructive: string;
|
|
7
7
|
outline: string;
|
|
8
|
+
ghost: string;
|
|
9
|
+
link: string;
|
|
8
10
|
};
|
|
9
|
-
}, undefined, "focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex w-fit shrink-0 items-center justify-center
|
|
11
|
+
}, undefined, "h-5 gap-1 rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium transition-all has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&>svg]:size-3! focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive group/badge inline-flex w-fit shrink-0 items-center justify-center overflow-hidden whitespace-nowrap transition-colors focus-visible:ring-[3px] [&>svg]:pointer-events-none", {
|
|
10
12
|
variant: {
|
|
11
13
|
default: string;
|
|
12
14
|
secondary: string;
|
|
13
15
|
destructive: string;
|
|
14
16
|
outline: string;
|
|
17
|
+
ghost: string;
|
|
18
|
+
link: string;
|
|
15
19
|
};
|
|
16
20
|
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
17
21
|
variant: {
|
|
@@ -19,8 +23,10 @@ export declare const badgeVariants: import("tailwind-variants").TVReturnType<{
|
|
|
19
23
|
secondary: string;
|
|
20
24
|
destructive: string;
|
|
21
25
|
outline: string;
|
|
26
|
+
ghost: string;
|
|
27
|
+
link: string;
|
|
22
28
|
};
|
|
23
|
-
}, undefined, "focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex w-fit shrink-0 items-center justify-center
|
|
29
|
+
}, undefined, "h-5 gap-1 rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium transition-all has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&>svg]:size-3! focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive group/badge inline-flex w-fit shrink-0 items-center justify-center overflow-hidden whitespace-nowrap transition-colors focus-visible:ring-[3px] [&>svg]:pointer-events-none", unknown, unknown, undefined>>;
|
|
24
30
|
export type BadgeVariant = VariantProps<typeof badgeVariants>["variant"];
|
|
25
31
|
import type { HTMLAnchorAttributes } from "svelte/elements";
|
|
26
32
|
import { type WithElementRef } from "../../../utils.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import EllipsisIcon from "@lucide/svelte/icons/ellipsis";
|
|
3
2
|
import type { HTMLAttributes } from "svelte/elements";
|
|
4
3
|
import { cn, type WithElementRef, type WithoutChildren } from "../../../utils.js";
|
|
4
|
+
import MoreHorizontalIcon from "@lucide/svelte/icons/more-horizontal";
|
|
5
5
|
|
|
6
6
|
let {
|
|
7
7
|
ref = $bindable(null),
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
data-slot="breadcrumb-ellipsis"
|
|
16
16
|
role="presentation"
|
|
17
17
|
aria-hidden="true"
|
|
18
|
-
class={cn("flex size-
|
|
18
|
+
class={cn("flex size-5 items-center justify-center [&>svg]:size-4", className)}
|
|
19
19
|
{...restProps}
|
|
20
20
|
>
|
|
21
|
-
<
|
|
21
|
+
<MoreHorizontalIcon />
|
|
22
22
|
<span class="sr-only">More</span>
|
|
23
23
|
</span>
|
|
@@ -5,11 +5,6 @@
|
|
|
5
5
|
let { ref = $bindable(null), class: className, children, ...restProps }: WithElementRef<HTMLLiAttributes> = $props();
|
|
6
6
|
</script>
|
|
7
7
|
|
|
8
|
-
<li
|
|
9
|
-
bind:this={ref}
|
|
10
|
-
data-slot="breadcrumb-item"
|
|
11
|
-
class={cn("inline-flex items-center gap-1.5", className)}
|
|
12
|
-
{...restProps}
|
|
13
|
-
>
|
|
8
|
+
<li bind:this={ref} data-slot="breadcrumb-item" class={cn("inline-flex items-center gap-1", className)} {...restProps}>
|
|
14
9
|
{@render children?.()}
|
|
15
10
|
</li>
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<ol
|
|
9
9
|
bind:this={ref}
|
|
10
10
|
data-slot="breadcrumb-list"
|
|
11
|
-
class={cn("text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-
|
|
11
|
+
class={cn("text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm wrap-break-word", className)}
|
|
12
12
|
{...restProps}
|
|
13
13
|
>
|
|
14
14
|
{@render children?.()}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import ChevronRightIcon from "@lucide/svelte/icons/chevron-right";
|
|
3
2
|
import { cn, type WithElementRef } from "../../../utils.js";
|
|
4
3
|
import type { HTMLLiAttributes } from "svelte/elements";
|
|
4
|
+
import ChevronRightIcon from "@lucide/svelte/icons/chevron-right";
|
|
5
5
|
|
|
6
6
|
let { ref = $bindable(null), class: className, children, ...restProps }: WithElementRef<HTMLLiAttributes> = $props();
|
|
7
7
|
</script>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { WithElementRef } from "../../../utils.js";
|
|
3
3
|
import type { HTMLAttributes } from "svelte/elements";
|
|
4
|
+
import { cn } from "../../../utils.js";
|
|
4
5
|
|
|
5
6
|
let {
|
|
6
7
|
ref = $bindable(null),
|
|
@@ -10,6 +11,12 @@
|
|
|
10
11
|
}: WithElementRef<HTMLAttributes<HTMLElement>> = $props();
|
|
11
12
|
</script>
|
|
12
13
|
|
|
13
|
-
<nav
|
|
14
|
+
<nav
|
|
15
|
+
bind:this={ref}
|
|
16
|
+
data-slot="breadcrumb"
|
|
17
|
+
aria-label="breadcrumb"
|
|
18
|
+
class={cn("cn-breadcrumb", className)}
|
|
19
|
+
{...restProps}
|
|
20
|
+
>
|
|
14
21
|
{@render children?.()}
|
|
15
22
|
</nav>
|
|
@@ -4,25 +4,30 @@
|
|
|
4
4
|
import { type VariantProps, tv } from "tailwind-variants";
|
|
5
5
|
|
|
6
6
|
export const buttonVariants = tv({
|
|
7
|
-
base: "focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive
|
|
7
|
+
base: "focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-lg border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-3 active:translate-y-px aria-invalid:ring-3 [&_svg:not([class*='size-'])]:size-4 group/button inline-flex shrink-0 items-center justify-center whitespace-nowrap transition-all outline-none select-none disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
8
8
|
variants: {
|
|
9
9
|
variant: {
|
|
10
|
-
default: "bg-primary text-primary-foreground hover:bg-primary/
|
|
11
|
-
destructive:
|
|
12
|
-
"bg-destructive hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60 text-white shadow-xs",
|
|
10
|
+
default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
|
|
13
11
|
outline:
|
|
14
|
-
"bg-background hover:bg-
|
|
15
|
-
secondary:
|
|
16
|
-
|
|
12
|
+
"border-border bg-background hover:bg-muted hover:text-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 aria-expanded:bg-muted aria-expanded:text-foreground",
|
|
13
|
+
secondary:
|
|
14
|
+
"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
|
|
15
|
+
ghost:
|
|
16
|
+
"hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground",
|
|
17
|
+
destructive:
|
|
18
|
+
"bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30",
|
|
17
19
|
link: "text-primary underline-offset-4 hover:underline",
|
|
18
20
|
},
|
|
19
21
|
size: {
|
|
20
|
-
default: "h-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"icon-
|
|
22
|
+
default: "h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
23
|
+
xs: "h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
|
|
24
|
+
sm: "h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",
|
|
25
|
+
lg: "h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",
|
|
26
|
+
icon: "size-8",
|
|
27
|
+
"icon-xs":
|
|
28
|
+
"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3",
|
|
29
|
+
"icon-sm": "size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg",
|
|
30
|
+
"icon-lg": "size-9",
|
|
26
31
|
},
|
|
27
32
|
},
|
|
28
33
|
defaultVariants: {
|
|
@@ -4,55 +4,61 @@ import { type VariantProps } from "tailwind-variants";
|
|
|
4
4
|
export declare const buttonVariants: import("tailwind-variants").TVReturnType<{
|
|
5
5
|
variant: {
|
|
6
6
|
default: string;
|
|
7
|
-
destructive: string;
|
|
8
7
|
outline: string;
|
|
9
8
|
secondary: string;
|
|
10
9
|
ghost: string;
|
|
10
|
+
destructive: string;
|
|
11
11
|
link: string;
|
|
12
12
|
};
|
|
13
13
|
size: {
|
|
14
14
|
default: string;
|
|
15
|
+
xs: string;
|
|
15
16
|
sm: string;
|
|
16
17
|
lg: string;
|
|
17
18
|
icon: string;
|
|
19
|
+
"icon-xs": string;
|
|
18
20
|
"icon-sm": string;
|
|
19
21
|
"icon-lg": string;
|
|
20
22
|
};
|
|
21
|
-
}, undefined, "focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive
|
|
23
|
+
}, undefined, "focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-lg border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-3 active:translate-y-px aria-invalid:ring-3 [&_svg:not([class*='size-'])]:size-4 group/button inline-flex shrink-0 items-center justify-center whitespace-nowrap transition-all outline-none select-none disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0", {
|
|
22
24
|
variant: {
|
|
23
25
|
default: string;
|
|
24
|
-
destructive: string;
|
|
25
26
|
outline: string;
|
|
26
27
|
secondary: string;
|
|
27
28
|
ghost: string;
|
|
29
|
+
destructive: string;
|
|
28
30
|
link: string;
|
|
29
31
|
};
|
|
30
32
|
size: {
|
|
31
33
|
default: string;
|
|
34
|
+
xs: string;
|
|
32
35
|
sm: string;
|
|
33
36
|
lg: string;
|
|
34
37
|
icon: string;
|
|
38
|
+
"icon-xs": string;
|
|
35
39
|
"icon-sm": string;
|
|
36
40
|
"icon-lg": string;
|
|
37
41
|
};
|
|
38
42
|
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
39
43
|
variant: {
|
|
40
44
|
default: string;
|
|
41
|
-
destructive: string;
|
|
42
45
|
outline: string;
|
|
43
46
|
secondary: string;
|
|
44
47
|
ghost: string;
|
|
48
|
+
destructive: string;
|
|
45
49
|
link: string;
|
|
46
50
|
};
|
|
47
51
|
size: {
|
|
48
52
|
default: string;
|
|
53
|
+
xs: string;
|
|
49
54
|
sm: string;
|
|
50
55
|
lg: string;
|
|
51
56
|
icon: string;
|
|
57
|
+
"icon-xs": string;
|
|
52
58
|
"icon-sm": string;
|
|
53
59
|
"icon-lg": string;
|
|
54
60
|
};
|
|
55
|
-
}, undefined, "focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive
|
|
61
|
+
}, undefined, "focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-lg border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-3 active:translate-y-px aria-invalid:ring-3 [&_svg:not([class*='size-'])]:size-4 group/button inline-flex shrink-0 items-center justify-center whitespace-nowrap transition-all outline-none select-none disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0", unknown, unknown, undefined>>;
|
|
56
62
|
export type ButtonVariant = VariantProps<typeof buttonVariants>["variant"];
|
|
57
63
|
export type ButtonSize = VariantProps<typeof buttonVariants>["size"];
|
|
58
64
|
export type ButtonProps = WithElementRef<HTMLButtonAttributes> & WithElementRef<HTMLAnchorAttributes> & {
|
|
@@ -15,6 +15,9 @@
|
|
|
15
15
|
bind:ref
|
|
16
16
|
data-slot="button-group-separator"
|
|
17
17
|
{orientation}
|
|
18
|
-
class={cn(
|
|
18
|
+
class={cn(
|
|
19
|
+
"bg-input relative self-stretch data-[orientation=horizontal]:mx-px data-[orientation=horizontal]:w-auto data-[orientation=vertical]:my-px data-[orientation=vertical]:h-auto",
|
|
20
|
+
className
|
|
21
|
+
)}
|
|
19
22
|
{...restProps}
|
|
20
23
|
/>
|
|
@@ -15,9 +15,10 @@
|
|
|
15
15
|
const mergedProps = $derived({
|
|
16
16
|
...restProps,
|
|
17
17
|
class: cn(
|
|
18
|
-
"bg-muted
|
|
18
|
+
"bg-muted gap-2 rounded-lg border px-2.5 text-sm font-medium [&_svg:not([class*='size-'])]:size-4 flex items-center [&_svg]:pointer-events-none",
|
|
19
19
|
className
|
|
20
20
|
),
|
|
21
|
+
"data-slot": "button-group-text",
|
|
21
22
|
});
|
|
22
23
|
</script>
|
|
23
24
|
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import { tv, type VariantProps } from "tailwind-variants";
|
|
3
3
|
|
|
4
4
|
export const buttonGroupVariants = tv({
|
|
5
|
-
base: "
|
|
5
|
+
base: "has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-lg flex w-fit items-stretch [&>*]:focus-visible:relative [&>*]:focus-visible:z-10 [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1",
|
|
6
6
|
variants: {
|
|
7
7
|
orientation: {
|
|
8
8
|
horizontal:
|
|
9
|
-
"[
|
|
9
|
+
"[&>[data-slot]:not(:has(~[data-slot]))]:rounded-r-lg! [&>[data-slot]]:rounded-r-none [&>[data-slot]~[data-slot]]:rounded-l-none [&>[data-slot]~[data-slot]]:border-l-0",
|
|
10
10
|
vertical:
|
|
11
|
-
"
|
|
11
|
+
"[&>[data-slot]:not(:has(~[data-slot]))]:rounded-b-lg! flex-col [&>[data-slot]]:rounded-b-none [&>[data-slot]~[data-slot]]:rounded-t-none [&>[data-slot]~[data-slot]]:border-t-0",
|
|
12
12
|
},
|
|
13
13
|
},
|
|
14
14
|
defaultVariants: {
|
|
@@ -4,7 +4,7 @@ export declare const buttonGroupVariants: import("tailwind-variants").TVReturnTy
|
|
|
4
4
|
horizontal: string;
|
|
5
5
|
vertical: string;
|
|
6
6
|
};
|
|
7
|
-
}, undefined, "
|
|
7
|
+
}, undefined, "has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-lg flex w-fit items-stretch [&>*]:focus-visible:relative [&>*]:focus-visible:z-10 [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1", {
|
|
8
8
|
orientation: {
|
|
9
9
|
horizontal: string;
|
|
10
10
|
vertical: string;
|
|
@@ -14,7 +14,7 @@ export declare const buttonGroupVariants: import("tailwind-variants").TVReturnTy
|
|
|
14
14
|
horizontal: string;
|
|
15
15
|
vertical: string;
|
|
16
16
|
};
|
|
17
|
-
}, undefined, "
|
|
17
|
+
}, undefined, "has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-lg flex w-fit items-stretch [&>*]:focus-visible:relative [&>*]:focus-visible:z-10 [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1", unknown, unknown, undefined>>;
|
|
18
18
|
export type ButtonGroupOrientation = VariantProps<typeof buttonGroupVariants>["orientation"];
|
|
19
19
|
import { type WithElementRef } from "../../../utils.js";
|
|
20
20
|
import type { HTMLAttributes } from "svelte/elements";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Root from "./button-group.svelte";
|
|
1
|
+
import Root, { buttonGroupVariants, type ButtonGroupOrientation } from "./button-group.svelte";
|
|
2
2
|
import Text from "./button-group-text.svelte";
|
|
3
3
|
import Separator from "./button-group-separator.svelte";
|
|
4
|
-
export { Root, Text, Separator, Root as ButtonGroup, Text as ButtonGroupText, Separator as ButtonGroupSeparator, };
|
|
4
|
+
export { Root, Text, Separator, buttonGroupVariants, type ButtonGroupOrientation, Root as ButtonGroup, Text as ButtonGroupText, Separator as ButtonGroupSeparator, };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import Root from "./button-group.svelte";
|
|
1
|
+
import Root, { buttonGroupVariants } from "./button-group.svelte";
|
|
2
2
|
import Text from "./button-group-text.svelte";
|
|
3
3
|
import Separator from "./button-group-separator.svelte";
|
|
4
|
-
export { Root, Text, Separator,
|
|
4
|
+
export { Root, Text, Separator, buttonGroupVariants,
|
|
5
5
|
//
|
|
6
6
|
Root as ButtonGroup, Text as ButtonGroupText, Separator as ButtonGroupSeparator, };
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<CalendarPrimitive.Cell
|
|
9
9
|
bind:ref
|
|
10
10
|
class={cn(
|
|
11
|
-
"relative size-(--cell-size) p-0 text-center text-sm focus-within:z-20 [&:first-child[data-selected]_[data-bits-day]]:rounded-s-
|
|
11
|
+
"relative size-(--cell-size) p-0 text-center text-sm focus-within:z-20 [&:first-child[data-selected]_[data-bits-day]]:rounded-s-(--cell-radius) [&:last-child[data-selected]_[data-bits-day]]:rounded-e-(--cell-radius)",
|
|
12
12
|
className
|
|
13
13
|
)}
|
|
14
14
|
{...restProps}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { buttonVariants } from "../button/index.js";
|
|
3
2
|
import { cn } from "../../../utils.js";
|
|
4
3
|
import { Calendar as CalendarPrimitive } from "bits-ui";
|
|
5
4
|
|
|
@@ -9,18 +8,17 @@
|
|
|
9
8
|
<CalendarPrimitive.Day
|
|
10
9
|
bind:ref
|
|
11
10
|
class={cn(
|
|
12
|
-
|
|
13
|
-
"
|
|
11
|
+
"flex size-(--cell-size) flex-col items-center justify-center gap-1 rounded-(--cell-radius) p-0 leading-none font-normal whitespace-nowrap select-none",
|
|
12
|
+
"[&:last-child[data-selected=true]_button]:rounded-r-(--cell-radius)",
|
|
13
|
+
"not-data-selected:hover:bg-accent/50 not-data-selected:hover:text-accent-foreground",
|
|
14
14
|
"[&[data-today]:not([data-selected])]:bg-accent [&[data-today]:not([data-selected])]:text-accent-foreground [&[data-today][data-disabled]]:text-muted-foreground",
|
|
15
|
-
"data-[selected]:bg-primary
|
|
15
|
+
"data-[selected]:bg-primary data-[selected]:text-primary-foreground data-[selected]:hover:text-foreground",
|
|
16
16
|
// Outside months
|
|
17
17
|
"[&[data-outside-month]:not([data-selected])]:text-muted-foreground [&[data-outside-month]:not([data-selected])]:hover:text-accent-foreground",
|
|
18
18
|
// Disabled
|
|
19
19
|
"data-[disabled]:text-muted-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
20
20
|
// Unavailable
|
|
21
21
|
"data-[unavailable]:text-muted-foreground data-[unavailable]:line-through",
|
|
22
|
-
// hover
|
|
23
|
-
"dark:hover:text-accent-foreground",
|
|
24
22
|
// focus
|
|
25
23
|
"focus:border-ring focus:ring-ring/50 focus:relative",
|
|
26
24
|
// inner spans
|
|
@@ -5,8 +5,4 @@
|
|
|
5
5
|
let { ref = $bindable(null), class: className, ...restProps }: CalendarPrimitive.GridProps = $props();
|
|
6
6
|
</script>
|
|
7
7
|
|
|
8
|
-
<CalendarPrimitive.Grid
|
|
9
|
-
bind:ref
|
|
10
|
-
class={cn("mt-4 flex w-full border-collapse flex-col gap-1", className)}
|
|
11
|
-
{...restProps}
|
|
12
|
-
/>
|
|
8
|
+
<CalendarPrimitive.Grid bind:ref class={cn("flex w-full border-collapse flex-col", className)} {...restProps} />
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
>
|
|
21
21
|
<CalendarPrimitive.MonthSelect
|
|
22
22
|
bind:ref
|
|
23
|
-
class="dark:bg-popover dark:text-popover-foreground absolute inset-0 opacity-0"
|
|
23
|
+
class="bg-background dark:bg-popover dark:text-popover-foreground absolute inset-0 opacity-0"
|
|
24
24
|
{...restProps}
|
|
25
25
|
>
|
|
26
26
|
{#snippet child({ props, monthItems, selectedMonthItem })}
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
{/each}
|
|
36
36
|
</select>
|
|
37
37
|
<span
|
|
38
|
-
class="[&>svg]:text-muted-foreground flex h-
|
|
38
|
+
class="[&>svg]:text-muted-foreground flex h-(--cell-size) items-center gap-1 rounded-md ps-2 pe-1 text-sm font-medium select-none [&>svg]:size-3.5"
|
|
39
39
|
aria-hidden="true"
|
|
40
40
|
>
|
|
41
41
|
{monthItems.find((item) => item.value === value)?.label || selectedMonthItem.label}
|
|
@@ -10,6 +10,6 @@
|
|
|
10
10
|
}: WithElementRef<HTMLAttributes<HTMLElement>> = $props();
|
|
11
11
|
</script>
|
|
12
12
|
|
|
13
|
-
<div {...restProps} bind:this={ref} class={cn("flex flex-col", className)}>
|
|
13
|
+
<div {...restProps} bind:this={ref} class={cn("flex w-full flex-col gap-4", className)}>
|
|
14
14
|
{@render children?.()}
|
|
15
15
|
</div>
|
|
@@ -26,6 +26,11 @@
|
|
|
26
26
|
"size-(--cell-size) bg-transparent p-0 select-none disabled:opacity-50 rtl:rotate-180",
|
|
27
27
|
className
|
|
28
28
|
)}
|
|
29
|
-
children={children || Fallback}
|
|
30
29
|
{...restProps}
|
|
31
|
-
|
|
30
|
+
>
|
|
31
|
+
{#if children}
|
|
32
|
+
{@render children?.()}
|
|
33
|
+
{:else}
|
|
34
|
+
{@render Fallback()}
|
|
35
|
+
{/if}
|
|
36
|
+
</CalendarPrimitive.NextButton>
|
|
@@ -26,6 +26,11 @@
|
|
|
26
26
|
"size-(--cell-size) bg-transparent p-0 select-none disabled:opacity-50 rtl:rotate-180",
|
|
27
27
|
className
|
|
28
28
|
)}
|
|
29
|
-
children={children || Fallback}
|
|
30
29
|
{...restProps}
|
|
31
|
-
|
|
30
|
+
>
|
|
31
|
+
{#if children}
|
|
32
|
+
{@render children?.()}
|
|
33
|
+
{:else}
|
|
34
|
+
{@render Fallback()}
|
|
35
|
+
{/if}
|
|
36
|
+
</CalendarPrimitive.PrevButton>
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
{/each}
|
|
35
35
|
</select>
|
|
36
36
|
<span
|
|
37
|
-
class="[&>svg]:text-muted-foreground flex h-
|
|
37
|
+
class="[&>svg]:text-muted-foreground flex h-(--cell-size) items-center gap-1 rounded-md ps-2 pe-1 text-sm font-medium select-none [&>svg]:size-3.5"
|
|
38
38
|
aria-hidden="true"
|
|
39
39
|
>
|
|
40
40
|
{yearItems.find((item) => item.value === value)?.label || selectedYearItem.label}
|
|
@@ -50,7 +50,7 @@ get along, so we shut typescript up by casting `value` to `never`.
|
|
|
50
50
|
{weekdayFormat}
|
|
51
51
|
{disableDaysOutsideMonth}
|
|
52
52
|
class={cn(
|
|
53
|
-
"bg-background group/calendar p-
|
|
53
|
+
"bg-background group/calendar p-2 [--cell-radius:var(--radius-md)] [--cell-size:--spacing(7)] in-data-[slot=card-content]:bg-transparent in-data-[slot=popover-content]:bg-transparent",
|
|
54
54
|
className
|
|
55
55
|
)}
|
|
56
56
|
{locale}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
<div
|
|
14
14
|
bind:this={ref}
|
|
15
15
|
data-slot="card-action"
|
|
16
|
-
class={cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end", className)}
|
|
16
|
+
class={cn("cn-card-action col-start-2 row-span-2 row-start-1 self-start justify-self-end", className)}
|
|
17
17
|
{...restProps}
|
|
18
18
|
>
|
|
19
19
|
{@render children?.()}
|
|
@@ -10,6 +10,11 @@
|
|
|
10
10
|
}: WithElementRef<HTMLAttributes<HTMLDivElement>> = $props();
|
|
11
11
|
</script>
|
|
12
12
|
|
|
13
|
-
<div
|
|
13
|
+
<div
|
|
14
|
+
bind:this={ref}
|
|
15
|
+
data-slot="card-content"
|
|
16
|
+
class={cn("px-4 group-data-[size=sm]/card:px-3", className)}
|
|
17
|
+
{...restProps}
|
|
18
|
+
>
|
|
14
19
|
{@render children?.()}
|
|
15
20
|
</div>
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
<div
|
|
14
14
|
bind:this={ref}
|
|
15
15
|
data-slot="card-footer"
|
|
16
|
-
class={cn("flex items-center
|
|
16
|
+
class={cn("bg-muted/50 flex items-center rounded-b-xl border-t p-4 group-data-[size=sm]/card:p-3", className)}
|
|
17
17
|
{...restProps}
|
|
18
18
|
>
|
|
19
19
|
{@render children?.()}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
bind:this={ref}
|
|
15
15
|
data-slot="card-header"
|
|
16
16
|
class={cn(
|
|
17
|
-
"@container/card-header grid auto-rows-min
|
|
17
|
+
"group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3",
|
|
18
18
|
className
|
|
19
19
|
)}
|
|
20
20
|
{...restProps}
|
|
@@ -10,6 +10,11 @@
|
|
|
10
10
|
}: WithElementRef<HTMLAttributes<HTMLDivElement>> = $props();
|
|
11
11
|
</script>
|
|
12
12
|
|
|
13
|
-
<div
|
|
13
|
+
<div
|
|
14
|
+
bind:this={ref}
|
|
15
|
+
data-slot="card-title"
|
|
16
|
+
class={cn("text-base leading-snug font-medium group-data-[size=sm]/card:text-sm", className)}
|
|
17
|
+
{...restProps}
|
|
18
|
+
>
|
|
14
19
|
{@render children?.()}
|
|
15
20
|
</div>
|
|
@@ -6,14 +6,19 @@
|
|
|
6
6
|
ref = $bindable(null),
|
|
7
7
|
class: className,
|
|
8
8
|
children,
|
|
9
|
+
size = "default",
|
|
9
10
|
...restProps
|
|
10
|
-
}: WithElementRef<HTMLAttributes<HTMLDivElement>> = $props();
|
|
11
|
+
}: WithElementRef<HTMLAttributes<HTMLDivElement>> & { size?: "default" | "sm" } = $props();
|
|
11
12
|
</script>
|
|
12
13
|
|
|
13
14
|
<div
|
|
14
15
|
bind:this={ref}
|
|
15
16
|
data-slot="card"
|
|
16
|
-
|
|
17
|
+
data-size={size}
|
|
18
|
+
class={cn(
|
|
19
|
+
"ring-foreground/10 bg-card text-card-foreground group/card flex flex-col gap-4 overflow-hidden rounded-xl py-4 text-sm ring-1 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",
|
|
20
|
+
className
|
|
21
|
+
)}
|
|
17
22
|
{...restProps}
|
|
18
23
|
>
|
|
19
24
|
{@render children?.()}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { HTMLAttributes } from "svelte/elements";
|
|
2
2
|
import { type WithElementRef } from "../../../utils.js";
|
|
3
|
-
|
|
3
|
+
type $$ComponentProps = WithElementRef<HTMLAttributes<HTMLDivElement>> & {
|
|
4
|
+
size?: "default" | "sm";
|
|
5
|
+
};
|
|
6
|
+
declare const Card: import("svelte").Component<$$ComponentProps, {}, "ref">;
|
|
4
7
|
type Card = ReturnType<typeof Card>;
|
|
5
8
|
export default Card;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import ArrowRightIcon from "@lucide/svelte/icons/arrow-right";
|
|
3
2
|
import type { WithoutChildren } from "bits-ui";
|
|
4
3
|
import { getEmblaContext } from "./context.js";
|
|
5
4
|
import { cn } from "../../../utils.js";
|
|
6
5
|
import { Button, type Props } from "../button/index.js";
|
|
6
|
+
import ChevronRightIcon from "@lucide/svelte/icons/chevron-right";
|
|
7
7
|
|
|
8
8
|
let {
|
|
9
9
|
ref = $bindable(null),
|
|
10
10
|
class: className,
|
|
11
11
|
variant = "outline",
|
|
12
|
-
size = "icon",
|
|
12
|
+
size = "icon-sm",
|
|
13
13
|
...restProps
|
|
14
14
|
}: WithoutChildren<Props> = $props();
|
|
15
15
|
|
|
@@ -21,8 +21,9 @@
|
|
|
21
21
|
{variant}
|
|
22
22
|
{size}
|
|
23
23
|
aria-disabled={!emblaCtx.canScrollNext}
|
|
24
|
+
disabled={!emblaCtx.canScrollNext}
|
|
24
25
|
class={cn(
|
|
25
|
-
"absolute
|
|
26
|
+
"absolute touch-manipulation rounded-full",
|
|
26
27
|
emblaCtx.orientation === "horizontal"
|
|
27
28
|
? "-end-12 top-1/2 -translate-y-1/2"
|
|
28
29
|
: "start-1/2 -bottom-12 -translate-x-1/2 rotate-90",
|
|
@@ -33,6 +34,6 @@
|
|
|
33
34
|
bind:ref
|
|
34
35
|
{...restProps}
|
|
35
36
|
>
|
|
36
|
-
<
|
|
37
|
+
<ChevronRightIcon />
|
|
37
38
|
<span class="sr-only">Next slide</span>
|
|
38
39
|
</Button>
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import ArrowLeftIcon from "@lucide/svelte/icons/arrow-left";
|
|
3
2
|
import type { WithoutChildren } from "bits-ui";
|
|
4
3
|
import { getEmblaContext } from "./context.js";
|
|
5
4
|
import { cn } from "../../../utils.js";
|
|
6
5
|
import { Button, type Props } from "../button/index.js";
|
|
6
|
+
import ChevronLeftIcon from "@lucide/svelte/icons/chevron-left";
|
|
7
7
|
|
|
8
8
|
let {
|
|
9
9
|
ref = $bindable(null),
|
|
10
10
|
class: className,
|
|
11
11
|
variant = "outline",
|
|
12
|
-
size = "icon",
|
|
12
|
+
size = "icon-sm",
|
|
13
13
|
...restProps
|
|
14
14
|
}: WithoutChildren<Props> = $props();
|
|
15
15
|
|
|
@@ -21,8 +21,9 @@
|
|
|
21
21
|
{variant}
|
|
22
22
|
{size}
|
|
23
23
|
aria-disabled={!emblaCtx.canScrollPrev}
|
|
24
|
+
disabled={!emblaCtx.canScrollPrev}
|
|
24
25
|
class={cn(
|
|
25
|
-
"absolute
|
|
26
|
+
"absolute touch-manipulation rounded-full",
|
|
26
27
|
emblaCtx.orientation === "horizontal"
|
|
27
28
|
? "-start-12 top-1/2 -translate-y-1/2"
|
|
28
29
|
: "start-1/2 -top-12 -translate-x-1/2 rotate-90",
|
|
@@ -33,6 +34,6 @@
|
|
|
33
34
|
{...restProps}
|
|
34
35
|
bind:ref
|
|
35
36
|
>
|
|
36
|
-
<
|
|
37
|
+
<ChevronLeftIcon />
|
|
37
38
|
<span class="sr-only">Previous slide</span>
|
|
38
39
|
</Button>
|