@vc-shell/vc-app-skill 2.0.3 → 2.0.4
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/usePlatformLocaleSync/usePlatformLocaleSync.docs.md +6 -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/assets-details.docs.md +123 -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/dashboard-widget-skeleton.docs.md +7 -0
- package/runtime/knowledge/docs/shell/dashboard/draggable-dashboard/draggable-dashboard.docs.md +7 -0
- package/runtime/knowledge/docs/ui/components/atoms/vc-badge/vc-badge.docs.md +24 -0
- package/runtime/knowledge/docs/ui/components/atoms/vc-banner/vc-banner.docs.md +20 -0
- package/runtime/knowledge/docs/ui/components/atoms/vc-button/vc-button.docs.md +32 -5
- package/runtime/knowledge/docs/ui/components/atoms/vc-card/vc-card.docs.md +15 -2
- package/runtime/knowledge/docs/ui/components/atoms/vc-col/vc-col.docs.md +11 -1
- package/runtime/knowledge/docs/ui/components/atoms/vc-container/vc-container.docs.md +10 -0
- package/runtime/knowledge/docs/ui/components/atoms/vc-hint/vc-hint.docs.md +20 -0
- package/runtime/knowledge/docs/ui/components/atoms/vc-icon/vc-icon.docs.md +24 -0
- package/runtime/knowledge/docs/ui/components/atoms/vc-image/vc-image.docs.md +26 -0
- package/runtime/knowledge/docs/ui/components/atoms/vc-label/vc-label.docs.md +24 -0
- package/runtime/knowledge/docs/ui/components/atoms/vc-link/vc-link.docs.md +22 -0
- package/runtime/knowledge/docs/ui/components/atoms/vc-loading/vc-loading.docs.md +21 -0
- package/runtime/knowledge/docs/ui/components/atoms/vc-progress/vc-progress.docs.md +20 -0
- package/runtime/knowledge/docs/ui/components/atoms/vc-row/vc-row.docs.md +11 -1
- package/runtime/knowledge/docs/ui/components/atoms/vc-scrollable-container/vc-scrollable-container.docs.md +11 -1
- package/runtime/knowledge/docs/ui/components/atoms/vc-skeleton/vc-skeleton.docs.md +20 -0
- package/runtime/knowledge/docs/ui/components/atoms/vc-status/vc-status.docs.md +20 -0
- package/runtime/knowledge/docs/ui/components/atoms/vc-status-icon/vc-status-icon.docs.md +20 -0
- package/runtime/knowledge/docs/ui/components/atoms/vc-tooltip/vc-tooltip.docs.md +25 -1
- package/runtime/knowledge/docs/ui/components/atoms/vc-video/vc-video.docs.md +25 -0
- package/runtime/knowledge/docs/ui/components/atoms/vc-widget/vc-widget.docs.md +22 -0
- package/runtime/knowledge/docs/ui/components/molecules/multilanguage-selector/multilanguage-selector.docs.md +10 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-accordion/vc-accordion.docs.md +17 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.docs.md +27 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-checkbox/vc-checkbox.docs.md +27 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-checkbox-group/vc-checkbox-group.docs.md +23 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-color-input/vc-color-input.docs.md +24 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-date-picker/vc-date-picker.docs.md +27 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-dropdown/vc-dropdown.docs.md +27 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-dropdown-panel/vc-dropdown-panel.docs.md +22 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-editor/vc-editor.docs.md +17 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-field/vc-field.docs.md +17 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-file-upload/vc-file-upload.docs.md +17 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-form/vc-form.docs.md +15 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-image-tile/vc-image-tile.docs.md +12 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-input/vc-input.docs.md +30 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-input-currency/vc-input-currency.docs.md +27 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-input-dropdown/vc-input-dropdown.docs.md +26 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-input-group/vc-input-group.docs.md +21 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-menu/vc-menu.docs.md +24 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-multivalue/vc-multivalue.docs.md +28 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-pagination/vc-pagination.docs.md +25 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-radio-button/vc-radio-button.docs.md +25 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-radio-group/vc-radio-group.docs.md +22 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-rating/vc-rating.docs.md +17 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-select/vc-select.docs.md +32 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-slider/vc-slider.docs.md +22 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-switch/vc-switch.docs.md +25 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-textarea/vc-textarea.docs.md +27 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-toast/vc-toast.docs.md +28 -0
- package/runtime/knowledge/docs/ui/components/organisms/vc-app/vc-app.docs.md +19 -0
- package/runtime/knowledge/docs/ui/components/organisms/vc-auth-layout/vc-auth-layout.docs.md +13 -0
- package/runtime/knowledge/docs/ui/components/organisms/vc-blade/vc-blade.docs.md +22 -1
- package/runtime/knowledge/docs/ui/components/organisms/vc-data-table/composables/table-composables.docs.md +30 -5
- package/runtime/knowledge/docs/ui/components/organisms/vc-data-table/vc-data-table.docs.md +18 -0
- package/runtime/knowledge/docs/ui/components/organisms/vc-dynamic-property/vc-dynamic-property.docs.md +12 -0
- package/runtime/knowledge/docs/ui/components/organisms/vc-gallery/vc-gallery.docs.md +14 -0
- package/runtime/knowledge/docs/ui/components/organisms/vc-image-upload/vc-image-upload.docs.md +12 -0
- package/runtime/knowledge/docs/ui/components/organisms/vc-popup/vc-popup.docs.md +14 -1
- package/runtime/knowledge/docs/ui/components/organisms/vc-sidebar/vc-sidebar.docs.md +13 -0
- package/runtime/knowledge/docs/ui/composables/ui-composables.docs.md +7 -0
- package/runtime/knowledge/docs/ui/composables/useDataTablePagination.docs.md +9 -3
- package/runtime/knowledge/docs/ui/composables/useDataTableSort.docs.md +6 -0
- package/runtime/knowledge/docs/ui/composables/useTableSelection.docs.md +6 -0
- package/runtime/knowledge/docs/ui/composables/useTableSort.docs.md +6 -0
- package/runtime/knowledge/docs/ui/types/ui-types.docs.md +7 -0
|
@@ -1,9 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: VcTooltip
|
|
3
|
+
category: components
|
|
4
|
+
group: feedback
|
|
5
|
+
---
|
|
6
|
+
|
|
1
7
|
# VcTooltip
|
|
2
8
|
|
|
3
9
|
A floating tooltip that appears on hover or focus to provide contextual information about a trigger element. Powered by Floating UI for automatic positioning, collision detection, and arrow alignment. The tooltip is teleported to the document body for proper stacking above all content.
|
|
4
10
|
|
|
5
11
|
## Quick Start
|
|
6
12
|
|
|
13
|
+
::storybook id="overlay-vctooltip--default"
|
|
14
|
+
|
|
7
15
|
```vue
|
|
8
16
|
<template>
|
|
9
17
|
<VcTooltip>
|
|
@@ -55,6 +63,8 @@ The `start` and `end` variants align the tooltip to the beginning or end of the
|
|
|
55
63
|
|
|
56
64
|
## Variants
|
|
57
65
|
|
|
66
|
+
::storybook id="overlay-vctooltip--variants"
|
|
67
|
+
|
|
58
68
|
Three visual themes control the tooltip's appearance.
|
|
59
69
|
|
|
60
70
|
```vue
|
|
@@ -172,7 +182,8 @@ The `#tooltip` slot accepts any HTML or Vue components, not just text:
|
|
|
172
182
|
</VcTooltip>
|
|
173
183
|
```
|
|
174
184
|
|
|
175
|
-
|
|
185
|
+
!!! warning "No interactive content inside tooltips"
|
|
186
|
+
Tooltips should not contain interactive content (buttons, links, inputs). The tooltip panel has `pointer-events: none` — clicks and keyboard focus inside it are blocked. If you need interactive content in a floating panel, use a popover or dropdown component instead.
|
|
176
187
|
|
|
177
188
|
## Recipes
|
|
178
189
|
|
|
@@ -330,3 +341,16 @@ const actions = [
|
|
|
330
341
|
- [VcHint](../vc-hint/) -- inline hint text below form fields (always visible)
|
|
331
342
|
- [VcLabel](../vc-label/) -- label component with built-in tooltip support via its own `#tooltip` slot
|
|
332
343
|
- [VcIcon](../vc-icon/) -- commonly used as a tooltip trigger for info indicators
|
|
344
|
+
|
|
345
|
+
<!-- internal:start -->
|
|
346
|
+
|
|
347
|
+
## Architecture notes
|
|
348
|
+
|
|
349
|
+
- VcTooltip uses `@floating-ui/vue` (`useFloating`, `autoUpdate`, `flip`, `shift`, `arrow`, `offset` middleware).
|
|
350
|
+
- The tooltip content is teleported to `<body>` via Vue's `<Teleport>` to escape stacking contexts.
|
|
351
|
+
- Show/hide state is managed with a single `isVisible` ref toggled by `mouseenter`/`mouseleave` and `focusin`/`focusout` on the trigger slot wrapper.
|
|
352
|
+
- The delay timer is stored in a `timeoutId` ref and cleared on `mouseleave` to cancel pending show.
|
|
353
|
+
- Arrow positioning is handled by the `arrowEl` template ref passed to the `arrow` middleware; position is applied via `:style` on the arrow element.
|
|
354
|
+
- Source: `framework/ui/components/atoms/vc-tooltip/vc-tooltip.vue`
|
|
355
|
+
|
|
356
|
+
<!-- internal:end -->
|
|
@@ -1,7 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: VcVideo
|
|
3
|
+
category: components
|
|
4
|
+
group: media
|
|
5
|
+
---
|
|
6
|
+
|
|
1
7
|
# VcVideo
|
|
2
8
|
|
|
3
9
|
An embedded video player that renders an iframe for external video sources (YouTube, Vimeo, etc.) with an optional label and tooltip. When no source URL is provided, the component displays a centered film icon placeholder instead of a blank space, giving users a clear visual cue that a video can be attached.
|
|
4
10
|
|
|
11
|
+
::storybook id="data-display-vcvideo--default"
|
|
12
|
+
|
|
5
13
|
## When to Use
|
|
6
14
|
|
|
7
15
|
- Embed product or tutorial videos in blade detail views
|
|
@@ -32,6 +40,8 @@ import { VcVideo } from "@vc-shell/framework";
|
|
|
32
40
|
| `label` | `string` | -- | Label text displayed above the video |
|
|
33
41
|
| `tooltip` | `string` | -- | Tooltip text shown on the label's info icon |
|
|
34
42
|
|
|
43
|
+
::storybook id="data-display-vcvideo--with-tooltip" height="400"
|
|
44
|
+
|
|
35
45
|
## Common Patterns
|
|
36
46
|
|
|
37
47
|
### Video with Label and Tooltip
|
|
@@ -111,8 +121,23 @@ When `source` is not provided, VcVideo renders a centered film icon placeholder
|
|
|
111
121
|
- `loading="lazy"` defers iframe load until visible
|
|
112
122
|
- Placeholder state uses `role="img"` with `aria-label="No video source"`
|
|
113
123
|
|
|
124
|
+
!!! warning "Always use embed URLs, not watch URLs"
|
|
125
|
+
YouTube watch URLs (`youtube.com/watch?v=...`) will be blocked by the browser's frame policy. Always convert to the embed format (`youtube.com/embed/VIDEO_ID`). Vimeo similarly requires `player.vimeo.com/video/VIDEO_ID`.
|
|
126
|
+
|
|
114
127
|
## Related Components
|
|
115
128
|
|
|
116
129
|
- [VcLabel](../vc-label/) -- used internally for the label with tooltip
|
|
117
130
|
- [VcIcon](../vc-icon/) -- renders the placeholder film icon
|
|
118
131
|
- [VcRow](../vc-row/) / [VcCol](../vc-col/) -- layout primitives for placing video alongside other content
|
|
132
|
+
|
|
133
|
+
<!-- internal:start -->
|
|
134
|
+
|
|
135
|
+
## Architecture notes
|
|
136
|
+
|
|
137
|
+
- VcVideo lives in `framework/ui/components/atoms/vc-video/`.
|
|
138
|
+
- The component is a thin wrapper around a native `<iframe>` — no custom video controls are implemented.
|
|
139
|
+
- The `sandbox` attribute is hardcoded to `allow-scripts allow-same-origin allow-presentation allow-popups`. Apps that need additional iframe permissions must wrap the component or use a plain `<iframe>`.
|
|
140
|
+
- The label is rendered via `VcLabel` (internal atom) with the `tooltip` prop forwarded as the VcLabel tooltip slot content.
|
|
141
|
+
- Placeholder state (`source` is falsy) swaps the iframe for a `<div>` with `role="img"` containing a `VcIcon` with `lucide-film`.
|
|
142
|
+
|
|
143
|
+
<!-- internal:end -->
|
|
@@ -1,7 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: VcWidget
|
|
3
|
+
category: components
|
|
4
|
+
group: misc
|
|
5
|
+
---
|
|
6
|
+
|
|
1
7
|
# VcWidget
|
|
2
8
|
|
|
3
9
|
A clickable widget tile with an icon, title, and optional badge counter. Used in blade toolbars and sidebars to trigger blade-level actions or navigation.
|
|
4
10
|
|
|
11
|
+
::storybook id="data-display-vcwidget--default"
|
|
12
|
+
|
|
5
13
|
## When to Use
|
|
6
14
|
|
|
7
15
|
- Build widget panels in blade sidebars (e.g., "Orders", "Reviews", "Notifications")
|
|
@@ -49,6 +57,8 @@ function openNotifications() {
|
|
|
49
57
|
| ------- | ------- | ------------------------------------------------------------- |
|
|
50
58
|
| `click` | none | Fired when the widget is clicked (suppressed when `disabled`) |
|
|
51
59
|
|
|
60
|
+
::storybook id="data-display-vcwidget--sidebar-layout" height="350"
|
|
61
|
+
|
|
52
62
|
## Common Patterns
|
|
53
63
|
|
|
54
64
|
### Sidebar Widget Panel
|
|
@@ -112,3 +122,15 @@ Badge values above 99 are automatically displayed as "99+".
|
|
|
112
122
|
- [VcBadge](../vc-badge/) -- used internally for the count badge overlay
|
|
113
123
|
- [VcIcon](../vc-icon/) -- used internally for the widget icon
|
|
114
124
|
- [VcButton](../vc-button/) -- for standard action buttons
|
|
125
|
+
|
|
126
|
+
<!-- internal:start -->
|
|
127
|
+
|
|
128
|
+
## Architecture notes
|
|
129
|
+
|
|
130
|
+
- VcWidget lives in `framework/ui/components/atoms/vc-widget/`.
|
|
131
|
+
- The badge overlay is rendered by embedding `VcBadge` with `isDot`/`content` derived from the `value` prop; values above 99 are truncated to `"99+"` in the component template.
|
|
132
|
+
- `isExpanded` applies `.vc-widget--expanded` modifier; used by the shell sidebar to visually distinguish active navigation state.
|
|
133
|
+
- `horizontal` applies `.vc-widget--horizontal` modifier which switches the internal flex direction from `column` to `row`.
|
|
134
|
+
- The widget registers as a keyboard-interactive element (`role="button"`, Enter/Space handlers) rather than using a `<button>` to allow embedding arbitrary icon components without nesting interactive elements.
|
|
135
|
+
|
|
136
|
+
<!-- internal:end -->
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: MultilanguageSelector
|
|
3
|
+
category: components
|
|
4
|
+
group: form
|
|
5
|
+
---
|
|
6
|
+
|
|
1
7
|
# MultilanguageSelector
|
|
2
8
|
|
|
3
9
|
Compact circular flag button that opens a dropdown for selecting a content language. Designed for use in detail blades where entities have multilingual fields (e.g., product name, offer description, category title). This is distinct from the `LanguageSelector` settings entry, which changes the application UI locale -- `MultilanguageSelector` controls which language version of the content the user is editing.
|
|
@@ -10,6 +16,8 @@ Compact circular flag button that opens a dropdown for selecting a content langu
|
|
|
10
16
|
|
|
11
17
|
## Basic Usage
|
|
12
18
|
|
|
19
|
+
::storybook id="shared-multilanguageselector--interactive"
|
|
20
|
+
|
|
13
21
|
```vue
|
|
14
22
|
<script setup lang="ts">
|
|
15
23
|
import { ref } from "vue";
|
|
@@ -41,6 +49,8 @@ const languages = [
|
|
|
41
49
|
|
|
42
50
|
Each `LanguageOption` has: `{ value: string; label: string; flag?: string }`.
|
|
43
51
|
|
|
52
|
+
::storybook id="shared-multilanguageselector--disabled"
|
|
53
|
+
|
|
44
54
|
## Recipe: Multilingual Product Editing Blade
|
|
45
55
|
|
|
46
56
|
A typical use case is a product detail blade where the user can edit the name and description in multiple languages:
|
|
@@ -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.
|