@kayord/ui 2.1.14 → 3.0.1
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 +16 -16
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import { Toaster as Sonner, type ToasterProps as SonnerProps } from "svelte-sonner";
|
|
3
|
+
import { mode } from "mode-watcher";
|
|
4
4
|
import Loader2Icon from "@lucide/svelte/icons/loader-2";
|
|
5
|
+
import CircleCheckIcon from "@lucide/svelte/icons/circle-check";
|
|
5
6
|
import OctagonXIcon from "@lucide/svelte/icons/octagon-x";
|
|
7
|
+
import InfoIcon from "@lucide/svelte/icons/info";
|
|
6
8
|
import TriangleAlertIcon from "@lucide/svelte/icons/triangle-alert";
|
|
7
9
|
|
|
8
|
-
import { Toaster as Sonner, type ToasterProps as SonnerProps } from "svelte-sonner";
|
|
9
|
-
import { mode } from "mode-watcher";
|
|
10
|
-
|
|
11
10
|
let { ...restProps }: SonnerProps = $props();
|
|
12
11
|
</script>
|
|
13
12
|
|
|
@@ -16,7 +15,8 @@
|
|
|
16
15
|
class="toaster group"
|
|
17
16
|
style="--normal-bg: var(--color-popover); --normal-text: var(--color-popover-foreground); --normal-border: var(--color-border);"
|
|
18
17
|
{...restProps}
|
|
19
|
-
|
|
18
|
+
>
|
|
19
|
+
{#snippet loadingIcon()}
|
|
20
20
|
<Loader2Icon class="size-4 animate-spin" />
|
|
21
21
|
{/snippet}
|
|
22
22
|
{#snippet successIcon()}
|
|
@@ -1,9 +1,23 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { cn } from "../../../utils.js";
|
|
3
3
|
import Loader2Icon from "@lucide/svelte/icons/loader-2";
|
|
4
|
-
import type {
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
import type { SVGAttributes } from "svelte/elements";
|
|
5
|
+
let {
|
|
6
|
+
class: className,
|
|
7
|
+
role = "status",
|
|
8
|
+
// we add color and stroke for compatibility with different icon libraries props
|
|
9
|
+
color,
|
|
10
|
+
stroke,
|
|
11
|
+
"aria-label": ariaLabel = "Loading",
|
|
12
|
+
...restProps
|
|
13
|
+
}: SVGAttributes<SVGSVGElement> = $props();
|
|
7
14
|
</script>
|
|
8
15
|
|
|
9
|
-
<Loader2Icon
|
|
16
|
+
<Loader2Icon
|
|
17
|
+
{role}
|
|
18
|
+
color={color === null ? undefined : color}
|
|
19
|
+
stroke={stroke === null ? undefined : stroke}
|
|
20
|
+
aria-label={ariaLabel}
|
|
21
|
+
class={cn("size-4 animate-spin", className)}
|
|
22
|
+
{...restProps as any}
|
|
23
|
+
/>
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import type { SVGAttributes } from "svelte/elements";
|
|
2
|
+
declare const Spinner: import("svelte").Component<SVGAttributes<SVGSVGElement>, {}, "">;
|
|
2
3
|
type Spinner = ReturnType<typeof Spinner>;
|
|
3
4
|
export default Spinner;
|
|
@@ -6,24 +6,26 @@
|
|
|
6
6
|
ref = $bindable(null),
|
|
7
7
|
class: className,
|
|
8
8
|
checked = $bindable(false),
|
|
9
|
+
size = "default",
|
|
9
10
|
...restProps
|
|
10
|
-
}: WithoutChildrenOrChild<SwitchPrimitive.RootProps>
|
|
11
|
+
}: WithoutChildrenOrChild<SwitchPrimitive.RootProps> & {
|
|
12
|
+
size?: "sm" | "default";
|
|
13
|
+
} = $props();
|
|
11
14
|
</script>
|
|
12
15
|
|
|
13
16
|
<SwitchPrimitive.Root
|
|
14
17
|
bind:ref
|
|
15
18
|
bind:checked
|
|
16
19
|
data-slot="switch"
|
|
20
|
+
data-size={size}
|
|
17
21
|
class={cn(
|
|
18
|
-
"data-
|
|
22
|
+
"data-checked:bg-primary data-unchecked:bg-input 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 dark:data-unchecked:bg-input/80 peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:ring-3 aria-invalid:ring-3 data-disabled:cursor-not-allowed data-disabled:opacity-50 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px]",
|
|
19
23
|
className
|
|
20
24
|
)}
|
|
21
25
|
{...restProps}
|
|
22
26
|
>
|
|
23
27
|
<SwitchPrimitive.Thumb
|
|
24
28
|
data-slot="switch-thumb"
|
|
25
|
-
class=
|
|
26
|
-
"bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 rtl:data-[state=checked]:translate-x-[calc(-100%)]"
|
|
27
|
-
)}
|
|
29
|
+
class="bg-background dark:data-unchecked:bg-foreground dark:data-checked:bg-primary-foreground pointer-events-none block rounded-full ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 rtl:data-[state=checked]:translate-x-[calc(-100%)]"
|
|
28
30
|
/>
|
|
29
31
|
</SwitchPrimitive.Root>
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { Switch as SwitchPrimitive } from "bits-ui";
|
|
2
|
-
|
|
2
|
+
import { type WithoutChildrenOrChild } from "../../../utils.js";
|
|
3
|
+
type $$ComponentProps = WithoutChildrenOrChild<SwitchPrimitive.RootProps> & {
|
|
4
|
+
size?: "sm" | "default";
|
|
5
|
+
};
|
|
6
|
+
declare const Switch: import("svelte").Component<$$ComponentProps, {}, "ref" | "checked">;
|
|
3
7
|
type Switch = ReturnType<typeof Switch>;
|
|
4
8
|
export default Switch;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<td
|
|
9
9
|
bind:this={ref}
|
|
10
10
|
data-slot="table-cell"
|
|
11
|
-
class={cn("
|
|
11
|
+
class={cn("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0", className)}
|
|
12
12
|
{...restProps}
|
|
13
13
|
>
|
|
14
14
|
{@render children?.()}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
bind:this={ref}
|
|
10
10
|
data-slot="table-head"
|
|
11
11
|
class={cn(
|
|
12
|
-
"text-foreground h-10
|
|
12
|
+
"text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0",
|
|
13
13
|
className
|
|
14
14
|
)}
|
|
15
15
|
{...restProps}
|
|
@@ -13,10 +13,7 @@
|
|
|
13
13
|
<tr
|
|
14
14
|
bind:this={ref}
|
|
15
15
|
data-slot="table-row"
|
|
16
|
-
class={cn(
|
|
17
|
-
"hover:[&,&>svelte-css-wrapper]:[&>th,td]:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",
|
|
18
|
-
className
|
|
19
|
-
)}
|
|
16
|
+
class={cn("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors", className)}
|
|
20
17
|
{...restProps}
|
|
21
18
|
>
|
|
22
19
|
{@render children?.()}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Root from "./tabs.svelte";
|
|
2
2
|
import Content from "./tabs-content.svelte";
|
|
3
|
-
import List from "./tabs-list.svelte";
|
|
3
|
+
import List, { tabsListVariants, type TabsListVariant } from "./tabs-list.svelte";
|
|
4
4
|
import Trigger from "./tabs-trigger.svelte";
|
|
5
|
-
export { Root, Content, List, Trigger, Root as Tabs, Content as TabsContent, List as TabsList, Trigger as TabsTrigger, };
|
|
5
|
+
export { Root, Content, List, Trigger, tabsListVariants, type TabsListVariant, Root as Tabs, Content as TabsContent, List as TabsList, Trigger as TabsTrigger, };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Root from "./tabs.svelte";
|
|
2
2
|
import Content from "./tabs-content.svelte";
|
|
3
|
-
import List from "./tabs-list.svelte";
|
|
3
|
+
import List, { tabsListVariants } from "./tabs-list.svelte";
|
|
4
4
|
import Trigger from "./tabs-trigger.svelte";
|
|
5
|
-
export { Root, Content, List, Trigger,
|
|
5
|
+
export { Root, Content, List, Trigger, tabsListVariants,
|
|
6
6
|
//
|
|
7
7
|
Root as Tabs, Content as TabsContent, List as TabsList, Trigger as TabsTrigger, };
|
|
@@ -5,4 +5,9 @@
|
|
|
5
5
|
let { ref = $bindable(null), class: className, ...restProps }: TabsPrimitive.ContentProps = $props();
|
|
6
6
|
</script>
|
|
7
7
|
|
|
8
|
-
<TabsPrimitive.Content
|
|
8
|
+
<TabsPrimitive.Content
|
|
9
|
+
bind:ref
|
|
10
|
+
data-slot="tabs-content"
|
|
11
|
+
class={cn("flex-1 text-sm outline-none", className)}
|
|
12
|
+
{...restProps}
|
|
13
|
+
/>
|
|
@@ -1,16 +1,40 @@
|
|
|
1
|
+
<script lang="ts" module>
|
|
2
|
+
import { tv, type VariantProps } from "tailwind-variants";
|
|
3
|
+
|
|
4
|
+
export const tabsListVariants = tv({
|
|
5
|
+
base: "rounded-lg p-[3px] group-data-horizontal/tabs:h-8 data-[variant=line]:rounded-none group/tabs-list text-muted-foreground inline-flex w-fit items-center justify-center group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col",
|
|
6
|
+
variants: {
|
|
7
|
+
variant: {
|
|
8
|
+
default: "cn-tabs-list-variant-default bg-muted",
|
|
9
|
+
line: "cn-tabs-list-variant-line gap-1 bg-transparent",
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
defaultVariants: {
|
|
13
|
+
variant: "default",
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
export type TabsListVariant = VariantProps<typeof tabsListVariants>["variant"];
|
|
18
|
+
</script>
|
|
19
|
+
|
|
1
20
|
<script lang="ts">
|
|
2
21
|
import { Tabs as TabsPrimitive } from "bits-ui";
|
|
3
22
|
import { cn } from "../../../utils.js";
|
|
4
23
|
|
|
5
|
-
let {
|
|
24
|
+
let {
|
|
25
|
+
ref = $bindable(null),
|
|
26
|
+
variant = "default",
|
|
27
|
+
class: className,
|
|
28
|
+
...restProps
|
|
29
|
+
}: TabsPrimitive.ListProps & {
|
|
30
|
+
variant?: TabsListVariant;
|
|
31
|
+
} = $props();
|
|
6
32
|
</script>
|
|
7
33
|
|
|
8
34
|
<TabsPrimitive.List
|
|
9
35
|
bind:ref
|
|
10
36
|
data-slot="tabs-list"
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
className
|
|
14
|
-
)}
|
|
37
|
+
data-variant={variant}
|
|
38
|
+
class={cn(tabsListVariants({ variant }), className)}
|
|
15
39
|
{...restProps}
|
|
16
40
|
/>
|
|
@@ -1,4 +1,25 @@
|
|
|
1
|
+
import { type VariantProps } from "tailwind-variants";
|
|
2
|
+
export declare const tabsListVariants: import("tailwind-variants").TVReturnType<{
|
|
3
|
+
variant: {
|
|
4
|
+
default: string;
|
|
5
|
+
line: string;
|
|
6
|
+
};
|
|
7
|
+
}, undefined, "rounded-lg p-[3px] group-data-horizontal/tabs:h-8 data-[variant=line]:rounded-none group/tabs-list text-muted-foreground inline-flex w-fit items-center justify-center group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col", {
|
|
8
|
+
variant: {
|
|
9
|
+
default: string;
|
|
10
|
+
line: string;
|
|
11
|
+
};
|
|
12
|
+
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
13
|
+
variant: {
|
|
14
|
+
default: string;
|
|
15
|
+
line: string;
|
|
16
|
+
};
|
|
17
|
+
}, undefined, "rounded-lg p-[3px] group-data-horizontal/tabs:h-8 data-[variant=line]:rounded-none group/tabs-list text-muted-foreground inline-flex w-fit items-center justify-center group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col", unknown, unknown, undefined>>;
|
|
18
|
+
export type TabsListVariant = VariantProps<typeof tabsListVariants>["variant"];
|
|
1
19
|
import { Tabs as TabsPrimitive } from "bits-ui";
|
|
2
|
-
|
|
20
|
+
type $$ComponentProps = TabsPrimitive.ListProps & {
|
|
21
|
+
variant?: TabsListVariant;
|
|
22
|
+
};
|
|
23
|
+
declare const TabsList: import("svelte").Component<$$ComponentProps, {}, "ref">;
|
|
3
24
|
type TabsList = ReturnType<typeof TabsList>;
|
|
4
25
|
export default TabsList;
|
|
@@ -9,7 +9,10 @@
|
|
|
9
9
|
bind:ref
|
|
10
10
|
data-slot="tabs-trigger"
|
|
11
11
|
class={cn(
|
|
12
|
-
"
|
|
12
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground/60 hover:text-foreground dark:text-muted-foreground dark:hover:text-foreground relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
13
|
+
"group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent",
|
|
14
|
+
"data-active:bg-background dark:data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 data-active:text-foreground",
|
|
15
|
+
"after:bg-foreground after:absolute after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100",
|
|
13
16
|
className
|
|
14
17
|
)}
|
|
15
18
|
{...restProps}
|
|
@@ -10,4 +10,10 @@
|
|
|
10
10
|
}: TabsPrimitive.RootProps = $props();
|
|
11
11
|
</script>
|
|
12
12
|
|
|
13
|
-
<TabsPrimitive.Root
|
|
13
|
+
<TabsPrimitive.Root
|
|
14
|
+
bind:ref
|
|
15
|
+
bind:value
|
|
16
|
+
data-slot="tabs"
|
|
17
|
+
class={cn("group/tabs flex gap-2 data-[orientation=horizontal]:flex-col", className)}
|
|
18
|
+
{...restProps}
|
|
19
|
+
/>
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
bind:this={ref}
|
|
16
16
|
data-slot={dataSlot}
|
|
17
17
|
class={cn(
|
|
18
|
-
"border-input
|
|
18
|
+
"border-input dark:bg-input/30 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 disabled:bg-input/50 dark:disabled:bg-input/80 placeholder:text-muted-foreground flex field-sizing-content min-h-16 w-full rounded-lg border bg-transparent px-2.5 py-2 text-base transition-colors outline-none focus-visible:ring-3 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3 md:text-sm",
|
|
19
19
|
className
|
|
20
20
|
)}
|
|
21
21
|
bind:value
|
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
import { type VariantProps, tv } from "tailwind-variants";
|
|
3
3
|
|
|
4
4
|
export const toggleVariants = tv({
|
|
5
|
-
base: "hover:
|
|
5
|
+
base: "hover:text-foreground aria-pressed:bg-muted focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[state=on]:bg-muted gap-1 rounded-lg text-sm font-medium transition-all [&_svg:not([class*='size-'])]:size-4 group/toggle hover:bg-muted inline-flex items-center justify-center whitespace-nowrap outline-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
6
6
|
variants: {
|
|
7
7
|
variant: {
|
|
8
8
|
default: "bg-transparent",
|
|
9
|
-
outline: "border-input hover:bg-
|
|
9
|
+
outline: "border-input hover:bg-muted border bg-transparent",
|
|
10
10
|
},
|
|
11
11
|
size: {
|
|
12
|
-
default: "h-
|
|
13
|
-
sm: "h-
|
|
14
|
-
lg: "h-
|
|
12
|
+
default: "h-8 min-w-8 px-2",
|
|
13
|
+
sm: "h-7 min-w-7 rounded-[min(var(--radius-md),12px)] px-1.5 text-[0.8rem]",
|
|
14
|
+
lg: "h-9 min-w-9 px-2.5",
|
|
15
15
|
},
|
|
16
16
|
},
|
|
17
17
|
defaultVariants: {
|
|
@@ -9,7 +9,7 @@ export declare const toggleVariants: import("tailwind-variants").TVReturnType<{
|
|
|
9
9
|
sm: string;
|
|
10
10
|
lg: string;
|
|
11
11
|
};
|
|
12
|
-
}, undefined, "hover:
|
|
12
|
+
}, undefined, "hover:text-foreground aria-pressed:bg-muted focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[state=on]:bg-muted gap-1 rounded-lg text-sm font-medium transition-all [&_svg:not([class*='size-'])]:size-4 group/toggle hover:bg-muted inline-flex items-center justify-center whitespace-nowrap outline-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0", {
|
|
13
13
|
variant: {
|
|
14
14
|
default: string;
|
|
15
15
|
outline: string;
|
|
@@ -29,7 +29,7 @@ export declare const toggleVariants: import("tailwind-variants").TVReturnType<{
|
|
|
29
29
|
sm: string;
|
|
30
30
|
lg: string;
|
|
31
31
|
};
|
|
32
|
-
}, undefined, "hover:
|
|
32
|
+
}, undefined, "hover:text-foreground aria-pressed:bg-muted focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[state=on]:bg-muted gap-1 rounded-lg text-sm font-medium transition-all [&_svg:not([class*='size-'])]:size-4 group/toggle hover:bg-muted inline-flex items-center justify-center whitespace-nowrap outline-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0", unknown, unknown, undefined>>;
|
|
33
33
|
export type ToggleVariant = VariantProps<typeof toggleVariants>["variant"];
|
|
34
34
|
export type ToggleSize = VariantProps<typeof toggleVariants>["size"];
|
|
35
35
|
export type ToggleVariants = VariantProps<typeof toggleVariants>;
|
|
@@ -23,11 +23,11 @@
|
|
|
23
23
|
data-size={ctx.size || size}
|
|
24
24
|
data-spacing={ctx.spacing}
|
|
25
25
|
class={cn(
|
|
26
|
+
"shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 focus:z-10 focus-visible:z-10 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-l-lg group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-lg group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-r-lg group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-lg group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t",
|
|
26
27
|
toggleVariants({
|
|
27
28
|
variant: ctx.variant || variant,
|
|
28
29
|
size: ctx.size || size,
|
|
29
30
|
}),
|
|
30
|
-
"w-auto min-w-0 shrink-0 px-3 focus:z-10 focus-visible:z-10 data-[spacing=0]:rounded-none data-[spacing=0]:shadow-none data-[spacing=0]:first:rounded-l-md data-[spacing=0]:last:rounded-r-md data-[spacing=0]:data-[variant=outline]:border-l-0 data-[spacing=0]:data-[variant=outline]:first:border-l",
|
|
31
31
|
className
|
|
32
32
|
)}
|
|
33
33
|
{value}
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
interface ToggleGroupContext extends ToggleVariants {
|
|
9
9
|
spacing?: number;
|
|
10
|
+
orientation?: "horizontal" | "vertical";
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
export function setToggleGroupCtx(props: ToggleGroupContext) {
|
|
@@ -28,14 +29,28 @@
|
|
|
28
29
|
class: className,
|
|
29
30
|
size = "default",
|
|
30
31
|
spacing = 0,
|
|
32
|
+
orientation = "horizontal",
|
|
31
33
|
variant = "default",
|
|
32
34
|
...restProps
|
|
33
|
-
}: ToggleGroupPrimitive.RootProps &
|
|
35
|
+
}: ToggleGroupPrimitive.RootProps &
|
|
36
|
+
ToggleVariants & {
|
|
37
|
+
spacing?: number;
|
|
38
|
+
orientation?: "horizontal" | "vertical";
|
|
39
|
+
} = $props();
|
|
34
40
|
|
|
35
41
|
setToggleGroupCtx({
|
|
36
|
-
variant
|
|
37
|
-
|
|
38
|
-
|
|
42
|
+
get variant() {
|
|
43
|
+
return variant;
|
|
44
|
+
},
|
|
45
|
+
get size() {
|
|
46
|
+
return size;
|
|
47
|
+
},
|
|
48
|
+
get spacing() {
|
|
49
|
+
return spacing;
|
|
50
|
+
},
|
|
51
|
+
get orientation() {
|
|
52
|
+
return orientation;
|
|
53
|
+
},
|
|
39
54
|
});
|
|
40
55
|
</script>
|
|
41
56
|
|
|
@@ -46,13 +61,14 @@ get along, so we shut typescript up by casting `value` to `never`.
|
|
|
46
61
|
<ToggleGroupPrimitive.Root
|
|
47
62
|
bind:value={value as never}
|
|
48
63
|
bind:ref
|
|
64
|
+
{orientation}
|
|
49
65
|
data-slot="toggle-group"
|
|
50
66
|
data-variant={variant}
|
|
51
67
|
data-size={size}
|
|
52
68
|
data-spacing={spacing}
|
|
53
69
|
style={`--gap: ${spacing}`}
|
|
54
70
|
class={cn(
|
|
55
|
-
"group/toggle-group flex w-fit items-center gap-[--spacing(var(--gap))] rounded-
|
|
71
|
+
"group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] rounded-lg data-vertical:flex-col data-vertical:items-stretch data-[size=sm]:rounded-[min(var(--radius-md),10px)]",
|
|
56
72
|
className
|
|
57
73
|
)}
|
|
58
74
|
{...restProps}
|
|
@@ -3,12 +3,14 @@ import { toggleVariants } from "../toggle/index.js";
|
|
|
3
3
|
type ToggleVariants = VariantProps<typeof toggleVariants>;
|
|
4
4
|
interface ToggleGroupContext extends ToggleVariants {
|
|
5
5
|
spacing?: number;
|
|
6
|
+
orientation?: "horizontal" | "vertical";
|
|
6
7
|
}
|
|
7
8
|
export declare function setToggleGroupCtx(props: ToggleGroupContext): void;
|
|
8
9
|
export declare function getToggleGroupCtx(): Required<ToggleGroupContext>;
|
|
9
10
|
import { ToggleGroup as ToggleGroupPrimitive } from "bits-ui";
|
|
10
11
|
type $$ComponentProps = ToggleGroupPrimitive.RootProps & ToggleVariants & {
|
|
11
12
|
spacing?: number;
|
|
13
|
+
orientation?: "horizontal" | "vertical";
|
|
12
14
|
};
|
|
13
15
|
declare const ToggleGroup: import("svelte").Component<$$ComponentProps, {}, "ref" | "value">;
|
|
14
16
|
type ToggleGroup = ReturnType<typeof ToggleGroup>;
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
{sideOffset}
|
|
28
28
|
{side}
|
|
29
29
|
class={cn(
|
|
30
|
-
"
|
|
30
|
+
"data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 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 bg-foreground text-background z-50 inline-flex w-fit max-w-xs origin-(--bits-tooltip-content-transform-origin) items-center gap-1.5 rounded-md px-3 py-1.5 text-xs has-data-[slot=kbd]:pr-1.5 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm",
|
|
31
31
|
className
|
|
32
32
|
)}
|
|
33
33
|
{...restProps}
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
{#snippet child({ props })}
|
|
38
38
|
<div
|
|
39
39
|
class={cn(
|
|
40
|
-
"bg-foreground z-50 size-2.5 rotate-45 rounded-[2px]",
|
|
41
|
-
"data-[side=top]:translate-x-1/2 data-[side=top]:translate-y-[calc(-50
|
|
42
|
-
"data-[side=bottom]:-translate-x-1/2 data-[side=bottom]:-translate-y-[calc(-50
|
|
43
|
-
"data-[side=right]:translate-x-[calc(50
|
|
44
|
-
"data-[side=left]:-translate-y-[calc(50
|
|
40
|
+
"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px]",
|
|
41
|
+
"data-[side=top]:translate-x-1/2 data-[side=top]:translate-y-[calc(-50%+2px)]",
|
|
42
|
+
"data-[side=bottom]:-translate-x-1/2 data-[side=bottom]:-translate-y-[calc(-50%+1px)]",
|
|
43
|
+
"data-[side=right]:translate-x-[calc(50%+2px)] data-[side=right]:translate-y-1/2",
|
|
44
|
+
"data-[side=left]:-translate-y-[calc(50%-3px)]",
|
|
45
45
|
arrowClasses
|
|
46
46
|
)}
|
|
47
47
|
{...props}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { Tooltip as TooltipPrimitive } from "bits-ui";
|
|
3
3
|
|
|
4
|
-
let { ...restProps }: TooltipPrimitive.ProviderProps = $props();
|
|
4
|
+
let { delayDuration = 0, ...restProps }: TooltipPrimitive.ProviderProps = $props();
|
|
5
5
|
</script>
|
|
6
6
|
|
|
7
|
-
<TooltipPrimitive.Provider {...restProps} />
|
|
7
|
+
<TooltipPrimitive.Provider {delayDuration} {...restProps} />
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { Tooltip as TooltipPrimitive } from "bits-ui";
|
|
3
|
+
import TooltipProvider from "./tooltip-provider.svelte";
|
|
3
4
|
|
|
4
5
|
let { open = $bindable(false), ...restProps }: TooltipPrimitive.RootProps = $props();
|
|
5
6
|
</script>
|
|
6
7
|
|
|
7
|
-
<
|
|
8
|
+
<TooltipProvider>
|
|
9
|
+
<TooltipPrimitive.Root bind:open {...restProps} />
|
|
10
|
+
</TooltipProvider>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kayord/ui",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "3.0.1",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/kayordDX/ui"
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
],
|
|
60
60
|
"peerDependencies": {
|
|
61
61
|
"@internationalized/date": "^3.10.0",
|
|
62
|
-
"@lucide/svelte": ">= 0.
|
|
62
|
+
"@lucide/svelte": ">= 1.0.0 < 2.0.0",
|
|
63
63
|
"@tanstack/table-core": "^8.20.5",
|
|
64
64
|
"embla-carousel-svelte": "^8.6.0",
|
|
65
65
|
"formsnap": "^2.0.1",
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
}
|
|
106
106
|
},
|
|
107
107
|
"dependencies": {
|
|
108
|
-
"bits-ui": "2.16.
|
|
108
|
+
"bits-ui": "2.16.4",
|
|
109
109
|
"clsx": "^2.1.1",
|
|
110
110
|
"tailwind-merge": "^3.5.0",
|
|
111
111
|
"tailwind-variants": "^3.2.2"
|
|
@@ -114,22 +114,22 @@
|
|
|
114
114
|
"@eslint/compat": "^2.0.3",
|
|
115
115
|
"@eslint/js": "^10.0.1",
|
|
116
116
|
"@internationalized/date": "^3.12.0",
|
|
117
|
-
"@lucide/svelte": "^
|
|
117
|
+
"@lucide/svelte": "^1.7.0",
|
|
118
118
|
"@sveltejs/adapter-auto": "^7.0.1",
|
|
119
119
|
"@sveltejs/kit": "^2.55.0",
|
|
120
120
|
"@sveltejs/package": "^2.5.7",
|
|
121
121
|
"@sveltejs/vite-plugin-svelte": "^7.0.0",
|
|
122
|
-
"@tailwindcss/vite": "^4.2.
|
|
122
|
+
"@tailwindcss/vite": "^4.2.2",
|
|
123
123
|
"@types/d3-scale": "^4.0.9",
|
|
124
124
|
"@types/d3-shape": "^3.1.8",
|
|
125
|
-
"@vitest/browser": "^4.1.
|
|
126
|
-
"@vitest/browser-playwright": "^4.1.
|
|
125
|
+
"@vitest/browser": "^4.1.2",
|
|
126
|
+
"@vitest/browser-playwright": "^4.1.2",
|
|
127
127
|
"d3-scale": "^4.0.2",
|
|
128
128
|
"d3-shape": "^3.2.0",
|
|
129
129
|
"embla-carousel-svelte": "^8.6.0",
|
|
130
|
-
"eslint": "^10.0
|
|
130
|
+
"eslint": "^10.1.0",
|
|
131
131
|
"eslint-config-prettier": "^10.1.8",
|
|
132
|
-
"eslint-plugin-svelte": "^3.
|
|
132
|
+
"eslint-plugin-svelte": "^3.16.0",
|
|
133
133
|
"formsnap": "^2.0.1",
|
|
134
134
|
"globals": "^17.4.0",
|
|
135
135
|
"layerchart": "2.0.0-next.40",
|
|
@@ -140,18 +140,18 @@
|
|
|
140
140
|
"prettier-plugin-tailwindcss": "^0.7.2",
|
|
141
141
|
"publint": "^0.3.18",
|
|
142
142
|
"runed": "^0.37.1",
|
|
143
|
-
"svelte": "5.
|
|
143
|
+
"svelte": "5.55.0",
|
|
144
144
|
"svelte-check": "^4.4.5",
|
|
145
145
|
"svelte-sonner": "^1.1.0",
|
|
146
|
-
"sveltekit-superforms": "^2.30.
|
|
147
|
-
"tailwindcss": "^4.2.
|
|
146
|
+
"sveltekit-superforms": "^2.30.1",
|
|
147
|
+
"tailwindcss": "^4.2.2",
|
|
148
148
|
"tslib": "^2.8.1",
|
|
149
149
|
"tw-animate-css": "1.4.0",
|
|
150
|
-
"typescript": "^
|
|
151
|
-
"typescript-eslint": "^8.57.
|
|
150
|
+
"typescript": "^6.0.2",
|
|
151
|
+
"typescript-eslint": "^8.57.2",
|
|
152
152
|
"vaul-svelte": "1.0.0-next.7",
|
|
153
|
-
"vite": "^8.0.
|
|
154
|
-
"vitest": "^4.1.
|
|
153
|
+
"vite": "^8.0.3",
|
|
154
|
+
"vitest": "^4.1.2",
|
|
155
155
|
"vitest-browser-svelte": "^2.1.0",
|
|
156
156
|
"zod": "4.3.6"
|
|
157
157
|
},
|