@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,729 @@
|
|
|
1
|
+
import * as vue from 'vue';
|
|
2
|
+
import { PropType, VNode } 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
|
+
/**
|
|
7
|
+
* Layout primitives — the Vue counterpart of `@ansh-ui/react`'s layout components.
|
|
8
|
+
*
|
|
9
|
+
* These exist because every application rebuilds them, badly. The rebuilt versions hardcode gaps in
|
|
10
|
+
* pixels, so they don't respond to a density setting; they use margins, so they collapse
|
|
11
|
+
* unpredictably; and they don't handle the RTL case.
|
|
12
|
+
*
|
|
13
|
+
* Everything here takes a **token key**, not a raw value: `:gap="4"` means `--ansh-space-4`, so a
|
|
14
|
+
* layout is guaranteed to sit on the spacing scale. Passing an arbitrary string is still possible for
|
|
15
|
+
* the genuine one-off, but the type nudges toward the scale first.
|
|
16
|
+
*
|
|
17
|
+
* Every component here declares only its own props and renders with `inheritAttrs: false` plus a
|
|
18
|
+
* manual `class`/`style`/rest spread, so native attributes not declared as props (`id`, `data-*`, a
|
|
19
|
+
* `@click` listener) fall through onto the rendered element automatically — the same convention
|
|
20
|
+
* `Input` and `PopoverContent` use elsewhere in this package.
|
|
21
|
+
*/
|
|
22
|
+
/** A key into the spacing scale, or a raw CSS length for the rare exception. */
|
|
23
|
+
type SpaceToken = 0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 16 | 20 | 24 | (string & {});
|
|
24
|
+
/**
|
|
25
|
+
* A CSS `align-items`/`justify-content` value, typed as a plain string rather than
|
|
26
|
+
* `CSSProperties['alignItems']`/`['justifyContent']`.
|
|
27
|
+
*
|
|
28
|
+
* The indexed-access csstype type is structurally correct but not **portable**: embedding it in an
|
|
29
|
+
* exported component's props makes TypeScript's declaration emitter need to name an internal
|
|
30
|
+
* `csstype` package type by its pnpm store path, which a consumer's project can't resolve and fails
|
|
31
|
+
* the build with TS2742 ("cannot be named without a reference to .pnpm/csstype@.../csstype"). A
|
|
32
|
+
* plain string loses autocomplete for the handful of valid values; the runtime behaviour — the
|
|
33
|
+
* string flows straight into the style property — is identical.
|
|
34
|
+
*/
|
|
35
|
+
type FlexAlign = string;
|
|
36
|
+
interface StackProps {
|
|
37
|
+
as?: string;
|
|
38
|
+
/** Default `'vertical'` — the direction that needs a helper more often. */
|
|
39
|
+
direction?: 'horizontal' | 'vertical';
|
|
40
|
+
gap?: SpaceToken;
|
|
41
|
+
align?: FlexAlign;
|
|
42
|
+
justify?: FlexAlign;
|
|
43
|
+
wrap?: boolean;
|
|
44
|
+
/** Grow to fill the cross axis. */
|
|
45
|
+
stretch?: boolean;
|
|
46
|
+
/** Insert a hairline divider between children. */
|
|
47
|
+
divide?: boolean;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* One-dimensional flex layout.
|
|
51
|
+
*
|
|
52
|
+
* ```vue
|
|
53
|
+
* <Stack direction="horizontal" :gap="3" align="center">
|
|
54
|
+
* <Avatar :src="user.avatar" :name="user.name" />
|
|
55
|
+
* <Stack :gap="0.5">
|
|
56
|
+
* <strong>{{ user.name }}</strong>
|
|
57
|
+
* <Text tone="secondary">{{ user.email }}</Text>
|
|
58
|
+
* </Stack>
|
|
59
|
+
* </Stack>
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
62
|
+
declare const Stack: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
63
|
+
direction: {
|
|
64
|
+
type: PropType<"horizontal" | "vertical">;
|
|
65
|
+
default: string;
|
|
66
|
+
};
|
|
67
|
+
as: {
|
|
68
|
+
type: StringConstructor;
|
|
69
|
+
default: string;
|
|
70
|
+
};
|
|
71
|
+
gap: {
|
|
72
|
+
type: PropType<SpaceToken>;
|
|
73
|
+
default: number;
|
|
74
|
+
};
|
|
75
|
+
align: {
|
|
76
|
+
type: PropType<FlexAlign>;
|
|
77
|
+
default: undefined;
|
|
78
|
+
};
|
|
79
|
+
justify: {
|
|
80
|
+
type: PropType<FlexAlign>;
|
|
81
|
+
default: undefined;
|
|
82
|
+
};
|
|
83
|
+
wrap: {
|
|
84
|
+
type: BooleanConstructor;
|
|
85
|
+
default: boolean;
|
|
86
|
+
};
|
|
87
|
+
stretch: {
|
|
88
|
+
type: BooleanConstructor;
|
|
89
|
+
default: boolean;
|
|
90
|
+
};
|
|
91
|
+
divide: {
|
|
92
|
+
type: BooleanConstructor;
|
|
93
|
+
default: boolean;
|
|
94
|
+
};
|
|
95
|
+
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
96
|
+
[key: string]: any;
|
|
97
|
+
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
98
|
+
direction: {
|
|
99
|
+
type: PropType<"horizontal" | "vertical">;
|
|
100
|
+
default: string;
|
|
101
|
+
};
|
|
102
|
+
as: {
|
|
103
|
+
type: StringConstructor;
|
|
104
|
+
default: string;
|
|
105
|
+
};
|
|
106
|
+
gap: {
|
|
107
|
+
type: PropType<SpaceToken>;
|
|
108
|
+
default: number;
|
|
109
|
+
};
|
|
110
|
+
align: {
|
|
111
|
+
type: PropType<FlexAlign>;
|
|
112
|
+
default: undefined;
|
|
113
|
+
};
|
|
114
|
+
justify: {
|
|
115
|
+
type: PropType<FlexAlign>;
|
|
116
|
+
default: undefined;
|
|
117
|
+
};
|
|
118
|
+
wrap: {
|
|
119
|
+
type: BooleanConstructor;
|
|
120
|
+
default: boolean;
|
|
121
|
+
};
|
|
122
|
+
stretch: {
|
|
123
|
+
type: BooleanConstructor;
|
|
124
|
+
default: boolean;
|
|
125
|
+
};
|
|
126
|
+
divide: {
|
|
127
|
+
type: BooleanConstructor;
|
|
128
|
+
default: boolean;
|
|
129
|
+
};
|
|
130
|
+
}>> & Readonly<{}>, {
|
|
131
|
+
as: string;
|
|
132
|
+
direction: "horizontal" | "vertical";
|
|
133
|
+
gap: SpaceToken;
|
|
134
|
+
wrap: boolean;
|
|
135
|
+
align: string;
|
|
136
|
+
stretch: boolean;
|
|
137
|
+
justify: string;
|
|
138
|
+
divide: boolean;
|
|
139
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
140
|
+
/** Horizontal `Stack`, for readability at call sites. */
|
|
141
|
+
declare const HStack: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
142
|
+
as: {
|
|
143
|
+
type: StringConstructor;
|
|
144
|
+
default: string;
|
|
145
|
+
};
|
|
146
|
+
gap: {
|
|
147
|
+
type: PropType<SpaceToken>;
|
|
148
|
+
default: number;
|
|
149
|
+
};
|
|
150
|
+
align: {
|
|
151
|
+
type: PropType<FlexAlign>;
|
|
152
|
+
default: undefined;
|
|
153
|
+
};
|
|
154
|
+
justify: {
|
|
155
|
+
type: PropType<FlexAlign>;
|
|
156
|
+
default: undefined;
|
|
157
|
+
};
|
|
158
|
+
wrap: {
|
|
159
|
+
type: BooleanConstructor;
|
|
160
|
+
default: boolean;
|
|
161
|
+
};
|
|
162
|
+
stretch: {
|
|
163
|
+
type: BooleanConstructor;
|
|
164
|
+
default: boolean;
|
|
165
|
+
};
|
|
166
|
+
divide: {
|
|
167
|
+
type: BooleanConstructor;
|
|
168
|
+
default: boolean;
|
|
169
|
+
};
|
|
170
|
+
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
171
|
+
[key: string]: any;
|
|
172
|
+
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
173
|
+
as: {
|
|
174
|
+
type: StringConstructor;
|
|
175
|
+
default: string;
|
|
176
|
+
};
|
|
177
|
+
gap: {
|
|
178
|
+
type: PropType<SpaceToken>;
|
|
179
|
+
default: number;
|
|
180
|
+
};
|
|
181
|
+
align: {
|
|
182
|
+
type: PropType<FlexAlign>;
|
|
183
|
+
default: undefined;
|
|
184
|
+
};
|
|
185
|
+
justify: {
|
|
186
|
+
type: PropType<FlexAlign>;
|
|
187
|
+
default: undefined;
|
|
188
|
+
};
|
|
189
|
+
wrap: {
|
|
190
|
+
type: BooleanConstructor;
|
|
191
|
+
default: boolean;
|
|
192
|
+
};
|
|
193
|
+
stretch: {
|
|
194
|
+
type: BooleanConstructor;
|
|
195
|
+
default: boolean;
|
|
196
|
+
};
|
|
197
|
+
divide: {
|
|
198
|
+
type: BooleanConstructor;
|
|
199
|
+
default: boolean;
|
|
200
|
+
};
|
|
201
|
+
}>> & Readonly<{}>, {
|
|
202
|
+
as: string;
|
|
203
|
+
gap: SpaceToken;
|
|
204
|
+
wrap: boolean;
|
|
205
|
+
align: string;
|
|
206
|
+
stretch: boolean;
|
|
207
|
+
justify: string;
|
|
208
|
+
divide: boolean;
|
|
209
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
210
|
+
/** Vertical `Stack`, for symmetry with `HStack`. */
|
|
211
|
+
declare const VStack: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
212
|
+
as: {
|
|
213
|
+
type: StringConstructor;
|
|
214
|
+
default: string;
|
|
215
|
+
};
|
|
216
|
+
gap: {
|
|
217
|
+
type: PropType<SpaceToken>;
|
|
218
|
+
default: number;
|
|
219
|
+
};
|
|
220
|
+
align: {
|
|
221
|
+
type: PropType<FlexAlign>;
|
|
222
|
+
default: undefined;
|
|
223
|
+
};
|
|
224
|
+
justify: {
|
|
225
|
+
type: PropType<FlexAlign>;
|
|
226
|
+
default: undefined;
|
|
227
|
+
};
|
|
228
|
+
wrap: {
|
|
229
|
+
type: BooleanConstructor;
|
|
230
|
+
default: boolean;
|
|
231
|
+
};
|
|
232
|
+
stretch: {
|
|
233
|
+
type: BooleanConstructor;
|
|
234
|
+
default: boolean;
|
|
235
|
+
};
|
|
236
|
+
divide: {
|
|
237
|
+
type: BooleanConstructor;
|
|
238
|
+
default: boolean;
|
|
239
|
+
};
|
|
240
|
+
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
241
|
+
[key: string]: any;
|
|
242
|
+
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
243
|
+
as: {
|
|
244
|
+
type: StringConstructor;
|
|
245
|
+
default: string;
|
|
246
|
+
};
|
|
247
|
+
gap: {
|
|
248
|
+
type: PropType<SpaceToken>;
|
|
249
|
+
default: number;
|
|
250
|
+
};
|
|
251
|
+
align: {
|
|
252
|
+
type: PropType<FlexAlign>;
|
|
253
|
+
default: undefined;
|
|
254
|
+
};
|
|
255
|
+
justify: {
|
|
256
|
+
type: PropType<FlexAlign>;
|
|
257
|
+
default: undefined;
|
|
258
|
+
};
|
|
259
|
+
wrap: {
|
|
260
|
+
type: BooleanConstructor;
|
|
261
|
+
default: boolean;
|
|
262
|
+
};
|
|
263
|
+
stretch: {
|
|
264
|
+
type: BooleanConstructor;
|
|
265
|
+
default: boolean;
|
|
266
|
+
};
|
|
267
|
+
divide: {
|
|
268
|
+
type: BooleanConstructor;
|
|
269
|
+
default: boolean;
|
|
270
|
+
};
|
|
271
|
+
}>> & Readonly<{}>, {
|
|
272
|
+
as: string;
|
|
273
|
+
gap: SpaceToken;
|
|
274
|
+
wrap: boolean;
|
|
275
|
+
align: string;
|
|
276
|
+
stretch: boolean;
|
|
277
|
+
justify: string;
|
|
278
|
+
divide: boolean;
|
|
279
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
280
|
+
interface GridProps {
|
|
281
|
+
as?: string;
|
|
282
|
+
/** Fixed column count, or `'auto'` for a responsive `auto-fill` track. */
|
|
283
|
+
columns?: number | 'auto';
|
|
284
|
+
/** Minimum column width when `columns="auto"`. Default `'16rem'`. */
|
|
285
|
+
minColumnWidth?: string;
|
|
286
|
+
gap?: SpaceToken;
|
|
287
|
+
/** Row gap, when it should differ from the column gap. */
|
|
288
|
+
rowGap?: SpaceToken;
|
|
289
|
+
align?: FlexAlign;
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* Two-dimensional layout.
|
|
293
|
+
*
|
|
294
|
+
* `columns="auto"` uses `repeat(auto-fill, minmax(min(N, 100%), 1fr))`. The inner `min()` is what
|
|
295
|
+
* stops the grid overflowing on a phone: without it, a 16rem minimum on a 15rem-wide viewport
|
|
296
|
+
* produces a track wider than the screen and a horizontal scrollbar.
|
|
297
|
+
*/
|
|
298
|
+
declare const Grid: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
299
|
+
as: {
|
|
300
|
+
type: StringConstructor;
|
|
301
|
+
default: string;
|
|
302
|
+
};
|
|
303
|
+
columns: {
|
|
304
|
+
type: PropType<number | "auto">;
|
|
305
|
+
default: string;
|
|
306
|
+
};
|
|
307
|
+
minColumnWidth: {
|
|
308
|
+
type: StringConstructor;
|
|
309
|
+
default: string;
|
|
310
|
+
};
|
|
311
|
+
gap: {
|
|
312
|
+
type: PropType<SpaceToken>;
|
|
313
|
+
default: number;
|
|
314
|
+
};
|
|
315
|
+
rowGap: {
|
|
316
|
+
type: PropType<SpaceToken>;
|
|
317
|
+
default: undefined;
|
|
318
|
+
};
|
|
319
|
+
align: {
|
|
320
|
+
type: PropType<FlexAlign>;
|
|
321
|
+
default: undefined;
|
|
322
|
+
};
|
|
323
|
+
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
324
|
+
[key: string]: any;
|
|
325
|
+
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
326
|
+
as: {
|
|
327
|
+
type: StringConstructor;
|
|
328
|
+
default: string;
|
|
329
|
+
};
|
|
330
|
+
columns: {
|
|
331
|
+
type: PropType<number | "auto">;
|
|
332
|
+
default: string;
|
|
333
|
+
};
|
|
334
|
+
minColumnWidth: {
|
|
335
|
+
type: StringConstructor;
|
|
336
|
+
default: string;
|
|
337
|
+
};
|
|
338
|
+
gap: {
|
|
339
|
+
type: PropType<SpaceToken>;
|
|
340
|
+
default: number;
|
|
341
|
+
};
|
|
342
|
+
rowGap: {
|
|
343
|
+
type: PropType<SpaceToken>;
|
|
344
|
+
default: undefined;
|
|
345
|
+
};
|
|
346
|
+
align: {
|
|
347
|
+
type: PropType<FlexAlign>;
|
|
348
|
+
default: undefined;
|
|
349
|
+
};
|
|
350
|
+
}>> & Readonly<{}>, {
|
|
351
|
+
as: string;
|
|
352
|
+
gap: SpaceToken;
|
|
353
|
+
align: string;
|
|
354
|
+
columns: number | "auto";
|
|
355
|
+
minColumnWidth: string;
|
|
356
|
+
rowGap: SpaceToken;
|
|
357
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
358
|
+
interface GridItemProps {
|
|
359
|
+
as?: string;
|
|
360
|
+
/** Columns to span. `'full'` spans the whole row. */
|
|
361
|
+
span?: number | 'full';
|
|
362
|
+
rowSpan?: number;
|
|
363
|
+
}
|
|
364
|
+
declare const GridItem: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
365
|
+
as: {
|
|
366
|
+
type: StringConstructor;
|
|
367
|
+
default: string;
|
|
368
|
+
};
|
|
369
|
+
span: {
|
|
370
|
+
type: PropType<number | "full">;
|
|
371
|
+
default: undefined;
|
|
372
|
+
};
|
|
373
|
+
rowSpan: {
|
|
374
|
+
type: NumberConstructor;
|
|
375
|
+
default: undefined;
|
|
376
|
+
};
|
|
377
|
+
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
378
|
+
[key: string]: any;
|
|
379
|
+
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
380
|
+
as: {
|
|
381
|
+
type: StringConstructor;
|
|
382
|
+
default: string;
|
|
383
|
+
};
|
|
384
|
+
span: {
|
|
385
|
+
type: PropType<number | "full">;
|
|
386
|
+
default: undefined;
|
|
387
|
+
};
|
|
388
|
+
rowSpan: {
|
|
389
|
+
type: NumberConstructor;
|
|
390
|
+
default: undefined;
|
|
391
|
+
};
|
|
392
|
+
}>> & Readonly<{}>, {
|
|
393
|
+
as: string;
|
|
394
|
+
span: number | "full";
|
|
395
|
+
rowSpan: number;
|
|
396
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
397
|
+
interface ContainerProps {
|
|
398
|
+
as?: string;
|
|
399
|
+
/** Max content width. Default `'lg'` (72rem). */
|
|
400
|
+
size?: 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
401
|
+
/** Horizontal padding. Default `6`. */
|
|
402
|
+
padding?: SpaceToken;
|
|
403
|
+
}
|
|
404
|
+
/** Centred, width-constrained page content. */
|
|
405
|
+
declare const Container: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
406
|
+
as: {
|
|
407
|
+
type: StringConstructor;
|
|
408
|
+
default: string;
|
|
409
|
+
};
|
|
410
|
+
size: {
|
|
411
|
+
type: PropType<"sm" | "md" | "lg" | "xl" | "full">;
|
|
412
|
+
default: string;
|
|
413
|
+
};
|
|
414
|
+
padding: {
|
|
415
|
+
type: PropType<SpaceToken>;
|
|
416
|
+
default: number;
|
|
417
|
+
};
|
|
418
|
+
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
419
|
+
[key: string]: any;
|
|
420
|
+
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
421
|
+
as: {
|
|
422
|
+
type: StringConstructor;
|
|
423
|
+
default: string;
|
|
424
|
+
};
|
|
425
|
+
size: {
|
|
426
|
+
type: PropType<"sm" | "md" | "lg" | "xl" | "full">;
|
|
427
|
+
default: string;
|
|
428
|
+
};
|
|
429
|
+
padding: {
|
|
430
|
+
type: PropType<SpaceToken>;
|
|
431
|
+
default: number;
|
|
432
|
+
};
|
|
433
|
+
}>> & Readonly<{}>, {
|
|
434
|
+
size: "full" | "sm" | "md" | "lg" | "xl";
|
|
435
|
+
as: string;
|
|
436
|
+
padding: SpaceToken;
|
|
437
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
438
|
+
interface DividerProps {
|
|
439
|
+
orientation?: 'horizontal' | 'vertical';
|
|
440
|
+
/** Optional label rendered in the middle of the rule. */
|
|
441
|
+
label?: SlotContent;
|
|
442
|
+
}
|
|
443
|
+
/**
|
|
444
|
+
* A rule.
|
|
445
|
+
*
|
|
446
|
+
* With a label it becomes a labelled separator — the "or continue with" divider on a sign-in form.
|
|
447
|
+
* `role="separator"` is set only when there's no label; with one, it's a heading-like element and
|
|
448
|
+
* announcing it as a separator loses the text.
|
|
449
|
+
*
|
|
450
|
+
* Renders a plain `<div>` regardless of what `as` a caller might pass, matching
|
|
451
|
+
* `@ansh-ui/react`'s `Divider` — which declares `as` on its props type via `BaseProps` but never
|
|
452
|
+
* actually reads it, always rendering a literal `<div>`. Not declaring `as` here reproduces that
|
|
453
|
+
* quirk exactly: an `as` attribute would simply fall through as an inert HTML attribute, same as it
|
|
454
|
+
* does in React.
|
|
455
|
+
*/
|
|
456
|
+
declare const Divider: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
457
|
+
orientation: {
|
|
458
|
+
type: PropType<"horizontal" | "vertical">;
|
|
459
|
+
default: string;
|
|
460
|
+
};
|
|
461
|
+
label: {
|
|
462
|
+
type: PropType<SlotContent>;
|
|
463
|
+
default: undefined;
|
|
464
|
+
};
|
|
465
|
+
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
466
|
+
[key: string]: any;
|
|
467
|
+
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
468
|
+
orientation: {
|
|
469
|
+
type: PropType<"horizontal" | "vertical">;
|
|
470
|
+
default: string;
|
|
471
|
+
};
|
|
472
|
+
label: {
|
|
473
|
+
type: PropType<SlotContent>;
|
|
474
|
+
default: undefined;
|
|
475
|
+
};
|
|
476
|
+
}>> & Readonly<{}>, {
|
|
477
|
+
label: SlotContent;
|
|
478
|
+
orientation: "horizontal" | "vertical";
|
|
479
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
480
|
+
interface SpacerProps {
|
|
481
|
+
size?: SpaceToken;
|
|
482
|
+
/** Grow to absorb free space in a flex container. */
|
|
483
|
+
grow?: boolean;
|
|
484
|
+
}
|
|
485
|
+
/** Explicit empty space. `grow` pushes siblings apart in a flex row. */
|
|
486
|
+
declare const Spacer: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
487
|
+
size: {
|
|
488
|
+
type: PropType<SpaceToken>;
|
|
489
|
+
default: undefined;
|
|
490
|
+
};
|
|
491
|
+
grow: {
|
|
492
|
+
type: BooleanConstructor;
|
|
493
|
+
default: boolean;
|
|
494
|
+
};
|
|
495
|
+
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
496
|
+
[key: string]: any;
|
|
497
|
+
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
498
|
+
size: {
|
|
499
|
+
type: PropType<SpaceToken>;
|
|
500
|
+
default: undefined;
|
|
501
|
+
};
|
|
502
|
+
grow: {
|
|
503
|
+
type: BooleanConstructor;
|
|
504
|
+
default: boolean;
|
|
505
|
+
};
|
|
506
|
+
}>> & Readonly<{}>, {
|
|
507
|
+
size: SpaceToken;
|
|
508
|
+
grow: boolean;
|
|
509
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
510
|
+
interface CenterProps {
|
|
511
|
+
as?: string;
|
|
512
|
+
}
|
|
513
|
+
/** Centre a child on both axes. */
|
|
514
|
+
declare const Center: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
515
|
+
as: {
|
|
516
|
+
type: StringConstructor;
|
|
517
|
+
default: string;
|
|
518
|
+
};
|
|
519
|
+
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
520
|
+
[key: string]: any;
|
|
521
|
+
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
522
|
+
as: {
|
|
523
|
+
type: StringConstructor;
|
|
524
|
+
default: string;
|
|
525
|
+
};
|
|
526
|
+
}>> & Readonly<{}>, {
|
|
527
|
+
as: string;
|
|
528
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
529
|
+
interface AspectRatioProps {
|
|
530
|
+
as?: string;
|
|
531
|
+
/** Width ÷ height. `16 / 9` reads better than `1.777`. Default `16 / 9`. */
|
|
532
|
+
ratio?: number;
|
|
533
|
+
}
|
|
534
|
+
/**
|
|
535
|
+
* Reserve space at a fixed aspect ratio.
|
|
536
|
+
*
|
|
537
|
+
* Uses the `aspect-ratio` property rather than the padding-top hack. The reserved space is what
|
|
538
|
+
* matters: an image that loads without it shifts everything below, which is a Cumulative Layout
|
|
539
|
+
* Shift penalty and the most common cause of a failing Core Web Vitals score.
|
|
540
|
+
*/
|
|
541
|
+
declare const AspectRatio: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
542
|
+
as: {
|
|
543
|
+
type: StringConstructor;
|
|
544
|
+
default: string;
|
|
545
|
+
};
|
|
546
|
+
ratio: {
|
|
547
|
+
type: NumberConstructor;
|
|
548
|
+
default: number;
|
|
549
|
+
};
|
|
550
|
+
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
551
|
+
[key: string]: any;
|
|
552
|
+
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
553
|
+
as: {
|
|
554
|
+
type: StringConstructor;
|
|
555
|
+
default: string;
|
|
556
|
+
};
|
|
557
|
+
ratio: {
|
|
558
|
+
type: NumberConstructor;
|
|
559
|
+
default: number;
|
|
560
|
+
};
|
|
561
|
+
}>> & Readonly<{}>, {
|
|
562
|
+
as: string;
|
|
563
|
+
ratio: number;
|
|
564
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
565
|
+
interface ScrollAreaProps {
|
|
566
|
+
as?: string;
|
|
567
|
+
/** Max height before scrolling starts. */
|
|
568
|
+
maxHeight?: string;
|
|
569
|
+
axis?: 'y' | 'x' | 'both';
|
|
570
|
+
/** Fade the content at the scrollable edges. Default `true`. */
|
|
571
|
+
fade?: boolean;
|
|
572
|
+
}
|
|
573
|
+
/**
|
|
574
|
+
* A scroll container with styled scrollbars and edge fades.
|
|
575
|
+
*
|
|
576
|
+
* The native scrollbar is kept — a JavaScript-rendered one breaks keyboard scrolling, mobile
|
|
577
|
+
* momentum, and the OS "scroll bar is always visible" accessibility setting. It is only *styled*,
|
|
578
|
+
* via `scrollbar-width`/`scrollbar-color` with a `::-webkit-scrollbar` fallback.
|
|
579
|
+
*
|
|
580
|
+
* The edge fade is a mask that appears only when there is more content in that direction. It is
|
|
581
|
+
* driven by `animation-timeline: scroll()` where supported, so it costs nothing on the main thread
|
|
582
|
+
* and degrades to no fade where it isn't.
|
|
583
|
+
*/
|
|
584
|
+
declare const ScrollArea: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
585
|
+
as: {
|
|
586
|
+
type: StringConstructor;
|
|
587
|
+
default: string;
|
|
588
|
+
};
|
|
589
|
+
maxHeight: {
|
|
590
|
+
type: StringConstructor;
|
|
591
|
+
default: undefined;
|
|
592
|
+
};
|
|
593
|
+
axis: {
|
|
594
|
+
type: PropType<"y" | "x" | "both">;
|
|
595
|
+
default: string;
|
|
596
|
+
};
|
|
597
|
+
fade: {
|
|
598
|
+
type: BooleanConstructor;
|
|
599
|
+
default: boolean;
|
|
600
|
+
};
|
|
601
|
+
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
602
|
+
[key: string]: any;
|
|
603
|
+
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
604
|
+
as: {
|
|
605
|
+
type: StringConstructor;
|
|
606
|
+
default: string;
|
|
607
|
+
};
|
|
608
|
+
maxHeight: {
|
|
609
|
+
type: StringConstructor;
|
|
610
|
+
default: undefined;
|
|
611
|
+
};
|
|
612
|
+
axis: {
|
|
613
|
+
type: PropType<"y" | "x" | "both">;
|
|
614
|
+
default: string;
|
|
615
|
+
};
|
|
616
|
+
fade: {
|
|
617
|
+
type: BooleanConstructor;
|
|
618
|
+
default: boolean;
|
|
619
|
+
};
|
|
620
|
+
}>> & Readonly<{}>, {
|
|
621
|
+
as: string;
|
|
622
|
+
fade: boolean;
|
|
623
|
+
axis: "y" | "x" | "both";
|
|
624
|
+
maxHeight: string;
|
|
625
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
626
|
+
|
|
627
|
+
/**
|
|
628
|
+
* A two-pane split with a draggable divider — the Vue counterpart of `@ansh-ui/react`'s `Resizable`.
|
|
629
|
+
*
|
|
630
|
+
* The layout every IDE, mail client and admin console needs, and the one most often shipped as
|
|
631
|
+
* mouse-only. The handle here is a real `role="separator"` with `aria-valuenow`, and arrow keys move
|
|
632
|
+
* it in 2% steps — WAI-ARIA calls this a window splitter and it is a documented pattern, not an
|
|
633
|
+
* invention.
|
|
634
|
+
*
|
|
635
|
+
* Sizes are percentages rather than pixels so the split survives a window resize proportionally.
|
|
636
|
+
* Dragging writes to a CSS custom property directly, bypassing Vue's renderer: a re-render per
|
|
637
|
+
* pointer move makes the drag feel heavy on a complex page, and the value is only committed to state
|
|
638
|
+
* on release.
|
|
639
|
+
*
|
|
640
|
+
* `size`/`update:size` follow this package's controlled-prop convention (see `Popover`'s
|
|
641
|
+
* `open`/`update:open`), so `v-model:size` works for the controlled case; `onSizeChange` from the
|
|
642
|
+
* React version becomes the `update:size` emit.
|
|
643
|
+
*/
|
|
644
|
+
interface ResizableProps {
|
|
645
|
+
direction?: 'horizontal' | 'vertical';
|
|
646
|
+
/** First pane's size as a percentage, `0`–`100`. Default `50`. */
|
|
647
|
+
defaultSize?: number;
|
|
648
|
+
size?: number;
|
|
649
|
+
/** Clamp, as percentages. Defaults `10` and `90`. */
|
|
650
|
+
minSize?: number;
|
|
651
|
+
maxSize?: number;
|
|
652
|
+
/** Snap points in percent, e.g. `[25, 50, 75]`. Within 3% the handle snaps. */
|
|
653
|
+
snapPoints?: readonly number[];
|
|
654
|
+
/** Accessible name for the handle — "Resize sidebar", not "Resize". */
|
|
655
|
+
label?: string;
|
|
656
|
+
}
|
|
657
|
+
declare const Resizable: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
658
|
+
direction: {
|
|
659
|
+
type: PropType<"horizontal" | "vertical">;
|
|
660
|
+
default: string;
|
|
661
|
+
};
|
|
662
|
+
defaultSize: {
|
|
663
|
+
type: NumberConstructor;
|
|
664
|
+
default: number;
|
|
665
|
+
};
|
|
666
|
+
size: {
|
|
667
|
+
type: NumberConstructor;
|
|
668
|
+
default: undefined;
|
|
669
|
+
};
|
|
670
|
+
minSize: {
|
|
671
|
+
type: NumberConstructor;
|
|
672
|
+
default: number;
|
|
673
|
+
};
|
|
674
|
+
maxSize: {
|
|
675
|
+
type: NumberConstructor;
|
|
676
|
+
default: number;
|
|
677
|
+
};
|
|
678
|
+
snapPoints: {
|
|
679
|
+
type: PropType<readonly number[]>;
|
|
680
|
+
default: undefined;
|
|
681
|
+
};
|
|
682
|
+
label: {
|
|
683
|
+
type: StringConstructor;
|
|
684
|
+
default: string;
|
|
685
|
+
};
|
|
686
|
+
}>, () => VNode<vue.RendererNode, vue.RendererElement, {
|
|
687
|
+
[key: string]: any;
|
|
688
|
+
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, "update:size"[], "update:size", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
689
|
+
direction: {
|
|
690
|
+
type: PropType<"horizontal" | "vertical">;
|
|
691
|
+
default: string;
|
|
692
|
+
};
|
|
693
|
+
defaultSize: {
|
|
694
|
+
type: NumberConstructor;
|
|
695
|
+
default: number;
|
|
696
|
+
};
|
|
697
|
+
size: {
|
|
698
|
+
type: NumberConstructor;
|
|
699
|
+
default: undefined;
|
|
700
|
+
};
|
|
701
|
+
minSize: {
|
|
702
|
+
type: NumberConstructor;
|
|
703
|
+
default: number;
|
|
704
|
+
};
|
|
705
|
+
maxSize: {
|
|
706
|
+
type: NumberConstructor;
|
|
707
|
+
default: number;
|
|
708
|
+
};
|
|
709
|
+
snapPoints: {
|
|
710
|
+
type: PropType<readonly number[]>;
|
|
711
|
+
default: undefined;
|
|
712
|
+
};
|
|
713
|
+
label: {
|
|
714
|
+
type: StringConstructor;
|
|
715
|
+
default: string;
|
|
716
|
+
};
|
|
717
|
+
}>> & Readonly<{
|
|
718
|
+
"onUpdate:size"?: ((...args: any[]) => any) | undefined;
|
|
719
|
+
}>, {
|
|
720
|
+
size: number;
|
|
721
|
+
label: string;
|
|
722
|
+
direction: "horizontal" | "vertical";
|
|
723
|
+
defaultSize: number;
|
|
724
|
+
minSize: number;
|
|
725
|
+
maxSize: number;
|
|
726
|
+
snapPoints: readonly number[];
|
|
727
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
728
|
+
|
|
729
|
+
export { AspectRatio, type AspectRatioProps, Center, type CenterProps, Container, type ContainerProps, Divider, type DividerProps, Grid, GridItem, type GridItemProps, type GridProps, HStack, Resizable, type ResizableProps, ScrollArea, type ScrollAreaProps, type SpaceToken, Spacer, type SpacerProps, Stack, type StackProps, VStack };
|