@expcat/tigercat-vue 2.0.4 → 2.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/README.md +20 -10
- package/dist/chunk-26QCTL2E.mjs +180 -0
- package/dist/{chunk-GS4SV2HK.mjs → chunk-32X54QKW.mjs} +1 -1
- package/dist/chunk-3ONCXHE5.mjs +184 -0
- package/dist/{chunk-KOG3HKOF.mjs → chunk-6AMWX5K4.mjs} +1 -4
- package/dist/chunk-6GR3XC5V.mjs +281 -0
- package/dist/chunk-6GR5U4UB.mjs +225 -0
- package/dist/chunk-7DWWNFRP.mjs +302 -0
- package/dist/chunk-AECXFT7D.mjs +121 -0
- package/dist/chunk-AOLRZG4E.mjs +347 -0
- package/dist/chunk-AY7CGLMO.mjs +368 -0
- package/dist/chunk-BBNCP55O.mjs +156 -0
- package/dist/chunk-F3ZVVVYD.mjs +257 -0
- package/dist/{chunk-OTGGPXDT.mjs → chunk-IEAEB4TX.mjs} +255 -44
- package/dist/chunk-P6FMU4AT.mjs +54 -0
- package/dist/chunk-PFIV5MXD.mjs +48 -0
- package/dist/chunk-TBOXTAIA.mjs +94 -0
- package/dist/{chunk-H6FZBFRT.mjs → chunk-TPESRDUG.mjs} +6 -1
- package/dist/{chunk-2XCXK3NQ.mjs → chunk-U4B5QT72.mjs} +1 -1
- package/dist/chunk-UUWPSRNV.mjs +337 -0
- package/dist/chunk-UXJRH72H.mjs +834 -0
- package/dist/chunk-VFS5XAZ3.mjs +602 -0
- package/dist/{chunk-WC5MKASU.mjs → chunk-VN2TWPRC.mjs} +169 -55
- package/dist/components/ActivityFeed.d.mts +1 -1
- package/dist/components/ActivityFeed.mjs +1 -1
- package/dist/components/Alert.d.mts +2 -2
- package/dist/components/AreaChart.mjs +2 -2
- package/dist/components/AspectRatio.d.mts +44 -0
- package/dist/components/AspectRatio.mjs +8 -0
- package/dist/components/BarChart.mjs +2 -2
- package/dist/components/Carousel.d.mts +1 -1
- package/dist/components/Cascader.d.mts +34 -0
- package/dist/components/Cascader.mjs +1 -1
- package/dist/components/ChartLegend.d.mts +1 -1
- package/dist/components/ChatWindow.mjs +1 -1
- package/dist/components/CodeEditor.mjs +1 -1
- package/dist/components/ColorSwatch.d.mts +1 -1
- package/dist/components/ContextMenu.d.mts +234 -0
- package/dist/components/ContextMenu.mjs +17 -0
- package/dist/components/DataTableWithToolbar.d.mts +1 -1
- package/dist/components/DataTableWithToolbar.mjs +2 -2
- package/dist/components/DonutChart.mjs +3 -3
- package/dist/components/Dropdown.d.mts +1 -1
- package/dist/components/FloatButton.d.mts +2 -2
- package/dist/components/FunnelChart.d.mts +1 -1
- package/dist/components/FunnelChart.mjs +2 -2
- package/dist/components/Highlight.d.mts +146 -0
- package/dist/components/Highlight.mjs +8 -0
- package/dist/components/ImageCompare.d.mts +284 -0
- package/dist/components/ImageCompare.mjs +8 -0
- package/dist/components/Input.d.mts +1 -1
- package/dist/components/InputOTP.d.mts +261 -0
- package/dist/components/InputOTP.mjs +11 -0
- package/dist/components/Kbd.d.mts +118 -0
- package/dist/components/Kbd.mjs +8 -0
- package/dist/components/LineChart.mjs +2 -2
- package/dist/components/List.d.mts +1 -1
- package/dist/components/List.mjs +1 -1
- package/dist/components/LoadingBar.d.mts +8 -0
- package/dist/components/LoadingBar.mjs +114 -0
- package/dist/components/LoadingBarContainer.d.mts +78 -0
- package/dist/components/LoadingBarContainer.mjs +8 -0
- package/dist/components/LoadingBarRoot.d.mts +6 -0
- package/dist/components/LoadingBarRoot.mjs +6 -0
- package/dist/components/Marquee.d.mts +158 -0
- package/dist/components/Marquee.mjs +8 -0
- package/dist/components/MaskInput.d.mts +201 -0
- package/dist/components/MaskInput.mjs +11 -0
- package/dist/components/Masonry.d.mts +66 -0
- package/dist/components/Masonry.mjs +8 -0
- package/dist/components/Menu.d.mts +2 -2
- package/dist/components/Modal.d.mts +1 -1
- package/dist/components/NavigationMenu.d.mts +411 -0
- package/dist/components/NavigationMenu.mjs +25 -0
- package/dist/components/NotificationCenter.d.mts +1 -1
- package/dist/components/NotificationCenter.mjs +2 -2
- package/dist/components/PageHeader.d.mts +140 -0
- package/dist/components/PageHeader.mjs +11 -0
- package/dist/components/PieChart.mjs +2 -2
- package/dist/components/Popconfirm.d.mts +3 -3
- package/dist/components/Popover.d.mts +2 -2
- package/dist/components/RadarChart.mjs +2 -2
- package/dist/components/ScatterChart.mjs +2 -2
- package/dist/components/ScrollArea.d.mts +136 -0
- package/dist/components/ScrollArea.mjs +8 -0
- package/dist/components/SplitButton.d.mts +286 -0
- package/dist/components/SplitButton.mjs +12 -0
- package/dist/components/Spotlight.d.mts +1 -1
- package/dist/components/SunburstChart.mjs +2 -2
- package/dist/components/TagsInput.d.mts +214 -0
- package/dist/components/TagsInput.mjs +12 -0
- package/dist/components/Timeline.d.mts +1 -1
- package/dist/components/Tooltip.d.mts +2 -2
- package/dist/components/Tour.d.mts +3 -3
- package/dist/components/Tree.d.mts +1 -1
- package/dist/components/TreeMapChart.d.mts +1 -1
- package/dist/components/TreeMapChart.mjs +2 -2
- package/dist/components/TreeSelect.d.mts +51 -0
- package/dist/components/TreeSelect.mjs +2 -1
- package/dist/components/Upload.d.mts +1 -1
- package/dist/components/VirtualTable.d.mts +1 -1
- package/dist/components/Watermark.d.mts +1 -1
- package/dist/index.d.mts +17 -1
- package/dist/index.mjs +356 -0
- package/package.json +117 -2
- package/dist/{chunk-MAKOSWR6.mjs → chunk-37W7XTA6.mjs} +3 -3
- package/dist/{chunk-WUQMFKQ6.mjs → chunk-66OS5A4D.mjs} +3 -3
- package/dist/{chunk-NNC75I7F.mjs → chunk-CHEXI7MO.mjs} +3 -3
- package/dist/{chunk-KFJIZED5.mjs → chunk-EHGFW5GX.mjs} +3 -3
- package/dist/{chunk-ZGA66PSG.mjs → chunk-EZYOCPMM.mjs} +3 -3
- package/dist/{chunk-XGXZF27U.mjs → chunk-JHMT5Q6P.mjs} +3 -3
- package/dist/{chunk-NGAA73CV.mjs → chunk-VLW3UBIR.mjs} +3 -3
- package/dist/{chunk-OTHJIFDV.mjs → chunk-W5XFWVNV.mjs} +3 -3
- package/dist/{chunk-3KITFMBJ.mjs → chunk-ZOYHZF4N.mjs} +3 -3
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
import * as vue from 'vue';
|
|
2
|
+
import { PropType } from 'vue';
|
|
3
|
+
import { ImageFit, ImageCompareOrientation } from '@expcat/tigercat-core';
|
|
4
|
+
|
|
5
|
+
interface VueImageCompareProps {
|
|
6
|
+
beforeSrc?: string;
|
|
7
|
+
afterSrc?: string;
|
|
8
|
+
beforeAlt?: string;
|
|
9
|
+
afterAlt?: string;
|
|
10
|
+
fit?: ImageFit;
|
|
11
|
+
position?: number;
|
|
12
|
+
defaultPosition?: number;
|
|
13
|
+
orientation?: ImageCompareOrientation;
|
|
14
|
+
step?: number;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
width?: number | string;
|
|
17
|
+
height?: number | string;
|
|
18
|
+
ariaLabel?: string;
|
|
19
|
+
className?: string;
|
|
20
|
+
style?: Record<string, unknown>;
|
|
21
|
+
}
|
|
22
|
+
declare const ImageCompare: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
23
|
+
/**
|
|
24
|
+
* Before (starting) image URL. The `before` slot takes precedence when provided.
|
|
25
|
+
*/
|
|
26
|
+
beforeSrc: {
|
|
27
|
+
type: StringConstructor;
|
|
28
|
+
default: undefined;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* After (ending) image URL. The `after` slot takes precedence when provided.
|
|
32
|
+
*/
|
|
33
|
+
afterSrc: {
|
|
34
|
+
type: StringConstructor;
|
|
35
|
+
default: undefined;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Alternative text for the before image
|
|
39
|
+
* @default ''
|
|
40
|
+
*/
|
|
41
|
+
beforeAlt: {
|
|
42
|
+
type: StringConstructor;
|
|
43
|
+
default: string;
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* Alternative text for the after image
|
|
47
|
+
* @default ''
|
|
48
|
+
*/
|
|
49
|
+
afterAlt: {
|
|
50
|
+
type: StringConstructor;
|
|
51
|
+
default: string;
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Object-fit applied to the before/after `<img>` elements
|
|
55
|
+
* @default 'cover'
|
|
56
|
+
*/
|
|
57
|
+
fit: {
|
|
58
|
+
type: PropType<ImageFit>;
|
|
59
|
+
default: string;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Handle position as a percentage of the before image that is visible
|
|
63
|
+
* (controlled mode)
|
|
64
|
+
*/
|
|
65
|
+
position: {
|
|
66
|
+
type: NumberConstructor;
|
|
67
|
+
default: undefined;
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Initial handle position (uncontrolled mode)
|
|
71
|
+
* @default 50
|
|
72
|
+
*/
|
|
73
|
+
defaultPosition: {
|
|
74
|
+
type: NumberConstructor;
|
|
75
|
+
default: undefined;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Comparison axis
|
|
79
|
+
* @default 'horizontal'
|
|
80
|
+
*/
|
|
81
|
+
orientation: {
|
|
82
|
+
type: PropType<ImageCompareOrientation>;
|
|
83
|
+
default: string;
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* Keyboard and pointer snap increment, in percentage points
|
|
87
|
+
* @default 1
|
|
88
|
+
*/
|
|
89
|
+
step: {
|
|
90
|
+
type: NumberConstructor;
|
|
91
|
+
default: undefined;
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* Whether pointer and keyboard adjustment are disabled
|
|
95
|
+
* @default false
|
|
96
|
+
*/
|
|
97
|
+
disabled: {
|
|
98
|
+
type: BooleanConstructor;
|
|
99
|
+
default: boolean;
|
|
100
|
+
};
|
|
101
|
+
/**
|
|
102
|
+
* Root width (CSS value). A number is treated as pixels.
|
|
103
|
+
*/
|
|
104
|
+
width: {
|
|
105
|
+
type: PropType<number | string>;
|
|
106
|
+
default: undefined;
|
|
107
|
+
};
|
|
108
|
+
/**
|
|
109
|
+
* Root height (CSS value). A number is treated as pixels.
|
|
110
|
+
*/
|
|
111
|
+
height: {
|
|
112
|
+
type: PropType<number | string>;
|
|
113
|
+
default: undefined;
|
|
114
|
+
};
|
|
115
|
+
/**
|
|
116
|
+
* Accessible name for the comparison handle
|
|
117
|
+
* @default 'Image comparison'
|
|
118
|
+
*/
|
|
119
|
+
ariaLabel: {
|
|
120
|
+
type: StringConstructor;
|
|
121
|
+
default: undefined;
|
|
122
|
+
};
|
|
123
|
+
/**
|
|
124
|
+
* Additional CSS classes
|
|
125
|
+
*/
|
|
126
|
+
className: {
|
|
127
|
+
type: StringConstructor;
|
|
128
|
+
default: undefined;
|
|
129
|
+
};
|
|
130
|
+
/**
|
|
131
|
+
* Inline styles
|
|
132
|
+
*/
|
|
133
|
+
style: {
|
|
134
|
+
type: PropType<Record<string, unknown>>;
|
|
135
|
+
default: undefined;
|
|
136
|
+
};
|
|
137
|
+
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
138
|
+
[key: string]: any;
|
|
139
|
+
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
140
|
+
/**
|
|
141
|
+
* Emitted when the handle position changes (for v-model:position)
|
|
142
|
+
*/
|
|
143
|
+
'update:position': (value: number) => boolean;
|
|
144
|
+
/**
|
|
145
|
+
* Emitted when the handle position changes
|
|
146
|
+
*/
|
|
147
|
+
change: (value: number) => boolean;
|
|
148
|
+
}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
149
|
+
/**
|
|
150
|
+
* Before (starting) image URL. The `before` slot takes precedence when provided.
|
|
151
|
+
*/
|
|
152
|
+
beforeSrc: {
|
|
153
|
+
type: StringConstructor;
|
|
154
|
+
default: undefined;
|
|
155
|
+
};
|
|
156
|
+
/**
|
|
157
|
+
* After (ending) image URL. The `after` slot takes precedence when provided.
|
|
158
|
+
*/
|
|
159
|
+
afterSrc: {
|
|
160
|
+
type: StringConstructor;
|
|
161
|
+
default: undefined;
|
|
162
|
+
};
|
|
163
|
+
/**
|
|
164
|
+
* Alternative text for the before image
|
|
165
|
+
* @default ''
|
|
166
|
+
*/
|
|
167
|
+
beforeAlt: {
|
|
168
|
+
type: StringConstructor;
|
|
169
|
+
default: string;
|
|
170
|
+
};
|
|
171
|
+
/**
|
|
172
|
+
* Alternative text for the after image
|
|
173
|
+
* @default ''
|
|
174
|
+
*/
|
|
175
|
+
afterAlt: {
|
|
176
|
+
type: StringConstructor;
|
|
177
|
+
default: string;
|
|
178
|
+
};
|
|
179
|
+
/**
|
|
180
|
+
* Object-fit applied to the before/after `<img>` elements
|
|
181
|
+
* @default 'cover'
|
|
182
|
+
*/
|
|
183
|
+
fit: {
|
|
184
|
+
type: PropType<ImageFit>;
|
|
185
|
+
default: string;
|
|
186
|
+
};
|
|
187
|
+
/**
|
|
188
|
+
* Handle position as a percentage of the before image that is visible
|
|
189
|
+
* (controlled mode)
|
|
190
|
+
*/
|
|
191
|
+
position: {
|
|
192
|
+
type: NumberConstructor;
|
|
193
|
+
default: undefined;
|
|
194
|
+
};
|
|
195
|
+
/**
|
|
196
|
+
* Initial handle position (uncontrolled mode)
|
|
197
|
+
* @default 50
|
|
198
|
+
*/
|
|
199
|
+
defaultPosition: {
|
|
200
|
+
type: NumberConstructor;
|
|
201
|
+
default: undefined;
|
|
202
|
+
};
|
|
203
|
+
/**
|
|
204
|
+
* Comparison axis
|
|
205
|
+
* @default 'horizontal'
|
|
206
|
+
*/
|
|
207
|
+
orientation: {
|
|
208
|
+
type: PropType<ImageCompareOrientation>;
|
|
209
|
+
default: string;
|
|
210
|
+
};
|
|
211
|
+
/**
|
|
212
|
+
* Keyboard and pointer snap increment, in percentage points
|
|
213
|
+
* @default 1
|
|
214
|
+
*/
|
|
215
|
+
step: {
|
|
216
|
+
type: NumberConstructor;
|
|
217
|
+
default: undefined;
|
|
218
|
+
};
|
|
219
|
+
/**
|
|
220
|
+
* Whether pointer and keyboard adjustment are disabled
|
|
221
|
+
* @default false
|
|
222
|
+
*/
|
|
223
|
+
disabled: {
|
|
224
|
+
type: BooleanConstructor;
|
|
225
|
+
default: boolean;
|
|
226
|
+
};
|
|
227
|
+
/**
|
|
228
|
+
* Root width (CSS value). A number is treated as pixels.
|
|
229
|
+
*/
|
|
230
|
+
width: {
|
|
231
|
+
type: PropType<number | string>;
|
|
232
|
+
default: undefined;
|
|
233
|
+
};
|
|
234
|
+
/**
|
|
235
|
+
* Root height (CSS value). A number is treated as pixels.
|
|
236
|
+
*/
|
|
237
|
+
height: {
|
|
238
|
+
type: PropType<number | string>;
|
|
239
|
+
default: undefined;
|
|
240
|
+
};
|
|
241
|
+
/**
|
|
242
|
+
* Accessible name for the comparison handle
|
|
243
|
+
* @default 'Image comparison'
|
|
244
|
+
*/
|
|
245
|
+
ariaLabel: {
|
|
246
|
+
type: StringConstructor;
|
|
247
|
+
default: undefined;
|
|
248
|
+
};
|
|
249
|
+
/**
|
|
250
|
+
* Additional CSS classes
|
|
251
|
+
*/
|
|
252
|
+
className: {
|
|
253
|
+
type: StringConstructor;
|
|
254
|
+
default: undefined;
|
|
255
|
+
};
|
|
256
|
+
/**
|
|
257
|
+
* Inline styles
|
|
258
|
+
*/
|
|
259
|
+
style: {
|
|
260
|
+
type: PropType<Record<string, unknown>>;
|
|
261
|
+
default: undefined;
|
|
262
|
+
};
|
|
263
|
+
}>> & Readonly<{
|
|
264
|
+
onChange?: ((value: number) => any) | undefined;
|
|
265
|
+
"onUpdate:position"?: ((value: number) => any) | undefined;
|
|
266
|
+
}>, {
|
|
267
|
+
ariaLabel: string;
|
|
268
|
+
className: string;
|
|
269
|
+
style: Record<string, unknown>;
|
|
270
|
+
disabled: boolean;
|
|
271
|
+
step: number;
|
|
272
|
+
width: string | number;
|
|
273
|
+
height: string | number;
|
|
274
|
+
position: number;
|
|
275
|
+
orientation: ImageCompareOrientation;
|
|
276
|
+
fit: ImageFit;
|
|
277
|
+
beforeSrc: string;
|
|
278
|
+
afterSrc: string;
|
|
279
|
+
beforeAlt: string;
|
|
280
|
+
afterAlt: string;
|
|
281
|
+
defaultPosition: number;
|
|
282
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
283
|
+
|
|
284
|
+
export { ImageCompare, type VueImageCompareProps, ImageCompare as default };
|
|
@@ -260,9 +260,9 @@ declare const Input: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
260
260
|
clearable: boolean;
|
|
261
261
|
readonly: boolean;
|
|
262
262
|
autoFocus: boolean;
|
|
263
|
+
_shakeTrigger: number;
|
|
263
264
|
showCount: boolean;
|
|
264
265
|
showPassword: boolean;
|
|
265
|
-
_shakeTrigger: number;
|
|
266
266
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
267
267
|
|
|
268
268
|
export { Input, type VueInputProps, Input as default };
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
import * as vue from 'vue';
|
|
2
|
+
import { PropType } from 'vue';
|
|
3
|
+
import { ComponentSize, InputStatus, InputOTPType } from '@expcat/tigercat-core';
|
|
4
|
+
|
|
5
|
+
type VueInputOTPProps = InstanceType<typeof InputOTP>['$props'];
|
|
6
|
+
declare const InputOTP: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
7
|
+
/**
|
|
8
|
+
* Value (for v-model) — the joined characters
|
|
9
|
+
*/
|
|
10
|
+
modelValue: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
default: undefined;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Default value (for uncontrolled mode)
|
|
16
|
+
*/
|
|
17
|
+
defaultValue: {
|
|
18
|
+
type: StringConstructor;
|
|
19
|
+
default: string;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Input size
|
|
23
|
+
* @default 'md'
|
|
24
|
+
*/
|
|
25
|
+
size: {
|
|
26
|
+
type: PropType<ComponentSize>;
|
|
27
|
+
default: string;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Validation status
|
|
31
|
+
* @default 'default'
|
|
32
|
+
*/
|
|
33
|
+
status: {
|
|
34
|
+
type: PropType<InputStatus>;
|
|
35
|
+
default: string;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Error message to display
|
|
39
|
+
*/
|
|
40
|
+
errorMessage: StringConstructor;
|
|
41
|
+
/**
|
|
42
|
+
* Number of character slots
|
|
43
|
+
* @default 6
|
|
44
|
+
*/
|
|
45
|
+
length: {
|
|
46
|
+
type: NumberConstructor;
|
|
47
|
+
default: number;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Allowed character set
|
|
51
|
+
* @default 'numeric'
|
|
52
|
+
*/
|
|
53
|
+
type: {
|
|
54
|
+
type: PropType<InputOTPType>;
|
|
55
|
+
default: string;
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* Per-character validation regex; overrides `type` filtering
|
|
59
|
+
*/
|
|
60
|
+
pattern: {
|
|
61
|
+
type: PropType<RegExp>;
|
|
62
|
+
default: undefined;
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* Hide entered characters (renders maskChar instead)
|
|
66
|
+
*/
|
|
67
|
+
masked: BooleanConstructor;
|
|
68
|
+
/**
|
|
69
|
+
* Character shown per filled slot when masked
|
|
70
|
+
* @default '•'
|
|
71
|
+
*/
|
|
72
|
+
maskChar: {
|
|
73
|
+
type: StringConstructor;
|
|
74
|
+
default: string;
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* Visual slot grouping, e.g. [3, 3]
|
|
78
|
+
*/
|
|
79
|
+
groups: {
|
|
80
|
+
type: PropType<number[]>;
|
|
81
|
+
default: undefined;
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* Separator rendered between groups
|
|
85
|
+
* @default '-'
|
|
86
|
+
*/
|
|
87
|
+
separator: {
|
|
88
|
+
type: StringConstructor;
|
|
89
|
+
default: string;
|
|
90
|
+
};
|
|
91
|
+
/** Whether the input is disabled */
|
|
92
|
+
disabled: BooleanConstructor;
|
|
93
|
+
/** Whether the input is readonly */
|
|
94
|
+
readonly: BooleanConstructor;
|
|
95
|
+
/** Whether to autofocus the first empty slot on mount */
|
|
96
|
+
autoFocus: BooleanConstructor;
|
|
97
|
+
/** Name for the hidden input carrying the joined value */
|
|
98
|
+
name: StringConstructor;
|
|
99
|
+
/** Id attribute applied to the group element */
|
|
100
|
+
id: StringConstructor;
|
|
101
|
+
/** Accessible label for the slot group */
|
|
102
|
+
ariaLabel: StringConstructor;
|
|
103
|
+
/**
|
|
104
|
+
* Internal shake trigger counter (used by FormItem)
|
|
105
|
+
* @internal
|
|
106
|
+
*/
|
|
107
|
+
_shakeTrigger: {
|
|
108
|
+
type: NumberConstructor;
|
|
109
|
+
default: undefined;
|
|
110
|
+
};
|
|
111
|
+
/** Additional CSS classes */
|
|
112
|
+
className: StringConstructor;
|
|
113
|
+
/** Inline styles */
|
|
114
|
+
style: {
|
|
115
|
+
type: PropType<Record<string, string | number>>;
|
|
116
|
+
default: undefined;
|
|
117
|
+
};
|
|
118
|
+
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
119
|
+
[key: string]: any;
|
|
120
|
+
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
121
|
+
'update:modelValue': null;
|
|
122
|
+
complete: null;
|
|
123
|
+
focus: null;
|
|
124
|
+
blur: null;
|
|
125
|
+
}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
126
|
+
/**
|
|
127
|
+
* Value (for v-model) — the joined characters
|
|
128
|
+
*/
|
|
129
|
+
modelValue: {
|
|
130
|
+
type: StringConstructor;
|
|
131
|
+
default: undefined;
|
|
132
|
+
};
|
|
133
|
+
/**
|
|
134
|
+
* Default value (for uncontrolled mode)
|
|
135
|
+
*/
|
|
136
|
+
defaultValue: {
|
|
137
|
+
type: StringConstructor;
|
|
138
|
+
default: string;
|
|
139
|
+
};
|
|
140
|
+
/**
|
|
141
|
+
* Input size
|
|
142
|
+
* @default 'md'
|
|
143
|
+
*/
|
|
144
|
+
size: {
|
|
145
|
+
type: PropType<ComponentSize>;
|
|
146
|
+
default: string;
|
|
147
|
+
};
|
|
148
|
+
/**
|
|
149
|
+
* Validation status
|
|
150
|
+
* @default 'default'
|
|
151
|
+
*/
|
|
152
|
+
status: {
|
|
153
|
+
type: PropType<InputStatus>;
|
|
154
|
+
default: string;
|
|
155
|
+
};
|
|
156
|
+
/**
|
|
157
|
+
* Error message to display
|
|
158
|
+
*/
|
|
159
|
+
errorMessage: StringConstructor;
|
|
160
|
+
/**
|
|
161
|
+
* Number of character slots
|
|
162
|
+
* @default 6
|
|
163
|
+
*/
|
|
164
|
+
length: {
|
|
165
|
+
type: NumberConstructor;
|
|
166
|
+
default: number;
|
|
167
|
+
};
|
|
168
|
+
/**
|
|
169
|
+
* Allowed character set
|
|
170
|
+
* @default 'numeric'
|
|
171
|
+
*/
|
|
172
|
+
type: {
|
|
173
|
+
type: PropType<InputOTPType>;
|
|
174
|
+
default: string;
|
|
175
|
+
};
|
|
176
|
+
/**
|
|
177
|
+
* Per-character validation regex; overrides `type` filtering
|
|
178
|
+
*/
|
|
179
|
+
pattern: {
|
|
180
|
+
type: PropType<RegExp>;
|
|
181
|
+
default: undefined;
|
|
182
|
+
};
|
|
183
|
+
/**
|
|
184
|
+
* Hide entered characters (renders maskChar instead)
|
|
185
|
+
*/
|
|
186
|
+
masked: BooleanConstructor;
|
|
187
|
+
/**
|
|
188
|
+
* Character shown per filled slot when masked
|
|
189
|
+
* @default '•'
|
|
190
|
+
*/
|
|
191
|
+
maskChar: {
|
|
192
|
+
type: StringConstructor;
|
|
193
|
+
default: string;
|
|
194
|
+
};
|
|
195
|
+
/**
|
|
196
|
+
* Visual slot grouping, e.g. [3, 3]
|
|
197
|
+
*/
|
|
198
|
+
groups: {
|
|
199
|
+
type: PropType<number[]>;
|
|
200
|
+
default: undefined;
|
|
201
|
+
};
|
|
202
|
+
/**
|
|
203
|
+
* Separator rendered between groups
|
|
204
|
+
* @default '-'
|
|
205
|
+
*/
|
|
206
|
+
separator: {
|
|
207
|
+
type: StringConstructor;
|
|
208
|
+
default: string;
|
|
209
|
+
};
|
|
210
|
+
/** Whether the input is disabled */
|
|
211
|
+
disabled: BooleanConstructor;
|
|
212
|
+
/** Whether the input is readonly */
|
|
213
|
+
readonly: BooleanConstructor;
|
|
214
|
+
/** Whether to autofocus the first empty slot on mount */
|
|
215
|
+
autoFocus: BooleanConstructor;
|
|
216
|
+
/** Name for the hidden input carrying the joined value */
|
|
217
|
+
name: StringConstructor;
|
|
218
|
+
/** Id attribute applied to the group element */
|
|
219
|
+
id: StringConstructor;
|
|
220
|
+
/** Accessible label for the slot group */
|
|
221
|
+
ariaLabel: StringConstructor;
|
|
222
|
+
/**
|
|
223
|
+
* Internal shake trigger counter (used by FormItem)
|
|
224
|
+
* @internal
|
|
225
|
+
*/
|
|
226
|
+
_shakeTrigger: {
|
|
227
|
+
type: NumberConstructor;
|
|
228
|
+
default: undefined;
|
|
229
|
+
};
|
|
230
|
+
/** Additional CSS classes */
|
|
231
|
+
className: StringConstructor;
|
|
232
|
+
/** Inline styles */
|
|
233
|
+
style: {
|
|
234
|
+
type: PropType<Record<string, string | number>>;
|
|
235
|
+
default: undefined;
|
|
236
|
+
};
|
|
237
|
+
}>> & Readonly<{
|
|
238
|
+
onBlur?: ((...args: any[]) => any) | undefined;
|
|
239
|
+
onFocus?: ((...args: any[]) => any) | undefined;
|
|
240
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
241
|
+
onComplete?: ((...args: any[]) => any) | undefined;
|
|
242
|
+
}>, {
|
|
243
|
+
status: InputStatus;
|
|
244
|
+
length: number;
|
|
245
|
+
type: InputOTPType;
|
|
246
|
+
size: ComponentSize;
|
|
247
|
+
style: Record<string, string | number>;
|
|
248
|
+
disabled: boolean;
|
|
249
|
+
pattern: RegExp;
|
|
250
|
+
defaultValue: string;
|
|
251
|
+
modelValue: string;
|
|
252
|
+
separator: string;
|
|
253
|
+
readonly: boolean;
|
|
254
|
+
masked: boolean;
|
|
255
|
+
autoFocus: boolean;
|
|
256
|
+
maskChar: string;
|
|
257
|
+
groups: number[];
|
|
258
|
+
_shakeTrigger: number;
|
|
259
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
260
|
+
|
|
261
|
+
export { InputOTP, type VueInputOTPProps, InputOTP as default };
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import * as vue from 'vue';
|
|
2
|
+
import { PropType } from 'vue';
|
|
3
|
+
import { KbdSize, KbdVariant } from '@expcat/tigercat-core';
|
|
4
|
+
|
|
5
|
+
interface VueKbdProps {
|
|
6
|
+
keys?: string | string[];
|
|
7
|
+
separator?: string;
|
|
8
|
+
size?: KbdSize;
|
|
9
|
+
variant?: KbdVariant;
|
|
10
|
+
className?: string;
|
|
11
|
+
style?: Record<string, unknown>;
|
|
12
|
+
}
|
|
13
|
+
declare const Kbd: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
14
|
+
/**
|
|
15
|
+
* One key or a combo list. A string is a single key; an array is joined
|
|
16
|
+
* with `separator`. Combine with the default slot to append a final key.
|
|
17
|
+
*/
|
|
18
|
+
keys: {
|
|
19
|
+
type: PropType<string | string[]>;
|
|
20
|
+
default: undefined;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Separator between combo keys
|
|
24
|
+
* @default '+'
|
|
25
|
+
*/
|
|
26
|
+
separator: {
|
|
27
|
+
type: StringConstructor;
|
|
28
|
+
default: undefined;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Visual size
|
|
32
|
+
* @default 'md'
|
|
33
|
+
*/
|
|
34
|
+
size: {
|
|
35
|
+
type: PropType<KbdSize>;
|
|
36
|
+
default: string;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Visual variant. `default` reuses Tag default chrome; `subtle` is quieter.
|
|
40
|
+
* @default 'default'
|
|
41
|
+
*/
|
|
42
|
+
variant: {
|
|
43
|
+
type: PropType<KbdVariant>;
|
|
44
|
+
default: string;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Additional CSS classes
|
|
48
|
+
*/
|
|
49
|
+
className: {
|
|
50
|
+
type: StringConstructor;
|
|
51
|
+
default: undefined;
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Inline styles
|
|
55
|
+
*/
|
|
56
|
+
style: {
|
|
57
|
+
type: PropType<Record<string, unknown>>;
|
|
58
|
+
default: undefined;
|
|
59
|
+
};
|
|
60
|
+
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
61
|
+
[key: string]: any;
|
|
62
|
+
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
63
|
+
/**
|
|
64
|
+
* One key or a combo list. A string is a single key; an array is joined
|
|
65
|
+
* with `separator`. Combine with the default slot to append a final key.
|
|
66
|
+
*/
|
|
67
|
+
keys: {
|
|
68
|
+
type: PropType<string | string[]>;
|
|
69
|
+
default: undefined;
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* Separator between combo keys
|
|
73
|
+
* @default '+'
|
|
74
|
+
*/
|
|
75
|
+
separator: {
|
|
76
|
+
type: StringConstructor;
|
|
77
|
+
default: undefined;
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* Visual size
|
|
81
|
+
* @default 'md'
|
|
82
|
+
*/
|
|
83
|
+
size: {
|
|
84
|
+
type: PropType<KbdSize>;
|
|
85
|
+
default: string;
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* Visual variant. `default` reuses Tag default chrome; `subtle` is quieter.
|
|
89
|
+
* @default 'default'
|
|
90
|
+
*/
|
|
91
|
+
variant: {
|
|
92
|
+
type: PropType<KbdVariant>;
|
|
93
|
+
default: string;
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* Additional CSS classes
|
|
97
|
+
*/
|
|
98
|
+
className: {
|
|
99
|
+
type: StringConstructor;
|
|
100
|
+
default: undefined;
|
|
101
|
+
};
|
|
102
|
+
/**
|
|
103
|
+
* Inline styles
|
|
104
|
+
*/
|
|
105
|
+
style: {
|
|
106
|
+
type: PropType<Record<string, unknown>>;
|
|
107
|
+
default: undefined;
|
|
108
|
+
};
|
|
109
|
+
}>> & Readonly<{}>, {
|
|
110
|
+
keys: string | string[];
|
|
111
|
+
size: KbdSize;
|
|
112
|
+
className: string;
|
|
113
|
+
style: Record<string, unknown>;
|
|
114
|
+
variant: KbdVariant;
|
|
115
|
+
separator: string;
|
|
116
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
117
|
+
|
|
118
|
+
export { Kbd, type VueKbdProps, Kbd as default };
|