orbital-ds 0.1.0 → 0.2.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/contract.json +38 -0
- package/dist/styles.css +98 -18
- package/dist/themes/qratia.css +13 -13
- package/dist/themes/zyro.css +189 -0
- package/dist/ui/accordion.d.ts +9 -0
- package/dist/ui/accordion.js +79 -0
- package/dist/ui/alert-dialog.d.ts +23 -0
- package/dist/ui/alert-dialog.js +173 -0
- package/dist/ui/alert.d.ts +13 -0
- package/dist/ui/alert.js +77 -0
- package/dist/ui/aspect-ratio.d.ts +7 -0
- package/dist/ui/aspect-ratio.js +22 -0
- package/dist/ui/attachment.d.ts +26 -0
- package/dist/ui/attachment.js +197 -0
- package/dist/ui/avatar.js +1 -1
- package/dist/ui/badge.d.ts +1 -1
- package/dist/ui/badge.js +1 -1
- package/dist/ui/bubble.d.ts +19 -0
- package/dist/ui/bubble.js +115 -0
- package/dist/ui/button-group.d.ts +15 -0
- package/dist/ui/button-group.js +82 -0
- package/dist/ui/button.d.ts +5 -3
- package/dist/ui/button.js +9 -6
- package/dist/ui/calendar.d.ts +15 -0
- package/dist/ui/calendar.js +190 -0
- package/dist/ui/card.js +4 -4
- package/dist/ui/carousel.d.ts +33 -0
- package/dist/ui/carousel.js +199 -0
- package/dist/ui/checkbox.js +1 -1
- package/dist/ui/combobox.d.ts +26 -0
- package/dist/ui/combobox.js +281 -0
- package/dist/ui/command.d.ts +22 -0
- package/dist/ui/command.js +183 -0
- package/dist/ui/context-menu.d.ts +31 -0
- package/dist/ui/context-menu.js +242 -0
- package/dist/ui/dialog.js +2 -2
- package/dist/ui/direction.d.ts +1 -0
- package/dist/ui/direction.js +8 -0
- package/dist/ui/drawer.d.ts +18 -0
- package/dist/ui/drawer.js +208 -0
- package/dist/ui/dropdown-menu.d.ts +1 -1
- package/dist/ui/dropdown-menu.js +13 -9
- package/dist/ui/empty.d.ts +15 -0
- package/dist/ui/empty.js +102 -0
- package/dist/ui/field.d.ts +28 -0
- package/dist/ui/field.js +217 -0
- package/dist/ui/hover-card.d.ts +8 -0
- package/dist/ui/hover-card.js +45 -0
- package/dist/ui/input-group.d.ts +22 -0
- package/dist/ui/input-group.js +145 -0
- package/dist/ui/input-otp.d.ts +13 -0
- package/dist/ui/input-otp.js +82 -0
- package/dist/ui/input.js +1 -1
- package/dist/ui/item.d.ts +26 -0
- package/dist/ui/item.js +195 -0
- package/dist/ui/kbd.d.ts +6 -0
- package/dist/ui/kbd.js +29 -0
- package/dist/ui/marker.d.ts +13 -0
- package/dist/ui/marker.js +71 -0
- package/dist/ui/menubar.d.ts +31 -0
- package/dist/ui/menubar.js +259 -0
- package/dist/ui/message-scroller.d.ts +16 -0
- package/dist/ui/message-scroller.js +120 -0
- package/dist/ui/message.d.ts +12 -0
- package/dist/ui/message.js +90 -0
- package/dist/ui/native-select.d.ts +10 -0
- package/dist/ui/native-select.js +63 -0
- package/dist/ui/navigation-menu.d.ts +15 -0
- package/dist/ui/navigation-menu.js +162 -0
- package/dist/ui/pagination.d.ts +22 -0
- package/dist/ui/pagination.js +128 -0
- package/dist/ui/popover.js +2 -2
- package/dist/ui/questionnaire.d.ts +24 -0
- package/dist/ui/questionnaire.js +331 -0
- package/dist/ui/radio-group.d.ts +8 -0
- package/dist/ui/radio-group.js +39 -0
- package/dist/ui/resizable.d.ts +10 -0
- package/dist/ui/resizable.js +46 -0
- package/dist/ui/scroll-area.js +1 -1
- package/dist/ui/select.js +5 -5
- package/dist/ui/sheet.js +4 -4
- package/dist/ui/sidebar.js +4 -4
- package/dist/ui/slider.d.ts +6 -0
- package/dist/ui/slider.js +53 -0
- package/dist/ui/spinner.d.ts +5 -0
- package/dist/ui/spinner.js +9 -0
- package/dist/ui/switch.d.ts +8 -0
- package/dist/ui/switch.js +32 -0
- package/dist/ui/table.js +2 -2
- package/dist/ui/tabs.js +1 -1
- package/dist/ui/textarea.js +1 -1
- package/dist/ui/toast.d.ts +19 -0
- package/dist/ui/toast.js +193 -0
- package/dist/ui/toggle-group.d.ts +14 -0
- package/dist/ui/toggle-group.js +77 -0
- package/dist/ui/toggle.d.ts +12 -0
- package/dist/ui/toggle.js +43 -0
- package/dist/ui/tooltip.js +3 -3
- package/docs/CONTRACT.md +113 -0
- package/package.json +50 -12
- package/scripts/doctor.mjs +142 -0
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Command as CommandPrimitive } from "cmdk";
|
|
4
|
+
import { cn } from "../lib/utils";
|
|
5
|
+
import {
|
|
6
|
+
Dialog,
|
|
7
|
+
DialogContent,
|
|
8
|
+
DialogDescription,
|
|
9
|
+
DialogHeader,
|
|
10
|
+
DialogTitle
|
|
11
|
+
} from "./dialog";
|
|
12
|
+
import {
|
|
13
|
+
InputGroup,
|
|
14
|
+
InputGroupAddon
|
|
15
|
+
} from "./input-group";
|
|
16
|
+
import { SearchIcon, CheckIcon } from "lucide-react";
|
|
17
|
+
function Command({
|
|
18
|
+
className,
|
|
19
|
+
...props
|
|
20
|
+
}) {
|
|
21
|
+
return /* @__PURE__ */ jsx(
|
|
22
|
+
CommandPrimitive,
|
|
23
|
+
{
|
|
24
|
+
"data-slot": "command",
|
|
25
|
+
className: cn(
|
|
26
|
+
"flex size-full flex-col overflow-hidden rounded-control bg-popover p-1 text-popover-foreground",
|
|
27
|
+
className
|
|
28
|
+
),
|
|
29
|
+
...props
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
function CommandDialog({
|
|
34
|
+
title = "Command Palette",
|
|
35
|
+
description = "Search for a command to run...",
|
|
36
|
+
children,
|
|
37
|
+
className,
|
|
38
|
+
showCloseButton = false,
|
|
39
|
+
...props
|
|
40
|
+
}) {
|
|
41
|
+
return /* @__PURE__ */ jsxs(Dialog, { ...props, children: [
|
|
42
|
+
/* @__PURE__ */ jsxs(DialogHeader, { className: "sr-only", children: [
|
|
43
|
+
/* @__PURE__ */ jsx(DialogTitle, { children: title }),
|
|
44
|
+
/* @__PURE__ */ jsx(DialogDescription, { children: description })
|
|
45
|
+
] }),
|
|
46
|
+
/* @__PURE__ */ jsx(
|
|
47
|
+
DialogContent,
|
|
48
|
+
{
|
|
49
|
+
className: cn(
|
|
50
|
+
"top-1/3 translate-y-0 overflow-hidden rounded-control! p-0",
|
|
51
|
+
className
|
|
52
|
+
),
|
|
53
|
+
showCloseButton,
|
|
54
|
+
children
|
|
55
|
+
}
|
|
56
|
+
)
|
|
57
|
+
] });
|
|
58
|
+
}
|
|
59
|
+
function CommandInput({
|
|
60
|
+
className,
|
|
61
|
+
...props
|
|
62
|
+
}) {
|
|
63
|
+
return /* @__PURE__ */ jsx("div", { "data-slot": "command-input-wrapper", className: "p-1 pb-0", children: /* @__PURE__ */ jsxs(InputGroup, { className: "h-9 bg-input/30", children: [
|
|
64
|
+
/* @__PURE__ */ jsx(
|
|
65
|
+
CommandPrimitive.Input,
|
|
66
|
+
{
|
|
67
|
+
"data-slot": "command-input",
|
|
68
|
+
className: cn(
|
|
69
|
+
"w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
|
|
70
|
+
className
|
|
71
|
+
),
|
|
72
|
+
...props
|
|
73
|
+
}
|
|
74
|
+
),
|
|
75
|
+
/* @__PURE__ */ jsx(InputGroupAddon, { children: /* @__PURE__ */ jsx(SearchIcon, { className: "size-4 shrink-0 opacity-50" }) })
|
|
76
|
+
] }) });
|
|
77
|
+
}
|
|
78
|
+
function CommandList({
|
|
79
|
+
className,
|
|
80
|
+
...props
|
|
81
|
+
}) {
|
|
82
|
+
return /* @__PURE__ */ jsx(
|
|
83
|
+
CommandPrimitive.List,
|
|
84
|
+
{
|
|
85
|
+
"data-slot": "command-list",
|
|
86
|
+
className: cn(
|
|
87
|
+
"no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none",
|
|
88
|
+
className
|
|
89
|
+
),
|
|
90
|
+
...props
|
|
91
|
+
}
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
function CommandEmpty({
|
|
95
|
+
className,
|
|
96
|
+
...props
|
|
97
|
+
}) {
|
|
98
|
+
return /* @__PURE__ */ jsx(
|
|
99
|
+
CommandPrimitive.Empty,
|
|
100
|
+
{
|
|
101
|
+
"data-slot": "command-empty",
|
|
102
|
+
className: cn("py-6 text-center text-sm", className),
|
|
103
|
+
...props
|
|
104
|
+
}
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
function CommandGroup({
|
|
108
|
+
className,
|
|
109
|
+
...props
|
|
110
|
+
}) {
|
|
111
|
+
return /* @__PURE__ */ jsx(
|
|
112
|
+
CommandPrimitive.Group,
|
|
113
|
+
{
|
|
114
|
+
"data-slot": "command-group",
|
|
115
|
+
className: cn(
|
|
116
|
+
"overflow-hidden p-1 text-foreground **:[[cmdk-group-heading]]:px-3 **:[[cmdk-group-heading]]:py-2 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground",
|
|
117
|
+
className
|
|
118
|
+
),
|
|
119
|
+
...props
|
|
120
|
+
}
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
function CommandSeparator({
|
|
124
|
+
className,
|
|
125
|
+
...props
|
|
126
|
+
}) {
|
|
127
|
+
return /* @__PURE__ */ jsx(
|
|
128
|
+
CommandPrimitive.Separator,
|
|
129
|
+
{
|
|
130
|
+
"data-slot": "command-separator",
|
|
131
|
+
className: cn("my-1 h-px bg-border/50", className),
|
|
132
|
+
...props
|
|
133
|
+
}
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
function CommandItem({
|
|
137
|
+
className,
|
|
138
|
+
children,
|
|
139
|
+
...props
|
|
140
|
+
}) {
|
|
141
|
+
return /* @__PURE__ */ jsxs(
|
|
142
|
+
CommandPrimitive.Item,
|
|
143
|
+
{
|
|
144
|
+
"data-slot": "command-item",
|
|
145
|
+
className: cn(
|
|
146
|
+
"group/command-item relative flex cursor-default items-center gap-2 rounded-lg px-3 py-2 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-2xl data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-selected:*:[svg]:text-foreground",
|
|
147
|
+
className
|
|
148
|
+
),
|
|
149
|
+
...props,
|
|
150
|
+
children: [
|
|
151
|
+
children,
|
|
152
|
+
/* @__PURE__ */ jsx(CheckIcon, { className: "ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100" })
|
|
153
|
+
]
|
|
154
|
+
}
|
|
155
|
+
);
|
|
156
|
+
}
|
|
157
|
+
function CommandShortcut({
|
|
158
|
+
className,
|
|
159
|
+
...props
|
|
160
|
+
}) {
|
|
161
|
+
return /* @__PURE__ */ jsx(
|
|
162
|
+
"span",
|
|
163
|
+
{
|
|
164
|
+
"data-slot": "command-shortcut",
|
|
165
|
+
className: cn(
|
|
166
|
+
"ml-auto text-xs tracking-widest text-muted-foreground group-data-selected/command-item:text-foreground",
|
|
167
|
+
className
|
|
168
|
+
),
|
|
169
|
+
...props
|
|
170
|
+
}
|
|
171
|
+
);
|
|
172
|
+
}
|
|
173
|
+
export {
|
|
174
|
+
Command,
|
|
175
|
+
CommandDialog,
|
|
176
|
+
CommandEmpty,
|
|
177
|
+
CommandGroup,
|
|
178
|
+
CommandInput,
|
|
179
|
+
CommandItem,
|
|
180
|
+
CommandList,
|
|
181
|
+
CommandSeparator,
|
|
182
|
+
CommandShortcut
|
|
183
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ContextMenu as ContextMenu$1 } from '@base-ui/react/context-menu';
|
|
3
|
+
|
|
4
|
+
declare function ContextMenu({ ...props }: ContextMenu$1.Root.Props): React.JSX.Element;
|
|
5
|
+
declare function ContextMenuPortal({ ...props }: ContextMenu$1.Portal.Props): React.JSX.Element;
|
|
6
|
+
declare function ContextMenuTrigger({ className, ...props }: ContextMenu$1.Trigger.Props): React.JSX.Element;
|
|
7
|
+
declare function ContextMenuContent({ className, align, alignOffset, side, sideOffset, ...props }: ContextMenu$1.Popup.Props & Pick<ContextMenu$1.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset">): React.JSX.Element;
|
|
8
|
+
declare function ContextMenuGroup({ ...props }: ContextMenu$1.Group.Props): React.JSX.Element;
|
|
9
|
+
declare function ContextMenuLabel({ className, inset, ...props }: ContextMenu$1.GroupLabel.Props & {
|
|
10
|
+
inset?: boolean;
|
|
11
|
+
}): React.JSX.Element;
|
|
12
|
+
declare function ContextMenuItem({ className, inset, variant, ...props }: ContextMenu$1.Item.Props & {
|
|
13
|
+
inset?: boolean;
|
|
14
|
+
variant?: "default" | "destructive";
|
|
15
|
+
}): React.JSX.Element;
|
|
16
|
+
declare function ContextMenuSub({ ...props }: ContextMenu$1.SubmenuRoot.Props): React.JSX.Element;
|
|
17
|
+
declare function ContextMenuSubTrigger({ className, inset, children, ...props }: ContextMenu$1.SubmenuTrigger.Props & {
|
|
18
|
+
inset?: boolean;
|
|
19
|
+
}): React.JSX.Element;
|
|
20
|
+
declare function ContextMenuSubContent({ ...props }: React.ComponentProps<typeof ContextMenuContent>): React.JSX.Element;
|
|
21
|
+
declare function ContextMenuCheckboxItem({ className, children, checked, inset, ...props }: ContextMenu$1.CheckboxItem.Props & {
|
|
22
|
+
inset?: boolean;
|
|
23
|
+
}): React.JSX.Element;
|
|
24
|
+
declare function ContextMenuRadioGroup({ ...props }: ContextMenu$1.RadioGroup.Props): React.JSX.Element;
|
|
25
|
+
declare function ContextMenuRadioItem({ className, children, inset, ...props }: ContextMenu$1.RadioItem.Props & {
|
|
26
|
+
inset?: boolean;
|
|
27
|
+
}): React.JSX.Element;
|
|
28
|
+
declare function ContextMenuSeparator({ className, ...props }: ContextMenu$1.Separator.Props): React.JSX.Element;
|
|
29
|
+
declare function ContextMenuShortcut({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
30
|
+
|
|
31
|
+
export { ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger };
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { ContextMenu as ContextMenuPrimitive } from "@base-ui/react/context-menu";
|
|
4
|
+
import { cn } from "../lib/utils";
|
|
5
|
+
import { ChevronRightIcon, CheckIcon } from "lucide-react";
|
|
6
|
+
function ContextMenu({ ...props }) {
|
|
7
|
+
return /* @__PURE__ */ jsx(ContextMenuPrimitive.Root, { "data-slot": "context-menu", ...props });
|
|
8
|
+
}
|
|
9
|
+
function ContextMenuPortal({ ...props }) {
|
|
10
|
+
return /* @__PURE__ */ jsx(ContextMenuPrimitive.Portal, { "data-slot": "context-menu-portal", ...props });
|
|
11
|
+
}
|
|
12
|
+
function ContextMenuTrigger({
|
|
13
|
+
className,
|
|
14
|
+
...props
|
|
15
|
+
}) {
|
|
16
|
+
return /* @__PURE__ */ jsx(
|
|
17
|
+
ContextMenuPrimitive.Trigger,
|
|
18
|
+
{
|
|
19
|
+
"data-slot": "context-menu-trigger",
|
|
20
|
+
className: cn("select-none", className),
|
|
21
|
+
...props
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
function ContextMenuContent({
|
|
26
|
+
className,
|
|
27
|
+
align = "start",
|
|
28
|
+
alignOffset = 4,
|
|
29
|
+
side = "right",
|
|
30
|
+
sideOffset = 0,
|
|
31
|
+
...props
|
|
32
|
+
}) {
|
|
33
|
+
return /* @__PURE__ */ jsx(ContextMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
34
|
+
ContextMenuPrimitive.Positioner,
|
|
35
|
+
{
|
|
36
|
+
className: "isolate z-(--ds-z-overlay) outline-none",
|
|
37
|
+
align,
|
|
38
|
+
alignOffset,
|
|
39
|
+
side,
|
|
40
|
+
sideOffset,
|
|
41
|
+
children: /* @__PURE__ */ jsx(
|
|
42
|
+
ContextMenuPrimitive.Popup,
|
|
43
|
+
{
|
|
44
|
+
"data-slot": "context-menu-content",
|
|
45
|
+
className: cn("z-(--ds-z-overlay) max-h-(--available-height) min-w-48 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-2xl bg-popover p-1 text-popover-foreground shadow-popover ring-1 ring-foreground/5 duration-(--ds-motion-fast) outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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", className),
|
|
46
|
+
...props
|
|
47
|
+
}
|
|
48
|
+
)
|
|
49
|
+
}
|
|
50
|
+
) });
|
|
51
|
+
}
|
|
52
|
+
function ContextMenuGroup({ ...props }) {
|
|
53
|
+
return /* @__PURE__ */ jsx(ContextMenuPrimitive.Group, { "data-slot": "context-menu-group", ...props });
|
|
54
|
+
}
|
|
55
|
+
function ContextMenuLabel({
|
|
56
|
+
className,
|
|
57
|
+
inset,
|
|
58
|
+
...props
|
|
59
|
+
}) {
|
|
60
|
+
return /* @__PURE__ */ jsx(
|
|
61
|
+
ContextMenuPrimitive.GroupLabel,
|
|
62
|
+
{
|
|
63
|
+
"data-slot": "context-menu-label",
|
|
64
|
+
"data-inset": inset,
|
|
65
|
+
className: cn(
|
|
66
|
+
"px-3 py-2.5 text-xs text-muted-foreground data-inset:pl-9.5",
|
|
67
|
+
className
|
|
68
|
+
),
|
|
69
|
+
...props
|
|
70
|
+
}
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
function ContextMenuItem({
|
|
74
|
+
className,
|
|
75
|
+
inset,
|
|
76
|
+
variant = "default",
|
|
77
|
+
...props
|
|
78
|
+
}) {
|
|
79
|
+
return /* @__PURE__ */ jsx(
|
|
80
|
+
ContextMenuPrimitive.Item,
|
|
81
|
+
{
|
|
82
|
+
"data-slot": "context-menu-item",
|
|
83
|
+
"data-inset": inset,
|
|
84
|
+
"data-variant": variant,
|
|
85
|
+
className: cn(
|
|
86
|
+
"group/context-menu-item relative flex cursor-default items-center gap-2.5 rounded-xl px-3 py-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-9.5 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 focus:*:[svg]:text-accent-foreground data-[variant=destructive]:*:[svg]:text-destructive",
|
|
87
|
+
className
|
|
88
|
+
),
|
|
89
|
+
...props
|
|
90
|
+
}
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
function ContextMenuSub({ ...props }) {
|
|
94
|
+
return /* @__PURE__ */ jsx(ContextMenuPrimitive.SubmenuRoot, { "data-slot": "context-menu-sub", ...props });
|
|
95
|
+
}
|
|
96
|
+
function ContextMenuSubTrigger({
|
|
97
|
+
className,
|
|
98
|
+
inset,
|
|
99
|
+
children,
|
|
100
|
+
...props
|
|
101
|
+
}) {
|
|
102
|
+
return /* @__PURE__ */ jsxs(
|
|
103
|
+
ContextMenuPrimitive.SubmenuTrigger,
|
|
104
|
+
{
|
|
105
|
+
"data-slot": "context-menu-sub-trigger",
|
|
106
|
+
"data-inset": inset,
|
|
107
|
+
className: cn(
|
|
108
|
+
"flex cursor-default items-center rounded-xl px-3 py-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-9.5 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
109
|
+
className
|
|
110
|
+
),
|
|
111
|
+
...props,
|
|
112
|
+
children: [
|
|
113
|
+
children,
|
|
114
|
+
/* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto" })
|
|
115
|
+
]
|
|
116
|
+
}
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
function ContextMenuSubContent({
|
|
120
|
+
...props
|
|
121
|
+
}) {
|
|
122
|
+
return /* @__PURE__ */ jsx(
|
|
123
|
+
ContextMenuContent,
|
|
124
|
+
{
|
|
125
|
+
"data-slot": "context-menu-sub-content",
|
|
126
|
+
className: "shadow-overlay",
|
|
127
|
+
side: "right",
|
|
128
|
+
...props
|
|
129
|
+
}
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
function ContextMenuCheckboxItem({
|
|
133
|
+
className,
|
|
134
|
+
children,
|
|
135
|
+
checked,
|
|
136
|
+
inset,
|
|
137
|
+
...props
|
|
138
|
+
}) {
|
|
139
|
+
return /* @__PURE__ */ jsxs(
|
|
140
|
+
ContextMenuPrimitive.CheckboxItem,
|
|
141
|
+
{
|
|
142
|
+
"data-slot": "context-menu-checkbox-item",
|
|
143
|
+
"data-inset": inset,
|
|
144
|
+
className: cn(
|
|
145
|
+
"relative flex cursor-default items-center gap-2 rounded-xl py-2 pr-8 pl-3 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-9.5 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
146
|
+
className
|
|
147
|
+
),
|
|
148
|
+
checked,
|
|
149
|
+
...props,
|
|
150
|
+
children: [
|
|
151
|
+
/* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute right-2", children: /* @__PURE__ */ jsx(ContextMenuPrimitive.CheckboxItemIndicator, { children: /* @__PURE__ */ jsx(
|
|
152
|
+
CheckIcon,
|
|
153
|
+
{}
|
|
154
|
+
) }) }),
|
|
155
|
+
children
|
|
156
|
+
]
|
|
157
|
+
}
|
|
158
|
+
);
|
|
159
|
+
}
|
|
160
|
+
function ContextMenuRadioGroup({
|
|
161
|
+
...props
|
|
162
|
+
}) {
|
|
163
|
+
return /* @__PURE__ */ jsx(
|
|
164
|
+
ContextMenuPrimitive.RadioGroup,
|
|
165
|
+
{
|
|
166
|
+
"data-slot": "context-menu-radio-group",
|
|
167
|
+
...props
|
|
168
|
+
}
|
|
169
|
+
);
|
|
170
|
+
}
|
|
171
|
+
function ContextMenuRadioItem({
|
|
172
|
+
className,
|
|
173
|
+
children,
|
|
174
|
+
inset,
|
|
175
|
+
...props
|
|
176
|
+
}) {
|
|
177
|
+
return /* @__PURE__ */ jsxs(
|
|
178
|
+
ContextMenuPrimitive.RadioItem,
|
|
179
|
+
{
|
|
180
|
+
"data-slot": "context-menu-radio-item",
|
|
181
|
+
"data-inset": inset,
|
|
182
|
+
className: cn(
|
|
183
|
+
"relative flex cursor-default items-center gap-2 rounded-xl py-2 pr-8 pl-3 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-9.5 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
184
|
+
className
|
|
185
|
+
),
|
|
186
|
+
...props,
|
|
187
|
+
children: [
|
|
188
|
+
/* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute right-2", children: /* @__PURE__ */ jsx(ContextMenuPrimitive.RadioItemIndicator, { children: /* @__PURE__ */ jsx(
|
|
189
|
+
CheckIcon,
|
|
190
|
+
{}
|
|
191
|
+
) }) }),
|
|
192
|
+
children
|
|
193
|
+
]
|
|
194
|
+
}
|
|
195
|
+
);
|
|
196
|
+
}
|
|
197
|
+
function ContextMenuSeparator({
|
|
198
|
+
className,
|
|
199
|
+
...props
|
|
200
|
+
}) {
|
|
201
|
+
return /* @__PURE__ */ jsx(
|
|
202
|
+
ContextMenuPrimitive.Separator,
|
|
203
|
+
{
|
|
204
|
+
"data-slot": "context-menu-separator",
|
|
205
|
+
className: cn("-mx-1 my-1 h-px bg-border/50", className),
|
|
206
|
+
...props
|
|
207
|
+
}
|
|
208
|
+
);
|
|
209
|
+
}
|
|
210
|
+
function ContextMenuShortcut({
|
|
211
|
+
className,
|
|
212
|
+
...props
|
|
213
|
+
}) {
|
|
214
|
+
return /* @__PURE__ */ jsx(
|
|
215
|
+
"span",
|
|
216
|
+
{
|
|
217
|
+
"data-slot": "context-menu-shortcut",
|
|
218
|
+
className: cn(
|
|
219
|
+
"ml-auto text-xs tracking-widest text-muted-foreground group-focus/context-menu-item:text-accent-foreground",
|
|
220
|
+
className
|
|
221
|
+
),
|
|
222
|
+
...props
|
|
223
|
+
}
|
|
224
|
+
);
|
|
225
|
+
}
|
|
226
|
+
export {
|
|
227
|
+
ContextMenu,
|
|
228
|
+
ContextMenuCheckboxItem,
|
|
229
|
+
ContextMenuContent,
|
|
230
|
+
ContextMenuGroup,
|
|
231
|
+
ContextMenuItem,
|
|
232
|
+
ContextMenuLabel,
|
|
233
|
+
ContextMenuPortal,
|
|
234
|
+
ContextMenuRadioGroup,
|
|
235
|
+
ContextMenuRadioItem,
|
|
236
|
+
ContextMenuSeparator,
|
|
237
|
+
ContextMenuShortcut,
|
|
238
|
+
ContextMenuSub,
|
|
239
|
+
ContextMenuSubContent,
|
|
240
|
+
ContextMenuSubTrigger,
|
|
241
|
+
ContextMenuTrigger
|
|
242
|
+
};
|
package/dist/ui/dialog.js
CHANGED
|
@@ -24,7 +24,7 @@ function DialogOverlay({
|
|
|
24
24
|
{
|
|
25
25
|
"data-slot": "dialog-overlay",
|
|
26
26
|
className: cn(
|
|
27
|
-
"fixed inset-0 isolate z-(--z-overlay) bg-scrim duration-(--motion-fast) supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
|
|
27
|
+
"fixed inset-0 isolate z-(--ds-z-overlay) bg-scrim duration-(--ds-motion-fast) supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
|
|
28
28
|
className
|
|
29
29
|
),
|
|
30
30
|
...props
|
|
@@ -44,7 +44,7 @@ function DialogContent({
|
|
|
44
44
|
{
|
|
45
45
|
"data-slot": "dialog-content",
|
|
46
46
|
className: cn(
|
|
47
|
-
"fixed top-1/2 left-1/2 z-(--z-overlay) grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-
|
|
47
|
+
"fixed top-1/2 left-1/2 z-(--ds-z-overlay) grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-(--ds-overlay-gap) rounded-overlay bg-popover p-(--ds-overlay-p) text-sm text-popover-foreground ring-1 ring-foreground/5 duration-(--ds-motion-fast) outline-none sm:max-w-md 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",
|
|
48
48
|
className
|
|
49
49
|
),
|
|
50
50
|
...props,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DirectionProvider, useDirection } from '@base-ui/react/direction-provider';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Drawer as Drawer$1 } from '@base-ui/react/drawer';
|
|
3
|
+
|
|
4
|
+
declare function Drawer({ modal, showSwipeHandle, snapPoints, swipeDirection, ...props }: Drawer$1.Root.Props & {
|
|
5
|
+
showSwipeHandle?: boolean;
|
|
6
|
+
}): React.JSX.Element;
|
|
7
|
+
declare function DrawerTrigger({ ...props }: Drawer$1.Trigger.Props): React.JSX.Element;
|
|
8
|
+
declare function DrawerPortal({ ...props }: Drawer$1.Portal.Props): React.JSX.Element;
|
|
9
|
+
declare function DrawerClose({ ...props }: Drawer$1.Close.Props): React.JSX.Element;
|
|
10
|
+
declare function DrawerOverlay({ className, ...props }: Drawer$1.Backdrop.Props): React.JSX.Element;
|
|
11
|
+
declare function DrawerSwipeHandle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
12
|
+
declare function DrawerContent({ className, children, ...props }: Drawer$1.Popup.Props): React.JSX.Element;
|
|
13
|
+
declare function DrawerHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
14
|
+
declare function DrawerFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
15
|
+
declare function DrawerTitle({ className, ...props }: Drawer$1.Title.Props): React.JSX.Element;
|
|
16
|
+
declare function DrawerDescription({ className, ...props }: Drawer$1.Description.Props): React.JSX.Element;
|
|
17
|
+
|
|
18
|
+
export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerSwipeHandle, DrawerTitle, DrawerTrigger };
|