@codemonster-ru/vueforge 0.39.0 → 0.41.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 +120 -2
- package/dist/index.css +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.ts.mjs +2902 -2499
- package/dist/index.ts.umd.js +3 -3
- package/dist/package/components/__tests__/context-menu.test.d.ts +1 -0
- package/dist/package/components/__tests__/treeselect.test.d.ts +1 -0
- package/dist/package/components/context-menu.vue.d.ts +69 -0
- package/dist/package/components/tree-select.vue.d.ts +92 -0
- package/dist/package/config/theme-core.d.ts +53 -0
- package/dist/package/themes/default/components/context-menu.d.ts +12 -0
- package/dist/package/themes/default/components/treeselect.d.ts +41 -0
- package/dist/package/themes/default/index.d.ts +51 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -53,9 +53,11 @@ import {
|
|
|
53
53
|
Stepper,
|
|
54
54
|
Rating,
|
|
55
55
|
Tree,
|
|
56
|
+
TreeSelect,
|
|
56
57
|
Drawer,
|
|
57
58
|
ConfirmDialog,
|
|
58
59
|
Dropdown,
|
|
60
|
+
ContextMenu,
|
|
59
61
|
} from '@codemonster-ru/vueforge';
|
|
60
62
|
import '@codemonster-ru/vueforge/dist/index.css';
|
|
61
63
|
|
|
@@ -96,6 +98,7 @@ app.use(VueForge, {
|
|
|
96
98
|
<Stepper v-model="step" :steps="steps" clickable />
|
|
97
99
|
<Rating v-model="rating" allow-half />
|
|
98
100
|
<Tree v-model="selectedNode" v-model:expandedKeys="expandedKeys" :items="treeItems" />
|
|
101
|
+
<TreeSelect v-model="selectedNode" v-model:expandedKeys="expandedKeys" :items="treeItems" placeholder="Select node" />
|
|
99
102
|
<Accordion v-model="faq">
|
|
100
103
|
<AccordionItem value="shipping" title="Shipping">
|
|
101
104
|
Shipping details
|
|
@@ -121,6 +124,9 @@ app.use(VueForge, {
|
|
|
121
124
|
<Button label="Actions" />
|
|
122
125
|
</template>
|
|
123
126
|
</Dropdown>
|
|
127
|
+
<ContextMenu :items="menuItems">
|
|
128
|
+
<div>Right-click here</div>
|
|
129
|
+
</ContextMenu>
|
|
124
130
|
```
|
|
125
131
|
|
|
126
132
|
## Components
|
|
@@ -150,6 +156,7 @@ app.use(VueForge, {
|
|
|
150
156
|
- ConfirmDialog
|
|
151
157
|
- Drawer
|
|
152
158
|
- Dropdown
|
|
159
|
+
- ContextMenu
|
|
153
160
|
- Popover
|
|
154
161
|
- Select
|
|
155
162
|
- Autocomplete
|
|
@@ -170,13 +177,14 @@ app.use(VueForge, {
|
|
|
170
177
|
- Stepper
|
|
171
178
|
- Rating
|
|
172
179
|
- Tree
|
|
180
|
+
- TreeSelect
|
|
173
181
|
|
|
174
182
|
Input / Textarea (quick API):
|
|
175
183
|
|
|
176
184
|
- `Input`: single-line control, supports `v-model`, `size`, `variant`, `disabled`, `readonly`.
|
|
177
185
|
- `NumberInput`: numeric control, supports `v-model`, `min`, `max`, `step`, `precision`, `controls`, `size`, `variant`.
|
|
178
186
|
- `Textarea`: multi-line control, same as Input plus `rows`.
|
|
179
|
-
- `Checkbox`, `Select`, `Autocomplete`, `MultiSelect`, `DatePicker`, `DateRangePicker`, `Pagination`, and `
|
|
187
|
+
- `Checkbox`, `Select`, `Autocomplete`, `MultiSelect`, `DatePicker`, `DateRangePicker`, `Pagination`, `DataTable`, and `TreeSelect` also support `variant: 'filled' | 'outlined'`.
|
|
180
188
|
|
|
181
189
|
## FormField
|
|
182
190
|
|
|
@@ -1070,6 +1078,49 @@ Component tokens (override via `theme.overrides.components.dropdown`):
|
|
|
1070
1078
|
- `panelBackgroundColor`, `panelShadow`, `zIndex`
|
|
1071
1079
|
- `disabledOpacity`, `itemPadding`
|
|
1072
1080
|
|
|
1081
|
+
## ContextMenu
|
|
1082
|
+
|
|
1083
|
+
Props:
|
|
1084
|
+
|
|
1085
|
+
- `modelValue?: boolean` (v-model)
|
|
1086
|
+
- `items?: Array<{ label?: string; to?: string; href?: string; url?: string; icon?: string; disabled?: boolean; separator?: boolean; command?: () => void }>`
|
|
1087
|
+
- `disabled?: boolean`
|
|
1088
|
+
- `closeOnSelect?: boolean` (default `true`)
|
|
1089
|
+
- `closeOnEsc?: boolean` (default `true`)
|
|
1090
|
+
- `offset?: number` (default `2`)
|
|
1091
|
+
|
|
1092
|
+
Slots:
|
|
1093
|
+
|
|
1094
|
+
- `default` - context area/target
|
|
1095
|
+
- `menu` (optional) - menu content (defaults to `items` list if provided)
|
|
1096
|
+
|
|
1097
|
+
Note: For custom menu content, add `data-context-menu-close` to clickable elements to auto-close on click.
|
|
1098
|
+
|
|
1099
|
+
Events:
|
|
1100
|
+
|
|
1101
|
+
- `update:modelValue`
|
|
1102
|
+
- `open`
|
|
1103
|
+
- `close`
|
|
1104
|
+
- `select`
|
|
1105
|
+
- `contextmenu`
|
|
1106
|
+
|
|
1107
|
+
Example:
|
|
1108
|
+
|
|
1109
|
+
```vue
|
|
1110
|
+
<ContextMenu :items="menuItems">
|
|
1111
|
+
<div class="surface">Right-click here</div>
|
|
1112
|
+
</ContextMenu>
|
|
1113
|
+
```
|
|
1114
|
+
|
|
1115
|
+
### ContextMenu tokens
|
|
1116
|
+
|
|
1117
|
+
Component tokens (override via `theme.overrides.components.contextMenu`):
|
|
1118
|
+
|
|
1119
|
+
- `minWidth`
|
|
1120
|
+
- `panelPadding`, `panelBorderRadius`, `panelBorderColor`
|
|
1121
|
+
- `panelBackgroundColor`, `panelShadow`, `zIndex`
|
|
1122
|
+
- `disabledOpacity`, `itemPadding`
|
|
1123
|
+
|
|
1073
1124
|
## Tooltip
|
|
1074
1125
|
|
|
1075
1126
|
Props:
|
|
@@ -1415,6 +1466,73 @@ Component tokens (override via `theme.overrides.components.tree`):
|
|
|
1415
1466
|
- `small.rowPadding`, `small.rowPaddingInline`, `small.rowFontSize`, `small.toggleSize`
|
|
1416
1467
|
- `large.rowPadding`, `large.rowPaddingInline`, `large.rowFontSize`, `large.toggleSize`
|
|
1417
1468
|
|
|
1469
|
+
## TreeSelect
|
|
1470
|
+
|
|
1471
|
+
Props:
|
|
1472
|
+
|
|
1473
|
+
- `items?: Array<{ key: string | number; label: string; disabled?: boolean; children?: Array<...> }>` (default `[]`)
|
|
1474
|
+
- `modelValue?: string | number | Array<string | number>` (v-model)
|
|
1475
|
+
- `expandedKeys?: Array<string | number>` (`v-model:expandedKeys`)
|
|
1476
|
+
- `multiple?: boolean` (default `false`)
|
|
1477
|
+
- `selectable?: boolean` (default `true`)
|
|
1478
|
+
- `expandOnClick?: boolean` (default `true`)
|
|
1479
|
+
- `placeholder?: string`
|
|
1480
|
+
- `searchPlaceholder?: string` (default `Search...`)
|
|
1481
|
+
- `disabled?: boolean`
|
|
1482
|
+
- `readonly?: boolean`
|
|
1483
|
+
- `loading?: boolean` (default `false`)
|
|
1484
|
+
- `loadingText?: string` (default `Loading...`)
|
|
1485
|
+
- `emptyText?: string` (default `No results`)
|
|
1486
|
+
- `filter?: boolean` (default `true`)
|
|
1487
|
+
- `clearable?: boolean` (default `false`)
|
|
1488
|
+
- `size?: 'small' | 'normal' | 'large'` (default `normal`)
|
|
1489
|
+
- `variant?: 'filled' | 'outlined'` (default `filled`)
|
|
1490
|
+
|
|
1491
|
+
Events:
|
|
1492
|
+
|
|
1493
|
+
- `update:modelValue`
|
|
1494
|
+
- `change`
|
|
1495
|
+
- `update:expandedKeys`
|
|
1496
|
+
- `toggle`
|
|
1497
|
+
- `nodeClick`
|
|
1498
|
+
- `search`
|
|
1499
|
+
- `focus`
|
|
1500
|
+
- `blur`
|
|
1501
|
+
|
|
1502
|
+
Slots:
|
|
1503
|
+
|
|
1504
|
+
- `label` - forwarded Tree node label slot props: `{ node, level, selected, expanded, disabled }`
|
|
1505
|
+
|
|
1506
|
+
Example:
|
|
1507
|
+
|
|
1508
|
+
```vue
|
|
1509
|
+
<TreeSelect
|
|
1510
|
+
v-model="selectedNode"
|
|
1511
|
+
v-model:expandedKeys="expandedKeys"
|
|
1512
|
+
:items="treeItems"
|
|
1513
|
+
placeholder="Select docs section"
|
|
1514
|
+
clearable
|
|
1515
|
+
/>
|
|
1516
|
+
<TreeSelect v-model="selectedMany" :items="treeItems" multiple variant="outlined" />
|
|
1517
|
+
```
|
|
1518
|
+
|
|
1519
|
+
### TreeSelect tokens
|
|
1520
|
+
|
|
1521
|
+
Component tokens (override via `theme.overrides.components.treeselect`):
|
|
1522
|
+
|
|
1523
|
+
- `minWidth`, `fontSize`, `controlGap`, `chevronSize`
|
|
1524
|
+
- `padding`, `borderRadius`, `borderColor`
|
|
1525
|
+
- `backgroundColor`, `textColor`, `placeholderColor`
|
|
1526
|
+
- `focusBorderColor`, `focusRingShadow`, `hoverBorderColor`
|
|
1527
|
+
- `disabledOpacity`
|
|
1528
|
+
- `panelBackgroundColor`, `panelBorderColor`, `panelPadding`, `panelMaxHeight`, `panelRadiusOffset`, `panelShadow`
|
|
1529
|
+
- `searchPadding`, `searchBorderColor`, `searchBorderRadius`
|
|
1530
|
+
- `emptyPadding`, `emptyColor`
|
|
1531
|
+
- `loadingPadding`, `loadingColor`
|
|
1532
|
+
- `clearSize`, `clearRadius`, `clearHoverBackgroundColor`
|
|
1533
|
+
- `small.fontSize`, `small.padding`
|
|
1534
|
+
- `large.fontSize`, `large.padding`
|
|
1535
|
+
|
|
1418
1536
|
## Tokens
|
|
1419
1537
|
|
|
1420
1538
|
VueForge exposes design tokens as CSS variables generated from the theme preset. Core groups:
|
|
@@ -1429,7 +1547,7 @@ VueForge exposes design tokens as CSS variables generated from the theme preset.
|
|
|
1429
1547
|
Typed tokens:
|
|
1430
1548
|
|
|
1431
1549
|
- `ThemeTokens`/`ThemeOptions`/`ThemePreset` are exported for type-safe theming in TS.
|
|
1432
|
-
- `components.*` accepts component-specific tokens (typed keys: button/card/checkbox/radio/tabs/accordion/toast/alert/input/numberInput/formField/textarea/link/breadcrumbs/menu/modal/confirmDialog/drawer/popover/dropdown/select/autocomplete/multiselect/datepicker/daterangepicker/timepicker/pagination/switch/tooltip/skeleton/progress/badge/chip/avatar/datatable/slider/stepper/rating/tree).
|
|
1550
|
+
- `components.*` accepts component-specific tokens (typed keys: button/card/checkbox/radio/tabs/accordion/toast/alert/input/numberInput/formField/textarea/link/breadcrumbs/menu/modal/confirmDialog/drawer/popover/dropdown/contextMenu/select/autocomplete/multiselect/datepicker/daterangepicker/timepicker/pagination/switch/tooltip/skeleton/progress/badge/chip/avatar/datatable/slider/stepper/rating/tree/treeselect).
|
|
1433
1551
|
|
|
1434
1552
|
Default core values (from `DefaultTheme`):
|
|
1435
1553
|
|