@codemonster-ru/vueforge 0.44.0 → 0.45.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 +66 -2
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.ts.mjs +2195 -1859
- package/dist/index.ts.umd.js +3 -3
- package/dist/package/components/__tests__/taginput.test.d.ts +1 -0
- package/dist/package/components/tag-input.vue.d.ts +69 -0
- package/dist/package/config/theme-core.d.ts +57 -0
- package/dist/package/themes/default/components/taginput.d.ts +57 -0
- package/dist/package/themes/default/index.d.ts +56 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -35,6 +35,7 @@ import {
|
|
|
35
35
|
Select,
|
|
36
36
|
Autocomplete,
|
|
37
37
|
MultiSelect,
|
|
38
|
+
TagInput,
|
|
38
39
|
DatePicker,
|
|
39
40
|
DateRangePicker,
|
|
40
41
|
TimePicker,
|
|
@@ -85,6 +86,7 @@ app.use(VueForge, {
|
|
|
85
86
|
<Select v-model="role" :options="roles" placeholder="Choose role" />
|
|
86
87
|
<Autocomplete v-model="country" :options="countries" placeholder="Find country" />
|
|
87
88
|
<MultiSelect v-model="countries" :options="countryOptions" placeholder="Select countries" clearable />
|
|
89
|
+
<TagInput v-model="skills" :options="skillOptions" placeholder="Add skills" clearable />
|
|
88
90
|
<DatePicker v-model="birthday" placeholder="Pick birthday" />
|
|
89
91
|
<DateRangePicker v-model="range" placeholder="Pick range" />
|
|
90
92
|
<TimePicker v-model="meetingTime" placeholder="Pick time" />
|
|
@@ -186,6 +188,7 @@ app.use(VueForge, {
|
|
|
186
188
|
- Select
|
|
187
189
|
- Autocomplete
|
|
188
190
|
- MultiSelect
|
|
191
|
+
- TagInput
|
|
189
192
|
- DatePicker
|
|
190
193
|
- DateRangePicker
|
|
191
194
|
- TimePicker
|
|
@@ -210,7 +213,8 @@ Input / Textarea (quick API):
|
|
|
210
213
|
- `Input`: single-line control, supports `v-model`, `size`, `variant`, `disabled`, `readonly`.
|
|
211
214
|
- `NumberInput`: numeric control, supports `v-model`, `min`, `max`, `step`, `precision`, `controls`, `size`, `variant`.
|
|
212
215
|
- `Textarea`: multi-line control, same as Input plus `rows`.
|
|
213
|
-
- `
|
|
216
|
+
- `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'`.
|
|
214
218
|
|
|
215
219
|
## FormField
|
|
216
220
|
|
|
@@ -309,6 +313,66 @@ Example:
|
|
|
309
313
|
<MultiSelect v-model="countries" :options="countryOptions" placeholder="Select countries" clearable />
|
|
310
314
|
```
|
|
311
315
|
|
|
316
|
+
## TagInput
|
|
317
|
+
|
|
318
|
+
Props:
|
|
319
|
+
|
|
320
|
+
- `modelValue?: Array<string | number>` (v-model)
|
|
321
|
+
- `options?: Array<{ label: string; value: string | number; disabled?: boolean }>`
|
|
322
|
+
- `optionLabel?: string` (default `label`)
|
|
323
|
+
- `optionValue?: string` (default `value`)
|
|
324
|
+
- `placeholder?: string`
|
|
325
|
+
- `disabled?: boolean`
|
|
326
|
+
- `readonly?: boolean`
|
|
327
|
+
- `loading?: boolean`
|
|
328
|
+
- `loadingText?: string` (default `Loading...`)
|
|
329
|
+
- `emptyText?: string` (default `No results`)
|
|
330
|
+
- `filter?: boolean` (default `true`)
|
|
331
|
+
- `allowCustom?: boolean` (default `true`)
|
|
332
|
+
- `maxTags?: number`
|
|
333
|
+
- `clearable?: boolean` (default `false`)
|
|
334
|
+
- `validateTag?: (value: string) => boolean`
|
|
335
|
+
- `size?: 'small' | 'normal' | 'large'` (default `normal`)
|
|
336
|
+
- `variant?: 'filled' | 'outlined'` (default `filled`)
|
|
337
|
+
|
|
338
|
+
Events:
|
|
339
|
+
|
|
340
|
+
- `update:modelValue`
|
|
341
|
+
- `change`
|
|
342
|
+
- `search`
|
|
343
|
+
- `add` (payload: `{ value: string | number; source: 'option' | 'custom' }`)
|
|
344
|
+
- `remove`
|
|
345
|
+
- `reject` (payload: `{ reason: 'duplicate' | 'maxTags' | 'invalid' | 'readonly'; value: string }`)
|
|
346
|
+
- `focus`
|
|
347
|
+
- `blur`
|
|
348
|
+
|
|
349
|
+
Example:
|
|
350
|
+
|
|
351
|
+
```vue
|
|
352
|
+
<TagInput v-model="skills" :options="skillOptions" placeholder="Add skills" clearable />
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
### TagInput tokens
|
|
356
|
+
|
|
357
|
+
Component tokens (override via `theme.overrides.components.taginput`):
|
|
358
|
+
|
|
359
|
+
- `minWidth`, `minHeight`, `fontSize`, `controlGap`, `chevronSize`
|
|
360
|
+
- `padding`, `borderRadius`, `borderColor`
|
|
361
|
+
- `backgroundColor`, `textColor`, `placeholderColor`
|
|
362
|
+
- `focusBorderColor`, `focusRingShadow`, `hoverBorderColor`
|
|
363
|
+
- `disabledOpacity`
|
|
364
|
+
- `panelBackgroundColor`, `panelBorderColor`, `panelPadding`, `panelMaxHeight`, `panelRadiusOffset`, `panelShadow`
|
|
365
|
+
- `optionPadding`, `optionBorderRadius`
|
|
366
|
+
- `optionHoverBackgroundColor`, `optionHighlightedBackgroundColor`
|
|
367
|
+
- `emptyPadding`, `emptyColor`
|
|
368
|
+
- `loadingPadding`, `loadingColor`
|
|
369
|
+
- `inputMinWidth`
|
|
370
|
+
- `chipGap`, `chipPadding`, `chipRadius`, `chipBackgroundColor`, `chipTextColor`, `chipFontSize`
|
|
371
|
+
- `chipRemoveSize`, `chipRemoveRadius`, `chipRemoveHoverBackgroundColor`
|
|
372
|
+
- `clearSize`, `clearRadius`, `clearHoverBackgroundColor`
|
|
373
|
+
- `small.fontSize`, `small.padding`, `small.chipPadding`, `small.chipFontSize`
|
|
374
|
+
- `large.fontSize`, `large.padding`, `large.chipPadding`, `large.chipFontSize`
|
|
375
|
+
|
|
312
376
|
### MultiSelect tokens
|
|
313
377
|
|
|
314
378
|
Component tokens (override via `theme.overrides.components.multiselect`):
|
|
@@ -1675,7 +1739,7 @@ VueForge exposes design tokens as CSS variables generated from the theme preset.
|
|
|
1675
1739
|
Typed tokens:
|
|
1676
1740
|
|
|
1677
1741
|
- `ThemeTokens`/`ThemeOptions`/`ThemePreset` are exported for type-safe theming in TS.
|
|
1678
|
-
- `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/datepicker/daterangepicker/timepicker/pagination/switch/tooltip/skeleton/progress/badge/chip/avatar/datatable/slider/stepper/rating/tree/treeselect/virtualScroller).
|
|
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).
|
|
1679
1743
|
|
|
1680
1744
|
Default core values (from `DefaultTheme`):
|
|
1681
1745
|
|