@codemonster-ru/vueforge 0.55.0 → 0.56.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 +65 -2
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.ts.mjs +3080 -2838
- package/dist/index.ts.umd.js +3 -3
- 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/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 +37 -0
- package/dist/package/themes/default/components/mention-input.d.ts +37 -0
- package/dist/package/themes/default/index.d.ts +36 -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,
|
|
@@ -91,6 +92,7 @@ app.use(VueForge, {
|
|
|
91
92
|
</FormField>
|
|
92
93
|
<InlineEdit v-model="name" placeholder="No name" />
|
|
93
94
|
<SearchInput v-model="query" placeholder="Search components" clearable />
|
|
95
|
+
<MentionInput v-model="message" :suggestions="mentionSuggestions" placeholder="Type @name" />
|
|
94
96
|
<PasswordInput v-model="password" placeholder="Enter password" show-strength />
|
|
95
97
|
<OtpInput v-model="otp" :length="6" />
|
|
96
98
|
<ColorPicker v-model="brandColor" :presets="['#2b6cb0', '#0cbc87', '#d6293e']" />
|
|
@@ -206,6 +208,7 @@ app.use(VueForge, {
|
|
|
206
208
|
- Input
|
|
207
209
|
- InlineEdit
|
|
208
210
|
- SearchInput
|
|
211
|
+
- MentionInput
|
|
209
212
|
- PasswordInput
|
|
210
213
|
- OtpInput
|
|
211
214
|
- ColorPicker
|
|
@@ -256,6 +259,7 @@ Input / Search / Password / Textarea (quick API):
|
|
|
256
259
|
- `Input`: single-line control, supports `v-model`, `size`, `variant`, `disabled`, `readonly`.
|
|
257
260
|
- `InlineEdit`: inline value editing with view/edit states, save/cancel actions, and text/number modes.
|
|
258
261
|
- `SearchInput`: search-focused control with `debounce`, `clearable`, `loading`, `size`, and `variant`.
|
|
262
|
+
- `MentionInput`: text input with `@`/`#` triggers, suggestions panel, keyboard selection, and mention insertion events.
|
|
259
263
|
- `PasswordInput`: password control, supports visibility toggle, strength meter, CapsLock hint, `size`, and `variant`.
|
|
260
264
|
- `OtpInput`: one-time code control, supports fixed length, paste handling, numeric/alphanumeric modes, `size`, and `variant`.
|
|
261
265
|
- `ColorPicker`: color control with presets, optional alpha channel, and output formats (`hex`/`rgb`/`hsl`).
|
|
@@ -264,7 +268,7 @@ Input / Search / Password / Textarea (quick API):
|
|
|
264
268
|
- `Textarea`: multi-line control, same as Input plus `rows`.
|
|
265
269
|
- `TagInput`: token/tag control, supports `v-model` (array), suggestions, custom tags, `maxTags`, `clearable`, `size`, `variant`.
|
|
266
270
|
- `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'`.
|
|
271
|
+
- `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
272
|
|
|
269
273
|
## FormField
|
|
270
274
|
|
|
@@ -342,6 +346,65 @@ Component tokens (override via `theme.overrides.components.inlineEdit`):
|
|
|
342
346
|
- `small.fontSize`, `small.padding`, `small.buttonPadding`
|
|
343
347
|
- `large.fontSize`, `large.padding`, `large.buttonPadding`
|
|
344
348
|
|
|
349
|
+
## MentionInput
|
|
350
|
+
|
|
351
|
+
Props:
|
|
352
|
+
|
|
353
|
+
- `modelValue?: string` (v-model)
|
|
354
|
+
- `suggestions?: Array<{ label: string; value?: string | number; trigger?: string; disabled?: boolean }>` (default `[]`)
|
|
355
|
+
- `triggers?: Array<string>` (default `['@', '#']`)
|
|
356
|
+
- `placeholder?: string`
|
|
357
|
+
- `disabled?: boolean`
|
|
358
|
+
- `readonly?: boolean`
|
|
359
|
+
- `loading?: boolean` (default `false`)
|
|
360
|
+
- `loadingText?: string` (default `Loading...`)
|
|
361
|
+
- `emptyText?: string` (default `No matches`)
|
|
362
|
+
- `minQueryLength?: number` (default `1`)
|
|
363
|
+
- `maxSuggestions?: number` (default `8`)
|
|
364
|
+
- `appendSpace?: boolean` (default `true`)
|
|
365
|
+
- `size?: 'small' | 'normal' | 'large'` (default `normal`)
|
|
366
|
+
- `variant?: 'filled' | 'outlined'` (default `filled`)
|
|
367
|
+
- `ariaLabel?: string`
|
|
368
|
+
|
|
369
|
+
Events:
|
|
370
|
+
|
|
371
|
+
- `update:modelValue`
|
|
372
|
+
- `input`
|
|
373
|
+
- `change`
|
|
374
|
+
- `search` (payload: `{ trigger: string; query: string }`)
|
|
375
|
+
- `select`
|
|
376
|
+
- `insert` (payload: `{ trigger, query, option, text, range }`)
|
|
377
|
+
- `focus`
|
|
378
|
+
- `blur`
|
|
379
|
+
|
|
380
|
+
Example:
|
|
381
|
+
|
|
382
|
+
```vue
|
|
383
|
+
<MentionInput
|
|
384
|
+
v-model="message"
|
|
385
|
+
:suggestions="[
|
|
386
|
+
{ label: 'alice', value: 'alice', trigger: '@' },
|
|
387
|
+
{ label: 'frontend', value: 'frontend', trigger: '#' },
|
|
388
|
+
]"
|
|
389
|
+
placeholder="Type @name or #topic"
|
|
390
|
+
/>
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
### MentionInput tokens
|
|
394
|
+
|
|
395
|
+
Component tokens (override via `theme.overrides.components.mentionInput`):
|
|
396
|
+
|
|
397
|
+
- `minWidth`, `fontSize`, `padding`
|
|
398
|
+
- `borderRadius`, `borderColor`
|
|
399
|
+
- `backgroundColor`, `textColor`, `placeholderColor`
|
|
400
|
+
- `focusBorderColor`, `focusRingShadow`, `hoverBorderColor`, `disabledOpacity`
|
|
401
|
+
- `panelBackgroundColor`, `panelBorderColor`, `panelPadding`, `panelMaxHeight`, `panelRadiusOffset`, `panelShadow`
|
|
402
|
+
- `optionPadding`, `optionGap`, `optionBorderRadius`, `optionFontSize`
|
|
403
|
+
- `optionHoverBackgroundColor`, `optionTriggerColor`
|
|
404
|
+
- `emptyPadding`, `emptyColor`
|
|
405
|
+
- `small.fontSize`, `small.padding`
|
|
406
|
+
- `large.fontSize`, `large.padding`
|
|
407
|
+
|
|
345
408
|
Note: default filled backgrounds for Input/Select/Textarea use `controls.backgroundColor` (defaults to `bgSoftColor`). Set it to `bgColor` to disable soft backgrounds.
|
|
346
409
|
|
|
347
410
|
## Autocomplete
|
|
@@ -2271,7 +2334,7 @@ VueForge exposes design tokens as CSS variables generated from the theme preset.
|
|
|
2271
2334
|
Typed tokens:
|
|
2272
2335
|
|
|
2273
2336
|
- `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).
|
|
2337
|
+
- `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/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
2338
|
|
|
2276
2339
|
Default core values (from `DefaultTheme`):
|
|
2277
2340
|
|