@vc-shell/vc-app-skill 2.0.0-alpha.33 → 2.0.0-alpha.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +78 -54
- package/README.md +42 -12
- package/package.json +4 -4
- package/runtime/VERSION +1 -1
- package/runtime/agents/api-analyzer.md +31 -16
- package/runtime/agents/blade-enhancer.md +15 -9
- package/runtime/agents/details-blade-generator.md +47 -31
- package/runtime/agents/list-blade-generator.md +21 -37
- package/runtime/agents/locales-generator.md +3 -0
- package/runtime/agents/migration-agent.md +18 -7
- package/runtime/agents/module-analyzer.md +2 -0
- package/runtime/agents/module-assembler.md +15 -0
- package/runtime/agents/promote-agent.md +15 -4
- package/runtime/agents/type-checker.md +11 -0
- package/runtime/knowledge/docs/_BUILD_HASH.md +1 -1
- package/runtime/knowledge/docs/core/api/platform.docs.md +30 -30
- package/runtime/knowledge/docs/core/blade-navigation/blade-nav-composables.docs.md +41 -41
- package/runtime/knowledge/docs/core/composables/bladeContext/index.docs.md +12 -10
- package/runtime/knowledge/docs/core/composables/useApiClient/useApiClient.docs.md +11 -14
- package/runtime/knowledge/docs/core/composables/useAppBarMobileButtons/useAppBarMobileButtons.docs.md +35 -35
- package/runtime/knowledge/docs/core/composables/useAppBarWidget/useAppBarWidget.docs.md +35 -35
- package/runtime/knowledge/docs/core/composables/useAppInsights/useAppInsights.docs.md +15 -15
- package/runtime/knowledge/docs/core/composables/useAssets/useAssets.docs.md +21 -18
- package/runtime/knowledge/docs/core/composables/useAssetsManager/useAssetsManager.docs.md +28 -24
- package/runtime/knowledge/docs/core/composables/useAsync/useAsync.docs.md +90 -61
- package/runtime/knowledge/docs/core/composables/useBeforeUnload/useBeforeUnload.docs.md +19 -18
- package/runtime/knowledge/docs/core/composables/useBlade/useBlade.docs.md +89 -68
- package/runtime/knowledge/docs/core/composables/useBladeForm/useBladeForm.docs.md +27 -25
- package/runtime/knowledge/docs/core/composables/useBladeRegistry/useBladeRegistry.docs.md +15 -15
- package/runtime/knowledge/docs/core/composables/useBladeWidgets/index.docs.md +43 -47
- package/runtime/knowledge/docs/core/composables/useBreadcrumbs/useBreadcrumbs.docs.md +11 -11
- package/runtime/knowledge/docs/core/composables/useConnectionStatus/useConnectionStatus.docs.md +27 -15
- package/runtime/knowledge/docs/core/composables/useDashboard/useDashboard.docs.md +30 -30
- package/runtime/knowledge/docs/core/composables/useDynamicProperties/useDynamicProperties.docs.md +34 -36
- package/runtime/knowledge/docs/core/composables/useErrorHandler/useErrorHandler.docs.md +44 -23
- package/runtime/knowledge/docs/core/composables/useFunctions/useFunctions.docs.md +14 -11
- package/runtime/knowledge/docs/core/composables/useKeyboardNavigation/useKeyboardNavigation.docs.md +47 -38
- package/runtime/knowledge/docs/core/composables/useLanguages/useLanguages.docs.md +37 -28
- package/runtime/knowledge/docs/core/composables/useLoading/useLoading.docs.md +23 -17
- package/runtime/knowledge/docs/core/composables/useMenuExpanded/index.docs.md +9 -9
- package/runtime/knowledge/docs/core/composables/useMenuService/useMenuService.docs.md +42 -42
- package/runtime/knowledge/docs/core/composables/useModificationTracker/useModificationTracker.docs.md +22 -12
- package/runtime/knowledge/docs/core/composables/useNotifications/useNotifications.docs.md +33 -41
- package/runtime/knowledge/docs/core/composables/usePermissions/usePermissions.docs.md +16 -16
- package/runtime/knowledge/docs/core/composables/usePlatformLocaleSync/usePlatformLocaleSync.docs.md +28 -0
- package/runtime/knowledge/docs/core/composables/usePopup/usePopup.docs.md +32 -24
- package/runtime/knowledge/docs/core/composables/useResponsive/useResponsive.docs.md +32 -11
- package/runtime/knowledge/docs/core/composables/useSettings/useSettings.docs.md +22 -13
- package/runtime/knowledge/docs/core/composables/useSettingsMenu/useSettingsMenu.docs.md +7 -7
- package/runtime/knowledge/docs/core/composables/useSidebarState/useSidebarState.docs.md +32 -24
- package/runtime/knowledge/docs/core/composables/useSlowNetworkDetection/useSlowNetworkDetection.docs.md +21 -17
- package/runtime/knowledge/docs/core/composables/useTheme/useTheme.docs.md +24 -24
- package/runtime/knowledge/docs/core/composables/useToolbar/useToolbar.docs.md +28 -31
- package/runtime/knowledge/docs/core/composables/useUser/useUser.docs.md +43 -24
- package/runtime/knowledge/docs/core/composables/useUserManagement/useUserManagement.docs.md +68 -48
- package/runtime/knowledge/docs/core/composables/useWebVitals/useWebVitals.docs.md +19 -19
- package/runtime/knowledge/docs/core/composables/useWidgets/useWidgets.docs.md +42 -47
- package/runtime/knowledge/docs/core/directives/autofocus/autofocus.docs.md +10 -4
- package/runtime/knowledge/docs/core/directives/loading/loading.docs.md +35 -20
- package/runtime/knowledge/docs/core/notifications/notifications.docs.md +36 -35
- package/runtime/knowledge/docs/core/plugins/ai-agent/ai-agent.docs.md +38 -38
- package/runtime/knowledge/docs/core/plugins/extension-points/extension-points.docs.md +79 -62
- package/runtime/knowledge/docs/core/plugins/global-error-handler/global-error-handler.docs.md +10 -10
- package/runtime/knowledge/docs/core/plugins/i18n/i18n.docs.md +21 -23
- package/runtime/knowledge/docs/core/plugins/modularity/modularity.docs.md +91 -83
- package/runtime/knowledge/docs/core/plugins/permissions/permissions.docs.md +10 -16
- package/runtime/knowledge/docs/core/plugins/signalR/signalR.docs.md +9 -9
- package/runtime/knowledge/docs/core/plugins/validation/validation.docs.md +65 -22
- package/runtime/knowledge/docs/core/services/services.docs.md +19 -22
- package/runtime/knowledge/docs/core/types/types.docs.md +40 -40
- package/runtime/knowledge/docs/core/utilities/date/date-utilities.docs.md +27 -27
- package/runtime/knowledge/docs/core/utilities/shared-utilities.docs.md +23 -23
- package/runtime/knowledge/docs/core/utilities/thumbnail/thumbnail.docs.md +22 -25
- package/runtime/knowledge/docs/core/utilities/utilities.docs.md +64 -64
- package/runtime/knowledge/docs/injection-keys.docs.md +52 -51
- package/runtime/knowledge/docs/modules/assets-manager/assets-manager.docs.md +9 -9
- package/runtime/knowledge/docs/shell/_internal/popup/common/popup-common.docs.md +23 -43
- package/runtime/knowledge/docs/shell/auth/ChangePasswordPage/change-password-page.docs.md +5 -5
- package/runtime/knowledge/docs/shell/auth/ForgotPasswordPage/forgot-password-page.docs.md +5 -5
- package/runtime/knowledge/docs/shell/auth/InvitePage/invite-page.docs.md +8 -7
- package/runtime/knowledge/docs/shell/auth/LoginPage/login-page.docs.md +7 -7
- package/runtime/knowledge/docs/shell/auth/ResetPasswordPage/reset-password-page.docs.md +8 -7
- package/runtime/knowledge/docs/shell/auth/sign-in/sign-in.docs.md +29 -13
- package/runtime/knowledge/docs/shell/components/change-password/change-password.docs.md +13 -16
- package/runtime/knowledge/docs/shell/components/change-password-button/change-password-button.docs.md +1 -7
- package/runtime/knowledge/docs/shell/components/error-interceptor/error-interceptor.docs.md +5 -5
- package/runtime/knowledge/docs/shell/components/language-selector/language-selector.docs.md +1 -1
- package/runtime/knowledge/docs/shell/components/logout-button/logout-button.docs.md +1 -1
- package/runtime/knowledge/docs/shell/components/notification-template/notification-template.docs.md +17 -9
- package/runtime/knowledge/docs/shell/components/settings-menu/settings-menu.docs.md +11 -17
- package/runtime/knowledge/docs/shell/components/settings-menu-item/settings-menu-item.docs.md +34 -65
- package/runtime/knowledge/docs/shell/components/sidebar/sidebar.docs.md +16 -26
- package/runtime/knowledge/docs/shell/components/theme-selector/theme-selector.docs.md +2 -2
- package/runtime/knowledge/docs/shell/components/user-dropdown-button/user-dropdown-button.docs.md +7 -9
- package/runtime/knowledge/docs/shell/dashboard/dashboard-charts/dashboard-charts.docs.md +30 -40
- package/runtime/knowledge/docs/shell/dashboard/dashboard-widget-card/dashboard-widget-card.docs.md +26 -19
- package/runtime/knowledge/docs/shell/dashboard/draggable-dashboard/draggable-dashboard.docs.md +15 -12
- package/runtime/knowledge/docs/ui/components/atoms/vc-badge/vc-badge.docs.md +15 -26
- package/runtime/knowledge/docs/ui/components/atoms/vc-banner/vc-banner.docs.md +21 -19
- package/runtime/knowledge/docs/ui/components/atoms/vc-button/vc-button.docs.md +83 -67
- package/runtime/knowledge/docs/ui/components/atoms/vc-card/vc-card.docs.md +100 -59
- package/runtime/knowledge/docs/ui/components/atoms/vc-col/vc-col.docs.md +28 -11
- package/runtime/knowledge/docs/ui/components/atoms/vc-container/vc-container.docs.md +20 -17
- package/runtime/knowledge/docs/ui/components/atoms/vc-hint/vc-hint.docs.md +26 -17
- package/runtime/knowledge/docs/ui/components/atoms/vc-icon/vc-icon.docs.md +30 -32
- package/runtime/knowledge/docs/ui/components/atoms/vc-image/vc-image.docs.md +25 -48
- package/runtime/knowledge/docs/ui/components/atoms/vc-label/vc-label.docs.md +29 -24
- package/runtime/knowledge/docs/ui/components/atoms/vc-link/vc-link.docs.md +23 -15
- package/runtime/knowledge/docs/ui/components/atoms/vc-loading/vc-loading.docs.md +22 -13
- package/runtime/knowledge/docs/ui/components/atoms/vc-progress/vc-progress.docs.md +33 -18
- package/runtime/knowledge/docs/ui/components/atoms/vc-row/vc-row.docs.md +56 -15
- package/runtime/knowledge/docs/ui/components/atoms/vc-scrollable-container/vc-scrollable-container.docs.md +28 -15
- package/runtime/knowledge/docs/ui/components/atoms/vc-skeleton/vc-skeleton.docs.md +40 -20
- package/runtime/knowledge/docs/ui/components/atoms/vc-status/vc-status.docs.md +25 -14
- package/runtime/knowledge/docs/ui/components/atoms/vc-status-icon/vc-status-icon.docs.md +40 -14
- package/runtime/knowledge/docs/ui/components/atoms/vc-tooltip/vc-tooltip.docs.md +54 -42
- package/runtime/knowledge/docs/ui/components/atoms/vc-video/vc-video.docs.md +17 -17
- package/runtime/knowledge/docs/ui/components/atoms/vc-widget/vc-widget.docs.md +21 -21
- package/runtime/knowledge/docs/ui/components/molecules/multilanguage-selector/multilanguage-selector.docs.md +23 -10
- package/runtime/knowledge/docs/ui/components/molecules/vc-accordion/vc-accordion.docs.md +55 -44
- package/runtime/knowledge/docs/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.docs.md +23 -20
- package/runtime/knowledge/docs/ui/components/molecules/vc-checkbox/vc-checkbox.docs.md +92 -65
- package/runtime/knowledge/docs/ui/components/molecules/vc-checkbox-group/vc-checkbox-group.docs.md +22 -36
- package/runtime/knowledge/docs/ui/components/molecules/vc-color-input/vc-color-input.docs.md +65 -23
- package/runtime/knowledge/docs/ui/components/molecules/vc-date-picker/vc-date-picker.docs.md +52 -73
- package/runtime/knowledge/docs/ui/components/molecules/vc-dropdown/vc-dropdown.docs.md +91 -85
- package/runtime/knowledge/docs/ui/components/molecules/vc-dropdown-panel/vc-dropdown-panel.docs.md +38 -42
- package/runtime/knowledge/docs/ui/components/molecules/vc-editor/vc-editor.docs.md +56 -73
- package/runtime/knowledge/docs/ui/components/molecules/vc-field/vc-field.docs.md +61 -27
- package/runtime/knowledge/docs/ui/components/molecules/vc-file-upload/vc-file-upload.docs.md +42 -50
- package/runtime/knowledge/docs/ui/components/molecules/vc-form/vc-form.docs.md +35 -64
- package/runtime/knowledge/docs/ui/components/molecules/vc-image-tile/vc-image-tile.docs.md +38 -41
- package/runtime/knowledge/docs/ui/components/molecules/vc-input/vc-input.docs.md +109 -131
- package/runtime/knowledge/docs/ui/components/molecules/vc-input-currency/vc-input-currency.docs.md +47 -88
- package/runtime/knowledge/docs/ui/components/molecules/vc-input-dropdown/vc-input-dropdown.docs.md +50 -64
- package/runtime/knowledge/docs/ui/components/molecules/vc-input-group/vc-input-group.docs.md +29 -24
- package/runtime/knowledge/docs/ui/components/molecules/vc-menu/vc-menu.docs.md +32 -28
- package/runtime/knowledge/docs/ui/components/molecules/vc-multivalue/vc-multivalue.docs.md +57 -65
- package/runtime/knowledge/docs/ui/components/molecules/vc-pagination/vc-pagination.docs.md +28 -26
- package/runtime/knowledge/docs/ui/components/molecules/vc-radio-button/vc-radio-button.docs.md +55 -20
- package/runtime/knowledge/docs/ui/components/molecules/vc-radio-group/vc-radio-group.docs.md +21 -35
- package/runtime/knowledge/docs/ui/components/molecules/vc-rating/vc-rating.docs.md +38 -33
- package/runtime/knowledge/docs/ui/components/molecules/vc-select/vc-select.docs.md +72 -83
- package/runtime/knowledge/docs/ui/components/molecules/vc-slider/vc-slider.docs.md +21 -16
- package/runtime/knowledge/docs/ui/components/molecules/vc-switch/vc-switch.docs.md +55 -64
- package/runtime/knowledge/docs/ui/components/molecules/vc-textarea/vc-textarea.docs.md +51 -70
- package/runtime/knowledge/docs/ui/components/molecules/vc-toast/vc-toast.docs.md +58 -57
- package/runtime/knowledge/docs/ui/components/organisms/vc-app/vc-app.docs.md +49 -26
- package/runtime/knowledge/docs/ui/components/organisms/vc-auth-layout/vc-auth-layout.docs.md +82 -28
- package/runtime/knowledge/docs/ui/components/organisms/vc-blade/vc-blade.docs.md +90 -75
- package/runtime/knowledge/docs/ui/components/organisms/vc-data-table/composables/table-composables.docs.md +99 -48
- package/runtime/knowledge/docs/ui/components/organisms/vc-data-table/vc-data-table.docs.md +548 -367
- package/runtime/knowledge/docs/ui/components/organisms/vc-dynamic-property/vc-dynamic-property.docs.md +35 -52
- package/runtime/knowledge/docs/ui/components/organisms/vc-gallery/vc-gallery.docs.md +33 -62
- package/runtime/knowledge/docs/ui/components/organisms/vc-image-upload/vc-image-upload.docs.md +17 -23
- package/runtime/knowledge/docs/ui/components/organisms/vc-popup/vc-popup.docs.md +109 -68
- package/runtime/knowledge/docs/ui/components/organisms/vc-sidebar/vc-sidebar.docs.md +82 -44
- package/runtime/knowledge/docs/ui/composables/ui-composables.docs.md +8 -8
- package/runtime/knowledge/docs/ui/composables/useDataTablePagination.docs.md +164 -0
- package/runtime/knowledge/docs/ui/composables/useDataTableSort.docs.md +34 -26
- package/runtime/knowledge/docs/ui/composables/useTableSelection.docs.md +48 -40
- package/runtime/knowledge/docs/ui/composables/useTableSort.docs.md +30 -17
- package/runtime/knowledge/docs/ui/types/ui-types.docs.md +40 -29
- package/runtime/knowledge/examples/offers-module.md +15 -13
- package/runtime/knowledge/examples/team-module.md +82 -119
- package/runtime/knowledge/examples/videos-module.md +44 -17
- package/runtime/knowledge/index.md +22 -0
- package/runtime/knowledge/migration-prompts/blade-form-migration.md +17 -8
- package/runtime/knowledge/migration-prompts/blade-props-migration.md +1 -2
- package/runtime/knowledge/migration-prompts/datatable-migration.md +801 -0
- package/runtime/knowledge/migration-prompts/icon-migration.md +97 -0
- package/runtime/knowledge/migration-prompts/manual-migration-audit.md +117 -0
- package/runtime/knowledge/migration-prompts/notifications-migration.md +8 -3
- package/runtime/knowledge/migration-prompts/nswag-migration.md +25 -29
- package/runtime/knowledge/migration-prompts/use-assets-migration.md +164 -0
- package/runtime/knowledge/migration-prompts/use-data-table-pagination-migration.md +176 -0
- package/runtime/knowledge/migration-prompts/widgets-migration.md +48 -27
- package/runtime/knowledge/patterns/assets-management.md +20 -20
- package/runtime/knowledge/patterns/blade-navigation.md +7 -14
- package/runtime/knowledge/patterns/blade-widget.md +19 -17
- package/runtime/knowledge/patterns/child-blade-flow.md +19 -7
- package/runtime/knowledge/patterns/composable-details.md +20 -50
- package/runtime/knowledge/patterns/composable-list.md +43 -31
- package/runtime/knowledge/patterns/dashboard-widget.md +14 -16
- package/runtime/knowledge/patterns/datatable-pattern.md +521 -0
- package/runtime/knowledge/patterns/details-blade-pattern.md +78 -116
- package/runtime/knowledge/patterns/extension-points-usage.md +53 -44
- package/runtime/knowledge/patterns/form-validation.md +28 -64
- package/runtime/knowledge/patterns/list-blade-pattern.md +33 -21
- package/runtime/knowledge/patterns/module-structure.md +7 -1
- package/runtime/knowledge/patterns/multilanguage-fields.md +8 -14
- package/runtime/knowledge/patterns/notification-template.md +21 -14
- package/runtime/knowledge/patterns/signalr-notifications.md +30 -32
- package/runtime/knowledge/patterns/toolbar-pattern.md +18 -20
- package/runtime/vc-app.md +241 -62
package/runtime/knowledge/docs/ui/components/molecules/vc-dropdown-panel/vc-dropdown-panel.docs.md
CHANGED
|
@@ -13,7 +13,12 @@ Floating dropdown panel positioned relative to an anchor element, with header, s
|
|
|
13
13
|
|
|
14
14
|
```vue
|
|
15
15
|
<template>
|
|
16
|
-
<button
|
|
16
|
+
<button
|
|
17
|
+
ref="anchorEl"
|
|
18
|
+
@click="open = !open"
|
|
19
|
+
>
|
|
20
|
+
Toggle Panel
|
|
21
|
+
</button>
|
|
17
22
|
<VcDropdownPanel
|
|
18
23
|
v-model:show="open"
|
|
19
24
|
:anchor-ref="anchorEl"
|
|
@@ -36,43 +41,39 @@ const open = ref(false);
|
|
|
36
41
|
|
|
37
42
|
## Key Props
|
|
38
43
|
|
|
39
|
-
| Prop
|
|
40
|
-
|
|
41
|
-
| `show`
|
|
42
|
-
| `anchorRef`
|
|
43
|
-
| `title`
|
|
44
|
-
| `placement`
|
|
45
|
-
| `width`
|
|
46
|
-
| `maxWidth`
|
|
47
|
-
| `maxHeight`
|
|
48
|
-
| `contentScrollable`
|
|
49
|
-
| `closeOnClickOutside` | `boolean`
|
|
50
|
-
| `closeOnEscape`
|
|
44
|
+
| Prop | Type | Default | Description |
|
|
45
|
+
| --------------------- | --------------------- | ---------------- | ------------------------------------------------------------------ |
|
|
46
|
+
| `show` | `boolean` | — | Panel visibility (v-model:show) |
|
|
47
|
+
| `anchorRef` | `HTMLElement \| null` | `null` | Anchor element for floating positioning |
|
|
48
|
+
| `title` | `string` | `""` | Header title text (header hidden when empty and no `#header` slot) |
|
|
49
|
+
| `placement` | `Placement` | `"bottom-start"` | Floating UI placement relative to anchor |
|
|
50
|
+
| `width` | `string` | `"280px"` | Panel min-width |
|
|
51
|
+
| `maxWidth` | `string` | `"400px"` | Panel max-width |
|
|
52
|
+
| `maxHeight` | `number` | `350` | Max height in pixels (clamped by viewport) |
|
|
53
|
+
| `contentScrollable` | `boolean` | `true` | Enable scrolling in the content area |
|
|
54
|
+
| `closeOnClickOutside` | `boolean` | `true` | Close when clicking outside |
|
|
55
|
+
| `closeOnEscape` | `boolean` | `true` | Close on Escape key |
|
|
51
56
|
|
|
52
57
|
## Events
|
|
53
58
|
|
|
54
|
-
| Event
|
|
55
|
-
|
|
59
|
+
| Event | Payload | Description |
|
|
60
|
+
| ------------- | --------- | ------------------------ |
|
|
56
61
|
| `update:show` | `boolean` | Panel visibility changed |
|
|
57
62
|
|
|
58
63
|
## Slots
|
|
59
64
|
|
|
60
|
-
| Slot
|
|
61
|
-
|
|
62
|
-
| `default` | —
|
|
63
|
-
| `header`
|
|
64
|
-
| `footer`
|
|
65
|
+
| Slot | Props | Description |
|
|
66
|
+
| --------- | ----------- | ----------------------------------------------------- |
|
|
67
|
+
| `default` | — | Scrollable content area |
|
|
68
|
+
| `header` | `{ close }` | Custom header (replaces default title + close button) |
|
|
69
|
+
| `footer` | — | Footer area, typically for action buttons |
|
|
65
70
|
|
|
66
71
|
## Common Patterns
|
|
67
72
|
|
|
68
73
|
### Filter Panel with Footer Actions
|
|
69
74
|
|
|
70
75
|
```vue
|
|
71
|
-
<VcDropdownPanel
|
|
72
|
-
v-model:show="showFilters"
|
|
73
|
-
:anchor-ref="filterButton"
|
|
74
|
-
title="Filters"
|
|
75
|
-
>
|
|
76
|
+
<VcDropdownPanel v-model:show="showFilters" :anchor-ref="filterButton" title="Filters">
|
|
76
77
|
<div class="tw-p-4 tw-flex tw-flex-col tw-gap-2">
|
|
77
78
|
<VcCheckbox v-model="filters.active">Active only</VcCheckbox>
|
|
78
79
|
<VcCheckbox v-model="filters.inStock">In stock</VcCheckbox>
|
|
@@ -102,12 +103,7 @@ const open = ref(false);
|
|
|
102
103
|
### Scrollable List
|
|
103
104
|
|
|
104
105
|
```vue
|
|
105
|
-
<VcDropdownPanel
|
|
106
|
-
v-model:show="open"
|
|
107
|
-
:anchor-ref="anchor"
|
|
108
|
-
title="Long Content"
|
|
109
|
-
:max-height="250"
|
|
110
|
-
>
|
|
106
|
+
<VcDropdownPanel v-model:show="open" :anchor-ref="anchor" title="Long Content" :max-height="250">
|
|
111
107
|
<div class="tw-py-1">
|
|
112
108
|
<div
|
|
113
109
|
v-for="item in items"
|
|
@@ -122,17 +118,17 @@ const open = ref(false);
|
|
|
122
118
|
|
|
123
119
|
## CSS Variables
|
|
124
120
|
|
|
125
|
-
| Variable
|
|
126
|
-
|
|
127
|
-
| `--dropdown-panel-bg`
|
|
128
|
-
| `--dropdown-panel-border-color`
|
|
129
|
-
| `--dropdown-panel-border-radius`
|
|
130
|
-
| `--dropdown-panel-shadow`
|
|
131
|
-
| `--dropdown-panel-z-index`
|
|
132
|
-
| `--dropdown-panel-title-color`
|
|
133
|
-
| `--dropdown-panel-close-color`
|
|
134
|
-
| `--dropdown-panel-close-hover-color` | `var(--neutrals-600)`
|
|
135
|
-
| `--dropdown-panel-footer-bg`
|
|
121
|
+
| Variable | Default | Description |
|
|
122
|
+
| ------------------------------------ | ----------------------------- | ------------------------ |
|
|
123
|
+
| `--dropdown-panel-bg` | `var(--additional-50)` | Panel background |
|
|
124
|
+
| `--dropdown-panel-border-color` | `var(--neutrals-200)` | Border color |
|
|
125
|
+
| `--dropdown-panel-border-radius` | `6px` | Corner radius |
|
|
126
|
+
| `--dropdown-panel-shadow` | `0 4px 16px rgba(0,0,0,0.08)` | Box shadow |
|
|
127
|
+
| `--dropdown-panel-z-index` | `10001` | Z-index |
|
|
128
|
+
| `--dropdown-panel-title-color` | `var(--neutrals-900)` | Title text color |
|
|
129
|
+
| `--dropdown-panel-close-color` | `var(--neutrals-400)` | Close button color |
|
|
130
|
+
| `--dropdown-panel-close-hover-color` | `var(--neutrals-600)` | Close button hover color |
|
|
131
|
+
| `--dropdown-panel-footer-bg` | `var(--neutrals-50)` | Footer background |
|
|
136
132
|
|
|
137
133
|
## Accessibility
|
|
138
134
|
|
|
@@ -10,6 +10,7 @@ A rich text editor built on TipTap that supports both Markdown and HTML content.
|
|
|
10
10
|
- Situations where authors need source-level control over markup
|
|
11
11
|
|
|
12
12
|
When NOT to use:
|
|
13
|
+
|
|
13
14
|
- Plain text input -- use [VcTextarea](../vc-textarea/)
|
|
14
15
|
- Short single-line values -- use [VcInput](../vc-input/)
|
|
15
16
|
- Code editing with syntax highlighting -- use a dedicated code editor
|
|
@@ -18,7 +19,11 @@ When NOT to use:
|
|
|
18
19
|
|
|
19
20
|
```vue
|
|
20
21
|
<template>
|
|
21
|
-
<VcEditor
|
|
22
|
+
<VcEditor
|
|
23
|
+
v-model="content"
|
|
24
|
+
label="Description"
|
|
25
|
+
placeholder="Start typing..."
|
|
26
|
+
/>
|
|
22
27
|
</template>
|
|
23
28
|
|
|
24
29
|
<script setup lang="ts">
|
|
@@ -35,13 +40,13 @@ const content = ref("");
|
|
|
35
40
|
|
|
36
41
|
The editor header provides four view modes plus a fullscreen toggle:
|
|
37
42
|
|
|
38
|
-
| Mode
|
|
39
|
-
|
|
40
|
-
| **Editor** (default) | WYSIWYG rich text editing with toolbar
|
|
41
|
-
| **Preview**
|
|
42
|
-
| **Source**
|
|
43
|
-
| **Split**
|
|
44
|
-
| **Fullscreen**
|
|
43
|
+
| Mode | Description |
|
|
44
|
+
| -------------------- | ---------------------------------------------------------- |
|
|
45
|
+
| **Editor** (default) | WYSIWYG rich text editing with toolbar |
|
|
46
|
+
| **Preview** | Read-only rendered HTML preview (sanitized via DOMPurify) |
|
|
47
|
+
| **Source** | Raw Markdown/HTML textarea for direct markup editing |
|
|
48
|
+
| **Split** | Side-by-side editor + source view for simultaneous editing |
|
|
49
|
+
| **Fullscreen** | Any mode expanded to fill the entire viewport |
|
|
45
50
|
|
|
46
51
|
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.
|
|
47
52
|
|
|
@@ -52,11 +57,7 @@ Limit which toolbar buttons appear by passing a `toolbar` array. Only the specif
|
|
|
52
57
|
`"bold"`, `"italic"`, `"underline"`, `"strikethrough"`, `"heading1"`, `"heading2"`, `"heading3"`, `"bulletList"`, `"orderedList"`, `"blockquote"`, `"link"`, `"image"`, `"table"`, `"fontSize"`, `"separator"`
|
|
53
58
|
|
|
54
59
|
```vue
|
|
55
|
-
<VcEditor
|
|
56
|
-
v-model="content"
|
|
57
|
-
label="Simple editor"
|
|
58
|
-
:toolbar="['bold', 'italic', 'separator', 'heading1', 'heading2', 'link']"
|
|
59
|
-
/>
|
|
60
|
+
<VcEditor v-model="content" label="Simple editor" :toolbar="['bold', 'italic', 'separator', 'heading1', 'heading2', 'link']" />
|
|
60
61
|
```
|
|
61
62
|
|
|
62
63
|
When no `toolbar` prop is provided, all buttons are shown by default.
|
|
@@ -66,12 +67,7 @@ When no `toolbar` prop is provided, all buttons are shown by default.
|
|
|
66
67
|
The `maxlength` prop enforces a character limit. A counter is displayed in source and split modes, and the counter turns to a warning style when 90% of the limit is reached. Input beyond the limit is blocked.
|
|
67
68
|
|
|
68
69
|
```vue
|
|
69
|
-
<VcEditor
|
|
70
|
-
v-model="content"
|
|
71
|
-
label="Short description"
|
|
72
|
-
:maxlength="500"
|
|
73
|
-
placeholder="Maximum 500 characters..."
|
|
74
|
-
/>
|
|
70
|
+
<VcEditor v-model="content" label="Short description" :maxlength="500" placeholder="Maximum 500 characters..." />
|
|
75
71
|
```
|
|
76
72
|
|
|
77
73
|
### Image Upload
|
|
@@ -79,11 +75,7 @@ The `maxlength` prop enforces a character limit. A counter is displayed in sourc
|
|
|
79
75
|
When `assetsFolder` is provided, the image toolbar button becomes functional. Clicking it opens a file picker for images. Selected files are uploaded via `POST /api/assets?folderUrl=/<assetsFolder>` and inserted at the cursor position.
|
|
80
76
|
|
|
81
77
|
```vue
|
|
82
|
-
<VcEditor
|
|
83
|
-
v-model="content"
|
|
84
|
-
label="Article body"
|
|
85
|
-
assets-folder="articles/images"
|
|
86
|
-
/>
|
|
78
|
+
<VcEditor v-model="content" label="Article body" assets-folder="articles/images" />
|
|
87
79
|
```
|
|
88
80
|
|
|
89
81
|
Multiple images can be selected at once. The upload accepts any image file type (`image/*`).
|
|
@@ -179,15 +171,7 @@ const form = reactive({ description: "" });
|
|
|
179
171
|
### Multilanguage Product Description
|
|
180
172
|
|
|
181
173
|
```vue
|
|
182
|
-
<VcEditor
|
|
183
|
-
v-model="descriptions[currentLang]"
|
|
184
|
-
label="Product description"
|
|
185
|
-
multilanguage
|
|
186
|
-
:current-language="currentLang"
|
|
187
|
-
assets-folder="products/images"
|
|
188
|
-
:maxlength="5000"
|
|
189
|
-
required
|
|
190
|
-
/>
|
|
174
|
+
<VcEditor v-model="descriptions[currentLang]" label="Product description" multilanguage :current-language="currentLang" assets-folder="products/images" :maxlength="5000" required />
|
|
191
175
|
```
|
|
192
176
|
|
|
193
177
|
### Minimal Comment Editor
|
|
@@ -234,56 +218,56 @@ const content = ref("<h1>Title</h1>");
|
|
|
234
218
|
|
|
235
219
|
## Props
|
|
236
220
|
|
|
237
|
-
| Prop
|
|
238
|
-
|
|
239
|
-
| `modelValue`
|
|
240
|
-
| `label`
|
|
241
|
-
| `placeholder`
|
|
242
|
-
| `disabled`
|
|
243
|
-
| `required`
|
|
244
|
-
| `tooltip`
|
|
245
|
-
| `errorMessage`
|
|
246
|
-
| `name`
|
|
247
|
-
| `toolbar`
|
|
248
|
-
| `maxlength`
|
|
249
|
-
| `assetsFolder`
|
|
250
|
-
| `extensions`
|
|
251
|
-
| `customButtons`
|
|
252
|
-
| `multilanguage`
|
|
253
|
-
| `currentLanguage` | `string`
|
|
221
|
+
| Prop | Type | Default | Description |
|
|
222
|
+
| ----------------- | --------------------- | ----------- | ------------------------------------------------------------- |
|
|
223
|
+
| `modelValue` | `string` | `""` | Content string via `v-model` (Markdown or HTML) |
|
|
224
|
+
| `label` | `string` | -- | Label text above the editor |
|
|
225
|
+
| `placeholder` | `string` | -- | Placeholder when editor is empty |
|
|
226
|
+
| `disabled` | `boolean` | `false` | Disables all editing |
|
|
227
|
+
| `required` | `boolean` | `false` | Shows a required asterisk on the label |
|
|
228
|
+
| `tooltip` | `string` | -- | Tooltip text shown on label hover |
|
|
229
|
+
| `errorMessage` | `string` | -- | Error message below the editor (also activates error styling) |
|
|
230
|
+
| `name` | `string` | -- | Form field name attribute |
|
|
231
|
+
| `toolbar` | `ToolbarNames[]` | all buttons | Array of toolbar button names to show |
|
|
232
|
+
| `maxlength` | `number` | -- | Character limit (counter shown in source/split mode) |
|
|
233
|
+
| `assetsFolder` | `string` | -- | API folder path for image uploads |
|
|
234
|
+
| `extensions` | `Extension[]` | -- | Additional TipTap extensions |
|
|
235
|
+
| `customButtons` | `CustomToolbarItem[]` | -- | Plugin toolbar buttons or dropdowns |
|
|
236
|
+
| `multilanguage` | `boolean` | `false` | Enables multilanguage indicator on the label |
|
|
237
|
+
| `currentLanguage` | `string` | -- | Current language code for multilanguage mode |
|
|
254
238
|
|
|
255
239
|
## Events
|
|
256
240
|
|
|
257
|
-
| Event
|
|
258
|
-
|
|
241
|
+
| Event | Payload | Description |
|
|
242
|
+
| ------------------- | --------------------- | ------------------------------------------------------------- |
|
|
259
243
|
| `update:modelValue` | `string \| undefined` | Emitted when content changes (from WYSIWYG or source editing) |
|
|
260
|
-
| `upload-image`
|
|
244
|
+
| `upload-image` | -- | Emitted when image upload is triggered |
|
|
261
245
|
|
|
262
246
|
## Slots
|
|
263
247
|
|
|
264
|
-
| Slot
|
|
265
|
-
|
|
248
|
+
| Slot | Description |
|
|
249
|
+
| ------- | ----------------------------------------------------- |
|
|
266
250
|
| `error` | Custom error message markup (replaces default VcHint) |
|
|
267
251
|
|
|
268
252
|
## CSS Variables
|
|
269
253
|
|
|
270
|
-
| Variable
|
|
271
|
-
|
|
272
|
-
| `--vc-editor-border`
|
|
273
|
-
| `--vc-editor-background`
|
|
274
|
-
| `--vc-editor-surface`
|
|
275
|
-
| `--vc-editor-text-primary`
|
|
276
|
-
| `--vc-editor-text-secondary`
|
|
277
|
-
| `--vc-editor-text-muted`
|
|
278
|
-
| `--vc-editor-text-disabled`
|
|
279
|
-
| `--vc-editor-background-disabled` | `var(--neutrals-200)`
|
|
280
|
-
| `--vc-editor-focus-border`
|
|
281
|
-
| `--vc-editor-focus-ring-color`
|
|
282
|
-
| `--vc-editor-error-border`
|
|
283
|
-
| `--vc-editor-error-ring-color`
|
|
284
|
-
| `--vc-editor-error-text`
|
|
285
|
-
| `--vc-editor-separator`
|
|
286
|
-
| `--vc-editor-table-header`
|
|
254
|
+
| Variable | Default | Description |
|
|
255
|
+
| --------------------------------- | --------------------------------------------------------- | ---------------------------------------------------- |
|
|
256
|
+
| `--vc-editor-border` | `var(--neutrals-300)` | Default border color |
|
|
257
|
+
| `--vc-editor-background` | `transparent` | Editor background |
|
|
258
|
+
| `--vc-editor-surface` | `var(--additional-50)` | Content area surface color |
|
|
259
|
+
| `--vc-editor-text-primary` | `var(--neutrals-900)` | Primary text color |
|
|
260
|
+
| `--vc-editor-text-secondary` | `var(--neutrals-500)` | Secondary text color (char counter) |
|
|
261
|
+
| `--vc-editor-text-muted` | `var(--neutrals-400)` | Muted text color (placeholder) |
|
|
262
|
+
| `--vc-editor-text-disabled` | `var(--neutrals-500)` | Text color when disabled |
|
|
263
|
+
| `--vc-editor-background-disabled` | `var(--neutrals-200)` | Background when disabled |
|
|
264
|
+
| `--vc-editor-focus-border` | `var(--primary-500)` | Border color on focus |
|
|
265
|
+
| `--vc-editor-focus-ring-color` | `color-mix(in srgb, var(--primary-500) 30%, transparent)` | Focus ring color |
|
|
266
|
+
| `--vc-editor-error-border` | `var(--danger-500)` | Border color on error |
|
|
267
|
+
| `--vc-editor-error-ring-color` | `rgba(239, 68, 68, 0.2)` | Error ring color |
|
|
268
|
+
| `--vc-editor-error-text` | `var(--danger-500)` | Error message text color |
|
|
269
|
+
| `--vc-editor-separator` | `var(--neutrals-200)` | Divider lines (blockquote border, table borders, hr) |
|
|
270
|
+
| `--vc-editor-table-header` | `var(--neutrals-100)` | Table header cell background |
|
|
287
271
|
|
|
288
272
|
## Accessibility
|
|
289
273
|
|
|
@@ -302,4 +286,3 @@ const content = ref("<h1>Title</h1>");
|
|
|
302
286
|
## Skeleton / Loading State
|
|
303
287
|
|
|
304
288
|
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.
|
|
305
|
-
|
|
@@ -20,7 +20,10 @@ The component uses a vertical layout by default (label above value), but support
|
|
|
20
20
|
|
|
21
21
|
```vue
|
|
22
22
|
<template>
|
|
23
|
-
<VcField
|
|
23
|
+
<VcField
|
|
24
|
+
label="Customer Name"
|
|
25
|
+
model-value="John Doe"
|
|
26
|
+
/>
|
|
24
27
|
</template>
|
|
25
28
|
|
|
26
29
|
<script setup lang="ts">
|
|
@@ -30,27 +33,27 @@ import { VcField } from "@vc-shell/framework";
|
|
|
30
33
|
|
|
31
34
|
## Key Props
|
|
32
35
|
|
|
33
|
-
| Prop
|
|
34
|
-
|
|
35
|
-
| `label`
|
|
36
|
-
| `modelValue`
|
|
37
|
-
| `type`
|
|
38
|
-
| `copyable`
|
|
39
|
-
| `orientation` | `"vertical" \| "horizontal"`
|
|
40
|
-
| `aspectRatio` | `[number, number]`
|
|
41
|
-
| `tooltip`
|
|
36
|
+
| Prop | Type | Default | Description |
|
|
37
|
+
| ------------- | ----------------------------------------------------- | ------------ | --------------------------------------------------------- |
|
|
38
|
+
| `label` | `string` | -- | Field label text |
|
|
39
|
+
| `modelValue` | `string \| number \| Date` | -- | Field content to display |
|
|
40
|
+
| `type` | `"text" \| "date" \| "date-ago" \| "link" \| "email"` | `"text"` | Content type for formatting |
|
|
41
|
+
| `copyable` | `boolean` | `false` | Show a copy-to-clipboard button |
|
|
42
|
+
| `orientation` | `"vertical" \| "horizontal"` | `"vertical"` | Layout direction of label and value |
|
|
43
|
+
| `aspectRatio` | `[number, number]` | `[1, 1]` | Column width ratio for label and value in horizontal mode |
|
|
44
|
+
| `tooltip` | `string` | -- | Tooltip shown on the label |
|
|
42
45
|
|
|
43
46
|
## Type Formatting
|
|
44
47
|
|
|
45
48
|
Each `type` value renders the content differently:
|
|
46
49
|
|
|
47
|
-
| Type
|
|
48
|
-
|
|
49
|
-
| `"text"`
|
|
50
|
-
| `"date"`
|
|
50
|
+
| Type | Behavior |
|
|
51
|
+
| ------------ | -------------------------------------------------------- |
|
|
52
|
+
| `"text"` | Renders the value as plain text |
|
|
53
|
+
| `"date"` | Formats the value as a localized date string |
|
|
51
54
|
| `"date-ago"` | Formats the value as relative time (e.g., "3 hours ago") |
|
|
52
|
-
| `"link"`
|
|
53
|
-
| `"email"`
|
|
55
|
+
| `"link"` | Renders as a clickable `<a>` tag opening in a new tab |
|
|
56
|
+
| `"email"` | Renders as a clickable `mailto:` link |
|
|
54
57
|
|
|
55
58
|
## Common Patterns
|
|
56
59
|
|
|
@@ -59,11 +62,31 @@ Each `type` value renders the content differently:
|
|
|
59
62
|
```vue
|
|
60
63
|
<template>
|
|
61
64
|
<div class="tw-flex tw-flex-col tw-gap-4">
|
|
62
|
-
<VcField
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
<VcField
|
|
66
|
+
label="Order Number"
|
|
67
|
+
model-value="ORD-2024-1234"
|
|
68
|
+
copyable
|
|
69
|
+
/>
|
|
70
|
+
<VcField
|
|
71
|
+
label="Created"
|
|
72
|
+
:model-value="order.createdDate"
|
|
73
|
+
type="date"
|
|
74
|
+
/>
|
|
75
|
+
<VcField
|
|
76
|
+
label="Last Modified"
|
|
77
|
+
:model-value="order.modifiedDate"
|
|
78
|
+
type="date-ago"
|
|
79
|
+
/>
|
|
80
|
+
<VcField
|
|
81
|
+
label="Store URL"
|
|
82
|
+
:model-value="order.storeUrl"
|
|
83
|
+
type="link"
|
|
84
|
+
/>
|
|
85
|
+
<VcField
|
|
86
|
+
label="Contact Email"
|
|
87
|
+
:model-value="order.email"
|
|
88
|
+
type="email"
|
|
89
|
+
/>
|
|
67
90
|
</div>
|
|
68
91
|
</template>
|
|
69
92
|
```
|
|
@@ -104,9 +127,21 @@ The copy button provides visual feedback (checkmark icon for 1 second) after a s
|
|
|
104
127
|
|
|
105
128
|
```vue
|
|
106
129
|
<template>
|
|
107
|
-
<VcField
|
|
108
|
-
|
|
109
|
-
|
|
130
|
+
<VcField
|
|
131
|
+
label="Order ID"
|
|
132
|
+
:model-value="order.id"
|
|
133
|
+
copyable
|
|
134
|
+
/>
|
|
135
|
+
<VcField
|
|
136
|
+
label="Tracking Number"
|
|
137
|
+
:model-value="shipment.trackingNumber"
|
|
138
|
+
copyable
|
|
139
|
+
/>
|
|
140
|
+
<VcField
|
|
141
|
+
label="API Key"
|
|
142
|
+
:model-value="apiKey"
|
|
143
|
+
copyable
|
|
144
|
+
/>
|
|
110
145
|
</template>
|
|
111
146
|
```
|
|
112
147
|
|
|
@@ -135,8 +170,8 @@ const displayFields = computed(() => [
|
|
|
135
170
|
|
|
136
171
|
## CSS Variables
|
|
137
172
|
|
|
138
|
-
| Variable
|
|
139
|
-
|
|
173
|
+
| Variable | Default | Description |
|
|
174
|
+
| ------------- | -------- | -------------------------------------------- |
|
|
140
175
|
| `--field-gap` | `0.5rem` | Gap between label and value in vertical mode |
|
|
141
176
|
|
|
142
177
|
## Accessibility
|
|
@@ -170,4 +205,3 @@ The `type` prop affects rendering, not validation. Setting `type="email"` does n
|
|
|
170
205
|
## Skeleton / Loading State
|
|
171
206
|
|
|
172
207
|
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.
|
|
173
|
-
|
package/runtime/knowledge/docs/ui/components/molecules/vc-file-upload/vc-file-upload.docs.md
CHANGED
|
@@ -70,12 +70,7 @@ When `multiple` is `false` (default), only one file can be selected per interact
|
|
|
70
70
|
Integrate with vee-validate for file validation rules such as size limits:
|
|
71
71
|
|
|
72
72
|
```vue
|
|
73
|
-
<VcFileUpload
|
|
74
|
-
accept=".pdf, .doc, .docx"
|
|
75
|
-
name="documents"
|
|
76
|
-
:rules="{ size: 5 }"
|
|
77
|
-
@upload="uploadDocuments"
|
|
78
|
-
/>
|
|
73
|
+
<VcFileUpload accept=".pdf, .doc, .docx" name="documents" :rules="{ size: 5 }" @upload="uploadDocuments" />
|
|
79
74
|
```
|
|
80
75
|
|
|
81
76
|
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.
|
|
@@ -140,7 +135,11 @@ The disabled state reduces opacity and applies `pointer-events: none`.
|
|
|
140
135
|
```vue
|
|
141
136
|
<template>
|
|
142
137
|
<VcForm @submit="saveProduct">
|
|
143
|
-
<VcInput
|
|
138
|
+
<VcInput
|
|
139
|
+
v-model="product.name"
|
|
140
|
+
label="Product Name"
|
|
141
|
+
required
|
|
142
|
+
/>
|
|
144
143
|
<VcFileUpload
|
|
145
144
|
accept=".jpg, .png, .webp"
|
|
146
145
|
:multiple="true"
|
|
@@ -177,14 +176,7 @@ async function onImagesSelected(files: FileList) {
|
|
|
177
176
|
## Recipe: CSV Data Import
|
|
178
177
|
|
|
179
178
|
```vue
|
|
180
|
-
<VcFileUpload
|
|
181
|
-
accept=".csv"
|
|
182
|
-
icon="lucide-file-spreadsheet"
|
|
183
|
-
:custom-text="{ dragHere: 'Drop CSV file here', browse: 'Browse files' }"
|
|
184
|
-
:error-message="importError"
|
|
185
|
-
:loading="isImporting"
|
|
186
|
-
@upload="importCsv"
|
|
187
|
-
/>
|
|
179
|
+
<VcFileUpload accept=".csv" icon="lucide-file-spreadsheet" :custom-text="{ dragHere: 'Drop CSV file here', browse: 'Browse files' }" :error-message="importError" :loading="isImporting" @upload="importCsv" />
|
|
188
180
|
```
|
|
189
181
|
|
|
190
182
|
```ts
|
|
@@ -263,50 +255,50 @@ async function onUpload(files: FileList) {
|
|
|
263
255
|
|
|
264
256
|
## Props
|
|
265
257
|
|
|
266
|
-
| Prop
|
|
267
|
-
|
|
268
|
-
| `accept`
|
|
269
|
-
| `multiple`
|
|
270
|
-
| `loading`
|
|
271
|
-
| `icon`
|
|
272
|
-
| `customText`
|
|
273
|
-
| `rules`
|
|
274
|
-
| `name`
|
|
275
|
-
| `label`
|
|
276
|
-
| `tooltip`
|
|
277
|
-
| `disabled`
|
|
278
|
-
| `required`
|
|
279
|
-
| `error`
|
|
280
|
-
| `errorMessage` | `string`
|
|
258
|
+
| Prop | Type | Default | Description |
|
|
259
|
+
| -------------- | -------------------------------------- | ----------------------------------------- | --------------------------------------------------- |
|
|
260
|
+
| `accept` | `string` | `".jpg, .png, .jpeg, .webp, .heic, .svg"` | Accepted file types (HTML accept attribute format) |
|
|
261
|
+
| `multiple` | `boolean` | `false` | Allow selecting multiple files |
|
|
262
|
+
| `loading` | `boolean` | `false` | Show loading spinner overlay |
|
|
263
|
+
| `icon` | `string` | `"lucide-cloud-upload"` | Icon displayed in the upload zone |
|
|
264
|
+
| `customText` | `{ dragHere: string; browse: string }` | -- | Override default drag/browse instruction text |
|
|
265
|
+
| `rules` | `IValidationRules` | -- | Vee-validate validation rules (e.g., `{ size: 5 }`) |
|
|
266
|
+
| `name` | `string` | `"Gallery"` | Form field name attribute |
|
|
267
|
+
| `label` | `string` | -- | Field label text |
|
|
268
|
+
| `tooltip` | `string` | -- | Tooltip on the label |
|
|
269
|
+
| `disabled` | `boolean` | `false` | Disable all interactions |
|
|
270
|
+
| `required` | `boolean` | `false` | Mark field as required |
|
|
271
|
+
| `error` | `boolean` | `false` | External error flag |
|
|
272
|
+
| `errorMessage` | `string` | -- | Error message text (sets error state when truthy) |
|
|
281
273
|
|
|
282
274
|
## Events
|
|
283
275
|
|
|
284
|
-
| Event
|
|
285
|
-
|
|
276
|
+
| Event | Payload | Description |
|
|
277
|
+
| -------- | ---------- | ------------------------------------------------------------------------------------ |
|
|
286
278
|
| `upload` | `FileList` | Emitted when valid files are selected or dropped. Only fires after validation passes |
|
|
287
279
|
|
|
288
280
|
## Slots
|
|
289
281
|
|
|
290
|
-
| Slot
|
|
291
|
-
|
|
292
|
-
| `error` | --
|
|
282
|
+
| Slot | Scope | Description |
|
|
283
|
+
| ------- | ----- | ----------------------------------------------------------------- |
|
|
284
|
+
| `error` | -- | Custom error content. Replaces the default `VcHint` error display |
|
|
293
285
|
|
|
294
286
|
## CSS Variables
|
|
295
287
|
|
|
296
|
-
| Variable
|
|
297
|
-
|
|
298
|
-
| `--file-upload-border-color`
|
|
299
|
-
| `--file-upload-border-color-hover`
|
|
300
|
-
| `--file-upload-border-color-dragover` | `var(--primary-500)`
|
|
301
|
-
| `--file-upload-border-color-error`
|
|
302
|
-
| `--file-upload-border-radius`
|
|
303
|
-
| `--file-upload-drag-bg`
|
|
304
|
-
| `--file-upload-background-color`
|
|
305
|
-
| `--file-upload-icon-color`
|
|
306
|
-
| `--file-upload-text-color`
|
|
307
|
-
| `--file-upload-error-color`
|
|
308
|
-
| `--file-upload-focus-ring-color`
|
|
309
|
-
| `--file-upload-error-ring-color`
|
|
288
|
+
| Variable | Default | Description |
|
|
289
|
+
| ------------------------------------- | --------------------- | --------------------------------- |
|
|
290
|
+
| `--file-upload-border-color` | `var(--neutrals-200)` | Default border color |
|
|
291
|
+
| `--file-upload-border-color-hover` | `var(--neutrals-400)` | Hover border color |
|
|
292
|
+
| `--file-upload-border-color-dragover` | `var(--primary-500)` | Border color while dragging over |
|
|
293
|
+
| `--file-upload-border-color-error` | `var(--danger-500)` | Error state border color |
|
|
294
|
+
| `--file-upload-border-radius` | `6px` | Corner radius |
|
|
295
|
+
| `--file-upload-drag-bg` | `var(--neutrals-100)` | Background color during drag-over |
|
|
296
|
+
| `--file-upload-background-color` | `transparent` | Default background color |
|
|
297
|
+
| `--file-upload-icon-color` | `var(--neutrals-400)` | Upload icon color |
|
|
298
|
+
| `--file-upload-text-color` | `var(--neutrals-400)` | Instruction text color |
|
|
299
|
+
| `--file-upload-error-color` | `var(--danger-500)` | Error text color |
|
|
300
|
+
| `--file-upload-focus-ring-color` | `var(--primary-100)` | Focus ring color |
|
|
301
|
+
| `--file-upload-error-ring-color` | `var(--danger-100)` | Error state ring color |
|
|
310
302
|
|
|
311
303
|
## Accessibility
|
|
312
304
|
|
|
@@ -317,6 +309,7 @@ async function onUpload(files: FileList) {
|
|
|
317
309
|
- `aria-required` is set when the field is required.
|
|
318
310
|
- Enter and Space keys trigger the file browser dialog.
|
|
319
311
|
- The disabled state applies `pointer-events: none` and reduced opacity.
|
|
312
|
+
|
|
320
313
|
## Related Components
|
|
321
314
|
|
|
322
315
|
- [VcGallery](../../organisms/vc-gallery/) -- Full image gallery with preview, reorder, drag-and-drop sorting, and upload
|
|
@@ -326,4 +319,3 @@ async function onUpload(files: FileList) {
|
|
|
326
319
|
## Skeleton / Loading State
|
|
327
320
|
|
|
328
321
|
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.
|
|
329
|
-
|