dap-design-system 0.53.17 → 0.53.18
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/dist/common/types.d.ts +1 -0
- package/dist/components/navigation-menu/navigation-menu-item.component.d.ts +5 -1
- package/dist/components/navigation-menu/navigation-menu.component.d.ts +25 -3
- package/dist/{components-Cb6W_dAR.js → components-D57_dyty.js} +531 -479
- package/dist/{components-Cb6W_dAR.js.map → components-D57_dyty.js.map} +1 -1
- package/dist/components.js +1 -1
- package/dist/dds.js +1 -1
- package/dist/manifest/types/vue/index.d.ts +195 -191
- package/dist/manifest/vscode.html-custom-data.json +149 -139
- package/dist/manifest/web-types.json +399 -379
- package/dist/react/dap-ds-navigation-menu/index.d.ts +1 -0
- package/dist/react/dap-ds-navigation-menu-item/index.d.ts +1 -0
- package/dist/react/index.d.ts +6 -6
- package/dist/react-types.ts +6 -6
- package/dist/react.js +83 -83
- package/dist/react.js.map +1 -1
- package/package.json +1 -1
package/dist/common/types.d.ts
CHANGED
|
@@ -89,3 +89,4 @@ export interface TimePreset {
|
|
|
89
89
|
}
|
|
90
90
|
export type CloseSource = 'cancel-button' | 'close-button' | 'esc' | 'ok-button' | 'overlay';
|
|
91
91
|
export type AccordionVariant = 'default' | 'collapsed' | 'clean' | 'clean-collapsed';
|
|
92
|
+
export type TabNavigationMode = 'group' | 'items';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FloatingStrategy, LinkTarget, PopupPlacement } from '../../common/types';
|
|
1
|
+
import { FloatingStrategy, LinkTarget, PopupPlacement, TabNavigationMode } from '../../common/types';
|
|
2
2
|
import { DdsElement } from '../../internal/dds-hu-element';
|
|
3
3
|
import { SubmenuController } from './submenu-controller';
|
|
4
4
|
declare const DapDSNavigationMenuItem_base: typeof DdsElement & {
|
|
@@ -38,6 +38,7 @@ declare const DapDSNavigationMenuItem_base: typeof DdsElement & {
|
|
|
38
38
|
* @property {string} rel - The rel attribute for link security and behavior.
|
|
39
39
|
* @property {number} level - The nesting level of this navigation item (0 = top-level, automatically set for nested items). Default is 0.
|
|
40
40
|
* @property {'horizontal' | 'vertical'} orientation - The orientation of the parent navigation menu (automatically inherited). Default is 'horizontal'.
|
|
41
|
+
* @property {'group' | 'items'} tabMode - Controls how Tab key navigates through top-level items. Default is 'group'.
|
|
41
42
|
*
|
|
42
43
|
* @event {{ href: string, event: Event }} dds-navigation-item-click - Fired when a navigation item is clicked.
|
|
43
44
|
* @event {{ item: DapDSNavigationMenuItem }} dds-navigation-dropdown-open - Fired when a navigation dropdown is opened.
|
|
@@ -130,9 +131,12 @@ export default class DapDSNavigationMenuItem extends DapDSNavigationMenuItem_bas
|
|
|
130
131
|
level: number;
|
|
131
132
|
/** The orientation of the parent navigation menu. */
|
|
132
133
|
orientation: 'horizontal' | 'vertical';
|
|
134
|
+
/** Controls tab key behavior (propagated from parent navigation menu). */
|
|
135
|
+
tabMode: TabNavigationMode;
|
|
133
136
|
hasContent: boolean;
|
|
134
137
|
private hasLink;
|
|
135
138
|
private hasTitleSlot;
|
|
139
|
+
private _titleText;
|
|
136
140
|
private active;
|
|
137
141
|
private openedByHover;
|
|
138
142
|
private _isRovingActive;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TabNavigationMode } from '../../common/types';
|
|
1
2
|
import { DdsElement } from '../../internal/dds-hu-element';
|
|
2
3
|
import { default as DapDSNavigationMenuItem } from './navigation-menu-item.component';
|
|
3
4
|
/**
|
|
@@ -13,6 +14,7 @@ import { default as DapDSNavigationMenuItem } from './navigation-menu-item.compo
|
|
|
13
14
|
* @property {'horizontal' | 'vertical'} orientation - The orientation of the navigation menu. Default is 'horizontal'.
|
|
14
15
|
* @property {boolean} fullWidth - Whether the navigation menu should take full width of the screen. Default is false.
|
|
15
16
|
* @property {boolean} allowMultipleOpen - Whether multiple dropdown branches can stay open simultaneously (accordion mode). Default is true.
|
|
17
|
+
* @property {'group' | 'items'} tabMode - Controls how Tab key navigates through top-level items. Default is 'group'. Group mode will have the first item in the tab order, and items mode will have all items in the tab order.
|
|
16
18
|
*
|
|
17
19
|
* @event {{ href: string, event: Event }} dds-navigation-item-click - Fired when a navigation item is clicked.
|
|
18
20
|
*
|
|
@@ -42,6 +44,13 @@ export default class DapDSNavigationMenu extends DdsElement {
|
|
|
42
44
|
fullWidth: boolean;
|
|
43
45
|
/** Whether multiple dropdown branches can stay open simultaneously (accordion mode). */
|
|
44
46
|
allowMultipleOpen: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Controls how Tab key navigates through top-level items.
|
|
49
|
+
* - 'group' (default): Roving tab index — only one item in the tab order, arrow keys move between items.
|
|
50
|
+
* - 'items': All top-level items have tabindex="0" — Tab moves through each item individually.
|
|
51
|
+
* @type {'group' | 'items'}
|
|
52
|
+
*/
|
|
53
|
+
tabMode: TabNavigationMode;
|
|
45
54
|
connectedCallback(): void;
|
|
46
55
|
updated(changedProperties: Map<string, unknown>): void;
|
|
47
56
|
firstUpdated(changedProperties: Map<string, unknown>): Promise<void>;
|
|
@@ -58,9 +67,9 @@ export default class DapDSNavigationMenu extends DdsElement {
|
|
|
58
67
|
*/
|
|
59
68
|
getCurrentItem(): DapDSNavigationMenuItem | undefined;
|
|
60
69
|
/**
|
|
61
|
-
* Sets the current menu item.
|
|
62
|
-
*
|
|
63
|
-
*
|
|
70
|
+
* Sets the current menu item. In 'group' mode (default), applies roving tabindex so only the
|
|
71
|
+
* active item's trigger is in the sequential tab order (tabindex="0"). In 'items' mode, all
|
|
72
|
+
* top-level items remain in the tab order — only the data-nav-current marker is updated.
|
|
64
73
|
*/
|
|
65
74
|
setCurrentItem(item: DapDSNavigationMenuItem): void;
|
|
66
75
|
private _updateChildFullWidth;
|
|
@@ -68,10 +77,23 @@ export default class DapDSNavigationMenu extends DdsElement {
|
|
|
68
77
|
private _updateActiveHref;
|
|
69
78
|
/** Recursively update orientation property for all navigation items. */
|
|
70
79
|
private _updateOrientation;
|
|
80
|
+
/** Update tabMode property for all top-level navigation items. */
|
|
81
|
+
private _updateTabMode;
|
|
82
|
+
/**
|
|
83
|
+
* Applies tab behavior based on the current tabMode:
|
|
84
|
+
* - 'items': All top-level item triggers get tabindex="0".
|
|
85
|
+
* - 'group': Restore roving tabindex — only the current/first item gets tabindex="0".
|
|
86
|
+
*/
|
|
87
|
+
private _applyTabMode;
|
|
71
88
|
/** Helper method to recursively update properties on nested items. */
|
|
72
89
|
private _updatePropertyRecursive;
|
|
73
90
|
private _handleNavigationItemClick;
|
|
74
91
|
private _handleDropdownOpen;
|
|
75
92
|
private _handleSlotChange;
|
|
93
|
+
/**
|
|
94
|
+
* In `tabMode="items"`, keep `data-nav-current` in sync with the element that
|
|
95
|
+
* received focus so that arrow-key navigation always targets the right item.
|
|
96
|
+
*/
|
|
97
|
+
private _handleFocusIn;
|
|
76
98
|
render(): import('lit-html').TemplateResult;
|
|
77
99
|
}
|