@fiscozen/input 3.4.3 → 3.5.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 +26 -0
- package/dist/input.js +428 -433
- package/dist/input.umd.cjs +1 -1
- package/dist/src/FzCurrencyInput.vue.d.ts +5 -360
- package/dist/src/FzInput.vue.d.ts +26 -61
- package/dist/src/index.d.ts +4 -0
- package/dist/src/types.d.ts +97 -54
- package/dist/src/useCurrencyInput.d.ts +59 -0
- package/dist/src/useInputStyle.d.ts +9 -2
- package/dist/src/utils.d.ts +14 -0
- package/package.json +5 -5
- package/src/FzCurrencyInput.vue +21 -747
- package/src/FzInput.vue +226 -27
- package/src/__tests__/FzCurrencyInput.spec.ts +81 -0
- package/src/__tests__/FzInput.spec.ts +743 -1
- package/src/index.ts +4 -0
- package/src/types.ts +111 -54
- package/src/useCurrencyInput.ts +537 -0
- package/src/useInputStyle.ts +12 -2
- package/src/utils.ts +29 -0
- package/tsconfig.tsbuildinfo +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @fiscozen/input
|
|
2
2
|
|
|
3
|
+
## 3.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 47fe215: FzInput: add `type="currency"` and step controls for `type="number"`; deprecate FzCurrencyInput
|
|
8
|
+
- `FzInput` now supports `type="currency"`: locale-aware currency formatting, min/max clamping, step quantization and a numeric v-model (`number | null | undefined`), powered by the new internal `useCurrencyInput` composable. The component is now generic over its `type` prop, so the v-model stays `string` for every other type.
|
|
9
|
+
- `type="number"` inputs show the same up/down step controls in place of the native browser spinners (stepping uses the native algorithm and respects `min`/`max`/`step`).
|
|
10
|
+
- `type="number"` inputs now rescue pasted content the native input would reject or blank out (e.g. Italian-formatted "1.234,56" or padded spreadsheet copies): it is normalized to a plain decimal string and replaces the whole value. Natively-valid clipboard text keeps the default browser behavior (cursor-position insertion); unparseable text is ignored, keeping the previous value. No decimal truncation or min/max clamping is applied — validation semantics stay native.
|
|
11
|
+
- New `FzInput` props: `min`, `max`, `step`, `forceStep`, `minimumFractionDigits`, `maximumFractionDigits`, `nullOnEmpty`, `zeroOnEmpty`, `stepUpAriaLabel`, `stepDownAriaLabel`.
|
|
12
|
+
- `type` now also accepts the native `search` and `file` types (rendered via passthrough).
|
|
13
|
+
- New exported types: `FzInputType`, `FzInputModelValue`, `FzInputInstance` (use the latter instead of `InstanceType<typeof FzInput>`, which no longer applies to generic components).
|
|
14
|
+
- `FzCurrencyInput` is now a deprecated thin wrapper around `<FzInput type="currency">` with unchanged behavior and API; it will be removed once all consumers have migrated.
|
|
15
|
+
- `@fiscozen/select`, `@fiscozen/typeahead`: internal `InstanceType<typeof FzInput>` usages replaced with `FzInputInstance`.
|
|
16
|
+
- `@fiscozen/table`: internal `compatConfig` assignment on FzInput adapted to the generic component type.
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- 5586027: FzInput: remove the `any` from `useInputStyle`'s props parameter. The composable only reads visual-state props (`variant`, `disabled`, `readonly`, `error`, `highlighted`, `aiReasoning`), none of which depend on the input `type`, so it now takes a `Pick`ed `ToRefs<FzInputStyleProps>` instead of `ToRefs<FzInputProps<any>>`. Type-level cleanup only — no API or runtime change.
|
|
21
|
+
|
|
22
|
+
## 3.4.4
|
|
23
|
+
|
|
24
|
+
### Patch Changes
|
|
25
|
+
|
|
26
|
+
- @fiscozen/alert@3.0.4
|
|
27
|
+
- @fiscozen/button@3.1.1
|
|
28
|
+
|
|
3
29
|
## 3.4.3
|
|
4
30
|
|
|
5
31
|
### Patch Changes
|