@xplortech/apollo-core 2.9.0 → 2.10.0
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/.typings/apollo-components.html-data.json +20 -12
- package/build/style.css +2086 -1875
- package/dist/apollo-core/apollo-core.css +20 -18
- package/dist/apollo-core/apollo-core.esm.js +1 -1
- package/dist/apollo-core/p-0e45f332.entry.js +1 -0
- package/dist/apollo-core/p-0f251f98.entry.js +1 -0
- package/dist/apollo-core/p-1691c4f3.entry.js +1 -0
- package/dist/apollo-core/p-172ac720.entry.js +1 -0
- package/dist/apollo-core/p-23870463.entry.js +1 -0
- package/dist/apollo-core/{p-36ba29da.entry.js → p-3b8639b7.entry.js} +1 -1
- package/dist/apollo-core/p-44a16751.entry.js +1 -0
- package/dist/apollo-core/p-4efecab2.entry.js +1 -0
- package/dist/apollo-core/p-5094dd97.entry.js +1 -0
- package/dist/apollo-core/p-70e7facc.entry.js +1 -0
- package/dist/apollo-core/{p-6a15f1e0.entry.js → p-728341d2.entry.js} +1 -1
- package/dist/apollo-core/p-910be81f.entry.js +1 -0
- package/dist/apollo-core/{p-b61d7952.entry.js → p-9adf3694.entry.js} +1 -1
- package/dist/apollo-core/p-CK3_k8jD.js +1 -0
- package/dist/apollo-core/p-CXkZUm1c.js +2 -0
- package/dist/apollo-core/p-c17b6351.entry.js +1 -0
- package/dist/apollo-core/p-e08b434c.entry.js +1 -0
- package/dist/apollo-core/{p-ca127ee8.entry.js → p-e9e7577f.entry.js} +1 -1
- package/dist/cjs/apollo-core.cjs.js +3 -3
- package/dist/cjs/{index-BQ97-AWw.js → index-BaXVr8ux.js} +36 -9
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/package.json +3 -0
- package/dist/cjs/v4-_2BfiRUa.js +52 -0
- package/dist/cjs/xpl-accordion.cjs.entry.js +3 -3
- package/dist/cjs/xpl-application-shell.cjs.entry.js +2 -2
- package/dist/cjs/xpl-avatar_54.cjs.entry.js +700 -176
- package/dist/cjs/xpl-button-row.cjs.entry.js +2 -2
- package/dist/cjs/xpl-calendar.cjs.entry.js +3 -3
- package/dist/cjs/xpl-dynamic-table-cell.cjs.entry.js +3 -3
- package/dist/cjs/xpl-dynamic-table-row.cjs.entry.js +3 -3
- package/dist/cjs/xpl-dynamic-table.cjs.entry.js +2 -2
- package/dist/cjs/xpl-grid-item.cjs.entry.js +2 -2
- package/dist/cjs/xpl-grid.cjs.entry.js +2 -2
- package/dist/cjs/xpl-large-card.cjs.entry.js +2 -2
- package/dist/cjs/xpl-main-nav.cjs.entry.js +2 -2
- package/dist/cjs/xpl-table-header-cell.cjs.entry.js +1 -1
- package/dist/cjs/xpl-table-header.cjs.entry.js +2 -2
- package/dist/cjs/xpl-toggle.cjs.entry.js +5 -5
- package/dist/cjs/xpl-toolbar.cjs.entry.js +3 -3
- package/dist/collection/collection-manifest.json +6 -6
- package/dist/collection/components/xpl-accordion/xpl-accordion.js +2 -2
- package/dist/collection/components/xpl-application-shell/xpl-application-shell.js +1 -1
- package/dist/collection/components/xpl-backdrop/xpl-backdrop.js +1 -1
- package/dist/collection/components/xpl-badge/xpl-badge.js +1 -1
- package/dist/collection/components/xpl-banner/banner.stories.js +5 -0
- package/dist/collection/components/xpl-banner/xpl-banner.js +2 -2
- package/dist/collection/components/xpl-breadcrumbs/xpl-breadcrumb-item/xpl-breadcrumb-item.js +1 -1
- package/dist/collection/components/xpl-breadcrumbs/xpl-breadcrumbs/xpl-breadcrumbs.js +1 -1
- package/dist/collection/components/xpl-button/button.stories.js +5 -0
- package/dist/collection/components/xpl-button/xpl-button.js +1 -1
- package/dist/collection/components/xpl-button-row/button-row.stories.js +1 -11
- package/dist/collection/components/xpl-button-row/xpl-button-row.js +1 -1
- package/dist/collection/components/xpl-calendar/xpl-calendar.js +1 -1
- package/dist/collection/components/xpl-checkbox/xpl-checkbox.js +4 -4
- package/dist/collection/components/xpl-choicelist/xpl-choicelist.js +1 -1
- package/dist/collection/components/xpl-content-area/xpl-content-area.js +1 -1
- package/dist/collection/components/xpl-dashboard/xpl-dashboard.js +1 -1
- package/dist/collection/components/xpl-data-card/xpl-data-card.js +2 -2
- package/dist/collection/components/xpl-divider/xpl-divider.js +1 -1
- package/dist/collection/components/xpl-dropdown/xpl-dropdown-group/xpl-dropdown-group.js +1 -1
- package/dist/collection/components/xpl-dropdown/xpl-dropdown-heading/xpl-dropdown-heading.js +1 -1
- package/dist/collection/components/xpl-dropdown/xpl-dropdown-option/xpl-dropdown-option.js +2 -2
- package/dist/collection/components/xpl-dropdown/xpl-dropdown.js +208 -31
- package/dist/collection/components/xpl-dynamic-table/xpl-dynamic-table.js +1 -1
- package/dist/collection/components/xpl-dynamic-table-cell/xpl-dynamic-table-cell.js +2 -2
- package/dist/collection/components/xpl-dynamic-table-row/xpl-dynamic-table-row.js +2 -2
- package/dist/collection/components/xpl-grid/xpl-grid.js +1 -1
- package/dist/collection/components/xpl-grid-item/xpl-grid-item.js +1 -1
- package/dist/collection/components/xpl-header-accordion/xpl-header-accordion.js +1 -1
- package/dist/collection/components/xpl-icon/xpl-icon.js +2 -2
- package/dist/collection/components/xpl-input/input.stories.js +1 -1
- package/dist/collection/components/xpl-input/xpl-input-color/xpl-input-color.js +8 -8
- package/dist/collection/components/xpl-input/xpl-input-date/xpl-input-date.js +3 -3
- package/dist/collection/components/xpl-input/xpl-input-file/xpl-input-file.js +4 -4
- package/dist/collection/components/xpl-input/xpl-input-phone/xpl-input-phone.js +25 -6
- package/dist/collection/components/xpl-input/xpl-input-search/xpl-input-search.js +1 -1
- package/dist/collection/components/xpl-input/xpl-input-time/xpl-input-time.js +2 -2
- package/dist/collection/components/xpl-input/xpl-input.js +3 -3
- package/dist/collection/components/xpl-large-card/xpl-large-card.js +1 -1
- package/dist/collection/components/xpl-list/xpl-list.js +2 -2
- package/dist/collection/components/xpl-main-nav/xpl-main-nav.js +1 -1
- package/dist/collection/components/xpl-modal/xpl-modal.js +4 -1
- package/dist/collection/components/xpl-nav-item/xpl-nav-item.js +2 -2
- package/dist/collection/components/xpl-pagination/xpl-pagination.js +26 -8
- package/dist/collection/components/xpl-panel/xpl-panel.js +2 -2
- package/dist/collection/components/xpl-popover/popover.stories.js +3 -7
- package/dist/collection/components/xpl-popover/xpl-popover.js +4 -4
- package/dist/collection/components/xpl-progress-bar/xpl-progress-bar.js +2 -2
- package/dist/collection/components/xpl-progress-indicator/xpl-progress-indicator.js +1 -1
- package/dist/collection/components/xpl-radio/radio.stories.js +19 -17
- package/dist/collection/components/xpl-radio/xpl-radio.js +3 -3
- package/dist/collection/components/xpl-secondary-nav/xpl-secondary-nav.js +1 -1
- package/dist/collection/components/xpl-select/xpl-select.js +16 -11
- package/dist/collection/components/xpl-side-nav/side-nav-constants.js +2 -0
- package/dist/collection/components/xpl-side-nav/side-nav.stories.js +301 -186
- package/dist/collection/components/xpl-side-nav/xpl-side-nav-item/xpl-side-nav-item.js +80 -14
- package/dist/collection/components/xpl-side-nav/xpl-side-nav.js +284 -3
- package/dist/collection/components/xpl-skeleton/xpl-skeleton.js +1 -1
- package/dist/collection/components/xpl-slideout/xpl-slideout.js +1 -1
- package/dist/collection/components/xpl-spotlight/xpl-spotlight.js +14 -4
- package/dist/collection/components/xpl-tab-panel/xpl-tab-panel.js +2 -2
- package/dist/collection/components/xpl-table/xpl-table.js +13 -22
- package/dist/collection/components/xpl-table-header/xpl-table-header.js +1 -1
- package/dist/collection/components/xpl-tabs/xpl-tabs.js +5 -5
- package/dist/collection/components/xpl-tag/xpl-tag.js +2 -2
- package/dist/collection/components/xpl-toast/xpl-toast.js +2 -2
- package/dist/collection/components/xpl-toggle/xpl-toggle.js +3 -3
- package/dist/collection/components/xpl-toolbar/xpl-toolbar.js +2 -2
- package/dist/collection/components/xpl-tooltip/tooltip-arrow.js +1 -1
- package/dist/collection/components/xpl-tooltip/tooltip.stories.js +6 -37
- package/dist/collection/components/xpl-tooltip/xpl-tooltip.js +1 -1
- package/dist/collection/components/xpl-top-nav/xpl-nav-header-menu/xpl-nav-header-menu.js +2 -2
- package/dist/collection/components/xpl-top-nav/xpl-top-nav-item/xpl-top-nav-item.js +2 -2
- package/dist/collection/components/xpl-top-nav/xpl-top-nav.js +5 -5
- package/dist/collection/components/xpl-utility-bar/xpl-utility-bar.js +1 -1
- package/dist/components/index.d.ts +141 -12
- package/dist/components/index.js +1 -1
- package/dist/components/p-3qMYyqTe.js +1 -0
- package/dist/components/p-B1PBAEzg.js +1 -0
- package/dist/components/p-BG0-6Xek.js +1 -0
- package/dist/components/p-BT_Lq3Vd.js +1 -0
- package/dist/components/p-BWyAzrwu.js +1 -0
- package/dist/components/p-B_Wi--Ov.js +1 -0
- package/dist/components/p-Bd6JweBt.js +1 -0
- package/dist/components/p-Bn-27-xj.js +1 -0
- package/dist/components/{xpl-top-nav-item2.js → p-Bs6vq0C6.js} +1 -1
- package/dist/components/{xpl-input-file2.js → p-C9BO2vL-.js} +1 -1
- package/dist/components/p-CFW_w5Wj.js +1 -0
- package/dist/components/{floating-ui.dom.js → p-CFpsSZyr.js} +1 -1
- package/dist/components/p-CGNq3DyC.js +1 -0
- package/dist/components/p-CK3_k8jD.js +1 -0
- package/dist/components/p-CVqbA9op.js +1 -0
- package/dist/components/p-CtIUusUL.js +1 -0
- package/dist/components/p-CzwViN3U.js +1 -0
- package/dist/components/p-D97c0GjM.js +1 -0
- package/dist/components/p-DBWV65V-.js +1 -0
- package/dist/components/{xpl-tag2.js → p-DEl4Rvzs.js} +1 -1
- package/dist/components/p-DPTHmitJ.js +1 -0
- package/dist/components/{xpl-input-search2.js → p-DllC7F-H.js} +1 -1
- package/dist/components/p-Ds28UyUR.js +1 -0
- package/dist/components/p-U5dPMCXE.js +1 -0
- package/dist/components/p-hPUzON4O.js +1 -0
- package/dist/components/p-kPHfCq1d.js +1 -0
- package/dist/components/xpl-accordion.js +1 -1
- package/dist/components/xpl-application-shell.js +1 -1
- package/dist/components/xpl-avatar.js +1 -1
- package/dist/components/xpl-backdrop.js +1 -1
- package/dist/components/xpl-badge.js +1 -1
- package/dist/components/xpl-banner.js +1 -1
- package/dist/components/xpl-breadcrumb-item.js +1 -1
- package/dist/components/xpl-breadcrumbs.js +1 -1
- package/dist/components/xpl-button-row.js +1 -1
- package/dist/components/xpl-button.js +1 -1
- package/dist/components/xpl-calendar.js +1 -1
- package/dist/components/xpl-checkbox.js +1 -1
- package/dist/components/xpl-choicelist.js +1 -1
- package/dist/components/xpl-content-area.js +1 -1
- package/dist/components/xpl-dashboard.js +1 -1
- package/dist/components/xpl-data-card.js +1 -1
- package/dist/components/xpl-divider.js +1 -1
- package/dist/components/xpl-dropdown-group.js +1 -1
- package/dist/components/xpl-dropdown-heading.js +1 -1
- package/dist/components/xpl-dropdown-option.js +1 -1
- package/dist/components/xpl-dropdown.js +1 -1
- package/dist/components/xpl-dynamic-table-cell.js +1 -1
- package/dist/components/xpl-dynamic-table-row.js +1 -1
- package/dist/components/xpl-dynamic-table.js +1 -1
- package/dist/components/xpl-grid-item.js +1 -1
- package/dist/components/xpl-grid.js +1 -1
- package/dist/components/xpl-header-accordion.js +1 -1
- package/dist/components/xpl-icon.js +1 -1
- package/dist/components/xpl-input-color.js +1 -1
- package/dist/components/xpl-input-date.js +1 -1
- package/dist/components/xpl-input-file.js +1 -1
- package/dist/components/xpl-input-phone.js +1 -1
- package/dist/components/xpl-input-search.js +1 -1
- package/dist/components/xpl-input-time.js +1 -1
- package/dist/components/xpl-input.js +1 -1
- package/dist/components/xpl-large-card.js +1 -1
- package/dist/components/xpl-list-item.js +1 -1
- package/dist/components/xpl-list.js +1 -1
- package/dist/components/xpl-main-nav.js +1 -1
- package/dist/components/xpl-modal.js +1 -1
- package/dist/components/xpl-nav-header-menu.js +1 -1
- package/dist/components/xpl-nav-item.js +1 -1
- package/dist/components/xpl-pagination.js +1 -1
- package/dist/components/xpl-panel.js +1 -1
- package/dist/components/xpl-popover.js +1 -1
- package/dist/components/xpl-progress-bar.js +1 -1
- package/dist/components/xpl-progress-indicator.js +1 -1
- package/dist/components/xpl-radio.js +1 -1
- package/dist/components/xpl-secondary-nav.js +1 -1
- package/dist/components/xpl-select.js +1 -1
- package/dist/components/xpl-side-nav-item.js +1 -1
- package/dist/components/xpl-side-nav.js +1 -1
- package/dist/components/xpl-skeleton.js +1 -1
- package/dist/components/xpl-slideout.js +1 -1
- package/dist/components/xpl-spotlight.js +1 -1
- package/dist/components/xpl-tab-panel.js +1 -1
- package/dist/components/xpl-tab.js +1 -1
- package/dist/components/xpl-table-header-cell.js +1 -1
- package/dist/components/xpl-table-header.js +1 -1
- package/dist/components/xpl-table.js +1 -1
- package/dist/components/xpl-tabs.js +1 -1
- package/dist/components/xpl-tag.js +1 -1
- package/dist/components/xpl-toast.js +1 -1
- package/dist/components/xpl-toggle.js +1 -1
- package/dist/components/xpl-toolbar.js +1 -1
- package/dist/components/xpl-tooltip.js +1 -1
- package/dist/components/xpl-top-nav-item.js +1 -1
- package/dist/components/xpl-top-nav.js +1 -1
- package/dist/components/xpl-utility-bar.js +1 -1
- package/dist/docs/xpl-backdrop/readme.md +2 -0
- package/dist/docs/xpl-badge/readme.md +34 -0
- package/dist/docs/xpl-button/readme.md +2 -0
- package/dist/docs/xpl-button-row/readme.md +13 -0
- package/dist/docs/xpl-checkbox/readme.md +23 -1
- package/dist/docs/xpl-divider/readme.md +22 -4
- package/dist/docs/xpl-input/readme.md +51 -0
- package/dist/docs/xpl-input/xpl-input-date/readme.md +7 -0
- package/dist/docs/xpl-input/xpl-input-phone/readme.md +21 -0
- package/dist/docs/xpl-popover/readme.md +24 -0
- package/dist/docs/xpl-radio/readme.md +21 -4
- package/dist/docs/xpl-side-nav/readme.md +153 -5
- package/dist/docs/xpl-side-nav/xpl-side-nav-item/readme.md +165 -32
- package/dist/docs/xpl-table/readme.md +2 -0
- package/dist/docs/xpl-tooltip/readme.md +29 -1
- package/dist/esm/apollo-core.js +4 -4
- package/dist/esm/{index-C7bgJs6C.js → index-CXkZUm1c.js} +36 -9
- package/dist/esm/loader.js +3 -3
- package/dist/esm/v4-CK3_k8jD.js +50 -0
- package/dist/esm/xpl-accordion.entry.js +3 -3
- package/dist/esm/xpl-application-shell.entry.js +2 -2
- package/dist/esm/xpl-avatar_54.entry.js +700 -176
- package/dist/esm/xpl-button-row.entry.js +2 -2
- package/dist/esm/xpl-calendar.entry.js +3 -3
- package/dist/esm/xpl-dynamic-table-cell.entry.js +3 -3
- package/dist/esm/xpl-dynamic-table-row.entry.js +3 -3
- package/dist/esm/xpl-dynamic-table.entry.js +2 -2
- package/dist/esm/xpl-grid-item.entry.js +2 -2
- package/dist/esm/xpl-grid.entry.js +2 -2
- package/dist/esm/xpl-large-card.entry.js +2 -2
- package/dist/esm/xpl-main-nav.entry.js +2 -2
- package/dist/esm/xpl-table-header-cell.entry.js +1 -1
- package/dist/esm/xpl-table-header.entry.js +2 -2
- package/dist/esm/xpl-toggle.entry.js +5 -5
- package/dist/esm/xpl-toolbar.entry.js +3 -3
- package/dist/types/components/xpl-banner/banner.stories.d.ts +2 -0
- package/dist/types/components/xpl-button/button.stories.d.ts +2 -0
- package/dist/types/components/xpl-dropdown/xpl-dropdown.d.ts +16 -0
- package/dist/types/components/xpl-input/xpl-input-phone/xpl-input-phone.d.ts +1 -0
- package/dist/types/components/xpl-pagination/xpl-pagination.d.ts +4 -0
- package/dist/types/components/xpl-radio/radio.stories.d.ts +11 -10
- package/dist/types/components/xpl-side-nav/side-nav-constants.d.ts +2 -0
- package/dist/types/components/xpl-side-nav/side-nav.stories.d.ts +53 -32
- package/dist/types/components/xpl-side-nav/xpl-side-nav-item/xpl-side-nav-item.d.ts +10 -0
- package/dist/types/components/xpl-side-nav/xpl-side-nav.d.ts +31 -0
- package/dist/types/components/xpl-spotlight/xpl-spotlight.d.ts +1 -0
- package/dist/types/components.d.ts +223 -20
- package/dist/types/stencil-public-runtime.d.ts +1 -0
- package/package.json +33 -24
- package/dist/apollo-core/p-0bf50890.entry.js +0 -1
- package/dist/apollo-core/p-1947e7a8.entry.js +0 -1
- package/dist/apollo-core/p-27928cb0.entry.js +0 -1
- package/dist/apollo-core/p-34438721.entry.js +0 -1
- package/dist/apollo-core/p-35c2f72d.entry.js +0 -1
- package/dist/apollo-core/p-368c81f1.entry.js +0 -1
- package/dist/apollo-core/p-3bb14840.entry.js +0 -1
- package/dist/apollo-core/p-406b27a8.entry.js +0 -1
- package/dist/apollo-core/p-5d63b4ce.entry.js +0 -1
- package/dist/apollo-core/p-8d692d05.entry.js +0 -1
- package/dist/apollo-core/p-C7bgJs6C.js +0 -2
- package/dist/apollo-core/p-Cqlsd6nf.js +0 -1
- package/dist/apollo-core/p-cd56a3d5.entry.js +0 -1
- package/dist/apollo-core/p-dc205893.entry.js +0 -1
- package/dist/cjs/v4-D4KzFnn8.js +0 -67
- package/dist/components/index3.js +0 -1
- package/dist/components/v4.js +0 -1
- package/dist/components/xpl-avatar2.js +0 -1
- package/dist/components/xpl-backdrop2.js +0 -1
- package/dist/components/xpl-badge2.js +0 -1
- package/dist/components/xpl-button2.js +0 -1
- package/dist/components/xpl-checkbox2.js +0 -1
- package/dist/components/xpl-divider2.js +0 -1
- package/dist/components/xpl-dropdown-group2.js +0 -1
- package/dist/components/xpl-dropdown-heading2.js +0 -1
- package/dist/components/xpl-dropdown-option2.js +0 -1
- package/dist/components/xpl-dropdown2.js +0 -1
- package/dist/components/xpl-icon2.js +0 -1
- package/dist/components/xpl-input-date2.js +0 -1
- package/dist/components/xpl-input2.js +0 -1
- package/dist/components/xpl-list-item2.js +0 -1
- package/dist/components/xpl-popover2.js +0 -1
- package/dist/components/xpl-radio2.js +0 -1
- package/dist/components/xpl-select2.js +0 -1
- package/dist/components/xpl-tooltip2.js +0 -1
- package/dist/esm/v4-Cqlsd6nf.js +0 -65
- /package/dist/components/{_commonjsHelpers.js → p-BFTU3MAI.js} +0 -0
- /package/dist/components/{index2.js → p-CH4yJ6Qx.js} +0 -0
- /package/dist/components/{tab-a11y-ids.js → p-Yj_QFaRn.js} +0 -0
- /package/dist/{index.cjs.js → index.cjs} +0 -0
- /package/loader/{cdn.js → cdn.cjs} +0 -0
- /package/loader/{index.cjs.js → index.cjs} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{P as o,d as
|
|
1
|
+
import{P as o,d as s}from"./p-Bn-27-xj.js";const p=o,r=s;export{p as XplPopover,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{p as s,H as e,h as r,c as a,t}from"./p-BT_Lq3Vd.js";import{d as i}from"./p-B1PBAEzg.js";const c=s(class extends e{constructor(s){super(),!1!==s&&this.__registerHost(),this.max=100,this.size="lg",this.value=0,this.variant="default"}get clampedValue(){return Math.max(0,Math.min(this.max,this.value))}get isComplete(){return this.value>=this.max&&"default"===this.variant}get isError(){return"error"===this.variant}get isSuccess(){return"success"===this.variant||this.isComplete}get showStatusIcon(){return this.isSuccess||this.isError}get isIndeterminate(){return"indeterminate"===this.variant}render(){return r(a,{key:"25abe25b042ab5fb4d81246275538abaad3c4086",class:{"xpl-progress-bar":!0,["xpl-progress-bar--"+this.size]:!0,["xpl-progress-bar--"+this.variant]:!0,"xpl-progress-bar--complete":this.isComplete}},r("div",{key:"926c1407043a98c265dffbaa616b640624671352",class:"xpl-progress-bar__wrapper"},(this.label||this.showStatusIcon)&&r("div",{key:"78ece9b7848541236ce2ad4309b664204bfb370e",class:"xpl-progress-bar__header"},this.label&&r("div",{key:"9b673b4ae9aeebb7bebd9a72dc4384383e15227d",class:"xpl-progress-bar__label"},this.label),this.showStatusIcon&&r("div",{key:"a144dba46c7ae48ad54e9655b4335a253b1bc1bb",class:"xpl-progress-bar__icon"},r("xpl-icon",this.isError?{icon:"circle-xmark-1"}:{icon:"circle-check-1"}))),r("div",{key:"cf0f7a209c2278e4d1ccf00577457d175abb78bc",class:"xpl-progress-bar__row"},this.isIndeterminate?r("div",{class:"xpl-progress-bar__track xpl-progress-bar__track--indeterminate",role:"progressbar","aria-label":this.label||"Progress"},r("div",{class:"xpl-progress-bar__indeterminate"})):r("progress",{class:"xpl-progress-bar__progress",value:this.clampedValue,max:this.max,"aria-label":this.label||"Progress"})),this.helperText&&r("div",{key:"ff5b336a3b3a14cb4e0531688705983350f9812f",class:"xpl-progress-bar__helper"},this.helperText)))}},[0,"xpl-progress-bar",{helperText:[1,"helper-text"],label:[1],max:[2],size:[1],value:[2],variant:[1]}]),l=c,p=function(){"undefined"!=typeof customElements&&["xpl-progress-bar","xpl-icon"].forEach((s=>{switch(s){case"xpl-progress-bar":customElements.get(t(s))||customElements.define(t(s),c);break;case"xpl-icon":customElements.get(t(s))||i()}}))};export{l as XplProgressBar,p as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{p as s,H as t,h as e,c as r,t as i}from"./p-BT_Lq3Vd.js";import{d as o}from"./p-B1PBAEzg.js";const p=s(class extends t{constructor(s){super(),!1!==s&&this.__registerHost(),this.currentStep=0,this.layout="horizontal",this.showLabels=!0,this.showNumbers=!0}validateCurrentStep(){if(!this.steps||0===this.steps.length)return;const s=this.steps.length;this.currentStep<0?this.currentStep=0:this.currentStep>s&&(this.currentStep=s)}renderStepContent(s,t){return t?e("xpl-icon",{icon:"check-2",size:20,class:"xpl-progress-indicator-step-checkmark"}):this.showNumbers?e("span",{class:"xpl-progress-indicator-step-number"},s+1):e("span",{class:"xpl-progress-indicator-step-dot"})}renderStep(s,t){const r=this.currentStep>t,i=this.currentStep===t,o="horizontal"===this.layout,p=e("div",{class:"xpl-progress-indicator-step-circle"},this.renderStepContent(t,r)),c=this.showLabels&&e("div",{class:"xpl-progress-indicator-step-text"},s),a=o?e("div",{class:"xpl-progress-indicator-step-content"},p,c):[p,c];return e("div",{class:{"xpl-progress-indicator-step":!0,"xpl-progress-indicator-step-active":i,"xpl-progress-indicator-step-finished":r},role:"listitem","aria-label":`${s}, ${r?"completed":i?"current":"upcoming"}`,"aria-current":i?"step":void 0},a)}render(){const s=this.steps||[],t=s.length;return e(r,{key:"1c545195c093b97f72d81801efc686eb98fec787",class:{"xpl-progress-indicator":!0,"xpl-progress-indicator-horizontal":"horizontal"===this.layout,"xpl-progress-indicator-vertical":"vertical"===this.layout,"xpl-progress-indicator-no-labels":!this.showLabels},role:"group","aria-label":t>0?this.currentStep>=t?`Progress: all ${t} ${1===t?"step":"steps"} complete`:`Progress: step ${Math.min(this.currentStep+1,t)} of ${t}`:"Progress"},e("div",{key:"754af5ed292fb0d34c61aec88ccb87f52e2076bf",class:"xpl-progress-indicator-container",role:"list"},s.map(((s,t)=>this.renderStep(s,t)))))}static get watchers(){return{steps:[{validateCurrentStep:0}],currentStep:[{validateCurrentStep:0}]}}},[0,"xpl-progress-indicator",{currentStep:[1026,"current-step"],layout:[1],showLabels:[4,"show-labels"],showNumbers:[4,"show-numbers"],steps:[16]},void 0,{steps:[{validateCurrentStep:0}],currentStep:[{validateCurrentStep:0}]}]),c=p,a=function(){"undefined"!=typeof customElements&&["xpl-progress-indicator","xpl-icon"].forEach((s=>{switch(s){case"xpl-progress-indicator":customElements.get(i(s))||customElements.define(i(s),p);break;case"xpl-icon":customElements.get(i(s))||o()}}))};export{c as XplProgressIndicator,a as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{R as o,d as
|
|
1
|
+
import{R as o,d as s}from"./p-Bd6JweBt.js";const t=o,p=s;export{t as XplRadio,p as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{p as e,H as s,h as a,c as n,t as d}from"./p-BT_Lq3Vd.js";const c=e(class extends s{constructor(e){super(),!1!==e&&this.__registerHost()}render(){return a(n,{key:"bf9cbd4351297a28d6d98d3bf1e0612fac1f5136",class:"xpl-secondary-nav"},a("nav",{key:"764de50287c88f53f19005d50b177e85f71f7f43","aria-label":"Secondary Nav"},a("slot",{key:"d7fe629382a06f62dde9f08db082854e986ba406"})))}},[260,"xpl-secondary-nav"]),t=c,o=function(){"undefined"!=typeof customElements&&["xpl-secondary-nav"].forEach((e=>{"xpl-secondary-nav"===e&&(customElements.get(d(e))||customElements.define(d(e),c))}))};export{t as XplSecondaryNav,o as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{S as
|
|
1
|
+
import{S as o,d as s}from"./p-CFW_w5Wj.js";const p=o,r=s;export{p as XplSelect,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{p as i,H as s,d as t,h as e,c as n,t as a}from"./p-BT_Lq3Vd.js";import{d as l}from"./p-B1PBAEzg.js";const h=i(class extends s{constructor(i){super(),!1!==i&&this.__registerHost(),this.expandedChange=t(this,"expandedChange",7),this.navClick=t(this,"navClick",7),this.hasTrailingSlot=!1,this.disabled=!1,this.expanded=!1,this.hasChildren=!1,this.hidden=!1,this.link=!1,this.selected=!1,this.handleClick=()=>{this.disabled||(this.hasChildren?(this.expanded=!this.expanded,this.expandedChange.emit(this.expanded)):this.navClick.emit())}}syncLinkHasChildrenExclusivity(){this.enforceLinkExcludesHasChildren()}connectedCallback(){this.syncTrailingSlot(),this.connectTrailingSlotObserver()}disconnectedCallback(){void 0!==this.trailingSlotSyncTimeoutId&&(clearTimeout(this.trailingSlotSyncTimeoutId),this.trailingSlotSyncTimeoutId=void 0),this.disconnectTrailingSlotObserver()}componentWillLoad(){this.syncLinkHasChildrenExclusivity(),this.syncTrailingSlot()}componentWillRender(){this.syncLinkHasChildrenExclusivity(),this.disconnectTrailingSlotObserver()}componentDidRender(){this.scheduleTrailingSlotSync()}connectTrailingSlotObserver(){this.disconnectTrailingSlotObserver(),"undefined"!=typeof MutationObserver&&(this.trailingSlotObserver=new MutationObserver((()=>{this.scheduleTrailingSlotSync()})),this.trailingSlotObserver.observe(this.el,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["slot"]}))}disconnectTrailingSlotObserver(){var i;null===(i=this.trailingSlotObserver)||void 0===i||i.disconnect(),this.trailingSlotObserver=void 0}scheduleTrailingSlotSync(){void 0!==this.trailingSlotSyncTimeoutId&&clearTimeout(this.trailingSlotSyncTimeoutId),this.trailingSlotSyncTimeoutId=setTimeout((()=>{this.trailingSlotSyncTimeoutId=void 0,this.el.isConnected&&(this.syncTrailingSlot(),this.connectTrailingSlotObserver())}),0)}syncTrailingSlot(){const i=Array.from(this.el.querySelectorAll('[slot="trailing"]')).some((i=>i.closest("xpl-side-nav-item")===this.el));i!==this.hasTrailingSlot&&(this.hasTrailingSlot=i)}enforceLinkExcludesHasChildren(){this.link&&(this.hasChildren&&(this.hasChildren=!1),this.el.hasAttribute("has-children")&&this.el.removeAttribute("has-children"))}render(){var i;const s=this.hasChildren&&!this.hasTrailingSlot,t={"xpl-side-nav-item__link":!0,expanded:this.expanded,selected:this.selected};return e(n,{key:"d20950311a1dd97fff43eac3908a64a43aa2a332",class:{"xpl-side-nav-item":!0,"xpl-side-nav-item--link-disabled":this.link&&this.disabled}},this.link?e("slot",null):e("button",{type:"button",class:t,"aria-current":this.selected?"page":void 0,"aria-expanded":this.hasChildren?this.expanded?"true":"false":void 0,onClick:this.handleClick,disabled:this.disabled},e("span",{class:"xpl-side-nav-item__leading"},e("slot",{name:"leading"},this.icon?e("xpl-icon",{icon:this.icon,size:16}):null)),e("span",{class:"xpl-side-nav-item__label"},null!==(i=this.label)&&void 0!==i?i:""),(this.hasTrailingSlot||this.hasChildren)&&e("span",{class:{"xpl-side-nav-item__trailing":!0,"xpl-side-nav-item__trailing--chevron":s,expanded:s&&this.expanded},"aria-hidden":s?"true":void 0},e("slot",{name:"trailing"},s?e("xpl-icon",{icon:this.expanded?"chevron-up":"chevron-down",size:16}):null))),this.hasChildren&&!this.link&&e("div",{key:"b3aa86bdacae535dae31b93fa6f5013614f682bc",class:"xpl-side-nav-item__children "+(this.expanded?"expanded":""),inert:!this.expanded||void 0},e("div",{key:"91be28afd11a250696e003d0a8abf70f6e8b35c6",class:"xpl-side-nav-item__children-inner"},e("slot",{key:"1536a898b39fd1f30c26d9d71f79726e377ee8f2"}))))}get el(){return this}static get watchers(){return{hasChildren:[{syncLinkHasChildrenExclusivity:0}],link:[{syncLinkHasChildrenExclusivity:0}]}}},[260,"xpl-side-nav-item",{disabled:[516],expanded:[1540],hasChildren:[1540,"has-children"],hidden:[516],icon:[1],label:[1],link:[516],selected:[516],hasTrailingSlot:[32]},void 0,{hasChildren:[{syncLinkHasChildrenExclusivity:0}],link:[{syncLinkHasChildrenExclusivity:0}]}]),d=h,c=function(){"undefined"!=typeof customElements&&["xpl-side-nav-item","xpl-icon"].forEach((i=>{switch(i){case"xpl-side-nav-item":customElements.get(a(i))||customElements.define(a(i),h);break;case"xpl-icon":customElements.get(a(i))||l()}}))};export{d as XplSideNavItem,c as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{p as t,H as s,d as e,h as i,c as n,t as o}from"./p-BT_Lq3Vd.js";import{d as a}from"./p-CtIUusUL.js";import{d as h}from"./p-D97c0GjM.js";import{d}from"./p-B1PBAEzg.js";const c=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.openChange=e(this,"openChange",7),this.drawerClosing=!1,this.open=!1,this.onViewportChange=()=>{this.clearCloseTransition(),this.syncDocKeyDownListener()},this.focusToggleAfterClose=()=>{this.isBelowMdBreakpoint()&&(void 0!==this.toggleFocusTimeoutId&&clearTimeout(this.toggleFocusTimeoutId),this.toggleFocusTimeoutId=setTimeout((()=>{var t;this.toggleFocusTimeoutId=void 0,null===(t=this.el.querySelector(".xpl-side-nav__toggle button"))||void 0===t||t.focus()}),0))},this.focusDrawerOnOpen=()=>{this.isBelowMdBreakpoint()&&(void 0!==this.drawerFocusTimeoutId&&clearTimeout(this.drawerFocusTimeoutId),this.drawerFocusTimeoutId=setTimeout((()=>{var t;this.drawerFocusTimeoutId=void 0;const s=this.el.querySelector(".xpl-side-nav__wrapper"),e=s?this.getFocusableElements().find((t=>s.contains(t))):void 0,i=this.el.querySelector(".xpl-side-nav__toggle button");null===(t=null!=e?e:i)||void 0===t||t.focus()}),0))},this.onBackdropClick=()=>this.setOpenState(!1),this.onDocKeyDown=t=>{if(this.isMobileDrawerActive()&&!this.shouldYieldFocusToExternalModal())switch(t.key.toLowerCase()){case"escape":if(!this.open)return;if(this.anyDescendantPopoverIsOpen())return;return t.preventDefault(),t.stopPropagation(),void this.setOpenState(!1);case"tab":this.trapTabKey(t)}},this.onToggleClick=()=>this.setOpenState(!this.open)}onOpenChanged(t,s){s&&!t&&this.isBelowMdBreakpoint()?(this.drawerClosing=!0,void 0!==this.closeTransitionTimeoutId&&clearTimeout(this.closeTransitionTimeoutId),this.closeTransitionTimeoutId=setTimeout((()=>{this.closeTransitionTimeoutId=void 0,this.drawerClosing=!1,this.syncDocKeyDownListener()}),600)):this.clearCloseTransition(),this.syncDocKeyDownListener(),s&&!t&&this.focusToggleAfterClose(),!s&&t&&this.focusDrawerOnOpen()}connectedCallback(){"undefined"!=typeof window&&(this.mobileMq=window.matchMedia("(max-width: 767px)"),this.mobileMq.addEventListener("change",this.onViewportChange)),this.syncDocKeyDownListener()}componentDidLoad(){this.open&&(this.syncDocKeyDownListener(),this.focusDrawerOnOpen())}disconnectedCallback(){var t;void 0!==this.toggleFocusTimeoutId&&(clearTimeout(this.toggleFocusTimeoutId),this.toggleFocusTimeoutId=void 0),void 0!==this.drawerFocusTimeoutId&&(clearTimeout(this.drawerFocusTimeoutId),this.drawerFocusTimeoutId=void 0),this.clearCloseTransition(),null===(t=this.mobileMq)||void 0===t||t.removeEventListener("change",this.onViewportChange),this.mobileMq=void 0,this.removeDocKeyDownListener()}async toggle(){this.setOpenState(!this.open)}async setOpen(t){this.setOpenState(t)}removeDocKeyDownListener(){this.el.ownerDocument.removeEventListener("keydown",this.onDocKeyDown,!1)}syncDocKeyDownListener(){this.removeDocKeyDownListener(),this.isMobileDrawerActive()&&this.el.ownerDocument.addEventListener("keydown",this.onDocKeyDown,!1)}isBelowMdBreakpoint(){var t,s;return null!==(s=null===(t=this.mobileMq)||void 0===t?void 0:t.matches)&&void 0!==s&&s}isMobileDrawerActive(){return(this.open||this.drawerClosing)&&this.isBelowMdBreakpoint()}clearCloseTransition(){void 0!==this.closeTransitionTimeoutId&&(clearTimeout(this.closeTransitionTimeoutId),this.closeTransitionTimeoutId=void 0),this.drawerClosing=!1}shouldYieldFocusToExternalModal(){const t=this.el.ownerDocument.activeElement;return!(!t||this.el.contains(t))&&null!==t.closest('[aria-modal="true"]')}anyDescendantPopoverIsOpen(){const t=this.el.querySelectorAll("xpl-popover");for(let s=0;s<t.length;s+=1){const e=t[s].querySelector(".xpl-popover");if(null==e?void 0:e.classList.contains("xpl-popover--is-open"))return!0}return!1}setOpenState(t){const s=this.open;t!==s&&(this.open=t,this.openChange.emit(t),s&&!t&&this.focusToggleAfterClose())}getFocusableElements(){const t=this.el.ownerDocument.activeElement;return Array.from(this.el.querySelectorAll('button:not([disabled]), a[href]:not([tabindex="-1"]), input:not([disabled]), [tabindex]:not([tabindex="-1"])')).filter((s=>!s.closest("[inert]")&&(null!==s.offsetParent||s===t)))}trapTabKey(t){if(this.shouldYieldFocusToExternalModal())return;const s=this.getFocusableElements();if(0===s.length)return;const e=s[0],i=s[s.length-1],n=this.el.ownerDocument.activeElement;t.shiftKey?n!==e&&this.el.contains(n)||(t.preventDefault(),i.focus()):n!==i&&this.el.contains(n)||(t.preventDefault(),e.focus())}render(){return i(n,{key:"fe3b0b9e5f9facf3f7fa469a8928d7ed8971e6f5",class:{"xpl-side-nav":!0,"xpl-side-nav--open":this.open}},i("xpl-button",{key:"09d0de65b9a40446a4801087e91c1bf3e1d3989a",class:"xpl-side-nav__toggle",variant:"tertiary",iconOnly:!0,icon:this.open?"sidebar-left-hide":"sidebar-left-show","aria-expanded":this.open?"true":"false","aria-label":this.open?"Close navigation menu":"Open navigation menu",onClick:this.onToggleClick}),i("div",{key:"3274980b1cb4867d163e83c80520e44bcc8d0121",class:"xpl-side-nav__wrapper"},i("nav",{key:"06ce207917af66ff8f238c6cc85e8a8d5f47efbc",class:"xpl-side-nav__content","aria-label":this.label},i("div",{key:"ce08165951c7b40fc21e846f6dfe7ca44b57326d",class:"xpl-side-nav__section"},i("slot",{key:"da65836d8006756b3a0d408d343b445a3bccb271",name:"section"})),i("div",{key:"93b522d531086a914d2cd53fe859da2436df9552",class:"xpl-side-nav__footer"},i("slot",{key:"a2cce3bec1d5269316388ede23934d2cfb835cf9",name:"nav-footer"})))),i("xpl-backdrop",{key:"e98662f2e022d9d9edfa16b2c62d3ca40755b829",class:"xpl-side-nav__backdrop",onClick:this.onBackdropClick}))}get el(){return this}static get watchers(){return{open:[{onOpenChanged:0}]}}},[260,"xpl-side-nav",{label:[1],open:[1540],toggle:[64],setOpen:[64]},void 0,{open:[{onOpenChanged:0}]}]),l=c,r=function(){"undefined"!=typeof customElements&&["xpl-side-nav","xpl-backdrop","xpl-button","xpl-icon"].forEach((t=>{switch(t){case"xpl-side-nav":customElements.get(o(t))||customElements.define(o(t),c);break;case"xpl-backdrop":customElements.get(o(t))||a();break;case"xpl-button":customElements.get(o(t))||h();break;case"xpl-icon":customElements.get(o(t))||d()}}))};export{l as XplSideNav,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{p as s,H as t,h as e,t as l,c as i}from"./p-BT_Lq3Vd.js";const n=s(class extends t{constructor(s){super(),!1!==s&&this.__registerHost(),this.shape="rectangle",this.size="custom"}render(){return e(i,{key:"2cb86d68bd14f87ab1a6467716ec456cc1bfd6a2",class:{"xpl-skeleton":!0,["xpl-skeleton--shape-"+this.shape]:!0,["xpl-skeleton--size-"+this.size]:!0,[this.classNames]:!!this.classNames,"xpl-skeleton--full-width":this.fullWidth},style:{width:this.width||void 0,height:this.height||void 0,margin:this.margin||void 0}})}},[0,"xpl-skeleton",{classNames:[1,"class-names"],fullWidth:[4,"full-width"],height:[1],width:[1],margin:[1],shape:[1],size:[1]}]),h=n,o=function(){"undefined"!=typeof customElements&&["xpl-skeleton"].forEach((s=>{"xpl-skeleton"===s&&(customElements.get(l(s))||customElements.define(l(s),n))}))};export{h as XplSkeleton,o as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{p as e,H as a,d as s,h as t,c as d,t as c}from"./p-BT_Lq3Vd.js";import{d as o}from"./p-CtIUusUL.js";import{d as i}from"./p-D97c0GjM.js";import{d as l}from"./p-DBWV65V-.js";import{d as b}from"./p-B1PBAEzg.js";const r=e(class extends a{constructor(e){super(),!1!==e&&this.__registerHost(),this.isOpenChange=s(this,"isOpenChange",7),this.isOpen=!1,this.backdrop=!1,this.variant="default",this.showFooter=!0,this.handleClose=()=>{this.isOpen=!1}}watchPropHandler(e){this.isOpen=e,this.isOpenChange.emit(e)}handleScroll(){const e=this.el.querySelector(".content");e.scrollHeight>e.clientHeight?e.classList.add("has-shadow"):e.classList.remove("has-shadow")}componentDidLoad(){this.handleScroll()}render(){return t(d,{key:"f42f8f576d4e8387511d0cd5e5a24913606dce5e",class:"xpl-slideout"},this.backdrop&&this.isOpen&&t("xpl-backdrop",{key:"5e80a7f340487ee653d266edc8d7cbd7a1ae5a52",onClick:this.handleClose}),t("aside",{key:"beb647a98119f53d01a911af9df5ea97babad7c1",class:"slideout slideout--"+(!this.isOpen&&"closed")},t("header",{key:"ef3ba3c61fd5542696c271d0d3d3d40214a2605e",class:"header"},t("div",{key:"ed343a1553fb5da4d5db9f6a746f89eadf258f68",class:"title"},t("slot",{key:"0793234025cb9ed92e45805f74ad85928c71f585",name:"title"}),t("xpl-button",{key:"b9049478a5ac330b6439fc5a71440db634d51b5e",class:"close-button","icon-only":!0,size:"sm",variant:"tertiary",onClick:this.handleClose},t("xpl-icon",{key:"1dad5a0fc6d0b1888a450639b9f40d694b9942db",icon:"x"}))),t("div",{key:"c5f3f124e81ce4b916af4dd114c8ce9b45d567c7",class:"subtitle"},t("slot",{key:"41d10f0742562a8dc824b45b2987d45dda76abb4",name:"subtitle"})),t("div",{key:"5a60f3f9e9c5fd86d8262f47eea7b83f64e149a2",class:"search"},t("slot",{key:"80f950ece315afe975aed51ac8a10804670eb8fe",name:"search"}))),t("xpl-divider",{key:"02e53e01c2f148c8bbd54b086bac669ee65014ba",tier:0,class:"divider top"}),t("article",{key:"5425462fe1ef6104c5d8c7d5c4c892cf77349d38",class:"content",tabIndex:0},t("slot",{key:"370dd088e84a33112f7f3e1c46341f521430485a",name:"content"})),this.showFooter&&t("footer",{key:"becd0aea10f8a35af12cedae53814b1c9db92669"},t("xpl-divider",{key:"5f53e23fbd9330d1b28ba705a7b9438ba098a6a7",tier:0,class:"divider bottom"}),t("div",{key:"00c0c39b04999a12b47d5fe35bceae2ac8dc1def",class:"footer"},t("slot",{key:"024d1c72ac7ab44b93608020ef20619b504d6725",name:"tertiary"}),t("slot",{key:"199910e96905946e393fcd600ddc7878701be5fb",name:"secondary"}),t("slot",{key:"55f351a5bb4c18833c5db4408ce01b01c1853fe3",name:"primary"})))))}get el(){return this}static get watchers(){return{isOpen:[{watchPropHandler:0}]}}},[260,"xpl-slideout",{isOpen:[1540,"is-open"],backdrop:[4],variant:[1],showFooter:[4,"show-footer"]},[[9,"scroll","handleScroll"]],{isOpen:[{watchPropHandler:0}]}]),f=r,n=function(){"undefined"!=typeof customElements&&["xpl-slideout","xpl-backdrop","xpl-button","xpl-divider","xpl-icon"].forEach((e=>{switch(e){case"xpl-slideout":customElements.get(c(e))||customElements.define(c(e),r);break;case"xpl-backdrop":customElements.get(c(e))||o();break;case"xpl-button":customElements.get(c(e))||i();break;case"xpl-divider":customElements.get(c(e))||l();break;case"xpl-icon":customElements.get(c(e))||b()}}))};export{f as XplSlideout,n as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as t,HTMLElement as i,createEvent as s,forceUpdate as o,h,Host as e,transformTag as n}from"@stencil/core/internal/client";import{c as l,a,o as r,f as c,s as p}from"./floating-ui.dom.js";import{d}from"./xpl-button2.js";import{d as u}from"./xpl-icon2.js";const g=".xpl-spotlight__dismiss button, .xpl-spotlight__actions button";let m=0;const v={"top-left":"top-start","top-right":"top-end","bottom-left":"bottom-start","bottom-right":"bottom-end"},x={top:"bottom-left","top-start":"bottom-left","top-end":"bottom-right",bottom:"top-left","bottom-start":"top-left","bottom-end":"top-right",left:"top-right","left-start":"top-right","left-end":"bottom-right",right:"top-left","right-start":"top-left","right-end":"bottom-left"},b=t(class t extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.dismiss=s(this,"dismiss",7),this.primaryAction=s(this,"primaryAction",7),this.secondaryAction=s(this,"secondaryAction",7),this.targetClick=s(this,"targetClick",7),this.cleanupAutoUpdate=null,this.enterVisibleFrameId=null,this.focusFrameId=null,this.hasCompletedInitialLoad=!1,this.headingId=(m+=1,"xpl-spotlight-heading-"+m),this.pendingEnterTransitionAfterAnchor=!1,this.pendingEnterVisible=!1,this.positioningGeneration=0,this.previousFocus=null,this.referenceEl=null,this.shouldMoveFocusOnRender=!1,this.shouldReinitializeAfterReconnect=!1,this.slotContentObserver=null,this.hasBodySlotContent=!1,this.hasFloatingPosition=!1,this.hasImageSlotContent=!1,this.hasTitleSlotContent=!1,this.isVisible=!1,this.resolvedAnchorPosition="top-left",this.actionLayout="default",this.anchorPosition="top-left",this.currentStep=1,this.isDismissible=!0,this.isOpen=!0,this.primaryActionLabel="Next",this.secondaryActionLabel="Back",this.showActions=!0,this.showImage=!0,this.showSteps=!0,this.totalSteps=1,this.emitDismiss=()=>{this.dismiss.emit()},this.handleDismissClick=()=>{this.emitDismiss()},this.handlePrimaryClick=()=>{this.primaryAction.emit()},this.handleSecondaryClick=()=>{this.secondaryAction.emit()},this.handleTargetClick=()=>{this.targetClick.emit()},this.syncTitleSlotIds=()=>{const t=this.getFirstTitleSlottedElement();t&&!t.id&&(t.id=this.headingId)},this.handleBodySlotChange=()=>{this.refreshBodySlotState()},this.handleTitleSlotChange=()=>{this.refreshTitleSlotState(),this.syncTitleSlotIds()},this.handleImageSlotChange=()=>{this.refreshImageSlotState()},this.handleSlotContentMutation=()=>{this.refreshBodySlotState(),this.refreshImageSlotState(),this.refreshTitleSlotState(),this.syncTitleSlotIds()},this.updatePosition=async t=>{var i,s,h,e,n,a;const d=this.positioningGeneration;try{const o=v[this.anchorPosition],{x:u,y:g,placement:m,middlewareData:b}=await l(t,this.el,{strategy:"fixed",placement:o,middleware:[r(12),c({crossAxis:!1}),p({padding:8})]});if(d!==this.positioningGeneration)return;this.el.style.left=u+"px",this.el.style.top=g+"px";const f=null!==(s=null===(i=b.shift)||void 0===i?void 0:i.x)&&void 0!==s?s:0,y=null!==(e=null===(h=b.shift)||void 0===h?void 0:h.y)&&void 0!==e?e:0;this.el.style.setProperty("--xpl-spotlight-shift-x",-f+"px"),this.el.style.setProperty("--xpl-spotlight-shift-y",-y+"px"),this.hasFloatingPosition=!0;const _=null!==(n=x[m])&&void 0!==n?n:x[null!==(a=m.split("-")[0])&&void 0!==a?a:""];this.resolvedAnchorPosition=null!=_?_:this.anchorPosition,this.pendingEnterTransitionAfterAnchor&&this.scheduleEnterTransition()}catch(t){if(d!==this.positioningGeneration)return;this.clearFloatingHostCoordinates(),this.isOpenEnabled&&(this.scheduleEnterTransition({skipAnchorWait:!0}),await o(this))}}}onAnchorPositionChange(){this.target&&this.referenceEl?this.updatePosition(this.referenceEl).catch((()=>{})):this.resolvedAnchorPosition=this.anchorPosition}onIsOpenChange(s){if(t.coerceBoolean(s))return this.previousFocus=document.activeElement instanceof i?document.activeElement:null,this.shouldMoveFocusOnRender=!0,this.isVisible=!1,this.refreshBodySlotState(),this.refreshTitleSlotState(),this.refreshImageSlotState(),this.target&&(this.cleanupAutoUpdate&&this.referenceEl&&this.el.ownerDocument.contains(this.referenceEl)?this.hasFloatingPosition=!1:this.startPositioning()),void this.scheduleEnterTransition();this.cancelEnterTransition(),this.cancelPendingFocusWait(),this.isVisible=!1,this.target||this.stopPositioning(),this.restoreFocus()}onTargetChange(){if(!this.target)return this.stopPositioning(),void(this.resolvedAnchorPosition=this.anchorPosition);this.startPositioning()}connectedCallback(){this.shouldReinitializeAfterReconnect&&(this.shouldReinitializeAfterReconnect=!1,this.startSlotContentObserver(),this.target&&this.startPositioning(),this.isOpenEnabled?(this.previousFocus=document.activeElement instanceof i?document.activeElement:null,this.shouldMoveFocusOnRender=!0,this.scheduleEnterTransition(),this.pendingEnterVisible&&Promise.resolve(o(this)).catch((()=>{}))):this.isVisible=!1)}disconnectedCallback(){this.cancelEnterTransition(),this.cancelPendingFocusWait(),this.stopSlotContentObserver(),this.stopPositioning(),this.hasCompletedInitialLoad&&(this.shouldReinitializeAfterReconnect=!0)}componentWillLoad(){this.resolvedAnchorPosition=this.anchorPosition,this.hasBodySlotContent=this.hasSlottedContent("body"),this.hasImageSlotContent=this.hasSlottedContent("image"),this.hasTitleSlotContent=this.hasSlottedContent("title"),this.isOpenEnabled&&(this.previousFocus=document.activeElement instanceof i?document.activeElement:null,this.target||(this.pendingEnterVisible=!0)),this.shouldMoveFocusOnRender=this.isOpenEnabled}componentDidLoad(){this.hasCompletedInitialLoad=!0,this.startSlotContentObserver(),this.target&&this.startPositioning(),this.isOpenEnabled?this.target&&(this.scheduleEnterTransition(),this.pendingEnterVisible&&Promise.resolve(o(this)).catch((()=>{}))):this.isVisible=!1}componentDidRender(){this.isOpenEnabled&&this.syncTitleSlotIds(),this.pendingEnterVisible&&this.isOpenEnabled&&(this.pendingEnterVisible=!1,this.enterVisibleFrameId=requestAnimationFrame((()=>{this.enterVisibleFrameId=null,this.isOpenEnabled&&(this.isVisible=!0)}))),this.shouldMoveFocusOnRender&&this.isOpenEnabled&&(this.shouldMoveFocusOnRender=!1,this.focusInitial())}handleKeyDown(t){"Escape"===t.key&&this.shouldHandleDismissKeyboardEvent()&&(t.preventDefault(),this.emitDismiss())}get effectiveTotalSteps(){return Math.max(1,this.totalSteps)}get effectiveCurrentStep(){return Math.min(this.effectiveTotalSteps,Math.max(1,this.currentStep))}get isDismissibleEnabled(){return t.coerceBoolean(this.isDismissible)}get isOpenEnabled(){return t.coerceBoolean(this.isOpen)}get isSingleActionLayout(){return"single"===this.actionLayout}get usesHiddenEdgeActions(){return"dual"===this.actionLayout}get isPrimaryStepActionDisabled(){return!this.usesHiddenEdgeActions&&this.showStepsEnabled&&this.effectiveCurrentStep>=this.effectiveTotalSteps}get isSecondaryStepActionDisabled(){return!this.usesHiddenEdgeActions&&this.showStepsEnabled&&this.effectiveCurrentStep<=1}get shouldShowPrimaryAction(){return!!this.isSingleActionLayout||!this.usesHiddenEdgeActions||!this.showStepsEnabled||this.effectiveCurrentStep<this.effectiveTotalSteps}get shouldShowSecondaryAction(){return!this.isSingleActionLayout&&(!this.usesHiddenEdgeActions||!this.showStepsEnabled||this.effectiveCurrentStep>1)}get hasRenderableFocusChrome(){return!!this.isDismissibleEnabled||!!this.showActionsEnabled&&(this.shouldShowPrimaryAction||this.shouldShowSecondaryAction)}get showActionsEnabled(){return t.coerceBoolean(this.showActions)}get showImageEnabled(){return t.coerceBoolean(this.showImage)}get showStepsEnabled(){return t.coerceBoolean(this.showSteps)}get headingPropHasText(){var t;return!!(null===(t=this.heading)||void 0===t?void 0:t.trim())}get bodyPropHasText(){var t;return!!(null===(t=this.body)||void 0===t?void 0:t.trim())}async focusInitial(){var t;if(null===(t=this.focusAbort)||void 0===t||t.abort(),this.focusAbort=new AbortController,!this.hasRenderableFocusChrome&&this.isOpenEnabled)return void(this.focusFrameId=requestAnimationFrame((()=>{this.focusFrameId=null,this.isOpenEnabled&&this.el.focus()})));const i=await function(t,i){var s;const o=t.querySelector(g);return o?Promise.resolve(o):(null===(s=null==i?void 0:i.signal)||void 0===s?void 0:s.aborted)?Promise.resolve(null):"undefined"==typeof MutationObserver?function(t,i){return new Promise((s=>{var o,h;if(null===(o=null==i?void 0:i.signal)||void 0===o?void 0:o.aborted)return void s(null);let e,n,l=0;const a=t=>{void 0!==e&&"undefined"!=typeof cancelAnimationFrame&&cancelAnimationFrame(e),void 0!==n&&clearTimeout(n),s(t)},r=()=>a(null);null===(h=null==i?void 0:i.signal)||void 0===h||h.addEventListener("abort",r,{once:!0});const c=t=>{"undefined"!=typeof requestAnimationFrame?e=requestAnimationFrame((()=>{e=void 0,t()})):n=setTimeout((()=>{n=void 0,t()}),0)},p=()=>{var s,o,h;if(null===(s=null==i?void 0:i.signal)||void 0===s?void 0:s.aborted)return void a(null);const e=t.querySelector(g);return e?(null===(o=null==i?void 0:i.signal)||void 0===o||o.removeEventListener("abort",r),void a(e)):(l+=1,l>=120?(null===(h=null==i?void 0:i.signal)||void 0===h||h.removeEventListener("abort",r),void a(null)):void c(p))};c(p)}))}(t,i):new Promise((s=>{var o;let h,e,n=!1;function l(t){n||(n=!0,e.disconnect(),void 0!==h&&clearTimeout(h),s(t))}e=new MutationObserver((()=>{const i=t.querySelector(g);i&&l(i)})),e.observe(t instanceof Node?t:document,{childList:!0,subtree:!0}),h=setTimeout((()=>l(null)),2500),null===(o=null==i?void 0:i.signal)||void 0===o||o.addEventListener("abort",(()=>{l(null)}),{once:!0})}))}(this.el,{signal:this.focusAbort.signal});i?i.focus():this.isOpenEnabled&&this.el.focus()}shouldHandleDismissKeyboardEvent(){if(!this.isDismissibleEnabled||!this.isOpenEnabled||!this.isVisible)return!1;const{activeElement:t}=document;return!!t&&(t===this.el||this.el.contains(t))}restoreFocus(){var t;(null===(t=this.previousFocus)||void 0===t?void 0:t.isConnected)&&this.previousFocus.focus()}cancelPendingFocusWait(){var t;null===(t=this.focusAbort)||void 0===t||t.abort(),null!=this.focusFrameId&&(cancelAnimationFrame(this.focusFrameId),this.focusFrameId=null)}cancelEnterTransition(){null!==this.enterVisibleFrameId&&(cancelAnimationFrame(this.enterVisibleFrameId),this.enterVisibleFrameId=null),this.pendingEnterVisible=!1}scheduleEnterTransition(t){this.cancelEnterTransition(),(null==t?void 0:t.skipAnchorWait)||!this.target||!this.referenceEl||this.hasFloatingPosition?(this.pendingEnterTransitionAfterAnchor=!1,this.pendingEnterVisible=!0):this.pendingEnterTransitionAfterAnchor=!0}getFirstTitleSlottedElement(){var t;const i=Array.from(this.el.children).find((t=>t.nodeType===Node.ELEMENT_NODE&&"title"===t.getAttribute("slot")));if(i)return i;const s=this.el.querySelector('slot[name="title"]');return s&&null!==(t=Array.from(s.assignedNodes({flatten:!0})).find((t=>t.nodeType===Node.ELEMENT_NODE)))&&void 0!==t?t:null}getDialogLabelId(){if(this.hasTitleSlotContent){const t=this.getFirstTitleSlottedElement();return(null==t?void 0:t.id)?t.id:this.headingId}if(this.headingPropHasText)return this.headingId}refreshBodySlotState(){const t=this.hasSlottedContent("body");this.hasBodySlotContent!==t&&(this.hasBodySlotContent=t)}refreshTitleSlotState(){const t=this.hasSlottedContent("title");this.hasTitleSlotContent!==t&&(this.hasTitleSlotContent=t)}static coerceBoolean(t){return"string"==typeof t?"false"!==t.trim().toLowerCase():!!t}refreshImageSlotState(){const t=this.hasSlottedContent("image");this.hasImageSlotContent!==t&&(this.hasImageSlotContent=t)}startSlotContentObserver(){"undefined"==typeof MutationObserver||this.slotContentObserver||(this.slotContentObserver=new MutationObserver(this.handleSlotContentMutation),this.slotContentObserver.observe(this.el,{attributes:!0,attributeFilter:["slot"],childList:!0,subtree:!0}))}stopSlotContentObserver(){var t;null===(t=this.slotContentObserver)||void 0===t||t.disconnect(),this.slotContentObserver=null}hasSlottedContent(t){const i=this.el.querySelector(`slot[name="${t}"]`),s=this.el.querySelector(`[slot="${t}"]`),o=Array.from(this.el.children).some((i=>i.getAttribute("slot")===t)),h=!!i&&i.assignedNodes({flatten:!0}).some((t=>{var i;return t.nodeType===Node.ELEMENT_NODE||t.nodeType===Node.TEXT_NODE&&(null===(i=t.textContent)||void 0===i?void 0:i.trim())}));return!(!s&&!o)||h}startPositioning(){if(!this.target)return;let t=null;try{t=this.el.ownerDocument.querySelector(this.target)}catch(t){return this.stopPositioning(),void(this.resolvedAnchorPosition=this.anchorPosition)}if(!t)return this.stopPositioning(),void(this.resolvedAnchorPosition=this.anchorPosition);this.detachFloatingUiListeners(),this.referenceEl=t,this.cleanupAutoUpdate=a(t,this.el,(()=>{this.updatePosition(t).catch((()=>{}))}))}detachFloatingUiListeners(){this.positioningGeneration+=1,this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null)}resetFloatingHostPosition(){this.el.style.left="",this.el.style.top="",this.el.style.removeProperty("--xpl-spotlight-shift-x"),this.el.style.removeProperty("--xpl-spotlight-shift-y"),this.hasFloatingPosition=!1,this.pendingEnterTransitionAfterAnchor=!1,this.referenceEl=null}clearFloatingHostCoordinates(){this.el.style.left="",this.el.style.top="",this.el.style.removeProperty("--xpl-spotlight-shift-x"),this.el.style.removeProperty("--xpl-spotlight-shift-y"),this.hasFloatingPosition=!1,this.pendingEnterTransitionAfterAnchor=!1,this.resolvedAnchorPosition=this.anchorPosition}stopPositioning(){this.detachFloatingUiListeners(),this.resetFloatingHostPosition()}render(){if(!this.isOpenEnabled)return this.target?h(e,{class:{"xpl-spotlight":!0,"xpl-spotlight--target-only":!0,["xpl-spotlight--"+this.resolvedAnchorPosition]:!0,"xpl-spotlight--anchored":this.hasFloatingPosition}},h("button",{type:"button",class:"xpl-spotlight__target","aria-label":"Spotlight indicator",onClick:this.handleTargetClick},h("div",{class:"xpl-spotlight__target-outer"}),h("div",{class:"xpl-spotlight__target-inner"}))):h(e,{"aria-hidden":"true",class:{"xpl-spotlight":!0,"xpl-spotlight--closed":!0}});const{isSingleActionLayout:t,shouldShowPrimaryAction:i,shouldShowSecondaryAction:s,showActionsEnabled:o,showImageEnabled:n,showStepsEnabled:l}=this;return h(e,{class:{["xpl-spotlight--action-layout-"+this.actionLayout]:o,"xpl-spotlight":!0,["xpl-spotlight--"+this.resolvedAnchorPosition]:!0,"xpl-spotlight--anchored":this.hasFloatingPosition,"xpl-spotlight--no-image":!n,"xpl-spotlight--only-primary-action":o&&i&&!s,"xpl-spotlight--only-secondary-action":o&&s&&!i,"xpl-spotlight--visible":this.isVisible},role:"dialog","aria-modal":"false","aria-label":this.getDialogLabelId()?void 0:"Tour step","aria-labelledby":this.getDialogLabelId(),tabindex:-1},h("button",{type:"button",class:"xpl-spotlight__target","aria-label":"Spotlight indicator",onClick:this.handleTargetClick},h("div",{class:"xpl-spotlight__target-outer"}),h("div",{class:"xpl-spotlight__target-inner"})),this.isDismissibleEnabled&&h("div",{class:"xpl-spotlight__dismiss"},h("xpl-button",{variant:"secondary",size:"sm",iconOnly:!0,"aria-label":"Dismiss tour step",onClick:this.handleDismissClick},h("xpl-icon",{icon:"xmark",size:16}))),h("div",{class:"xpl-spotlight__frame"},h("div",{class:{"xpl-spotlight__image-container":!0,"xpl-spotlight__image-container--empty":!this.hasImageSlotContent,"xpl-spotlight__image-container--hidden":!n}},!this.hasImageSlotContent&&n&&h("div",{class:"xpl-spotlight__image-placeholder","aria-hidden":"true"},h("xpl-icon",{icon:"photo",size:24}),h("xpl-icon",{icon:"video",size:24})),h("slot",{name:"image",onSlotchange:this.handleImageSlotChange})),h("div",{class:"xpl-spotlight__content"},h("div",{class:"xpl-spotlight__header"},h("slot",{name:"title",onSlotchange:this.handleTitleSlotChange},!this.hasTitleSlotContent&&this.headingPropHasText&&h("span",{class:"xpl-spotlight__title",id:this.headingId},this.heading)),h("slot",{name:"body",onSlotchange:this.handleBodySlotChange},!this.hasBodySlotContent&&this.bodyPropHasText&&h("p",{class:"xpl-spotlight__body"},this.body))),o&&h("div",{class:{"xpl-spotlight__actions":!0,"xpl-spotlight__actions--dual":!t,"xpl-spotlight__actions--single":t,"xpl-spotlight__actions--with-steps":l,"xpl-spotlight__actions--only-primary":i&&!s,"xpl-spotlight__actions--only-secondary":s&&!i}},h("div",{class:"xpl-spotlight__action-slot xpl-spotlight__action-slot--secondary"},s&&h("xpl-button",{class:"xpl-spotlight__secondary-action",variant:"secondary",size:"default",disabled:this.isSecondaryStepActionDisabled,onClick:this.handleSecondaryClick},this.secondaryActionLabel)),l&&h("span",{class:"xpl-spotlight__step-text"},this.effectiveCurrentStep," of ",this.effectiveTotalSteps),h("div",{class:"xpl-spotlight__action-slot xpl-spotlight__action-slot--primary"},i&&h("xpl-button",{class:"xpl-spotlight__primary-action",variant:"primary",size:"default",disabled:this.isPrimaryStepActionDisabled,onClick:this.handlePrimaryClick},this.primaryActionLabel))))))}get el(){return this}static get watchers(){return{anchorPosition:[{onAnchorPositionChange:0}],isOpen:[{onIsOpenChange:0}],target:[{onTargetChange:0}]}}},[260,"xpl-spotlight",{actionLayout:[1,"action-layout"],anchorPosition:[1,"anchor-position"],body:[1],currentStep:[2,"current-step"],heading:[1],isDismissible:[4,"is-dismissible"],isOpen:[4,"is-open"],primaryActionLabel:[1,"primary-action-label"],secondaryActionLabel:[1,"secondary-action-label"],showActions:[4,"show-actions"],showImage:[4,"show-image"],showSteps:[4,"show-steps"],target:[1],totalSteps:[2,"total-steps"],hasBodySlotContent:[32],hasFloatingPosition:[32],hasImageSlotContent:[32],hasTitleSlotContent:[32],isVisible:[32],resolvedAnchorPosition:[32]},[[4,"keydown","handleKeyDown"]],{anchorPosition:[{onAnchorPositionChange:0}],isOpen:[{onIsOpenChange:0}],target:[{onTargetChange:0}]}]),f=b,y=function(){"undefined"!=typeof customElements&&["xpl-spotlight","xpl-button","xpl-icon"].forEach((t=>{switch(t){case"xpl-spotlight":customElements.get(n(t))||customElements.define(n(t),b);break;case"xpl-button":customElements.get(n(t))||d();break;case"xpl-icon":customElements.get(n(t))||u()}}))};export{f as XplSpotlight,y as defineCustomElement}
|
|
1
|
+
import{p as t,H as i,d as s,f as o,h,c as e,t as n}from"./p-BT_Lq3Vd.js";import{c as l,a,o as r,f as c,b as p}from"./p-CFpsSZyr.js";import{d}from"./p-D97c0GjM.js";import{d as u}from"./p-B1PBAEzg.js";const g=".xpl-spotlight__dismiss button, .xpl-spotlight__actions button";let m=0;const v={"top-left":"top-start","top-right":"top-end","bottom-left":"bottom-start","bottom-right":"bottom-end"},x={top:"bottom-left","top-start":"bottom-left","top-end":"bottom-right",bottom:"top-left","bottom-start":"top-left","bottom-end":"top-right",left:"top-right","left-start":"top-right","left-end":"bottom-right",right:"top-left","right-start":"top-left","right-end":"bottom-left"},b=t(class t extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.dismiss=s(this,"dismiss",7),this.primaryAction=s(this,"primaryAction",7),this.secondaryAction=s(this,"secondaryAction",7),this.targetClick=s(this,"targetClick",7),this.cleanupAutoUpdate=null,this.enterVisibleFrameId=null,this.focusFrameId=null,this.hasCompletedInitialLoad=!1,this.headingId=(m+=1,"xpl-spotlight-heading-"+m),this.pendingEnterTransitionAfterAnchor=!1,this.pendingEnterVisible=!1,this.positioningGeneration=0,this.previousFocus=null,this.referenceEl=null,this.shouldMoveFocusOnRender=!1,this.shouldReinitializeAfterReconnect=!1,this.slotContentObserver=null,this.hasBodySlotContent=!1,this.hasFloatingPosition=!1,this.hasImageSlotContent=!1,this.hasTitleSlotContent=!1,this.dialogLabelId=void 0,this.isVisible=!1,this.resolvedAnchorPosition="top-left",this.actionLayout="default",this.anchorPosition="top-left",this.currentStep=1,this.isDismissible=!0,this.isOpen=!0,this.primaryActionLabel="Next",this.secondaryActionLabel="Back",this.showActions=!0,this.showImage=!0,this.showSteps=!0,this.totalSteps=1,this.emitDismiss=()=>{this.dismiss.emit()},this.handleDismissClick=()=>{this.emitDismiss()},this.handlePrimaryClick=()=>{this.primaryAction.emit()},this.handleSecondaryClick=()=>{this.secondaryAction.emit()},this.handleTargetClick=()=>{this.targetClick.emit()},this.syncTitleSlotIds=()=>{const t=this.getFirstTitleSlottedElement();t&&!t.id&&(t.id=this.headingId)},this.handleBodySlotChange=()=>{this.refreshBodySlotState()},this.handleTitleSlotChange=()=>{this.refreshTitleSlotState(),this.syncTitleSlotIds()},this.handleImageSlotChange=()=>{this.refreshImageSlotState()},this.handleSlotContentMutation=()=>{this.refreshBodySlotState(),this.refreshImageSlotState(),this.refreshTitleSlotState(),this.syncTitleSlotIds()},this.updatePosition=async t=>{var i,s,h,e,n,a;const d=this.positioningGeneration;try{const o=v[this.anchorPosition],{x:u,y:g,placement:m,middlewareData:b}=await l(t,this.el,{strategy:"fixed",placement:o,middleware:[r(12),c({crossAxis:!1}),p({padding:8})]});if(d!==this.positioningGeneration)return;this.el.style.left=u+"px",this.el.style.top=g+"px";const f=null!==(s=null===(i=b.shift)||void 0===i?void 0:i.x)&&void 0!==s?s:0,y=null!==(e=null===(h=b.shift)||void 0===h?void 0:h.y)&&void 0!==e?e:0;this.el.style.setProperty("--xpl-spotlight-shift-x",-f+"px"),this.el.style.setProperty("--xpl-spotlight-shift-y",-y+"px"),this.hasFloatingPosition=!0;const _=null!==(n=x[m])&&void 0!==n?n:x[null!==(a=m.split("-")[0])&&void 0!==a?a:""];this.resolvedAnchorPosition=null!=_?_:this.anchorPosition,this.pendingEnterTransitionAfterAnchor&&this.scheduleEnterTransition()}catch(t){if(d!==this.positioningGeneration)return;this.clearFloatingHostCoordinates(),this.isOpenEnabled&&(this.scheduleEnterTransition({skipAnchorWait:!0}),await o(this))}}}onAnchorPositionChange(){this.target&&this.referenceEl?this.updatePosition(this.referenceEl).catch((()=>{})):this.resolvedAnchorPosition=this.anchorPosition}onIsOpenChange(s){if(t.coerceBoolean(s))return this.previousFocus=document.activeElement instanceof i?document.activeElement:null,this.shouldMoveFocusOnRender=!0,this.isVisible=!1,this.refreshBodySlotState(),this.refreshTitleSlotState(),this.refreshImageSlotState(),this.target&&(this.cleanupAutoUpdate&&this.referenceEl&&this.el.ownerDocument.contains(this.referenceEl)?this.hasFloatingPosition=!1:this.startPositioning()),void this.scheduleEnterTransition();this.cancelEnterTransition(),this.cancelPendingFocusWait(),this.isVisible=!1,this.target||this.stopPositioning(),this.restoreFocus()}onTargetChange(){if(!this.target)return this.stopPositioning(),void(this.resolvedAnchorPosition=this.anchorPosition);this.startPositioning()}connectedCallback(){this.shouldReinitializeAfterReconnect&&(this.shouldReinitializeAfterReconnect=!1,this.startSlotContentObserver(),this.target&&this.startPositioning(),this.isOpenEnabled?(this.previousFocus=document.activeElement instanceof i?document.activeElement:null,this.shouldMoveFocusOnRender=!0,this.scheduleEnterTransition(),this.pendingEnterVisible&&Promise.resolve(o(this)).catch((()=>{}))):this.isVisible=!1)}disconnectedCallback(){this.cancelEnterTransition(),this.cancelPendingFocusWait(),this.stopSlotContentObserver(),this.stopPositioning(),this.hasCompletedInitialLoad&&(this.shouldReinitializeAfterReconnect=!0)}componentWillLoad(){this.resolvedAnchorPosition=this.anchorPosition,this.hasBodySlotContent=this.hasSlottedContent("body"),this.hasImageSlotContent=this.hasSlottedContent("image"),this.hasTitleSlotContent=this.hasSlottedContent("title"),this.dialogLabelId=this.getDialogLabelId(),this.isOpenEnabled&&(this.previousFocus=document.activeElement instanceof i?document.activeElement:null,this.target||(this.pendingEnterVisible=!0)),this.shouldMoveFocusOnRender=this.isOpenEnabled}componentDidLoad(){this.hasCompletedInitialLoad=!0,this.startSlotContentObserver(),this.target&&this.startPositioning(),this.isOpenEnabled?this.target&&(this.scheduleEnterTransition(),this.pendingEnterVisible&&Promise.resolve(o(this)).catch((()=>{}))):this.isVisible=!1}componentDidRender(){this.isOpenEnabled&&this.syncTitleSlotIds();const t=this.getDialogLabelId();this.dialogLabelId!==t&&(this.dialogLabelId=t),this.pendingEnterVisible&&this.isOpenEnabled&&(this.pendingEnterVisible=!1,this.enterVisibleFrameId=requestAnimationFrame((()=>{this.enterVisibleFrameId=null,this.isOpenEnabled&&(this.isVisible=!0)}))),this.shouldMoveFocusOnRender&&this.isOpenEnabled&&(this.shouldMoveFocusOnRender=!1,this.focusInitial())}handleKeyDown(t){"Escape"===t.key&&this.shouldHandleDismissKeyboardEvent()&&(t.preventDefault(),this.emitDismiss())}get effectiveTotalSteps(){return Math.max(1,this.totalSteps)}get effectiveCurrentStep(){return Math.min(this.effectiveTotalSteps,Math.max(1,this.currentStep))}get isDismissibleEnabled(){return t.coerceBoolean(this.isDismissible)}get isOpenEnabled(){return t.coerceBoolean(this.isOpen)}get isSingleActionLayout(){return"single"===this.actionLayout}get usesHiddenEdgeActions(){return"dual"===this.actionLayout}get isPrimaryStepActionDisabled(){return!this.usesHiddenEdgeActions&&this.showStepsEnabled&&this.effectiveCurrentStep>=this.effectiveTotalSteps}get isSecondaryStepActionDisabled(){return!this.usesHiddenEdgeActions&&this.showStepsEnabled&&this.effectiveCurrentStep<=1}get shouldShowPrimaryAction(){return!!this.isSingleActionLayout||!this.usesHiddenEdgeActions||!this.showStepsEnabled||this.effectiveCurrentStep<this.effectiveTotalSteps}get shouldShowSecondaryAction(){return!this.isSingleActionLayout&&(!this.usesHiddenEdgeActions||!this.showStepsEnabled||this.effectiveCurrentStep>1)}get hasRenderableFocusChrome(){return!!this.isDismissibleEnabled||!!this.showActionsEnabled&&(this.shouldShowPrimaryAction||this.shouldShowSecondaryAction)}get showActionsEnabled(){return t.coerceBoolean(this.showActions)}get showImageEnabled(){return t.coerceBoolean(this.showImage)}get showStepsEnabled(){return t.coerceBoolean(this.showSteps)}get headingPropHasText(){var t;return!!(null===(t=this.heading)||void 0===t?void 0:t.trim())}get bodyPropHasText(){var t;return!!(null===(t=this.body)||void 0===t?void 0:t.trim())}async focusInitial(){var t;if(null===(t=this.focusAbort)||void 0===t||t.abort(),this.focusAbort=new AbortController,!this.hasRenderableFocusChrome&&this.isOpenEnabled)return void(this.focusFrameId=requestAnimationFrame((()=>{this.focusFrameId=null,this.isOpenEnabled&&this.el.focus()})));const i=await function(t,i){var s;const o=t.querySelector(g);return o?Promise.resolve(o):(null===(s=null==i?void 0:i.signal)||void 0===s?void 0:s.aborted)?Promise.resolve(null):"undefined"==typeof MutationObserver?function(t,i){return new Promise((s=>{var o,h;if(null===(o=null==i?void 0:i.signal)||void 0===o?void 0:o.aborted)return void s(null);let e,n,l=0;const a=t=>{void 0!==e&&"undefined"!=typeof cancelAnimationFrame&&cancelAnimationFrame(e),void 0!==n&&clearTimeout(n),s(t)},r=()=>a(null);null===(h=null==i?void 0:i.signal)||void 0===h||h.addEventListener("abort",r,{once:!0});const c=t=>{"undefined"!=typeof requestAnimationFrame?e=requestAnimationFrame((()=>{e=void 0,t()})):n=setTimeout((()=>{n=void 0,t()}),0)},p=()=>{var s,o,h;if(null===(s=null==i?void 0:i.signal)||void 0===s?void 0:s.aborted)return void a(null);const e=t.querySelector(g);return e?(null===(o=null==i?void 0:i.signal)||void 0===o||o.removeEventListener("abort",r),void a(e)):(l+=1,l>=120?(null===(h=null==i?void 0:i.signal)||void 0===h||h.removeEventListener("abort",r),void a(null)):void c(p))};c(p)}))}(t,i):new Promise((s=>{var o;let h,e,n=!1;function l(t){n||(n=!0,e.disconnect(),void 0!==h&&clearTimeout(h),s(t))}e=new MutationObserver((()=>{const i=t.querySelector(g);i&&l(i)})),e.observe(t instanceof Node?t:document,{childList:!0,subtree:!0}),h=setTimeout((()=>l(null)),2500),null===(o=null==i?void 0:i.signal)||void 0===o||o.addEventListener("abort",(()=>{l(null)}),{once:!0})}))}(this.el,{signal:this.focusAbort.signal});i?i.focus():this.isOpenEnabled&&this.el.focus()}shouldHandleDismissKeyboardEvent(){if(!this.isDismissibleEnabled||!this.isOpenEnabled||!this.isVisible)return!1;const{activeElement:t}=document;return!!t&&(t===this.el||this.el.contains(t))}restoreFocus(){var t;(null===(t=this.previousFocus)||void 0===t?void 0:t.isConnected)&&this.previousFocus.focus()}cancelPendingFocusWait(){var t;null===(t=this.focusAbort)||void 0===t||t.abort(),null!=this.focusFrameId&&(cancelAnimationFrame(this.focusFrameId),this.focusFrameId=null)}cancelEnterTransition(){null!==this.enterVisibleFrameId&&(cancelAnimationFrame(this.enterVisibleFrameId),this.enterVisibleFrameId=null),this.pendingEnterVisible=!1}scheduleEnterTransition(t){this.cancelEnterTransition(),(null==t?void 0:t.skipAnchorWait)||!this.target||!this.referenceEl||this.hasFloatingPosition?(this.pendingEnterTransitionAfterAnchor=!1,this.pendingEnterVisible=!0):this.pendingEnterTransitionAfterAnchor=!0}getFirstTitleSlottedElement(){var t;const i=Array.from(this.el.children).find((t=>t.nodeType===Node.ELEMENT_NODE&&"title"===t.getAttribute("slot")));if(i)return i;const s=this.el.querySelector('slot[name="title"]');if(s&&"function"==typeof s.assignedNodes){const t=Array.from(s.assignedNodes({flatten:!0})).find((t=>t.nodeType===Node.ELEMENT_NODE));if(t)return t}return null!==(t=this.el.querySelector('[slot="title"]'))&&void 0!==t?t:null}getDialogLabelId(){if(this.hasTitleSlotContent){const t=this.getFirstTitleSlottedElement();return(null==t?void 0:t.id)?t.id:this.headingId}if(this.headingPropHasText)return this.headingId}refreshBodySlotState(){const t=this.hasSlottedContent("body");this.hasBodySlotContent!==t&&(this.hasBodySlotContent=t)}refreshTitleSlotState(){const t=this.hasSlottedContent("title");this.hasTitleSlotContent!==t&&(this.hasTitleSlotContent=t)}static coerceBoolean(t){return"string"==typeof t?"false"!==t.trim().toLowerCase():!!t}refreshImageSlotState(){const t=this.hasSlottedContent("image");this.hasImageSlotContent!==t&&(this.hasImageSlotContent=t)}startSlotContentObserver(){"undefined"==typeof MutationObserver||this.slotContentObserver||(this.slotContentObserver=new MutationObserver(this.handleSlotContentMutation),this.slotContentObserver.observe(this.el,{attributes:!0,attributeFilter:["slot"],childList:!0,subtree:!0}))}stopSlotContentObserver(){var t;null===(t=this.slotContentObserver)||void 0===t||t.disconnect(),this.slotContentObserver=null}hasSlottedContent(t){const i=this.el.querySelector(`slot[name="${t}"]`),s=this.el.querySelector(`[slot="${t}"]`),o=Array.from(this.el.children).some((i=>i.getAttribute("slot")===t)),h=!!i&&i.assignedNodes({flatten:!0}).some((t=>{var i;return t.nodeType===Node.ELEMENT_NODE||t.nodeType===Node.TEXT_NODE&&(null===(i=t.textContent)||void 0===i?void 0:i.trim())}));return!(!s&&!o)||h}startPositioning(){if(!this.target)return;let t=null;try{t=this.el.ownerDocument.querySelector(this.target)}catch(t){return this.stopPositioning(),void(this.resolvedAnchorPosition=this.anchorPosition)}if(!t)return this.stopPositioning(),void(this.resolvedAnchorPosition=this.anchorPosition);this.detachFloatingUiListeners(),this.referenceEl=t,this.cleanupAutoUpdate=a(t,this.el,(()=>{this.updatePosition(t).catch((()=>{}))}))}detachFloatingUiListeners(){this.positioningGeneration+=1,this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null)}resetFloatingHostPosition(){this.el.style.left="",this.el.style.top="",this.el.style.removeProperty("--xpl-spotlight-shift-x"),this.el.style.removeProperty("--xpl-spotlight-shift-y"),this.hasFloatingPosition=!1,this.pendingEnterTransitionAfterAnchor=!1,this.referenceEl=null}clearFloatingHostCoordinates(){this.el.style.left="",this.el.style.top="",this.el.style.removeProperty("--xpl-spotlight-shift-x"),this.el.style.removeProperty("--xpl-spotlight-shift-y"),this.hasFloatingPosition=!1,this.pendingEnterTransitionAfterAnchor=!1,this.resolvedAnchorPosition=this.anchorPosition}stopPositioning(){this.detachFloatingUiListeners(),this.resetFloatingHostPosition()}render(){if(!this.isOpenEnabled)return this.target?h(e,{class:{"xpl-spotlight":!0,"xpl-spotlight--target-only":!0,["xpl-spotlight--"+this.resolvedAnchorPosition]:!0,"xpl-spotlight--anchored":this.hasFloatingPosition}},h("button",{type:"button",class:"xpl-spotlight__target","aria-label":"Spotlight indicator",onClick:this.handleTargetClick},h("div",{class:"xpl-spotlight__target-outer"}),h("div",{class:"xpl-spotlight__target-inner"}))):h(e,{"aria-hidden":"true",class:{"xpl-spotlight":!0,"xpl-spotlight--closed":!0}});const{isSingleActionLayout:t,shouldShowPrimaryAction:i,shouldShowSecondaryAction:s,showActionsEnabled:o,showImageEnabled:n,showStepsEnabled:l}=this;return h(e,{class:{["xpl-spotlight--action-layout-"+this.actionLayout]:o,"xpl-spotlight":!0,["xpl-spotlight--"+this.resolvedAnchorPosition]:!0,"xpl-spotlight--anchored":this.hasFloatingPosition,"xpl-spotlight--no-image":!n,"xpl-spotlight--only-primary-action":o&&i&&!s,"xpl-spotlight--only-secondary-action":o&&s&&!i,"xpl-spotlight--visible":this.isVisible},role:"dialog","aria-modal":"false","aria-label":this.dialogLabelId?void 0:"Tour step","aria-labelledby":this.dialogLabelId,tabindex:-1},h("button",{type:"button",class:"xpl-spotlight__target","aria-label":"Spotlight indicator",onClick:this.handleTargetClick},h("div",{class:"xpl-spotlight__target-outer"}),h("div",{class:"xpl-spotlight__target-inner"})),this.isDismissibleEnabled&&h("div",{class:"xpl-spotlight__dismiss"},h("xpl-button",{variant:"secondary",size:"sm",iconOnly:!0,"aria-label":"Dismiss tour step",onClick:this.handleDismissClick},h("xpl-icon",{icon:"xmark",size:16}))),h("div",{class:"xpl-spotlight__frame"},h("div",{class:{"xpl-spotlight__image-container":!0,"xpl-spotlight__image-container--empty":!this.hasImageSlotContent,"xpl-spotlight__image-container--hidden":!n}},!this.hasImageSlotContent&&n&&h("div",{class:"xpl-spotlight__image-placeholder","aria-hidden":"true"},h("xpl-icon",{icon:"photo",size:24}),h("xpl-icon",{icon:"video",size:24})),h("slot",{name:"image",onSlotchange:this.handleImageSlotChange})),h("div",{class:"xpl-spotlight__content"},h("div",{class:"xpl-spotlight__header"},h("slot",{name:"title",onSlotchange:this.handleTitleSlotChange},!this.hasTitleSlotContent&&this.headingPropHasText&&h("span",{class:"xpl-spotlight__title",id:this.headingId},this.heading)),h("slot",{name:"body",onSlotchange:this.handleBodySlotChange},!this.hasBodySlotContent&&this.bodyPropHasText&&h("p",{class:"xpl-spotlight__body"},this.body))),o&&h("div",{class:{"xpl-spotlight__actions":!0,"xpl-spotlight__actions--dual":!t,"xpl-spotlight__actions--single":t,"xpl-spotlight__actions--with-steps":l,"xpl-spotlight__actions--only-primary":i&&!s,"xpl-spotlight__actions--only-secondary":s&&!i}},h("div",{class:"xpl-spotlight__action-slot xpl-spotlight__action-slot--secondary"},s&&h("xpl-button",{class:"xpl-spotlight__secondary-action",variant:"secondary",size:"default",disabled:this.isSecondaryStepActionDisabled,onClick:this.handleSecondaryClick},this.secondaryActionLabel)),l&&h("span",{class:"xpl-spotlight__step-text"},this.effectiveCurrentStep," of ",this.effectiveTotalSteps),h("div",{class:"xpl-spotlight__action-slot xpl-spotlight__action-slot--primary"},i&&h("xpl-button",{class:"xpl-spotlight__primary-action",variant:"primary",size:"default",disabled:this.isPrimaryStepActionDisabled,onClick:this.handlePrimaryClick},this.primaryActionLabel))))))}get el(){return this}static get watchers(){return{anchorPosition:[{onAnchorPositionChange:0}],isOpen:[{onIsOpenChange:0}],target:[{onTargetChange:0}]}}},[260,"xpl-spotlight",{actionLayout:[1,"action-layout"],anchorPosition:[1,"anchor-position"],body:[1],currentStep:[2,"current-step"],heading:[1],isDismissible:[4,"is-dismissible"],isOpen:[4,"is-open"],primaryActionLabel:[1,"primary-action-label"],secondaryActionLabel:[1,"secondary-action-label"],showActions:[4,"show-actions"],showImage:[4,"show-image"],showSteps:[4,"show-steps"],target:[1],totalSteps:[2,"total-steps"],hasBodySlotContent:[32],hasFloatingPosition:[32],hasImageSlotContent:[32],hasTitleSlotContent:[32],dialogLabelId:[32],isVisible:[32],resolvedAnchorPosition:[32]},[[4,"keydown","handleKeyDown"]],{anchorPosition:[{onAnchorPositionChange:0}],isOpen:[{onIsOpenChange:0}],target:[{onTargetChange:0}]}]),f=b,y=function(){"undefined"!=typeof customElements&&["xpl-spotlight","xpl-button","xpl-icon"].forEach((t=>{switch(t){case"xpl-spotlight":customElements.get(n(t))||customElements.define(n(t),b);break;case"xpl-button":customElements.get(n(t))||d();break;case"xpl-icon":customElements.get(n(t))||u()}}))};export{f as XplSpotlight,y as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{p as e,H as t,h as s,c as a,t as l}from"./p-BT_Lq3Vd.js";import{g as n,a as b,t as p}from"./p-Yj_QFaRn.js";const c=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.selected=!1}render(){var e;const t=n(this.el),l=null!==(e=this.target)&&void 0!==e?e:"",c=b(t,l),d=p(t,l);return s(a,{key:"90f81b56f9d1d482ebe9bfb3e11a9b796bdbc5d2","aria-labelledby":d,class:{"xpl-tab-panel":!0,"xpl-tab-panel--selected":this.selected},id:c,role:"tabpanel"},s("slot",{key:"b2de2e79c06bde4bde5c99cc3d91045b1e73b72e"}))}get el(){return this}},[260,"xpl-tab-panel",{selected:[4],target:[1]}]),d=c,r=function(){"undefined"!=typeof customElements&&["xpl-tab-panel"].forEach((e=>{"xpl-tab-panel"===e&&(customElements.get(l(e))||customElements.define(l(e),c))}))};export{d as XplTabPanel,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{p as t,H as s,d as e,h as i,c as a,t as n}from"./p-BT_Lq3Vd.js";import{g as l,t as o,a as r}from"./p-Yj_QFaRn.js";import{d as c}from"./p-D97c0GjM.js";import{d as h}from"./p-B1PBAEzg.js";const u=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.tabChange=e(this,"tabChange",7),this.disabled=!1,this.fullWidth=!1,this.groupDisabled=!1,this.iconPosition="start",this.selected=!1,this.variant="tabs",this.handleTabClick=()=>{this.effectivelyDisabled||this.tabChange.emit(this.target)}}async getFocusableElement(){return this.el.querySelector(this.isSegment?"xpl-button button":".xpl-tab__button")}async setTabIndex(t){const s=await this.getFocusableElement();s&&(s.tabIndex=t)}async focusTrigger(){const t=await this.getFocusableElement();null==t||t.focus()}get a11yIds(){var t;const s=l(this.el),e=null!==(t=this.target)&&void 0!==t?t:"";return{panelId:r(s,e),triggerId:o(s,e)}}get effectivelyDisabled(){return this.disabled||this.groupDisabled}get isSegment(){return"segment"===this.variant}render(){var t;const s=this.isSegment,{panelId:e,triggerId:n}=this.a11yIds,l=this.selected?"true":"false";return i(a,{class:{"xpl-tab":!0,"xpl-tab--selected":this.selected,"xpl-tab--segment":s,"xpl-tab--disabled":this.effectivelyDisabled}},s?i("xpl-button",{controlAttrs:{id:n,role:"tab","aria-controls":e,"aria-selected":l},disabled:this.effectivelyDisabled,fullWidth:this.fullWidth,icon:null!==(t=this.icon)&&void 0!==t?t:"",iconPosition:this.iconPosition,onClick:this.handleTabClick,size:"sm",type:"button",variant:this.selected?"primary":"tertiary"},i("slot",null)):i("button",{"aria-controls":e,"aria-selected":l,class:"xpl-tab__button",disabled:this.effectivelyDisabled,id:n,onClick:this.handleTabClick,role:"tab",type:"button"},i("slot",null)))}get el(){return this}},[260,"xpl-tab",{disabled:[516],fullWidth:[4,"full-width"],groupDisabled:[1540,"data-group-disabled"],icon:[513],iconPosition:[1,"icon-position"],selected:[4],target:[1],variant:[1],getFocusableElement:[64],setTabIndex:[64],focusTrigger:[64]}]),d=u,b=function(){"undefined"!=typeof customElements&&["xpl-tab","xpl-button","xpl-icon"].forEach((t=>{switch(t){case"xpl-tab":customElements.get(n(t))||customElements.define(n(t),u);break;case"xpl-button":customElements.get(n(t))||c();break;case"xpl-icon":customElements.get(n(t))||h()}}))};export{d as XplTab,b as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{p as s,H as e,d as t,h as o,c,t as r}from"./p-BT_Lq3Vd.js";import{d as n}from"./p-BWyAzrwu.js";import{d as i}from"./p-B1PBAEzg.js";const l=s(class extends e{constructor(s){super(),!1!==s&&this.__registerHost(),this.sortChanged=t(this,"sortChanged",7),this.sortable=!1,this.label="",this.type="label",this.sortDirection="none"}toggleSort(){this.sortDirection="asc"===this.sortDirection?"desc":"desc"===this.sortDirection?"none":"asc",this.sortChanged.emit(this.sortDirection)}render(){const s=Array.from(this.el.parentElement.children).indexOf(this.el)+1,e=()=>{switch(this.type){case"label":return o("span",null,this.label);case"checkbox":return o("xpl-checkbox",null);case"icon":return o("xpl-icon",{icon:this.icon,size:20});default:return""}};return o(c,{role:"columnheader","aria-colindex":s,class:"xpl-table-header-cell "+(this.sortable?"sortable":"non-sortable"),style:{width:this.width+"px"}},this.sortable?o("button",{onClick:()=>this.toggleSort()},e(),(()=>{switch(this.sortDirection){case"none":return o("xpl-icon",{class:"sort-icon",icon:"arrow-down",size:16});case"asc":return o("xpl-icon",{class:"sort-icon sort-icon--sorted",icon:"arrow-up",size:16});case"desc":return o("xpl-icon",{class:"sort-icon sort-icon--sorted",icon:"arrow-down",size:16});default:return""}})()):e())}get el(){return this}},[0,"xpl-table-header-cell",{icon:[1],sortable:[4],label:[1],type:[1],width:[2],sortDirection:[32]}]),a=l,h=function(){"undefined"!=typeof customElements&&["xpl-table-header-cell","xpl-checkbox","xpl-icon"].forEach((s=>{switch(s){case"xpl-table-header-cell":customElements.get(r(s))||customElements.define(r(s),l);break;case"xpl-checkbox":customElements.get(r(s))||n();break;case"xpl-icon":customElements.get(r(s))||i()}}))};export{a as XplTableHeaderCell,h as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{p as e,H as a,h as t,c as s,t as c}from"./p-BT_Lq3Vd.js";const r=e(class extends a{constructor(e){super(),!1!==e&&this.__registerHost()}render(){return t(s,{key:"f50c2c0ca2743e47ad44a368a9ea684c57a72261",role:"row",class:"xpl-table-header"},t("slot",{key:"7a61b45818de8675015ca3defb9ee8c3280e961a"}))}},[260,"xpl-table-header"]),l=r,o=function(){"undefined"!=typeof customElements&&["xpl-table-header"].forEach((e=>{"xpl-table-header"===e&&(customElements.get(c(e))||customElements.define(c(e),r))}))};export{l as XplTableHeader,o as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{p as t,H as s,d as e,h as i,c as h,t as a}from"./p-BT_Lq3Vd.js";import{d as l}from"./p-BWyAzrwu.js";import{d as c}from"./p-B1PBAEzg.js";const r=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.tableSelect=e(this,"tableSelect",7),this.sortChanged=e(this,"sortChanged",3),this.selectedValues=[],this.isSortable=!1,this.sortableColumns=[],this.areAllSelected=!1,this.hasScrolled=!1,this.sortTypeArray=[],this.selectAllValue=Math.random().toString(36).slice(2),this.selectAll=t=>{const s=t.detail;this.areAllSelected=s,this.selected=this.selectedValues.length>0?Array.from(this.el.querySelectorAll("tbody td:first-child xpl-checkbox")).map((t=>s?t.value:s)):this.selected.map((()=>s)),this.onChange()},this.selectOne=(t,s)=>{const e=t.detail,{value:i}=t.target;this.selected=this.selected.map(((t,h)=>h!==s?t:this.selectedValues.length>0&&e?i:e)),this.areAllSelected=this.selected.every((t=>!!t)),this.onChange()},this.onChange=()=>{this.tableSelect.emit({selected:this.selected,areAllSelected:this.areAllSelected})},this.onScroll=()=>{this.hasScrolled=this.container.scrollLeft>0},this.sortBy=(t,s)=>{const e=(s,e)=>s[t].toLocaleLowerCase()<e[t].toLocaleLowerCase()?-1:s[t].toLocaleLowerCase()>e[t].toLocaleLowerCase()?1:0;switch(s[t]){case"asc":this.rowData.sort(((t,s)=>e(t,s)));break;case"desc":this.rowData.sort(((t,s)=>e(s,t)));break;default:this.rowData=this.data,this.sortTypeArray[t]=null}this.rowData=Array.from(this.rowData),this.render()},this.setData=()=>{this.rowData=void 0!==this.data?Array.from(this.data):[]},this.setFooterData=()=>{this.rowFooterData=void 0!==this.footer?Array.from(this.footer):[]}}handleSort(t,s,e,i){t.preventDefault(),t.stopPropagation(),s&&(this.sortTypeArray=this.sortTypeArray.map(((t,s)=>{if(s!==e)return null;switch(t){case"asc":return"desc";case"desc":return null;default:return"asc"}})),this.sortChanged.emit({colNum:e,colName:i,sortTypeArr:this.sortTypeArray}).defaultPrevented||this.sortBy(e,this.sortTypeArray))}watchData(){this.setData()}watchFooterData(){this.setFooterData()}watchColumns(){this.sortTypeArray=this.columns?this.columns.map((()=>null)):[]}componentWillLoad(){this.areAllSelected=!1,this.setData(),this.setFooterData(),this.selected=Array(this.rowData.length).fill(!1),this.sortTypeArray=this.columns?this.columns.map((()=>null)):[]}render(){var t;return!this.columns||this.sortTypeArray&&this.sortTypeArray.length===this.columns.length||(this.sortTypeArray=this.columns.map((()=>null))),i(h,{key:"b2ed918c3c434b6403fe6d18619d0a1a5bf864bf"},i("div",{key:"d55accaecba09869f07dcc7030eca5cc1175dd95",class:"xpl-table-container",onScroll:this.onScroll,ref:t=>{this.container=t}},i("table",{key:"6406b92ee6717c80f5f363110fda38fa5bbe61ff",class:{"xpl-table":!0,"xpl-table--striped":this.striped,"xpl-table--freeze":this.freeze,"xpl-table--has-scrolled":this.hasScrolled}},this.columns&&i("thead",{key:"2f89526153301be4ad9ba2f2ec2dac791b4702ae"},this.columns.map(((t,s)=>{var e;const h=(t=>{switch(t){case"asc":return"arrow-up";case"desc":return"arrow-down";default:return"dash"}})(null===(e=this.sortTypeArray)||void 0===e?void 0:e[s]),a=!(!this.isSortable||!this.sortableColumns[s]);return i("th",null,i("label",{onClick:e=>this.handleSort(e,a,s,t.replace(/ /g,"-").toLowerCase()),class:a?"cursor-pointer":""},this.multiselect&&0===s&&i("xpl-checkbox",{checked:this.areAllSelected,indeterminate:!this.areAllSelected&&this.selected.some((t=>t)),onClick:t=>t.stopPropagation(),onCheckboxChange:t=>this.selectAll(t),value:"select-all-"+this.selectAllValue,"aria-label":"Select all rows"}),t,a&&!!this.sortTypeArray[s]&&i("xpl-icon",{icon:h,size:16})))}))),i("tbody",{key:"d1c762bc09191ac0b5b84ade9409d87a726f15f4"},this.rowData.map(((t,s)=>i("tr",{class:this.selected&&this.selected[s]?"xpl-table-row-selected":""},t.map(((t,e)=>i("td",null,this.multiselect&&0===e?i("label",null,i("xpl-checkbox",{checked:!!this.selected[s],onCheckboxChange:t=>this.selectOne(t,s),value:this.selectedValues.length>0?this.selectedValues[s]:"xpl-table-checkbox-"+s,"aria-label":"Select row "+(s+1)}),i("div",{innerHTML:t})):i("div",{innerHTML:t})))))))),(null===(t=this.rowFooterData)||void 0===t?void 0:t.length)>0&&i("tfoot",{key:"99e0e8cbe768f3c565d5fd6328c6e305483bf3f1"},this.rowFooterData.map((t=>i("tr",null,t.map((t=>i("td",null,i("div",{innerHTML:t})))))))))))}get el(){return this}static get watchers(){return{data:[{watchData:0}],footer:[{watchFooterData:0}],columns:[{watchColumns:0}]}}},[0,"xpl-table",{columns:[16],data:[16],footer:[16],freeze:[4],multiselect:[4],striped:[4],selectedValues:[16],isSortable:[4,"is-sortable"],sortableColumns:[16],areAllSelected:[32],rowData:[32],rowFooterData:[32],hasScrolled:[32],selected:[32],sortTypeArray:[32]},void 0,{data:[{watchData:0}],footer:[{watchFooterData:0}],columns:[{watchColumns:0}]}]),o=r,n=function(){"undefined"!=typeof customElements&&["xpl-table","xpl-checkbox","xpl-icon"].forEach((t=>{switch(t){case"xpl-table":customElements.get(a(t))||customElements.define(a(t),r);break;case"xpl-checkbox":customElements.get(a(t))||l();break;case"xpl-icon":customElements.get(a(t))||c()}}))};export{o as XplTable,n as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{p as t,H as s,d as e,h as i,c as a,t as n}from"./p-BT_Lq3Vd.js";import{d as o}from"./p-3qMYyqTe.js";import{d as l}from"./p-U5dPMCXE.js";import{d as h}from"./p-Ds28UyUR.js";import{d}from"./p-BG0-6Xek.js";import{d as r}from"./p-B1PBAEzg.js";import{d as c}from"./p-CFW_w5Wj.js";import{d as p}from"./p-DEl4Rvzs.js";let b=0;function u(t){var e,i;const a=t.querySelector("xpl-button button");if(a){const t=a.cloneNode(!0);if(t instanceof s){t.querySelectorAll(".xpl-button__icon, xpl-icon").forEach((t=>t.remove()));const s=null===(e=t.textContent)||void 0===e?void 0:e.replace(/\s+/g," ").trim();if(s)return s}}const n=t.querySelector(".xpl-tab__button");return n?Array.from(n.childNodes).filter((t=>t.nodeType===Node.TEXT_NODE)).map((t=>{var s;return(null!==(s=t.textContent)&&void 0!==s?s:"").trim()})).join(" "):null!==(i=t.getAttribute("target"))&&void 0!==i?i:""}const m=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.tabChange=e(this,"tabChange",7),this.tabHeadings=[],this.tabPanels=[],this.tablistKeydownBound=!1,this.activeBarPosition={left:0,width:0},this.choicesTick=1,this.isMobileSelectChange=!1,this.selectedValue="",this.disabled=!1,this.fullWidth=!1,this.type="tabs",this.handleTabChange=t=>{this.applySelection(t)},this.onTablistKeydown=async t=>{var s,e;if(this.disabled)return;const i=null===(e=null===(s=t.target)||void 0===s?void 0:s.closest)||void 0===e?void 0:e.call(s,"xpl-tab");if(!i||!this.tabHeadings.includes(i))return;const{key:a}=t;let n=!1,o=!1;this.isTablistRtl()?"ArrowLeft"===a||"ArrowDown"===a?n=!0:"ArrowRight"!==a&&"ArrowUp"!==a||(o=!0):"ArrowRight"===a||"ArrowDown"===a?n=!0:"ArrowLeft"!==a&&"ArrowUp"!==a||(o=!0);const l=n||o,h="Home"===a;if(!l&&!h&&"End"!==a)return;const d=this.getEnabledTabHeadingsSync();if(0===d.length)return;const r=d.indexOf(i);if(-1===r)return;let c;c=l?n?(r+1)%d.length:(r-1+d.length)%d.length:h?0:d.length-1;const p=d[c],b=null==p?void 0:p.getAttribute("target");if(!b)return;const u=i.getAttribute("target");t.preventDefault(),b!==u&&(this.applySelection(b),await p.focusTrigger(),this.tabChange.emit(b))}}onDisabledChanged(){this.syncGroupDisabledOnTabs(),this.disabled||this.syncRovingTabindex()}onFullWidthChanged(){this.syncFullWidthOnTabs()}onTypeChanged(){this.syncVariantOnTabs()}onValueChanged(t){this.applySelection(t)}connectedCallback(){this.el.hasAttribute("data-tabs-instance-id")||(b+=1,this.el.setAttribute("data-tabs-instance-id","xpl-tg-"+b)),"undefined"!=typeof MutationObserver&&(this.observer=new MutationObserver((()=>{this.collectTabs(!0)})),this.observer.observe(this.el,{childList:!0,subtree:!0}))}disconnectedCallback(){var t;null===(t=this.observer)||void 0===t||t.disconnect(),this.headingsContainerRef&&this.tablistKeydownBound&&(this.headingsContainerRef.removeEventListener("keydown",this.onTablistKeydown),this.tablistKeydownBound=!1),void 0!==this.rafId&&(cancelAnimationFrame(this.rafId),this.rafId=void 0)}componentWillLoad(){this.selectedValue=this.getDefaultValue()}componentDidLoad(){this.collectTabs(!1),this.attachTablistKeydown()}componentDidUpdate(){this.updateActiveBarPosition(),this.syncRovingTabindex()}componentDidRender(){!this.tablistKeydownBound&&this.headingsContainerRef&&this.attachTablistKeydown()}onWindowResize(){this.updateActiveBarPosition()}syncGroupDisabledOnTabs(){this.tabHeadings.forEach((t=>{this.disabled?t.setAttribute("data-group-disabled",""):t.removeAttribute("data-group-disabled")}))}applySelection(t){this.tabHeadings.forEach((s=>{t===s.getAttribute("target")?s.setAttribute("selected",""):s.removeAttribute("selected")})),this.tabPanels.forEach((s=>{t===s.getAttribute("target")?s.setAttribute("selected",""):s.removeAttribute("selected")})),this.syncGroupDisabledOnTabs(),void 0!==this.rafId&&cancelAnimationFrame(this.rafId),this.rafId=requestAnimationFrame((()=>{this.rafId=void 0,this.selectedValue=t,this.updateActiveBarPosition(),this.syncRovingTabindex()}))}isOwnedTabOrPanel(t){return t.closest("xpl-tabs")===this.el}collectTabs(t){this.tabHeadings=Array.from(this.el.querySelectorAll("xpl-tab")).filter((t=>this.isOwnedTabOrPanel(t))),this.tabPanels=Array.from(this.el.querySelectorAll("xpl-tab-panel")).filter((t=>this.isOwnedTabOrPanel(t))),this.syncVariantOnTabs(),this.syncFullWidthOnTabs(),this.applySelection(this.getDefaultValue()),t&&(this.choicesTick+=1)}syncVariantOnTabs(){this.tabHeadings.forEach((t=>{t.variant=this.type}))}syncFullWidthOnTabs(){this.tabHeadings.forEach((t=>{t.fullWidth=this.fullWidth}))}getDefaultValue(){var t,s;return this.value||(null===(s=null===(t=this.tabHeadings)||void 0===t?void 0:t[0])||void 0===s?void 0:s.getAttribute("target"))||""}async syncRovingTabindex(){this.disabled||await Promise.all(this.tabHeadings.map((async t=>{var s;const e=(null!==(s=t.getAttribute("target"))&&void 0!==s?s:"")===this.selectedValue;await t.setTabIndex(e?0:-1)})))}getEnabledTabHeadingsSync(){return this.tabHeadings.filter((t=>{if(this.disabled||t.hasAttribute("disabled"))return!1;const s=t.querySelector("segment"===t.variant?"xpl-button button":".xpl-tab__button");return!(!s||s.disabled)}))}attachTablistKeydown(){const t=this.headingsContainerRef;t&&!this.tablistKeydownBound&&(t.addEventListener("keydown",this.onTablistKeydown),this.tablistKeydownBound=!0)}isTablistRtl(){const t=this.headingsContainerRef;return!!t&&"rtl"===getComputedStyle(t).direction}renderChoices(){return this.tabHeadings.map((t=>{var s;const e=null!==(s=t.getAttribute("target"))&&void 0!==s?s:"",i=this.disabled||t.hasAttribute("disabled"),a="segment"===this.type&&t.getAttribute("icon")||void 0;return Object.assign({label:u(t),value:e,isDisabled:i},a?{icon:a}:{})}))}updateActiveBarPosition(){if("segment"===this.type)return;const t=this.tabHeadings.find((t=>t.getAttribute("target")===this.selectedValue));if(!this.headingsContainerRef||!t)return;const s=t.getBoundingClientRect(),e=this.headingsContainerRef.getBoundingClientRect(),i=s.left-e.left,a=s.width;this.activeBarPosition.left===i&&this.activeBarPosition.width===a||(this.activeBarPosition={left:i,width:a})}mobileSelectClassNames(){const t="xpl-tabs__mobile-select";return"segment"===this.type?t+" xpl-tabs__mobile-select--segment":t}render(){const t="segment"===this.type;return i(a,{key:"a030a35038572d70f3fb2b979adbaa56d77a1d49",class:{"xpl-tabs":!0,"xpl-tabs--full-width":this.fullWidth,"xpl-tabs--segment":t},"data-choices-tick":this.choicesTick},i("xpl-select",{key:"8260974c68020dea475f6e0780c766abfca94fda",classNames:this.mobileSelectClassNames(),choices:this.renderChoices(),disabled:this.disabled,selectedValues:this.selectedValue,onDropdownStateChange:t=>{t.detail&&(this.isMobileSelectChange=!0)},onChangeEvent:t=>{if(this.isMobileSelectChange){const s=""+t.detail;this.handleTabChange(s),this.tabChange.emit(s),this.isMobileSelectChange=!1}}}),i("nav",{key:"73a1e4ad4830b9b22b4eee00bad5793705cf3ac3","aria-orientation":"horizontal",class:"xpl-tabs__headings",role:"tablist",ref:t=>{this.headingsContainerRef=t},onTabChange:t=>{t.stopPropagation(),this.isMobileSelectChange=!1,this.handleTabChange(t.detail),this.tabChange.emit(t.detail)}},!t&&i("div",{key:"8008620a99470824fe61ea535fb46a3dea75afc3",class:"xpl-tabs__active-bar",style:{transform:`translateX(${this.activeBarPosition.left}px)`,width:this.activeBarPosition.width+"px"}}),i("slot",{key:"be53fe549e5b9c887ad90cbafcc8f95631361fee",name:"heading"})),i("div",{key:"d97b138b5fcb0207684698752ec72c1dcd9464a3",class:"xpl-tabs__panels"},i("slot",{key:"fe40edbf2c9f20d02d75ab62a142e7df04ef0afd",name:"panel"})))}get el(){return this}static get watchers(){return{disabled:[{onDisabledChanged:0}],fullWidth:[{onFullWidthChanged:0}],type:[{onTypeChanged:0}],value:[{onValueChanged:0}]}}},[260,"xpl-tabs",{disabled:[4],fullWidth:[4,"full-width"],type:[513],value:[1],activeBarPosition:[32],choicesTick:[32],isMobileSelectChange:[32],selectedValue:[32]},[[9,"resize","onWindowResize"]],{disabled:[{onDisabledChanged:0}],fullWidth:[{onFullWidthChanged:0}],type:[{onTypeChanged:0}],value:[{onValueChanged:0}]}]),f=m,g=function(){"undefined"!=typeof customElements&&["xpl-tabs","xpl-dropdown","xpl-dropdown-group","xpl-dropdown-heading","xpl-dropdown-option","xpl-icon","xpl-select","xpl-tag"].forEach((t=>{switch(t){case"xpl-tabs":customElements.get(n(t))||customElements.define(n(t),m);break;case"xpl-dropdown":customElements.get(n(t))||o();break;case"xpl-dropdown-group":customElements.get(n(t))||l();break;case"xpl-dropdown-heading":customElements.get(n(t))||h();break;case"xpl-dropdown-option":customElements.get(n(t))||d();break;case"xpl-icon":customElements.get(n(t))||r();break;case"xpl-select":customElements.get(n(t))||c();break;case"xpl-tag":customElements.get(n(t))||p()}}))};export{f as XplTabs,g as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{T as
|
|
1
|
+
import{T as s,d as o}from"./p-DEl4Rvzs.js";const p=s,r=o;export{p as XplTag,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{p as t,H as s,h as e,c as i,t as c}from"./p-BT_Lq3Vd.js";import{d as a}from"./p-B1PBAEzg.js";const o=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.variant="neutral",this.showIcon=!0,this.dismissable=!0,this.timeout=8e3,this.handleAnimationEnd=()=>{var t,s;(null===(t=this.el)||void 0===t?void 0:t.classList.contains("xpl-toast--dismissed"))&&(null===(s=this.el)||void 0===s||s.remove())},this.getIcon=()=>{switch(this.variant){case"warning":return e("xpl-icon",{size:24,icon:"alert-hex"});case"success":return e("xpl-icon",{size:24,icon:"check-circle"});default:return e("xpl-icon",{size:24,icon:"comment-alt"})}},this.dismiss=()=>{var t;null===(t=this.el)||void 0===t||t.classList.add("xpl-toast--dismissed")}}componentDidLoad(){this.actionSlot.children.length<1&&setTimeout((()=>{this.dismiss()}),this.timeout)}render(){var t;return e(i,{key:"8b53818d7882160ab13ba700520c2c54f3d0b630",class:"xpl-toast xpl-toast--"+this.variant,onAnimationEnd:this.handleAnimationEnd},e("div",{key:"6cc47a618684dacf1031bdacfc6cb9134db659e1",class:"xpl-toast__left"},this.showIcon&&e("div",{key:"2360e3bb5d173d97fb63e3ff2069ef6ac53f2a7d",class:"xpl-toast__icon xpl-toast__icon--"+this.variant},this.getIcon()),e("div",{key:"e4c318a21bf17d951deade92c9288791b6664a4f",class:"xpl-toast__notification"},e("p",{key:"6697407277294d71106c9429f5822966572c1f06",class:"xpl-toast__title"},e("slot",{key:"108769cc76b1ed7b42ad436885831d9e7fd4412f",name:"title"})),""!==this.caption&&e("p",{key:"7570a85eaebbd9c236841541557324b45c86dab6",class:"xpl-toast__caption"},null===(t=this.caption)||void 0===t?void 0:t.substring(0,85)))),e("div",{key:"b5f98b93c56f877d6c749c82550aad3b86bb3786",class:"xpl-toast__action",ref:t=>{this.actionSlot=t}},e("slot",{key:"c2007b4a30836c3a1b071539029c1290875bdd2c",name:"action"})),this.dismissable&&e("div",{key:"f0706d95d8091beb32dfbe1535ebbdfb1ce9a018",class:"xpl-toast__close"},e("button",{key:"b1415be4d68035d21857f688f16558470cca2f81",tabIndex:0,onClick:this.dismiss},e("xpl-icon",{key:"61ba3accb69a2637190b5ee3a4f7105fdf896af7",icon:"x"}))))}get el(){return this}},[260,"xpl-toast",{variant:[1],showIcon:[4,"show-icon"],caption:[1],dismissable:[4],timeout:[2]}]),n=o,d=function(){"undefined"!=typeof customElements&&["xpl-toast","xpl-icon"].forEach((t=>{switch(t){case"xpl-toast":customElements.get(c(t))||customElements.define(c(t),o);break;case"xpl-icon":customElements.get(c(t))||a()}}))};export{n as XplToast,d as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{p as e,H as s,d as t,h as l,c as i,t as a}from"./p-BT_Lq3Vd.js";import{v as c}from"./p-CK3_k8jD.js";const d=e(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.toggleChange=t(this,"toggleChange",7),this.variant="default",this.id=c(),this.onChange=e=>{this.toggleChange.emit(e.target.checked)}}render(){let e="xpl-toggle-container";this.disabled&&(e+=" xpl-toggle-container--disabled");let s="xpl-toggle";return"small"===this.variant&&(s+=" xpl-toggle--small"),l(i,{key:"bc7363fd59d7cc10f0df644b5c54021ce860dbbc",class:e},(this.heading||this.description)&&l("label",{key:"06b031581d173694651e58265b287865daeaf22b",class:{"xpl-label":!0,"xpl-label--disabled":this.disabled},htmlFor:this.id},this.heading,this.description&&l("small",{key:"a633107a6dcc2c0c43cd626c3013876831535588",class:{"xpl-description":!0,"xpl-description--disabled":this.disabled}},this.description)),l("input",{key:"fc1d734118dafc0a5f64119eb91d19e8af1254a6",class:s,type:"checkbox",checked:this.checked,disabled:this.disabled,id:this.id,name:this.name,onChange:this.onChange}),this.label&&l("label",{key:"7f1a465da3ec136c11797746505c0629fe2d31a9",htmlFor:this.id},this.label))}},[0,"xpl-toggle",{checked:[4],description:[1],disabled:[4],heading:[1],label:[1],name:[1],variant:[1],id:[32]}]),h=d,o=function(){"undefined"!=typeof customElements&&["xpl-toggle"].forEach((e=>{"xpl-toggle"===e&&(customElements.get(a(e))||customElements.define(a(e),d))}))};export{h as XplToggle,o as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{p as e,H as t,h as s,c as a,t as c}from"./p-BT_Lq3Vd.js";const o=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.selectedItemCount=0}componentDidLoad(){const e=this.el.querySelector('[slot="actions-right"]');null!==e&&(e.style.marginLeft="auto")}listenToSelectedItemCountChange(e){this.selectedItemCount=e.detail.length}render(){return s(a,{key:"782235b9cb7a50f4ba1a38ce2add940a051167a9",class:{"xpl-toolbar":!0,dark:!0,hidden:0===this.selectedItemCount}},s("div",{key:"cb29423baac9e936ea02d4e177966161cb0f0486",class:"toolbar"},s("p",{key:"484e52174e0b11b158e4865cdc62fa05136eac2d",class:"selected-item-count"},this.selectedItemCount," Selected"),s("div",{key:"51ba928ccfae827b73f67348b64e34a14d36c235",class:"actions"},s("slot",{key:"f96d57f3e6101a277a0195e072f69b63d5b29671",name:"actions-left"}),s("slot",{key:"278f41ab191c18479f9c99a531ca7636be571478",name:"actions-right"}))))}get el(){return this}},[260,"xpl-toolbar",{selectedItemCount:[2,"selected-item-count"]},[[8,"selectedItemCountChange","listenToSelectedItemCountChange"]]]),n=o,l=function(){"undefined"!=typeof customElements&&["xpl-toolbar"].forEach((e=>{"xpl-toolbar"===e&&(customElements.get(c(e))||customElements.define(c(e),o))}))};export{n as XplToolbar,l as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{T as o,d as
|
|
1
|
+
import{T as o,d as s}from"./p-CGNq3DyC.js";const p=o,r=s;export{p as XplTooltip,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{T as
|
|
1
|
+
import{T as s,d as o}from"./p-Bs6vq0C6.js";const p=s,r=o;export{p as XplTopNavItem,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as t,HTMLElement as s,createEvent as e,h as i,Host as n,transformTag as o}from"@stencil/core/internal/client";import{d as a}from"./xpl-button2.js";import{d as l}from"./xpl-icon2.js";import{d as r}from"./xpl-popover2.js";import{d as h}from"./xpl-top-nav-item2.js";const c=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.brandClick=e(this,"brandClick",7),this.navOpen=e(this,"navOpen",7),this.userPopoverDrawerSyncHost=null,this.brandLogoSlotPresent=!1,this.open=!1,this.userMenuSlotPresent=!1,this.userMenuTriggerSlotPresent=!1,this.focusNavControlAfterClose=()=>{void 0!==this.navControlFocusTimeoutId&&clearTimeout(this.navControlFocusTimeoutId),this.navControlFocusTimeoutId=setTimeout((()=>{var t;this.navControlFocusTimeoutId=void 0,null===(t=this.el.querySelector(".xpl-top-nav__nav-control"))||void 0===t||t.focus()}),0)},this.handleUserPopoverIsOpenChange=t=>{const{detail:s}=t;!0===s&&this.closeMobileDrawerWhenAccountMenuOpens()},this.onBrandNavItemClick=t=>{null==this.brandHref&&this.brandClick.emit(t.detail)},this.onDocKeyDownEscape=t=>{this.navControl&&this.open&&"Escape"===t.key&&(this.anyDescendantPopoverIsOpen()||this.el.querySelector("xpl-top-nav-item.xpl-top-nav-item--dropdown-open")||(t.preventDefault(),t.stopPropagation(),this.open=!1,this.navOpen.emit(!1),this.focusNavControlAfterClose()))},this.onNavToggle=()=>{const t=this.open;this.open=!this.open,this.navOpen.emit(this.open),t&&!this.open&&this.focusNavControlAfterClose()},this.onUserPopoverInnerOpenClassChange=()=>{const t=this.userPopoverDrawerSyncHost;if(!t)return;const s=t.querySelector(".xpl-popover");(null==s?void 0:s.classList.contains("xpl-popover--is-open"))&&this.closeMobileDrawerWhenAccountMenuOpens()},this.syncBrandLogoSlot=()=>{const t=null!=this.el.querySelector('[slot="brand-logo"]');t!==this.brandLogoSlotPresent&&(this.brandLogoSlotPresent=t)},this.syncUserMenuSlots=()=>{const t=null!=this.el.querySelector('[slot="user-menu"]'),s=null!=this.el.querySelector('[slot="user-menu-trigger"]');t!==this.userMenuSlotPresent&&(this.userMenuSlotPresent=t),s!==this.userMenuTriggerSlotPresent&&(this.userMenuTriggerSlotPresent=s)}}onNavControlChanged(){this.syncOpenFromNavControl(),this.syncDocEscapeListener()}connectedCallback(){this.syncOpenFromNavControl(),this.syncDocEscapeListener(),this.syncBrandLogoSlot(),this.syncUserMenuSlots(),this.connectSlotContentObserver()}disconnectedCallback(){void 0!==this.navControlFocusTimeoutId&&(clearTimeout(this.navControlFocusTimeoutId),this.navControlFocusTimeoutId=void 0),void 0!==this.deferredSlotContentObserverSyncTimeoutId&&(clearTimeout(this.deferredSlotContentObserverSyncTimeoutId),this.deferredSlotContentObserverSyncTimeoutId=void 0),this.removeDocEscapeListener(),this.disconnectSlotContentObserver(),this.disconnectUserPopoverDrawerSync()}componentWillLoad(){this.syncOpenFromNavControl(),this.syncBrandLogoSlot(),this.syncUserMenuSlots()}componentWillRender(){this.disconnectSlotContentObserver()}componentDidRender(){this.connectSlotContentObserver(),this.connectUserPopoverDrawerSync()}get childAccountLabelText(){var t,s;return null!==(s=null===(t=this.childAccountLabel)||void 0===t?void 0:t.trim())&&void 0!==s?s:""}get hasBrand(){var t,s,e,i;const n=null!==(s=null===(t=this.brandName)||void 0===t?void 0:t.trim())&&void 0!==s?s:"",o=null!==(i=null===(e=this.brandLogo)||void 0===e?void 0:e.trim())&&void 0!==i?i:"";return n.length>0||o.length>0||this.brandLogoSlotPresent}get hasUserMenu(){return this.userMenuSlotPresent}get needsUserMenuSlotStash(){return!this.userMenuSlotPresent&&this.userMenuTriggerSlotPresent}get usesBuiltInChildAccountTrigger(){return this.hasUserMenu&&!this.userMenuTriggerSlotPresent}anyDescendantPopoverIsOpen(){const t=this.el.querySelectorAll("xpl-popover");for(let s=0;s<t.length;s+=1){const e=t[s].querySelector(".xpl-popover");if(null==e?void 0:e.classList.contains("xpl-popover--is-open"))return!0}return!1}closeMobileDrawerWhenAccountMenuOpens(){this.navControl&&this.open&&(this.open=!1,this.navOpen.emit(!1))}connectSlotContentObserver(){this.disconnectSlotContentObserver(),"undefined"!=typeof MutationObserver&&(this.slotContentObserver=new MutationObserver((()=>{this.scheduleSlotContentSyncFromObserver()})),this.slotContentObserver.observe(this.el,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["slot"]}))}connectUserPopoverDrawerSync(){const t=this.hasUserMenu?this.el.querySelector("xpl-popover.xpl-top-nav__user-popover"):null;if(t===this.userPopoverDrawerSyncHost)return;if(this.disconnectUserPopoverDrawerSync(),!t)return;this.userPopoverDrawerSyncHost=t,t.addEventListener("isOpenChange",this.handleUserPopoverIsOpenChange);const s=t.querySelector(".xpl-popover");s&&"undefined"!=typeof MutationObserver&&(this.userPopoverDrawerOpenObserver=new MutationObserver((()=>{this.onUserPopoverInnerOpenClassChange()})),this.userPopoverDrawerOpenObserver.observe(s,{attributes:!0,attributeFilter:["class"]}),this.onUserPopoverInnerOpenClassChange())}disconnectSlotContentObserver(){var t;null===(t=this.slotContentObserver)||void 0===t||t.disconnect(),this.slotContentObserver=void 0}disconnectUserPopoverDrawerSync(){var t;this.userPopoverDrawerSyncHost&&(this.userPopoverDrawerSyncHost.removeEventListener("isOpenChange",this.handleUserPopoverIsOpenChange),this.userPopoverDrawerSyncHost=null),null===(t=this.userPopoverDrawerOpenObserver)||void 0===t||t.disconnect(),this.userPopoverDrawerOpenObserver=void 0}removeDocEscapeListener(){this.el.ownerDocument.removeEventListener("keydown",this.onDocKeyDownEscape,!1)}scheduleSlotContentSyncFromObserver(){void 0!==this.deferredSlotContentObserverSyncTimeoutId&&clearTimeout(this.deferredSlotContentObserverSyncTimeoutId),this.deferredSlotContentObserverSyncTimeoutId=setTimeout((()=>{this.deferredSlotContentObserverSyncTimeoutId=void 0,this.el.isConnected&&(this.syncBrandLogoSlot(),this.syncUserMenuSlots())}),0)}syncDocEscapeListener(){this.removeDocEscapeListener(),this.navControl&&this.el.ownerDocument.addEventListener("keydown",this.onDocKeyDownEscape,!1)}syncOpenFromNavControl(){const t=this.open;this.open=!1,t&&!this.navControl&&this.navOpen.emit(!1)}render(){var t,s,e,o;return i(n,{key:"9f65d609c6b4cf08b2899216fe8bc70fe0e12db9",class:{"xpl-top-nav":!0,"xpl-top-nav--nav-control":!!this.navControl,"xpl-top-nav--open":this.open,"xpl-top-nav--has-child-account-label":this.childAccountLabelText.length>0,"xpl-top-nav--has-brand":this.hasBrand,"xpl-top-nav--has-user-menu":this.hasUserMenu,dark:!0}},i("nav",{key:"a3d613acbe13866886bca363372127e8e869ec2c","aria-label":null!==(t=this.label)&&void 0!==t?t:"top-navigation-bar",class:"xpl-top-nav__bar"},i("div",{key:"b7057ef80f36e98def53bbfc2a39bd30bacd9b4c",class:"xpl-top-nav__inner-left"},this.navControl&&i("button",{key:"3c4091842c7e4c1a62fea5446f6e29486617b11a",type:"button",class:"xpl-top-nav__nav-control","aria-expanded":this.open?"true":"false","aria-label":this.open?"Close navigation menu":"Open navigation menu",onClick:this.onNavToggle},i("xpl-icon",{key:"cd5fd2cd1cf1dae5c765b63678e14cb87588c3b2",class:"xpl-top-nav__control-icon",icon:"menu",size:20})),this.hasBrand&&i("div",{key:"3cabfe3ce8ff58d9aed0ed9b4adccd896f6cad08",class:"xpl-top-nav__brand-bar"},i("xpl-top-nav-item",{key:"bca3924f36affd16b6c17d0d8cc1ccc57c488ef6",class:"xpl-top-nav__brand",href:this.brandHref,onNavItemClick:this.onBrandNavItemClick},(null===(s=this.brandLogo)||void 0===s?void 0:s.trim())?i("img",{class:"xpl-top-nav__brand-logo",src:this.brandLogo,alt:(null===(e=this.brandName)||void 0===e?void 0:e.trim())?this.brandName.trim():"Brand"}):this.brandLogoSlotPresent?i("span",{class:"xpl-top-nav__brand-logo-slot"},i("slot",{name:"brand-logo"})):null,(null===(o=this.brandName)||void 0===o?void 0:o.trim())?i("span",{class:"xpl-top-nav__brand-name"},this.brandName.trim()):null)),i("div",{key:"1e9a1af5fbeca22c0f440556c121c38b8528d9ba",class:{"xpl-top-nav__aside":!0,"xpl-nav-left":!0}},i("div",{key:"b5d67e1adf5bc6a751be3d8bfa448bdb682039bc",class:"xpl-top-nav__left-primary",role:"list"},i("slot",{key:"c738eb6fbda41c8320fa2645fb88f43ef11731b6",name:"left-aside"})))),i("div",{key:"8573832a3922746b2301f9bc8b4fa6ab7e1ac441",class:{"xpl-top-nav__aside":!0,"xpl-nav-right":!0}},i("div",{key:"a21b318496a47000cde7a0346d3376999e7893ea",class:"xpl-nav-right__list"},i("div",{key:"5934e7d3976b13abba77b4361b4fe1c6f49bcc2e",class:"xpl-top-nav__right-rail"},i("div",{key:"49b44ea3d59eec32d6859978754e81ce6acc1bec",class:"xpl-top-nav__right-lead"},i("slot",{key:"054671b75354700b873a85f08998a14d7fc7073b",name:"right-aside"})),this.hasUserMenu?i("div",{class:"xpl-top-nav__right-user"},i("xpl-popover",{class:"xpl-top-nav__user-popover dark",position:"bottom-end",display:"menu"},this.userMenuTriggerSlotPresent?i("slot",{name:"user-menu-trigger",slot:"trigger"}):this.usesBuiltInChildAccountTrigger?i("xpl-button",{slot:"trigger",class:"xpl-top-nav__child-account-trigger",type:"button",variant:"tertiary",icon:"chevron-down",iconPosition:"end",iconOnly:0===this.childAccountLabelText.length,"aria-haspopup":"dialog","aria-label":this.childAccountLabelText.length>0?void 0:"Open account menu"},this.childAccountLabelText.length>0?this.childAccountLabelText:null):null,i("div",{class:"xpl-top-nav__user-menu-panel"},i("slot",{name:"user-menu"})))):null,this.needsUserMenuSlotStash?i("div",{class:"xpl-top-nav__user-menu-stash",hidden:!0,"aria-hidden":"true"},i("slot",{name:"user-menu-trigger"}),i("slot",{name:"user-menu"})):null)))))}get el(){return this}static get watchers(){return{navControl:[{onNavControlChanged:0}]}}},[260,"xpl-top-nav",{brandHref:[1,"brand-href"],brandLogo:[1,"brand-logo"],brandName:[1,"brand-name"],childAccountLabel:[1,"child-account-label"],label:[1],navControl:[516,"nav-control"],brandLogoSlotPresent:[32],open:[32],userMenuSlotPresent:[32],userMenuTriggerSlotPresent:[32]},void 0,{navControl:[{onNavControlChanged:0}]}]),p=c,d=function(){"undefined"!=typeof customElements&&["xpl-top-nav","xpl-button","xpl-icon","xpl-popover","xpl-top-nav-item"].forEach((t=>{switch(t){case"xpl-top-nav":customElements.get(o(t))||customElements.define(o(t),c);break;case"xpl-button":customElements.get(o(t))||a();break;case"xpl-icon":customElements.get(o(t))||l();break;case"xpl-popover":customElements.get(o(t))||r();break;case"xpl-top-nav-item":customElements.get(o(t))||h()}}))};export{p as XplTopNav,d as defineCustomElement}
|
|
1
|
+
import{p as t,H as s,d as e,h as i,c as n,t as o}from"./p-BT_Lq3Vd.js";import{d as a}from"./p-D97c0GjM.js";import{d as l}from"./p-B1PBAEzg.js";import{d as r}from"./p-Bn-27-xj.js";import{d as h}from"./p-Bs6vq0C6.js";const p=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.brandClick=e(this,"brandClick",7),this.navOpen=e(this,"navOpen",7),this.userPopoverDrawerSyncHost=null,this.brandLogoSlotPresent=!1,this.open=!1,this.userMenuSlotPresent=!1,this.userMenuTriggerSlotPresent=!1,this.focusNavControlAfterClose=()=>{void 0!==this.navControlFocusTimeoutId&&clearTimeout(this.navControlFocusTimeoutId),this.navControlFocusTimeoutId=setTimeout((()=>{var t;this.navControlFocusTimeoutId=void 0,null===(t=this.el.querySelector(".xpl-top-nav__nav-control"))||void 0===t||t.focus()}),0)},this.handleUserPopoverIsOpenChange=t=>{const{detail:s}=t;!0===s&&this.closeMobileDrawerWhenAccountMenuOpens()},this.onBrandNavItemClick=t=>{null==this.brandHref&&this.brandClick.emit(t.detail)},this.onDocKeyDownEscape=t=>{this.navControl&&this.open&&"Escape"===t.key&&(this.anyDescendantPopoverIsOpen()||this.el.querySelector("xpl-top-nav-item.xpl-top-nav-item--dropdown-open")||(t.preventDefault(),t.stopPropagation(),this.open=!1,this.navOpen.emit(!1),this.focusNavControlAfterClose()))},this.onNavToggle=()=>{const t=this.open;this.open=!this.open,this.navOpen.emit(this.open),t&&!this.open&&this.focusNavControlAfterClose()},this.onUserPopoverInnerOpenClassChange=()=>{const t=this.userPopoverDrawerSyncHost;if(!t)return;const s=t.querySelector(".xpl-popover");(null==s?void 0:s.classList.contains("xpl-popover--is-open"))&&this.closeMobileDrawerWhenAccountMenuOpens()},this.syncBrandLogoSlot=()=>{const t=null!=this.el.querySelector('[slot="brand-logo"]');t!==this.brandLogoSlotPresent&&(this.brandLogoSlotPresent=t)},this.syncUserMenuSlots=()=>{const t=null!=this.el.querySelector('[slot="user-menu"]'),s=null!=this.el.querySelector('[slot="user-menu-trigger"]');t!==this.userMenuSlotPresent&&(this.userMenuSlotPresent=t),s!==this.userMenuTriggerSlotPresent&&(this.userMenuTriggerSlotPresent=s)}}onNavControlChanged(){this.syncOpenFromNavControl(),this.syncDocEscapeListener()}connectedCallback(){this.syncOpenFromNavControl(),this.syncDocEscapeListener(),this.syncBrandLogoSlot(),this.syncUserMenuSlots(),this.connectSlotContentObserver()}disconnectedCallback(){void 0!==this.navControlFocusTimeoutId&&(clearTimeout(this.navControlFocusTimeoutId),this.navControlFocusTimeoutId=void 0),void 0!==this.deferredSlotContentObserverSyncTimeoutId&&(clearTimeout(this.deferredSlotContentObserverSyncTimeoutId),this.deferredSlotContentObserverSyncTimeoutId=void 0),this.removeDocEscapeListener(),this.disconnectSlotContentObserver(),this.disconnectUserPopoverDrawerSync()}componentWillLoad(){this.syncOpenFromNavControl(),this.syncBrandLogoSlot(),this.syncUserMenuSlots()}componentWillRender(){this.disconnectSlotContentObserver()}componentDidRender(){this.connectSlotContentObserver(),this.connectUserPopoverDrawerSync()}get childAccountLabelText(){var t,s;return null!==(s=null===(t=this.childAccountLabel)||void 0===t?void 0:t.trim())&&void 0!==s?s:""}get hasBrand(){var t,s,e,i;const n=null!==(s=null===(t=this.brandName)||void 0===t?void 0:t.trim())&&void 0!==s?s:"",o=null!==(i=null===(e=this.brandLogo)||void 0===e?void 0:e.trim())&&void 0!==i?i:"";return n.length>0||o.length>0||this.brandLogoSlotPresent}get hasUserMenu(){return this.userMenuSlotPresent}get needsUserMenuSlotStash(){return!this.userMenuSlotPresent&&this.userMenuTriggerSlotPresent}get usesBuiltInChildAccountTrigger(){return this.hasUserMenu&&!this.userMenuTriggerSlotPresent}anyDescendantPopoverIsOpen(){const t=this.el.querySelectorAll("xpl-popover");for(let s=0;s<t.length;s+=1){const e=t[s].querySelector(".xpl-popover");if(null==e?void 0:e.classList.contains("xpl-popover--is-open"))return!0}return!1}closeMobileDrawerWhenAccountMenuOpens(){this.navControl&&this.open&&(this.open=!1,this.navOpen.emit(!1))}connectSlotContentObserver(){this.disconnectSlotContentObserver(),"undefined"!=typeof MutationObserver&&(this.slotContentObserver=new MutationObserver((()=>{this.scheduleSlotContentSyncFromObserver()})),this.slotContentObserver.observe(this.el,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["slot"]}))}connectUserPopoverDrawerSync(){const t=this.hasUserMenu?this.el.querySelector("xpl-popover.xpl-top-nav__user-popover"):null;if(t===this.userPopoverDrawerSyncHost)return;if(this.disconnectUserPopoverDrawerSync(),!t)return;this.userPopoverDrawerSyncHost=t,t.addEventListener("isOpenChange",this.handleUserPopoverIsOpenChange);const s=t.querySelector(".xpl-popover");s&&"undefined"!=typeof MutationObserver&&(this.userPopoverDrawerOpenObserver=new MutationObserver((()=>{this.onUserPopoverInnerOpenClassChange()})),this.userPopoverDrawerOpenObserver.observe(s,{attributes:!0,attributeFilter:["class"]}),this.onUserPopoverInnerOpenClassChange())}disconnectSlotContentObserver(){var t;null===(t=this.slotContentObserver)||void 0===t||t.disconnect(),this.slotContentObserver=void 0}disconnectUserPopoverDrawerSync(){var t;this.userPopoverDrawerSyncHost&&(this.userPopoverDrawerSyncHost.removeEventListener("isOpenChange",this.handleUserPopoverIsOpenChange),this.userPopoverDrawerSyncHost=null),null===(t=this.userPopoverDrawerOpenObserver)||void 0===t||t.disconnect(),this.userPopoverDrawerOpenObserver=void 0}removeDocEscapeListener(){this.el.ownerDocument.removeEventListener("keydown",this.onDocKeyDownEscape,!1)}scheduleSlotContentSyncFromObserver(){void 0!==this.deferredSlotContentObserverSyncTimeoutId&&clearTimeout(this.deferredSlotContentObserverSyncTimeoutId),this.deferredSlotContentObserverSyncTimeoutId=setTimeout((()=>{this.deferredSlotContentObserverSyncTimeoutId=void 0,this.el.isConnected&&(this.syncBrandLogoSlot(),this.syncUserMenuSlots())}),0)}syncDocEscapeListener(){this.removeDocEscapeListener(),this.navControl&&this.el.ownerDocument.addEventListener("keydown",this.onDocKeyDownEscape,!1)}syncOpenFromNavControl(){const t=this.open;this.open=!1,t&&!this.navControl&&this.navOpen.emit(!1)}render(){var t,s,e,o;return i(n,{key:"6b22351e62f90d5fec04c0dafa5208d9a495b67b",class:{"xpl-top-nav":!0,"xpl-top-nav--nav-control":!!this.navControl,"xpl-top-nav--open":this.open,"xpl-top-nav--has-child-account-label":this.childAccountLabelText.length>0,"xpl-top-nav--has-brand":this.hasBrand,"xpl-top-nav--has-user-menu":this.hasUserMenu,dark:!0}},i("nav",{key:"5f29a00b93b1affda6aaf900e42cc6ff33f1b90c","aria-label":null!==(t=this.label)&&void 0!==t?t:"top-navigation-bar",class:"xpl-top-nav__bar"},i("div",{key:"fbe9cb0b1bc7d9bf9be1f04e64cb93ff24866879",class:"xpl-top-nav__inner-left"},this.navControl&&i("button",{key:"b22532e39a57f9a250617aa09e6e0dde6dfeb9e5",type:"button",class:"xpl-top-nav__nav-control","aria-expanded":this.open?"true":"false","aria-label":this.open?"Close navigation menu":"Open navigation menu",onClick:this.onNavToggle},i("xpl-icon",{key:"a9f7dbb6287d3e11ea5b839bedb8d808c67bcd8e",class:"xpl-top-nav__control-icon",icon:"menu",size:20})),this.hasBrand&&i("div",{key:"c702fc39d186f37901c8c6b4e5d378eaee2faa99",class:"xpl-top-nav__brand-bar"},i("xpl-top-nav-item",{key:"980b470563ee3d4e3e388cd089622041f307cd0b",class:"xpl-top-nav__brand",href:this.brandHref,onNavItemClick:this.onBrandNavItemClick},(null===(s=this.brandLogo)||void 0===s?void 0:s.trim())?i("img",{class:"xpl-top-nav__brand-logo",src:this.brandLogo,alt:(null===(e=this.brandName)||void 0===e?void 0:e.trim())?this.brandName.trim():"Brand"}):this.brandLogoSlotPresent?i("span",{class:"xpl-top-nav__brand-logo-slot"},i("slot",{name:"brand-logo"})):null,(null===(o=this.brandName)||void 0===o?void 0:o.trim())?i("span",{class:"xpl-top-nav__brand-name"},this.brandName.trim()):null)),i("div",{key:"0740be056833bd15c798a44c5c3dbe80ed5e15fd",class:{"xpl-top-nav__aside":!0,"xpl-nav-left":!0}},i("div",{key:"ff4f4534944dc54df40c289e65a4ab7d75bd572e",class:"xpl-top-nav__left-primary",role:"list"},i("slot",{key:"fdec30ffc838d7e73788932aa6fef46fac2fe0ab",name:"left-aside"})))),i("div",{key:"69d5b669744ff3aeb0c4316f4d5b27b9c461652f",class:{"xpl-top-nav__aside":!0,"xpl-nav-right":!0}},i("div",{key:"7ae70d39f31243b77f09af7b0e4327d0bb1b1dfd",class:"xpl-nav-right__list"},i("div",{key:"7bafc8eab226ba0ff77ae98281d4665eb6b75fbe",class:"xpl-top-nav__right-rail"},i("div",{key:"9914028435faebbd3d539d763b71500643017ebc",class:"xpl-top-nav__right-lead"},i("slot",{key:"974117684ec371dc87264bfbc0da5e456adeec9b",name:"right-aside"})),this.hasUserMenu?i("div",{class:"xpl-top-nav__right-user"},i("xpl-popover",{class:"xpl-top-nav__user-popover dark",position:"bottom-end",display:"menu"},this.userMenuTriggerSlotPresent?i("slot",{name:"user-menu-trigger",slot:"trigger"}):this.usesBuiltInChildAccountTrigger?i("xpl-button",{slot:"trigger",class:"xpl-top-nav__child-account-trigger",type:"button",variant:"tertiary",icon:"chevron-down",iconPosition:"end",iconOnly:0===this.childAccountLabelText.length,"aria-haspopup":"dialog","aria-label":this.childAccountLabelText.length>0?void 0:"Open account menu"},this.childAccountLabelText.length>0?this.childAccountLabelText:null):null,i("div",{class:"xpl-top-nav__user-menu-panel"},i("slot",{name:"user-menu"})))):null,this.needsUserMenuSlotStash?i("div",{class:"xpl-top-nav__user-menu-stash",hidden:!0,"aria-hidden":"true"},i("slot",{name:"user-menu-trigger"}),i("slot",{name:"user-menu"})):null)))))}get el(){return this}static get watchers(){return{navControl:[{onNavControlChanged:0}]}}},[260,"xpl-top-nav",{brandHref:[1,"brand-href"],brandLogo:[1,"brand-logo"],brandName:[1,"brand-name"],childAccountLabel:[1,"child-account-label"],label:[1],navControl:[516,"nav-control"],brandLogoSlotPresent:[32],open:[32],userMenuSlotPresent:[32],userMenuTriggerSlotPresent:[32]},void 0,{navControl:[{onNavControlChanged:0}]}]),c=p,d=function(){"undefined"!=typeof customElements&&["xpl-top-nav","xpl-button","xpl-icon","xpl-popover","xpl-top-nav-item"].forEach((t=>{switch(t){case"xpl-top-nav":customElements.get(o(t))||customElements.define(o(t),p);break;case"xpl-button":customElements.get(o(t))||a();break;case"xpl-icon":customElements.get(o(t))||l();break;case"xpl-popover":customElements.get(o(t))||r();break;case"xpl-top-nav-item":customElements.get(o(t))||h()}}))};export{c as XplTopNav,d as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{p as t,H as s,d as a,h as i,c as e,t as n}from"./p-BT_Lq3Vd.js";import{d as l}from"./p-B1PBAEzg.js";const o=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.navOpen=a(this,"navOpen",7),this.open=!0}onNavToggle(){this.open=!this.open,this.navOpen.emit(this.open)}componentWillLoad(){this.open=void 0!==this.isNavOpenAtStartup?this.isNavOpenAtStartup:this.open}render(){return i(e,{key:"965003722d536d4b9b7acd326ed7ae0cc2ac302a"},i("nav",{key:"25d4348939fd65e00ce7bec962a31d65ff9473c3","aria-label":"utility navigation bar",class:"xpl-utility-bar"},this.navControl?i("div",null,i("button",{class:"xpl-utility-bar__nav-control",onClick:()=>this.onNavToggle()},i("xpl-icon",{class:"xpl-utility-nav__bars",icon:"three-bars"})),i("slot",{name:"aside"})):i("slot",{name:"aside"}),i("slot",{key:"3cb1d9038135c1892a3780c9242bbd544f6f0f5f",name:"main"})))}},[260,"xpl-utility-bar",{navControl:[4,"nav-control"],isNavOpenAtStartup:[4,"is-nav-open-at-startup"],open:[32]}]),c=o,r=function(){"undefined"!=typeof customElements&&["xpl-utility-bar","xpl-icon"].forEach((t=>{switch(t){case"xpl-utility-bar":customElements.get(n(t))||customElements.define(n(t),o);break;case"xpl-icon":customElements.get(n(t))||l()}}))};export{c as XplUtilityBar,r as defineCustomElement}
|
|
@@ -18,6 +18,7 @@ This backdrop is used to add a transparent darker layer on top of the content ar
|
|
|
18
18
|
|
|
19
19
|
- [xpl-application-shell](../xpl-application-shell)
|
|
20
20
|
- [xpl-modal](../xpl-modal)
|
|
21
|
+
- [xpl-side-nav](../xpl-side-nav)
|
|
21
22
|
- [xpl-slideout](../xpl-slideout)
|
|
22
23
|
|
|
23
24
|
### Graph
|
|
@@ -25,6 +26,7 @@ This backdrop is used to add a transparent darker layer on top of the content ar
|
|
|
25
26
|
graph TD;
|
|
26
27
|
xpl-application-shell --> xpl-backdrop
|
|
27
28
|
xpl-modal --> xpl-backdrop
|
|
29
|
+
xpl-side-nav --> xpl-backdrop
|
|
28
30
|
xpl-slideout --> xpl-backdrop
|
|
29
31
|
style xpl-backdrop fill:#f9f,stroke:#333,stroke-width:4px
|
|
30
32
|
```
|
|
@@ -92,6 +92,40 @@ The legacy semantic names `success`, `warning`, `inactive`, and `error` are stil
|
|
|
92
92
|
|
|
93
93
|
- Each variant uses Apollo Foundation badge tokens (`--xpl-background-badge-`*, `--xpl-border-badge-*`, `--xpl-icon-badge-*`, `--xpl-text-badge-*`) that auto-switch between light and dark modes. Dot-only badges use the corresponding `--xpl-icon-badge-*` accent color for their solid fill.
|
|
94
94
|
|
|
95
|
+
### Design Tokens
|
|
96
|
+
|
|
97
|
+
Tokens used by this component from `@xplortech/apollo-foundation`.
|
|
98
|
+
|
|
99
|
+
**Color**
|
|
100
|
+
- `--xpl-background-badge-{default,green,yellow,grey,blue,red}` — variant backgrounds
|
|
101
|
+
- `--xpl-border-badge-{purple,green,yellow,grey,blue,red}` — variant borders
|
|
102
|
+
- `--xpl-text-badge-{default,green,yellow,gray,blue,red}` — variant text colors
|
|
103
|
+
- `--xpl-icon-badge-{default,green,yellow,grey,blue,red}` — dot / dot-only fill
|
|
104
|
+
- `--xpl-text-inverse` — dot-only text (green, blue, red)
|
|
105
|
+
- `--xpl-text-strong` — orange variant text
|
|
106
|
+
- `--xpl-border-inverse` — dot-only bordered ring
|
|
107
|
+
- `--xpl-color-transparent-0` — dot-only / orange transparent border
|
|
108
|
+
- `--xpl-color-neutral-1100` — dot-only text on yellow, gray, orange
|
|
109
|
+
- `--xpl-background-surface-transparent-0` — orange background (dark mode)
|
|
110
|
+
- `--xpl-background-accent-brand` — orange dot/dot-only fill (tech debt)
|
|
111
|
+
- `--xpl-color-orange-{100,300}` — orange variant primitives (tech debt)
|
|
112
|
+
|
|
113
|
+
**Spacing**
|
|
114
|
+
- `--xpl-space-{2,4,8,12}` — padding variants
|
|
115
|
+
|
|
116
|
+
**Sizing**
|
|
117
|
+
- `--xpl-size-{150,125,050}` — height / dot sizes
|
|
118
|
+
- `0.875rem` literal — dot-only badge height/min-width (no 14px Foundation token; tech debt)
|
|
119
|
+
|
|
120
|
+
**Typography**
|
|
121
|
+
- `--xpl-font-family-default` — font family
|
|
122
|
+
- Default badge extends `.xpl-text-title-5` (Figma `Title/5`); small badge extends `.xpl-text-callout-bold` (Figma `Callout/Bold`)
|
|
123
|
+
- `0.5rem` literal — dot-only (number) badge font-size/line-height (no 8px Foundation token or typography level; tech debt)
|
|
124
|
+
|
|
125
|
+
**Border**
|
|
126
|
+
- `--xpl-border-small` — border width (1px)
|
|
127
|
+
- `--xpl-border-radius-{full,small}` — shape variants
|
|
128
|
+
|
|
95
129
|
<!-- Auto Generated Below -->
|
|
96
130
|
|
|
97
131
|
|