@shwfed/nuxt 0.10.3 → 0.10.5
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/dist/module.json +1 -1
- package/dist/runtime/components/button.d.vue.ts +95 -0
- package/dist/runtime/components/button.vue +39 -0
- package/dist/runtime/components/button.vue.d.ts +95 -0
- package/dist/runtime/components/fields.d.vue.ts +2 -2
- package/dist/runtime/components/fields.vue.d.ts +2 -2
- package/dist/runtime/components/ui/button-configurator/ButtonConfiguratorDialog.d.vue.ts +97 -0
- package/dist/runtime/components/ui/button-configurator/ButtonConfiguratorDialog.vue +1078 -0
- package/dist/runtime/components/ui/button-configurator/ButtonConfiguratorDialog.vue.d.ts +97 -0
- package/dist/runtime/components/ui/button-configurator/menu.d.ts +48 -0
- package/dist/runtime/components/ui/button-configurator/menu.js +381 -0
- package/dist/runtime/components/ui/buttons/Buttons.d.vue.ts +95 -0
- package/dist/runtime/components/ui/buttons/Buttons.vue +330 -0
- package/dist/runtime/components/ui/buttons/Buttons.vue.d.ts +95 -0
- package/dist/runtime/components/ui/buttons/schema.d.ts +374 -0
- package/dist/runtime/components/ui/buttons/schema.js +58 -0
- package/dist/runtime/components/ui/fields/Fields.d.vue.ts +4 -4
- package/dist/runtime/components/ui/fields/Fields.vue.d.ts +4 -4
- package/dist/runtime/components/ui/fields/schema.d.ts +3 -3
- package/dist/runtime/components/ui/fields-configurator/FieldsConfiguratorDialog.d.vue.ts +2 -2
- package/dist/runtime/components/ui/fields-configurator/FieldsConfiguratorDialog.vue.d.ts +2 -2
- package/dist/runtime/components/ui/table/Table.vue +11 -10
- package/package.json +1 -1
|
@@ -0,0 +1,374 @@
|
|
|
1
|
+
import z from 'zod';
|
|
2
|
+
import type { ButtonVariants } from '../button/index.js';
|
|
3
|
+
export declare const ButtonsStyleC: z.ZodOptional<z.ZodString>;
|
|
4
|
+
export declare const ButtonActionC: z.ZodReadonly<z.ZodObject<{
|
|
5
|
+
id: z.ZodUUID;
|
|
6
|
+
title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
7
|
+
locale: z.ZodEnum<{
|
|
8
|
+
zh: "zh";
|
|
9
|
+
ja: "ja";
|
|
10
|
+
en: "en";
|
|
11
|
+
ko: "ko";
|
|
12
|
+
}>;
|
|
13
|
+
message: z.ZodString;
|
|
14
|
+
}, z.core.$strip>>>;
|
|
15
|
+
tooltip: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
16
|
+
locale: z.ZodEnum<{
|
|
17
|
+
zh: "zh";
|
|
18
|
+
ja: "ja";
|
|
19
|
+
en: "en";
|
|
20
|
+
ko: "ko";
|
|
21
|
+
}>;
|
|
22
|
+
message: z.ZodString;
|
|
23
|
+
}, z.core.$strip>>>>;
|
|
24
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
25
|
+
variant: z.ZodOptional<z.ZodEnum<{
|
|
26
|
+
default: "default";
|
|
27
|
+
destructive: "destructive";
|
|
28
|
+
primary: "primary";
|
|
29
|
+
ghost: "ghost";
|
|
30
|
+
}>>;
|
|
31
|
+
hideTitle: z.ZodOptional<z.ZodBoolean>;
|
|
32
|
+
}, z.core.$strict>>;
|
|
33
|
+
export declare const ButtonDropdownC: z.ZodReadonly<z.ZodObject<{
|
|
34
|
+
id: z.ZodUUID;
|
|
35
|
+
title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
36
|
+
locale: z.ZodEnum<{
|
|
37
|
+
zh: "zh";
|
|
38
|
+
ja: "ja";
|
|
39
|
+
en: "en";
|
|
40
|
+
ko: "ko";
|
|
41
|
+
}>;
|
|
42
|
+
message: z.ZodString;
|
|
43
|
+
}, z.core.$strip>>>;
|
|
44
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
45
|
+
items: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
46
|
+
id: z.ZodUUID;
|
|
47
|
+
title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
48
|
+
locale: z.ZodEnum<{
|
|
49
|
+
zh: "zh";
|
|
50
|
+
ja: "ja";
|
|
51
|
+
en: "en";
|
|
52
|
+
ko: "ko";
|
|
53
|
+
}>;
|
|
54
|
+
message: z.ZodString;
|
|
55
|
+
}, z.core.$strip>>>;
|
|
56
|
+
tooltip: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
57
|
+
locale: z.ZodEnum<{
|
|
58
|
+
zh: "zh";
|
|
59
|
+
ja: "ja";
|
|
60
|
+
en: "en";
|
|
61
|
+
ko: "ko";
|
|
62
|
+
}>;
|
|
63
|
+
message: z.ZodString;
|
|
64
|
+
}, z.core.$strip>>>>;
|
|
65
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
66
|
+
variant: z.ZodOptional<z.ZodEnum<{
|
|
67
|
+
default: "default";
|
|
68
|
+
destructive: "destructive";
|
|
69
|
+
primary: "primary";
|
|
70
|
+
ghost: "ghost";
|
|
71
|
+
}>>;
|
|
72
|
+
}, z.core.$strict>>>>;
|
|
73
|
+
}, z.core.$strict>>;
|
|
74
|
+
export declare const ButtonGroupItemC: z.ZodUnion<readonly [z.ZodReadonly<z.ZodObject<{
|
|
75
|
+
id: z.ZodUUID;
|
|
76
|
+
title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
77
|
+
locale: z.ZodEnum<{
|
|
78
|
+
zh: "zh";
|
|
79
|
+
ja: "ja";
|
|
80
|
+
en: "en";
|
|
81
|
+
ko: "ko";
|
|
82
|
+
}>;
|
|
83
|
+
message: z.ZodString;
|
|
84
|
+
}, z.core.$strip>>>;
|
|
85
|
+
tooltip: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
86
|
+
locale: z.ZodEnum<{
|
|
87
|
+
zh: "zh";
|
|
88
|
+
ja: "ja";
|
|
89
|
+
en: "en";
|
|
90
|
+
ko: "ko";
|
|
91
|
+
}>;
|
|
92
|
+
message: z.ZodString;
|
|
93
|
+
}, z.core.$strip>>>>;
|
|
94
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
95
|
+
variant: z.ZodOptional<z.ZodEnum<{
|
|
96
|
+
default: "default";
|
|
97
|
+
destructive: "destructive";
|
|
98
|
+
primary: "primary";
|
|
99
|
+
ghost: "ghost";
|
|
100
|
+
}>>;
|
|
101
|
+
hideTitle: z.ZodOptional<z.ZodBoolean>;
|
|
102
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
103
|
+
id: z.ZodUUID;
|
|
104
|
+
title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
105
|
+
locale: z.ZodEnum<{
|
|
106
|
+
zh: "zh";
|
|
107
|
+
ja: "ja";
|
|
108
|
+
en: "en";
|
|
109
|
+
ko: "ko";
|
|
110
|
+
}>;
|
|
111
|
+
message: z.ZodString;
|
|
112
|
+
}, z.core.$strip>>>;
|
|
113
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
114
|
+
items: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
115
|
+
id: z.ZodUUID;
|
|
116
|
+
title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
117
|
+
locale: z.ZodEnum<{
|
|
118
|
+
zh: "zh";
|
|
119
|
+
ja: "ja";
|
|
120
|
+
en: "en";
|
|
121
|
+
ko: "ko";
|
|
122
|
+
}>;
|
|
123
|
+
message: z.ZodString;
|
|
124
|
+
}, z.core.$strip>>>;
|
|
125
|
+
tooltip: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
126
|
+
locale: z.ZodEnum<{
|
|
127
|
+
zh: "zh";
|
|
128
|
+
ja: "ja";
|
|
129
|
+
en: "en";
|
|
130
|
+
ko: "ko";
|
|
131
|
+
}>;
|
|
132
|
+
message: z.ZodString;
|
|
133
|
+
}, z.core.$strip>>>>;
|
|
134
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
135
|
+
variant: z.ZodOptional<z.ZodEnum<{
|
|
136
|
+
default: "default";
|
|
137
|
+
destructive: "destructive";
|
|
138
|
+
primary: "primary";
|
|
139
|
+
ghost: "ghost";
|
|
140
|
+
}>>;
|
|
141
|
+
}, z.core.$strict>>>>;
|
|
142
|
+
}, z.core.$strict>>]>;
|
|
143
|
+
export declare const ButtonGroupC: z.ZodReadonly<z.ZodObject<{
|
|
144
|
+
id: z.ZodUUID;
|
|
145
|
+
items: z.ZodReadonly<z.ZodArray<z.ZodUnion<readonly [z.ZodReadonly<z.ZodObject<{
|
|
146
|
+
id: z.ZodUUID;
|
|
147
|
+
title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
148
|
+
locale: z.ZodEnum<{
|
|
149
|
+
zh: "zh";
|
|
150
|
+
ja: "ja";
|
|
151
|
+
en: "en";
|
|
152
|
+
ko: "ko";
|
|
153
|
+
}>;
|
|
154
|
+
message: z.ZodString;
|
|
155
|
+
}, z.core.$strip>>>;
|
|
156
|
+
tooltip: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
157
|
+
locale: z.ZodEnum<{
|
|
158
|
+
zh: "zh";
|
|
159
|
+
ja: "ja";
|
|
160
|
+
en: "en";
|
|
161
|
+
ko: "ko";
|
|
162
|
+
}>;
|
|
163
|
+
message: z.ZodString;
|
|
164
|
+
}, z.core.$strip>>>>;
|
|
165
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
166
|
+
variant: z.ZodOptional<z.ZodEnum<{
|
|
167
|
+
default: "default";
|
|
168
|
+
destructive: "destructive";
|
|
169
|
+
primary: "primary";
|
|
170
|
+
ghost: "ghost";
|
|
171
|
+
}>>;
|
|
172
|
+
hideTitle: z.ZodOptional<z.ZodBoolean>;
|
|
173
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
174
|
+
id: z.ZodUUID;
|
|
175
|
+
title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
176
|
+
locale: z.ZodEnum<{
|
|
177
|
+
zh: "zh";
|
|
178
|
+
ja: "ja";
|
|
179
|
+
en: "en";
|
|
180
|
+
ko: "ko";
|
|
181
|
+
}>;
|
|
182
|
+
message: z.ZodString;
|
|
183
|
+
}, z.core.$strip>>>;
|
|
184
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
185
|
+
items: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
186
|
+
id: z.ZodUUID;
|
|
187
|
+
title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
188
|
+
locale: z.ZodEnum<{
|
|
189
|
+
zh: "zh";
|
|
190
|
+
ja: "ja";
|
|
191
|
+
en: "en";
|
|
192
|
+
ko: "ko";
|
|
193
|
+
}>;
|
|
194
|
+
message: z.ZodString;
|
|
195
|
+
}, z.core.$strip>>>;
|
|
196
|
+
tooltip: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
197
|
+
locale: z.ZodEnum<{
|
|
198
|
+
zh: "zh";
|
|
199
|
+
ja: "ja";
|
|
200
|
+
en: "en";
|
|
201
|
+
ko: "ko";
|
|
202
|
+
}>;
|
|
203
|
+
message: z.ZodString;
|
|
204
|
+
}, z.core.$strip>>>>;
|
|
205
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
206
|
+
variant: z.ZodOptional<z.ZodEnum<{
|
|
207
|
+
default: "default";
|
|
208
|
+
destructive: "destructive";
|
|
209
|
+
primary: "primary";
|
|
210
|
+
ghost: "ghost";
|
|
211
|
+
}>>;
|
|
212
|
+
}, z.core.$strict>>>>;
|
|
213
|
+
}, z.core.$strict>>]>>>;
|
|
214
|
+
}, z.core.$strict>>;
|
|
215
|
+
export declare const ButtonConfigC: z.ZodReadonly<z.ZodObject<{
|
|
216
|
+
gap: z.ZodOptional<z.ZodNumber>;
|
|
217
|
+
style: z.ZodOptional<z.ZodString>;
|
|
218
|
+
groups: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
219
|
+
id: z.ZodUUID;
|
|
220
|
+
items: z.ZodReadonly<z.ZodArray<z.ZodUnion<readonly [z.ZodReadonly<z.ZodObject<{
|
|
221
|
+
id: z.ZodUUID;
|
|
222
|
+
title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
223
|
+
locale: z.ZodEnum<{
|
|
224
|
+
zh: "zh";
|
|
225
|
+
ja: "ja";
|
|
226
|
+
en: "en";
|
|
227
|
+
ko: "ko";
|
|
228
|
+
}>;
|
|
229
|
+
message: z.ZodString;
|
|
230
|
+
}, z.core.$strip>>>;
|
|
231
|
+
tooltip: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
232
|
+
locale: z.ZodEnum<{
|
|
233
|
+
zh: "zh";
|
|
234
|
+
ja: "ja";
|
|
235
|
+
en: "en";
|
|
236
|
+
ko: "ko";
|
|
237
|
+
}>;
|
|
238
|
+
message: z.ZodString;
|
|
239
|
+
}, z.core.$strip>>>>;
|
|
240
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
241
|
+
variant: z.ZodOptional<z.ZodEnum<{
|
|
242
|
+
default: "default";
|
|
243
|
+
destructive: "destructive";
|
|
244
|
+
primary: "primary";
|
|
245
|
+
ghost: "ghost";
|
|
246
|
+
}>>;
|
|
247
|
+
hideTitle: z.ZodOptional<z.ZodBoolean>;
|
|
248
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
249
|
+
id: z.ZodUUID;
|
|
250
|
+
title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
251
|
+
locale: z.ZodEnum<{
|
|
252
|
+
zh: "zh";
|
|
253
|
+
ja: "ja";
|
|
254
|
+
en: "en";
|
|
255
|
+
ko: "ko";
|
|
256
|
+
}>;
|
|
257
|
+
message: z.ZodString;
|
|
258
|
+
}, z.core.$strip>>>;
|
|
259
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
260
|
+
items: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
261
|
+
id: z.ZodUUID;
|
|
262
|
+
title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
263
|
+
locale: z.ZodEnum<{
|
|
264
|
+
zh: "zh";
|
|
265
|
+
ja: "ja";
|
|
266
|
+
en: "en";
|
|
267
|
+
ko: "ko";
|
|
268
|
+
}>;
|
|
269
|
+
message: z.ZodString;
|
|
270
|
+
}, z.core.$strip>>>;
|
|
271
|
+
tooltip: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
272
|
+
locale: z.ZodEnum<{
|
|
273
|
+
zh: "zh";
|
|
274
|
+
ja: "ja";
|
|
275
|
+
en: "en";
|
|
276
|
+
ko: "ko";
|
|
277
|
+
}>;
|
|
278
|
+
message: z.ZodString;
|
|
279
|
+
}, z.core.$strip>>>>;
|
|
280
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
281
|
+
variant: z.ZodOptional<z.ZodEnum<{
|
|
282
|
+
default: "default";
|
|
283
|
+
destructive: "destructive";
|
|
284
|
+
primary: "primary";
|
|
285
|
+
ghost: "ghost";
|
|
286
|
+
}>>;
|
|
287
|
+
}, z.core.$strict>>>>;
|
|
288
|
+
}, z.core.$strict>>]>>>;
|
|
289
|
+
}, z.core.$strict>>>>;
|
|
290
|
+
}, z.core.$strict>>;
|
|
291
|
+
export declare const ButtonConfigInputC: z.ZodReadonly<z.ZodObject<{
|
|
292
|
+
gap: z.ZodOptional<z.ZodNumber>;
|
|
293
|
+
style: z.ZodOptional<z.ZodString>;
|
|
294
|
+
groups: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
295
|
+
id: z.ZodUUID;
|
|
296
|
+
items: z.ZodReadonly<z.ZodArray<z.ZodUnion<readonly [z.ZodReadonly<z.ZodObject<{
|
|
297
|
+
id: z.ZodUUID;
|
|
298
|
+
title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
299
|
+
locale: z.ZodEnum<{
|
|
300
|
+
zh: "zh";
|
|
301
|
+
ja: "ja";
|
|
302
|
+
en: "en";
|
|
303
|
+
ko: "ko";
|
|
304
|
+
}>;
|
|
305
|
+
message: z.ZodString;
|
|
306
|
+
}, z.core.$strip>>>;
|
|
307
|
+
tooltip: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
308
|
+
locale: z.ZodEnum<{
|
|
309
|
+
zh: "zh";
|
|
310
|
+
ja: "ja";
|
|
311
|
+
en: "en";
|
|
312
|
+
ko: "ko";
|
|
313
|
+
}>;
|
|
314
|
+
message: z.ZodString;
|
|
315
|
+
}, z.core.$strip>>>>;
|
|
316
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
317
|
+
variant: z.ZodOptional<z.ZodEnum<{
|
|
318
|
+
default: "default";
|
|
319
|
+
destructive: "destructive";
|
|
320
|
+
primary: "primary";
|
|
321
|
+
ghost: "ghost";
|
|
322
|
+
}>>;
|
|
323
|
+
hideTitle: z.ZodOptional<z.ZodBoolean>;
|
|
324
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
325
|
+
id: z.ZodUUID;
|
|
326
|
+
title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
327
|
+
locale: z.ZodEnum<{
|
|
328
|
+
zh: "zh";
|
|
329
|
+
ja: "ja";
|
|
330
|
+
en: "en";
|
|
331
|
+
ko: "ko";
|
|
332
|
+
}>;
|
|
333
|
+
message: z.ZodString;
|
|
334
|
+
}, z.core.$strip>>>;
|
|
335
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
336
|
+
items: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
337
|
+
id: z.ZodUUID;
|
|
338
|
+
title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
339
|
+
locale: z.ZodEnum<{
|
|
340
|
+
zh: "zh";
|
|
341
|
+
ja: "ja";
|
|
342
|
+
en: "en";
|
|
343
|
+
ko: "ko";
|
|
344
|
+
}>;
|
|
345
|
+
message: z.ZodString;
|
|
346
|
+
}, z.core.$strip>>>;
|
|
347
|
+
tooltip: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
348
|
+
locale: z.ZodEnum<{
|
|
349
|
+
zh: "zh";
|
|
350
|
+
ja: "ja";
|
|
351
|
+
en: "en";
|
|
352
|
+
ko: "ko";
|
|
353
|
+
}>;
|
|
354
|
+
message: z.ZodString;
|
|
355
|
+
}, z.core.$strip>>>>;
|
|
356
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
357
|
+
variant: z.ZodOptional<z.ZodEnum<{
|
|
358
|
+
default: "default";
|
|
359
|
+
destructive: "destructive";
|
|
360
|
+
primary: "primary";
|
|
361
|
+
ghost: "ghost";
|
|
362
|
+
}>>;
|
|
363
|
+
}, z.core.$strict>>>>;
|
|
364
|
+
}, z.core.$strict>>]>>>;
|
|
365
|
+
}, z.core.$strict>>>>;
|
|
366
|
+
}, z.core.$strict>>;
|
|
367
|
+
export type ButtonAction = z.infer<typeof ButtonActionC>;
|
|
368
|
+
export type ButtonDropdown = z.infer<typeof ButtonDropdownC>;
|
|
369
|
+
export type ButtonGroupItem = z.infer<typeof ButtonGroupItemC>;
|
|
370
|
+
export type ButtonGroup = z.infer<typeof ButtonGroupC>;
|
|
371
|
+
export type ButtonConfig = z.infer<typeof ButtonConfigC>;
|
|
372
|
+
export type ButtonConfigInput = z.infer<typeof ButtonConfigInputC>;
|
|
373
|
+
export declare function normalizeButtonConfigInput(value: unknown): unknown;
|
|
374
|
+
export type ButtonVariant = ButtonVariants['variant'];
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import z from "zod";
|
|
2
|
+
import { expressionC, localeC } from "../../../utils/coders.js";
|
|
3
|
+
const buttonIdC = z.uuid().describe("\u6309\u94AE\u552F\u4E00\u6807\u8BC6\uFF0C\u5FC5\u987B\u662F UUID");
|
|
4
|
+
const buttonGroupIdC = z.uuid().describe("\u6309\u94AE\u7EC4\u552F\u4E00\u6807\u8BC6\uFF0C\u5FC5\u987B\u662F UUID");
|
|
5
|
+
const buttonVariantC = z.enum(["default", "primary", "destructive", "ghost"]).optional().describe("\u6309\u94AE\u53D8\u4F53");
|
|
6
|
+
export const ButtonsStyleC = expressionC(/^map/).optional().describe("\u8FD4\u56DE\u6309\u94AE\u5BB9\u5668\u6837\u5F0F\u5BF9\u8C61\u7684 CEL \u8868\u8FBE\u5F0F");
|
|
7
|
+
export const ButtonActionC = z.strictObject({
|
|
8
|
+
id: buttonIdC,
|
|
9
|
+
title: localeC.describe("\u6309\u94AE\u540D\u79F0\u7684\u672C\u5730\u5316\u663E\u793A\u6587\u672C"),
|
|
10
|
+
tooltip: localeC.optional().describe("\u6309\u94AE\u63D0\u793A\u7684\u672C\u5730\u5316\u663E\u793A\u6587\u672C"),
|
|
11
|
+
icon: z.string().optional().describe("Iconify \u56FE\u6807\u6807\u8BC6\u7B26"),
|
|
12
|
+
variant: buttonVariantC,
|
|
13
|
+
hideTitle: z.boolean().optional().describe("\u4EC5\u5BF9\u975E\u4E0B\u62C9\u6309\u94AE\u751F\u6548\uFF1B\u4E3A true \u65F6\u9690\u85CF\u6309\u94AE\u6587\u5B57\uFF0C\u4EC5\u663E\u793A\u56FE\u6807")
|
|
14
|
+
}).readonly();
|
|
15
|
+
const DropdownButtonActionC = z.strictObject({
|
|
16
|
+
id: buttonIdC,
|
|
17
|
+
title: localeC.describe("\u4E0B\u62C9\u9879\u6309\u94AE\u540D\u79F0\u7684\u672C\u5730\u5316\u663E\u793A\u6587\u672C"),
|
|
18
|
+
tooltip: localeC.optional().describe("\u4E0B\u62C9\u9879\u6309\u94AE\u63D0\u793A\u7684\u672C\u5730\u5316\u663E\u793A\u6587\u672C"),
|
|
19
|
+
icon: z.string().optional().describe("Iconify \u56FE\u6807\u6807\u8BC6\u7B26"),
|
|
20
|
+
variant: buttonVariantC
|
|
21
|
+
}).readonly();
|
|
22
|
+
export const ButtonDropdownC = z.strictObject({
|
|
23
|
+
id: buttonIdC,
|
|
24
|
+
title: localeC.describe("\u4E0B\u62C9\u6309\u94AE\u540D\u79F0\u7684\u672C\u5730\u5316\u663E\u793A\u6587\u672C"),
|
|
25
|
+
icon: z.string().optional().describe("Iconify \u56FE\u6807\u6807\u8BC6\u7B26"),
|
|
26
|
+
items: z.array(DropdownButtonActionC).readonly().describe("\u4E0B\u62C9\u6309\u94AE\u5185\u7684\u6309\u94AE\u5217\u8868")
|
|
27
|
+
}).readonly();
|
|
28
|
+
export const ButtonGroupItemC = z.union([ButtonActionC, ButtonDropdownC]);
|
|
29
|
+
export const ButtonGroupC = z.strictObject({
|
|
30
|
+
id: buttonGroupIdC,
|
|
31
|
+
items: z.array(ButtonGroupItemC).readonly().describe("\u6309\u94AE\u7EC4\u5185\u7684\u6309\u94AE\u4E0E\u4E0B\u62C9\u6309\u94AE")
|
|
32
|
+
}).readonly();
|
|
33
|
+
export const ButtonConfigC = z.strictObject({
|
|
34
|
+
gap: z.number().finite().min(0).optional().describe("\u6309\u94AE\u7EC4\u4E4B\u95F4\u7684\u95F4\u8DDD\u500D\u7387\uFF0C\u8FD0\u884C\u65F6\u6309 0.25rem \u6B65\u8FDB\u6362\u7B97"),
|
|
35
|
+
style: ButtonsStyleC,
|
|
36
|
+
groups: z.array(ButtonGroupC).readonly().describe("\u6839\u7EA7\u6309\u94AE\u7EC4\u5217\u8868")
|
|
37
|
+
}).readonly();
|
|
38
|
+
export const ButtonConfigInputC = ButtonConfigC;
|
|
39
|
+
export function normalizeButtonConfigInput(value) {
|
|
40
|
+
if (typeof value !== "object" || value === null) {
|
|
41
|
+
return {
|
|
42
|
+
groups: []
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
const groups = Reflect.get(value, "groups");
|
|
46
|
+
const gap = Reflect.get(value, "gap");
|
|
47
|
+
const style = Reflect.get(value, "style");
|
|
48
|
+
const nextConfig = {
|
|
49
|
+
groups: Array.isArray(groups) ? groups : []
|
|
50
|
+
};
|
|
51
|
+
if (typeof gap === "number" && Number.isFinite(gap) && gap >= 0) {
|
|
52
|
+
nextConfig.gap = gap;
|
|
53
|
+
}
|
|
54
|
+
if (typeof style === "string") {
|
|
55
|
+
nextConfig.style = style;
|
|
56
|
+
}
|
|
57
|
+
return nextConfig;
|
|
58
|
+
}
|
|
@@ -93,7 +93,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
93
93
|
locale: "zh" | "ja" | "en" | "ko";
|
|
94
94
|
message: string;
|
|
95
95
|
}[];
|
|
96
|
-
mode: "
|
|
96
|
+
mode: "month" | "year" | "date";
|
|
97
97
|
value: string;
|
|
98
98
|
required?: boolean | undefined;
|
|
99
99
|
icon?: string | undefined;
|
|
@@ -210,7 +210,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
210
210
|
locale: "zh" | "ja" | "en" | "ko";
|
|
211
211
|
message: string;
|
|
212
212
|
}[];
|
|
213
|
-
mode: "
|
|
213
|
+
mode: "month" | "year" | "date";
|
|
214
214
|
value: string;
|
|
215
215
|
required?: boolean | undefined;
|
|
216
216
|
icon?: string | undefined;
|
|
@@ -324,7 +324,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
324
324
|
locale: "zh" | "ja" | "en" | "ko";
|
|
325
325
|
message: string;
|
|
326
326
|
}[];
|
|
327
|
-
mode: "
|
|
327
|
+
mode: "month" | "year" | "date";
|
|
328
328
|
value: string;
|
|
329
329
|
required?: boolean | undefined;
|
|
330
330
|
icon?: string | undefined;
|
|
@@ -441,7 +441,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
441
441
|
locale: "zh" | "ja" | "en" | "ko";
|
|
442
442
|
message: string;
|
|
443
443
|
}[];
|
|
444
|
-
mode: "
|
|
444
|
+
mode: "month" | "year" | "date";
|
|
445
445
|
value: string;
|
|
446
446
|
required?: boolean | undefined;
|
|
447
447
|
icon?: string | undefined;
|
|
@@ -93,7 +93,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
93
93
|
locale: "zh" | "ja" | "en" | "ko";
|
|
94
94
|
message: string;
|
|
95
95
|
}[];
|
|
96
|
-
mode: "
|
|
96
|
+
mode: "month" | "year" | "date";
|
|
97
97
|
value: string;
|
|
98
98
|
required?: boolean | undefined;
|
|
99
99
|
icon?: string | undefined;
|
|
@@ -210,7 +210,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
210
210
|
locale: "zh" | "ja" | "en" | "ko";
|
|
211
211
|
message: string;
|
|
212
212
|
}[];
|
|
213
|
-
mode: "
|
|
213
|
+
mode: "month" | "year" | "date";
|
|
214
214
|
value: string;
|
|
215
215
|
required?: boolean | undefined;
|
|
216
216
|
icon?: string | undefined;
|
|
@@ -324,7 +324,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
324
324
|
locale: "zh" | "ja" | "en" | "ko";
|
|
325
325
|
message: string;
|
|
326
326
|
}[];
|
|
327
|
-
mode: "
|
|
327
|
+
mode: "month" | "year" | "date";
|
|
328
328
|
value: string;
|
|
329
329
|
required?: boolean | undefined;
|
|
330
330
|
icon?: string | undefined;
|
|
@@ -441,7 +441,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
441
441
|
locale: "zh" | "ja" | "en" | "ko";
|
|
442
442
|
message: string;
|
|
443
443
|
}[];
|
|
444
|
-
mode: "
|
|
444
|
+
mode: "month" | "year" | "date";
|
|
445
445
|
value: string;
|
|
446
446
|
required?: boolean | undefined;
|
|
447
447
|
icon?: string | undefined;
|
|
@@ -127,9 +127,9 @@ export declare const CalendarFieldC: z.ZodObject<{
|
|
|
127
127
|
icon: z.ZodOptional<z.ZodString>;
|
|
128
128
|
style: z.ZodOptional<z.ZodString>;
|
|
129
129
|
mode: z.ZodEnum<{
|
|
130
|
-
date: "date";
|
|
131
130
|
month: "month";
|
|
132
131
|
year: "year";
|
|
132
|
+
date: "date";
|
|
133
133
|
}>;
|
|
134
134
|
display: z.ZodOptional<z.ZodString>;
|
|
135
135
|
value: z.ZodString;
|
|
@@ -267,9 +267,9 @@ export declare const FieldC: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
267
267
|
icon: z.ZodOptional<z.ZodString>;
|
|
268
268
|
style: z.ZodOptional<z.ZodString>;
|
|
269
269
|
mode: z.ZodEnum<{
|
|
270
|
-
date: "date";
|
|
271
270
|
month: "month";
|
|
272
271
|
year: "year";
|
|
272
|
+
date: "date";
|
|
273
273
|
}>;
|
|
274
274
|
display: z.ZodOptional<z.ZodString>;
|
|
275
275
|
value: z.ZodString;
|
|
@@ -418,9 +418,9 @@ export declare const FieldsConfigC: z.ZodReadonly<z.ZodObject<{
|
|
|
418
418
|
icon: z.ZodOptional<z.ZodString>;
|
|
419
419
|
style: z.ZodOptional<z.ZodString>;
|
|
420
420
|
mode: z.ZodEnum<{
|
|
421
|
-
date: "date";
|
|
422
421
|
month: "month";
|
|
423
422
|
year: "year";
|
|
423
|
+
date: "date";
|
|
424
424
|
}>;
|
|
425
425
|
display: z.ZodOptional<z.ZodString>;
|
|
426
426
|
value: z.ZodString;
|
|
@@ -96,7 +96,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
96
96
|
locale: "zh" | "ja" | "en" | "ko";
|
|
97
97
|
message: string;
|
|
98
98
|
}[];
|
|
99
|
-
mode: "
|
|
99
|
+
mode: "month" | "year" | "date";
|
|
100
100
|
value: string;
|
|
101
101
|
required?: boolean | undefined;
|
|
102
102
|
icon?: string | undefined;
|
|
@@ -211,7 +211,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
211
211
|
locale: "zh" | "ja" | "en" | "ko";
|
|
212
212
|
message: string;
|
|
213
213
|
}[];
|
|
214
|
-
mode: "
|
|
214
|
+
mode: "month" | "year" | "date";
|
|
215
215
|
value: string;
|
|
216
216
|
required?: boolean | undefined;
|
|
217
217
|
icon?: string | undefined;
|
|
@@ -96,7 +96,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
96
96
|
locale: "zh" | "ja" | "en" | "ko";
|
|
97
97
|
message: string;
|
|
98
98
|
}[];
|
|
99
|
-
mode: "
|
|
99
|
+
mode: "month" | "year" | "date";
|
|
100
100
|
value: string;
|
|
101
101
|
required?: boolean | undefined;
|
|
102
102
|
icon?: string | undefined;
|
|
@@ -211,7 +211,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
211
211
|
locale: "zh" | "ja" | "en" | "ko";
|
|
212
212
|
message: string;
|
|
213
213
|
}[];
|
|
214
|
-
mode: "
|
|
214
|
+
mode: "month" | "year" | "date";
|
|
215
215
|
value: string;
|
|
216
216
|
required?: boolean | undefined;
|
|
217
217
|
icon?: string | undefined;
|
|
@@ -509,7 +509,7 @@ export { AccessorC, ColumnC, RenderC, TableConfigC } from "./schema";
|
|
|
509
509
|
|
|
510
510
|
<template>
|
|
511
511
|
<div
|
|
512
|
-
class="relative flex-1 flex flex-col"
|
|
512
|
+
class="relative flex-1 flex flex-col overflow-hidden"
|
|
513
513
|
>
|
|
514
514
|
<Button
|
|
515
515
|
v-if="isCheating"
|
|
@@ -765,10 +765,10 @@ export { AccessorC, ColumnC, RenderC, TableConfigC } from "./schema";
|
|
|
765
765
|
</div>
|
|
766
766
|
</div>
|
|
767
767
|
|
|
768
|
-
<div class="flex items-center justify-between w-full py-2 gap-2 text-sm text-zinc-600">
|
|
768
|
+
<div class="flex items-center justify-between w-full py-2 gap-2 text-sm text-zinc-600 @container">
|
|
769
769
|
<div
|
|
770
770
|
:class="[
|
|
771
|
-
'relative p-1 flex-1 prose prose-zinc text-xs'
|
|
771
|
+
'relative p-1 flex-1 prose prose-zinc text-xs invisible @lg:visible'
|
|
772
772
|
]"
|
|
773
773
|
>
|
|
774
774
|
<span
|
|
@@ -782,7 +782,7 @@ export { AccessorC, ColumnC, RenderC, TableConfigC } from "./schema";
|
|
|
782
782
|
<i18n-t
|
|
783
783
|
keypath="total"
|
|
784
784
|
tag="span"
|
|
785
|
-
class="text-xs"
|
|
785
|
+
class="text-xs hidden @lg:inline"
|
|
786
786
|
>
|
|
787
787
|
<template #count>
|
|
788
788
|
<strong>{{ totalItems }}</strong>
|
|
@@ -791,7 +791,7 @@ export { AccessorC, ColumnC, RenderC, TableConfigC } from "./schema";
|
|
|
791
791
|
<label
|
|
792
792
|
v-if="resolvedPaginationPageSizes"
|
|
793
793
|
data-slot="table-pagination-page-size"
|
|
794
|
-
class="
|
|
794
|
+
class="items-center gap-2 text-xs text-zinc-500 hidden @lg:flex"
|
|
795
795
|
>
|
|
796
796
|
<NativeSelect
|
|
797
797
|
data-slot="table-pagination-page-size-select"
|
|
@@ -850,8 +850,9 @@ export { AccessorC, ColumnC, RenderC, TableConfigC } from "./schema";
|
|
|
850
850
|
<Pagination.ListItem
|
|
851
851
|
v-if="page.type === 'page'"
|
|
852
852
|
:class="[
|
|
853
|
-
'w-7 h-7
|
|
854
|
-
'data-selected:text-(--primary) hover:bg-zinc-100 transition cursor-pointer'
|
|
853
|
+
'w-7 h-7 items-center justify-center rounded text-xs bg-transparent',
|
|
854
|
+
'data-selected:text-(--primary) hover:bg-zinc-100 transition cursor-pointer',
|
|
855
|
+
page.value - 1 === tableApi.getState().pagination.pageIndex ? '' : 'hidden @md:flex'
|
|
855
856
|
]"
|
|
856
857
|
:value="page.value"
|
|
857
858
|
>
|
|
@@ -859,7 +860,7 @@ export { AccessorC, ColumnC, RenderC, TableConfigC } from "./schema";
|
|
|
859
860
|
</Pagination.ListItem>
|
|
860
861
|
<Pagination.Ellipsis
|
|
861
862
|
v-else
|
|
862
|
-
class="w-7 h-7
|
|
863
|
+
class="w-7 h-7 items-center justify-center text-zinc-400 hidden @md:flex"
|
|
863
864
|
>
|
|
864
865
|
…
|
|
865
866
|
</Pagination.Ellipsis>
|
|
@@ -892,7 +893,7 @@ export { AccessorC, ColumnC, RenderC, TableConfigC } from "./schema";
|
|
|
892
893
|
<i18n-t
|
|
893
894
|
keypath="goto"
|
|
894
895
|
tag="div"
|
|
895
|
-
class="text-xs
|
|
896
|
+
class="text-xs items-center gap-2 hidden @lg:flex"
|
|
896
897
|
>
|
|
897
898
|
<template #page>
|
|
898
899
|
<NumberField
|
|
@@ -908,7 +909,7 @@ export { AccessorC, ColumnC, RenderC, TableConfigC } from "./schema";
|
|
|
908
909
|
</div>
|
|
909
910
|
<div
|
|
910
911
|
:class="[
|
|
911
|
-
'relative p-1 flex-1 prose prose-zinc text-xs text-right'
|
|
912
|
+
'relative p-1 flex-1 prose prose-zinc text-xs text-right invisible @lg:visible'
|
|
912
913
|
]"
|
|
913
914
|
>
|
|
914
915
|
<span
|