@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,48 @@
1
+ 'use strict';
2
+
3
+ var chunkKCA7RNJ4_cjs = require('./chunk-KCA7RNJ4.cjs');
4
+ var chunkSHX2JGID_cjs = require('./chunk-SHX2JGID.cjs');
5
+ require('./chunk-EISHOEB6.cjs');
6
+ require('./chunk-774WBLDR.cjs');
7
+ require('./chunk-6732H4BQ.cjs');
8
+
9
+
10
+
11
+ Object.defineProperty(exports, "Accordion", {
12
+ enumerable: true,
13
+ get: function () { return chunkKCA7RNJ4_cjs.Accordion; }
14
+ });
15
+ Object.defineProperty(exports, "Breadcrumbs", {
16
+ enumerable: true,
17
+ get: function () { return chunkKCA7RNJ4_cjs.Breadcrumbs; }
18
+ });
19
+ Object.defineProperty(exports, "Collapsible", {
20
+ enumerable: true,
21
+ get: function () { return chunkKCA7RNJ4_cjs.Collapsible; }
22
+ });
23
+ Object.defineProperty(exports, "DisclosureList", {
24
+ enumerable: true,
25
+ get: function () { return chunkKCA7RNJ4_cjs.DisclosureList; }
26
+ });
27
+ Object.defineProperty(exports, "NavigationMenu", {
28
+ enumerable: true,
29
+ get: function () { return chunkKCA7RNJ4_cjs.NavigationMenu; }
30
+ });
31
+ Object.defineProperty(exports, "Stepper", {
32
+ enumerable: true,
33
+ get: function () { return chunkKCA7RNJ4_cjs.Stepper; }
34
+ });
35
+ Object.defineProperty(exports, "Tabs", {
36
+ enumerable: true,
37
+ get: function () { return chunkKCA7RNJ4_cjs.Tabs; }
38
+ });
39
+ Object.defineProperty(exports, "AppShell", {
40
+ enumerable: true,
41
+ get: function () { return chunkSHX2JGID_cjs.AppShell; }
42
+ });
43
+ Object.defineProperty(exports, "Sidebar", {
44
+ enumerable: true,
45
+ get: function () { return chunkSHX2JGID_cjs.Sidebar; }
46
+ });
47
+ //# sourceMappingURL=navigation.cjs.map
48
+ //# sourceMappingURL=navigation.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"navigation.cjs"}
@@ -0,0 +1,515 @@
1
+ import * as vue from 'vue';
2
+ import { PropType } from 'vue';
3
+ import { S as SlotContent } from './utils-IKPG3zcC.cjs';
4
+ export { A as AppShell, N as NavItem, a as NavSection, S as Sidebar } from './sidebar-CQqEmpid.cjs';
5
+
6
+ interface TabItem {
7
+ id: string;
8
+ label: SlotContent;
9
+ icon?: SlotContent;
10
+ /** Count or status shown after the label. */
11
+ badge?: SlotContent;
12
+ disabled?: boolean;
13
+ content?: SlotContent;
14
+ }
15
+ type TabsVariant = 'underline' | 'pill' | 'enclosed';
16
+ type TabsOrientation = 'horizontal' | 'vertical';
17
+ type TabsSize = 'sm' | 'md';
18
+ /**
19
+ * Tabs — the Vue counterpart of `@ansh-ui/react`'s `Tabs`.
20
+ *
21
+ * The full WAI-ARIA tab pattern: a single tab stop for the whole list (roving tabindex, via
22
+ * `useRovingFocus`), arrow keys to move between tabs, Home/End to jump to the ends, and
23
+ * `aria-controls`/`aria-labelledby` linking each tab to its panel in both directions.
24
+ *
25
+ * `useRovingFocus`'s `items` ref only receives an element for *enabled* tabs — a disabled tab's slot
26
+ * is left `null`, which is exactly what the hook filters out, so disabled tabs are skipped during
27
+ * arrow-key and Home/End navigation without any extra bookkeeping here.
28
+ *
29
+ * Panels are unmounted when inactive rather than hidden (the render function simply never creates
30
+ * the `v-if`-equivalent branch), matching the React version's reasoning: hiding keeps the whole tree
31
+ * mounted, so timers keep running, media keeps buffering and forms keep their state — the last of
32
+ * which sounds desirable until a hidden required field blocks submission with no visible error.
33
+ *
34
+ * `v-model` selects the active tab id. Leave it unbound with `default-value` for an uncontrolled
35
+ * tab bar.
36
+ */
37
+ declare const Tabs: vue.DefineComponent<vue.ExtractPropTypes<{
38
+ items: {
39
+ type: PropType<readonly TabItem[]>;
40
+ required: true;
41
+ };
42
+ modelValue: {
43
+ type: StringConstructor;
44
+ default: undefined;
45
+ };
46
+ defaultValue: {
47
+ type: StringConstructor;
48
+ default: undefined;
49
+ };
50
+ variant: {
51
+ type: PropType<TabsVariant>;
52
+ default: string;
53
+ };
54
+ orientation: {
55
+ type: PropType<TabsOrientation>;
56
+ default: string;
57
+ };
58
+ size: {
59
+ type: PropType<TabsSize>;
60
+ default: string;
61
+ };
62
+ /** Stretch tabs to fill the available width. */
63
+ fitted: {
64
+ type: BooleanConstructor;
65
+ default: boolean;
66
+ };
67
+ /**
68
+ * Activate on arrow-key focus, rather than requiring Enter/Space.
69
+ *
70
+ * Automatic is the ARIA-preferred default for cheap panels. Set `false` when switching a tab
71
+ * triggers a fetch — arrowing past three tabs would fire three requests.
72
+ */
73
+ activateOnFocus: {
74
+ type: BooleanConstructor;
75
+ default: boolean;
76
+ };
77
+ /** Accessible name for the tab list. */
78
+ label: {
79
+ type: StringConstructor;
80
+ required: true;
81
+ };
82
+ }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
83
+ [key: string]: any;
84
+ }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
85
+ items: {
86
+ type: PropType<readonly TabItem[]>;
87
+ required: true;
88
+ };
89
+ modelValue: {
90
+ type: StringConstructor;
91
+ default: undefined;
92
+ };
93
+ defaultValue: {
94
+ type: StringConstructor;
95
+ default: undefined;
96
+ };
97
+ variant: {
98
+ type: PropType<TabsVariant>;
99
+ default: string;
100
+ };
101
+ orientation: {
102
+ type: PropType<TabsOrientation>;
103
+ default: string;
104
+ };
105
+ size: {
106
+ type: PropType<TabsSize>;
107
+ default: string;
108
+ };
109
+ /** Stretch tabs to fill the available width. */
110
+ fitted: {
111
+ type: BooleanConstructor;
112
+ default: boolean;
113
+ };
114
+ /**
115
+ * Activate on arrow-key focus, rather than requiring Enter/Space.
116
+ *
117
+ * Automatic is the ARIA-preferred default for cheap panels. Set `false` when switching a tab
118
+ * triggers a fetch — arrowing past three tabs would fire three requests.
119
+ */
120
+ activateOnFocus: {
121
+ type: BooleanConstructor;
122
+ default: boolean;
123
+ };
124
+ /** Accessible name for the tab list. */
125
+ label: {
126
+ type: StringConstructor;
127
+ required: true;
128
+ };
129
+ }>> & Readonly<{
130
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
131
+ }>, {
132
+ size: TabsSize;
133
+ orientation: TabsOrientation;
134
+ modelValue: string;
135
+ defaultValue: string;
136
+ variant: TabsVariant;
137
+ fitted: boolean;
138
+ activateOnFocus: boolean;
139
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
140
+
141
+ interface Crumb {
142
+ label: SlotContent;
143
+ href?: string;
144
+ icon?: SlotContent;
145
+ onClick?: () => void;
146
+ }
147
+ /**
148
+ * A breadcrumb trail — the Vue counterpart of `@ansh-ui/react`'s `Breadcrumbs`.
149
+ *
150
+ * `<nav aria-label="Breadcrumb">` around an ordered list, with the last item marked
151
+ * `aria-current="page"` and rendered as text rather than a link. Making the current page a link to
152
+ * itself is a small thing that wastes a keyboard user's time on every page.
153
+ *
154
+ * Separators are `aria-hidden`, so the trail reads as "Home, Projects, Invoice 401" rather than
155
+ * "Home slash Projects slash".
156
+ */
157
+ declare const Breadcrumbs: vue.DefineComponent<vue.ExtractPropTypes<{
158
+ items: {
159
+ type: PropType<readonly Crumb[]>;
160
+ required: true;
161
+ };
162
+ /** Collapse the middle when there are more than this many. Default `Infinity`. */
163
+ maxItems: {
164
+ type: NumberConstructor;
165
+ default: number;
166
+ };
167
+ separator: {
168
+ type: PropType<SlotContent>;
169
+ default: undefined;
170
+ };
171
+ }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
172
+ [key: string]: any;
173
+ }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
174
+ items: {
175
+ type: PropType<readonly Crumb[]>;
176
+ required: true;
177
+ };
178
+ /** Collapse the middle when there are more than this many. Default `Infinity`. */
179
+ maxItems: {
180
+ type: NumberConstructor;
181
+ default: number;
182
+ };
183
+ separator: {
184
+ type: PropType<SlotContent>;
185
+ default: undefined;
186
+ };
187
+ }>> & Readonly<{}>, {
188
+ separator: SlotContent;
189
+ maxItems: number;
190
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
191
+ interface Step {
192
+ id: string;
193
+ label: SlotContent;
194
+ description?: SlotContent;
195
+ /** Marks the step failed — validation errors on a wizard page. */
196
+ error?: boolean;
197
+ /** Allow jumping to this step directly. */
198
+ clickable?: boolean;
199
+ }
200
+ type StepperOrientation = 'horizontal' | 'vertical';
201
+ /**
202
+ * A progress stepper for multi-page flows — checkout, onboarding, approvals.
203
+ *
204
+ * The state of each step is announced in text, not just drawn: `aria-current="step"` on the active
205
+ * one and a visually hidden "completed"/"current"/"not started" on each. A stepper that
206
+ * distinguishes its states with a tick glyph and a colour tells a screen-reader user nothing.
207
+ *
208
+ * `current` is always controlled by the caller — there is no uncontrolled mode, matching the React
209
+ * version. `update:current` fires (in addition to plain click handling) so `v-model:current` works
210
+ * for callers that want it.
211
+ */
212
+ declare const Stepper: vue.DefineComponent<vue.ExtractPropTypes<{
213
+ steps: {
214
+ type: PropType<readonly Step[]>;
215
+ required: true;
216
+ };
217
+ /** Index of the current step. Steps before it are complete. */
218
+ current: {
219
+ type: NumberConstructor;
220
+ required: true;
221
+ };
222
+ orientation: {
223
+ type: PropType<StepperOrientation>;
224
+ default: string;
225
+ };
226
+ }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
227
+ [key: string]: any;
228
+ }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, "update:current"[], "update:current", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
229
+ steps: {
230
+ type: PropType<readonly Step[]>;
231
+ required: true;
232
+ };
233
+ /** Index of the current step. Steps before it are complete. */
234
+ current: {
235
+ type: NumberConstructor;
236
+ required: true;
237
+ };
238
+ orientation: {
239
+ type: PropType<StepperOrientation>;
240
+ default: string;
241
+ };
242
+ }>> & Readonly<{
243
+ "onUpdate:current"?: ((...args: any[]) => any) | undefined;
244
+ }>, {
245
+ orientation: StepperOrientation;
246
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
247
+
248
+ interface MegaMenuLink {
249
+ id: string;
250
+ label: string;
251
+ description?: string;
252
+ href?: string;
253
+ icon?: SlotContent;
254
+ onClick?: () => void;
255
+ }
256
+ interface MegaMenuColumn {
257
+ id: string;
258
+ heading?: string;
259
+ links: readonly MegaMenuLink[];
260
+ }
261
+ interface NavMenuItem {
262
+ id: string;
263
+ label: string;
264
+ href?: string;
265
+ /** Columns of links. Presence of this makes the item a dropdown rather than a link. */
266
+ columns?: readonly MegaMenuColumn[];
267
+ /** Promoted panel on the right of the dropdown — a featured post, a CTA. */
268
+ feature?: SlotContent;
269
+ }
270
+ /**
271
+ * A site navigation bar with mega-menu dropdowns — the Vue counterpart of `@ansh-ui/react`'s
272
+ * `NavigationMenu` (exported under that name even though the file is `nav-menu.ts`, matching the
273
+ * React source).
274
+ *
275
+ * The pattern marketing sites need and the one most likely to be built with hover alone. This one:
276
+ *
277
+ * - opens on hover **and** on click/Enter, so it works with a keyboard and on touch;
278
+ * - keeps the panel open while the pointer travels toward it, via a close delay;
279
+ * - closes on Escape, returning focus to the trigger;
280
+ * - marks each trigger `aria-expanded` and links it to its panel with `aria-controls`.
281
+ *
282
+ * The panel is a plain absolutely-positioned element rather than a `Teleport`. A mega menu is
283
+ * full-width and anchored to the bar, not to a point, so a portal's viewport-relative positioning
284
+ * would fight the layout rather than help it — the same reasoning the React version documents.
285
+ */
286
+ declare const NavigationMenu: vue.DefineComponent<vue.ExtractPropTypes<{
287
+ items: {
288
+ type: PropType<readonly NavMenuItem[]>;
289
+ required: true;
290
+ };
291
+ label: {
292
+ type: StringConstructor;
293
+ default: string;
294
+ };
295
+ }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
296
+ [key: string]: any;
297
+ }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
298
+ items: {
299
+ type: PropType<readonly NavMenuItem[]>;
300
+ required: true;
301
+ };
302
+ label: {
303
+ type: StringConstructor;
304
+ default: string;
305
+ };
306
+ }>> & Readonly<{}>, {
307
+ label: string;
308
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
309
+
310
+ /**
311
+ * Disclosure widgets — the Vue counterpart of `@ansh-ui/react`'s `disclosure.tsx`.
312
+ *
313
+ * The animation here is the interesting part. Height cannot be transitioned to `auto`, so the usual
314
+ * workarounds are measuring the content with JavaScript (a forced layout on every toggle, and wrong
315
+ * the moment the content reflows) or a `max-height` guess (which either clips tall content or makes
316
+ * short content ease over an invisible gap, so the timing looks wrong).
317
+ *
318
+ * `grid-template-rows: 0fr → 1fr` transitions to the content's intrinsic height with no JavaScript
319
+ * and no magic numbers — pure CSS keyed off the `data-state` attribute these components set. It
320
+ * needs the extra wrapper with `min-height: 0` — without that the grid child refuses to shrink below
321
+ * its content size and nothing animates. See `packages/react/src/styles/navigation.css`'s
322
+ * `.ansh-collapsible__region` / `.ansh-accordion__region` rules for the mechanism itself; nothing on the
323
+ * Vue side has to know about it beyond setting the same attribute.
324
+ */
325
+ interface CollapsibleProps {
326
+ open?: boolean;
327
+ defaultOpen?: boolean;
328
+ trigger: SlotContent;
329
+ /** Render the trigger as-is rather than wrapping it in the styled button row. */
330
+ bare?: boolean;
331
+ }
332
+ /**
333
+ * A single show/hide region.
334
+ *
335
+ * `v-model:open` (or `default-open` for an uncontrolled one) drives the disclosed state, routed
336
+ * through `useControllableState` exactly like `Accordion`'s open-item set below.
337
+ */
338
+ declare const Collapsible: vue.DefineComponent<vue.ExtractPropTypes<{
339
+ open: {
340
+ type: BooleanConstructor;
341
+ default: undefined;
342
+ };
343
+ defaultOpen: {
344
+ type: BooleanConstructor;
345
+ default: boolean;
346
+ };
347
+ trigger: {
348
+ type: PropType<SlotContent>;
349
+ required: true;
350
+ };
351
+ bare: {
352
+ type: BooleanConstructor;
353
+ default: boolean;
354
+ };
355
+ }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
356
+ [key: string]: any;
357
+ }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, "update:open"[], "update:open", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
358
+ open: {
359
+ type: BooleanConstructor;
360
+ default: undefined;
361
+ };
362
+ defaultOpen: {
363
+ type: BooleanConstructor;
364
+ default: boolean;
365
+ };
366
+ trigger: {
367
+ type: PropType<SlotContent>;
368
+ required: true;
369
+ };
370
+ bare: {
371
+ type: BooleanConstructor;
372
+ default: boolean;
373
+ };
374
+ }>> & Readonly<{
375
+ "onUpdate:open"?: ((...args: any[]) => any) | undefined;
376
+ }>, {
377
+ open: boolean;
378
+ defaultOpen: boolean;
379
+ bare: boolean;
380
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
381
+ interface AccordionItem {
382
+ id: string;
383
+ title: SlotContent;
384
+ /** Secondary line under the title. */
385
+ subtitle?: SlotContent;
386
+ icon?: SlotContent;
387
+ disabled?: boolean;
388
+ content: SlotContent;
389
+ }
390
+ type AccordionVariant = 'bordered' | 'separated' | 'plain';
391
+ /**
392
+ * A stack of collapsible sections — the Vue counterpart of `@ansh-ui/react`'s `Accordion`.
393
+ *
394
+ * Headings are real `<h3>` elements wrapping the button, which is the ARIA-recommended structure: a
395
+ * screen-reader user navigating by heading finds each section, and the button inside carries the
396
+ * expanded state. A `<div>` with `role="button"` looks identical and is invisible to heading
397
+ * navigation.
398
+ *
399
+ * Arrow keys move between headers, and Home/End jump to the ends, via `useRovingFocus` bound to the
400
+ * accordion root. Unlike `Tabs`, this is *not* a single-tab-stop composite — every header stays in
401
+ * the normal Tab order (no `tabindex` is set on them at all), matching the ARIA APG accordion
402
+ * pattern, where arrow keys are an addition to Tab rather than a replacement for it.
403
+ * `useRovingFocus`'s `active()` getter is derived from `document.activeElement` rather than a stored
404
+ * index for exactly that reason — there is no single "selected" header the way `Tabs` has a selected
405
+ * tab, only whichever header currently has focus.
406
+ *
407
+ * `v-model` (or `default-value` for an uncontrolled accordion) is the array of open item ids, exactly
408
+ * like the React version's `value`/`defaultValue`.
409
+ */
410
+ declare const Accordion: vue.DefineComponent<vue.ExtractPropTypes<{
411
+ items: {
412
+ type: PropType<readonly AccordionItem[]>;
413
+ required: true;
414
+ };
415
+ /** Allow several panels open at once. Default `false`. */
416
+ multiple: {
417
+ type: BooleanConstructor;
418
+ default: boolean;
419
+ };
420
+ modelValue: {
421
+ type: PropType<readonly string[]>;
422
+ default: undefined;
423
+ };
424
+ defaultValue: {
425
+ type: PropType<readonly string[]>;
426
+ default: () => never[];
427
+ };
428
+ variant: {
429
+ type: PropType<AccordionVariant>;
430
+ default: string;
431
+ };
432
+ }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
433
+ [key: string]: any;
434
+ }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
435
+ items: {
436
+ type: PropType<readonly AccordionItem[]>;
437
+ required: true;
438
+ };
439
+ /** Allow several panels open at once. Default `false`. */
440
+ multiple: {
441
+ type: BooleanConstructor;
442
+ default: boolean;
443
+ };
444
+ modelValue: {
445
+ type: PropType<readonly string[]>;
446
+ default: undefined;
447
+ };
448
+ defaultValue: {
449
+ type: PropType<readonly string[]>;
450
+ default: () => never[];
451
+ };
452
+ variant: {
453
+ type: PropType<AccordionVariant>;
454
+ default: string;
455
+ };
456
+ }>> & Readonly<{
457
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
458
+ }>, {
459
+ modelValue: readonly string[];
460
+ defaultValue: readonly string[];
461
+ multiple: boolean;
462
+ variant: AccordionVariant;
463
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
464
+ interface DisclosureListProps {
465
+ /** Simple show-more list — the pattern for "N more items". */
466
+ items: readonly SlotContent[];
467
+ /** How many to show before collapsing. Default `3`. */
468
+ initial?: number;
469
+ moreLabel?: (hidden: number) => string;
470
+ lessLabel?: string;
471
+ }
472
+ /** Show a few items with a "show N more" toggle. */
473
+ declare const DisclosureList: vue.DefineComponent<vue.ExtractPropTypes<{
474
+ items: {
475
+ type: PropType<readonly SlotContent[]>;
476
+ required: true;
477
+ };
478
+ initial: {
479
+ type: NumberConstructor;
480
+ default: number;
481
+ };
482
+ moreLabel: {
483
+ type: PropType<(hidden: number) => string>;
484
+ default: (hidden: number) => string;
485
+ };
486
+ lessLabel: {
487
+ type: StringConstructor;
488
+ default: string;
489
+ };
490
+ }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
491
+ [key: string]: any;
492
+ }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
493
+ items: {
494
+ type: PropType<readonly SlotContent[]>;
495
+ required: true;
496
+ };
497
+ initial: {
498
+ type: NumberConstructor;
499
+ default: number;
500
+ };
501
+ moreLabel: {
502
+ type: PropType<(hidden: number) => string>;
503
+ default: (hidden: number) => string;
504
+ };
505
+ lessLabel: {
506
+ type: StringConstructor;
507
+ default: string;
508
+ };
509
+ }>> & Readonly<{}>, {
510
+ initial: number;
511
+ moreLabel: (hidden: number) => string;
512
+ lessLabel: string;
513
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
514
+
515
+ export { Accordion, type AccordionItem, type AccordionVariant, Breadcrumbs, Collapsible, type CollapsibleProps, type Crumb, DisclosureList, type DisclosureListProps, type MegaMenuColumn, type MegaMenuLink, type NavMenuItem, NavigationMenu, type Step, Stepper, type StepperOrientation, type TabItem, Tabs, type TabsOrientation, type TabsSize, type TabsVariant };