@codemonster-ru/vueforge 0.47.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 +97 -2
- package/dist/index.css +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.ts.mjs +3311 -2943
- package/dist/index.ts.umd.js +3 -3
- package/dist/package/components/__tests__/color-picker.test.d.ts +1 -0
- package/dist/package/components/__tests__/masked-input.test.d.ts +1 -0
- package/dist/package/components/color-picker.vue.d.ts +40 -0
- package/dist/package/components/masked-input.vue.d.ts +60 -0
- package/dist/package/components/timepicker.vue.d.ts +1 -1
- package/dist/package/config/theme-core.d.ts +63 -0
- package/dist/package/themes/default/components/color-picker.d.ts +40 -0
- package/dist/package/themes/default/components/masked-input.d.ts +23 -0
- package/dist/package/themes/default/index.d.ts +61 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -29,6 +29,8 @@ import {
|
|
|
29
29
|
Input,
|
|
30
30
|
PasswordInput,
|
|
31
31
|
OtpInput,
|
|
32
|
+
ColorPicker,
|
|
33
|
+
MaskedInput,
|
|
32
34
|
NumberInput,
|
|
33
35
|
FormField,
|
|
34
36
|
Textarea,
|
|
@@ -83,6 +85,8 @@ app.use(VueForge, {
|
|
|
83
85
|
</FormField>
|
|
84
86
|
<PasswordInput v-model="password" placeholder="Enter password" show-strength />
|
|
85
87
|
<OtpInput v-model="otp" :length="6" />
|
|
88
|
+
<ColorPicker v-model="brandColor" :presets="['#2b6cb0', '#0cbc87', '#d6293e']" />
|
|
89
|
+
<MaskedInput v-model="phone" mask="+7 (###) ###-##-##" />
|
|
86
90
|
<NumberInput v-model="age" :min="0" :max="120" :step="1" />
|
|
87
91
|
<Textarea v-model="bio" placeholder="Tell us about yourself" />
|
|
88
92
|
<FileUpload v-model="resume" accept=".pdf,.doc,.docx" />
|
|
@@ -176,6 +180,8 @@ app.use(VueForge, {
|
|
|
176
180
|
- Input
|
|
177
181
|
- PasswordInput
|
|
178
182
|
- OtpInput
|
|
183
|
+
- ColorPicker
|
|
184
|
+
- MaskedInput
|
|
179
185
|
- NumberInput
|
|
180
186
|
- FormField
|
|
181
187
|
- Textarea
|
|
@@ -219,10 +225,12 @@ Input / Password / Textarea (quick API):
|
|
|
219
225
|
- `Input`: single-line control, supports `v-model`, `size`, `variant`, `disabled`, `readonly`.
|
|
220
226
|
- `PasswordInput`: password control, supports visibility toggle, strength meter, CapsLock hint, `size`, and `variant`.
|
|
221
227
|
- `OtpInput`: one-time code control, supports fixed length, paste handling, numeric/alphanumeric modes, `size`, and `variant`.
|
|
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`).
|
|
222
230
|
- `NumberInput`: numeric control, supports `v-model`, `min`, `max`, `step`, `precision`, `controls`, `size`, `variant`.
|
|
223
231
|
- `Textarea`: multi-line control, same as Input plus `rows`.
|
|
224
232
|
- `TagInput`: token/tag control, supports `v-model` (array), suggestions, custom tags, `maxTags`, `clearable`, `size`, `variant`.
|
|
225
|
-
- `OtpInput`, `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'`.
|
|
226
234
|
|
|
227
235
|
## FormField
|
|
228
236
|
|
|
@@ -819,6 +827,93 @@ Component tokens (override via `theme.overrides.components.otpInput`):
|
|
|
819
827
|
- `small.cellSize`, `small.fontSize`, `small.padding`
|
|
820
828
|
- `large.cellSize`, `large.fontSize`, `large.padding`
|
|
821
829
|
|
|
830
|
+
## ColorPicker
|
|
831
|
+
|
|
832
|
+
Props:
|
|
833
|
+
|
|
834
|
+
- `modelValue?: string` (v-model)
|
|
835
|
+
- `format?: 'hex' | 'rgb' | 'hsl'` (default `hex`)
|
|
836
|
+
- `alpha?: boolean` (default `false`)
|
|
837
|
+
- `presets?: string[]` (default `[]`)
|
|
838
|
+
- `placeholder?: string`
|
|
839
|
+
- `disabled?: boolean`
|
|
840
|
+
- `readonly?: boolean`
|
|
841
|
+
- `size?: 'small' | 'normal' | 'large'` (default `normal`)
|
|
842
|
+
- `variant?: 'filled' | 'outlined'` (default `filled`)
|
|
843
|
+
- `ariaLabel?: string` (default `Color picker`)
|
|
844
|
+
|
|
845
|
+
Events:
|
|
846
|
+
|
|
847
|
+
- `update:modelValue`
|
|
848
|
+
- `change`
|
|
849
|
+
- `open`
|
|
850
|
+
- `close`
|
|
851
|
+
|
|
852
|
+
Example:
|
|
853
|
+
|
|
854
|
+
```vue
|
|
855
|
+
<ColorPicker v-model="brandColor" />
|
|
856
|
+
<ColorPicker v-model="brandColorRgba" format="rgb" alpha variant="outlined" />
|
|
857
|
+
```
|
|
858
|
+
|
|
859
|
+
### ColorPicker tokens
|
|
860
|
+
|
|
861
|
+
Component tokens (override via `theme.overrides.components.colorPicker`):
|
|
862
|
+
|
|
863
|
+
- `minWidth`, `gap`, `fontSize`, `padding`
|
|
864
|
+
- `borderRadius`, `borderColor`
|
|
865
|
+
- `backgroundColor`, `textColor`, `placeholderColor`
|
|
866
|
+
- `focusBorderColor`, `focusRingShadow`, `hoverBorderColor`
|
|
867
|
+
- `disabledOpacity`
|
|
868
|
+
- `swatchSize`, `swatchRadius`
|
|
869
|
+
- `panelPadding`, `panelBorderColor`, `panelBackgroundColor`, `panelShadow`, `panelGap`
|
|
870
|
+
- `rangeAccentColor`
|
|
871
|
+
- `presetSize`, `presetRadius`, `presetBorderColor`, `presetHoverBorderColor`
|
|
872
|
+
- `small.padding`, `small.fontSize`, `small.swatchSize`, `small.presetSize`
|
|
873
|
+
- `large.padding`, `large.fontSize`, `large.swatchSize`, `large.presetSize`
|
|
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
|
+
|
|
822
917
|
## RadioGroup / RadioButton
|
|
823
918
|
|
|
824
919
|
Props (RadioGroup):
|
|
@@ -1847,7 +1942,7 @@ VueForge exposes design tokens as CSS variables generated from the theme preset.
|
|
|
1847
1942
|
Typed tokens:
|
|
1848
1943
|
|
|
1849
1944
|
- `ThemeTokens`/`ThemeOptions`/`ThemePreset` are exported for type-safe theming in TS.
|
|
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).
|
|
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).
|
|
1851
1946
|
|
|
1852
1947
|
Default core values (from `DefaultTheme`):
|
|
1853
1948
|
|