@brightlocal/ui-components 0.1.2 → 0.1.4
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/accordion.cjs +1 -1
- package/dist/accordion.d.ts +74 -4
- package/dist/accordion.d.ts.map +1 -1
- package/dist/accordion.js +100 -105
- package/dist/alert-dialog.cjs +1 -1
- package/dist/alert-dialog.d.ts +30 -10
- package/dist/alert-dialog.d.ts.map +1 -1
- package/dist/alert-dialog.js +129 -132
- package/dist/alert.cjs +1 -1
- package/dist/alert.d.ts +22 -1
- package/dist/alert.d.ts.map +1 -1
- package/dist/alert.js +1 -1
- package/dist/aspect-ratio.cjs +1 -1
- package/dist/aspect-ratio.d.ts +11 -1
- package/dist/aspect-ratio.d.ts.map +1 -1
- package/dist/aspect-ratio.js +16 -20
- package/dist/avatar.cjs +1 -1
- package/dist/avatar.d.ts +43 -3
- package/dist/avatar.d.ts.map +1 -1
- package/dist/avatar.js +18 -16
- package/dist/badge.cjs +1 -1
- package/dist/badge.d.ts +24 -9
- package/dist/badge.d.ts.map +1 -1
- package/dist/badge.js +34 -32
- package/dist/blocks/data-table.cjs +1 -1
- package/dist/blocks/data-table.d.ts.map +1 -1
- package/dist/blocks/data-table.js +177 -170
- package/dist/blocks/sidebar.cjs +1 -1
- package/dist/blocks/sidebar.d.ts +38 -307
- package/dist/blocks/sidebar.d.ts.map +1 -1
- package/dist/blocks/sidebar.js +411 -508
- package/dist/breadcrumb.cjs +1 -1
- package/dist/breadcrumb.d.ts +63 -8
- package/dist/breadcrumb.d.ts.map +1 -1
- package/dist/breadcrumb.js +97 -93
- package/dist/button.cjs +1 -1
- package/dist/button.d.ts +17 -45
- package/dist/button.d.ts.map +1 -1
- package/dist/button.js +49 -50
- package/dist/calendar.cjs +1 -1
- package/dist/calendar.d.ts +16 -1
- package/dist/calendar.d.ts.map +1 -1
- package/dist/calendar.js +31 -29
- package/dist/card.cjs +1 -1
- package/dist/card.d.ts +58 -18
- package/dist/card.d.ts.map +1 -1
- package/dist/card.js +60 -51
- package/dist/carousel.cjs +1 -1
- package/dist/carousel.d.ts +99 -9
- package/dist/carousel.d.ts.map +1 -1
- package/dist/carousel.js +142 -128
- package/dist/centred-layout.cjs +1 -1
- package/dist/centred-layout.d.ts +18 -15
- package/dist/centred-layout.d.ts.map +1 -1
- package/dist/centred-layout.js +44 -33
- package/dist/chart.cjs +4 -4
- package/dist/chart.d.ts +70 -7
- package/dist/chart.d.ts.map +1 -1
- package/dist/chart.js +71 -66
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.d.ts +9 -5
- package/dist/checkbox.d.ts.map +1 -1
- package/dist/checkbox.js +61 -82
- package/dist/collapsible.cjs +1 -1
- package/dist/collapsible.d.ts +65 -8
- package/dist/collapsible.d.ts.map +1 -1
- package/dist/collapsible.js +41 -55
- package/dist/combobox.cjs +1 -1
- package/dist/combobox.d.ts +28 -18
- package/dist/combobox.d.ts.map +1 -1
- package/dist/combobox.js +191 -160
- package/dist/command.cjs +1 -1
- package/dist/command.d.ts +115 -9
- package/dist/command.d.ts.map +1 -1
- package/dist/command.js +176 -152
- package/dist/context-menu.cjs +1 -1
- package/dist/context-menu.d.ts +188 -20
- package/dist/context-menu.d.ts.map +1 -1
- package/dist/context-menu.js +120 -122
- package/dist/date-picker.cjs +1 -1
- package/dist/date-picker.d.ts +75 -9
- package/dist/date-picker.d.ts.map +1 -1
- package/dist/date-picker.js +221 -82
- package/dist/description.cjs +1 -0
- package/dist/description.d.ts +37 -0
- package/dist/description.d.ts.map +1 -0
- package/dist/description.js +25 -0
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.d.ts +73 -9
- package/dist/dialog.d.ts.map +1 -1
- package/dist/dialog.js +103 -112
- package/dist/drawer.cjs +1 -1
- package/dist/drawer.d.ts +92 -0
- package/dist/drawer.d.ts.map +1 -1
- package/dist/drawer.js +67 -52
- package/dist/dropdown-menu.cjs +1 -1
- package/dist/dropdown-menu.d.ts +95 -11
- package/dist/dropdown-menu.d.ts.map +1 -1
- package/dist/dropdown-menu.js +146 -106
- package/dist/field.cjs +1 -1
- package/dist/field.d.ts +26 -6
- package/dist/field.d.ts.map +1 -1
- package/dist/field.js +55 -53
- package/dist/global-layout.cjs +1 -1
- package/dist/global-layout.d.ts +27 -17
- package/dist/global-layout.d.ts.map +1 -1
- package/dist/global-layout.js +86 -79
- package/dist/hover-card.cjs +1 -1
- package/dist/hover-card.d.ts +36 -6
- package/dist/hover-card.d.ts.map +1 -1
- package/dist/hover-card.js +44 -42
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +367 -386
- package/dist/input-group.cjs +1 -1
- package/dist/input-group.d.ts +21 -2
- package/dist/input-group.d.ts.map +1 -1
- package/dist/input-group.js +51 -41
- package/dist/input-otp.cjs +1 -1
- package/dist/input-otp.js +1 -1
- package/dist/input-password.cjs +1 -1
- package/dist/input-password.d.ts.map +1 -1
- package/dist/input-password.js +25 -26
- package/dist/input.cjs +1 -1
- package/dist/input.d.ts +38 -24
- package/dist/input.d.ts.map +1 -1
- package/dist/input.js +68 -136
- package/dist/label.cjs +1 -1
- package/dist/label.d.ts +20 -1
- package/dist/label.d.ts.map +1 -1
- package/dist/label.js +31 -18
- package/dist/link.cjs +1 -1
- package/dist/link.js +1 -1
- package/dist/logo.cjs +1 -1
- package/dist/logo.d.ts +9 -4
- package/dist/logo.d.ts.map +1 -1
- package/dist/logo.js +20 -21
- package/dist/menubar.cjs +1 -1
- package/dist/menubar.d.ts +43 -6
- package/dist/menubar.d.ts.map +1 -1
- package/dist/menubar.js +100 -78
- package/dist/navigation-menu.cjs +1 -1
- package/dist/navigation-menu.d.ts +6 -54
- package/dist/navigation-menu.d.ts.map +1 -1
- package/dist/navigation-menu.js +73 -84
- package/dist/pagination.cjs +1 -1
- package/dist/pagination.d.ts +8 -10
- package/dist/pagination.d.ts.map +1 -1
- package/dist/pagination.js +78 -86
- package/dist/popover.cjs +1 -1
- package/dist/popover.d.ts +59 -4
- package/dist/popover.d.ts.map +1 -1
- package/dist/popover.js +42 -34
- package/dist/progress.cjs +1 -1
- package/dist/progress.d.ts +9 -2
- package/dist/progress.d.ts.map +1 -1
- package/dist/progress.js +71 -59
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.d.ts +33 -10
- package/dist/radio-group.d.ts.map +1 -1
- package/dist/radio-group.js +56 -66
- package/dist/rating.d.ts +4 -0
- package/dist/rating.d.ts.map +1 -1
- package/dist/resizable.cjs +1 -1
- package/dist/resizable.d.ts +58 -6
- package/dist/resizable.d.ts.map +1 -1
- package/dist/resizable.js +38 -37
- package/dist/scroll-area.cjs +1 -1
- package/dist/scroll-area.d.ts +46 -5
- package/dist/scroll-area.d.ts.map +1 -1
- package/dist/scroll-area.js +42 -38
- package/dist/select.cjs +1 -1
- package/dist/select.d.ts +30 -0
- package/dist/select.d.ts.map +1 -1
- package/dist/select.js +64 -54
- package/dist/separator.cjs +1 -1
- package/dist/separator.d.ts +52 -5
- package/dist/separator.d.ts.map +1 -1
- package/dist/separator.js +45 -35
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.d.ts +85 -19
- package/dist/sheet.d.ts.map +1 -1
- package/dist/sheet.js +117 -115
- package/dist/skeleton.cjs +1 -1
- package/dist/skeleton.d.ts +24 -2
- package/dist/skeleton.d.ts.map +1 -1
- package/dist/skeleton.js +15 -9
- package/dist/slider.cjs +1 -1
- package/dist/slider.d.ts +18 -4
- package/dist/slider.d.ts.map +1 -1
- package/dist/slider.js +72 -66
- package/dist/sonner.cjs +1 -1
- package/dist/sonner.d.ts +21 -22
- package/dist/sonner.d.ts.map +1 -1
- package/dist/sonner.js +46 -48
- package/dist/split-layout.d.ts +4 -1
- package/dist/split-layout.d.ts.map +1 -1
- package/dist/switch.cjs +1 -1
- package/dist/switch.d.ts +2 -12
- package/dist/switch.d.ts.map +1 -1
- package/dist/switch.js +37 -41
- package/dist/table.cjs +1 -1
- package/dist/table.d.ts +16 -12
- package/dist/table.d.ts.map +1 -1
- package/dist/table.js +56 -58
- package/dist/tabs.d.ts +27 -3
- package/dist/tabs.d.ts.map +1 -1
- package/dist/toggle-group.cjs +1 -1
- package/dist/toggle-group.d.ts +57 -7
- package/dist/toggle-group.d.ts.map +1 -1
- package/dist/toggle-group.js +60 -67
- package/dist/toggle.cjs +1 -1
- package/dist/toggle.d.ts +12 -26
- package/dist/toggle.d.ts.map +1 -1
- package/dist/toggle.js +16 -20
- package/package.json +9 -3
- package/src/blocks/data-table.tsx +43 -33
- package/src/blocks/sidebar.tsx +158 -541
- package/src/components/accordion.tsx +164 -78
- package/src/components/alert-dialog.tsx +156 -111
- package/src/components/alert.tsx +27 -14
- package/src/components/aspect-ratio.tsx +25 -16
- package/src/components/avatar.tsx +56 -8
- package/src/components/badge.tsx +65 -42
- package/src/components/breadcrumb.tsx +159 -83
- package/src/components/button.tsx +42 -63
- package/src/components/calendar.tsx +22 -6
- package/src/components/card.tsx +92 -40
- package/src/components/carousel.tsx +240 -115
- package/src/components/centred-layout.tsx +68 -49
- package/src/components/chart.tsx +118 -47
- package/src/components/checkbox.tsx +43 -79
- package/src/components/collapsible.tsx +95 -26
- package/src/components/combobox.tsx +243 -153
- package/src/components/command.tsx +295 -121
- package/src/components/context-menu.tsx +279 -82
- package/src/components/date-picker.tsx +282 -31
- package/src/components/description.tsx +60 -0
- package/src/components/dialog.tsx +163 -87
- package/src/components/drawer.tsx +76 -2
- package/src/components/dropdown-menu.tsx +143 -37
- package/src/components/field.tsx +38 -11
- package/src/components/global-layout.tsx +116 -77
- package/src/components/hover-card.tsx +54 -14
- package/src/components/input-group.tsx +56 -18
- package/src/components/input-otp.tsx +1 -1
- package/src/components/input-password.tsx +4 -5
- package/src/components/input.tsx +93 -186
- package/src/components/label.tsx +56 -15
- package/src/components/link.tsx +1 -1
- package/src/components/logo.tsx +12 -7
- package/src/components/menubar.tsx +61 -5
- package/src/components/navigation-menu.tsx +37 -99
- package/src/components/pagination.tsx +13 -19
- package/src/components/popover.tsx +103 -20
- package/src/components/progress.tsx +82 -60
- package/src/components/radio-group.tsx +44 -25
- package/src/components/rating.tsx +4 -0
- package/src/components/resizable.tsx +88 -38
- package/src/components/scroll-area.tsx +123 -56
- package/src/components/select.tsx +22 -2
- package/src/components/separator.tsx +101 -24
- package/src/components/sheet.tsx +186 -90
- package/src/components/skeleton.tsx +40 -10
- package/src/components/slider.tsx +83 -57
- package/src/components/sonner.tsx +34 -34
- package/src/components/split-layout.tsx +4 -1
- package/src/components/switch.figma.tsx +7 -11
- package/src/components/switch.tsx +9 -19
- package/src/components/table.tsx +23 -18
- package/src/components/tabs.tsx +27 -3
- package/src/components/toggle-group.tsx +115 -86
- package/src/components/toggle.figma.tsx +13 -19
- package/src/components/toggle.tsx +20 -34
- package/src/index.ts +1 -1
- package/dist/input-base.cjs +0 -1
- package/dist/input-base.d.ts +0 -28
- package/dist/input-base.d.ts.map +0 -1
- package/dist/input-base.js +0 -56
- package/src/components/input-base.tsx +0 -86
package/dist/command.js
CHANGED
|
@@ -1,166 +1,190 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { jsx as d, jsxs as x } from "react/jsx-runtime";
|
|
2
|
+
import * as r from "react";
|
|
3
|
+
import { Command as s } from "cmdk";
|
|
4
|
+
import { SearchIcon as N, XIcon as w, CheckIcon as I } from "@brightlocal/icons";
|
|
5
|
+
import { Button as R } from "@brightlocal/ui-components/button";
|
|
6
|
+
import { cn as l } from "@brightlocal/ui-components/lib/utils";
|
|
7
|
+
const _ = r.forwardRef(({ className: a, dataHook: e, trackingEl: t, trackingLabel: o, ...n }, m) => /* @__PURE__ */ d(
|
|
8
|
+
s,
|
|
9
|
+
{
|
|
10
|
+
ref: m,
|
|
11
|
+
className: l(
|
|
12
|
+
"bg-popover text-popover-foreground flex w-full flex-col overflow-hidden rounded-lg border shadow-md",
|
|
13
|
+
a
|
|
14
|
+
),
|
|
15
|
+
"data-hook": e,
|
|
16
|
+
"data-slot": "command",
|
|
17
|
+
"data-tracking-el": t,
|
|
18
|
+
"data-tracking-label": o,
|
|
19
|
+
...n
|
|
20
|
+
}
|
|
21
|
+
));
|
|
22
|
+
_.displayName = "Command";
|
|
23
|
+
const S = r.forwardRef(
|
|
24
|
+
({
|
|
25
|
+
className: a,
|
|
26
|
+
dataHook: e,
|
|
27
|
+
trackingEl: t,
|
|
28
|
+
trackingLabel: o,
|
|
29
|
+
value: n,
|
|
30
|
+
onValueChange: m,
|
|
31
|
+
onClear: c,
|
|
32
|
+
...i
|
|
33
|
+
}, k) => {
|
|
34
|
+
const p = r.useRef(null), [C, f] = r.useState("");
|
|
35
|
+
r.useImperativeHandle(k, () => p.current, []);
|
|
36
|
+
const u = n !== void 0, g = u ? n : C, b = String(g).length > 0, v = (h) => {
|
|
37
|
+
u || f(h), m?.(h);
|
|
38
|
+
}, y = () => {
|
|
39
|
+
u || f(""), m?.(""), c?.(), p.current?.focus();
|
|
40
|
+
};
|
|
41
|
+
return /* @__PURE__ */ x(
|
|
42
|
+
"div",
|
|
43
|
+
{
|
|
44
|
+
className: "border-base-border flex h-12 items-center gap-2 self-stretch border-b px-3",
|
|
45
|
+
"data-hook": e,
|
|
46
|
+
"data-slot": "command-input-wrapper",
|
|
47
|
+
children: [
|
|
48
|
+
/* @__PURE__ */ d(N, { className: "size-4 shrink-0 opacity-50" }),
|
|
49
|
+
/* @__PURE__ */ d(
|
|
50
|
+
s.Input,
|
|
51
|
+
{
|
|
52
|
+
ref: p,
|
|
53
|
+
className: l(
|
|
54
|
+
"placeholder:text-muted-foreground flex w-full bg-transparent text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
|
|
55
|
+
a
|
|
56
|
+
),
|
|
57
|
+
"data-slot": "command-input",
|
|
58
|
+
"data-tracking-el": t,
|
|
59
|
+
"data-tracking-label": o,
|
|
60
|
+
value: g,
|
|
61
|
+
onValueChange: v,
|
|
62
|
+
...i
|
|
63
|
+
}
|
|
64
|
+
),
|
|
65
|
+
b && /* @__PURE__ */ d(
|
|
66
|
+
R,
|
|
67
|
+
{
|
|
68
|
+
"aria-label": "Clear search",
|
|
69
|
+
className: "text-muted-foreground hover:text-foreground",
|
|
70
|
+
dataHook: "command-input-clear",
|
|
71
|
+
variant: "ghost",
|
|
72
|
+
onClick: y,
|
|
73
|
+
children: /* @__PURE__ */ d(w, { className: "size-4" })
|
|
74
|
+
}
|
|
75
|
+
)
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
S.displayName = "CommandInput";
|
|
82
|
+
const z = r.forwardRef(({ className: a, dataHook: e, ...t }, o) => /* @__PURE__ */ d(
|
|
83
|
+
s.List,
|
|
84
|
+
{
|
|
85
|
+
ref: o,
|
|
86
|
+
className: l(
|
|
87
|
+
"max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",
|
|
88
|
+
a
|
|
89
|
+
),
|
|
90
|
+
"data-hook": e,
|
|
91
|
+
"data-slot": "command-list",
|
|
92
|
+
...t
|
|
93
|
+
}
|
|
94
|
+
));
|
|
95
|
+
z.displayName = "CommandList";
|
|
96
|
+
const E = r.forwardRef(({ dataHook: a, ...e }, t) => /* @__PURE__ */ d(
|
|
97
|
+
s.Empty,
|
|
98
|
+
{
|
|
99
|
+
ref: t,
|
|
100
|
+
className: "py-6 text-center text-sm",
|
|
101
|
+
"data-hook": a,
|
|
102
|
+
"data-slot": "command-empty",
|
|
103
|
+
...e
|
|
104
|
+
}
|
|
105
|
+
));
|
|
106
|
+
E.displayName = "CommandEmpty";
|
|
107
|
+
const G = r.forwardRef(({ className: a, dataHook: e, ...t }, o) => /* @__PURE__ */ d(
|
|
108
|
+
s.Group,
|
|
109
|
+
{
|
|
110
|
+
ref: o,
|
|
111
|
+
className: l(
|
|
112
|
+
"text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden px-2 py-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",
|
|
113
|
+
a
|
|
114
|
+
),
|
|
115
|
+
"data-hook": e,
|
|
116
|
+
"data-slot": "command-group",
|
|
117
|
+
...t
|
|
118
|
+
}
|
|
119
|
+
));
|
|
120
|
+
G.displayName = "CommandGroup";
|
|
121
|
+
const L = r.forwardRef(({ className: a, dataHook: e, ...t }, o) => /* @__PURE__ */ d(
|
|
122
|
+
s.Separator,
|
|
123
|
+
{
|
|
124
|
+
ref: o,
|
|
125
|
+
className: l("bg-border -mx-1 h-px", a),
|
|
126
|
+
"data-hook": e,
|
|
127
|
+
"data-slot": "command-separator",
|
|
128
|
+
...t
|
|
129
|
+
}
|
|
130
|
+
));
|
|
131
|
+
L.displayName = "CommandSeparator";
|
|
132
|
+
const j = r.forwardRef(
|
|
133
|
+
({
|
|
134
|
+
className: a,
|
|
135
|
+
dataHook: e,
|
|
136
|
+
trackingEl: t,
|
|
137
|
+
trackingLabel: o,
|
|
138
|
+
selected: n,
|
|
139
|
+
children: m,
|
|
140
|
+
...c
|
|
141
|
+
}, i) => /* @__PURE__ */ x(
|
|
142
|
+
s.Item,
|
|
14
143
|
{
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
144
|
+
ref: i,
|
|
145
|
+
className: l(
|
|
146
|
+
"data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground data-[disabled=true]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-3 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
147
|
+
a
|
|
18
148
|
),
|
|
19
|
-
"data-hook":
|
|
20
|
-
"data-
|
|
21
|
-
"data-
|
|
22
|
-
"data-tracking-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
);
|
|
26
|
-
}
|
|
27
|
-
function f({
|
|
28
|
-
className: t,
|
|
29
|
-
dataHook: a,
|
|
30
|
-
trackingEl: e,
|
|
31
|
-
trackingLabel: d,
|
|
32
|
-
...n
|
|
33
|
-
}) {
|
|
34
|
-
return /* @__PURE__ */ s(
|
|
35
|
-
"div",
|
|
36
|
-
{
|
|
37
|
-
className: "flex items-center gap-2 border-b px-3",
|
|
38
|
-
"data-hook": a,
|
|
39
|
-
"data-slot": "command-input-wrapper",
|
|
149
|
+
"data-hook": e,
|
|
150
|
+
"data-selected-item": n || void 0,
|
|
151
|
+
"data-slot": "command-item",
|
|
152
|
+
"data-tracking-el": t,
|
|
153
|
+
"data-tracking-label": o,
|
|
154
|
+
...c,
|
|
40
155
|
children: [
|
|
41
|
-
|
|
42
|
-
/* @__PURE__ */
|
|
43
|
-
r.Input,
|
|
44
|
-
{
|
|
45
|
-
className: m(
|
|
46
|
-
"placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
|
|
47
|
-
t
|
|
48
|
-
),
|
|
49
|
-
"data-slot": "command-input",
|
|
50
|
-
"data-tracking-el": e,
|
|
51
|
-
"data-tracking-label": d,
|
|
52
|
-
...n
|
|
53
|
-
}
|
|
54
|
-
)
|
|
156
|
+
m,
|
|
157
|
+
n && /* @__PURE__ */ d(I, { className: "text-foreground ml-auto size-4" })
|
|
55
158
|
]
|
|
56
159
|
}
|
|
57
|
-
)
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
{
|
|
63
|
-
className: m(
|
|
64
|
-
"max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",
|
|
65
|
-
t
|
|
66
|
-
),
|
|
67
|
-
"data-hook": a,
|
|
68
|
-
"data-slot": "command-list",
|
|
69
|
-
...e
|
|
70
|
-
}
|
|
71
|
-
);
|
|
72
|
-
}
|
|
73
|
-
function h({ dataHook: t, ...a }) {
|
|
74
|
-
return /* @__PURE__ */ o(
|
|
75
|
-
r.Empty,
|
|
76
|
-
{
|
|
77
|
-
className: "py-6 text-center text-sm",
|
|
78
|
-
"data-hook": t,
|
|
79
|
-
"data-slot": "command-empty",
|
|
80
|
-
...a
|
|
81
|
-
}
|
|
82
|
-
);
|
|
83
|
-
}
|
|
84
|
-
function k({ className: t, dataHook: a, ...e }) {
|
|
85
|
-
return /* @__PURE__ */ o(
|
|
86
|
-
r.Group,
|
|
87
|
-
{
|
|
88
|
-
className: m(
|
|
89
|
-
"text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",
|
|
90
|
-
t
|
|
91
|
-
),
|
|
92
|
-
"data-hook": a,
|
|
93
|
-
"data-slot": "command-group",
|
|
94
|
-
...e
|
|
95
|
-
}
|
|
96
|
-
);
|
|
97
|
-
}
|
|
98
|
-
function b({
|
|
99
|
-
className: t,
|
|
100
|
-
dataHook: a,
|
|
101
|
-
...e
|
|
102
|
-
}) {
|
|
103
|
-
return /* @__PURE__ */ o(
|
|
104
|
-
r.Separator,
|
|
105
|
-
{
|
|
106
|
-
className: m("bg-border -mx-1 h-px", t),
|
|
107
|
-
"data-hook": a,
|
|
108
|
-
"data-slot": "command-separator",
|
|
109
|
-
...e
|
|
110
|
-
}
|
|
111
|
-
);
|
|
112
|
-
}
|
|
113
|
-
function v({
|
|
114
|
-
className: t,
|
|
115
|
-
dataHook: a,
|
|
116
|
-
trackingEl: e,
|
|
117
|
-
trackingLabel: d,
|
|
118
|
-
...n
|
|
119
|
-
}) {
|
|
120
|
-
return /* @__PURE__ */ o(
|
|
121
|
-
r.Item,
|
|
122
|
-
{
|
|
123
|
-
className: m(
|
|
124
|
-
"data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_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=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
125
|
-
t
|
|
126
|
-
),
|
|
127
|
-
"data-hook": a,
|
|
128
|
-
"data-slot": "command-item",
|
|
129
|
-
"data-tracking-el": e,
|
|
130
|
-
"data-tracking-label": d,
|
|
131
|
-
...n
|
|
132
|
-
}
|
|
133
|
-
);
|
|
134
|
-
}
|
|
135
|
-
function y({
|
|
136
|
-
className: t,
|
|
137
|
-
dataHook: a,
|
|
138
|
-
trackingEl: e,
|
|
139
|
-
trackingLabel: d,
|
|
140
|
-
...n
|
|
141
|
-
}) {
|
|
142
|
-
return /* @__PURE__ */ o(
|
|
160
|
+
)
|
|
161
|
+
);
|
|
162
|
+
j.displayName = "CommandItem";
|
|
163
|
+
const B = r.forwardRef(
|
|
164
|
+
({ className: a, dataHook: e, trackingEl: t, trackingLabel: o, ...n }, m) => /* @__PURE__ */ d(
|
|
143
165
|
"span",
|
|
144
166
|
{
|
|
145
|
-
|
|
167
|
+
ref: m,
|
|
168
|
+
className: l(
|
|
146
169
|
"text-muted-foreground ml-auto text-xs tracking-widest",
|
|
147
|
-
|
|
170
|
+
a
|
|
148
171
|
),
|
|
149
|
-
"data-hook":
|
|
172
|
+
"data-hook": e,
|
|
150
173
|
"data-slot": "command-shortcut",
|
|
151
|
-
"data-tracking-el":
|
|
152
|
-
"data-tracking-label":
|
|
174
|
+
"data-tracking-el": t,
|
|
175
|
+
"data-tracking-label": o,
|
|
153
176
|
...n
|
|
154
177
|
}
|
|
155
|
-
)
|
|
156
|
-
|
|
178
|
+
)
|
|
179
|
+
);
|
|
180
|
+
B.displayName = "CommandShortcut";
|
|
157
181
|
export {
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
182
|
+
_ as Command,
|
|
183
|
+
E as CommandEmpty,
|
|
184
|
+
G as CommandGroup,
|
|
185
|
+
S as CommandInput,
|
|
186
|
+
j as CommandItem,
|
|
187
|
+
z as CommandList,
|
|
188
|
+
L as CommandSeparator,
|
|
189
|
+
B as CommandShortcut
|
|
166
190
|
};
|
package/dist/context-menu.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),I=require("react"),z=require("@radix-ui/react-context-menu"),m=require("@brightlocal/icons"),d=require("@brightlocal/ui-components/lib/utils");function x(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const s=x(I),a=x(z);function p({...e}){return o.jsx(a.Root,{"data-slot":"context-menu",...e})}p.displayName="ContextMenu";const f=s.forwardRef(({dataHook:e,...n},t)=>o.jsx(a.Trigger,{ref:t,"data-hook":e,"data-slot":"context-menu-trigger",...n}));f.displayName="ContextMenuTrigger";function b({...e}){return o.jsx(a.Group,{"data-slot":"context-menu-group",...e})}b.displayName="ContextMenuGroup";function g({...e}){return o.jsx(a.Portal,{"data-slot":"context-menu-portal",...e})}g.displayName="ContextMenuPortal";function C({...e}){return o.jsx(a.Sub,{"data-slot":"context-menu-sub",...e})}C.displayName="ContextMenuSub";function M({...e}){return o.jsx(a.RadioGroup,{"data-slot":"context-menu-radio-group",...e})}M.displayName="ContextMenuRadioGroup";const h=s.forwardRef(({className:e,inset:n,children:t,dataHook:r,trackingEl:u,trackingLabel:i,...c},l)=>o.jsxs(a.SubTrigger,{ref:l,className:d.cn("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none",n&&"pl-8",e),"data-hook":r,"data-slot":"context-menu-sub-trigger","data-tracking-el":u,"data-tracking-label":i,...c,children:[t,o.jsx(m.ChevronRight,{className:"ml-auto size-4"})]}));h.displayName="ContextMenuSubTrigger";const j=s.forwardRef(({className:e,...n},t)=>o.jsx(a.SubContent,{ref:t,className:d.cn("border-border 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-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-md",e),"data-slot":"context-menu-sub-content",...n}));j.displayName="ContextMenuSubContent";const y=s.forwardRef(({className:e,...n},t)=>o.jsx(a.Portal,{children:o.jsx(a.Content,{ref:t,className:d.cn("border-border bg-popover text-popover-foreground animate-in fade-in-80 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-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-md",e),"data-slot":"context-menu-content",...n})}));y.displayName="ContextMenuContent";const N=s.forwardRef(({className:e,inset:n,dataHook:t,trackingEl:r,trackingLabel:u,...i},c)=>o.jsx(a.Item,{ref:c,className:d.cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n&&"pl-8",e),"data-hook":t,"data-slot":"context-menu-item","data-tracking-el":r,"data-tracking-label":u,...i}));N.displayName="ContextMenuItem";const R=s.forwardRef(({className:e,children:n,checked:t,dataHook:r,trackingEl:u,trackingLabel:i,...c},l)=>o.jsxs(a.CheckboxItem,{ref:l,checked:t,className:d.cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),"data-hook":r,"data-slot":"context-menu-checkbox-item","data-tracking-el":u,"data-tracking-label":i,...c,children:[o.jsx("span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:o.jsx(a.ItemIndicator,{children:o.jsx(m.Check,{className:"size-4"})})}),n]}));R.displayName="ContextMenuCheckboxItem";const S=s.forwardRef(({className:e,children:n,dataHook:t,trackingEl:r,trackingLabel:u,...i},c)=>o.jsxs(a.RadioItem,{ref:c,className:d.cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),"data-hook":t,"data-slot":"context-menu-radio-item","data-tracking-el":r,"data-tracking-label":u,...i,children:[o.jsx("span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:o.jsx(a.ItemIndicator,{children:o.jsx(m.Circle,{className:"size-2 fill-current"})})}),n]}));S.displayName="ContextMenuRadioItem";const k=s.forwardRef(({className:e,inset:n,...t},r)=>o.jsx(a.Label,{ref:r,className:d.cn("text-foreground px-2 py-1.5 text-sm font-semibold",n&&"pl-8",e),"data-slot":"context-menu-label",...t}));k.displayName="ContextMenuLabel";const w=s.forwardRef(({className:e,...n},t)=>o.jsx(a.Separator,{ref:t,className:d.cn("bg-border -mx-1 my-1 h-px",e),"data-slot":"context-menu-separator",...n}));w.displayName="ContextMenuSeparator";const v=s.forwardRef(({className:e,...n},t)=>o.jsx("span",{ref:t,className:d.cn("text-muted-foreground ml-auto text-xs tracking-widest",e),"data-slot":"context-menu-shortcut",...n}));v.displayName="ContextMenuShortcut";exports.ContextMenu=p;exports.ContextMenuCheckboxItem=R;exports.ContextMenuContent=y;exports.ContextMenuGroup=b;exports.ContextMenuItem=N;exports.ContextMenuLabel=k;exports.ContextMenuPortal=g;exports.ContextMenuRadioGroup=M;exports.ContextMenuRadioItem=S;exports.ContextMenuSeparator=w;exports.ContextMenuShortcut=v;exports.ContextMenuSub=C;exports.ContextMenuSubContent=j;exports.ContextMenuSubTrigger=h;exports.ContextMenuTrigger=f;
|
package/dist/context-menu.d.ts
CHANGED
|
@@ -1,42 +1,210 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Props for the ContextMenu component
|
|
5
|
+
*/
|
|
6
|
+
export type ContextMenuProps = React.ComponentProps<typeof ContextMenuPrimitive.Root>;
|
|
7
|
+
/**
|
|
8
|
+
* A context menu component that displays a menu on right-click.
|
|
9
|
+
* Built with Radix UI Context Menu primitive.
|
|
10
|
+
*/
|
|
11
|
+
declare function ContextMenu({ ...props }: ContextMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare namespace ContextMenu {
|
|
13
|
+
var displayName: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Props for the ContextMenuTrigger component
|
|
17
|
+
*/
|
|
18
|
+
export interface ContextMenuTriggerProps extends React.ComponentProps<typeof ContextMenuPrimitive.Trigger> {
|
|
19
|
+
/**
|
|
20
|
+
* Data hook for automated testing
|
|
21
|
+
*/
|
|
22
|
+
dataHook?: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The element that triggers the context menu on right-click.
|
|
26
|
+
*/
|
|
27
|
+
declare const ContextMenuTrigger: React.ForwardRefExoticComponent<Omit<ContextMenuTriggerProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
28
|
+
/**
|
|
29
|
+
* Props for the ContextMenuGroup component
|
|
30
|
+
*/
|
|
31
|
+
export type ContextMenuGroupProps = React.ComponentProps<typeof ContextMenuPrimitive.Group>;
|
|
32
|
+
/**
|
|
33
|
+
* Groups related context menu items together.
|
|
34
|
+
*/
|
|
35
|
+
declare function ContextMenuGroup({ ...props }: ContextMenuGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
declare namespace ContextMenuGroup {
|
|
37
|
+
var displayName: string;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Props for the ContextMenuPortal component
|
|
41
|
+
*/
|
|
42
|
+
export type ContextMenuPortalProps = React.ComponentProps<typeof ContextMenuPrimitive.Portal>;
|
|
43
|
+
/**
|
|
44
|
+
* Portal for rendering context menu content outside the DOM hierarchy.
|
|
45
|
+
*/
|
|
46
|
+
declare function ContextMenuPortal({ ...props }: ContextMenuPortalProps): import("react/jsx-runtime").JSX.Element;
|
|
47
|
+
declare namespace ContextMenuPortal {
|
|
48
|
+
var displayName: string;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Props for the ContextMenuSub component
|
|
52
|
+
*/
|
|
53
|
+
export type ContextMenuSubProps = React.ComponentProps<typeof ContextMenuPrimitive.Sub>;
|
|
54
|
+
/**
|
|
55
|
+
* A sub-menu container for nested context menu items.
|
|
56
|
+
*/
|
|
57
|
+
declare function ContextMenuSub({ ...props }: ContextMenuSubProps): import("react/jsx-runtime").JSX.Element;
|
|
58
|
+
declare namespace ContextMenuSub {
|
|
59
|
+
var displayName: string;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Props for the ContextMenuRadioGroup component
|
|
63
|
+
*/
|
|
64
|
+
export type ContextMenuRadioGroupProps = React.ComponentProps<typeof ContextMenuPrimitive.RadioGroup>;
|
|
65
|
+
/**
|
|
66
|
+
* A group of radio items where only one can be selected at a time.
|
|
67
|
+
*/
|
|
68
|
+
declare function ContextMenuRadioGroup({ ...props }: ContextMenuRadioGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
69
|
+
declare namespace ContextMenuRadioGroup {
|
|
70
|
+
var displayName: string;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Props for the ContextMenuSubTrigger component
|
|
74
|
+
*/
|
|
75
|
+
export interface ContextMenuSubTriggerProps extends React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubTrigger> {
|
|
76
|
+
/**
|
|
77
|
+
* Whether to add left padding for alignment with other items
|
|
78
|
+
*/
|
|
10
79
|
inset?: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Data hook for automated testing
|
|
82
|
+
*/
|
|
11
83
|
dataHook?: string;
|
|
84
|
+
/**
|
|
85
|
+
* Tracking element identifier for analytics
|
|
86
|
+
*/
|
|
12
87
|
trackingEl?: string;
|
|
88
|
+
/**
|
|
89
|
+
* Tracking label for analytics context
|
|
90
|
+
*/
|
|
13
91
|
trackingLabel?: string;
|
|
14
|
-
}
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Trigger for opening a sub-menu within the context menu.
|
|
95
|
+
*/
|
|
96
|
+
declare const ContextMenuSubTrigger: React.ForwardRefExoticComponent<ContextMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>>;
|
|
97
|
+
/**
|
|
98
|
+
* Props for the ContextMenuSubContent component
|
|
99
|
+
*/
|
|
100
|
+
export type ContextMenuSubContentProps = React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubContent>;
|
|
101
|
+
/**
|
|
102
|
+
* Content container for a sub-menu.
|
|
103
|
+
*/
|
|
15
104
|
declare const ContextMenuSubContent: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
105
|
+
/**
|
|
106
|
+
* Props for the ContextMenuContent component
|
|
107
|
+
*/
|
|
108
|
+
export type ContextMenuContentProps = React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Content>;
|
|
109
|
+
/**
|
|
110
|
+
* Main content container for the context menu.
|
|
111
|
+
*/
|
|
16
112
|
declare const ContextMenuContent: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
-
|
|
113
|
+
/**
|
|
114
|
+
* Props for the ContextMenuItem component
|
|
115
|
+
*/
|
|
116
|
+
export interface ContextMenuItemProps extends React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Item> {
|
|
117
|
+
/**
|
|
118
|
+
* Whether to add left padding for alignment with other items
|
|
119
|
+
*/
|
|
18
120
|
inset?: boolean;
|
|
121
|
+
/**
|
|
122
|
+
* Data hook for automated testing
|
|
123
|
+
*/
|
|
19
124
|
dataHook?: string;
|
|
125
|
+
/**
|
|
126
|
+
* Tracking element identifier for analytics
|
|
127
|
+
*/
|
|
20
128
|
trackingEl?: string;
|
|
129
|
+
/**
|
|
130
|
+
* Tracking label for analytics context
|
|
131
|
+
*/
|
|
21
132
|
trackingLabel?: string;
|
|
22
|
-
}
|
|
23
|
-
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* An interactive item in the context menu.
|
|
136
|
+
*/
|
|
137
|
+
declare const ContextMenuItem: React.ForwardRefExoticComponent<ContextMenuItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
138
|
+
/**
|
|
139
|
+
* Props for the ContextMenuCheckboxItem component
|
|
140
|
+
*/
|
|
141
|
+
export interface ContextMenuCheckboxItemProps extends React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.CheckboxItem> {
|
|
142
|
+
/**
|
|
143
|
+
* Data hook for automated testing
|
|
144
|
+
*/
|
|
24
145
|
dataHook?: string;
|
|
146
|
+
/**
|
|
147
|
+
* Tracking element identifier for analytics
|
|
148
|
+
*/
|
|
25
149
|
trackingEl?: string;
|
|
150
|
+
/**
|
|
151
|
+
* Tracking label for analytics context
|
|
152
|
+
*/
|
|
26
153
|
trackingLabel?: string;
|
|
27
|
-
}
|
|
28
|
-
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* A checkbox item that can be toggled on/off in the context menu.
|
|
157
|
+
*/
|
|
158
|
+
declare const ContextMenuCheckboxItem: React.ForwardRefExoticComponent<ContextMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
159
|
+
/**
|
|
160
|
+
* Props for the ContextMenuRadioItem component
|
|
161
|
+
*/
|
|
162
|
+
export interface ContextMenuRadioItemProps extends React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.RadioItem> {
|
|
163
|
+
/**
|
|
164
|
+
* Data hook for automated testing
|
|
165
|
+
*/
|
|
29
166
|
dataHook?: string;
|
|
167
|
+
/**
|
|
168
|
+
* Tracking element identifier for analytics
|
|
169
|
+
*/
|
|
30
170
|
trackingEl?: string;
|
|
171
|
+
/**
|
|
172
|
+
* Tracking label for analytics context
|
|
173
|
+
*/
|
|
31
174
|
trackingLabel?: string;
|
|
32
|
-
}
|
|
33
|
-
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* A radio item within a radio group, where only one can be selected.
|
|
178
|
+
*/
|
|
179
|
+
declare const ContextMenuRadioItem: React.ForwardRefExoticComponent<ContextMenuRadioItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
180
|
+
/**
|
|
181
|
+
* Props for the ContextMenuLabel component
|
|
182
|
+
*/
|
|
183
|
+
export interface ContextMenuLabelProps extends React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Label> {
|
|
184
|
+
/**
|
|
185
|
+
* Whether to add left padding for alignment with other items
|
|
186
|
+
*/
|
|
34
187
|
inset?: boolean;
|
|
35
|
-
}
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* A non-interactive label for grouping menu items.
|
|
191
|
+
*/
|
|
192
|
+
declare const ContextMenuLabel: React.ForwardRefExoticComponent<ContextMenuLabelProps & React.RefAttributes<HTMLDivElement>>;
|
|
193
|
+
/**
|
|
194
|
+
* Props for the ContextMenuSeparator component
|
|
195
|
+
*/
|
|
196
|
+
export type ContextMenuSeparatorProps = React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Separator>;
|
|
197
|
+
/**
|
|
198
|
+
* Visual separator between groups of menu items.
|
|
199
|
+
*/
|
|
36
200
|
declare const ContextMenuSeparator: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
201
|
+
/**
|
|
202
|
+
* Props for the ContextMenuShortcut component
|
|
203
|
+
*/
|
|
204
|
+
export type ContextMenuShortcutProps = React.HTMLAttributes<HTMLSpanElement>;
|
|
205
|
+
/**
|
|
206
|
+
* Displays a keyboard shortcut hint for a menu item.
|
|
207
|
+
*/
|
|
208
|
+
declare const ContextMenuShortcut: React.ForwardRefExoticComponent<ContextMenuShortcutProps & React.RefAttributes<HTMLSpanElement>>;
|
|
41
209
|
export { ContextMenu, ContextMenuTrigger, ContextMenuContent, ContextMenuItem, ContextMenuCheckboxItem, ContextMenuRadioItem, ContextMenuLabel, ContextMenuSeparator, ContextMenuShortcut, ContextMenuGroup, ContextMenuPortal, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuRadioGroup, };
|
|
42
210
|
//# sourceMappingURL=context-menu.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-menu.d.ts","sourceRoot":"","sources":["../../src/components/context-menu.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO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