@kayord/ui 3.0.12 → 4.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/README.md +70 -156
- package/dist/components/custom/animations/NumberTicker.svelte +2 -3
- package/dist/components/custom/copy-button/CopyButton.svelte +0 -1
- package/dist/components/custom/data-table/DataTable.svelte +42 -69
- package/dist/components/custom/data-table/DataTable.svelte.d.ts +14 -9
- package/dist/components/custom/data-table/DataTableFooter.svelte +7 -6
- package/dist/components/custom/data-table/DataTableFooter.svelte.d.ts +9 -8
- package/dist/components/custom/data-table/DataTableHeader.svelte +27 -13
- package/dist/components/custom/data-table/DataTableHeader.svelte.d.ts +9 -9
- package/dist/components/custom/data-table/DataTableView.svelte +7 -6
- package/dist/components/custom/data-table/DataTableView.svelte.d.ts +8 -7
- package/dist/components/custom/data-table/FullscreenModeToggle.svelte +11 -6
- package/dist/components/custom/data-table/Pagination.svelte +57 -41
- package/dist/components/custom/data-table/Pagination.svelte.d.ts +9 -8
- package/dist/components/custom/data-table/data-table-utils.js +19 -21
- package/dist/components/custom/data-table/features.d.ts +157 -0
- package/dist/components/custom/data-table/features.js +36 -0
- package/dist/components/custom/data-table/index.d.ts +5 -2
- package/dist/components/custom/data-table/index.js +3 -2
- package/dist/components/custom/data-table/shad-table.svelte.d.ts +9 -8
- package/dist/components/custom/data-table/shad-table.svelte.js +51 -230
- package/dist/components/custom/data-table/table-search-params.d.ts +9 -7
- package/dist/components/custom/data-table/table-search-params.js +29 -20
- package/dist/components/custom/data-table/table-url-sync.svelte.d.ts +42 -0
- package/dist/components/custom/data-table/table-url-sync.svelte.js +81 -0
- package/dist/components/custom/data-table/types.d.ts +9 -5
- package/dist/components/custom/light-switch.svelte/LightSwitch.svelte +1 -1
- package/dist/components/custom/loader/Loader.svelte +0 -2
- package/dist/components/custom/loader/Loader.svelte.d.ts +1 -3
- package/dist/components/custom/theme-selector/ThemeSelector.svelte +1 -1
- package/dist/components/ui/accordion/accordion-content.svelte +2 -2
- package/dist/components/ui/accordion/accordion-item.svelte +5 -1
- package/dist/components/ui/accordion/accordion-trigger.svelte +5 -11
- package/dist/components/ui/alert/alert-action.svelte +6 -1
- package/dist/components/ui/alert/alert-description.svelte +1 -1
- package/dist/components/ui/alert/alert-title.svelte +1 -1
- package/dist/components/ui/alert/alert.svelte +8 -3
- package/dist/components/ui/alert-dialog/alert-dialog-action.svelte +5 -1
- package/dist/components/ui/alert-dialog/alert-dialog-cancel.svelte +5 -1
- package/dist/components/ui/alert-dialog/alert-dialog-content.svelte +1 -1
- package/dist/components/ui/alert-dialog/alert-dialog-description.svelte +6 -5
- package/dist/components/ui/alert-dialog/alert-dialog-footer.svelte +1 -1
- package/dist/components/ui/alert-dialog/alert-dialog-header.svelte +1 -4
- package/dist/components/ui/alert-dialog/alert-dialog-media.svelte +1 -4
- package/dist/components/ui/alert-dialog/alert-dialog-overlay.svelte +6 -5
- package/dist/components/ui/alert-dialog/alert-dialog-title.svelte +6 -5
- package/dist/components/ui/avatar/avatar-fallback.svelte +6 -2
- package/dist/components/ui/avatar/avatar-group-count.svelte +1 -1
- package/dist/components/ui/avatar/avatar-group.svelte +1 -1
- package/dist/components/ui/avatar/avatar-image.svelte +6 -2
- package/dist/components/ui/avatar/avatar.svelte +1 -1
- package/dist/components/ui/badge/badge.svelte +1 -2
- package/dist/components/ui/breadcrumb/breadcrumb-ellipsis.svelte +3 -3
- package/dist/components/ui/breadcrumb/breadcrumb-item.svelte +12 -2
- package/dist/components/ui/breadcrumb/breadcrumb-list.svelte +7 -2
- package/dist/components/ui/breadcrumb/breadcrumb-page.svelte +1 -1
- package/dist/components/ui/breadcrumb/breadcrumb-separator.svelte +8 -3
- package/dist/components/ui/button/button.svelte +5 -10
- package/dist/components/ui/button/index.js +1 -1
- package/dist/components/ui/button-group/button-group-text.svelte +1 -4
- package/dist/components/ui/calendar/calendar-cell.svelte +5 -1
- package/dist/components/ui/calendar/calendar-day.svelte +7 -3
- package/dist/components/ui/calendar/calendar-grid-body.svelte +5 -1
- package/dist/components/ui/calendar/calendar-grid-head.svelte +5 -1
- package/dist/components/ui/calendar/calendar-grid-row.svelte +5 -1
- package/dist/components/ui/calendar/calendar-grid.svelte +10 -2
- package/dist/components/ui/calendar/calendar-head-cell.svelte +9 -2
- package/dist/components/ui/calendar/calendar-header.svelte +9 -2
- package/dist/components/ui/calendar/calendar-heading.svelte +10 -2
- package/dist/components/ui/calendar/calendar-month-select.svelte +7 -5
- package/dist/components/ui/calendar/calendar-months.svelte +5 -1
- package/dist/components/ui/calendar/calendar-next-button.svelte +1 -1
- package/dist/components/ui/calendar/calendar-prev-button.svelte +1 -1
- package/dist/components/ui/calendar/calendar-year-select.svelte +7 -5
- package/dist/components/ui/calendar/calendar.svelte +1 -1
- package/dist/components/ui/card/card-action.svelte +4 -1
- package/dist/components/ui/card/card-content.svelte +6 -1
- package/dist/components/ui/card/card-description.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.svelte +1 -4
- package/dist/components/ui/carousel/carousel-content.svelte +5 -1
- package/dist/components/ui/carousel/carousel-item.svelte +5 -1
- package/dist/components/ui/carousel/carousel-next.svelte +3 -3
- package/dist/components/ui/carousel/carousel-previous.svelte +3 -3
- package/dist/components/ui/carousel/carousel.svelte +6 -1
- package/dist/components/ui/chart/chart-tooltip.svelte +17 -8
- package/dist/components/ui/chart/chart-tooltip.svelte.d.ts +2 -1
- package/dist/components/ui/chart/chart-utils.js +3 -1
- package/dist/components/ui/checkbox/checkbox.svelte +9 -6
- package/dist/components/ui/collapsible/collapsible.svelte +5 -1
- package/dist/components/ui/command/command-dialog.svelte +1 -1
- package/dist/components/ui/command/command-empty.svelte +5 -1
- package/dist/components/ui/command/command-group.svelte +2 -5
- package/dist/components/ui/command/command-input.svelte +6 -5
- package/dist/components/ui/command/command-item.svelte +9 -6
- package/dist/components/ui/command/command-link-item.svelte +6 -2
- package/dist/components/ui/command/command-list.svelte +6 -2
- package/dist/components/ui/command/command-separator.svelte +6 -2
- package/dist/components/ui/command/command-shortcut.svelte +1 -4
- package/dist/components/ui/command/command.svelte +1 -1
- package/dist/components/ui/context-menu/context-menu-checkbox-item.svelte +4 -4
- 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-group.svelte +11 -2
- package/dist/components/ui/context-menu/context-menu-radio-item.svelte +4 -4
- package/dist/components/ui/context-menu/context-menu-separator.svelte +6 -2
- package/dist/components/ui/context-menu/context-menu-shortcut.svelte +1 -4
- package/dist/components/ui/context-menu/context-menu-sub-content.svelte +6 -5
- package/dist/components/ui/context-menu/context-menu-sub-trigger.svelte +2 -2
- package/dist/components/ui/context-menu/context-menu-trigger.svelte +5 -1
- package/dist/components/ui/data-table/index.d.ts +2 -3
- package/dist/components/ui/data-table/index.js +1 -3
- package/dist/components/ui/dialog/dialog-close.svelte +5 -1
- package/dist/components/ui/dialog/dialog-content.svelte +3 -3
- package/dist/components/ui/dialog/dialog-description.svelte +6 -5
- package/dist/components/ui/dialog/dialog-footer.svelte +1 -4
- package/dist/components/ui/dialog/dialog-header.svelte +6 -1
- package/dist/components/ui/dialog/dialog-overlay.svelte +6 -5
- package/dist/components/ui/dialog/dialog-title.svelte +5 -1
- package/dist/components/ui/dialog/dialog-trigger.svelte +5 -1
- package/dist/components/ui/drawer/drawer-content.svelte +2 -5
- package/dist/components/ui/drawer/drawer-description.svelte +6 -2
- package/dist/components/ui/drawer/drawer-footer.svelte +6 -1
- package/dist/components/ui/drawer/drawer-header.svelte +1 -4
- package/dist/components/ui/drawer/drawer-overlay.svelte +6 -5
- package/dist/components/ui/drawer/drawer-title.svelte +6 -2
- package/dist/components/ui/dropdown-menu/dropdown-menu-checkbox-group.svelte +6 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte +6 -6
- package/dist/components/ui/dropdown-menu/dropdown-menu-content.svelte +1 -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-group.svelte +11 -2
- package/dist/components/ui/dropdown-menu/dropdown-menu-radio-item.svelte +4 -4
- package/dist/components/ui/dropdown-menu/dropdown-menu-separator.svelte +6 -2
- package/dist/components/ui/dropdown-menu/dropdown-menu-shortcut.svelte +1 -4
- package/dist/components/ui/dropdown-menu/dropdown-menu-sub-content.svelte +6 -5
- package/dist/components/ui/dropdown-menu/dropdown-menu-sub-trigger.svelte +2 -2
- package/dist/components/ui/empty/empty-content.svelte +4 -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-title.svelte +6 -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 +7 -2
- package/dist/components/ui/field/field-separator.svelte +2 -2
- package/dist/components/ui/field/field-set.svelte +1 -4
- package/dist/components/ui/field/field-title.svelte +1 -4
- package/dist/components/ui/form/form-description.svelte +1 -1
- package/dist/components/ui/form/form-element-field.svelte +2 -1
- package/dist/components/ui/form/form-field-errors.svelte +5 -1
- package/dist/components/ui/form/form-field.svelte +2 -1
- package/dist/components/ui/form/form-label.svelte +5 -1
- package/dist/components/ui/form/form-legend.svelte +6 -2
- package/dist/components/ui/hover-card/hover-card-content.svelte +1 -4
- package/dist/components/ui/input/input.svelte +4 -3
- package/dist/components/ui/input-group/input-group-addon.svelte +1 -2
- package/dist/components/ui/input-group/input-group-input.svelte +1 -4
- package/dist/components/ui/input-group/input-group-text.svelte +1 -4
- package/dist/components/ui/input-group/input-group-textarea.svelte +1 -4
- package/dist/components/ui/input-group/input-group.svelte +1 -1
- package/dist/components/ui/input-otp/input-otp-group.svelte +1 -4
- package/dist/components/ui/input-otp/input-otp-separator.svelte +3 -3
- package/dist/components/ui/input-otp/input-otp-slot.svelte +11 -4
- package/dist/components/ui/input-otp/input-otp.svelte +1 -1
- package/dist/components/ui/item/item-actions.svelte +6 -1
- package/dist/components/ui/item/item-content.svelte +1 -1
- package/dist/components/ui/item/item-description.svelte +1 -1
- package/dist/components/ui/item/item-footer.svelte +1 -1
- package/dist/components/ui/item/item-group.svelte +1 -4
- package/dist/components/ui/item/item-header.svelte +1 -1
- package/dist/components/ui/item/item-media.svelte +1 -2
- package/dist/components/ui/item/item-separator.svelte +12 -2
- package/dist/components/ui/item/item-title.svelte +1 -4
- package/dist/components/ui/kbd/kbd-group.svelte +6 -1
- package/dist/components/ui/kbd/kbd.svelte +1 -1
- package/dist/components/ui/label/label.svelte +6 -2
- package/dist/components/ui/menubar/menubar-checkbox-item.svelte +6 -6
- package/dist/components/ui/menubar/menubar-content.svelte +1 -1
- package/dist/components/ui/menubar/menubar-item.svelte +1 -4
- package/dist/components/ui/menubar/menubar-radio-group.svelte +5 -1
- package/dist/components/ui/menubar/menubar-radio-item.svelte +4 -4
- package/dist/components/ui/menubar/menubar-separator.svelte +5 -1
- package/dist/components/ui/menubar/menubar-shortcut.svelte +1 -4
- package/dist/components/ui/menubar/menubar-sub-content.svelte +6 -5
- package/dist/components/ui/menubar/menubar-sub-trigger.svelte +2 -2
- package/dist/components/ui/menubar/menubar-trigger.svelte +6 -5
- package/dist/components/ui/menubar/menubar.svelte +6 -2
- package/dist/components/ui/native-select/index.d.ts +1 -1
- package/dist/components/ui/native-select/index.js +1 -1
- package/dist/components/ui/native-select/native-select-opt-group.svelte +5 -1
- package/dist/components/ui/native-select/native-select.svelte +7 -8
- package/dist/components/ui/navigation-menu/navigation-menu-content.svelte +6 -2
- package/dist/components/ui/navigation-menu/navigation-menu-indicator.svelte +6 -2
- package/dist/components/ui/navigation-menu/navigation-menu-item.svelte +5 -1
- package/dist/components/ui/navigation-menu/navigation-menu-link.svelte +6 -5
- package/dist/components/ui/navigation-menu/navigation-menu-list.svelte +9 -2
- package/dist/components/ui/navigation-menu/navigation-menu-trigger.svelte +2 -5
- package/dist/components/ui/navigation-menu/navigation-menu-viewport.svelte +6 -2
- package/dist/components/ui/navigation-menu/navigation-menu.svelte +4 -1
- package/dist/components/ui/pagination/pagination-content.svelte +6 -1
- package/dist/components/ui/pagination/pagination-ellipsis.svelte +3 -6
- package/dist/components/ui/pagination/pagination-item.svelte +5 -1
- package/dist/components/ui/pagination/pagination-link.svelte +5 -1
- package/dist/components/ui/pagination/pagination-next-button.svelte +1 -1
- package/dist/components/ui/pagination/pagination-next.svelte +6 -2
- package/dist/components/ui/pagination/pagination-prev-button.svelte +1 -1
- package/dist/components/ui/pagination/pagination-previous.svelte +11 -3
- package/dist/components/ui/popover/popover-content.svelte +1 -1
- package/dist/components/ui/popover/popover-description.svelte +6 -1
- package/dist/components/ui/popover/popover-header.svelte +6 -1
- package/dist/components/ui/popover/popover-title.svelte +6 -1
- package/dist/components/ui/popover/popover-trigger.svelte +11 -2
- package/dist/components/ui/progress/progress.svelte +1 -1
- package/dist/components/ui/radio-group/radio-group-item.svelte +3 -5
- package/dist/components/ui/radio-group/radio-group.svelte +1 -1
- package/dist/components/ui/range-calendar/range-calendar-cell.svelte +6 -2
- package/dist/components/ui/range-calendar/range-calendar-day.svelte +8 -4
- package/dist/components/ui/range-calendar/range-calendar-grid-row.svelte +5 -1
- package/dist/components/ui/range-calendar/range-calendar-grid.svelte +5 -1
- package/dist/components/ui/range-calendar/range-calendar-head-cell.svelte +9 -2
- package/dist/components/ui/range-calendar/range-calendar-header.svelte +9 -2
- package/dist/components/ui/range-calendar/range-calendar-heading.svelte +10 -2
- package/dist/components/ui/range-calendar/range-calendar-month-select.svelte +6 -4
- package/dist/components/ui/range-calendar/range-calendar-months.svelte +5 -1
- package/dist/components/ui/range-calendar/range-calendar-next-button.svelte +1 -1
- package/dist/components/ui/range-calendar/range-calendar-prev-button.svelte +1 -1
- package/dist/components/ui/range-calendar/range-calendar-year-select.svelte +6 -4
- package/dist/components/ui/range-calendar/range-calendar.svelte +1 -1
- package/dist/components/ui/resizable/resizable-handle.svelte +2 -2
- package/dist/components/ui/resizable/resizable-pane-group.svelte +4 -1
- package/dist/components/ui/scroll-area/scroll-area-scrollbar.svelte +5 -2
- package/dist/components/ui/scroll-area/scroll-area.svelte +7 -2
- package/dist/components/ui/select/select-content.svelte +4 -2
- package/dist/components/ui/select/select-group-heading.svelte +1 -1
- package/dist/components/ui/select/select-group.svelte +11 -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 +3 -6
- package/dist/components/ui/select/select-scroll-up-button.svelte +3 -6
- package/dist/components/ui/select/select-separator.svelte +6 -2
- package/dist/components/ui/select/select-trigger.svelte +3 -3
- package/dist/components/ui/select/select.svelte +5 -1
- package/dist/components/ui/separator/separator.svelte +1 -1
- package/dist/components/ui/sheet/sheet-content.svelte +3 -3
- package/dist/components/ui/sheet/sheet-description.svelte +6 -2
- package/dist/components/ui/sheet/sheet-footer.svelte +6 -1
- package/dist/components/ui/sheet/sheet-header.svelte +6 -1
- package/dist/components/ui/sheet/sheet-overlay.svelte +6 -2
- package/dist/components/ui/sheet/sheet-title.svelte +6 -2
- package/dist/components/ui/sidebar/sidebar-content.svelte +1 -1
- package/dist/components/ui/sidebar/sidebar-footer.svelte +1 -1
- package/dist/components/ui/sidebar/sidebar-group-content.svelte +1 -1
- package/dist/components/ui/sidebar/sidebar-group.svelte +1 -1
- package/dist/components/ui/sidebar/sidebar-header.svelte +1 -1
- package/dist/components/ui/sidebar/sidebar-input.svelte +1 -1
- package/dist/components/ui/sidebar/sidebar-inset.svelte +1 -4
- package/dist/components/ui/sidebar/sidebar-menu-badge.svelte +1 -1
- package/dist/components/ui/sidebar/sidebar-menu-button.svelte +1 -2
- package/dist/components/ui/sidebar/sidebar-menu-skeleton.svelte +1 -1
- package/dist/components/ui/sidebar/sidebar-menu-sub.svelte +1 -4
- package/dist/components/ui/sidebar/sidebar-menu.svelte +1 -1
- package/dist/components/ui/sidebar/sidebar-provider.svelte +10 -2
- package/dist/components/ui/sidebar/sidebar-rail.svelte +1 -1
- package/dist/components/ui/sidebar/sidebar-separator.svelte +6 -2
- package/dist/components/ui/sidebar/sidebar-trigger.svelte +2 -2
- package/dist/components/ui/sidebar/sidebar.svelte +11 -5
- package/dist/components/ui/skeleton/skeleton.svelte +1 -1
- package/dist/components/ui/slider/slider.svelte +6 -4
- package/dist/components/ui/sonner/sonner.svelte +5 -5
- package/dist/components/ui/spinner/spinner.svelte +2 -10
- package/dist/components/ui/switch/switch.svelte +2 -2
- package/dist/components/ui/table/table-caption.svelte +1 -1
- package/dist/components/ui/table/table-cell.svelte +7 -7
- package/dist/components/ui/table/table-footer.svelte +1 -1
- package/dist/components/ui/table/table-head.svelte +7 -10
- package/dist/components/ui/table/table-header.svelte +6 -1
- package/dist/components/ui/table/table-row.svelte +1 -6
- package/dist/components/ui/tabs/tabs-content.svelte +6 -2
- package/dist/components/ui/tabs/tabs-trigger.svelte +7 -3
- package/dist/components/ui/tabs/tabs.svelte +1 -1
- package/dist/components/ui/textarea/textarea.svelte +1 -1
- package/dist/components/ui/toggle/index.d.ts +1 -1
- package/dist/components/ui/toggle/index.js +1 -1
- package/dist/components/ui/toggle-group/toggle-group-item.svelte +1 -1
- package/dist/components/ui/toggle-group/toggle-group.svelte +1 -1
- package/dist/components/ui/tooltip/tooltip-content.svelte +2 -2
- package/dist/data-table/index.d.ts +4 -1
- package/dist/data-table/index.js +11 -1
- package/package.json +32 -26
- package/dist/components/custom/data-table/shad-table-old.svelte.d.ts +0 -9
- package/dist/components/custom/data-table/shad-table-old.svelte.js +0 -202
- package/dist/components/ui/data-table/data-table.svelte.d.ts +0 -40
- package/dist/components/ui/data-table/data-table.svelte.js +0 -110
- package/dist/components/ui/data-table/flex-render.svelte +0 -37
- package/dist/components/ui/data-table/flex-render.svelte.d.ts +0 -33
- package/dist/components/ui/data-table/render-helpers.d.ts +0 -90
- package/dist/components/ui/data-table/render-helpers.js +0 -99
|
@@ -2,12 +2,16 @@
|
|
|
2
2
|
import { DropdownMenu as DropdownMenuPrimitive } from "bits-ui";
|
|
3
3
|
import { cn } from "../../../utils.js";
|
|
4
4
|
|
|
5
|
-
let {
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
...restProps
|
|
9
|
+
}: DropdownMenuPrimitive.SeparatorProps = $props();
|
|
6
10
|
</script>
|
|
7
11
|
|
|
8
12
|
<DropdownMenuPrimitive.Separator
|
|
9
13
|
bind:ref
|
|
10
14
|
data-slot="dropdown-menu-separator"
|
|
11
|
-
class={cn("
|
|
15
|
+
class={cn("-mx-1 my-1 h-px bg-border", className)}
|
|
12
16
|
{...restProps}
|
|
13
17
|
/>
|
|
@@ -13,10 +13,7 @@
|
|
|
13
13
|
<span
|
|
14
14
|
bind:this={ref}
|
|
15
15
|
data-slot="dropdown-menu-shortcut"
|
|
16
|
-
class={cn(
|
|
17
|
-
"text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground ml-auto text-xs tracking-widest",
|
|
18
|
-
className
|
|
19
|
-
)}
|
|
16
|
+
class={cn("ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground", className)}
|
|
20
17
|
{...restProps}
|
|
21
18
|
>
|
|
22
19
|
{@render children?.()}
|
|
@@ -2,15 +2,16 @@
|
|
|
2
2
|
import { DropdownMenu as DropdownMenuPrimitive } from "bits-ui";
|
|
3
3
|
import { cn } from "../../../utils.js";
|
|
4
4
|
|
|
5
|
-
let {
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
...restProps
|
|
9
|
+
}: DropdownMenuPrimitive.SubContentProps = $props();
|
|
6
10
|
</script>
|
|
7
11
|
|
|
8
12
|
<DropdownMenuPrimitive.SubContent
|
|
9
13
|
bind:ref
|
|
10
14
|
data-slot="dropdown-menu-sub-content"
|
|
11
|
-
class={cn(
|
|
12
|
-
"bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 w-auto min-w-[96px] rounded-lg p-1 shadow-lg ring-1 duration-100",
|
|
13
|
-
className
|
|
14
|
-
)}
|
|
15
|
+
class={cn("min-w-[96px] rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 w-auto", className)}
|
|
15
16
|
{...restProps}
|
|
16
17
|
/>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { DropdownMenu as DropdownMenuPrimitive } from "bits-ui";
|
|
3
|
-
import ChevronRightIcon from
|
|
3
|
+
import ChevronRightIcon from '@lucide/svelte/icons/chevron-right';
|
|
4
4
|
import { cn } from "../../../utils.js";
|
|
5
5
|
|
|
6
6
|
let {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
data-slot="dropdown-menu-sub-trigger"
|
|
20
20
|
data-inset={inset}
|
|
21
21
|
class={cn(
|
|
22
|
-
"focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground flex cursor-default items-center
|
|
22
|
+
"gap-1.5 rounded-md px-1.5 py-1 text-sm focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg:not([class*='size-'])]:size-4 flex cursor-default items-center outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
23
23
|
className
|
|
24
24
|
)}
|
|
25
25
|
{...restProps}
|
|
@@ -13,7 +13,10 @@
|
|
|
13
13
|
<div
|
|
14
14
|
bind:this={ref}
|
|
15
15
|
data-slot="empty-content"
|
|
16
|
-
class={cn(
|
|
16
|
+
class={cn(
|
|
17
|
+
"gap-2.5 text-sm flex w-full max-w-sm min-w-0 flex-col items-center text-balance",
|
|
18
|
+
className
|
|
19
|
+
)}
|
|
17
20
|
{...restProps}
|
|
18
21
|
>
|
|
19
22
|
{@render children?.()}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
bind:this={ref}
|
|
15
15
|
data-slot="empty-description"
|
|
16
16
|
class={cn(
|
|
17
|
-
"text-
|
|
17
|
+
"text-sm/relaxed text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
|
|
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="empty-title"
|
|
16
|
+
class={cn("text-sm font-medium tracking-tight", className)}
|
|
17
|
+
{...restProps}
|
|
18
|
+
>
|
|
14
19
|
{@render children?.()}
|
|
15
20
|
</div>
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
bind:this={ref}
|
|
15
15
|
data-slot="empty"
|
|
16
16
|
class={cn(
|
|
17
|
-
"flex w-full min-w-0 flex-1 flex-col items-center justify-center
|
|
17
|
+
"gap-4 rounded-xl border-dashed p-6 flex w-full min-w-0 flex-1 flex-col items-center justify-center text-center text-balance",
|
|
18
18
|
className
|
|
19
19
|
)}
|
|
20
20
|
{...restProps}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
<div
|
|
14
14
|
bind:this={ref}
|
|
15
15
|
data-slot="field-content"
|
|
16
|
-
class={cn("group/field-content flex flex-1 flex-col
|
|
16
|
+
class={cn("gap-0.5 group/field-content flex flex-1 flex-col leading-snug", className)}
|
|
17
17
|
{...restProps}
|
|
18
18
|
>
|
|
19
19
|
{@render children?.()}
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
bind:this={ref}
|
|
15
15
|
data-slot="field-description"
|
|
16
16
|
class={cn(
|
|
17
|
-
"text-
|
|
17
|
+
"text-left text-sm text-muted-foreground [[data-variant=legend]+&]:-mt-1.5 leading-normal font-normal group-has-[[data-orientation=horizontal]]/field:text-balance",
|
|
18
18
|
"last:mt-0 nth-last-2:-mt-1",
|
|
19
|
-
"[&>a
|
|
19
|
+
"[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
|
|
20
20
|
className
|
|
21
21
|
)}
|
|
22
22
|
{...restProps}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
bind:this={ref}
|
|
15
15
|
data-slot="field-group"
|
|
16
16
|
class={cn(
|
|
17
|
-
"
|
|
17
|
+
"gap-5 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4 group/field-group @container/field-group flex w-full flex-col",
|
|
18
18
|
className
|
|
19
19
|
)}
|
|
20
20
|
{...restProps}
|
|
@@ -3,14 +3,19 @@
|
|
|
3
3
|
import { cn } from "../../../utils.js";
|
|
4
4
|
import type { ComponentProps } from "svelte";
|
|
5
5
|
|
|
6
|
-
let {
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
class: className,
|
|
9
|
+
children,
|
|
10
|
+
...restProps
|
|
11
|
+
}: ComponentProps<typeof Label> = $props();
|
|
7
12
|
</script>
|
|
8
13
|
|
|
9
14
|
<Label
|
|
10
15
|
bind:ref
|
|
11
16
|
data-slot="field-label"
|
|
12
17
|
class={cn(
|
|
13
|
-
"
|
|
18
|
+
"gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border *:data-[slot=field]:p-2.5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10 group/field-label peer/field-label flex w-fit leading-snug",
|
|
14
19
|
"has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",
|
|
15
20
|
className
|
|
16
21
|
)}
|
|
@@ -20,13 +20,13 @@
|
|
|
20
20
|
bind:this={ref}
|
|
21
21
|
data-slot="field-separator"
|
|
22
22
|
data-content={hasContent}
|
|
23
|
-
class={cn("
|
|
23
|
+
class={cn("-my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2 relative", className)}
|
|
24
24
|
{...restProps}
|
|
25
25
|
>
|
|
26
26
|
<Separator class="absolute inset-0 top-1/2" />
|
|
27
27
|
{#if children}
|
|
28
28
|
<span
|
|
29
|
-
class="text-muted-foreground
|
|
29
|
+
class="px-2 text-muted-foreground relative mx-auto block w-fit bg-background"
|
|
30
30
|
data-slot="field-separator-content"
|
|
31
31
|
>
|
|
32
32
|
{@render children()}
|
|
@@ -13,10 +13,7 @@
|
|
|
13
13
|
<fieldset
|
|
14
14
|
bind:this={ref}
|
|
15
15
|
data-slot="field-set"
|
|
16
|
-
class={cn(
|
|
17
|
-
"flex flex-col gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",
|
|
18
|
-
className
|
|
19
|
-
)}
|
|
16
|
+
class={cn("gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3 flex flex-col", className)}
|
|
20
17
|
{...restProps}
|
|
21
18
|
>
|
|
22
19
|
{@render children?.()}
|
|
@@ -13,10 +13,7 @@
|
|
|
13
13
|
<div
|
|
14
14
|
bind:this={ref}
|
|
15
15
|
data-slot="field-label"
|
|
16
|
-
class={cn(
|
|
17
|
-
"flex w-fit items-center gap-2 text-sm leading-snug leading-snug font-medium group-data-[disabled=true]/field:opacity-50",
|
|
18
|
-
className
|
|
19
|
-
)}
|
|
16
|
+
class={cn("gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50 flex w-fit items-center leading-snug", className)}
|
|
20
17
|
{...restProps}
|
|
21
18
|
>
|
|
22
19
|
{@render children?.()}
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
name,
|
|
12
12
|
children: childrenProp,
|
|
13
13
|
...restProps
|
|
14
|
-
}: WithoutChildren<WithElementRef<HTMLAttributes<HTMLDivElement>>> &
|
|
14
|
+
}: WithoutChildren<WithElementRef<HTMLAttributes<HTMLDivElement>>> &
|
|
15
|
+
FormPrimitive.ElementFieldProps<T, U> = $props();
|
|
15
16
|
</script>
|
|
16
17
|
|
|
17
18
|
<FormPrimitive.ElementField {form} {name}>
|
|
@@ -13,7 +13,11 @@
|
|
|
13
13
|
} = $props();
|
|
14
14
|
</script>
|
|
15
15
|
|
|
16
|
-
<FormPrimitive.FieldErrors
|
|
16
|
+
<FormPrimitive.FieldErrors
|
|
17
|
+
bind:ref
|
|
18
|
+
class={cn("text-sm font-medium text-destructive", className)}
|
|
19
|
+
{...restProps}
|
|
20
|
+
>
|
|
17
21
|
{#snippet children({ errors, errorProps })}
|
|
18
22
|
{#if childrenProp}
|
|
19
23
|
{@render childrenProp({ errors, errorProps })}
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
name,
|
|
12
12
|
children: childrenProp,
|
|
13
13
|
...restProps
|
|
14
|
-
}: FormPrimitive.FieldProps<T, U> &
|
|
14
|
+
}: FormPrimitive.FieldProps<T, U> &
|
|
15
|
+
WithoutChildren<WithElementRef<HTMLAttributes<HTMLDivElement>>> = $props();
|
|
15
16
|
</script>
|
|
16
17
|
|
|
17
18
|
<FormPrimitive.Field {form} {name}>
|
|
@@ -13,7 +13,11 @@
|
|
|
13
13
|
|
|
14
14
|
<FormPrimitive.Label {...restProps} bind:ref>
|
|
15
15
|
{#snippet child({ props })}
|
|
16
|
-
<Label
|
|
16
|
+
<Label
|
|
17
|
+
{...props}
|
|
18
|
+
data-slot="form-label"
|
|
19
|
+
class={cn("data-[fs-error]:text-destructive", className)}
|
|
20
|
+
>
|
|
17
21
|
{@render children?.()}
|
|
18
22
|
</Label>
|
|
19
23
|
{/snippet}
|
|
@@ -2,11 +2,15 @@
|
|
|
2
2
|
import * as FormPrimitive from "formsnap";
|
|
3
3
|
import { cn, type WithoutChild } from "../../../utils.js";
|
|
4
4
|
|
|
5
|
-
let {
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
...restProps
|
|
9
|
+
}: WithoutChild<FormPrimitive.LegendProps> = $props();
|
|
6
10
|
</script>
|
|
7
11
|
|
|
8
12
|
<FormPrimitive.Legend
|
|
9
13
|
bind:ref
|
|
10
|
-
class={cn("data-[fs-error]:text-destructive
|
|
14
|
+
class={cn("text-sm leading-none font-medium data-[fs-error]:text-destructive", className)}
|
|
11
15
|
{...restProps}
|
|
12
16
|
/>
|
|
@@ -22,10 +22,7 @@
|
|
|
22
22
|
data-slot="hover-card-content"
|
|
23
23
|
{align}
|
|
24
24
|
{sideOffset}
|
|
25
|
-
class={cn(
|
|
26
|
-
"bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 z-50 w-64 origin-(--transform-origin) rounded-lg p-2.5 text-sm shadow-md ring-1 outline-hidden duration-100",
|
|
27
|
-
className
|
|
28
|
-
)}
|
|
25
|
+
class={cn("w-64 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 z-50 origin-(--transform-origin) outline-hidden", className)}
|
|
29
26
|
{...restProps}
|
|
30
27
|
/>
|
|
31
28
|
</HoverCardPortal>
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
type InputType = Exclude<HTMLInputTypeAttribute, "file">;
|
|
6
6
|
|
|
7
7
|
type Props = WithElementRef<
|
|
8
|
-
Omit<HTMLInputAttributes, "type"> &
|
|
8
|
+
Omit<HTMLInputAttributes, "type"> &
|
|
9
|
+
({ type: "file"; files?: FileList } | { type?: InputType; files?: undefined })
|
|
9
10
|
>;
|
|
10
11
|
|
|
11
12
|
let {
|
|
@@ -24,7 +25,7 @@
|
|
|
24
25
|
bind:this={ref}
|
|
25
26
|
data-slot={dataSlot}
|
|
26
27
|
class={cn(
|
|
27
|
-
"border-input focus-visible:border-ring focus-visible:ring-ring/50 disabled:bg-input/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40
|
|
28
|
+
"h-8 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors file:h-6 file:text-sm file:font-medium focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:bg-input/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 w-full min-w-0 outline-none file:inline-flex file:border-0 file:bg-transparent file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
28
29
|
className
|
|
29
30
|
)}
|
|
30
31
|
type="file"
|
|
@@ -37,7 +38,7 @@
|
|
|
37
38
|
bind:this={ref}
|
|
38
39
|
data-slot={dataSlot}
|
|
39
40
|
class={cn(
|
|
40
|
-
"border-input focus-visible:border-ring focus-visible:ring-ring/50 disabled:bg-input/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40
|
|
41
|
+
"h-8 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors file:h-6 file:text-sm file:font-medium focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:bg-input/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 w-full min-w-0 outline-none file:inline-flex file:border-0 file:bg-transparent file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
41
42
|
className
|
|
42
43
|
)}
|
|
43
44
|
{type}
|
|
@@ -6,8 +6,7 @@
|
|
|
6
6
|
align: {
|
|
7
7
|
"inline-start": "pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem] order-first",
|
|
8
8
|
"inline-end": "pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem] order-last",
|
|
9
|
-
"block-start":
|
|
10
|
-
"px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2 order-first w-full justify-start",
|
|
9
|
+
"block-start": "px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2 order-first w-full justify-start",
|
|
11
10
|
"block-end": "px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2 order-last w-full justify-start",
|
|
12
11
|
},
|
|
13
12
|
},
|
|
@@ -14,10 +14,7 @@
|
|
|
14
14
|
<Input
|
|
15
15
|
bind:ref
|
|
16
16
|
data-slot="input-group-control"
|
|
17
|
-
class={cn(
|
|
18
|
-
"flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent",
|
|
19
|
-
className
|
|
20
|
-
)}
|
|
17
|
+
class={cn("rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent flex-1", className)}
|
|
21
18
|
bind:value
|
|
22
19
|
{...props}
|
|
23
20
|
/>
|
|
@@ -12,10 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
<span
|
|
14
14
|
bind:this={ref}
|
|
15
|
-
class={cn(
|
|
16
|
-
"text-muted-foreground flex items-center gap-2 text-sm [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
|
|
17
|
-
className
|
|
18
|
-
)}
|
|
15
|
+
class={cn("gap-2 text-sm text-muted-foreground [&_svg:not([class*='size-'])]:size-4 flex items-center [&_svg]:pointer-events-none", className)}
|
|
19
16
|
{...restProps}
|
|
20
17
|
>
|
|
21
18
|
{@render children?.()}
|
|
@@ -14,10 +14,7 @@
|
|
|
14
14
|
<Textarea
|
|
15
15
|
bind:ref
|
|
16
16
|
data-slot="input-group-control"
|
|
17
|
-
class={cn(
|
|
18
|
-
"flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent",
|
|
19
|
-
className
|
|
20
|
-
)}
|
|
17
|
+
class={cn("rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent flex-1 resize-none", className)}
|
|
21
18
|
bind:value
|
|
22
19
|
{...props}
|
|
23
20
|
/>
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
data-slot="input-group"
|
|
16
16
|
role="group"
|
|
17
17
|
class={cn(
|
|
18
|
-
"group/input-group border-input has-disabled:bg-input/50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-
|
|
18
|
+
"group/input-group h-8 rounded-lg border border-input transition-colors in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5 relative flex w-full min-w-0 items-center outline-none has-[>textarea]:h-auto",
|
|
19
19
|
className
|
|
20
20
|
)}
|
|
21
21
|
{...props}
|
|
@@ -13,10 +13,7 @@
|
|
|
13
13
|
<div
|
|
14
14
|
bind:this={ref}
|
|
15
15
|
data-slot="input-otp-group"
|
|
16
|
-
class={cn(
|
|
17
|
-
"has-aria-invalid:border-destructive has-aria-invalid:ring-destructive/20 dark:has-aria-invalid:ring-destructive/40 flex items-center rounded-lg has-aria-invalid:ring-3",
|
|
18
|
-
className
|
|
19
|
-
)}
|
|
16
|
+
class={cn("rounded-lg has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 dark:has-aria-invalid:ring-destructive/40 flex items-center", className)}
|
|
20
17
|
{...restProps}
|
|
21
18
|
>
|
|
22
19
|
{@render children?.()}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import MinusIcon from
|
|
2
|
+
import MinusIcon from '@lucide/svelte/icons/minus';
|
|
3
3
|
import type { WithElementRef } from "../../../utils.js";
|
|
4
4
|
import { cn } from "../../../utils.js";
|
|
5
5
|
import type { HTMLAttributes } from "svelte/elements";
|
|
@@ -16,12 +16,12 @@
|
|
|
16
16
|
bind:this={ref}
|
|
17
17
|
data-slot="input-otp-separator"
|
|
18
18
|
role="separator"
|
|
19
|
-
class={cn("
|
|
19
|
+
class={cn("[&_svg:not([class*='size-'])]:size-4 flex items-center", className)}
|
|
20
20
|
{...restProps}
|
|
21
21
|
>
|
|
22
22
|
{#if children}
|
|
23
23
|
{@render children?.()}
|
|
24
24
|
{:else}
|
|
25
|
-
<MinusIcon
|
|
25
|
+
<MinusIcon />
|
|
26
26
|
{/if}
|
|
27
27
|
</div>
|
|
@@ -2,7 +2,12 @@
|
|
|
2
2
|
import { PinInput as InputOTPPrimitive } from "bits-ui";
|
|
3
3
|
import { cn } from "../../../utils.js";
|
|
4
4
|
|
|
5
|
-
let {
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
cell,
|
|
8
|
+
class: className,
|
|
9
|
+
...restProps
|
|
10
|
+
}: InputOTPPrimitive.CellProps = $props();
|
|
6
11
|
</script>
|
|
7
12
|
|
|
8
13
|
<InputOTPPrimitive.Cell
|
|
@@ -10,15 +15,17 @@
|
|
|
10
15
|
bind:ref
|
|
11
16
|
data-slot="input-otp-slot"
|
|
12
17
|
class={cn(
|
|
13
|
-
"border-input aria-invalid:border-destructive data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:border-destructive data-[active=true]:aria-invalid:ring-destructive/20 dark:bg-input/30 dark:data-[active=true]:aria-invalid:ring-destructive/40 relative flex
|
|
18
|
+
"size-8 border-y border-r border-input text-sm transition-all outline-none first:rounded-l-lg first:border-l last:rounded-r-lg aria-invalid:border-destructive data-[active=true]:border-ring data-[active=true]:ring-3 data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:border-destructive data-[active=true]:aria-invalid:ring-destructive/20 dark:bg-input/30 dark:data-[active=true]:aria-invalid:ring-destructive/40 relative flex items-center justify-center data-[active=true]:z-10",
|
|
14
19
|
className
|
|
15
20
|
)}
|
|
16
21
|
{...restProps}
|
|
17
22
|
>
|
|
18
23
|
{cell.char}
|
|
19
24
|
{#if cell.hasFakeCaret}
|
|
20
|
-
<div
|
|
21
|
-
|
|
25
|
+
<div
|
|
26
|
+
class="cn-input-otp-caret pointer-events-none absolute inset-0 flex items-center justify-center"
|
|
27
|
+
>
|
|
28
|
+
<div class="h-4 w-px animate-caret-blink bg-foreground duration-1000 h-4 w-px bg-foreground"></div>
|
|
22
29
|
</div>
|
|
23
30
|
{/if}
|
|
24
31
|
</InputOTPPrimitive.Cell>
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
data-slot="input-otp"
|
|
17
17
|
spellcheck={false}
|
|
18
18
|
class={cn(
|
|
19
|
-
"cn-input-otp-input flex items-center
|
|
19
|
+
"cn-input-otp-input gap-2 flex items-center disabled:cursor-not-allowed has-disabled:opacity-50",
|
|
20
20
|
className
|
|
21
21
|
)}
|
|
22
22
|
{...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="item-actions"
|
|
16
|
+
class={cn("gap-2 flex items-center", className)}
|
|
17
|
+
{...restProps}
|
|
18
|
+
>
|
|
14
19
|
{@render children?.()}
|
|
15
20
|
</div>
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
bind:this={ref}
|
|
15
15
|
data-slot="item-content"
|
|
16
16
|
class={cn(
|
|
17
|
-
"
|
|
17
|
+
"gap-1 group-data-[size=xs]/item:gap-0 flex flex-1 flex-col [&+[data-slot=item-content]]:flex-none",
|
|
18
18
|
className
|
|
19
19
|
)}
|
|
20
20
|
{...restProps}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
bind:this={ref}
|
|
15
15
|
data-slot="item-description"
|
|
16
16
|
class={cn(
|
|
17
|
-
"text-
|
|
17
|
+
"text-left text-sm leading-normal text-muted-foreground group-data-[size=xs]/item:text-xs line-clamp-2 font-normal [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
|
|
18
18
|
className
|
|
19
19
|
)}
|
|
20
20
|
{...restProps}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
<div
|
|
14
14
|
bind:this={ref}
|
|
15
15
|
data-slot="item-footer"
|
|
16
|
-
class={cn("flex basis-full items-center justify-between
|
|
16
|
+
class={cn("gap-2 flex basis-full items-center justify-between", className)}
|
|
17
17
|
{...restProps}
|
|
18
18
|
>
|
|
19
19
|
{@render children?.()}
|
|
@@ -14,10 +14,7 @@
|
|
|
14
14
|
bind:this={ref}
|
|
15
15
|
role="list"
|
|
16
16
|
data-slot="item-group"
|
|
17
|
-
class={cn(
|
|
18
|
-
"group/item-group flex w-full flex-col gap-4 has-data-[size=sm]:gap-2.5 has-data-[size=xs]:gap-2",
|
|
19
|
-
className
|
|
20
|
-
)}
|
|
17
|
+
class={cn("gap-4 has-data-[size=sm]:gap-2.5 has-data-[size=xs]:gap-2 group/item-group flex w-full flex-col", className)}
|
|
21
18
|
{...restProps}
|
|
22
19
|
>
|
|
23
20
|
{@render children?.()}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
<div
|
|
14
14
|
bind:this={ref}
|
|
15
15
|
data-slot="item-header"
|
|
16
|
-
class={cn("flex basis-full items-center justify-between
|
|
16
|
+
class={cn("gap-2 flex basis-full items-center justify-between", className)}
|
|
17
17
|
{...restProps}
|
|
18
18
|
>
|
|
19
19
|
{@render children?.()}
|
|
@@ -7,8 +7,7 @@
|
|
|
7
7
|
variant: {
|
|
8
8
|
default: "bg-transparent",
|
|
9
9
|
icon: "[&_svg:not([class*='size-'])]:size-4",
|
|
10
|
-
image:
|
|
11
|
-
"size-10 overflow-hidden rounded-sm group-data-[size=sm]/item:size-8 group-data-[size=xs]/item:size-6 [&_img]:size-full [&_img]:object-cover",
|
|
10
|
+
image: "size-10 overflow-hidden rounded-sm group-data-[size=sm]/item:size-8 group-data-[size=xs]/item:size-6 [&_img]:size-full [&_img]:object-cover",
|
|
12
11
|
},
|
|
13
12
|
},
|
|
14
13
|
defaultVariants: {
|
|
@@ -3,7 +3,17 @@
|
|
|
3
3
|
import { cn } from "../../../utils.js";
|
|
4
4
|
import type { ComponentProps } from "svelte";
|
|
5
5
|
|
|
6
|
-
let {
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
class: className,
|
|
9
|
+
...restProps
|
|
10
|
+
}: ComponentProps<typeof Separator> = $props();
|
|
7
11
|
</script>
|
|
8
12
|
|
|
9
|
-
<Separator
|
|
13
|
+
<Separator
|
|
14
|
+
bind:ref
|
|
15
|
+
data-slot="item-separator"
|
|
16
|
+
orientation="horizontal"
|
|
17
|
+
class={cn("my-2", className)}
|
|
18
|
+
{...restProps}
|
|
19
|
+
/>
|
|
@@ -13,10 +13,7 @@
|
|
|
13
13
|
<div
|
|
14
14
|
bind:this={ref}
|
|
15
15
|
data-slot="item-title"
|
|
16
|
-
class={cn(
|
|
17
|
-
"line-clamp-1 flex w-fit items-center gap-2 text-sm leading-snug font-medium underline-offset-4",
|
|
18
|
-
className
|
|
19
|
-
)}
|
|
16
|
+
class={cn("gap-2 text-sm leading-snug font-medium underline-offset-4 line-clamp-1 flex w-fit items-center", className)}
|
|
20
17
|
{...restProps}
|
|
21
18
|
>
|
|
22
19
|
{@render children?.()}
|