@vc-shell/vc-app-skill 2.1.0-pr255.4dc5c0d → 2.1.0-pr256.0fe3abb
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/package.json +1 -1
- package/runtime/knowledge/docs/core/api/platform.docs.md +20 -18
- package/runtime/knowledge/docs/core/blade-navigation/blade-nav-composables.docs.md +43 -34
- package/runtime/knowledge/docs/core/blade-navigation/table-query-state/useTableQueryState.docs.md +95 -0
- package/runtime/knowledge/docs/core/composables/useAppBarMobileButtons/useAppBarMobileButtons.docs.md +5 -3
- package/runtime/knowledge/docs/core/composables/useAppBarWidget/useAppBarWidget.docs.md +12 -10
- package/runtime/knowledge/docs/core/composables/useAppInsights/useAppInsights.docs.md +7 -5
- package/runtime/knowledge/docs/core/composables/useAssets/useAssets.docs.md +8 -6
- package/runtime/knowledge/docs/core/composables/useAssetsManager/useAssetsManager.docs.md +3 -1
- package/runtime/knowledge/docs/core/composables/useAsync/useAsync.docs.md +1 -1
- package/runtime/knowledge/docs/core/composables/useBladeRegistry/useBladeRegistry.docs.md +8 -5
- package/runtime/knowledge/docs/core/composables/useBladeWidgets/index.docs.md +12 -12
- package/runtime/knowledge/docs/core/composables/useBreadcrumbs/useBreadcrumbs.docs.md +3 -3
- package/runtime/knowledge/docs/core/composables/useConnectionStatus/useConnectionStatus.docs.md +4 -3
- package/runtime/knowledge/docs/core/composables/useDynamicProperties/useDynamicProperties.docs.md +1 -0
- package/runtime/knowledge/docs/core/composables/useFunctions/useFunctions.docs.md +3 -3
- package/runtime/knowledge/docs/core/composables/useKeyboardNavigation/useKeyboardNavigation.docs.md +5 -4
- package/runtime/knowledge/docs/core/composables/useLanguages/useLanguages.docs.md +3 -3
- package/runtime/knowledge/docs/core/composables/useLoading/useLoading.docs.md +2 -0
- package/runtime/knowledge/docs/core/composables/useModificationTracker/useModificationTracker.docs.md +1 -2
- package/runtime/knowledge/docs/core/composables/useNotifications/useNotifications.docs.md +1 -1
- package/runtime/knowledge/docs/core/composables/usePermissions/usePermissions.docs.md +3 -3
- package/runtime/knowledge/docs/core/composables/usePlatformLocaleSync/usePlatformLocaleSync.docs.md +35 -0
- package/runtime/knowledge/docs/core/composables/usePopup/usePopup.docs.md +1 -1
- package/runtime/knowledge/docs/core/composables/useResponsive/useResponsive.docs.md +2 -2
- package/runtime/knowledge/docs/core/composables/useSettings/useSettings.docs.md +2 -1
- package/runtime/knowledge/docs/core/composables/useSettingsMenu/useSettingsMenu.docs.md +18 -18
- package/runtime/knowledge/docs/core/composables/useSidebarState/useSidebarState.docs.md +3 -3
- package/runtime/knowledge/docs/core/composables/useSlowNetworkDetection/useSlowNetworkDetection.docs.md +10 -7
- package/runtime/knowledge/docs/core/composables/useTheme/useTheme.docs.md +7 -7
- package/runtime/knowledge/docs/core/composables/useToolbar/useToolbar.docs.md +18 -12
- package/runtime/knowledge/docs/core/composables/useUser/useUser.docs.md +2 -2
- package/runtime/knowledge/docs/core/composables/useUserManagement/useUserManagement.docs.md +20 -20
- package/runtime/knowledge/docs/core/composables/useWidgets/useWidgets.docs.md +15 -24
- package/runtime/knowledge/docs/core/directives/loading/loading.docs.md +2 -2
- package/runtime/knowledge/docs/core/notifications/composables/useBladeNotifications.docs.md +183 -0
- package/runtime/knowledge/docs/core/notifications/composables/useBroadcastFilter.docs.md +117 -0
- package/runtime/knowledge/docs/core/notifications/composables/useNotificationContext.docs.md +150 -0
- package/runtime/knowledge/docs/core/notifications/composables/useNotificationStore.docs.md +114 -0
- package/runtime/knowledge/docs/core/notifications/notifications.docs.md +50 -30
- package/runtime/knowledge/docs/core/plugins/ai-agent/ai-agent.docs.md +30 -11
- package/runtime/knowledge/docs/core/plugins/extension-points/extension-points.docs.md +1 -1
- package/runtime/knowledge/docs/core/plugins/global-error-handler/global-error-handler.docs.md +2 -3
- package/runtime/knowledge/docs/core/plugins/modularity/modularity.docs.md +26 -26
- package/runtime/knowledge/docs/core/plugins/permissions/permissions.docs.md +2 -3
- package/runtime/knowledge/docs/core/plugins/signalR/signalR.docs.md +11 -50
- package/runtime/knowledge/docs/core/plugins/validation/validation.docs.md +9 -6
- package/runtime/knowledge/docs/core/services/services.docs.md +15 -13
- package/runtime/knowledge/docs/core/types/types.docs.md +37 -40
- package/runtime/knowledge/docs/core/utilities/date/date-utilities.docs.md +1 -2
- package/runtime/knowledge/docs/core/utilities/shared-utilities.docs.md +21 -30
- package/runtime/knowledge/docs/core/utilities/thumbnail/thumbnail.docs.md +2 -2
- package/runtime/knowledge/docs/core/utilities/utilities.docs.md +9 -8
- package/runtime/knowledge/docs/injection-keys.docs.md +6 -11
- package/runtime/knowledge/docs/modules/assets/assets-details.docs.md +123 -0
- package/runtime/knowledge/docs/modules/assets-manager/assets-manager.docs.md +1 -1
- package/runtime/knowledge/docs/shell/_internal/popup/common/popup-common.docs.md +20 -12
- package/runtime/knowledge/docs/shell/auth/ChangePasswordPage/change-password-page.docs.md +10 -10
- package/runtime/knowledge/docs/shell/auth/ForgotPasswordPage/forgot-password-page.docs.md +6 -6
- package/runtime/knowledge/docs/shell/auth/InvitePage/invite-page.docs.md +4 -4
- package/runtime/knowledge/docs/shell/auth/LoginPage/login-page.docs.md +16 -14
- package/runtime/knowledge/docs/shell/auth/ResetPasswordPage/reset-password-page.docs.md +1 -1
- package/runtime/knowledge/docs/shell/auth/sign-in/sign-in.docs.md +12 -11
- package/runtime/knowledge/docs/shell/components/change-password/change-password.docs.md +10 -3
- package/runtime/knowledge/docs/shell/components/change-password-button/change-password-button.docs.md +3 -3
- package/runtime/knowledge/docs/shell/components/error-interceptor/error-interceptor.docs.md +9 -2
- package/runtime/knowledge/docs/shell/components/language-selector/language-selector.docs.md +4 -2
- package/runtime/knowledge/docs/shell/components/logout-button/logout-button.docs.md +1 -1
- package/runtime/knowledge/docs/shell/components/notification-dropdown/notification-dropdown.docs.md +35 -31
- package/runtime/knowledge/docs/shell/components/notification-template/notification-template.docs.md +17 -11
- package/runtime/knowledge/docs/shell/components/settings-menu/settings-menu.docs.md +8 -7
- package/runtime/knowledge/docs/shell/components/settings-menu-item/settings-menu-item.docs.md +23 -21
- package/runtime/knowledge/docs/shell/components/sidebar/sidebar.docs.md +5 -3
- package/runtime/knowledge/docs/shell/components/theme-selector/theme-selector.docs.md +7 -7
- package/runtime/knowledge/docs/shell/components/user-dropdown-button/user-dropdown-button.docs.md +11 -11
- package/runtime/knowledge/docs/shell/dashboard/dashboard-charts/dashboard-charts.docs.md +28 -16
- package/runtime/knowledge/docs/shell/dashboard/dashboard-widget-card/dashboard-widget-card.docs.md +17 -19
- package/runtime/knowledge/docs/shell/dashboard/draggable-dashboard/dashboard-widget-skeleton.docs.md +33 -0
- package/runtime/knowledge/docs/shell/dashboard/draggable-dashboard/draggable-dashboard.docs.md +21 -0
- package/runtime/knowledge/docs/ui/components/atoms/vc-badge/vc-badge.docs.md +2 -1
- package/runtime/knowledge/docs/ui/components/atoms/vc-banner/vc-banner.docs.md +2 -2
- package/runtime/knowledge/docs/ui/components/atoms/vc-button/vc-button.docs.md +15 -14
- package/runtime/knowledge/docs/ui/components/atoms/vc-container/vc-container.docs.md +9 -6
- package/runtime/knowledge/docs/ui/components/atoms/vc-environment-banner/vc-environment-banner.docs.md +42 -0
- package/runtime/knowledge/docs/ui/components/atoms/vc-hint/vc-hint.docs.md +1 -1
- package/runtime/knowledge/docs/ui/components/atoms/vc-icon/vc-icon.docs.md +10 -9
- package/runtime/knowledge/docs/ui/components/atoms/vc-image/vc-image.docs.md +19 -4
- package/runtime/knowledge/docs/ui/components/atoms/vc-label/vc-label.docs.md +2 -2
- package/runtime/knowledge/docs/ui/components/atoms/vc-link/vc-link.docs.md +5 -4
- package/runtime/knowledge/docs/ui/components/atoms/vc-loading/vc-loading.docs.md +5 -4
- package/runtime/knowledge/docs/ui/components/atoms/vc-progress/vc-progress.docs.md +9 -8
- package/runtime/knowledge/docs/ui/components/atoms/vc-scrollable-container/vc-scrollable-container.docs.md +7 -0
- package/runtime/knowledge/docs/ui/components/atoms/vc-skeleton/vc-skeleton.docs.md +1 -1
- package/runtime/knowledge/docs/ui/components/atoms/vc-status/vc-status.docs.md +2 -2
- package/runtime/knowledge/docs/ui/components/atoms/vc-status-icon/vc-status-icon.docs.md +1 -1
- package/runtime/knowledge/docs/ui/components/atoms/vc-tooltip/vc-tooltip.docs.md +11 -10
- package/runtime/knowledge/docs/ui/components/atoms/vc-video/vc-video.docs.md +28 -8
- package/runtime/knowledge/docs/ui/components/atoms/vc-widget/vc-widget.docs.md +22 -19
- package/runtime/knowledge/docs/ui/components/molecules/multilanguage-selector/multilanguage-selector.docs.md +8 -8
- package/runtime/knowledge/docs/ui/components/molecules/vc-accordion/vc-accordion.docs.md +16 -6
- package/runtime/knowledge/docs/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.docs.md +9 -8
- package/runtime/knowledge/docs/ui/components/molecules/vc-checkbox/vc-checkbox.docs.md +42 -34
- package/runtime/knowledge/docs/ui/components/molecules/vc-checkbox-group/vc-checkbox-group.docs.md +1 -1
- package/runtime/knowledge/docs/ui/components/molecules/vc-color-input/vc-color-input.docs.md +14 -1
- package/runtime/knowledge/docs/ui/components/molecules/vc-date-picker/vc-date-picker.docs.md +3 -1
- package/runtime/knowledge/docs/ui/components/molecules/vc-dropdown/vc-dropdown.docs.md +34 -33
- package/runtime/knowledge/docs/ui/components/molecules/vc-editor/vc-editor.docs.md +26 -24
- package/runtime/knowledge/docs/ui/components/molecules/vc-field/vc-field.docs.md +12 -14
- package/runtime/knowledge/docs/ui/components/molecules/vc-file-upload/vc-file-upload.docs.md +30 -30
- package/runtime/knowledge/docs/ui/components/molecules/vc-input/vc-input.docs.md +2 -2
- package/runtime/knowledge/docs/ui/components/molecules/vc-input-currency/vc-input-currency.docs.md +1 -1
- package/runtime/knowledge/docs/ui/components/molecules/vc-input-dropdown/vc-input-dropdown.docs.md +34 -31
- package/runtime/knowledge/docs/ui/components/molecules/vc-input-group/vc-input-group.docs.md +14 -12
- package/runtime/knowledge/docs/ui/components/molecules/vc-menu/vc-menu.docs.md +1 -1
- package/runtime/knowledge/docs/ui/components/molecules/vc-multivalue/vc-multivalue.docs.md +36 -27
- package/runtime/knowledge/docs/ui/components/molecules/vc-pagination/vc-pagination.docs.md +5 -1
- package/runtime/knowledge/docs/ui/components/molecules/{vc-dropdown-panel/vc-dropdown-panel.docs.md → vc-popover/vc-popover.docs.md} +26 -25
- package/runtime/knowledge/docs/ui/components/molecules/vc-radio-button/vc-radio-button.docs.md +10 -9
- package/runtime/knowledge/docs/ui/components/molecules/vc-select/vc-select.docs.md +44 -19
- package/runtime/knowledge/docs/ui/components/molecules/vc-slider/vc-slider.docs.md +11 -11
- package/runtime/knowledge/docs/ui/components/molecules/vc-switch/vc-switch.docs.md +15 -14
- package/runtime/knowledge/docs/ui/components/molecules/vc-textarea/vc-textarea.docs.md +15 -15
- package/runtime/knowledge/docs/ui/components/molecules/vc-toast/vc-toast.docs.md +15 -13
- package/runtime/knowledge/docs/ui/components/organisms/vc-app/vc-app.docs.md +5 -1
- package/runtime/knowledge/docs/ui/components/organisms/vc-auth-layout/vc-auth-layout.docs.md +18 -0
- package/runtime/knowledge/docs/ui/components/organisms/vc-blade/vc-blade.docs.md +48 -78
- package/runtime/knowledge/docs/ui/components/organisms/vc-data-table/composables/table-composables.docs.md +9 -11
- package/runtime/knowledge/docs/ui/components/organisms/vc-data-table/vc-data-table.docs.md +71 -43
- package/runtime/knowledge/docs/ui/components/organisms/vc-dynamic-property/vc-dynamic-property.docs.md +27 -20
- package/runtime/knowledge/docs/ui/components/organisms/vc-gallery/vc-gallery.docs.md +2 -2
- package/runtime/knowledge/docs/ui/components/organisms/vc-image-upload/vc-image-upload.docs.md +12 -12
- package/runtime/knowledge/docs/ui/components/organisms/vc-popup/vc-popup.docs.md +33 -24
- package/runtime/knowledge/docs/ui/components/organisms/vc-scheduler/vc-scheduler.docs.md +412 -0
- package/runtime/knowledge/docs/ui/components/organisms/vc-sidebar/vc-sidebar.docs.md +43 -26
- package/runtime/knowledge/docs/ui/composables/ui-composables.docs.md +15 -9
- package/runtime/knowledge/docs/ui/composables/useDataTableSort.docs.md +8 -6
- package/runtime/knowledge/docs/ui/composables/useTableSearch.docs.md +130 -0
- package/runtime/knowledge/docs/ui/composables/useTableSelection.docs.md +4 -4
- package/runtime/knowledge/docs/ui/composables/useTableSort.docs.md +2 -3
|
@@ -145,7 +145,7 @@ Show helper text by default, but swap to an error message when validation fails:
|
|
|
145
145
|
## Architecture notes
|
|
146
146
|
|
|
147
147
|
- VcHint is a single `<div>` element — no wrapper. `role="alert"` is toggled reactively via `:role` binding when `error` prop changes.
|
|
148
|
-
- CSS variables are scoped
|
|
148
|
+
- The `--hint-*` CSS variables are declared globally on `:root` (not scoped to `.vc-hint`); the component's `<style lang="scss">` block is not scoped.
|
|
149
149
|
- Source: `framework/ui/components/atoms/vc-hint/vc-hint.vue`
|
|
150
150
|
|
|
151
151
|
<!-- internal:end -->
|
|
@@ -25,14 +25,15 @@ A unified icon component that renders icons from multiple libraries. Lucide Icon
|
|
|
25
25
|
|
|
26
26
|
## Key Props
|
|
27
27
|
|
|
28
|
-
| Prop
|
|
29
|
-
|
|
|
30
|
-
| `icon`
|
|
31
|
-
| `size`
|
|
32
|
-
| `variant`
|
|
33
|
-
| `customSize`
|
|
34
|
-
| `ariaLabel`
|
|
35
|
-
| `basePath`
|
|
28
|
+
| Prop | Type | Default | Description |
|
|
29
|
+
| -------------- | ------------------------------------------------------ | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
30
|
+
| `icon` | `string \| Component` | `"lucide-square"` | Icon identifier or Vue component |
|
|
31
|
+
| `size` | `"xs" \| "s" \| "m" \| "l" \| "xl" \| "xxl" \| "xxxl"` | `"m"` | Predefined size |
|
|
32
|
+
| `variant` | `"warning" \| "danger" \| "success"` | — | Semantic color variant |
|
|
33
|
+
| `customSize` | `number` | — | Custom size in pixels (overrides `size`) |
|
|
34
|
+
| `ariaLabel` | `string` | — | Accessible label for meaningful icons |
|
|
35
|
+
| `basePath` | `string` | `"/assets/icons"` | Base path for SVG sprite icons |
|
|
36
|
+
| `useContainer` | `boolean` | `false` | Deprecated. Wraps the icon in a fixed-size container; removed in a future version (logs a dev warning). Remove it — icons render correctly without it. |
|
|
36
37
|
|
|
37
38
|
::storybook id="layout-vcicon--all-sizes" height="300"
|
|
38
39
|
|
|
@@ -127,6 +128,6 @@ import MyCustomIcon from "./MyCustomIcon.vue";
|
|
|
127
128
|
- Icon resolution is handled by a switch on the string prefix: `lucide-` maps to the Lucide component registry; `fa-` / `fas fa-` / `bi-` / `material-` are legacy paths kept for backward compatibility and will be removed in v3.
|
|
128
129
|
- The `svg:` prefix loads from an SVG sprite at `basePath` (default `/assets/icons`) using a `<use>` element. Sprite must be included in the app's static assets.
|
|
129
130
|
- `customSize` takes a number and sets `width`/`height` inline; it overrides the `size` prop class entirely.
|
|
130
|
-
- Color variants (`warning`, `danger`, `success`)
|
|
131
|
+
- Color variants (`warning`, `danger`, `success`) resolve to the per-variant CSS custom properties `--icon-color-{success|danger|warning}`. Prefix/registry icons pick these up via variant CSS classes; custom Vue-component icons receive the color inline as `color: var(--icon-color-${variant})`.
|
|
131
132
|
|
|
132
133
|
<!-- internal:end -->
|
|
@@ -35,9 +35,15 @@ An image display component with predefined sizes, aspect ratio control, and a pl
|
|
|
35
35
|
| `bordered` | `boolean` | `false` | Adds a subtle border |
|
|
36
36
|
| `clickable` | `boolean` | `false` | Makes the image interactive with cursor and click event |
|
|
37
37
|
| `emptyIcon` | `string` | `"lucide-image"` | Icon shown when `src` is empty |
|
|
38
|
-
| `alt` | `string` | — | Accessible alt text
|
|
38
|
+
| `alt` | `string` | — | Accessible alt text. Required to expose `role="img"`; without it the image is decorative |
|
|
39
39
|
| `thumbnailSize` | `ThumbnailSize` | — | Load a thumbnail variant instead of full-size image. Values: `"sm"`, `"md"`, `"lg"`, `"64x64"`, `"128x128"`, `"168x168"`, `"216x216"`, `"348x348"` |
|
|
40
40
|
|
|
41
|
+
## Events
|
|
42
|
+
|
|
43
|
+
| Event | Payload | Description |
|
|
44
|
+
| ------- | ------- | ----------------------------------------------------------- |
|
|
45
|
+
| `click` | — | Emitted on click/Enter/Space, only when `clickable` is true |
|
|
46
|
+
|
|
41
47
|
::storybook id="data-display-vcimage--size-variants" height="300"
|
|
42
48
|
|
|
43
49
|
## Size Reference
|
|
@@ -53,6 +59,15 @@ An image display component with predefined sizes, aspect ratio control, and a pl
|
|
|
53
59
|
| `xxl` | 145px |
|
|
54
60
|
| `auto` | 100% of parent |
|
|
55
61
|
|
|
62
|
+
## CSS Custom Properties
|
|
63
|
+
|
|
64
|
+
| Variable | Default | Description |
|
|
65
|
+
| -------------------------- | --------------------- | ------------------------------- |
|
|
66
|
+
| `--image-border-radius` | `6px` | Corner radius when `bordered` |
|
|
67
|
+
| `--image-border-color` | `var(--neutrals-200)` | Border color when `bordered` |
|
|
68
|
+
| `--image-empty-icon-color` | `var(--neutrals-400)` | Placeholder icon color |
|
|
69
|
+
| `--image-focus-ring-color` | `var(--primary-300)` | Focus ring color when clickable |
|
|
70
|
+
|
|
56
71
|
## Common Patterns
|
|
57
72
|
|
|
58
73
|
### Product Thumbnail in a List
|
|
@@ -87,7 +102,7 @@ An image display component with predefined sizes, aspect ratio control, and a pl
|
|
|
87
102
|
|
|
88
103
|
## Accessibility
|
|
89
104
|
|
|
90
|
-
- When `src`
|
|
105
|
+
- When `src` **and** `alt` are present and not `clickable`, the container has `role="img"` with `aria-label` from `alt`. Without `alt` the image is treated as decorative (no `role`), since `role="img"` requires an accessible name.
|
|
91
106
|
- Clickable images receive `role="button"`, `tabindex="0"`, and keyboard support (Enter/Space)
|
|
92
107
|
- Empty placeholder icon is marked `aria-hidden="true"`
|
|
93
108
|
- Focus ring appears on `:focus-visible` for clickable images
|
|
@@ -107,8 +122,8 @@ When displaying images in lists or grids, pass a `thumbnailSize` (e.g. `"128x128
|
|
|
107
122
|
|
|
108
123
|
- VcImage lives in `framework/ui/components/atoms/vc-image/`.
|
|
109
124
|
- Images are rendered as CSS `background-image` on a `<div>` rather than an `<img>` tag; this enables `background-size: cover/contain` and preserves aspect-ratio without JS.
|
|
110
|
-
- HTTPS enforcement: the `
|
|
111
|
-
- `thumbnailSize`
|
|
125
|
+
- HTTPS enforcement: the `ensureHttps()` helper (called from the `imageHandler` computed and the thumbnail-probe watcher) upgrades `http://` to `https://` when `window.location.protocol === 'https:'`.
|
|
126
|
+
- `thumbnailSize` inserts a size suffix before the file extension, compatible with the Virto Commerce thumbnail convention: `photo.jpg` becomes `photo_128x128.jpg`. This is a platform-specific convention.
|
|
112
127
|
- Aspect ratios are implemented as Tailwind aspect-ratio utility classes (`tw-aspect-square`, `tw-aspect-video`, etc.).
|
|
113
128
|
- Clickable mode adds `role="button"` and forwards keyboard Enter/Space to the click handler, consistent with other atom-level interactive components.
|
|
114
129
|
|
|
@@ -167,9 +167,9 @@ Use a different icon for the tooltip trigger:
|
|
|
167
167
|
## Architecture notes
|
|
168
168
|
|
|
169
169
|
- VcLabel lives in `framework/ui/components/atoms/vc-label/`.
|
|
170
|
-
- The element type (`<label>` vs `<div>`) is
|
|
170
|
+
- The root element type (`<label>` vs `<div>`) is chosen inline via `:is="htmlFor ? 'label' : 'div'"` on the root `<component>` (no `tag` computed exists).
|
|
171
171
|
- The tooltip trigger is rendered by `VcTooltip` (internal molecule); the `tooltipIcon` prop simply passes through to an inner `VcIcon` instance.
|
|
172
|
-
- `multilanguage` + `currentLanguage` render a small pill via an inline `<
|
|
172
|
+
- `multilanguage` + `currentLanguage` render a small pill via an inline `<div>` with `.vc-label__language` class — not a separate component.
|
|
173
173
|
- VcLabel is the canonical label primitive consumed by `VcInput`, `VcSelect`, `VcTextarea`, `VcCheckbox`, and `VcRadioButton` in `framework/ui/components/molecules/`.
|
|
174
174
|
|
|
175
175
|
<!-- internal:end -->
|
|
@@ -35,10 +35,11 @@ function openDetails() {
|
|
|
35
35
|
|
|
36
36
|
## Key Props
|
|
37
37
|
|
|
38
|
-
| Prop | Type
|
|
39
|
-
| ---------- |
|
|
40
|
-
| `active` | `boolean`
|
|
41
|
-
| `disabled` | `boolean`
|
|
38
|
+
| Prop | Type | Default | Description |
|
|
39
|
+
| ---------- | ------------ | ------- | ------------------------------------------------------------------------------- |
|
|
40
|
+
| `active` | `boolean` | `false` | Highlights the link as currently selected |
|
|
41
|
+
| `disabled` | `boolean` | `false` | Prevents interaction and applies muted styling |
|
|
42
|
+
| `onClick` | `() => void` | -- | Declared prop, currently unused by the template (use the `click` event instead) |
|
|
42
43
|
|
|
43
44
|
## Events
|
|
44
45
|
|
|
@@ -52,7 +52,8 @@ const isLoading = ref(true);
|
|
|
52
52
|
| `--loading-overlay-bg` | `rgba(255,255,255,0.6)` | Overlay background color |
|
|
53
53
|
| `--loading-bar-width` | `140px` | Width of the progress bar |
|
|
54
54
|
| `--loading-bar-height` | `4px` | Height of the progress bar |
|
|
55
|
-
|
|
55
|
+
|
|
56
|
+
> **Note:** The overlay z-index comes from the global `--z-critical-loading` token and is not overridable per-instance.
|
|
56
57
|
|
|
57
58
|
::storybook id="layout-vcloading--interactive"
|
|
58
59
|
|
|
@@ -117,7 +118,7 @@ Override the bar color to match a specific status or brand theme:
|
|
|
117
118
|
|
|
118
119
|
## Tips
|
|
119
120
|
|
|
120
|
-
- VcLoading is hidden
|
|
121
|
+
- VcLoading is hidden via the `tw-hidden` class when inactive, so it adds zero layout cost when idle.
|
|
121
122
|
- The sweep animation runs on a 1.5-second infinite loop using CSS `@keyframes` — no JavaScript timers involved.
|
|
122
123
|
- The overlay applies `backdrop-filter: blur(3px)` for a frosted-glass effect. If you need a fully opaque overlay, set `--loading-overlay-bg: rgba(255,255,255,1)`.
|
|
123
124
|
- When using inside a scrollable container, the overlay covers only the visible viewport of that container because it is absolutely positioned.
|
|
@@ -138,8 +139,8 @@ Override the bar color to match a specific status or brand theme:
|
|
|
138
139
|
|
|
139
140
|
## Architecture notes
|
|
140
141
|
|
|
141
|
-
- The overlay is a single `<div>`
|
|
142
|
-
- The sweeping bar is a child `<div>` animated via `@keyframes vc-
|
|
142
|
+
- The overlay is a single `<div>` always rendered in the DOM; visibility is toggled via the `vc-loading-overlay--active` class (base state is `tw-hidden`), so it retains animation state when inactive.
|
|
143
|
+
- The sweeping bar is a child `<div>` animated via `@keyframes vc-bar-sweep`, animating the `left` property from `-40%` to `100%`.
|
|
143
144
|
- `backdrop-filter: blur(3px)` is applied to the overlay div directly; older Safari requires `-webkit-backdrop-filter` as a fallback.
|
|
144
145
|
- Source: `framework/ui/components/atoms/vc-loading/vc-loading.vue`
|
|
145
146
|
|
|
@@ -148,13 +148,14 @@ async function handleUpload(files: FileList) {
|
|
|
148
148
|
|
|
149
149
|
## CSS Custom Properties
|
|
150
150
|
|
|
151
|
-
| Variable | Default | Description
|
|
152
|
-
| -------------------------------- | --------------------- |
|
|
153
|
-
| `--progressbar-height` | `8px` | Bar height
|
|
154
|
-
| `--progressbar-border-radius` | `9999px` | Border radius (pill shape)
|
|
155
|
-
| `--progressbar-background-color` | `var(--neutrals-200)` | Track background
|
|
156
|
-
| `--progressbar-foreground-color` | `var(--primary-500)` | Fill color
|
|
157
|
-
| `--progressbar-striped-bg` | gradient | Striped variant background
|
|
151
|
+
| Variable | Default | Description |
|
|
152
|
+
| -------------------------------- | --------------------- | ---------------------------- |
|
|
153
|
+
| `--progressbar-height` | `8px` | Bar height |
|
|
154
|
+
| `--progressbar-border-radius` | `9999px` | Border radius (pill shape) |
|
|
155
|
+
| `--progressbar-background-color` | `var(--neutrals-200)` | Track background |
|
|
156
|
+
| `--progressbar-foreground-color` | `var(--primary-500)` | Fill color |
|
|
157
|
+
| `--progressbar-striped-bg` | gradient | Striped variant background |
|
|
158
|
+
| `--progressbar-striped-color` | `var(--primary-400)` | Striped variant stripe color |
|
|
158
159
|
|
|
159
160
|
## Tips
|
|
160
161
|
|
|
@@ -179,7 +180,7 @@ async function handleUpload(files: FileList) {
|
|
|
179
180
|
|
|
180
181
|
## Architecture notes
|
|
181
182
|
|
|
182
|
-
- The fill
|
|
183
|
+
- The fill is a full-width (`width: 100%`) element translated horizontally via `transform: translateX(-(100 - value)%)`, not `width`, for smoother GPU-accelerated animation. There is no `scaleX` or `transform-origin: left`.
|
|
183
184
|
- The `value` prop is clamped via `Math.min(100, Math.max(0, props.value))` in a computed.
|
|
184
185
|
- Source: `framework/ui/components/atoms/vc-progress/vc-progress.vue`
|
|
185
186
|
|
|
@@ -128,6 +128,13 @@ Replace the default chevrons with custom indicators:
|
|
|
128
128
|
</VcScrollableContainer>
|
|
129
129
|
```
|
|
130
130
|
|
|
131
|
+
## CSS Custom Properties
|
|
132
|
+
|
|
133
|
+
| Variable | Default | Description |
|
|
134
|
+
| ---------------------- | --------------------- | --------------------- |
|
|
135
|
+
| `--scroll-arrow-size` | `16px` | Arrow indicator size |
|
|
136
|
+
| `--scroll-arrow-color` | `var(--neutrals-400)` | Arrow indicator color |
|
|
137
|
+
|
|
131
138
|
## Tips
|
|
132
139
|
|
|
133
140
|
- The `speed` prop is captured once at mount time and is not reactive. If you need to change speed dynamically, remount the component with a `:key` binding.
|
|
@@ -136,7 +136,7 @@ The last row automatically renders at 60% width for a natural paragraph feel.
|
|
|
136
136
|
|
|
137
137
|
## Architecture notes
|
|
138
138
|
|
|
139
|
-
- The `text` variant
|
|
139
|
+
- The `text` variant renders rows via `v-for="index in rows"` over `<div class="vc-skeleton__row">` elements. `getRowWidth(index)` returns `60%` for the last row (inline style) for a natural paragraph taper.
|
|
140
140
|
- Animation uses a CSS `@keyframes` pulse (opacity oscillation), not a moving shimmer, for simplicity and performance.
|
|
141
141
|
- Source: `framework/ui/components/atoms/vc-skeleton/vc-skeleton.vue`
|
|
142
142
|
|
|
@@ -131,8 +131,8 @@ Each variant has its own set of CSS variables following the pattern `--status-{v
|
|
|
131
131
|
|
|
132
132
|
## Architecture notes
|
|
133
133
|
|
|
134
|
-
- The `extend` prop
|
|
135
|
-
-
|
|
134
|
+
- The `extend` prop toggles the `vc-status--extended` modifier class; all color theming is done via `--status-{variant}-*` CSS variables scoped under `.vc-status`.
|
|
135
|
+
- Each variant is bound directly as `vc-status--${variant}` and styled through a SCSS `@each $variant in $variants` loop; the special variants `"light-danger"`, `"info-dark"`, and `"primary"` are kept for backward compatibility.
|
|
136
136
|
- Source: `framework/ui/components/atoms/vc-status/vc-status.vue`
|
|
137
137
|
|
|
138
138
|
<!-- internal:end -->
|
|
@@ -167,7 +167,7 @@ VcStatusIcon is intentionally minimal. If you need a text label next to the icon
|
|
|
167
167
|
|
|
168
168
|
## Architecture notes
|
|
169
169
|
|
|
170
|
-
- VcStatusIcon wraps two `VcIcon` instances in a single `<
|
|
170
|
+
- VcStatusIcon wraps two `VcIcon` instances in a single `<div class="vc-status-icon">` with `v-if`/`v-else` switching on the `status` prop.
|
|
171
171
|
- Icon size inherits from parent font-size; no dedicated size prop is exposed.
|
|
172
172
|
- Source: `framework/ui/components/atoms/vc-status-icon/vc-status-icon.vue`
|
|
173
173
|
|
|
@@ -6,7 +6,7 @@ group: feedback
|
|
|
6
6
|
|
|
7
7
|
# VcTooltip
|
|
8
8
|
|
|
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
|
|
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 vc-app root element (falling back to `document.body`) for proper stacking above all content.
|
|
10
10
|
|
|
11
11
|
## Quick Start
|
|
12
12
|
|
|
@@ -248,13 +248,13 @@ const actions = [
|
|
|
248
248
|
</template>
|
|
249
249
|
</VcTooltip>
|
|
250
250
|
|
|
251
|
-
<!-- Correct -- use a popover or dropdown for interactive content -->
|
|
252
|
-
<
|
|
251
|
+
<!-- Correct -- use a popover or dropdown component for interactive content -->
|
|
252
|
+
<YourPopover>
|
|
253
253
|
<span>Click for help</span>
|
|
254
254
|
<template #content>
|
|
255
255
|
<a href="/docs">Read the documentation</a>
|
|
256
256
|
</template>
|
|
257
|
-
</
|
|
257
|
+
</YourPopover>
|
|
258
258
|
```
|
|
259
259
|
|
|
260
260
|
### Forgetting the #tooltip slot
|
|
@@ -324,7 +324,8 @@ const actions = [
|
|
|
324
324
|
| `--tooltip-font-size` | `12px` | Text size |
|
|
325
325
|
| `--tooltip-padding-x` | `10px` | Horizontal padding |
|
|
326
326
|
| `--tooltip-padding-y` | `6px` | Vertical padding |
|
|
327
|
-
|
|
327
|
+
|
|
328
|
+
Stacking order comes from the global `--z-critical-tooltip` token and is not overridable per-instance.
|
|
328
329
|
|
|
329
330
|
## Accessibility
|
|
330
331
|
|
|
@@ -332,7 +333,7 @@ const actions = [
|
|
|
332
333
|
- `aria-describedby` links the trigger to the tooltip when visible
|
|
333
334
|
- Shows on `focusin`, hides on `focusout` for keyboard users
|
|
334
335
|
- Escape key dismisses the tooltip
|
|
335
|
-
- Tooltip is teleported to the document
|
|
336
|
+
- Tooltip is teleported to the vc-app root element (falling back to `document.body`) for proper stacking context
|
|
336
337
|
- Fade transition (150ms in, 100ms out) provides smooth visual feedback
|
|
337
338
|
- The tooltip has `pointer-events: none` -- it cannot be interacted with directly
|
|
338
339
|
|
|
@@ -347,10 +348,10 @@ const actions = [
|
|
|
347
348
|
## Architecture notes
|
|
348
349
|
|
|
349
350
|
- VcTooltip uses `@floating-ui/vue` (`useFloating`, `autoUpdate`, `flip`, `shift`, `arrow`, `offset` middleware).
|
|
350
|
-
- The tooltip content is teleported
|
|
351
|
-
- Show/hide state is managed with a single `
|
|
352
|
-
- The delay timer is stored in a `
|
|
353
|
-
- Arrow positioning is handled by the `
|
|
351
|
+
- The tooltip content is teleported via Vue's `<Teleport>` to escape stacking contexts. The target is resolved by `useTeleportTarget()` with priority explicit target -> vc-app root element (`AppRootElementKey`) -> `<body>` fallback.
|
|
352
|
+
- Show/hide state is managed with a single `tooltipVisible` ref toggled by `mouseenter`/`mouseleave` and `focusin`/`focusout` on the trigger slot wrapper.
|
|
353
|
+
- The delay timer is stored in a `showTimeout` variable (not a ref) and cleared in `hideTooltip`/`onBeforeUnmount` to cancel a pending show.
|
|
354
|
+
- Arrow positioning is handled by the `arrowRef` template ref passed to the `arrow` middleware; position is applied via `:style` on the arrow element.
|
|
354
355
|
- Source: `framework/ui/components/atoms/vc-tooltip/vc-tooltip.vue`
|
|
355
356
|
|
|
356
357
|
<!-- internal:end -->
|
|
@@ -34,14 +34,21 @@ import { VcVideo } from "@vc-shell/framework";
|
|
|
34
34
|
|
|
35
35
|
## Key Props
|
|
36
36
|
|
|
37
|
-
| Prop
|
|
38
|
-
|
|
|
39
|
-
| `source`
|
|
40
|
-
| `label`
|
|
41
|
-
| `tooltip`
|
|
37
|
+
| Prop | Type | Default | Description |
|
|
38
|
+
| ------------------- | -------- | ------- | -------------------------------------------------------------------------------------- |
|
|
39
|
+
| `source` | `string` | -- | Embed URL for the video (e.g., YouTube embed link) |
|
|
40
|
+
| `label` | `string` | -- | Label text displayed above the video |
|
|
41
|
+
| `tooltip` | `string` | -- | Tooltip text shown on the label's info icon |
|
|
42
|
+
| `additionalSandbox` | `string` | -- | Extra space-separated iframe sandbox tokens appended to the secure default (see below) |
|
|
42
43
|
|
|
43
44
|
::storybook id="data-display-vcvideo--with-tooltip" height="400"
|
|
44
45
|
|
|
46
|
+
## Events
|
|
47
|
+
|
|
48
|
+
| Event | Payload | Description |
|
|
49
|
+
| ------- | ------- | ------------------------------------------------------------ |
|
|
50
|
+
| `click` | -- | Declared public emit. Currently the template never fires it. |
|
|
51
|
+
|
|
45
52
|
## Common Patterns
|
|
46
53
|
|
|
47
54
|
### Video with Label and Tooltip
|
|
@@ -110,17 +117,30 @@ When `source` is not provided, VcVideo renders a centered film icon placeholder
|
|
|
110
117
|
|
|
111
118
|
- Always use the **embed** URL format, not the standard watch URL. For YouTube, use `https://www.youtube.com/embed/VIDEO_ID` instead of `https://www.youtube.com/watch?v=VIDEO_ID`.
|
|
112
119
|
- The iframe has `loading="lazy"`, so videos below the fold are not loaded until the user scrolls to them. This keeps initial page load fast.
|
|
113
|
-
- The `sandbox` attribute
|
|
120
|
+
- The `sandbox` attribute defaults to the secure minimum `allow-scripts allow-presentation`. If your video host requires more, append tokens via `additionalSandbox` — see the Security section below.
|
|
121
|
+
- The iframe sets a fixed `allow` permissions policy (`accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture`) plus `allowfullscreen`, so embedded players can autoplay, go fullscreen, and use picture-in-picture. These are not configurable per-instance.
|
|
114
122
|
- The iframe renders at a fixed height of 300px. To customize the height, override the iframe styles via a scoped CSS rule targeting `.vc-video__container iframe`.
|
|
115
123
|
- The placeholder has a height of 200px so the layout does not collapse when no source is provided.
|
|
116
124
|
|
|
117
125
|
## Accessibility
|
|
118
126
|
|
|
119
127
|
- The iframe uses the `title` attribute (set to `label` or "Video") for screen readers
|
|
120
|
-
- `sandbox` attribute
|
|
128
|
+
- `sandbox` attribute defaults to the secure minimum `allow-scripts allow-presentation`
|
|
121
129
|
- `loading="lazy"` defers iframe load until visible
|
|
122
130
|
- Placeholder state uses `role="img"` with `aria-label="No video source"`
|
|
123
131
|
|
|
132
|
+
## Security
|
|
133
|
+
|
|
134
|
+
The iframe `sandbox` defaults to `allow-scripts allow-presentation` — the minimum that keeps mainstream embeds (YouTube, Vimeo) working while denying the framed page access to the parent origin. To add capabilities a specific host needs, pass them through `additionalSandbox`:
|
|
135
|
+
|
|
136
|
+
```vue
|
|
137
|
+
<!-- Some embeds need popups for auth flows -->
|
|
138
|
+
<VcVideo source="https://example.com/embed" additional-sandbox="allow-popups" />
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
!!! danger "Never combine `allow-same-origin` with `allow-scripts`"
|
|
142
|
+
Per MDN and OWASP, enabling both tokens lets the embedded page remove its own sandbox and reach the parent origin's cookies, `localStorage`, and DOM. `VcVideo` renders whatever `source` you pass, so for untrusted or user-supplied URLs do **not** add `allow-same-origin`.
|
|
143
|
+
|
|
124
144
|
!!! warning "Always use embed URLs, not watch URLs"
|
|
125
145
|
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
146
|
|
|
@@ -136,7 +156,7 @@ YouTube watch URLs (`youtube.com/watch?v=...`) will be blocked by the browser's
|
|
|
136
156
|
|
|
137
157
|
- VcVideo lives in `framework/ui/components/atoms/vc-video/`.
|
|
138
158
|
- The component is a thin wrapper around a native `<iframe>` — no custom video controls are implemented.
|
|
139
|
-
- The `sandbox` attribute is
|
|
159
|
+
- The `sandbox` attribute is computed from a secure base (`allow-scripts allow-presentation`) plus any `additionalSandbox` tokens, deduped. `allow-same-origin` is intentionally omitted from the default — see the Security section.
|
|
140
160
|
- The label is rendered via `VcLabel` (internal atom) with the `tooltip` prop forwarded as the VcLabel tooltip slot content.
|
|
141
161
|
- Placeholder state (`source` is falsy) swaps the iframe for a `<div>` with `role="img"` containing a `VcIcon` with `lucide-film`.
|
|
142
162
|
|
|
@@ -42,14 +42,15 @@ function openNotifications() {
|
|
|
42
42
|
|
|
43
43
|
## Key Props
|
|
44
44
|
|
|
45
|
-
| Prop | Type | Default | Description
|
|
46
|
-
| ------------ | ------------------ | ------- |
|
|
47
|
-
| `icon` | `string` | -- | Icon name (Lucide format, e.g., `"lucide-save"`)
|
|
48
|
-
| `title` | `string` | -- | Label text below (or beside) the icon
|
|
49
|
-
| `value` | `string \| number` | -- | Badge count displayed on the icon; numbers above 99 show as "99+"
|
|
50
|
-
| `disabled` | `boolean` | `false` | Prevents clicks and applies muted styling
|
|
51
|
-
| `isExpanded` | `boolean` | `false` | Expanded visual state
|
|
52
|
-
| `horizontal` | `boolean` | `false` | Arranges icon and title side by side instead of stacked
|
|
45
|
+
| Prop | Type | Default | Description |
|
|
46
|
+
| ------------ | ------------------ | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
47
|
+
| `icon` | `string` | -- | Icon name (Lucide format, e.g., `"lucide-save"`) |
|
|
48
|
+
| `title` | `string` | -- | Label text below (or beside) the icon |
|
|
49
|
+
| `value` | `string \| number` | -- | Badge count displayed on the icon; numbers above 99 show as "99+" |
|
|
50
|
+
| `disabled` | `boolean` | `false` | Prevents clicks and applies muted styling |
|
|
51
|
+
| `isExpanded` | `boolean` | `false` | Expanded visual state |
|
|
52
|
+
| `horizontal` | `boolean` | `false` | Arranges icon and title side by side instead of stacked |
|
|
53
|
+
| `widgetId` | `string` | -- | Sets the `data-widget-id` attribute on the root element. The root also binds `data-widget-name` from `title`; both are used for widget identification/targeting. |
|
|
53
54
|
|
|
54
55
|
## Events
|
|
55
56
|
|
|
@@ -97,16 +98,18 @@ Badge values above 99 are automatically displayed as "99+".
|
|
|
97
98
|
|
|
98
99
|
## CSS Custom Properties
|
|
99
100
|
|
|
100
|
-
| Variable
|
|
101
|
-
|
|
|
102
|
-
| `--widget-bg-color`
|
|
103
|
-
| `--widget-bg-hover-color`
|
|
104
|
-
| `--widget-icon-color`
|
|
105
|
-
| `--widget-icon-hover-color`
|
|
106
|
-
| `--widget-
|
|
107
|
-
| `--widget-title-
|
|
108
|
-
| `--widget-
|
|
109
|
-
| `--widget-
|
|
101
|
+
| Variable | Default | Description |
|
|
102
|
+
| ------------------------------- | --------------------- | ------------------------- |
|
|
103
|
+
| `--widget-bg-color` | `transparent` | Background color |
|
|
104
|
+
| `--widget-bg-hover-color` | `var(--neutrals-50)` | Background on hover |
|
|
105
|
+
| `--widget-icon-color` | `var(--neutrals-700)` | Icon color |
|
|
106
|
+
| `--widget-icon-hover-color` | `var(--primary-600)` | Icon color on hover |
|
|
107
|
+
| `--widget-icon-disabled-color` | `var(--neutrals-400)` | Icon color when disabled |
|
|
108
|
+
| `--widget-title-color` | `var(--neutrals-600)` | Title text color |
|
|
109
|
+
| `--widget-title-hover-color` | `var(--primary-600)` | Title color on hover |
|
|
110
|
+
| `--widget-title-disabled-color` | `var(--neutrals-400)` | Title color when disabled |
|
|
111
|
+
| `--widget-border-radius` | `8px` | Corner radius |
|
|
112
|
+
| `--widget-focus-ring-color` | `var(--primary-300)` | Focus ring color |
|
|
110
113
|
|
|
111
114
|
## Accessibility
|
|
112
115
|
|
|
@@ -128,7 +131,7 @@ Badge values above 99 are automatically displayed as "99+".
|
|
|
128
131
|
## Architecture notes
|
|
129
132
|
|
|
130
133
|
- VcWidget lives in `framework/ui/components/atoms/vc-widget/`.
|
|
131
|
-
- The badge overlay is rendered by embedding `VcBadge` with `
|
|
134
|
+
- The badge overlay is rendered by embedding `VcBadge` with `content="truncateCount"`, `custom-position`, `top="-6px"`, and `size="s"`. The `99+` truncation is performed by the shared `formatBadgeCount` utility (via the `truncateCount` computed), not inline in the template.
|
|
132
135
|
- `isExpanded` applies `.vc-widget--expanded` modifier; used by the shell sidebar to visually distinguish active navigation state.
|
|
133
136
|
- `horizontal` applies `.vc-widget--horizontal` modifier which switches the internal flex direction from `column` to `row`.
|
|
134
137
|
- 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.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
---
|
|
2
|
-
title:
|
|
2
|
+
title: VcLanguageSelector
|
|
3
3
|
category: components
|
|
4
4
|
group: form
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
#
|
|
7
|
+
# VcLanguageSelector
|
|
8
8
|
|
|
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 -- `
|
|
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 -- `VcLanguageSelector` controls which language version of the content the user is editing.
|
|
10
10
|
|
|
11
11
|
## When to Use
|
|
12
12
|
|
|
@@ -21,7 +21,7 @@ Compact circular flag button that opens a dropdown for selecting a content langu
|
|
|
21
21
|
```vue
|
|
22
22
|
<script setup lang="ts">
|
|
23
23
|
import { ref } from "vue";
|
|
24
|
-
import {
|
|
24
|
+
import { VcLanguageSelector } from "@vc-shell/framework";
|
|
25
25
|
|
|
26
26
|
const currentLang = ref("en-US");
|
|
27
27
|
|
|
@@ -32,7 +32,7 @@ const languages = [
|
|
|
32
32
|
</script>
|
|
33
33
|
|
|
34
34
|
<template>
|
|
35
|
-
<
|
|
35
|
+
<VcLanguageSelector
|
|
36
36
|
v-model="currentLang"
|
|
37
37
|
:options="languages"
|
|
38
38
|
/>
|
|
@@ -58,7 +58,7 @@ A typical use case is a product detail blade where the user can edit the name an
|
|
|
58
58
|
```vue
|
|
59
59
|
<script setup lang="ts">
|
|
60
60
|
import { ref, computed } from "vue";
|
|
61
|
-
import {
|
|
61
|
+
import { VcLanguageSelector } from "@vc-shell/framework";
|
|
62
62
|
|
|
63
63
|
const product = ref({
|
|
64
64
|
names: { "en-US": "Widget", "de-DE": "Widget-Teil" },
|
|
@@ -91,7 +91,7 @@ const currentDescription = computed({
|
|
|
91
91
|
<template>
|
|
92
92
|
<VcBlade title="Edit Product">
|
|
93
93
|
<template #actions>
|
|
94
|
-
<
|
|
94
|
+
<VcLanguageSelector
|
|
95
95
|
v-model="currentLang"
|
|
96
96
|
:options="languages"
|
|
97
97
|
/>
|
|
@@ -132,7 +132,7 @@ onMounted(async () => {
|
|
|
132
132
|
|
|
133
133
|
- **Compact layout**: The button renders as a small circle showing the flag of the currently selected language. Clicking it opens a dropdown with all available options.
|
|
134
134
|
- **v-model binding**: The component uses `modelValue` / `update:modelValue` for two-way binding, following the standard Vue 3 v-model convention.
|
|
135
|
-
- **Flag images**: The `flag` property on each option is optional. When provided, it shows the flag image; otherwise,
|
|
135
|
+
- **Flag images**: The `flag` property on each option is optional. When provided, it shows the flag image; otherwise, a globe icon (`lucide-globe`) is displayed.
|
|
136
136
|
- **Dropdown positioning**: The dropdown is positioned relative to the button and adjusts to avoid viewport overflow.
|
|
137
137
|
|
|
138
138
|
## Tips
|
|
@@ -53,12 +53,12 @@ Without `v-model`, no items are expanded on mount. Pass an initial value to pre-
|
|
|
53
53
|
|
|
54
54
|
Four variants control the visual grouping and spacing of accordion items.
|
|
55
55
|
|
|
56
|
-
| Variant | Description
|
|
57
|
-
| ----------- |
|
|
58
|
-
| `default` | Items stacked with shared top/bottom borders, no gaps
|
|
59
|
-
| `bordered` | Single outer border wrapping all items, items separated by inner borders
|
|
60
|
-
| `separated` | Card-like items with 12px gaps between them, each with its own border
|
|
61
|
-
| `ghost` | Transparent background, minimal styling, no borders
|
|
56
|
+
| Variant | Description |
|
|
57
|
+
| ----------- | -------------------------------------------------------------------------- |
|
|
58
|
+
| `default` | Items stacked with shared top/bottom borders, no gaps |
|
|
59
|
+
| `bordered` | Single outer border wrapping all items, items separated by inner borders |
|
|
60
|
+
| `separated` | Card-like items with 12px gaps between them, each with its own border |
|
|
61
|
+
| `ghost` | Transparent background, minimal styling, no borders and no content padding |
|
|
62
62
|
|
|
63
63
|
```vue
|
|
64
64
|
<VcAccordion :items="items" variant="separated" />
|
|
@@ -262,6 +262,16 @@ interface AccordionItem {
|
|
|
262
262
|
| `--accordion-item-transition-duration` | `300ms` | Expand/collapse animation duration |
|
|
263
263
|
| `--accordion-item-fade-height` | `60px` | Fade gradient height on collapsed preview |
|
|
264
264
|
| `--accordion-item-focus-ring-color` | `var(--primary-100)` | Focus ring color for keyboard navigation |
|
|
265
|
+
| `--accordion-item-header-font-size` | `14px` | Header font size |
|
|
266
|
+
| `--accordion-item-header-font-weight` | `500` | Header font weight |
|
|
267
|
+
| `--accordion-item-header-line-height` | `20px` | Header line height |
|
|
268
|
+
| `--accordion-item-header-text-transform` | `none` | Header text transform |
|
|
269
|
+
| `--accordion-item-header-gap` | `0` | Gap between header label and icon |
|
|
270
|
+
| `--accordion-item-icon-margin-left` | `12px` | Left margin of the chevron icon |
|
|
271
|
+
| `--accordion-item-icon-size` | `20px` | Chevron icon size |
|
|
272
|
+
| `--accordion-item-content-color` | `var(--secondary-950)` | Content body text color |
|
|
273
|
+
| `--accordion-item-content-font-size` | `14px` | Content body font size |
|
|
274
|
+
| `--accordion-item-content-line-height` | `20px` | Content body line height |
|
|
265
275
|
|
|
266
276
|
> **Note:** The `ghost` variant overrides several variables to transparent/zero values for minimal appearance.
|
|
267
277
|
|
package/runtime/knowledge/docs/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.docs.md
CHANGED
|
@@ -194,10 +194,10 @@ In a typical VC-Shell blade hierarchy, push a breadcrumb each time a child blade
|
|
|
194
194
|
|
|
195
195
|
```vue
|
|
196
196
|
<script setup lang="ts">
|
|
197
|
-
import { useBreadcrumbs,
|
|
197
|
+
import { useBreadcrumbs, useBlade } from "@vc-shell/framework";
|
|
198
198
|
|
|
199
199
|
const { breadcrumbs, push } = useBreadcrumbs();
|
|
200
|
-
const { openBlade, closeSelf } =
|
|
200
|
+
const { openBlade, closeSelf } = useBlade();
|
|
201
201
|
|
|
202
202
|
function openProductDetail(product: Product) {
|
|
203
203
|
push({
|
|
@@ -270,12 +270,13 @@ clickHandler: () => { navigate(); return true; }
|
|
|
270
270
|
|
|
271
271
|
## CSS Variables
|
|
272
272
|
|
|
273
|
-
| Variable | Default | Description
|
|
274
|
-
| ----------------------------------------- | ---------------------- |
|
|
275
|
-
| `--separator-color` | `var(--neutrals-400)` | Color of the `/` separator character
|
|
276
|
-
| `--breadcrumbs-item-border-color` | `var(--secondary-300)` | Border color of breadcrumb items
|
|
277
|
-
| `--breadcrumbs-
|
|
278
|
-
| `--breadcrumbs-expand-button-color
|
|
273
|
+
| Variable | Default | Description |
|
|
274
|
+
| ----------------------------------------- | ---------------------- | ----------------------------------------- |
|
|
275
|
+
| `--separator-color` | `var(--neutrals-400)` | Color of the `/` separator character |
|
|
276
|
+
| `--breadcrumbs-item-border-color` | `var(--secondary-300)` | Border color of breadcrumb items |
|
|
277
|
+
| `--breadcrumbs-item-border-color-hover` | `var(--secondary-400)` | Border color of breadcrumb items on hover |
|
|
278
|
+
| `--breadcrumbs-expand-button-color` | `var(--neutrals-500)` | Color of the overflow "more" button |
|
|
279
|
+
| `--breadcrumbs-expand-button-color-hover` | `var(--neutrals-600)` | Hover color of the overflow button |
|
|
279
280
|
|
|
280
281
|
## Accessibility
|
|
281
282
|
|