@codemonster-ru/vueforge 0.43.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 +118 -2
- package/dist/index.css +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.ts.mjs +2964 -2488
- package/dist/index.ts.umd.js +3 -3
- package/dist/package/components/__tests__/taginput.test.d.ts +1 -0
- package/dist/package/components/__tests__/virtual-scroller.test.d.ts +1 -0
- package/dist/package/components/tag-input.vue.d.ts +69 -0
- package/dist/package/components/virtual-scroller.vue.d.ts +56 -0
- package/dist/package/config/theme-core.d.ts +70 -0
- package/dist/package/themes/default/components/taginput.d.ts +57 -0
- package/dist/package/themes/default/components/virtual-scroller.d.ts +13 -0
- package/dist/package/themes/default/index.d.ts +68 -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,
|
|
@@ -54,6 +55,7 @@ import {
|
|
|
54
55
|
Rating,
|
|
55
56
|
Tree,
|
|
56
57
|
TreeSelect,
|
|
58
|
+
VirtualScroller,
|
|
57
59
|
Drawer,
|
|
58
60
|
ConfirmDialog,
|
|
59
61
|
Dropdown,
|
|
@@ -84,6 +86,7 @@ app.use(VueForge, {
|
|
|
84
86
|
<Select v-model="role" :options="roles" placeholder="Choose role" />
|
|
85
87
|
<Autocomplete v-model="country" :options="countries" placeholder="Find country" />
|
|
86
88
|
<MultiSelect v-model="countries" :options="countryOptions" placeholder="Select countries" clearable />
|
|
89
|
+
<TagInput v-model="skills" :options="skillOptions" placeholder="Add skills" clearable />
|
|
87
90
|
<DatePicker v-model="birthday" placeholder="Pick birthday" />
|
|
88
91
|
<DateRangePicker v-model="range" placeholder="Pick range" />
|
|
89
92
|
<TimePicker v-model="meetingTime" placeholder="Pick time" />
|
|
@@ -101,6 +104,11 @@ app.use(VueForge, {
|
|
|
101
104
|
<Rating v-model="rating" allow-half />
|
|
102
105
|
<Tree v-model="selectedNode" v-model:expandedKeys="expandedKeys" :items="treeItems" />
|
|
103
106
|
<TreeSelect v-model="selectedNode" v-model:expandedKeys="expandedKeys" :items="treeItems" placeholder="Select node" />
|
|
107
|
+
<VirtualScroller :items="largeItems" :item-height="40" height="320px">
|
|
108
|
+
<template #default="{ item, index }">
|
|
109
|
+
{{ index + 1 }}. {{ item.label }}
|
|
110
|
+
</template>
|
|
111
|
+
</VirtualScroller>
|
|
104
112
|
<Accordion v-model="faq">
|
|
105
113
|
<AccordionItem value="shipping" title="Shipping">
|
|
106
114
|
Shipping details
|
|
@@ -180,6 +188,7 @@ app.use(VueForge, {
|
|
|
180
188
|
- Select
|
|
181
189
|
- Autocomplete
|
|
182
190
|
- MultiSelect
|
|
191
|
+
- TagInput
|
|
183
192
|
- DatePicker
|
|
184
193
|
- DateRangePicker
|
|
185
194
|
- TimePicker
|
|
@@ -197,13 +206,15 @@ app.use(VueForge, {
|
|
|
197
206
|
- Rating
|
|
198
207
|
- Tree
|
|
199
208
|
- TreeSelect
|
|
209
|
+
- VirtualScroller
|
|
200
210
|
|
|
201
211
|
Input / Textarea (quick API):
|
|
202
212
|
|
|
203
213
|
- `Input`: single-line control, supports `v-model`, `size`, `variant`, `disabled`, `readonly`.
|
|
204
214
|
- `NumberInput`: numeric control, supports `v-model`, `min`, `max`, `step`, `precision`, `controls`, `size`, `variant`.
|
|
205
215
|
- `Textarea`: multi-line control, same as Input plus `rows`.
|
|
206
|
-
- `
|
|
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'`.
|
|
207
218
|
|
|
208
219
|
## FormField
|
|
209
220
|
|
|
@@ -302,6 +313,66 @@ Example:
|
|
|
302
313
|
<MultiSelect v-model="countries" :options="countryOptions" placeholder="Select countries" clearable />
|
|
303
314
|
```
|
|
304
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
|
+
|
|
305
376
|
### MultiSelect tokens
|
|
306
377
|
|
|
307
378
|
Component tokens (override via `theme.overrides.components.multiselect`):
|
|
@@ -1609,6 +1680,51 @@ Component tokens (override via `theme.overrides.components.treeselect`):
|
|
|
1609
1680
|
- `small.fontSize`, `small.padding`
|
|
1610
1681
|
- `large.fontSize`, `large.padding`
|
|
1611
1682
|
|
|
1683
|
+
## VirtualScroller
|
|
1684
|
+
|
|
1685
|
+
Props:
|
|
1686
|
+
|
|
1687
|
+
- `items?: Array<unknown>` (default `[]`)
|
|
1688
|
+
- `itemHeight?: number` (default `36`)
|
|
1689
|
+
- `height?: string` (default `18rem`)
|
|
1690
|
+
- `overscan?: number` (default `4`)
|
|
1691
|
+
- `keyField?: string` (default `id`)
|
|
1692
|
+
- `virtual?: boolean` (default `true`)
|
|
1693
|
+
- `ariaLabel?: string` (default `Virtual list`)
|
|
1694
|
+
- `emptyText?: string` (default `No items`)
|
|
1695
|
+
|
|
1696
|
+
Events:
|
|
1697
|
+
|
|
1698
|
+
- `scroll`
|
|
1699
|
+
- `rangeChange` (payload: `{ start: number; end: number }`)
|
|
1700
|
+
- `reachEnd`
|
|
1701
|
+
|
|
1702
|
+
Slots:
|
|
1703
|
+
|
|
1704
|
+
- `default` - item content with slot props `{ item, index }`
|
|
1705
|
+
- `empty` - empty state content
|
|
1706
|
+
|
|
1707
|
+
Example:
|
|
1708
|
+
|
|
1709
|
+
```vue
|
|
1710
|
+
<VirtualScroller :items="users" :item-height="44" height="320px" :overscan="6" key-field="id">
|
|
1711
|
+
<template #default="{ item, index }">
|
|
1712
|
+
<div>{{ index + 1 }}. {{ item.name }}</div>
|
|
1713
|
+
</template>
|
|
1714
|
+
</VirtualScroller>
|
|
1715
|
+
```
|
|
1716
|
+
|
|
1717
|
+
### VirtualScroller tokens
|
|
1718
|
+
|
|
1719
|
+
Component tokens (override via `theme.overrides.components.virtualScroller`):
|
|
1720
|
+
|
|
1721
|
+
- `fontSize`
|
|
1722
|
+
- `borderColor`, `borderRadius`
|
|
1723
|
+
- `backgroundColor`, `textColor`
|
|
1724
|
+
- `focusRingShadow`
|
|
1725
|
+
- `itemPadding`, `itemBorderColor`
|
|
1726
|
+
- `emptyPadding`, `emptyColor`
|
|
1727
|
+
|
|
1612
1728
|
## Tokens
|
|
1613
1729
|
|
|
1614
1730
|
VueForge exposes design tokens as CSS variables generated from the theme preset. Core groups:
|
|
@@ -1623,7 +1739,7 @@ VueForge exposes design tokens as CSS variables generated from the theme preset.
|
|
|
1623
1739
|
Typed tokens:
|
|
1624
1740
|
|
|
1625
1741
|
- `ThemeTokens`/`ThemeOptions`/`ThemePreset` are exported for type-safe theming in TS.
|
|
1626
|
-
- `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).
|
|
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).
|
|
1627
1743
|
|
|
1628
1744
|
Default core values (from `DefaultTheme`):
|
|
1629
1745
|
|