@vc-shell/vc-app-skill 2.0.3 → 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
- package/runtime/knowledge/docs/core/composables/usePlatformLocaleSync/usePlatformLocaleSync.docs.md +0 -28
- package/runtime/knowledge/docs/shell/dashboard/draggable-dashboard/dashboard-widget-skeleton.docs.md +0 -26
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: VcAccordion
|
|
3
|
+
category: components
|
|
4
|
+
group: data-display
|
|
5
|
+
---
|
|
6
|
+
|
|
1
7
|
# VcAccordion
|
|
2
8
|
|
|
3
9
|
Collapsible content sections with smooth CSS grid animations, customizable collapsed heights with fade-out preview, and four visual variants. Supports both data-driven rendering via `items` array and slot-based composition with `VcAccordionItem`.
|
|
@@ -17,6 +23,8 @@ When NOT to use:
|
|
|
17
23
|
|
|
18
24
|
## Quick Start
|
|
19
25
|
|
|
26
|
+
::storybook id="action-vcaccordion--default"
|
|
27
|
+
|
|
20
28
|
```vue
|
|
21
29
|
<template>
|
|
22
30
|
<VcAccordion
|
|
@@ -38,6 +46,9 @@ const faqItems = [
|
|
|
38
46
|
|
|
39
47
|
## Features
|
|
40
48
|
|
|
49
|
+
!!! tip "Use v-model to control initial open state"
|
|
50
|
+
Without `v-model`, no items are expanded on mount. Pass an initial value to pre-open a specific item.
|
|
51
|
+
|
|
41
52
|
### Visual Variants
|
|
42
53
|
|
|
43
54
|
Four variants control the visual grouping and spacing of accordion items.
|
|
@@ -78,6 +89,8 @@ const items = [
|
|
|
78
89
|
</script>
|
|
79
90
|
```
|
|
80
91
|
|
|
92
|
+
::storybook id="action-vcaccordion--bordered-variant"
|
|
93
|
+
|
|
81
94
|
### Multiple Open Items
|
|
82
95
|
|
|
83
96
|
Set `multiple` to `true` to allow expanding several items simultaneously. The `v-model` value becomes an array.
|
|
@@ -86,6 +99,8 @@ Set `multiple` to `true` to allow expanding several items simultaneously. The `v
|
|
|
86
99
|
<VcAccordion v-model="openItems" :items="items" :multiple="true" />
|
|
87
100
|
```
|
|
88
101
|
|
|
102
|
+
::storybook id="action-vcaccordion--multiple-open"
|
|
103
|
+
|
|
89
104
|
### Partial Content Preview (collapsedHeight)
|
|
90
105
|
|
|
91
106
|
When `collapsedHeight` > 0, collapsed items show that many pixels of content with a fade-out gradient. The chevron only appears when content overflows.
|
|
@@ -262,6 +277,8 @@ interface AccordionItem {
|
|
|
262
277
|
|
|
263
278
|
- [VcAccordionItem](./_internal/vc-accordion-item/) -- individual accordion panel (used internally and available via the default slot)
|
|
264
279
|
|
|
280
|
+
::storybook id="action-vcaccordion--skeleton"
|
|
281
|
+
|
|
265
282
|
## Skeleton / Loading State
|
|
266
283
|
|
|
267
284
|
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.
|
package/runtime/knowledge/docs/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.docs.md
CHANGED
|
@@ -1,7 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: VcBreadcrumbs
|
|
3
|
+
category: components
|
|
4
|
+
group: navigation
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
!!! tip "Quick reference"
|
|
8
|
+
Jump to [Props](#props) · [Slots](#slots) · [CSS Variables](#css-variables) · [Accessibility](#accessibility)
|
|
9
|
+
|
|
1
10
|
# VcBreadcrumbs
|
|
2
11
|
|
|
3
12
|
Navigation breadcrumb trail that displays the user's location within a hierarchy and adaptively collapses middle items into a dropdown when horizontal space is limited.
|
|
4
13
|
|
|
14
|
+
::storybook id="navigation-vcbreadcrumbs--default"
|
|
15
|
+
|
|
5
16
|
## When to Use
|
|
6
17
|
|
|
7
18
|
- Showing the user's current position in a blade navigation hierarchy
|
|
@@ -51,6 +62,8 @@ interface Breadcrumbs {
|
|
|
51
62
|
|
|
52
63
|
## Adaptive Overflow
|
|
53
64
|
|
|
65
|
+
::storybook id="navigation-vcbreadcrumbs--many-items"
|
|
66
|
+
|
|
54
67
|
VcBreadcrumbs monitors the container width with `useAdaptiveItems` and automatically collapses middle items into a dropdown when they do not fit. The first and last items stay visible; overflow items appear behind a "more" button (vertical ellipsis).
|
|
55
68
|
|
|
56
69
|
The collapse algorithm uses a reverse strategy -- it hides items starting from the left (after the first) so the current page (last item) always remains visible.
|
|
@@ -64,6 +77,8 @@ The collapse algorithm uses a reverse strategy -- it hides items starting from t
|
|
|
64
77
|
|
|
65
78
|
## Separated Style
|
|
66
79
|
|
|
80
|
+
::storybook id="navigation-vcbreadcrumbs--separated"
|
|
81
|
+
|
|
67
82
|
Enable slash separators between items with the `separated` prop:
|
|
68
83
|
|
|
69
84
|
```vue
|
|
@@ -275,3 +290,15 @@ clickHandler: () => { navigate(); return true; }
|
|
|
275
290
|
- [VcDropdown](../vc-dropdown/) -- Used internally to render the overflow menu
|
|
276
291
|
- [VcBreadcrumbsItem](./_internal/vc-breadcrumbs-item/) -- Internal sub-component for individual breadcrumb rendering
|
|
277
292
|
- [VcButton](../../atoms/vc-button/) -- Can be used inside the `trigger` slot for a styled overflow button
|
|
293
|
+
|
|
294
|
+
<!-- internal:start -->
|
|
295
|
+
|
|
296
|
+
## Architecture Notes
|
|
297
|
+
|
|
298
|
+
- Overflow detection uses `useAdaptiveItems` composable with `calculationStrategy: "reverse"` — items are hidden starting from the second item (left side), keeping the last item (current page) always visible.
|
|
299
|
+
- `MORE_BUTTON_WIDTH = 36` and `INITIAL_ITEM_WIDTH = 60` are conservative estimates used in the initial layout pass before DOM measurement.
|
|
300
|
+
- The `VcDropdown` instance for the overflow menu uses `floating` and `placement="bottom-start"`.
|
|
301
|
+
- `VcBreadcrumbsItem` is an internal sub-component in `_internal/vc-breadcrumbs-item/` — not exported from the index.
|
|
302
|
+
- The `useBreadcrumbs` composable lives in `framework/core/composables/useBreadcrumbs/`.
|
|
303
|
+
|
|
304
|
+
<!-- internal:end -->
|
|
@@ -1,7 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: VcCheckbox
|
|
3
|
+
category: components
|
|
4
|
+
group: form
|
|
5
|
+
---
|
|
6
|
+
|
|
1
7
|
# VcCheckbox
|
|
2
8
|
|
|
3
9
|
A checkbox component supporting boolean toggling, array-based multi-selection, indeterminate state, three size variants, and animated check/uncheck transitions. Works as both a standalone boolean toggle and a member of a multi-select group.
|
|
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-vccheckbox--basic"
|
|
15
|
+
|
|
5
16
|
## When to Use
|
|
6
17
|
|
|
7
18
|
- Single boolean toggle with an inline label (e.g., "I agree to terms")
|
|
@@ -69,6 +80,8 @@ const selected = ref<string[]>([]);
|
|
|
69
80
|
|
|
70
81
|
### Size Variants
|
|
71
82
|
|
|
83
|
+
::storybook id="form-vccheckbox--sizes"
|
|
84
|
+
|
|
72
85
|
Three sizes are available via the `size` prop:
|
|
73
86
|
|
|
74
87
|
| Size | Value | Pixel dimension |
|
|
@@ -85,6 +98,8 @@ Three sizes are available via the `size` prop:
|
|
|
85
98
|
|
|
86
99
|
### Indeterminate State (Select All)
|
|
87
100
|
|
|
101
|
+
::storybook id="form-vccheckbox--indeterminate"
|
|
102
|
+
|
|
88
103
|
The `indeterminate` prop renders a horizontal dash instead of a checkmark. This is commonly used for "select all" checkboxes where only some children are selected.
|
|
89
104
|
|
|
90
105
|
```vue
|
|
@@ -355,3 +370,15 @@ const selected = ref<string[]>([]);
|
|
|
355
370
|
## Skeleton / Loading State
|
|
356
371
|
|
|
357
372
|
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.
|
|
373
|
+
|
|
374
|
+
<!-- internal:start -->
|
|
375
|
+
|
|
376
|
+
## Architecture Notes
|
|
377
|
+
|
|
378
|
+
- VcCheckbox uses a visually hidden native `<input type="checkbox">` for full keyboard and screen reader support. The custom visual (`vc-checkbox__custom-input`) mirrors its state via CSS sibling selectors (`:checked + .vc-checkbox__custom-input`).
|
|
379
|
+
- Indeterminate state is set imperatively (`checkboxRef.value.indeterminate = val`) since HTML does not support `indeterminate` as an attribute — a watcher syncs the prop to the DOM property.
|
|
380
|
+
- Check/uncheck icons use Vue `<Transition name="vc-checkbox-check">` with `@keyframes` animations for the scale/opacity effect.
|
|
381
|
+
- `useFormField` injects validation context (error, disabled, name) from a parent form provider.
|
|
382
|
+
- Source file: `framework/ui/components/molecules/vc-checkbox/vc-checkbox.vue`
|
|
383
|
+
|
|
384
|
+
<!-- internal:end -->
|
package/runtime/knowledge/docs/ui/components/molecules/vc-checkbox-group/vc-checkbox-group.docs.md
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: VcCheckboxGroup
|
|
3
|
+
category: components
|
|
4
|
+
group: form
|
|
5
|
+
---
|
|
6
|
+
|
|
1
7
|
# VcCheckboxGroup
|
|
2
8
|
|
|
3
9
|
Accessible checkbox group that wraps multiple checkboxes in a semantic fieldset with shared label, hint, error state, and layout control.
|
|
4
10
|
|
|
11
|
+
::storybook id="form-vccheckboxgroup--default"
|
|
12
|
+
|
|
5
13
|
## When to Use
|
|
6
14
|
|
|
7
15
|
- Selecting multiple options from a set (e.g., notification channels, feature flags)
|
|
@@ -75,6 +83,8 @@ interface CheckboxGroupOption<V = string | number | boolean> {
|
|
|
75
83
|
|
|
76
84
|
### Horizontal Layout
|
|
77
85
|
|
|
86
|
+
::storybook id="form-vccheckboxgroup--horizontal"
|
|
87
|
+
|
|
78
88
|
```vue
|
|
79
89
|
<VcCheckboxGroup
|
|
80
90
|
v-model="permissions"
|
|
@@ -90,6 +100,8 @@ interface CheckboxGroupOption<V = string | number | boolean> {
|
|
|
90
100
|
|
|
91
101
|
### With Disabled Option
|
|
92
102
|
|
|
103
|
+
::storybook id="form-vccheckboxgroup--with-disabled-option"
|
|
104
|
+
|
|
93
105
|
```vue
|
|
94
106
|
<VcCheckboxGroup
|
|
95
107
|
v-model="selected"
|
|
@@ -135,3 +147,14 @@ interface CheckboxGroupOption<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
|
+
- VcCheckboxGroup delegates rendering to `VcInputGroup` (semantic fieldset wrapper) and renders `VcCheckbox` 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
|
+
- `normalizedModelValue` guards against non-array `modelValue` to avoid runtime errors when the parent passes `undefined`.
|
|
158
|
+
- Source file: `framework/ui/components/molecules/vc-checkbox-group/vc-checkbox-group.vue`
|
|
159
|
+
|
|
160
|
+
<!-- internal:end -->
|
package/runtime/knowledge/docs/ui/components/molecules/vc-color-input/vc-color-input.docs.md
CHANGED
|
@@ -1,7 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: VcColorInput
|
|
3
|
+
category: components
|
|
4
|
+
group: form
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
!!! tip "Quick reference"
|
|
8
|
+
See [Key Props](#key-props) for the full prop table, or jump to [Common Patterns](#common-patterns) for copy-paste examples.
|
|
9
|
+
|
|
1
10
|
# VcColorInput
|
|
2
11
|
|
|
3
12
|
A color input that combines a text field for hex values with a clickable color swatch that opens the native browser color picker. Accepts hex codes and CSS color names.
|
|
4
13
|
|
|
14
|
+
::storybook id="form-vccolorinput--default"
|
|
15
|
+
|
|
5
16
|
## Overview
|
|
6
17
|
|
|
7
18
|
Color selection is needed in various admin scenarios: configuring brand colors, setting category badges, defining product attribute colors, or customizing theme variables. The native HTML `<input type="color">` provides a color picker but lacks text entry, validation, and consistent styling.
|
|
@@ -53,6 +64,8 @@ const color = ref<string | null>(null);
|
|
|
53
64
|
|
|
54
65
|
### With Validation
|
|
55
66
|
|
|
67
|
+
::storybook id="form-vccolorinput--with-error"
|
|
68
|
+
|
|
56
69
|
```vue
|
|
57
70
|
<template>
|
|
58
71
|
<VcColorInput
|
|
@@ -198,3 +211,14 @@ The native color picker does not support alpha/transparency. If you need RGBA co
|
|
|
198
211
|
## Skeleton / Loading State
|
|
199
212
|
|
|
200
213
|
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.
|
|
214
|
+
|
|
215
|
+
<!-- internal:start -->
|
|
216
|
+
|
|
217
|
+
## Architecture Notes
|
|
218
|
+
|
|
219
|
+
- The swatch button is a native `<button type="button">` that triggers a hidden `<input type="color">` via programmatic `.click()`. The native color picker is not visible — only the swatch button is.
|
|
220
|
+
- Color synchronization: typing in the text field updates `modelValue` directly; selecting from the native picker emits the new hex value and also updates the text field.
|
|
221
|
+
- The component does NOT validate hex format — any string is accepted as-is and the swatch will display whatever color the browser interprets.
|
|
222
|
+
- Source file: `framework/ui/components/molecules/vc-color-input/vc-color-input.vue`
|
|
223
|
+
|
|
224
|
+
<!-- internal:end -->
|
package/runtime/knowledge/docs/ui/components/molecules/vc-date-picker/vc-date-picker.docs.md
CHANGED
|
@@ -1,7 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: VcDatePicker
|
|
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
|
# VcDatePicker
|
|
2
11
|
|
|
3
12
|
A date and datetime picker that wraps the [VueDatePicker](https://vue3datepicker.com/) library with the standard form field chrome (label, hint, error, focus ring). Formats dates using the browser's locale and automatically detects 12-hour vs. 24-hour time format.
|
|
4
13
|
|
|
14
|
+
::storybook id="form-vcdatepicker--default"
|
|
15
|
+
|
|
5
16
|
## When to Use
|
|
6
17
|
|
|
7
18
|
- Selecting a single date value (e.g., delivery date, publication date)
|
|
@@ -39,6 +50,8 @@ const date = ref<Date | null>(null);
|
|
|
39
50
|
|
|
40
51
|
### Date vs. DateTime Mode
|
|
41
52
|
|
|
53
|
+
::storybook id="form-vcdatepicker--date-time"
|
|
54
|
+
|
|
42
55
|
The `type` prop controls whether the picker shows a date-only calendar or includes an inline time picker.
|
|
43
56
|
|
|
44
57
|
```vue
|
|
@@ -130,6 +143,8 @@ const form = reactive({
|
|
|
130
143
|
|
|
131
144
|
### States
|
|
132
145
|
|
|
146
|
+
::storybook id="form-vcdatepicker--with-error"
|
|
147
|
+
|
|
133
148
|
```vue
|
|
134
149
|
<!-- Required -->
|
|
135
150
|
<VcDatePicker v-model="date" label="Due date" required />
|
|
@@ -345,3 +360,15 @@ Uses the same `--input-*` variables as VcInput for consistent styling across all
|
|
|
345
360
|
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.
|
|
346
361
|
|
|
347
362
|
This behavior is powered by `BladeLoadingKey` via Vue's provide/inject. The component injects the loading state from the nearest `VcBlade` ancestor.
|
|
363
|
+
|
|
364
|
+
<!-- internal:start -->
|
|
365
|
+
|
|
366
|
+
## Architecture Notes
|
|
367
|
+
|
|
368
|
+
- Wraps the third-party `VueDatePicker` component. The underlying library is `@vuepic/vue-datepicker`.
|
|
369
|
+
- 12h/24h auto-detection uses the `Intl.DateTimeFormat` API with a sentinel date (midnight on 2023-01-01) to check if the locale's time representation contains "AM" or "PM".
|
|
370
|
+
- The `datePickerOptions` prop is spread onto `<VueDatePicker>` via `v-bind`. Props explicitly set on `VcDatePicker` take precedence over `datePickerOptions` entries of the same name.
|
|
371
|
+
- The `maxDate` for date-only mode is capped at `9999-12-31` to prevent the underlying library from crashing on out-of-range dates.
|
|
372
|
+
- Source file: `framework/ui/components/molecules/vc-date-picker/vc-date-picker.vue`
|
|
373
|
+
|
|
374
|
+
<!-- internal:end -->
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: VcDropdown
|
|
3
|
+
category: components
|
|
4
|
+
group: navigation
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
!!! tip "Quick reference"
|
|
8
|
+
Jump to [Props](#props) · [Events](#events) · [Slots](#slots) · [CSS Variables](#css-variables) · [Accessibility](#accessibility)
|
|
9
|
+
|
|
1
10
|
# VcDropdown
|
|
2
11
|
|
|
3
12
|
A headless, accessible dropdown primitive for building menus and listboxes. Provides floating positioning via `@floating-ui`, full keyboard navigation, slot-based rendering, and configurable close behavior. This is a low-level building block -- for form field selection, use VcSelect instead.
|
|
@@ -17,6 +26,8 @@ When NOT to use:
|
|
|
17
26
|
|
|
18
27
|
## Quick Start
|
|
19
28
|
|
|
29
|
+
::storybook id="overlay-vcdropdown--action-menu"
|
|
30
|
+
|
|
20
31
|
```vue
|
|
21
32
|
<template>
|
|
22
33
|
<VcDropdown
|
|
@@ -97,6 +108,8 @@ Build rich action menus by customizing the `#item` slot with icons, labels, and
|
|
|
97
108
|
|
|
98
109
|
### Listbox Mode (Selection Switcher)
|
|
99
110
|
|
|
111
|
+
::storybook id="overlay-vcdropdown--workspace-switcher"
|
|
112
|
+
|
|
100
113
|
Use `role="listbox"` for option-selection patterns. Combine with `isItemActive` to highlight the current selection and `aria-selected` is set automatically.
|
|
101
114
|
|
|
102
115
|
```vue
|
|
@@ -369,3 +382,17 @@ By default, `padded` is `true`, which adds compact padding and rounded item back
|
|
|
369
382
|
- [VcDropdownPanel](../vc-dropdown-panel/) -- floating panel with header, footer, and scrollable content
|
|
370
383
|
- [VcSelect](../vc-select/) -- form field dropdown for selecting values with label and validation
|
|
371
384
|
- [VcMenu](../vc-menu/) -- sidebar navigation menu
|
|
385
|
+
|
|
386
|
+
<!-- internal:start -->
|
|
387
|
+
|
|
388
|
+
## Architecture Notes
|
|
389
|
+
|
|
390
|
+
- `VcDropdown` is a generic component (`generic="T"`). TypeScript infers `T` from the `items` prop, giving type-safe `item-click` payloads and slot props.
|
|
391
|
+
- Floating positioning uses `useFloatingPosition` (a thin wrapper around `@floating-ui/vue`) with `autoUpdate: true` when `floating` is enabled — the panel recalculates its position on scroll/resize.
|
|
392
|
+
- Teleport target is determined by `useTeleportTarget`. When `floating` is `true`, the panel is teleported to avoid z-index stacking context issues.
|
|
393
|
+
- Keyboard navigation (`ArrowDown`, `ArrowUp`, `Home`, `End`, `Enter`/`Space`, `Escape`) is handled in `onPanelKeydown`. Escape also attaches a document-level listener when the dropdown is open to catch events that bubble past the panel.
|
|
394
|
+
- `syncFocusedIndex` is called on open to pre-focus the active item (via `isItemActive`) or the first item.
|
|
395
|
+
- The `VcDropdownItem` internal sub-component (in `_internal/VcDropdownItem.vue`) is used by `VcBreadcrumbs` for its overflow menu items.
|
|
396
|
+
- Default `zIndex` is `9300` (matches the CSS custom property `--z-critical-dropdown`).
|
|
397
|
+
|
|
398
|
+
<!-- internal:end -->
|
package/runtime/knowledge/docs/ui/components/molecules/vc-dropdown-panel/vc-dropdown-panel.docs.md
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: VcDropdownPanel
|
|
3
|
+
category: components
|
|
4
|
+
group: navigation
|
|
5
|
+
---
|
|
6
|
+
|
|
1
7
|
# VcDropdownPanel
|
|
2
8
|
|
|
3
9
|
Floating dropdown panel positioned relative to an anchor element, with header, scrollable content, and optional footer. Built on `@floating-ui/vue`.
|
|
4
10
|
|
|
11
|
+
::storybook id="overlay-vcdropdownpanel--default"
|
|
12
|
+
|
|
5
13
|
## When to Use
|
|
6
14
|
|
|
7
15
|
- Rich dropdown content with a title bar and action buttons (e.g., filter panels, settings popovers)
|
|
@@ -70,6 +78,8 @@ const open = ref(false);
|
|
|
70
78
|
|
|
71
79
|
## Common Patterns
|
|
72
80
|
|
|
81
|
+
::storybook id="overlay-vcdropdownpanel--with-footer"
|
|
82
|
+
|
|
73
83
|
### Filter Panel with Footer Actions
|
|
74
84
|
|
|
75
85
|
```vue
|
|
@@ -142,3 +152,15 @@ const open = ref(false);
|
|
|
142
152
|
|
|
143
153
|
- [VcDropdown](../vc-dropdown/) — headless dropdown for simple item lists
|
|
144
154
|
- [VcSelect](../vc-select/) — form field selection dropdown
|
|
155
|
+
|
|
156
|
+
<!-- internal:start -->
|
|
157
|
+
|
|
158
|
+
## Architecture Notes
|
|
159
|
+
|
|
160
|
+
- Click-outside detection uses a `pointerdown` listener on `document` rather than a backdrop overlay. This ensures clicks on high-z-index siblings (sidebar, other teleported panels) are still caught.
|
|
161
|
+
- `panelAnchorRegistry` (`panel-anchor-registry.ts`) is a `WeakMap<Element, HTMLElement | null>` that maps each open panel's DOM element to its anchor. This is used to distinguish child panels (whose anchor lives inside this panel) from sibling/parent panels when deciding whether to close on outside click.
|
|
162
|
+
- Nested VcSelect dropdowns teleported to `<body>` are exempt from click-outside via an ARIA `aria-controls` check: if the clicked `.vc-select__dropdown` has an `id` that matches an `aria-controls` attribute inside this panel, the close is suppressed.
|
|
163
|
+
- The panel exposes a `close()` method via `defineExpose` for use with template refs.
|
|
164
|
+
- `useTeleportTarget` resolves the teleport destination (typically `body`) respecting any custom portal container.
|
|
165
|
+
|
|
166
|
+
<!-- internal:end -->
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: VcEditor
|
|
3
|
+
category: components
|
|
4
|
+
group: form
|
|
5
|
+
---
|
|
6
|
+
|
|
1
7
|
# VcEditor
|
|
2
8
|
|
|
3
9
|
A rich text editor built on TipTap that supports both Markdown and HTML content. Includes a customizable toolbar, multiple view modes (WYSIWYG, preview, source, split), fullscreen editing, image upload, character limits, and plugin-style custom toolbar buttons.
|
|
@@ -17,6 +23,8 @@ When NOT to use:
|
|
|
17
23
|
|
|
18
24
|
## Quick Start
|
|
19
25
|
|
|
26
|
+
::storybook id="form-vceditor--default" height="500"
|
|
27
|
+
|
|
20
28
|
```vue
|
|
21
29
|
<template>
|
|
22
30
|
<VcEditor
|
|
@@ -50,6 +58,9 @@ The editor header provides four view modes plus a fullscreen toggle:
|
|
|
50
58
|
|
|
51
59
|
The editor automatically detects whether content is Markdown or HTML based on pattern analysis and outputs in the same format. HTML content is auto-formatted with Prettier in source/split views.
|
|
52
60
|
|
|
61
|
+
!!! note "Content format is auto-detected"
|
|
62
|
+
VcEditor detects whether content is Markdown or HTML and outputs in the same format. If you pass Markdown input, you will get Markdown output. If you need HTML output, start with HTML content.
|
|
63
|
+
|
|
53
64
|
### Custom Toolbar Configuration
|
|
54
65
|
|
|
55
66
|
Limit which toolbar buttons appear by passing a `toolbar` array. Only the specified buttons will render. Available toolbar names:
|
|
@@ -80,6 +91,8 @@ When `assetsFolder` is provided, the image toolbar button becomes functional. Cl
|
|
|
80
91
|
|
|
81
92
|
Multiple images can be selected at once. The upload accepts any image file type (`image/*`).
|
|
82
93
|
|
|
94
|
+
::storybook id="form-vceditor--custom-toolbar" height="500"
|
|
95
|
+
|
|
83
96
|
### Custom Toolbar Buttons (Plugin System)
|
|
84
97
|
|
|
85
98
|
Extend the toolbar with custom buttons or dropdowns. Each custom button specifies an `id`, `label`, `icon`, `action` callback, and optional `group`/`order` for positioning.
|
|
@@ -133,6 +146,8 @@ Pass extra TipTap extensions via the `extensions` prop to augment the built-in s
|
|
|
133
146
|
<VcEditor v-model="content" :extensions="[Highlight.configure({ multicolor: true })]" />
|
|
134
147
|
```
|
|
135
148
|
|
|
149
|
+
::storybook id="form-vceditor--with-custom-buttons" height="500"
|
|
150
|
+
|
|
136
151
|
### Validation with vee-validate Field
|
|
137
152
|
|
|
138
153
|
Integrate with vee-validate's `Field` component for form-level validation.
|
|
@@ -283,6 +298,8 @@ const content = ref("<h1>Title</h1>");
|
|
|
283
298
|
- [VcTextarea](../vc-textarea/) -- plain multi-line text input (no formatting)
|
|
284
299
|
- [VcInput](../vc-input/) -- single-line text input
|
|
285
300
|
|
|
301
|
+
::storybook id="form-vceditor--skeleton"
|
|
302
|
+
|
|
286
303
|
## Skeleton / Loading State
|
|
287
304
|
|
|
288
305
|
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,3 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: VcField
|
|
3
|
+
category: components
|
|
4
|
+
group: form
|
|
5
|
+
---
|
|
6
|
+
|
|
1
7
|
# VcField
|
|
2
8
|
|
|
3
9
|
Read-only display component for labeled information, supporting various content types like text, dates, links, and emails.
|
|
@@ -18,6 +24,8 @@ The component uses a vertical layout by default (label above value), but support
|
|
|
18
24
|
|
|
19
25
|
## Basic Usage
|
|
20
26
|
|
|
27
|
+
::storybook id="form-vcfield--default"
|
|
28
|
+
|
|
21
29
|
```vue
|
|
22
30
|
<template>
|
|
23
31
|
<VcField
|
|
@@ -31,6 +39,9 @@ import { VcField } from "@vc-shell/framework";
|
|
|
31
39
|
</script>
|
|
32
40
|
```
|
|
33
41
|
|
|
42
|
+
!!! tip "Prefer VcField over disabled VcInput for read-only data"
|
|
43
|
+
VcField renders without form-field chrome (borders, focus rings, placeholders) and formats content in a type-aware way. A disabled `VcInput` carries unnecessary visual noise for display-only scenarios.
|
|
44
|
+
|
|
34
45
|
## Key Props
|
|
35
46
|
|
|
36
47
|
| Prop | Type | Default | Description |
|
|
@@ -91,6 +102,8 @@ Each `type` value renders the content differently:
|
|
|
91
102
|
</template>
|
|
92
103
|
```
|
|
93
104
|
|
|
105
|
+
::storybook id="form-vcfield--link" height="300"
|
|
106
|
+
|
|
94
107
|
### Horizontal Layout with Custom Ratio
|
|
95
108
|
|
|
96
109
|
Use horizontal layout for compact key-value displays where the label and value sit side by side. The `aspectRatio` controls the relative widths of the label and value columns:
|
|
@@ -121,6 +134,8 @@ Use horizontal layout for compact key-value displays where the label and value s
|
|
|
121
134
|
</template>
|
|
122
135
|
```
|
|
123
136
|
|
|
137
|
+
::storybook id="form-vcfield--horizontal"
|
|
138
|
+
|
|
124
139
|
### Copyable ID Fields
|
|
125
140
|
|
|
126
141
|
The copy button provides visual feedback (checkmark icon for 1 second) after a successful copy:
|
|
@@ -211,6 +226,8 @@ In `orientation="horizontal"` the component reserves the `aspectRatio[0]` track
|
|
|
211
226
|
- [VcLabel](../../atoms/vc-label/) -- standalone label atom used internally
|
|
212
227
|
- [VcCol](../../atoms/vc-col/) -- column layout atom used for aspect ratio
|
|
213
228
|
|
|
229
|
+
::storybook id="form-vcfield--skeleton"
|
|
230
|
+
|
|
214
231
|
## Skeleton / Loading State
|
|
215
232
|
|
|
216
233
|
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.
|
package/runtime/knowledge/docs/ui/components/molecules/vc-file-upload/vc-file-upload.docs.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: VcFileUpload
|
|
3
|
+
category: components
|
|
4
|
+
group: form
|
|
5
|
+
---
|
|
6
|
+
|
|
1
7
|
# VcFileUpload
|
|
2
8
|
|
|
3
9
|
Drag-and-drop file upload zone with file type filtering, validation, loading state, and error display. Provides both drag-and-drop and click-to-browse interactions in a single drop zone.
|
|
@@ -15,6 +21,8 @@ Drag-and-drop file upload zone with file type filtering, validation, loading sta
|
|
|
15
21
|
|
|
16
22
|
## Quick Start
|
|
17
23
|
|
|
24
|
+
::storybook id="form-vcfileupload--default"
|
|
25
|
+
|
|
18
26
|
```vue
|
|
19
27
|
<template>
|
|
20
28
|
<VcFileUpload
|
|
@@ -75,6 +83,9 @@ Integrate with vee-validate for file validation rules such as size limits:
|
|
|
75
83
|
|
|
76
84
|
When validation fails, the error is displayed below the drop zone using the built-in `VcHint` component. The `upload` event is only emitted when validation passes.
|
|
77
85
|
|
|
86
|
+
!!! warning "FileList is not a plain Array"
|
|
87
|
+
The `upload` event emits a `FileList` object, not `File[]`. Always convert with `Array.from(files)` before calling array methods like `.map()` or `.filter()`.
|
|
88
|
+
|
|
78
89
|
## Loading State
|
|
79
90
|
|
|
80
91
|
Show a loading overlay while files are being processed or uploaded:
|
|
@@ -102,6 +113,8 @@ Override the default drag-and-drop instructions and icon:
|
|
|
102
113
|
|
|
103
114
|
The default icon is `"lucide-cloud-upload"`. The default text is pulled from the `COMPONENTS.MOLECULES.VC_FILE_UPLOAD.DRAG_HERE` and `COMPONENTS.MOLECULES.VC_FILE_UPLOAD.BROWSE` locale keys.
|
|
104
115
|
|
|
116
|
+
::storybook id="form-vcfileupload--loading"
|
|
117
|
+
|
|
105
118
|
## Error Display
|
|
106
119
|
|
|
107
120
|
Errors can come from three sources (by priority): the `errorMessage` prop, vee-validate `rules`, or the `error` slot for fully custom rendering.
|
|
@@ -120,6 +133,8 @@ Errors can come from three sources (by priority): the `errorMessage` prop, vee-v
|
|
|
120
133
|
|
|
121
134
|
When any error is present, the drop zone border changes to the error color and a ring appears.
|
|
122
135
|
|
|
136
|
+
::storybook id="form-vcfileupload--with-error-message"
|
|
137
|
+
|
|
123
138
|
## Disabled State
|
|
124
139
|
|
|
125
140
|
Disable all interactions (drag, drop, click, keyboard):
|
|
@@ -316,6 +331,8 @@ async function onUpload(files: FileList) {
|
|
|
316
331
|
- [VcImageTile](../vc-image-tile/) -- Image display tile used inside galleries
|
|
317
332
|
- [VcHint](../../atoms/vc-hint/) -- Used internally for error message display
|
|
318
333
|
|
|
334
|
+
::storybook id="form-vcfileupload--skeleton"
|
|
335
|
+
|
|
319
336
|
## Skeleton / Loading State
|
|
320
337
|
|
|
321
338
|
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,3 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: VcForm
|
|
3
|
+
category: components
|
|
4
|
+
group: form
|
|
5
|
+
---
|
|
6
|
+
|
|
1
7
|
# VcForm
|
|
2
8
|
|
|
3
9
|
A lightweight `<form>` wrapper that provides consistent styling, prevents default browser submission, and serves as the standard container for validated form fields in blade detail views.
|
|
@@ -16,6 +22,8 @@ A lightweight `<form>` wrapper that provides consistent styling, prevents defaul
|
|
|
16
22
|
|
|
17
23
|
## Quick Start
|
|
18
24
|
|
|
25
|
+
::storybook id="form-vcform--basic"
|
|
26
|
+
|
|
19
27
|
```vue
|
|
20
28
|
<template>
|
|
21
29
|
<VcForm @submit="handleSubmit">
|
|
@@ -50,6 +58,9 @@ function handleSubmit() {
|
|
|
50
58
|
|
|
51
59
|
---
|
|
52
60
|
|
|
61
|
+
!!! note "Form validation is handled by vee-validate"
|
|
62
|
+
VcForm itself does not validate fields — it only provides the `<form>` wrapper. Use vee-validate's `Field` component around each input that needs validation rules.
|
|
63
|
+
|
|
53
64
|
## Features
|
|
54
65
|
|
|
55
66
|
### Basic Form Layout (VcForm + VcRow + VcCol)
|
|
@@ -174,6 +185,8 @@ const bladeToolbar = ref<IBladeToolbar[]>([
|
|
|
174
185
|
|
|
175
186
|
---
|
|
176
187
|
|
|
188
|
+
::storybook id="form-vcform--with-fieldsets" height="500"
|
|
189
|
+
|
|
177
190
|
## Recipes
|
|
178
191
|
|
|
179
192
|
### Complete CRUD Blade Form
|
|
@@ -303,6 +316,8 @@ onBeforeClose(async () => {
|
|
|
303
316
|
</script>
|
|
304
317
|
```
|
|
305
318
|
|
|
319
|
+
::storybook id="form-vcform--horizontal-layout" height="400"
|
|
320
|
+
|
|
306
321
|
### Form with Mixed Field Types
|
|
307
322
|
|
|
308
323
|
Demonstrates inputs, selects, checkboxes, and switches together in a single form.
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: VcImageTile
|
|
3
|
+
category: components
|
|
4
|
+
group: data-display
|
|
5
|
+
---
|
|
6
|
+
|
|
1
7
|
# VcImageTile
|
|
2
8
|
|
|
3
9
|
Square image tile with skeleton loading, fade-in transition, and a slide-up action tray on hover (desktop) or tap (touch devices).
|
|
@@ -10,6 +16,8 @@ Square image tile with skeleton loading, fade-in transition, and a slide-up acti
|
|
|
10
16
|
|
|
11
17
|
## Basic Usage
|
|
12
18
|
|
|
19
|
+
::storybook id="action-vcimagetile--default"
|
|
20
|
+
|
|
13
21
|
```vue
|
|
14
22
|
<template>
|
|
15
23
|
<div style="width: 160px;">
|
|
@@ -73,6 +81,8 @@ interface VcImageTileActions {
|
|
|
73
81
|
|
|
74
82
|
## Common Patterns
|
|
75
83
|
|
|
84
|
+
::storybook id="action-vcimagetile--all-actions"
|
|
85
|
+
|
|
76
86
|
### Image Grid
|
|
77
87
|
|
|
78
88
|
```vue
|
|
@@ -114,6 +124,8 @@ interface VcImageTileActions {
|
|
|
114
124
|
</VcImageTile>
|
|
115
125
|
```
|
|
116
126
|
|
|
127
|
+
::storybook id="action-vcimagetile--skeleton"
|
|
128
|
+
|
|
117
129
|
### Skeleton State
|
|
118
130
|
|
|
119
131
|
When `src` is not provided or the image is still loading, a shimmer animation skeleton is displayed automatically. No additional configuration is needed.
|