@multicomma/arkcn 0.1.2 → 0.1.3
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/package.json +1 -1
- package/registry/index.json +1 -1
- package/registry/items/accordion.json +302 -0
- package/registry/items/activity-feed.json +408 -0
- package/registry/items/alert-dialog.json +676 -0
- package/registry/items/alert.json +113 -0
- package/registry/items/angle-slider.json +378 -0
- package/registry/items/app-shell.json +2654 -1
- package/registry/items/aspect-ratio.json +36 -0
- package/registry/items/attachment.json +299 -1
- package/registry/items/avatar.json +213 -0
- package/registry/items/badge.json +44 -0
- package/registry/items/breadcrumb.json +191 -0
- package/registry/items/bubble.json +146 -0
- package/registry/items/button-group.json +110 -0
- package/registry/items/button.json +52 -0
- package/registry/items/calendar.json +499 -1
- package/registry/items/canvas.json +446 -1
- package/registry/items/card.json +192 -0
- package/registry/items/carousel.json +208 -1
- package/registry/items/cascader.json +797 -1
- package/registry/items/chart.json +1764 -1
- package/registry/items/chat.json +993 -0
- package/registry/items/checkbox.json +503 -0
- package/registry/items/clipboard.json +308 -0
- package/registry/items/collapsible.json +226 -0
- package/registry/items/color-picker.json +1261 -0
- package/registry/items/combobox.json +1123 -1
- package/registry/items/command.json +837 -1
- package/registry/items/comment-thread.json +952 -1
- package/registry/items/context-menu.json +1344 -1
- package/registry/items/data-grid.json +449 -1
- package/registry/items/data-table.json +1310 -1
- package/registry/items/date-input.json +476 -0
- package/registry/items/dialog.json +592 -0
- package/registry/items/direction.json +29 -1
- package/registry/items/drawer.json +797 -0
- package/registry/items/dropdown-menu.json +1311 -1
- package/registry/items/editable.json +503 -0
- package/registry/items/empty.json +166 -0
- package/registry/items/field.json +286 -1
- package/registry/items/file-upload.json +638 -0
- package/registry/items/floating-panel.json +720 -0
- package/registry/items/floating-toolbar.json +43 -0
- package/registry/items/format.json +109 -0
- package/registry/items/gantt.json +773 -1
- package/registry/items/hooks/use-mobile.json +1 -0
- package/registry/items/hotkeys.json +99 -1
- package/registry/items/hover-card.json +357 -0
- package/registry/items/image-cropper.json +431 -0
- package/registry/items/input-group.json +189 -0
- package/registry/items/input-otp.json +181 -0
- package/registry/items/input.json +28 -0
- package/registry/items/item.json +308 -0
- package/registry/items/json-tree-view.json +336 -0
- package/registry/items/kanban.json +624 -1
- package/registry/items/kbd.json +54 -0
- package/registry/items/label.json +28 -0
- package/registry/items/lib/controllable.json +1 -0
- package/registry/items/lib/data-table-adapter.json +1 -0
- package/registry/items/lib/drag-preview.json +1 -0
- package/registry/items/lib/form.json +1 -0
- package/registry/items/lib/history.json +1 -0
- package/registry/items/lib/row-layout.json +1 -0
- package/registry/items/lib/table.json +1 -0
- package/registry/items/lib/time.json +1 -0
- package/registry/items/lib/utils.json +1 -0
- package/registry/items/live-region.json +43 -0
- package/registry/items/marker.json +96 -0
- package/registry/items/marquee.json +300 -0
- package/registry/items/menubar.json +1282 -1
- package/registry/items/message.json +166 -0
- package/registry/items/navigation-menu.json +561 -1
- package/registry/items/node-graph.json +1037 -1
- package/registry/items/number-input.json +519 -0
- package/registry/items/pagination.json +244 -1
- package/registry/items/password-input.json +311 -0
- package/registry/items/popconfirm.json +566 -0
- package/registry/items/popover.json +615 -0
- package/registry/items/progress.json +516 -0
- package/registry/items/qr-code.json +249 -0
- package/registry/items/query-builder.json +1368 -1
- package/registry/items/radio-group.json +362 -0
- package/registry/items/rating-group.json +304 -0
- package/registry/items/resizable.json +242 -1
- package/registry/items/rich-text-editor.json +934 -1
- package/registry/items/scheduler.json +1013 -1
- package/registry/items/scroll-area.json +227 -0
- package/registry/items/segment-group.json +363 -0
- package/registry/items/select.json +956 -0
- package/registry/items/separator.json +45 -1
- package/registry/items/sheet.json +592 -0
- package/registry/items/sidebar.json +785 -1
- package/registry/items/signature-pad.json +330 -0
- package/registry/items/skeleton.json +28 -0
- package/registry/items/slider.json +799 -0
- package/registry/items/sonner.json +135 -0
- package/registry/items/spinner.json +28 -0
- package/registry/items/steps.json +483 -0
- package/registry/items/swap.json +107 -0
- package/registry/items/switch.json +362 -0
- package/registry/items/table.json +210 -0
- package/registry/items/tabs.json +326 -0
- package/registry/items/tags-input.json +640 -0
- package/registry/items/textarea.json +28 -0
- package/registry/items/timer.json +289 -0
- package/registry/items/toc.json +372 -0
- package/registry/items/toggle-group.json +214 -1
- package/registry/items/toggle.json +124 -0
- package/registry/items/tooltip.json +417 -0
- package/registry/items/tour.json +498 -0
- package/registry/items/transfer-list.json +609 -1
- package/registry/items/tree-select.json +742 -1
- package/registry/items/tree-view.json +794 -0
- package/registry/items/virtual-list.json +214 -1
- package/src/components/ui/app-shell.tsx +11 -0
- package/src/components/ui/attachment.tsx +1 -0
- package/src/components/ui/calendar.tsx +1 -0
- package/src/components/ui/canvas.tsx +8 -0
- package/src/components/ui/carousel.tsx +3 -0
- package/src/components/ui/cascader.tsx +1 -0
- package/src/components/ui/chart.tsx +10 -0
- package/src/components/ui/combobox.tsx +3 -0
- package/src/components/ui/command.tsx +1 -0
- package/src/components/ui/comment-thread.tsx +11 -0
- package/src/components/ui/context-menu.tsx +6 -0
- package/src/components/ui/data-grid.tsx +8 -0
- package/src/components/ui/data-table.tsx +6 -0
- package/src/components/ui/direction.tsx +2 -0
- package/src/components/ui/dropdown-menu.tsx +6 -0
- package/src/components/ui/field.tsx +1 -0
- package/src/components/ui/gantt.tsx +15 -0
- package/src/components/ui/hotkeys.tsx +3 -0
- package/src/components/ui/kanban.tsx +3 -0
- package/src/components/ui/menubar.tsx +6 -0
- package/src/components/ui/navigation-menu.tsx +1 -0
- package/src/components/ui/node-graph.tsx +23 -0
- package/src/components/ui/pagination.tsx +1 -0
- package/src/components/ui/query-builder.tsx +7 -0
- package/src/components/ui/resizable.tsx +1 -0
- package/src/components/ui/rich-text-editor.tsx +54 -0
- package/src/components/ui/scheduler.tsx +26 -0
- package/src/components/ui/separator.tsx +1 -0
- package/src/components/ui/sidebar.tsx +5 -0
- package/src/components/ui/toggle-group.tsx +3 -0
- package/src/components/ui/transfer-list.tsx +11 -0
- package/src/components/ui/tree-select.tsx +5 -0
- package/src/components/ui/virtual-list.tsx +7 -0
|
@@ -29,6 +29,1349 @@
|
|
|
29
29
|
"ContextMenuClickTrigger",
|
|
30
30
|
"ContextMenuIndicator"
|
|
31
31
|
],
|
|
32
|
+
"parts": [
|
|
33
|
+
{
|
|
34
|
+
"name": "ContextMenu",
|
|
35
|
+
"props": [
|
|
36
|
+
{
|
|
37
|
+
"name": "anchorPoint",
|
|
38
|
+
"type": "Point | null",
|
|
39
|
+
"required": false,
|
|
40
|
+
"description": "The positioning point for the menu. Can be set by the context menu trigger or the button trigger.",
|
|
41
|
+
"from": "@zag-js/menu"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "aria-label",
|
|
45
|
+
"type": "string",
|
|
46
|
+
"required": false,
|
|
47
|
+
"description": "The accessibility label for the menu",
|
|
48
|
+
"from": "@zag-js/menu"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"name": "children",
|
|
52
|
+
"type": "ReactNode",
|
|
53
|
+
"required": false,
|
|
54
|
+
"description": "Content rendered inside the part.",
|
|
55
|
+
"from": "@ark-ui/react"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"name": "closeOnSelect",
|
|
59
|
+
"type": "boolean",
|
|
60
|
+
"required": false,
|
|
61
|
+
"default": "true",
|
|
62
|
+
"description": "Whether to close the menu when an option is selected",
|
|
63
|
+
"from": "@zag-js/menu"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"name": "composite",
|
|
67
|
+
"type": "boolean",
|
|
68
|
+
"required": false,
|
|
69
|
+
"default": "true",
|
|
70
|
+
"description": "Whether the menu is a composed with other composite widgets like a combobox or tabs",
|
|
71
|
+
"from": "@zag-js/menu"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"name": "defaultHighlightedValue",
|
|
75
|
+
"type": "string | null",
|
|
76
|
+
"required": false,
|
|
77
|
+
"description": "The initial highlighted value of the menu item when rendered.\nUse when you don't need to control the highlighted value of the menu item.",
|
|
78
|
+
"from": "@zag-js/menu"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"name": "defaultOpen",
|
|
82
|
+
"type": "boolean",
|
|
83
|
+
"required": false,
|
|
84
|
+
"description": "The initial open state of the menu when rendered.\nUse when you don't need to control the open state of the menu.",
|
|
85
|
+
"from": "@zag-js/menu"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"name": "defaultTriggerValue",
|
|
89
|
+
"type": "string | null",
|
|
90
|
+
"required": false,
|
|
91
|
+
"description": "The initial trigger value when rendered.\nUse when you don't need to control the trigger value.",
|
|
92
|
+
"from": "@zag-js/menu"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"name": "hideMode",
|
|
96
|
+
"type": "HideMode",
|
|
97
|
+
"required": false,
|
|
98
|
+
"default": "'display-none'",
|
|
99
|
+
"description": "How to hide content when mounted but not present.\n- `'display-none'`: HTML `hidden` attribute. Effects stay alive.\n- `'activity'`: React 19 `<Activity mode=\"hidden\">`. Effects pause. Requires React 19+.",
|
|
100
|
+
"from": "@ark-ui/react"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"name": "highlightedValue",
|
|
104
|
+
"type": "string | null",
|
|
105
|
+
"required": false,
|
|
106
|
+
"description": "The controlled highlighted value of the menu item.",
|
|
107
|
+
"from": "@zag-js/menu"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"name": "id",
|
|
111
|
+
"type": "string",
|
|
112
|
+
"required": false,
|
|
113
|
+
"description": "The unique identifier of the machine.",
|
|
114
|
+
"from": "@zag-js/types"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"name": "ids",
|
|
118
|
+
"type": "ElementIds",
|
|
119
|
+
"required": false,
|
|
120
|
+
"description": "The ids of the elements in the menu. Useful for composition.",
|
|
121
|
+
"from": "@zag-js/menu"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"name": "immediate",
|
|
125
|
+
"type": "boolean",
|
|
126
|
+
"required": false,
|
|
127
|
+
"description": "Whether to synchronize the present change immediately or defer it to the next frame",
|
|
128
|
+
"from": "@zag-js/presence"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"name": "lazyMount",
|
|
132
|
+
"type": "boolean",
|
|
133
|
+
"required": false,
|
|
134
|
+
"default": "true",
|
|
135
|
+
"description": "Whether to enable lazy mounting",
|
|
136
|
+
"from": "@ark-ui/react"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"name": "loopFocus",
|
|
140
|
+
"type": "boolean",
|
|
141
|
+
"required": false,
|
|
142
|
+
"default": "false",
|
|
143
|
+
"description": "Whether to loop the keyboard navigation.",
|
|
144
|
+
"from": "@zag-js/menu"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"name": "navigate",
|
|
148
|
+
"type": "((details: NavigateDetails) => void) | null",
|
|
149
|
+
"required": false,
|
|
150
|
+
"description": "Function to navigate to the selected item if it's an anchor element",
|
|
151
|
+
"from": "@zag-js/menu"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"name": "onEnterComplete",
|
|
155
|
+
"type": "VoidFunction",
|
|
156
|
+
"required": false,
|
|
157
|
+
"description": "Function called when the animation ends in the open state",
|
|
158
|
+
"from": "@zag-js/presence"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"name": "onEscapeKeyDown",
|
|
162
|
+
"type": "((event: KeyboardEvent) => void)",
|
|
163
|
+
"required": false,
|
|
164
|
+
"description": "Function called when the escape key is pressed",
|
|
165
|
+
"from": "@zag-js/dismissable"
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"name": "onExitComplete",
|
|
169
|
+
"type": "VoidFunction",
|
|
170
|
+
"required": false,
|
|
171
|
+
"description": "Function called when the animation ends in the closed state",
|
|
172
|
+
"from": "@zag-js/presence"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"name": "onFocusOutside",
|
|
176
|
+
"type": "((event: FocusOutsideEvent) => void)",
|
|
177
|
+
"required": false,
|
|
178
|
+
"description": "Function called when the focus is moved outside the component",
|
|
179
|
+
"from": "@zag-js/interact-outside"
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"name": "onHighlightChange",
|
|
183
|
+
"type": "((details: HighlightChangeDetails) => void)",
|
|
184
|
+
"required": false,
|
|
185
|
+
"description": "Function called when the highlighted menu item changes.",
|
|
186
|
+
"from": "@zag-js/menu"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"name": "onInteractOutside",
|
|
190
|
+
"type": "((event: InteractOutsideEvent) => void)",
|
|
191
|
+
"required": false,
|
|
192
|
+
"description": "Function called when an interaction happens outside the component",
|
|
193
|
+
"from": "@zag-js/interact-outside"
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"name": "onOpenChange",
|
|
197
|
+
"type": "((details: OpenChangeDetails) => void)",
|
|
198
|
+
"required": false,
|
|
199
|
+
"description": "Function called when the menu opens or closes",
|
|
200
|
+
"from": "@zag-js/menu"
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"name": "onPointerDownOutside",
|
|
204
|
+
"type": "((event: PointerDownOutsideEvent) => void)",
|
|
205
|
+
"required": false,
|
|
206
|
+
"description": "Function called when the pointer is pressed down outside the component",
|
|
207
|
+
"from": "@zag-js/interact-outside"
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"name": "onRequestDismiss",
|
|
211
|
+
"type": "((event: LayerDismissEvent) => void)",
|
|
212
|
+
"required": false,
|
|
213
|
+
"description": "Function called when this layer is closed due to a parent layer being closed",
|
|
214
|
+
"from": "@zag-js/dismissable"
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"name": "onSelect",
|
|
218
|
+
"type": "((details: SelectionDetails) => void)",
|
|
219
|
+
"required": false,
|
|
220
|
+
"description": "Function called when a menu item is selected.",
|
|
221
|
+
"from": "@zag-js/menu"
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"name": "onTriggerValueChange",
|
|
225
|
+
"type": "((details: TriggerValueChangeDetails) => void)",
|
|
226
|
+
"required": false,
|
|
227
|
+
"description": "Function called when the trigger value changes.",
|
|
228
|
+
"from": "@zag-js/menu"
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
"name": "open",
|
|
232
|
+
"type": "boolean",
|
|
233
|
+
"required": false,
|
|
234
|
+
"description": "The controlled open state of the menu",
|
|
235
|
+
"from": "@zag-js/menu"
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"name": "positioning",
|
|
239
|
+
"type": "PositioningOptions",
|
|
240
|
+
"required": false,
|
|
241
|
+
"description": "The options used to dynamically position the menu",
|
|
242
|
+
"from": "@zag-js/menu"
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
"name": "present",
|
|
246
|
+
"type": "boolean",
|
|
247
|
+
"required": false,
|
|
248
|
+
"description": "Whether the node is present (controlled by the user)",
|
|
249
|
+
"from": "@zag-js/presence"
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"name": "skipAnimationOnMount",
|
|
253
|
+
"type": "boolean",
|
|
254
|
+
"required": false,
|
|
255
|
+
"default": "false",
|
|
256
|
+
"description": "Whether to allow the initial presence animation.",
|
|
257
|
+
"from": "@ark-ui/react"
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"name": "triggerValue",
|
|
261
|
+
"type": "string | null",
|
|
262
|
+
"required": false,
|
|
263
|
+
"description": "The controlled trigger value",
|
|
264
|
+
"from": "@zag-js/menu"
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"name": "typeahead",
|
|
268
|
+
"type": "boolean",
|
|
269
|
+
"required": false,
|
|
270
|
+
"default": "true",
|
|
271
|
+
"description": "Whether the pressing printable characters should trigger typeahead navigation",
|
|
272
|
+
"from": "@zag-js/menu"
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"name": "unmountOnExit",
|
|
276
|
+
"type": "boolean",
|
|
277
|
+
"required": false,
|
|
278
|
+
"default": "true",
|
|
279
|
+
"description": "Whether to unmount on exit.",
|
|
280
|
+
"from": "@ark-ui/react"
|
|
281
|
+
}
|
|
282
|
+
]
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
"name": "ContextMenuCheckboxItem",
|
|
286
|
+
"props": [
|
|
287
|
+
{
|
|
288
|
+
"name": "checked",
|
|
289
|
+
"type": "boolean",
|
|
290
|
+
"required": false,
|
|
291
|
+
"default": "false",
|
|
292
|
+
"description": "Checked state of the item.",
|
|
293
|
+
"from": "arkcn"
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
"name": "inset",
|
|
297
|
+
"type": "boolean",
|
|
298
|
+
"required": false,
|
|
299
|
+
"description": "Indent the item to align with items that have an indicator.",
|
|
300
|
+
"from": "arkcn"
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
"name": "value",
|
|
304
|
+
"type": "string",
|
|
305
|
+
"required": false,
|
|
306
|
+
"description": "The controlled value.",
|
|
307
|
+
"from": "arkcn"
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
"name": "asChild",
|
|
311
|
+
"type": "boolean",
|
|
312
|
+
"required": false,
|
|
313
|
+
"description": "Use the provided child element as the default rendered element, combining their props and behavior.",
|
|
314
|
+
"from": "@ark-ui/react"
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
"name": "children",
|
|
318
|
+
"type": "ReactNode",
|
|
319
|
+
"required": false,
|
|
320
|
+
"description": "Content rendered inside the part.",
|
|
321
|
+
"from": "@types/react"
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
"name": "className",
|
|
325
|
+
"type": "string",
|
|
326
|
+
"required": false,
|
|
327
|
+
"description": "Extra classes merged into the part's own classes with `cn`.",
|
|
328
|
+
"from": "@types/react"
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
"name": "closeOnSelect",
|
|
332
|
+
"type": "boolean",
|
|
333
|
+
"required": false,
|
|
334
|
+
"description": "Whether the menu should be closed when the option is selected.",
|
|
335
|
+
"from": "@zag-js/menu"
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
"name": "disabled",
|
|
339
|
+
"type": "boolean",
|
|
340
|
+
"required": false,
|
|
341
|
+
"description": "Whether the menu item is disabled",
|
|
342
|
+
"from": "@zag-js/menu"
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
"name": "onCheckedChange",
|
|
346
|
+
"type": "((checked: boolean) => void)",
|
|
347
|
+
"required": false,
|
|
348
|
+
"description": "Function called when the option state is changed",
|
|
349
|
+
"from": "@zag-js/menu"
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
"name": "style",
|
|
353
|
+
"type": "CSSProperties",
|
|
354
|
+
"required": false,
|
|
355
|
+
"description": "Inline styles applied to the rendered element.",
|
|
356
|
+
"from": "@types/react"
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
"name": "valueText",
|
|
360
|
+
"type": "string",
|
|
361
|
+
"required": false,
|
|
362
|
+
"description": "The textual value of the option. Used in typeahead navigation of the menu.\nIf not provided, the text content of the menu item will be used.",
|
|
363
|
+
"from": "@zag-js/menu"
|
|
364
|
+
}
|
|
365
|
+
]
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
"name": "ContextMenuContent",
|
|
369
|
+
"props": [
|
|
370
|
+
{
|
|
371
|
+
"name": "asChild",
|
|
372
|
+
"type": "boolean",
|
|
373
|
+
"required": false,
|
|
374
|
+
"description": "Use the provided child element as the default rendered element, combining their props and behavior.",
|
|
375
|
+
"from": "@ark-ui/react"
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
"name": "children",
|
|
379
|
+
"type": "ReactNode",
|
|
380
|
+
"required": false,
|
|
381
|
+
"description": "Content rendered inside the part.",
|
|
382
|
+
"from": "@types/react"
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
"name": "className",
|
|
386
|
+
"type": "string",
|
|
387
|
+
"required": false,
|
|
388
|
+
"description": "Extra classes merged into the part's own classes with `cn`.",
|
|
389
|
+
"from": "@types/react"
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
"name": "style",
|
|
393
|
+
"type": "CSSProperties",
|
|
394
|
+
"required": false,
|
|
395
|
+
"description": "Inline styles applied to the rendered element.",
|
|
396
|
+
"from": "@types/react"
|
|
397
|
+
}
|
|
398
|
+
]
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
"name": "ContextMenuContext",
|
|
402
|
+
"props": [
|
|
403
|
+
{
|
|
404
|
+
"name": "children",
|
|
405
|
+
"type": "(context: MenuApi<PropTypes>) => ReactNode",
|
|
406
|
+
"required": true,
|
|
407
|
+
"description": "Content rendered inside the part.",
|
|
408
|
+
"from": "@ark-ui/react"
|
|
409
|
+
}
|
|
410
|
+
]
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
"name": "ContextMenuGroup",
|
|
414
|
+
"props": [
|
|
415
|
+
{
|
|
416
|
+
"name": "asChild",
|
|
417
|
+
"type": "boolean",
|
|
418
|
+
"required": false,
|
|
419
|
+
"description": "Use the provided child element as the default rendered element, combining their props and behavior.",
|
|
420
|
+
"from": "@ark-ui/react"
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
"name": "children",
|
|
424
|
+
"type": "ReactNode",
|
|
425
|
+
"required": false,
|
|
426
|
+
"description": "Content rendered inside the part.",
|
|
427
|
+
"from": "@types/react"
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
"name": "className",
|
|
431
|
+
"type": "string",
|
|
432
|
+
"required": false,
|
|
433
|
+
"description": "Extra classes merged into the part's own classes with `cn`.",
|
|
434
|
+
"from": "@types/react"
|
|
435
|
+
},
|
|
436
|
+
{
|
|
437
|
+
"name": "style",
|
|
438
|
+
"type": "CSSProperties",
|
|
439
|
+
"required": false,
|
|
440
|
+
"description": "Inline styles applied to the rendered element.",
|
|
441
|
+
"from": "@types/react"
|
|
442
|
+
}
|
|
443
|
+
]
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
"name": "ContextMenuItem",
|
|
447
|
+
"props": [
|
|
448
|
+
{
|
|
449
|
+
"name": "inset",
|
|
450
|
+
"type": "boolean",
|
|
451
|
+
"required": false,
|
|
452
|
+
"description": "Indent the item to align with items that have an indicator.",
|
|
453
|
+
"from": "arkcn"
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
"name": "value",
|
|
457
|
+
"type": "string",
|
|
458
|
+
"required": false,
|
|
459
|
+
"description": "The controlled value.",
|
|
460
|
+
"from": "arkcn"
|
|
461
|
+
},
|
|
462
|
+
{
|
|
463
|
+
"name": "variant",
|
|
464
|
+
"type": "\"default\" | \"destructive\"",
|
|
465
|
+
"required": false,
|
|
466
|
+
"default": "\"default\"",
|
|
467
|
+
"description": "Visual variant, styled with `cva`; sets a `data-variant` attribute.",
|
|
468
|
+
"from": "arkcn"
|
|
469
|
+
},
|
|
470
|
+
{
|
|
471
|
+
"name": "asChild",
|
|
472
|
+
"type": "boolean",
|
|
473
|
+
"required": false,
|
|
474
|
+
"description": "Use the provided child element as the default rendered element, combining their props and behavior.",
|
|
475
|
+
"from": "@ark-ui/react"
|
|
476
|
+
},
|
|
477
|
+
{
|
|
478
|
+
"name": "children",
|
|
479
|
+
"type": "ReactNode",
|
|
480
|
+
"required": false,
|
|
481
|
+
"description": "Content rendered inside the part.",
|
|
482
|
+
"from": "@types/react"
|
|
483
|
+
},
|
|
484
|
+
{
|
|
485
|
+
"name": "className",
|
|
486
|
+
"type": "string",
|
|
487
|
+
"required": false,
|
|
488
|
+
"description": "Extra classes merged into the part's own classes with `cn`.",
|
|
489
|
+
"from": "@types/react"
|
|
490
|
+
},
|
|
491
|
+
{
|
|
492
|
+
"name": "closeOnSelect",
|
|
493
|
+
"type": "boolean",
|
|
494
|
+
"required": false,
|
|
495
|
+
"description": "Whether the menu should be closed when the option is selected.",
|
|
496
|
+
"from": "@zag-js/menu"
|
|
497
|
+
},
|
|
498
|
+
{
|
|
499
|
+
"name": "disabled",
|
|
500
|
+
"type": "boolean",
|
|
501
|
+
"required": false,
|
|
502
|
+
"description": "Whether the menu item is disabled",
|
|
503
|
+
"from": "@zag-js/menu"
|
|
504
|
+
},
|
|
505
|
+
{
|
|
506
|
+
"name": "onSelect",
|
|
507
|
+
"type": "VoidFunction",
|
|
508
|
+
"required": false,
|
|
509
|
+
"description": "The function to call when the item is selected",
|
|
510
|
+
"from": "@ark-ui/react"
|
|
511
|
+
},
|
|
512
|
+
{
|
|
513
|
+
"name": "style",
|
|
514
|
+
"type": "CSSProperties",
|
|
515
|
+
"required": false,
|
|
516
|
+
"description": "Inline styles applied to the rendered element.",
|
|
517
|
+
"from": "@types/react"
|
|
518
|
+
},
|
|
519
|
+
{
|
|
520
|
+
"name": "valueText",
|
|
521
|
+
"type": "string",
|
|
522
|
+
"required": false,
|
|
523
|
+
"description": "The textual value of the option. Used in typeahead navigation of the menu.\nIf not provided, the text content of the menu item will be used.",
|
|
524
|
+
"from": "@zag-js/menu"
|
|
525
|
+
}
|
|
526
|
+
]
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
"name": "ContextMenuItemIndicator",
|
|
530
|
+
"props": [
|
|
531
|
+
{
|
|
532
|
+
"name": "asChild",
|
|
533
|
+
"type": "boolean",
|
|
534
|
+
"required": false,
|
|
535
|
+
"description": "Use the provided child element as the default rendered element, combining their props and behavior.",
|
|
536
|
+
"from": "@ark-ui/react"
|
|
537
|
+
},
|
|
538
|
+
{
|
|
539
|
+
"name": "children",
|
|
540
|
+
"type": "ReactNode",
|
|
541
|
+
"required": false,
|
|
542
|
+
"description": "Content rendered inside the part.",
|
|
543
|
+
"from": "@types/react"
|
|
544
|
+
},
|
|
545
|
+
{
|
|
546
|
+
"name": "className",
|
|
547
|
+
"type": "string",
|
|
548
|
+
"required": false,
|
|
549
|
+
"description": "Extra classes merged into the part's own classes with `cn`.",
|
|
550
|
+
"from": "@types/react"
|
|
551
|
+
},
|
|
552
|
+
{
|
|
553
|
+
"name": "style",
|
|
554
|
+
"type": "CSSProperties",
|
|
555
|
+
"required": false,
|
|
556
|
+
"description": "Inline styles applied to the rendered element.",
|
|
557
|
+
"from": "@types/react"
|
|
558
|
+
}
|
|
559
|
+
]
|
|
560
|
+
},
|
|
561
|
+
{
|
|
562
|
+
"name": "ContextMenuItemText",
|
|
563
|
+
"props": [
|
|
564
|
+
{
|
|
565
|
+
"name": "asChild",
|
|
566
|
+
"type": "boolean",
|
|
567
|
+
"required": false,
|
|
568
|
+
"description": "Use the provided child element as the default rendered element, combining their props and behavior.",
|
|
569
|
+
"from": "@ark-ui/react"
|
|
570
|
+
},
|
|
571
|
+
{
|
|
572
|
+
"name": "children",
|
|
573
|
+
"type": "ReactNode",
|
|
574
|
+
"required": false,
|
|
575
|
+
"description": "Content rendered inside the part.",
|
|
576
|
+
"from": "@types/react"
|
|
577
|
+
},
|
|
578
|
+
{
|
|
579
|
+
"name": "className",
|
|
580
|
+
"type": "string",
|
|
581
|
+
"required": false,
|
|
582
|
+
"description": "Extra classes merged into the part's own classes with `cn`.",
|
|
583
|
+
"from": "@types/react"
|
|
584
|
+
},
|
|
585
|
+
{
|
|
586
|
+
"name": "style",
|
|
587
|
+
"type": "CSSProperties",
|
|
588
|
+
"required": false,
|
|
589
|
+
"description": "Inline styles applied to the rendered element.",
|
|
590
|
+
"from": "@types/react"
|
|
591
|
+
}
|
|
592
|
+
]
|
|
593
|
+
},
|
|
594
|
+
{
|
|
595
|
+
"name": "ContextMenuLabel",
|
|
596
|
+
"props": [
|
|
597
|
+
{
|
|
598
|
+
"name": "inset",
|
|
599
|
+
"type": "boolean",
|
|
600
|
+
"required": false,
|
|
601
|
+
"description": "Indent the item to align with items that have an indicator.",
|
|
602
|
+
"from": "arkcn"
|
|
603
|
+
},
|
|
604
|
+
{
|
|
605
|
+
"name": "asChild",
|
|
606
|
+
"type": "boolean",
|
|
607
|
+
"required": false,
|
|
608
|
+
"description": "Use the provided child element as the default rendered element, combining their props and behavior.",
|
|
609
|
+
"from": "@ark-ui/react"
|
|
610
|
+
},
|
|
611
|
+
{
|
|
612
|
+
"name": "children",
|
|
613
|
+
"type": "ReactNode",
|
|
614
|
+
"required": false,
|
|
615
|
+
"description": "Content rendered inside the part.",
|
|
616
|
+
"from": "@types/react"
|
|
617
|
+
},
|
|
618
|
+
{
|
|
619
|
+
"name": "className",
|
|
620
|
+
"type": "string",
|
|
621
|
+
"required": false,
|
|
622
|
+
"description": "Extra classes merged into the part's own classes with `cn`.",
|
|
623
|
+
"from": "@types/react"
|
|
624
|
+
},
|
|
625
|
+
{
|
|
626
|
+
"name": "style",
|
|
627
|
+
"type": "CSSProperties",
|
|
628
|
+
"required": false,
|
|
629
|
+
"description": "Inline styles applied to the rendered element.",
|
|
630
|
+
"from": "@types/react"
|
|
631
|
+
}
|
|
632
|
+
]
|
|
633
|
+
},
|
|
634
|
+
{
|
|
635
|
+
"name": "ContextMenuPortal",
|
|
636
|
+
"props": [
|
|
637
|
+
{
|
|
638
|
+
"name": "children",
|
|
639
|
+
"type": "ReactNode",
|
|
640
|
+
"required": false,
|
|
641
|
+
"description": "Content rendered inside the part.",
|
|
642
|
+
"from": "@types/react"
|
|
643
|
+
},
|
|
644
|
+
{
|
|
645
|
+
"name": "container",
|
|
646
|
+
"type": "RefObject<HTMLElement | null>",
|
|
647
|
+
"required": false,
|
|
648
|
+
"from": "@ark-ui/react"
|
|
649
|
+
},
|
|
650
|
+
{
|
|
651
|
+
"name": "disabled",
|
|
652
|
+
"type": "boolean",
|
|
653
|
+
"required": false,
|
|
654
|
+
"description": "Disables the part and everything inside it.",
|
|
655
|
+
"from": "@ark-ui/react"
|
|
656
|
+
}
|
|
657
|
+
]
|
|
658
|
+
},
|
|
659
|
+
{
|
|
660
|
+
"name": "ContextMenuPositioner",
|
|
661
|
+
"props": [
|
|
662
|
+
{
|
|
663
|
+
"name": "asChild",
|
|
664
|
+
"type": "boolean",
|
|
665
|
+
"required": false,
|
|
666
|
+
"description": "Use the provided child element as the default rendered element, combining their props and behavior.",
|
|
667
|
+
"from": "@ark-ui/react"
|
|
668
|
+
},
|
|
669
|
+
{
|
|
670
|
+
"name": "children",
|
|
671
|
+
"type": "ReactNode",
|
|
672
|
+
"required": false,
|
|
673
|
+
"description": "Content rendered inside the part.",
|
|
674
|
+
"from": "@types/react"
|
|
675
|
+
},
|
|
676
|
+
{
|
|
677
|
+
"name": "className",
|
|
678
|
+
"type": "string",
|
|
679
|
+
"required": false,
|
|
680
|
+
"description": "Extra classes merged into the part's own classes with `cn`.",
|
|
681
|
+
"from": "@types/react"
|
|
682
|
+
},
|
|
683
|
+
{
|
|
684
|
+
"name": "style",
|
|
685
|
+
"type": "CSSProperties",
|
|
686
|
+
"required": false,
|
|
687
|
+
"description": "Inline styles applied to the rendered element.",
|
|
688
|
+
"from": "@types/react"
|
|
689
|
+
}
|
|
690
|
+
]
|
|
691
|
+
},
|
|
692
|
+
{
|
|
693
|
+
"name": "ContextMenuRadioGroup",
|
|
694
|
+
"props": [
|
|
695
|
+
{
|
|
696
|
+
"name": "asChild",
|
|
697
|
+
"type": "boolean",
|
|
698
|
+
"required": false,
|
|
699
|
+
"description": "Use the provided child element as the default rendered element, combining their props and behavior.",
|
|
700
|
+
"from": "@ark-ui/react"
|
|
701
|
+
},
|
|
702
|
+
{
|
|
703
|
+
"name": "children",
|
|
704
|
+
"type": "ReactNode",
|
|
705
|
+
"required": false,
|
|
706
|
+
"description": "Content rendered inside the part.",
|
|
707
|
+
"from": "@types/react"
|
|
708
|
+
},
|
|
709
|
+
{
|
|
710
|
+
"name": "className",
|
|
711
|
+
"type": "string",
|
|
712
|
+
"required": false,
|
|
713
|
+
"description": "Extra classes merged into the part's own classes with `cn`.",
|
|
714
|
+
"from": "@types/react"
|
|
715
|
+
},
|
|
716
|
+
{
|
|
717
|
+
"name": "onValueChange",
|
|
718
|
+
"type": "((e: ValueChangeDetails) => void)",
|
|
719
|
+
"required": false,
|
|
720
|
+
"description": "Called with the new value whenever it changes.",
|
|
721
|
+
"from": "@ark-ui/react"
|
|
722
|
+
},
|
|
723
|
+
{
|
|
724
|
+
"name": "style",
|
|
725
|
+
"type": "CSSProperties",
|
|
726
|
+
"required": false,
|
|
727
|
+
"description": "Inline styles applied to the rendered element.",
|
|
728
|
+
"from": "@types/react"
|
|
729
|
+
},
|
|
730
|
+
{
|
|
731
|
+
"name": "value",
|
|
732
|
+
"type": "string",
|
|
733
|
+
"required": false,
|
|
734
|
+
"description": "The controlled value.",
|
|
735
|
+
"from": "@ark-ui/react"
|
|
736
|
+
}
|
|
737
|
+
]
|
|
738
|
+
},
|
|
739
|
+
{
|
|
740
|
+
"name": "ContextMenuRadioItem",
|
|
741
|
+
"props": [
|
|
742
|
+
{
|
|
743
|
+
"name": "inset",
|
|
744
|
+
"type": "boolean",
|
|
745
|
+
"required": false,
|
|
746
|
+
"description": "Indent the item to align with items that have an indicator.",
|
|
747
|
+
"from": "arkcn"
|
|
748
|
+
},
|
|
749
|
+
{
|
|
750
|
+
"name": "value",
|
|
751
|
+
"type": "string",
|
|
752
|
+
"required": true,
|
|
753
|
+
"description": "The value of the option",
|
|
754
|
+
"from": "@zag-js/menu"
|
|
755
|
+
},
|
|
756
|
+
{
|
|
757
|
+
"name": "asChild",
|
|
758
|
+
"type": "boolean",
|
|
759
|
+
"required": false,
|
|
760
|
+
"description": "Use the provided child element as the default rendered element, combining their props and behavior.",
|
|
761
|
+
"from": "@ark-ui/react"
|
|
762
|
+
},
|
|
763
|
+
{
|
|
764
|
+
"name": "children",
|
|
765
|
+
"type": "ReactNode",
|
|
766
|
+
"required": false,
|
|
767
|
+
"description": "Content rendered inside the part.",
|
|
768
|
+
"from": "@types/react"
|
|
769
|
+
},
|
|
770
|
+
{
|
|
771
|
+
"name": "className",
|
|
772
|
+
"type": "string",
|
|
773
|
+
"required": false,
|
|
774
|
+
"description": "Extra classes merged into the part's own classes with `cn`.",
|
|
775
|
+
"from": "@types/react"
|
|
776
|
+
},
|
|
777
|
+
{
|
|
778
|
+
"name": "closeOnSelect",
|
|
779
|
+
"type": "boolean",
|
|
780
|
+
"required": false,
|
|
781
|
+
"description": "Whether the menu should be closed when the option is selected.",
|
|
782
|
+
"from": "@zag-js/menu"
|
|
783
|
+
},
|
|
784
|
+
{
|
|
785
|
+
"name": "disabled",
|
|
786
|
+
"type": "boolean",
|
|
787
|
+
"required": false,
|
|
788
|
+
"description": "Whether the menu item is disabled",
|
|
789
|
+
"from": "@zag-js/menu"
|
|
790
|
+
},
|
|
791
|
+
{
|
|
792
|
+
"name": "style",
|
|
793
|
+
"type": "CSSProperties",
|
|
794
|
+
"required": false,
|
|
795
|
+
"description": "Inline styles applied to the rendered element.",
|
|
796
|
+
"from": "@types/react"
|
|
797
|
+
},
|
|
798
|
+
{
|
|
799
|
+
"name": "valueText",
|
|
800
|
+
"type": "string",
|
|
801
|
+
"required": false,
|
|
802
|
+
"description": "The textual value of the option. Used in typeahead navigation of the menu.\nIf not provided, the text content of the menu item will be used.",
|
|
803
|
+
"from": "@zag-js/menu"
|
|
804
|
+
}
|
|
805
|
+
]
|
|
806
|
+
},
|
|
807
|
+
{
|
|
808
|
+
"name": "ContextMenuSeparator",
|
|
809
|
+
"props": [
|
|
810
|
+
{
|
|
811
|
+
"name": "asChild",
|
|
812
|
+
"type": "boolean",
|
|
813
|
+
"required": false,
|
|
814
|
+
"description": "Use the provided child element as the default rendered element, combining their props and behavior.",
|
|
815
|
+
"from": "@ark-ui/react"
|
|
816
|
+
},
|
|
817
|
+
{
|
|
818
|
+
"name": "children",
|
|
819
|
+
"type": "ReactNode",
|
|
820
|
+
"required": false,
|
|
821
|
+
"description": "Content rendered inside the part.",
|
|
822
|
+
"from": "@types/react"
|
|
823
|
+
},
|
|
824
|
+
{
|
|
825
|
+
"name": "className",
|
|
826
|
+
"type": "string",
|
|
827
|
+
"required": false,
|
|
828
|
+
"description": "Extra classes merged into the part's own classes with `cn`.",
|
|
829
|
+
"from": "@types/react"
|
|
830
|
+
},
|
|
831
|
+
{
|
|
832
|
+
"name": "style",
|
|
833
|
+
"type": "CSSProperties",
|
|
834
|
+
"required": false,
|
|
835
|
+
"description": "Inline styles applied to the rendered element.",
|
|
836
|
+
"from": "@types/react"
|
|
837
|
+
}
|
|
838
|
+
]
|
|
839
|
+
},
|
|
840
|
+
{
|
|
841
|
+
"name": "ContextMenuShortcut",
|
|
842
|
+
"props": [
|
|
843
|
+
{
|
|
844
|
+
"name": "children",
|
|
845
|
+
"type": "ReactNode",
|
|
846
|
+
"required": false,
|
|
847
|
+
"description": "Content rendered inside the part.",
|
|
848
|
+
"from": "@types/react"
|
|
849
|
+
},
|
|
850
|
+
{
|
|
851
|
+
"name": "className",
|
|
852
|
+
"type": "string",
|
|
853
|
+
"required": false,
|
|
854
|
+
"description": "Extra classes merged into the part's own classes with `cn`.",
|
|
855
|
+
"from": "@types/react"
|
|
856
|
+
},
|
|
857
|
+
{
|
|
858
|
+
"name": "style",
|
|
859
|
+
"type": "CSSProperties",
|
|
860
|
+
"required": false,
|
|
861
|
+
"description": "Inline styles applied to the rendered element.",
|
|
862
|
+
"from": "@types/react"
|
|
863
|
+
}
|
|
864
|
+
]
|
|
865
|
+
},
|
|
866
|
+
{
|
|
867
|
+
"name": "ContextMenuSub",
|
|
868
|
+
"props": [
|
|
869
|
+
{
|
|
870
|
+
"name": "anchorPoint",
|
|
871
|
+
"type": "Point | null",
|
|
872
|
+
"required": false,
|
|
873
|
+
"description": "The positioning point for the menu. Can be set by the context menu trigger or the button trigger.",
|
|
874
|
+
"from": "@zag-js/menu"
|
|
875
|
+
},
|
|
876
|
+
{
|
|
877
|
+
"name": "aria-label",
|
|
878
|
+
"type": "string",
|
|
879
|
+
"required": false,
|
|
880
|
+
"description": "The accessibility label for the menu",
|
|
881
|
+
"from": "@zag-js/menu"
|
|
882
|
+
},
|
|
883
|
+
{
|
|
884
|
+
"name": "children",
|
|
885
|
+
"type": "ReactNode",
|
|
886
|
+
"required": false,
|
|
887
|
+
"description": "Content rendered inside the part.",
|
|
888
|
+
"from": "@ark-ui/react"
|
|
889
|
+
},
|
|
890
|
+
{
|
|
891
|
+
"name": "closeOnSelect",
|
|
892
|
+
"type": "boolean",
|
|
893
|
+
"required": false,
|
|
894
|
+
"default": "true",
|
|
895
|
+
"description": "Whether to close the menu when an option is selected",
|
|
896
|
+
"from": "@zag-js/menu"
|
|
897
|
+
},
|
|
898
|
+
{
|
|
899
|
+
"name": "composite",
|
|
900
|
+
"type": "boolean",
|
|
901
|
+
"required": false,
|
|
902
|
+
"default": "true",
|
|
903
|
+
"description": "Whether the menu is a composed with other composite widgets like a combobox or tabs",
|
|
904
|
+
"from": "@zag-js/menu"
|
|
905
|
+
},
|
|
906
|
+
{
|
|
907
|
+
"name": "defaultHighlightedValue",
|
|
908
|
+
"type": "string | null",
|
|
909
|
+
"required": false,
|
|
910
|
+
"description": "The initial highlighted value of the menu item when rendered.\nUse when you don't need to control the highlighted value of the menu item.",
|
|
911
|
+
"from": "@zag-js/menu"
|
|
912
|
+
},
|
|
913
|
+
{
|
|
914
|
+
"name": "defaultOpen",
|
|
915
|
+
"type": "boolean",
|
|
916
|
+
"required": false,
|
|
917
|
+
"description": "The initial open state of the menu when rendered.\nUse when you don't need to control the open state of the menu.",
|
|
918
|
+
"from": "@zag-js/menu"
|
|
919
|
+
},
|
|
920
|
+
{
|
|
921
|
+
"name": "defaultTriggerValue",
|
|
922
|
+
"type": "string | null",
|
|
923
|
+
"required": false,
|
|
924
|
+
"description": "The initial trigger value when rendered.\nUse when you don't need to control the trigger value.",
|
|
925
|
+
"from": "@zag-js/menu"
|
|
926
|
+
},
|
|
927
|
+
{
|
|
928
|
+
"name": "hideMode",
|
|
929
|
+
"type": "HideMode",
|
|
930
|
+
"required": false,
|
|
931
|
+
"default": "'display-none'",
|
|
932
|
+
"description": "How to hide content when mounted but not present.\n- `'display-none'`: HTML `hidden` attribute. Effects stay alive.\n- `'activity'`: React 19 `<Activity mode=\"hidden\">`. Effects pause. Requires React 19+.",
|
|
933
|
+
"from": "@ark-ui/react"
|
|
934
|
+
},
|
|
935
|
+
{
|
|
936
|
+
"name": "highlightedValue",
|
|
937
|
+
"type": "string | null",
|
|
938
|
+
"required": false,
|
|
939
|
+
"description": "The controlled highlighted value of the menu item.",
|
|
940
|
+
"from": "@zag-js/menu"
|
|
941
|
+
},
|
|
942
|
+
{
|
|
943
|
+
"name": "id",
|
|
944
|
+
"type": "string",
|
|
945
|
+
"required": false,
|
|
946
|
+
"description": "The unique identifier of the machine.",
|
|
947
|
+
"from": "@zag-js/types"
|
|
948
|
+
},
|
|
949
|
+
{
|
|
950
|
+
"name": "ids",
|
|
951
|
+
"type": "ElementIds",
|
|
952
|
+
"required": false,
|
|
953
|
+
"description": "The ids of the elements in the menu. Useful for composition.",
|
|
954
|
+
"from": "@zag-js/menu"
|
|
955
|
+
},
|
|
956
|
+
{
|
|
957
|
+
"name": "immediate",
|
|
958
|
+
"type": "boolean",
|
|
959
|
+
"required": false,
|
|
960
|
+
"description": "Whether to synchronize the present change immediately or defer it to the next frame",
|
|
961
|
+
"from": "@zag-js/presence"
|
|
962
|
+
},
|
|
963
|
+
{
|
|
964
|
+
"name": "lazyMount",
|
|
965
|
+
"type": "boolean",
|
|
966
|
+
"required": false,
|
|
967
|
+
"default": "true",
|
|
968
|
+
"description": "Whether to enable lazy mounting",
|
|
969
|
+
"from": "@ark-ui/react"
|
|
970
|
+
},
|
|
971
|
+
{
|
|
972
|
+
"name": "loopFocus",
|
|
973
|
+
"type": "boolean",
|
|
974
|
+
"required": false,
|
|
975
|
+
"default": "false",
|
|
976
|
+
"description": "Whether to loop the keyboard navigation.",
|
|
977
|
+
"from": "@zag-js/menu"
|
|
978
|
+
},
|
|
979
|
+
{
|
|
980
|
+
"name": "navigate",
|
|
981
|
+
"type": "((details: NavigateDetails) => void) | null",
|
|
982
|
+
"required": false,
|
|
983
|
+
"description": "Function to navigate to the selected item if it's an anchor element",
|
|
984
|
+
"from": "@zag-js/menu"
|
|
985
|
+
},
|
|
986
|
+
{
|
|
987
|
+
"name": "onEnterComplete",
|
|
988
|
+
"type": "VoidFunction",
|
|
989
|
+
"required": false,
|
|
990
|
+
"description": "Function called when the animation ends in the open state",
|
|
991
|
+
"from": "@zag-js/presence"
|
|
992
|
+
},
|
|
993
|
+
{
|
|
994
|
+
"name": "onEscapeKeyDown",
|
|
995
|
+
"type": "((event: KeyboardEvent) => void)",
|
|
996
|
+
"required": false,
|
|
997
|
+
"description": "Function called when the escape key is pressed",
|
|
998
|
+
"from": "@zag-js/dismissable"
|
|
999
|
+
},
|
|
1000
|
+
{
|
|
1001
|
+
"name": "onExitComplete",
|
|
1002
|
+
"type": "VoidFunction",
|
|
1003
|
+
"required": false,
|
|
1004
|
+
"description": "Function called when the animation ends in the closed state",
|
|
1005
|
+
"from": "@zag-js/presence"
|
|
1006
|
+
},
|
|
1007
|
+
{
|
|
1008
|
+
"name": "onFocusOutside",
|
|
1009
|
+
"type": "((event: FocusOutsideEvent) => void)",
|
|
1010
|
+
"required": false,
|
|
1011
|
+
"description": "Function called when the focus is moved outside the component",
|
|
1012
|
+
"from": "@zag-js/interact-outside"
|
|
1013
|
+
},
|
|
1014
|
+
{
|
|
1015
|
+
"name": "onHighlightChange",
|
|
1016
|
+
"type": "((details: HighlightChangeDetails) => void)",
|
|
1017
|
+
"required": false,
|
|
1018
|
+
"description": "Function called when the highlighted menu item changes.",
|
|
1019
|
+
"from": "@zag-js/menu"
|
|
1020
|
+
},
|
|
1021
|
+
{
|
|
1022
|
+
"name": "onInteractOutside",
|
|
1023
|
+
"type": "((event: InteractOutsideEvent) => void)",
|
|
1024
|
+
"required": false,
|
|
1025
|
+
"description": "Function called when an interaction happens outside the component",
|
|
1026
|
+
"from": "@zag-js/interact-outside"
|
|
1027
|
+
},
|
|
1028
|
+
{
|
|
1029
|
+
"name": "onOpenChange",
|
|
1030
|
+
"type": "((details: OpenChangeDetails) => void)",
|
|
1031
|
+
"required": false,
|
|
1032
|
+
"description": "Function called when the menu opens or closes",
|
|
1033
|
+
"from": "@zag-js/menu"
|
|
1034
|
+
},
|
|
1035
|
+
{
|
|
1036
|
+
"name": "onPointerDownOutside",
|
|
1037
|
+
"type": "((event: PointerDownOutsideEvent) => void)",
|
|
1038
|
+
"required": false,
|
|
1039
|
+
"description": "Function called when the pointer is pressed down outside the component",
|
|
1040
|
+
"from": "@zag-js/interact-outside"
|
|
1041
|
+
},
|
|
1042
|
+
{
|
|
1043
|
+
"name": "onRequestDismiss",
|
|
1044
|
+
"type": "((event: LayerDismissEvent) => void)",
|
|
1045
|
+
"required": false,
|
|
1046
|
+
"description": "Function called when this layer is closed due to a parent layer being closed",
|
|
1047
|
+
"from": "@zag-js/dismissable"
|
|
1048
|
+
},
|
|
1049
|
+
{
|
|
1050
|
+
"name": "onSelect",
|
|
1051
|
+
"type": "((details: SelectionDetails) => void)",
|
|
1052
|
+
"required": false,
|
|
1053
|
+
"description": "Function called when a menu item is selected.",
|
|
1054
|
+
"from": "@zag-js/menu"
|
|
1055
|
+
},
|
|
1056
|
+
{
|
|
1057
|
+
"name": "onTriggerValueChange",
|
|
1058
|
+
"type": "((details: TriggerValueChangeDetails) => void)",
|
|
1059
|
+
"required": false,
|
|
1060
|
+
"description": "Function called when the trigger value changes.",
|
|
1061
|
+
"from": "@zag-js/menu"
|
|
1062
|
+
},
|
|
1063
|
+
{
|
|
1064
|
+
"name": "open",
|
|
1065
|
+
"type": "boolean",
|
|
1066
|
+
"required": false,
|
|
1067
|
+
"description": "The controlled open state of the menu",
|
|
1068
|
+
"from": "@zag-js/menu"
|
|
1069
|
+
},
|
|
1070
|
+
{
|
|
1071
|
+
"name": "positioning",
|
|
1072
|
+
"type": "PositioningOptions",
|
|
1073
|
+
"required": false,
|
|
1074
|
+
"description": "The options used to dynamically position the menu",
|
|
1075
|
+
"from": "@zag-js/menu"
|
|
1076
|
+
},
|
|
1077
|
+
{
|
|
1078
|
+
"name": "present",
|
|
1079
|
+
"type": "boolean",
|
|
1080
|
+
"required": false,
|
|
1081
|
+
"description": "Whether the node is present (controlled by the user)",
|
|
1082
|
+
"from": "@zag-js/presence"
|
|
1083
|
+
},
|
|
1084
|
+
{
|
|
1085
|
+
"name": "skipAnimationOnMount",
|
|
1086
|
+
"type": "boolean",
|
|
1087
|
+
"required": false,
|
|
1088
|
+
"default": "false",
|
|
1089
|
+
"description": "Whether to allow the initial presence animation.",
|
|
1090
|
+
"from": "@ark-ui/react"
|
|
1091
|
+
},
|
|
1092
|
+
{
|
|
1093
|
+
"name": "triggerValue",
|
|
1094
|
+
"type": "string | null",
|
|
1095
|
+
"required": false,
|
|
1096
|
+
"description": "The controlled trigger value",
|
|
1097
|
+
"from": "@zag-js/menu"
|
|
1098
|
+
},
|
|
1099
|
+
{
|
|
1100
|
+
"name": "typeahead",
|
|
1101
|
+
"type": "boolean",
|
|
1102
|
+
"required": false,
|
|
1103
|
+
"default": "true",
|
|
1104
|
+
"description": "Whether the pressing printable characters should trigger typeahead navigation",
|
|
1105
|
+
"from": "@zag-js/menu"
|
|
1106
|
+
},
|
|
1107
|
+
{
|
|
1108
|
+
"name": "unmountOnExit",
|
|
1109
|
+
"type": "boolean",
|
|
1110
|
+
"required": false,
|
|
1111
|
+
"default": "true",
|
|
1112
|
+
"description": "Whether to unmount on exit.",
|
|
1113
|
+
"from": "@ark-ui/react"
|
|
1114
|
+
}
|
|
1115
|
+
]
|
|
1116
|
+
},
|
|
1117
|
+
{
|
|
1118
|
+
"name": "ContextMenuSubContent",
|
|
1119
|
+
"props": [
|
|
1120
|
+
{
|
|
1121
|
+
"name": "asChild",
|
|
1122
|
+
"type": "boolean",
|
|
1123
|
+
"required": false,
|
|
1124
|
+
"description": "Use the provided child element as the default rendered element, combining their props and behavior.",
|
|
1125
|
+
"from": "@ark-ui/react"
|
|
1126
|
+
},
|
|
1127
|
+
{
|
|
1128
|
+
"name": "children",
|
|
1129
|
+
"type": "ReactNode",
|
|
1130
|
+
"required": false,
|
|
1131
|
+
"description": "Content rendered inside the part.",
|
|
1132
|
+
"from": "@types/react"
|
|
1133
|
+
},
|
|
1134
|
+
{
|
|
1135
|
+
"name": "className",
|
|
1136
|
+
"type": "string",
|
|
1137
|
+
"required": false,
|
|
1138
|
+
"description": "Extra classes merged into the part's own classes with `cn`.",
|
|
1139
|
+
"from": "@types/react"
|
|
1140
|
+
},
|
|
1141
|
+
{
|
|
1142
|
+
"name": "style",
|
|
1143
|
+
"type": "CSSProperties",
|
|
1144
|
+
"required": false,
|
|
1145
|
+
"description": "Inline styles applied to the rendered element.",
|
|
1146
|
+
"from": "@types/react"
|
|
1147
|
+
}
|
|
1148
|
+
]
|
|
1149
|
+
},
|
|
1150
|
+
{
|
|
1151
|
+
"name": "ContextMenuSubTrigger",
|
|
1152
|
+
"props": [
|
|
1153
|
+
{
|
|
1154
|
+
"name": "inset",
|
|
1155
|
+
"type": "boolean",
|
|
1156
|
+
"required": false,
|
|
1157
|
+
"description": "Indent the item to align with items that have an indicator.",
|
|
1158
|
+
"from": "arkcn"
|
|
1159
|
+
},
|
|
1160
|
+
{
|
|
1161
|
+
"name": "asChild",
|
|
1162
|
+
"type": "boolean",
|
|
1163
|
+
"required": false,
|
|
1164
|
+
"description": "Use the provided child element as the default rendered element, combining their props and behavior.",
|
|
1165
|
+
"from": "@ark-ui/react"
|
|
1166
|
+
},
|
|
1167
|
+
{
|
|
1168
|
+
"name": "children",
|
|
1169
|
+
"type": "ReactNode",
|
|
1170
|
+
"required": false,
|
|
1171
|
+
"description": "Content rendered inside the part.",
|
|
1172
|
+
"from": "@types/react"
|
|
1173
|
+
},
|
|
1174
|
+
{
|
|
1175
|
+
"name": "className",
|
|
1176
|
+
"type": "string",
|
|
1177
|
+
"required": false,
|
|
1178
|
+
"description": "Extra classes merged into the part's own classes with `cn`.",
|
|
1179
|
+
"from": "@types/react"
|
|
1180
|
+
},
|
|
1181
|
+
{
|
|
1182
|
+
"name": "style",
|
|
1183
|
+
"type": "CSSProperties",
|
|
1184
|
+
"required": false,
|
|
1185
|
+
"description": "Inline styles applied to the rendered element.",
|
|
1186
|
+
"from": "@types/react"
|
|
1187
|
+
}
|
|
1188
|
+
]
|
|
1189
|
+
},
|
|
1190
|
+
{
|
|
1191
|
+
"name": "ContextMenuTrigger",
|
|
1192
|
+
"props": [
|
|
1193
|
+
{
|
|
1194
|
+
"name": "asChild",
|
|
1195
|
+
"type": "boolean",
|
|
1196
|
+
"required": false,
|
|
1197
|
+
"description": "Use the provided child element as the default rendered element, combining their props and behavior.",
|
|
1198
|
+
"from": "@ark-ui/react"
|
|
1199
|
+
},
|
|
1200
|
+
{
|
|
1201
|
+
"name": "children",
|
|
1202
|
+
"type": "ReactNode",
|
|
1203
|
+
"required": false,
|
|
1204
|
+
"description": "Content rendered inside the part.",
|
|
1205
|
+
"from": "@types/react"
|
|
1206
|
+
},
|
|
1207
|
+
{
|
|
1208
|
+
"name": "className",
|
|
1209
|
+
"type": "string",
|
|
1210
|
+
"required": false,
|
|
1211
|
+
"description": "Extra classes merged into the part's own classes with `cn`.",
|
|
1212
|
+
"from": "@types/react"
|
|
1213
|
+
},
|
|
1214
|
+
{
|
|
1215
|
+
"name": "style",
|
|
1216
|
+
"type": "CSSProperties",
|
|
1217
|
+
"required": false,
|
|
1218
|
+
"description": "Inline styles applied to the rendered element.",
|
|
1219
|
+
"from": "@types/react"
|
|
1220
|
+
}
|
|
1221
|
+
]
|
|
1222
|
+
},
|
|
1223
|
+
{
|
|
1224
|
+
"name": "ContextMenuItemContext",
|
|
1225
|
+
"props": [
|
|
1226
|
+
{
|
|
1227
|
+
"name": "children",
|
|
1228
|
+
"type": "(context: UseMenuItemContext) => ReactNode",
|
|
1229
|
+
"required": true,
|
|
1230
|
+
"description": "Content rendered inside the part.",
|
|
1231
|
+
"from": "@ark-ui/react"
|
|
1232
|
+
}
|
|
1233
|
+
]
|
|
1234
|
+
},
|
|
1235
|
+
{
|
|
1236
|
+
"name": "ContextMenuArrow",
|
|
1237
|
+
"props": [
|
|
1238
|
+
{
|
|
1239
|
+
"name": "asChild",
|
|
1240
|
+
"type": "boolean",
|
|
1241
|
+
"required": false,
|
|
1242
|
+
"description": "Use the provided child element as the default rendered element, combining their props and behavior.",
|
|
1243
|
+
"from": "@ark-ui/react"
|
|
1244
|
+
},
|
|
1245
|
+
{
|
|
1246
|
+
"name": "children",
|
|
1247
|
+
"type": "ReactNode",
|
|
1248
|
+
"required": false,
|
|
1249
|
+
"description": "Content rendered inside the part.",
|
|
1250
|
+
"from": "@types/react"
|
|
1251
|
+
},
|
|
1252
|
+
{
|
|
1253
|
+
"name": "className",
|
|
1254
|
+
"type": "string",
|
|
1255
|
+
"required": false,
|
|
1256
|
+
"description": "Extra classes merged into the part's own classes with `cn`.",
|
|
1257
|
+
"from": "@types/react"
|
|
1258
|
+
},
|
|
1259
|
+
{
|
|
1260
|
+
"name": "style",
|
|
1261
|
+
"type": "CSSProperties",
|
|
1262
|
+
"required": false,
|
|
1263
|
+
"description": "Inline styles applied to the rendered element.",
|
|
1264
|
+
"from": "@types/react"
|
|
1265
|
+
}
|
|
1266
|
+
]
|
|
1267
|
+
},
|
|
1268
|
+
{
|
|
1269
|
+
"name": "ContextMenuArrowTip",
|
|
1270
|
+
"props": [
|
|
1271
|
+
{
|
|
1272
|
+
"name": "asChild",
|
|
1273
|
+
"type": "boolean",
|
|
1274
|
+
"required": false,
|
|
1275
|
+
"description": "Use the provided child element as the default rendered element, combining their props and behavior.",
|
|
1276
|
+
"from": "@ark-ui/react"
|
|
1277
|
+
},
|
|
1278
|
+
{
|
|
1279
|
+
"name": "children",
|
|
1280
|
+
"type": "ReactNode",
|
|
1281
|
+
"required": false,
|
|
1282
|
+
"description": "Content rendered inside the part.",
|
|
1283
|
+
"from": "@types/react"
|
|
1284
|
+
},
|
|
1285
|
+
{
|
|
1286
|
+
"name": "className",
|
|
1287
|
+
"type": "string",
|
|
1288
|
+
"required": false,
|
|
1289
|
+
"description": "Extra classes merged into the part's own classes with `cn`.",
|
|
1290
|
+
"from": "@types/react"
|
|
1291
|
+
},
|
|
1292
|
+
{
|
|
1293
|
+
"name": "style",
|
|
1294
|
+
"type": "CSSProperties",
|
|
1295
|
+
"required": false,
|
|
1296
|
+
"description": "Inline styles applied to the rendered element.",
|
|
1297
|
+
"from": "@types/react"
|
|
1298
|
+
}
|
|
1299
|
+
]
|
|
1300
|
+
},
|
|
1301
|
+
{
|
|
1302
|
+
"name": "ContextMenuClickTrigger",
|
|
1303
|
+
"props": [
|
|
1304
|
+
{
|
|
1305
|
+
"name": "asChild",
|
|
1306
|
+
"type": "boolean",
|
|
1307
|
+
"required": false,
|
|
1308
|
+
"description": "Use the provided child element as the default rendered element, combining their props and behavior.",
|
|
1309
|
+
"from": "@ark-ui/react"
|
|
1310
|
+
},
|
|
1311
|
+
{
|
|
1312
|
+
"name": "children",
|
|
1313
|
+
"type": "ReactNode",
|
|
1314
|
+
"required": false,
|
|
1315
|
+
"description": "Content rendered inside the part.",
|
|
1316
|
+
"from": "@types/react"
|
|
1317
|
+
},
|
|
1318
|
+
{
|
|
1319
|
+
"name": "className",
|
|
1320
|
+
"type": "string",
|
|
1321
|
+
"required": false,
|
|
1322
|
+
"description": "Extra classes merged into the part's own classes with `cn`.",
|
|
1323
|
+
"from": "@types/react"
|
|
1324
|
+
},
|
|
1325
|
+
{
|
|
1326
|
+
"name": "style",
|
|
1327
|
+
"type": "CSSProperties",
|
|
1328
|
+
"required": false,
|
|
1329
|
+
"description": "Inline styles applied to the rendered element.",
|
|
1330
|
+
"from": "@types/react"
|
|
1331
|
+
},
|
|
1332
|
+
{
|
|
1333
|
+
"name": "value",
|
|
1334
|
+
"type": "string",
|
|
1335
|
+
"required": false,
|
|
1336
|
+
"description": "The value that identifies this specific trigger",
|
|
1337
|
+
"from": "@zag-js/menu"
|
|
1338
|
+
}
|
|
1339
|
+
]
|
|
1340
|
+
},
|
|
1341
|
+
{
|
|
1342
|
+
"name": "ContextMenuIndicator",
|
|
1343
|
+
"props": [
|
|
1344
|
+
{
|
|
1345
|
+
"name": "asChild",
|
|
1346
|
+
"type": "boolean",
|
|
1347
|
+
"required": false,
|
|
1348
|
+
"description": "Use the provided child element as the default rendered element, combining their props and behavior.",
|
|
1349
|
+
"from": "@ark-ui/react"
|
|
1350
|
+
},
|
|
1351
|
+
{
|
|
1352
|
+
"name": "children",
|
|
1353
|
+
"type": "ReactNode",
|
|
1354
|
+
"required": false,
|
|
1355
|
+
"description": "Content rendered inside the part.",
|
|
1356
|
+
"from": "@types/react"
|
|
1357
|
+
},
|
|
1358
|
+
{
|
|
1359
|
+
"name": "className",
|
|
1360
|
+
"type": "string",
|
|
1361
|
+
"required": false,
|
|
1362
|
+
"description": "Extra classes merged into the part's own classes with `cn`.",
|
|
1363
|
+
"from": "@types/react"
|
|
1364
|
+
},
|
|
1365
|
+
{
|
|
1366
|
+
"name": "style",
|
|
1367
|
+
"type": "CSSProperties",
|
|
1368
|
+
"required": false,
|
|
1369
|
+
"description": "Inline styles applied to the rendered element.",
|
|
1370
|
+
"from": "@types/react"
|
|
1371
|
+
}
|
|
1372
|
+
]
|
|
1373
|
+
}
|
|
1374
|
+
],
|
|
32
1375
|
"dependencies": {
|
|
33
1376
|
"@ark-ui/react": "^5.39.1",
|
|
34
1377
|
"lucide-react": "^1.41.0"
|
|
@@ -39,7 +1382,7 @@
|
|
|
39
1382
|
"files": [
|
|
40
1383
|
{
|
|
41
1384
|
"path": "components/ui/context-menu.tsx",
|
|
42
|
-
"content": "\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"@/lib/utils\"\nimport { Menu as ContextMenuPrimitive, Portal as PortalPrimitive } from \"@ark-ui/react\"\nimport { CheckIcon, ChevronRightIcon, ChevronDownIcon } from \"lucide-react\"\n\nfunction ContextMenu({\n lazyMount = true,\n unmountOnExit = true,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.Root>) {\n return <ContextMenuPrimitive.Root lazyMount={lazyMount} unmountOnExit={unmountOnExit} {...props} />\n}\n\nfunction ContextMenuTrigger({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.ContextTrigger>) {\n return (\n <ContextMenuPrimitive.ContextTrigger\n data-slot=\"context-menu-trigger\"\n className={cn(\"select-none\", className)}\n {...props}\n />\n )\n}\n\nfunction ContextMenuPortal({ ...props }: React.ComponentProps<typeof PortalPrimitive>) {\n return <PortalPrimitive {...props} />\n}\n\nfunction ContextMenuContext({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Context>) {\n return <ContextMenuPrimitive.Context {...props} />\n}\n\nfunction ContextMenuPositioner({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Positioner>) {\n return (\n <ContextMenuPrimitive.Positioner\n data-slot=\"context-menu-positioner\"\n className={cn(\"[--z-index:50]\", className)}\n {...props}\n />\n )\n}\n\nfunction ContextMenuContent({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Content>) {\n return (\n <ContextMenuPortal>\n <ContextMenuPositioner>\n <ContextMenuPrimitive.Content\n data-slot=\"context-menu-content\"\n className={cn(\n \"z-50 max-h-(--available-height) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95\",\n className\n )}\n {...props}\n />\n </ContextMenuPositioner>\n </ContextMenuPortal>\n )\n}\n\nfunction ContextMenuGroup({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.ItemGroup>) {\n return <ContextMenuPrimitive.ItemGroup data-slot=\"context-menu-group\" {...props} />\n}\n\nfunction ContextMenuItem({\n className,\n inset,\n variant = \"default\",\n value,\n ...props\n}: Omit<React.ComponentProps<typeof ContextMenuPrimitive.Item>, \"value\"> & {\n value?: string\n inset?: boolean\n variant?: \"default\" | \"destructive\"\n}) {\n const id = React.useId()\n return (\n <ContextMenuPrimitive.Item\n data-slot=\"context-menu-item\"\n data-inset={inset}\n data-variant={variant}\n value={value ?? id}\n className={cn(\n \"group/context-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:data-highlighted:bg-destructive/10 data-[variant=destructive]:data-highlighted:text-destructive dark:data-[variant=destructive]:data-highlighted:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-highlighted:*:[svg]:text-accent-foreground data-[variant=destructive]:*:[svg]:text-destructive\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ContextMenuItemText({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.ItemText>) {\n return <ContextMenuPrimitive.ItemText data-slot=\"context-menu-item-text\" {...props} />\n}\n\nfunction ContextMenuItemIndicator({\n className,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.ItemIndicator>) {\n return (\n <ContextMenuPrimitive.ItemIndicator\n data-slot=\"context-menu-item-indicator\"\n className={cn(\"pointer-events-none absolute right-2 flex items-center justify-center\", className)}\n {...props}\n />\n )\n}\n\nconst optionItemClassName =\n \"relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\"\n\nfunction ContextMenuCheckboxItem({\n className,\n children,\n checked = false,\n inset,\n value,\n ...props\n}: Omit<React.ComponentProps<typeof ContextMenuPrimitive.CheckboxItem>, \"checked\" | \"value\"> & {\n checked?: boolean\n value?: string\n inset?: boolean\n}) {\n const id = React.useId()\n return (\n <ContextMenuPrimitive.CheckboxItem\n data-slot=\"context-menu-checkbox-item\"\n data-inset={inset}\n className={cn(optionItemClassName, className)}\n checked={checked}\n value={value ?? id}\n {...props}\n >\n <ContextMenuItemIndicator data-slot=\"context-menu-checkbox-item-indicator\">\n <CheckIcon />\n </ContextMenuItemIndicator>\n {children}\n </ContextMenuPrimitive.CheckboxItem>\n )\n}\n\nfunction ContextMenuRadioGroup({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.RadioItemGroup>) {\n return <ContextMenuPrimitive.RadioItemGroup data-slot=\"context-menu-radio-group\" {...props} />\n}\n\nfunction ContextMenuRadioItem({\n className,\n children,\n inset,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.RadioItem> & {\n inset?: boolean\n}) {\n return (\n <ContextMenuPrimitive.RadioItem\n data-slot=\"context-menu-radio-item\"\n data-inset={inset}\n className={cn(optionItemClassName, className)}\n {...props}\n >\n <ContextMenuItemIndicator data-slot=\"context-menu-radio-item-indicator\">\n <CheckIcon />\n </ContextMenuItemIndicator>\n {children}\n </ContextMenuPrimitive.RadioItem>\n )\n}\n\nfunction ContextMenuLabel({\n className,\n inset,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.ItemGroupLabel> & {\n inset?: boolean\n}) {\n return (\n <ContextMenuPrimitive.ItemGroupLabel\n data-slot=\"context-menu-label\"\n data-inset={inset}\n className={cn(\"px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7\", className)}\n {...props}\n />\n )\n}\n\nfunction ContextMenuSeparator({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Separator>) {\n return (\n <ContextMenuPrimitive.Separator\n data-slot=\"context-menu-separator\"\n className={cn(\"-mx-1 my-1 h-px bg-border\", className)}\n {...props}\n />\n )\n}\n\nfunction ContextMenuShortcut({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"context-menu-shortcut\"\n className={cn(\n \"ml-auto text-xs tracking-widest text-muted-foreground group-data-highlighted/context-menu-item:text-accent-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ContextMenuSub({\n lazyMount = true,\n unmountOnExit = true,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.Root>) {\n return <ContextMenuPrimitive.Root lazyMount={lazyMount} unmountOnExit={unmountOnExit} {...props} />\n}\n\nfunction ContextMenuSubTrigger({\n className,\n inset,\n children,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.TriggerItem> & {\n inset?: boolean\n}) {\n return (\n <ContextMenuPrimitive.TriggerItem\n data-slot=\"context-menu-sub-trigger\"\n data-inset={inset}\n className={cn(\n \"flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto\" />\n </ContextMenuPrimitive.TriggerItem>\n )\n}\n\nfunction ContextMenuSubContent({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Content>) {\n return (\n <ContextMenuPortal>\n <ContextMenuPositioner>\n <ContextMenuPrimitive.Content\n data-slot=\"context-menu-sub-content\"\n className={cn(\n \"z-50 min-w-32 origin-(--transform-origin) overflow-hidden rounded-lg border bg-popover p-1 text-popover-foreground shadow-lg outline-hidden duration-100 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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95\",\n className\n )}\n {...props}\n />\n </ContextMenuPositioner>\n </ContextMenuPortal>\n )\n}\n\n/** Render-prop access to one item's state (`{ selected, highlighted, disabled, ... }`). */\nfunction ContextMenuItemContext({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.ItemContext>) {\n return <ContextMenuPrimitive.ItemContext {...props} />\n}\n\n/** A click trigger for the same menu, alongside the right-click `ContextMenuTrigger`. */\nfunction ContextMenuClickTrigger({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Trigger>) {\n return <ContextMenuPrimitive.Trigger data-slot=\"context-menu-click-trigger\" {...props} />\n}\n\nfunction ContextMenuIndicator({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.Indicator>) {\n return (\n <ContextMenuPrimitive.Indicator\n data-slot=\"context-menu-indicator\"\n className={cn(\"inline-flex transition-transform data-[state=open]:rotate-180 [&_svg]:size-4\", className)}\n {...props}\n >\n {children ?? <ChevronDownIcon />}\n </ContextMenuPrimitive.Indicator>\n )\n}\n\nfunction ContextMenuArrow({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Arrow>) {\n return (\n <ContextMenuPrimitive.Arrow\n data-slot=\"context-menu-arrow\"\n className={cn(\"[--arrow-background:var(--color-popover)] [--arrow-size:0.625rem]\", className)}\n {...props}\n >\n <ContextMenuArrowTip />\n </ContextMenuPrimitive.Arrow>\n )\n}\n\nfunction ContextMenuArrowTip({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.ArrowTip>) {\n return (\n <ContextMenuPrimitive.ArrowTip\n data-slot=\"context-menu-arrow-tip\"\n className={cn(\"border-t border-l border-foreground/10\", className)}\n {...props}\n />\n )\n}\n\nexport {\n ContextMenu,\n ContextMenuCheckboxItem,\n ContextMenuContent,\n ContextMenuContext,\n ContextMenuGroup,\n ContextMenuItem,\n ContextMenuItemIndicator,\n ContextMenuItemText,\n ContextMenuLabel,\n ContextMenuPortal,\n ContextMenuPositioner,\n ContextMenuRadioGroup,\n ContextMenuRadioItem,\n ContextMenuSeparator,\n ContextMenuShortcut,\n ContextMenuSub,\n ContextMenuSubContent,\n ContextMenuSubTrigger,\n ContextMenuTrigger,\n ContextMenuItemContext,\n ContextMenuArrow,\n ContextMenuArrowTip,\n ContextMenuClickTrigger,\n ContextMenuIndicator,\n}\n"
|
|
1385
|
+
"content": "\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"@/lib/utils\"\nimport { Menu as ContextMenuPrimitive, Portal as PortalPrimitive } from \"@ark-ui/react\"\nimport { CheckIcon, ChevronRightIcon, ChevronDownIcon } from \"lucide-react\"\n\nfunction ContextMenu({\n lazyMount = true,\n unmountOnExit = true,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.Root>) {\n return <ContextMenuPrimitive.Root lazyMount={lazyMount} unmountOnExit={unmountOnExit} {...props} />\n}\n\nfunction ContextMenuTrigger({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.ContextTrigger>) {\n return (\n <ContextMenuPrimitive.ContextTrigger\n data-slot=\"context-menu-trigger\"\n className={cn(\"select-none\", className)}\n {...props}\n />\n )\n}\n\nfunction ContextMenuPortal({ ...props }: React.ComponentProps<typeof PortalPrimitive>) {\n return <PortalPrimitive {...props} />\n}\n\nfunction ContextMenuContext({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Context>) {\n return <ContextMenuPrimitive.Context {...props} />\n}\n\nfunction ContextMenuPositioner({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Positioner>) {\n return (\n <ContextMenuPrimitive.Positioner\n data-slot=\"context-menu-positioner\"\n className={cn(\"[--z-index:50]\", className)}\n {...props}\n />\n )\n}\n\nfunction ContextMenuContent({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Content>) {\n return (\n <ContextMenuPortal>\n <ContextMenuPositioner>\n <ContextMenuPrimitive.Content\n data-slot=\"context-menu-content\"\n className={cn(\n \"z-50 max-h-(--available-height) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95\",\n className\n )}\n {...props}\n />\n </ContextMenuPositioner>\n </ContextMenuPortal>\n )\n}\n\nfunction ContextMenuGroup({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.ItemGroup>) {\n return <ContextMenuPrimitive.ItemGroup data-slot=\"context-menu-group\" {...props} />\n}\n\nfunction ContextMenuItem({\n className,\n inset,\n variant = \"default\",\n value,\n ...props\n}: Omit<React.ComponentProps<typeof ContextMenuPrimitive.Item>, \"value\"> & {\n value?: string\n /** Indent the item to align with items that have an indicator. */\n inset?: boolean\n variant?: \"default\" | \"destructive\"\n}) {\n const id = React.useId()\n return (\n <ContextMenuPrimitive.Item\n data-slot=\"context-menu-item\"\n data-inset={inset}\n data-variant={variant}\n value={value ?? id}\n className={cn(\n \"group/context-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:data-highlighted:bg-destructive/10 data-[variant=destructive]:data-highlighted:text-destructive dark:data-[variant=destructive]:data-highlighted:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-highlighted:*:[svg]:text-accent-foreground data-[variant=destructive]:*:[svg]:text-destructive\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ContextMenuItemText({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.ItemText>) {\n return <ContextMenuPrimitive.ItemText data-slot=\"context-menu-item-text\" {...props} />\n}\n\nfunction ContextMenuItemIndicator({\n className,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.ItemIndicator>) {\n return (\n <ContextMenuPrimitive.ItemIndicator\n data-slot=\"context-menu-item-indicator\"\n className={cn(\"pointer-events-none absolute right-2 flex items-center justify-center\", className)}\n {...props}\n />\n )\n}\n\nconst optionItemClassName =\n \"relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\"\n\nfunction ContextMenuCheckboxItem({\n className,\n children,\n checked = false,\n inset,\n value,\n ...props\n}: Omit<React.ComponentProps<typeof ContextMenuPrimitive.CheckboxItem>, \"checked\" | \"value\"> & {\n /** Checked state of the item. */\n checked?: boolean\n value?: string\n /** Indent the item to align with items that have an indicator. */\n inset?: boolean\n}) {\n const id = React.useId()\n return (\n <ContextMenuPrimitive.CheckboxItem\n data-slot=\"context-menu-checkbox-item\"\n data-inset={inset}\n className={cn(optionItemClassName, className)}\n checked={checked}\n value={value ?? id}\n {...props}\n >\n <ContextMenuItemIndicator data-slot=\"context-menu-checkbox-item-indicator\">\n <CheckIcon />\n </ContextMenuItemIndicator>\n {children}\n </ContextMenuPrimitive.CheckboxItem>\n )\n}\n\nfunction ContextMenuRadioGroup({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.RadioItemGroup>) {\n return <ContextMenuPrimitive.RadioItemGroup data-slot=\"context-menu-radio-group\" {...props} />\n}\n\nfunction ContextMenuRadioItem({\n className,\n children,\n inset,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.RadioItem> & {\n /** Indent the item to align with items that have an indicator. */\n inset?: boolean\n}) {\n return (\n <ContextMenuPrimitive.RadioItem\n data-slot=\"context-menu-radio-item\"\n data-inset={inset}\n className={cn(optionItemClassName, className)}\n {...props}\n >\n <ContextMenuItemIndicator data-slot=\"context-menu-radio-item-indicator\">\n <CheckIcon />\n </ContextMenuItemIndicator>\n {children}\n </ContextMenuPrimitive.RadioItem>\n )\n}\n\nfunction ContextMenuLabel({\n className,\n inset,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.ItemGroupLabel> & {\n /** Indent the item to align with items that have an indicator. */\n inset?: boolean\n}) {\n return (\n <ContextMenuPrimitive.ItemGroupLabel\n data-slot=\"context-menu-label\"\n data-inset={inset}\n className={cn(\"px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7\", className)}\n {...props}\n />\n )\n}\n\nfunction ContextMenuSeparator({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Separator>) {\n return (\n <ContextMenuPrimitive.Separator\n data-slot=\"context-menu-separator\"\n className={cn(\"-mx-1 my-1 h-px bg-border\", className)}\n {...props}\n />\n )\n}\n\nfunction ContextMenuShortcut({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"context-menu-shortcut\"\n className={cn(\n \"ml-auto text-xs tracking-widest text-muted-foreground group-data-highlighted/context-menu-item:text-accent-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ContextMenuSub({\n lazyMount = true,\n unmountOnExit = true,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.Root>) {\n return <ContextMenuPrimitive.Root lazyMount={lazyMount} unmountOnExit={unmountOnExit} {...props} />\n}\n\nfunction ContextMenuSubTrigger({\n className,\n inset,\n children,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.TriggerItem> & {\n /** Indent the item to align with items that have an indicator. */\n inset?: boolean\n}) {\n return (\n <ContextMenuPrimitive.TriggerItem\n data-slot=\"context-menu-sub-trigger\"\n data-inset={inset}\n className={cn(\n \"flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto\" />\n </ContextMenuPrimitive.TriggerItem>\n )\n}\n\nfunction ContextMenuSubContent({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Content>) {\n return (\n <ContextMenuPortal>\n <ContextMenuPositioner>\n <ContextMenuPrimitive.Content\n data-slot=\"context-menu-sub-content\"\n className={cn(\n \"z-50 min-w-32 origin-(--transform-origin) overflow-hidden rounded-lg border bg-popover p-1 text-popover-foreground shadow-lg outline-hidden duration-100 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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95\",\n className\n )}\n {...props}\n />\n </ContextMenuPositioner>\n </ContextMenuPortal>\n )\n}\n\n/** Render-prop access to one item's state (`{ selected, highlighted, disabled, ... }`). */\nfunction ContextMenuItemContext({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.ItemContext>) {\n return <ContextMenuPrimitive.ItemContext {...props} />\n}\n\n/** A click trigger for the same menu, alongside the right-click `ContextMenuTrigger`. */\nfunction ContextMenuClickTrigger({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Trigger>) {\n return <ContextMenuPrimitive.Trigger data-slot=\"context-menu-click-trigger\" {...props} />\n}\n\nfunction ContextMenuIndicator({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.Indicator>) {\n return (\n <ContextMenuPrimitive.Indicator\n data-slot=\"context-menu-indicator\"\n className={cn(\"inline-flex transition-transform data-[state=open]:rotate-180 [&_svg]:size-4\", className)}\n {...props}\n >\n {children ?? <ChevronDownIcon />}\n </ContextMenuPrimitive.Indicator>\n )\n}\n\nfunction ContextMenuArrow({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Arrow>) {\n return (\n <ContextMenuPrimitive.Arrow\n data-slot=\"context-menu-arrow\"\n className={cn(\"[--arrow-background:var(--color-popover)] [--arrow-size:0.625rem]\", className)}\n {...props}\n >\n <ContextMenuArrowTip />\n </ContextMenuPrimitive.Arrow>\n )\n}\n\nfunction ContextMenuArrowTip({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.ArrowTip>) {\n return (\n <ContextMenuPrimitive.ArrowTip\n data-slot=\"context-menu-arrow-tip\"\n className={cn(\"border-t border-l border-foreground/10\", className)}\n {...props}\n />\n )\n}\n\nexport {\n ContextMenu,\n ContextMenuCheckboxItem,\n ContextMenuContent,\n ContextMenuContext,\n ContextMenuGroup,\n ContextMenuItem,\n ContextMenuItemIndicator,\n ContextMenuItemText,\n ContextMenuLabel,\n ContextMenuPortal,\n ContextMenuPositioner,\n ContextMenuRadioGroup,\n ContextMenuRadioItem,\n ContextMenuSeparator,\n ContextMenuShortcut,\n ContextMenuSub,\n ContextMenuSubContent,\n ContextMenuSubTrigger,\n ContextMenuTrigger,\n ContextMenuItemContext,\n ContextMenuArrow,\n ContextMenuArrowTip,\n ContextMenuClickTrigger,\n ContextMenuIndicator,\n}\n"
|
|
43
1386
|
}
|
|
44
1387
|
]
|
|
45
1388
|
}
|