@codemonster-ru/vueforge 0.54.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 +116 -2
- package/dist/index.css +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.ts.mjs +3622 -3247
- package/dist/index.ts.umd.js +3 -3
- package/dist/package/components/__tests__/inline-edit.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/data-table.vue.d.ts +1 -1
- package/dist/package/components/inline-edit.vue.d.ts +47 -0
- 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 +72 -0
- package/dist/package/themes/default/components/inline-edit.d.ts +35 -0
- package/dist/package/themes/default/components/mention-input.d.ts +37 -0
- package/dist/package/themes/default/index.d.ts +70 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -27,7 +27,9 @@ import {
|
|
|
27
27
|
DefaultTheme,
|
|
28
28
|
Button,
|
|
29
29
|
Input,
|
|
30
|
+
InlineEdit,
|
|
30
31
|
SearchInput,
|
|
32
|
+
MentionInput,
|
|
31
33
|
PasswordInput,
|
|
32
34
|
OtpInput,
|
|
33
35
|
ColorPicker,
|
|
@@ -88,7 +90,9 @@ app.use(VueForge, {
|
|
|
88
90
|
<FormField label="Name" hint="Required field">
|
|
89
91
|
<Input v-model="name" placeholder="Your name" />
|
|
90
92
|
</FormField>
|
|
93
|
+
<InlineEdit v-model="name" placeholder="No name" />
|
|
91
94
|
<SearchInput v-model="query" placeholder="Search components" clearable />
|
|
95
|
+
<MentionInput v-model="message" :suggestions="mentionSuggestions" placeholder="Type @name" />
|
|
92
96
|
<PasswordInput v-model="password" placeholder="Enter password" show-strength />
|
|
93
97
|
<OtpInput v-model="otp" :length="6" />
|
|
94
98
|
<ColorPicker v-model="brandColor" :presets="['#2b6cb0', '#0cbc87', '#d6293e']" />
|
|
@@ -202,7 +206,9 @@ app.use(VueForge, {
|
|
|
202
206
|
- ToastContainer
|
|
203
207
|
- Alert
|
|
204
208
|
- Input
|
|
209
|
+
- InlineEdit
|
|
205
210
|
- SearchInput
|
|
211
|
+
- MentionInput
|
|
206
212
|
- PasswordInput
|
|
207
213
|
- OtpInput
|
|
208
214
|
- ColorPicker
|
|
@@ -251,7 +257,9 @@ app.use(VueForge, {
|
|
|
251
257
|
Input / Search / Password / Textarea (quick API):
|
|
252
258
|
|
|
253
259
|
- `Input`: single-line control, supports `v-model`, `size`, `variant`, `disabled`, `readonly`.
|
|
260
|
+
- `InlineEdit`: inline value editing with view/edit states, save/cancel actions, and text/number modes.
|
|
254
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.
|
|
255
263
|
- `PasswordInput`: password control, supports visibility toggle, strength meter, CapsLock hint, `size`, and `variant`.
|
|
256
264
|
- `OtpInput`: one-time code control, supports fixed length, paste handling, numeric/alphanumeric modes, `size`, and `variant`.
|
|
257
265
|
- `ColorPicker`: color control with presets, optional alpha channel, and output formats (`hex`/`rgb`/`hsl`).
|
|
@@ -260,7 +268,7 @@ Input / Search / Password / Textarea (quick API):
|
|
|
260
268
|
- `Textarea`: multi-line control, same as Input plus `rows`.
|
|
261
269
|
- `TagInput`: token/tag control, supports `v-model` (array), suggestions, custom tags, `maxTags`, `clearable`, `size`, `variant`.
|
|
262
270
|
- `FilterChips`: compact chip-based filter toggles with single/multiple selection modes and optional clear action.
|
|
263
|
-
- `SearchInput`, `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'`.
|
|
264
272
|
|
|
265
273
|
## FormField
|
|
266
274
|
|
|
@@ -291,6 +299,112 @@ Example:
|
|
|
291
299
|
</FormField>
|
|
292
300
|
```
|
|
293
301
|
|
|
302
|
+
## InlineEdit
|
|
303
|
+
|
|
304
|
+
Props:
|
|
305
|
+
|
|
306
|
+
- `modelValue?: string | number | null` (v-model)
|
|
307
|
+
- `type?: 'text' | 'number'` (default `text`)
|
|
308
|
+
- `placeholder?: string`
|
|
309
|
+
- `disabled?: boolean`
|
|
310
|
+
- `readonly?: boolean`
|
|
311
|
+
- `size?: 'small' | 'normal' | 'large'` (default `normal`)
|
|
312
|
+
- `variant?: 'filled' | 'outlined'` (default `filled`)
|
|
313
|
+
- `editLabel?: string` (default `Edit`)
|
|
314
|
+
- `saveLabel?: string` (default `Save`)
|
|
315
|
+
- `cancelLabel?: string` (default `Cancel`)
|
|
316
|
+
|
|
317
|
+
Events:
|
|
318
|
+
|
|
319
|
+
- `update:modelValue`
|
|
320
|
+
- `save`
|
|
321
|
+
- `cancel`
|
|
322
|
+
- `start`
|
|
323
|
+
- `end`
|
|
324
|
+
- `focus`
|
|
325
|
+
- `blur`
|
|
326
|
+
|
|
327
|
+
Example:
|
|
328
|
+
|
|
329
|
+
```vue
|
|
330
|
+
<InlineEdit v-model="projectName" placeholder="No project name" />
|
|
331
|
+
<InlineEdit v-model="budget" type="number" variant="outlined" />
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
### InlineEdit tokens
|
|
335
|
+
|
|
336
|
+
Component tokens (override via `theme.overrides.components.inlineEdit`):
|
|
337
|
+
|
|
338
|
+
- `gap`, `fontSize`, `padding`
|
|
339
|
+
- `borderRadius`, `borderColor`
|
|
340
|
+
- `backgroundColor`, `textColor`, `placeholderColor`
|
|
341
|
+
- `focusBorderColor`, `focusRingShadow`, `hoverBorderColor`, `disabledOpacity`
|
|
342
|
+
- `actionsGap`
|
|
343
|
+
- `buttonPadding`, `buttonRadius`, `buttonBorderColor`
|
|
344
|
+
- `buttonBackgroundColor`, `buttonTextColor`, `buttonHoverBackgroundColor`
|
|
345
|
+
- `cancelButtonBackgroundColor`, `cancelButtonTextColor`, `cancelButtonBorderColor`
|
|
346
|
+
- `small.fontSize`, `small.padding`, `small.buttonPadding`
|
|
347
|
+
- `large.fontSize`, `large.padding`, `large.buttonPadding`
|
|
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
|
+
|
|
294
408
|
Note: default filled backgrounds for Input/Select/Textarea use `controls.backgroundColor` (defaults to `bgSoftColor`). Set it to `bgColor` to disable soft backgrounds.
|
|
295
409
|
|
|
296
410
|
## Autocomplete
|
|
@@ -2220,7 +2334,7 @@ VueForge exposes design tokens as CSS variables generated from the theme preset.
|
|
|
2220
2334
|
Typed tokens:
|
|
2221
2335
|
|
|
2222
2336
|
- `ThemeTokens`/`ThemeOptions`/`ThemePreset` are exported for type-safe theming in TS.
|
|
2223
|
-
- `components.*` accepts component-specific tokens (typed keys: button/card/checkbox/radio/tabs/accordion/toast/alert/input/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).
|
|
2224
2338
|
|
|
2225
2339
|
Default core values (from `DefaultTheme`):
|
|
2226
2340
|
|