@m3e/web 2.5.11 → 2.5.12

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 (49) hide show
  1. package/dist/all.js +92 -42
  2. package/dist/all.js.map +1 -1
  3. package/dist/all.min.js +56 -56
  4. package/dist/all.min.js.map +1 -1
  5. package/dist/autocomplete.js +23 -5
  6. package/dist/autocomplete.js.map +1 -1
  7. package/dist/autocomplete.min.js +1 -1
  8. package/dist/autocomplete.min.js.map +1 -1
  9. package/dist/breadcrumb.js +1 -1
  10. package/dist/breadcrumb.js.map +1 -1
  11. package/dist/breadcrumb.min.js +1 -1
  12. package/dist/breadcrumb.min.js.map +1 -1
  13. package/dist/core.js +27 -23
  14. package/dist/core.js.map +1 -1
  15. package/dist/core.min.js +1 -1
  16. package/dist/core.min.js.map +1 -1
  17. package/dist/custom-elements.json +74 -42
  18. package/dist/fab.js +1 -1
  19. package/dist/fab.js.map +1 -1
  20. package/dist/fab.min.js +1 -1
  21. package/dist/fab.min.js.map +1 -1
  22. package/dist/form-field.js +1 -1
  23. package/dist/form-field.js.map +1 -1
  24. package/dist/form-field.min.js +2 -2
  25. package/dist/form-field.min.js.map +1 -1
  26. package/dist/option.js +12 -2
  27. package/dist/option.js.map +1 -1
  28. package/dist/option.min.js +1 -1
  29. package/dist/option.min.js.map +1 -1
  30. package/dist/select.js +18 -2
  31. package/dist/select.js.map +1 -1
  32. package/dist/select.min.js +1 -1
  33. package/dist/select.min.js.map +1 -1
  34. package/dist/src/autocomplete/AutocompleteElement.d.ts.map +1 -1
  35. package/dist/src/core/shared/mixins/LinkButton.d.ts.map +1 -1
  36. package/dist/src/core/shared/tokens/DesignToken.d.ts +3 -0
  37. package/dist/src/core/shared/tokens/DesignToken.d.ts.map +1 -1
  38. package/dist/src/core/shared/tokens/MeasurementToken.d.ts +13 -7
  39. package/dist/src/core/shared/tokens/MeasurementToken.d.ts.map +1 -1
  40. package/dist/src/form-field/FormFieldElement.d.ts.map +1 -1
  41. package/dist/src/option/OptionElement.d.ts.map +1 -1
  42. package/dist/src/option/OptionPanelElement.d.ts.map +1 -1
  43. package/dist/src/select/SelectElement.d.ts.map +1 -1
  44. package/dist/src/theme/ThemeElement.d.ts.map +1 -1
  45. package/dist/theme.js +10 -7
  46. package/dist/theme.js.map +1 -1
  47. package/dist/theme.min.js +6 -6
  48. package/dist/theme.min.js.map +1 -1
  49. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"breadcrumb.min.js","sources":["../../src/breadcrumb/BreadcrumbElement.ts","../../src/breadcrumb/isIconOnly.ts","../../src/breadcrumb/BreadcrumbItemButtonElement.ts","../../src/breadcrumb/BreadcrumbItemElement.ts"],"sourcesContent":["import { css, CSSResultGroup, html, LitElement } from \"lit\";\r\nimport { property } from \"lit/decorators.js\";\r\n\r\nimport { customElement, Role } from \"@m3e/web/core\";\r\n\r\nimport type { M3eBreadcrumbItemElement } from \"./BreadcrumbItemElement\";\r\n\r\n/**\r\n * Displays a hierarchical navigation path and identifies the user's\r\n * current location within an application.\r\n *\r\n * @description\r\n * The `m3e-breadcrumb` component arranges `m3e-breadcrumb-item` children into\r\n * a trail of navigation steps. It tracks the last item as the current page and\r\n * supports a custom separator slot for alternate divider content.\r\n *\r\n * @example\r\n * The following example illustrates a simple breadcrumb with three items.\r\n * ```html\r\n * <m3e-breadcrumb>\r\n * <m3e-breadcrumb-item href=\"/dashboard\">Dashboard</m3e-breadcrumb-item>\r\n * <m3e-breadcrumb-item href=\"/dashboard/reports\">Reports</m3e-breadcrumb-item>\r\n * <m3e-breadcrumb-item href=\"/dashboard/reports/annual\">Annual</m3e-breadcrumb-item>\r\n * </m3e-breadcrumb>\r\n * ```\r\n *\r\n * @tag m3e-breadcrumb\r\n *\r\n * @slot - Renders breadcrumb items.\r\n * @slot separator - Renders a custom separator between breadcrumb items.\r\n *\r\n * @attr wrap - Whether breadcrumb items should wrap onto a new line.\r\n */\r\n@customElement(\"m3e-breadcrumb\")\r\nexport class M3eBreadcrumbElement extends Role(LitElement, \"navigation\") {\r\n /** The styles of the element. */\r\n static override styles: CSSResultGroup = css`\r\n :host {\r\n display: block;\r\n }\r\n .base {\r\n display: flex;\r\n align-items: center;\r\n }\r\n :host([wrap]) .base {\r\n flex-wrap: wrap;\r\n }\r\n slot[name=\"separator\"] {\r\n display: none;\r\n }\r\n `;\r\n\r\n /** @private */ #customSeparator: Element[] = [];\r\n\r\n /**\r\n * Whether items wrap to a new line.\r\n * @default false\r\n */\r\n @property({ type: Boolean, reflect: true }) wrap = false;\r\n\r\n /** @inheritdoc */\r\n protected override render(): unknown {\r\n return html`<div class=\"base\" role=\"list\">\r\n <slot @slotchange=\"${this.#handleSlotChange}\"></slot>\r\n <slot name=\"separator\" @slotchange=\"${this.#handleSeparatorSlotChange}\"></slot>\r\n </div>`;\r\n }\r\n\r\n /** @private */\r\n #handleSlotChange(): void {\r\n const items = this.querySelectorAll(\"m3e-breadcrumb-item\");\r\n for (let i = 0; i < items.length; i++) {\r\n const item = items[i];\r\n if (i < items.length - 1) {\r\n item.removeAttribute(\"current\");\r\n } else if (!item.hasAttribute(\"current\")) {\r\n item.setAttribute(\"current\", \"page\");\r\n }\r\n this.#setSeparator(item);\r\n }\r\n }\r\n\r\n /** @private */\r\n #handleSeparatorSlotChange(e: Event): void {\r\n this.#customSeparator = (e.target as HTMLSlotElement).assignedElements({ flatten: true });\r\n this.querySelectorAll(\"m3e-breadcrumb-item\").forEach((x) => this.#setSeparator(x));\r\n }\r\n\r\n /** @private */\r\n #setSeparator(item: M3eBreadcrumbItemElement): void {\r\n item._setSeparator(\r\n this.#customSeparator.map((x) => {\r\n const clone = <Element>x.cloneNode(true);\r\n clone.part = \"separator\";\r\n return clone;\r\n }),\r\n );\r\n }\r\n}\r\n\r\ndeclare global {\r\n interface HTMLElementTagNameMap {\r\n \"m3e-breadcrumb\": M3eBreadcrumbElement;\r\n }\r\n}\r\n","/** @internal */\r\nexport function isIconOnly(slot: HTMLSlotElement): boolean {\r\n const elements = slot.assignedElements({ flatten: true });\r\n if (elements.length === 1) {\r\n const rect = elements[0].getBoundingClientRect();\r\n return rect.width <= 28 && rect.height <= 28;\r\n }\r\n return false;\r\n}\r\n","import { css, CSSResultGroup, html, LitElement, nothing, PropertyValues } from \"lit\";\r\nimport { property, query } from \"lit/decorators.js\";\r\nimport { ifDefined } from \"lit/directives/if-defined.js\";\r\n\r\nimport {\r\n AttachInternals,\r\n customElement,\r\n DesignToken,\r\n Disabled,\r\n Focusable,\r\n KeyboardClick,\r\n LinkButton,\r\n M3eFocusRingElement,\r\n M3eRippleElement,\r\n M3eStateLayerElement,\r\n renderPseudoLink,\r\n Role,\r\n setCustomState,\r\n} from \"@m3e/web/core\";\r\n\r\nimport { BreadcrumbItemCurrent } from \"./BreadcrumbItemCurrent\";\r\nimport { isIconOnly } from \"./isIconOnly\";\r\n\r\n/**\r\n * @internal\r\n * An internal interactive element used to present the content of a breadcrumb item.\r\n */\r\n@customElement(\"m3e-breadcrumb-item-button\")\r\nexport class M3eBreadcrumbItemButtonElement extends KeyboardClick(\r\n LinkButton(Focusable(Disabled(AttachInternals(Role(LitElement, \"button\"), true)))),\r\n) {\r\n /** The styles of the element. */\r\n static override styles: CSSResultGroup = css`\r\n :host {\r\n display: block;\r\n outline: none;\r\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\r\n }\r\n .base {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n position: relative;\r\n border-radius: var(--m3e-breadcrumb-item-shape, ${DesignToken.shape.corner.full});\r\n height: calc(var(--m3e-breadcrumb-item-container-height, 2.5rem) + ${DesignToken.density.calc(-3)});\r\n column-gap: var(--m3e-breadcrumb-item-icon-label-space, 0.5rem);\r\n }\r\n .icon {\r\n font-size: var(--m3e-breadcrumb-item--icon-size, 1.25rem);\r\n --m3e-icon-size: var(--m3e-breadcrumb-item--icon-size, 1.25rem);\r\n }\r\n ::slotted([slot=\"icon\"]) {\r\n font-size: inherit !important;\r\n flex: none;\r\n }\r\n ::slotted(svg[slot=\"icon\"]) {\r\n width: 1em;\r\n height: 1em;\r\n }\r\n :host(:is(:state(--icon-only), :--icon-only)) .overflow {\r\n flex: none;\r\n }\r\n :host(:not(:is(:state(--icon-only), :--icon-only))),\r\n :host(:not(:is(:state(--icon-only), :--icon-only))) .base {\r\n min-width: 0;\r\n }\r\n :host(:is(:state(--icon-only), :--icon-only):not([current]):not(:disabled)) .base {\r\n color: var(--m3e-breadcrumb-item-icon-color, ${DesignToken.color.onSurfaceVariant});\r\n }\r\n :host(:is(:state(--icon-only), :--icon-only)) .base {\r\n width: calc(var(--m3e-breadcrumb-item-container-height, 2.5rem) + ${DesignToken.density.calc(-3)});\r\n padding-inline: var(--m3e-breadcrumb-item-icon-padding-inline, 0px);\r\n --m3e-state-layer-hover-color: var(\r\n --m3e-breadcrumb-item-icon-hover-state-layer-color,\r\n ${DesignToken.color.onSurface}\r\n );\r\n --m3e-state-layer-focus-color: var(\r\n --m3e-breadcrumb-item-icon-focus-state-layer-color,\r\n ${DesignToken.color.onSurface}\r\n );\r\n --m3e-ripple-color: var(--m3e-breadcrumb-item-icon-pressed-state-layer-color, ${DesignToken.color.onSurface});\r\n }\r\n :host(:not(:is(:state(--icon-only), :--icon-only)):not([current]):not(:disabled)) .base {\r\n color: var(--m3e-breadcrumb-item-label-color, ${DesignToken.color.primary});\r\n }\r\n :host(:not(:is(:state(--icon-only), :--icon-only))) .base {\r\n font-size: var(--m3e-breadcrumb-item-label-font-size, ${DesignToken.typescale.standard.label.large.fontSize});\r\n font-weight: var(\r\n --m3e-breadcrumb-item-label-font-weight,\r\n ${DesignToken.typescale.standard.label.large.fontWeight}\r\n );\r\n line-height: var(\r\n --m3e-breadcrumb-item-label-line-height,\r\n ${DesignToken.typescale.standard.label.large.lineHeight}\r\n );\r\n letter-spacing: var(--m3e-breadcrumb-item-label-tracking, ${DesignToken.typescale.standard.label.large.tracking});\r\n }\r\n :host(:not(:is(:state(--icon-only), :--icon-only))) .base {\r\n padding-inline: var(--m3e-breadcrumb-item-label-padding-inline, 0.75rem);\r\n --m3e-state-layer-hover-color: var(\r\n --m3e-breadcrumb-item-label-hover-state-layer-color,\r\n ${DesignToken.color.primary}\r\n );\r\n --m3e-state-layer-focus-color: var(\r\n --m3e-breadcrumb-item-label-focus-state-layer-color,\r\n ${DesignToken.color.primary}\r\n );\r\n --m3e-ripple-color: var(--m3e-breadcrumb-item-label-pressed-state-layer-color, ${DesignToken.color.primary});\r\n }\r\n :host([current]) .base {\r\n color: var(--m3e-breadcrumb-item-last-color, ${DesignToken.color.onSurface});\r\n }\r\n :host(:not(:disabled):not([current])) {\r\n cursor: pointer;\r\n user-select: none;\r\n }\r\n :host(:disabled:not([current])) .base {\r\n color: color-mix(\r\n in srgb,\r\n var(--m3e-breadcrumb-item-disabled-color, ${DesignToken.color.onSurface})\r\n var(--m3e-breadcrumb-item-disabled-opacity, 38%),\r\n transparent\r\n );\r\n }\r\n .touch {\r\n position: absolute;\r\n height: 3rem;\r\n width: max(3rem, 100%);\r\n margin: auto;\r\n }\r\n a {\r\n all: unset;\r\n display: block;\r\n position: absolute;\r\n top: 0px;\r\n left: 0px;\r\n right: 0px;\r\n bottom: 0px;\r\n z-index: 1;\r\n }\r\n @media (forced-colors: active) {\r\n :host(:is(:state(--icon-only), :--icon-only):not([current]):not(:disabled)) .base,\r\n :host(:not(:is(:state(--icon-only), :--icon-only)):not([current]):not(:disabled)) .base {\r\n color: LinkText;\r\n outline: 1px solid LinkText;\r\n }\r\n :host(:disabled) .base {\r\n color: GrayText;\r\n }\r\n }\r\n `;\r\n\r\n /** @private */ @query(\".focus-ring\") private readonly _focusRing?: M3eFocusRingElement;\r\n /** @private */ @query(\".state-layer\") private readonly _stateLayer?: M3eStateLayerElement;\r\n /** @private */ @query(\".ripple\") private readonly _ripple?: M3eRippleElement;\r\n\r\n /** @private */ #clickHandler = (e: Event) => this.#handleClick(e);\r\n\r\n /**\r\n * Indicates the current item in the breadcrumb path.\r\n * @default undefined\r\n */\r\n @property({ reflect: true }) current?: BreadcrumbItemCurrent;\r\n\r\n /** @inheritdoc */\r\n override connectedCallback(): void {\r\n this.addEventListener(\"click\", this.#clickHandler);\r\n super.connectedCallback();\r\n }\r\n\r\n /** @inheritdoc */\r\n override disconnectedCallback(): void {\r\n super.disconnectedCallback();\r\n this.removeEventListener(\"click\", this.#clickHandler);\r\n }\r\n\r\n /** @inheritdoc */\r\n protected override firstUpdated(_changedProperties: PropertyValues<this>): void {\r\n super.firstUpdated(_changedProperties);\r\n [this._focusRing, this._stateLayer, this._ripple].forEach((x) => x?.attach(this));\r\n }\r\n\r\n /** @inheritdoc */\r\n protected override update(changedProperties: PropertyValues<this>): void {\r\n super.update(changedProperties);\r\n\r\n if (changedProperties.has(\"disabled\") || changedProperties.has(\"current\")) {\r\n this.ariaDisabled = this.disabled && !this.current ? \"true\" : null;\r\n }\r\n\r\n if (changedProperties.has(\"current\")) {\r\n if (this.current) {\r\n this.role = null;\r\n } else if (this.hasAttribute(\"href\")) {\r\n this.role = \"link\";\r\n } else {\r\n this.role = \"button\";\r\n }\r\n }\r\n }\r\n\r\n /** @inheritdoc */\r\n protected override render(): unknown {\r\n return html`<div class=\"base\" aria-current=\"${ifDefined(this.current)}\">\r\n ${this.current\r\n ? nothing\r\n : html`<m3e-state-layer class=\"state-layer\" ?disabled=\"${this.disabled}\"> </m3e-state-layer>\r\n <m3e-focus-ring class=\"focus-ring\" ?disabled=\"${this.disabled}\"></m3e-focus-ring>\r\n <m3e-ripple class=\"ripple\" ?disabled=\"${this.disabled}\"></m3e-ripple>\r\n ${this[renderPseudoLink]()}`}\r\n <slot class=\"icon\" name=\"icon\" aria-hidden=\"true\"></slot>\r\n <m3e-text-overflow class=\"overflow\">\r\n <slot @slotchange=\"${this.#handleSlotChange}\"></slot>\r\n </m3e-text-overflow>\r\n ${this.current ? nothing : html`<div class=\"touch\" aria-hidden=\"true\"></div>`}\r\n </div>`;\r\n }\r\n\r\n /** @private */\r\n #handleSlotChange(e: Event): void {\r\n setCustomState(this, \"--icon-only\", isIconOnly(e.target as HTMLSlotElement));\r\n }\r\n\r\n /** @private */\r\n #handleClick(e: Event): void {\r\n // If current and link, disable default link click handler behavior.\r\n if (this.current && this.href) {\r\n e.preventDefault();\r\n }\r\n }\r\n}\r\n\r\ndeclare global {\r\n interface HTMLElementTagNameMap {\r\n \"m3e-breadcrumb-item-button\": M3eBreadcrumbItemButtonElement;\r\n }\r\n}\r\n","import { css, CSSResultGroup, html, LitElement, nothing, PropertyValues } from \"lit\";\r\nimport { property, query } from \"lit/decorators.js\";\r\nimport { ifDefined } from \"lit/directives/if-defined.js\";\r\n\r\nimport { AttachInternals, customElement, LinkButton, Role, setCustomState } from \"@m3e/web/core\";\r\n\r\nimport { M3eBreadcrumbItemButtonElement } from \"./BreadcrumbItemButtonElement\";\r\nimport { BreadcrumbItemCurrent } from \"./BreadcrumbItemCurrent\";\r\nimport { isIconOnly } from \"./isIconOnly\";\r\n\r\nimport \"./BreadcrumbItemButtonElement\";\r\n\r\n/**\r\n * An item in a breadcrumb.\r\n *\r\n * @description\r\n * The `m3e-breadcrumb-item` element represents a single item in a breadcrumb\r\n * navigation trail. It renders an internal button and supports navigation\r\n * attributes for link behavior.\r\n *\r\n * @tag m3e-breadcrumb-item\r\n *\r\n * @slot - Renders the content of the breadcrumb item.\r\n * @slot icon - Renders an icon before the item's label.\r\n *\r\n * @attr item-label - The accessible label used by the internal breadcrumb button.\r\n * @attr disabled - Whether the breadcrumb item is disabled.\r\n * @attr current - Marks the breadcrumb item as the current location in the trail.\r\n * @attr href - The URL to which the internal breadcrumb link button points.\r\n * @attr target - The target of the internal breadcrumb link button.\r\n * @attr download - A value indicating whether the internal link target will be downloaded, optionally specifying a file name.\r\n * @attr rel - The relationship between the internal link target and the document.\r\n *\r\n * @fires click - Dispatched when the element is clicked.\r\n *\r\n * @cssprop --m3e-breadcrumb-item-shape - Shape of the internal breadcrumb item button.\r\n * @cssprop --m3e-breadcrumb-item-container-height - Height of the internal breadcrumb item button container.\r\n * @cssprop --m3e-breadcrumb-item-icon-color - Color of breadcrumb item icon-only content.\r\n * @cssprop --m3e-breadcrumb-item-icon-padding-inline - Horizontal padding for icon-only breadcrumb items.\r\n * @cssprop --m3e-breadcrumb-item-icon-hover-state-layer-color - Hover state layer color for icon-only breadcrumb items.\r\n * @cssprop --m3e-breadcrumb-item-icon-focus-state-layer-color - Focus state layer color for icon-only breadcrumb items.\r\n * @cssprop --m3e-breadcrumb-item-icon-pressed-state-layer-color - Pressed state layer color for icon-only breadcrumb items.\r\n * @cssprop --m3e-breadcrumb-item-label-color - Color of breadcrumb item label content.\r\n * @cssprop --m3e-breadcrumb-item-label-font-size - Font size of breadcrumb item label content.\r\n * @cssprop --m3e-breadcrumb-item-label-font-weight - Font weight of breadcrumb item label content.\r\n * @cssprop --m3e-breadcrumb-item-label-line-height - Line height of breadcrumb item label content.\r\n * @cssprop --m3e-breadcrumb-item-label-tracking - Letter spacing of breadcrumb item label content.\r\n * @cssprop --m3e-breadcrumb-item-label-padding-inline - Horizontal padding for label breadcrumb items.\r\n * @cssprop --m3e-breadcrumb-item-label-hover-state-layer-color - Hover state layer color for label breadcrumb items.\r\n * @cssprop --m3e-breadcrumb-item-label-focus-state-layer-color - Focus state layer color for label breadcrumb items.\r\n * @cssprop --m3e-breadcrumb-item-label-pressed-state-layer-color - Pressed state layer color for label breadcrumb items.\r\n * @cssprop --m3e-breadcrumb-item-last-color - Color used for the current breadcrumb item.\r\n * @cssprop --m3e-breadcrumb-item-icon-label-space - Space between icon and label.\r\n * @cssprop --m3e-breadcrumb-item-icon-size - Size of the icon.\r\n * @cssprop --m3e-breadcrumb-item-disabled-color - Disabled color used by the breadcrumb item button.\r\n * @cssprop --m3e-breadcrumb-item-disabled-opacity - Disabled opacity used by the breadcrumb item button.\r\n */\r\n@customElement(\"m3e-breadcrumb-item\")\r\nexport class M3eBreadcrumbItemElement extends LinkButton(AttachInternals(Role(LitElement, \"listitem\")), true) {\r\n /** The styles of the element. */\r\n static override styles: CSSResultGroup = css`\r\n :host {\r\n display: block;\r\n }\r\n .base {\r\n display: flex;\r\n align-items: center;\r\n height: 100%;\r\n }\r\n :host(:not(:is(:state(--icon-only), :--icon-only))[current]),\r\n :host(:not(:is(:state(--icon-only), :--icon-only))[current]) .base {\r\n min-width: 0;\r\n }\r\n .button {\r\n flex: 1 1 auto;\r\n }\r\n .separator {\r\n flex: none;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n min-width: 0.5rem;\r\n --m3e-icon-size: var(--m3e-breadcrumb-separator-icon-size, 1.5rem);\r\n }\r\n .separator-icon {\r\n width: 1em;\r\n height: 1em;\r\n font-size: var(--m3e-icon-size);\r\n vertical-align: middle;\r\n }\r\n `;\r\n\r\n /** @private */ @query(\".button\") private readonly _button!: M3eBreadcrumbItemButtonElement;\r\n /** @private */ #defaultSeparator?: Element;\r\n\r\n /**\r\n * The accessible label given to the item's internal button.\r\n * @default \"\"\r\n */\r\n @property({ attribute: \"item-label\" }) itemLabel = \"\";\r\n\r\n /**\r\n * Whether the element is disabled.\r\n * @default false\r\n */\r\n @property({ type: Boolean, reflect: true }) disabled = false;\r\n\r\n /**\r\n * Indicates the current item in the breadcrumb path.\r\n * @default undefined\r\n */\r\n @property({ reflect: true }) current?: BreadcrumbItemCurrent;\r\n\r\n /** @inheritdoc */\r\n override focus(options?: FocusOptions): void {\r\n this._button?.focus(options);\r\n }\r\n\r\n /** @inheritdoc */\r\n override blur(): void {\r\n this._button?.blur();\r\n }\r\n\r\n /** @inheritdoc */\r\n override click(): void {\r\n this._button?.click();\r\n }\r\n\r\n /** @inheritdoc */\r\n protected override updated(_changedProperties: PropertyValues<this>): void {\r\n super.updated(_changedProperties);\r\n if (_changedProperties.has(\"current\")) {\r\n this.#updateIconFilled();\r\n }\r\n }\r\n\r\n /** @inheritdoc */\r\n protected override render(): unknown {\r\n return html`<div class=\"base\">\r\n <m3e-breadcrumb-item-button\r\n class=\"button\"\r\n aria-label=\"${ifDefined(this.itemLabel || undefined)}\"\r\n ?disabled=\"${this.disabled}\"\r\n current=\"${ifDefined(this.current)}\"\r\n href=\"${ifDefined(this.href || undefined)}\"\r\n target=\"${ifDefined(this.target || undefined)}\"\r\n download=\"${ifDefined(this.download || undefined)}\"\r\n rel=\"${ifDefined(this.rel || undefined)}\"\r\n >\r\n <slot name=\"icon\" slot=\"icon\" @slotchange=\"${this.#handleIconSlotChange}\"></slot>\r\n <slot @slotchange=\"${this.#handleSlotChange}\"></slot>\r\n </m3e-breadcrumb-item-button>\r\n ${this.#renderSeparator()}\r\n </div>`;\r\n }\r\n\r\n /** @private */\r\n #renderSeparator(): unknown {\r\n return this.current\r\n ? nothing\r\n : html`<div class=\"separator\" aria-hidden=\"true\">\r\n <svg class=\"separator-icon\" viewBox=\"0 -960 960 960\" fill=\"currentColor\">\r\n <path d=\"M504-480 320-664l56-56 240 240-240 240-56-56 184-184Z\" />\r\n </svg>\r\n </div>`;\r\n }\r\n\r\n /** @private */\r\n #handleIconSlotChange(): void {\r\n this.#updateIconFilled();\r\n }\r\n\r\n /** @private */\r\n #handleSlotChange(e: Event): void {\r\n setCustomState(this, \"--icon-only\", isIconOnly(e.target as HTMLSlotElement));\r\n this.#updateIconFilled();\r\n }\r\n\r\n /** @private */\r\n #updateIconFilled(): void {\r\n this.querySelectorAll(\"m3e-icon\").forEach((x) => (x.filled = this.current !== undefined && this.current !== null));\r\n }\r\n\r\n /** @internal */\r\n _setSeparator(nodes: Array<Node>) {\r\n const separator = this.shadowRoot?.querySelector(\".separator\");\r\n if (!separator) return;\r\n\r\n if (nodes.length > 0) {\r\n if (!this.#defaultSeparator && separator.firstElementChild) {\r\n this.#defaultSeparator = separator.firstElementChild;\r\n }\r\n separator.replaceChildren(...nodes);\r\n } else if (this.#defaultSeparator) {\r\n separator.replaceChildren(this.#defaultSeparator);\r\n this.#defaultSeparator = undefined;\r\n }\r\n }\r\n}\r\n\r\ndeclare global {\r\n interface HTMLElementTagNameMap {\r\n \"m3e-breadcrumb-item\": M3eBreadcrumbItemElement;\r\n }\r\n}\r\n"],"names":["M3eBreadcrumbElement","Role","LitElement","constructor","_M3eBreadcrumbElement_customSeparator","set","this","wrap","render","html","__classPrivateFieldGet","_M3eBreadcrumbElement_instances","_M3eBreadcrumbElement_handleSlotChange","_M3eBreadcrumbElement_handleSeparatorSlotChange","isIconOnly","slot","elements","assignedElements","flatten","length","rect","getBoundingClientRect","width","height","items","querySelectorAll","i","item","removeAttribute","hasAttribute","setAttribute","_M3eBreadcrumbElement_setSeparator","call","e","__classPrivateFieldSet","target","forEach","x","_setSeparator","map","clone","cloneNode","part","styles","css","__decorate","property","type","Boolean","reflect","prototype","customElement","M3eBreadcrumbItemButtonElement","KeyboardClick","LinkButton","Focusable","Disabled","AttachInternals","_M3eBreadcrumbItemButtonElement_clickHandler","connectedCallback","addEventListener","super","disconnectedCallback","removeEventListener","firstUpdated","_changedProperties","_focusRing","_stateLayer","_ripple","attach","update","changedProperties","has","ariaDisabled","disabled","current","role","ifDefined","nothing","renderPseudoLink","_M3eBreadcrumbItemButtonElement_instances","_M3eBreadcrumbItemButtonElement_handleSlotChange","setCustomState","href","preventDefault","DesignToken","shape","corner","full","density","calc","color","onSurfaceVariant","onSurface","primary","typescale","standard","label","large","fontSize","fontWeight","lineHeight","tracking","query","M3eBreadcrumbItemElement","_M3eBreadcrumbItemElement_defaultSeparator","itemLabel","focus","options","_button","blur","click","updated","_M3eBreadcrumbItemElement_instances","_M3eBreadcrumbItemElement_updateIconFilled","undefined","download","rel","_M3eBreadcrumbItemElement_handleIconSlotChange","_M3eBreadcrumbItemElement_handleSlotChange","_M3eBreadcrumbItemElement_renderSeparator","nodes","separator","shadowRoot","querySelector","firstElementChild","replaceChildren","filled","attribute"],"mappings":";;;;;meAkCO,IAAMA,EAAN,cAAmCC,EAAKC,EAAY,eAApDC,WAAAA,mCAkBWC,EAAAC,IAAAC,KAA8B,IAMFA,KAAAC,MAAO,CAwCrD,CArC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AS,KAAwCuD,EAAAtD,UAAA,eAAA,GArDlDsD,EAAwB3D,EAAA,CADpCM,EAAc,wBACFqD"}
1
+ {"version":3,"file":"breadcrumb.min.js","sources":["../../src/breadcrumb/BreadcrumbElement.ts","../../src/breadcrumb/isIconOnly.ts","../../src/breadcrumb/BreadcrumbItemButtonElement.ts","../../src/breadcrumb/BreadcrumbItemElement.ts"],"sourcesContent":["import { css, CSSResultGroup, html, LitElement } from \"lit\";\r\nimport { property } from \"lit/decorators.js\";\r\n\r\nimport { customElement, Role } from \"@m3e/web/core\";\r\n\r\nimport type { M3eBreadcrumbItemElement } from \"./BreadcrumbItemElement\";\r\n\r\n/**\r\n * Displays a hierarchical navigation path and identifies the user's\r\n * current location within an application.\r\n *\r\n * @description\r\n * The `m3e-breadcrumb` component arranges `m3e-breadcrumb-item` children into\r\n * a trail of navigation steps. It tracks the last item as the current page and\r\n * supports a custom separator slot for alternate divider content.\r\n *\r\n * @example\r\n * The following example illustrates a simple breadcrumb with three items.\r\n * ```html\r\n * <m3e-breadcrumb>\r\n * <m3e-breadcrumb-item href=\"/dashboard\">Dashboard</m3e-breadcrumb-item>\r\n * <m3e-breadcrumb-item href=\"/dashboard/reports\">Reports</m3e-breadcrumb-item>\r\n * <m3e-breadcrumb-item href=\"/dashboard/reports/annual\">Annual</m3e-breadcrumb-item>\r\n * </m3e-breadcrumb>\r\n * ```\r\n *\r\n * @tag m3e-breadcrumb\r\n *\r\n * @slot - Renders breadcrumb items.\r\n * @slot separator - Renders a custom separator between breadcrumb items.\r\n *\r\n * @attr wrap - Whether breadcrumb items should wrap onto a new line.\r\n */\r\n@customElement(\"m3e-breadcrumb\")\r\nexport class M3eBreadcrumbElement extends Role(LitElement, \"navigation\") {\r\n /** The styles of the element. */\r\n static override styles: CSSResultGroup = css`\r\n :host {\r\n display: block;\r\n }\r\n .base {\r\n display: flex;\r\n align-items: center;\r\n }\r\n :host([wrap]) .base {\r\n flex-wrap: wrap;\r\n }\r\n slot[name=\"separator\"] {\r\n display: none;\r\n }\r\n `;\r\n\r\n /** @private */ #customSeparator: Element[] = [];\r\n\r\n /**\r\n * Whether items wrap to a new line.\r\n * @default false\r\n */\r\n @property({ type: Boolean, reflect: true }) wrap = false;\r\n\r\n /** @inheritdoc */\r\n protected override render(): unknown {\r\n return html`<div class=\"base\" role=\"list\">\r\n <slot @slotchange=\"${this.#handleSlotChange}\"></slot>\r\n <slot name=\"separator\" @slotchange=\"${this.#handleSeparatorSlotChange}\"></slot>\r\n </div>`;\r\n }\r\n\r\n /** @private */\r\n #handleSlotChange(): void {\r\n const items = this.querySelectorAll(\"m3e-breadcrumb-item\");\r\n for (let i = 0; i < items.length; i++) {\r\n const item = items[i];\r\n if (i < items.length - 1) {\r\n item.removeAttribute(\"current\");\r\n } else if (!item.hasAttribute(\"current\")) {\r\n item.setAttribute(\"current\", \"page\");\r\n }\r\n this.#setSeparator(item);\r\n }\r\n }\r\n\r\n /** @private */\r\n #handleSeparatorSlotChange(e: Event): void {\r\n this.#customSeparator = (e.target as HTMLSlotElement).assignedElements({ flatten: true });\r\n this.querySelectorAll(\"m3e-breadcrumb-item\").forEach((x) => this.#setSeparator(x));\r\n }\r\n\r\n /** @private */\r\n #setSeparator(item: M3eBreadcrumbItemElement): void {\r\n item._setSeparator(\r\n this.#customSeparator.map((x) => {\r\n const clone = <Element>x.cloneNode(true);\r\n clone.part = \"separator\";\r\n return clone;\r\n }),\r\n );\r\n }\r\n}\r\n\r\ndeclare global {\r\n interface HTMLElementTagNameMap {\r\n \"m3e-breadcrumb\": M3eBreadcrumbElement;\r\n }\r\n}\r\n","/** @internal */\r\nexport function isIconOnly(slot: HTMLSlotElement): boolean {\r\n const elements = slot.assignedElements({ flatten: true });\r\n if (elements.length === 1) {\r\n const rect = elements[0].getBoundingClientRect();\r\n return rect.width <= 28 && rect.height <= 28;\r\n }\r\n return false;\r\n}\r\n","import { css, CSSResultGroup, html, LitElement, nothing, PropertyValues } from \"lit\";\r\nimport { property, query } from \"lit/decorators.js\";\r\nimport { ifDefined } from \"lit/directives/if-defined.js\";\r\n\r\nimport {\r\n AttachInternals,\r\n customElement,\r\n DesignToken,\r\n Disabled,\r\n Focusable,\r\n KeyboardClick,\r\n LinkButton,\r\n M3eFocusRingElement,\r\n M3eRippleElement,\r\n M3eStateLayerElement,\r\n renderPseudoLink,\r\n Role,\r\n setCustomState,\r\n} from \"@m3e/web/core\";\r\n\r\nimport { BreadcrumbItemCurrent } from \"./BreadcrumbItemCurrent\";\r\nimport { isIconOnly } from \"./isIconOnly\";\r\n\r\n/**\r\n * @internal\r\n * An internal interactive element used to present the content of a breadcrumb item.\r\n */\r\n@customElement(\"m3e-breadcrumb-item-button\")\r\nexport class M3eBreadcrumbItemButtonElement extends KeyboardClick(\r\n LinkButton(Focusable(Disabled(AttachInternals(Role(LitElement, \"button\"), true)))),\r\n) {\r\n /** The styles of the element. */\r\n static override styles: CSSResultGroup = css`\r\n :host {\r\n display: block;\r\n outline: none;\r\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\r\n }\r\n .base {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n position: relative;\r\n border-radius: var(--m3e-breadcrumb-item-shape, ${DesignToken.shape.corner.full});\r\n height: calc(var(--m3e-breadcrumb-item-container-height, 2.5rem) + ${DesignToken.density.calc(-3)});\r\n column-gap: var(--m3e-breadcrumb-item-icon-label-space, 0.5rem);\r\n }\r\n .icon {\r\n font-size: var(--m3e-breadcrumb-item-icon-size, 1.25rem);\r\n --m3e-icon-size: var(--m3e-breadcrumb-item-icon-size, 1.25rem);\r\n }\r\n ::slotted([slot=\"icon\"]) {\r\n font-size: inherit !important;\r\n flex: none;\r\n }\r\n ::slotted(svg[slot=\"icon\"]) {\r\n width: 1em;\r\n height: 1em;\r\n }\r\n :host(:is(:state(--icon-only), :--icon-only)) .overflow {\r\n flex: none;\r\n }\r\n :host(:not(:is(:state(--icon-only), :--icon-only))),\r\n :host(:not(:is(:state(--icon-only), :--icon-only))) .base {\r\n min-width: 0;\r\n }\r\n :host(:is(:state(--icon-only), :--icon-only):not([current]):not(:disabled)) .base {\r\n color: var(--m3e-breadcrumb-item-icon-color, ${DesignToken.color.onSurfaceVariant});\r\n }\r\n :host(:is(:state(--icon-only), :--icon-only)) .base {\r\n width: calc(var(--m3e-breadcrumb-item-container-height, 2.5rem) + ${DesignToken.density.calc(-3)});\r\n padding-inline: var(--m3e-breadcrumb-item-icon-padding-inline, 0px);\r\n --m3e-state-layer-hover-color: var(\r\n --m3e-breadcrumb-item-icon-hover-state-layer-color,\r\n ${DesignToken.color.onSurface}\r\n );\r\n --m3e-state-layer-focus-color: var(\r\n --m3e-breadcrumb-item-icon-focus-state-layer-color,\r\n ${DesignToken.color.onSurface}\r\n );\r\n --m3e-ripple-color: var(--m3e-breadcrumb-item-icon-pressed-state-layer-color, ${DesignToken.color.onSurface});\r\n }\r\n :host(:not(:is(:state(--icon-only), :--icon-only)):not([current]):not(:disabled)) .base {\r\n color: var(--m3e-breadcrumb-item-label-color, ${DesignToken.color.primary});\r\n }\r\n :host(:not(:is(:state(--icon-only), :--icon-only))) .base {\r\n font-size: var(--m3e-breadcrumb-item-label-font-size, ${DesignToken.typescale.standard.label.large.fontSize});\r\n font-weight: var(\r\n --m3e-breadcrumb-item-label-font-weight,\r\n ${DesignToken.typescale.standard.label.large.fontWeight}\r\n );\r\n line-height: var(\r\n --m3e-breadcrumb-item-label-line-height,\r\n ${DesignToken.typescale.standard.label.large.lineHeight}\r\n );\r\n letter-spacing: var(--m3e-breadcrumb-item-label-tracking, ${DesignToken.typescale.standard.label.large.tracking});\r\n }\r\n :host(:not(:is(:state(--icon-only), :--icon-only))) .base {\r\n padding-inline: var(--m3e-breadcrumb-item-label-padding-inline, 0.75rem);\r\n --m3e-state-layer-hover-color: var(\r\n --m3e-breadcrumb-item-label-hover-state-layer-color,\r\n ${DesignToken.color.primary}\r\n );\r\n --m3e-state-layer-focus-color: var(\r\n --m3e-breadcrumb-item-label-focus-state-layer-color,\r\n ${DesignToken.color.primary}\r\n );\r\n --m3e-ripple-color: var(--m3e-breadcrumb-item-label-pressed-state-layer-color, ${DesignToken.color.primary});\r\n }\r\n :host([current]) .base {\r\n color: var(--m3e-breadcrumb-item-last-color, ${DesignToken.color.onSurface});\r\n }\r\n :host(:not(:disabled):not([current])) {\r\n cursor: pointer;\r\n user-select: none;\r\n }\r\n :host(:disabled:not([current])) .base {\r\n color: color-mix(\r\n in srgb,\r\n var(--m3e-breadcrumb-item-disabled-color, ${DesignToken.color.onSurface})\r\n var(--m3e-breadcrumb-item-disabled-opacity, 38%),\r\n transparent\r\n );\r\n }\r\n .touch {\r\n position: absolute;\r\n height: 3rem;\r\n width: max(3rem, 100%);\r\n margin: auto;\r\n }\r\n a {\r\n all: unset;\r\n display: block;\r\n position: absolute;\r\n top: 0px;\r\n left: 0px;\r\n right: 0px;\r\n bottom: 0px;\r\n z-index: 1;\r\n }\r\n @media (forced-colors: active) {\r\n :host(:is(:state(--icon-only), :--icon-only):not([current]):not(:disabled)) .base,\r\n :host(:not(:is(:state(--icon-only), :--icon-only)):not([current]):not(:disabled)) .base {\r\n color: LinkText;\r\n outline: 1px solid LinkText;\r\n }\r\n :host(:disabled) .base {\r\n color: GrayText;\r\n }\r\n }\r\n `;\r\n\r\n /** @private */ @query(\".focus-ring\") private readonly _focusRing?: M3eFocusRingElement;\r\n /** @private */ @query(\".state-layer\") private readonly _stateLayer?: M3eStateLayerElement;\r\n /** @private */ @query(\".ripple\") private readonly _ripple?: M3eRippleElement;\r\n\r\n /** @private */ #clickHandler = (e: Event) => this.#handleClick(e);\r\n\r\n /**\r\n * Indicates the current item in the breadcrumb path.\r\n * @default undefined\r\n */\r\n @property({ reflect: true }) current?: BreadcrumbItemCurrent;\r\n\r\n /** @inheritdoc */\r\n override connectedCallback(): void {\r\n this.addEventListener(\"click\", this.#clickHandler);\r\n super.connectedCallback();\r\n }\r\n\r\n /** @inheritdoc */\r\n override disconnectedCallback(): void {\r\n super.disconnectedCallback();\r\n this.removeEventListener(\"click\", this.#clickHandler);\r\n }\r\n\r\n /** @inheritdoc */\r\n protected override firstUpdated(_changedProperties: PropertyValues<this>): void {\r\n super.firstUpdated(_changedProperties);\r\n [this._focusRing, this._stateLayer, this._ripple].forEach((x) => x?.attach(this));\r\n }\r\n\r\n /** @inheritdoc */\r\n protected override update(changedProperties: PropertyValues<this>): void {\r\n super.update(changedProperties);\r\n\r\n if (changedProperties.has(\"disabled\") || changedProperties.has(\"current\")) {\r\n this.ariaDisabled = this.disabled && !this.current ? \"true\" : null;\r\n }\r\n\r\n if (changedProperties.has(\"current\")) {\r\n if (this.current) {\r\n this.role = null;\r\n } else if (this.hasAttribute(\"href\")) {\r\n this.role = \"link\";\r\n } else {\r\n this.role = \"button\";\r\n }\r\n }\r\n }\r\n\r\n /** @inheritdoc */\r\n protected override render(): unknown {\r\n return html`<div class=\"base\" aria-current=\"${ifDefined(this.current)}\">\r\n ${this.current\r\n ? nothing\r\n : html`<m3e-state-layer class=\"state-layer\" ?disabled=\"${this.disabled}\"> </m3e-state-layer>\r\n <m3e-focus-ring class=\"focus-ring\" ?disabled=\"${this.disabled}\"></m3e-focus-ring>\r\n <m3e-ripple class=\"ripple\" ?disabled=\"${this.disabled}\"></m3e-ripple>\r\n ${this[renderPseudoLink]()}`}\r\n <slot class=\"icon\" name=\"icon\" aria-hidden=\"true\"></slot>\r\n <m3e-text-overflow class=\"overflow\">\r\n <slot @slotchange=\"${this.#handleSlotChange}\"></slot>\r\n </m3e-text-overflow>\r\n ${this.current ? nothing : html`<div class=\"touch\" aria-hidden=\"true\"></div>`}\r\n </div>`;\r\n }\r\n\r\n /** @private */\r\n #handleSlotChange(e: Event): void {\r\n setCustomState(this, \"--icon-only\", isIconOnly(e.target as HTMLSlotElement));\r\n }\r\n\r\n /** @private */\r\n #handleClick(e: Event): void {\r\n // If current and link, disable default link click handler behavior.\r\n if (this.current && this.href) {\r\n e.preventDefault();\r\n }\r\n }\r\n}\r\n\r\ndeclare global {\r\n interface HTMLElementTagNameMap {\r\n \"m3e-breadcrumb-item-button\": M3eBreadcrumbItemButtonElement;\r\n }\r\n}\r\n","import { css, CSSResultGroup, html, LitElement, nothing, PropertyValues } from \"lit\";\r\nimport { property, query } from \"lit/decorators.js\";\r\nimport { ifDefined } from \"lit/directives/if-defined.js\";\r\n\r\nimport { AttachInternals, customElement, LinkButton, Role, setCustomState } from \"@m3e/web/core\";\r\n\r\nimport { M3eBreadcrumbItemButtonElement } from \"./BreadcrumbItemButtonElement\";\r\nimport { BreadcrumbItemCurrent } from \"./BreadcrumbItemCurrent\";\r\nimport { isIconOnly } from \"./isIconOnly\";\r\n\r\nimport \"./BreadcrumbItemButtonElement\";\r\n\r\n/**\r\n * An item in a breadcrumb.\r\n *\r\n * @description\r\n * The `m3e-breadcrumb-item` element represents a single item in a breadcrumb\r\n * navigation trail. It renders an internal button and supports navigation\r\n * attributes for link behavior.\r\n *\r\n * @tag m3e-breadcrumb-item\r\n *\r\n * @slot - Renders the content of the breadcrumb item.\r\n * @slot icon - Renders an icon before the item's label.\r\n *\r\n * @attr item-label - The accessible label used by the internal breadcrumb button.\r\n * @attr disabled - Whether the breadcrumb item is disabled.\r\n * @attr current - Marks the breadcrumb item as the current location in the trail.\r\n * @attr href - The URL to which the internal breadcrumb link button points.\r\n * @attr target - The target of the internal breadcrumb link button.\r\n * @attr download - A value indicating whether the internal link target will be downloaded, optionally specifying a file name.\r\n * @attr rel - The relationship between the internal link target and the document.\r\n *\r\n * @fires click - Dispatched when the element is clicked.\r\n *\r\n * @cssprop --m3e-breadcrumb-item-shape - Shape of the internal breadcrumb item button.\r\n * @cssprop --m3e-breadcrumb-item-container-height - Height of the internal breadcrumb item button container.\r\n * @cssprop --m3e-breadcrumb-item-icon-color - Color of breadcrumb item icon-only content.\r\n * @cssprop --m3e-breadcrumb-item-icon-padding-inline - Horizontal padding for icon-only breadcrumb items.\r\n * @cssprop --m3e-breadcrumb-item-icon-hover-state-layer-color - Hover state layer color for icon-only breadcrumb items.\r\n * @cssprop --m3e-breadcrumb-item-icon-focus-state-layer-color - Focus state layer color for icon-only breadcrumb items.\r\n * @cssprop --m3e-breadcrumb-item-icon-pressed-state-layer-color - Pressed state layer color for icon-only breadcrumb items.\r\n * @cssprop --m3e-breadcrumb-item-label-color - Color of breadcrumb item label content.\r\n * @cssprop --m3e-breadcrumb-item-label-font-size - Font size of breadcrumb item label content.\r\n * @cssprop --m3e-breadcrumb-item-label-font-weight - Font weight of breadcrumb item label content.\r\n * @cssprop --m3e-breadcrumb-item-label-line-height - Line height of breadcrumb item label content.\r\n * @cssprop --m3e-breadcrumb-item-label-tracking - Letter spacing of breadcrumb item label content.\r\n * @cssprop --m3e-breadcrumb-item-label-padding-inline - Horizontal padding for label breadcrumb items.\r\n * @cssprop --m3e-breadcrumb-item-label-hover-state-layer-color - Hover state layer color for label breadcrumb items.\r\n * @cssprop --m3e-breadcrumb-item-label-focus-state-layer-color - Focus state layer color for label breadcrumb items.\r\n * @cssprop --m3e-breadcrumb-item-label-pressed-state-layer-color - Pressed state layer color for label breadcrumb items.\r\n * @cssprop --m3e-breadcrumb-item-last-color - Color used for the current breadcrumb item.\r\n * @cssprop --m3e-breadcrumb-item-icon-label-space - Space between icon and label.\r\n * @cssprop --m3e-breadcrumb-item-icon-size - Size of the icon.\r\n * @cssprop --m3e-breadcrumb-item-disabled-color - Disabled color used by the breadcrumb item button.\r\n * @cssprop --m3e-breadcrumb-item-disabled-opacity - Disabled opacity used by the breadcrumb item button.\r\n */\r\n@customElement(\"m3e-breadcrumb-item\")\r\nexport class M3eBreadcrumbItemElement extends LinkButton(AttachInternals(Role(LitElement, \"listitem\")), true) {\r\n /** The styles of the element. */\r\n static override styles: CSSResultGroup = css`\r\n :host {\r\n display: block;\r\n }\r\n .base {\r\n display: flex;\r\n align-items: center;\r\n height: 100%;\r\n }\r\n :host(:not(:is(:state(--icon-only), :--icon-only))[current]),\r\n :host(:not(:is(:state(--icon-only), :--icon-only))[current]) .base {\r\n min-width: 0;\r\n }\r\n .button {\r\n flex: 1 1 auto;\r\n }\r\n .separator {\r\n flex: none;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n min-width: 0.5rem;\r\n --m3e-icon-size: var(--m3e-breadcrumb-separator-icon-size, 1.5rem);\r\n }\r\n .separator-icon {\r\n width: 1em;\r\n height: 1em;\r\n font-size: var(--m3e-icon-size);\r\n vertical-align: middle;\r\n }\r\n `;\r\n\r\n /** @private */ @query(\".button\") private readonly _button!: M3eBreadcrumbItemButtonElement;\r\n /** @private */ #defaultSeparator?: Element;\r\n\r\n /**\r\n * The accessible label given to the item's internal button.\r\n * @default \"\"\r\n */\r\n @property({ attribute: \"item-label\" }) itemLabel = \"\";\r\n\r\n /**\r\n * Whether the element is disabled.\r\n * @default false\r\n */\r\n @property({ type: Boolean, reflect: true }) disabled = false;\r\n\r\n /**\r\n * Indicates the current item in the breadcrumb path.\r\n * @default undefined\r\n */\r\n @property({ reflect: true }) current?: BreadcrumbItemCurrent;\r\n\r\n /** @inheritdoc */\r\n override focus(options?: FocusOptions): void {\r\n this._button?.focus(options);\r\n }\r\n\r\n /** @inheritdoc */\r\n override blur(): void {\r\n this._button?.blur();\r\n }\r\n\r\n /** @inheritdoc */\r\n override click(): void {\r\n this._button?.click();\r\n }\r\n\r\n /** @inheritdoc */\r\n protected override updated(_changedProperties: PropertyValues<this>): void {\r\n super.updated(_changedProperties);\r\n if (_changedProperties.has(\"current\")) {\r\n this.#updateIconFilled();\r\n }\r\n }\r\n\r\n /** @inheritdoc */\r\n protected override render(): unknown {\r\n return html`<div class=\"base\">\r\n <m3e-breadcrumb-item-button\r\n class=\"button\"\r\n aria-label=\"${ifDefined(this.itemLabel || undefined)}\"\r\n ?disabled=\"${this.disabled}\"\r\n current=\"${ifDefined(this.current)}\"\r\n href=\"${ifDefined(this.href || undefined)}\"\r\n target=\"${ifDefined(this.target || undefined)}\"\r\n download=\"${ifDefined(this.download || undefined)}\"\r\n rel=\"${ifDefined(this.rel || undefined)}\"\r\n >\r\n <slot name=\"icon\" slot=\"icon\" @slotchange=\"${this.#handleIconSlotChange}\"></slot>\r\n <slot @slotchange=\"${this.#handleSlotChange}\"></slot>\r\n </m3e-breadcrumb-item-button>\r\n ${this.#renderSeparator()}\r\n </div>`;\r\n }\r\n\r\n /** @private */\r\n #renderSeparator(): unknown {\r\n return this.current\r\n ? nothing\r\n : html`<div class=\"separator\" aria-hidden=\"true\">\r\n <svg class=\"separator-icon\" viewBox=\"0 -960 960 960\" fill=\"currentColor\">\r\n <path d=\"M504-480 320-664l56-56 240 240-240 240-56-56 184-184Z\" />\r\n </svg>\r\n </div>`;\r\n }\r\n\r\n /** @private */\r\n #handleIconSlotChange(): void {\r\n this.#updateIconFilled();\r\n }\r\n\r\n /** @private */\r\n #handleSlotChange(e: Event): void {\r\n setCustomState(this, \"--icon-only\", isIconOnly(e.target as HTMLSlotElement));\r\n this.#updateIconFilled();\r\n }\r\n\r\n /** @private */\r\n #updateIconFilled(): void {\r\n this.querySelectorAll(\"m3e-icon\").forEach((x) => (x.filled = this.current !== undefined && this.current !== null));\r\n }\r\n\r\n /** @internal */\r\n _setSeparator(nodes: Array<Node>) {\r\n const separator = this.shadowRoot?.querySelector(\".separator\");\r\n if (!separator) return;\r\n\r\n if (nodes.length > 0) {\r\n if (!this.#defaultSeparator && separator.firstElementChild) {\r\n this.#defaultSeparator = separator.firstElementChild;\r\n }\r\n separator.replaceChildren(...nodes);\r\n } else if (this.#defaultSeparator) {\r\n separator.replaceChildren(this.#defaultSeparator);\r\n this.#defaultSeparator = undefined;\r\n }\r\n }\r\n}\r\n\r\ndeclare global {\r\n interface HTMLElementTagNameMap {\r\n \"m3e-breadcrumb-item\": M3eBreadcrumbItemElement;\r\n }\r\n}\r\n"],"names":["M3eBreadcrumbElement","Role","LitElement","constructor","_M3eBreadcrumbElement_customSeparator","set","this","wrap","render","html","__classPrivateFieldGet","_M3eBreadcrumbElement_instances","_M3eBreadcrumbElement_handleSlotChange","_M3eBreadcrumbElement_handleSeparatorSlotChange","isIconOnly","slot","elements","assignedElements","flatten","length","rect","getBoundingClientRect","width","height","items","querySelectorAll","i","item","removeAttribute","hasAttribute","setAttribute","_M3eBreadcrumbElement_setSeparator","call","e","__classPrivateFieldSet","target","forEach","x","_setSeparator","map","clone","cloneNode","part","styles","css","__decorate","property","type","Boolean","reflect","prototype","customElement","M3eBreadcrumbItemButtonElement","KeyboardClick","LinkButton","Focusable","Disabled","AttachInternals","_M3eBreadcrumbItemButtonElement_clickHandler","connectedCallback","addEventListener","super","disconnectedCallback","removeEventListener","firstUpdated","_changedProperties","_focusRing","_stateLayer","_ripple","attach","update","changedProperties","has","ariaDisabled","disabled","current","role","ifDefined","nothing","renderPseudoLink","_M3eBreadcrumbItemButtonElement_instances","_M3eBreadcrumbItemButtonElement_handleSlotChange","setCustomState","href","preventDefault","DesignToken","shape","corner","full","density","calc","color","onSurfaceVariant","onSurface","primary","typescale","standard","label","large","fontSize","fontWeight","lineHeight","tracking","query","M3eBreadcrumbItemElement","_M3eBreadcrumbItemElement_defaultSeparator","itemLabel","focus","options","_button","blur","click","updated","_M3eBreadcrumbItemElement_instances","_M3eBreadcrumbItemElement_updateIconFilled","undefined","download","rel","_M3eBreadcrumbItemElement_handleIconSlotChange","_M3eBreadcrumbItemElement_handleSlotChange","_M3eBreadcrumbItemElement_renderSeparator","nodes","separator","shadowRoot","querySelector","firstElementChild","replaceChildren","filled","attribute"],"mappings":";;;;;meAkCO,IAAMA,EAAN,cAAmCC,EAAKC,EAAY,eAApDC,WAAAA,mCAkBWC,EAAAC,IAAAC,KAA8B,IAMFA,KAAAC,MAAO,CAwCrD,CArCqBC,MAAAA,GACjB,OAAOC,CAAI,oDACYC,EAAAJ,KAAIK,EAAA,IAAAC,kDACaF,EAAAJ,KAAIK,EAAA,IAAAE,mBAE9C,GCjEI,SAAUC,EAAWC,GACzB,MAAMC,EAAWD,EAAKE,iBAAiB,CAAEC,SAAS,IAClD,GAAwB,IAApBF,EA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
2265
 
2266
+ function space(unit) {
2267
+ return unsafeCSS(`var(--md-sys-measurement-space${unit}, ${0.5 * (unit / 100)}rem)`);
2268
+ }
2266
2269
  /** Design tokens that control measurements. */
2267
2270
  const MeasurementToken = {
2268
2271
  /** Zero spacing. */
2269
- space0: unsafeCSS("var(--md-sys-measurement-space0, 0rem)"),
2272
+ space0: space(0),
2270
2273
  /** 2dp spacing. */
2271
- space25: unsafeCSS("var(--md-sys-measurement-space25, 0.125rem)"),
2274
+ space25: space(25),
2272
2275
  /** 4dp spacing. */
2273
- space50: unsafeCSS("var(--md-sys-measurement-space50, 0.25rem)"),
2276
+ space50: space(50),
2274
2277
  /** 6dp spacing. */
2275
- space75: unsafeCSS("var(--md-sys-measurement-space75, 0.375rem)"),
2278
+ space75: space(75),
2276
2279
  /** 8dp spacing. */
2277
- space100: unsafeCSS("var(--md-sys-measurement-space100, 0.5rem)"),
2280
+ space100: space(100),
2281
+ /** 10dp spacing. */
2282
+ space125: space(125),
2278
2283
  /** 12dp spacing. */
2279
- space150: unsafeCSS("var(--md-sys-measurement-space150, 0.75rem)"),
2284
+ space150: space(150),
2285
+ /** 14dp spacing. */
2286
+ space175: space(175),
2280
2287
  /** 16dp spacing. */
2281
- space200: unsafeCSS("var(--md-sys-measurement-space200, 1rem)"),
2288
+ space200: space(200),
2282
2289
  /** 20dp spacing. */
2283
- space250: unsafeCSS("var(--md-sys-measurement-space250, 1.25rem)"),
2290
+ space250: space(250),
2291
+ /** 24dp spacing. */
2292
+ space300: space(300),
2284
2293
  /** 32dp spacing. */
2285
- space300: unsafeCSS("var(--md-sys-measurement-space300, 2rem)"),
2294
+ space400: space(400),
2295
+ /** 36dp spacing. */
2296
+ space450: space(450),
2286
2297
  /** 40dp spacing. */
2287
- space400: unsafeCSS("var(--md-sys-measurement-space400, 2.5rem)"),
2298
+ space500: space(500),
2288
2299
  /** 48dp spacing. */
2289
- space500: unsafeCSS("var(--md-sys-measurement-space500, 3rem)"),
2300
+ space600: space(600),
2290
2301
  /** 56dp spacing. */
2291
- space600: unsafeCSS("var(--md-sys-measurement-space600, 3.5rem)"),
2302
+ space700: space(700),
2292
2303
  /** 64dp spacing. */
2293
- space700: unsafeCSS("var(--md-sys-measurement-space700, 4rem)"),
2304
+ space800: space(800),
2294
2305
  /** 72dp spacing. */
2295
- space800: unsafeCSS("var(--md-sys-measurement-space800, 4.5rem)"),
2296
- /** 96dp spacing. */
2297
- space900: unsafeCSS("var(--md-sys-measurement-space900, 6rem)")
2306
+ space900: space(900)
2298
2307
  };
2299
2308
 
2300
2309
  const EasingToken = {
@@ -2417,7 +2426,7 @@ const ShapeToken = {
2417
2426
  /** Large rounded asymmetric shape directed towards the end. */
2418
2427
  largeEnd: unsafeCSS(`var(--md-sys-shape-corner-large-end, ${CornerValue.none} ${CornerValue.large} ${CornerValue.large} ${CornerValue.none})`),
2419
2428
  /** Large rounded asymmetric shape directed towards the start. */
2420
- largeStart: unsafeCSS(`var(--md-sys-shape-corner-large-end, ${CornerValue.large} ${CornerValue.none} ${CornerValue.none} ${CornerValue.large})`),
2429
+ largeStart: unsafeCSS(`var(--md-sys-shape-corner-large-start, ${CornerValue.large} ${CornerValue.none} ${CornerValue.none} ${CornerValue.large})`),
2421
2430
  /** Large rounded symmetric shape. */
2422
2431
  large: unsafeCSS(`var(--md-sys-shape-corner-large, ${CornerValue.large})`),
2423
2432
  /** Medium rounded symmetric shape. */
@@ -3584,13 +3593,8 @@ function LinkButton(base, disableClick = false) {
3584
3593
  }
3585
3594
  __LinkButtonMixin_handleLinkPointerDown = function __LinkButtonMixin_handleLinkPointerDown(e) {
3586
3595
  if (e.button !== 2) {
3596
+ // Preventing default cancel's link activation but will not cancel click.
3587
3597
  e.preventDefault();
3588
- e.stopImmediatePropagation();
3589
- this.dispatchEvent(new MouseEvent("click", {
3590
- bubbles: true,
3591
- cancelable: true,
3592
- view: window
3593
- }));
3594
3598
  } else {
3595
3599
  e.target.removeAttribute("aria-hidden");
3596
3600
  }