@codemonster-ru/vueforge 0.46.0 → 0.47.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
@@ -28,6 +28,7 @@ import {
28
28
  Button,
29
29
  Input,
30
30
  PasswordInput,
31
+ OtpInput,
31
32
  NumberInput,
32
33
  FormField,
33
34
  Textarea,
@@ -81,6 +82,7 @@ app.use(VueForge, {
81
82
  <Input v-model="name" placeholder="Your name" />
82
83
  </FormField>
83
84
  <PasswordInput v-model="password" placeholder="Enter password" show-strength />
85
+ <OtpInput v-model="otp" :length="6" />
84
86
  <NumberInput v-model="age" :min="0" :max="120" :step="1" />
85
87
  <Textarea v-model="bio" placeholder="Tell us about yourself" />
86
88
  <FileUpload v-model="resume" accept=".pdf,.doc,.docx" />
@@ -173,6 +175,7 @@ app.use(VueForge, {
173
175
  - Alert
174
176
  - Input
175
177
  - PasswordInput
178
+ - OtpInput
176
179
  - NumberInput
177
180
  - FormField
178
181
  - Textarea
@@ -215,10 +218,11 @@ Input / Password / Textarea (quick API):
215
218
 
216
219
  - `Input`: single-line control, supports `v-model`, `size`, `variant`, `disabled`, `readonly`.
217
220
  - `PasswordInput`: password control, supports visibility toggle, strength meter, CapsLock hint, `size`, and `variant`.
221
+ - `OtpInput`: one-time code control, supports fixed length, paste handling, numeric/alphanumeric modes, `size`, and `variant`.
218
222
  - `NumberInput`: numeric control, supports `v-model`, `min`, `max`, `step`, `precision`, `controls`, `size`, `variant`.
219
223
  - `Textarea`: multi-line control, same as Input plus `rows`.
220
224
  - `TagInput`: token/tag control, supports `v-model` (array), suggestions, custom tags, `maxTags`, `clearable`, `size`, `variant`.
221
- - `Checkbox`, `Select`, `Autocomplete`, `MultiSelect`, `TagInput`, `DatePicker`, `DateRangePicker`, `Pagination`, `DataTable`, and `TreeSelect` also support `variant: 'filled' | 'outlined'`.
225
+ - `OtpInput`, `Checkbox`, `Select`, `Autocomplete`, `MultiSelect`, `TagInput`, `DatePicker`, `DateRangePicker`, `Pagination`, `DataTable`, and `TreeSelect` also support `variant: 'filled' | 'outlined'`.
222
226
 
223
227
  ## FormField
224
228
 
@@ -770,6 +774,51 @@ Component tokens (override via `theme.overrides.components.passwordInput`):
770
774
  - `small.fontSize`, `small.padding`
771
775
  - `large.fontSize`, `large.padding`
772
776
 
777
+ ## OtpInput
778
+
779
+ Props:
780
+
781
+ - `modelValue?: string` (v-model)
782
+ - `length?: number` (default `6`)
783
+ - `placeholder?: string`
784
+ - `disabled?: boolean`
785
+ - `readonly?: boolean`
786
+ - `mask?: boolean` (default `false`)
787
+ - `alphanumeric?: boolean` (default `false`)
788
+ - `autocomplete?: string` (default `one-time-code`)
789
+ - `autoFocus?: boolean` (default `false`)
790
+ - `size?: 'small' | 'normal' | 'large'` (default `normal`)
791
+ - `variant?: 'filled' | 'outlined'` (default `filled`)
792
+ - `ariaLabel?: string` (default `OTP input`)
793
+
794
+ Events:
795
+
796
+ - `update:modelValue`
797
+ - `change`
798
+ - `complete` (payload: `string`)
799
+ - `focus`
800
+ - `blur`
801
+ - `paste` (payload: `string`)
802
+
803
+ Example:
804
+
805
+ ```vue
806
+ <OtpInput v-model="otp" :length="6" />
807
+ <OtpInput v-model="backupCode" :length="8" alphanumeric variant="outlined" />
808
+ ```
809
+
810
+ ### OtpInput tokens
811
+
812
+ Component tokens (override via `theme.overrides.components.otpInput`):
813
+
814
+ - `gap`, `fontSize`, `cellSize`, `padding`
815
+ - `borderRadius`, `borderColor`
816
+ - `backgroundColor`, `textColor`, `placeholderColor`
817
+ - `focusBorderColor`, `focusRingShadow`, `hoverBorderColor`
818
+ - `disabledOpacity`
819
+ - `small.cellSize`, `small.fontSize`, `small.padding`
820
+ - `large.cellSize`, `large.fontSize`, `large.padding`
821
+
773
822
  ## RadioGroup / RadioButton
774
823
 
775
824
  Props (RadioGroup):
@@ -1798,7 +1847,7 @@ VueForge exposes design tokens as CSS variables generated from the theme preset.
1798
1847
  Typed tokens:
1799
1848
 
1800
1849
  - `ThemeTokens`/`ThemeOptions`/`ThemePreset` are exported for type-safe theming in TS.
1801
- - `components.*` accepts component-specific tokens (typed keys: button/card/checkbox/radio/tabs/accordion/toast/alert/input/passwordInput/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).
1850
+ - `components.*` accepts component-specific tokens (typed keys: button/card/checkbox/radio/tabs/accordion/toast/alert/input/passwordInput/otpInput/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).
1802
1851
 
1803
1852
  Default core values (from `DefaultTheme`):
1804
1853