@ansh-ui/vue 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/LICENSE +21 -0
  2. package/dist/chunk-2VSROZ2N.js +1281 -0
  3. package/dist/chunk-2VSROZ2N.js.map +1 -0
  4. package/dist/chunk-5BQEZYG6.cjs +1294 -0
  5. package/dist/chunk-5BQEZYG6.cjs.map +1 -0
  6. package/dist/chunk-6732H4BQ.cjs +28 -0
  7. package/dist/chunk-6732H4BQ.cjs.map +1 -0
  8. package/dist/chunk-6ABPGOJP.js +722 -0
  9. package/dist/chunk-6ABPGOJP.js.map +1 -0
  10. package/dist/chunk-6XJOB6LE.js +62 -0
  11. package/dist/chunk-6XJOB6LE.js.map +1 -0
  12. package/dist/chunk-774WBLDR.cjs +24 -0
  13. package/dist/chunk-774WBLDR.cjs.map +1 -0
  14. package/dist/chunk-B6OXKW5Q.js +567 -0
  15. package/dist/chunk-B6OXKW5Q.js.map +1 -0
  16. package/dist/chunk-DMPNT3MY.cjs +64 -0
  17. package/dist/chunk-DMPNT3MY.cjs.map +1 -0
  18. package/dist/chunk-EISHOEB6.cjs +158 -0
  19. package/dist/chunk-EISHOEB6.cjs.map +1 -0
  20. package/dist/chunk-EVO23GUS.js +223 -0
  21. package/dist/chunk-EVO23GUS.js.map +1 -0
  22. package/dist/chunk-FVKLCGA4.js +1035 -0
  23. package/dist/chunk-FVKLCGA4.js.map +1 -0
  24. package/dist/chunk-IOXGBPOV.cjs +3681 -0
  25. package/dist/chunk-IOXGBPOV.cjs.map +1 -0
  26. package/dist/chunk-J2LA4GRP.cjs +1051 -0
  27. package/dist/chunk-J2LA4GRP.cjs.map +1 -0
  28. package/dist/chunk-JQ4YLXXM.cjs +580 -0
  29. package/dist/chunk-JQ4YLXXM.cjs.map +1 -0
  30. package/dist/chunk-KCA7RNJ4.cjs +781 -0
  31. package/dist/chunk-KCA7RNJ4.cjs.map +1 -0
  32. package/dist/chunk-NJDDNO4C.js +23 -0
  33. package/dist/chunk-NJDDNO4C.js.map +1 -0
  34. package/dist/chunk-OAQ7MDYX.js +22 -0
  35. package/dist/chunk-OAQ7MDYX.js.map +1 -0
  36. package/dist/chunk-PP6OYURM.cjs +238 -0
  37. package/dist/chunk-PP6OYURM.cjs.map +1 -0
  38. package/dist/chunk-SHX2JGID.cjs +269 -0
  39. package/dist/chunk-SHX2JGID.cjs.map +1 -0
  40. package/dist/chunk-SOYRICHU.js +3645 -0
  41. package/dist/chunk-SOYRICHU.js.map +1 -0
  42. package/dist/chunk-T425FIC7.js +773 -0
  43. package/dist/chunk-T425FIC7.js.map +1 -0
  44. package/dist/chunk-TMG3M6TK.js +152 -0
  45. package/dist/chunk-TMG3M6TK.js.map +1 -0
  46. package/dist/chunk-XLLSS464.cjs +286 -0
  47. package/dist/chunk-XLLSS464.cjs.map +1 -0
  48. package/dist/chunk-XZ5ZFLZM.js +280 -0
  49. package/dist/chunk-XZ5ZFLZM.js.map +1 -0
  50. package/dist/chunk-Z7XOFKM4.cjs +733 -0
  51. package/dist/chunk-Z7XOFKM4.cjs.map +1 -0
  52. package/dist/chunk-ZGMXOMCB.js +266 -0
  53. package/dist/chunk-ZGMXOMCB.js.map +1 -0
  54. package/dist/data.cjs +70 -0
  55. package/dist/data.cjs.map +1 -0
  56. package/dist/data.d.cts +963 -0
  57. package/dist/data.d.ts +963 -0
  58. package/dist/data.js +5 -0
  59. package/dist/data.js.map +1 -0
  60. package/dist/form.cjs +151 -0
  61. package/dist/form.cjs.map +1 -0
  62. package/dist/form.d.cts +2639 -0
  63. package/dist/form.d.ts +2639 -0
  64. package/dist/form.js +6 -0
  65. package/dist/form.js.map +1 -0
  66. package/dist/index.cjs +1158 -0
  67. package/dist/index.cjs.map +1 -0
  68. package/dist/index.d.cts +439 -0
  69. package/dist/index.d.ts +439 -0
  70. package/dist/index.js +547 -0
  71. package/dist/index.js.map +1 -0
  72. package/dist/layout.cjs +67 -0
  73. package/dist/layout.cjs.map +1 -0
  74. package/dist/layout.d.cts +729 -0
  75. package/dist/layout.d.ts +729 -0
  76. package/dist/layout.js +6 -0
  77. package/dist/layout.js.map +1 -0
  78. package/dist/motion.cjs +50 -0
  79. package/dist/motion.cjs.map +1 -0
  80. package/dist/motion.d.cts +681 -0
  81. package/dist/motion.d.ts +681 -0
  82. package/dist/motion.js +5 -0
  83. package/dist/motion.js.map +1 -0
  84. package/dist/navigation.cjs +48 -0
  85. package/dist/navigation.cjs.map +1 -0
  86. package/dist/navigation.d.cts +515 -0
  87. package/dist/navigation.d.ts +515 -0
  88. package/dist/navigation.js +7 -0
  89. package/dist/navigation.js.map +1 -0
  90. package/dist/overlay.cjs +61 -0
  91. package/dist/overlay.cjs.map +1 -0
  92. package/dist/overlay.d.cts +772 -0
  93. package/dist/overlay.d.ts +772 -0
  94. package/dist/overlay.js +8 -0
  95. package/dist/overlay.js.map +1 -0
  96. package/dist/position-Cn7qP1pn.d.cts +50 -0
  97. package/dist/position-Cn7qP1pn.d.ts +50 -0
  98. package/dist/primitives.cjs +129 -0
  99. package/dist/primitives.cjs.map +1 -0
  100. package/dist/primitives.d.cts +300 -0
  101. package/dist/primitives.d.ts +300 -0
  102. package/dist/primitives.js +8 -0
  103. package/dist/primitives.js.map +1 -0
  104. package/dist/sidebar-CQqEmpid.d.cts +124 -0
  105. package/dist/sidebar-CTZ-Ckko.d.ts +124 -0
  106. package/dist/styles.css +5593 -0
  107. package/dist/utils-IKPG3zcC.d.cts +46 -0
  108. package/dist/utils-IKPG3zcC.d.ts +46 -0
  109. package/package.json +91 -0
@@ -0,0 +1,772 @@
1
+ import * as vue from 'vue';
2
+ import { PropType, Ref, VNode } from 'vue';
3
+ import { P as Placement } from './position-Cn7qP1pn.js';
4
+ import { S as SlotContent } from './utils-IKPG3zcC.js';
5
+
6
+ declare const Popover: vue.DefineComponent<vue.ExtractPropTypes<{
7
+ open: {
8
+ type: BooleanConstructor;
9
+ default: undefined;
10
+ };
11
+ defaultOpen: {
12
+ type: BooleanConstructor;
13
+ default: boolean;
14
+ };
15
+ placement: {
16
+ type: PropType<Placement>;
17
+ default: string;
18
+ };
19
+ /** Gap from the trigger, in px. Default `8`. */
20
+ offset: {
21
+ type: NumberConstructor;
22
+ default: number;
23
+ };
24
+ /** Trap focus and block interaction behind. Default `false` — most popovers are non-modal. */
25
+ modal: {
26
+ type: BooleanConstructor;
27
+ default: boolean;
28
+ };
29
+ }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
30
+ [key: string]: any;
31
+ }>[] | undefined, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, "update:open"[], "update:open", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
32
+ open: {
33
+ type: BooleanConstructor;
34
+ default: undefined;
35
+ };
36
+ defaultOpen: {
37
+ type: BooleanConstructor;
38
+ default: boolean;
39
+ };
40
+ placement: {
41
+ type: PropType<Placement>;
42
+ default: string;
43
+ };
44
+ /** Gap from the trigger, in px. Default `8`. */
45
+ offset: {
46
+ type: NumberConstructor;
47
+ default: number;
48
+ };
49
+ /** Trap focus and block interaction behind. Default `false` — most popovers are non-modal. */
50
+ modal: {
51
+ type: BooleanConstructor;
52
+ default: boolean;
53
+ };
54
+ }>> & Readonly<{
55
+ "onUpdate:open"?: ((...args: any[]) => any) | undefined;
56
+ }>, {
57
+ open: boolean;
58
+ placement: Placement;
59
+ offset: number;
60
+ defaultOpen: boolean;
61
+ modal: boolean;
62
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
63
+ declare const PopoverTrigger: vue.DefineComponent<vue.ExtractPropTypes<{
64
+ /** Tag to render. Default `'button'`. */
65
+ as: {
66
+ type: StringConstructor;
67
+ default: string;
68
+ };
69
+ }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
70
+ [key: string]: any;
71
+ }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
72
+ /** Tag to render. Default `'button'`. */
73
+ as: {
74
+ type: StringConstructor;
75
+ default: string;
76
+ };
77
+ }>> & Readonly<{}>, {
78
+ as: string;
79
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
80
+ declare const PopoverContent: vue.DefineComponent<vue.ExtractPropTypes<{
81
+ /** Draw an arrow pointing at the trigger. Default `false`. */
82
+ arrow: {
83
+ type: BooleanConstructor;
84
+ default: boolean;
85
+ };
86
+ /** Match the trigger's width — for a popover acting as a dropdown panel. */
87
+ matchWidth: {
88
+ type: BooleanConstructor;
89
+ default: boolean;
90
+ };
91
+ /** Accessible name. Required unless the content contains its own heading. */
92
+ label: {
93
+ type: StringConstructor;
94
+ default: undefined;
95
+ };
96
+ }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
97
+ [key: string]: any;
98
+ }> | null, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
99
+ /** Draw an arrow pointing at the trigger. Default `false`. */
100
+ arrow: {
101
+ type: BooleanConstructor;
102
+ default: boolean;
103
+ };
104
+ /** Match the trigger's width — for a popover acting as a dropdown panel. */
105
+ matchWidth: {
106
+ type: BooleanConstructor;
107
+ default: boolean;
108
+ };
109
+ /** Accessible name. Required unless the content contains its own heading. */
110
+ label: {
111
+ type: StringConstructor;
112
+ default: undefined;
113
+ };
114
+ }>> & Readonly<{}>, {
115
+ label: string;
116
+ matchWidth: boolean;
117
+ arrow: boolean;
118
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
119
+ /**
120
+ * A rich preview shown on hover — a user card on an @mention, a link preview.
121
+ *
122
+ * Two delays, not one. The open delay stops cards firing as the pointer sweeps across a paragraph of
123
+ * links. The close delay is what lets the pointer travel from the trigger to the card without it
124
+ * vanishing en route, which is the failure that makes hover cards feel broken.
125
+ *
126
+ * Hover-only content is invisible to keyboard and touch users, so this also opens on focus. It is
127
+ * strictly for *supplementary* information — anything essential belongs in a click-opened popover.
128
+ *
129
+ * The React version takes the card's body as a `content` prop; here it's the `#content` slot and
130
+ * the trigger is the default slot — passing a render tree through a prop is idiomatic React and
131
+ * awkward Vue, so this is one of the few places the two APIs deliberately differ:
132
+ * ```vue
133
+ * <HoverCard>
134
+ * @user
135
+ * <template #content>…</template>
136
+ * </HoverCard>
137
+ * ```
138
+ */
139
+ declare const HoverCard: vue.DefineComponent<vue.ExtractPropTypes<{
140
+ /** Delay before opening, in ms. Default `500`. */
141
+ openDelay: {
142
+ type: NumberConstructor;
143
+ default: number;
144
+ };
145
+ /** Delay before closing, in ms. Default `200`. */
146
+ closeDelay: {
147
+ type: NumberConstructor;
148
+ default: number;
149
+ };
150
+ placement: {
151
+ type: PropType<Placement>;
152
+ default: string;
153
+ };
154
+ }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
155
+ [key: string]: any;
156
+ }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
157
+ /** Delay before opening, in ms. Default `500`. */
158
+ openDelay: {
159
+ type: NumberConstructor;
160
+ default: number;
161
+ };
162
+ /** Delay before closing, in ms. Default `200`. */
163
+ closeDelay: {
164
+ type: NumberConstructor;
165
+ default: number;
166
+ };
167
+ placement: {
168
+ type: PropType<Placement>;
169
+ default: string;
170
+ };
171
+ }>> & Readonly<{}>, {
172
+ placement: Placement;
173
+ openDelay: number;
174
+ closeDelay: number;
175
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
176
+
177
+ /**
178
+ * Share a delay across a set of tooltips.
179
+ *
180
+ * Once one is open, moving to a neighbour shows its tooltip immediately. Without this, scanning a
181
+ * toolbar means waiting out the delay on every single button — the behaviour every desktop OS gets
182
+ * right and most web implementations miss.
183
+ *
184
+ * ```vue
185
+ * <TooltipProvider :delay="600">
186
+ * <Toolbar />
187
+ * </TooltipProvider>
188
+ * ```
189
+ */
190
+ declare const TooltipProvider: vue.DefineComponent<vue.ExtractPropTypes<{
191
+ /** Delay before the first tooltip in a group opens, in ms. Default `600`. */
192
+ delay: {
193
+ type: NumberConstructor;
194
+ default: number;
195
+ };
196
+ }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
197
+ [key: string]: any;
198
+ }>[] | undefined, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
199
+ /** Delay before the first tooltip in a group opens, in ms. Default `600`. */
200
+ delay: {
201
+ type: NumberConstructor;
202
+ default: number;
203
+ };
204
+ }>> & Readonly<{}>, {
205
+ delay: number;
206
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
207
+ declare const Tooltip: vue.DefineComponent<vue.ExtractPropTypes<{
208
+ /** The tooltip text. Keep it short — it is read as one description. */
209
+ content: {
210
+ type: PropType<SlotContent>;
211
+ required: true;
212
+ };
213
+ placement: {
214
+ type: PropType<Placement>;
215
+ default: string;
216
+ };
217
+ /** Override the group delay, in ms. */
218
+ delay: {
219
+ type: NumberConstructor;
220
+ default: undefined;
221
+ };
222
+ /** Draw an arrow. Default `true`. */
223
+ arrow: {
224
+ type: BooleanConstructor;
225
+ default: boolean;
226
+ };
227
+ disabled: {
228
+ type: BooleanConstructor;
229
+ default: boolean;
230
+ };
231
+ }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
232
+ [key: string]: any;
233
+ }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
234
+ /** The tooltip text. Keep it short — it is read as one description. */
235
+ content: {
236
+ type: PropType<SlotContent>;
237
+ required: true;
238
+ };
239
+ placement: {
240
+ type: PropType<Placement>;
241
+ default: string;
242
+ };
243
+ /** Override the group delay, in ms. */
244
+ delay: {
245
+ type: NumberConstructor;
246
+ default: undefined;
247
+ };
248
+ /** Draw an arrow. Default `true`. */
249
+ arrow: {
250
+ type: BooleanConstructor;
251
+ default: boolean;
252
+ };
253
+ disabled: {
254
+ type: BooleanConstructor;
255
+ default: boolean;
256
+ };
257
+ }>> & Readonly<{}>, {
258
+ disabled: boolean;
259
+ delay: number;
260
+ placement: Placement;
261
+ arrow: boolean;
262
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
263
+
264
+ type DialogSize = 'sm' | 'md' | 'lg' | 'xl' | 'full';
265
+ /**
266
+ * A modal dialog — the Vue counterpart of `@ansh-ui/react`'s `Dialog`.
267
+ *
268
+ * Not `<dialog showModal>`: the native element's top-layer behaviour is genuinely better, but its
269
+ * backdrop cannot be animated consistently, `::backdrop` inherits nothing, and closing behaviour
270
+ * differs enough across browsers to need working around anyway. The pieces the native element gives
271
+ * for free — focus trap, scroll lock, inert background, focus restore — are all here explicitly, via
272
+ * the same primitives `Popover` uses.
273
+ *
274
+ * `title` is a required prop rather than an optional slot. Every accessibility audit of a component
275
+ * library turns up unnamed dialogs, and the reliable fix is to make the name impossible to omit.
276
+ *
277
+ * React takes the body as `children` and the actions row as a `footer` prop; here they're the
278
+ * default slot and the `#footer` slot respectively — passing a render tree through a prop is
279
+ * idiomatic React and awkward Vue.
280
+ *
281
+ * ```vue
282
+ * <Dialog v-model:open="open" title="Delete project" description="This cannot be undone.">
283
+ * <p>Body</p>
284
+ * <template #footer>
285
+ * <button @click="open = false">Cancel</button>
286
+ * </template>
287
+ * </Dialog>
288
+ * ```
289
+ */
290
+ declare const Dialog: vue.DefineComponent<vue.ExtractPropTypes<{
291
+ open: {
292
+ type: BooleanConstructor;
293
+ default: undefined;
294
+ };
295
+ defaultOpen: {
296
+ type: BooleanConstructor;
297
+ default: boolean;
298
+ };
299
+ /** The dialog's accessible name. Required — a dialog announced as just "dialog" is useless. */
300
+ title: {
301
+ type: PropType<SlotContent>;
302
+ required: true;
303
+ };
304
+ /** Supporting text, wired to `aria-describedby`. */
305
+ description: {
306
+ type: PropType<SlotContent>;
307
+ default: undefined;
308
+ };
309
+ size: {
310
+ type: PropType<DialogSize>;
311
+ default: string;
312
+ };
313
+ /** Show the close button. Default `true`. */
314
+ showClose: {
315
+ type: BooleanConstructor;
316
+ default: boolean;
317
+ };
318
+ /** Allow closing via scrim click and Escape. Default `true`. */
319
+ dismissable: {
320
+ type: BooleanConstructor;
321
+ default: boolean;
322
+ };
323
+ /** Element to focus on open. Defaults to the first tabbable one. */
324
+ initialFocus: {
325
+ type: PropType<Ref<HTMLElement | null>>;
326
+ default: undefined;
327
+ };
328
+ }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
329
+ [key: string]: any;
330
+ }> | null, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, "update:open"[], "update:open", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
331
+ open: {
332
+ type: BooleanConstructor;
333
+ default: undefined;
334
+ };
335
+ defaultOpen: {
336
+ type: BooleanConstructor;
337
+ default: boolean;
338
+ };
339
+ /** The dialog's accessible name. Required — a dialog announced as just "dialog" is useless. */
340
+ title: {
341
+ type: PropType<SlotContent>;
342
+ required: true;
343
+ };
344
+ /** Supporting text, wired to `aria-describedby`. */
345
+ description: {
346
+ type: PropType<SlotContent>;
347
+ default: undefined;
348
+ };
349
+ size: {
350
+ type: PropType<DialogSize>;
351
+ default: string;
352
+ };
353
+ /** Show the close button. Default `true`. */
354
+ showClose: {
355
+ type: BooleanConstructor;
356
+ default: boolean;
357
+ };
358
+ /** Allow closing via scrim click and Escape. Default `true`. */
359
+ dismissable: {
360
+ type: BooleanConstructor;
361
+ default: boolean;
362
+ };
363
+ /** Element to focus on open. Defaults to the first tabbable one. */
364
+ initialFocus: {
365
+ type: PropType<Ref<HTMLElement | null>>;
366
+ default: undefined;
367
+ };
368
+ }>> & Readonly<{
369
+ "onUpdate:open"?: ((...args: any[]) => any) | undefined;
370
+ }>, {
371
+ size: DialogSize;
372
+ description: SlotContent;
373
+ open: boolean;
374
+ defaultOpen: boolean;
375
+ showClose: boolean;
376
+ dismissable: boolean;
377
+ initialFocus: Ref<HTMLElement | null, HTMLElement | null>;
378
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
379
+ /**
380
+ * A confirmation dialog — the Vue counterpart of `@ansh-ui/react`'s `AlertDialog`.
381
+ *
382
+ * `role="alertdialog"` and `aria-describedby` on the message, which makes a screen reader read the
383
+ * consequence immediately on open rather than waiting for the user to navigate to it. That is the
384
+ * entire difference from a regular dialog, and it matters precisely because these appear before
385
+ * irreversible actions.
386
+ *
387
+ * It is deliberately **not** dismissable by clicking the scrim: an accidental click outside should
388
+ * not silently cancel a decision the user was asked to make. Escape still works, because trapping
389
+ * someone in a dialog is worse. Neither is configurable — unlike `Dialog`, there is no
390
+ * `dismissable` prop, matching the React version exactly.
391
+ *
392
+ * Focus starts on **Cancel**, not Confirm. A keyboard user who hits Enter reflexively should not
393
+ * delete their account.
394
+ *
395
+ * React takes `onConfirm`/`onCancel` as function props (`onConfirm` can return a `Promise`, awaited
396
+ * by the caller before flipping `busy` back off). Function props aren't the Vue idiom for actions —
397
+ * every other component in this package emits an event for them instead (see `emits:
398
+ * ['update:modelValue', ...]` throughout `components/form`) — so this emits `confirm`/`cancel`
399
+ * rather than accepting callback props. The caller drives `busy` themselves either way.
400
+ */
401
+ declare const AlertDialog: vue.DefineComponent<vue.ExtractPropTypes<{
402
+ open: {
403
+ type: BooleanConstructor;
404
+ default: undefined;
405
+ };
406
+ defaultOpen: {
407
+ type: BooleanConstructor;
408
+ default: boolean;
409
+ };
410
+ title: {
411
+ type: PropType<SlotContent>;
412
+ required: true;
413
+ };
414
+ description: {
415
+ type: PropType<SlotContent>;
416
+ required: true;
417
+ };
418
+ /** Confirm button text. Default `'Confirm'`. */
419
+ confirmLabel: {
420
+ type: StringConstructor;
421
+ default: string;
422
+ };
423
+ cancelLabel: {
424
+ type: StringConstructor;
425
+ default: string;
426
+ };
427
+ /** Style the confirm action as destructive. */
428
+ destructive: {
429
+ type: BooleanConstructor;
430
+ default: boolean;
431
+ };
432
+ /** Disable the buttons while an async confirm runs. */
433
+ busy: {
434
+ type: BooleanConstructor;
435
+ default: boolean;
436
+ };
437
+ }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
438
+ [key: string]: any;
439
+ }> | null, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("cancel" | "update:open" | "confirm")[], "cancel" | "update:open" | "confirm", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
440
+ open: {
441
+ type: BooleanConstructor;
442
+ default: undefined;
443
+ };
444
+ defaultOpen: {
445
+ type: BooleanConstructor;
446
+ default: boolean;
447
+ };
448
+ title: {
449
+ type: PropType<SlotContent>;
450
+ required: true;
451
+ };
452
+ description: {
453
+ type: PropType<SlotContent>;
454
+ required: true;
455
+ };
456
+ /** Confirm button text. Default `'Confirm'`. */
457
+ confirmLabel: {
458
+ type: StringConstructor;
459
+ default: string;
460
+ };
461
+ cancelLabel: {
462
+ type: StringConstructor;
463
+ default: string;
464
+ };
465
+ /** Style the confirm action as destructive. */
466
+ destructive: {
467
+ type: BooleanConstructor;
468
+ default: boolean;
469
+ };
470
+ /** Disable the buttons while an async confirm runs. */
471
+ busy: {
472
+ type: BooleanConstructor;
473
+ default: boolean;
474
+ };
475
+ }>> & Readonly<{
476
+ onCancel?: ((...args: any[]) => any) | undefined;
477
+ "onUpdate:open"?: ((...args: any[]) => any) | undefined;
478
+ onConfirm?: ((...args: any[]) => any) | undefined;
479
+ }>, {
480
+ open: boolean;
481
+ defaultOpen: boolean;
482
+ confirmLabel: string;
483
+ cancelLabel: string;
484
+ destructive: boolean;
485
+ busy: boolean;
486
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
487
+ /** Layout helper for a dialog's action row. Right-aligned, reversed on narrow screens. */
488
+ declare const DialogFooter: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
489
+ [key: string]: any;
490
+ }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
491
+
492
+ type DrawerSide = 'left' | 'right' | 'top' | 'bottom';
493
+ /**
494
+ * A panel that slides in from an edge — the Vue counterpart of `@ansh-ui/react`'s `Drawer`.
495
+ *
496
+ * Same accessibility contract as `Dialog` — it is a dialog, just positioned differently. The reason
497
+ * it exists separately is that the *content* pattern differs: drawers hold navigation, filters and
498
+ * detail views that stay open while the user works, so they support a non-modal mode where the page
499
+ * behind stays usable.
500
+ *
501
+ * On a phone a bottom drawer is the right shape for what would be a dialog on a desktop; that's a
502
+ * layout decision for the consumer, which is why `side` is a plain prop rather than a breakpoint
503
+ * rule baked in here.
504
+ *
505
+ * ```vue
506
+ * <Drawer v-model:open="open" side="left" title="Filters">
507
+ * …
508
+ * </Drawer>
509
+ * ```
510
+ */
511
+ declare const Drawer: vue.DefineComponent<vue.ExtractPropTypes<{
512
+ open: {
513
+ type: BooleanConstructor;
514
+ default: undefined;
515
+ };
516
+ defaultOpen: {
517
+ type: BooleanConstructor;
518
+ default: boolean;
519
+ };
520
+ /** Which edge it slides from. Default `'right'`. */
521
+ side: {
522
+ type: PropType<DrawerSide>;
523
+ default: string;
524
+ };
525
+ title: {
526
+ type: PropType<SlotContent>;
527
+ required: true;
528
+ };
529
+ description: {
530
+ type: PropType<SlotContent>;
531
+ default: undefined;
532
+ };
533
+ /** Width for left/right, height for top/bottom. Default `'22rem'`. */
534
+ size: {
535
+ type: StringConstructor;
536
+ default: string;
537
+ };
538
+ showClose: {
539
+ type: BooleanConstructor;
540
+ default: boolean;
541
+ };
542
+ /** Block interaction behind and lock scroll. Default `true`. */
543
+ modal: {
544
+ type: BooleanConstructor;
545
+ default: boolean;
546
+ };
547
+ dismissable: {
548
+ type: BooleanConstructor;
549
+ default: boolean;
550
+ };
551
+ }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
552
+ [key: string]: any;
553
+ }> | null, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, "update:open"[], "update:open", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
554
+ open: {
555
+ type: BooleanConstructor;
556
+ default: undefined;
557
+ };
558
+ defaultOpen: {
559
+ type: BooleanConstructor;
560
+ default: boolean;
561
+ };
562
+ /** Which edge it slides from. Default `'right'`. */
563
+ side: {
564
+ type: PropType<DrawerSide>;
565
+ default: string;
566
+ };
567
+ title: {
568
+ type: PropType<SlotContent>;
569
+ required: true;
570
+ };
571
+ description: {
572
+ type: PropType<SlotContent>;
573
+ default: undefined;
574
+ };
575
+ /** Width for left/right, height for top/bottom. Default `'22rem'`. */
576
+ size: {
577
+ type: StringConstructor;
578
+ default: string;
579
+ };
580
+ showClose: {
581
+ type: BooleanConstructor;
582
+ default: boolean;
583
+ };
584
+ /** Block interaction behind and lock scroll. Default `true`. */
585
+ modal: {
586
+ type: BooleanConstructor;
587
+ default: boolean;
588
+ };
589
+ dismissable: {
590
+ type: BooleanConstructor;
591
+ default: boolean;
592
+ };
593
+ }>> & Readonly<{
594
+ "onUpdate:open"?: ((...args: any[]) => any) | undefined;
595
+ }>, {
596
+ size: string;
597
+ description: SlotContent;
598
+ open: boolean;
599
+ side: DrawerSide;
600
+ defaultOpen: boolean;
601
+ modal: boolean;
602
+ showClose: boolean;
603
+ dismissable: boolean;
604
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
605
+
606
+ /**
607
+ * Menus — dropdown and context. The Vue counterpart of `@ansh-ui/react`'s `DropdownMenu` /
608
+ * `ContextMenu`.
609
+ *
610
+ * Data-driven (`:items="[…]"`) rather than compound. Menus are almost always built from a
611
+ * configuration array anyway — permissions filter entries, a selection decides what's enabled — and
612
+ * expressing that as template children means `v-if` scattered through the tree, which breaks keyboard
613
+ * navigation indices in ways that are painful to debug.
614
+ *
615
+ * Follows the ARIA menu pattern, where **DOM focus moves to the item** (unlike a listbox, which
616
+ * keeps focus on the container). That's what makes Right/Left arrow submenu traversal work the way
617
+ * it does in every desktop application.
618
+ *
619
+ * Keyboard navigation (`Home`/`End`/arrows/typeahead) is implemented directly rather than through
620
+ * `useRovingFocus`: that primitive's arrow-key stepping doesn't skip disabled rows, while this menu's
621
+ * navigation must — landing the roving tab stop on a disabled item is the one behaviour the ARIA menu
622
+ * pattern explicitly forbids. The tabindex-per-row wiring below (`0` on the active row, `-1`
623
+ * elsewhere) is the same roving-tabindex shape `useRovingFocus` implements, just with the
624
+ * skip-disabled search this menu needs and the extra keys (`Enter`, `Escape`, `Tab`, typeahead,
625
+ * `ArrowRight`/`ArrowLeft` for submenus) a generic composite widget hook doesn't know about — ported
626
+ * directly from `@ansh-ui/react`'s own hand-rolled `move()`/`activate()`.
627
+ */
628
+ interface MenuItemBase {
629
+ id?: string;
630
+ disabled?: boolean;
631
+ }
632
+ interface MenuAction extends MenuItemBase {
633
+ type?: 'item';
634
+ label: SlotContent;
635
+ icon?: SlotContent;
636
+ /** Display-only shortcut hint, e.g. `'⌘S'`. */
637
+ shortcut?: string;
638
+ /** Style as destructive, and mark it in the accessible name. */
639
+ danger?: boolean;
640
+ onSelect?: () => void;
641
+ }
642
+ interface MenuCheckbox extends MenuItemBase {
643
+ type: 'checkbox';
644
+ label: SlotContent;
645
+ checked: boolean;
646
+ onChange: (checked: boolean) => void;
647
+ shortcut?: string;
648
+ }
649
+ interface MenuRadioGroup {
650
+ type: 'radio';
651
+ value: string;
652
+ onChange: (value: string) => void;
653
+ options: ReadonlyArray<{
654
+ value: string;
655
+ label: SlotContent;
656
+ disabled?: boolean;
657
+ }>;
658
+ }
659
+ interface MenuSubmenu extends MenuItemBase {
660
+ type: 'submenu';
661
+ label: SlotContent;
662
+ icon?: SlotContent;
663
+ items: readonly MenuEntry[];
664
+ }
665
+ type MenuEntry = MenuAction | MenuCheckbox | MenuRadioGroup | MenuSubmenu | {
666
+ type: 'separator';
667
+ } | {
668
+ type: 'label';
669
+ label: SlotContent;
670
+ };
671
+ /**
672
+ * A dropdown menu.
673
+ *
674
+ * ```vue
675
+ * <DropdownMenu :items="[
676
+ * { label: 'Edit', shortcut: '⌘E', onSelect: edit },
677
+ * { type: 'separator' },
678
+ * { label: 'Delete', danger: true, onSelect: remove },
679
+ * ]">
680
+ * <IconButton label="Actions" />
681
+ * </DropdownMenu>
682
+ * ```
683
+ */
684
+ declare const DropdownMenu: vue.DefineComponent<vue.ExtractPropTypes<{
685
+ items: {
686
+ type: PropType<readonly MenuEntry[]>;
687
+ required: true;
688
+ };
689
+ placement: {
690
+ type: PropType<Placement>;
691
+ default: string;
692
+ };
693
+ /** Accessible name for the menu itself. */
694
+ label: {
695
+ type: StringConstructor;
696
+ default: string;
697
+ };
698
+ open: {
699
+ type: BooleanConstructor;
700
+ default: undefined;
701
+ };
702
+ defaultOpen: {
703
+ type: BooleanConstructor;
704
+ default: boolean;
705
+ };
706
+ }>, () => VNode<vue.RendererNode, vue.RendererElement, {
707
+ [key: string]: any;
708
+ }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, "update:open"[], "update:open", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
709
+ items: {
710
+ type: PropType<readonly MenuEntry[]>;
711
+ required: true;
712
+ };
713
+ placement: {
714
+ type: PropType<Placement>;
715
+ default: string;
716
+ };
717
+ /** Accessible name for the menu itself. */
718
+ label: {
719
+ type: StringConstructor;
720
+ default: string;
721
+ };
722
+ open: {
723
+ type: BooleanConstructor;
724
+ default: undefined;
725
+ };
726
+ defaultOpen: {
727
+ type: BooleanConstructor;
728
+ default: boolean;
729
+ };
730
+ }>> & Readonly<{
731
+ "onUpdate:open"?: ((...args: any[]) => any) | undefined;
732
+ }>, {
733
+ label: string;
734
+ open: boolean;
735
+ placement: Placement;
736
+ defaultOpen: boolean;
737
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
738
+ /**
739
+ * A right-click menu.
740
+ *
741
+ * Also opens on the **context-menu key** and on Shift+F10, which is how keyboard users reach one —
742
+ * a right-click-only implementation is inaccessible, and it is the most commonly missed keyboard
743
+ * binding in the whole component set.
744
+ *
745
+ * Anchored to the pointer via a zero-size virtual rect, so the existing positioning code flips and
746
+ * shifts it near the viewport edges without needing a separate path.
747
+ */
748
+ declare const ContextMenu: vue.DefineComponent<vue.ExtractPropTypes<{
749
+ items: {
750
+ type: PropType<readonly MenuEntry[]>;
751
+ required: true;
752
+ };
753
+ label: {
754
+ type: StringConstructor;
755
+ default: string;
756
+ };
757
+ }>, () => VNode<vue.RendererNode, vue.RendererElement, {
758
+ [key: string]: any;
759
+ }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
760
+ items: {
761
+ type: PropType<readonly MenuEntry[]>;
762
+ required: true;
763
+ };
764
+ label: {
765
+ type: StringConstructor;
766
+ default: string;
767
+ };
768
+ }>> & Readonly<{}>, {
769
+ label: string;
770
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
771
+
772
+ export { AlertDialog, ContextMenu, Dialog, DialogFooter, type DialogSize, Drawer, type DrawerSide, DropdownMenu, HoverCard, type MenuAction, type MenuCheckbox, type MenuEntry, type MenuRadioGroup, type MenuSubmenu, Popover, PopoverContent, PopoverTrigger, Tooltip, TooltipProvider };