@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-input-dropdown/vc-input-dropdown.docs.md
CHANGED
|
@@ -76,11 +76,7 @@ const units = [
|
|
|
76
76
|
You can also pass functions for `optionValue` and `optionLabel` for more complex extraction logic:
|
|
77
77
|
|
|
78
78
|
```vue
|
|
79
|
-
<VcInputDropdown
|
|
80
|
-
:option-value="(opt) => opt.code"
|
|
81
|
-
:option-label="(opt) => `${opt.symbol} ${opt.name}`"
|
|
82
|
-
:options="currencies"
|
|
83
|
-
/>
|
|
79
|
+
<VcInputDropdown :option-value="(opt) => opt.code" :option-label="(opt) => `${opt.symbol} ${opt.name}`" :options="currencies" />
|
|
84
80
|
```
|
|
85
81
|
|
|
86
82
|
## Searchable Dropdown
|
|
@@ -88,14 +84,7 @@ You can also pass functions for `optionValue` and `optionLabel` for more complex
|
|
|
88
84
|
Enable filtering inside the dropdown with the `searchable` prop. This is useful when the options list is long:
|
|
89
85
|
|
|
90
86
|
```vue
|
|
91
|
-
<VcInputDropdown
|
|
92
|
-
v-model="value"
|
|
93
|
-
v-model:option="selected"
|
|
94
|
-
:options="allCountryCodes"
|
|
95
|
-
searchable
|
|
96
|
-
label="Phone Number"
|
|
97
|
-
input-type="tel"
|
|
98
|
-
/>
|
|
87
|
+
<VcInputDropdown v-model="value" v-model:option="selected" :options="allCountryCodes" searchable label="Phone Number" input-type="tel" />
|
|
99
88
|
```
|
|
100
89
|
|
|
101
90
|
## Input Types
|
|
@@ -127,13 +116,7 @@ VcInputDropdown inherits all standard form field states:
|
|
|
127
116
|
<VcInputDropdown v-model="val" v-model:option="opt" :options="opts" loading />
|
|
128
117
|
|
|
129
118
|
<!-- Error with message -->
|
|
130
|
-
<VcInputDropdown
|
|
131
|
-
v-model="val"
|
|
132
|
-
v-model:option="opt"
|
|
133
|
-
:options="opts"
|
|
134
|
-
error
|
|
135
|
-
error-message="This field is required"
|
|
136
|
-
/>
|
|
119
|
+
<VcInputDropdown v-model="val" v-model:option="opt" :options="opts" error error-message="This field is required" />
|
|
137
120
|
|
|
138
121
|
<!-- Required -->
|
|
139
122
|
<VcInputDropdown v-model="val" v-model:option="opt" :options="opts" required />
|
|
@@ -164,7 +147,11 @@ Replace the default dropdown toggle with a custom element using the `button` slo
|
|
|
164
147
|
```vue
|
|
165
148
|
<template>
|
|
166
149
|
<VcForm @submit="saveProduct">
|
|
167
|
-
<VcInput
|
|
150
|
+
<VcInput
|
|
151
|
+
v-model="product.name"
|
|
152
|
+
label="Product Name"
|
|
153
|
+
required
|
|
154
|
+
/>
|
|
168
155
|
<VcInputDropdown
|
|
169
156
|
v-model="product.weight"
|
|
170
157
|
v-model:option="product.weightUnit"
|
|
@@ -238,57 +225,57 @@ Replace the default dropdown toggle with a custom element using the `button` slo
|
|
|
238
225
|
|
|
239
226
|
## Props
|
|
240
227
|
|
|
241
|
-
| Prop
|
|
242
|
-
|
|
243
|
-
| `modelValue`
|
|
244
|
-
| `option`
|
|
245
|
-
| `options`
|
|
246
|
-
| `optionValue`
|
|
247
|
-
| `optionLabel`
|
|
248
|
-
| `inputType`
|
|
249
|
-
| `searchable`
|
|
250
|
-
| `debounce`
|
|
251
|
-
| `clearable`
|
|
252
|
-
| `prefix`
|
|
253
|
-
| `suffix`
|
|
254
|
-
| `maxlength`
|
|
255
|
-
| `label`
|
|
256
|
-
| `placeholder`
|
|
257
|
-
| `hint`
|
|
258
|
-
| `tooltip`
|
|
259
|
-
| `disabled`
|
|
260
|
-
| `required`
|
|
261
|
-
| `loading`
|
|
262
|
-
| `autofocus`
|
|
263
|
-
| `error`
|
|
264
|
-
| `errorMessage` | `string`
|
|
265
|
-
| `name`
|
|
228
|
+
| Prop | Type | Default | Description |
|
|
229
|
+
| -------------- | -------------------------------------------------------------------------------------------------------------------- | --------- | ------------------------------------------------------ |
|
|
230
|
+
| `modelValue` | `string \| number \| Date \| null` | -- | Input field value via `v-model` |
|
|
231
|
+
| `option` | `unknown` | -- | Selected dropdown option via `v-model:option` |
|
|
232
|
+
| `options` | `unknown[]` | `[]` | Available options for the dropdown |
|
|
233
|
+
| `optionValue` | `string \| ((opt: unknown) => unknown)` | `"id"` | Property name or function to extract the option value |
|
|
234
|
+
| `optionLabel` | `string \| ((opt: unknown) => string)` | `"title"` | Property name or function to extract the display label |
|
|
235
|
+
| `inputType` | `"text" \| "number" \| "email" \| "tel" \| "password" \| "url" \| "time" \| "date" \| "datetime-local" \| "integer"` | `"text"` | HTML input type |
|
|
236
|
+
| `searchable` | `boolean` | `false` | Enable search filtering in the dropdown |
|
|
237
|
+
| `debounce` | `string \| number` | `0` | Debounce delay (ms) for search input |
|
|
238
|
+
| `clearable` | `boolean` | `false` | Show a clear button on the input |
|
|
239
|
+
| `prefix` | `string` | -- | Static prefix text inside the input |
|
|
240
|
+
| `suffix` | `string` | -- | Static suffix text inside the input |
|
|
241
|
+
| `maxlength` | `string \| number` | `1024` | Maximum character length for the input |
|
|
242
|
+
| `label` | `string` | -- | Field label text |
|
|
243
|
+
| `placeholder` | `string` | -- | Input placeholder text |
|
|
244
|
+
| `hint` | `string` | -- | Hint text below the field |
|
|
245
|
+
| `tooltip` | `string` | -- | Tooltip on the label |
|
|
246
|
+
| `disabled` | `boolean` | `false` | Disable all interactions |
|
|
247
|
+
| `required` | `boolean` | `false` | Mark field as required (shows asterisk) |
|
|
248
|
+
| `loading` | `boolean` | `false` | Show loading spinner |
|
|
249
|
+
| `autofocus` | `boolean` | `false` | Auto-focus on mount |
|
|
250
|
+
| `error` | `boolean` | `false` | External error flag |
|
|
251
|
+
| `errorMessage` | `string` | -- | Error message (sets error state when truthy) |
|
|
252
|
+
| `name` | `string` | -- | HTML name attribute for the input |
|
|
266
253
|
|
|
267
254
|
## Events
|
|
268
255
|
|
|
269
|
-
| Event
|
|
270
|
-
|
|
271
|
-
| `update:modelValue` | `string \| number \| Date \| null` | Input value changed
|
|
272
|
-
| `update:option`
|
|
273
|
-
| `change`
|
|
274
|
-
| `blur`
|
|
256
|
+
| Event | Payload | Description |
|
|
257
|
+
| ------------------- | ---------------------------------- | -------------------------- |
|
|
258
|
+
| `update:modelValue` | `string \| number \| Date \| null` | Input value changed |
|
|
259
|
+
| `update:option` | `unknown` | Dropdown selection changed |
|
|
260
|
+
| `change` | `unknown` | Generic change event |
|
|
261
|
+
| `blur` | `Event` | Input lost focus |
|
|
275
262
|
|
|
276
263
|
## Slots
|
|
277
264
|
|
|
278
|
-
| Slot
|
|
279
|
-
|
|
280
|
-
| `button`
|
|
281
|
-
| `control`
|
|
282
|
-
| `option`
|
|
283
|
-
| `prepend`
|
|
284
|
-
| `append`
|
|
285
|
-
| `prepend-inner` | --
|
|
286
|
-
| `append-inner`
|
|
265
|
+
| Slot | Scope | Description |
|
|
266
|
+
| --------------- | ------------------------------------------------- | ------------------------------------------ |
|
|
267
|
+
| `button` | `{ toggleHandler: () => void }` | Replace the dropdown toggle button |
|
|
268
|
+
| `control` | `{ placeholder, focused, modelValue, emitValue }` | Replace the entire input element |
|
|
269
|
+
| `option` | `{ index, opt, selected, toggleOption }` | Custom rendering for each dropdown option |
|
|
270
|
+
| `prepend` | -- | Content before the field (outside) |
|
|
271
|
+
| `append` | -- | Content after the field (outside) |
|
|
272
|
+
| `prepend-inner` | -- | Content inside the field, before the input |
|
|
273
|
+
| `append-inner` | -- | Content inside the field, after the input |
|
|
287
274
|
|
|
288
275
|
## CSS Variables
|
|
289
276
|
|
|
290
|
-
| Variable
|
|
291
|
-
|
|
277
|
+
| Variable | Default | Description |
|
|
278
|
+
| ------------------------------- | -------------------- | --------------------------------------------------------- |
|
|
292
279
|
| `--input-dropdown-toggle-color` | `var(--primary-500)` | Color of the dropdown toggle button text and chevron icon |
|
|
293
280
|
|
|
294
281
|
> **Note:** VcInputDropdown inherits all CSS variables from [VcInput](../vc-input/) for input styling and from [VcSelect](../vc-select/) for dropdown styling.
|
|
@@ -311,4 +298,3 @@ Replace the default dropdown toggle with a custom element using the `button` slo
|
|
|
311
298
|
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.
|
|
312
299
|
|
|
313
300
|
This behavior is powered by `BladeLoadingKey` via Vue's provide/inject. The component injects the loading state from the nearest `VcBlade` ancestor.
|
|
314
|
-
|
package/runtime/knowledge/docs/ui/components/molecules/vc-input-group/vc-input-group.docs.md
CHANGED
|
@@ -14,9 +14,18 @@ A semantic `<fieldset>` wrapper that groups related form controls under a shared
|
|
|
14
14
|
|
|
15
15
|
```vue
|
|
16
16
|
<template>
|
|
17
|
-
<VcInputGroup
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
<VcInputGroup
|
|
18
|
+
label="Customer profile"
|
|
19
|
+
hint="All fields in this section are related"
|
|
20
|
+
>
|
|
21
|
+
<VcInput
|
|
22
|
+
v-model="firstName"
|
|
23
|
+
label="First name"
|
|
24
|
+
/>
|
|
25
|
+
<VcInput
|
|
26
|
+
v-model="lastName"
|
|
27
|
+
label="Last name"
|
|
28
|
+
/>
|
|
20
29
|
</VcInputGroup>
|
|
21
30
|
</template>
|
|
22
31
|
|
|
@@ -31,17 +40,17 @@ const lastName = ref("");
|
|
|
31
40
|
|
|
32
41
|
## Key Props
|
|
33
42
|
|
|
34
|
-
| Prop
|
|
35
|
-
|
|
36
|
-
| `label`
|
|
37
|
-
| `tooltip`
|
|
38
|
-
| `hint`
|
|
39
|
-
| `orientation`
|
|
40
|
-
| `role`
|
|
41
|
-
| `disabled`
|
|
42
|
-
| `error` / `errorMessage` | `boolean` / `string`
|
|
43
|
-
| `required`
|
|
44
|
-
| `name`
|
|
43
|
+
| Prop | Type | Default | Description |
|
|
44
|
+
| ------------------------ | ---------------------------- | ------------ | ------------------------------------------ |
|
|
45
|
+
| `label` | `string` | -- | Group label rendered as a `<legend>` |
|
|
46
|
+
| `tooltip` | `string` | -- | Tooltip on the label's info icon |
|
|
47
|
+
| `hint` | `string` | -- | Helper text below the group |
|
|
48
|
+
| `orientation` | `"vertical" \| "horizontal"` | `"vertical"` | Layout direction for child controls |
|
|
49
|
+
| `role` | `"group" \| "radiogroup"` | `"group"` | ARIA role for the fieldset |
|
|
50
|
+
| `disabled` | `boolean` | `false` | Disables all controls in the group |
|
|
51
|
+
| `error` / `errorMessage` | `boolean` / `string` | -- | Group-level error styling and message |
|
|
52
|
+
| `required` | `boolean` | `false` | Shows required indicator on the label |
|
|
53
|
+
| `name` | `string` | -- | Shared `name` propagated to child controls |
|
|
45
54
|
|
|
46
55
|
## Common Patterns
|
|
47
56
|
|
|
@@ -58,11 +67,7 @@ const lastName = ref("");
|
|
|
58
67
|
### Checkbox Group with Error
|
|
59
68
|
|
|
60
69
|
```vue
|
|
61
|
-
<VcInputGroup
|
|
62
|
-
label="Features"
|
|
63
|
-
:error="selectedFeatures.length === 0"
|
|
64
|
-
error-message="Select at least one feature"
|
|
65
|
-
>
|
|
70
|
+
<VcInputGroup label="Features" :error="selectedFeatures.length === 0" error-message="Select at least one feature">
|
|
66
71
|
<VcCheckbox v-model="selectedFeatures" value="search">Search</VcCheckbox>
|
|
67
72
|
<VcCheckbox v-model="selectedFeatures" value="filters">Filters</VcCheckbox>
|
|
68
73
|
<VcCheckbox v-model="selectedFeatures" value="export">Export</VcCheckbox>
|
|
@@ -80,11 +85,11 @@ const lastName = ref("");
|
|
|
80
85
|
|
|
81
86
|
## Slots
|
|
82
87
|
|
|
83
|
-
| Slot
|
|
84
|
-
|
|
85
|
-
| `default` | The grouped form controls
|
|
86
|
-
| `error`
|
|
87
|
-
| `hint`
|
|
88
|
+
| Slot | Description |
|
|
89
|
+
| --------- | --------------------------- |
|
|
90
|
+
| `default` | The grouped form controls |
|
|
91
|
+
| `error` | Custom error message markup |
|
|
92
|
+
| `hint` | Custom hint text markup |
|
|
88
93
|
|
|
89
94
|
## Accessibility
|
|
90
95
|
|
|
@@ -20,11 +20,27 @@ Compositional navigation menu component for building sidebar navigation with sec
|
|
|
20
20
|
:active="currentRoute === '/dashboard'"
|
|
21
21
|
@click="navigate('/dashboard')"
|
|
22
22
|
/>
|
|
23
|
-
<VcMenuGroup
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
<VcMenuGroup
|
|
24
|
+
group-id="catalog"
|
|
25
|
+
icon="lucide-box"
|
|
26
|
+
title="Catalog"
|
|
27
|
+
>
|
|
28
|
+
<VcMenuItem
|
|
29
|
+
title="Products"
|
|
30
|
+
nested
|
|
31
|
+
@click="navigate('/products')"
|
|
32
|
+
/>
|
|
33
|
+
<VcMenuItem
|
|
34
|
+
title="Categories"
|
|
35
|
+
nested
|
|
36
|
+
@click="navigate('/categories')"
|
|
37
|
+
/>
|
|
26
38
|
</VcMenuGroup>
|
|
27
|
-
<VcMenuItem
|
|
39
|
+
<VcMenuItem
|
|
40
|
+
icon="lucide-settings"
|
|
41
|
+
title="Settings"
|
|
42
|
+
@click="navigate('/settings')"
|
|
43
|
+
/>
|
|
28
44
|
</VcMenu>
|
|
29
45
|
</template>
|
|
30
46
|
|
|
@@ -35,15 +51,15 @@ import { VcMenu, VcMenuItem, VcMenuGroup } from "@vc-shell/framework";
|
|
|
35
51
|
|
|
36
52
|
## Key Props
|
|
37
53
|
|
|
38
|
-
| Prop
|
|
39
|
-
|
|
40
|
-
| `expanded` | `boolean` | `true`
|
|
41
|
-
| `loading`
|
|
54
|
+
| Prop | Type | Default | Description |
|
|
55
|
+
| ---------- | --------- | ------- | --------------------------------------------------------- |
|
|
56
|
+
| `expanded` | `boolean` | `true` | Show full menu (titles visible) or collapsed (icons only) |
|
|
57
|
+
| `loading` | `boolean` | `false` | Show skeleton loading placeholders instead of content |
|
|
42
58
|
|
|
43
59
|
## Slots
|
|
44
60
|
|
|
45
|
-
| Slot
|
|
46
|
-
|
|
61
|
+
| Slot | Description |
|
|
62
|
+
| --------- | ---------------------------------------- |
|
|
47
63
|
| `default` | Menu items (`VcMenuItem`, `VcMenuGroup`) |
|
|
48
64
|
|
|
49
65
|
## Common Patterns
|
|
@@ -70,21 +86,9 @@ import { VcMenu, VcMenuItem, VcMenuGroup } from "@vc-shell/framework";
|
|
|
70
86
|
### Items with Badges
|
|
71
87
|
|
|
72
88
|
```vue
|
|
73
|
-
<VcMenuItem
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
:badge="{ content: 5, variant: 'primary' }"
|
|
77
|
-
/>
|
|
78
|
-
<VcMenuItem
|
|
79
|
-
icon="lucide-alert-triangle"
|
|
80
|
-
title="Returns"
|
|
81
|
-
:badge="{ content: 99, variant: 'danger' }"
|
|
82
|
-
/>
|
|
83
|
-
<VcMenuItem
|
|
84
|
-
icon="lucide-bell"
|
|
85
|
-
title="Notifications"
|
|
86
|
-
:badge="{ isDot: true, variant: 'warning' }"
|
|
87
|
-
/>
|
|
89
|
+
<VcMenuItem icon="lucide-shopping-cart" title="New Orders" :badge="{ content: 5, variant: 'primary' }" />
|
|
90
|
+
<VcMenuItem icon="lucide-alert-triangle" title="Returns" :badge="{ content: 99, variant: 'danger' }" />
|
|
91
|
+
<VcMenuItem icon="lucide-bell" title="Notifications" :badge="{ isDot: true, variant: 'warning' }" />
|
|
88
92
|
```
|
|
89
93
|
|
|
90
94
|
### Collapsed State
|
|
@@ -93,9 +97,9 @@ When `expanded` is `false`, the menu shows only icons and letter abbreviations.
|
|
|
93
97
|
|
|
94
98
|
## CSS Variables
|
|
95
99
|
|
|
96
|
-
| Variable
|
|
97
|
-
|
|
98
|
-
| `--vc-menu-gap` | `2px`
|
|
100
|
+
| Variable | Default | Description |
|
|
101
|
+
| --------------- | ------- | ---------------------- |
|
|
102
|
+
| `--vc-menu-gap` | `2px` | Gap between menu items |
|
|
99
103
|
|
|
100
104
|
## Accessibility
|
|
101
105
|
|
|
@@ -10,6 +10,7 @@ A multi-value input component for collecting multiple entries as chips/tags. Sup
|
|
|
10
10
|
- Building tokenized inputs where each value is displayed as a removable chip
|
|
11
11
|
|
|
12
12
|
When NOT to use:
|
|
13
|
+
|
|
13
14
|
- Selecting from a list without manual entry -- use [VcSelect](../vc-select/) with `multiple`
|
|
14
15
|
- Single value entry -- use [VcInput](../vc-input/)
|
|
15
16
|
- Rich text content -- use [VcEditor](../vc-editor/)
|
|
@@ -18,7 +19,11 @@ When NOT to use:
|
|
|
18
19
|
|
|
19
20
|
```vue
|
|
20
21
|
<template>
|
|
21
|
-
<VcMultivalue
|
|
22
|
+
<VcMultivalue
|
|
23
|
+
v-model="tags"
|
|
24
|
+
label="Tags"
|
|
25
|
+
placeholder="Type and press Enter"
|
|
26
|
+
/>
|
|
22
27
|
</template>
|
|
23
28
|
|
|
24
29
|
<script setup lang="ts">
|
|
@@ -126,22 +131,10 @@ const form = reactive({
|
|
|
126
131
|
|
|
127
132
|
```vue
|
|
128
133
|
<!-- Show spinner while fetching options -->
|
|
129
|
-
<VcMultivalue
|
|
130
|
-
v-model="selected"
|
|
131
|
-
:options="options"
|
|
132
|
-
multivalue
|
|
133
|
-
:loading="isLoading"
|
|
134
|
-
label="Async options"
|
|
135
|
-
/>
|
|
134
|
+
<VcMultivalue v-model="selected" :options="options" multivalue :loading="isLoading" label="Async options" />
|
|
136
135
|
|
|
137
136
|
<!-- Allow clearing all selected values at once -->
|
|
138
|
-
<VcMultivalue
|
|
139
|
-
v-model="selected"
|
|
140
|
-
:options="options"
|
|
141
|
-
multivalue
|
|
142
|
-
clearable
|
|
143
|
-
label="Clearable selection"
|
|
144
|
-
/>
|
|
137
|
+
<VcMultivalue v-model="selected" :options="options" multivalue clearable label="Clearable selection" />
|
|
145
138
|
```
|
|
146
139
|
|
|
147
140
|
### Custom Rendering with Slots
|
|
@@ -265,66 +258,66 @@ const selectedArray = ref([{ id: "1", title: "Option 1" }]);
|
|
|
265
258
|
|
|
266
259
|
## Props
|
|
267
260
|
|
|
268
|
-
| Prop
|
|
269
|
-
|
|
270
|
-
| `modelValue`
|
|
271
|
-
| `type`
|
|
272
|
-
| `options`
|
|
273
|
-
| `optionValue`
|
|
274
|
-
| `optionLabel`
|
|
275
|
-
| `multivalue`
|
|
276
|
-
| `clearable`
|
|
277
|
-
| `loading`
|
|
278
|
-
| `placeholder`
|
|
279
|
-
| `label`
|
|
280
|
-
| `tooltip`
|
|
281
|
-
| `hint`
|
|
282
|
-
| `disabled`
|
|
283
|
-
| `required`
|
|
284
|
-
| `name`
|
|
285
|
-
| `error`
|
|
286
|
-
| `errorMessage`
|
|
287
|
-
| `multilanguage`
|
|
288
|
-
| `currentLanguage` | `string`
|
|
261
|
+
| Prop | Type | Default | Description |
|
|
262
|
+
| ----------------- | -------------------------------------------------------------------------- | --------- | ------------------------------------------------------ |
|
|
263
|
+
| `modelValue` | `T[]` | `[]` | Array of selected values via `v-model` |
|
|
264
|
+
| `type` | `"text" \| "number" \| "integer" \| "date" \| "datetime-local" \| "color"` | `"text"` | Input type for manual entry |
|
|
265
|
+
| `options` | `T[]` | `[]` | Predefined options for dictionary mode |
|
|
266
|
+
| `optionValue` | `string` | `"id"` | Property name used as the option's unique key |
|
|
267
|
+
| `optionLabel` | `string` | `"title"` | Property name used as the option's display text |
|
|
268
|
+
| `multivalue` | `boolean` | `false` | Enables dictionary mode with dropdown |
|
|
269
|
+
| `clearable` | `boolean` | `false` | Shows a clear-all button when values are selected |
|
|
270
|
+
| `loading` | `boolean` | `false` | Shows a loading spinner in the field |
|
|
271
|
+
| `placeholder` | `string` | -- | Input placeholder text |
|
|
272
|
+
| `label` | `string` | -- | Label text above the field |
|
|
273
|
+
| `tooltip` | `string` | -- | Tooltip shown on label hover |
|
|
274
|
+
| `hint` | `string` | -- | Helper text displayed below the field |
|
|
275
|
+
| `disabled` | `boolean` | `false` | Disables the entire field |
|
|
276
|
+
| `required` | `boolean` | `false` | Shows a required asterisk on the label |
|
|
277
|
+
| `name` | `string` | `"Field"` | Form field name attribute |
|
|
278
|
+
| `error` | `boolean` | `false` | External error flag for styling |
|
|
279
|
+
| `errorMessage` | `string` | -- | Error message text (also sets error state when truthy) |
|
|
280
|
+
| `multilanguage` | `boolean` | `false` | Enables multilanguage indicator on the label |
|
|
281
|
+
| `currentLanguage` | `string` | -- | Current language code for multilanguage mode |
|
|
289
282
|
|
|
290
283
|
## Events
|
|
291
284
|
|
|
292
|
-
| Event
|
|
293
|
-
|
|
294
|
-
| `update:model-value` | `T[]`
|
|
295
|
-
| `close`
|
|
296
|
-
| `search`
|
|
285
|
+
| Event | Payload | Description |
|
|
286
|
+
| -------------------- | -------- | -------------------------------------------------------- |
|
|
287
|
+
| `update:model-value` | `T[]` | Emitted when the selected values change |
|
|
288
|
+
| `close` | -- | Emitted when the dropdown closes |
|
|
289
|
+
| `search` | `string` | Emitted when the user types in the dropdown search field |
|
|
297
290
|
|
|
298
291
|
## Slots
|
|
299
292
|
|
|
300
|
-
| Slot
|
|
301
|
-
|
|
302
|
-
| `option`
|
|
303
|
-
| `selected-item` | `{ value: string \| number, item: T, index: number, remove: () => void }` | Custom rendering for selected value chips
|
|
304
|
-
| `prepend`
|
|
305
|
-
| `append`
|
|
306
|
-
| `error`
|
|
307
|
-
| `hint`
|
|
293
|
+
| Slot | Scope | Description |
|
|
294
|
+
| --------------- | ------------------------------------------------------------------------- | ---------------------------------------------------------- |
|
|
295
|
+
| `option` | `{ item: T, index: number }` | Custom rendering for dropdown options (dictionary mode) |
|
|
296
|
+
| `selected-item` | `{ value: string \| number, item: T, index: number, remove: () => void }` | Custom rendering for selected value chips |
|
|
297
|
+
| `prepend` | -- | Content rendered before the field area (inside the border) |
|
|
298
|
+
| `append` | -- | Content rendered after the field area (inside the border) |
|
|
299
|
+
| `error` | -- | Custom error message markup (replaces default VcHint) |
|
|
300
|
+
| `hint` | -- | Custom hint markup (replaces default VcHint) |
|
|
308
301
|
|
|
309
302
|
## CSS Variables
|
|
310
303
|
|
|
311
304
|
The component uses `--multivalue-*` variables that fall back to `--select-*` tokens for visual consistency with VcSelect.
|
|
312
305
|
|
|
313
|
-
| Variable
|
|
314
|
-
|
|
315
|
-
| `--multivalue-height`
|
|
316
|
-
| `--multivalue-border-radius`
|
|
317
|
-
| `--multivalue-border-color`
|
|
318
|
-
| `--multivalue-background-color`
|
|
319
|
-
| `--multivalue-text-color`
|
|
320
|
-
| `--multivalue-chip-background-color` | `var(--select-multiple-options-background-color, var(--neutrals-100))` | Chip background
|
|
321
|
-
| `--multivalue-chip-border-color`
|
|
322
|
-
| `--multivalue-border-color-focus`
|
|
323
|
-
| `--multivalue-focus-ring-color`
|
|
324
|
-
| `--multivalue-border-color-error`
|
|
325
|
-
| `--multivalue-error-ring-color`
|
|
326
|
-
| `--multivalue-disabled-text-color`
|
|
327
|
-
| `--multivalue-loading-color`
|
|
306
|
+
| Variable | Default | Description |
|
|
307
|
+
| ------------------------------------ | ---------------------------------------------------------------------- | --------------------------------- |
|
|
308
|
+
| `--multivalue-height` | `36px` | Minimum height of the input field |
|
|
309
|
+
| `--multivalue-border-radius` | `var(--select-border-radius, 6px)` | Border radius |
|
|
310
|
+
| `--multivalue-border-color` | `var(--select-border-color, var(--neutrals-300))` | Default border color |
|
|
311
|
+
| `--multivalue-background-color` | `var(--select-background-color, transparent)` | Field background |
|
|
312
|
+
| `--multivalue-text-color` | `var(--select-text-color, var(--neutrals-800))` | Field text color |
|
|
313
|
+
| `--multivalue-chip-background-color` | `var(--select-multiple-options-background-color, var(--neutrals-100))` | Chip background |
|
|
314
|
+
| `--multivalue-chip-border-color` | `var(--select-multiple-options-border-color, var(--neutrals-200))` | Chip border |
|
|
315
|
+
| `--multivalue-border-color-focus` | `var(--select-border-color-focus, var(--primary-500))` | Border color on focus |
|
|
316
|
+
| `--multivalue-focus-ring-color` | `var(--select-focus-ring-color, var(--primary-100))` | Focus ring color |
|
|
317
|
+
| `--multivalue-border-color-error` | `var(--select-border-color-error, var(--danger-500))` | Border on error |
|
|
318
|
+
| `--multivalue-error-ring-color` | `var(--select-error-ring-color, var(--danger-100))` | Error ring color |
|
|
319
|
+
| `--multivalue-disabled-text-color` | `var(--neutrals-500)` | Disabled text color |
|
|
320
|
+
| `--multivalue-loading-color` | `var(--select-loading-color, var(--info-500))` | Loading spinner color |
|
|
328
321
|
|
|
329
322
|
## Accessibility
|
|
330
323
|
|
|
@@ -351,4 +344,3 @@ The component uses `--multivalue-*` variables that fall back to `--select-*` tok
|
|
|
351
344
|
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.
|
|
352
345
|
|
|
353
346
|
This behavior is powered by `BladeLoadingKey` via Vue's provide/inject. The component injects the loading state from the nearest `VcBlade` ancestor.
|
|
354
|
-
|
|
@@ -71,7 +71,10 @@ The most common use case is paginating a data table:
|
|
|
71
71
|
|
|
72
72
|
```vue
|
|
73
73
|
<template>
|
|
74
|
-
<VcDataTable
|
|
74
|
+
<VcDataTable
|
|
75
|
+
:items="pagedItems"
|
|
76
|
+
:columns="columns"
|
|
77
|
+
/>
|
|
75
78
|
<VcPagination
|
|
76
79
|
:pages="Math.ceil(totalItems / pageSize)"
|
|
77
80
|
:current-page="currentPage"
|
|
@@ -143,8 +146,7 @@ Combine VcPagination with a page-size dropdown for a complete pagination toolbar
|
|
|
143
146
|
/>
|
|
144
147
|
<span class="tw-text-sm tw-text-gray-500">
|
|
145
148
|
{{ (currentPage - 1) * pageSize + 1 }}
|
|
146
|
-
- {{ Math.min(currentPage * pageSize, totalItems) }}
|
|
147
|
-
of {{ totalItems }}
|
|
149
|
+
- {{ Math.min(currentPage * pageSize, totalItems) }} of {{ totalItems }}
|
|
148
150
|
</span>
|
|
149
151
|
</div>
|
|
150
152
|
</template>
|
|
@@ -243,36 +245,36 @@ currentPage.value = Math.min(currentPage.value, totalPages.value);
|
|
|
243
245
|
|
|
244
246
|
## Props
|
|
245
247
|
|
|
246
|
-
| Prop
|
|
247
|
-
|
|
248
|
-
| `pages`
|
|
249
|
-
| `currentPage`
|
|
250
|
-
| `maxPages`
|
|
251
|
-
| `showFirstLast` | `boolean`
|
|
252
|
-
| `variant`
|
|
248
|
+
| Prop | Type | Default | Description |
|
|
249
|
+
| --------------- | ------------------------ | ----------- | ---------------------------------------------------------------------- |
|
|
250
|
+
| `pages` | `number` | `1` | Total number of pages |
|
|
251
|
+
| `currentPage` | `number` | `1` | Currently active page (1-based) |
|
|
252
|
+
| `maxPages` | `number` | -- | Override visible page button count. Default: 3 on mobile, 5 on desktop |
|
|
253
|
+
| `showFirstLast` | `boolean` | `true` | Show first/last page navigation buttons |
|
|
254
|
+
| `variant` | `"default" \| "minimal"` | `"default"` | Visual style variant |
|
|
253
255
|
|
|
254
256
|
## Events
|
|
255
257
|
|
|
256
|
-
| Event
|
|
257
|
-
|
|
258
|
+
| Event | Payload | Description |
|
|
259
|
+
| ----------- | -------- | --------------------------------------------------------------------------- |
|
|
258
260
|
| `itemClick` | `number` | Emitted when any page button is clicked. Payload is the 1-based page number |
|
|
259
261
|
|
|
260
262
|
## CSS Variables
|
|
261
263
|
|
|
262
|
-
| Variable
|
|
263
|
-
|
|
264
|
-
| `--pagination-item-width`
|
|
265
|
-
| `--pagination-item-height`
|
|
266
|
-
| `--pagination-item-color`
|
|
267
|
-
| `--pagination-item-color-hover`
|
|
268
|
-
| `--pagination-item-color-current`
|
|
269
|
-
| `--pagination-item-background-color`
|
|
270
|
-
| `--pagination-item-background-color-hover`
|
|
271
|
-
| `--pagination-item-background-color-current`
|
|
272
|
-
| `--pagination-item-color-disabled`
|
|
273
|
-
| `--pagination-item-background-color-disabled` | `var(--neutrals-100)`
|
|
274
|
-
| `--pagination-item-border-color`
|
|
275
|
-
| `--pagination-focus-ring-color`
|
|
264
|
+
| Variable | Default | Description |
|
|
265
|
+
| --------------------------------------------- | ---------------------- | ---------------------------------------- |
|
|
266
|
+
| `--pagination-item-width` | `29px` | Width of each page button |
|
|
267
|
+
| `--pagination-item-height` | `29px` | Height of each page button |
|
|
268
|
+
| `--pagination-item-color` | `var(--neutrals-500)` | Default text color |
|
|
269
|
+
| `--pagination-item-color-hover` | `var(--primary-500)` | Hover text color |
|
|
270
|
+
| `--pagination-item-color-current` | `var(--additional-50)` | Current page text color |
|
|
271
|
+
| `--pagination-item-background-color` | `var(--additional-50)` | Default background |
|
|
272
|
+
| `--pagination-item-background-color-hover` | `var(--primary-100)` | Hover background |
|
|
273
|
+
| `--pagination-item-background-color-current` | `var(--primary-500)` | Current page background |
|
|
274
|
+
| `--pagination-item-color-disabled` | `var(--neutrals-400)` | Disabled button text color |
|
|
275
|
+
| `--pagination-item-background-color-disabled` | `var(--neutrals-100)` | Disabled button background |
|
|
276
|
+
| `--pagination-item-border-color` | `var(--secondary-100)` | Default border color |
|
|
277
|
+
| `--pagination-focus-ring-color` | `var(--primary-100)` | Focus ring color for keyboard navigation |
|
|
276
278
|
|
|
277
279
|
## Accessibility
|
|
278
280
|
|