@odx/foundation 1.0.0-beta.97 → 1.0.0-beta.98
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.
|
@@ -12,7 +12,6 @@ declare global {
|
|
|
12
12
|
export declare class OdxBreadcrumbs extends CustomElement {
|
|
13
13
|
#private;
|
|
14
14
|
private itemElements;
|
|
15
|
-
private renderedItemElements;
|
|
16
15
|
max: number;
|
|
17
16
|
items?: BreadcrumbsItem[] | null;
|
|
18
17
|
protected firstUpdated(props: PropertyValues<this>): void;
|
package/dist/components.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { _ as __decorateClass } from './_virtual_class-decorator-runtime.js';
|
|
2
2
|
import { CustomElement, ExpandableItemManager, customElement, CanBeExpanded, InteractiveElement, getUniqueId, toAriaBooleanAttribute, Size, Variant, optionalAttr, InteractiveLink, getElementFromEvent, Shape, CanBeDisabled, optionalSlot, CheckboxFormControl, CheckboxGroupFormControl, SharedResizeObserver, findClosestDocument, Placement, waitForAnimations, PopoverPlacementOptions, computePopoverPlacement, getKeyInfo, FormControl, ActiveDescendantsController, getAssignedElement, parseDate, forwardEvent, OptionControl, toPx, RadioGroupFormControl, ListboxFormControl, IsDraggable, NumberFormControl, IS_DRAG_ACTIVE_ATTRIBUTE, DragController } from '@odx/foundation';
|
|
3
|
-
import { queryAssignedElements, property, query, state
|
|
3
|
+
import { queryAssignedElements, property, query, state } from 'lit/decorators.js';
|
|
4
4
|
import { html, isServer, unsafeCSS, css, nothing } from 'lit';
|
|
5
5
|
import { p as pick, e, a as autoUpdate, t as throttle, R as RovingTabindexController, r as round, g as debounce, n, i as c, j as e$1 } from './vendor.js';
|
|
6
6
|
import { when } from 'lit/directives/when.js';
|
|
7
7
|
import { IsLocalized, setTranslation } from '@odx/foundation/i18n';
|
|
8
8
|
import { signal, computed } from '@preact/signals-core';
|
|
9
9
|
import 'lit/html.js';
|
|
10
|
-
import { repeat } from 'lit/directives/repeat.js';
|
|
11
10
|
|
|
12
11
|
const styles$1g = ":host{display:block}:host(:not([compact])) ::slotted(odx-accordion-item){margin-block:var(--odx-spacing-37)}";
|
|
13
12
|
|
|
@@ -400,11 +399,7 @@ const _OdxAnchorNavigation = class _OdxAnchorNavigation extends e(CustomElement)
|
|
|
400
399
|
render() {
|
|
401
400
|
const anchors = this.#anchorObserver?.anchors.value ?? [];
|
|
402
401
|
const visibleAnchors = this.#anchorObserver?.visibleAnchors.value;
|
|
403
|
-
return
|
|
404
|
-
anchors,
|
|
405
|
-
(anchor) => anchor.id,
|
|
406
|
-
(anchor) => this.renderAnchorLink(anchor, visibleAnchors?.[0] === anchor)
|
|
407
|
-
);
|
|
402
|
+
return html`${anchors.map((anchor) => this.renderAnchorLink(anchor, visibleAnchors?.[0] === anchor))}`;
|
|
408
403
|
}
|
|
409
404
|
updated(props) {
|
|
410
405
|
if (props.has("container")) {
|
|
@@ -602,13 +597,7 @@ const _OdxBreadcrumbs = class _OdxBreadcrumbs extends CustomElement {
|
|
|
602
597
|
render() {
|
|
603
598
|
if (Array.isArray(this.items)) {
|
|
604
599
|
const items = this.items.filter((...args) => this.#isItemVisible(...args));
|
|
605
|
-
return
|
|
606
|
-
items,
|
|
607
|
-
(item) => item.href,
|
|
608
|
-
({ label, href }) => html`
|
|
609
|
-
<odx-breadcrumbs-item><odx-link href=${href}>${label}</odx-link></odx-breadcrumbs-item>
|
|
610
|
-
`
|
|
611
|
-
);
|
|
600
|
+
return html`${items.map(({ label, href }) => html`<odx-breadcrumbs-item><odx-link href=${href}>${label}</odx-link></odx-breadcrumbs-item>`)}`;
|
|
612
601
|
}
|
|
613
602
|
return html`<slot @slotchange=${this.#updateContext}></slot>`;
|
|
614
603
|
}
|
|
@@ -625,7 +614,9 @@ const _OdxBreadcrumbs = class _OdxBreadcrumbs extends CustomElement {
|
|
|
625
614
|
for (const [index, item] of this.itemElements.entries()) {
|
|
626
615
|
item.hidden = !this.#isItemVisible(item, index, this.itemElements);
|
|
627
616
|
}
|
|
628
|
-
|
|
617
|
+
const renderedItemElements = this.shadowRoot?.querySelectorAll(OdxBreadcrumbsItem.tagName) ?? [];
|
|
618
|
+
if (renderedItemElements.length === 0) return;
|
|
619
|
+
for (const item of Array.from(renderedItemElements)) {
|
|
629
620
|
item.requestUpdate();
|
|
630
621
|
}
|
|
631
622
|
}
|
|
@@ -633,9 +624,6 @@ const _OdxBreadcrumbs = class _OdxBreadcrumbs extends CustomElement {
|
|
|
633
624
|
__decorateClass([
|
|
634
625
|
queryAssignedElements({ selector: OdxBreadcrumbsItem.tagName, flatten: true })
|
|
635
626
|
], _OdxBreadcrumbs.prototype, "itemElements", 2);
|
|
636
|
-
__decorateClass([
|
|
637
|
-
queryAll(OdxBreadcrumbsItem.tagName)
|
|
638
|
-
], _OdxBreadcrumbs.prototype, "renderedItemElements", 2);
|
|
639
627
|
__decorateClass([
|
|
640
628
|
property({ type: Number })
|
|
641
629
|
], _OdxBreadcrumbs.prototype, "max", 2);
|
|
@@ -3706,7 +3694,7 @@ const _OdxSliderMarks = class _OdxSliderMarks extends CustomElement {
|
|
|
3706
3694
|
const markCount = Math.floor(this.context.range / step);
|
|
3707
3695
|
const marks = new Array(markCount).fill(null).map((_, index) => step * index + this.context.min);
|
|
3708
3696
|
return html`
|
|
3709
|
-
${
|
|
3697
|
+
${marks.map((value) => this.renderMark(value))}
|
|
3710
3698
|
${this.renderMark(this.context.max, true)}
|
|
3711
3699
|
`;
|
|
3712
3700
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@odx/foundation",
|
|
3
3
|
"description": "A library of Web Component building blocks for ODX",
|
|
4
|
-
"version": "1.0.0-beta.
|
|
4
|
+
"version": "1.0.0-beta.98",
|
|
5
5
|
"author": "Drägerwerk AG & Co.KGaA",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
7
7
|
"homepage": "https://odx.draeger.com",
|