@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.
- package/LICENSE +21 -0
- package/dist/chunk-2VSROZ2N.js +1281 -0
- package/dist/chunk-2VSROZ2N.js.map +1 -0
- package/dist/chunk-5BQEZYG6.cjs +1294 -0
- package/dist/chunk-5BQEZYG6.cjs.map +1 -0
- package/dist/chunk-6732H4BQ.cjs +28 -0
- package/dist/chunk-6732H4BQ.cjs.map +1 -0
- package/dist/chunk-6ABPGOJP.js +722 -0
- package/dist/chunk-6ABPGOJP.js.map +1 -0
- package/dist/chunk-6XJOB6LE.js +62 -0
- package/dist/chunk-6XJOB6LE.js.map +1 -0
- package/dist/chunk-774WBLDR.cjs +24 -0
- package/dist/chunk-774WBLDR.cjs.map +1 -0
- package/dist/chunk-B6OXKW5Q.js +567 -0
- package/dist/chunk-B6OXKW5Q.js.map +1 -0
- package/dist/chunk-DMPNT3MY.cjs +64 -0
- package/dist/chunk-DMPNT3MY.cjs.map +1 -0
- package/dist/chunk-EISHOEB6.cjs +158 -0
- package/dist/chunk-EISHOEB6.cjs.map +1 -0
- package/dist/chunk-EVO23GUS.js +223 -0
- package/dist/chunk-EVO23GUS.js.map +1 -0
- package/dist/chunk-FVKLCGA4.js +1035 -0
- package/dist/chunk-FVKLCGA4.js.map +1 -0
- package/dist/chunk-IOXGBPOV.cjs +3681 -0
- package/dist/chunk-IOXGBPOV.cjs.map +1 -0
- package/dist/chunk-J2LA4GRP.cjs +1051 -0
- package/dist/chunk-J2LA4GRP.cjs.map +1 -0
- package/dist/chunk-JQ4YLXXM.cjs +580 -0
- package/dist/chunk-JQ4YLXXM.cjs.map +1 -0
- package/dist/chunk-KCA7RNJ4.cjs +781 -0
- package/dist/chunk-KCA7RNJ4.cjs.map +1 -0
- package/dist/chunk-NJDDNO4C.js +23 -0
- package/dist/chunk-NJDDNO4C.js.map +1 -0
- package/dist/chunk-OAQ7MDYX.js +22 -0
- package/dist/chunk-OAQ7MDYX.js.map +1 -0
- package/dist/chunk-PP6OYURM.cjs +238 -0
- package/dist/chunk-PP6OYURM.cjs.map +1 -0
- package/dist/chunk-SHX2JGID.cjs +269 -0
- package/dist/chunk-SHX2JGID.cjs.map +1 -0
- package/dist/chunk-SOYRICHU.js +3645 -0
- package/dist/chunk-SOYRICHU.js.map +1 -0
- package/dist/chunk-T425FIC7.js +773 -0
- package/dist/chunk-T425FIC7.js.map +1 -0
- package/dist/chunk-TMG3M6TK.js +152 -0
- package/dist/chunk-TMG3M6TK.js.map +1 -0
- package/dist/chunk-XLLSS464.cjs +286 -0
- package/dist/chunk-XLLSS464.cjs.map +1 -0
- package/dist/chunk-XZ5ZFLZM.js +280 -0
- package/dist/chunk-XZ5ZFLZM.js.map +1 -0
- package/dist/chunk-Z7XOFKM4.cjs +733 -0
- package/dist/chunk-Z7XOFKM4.cjs.map +1 -0
- package/dist/chunk-ZGMXOMCB.js +266 -0
- package/dist/chunk-ZGMXOMCB.js.map +1 -0
- package/dist/data.cjs +70 -0
- package/dist/data.cjs.map +1 -0
- package/dist/data.d.cts +963 -0
- package/dist/data.d.ts +963 -0
- package/dist/data.js +5 -0
- package/dist/data.js.map +1 -0
- package/dist/form.cjs +151 -0
- package/dist/form.cjs.map +1 -0
- package/dist/form.d.cts +2639 -0
- package/dist/form.d.ts +2639 -0
- package/dist/form.js +6 -0
- package/dist/form.js.map +1 -0
- package/dist/index.cjs +1158 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +439 -0
- package/dist/index.d.ts +439 -0
- package/dist/index.js +547 -0
- package/dist/index.js.map +1 -0
- package/dist/layout.cjs +67 -0
- package/dist/layout.cjs.map +1 -0
- package/dist/layout.d.cts +729 -0
- package/dist/layout.d.ts +729 -0
- package/dist/layout.js +6 -0
- package/dist/layout.js.map +1 -0
- package/dist/motion.cjs +50 -0
- package/dist/motion.cjs.map +1 -0
- package/dist/motion.d.cts +681 -0
- package/dist/motion.d.ts +681 -0
- package/dist/motion.js +5 -0
- package/dist/motion.js.map +1 -0
- package/dist/navigation.cjs +48 -0
- package/dist/navigation.cjs.map +1 -0
- package/dist/navigation.d.cts +515 -0
- package/dist/navigation.d.ts +515 -0
- package/dist/navigation.js +7 -0
- package/dist/navigation.js.map +1 -0
- package/dist/overlay.cjs +61 -0
- package/dist/overlay.cjs.map +1 -0
- package/dist/overlay.d.cts +772 -0
- package/dist/overlay.d.ts +772 -0
- package/dist/overlay.js +8 -0
- package/dist/overlay.js.map +1 -0
- package/dist/position-Cn7qP1pn.d.cts +50 -0
- package/dist/position-Cn7qP1pn.d.ts +50 -0
- package/dist/primitives.cjs +129 -0
- package/dist/primitives.cjs.map +1 -0
- package/dist/primitives.d.cts +300 -0
- package/dist/primitives.d.ts +300 -0
- package/dist/primitives.js +8 -0
- package/dist/primitives.js.map +1 -0
- package/dist/sidebar-CQqEmpid.d.cts +124 -0
- package/dist/sidebar-CTZ-Ckko.d.ts +124 -0
- package/dist/styles.css +5593 -0
- package/dist/utils-IKPG3zcC.d.cts +46 -0
- package/dist/utils-IKPG3zcC.d.ts +46 -0
- package/package.json +91 -0
|
@@ -0,0 +1,515 @@
|
|
|
1
|
+
import * as vue from 'vue';
|
|
2
|
+
import { PropType } from 'vue';
|
|
3
|
+
import { S as SlotContent } from './utils-IKPG3zcC.js';
|
|
4
|
+
export { A as AppShell, N as NavItem, a as NavSection, S as Sidebar } from './sidebar-CTZ-Ckko.js';
|
|
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 };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { Accordion, Breadcrumbs, Collapsible, DisclosureList, NavigationMenu, Stepper, Tabs } from './chunk-T425FIC7.js';
|
|
2
|
+
export { AppShell, Sidebar } from './chunk-ZGMXOMCB.js';
|
|
3
|
+
import './chunk-TMG3M6TK.js';
|
|
4
|
+
import './chunk-OAQ7MDYX.js';
|
|
5
|
+
import './chunk-NJDDNO4C.js';
|
|
6
|
+
//# sourceMappingURL=navigation.js.map
|
|
7
|
+
//# sourceMappingURL=navigation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"navigation.js"}
|
package/dist/overlay.cjs
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunk5BQEZYG6_cjs = require('./chunk-5BQEZYG6.cjs');
|
|
4
|
+
require('./chunk-DMPNT3MY.cjs');
|
|
5
|
+
require('./chunk-XLLSS464.cjs');
|
|
6
|
+
require('./chunk-EISHOEB6.cjs');
|
|
7
|
+
require('./chunk-774WBLDR.cjs');
|
|
8
|
+
require('./chunk-6732H4BQ.cjs');
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
Object.defineProperty(exports, "AlertDialog", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () { return chunk5BQEZYG6_cjs.AlertDialog; }
|
|
15
|
+
});
|
|
16
|
+
Object.defineProperty(exports, "ContextMenu", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () { return chunk5BQEZYG6_cjs.ContextMenu; }
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(exports, "Dialog", {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function () { return chunk5BQEZYG6_cjs.Dialog; }
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "DialogFooter", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () { return chunk5BQEZYG6_cjs.DialogFooter; }
|
|
27
|
+
});
|
|
28
|
+
Object.defineProperty(exports, "Drawer", {
|
|
29
|
+
enumerable: true,
|
|
30
|
+
get: function () { return chunk5BQEZYG6_cjs.Drawer; }
|
|
31
|
+
});
|
|
32
|
+
Object.defineProperty(exports, "DropdownMenu", {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () { return chunk5BQEZYG6_cjs.DropdownMenu; }
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(exports, "HoverCard", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () { return chunk5BQEZYG6_cjs.HoverCard; }
|
|
39
|
+
});
|
|
40
|
+
Object.defineProperty(exports, "Popover", {
|
|
41
|
+
enumerable: true,
|
|
42
|
+
get: function () { return chunk5BQEZYG6_cjs.Popover; }
|
|
43
|
+
});
|
|
44
|
+
Object.defineProperty(exports, "PopoverContent", {
|
|
45
|
+
enumerable: true,
|
|
46
|
+
get: function () { return chunk5BQEZYG6_cjs.PopoverContent; }
|
|
47
|
+
});
|
|
48
|
+
Object.defineProperty(exports, "PopoverTrigger", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function () { return chunk5BQEZYG6_cjs.PopoverTrigger; }
|
|
51
|
+
});
|
|
52
|
+
Object.defineProperty(exports, "Tooltip", {
|
|
53
|
+
enumerable: true,
|
|
54
|
+
get: function () { return chunk5BQEZYG6_cjs.Tooltip; }
|
|
55
|
+
});
|
|
56
|
+
Object.defineProperty(exports, "TooltipProvider", {
|
|
57
|
+
enumerable: true,
|
|
58
|
+
get: function () { return chunk5BQEZYG6_cjs.TooltipProvider; }
|
|
59
|
+
});
|
|
60
|
+
//# sourceMappingURL=overlay.cjs.map
|
|
61
|
+
//# sourceMappingURL=overlay.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"overlay.cjs"}
|