@fiscozen/input 3.1.0 → 3.3.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/CHANGELOG.md +24 -0
- package/coverage/FzCurrencyInput.vue.html +640 -0
- package/coverage/FzInput.vue.html +709 -0
- package/coverage/base.css +224 -0
- package/coverage/block-navigation.js +87 -0
- package/coverage/clover.xml +494 -0
- package/coverage/coverage-final.json +4 -0
- package/coverage/favicon.png +0 -0
- package/coverage/index.html +146 -0
- package/coverage/prettify.css +1 -0
- package/coverage/prettify.js +2 -0
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +196 -0
- package/coverage/useInputStyle.ts.html +343 -0
- package/dist/input.js +272 -7967
- package/dist/input.umd.cjs +1 -557
- package/dist/src/FzCurrencyInput.vue.d.ts +44 -4
- package/dist/src/FzInput.vue.d.ts +7 -0
- package/dist/src/types.d.ts +28 -0
- package/package.json +6 -6
- package/src/FzCurrencyInput.vue +7 -0
- package/src/FzInput.vue +482 -561
- package/src/__tests__/FzCurrencyInput.spec.ts +1169 -1068
- package/src/__tests__/FzInput.spec.ts +128 -3
- package/src/types.ts +28 -0
- package/src/useInputStyle.ts +2 -2
- package/tsconfig.tsbuildinfo +1 -1
- package/vite.config.ts +1 -1
- package/dist/input.css +0 -2
|
@@ -49,9 +49,14 @@ declare function __VLS_template(): {
|
|
|
49
49
|
readonly name?: string | undefined;
|
|
50
50
|
readonly readonly?: boolean | undefined;
|
|
51
51
|
readonly highlighted?: boolean | undefined;
|
|
52
|
+
readonly highlightedDescription?: string | undefined;
|
|
52
53
|
readonly aiReasoning?: boolean | undefined;
|
|
54
|
+
readonly aiReasoningDescription?: string | undefined;
|
|
55
|
+
readonly disableEmphasisReset?: boolean | undefined;
|
|
53
56
|
readonly maxlength?: number | undefined;
|
|
54
57
|
readonly autocomplete?: boolean | undefined;
|
|
58
|
+
readonly clearable?: boolean | undefined;
|
|
59
|
+
readonly clearAriaLabel?: string | undefined;
|
|
55
60
|
readonly leftIconClass?: string | undefined;
|
|
56
61
|
readonly onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
57
62
|
readonly onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
@@ -60,6 +65,7 @@ declare function __VLS_template(): {
|
|
|
60
65
|
readonly "onFzinput:second-right-icon-click"?: (() => any) | undefined;
|
|
61
66
|
readonly "onUpdate:highlighted"?: ((value: boolean) => any) | undefined;
|
|
62
67
|
readonly "onUpdate:aiReasoning"?: ((value: boolean) => any) | undefined;
|
|
68
|
+
readonly "onFzinput:clear"?: (() => any) | undefined;
|
|
63
69
|
readonly "onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
64
70
|
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
65
71
|
$attrs: {
|
|
@@ -77,7 +83,7 @@ declare function __VLS_template(): {
|
|
|
77
83
|
$root: import('vue').ComponentPublicInstance | null;
|
|
78
84
|
$parent: import('vue').ComponentPublicInstance | null;
|
|
79
85
|
$host: Element | null;
|
|
80
|
-
$emit: ((event: "focus", event: FocusEvent) => void) & ((event: "blur", event: FocusEvent) => void) & ((event: "fzinput:left-icon-click") => void) & ((event: "fzinput:right-icon-click") => void) & ((event: "fzinput:second-right-icon-click") => void) & ((event: "update:highlighted", value: boolean) => void) & ((event: "update:aiReasoning", value: boolean) => void) & ((event: "update:modelValue", value: string) => void);
|
|
86
|
+
$emit: ((event: "focus", event: FocusEvent) => void) & ((event: "blur", event: FocusEvent) => void) & ((event: "fzinput:left-icon-click") => void) & ((event: "fzinput:right-icon-click") => void) & ((event: "fzinput:second-right-icon-click") => void) & ((event: "update:highlighted", value: boolean) => void) & ((event: "update:aiReasoning", value: boolean) => void) & ((event: "fzinput:clear") => void) & ((event: "update:modelValue", value: string) => void);
|
|
81
87
|
$el: any;
|
|
82
88
|
$options: import('vue').ComponentOptionsBase<Readonly<{
|
|
83
89
|
modelValue?: string;
|
|
@@ -89,6 +95,7 @@ declare function __VLS_template(): {
|
|
|
89
95
|
"onFzinput:second-right-icon-click"?: (() => any) | undefined;
|
|
90
96
|
"onUpdate:highlighted"?: ((value: boolean) => any) | undefined;
|
|
91
97
|
"onUpdate:aiReasoning"?: ((value: boolean) => any) | undefined;
|
|
98
|
+
"onFzinput:clear"?: (() => any) | undefined;
|
|
92
99
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
93
100
|
}>, {
|
|
94
101
|
inputRef: import('vue').Ref<HTMLInputElement | null, HTMLInputElement | null>;
|
|
@@ -101,6 +108,7 @@ declare function __VLS_template(): {
|
|
|
101
108
|
"fzinput:second-right-icon-click": () => any;
|
|
102
109
|
"update:highlighted": (value: boolean) => any;
|
|
103
110
|
"update:aiReasoning": (value: boolean) => any;
|
|
111
|
+
"fzinput:clear": () => any;
|
|
104
112
|
"update:modelValue": (value: string) => any;
|
|
105
113
|
}, string, {
|
|
106
114
|
variant: "normal" | "floating-label";
|
|
@@ -110,8 +118,13 @@ declare function __VLS_template(): {
|
|
|
110
118
|
secondRightIconButtonVariant: import('@fiscozen/button').IconButtonVariant;
|
|
111
119
|
error: boolean;
|
|
112
120
|
highlighted: boolean;
|
|
121
|
+
highlightedDescription: string;
|
|
113
122
|
aiReasoning: boolean;
|
|
123
|
+
aiReasoningDescription: string;
|
|
124
|
+
disableEmphasisReset: boolean;
|
|
114
125
|
autocomplete: boolean;
|
|
126
|
+
clearable: boolean;
|
|
127
|
+
clearAriaLabel: string;
|
|
115
128
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
116
129
|
beforeCreate?: (() => void) | (() => void)[];
|
|
117
130
|
created?: (() => void) | (() => void)[];
|
|
@@ -140,8 +153,13 @@ declare function __VLS_template(): {
|
|
|
140
153
|
secondRightIconButtonVariant: import('@fiscozen/button').IconButtonVariant;
|
|
141
154
|
error: boolean;
|
|
142
155
|
highlighted: boolean;
|
|
156
|
+
highlightedDescription: string;
|
|
143
157
|
aiReasoning: boolean;
|
|
158
|
+
aiReasoningDescription: string;
|
|
159
|
+
disableEmphasisReset: boolean;
|
|
144
160
|
autocomplete: boolean;
|
|
161
|
+
clearable: boolean;
|
|
162
|
+
clearAriaLabel: string;
|
|
145
163
|
}> & Omit<Readonly<{
|
|
146
164
|
modelValue?: string;
|
|
147
165
|
} & import('./types').FzInputProps> & Readonly<{
|
|
@@ -152,8 +170,9 @@ declare function __VLS_template(): {
|
|
|
152
170
|
"onFzinput:second-right-icon-click"?: (() => any) | undefined;
|
|
153
171
|
"onUpdate:highlighted"?: ((value: boolean) => any) | undefined;
|
|
154
172
|
"onUpdate:aiReasoning"?: ((value: boolean) => any) | undefined;
|
|
173
|
+
"onFzinput:clear"?: (() => any) | undefined;
|
|
155
174
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
156
|
-
}>, "inputRef" | "containerRef" | ("variant" | "type" | "environment" | "rightIconButtonVariant" | "secondRightIconButtonVariant" | "error" | "highlighted" | "aiReasoning" | "autocomplete")> & import('vue').ShallowUnwrapRef<{
|
|
175
|
+
}>, "inputRef" | "containerRef" | ("variant" | "type" | "environment" | "rightIconButtonVariant" | "secondRightIconButtonVariant" | "error" | "highlighted" | "highlightedDescription" | "aiReasoning" | "aiReasoningDescription" | "disableEmphasisReset" | "autocomplete" | "clearable" | "clearAriaLabel")> & import('vue').ShallowUnwrapRef<{
|
|
157
176
|
inputRef: import('vue').Ref<HTMLInputElement | null, HTMLInputElement | null>;
|
|
158
177
|
containerRef: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
159
178
|
}> & {} & import('vue').ComponentCustomProperties & {} & {
|
|
@@ -180,8 +199,10 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
180
199
|
containerRef: import('vue').ComputedRef<HTMLElement | null | undefined>;
|
|
181
200
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
182
201
|
"update:modelValue": (value: string | number | null | undefined) => any;
|
|
202
|
+
"fzcurrencyinput:clear": () => any;
|
|
183
203
|
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
184
204
|
"onUpdate:modelValue"?: ((value: string | number | null | undefined) => any) | undefined;
|
|
205
|
+
"onFzcurrencyinput:clear"?: (() => any) | undefined;
|
|
185
206
|
}>, {
|
|
186
207
|
minimumFractionDigits: number;
|
|
187
208
|
maximumFractionDigits: number;
|
|
@@ -225,9 +246,14 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
225
246
|
readonly name?: string | undefined;
|
|
226
247
|
readonly readonly?: boolean | undefined;
|
|
227
248
|
readonly highlighted?: boolean | undefined;
|
|
249
|
+
readonly highlightedDescription?: string | undefined;
|
|
228
250
|
readonly aiReasoning?: boolean | undefined;
|
|
251
|
+
readonly aiReasoningDescription?: string | undefined;
|
|
252
|
+
readonly disableEmphasisReset?: boolean | undefined;
|
|
229
253
|
readonly maxlength?: number | undefined;
|
|
230
254
|
readonly autocomplete?: boolean | undefined;
|
|
255
|
+
readonly clearable?: boolean | undefined;
|
|
256
|
+
readonly clearAriaLabel?: string | undefined;
|
|
231
257
|
readonly leftIconClass?: string | undefined;
|
|
232
258
|
readonly onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
233
259
|
readonly onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
@@ -236,6 +262,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
236
262
|
readonly "onFzinput:second-right-icon-click"?: (() => any) | undefined;
|
|
237
263
|
readonly "onUpdate:highlighted"?: ((value: boolean) => any) | undefined;
|
|
238
264
|
readonly "onUpdate:aiReasoning"?: ((value: boolean) => any) | undefined;
|
|
265
|
+
readonly "onFzinput:clear"?: (() => any) | undefined;
|
|
239
266
|
readonly "onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
240
267
|
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
241
268
|
$attrs: {
|
|
@@ -253,7 +280,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
253
280
|
$root: import('vue').ComponentPublicInstance | null;
|
|
254
281
|
$parent: import('vue').ComponentPublicInstance | null;
|
|
255
282
|
$host: Element | null;
|
|
256
|
-
$emit: ((event: "focus", event: FocusEvent) => void) & ((event: "blur", event: FocusEvent) => void) & ((event: "fzinput:left-icon-click") => void) & ((event: "fzinput:right-icon-click") => void) & ((event: "fzinput:second-right-icon-click") => void) & ((event: "update:highlighted", value: boolean) => void) & ((event: "update:aiReasoning", value: boolean) => void) & ((event: "update:modelValue", value: string) => void);
|
|
283
|
+
$emit: ((event: "focus", event: FocusEvent) => void) & ((event: "blur", event: FocusEvent) => void) & ((event: "fzinput:left-icon-click") => void) & ((event: "fzinput:right-icon-click") => void) & ((event: "fzinput:second-right-icon-click") => void) & ((event: "update:highlighted", value: boolean) => void) & ((event: "update:aiReasoning", value: boolean) => void) & ((event: "fzinput:clear") => void) & ((event: "update:modelValue", value: string) => void);
|
|
257
284
|
$el: any;
|
|
258
285
|
$options: import('vue').ComponentOptionsBase<Readonly<{
|
|
259
286
|
modelValue?: string;
|
|
@@ -265,6 +292,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
265
292
|
"onFzinput:second-right-icon-click"?: (() => any) | undefined;
|
|
266
293
|
"onUpdate:highlighted"?: ((value: boolean) => any) | undefined;
|
|
267
294
|
"onUpdate:aiReasoning"?: ((value: boolean) => any) | undefined;
|
|
295
|
+
"onFzinput:clear"?: (() => any) | undefined;
|
|
268
296
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
269
297
|
}>, {
|
|
270
298
|
inputRef: import('vue').Ref<HTMLInputElement | null, HTMLInputElement | null>;
|
|
@@ -277,6 +305,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
277
305
|
"fzinput:second-right-icon-click": () => any;
|
|
278
306
|
"update:highlighted": (value: boolean) => any;
|
|
279
307
|
"update:aiReasoning": (value: boolean) => any;
|
|
308
|
+
"fzinput:clear": () => any;
|
|
280
309
|
"update:modelValue": (value: string) => any;
|
|
281
310
|
}, string, {
|
|
282
311
|
variant: "normal" | "floating-label";
|
|
@@ -286,8 +315,13 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
286
315
|
secondRightIconButtonVariant: import('@fiscozen/button').IconButtonVariant;
|
|
287
316
|
error: boolean;
|
|
288
317
|
highlighted: boolean;
|
|
318
|
+
highlightedDescription: string;
|
|
289
319
|
aiReasoning: boolean;
|
|
320
|
+
aiReasoningDescription: string;
|
|
321
|
+
disableEmphasisReset: boolean;
|
|
290
322
|
autocomplete: boolean;
|
|
323
|
+
clearable: boolean;
|
|
324
|
+
clearAriaLabel: string;
|
|
291
325
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
292
326
|
beforeCreate?: (() => void) | (() => void)[];
|
|
293
327
|
created?: (() => void) | (() => void)[];
|
|
@@ -316,8 +350,13 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
316
350
|
secondRightIconButtonVariant: import('@fiscozen/button').IconButtonVariant;
|
|
317
351
|
error: boolean;
|
|
318
352
|
highlighted: boolean;
|
|
353
|
+
highlightedDescription: string;
|
|
319
354
|
aiReasoning: boolean;
|
|
355
|
+
aiReasoningDescription: string;
|
|
356
|
+
disableEmphasisReset: boolean;
|
|
320
357
|
autocomplete: boolean;
|
|
358
|
+
clearable: boolean;
|
|
359
|
+
clearAriaLabel: string;
|
|
321
360
|
}> & Omit<Readonly<{
|
|
322
361
|
modelValue?: string;
|
|
323
362
|
} & import('./types').FzInputProps> & Readonly<{
|
|
@@ -328,8 +367,9 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
328
367
|
"onFzinput:second-right-icon-click"?: (() => any) | undefined;
|
|
329
368
|
"onUpdate:highlighted"?: ((value: boolean) => any) | undefined;
|
|
330
369
|
"onUpdate:aiReasoning"?: ((value: boolean) => any) | undefined;
|
|
370
|
+
"onFzinput:clear"?: (() => any) | undefined;
|
|
331
371
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
332
|
-
}>, "inputRef" | "containerRef" | ("variant" | "type" | "environment" | "rightIconButtonVariant" | "secondRightIconButtonVariant" | "error" | "highlighted" | "aiReasoning" | "autocomplete")> & import('vue').ShallowUnwrapRef<{
|
|
372
|
+
}>, "inputRef" | "containerRef" | ("variant" | "type" | "environment" | "rightIconButtonVariant" | "secondRightIconButtonVariant" | "error" | "highlighted" | "highlightedDescription" | "aiReasoning" | "aiReasoningDescription" | "disableEmphasisReset" | "autocomplete" | "clearable" | "clearAriaLabel")> & import('vue').ShallowUnwrapRef<{
|
|
333
373
|
inputRef: import('vue').Ref<HTMLInputElement | null, HTMLInputElement | null>;
|
|
334
374
|
containerRef: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
335
375
|
}> & {} & import('vue').ComponentCustomProperties & {} & {
|
|
@@ -37,6 +37,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
37
37
|
"fzinput:second-right-icon-click": () => any;
|
|
38
38
|
"update:highlighted": (value: boolean) => any;
|
|
39
39
|
"update:aiReasoning": (value: boolean) => any;
|
|
40
|
+
"fzinput:clear": () => any;
|
|
40
41
|
"update:modelValue": (value: string) => any;
|
|
41
42
|
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
42
43
|
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
@@ -46,6 +47,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
46
47
|
"onFzinput:second-right-icon-click"?: (() => any) | undefined;
|
|
47
48
|
"onUpdate:highlighted"?: ((value: boolean) => any) | undefined;
|
|
48
49
|
"onUpdate:aiReasoning"?: ((value: boolean) => any) | undefined;
|
|
50
|
+
"onFzinput:clear"?: (() => any) | undefined;
|
|
49
51
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
50
52
|
}>, {
|
|
51
53
|
variant: "normal" | "floating-label";
|
|
@@ -55,8 +57,13 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
55
57
|
secondRightIconButtonVariant: import('@fiscozen/button').IconButtonVariant;
|
|
56
58
|
error: boolean;
|
|
57
59
|
highlighted: boolean;
|
|
60
|
+
highlightedDescription: string;
|
|
58
61
|
aiReasoning: boolean;
|
|
62
|
+
aiReasoningDescription: string;
|
|
63
|
+
disableEmphasisReset: boolean;
|
|
59
64
|
autocomplete: boolean;
|
|
65
|
+
clearable: boolean;
|
|
66
|
+
clearAriaLabel: string;
|
|
60
67
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
61
68
|
containerRef: HTMLDivElement;
|
|
62
69
|
inputRef: HTMLInputElement;
|
package/dist/src/types.d.ts
CHANGED
|
@@ -147,6 +147,11 @@ type FzInputProps = {
|
|
|
147
147
|
* @default false
|
|
148
148
|
*/
|
|
149
149
|
highlighted?: boolean;
|
|
150
|
+
/**
|
|
151
|
+
* Accessible description announced by screen readers when highlighted is active.
|
|
152
|
+
* @default 'Campo in evidenza'
|
|
153
|
+
*/
|
|
154
|
+
highlightedDescription?: string;
|
|
150
155
|
/**
|
|
151
156
|
* Shows AI reasoning state with purple colors (purple border, light purple background, glow ring).
|
|
152
157
|
* Auto-renders a sparkles icon unless leftIcon prop or left-icon slot is provided.
|
|
@@ -156,6 +161,18 @@ type FzInputProps = {
|
|
|
156
161
|
* @default false
|
|
157
162
|
*/
|
|
158
163
|
aiReasoning?: boolean;
|
|
164
|
+
/**
|
|
165
|
+
* Accessible description announced by screen readers when aiReasoning is active.
|
|
166
|
+
* @default 'Suggerito dall\'intelligenza artificiale'
|
|
167
|
+
*/
|
|
168
|
+
aiReasoningDescription?: string;
|
|
169
|
+
/**
|
|
170
|
+
* When true, prevents emphasis (highlighted/aiReasoning) from being reset on user input.
|
|
171
|
+
* Used by FzSelect to prevent emphasis reset when typing in the filter input,
|
|
172
|
+
* since FzSelect resets emphasis on option selection instead.
|
|
173
|
+
* @default false
|
|
174
|
+
*/
|
|
175
|
+
disableEmphasisReset?: boolean;
|
|
159
176
|
/**
|
|
160
177
|
* Native maxlength attribute. Limits maximum number of characters
|
|
161
178
|
*/
|
|
@@ -166,6 +183,17 @@ type FzInputProps = {
|
|
|
166
183
|
* @default false
|
|
167
184
|
*/
|
|
168
185
|
autocomplete?: boolean;
|
|
186
|
+
/**
|
|
187
|
+
* Shows a clear (×) button when the input has a value.
|
|
188
|
+
* Clicking it clears the model and emits `fzinput:clear`.
|
|
189
|
+
* @default false
|
|
190
|
+
*/
|
|
191
|
+
clearable?: boolean;
|
|
192
|
+
/**
|
|
193
|
+
* Accessible label for the clear button.
|
|
194
|
+
* @default 'Cancella'
|
|
195
|
+
*/
|
|
196
|
+
clearAriaLabel?: string;
|
|
169
197
|
/**
|
|
170
198
|
* Additional CSS classes applied to left icon container
|
|
171
199
|
*/
|
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fiscozen/input",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"description": "Design System Input component",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"keywords": [],
|
|
8
8
|
"author": "Cristian Barraco",
|
|
9
9
|
"dependencies": {
|
|
10
|
+
"@fiscozen/button": "3.0.0",
|
|
10
11
|
"@fiscozen/alert": "3.0.0",
|
|
11
|
-
"@fiscozen/composables": "1.0.3"
|
|
12
|
-
"@fiscozen/button": "3.0.0"
|
|
12
|
+
"@fiscozen/composables": "1.0.3"
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|
|
15
15
|
"tailwindcss": "^3.4.1",
|
|
16
16
|
"vue": "^3.4.13",
|
|
17
|
-
"@fiscozen/icons": "^1.0.
|
|
17
|
+
"@fiscozen/icons": "^1.0.4"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"@rushstack/eslint-patch": "^1.3.3",
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"vitest": "^4.1.1",
|
|
34
34
|
"vue-tsc": "^2.2.12",
|
|
35
35
|
"@fiscozen/eslint-config": "^0.1.0",
|
|
36
|
-
"@fiscozen/
|
|
37
|
-
"@fiscozen/
|
|
36
|
+
"@fiscozen/tsconfig": "^0.1.0",
|
|
37
|
+
"@fiscozen/prettier-config": "^0.1.0"
|
|
38
38
|
},
|
|
39
39
|
"license": "MIT",
|
|
40
40
|
"scripts": {
|
package/src/FzCurrencyInput.vue
CHANGED
|
@@ -41,6 +41,12 @@ const props = withDefaults(defineProps<FzCurrencyInputProps>(), {
|
|
|
41
41
|
step: 1,
|
|
42
42
|
});
|
|
43
43
|
|
|
44
|
+
// DOM events (@focus, @blur, @keydown, …) propagate via v-bind fallthrough on the
|
|
45
|
+
// inner FzInput. @update:modelValue is handled by defineModel. Only custom events
|
|
46
|
+
// emitted explicitly by this component need to be declared here.
|
|
47
|
+
const emit = defineEmits<{
|
|
48
|
+
"fzcurrencyinput:clear": [];
|
|
49
|
+
}>();
|
|
44
50
|
const model = defineModel<FzCurrencyInputProps["modelValue"]>();
|
|
45
51
|
|
|
46
52
|
let isInternalUpdate = false;
|
|
@@ -730,6 +736,7 @@ defineExpose({
|
|
|
730
736
|
@focus="handleFocus"
|
|
731
737
|
@blur="handleBlur"
|
|
732
738
|
@paste="handlePaste"
|
|
739
|
+
@fzinput:clear="emit('fzcurrencyinput:clear')"
|
|
733
740
|
>
|
|
734
741
|
<template v-if="$slots.label" #label>
|
|
735
742
|
<slot name="label"></slot>
|