@astryx-vue/lab 0.0.0-stage → 0.1.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/README.md +35 -2
- package/css.d.ts +3 -0
- package/dist/index.d.ts +912 -0
- package/dist/index.js +4016 -0
- package/lab.css +10 -0
- package/package.json +71 -3
- package/styles/circular-progress.css +174 -0
- package/styles/info-tip.css +39 -0
- package/styles/list-input.css +206 -0
- package/styles/log-stream.css +271 -0
- package/styles/mobile-tokenizer.css +146 -0
- package/styles/stat.css +101 -0
- package/styles/svg-icon.css +204 -0
- package/styles/transfer-list-selector.css +46 -0
- package/styles/transfer-list.css +234 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,912 @@
|
|
|
1
|
+
import { VNodeChild } from "vue";
|
|
2
|
+
import { FieldStatusInput, IconSize, PopoverPlacement } from "@astryx-vue/core";
|
|
3
|
+
//#region src/CircularProgress/types.d.ts
|
|
4
|
+
/** Variants a theme can extend through declaration merging in TypeScript. */
|
|
5
|
+
interface CircularProgressVariantMap {
|
|
6
|
+
accent: true;
|
|
7
|
+
success: true;
|
|
8
|
+
warning: true;
|
|
9
|
+
error: true;
|
|
10
|
+
neutral: true;
|
|
11
|
+
}
|
|
12
|
+
type CircularProgressVariant = keyof CircularProgressVariantMap;
|
|
13
|
+
type CircularProgressSize = 'sm' | 'md' | 'lg';
|
|
14
|
+
interface CircularProgressProps {
|
|
15
|
+
/** Current value of the circular progress. Ignored when `isIndeterminate` is true. */
|
|
16
|
+
value?: number;
|
|
17
|
+
/**
|
|
18
|
+
* Maximum value.
|
|
19
|
+
* @default 100
|
|
20
|
+
*/
|
|
21
|
+
max?: number;
|
|
22
|
+
/** Accessible label for the progress indicator. Required for a11y. */
|
|
23
|
+
label: string;
|
|
24
|
+
/**
|
|
25
|
+
* When true, the label is visually hidden but stays accessible to screen readers.
|
|
26
|
+
* @default true
|
|
27
|
+
*/
|
|
28
|
+
isLabelHidden?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* When true, shows the formatted value (e.g. "75%") in the center of the ring.
|
|
31
|
+
* Ignored when `isIndeterminate` is true, or when the default slot provides
|
|
32
|
+
* custom center content.
|
|
33
|
+
* @default false
|
|
34
|
+
*/
|
|
35
|
+
hasValueLabel?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Custom formatter for the value label.
|
|
38
|
+
* @default (value, max) => `${Math.round((value / max) * 100)}%`
|
|
39
|
+
*/
|
|
40
|
+
formatValueLabel?: (value: number, max: number) => string;
|
|
41
|
+
/**
|
|
42
|
+
* Diameter of the ring.
|
|
43
|
+
* @default 'md'
|
|
44
|
+
*/
|
|
45
|
+
size?: CircularProgressSize;
|
|
46
|
+
/**
|
|
47
|
+
* Visual style variant mapped to semantic color tokens.
|
|
48
|
+
* @default 'accent'
|
|
49
|
+
*/
|
|
50
|
+
variant?: CircularProgressVariant;
|
|
51
|
+
/**
|
|
52
|
+
* Animated indeterminate indicator for unknown progress. `value` and
|
|
53
|
+
* `hasValueLabel` are ignored in this mode; reduced motion slows the animation.
|
|
54
|
+
* @default false
|
|
55
|
+
*/
|
|
56
|
+
isIndeterminate?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Disabled colors for canceled or inactive operations.
|
|
59
|
+
* @default false
|
|
60
|
+
*/
|
|
61
|
+
isDisabled?: boolean;
|
|
62
|
+
}
|
|
63
|
+
//#endregion
|
|
64
|
+
//#region src/CircularProgress/CircularProgress.vue.d.ts
|
|
65
|
+
declare var __VLS_1$1: {};
|
|
66
|
+
type __VLS_Slots$3 = {} & {
|
|
67
|
+
default?: (props: typeof __VLS_1$1) => any;
|
|
68
|
+
};
|
|
69
|
+
declare const __VLS_base$3: import("vue").DefineComponent<CircularProgressProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CircularProgressProps> & Readonly<{}>, {
|
|
70
|
+
value: number;
|
|
71
|
+
size: CircularProgressSize;
|
|
72
|
+
max: number;
|
|
73
|
+
isLabelHidden: boolean;
|
|
74
|
+
hasValueLabel: boolean;
|
|
75
|
+
formatValueLabel: (value: number, max: number) => string;
|
|
76
|
+
variant: keyof CircularProgressVariantMap;
|
|
77
|
+
isIndeterminate: boolean;
|
|
78
|
+
isDisabled: boolean;
|
|
79
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
80
|
+
declare const __VLS_export$8: __VLS_WithSlots$3<typeof __VLS_base$3, __VLS_Slots$3>;
|
|
81
|
+
declare const _default: typeof __VLS_export$8;
|
|
82
|
+
type __VLS_WithSlots$3<T, S> = T & {
|
|
83
|
+
new (): {
|
|
84
|
+
$slots: S;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
//#endregion
|
|
88
|
+
//#region src/InfoTip/types.d.ts
|
|
89
|
+
/**
|
|
90
|
+
* Size of the info icon. Maps 1:1 to core `Icon` sizes
|
|
91
|
+
* (xsm: 12px, sm: 16px, md: 20px, lg: 24px).
|
|
92
|
+
*/
|
|
93
|
+
type InfoTipSize = IconSize;
|
|
94
|
+
interface InfoTipProps {
|
|
95
|
+
/**
|
|
96
|
+
* Tooltip content as plain text. Use the `content` slot for rich content.
|
|
97
|
+
*/
|
|
98
|
+
content?: string;
|
|
99
|
+
/**
|
|
100
|
+
* Accessible name for the trigger button.
|
|
101
|
+
* @default 'More information'
|
|
102
|
+
*/
|
|
103
|
+
label?: string;
|
|
104
|
+
/**
|
|
105
|
+
* Size of the info icon.
|
|
106
|
+
* @default 'sm'
|
|
107
|
+
*/
|
|
108
|
+
size?: InfoTipSize;
|
|
109
|
+
}
|
|
110
|
+
//#endregion
|
|
111
|
+
//#region src/InfoTip/InfoTip.vue.d.ts
|
|
112
|
+
declare var __VLS_13$1: {};
|
|
113
|
+
type __VLS_Slots$2 = {} & {
|
|
114
|
+
content?: (props: typeof __VLS_13$1) => any;
|
|
115
|
+
};
|
|
116
|
+
declare const __VLS_base$2: import("vue").DefineComponent<InfoTipProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<InfoTipProps> & Readonly<{}>, {
|
|
117
|
+
label: string;
|
|
118
|
+
size: import("@astryx-vue/core").IconSize;
|
|
119
|
+
content: string;
|
|
120
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
121
|
+
declare const __VLS_export$7: __VLS_WithSlots$2<typeof __VLS_base$2, __VLS_Slots$2>;
|
|
122
|
+
declare const _default$1: typeof __VLS_export$7;
|
|
123
|
+
type __VLS_WithSlots$2<T, S> = T & {
|
|
124
|
+
new (): {
|
|
125
|
+
$slots: S;
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
//#endregion
|
|
129
|
+
//#region src/ListInput/types.d.ts
|
|
130
|
+
/** 一次列表改动。`update` 里 `columnKey` 是触发改动的列。 */
|
|
131
|
+
type ListInputChange<T> = {
|
|
132
|
+
type: 'add';
|
|
133
|
+
item: T;
|
|
134
|
+
index: number;
|
|
135
|
+
} | {
|
|
136
|
+
type: 'update';
|
|
137
|
+
item: T;
|
|
138
|
+
previousItem: T;
|
|
139
|
+
index: number;
|
|
140
|
+
columnKey?: string;
|
|
141
|
+
} | {
|
|
142
|
+
type: 'remove';
|
|
143
|
+
item: T;
|
|
144
|
+
index: number;
|
|
145
|
+
} | {
|
|
146
|
+
type: 'reorder';
|
|
147
|
+
item: T;
|
|
148
|
+
fromIndex: number;
|
|
149
|
+
toIndex: number;
|
|
150
|
+
};
|
|
151
|
+
/** 单元格渲染器拿到的、和位置有关的上下文。 */
|
|
152
|
+
interface ListInputValueContext<T> {
|
|
153
|
+
/** 当前记录。 */
|
|
154
|
+
item: T;
|
|
155
|
+
/** 当前可见位置,从 0 开始。 */
|
|
156
|
+
index: number;
|
|
157
|
+
/** 单元格的无障碍名,已经带上这是第几条。 */
|
|
158
|
+
label: string;
|
|
159
|
+
/** 永远是 `true`:列名由 ListInput 自己画,字段不用再画一遍。 */
|
|
160
|
+
isLabelHidden: boolean;
|
|
161
|
+
}
|
|
162
|
+
interface ListInputRenderContext<T> extends ListInputValueContext<T> {
|
|
163
|
+
/** 这一格自己的校验状态。 */
|
|
164
|
+
status?: {
|
|
165
|
+
type: 'error' | 'warning' | 'success';
|
|
166
|
+
message?: string;
|
|
167
|
+
};
|
|
168
|
+
/** 交给 Astryx 输入控件,让它用自带的提示气泡显示状态。 */
|
|
169
|
+
statusVariant: 'tooltip';
|
|
170
|
+
isDisabled: boolean;
|
|
171
|
+
isLoading: boolean;
|
|
172
|
+
/** 换掉这一条记录。`columnKey` 不传时用当前列的 key。 */
|
|
173
|
+
updateItem: (nextItem: T, columnKey?: string) => void;
|
|
174
|
+
}
|
|
175
|
+
/** 列宽:按比例分配时给一个最小宽度兜底,也可以直接写死像素。 */
|
|
176
|
+
type ListInputColumnWidth = {
|
|
177
|
+
type: 'proportional';
|
|
178
|
+
value?: number;
|
|
179
|
+
minWidth?: number;
|
|
180
|
+
} | {
|
|
181
|
+
type: 'pixel';
|
|
182
|
+
value: number;
|
|
183
|
+
};
|
|
184
|
+
interface ListInputColumn<T> {
|
|
185
|
+
/** 列标识,同时传给 `getFieldStatus`。 */
|
|
186
|
+
key: string;
|
|
187
|
+
/** 列名。只在第一条上显示;行堆叠时每条都显示。 */
|
|
188
|
+
header: string;
|
|
189
|
+
/** 列宽。默认是比例列,最小 140px。 */
|
|
190
|
+
width?: ListInputColumnWidth;
|
|
191
|
+
/** 画这一格的输入控件。 */
|
|
192
|
+
renderInput: (context: ListInputRenderContext<T>) => VNodeChild;
|
|
193
|
+
}
|
|
194
|
+
interface ListInputProps<T> {
|
|
195
|
+
/** 列表的可见标签,也是无障碍名。 */
|
|
196
|
+
label: string;
|
|
197
|
+
description?: string;
|
|
198
|
+
modelValue?: T[];
|
|
199
|
+
/** 每条记录的唯一键,用来保持焦点和顺序。 */
|
|
200
|
+
getItemKey: (item: T) => string | number;
|
|
201
|
+
/** 点「添加」时造一条新记录。 */
|
|
202
|
+
createItem: () => T;
|
|
203
|
+
columns: ListInputColumn<T>[];
|
|
204
|
+
/** 操作名和播报里用的单数名词。 */
|
|
205
|
+
itemName?: string;
|
|
206
|
+
/** 整个列表的校验状态。 */
|
|
207
|
+
status?: {
|
|
208
|
+
type: 'error' | 'warning' | 'success';
|
|
209
|
+
message?: string;
|
|
210
|
+
};
|
|
211
|
+
/** 一条记录整体的校验状态,显示在该行下方。 */
|
|
212
|
+
getItemStatus?: (item: T, index: number) => {
|
|
213
|
+
type: 'error' | 'warning' | 'success';
|
|
214
|
+
message?: string;
|
|
215
|
+
} | undefined;
|
|
216
|
+
/** 单格的校验状态,交给对应的输入控件。 */
|
|
217
|
+
getFieldStatus?: (item: T, columnKey: string, index: number) => {
|
|
218
|
+
type: 'error' | 'warning' | 'success';
|
|
219
|
+
message?: string;
|
|
220
|
+
} | undefined;
|
|
221
|
+
/** 显示拖动手柄,可以拖动或用键盘调整顺序。 */
|
|
222
|
+
isReorderable?: boolean;
|
|
223
|
+
isDisabled?: boolean;
|
|
224
|
+
/** 列表正忙:所有改动都被挡住,但值仍然可读。 */
|
|
225
|
+
isLoading?: boolean;
|
|
226
|
+
/** 最多几条。到上限时「添加」禁用,但删除照常可用。 */
|
|
227
|
+
maxItems?: number;
|
|
228
|
+
isLabelHidden?: boolean;
|
|
229
|
+
isOptional?: boolean;
|
|
230
|
+
isRequired?: boolean;
|
|
231
|
+
}
|
|
232
|
+
interface ListInputEmits<T> {
|
|
233
|
+
'update:modelValue': [value: T[]];
|
|
234
|
+
'change': [value: T[], change: ListInputChange<T>];
|
|
235
|
+
}
|
|
236
|
+
//#endregion
|
|
237
|
+
//#region src/ListInput/ListInput.vue.d.ts
|
|
238
|
+
declare const __VLS_export$6: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal$3<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
239
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal$3<ListInputProps<T> & {
|
|
240
|
+
"onUpdate:modelValue"?: ((value: T[]) => any) | undefined;
|
|
241
|
+
onChange?: ((value: T[], change: ListInputChange<T>) => any) | undefined;
|
|
242
|
+
}> & (typeof globalThis extends {
|
|
243
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
244
|
+
} ? P : {});
|
|
245
|
+
expose: (exposed: {}) => void;
|
|
246
|
+
attrs: any;
|
|
247
|
+
slots: {};
|
|
248
|
+
emit: ((evt: "update:modelValue", value: T[]) => void) & ((evt: "change", value: T[], change: ListInputChange<T>) => void);
|
|
249
|
+
}>) => import("vue").VNode & {
|
|
250
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
251
|
+
};
|
|
252
|
+
declare const _default$2: typeof __VLS_export$6;
|
|
253
|
+
type __VLS_PrettifyLocal$3<T> = (T extends any ? { [K in keyof T]: T[K]; } : { [K in keyof T as K]: T[K]; }) & {};
|
|
254
|
+
//#endregion
|
|
255
|
+
//#region src/LogStream/types.d.ts
|
|
256
|
+
/** Severity of one log entry. */
|
|
257
|
+
type LogStreamLevel = 'info' | 'warn' | 'error' | 'debug';
|
|
258
|
+
/** One row in the stream; all strings are pre-formatted by the caller. */
|
|
259
|
+
interface LogEntry {
|
|
260
|
+
/** Stable unique key, e.g. `"req-1042"`. */
|
|
261
|
+
id: string;
|
|
262
|
+
/** Pre-formatted timestamp, e.g. `"14:02:11.482"`. Deterministic. */
|
|
263
|
+
timestamp: string;
|
|
264
|
+
level: LogStreamLevel;
|
|
265
|
+
message: string;
|
|
266
|
+
/** Emitting service/component, e.g. `"api-gateway"`. */
|
|
267
|
+
source?: string;
|
|
268
|
+
/**
|
|
269
|
+
* When set, the row becomes a disclosure button that opens this detail.
|
|
270
|
+
*
|
|
271
|
+
* 纯文字用这个字段;要放富内容时同时给 `detail` 插槽(`#detail="{ entry }"`),
|
|
272
|
+
* 插槽内容优先,而这一行是否可展开仍然只看这个字段有没有值。
|
|
273
|
+
*/
|
|
274
|
+
detail?: string;
|
|
275
|
+
}
|
|
276
|
+
interface LogStreamProps {
|
|
277
|
+
/** Log rows, oldest first (live tails append at the end). */
|
|
278
|
+
entries: LogEntry[];
|
|
279
|
+
/**
|
|
280
|
+
* Visual treatment. `'terminal'` renders dark chrome regardless of the active
|
|
281
|
+
* color scheme: terminal output is a brand surface, like a real shell.
|
|
282
|
+
* @default 'default'
|
|
283
|
+
*/
|
|
284
|
+
variant?: 'default' | 'terminal';
|
|
285
|
+
/**
|
|
286
|
+
* Pin scroll to the newest entry as entries append. Unpins when the user
|
|
287
|
+
* scrolls up. Bind it with `v-model:isFollowing` for controlled usage; leave
|
|
288
|
+
* it unbound and the component owns the state (initially unpinned).
|
|
289
|
+
*/
|
|
290
|
+
isFollowing?: boolean;
|
|
291
|
+
/** Max height of the scroll area before it scrolls. */
|
|
292
|
+
maxHeight?: number | string;
|
|
293
|
+
/**
|
|
294
|
+
* Show the timestamp column.
|
|
295
|
+
* @default true
|
|
296
|
+
*/
|
|
297
|
+
hasTimestamps?: boolean;
|
|
298
|
+
/**
|
|
299
|
+
* Accessible label for the log region.
|
|
300
|
+
* @default 'Log stream'
|
|
301
|
+
*/
|
|
302
|
+
label?: string;
|
|
303
|
+
}
|
|
304
|
+
interface LogStreamEmits {
|
|
305
|
+
/** Emitted with the follow state the user asks for (scroll-up, "Jump to latest"). */
|
|
306
|
+
followChange: [following: boolean];
|
|
307
|
+
}
|
|
308
|
+
//#endregion
|
|
309
|
+
//#region src/LogStream/LogStream.vue.d.ts
|
|
310
|
+
type __VLS_Props = LogStreamProps;
|
|
311
|
+
type __VLS_ModelProps = {
|
|
312
|
+
'isFollowing'?: boolean;
|
|
313
|
+
};
|
|
314
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
315
|
+
declare var __VLS_2: {
|
|
316
|
+
entry: LogEntry;
|
|
317
|
+
}, __VLS_13: {
|
|
318
|
+
entry: LogEntry;
|
|
319
|
+
};
|
|
320
|
+
type __VLS_Slots$1 = {} & {
|
|
321
|
+
entry?: (props: typeof __VLS_2) => any;
|
|
322
|
+
} & {
|
|
323
|
+
detail?: (props: typeof __VLS_13) => any;
|
|
324
|
+
};
|
|
325
|
+
declare const __VLS_base$1: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
326
|
+
"update:isFollowing": (value: boolean) => any;
|
|
327
|
+
followChange: (following: boolean) => any;
|
|
328
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
329
|
+
"onUpdate:isFollowing"?: ((value: boolean) => any) | undefined;
|
|
330
|
+
onFollowChange?: ((following: boolean) => any) | undefined;
|
|
331
|
+
}>, {
|
|
332
|
+
label: string;
|
|
333
|
+
variant: "default" | "terminal";
|
|
334
|
+
maxHeight: string | number;
|
|
335
|
+
hasTimestamps: boolean;
|
|
336
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
337
|
+
declare const __VLS_export$5: __VLS_WithSlots$1<typeof __VLS_base$1, __VLS_Slots$1>;
|
|
338
|
+
declare const _default$3: typeof __VLS_export$5;
|
|
339
|
+
type __VLS_WithSlots$1<T, S> = T & {
|
|
340
|
+
new (): {
|
|
341
|
+
$slots: S;
|
|
342
|
+
};
|
|
343
|
+
};
|
|
344
|
+
//#endregion
|
|
345
|
+
//#region src/MobileTokenizer/types.d.ts
|
|
346
|
+
/**
|
|
347
|
+
* 一条可搜索的候选项。字段和 core `Typeahead` 的 `SearchableItem` 一致,
|
|
348
|
+
* 这样 core 的 `SearchSource` 可以直接传进来。
|
|
349
|
+
*/
|
|
350
|
+
interface SearchableItem {
|
|
351
|
+
id: string;
|
|
352
|
+
label: string;
|
|
353
|
+
disabled?: boolean;
|
|
354
|
+
description?: string;
|
|
355
|
+
}
|
|
356
|
+
/**
|
|
357
|
+
* 搜索数据源。同步数组和 Promise 都可以,和 core `Typeahead` 的 `SearchSource` 同形。
|
|
358
|
+
* 空查询时优先走 `bootstrap`,没有就用空字符串搜一次。
|
|
359
|
+
*/
|
|
360
|
+
interface SearchSource<T extends SearchableItem = SearchableItem> {
|
|
361
|
+
search: (query: string, signal?: AbortSignal) => Promise<T[]> | T[];
|
|
362
|
+
bootstrap?: (signal?: AbortSignal) => Promise<T[]> | T[];
|
|
363
|
+
cancel?: () => void;
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* 一次选择变化。`add` 加已有条目,`create` 加用户新造的值,
|
|
367
|
+
* `remove` 去掉一条。一次清空全部时 `item` 是原来最后一条。
|
|
368
|
+
*/
|
|
369
|
+
type MobileTokenizerChange<T extends SearchableItem = SearchableItem> = {
|
|
370
|
+
item: T;
|
|
371
|
+
type: 'add';
|
|
372
|
+
} | {
|
|
373
|
+
item: T;
|
|
374
|
+
type: 'create';
|
|
375
|
+
} | {
|
|
376
|
+
item: T;
|
|
377
|
+
type: 'remove';
|
|
378
|
+
};
|
|
379
|
+
interface MobileTokenizerProps<T extends SearchableItem = SearchableItem> {
|
|
380
|
+
/** 字段标签,同时是底部面板的无障碍名。 */
|
|
381
|
+
label: string;
|
|
382
|
+
searchSource: SearchSource<T>;
|
|
383
|
+
modelValue?: readonly T[];
|
|
384
|
+
/** 一条都没选时触发器里的提示文字。 */
|
|
385
|
+
placeholder?: string;
|
|
386
|
+
/** 标签下方的说明。 */
|
|
387
|
+
description?: string;
|
|
388
|
+
isOptional?: boolean;
|
|
389
|
+
isDisabled?: boolean;
|
|
390
|
+
/** 给没匹配上的文字提供 `Create "…"` 的加一项操作。 */
|
|
391
|
+
hasCreate?: boolean;
|
|
392
|
+
/** 最多选几条;到上限后没选中的行会禁用。 */
|
|
393
|
+
maxEntries?: number;
|
|
394
|
+
/** 搜索结果最多留多少条,超出的靠滚动分批画出来。 */
|
|
395
|
+
maxMenuItems?: number;
|
|
396
|
+
/** 少于这么多字符就不搜。 */
|
|
397
|
+
minQueryLength?: number;
|
|
398
|
+
/** 输入停顿多久之后才搜,单位毫秒。 */
|
|
399
|
+
debounceMs?: number;
|
|
400
|
+
/** 搜索没有结果时显示的标题。 */
|
|
401
|
+
emptySearchResultsText?: string;
|
|
402
|
+
}
|
|
403
|
+
interface MobileTokenizerEmits<T extends SearchableItem = SearchableItem> {
|
|
404
|
+
'update:modelValue': [value: T[]];
|
|
405
|
+
'change': [value: T[], change: MobileTokenizerChange<T>];
|
|
406
|
+
'update:query': [query: string];
|
|
407
|
+
'changeQuery': [query: string];
|
|
408
|
+
'openChange': [isOpen: boolean];
|
|
409
|
+
}
|
|
410
|
+
//#endregion
|
|
411
|
+
//#region src/MobileTokenizer/MobileTokenizer.vue.d.ts
|
|
412
|
+
declare const __VLS_export$4: <T extends SearchableItem>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal$2<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
413
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal$2<MobileTokenizerProps<T> & {
|
|
414
|
+
"onUpdate:modelValue"?: ((value: T[]) => any) | undefined;
|
|
415
|
+
onChange?: ((value: T[], change: MobileTokenizerChange<T>) => any) | undefined;
|
|
416
|
+
"onUpdate:query"?: ((query: string) => any) | undefined;
|
|
417
|
+
onChangeQuery?: ((query: string) => any) | undefined;
|
|
418
|
+
onOpenChange?: ((isOpen: boolean) => any) | undefined;
|
|
419
|
+
}> & (typeof globalThis extends {
|
|
420
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
421
|
+
} ? P : {});
|
|
422
|
+
expose: (exposed: {}) => void;
|
|
423
|
+
attrs: any;
|
|
424
|
+
slots: {};
|
|
425
|
+
emit: ((evt: "update:modelValue", value: T[]) => void) & ((evt: "change", value: T[], change: MobileTokenizerChange<T>) => void) & ((evt: "update:query", query: string) => void) & ((evt: "changeQuery", query: string) => void) & ((evt: "openChange", isOpen: boolean) => void);
|
|
426
|
+
}>) => import("vue").VNode & {
|
|
427
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
428
|
+
};
|
|
429
|
+
declare const _default$4: typeof __VLS_export$4;
|
|
430
|
+
type __VLS_PrettifyLocal$2<T> = (T extends any ? { [K in keyof T]: T[K]; } : { [K in keyof T as K]: T[K]; }) & {};
|
|
431
|
+
//#endregion
|
|
432
|
+
//#region src/Stat/types.d.ts
|
|
433
|
+
/** Trend direction of a delta; picks the glyph (up/down arrow, flat dash). */
|
|
434
|
+
type StatDeltaDirection = 'up' | 'down' | 'flat';
|
|
435
|
+
/** Color tone of a delta; overrides the default direction mapping. */
|
|
436
|
+
type StatDeltaSentiment = 'positive' | 'negative' | 'neutral';
|
|
437
|
+
/** Size variant controlling the value's font size. */
|
|
438
|
+
type StatSize = 'sm' | 'md' | 'lg';
|
|
439
|
+
/** Change indicator rendered next to the value: a direction glyph plus colored text. */
|
|
440
|
+
interface StatDelta {
|
|
441
|
+
/** Pre-formatted change text, e.g. `"+12.4%"` or `"-8 ms"`. */
|
|
442
|
+
value: string;
|
|
443
|
+
/** Trend direction. Picks the glyph and the default sentiment. */
|
|
444
|
+
direction: StatDeltaDirection;
|
|
445
|
+
/** Overrides the direction-to-color mapping, for metrics where down is good. */
|
|
446
|
+
sentiment?: StatDeltaSentiment;
|
|
447
|
+
}
|
|
448
|
+
interface StatProps {
|
|
449
|
+
/** Metric name shown above the value, e.g. "Total requests". */
|
|
450
|
+
label: string;
|
|
451
|
+
/**
|
|
452
|
+
* 预先格式化好的核心数值,如 `"1.2M"`。
|
|
453
|
+
* 要放富内容(带单位的小字、图标)时改用默认插槽,插槽优先。
|
|
454
|
+
*/
|
|
455
|
+
value?: string;
|
|
456
|
+
/** Change indicator rendered next to the value. */
|
|
457
|
+
delta?: StatDelta;
|
|
458
|
+
/** Muted supporting line under the value, e.g. "vs. previous 30 days". */
|
|
459
|
+
description?: string;
|
|
460
|
+
/**
|
|
461
|
+
* Size variant controlling the value's font size.
|
|
462
|
+
* @default 'md'
|
|
463
|
+
*/
|
|
464
|
+
size?: StatSize;
|
|
465
|
+
}
|
|
466
|
+
//#endregion
|
|
467
|
+
//#region src/Stat/Stat.vue.d.ts
|
|
468
|
+
declare var __VLS_1: {}, __VLS_3: {};
|
|
469
|
+
type __VLS_Slots = {} & {
|
|
470
|
+
default?: (props: typeof __VLS_1) => any;
|
|
471
|
+
} & {
|
|
472
|
+
media?: (props: typeof __VLS_3) => any;
|
|
473
|
+
};
|
|
474
|
+
declare const __VLS_base: import("vue").DefineComponent<StatProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<StatProps> & Readonly<{}>, {
|
|
475
|
+
value: string;
|
|
476
|
+
delta: StatDelta;
|
|
477
|
+
description: string;
|
|
478
|
+
size: StatSize;
|
|
479
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
480
|
+
declare const __VLS_export$3: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
481
|
+
declare const _default$6: typeof __VLS_export$3;
|
|
482
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
483
|
+
new (): {
|
|
484
|
+
$slots: S;
|
|
485
|
+
};
|
|
486
|
+
};
|
|
487
|
+
//#endregion
|
|
488
|
+
//#region src/SVGIcon/types.d.ts
|
|
489
|
+
type SVGIconVariation = 'linear' | 'bold' | 'twotone' | 'bulk' | 'broken';
|
|
490
|
+
type SVGIconSize = 'xsm' | 'sm' | 'md' | 'lg';
|
|
491
|
+
type SVGIconColor = 'primary' | 'secondary' | 'disabled' | 'accent' | 'positive' | 'negative' | 'warning' | 'inherit';
|
|
492
|
+
/**
|
|
493
|
+
* 一个图形元素在不同变体下的表现:
|
|
494
|
+
* - `fill`:闭合形状。linear 里描边,bold 里填充。
|
|
495
|
+
* - `stroke`:线条和细节。所有变体下都保持描边。
|
|
496
|
+
*/
|
|
497
|
+
type IconShapeRole = 'fill' | 'stroke';
|
|
498
|
+
/** 图标一层里的一个图形元素。 */
|
|
499
|
+
interface IconShape {
|
|
500
|
+
/** SVG 元素类型。 */
|
|
501
|
+
type: 'path' | 'circle' | 'rect' | 'line' | 'polyline' | 'polygon';
|
|
502
|
+
/** 这个元素的 SVG 属性(d、cx、cy、r、points、x1、y1 等)。 */
|
|
503
|
+
attrs: Record<string, string>;
|
|
504
|
+
/**
|
|
505
|
+
* 这个元素在不同变体下的表现。
|
|
506
|
+
* @default 'fill'
|
|
507
|
+
*/
|
|
508
|
+
role?: IconShapeRole;
|
|
509
|
+
}
|
|
510
|
+
/** 一个图标图形的定义。 */
|
|
511
|
+
interface SVGIconDef {
|
|
512
|
+
/** 显示名。 */
|
|
513
|
+
name: string;
|
|
514
|
+
/** 视口尺寸。 @default '0 0 24 24' */
|
|
515
|
+
viewBox?: string;
|
|
516
|
+
/** 主层图形(主体轮廓)。 */
|
|
517
|
+
primary: IconShape[];
|
|
518
|
+
/** 次层图形(细节)。 */
|
|
519
|
+
secondary?: IconShape[];
|
|
520
|
+
}
|
|
521
|
+
interface SVGIconProps {
|
|
522
|
+
/** 图标定义,带路径数据。 */
|
|
523
|
+
icon: SVGIconDef;
|
|
524
|
+
/**
|
|
525
|
+
* 变体预设。
|
|
526
|
+
* @default 'linear'
|
|
527
|
+
*/
|
|
528
|
+
variation?: SVGIconVariation;
|
|
529
|
+
/**
|
|
530
|
+
* 尺寸,带光学描边补偿:越小描边越粗。
|
|
531
|
+
* @default 'md'
|
|
532
|
+
*/
|
|
533
|
+
size?: SVGIconSize;
|
|
534
|
+
/**
|
|
535
|
+
* 语义颜色。
|
|
536
|
+
* @default 'primary'
|
|
537
|
+
*/
|
|
538
|
+
color?: SVGIconColor;
|
|
539
|
+
/** 直接指定描边宽度,绕过光学补偿。 */
|
|
540
|
+
strokeWidth?: number;
|
|
541
|
+
}
|
|
542
|
+
//#endregion
|
|
543
|
+
//#region src/SVGIcon/icons.d.ts
|
|
544
|
+
/** Simple stroke-only: X / Close — both lines are stroke-role */
|
|
545
|
+
export declare const xIcon: SVGIconDef;
|
|
546
|
+
/** Simple stroke-only: Check */
|
|
547
|
+
export declare const checkIcon: SVGIconDef;
|
|
548
|
+
/** Two-layer with mixed roles: Bell body is fill, clapper is stroke */
|
|
549
|
+
export declare const bellIcon: SVGIconDef;
|
|
550
|
+
/**
|
|
551
|
+
* Two-layer: Home — house outline is fill, door is fill (secondary).
|
|
552
|
+
* In bold mode the door gets masked out of the house body.
|
|
553
|
+
*/
|
|
554
|
+
export declare const homeIcon: SVGIconDef;
|
|
555
|
+
/** Complex: Settings — gear body is fill, center circle is fill (secondary, masked in bold) */
|
|
556
|
+
export declare const settingsIcon: SVGIconDef;
|
|
557
|
+
/** Mixed roles: Calendar frame is fill, pegs are stroke, divider line is stroke */
|
|
558
|
+
export declare const calendarIcon: SVGIconDef;
|
|
559
|
+
/** Stroke-only: Menu / Hamburger — all lines are stroke-role */
|
|
560
|
+
export declare const menuIcon: SVGIconDef;
|
|
561
|
+
/** Single curved path: Heart */
|
|
562
|
+
export declare const heartIcon: SVGIconDef;
|
|
563
|
+
/** Nested shapes: Eye — outer shape (fill) + pupil (fill, secondary) */
|
|
564
|
+
export declare const eyeIcon: SVGIconDef;
|
|
565
|
+
/** Complex single path: Star */
|
|
566
|
+
export declare const starIcon: SVGIconDef;
|
|
567
|
+
/** Single panel: Folder */
|
|
568
|
+
export declare const folderIcon: SVGIconDef;
|
|
569
|
+
/** Single path: Shield */
|
|
570
|
+
export declare const shieldIcon: SVGIconDef;
|
|
571
|
+
/** Mixed: Search — glass (fill) + handle (stroke, secondary) */
|
|
572
|
+
export declare const searchIcon: SVGIconDef;
|
|
573
|
+
/** Mixed: Mail — body (fill) + flap line (stroke, secondary) */
|
|
574
|
+
export declare const mailIcon: SVGIconDef;
|
|
575
|
+
/** Mixed: Lock — body (fill) + shackle (stroke) */
|
|
576
|
+
export declare const lockIcon: SVGIconDef;
|
|
577
|
+
/** All starter icons for convenience */
|
|
578
|
+
export declare const starterIcons: SVGIconDef[];
|
|
579
|
+
//#endregion
|
|
580
|
+
//#region src/SVGIcon/pathTransforms/transforms.d.ts
|
|
581
|
+
/**
|
|
582
|
+
* @file pathTransforms/transforms.ts
|
|
583
|
+
* @description 按百分比调整路径的三个人格轴:圆角、曲率、张力。
|
|
584
|
+
*
|
|
585
|
+
* 变形保留原图的主次关系——尖角比圆角动得多,直线比已有曲线动得多。
|
|
586
|
+
*/
|
|
587
|
+
/**
|
|
588
|
+
* Round corners at L→L junctions by inserting quadratic bezier curves.
|
|
589
|
+
*
|
|
590
|
+
* @param d - SVG path d-string
|
|
591
|
+
* @param cornerRounding - 0-1 percentile. 0 = sharp (no change). 1 = max rounding.
|
|
592
|
+
* @returns Modified d-string with rounded corners
|
|
593
|
+
*/
|
|
594
|
+
export declare function roundCorners(d: string, cornerRounding: number): string;
|
|
595
|
+
/**
|
|
596
|
+
* Bow straight line segments by replacing L with Q.
|
|
597
|
+
*
|
|
598
|
+
* @param d - SVG path d-string
|
|
599
|
+
* @param curvature - 0-1 percentile. 0 = straight. 1 = max bow.
|
|
600
|
+
* @returns Modified d-string with curved segments
|
|
601
|
+
*/
|
|
602
|
+
export declare function addCurvature(d: string, curvature: number): string;
|
|
603
|
+
/**
|
|
604
|
+
* Adjust tension on existing bezier curves.
|
|
605
|
+
*
|
|
606
|
+
* @param d - SVG path d-string
|
|
607
|
+
* @param tension - 0-1. 0 = loose (curves balloon). 0.5 = unchanged. 1 = tight.
|
|
608
|
+
* @returns Modified d-string
|
|
609
|
+
*/
|
|
610
|
+
export declare function adjustTension(d: string, tension: number): string;
|
|
611
|
+
interface PathPersonality {
|
|
612
|
+
cornerRounding?: number;
|
|
613
|
+
segmentCurvature?: number;
|
|
614
|
+
tension?: number;
|
|
615
|
+
}
|
|
616
|
+
/**
|
|
617
|
+
* Apply all personality transforms to a path d-string.
|
|
618
|
+
* Order: corner rounding → segment curvature → tension.
|
|
619
|
+
*/
|
|
620
|
+
export declare function applyPersonality(d: string, personality: PathPersonality): string;
|
|
621
|
+
//#endregion
|
|
622
|
+
//#region src/SVGIcon/SVGIcon.vue.d.ts
|
|
623
|
+
declare const __VLS_export$2: import("vue").DefineComponent<SVGIconProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<SVGIconProps> & Readonly<{}>, {
|
|
624
|
+
size: SVGIconSize;
|
|
625
|
+
strokeWidth: number;
|
|
626
|
+
variation: SVGIconVariation;
|
|
627
|
+
color: SVGIconColor;
|
|
628
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
629
|
+
declare const _default$5: typeof __VLS_export$2;
|
|
630
|
+
//#endregion
|
|
631
|
+
//#region src/SVGIcon/types-xif.d.ts
|
|
632
|
+
/**
|
|
633
|
+
* @file xif-types.ts
|
|
634
|
+
* @description Astryx Icon Format (XIF) type definitions — v0.1.0 draft
|
|
635
|
+
*
|
|
636
|
+
* Icons are pure structure — zero visual values. The theme resolves
|
|
637
|
+
* all visual properties (color, weight, rounding, timing).
|
|
638
|
+
*
|
|
639
|
+
* This file defines the SOURCE format types. The resolved/build output
|
|
640
|
+
* uses a simpler pre-computed format (see theme build pipeline).
|
|
641
|
+
*/
|
|
642
|
+
/**
|
|
643
|
+
* Percentile adjustment parameters for shape personality.
|
|
644
|
+
* All values 0-1. 0 = artist's original. 1 = maximum shift.
|
|
645
|
+
* Adjustments are RELATIVE — they preserve the artist's hierarchy
|
|
646
|
+
* of sharp vs soft, straight vs curved.
|
|
647
|
+
*/
|
|
648
|
+
interface XIFPersonality {
|
|
649
|
+
/**
|
|
650
|
+
* Shift corners toward rounded.
|
|
651
|
+
* A sharp 90° corner shifts more than an already-gentle 150° corner.
|
|
652
|
+
* Formula: adjustedR = baseR + (maxR - baseR) × cornerRounding
|
|
653
|
+
*/
|
|
654
|
+
cornerRounding?: number;
|
|
655
|
+
/**
|
|
656
|
+
* Shift straight segments toward curved.
|
|
657
|
+
* A straight line gains a bow; an existing curve barely changes.
|
|
658
|
+
* Formula: adjusted = original + (1 - original) × segmentCurvature
|
|
659
|
+
*/
|
|
660
|
+
segmentCurvature?: number;
|
|
661
|
+
/**
|
|
662
|
+
* How tightly curves hug their control points.
|
|
663
|
+
* 0 = loose (curves balloon). 0.5 = neutral. 1 = tight (near-straight).
|
|
664
|
+
*/
|
|
665
|
+
tension?: number;
|
|
666
|
+
}
|
|
667
|
+
/**
|
|
668
|
+
* Animation intent for a path element.
|
|
669
|
+
* Declares WHAT animates and in WHAT ORDER — not timing or easing.
|
|
670
|
+
* The theme resolves all visual animation properties.
|
|
671
|
+
*/
|
|
672
|
+
interface XIFAnimate {
|
|
673
|
+
/**
|
|
674
|
+
* Semantic animation type.
|
|
675
|
+
* - draw: stroke reveals along path (dasharray/dashoffset)
|
|
676
|
+
* - fade: opacity entrance
|
|
677
|
+
* - scale: grow from center
|
|
678
|
+
* - rotate: continuous spin (loaders)
|
|
679
|
+
* - morph: interpolate between variation states
|
|
680
|
+
*/
|
|
681
|
+
type: 'draw' | 'fade' | 'scale' | 'rotate' | 'morph';
|
|
682
|
+
/**
|
|
683
|
+
* Stagger order. Lower numbers animate first.
|
|
684
|
+
* Paths with the same sequence animate simultaneously.
|
|
685
|
+
*/
|
|
686
|
+
sequence?: number;
|
|
687
|
+
}
|
|
688
|
+
/**
|
|
689
|
+
* A named position where a sub-icon can be injected.
|
|
690
|
+
* The theme resolves position/size to actual viewBox coordinates.
|
|
691
|
+
*/
|
|
692
|
+
interface XIFSlot {
|
|
693
|
+
/** Slot identifier — used in component props */
|
|
694
|
+
name: string;
|
|
695
|
+
/** Semantic position. Theme resolves to coordinates. */
|
|
696
|
+
position: 'center' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | {
|
|
697
|
+
x: number;
|
|
698
|
+
y: number;
|
|
699
|
+
};
|
|
700
|
+
/**
|
|
701
|
+
* Size of the injected icon relative to parent.
|
|
702
|
+
* 'content' = auto-sized by theme. number = fraction of parent.
|
|
703
|
+
*/
|
|
704
|
+
size?: 'content' | number;
|
|
705
|
+
}
|
|
706
|
+
/**
|
|
707
|
+
* A single shape element within an icon.
|
|
708
|
+
* Contains geometry + semantic metadata. Zero visual values.
|
|
709
|
+
*/
|
|
710
|
+
interface XIFPath {
|
|
711
|
+
/** SVG element type. Default: 'path' */
|
|
712
|
+
type?: 'path' | 'circle' | 'rect' | 'line' | 'polyline' | 'ellipse' | 'polygon';
|
|
713
|
+
/** SVG geometry attributes (d, cx, cy, r, x, y, width, height, etc.) */
|
|
714
|
+
attrs: Record<string, string | number>;
|
|
715
|
+
/**
|
|
716
|
+
* Rendering behavior across variations.
|
|
717
|
+
* - 'fill': Closed shape — stroked in linear, filled in bold.
|
|
718
|
+
* - 'stroke': Line/detail — always rendered as a stroke.
|
|
719
|
+
* Default: 'fill'
|
|
720
|
+
*/
|
|
721
|
+
role?: 'fill' | 'stroke';
|
|
722
|
+
/**
|
|
723
|
+
* Visual hierarchy for twotone/bulk and bold knockouts.
|
|
724
|
+
* - 'primary': Full opacity. In bold, rendered as solid fill.
|
|
725
|
+
* - 'secondary': Reduced opacity in twotone/bulk. Knocked out in bold.
|
|
726
|
+
* Default: 'primary'
|
|
727
|
+
*/
|
|
728
|
+
layer?: 'primary' | 'secondary';
|
|
729
|
+
/** Per-path personality overrides (shift from theme/icon defaults) */
|
|
730
|
+
personality?: XIFPersonality;
|
|
731
|
+
/** Animation intent */
|
|
732
|
+
animate?: XIFAnimate;
|
|
733
|
+
}
|
|
734
|
+
/**
|
|
735
|
+
* Root type for an Astryx Icon Format definition.
|
|
736
|
+
* Pure structure — no visual values.
|
|
737
|
+
*/
|
|
738
|
+
interface XIFIcon {
|
|
739
|
+
/** Unique identifier */
|
|
740
|
+
name: string;
|
|
741
|
+
/** ViewBox dimensions. Default: '0 0 24 24' */
|
|
742
|
+
viewBox?: string;
|
|
743
|
+
/** Shape elements that compose the icon */
|
|
744
|
+
paths: XIFPath[];
|
|
745
|
+
/**
|
|
746
|
+
* Per-variation geometry overrides.
|
|
747
|
+
* Rendered in DOM alongside default paths; CSS toggles visibility.
|
|
748
|
+
*/
|
|
749
|
+
overrides?: {
|
|
750
|
+
bold?: XIFPath[];
|
|
751
|
+
broken?: XIFPath[];
|
|
752
|
+
};
|
|
753
|
+
/** Named slots for sub-icon composition */
|
|
754
|
+
slots?: XIFSlot[];
|
|
755
|
+
/** Icon-level personality overrides */
|
|
756
|
+
personality?: XIFPersonality;
|
|
757
|
+
/** Tags for search and categorization */
|
|
758
|
+
tags?: string[];
|
|
759
|
+
}
|
|
760
|
+
//#endregion
|
|
761
|
+
//#region src/SVGIcon/xif-examples.d.ts
|
|
762
|
+
export declare const xifCheck: XIFIcon;
|
|
763
|
+
export declare const xifHome: XIFIcon;
|
|
764
|
+
export declare const xifFile: XIFIcon;
|
|
765
|
+
export declare const xifShield: XIFIcon;
|
|
766
|
+
export declare const xifBell: XIFIcon;
|
|
767
|
+
export declare const xifStar: XIFIcon;
|
|
768
|
+
export declare const xifBellOverride: XIFIcon;
|
|
769
|
+
export declare const xifExamples: XIFIcon[];
|
|
770
|
+
//#endregion
|
|
771
|
+
//#region src/TransferList/types.d.ts
|
|
772
|
+
/** 一个可搬运的选项。`value` 唯一,`label` 是可见文字,也是操作名的来源。 */
|
|
773
|
+
interface TransferListOption<T extends string = string> {
|
|
774
|
+
value: T;
|
|
775
|
+
label: string;
|
|
776
|
+
/** 搜索时会一起匹配的补充说明。默认行里不显示。 */
|
|
777
|
+
description?: VNodeChild;
|
|
778
|
+
/** 可选面板里的分组标题。 */
|
|
779
|
+
group?: string;
|
|
780
|
+
/** 不能在两栏之间搬动。 */
|
|
781
|
+
isTransferDisabled?: boolean;
|
|
782
|
+
/** 不能在已选栏里调整顺序,位置固定。 */
|
|
783
|
+
isReorderDisabled?: boolean;
|
|
784
|
+
/** 说明为什么搬不动或调不了顺序。 */
|
|
785
|
+
disabledMessage?: string;
|
|
786
|
+
}
|
|
787
|
+
interface TransferListProps<T extends string = string> {
|
|
788
|
+
/** 整个控件的无障碍名。 */
|
|
789
|
+
label: string;
|
|
790
|
+
/** 视觉上隐藏标签,读屏仍然读得到。 */
|
|
791
|
+
isLabelHidden?: boolean;
|
|
792
|
+
/** 标签下方的说明。 */
|
|
793
|
+
description?: string;
|
|
794
|
+
/** 完整的选项表,`value` 不能重复。 */
|
|
795
|
+
options: readonly TransferListOption<T>[];
|
|
796
|
+
/** 已选项的顺序,同时是唯一的真相来源。 */
|
|
797
|
+
modelValue?: readonly T[];
|
|
798
|
+
/** 已选面板的标题。默认取文案表。 */
|
|
799
|
+
selectedLabel?: string;
|
|
800
|
+
/** 可选面板的标题。默认取文案表。 */
|
|
801
|
+
availableLabel?: string;
|
|
802
|
+
/** 一个搜索框同时过滤两栏。 */
|
|
803
|
+
hasSearch?: boolean;
|
|
804
|
+
/** 搜索框的无障碍名。默认是 `Search {label}`。 */
|
|
805
|
+
searchLabel?: string;
|
|
806
|
+
searchPlaceholder?: string;
|
|
807
|
+
/** 已选项可以拖动或按键调整顺序。 */
|
|
808
|
+
isReorderable?: boolean;
|
|
809
|
+
/** 显示「全部添加」。 */
|
|
810
|
+
hasSelectAll?: boolean;
|
|
811
|
+
/** 显示「清空」。搬不动的已选项会留下。 */
|
|
812
|
+
hasClear?: boolean;
|
|
813
|
+
selectedEmptyText?: string;
|
|
814
|
+
availableEmptyText?: string;
|
|
815
|
+
noResultsText?: string;
|
|
816
|
+
}
|
|
817
|
+
interface TransferListEmits<T extends string = string> {
|
|
818
|
+
'update:modelValue': [value: readonly T[]];
|
|
819
|
+
'change': [value: readonly T[]];
|
|
820
|
+
}
|
|
821
|
+
interface TransferListSlots<T extends string = string> {
|
|
822
|
+
/** 自定义一行里的内容。 */
|
|
823
|
+
option?: (props: {
|
|
824
|
+
option: TransferListOption<T>;
|
|
825
|
+
}) => VNodeChild;
|
|
826
|
+
}
|
|
827
|
+
/** 面板里的一行:选项本身,加上它在这一栏里的位置。 */
|
|
828
|
+
interface PanelRow<T extends string = string> {
|
|
829
|
+
option: TransferListOption<T>;
|
|
830
|
+
index: number;
|
|
831
|
+
}
|
|
832
|
+
/** 可选栏按 `group` 分出来的一段。 */
|
|
833
|
+
interface PanelGroup<T extends string = string> {
|
|
834
|
+
group: string;
|
|
835
|
+
options: PanelRow<T>[];
|
|
836
|
+
}
|
|
837
|
+
//#endregion
|
|
838
|
+
//#region src/TransferList/TransferList.vue.d.ts
|
|
839
|
+
declare const __VLS_export$1: <T extends string>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal$1<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
840
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal$1<TransferListProps<T> & {
|
|
841
|
+
"onUpdate:modelValue"?: ((value: readonly T[]) => any) | undefined;
|
|
842
|
+
onChange?: ((value: readonly T[]) => any) | undefined;
|
|
843
|
+
}> & (typeof globalThis extends {
|
|
844
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
845
|
+
} ? P : {});
|
|
846
|
+
expose: (exposed: {}) => void;
|
|
847
|
+
attrs: any;
|
|
848
|
+
slots: TransferListSlots<T>;
|
|
849
|
+
emit: ((evt: "update:modelValue", value: readonly T[]) => void) & ((evt: "change", value: readonly T[]) => void);
|
|
850
|
+
}>) => import("vue").VNode & {
|
|
851
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
852
|
+
};
|
|
853
|
+
declare const _default$7: typeof __VLS_export$1;
|
|
854
|
+
type __VLS_PrettifyLocal$1<T> = (T extends any ? { [K in keyof T]: T[K]; } : { [K in keyof T as K]: T[K]; }) & {};
|
|
855
|
+
//#endregion
|
|
856
|
+
//#region src/TransferList/TransferListSelector.vue.d.ts
|
|
857
|
+
declare const __VLS_export: <T extends string>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
858
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<{
|
|
859
|
+
label: string;
|
|
860
|
+
modelValue?: readonly T[];
|
|
861
|
+
options: readonly TransferListOption<T>[];
|
|
862
|
+
description?: string;
|
|
863
|
+
isLabelHidden?: boolean;
|
|
864
|
+
isOptional?: boolean;
|
|
865
|
+
isRequired?: boolean;
|
|
866
|
+
isDisabled?: boolean;
|
|
867
|
+
isLoading?: boolean;
|
|
868
|
+
labelTooltip?: string;
|
|
869
|
+
status?: FieldStatusInput;
|
|
870
|
+
statusVariant?: "attached" | "detached" | "tooltip";
|
|
871
|
+
size?: "sm" | "md" | "lg";
|
|
872
|
+
width?: number | string;
|
|
873
|
+
placement?: PopoverPlacement;
|
|
874
|
+
triggerLabel?: string;
|
|
875
|
+
selectedLabel?: string;
|
|
876
|
+
availableLabel?: string;
|
|
877
|
+
hasSearch?: boolean;
|
|
878
|
+
searchLabel?: string;
|
|
879
|
+
searchPlaceholder?: string;
|
|
880
|
+
isReorderable?: boolean;
|
|
881
|
+
hasSelectAll?: boolean;
|
|
882
|
+
hasClear?: boolean;
|
|
883
|
+
selectedEmptyText?: string;
|
|
884
|
+
availableEmptyText?: string;
|
|
885
|
+
noResultsText?: string;
|
|
886
|
+
/** `immediate` 每次改动立刻生效,`staged` 等用户按 Apply。 */
|
|
887
|
+
commitBehavior?: "immediate" | "staged";
|
|
888
|
+
applyLabel?: string;
|
|
889
|
+
cancelLabel?: string;
|
|
890
|
+
} & {
|
|
891
|
+
"onUpdate:modelValue"?: ((value: readonly T[]) => any) | undefined;
|
|
892
|
+
onChange?: ((value: readonly T[]) => any) | undefined;
|
|
893
|
+
onOpenChange?: ((isOpen: boolean) => any) | undefined;
|
|
894
|
+
onChangeAction?: ((value: readonly T[]) => any) | undefined;
|
|
895
|
+
}> & (typeof globalThis extends {
|
|
896
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
897
|
+
} ? P : {});
|
|
898
|
+
expose: (exposed: {}) => void;
|
|
899
|
+
attrs: any;
|
|
900
|
+
slots: {
|
|
901
|
+
option?: (props: {
|
|
902
|
+
option: TransferListOption<T>;
|
|
903
|
+
}) => any;
|
|
904
|
+
};
|
|
905
|
+
emit: ((evt: "update:modelValue", value: readonly T[]) => void) & ((evt: "change", value: readonly T[]) => void) & ((evt: "openChange", isOpen: boolean) => void) & ((evt: "changeAction", value: readonly T[]) => void);
|
|
906
|
+
}>) => import("vue").VNode & {
|
|
907
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
908
|
+
};
|
|
909
|
+
declare const _default$8: typeof __VLS_export;
|
|
910
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K]; } : { [K in keyof T as K]: T[K]; }) & {};
|
|
911
|
+
//#endregion
|
|
912
|
+
export { _default as CircularProgress, type CircularProgressProps, type CircularProgressSize, type CircularProgressVariant, type CircularProgressVariantMap, type IconShape, type IconShapeRole, _default$1 as InfoTip, type InfoTipProps, type InfoTipSize, _default$2 as ListInput, type ListInputChange, type ListInputColumn, type ListInputColumnWidth, type ListInputEmits, type ListInputProps, type ListInputRenderContext, type ListInputValueContext, type LogEntry, _default$3 as LogStream, type LogStreamEmits, type LogStreamLevel, type LogStreamProps, _default$4 as MobileTokenizer, type MobileTokenizerChange, type MobileTokenizerEmits, type MobileTokenizerProps, type PanelGroup, type PanelRow, type PathPersonality, _default$5 as SVGIcon, type SVGIconColor, type SVGIconDef, type SVGIconProps, type SVGIconSize, type SVGIconVariation, type SearchSource, type SearchableItem, _default$6 as Stat, type StatDelta, type StatDeltaDirection, type StatDeltaSentiment, type StatProps, type StatSize, _default$7 as TransferList, type TransferListEmits, type TransferListOption, type TransferListProps, _default$8 as TransferListSelector, type TransferListSlots, type XIFAnimate, type XIFIcon, type XIFPath, type XIFPersonality, type XIFSlot };
|