@codemonster-ru/vueforge 0.45.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
@@ -27,6 +27,8 @@ import {
27
27
  DefaultTheme,
28
28
  Button,
29
29
  Input,
30
+ PasswordInput,
31
+ OtpInput,
30
32
  NumberInput,
31
33
  FormField,
32
34
  Textarea,
@@ -79,6 +81,8 @@ app.use(VueForge, {
79
81
  <FormField label="Name" hint="Required field">
80
82
  <Input v-model="name" placeholder="Your name" />
81
83
  </FormField>
84
+ <PasswordInput v-model="password" placeholder="Enter password" show-strength />
85
+ <OtpInput v-model="otp" :length="6" />
82
86
  <NumberInput v-model="age" :min="0" :max="120" :step="1" />
83
87
  <Textarea v-model="bio" placeholder="Tell us about yourself" />
84
88
  <FileUpload v-model="resume" accept=".pdf,.doc,.docx" />
@@ -170,6 +174,8 @@ app.use(VueForge, {
170
174
  - ToastContainer
171
175
  - Alert
172
176
  - Input
177
+ - PasswordInput
178
+ - OtpInput
173
179
  - NumberInput
174
180
  - FormField
175
181
  - Textarea
@@ -208,13 +214,15 @@ app.use(VueForge, {
208
214
  - TreeSelect
209
215
  - VirtualScroller
210
216
 
211
- Input / Textarea (quick API):
217
+ Input / Password / Textarea (quick API):
212
218
 
213
219
  - `Input`: single-line control, supports `v-model`, `size`, `variant`, `disabled`, `readonly`.
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`.
214
222
  - `NumberInput`: numeric control, supports `v-model`, `min`, `max`, `step`, `precision`, `controls`, `size`, `variant`.
215
223
  - `Textarea`: multi-line control, same as Input plus `rows`.
216
224
  - `TagInput`: token/tag control, supports `v-model` (array), suggestions, custom tags, `maxTags`, `clearable`, `size`, `variant`.
217
- - `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'`.
218
226
 
219
227
  ## FormField
220
228
 
@@ -711,6 +719,106 @@ Example:
711
719
  <NumberInput v-model="quantity" :min="0" :max="10" :step="1" />
712
720
  ```
713
721
 
722
+ ## PasswordInput
723
+
724
+ Props:
725
+
726
+ - `modelValue?: string` (v-model)
727
+ - `placeholder?: string`
728
+ - `disabled?: boolean`
729
+ - `readonly?: boolean`
730
+ - `autocomplete?: string` (default `current-password`)
731
+ - `showToggle?: boolean` (default `true`)
732
+ - `showStrength?: boolean` (default `false`)
733
+ - `showCapsLockHint?: boolean` (default `true`)
734
+ - `revealLabel?: string` (default `Show password`)
735
+ - `hideLabel?: string` (default `Hide password`)
736
+ - `revealText?: string` (default `Show`)
737
+ - `hideText?: string` (default `Hide`)
738
+ - `capsLockHint?: string` (default `Caps Lock is on`)
739
+ - `weakLabel?: string` (default `Weak password`)
740
+ - `mediumLabel?: string` (default `Medium password`)
741
+ - `strongLabel?: string` (default `Strong password`)
742
+ - `size?: 'small' | 'normal' | 'large'` (default `normal`)
743
+ - `variant?: 'filled' | 'outlined'` (default `filled`)
744
+ - `ariaLabel?: string` (default `Password input`)
745
+
746
+ Events:
747
+
748
+ - `update:modelValue`
749
+ - `input`
750
+ - `change`
751
+ - `focus`
752
+ - `blur`
753
+ - `toggleVisibility` (payload: `boolean`)
754
+
755
+ Example:
756
+
757
+ ```vue
758
+ <PasswordInput v-model="password" show-strength />
759
+ ```
760
+
761
+ ### PasswordInput tokens
762
+
763
+ Component tokens (override via `theme.overrides.components.passwordInput`):
764
+
765
+ - `gap`, `fontSize`, `padding`
766
+ - `borderRadius`, `borderColor`
767
+ - `backgroundColor`, `textColor`, `placeholderColor`
768
+ - `focusBorderColor`, `focusRingShadow`, `hoverBorderColor`
769
+ - `disabledOpacity`
770
+ - `toggleSize`, `toggleRadius`, `toggleColor`, `toggleHoverBackgroundColor`
771
+ - `strengthGap`, `strengthTrackHeight`, `strengthTrackRadius`, `strengthTrackBackgroundColor`
772
+ - `strengthWeakColor`, `strengthMediumColor`, `strengthStrongColor`
773
+ - `metaFontSize`, `hintColor`
774
+ - `small.fontSize`, `small.padding`
775
+ - `large.fontSize`, `large.padding`
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
+
714
822
  ## RadioGroup / RadioButton
715
823
 
716
824
  Props (RadioGroup):
@@ -1739,7 +1847,7 @@ VueForge exposes design tokens as CSS variables generated from the theme preset.
1739
1847
  Typed tokens:
1740
1848
 
1741
1849
  - `ThemeTokens`/`ThemeOptions`/`ThemePreset` are exported for type-safe theming in TS.
1742
- - `components.*` accepts component-specific tokens (typed keys: button/card/checkbox/radio/tabs/accordion/toast/alert/input/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).
1743
1851
 
1744
1852
  Default core values (from `DefaultTheme`):
1745
1853