@codemonster-ru/vueforge 0.46.0 → 0.48.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,8 @@ import {
28
28
  Button,
29
29
  Input,
30
30
  PasswordInput,
31
+ OtpInput,
32
+ ColorPicker,
31
33
  NumberInput,
32
34
  FormField,
33
35
  Textarea,
@@ -81,6 +83,8 @@ app.use(VueForge, {
81
83
  <Input v-model="name" placeholder="Your name" />
82
84
  </FormField>
83
85
  <PasswordInput v-model="password" placeholder="Enter password" show-strength />
86
+ <OtpInput v-model="otp" :length="6" />
87
+ <ColorPicker v-model="brandColor" :presets="['#2b6cb0', '#0cbc87', '#d6293e']" />
84
88
  <NumberInput v-model="age" :min="0" :max="120" :step="1" />
85
89
  <Textarea v-model="bio" placeholder="Tell us about yourself" />
86
90
  <FileUpload v-model="resume" accept=".pdf,.doc,.docx" />
@@ -173,6 +177,8 @@ app.use(VueForge, {
173
177
  - Alert
174
178
  - Input
175
179
  - PasswordInput
180
+ - OtpInput
181
+ - ColorPicker
176
182
  - NumberInput
177
183
  - FormField
178
184
  - Textarea
@@ -215,10 +221,12 @@ Input / Password / Textarea (quick API):
215
221
 
216
222
  - `Input`: single-line control, supports `v-model`, `size`, `variant`, `disabled`, `readonly`.
217
223
  - `PasswordInput`: password control, supports visibility toggle, strength meter, CapsLock hint, `size`, and `variant`.
224
+ - `OtpInput`: one-time code control, supports fixed length, paste handling, numeric/alphanumeric modes, `size`, and `variant`.
225
+ - `ColorPicker`: color control with presets, optional alpha channel, and output formats (`hex`/`rgb`/`hsl`).
218
226
  - `NumberInput`: numeric control, supports `v-model`, `min`, `max`, `step`, `precision`, `controls`, `size`, `variant`.
219
227
  - `Textarea`: multi-line control, same as Input plus `rows`.
220
228
  - `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'`.
229
+ - `OtpInput`, `ColorPicker`, `Checkbox`, `Select`, `Autocomplete`, `MultiSelect`, `TagInput`, `DatePicker`, `DateRangePicker`, `Pagination`, `DataTable`, and `TreeSelect` also support `variant: 'filled' | 'outlined'`.
222
230
 
223
231
  ## FormField
224
232
 
@@ -770,6 +778,96 @@ Component tokens (override via `theme.overrides.components.passwordInput`):
770
778
  - `small.fontSize`, `small.padding`
771
779
  - `large.fontSize`, `large.padding`
772
780
 
781
+ ## OtpInput
782
+
783
+ Props:
784
+
785
+ - `modelValue?: string` (v-model)
786
+ - `length?: number` (default `6`)
787
+ - `placeholder?: string`
788
+ - `disabled?: boolean`
789
+ - `readonly?: boolean`
790
+ - `mask?: boolean` (default `false`)
791
+ - `alphanumeric?: boolean` (default `false`)
792
+ - `autocomplete?: string` (default `one-time-code`)
793
+ - `autoFocus?: boolean` (default `false`)
794
+ - `size?: 'small' | 'normal' | 'large'` (default `normal`)
795
+ - `variant?: 'filled' | 'outlined'` (default `filled`)
796
+ - `ariaLabel?: string` (default `OTP input`)
797
+
798
+ Events:
799
+
800
+ - `update:modelValue`
801
+ - `change`
802
+ - `complete` (payload: `string`)
803
+ - `focus`
804
+ - `blur`
805
+ - `paste` (payload: `string`)
806
+
807
+ Example:
808
+
809
+ ```vue
810
+ <OtpInput v-model="otp" :length="6" />
811
+ <OtpInput v-model="backupCode" :length="8" alphanumeric variant="outlined" />
812
+ ```
813
+
814
+ ### OtpInput tokens
815
+
816
+ Component tokens (override via `theme.overrides.components.otpInput`):
817
+
818
+ - `gap`, `fontSize`, `cellSize`, `padding`
819
+ - `borderRadius`, `borderColor`
820
+ - `backgroundColor`, `textColor`, `placeholderColor`
821
+ - `focusBorderColor`, `focusRingShadow`, `hoverBorderColor`
822
+ - `disabledOpacity`
823
+ - `small.cellSize`, `small.fontSize`, `small.padding`
824
+ - `large.cellSize`, `large.fontSize`, `large.padding`
825
+
826
+ ## ColorPicker
827
+
828
+ Props:
829
+
830
+ - `modelValue?: string` (v-model)
831
+ - `format?: 'hex' | 'rgb' | 'hsl'` (default `hex`)
832
+ - `alpha?: boolean` (default `false`)
833
+ - `presets?: string[]` (default `[]`)
834
+ - `placeholder?: string`
835
+ - `disabled?: boolean`
836
+ - `readonly?: boolean`
837
+ - `size?: 'small' | 'normal' | 'large'` (default `normal`)
838
+ - `variant?: 'filled' | 'outlined'` (default `filled`)
839
+ - `ariaLabel?: string` (default `Color picker`)
840
+
841
+ Events:
842
+
843
+ - `update:modelValue`
844
+ - `change`
845
+ - `open`
846
+ - `close`
847
+
848
+ Example:
849
+
850
+ ```vue
851
+ <ColorPicker v-model="brandColor" />
852
+ <ColorPicker v-model="brandColorRgba" format="rgb" alpha variant="outlined" />
853
+ ```
854
+
855
+ ### ColorPicker tokens
856
+
857
+ Component tokens (override via `theme.overrides.components.colorPicker`):
858
+
859
+ - `minWidth`, `gap`, `fontSize`, `padding`
860
+ - `borderRadius`, `borderColor`
861
+ - `backgroundColor`, `textColor`, `placeholderColor`
862
+ - `focusBorderColor`, `focusRingShadow`, `hoverBorderColor`
863
+ - `disabledOpacity`
864
+ - `swatchSize`, `swatchRadius`
865
+ - `panelPadding`, `panelBorderColor`, `panelBackgroundColor`, `panelShadow`, `panelGap`
866
+ - `rangeAccentColor`
867
+ - `presetSize`, `presetRadius`, `presetBorderColor`, `presetHoverBorderColor`
868
+ - `small.padding`, `small.fontSize`, `small.swatchSize`, `small.presetSize`
869
+ - `large.padding`, `large.fontSize`, `large.swatchSize`, `large.presetSize`
870
+
773
871
  ## RadioGroup / RadioButton
774
872
 
775
873
  Props (RadioGroup):
@@ -1798,7 +1896,7 @@ VueForge exposes design tokens as CSS variables generated from the theme preset.
1798
1896
  Typed tokens:
1799
1897
 
1800
1898
  - `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).
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).
1802
1900
 
1803
1901
  Default core values (from `DefaultTheme`):
1804
1902