@ucdjs-internal/shared-ui 0.1.6 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -3
- package/dist/components/shiki-code.d.mts +2 -2
- package/dist/components/shiki-code.mjs +1 -3
- package/dist/components/theme-toggle.d.mts +3 -3
- package/dist/components/theme-toggle.mjs +1 -3
- package/dist/components/ucd-logo.d.mts +10 -0
- package/dist/components/ucd-logo.mjs +61 -0
- package/dist/components.d.mts +30 -0
- package/dist/components.mjs +30 -0
- package/dist/hooks/index.mjs +2 -3
- package/dist/hooks/use-clipboard.mjs +2 -4
- package/dist/hooks/use-mobile.mjs +1 -3
- package/dist/hooks/use-theme.mjs +1 -3
- package/dist/index.mjs +2 -3
- package/dist/lib/theme-script.mjs +1 -2
- package/dist/lib/utils.mjs +1 -3
- package/dist/ui/alert-dialog.d.mts +17 -17
- package/dist/ui/alert-dialog.mjs +12 -13
- package/dist/ui/avatar.d.mts +11 -11
- package/dist/ui/avatar.mjs +7 -8
- package/dist/ui/badge.d.mts +4 -4
- package/dist/ui/badge.mjs +1 -3
- package/dist/ui/breadcrumb.d.mts +7 -7
- package/dist/ui/breadcrumb.mjs +2 -3
- package/dist/ui/button.d.mts +8 -8
- package/dist/ui/button.mjs +4 -6
- package/dist/ui/card.d.mts +8 -8
- package/dist/ui/card.mjs +2 -3
- package/dist/ui/checkbox.d.mts +5 -5
- package/dist/ui/checkbox.mjs +5 -7
- package/dist/ui/collapsible.d.mts +7 -7
- package/dist/ui/collapsible.mjs +6 -8
- package/dist/ui/combobox.d.mts +20 -20
- package/dist/ui/combobox.mjs +21 -23
- package/dist/ui/command.d.mts +55 -16
- package/dist/ui/command.mjs +327 -89
- package/dist/ui/context-menu.d.mts +24 -24
- package/dist/ui/context-menu.mjs +20 -21
- package/dist/ui/dialog.d.mts +17 -15
- package/dist/ui/dialog.mjs +52 -42
- package/dist/ui/dropdown-menu.d.mts +16 -16
- package/dist/ui/dropdown-menu.mjs +2 -3
- package/dist/ui/field.d.mts +13 -13
- package/dist/ui/field.mjs +1 -3
- package/dist/ui/input-group.d.mts +10 -10
- package/dist/ui/input-group.mjs +2 -3
- package/dist/ui/input.d.mts +2 -2
- package/dist/ui/input.mjs +5 -6
- package/dist/ui/label.d.mts +2 -2
- package/dist/ui/label.mjs +2 -3
- package/dist/ui/scroll-area.d.mts +6 -6
- package/dist/ui/scroll-area.mjs +9 -10
- package/dist/ui/select.d.mts +14 -14
- package/dist/ui/select.mjs +18 -19
- package/dist/ui/separator.d.mts +5 -5
- package/dist/ui/separator.mjs +4 -6
- package/dist/ui/sheet.d.mts +9 -9
- package/dist/ui/sheet.mjs +2 -3
- package/dist/ui/sidebar.d.mts +23 -23
- package/dist/ui/sidebar.mjs +4 -6
- package/dist/ui/skeleton.d.mts +2 -2
- package/dist/ui/skeleton.mjs +1 -3
- package/dist/ui/table.d.mts +9 -9
- package/dist/ui/table.mjs +2 -3
- package/dist/ui/textarea.d.mts +2 -2
- package/dist/ui/textarea.mjs +2 -3
- package/dist/ui/tooltip.d.mts +8 -8
- package/dist/ui/tooltip.mjs +9 -11
- package/dist/vscode/syntaxes/ucd.tmLanguage.mjs +1 -2
- package/package.json +22 -44
- package/dist/components/index.d.mts +0 -3
- package/dist/components/index.mjs +0 -4
- package/dist/vendor/cmdk/command-score.mjs +0 -62
- package/dist/vendor/cmdk/index.d.mts +0 -181
- package/dist/vendor/cmdk/index.mjs +0 -713
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
-
import { ContextMenu
|
|
2
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
import { ContextMenu } from "@base-ui/react/context-menu";
|
|
4
4
|
|
|
5
5
|
//#region src/ui/context-menu.d.ts
|
|
6
|
-
declare function ContextMenu({
|
|
6
|
+
declare function ContextMenu$1({
|
|
7
7
|
...props
|
|
8
|
-
}: ContextMenu
|
|
8
|
+
}: ContextMenu.Root.Props): _$react_jsx_runtime0.JSX.Element;
|
|
9
9
|
declare function ContextMenuPortal({
|
|
10
10
|
...props
|
|
11
|
-
}: ContextMenu
|
|
11
|
+
}: ContextMenu.Portal.Props): _$react_jsx_runtime0.JSX.Element;
|
|
12
12
|
declare function ContextMenuTrigger({
|
|
13
13
|
className,
|
|
14
14
|
...props
|
|
15
|
-
}: ContextMenu
|
|
15
|
+
}: ContextMenu.Trigger.Props): _$react_jsx_runtime0.JSX.Element;
|
|
16
16
|
declare function ContextMenuContent({
|
|
17
17
|
className,
|
|
18
18
|
align,
|
|
@@ -20,67 +20,67 @@ declare function ContextMenuContent({
|
|
|
20
20
|
side,
|
|
21
21
|
sideOffset,
|
|
22
22
|
...props
|
|
23
|
-
}: ContextMenu
|
|
23
|
+
}: ContextMenu.Popup.Props & Pick<ContextMenu.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset">): _$react_jsx_runtime0.JSX.Element;
|
|
24
24
|
declare function ContextMenuGroup({
|
|
25
25
|
...props
|
|
26
|
-
}: ContextMenu
|
|
26
|
+
}: ContextMenu.Group.Props): _$react_jsx_runtime0.JSX.Element;
|
|
27
27
|
declare function ContextMenuLabel({
|
|
28
28
|
className,
|
|
29
29
|
inset,
|
|
30
30
|
...props
|
|
31
|
-
}: ContextMenu
|
|
31
|
+
}: ContextMenu.GroupLabel.Props & {
|
|
32
32
|
inset?: boolean;
|
|
33
|
-
}): react_jsx_runtime0.JSX.Element;
|
|
33
|
+
}): _$react_jsx_runtime0.JSX.Element;
|
|
34
34
|
declare function ContextMenuItem({
|
|
35
35
|
className,
|
|
36
36
|
inset,
|
|
37
37
|
variant,
|
|
38
38
|
...props
|
|
39
|
-
}: ContextMenu
|
|
39
|
+
}: ContextMenu.Item.Props & {
|
|
40
40
|
inset?: boolean;
|
|
41
41
|
variant?: "default" | "destructive";
|
|
42
|
-
}): react_jsx_runtime0.JSX.Element;
|
|
42
|
+
}): _$react_jsx_runtime0.JSX.Element;
|
|
43
43
|
declare function ContextMenuSub({
|
|
44
44
|
...props
|
|
45
|
-
}: ContextMenu
|
|
45
|
+
}: ContextMenu.SubmenuRoot.Props): _$react_jsx_runtime0.JSX.Element;
|
|
46
46
|
declare function ContextMenuSubTrigger({
|
|
47
47
|
className,
|
|
48
48
|
inset,
|
|
49
49
|
children,
|
|
50
50
|
...props
|
|
51
|
-
}: ContextMenu
|
|
51
|
+
}: ContextMenu.SubmenuTrigger.Props & {
|
|
52
52
|
inset?: boolean;
|
|
53
|
-
}): react_jsx_runtime0.JSX.Element;
|
|
53
|
+
}): _$react_jsx_runtime0.JSX.Element;
|
|
54
54
|
declare function ContextMenuSubContent({
|
|
55
55
|
...props
|
|
56
|
-
}: React.ComponentProps<typeof ContextMenuContent>): react_jsx_runtime0.JSX.Element;
|
|
56
|
+
}: React.ComponentProps<typeof ContextMenuContent>): _$react_jsx_runtime0.JSX.Element;
|
|
57
57
|
declare function ContextMenuCheckboxItem({
|
|
58
58
|
className,
|
|
59
59
|
children,
|
|
60
60
|
checked,
|
|
61
61
|
inset,
|
|
62
62
|
...props
|
|
63
|
-
}: ContextMenu
|
|
63
|
+
}: ContextMenu.CheckboxItem.Props & {
|
|
64
64
|
inset?: boolean;
|
|
65
|
-
}): react_jsx_runtime0.JSX.Element;
|
|
65
|
+
}): _$react_jsx_runtime0.JSX.Element;
|
|
66
66
|
declare function ContextMenuRadioGroup({
|
|
67
67
|
...props
|
|
68
|
-
}: ContextMenu
|
|
68
|
+
}: ContextMenu.RadioGroup.Props): _$react_jsx_runtime0.JSX.Element;
|
|
69
69
|
declare function ContextMenuRadioItem({
|
|
70
70
|
className,
|
|
71
71
|
children,
|
|
72
72
|
inset,
|
|
73
73
|
...props
|
|
74
|
-
}: ContextMenu
|
|
74
|
+
}: ContextMenu.RadioItem.Props & {
|
|
75
75
|
inset?: boolean;
|
|
76
|
-
}): react_jsx_runtime0.JSX.Element;
|
|
76
|
+
}): _$react_jsx_runtime0.JSX.Element;
|
|
77
77
|
declare function ContextMenuSeparator({
|
|
78
78
|
className,
|
|
79
79
|
...props
|
|
80
|
-
}: ContextMenu
|
|
80
|
+
}: ContextMenu.Separator.Props): _$react_jsx_runtime0.JSX.Element;
|
|
81
81
|
declare function ContextMenuShortcut({
|
|
82
82
|
className,
|
|
83
83
|
...props
|
|
84
|
-
}: React.ComponentProps<"span">): react_jsx_runtime0.JSX.Element;
|
|
84
|
+
}: React.ComponentProps<"span">): _$react_jsx_runtime0.JSX.Element;
|
|
85
85
|
//#endregion
|
|
86
|
-
export { ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger };
|
|
86
|
+
export { ContextMenu$1 as ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger };
|
package/dist/ui/context-menu.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { cn } from "../lib/utils.mjs";
|
|
2
|
+
import "react";
|
|
2
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
4
|
import { c } from "react/compiler-runtime";
|
|
4
5
|
import { CheckIcon, ChevronRightIcon } from "lucide-react";
|
|
5
|
-
import { ContextMenu
|
|
6
|
-
|
|
6
|
+
import { ContextMenu } from "@base-ui/react/context-menu";
|
|
7
7
|
//#region src/ui/context-menu.tsx
|
|
8
|
-
function ContextMenu(t0) {
|
|
8
|
+
function ContextMenu$1(t0) {
|
|
9
9
|
const $ = c(4);
|
|
10
10
|
let props;
|
|
11
11
|
if ($[0] !== t0) {
|
|
@@ -15,7 +15,7 @@ function ContextMenu(t0) {
|
|
|
15
15
|
} else props = $[1];
|
|
16
16
|
let t1;
|
|
17
17
|
if ($[2] !== props) {
|
|
18
|
-
t1 = /* @__PURE__ */ jsx(ContextMenu
|
|
18
|
+
t1 = /* @__PURE__ */ jsx(ContextMenu.Root, {
|
|
19
19
|
"data-slot": "context-menu",
|
|
20
20
|
...props
|
|
21
21
|
});
|
|
@@ -34,7 +34,7 @@ function ContextMenuPortal(t0) {
|
|
|
34
34
|
} else props = $[1];
|
|
35
35
|
let t1;
|
|
36
36
|
if ($[2] !== props) {
|
|
37
|
-
t1 = /* @__PURE__ */ jsx(ContextMenu
|
|
37
|
+
t1 = /* @__PURE__ */ jsx(ContextMenu.Portal, {
|
|
38
38
|
"data-slot": "context-menu-portal",
|
|
39
39
|
...props
|
|
40
40
|
});
|
|
@@ -64,7 +64,7 @@ function ContextMenuTrigger(t0) {
|
|
|
64
64
|
} else t1 = $[4];
|
|
65
65
|
let t2;
|
|
66
66
|
if ($[5] !== props || $[6] !== t1) {
|
|
67
|
-
t2 = /* @__PURE__ */ jsx(ContextMenu
|
|
67
|
+
t2 = /* @__PURE__ */ jsx(ContextMenu.Trigger, {
|
|
68
68
|
"data-slot": "context-menu-trigger",
|
|
69
69
|
className: t1,
|
|
70
70
|
...props
|
|
@@ -112,7 +112,7 @@ function ContextMenuContent(t0) {
|
|
|
112
112
|
} else t5 = $[8];
|
|
113
113
|
let t6;
|
|
114
114
|
if ($[9] !== props || $[10] !== t5) {
|
|
115
|
-
t6 = /* @__PURE__ */ jsx(ContextMenu
|
|
115
|
+
t6 = /* @__PURE__ */ jsx(ContextMenu.Popup, {
|
|
116
116
|
"data-slot": "context-menu-content",
|
|
117
117
|
className: t5,
|
|
118
118
|
...props
|
|
@@ -123,7 +123,7 @@ function ContextMenuContent(t0) {
|
|
|
123
123
|
} else t6 = $[11];
|
|
124
124
|
let t7;
|
|
125
125
|
if ($[12] !== align || $[13] !== alignOffset || $[14] !== side || $[15] !== sideOffset || $[16] !== t6) {
|
|
126
|
-
t7 = /* @__PURE__ */ jsx(ContextMenu
|
|
126
|
+
t7 = /* @__PURE__ */ jsx(ContextMenu.Portal, { children: /* @__PURE__ */ jsx(ContextMenu.Positioner, {
|
|
127
127
|
className: "isolate z-50 outline-none",
|
|
128
128
|
align,
|
|
129
129
|
alignOffset,
|
|
@@ -150,7 +150,7 @@ function ContextMenuGroup(t0) {
|
|
|
150
150
|
} else props = $[1];
|
|
151
151
|
let t1;
|
|
152
152
|
if ($[2] !== props) {
|
|
153
|
-
t1 = /* @__PURE__ */ jsx(ContextMenu
|
|
153
|
+
t1 = /* @__PURE__ */ jsx(ContextMenu.Group, {
|
|
154
154
|
"data-slot": "context-menu-group",
|
|
155
155
|
...props
|
|
156
156
|
});
|
|
@@ -183,7 +183,7 @@ function ContextMenuLabel(t0) {
|
|
|
183
183
|
} else t1 = $[5];
|
|
184
184
|
let t2;
|
|
185
185
|
if ($[6] !== inset || $[7] !== props || $[8] !== t1) {
|
|
186
|
-
t2 = /* @__PURE__ */ jsx(ContextMenu
|
|
186
|
+
t2 = /* @__PURE__ */ jsx(ContextMenu.GroupLabel, {
|
|
187
187
|
"data-slot": "context-menu-label",
|
|
188
188
|
"data-inset": inset,
|
|
189
189
|
className: t1,
|
|
@@ -224,7 +224,7 @@ function ContextMenuItem(t0) {
|
|
|
224
224
|
} else t2 = $[6];
|
|
225
225
|
let t3;
|
|
226
226
|
if ($[7] !== inset || $[8] !== props || $[9] !== t2 || $[10] !== variant) {
|
|
227
|
-
t3 = /* @__PURE__ */ jsx(ContextMenu
|
|
227
|
+
t3 = /* @__PURE__ */ jsx(ContextMenu.Item, {
|
|
228
228
|
"data-slot": "context-menu-item",
|
|
229
229
|
"data-inset": inset,
|
|
230
230
|
"data-variant": variant,
|
|
@@ -249,7 +249,7 @@ function ContextMenuSub(t0) {
|
|
|
249
249
|
} else props = $[1];
|
|
250
250
|
let t1;
|
|
251
251
|
if ($[2] !== props) {
|
|
252
|
-
t1 = /* @__PURE__ */ jsx(ContextMenu
|
|
252
|
+
t1 = /* @__PURE__ */ jsx(ContextMenu.SubmenuRoot, {
|
|
253
253
|
"data-slot": "context-menu-sub",
|
|
254
254
|
...props
|
|
255
255
|
});
|
|
@@ -290,7 +290,7 @@ function ContextMenuSubTrigger(t0) {
|
|
|
290
290
|
} else t2 = $[7];
|
|
291
291
|
let t3;
|
|
292
292
|
if ($[8] !== children || $[9] !== inset || $[10] !== props || $[11] !== t1) {
|
|
293
|
-
t3 = /* @__PURE__ */ jsxs(ContextMenu
|
|
293
|
+
t3 = /* @__PURE__ */ jsxs(ContextMenu.SubmenuTrigger, {
|
|
294
294
|
"data-slot": "context-menu-sub-trigger",
|
|
295
295
|
"data-inset": inset,
|
|
296
296
|
className: t1,
|
|
@@ -358,13 +358,13 @@ function ContextMenuCheckboxItem(t0) {
|
|
|
358
358
|
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
359
359
|
t2 = /* @__PURE__ */ jsx("span", {
|
|
360
360
|
className: "absolute right-2 pointer-events-none",
|
|
361
|
-
children: /* @__PURE__ */ jsx(ContextMenu
|
|
361
|
+
children: /* @__PURE__ */ jsx(ContextMenu.CheckboxItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, {}) })
|
|
362
362
|
});
|
|
363
363
|
$[8] = t2;
|
|
364
364
|
} else t2 = $[8];
|
|
365
365
|
let t3;
|
|
366
366
|
if ($[9] !== checked || $[10] !== children || $[11] !== inset || $[12] !== props || $[13] !== t1) {
|
|
367
|
-
t3 = /* @__PURE__ */ jsxs(ContextMenu
|
|
367
|
+
t3 = /* @__PURE__ */ jsxs(ContextMenu.CheckboxItem, {
|
|
368
368
|
"data-slot": "context-menu-checkbox-item",
|
|
369
369
|
"data-inset": inset,
|
|
370
370
|
className: t1,
|
|
@@ -391,7 +391,7 @@ function ContextMenuRadioGroup(t0) {
|
|
|
391
391
|
} else props = $[1];
|
|
392
392
|
let t1;
|
|
393
393
|
if ($[2] !== props) {
|
|
394
|
-
t1 = /* @__PURE__ */ jsx(ContextMenu
|
|
394
|
+
t1 = /* @__PURE__ */ jsx(ContextMenu.RadioGroup, {
|
|
395
395
|
"data-slot": "context-menu-radio-group",
|
|
396
396
|
...props
|
|
397
397
|
});
|
|
@@ -429,13 +429,13 @@ function ContextMenuRadioItem(t0) {
|
|
|
429
429
|
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
430
430
|
t2 = /* @__PURE__ */ jsx("span", {
|
|
431
431
|
className: "absolute right-2 pointer-events-none",
|
|
432
|
-
children: /* @__PURE__ */ jsx(ContextMenu
|
|
432
|
+
children: /* @__PURE__ */ jsx(ContextMenu.RadioItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, {}) })
|
|
433
433
|
});
|
|
434
434
|
$[7] = t2;
|
|
435
435
|
} else t2 = $[7];
|
|
436
436
|
let t3;
|
|
437
437
|
if ($[8] !== children || $[9] !== inset || $[10] !== props || $[11] !== t1) {
|
|
438
|
-
t3 = /* @__PURE__ */ jsxs(ContextMenu
|
|
438
|
+
t3 = /* @__PURE__ */ jsxs(ContextMenu.RadioItem, {
|
|
439
439
|
"data-slot": "context-menu-radio-item",
|
|
440
440
|
"data-inset": inset,
|
|
441
441
|
className: t1,
|
|
@@ -471,7 +471,7 @@ function ContextMenuSeparator(t0) {
|
|
|
471
471
|
} else t1 = $[4];
|
|
472
472
|
let t2;
|
|
473
473
|
if ($[5] !== props || $[6] !== t1) {
|
|
474
|
-
t2 = /* @__PURE__ */ jsx(ContextMenu
|
|
474
|
+
t2 = /* @__PURE__ */ jsx(ContextMenu.Separator, {
|
|
475
475
|
"data-slot": "context-menu-separator",
|
|
476
476
|
className: t1,
|
|
477
477
|
...props
|
|
@@ -514,6 +514,5 @@ function ContextMenuShortcut(t0) {
|
|
|
514
514
|
} else t2 = $[7];
|
|
515
515
|
return t2;
|
|
516
516
|
}
|
|
517
|
-
|
|
518
517
|
//#endregion
|
|
519
|
-
export { ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger };
|
|
518
|
+
export { ContextMenu$1 as ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger };
|
package/dist/ui/dialog.d.mts
CHANGED
|
@@ -1,36 +1,38 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
-
import { Dialog
|
|
2
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
import { Dialog } from "@base-ui/react/dialog";
|
|
4
4
|
|
|
5
5
|
//#region src/ui/dialog.d.ts
|
|
6
|
-
declare function Dialog({
|
|
6
|
+
declare function Dialog$1({
|
|
7
7
|
...props
|
|
8
|
-
}: Dialog
|
|
8
|
+
}: Dialog.Root.Props): _$react_jsx_runtime0.JSX.Element;
|
|
9
9
|
declare function DialogTrigger({
|
|
10
10
|
...props
|
|
11
|
-
}: Dialog
|
|
11
|
+
}: Dialog.Trigger.Props): _$react_jsx_runtime0.JSX.Element;
|
|
12
12
|
declare function DialogPortal({
|
|
13
13
|
...props
|
|
14
|
-
}: Dialog
|
|
14
|
+
}: Dialog.Portal.Props): _$react_jsx_runtime0.JSX.Element;
|
|
15
15
|
declare function DialogClose({
|
|
16
16
|
...props
|
|
17
|
-
}: Dialog
|
|
17
|
+
}: Dialog.Close.Props): _$react_jsx_runtime0.JSX.Element;
|
|
18
18
|
declare function DialogOverlay({
|
|
19
19
|
className,
|
|
20
20
|
...props
|
|
21
|
-
}: Dialog
|
|
21
|
+
}: Dialog.Backdrop.Props): _$react_jsx_runtime0.JSX.Element;
|
|
22
22
|
declare function DialogContent({
|
|
23
23
|
className,
|
|
24
|
+
overlayClassName,
|
|
24
25
|
children,
|
|
25
26
|
showCloseButton,
|
|
26
27
|
...props
|
|
27
|
-
}: Dialog
|
|
28
|
+
}: Dialog.Popup.Props & {
|
|
29
|
+
overlayClassName?: string;
|
|
28
30
|
showCloseButton?: boolean;
|
|
29
|
-
}): react_jsx_runtime0.JSX.Element;
|
|
31
|
+
}): _$react_jsx_runtime0.JSX.Element;
|
|
30
32
|
declare function DialogHeader({
|
|
31
33
|
className,
|
|
32
34
|
...props
|
|
33
|
-
}: React.ComponentProps<"div">): react_jsx_runtime0.JSX.Element;
|
|
35
|
+
}: React.ComponentProps<"div">): _$react_jsx_runtime0.JSX.Element;
|
|
34
36
|
declare function DialogFooter({
|
|
35
37
|
className,
|
|
36
38
|
showCloseButton,
|
|
@@ -38,14 +40,14 @@ declare function DialogFooter({
|
|
|
38
40
|
...props
|
|
39
41
|
}: React.ComponentProps<"div"> & {
|
|
40
42
|
showCloseButton?: boolean;
|
|
41
|
-
}): react_jsx_runtime0.JSX.Element;
|
|
43
|
+
}): _$react_jsx_runtime0.JSX.Element;
|
|
42
44
|
declare function DialogTitle({
|
|
43
45
|
className,
|
|
44
46
|
...props
|
|
45
|
-
}: Dialog
|
|
47
|
+
}: Dialog.Title.Props): _$react_jsx_runtime0.JSX.Element;
|
|
46
48
|
declare function DialogDescription({
|
|
47
49
|
className,
|
|
48
50
|
...props
|
|
49
|
-
}: Dialog
|
|
51
|
+
}: Dialog.Description.Props): _$react_jsx_runtime0.JSX.Element;
|
|
50
52
|
//#endregion
|
|
51
|
-
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };
|
|
53
|
+
export { Dialog$1 as Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };
|
package/dist/ui/dialog.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { cn } from "../lib/utils.mjs";
|
|
2
2
|
import { Button } from "./button.mjs";
|
|
3
|
+
import "react";
|
|
3
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
5
|
import { c } from "react/compiler-runtime";
|
|
5
6
|
import { XIcon } from "lucide-react";
|
|
6
|
-
import { Dialog
|
|
7
|
-
|
|
7
|
+
import { Dialog } from "@base-ui/react/dialog";
|
|
8
8
|
//#region src/ui/dialog.tsx
|
|
9
|
-
function Dialog(t0) {
|
|
9
|
+
function Dialog$1(t0) {
|
|
10
10
|
const $ = c(4);
|
|
11
11
|
let props;
|
|
12
12
|
if ($[0] !== t0) {
|
|
@@ -16,7 +16,7 @@ function Dialog(t0) {
|
|
|
16
16
|
} else props = $[1];
|
|
17
17
|
let t1;
|
|
18
18
|
if ($[2] !== props) {
|
|
19
|
-
t1 = /* @__PURE__ */ jsx(Dialog
|
|
19
|
+
t1 = /* @__PURE__ */ jsx(Dialog.Root, {
|
|
20
20
|
"data-slot": "dialog",
|
|
21
21
|
...props
|
|
22
22
|
});
|
|
@@ -35,7 +35,7 @@ function DialogTrigger(t0) {
|
|
|
35
35
|
} else props = $[1];
|
|
36
36
|
let t1;
|
|
37
37
|
if ($[2] !== props) {
|
|
38
|
-
t1 = /* @__PURE__ */ jsx(Dialog
|
|
38
|
+
t1 = /* @__PURE__ */ jsx(Dialog.Trigger, {
|
|
39
39
|
"data-slot": "dialog-trigger",
|
|
40
40
|
...props
|
|
41
41
|
});
|
|
@@ -54,7 +54,7 @@ function DialogPortal(t0) {
|
|
|
54
54
|
} else props = $[1];
|
|
55
55
|
let t1;
|
|
56
56
|
if ($[2] !== props) {
|
|
57
|
-
t1 = /* @__PURE__ */ jsx(Dialog
|
|
57
|
+
t1 = /* @__PURE__ */ jsx(Dialog.Portal, {
|
|
58
58
|
"data-slot": "dialog-portal",
|
|
59
59
|
...props
|
|
60
60
|
});
|
|
@@ -73,7 +73,7 @@ function DialogClose(t0) {
|
|
|
73
73
|
} else props = $[1];
|
|
74
74
|
let t1;
|
|
75
75
|
if ($[2] !== props) {
|
|
76
|
-
t1 = /* @__PURE__ */ jsx(Dialog
|
|
76
|
+
t1 = /* @__PURE__ */ jsx(Dialog.Close, {
|
|
77
77
|
"data-slot": "dialog-close",
|
|
78
78
|
...props
|
|
79
79
|
});
|
|
@@ -103,7 +103,7 @@ function DialogOverlay(t0) {
|
|
|
103
103
|
} else t1 = $[4];
|
|
104
104
|
let t2;
|
|
105
105
|
if ($[5] !== props || $[6] !== t1) {
|
|
106
|
-
t2 = /* @__PURE__ */ jsx(Dialog
|
|
106
|
+
t2 = /* @__PURE__ */ jsx(Dialog.Backdrop, {
|
|
107
107
|
"data-slot": "dialog-overlay",
|
|
108
108
|
className: t1,
|
|
109
109
|
...props
|
|
@@ -115,39 +115,43 @@ function DialogOverlay(t0) {
|
|
|
115
115
|
return t2;
|
|
116
116
|
}
|
|
117
117
|
function DialogContent(t0) {
|
|
118
|
-
const $ = c(
|
|
118
|
+
const $ = c(20);
|
|
119
119
|
let children;
|
|
120
120
|
let className;
|
|
121
|
+
let overlayClassName;
|
|
121
122
|
let props;
|
|
122
123
|
let t1;
|
|
123
124
|
if ($[0] !== t0) {
|
|
124
|
-
({className, children, showCloseButton: t1, ...props} = t0);
|
|
125
|
+
({className, overlayClassName, children, showCloseButton: t1, ...props} = t0);
|
|
125
126
|
$[0] = t0;
|
|
126
127
|
$[1] = children;
|
|
127
128
|
$[2] = className;
|
|
128
|
-
$[3] =
|
|
129
|
-
$[4] =
|
|
129
|
+
$[3] = overlayClassName;
|
|
130
|
+
$[4] = props;
|
|
131
|
+
$[5] = t1;
|
|
130
132
|
} else {
|
|
131
133
|
children = $[1];
|
|
132
134
|
className = $[2];
|
|
133
|
-
|
|
134
|
-
|
|
135
|
+
overlayClassName = $[3];
|
|
136
|
+
props = $[4];
|
|
137
|
+
t1 = $[5];
|
|
135
138
|
}
|
|
136
139
|
const showCloseButton = t1 === void 0 ? true : t1;
|
|
137
140
|
let t2;
|
|
138
|
-
if ($[
|
|
139
|
-
t2 = /* @__PURE__ */ jsx(DialogOverlay, {});
|
|
140
|
-
$[
|
|
141
|
-
|
|
141
|
+
if ($[6] !== overlayClassName) {
|
|
142
|
+
t2 = /* @__PURE__ */ jsx(DialogOverlay, { className: overlayClassName });
|
|
143
|
+
$[6] = overlayClassName;
|
|
144
|
+
$[7] = t2;
|
|
145
|
+
} else t2 = $[7];
|
|
142
146
|
let t3;
|
|
143
|
-
if ($[
|
|
147
|
+
if ($[8] !== className) {
|
|
144
148
|
t3 = cn("bg-background data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 ring-foreground/10 grid max-w-[calc(100%-2rem)] gap-4 rounded-xl p-4 text-sm ring-1 duration-100 sm:max-w-sm fixed top-1/2 left-1/2 z-50 w-full -translate-x-1/2 -translate-y-1/2 outline-none", className);
|
|
145
|
-
$[
|
|
146
|
-
$[
|
|
147
|
-
} else t3 = $[
|
|
149
|
+
$[8] = className;
|
|
150
|
+
$[9] = t3;
|
|
151
|
+
} else t3 = $[9];
|
|
148
152
|
let t4;
|
|
149
|
-
if ($[
|
|
150
|
-
t4 = showCloseButton && /* @__PURE__ */ jsxs(Dialog
|
|
153
|
+
if ($[10] !== showCloseButton) {
|
|
154
|
+
t4 = showCloseButton && /* @__PURE__ */ jsxs(Dialog.Close, {
|
|
151
155
|
"data-slot": "dialog-close",
|
|
152
156
|
render: /* @__PURE__ */ jsx(Button, {
|
|
153
157
|
variant: "ghost",
|
|
@@ -159,24 +163,31 @@ function DialogContent(t0) {
|
|
|
159
163
|
children: "Close"
|
|
160
164
|
})]
|
|
161
165
|
});
|
|
162
|
-
$[
|
|
163
|
-
$[
|
|
164
|
-
} else t4 = $[
|
|
166
|
+
$[10] = showCloseButton;
|
|
167
|
+
$[11] = t4;
|
|
168
|
+
} else t4 = $[11];
|
|
165
169
|
let t5;
|
|
166
|
-
if ($[
|
|
167
|
-
t5 = /* @__PURE__ */ jsxs(
|
|
170
|
+
if ($[12] !== children || $[13] !== props || $[14] !== t3 || $[15] !== t4) {
|
|
171
|
+
t5 = /* @__PURE__ */ jsxs(Dialog.Popup, {
|
|
168
172
|
"data-slot": "dialog-content",
|
|
169
173
|
className: t3,
|
|
170
174
|
...props,
|
|
171
175
|
children: [children, t4]
|
|
172
|
-
})
|
|
173
|
-
$[
|
|
174
|
-
$[
|
|
175
|
-
$[
|
|
176
|
-
$[
|
|
177
|
-
$[
|
|
178
|
-
} else t5 = $[
|
|
179
|
-
|
|
176
|
+
});
|
|
177
|
+
$[12] = children;
|
|
178
|
+
$[13] = props;
|
|
179
|
+
$[14] = t3;
|
|
180
|
+
$[15] = t4;
|
|
181
|
+
$[16] = t5;
|
|
182
|
+
} else t5 = $[16];
|
|
183
|
+
let t6;
|
|
184
|
+
if ($[17] !== t2 || $[18] !== t5) {
|
|
185
|
+
t6 = /* @__PURE__ */ jsxs(DialogPortal, { children: [t2, t5] });
|
|
186
|
+
$[17] = t2;
|
|
187
|
+
$[18] = t5;
|
|
188
|
+
$[19] = t6;
|
|
189
|
+
} else t6 = $[19];
|
|
190
|
+
return t6;
|
|
180
191
|
}
|
|
181
192
|
function DialogHeader(t0) {
|
|
182
193
|
const $ = c(8);
|
|
@@ -238,7 +249,7 @@ function DialogFooter(t0) {
|
|
|
238
249
|
} else t2 = $[6];
|
|
239
250
|
let t3;
|
|
240
251
|
if ($[7] !== showCloseButton) {
|
|
241
|
-
t3 = showCloseButton && /* @__PURE__ */ jsx(Dialog
|
|
252
|
+
t3 = showCloseButton && /* @__PURE__ */ jsx(Dialog.Close, {
|
|
242
253
|
render: /* @__PURE__ */ jsx(Button, { variant: "outline" }),
|
|
243
254
|
children: "Close"
|
|
244
255
|
});
|
|
@@ -282,7 +293,7 @@ function DialogTitle(t0) {
|
|
|
282
293
|
} else t1 = $[4];
|
|
283
294
|
let t2;
|
|
284
295
|
if ($[5] !== props || $[6] !== t1) {
|
|
285
|
-
t2 = /* @__PURE__ */ jsx(Dialog
|
|
296
|
+
t2 = /* @__PURE__ */ jsx(Dialog.Title, {
|
|
286
297
|
"data-slot": "dialog-title",
|
|
287
298
|
className: t1,
|
|
288
299
|
...props
|
|
@@ -314,7 +325,7 @@ function DialogDescription(t0) {
|
|
|
314
325
|
} else t1 = $[4];
|
|
315
326
|
let t2;
|
|
316
327
|
if ($[5] !== props || $[6] !== t1) {
|
|
317
|
-
t2 = /* @__PURE__ */ jsx(Dialog
|
|
328
|
+
t2 = /* @__PURE__ */ jsx(Dialog.Description, {
|
|
318
329
|
"data-slot": "dialog-description",
|
|
319
330
|
className: t1,
|
|
320
331
|
...props
|
|
@@ -325,6 +336,5 @@ function DialogDescription(t0) {
|
|
|
325
336
|
} else t2 = $[7];
|
|
326
337
|
return t2;
|
|
327
338
|
}
|
|
328
|
-
|
|
329
339
|
//#endregion
|
|
330
|
-
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };
|
|
340
|
+
export { Dialog$1 as Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
3
|
import { Menu } from "@base-ui/react/menu";
|
|
4
4
|
|
|
5
5
|
//#region src/ui/dropdown-menu.d.ts
|
|
6
6
|
declare function DropdownMenu({
|
|
7
7
|
...props
|
|
8
|
-
}: Menu.Root.Props): react_jsx_runtime0.JSX.Element;
|
|
8
|
+
}: Menu.Root.Props): _$react_jsx_runtime0.JSX.Element;
|
|
9
9
|
declare function DropdownMenuPortal({
|
|
10
10
|
...props
|
|
11
|
-
}: Menu.Portal.Props): react_jsx_runtime0.JSX.Element;
|
|
11
|
+
}: Menu.Portal.Props): _$react_jsx_runtime0.JSX.Element;
|
|
12
12
|
declare function DropdownMenuTrigger({
|
|
13
13
|
...props
|
|
14
|
-
}: Menu.Trigger.Props): react_jsx_runtime0.JSX.Element;
|
|
14
|
+
}: Menu.Trigger.Props): _$react_jsx_runtime0.JSX.Element;
|
|
15
15
|
declare function DropdownMenuContent({
|
|
16
16
|
align,
|
|
17
17
|
alignOffset,
|
|
@@ -19,17 +19,17 @@ declare function DropdownMenuContent({
|
|
|
19
19
|
sideOffset,
|
|
20
20
|
className,
|
|
21
21
|
...props
|
|
22
|
-
}: Menu.Popup.Props & Pick<Menu.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset">): react_jsx_runtime0.JSX.Element;
|
|
22
|
+
}: Menu.Popup.Props & Pick<Menu.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset">): _$react_jsx_runtime0.JSX.Element;
|
|
23
23
|
declare function DropdownMenuGroup({
|
|
24
24
|
...props
|
|
25
|
-
}: Menu.Group.Props): react_jsx_runtime0.JSX.Element;
|
|
25
|
+
}: Menu.Group.Props): _$react_jsx_runtime0.JSX.Element;
|
|
26
26
|
declare function DropdownMenuLabel({
|
|
27
27
|
className,
|
|
28
28
|
inset,
|
|
29
29
|
...props
|
|
30
30
|
}: Menu.GroupLabel.Props & {
|
|
31
31
|
inset?: boolean;
|
|
32
|
-
}): react_jsx_runtime0.JSX.Element;
|
|
32
|
+
}): _$react_jsx_runtime0.JSX.Element;
|
|
33
33
|
declare function DropdownMenuItem({
|
|
34
34
|
className,
|
|
35
35
|
inset,
|
|
@@ -38,10 +38,10 @@ declare function DropdownMenuItem({
|
|
|
38
38
|
}: Menu.Item.Props & {
|
|
39
39
|
inset?: boolean;
|
|
40
40
|
variant?: "default" | "destructive";
|
|
41
|
-
}): react_jsx_runtime0.JSX.Element;
|
|
41
|
+
}): _$react_jsx_runtime0.JSX.Element;
|
|
42
42
|
declare function DropdownMenuSub({
|
|
43
43
|
...props
|
|
44
|
-
}: Menu.SubmenuRoot.Props): react_jsx_runtime0.JSX.Element;
|
|
44
|
+
}: Menu.SubmenuRoot.Props): _$react_jsx_runtime0.JSX.Element;
|
|
45
45
|
declare function DropdownMenuSubTrigger({
|
|
46
46
|
className,
|
|
47
47
|
inset,
|
|
@@ -49,7 +49,7 @@ declare function DropdownMenuSubTrigger({
|
|
|
49
49
|
...props
|
|
50
50
|
}: Menu.SubmenuTrigger.Props & {
|
|
51
51
|
inset?: boolean;
|
|
52
|
-
}): react_jsx_runtime0.JSX.Element;
|
|
52
|
+
}): _$react_jsx_runtime0.JSX.Element;
|
|
53
53
|
declare function DropdownMenuSubContent({
|
|
54
54
|
align,
|
|
55
55
|
alignOffset,
|
|
@@ -57,28 +57,28 @@ declare function DropdownMenuSubContent({
|
|
|
57
57
|
sideOffset,
|
|
58
58
|
className,
|
|
59
59
|
...props
|
|
60
|
-
}: React.ComponentProps<typeof DropdownMenuContent>): react_jsx_runtime0.JSX.Element;
|
|
60
|
+
}: React.ComponentProps<typeof DropdownMenuContent>): _$react_jsx_runtime0.JSX.Element;
|
|
61
61
|
declare function DropdownMenuCheckboxItem({
|
|
62
62
|
className,
|
|
63
63
|
children,
|
|
64
64
|
checked,
|
|
65
65
|
...props
|
|
66
|
-
}: Menu.CheckboxItem.Props): react_jsx_runtime0.JSX.Element;
|
|
66
|
+
}: Menu.CheckboxItem.Props): _$react_jsx_runtime0.JSX.Element;
|
|
67
67
|
declare function DropdownMenuRadioGroup({
|
|
68
68
|
...props
|
|
69
|
-
}: Menu.RadioGroup.Props): react_jsx_runtime0.JSX.Element;
|
|
69
|
+
}: Menu.RadioGroup.Props): _$react_jsx_runtime0.JSX.Element;
|
|
70
70
|
declare function DropdownMenuRadioItem({
|
|
71
71
|
className,
|
|
72
72
|
children,
|
|
73
73
|
...props
|
|
74
|
-
}: Menu.RadioItem.Props): react_jsx_runtime0.JSX.Element;
|
|
74
|
+
}: Menu.RadioItem.Props): _$react_jsx_runtime0.JSX.Element;
|
|
75
75
|
declare function DropdownMenuSeparator({
|
|
76
76
|
className,
|
|
77
77
|
...props
|
|
78
|
-
}: Menu.Separator.Props): react_jsx_runtime0.JSX.Element;
|
|
78
|
+
}: Menu.Separator.Props): _$react_jsx_runtime0.JSX.Element;
|
|
79
79
|
declare function DropdownMenuShortcut({
|
|
80
80
|
className,
|
|
81
81
|
...props
|
|
82
|
-
}: React.ComponentProps<"span">): react_jsx_runtime0.JSX.Element;
|
|
82
|
+
}: React.ComponentProps<"span">): _$react_jsx_runtime0.JSX.Element;
|
|
83
83
|
//#endregion
|
|
84
84
|
export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { cn } from "../lib/utils.mjs";
|
|
2
|
+
import "react";
|
|
2
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
4
|
import { c } from "react/compiler-runtime";
|
|
4
5
|
import { Check, ChevronRight } from "lucide-react";
|
|
5
6
|
import { Menu as Menu$1 } from "@base-ui/react/menu";
|
|
6
|
-
|
|
7
7
|
//#region src/ui/dropdown-menu.tsx
|
|
8
8
|
function DropdownMenu(t0) {
|
|
9
9
|
const $ = c(4);
|
|
@@ -528,6 +528,5 @@ function DropdownMenuShortcut(t0) {
|
|
|
528
528
|
} else t2 = $[7];
|
|
529
529
|
return t2;
|
|
530
530
|
}
|
|
531
|
-
|
|
532
531
|
//#endregion
|
|
533
|
-
export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger };
|
|
532
|
+
export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger };
|