@codemonster-ru/vueforge 0.48.0 → 0.49.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 CHANGED
@@ -30,6 +30,7 @@ import {
30
30
  PasswordInput,
31
31
  OtpInput,
32
32
  ColorPicker,
33
+ MaskedInput,
33
34
  NumberInput,
34
35
  FormField,
35
36
  Textarea,
@@ -85,6 +86,7 @@ app.use(VueForge, {
85
86
  <PasswordInput v-model="password" placeholder="Enter password" show-strength />
86
87
  <OtpInput v-model="otp" :length="6" />
87
88
  <ColorPicker v-model="brandColor" :presets="['#2b6cb0', '#0cbc87', '#d6293e']" />
89
+ <MaskedInput v-model="phone" mask="+7 (###) ###-##-##" />
88
90
  <NumberInput v-model="age" :min="0" :max="120" :step="1" />
89
91
  <Textarea v-model="bio" placeholder="Tell us about yourself" />
90
92
  <FileUpload v-model="resume" accept=".pdf,.doc,.docx" />
@@ -179,6 +181,7 @@ app.use(VueForge, {
179
181
  - PasswordInput
180
182
  - OtpInput
181
183
  - ColorPicker
184
+ - MaskedInput
182
185
  - NumberInput
183
186
  - FormField
184
187
  - Textarea
@@ -223,10 +226,11 @@ Input / Password / Textarea (quick API):
223
226
  - `PasswordInput`: password control, supports visibility toggle, strength meter, CapsLock hint, `size`, and `variant`.
224
227
  - `OtpInput`: one-time code control, supports fixed length, paste handling, numeric/alphanumeric modes, `size`, and `variant`.
225
228
  - `ColorPicker`: color control with presets, optional alpha channel, and output formats (`hex`/`rgb`/`hsl`).
229
+ - `MaskedInput`: formatted input control with string/function masks and optional raw output (`unmask`).
226
230
  - `NumberInput`: numeric control, supports `v-model`, `min`, `max`, `step`, `precision`, `controls`, `size`, `variant`.
227
231
  - `Textarea`: multi-line control, same as Input plus `rows`.
228
232
  - `TagInput`: token/tag control, supports `v-model` (array), suggestions, custom tags, `maxTags`, `clearable`, `size`, `variant`.
229
- - `OtpInput`, `ColorPicker`, `Checkbox`, `Select`, `Autocomplete`, `MultiSelect`, `TagInput`, `DatePicker`, `DateRangePicker`, `Pagination`, `DataTable`, and `TreeSelect` also support `variant: 'filled' | 'outlined'`.
233
+ - `OtpInput`, `ColorPicker`, `MaskedInput`, `Checkbox`, `Select`, `Autocomplete`, `MultiSelect`, `TagInput`, `DatePicker`, `DateRangePicker`, `Pagination`, `DataTable`, and `TreeSelect` also support `variant: 'filled' | 'outlined'`.
230
234
 
231
235
  ## FormField
232
236
 
@@ -868,6 +872,48 @@ Component tokens (override via `theme.overrides.components.colorPicker`):
868
872
  - `small.padding`, `small.fontSize`, `small.swatchSize`, `small.presetSize`
869
873
  - `large.padding`, `large.fontSize`, `large.swatchSize`, `large.presetSize`
870
874
 
875
+ ## MaskedInput
876
+
877
+ Props:
878
+
879
+ - `modelValue?: string` (v-model)
880
+ - `mask?: string | ((value: string) => string)` (default `''`)
881
+ - `placeholder?: string`
882
+ - `placeholderChar?: string` (default `_`)
883
+ - `disabled?: boolean`
884
+ - `readonly?: boolean`
885
+ - `unmask?: boolean` (default `false`)
886
+ - `size?: 'small' | 'normal' | 'large'` (default `normal`)
887
+ - `variant?: 'filled' | 'outlined'` (default `filled`)
888
+
889
+ Events:
890
+
891
+ - `update:modelValue`
892
+ - `input`
893
+ - `change`
894
+ - `focus`
895
+ - `blur`
896
+ - `complete`
897
+
898
+ Example:
899
+
900
+ ```vue
901
+ <MaskedInput v-model="phone" mask="+7 (###) ###-##-##" />
902
+ <MaskedInput v-model="licenseRaw" mask="AA-####" unmask variant="outlined" />
903
+ ```
904
+
905
+ ### MaskedInput tokens
906
+
907
+ Component tokens (override via `theme.overrides.components.maskedInput`):
908
+
909
+ - `gap`, `fontSize`, `padding`
910
+ - `borderRadius`, `borderColor`
911
+ - `backgroundColor`, `textColor`, `placeholderColor`
912
+ - `focusBorderColor`, `focusRingShadow`, `hoverBorderColor`
913
+ - `disabledOpacity`
914
+ - `small.fontSize`, `small.padding`
915
+ - `large.fontSize`, `large.padding`
916
+
871
917
  ## RadioGroup / RadioButton
872
918
 
873
919
  Props (RadioGroup):
@@ -1896,7 +1942,7 @@ VueForge exposes design tokens as CSS variables generated from the theme preset.
1896
1942
  Typed tokens:
1897
1943
 
1898
1944
  - `ThemeTokens`/`ThemeOptions`/`ThemePreset` are exported for type-safe theming in TS.
1899
- - `components.*` accepts component-specific tokens (typed keys: button/card/checkbox/radio/tabs/accordion/toast/alert/input/passwordInput/otpInput/colorPicker/numberInput/formField/textarea/link/breadcrumbs/menu/modal/confirmDialog/drawer/popover/dropdown/contextMenu/commandPalette/select/autocomplete/multiselect/taginput/datepicker/daterangepicker/timepicker/pagination/switch/tooltip/skeleton/progress/badge/chip/avatar/datatable/slider/stepper/rating/tree/treeselect/virtualScroller).
1945
+ - `components.*` accepts component-specific tokens (typed keys: button/card/checkbox/radio/tabs/accordion/toast/alert/input/passwordInput/otpInput/colorPicker/maskedInput/numberInput/formField/textarea/link/breadcrumbs/menu/modal/confirmDialog/drawer/popover/dropdown/contextMenu/commandPalette/select/autocomplete/multiselect/taginput/datepicker/daterangepicker/timepicker/pagination/switch/tooltip/skeleton/progress/badge/chip/avatar/datatable/slider/stepper/rating/tree/treeselect/virtualScroller).
1900
1946
 
1901
1947
  Default core values (from `DefaultTheme`):
1902
1948