@codemonster-ru/vueforge 0.52.0 → 0.53.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
@@ -50,6 +50,7 @@ import {
50
50
  DataTable,
51
51
  Checkbox,
52
52
  Switch,
53
+ SegmentedControl,
53
54
  Alert,
54
55
  Skeleton,
55
56
  Progress,
@@ -108,6 +109,13 @@ app.use(VueForge, {
108
109
  <DataTable :columns="columns" :rows="rows" sortable striped />
109
110
  <Checkbox v-model="agreed" label="I agree" />
110
111
  <Switch v-model="darkMode" label="Dark mode" />
112
+ <SegmentedControl
113
+ v-model="view"
114
+ :options="[
115
+ { label: 'List', value: 'list' },
116
+ { label: 'Grid', value: 'grid' },
117
+ ]"
118
+ />
111
119
  <Alert severity="info" title="Heads up" message="Project settings were updated." />
112
120
  <Skeleton height="12px" width="140px" />
113
121
  <Progress :value="64" />
@@ -175,6 +183,7 @@ app.use(VueForge, {
175
183
  - Checkbox
176
184
  - RadioGroup
177
185
  - RadioButton
186
+ - SegmentedControl
178
187
  - Tabs
179
188
  - Tab
180
189
  - TabPanel
@@ -240,7 +249,7 @@ Input / Search / Password / Textarea (quick API):
240
249
  - `NumberInput`: numeric control, supports `v-model`, `min`, `max`, `step`, `precision`, `controls`, `size`, `variant`.
241
250
  - `Textarea`: multi-line control, same as Input plus `rows`.
242
251
  - `TagInput`: token/tag control, supports `v-model` (array), suggestions, custom tags, `maxTags`, `clearable`, `size`, `variant`.
243
- - `SearchInput`, `OtpInput`, `ColorPicker`, `MaskedInput`, `Checkbox`, `Select`, `Autocomplete`, `MultiSelect`, `TagInput`, `DatePicker`, `Calendar`, `DateRangePicker`, `DateTimePicker`, `Pagination`, `DataTable`, and `TreeSelect` also support `variant: 'filled' | 'outlined'`.
252
+ - `SearchInput`, `OtpInput`, `ColorPicker`, `MaskedInput`, `Checkbox`, `Select`, `Autocomplete`, `MultiSelect`, `TagInput`, `DatePicker`, `Calendar`, `DateRangePicker`, `DateTimePicker`, `Pagination`, `DataTable`, `SegmentedControl`, and `TreeSelect` also support `variant: 'filled' | 'outlined'`.
244
253
 
245
254
  ## FormField
246
255
 
@@ -1131,6 +1140,51 @@ Component tokens (override via `theme.overrides.components.breadcrumbs`):
1131
1140
  - `gap`, `fontSize`, `textColor`, `hoverColor`, `activeColor`
1132
1141
  - `separatorColor`, `disabledOpacity`
1133
1142
 
1143
+ ## SegmentedControl
1144
+
1145
+ Props:
1146
+
1147
+ - `modelValue?: string | number` (v-model)
1148
+ - `options?: Array<{ label: string; value: string | number; disabled?: boolean }>` (default `[]`)
1149
+ - `disabled?: boolean`
1150
+ - `fullWidth?: boolean` (default `false`)
1151
+ - `size?: 'small' | 'normal' | 'large'` (default `normal`)
1152
+ - `variant?: 'filled' | 'outlined'` (default `filled`)
1153
+ - `ariaLabel?: string`
1154
+ - `ariaLabelledby?: string`
1155
+
1156
+ Events:
1157
+
1158
+ - `update:modelValue`
1159
+ - `change`
1160
+ - `focus`
1161
+ - `blur`
1162
+
1163
+ Example:
1164
+
1165
+ ```vue
1166
+ <SegmentedControl
1167
+ v-model="view"
1168
+ :options="[
1169
+ { label: 'List', value: 'list' },
1170
+ { label: 'Grid', value: 'grid' },
1171
+ { label: 'Board', value: 'board' },
1172
+ ]"
1173
+ />
1174
+ ```
1175
+
1176
+ ### SegmentedControl tokens
1177
+
1178
+ Component tokens (override via `theme.overrides.components.segmentedControl`):
1179
+
1180
+ - `fontSize`, `padding`, `gap`
1181
+ - `borderRadius`, `borderColor`, `backgroundColor`, `textColor`
1182
+ - `hoverBackgroundColor`, `activeBackgroundColor`, `activeTextColor`
1183
+ - `focusRingShadow`, `disabledOpacity`
1184
+ - `segmentPadding`, `segmentRadius`, `segmentFontWeight`
1185
+ - `small.fontSize`, `small.padding`, `small.segmentPadding`
1186
+ - `large.fontSize`, `large.padding`, `large.segmentPadding`
1187
+
1134
1188
  ## Tabs / Tab / TabPanel
1135
1189
 
1136
1190
  Props (Tabs):
@@ -2100,7 +2154,7 @@ VueForge exposes design tokens as CSS variables generated from the theme preset.
2100
2154
  Typed tokens:
2101
2155
 
2102
2156
  - `ThemeTokens`/`ThemeOptions`/`ThemePreset` are exported for type-safe theming in TS.
2103
- - `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/tooltip/skeleton/progress/badge/chip/avatar/datatable/slider/stepper/rating/tree/treeselect/virtualScroller).
2157
+ - `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/avatar/datatable/slider/stepper/rating/tree/treeselect/virtualScroller).
2104
2158
 
2105
2159
  Default core values (from `DefaultTheme`):
2106
2160