@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
package/dist/data.d.cts
ADDED
|
@@ -0,0 +1,963 @@
|
|
|
1
|
+
import * as vue from 'vue';
|
|
2
|
+
import { VNodeChild, PropType, VNode } from 'vue';
|
|
3
|
+
import { S as SlotContent } from './utils-IKPG3zcC.cjs';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Tables — the Vue counterpart of `@ansh-ui/react`'s `Table`/`DataTable`.
|
|
7
|
+
*
|
|
8
|
+
* A real `<table>` with `<th scope>`, not a grid of divs. The semantics are the entire point: a
|
|
9
|
+
* screen reader announces "Column 3 of 7, Status, row 12" only if the markup says so. Every
|
|
10
|
+
* div-based table reimplements navigation badly or not at all, and the CSS argument for divs
|
|
11
|
+
* disappeared when `display: contents` and `position: sticky` landed.
|
|
12
|
+
*
|
|
13
|
+
* `DataTable` adds sorting, selection and pagination on top. It stays deliberately short of a full
|
|
14
|
+
* data grid — no virtualisation, no column resizing, no pinned regions. Those need a different
|
|
15
|
+
* architecture (windowing, measured columns), and half-implementing them produces a component that
|
|
16
|
+
* breaks at exactly the scale it was added for.
|
|
17
|
+
*
|
|
18
|
+
* `DataTable` is generic over the row type `T`, which Vue only supports for a plain (non-SFC)
|
|
19
|
+
* component through `defineComponent`'s "generic setup function" overload — the setup function
|
|
20
|
+
* itself stays generic (`<T,>(props: DataTableProps<T>, ctx) => …`) while the runtime `props` list
|
|
21
|
+
* is a plain array of keys. That trade means no per-prop runtime validation or default-value
|
|
22
|
+
* coercion (booleans aren't coerced from attribute presence, defaults are applied by hand inside
|
|
23
|
+
* `setup`, mirroring the destructured defaults the React version uses) — acceptable here because the
|
|
24
|
+
* real contract for a data-shaped component like this is the TypeScript signature, not template
|
|
25
|
+
* shorthand.
|
|
26
|
+
*/
|
|
27
|
+
type SortDirection = 'asc' | 'desc';
|
|
28
|
+
interface SortState {
|
|
29
|
+
columnId: string;
|
|
30
|
+
direction: SortDirection;
|
|
31
|
+
}
|
|
32
|
+
interface Column<T> {
|
|
33
|
+
id: string;
|
|
34
|
+
header: SlotContent;
|
|
35
|
+
/** Render the cell. Receives the row and its index. */
|
|
36
|
+
cell: (row: T, index: number) => VNodeChild;
|
|
37
|
+
/** Allow sorting by this column. */
|
|
38
|
+
sortable?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Value used for the default comparator. Without it a sortable column falls back to comparing
|
|
41
|
+
* rendered output, which sorts "10" before "9".
|
|
42
|
+
*/
|
|
43
|
+
sortValue?: (row: T) => string | number | Date | null | undefined;
|
|
44
|
+
align?: 'start' | 'center' | 'end';
|
|
45
|
+
/** Any CSS width — `'12rem'`, `'25%'`, `'minmax(8rem, 1fr)'`. */
|
|
46
|
+
width?: string;
|
|
47
|
+
/** Hide below this breakpoint. Uses the token breakpoints. */
|
|
48
|
+
hideBelow?: 'sm' | 'md' | 'lg';
|
|
49
|
+
/** Short label announced instead of a complex header. */
|
|
50
|
+
ariaLabel?: string;
|
|
51
|
+
}
|
|
52
|
+
interface DataTableProps<T> {
|
|
53
|
+
data: readonly T[];
|
|
54
|
+
columns: ReadonlyArray<Column<T>>;
|
|
55
|
+
/** Stable row identity. Required — array index breaks selection the moment rows reorder. */
|
|
56
|
+
getRowId: (row: T) => string;
|
|
57
|
+
/** Describes the table for screen readers. Rendered as a visually hidden `<caption>`. */
|
|
58
|
+
caption: string;
|
|
59
|
+
/** Row checkboxes plus a header select-all. */
|
|
60
|
+
selectable?: boolean;
|
|
61
|
+
/** `v-model:selected` — omit for an uncontrolled table that owns its own selection. */
|
|
62
|
+
selected?: readonly string[];
|
|
63
|
+
/** `v-model:sort` — omit for an uncontrolled table that owns its own sort state. */
|
|
64
|
+
sort?: SortState | null;
|
|
65
|
+
defaultSort?: SortState | null;
|
|
66
|
+
/** Rows per page. Omit to render everything. */
|
|
67
|
+
pageSize?: number;
|
|
68
|
+
/** `v-model:page` — omit for an uncontrolled table that owns its own page. */
|
|
69
|
+
page?: number;
|
|
70
|
+
/** Show skeleton rows. */
|
|
71
|
+
loading?: boolean;
|
|
72
|
+
/** Rendered in place of the body when there are no rows. */
|
|
73
|
+
emptyState?: SlotContent;
|
|
74
|
+
onRowClick?: (row: T) => void;
|
|
75
|
+
/** Keep the header visible while the body scrolls. */
|
|
76
|
+
stickyHeader?: boolean;
|
|
77
|
+
density?: 'comfortable' | 'compact';
|
|
78
|
+
/** Zebra striping. Off by default — borders read as cleaner at density. */
|
|
79
|
+
striped?: boolean;
|
|
80
|
+
/** Per-row extra class, for status highlighting. */
|
|
81
|
+
rowClassName?: (row: T) => string | undefined;
|
|
82
|
+
}
|
|
83
|
+
declare const DataTable: new <T>(props: DataTableProps<T> & {
|
|
84
|
+
"onUpdate:sort"?: ((...args: any[]) => any) | undefined;
|
|
85
|
+
"onUpdate:selected"?: ((...args: any[]) => any) | undefined;
|
|
86
|
+
"onUpdate:page"?: ((...args: any[]) => any) | undefined;
|
|
87
|
+
} & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps) => vue.CreateComponentPublicInstanceWithMixins<DataTableProps<T> & {
|
|
88
|
+
"onUpdate:sort"?: ((...args: any[]) => any) | undefined;
|
|
89
|
+
"onUpdate:selected"?: ((...args: any[]) => any) | undefined;
|
|
90
|
+
"onUpdate:page"?: ((...args: any[]) => any) | undefined;
|
|
91
|
+
}, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("update:sort" | "update:selected" | "update:page")[], vue.PublicProps, {}, false, {}, {}, {}, {}, string, {}, any, vue.ComponentProvideOptions, {
|
|
92
|
+
P: {};
|
|
93
|
+
B: {};
|
|
94
|
+
D: {};
|
|
95
|
+
C: {};
|
|
96
|
+
M: {};
|
|
97
|
+
Defaults: {};
|
|
98
|
+
}, DataTableProps<T> & {
|
|
99
|
+
"onUpdate:sort"?: ((...args: any[]) => any) | undefined;
|
|
100
|
+
"onUpdate:selected"?: ((...args: any[]) => any) | undefined;
|
|
101
|
+
"onUpdate:page"?: ((...args: any[]) => any) | undefined;
|
|
102
|
+
}, {}, {}, {}, {}, {}>;
|
|
103
|
+
interface PaginationProps {
|
|
104
|
+
/** Zero-based. */
|
|
105
|
+
page: number;
|
|
106
|
+
pageCount: number;
|
|
107
|
+
onPageChange: (page: number) => void;
|
|
108
|
+
/** Total row count, for the "1–20 of 340" summary. */
|
|
109
|
+
total?: number;
|
|
110
|
+
pageSize?: number;
|
|
111
|
+
/** Page buttons either side of the current one. Default `1`. */
|
|
112
|
+
siblings?: number;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Page navigation.
|
|
116
|
+
*
|
|
117
|
+
* `<nav>` with an ordered list, because that is what a pager is — a list of links to positions in a
|
|
118
|
+
* sequence. The current page is marked `aria-current="page"`, which is how a screen reader user
|
|
119
|
+
* knows where they are without counting buttons.
|
|
120
|
+
*
|
|
121
|
+
* The ellipsis is `aria-hidden`; announcing "ellipsis" between page 3 and page 12 conveys nothing
|
|
122
|
+
* that the numbers don't already.
|
|
123
|
+
*
|
|
124
|
+
* Fully controlled, same as the React version — there is no internal page state to fall back to, so
|
|
125
|
+
* `onPageChange` stays a plain callback prop rather than a `v-model`-style emit.
|
|
126
|
+
*/
|
|
127
|
+
declare const Pagination: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
128
|
+
page: {
|
|
129
|
+
type: NumberConstructor;
|
|
130
|
+
required: true;
|
|
131
|
+
};
|
|
132
|
+
pageCount: {
|
|
133
|
+
type: NumberConstructor;
|
|
134
|
+
required: true;
|
|
135
|
+
};
|
|
136
|
+
onPageChange: {
|
|
137
|
+
type: PropType<(page: number) => void>;
|
|
138
|
+
required: true;
|
|
139
|
+
};
|
|
140
|
+
total: {
|
|
141
|
+
type: NumberConstructor;
|
|
142
|
+
default: undefined;
|
|
143
|
+
};
|
|
144
|
+
pageSize: {
|
|
145
|
+
type: NumberConstructor;
|
|
146
|
+
default: undefined;
|
|
147
|
+
};
|
|
148
|
+
siblings: {
|
|
149
|
+
type: NumberConstructor;
|
|
150
|
+
default: number;
|
|
151
|
+
};
|
|
152
|
+
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
153
|
+
[key: string]: any;
|
|
154
|
+
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
155
|
+
page: {
|
|
156
|
+
type: NumberConstructor;
|
|
157
|
+
required: true;
|
|
158
|
+
};
|
|
159
|
+
pageCount: {
|
|
160
|
+
type: NumberConstructor;
|
|
161
|
+
required: true;
|
|
162
|
+
};
|
|
163
|
+
onPageChange: {
|
|
164
|
+
type: PropType<(page: number) => void>;
|
|
165
|
+
required: true;
|
|
166
|
+
};
|
|
167
|
+
total: {
|
|
168
|
+
type: NumberConstructor;
|
|
169
|
+
default: undefined;
|
|
170
|
+
};
|
|
171
|
+
pageSize: {
|
|
172
|
+
type: NumberConstructor;
|
|
173
|
+
default: undefined;
|
|
174
|
+
};
|
|
175
|
+
siblings: {
|
|
176
|
+
type: NumberConstructor;
|
|
177
|
+
default: number;
|
|
178
|
+
};
|
|
179
|
+
}>> & Readonly<{}>, {
|
|
180
|
+
pageSize: number;
|
|
181
|
+
total: number;
|
|
182
|
+
siblings: number;
|
|
183
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
184
|
+
/** A plain styled table, for content that isn't driven by data props. */
|
|
185
|
+
declare const Table: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
186
|
+
caption: {
|
|
187
|
+
type: StringConstructor;
|
|
188
|
+
default: undefined;
|
|
189
|
+
};
|
|
190
|
+
density: {
|
|
191
|
+
type: PropType<"comfortable" | "compact">;
|
|
192
|
+
default: string;
|
|
193
|
+
};
|
|
194
|
+
striped: {
|
|
195
|
+
type: BooleanConstructor;
|
|
196
|
+
default: boolean;
|
|
197
|
+
};
|
|
198
|
+
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
199
|
+
[key: string]: any;
|
|
200
|
+
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
201
|
+
caption: {
|
|
202
|
+
type: StringConstructor;
|
|
203
|
+
default: undefined;
|
|
204
|
+
};
|
|
205
|
+
density: {
|
|
206
|
+
type: PropType<"comfortable" | "compact">;
|
|
207
|
+
default: string;
|
|
208
|
+
};
|
|
209
|
+
striped: {
|
|
210
|
+
type: BooleanConstructor;
|
|
211
|
+
default: boolean;
|
|
212
|
+
};
|
|
213
|
+
}>> & Readonly<{}>, {
|
|
214
|
+
caption: string;
|
|
215
|
+
density: "comfortable" | "compact";
|
|
216
|
+
striped: boolean;
|
|
217
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* Small display components — the Vue counterpart of `@ansh-ui/react`'s data-display primitives.
|
|
221
|
+
*
|
|
222
|
+
* Individually trivial, collectively most of what an application screen is made of. The care here
|
|
223
|
+
* goes into the details that get skipped: a badge whose meaning isn't carried by colour alone, an
|
|
224
|
+
* avatar whose fallback initials are readable against a generated background, an empty state that
|
|
225
|
+
* says what to do next rather than just "no data".
|
|
226
|
+
*/
|
|
227
|
+
type BadgeTone = 'neutral' | 'accent' | 'success' | 'warning' | 'danger' | 'info';
|
|
228
|
+
/**
|
|
229
|
+
* A status label.
|
|
230
|
+
*
|
|
231
|
+
* Every badge carries its meaning in **text**, not just colour. A red badge reading "Failed" works
|
|
232
|
+
* for everyone; a red dot alone works for nobody using a screen reader and for the ~4% of the
|
|
233
|
+
* population with a colour vision deficiency. The `dot` is decorative reinforcement.
|
|
234
|
+
*
|
|
235
|
+
* `children` in the React version becomes the default slot here. Badge extends `HTMLAttributes` in
|
|
236
|
+
* React, so — unlike the rest of this file — arbitrary native attributes fall through, not just
|
|
237
|
+
* `class`.
|
|
238
|
+
*/
|
|
239
|
+
declare const Badge: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
240
|
+
tone: {
|
|
241
|
+
type: PropType<BadgeTone>;
|
|
242
|
+
default: string;
|
|
243
|
+
};
|
|
244
|
+
variant: {
|
|
245
|
+
type: PropType<"soft" | "solid" | "outline">;
|
|
246
|
+
default: string;
|
|
247
|
+
};
|
|
248
|
+
size: {
|
|
249
|
+
type: PropType<"sm" | "md">;
|
|
250
|
+
default: string;
|
|
251
|
+
};
|
|
252
|
+
/** Leading dot. Useful for statuses where the label is short. */
|
|
253
|
+
dot: {
|
|
254
|
+
type: BooleanConstructor;
|
|
255
|
+
default: boolean;
|
|
256
|
+
};
|
|
257
|
+
icon: {
|
|
258
|
+
type: PropType<SlotContent>;
|
|
259
|
+
default: undefined;
|
|
260
|
+
};
|
|
261
|
+
}>, () => VNode<vue.RendererNode, vue.RendererElement, {
|
|
262
|
+
[key: string]: any;
|
|
263
|
+
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
264
|
+
tone: {
|
|
265
|
+
type: PropType<BadgeTone>;
|
|
266
|
+
default: string;
|
|
267
|
+
};
|
|
268
|
+
variant: {
|
|
269
|
+
type: PropType<"soft" | "solid" | "outline">;
|
|
270
|
+
default: string;
|
|
271
|
+
};
|
|
272
|
+
size: {
|
|
273
|
+
type: PropType<"sm" | "md">;
|
|
274
|
+
default: string;
|
|
275
|
+
};
|
|
276
|
+
/** Leading dot. Useful for statuses where the label is short. */
|
|
277
|
+
dot: {
|
|
278
|
+
type: BooleanConstructor;
|
|
279
|
+
default: boolean;
|
|
280
|
+
};
|
|
281
|
+
icon: {
|
|
282
|
+
type: PropType<SlotContent>;
|
|
283
|
+
default: undefined;
|
|
284
|
+
};
|
|
285
|
+
}>> & Readonly<{}>, {
|
|
286
|
+
size: "sm" | "md";
|
|
287
|
+
icon: SlotContent;
|
|
288
|
+
variant: "soft" | "outline" | "solid";
|
|
289
|
+
tone: BadgeTone;
|
|
290
|
+
dot: boolean;
|
|
291
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
292
|
+
interface AvatarProps {
|
|
293
|
+
src?: string;
|
|
294
|
+
/** The person's name. Used for the alt text and to derive the fallback initials. */
|
|
295
|
+
name: string;
|
|
296
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
297
|
+
shape?: 'circle' | 'square';
|
|
298
|
+
/** Presence indicator. */
|
|
299
|
+
status?: 'online' | 'offline' | 'busy' | 'away';
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* Avatar extends `HTMLAttributes` in React too, so arbitrary attributes fall through here as well.
|
|
303
|
+
*
|
|
304
|
+
* The fallback colour is derived from the name via `@ansh-ui/core`'s colour engine, then the *text*
|
|
305
|
+
* colour is chosen for contrast against it with `pickReadable` — reused rather than reimplemented, as
|
|
306
|
+
* required. Picking a random background and hardcoding white text is how you get illegible initials
|
|
307
|
+
* on a pale hue, and it is the most common avatar bug there is.
|
|
308
|
+
*/
|
|
309
|
+
declare const Avatar: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
310
|
+
src: {
|
|
311
|
+
type: StringConstructor;
|
|
312
|
+
default: undefined;
|
|
313
|
+
};
|
|
314
|
+
name: {
|
|
315
|
+
type: StringConstructor;
|
|
316
|
+
required: true;
|
|
317
|
+
};
|
|
318
|
+
size: {
|
|
319
|
+
type: PropType<"xs" | "sm" | "md" | "lg" | "xl">;
|
|
320
|
+
default: string;
|
|
321
|
+
};
|
|
322
|
+
shape: {
|
|
323
|
+
type: PropType<"circle" | "square">;
|
|
324
|
+
default: string;
|
|
325
|
+
};
|
|
326
|
+
status: {
|
|
327
|
+
type: PropType<"online" | "offline" | "busy" | "away">;
|
|
328
|
+
default: undefined;
|
|
329
|
+
};
|
|
330
|
+
}>, () => VNode<vue.RendererNode, vue.RendererElement, {
|
|
331
|
+
[key: string]: any;
|
|
332
|
+
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
333
|
+
src: {
|
|
334
|
+
type: StringConstructor;
|
|
335
|
+
default: undefined;
|
|
336
|
+
};
|
|
337
|
+
name: {
|
|
338
|
+
type: StringConstructor;
|
|
339
|
+
required: true;
|
|
340
|
+
};
|
|
341
|
+
size: {
|
|
342
|
+
type: PropType<"xs" | "sm" | "md" | "lg" | "xl">;
|
|
343
|
+
default: string;
|
|
344
|
+
};
|
|
345
|
+
shape: {
|
|
346
|
+
type: PropType<"circle" | "square">;
|
|
347
|
+
default: string;
|
|
348
|
+
};
|
|
349
|
+
status: {
|
|
350
|
+
type: PropType<"online" | "offline" | "busy" | "away">;
|
|
351
|
+
default: undefined;
|
|
352
|
+
};
|
|
353
|
+
}>> & Readonly<{}>, {
|
|
354
|
+
size: "sm" | "md" | "lg" | "xl" | "xs";
|
|
355
|
+
src: string;
|
|
356
|
+
status: "offline" | "online" | "busy" | "away";
|
|
357
|
+
shape: "circle" | "square";
|
|
358
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
359
|
+
/** Overlapping avatars with an overflow count. */
|
|
360
|
+
declare const AvatarGroup: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
361
|
+
/** Maximum shown before collapsing into a "+N" chip. Default `4`. */
|
|
362
|
+
max: {
|
|
363
|
+
type: NumberConstructor;
|
|
364
|
+
default: number;
|
|
365
|
+
};
|
|
366
|
+
size: {
|
|
367
|
+
type: PropType<AvatarProps["size"]>;
|
|
368
|
+
default: undefined;
|
|
369
|
+
};
|
|
370
|
+
}>, () => VNode<vue.RendererNode, vue.RendererElement, {
|
|
371
|
+
[key: string]: any;
|
|
372
|
+
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
373
|
+
/** Maximum shown before collapsing into a "+N" chip. Default `4`. */
|
|
374
|
+
max: {
|
|
375
|
+
type: NumberConstructor;
|
|
376
|
+
default: number;
|
|
377
|
+
};
|
|
378
|
+
size: {
|
|
379
|
+
type: PropType<AvatarProps["size"]>;
|
|
380
|
+
default: undefined;
|
|
381
|
+
};
|
|
382
|
+
}>> & Readonly<{}>, {
|
|
383
|
+
size: "sm" | "md" | "lg" | "xl" | "xs" | undefined;
|
|
384
|
+
max: number;
|
|
385
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
386
|
+
/**
|
|
387
|
+
* A keyboard key.
|
|
388
|
+
*
|
|
389
|
+
* Splits on `+` so `<Kbd>⌘+K</Kbd>` renders two keys with a separator, and the separator is
|
|
390
|
+
* `aria-hidden` — a screen reader should say "command K", not "command plus K".
|
|
391
|
+
*
|
|
392
|
+
* The React version types its children as a plain `string` rather than a general `ReactNode`, since
|
|
393
|
+
* the split only makes sense on literal text. The default slot is kept here (matching the React
|
|
394
|
+
* call site, `<Kbd>⌘+K</Kbd>`) rather than switching to a string prop, and the text is recovered from
|
|
395
|
+
* the rendered slot nodes — which is exactly what that slot is expected to contain.
|
|
396
|
+
*/
|
|
397
|
+
declare const Kbd: vue.DefineComponent<{}, () => VNode<vue.RendererNode, vue.RendererElement, {
|
|
398
|
+
[key: string]: any;
|
|
399
|
+
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
400
|
+
interface StatProps {
|
|
401
|
+
label: SlotContent;
|
|
402
|
+
value: SlotContent;
|
|
403
|
+
/** Change since the previous period. Sign decides the direction and colour. */
|
|
404
|
+
delta?: number;
|
|
405
|
+
/** How the delta reads — `'2.4%'` or `'+18 users'`. Defaults to the number with a sign. */
|
|
406
|
+
deltaLabel?: string;
|
|
407
|
+
/** For metrics where down is good, like churn or latency. */
|
|
408
|
+
invertDelta?: boolean;
|
|
409
|
+
hint?: SlotContent;
|
|
410
|
+
icon?: SlotContent;
|
|
411
|
+
}
|
|
412
|
+
/**
|
|
413
|
+
* A single metric — the building block of every dashboard.
|
|
414
|
+
*
|
|
415
|
+
* The delta's direction is shown by an arrow *and* a sign *and* a colour. Three redundant signals
|
|
416
|
+
* because this is the number people scan fastest and misreading it has consequences.
|
|
417
|
+
*/
|
|
418
|
+
declare const Stat: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
419
|
+
label: {
|
|
420
|
+
type: PropType<SlotContent>;
|
|
421
|
+
required: true;
|
|
422
|
+
};
|
|
423
|
+
value: {
|
|
424
|
+
type: PropType<SlotContent>;
|
|
425
|
+
required: true;
|
|
426
|
+
};
|
|
427
|
+
delta: {
|
|
428
|
+
type: NumberConstructor;
|
|
429
|
+
default: undefined;
|
|
430
|
+
};
|
|
431
|
+
deltaLabel: {
|
|
432
|
+
type: StringConstructor;
|
|
433
|
+
default: undefined;
|
|
434
|
+
};
|
|
435
|
+
invertDelta: {
|
|
436
|
+
type: BooleanConstructor;
|
|
437
|
+
default: boolean;
|
|
438
|
+
};
|
|
439
|
+
hint: {
|
|
440
|
+
type: PropType<SlotContent>;
|
|
441
|
+
default: undefined;
|
|
442
|
+
};
|
|
443
|
+
icon: {
|
|
444
|
+
type: PropType<SlotContent>;
|
|
445
|
+
default: undefined;
|
|
446
|
+
};
|
|
447
|
+
}>, () => VNode<vue.RendererNode, vue.RendererElement, {
|
|
448
|
+
[key: string]: any;
|
|
449
|
+
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
450
|
+
label: {
|
|
451
|
+
type: PropType<SlotContent>;
|
|
452
|
+
required: true;
|
|
453
|
+
};
|
|
454
|
+
value: {
|
|
455
|
+
type: PropType<SlotContent>;
|
|
456
|
+
required: true;
|
|
457
|
+
};
|
|
458
|
+
delta: {
|
|
459
|
+
type: NumberConstructor;
|
|
460
|
+
default: undefined;
|
|
461
|
+
};
|
|
462
|
+
deltaLabel: {
|
|
463
|
+
type: StringConstructor;
|
|
464
|
+
default: undefined;
|
|
465
|
+
};
|
|
466
|
+
invertDelta: {
|
|
467
|
+
type: BooleanConstructor;
|
|
468
|
+
default: boolean;
|
|
469
|
+
};
|
|
470
|
+
hint: {
|
|
471
|
+
type: PropType<SlotContent>;
|
|
472
|
+
default: undefined;
|
|
473
|
+
};
|
|
474
|
+
icon: {
|
|
475
|
+
type: PropType<SlotContent>;
|
|
476
|
+
default: undefined;
|
|
477
|
+
};
|
|
478
|
+
}>> & Readonly<{}>, {
|
|
479
|
+
delta: number;
|
|
480
|
+
icon: SlotContent;
|
|
481
|
+
hint: SlotContent;
|
|
482
|
+
deltaLabel: string;
|
|
483
|
+
invertDelta: boolean;
|
|
484
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
485
|
+
interface EmptyStateProps {
|
|
486
|
+
title: SlotContent;
|
|
487
|
+
description?: SlotContent;
|
|
488
|
+
icon?: SlotContent;
|
|
489
|
+
/** The action that resolves the emptiness — "Create your first invoice". */
|
|
490
|
+
action?: SlotContent;
|
|
491
|
+
size?: 'sm' | 'md';
|
|
492
|
+
}
|
|
493
|
+
/**
|
|
494
|
+
* The "nothing here yet" panel.
|
|
495
|
+
*
|
|
496
|
+
* Always offers the next step. An empty state that only says "No results" leaves the user to work
|
|
497
|
+
* out whether the filter is wrong, the data hasn't loaded, or they need to create something — and
|
|
498
|
+
* that ambiguity is where people abandon a screen.
|
|
499
|
+
*/
|
|
500
|
+
declare const EmptyState: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
501
|
+
title: {
|
|
502
|
+
type: PropType<SlotContent>;
|
|
503
|
+
required: true;
|
|
504
|
+
};
|
|
505
|
+
description: {
|
|
506
|
+
type: PropType<SlotContent>;
|
|
507
|
+
default: undefined;
|
|
508
|
+
};
|
|
509
|
+
icon: {
|
|
510
|
+
type: PropType<SlotContent>;
|
|
511
|
+
default: undefined;
|
|
512
|
+
};
|
|
513
|
+
action: {
|
|
514
|
+
type: PropType<SlotContent>;
|
|
515
|
+
default: undefined;
|
|
516
|
+
};
|
|
517
|
+
size: {
|
|
518
|
+
type: PropType<"sm" | "md">;
|
|
519
|
+
default: string;
|
|
520
|
+
};
|
|
521
|
+
}>, () => VNode<vue.RendererNode, vue.RendererElement, {
|
|
522
|
+
[key: string]: any;
|
|
523
|
+
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
524
|
+
title: {
|
|
525
|
+
type: PropType<SlotContent>;
|
|
526
|
+
required: true;
|
|
527
|
+
};
|
|
528
|
+
description: {
|
|
529
|
+
type: PropType<SlotContent>;
|
|
530
|
+
default: undefined;
|
|
531
|
+
};
|
|
532
|
+
icon: {
|
|
533
|
+
type: PropType<SlotContent>;
|
|
534
|
+
default: undefined;
|
|
535
|
+
};
|
|
536
|
+
action: {
|
|
537
|
+
type: PropType<SlotContent>;
|
|
538
|
+
default: undefined;
|
|
539
|
+
};
|
|
540
|
+
size: {
|
|
541
|
+
type: PropType<"sm" | "md">;
|
|
542
|
+
default: string;
|
|
543
|
+
};
|
|
544
|
+
}>> & Readonly<{}>, {
|
|
545
|
+
size: "sm" | "md";
|
|
546
|
+
description: SlotContent;
|
|
547
|
+
icon: SlotContent;
|
|
548
|
+
action: SlotContent;
|
|
549
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
550
|
+
interface DescriptionListProps {
|
|
551
|
+
items: ReadonlyArray<{
|
|
552
|
+
term: SlotContent;
|
|
553
|
+
description: SlotContent;
|
|
554
|
+
}>;
|
|
555
|
+
/** Side-by-side rather than stacked. Default `'horizontal'` on wide screens. */
|
|
556
|
+
orientation?: 'horizontal' | 'vertical';
|
|
557
|
+
}
|
|
558
|
+
/**
|
|
559
|
+
* Key–value pairs — the detail panel of every record in a CRM.
|
|
560
|
+
*
|
|
561
|
+
* A real `<dl>`/`<dt>`/`<dd>`, which is what makes a screen reader pair each label with its value
|
|
562
|
+
* instead of reading twenty unconnected strings.
|
|
563
|
+
*/
|
|
564
|
+
declare const DescriptionList: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
565
|
+
items: {
|
|
566
|
+
type: PropType<DescriptionListProps["items"]>;
|
|
567
|
+
required: true;
|
|
568
|
+
};
|
|
569
|
+
orientation: {
|
|
570
|
+
type: PropType<"horizontal" | "vertical">;
|
|
571
|
+
default: string;
|
|
572
|
+
};
|
|
573
|
+
}>, () => VNode<vue.RendererNode, vue.RendererElement, {
|
|
574
|
+
[key: string]: any;
|
|
575
|
+
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
576
|
+
items: {
|
|
577
|
+
type: PropType<DescriptionListProps["items"]>;
|
|
578
|
+
required: true;
|
|
579
|
+
};
|
|
580
|
+
orientation: {
|
|
581
|
+
type: PropType<"horizontal" | "vertical">;
|
|
582
|
+
default: string;
|
|
583
|
+
};
|
|
584
|
+
}>> & Readonly<{}>, {
|
|
585
|
+
orientation: "horizontal" | "vertical";
|
|
586
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
587
|
+
interface TimelineItem {
|
|
588
|
+
id: string;
|
|
589
|
+
title: SlotContent;
|
|
590
|
+
description?: SlotContent;
|
|
591
|
+
/** Rendered as-is; pass an already-formatted string or a `<time>` VNode. */
|
|
592
|
+
timestamp?: SlotContent;
|
|
593
|
+
icon?: SlotContent;
|
|
594
|
+
tone?: BadgeTone;
|
|
595
|
+
}
|
|
596
|
+
/**
|
|
597
|
+
* A chronological feed — audit logs, order history, activity streams.
|
|
598
|
+
*
|
|
599
|
+
* An ordered list, because the order carries meaning. The connecting line is drawn with a
|
|
600
|
+
* pseudo-element on the list item rather than a real element, so it can't be selected, read, or land
|
|
601
|
+
* in a copy-paste of the page.
|
|
602
|
+
*/
|
|
603
|
+
declare const Timeline: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
604
|
+
items: {
|
|
605
|
+
type: PropType<readonly TimelineItem[]>;
|
|
606
|
+
required: true;
|
|
607
|
+
};
|
|
608
|
+
}>, () => VNode<vue.RendererNode, vue.RendererElement, {
|
|
609
|
+
[key: string]: any;
|
|
610
|
+
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
611
|
+
items: {
|
|
612
|
+
type: PropType<readonly TimelineItem[]>;
|
|
613
|
+
required: true;
|
|
614
|
+
};
|
|
615
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
616
|
+
interface CodeBlockProps {
|
|
617
|
+
code: string;
|
|
618
|
+
language?: string;
|
|
619
|
+
/** Show a copy button. Default `true`. */
|
|
620
|
+
copyable?: boolean;
|
|
621
|
+
/** Show line numbers. */
|
|
622
|
+
lineNumbers?: boolean;
|
|
623
|
+
/** Filename or title shown in the header bar. */
|
|
624
|
+
filename?: string;
|
|
625
|
+
}
|
|
626
|
+
/**
|
|
627
|
+
* A code block with a copy button.
|
|
628
|
+
*
|
|
629
|
+
* No syntax highlighter, matching the React version — shipping one means a tokeniser and a theme in
|
|
630
|
+
* the bundle of every app that displays a snippet, for a cost that lands on consumers who may never
|
|
631
|
+
* render code at all.
|
|
632
|
+
*/
|
|
633
|
+
declare const CodeBlock: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
634
|
+
code: {
|
|
635
|
+
type: StringConstructor;
|
|
636
|
+
required: true;
|
|
637
|
+
};
|
|
638
|
+
language: {
|
|
639
|
+
type: StringConstructor;
|
|
640
|
+
default: string;
|
|
641
|
+
};
|
|
642
|
+
copyable: {
|
|
643
|
+
type: BooleanConstructor;
|
|
644
|
+
default: boolean;
|
|
645
|
+
};
|
|
646
|
+
lineNumbers: {
|
|
647
|
+
type: BooleanConstructor;
|
|
648
|
+
default: boolean;
|
|
649
|
+
};
|
|
650
|
+
filename: {
|
|
651
|
+
type: StringConstructor;
|
|
652
|
+
default: undefined;
|
|
653
|
+
};
|
|
654
|
+
}>, () => VNode<vue.RendererNode, vue.RendererElement, {
|
|
655
|
+
[key: string]: any;
|
|
656
|
+
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
657
|
+
code: {
|
|
658
|
+
type: StringConstructor;
|
|
659
|
+
required: true;
|
|
660
|
+
};
|
|
661
|
+
language: {
|
|
662
|
+
type: StringConstructor;
|
|
663
|
+
default: string;
|
|
664
|
+
};
|
|
665
|
+
copyable: {
|
|
666
|
+
type: BooleanConstructor;
|
|
667
|
+
default: boolean;
|
|
668
|
+
};
|
|
669
|
+
lineNumbers: {
|
|
670
|
+
type: BooleanConstructor;
|
|
671
|
+
default: boolean;
|
|
672
|
+
};
|
|
673
|
+
filename: {
|
|
674
|
+
type: StringConstructor;
|
|
675
|
+
default: undefined;
|
|
676
|
+
};
|
|
677
|
+
}>> & Readonly<{}>, {
|
|
678
|
+
language: string;
|
|
679
|
+
copyable: boolean;
|
|
680
|
+
lineNumbers: boolean;
|
|
681
|
+
filename: string;
|
|
682
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
683
|
+
|
|
684
|
+
/**
|
|
685
|
+
* Progress indicators — the Vue counterpart of `@ansh-ui/react`'s `Progress`/`CircularProgress`/
|
|
686
|
+
* `Meter`.
|
|
687
|
+
*
|
|
688
|
+
* The distinction that matters and is usually missed: **progress** is work advancing toward
|
|
689
|
+
* completion (`role="progressbar"`), a **meter** is a static measurement within a range
|
|
690
|
+
* (`role="meter"` — disk usage, a score, a quota). Announcing a disk-usage bar as progress tells a
|
|
691
|
+
* screen-reader user that something is loading, which it isn't.
|
|
692
|
+
*/
|
|
693
|
+
interface ProgressProps {
|
|
694
|
+
/** `0`–`max`. Omit for an indeterminate bar. */
|
|
695
|
+
value?: number;
|
|
696
|
+
max?: number;
|
|
697
|
+
size?: 'sm' | 'md' | 'lg';
|
|
698
|
+
tone?: 'accent' | 'success' | 'warning' | 'danger';
|
|
699
|
+
/** Accessible name — "Upload progress", not "Progress". */
|
|
700
|
+
label: string;
|
|
701
|
+
/** Show the label and percentage above the bar. */
|
|
702
|
+
showLabel?: boolean;
|
|
703
|
+
/** Override the announced/displayed text. */
|
|
704
|
+
formatValue?: (value: number, max: number) => string;
|
|
705
|
+
}
|
|
706
|
+
declare const Progress: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
707
|
+
value: {
|
|
708
|
+
type: NumberConstructor;
|
|
709
|
+
default: undefined;
|
|
710
|
+
};
|
|
711
|
+
max: {
|
|
712
|
+
type: NumberConstructor;
|
|
713
|
+
default: number;
|
|
714
|
+
};
|
|
715
|
+
size: {
|
|
716
|
+
type: PropType<"sm" | "md" | "lg">;
|
|
717
|
+
default: string;
|
|
718
|
+
};
|
|
719
|
+
tone: {
|
|
720
|
+
type: PropType<"accent" | "success" | "warning" | "danger">;
|
|
721
|
+
default: string;
|
|
722
|
+
};
|
|
723
|
+
label: {
|
|
724
|
+
type: StringConstructor;
|
|
725
|
+
required: true;
|
|
726
|
+
};
|
|
727
|
+
showLabel: {
|
|
728
|
+
type: BooleanConstructor;
|
|
729
|
+
default: boolean;
|
|
730
|
+
};
|
|
731
|
+
formatValue: {
|
|
732
|
+
type: PropType<(value: number, max: number) => string>;
|
|
733
|
+
default: undefined;
|
|
734
|
+
};
|
|
735
|
+
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
736
|
+
[key: string]: any;
|
|
737
|
+
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
738
|
+
value: {
|
|
739
|
+
type: NumberConstructor;
|
|
740
|
+
default: undefined;
|
|
741
|
+
};
|
|
742
|
+
max: {
|
|
743
|
+
type: NumberConstructor;
|
|
744
|
+
default: number;
|
|
745
|
+
};
|
|
746
|
+
size: {
|
|
747
|
+
type: PropType<"sm" | "md" | "lg">;
|
|
748
|
+
default: string;
|
|
749
|
+
};
|
|
750
|
+
tone: {
|
|
751
|
+
type: PropType<"accent" | "success" | "warning" | "danger">;
|
|
752
|
+
default: string;
|
|
753
|
+
};
|
|
754
|
+
label: {
|
|
755
|
+
type: StringConstructor;
|
|
756
|
+
required: true;
|
|
757
|
+
};
|
|
758
|
+
showLabel: {
|
|
759
|
+
type: BooleanConstructor;
|
|
760
|
+
default: boolean;
|
|
761
|
+
};
|
|
762
|
+
formatValue: {
|
|
763
|
+
type: PropType<(value: number, max: number) => string>;
|
|
764
|
+
default: undefined;
|
|
765
|
+
};
|
|
766
|
+
}>> & Readonly<{}>, {
|
|
767
|
+
value: number;
|
|
768
|
+
size: "sm" | "md" | "lg";
|
|
769
|
+
max: number;
|
|
770
|
+
formatValue: (value: number, max: number) => string;
|
|
771
|
+
tone: "danger" | "accent" | "success" | "warning";
|
|
772
|
+
showLabel: boolean;
|
|
773
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
774
|
+
interface CircularProgressProps extends Omit<ProgressProps, 'size'> {
|
|
775
|
+
/** Diameter in px. Default `48`. */
|
|
776
|
+
size?: number;
|
|
777
|
+
/** Ring thickness in px. Default `4`. */
|
|
778
|
+
thickness?: number;
|
|
779
|
+
}
|
|
780
|
+
/**
|
|
781
|
+
* A ring progress indicator.
|
|
782
|
+
*
|
|
783
|
+
* Drawn with `stroke-dasharray` on an SVG circle rather than with conic gradients, so the ends can
|
|
784
|
+
* be rounded and the ring animates smoothly at any size. The circle is rotated -90° so 0% starts at
|
|
785
|
+
* the top, which is where everyone expects it.
|
|
786
|
+
*
|
|
787
|
+
* `children` in the React version — content in the middle, usually the percentage — becomes the
|
|
788
|
+
* default slot here.
|
|
789
|
+
*/
|
|
790
|
+
declare const CircularProgress: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
791
|
+
value: {
|
|
792
|
+
type: NumberConstructor;
|
|
793
|
+
default: undefined;
|
|
794
|
+
};
|
|
795
|
+
max: {
|
|
796
|
+
type: NumberConstructor;
|
|
797
|
+
default: number;
|
|
798
|
+
};
|
|
799
|
+
size: {
|
|
800
|
+
type: NumberConstructor;
|
|
801
|
+
default: number;
|
|
802
|
+
};
|
|
803
|
+
thickness: {
|
|
804
|
+
type: NumberConstructor;
|
|
805
|
+
default: number;
|
|
806
|
+
};
|
|
807
|
+
tone: {
|
|
808
|
+
type: PropType<"accent" | "success" | "warning" | "danger">;
|
|
809
|
+
default: string;
|
|
810
|
+
};
|
|
811
|
+
label: {
|
|
812
|
+
type: StringConstructor;
|
|
813
|
+
required: true;
|
|
814
|
+
};
|
|
815
|
+
formatValue: {
|
|
816
|
+
type: PropType<(value: number, max: number) => string>;
|
|
817
|
+
default: undefined;
|
|
818
|
+
};
|
|
819
|
+
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
820
|
+
[key: string]: any;
|
|
821
|
+
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
822
|
+
value: {
|
|
823
|
+
type: NumberConstructor;
|
|
824
|
+
default: undefined;
|
|
825
|
+
};
|
|
826
|
+
max: {
|
|
827
|
+
type: NumberConstructor;
|
|
828
|
+
default: number;
|
|
829
|
+
};
|
|
830
|
+
size: {
|
|
831
|
+
type: NumberConstructor;
|
|
832
|
+
default: number;
|
|
833
|
+
};
|
|
834
|
+
thickness: {
|
|
835
|
+
type: NumberConstructor;
|
|
836
|
+
default: number;
|
|
837
|
+
};
|
|
838
|
+
tone: {
|
|
839
|
+
type: PropType<"accent" | "success" | "warning" | "danger">;
|
|
840
|
+
default: string;
|
|
841
|
+
};
|
|
842
|
+
label: {
|
|
843
|
+
type: StringConstructor;
|
|
844
|
+
required: true;
|
|
845
|
+
};
|
|
846
|
+
formatValue: {
|
|
847
|
+
type: PropType<(value: number, max: number) => string>;
|
|
848
|
+
default: undefined;
|
|
849
|
+
};
|
|
850
|
+
}>> & Readonly<{}>, {
|
|
851
|
+
value: number;
|
|
852
|
+
size: number;
|
|
853
|
+
thickness: number;
|
|
854
|
+
max: number;
|
|
855
|
+
formatValue: (value: number, max: number) => string;
|
|
856
|
+
tone: "danger" | "accent" | "success" | "warning";
|
|
857
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
858
|
+
interface MeterProps {
|
|
859
|
+
value: number;
|
|
860
|
+
min?: number;
|
|
861
|
+
max?: number;
|
|
862
|
+
/** Thresholds that colour the bar — below `low` is danger, above `high` is success. */
|
|
863
|
+
low?: number;
|
|
864
|
+
high?: number;
|
|
865
|
+
/** Flip the colours, for metrics where high is bad (disk usage, error rate). */
|
|
866
|
+
inverted?: boolean;
|
|
867
|
+
label: string;
|
|
868
|
+
showValue?: boolean;
|
|
869
|
+
formatValue?: (value: number) => string;
|
|
870
|
+
}
|
|
871
|
+
/**
|
|
872
|
+
* A measurement within a known range — quota, score, capacity.
|
|
873
|
+
*
|
|
874
|
+
* `role="meter"`, not `progressbar`. Colour follows the thresholds, but the numeric value is always
|
|
875
|
+
* rendered too, so the state is never conveyed by colour alone.
|
|
876
|
+
*/
|
|
877
|
+
declare const Meter: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
878
|
+
value: {
|
|
879
|
+
type: NumberConstructor;
|
|
880
|
+
required: true;
|
|
881
|
+
};
|
|
882
|
+
min: {
|
|
883
|
+
type: NumberConstructor;
|
|
884
|
+
default: number;
|
|
885
|
+
};
|
|
886
|
+
max: {
|
|
887
|
+
type: NumberConstructor;
|
|
888
|
+
default: number;
|
|
889
|
+
};
|
|
890
|
+
low: {
|
|
891
|
+
type: NumberConstructor;
|
|
892
|
+
default: undefined;
|
|
893
|
+
};
|
|
894
|
+
high: {
|
|
895
|
+
type: NumberConstructor;
|
|
896
|
+
default: undefined;
|
|
897
|
+
};
|
|
898
|
+
inverted: {
|
|
899
|
+
type: BooleanConstructor;
|
|
900
|
+
default: boolean;
|
|
901
|
+
};
|
|
902
|
+
label: {
|
|
903
|
+
type: StringConstructor;
|
|
904
|
+
required: true;
|
|
905
|
+
};
|
|
906
|
+
showValue: {
|
|
907
|
+
type: BooleanConstructor;
|
|
908
|
+
default: boolean;
|
|
909
|
+
};
|
|
910
|
+
formatValue: {
|
|
911
|
+
type: PropType<(value: number) => string>;
|
|
912
|
+
default: undefined;
|
|
913
|
+
};
|
|
914
|
+
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
915
|
+
[key: string]: any;
|
|
916
|
+
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
917
|
+
value: {
|
|
918
|
+
type: NumberConstructor;
|
|
919
|
+
required: true;
|
|
920
|
+
};
|
|
921
|
+
min: {
|
|
922
|
+
type: NumberConstructor;
|
|
923
|
+
default: number;
|
|
924
|
+
};
|
|
925
|
+
max: {
|
|
926
|
+
type: NumberConstructor;
|
|
927
|
+
default: number;
|
|
928
|
+
};
|
|
929
|
+
low: {
|
|
930
|
+
type: NumberConstructor;
|
|
931
|
+
default: undefined;
|
|
932
|
+
};
|
|
933
|
+
high: {
|
|
934
|
+
type: NumberConstructor;
|
|
935
|
+
default: undefined;
|
|
936
|
+
};
|
|
937
|
+
inverted: {
|
|
938
|
+
type: BooleanConstructor;
|
|
939
|
+
default: boolean;
|
|
940
|
+
};
|
|
941
|
+
label: {
|
|
942
|
+
type: StringConstructor;
|
|
943
|
+
required: true;
|
|
944
|
+
};
|
|
945
|
+
showValue: {
|
|
946
|
+
type: BooleanConstructor;
|
|
947
|
+
default: boolean;
|
|
948
|
+
};
|
|
949
|
+
formatValue: {
|
|
950
|
+
type: PropType<(value: number) => string>;
|
|
951
|
+
default: undefined;
|
|
952
|
+
};
|
|
953
|
+
}>> & Readonly<{}>, {
|
|
954
|
+
high: number;
|
|
955
|
+
low: number;
|
|
956
|
+
max: number;
|
|
957
|
+
min: number;
|
|
958
|
+
showValue: boolean;
|
|
959
|
+
formatValue: (value: number) => string;
|
|
960
|
+
inverted: boolean;
|
|
961
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
962
|
+
|
|
963
|
+
export { Avatar, AvatarGroup, type AvatarProps, Badge, type BadgeTone, CircularProgress, type CircularProgressProps, CodeBlock, type CodeBlockProps, type Column, DataTable, type DataTableProps, DescriptionList, type DescriptionListProps, EmptyState, type EmptyStateProps, Kbd, Meter, type MeterProps, Pagination, type PaginationProps, Progress, type ProgressProps, type SortDirection, type SortState, Stat, type StatProps, Table, Timeline, type TimelineItem };
|