@0xchain/ui 1.1.0-beta.4 → 1.1.0-beta.43

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.
Files changed (198) hide show
  1. package/LICENSE +21 -0
  2. package/dist/accordion.js +64 -0
  3. package/dist/alert-dialog.js +146 -0
  4. package/dist/{alert.mjs → alert.js} +26 -26
  5. package/dist/aspect-ratio.js +10 -0
  6. package/dist/avatar.js +53 -0
  7. package/dist/{badge.mjs → badge.js} +17 -16
  8. package/dist/breadcrumb.d.ts +2 -20
  9. package/dist/breadcrumb.js +103 -0
  10. package/dist/button.d.ts +2 -15
  11. package/dist/{button.mjs → button.js} +18 -17
  12. package/dist/calendar.d.ts +2 -23
  13. package/dist/calendar.js +186 -0
  14. package/dist/card.d.ts +2 -18
  15. package/dist/card.js +90 -0
  16. package/dist/carousel.d.ts +2 -42
  17. package/dist/carousel.js +198 -0
  18. package/dist/checkbox.d.ts +2 -7
  19. package/dist/{checkbox.mjs → checkbox.js} +16 -16
  20. package/dist/collapsible.d.ts +2 -10
  21. package/dist/collapsible.js +34 -0
  22. package/dist/command.d.ts +2 -31
  23. package/dist/command.js +170 -0
  24. package/dist/components/ui/accordion.d.ts +8 -0
  25. package/dist/components/ui/accordion.d.ts.map +1 -0
  26. package/dist/components/ui/alert-dialog.d.ts +15 -0
  27. package/dist/components/ui/alert-dialog.d.ts.map +1 -0
  28. package/dist/components/ui/alert.d.ts +10 -0
  29. package/dist/components/ui/alert.d.ts.map +1 -0
  30. package/dist/components/ui/aspect-ratio.d.ts +4 -0
  31. package/dist/components/ui/aspect-ratio.d.ts.map +1 -0
  32. package/dist/components/ui/avatar.d.ts +7 -0
  33. package/dist/components/ui/avatar.d.ts.map +1 -0
  34. package/dist/components/ui/badge.d.ts +10 -0
  35. package/dist/components/ui/badge.d.ts.map +1 -0
  36. package/dist/components/ui/breadcrumb.d.ts +12 -0
  37. package/dist/components/ui/breadcrumb.d.ts.map +1 -0
  38. package/dist/components/ui/button.d.ts +11 -0
  39. package/dist/components/ui/button.d.ts.map +1 -0
  40. package/dist/components/ui/calendar.d.ts +9 -0
  41. package/dist/components/ui/calendar.d.ts.map +1 -0
  42. package/dist/components/ui/card.d.ts +10 -0
  43. package/dist/components/ui/card.d.ts.map +1 -0
  44. package/dist/components/ui/carousel.d.ts +20 -0
  45. package/dist/components/ui/carousel.d.ts.map +1 -0
  46. package/dist/components/ui/checkbox.d.ts +5 -0
  47. package/dist/components/ui/checkbox.d.ts.map +1 -0
  48. package/dist/components/ui/collapsible.d.ts +6 -0
  49. package/dist/components/ui/collapsible.d.ts.map +1 -0
  50. package/dist/components/ui/command.d.ts +19 -0
  51. package/dist/components/ui/command.d.ts.map +1 -0
  52. package/dist/components/ui/context-menu.d.ts +26 -0
  53. package/dist/components/ui/context-menu.d.ts.map +1 -0
  54. package/dist/components/ui/dialog.d.ts +16 -0
  55. package/dist/components/ui/dialog.d.ts.map +1 -0
  56. package/dist/components/ui/dropdown-menu.d.ts +26 -0
  57. package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
  58. package/dist/components/ui/hover-card.d.ts +7 -0
  59. package/dist/components/ui/hover-card.d.ts.map +1 -0
  60. package/dist/components/ui/input.d.ts +4 -0
  61. package/dist/components/ui/input.d.ts.map +1 -0
  62. package/dist/components/ui/label.d.ts +5 -0
  63. package/dist/components/ui/label.d.ts.map +1 -0
  64. package/dist/components/ui/menubar.d.ts +27 -0
  65. package/dist/components/ui/menubar.d.ts.map +1 -0
  66. package/dist/components/ui/navigation-menu.d.ts +15 -0
  67. package/dist/components/ui/navigation-menu.d.ts.map +1 -0
  68. package/dist/components/ui/pagination.d.ts +14 -0
  69. package/dist/components/ui/pagination.d.ts.map +1 -0
  70. package/dist/components/ui/popover.d.ts +8 -0
  71. package/dist/components/ui/popover.d.ts.map +1 -0
  72. package/dist/components/ui/progress.d.ts +5 -0
  73. package/dist/components/ui/progress.d.ts.map +1 -0
  74. package/dist/components/ui/radio-group.d.ts +6 -0
  75. package/dist/components/ui/radio-group.d.ts.map +1 -0
  76. package/dist/components/ui/resizable.d.ts +9 -0
  77. package/dist/components/ui/resizable.d.ts.map +1 -0
  78. package/dist/components/ui/scroll-area.d.ts +6 -0
  79. package/dist/components/ui/scroll-area.d.ts.map +1 -0
  80. package/dist/components/ui/select.d.ts +16 -0
  81. package/dist/components/ui/select.d.ts.map +1 -0
  82. package/dist/components/ui/separator.d.ts +5 -0
  83. package/dist/components/ui/separator.d.ts.map +1 -0
  84. package/dist/components/ui/sheet.d.ts +14 -0
  85. package/dist/components/ui/sheet.d.ts.map +1 -0
  86. package/dist/components/ui/skeleton.d.ts +3 -0
  87. package/dist/components/ui/skeleton.d.ts.map +1 -0
  88. package/dist/components/ui/slider.d.ts +5 -0
  89. package/dist/components/ui/slider.d.ts.map +1 -0
  90. package/dist/components/ui/sonner.d.ts +4 -0
  91. package/dist/components/ui/sonner.d.ts.map +1 -0
  92. package/dist/components/ui/switch.d.ts +5 -0
  93. package/dist/components/ui/switch.d.ts.map +1 -0
  94. package/dist/components/ui/table.d.ts +11 -0
  95. package/dist/components/ui/table.d.ts.map +1 -0
  96. package/dist/components/ui/tabs.d.ts +8 -0
  97. package/dist/components/ui/tabs.d.ts.map +1 -0
  98. package/dist/components/ui/textarea.d.ts +4 -0
  99. package/dist/components/ui/textarea.d.ts.map +1 -0
  100. package/dist/components/ui/toggle-group.d.ts +8 -0
  101. package/dist/components/ui/toggle-group.d.ts.map +1 -0
  102. package/dist/components/ui/toggle.d.ts +10 -0
  103. package/dist/components/ui/toggle.d.ts.map +1 -0
  104. package/dist/components/ui/tooltip.d.ts +8 -0
  105. package/dist/components/ui/tooltip.d.ts.map +1 -0
  106. package/dist/context-menu.d.ts +2 -42
  107. package/dist/context-menu.js +223 -0
  108. package/dist/dialog.d.ts +2 -27
  109. package/dist/dialog.js +136 -0
  110. package/dist/dropdown-menu.d.ts +2 -42
  111. package/dist/dropdown-menu.js +231 -0
  112. package/dist/form.d.ts +1 -38
  113. package/dist/form.js +116 -0
  114. package/dist/hover-card.d.ts +2 -11
  115. package/dist/hover-card.js +38 -0
  116. package/dist/index.d.ts +44 -0
  117. package/dist/index.d.ts.map +1 -0
  118. package/dist/input.d.ts +2 -6
  119. package/dist/{input.mjs → input.js} +9 -9
  120. package/dist/label.d.ts +2 -7
  121. package/dist/{label.mjs → label.js} +12 -12
  122. package/dist/lib/utils.d.ts +3 -0
  123. package/dist/lib/utils.d.ts.map +1 -0
  124. package/dist/menubar.d.ts +2 -44
  125. package/dist/menubar.js +251 -0
  126. package/dist/navigation-menu.d.ts +2 -26
  127. package/dist/{navigation-menu.mjs → navigation-menu.js} +89 -89
  128. package/dist/pagination.d.ts +2 -33
  129. package/dist/pagination.js +116 -0
  130. package/dist/popover.d.ts +2 -13
  131. package/dist/popover.js +44 -0
  132. package/dist/progress.d.ts +2 -7
  133. package/dist/progress.js +31 -0
  134. package/dist/radio-group.d.ts +2 -9
  135. package/dist/radio-group.js +45 -0
  136. package/dist/resizable.d.ts +2 -13
  137. package/dist/resizable.js +48 -0
  138. package/dist/scroll-area.d.ts +2 -9
  139. package/dist/scroll-area.js +60 -0
  140. package/dist/select.d.ts +2 -27
  141. package/dist/select.js +169 -0
  142. package/dist/separator.d.ts +2 -7
  143. package/dist/separator.js +26 -0
  144. package/dist/sheet.d.ts +2 -23
  145. package/dist/sheet.js +126 -0
  146. package/dist/skeleton.d.ts +2 -5
  147. package/dist/skeleton.js +15 -0
  148. package/dist/slider.d.ts +2 -7
  149. package/dist/{slider.mjs → slider.js} +33 -33
  150. package/dist/sonner.d.ts +2 -6
  151. package/dist/sonner.js +22 -0
  152. package/dist/switch.d.ts +2 -7
  153. package/dist/{switch.mjs → switch.js} +15 -15
  154. package/dist/table.d.ts +2 -20
  155. package/dist/table.js +114 -0
  156. package/dist/tabs.d.ts +2 -13
  157. package/dist/{tabs.mjs → tabs.js} +37 -37
  158. package/dist/textarea.d.ts +2 -6
  159. package/dist/{textarea.mjs → textarea.js} +8 -8
  160. package/dist/toggle-group.d.ts +2 -16
  161. package/dist/toggle-group.js +62 -0
  162. package/dist/toggle.d.ts +2 -14
  163. package/dist/{toggle.mjs → toggle.js} +16 -16
  164. package/dist/tooltip.d.ts +2 -13
  165. package/dist/tooltip.js +55 -0
  166. package/dist/utils-CzDCF-Ah.js +8 -0
  167. package/package.json +138 -89
  168. package/dist/accordion.mjs +0 -64
  169. package/dist/alert-dialog.mjs +0 -146
  170. package/dist/aspect-ratio.mjs +0 -10
  171. package/dist/avatar.mjs +0 -53
  172. package/dist/breadcrumb.mjs +0 -102
  173. package/dist/calendar.mjs +0 -173
  174. package/dist/card.mjs +0 -90
  175. package/dist/carousel.mjs +0 -177
  176. package/dist/collapsible.mjs +0 -34
  177. package/dist/command.mjs +0 -170
  178. package/dist/context-menu.mjs +0 -223
  179. package/dist/dialog.mjs +0 -136
  180. package/dist/dropdown-menu.mjs +0 -231
  181. package/dist/form.mjs +0 -101
  182. package/dist/hover-card.mjs +0 -38
  183. package/dist/menubar.mjs +0 -251
  184. package/dist/pagination.mjs +0 -116
  185. package/dist/popover.mjs +0 -44
  186. package/dist/progress.mjs +0 -31
  187. package/dist/radio-group.mjs +0 -45
  188. package/dist/resizable.mjs +0 -48
  189. package/dist/scroll-area.mjs +0 -60
  190. package/dist/select.mjs +0 -169
  191. package/dist/separator.mjs +0 -26
  192. package/dist/sheet.mjs +0 -126
  193. package/dist/skeleton.mjs +0 -15
  194. package/dist/sonner.mjs +0 -22
  195. package/dist/table.mjs +0 -114
  196. package/dist/toggle-group.mjs +0 -62
  197. package/dist/tooltip.mjs +0 -55
  198. package/dist/utils-B7J70Nno.js +0 -8
package/dist/carousel.mjs DELETED
@@ -1,177 +0,0 @@
1
- import { jsx as n, jsxs as h } from "react/jsx-runtime";
2
- import * as l from "react";
3
- import z from "embla-carousel-react";
4
- import { ArrowLeft as g, ArrowRight as p } from "lucide-react";
5
- import { c as d } from "./utils-B7J70Nno.js";
6
- import { Button as v } from "./button.mjs";
7
- const N = l.createContext(null);
8
- function m() {
9
- const o = l.useContext(N);
10
- if (!o)
11
- throw new Error("useCarousel must be used within a <Carousel />");
12
- return o;
13
- }
14
- function I({
15
- orientation: o = "horizontal",
16
- opts: r,
17
- setApi: t,
18
- plugins: s,
19
- className: c,
20
- children: i,
21
- ...u
22
- }) {
23
- const [b, e] = z(
24
- {
25
- ...r,
26
- axis: o === "horizontal" ? "x" : "y"
27
- },
28
- s
29
- ), [w, S] = l.useState(!1), [y, P] = l.useState(!1), f = l.useCallback((a) => {
30
- a && (S(a.canScrollPrev()), P(a.canScrollNext()));
31
- }, []), x = l.useCallback(() => {
32
- e == null || e.scrollPrev();
33
- }, [e]), C = l.useCallback(() => {
34
- e == null || e.scrollNext();
35
- }, [e]), k = l.useCallback(
36
- (a) => {
37
- a.key === "ArrowLeft" ? (a.preventDefault(), x()) : a.key === "ArrowRight" && (a.preventDefault(), C());
38
- },
39
- [x, C]
40
- );
41
- return l.useEffect(() => {
42
- !e || !t || t(e);
43
- }, [e, t]), l.useEffect(() => {
44
- if (e)
45
- return f(e), e.on("reInit", f), e.on("select", f), () => {
46
- e == null || e.off("select", f);
47
- };
48
- }, [e, f]), /* @__PURE__ */ n(
49
- N.Provider,
50
- {
51
- value: {
52
- carouselRef: b,
53
- api: e,
54
- opts: r,
55
- orientation: o || ((r == null ? void 0 : r.axis) === "y" ? "vertical" : "horizontal"),
56
- scrollPrev: x,
57
- scrollNext: C,
58
- canScrollPrev: w,
59
- canScrollNext: y
60
- },
61
- children: /* @__PURE__ */ n(
62
- "div",
63
- {
64
- onKeyDownCapture: k,
65
- className: d("relative", c),
66
- role: "region",
67
- "aria-roledescription": "carousel",
68
- "data-slot": "carousel",
69
- ...u,
70
- children: i
71
- }
72
- )
73
- }
74
- );
75
- }
76
- function K({ className: o, ...r }) {
77
- const { carouselRef: t, orientation: s } = m();
78
- return /* @__PURE__ */ n(
79
- "div",
80
- {
81
- ref: t,
82
- className: "overflow-hidden",
83
- "data-slot": "carousel-content",
84
- children: /* @__PURE__ */ n(
85
- "div",
86
- {
87
- className: d(
88
- "flex",
89
- s === "horizontal" ? "-ml-4" : "-mt-4 flex-col",
90
- o
91
- ),
92
- ...r
93
- }
94
- )
95
- }
96
- );
97
- }
98
- function L({ className: o, ...r }) {
99
- const { orientation: t } = m();
100
- return /* @__PURE__ */ n(
101
- "div",
102
- {
103
- role: "group",
104
- "aria-roledescription": "slide",
105
- "data-slot": "carousel-item",
106
- className: d(
107
- "min-w-0 shrink-0 grow-0 basis-full",
108
- t === "horizontal" ? "pl-4" : "pt-4",
109
- o
110
- ),
111
- ...r
112
- }
113
- );
114
- }
115
- function B({
116
- className: o,
117
- variant: r = "outline",
118
- size: t = "icon",
119
- ...s
120
- }) {
121
- const { orientation: c, scrollPrev: i, canScrollPrev: u } = m();
122
- return /* @__PURE__ */ h(
123
- v,
124
- {
125
- "data-slot": "carousel-previous",
126
- variant: r,
127
- size: t,
128
- className: d(
129
- "absolute size-8 rounded-full",
130
- c === "horizontal" ? "top-1/2 -left-12 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90",
131
- o
132
- ),
133
- disabled: !u,
134
- onClick: i,
135
- ...s,
136
- children: [
137
- /* @__PURE__ */ n(g, {}),
138
- /* @__PURE__ */ n("span", { className: "sr-only", children: "Previous slide" })
139
- ]
140
- }
141
- );
142
- }
143
- function q({
144
- className: o,
145
- variant: r = "outline",
146
- size: t = "icon",
147
- ...s
148
- }) {
149
- const { orientation: c, scrollNext: i, canScrollNext: u } = m();
150
- return /* @__PURE__ */ h(
151
- v,
152
- {
153
- "data-slot": "carousel-next",
154
- variant: r,
155
- size: t,
156
- className: d(
157
- "absolute size-8 rounded-full",
158
- c === "horizontal" ? "top-1/2 -right-12 -translate-y-1/2" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90",
159
- o
160
- ),
161
- disabled: !u,
162
- onClick: i,
163
- ...s,
164
- children: [
165
- /* @__PURE__ */ n(p, {}),
166
- /* @__PURE__ */ n("span", { className: "sr-only", children: "Next slide" })
167
- ]
168
- }
169
- );
170
- }
171
- export {
172
- I as Carousel,
173
- K as CarouselContent,
174
- L as CarouselItem,
175
- q as CarouselNext,
176
- B as CarouselPrevious
177
- };
@@ -1,34 +0,0 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import * as t from "@radix-ui/react-collapsible";
3
- function i({
4
- ...l
5
- }) {
6
- return /* @__PURE__ */ o(t.Root, { "data-slot": "collapsible", ...l });
7
- }
8
- function r({
9
- ...l
10
- }) {
11
- return /* @__PURE__ */ o(
12
- t.CollapsibleTrigger,
13
- {
14
- "data-slot": "collapsible-trigger",
15
- ...l
16
- }
17
- );
18
- }
19
- function a({
20
- ...l
21
- }) {
22
- return /* @__PURE__ */ o(
23
- t.CollapsibleContent,
24
- {
25
- "data-slot": "collapsible-content",
26
- ...l
27
- }
28
- );
29
- }
30
- export {
31
- i as Collapsible,
32
- a as CollapsibleContent,
33
- r as CollapsibleTrigger
34
- };
package/dist/command.mjs DELETED
@@ -1,170 +0,0 @@
1
- import { jsx as o, jsxs as d } from "react/jsx-runtime";
2
- import { Command as n } from "cmdk";
3
- import { SearchIcon as i } from "lucide-react";
4
- import { c as a } from "./utils-B7J70Nno.js";
5
- import { Dialog as l, DialogHeader as u, DialogTitle as p, DialogDescription as g, DialogContent as f } from "./dialog.mjs";
6
- function h({
7
- className: e,
8
- ...t
9
- }) {
10
- return /* @__PURE__ */ o(
11
- n,
12
- {
13
- "data-slot": "command",
14
- className: a(
15
- "bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",
16
- e
17
- ),
18
- ...t
19
- }
20
- );
21
- }
22
- function y({
23
- title: e = "Command Palette",
24
- description: t = "Search for a command to run...",
25
- children: r,
26
- className: m,
27
- showCloseButton: s = !0,
28
- ...c
29
- }) {
30
- return /* @__PURE__ */ d(l, { ...c, children: [
31
- /* @__PURE__ */ d(u, { className: "sr-only", children: [
32
- /* @__PURE__ */ o(p, { children: e }),
33
- /* @__PURE__ */ o(g, { children: t })
34
- ] }),
35
- /* @__PURE__ */ o(
36
- f,
37
- {
38
- className: a("overflow-hidden p-0", m),
39
- showCloseButton: s,
40
- children: /* @__PURE__ */ o(h, { className: "[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children: r })
41
- }
42
- )
43
- ] });
44
- }
45
- function C({
46
- className: e,
47
- ...t
48
- }) {
49
- return /* @__PURE__ */ d(
50
- "div",
51
- {
52
- "data-slot": "command-input-wrapper",
53
- className: "flex h-9 items-center gap-2 border-b px-3",
54
- children: [
55
- /* @__PURE__ */ o(i, { className: "size-4 shrink-0 opacity-50" }),
56
- /* @__PURE__ */ o(
57
- n.Input,
58
- {
59
- "data-slot": "command-input",
60
- className: a(
61
- "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",
62
- e
63
- ),
64
- ...t
65
- }
66
- )
67
- ]
68
- }
69
- );
70
- }
71
- function N({
72
- className: e,
73
- ...t
74
- }) {
75
- return /* @__PURE__ */ o(
76
- n.List,
77
- {
78
- "data-slot": "command-list",
79
- className: a(
80
- "max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",
81
- e
82
- ),
83
- ...t
84
- }
85
- );
86
- }
87
- function b({
88
- ...e
89
- }) {
90
- return /* @__PURE__ */ o(
91
- n.Empty,
92
- {
93
- "data-slot": "command-empty",
94
- className: "py-6 text-center text-sm",
95
- ...e
96
- }
97
- );
98
- }
99
- function D({
100
- className: e,
101
- ...t
102
- }) {
103
- return /* @__PURE__ */ o(
104
- n.Group,
105
- {
106
- "data-slot": "command-group",
107
- className: a(
108
- "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",
109
- e
110
- ),
111
- ...t
112
- }
113
- );
114
- }
115
- function I({
116
- className: e,
117
- ...t
118
- }) {
119
- return /* @__PURE__ */ o(
120
- n.Separator,
121
- {
122
- "data-slot": "command-separator",
123
- className: a("bg-border -mx-1 h-px", e),
124
- ...t
125
- }
126
- );
127
- }
128
- function S({
129
- className: e,
130
- ...t
131
- }) {
132
- return /* @__PURE__ */ o(
133
- n.Item,
134
- {
135
- "data-slot": "command-item",
136
- className: a(
137
- "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",
138
- e
139
- ),
140
- ...t
141
- }
142
- );
143
- }
144
- function z({
145
- className: e,
146
- ...t
147
- }) {
148
- return /* @__PURE__ */ o(
149
- "span",
150
- {
151
- "data-slot": "command-shortcut",
152
- className: a(
153
- "text-muted-foreground ml-auto text-xs tracking-widest",
154
- e
155
- ),
156
- ...t
157
- }
158
- );
159
- }
160
- export {
161
- h as Command,
162
- y as CommandDialog,
163
- b as CommandEmpty,
164
- D as CommandGroup,
165
- C as CommandInput,
166
- S as CommandItem,
167
- N as CommandList,
168
- I as CommandSeparator,
169
- z as CommandShortcut
170
- };
@@ -1,223 +0,0 @@
1
- import { jsx as e, jsxs as i } from "react/jsx-runtime";
2
- import * as o from "@radix-ui/react-context-menu";
3
- import { CheckIcon as d, CircleIcon as c, ChevronRightIcon as u } from "lucide-react";
4
- import { c as s } from "./utils-B7J70Nno.js";
5
- function x({
6
- ...t
7
- }) {
8
- return /* @__PURE__ */ e(o.Root, { "data-slot": "context-menu", ...t });
9
- }
10
- function p({
11
- ...t
12
- }) {
13
- return /* @__PURE__ */ e(o.Trigger, { "data-slot": "context-menu-trigger", ...t });
14
- }
15
- function g({
16
- ...t
17
- }) {
18
- return /* @__PURE__ */ e(o.Group, { "data-slot": "context-menu-group", ...t });
19
- }
20
- function v({
21
- ...t
22
- }) {
23
- return /* @__PURE__ */ e(o.Portal, { "data-slot": "context-menu-portal", ...t });
24
- }
25
- function b({
26
- ...t
27
- }) {
28
- return /* @__PURE__ */ e(o.Sub, { "data-slot": "context-menu-sub", ...t });
29
- }
30
- function h({
31
- ...t
32
- }) {
33
- return /* @__PURE__ */ e(
34
- o.RadioGroup,
35
- {
36
- "data-slot": "context-menu-radio-group",
37
- ...t
38
- }
39
- );
40
- }
41
- function C({
42
- className: t,
43
- inset: n,
44
- children: a,
45
- ...r
46
- }) {
47
- return /* @__PURE__ */ i(
48
- o.SubTrigger,
49
- {
50
- "data-slot": "context-menu-sub-trigger",
51
- "data-inset": n,
52
- className: s(
53
- "focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
54
- t
55
- ),
56
- ...r,
57
- children: [
58
- a,
59
- /* @__PURE__ */ e(u, { className: "ml-auto" })
60
- ]
61
- }
62
- );
63
- }
64
- function z({
65
- className: t,
66
- ...n
67
- }) {
68
- return /* @__PURE__ */ e(
69
- o.SubContent,
70
- {
71
- "data-slot": "context-menu-sub-content",
72
- className: s(
73
- "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] origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",
74
- t
75
- ),
76
- ...n
77
- }
78
- );
79
- }
80
- function M({
81
- className: t,
82
- ...n
83
- }) {
84
- return /* @__PURE__ */ e(o.Portal, { children: /* @__PURE__ */ e(
85
- o.Content,
86
- {
87
- "data-slot": "context-menu-content",
88
- className: s(
89
- "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 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",
90
- t
91
- ),
92
- ...n
93
- }
94
- ) });
95
- }
96
- function N({
97
- className: t,
98
- inset: n,
99
- variant: a = "default",
100
- ...r
101
- }) {
102
- return /* @__PURE__ */ e(
103
- o.Item,
104
- {
105
- "data-slot": "context-menu-item",
106
- "data-inset": n,
107
- "data-variant": a,
108
- className: s(
109
- "focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
110
- t
111
- ),
112
- ...r
113
- }
114
- );
115
- }
116
- function I({
117
- className: t,
118
- children: n,
119
- checked: a,
120
- ...r
121
- }) {
122
- return /* @__PURE__ */ i(
123
- o.CheckboxItem,
124
- {
125
- "data-slot": "context-menu-checkbox-item",
126
- className: s(
127
- "focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
128
- t
129
- ),
130
- checked: a,
131
- ...r,
132
- children: [
133
- /* @__PURE__ */ e("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ e(o.ItemIndicator, { children: /* @__PURE__ */ e(d, { className: "size-4" }) }) }),
134
- n
135
- ]
136
- }
137
- );
138
- }
139
- function _({
140
- className: t,
141
- children: n,
142
- ...a
143
- }) {
144
- return /* @__PURE__ */ i(
145
- o.RadioItem,
146
- {
147
- "data-slot": "context-menu-radio-item",
148
- className: s(
149
- "focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
150
- t
151
- ),
152
- ...a,
153
- children: [
154
- /* @__PURE__ */ e("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ e(o.ItemIndicator, { children: /* @__PURE__ */ e(c, { className: "size-2 fill-current" }) }) }),
155
- n
156
- ]
157
- }
158
- );
159
- }
160
- function y({
161
- className: t,
162
- inset: n,
163
- ...a
164
- }) {
165
- return /* @__PURE__ */ e(
166
- o.Label,
167
- {
168
- "data-slot": "context-menu-label",
169
- "data-inset": n,
170
- className: s(
171
- "text-foreground px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",
172
- t
173
- ),
174
- ...a
175
- }
176
- );
177
- }
178
- function k({
179
- className: t,
180
- ...n
181
- }) {
182
- return /* @__PURE__ */ e(
183
- o.Separator,
184
- {
185
- "data-slot": "context-menu-separator",
186
- className: s("bg-border -mx-1 my-1 h-px", t),
187
- ...n
188
- }
189
- );
190
- }
191
- function S({
192
- className: t,
193
- ...n
194
- }) {
195
- return /* @__PURE__ */ e(
196
- "span",
197
- {
198
- "data-slot": "context-menu-shortcut",
199
- className: s(
200
- "text-muted-foreground ml-auto text-xs tracking-widest",
201
- t
202
- ),
203
- ...n
204
- }
205
- );
206
- }
207
- export {
208
- x as ContextMenu,
209
- I as ContextMenuCheckboxItem,
210
- M as ContextMenuContent,
211
- g as ContextMenuGroup,
212
- N as ContextMenuItem,
213
- y as ContextMenuLabel,
214
- v as ContextMenuPortal,
215
- h as ContextMenuRadioGroup,
216
- _ as ContextMenuRadioItem,
217
- k as ContextMenuSeparator,
218
- S as ContextMenuShortcut,
219
- b as ContextMenuSub,
220
- z as ContextMenuSubContent,
221
- C as ContextMenuSubTrigger,
222
- p as ContextMenuTrigger
223
- };