@vc-shell/vc-app-skill 2.0.0-alpha.33 → 2.0.0-alpha.34
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/CHANGELOG.md +78 -54
- package/README.md +42 -12
- package/package.json +4 -4
- package/runtime/VERSION +1 -1
- package/runtime/agents/api-analyzer.md +31 -16
- package/runtime/agents/blade-enhancer.md +15 -9
- package/runtime/agents/details-blade-generator.md +47 -31
- package/runtime/agents/list-blade-generator.md +21 -37
- package/runtime/agents/locales-generator.md +3 -0
- package/runtime/agents/migration-agent.md +18 -7
- package/runtime/agents/module-analyzer.md +2 -0
- package/runtime/agents/module-assembler.md +15 -0
- package/runtime/agents/promote-agent.md +15 -4
- package/runtime/agents/type-checker.md +11 -0
- package/runtime/knowledge/docs/_BUILD_HASH.md +1 -1
- package/runtime/knowledge/docs/core/api/platform.docs.md +30 -30
- package/runtime/knowledge/docs/core/blade-navigation/blade-nav-composables.docs.md +41 -41
- package/runtime/knowledge/docs/core/composables/bladeContext/index.docs.md +12 -10
- package/runtime/knowledge/docs/core/composables/useApiClient/useApiClient.docs.md +11 -14
- package/runtime/knowledge/docs/core/composables/useAppBarMobileButtons/useAppBarMobileButtons.docs.md +35 -35
- package/runtime/knowledge/docs/core/composables/useAppBarWidget/useAppBarWidget.docs.md +35 -35
- package/runtime/knowledge/docs/core/composables/useAppInsights/useAppInsights.docs.md +15 -15
- package/runtime/knowledge/docs/core/composables/useAssets/useAssets.docs.md +21 -18
- package/runtime/knowledge/docs/core/composables/useAssetsManager/useAssetsManager.docs.md +28 -24
- package/runtime/knowledge/docs/core/composables/useAsync/useAsync.docs.md +90 -61
- package/runtime/knowledge/docs/core/composables/useBeforeUnload/useBeforeUnload.docs.md +19 -18
- package/runtime/knowledge/docs/core/composables/useBlade/useBlade.docs.md +89 -68
- package/runtime/knowledge/docs/core/composables/useBladeForm/useBladeForm.docs.md +27 -25
- package/runtime/knowledge/docs/core/composables/useBladeRegistry/useBladeRegistry.docs.md +15 -15
- package/runtime/knowledge/docs/core/composables/useBladeWidgets/index.docs.md +43 -47
- package/runtime/knowledge/docs/core/composables/useBreadcrumbs/useBreadcrumbs.docs.md +11 -11
- package/runtime/knowledge/docs/core/composables/useConnectionStatus/useConnectionStatus.docs.md +27 -15
- package/runtime/knowledge/docs/core/composables/useDashboard/useDashboard.docs.md +30 -30
- package/runtime/knowledge/docs/core/composables/useDynamicProperties/useDynamicProperties.docs.md +34 -36
- package/runtime/knowledge/docs/core/composables/useErrorHandler/useErrorHandler.docs.md +44 -23
- package/runtime/knowledge/docs/core/composables/useFunctions/useFunctions.docs.md +14 -11
- package/runtime/knowledge/docs/core/composables/useKeyboardNavigation/useKeyboardNavigation.docs.md +47 -38
- package/runtime/knowledge/docs/core/composables/useLanguages/useLanguages.docs.md +37 -28
- package/runtime/knowledge/docs/core/composables/useLoading/useLoading.docs.md +23 -17
- package/runtime/knowledge/docs/core/composables/useMenuExpanded/index.docs.md +9 -9
- package/runtime/knowledge/docs/core/composables/useMenuService/useMenuService.docs.md +42 -42
- package/runtime/knowledge/docs/core/composables/useModificationTracker/useModificationTracker.docs.md +22 -12
- package/runtime/knowledge/docs/core/composables/useNotifications/useNotifications.docs.md +33 -41
- package/runtime/knowledge/docs/core/composables/usePermissions/usePermissions.docs.md +16 -16
- package/runtime/knowledge/docs/core/composables/usePlatformLocaleSync/usePlatformLocaleSync.docs.md +28 -0
- package/runtime/knowledge/docs/core/composables/usePopup/usePopup.docs.md +32 -24
- package/runtime/knowledge/docs/core/composables/useResponsive/useResponsive.docs.md +32 -11
- package/runtime/knowledge/docs/core/composables/useSettings/useSettings.docs.md +22 -13
- package/runtime/knowledge/docs/core/composables/useSettingsMenu/useSettingsMenu.docs.md +7 -7
- package/runtime/knowledge/docs/core/composables/useSidebarState/useSidebarState.docs.md +32 -24
- package/runtime/knowledge/docs/core/composables/useSlowNetworkDetection/useSlowNetworkDetection.docs.md +21 -17
- package/runtime/knowledge/docs/core/composables/useTheme/useTheme.docs.md +24 -24
- package/runtime/knowledge/docs/core/composables/useToolbar/useToolbar.docs.md +28 -31
- package/runtime/knowledge/docs/core/composables/useUser/useUser.docs.md +43 -24
- package/runtime/knowledge/docs/core/composables/useUserManagement/useUserManagement.docs.md +68 -48
- package/runtime/knowledge/docs/core/composables/useWebVitals/useWebVitals.docs.md +19 -19
- package/runtime/knowledge/docs/core/composables/useWidgets/useWidgets.docs.md +42 -47
- package/runtime/knowledge/docs/core/directives/autofocus/autofocus.docs.md +10 -4
- package/runtime/knowledge/docs/core/directives/loading/loading.docs.md +35 -20
- package/runtime/knowledge/docs/core/notifications/notifications.docs.md +36 -35
- package/runtime/knowledge/docs/core/plugins/ai-agent/ai-agent.docs.md +38 -38
- package/runtime/knowledge/docs/core/plugins/extension-points/extension-points.docs.md +79 -62
- package/runtime/knowledge/docs/core/plugins/global-error-handler/global-error-handler.docs.md +10 -10
- package/runtime/knowledge/docs/core/plugins/i18n/i18n.docs.md +21 -23
- package/runtime/knowledge/docs/core/plugins/modularity/modularity.docs.md +91 -83
- package/runtime/knowledge/docs/core/plugins/permissions/permissions.docs.md +10 -16
- package/runtime/knowledge/docs/core/plugins/signalR/signalR.docs.md +9 -9
- package/runtime/knowledge/docs/core/plugins/validation/validation.docs.md +65 -22
- package/runtime/knowledge/docs/core/services/services.docs.md +19 -22
- package/runtime/knowledge/docs/core/types/types.docs.md +40 -40
- package/runtime/knowledge/docs/core/utilities/date/date-utilities.docs.md +27 -27
- package/runtime/knowledge/docs/core/utilities/shared-utilities.docs.md +23 -23
- package/runtime/knowledge/docs/core/utilities/thumbnail/thumbnail.docs.md +22 -25
- package/runtime/knowledge/docs/core/utilities/utilities.docs.md +64 -64
- package/runtime/knowledge/docs/injection-keys.docs.md +52 -51
- package/runtime/knowledge/docs/modules/assets-manager/assets-manager.docs.md +9 -9
- package/runtime/knowledge/docs/shell/_internal/popup/common/popup-common.docs.md +23 -43
- package/runtime/knowledge/docs/shell/auth/ChangePasswordPage/change-password-page.docs.md +5 -5
- package/runtime/knowledge/docs/shell/auth/ForgotPasswordPage/forgot-password-page.docs.md +5 -5
- package/runtime/knowledge/docs/shell/auth/InvitePage/invite-page.docs.md +8 -7
- package/runtime/knowledge/docs/shell/auth/LoginPage/login-page.docs.md +7 -7
- package/runtime/knowledge/docs/shell/auth/ResetPasswordPage/reset-password-page.docs.md +8 -7
- package/runtime/knowledge/docs/shell/auth/sign-in/sign-in.docs.md +29 -13
- package/runtime/knowledge/docs/shell/components/change-password/change-password.docs.md +13 -16
- package/runtime/knowledge/docs/shell/components/change-password-button/change-password-button.docs.md +1 -7
- package/runtime/knowledge/docs/shell/components/error-interceptor/error-interceptor.docs.md +5 -5
- package/runtime/knowledge/docs/shell/components/language-selector/language-selector.docs.md +1 -1
- package/runtime/knowledge/docs/shell/components/logout-button/logout-button.docs.md +1 -1
- package/runtime/knowledge/docs/shell/components/notification-template/notification-template.docs.md +17 -9
- package/runtime/knowledge/docs/shell/components/settings-menu/settings-menu.docs.md +11 -17
- package/runtime/knowledge/docs/shell/components/settings-menu-item/settings-menu-item.docs.md +34 -65
- package/runtime/knowledge/docs/shell/components/sidebar/sidebar.docs.md +16 -26
- package/runtime/knowledge/docs/shell/components/theme-selector/theme-selector.docs.md +2 -2
- package/runtime/knowledge/docs/shell/components/user-dropdown-button/user-dropdown-button.docs.md +7 -9
- package/runtime/knowledge/docs/shell/dashboard/dashboard-charts/dashboard-charts.docs.md +30 -40
- package/runtime/knowledge/docs/shell/dashboard/dashboard-widget-card/dashboard-widget-card.docs.md +26 -19
- package/runtime/knowledge/docs/shell/dashboard/draggable-dashboard/draggable-dashboard.docs.md +15 -12
- package/runtime/knowledge/docs/ui/components/atoms/vc-badge/vc-badge.docs.md +15 -26
- package/runtime/knowledge/docs/ui/components/atoms/vc-banner/vc-banner.docs.md +21 -19
- package/runtime/knowledge/docs/ui/components/atoms/vc-button/vc-button.docs.md +83 -67
- package/runtime/knowledge/docs/ui/components/atoms/vc-card/vc-card.docs.md +100 -59
- package/runtime/knowledge/docs/ui/components/atoms/vc-col/vc-col.docs.md +28 -11
- package/runtime/knowledge/docs/ui/components/atoms/vc-container/vc-container.docs.md +20 -17
- package/runtime/knowledge/docs/ui/components/atoms/vc-hint/vc-hint.docs.md +26 -17
- package/runtime/knowledge/docs/ui/components/atoms/vc-icon/vc-icon.docs.md +30 -32
- package/runtime/knowledge/docs/ui/components/atoms/vc-image/vc-image.docs.md +25 -48
- package/runtime/knowledge/docs/ui/components/atoms/vc-label/vc-label.docs.md +29 -24
- package/runtime/knowledge/docs/ui/components/atoms/vc-link/vc-link.docs.md +23 -15
- package/runtime/knowledge/docs/ui/components/atoms/vc-loading/vc-loading.docs.md +22 -13
- package/runtime/knowledge/docs/ui/components/atoms/vc-progress/vc-progress.docs.md +33 -18
- package/runtime/knowledge/docs/ui/components/atoms/vc-row/vc-row.docs.md +56 -15
- package/runtime/knowledge/docs/ui/components/atoms/vc-scrollable-container/vc-scrollable-container.docs.md +28 -15
- package/runtime/knowledge/docs/ui/components/atoms/vc-skeleton/vc-skeleton.docs.md +40 -20
- package/runtime/knowledge/docs/ui/components/atoms/vc-status/vc-status.docs.md +25 -14
- package/runtime/knowledge/docs/ui/components/atoms/vc-status-icon/vc-status-icon.docs.md +40 -14
- package/runtime/knowledge/docs/ui/components/atoms/vc-tooltip/vc-tooltip.docs.md +54 -42
- package/runtime/knowledge/docs/ui/components/atoms/vc-video/vc-video.docs.md +17 -17
- package/runtime/knowledge/docs/ui/components/atoms/vc-widget/vc-widget.docs.md +21 -21
- package/runtime/knowledge/docs/ui/components/molecules/multilanguage-selector/multilanguage-selector.docs.md +23 -10
- package/runtime/knowledge/docs/ui/components/molecules/vc-accordion/vc-accordion.docs.md +55 -44
- package/runtime/knowledge/docs/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.docs.md +23 -20
- package/runtime/knowledge/docs/ui/components/molecules/vc-checkbox/vc-checkbox.docs.md +92 -65
- package/runtime/knowledge/docs/ui/components/molecules/vc-checkbox-group/vc-checkbox-group.docs.md +22 -36
- package/runtime/knowledge/docs/ui/components/molecules/vc-color-input/vc-color-input.docs.md +65 -23
- package/runtime/knowledge/docs/ui/components/molecules/vc-date-picker/vc-date-picker.docs.md +52 -73
- package/runtime/knowledge/docs/ui/components/molecules/vc-dropdown/vc-dropdown.docs.md +91 -85
- package/runtime/knowledge/docs/ui/components/molecules/vc-dropdown-panel/vc-dropdown-panel.docs.md +38 -42
- package/runtime/knowledge/docs/ui/components/molecules/vc-editor/vc-editor.docs.md +56 -73
- package/runtime/knowledge/docs/ui/components/molecules/vc-field/vc-field.docs.md +61 -27
- package/runtime/knowledge/docs/ui/components/molecules/vc-file-upload/vc-file-upload.docs.md +42 -50
- package/runtime/knowledge/docs/ui/components/molecules/vc-form/vc-form.docs.md +35 -64
- package/runtime/knowledge/docs/ui/components/molecules/vc-image-tile/vc-image-tile.docs.md +38 -41
- package/runtime/knowledge/docs/ui/components/molecules/vc-input/vc-input.docs.md +109 -131
- package/runtime/knowledge/docs/ui/components/molecules/vc-input-currency/vc-input-currency.docs.md +47 -88
- package/runtime/knowledge/docs/ui/components/molecules/vc-input-dropdown/vc-input-dropdown.docs.md +50 -64
- package/runtime/knowledge/docs/ui/components/molecules/vc-input-group/vc-input-group.docs.md +29 -24
- package/runtime/knowledge/docs/ui/components/molecules/vc-menu/vc-menu.docs.md +32 -28
- package/runtime/knowledge/docs/ui/components/molecules/vc-multivalue/vc-multivalue.docs.md +57 -65
- package/runtime/knowledge/docs/ui/components/molecules/vc-pagination/vc-pagination.docs.md +28 -26
- package/runtime/knowledge/docs/ui/components/molecules/vc-radio-button/vc-radio-button.docs.md +55 -20
- package/runtime/knowledge/docs/ui/components/molecules/vc-radio-group/vc-radio-group.docs.md +21 -35
- package/runtime/knowledge/docs/ui/components/molecules/vc-rating/vc-rating.docs.md +38 -33
- package/runtime/knowledge/docs/ui/components/molecules/vc-select/vc-select.docs.md +72 -83
- package/runtime/knowledge/docs/ui/components/molecules/vc-slider/vc-slider.docs.md +21 -16
- package/runtime/knowledge/docs/ui/components/molecules/vc-switch/vc-switch.docs.md +55 -64
- package/runtime/knowledge/docs/ui/components/molecules/vc-textarea/vc-textarea.docs.md +51 -70
- package/runtime/knowledge/docs/ui/components/molecules/vc-toast/vc-toast.docs.md +58 -57
- package/runtime/knowledge/docs/ui/components/organisms/vc-app/vc-app.docs.md +49 -26
- package/runtime/knowledge/docs/ui/components/organisms/vc-auth-layout/vc-auth-layout.docs.md +82 -28
- package/runtime/knowledge/docs/ui/components/organisms/vc-blade/vc-blade.docs.md +90 -75
- package/runtime/knowledge/docs/ui/components/organisms/vc-data-table/composables/table-composables.docs.md +99 -48
- package/runtime/knowledge/docs/ui/components/organisms/vc-data-table/vc-data-table.docs.md +548 -367
- package/runtime/knowledge/docs/ui/components/organisms/vc-dynamic-property/vc-dynamic-property.docs.md +35 -52
- package/runtime/knowledge/docs/ui/components/organisms/vc-gallery/vc-gallery.docs.md +33 -62
- package/runtime/knowledge/docs/ui/components/organisms/vc-image-upload/vc-image-upload.docs.md +17 -23
- package/runtime/knowledge/docs/ui/components/organisms/vc-popup/vc-popup.docs.md +109 -68
- package/runtime/knowledge/docs/ui/components/organisms/vc-sidebar/vc-sidebar.docs.md +82 -44
- package/runtime/knowledge/docs/ui/composables/ui-composables.docs.md +8 -8
- package/runtime/knowledge/docs/ui/composables/useDataTablePagination.docs.md +164 -0
- package/runtime/knowledge/docs/ui/composables/useDataTableSort.docs.md +34 -26
- package/runtime/knowledge/docs/ui/composables/useTableSelection.docs.md +48 -40
- package/runtime/knowledge/docs/ui/composables/useTableSort.docs.md +30 -17
- package/runtime/knowledge/docs/ui/types/ui-types.docs.md +40 -29
- package/runtime/knowledge/examples/offers-module.md +15 -13
- package/runtime/knowledge/examples/team-module.md +82 -119
- package/runtime/knowledge/examples/videos-module.md +44 -17
- package/runtime/knowledge/index.md +22 -0
- package/runtime/knowledge/migration-prompts/blade-form-migration.md +17 -8
- package/runtime/knowledge/migration-prompts/blade-props-migration.md +1 -2
- package/runtime/knowledge/migration-prompts/datatable-migration.md +801 -0
- package/runtime/knowledge/migration-prompts/icon-migration.md +97 -0
- package/runtime/knowledge/migration-prompts/manual-migration-audit.md +117 -0
- package/runtime/knowledge/migration-prompts/notifications-migration.md +8 -3
- package/runtime/knowledge/migration-prompts/nswag-migration.md +25 -29
- package/runtime/knowledge/migration-prompts/use-assets-migration.md +164 -0
- package/runtime/knowledge/migration-prompts/use-data-table-pagination-migration.md +176 -0
- package/runtime/knowledge/migration-prompts/widgets-migration.md +48 -27
- package/runtime/knowledge/patterns/assets-management.md +20 -20
- package/runtime/knowledge/patterns/blade-navigation.md +7 -14
- package/runtime/knowledge/patterns/blade-widget.md +19 -17
- package/runtime/knowledge/patterns/child-blade-flow.md +19 -7
- package/runtime/knowledge/patterns/composable-details.md +20 -50
- package/runtime/knowledge/patterns/composable-list.md +43 -31
- package/runtime/knowledge/patterns/dashboard-widget.md +14 -16
- package/runtime/knowledge/patterns/datatable-pattern.md +521 -0
- package/runtime/knowledge/patterns/details-blade-pattern.md +78 -116
- package/runtime/knowledge/patterns/extension-points-usage.md +53 -44
- package/runtime/knowledge/patterns/form-validation.md +28 -64
- package/runtime/knowledge/patterns/list-blade-pattern.md +33 -21
- package/runtime/knowledge/patterns/module-structure.md +7 -1
- package/runtime/knowledge/patterns/multilanguage-fields.md +8 -14
- package/runtime/knowledge/patterns/notification-template.md +21 -14
- package/runtime/knowledge/patterns/signalr-notifications.md +30 -32
- package/runtime/knowledge/patterns/toolbar-pattern.md +18 -20
- package/runtime/vc-app.md +241 -62
package/runtime/knowledge/docs/ui/components/molecules/vc-color-input/vc-color-input.docs.md
CHANGED
|
@@ -22,7 +22,11 @@ The component follows the same prop interface as other vc-shell form fields (`IT
|
|
|
22
22
|
|
|
23
23
|
```vue
|
|
24
24
|
<template>
|
|
25
|
-
<VcColorInput
|
|
25
|
+
<VcColorInput
|
|
26
|
+
v-model="color"
|
|
27
|
+
label="Brand color"
|
|
28
|
+
placeholder="Enter hex color..."
|
|
29
|
+
/>
|
|
26
30
|
</template>
|
|
27
31
|
|
|
28
32
|
<script setup lang="ts">
|
|
@@ -35,15 +39,15 @@ const color = ref<string | null>(null);
|
|
|
35
39
|
|
|
36
40
|
## Key Props
|
|
37
41
|
|
|
38
|
-
| Prop
|
|
39
|
-
|
|
40
|
-
| `modelValue`
|
|
41
|
-
| `label`
|
|
42
|
-
| `placeholder`
|
|
43
|
-
| `clearable`
|
|
44
|
-
| `size`
|
|
45
|
-
| `error` / `errorMessage` | `boolean` / `string`
|
|
46
|
-
| `disabled`
|
|
42
|
+
| Prop | Type | Default | Description |
|
|
43
|
+
| ------------------------ | ---------------------- | ----------- | -------------------------------------------------------- |
|
|
44
|
+
| `modelValue` | `string \| null` | `undefined` | Color value via `v-model` (hex string or CSS color name) |
|
|
45
|
+
| `label` | `string` | -- | Label text above the field |
|
|
46
|
+
| `placeholder` | `string` | -- | Placeholder text |
|
|
47
|
+
| `clearable` | `boolean` | `false` | Shows a clear button when a value is present |
|
|
48
|
+
| `size` | `"default" \| "small"` | `"default"` | Field height variant |
|
|
49
|
+
| `error` / `errorMessage` | `boolean` / `string` | -- | Error styling and validation message |
|
|
50
|
+
| `disabled` | `boolean` | `false` | Disables the input and color picker |
|
|
47
51
|
|
|
48
52
|
## Common Patterns
|
|
49
53
|
|
|
@@ -66,7 +70,10 @@ const color = ref<string | null>(null);
|
|
|
66
70
|
|
|
67
71
|
```vue
|
|
68
72
|
<template>
|
|
69
|
-
<VcColorInput
|
|
73
|
+
<VcColorInput
|
|
74
|
+
v-model="color"
|
|
75
|
+
label="Accent color"
|
|
76
|
+
/>
|
|
70
77
|
<!-- Accepts "#3b82f6", "#fff", "red", "cornflowerblue", etc. -->
|
|
71
78
|
</template>
|
|
72
79
|
|
|
@@ -81,9 +88,20 @@ const color = ref("#3b82f6");
|
|
|
81
88
|
```vue
|
|
82
89
|
<template>
|
|
83
90
|
<div class="tw-flex tw-flex-col tw-gap-4">
|
|
84
|
-
<VcInput
|
|
85
|
-
|
|
86
|
-
|
|
91
|
+
<VcInput
|
|
92
|
+
v-model="category.name"
|
|
93
|
+
label="Category Name"
|
|
94
|
+
rules="required"
|
|
95
|
+
/>
|
|
96
|
+
<VcColorInput
|
|
97
|
+
v-model="category.badgeColor"
|
|
98
|
+
label="Badge Color"
|
|
99
|
+
clearable
|
|
100
|
+
/>
|
|
101
|
+
<VcInput
|
|
102
|
+
v-model="category.description"
|
|
103
|
+
label="Description"
|
|
104
|
+
/>
|
|
87
105
|
</div>
|
|
88
106
|
</template>
|
|
89
107
|
```
|
|
@@ -95,8 +113,15 @@ You can use `VcInput` with `type="color"` instead of importing `VcColorInput` di
|
|
|
95
113
|
```vue
|
|
96
114
|
<template>
|
|
97
115
|
<!-- These are equivalent -->
|
|
98
|
-
<VcInput
|
|
99
|
-
|
|
116
|
+
<VcInput
|
|
117
|
+
type="color"
|
|
118
|
+
v-model="color"
|
|
119
|
+
label="Theme Color"
|
|
120
|
+
/>
|
|
121
|
+
<VcColorInput
|
|
122
|
+
v-model="color"
|
|
123
|
+
label="Theme Color"
|
|
124
|
+
/>
|
|
100
125
|
</template>
|
|
101
126
|
```
|
|
102
127
|
|
|
@@ -106,12 +131,30 @@ You can use `VcInput` with `type="color"` instead of importing `VcColorInput` di
|
|
|
106
131
|
<template>
|
|
107
132
|
<h3>Theme Colors</h3>
|
|
108
133
|
<div class="tw-grid tw-grid-cols-2 tw-gap-4">
|
|
109
|
-
<VcColorInput
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
<VcColorInput
|
|
114
|
-
|
|
134
|
+
<VcColorInput
|
|
135
|
+
v-model="theme.primary"
|
|
136
|
+
label="Primary"
|
|
137
|
+
/>
|
|
138
|
+
<VcColorInput
|
|
139
|
+
v-model="theme.secondary"
|
|
140
|
+
label="Secondary"
|
|
141
|
+
/>
|
|
142
|
+
<VcColorInput
|
|
143
|
+
v-model="theme.accent"
|
|
144
|
+
label="Accent"
|
|
145
|
+
/>
|
|
146
|
+
<VcColorInput
|
|
147
|
+
v-model="theme.background"
|
|
148
|
+
label="Background"
|
|
149
|
+
/>
|
|
150
|
+
<VcColorInput
|
|
151
|
+
v-model="theme.text"
|
|
152
|
+
label="Text"
|
|
153
|
+
/>
|
|
154
|
+
<VcColorInput
|
|
155
|
+
v-model="theme.error"
|
|
156
|
+
label="Error"
|
|
157
|
+
/>
|
|
115
158
|
</div>
|
|
116
159
|
</template>
|
|
117
160
|
```
|
|
@@ -155,4 +198,3 @@ The native color picker does not support alpha/transparency. If you need RGBA co
|
|
|
155
198
|
## Skeleton / Loading State
|
|
156
199
|
|
|
157
200
|
When placed inside a `VcBlade` with `loading=true`, the component automatically renders a skeleton placeholder matching its visual footprint. No additional props or configuration needed.
|
|
158
|
-
|
package/runtime/knowledge/docs/ui/components/molecules/vc-date-picker/vc-date-picker.docs.md
CHANGED
|
@@ -20,7 +20,11 @@ A date and datetime picker that wraps the [VueDatePicker](https://vue3datepicker
|
|
|
20
20
|
|
|
21
21
|
```vue
|
|
22
22
|
<template>
|
|
23
|
-
<VcDatePicker
|
|
23
|
+
<VcDatePicker
|
|
24
|
+
v-model="date"
|
|
25
|
+
label="Delivery date"
|
|
26
|
+
placeholder="Pick a date..."
|
|
27
|
+
/>
|
|
24
28
|
</template>
|
|
25
29
|
|
|
26
30
|
<script setup lang="ts">
|
|
@@ -42,12 +46,7 @@ The `type` prop controls whether the picker shows a date-only calendar or includ
|
|
|
42
46
|
<VcDatePicker v-model="startDate" label="Start date" />
|
|
43
47
|
|
|
44
48
|
<!-- Date and time -->
|
|
45
|
-
<VcDatePicker
|
|
46
|
-
v-model="scheduledAt"
|
|
47
|
-
type="datetime-local"
|
|
48
|
-
label="Schedule publication"
|
|
49
|
-
placeholder="Pick date and time..."
|
|
50
|
-
/>
|
|
49
|
+
<VcDatePicker v-model="scheduledAt" type="datetime-local" label="Schedule publication" placeholder="Pick date and time..." />
|
|
51
50
|
```
|
|
52
51
|
|
|
53
52
|
In `datetime-local` mode, the time picker is rendered inline below the calendar. The component auto-detects whether to show 12-hour (AM/PM) or 24-hour format based on the browser's locale.
|
|
@@ -57,22 +56,17 @@ In `datetime-local` mode, the time picker is rendered inline below the calendar.
|
|
|
57
56
|
When `clearable` is set, a small "x" button appears once a date is selected, allowing the user to reset the field to `null`.
|
|
58
57
|
|
|
59
58
|
```vue
|
|
60
|
-
<VcDatePicker
|
|
61
|
-
v-model="optionalDate"
|
|
62
|
-
label="Expiration date"
|
|
63
|
-
clearable
|
|
64
|
-
hint="Leave empty for no expiration"
|
|
65
|
-
/>
|
|
59
|
+
<VcDatePicker v-model="optionalDate" label="Expiration date" clearable hint="Leave empty for no expiration" />
|
|
66
60
|
```
|
|
67
61
|
|
|
68
62
|
### Size Variants
|
|
69
63
|
|
|
70
64
|
Two height variants are available:
|
|
71
65
|
|
|
72
|
-
| Size
|
|
73
|
-
|
|
74
|
-
| Default | `"default"` | 36px
|
|
75
|
-
| Small
|
|
66
|
+
| Size | Value | Height |
|
|
67
|
+
| ------- | ----------- | ------ |
|
|
68
|
+
| Default | `"default"` | 36px |
|
|
69
|
+
| Small | `"small"` | 32px |
|
|
76
70
|
|
|
77
71
|
```vue
|
|
78
72
|
<VcDatePicker v-model="date" label="Default size" size="default" />
|
|
@@ -144,19 +138,10 @@ const form = reactive({
|
|
|
144
138
|
<VcDatePicker :model-value="new Date()" label="Created at" disabled />
|
|
145
139
|
|
|
146
140
|
<!-- Error state -->
|
|
147
|
-
<VcDatePicker
|
|
148
|
-
v-model="date"
|
|
149
|
-
label="Start date"
|
|
150
|
-
:error="true"
|
|
151
|
-
error-message="Start date is required"
|
|
152
|
-
/>
|
|
141
|
+
<VcDatePicker v-model="date" label="Start date" :error="true" error-message="Start date is required" />
|
|
153
142
|
|
|
154
143
|
<!-- With hint text -->
|
|
155
|
-
<VcDatePicker
|
|
156
|
-
v-model="date"
|
|
157
|
-
label="Delivery date"
|
|
158
|
-
hint="Select a date within the next 30 days"
|
|
159
|
-
/>
|
|
144
|
+
<VcDatePicker v-model="date" label="Delivery date" hint="Select a date within the next 30 days" />
|
|
160
145
|
```
|
|
161
146
|
|
|
162
147
|
### Multilanguage Support
|
|
@@ -164,12 +149,7 @@ const form = reactive({
|
|
|
164
149
|
Like other form fields, the date picker supports the multilanguage label indicator:
|
|
165
150
|
|
|
166
151
|
```vue
|
|
167
|
-
<VcDatePicker
|
|
168
|
-
v-model="localizedDate"
|
|
169
|
-
label="Event date"
|
|
170
|
-
multilanguage
|
|
171
|
-
current-language="de-DE"
|
|
172
|
-
/>
|
|
152
|
+
<VcDatePicker v-model="localizedDate" label="Event date" multilanguage current-language="de-DE" />
|
|
173
153
|
```
|
|
174
154
|
|
|
175
155
|
## Recipes
|
|
@@ -297,52 +277,52 @@ const date = ref<Date | null>(new Date("2025-01-15"));
|
|
|
297
277
|
|
|
298
278
|
## Props
|
|
299
279
|
|
|
300
|
-
| Prop
|
|
301
|
-
|
|
302
|
-
| `modelValue`
|
|
303
|
-
| `type`
|
|
304
|
-
| `label`
|
|
305
|
-
| `placeholder`
|
|
306
|
-
| `hint`
|
|
307
|
-
| `tooltip`
|
|
308
|
-
| `clearable`
|
|
309
|
-
| `loading`
|
|
310
|
-
| `size`
|
|
311
|
-
| `required`
|
|
312
|
-
| `error`
|
|
313
|
-
| `errorMessage`
|
|
314
|
-
| `disabled`
|
|
315
|
-
| `autofocus`
|
|
316
|
-
| `name`
|
|
317
|
-
| `multilanguage`
|
|
318
|
-
| `currentLanguage`
|
|
319
|
-
| `datePickerOptions` | `VueDatePickerProps`
|
|
280
|
+
| Prop | Type | Default | Description |
|
|
281
|
+
| ------------------- | ---------------------------- | ---------------- | ------------------------------------------------------------ |
|
|
282
|
+
| `modelValue` | `Date \| string \| null` | `undefined` | Bound value via `v-model` |
|
|
283
|
+
| `type` | `"date" \| "datetime-local"` | `"date"` | Date only or date + time mode |
|
|
284
|
+
| `label` | `string` | -- | Label text above the field |
|
|
285
|
+
| `placeholder` | `string` | auto (localized) | Placeholder text; auto-generated from locale if not provided |
|
|
286
|
+
| `hint` | `string` | -- | Helper text below the field |
|
|
287
|
+
| `tooltip` | `string` | -- | Tooltip on the label info icon |
|
|
288
|
+
| `clearable` | `boolean` | `false` | Shows a clear button when a date is selected |
|
|
289
|
+
| `loading` | `boolean` | `false` | Shows a spinning loader icon |
|
|
290
|
+
| `size` | `"default" \| "small"` | `"default"` | Field height variant |
|
|
291
|
+
| `required` | `boolean` | `false` | Shows a required indicator |
|
|
292
|
+
| `error` | `boolean` | `false` | Enables error styling |
|
|
293
|
+
| `errorMessage` | `string` | -- | Error message below the field |
|
|
294
|
+
| `disabled` | `boolean` | `false` | Disables the date picker |
|
|
295
|
+
| `autofocus` | `boolean` | `false` | Focus the field on mount |
|
|
296
|
+
| `name` | `string` | `"Field"` | HTML name attribute |
|
|
297
|
+
| `multilanguage` | `boolean` | `false` | Shows language badge on the label |
|
|
298
|
+
| `currentLanguage` | `string` | -- | Language code for the badge |
|
|
299
|
+
| `datePickerOptions` | `VueDatePickerProps` | -- | Pass-through options to VueDatePicker |
|
|
320
300
|
|
|
321
301
|
## Events
|
|
322
302
|
|
|
323
|
-
| Event
|
|
324
|
-
|
|
325
|
-
| `update:modelValue` | `Date \| string \| null` | Emitted when the selected date changes
|
|
326
|
-
| `focus`
|
|
327
|
-
| `blur`
|
|
303
|
+
| Event | Payload | Description |
|
|
304
|
+
| ------------------- | ------------------------ | --------------------------------------------- |
|
|
305
|
+
| `update:modelValue` | `Date \| string \| null` | Emitted when the selected date changes |
|
|
306
|
+
| `focus` | -- | Emitted when the picker gains focus or opens |
|
|
307
|
+
| `blur` | `Event` | Emitted when the picker loses focus or closes |
|
|
328
308
|
|
|
329
309
|
## CSS Variables
|
|
330
310
|
|
|
331
311
|
Uses the same `--input-*` variables as VcInput for consistent styling across all input molecules:
|
|
332
312
|
|
|
333
|
-
| Variable
|
|
334
|
-
|
|
335
|
-
| `--input-height`
|
|
336
|
-
| `--input-height-small`
|
|
337
|
-
| `--input-border-radius`
|
|
338
|
-
| `--input-border-color`
|
|
339
|
-
| `--input-border-color-focus` | `var(--primary-500)`
|
|
340
|
-
| `--input-border-color-error` | `var(--danger-500)`
|
|
341
|
-
| `--input-background-color`
|
|
342
|
-
| `--input-text-color`
|
|
343
|
-
| `--input-placeholder-color`
|
|
344
|
-
| `--input-focus-ring-color`
|
|
345
|
-
| `--input-error-ring-color`
|
|
313
|
+
| Variable | Default | Description |
|
|
314
|
+
| ---------------------------- | ---------------------- | -------------------------- |
|
|
315
|
+
| `--input-height` | `36px` | Default field height |
|
|
316
|
+
| `--input-height-small` | `32px` | Small variant field height |
|
|
317
|
+
| `--input-border-radius` | `6px` | Corner radius |
|
|
318
|
+
| `--input-border-color` | `var(--neutrals-300)` | Default border color |
|
|
319
|
+
| `--input-border-color-focus` | `var(--primary-500)` | Focus border color |
|
|
320
|
+
| `--input-border-color-error` | `var(--danger-500)` | Error border color |
|
|
321
|
+
| `--input-background-color` | `var(--additional-50)` | Background color |
|
|
322
|
+
| `--input-text-color` | `var(--neutrals-800)` | Text color |
|
|
323
|
+
| `--input-placeholder-color` | `var(--neutrals-400)` | Placeholder color |
|
|
324
|
+
| `--input-focus-ring-color` | `var(--primary-100)` | Focus ring color |
|
|
325
|
+
| `--input-error-ring-color` | `var(--danger-100)` | Error ring color |
|
|
346
326
|
|
|
347
327
|
## Accessibility
|
|
348
328
|
|
|
@@ -365,4 +345,3 @@ Uses the same `--input-*` variables as VcInput for consistent styling across all
|
|
|
365
345
|
When placed inside a `VcBlade` with `loading=true`, the component automatically renders a skeleton placeholder matching its visual footprint — a label block (when the `label` prop is set) and an input-shaped block. No additional props or configuration needed.
|
|
366
346
|
|
|
367
347
|
This behavior is powered by `BladeLoadingKey` via Vue's provide/inject. The component injects the loading state from the nearest `VcBlade` ancestor.
|
|
368
|
-
|
|
@@ -10,6 +10,7 @@ A headless, accessible dropdown primitive for building menus and listboxes. Prov
|
|
|
10
10
|
- Notification panels or custom popovers with item lists
|
|
11
11
|
|
|
12
12
|
When NOT to use:
|
|
13
|
+
|
|
13
14
|
- For form field selection -- use [VcSelect](../vc-select/)
|
|
14
15
|
- For rich panel content with header/footer/scrollable body -- use [VcDropdownPanel](../vc-dropdown-panel/)
|
|
15
16
|
- For navigation menus -- use [VcMenu](../vc-menu/)
|
|
@@ -29,7 +30,10 @@ When NOT to use:
|
|
|
29
30
|
<VcButton @click="toggle">Actions</VcButton>
|
|
30
31
|
</template>
|
|
31
32
|
<template #item="{ item, click }">
|
|
32
|
-
<button
|
|
33
|
+
<button
|
|
34
|
+
class="tw-w-full tw-text-left tw-px-3 tw-py-2"
|
|
35
|
+
@click="click"
|
|
36
|
+
>
|
|
33
37
|
{{ item.title }}
|
|
34
38
|
</button>
|
|
35
39
|
</template>
|
|
@@ -60,14 +64,7 @@ function onAction(item: { id: string; title: string }) {
|
|
|
60
64
|
When `floating` is `true`, the dropdown panel is positioned using `@floating-ui` with automatic flip and shift middleware. The panel is teleported to the body to avoid z-index stacking context issues.
|
|
61
65
|
|
|
62
66
|
```vue
|
|
63
|
-
<VcDropdown
|
|
64
|
-
v-model="open"
|
|
65
|
-
:items="items"
|
|
66
|
-
floating
|
|
67
|
-
placement="bottom-start"
|
|
68
|
-
:offset="{ mainAxis: 4 }"
|
|
69
|
-
:z-index="10000"
|
|
70
|
-
>
|
|
67
|
+
<VcDropdown v-model="open" :items="items" floating placement="bottom-start" :offset="{ mainAxis: 4 }" :z-index="10000">
|
|
71
68
|
<template #trigger="{ toggle }">
|
|
72
69
|
<VcButton @click="toggle">Open</VcButton>
|
|
73
70
|
</template>
|
|
@@ -84,14 +81,7 @@ Available `placement` values follow Floating UI conventions: `"top"`, `"top-star
|
|
|
84
81
|
Build rich action menus by customizing the `#item` slot with icons, labels, and keyboard shortcut hints.
|
|
85
82
|
|
|
86
83
|
```vue
|
|
87
|
-
<VcDropdown
|
|
88
|
-
v-model="open"
|
|
89
|
-
:items="actions"
|
|
90
|
-
floating
|
|
91
|
-
placement="bottom-start"
|
|
92
|
-
close-on-select
|
|
93
|
-
@item-click="handleAction"
|
|
94
|
-
>
|
|
84
|
+
<VcDropdown v-model="open" :items="actions" floating placement="bottom-start" close-on-select @item-click="handleAction">
|
|
95
85
|
<template #trigger="{ toggle }">
|
|
96
86
|
<VcButton icon="lucide-ellipsis" @click="toggle" />
|
|
97
87
|
</template>
|
|
@@ -110,15 +100,7 @@ Build rich action menus by customizing the `#item` slot with icons, labels, and
|
|
|
110
100
|
Use `role="listbox"` for option-selection patterns. Combine with `isItemActive` to highlight the current selection and `aria-selected` is set automatically.
|
|
111
101
|
|
|
112
102
|
```vue
|
|
113
|
-
<VcDropdown
|
|
114
|
-
v-model="open"
|
|
115
|
-
:items="workspaces"
|
|
116
|
-
role="listbox"
|
|
117
|
-
:is-item-active="(item) => item.id === activeId"
|
|
118
|
-
close-on-select
|
|
119
|
-
floating
|
|
120
|
-
@item-click="(item) => (activeId = item.id)"
|
|
121
|
-
>
|
|
103
|
+
<VcDropdown v-model="open" :items="workspaces" role="listbox" :is-item-active="(item) => item.id === activeId" close-on-select floating @item-click="(item) => (activeId = item.id)">
|
|
122
104
|
<template #trigger="{ toggle }">
|
|
123
105
|
<VcButton variant="outline" @click="toggle">{{ currentWorkspace }}</VcButton>
|
|
124
106
|
</template>
|
|
@@ -136,14 +118,7 @@ Use `role="listbox"` for option-selection patterns. Combine with `isItemActive`
|
|
|
136
118
|
Fine-tune when the dropdown closes:
|
|
137
119
|
|
|
138
120
|
```vue
|
|
139
|
-
<VcDropdown
|
|
140
|
-
v-model="open"
|
|
141
|
-
:items="items"
|
|
142
|
-
floating
|
|
143
|
-
:close-on-click-outside="true"
|
|
144
|
-
:close-on-escape="true"
|
|
145
|
-
:close-on-select="false"
|
|
146
|
-
>
|
|
121
|
+
<VcDropdown v-model="open" :items="items" floating :close-on-click-outside="true" :close-on-escape="true" :close-on-select="false">
|
|
147
122
|
<!-- Multi-select pattern: dropdown stays open after each selection -->
|
|
148
123
|
</VcDropdown>
|
|
149
124
|
```
|
|
@@ -206,16 +181,40 @@ By default, `padded` is `true`, which adds compact padding and rounded item back
|
|
|
206
181
|
|
|
207
182
|
```vue
|
|
208
183
|
<template>
|
|
209
|
-
<VcDropdown
|
|
184
|
+
<VcDropdown
|
|
185
|
+
v-model="confirmOpen"
|
|
186
|
+
floating
|
|
187
|
+
placement="bottom-end"
|
|
188
|
+
:close-on-select="false"
|
|
189
|
+
>
|
|
210
190
|
<template #trigger="{ toggle }">
|
|
211
|
-
<VcButton
|
|
191
|
+
<VcButton
|
|
192
|
+
variant="danger"
|
|
193
|
+
@click="toggle"
|
|
194
|
+
>Delete</VcButton
|
|
195
|
+
>
|
|
212
196
|
</template>
|
|
213
197
|
<template #items-container="{ close }">
|
|
214
198
|
<div class="tw-p-4 tw-w-64">
|
|
215
199
|
<p class="tw-text-sm tw-mb-3">Are you sure you want to delete this item?</p>
|
|
216
200
|
<div class="tw-flex tw-gap-2 tw-justify-end">
|
|
217
|
-
<VcButton
|
|
218
|
-
|
|
201
|
+
<VcButton
|
|
202
|
+
size="s"
|
|
203
|
+
variant="outline"
|
|
204
|
+
@click="close"
|
|
205
|
+
>Cancel</VcButton
|
|
206
|
+
>
|
|
207
|
+
<VcButton
|
|
208
|
+
size="s"
|
|
209
|
+
variant="danger"
|
|
210
|
+
@click="
|
|
211
|
+
() => {
|
|
212
|
+
confirmDelete();
|
|
213
|
+
close();
|
|
214
|
+
}
|
|
215
|
+
"
|
|
216
|
+
>Delete</VcButton
|
|
217
|
+
>
|
|
219
218
|
</div>
|
|
220
219
|
</div>
|
|
221
220
|
</template>
|
|
@@ -227,9 +226,16 @@ By default, `padded` is `true`, which adds compact padding and rounded item back
|
|
|
227
226
|
|
|
228
227
|
```vue
|
|
229
228
|
<template>
|
|
230
|
-
<VcDropdown
|
|
229
|
+
<VcDropdown
|
|
230
|
+
v-model="isOpen"
|
|
231
|
+
:items="items"
|
|
232
|
+
floating
|
|
233
|
+
>
|
|
231
234
|
<template #trigger="{ open, close, isActive }">
|
|
232
|
-
<VcButton
|
|
235
|
+
<VcButton
|
|
236
|
+
@mouseenter="open"
|
|
237
|
+
@mouseleave="close"
|
|
238
|
+
>
|
|
233
239
|
{{ isActive ? "Hover to close" : "Hover to open" }}
|
|
234
240
|
</VcButton>
|
|
235
241
|
</template>
|
|
@@ -288,60 +294,60 @@ By default, `padded` is `true`, which adds compact padding and rounded item back
|
|
|
288
294
|
|
|
289
295
|
## Props
|
|
290
296
|
|
|
291
|
-
| Prop
|
|
292
|
-
|
|
293
|
-
| `modelValue`
|
|
294
|
-
| `items`
|
|
295
|
-
| `emptyText`
|
|
296
|
-
| `itemText`
|
|
297
|
-
| `isItemActive`
|
|
298
|
-
| `itemKey`
|
|
299
|
-
| `floating`
|
|
300
|
-
| `teleport`
|
|
301
|
-
| `teleportTo`
|
|
302
|
-
| `placement`
|
|
303
|
-
| `offset`
|
|
304
|
-
| `variant`
|
|
305
|
-
| `maxHeight`
|
|
306
|
-
| `role`
|
|
307
|
-
| `closeOnClickOutside` | `boolean`
|
|
308
|
-
| `closeOnEscape`
|
|
309
|
-
| `closeOnSelect`
|
|
310
|
-
| `autoFocusPanel`
|
|
311
|
-
| `padded`
|
|
312
|
-
| `zIndex`
|
|
297
|
+
| Prop | Type | Default | Description |
|
|
298
|
+
| --------------------- | ---------------------------------------------- | ------------------------------- | ------------------------------------------------------ |
|
|
299
|
+
| `modelValue` | `boolean` | `false` | Controls open/closed state via `v-model` |
|
|
300
|
+
| `items` | `T[]` | `[]` | Items to render in the dropdown |
|
|
301
|
+
| `emptyText` | `string` | `""` | Text shown when items array is empty |
|
|
302
|
+
| `itemText` | `(item: T) => string` | -- | Maps an item to display text (default renderer only) |
|
|
303
|
+
| `isItemActive` | `(item: T) => boolean` | -- | Marks the currently active item (highlighted state) |
|
|
304
|
+
| `itemKey` | `(item: T, index: number) => string \| number` | index | Unique key function for items |
|
|
305
|
+
| `floating` | `boolean` | `false` | Enable floating positioning via `@floating-ui` |
|
|
306
|
+
| `teleport` | `boolean` | -- | Force teleport to body (defaults to match `floating`) |
|
|
307
|
+
| `teleportTo` | `string \| HTMLElement` | -- | Custom teleport target |
|
|
308
|
+
| `placement` | `Placement` | `"bottom"` | Floating UI placement |
|
|
309
|
+
| `offset` | `{ mainAxis?: number; crossAxis?: number }` | `{ mainAxis: 0, crossAxis: 0 }` | Offset from the trigger element |
|
|
310
|
+
| `variant` | `"default" \| "secondary"` | `"default"` | Visual style variant |
|
|
311
|
+
| `maxHeight` | `number \| string` | `300` | Maximum panel height (number = px, string = CSS value) |
|
|
312
|
+
| `role` | `"menu" \| "listbox"` | `"menu"` | ARIA role for the dropdown panel |
|
|
313
|
+
| `closeOnClickOutside` | `boolean` | `true` | Close when clicking outside the dropdown |
|
|
314
|
+
| `closeOnEscape` | `boolean` | `true` | Close on Escape key press |
|
|
315
|
+
| `closeOnSelect` | `boolean` | `false` | Close after selecting an item |
|
|
316
|
+
| `autoFocusPanel` | `boolean` | `true` | Focus the panel element when opened |
|
|
317
|
+
| `padded` | `boolean` | `true` | Apply compact padding and rounded item backgrounds |
|
|
318
|
+
| `zIndex` | `number` | `10000` | Z-index for the floating panel |
|
|
313
319
|
|
|
314
320
|
## Events
|
|
315
321
|
|
|
316
|
-
| Event
|
|
317
|
-
|
|
318
|
-
| `update:modelValue` | `boolean`
|
|
319
|
-
| `item-click`
|
|
320
|
-
| `open`
|
|
321
|
-
| `close`
|
|
322
|
+
| Event | Payload | Description |
|
|
323
|
+
| ------------------- | ----------------------------------- | --------------------------- |
|
|
324
|
+
| `update:modelValue` | `boolean` | Open/close state changed |
|
|
325
|
+
| `item-click` | `T` | An item was selected |
|
|
326
|
+
| `open` | -- | Dropdown opened |
|
|
327
|
+
| `close` | `"outside" \| "escape" \| "action"` | Dropdown closed with reason |
|
|
322
328
|
|
|
323
329
|
## Slots
|
|
324
330
|
|
|
325
|
-
| Slot
|
|
326
|
-
|
|
327
|
-
| `trigger`
|
|
328
|
-
| `item`
|
|
329
|
-
| `empty`
|
|
330
|
-
| `items-container` | `{ items: T[], close: () => void }`
|
|
331
|
+
| Slot | Props | Description |
|
|
332
|
+
| ----------------- | -------------------------------------------------------------------------------- | --------------------------------- |
|
|
333
|
+
| `trigger` | `{ isActive: boolean, toggle: () => void, open: () => void, close: () => void }` | Custom trigger element |
|
|
334
|
+
| `item` | `{ item: T, click: () => void }` | Custom item rendering |
|
|
335
|
+
| `empty` | -- | Content when items array is empty |
|
|
336
|
+
| `items-container` | `{ items: T[], close: () => void }` | Full control over the items list |
|
|
331
337
|
|
|
332
338
|
## CSS Variables
|
|
333
339
|
|
|
334
|
-
| Variable
|
|
335
|
-
|
|
336
|
-
| `--vc-dropdown-bg`
|
|
337
|
-
| `--vc-dropdown-text`
|
|
338
|
-
| `--vc-dropdown-border`
|
|
339
|
-
| `--vc-dropdown-accent`
|
|
340
|
-
| `--vc-dropdown-accent-foreground`
|
|
341
|
-
| `--vc-dropdown-divider`
|
|
342
|
-
| `--vc-dropdown-trigger-focus-ring-width`
|
|
343
|
-
| `--vc-dropdown-trigger-focus-ring-offset` | `1px`
|
|
344
|
-
| `--vc-dropdown-trigger-focus-ring-color`
|
|
340
|
+
| Variable | Default | Description |
|
|
341
|
+
| ----------------------------------------- | ---------------------- | ---------------------------- |
|
|
342
|
+
| `--vc-dropdown-bg` | `var(--additional-50)` | Panel background color |
|
|
343
|
+
| `--vc-dropdown-text` | `var(--neutrals-950)` | Default text color |
|
|
344
|
+
| `--vc-dropdown-border` | `var(--neutrals-200)` | Floating panel border color |
|
|
345
|
+
| `--vc-dropdown-accent` | `var(--neutrals-100)` | Hover/focus background color |
|
|
346
|
+
| `--vc-dropdown-accent-foreground` | `var(--neutrals-900)` | Hover/focus text color |
|
|
347
|
+
| `--vc-dropdown-divider` | `var(--neutrals-200)` | Mobile item divider color |
|
|
348
|
+
| `--vc-dropdown-trigger-focus-ring-width` | `2px` | Trigger focus ring width |
|
|
349
|
+
| `--vc-dropdown-trigger-focus-ring-offset` | `1px` | Trigger focus ring offset |
|
|
350
|
+
| `--vc-dropdown-trigger-focus-ring-color` | `var(--primary-300)` | Trigger focus ring color |
|
|
345
351
|
|
|
346
352
|
## Accessibility
|
|
347
353
|
|