@codemonster-ru/vueforge 0.47.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 +51 -2
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.ts.mjs +3027 -2787
- package/dist/index.ts.umd.js +3 -3
- package/dist/package/components/__tests__/color-picker.test.d.ts +1 -0
- package/dist/package/components/color-picker.vue.d.ts +40 -0
- package/dist/package/components/timepicker.vue.d.ts +1 -1
- package/dist/package/config/theme-core.d.ts +40 -0
- package/dist/package/themes/default/components/color-picker.d.ts +40 -0
- package/dist/package/themes/default/index.d.ts +39 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -29,6 +29,7 @@ import {
|
|
|
29
29
|
Input,
|
|
30
30
|
PasswordInput,
|
|
31
31
|
OtpInput,
|
|
32
|
+
ColorPicker,
|
|
32
33
|
NumberInput,
|
|
33
34
|
FormField,
|
|
34
35
|
Textarea,
|
|
@@ -83,6 +84,7 @@ app.use(VueForge, {
|
|
|
83
84
|
</FormField>
|
|
84
85
|
<PasswordInput v-model="password" placeholder="Enter password" show-strength />
|
|
85
86
|
<OtpInput v-model="otp" :length="6" />
|
|
87
|
+
<ColorPicker v-model="brandColor" :presets="['#2b6cb0', '#0cbc87', '#d6293e']" />
|
|
86
88
|
<NumberInput v-model="age" :min="0" :max="120" :step="1" />
|
|
87
89
|
<Textarea v-model="bio" placeholder="Tell us about yourself" />
|
|
88
90
|
<FileUpload v-model="resume" accept=".pdf,.doc,.docx" />
|
|
@@ -176,6 +178,7 @@ app.use(VueForge, {
|
|
|
176
178
|
- Input
|
|
177
179
|
- PasswordInput
|
|
178
180
|
- OtpInput
|
|
181
|
+
- ColorPicker
|
|
179
182
|
- NumberInput
|
|
180
183
|
- FormField
|
|
181
184
|
- Textarea
|
|
@@ -219,10 +222,11 @@ Input / Password / Textarea (quick API):
|
|
|
219
222
|
- `Input`: single-line control, supports `v-model`, `size`, `variant`, `disabled`, `readonly`.
|
|
220
223
|
- `PasswordInput`: password control, supports visibility toggle, strength meter, CapsLock hint, `size`, and `variant`.
|
|
221
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`).
|
|
222
226
|
- `NumberInput`: numeric control, supports `v-model`, `min`, `max`, `step`, `precision`, `controls`, `size`, `variant`.
|
|
223
227
|
- `Textarea`: multi-line control, same as Input plus `rows`.
|
|
224
228
|
- `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'`.
|
|
229
|
+
- `OtpInput`, `ColorPicker`, `Checkbox`, `Select`, `Autocomplete`, `MultiSelect`, `TagInput`, `DatePicker`, `DateRangePicker`, `Pagination`, `DataTable`, and `TreeSelect` also support `variant: 'filled' | 'outlined'`.
|
|
226
230
|
|
|
227
231
|
## FormField
|
|
228
232
|
|
|
@@ -819,6 +823,51 @@ Component tokens (override via `theme.overrides.components.otpInput`):
|
|
|
819
823
|
- `small.cellSize`, `small.fontSize`, `small.padding`
|
|
820
824
|
- `large.cellSize`, `large.fontSize`, `large.padding`
|
|
821
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
|
+
|
|
822
871
|
## RadioGroup / RadioButton
|
|
823
872
|
|
|
824
873
|
Props (RadioGroup):
|
|
@@ -1847,7 +1896,7 @@ VueForge exposes design tokens as CSS variables generated from the theme preset.
|
|
|
1847
1896
|
Typed tokens:
|
|
1848
1897
|
|
|
1849
1898
|
- `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).
|
|
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).
|
|
1851
1900
|
|
|
1852
1901
|
Default core values (from `DefaultTheme`):
|
|
1853
1902
|
|