@eui/eds-wc 22.0.0-alpha.39 → 22.0.0-alpha.40

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eui/eds-wc",
3
- "version": "22.0.0-alpha.39",
3
+ "version": "22.0.0-alpha.40",
4
4
  "description": "EDS Web Components — Lit-based web component wrappers of @eui/eds design system components",
5
5
  "homepage": "https://eui.ecdevops.eu",
6
6
  "author": "ec.europa.eui@gmail.com",
@@ -142,6 +142,10 @@
142
142
  "types": "./eds-date-block/index.d.ts",
143
143
  "default": "./eds-date-block/index.js"
144
144
  },
145
+ "./eds-content-item": {
146
+ "types": "./eds-content-item/index.d.ts",
147
+ "default": "./eds-content-item/index.js"
148
+ },
145
149
  "./eds-breadcrumb": {
146
150
  "types": "./eds-breadcrumb/index.d.ts",
147
151
  "default": "./eds-breadcrumb/index.js"
@@ -310,10 +314,6 @@
310
314
  "types": "./eds-language-selector/index.d.ts",
311
315
  "default": "./eds-language-selector/index.js"
312
316
  },
313
- "./eds-menu": {
314
- "types": "./eds-menu/index.d.ts",
315
- "default": "./eds-menu/index.js"
316
- },
317
317
  "./eds-overlay": {
318
318
  "types": "./eds-overlay/index.d.ts",
319
319
  "default": "./eds-overlay/index.js"
@@ -1,178 +0,0 @@
1
- import { type PropertyValues } from 'lit';
2
- import { EdsBaseElement } from '../shared/eds-base.js';
3
- /**
4
- * Represents a single menu item in the EDS navigation menu.
5
- * Supports hierarchical navigation, external links, icons, badges, markers, and action icons.
6
- * Copied verbatim from the Angular `EdsMenuItem` model.
7
- */
8
- export interface EdsWcMenuItem<METADATA = unknown> {
9
- /** Unique identifier for the menu item. Auto-generated if not provided. */
10
- id?: string;
11
- /** Data-e2e attribute for testing selectors. */
12
- e2eAttr?: string;
13
- /** Display label for the menu item. */
14
- label?: string;
15
- /** Computed initials from label (used in collapsed-initials mode). Managed internally. */
16
- initials?: string;
17
- /** Internal route URL for router navigation. */
18
- url?: string;
19
- /** Router query params for navigation. */
20
- queryParams?: Record<string, string>;
21
- /** External URL that opens in a new window/tab. */
22
- urlExternal?: string;
23
- /** Target for external URL navigation. Defaults to '_blank'. */
24
- urlExternalTarget?: string;
25
- /** When true, the item uses link mode (active state managed manually). */
26
- link?: boolean;
27
- /** Icon name (EDS icon identifier, e.g. 'home', 'settings'). */
28
- icon?: string;
29
- /** Color variant class for the icon. */
30
- iconTypeClass?: string;
31
- /** ARIA label for the icon (used in collapsed mode). */
32
- iconLabel?: string;
33
- /** Whether this item is currently expanded (for parent items with children). */
34
- expanded?: boolean;
35
- /** Whether this item is currently active/selected. */
36
- active?: boolean;
37
- /** Child menu items for hierarchical navigation. */
38
- children?: EdsWcMenuItem[];
39
- /** Reference to parent item. Managed internally. */
40
- parent?: EdsWcMenuItem;
41
- /** Whether the item is visible. Items with visible=false are hidden but remain in the data. */
42
- visible?: boolean;
43
- /** Badge label text displayed on the item. */
44
- tagLabel?: string;
45
- /** Badge color variant. */
46
- tagTypeClass?: string;
47
- /** Custom tooltip text. If not provided, tooltip is derived from label. */
48
- tooltip?: string;
49
- /** Whether to show a colored marker dot instead of an icon. */
50
- hasMarker?: boolean;
51
- /** Color variant for the marker dot. */
52
- markerTypeClass?: string;
53
- /** Grouping category for the menu item. */
54
- category?: string;
55
- /** Whether the item is disabled. */
56
- disabled?: boolean;
57
- /** Whether the item matches the current filter. Managed internally. */
58
- filtered?: boolean;
59
- /** Action icon configuration for an additional action button on the item. */
60
- actionIcon?: {
61
- icon: string;
62
- color?: string;
63
- label?: string;
64
- action?: (event: unknown) => void;
65
- };
66
- /** Callback function executed on item click (instead of navigation). */
67
- command?: (...params: unknown[]) => void;
68
- /** Generic typed metadata for custom data. */
69
- metadata?: METADATA;
70
- }
71
- /**
72
- * `<eds-wc-menu>` — EDS navigation Menu Web Component.
73
- *
74
- * A data-driven hierarchical navigation menu with expand/collapse, optional icons,
75
- * markers, badges, action icons, an optional search filter, collapsed (icon-only) mode
76
- * and full WAI-ARIA `tree`/`treeitem` keyboard navigation (roving tabindex, Arrow keys,
77
- * Home, End, Enter, Space).
78
- *
79
- * Projected from the Angular `eds-menu` + `eds-menu-item` components. The `eds-menu-item`
80
- * Angular sub-component is not a separately-consumable element here — its structure is
81
- * rendered internally by this element so every ARIA relationship stays in one shadow root
82
- * (Rule A1).
83
- *
84
- * @example
85
- * ```html
86
- * <eds-wc-menu has-icons></eds-wc-menu>
87
- * <script>
88
- * document.querySelector('eds-wc-menu').items = [
89
- * { label: 'Home', url: '/home', icon: 'house' },
90
- * { label: 'Reports', icon: 'chart-bar', children: [
91
- * { label: 'Monthly', url: '/reports/monthly' },
92
- * ]},
93
- * ];
94
- * </script>
95
- * ```
96
- *
97
- * @fires is-click - `detail: { value: boolean }` — emitted (true) when any menu item is clicked.
98
- * @fires item-click - `detail: { item: EdsWcMenuItem }` — the clicked menu item.
99
- * @fires expand-toggle - `detail: { item: EdsWcMenuItem }` — a menu item's expand state was toggled.
100
- * @fires filter-change - `detail: { value: string }` — the search filter value changed.
101
- */
102
- export declare class EdsWcMenu extends EdsBaseElement {
103
- /** Hierarchical array of menu items to display. */
104
- items: EdsWcMenuItem[];
105
- /** Label for the search filter input. */
106
- searchFilterLabel: string;
107
- /** URL fragment identifier for internal navigation. */
108
- fragmentId?: string;
109
- /** Current filter value for programmatic filtering. */
110
- filterValue: string;
111
- /** Collapses the menu to icon-only state. */
112
- isCollapsed: boolean;
113
- /** Shows initials when collapsed (instead of icons). */
114
- hasCollapsedInitials: boolean;
115
- /** Enables the search filter input. */
116
- hasFilter: boolean;
117
- /** Shows icons for menu items. */
118
- hasIcons: boolean;
119
- /** Shows labels underneath icons in collapsed mode. */
120
- hasIconsLabels: boolean;
121
- /** Alias for hasIconsLabels — shows labels underneath icons in collapsed mode. */
122
- hasCollapsedLabels: boolean;
123
- /** Enables tooltips on menu items (shown in collapsed mode). */
124
- hasTooltip: boolean;
125
- /** Shows tooltips even when menu is expanded. */
126
- hasTooltipOnExpanded: boolean;
127
- /** Only shows tooltip from the tooltip property (not auto-generated from label) when expanded. */
128
- hasTooltipOnlyOnExpanded: boolean;
129
- /** Expands all items that do not have an explicit expanded property. */
130
- expandAllItems: boolean;
131
- /** Applies flat styling without hierarchical indentation. */
132
- isFlat: boolean;
133
- /** Automatically scrolls to the active menu item on route changes. */
134
- hasScrollToItem: boolean;
135
- /** Applies bold font weight to root-level menu items. */
136
- hasBoldRootLevel: boolean;
137
- /** Internal configured items with parent refs, visibility, and filtering applied. */
138
- private _internalItems;
139
- /** Whether expand icons should be shown (hidden during filter). */
140
- private _hasExpandIcon;
141
- /** id of the item currently holding the roving tabindex focus. */
142
- private _activeId;
143
- private _filterInput?;
144
- static styles: import("lit").CSSResult;
145
- protected willUpdate(changed: PropertyValues): void;
146
- protected updated(): void;
147
- protected render(): import("lit-html").TemplateResult<1>;
148
- private _renderItem;
149
- private _renderIconBlock;
150
- private _icon;
151
- private _badgeColorClass;
152
- private _isLabelItem;
153
- private _tooltipText;
154
- private _shouldRenderChild;
155
- private _onItemActivate;
156
- private _activate;
157
- private _onExpandClick;
158
- private _toggleExpand;
159
- private _onActionIconClick;
160
- private _onFilterClick;
161
- private _onFilter;
162
- private _applyFilter;
163
- private _isFilterActive;
164
- private _filterMenuItems;
165
- private _onKeydown;
166
- /** Move focus with wrap-around (matches Angular FocusKeyManager.withWrap()). */
167
- private _moveFocus;
168
- private _focusItem;
169
- /** Flattened list of currently-rendered (visible + expanded) items, in DOM order. */
170
- private _flatVisible;
171
- private _configureItems;
172
- }
173
- declare global {
174
- interface HTMLElementTagNameMap {
175
- 'eds-wc-menu': EdsWcMenu;
176
- }
177
- }
178
- //# sourceMappingURL=eds-wc-menu.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"eds-wc-menu.d.ts","sourceRoot":"","sources":["../../src/eds-menu/eds-wc-menu.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,cAAc,EAAE,M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