@codemonster-ru/vueforge 0.55.0 → 0.57.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 +124 -2
- package/dist/index.css +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.ts.mjs +4021 -3474
- package/dist/index.ts.umd.js +3 -3
- package/dist/package/components/__tests__/combobox.test.d.ts +1 -0
- package/dist/package/components/__tests__/mention-input.test.d.ts +1 -0
- package/dist/package/components/autocomplete.vue.d.ts +2 -2
- package/dist/package/components/combobox.vue.d.ts +67 -0
- package/dist/package/components/data-table.vue.d.ts +1 -1
- package/dist/package/components/mention-input.vue.d.ts +64 -0
- package/dist/package/components/multi-select.vue.d.ts +2 -2
- package/dist/package/components/tag-input.vue.d.ts +2 -2
- package/dist/package/components/tree-select.vue.d.ts +1 -1
- package/dist/package/config/theme-core.d.ts +81 -0
- package/dist/package/themes/default/components/combobox.d.ts +44 -0
- package/dist/package/themes/default/components/mention-input.d.ts +37 -0
- package/dist/package/themes/default/index.d.ts +79 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -29,6 +29,7 @@ import {
|
|
|
29
29
|
Input,
|
|
30
30
|
InlineEdit,
|
|
31
31
|
SearchInput,
|
|
32
|
+
MentionInput,
|
|
32
33
|
PasswordInput,
|
|
33
34
|
OtpInput,
|
|
34
35
|
ColorPicker,
|
|
@@ -40,6 +41,7 @@ import {
|
|
|
40
41
|
Breadcrumbs,
|
|
41
42
|
Select,
|
|
42
43
|
Autocomplete,
|
|
44
|
+
Combobox,
|
|
43
45
|
MultiSelect,
|
|
44
46
|
TagInput,
|
|
45
47
|
DatePicker,
|
|
@@ -91,6 +93,7 @@ app.use(VueForge, {
|
|
|
91
93
|
</FormField>
|
|
92
94
|
<InlineEdit v-model="name" placeholder="No name" />
|
|
93
95
|
<SearchInput v-model="query" placeholder="Search components" clearable />
|
|
96
|
+
<MentionInput v-model="message" :suggestions="mentionSuggestions" placeholder="Type @name" />
|
|
94
97
|
<PasswordInput v-model="password" placeholder="Enter password" show-strength />
|
|
95
98
|
<OtpInput v-model="otp" :length="6" />
|
|
96
99
|
<ColorPicker v-model="brandColor" :presets="['#2b6cb0', '#0cbc87', '#d6293e']" />
|
|
@@ -101,6 +104,7 @@ app.use(VueForge, {
|
|
|
101
104
|
<Breadcrumbs :items="breadcrumbItems" />
|
|
102
105
|
<Select v-model="role" :options="roles" placeholder="Choose role" />
|
|
103
106
|
<Autocomplete v-model="country" :options="countries" placeholder="Find country" />
|
|
107
|
+
<Combobox v-model="countryId" :options="countries" placeholder="Pick country" clearable />
|
|
104
108
|
<MultiSelect v-model="countries" :options="countryOptions" placeholder="Select countries" clearable />
|
|
105
109
|
<TagInput v-model="skills" :options="skillOptions" placeholder="Add skills" clearable />
|
|
106
110
|
<DatePicker v-model="birthday" placeholder="Pick birthday" />
|
|
@@ -206,6 +210,7 @@ app.use(VueForge, {
|
|
|
206
210
|
- Input
|
|
207
211
|
- InlineEdit
|
|
208
212
|
- SearchInput
|
|
213
|
+
- MentionInput
|
|
209
214
|
- PasswordInput
|
|
210
215
|
- OtpInput
|
|
211
216
|
- ColorPicker
|
|
@@ -227,6 +232,7 @@ app.use(VueForge, {
|
|
|
227
232
|
- Popover
|
|
228
233
|
- Select
|
|
229
234
|
- Autocomplete
|
|
235
|
+
- Combobox
|
|
230
236
|
- MultiSelect
|
|
231
237
|
- TagInput
|
|
232
238
|
- DatePicker
|
|
@@ -256,6 +262,7 @@ Input / Search / Password / Textarea (quick API):
|
|
|
256
262
|
- `Input`: single-line control, supports `v-model`, `size`, `variant`, `disabled`, `readonly`.
|
|
257
263
|
- `InlineEdit`: inline value editing with view/edit states, save/cancel actions, and text/number modes.
|
|
258
264
|
- `SearchInput`: search-focused control with `debounce`, `clearable`, `loading`, `size`, and `variant`.
|
|
265
|
+
- `MentionInput`: text input with `@`/`#` triggers, suggestions panel, keyboard selection, and mention insertion events.
|
|
259
266
|
- `PasswordInput`: password control, supports visibility toggle, strength meter, CapsLock hint, `size`, and `variant`.
|
|
260
267
|
- `OtpInput`: one-time code control, supports fixed length, paste handling, numeric/alphanumeric modes, `size`, and `variant`.
|
|
261
268
|
- `ColorPicker`: color control with presets, optional alpha channel, and output formats (`hex`/`rgb`/`hsl`).
|
|
@@ -264,7 +271,7 @@ Input / Search / Password / Textarea (quick API):
|
|
|
264
271
|
- `Textarea`: multi-line control, same as Input plus `rows`.
|
|
265
272
|
- `TagInput`: token/tag control, supports `v-model` (array), suggestions, custom tags, `maxTags`, `clearable`, `size`, `variant`.
|
|
266
273
|
- `FilterChips`: compact chip-based filter toggles with single/multiple selection modes and optional clear action.
|
|
267
|
-
- `SearchInput`, `InlineEdit`, `OtpInput`, `ColorPicker`, `MaskedInput`, `Checkbox`, `Select`, `Autocomplete`, `MultiSelect`, `TagInput`, `DatePicker`, `Calendar`, `DateRangePicker`, `DateTimePicker`, `Pagination`, `DataTable`, `SegmentedControl`, and `TreeSelect` also support `variant: 'filled' | 'outlined'`.
|
|
274
|
+
- `SearchInput`, `MentionInput`, `InlineEdit`, `OtpInput`, `ColorPicker`, `MaskedInput`, `Checkbox`, `Select`, `Autocomplete`, `MultiSelect`, `TagInput`, `DatePicker`, `Calendar`, `DateRangePicker`, `DateTimePicker`, `Pagination`, `DataTable`, `SegmentedControl`, and `TreeSelect` also support `variant: 'filled' | 'outlined'`.
|
|
268
275
|
|
|
269
276
|
## FormField
|
|
270
277
|
|
|
@@ -342,6 +349,65 @@ Component tokens (override via `theme.overrides.components.inlineEdit`):
|
|
|
342
349
|
- `small.fontSize`, `small.padding`, `small.buttonPadding`
|
|
343
350
|
- `large.fontSize`, `large.padding`, `large.buttonPadding`
|
|
344
351
|
|
|
352
|
+
## MentionInput
|
|
353
|
+
|
|
354
|
+
Props:
|
|
355
|
+
|
|
356
|
+
- `modelValue?: string` (v-model)
|
|
357
|
+
- `suggestions?: Array<{ label: string; value?: string | number; trigger?: string; disabled?: boolean }>` (default `[]`)
|
|
358
|
+
- `triggers?: Array<string>` (default `['@', '#']`)
|
|
359
|
+
- `placeholder?: string`
|
|
360
|
+
- `disabled?: boolean`
|
|
361
|
+
- `readonly?: boolean`
|
|
362
|
+
- `loading?: boolean` (default `false`)
|
|
363
|
+
- `loadingText?: string` (default `Loading...`)
|
|
364
|
+
- `emptyText?: string` (default `No matches`)
|
|
365
|
+
- `minQueryLength?: number` (default `1`)
|
|
366
|
+
- `maxSuggestions?: number` (default `8`)
|
|
367
|
+
- `appendSpace?: boolean` (default `true`)
|
|
368
|
+
- `size?: 'small' | 'normal' | 'large'` (default `normal`)
|
|
369
|
+
- `variant?: 'filled' | 'outlined'` (default `filled`)
|
|
370
|
+
- `ariaLabel?: string`
|
|
371
|
+
|
|
372
|
+
Events:
|
|
373
|
+
|
|
374
|
+
- `update:modelValue`
|
|
375
|
+
- `input`
|
|
376
|
+
- `change`
|
|
377
|
+
- `search` (payload: `{ trigger: string; query: string }`)
|
|
378
|
+
- `select`
|
|
379
|
+
- `insert` (payload: `{ trigger, query, option, text, range }`)
|
|
380
|
+
- `focus`
|
|
381
|
+
- `blur`
|
|
382
|
+
|
|
383
|
+
Example:
|
|
384
|
+
|
|
385
|
+
```vue
|
|
386
|
+
<MentionInput
|
|
387
|
+
v-model="message"
|
|
388
|
+
:suggestions="[
|
|
389
|
+
{ label: 'alice', value: 'alice', trigger: '@' },
|
|
390
|
+
{ label: 'frontend', value: 'frontend', trigger: '#' },
|
|
391
|
+
]"
|
|
392
|
+
placeholder="Type @name or #topic"
|
|
393
|
+
/>
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
### MentionInput tokens
|
|
397
|
+
|
|
398
|
+
Component tokens (override via `theme.overrides.components.mentionInput`):
|
|
399
|
+
|
|
400
|
+
- `minWidth`, `fontSize`, `padding`
|
|
401
|
+
- `borderRadius`, `borderColor`
|
|
402
|
+
- `backgroundColor`, `textColor`, `placeholderColor`
|
|
403
|
+
- `focusBorderColor`, `focusRingShadow`, `hoverBorderColor`, `disabledOpacity`
|
|
404
|
+
- `panelBackgroundColor`, `panelBorderColor`, `panelPadding`, `panelMaxHeight`, `panelRadiusOffset`, `panelShadow`
|
|
405
|
+
- `optionPadding`, `optionGap`, `optionBorderRadius`, `optionFontSize`
|
|
406
|
+
- `optionHoverBackgroundColor`, `optionTriggerColor`
|
|
407
|
+
- `emptyPadding`, `emptyColor`
|
|
408
|
+
- `small.fontSize`, `small.padding`
|
|
409
|
+
- `large.fontSize`, `large.padding`
|
|
410
|
+
|
|
345
411
|
Note: default filled backgrounds for Input/Select/Textarea use `controls.backgroundColor` (defaults to `bgSoftColor`). Set it to `bgColor` to disable soft backgrounds.
|
|
346
412
|
|
|
347
413
|
## Autocomplete
|
|
@@ -376,6 +442,62 @@ Example:
|
|
|
376
442
|
<Autocomplete v-model="country" :options="countries" placeholder="Find country" />
|
|
377
443
|
```
|
|
378
444
|
|
|
445
|
+
## Combobox
|
|
446
|
+
|
|
447
|
+
Props:
|
|
448
|
+
|
|
449
|
+
- `modelValue?: string | number` (v-model selected value)
|
|
450
|
+
- `inputValue?: string` (v-model:inputValue typed query)
|
|
451
|
+
- `options?: Array<{ label: string; value: string | number; disabled?: boolean }>`
|
|
452
|
+
- `optionLabel?: string` (default `label`)
|
|
453
|
+
- `optionValue?: string` (default `value`)
|
|
454
|
+
- `placeholder?: string`
|
|
455
|
+
- `disabled?: boolean`
|
|
456
|
+
- `readonly?: boolean`
|
|
457
|
+
- `loading?: boolean`
|
|
458
|
+
- `loadingText?: string` (default `Loading...`)
|
|
459
|
+
- `emptyText?: string` (default `No results`)
|
|
460
|
+
- `filter?: boolean` (default `true`)
|
|
461
|
+
- `strict?: boolean` (default `true`)
|
|
462
|
+
- `allowCreate?: boolean` (default `false`)
|
|
463
|
+
- `clearable?: boolean` (default `false`)
|
|
464
|
+
- `size?: 'small' | 'normal' | 'large'` (default `normal`)
|
|
465
|
+
- `variant?: 'filled' | 'outlined'` (default `filled`)
|
|
466
|
+
|
|
467
|
+
Events:
|
|
468
|
+
|
|
469
|
+
- `update:modelValue`
|
|
470
|
+
- `update:inputValue`
|
|
471
|
+
- `change`
|
|
472
|
+
- `search`
|
|
473
|
+
- `create`
|
|
474
|
+
- `focus`
|
|
475
|
+
- `blur`
|
|
476
|
+
|
|
477
|
+
Example:
|
|
478
|
+
|
|
479
|
+
```vue
|
|
480
|
+
<Combobox v-model="countryId" v-model:inputValue="countryQuery" :options="countries" placeholder="Pick country" />
|
|
481
|
+
```
|
|
482
|
+
|
|
483
|
+
### Combobox tokens
|
|
484
|
+
|
|
485
|
+
Component tokens (override via `theme.overrides.components.combobox`):
|
|
486
|
+
|
|
487
|
+
- `minWidth`, `fontSize`, `controlGap`, `chevronSize`
|
|
488
|
+
- `padding`, `borderRadius`, `borderColor`
|
|
489
|
+
- `backgroundColor`, `textColor`, `placeholderColor`
|
|
490
|
+
- `focusBorderColor`, `focusRingShadow`, `hoverBorderColor`
|
|
491
|
+
- `disabledOpacity`
|
|
492
|
+
- `panelBackgroundColor`, `panelBorderColor`, `panelPadding`, `panelMaxHeight`, `panelRadiusOffset`, `panelShadow`
|
|
493
|
+
- `optionPadding`, `optionBorderRadius`
|
|
494
|
+
- `optionHoverBackgroundColor`, `optionActiveBackgroundColor`, `optionActiveTextColor`, `optionHighlightedBackgroundColor`
|
|
495
|
+
- `emptyPadding`, `emptyColor`
|
|
496
|
+
- `loadingPadding`, `loadingColor`
|
|
497
|
+
- `clearSize`, `clearRadius`, `clearHoverBackgroundColor`
|
|
498
|
+
- `small.fontSize`, `small.padding`
|
|
499
|
+
- `large.fontSize`, `large.padding`
|
|
500
|
+
|
|
379
501
|
## MultiSelect
|
|
380
502
|
|
|
381
503
|
Props:
|
|
@@ -2271,7 +2393,7 @@ VueForge exposes design tokens as CSS variables generated from the theme preset.
|
|
|
2271
2393
|
Typed tokens:
|
|
2272
2394
|
|
|
2273
2395
|
- `ThemeTokens`/`ThemeOptions`/`ThemePreset` are exported for type-safe theming in TS.
|
|
2274
|
-
- `components.*` accepts component-specific tokens (typed keys: button/card/checkbox/radio/tabs/accordion/toast/alert/input/inlineEdit/searchInput/passwordInput/otpInput/colorPicker/maskedInput/numberInput/formField/textarea/link/breadcrumbs/menu/modal/confirmDialog/drawer/popover/dropdown/contextMenu/commandPalette/select/autocomplete/multiselect/taginput/datepicker/calendar/daterangepicker/timepicker/datetimepicker/pagination/switch/segmentedControl/tooltip/skeleton/progress/badge/chip/filterChips/avatar/datatable/slider/stepper/rating/tree/treeselect/virtualScroller).
|
|
2396
|
+
- `components.*` accepts component-specific tokens (typed keys: button/card/checkbox/radio/tabs/accordion/toast/alert/input/inlineEdit/searchInput/mentionInput/passwordInput/otpInput/colorPicker/maskedInput/numberInput/formField/textarea/link/breadcrumbs/menu/modal/confirmDialog/drawer/popover/dropdown/contextMenu/commandPalette/select/autocomplete/combobox/multiselect/taginput/datepicker/calendar/daterangepicker/timepicker/datetimepicker/pagination/switch/segmentedControl/tooltip/skeleton/progress/badge/chip/filterChips/avatar/datatable/slider/stepper/rating/tree/treeselect/virtualScroller).
|
|
2275
2397
|
|
|
2276
2398
|
Default core values (from `DefaultTheme`):
|
|
2277
2399
|
|