@kayord/ui 2.0.10 → 2.0.12
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/custom/action/Action.svelte +2 -2
- package/dist/components/custom/action/Actions.svelte +2 -2
- package/dist/components/custom/animations/NumberTicker.svelte +1 -0
- package/dist/components/custom/data-table/DataTable.svelte +1 -0
- package/dist/components/custom/data-table/Pagination.svelte +1 -0
- package/dist/components/ui/accordion/accordion-trigger.svelte +1 -1
- package/dist/components/ui/alert-dialog/alert-dialog-content.svelte +6 -4
- package/dist/components/ui/alert-dialog/alert-dialog-content.svelte.d.ts +3 -1
- package/dist/components/ui/alert-dialog/alert-dialog-header.svelte +1 -1
- package/dist/components/ui/alert-dialog/alert-dialog-portal.svelte +7 -0
- package/dist/components/ui/alert-dialog/alert-dialog-portal.svelte.d.ts +3 -0
- package/dist/components/ui/alert-dialog/alert-dialog.svelte +7 -0
- package/dist/components/ui/alert-dialog/alert-dialog.svelte.d.ts +3 -0
- package/dist/components/ui/alert-dialog/index.d.ts +2 -2
- package/dist/components/ui/alert-dialog/index.js +2 -3
- package/dist/components/ui/badge/badge.svelte +1 -1
- package/dist/components/ui/badge/badge.svelte.d.ts +2 -2
- package/dist/components/ui/button/button.svelte +5 -5
- package/dist/components/ui/button/button.svelte.d.ts +2 -2
- package/dist/components/ui/button-group/button-group-text.svelte +1 -1
- package/dist/components/ui/button-group/button-group.svelte +2 -2
- package/dist/components/ui/button-group/button-group.svelte.d.ts +2 -2
- package/dist/components/ui/calendar/calendar-cell.svelte +1 -1
- package/dist/components/ui/calendar/calendar-month-select.svelte +1 -1
- package/dist/components/ui/calendar/calendar-year-select.svelte +1 -1
- package/dist/components/ui/carousel/carousel-content.svelte +1 -1
- package/dist/components/ui/carousel/carousel-item.svelte +1 -1
- package/dist/components/ui/carousel/carousel-next.svelte +2 -2
- package/dist/components/ui/carousel/carousel-previous.svelte +2 -2
- package/dist/components/ui/chart/chart-container.svelte +1 -1
- package/dist/components/ui/chart/chart-tooltip.svelte +1 -1
- package/dist/components/ui/command/command-input.svelte +1 -1
- package/dist/components/ui/command/command-loading.svelte +7 -0
- package/dist/components/ui/command/command-loading.svelte.d.ts +4 -0
- package/dist/components/ui/command/command-shortcut.svelte +1 -1
- package/dist/components/ui/command/index.d.ts +1 -2
- package/dist/components/ui/command/index.js +1 -2
- package/dist/components/ui/context-menu/context-menu-checkbox-item.svelte +2 -2
- package/dist/components/ui/context-menu/context-menu-content.svelte +7 -4
- package/dist/components/ui/context-menu/context-menu-content.svelte.d.ts +4 -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-portal.svelte +7 -0
- package/dist/components/ui/context-menu/context-menu-portal.svelte.d.ts +3 -0
- package/dist/components/ui/context-menu/context-menu-radio-item.svelte +2 -2
- package/dist/components/ui/context-menu/context-menu-shortcut.svelte +1 -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 +2 -2
- package/dist/components/ui/context-menu/context-menu-sub.svelte +7 -0
- package/dist/components/ui/context-menu/context-menu-sub.svelte.d.ts +3 -0
- package/dist/components/ui/context-menu/context-menu.svelte +7 -0
- package/dist/components/ui/context-menu/context-menu.svelte.d.ts +3 -0
- package/dist/components/ui/context-menu/index.d.ts +4 -3
- package/dist/components/ui/context-menu/index.js +5 -5
- package/dist/components/ui/dialog/dialog-content.svelte +6 -4
- package/dist/components/ui/dialog/dialog-content.svelte.d.ts +3 -1
- package/dist/components/ui/dialog/dialog-header.svelte +1 -1
- package/dist/components/ui/dialog/dialog-portal.svelte +7 -0
- package/dist/components/ui/dialog/dialog-portal.svelte.d.ts +3 -0
- package/dist/components/ui/dialog/dialog.svelte +7 -0
- package/dist/components/ui/dialog/dialog.svelte.d.ts +3 -0
- package/dist/components/ui/dialog/index.d.ts +2 -2
- package/dist/components/ui/dialog/index.js +2 -3
- package/dist/components/ui/drawer/drawer-content.svelte +8 -5
- package/dist/components/ui/drawer/drawer-content.svelte.d.ts +4 -1
- package/dist/components/ui/drawer/drawer-portal.svelte +7 -0
- package/dist/components/ui/drawer/drawer-portal.svelte.d.ts +3 -0
- package/dist/components/ui/drawer/index.d.ts +1 -2
- package/dist/components/ui/drawer/index.js +1 -2
- package/dist/components/ui/dropdown-menu/dropdown-menu-checkbox-group.svelte +5 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte +2 -2
- package/dist/components/ui/dropdown-menu/dropdown-menu-content.svelte +7 -5
- package/dist/components/ui/dropdown-menu/dropdown-menu-content.svelte.d.ts +4 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu-group-heading.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-portal.svelte +7 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-portal.svelte.d.ts +3 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-radio-item.svelte +2 -2
- package/dist/components/ui/dropdown-menu/dropdown-menu-shortcut.svelte +1 -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/dropdown-menu/dropdown-menu-sub.svelte +7 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-sub.svelte.d.ts +3 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu.svelte +7 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu.svelte.d.ts +3 -0
- package/dist/components/ui/dropdown-menu/index.d.ts +18 -0
- package/dist/components/ui/dropdown-menu/index.js +4 -4
- package/dist/components/ui/field/field-error.svelte +1 -1
- package/dist/components/ui/field/field.svelte +2 -2
- package/dist/components/ui/hover-card/hover-card-content.svelte +7 -5
- package/dist/components/ui/hover-card/hover-card-content.svelte.d.ts +4 -1
- package/dist/components/ui/hover-card/hover-card-portal.svelte +7 -0
- package/dist/components/ui/hover-card/hover-card-portal.svelte.d.ts +3 -0
- package/dist/components/ui/hover-card/hover-card.svelte +7 -0
- package/dist/components/ui/hover-card/hover-card.svelte.d.ts +3 -0
- package/dist/components/ui/hover-card/index.d.ts +3 -2
- package/dist/components/ui/hover-card/index.js +3 -3
- 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.svelte +2 -2
- package/dist/components/ui/input-otp/input-otp-separator.svelte +2 -2
- package/dist/components/ui/input-otp/input-otp-slot.svelte +1 -1
- package/dist/components/ui/item/item.svelte +1 -1
- package/dist/components/ui/item/item.svelte.d.ts +2 -2
- package/dist/components/ui/menubar/index.d.ts +5 -5
- package/dist/components/ui/menubar/index.js +6 -6
- package/dist/components/ui/menubar/menubar-checkbox-item.svelte +2 -2
- package/dist/components/ui/menubar/menubar-content.svelte +7 -5
- package/dist/components/ui/menubar/menubar-content.svelte.d.ts +4 -1
- package/dist/components/ui/menubar/menubar-group-heading.svelte +1 -1
- 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-menu.svelte +7 -0
- package/dist/components/ui/menubar/menubar-menu.svelte.d.ts +3 -0
- package/dist/components/ui/menubar/menubar-portal.svelte +7 -0
- package/dist/components/ui/menubar/menubar-portal.svelte.d.ts +3 -0
- package/dist/components/ui/menubar/menubar-radio-group.svelte +7 -0
- package/dist/components/ui/menubar/menubar-radio-group.svelte.d.ts +4 -0
- package/dist/components/ui/menubar/menubar-radio-item.svelte +2 -2
- package/dist/components/ui/menubar/menubar-shortcut.svelte +1 -1
- package/dist/components/ui/menubar/menubar-sub-content.svelte +1 -1
- package/dist/components/ui/menubar/menubar-sub-trigger.svelte +2 -2
- package/dist/components/ui/menubar/menubar-sub.svelte +7 -0
- package/dist/components/ui/menubar/menubar-sub.svelte.d.ts +4 -0
- package/dist/components/ui/native-select/native-select.svelte +2 -2
- package/dist/components/ui/navigation-menu/navigation-menu-content.svelte +1 -1
- package/dist/components/ui/navigation-menu/navigation-menu-indicator.svelte +1 -1
- package/dist/components/ui/navigation-menu/navigation-menu-trigger.svelte +2 -2
- 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/pagination/index.d.ts +7 -1
- package/dist/components/ui/pagination/index.js +8 -2
- package/dist/components/ui/pagination/pagination-next-button.svelte +1 -1
- package/dist/components/ui/pagination/pagination-next.svelte +25 -0
- package/dist/components/ui/pagination/pagination-next.svelte.d.ts +4 -0
- package/dist/components/ui/pagination/pagination-prev-button.svelte +1 -1
- package/dist/components/ui/pagination/pagination-previous.svelte +25 -0
- package/dist/components/ui/pagination/pagination-previous.svelte.d.ts +4 -0
- package/dist/components/ui/popover/index.d.ts +4 -4
- package/dist/components/ui/popover/index.js +5 -5
- package/dist/components/ui/popover/popover-close.svelte +7 -0
- package/dist/components/ui/popover/popover-close.svelte.d.ts +4 -0
- package/dist/components/ui/popover/popover-content.svelte +7 -5
- package/dist/components/ui/popover/popover-content.svelte.d.ts +4 -1
- package/dist/components/ui/popover/popover-portal.svelte +7 -0
- package/dist/components/ui/popover/popover-portal.svelte.d.ts +3 -0
- package/dist/components/ui/popover/popover.svelte +7 -0
- package/dist/components/ui/popover/popover.svelte.d.ts +3 -0
- package/dist/components/ui/radio-group/radio-group-item.svelte +1 -1
- package/dist/components/ui/range-calendar/index.d.ts +2 -3
- package/dist/components/ui/range-calendar/index.js +2 -3
- package/dist/components/ui/range-calendar/range-calendar-cell.svelte +1 -1
- package/dist/components/ui/range-calendar/range-calendar-grid-body.svelte +7 -0
- package/dist/components/ui/range-calendar/range-calendar-grid-body.svelte.d.ts +4 -0
- package/dist/components/ui/range-calendar/range-calendar-grid-head.svelte +7 -0
- package/dist/components/ui/range-calendar/range-calendar-grid-head.svelte.d.ts +4 -0
- package/dist/components/ui/range-calendar/range-calendar-month-select.svelte +1 -1
- package/dist/components/ui/range-calendar/range-calendar-year-select.svelte +1 -1
- package/dist/components/ui/resizable/resizable-handle.svelte +1 -1
- package/dist/components/ui/scroll-area/scroll-area-scrollbar.svelte +1 -1
- package/dist/components/ui/select/index.d.ts +3 -2
- package/dist/components/ui/select/index.js +4 -4
- package/dist/components/ui/select/select-content.svelte +9 -4
- package/dist/components/ui/select/select-content.svelte.d.ts +4 -1
- package/dist/components/ui/select/select-item.svelte +2 -2
- package/dist/components/ui/select/select-portal.svelte +7 -0
- package/dist/components/ui/select/select-portal.svelte.d.ts +3 -0
- package/dist/components/ui/select/select.svelte +7 -0
- package/dist/components/ui/select/select.svelte.d.ts +3 -0
- package/dist/components/ui/sheet/index.d.ts +2 -2
- package/dist/components/ui/sheet/index.js +2 -3
- package/dist/components/ui/sheet/sheet-content.svelte +8 -6
- package/dist/components/ui/sheet/sheet-content.svelte.d.ts +3 -1
- package/dist/components/ui/sheet/sheet-portal.svelte +7 -0
- package/dist/components/ui/sheet/sheet-portal.svelte.d.ts +3 -0
- package/dist/components/ui/sheet/sheet.svelte +7 -0
- package/dist/components/ui/sheet/sheet.svelte.d.ts +3 -0
- package/dist/components/ui/sidebar/sidebar-group-action.svelte +1 -1
- package/dist/components/ui/sidebar/sidebar-group-label.svelte +1 -1
- package/dist/components/ui/sidebar/sidebar-inset.svelte +1 -1
- package/dist/components/ui/sidebar/sidebar-menu-action.svelte +1 -1
- package/dist/components/ui/sidebar/sidebar-menu-badge.svelte +1 -1
- 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 -1
- package/dist/components/ui/sidebar/sidebar-menu-sub.svelte +1 -1
- package/dist/components/ui/sidebar/sidebar-rail.svelte +4 -4
- package/dist/components/ui/sidebar/sidebar.svelte +3 -3
- package/dist/components/ui/slider/slider.svelte +1 -1
- package/dist/components/ui/sonner/sonner.svelte +22 -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/toggle/toggle.svelte +2 -2
- package/dist/components/ui/toggle/toggle.svelte.d.ts +2 -2
- package/dist/components/ui/toggle-group/toggle-group-item.svelte +2 -1
- package/dist/components/ui/toggle-group/toggle-group.svelte +20 -5
- package/dist/components/ui/toggle-group/toggle-group.svelte.d.ts +11 -4
- package/dist/components/ui/tooltip/index.d.ts +3 -4
- package/dist/components/ui/tooltip/index.js +3 -4
- package/dist/components/ui/tooltip/tooltip-content.svelte +8 -3
- package/dist/components/ui/tooltip/tooltip-content.svelte.d.ts +4 -0
- package/dist/components/ui/tooltip/tooltip-portal.svelte +7 -0
- package/dist/components/ui/tooltip/tooltip-portal.svelte.d.ts +4 -0
- package/dist/components/ui/tooltip/tooltip-provider.svelte +7 -0
- package/dist/components/ui/tooltip/tooltip-provider.svelte.d.ts +4 -0
- package/dist/components/ui/tooltip/tooltip.svelte +7 -0
- package/dist/components/ui/tooltip/tooltip.svelte.d.ts +4 -0
- package/package.json +27 -25
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
|
|
7
7
|
let { text, icon, action, href, class: className }: ActionType = $props();
|
|
8
8
|
|
|
9
|
-
const ActionIcon = icon;
|
|
9
|
+
const ActionIcon = $derived(icon);
|
|
10
10
|
|
|
11
|
-
const clickAction = href ? () => goto(href) : action;
|
|
11
|
+
const clickAction = $derived(href ? () => goto(href) : action);
|
|
12
12
|
</script>
|
|
13
13
|
|
|
14
14
|
<DropdownMenu.Item onclick={clickAction} class={cn(className)}>
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
|
|
9
9
|
let { actions, text, class: className, icon, variant = "ghost" }: ActionsType = $props();
|
|
10
10
|
|
|
11
|
-
const ActionIcon = icon;
|
|
11
|
+
const ActionIcon = $derived(icon);
|
|
12
12
|
|
|
13
|
-
const size = text ? "default" : "icon";
|
|
13
|
+
const size = $derived(text ? "default" : "icon");
|
|
14
14
|
</script>
|
|
15
15
|
|
|
16
16
|
<DropdownMenu.Root>
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
data-slot="accordion-trigger"
|
|
20
20
|
bind:ref
|
|
21
21
|
class={cn(
|
|
22
|
-
"focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-
|
|
22
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-start text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",
|
|
23
23
|
className
|
|
24
24
|
)}
|
|
25
25
|
{...restProps}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { AlertDialog as AlertDialogPrimitive } from "bits-ui";
|
|
3
|
+
import AlertDialogPortal from "./alert-dialog-portal.svelte";
|
|
3
4
|
import AlertDialogOverlay from "./alert-dialog-overlay.svelte";
|
|
4
5
|
import { cn, type WithoutChild, type WithoutChildrenOrChild } from "../../../utils.js";
|
|
6
|
+
import type { ComponentProps } from "svelte";
|
|
5
7
|
|
|
6
8
|
let {
|
|
7
9
|
ref = $bindable(null),
|
|
@@ -9,19 +11,19 @@
|
|
|
9
11
|
portalProps,
|
|
10
12
|
...restProps
|
|
11
13
|
}: WithoutChild<AlertDialogPrimitive.ContentProps> & {
|
|
12
|
-
portalProps?: WithoutChildrenOrChild<
|
|
14
|
+
portalProps?: WithoutChildrenOrChild<ComponentProps<typeof AlertDialogPortal>>;
|
|
13
15
|
} = $props();
|
|
14
16
|
</script>
|
|
15
17
|
|
|
16
|
-
<
|
|
18
|
+
<AlertDialogPortal {...portalProps}>
|
|
17
19
|
<AlertDialogOverlay />
|
|
18
20
|
<AlertDialogPrimitive.Content
|
|
19
21
|
bind:ref
|
|
20
22
|
data-slot="alert-dialog-content"
|
|
21
23
|
class={cn(
|
|
22
|
-
"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed
|
|
24
|
+
"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed start-[50%] top-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
|
|
23
25
|
className
|
|
24
26
|
)}
|
|
25
27
|
{...restProps}
|
|
26
28
|
/>
|
|
27
|
-
</
|
|
29
|
+
</AlertDialogPortal>
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { AlertDialog as AlertDialogPrimitive } from "bits-ui";
|
|
2
|
+
import AlertDialogPortal from "./alert-dialog-portal.svelte";
|
|
2
3
|
import { type WithoutChild, type WithoutChildrenOrChild } from "../../../utils.js";
|
|
4
|
+
import type { ComponentProps } from "svelte";
|
|
3
5
|
type $$ComponentProps = WithoutChild<AlertDialogPrimitive.ContentProps> & {
|
|
4
|
-
portalProps?: WithoutChildrenOrChild<
|
|
6
|
+
portalProps?: WithoutChildrenOrChild<ComponentProps<typeof AlertDialogPortal>>;
|
|
5
7
|
};
|
|
6
8
|
declare const AlertDialogContent: import("svelte").Component<$$ComponentProps, {}, "ref">;
|
|
7
9
|
type AlertDialogContent = ReturnType<typeof AlertDialogContent>;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import Root from "./alert-dialog.svelte";
|
|
2
|
+
import Portal from "./alert-dialog-portal.svelte";
|
|
1
3
|
import Trigger from "./alert-dialog-trigger.svelte";
|
|
2
4
|
import Title from "./alert-dialog-title.svelte";
|
|
3
5
|
import Action from "./alert-dialog-action.svelte";
|
|
@@ -7,6 +9,4 @@ import Header from "./alert-dialog-header.svelte";
|
|
|
7
9
|
import Overlay from "./alert-dialog-overlay.svelte";
|
|
8
10
|
import Content from "./alert-dialog-content.svelte";
|
|
9
11
|
import Description from "./alert-dialog-description.svelte";
|
|
10
|
-
declare const Root: import("svelte").Component<import("bits-ui").AlertDialogRootPropsWithoutHTML, {}, "open">;
|
|
11
|
-
declare const Portal: import("svelte").Component<import("bits-ui").PortalProps, {}, "">;
|
|
12
12
|
export { Root, Title, Action, Cancel, Portal, Footer, Header, Trigger, Overlay, Content, Description, Root as AlertDialog, Title as AlertDialogTitle, Action as AlertDialogAction, Cancel as AlertDialogCancel, Portal as AlertDialogPortal, Footer as AlertDialogFooter, Header as AlertDialogHeader, Trigger as AlertDialogTrigger, Overlay as AlertDialogOverlay, Content as AlertDialogContent, Description as AlertDialogDescription, };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Root from "./alert-dialog.svelte";
|
|
2
|
+
import Portal from "./alert-dialog-portal.svelte";
|
|
2
3
|
import Trigger from "./alert-dialog-trigger.svelte";
|
|
3
4
|
import Title from "./alert-dialog-title.svelte";
|
|
4
5
|
import Action from "./alert-dialog-action.svelte";
|
|
@@ -8,8 +9,6 @@ import Header from "./alert-dialog-header.svelte";
|
|
|
8
9
|
import Overlay from "./alert-dialog-overlay.svelte";
|
|
9
10
|
import Content from "./alert-dialog-content.svelte";
|
|
10
11
|
import Description from "./alert-dialog-description.svelte";
|
|
11
|
-
const Root = AlertDialogPrimitive.Root;
|
|
12
|
-
const Portal = AlertDialogPrimitive.Portal;
|
|
13
12
|
export { Root, Title, Action, Cancel, Portal, Footer, Header, Trigger, Overlay, Content, Description,
|
|
14
13
|
//
|
|
15
14
|
Root as AlertDialog, Title as AlertDialogTitle, Action as AlertDialogAction, Cancel as AlertDialogCancel, Portal as AlertDialogPortal, Footer as AlertDialogFooter, Header as AlertDialogHeader, Trigger as AlertDialogTrigger, Overlay as AlertDialogOverlay, Content as AlertDialogContent, Description as AlertDialogDescription, };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { type VariantProps, tv } from "tailwind-variants";
|
|
3
3
|
|
|
4
4
|
export const badgeVariants = tv({
|
|
5
|
-
base: "focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden
|
|
5
|
+
base: "focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] [&>svg]:pointer-events-none [&>svg]:size-3",
|
|
6
6
|
variants: {
|
|
7
7
|
variant: {
|
|
8
8
|
default: "bg-primary text-primary-foreground [a&]:hover:bg-primary/90 border-transparent",
|
|
@@ -6,7 +6,7 @@ export declare const badgeVariants: import("tailwind-variants").TVReturnType<{
|
|
|
6
6
|
destructive: string;
|
|
7
7
|
outline: string;
|
|
8
8
|
};
|
|
9
|
-
}, undefined, "focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden
|
|
9
|
+
}, undefined, "focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] [&>svg]:pointer-events-none [&>svg]:size-3", {
|
|
10
10
|
variant: {
|
|
11
11
|
default: string;
|
|
12
12
|
secondary: string;
|
|
@@ -20,7 +20,7 @@ export declare const badgeVariants: import("tailwind-variants").TVReturnType<{
|
|
|
20
20
|
destructive: string;
|
|
21
21
|
outline: string;
|
|
22
22
|
};
|
|
23
|
-
}, undefined, "focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden
|
|
23
|
+
}, undefined, "focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] [&>svg]:pointer-events-none [&>svg]:size-3", unknown, unknown, undefined>>;
|
|
24
24
|
export type BadgeVariant = VariantProps<typeof badgeVariants>["variant"];
|
|
25
25
|
import type { HTMLAnchorAttributes } from "svelte/elements";
|
|
26
26
|
import { type WithElementRef } from "../../../utils.js";
|
|
@@ -4,15 +4,15 @@
|
|
|
4
4
|
import { type VariantProps, tv } from "tailwind-variants";
|
|
5
5
|
|
|
6
6
|
export const buttonVariants = tv({
|
|
7
|
-
base: "focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex shrink-0 items-center justify-center gap-2
|
|
7
|
+
base: "focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
8
8
|
variants: {
|
|
9
9
|
variant: {
|
|
10
|
-
default: "bg-primary text-primary-foreground
|
|
10
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90 shadow-xs",
|
|
11
11
|
destructive:
|
|
12
|
-
"bg-destructive
|
|
12
|
+
"bg-destructive hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60 text-white shadow-xs",
|
|
13
13
|
outline:
|
|
14
|
-
"bg-background
|
|
15
|
-
secondary: "bg-secondary text-secondary-foreground
|
|
14
|
+
"bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 border shadow-xs",
|
|
15
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 shadow-xs",
|
|
16
16
|
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
17
17
|
link: "text-primary underline-offset-4 hover:underline",
|
|
18
18
|
},
|
|
@@ -18,7 +18,7 @@ export declare const buttonVariants: import("tailwind-variants").TVReturnType<{
|
|
|
18
18
|
"icon-sm": string;
|
|
19
19
|
"icon-lg": string;
|
|
20
20
|
};
|
|
21
|
-
}, undefined, "focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex shrink-0 items-center justify-center gap-2
|
|
21
|
+
}, undefined, "focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
|
|
22
22
|
variant: {
|
|
23
23
|
default: string;
|
|
24
24
|
destructive: string;
|
|
@@ -52,7 +52,7 @@ export declare const buttonVariants: import("tailwind-variants").TVReturnType<{
|
|
|
52
52
|
"icon-sm": string;
|
|
53
53
|
"icon-lg": string;
|
|
54
54
|
};
|
|
55
|
-
}, undefined, "focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex shrink-0 items-center justify-center gap-2
|
|
55
|
+
}, undefined, "focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", unknown, unknown, undefined>>;
|
|
56
56
|
export type ButtonVariant = VariantProps<typeof buttonVariants>["variant"];
|
|
57
57
|
export type ButtonSize = VariantProps<typeof buttonVariants>["size"];
|
|
58
58
|
export type ButtonProps = WithElementRef<HTMLButtonAttributes> & WithElementRef<HTMLAnchorAttributes> & {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
const mergedProps = $derived({
|
|
16
16
|
...restProps,
|
|
17
17
|
class: cn(
|
|
18
|
-
"bg-muted
|
|
18
|
+
"bg-muted flex items-center gap-2 rounded-md border px-4 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
|
|
19
19
|
className
|
|
20
20
|
),
|
|
21
21
|
});
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
import { tv, type VariantProps } from "tailwind-variants";
|
|
3
3
|
|
|
4
4
|
export const buttonGroupVariants = tv({
|
|
5
|
-
base: "flex w-fit items-stretch has-[>[data-slot=button-group]]:gap-2 [&>*]:focus-visible:relative [&>*]:focus-visible:z-10 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-
|
|
5
|
+
base: "flex w-fit items-stretch has-[>[data-slot=button-group]]:gap-2 [&>*]:focus-visible:relative [&>*]:focus-visible:z-10 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-e-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1",
|
|
6
6
|
variants: {
|
|
7
7
|
orientation: {
|
|
8
8
|
horizontal:
|
|
9
|
-
"[&>*:not(:first-child)]:rounded-
|
|
9
|
+
"[&>*:not(:first-child)]:rounded-s-none [&>*:not(:first-child)]:border-s-0 [&>*:not(:last-child)]:rounded-e-none",
|
|
10
10
|
vertical:
|
|
11
11
|
"flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none",
|
|
12
12
|
},
|
|
@@ -4,7 +4,7 @@ export declare const buttonGroupVariants: import("tailwind-variants").TVReturnTy
|
|
|
4
4
|
horizontal: string;
|
|
5
5
|
vertical: string;
|
|
6
6
|
};
|
|
7
|
-
}, undefined, "flex w-fit items-stretch has-[>[data-slot=button-group]]:gap-2 [&>*]:focus-visible:relative [&>*]:focus-visible:z-10 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-
|
|
7
|
+
}, undefined, "flex w-fit items-stretch has-[>[data-slot=button-group]]:gap-2 [&>*]:focus-visible:relative [&>*]:focus-visible:z-10 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-e-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1", {
|
|
8
8
|
orientation: {
|
|
9
9
|
horizontal: string;
|
|
10
10
|
vertical: string;
|
|
@@ -14,7 +14,7 @@ export declare const buttonGroupVariants: import("tailwind-variants").TVReturnTy
|
|
|
14
14
|
horizontal: string;
|
|
15
15
|
vertical: string;
|
|
16
16
|
};
|
|
17
|
-
}, undefined, "flex w-fit items-stretch has-[>[data-slot=button-group]]:gap-2 [&>*]:focus-visible:relative [&>*]:focus-visible:z-10 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-
|
|
17
|
+
}, undefined, "flex w-fit items-stretch has-[>[data-slot=button-group]]:gap-2 [&>*]:focus-visible:relative [&>*]:focus-visible:z-10 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-e-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1", unknown, unknown, undefined>>;
|
|
18
18
|
export type ButtonGroupOrientation = VariantProps<typeof buttonGroupVariants>["orientation"];
|
|
19
19
|
import { type WithElementRef } from "../../../utils.js";
|
|
20
20
|
import type { HTMLAttributes } from "svelte/elements";
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<CalendarPrimitive.Cell
|
|
9
9
|
bind:ref
|
|
10
10
|
class={cn(
|
|
11
|
-
"relative size-(--cell-size) p-0 text-center text-sm focus-within:z-20 [&:first-child[data-selected]_[data-bits-day]]:rounded-
|
|
11
|
+
"relative size-(--cell-size) p-0 text-center text-sm focus-within:z-20 [&:first-child[data-selected]_[data-bits-day]]:rounded-s-md [&:last-child[data-selected]_[data-bits-day]]:rounded-e-md",
|
|
12
12
|
className
|
|
13
13
|
)}
|
|
14
14
|
{...restProps}
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
{/each}
|
|
32
32
|
</select>
|
|
33
33
|
<span
|
|
34
|
-
class="[&>svg]:text-muted-foreground flex h-8 items-center gap-1 rounded-md
|
|
34
|
+
class="[&>svg]:text-muted-foreground flex h-8 items-center gap-1 rounded-md ps-2 pe-1 text-sm font-medium select-none [&>svg]:size-3.5"
|
|
35
35
|
aria-hidden="true"
|
|
36
36
|
>
|
|
37
37
|
{monthItems.find((item) => item.value === value)?.label || selectedMonthItem.label}
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
{/each}
|
|
31
31
|
</select>
|
|
32
32
|
<span
|
|
33
|
-
class="[&>svg]:text-muted-foreground flex h-8 items-center gap-1 rounded-md
|
|
33
|
+
class="[&>svg]:text-muted-foreground flex h-8 items-center gap-1 rounded-md ps-2 pe-1 text-sm font-medium select-none [&>svg]:size-3.5"
|
|
34
34
|
aria-hidden="true"
|
|
35
35
|
>
|
|
36
36
|
{yearItems.find((item) => item.value === value)?.label || selectedYearItem.label}
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
>
|
|
31
31
|
<div
|
|
32
32
|
bind:this={ref}
|
|
33
|
-
class={cn("flex", emblaCtx.orientation === "horizontal" ? "-
|
|
33
|
+
class={cn("flex", emblaCtx.orientation === "horizontal" ? "-ms-4" : "-mt-4 flex-col", className)}
|
|
34
34
|
data-embla-container=""
|
|
35
35
|
{...restProps}
|
|
36
36
|
>
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
data-slot="carousel-item"
|
|
19
19
|
role="group"
|
|
20
20
|
aria-roledescription="slide"
|
|
21
|
-
class={cn("min-w-0 shrink-0 grow-0 basis-full", emblaCtx.orientation === "horizontal" ? "
|
|
21
|
+
class={cn("min-w-0 shrink-0 grow-0 basis-full", emblaCtx.orientation === "horizontal" ? "ps-4" : "pt-4", className)}
|
|
22
22
|
data-embla-slide=""
|
|
23
23
|
{...restProps}
|
|
24
24
|
>
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
class={cn(
|
|
25
25
|
"absolute size-8 rounded-full",
|
|
26
26
|
emblaCtx.orientation === "horizontal"
|
|
27
|
-
? "top-1/2 -
|
|
28
|
-
: "-bottom-12
|
|
27
|
+
? "-end-12 top-1/2 -translate-y-1/2"
|
|
28
|
+
: "start-1/2 -bottom-12 -translate-x-1/2 rotate-90",
|
|
29
29
|
className
|
|
30
30
|
)}
|
|
31
31
|
onclick={emblaCtx.scrollNext}
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
class={cn(
|
|
25
25
|
"absolute size-8 rounded-full",
|
|
26
26
|
emblaCtx.orientation === "horizontal"
|
|
27
|
-
? "top-1/2 -
|
|
28
|
-
: "-top-12
|
|
27
|
+
? "-start-12 top-1/2 -translate-y-1/2"
|
|
28
|
+
: "start-1/2 -top-12 -translate-x-1/2 rotate-90",
|
|
29
29
|
className
|
|
30
30
|
)}
|
|
31
31
|
onclick={emblaCtx.scrollPrev}
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
hideIndicator?: boolean;
|
|
34
34
|
labelClassName?: string;
|
|
35
35
|
labelFormatter?: // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
36
|
-
|
|
36
|
+
((value: any, payload: TooltipPayload[]) => string | number | Snippet) | null;
|
|
37
37
|
formatter?: Snippet<
|
|
38
38
|
[
|
|
39
39
|
{
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
}: CommandPrimitive.InputProps = $props();
|
|
12
12
|
</script>
|
|
13
13
|
|
|
14
|
-
<div class="flex h-9 items-center gap-2 border-b
|
|
14
|
+
<div class="flex h-9 items-center gap-2 border-b ps-3 pe-8" data-slot="command-input-wrapper">
|
|
15
15
|
<SearchIcon class="size-4 shrink-0 opacity-50" />
|
|
16
16
|
<CommandPrimitive.Input
|
|
17
17
|
data-slot="command-input"
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
<span
|
|
14
14
|
bind:this={ref}
|
|
15
15
|
data-slot="command-shortcut"
|
|
16
|
-
class={cn("text-muted-foreground
|
|
16
|
+
class={cn("text-muted-foreground ms-auto text-xs tracking-widest", className)}
|
|
17
17
|
{...restProps}
|
|
18
18
|
>
|
|
19
19
|
{@render children?.()}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Command as CommandPrimitive } from "bits-ui";
|
|
2
1
|
import Root from "./command.svelte";
|
|
2
|
+
import Loading from "./command-loading.svelte";
|
|
3
3
|
import Dialog from "./command-dialog.svelte";
|
|
4
4
|
import Empty from "./command-empty.svelte";
|
|
5
5
|
import Group from "./command-group.svelte";
|
|
@@ -9,5 +9,4 @@ import List from "./command-list.svelte";
|
|
|
9
9
|
import Separator from "./command-separator.svelte";
|
|
10
10
|
import Shortcut from "./command-shortcut.svelte";
|
|
11
11
|
import LinkItem from "./command-link-item.svelte";
|
|
12
|
-
declare const Loading: import("svelte").Component<CommandPrimitive.LoadingProps, {}, "ref">;
|
|
13
12
|
export { Root, Dialog, Empty, Group, Item, LinkItem, Input, List, Separator, Shortcut, Loading, Root as Command, Dialog as CommandDialog, Empty as CommandEmpty, Group as CommandGroup, Item as CommandItem, LinkItem as CommandLinkItem, Input as CommandInput, List as CommandList, Separator as CommandSeparator, Shortcut as CommandShortcut, Loading as CommandLoading, };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Command as CommandPrimitive } from "bits-ui";
|
|
2
1
|
import Root from "./command.svelte";
|
|
2
|
+
import Loading from "./command-loading.svelte";
|
|
3
3
|
import Dialog from "./command-dialog.svelte";
|
|
4
4
|
import Empty from "./command-empty.svelte";
|
|
5
5
|
import Group from "./command-group.svelte";
|
|
@@ -9,7 +9,6 @@ import List from "./command-list.svelte";
|
|
|
9
9
|
import Separator from "./command-separator.svelte";
|
|
10
10
|
import Shortcut from "./command-shortcut.svelte";
|
|
11
11
|
import LinkItem from "./command-link-item.svelte";
|
|
12
|
-
const Loading = CommandPrimitive.Loading;
|
|
13
12
|
export { Root, Dialog, Empty, Group, Item, LinkItem, Input, List, Separator, Shortcut, Loading,
|
|
14
13
|
//
|
|
15
14
|
Root as Command, Dialog as CommandDialog, Empty as CommandEmpty, Group as CommandGroup, Item as CommandItem, LinkItem as CommandLinkItem, Input as CommandInput, List as CommandList, Separator as CommandSeparator, Shortcut as CommandShortcut, Loading as CommandLoading, };
|
|
@@ -22,13 +22,13 @@
|
|
|
22
22
|
bind:indeterminate
|
|
23
23
|
data-slot="context-menu-checkbox-item"
|
|
24
24
|
class={cn(
|
|
25
|
-
"data-highlighted:bg-accent data-highlighted:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5
|
|
25
|
+
"data-highlighted:bg-accent data-highlighted:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 ps-8 pe-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
26
26
|
className
|
|
27
27
|
)}
|
|
28
28
|
{...restProps}
|
|
29
29
|
>
|
|
30
30
|
{#snippet children({ checked })}
|
|
31
|
-
<span class="pointer-events-none absolute
|
|
31
|
+
<span class="pointer-events-none absolute start-2 flex size-3.5 items-center justify-center">
|
|
32
32
|
{#if checked}
|
|
33
33
|
<CheckIcon class="size-4" />
|
|
34
34
|
{/if}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { ContextMenu as ContextMenuPrimitive } from "bits-ui";
|
|
3
3
|
import { cn } from "../../../utils.js";
|
|
4
|
+
import ContextMenuPortal from "./context-menu-portal.svelte";
|
|
5
|
+
import type { ComponentProps } from "svelte";
|
|
6
|
+
import type { WithoutChildrenOrChild } from "../../../utils.js";
|
|
4
7
|
|
|
5
8
|
let {
|
|
6
9
|
ref = $bindable(null),
|
|
@@ -8,18 +11,18 @@
|
|
|
8
11
|
class: className,
|
|
9
12
|
...restProps
|
|
10
13
|
}: ContextMenuPrimitive.ContentProps & {
|
|
11
|
-
portalProps?:
|
|
14
|
+
portalProps?: WithoutChildrenOrChild<ComponentProps<typeof ContextMenuPortal>>;
|
|
12
15
|
} = $props();
|
|
13
16
|
</script>
|
|
14
17
|
|
|
15
|
-
<
|
|
18
|
+
<ContextMenuPortal {...portalProps}>
|
|
16
19
|
<ContextMenuPrimitive.Content
|
|
17
20
|
bind:ref
|
|
18
21
|
data-slot="context-menu-content"
|
|
19
22
|
class={cn(
|
|
20
|
-
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-
|
|
23
|
+
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-end-2 data-[side=right]:slide-in-from-start-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--bits-context-menu-content-available-height) min-w-[8rem] origin-(--bits-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",
|
|
21
24
|
className
|
|
22
25
|
)}
|
|
23
26
|
{...restProps}
|
|
24
27
|
/>
|
|
25
|
-
</
|
|
28
|
+
</ContextMenuPortal>
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { ContextMenu as ContextMenuPrimitive } from "bits-ui";
|
|
2
|
+
import ContextMenuPortal from "./context-menu-portal.svelte";
|
|
3
|
+
import type { ComponentProps } from "svelte";
|
|
4
|
+
import type { WithoutChildrenOrChild } from "../../../utils.js";
|
|
2
5
|
type $$ComponentProps = ContextMenuPrimitive.ContentProps & {
|
|
3
|
-
portalProps?:
|
|
6
|
+
portalProps?: WithoutChildrenOrChild<ComponentProps<typeof ContextMenuPortal>>;
|
|
4
7
|
};
|
|
5
8
|
declare const ContextMenuContent: import("svelte").Component<$$ComponentProps, {}, "ref">;
|
|
6
9
|
type ContextMenuContent = ReturnType<typeof ContextMenuContent>;
|
|
@@ -16,6 +16,6 @@
|
|
|
16
16
|
bind:ref
|
|
17
17
|
data-slot="context-menu-group-heading"
|
|
18
18
|
data-inset={inset}
|
|
19
|
-
class={cn("text-foreground px-2 py-1.5 text-sm font-medium data-[inset]:
|
|
19
|
+
class={cn("text-foreground px-2 py-1.5 text-sm font-medium data-[inset]:ps-8", className)}
|
|
20
20
|
{...restProps}
|
|
21
21
|
/>
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
data-inset={inset}
|
|
21
21
|
data-variant={variant}
|
|
22
22
|
class={cn(
|
|
23
|
-
"data-highlighted:bg-accent data-highlighted:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:data-highlighted:bg-destructive/10 dark:data-[variant=destructive]:data-highlighted:bg-destructive/20 data-[variant=destructive]:data-highlighted:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:
|
|
23
|
+
"data-highlighted:bg-accent data-highlighted:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:data-highlighted:bg-destructive/10 dark:data-[variant=destructive]:data-highlighted:bg-destructive/20 data-[variant=destructive]:data-highlighted:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:ps-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
24
24
|
className
|
|
25
25
|
)}
|
|
26
26
|
{...restProps}
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
bind:this={ref}
|
|
18
18
|
data-slot="context-menu-label"
|
|
19
19
|
data-inset={inset}
|
|
20
|
-
class={cn("text-foreground px-2 py-1.5 text-sm font-medium data-[inset]:
|
|
20
|
+
class={cn("text-foreground px-2 py-1.5 text-sm font-medium data-[inset]:ps-8", className)}
|
|
21
21
|
{...restProps}
|
|
22
22
|
>
|
|
23
23
|
{@render children?.()}
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
bind:ref
|
|
16
16
|
data-slot="context-menu-radio-item"
|
|
17
17
|
class={cn(
|
|
18
|
-
"data-highlighted:bg-accent data-highlighted:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5
|
|
18
|
+
"data-highlighted:bg-accent data-highlighted:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 ps-8 pe-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
19
19
|
className
|
|
20
20
|
)}
|
|
21
21
|
{...restProps}
|
|
22
22
|
>
|
|
23
23
|
{#snippet children({ checked })}
|
|
24
|
-
<span class="pointer-events-none absolute
|
|
24
|
+
<span class="pointer-events-none absolute start-2 flex size-3.5 items-center justify-center">
|
|
25
25
|
{#if checked}
|
|
26
26
|
<CircleIcon class="size-2 fill-current" />
|
|
27
27
|
{/if}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
<span
|
|
14
14
|
bind:this={ref}
|
|
15
15
|
data-slot="context-menu-shortcut"
|
|
16
|
-
class={cn("text-muted-foreground
|
|
16
|
+
class={cn("text-muted-foreground ms-auto text-xs tracking-widest", className)}
|
|
17
17
|
{...restProps}
|
|
18
18
|
>
|
|
19
19
|
{@render children?.()}
|