@codemonster-ru/vueforge 0.57.0 → 0.59.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 CHANGED
@@ -35,6 +35,7 @@ import {
35
35
  ColorPicker,
36
36
  MaskedInput,
37
37
  NumberInput,
38
+ Form,
38
39
  FormField,
39
40
  Textarea,
40
41
  FileUpload,
@@ -64,6 +65,7 @@ import {
64
65
  AccordionItem,
65
66
  Slider,
66
67
  Stepper,
68
+ Timeline,
67
69
  Rating,
68
70
  Tree,
69
71
  TreeSelect,
@@ -88,6 +90,20 @@ app.use(VueForge, {
88
90
 
89
91
  ```vue
90
92
  <Button label="Hello" severity="primary" />
93
+ <Form v-model="formValues" :validate="validateForm" @submit="onSubmit">
94
+ <template #default="{ values, errors, touched, setFieldValue, setFieldTouched }">
95
+ <FormField label="Email" :error="touched.email ? errors.email : ''">
96
+ <template #default>
97
+ <Input
98
+ :model-value="String(values.email ?? '')"
99
+ @update:model-value="value => setFieldValue('email', value)"
100
+ @blur="() => setFieldTouched('email', true)"
101
+ />
102
+ </template>
103
+ </FormField>
104
+ <Button type="submit" label="Submit" />
105
+ </template>
106
+ </Form>
91
107
  <FormField label="Name" hint="Required field">
92
108
  <Input v-model="name" placeholder="Your name" />
93
109
  </FormField>
@@ -138,6 +154,7 @@ app.use(VueForge, {
138
154
  />
139
155
  <Slider v-model="volume" :min="0" :max="100" :step="5" show-value />
140
156
  <Stepper v-model="step" :steps="steps" clickable />
157
+ <Timeline :items="timelineItems" />
141
158
  <Rating v-model="rating" allow-half />
142
159
  <Tree v-model="selectedNode" v-model:expandedKeys="expandedKeys" :items="treeItems" />
143
160
  <TreeSelect v-model="selectedNode" v-model:expandedKeys="expandedKeys" :items="treeItems" placeholder="Select node" />
@@ -216,6 +233,7 @@ app.use(VueForge, {
216
233
  - ColorPicker
217
234
  - MaskedInput
218
235
  - NumberInput
236
+ - Form
219
237
  - FormField
220
238
  - Textarea
221
239
  - FileUpload
@@ -252,6 +270,7 @@ app.use(VueForge, {
252
270
  - Avatar
253
271
  - Slider
254
272
  - Stepper
273
+ - Timeline
255
274
  - Rating
256
275
  - Tree
257
276
  - TreeSelect
@@ -273,6 +292,60 @@ Input / Search / Password / Textarea (quick API):
273
292
  - `FilterChips`: compact chip-based filter toggles with single/multiple selection modes and optional clear action.
274
293
  - `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'`.
275
294
 
295
+ ## Form
296
+
297
+ Props:
298
+
299
+ - `modelValue?: Record<string, unknown>` (v-model)
300
+ - `initialValues?: Record<string, unknown>`
301
+ - `validate?: (values) => Record<string, string> | string | boolean | null | Promise<...>`
302
+ - `validateOn?: 'submit' | 'input' | 'change' | 'blur' | Array<'submit' | 'input' | 'change' | 'blur'>` (default `submit`)
303
+ - `disabled?: boolean`
304
+ - `novalidate?: boolean` (default `true`)
305
+ - `id?: string`
306
+ - `ariaLabel?: string`
307
+ - `ariaLabelledby?: string`
308
+
309
+ Events:
310
+
311
+ - `update:modelValue`
312
+ - `change`
313
+ - `blur`
314
+ - `validate`
315
+ - `submit`
316
+ - `invalidSubmit`
317
+ - `reset`
318
+
319
+ Slots:
320
+
321
+ - `default` - form helpers:
322
+ `{ values, errors, touched, isValid, isDirty, isSubmitting, setFieldValue, setFieldTouched, setFieldError, validate, submit, reset }`
323
+
324
+ Example:
325
+
326
+ ```vue
327
+ <Form v-model="values" :validate="validateForm" validate-on="blur" @submit="send">
328
+ <template #default="{ values, errors, touched, setFieldValue, setFieldTouched }">
329
+ <FormField label="Email" :error="touched.email ? errors.email : ''">
330
+ <template #default>
331
+ <Input
332
+ :model-value="String(values.email ?? '')"
333
+ @update:model-value="value => setFieldValue('email', value)"
334
+ @blur="() => setFieldTouched('email', true)"
335
+ />
336
+ </template>
337
+ </FormField>
338
+ <Button type="submit" label="Send" />
339
+ </template>
340
+ </Form>
341
+ ```
342
+
343
+ ### Form tokens
344
+
345
+ Component tokens (override via `theme.overrides.components.form`):
346
+
347
+ - `gap`, `textColor`, `disabledOpacity`
348
+
276
349
  ## FormField
277
350
 
278
351
  Props:
@@ -302,6 +375,9 @@ Example:
302
375
  </FormField>
303
376
  ```
304
377
 
378
+ When `error` is set, `FormField` applies invalid-state border highlighting to nested form controls.
379
+ Customize these colors via `theme.overrides.components.formField.errorBorderColor` and `errorFocusBorderColor`.
380
+
305
381
  ## InlineEdit
306
382
 
307
383
  Props:
@@ -2189,6 +2265,49 @@ Component tokens (override via `theme.overrides.components.stepper`):
2189
2265
  - `small.indicatorSize`, `small.indicatorFontSize`, `small.labelFontSize`, `small.descriptionFontSize`, `small.lineLength`, `small.itemGap`
2190
2266
  - `large.indicatorSize`, `large.indicatorFontSize`, `large.labelFontSize`, `large.descriptionFontSize`, `large.lineLength`, `large.itemGap`
2191
2267
 
2268
+ ## Timeline
2269
+
2270
+ Props:
2271
+
2272
+ - `items?: Array<{ id?: string | number; title?: string; description?: string; date?: string; icon?: string; status?: 'neutral' | 'info' | 'success' | 'warn' | 'danger' }>` (default `[]`)
2273
+ - `orientation?: 'vertical' | 'horizontal'` (default `vertical`)
2274
+ - `size?: 'small' | 'normal' | 'large'` (default `normal`)
2275
+ - `ariaLabel?: string`
2276
+ - `ariaLabelledby?: string`
2277
+
2278
+ Slots:
2279
+
2280
+ - `marker` (props: `item`, `index`)
2281
+ - `item` (props: `item`, `index`)
2282
+
2283
+ Example:
2284
+
2285
+ ```vue
2286
+ <Timeline
2287
+ :items="[
2288
+ { title: 'Created', description: 'Issue created', date: '2026-02-17', status: 'info' },
2289
+ { title: 'In progress', description: 'Developer started work', date: '2026-02-18', status: 'warn' },
2290
+ { title: 'Done', description: 'Issue closed', date: '2026-02-19', status: 'success' },
2291
+ ]"
2292
+ />
2293
+ <Timeline :items="events" orientation="horizontal" size="small" />
2294
+ ```
2295
+
2296
+ ### Timeline tokens
2297
+
2298
+ Component tokens (override via `theme.overrides.components.timeline`):
2299
+
2300
+ - `gap`, `itemGap`
2301
+ - `markerSize`, `markerBorderRadius`, `markerBorderWidth`, `markerBackgroundColor`, `markerBorderColor`, `markerTextColor`, `markerIconSize`, `dotSize`
2302
+ - `lineThickness`, `lineLength`, `lineColor`
2303
+ - `titleFontSize`, `titleColor`, `descriptionFontSize`, `descriptionColor`, `dateFontSize`, `dateColor`
2304
+ - `info.markerBackgroundColor`, `info.markerBorderColor`, `info.markerTextColor`, `info.lineColor`
2305
+ - `success.markerBackgroundColor`, `success.markerBorderColor`, `success.markerTextColor`, `success.lineColor`
2306
+ - `warn.markerBackgroundColor`, `warn.markerBorderColor`, `warn.markerTextColor`, `warn.lineColor`
2307
+ - `danger.markerBackgroundColor`, `danger.markerBorderColor`, `danger.markerTextColor`, `danger.lineColor`
2308
+ - `small.itemGap`, `small.markerSize`, `small.markerIconSize`, `small.dotSize`, `small.lineLength`, `small.dateFontSize`, `small.titleFontSize`, `small.descriptionFontSize`
2309
+ - `large.itemGap`, `large.markerSize`, `large.markerIconSize`, `large.dotSize`, `large.lineLength`, `large.dateFontSize`, `large.titleFontSize`, `large.descriptionFontSize`
2310
+
2192
2311
  ## Rating
2193
2312
 
2194
2313
  Props:
@@ -2393,7 +2512,7 @@ VueForge exposes design tokens as CSS variables generated from the theme preset.
2393
2512
  Typed tokens:
2394
2513
 
2395
2514
  - `ThemeTokens`/`ThemeOptions`/`ThemePreset` are exported for type-safe theming in TS.
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).
2515
+ - `components.*` accepts component-specific tokens (typed keys: button/card/checkbox/radio/tabs/accordion/toast/alert/input/inlineEdit/searchInput/mentionInput/passwordInput/otpInput/colorPicker/maskedInput/numberInput/form/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).
2397
2516
 
2398
2517
  Default core values (from `DefaultTheme`):
2399
2518