@db-ux/v-core-components 5.1.4 → 5.1.6-shell-11663a0

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.
Files changed (76) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/agent/ControlPanelBrand.md +15 -0
  3. package/agent/ControlPanelDesktop.md +48 -0
  4. package/agent/ControlPanelMeta.md +19 -0
  5. package/agent/ControlPanelMobile.md +40 -0
  6. package/agent/ControlPanelNavigation.md +24 -0
  7. package/agent/ControlPanelNavigationItem.md +39 -0
  8. package/agent/ControlPanelPrimaryActions.md +20 -0
  9. package/agent/ControlPanelSecondaryActions.md +24 -0
  10. package/agent/Shell.md +28 -0
  11. package/agent/ShellSubNavigation.md +6 -0
  12. package/agent/_instructions.md +10 -0
  13. package/dist/components/accordion/accordion.vue.d.ts +1 -1
  14. package/dist/components/accordion/model.d.ts +2 -8
  15. package/dist/components/control-panel-brand/control-panel-brand.vue.d.ts +22 -0
  16. package/dist/components/control-panel-brand/index.d.ts +1 -0
  17. package/dist/components/control-panel-brand/model.d.ts +7 -0
  18. package/dist/components/control-panel-desktop/control-panel-desktop.vue.d.ts +34 -0
  19. package/dist/components/control-panel-desktop/index.d.ts +1 -0
  20. package/dist/components/control-panel-desktop/model.d.ts +7 -0
  21. package/dist/components/control-panel-flat-icon/control-panel-flat-icon.vue.d.ts +22 -0
  22. package/dist/components/control-panel-flat-icon/index.d.ts +1 -0
  23. package/dist/components/control-panel-flat-icon/model.d.ts +12 -0
  24. package/dist/components/control-panel-meta/control-panel-meta.vue.d.ts +18 -0
  25. package/dist/components/control-panel-meta/index.d.ts +1 -0
  26. package/dist/components/control-panel-meta/model.d.ts +5 -0
  27. package/dist/components/control-panel-mobile/control-panel-mobile.vue.d.ts +33 -0
  28. package/dist/components/control-panel-mobile/index.d.ts +1 -0
  29. package/dist/components/control-panel-mobile/model.d.ts +21 -0
  30. package/dist/components/control-panel-navigation/control-panel-navigation.vue.d.ts +26 -0
  31. package/dist/components/control-panel-navigation/index.d.ts +1 -0
  32. package/dist/components/control-panel-navigation/model.d.ts +27 -0
  33. package/dist/components/control-panel-navigation-item/control-panel-navigation-item.vue.d.ts +27 -0
  34. package/dist/components/control-panel-navigation-item/index.d.ts +1 -0
  35. package/dist/components/control-panel-navigation-item/model.d.ts +20 -0
  36. package/dist/components/control-panel-navigation-item-group/control-panel-navigation-item-group.vue.d.ts +32 -0
  37. package/dist/components/control-panel-navigation-item-group/index.d.ts +1 -0
  38. package/dist/components/control-panel-navigation-item-group/model.d.ts +42 -0
  39. package/dist/components/control-panel-primary-actions/control-panel-primary-actions.vue.d.ts +18 -0
  40. package/dist/components/control-panel-primary-actions/index.d.ts +1 -0
  41. package/dist/components/control-panel-primary-actions/model.d.ts +5 -0
  42. package/dist/components/control-panel-secondary-actions/control-panel-secondary-actions.vue.d.ts +18 -0
  43. package/dist/components/control-panel-secondary-actions/index.d.ts +1 -0
  44. package/dist/components/control-panel-secondary-actions/model.d.ts +5 -0
  45. package/dist/components/control-panel-skip-navigation/control-panel-skip-navigation.vue.d.ts +21 -0
  46. package/dist/components/control-panel-skip-navigation/index.d.ts +1 -0
  47. package/dist/components/control-panel-skip-navigation/model.d.ts +16 -0
  48. package/dist/components/custom-select/custom-select.vue.d.ts +1 -1
  49. package/dist/components/custom-select/model.d.ts +1 -1
  50. package/dist/components/custom-select-list/custom-select-list.vue.d.ts +1 -1
  51. package/dist/components/drawer/model.d.ts +1 -0
  52. package/dist/components/header/header.vue.d.ts +2 -2
  53. package/dist/components/input/input.vue.d.ts +1 -1
  54. package/dist/components/navigation-item/navigation-item.vue.d.ts +2 -2
  55. package/dist/components/notification/notification.vue.d.ts +1 -1
  56. package/dist/components/popover/popover.vue.d.ts +1 -0
  57. package/dist/components/select/select.vue.d.ts +1 -1
  58. package/dist/components/shell/index.d.ts +1 -0
  59. package/dist/components/shell/model.d.ts +38 -0
  60. package/dist/components/shell/shell.vue.d.ts +25 -0
  61. package/dist/components/shell-content/index.d.ts +1 -0
  62. package/dist/components/shell-content/model.d.ts +28 -0
  63. package/dist/components/shell-content/shell-content.vue.d.ts +27 -0
  64. package/dist/components/shell-sub-navigation/index.d.ts +1 -0
  65. package/dist/components/shell-sub-navigation/model.d.ts +5 -0
  66. package/dist/components/shell-sub-navigation/shell-sub-navigation.vue.d.ts +22 -0
  67. package/dist/components/tooltip/tooltip.vue.d.ts +1 -0
  68. package/dist/db-ux.es.js +2693 -1457
  69. package/dist/db-ux.umd.js +1 -1
  70. package/dist/index.d.ts +28 -0
  71. package/dist/shared/constants.d.ts +5 -1
  72. package/dist/shared/model.d.ts +96 -5
  73. package/dist/utils/floating-components.d.ts +7 -2
  74. package/dist/utils/index.d.ts +10 -0
  75. package/dist/utils/navigation.d.ts +27 -11
  76. package/package.json +7 -7
package/dist/index.d.ts CHANGED
@@ -12,6 +12,28 @@ export * from './components/card/index.js';
12
12
  export * from './components/card/model.js';
13
13
  export * from './components/checkbox/index.js';
14
14
  export * from './components/checkbox/model.js';
15
+ export * from './components/control-panel-brand/index.js';
16
+ export * from './components/control-panel-brand/model.js';
17
+ export * from './components/control-panel-desktop/index.js';
18
+ export * from './components/control-panel-desktop/model.js';
19
+ export * from './components/control-panel-flat-icon/index.js';
20
+ export * from './components/control-panel-flat-icon/model.js';
21
+ export * from './components/control-panel-meta/index.js';
22
+ export * from './components/control-panel-meta/model.js';
23
+ export * from './components/control-panel-mobile/index.js';
24
+ export * from './components/control-panel-mobile/model.js';
25
+ export * from './components/control-panel-navigation/index.js';
26
+ export * from './components/control-panel-navigation-item/index.js';
27
+ export * from './components/control-panel-navigation-item-group/index.js';
28
+ export * from './components/control-panel-navigation-item-group/model.js';
29
+ export * from './components/control-panel-navigation-item/model.js';
30
+ export * from './components/control-panel-navigation/model.js';
31
+ export * from './components/control-panel-primary-actions/index.js';
32
+ export * from './components/control-panel-primary-actions/model.js';
33
+ export * from './components/control-panel-secondary-actions/index.js';
34
+ export * from './components/control-panel-secondary-actions/model.js';
35
+ export * from './components/control-panel-skip-navigation/index.js';
36
+ export * from './components/control-panel-skip-navigation/model.js';
15
37
  export * from './components/custom-button/index.js';
16
38
  export * from './components/custom-button/model.js';
17
39
  export * from './components/custom-select/index.js';
@@ -58,6 +80,12 @@ export * from './components/section/index.js';
58
80
  export * from './components/section/model.js';
59
81
  export * from './components/select/index.js';
60
82
  export * from './components/select/model.js';
83
+ export * from './components/shell/index.js';
84
+ export * from './components/shell-content/index.js';
85
+ export * from './components/shell-content/model.js';
86
+ export * from './components/shell-sub-navigation/index.js';
87
+ export * from './components/shell-sub-navigation/model.js';
88
+ export * from './components/shell/model.js';
61
89
  export * from './components/stack/index.js';
62
90
  export * from './components/stack/model.js';
63
91
  export * from './components/switch/index.js';
@@ -14,12 +14,15 @@ export declare const DEFAULT_INVALID_MESSAGE: string;
14
14
  export declare const DEFAULT_REMOVE: string;
15
15
  export declare const DEFAULT_BACK: string;
16
16
  export declare const DEFAULT_SELECTED: string;
17
+ export declare const DEFAULT_EXPAND: string;
18
+ export declare const DEFAULT_COLLAPSE: string;
17
19
  export declare const DEFAULT_SCROLL_LEFT: string;
18
20
  export declare const DEFAULT_SCROLL_RIGHT: string;
19
- export declare const DEFAULT_BURGER_MENU: string;
20
21
  export declare const DEFAULT_ICON: string;
22
+ export declare const DEFAULT_BURGER_MENU: string;
21
23
  export declare const DEFAULT_ROWS: number;
22
24
  export declare const DEFAULT_CLOSE_BUTTON: string;
25
+ export declare const MAIN_CONTENT_ID: string;
23
26
  export declare const DENSITY_CONST: string;
24
27
  export declare const COLOR_CONST: string;
25
28
  export declare enum DENSITY {
@@ -66,6 +69,7 @@ export declare enum COLOR {
66
69
  export declare const COLORS: COLOR[];
67
70
  export declare const COLORS_SIMPLE: COLOR_SIMPLE[];
68
71
  export declare enum SEMANTIC {
72
+ NEUTRAL = "neutral",
69
73
  CRITICAL = "critical",
70
74
  INFORMATIONAL = "informational",
71
75
  WARNING = "warning",
@@ -104,6 +104,10 @@ export type MarginProps = {
104
104
  */
105
105
  margin?: MarginType;
106
106
  };
107
+ export declare const ShellControlPanelDesktopPosition: readonly ["top", "left"];
108
+ export type ShellControlPanelDesktopPositionType = (typeof ShellControlPanelDesktopPosition)[number];
109
+ export declare const ShellControlPanelMobilePosition: readonly ["top", "bottom"];
110
+ export type ShellControlPanelMobilePositionType = (typeof ShellControlPanelMobilePosition)[number];
107
111
  export declare const PlacementHorizontalList: readonly ["left", "right", "left-start", "left-end", "right-start", "right-end"];
108
112
  export type PlacementHorizontalType = (typeof PlacementHorizontalList)[number];
109
113
  export declare const PlacementVerticalList: readonly ["top", "bottom", "top-start", "top-end", "bottom-start", "bottom-end"];
@@ -186,6 +190,10 @@ export type PopoverProps = {
186
190
  * Use fixed with for default max-width
187
191
  */
188
192
  width?: PopoverWidthType;
193
+ /**
194
+ * If the floating element is inside a fixed container we might need to force absolute position
195
+ */
196
+ forceAbsolute?: boolean | string;
189
197
  };
190
198
  export type NameProps = {
191
199
  /**
@@ -539,11 +547,33 @@ export type NavigationBackButtonProps = {
539
547
  */
540
548
  backButtonText?: string;
541
549
  };
542
- export type AriaControlsProps = {
550
+ export type ControlPanelProps = {
543
551
  /**
544
- * Pass `aria-controls` to inner element
552
+ * Slot to pass in the DBControlPanelBrand component
545
553
  */
546
- controls?: string;
554
+ brand?: any;
555
+ /**
556
+ * Slot to pass in a meta navigation.
557
+ * Desktop: Above the regular control-panel-desktop
558
+ * Mobile: Inside the drawer
559
+ */
560
+ meta?: any;
561
+ /**
562
+ * Slot to pass one or more elements like DBButton (e.g. search) as primary action.
563
+ * Desktop: Shown next to the main-navigation
564
+ * Mobile: Shown next to the control-panel-brand
565
+ */
566
+ primaryActions?: any;
567
+ /**
568
+ * Slot to pass one or more elements like DBButton (e.g. profile, language, etc.) as secondary action.
569
+ * Desktop: Shown separated by divider at the end of the control-panel-desktop
570
+ * Mobile: Shown inside the drawer at the bottom.
571
+ */
572
+ secondaryActions?: any;
573
+ /**
574
+ * Slot to pass an anchor or link to skip the navigation and jump to main content.
575
+ */
576
+ skipNavigation?: any;
547
577
  };
548
578
  export type NoTextProps = {
549
579
  /**
@@ -555,6 +585,67 @@ export type ValueLabelType = {
555
585
  value: string;
556
586
  label?: string;
557
587
  };
588
+ export type OverflowScrollButtonProps = {
589
+ /**
590
+ * Change amount of scroll distance when clicking on an overflow scroll arrow button.
591
+ */
592
+ arrowScrollDistance?: number | string;
593
+ /**
594
+ * Set the text for the scroll left button
595
+ */
596
+ scrollLeftText?: string;
597
+ /**
598
+ * Set the text for the scroll right button
599
+ */
600
+ scrollRightText?: string;
601
+ };
602
+ export type OverflowScrollButtonState = {
603
+ scroll: (left?: boolean) => void;
604
+ showScrollLeft?: boolean;
605
+ showScrollRight?: boolean;
606
+ evaluateScrollButtons: (tabList: Element) => void;
607
+ };
608
+ export type SidebarProps = {
609
+ /**
610
+ * Set the expanded/collapsed state initially for the left sidebar
611
+ */
612
+ expanded?: boolean | string;
613
+ /**
614
+ * Set the tooltip for the expand/collapse button
615
+ */
616
+ expandButtonTooltip?: string;
617
+ /**
618
+ * Set the tooltip for the expand/collapse button based on the state. (only react|vue)
619
+ */
620
+ expandButtonTooltipFn?: (open: boolean) => string;
621
+ /**
622
+ * Set the tooltip for the expand/collapse button based on the state. (only react|vue)
623
+ */
624
+ onExpandButtonTooltipFn?: (open: boolean) => string;
625
+ };
626
+ export type SidebarState = {
627
+ _open: boolean;
628
+ getToggleButtonText: () => string;
629
+ };
630
+ export declare const NavigationItemGroupVariantList: readonly ["popover", "tree", "drilldown"];
631
+ export type NavigationItemGroupVariantType = (typeof NavigationItemGroupVariantList)[number];
632
+ export type NavigationItemGroupVariant = {
633
+ /**
634
+ * Selects the navigation interaction model: `popover` shows sub-items
635
+ * in a flyout menu, `tree` shows a collapsible tree structure.
636
+ * Note: This selects an interaction model, not just a visual variant.
637
+ */
638
+ variant?: NavigationItemGroupVariantType;
639
+ };
640
+ export declare const CollapsibleBehaviorList: readonly ["single", "multiple"];
641
+ export type CollapsibleBehaviorType = (typeof CollapsibleBehaviorList)[number];
642
+ export type CollapsibleBehaviorProps = {
643
+ /**
644
+ * To allow multiple items open at the same time or only 1 item
645
+ * @default 'multiple'
646
+ */
647
+ behavior?: CollapsibleBehaviorType;
648
+ };
558
649
  export type DocumentScrollState = {
559
650
  _documentScrollListenerCallbackId?: string;
560
651
  handleDocumentScroll: (event: any, parent?: HTMLElement) => void;
@@ -564,8 +655,8 @@ export type DocumentScrollState = {
564
655
  export type PopoverState = {
565
656
  handleEscape: (event: any) => void;
566
657
  handleAutoPlacement: (parent?: HTMLElement) => void;
567
- handleEnter: (parent?: HTMLElement) => void;
568
- handleLeave: (event?: any) => void;
658
+ handleEnter: (parent?: HTMLElement, manualOpen?: boolean) => void;
659
+ handleLeave: (event?: any, manualOpen?: boolean) => void;
569
660
  } & DocumentScrollState;
570
661
  export interface PatternhubProps {
571
662
  /**
@@ -26,7 +26,12 @@ export declare const getFloatingProps: (element: HTMLElement, parent: HTMLElemen
26
26
  innerHeight: number;
27
27
  outsideYBoth: boolean;
28
28
  };
29
- export declare const handleFixedPopover: (element: HTMLElement, parent: HTMLElement, placement?: string) => void;
29
+ export declare const handleFixedPopover: ({ element, parent, placement, forceAbsolute }: {
30
+ element: HTMLElement;
31
+ parent: HTMLElement;
32
+ placement?: string;
33
+ forceAbsolute?: boolean;
34
+ }) => void;
30
35
  /**
31
36
  * Detects whether a floating element overflows the viewport edges
32
37
  * and sets `data-outside-vy` / `data-outside-vx` attributes accordingly.
@@ -40,4 +45,4 @@ export interface DBDataOutsidePair {
40
45
  vx?: 'left' | 'right';
41
46
  vy?: 'top' | 'bottom';
42
47
  }
43
- export declare const handleDataOutside: (el: HTMLElement) => DBDataOutsidePair;
48
+ export declare const handleDataOutside: (el: HTMLElement) => void;
@@ -21,6 +21,16 @@ export declare const hasVoiceOver: () => boolean;
21
21
  */
22
22
  export declare const isIOSSafari: () => boolean;
23
23
  export declare const delay: (fn: () => void, ms: number) => Promise<unknown>;
24
+ /**
25
+ * Checks whether a CSS custom property on an element equals '1'.
26
+ * Useful for detecting CSS-driven boolean state (e.g. responsive breakpoints)
27
+ * without coupling JS to hardcoded breakpoint values.
28
+ *
29
+ * @param element - The element to read computed styles from
30
+ * @param property - The CSS custom property name (e.g. '--db-my-flag')
31
+ * @returns `true` if the trimmed property value is '1'
32
+ */
33
+ export declare const hasCssFlag: (element: Element, property: string) => boolean;
24
34
  /**
25
35
  * Converts boolean-like inputs to "true" or "false" strings.
26
36
  * Handles HTML-style boolean attributes where an empty string or the
@@ -1,10 +1,25 @@
1
+ /**
2
+ * Adjusts a sub-navigation's position so it stays within the viewport.
3
+ * Called from _handleMouseEnter for the specific hovered item's menu.
4
+ * Computes a precise pixel-based transform instead of the CSS's fixed
5
+ * `translateY(-200%)` which overshoots for most menu heights.
6
+ *
7
+ * Only applies to menus NOT already positioned by handleFixedPopover
8
+ * (i.e., nested sub-navigations that use position: absolute).
9
+ */
10
+ export declare const adjustNestedSubNavigationPosition: (element: HTMLElement) => void;
1
11
  export type TriangleData = {
2
12
  itemRect: DOMRect;
3
13
  parentElementWidth: number;
4
14
  subNavigationHeight: number;
5
15
  padding: number;
6
- outsideVX: 'left' | 'right' | undefined;
7
- outsideVY: 'top' | 'bottom' | undefined;
16
+ /**
17
+ * The direction the sub-navigation opens relative to the element.
18
+ * 'right' = sub-menu is to the right of the item
19
+ * 'left' = sub-menu is to the left of the item
20
+ * 'bottom' = sub-menu is below the item
21
+ */
22
+ openDirection: 'left' | 'right' | 'bottom';
8
23
  };
9
24
  export declare const isEventTargetNavigationItem: (event: unknown) => boolean;
10
25
  export declare class NavigationItemSafeTriangle {
@@ -19,14 +34,15 @@ export declare class NavigationItemSafeTriangle {
19
34
  private init;
20
35
  enableFollow(): void;
21
36
  disableFollow(): void;
22
- private getTriangleTipX;
23
- private getTriangleTipY;
24
37
  private hasMouseEnteredSubNavigation;
25
- private getTriangleCoordinates;
26
- followByMouseEvent(event: MouseEvent): void;
38
+ followByMouseEvent(event: {
39
+ clientX: number;
40
+ clientY: number;
41
+ }): void;
27
42
  }
28
- declare const _default: {
29
- isEventTargetNavigationItem: (event: unknown) => boolean;
30
- NavigationItemSafeTriangle: typeof NavigationItemSafeTriangle;
31
- };
32
- export default _default;
43
+ export declare const handleSubNavigationPosition: ({ element, level, isPopover, vertical }: {
44
+ element: HTMLElement;
45
+ level?: number;
46
+ vertical?: boolean;
47
+ isPopover?: boolean;
48
+ }) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@db-ux/v-core-components",
3
- "version": "5.1.4",
3
+ "version": "5.1.6-shell-11663a0",
4
4
  "type": "module",
5
5
  "description": "Vue components for @db-ux/core-components",
6
6
  "repository": {
@@ -28,21 +28,21 @@
28
28
  "dist/"
29
29
  ],
30
30
  "dependencies": {
31
- "@db-ux/core-components": "5.1.4",
32
- "@db-ux/core-foundations": "5.1.4"
31
+ "@db-ux/core-components": "5.1.6-shell-11663a0",
32
+ "@db-ux/core-foundations": "5.1.6-shell-11663a0"
33
33
  },
34
34
  "devDependencies": {
35
- "@playwright/experimental-ct-vue": "1.60.0",
35
+ "@playwright/experimental-ct-vue": "1.62.1",
36
36
  "@vitejs/plugin-vue": "6.0.8",
37
37
  "@vue/compiler-dom": "3.5.41",
38
38
  "cpr": "3.0.1",
39
39
  "npm-run-all2": "9.0.3",
40
40
  "replace-in-file": "9.0.0",
41
- "tsx": "4.23.11",
41
+ "tsx": "4.23.12",
42
42
  "typescript": "5.9.3",
43
- "vite": "8.2.1",
43
+ "vite": "8.2.2",
44
44
  "vue": "3.5.41",
45
- "vue-tsc": "3.3.9"
45
+ "vue-tsc": "3.3.11"
46
46
  },
47
47
  "publishConfig": {
48
48
  "registry": "https://registry.npmjs.org/",