@vc-shell/vc-app-skill 2.0.3-pr227.0c4f2c3 → 2.0.4-pr228.1e79eae
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 +4 -0
- package/package.json +1 -1
- package/runtime/VERSION +1 -1
- package/runtime/knowledge/docs/_BUILD_HASH.md +1 -1
- package/runtime/knowledge/docs/core/api/platform.docs.md +7 -0
- package/runtime/knowledge/docs/core/blade-navigation/blade-nav-composables.docs.md +20 -4
- package/runtime/knowledge/docs/core/composables/bladeContext/index.docs.md +15 -3
- package/runtime/knowledge/docs/core/composables/useApiClient/useApiClient.docs.md +13 -4
- package/runtime/knowledge/docs/core/composables/useAppBarMobileButtons/useAppBarMobileButtons.docs.md +10 -0
- package/runtime/knowledge/docs/core/composables/useAppBarWidget/useAppBarWidget.docs.md +6 -0
- package/runtime/knowledge/docs/core/composables/useAppInsights/useAppInsights.docs.md +6 -0
- package/runtime/knowledge/docs/core/composables/useAssets/useAssets.docs.md +8 -1
- package/runtime/knowledge/docs/core/composables/useAssetsManager/useAssetsManager.docs.md +15 -4
- package/runtime/knowledge/docs/core/composables/useAsync/useAsync.docs.md +13 -0
- package/runtime/knowledge/docs/core/composables/useBeforeUnload/useBeforeUnload.docs.md +6 -0
- package/runtime/knowledge/docs/core/composables/useBlade/useBlade.docs.md +13 -0
- package/runtime/knowledge/docs/core/composables/useBladeForm/useBladeForm.docs.md +12 -2
- package/runtime/knowledge/docs/core/composables/useBladeRegistry/useBladeRegistry.docs.md +14 -4
- package/runtime/knowledge/docs/core/composables/useBladeWidgets/index.docs.md +23 -9
- package/runtime/knowledge/docs/core/composables/useBreadcrumbs/useBreadcrumbs.docs.md +6 -0
- package/runtime/knowledge/docs/core/composables/useConnectionStatus/useConnectionStatus.docs.md +10 -0
- package/runtime/knowledge/docs/core/composables/useDashboard/useDashboard.docs.md +9 -0
- package/runtime/knowledge/docs/core/composables/useDynamicProperties/useDynamicProperties.docs.md +6 -0
- package/runtime/knowledge/docs/core/composables/useErrorHandler/useErrorHandler.docs.md +6 -0
- package/runtime/knowledge/docs/core/composables/useFunctions/useFunctions.docs.md +6 -0
- package/runtime/knowledge/docs/core/composables/useKeyboardNavigation/useKeyboardNavigation.docs.md +10 -0
- package/runtime/knowledge/docs/core/composables/useLanguages/useLanguages.docs.md +6 -0
- package/runtime/knowledge/docs/core/composables/useLoading/useLoading.docs.md +10 -0
- package/runtime/knowledge/docs/core/composables/useMenuExpanded/index.docs.md +10 -0
- package/runtime/knowledge/docs/core/composables/useMenuService/useMenuService.docs.md +9 -0
- package/runtime/knowledge/docs/core/composables/useModificationTracker/useModificationTracker.docs.md +6 -0
- package/runtime/knowledge/docs/core/composables/useNotifications/useNotifications.docs.md +6 -0
- package/runtime/knowledge/docs/core/composables/usePermissions/usePermissions.docs.md +9 -0
- package/runtime/knowledge/docs/core/composables/usePopup/usePopup.docs.md +9 -0
- package/runtime/knowledge/docs/core/composables/useResponsive/useResponsive.docs.md +10 -0
- package/runtime/knowledge/docs/core/composables/useSettings/useSettings.docs.md +6 -0
- package/runtime/knowledge/docs/core/composables/useSettingsMenu/useSettingsMenu.docs.md +6 -0
- package/runtime/knowledge/docs/core/composables/useSidebarState/useSidebarState.docs.md +10 -0
- package/runtime/knowledge/docs/core/composables/useSlowNetworkDetection/useSlowNetworkDetection.docs.md +9 -0
- package/runtime/knowledge/docs/core/composables/useTheme/useTheme.docs.md +9 -0
- package/runtime/knowledge/docs/core/composables/useToolbar/useToolbar.docs.md +9 -0
- package/runtime/knowledge/docs/core/composables/useUser/useUser.docs.md +6 -0
- package/runtime/knowledge/docs/core/composables/useUserManagement/useUserManagement.docs.md +7 -0
- package/runtime/knowledge/docs/core/composables/useWebVitals/useWebVitals.docs.md +6 -0
- package/runtime/knowledge/docs/core/composables/useWidgets/useWidgets.docs.md +10 -0
- package/runtime/knowledge/docs/core/directives/autofocus/autofocus.docs.md +7 -0
- package/runtime/knowledge/docs/core/directives/loading/loading.docs.md +7 -0
- package/runtime/knowledge/docs/core/notifications/notifications.docs.md +21 -0
- package/runtime/knowledge/docs/core/plugins/ai-agent/ai-agent.docs.md +7 -0
- package/runtime/knowledge/docs/core/plugins/extension-points/extension-points.docs.md +10 -0
- package/runtime/knowledge/docs/core/plugins/global-error-handler/global-error-handler.docs.md +7 -0
- package/runtime/knowledge/docs/core/plugins/i18n/i18n.docs.md +10 -0
- package/runtime/knowledge/docs/core/plugins/modularity/modularity.docs.md +10 -0
- package/runtime/knowledge/docs/core/plugins/permissions/permissions.docs.md +8 -1
- package/runtime/knowledge/docs/core/plugins/signalR/signalR.docs.md +7 -0
- package/runtime/knowledge/docs/core/plugins/validation/validation.docs.md +10 -0
- package/runtime/knowledge/docs/core/services/services.docs.md +16 -1
- package/runtime/knowledge/docs/core/types/types.docs.md +7 -0
- package/runtime/knowledge/docs/core/utilities/date/date-utilities.docs.md +7 -0
- package/runtime/knowledge/docs/core/utilities/shared-utilities.docs.md +7 -0
- package/runtime/knowledge/docs/core/utilities/thumbnail/thumbnail.docs.md +7 -0
- package/runtime/knowledge/docs/core/utilities/utilities.docs.md +7 -0
- package/runtime/knowledge/docs/injection-keys.docs.md +11 -0
- package/runtime/knowledge/docs/modules/assets-manager/assets-manager.docs.md +89 -12
- package/runtime/knowledge/docs/shell/_internal/popup/common/popup-common.docs.md +7 -0
- package/runtime/knowledge/docs/shell/auth/ChangePasswordPage/change-password-page.docs.md +7 -0
- package/runtime/knowledge/docs/shell/auth/ForgotPasswordPage/forgot-password-page.docs.md +7 -0
- package/runtime/knowledge/docs/shell/auth/InvitePage/invite-page.docs.md +7 -0
- package/runtime/knowledge/docs/shell/auth/LoginPage/login-page.docs.md +7 -0
- package/runtime/knowledge/docs/shell/auth/ResetPasswordPage/reset-password-page.docs.md +7 -0
- package/runtime/knowledge/docs/shell/auth/sign-in/sign-in.docs.md +7 -0
- package/runtime/knowledge/docs/shell/components/change-password/change-password.docs.md +7 -0
- package/runtime/knowledge/docs/shell/components/change-password-button/change-password-button.docs.md +7 -0
- package/runtime/knowledge/docs/shell/components/error-interceptor/error-interceptor.docs.md +7 -0
- package/runtime/knowledge/docs/shell/components/language-selector/language-selector.docs.md +7 -0
- package/runtime/knowledge/docs/shell/components/logout-button/logout-button.docs.md +7 -0
- package/runtime/knowledge/docs/shell/components/notification-dropdown/notification-dropdown.docs.md +7 -0
- package/runtime/knowledge/docs/shell/components/notification-template/notification-template.docs.md +7 -0
- package/runtime/knowledge/docs/shell/components/settings-menu/settings-menu.docs.md +7 -0
- package/runtime/knowledge/docs/shell/components/settings-menu-item/settings-menu-item.docs.md +7 -0
- package/runtime/knowledge/docs/shell/components/sidebar/sidebar.docs.md +7 -0
- package/runtime/knowledge/docs/shell/components/theme-selector/theme-selector.docs.md +7 -0
- package/runtime/knowledge/docs/shell/components/user-dropdown-button/user-dropdown-button.docs.md +7 -0
- package/runtime/knowledge/docs/shell/dashboard/dashboard-charts/dashboard-charts.docs.md +7 -0
- package/runtime/knowledge/docs/shell/dashboard/dashboard-widget-card/dashboard-widget-card.docs.md +7 -0
- package/runtime/knowledge/docs/shell/dashboard/draggable-dashboard/draggable-dashboard.docs.md +7 -0
- package/runtime/knowledge/docs/ui/components/atoms/vc-badge/vc-badge.docs.md +24 -0
- package/runtime/knowledge/docs/ui/components/atoms/vc-banner/vc-banner.docs.md +20 -0
- package/runtime/knowledge/docs/ui/components/atoms/vc-button/vc-button.docs.md +32 -5
- package/runtime/knowledge/docs/ui/components/atoms/vc-card/vc-card.docs.md +15 -2
- package/runtime/knowledge/docs/ui/components/atoms/vc-col/vc-col.docs.md +11 -1
- package/runtime/knowledge/docs/ui/components/atoms/vc-container/vc-container.docs.md +10 -0
- package/runtime/knowledge/docs/ui/components/atoms/vc-hint/vc-hint.docs.md +20 -0
- package/runtime/knowledge/docs/ui/components/atoms/vc-icon/vc-icon.docs.md +24 -0
- package/runtime/knowledge/docs/ui/components/atoms/vc-image/vc-image.docs.md +26 -0
- package/runtime/knowledge/docs/ui/components/atoms/vc-label/vc-label.docs.md +24 -0
- package/runtime/knowledge/docs/ui/components/atoms/vc-link/vc-link.docs.md +22 -0
- package/runtime/knowledge/docs/ui/components/atoms/vc-loading/vc-loading.docs.md +21 -0
- package/runtime/knowledge/docs/ui/components/atoms/vc-progress/vc-progress.docs.md +20 -0
- package/runtime/knowledge/docs/ui/components/atoms/vc-row/vc-row.docs.md +11 -1
- package/runtime/knowledge/docs/ui/components/atoms/vc-scrollable-container/vc-scrollable-container.docs.md +11 -1
- package/runtime/knowledge/docs/ui/components/atoms/vc-skeleton/vc-skeleton.docs.md +20 -0
- package/runtime/knowledge/docs/ui/components/atoms/vc-status/vc-status.docs.md +20 -0
- package/runtime/knowledge/docs/ui/components/atoms/vc-status-icon/vc-status-icon.docs.md +20 -0
- package/runtime/knowledge/docs/ui/components/atoms/vc-tooltip/vc-tooltip.docs.md +25 -1
- package/runtime/knowledge/docs/ui/components/atoms/vc-video/vc-video.docs.md +25 -0
- package/runtime/knowledge/docs/ui/components/atoms/vc-widget/vc-widget.docs.md +22 -0
- package/runtime/knowledge/docs/ui/components/molecules/multilanguage-selector/multilanguage-selector.docs.md +10 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-accordion/vc-accordion.docs.md +17 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.docs.md +27 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-checkbox/vc-checkbox.docs.md +27 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-checkbox-group/vc-checkbox-group.docs.md +23 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-color-input/vc-color-input.docs.md +24 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-date-picker/vc-date-picker.docs.md +27 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-dropdown/vc-dropdown.docs.md +27 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-dropdown-panel/vc-dropdown-panel.docs.md +22 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-editor/vc-editor.docs.md +17 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-field/vc-field.docs.md +17 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-file-upload/vc-file-upload.docs.md +17 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-form/vc-form.docs.md +15 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-image-tile/vc-image-tile.docs.md +12 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-input/vc-input.docs.md +30 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-input-currency/vc-input-currency.docs.md +27 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-input-dropdown/vc-input-dropdown.docs.md +26 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-input-group/vc-input-group.docs.md +21 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-menu/vc-menu.docs.md +24 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-multivalue/vc-multivalue.docs.md +28 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-pagination/vc-pagination.docs.md +25 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-radio-button/vc-radio-button.docs.md +25 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-radio-group/vc-radio-group.docs.md +22 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-rating/vc-rating.docs.md +17 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-select/vc-select.docs.md +32 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-slider/vc-slider.docs.md +22 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-switch/vc-switch.docs.md +25 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-textarea/vc-textarea.docs.md +27 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-toast/vc-toast.docs.md +28 -0
- package/runtime/knowledge/docs/ui/components/organisms/vc-app/vc-app.docs.md +19 -0
- package/runtime/knowledge/docs/ui/components/organisms/vc-auth-layout/vc-auth-layout.docs.md +13 -0
- package/runtime/knowledge/docs/ui/components/organisms/vc-blade/vc-blade.docs.md +22 -1
- package/runtime/knowledge/docs/ui/components/organisms/vc-data-table/composables/table-composables.docs.md +30 -5
- package/runtime/knowledge/docs/ui/components/organisms/vc-data-table/vc-data-table.docs.md +18 -0
- package/runtime/knowledge/docs/ui/components/organisms/vc-dynamic-property/vc-dynamic-property.docs.md +12 -0
- package/runtime/knowledge/docs/ui/components/organisms/vc-gallery/vc-gallery.docs.md +14 -0
- package/runtime/knowledge/docs/ui/components/organisms/vc-image-upload/vc-image-upload.docs.md +12 -0
- package/runtime/knowledge/docs/ui/components/organisms/vc-popup/vc-popup.docs.md +14 -1
- package/runtime/knowledge/docs/ui/components/organisms/vc-sidebar/vc-sidebar.docs.md +13 -0
- package/runtime/knowledge/docs/ui/composables/ui-composables.docs.md +7 -0
- package/runtime/knowledge/docs/ui/composables/useDataTablePagination.docs.md +9 -3
- package/runtime/knowledge/docs/ui/composables/useDataTableSort.docs.md +6 -0
- package/runtime/knowledge/docs/ui/composables/useTableSelection.docs.md +6 -0
- package/runtime/knowledge/docs/ui/composables/useTableSort.docs.md +6 -0
- package/runtime/knowledge/docs/ui/types/ui-types.docs.md +7 -0
|
@@ -1,7 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: VcInput
|
|
3
|
+
category: components
|
|
4
|
+
group: form
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
!!! note "Large reference page"
|
|
8
|
+
This page is long. Use the section links in the sidebar or your browser's in-page search (Ctrl/Cmd+F) to jump to the section you need.
|
|
9
|
+
|
|
1
10
|
# VcInput
|
|
2
11
|
|
|
3
12
|
A single-line text input component for forms in vc-shell applications. Supports multiple input types (text, number, password, email, and more), prefix/suffix decorations, inner/outer slot content, built-in clearable state, password visibility toggle, loading indicator, debounced model updates, and integration with vee-validate for validation.
|
|
4
13
|
|
|
14
|
+
::storybook id="form-vcinput--default"
|
|
15
|
+
|
|
5
16
|
## When to Use
|
|
6
17
|
|
|
7
18
|
| Scenario | Component |
|
|
@@ -44,10 +55,14 @@ const productName = ref("");
|
|
|
44
55
|
|
|
45
56
|
This renders a labeled text input with placeholder text. The value is two-way bound via `v-model`.
|
|
46
57
|
|
|
58
|
+
::storybook id="form-vcinput--all-states" height="450"
|
|
59
|
+
|
|
47
60
|
---
|
|
48
61
|
|
|
49
62
|
## Input Types
|
|
50
63
|
|
|
64
|
+
::storybook id="form-vcinput--input-types" height="500"
|
|
65
|
+
|
|
51
66
|
VcInput supports the following `type` values. Each type adjusts the native `<input>` behavior and, in some cases, adds extra UI or filtering logic.
|
|
52
67
|
|
|
53
68
|
| Type | Behavior |
|
|
@@ -298,6 +313,8 @@ Override the default error message or hint text rendering.
|
|
|
298
313
|
|
|
299
314
|
## Sizes
|
|
300
315
|
|
|
316
|
+
::storybook id="form-vcinput--all-sizes"
|
|
317
|
+
|
|
301
318
|
Two size variants are available:
|
|
302
319
|
|
|
303
320
|
| Size | Height | Use case |
|
|
@@ -771,3 +788,16 @@ VcInput follows WAI-ARIA best practices for form fields:
|
|
|
771
788
|
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.
|
|
772
789
|
|
|
773
790
|
This behavior is powered by `BladeLoadingKey` via Vue's provide/inject. The component injects the loading state from the nearest `VcBlade` ancestor.
|
|
791
|
+
|
|
792
|
+
<!-- internal:start -->
|
|
793
|
+
|
|
794
|
+
## Architecture Notes
|
|
795
|
+
|
|
796
|
+
- The `type="date"`, `type="datetime-local"`, and `type="color"` values trigger internal delegation — the component renders `VcDatePicker` or `VcColorInput` instead of a native `<input>`. All forwarded props are passed via `v-bind="$attrs"`.
|
|
797
|
+
- Debounce is implemented via a `useDebounceFn` wrapper from VueUse. The internal `temp` ref holds the raw typing value; the `modelValue` update is deferred.
|
|
798
|
+
- `number` / `integer` type filtering uses `keydown` event guards — not `input` event filtering — to block `-`, `+`, `e`, and (for `integer`) `.` keys before they reach the input.
|
|
799
|
+
- `type="password"` show/hide toggle is controlled by `showPassword` ref; the native `input` type toggles between `"password"` and `"text"`.
|
|
800
|
+
- The `control` slot replaces the native `<input>` with an arbitrary element. The `emitValue` scope function wraps the debounce logic, so custom controls respect the `debounce` prop automatically.
|
|
801
|
+
- Source file: `framework/ui/components/molecules/vc-input/vc-input.vue`
|
|
802
|
+
|
|
803
|
+
<!-- internal:end -->
|
package/runtime/knowledge/docs/ui/components/molecules/vc-input-currency/vc-input-currency.docs.md
CHANGED
|
@@ -1,7 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: VcInputCurrency
|
|
3
|
+
category: components
|
|
4
|
+
group: form
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
!!! note "Large reference page"
|
|
8
|
+
This page is long. Use the section links in the sidebar or your browser's in-page search (Ctrl/Cmd+F) to jump to the section you need.
|
|
9
|
+
|
|
1
10
|
# VcInputCurrency
|
|
2
11
|
|
|
3
12
|
A specialized currency input that combines locale-aware number formatting (grouping separators, decimal precision) with a dropdown for selecting the currency. Built on top of [vue-currency-input](https://dm4t2.github.io/vue-currency-input/) and [VcInputDropdown](../vc-input-dropdown/).
|
|
4
13
|
|
|
14
|
+
::storybook id="form-vcinputcurrency--default"
|
|
15
|
+
|
|
5
16
|
## When to Use
|
|
6
17
|
|
|
7
18
|
- Entering monetary values with currency selection (e.g., product prices, order totals, shipping costs)
|
|
@@ -60,6 +71,8 @@ The dropdown portion renders the available currencies. Use `optionLabel` and `op
|
|
|
60
71
|
|
|
61
72
|
### Precision Control
|
|
62
73
|
|
|
74
|
+
::storybook id="form-vcinputcurrency--precision-options"
|
|
75
|
+
|
|
63
76
|
The `precision` prop controls the number of decimal places (0--15). The formatting engine rounds and pads the value accordingly.
|
|
64
77
|
|
|
65
78
|
```vue
|
|
@@ -146,6 +159,8 @@ const form = reactive({
|
|
|
146
159
|
|
|
147
160
|
### States
|
|
148
161
|
|
|
162
|
+
::storybook id="form-vcinputcurrency--with-error"
|
|
163
|
+
|
|
149
164
|
```vue
|
|
150
165
|
<!-- Required -->
|
|
151
166
|
<VcInputCurrency v-model="price" v-model:option="currency" :options="currencies" label="Price" required />
|
|
@@ -334,3 +349,15 @@ Additionally inherits all `--input-*` CSS variables from VcInput/VcInputDropdown
|
|
|
334
349
|
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.
|
|
335
350
|
|
|
336
351
|
This behavior is powered by `BladeLoadingKey` via Vue's provide/inject. The component injects the loading state from the nearest `VcBlade` ancestor.
|
|
352
|
+
|
|
353
|
+
<!-- internal:start -->
|
|
354
|
+
|
|
355
|
+
## Architecture Notes
|
|
356
|
+
|
|
357
|
+
- Built as a wrapper around `VcInputDropdown`. The numeric input side uses `vue-currency-input` for locale-aware formatting; the right side is `VcInputDropdown`'s built-in dropdown.
|
|
358
|
+
- The minus key (`-`) and exponential notation key (`e`) are blocked at the `keydown` level, not via `input` validation.
|
|
359
|
+
- `precision` is forwarded directly to `vue-currency-input`'s `CurrencyInputOptions`.
|
|
360
|
+
- `currencyDisplay` maps to the `vue-currency-input` option of the same name.
|
|
361
|
+
- Source file: `framework/ui/components/molecules/vc-input-currency/vc-input-currency.vue`
|
|
362
|
+
|
|
363
|
+
<!-- internal:end -->
|
package/runtime/knowledge/docs/ui/components/molecules/vc-input-dropdown/vc-input-dropdown.docs.md
CHANGED
|
@@ -1,7 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: VcInputDropdown
|
|
3
|
+
category: components
|
|
4
|
+
group: form
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
!!! note "Large reference page"
|
|
8
|
+
This page is long. Use the section links in the sidebar or your browser's in-page search (Ctrl/Cmd+F) to jump to the section you need.
|
|
9
|
+
|
|
1
10
|
# VcInputDropdown
|
|
2
11
|
|
|
3
12
|
A composite component that combines a text input field with a dropdown option selector in a single control. The user types a value in the input while also selecting a category, unit, or format from the attached dropdown.
|
|
4
13
|
|
|
14
|
+
::storybook id="form-vcinputdropdown--default"
|
|
15
|
+
|
|
5
16
|
## When to Use
|
|
6
17
|
|
|
7
18
|
- Input value paired with a unit selector (e.g., "100 cm", "50 kg")
|
|
@@ -42,6 +53,8 @@ The component uses a dual `v-model` pattern: `v-model` controls the input value,
|
|
|
42
53
|
|
|
43
54
|
## Object Options
|
|
44
55
|
|
|
56
|
+
::storybook id="form-vcinputdropdown--with-object-options"
|
|
57
|
+
|
|
45
58
|
When options are objects instead of primitives, use `optionValue` and `optionLabel` to tell the component which properties to use:
|
|
46
59
|
|
|
47
60
|
```vue
|
|
@@ -106,6 +119,8 @@ Supported types: `"text"`, `"password"`, `"email"`, `"tel"`, `"number"`, `"integ
|
|
|
106
119
|
|
|
107
120
|
## Component States
|
|
108
121
|
|
|
122
|
+
::storybook id="form-vcinputdropdown--states"
|
|
123
|
+
|
|
109
124
|
VcInputDropdown inherits all standard form field states:
|
|
110
125
|
|
|
111
126
|
```vue
|
|
@@ -298,3 +313,14 @@ Replace the default dropdown toggle with a custom element using the `button` slo
|
|
|
298
313
|
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.
|
|
299
314
|
|
|
300
315
|
This behavior is powered by `BladeLoadingKey` via Vue's provide/inject. The component injects the loading state from the nearest `VcBlade` ancestor.
|
|
316
|
+
|
|
317
|
+
<!-- internal:start -->
|
|
318
|
+
|
|
319
|
+
## Architecture Notes
|
|
320
|
+
|
|
321
|
+
- Internally composed of two elements side-by-side: a `VcInput` for the text portion and a `VcSelect`-like dropdown panel for the option portion.
|
|
322
|
+
- The `button` slot replaces only the dropdown toggle button element, not the entire dropdown panel.
|
|
323
|
+
- The `option` slot receives `{ index, opt, selected, toggleOption }` — `toggleOption` must be called to actually select the item.
|
|
324
|
+
- Source file: `framework/ui/components/molecules/vc-input-dropdown/vc-input-dropdown.vue`
|
|
325
|
+
|
|
326
|
+
<!-- internal:end -->
|
package/runtime/knowledge/docs/ui/components/molecules/vc-input-group/vc-input-group.docs.md
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: VcInputGroup
|
|
3
|
+
category: components
|
|
4
|
+
group: form
|
|
5
|
+
---
|
|
6
|
+
|
|
1
7
|
# VcInputGroup
|
|
2
8
|
|
|
3
9
|
A semantic `<fieldset>` wrapper that groups related form controls under a shared label, error state, and ARIA context. Propagates `disabled` and `name` to child controls via provide/inject.
|
|
4
10
|
|
|
11
|
+
::storybook id="form-vcinputgroup--form-fields"
|
|
12
|
+
|
|
5
13
|
## When to Use
|
|
6
14
|
|
|
7
15
|
- Grouping related form fields with a shared section label (e.g., "Billing details", "Shipping address")
|
|
@@ -56,6 +64,8 @@ const lastName = ref("");
|
|
|
56
64
|
|
|
57
65
|
### Radio Group
|
|
58
66
|
|
|
67
|
+
::storybook id="form-vcinputgroup--radios-horizontal"
|
|
68
|
+
|
|
59
69
|
```vue
|
|
60
70
|
<VcInputGroup label="Payment method" role="radiogroup" orientation="horizontal" name="payment">
|
|
61
71
|
<VcRadioButton v-model="payment" value="card" label="Card" />
|
|
@@ -111,3 +121,14 @@ const lastName = ref("");
|
|
|
111
121
|
- [VcRadioButton](../vc-radio-button/) -- radio buttons to group
|
|
112
122
|
- [VcInput](../vc-input/) -- text inputs to group
|
|
113
123
|
- [VcSelect](../vc-select/) -- selects to group
|
|
124
|
+
|
|
125
|
+
<!-- internal:start -->
|
|
126
|
+
|
|
127
|
+
## Architecture Notes
|
|
128
|
+
|
|
129
|
+
- `disabled` and `name` are provided via Vue's provide/inject mechanism using injection keys from `framework/injection-keys.ts`. Child form controls (`VcInput`, `VcRadioButton`, etc.) inject these to inherit group-level state automatically.
|
|
130
|
+
- The `orientation` prop controls flex direction (`column` vs `row`) on the fieldset's content area.
|
|
131
|
+
- Source file: `framework/ui/components/molecules/vc-input-group/vc-input-group.vue`
|
|
132
|
+
- Context file: `framework/ui/components/molecules/vc-input-group/context.ts`
|
|
133
|
+
|
|
134
|
+
<!-- internal:end -->
|
|
@@ -1,7 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: VcMenu
|
|
3
|
+
category: components
|
|
4
|
+
group: navigation
|
|
5
|
+
---
|
|
6
|
+
|
|
1
7
|
# VcMenu
|
|
2
8
|
|
|
3
9
|
Compositional navigation menu component for building sidebar navigation with sections, groups, nested items, badges, and loading skeletons.
|
|
4
10
|
|
|
11
|
+
::storybook id="navigation-vcmenu--default"
|
|
12
|
+
|
|
5
13
|
## When to Use
|
|
6
14
|
|
|
7
15
|
- Building the main navigation sidebar in admin applications
|
|
@@ -64,6 +72,8 @@ import { VcMenu, VcMenuItem, VcMenuGroup } from "@vc-shell/framework";
|
|
|
64
72
|
|
|
65
73
|
## Common Patterns
|
|
66
74
|
|
|
75
|
+
::storybook id="navigation-vcmenu--sections"
|
|
76
|
+
|
|
67
77
|
### Section Groups with Nested Items
|
|
68
78
|
|
|
69
79
|
```vue
|
|
@@ -93,6 +103,8 @@ import { VcMenu, VcMenuItem, VcMenuGroup } from "@vc-shell/framework";
|
|
|
93
103
|
|
|
94
104
|
### Collapsed State
|
|
95
105
|
|
|
106
|
+
::storybook id="navigation-vcmenu--collapsed"
|
|
107
|
+
|
|
96
108
|
When `expanded` is `false`, the menu shows only icons and letter abbreviations. Groups show tooltips on hover. The container width should be reduced (e.g., 64px).
|
|
97
109
|
|
|
98
110
|
## CSS Variables
|
|
@@ -113,3 +125,15 @@ When `expanded` is `false`, the menu shows only icons and letter abbreviations.
|
|
|
113
125
|
- [VcMenuItem](../vc-menu/) — individual menu item with icon, title, badge
|
|
114
126
|
- [VcMenuGroup](../vc-menu/) — collapsible group container (supports `variant="section"` for top-level sections)
|
|
115
127
|
- [VcDropdown](../vc-dropdown/) — contextual dropdown menus
|
|
128
|
+
|
|
129
|
+
<!-- internal:start -->
|
|
130
|
+
|
|
131
|
+
## Architecture Notes
|
|
132
|
+
|
|
133
|
+
- `VcMenuExpandedKey` is the provide/inject key (`framework/ui/components/molecules/vc-menu/constants.ts`) used by `VcMenu` to broadcast the `expanded` state down to all `VcMenuItem` and `VcMenuGroup` descendants. Components can also override it locally via their own `expanded` prop.
|
|
134
|
+
- `VcMenuGroup` persists its open/closed state in `localStorage` with a key scoped to `vc_menu_<appName>_<groupId>_open`, where `appName` is derived from the first URL path segment.
|
|
135
|
+
- The loading skeleton in `VcMenu` is hardcoded to mimic a realistic 2-section structure. It does not reflect actual slot content.
|
|
136
|
+
- `VcMenuItem` uses a `VcTooltip` that activates only when the menu is collapsed (`!menuExpanded`), showing the item title on hover.
|
|
137
|
+
- `VcMenuGroup` children animate via CSS `grid-template-rows: 0fr → 1fr` transition — no JS required.
|
|
138
|
+
|
|
139
|
+
<!-- internal:end -->
|
|
@@ -1,7 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: VcMultivalue
|
|
3
|
+
category: components
|
|
4
|
+
group: form
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
!!! note "Large reference page"
|
|
8
|
+
This page is long. Use the section links in the sidebar or your browser's in-page search (Ctrl/Cmd+F) to jump to the section you need.
|
|
9
|
+
|
|
1
10
|
# VcMultivalue
|
|
2
11
|
|
|
3
12
|
A multi-value input component for collecting multiple entries as chips/tags. Supports two distinct modes: **free-form entry** (text, number, date, color) where users type values and press Enter, and **dictionary mode** with a searchable dropdown of predefined options.
|
|
4
13
|
|
|
14
|
+
::storybook id="form-vcmultivalue--default"
|
|
15
|
+
|
|
5
16
|
## When to Use
|
|
6
17
|
|
|
7
18
|
- Collecting multiple tags, keywords, or labels (e.g., product tags, email recipients)
|
|
@@ -46,6 +57,8 @@ In the default mode (`multivalue` is `false`), users type a value into the input
|
|
|
46
57
|
|
|
47
58
|
### Dictionary Mode (Dropdown Selection)
|
|
48
59
|
|
|
60
|
+
::storybook id="form-vcmultivalue--single-value-mode"
|
|
61
|
+
|
|
49
62
|
When the `multivalue` prop is `true` and `options` are provided, the component displays a searchable dropdown. Users click the field to open the dropdown, search within options, and select items. Already-selected items are automatically excluded from the dropdown.
|
|
50
63
|
|
|
51
64
|
```vue
|
|
@@ -139,6 +152,8 @@ const form = reactive({
|
|
|
139
152
|
|
|
140
153
|
### Custom Rendering with Slots
|
|
141
154
|
|
|
155
|
+
::storybook id="form-vcmultivalue--custom-option-display"
|
|
156
|
+
|
|
142
157
|
Use `#option` for dropdown items and `#selected-item` for chips:
|
|
143
158
|
|
|
144
159
|
```vue
|
|
@@ -344,3 +359,16 @@ The component uses `--multivalue-*` variables that fall back to `--select-*` tok
|
|
|
344
359
|
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.
|
|
345
360
|
|
|
346
361
|
This behavior is powered by `BladeLoadingKey` via Vue's provide/inject. The component injects the loading state from the nearest `VcBlade` ancestor.
|
|
362
|
+
|
|
363
|
+
<!-- internal:start -->
|
|
364
|
+
|
|
365
|
+
## Architecture Notes
|
|
366
|
+
|
|
367
|
+
- Composed of internal sub-components in `vc-multivalue/_internal/`: the chip list renderer, the dropdown panel, and the trigger input.
|
|
368
|
+
- Composables are in `vc-multivalue/composables/` — chip management and dropdown open/close state are separated into composables.
|
|
369
|
+
- Free-form mode: each `keydown` for Enter or comma (`','`) triggers a chip add; Backspace on empty input removes the last chip.
|
|
370
|
+
- Dictionary mode: already-selected items are filtered out of the dropdown list reactively.
|
|
371
|
+
- Source file: `framework/ui/components/molecules/vc-multivalue/vc-multivalue.vue`
|
|
372
|
+
- Internal components: `framework/ui/components/molecules/vc-multivalue/_internal/`
|
|
373
|
+
|
|
374
|
+
<!-- internal:end -->
|
|
@@ -1,7 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: VcPagination
|
|
3
|
+
category: components
|
|
4
|
+
group: navigation
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
!!! tip "Quick reference"
|
|
8
|
+
Jump to [Props](#props) · [Events](#events) · [CSS Variables](#css-variables) · [Accessibility](#accessibility)
|
|
9
|
+
|
|
1
10
|
# VcPagination
|
|
2
11
|
|
|
3
12
|
Page navigation control with first/previous/next/last buttons and a sliding window of page numbers. Automatically adapts the number of visible page buttons for mobile viewports.
|
|
4
13
|
|
|
14
|
+
::storybook id="navigation-vcpagination--default"
|
|
15
|
+
|
|
5
16
|
## When to Use
|
|
6
17
|
|
|
7
18
|
- Navigating paginated data sets in tables, lists, or grids
|
|
@@ -39,6 +50,8 @@ function onPageChange(page: number) {
|
|
|
39
50
|
|
|
40
51
|
## Sliding Page Window
|
|
41
52
|
|
|
53
|
+
::storybook id="navigation-vcpagination--many-pages"
|
|
54
|
+
|
|
42
55
|
VcPagination displays a sliding window of page number buttons centered on the current page. The window size adapts automatically:
|
|
43
56
|
|
|
44
57
|
- **Desktop:** 5 visible page buttons (default)
|
|
@@ -290,3 +303,15 @@ currentPage.value = Math.min(currentPage.value, totalPages.value);
|
|
|
290
303
|
|
|
291
304
|
- [VcDataTable](../../organisms/vc-table) -- Data table that commonly pairs with pagination for large datasets
|
|
292
305
|
- [VcSelect](../vc-select/) -- Can be used alongside pagination for a "rows per page" selector
|
|
306
|
+
|
|
307
|
+
<!-- internal:start -->
|
|
308
|
+
|
|
309
|
+
## Architecture Notes
|
|
310
|
+
|
|
311
|
+
- `localCurrentPage` is an internal ref synced from `props.currentPage` via a watcher. This prevents the UI from jumping when the parent has not yet updated the prop after an `itemClick` event.
|
|
312
|
+
- Responsive defaults: `MAX_PAGES_MOBILE = 3`, `MAX_PAGES_DESKTOP = 5`. Both are overridden by `maxPages` prop.
|
|
313
|
+
- `effectiveShowFirstLast` defaults to `true` when `showFirstLast` prop is `undefined`.
|
|
314
|
+
- The `setPage` function clamps clicks to valid range `[1, props.pages]` and handles both `number` and `string` inputs (supports programmatic usage).
|
|
315
|
+
- The `variant` prop is defined but currently unused in the template — reserved for a future "minimal" style.
|
|
316
|
+
|
|
317
|
+
<!-- internal:end -->
|
package/runtime/knowledge/docs/ui/components/molecules/vc-radio-button/vc-radio-button.docs.md
CHANGED
|
@@ -1,7 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: VcRadioButton
|
|
3
|
+
category: components
|
|
4
|
+
group: form
|
|
5
|
+
---
|
|
6
|
+
|
|
1
7
|
# VcRadioButton
|
|
2
8
|
|
|
3
9
|
A radio button component for selecting a single option from a group. Supports string, number, and boolean value types.
|
|
4
10
|
|
|
11
|
+
!!! note "Large reference"
|
|
12
|
+
This page is over 200 lines. Use the section headings to jump directly to what you need: [Basic Usage](#basic-usage), [Common Patterns](#common-patterns), [Props](#key-props), [Accessibility](#accessibility).
|
|
13
|
+
|
|
14
|
+
::storybook id="form-vcradiobutton--default"
|
|
15
|
+
|
|
5
16
|
## Overview
|
|
6
17
|
|
|
7
18
|
Radio buttons are the standard UI pattern for selecting exactly one option from a small, visible set. Unlike dropdowns (VcSelect), radio buttons show all options simultaneously, making them ideal when there are 2-6 choices and the user benefits from seeing everything at once.
|
|
@@ -115,6 +126,8 @@ const priority = ref(2);
|
|
|
115
126
|
|
|
116
127
|
### Binary Mode
|
|
117
128
|
|
|
129
|
+
::storybook id="form-vcradiobutton--binary"
|
|
130
|
+
|
|
118
131
|
In binary mode, clicking toggles between `true` and `false` rather than comparing to a `value`. This is useful for standalone boolean options:
|
|
119
132
|
|
|
120
133
|
```vue
|
|
@@ -201,3 +214,15 @@ Do not mix `binary` mode with regular `value` comparison in the same group. Bina
|
|
|
201
214
|
## Skeleton / Loading State
|
|
202
215
|
|
|
203
216
|
When placed inside a `VcBlade` with `loading=true`, the component renders a skeleton placeholder matching its shape — a control indicator and label block. No configuration needed.
|
|
217
|
+
|
|
218
|
+
<!-- internal:start -->
|
|
219
|
+
|
|
220
|
+
## Architecture Notes
|
|
221
|
+
|
|
222
|
+
- VcRadioButton wraps a native `<input type="radio">` with custom CSS appearance. `checked` state is computed via `isEqual` (lodash) to support object-typed values.
|
|
223
|
+
- `binary` mode: `onChange` emits `!checked.value` (a boolean toggle) instead of `props.value`. Do not mix binary and value modes within the same group.
|
|
224
|
+
- The `name` attribute is critical for native keyboard group navigation — always set the same `name` across a group.
|
|
225
|
+
- `useFormField` injects validation context (error, disabled, name) from a parent form provider.
|
|
226
|
+
- Source file: `framework/ui/components/molecules/vc-radio-button/vc-radio-button.vue`
|
|
227
|
+
|
|
228
|
+
<!-- internal:end -->
|
package/runtime/knowledge/docs/ui/components/molecules/vc-radio-group/vc-radio-group.docs.md
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: VcRadioGroup
|
|
3
|
+
category: components
|
|
4
|
+
group: form
|
|
5
|
+
---
|
|
6
|
+
|
|
1
7
|
# VcRadioGroup
|
|
2
8
|
|
|
3
9
|
Accessible radio button group that wraps radio controls in a semantic fieldset with shared label, hint, error state, and layout control.
|
|
4
10
|
|
|
11
|
+
::storybook id="form-vcradiogroup--default"
|
|
12
|
+
|
|
5
13
|
## When to Use
|
|
6
14
|
|
|
7
15
|
- Selecting exactly one option from a set (e.g., payment method, shipping speed)
|
|
@@ -74,6 +82,8 @@ interface RadioGroupOption<V = string | number | boolean> {
|
|
|
74
82
|
|
|
75
83
|
### Horizontal Layout
|
|
76
84
|
|
|
85
|
+
::storybook id="form-vcradiogroup--horizontal"
|
|
86
|
+
|
|
77
87
|
```vue
|
|
78
88
|
<VcRadioGroup
|
|
79
89
|
v-model="priority"
|
|
@@ -89,6 +99,8 @@ interface RadioGroupOption<V = string | number | boolean> {
|
|
|
89
99
|
|
|
90
100
|
### With Disabled Option
|
|
91
101
|
|
|
102
|
+
::storybook id="form-vcradiogroup--with-disabled-option"
|
|
103
|
+
|
|
92
104
|
```vue
|
|
93
105
|
<VcRadioGroup
|
|
94
106
|
v-model="plan"
|
|
@@ -135,3 +147,13 @@ interface RadioGroupOption<V = string | number | boolean> {
|
|
|
135
147
|
## Skeleton / Loading State
|
|
136
148
|
|
|
137
149
|
When placed inside a `VcBlade` with `loading=true`, the component renders a skeleton placeholder matching its shape — a control indicator and label block. No configuration needed.
|
|
150
|
+
|
|
151
|
+
<!-- internal:start -->
|
|
152
|
+
|
|
153
|
+
## Architecture Notes
|
|
154
|
+
|
|
155
|
+
- VcRadioGroup delegates rendering to `VcInputGroup` (semantic fieldset wrapper) and renders `VcRadioButton` items from the `options` array, or passes through the default slot for custom layouts.
|
|
156
|
+
- The group generates a unique `name` attribute via `useId()` when none is provided, ensuring native radio group behavior.
|
|
157
|
+
- Source file: `framework/ui/components/molecules/vc-radio-group/vc-radio-group.vue`
|
|
158
|
+
|
|
159
|
+
<!-- internal:end -->
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: VcRating
|
|
3
|
+
category: components
|
|
4
|
+
group: form
|
|
5
|
+
---
|
|
6
|
+
|
|
1
7
|
# VcRating
|
|
2
8
|
|
|
3
9
|
Read-only rating display component that visualizes a numeric value as stars, a star-and-text combination, or plain text. Designed for displaying aggregate ratings in detail views, list columns, and dashboards.
|
|
@@ -15,6 +21,8 @@ Read-only rating display component that visualizes a numeric value as stars, a s
|
|
|
15
21
|
|
|
16
22
|
## Quick Start
|
|
17
23
|
|
|
24
|
+
::storybook id="form-vcrating--stars"
|
|
25
|
+
|
|
18
26
|
```vue
|
|
19
27
|
<template>
|
|
20
28
|
<VcRating
|
|
@@ -29,6 +37,9 @@ import { VcRating } from "@vc-shell/framework";
|
|
|
29
37
|
</script>
|
|
30
38
|
```
|
|
31
39
|
|
|
40
|
+
!!! tip "Display-only component"
|
|
41
|
+
VcRating is a read-only display component. It does not support user interaction for selecting a rating. For interactive rating input, build a custom component.
|
|
42
|
+
|
|
32
43
|
## Display Variants
|
|
33
44
|
|
|
34
45
|
VcRating offers three visual modes controlled by the `variant` prop:
|
|
@@ -55,6 +66,8 @@ Shows a single filled star icon alongside a numeric fraction. Compact and precis
|
|
|
55
66
|
|
|
56
67
|
Displays just the numeric fraction. Minimal footprint for dense layouts like table cells.
|
|
57
68
|
|
|
69
|
+
::storybook id="form-vcrating--text-only"
|
|
70
|
+
|
|
58
71
|
```vue
|
|
59
72
|
<VcRating :model-value="8" :max="10" variant="text" />
|
|
60
73
|
<!-- Renders: 8/10 -->
|
|
@@ -74,6 +87,8 @@ The default scale is 1-5 stars. Override with the `max` prop for different scale
|
|
|
74
87
|
|
|
75
88
|
> **Tip:** For scales larger than 5, prefer the `"star-and-text"` or `"text"` variant. Rendering 10 individual star icons can be visually crowded.
|
|
76
89
|
|
|
90
|
+
::storybook id="form-vcrating--star-and-text"
|
|
91
|
+
|
|
77
92
|
## Placeholder for No Rating
|
|
78
93
|
|
|
79
94
|
When `modelValue` is `0`, `null`, or `undefined`, display a placeholder message:
|
|
@@ -258,6 +273,8 @@ Use the `"star-and-text"` or `"text"` variant in table cell slots for a compact
|
|
|
258
273
|
- [VcLabel](../../atoms/vc-label/) -- Label atom used internally for the label and tooltip
|
|
259
274
|
- [VcIcon](../../atoms/vc-icon/) -- Renders the star icons internally
|
|
260
275
|
|
|
276
|
+
::storybook id="form-vcrating--skeleton"
|
|
277
|
+
|
|
261
278
|
## Skeleton / Loading State
|
|
262
279
|
|
|
263
280
|
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.
|
|
@@ -1,9 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: VcSelect
|
|
3
|
+
category: components
|
|
4
|
+
group: form
|
|
5
|
+
---
|
|
6
|
+
|
|
1
7
|
# VcSelect
|
|
2
8
|
|
|
3
9
|
A dropdown list component for selecting one or multiple values. Supports synchronous and asynchronous data sources, search with debounce, infinite scrolling, custom option templates, and full integration with the framework's validation system.
|
|
4
10
|
|
|
5
11
|
VcSelect is one of the most widely used components in vc-shell. It covers most selection scenarios: from a simple dropdown with a static list to searching via a server API with pagination.
|
|
6
12
|
|
|
13
|
+
!!! note "Large reference"
|
|
14
|
+
This page is over 200 lines. Use the section headings to jump directly to what you need: [Quick Start](#quick-start), [Data Sources](#data-sources), [Multiple Selection](#multiple-selection), [Slots](#slots), [Props](#props).
|
|
15
|
+
|
|
16
|
+
::storybook id="form-vcselect--basic"
|
|
17
|
+
|
|
7
18
|
## When to Use
|
|
8
19
|
|
|
9
20
|
| Scenario | Component |
|
|
@@ -82,6 +93,8 @@ In this case `optionValue` and `optionLabel` are not needed — the component us
|
|
|
82
93
|
|
|
83
94
|
### Async Function (Server API)
|
|
84
95
|
|
|
96
|
+
::storybook id="form-vcselect--async-options" height="450"
|
|
97
|
+
|
|
85
98
|
To load data from a server, pass a function instead of an array. This is the most powerful mode — it automatically provides:
|
|
86
99
|
|
|
87
100
|
- Search with debounce (500ms by default)
|
|
@@ -142,6 +155,8 @@ const loadProducts = async (keyword?: string, skip?: number, ids?: string[]) =>
|
|
|
142
155
|
|
|
143
156
|
## Multiple Selection
|
|
144
157
|
|
|
158
|
+
::storybook id="form-vcselect--multiple-selection"
|
|
159
|
+
|
|
145
160
|
Add `multiple` to enable selecting several values. The model becomes an array:
|
|
146
161
|
|
|
147
162
|
```vue
|
|
@@ -178,6 +193,8 @@ Selected values are displayed as chips with a remove button. The `clearable` but
|
|
|
178
193
|
|
|
179
194
|
## Search and Filtering
|
|
180
195
|
|
|
196
|
+
::storybook id="form-vcselect--searchable"
|
|
197
|
+
|
|
181
198
|
Enable `searchable` to add a search field to the dropdown:
|
|
182
199
|
|
|
183
200
|
```vue
|
|
@@ -192,6 +209,8 @@ Enable `searchable` to add a search field to the dropdown:
|
|
|
192
209
|
|
|
193
210
|
## Custom Option Rendering
|
|
194
211
|
|
|
212
|
+
::storybook id="form-vcselect--custom-option-slot" height="450"
|
|
213
|
+
|
|
195
214
|
Use the `#option` slot for full control over how each option is rendered:
|
|
196
215
|
|
|
197
216
|
```vue
|
|
@@ -678,3 +697,16 @@ Don't forget `:key` with cascading selects, otherwise the second select will ret
|
|
|
678
697
|
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.
|
|
679
698
|
|
|
680
699
|
This behavior is powered by `BladeLoadingKey` via Vue's provide/inject. The component injects the loading state from the nearest `VcBlade` ancestor.
|
|
700
|
+
|
|
701
|
+
<!-- internal:start -->
|
|
702
|
+
|
|
703
|
+
## Architecture Notes
|
|
704
|
+
|
|
705
|
+
- VcSelect is split into three layers: `vc-select.vue` (orchestrator), `SelectTrigger.vue` (trigger button + chips), `SelectDropdown.vue` (popup list).
|
|
706
|
+
- Composable split: `useSelectDataSource` (options loading, infinite scroll, search), `useSelectSelection` (model-to-option mapping, toggle, remove), `useSelectValueMapping` (optionValue/optionLabel getters), `useSelectDropdown` (Floating UI positioning), `useSelectVisibility` (IntersectionObserver for lazy open).
|
|
707
|
+
- `emitValue: true` (default) means `modelValue` is always a primitive (string/number/boolean). `emitValue: false` means full option object. The `mapOptions` flag controls whether resolved objects are stored in the cache for label resolution.
|
|
708
|
+
- Infinite scroll is driven by `useIntersectionObserver` on a 1px sentinel element inside the dropdown viewport.
|
|
709
|
+
- Keyboard navigation is managed by `useKeyboardNavigation` (`core/composables/`) — arrow keys, Enter, Escape. The composable attaches/detaches listeners when the dropdown opens/closes.
|
|
710
|
+
- Source files: `framework/ui/components/molecules/vc-select/`
|
|
711
|
+
|
|
712
|
+
<!-- internal:end -->
|
|
@@ -1,7 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: VcSlider
|
|
3
|
+
category: components
|
|
4
|
+
group: form
|
|
5
|
+
---
|
|
6
|
+
|
|
1
7
|
# VcSlider
|
|
2
8
|
|
|
3
9
|
A content carousel component built on Swiper.js for displaying slides with optional navigation buttons. Renders any content via the default slot.
|
|
4
10
|
|
|
11
|
+
::storybook id="form-vcslider--default"
|
|
12
|
+
|
|
5
13
|
## When to Use
|
|
6
14
|
|
|
7
15
|
- Image carousels (product galleries, banners)
|
|
@@ -65,6 +73,8 @@ const products = [
|
|
|
65
73
|
|
|
66
74
|
### Custom Navigation Buttons
|
|
67
75
|
|
|
76
|
+
::storybook id="form-vcslider--custom-navigation"
|
|
77
|
+
|
|
68
78
|
```vue
|
|
69
79
|
<VcSlider :slides="items" navigation>
|
|
70
80
|
<template #default="{ slide }">
|
|
@@ -123,3 +133,15 @@ const products = [
|
|
|
123
133
|
## Skeleton / Loading State
|
|
124
134
|
|
|
125
135
|
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.
|
|
136
|
+
|
|
137
|
+
<!-- internal:start -->
|
|
138
|
+
|
|
139
|
+
## Architecture Notes
|
|
140
|
+
|
|
141
|
+
- VcSlider wraps the `swiper/vue` `<Swiper>` / `<SwiperSlide>` components with the `Navigation` module. Navigation buttons are custom DOM elements (`.vc-slider__prev` / `.vc-slider__next`) referenced by Swiper's `navigation.prevEl` / `nextEl` selectors.
|
|
142
|
+
- `overflow` prop toggles `overflow: visible` on the swiper container, allowing slides to bleed outside bounds — useful for "peek" effects.
|
|
143
|
+
- `slidesPerView="auto"` (default) lets each slide size itself from content. Pass a number for fixed-count layouts.
|
|
144
|
+
- The `slides` prop accepts any array. Each item is exposed as `{ slide }` in the default scoped slot.
|
|
145
|
+
- Source file: `framework/ui/components/molecules/vc-slider/vc-slider.vue`
|
|
146
|
+
|
|
147
|
+
<!-- internal:end -->
|
|
@@ -1,7 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: VcSwitch
|
|
3
|
+
category: components
|
|
4
|
+
group: form
|
|
5
|
+
---
|
|
6
|
+
|
|
1
7
|
# VcSwitch
|
|
2
8
|
|
|
3
9
|
A toggle switch component for binary on/off choices. Renders as a sliding track with a thumb indicator and supports labels, hints, validation, and value inversion.
|
|
4
10
|
|
|
11
|
+
!!! note "Large reference"
|
|
12
|
+
This page is over 200 lines. Use the section headings to jump directly to what you need: [Quick Start](#quick-start), [Features](#features), [Props](#props), [CSS Variables](#css-variables).
|
|
13
|
+
|
|
14
|
+
::storybook id="form-vcswitch--default"
|
|
15
|
+
|
|
5
16
|
## When to Use
|
|
6
17
|
|
|
7
18
|
- Toggling a feature or setting on/off (e.g., "Enable notifications", "Publish product")
|
|
@@ -46,6 +57,8 @@ The `label` prop renders text above the switch. Use `hint` for helper text below
|
|
|
46
57
|
|
|
47
58
|
### Value Inversion with trueValue / falseValue
|
|
48
59
|
|
|
60
|
+
::storybook id="form-vcswitch--variants"
|
|
61
|
+
|
|
49
62
|
By default, `v-model` maps `true` to the checked (on) state and `false` to unchecked (off). The `trueValue` and `falseValue` props let you invert the mapping when your data model uses opposite semantics.
|
|
50
63
|
|
|
51
64
|
```vue
|
|
@@ -294,3 +307,15 @@ const isActive = ref(true);
|
|
|
294
307
|
## Skeleton / Loading State
|
|
295
308
|
|
|
296
309
|
When placed inside a `VcBlade` with `loading=true`, the component renders a skeleton placeholder matching its shape — a control indicator and label block. No configuration needed.
|
|
310
|
+
|
|
311
|
+
<!-- internal:start -->
|
|
312
|
+
|
|
313
|
+
## Architecture Notes
|
|
314
|
+
|
|
315
|
+
- VcSwitch renders a hidden `<input type="checkbox">` with `role="switch"`. Visual state is driven by CSS (`:checked + .vc-switch__slider`). No JavaScript DOM manipulation needed for toggling.
|
|
316
|
+
- `invertValue` handles the `trueValue`/`falseValue` mapping — both on read (for rendering) and on write (for emitting). When `trueValue` is `false`, the display is inverted.
|
|
317
|
+
- The `tooltip` prop is kept for backward compatibility (legacy vc-shell code used it as hint text). A dev-mode `console.warn` nudges maintainers to migrate. The prop is mapped to `hintText` computed.
|
|
318
|
+
- `useFormField` injects validation context (error, disabled, name) from a parent form provider.
|
|
319
|
+
- Source file: `framework/ui/components/molecules/vc-switch/vc-switch.vue`
|
|
320
|
+
|
|
321
|
+
<!-- internal:end -->
|