@vc-shell/vc-app-skill 2.0.0-alpha.32 → 2.0.0-alpha.33-pr220.455e322
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 +59 -47
- package/README.md +18 -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 +94 -0
- 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 +31 -27
- 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 +75 -19
- package/runtime/knowledge/docs/core/composables/useBladeRegistry/useBladeRegistry.docs.md +15 -15
- package/runtime/knowledge/docs/core/composables/useBladeWidgets/index.docs.md +74 -78
- 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 +10 -10
- 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/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 +24 -15
- 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 +107 -91
- 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 +98 -90
- 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 +102 -0
- 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 +12 -18
- 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 +104 -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 +59 -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 +96 -64
- package/runtime/knowledge/docs/ui/components/molecules/vc-checkbox-group/vc-checkbox-group.docs.md +26 -35
- package/runtime/knowledge/docs/ui/components/molecules/vc-color-input/vc-color-input.docs.md +69 -22
- package/runtime/knowledge/docs/ui/components/molecules/vc-date-picker/vc-date-picker.docs.md +58 -72
- 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 +60 -72
- package/runtime/knowledge/docs/ui/components/molecules/vc-field/vc-field.docs.md +65 -26
- package/runtime/knowledge/docs/ui/components/molecules/vc-file-upload/vc-file-upload.docs.md +46 -49
- 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 +115 -130
- package/runtime/knowledge/docs/ui/components/molecules/vc-input-currency/vc-input-currency.docs.md +53 -87
- package/runtime/knowledge/docs/ui/components/molecules/vc-input-dropdown/vc-input-dropdown.docs.md +56 -63
- 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 +63 -64
- 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 +59 -19
- package/runtime/knowledge/docs/ui/components/molecules/vc-radio-group/vc-radio-group.docs.md +25 -34
- package/runtime/knowledge/docs/ui/components/molecules/vc-rating/vc-rating.docs.md +42 -32
- package/runtime/knowledge/docs/ui/components/molecules/vc-select/vc-select.docs.md +78 -82
- package/runtime/knowledge/docs/ui/components/molecules/vc-slider/vc-slider.docs.md +25 -15
- package/runtime/knowledge/docs/ui/components/molecules/vc-switch/vc-switch.docs.md +59 -63
- package/runtime/knowledge/docs/ui/components/molecules/vc-textarea/vc-textarea.docs.md +57 -69
- 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 +120 -75
- package/runtime/knowledge/docs/ui/components/organisms/vc-data-table/composables/table-composables.docs.md +30 -44
- package/runtime/knowledge/docs/ui/components/organisms/vc-data-table/vc-data-table.docs.md +536 -365
- 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 +255 -0
- package/runtime/knowledge/migration-prompts/blade-props-migration.md +194 -0
- 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 +223 -0
- package/runtime/knowledge/migration-prompts/nswag-migration.md +244 -0
- 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 +178 -0
- 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 +354 -49
- package/runtime/knowledge/docs/core/constants/constants.docs.md +0 -185
|
@@ -29,41 +29,41 @@ Renders a VirtoCommerce platform dynamic property as the appropriate form contro
|
|
|
29
29
|
|
|
30
30
|
## Key Props
|
|
31
31
|
|
|
32
|
-
| Prop
|
|
33
|
-
|
|
34
|
-
| `property`
|
|
35
|
-
| `modelValue`
|
|
36
|
-
| `valueType`
|
|
37
|
-
| `name`
|
|
38
|
-
| `required`
|
|
39
|
-
| `disabled`
|
|
40
|
-
| `dictionary`
|
|
41
|
-
| `multivalue`
|
|
42
|
-
| `multilanguage`
|
|
43
|
-
| `optionsGetter`
|
|
44
|
-
| `measurementsGetter` | `Function` | -
|
|
45
|
-
| `rules`
|
|
32
|
+
| Prop | Type | Default | Description |
|
|
33
|
+
| -------------------- | ---------- | ------- | ----------------------------------------------------------------------------- |
|
|
34
|
+
| `property` | `T` | - | Property object with `id` and metadata |
|
|
35
|
+
| `modelValue` | `any` | - | Current property value (v-model) |
|
|
36
|
+
| `valueType` | `string` | - | Type: ShortText, LongText, Number, Integer, DateTime, Boolean, Measure, Color |
|
|
37
|
+
| `name` | `string` | - | Property name for display and field identification |
|
|
38
|
+
| `required` | `boolean` | - | Whether the field is required |
|
|
39
|
+
| `disabled` | `boolean` | `false` | Disables the input |
|
|
40
|
+
| `dictionary` | `boolean` | `false` | Uses VcSelect/VcMultivalue with options |
|
|
41
|
+
| `multivalue` | `boolean` | `false` | Supports multiple values |
|
|
42
|
+
| `multilanguage` | `boolean` | `false` | Supports localized values |
|
|
43
|
+
| `optionsGetter` | `Function` | - | Async loader for dictionary options |
|
|
44
|
+
| `measurementsGetter` | `Function` | - | Async loader for measurement units |
|
|
45
|
+
| `rules` | `object` | - | Validation rules: `{ min, max, regex }` |
|
|
46
46
|
|
|
47
47
|
## Value Type to Component Mapping
|
|
48
48
|
|
|
49
|
-
| valueType | dictionary | multivalue | Component
|
|
50
|
-
|
|
51
|
-
| ShortText | false
|
|
52
|
-
| ShortText | false
|
|
53
|
-
| ShortText | true
|
|
54
|
-
| ShortText | true
|
|
55
|
-
| LongText
|
|
56
|
-
| Number
|
|
57
|
-
| Number
|
|
58
|
-
| Integer
|
|
59
|
-
| Integer
|
|
60
|
-
| DateTime
|
|
61
|
-
| Boolean
|
|
62
|
-
| Measure
|
|
63
|
-
| Color
|
|
64
|
-
| Color
|
|
65
|
-
| Color
|
|
66
|
-
| Color
|
|
49
|
+
| valueType | dictionary | multivalue | Component |
|
|
50
|
+
| --------- | ---------- | ---------- | ---------------------------- |
|
|
51
|
+
| ShortText | false | false | VcInput |
|
|
52
|
+
| ShortText | false | true | VcMultivalue |
|
|
53
|
+
| ShortText | true | false | VcSelect |
|
|
54
|
+
| ShortText | true | true | VcMultivalue (with options) |
|
|
55
|
+
| LongText | - | - | VcTextarea |
|
|
56
|
+
| Number | - | false | VcInput (number) |
|
|
57
|
+
| Number | - | true | VcMultivalue (number) |
|
|
58
|
+
| Integer | - | false | VcInput (integer, step=1) |
|
|
59
|
+
| Integer | - | true | VcMultivalue (integer) |
|
|
60
|
+
| DateTime | - | - | VcInput (datetime-local) |
|
|
61
|
+
| Boolean | - | - | VcSwitch |
|
|
62
|
+
| Measure | - | - | VcInputDropdown |
|
|
63
|
+
| Color | false | false | VcInput (color) |
|
|
64
|
+
| Color | false | true | VcMultivalue (color) |
|
|
65
|
+
| Color | true | false | VcSelect (with swatches) |
|
|
66
|
+
| Color | true | true | VcMultivalue (with swatches) |
|
|
67
67
|
|
|
68
68
|
## Recipe: Rendering a List of Dynamic Properties
|
|
69
69
|
|
|
@@ -85,9 +85,7 @@ async function loadDictionaryOptions(propertyId: string, keyword?: string) {
|
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
function handlePropertyUpdate(property: any, newValue: any) {
|
|
88
|
-
property.values = Array.isArray(newValue)
|
|
89
|
-
? newValue.map((v) => ({ value: v }))
|
|
90
|
-
: [{ value: newValue }];
|
|
88
|
+
property.values = Array.isArray(newValue) ? newValue.map((v) => ({ value: v })) : [{ value: newValue }];
|
|
91
89
|
}
|
|
92
90
|
</script>
|
|
93
91
|
|
|
@@ -114,28 +112,13 @@ function handlePropertyUpdate(property: any, newValue: any) {
|
|
|
114
112
|
## Recipe: Dynamic Property with Validation
|
|
115
113
|
|
|
116
114
|
```vue
|
|
117
|
-
<VcDynamicProperty
|
|
118
|
-
:property="skuProperty"
|
|
119
|
-
:model-value="skuProperty.values?.[0]?.value"
|
|
120
|
-
value-type="ShortText"
|
|
121
|
-
name="SKU"
|
|
122
|
-
:required="true"
|
|
123
|
-
:rules="{ regex: '^[A-Z0-9-]+$', min: 3, max: 50 }"
|
|
124
|
-
@update:model-value="(val) => updateProperty(skuProperty, val)"
|
|
125
|
-
/>
|
|
115
|
+
<VcDynamicProperty :property="skuProperty" :model-value="skuProperty.values?.[0]?.value" value-type="ShortText" name="SKU" :required="true" :rules="{ regex: '^[A-Z0-9-]+$', min: 3, max: 50 }" @update:model-value="(val) => updateProperty(skuProperty, val)" />
|
|
126
116
|
```
|
|
127
117
|
|
|
128
118
|
## Recipe: Measurement Property with Units
|
|
129
119
|
|
|
130
120
|
```vue
|
|
131
|
-
<VcDynamicProperty
|
|
132
|
-
:property="weightProperty"
|
|
133
|
-
:model-value="weightProperty.values?.[0]?.value"
|
|
134
|
-
value-type="Measure"
|
|
135
|
-
name="Weight"
|
|
136
|
-
:measurements-getter="loadMeasurementUnits"
|
|
137
|
-
@update:model-value="(val) => updateProperty(weightProperty, val)"
|
|
138
|
-
/>
|
|
121
|
+
<VcDynamicProperty :property="weightProperty" :model-value="weightProperty.values?.[0]?.value" value-type="Measure" name="Weight" :measurements-getter="loadMeasurementUnits" @update:model-value="(val) => updateProperty(weightProperty, val)" />
|
|
139
122
|
```
|
|
140
123
|
|
|
141
124
|
## Common Mistakes
|
|
@@ -11,40 +11,40 @@ A responsive multi-image gallery with drag-and-drop reorder, file upload, lightb
|
|
|
11
11
|
|
|
12
12
|
## Props
|
|
13
13
|
|
|
14
|
-
| Prop
|
|
15
|
-
|
|
16
|
-
| `layout`
|
|
17
|
-
| `label`
|
|
18
|
-
| `required`
|
|
19
|
-
| `images`
|
|
20
|
-
| `disabled`
|
|
21
|
-
| `multiple`
|
|
22
|
-
| `loading`
|
|
23
|
-
| `itemActions`
|
|
24
|
-
| `rules`
|
|
25
|
-
| `name`
|
|
26
|
-
| `accept`
|
|
27
|
-
| `size`
|
|
28
|
-
| `gap`
|
|
29
|
-
| `imagefit`
|
|
30
|
-
| `thumbnailSize` | `ThumbnailSize`
|
|
14
|
+
| Prop | Type | Default | Description |
|
|
15
|
+
| --------------- | --------------------------------------------------------- | --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
|
|
16
|
+
| `layout` | `"filmstrip" \| "grid"` | `"filmstrip"` | Layout mode — filmstrip shows a single scrollable row with expand/collapse; grid shows the classic multi-row auto-fill layout. |
|
|
17
|
+
| `label` | `string` | `undefined` | Label text displayed in the gallery header. |
|
|
18
|
+
| `required` | `boolean` | `false` | Shows a required indicator (`*`) on the label. |
|
|
19
|
+
| `images` | `ICommonAsset[]` | `[]` | Array of image assets to display. |
|
|
20
|
+
| `disabled` | `boolean` | `false` | Disables all interactive actions. |
|
|
21
|
+
| `multiple` | `boolean` | `false` | Allow selecting multiple files in upload dialog. |
|
|
22
|
+
| `loading` | `boolean` | `false` | Shows a loading overlay with spinner on the gallery. |
|
|
23
|
+
| `itemActions` | `{ preview?: boolean; edit?: boolean; remove?: boolean }` | `{ preview: true, edit: true, remove: true }` | Per-tile action visibility. |
|
|
24
|
+
| `rules` | `IValidationRules` | `undefined` | Validation rules for uploaded files. |
|
|
25
|
+
| `name` | `string` | `"Gallery"` | Field name for validation messages. |
|
|
26
|
+
| `accept` | `string` | `undefined` | Accepted file extensions. |
|
|
27
|
+
| `size` | `"sm" \| "md" \| "lg"` | `"md"` | Tile size preset. Sizes are smaller on mobile. |
|
|
28
|
+
| `gap` | `number` | `8` | Gap between tiles in pixels. |
|
|
29
|
+
| `imagefit` | `"contain" \| "cover"` | `"contain"` | How images fit within tiles. |
|
|
30
|
+
| `thumbnailSize` | `ThumbnailSize` | auto from `size` | Thumbnail size for tile images. Auto-mapped: sm→128x128, md→216x216, lg→348x348. Preview thumbnails use 64x64. |
|
|
31
31
|
|
|
32
32
|
## Events
|
|
33
33
|
|
|
34
|
-
| Event
|
|
35
|
-
|
|
36
|
-
| `upload` | `(files: FileList, startingSortOrder?: number)` | Emitted when files are selected or dropped.
|
|
37
|
-
| `sort`
|
|
38
|
-
| `edit`
|
|
39
|
-
| `remove` | `ICommonAsset`
|
|
34
|
+
| Event | Payload | Description |
|
|
35
|
+
| -------- | ----------------------------------------------- | ------------------------------------------------------- |
|
|
36
|
+
| `upload` | `(files: FileList, startingSortOrder?: number)` | Emitted when files are selected or dropped. |
|
|
37
|
+
| `sort` | `ICommonAsset[]` | Emitted after drag-and-drop reorder with the new order. |
|
|
38
|
+
| `edit` | `ICommonAsset` | Emitted when the edit action is triggered. |
|
|
39
|
+
| `remove` | `ICommonAsset` | Emitted when the remove action is triggered. |
|
|
40
40
|
|
|
41
41
|
## Slots
|
|
42
42
|
|
|
43
|
-
| Slot
|
|
44
|
-
|
|
45
|
-
| `item`
|
|
46
|
-
| `empty`
|
|
47
|
-
| `footer` | `{ images }`
|
|
43
|
+
| Slot | Scope | Description |
|
|
44
|
+
| -------- | --------------------------- | ------------------------------------------------ |
|
|
45
|
+
| `item` | `{ image, index, actions }` | Custom tile rendering. |
|
|
46
|
+
| `empty` | -- | Custom empty state when disabled with no images. |
|
|
47
|
+
| `footer` | `{ images }` | Content below the grid. |
|
|
48
48
|
|
|
49
49
|
## Features
|
|
50
50
|
|
|
@@ -61,41 +61,19 @@ A responsive multi-image gallery with drag-and-drop reorder, file upload, lightb
|
|
|
61
61
|
## Basic Usage
|
|
62
62
|
|
|
63
63
|
```vue
|
|
64
|
-
<VcGallery
|
|
65
|
-
label="Product Images"
|
|
66
|
-
required
|
|
67
|
-
:images="product.images"
|
|
68
|
-
imagefit="cover"
|
|
69
|
-
@upload="handleUpload"
|
|
70
|
-
@sort="handleSort"
|
|
71
|
-
@edit="handleEdit"
|
|
72
|
-
@remove="handleRemove"
|
|
73
|
-
/>
|
|
64
|
+
<VcGallery label="Product Images" required :images="product.images" imagefit="cover" @upload="handleUpload" @sort="handleSort" @edit="handleEdit" @remove="handleRemove" />
|
|
74
65
|
```
|
|
75
66
|
|
|
76
67
|
## Filmstrip Layout (Default)
|
|
77
68
|
|
|
78
69
|
```vue
|
|
79
|
-
<VcGallery
|
|
80
|
-
label="Images"
|
|
81
|
-
:images="product.images"
|
|
82
|
-
imagefit="cover"
|
|
83
|
-
@upload="handleUpload"
|
|
84
|
-
@sort="handleSort"
|
|
85
|
-
@remove="handleRemove"
|
|
86
|
-
/>
|
|
70
|
+
<VcGallery label="Images" :images="product.images" imagefit="cover" @upload="handleUpload" @sort="handleSort" @remove="handleRemove" />
|
|
87
71
|
```
|
|
88
72
|
|
|
89
73
|
## Classic Grid Layout
|
|
90
74
|
|
|
91
75
|
```vue
|
|
92
|
-
<VcGallery
|
|
93
|
-
layout="grid"
|
|
94
|
-
label="Attachments"
|
|
95
|
-
:images="product.images"
|
|
96
|
-
@upload="handleUpload"
|
|
97
|
-
@sort="handleSort"
|
|
98
|
-
/>
|
|
76
|
+
<VcGallery layout="grid" label="Attachments" :images="product.images" @upload="handleUpload" @sort="handleSort" />
|
|
99
77
|
```
|
|
100
78
|
|
|
101
79
|
## Recipe: Product Image Gallery in a Blade
|
|
@@ -145,9 +123,7 @@ function handleRemove(image: ICommonAsset) {
|
|
|
145
123
|
@edit="handleEdit"
|
|
146
124
|
@remove="handleRemove"
|
|
147
125
|
/>
|
|
148
|
-
<VcHint class="tw-mt-2">
|
|
149
|
-
Drag images to reorder. The first image is used as the primary thumbnail.
|
|
150
|
-
</VcHint>
|
|
126
|
+
<VcHint class="tw-mt-2"> Drag images to reorder. The first image is used as the primary thumbnail. </VcHint>
|
|
151
127
|
</VcBlade>
|
|
152
128
|
</template>
|
|
153
129
|
```
|
|
@@ -155,12 +131,7 @@ function handleRemove(image: ICommonAsset) {
|
|
|
155
131
|
## Recipe: Read-Only Gallery (Disabled)
|
|
156
132
|
|
|
157
133
|
```vue
|
|
158
|
-
<VcGallery
|
|
159
|
-
:images="order.attachments"
|
|
160
|
-
disabled
|
|
161
|
-
:item-actions="{ preview: true, edit: false, remove: false }"
|
|
162
|
-
size="sm"
|
|
163
|
-
>
|
|
134
|
+
<VcGallery :images="order.attachments" disabled :item-actions="{ preview: true, edit: false, remove: false }" size="sm">
|
|
164
135
|
<template #empty>
|
|
165
136
|
<div class="tw-text-center tw-text-gray-400 tw-py-8">
|
|
166
137
|
No attachments for this order.
|
package/runtime/knowledge/docs/ui/components/organisms/vc-image-upload/vc-image-upload.docs.md
CHANGED
|
@@ -11,25 +11,25 @@ A single-image upload organism that displays either a drag-and-drop upload zone
|
|
|
11
11
|
|
|
12
12
|
## Props
|
|
13
13
|
|
|
14
|
-
| Prop
|
|
15
|
-
|
|
16
|
-
| `image`
|
|
17
|
-
| `disabled`
|
|
18
|
-
| `loading`
|
|
19
|
-
| `accept`
|
|
20
|
-
| `rules`
|
|
21
|
-
| `name`
|
|
22
|
-
| `icon`
|
|
23
|
-
| `placeholder` | `{ text: string; link: string }` | `undefined`
|
|
24
|
-
| `previewable` | `boolean`
|
|
25
|
-
| `removable`
|
|
14
|
+
| Prop | Type | Default | Description |
|
|
15
|
+
| ------------- | -------------------------------- | ---------------------------------- | ---------------------------------------------- |
|
|
16
|
+
| `image` | `ICommonAsset` | `undefined` | The currently displayed image asset. |
|
|
17
|
+
| `disabled` | `boolean` | `false` | Disables upload and remove actions. |
|
|
18
|
+
| `loading` | `boolean` | `false` | Shows a loading spinner on the upload zone. |
|
|
19
|
+
| `accept` | `string` | `.jpg,.png,.jpeg,.webp,.heic,.svg` | Accepted file extensions. |
|
|
20
|
+
| `rules` | `IValidationRules` | `undefined` | Validation rules (e.g. `{ fileWeight: 300 }`). |
|
|
21
|
+
| `name` | `string` | `"Image"` | Field name for validation messages. |
|
|
22
|
+
| `icon` | `string` | `"lucide-cloud-upload"` | Upload zone placeholder icon. |
|
|
23
|
+
| `placeholder` | `{ text: string; link: string }` | `undefined` | Custom text for the upload zone. |
|
|
24
|
+
| `previewable` | `boolean` | `true` | Enables lightbox preview on click. |
|
|
25
|
+
| `removable` | `boolean` | `true` | Shows the remove action on the image tile. |
|
|
26
26
|
|
|
27
27
|
## Events
|
|
28
28
|
|
|
29
|
-
| Event
|
|
30
|
-
|
|
31
|
-
| `upload` | `FileList`
|
|
32
|
-
| `remove` | `ICommonAsset` | Emitted when the remove button is clicked.
|
|
29
|
+
| Event | Payload | Description |
|
|
30
|
+
| -------- | -------------- | ------------------------------------------- |
|
|
31
|
+
| `upload` | `FileList` | Emitted when files are selected or dropped. |
|
|
32
|
+
| `remove` | `ICommonAsset` | Emitted when the remove button is clicked. |
|
|
33
33
|
|
|
34
34
|
## Visual States
|
|
35
35
|
|
|
@@ -42,13 +42,7 @@ The component has three visual states:
|
|
|
42
42
|
## Basic Usage
|
|
43
43
|
|
|
44
44
|
```vue
|
|
45
|
-
<VcImageUpload
|
|
46
|
-
:image="product.thumbnail"
|
|
47
|
-
accept=".jpg,.png,.webp"
|
|
48
|
-
:rules="{ fileWeight: 500 }"
|
|
49
|
-
@upload="handleUpload"
|
|
50
|
-
@remove="handleRemove"
|
|
51
|
-
/>
|
|
45
|
+
<VcImageUpload :image="product.thumbnail" accept=".jpg,.png,.webp" :rules="{ fileWeight: 500 }" @upload="handleUpload" @remove="handleRemove" />
|
|
52
46
|
```
|
|
53
47
|
|
|
54
48
|
## Recipe: Avatar Upload in a User Profile Blade
|
|
@@ -4,13 +4,13 @@ A modal dialog component built on [HeadlessUI Dialog](https://headlessui.com/vue
|
|
|
4
4
|
|
|
5
5
|
## When to Use
|
|
6
6
|
|
|
7
|
-
| Scenario
|
|
8
|
-
|
|
9
|
-
| Confirmation prompt ("Delete this item?")
|
|
10
|
-
| Error or success alert after an API call
|
|
7
|
+
| Scenario | Component |
|
|
8
|
+
| ------------------------------------------------- | ----------- |
|
|
9
|
+
| Confirmation prompt ("Delete this item?") | **VcPopup** |
|
|
10
|
+
| Error or success alert after an API call | **VcPopup** |
|
|
11
11
|
| Short form that must block background interaction | **VcPopup** |
|
|
12
|
-
| Side panel for contextual workflows
|
|
13
|
-
| Stacked detail views (master-detail)
|
|
12
|
+
| Side panel for contextual workflows | VcSidebar |
|
|
13
|
+
| Stacked detail views (master-detail) | VcBlade |
|
|
14
14
|
|
|
15
15
|
> **Tip:** Prefer blades for CRUD workflows. Reserve popups for brief, interruptive interactions such as confirmations and alerts.
|
|
16
16
|
|
|
@@ -22,7 +22,10 @@ A modal dialog component built on [HeadlessUI Dialog](https://headlessui.com/vue
|
|
|
22
22
|
<template>
|
|
23
23
|
<VcButton @click="showPopup = true">Open Popup</VcButton>
|
|
24
24
|
|
|
25
|
-
<VcPopup
|
|
25
|
+
<VcPopup
|
|
26
|
+
v-model="showPopup"
|
|
27
|
+
title="Hello World"
|
|
28
|
+
>
|
|
26
29
|
<template #content>
|
|
27
30
|
<p>This is a simple popup with a title and content.</p>
|
|
28
31
|
</template>
|
|
@@ -60,12 +63,12 @@ The `variant` prop adds a semantic icon and color to the popup. Available values
|
|
|
60
63
|
|
|
61
64
|
When `variant` is anything other than `"default"`, a large icon is rendered to the left of the content area:
|
|
62
65
|
|
|
63
|
-
| Variant
|
|
64
|
-
|
|
66
|
+
| Variant | Icon | Color token |
|
|
67
|
+
| --------- | ----------------------- | --------------- |
|
|
65
68
|
| `warning` | `lucide-triangle-alert` | `--warning-500` |
|
|
66
|
-
| `error`
|
|
67
|
-
| `success` | `lucide-circle-check`
|
|
68
|
-
| `info`
|
|
69
|
+
| `error` | `lucide-circle-alert` | `--danger-500` |
|
|
70
|
+
| `success` | `lucide-circle-check` | `--success-500` |
|
|
71
|
+
| `info` | `lucide-info` | `--info-500` |
|
|
69
72
|
|
|
70
73
|
### Title
|
|
71
74
|
|
|
@@ -107,12 +110,7 @@ Fine-tune each channel independently:
|
|
|
107
110
|
|
|
108
111
|
```vue
|
|
109
112
|
<!-- Allow close button only; prevent overlay and Escape -->
|
|
110
|
-
<VcPopup
|
|
111
|
-
v-model="open"
|
|
112
|
-
title="Mandatory Action"
|
|
113
|
-
:close-on-overlay="false"
|
|
114
|
-
:close-on-escape="false"
|
|
115
|
-
>
|
|
113
|
+
<VcPopup v-model="open" title="Mandatory Action" :close-on-overlay="false" :close-on-escape="false">
|
|
116
114
|
<!-- ... -->
|
|
117
115
|
</VcPopup>
|
|
118
116
|
```
|
|
@@ -164,8 +162,19 @@ The footer area sits below a separator line. It exposes a scoped `close` functio
|
|
|
164
162
|
```vue
|
|
165
163
|
<template #footer="{ close }">
|
|
166
164
|
<div class="tw-flex tw-justify-end tw-w-full tw-gap-3">
|
|
167
|
-
<VcButton
|
|
168
|
-
|
|
165
|
+
<VcButton
|
|
166
|
+
variant="outline"
|
|
167
|
+
@click="close"
|
|
168
|
+
>Cancel</VcButton
|
|
169
|
+
>
|
|
170
|
+
<VcButton
|
|
171
|
+
color="danger"
|
|
172
|
+
@click="
|
|
173
|
+
deleteItem();
|
|
174
|
+
close();
|
|
175
|
+
"
|
|
176
|
+
>Delete</VcButton
|
|
177
|
+
>
|
|
169
178
|
</div>
|
|
170
179
|
</template>
|
|
171
180
|
```
|
|
@@ -179,7 +188,10 @@ Use `v-model` to bind visibility to a reactive boolean. The popup emits `update:
|
|
|
179
188
|
```vue
|
|
180
189
|
<template>
|
|
181
190
|
<VcButton @click="isOpen = true">Open</VcButton>
|
|
182
|
-
<VcPopup
|
|
191
|
+
<VcPopup
|
|
192
|
+
v-model="isOpen"
|
|
193
|
+
title="Controlled"
|
|
194
|
+
>
|
|
183
195
|
<template #content>Visible state: {{ isOpen }}</template>
|
|
184
196
|
</VcPopup>
|
|
185
197
|
</template>
|
|
@@ -191,6 +203,7 @@ const isOpen = ref(false);
|
|
|
191
203
|
```
|
|
192
204
|
|
|
193
205
|
> **Tip:** You can also use `v-if` instead of `v-model` for a simpler pattern when you do not need animated exit transitions:
|
|
206
|
+
>
|
|
194
207
|
> ```vue
|
|
195
208
|
> <VcPopup v-if="showPopup" title="Simple" @close="showPopup = false">
|
|
196
209
|
> ```
|
|
@@ -214,9 +227,9 @@ The `modalWidth` prop accepts a Tailwind CSS max-width class. The default is `"t
|
|
|
214
227
|
|
|
215
228
|
Two props control fullscreen behavior:
|
|
216
229
|
|
|
217
|
-
| Prop
|
|
218
|
-
|
|
219
|
-
| `isFullscreen`
|
|
230
|
+
| Prop | Effect |
|
|
231
|
+
| -------------------- | ----------------------------------------------------------------------- |
|
|
232
|
+
| `isFullscreen` | Full viewport on **all** screen sizes |
|
|
220
233
|
| `isMobileFullscreen` | Full viewport on **mobile only** (detected via `IsMobileKey` injection) |
|
|
221
234
|
|
|
222
235
|
```vue
|
|
@@ -239,7 +252,11 @@ The most common pattern. Uses the `warning` variant and a two-button footer.
|
|
|
239
252
|
|
|
240
253
|
```vue
|
|
241
254
|
<template>
|
|
242
|
-
<VcButton
|
|
255
|
+
<VcButton
|
|
256
|
+
color="danger"
|
|
257
|
+
@click="confirmDelete"
|
|
258
|
+
>Delete Order</VcButton
|
|
259
|
+
>
|
|
243
260
|
|
|
244
261
|
<VcPopup
|
|
245
262
|
v-model="showConfirm"
|
|
@@ -247,13 +264,19 @@ The most common pattern. Uses the `warning` variant and a two-button footer.
|
|
|
247
264
|
variant="warning"
|
|
248
265
|
:close-on-overlay="false"
|
|
249
266
|
>
|
|
250
|
-
<template #content>
|
|
251
|
-
Are you sure you want to delete this order? This action cannot be undone.
|
|
252
|
-
</template>
|
|
267
|
+
<template #content> Are you sure you want to delete this order? This action cannot be undone. </template>
|
|
253
268
|
<template #footer="{ close }">
|
|
254
269
|
<div class="tw-flex tw-justify-end tw-w-full tw-gap-3">
|
|
255
|
-
<VcButton
|
|
256
|
-
|
|
270
|
+
<VcButton
|
|
271
|
+
variant="outline"
|
|
272
|
+
@click="close"
|
|
273
|
+
>Cancel</VcButton
|
|
274
|
+
>
|
|
275
|
+
<VcButton
|
|
276
|
+
color="danger"
|
|
277
|
+
@click="onDeleteConfirmed(close)"
|
|
278
|
+
>Delete</VcButton
|
|
279
|
+
>
|
|
257
280
|
</div>
|
|
258
281
|
</template>
|
|
259
282
|
</VcPopup>
|
|
@@ -297,11 +320,11 @@ async function handleDelete() {
|
|
|
297
320
|
|
|
298
321
|
The composable provides three convenience methods:
|
|
299
322
|
|
|
300
|
-
| Method
|
|
301
|
-
|
|
323
|
+
| Method | Variant | Returns |
|
|
324
|
+
| --------------------------- | ------- | ------------------ |
|
|
302
325
|
| `showConfirmation(message)` | warning | `Promise<boolean>` |
|
|
303
|
-
| `showError(message)`
|
|
304
|
-
| `showInfo(message)`
|
|
326
|
+
| `showError(message)` | error | `void` |
|
|
327
|
+
| `showInfo(message)` | info | `void` |
|
|
305
328
|
|
|
306
329
|
### Popup with Form and Validation
|
|
307
330
|
|
|
@@ -309,7 +332,11 @@ Use `Field` from `vee-validate` inside the popup content for inline validation.
|
|
|
309
332
|
|
|
310
333
|
```vue
|
|
311
334
|
<template>
|
|
312
|
-
<VcPopup
|
|
335
|
+
<VcPopup
|
|
336
|
+
v-model="showForm"
|
|
337
|
+
title="Add Note"
|
|
338
|
+
modal-width="tw-max-w-lg"
|
|
339
|
+
>
|
|
313
340
|
<template #content>
|
|
314
341
|
<VcForm class="tw-space-y-4">
|
|
315
342
|
<Field
|
|
@@ -347,8 +374,16 @@ Use `Field` from `vee-validate` inside the popup content for inline validation.
|
|
|
347
374
|
</template>
|
|
348
375
|
<template #footer="{ close }">
|
|
349
376
|
<div class="tw-flex tw-justify-end tw-w-full tw-gap-3">
|
|
350
|
-
<VcButton
|
|
351
|
-
|
|
377
|
+
<VcButton
|
|
378
|
+
variant="outline"
|
|
379
|
+
@click="close"
|
|
380
|
+
>Cancel</VcButton
|
|
381
|
+
>
|
|
382
|
+
<VcButton
|
|
383
|
+
:disabled="!meta.valid"
|
|
384
|
+
@click="save(close)"
|
|
385
|
+
>Save</VcButton
|
|
386
|
+
>
|
|
352
387
|
</div>
|
|
353
388
|
</template>
|
|
354
389
|
</VcPopup>
|
|
@@ -438,7 +473,13 @@ Or display a richer error popup in-template:
|
|
|
438
473
|
|
|
439
474
|
<!-- GOOD: call close from the slot scope -->
|
|
440
475
|
<template #footer="{ close }">
|
|
441
|
-
<VcButton
|
|
476
|
+
<VcButton
|
|
477
|
+
@click="
|
|
478
|
+
doSomething();
|
|
479
|
+
close();
|
|
480
|
+
"
|
|
481
|
+
>Confirm</VcButton
|
|
482
|
+
>
|
|
442
483
|
</template>
|
|
443
484
|
```
|
|
444
485
|
|
|
@@ -463,45 +504,45 @@ Or display a richer error popup in-template:
|
|
|
463
504
|
|
|
464
505
|
## Props
|
|
465
506
|
|
|
466
|
-
| Prop
|
|
467
|
-
|
|
468
|
-
| `modelValue`
|
|
469
|
-
| `title`
|
|
470
|
-
| `closable`
|
|
471
|
-
| `variant`
|
|
472
|
-
| `modalWidth`
|
|
473
|
-
| `isMobileFullscreen` | `boolean`
|
|
474
|
-
| `isFullscreen`
|
|
475
|
-
| `closeOnOverlay`
|
|
476
|
-
| `closeOnEscape`
|
|
507
|
+
| Prop | Type | Default | Description |
|
|
508
|
+
| -------------------- | ---------------------------------------------------------- | ------------------- | ----------------------------------------------------------------------------------------------- |
|
|
509
|
+
| `modelValue` | `boolean` | `undefined` | Controlled visibility via `v-model`. When omitted, the popup is visible if mounted. |
|
|
510
|
+
| `title` | `string` | `undefined` | Dialog title text rendered in the header bar. |
|
|
511
|
+
| `closable` | `boolean` | `true` | Show the close button (X) and allow dismissal. When `false`, all dismiss channels are disabled. |
|
|
512
|
+
| `variant` | `"default" \| "error" \| "warning" \| "success" \| "info"` | `"default"` | Semantic variant that determines the icon and its color. |
|
|
513
|
+
| `modalWidth` | `string` | `"tw-max-w-md"` | Tailwind max-width class applied to the dialog panel. |
|
|
514
|
+
| `isMobileFullscreen` | `boolean` | `false` | Expand to fullscreen on mobile viewports only. |
|
|
515
|
+
| `isFullscreen` | `boolean` | `false` | Expand to fullscreen on all viewports. |
|
|
516
|
+
| `closeOnOverlay` | `boolean` | Inherits `closable` | Whether clicking the backdrop overlay closes the popup. |
|
|
517
|
+
| `closeOnEscape` | `boolean` | Inherits `closable` | Whether pressing the Escape key closes the popup. |
|
|
477
518
|
|
|
478
519
|
## Events
|
|
479
520
|
|
|
480
|
-
| Event
|
|
481
|
-
|
|
482
|
-
| `update:modelValue` | `boolean`
|
|
483
|
-
| `close`
|
|
521
|
+
| Event | Payload | Description |
|
|
522
|
+
| ------------------- | ------------------ | ------------------------------------------------------------------------- |
|
|
523
|
+
| `update:modelValue` | `boolean` | Emitted with `false` when the popup requests to close. Used by `v-model`. |
|
|
524
|
+
| `close` | `PopupCloseReason` | Reason the popup was closed: `"overlay"`, `"escape"`, or `"action"`. |
|
|
484
525
|
|
|
485
526
|
## Slots
|
|
486
527
|
|
|
487
|
-
| Slot
|
|
488
|
-
|
|
489
|
-
| `header`
|
|
490
|
-
| `content` | --
|
|
491
|
-
| `footer`
|
|
528
|
+
| Slot | Scoped Props | Description |
|
|
529
|
+
| --------- | ----------------------- | ---------------------------------------------------------------------------------------------- |
|
|
530
|
+
| `header` | -- | Replaces the default title text. The close button (X) remains visible beside the slot content. |
|
|
531
|
+
| `content` | -- | Main body area of the popup. |
|
|
532
|
+
| `footer` | `{ close: () => void }` | Footer area below a separator line. Call `close()` to dismiss the popup from any button. |
|
|
492
533
|
|
|
493
534
|
## CSS Custom Properties
|
|
494
535
|
|
|
495
|
-
| Variable
|
|
496
|
-
|
|
497
|
-
| `--popup-border-radius`
|
|
498
|
-
| `--popup-shadow`
|
|
499
|
-
| `--popup-overlay-blur`
|
|
500
|
-
| `--popup-bg`
|
|
501
|
-
| `--popup-header-color`
|
|
502
|
-
| `--popup-content-text-color` | `var(--primary-700)`
|
|
503
|
-
| `--popup-footer-separator`
|
|
504
|
-
| `--popup-overlay`
|
|
536
|
+
| Variable | Default | Description |
|
|
537
|
+
| ---------------------------- | ---------------------- | ------------------------------------ |
|
|
538
|
+
| `--popup-border-radius` | `6px` | Border radius of the dialog panel |
|
|
539
|
+
| `--popup-shadow` | `var(--shadow-md)` | Box shadow around the panel |
|
|
540
|
+
| `--popup-overlay-blur` | `var(--overlay-blur)` | Backdrop blur amount |
|
|
541
|
+
| `--popup-bg` | `var(--additional-50)` | Background color of the dialog panel |
|
|
542
|
+
| `--popup-header-color` | `var(--primary-700)` | Title text color |
|
|
543
|
+
| `--popup-content-text-color` | `var(--primary-700)` | Content text color |
|
|
544
|
+
| `--popup-footer-separator` | `var(--neutrals-200)` | Footer top border color |
|
|
545
|
+
| `--popup-overlay` | `var(--overlay-bg)` | Overlay background color |
|
|
505
546
|
|
|
506
547
|
## Accessibility
|
|
507
548
|
|