wj-elements 0.4.8 → 0.5.1
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/light.css +8 -0
- package/dist/packages/wje-breadcrumb/breadcrumb.element.d.ts +91 -0
- package/dist/packages/wje-breadcrumbs/breadcrumbs.element.d.ts +160 -0
- package/dist/packages/wje-img/img.element.d.ts +11 -0
- package/dist/packages/wje-select/select.element.d.ts +5 -0
- package/dist/packages/wje-toolbar/toolbar.element.d.ts +2 -0
- package/dist/wje-breadcrumb.js +243 -22
- package/dist/wje-breadcrumb.js.map +1 -1
- package/dist/wje-breadcrumbs.js +404 -2
- package/dist/wje-breadcrumbs.js.map +1 -1
- package/dist/wje-img.js +24 -2
- package/dist/wje-img.js.map +1 -1
- package/dist/wje-input.js +1 -1
- package/dist/wje-menu-item.js +1 -1
- package/dist/wje-option.js +20 -6
- package/dist/wje-option.js.map +1 -1
- package/dist/wje-select.js +18 -3
- package/dist/wje-select.js.map +1 -1
- package/dist/wje-toolbar.js +1 -1
- package/dist/wje-toolbar.js.map +1 -1
- package/package.json +2 -2
package/dist/light.css
CHANGED
|
@@ -270,6 +270,12 @@
|
|
|
270
270
|
--wje-breadcrumb-font-size: var(--wje-font-size);
|
|
271
271
|
--wje-breadcrumb-active-font-weight: var(--wje-font-weight-bold);
|
|
272
272
|
--wje-breadcrumb-active-font-size: var(--wje-font-size);
|
|
273
|
+
--wje-breadcrumb-line-height: var(--wje-line-height-normal);
|
|
274
|
+
--wje-breadcrumb-native-line-height: var(--wje-breadcrumb-line-height);
|
|
275
|
+
--wje-breadcrumb-native-margin: 0;
|
|
276
|
+
--wje-breadcrumb-native-padding: var(--wje-spacing-3x-small) var(--wje-spacing-small);
|
|
277
|
+
--wje-breadcrumb-margin: var(--wje-breadcrumb-native-margin);
|
|
278
|
+
--wje-breadcrumb-padding: var(--wje-breadcrumb-native-padding);
|
|
273
279
|
--wje-breadcrumb-a: var(--wje-color-contrast-8);
|
|
274
280
|
--wje-breadcrumb-a-hover: var(--wje-color-contrast-6);
|
|
275
281
|
|
|
@@ -671,6 +677,8 @@
|
|
|
671
677
|
--wje-toolbar-min-height: 70px;
|
|
672
678
|
--wje-toolbar-padding-inline: 1.5rem;
|
|
673
679
|
--wje-toolbar-padding-block: 1rem;
|
|
680
|
+
--wje-toolbar-margin-inline: 0;
|
|
681
|
+
--wje-toolbar-margin-block: 0;
|
|
674
682
|
--wje-toolbar-border-color: var(--wje-border-color);
|
|
675
683
|
--wje-toolbar-top: 0;
|
|
676
684
|
--wje-toolbar-shadow: var(--wje-shadow-medium);
|
|
@@ -12,6 +12,12 @@ import { default as WJElement } from '../wje-element/element.js';
|
|
|
12
12
|
* @csspart separator - The separator between breadcrumb items.
|
|
13
13
|
* @cssproperty [--wje-breadcrumb-a=var(--wje-color-contrast-8)] - The color of the breadcrumb text.
|
|
14
14
|
* @cssproperty [--wje-breadcrumb-a-hover=var(--wje-color-contrast-6)] - The color of the breadcrumb separator line.
|
|
15
|
+
* @cssproperty [--wje-breadcrumb-line-height=1.5] - Controls the vertical rhythm of breadcrumb text.
|
|
16
|
+
* @cssproperty [--wje-breadcrumb-native-line-height=var(--wje-breadcrumb-line-height)] - Controls the line height of the native breadcrumb wrapper.
|
|
17
|
+
* @cssproperty [--wje-breadcrumb-native-margin=0] - Sets outer spacing around the native breadcrumb wrapper.
|
|
18
|
+
* @cssproperty [--wje-breadcrumb-native-padding=0.25rem 0.75rem] - Sets inner spacing inside the native breadcrumb wrapper.
|
|
19
|
+
* @cssproperty [--wje-breadcrumb-margin=var(--wje-breadcrumb-native-margin)] - Backwards-compatible alias for native breadcrumb margin.
|
|
20
|
+
* @cssproperty [--wje-breadcrumb-padding=var(--wje-breadcrumb-native-padding)] - Backwards-compatible alias for native breadcrumb padding.
|
|
15
21
|
* @tag wje-breadcrumb
|
|
16
22
|
*/
|
|
17
23
|
export default class Breadcrumb extends WJElement {
|
|
@@ -29,6 +35,27 @@ export default class Breadcrumb extends WJElement {
|
|
|
29
35
|
static get observedAttributes(): Array<string>;
|
|
30
36
|
_showSeparator: boolean;
|
|
31
37
|
_showCollapsedIndicator: boolean;
|
|
38
|
+
handleNativeClick: (e: any) => void;
|
|
39
|
+
/**
|
|
40
|
+
* Sets the breadcrumb link URL.
|
|
41
|
+
* @param {string|null} value Link URL.
|
|
42
|
+
*/
|
|
43
|
+
set href(value: string | null);
|
|
44
|
+
/**
|
|
45
|
+
* Gets the breadcrumb link URL.
|
|
46
|
+
* @returns {string|null}
|
|
47
|
+
*/
|
|
48
|
+
get href(): string | null;
|
|
49
|
+
/**
|
|
50
|
+
* Sets the disabled state.
|
|
51
|
+
* @param {boolean} value Disabled state.
|
|
52
|
+
*/
|
|
53
|
+
set disabled(value: boolean);
|
|
54
|
+
/**
|
|
55
|
+
* Gets the disabled state.
|
|
56
|
+
* @returns {boolean}
|
|
57
|
+
*/
|
|
58
|
+
get disabled(): boolean;
|
|
32
59
|
/**
|
|
33
60
|
* Set show separator flag.
|
|
34
61
|
* @param {boolean} value The value to set
|
|
@@ -65,6 +92,35 @@ export default class Breadcrumb extends WJElement {
|
|
|
65
92
|
*/
|
|
66
93
|
draw(): object;
|
|
67
94
|
native: HTMLAnchorElement;
|
|
95
|
+
/**
|
|
96
|
+
* Returns whether the separator should be visible after this breadcrumb.
|
|
97
|
+
* @returns {boolean}
|
|
98
|
+
*/
|
|
99
|
+
shouldRenderSeparator(): boolean;
|
|
100
|
+
/**
|
|
101
|
+
* Returns whether any later breadcrumb is still visible in the rendered trail.
|
|
102
|
+
* @returns {boolean}
|
|
103
|
+
*/
|
|
104
|
+
hasVisibleBreadcrumbAfter(): boolean;
|
|
105
|
+
/**
|
|
106
|
+
* Returns whether a breadcrumb is visible in the rendered trail.
|
|
107
|
+
* @param {Element} breadcrumb Breadcrumb element to inspect.
|
|
108
|
+
* @returns {boolean}
|
|
109
|
+
*/
|
|
110
|
+
isBreadcrumbVisibleInTrail(breadcrumb: Element): boolean;
|
|
111
|
+
/**
|
|
112
|
+
* Synchronizes host attributes to the internal anchor.
|
|
113
|
+
*/
|
|
114
|
+
syncNativeAttributes(): void;
|
|
115
|
+
/**
|
|
116
|
+
* Sets up native anchor listeners after render.
|
|
117
|
+
*/
|
|
118
|
+
afterDraw(): void;
|
|
119
|
+
/**
|
|
120
|
+
* Prevents disabled breadcrumbs from navigating or bubbling click handlers.
|
|
121
|
+
* @param {MouseEvent} e Click event.
|
|
122
|
+
*/
|
|
123
|
+
handleDisabledNativeClick(e: MouseEvent): void;
|
|
68
124
|
/**
|
|
69
125
|
* Renders the collapsed indicator based on the current collapsed variant.
|
|
70
126
|
* If the collapsed variant is 'DROPDOWN', it invokes the collapseDropdown method.
|
|
@@ -81,6 +137,41 @@ export default class Breadcrumb extends WJElement {
|
|
|
81
137
|
* @returns {HTMLElement} A configured dropdown element containing a button as trigger and a menu with breadcrumb items.
|
|
82
138
|
*/
|
|
83
139
|
collapseDropdown(): HTMLElement;
|
|
140
|
+
/**
|
|
141
|
+
* Creates the dropdown trigger for collapsed breadcrumbs.
|
|
142
|
+
* @param {boolean} isBreakpointMenuIndicator Whether this trigger controls the full breakpoint menu.
|
|
143
|
+
* @returns {HTMLElement}
|
|
144
|
+
*/
|
|
145
|
+
createCollapsedDropdownTrigger(isBreakpointMenuIndicator: boolean): HTMLElement;
|
|
146
|
+
/**
|
|
147
|
+
* Resolves the icon used by the default dropdown trigger.
|
|
148
|
+
* @param {boolean} isBreakpointMenuIndicator Whether this trigger controls the full breakpoint menu.
|
|
149
|
+
* @returns {string}
|
|
150
|
+
*/
|
|
151
|
+
getCollapsedDropdownIcon(isBreakpointMenuIndicator: boolean): string;
|
|
152
|
+
/**
|
|
153
|
+
* Copies breadcrumb content into a collapsed menu item.
|
|
154
|
+
* @param {HTMLElement} menuItem Menu item receiving the content.
|
|
155
|
+
* @param {HTMLElement} breadcrumb Source breadcrumb.
|
|
156
|
+
*/
|
|
157
|
+
populateCollapsedMenuItem(menuItem: HTMLElement, breadcrumb: HTMLElement): void;
|
|
158
|
+
/**
|
|
159
|
+
* Resolves a readable label for icon-only collapsed menu items.
|
|
160
|
+
* @param {HTMLElement} breadcrumb Source breadcrumb.
|
|
161
|
+
* @returns {string}
|
|
162
|
+
*/
|
|
163
|
+
getCollapsedMenuItemLabel(breadcrumb: HTMLElement): string;
|
|
164
|
+
/**
|
|
165
|
+
* Turns a URL segment into a readable menu label.
|
|
166
|
+
* @param {string} value URL segment.
|
|
167
|
+
* @returns {string}
|
|
168
|
+
*/
|
|
169
|
+
humanizeCollapsedMenuItemLabel(value: string): string;
|
|
170
|
+
/**
|
|
171
|
+
* Returns whether this collapsed indicator represents the full breakpoint menu.
|
|
172
|
+
* @returns {boolean}
|
|
173
|
+
*/
|
|
174
|
+
isBreakpointMenuIndicator(): boolean;
|
|
84
175
|
/**
|
|
85
176
|
* Creates a button element that expands hidden breadcrumbs when clicked.
|
|
86
177
|
* The button is set with appropriate attributes and event listeners to handle
|
|
@@ -5,10 +5,17 @@ import { default as WJElement } from '../wje-element/element.js';
|
|
|
5
5
|
* @status stable
|
|
6
6
|
* @augments WJElement
|
|
7
7
|
* @slot - The container for breadcrumb elements.
|
|
8
|
+
* @slot breakpoint-collapse-trigger - Custom trigger used when breakpoint-collapse="menu" moves the full trail into a dropdown.
|
|
8
9
|
* @csspart container - The component's container wrapper.
|
|
10
|
+
* @property {Array<{id: string|number, label: string, href?: string, icon?: string, disabled?: boolean, data?: any}>} items - Data-driven breadcrumb items.
|
|
9
11
|
* @attribute {number} max-items - The maximum number of visible breadcrumbs before collapsing.
|
|
10
12
|
* @attribute {number} items-before-collapse - The number of breadcrumbs to show before the collapsed indicator.
|
|
11
13
|
* @attribute {number} items-after-collapse - The number of breadcrumbs to show after the collapsed indicator.
|
|
14
|
+
* @attribute {string} collapsed-variant - The UI used for collapsed breadcrumbs. Use "dropdown" to render a menu.
|
|
15
|
+
* @attribute {string} breakpoint - The viewport breakpoint where collapsing starts.
|
|
16
|
+
* @attribute {string} breakpoint-collapse - The collapse behavior used below the breakpoint. Use "menu" to put the whole trail into one menu.
|
|
17
|
+
* @attribute {string} breakpoint-collapse-icon - Icon used by the default breakpoint menu trigger.
|
|
18
|
+
* // @fires wje-breadcrumbs:item-click - Dispatched when a data-driven breadcrumb item is clicked.
|
|
12
19
|
* @tag wje-breadcrumbs
|
|
13
20
|
* @example
|
|
14
21
|
* <!-- Example usage -->
|
|
@@ -49,6 +56,20 @@ export default class Breadcrumbs extends WJElement {
|
|
|
49
56
|
*/
|
|
50
57
|
last: boolean;
|
|
51
58
|
_isCollapsedByBreakpoint: boolean;
|
|
59
|
+
_items: any[];
|
|
60
|
+
_itemRecords: any[];
|
|
61
|
+
_hasItemsValue: boolean;
|
|
62
|
+
handleManagedItemClick: (e: any) => void;
|
|
63
|
+
/**
|
|
64
|
+
* Sets data-driven breadcrumb items.
|
|
65
|
+
* @param {Array|string|null|undefined} value Breadcrumb items or a JSON string.
|
|
66
|
+
*/
|
|
67
|
+
set items(value: any[] | string | null | undefined);
|
|
68
|
+
/**
|
|
69
|
+
* Gets data-driven breadcrumb items.
|
|
70
|
+
* @returns {Array}
|
|
71
|
+
*/
|
|
72
|
+
get items(): any[];
|
|
52
73
|
/**
|
|
53
74
|
* Set variant attribute for the Breadcrumbs element.
|
|
54
75
|
* @param value
|
|
@@ -59,6 +80,11 @@ export default class Breadcrumbs extends WJElement {
|
|
|
59
80
|
* @returns {string}
|
|
60
81
|
*/
|
|
61
82
|
get variant(): string;
|
|
83
|
+
/**
|
|
84
|
+
* Get the collapsed indicator variant.
|
|
85
|
+
* @param {string} value Collapsed indicator variant.
|
|
86
|
+
*/
|
|
87
|
+
set collapsedVariant(value: string);
|
|
62
88
|
/**
|
|
63
89
|
* Get the collapsed indicator variant.
|
|
64
90
|
* @returns {string}
|
|
@@ -74,6 +100,26 @@ export default class Breadcrumbs extends WJElement {
|
|
|
74
100
|
* @returns {string}
|
|
75
101
|
*/
|
|
76
102
|
get breakpoint(): string;
|
|
103
|
+
/**
|
|
104
|
+
* Sets the collapse behavior used below the configured breakpoint.
|
|
105
|
+
* @param {string} value Collapse behavior.
|
|
106
|
+
*/
|
|
107
|
+
set breakpointCollapse(value: string);
|
|
108
|
+
/**
|
|
109
|
+
* Gets the collapse behavior used below the configured breakpoint.
|
|
110
|
+
* @returns {string}
|
|
111
|
+
*/
|
|
112
|
+
get breakpointCollapse(): string;
|
|
113
|
+
/**
|
|
114
|
+
* Sets the icon used by the default breakpoint menu trigger.
|
|
115
|
+
* @param {string} value Icon name.
|
|
116
|
+
*/
|
|
117
|
+
set breakpointCollapseIcon(value: string);
|
|
118
|
+
/**
|
|
119
|
+
* Gets the icon used by the default breakpoint menu trigger.
|
|
120
|
+
* @returns {string}
|
|
121
|
+
*/
|
|
122
|
+
get breakpointCollapseIcon(): string;
|
|
77
123
|
/**
|
|
78
124
|
* Get items before collapse attribute.
|
|
79
125
|
* @param {string} value
|
|
@@ -104,6 +150,13 @@ export default class Breadcrumbs extends WJElement {
|
|
|
104
150
|
* @returns {number}
|
|
105
151
|
*/
|
|
106
152
|
get itemsAfterCollapse(): number;
|
|
153
|
+
/**
|
|
154
|
+
* Handles attribute changes that affect light-DOM breadcrumb indicators.
|
|
155
|
+
* @param {string} name Updated attribute.
|
|
156
|
+
* @param {string|null} oldValue Previous value.
|
|
157
|
+
* @param {string|null} newValue Next value.
|
|
158
|
+
*/
|
|
159
|
+
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
107
160
|
/**
|
|
108
161
|
* Draw method for the Breadcrumbs element.
|
|
109
162
|
* @returns {object} fragment - The document fragment
|
|
@@ -119,6 +172,89 @@ export default class Breadcrumbs extends WJElement {
|
|
|
119
172
|
afterDraw(): void;
|
|
120
173
|
onSlotChange: () => void;
|
|
121
174
|
handleResize: () => void;
|
|
175
|
+
/**
|
|
176
|
+
* Upgrades properties set before the custom element definition was loaded.
|
|
177
|
+
* @param {string} property Property name.
|
|
178
|
+
*/
|
|
179
|
+
upgradeProperty(property: string): void;
|
|
180
|
+
/**
|
|
181
|
+
* Normalizes incoming item data for keyed DOM diffing.
|
|
182
|
+
* @param {Array|string|null|undefined} value Breadcrumb item data.
|
|
183
|
+
* @returns {Array<object>}
|
|
184
|
+
*/
|
|
185
|
+
normalizeItems(value: any[] | string | null | undefined): Array<object>;
|
|
186
|
+
/**
|
|
187
|
+
* Normalizes a single item while preserving the original object for events.
|
|
188
|
+
* @param {object|string|number} item Source value for a breadcrumb entry.
|
|
189
|
+
* @param {number} index Position of the value in the current items array.
|
|
190
|
+
* @param {Set<string>} usedKeys Keys that have already been assigned during this update.
|
|
191
|
+
* @returns {object}
|
|
192
|
+
*/
|
|
193
|
+
normalizeItem(item: object | string | number, index: number, usedKeys: Set<string>): object;
|
|
194
|
+
/**
|
|
195
|
+
* Resolves a stable key for an item.
|
|
196
|
+
* @param {object} item Normalized source object used to resolve the key.
|
|
197
|
+
* @param {number} index Fallback position used when the item has no id.
|
|
198
|
+
* @param {Set<string>} usedKeys Keys that have already been assigned during this update.
|
|
199
|
+
* @returns {string}
|
|
200
|
+
*/
|
|
201
|
+
getItemKey(item: object, index: number, usedKeys: Set<string>): string;
|
|
202
|
+
/**
|
|
203
|
+
* Incrementally synchronizes data-driven items into light DOM breadcrumbs.
|
|
204
|
+
* @param {Array<object>} records Normalized records for the next breadcrumb trail.
|
|
205
|
+
*/
|
|
206
|
+
syncItems(records: Array<object>): void;
|
|
207
|
+
/**
|
|
208
|
+
* Creates a managed breadcrumb element.
|
|
209
|
+
* @param {object} record Normalized data used to create the breadcrumb.
|
|
210
|
+
* @param {number} index Position assigned to the created breadcrumb.
|
|
211
|
+
* @returns {HTMLElement}
|
|
212
|
+
*/
|
|
213
|
+
createItemElement(record: object, index: number): HTMLElement;
|
|
214
|
+
/**
|
|
215
|
+
* Updates a managed breadcrumb element only where values changed.
|
|
216
|
+
* @param {HTMLElement} breadcrumb Existing managed element to update.
|
|
217
|
+
* @param {object} record Normalized data used for the next rendered state.
|
|
218
|
+
* @param {number} index Position assigned to the managed breadcrumb.
|
|
219
|
+
*/
|
|
220
|
+
updateItemElement(breadcrumb: HTMLElement, record: object, index: number): void;
|
|
221
|
+
/**
|
|
222
|
+
* Synchronizes an attribute when its value changed.
|
|
223
|
+
* @param {HTMLElement} element Element receiving the synchronized attribute.
|
|
224
|
+
* @param {string} name Attribute to add, update, or remove.
|
|
225
|
+
* @param {string|null|undefined} value Next serialized value for the attribute.
|
|
226
|
+
*/
|
|
227
|
+
syncItemAttribute(element: HTMLElement, name: string, value: string | null | undefined): void;
|
|
228
|
+
/**
|
|
229
|
+
* Synchronizes a boolean attribute.
|
|
230
|
+
* @param {HTMLElement} element Element receiving the boolean attribute.
|
|
231
|
+
* @param {string} name Boolean attribute to toggle.
|
|
232
|
+
* @param {boolean} isEnabled Whether the attribute should be present.
|
|
233
|
+
*/
|
|
234
|
+
syncBooleanItemAttribute(element: HTMLElement, name: string, isEnabled: boolean): void;
|
|
235
|
+
/**
|
|
236
|
+
* Synchronizes slotted icon and text nodes for a managed breadcrumb.
|
|
237
|
+
* @param {HTMLElement} breadcrumb Breadcrumb element.
|
|
238
|
+
* @param {object} record Normalized item record.
|
|
239
|
+
*/
|
|
240
|
+
syncItemContent(breadcrumb: HTMLElement, record: object): void;
|
|
241
|
+
/**
|
|
242
|
+
* Returns a small signature for structural changes that need item replacement.
|
|
243
|
+
* @param {object} record Normalized item record.
|
|
244
|
+
* @returns {string}
|
|
245
|
+
*/
|
|
246
|
+
getItemStructureSignature(record: object): string;
|
|
247
|
+
/**
|
|
248
|
+
* Dispatches the data-driven item click event.
|
|
249
|
+
* @param {MouseEvent} e Original click event.
|
|
250
|
+
*/
|
|
251
|
+
dispatchManagedItemClick(e: MouseEvent): void;
|
|
252
|
+
/**
|
|
253
|
+
* Finds the managed breadcrumb that originated an event.
|
|
254
|
+
* @param {Event} e Event whose composed path should be inspected.
|
|
255
|
+
* @returns {HTMLElement|null}
|
|
256
|
+
*/
|
|
257
|
+
getManagedBreadcrumbFromEvent(e: Event): HTMLElement | null;
|
|
122
258
|
/**
|
|
123
259
|
* Reacts to viewport resize only when the breakpoint mode actually changes.
|
|
124
260
|
* @returns {void}
|
|
@@ -129,6 +265,16 @@ export default class Breadcrumbs extends WJElement {
|
|
|
129
265
|
* @returns {void}
|
|
130
266
|
*/
|
|
131
267
|
updateCollapse(): void;
|
|
268
|
+
/**
|
|
269
|
+
* Collapses the whole breadcrumb trail into a single menu indicator.
|
|
270
|
+
* @param {Array<Element>} breadcrumbs Breadcrumb items.
|
|
271
|
+
*/
|
|
272
|
+
applyMenuCollapse(breadcrumbs: Array<Element>): void;
|
|
273
|
+
/**
|
|
274
|
+
* Returns whether the active breakpoint mode should move the full trail into one menu.
|
|
275
|
+
* @returns {boolean}
|
|
276
|
+
*/
|
|
277
|
+
isBreakpointMenuCollapseActive(): boolean;
|
|
132
278
|
/**
|
|
133
279
|
* Clears attributes/classes managed by the collapse algorithm.
|
|
134
280
|
* @param {Array<Element>} breadcrumbs Breadcrumb items.
|
|
@@ -141,6 +287,10 @@ export default class Breadcrumbs extends WJElement {
|
|
|
141
287
|
* @param {boolean} isEnabled Whether the attribute should be present.
|
|
142
288
|
*/
|
|
143
289
|
syncManagedAttribute(element: Element, name: string, isEnabled: boolean): void;
|
|
290
|
+
/**
|
|
291
|
+
* Redraws active collapsed indicators when parent-only rendering inputs change.
|
|
292
|
+
*/
|
|
293
|
+
refreshCollapsedIndicators(): void;
|
|
144
294
|
/**
|
|
145
295
|
* Returns whether collapse rules should currently be applied.
|
|
146
296
|
* @returns {boolean}
|
|
@@ -151,11 +301,21 @@ export default class Breadcrumbs extends WJElement {
|
|
|
151
301
|
* @returns {number|null}
|
|
152
302
|
*/
|
|
153
303
|
getBreakpointWidth(): number | null;
|
|
304
|
+
/**
|
|
305
|
+
* Returns the custom trigger element configured for breakpoint menu collapse.
|
|
306
|
+
* @returns {Element|null}
|
|
307
|
+
*/
|
|
308
|
+
getBreakpointCollapseTrigger(): Element | null;
|
|
154
309
|
/**
|
|
155
310
|
* Retrieves all breadcrumb elements within the current instance.
|
|
156
311
|
* @returns {Array<Element>} An array of breadcrumb elements (`wje-breadcrumb`) found within the instance. Returns an empty array if no breadcrumbs are found.
|
|
157
312
|
*/
|
|
158
313
|
getBreadcrumbs(): Array<Element>;
|
|
314
|
+
/**
|
|
315
|
+
* Retrieves breadcrumbs managed by the items property.
|
|
316
|
+
* @returns {Array<Element>}
|
|
317
|
+
*/
|
|
318
|
+
getManagedBreadcrumbs(): Array<Element>;
|
|
159
319
|
/**
|
|
160
320
|
* Retrieves all breadcrumb elements that have the 'collapsed' attribute.
|
|
161
321
|
* @returns {Array<Element>} An array of DOM elements representing breadcrumbs with the 'collapsed' attribute.
|
|
@@ -10,6 +10,7 @@ import { default as WJElement } from '../wje-element/element.js';
|
|
|
10
10
|
* @property {string} alt - The alternative text for the image.
|
|
11
11
|
* @property {string} fallout - The action to perform when an error occurs while loading the image. The value can be a function or a predefined action like 'delete'.
|
|
12
12
|
* @property {string} loader - The URL of the image loader to display while the image is loading.
|
|
13
|
+
* @property {boolean} noLazy - Disables lazy loading and renders the image source immediately.
|
|
13
14
|
* @tag wje-img
|
|
14
15
|
*/
|
|
15
16
|
export default class Img extends WJElement {
|
|
@@ -71,6 +72,16 @@ export default class Img extends WJElement {
|
|
|
71
72
|
* @returns {string|null} The value of the 'loader' attribute if set, otherwise null.
|
|
72
73
|
*/
|
|
73
74
|
get loader(): string | null;
|
|
75
|
+
/**
|
|
76
|
+
* Enables or disables lazy loading for the image.
|
|
77
|
+
* @param {boolean} value True to disable lazy loading, false to restore the default lazy behavior.
|
|
78
|
+
*/
|
|
79
|
+
set noLazy(value: boolean);
|
|
80
|
+
/**
|
|
81
|
+
* Checks whether lazy loading is disabled.
|
|
82
|
+
* @returns {boolean} True when the `no-lazy` attribute is present.
|
|
83
|
+
*/
|
|
84
|
+
get noLazy(): boolean;
|
|
74
85
|
attributeChangedCallback(name: any, oldValue: any, newValue: any): void;
|
|
75
86
|
/**
|
|
76
87
|
* Creates and assembles a lazy-loaded image element within a document fragment.
|
|
@@ -68,6 +68,11 @@ export class Select extends FormAssociatedElement {
|
|
|
68
68
|
* @description A reference to the input element, initially null.
|
|
69
69
|
*/
|
|
70
70
|
input: HTMLElement | null;
|
|
71
|
+
/**
|
|
72
|
+
* @type {HTMLElement|null}
|
|
73
|
+
* @description A reference to the visible selected text element, initially null.
|
|
74
|
+
*/
|
|
75
|
+
displayText: HTMLElement | null;
|
|
71
76
|
/**
|
|
72
77
|
* @type {HTMLElement|null}
|
|
73
78
|
* @description A reference to the chips element, initially null.
|
|
@@ -14,6 +14,8 @@ import { default as WJElement } from '../wje-element/element.js';
|
|
|
14
14
|
* @cssproperty [--wje-toolbar-padding-top=1rem] - Specifies the padding at the top of the toolbar. Accepts any valid CSS length unit.
|
|
15
15
|
* @cssproperty [--wje-toolbar-padding-bottom=1rem] - Specifies the padding at the bottom of the toolbar. Helps create spacing between the content and the bottom edge.
|
|
16
16
|
* @cssproperty [--wje-toolbar-padding-inline=1.5rem] - Defines the horizontal padding (left and right) of the toolbar. Creates consistent spacing on both sides.
|
|
17
|
+
* @cssproperty [--wje-toolbar-margin-block=0] - Defines the vertical margin outside the toolbar. Accepts any valid CSS length value.
|
|
18
|
+
* @cssproperty [--wje-toolbar-margin-inline=0] - Defines the horizontal margin outside the toolbar. Accepts any valid CSS length value.
|
|
17
19
|
* @cssproperty [--wje-toolbar-border-color=var(--wje-border-color)] - Sets the color of the toolbar's border. Accepts any valid CSS color value.
|
|
18
20
|
* @cssproperty [--wje-toolbar-top=0] - Specifies the vertical position of the toolbar relative to its container. Useful for fixed or sticky toolbars.
|
|
19
21
|
* @tag wje-toolbar
|