@nysds/nys-breadcrumbs 1.20.0 → 1.20.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/nys-breadcrumbs.js
CHANGED
|
@@ -6,13 +6,13 @@ import "@nysds/nys-icon";
|
|
|
6
6
|
* █ █ █ █▄▄▄█ ▀▀▀▄▄ █ █ ▀▀▀▄▄
|
|
7
7
|
* █ ▀█ █ █▄▄▄█ █▄▄▀ █▄▄▄█
|
|
8
8
|
*
|
|
9
|
-
* Breadcrumbs Component v1.20.
|
|
9
|
+
* Breadcrumbs Component v1.20.1
|
|
10
10
|
* Part of the New York State Design System
|
|
11
11
|
* Repository: https://github.com/its-hcd/nysds
|
|
12
12
|
* License: MIT
|
|
13
13
|
*/
|
|
14
14
|
/*!
|
|
15
|
-
* New York State Design System v1.20.
|
|
15
|
+
* New York State Design System v1.20.1
|
|
16
16
|
* Description: A design system for New York State's digital products.
|
|
17
17
|
* Repository: https://github.com/its-hcd/nysds
|
|
18
18
|
* License: MIT
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nys-breadcrumbs.js","sources":["../../internals/dist/index.js","../src/nys-breadcrumbs.ts"],"sourcesContent":["import { LitElement as u } from \"lit\";\n/*!\n * New York State Design System v1.20.0\n * Description: A design system for New York State's digital products.\n * Repository: https://github.com/its-hcd/nysds\n * License: MIT\n */\nlet y = 0;\nfunction f(e) {\n return `${e}-${Date.now()}-${y++}`;\n}\nconst p = {\n labelledby: \"ariaLabelledByElements\",\n describedby: \"ariaDescribedByElements\"\n}, A = {\n labelledby: \"ariaLabel\",\n describedby: \"ariaDescription\"\n};\nfunction R(e) {\n return \"ariaDescribedByElements\" in e;\n}\nfunction _(e) {\n return e === \"errormessage\" ? \"aria-errormessage\" : `aria-${e}`;\n}\nfunction d(e) {\n return e.filter((t) => !!t);\n}\nfunction E(e) {\n return e.map((t) => (t.id || (t.id = f(\"nys-ref\")), t.id));\n}\nfunction V(e, t, n) {\n const i = d(n), r = _(t);\n i.length ? e.setAttribute(r, E(i).join(\" \")) : e.removeAttribute(r);\n}\nfunction x(e, t, n, i, r) {\n const s = d(i), a = p[n], l = t;\n if (a && R(t)) {\n l[a] = s.length ? s : null;\n return;\n }\n const o = A[n];\n if (!o) return;\n const c = r ?? (s.length ? s.map((m) => m.textContent?.trim() ?? \"\").filter(Boolean).join(\" \") : \"\");\n o in l ? l[o] = c || null : c ? e.setAttribute(\n n === \"labelledby\" ? \"aria-label\" : \"aria-description\",\n c\n ) : e.removeAttribute(\n n === \"labelledby\" ? \"aria-label\" : \"aria-description\"\n );\n}\nconst g = {\n labelledby: \"ariaLabelledByElements\",\n describedby: \"ariaDescribedByElements\"\n}, C = {\n labelledby: \"aria-label\",\n describedby: \"aria-description\"\n};\nfunction L(e, t, n) {\n const i = d(n), r = g[t], s = C[t], a = e;\n if (r && r in e && (a[r] = i.length ? i : null), !s) return;\n const l = i.map((o) => o.textContent?.trim() ?? \"\").filter(Boolean).join(\" \");\n l ? e.setAttribute(s, l) : e.removeAttribute(s);\n}\nconst b = (e) => {\n class t extends e {\n get idPrefix() {\n return this.localName || \"nys-element\";\n }\n ensureId() {\n this.id || (this.id = f(this.idPrefix));\n }\n connectedCallback() {\n super.connectedCallback(), this.ensureId();\n }\n }\n return t;\n}, P = /* @__PURE__ */ b(u), h = (e) => {\n class t extends b(e) {\n constructor() {\n super(...arguments), this.__internals = null;\n }\n get internals() {\n if (this.__internals) return this.__internals;\n if (typeof this.attachInternals == \"function\")\n try {\n this.__internals = this.attachInternals();\n } catch {\n this.__internals = null;\n }\n return this.__internals;\n }\n get defaultRole() {\n return null;\n }\n setHostAria(i, r) {\n const s = this.internals;\n if (s && i in s) {\n s[i] = r;\n return;\n }\n const a = v(i);\n r === null ? this.removeAttribute(a) : this.setAttribute(a, r);\n }\n reflectDefaultSemantics() {\n const i = this.defaultRole;\n i && this.setHostAria(\"role\", i);\n }\n connectedCallback() {\n super.connectedCallback(), this.reflectDefaultSemantics();\n }\n }\n return t;\n};\nfunction v(e) {\n if (e === \"role\") return \"role\";\n const t = e.replace(/^aria/, \"\");\n return \"aria-\" + t.charAt(0).toLowerCase() + t.slice(1);\n}\nconst T = /* @__PURE__ */ h(u), I = (e) => {\n const n = class n extends h(e) {\n setFormValue(r) {\n this.internals?.setFormValue(r ?? null);\n }\n setValidityFromState(r, s, a) {\n const l = this.internals;\n if (!l) return;\n const o = Object.values(r).some(Boolean);\n o ? l.setValidity(r, s ?? \"Invalid value\", a) : l.setValidity({}), this.setHostAria(\"ariaInvalid\", o ? \"true\" : \"false\");\n }\n clearValidity() {\n this.internals?.setValidity({}), this.setHostAria(\"ariaInvalid\", \"false\");\n }\n checkValidity() {\n return this.internals?.checkValidity() ?? !0;\n }\n reportValidity() {\n return this.internals?.reportValidity() ?? !0;\n }\n formResetCallback() {\n this.clearValidity();\n }\n };\n n.formAssociated = !0;\n let t = n;\n return t;\n}, w = /* @__PURE__ */ I(u);\nfunction O(e) {\n const t = e.tagName.toLowerCase(), n = /* @__PURE__ */ new Set(), i = (r) => {\n r.querySelectorAll(\"*\").forEach((s) => {\n const a = s.tagName.toLowerCase();\n a.startsWith(\"nys-\") && a !== t && !customElements.get(a) && n.add(a), s.shadowRoot && i(s.shadowRoot);\n });\n };\n return e.shadowRoot && i(e.shadowRoot), i(e), [...n].sort();\n}\nexport {\n I as FormControlMixin,\n b as IdentifiedMixin,\n P as NysElement,\n w as NysFormControlElement,\n T as NysReflectsAriaElement,\n h as ReflectsAriaMixin,\n V as associateControl,\n L as associateControlRefs,\n x as associateHost,\n O as findUnregisteredChildren,\n f as generateId,\n R as supportsElementRefs\n};\n//# sourceMappingURL=index.js.map\n","import { html, unsafeCSS } from \"lit\";\nimport { property } from \"lit/decorators.js\";\nimport { NysElement } from \"@nysds/internals\";\n// This element is created imperatively (document.createElement) for the\n// back-to-parent arrow, the trailing chevrons, and the collapsed-trail\n// ellipsis, so it must be registered whenever nys-breadcrumbs is used.\n// Importing it here (intentional side effect) guarantees it always renders.\nimport \"@nysds/nys-icon\";\n// @ts-ignore: SCSS module imported via bundler as inline\nimport styles from \"./nys-breadcrumbs.scss?inline\";\n\n/**\n * A breadcrumb navigation trail composed of `li` elements.\n * Collapses when the trail exceeds 5 items on desktop or 3 items on mobile,\n * showing the first, last, and item before the current page, with an ellipsis to expand.\n * A single item renders as a back-to-parent link instead of a trail.\n *\n * @summary Breadcrumb navigation trail with responsive collapse support.\n * @element nys-breadcrumbs\n *\n * @slot - One or more `li` elements defining the trail.\n *\n * @fires nys-breadcrumbs-expand - Fired when the user clicks the ellipsis to expand the trail.\n *\n * @example Basic\n * ```html\n * <nys-breadcrumbs>\n * <ol>\n * <li><a href=\"/\">Home</a></li>\n * <li><a href=\"/services\">Services</a></li>\n * </ol>\n * </nys-breadcrumbs>\n * ```\n *\n * @example Current page\n * ```html\n * <nys-breadcrumbs>\n * <ol>\n * <li><a href=\"/\">Home</a></li>\n * <li><a href=\"/services\">Services</a></li>\n * <li>Current Page</li>\n * </ol>\n * </nys-breadcrumbs>\n * ```\n *\n * @example Single item list\n * ```html\n * <nys-breadcrumbs>\n * <ol>\n * <li><a href=\"/services\">Services</a></li>\n * </ol>\n * </nys-breadcrumbs>\n * ```\n *\n * @example Long list\n * ```html\n * <nys-breadcrumbs>\n * <ol>\n * <li><a href=\"/\">Home</a></li>\n * <li><a href=\"/government\">Government</a></li>\n * <li><a href=\"/government/agencies\">Agencies</a></li>\n * <li><a href=\"/government/agencies/parks\">Parks & Recreation</a></li>\n * <li><a href=\"/parks/state-parks\">State Parks</a></li>\n * <li><a href=\"/parks/state-parks/delaware\">Delaware Region</a></li>\n * <li><a href=\"/parks/state-parks/delaware/water-gap\">Delaware Water Gap</a></li>\n * <li>Trail Conditions</li>\n * </ol>\n * </nys-breadcrumbs>\n * ```\n *\n * @example Size small\n * ```html\n * <nys-breadcrumbs size=\"sm\">\n * <ol>\n * <li><a href=\"/\">Home</a></li>\n * <li><a href=\"/government\">Government</a></li>\n * <li><a href=\"/government/agencies\">Agencies</a></li>\n * <li>Parks & Recreation</li>\n * </ol>\n * </nys-breadcrumbs>\n * ```\n *\n * @example Back to parent (mobile)\n * ```html\n * <nys-breadcrumbs backToParent>\n * <ol>\n * <li><a href=\"/\">Home</a></li>\n * <li><a href=\"/government\">Government</a></li>\n * <li><a href=\"/government/agencies\">Agencies</a></li>\n * <li><a href=\"/government/agencies/parks\">Parks & Recreation</a></li>\n * <li><a href=\"/parks/state-parks\">State Parks</a></li>\n * <li><a href=\"/parks/state-parks/delaware\">Delaware Region</a></li>\n * <li><a href=\"/parks/state-parks/delaware/water-gap\">Delaware Water Gap</a></li>\n * <li>Trail Conditions</li>\n * </ol>\n * </nys-breadcrumbs>\n * ```\n *\n * @example Background bar\n * ```html\n * <nys-breadcrumbs backgroundBar>\n * <ol>\n * <li><a href=\"/\">Home</a></li>\n * <li><a href=\"/services\">Services</a></li>\n * <li><a href=\"/tickets\">Ticket System</a></li>\n * <li>Del Water Gap</li>\n * </ol>\n * </nys-breadcrumbs>\n * ```\n *\n * @example Disabled\n * ```html\n * <nys-breadcrumbs disabled>\n * <ol>\n * <li><a href=\"/\">Home</a></li>\n * <li><a href=\"/services\">Services</a></li>\n * <li><a href=\"/tickets\">Ticket System</a></li>\n * <li>Del Water Gap</li>\n * </ol>\n * </nys-breadcrumbs>\n * ```\n */\n\nexport class NysBreadcrumbs extends NysElement {\n static styles = unsafeCSS(styles);\n\n /**\n * Unique identifier. Auto-generated if not provided.\n */\n @property({ type: String, reflect: true }) id = \"\";\n\n /**\n * Accessible label for the `<nav>` landmark. Defaults to \"Breadcrumb\" if not set.\n * Override when multiple crumbs exist on the same page.\n */\n @property({ type: String }) ariaLabel = \"\";\n\n /**\n * Controls the visual size of the breadcrumb text and spacing: `sm` for dense layouts, `md` (default) for standard use.\n * @default \"md\"\n */\n @property({ type: String, reflect: true }) size: \"sm\" | \"md\" = \"md\";\n\n /**\n * On mobile, renders the trail as a single back-to-parent link pointing to the item before the current page.\n * Has no effect on desktop or when only one item is present (which always renders as a back link).\n * @default false\n */\n @property({ type: Boolean }) backToParent = false;\n\n /**\n * Forces the trail into its collapsed state.\n * It shows only the first item, an ellipsis, and the last two items.\n * The user can still expand the trail by clicking the ellipsis.\n * @default false\n */\n @property({ type: Boolean }) collapsed = false;\n\n /**\n * Renders a filled light theme background bar behind the breadcrumb trail.\n * @default false\n */\n @property({ type: Boolean }) backgroundBar = false;\n\n /**\n * Prevents interaction.\n * @default false\n */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n private _collapseThreshold = 5; // default for desktop\n private _manuallyExpanded = false;\n private _mediaQuery: MediaQueryList | null = null;\n\n /**\n * Lifecycle methods\n * --------------------------------------------------------------------------\n */\n\n constructor() {\n super();\n }\n\n connectedCallback() {\n // super.connectedCallback() (NysElement) auto-assigns an id when\n // one is not provided (prefix = localName, shape \"nys-breadcrumbs-<ts>-<n>\").\n // The breadcrumb's navigation role lives on the inner <nav> landmark (with an\n // accessible name), so defaultRole stays null and no host role is reflected.\n super.connectedCallback();\n\n this._mediaQuery = window.matchMedia(\"(max-width: 767px)\");\n this._mediaQuery.addEventListener(\"change\", this._updateCollapseThreshold);\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this._mediaQuery?.removeEventListener(\n \"change\",\n this._updateCollapseThreshold,\n );\n this._mediaQuery = null;\n }\n\n firstUpdated() {\n this._handleSlotChange();\n }\n\n updated(changedProperties: Map<string | number | symbol, unknown>) {\n if (\n changedProperties.has(\"collapsed\") ||\n changedProperties.has(\"backToParent\") ||\n changedProperties.has(\"disabled\")\n ) {\n this._handleSlotChange();\n }\n }\n\n /**\n * Functions\n * --------------------------------------------------------------------------\n */\n\n private _updateCollapseThreshold = () => {\n const isMobile = this._mediaQuery?.matches ?? window.innerWidth < 768; // NYSDS sets anything below 768px as mobile. Desktop and Tablet is above 768px.\n const newThreshold = isMobile ? 3 : 5;\n\n if (newThreshold !== this._collapseThreshold) {\n this._collapseThreshold = newThreshold;\n this._manuallyExpanded = false;\n this._handleSlotChange();\n }\n };\n\n private _getSlottedOl(): HTMLOListElement | null {\n const slot = this.shadowRoot?.querySelector(\n \"slot\",\n ) as HTMLSlotElement | null;\n const assigned = slot?.assignedElements({ flatten: true }) ?? [];\n return (\n (assigned.find((el) => el.tagName === \"OL\") as HTMLOListElement) ?? null\n );\n }\n\n private _getSlottedItems(): HTMLLIElement[] {\n const ol = this._getSlottedOl();\n if (!ol) return [];\n return Array.from(ol.children).filter(\n (el) => el.tagName === \"LI\",\n ) as HTMLLIElement[];\n }\n\n private _getAnchor(li: HTMLLIElement): HTMLAnchorElement | null {\n return li.querySelector(\"a\");\n }\n\n private _isCurrentPage(li: HTMLLIElement): boolean {\n const a = this._getAnchor(li);\n if (!a) return true;\n return false;\n }\n\n private _createBackToParentElement(li: HTMLLIElement) {\n const anchor = this._getAnchor(li);\n const link = anchor?.getAttribute(\"href\") ?? \"\";\n const label = anchor?.textContent?.trim() ?? li.textContent?.trim() ?? \"\";\n\n const liEL = document.createElement(\"li\");\n liEL.className = \"nys-breadcrumbitem\";\n\n const icon = document.createElement(\"nys-icon\");\n icon.setAttribute(\"name\", \"arrow_back\");\n icon.setAttribute(\"size\", \"16\");\n\n const a = document.createElement(\"a\");\n if (!this.disabled) {\n a.href = link;\n }\n a.textContent = label;\n if (this.disabled) {\n a.setAttribute(\"aria-disabled\", \"true\");\n }\n\n liEL.appendChild(icon);\n liEL.appendChild(a);\n\n return liEL;\n }\n\n private _createCrumbElement(li: HTMLLIElement, isCurrentPage: boolean) {\n const anchor = this._getAnchor(li);\n const link = anchor?.getAttribute(\"href\") ?? \"\";\n const label = anchor?.textContent?.trim() ?? li.textContent?.trim() ?? \"\";\n\n const liEl = document.createElement(\"li\");\n liEl.className = \"nys-breadcrumbitem\";\n\n if (isCurrentPage) {\n // WCAG 4.1.2 / WAI-ARIA breadcrumb pattern: the current page must be\n // programmatically identified so assistive tech announces \"current page\".\n liEl.setAttribute(\"aria-current\", \"page\");\n liEl.textContent = label;\n return liEl;\n }\n\n const a = document.createElement(\"a\");\n if (!this.disabled) {\n a.href = link;\n }\n a.textContent = label;\n if (this.disabled) {\n a.setAttribute(\"aria-disabled\", \"true\");\n }\n\n const icon = document.createElement(\"nys-icon\");\n icon.setAttribute(\"name\", \"chevron_right\");\n icon.setAttribute(\"size\", \"14\");\n\n liEl.appendChild(a);\n liEl.appendChild(icon);\n return liEl;\n }\n\n /**\n * Main logic for cloning and handling user slots.\n * New <ol>, <li>, and <a> tags are created and rendered out as crumbs for the breadcrumbs trail.\n */\n private _handleSlotChange() {\n const isMobile = this._mediaQuery?.matches ?? window.innerWidth < 768;\n const ol = this.shadowRoot?.getElementById(\"crumb-list\");\n if (!ol) return;\n\n const items = this._getSlottedItems();\n if (items.length === 0) return;\n\n ol.innerHTML = \"\";\n\n // ---------------------------------------------------------\n\n const setCrumbAsBackToParentBtn = (index = 0) => {\n const clone = items[index].cloneNode(true) as HTMLLIElement;\n\n const backToParentBtn = this._createBackToParentElement(clone);\n ol.appendChild(backToParentBtn);\n };\n\n // Single breadcrumb item OR backToParent=true for mobile - render as backToParent button\n if (items.length === 1) {\n setCrumbAsBackToParentBtn();\n return;\n }\n\n if (isMobile && this.backToParent) {\n const currentPageExist = this._isCurrentPage(items[items.length - 1]);\n\n if (currentPageExist) {\n setCrumbAsBackToParentBtn(items.length - 2);\n } else {\n setCrumbAsBackToParentBtn(items.length - 1);\n }\n return;\n }\n\n // ---------------------------------------------------------\n const shouldAutoCollapse =\n !this._manuallyExpanded && items.length > this._collapseThreshold;\n const collapseTrail = this.collapsed || shouldAutoCollapse;\n\n const lastItem = items[items.length - 1];\n const hasCurrentPage = this._isCurrentPage(lastItem);\n const itemsBeforeCollapse = Math.min(1, items.length - 1);\n const itemsAfterCollapse = Math.min(\n hasCurrentPage ? 2 : 1,\n items.length - itemsBeforeCollapse,\n );\n\n // Normal multi-item breadcrumb trail\n items.forEach((crumb, index) => {\n const crumbIsBeforeCollapse = index < itemsBeforeCollapse;\n const crumbIsAfterCollapse = index >= items.length - itemsAfterCollapse;\n const isAlwaysVisible = crumbIsBeforeCollapse || crumbIsAfterCollapse;\n const shouldHide = collapseTrail && !isAlwaysVisible; // Determines which of the crumbs is hidden\n\n const liEl = this._createCrumbElement(crumb, this._isCurrentPage(crumb));\n liEl.setAttribute(\"data-cloned\", \"true\");\n\n if (shouldHide) {\n liEl.classList.add(\"hide\");\n }\n\n if (!isAlwaysVisible) {\n // Assigning which crumb is an intermediate item (aka hidable) allows us to later redirect focus on the first of these intermediates.\n liEl.classList.add(\"intermediate\");\n }\n\n ol.appendChild(liEl);\n\n // Insert ellipsis before the first hidden cloned item when collapsed\n if (\n index === itemsBeforeCollapse - 1 &&\n collapseTrail &&\n items.length > 2\n ) {\n const ellipsis = document.createElement(\"li\");\n ellipsis.classList.add(\"nys-breadcrumbs__ellipsis\");\n\n // Ellipse button\n const button = document.createElement(\"a\");\n button.classList.add(\"ellipsis-btn\");\n button.setAttribute(\"aria-label\", \"Show more links\");\n button.setAttribute(\"role\", \"button\");\n button.setAttribute(\"href\", \"#\");\n button.textContent = \"…\";\n\n const expandTrail = (e: Event) => {\n e.preventDefault();\n this._manuallyExpanded = true;\n this.collapsed = false;\n this._handleSlotChange();\n this._dispatchExpandEvent();\n this._moveFocusToFirstExpandCrumb();\n };\n\n button.addEventListener(\"click\", expandTrail);\n button.addEventListener(\"keydown\", (e: KeyboardEvent) => {\n if (e.key === \" \") expandTrail(e);\n });\n\n // Chevron Icon\n const icon = document.createElement(\"nys-icon\");\n icon.setAttribute(\"name\", \"chevron_right\");\n icon.setAttribute(\"size\", \"14\");\n\n ellipsis.appendChild(button);\n ellipsis.appendChild(icon);\n ol.appendChild(ellipsis);\n }\n });\n }\n\n private _moveFocusToFirstExpandCrumb() {\n setTimeout(() => {\n const ol = this.shadowRoot?.getElementById(\"crumb-list\");\n const firstClone = ol?.querySelector(\"li[data-cloned].intermediate\");\n firstClone?.querySelector<HTMLAnchorElement>(\"a\")?.focus();\n }, 0);\n }\n\n /**\n * Event Handlers\n * --------------------------------------------------------------------------\n */\n private _dispatchExpandEvent() {\n this.dispatchEvent(\n new CustomEvent(\"nys-expand\", {\n detail: { id: this.id },\n bubbles: true,\n composed: true,\n }),\n );\n }\n\n render() {\n return html`<nav\n class=\"nys-breadcrumbs ${this.backgroundBar\n ? \"nys-breadcrumbs--background-bar\"\n : \"\"}\"\n aria-label=${this.ariaLabel || \"Breadcrumb\"}\n >\n <ol id=\"crumb-list\"></ol>\n <slot style=\"display: none;\" @slotchange=${this._handleSlotChange}></slot>\n </nav>`;\n }\n}\n\nif (!customElements.get(\"nys-breadcrumbs\")) {\n customElements.define(\"nys-breadcrumbs\", NysBreadcrumbs);\n}\n"],"names":["LitElement","unsafeCSS","html","property","y","f","e","b","t","P","u","_NysBreadcrumbs","NysElement","newThreshold","changedProperties","el","ol","li","anchor","link","label","liEL","icon","a","isCurrentPage","liEl","isMobile","items","setCrumbAsBackToParentBtn","index","clone","backToParentBtn","currentPageExist","shouldAutoCollapse","collapseTrail","lastItem","hasCurrentPage","itemsBeforeCollapse","itemsAfterCollapse","crumb","crumbIsBeforeCollapse","crumbIsAfterCollapse","isAlwaysVisible","shouldHide","ellipsis","button","expandTrail","styles","NysBreadcrumbs","__decorateClass"],"mappings":"AACA,SAAA,cAAAA,GAAA,aAAAC,GAAA,QAAAC,SAAA;AAAA,SAAA,YAAAC,SAAA;AAAA,OAAA;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMA,IAAIC,IAAI;AACR,SAASC,EAAEC,GAAG;AACZ,SAAO,GAAGA,CAAC,IAAI,KAAK,KAAK,IAAIF,GAAG;AAClC;AAqDK,MAACG,IAAI,CAACD,MAAM;AAAA,EACf,MAAME,UAAUF,EAAE;AAAA,IAChB,IAAI,WAAW;AACb,aAAO,KAAK,aAAa;AAAA,IAC3B;AAAA,IACA,WAAW;AACT,WAAK,OAAO,KAAK,KAAKD,EAAE,KAAK,QAAQ;A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AS,EAAE,MAAM,QAAA,CAAS;AAAA,GAvChB6C,EAuCkB,WAAA,eAAA;AAMeC,EAAA;AAAA,EAA3C9C,EAAS,EAAE,MAAM,SAAS,SAAS,IAAM;AAAA,GA7C/B6C,EA6CiC,WAAA,UAAA;AAkTzC,eAAe,IAAI,iBAAiB,KACvC,eAAe,OAAO,mBAAmBA,CAAc;"}
|
|
1
|
+
{"version":3,"file":"nys-breadcrumbs.js","sources":["../../internals/dist/index.js","../src/nys-breadcrumbs.ts"],"sourcesContent":["import { LitElement as u } from \"lit\";\n/*!\n * New York State Design System v1.20.1\n * Description: A design system for New York State's digital products.\n * Repository: https://github.com/its-hcd/nysds\n * License: MIT\n */\nlet y = 0;\nfunction f(e) {\n return `${e}-${Date.now()}-${y++}`;\n}\nconst p = {\n labelledby: \"ariaLabelledByElements\",\n describedby: \"ariaDescribedByElements\"\n}, A = {\n labelledby: \"ariaLabel\",\n describedby: \"ariaDescription\"\n};\nfunction R(e) {\n return \"ariaDescribedByElements\" in e;\n}\nfunction _(e) {\n return e === \"errormessage\" ? \"aria-errormessage\" : `aria-${e}`;\n}\nfunction d(e) {\n return e.filter((t) => !!t);\n}\nfunction E(e) {\n return e.map((t) => (t.id || (t.id = f(\"nys-ref\")), t.id));\n}\nfunction V(e, t, n) {\n const i = d(n), r = _(t);\n i.length ? e.setAttribute(r, E(i).join(\" \")) : e.removeAttribute(r);\n}\nfunction x(e, t, n, i, r) {\n const s = d(i), a = p[n], l = t;\n if (a && R(t)) {\n l[a] = s.length ? s : null;\n return;\n }\n const o = A[n];\n if (!o) return;\n const c = r ?? (s.length ? s.map((m) => m.textContent?.trim() ?? \"\").filter(Boolean).join(\" \") : \"\");\n o in l ? l[o] = c || null : c ? e.setAttribute(\n n === \"labelledby\" ? \"aria-label\" : \"aria-description\",\n c\n ) : e.removeAttribute(\n n === \"labelledby\" ? \"aria-label\" : \"aria-description\"\n );\n}\nconst g = {\n labelledby: \"ariaLabelledByElements\",\n describedby: \"ariaDescribedByElements\"\n}, C = {\n labelledby: \"aria-label\",\n describedby: \"aria-description\"\n};\nfunction L(e, t, n) {\n const i = d(n), r = g[t], s = C[t], a = e;\n if (r && r in e && (a[r] = i.length ? i : null), !s) return;\n const l = i.map((o) => o.textContent?.trim() ?? \"\").filter(Boolean).join(\" \");\n l ? e.setAttribute(s, l) : e.removeAttribute(s);\n}\nconst b = (e) => {\n class t extends e {\n get idPrefix() {\n return this.localName || \"nys-element\";\n }\n ensureId() {\n this.id || (this.id = f(this.idPrefix));\n }\n connectedCallback() {\n super.connectedCallback(), this.ensureId();\n }\n }\n return t;\n}, P = /* @__PURE__ */ b(u), h = (e) => {\n class t extends b(e) {\n constructor() {\n super(...arguments), this.__internals = null;\n }\n get internals() {\n if (this.__internals) return this.__internals;\n if (typeof this.attachInternals == \"function\")\n try {\n this.__internals = this.attachInternals();\n } catch {\n this.__internals = null;\n }\n return this.__internals;\n }\n get defaultRole() {\n return null;\n }\n setHostAria(i, r) {\n const s = this.internals;\n if (s && i in s) {\n s[i] = r;\n return;\n }\n const a = v(i);\n r === null ? this.removeAttribute(a) : this.setAttribute(a, r);\n }\n reflectDefaultSemantics() {\n const i = this.defaultRole;\n i && this.setHostAria(\"role\", i);\n }\n connectedCallback() {\n super.connectedCallback(), this.reflectDefaultSemantics();\n }\n }\n return t;\n};\nfunction v(e) {\n if (e === \"role\") return \"role\";\n const t = e.replace(/^aria/, \"\");\n return \"aria-\" + t.charAt(0).toLowerCase() + t.slice(1);\n}\nconst T = /* @__PURE__ */ h(u), I = (e) => {\n const n = class n extends h(e) {\n setFormValue(r) {\n this.internals?.setFormValue(r ?? null);\n }\n setValidityFromState(r, s, a) {\n const l = this.internals;\n if (!l) return;\n const o = Object.values(r).some(Boolean);\n o ? l.setValidity(r, s ?? \"Invalid value\", a) : l.setValidity({}), this.setHostAria(\"ariaInvalid\", o ? \"true\" : \"false\");\n }\n clearValidity() {\n this.internals?.setValidity({}), this.setHostAria(\"ariaInvalid\", \"false\");\n }\n checkValidity() {\n return this.internals?.checkValidity() ?? !0;\n }\n reportValidity() {\n return this.internals?.reportValidity() ?? !0;\n }\n formResetCallback() {\n this.clearValidity();\n }\n };\n n.formAssociated = !0;\n let t = n;\n return t;\n}, w = /* @__PURE__ */ I(u);\nfunction O(e) {\n const t = e.tagName.toLowerCase(), n = /* @__PURE__ */ new Set(), i = (r) => {\n r.querySelectorAll(\"*\").forEach((s) => {\n const a = s.tagName.toLowerCase();\n a.startsWith(\"nys-\") && a !== t && !customElements.get(a) && n.add(a), s.shadowRoot && i(s.shadowRoot);\n });\n };\n return e.shadowRoot && i(e.shadowRoot), i(e), [...n].sort();\n}\nexport {\n I as FormControlMixin,\n b as IdentifiedMixin,\n P as NysElement,\n w as NysFormControlElement,\n T as NysReflectsAriaElement,\n h as ReflectsAriaMixin,\n V as associateControl,\n L as associateControlRefs,\n x as associateHost,\n O as findUnregisteredChildren,\n f as generateId,\n R as supportsElementRefs\n};\n//# sourceMappingURL=index.js.map\n","import { html, unsafeCSS } from \"lit\";\nimport { property } from \"lit/decorators.js\";\nimport { NysElement } from \"@nysds/internals\";\n// This element is created imperatively (document.createElement) for the\n// back-to-parent arrow, the trailing chevrons, and the collapsed-trail\n// ellipsis, so it must be registered whenever nys-breadcrumbs is used.\n// Importing it here (intentional side effect) guarantees it always renders.\nimport \"@nysds/nys-icon\";\n// @ts-ignore: SCSS module imported via bundler as inline\nimport styles from \"./nys-breadcrumbs.scss?inline\";\n\n/**\n * A breadcrumb navigation trail composed of `li` elements.\n * Collapses when the trail exceeds 5 items on desktop or 3 items on mobile,\n * showing the first, last, and item before the current page, with an ellipsis to expand.\n * A single item renders as a back-to-parent link instead of a trail.\n *\n * @summary Breadcrumb navigation trail with responsive collapse support.\n * @element nys-breadcrumbs\n *\n * @slot - One or more `li` elements defining the trail.\n *\n * @fires nys-breadcrumbs-expand - Fired when the user clicks the ellipsis to expand the trail.\n *\n * @example Basic\n * ```html\n * <nys-breadcrumbs>\n * <ol>\n * <li><a href=\"/\">Home</a></li>\n * <li><a href=\"/services\">Services</a></li>\n * </ol>\n * </nys-breadcrumbs>\n * ```\n *\n * @example Current page\n * ```html\n * <nys-breadcrumbs>\n * <ol>\n * <li><a href=\"/\">Home</a></li>\n * <li><a href=\"/services\">Services</a></li>\n * <li>Current Page</li>\n * </ol>\n * </nys-breadcrumbs>\n * ```\n *\n * @example Single item list\n * ```html\n * <nys-breadcrumbs>\n * <ol>\n * <li><a href=\"/services\">Services</a></li>\n * </ol>\n * </nys-breadcrumbs>\n * ```\n *\n * @example Long list\n * ```html\n * <nys-breadcrumbs>\n * <ol>\n * <li><a href=\"/\">Home</a></li>\n * <li><a href=\"/government\">Government</a></li>\n * <li><a href=\"/government/agencies\">Agencies</a></li>\n * <li><a href=\"/government/agencies/parks\">Parks & Recreation</a></li>\n * <li><a href=\"/parks/state-parks\">State Parks</a></li>\n * <li><a href=\"/parks/state-parks/delaware\">Delaware Region</a></li>\n * <li><a href=\"/parks/state-parks/delaware/water-gap\">Delaware Water Gap</a></li>\n * <li>Trail Conditions</li>\n * </ol>\n * </nys-breadcrumbs>\n * ```\n *\n * @example Size small\n * ```html\n * <nys-breadcrumbs size=\"sm\">\n * <ol>\n * <li><a href=\"/\">Home</a></li>\n * <li><a href=\"/government\">Government</a></li>\n * <li><a href=\"/government/agencies\">Agencies</a></li>\n * <li>Parks & Recreation</li>\n * </ol>\n * </nys-breadcrumbs>\n * ```\n *\n * @example Back to parent (mobile)\n * ```html\n * <nys-breadcrumbs backToParent>\n * <ol>\n * <li><a href=\"/\">Home</a></li>\n * <li><a href=\"/government\">Government</a></li>\n * <li><a href=\"/government/agencies\">Agencies</a></li>\n * <li><a href=\"/government/agencies/parks\">Parks & Recreation</a></li>\n * <li><a href=\"/parks/state-parks\">State Parks</a></li>\n * <li><a href=\"/parks/state-parks/delaware\">Delaware Region</a></li>\n * <li><a href=\"/parks/state-parks/delaware/water-gap\">Delaware Water Gap</a></li>\n * <li>Trail Conditions</li>\n * </ol>\n * </nys-breadcrumbs>\n * ```\n *\n * @example Background bar\n * ```html\n * <nys-breadcrumbs backgroundBar>\n * <ol>\n * <li><a href=\"/\">Home</a></li>\n * <li><a href=\"/services\">Services</a></li>\n * <li><a href=\"/tickets\">Ticket System</a></li>\n * <li>Del Water Gap</li>\n * </ol>\n * </nys-breadcrumbs>\n * ```\n *\n * @example Disabled\n * ```html\n * <nys-breadcrumbs disabled>\n * <ol>\n * <li><a href=\"/\">Home</a></li>\n * <li><a href=\"/services\">Services</a></li>\n * <li><a href=\"/tickets\">Ticket System</a></li>\n * <li>Del Water Gap</li>\n * </ol>\n * </nys-breadcrumbs>\n * ```\n */\n\nexport class NysBreadcrumbs extends NysElement {\n static styles = unsafeCSS(styles);\n\n /**\n * Unique identifier. Auto-generated if not provided.\n */\n @property({ type: String, reflect: true }) id = \"\";\n\n /**\n * Accessible label for the `<nav>` landmark. Defaults to \"Breadcrumb\" if not set.\n * Override when multiple crumbs exist on the same page.\n */\n @property({ type: String }) ariaLabel = \"\";\n\n /**\n * Controls the visual size of the breadcrumb text and spacing: `sm` for dense layouts, `md` (default) for standard use.\n * @default \"md\"\n */\n @property({ type: String, reflect: true }) size: \"sm\" | \"md\" = \"md\";\n\n /**\n * On mobile, renders the trail as a single back-to-parent link pointing to the item before the current page.\n * Has no effect on desktop or when only one item is present (which always renders as a back link).\n * @default false\n */\n @property({ type: Boolean }) backToParent = false;\n\n /**\n * Forces the trail into its collapsed state.\n * It shows only the first item, an ellipsis, and the last two items.\n * The user can still expand the trail by clicking the ellipsis.\n * @default false\n */\n @property({ type: Boolean }) collapsed = false;\n\n /**\n * Renders a filled light theme background bar behind the breadcrumb trail.\n * @default false\n */\n @property({ type: Boolean }) backgroundBar = false;\n\n /**\n * Prevents interaction.\n * @default false\n */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n private _collapseThreshold = 5; // default for desktop\n private _manuallyExpanded = false;\n private _mediaQuery: MediaQueryList | null = null;\n\n /**\n * Lifecycle methods\n * --------------------------------------------------------------------------\n */\n\n constructor() {\n super();\n }\n\n connectedCallback() {\n // super.connectedCallback() (NysElement) auto-assigns an id when\n // one is not provided (prefix = localName, shape \"nys-breadcrumbs-<ts>-<n>\").\n // The breadcrumb's navigation role lives on the inner <nav> landmark (with an\n // accessible name), so defaultRole stays null and no host role is reflected.\n super.connectedCallback();\n\n this._mediaQuery = window.matchMedia(\"(max-width: 767px)\");\n this._mediaQuery.addEventListener(\"change\", this._updateCollapseThreshold);\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this._mediaQuery?.removeEventListener(\n \"change\",\n this._updateCollapseThreshold,\n );\n this._mediaQuery = null;\n }\n\n firstUpdated() {\n this._handleSlotChange();\n }\n\n updated(changedProperties: Map<string | number | symbol, unknown>) {\n if (\n changedProperties.has(\"collapsed\") ||\n changedProperties.has(\"backToParent\") ||\n changedProperties.has(\"disabled\")\n ) {\n this._handleSlotChange();\n }\n }\n\n /**\n * Functions\n * --------------------------------------------------------------------------\n */\n\n private _updateCollapseThreshold = () => {\n const isMobile = this._mediaQuery?.matches ?? window.innerWidth < 768; // NYSDS sets anything below 768px as mobile. Desktop and Tablet is above 768px.\n const newThreshold = isMobile ? 3 : 5;\n\n if (newThreshold !== this._collapseThreshold) {\n this._collapseThreshold = newThreshold;\n this._manuallyExpanded = false;\n this._handleSlotChange();\n }\n };\n\n private _getSlottedOl(): HTMLOListElement | null {\n const slot = this.shadowRoot?.querySelector(\n \"slot\",\n ) as HTMLSlotElement | null;\n const assigned = slot?.assignedElements({ flatten: true }) ?? [];\n return (\n (assigned.find((el) => el.tagName === \"OL\") as HTMLOListElement) ?? null\n );\n }\n\n private _getSlottedItems(): HTMLLIElement[] {\n const ol = this._getSlottedOl();\n if (!ol) return [];\n return Array.from(ol.children).filter(\n (el) => el.tagName === \"LI\",\n ) as HTMLLIElement[];\n }\n\n private _getAnchor(li: HTMLLIElement): HTMLAnchorElement | null {\n return li.querySelector(\"a\");\n }\n\n private _isCurrentPage(li: HTMLLIElement): boolean {\n const a = this._getAnchor(li);\n if (!a) return true;\n return false;\n }\n\n private _createBackToParentElement(li: HTMLLIElement) {\n const anchor = this._getAnchor(li);\n const link = anchor?.getAttribute(\"href\") ?? \"\";\n const label = anchor?.textContent?.trim() ?? li.textContent?.trim() ?? \"\";\n\n const liEL = document.createElement(\"li\");\n liEL.className = \"nys-breadcrumbitem\";\n\n const icon = document.createElement(\"nys-icon\");\n icon.setAttribute(\"name\", \"arrow_back\");\n icon.setAttribute(\"size\", \"16\");\n\n const a = document.createElement(\"a\");\n if (!this.disabled) {\n a.href = link;\n }\n a.textContent = label;\n if (this.disabled) {\n a.setAttribute(\"aria-disabled\", \"true\");\n }\n\n liEL.appendChild(icon);\n liEL.appendChild(a);\n\n return liEL;\n }\n\n private _createCrumbElement(li: HTMLLIElement, isCurrentPage: boolean) {\n const anchor = this._getAnchor(li);\n const link = anchor?.getAttribute(\"href\") ?? \"\";\n const label = anchor?.textContent?.trim() ?? li.textContent?.trim() ?? \"\";\n\n const liEl = document.createElement(\"li\");\n liEl.className = \"nys-breadcrumbitem\";\n\n if (isCurrentPage) {\n // WCAG 4.1.2 / WAI-ARIA breadcrumb pattern: the current page must be\n // programmatically identified so assistive tech announces \"current page\".\n liEl.setAttribute(\"aria-current\", \"page\");\n liEl.textContent = label;\n return liEl;\n }\n\n const a = document.createElement(\"a\");\n if (!this.disabled) {\n a.href = link;\n }\n a.textContent = label;\n if (this.disabled) {\n a.setAttribute(\"aria-disabled\", \"true\");\n }\n\n const icon = document.createElement(\"nys-icon\");\n icon.setAttribute(\"name\", \"chevron_right\");\n icon.setAttribute(\"size\", \"14\");\n\n liEl.appendChild(a);\n liEl.appendChild(icon);\n return liEl;\n }\n\n /**\n * Main logic for cloning and handling user slots.\n * New <ol>, <li>, and <a> tags are created and rendered out as crumbs for the breadcrumbs trail.\n */\n private _handleSlotChange() {\n const isMobile = this._mediaQuery?.matches ?? window.innerWidth < 768;\n const ol = this.shadowRoot?.getElementById(\"crumb-list\");\n if (!ol) return;\n\n const items = this._getSlottedItems();\n if (items.length === 0) return;\n\n ol.innerHTML = \"\";\n\n // ---------------------------------------------------------\n\n const setCrumbAsBackToParentBtn = (index = 0) => {\n const clone = items[index].cloneNode(true) as HTMLLIElement;\n\n const backToParentBtn = this._createBackToParentElement(clone);\n ol.appendChild(backToParentBtn);\n };\n\n // Single breadcrumb item OR backToParent=true for mobile - render as backToParent button\n if (items.length === 1) {\n setCrumbAsBackToParentBtn();\n return;\n }\n\n if (isMobile && this.backToParent) {\n const currentPageExist = this._isCurrentPage(items[items.length - 1]);\n\n if (currentPageExist) {\n setCrumbAsBackToParentBtn(items.length - 2);\n } else {\n setCrumbAsBackToParentBtn(items.length - 1);\n }\n return;\n }\n\n // ---------------------------------------------------------\n const shouldAutoCollapse =\n !this._manuallyExpanded && items.length > this._collapseThreshold;\n const collapseTrail = this.collapsed || shouldAutoCollapse;\n\n const lastItem = items[items.length - 1];\n const hasCurrentPage = this._isCurrentPage(lastItem);\n const itemsBeforeCollapse = Math.min(1, items.length - 1);\n const itemsAfterCollapse = Math.min(\n hasCurrentPage ? 2 : 1,\n items.length - itemsBeforeCollapse,\n );\n\n // Normal multi-item breadcrumb trail\n items.forEach((crumb, index) => {\n const crumbIsBeforeCollapse = index < itemsBeforeCollapse;\n const crumbIsAfterCollapse = index >= items.length - itemsAfterCollapse;\n const isAlwaysVisible = crumbIsBeforeCollapse || crumbIsAfterCollapse;\n const shouldHide = collapseTrail && !isAlwaysVisible; // Determines which of the crumbs is hidden\n\n const liEl = this._createCrumbElement(crumb, this._isCurrentPage(crumb));\n liEl.setAttribute(\"data-cloned\", \"true\");\n\n if (shouldHide) {\n liEl.classList.add(\"hide\");\n }\n\n if (!isAlwaysVisible) {\n // Assigning which crumb is an intermediate item (aka hidable) allows us to later redirect focus on the first of these intermediates.\n liEl.classList.add(\"intermediate\");\n }\n\n ol.appendChild(liEl);\n\n // Insert ellipsis before the first hidden cloned item when collapsed\n if (\n index === itemsBeforeCollapse - 1 &&\n collapseTrail &&\n items.length > 2\n ) {\n const ellipsis = document.createElement(\"li\");\n ellipsis.classList.add(\"nys-breadcrumbs__ellipsis\");\n\n // Ellipse button\n const button = document.createElement(\"a\");\n button.classList.add(\"ellipsis-btn\");\n button.setAttribute(\"aria-label\", \"Show more links\");\n button.setAttribute(\"role\", \"button\");\n button.setAttribute(\"href\", \"#\");\n button.textContent = \"…\";\n\n const expandTrail = (e: Event) => {\n e.preventDefault();\n this._manuallyExpanded = true;\n this.collapsed = false;\n this._handleSlotChange();\n this._dispatchExpandEvent();\n this._moveFocusToFirstExpandCrumb();\n };\n\n button.addEventListener(\"click\", expandTrail);\n button.addEventListener(\"keydown\", (e: KeyboardEvent) => {\n if (e.key === \" \") expandTrail(e);\n });\n\n // Chevron Icon\n const icon = document.createElement(\"nys-icon\");\n icon.setAttribute(\"name\", \"chevron_right\");\n icon.setAttribute(\"size\", \"14\");\n\n ellipsis.appendChild(button);\n ellipsis.appendChild(icon);\n ol.appendChild(ellipsis);\n }\n });\n }\n\n private _moveFocusToFirstExpandCrumb() {\n setTimeout(() => {\n const ol = this.shadowRoot?.getElementById(\"crumb-list\");\n const firstClone = ol?.querySelector(\"li[data-cloned].intermediate\");\n firstClone?.querySelector<HTMLAnchorElement>(\"a\")?.focus();\n }, 0);\n }\n\n /**\n * Event Handlers\n * --------------------------------------------------------------------------\n */\n private _dispatchExpandEvent() {\n this.dispatchEvent(\n new CustomEvent(\"nys-expand\", {\n detail: { id: this.id },\n bubbles: true,\n composed: true,\n }),\n );\n }\n\n render() {\n return html`<nav\n class=\"nys-breadcrumbs ${this.backgroundBar\n ? \"nys-breadcrumbs--background-bar\"\n : \"\"}\"\n aria-label=${this.ariaLabel || \"Breadcrumb\"}\n >\n <ol id=\"crumb-list\"></ol>\n <slot style=\"display: none;\" @slotchange=${this._handleSlotChange}></slot>\n </nav>`;\n }\n}\n\nif (!customElements.get(\"nys-breadcrumbs\")) {\n customElements.define(\"nys-breadcrumbs\", NysBreadcrumbs);\n}\n"],"names":["LitElement","unsafeCSS","html","property","y","f","e","b","t","P","u","_NysBreadcrumbs","NysElement","newThreshold","changedProperties","el","ol","li","anchor","link","label","liEL","icon","a","isCurrentPage","liEl","isMobile","items","setCrumbAsBackToParentBtn","index","clone","backToParentBtn","currentPageExist","shouldAutoCollapse","collapseTrail","lastItem","hasCurrentPage","itemsBeforeCollapse","itemsAfterCollapse","crumb","crumbIsBeforeCollapse","crumbIsAfterCollapse","isAlwaysVisible","shouldHide","ellipsis","button","expandTrail","styles","NysBreadcrumbs","__decorateClass"],"mappings":"AACA,SAAA,cAAAA,GAAA,aAAAC,GAAA,QAAAC,SAAA;AAAA,SAAA,YAAAC,SAAA;AAAA,OAAA;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMA,IAAIC,IAAI;AACR,SAASC,EAAEC,GAAG;AACZ,SAAO,GAAGA,CAAC,IAAI,KAAK,KAAK,IAAIF,GAAG;AAClC;AAqDK,MAACG,IAAI,CAACD,MAAM;AAAA,EACf,MAAME,UAAUF,EAAE;AAAA,IAChB,IAAI,WAAW;AACb,aAAO,KAAK,aAAa;AAAA,IAC3B;AAAA,IACA,WAAW;AACT,WAAK,OAAO,KAAK,KAAKD,EAAE,KAAK,QAAQ;AAAA,IACvC;AAAA,IACA,oBAAoB;AAClB,YAAM,kBAAiB,GAAI,KAAK,SAAQ;AAAA,IAC1C;AAAA,EACJ;AACE,SAAOG;AACT,GAAGC,IAAoB,gBAAAF,EAAEG,CAAC;;;;;;AC+CnB,MAAMC,IAAN,MAAMA,UAAuBC,EAAW;AAAA;AAAA;AAAA;AAAA;AAAA,EAwD7C,cAAc;AACZ,UAAA,GAnDyC,KAAA,KAAK,IAMpB,KAAA,YAAY,IAMG,KAAA,OAAoB,MAOlC,KAAA,eAAe,IAQf,KAAA,YAAY,IAMZ,KAAA,gBAAgB,IAMD,KAAA,WAAW,IAEvD,KAAQ,qBAAqB,GAC7B,KAAQ,oBAAoB,IAC5B,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UAAU;AAAA,MAAA,CACX;AAAA,IAAA;AAAA,EAEL;AAAA,EAEA,SAAS;AACP,WAAO1C;AAAA,+BACoB,KAAK,gBAC1B,oCACA,EAAE;AAAA,mBACO,KAAK,aAAa,YAAY;AAAA;AAAA;AAAA,iDAGA,KAAK,iBAAiB;AAAA;AAAA,EAErE;AACF;AA5VES,EAAO,SAASV,EAAU8C,CAAM;AAD3B,IAAMC,IAANrC;AAMsCsC,EAAA;AAAA,EAA1C9C,EAAS,EAAE,MAAM,QAAQ,SAAS,IAAM;AAAA,GAN9B6C,EAMgC,WAAA,IAAA;AAMfC,EAAA;AAAA,EAA3B9C,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GAZf6C,EAYiB,WAAA,WAAA;AAMeC,EAAA;AAAA,EAA1C9C,EAAS,EAAE,MAAM,QAAQ,SAAS,IAAM;AAAA,GAlB9B6C,EAkBgC,WAAA,MAAA;AAOdC,EAAA;AAAA,EAA5B9C,EAAS,EAAE,MAAM,QAAA,CAAS;AAAA,GAzBhB6C,EAyBkB,WAAA,cAAA;AAQAC,EAAA;AAAA,EAA5B9C,EAAS,EAAE,MAAM,QAAA,CAAS;AAAA,GAjChB6C,EAiCkB,WAAA,WAAA;AAMAC,EAAA;AAAA,EAA5B9C,EAAS,EAAE,MAAM,QAAA,CAAS;AAAA,GAvChB6C,EAuCkB,WAAA,eAAA;AAMeC,EAAA;AAAA,EAA3C9C,EAAS,EAAE,MAAM,SAAS,SAAS,IAAM;AAAA,GA7C/B6C,EA6CiC,WAAA,UAAA;AAkTzC,eAAe,IAAI,iBAAiB,KACvC,eAAe,OAAO,mBAAmBA,CAAc;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nysds/nys-breadcrumbs",
|
|
3
|
-
"version": "1.20.
|
|
3
|
+
"version": "1.20.1",
|
|
4
4
|
"description": "The Breadcrumbs component from the NYS Design System.",
|
|
5
5
|
"module": "dist/nys-breadcrumbs.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
"lit-analyze": "lit-analyzer 'src/**/*.ts'"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@nysds/nys-icon": "^1.20.
|
|
26
|
+
"@nysds/nys-icon": "^1.20.1"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@nysds/internals": "^1.20.
|
|
29
|
+
"@nysds/internals": "^1.20.1",
|
|
30
30
|
"lit": "^3.3.1",
|
|
31
31
|
"typescript": "^5.9.3",
|
|
32
32
|
"vite": "^7.3.1"
|