@xplortech/apollo-core 3.2.1 → 3.3.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/README.md +1 -1
- package/build/components/accordion.css +1 -1
- package/build/components/badge.css +1 -1
- package/build/components/banner.css +1 -1
- package/build/components/breadcrumbs.css +1 -1
- package/build/components/button.css +1 -1
- package/build/components/choicelist.css +1 -1
- package/build/components/data-card.css +1 -1
- package/build/components/divider.css +1 -1
- package/build/components/dropdown.css +1 -1
- package/build/components/dynamic-table-cell.css +1 -1
- package/build/components/header-accordion.css +1 -1
- package/build/components/input-color.css +1 -1
- package/build/components/input-file.css +1 -1
- package/build/components/input-search.css +1 -1
- package/build/components/input.css +1 -1
- package/build/components/label.css +1 -1
- package/build/components/large-card.css +1 -1
- package/build/components/list-item.css +1 -1
- package/build/components/main-nav.css +1 -1
- package/build/components/modal.css +1 -1
- package/build/components/pagination.css +1 -1
- package/build/components/secondary-nav.css +1 -1
- package/build/components/select.css +1 -1
- package/build/components/side-nav.css +1 -1
- package/build/components/slideout.css +1 -1
- package/build/components/spotlight.css +1 -1
- package/build/components/table-cell-base.css +1 -1
- package/build/components/table-header-cell.css +1 -1
- package/build/components/table.css +1 -1
- package/build/components/tag.css +1 -1
- package/build/components/toast.css +1 -1
- package/build/components/toggle.css +1 -1
- package/build/components/toolbar.css +1 -1
- package/build/components/tooltip.css +1 -1
- package/build/components/top-nav.css +1 -1
- package/build/core.css +1 -1
- package/build/style.css +1 -1
- package/build/typography.css +1 -1
- package/build/variables/apollo.css +30 -19
- package/build/variables/field-edge.css +32 -19
- package/dist/apollo-core/apollo-core.css +1 -1
- package/dist/apollo-core/apollo-core.esm.js +1 -1
- package/dist/apollo-core/p-01c55c74.entry.js +1 -0
- package/dist/apollo-core/{p-050a8bf2.entry.js → p-01ed2bb5.entry.js} +1 -1
- package/dist/apollo-core/{p-b3b4678b.entry.js → p-08ea8939.entry.js} +1 -1
- package/dist/apollo-core/{p-256ece8b.entry.js → p-0a7d57ab.entry.js} +1 -1
- package/dist/apollo-core/p-13253d8f.entry.js +1 -0
- package/dist/apollo-core/{p-8845106f.entry.js → p-14f5d98a.entry.js} +1 -1
- package/dist/apollo-core/{p-5c3be343.entry.js → p-17e38eaf.entry.js} +1 -1
- package/dist/apollo-core/{p-a0d3b7f8.entry.js → p-18486aba.entry.js} +1 -1
- package/dist/apollo-core/{p-49531864.entry.js → p-19fb0e5f.entry.js} +1 -1
- package/dist/apollo-core/p-1c2135e3.entry.js +1 -0
- package/dist/apollo-core/{p-7d70e089.entry.js → p-2111cc38.entry.js} +1 -1
- package/dist/apollo-core/p-2b813212.entry.js +1 -0
- package/dist/apollo-core/p-325a3b43.entry.js +1 -0
- package/dist/apollo-core/p-38a6a53d.entry.js +1 -0
- package/dist/apollo-core/{p-808f3d9c.entry.js → p-38fa8398.entry.js} +1 -1
- package/dist/apollo-core/{p-b64ed46d.entry.js → p-3d4a6de1.entry.js} +1 -1
- package/dist/apollo-core/{p-3713cd77.entry.js → p-3e3ab332.entry.js} +1 -1
- package/dist/apollo-core/p-3f8dc5b9.entry.js +1 -0
- package/dist/apollo-core/{p-ff16f574.entry.js → p-4249ee9b.entry.js} +1 -1
- package/dist/apollo-core/{p-715baae0.entry.js → p-439d5cdd.entry.js} +1 -1
- package/dist/apollo-core/{p-f384a990.entry.js → p-4b949aeb.entry.js} +1 -1
- package/dist/apollo-core/{p-eba654a3.entry.js → p-54053547.entry.js} +1 -1
- package/dist/apollo-core/p-620fc472.entry.js +1 -0
- package/dist/apollo-core/{p-9feaa8be.entry.js → p-651b49c3.entry.js} +1 -1
- package/dist/apollo-core/{p-9d731673.entry.js → p-6aee7d6b.entry.js} +1 -1
- package/dist/apollo-core/{p-d469bf5d.entry.js → p-6de10879.entry.js} +1 -1
- package/dist/apollo-core/p-73a1c68d.entry.js +1 -0
- package/dist/apollo-core/{p-8f8f4759.entry.js → p-79d306a2.entry.js} +1 -1
- package/dist/apollo-core/{p-f579e4b0.entry.js → p-7f00b542.entry.js} +1 -1
- package/dist/apollo-core/{p-bc821e69.entry.js → p-7fd3da3a.entry.js} +1 -1
- package/dist/apollo-core/p-890c641b.entry.js +1 -0
- package/dist/apollo-core/p-9832bc63.entry.js +1 -0
- package/dist/apollo-core/{p-7eb02cf3.entry.js → p-9955c4f2.entry.js} +1 -1
- package/dist/apollo-core/p-9b757459.entry.js +1 -0
- package/dist/apollo-core/p-9c41d07f.entry.js +1 -0
- package/dist/apollo-core/{p-ee68bed6.entry.js → p-9c7a0229.entry.js} +1 -1
- package/dist/apollo-core/{p-24fa8a03.entry.js → p-9d091b05.entry.js} +1 -1
- package/dist/apollo-core/p-CJABLO_1.js +3 -0
- package/dist/apollo-core/{p-14e86de8.entry.js → p-a149351a.entry.js} +1 -1
- package/dist/apollo-core/p-a2c3a38a.entry.js +1 -0
- package/dist/apollo-core/p-a5ddb3c4.entry.js +1 -0
- package/dist/apollo-core/{p-3417c1ce.entry.js → p-a73b0ca4.entry.js} +1 -1
- package/dist/apollo-core/{p-fcb17ff9.entry.js → p-aece2c3d.entry.js} +1 -1
- package/dist/apollo-core/{p-aeb2bcb8.entry.js → p-af188297.entry.js} +1 -1
- package/dist/apollo-core/{p-ca83003e.entry.js → p-b2dcdb19.entry.js} +1 -1
- package/dist/apollo-core/p-b55951a2.entry.js +1 -0
- package/dist/apollo-core/p-b7b91f27.entry.js +1 -0
- package/dist/apollo-core/{p-11914cd4.entry.js → p-b9c85394.entry.js} +1 -1
- package/dist/apollo-core/{p-64f5c129.entry.js → p-ba85f686.entry.js} +1 -1
- package/dist/apollo-core/p-c4fd031e.entry.js +1 -0
- package/dist/apollo-core/p-cab7d816.entry.js +1 -0
- package/dist/apollo-core/{p-45c872d2.entry.js → p-cca0f1a2.entry.js} +1 -1
- package/dist/apollo-core/{p-2971e2ec.entry.js → p-cd2d73ee.entry.js} +1 -1
- package/dist/apollo-core/p-cfb00d23.entry.js +1 -0
- package/dist/apollo-core/p-d060572b.entry.js +1 -0
- package/dist/apollo-core/p-d13a07ea.entry.js +1 -0
- package/dist/apollo-core/p-d1571245.entry.js +1 -0
- package/dist/apollo-core/p-d204ed1a.entry.js +1 -0
- package/dist/apollo-core/{p-9905c77c.entry.js → p-d3720611.entry.js} +1 -1
- package/dist/apollo-core/p-d9f78325.entry.js +1 -0
- package/dist/apollo-core/{p-df257cbf.entry.js → p-dad5d377.entry.js} +1 -1
- package/dist/apollo-core/{p-d3ada7d0.entry.js → p-e21af3d1.entry.js} +1 -1
- package/dist/apollo-core/{p-c5bc3b2c.entry.js → p-e7145461.entry.js} +1 -1
- package/dist/apollo-core/p-e99503a2.entry.js +1 -0
- package/dist/apollo-core/{p-e4d50301.entry.js → p-ec99c433.entry.js} +1 -1
- package/dist/apollo-core/{p-e09d8beb.entry.js → p-fc73497e.entry.js} +1 -1
- package/dist/apollo-core/{p-907bc21e.entry.js → p-fdd1b7da.entry.js} +1 -1
- package/dist/cjs/apollo-core.cjs.js +2 -2
- package/dist/cjs/{index-3cBvw409.js → index-EdmnG7t8.js} +52 -11
- package/dist/cjs/loader.cjs.js +1 -1
- 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_3.cjs.entry.js +5 -5
- package/dist/cjs/xpl-backdrop.cjs.entry.js +2 -2
- package/dist/cjs/xpl-badge.cjs.entry.js +2 -2
- package/dist/cjs/xpl-banner.cjs.entry.js +3 -3
- package/dist/cjs/xpl-breadcrumb-item.cjs.entry.js +2 -2
- package/dist/cjs/xpl-breadcrumbs.cjs.entry.js +2 -2
- package/dist/cjs/xpl-button-row.cjs.entry.js +2 -2
- package/dist/cjs/xpl-button.cjs.entry.js +3 -3
- package/dist/cjs/xpl-calendar.cjs.entry.js +2 -2
- package/dist/cjs/xpl-checkbox.cjs.entry.js +4 -4
- package/dist/cjs/xpl-choicelist.cjs.entry.js +2 -2
- package/dist/cjs/xpl-content-area.cjs.entry.js +2 -2
- package/dist/cjs/xpl-dashboard.cjs.entry.js +2 -2
- package/dist/cjs/xpl-data-card.cjs.entry.js +3 -3
- package/dist/cjs/xpl-dropdown_4.cjs.entry.js +9 -9
- 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 +3 -3
- package/dist/cjs/xpl-grid-item.cjs.entry.js +2 -2
- package/dist/cjs/xpl-grid.cjs.entry.js +1 -1
- package/dist/cjs/xpl-header-accordion.cjs.entry.js +2 -2
- package/dist/cjs/xpl-icon.cjs.entry.js +1 -1
- package/dist/cjs/xpl-input-color.cjs.entry.js +1 -1
- package/dist/cjs/xpl-input-phone.cjs.entry.js +1 -1
- package/dist/cjs/xpl-input-time.cjs.entry.js +1 -1
- package/dist/cjs/xpl-input_4.cjs.entry.js +3 -3
- package/dist/cjs/xpl-large-card.cjs.entry.js +1 -1
- package/dist/cjs/xpl-list-item.cjs.entry.js +1 -1
- package/dist/cjs/xpl-list.cjs.entry.js +3 -3
- package/dist/cjs/xpl-main-nav.cjs.entry.js +2 -2
- package/dist/cjs/xpl-modal.cjs.entry.js +1 -1
- package/dist/cjs/xpl-nav-header-menu.cjs.entry.js +3 -3
- package/dist/cjs/xpl-nav-item.cjs.entry.js +3 -3
- package/dist/cjs/xpl-pagination.cjs.entry.js +1 -1
- package/dist/cjs/xpl-panel.cjs.entry.js +1 -1
- package/dist/cjs/xpl-popover.cjs.entry.js +5 -5
- package/dist/cjs/xpl-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/xpl-progress-indicator.cjs.entry.js +1 -1
- package/dist/cjs/xpl-secondary-nav.cjs.entry.js +2 -2
- package/dist/cjs/xpl-select_2.cjs.entry.js +10 -10
- package/dist/cjs/xpl-side-nav-header-item.cjs.entry.js +1 -1
- package/dist/cjs/xpl-side-nav-item.cjs.entry.js +3 -3
- package/dist/cjs/xpl-side-nav-section.cjs.entry.js +6 -6
- package/dist/cjs/xpl-side-nav.cjs.entry.js +1 -1
- package/dist/cjs/xpl-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/xpl-slideout.cjs.entry.js +2 -2
- package/dist/cjs/xpl-spotlight.cjs.entry.js +1 -1
- package/dist/cjs/xpl-tab-panel.cjs.entry.js +1 -1
- package/dist/cjs/xpl-tab.cjs.entry.js +1 -1
- package/dist/cjs/xpl-table-body.cjs.entry.js +2 -2
- package/dist/cjs/xpl-table-cell_3.cjs.entry.js +5 -5
- package/dist/cjs/xpl-table-footer.cjs.entry.js +2 -2
- package/dist/cjs/xpl-table-header.cjs.entry.js +2 -2
- package/dist/cjs/xpl-table-row.cjs.entry.js +3 -3
- package/dist/cjs/xpl-table.cjs.entry.js +1 -1
- package/dist/cjs/xpl-tabs.cjs.entry.js +1 -1
- package/dist/cjs/xpl-toast.cjs.entry.js +3 -3
- package/dist/cjs/xpl-toggle.cjs.entry.js +1 -1
- package/dist/cjs/xpl-toolbar.cjs.entry.js +3 -3
- package/dist/cjs/xpl-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/xpl-top-nav-item.cjs.entry.js +3 -3
- package/dist/cjs/xpl-top-nav-menu.cjs.entry.js +1 -1
- package/dist/cjs/xpl-top-nav.cjs.entry.js +1 -1
- package/dist/cjs/xpl-utility-bar.cjs.entry.js +2 -2
- package/dist/collection/collection-manifest.json +1 -1
- 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/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/xpl-button.js +2 -2
- 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 +3 -3
- 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 +7 -6
- package/dist/collection/components/xpl-dynamic-table/xpl-dynamic-table.js +2 -2
- 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-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-input/xpl-input.js +2 -2
- 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-nav-item/xpl-nav-item.js +2 -2
- package/dist/collection/components/xpl-popover/xpl-popover.js +4 -4
- 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 +7 -7
- package/dist/collection/components/xpl-side-nav/xpl-side-nav-item/xpl-side-nav-item.js +2 -2
- package/dist/collection/components/xpl-side-nav/xpl-side-nav-section/xpl-side-nav-section.js +5 -5
- package/dist/collection/components/xpl-slideout/xpl-slideout.js +1 -1
- package/dist/collection/components/xpl-table/xpl-table-body/xpl-table-body.js +1 -1
- package/dist/collection/components/xpl-table/xpl-table-cell/xpl-table-cell.js +2 -2
- package/dist/collection/components/xpl-table/xpl-table-footer/xpl-table-footer.js +1 -1
- package/dist/collection/components/xpl-table/xpl-table-footer-cell/xpl-table-footer-cell.js +2 -2
- package/dist/collection/components/xpl-table/xpl-table-row/xpl-table-row.js +2 -2
- package/dist/collection/components/xpl-table-header/xpl-table-header.js +1 -1
- 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-toolbar/xpl-toolbar.js +2 -2
- 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-utility-bar/xpl-utility-bar.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/p-2XxO7M15.js +1 -0
- package/dist/components/{p-D09sGbzs.js → p-3R1VKKds.js} +1 -1
- package/dist/components/p-BNOkHymY.js +1 -0
- package/dist/components/p-BWAytJnz.js +1 -0
- package/dist/components/{p-B7aaJikj.js → p-BZrSTAV1.js} +1 -1
- package/dist/components/{p-CQjJIHK6.js → p-Bh-U2qmp.js} +1 -1
- package/dist/components/{p-BOm_p_mz.js → p-BowQ58XR.js} +1 -1
- package/dist/components/p-BqhTjJWq.js +1 -0
- package/dist/components/{p-CFXvQqUO.js → p-CWXfIUHo.js} +1 -1
- package/dist/components/{p-CdRmVtIN.js → p-CZg3Gb0I.js} +1 -1
- package/dist/components/{p-ohy3NrgH.js → p-CcPrBo53.js} +1 -1
- package/dist/components/p-CetimlcM.js +1 -0
- package/dist/components/{p-CV5nn1zR.js → p-CfZI7bBe.js} +1 -1
- package/dist/components/{p-2cJsJK3-.js → p-CjzUVpyd.js} +1 -1
- package/dist/components/{p-DoVubWyd.js → p-ClLyaOG7.js} +1 -1
- package/dist/components/{p-rLxtqgsy.js → p-Cop4KmAG.js} +1 -1
- package/dist/components/{p-C0AbGd4t.js → p-DHxDWgLP.js} +1 -1
- package/dist/components/{p-CuVYRPvz.js → p-DORBnmT4.js} +1 -1
- package/dist/components/{p-CmbpWpb0.js → p-DbN9vTl7.js} +1 -1
- package/dist/components/{p-DTh_zemx.js → p-Dl__XgUD.js} +1 -1
- package/dist/components/{p-8zrW9vEC.js → p-JjlTuq8d.js} +1 -1
- package/dist/components/p-d4i2Qqvl.js +1 -0
- package/dist/components/{p-Btb2UkLz.js → p-n-yq7lf4.js} +1 -1
- package/dist/components/{p-1D7CWIJ-.js → p-rQFFXcXl.js} +1 -1
- package/dist/components/p-sjDW_E4p.js +1 -0
- package/dist/components/{p-B56GeUtW.js → p-yc1qXhah.js} +1 -1
- 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-header-item.js +1 -1
- package/dist/components/xpl-side-nav-item.js +1 -1
- package/dist/components/xpl-side-nav-section.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-body.js +1 -1
- package/dist/components/xpl-table-cell.js +1 -1
- package/dist/components/xpl-table-footer-cell.js +1 -1
- package/dist/components/xpl-table-footer.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-row.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-menu.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-accordion/readme.md +5 -4
- package/dist/docs/xpl-application-shell/readme.md +10 -0
- package/dist/docs/xpl-avatar/readme.md +7 -0
- package/dist/docs/xpl-badge/readme.md +7 -0
- package/dist/docs/xpl-breadcrumbs/xpl-breadcrumb-item/readme.md +1 -0
- package/dist/docs/xpl-breadcrumbs/xpl-breadcrumbs/readme.md +1 -0
- package/dist/docs/xpl-button/readme.md +7 -0
- package/dist/docs/xpl-checkbox/readme.md +7 -0
- package/dist/docs/xpl-content-area/readme.md +7 -0
- package/dist/docs/xpl-dashboard/readme.md +7 -0
- package/dist/docs/xpl-data-card/readme.md +1 -0
- package/dist/docs/xpl-divider/readme.md +7 -0
- package/dist/docs/xpl-dropdown/readme.md +8 -0
- package/dist/docs/xpl-dropdown/xpl-dropdown-group/readme.md +7 -0
- package/dist/docs/xpl-dropdown/xpl-dropdown-heading/readme.md +7 -0
- package/dist/docs/xpl-dropdown/xpl-dropdown-option/readme.md +7 -0
- package/dist/docs/xpl-dynamic-table/readme.md +8 -0
- package/dist/docs/xpl-dynamic-table-cell/readme.md +7 -0
- package/dist/docs/xpl-dynamic-table-row/readme.md +7 -0
- package/dist/docs/xpl-grid-item/readme.md +7 -0
- package/dist/docs/xpl-header-accordion/readme.md +8 -0
- package/dist/docs/xpl-icon/readme.md +1 -1
- package/dist/docs/xpl-input/readme.md +8 -0
- package/dist/docs/xpl-list/readme.md +7 -0
- package/dist/docs/xpl-list/xpl-list-item/readme.md +16 -0
- package/dist/docs/xpl-main-nav/readme.md +12 -0
- package/dist/docs/xpl-nav-item/readme.md +9 -0
- package/dist/docs/xpl-popover/readme.md +1 -0
- package/dist/docs/xpl-radio/readme.md +7 -0
- package/dist/docs/xpl-secondary-nav/readme.md +7 -0
- package/dist/docs/xpl-select/readme.md +7 -0
- package/dist/docs/xpl-side-nav/xpl-side-nav-item/readme.md +9 -0
- package/dist/docs/xpl-side-nav/xpl-side-nav-section/readme.md +8 -0
- package/dist/docs/xpl-slideout/readme.md +13 -0
- package/dist/docs/xpl-spotlight/readme.md +1 -0
- package/dist/docs/xpl-table/readme.md +12 -0
- package/dist/docs/xpl-table/xpl-table-body/readme.md +7 -0
- package/dist/docs/xpl-table/xpl-table-cell/readme.md +7 -0
- package/dist/docs/xpl-table/xpl-table-footer/readme.md +7 -0
- package/dist/docs/xpl-table/xpl-table-footer-cell/readme.md +7 -0
- package/dist/docs/xpl-table/xpl-table-header-cell/readme.md +59 -52
- package/dist/docs/xpl-table/xpl-table-row/readme.md +7 -0
- package/dist/docs/xpl-table-header/readme.md +7 -0
- package/dist/docs/xpl-tag/readme.md +9 -2
- package/dist/docs/xpl-toast/readme.md +8 -0
- package/dist/docs/xpl-toolbar/readme.md +8 -0
- package/dist/docs/xpl-tooltip/readme.md +7 -0
- package/dist/docs/xpl-top-nav/xpl-nav-header-menu/readme.md +1 -0
- package/dist/docs/xpl-top-nav/xpl-top-nav-item/readme.md +1 -0
- package/dist/docs/xpl-top-nav/xpl-top-nav-menu/readme.md +1 -0
- package/dist/docs/xpl-utility-bar/readme.md +8 -0
- package/dist/docs.json +770 -88
- package/dist/esm/apollo-core.js +3 -3
- package/dist/esm/{index-ukZKsqqq.js → index-CJABLO_1.js} +52 -11
- package/dist/esm/loader.js +2 -2
- package/dist/esm/xpl-accordion.entry.js +3 -3
- package/dist/esm/xpl-application-shell.entry.js +2 -2
- package/dist/esm/xpl-avatar_3.entry.js +5 -5
- package/dist/esm/xpl-backdrop.entry.js +2 -2
- package/dist/esm/xpl-badge.entry.js +2 -2
- package/dist/esm/xpl-banner.entry.js +3 -3
- package/dist/esm/xpl-breadcrumb-item.entry.js +2 -2
- package/dist/esm/xpl-breadcrumbs.entry.js +2 -2
- package/dist/esm/xpl-button-row.entry.js +2 -2
- package/dist/esm/xpl-button.entry.js +3 -3
- package/dist/esm/xpl-calendar.entry.js +2 -2
- package/dist/esm/xpl-checkbox.entry.js +4 -4
- package/dist/esm/xpl-choicelist.entry.js +2 -2
- package/dist/esm/xpl-content-area.entry.js +2 -2
- package/dist/esm/xpl-dashboard.entry.js +2 -2
- package/dist/esm/xpl-data-card.entry.js +3 -3
- package/dist/esm/xpl-dropdown_4.entry.js +9 -9
- 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 +3 -3
- package/dist/esm/xpl-grid-item.entry.js +2 -2
- package/dist/esm/xpl-grid.entry.js +1 -1
- package/dist/esm/xpl-header-accordion.entry.js +2 -2
- package/dist/esm/xpl-icon.entry.js +1 -1
- package/dist/esm/xpl-input-color.entry.js +1 -1
- package/dist/esm/xpl-input-phone.entry.js +1 -1
- package/dist/esm/xpl-input-time.entry.js +1 -1
- package/dist/esm/xpl-input_4.entry.js +3 -3
- package/dist/esm/xpl-large-card.entry.js +1 -1
- package/dist/esm/xpl-list-item.entry.js +1 -1
- package/dist/esm/xpl-list.entry.js +3 -3
- package/dist/esm/xpl-main-nav.entry.js +2 -2
- package/dist/esm/xpl-modal.entry.js +1 -1
- package/dist/esm/xpl-nav-header-menu.entry.js +3 -3
- package/dist/esm/xpl-nav-item.entry.js +3 -3
- package/dist/esm/xpl-pagination.entry.js +1 -1
- package/dist/esm/xpl-panel.entry.js +1 -1
- package/dist/esm/xpl-popover.entry.js +5 -5
- package/dist/esm/xpl-progress-bar.entry.js +1 -1
- package/dist/esm/xpl-progress-indicator.entry.js +1 -1
- package/dist/esm/xpl-secondary-nav.entry.js +2 -2
- package/dist/esm/xpl-select_2.entry.js +10 -10
- package/dist/esm/xpl-side-nav-header-item.entry.js +1 -1
- package/dist/esm/xpl-side-nav-item.entry.js +3 -3
- package/dist/esm/xpl-side-nav-section.entry.js +6 -6
- package/dist/esm/xpl-side-nav.entry.js +1 -1
- package/dist/esm/xpl-skeleton.entry.js +1 -1
- package/dist/esm/xpl-slideout.entry.js +2 -2
- package/dist/esm/xpl-spotlight.entry.js +1 -1
- package/dist/esm/xpl-tab-panel.entry.js +1 -1
- package/dist/esm/xpl-tab.entry.js +1 -1
- package/dist/esm/xpl-table-body.entry.js +2 -2
- package/dist/esm/xpl-table-cell_3.entry.js +5 -5
- package/dist/esm/xpl-table-footer.entry.js +2 -2
- package/dist/esm/xpl-table-header.entry.js +2 -2
- package/dist/esm/xpl-table-row.entry.js +3 -3
- package/dist/esm/xpl-table.entry.js +1 -1
- package/dist/esm/xpl-tabs.entry.js +1 -1
- package/dist/esm/xpl-toast.entry.js +3 -3
- package/dist/esm/xpl-toggle.entry.js +1 -1
- package/dist/esm/xpl-toolbar.entry.js +3 -3
- package/dist/esm/xpl-tooltip.entry.js +2 -2
- package/dist/esm/xpl-top-nav-item.entry.js +3 -3
- package/dist/esm/xpl-top-nav-menu.entry.js +1 -1
- package/dist/esm/xpl-top-nav.entry.js +1 -1
- package/dist/esm/xpl-utility-bar.entry.js +2 -2
- package/dist/types/components.d.ts +3 -1
- package/dist/types/stencil-public-runtime.d.ts +12 -0
- package/hydrate/index.js +117 -98
- package/hydrate/index.mjs +117 -98
- package/loader/index.d.ts +1 -1
- package/package.json +13 -13
- package/dist/apollo-core/p-045a4538.entry.js +0 -1
- package/dist/apollo-core/p-08767607.entry.js +0 -1
- package/dist/apollo-core/p-194c0ccd.entry.js +0 -1
- package/dist/apollo-core/p-1c031055.entry.js +0 -1
- package/dist/apollo-core/p-24f7280a.entry.js +0 -1
- package/dist/apollo-core/p-386851a2.entry.js +0 -1
- package/dist/apollo-core/p-3cd1238b.entry.js +0 -1
- package/dist/apollo-core/p-4e3c6616.entry.js +0 -1
- package/dist/apollo-core/p-5b9fd96e.entry.js +0 -1
- package/dist/apollo-core/p-5cbf5d42.entry.js +0 -1
- package/dist/apollo-core/p-5ec2b180.entry.js +0 -1
- package/dist/apollo-core/p-65f6b66c.entry.js +0 -1
- package/dist/apollo-core/p-72e0455f.entry.js +0 -1
- package/dist/apollo-core/p-7ac7fbc0.entry.js +0 -1
- package/dist/apollo-core/p-7f4463ff.entry.js +0 -1
- package/dist/apollo-core/p-87582346.entry.js +0 -1
- package/dist/apollo-core/p-a6ecca68.entry.js +0 -1
- package/dist/apollo-core/p-a789c272.entry.js +0 -1
- package/dist/apollo-core/p-bd493c4a.entry.js +0 -1
- package/dist/apollo-core/p-bdcece21.entry.js +0 -1
- package/dist/apollo-core/p-bfb7a83a.entry.js +0 -1
- package/dist/apollo-core/p-c22f70f4.entry.js +0 -1
- package/dist/apollo-core/p-d3230277.entry.js +0 -1
- package/dist/apollo-core/p-d7f8ee34.entry.js +0 -1
- package/dist/apollo-core/p-d879c349.entry.js +0 -1
- package/dist/apollo-core/p-ea9cdd65.entry.js +0 -1
- package/dist/apollo-core/p-ukZKsqqq.js +0 -2
- package/dist/components/p-B6YLKDUX.js +0 -1
- package/dist/components/p-BSHdGbmH.js +0 -1
- package/dist/components/p-BZIZSovL.js +0 -1
- package/dist/components/p-CgemLtmL.js +0 -1
- package/dist/components/p-Dp62sBqX.js +0 -1
- package/dist/components/p-DqgnC_vS.js +0 -1
- package/dist/components/p-DtV4i45B.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as a,h as c,H as d}from"./p-CJABLO_1.js";const s=class{constructor(c){a(this,c)}render(){return c(d,{key:"dac516d62e2171dcd43f7c7d28fc4af39a880d63"},c("dl",{key:"9ebe4177da5919058c8cdcc7aba2b07fcc9617a0",class:"xpl-dashboard"},c("slot",{key:"eb261b674f1ae29b4b9837c98865b64a78fe4949"})))}};export{s as xpl_dashboard}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as a,h as e,H as b}from"./p-CJABLO_1.js";const d=class{constructor(e){a(this,e)}render(){return e(b,{key:"f859d93fa0a8ad5b4f8258aa9bbdc1911d6ae16d"},e("nav",{key:"6d676d761994ec12287b1ebdd9de581b312bea8e",class:"xpl-breadcrumbs","aria-label":"Breadcrumb"},e("ol",{key:"ebcb8ef044cb89b8269e2b57b920d915f722a7de",role:"list"},e("slot",{key:"61baec9902cafb7fbdfd69293005708abda67170"}))))}};export{d as xpl_breadcrumbs}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as o,h as e,H as i,g as s}from"./p-
|
|
1
|
+
import{r as t,c as o,h as e,H as i,g as s}from"./p-CJABLO_1.js";import{t as d}from"./p-CzwViN3U.js";import"./p-BFTU3MAI.js";const r=class{constructor(e){t(this,e),this.isOpenChange=o(this,"isOpenChange",7),this.isOpen=!1,this.disabled=!1,this.position="bottom-middle",this.display="arrow",this.isOpenState=this.isOpen,this.actualPosition=this.position,this.togglePopover=()=>{this.disabled||(this.isOpenState=!this.isOpenState)},this.handleKeyDown=t=>{"Escape"===t.key&&this.isOpenState&&(this.isOpenState=!1)},this.handleClickOutside=({target:t})=>{t&&t instanceof Node&&!this.el.contains(t)&&this.isOpenState&&(this.isOpenState=!1)},this.handleWindowBlur=()=>{this.isOpenState&&(void 0!==this.blurCloseTimeoutId&&clearTimeout(this.blurCloseTimeoutId),this.blurCloseTimeoutId=setTimeout((()=>{this.blurCloseTimeoutId=void 0;const t=document.activeElement;this.isOpenState&&t instanceof HTMLIFrameElement&&!this.el.contains(t)&&(this.isOpenState=!1)}),0))}}onIsOpenPropChange(t){this.isOpenState=t}onIsOpenStateChange(t){this.updateActualPosition(t),this.isOpenChange.emit(t)}updateActualPosition(t){const{triggerRef:o}=this,{contentRef:e}=this;if(!o||!e||!t)return;const i={"top-left":["top-left","bottom-left","top-right","bottom-right","top-middle","bottom-middle"],"bottom-left":["bottom-left","top-left","bottom-right","top-right","bottom-middle","top-middle"],"top-right":["top-right","bottom-right","top-left","bottom-left","top-middle","bottom-middle"],"bottom-right":["bottom-right","top-right","bottom-left","top-left","bottom-middle","top-middle"],"middle-left":["middle-left","middle-right","bottom-left","top-left","bottom-middle","top-middle"],"middle-right":["middle-right","middle-left","bottom-right","top-right","bottom-middle","top-middle"],"top-middle":["top-middle","top-start","top-end","bottom-middle","top-left","top-right"],"bottom-middle":["bottom-middle","bottom-start","bottom-end","top-middle","bottom-left","bottom-right"],"top-start":["top-start","bottom-start","top-end","bottom-end","top-middle","bottom-middle"],"top-end":["top-end","bottom-end","top-start","bottom-start","top-middle","bottom-middle"],"bottom-start":["bottom-start","top-start","bottom-end","top-end","bottom-middle","top-middle"],"bottom-end":["bottom-end","top-end","bottom-start","top-start","bottom-middle","top-middle"]}[this.position].find((t=>{const{top:i,left:s,bottom:d,right:r}=o.getBoundingClientRect(),{width:a,height:h}=e.getBoundingClientRect(),{innerWidth:l,innerHeight:m}=window,n=d+h<m,p=i-h>=0,c=s-a>=0,b=r+a<l,f=(i+d)/2,g=t=>t&&f-h/2>=0&&f+h/2<=m,u=(s+r)/2,w=t=>t&&u-a/2>=0&&u+a/2<=l,k=s+a<l,v=r-a>=0;switch(t){case"top-left":return n&&c;case"middle-left":return g(c);case"bottom-left":return p&&c;case"top-right":return n&&b;case"middle-right":return g(b);case"bottom-right":return p&&b;case"top-middle":return w(p);case"bottom-middle":return w(n);case"top-start":return p&&k;case"top-end":return p&&v;case"bottom-start":return n&&k;case"bottom-end":return n&&v;default:return!1}}))||this.position;this.actualPosition=i}connectedCallback(){document.addEventListener("mousedown",this.handleClickOutside),document.addEventListener("keydown",this.handleKeyDown),window.addEventListener("blur",this.handleWindowBlur),this.updateListener=d((()=>{this.updateActualPosition(this.isOpenState)})),["resize","scroll"].forEach((t=>{window.addEventListener(t,this.updateListener,{passive:!0})}))}disconnectedCallback(){void 0!==this.blurCloseTimeoutId&&(clearTimeout(this.blurCloseTimeoutId),this.blurCloseTimeoutId=void 0),document.removeEventListener("mousedown",this.handleClickOutside),document.removeEventListener("keydown",this.handleKeyDown),window.removeEventListener("blur",this.handleWindowBlur),["resize","scroll"].forEach((t=>{window.removeEventListener(t,this.updateListener)}))}render(){return e(i,{key:"cac4278a866b566f1e47a69657614c2046cc3532"},e("div",{key:"2a6d8eea3139aa491211308c972d00332bcda855",class:{"xpl-popover":!0,[`xpl-popover--${this.actualPosition}`]:!0,"xpl-popover--is-open":this.isOpenState}},e("span",{key:"4d0b8c711e6d276adada5b6c288b77db9c66153b",role:"button",tabindex:"0","aria-haspopup":"dialog","aria-expanded":this.isOpenState?"true":"false",onClick:this.togglePopover,ref:t=>{this.triggerRef=t}},e("slot",{key:"12f54f037f22c2e2084be6b272e96ab360097dc8",name:"trigger"})),"arrow"===this.display&&e("div",{key:"26b415512019f9a6267c49f81d214f2b80731e3f",class:"xpl-popover__arrow"},e("svg",{key:"6ee61c6a73a06e0ad26e366152065eccc1542abe",width:"17",height:"14",xmlns:"http://www.w3.org/2000/svg"},e("path",{key:"45d76b9ab0123b362c7d7c0fe5d28cec5d17540f",d:"M0 5h15l-7.5 7.5L0 5Z",fill:"white",stroke:"none",class:"arrow-fill"}),e("path",{key:"08a78e26854380aab4c87d9386c01cfda33bc57c",d:"M0 5 L7.5 12.5 L15 5",fill:"none",stroke:"black","stroke-width":"1",class:"arrow-stroke"}))),e("div",{key:"68d3143c6458bfbbd5080e4c5de3718fa04f9faf",class:{"xpl-popover__content":!0,[`xpl-popover__content--display-${this.display}`]:!0},ref:t=>this.contentRef=t},e("slot",{key:"bd1b017359d09bce4316ac55771f7c886b617198"}))))}get el(){return s(this)}static get watchers(){return{isOpen:[{onIsOpenPropChange:0}],isOpenState:[{onIsOpenStateChange:0}]}}};export{r as xpl_popover}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,c as t,h as i,H as s,g as a}from"./p-
|
|
1
|
+
import{r as e,c as t,h as i,H as s,g as a}from"./p-CJABLO_1.js";const n=class{constructor(i){e(this,i),this.navigate=t(this,"navigate",7),this.hasLeadingSlot=!1,this.hasTrailingSlot=!1,this.selected=!1,this.type="product-label",this.handleClick=()=>{"sub-account"===this.type&&this.navigate.emit()}}connectedCallback(){this.syncSlots(),this.connectSlotObserver()}disconnectedCallback(){void 0!==this.slotSyncTimeoutId&&(clearTimeout(this.slotSyncTimeoutId),this.slotSyncTimeoutId=void 0),this.disconnectSlotObserver()}componentWillLoad(){this.syncSlots()}componentWillRender(){this.disconnectSlotObserver()}componentDidRender(){this.scheduleSlotSync()}connectSlotObserver(){this.disconnectSlotObserver(),"undefined"!=typeof MutationObserver&&(this.slotObserver=new MutationObserver((()=>{this.scheduleSlotSync()})),this.slotObserver.observe(this.el,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["slot"]}))}disconnectSlotObserver(){this.slotObserver?.disconnect(),this.slotObserver=void 0}scheduleSlotSync(){void 0!==this.slotSyncTimeoutId&&clearTimeout(this.slotSyncTimeoutId),this.slotSyncTimeoutId=setTimeout((()=>{this.slotSyncTimeoutId=void 0,this.el.isConnected&&(this.syncSlots(),this.connectSlotObserver())}),0)}syncSlots(){const e=e=>e.closest("xpl-side-nav-header-item")===this.el,t=Array.from(this.el.querySelectorAll('[slot="leading"]')).some(e),i=Array.from(this.el.querySelectorAll('[slot="trailing"]')).some(e);t!==this.hasLeadingSlot&&(this.hasLeadingSlot=t),i!==this.hasTrailingSlot&&(this.hasTrailingSlot=i)}render(){const e="sub-account"===this.type,t=!!this.icon||this.hasLeadingSlot,a=e&&!this.label?.trim()?"Sub-account":void 0,n=e&&!this.hasTrailingSlot,h=this.hasTrailingSlot||n,l=t?i("span",{class:"xpl-side-nav-header-item__leading"},i("slot",{name:"leading"},this.icon?i("xpl-icon",{icon:this.icon,size:16}):null)):null,d=h?i("span",{class:"xpl-side-nav-header-item__trailing","aria-hidden":n?"true":void 0},i("slot",{name:"trailing"},n?i("xpl-icon",{icon:"chevron-expand-y",size:16}):null)):null,r=i("span",{key:"3ea94d1fda38199a65303a9bf911de4a7d48aacc",class:"xpl-side-nav-header-item__content"},l,i("span",{key:"a3f369eb6e7bb4e9a283e8f525a356b152d9c017",class:"xpl-side-nav-header-item__label"},this.label??""),d);return i(s,{key:"d979308c18fd071483cbbe8301ed90ffb842a9ac",class:{"xpl-side-nav-header-item":!0,"xpl-side-nav-header-item--product-label":!e,"xpl-side-nav-header-item--sub-account":e,"xpl-side-nav-header-item--selected":e&&this.selected}},e?i("button",{type:"button",class:"xpl-side-nav-header-item__header","aria-current":this.selected?"true":void 0,"aria-label":a,onClick:this.handleClick},r):i("div",{class:"xpl-side-nav-header-item__header"},r))}get el(){return a(this)}};export{n as xpl_side_nav_header_item}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var t=(t=>(t.Undefined="undefined",t.Null="null",t.String="string",t.Number="number",t.SpecialNumber="number",t.Boolean="boolean",t.BigInt="bigint",t))(t||{}),n=(t=>(t.Array="array",t.Date="date",t.Map="map",t.Object="object",t.RegularExpression="regexp",t.Set="set",t.Channel="channel",t.Symbol="symbol",t))(n||{}),e="type",o="value",l="serialized:";function s(t,n,e){const o="undefined"!=typeof HTMLElement?HTMLElement.prototype:null;for(;t&&t!==o;){const o=Object.getOwnPropertyDescriptor(t,n);if(o&&(!e||o.get))return o;t=Object.getPrototypeOf(t)}}var i=(t,n)=>{var e;Object.entries(null!=(e=n.o.t)?e:{}).map((([e,[o]])=>{if(31&o||32&o){const o=t[e],l=s(Object.getPrototypeOf(t),e,!0)||Object.getOwnPropertyDescriptor(t,e);l&&Object.defineProperty(t,e,{get(){return l.get.call(this)},set(t){l.set.call(this,t)},configurable:!0,enumerable:!0}),n.l.has(e)?t[e]=n.l.get(e):void 0!==o&&(t[e]=o)}}))},r=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},c=(t,n)=>{n&&(t.__stencil__getHostRef=()=>n,n.i=t,512&n.o.u&&i(t,n))},u=(t,n)=>n in t,f=(t,n)=>(0,console.error)(t,n),a=new Map,d=new Map,p=new Map,v="s-id",h="sty-id",$="c-id",m="slot-fb{display:contents}slot-fb[hidden]{display:none}",y="http://www.w3.org/1999/xlink",b="undefined"!=typeof window?window:{},g={u:0,p:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,n,e,o)=>t.addEventListener(n,e,o),rel:(t,n,e,o)=>t.removeEventListener(n,e,o),ce:(t,n)=>new CustomEvent(t,n)},w=t=>Promise.resolve(t),j=(()=>{try{return!!b.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),O=!!j&&(()=>!!b.document&&Object.getOwnPropertyDescriptor(b.document.adoptedStyleSheets,"length").writable)(),S=!1,k=[],N=[],x=()=>{var t;return(null==(t=b.document)?void 0:t.hidden)?I(C):g.raf(C)},E=(t,n)=>e=>{t.push(e),S||(S=!0,n&&4&g.u?I(C):x())},M=t=>{for(let n=0;n<t.length;n++)try{t[n](performance.now())}catch(t){f(t)}t.length=0},C=()=>{M(k),M(N),(S=k.length>0)&&x()},I=t=>w().then(t),L=E(N,!0),T=t=>{const n=U(t,"childNodes");t.tagName&&t.tagName.includes("-")&&t["s-cr"]&&"SLOT-FB"!==t.tagName&&R(n,t.tagName).forEach((t=>{1===t.nodeType&&"SLOT-FB"===t.tagName&&(t.hidden=!!A(t,P(t),!1).length)}));let e=0;for(e=0;e<n.length;e++){const t=n[e];1===t.nodeType&&U(t,"childNodes").length&&T(t)}};function R(t,n,e){let o,l=0,s=[];for(;l<t.length;l++){if(o=t[l],o["s-sr"]&&(!n||o["s-hn"]===n)&&(void 0===e||P(o)===e)&&(s.push(o),void 0!==e))return s;s=[...s,...R(U(o,"childNodes"),n,e)]}return s}var A=(t,n,e=!0)=>{const o=[];(e&&t["s-sr"]||!t["s-sr"])&&o.push(t);let l=t;for(;l=l.nextSibling;)P(l)!==n||!e&&l["s-sr"]||o.push(l);return o},D=(t,n)=>1===t.nodeType?null===t.getAttribute("slot")&&""===n||t.getAttribute("slot")===n:t["s-sn"]===n||""===n,F=(t,n,e,o)=>{if(t["s-ol"]&&t["s-ol"].isConnected)return;const l=document.createTextNode("");if(l["s-nr"]=t,!n["s-cr"]||!n["s-cr"].parentNode)return;const s=n["s-cr"].parentNode,i=U(s,"appendChild");if(void 0!==o){l["s-oo"]=o;const t=U(s,"childNodes"),n=[l];t.forEach((t=>{t["s-nr"]&&n.push(t)})),n.sort(((t,n)=>!t["s-oo"]||t["s-oo"]<(n["s-oo"]||0)?-1:!n["s-oo"]||n["s-oo"]<t["s-oo"]?1:0)),n.forEach((t=>i.call(s,t)))}else i.call(s,l);t["s-ol"]=l,t["s-sh"]=n["s-hn"]},P=t=>"string"==typeof t["s-sn"]?t["s-sn"]:1===t.nodeType&&t.getAttribute("slot")||void 0;function H(t){if(t.assignedElements||t.assignedNodes||!t["s-sr"])return;const n=n=>function(t){const e=[],o=this["s-sn"];(null==t?void 0:t.flatten)&&console.error("\n Flattening is not supported for Stencil non-shadow slots.\n You can use `.childNodes` to nested slot fallback content.\n If you have a particular use case, please open an issue on the Stencil repo.\n ");const l=this["s-cr"].parentElement;return(l.__childNodes?l.childNodes:(t=>{const n=[];for(let e=0;e<t.length;e++){const o=t[e]["s-nr"]||void 0;o&&o.isConnected&&n.push(o)}return n})(l.childNodes)).forEach((t=>{o===P(t)&&e.push(t)})),n?e.filter((t=>1===t.nodeType)):e}.bind(t);t.assignedElements=n(!0),t.assignedNodes=n(!1)}function U(t,n){if("__"+n in t){const e=t["__"+n];return"function"!=typeof e?e:e.bind(t)}return"function"!=typeof t[n]?t[n]:t[n].bind(t)}function V(t){var n,e,o;return null!=(o=null==(e=null==(n=t.head)?void 0:n.querySelector('meta[name="csp-nonce"]'))?void 0:e.getAttribute("content"))?o:void 0}var B=new WeakMap,_=t=>"sc-"+t.v,z=t=>"object"==(t=typeof t)||"function"===t,W=(t,n,...e)=>{let o=null,l=null,s=null,i=!1,r=!1;const c=[],u=n=>{for(let e=0;e<n.length;e++)if(o=n[e],Array.isArray(o))u(o);else if(null!=o&&"boolean"!=typeof o){if(i="function"!=typeof t&&!z(o))o+="";else if("function"!=typeof t&&void 0===o.u){f("Invalid vNode child");continue}i&&r?c[c.length-1].h+=o:c.push(i?q(null,o):o),r=i}};if(u(e),n){n.key&&(l=n.key),n.name&&(s=n.name);{const t=n.className||n.class;t&&(n.class="object"!=typeof t?t:Object.keys(t).filter((n=>t[n])).join(" "))}}if("function"==typeof t)return t(null===n?{}:n,c,G);const a=q(t,null);return a.$=n,c.length>0&&(a.m=c),a.j=l,a.O=s,a},q=(t,n)=>({u:0,S:t,h:null!=n?n:null,k:null,m:null,$:null,j:null,O:null}),Y={},G={forEach:(t,n)=>t.map(J).forEach(n),map:(t,n)=>t.map(J).map(n).map(Z)},J=t=>({vattrs:t.$,vchildren:t.m,vkey:t.j,vname:t.O,vtag:t.S,vtext:t.h}),Z=t=>{if("function"==typeof t.vtag){const n={...t.vattrs};return t.vkey&&(n.key=t.vkey),t.vname&&(n.name=t.vname),W(t.vtag,n,...t.vchildren||[])}const n=q(t.vtag,t.vtext);return n.$=t.vattrs,n.m=t.vchildren,n.j=t.vkey,n.O=t.vname,n},K=(t,n,e,o,l,s,i,r=[])=>{let c,u,f,a;if(1===s.nodeType){if(c=s.getAttribute($),c&&(u=c.split("."),u[0]===i||"0"===u[0])){f=X({u:0,N:u[0],M:u[1],C:u[2],I:u[3],S:s.tagName.toLowerCase(),k:s,$:{class:s.className||""}}),n.push(f),s.removeAttribute($),t.m||(t.m=[]);const o=f.k.getAttribute("s-sn");"string"==typeof o&&("slot-fb"===f.S&&tt(o,u[2],f,s,t,n,e,0,r),f.k["s-sn"]=o,f.k.removeAttribute("s-sn")),void 0!==f.I&&(t.m[f.I]=f),t=f}if(s.shadowRoot)for(a=s.shadowRoot.childNodes.length-1;a>=0;a--)K(t,n,e,o,l,s.shadowRoot.childNodes[a],i,r);const d=s.__childNodes||s.childNodes;for(a=d.length-1;a>=0;a--)K(t,n,e,o,l,d[a],i,r)}else if(8===s.nodeType)u=s.nodeValue.split("."),(u[1]===i||"0"===u[1])&&(c=u[0],f=X({N:u[1],M:u[2],C:u[3],I:u[4]||"0",k:s,$:null,m:null,j:null,O:null,S:null,h:null}),"t"===c?(f.k=et(s,3),f.k&&3===f.k.nodeType&&(f.h=f.k.textContent,n.push(f),s.remove(),i===f.N&&(t.m||(t.m=[]),t.m[f.I]=f))):"c"===c?(f.k=et(s,8),f.k&&8===f.k.nodeType&&(n.push(f),s.remove())):f.N===i&&("s"===c?tt(s["s-sn"]=u[5]||"",u[2],f,s,t,n,e,0,r):"r"===c&&(l["s-cr"]=s,s["s-cn"]=!0)));else if(t&&"style"===t.S){const n=q(null,s.textContent);n.k=s,n.I="0",t.m=[n]}return t},Q=(t,n)=>{if(1===t.nodeType){const e=t[v]||t.getAttribute(v);e&&n.set(e,t);let o=0;if(t.shadowRoot)for(;o<t.shadowRoot.childNodes.length;o++)Q(t.shadowRoot.childNodes[o],n);const l=t.__childNodes||t.childNodes;for(o=0;o<l.length;o++)Q(l[o],n)}else if(8===t.nodeType){const e=t.nodeValue.split(".");"o"===e[0]&&(n.set(e[1]+"."+e[2],t),t.nodeValue="",t["s-en"]=e[3])}},X=t=>({u:0,N:null,M:null,C:null,I:"0",k:null,$:null,m:null,j:null,O:null,S:null,h:null,...t});function tt(t,n,e,o,l,s,i,r,c){o["s-sr"]=!0,e.O=t||null,e.S="slot";const u=(null==l?void 0:l.k)?l.k["s-id"]||l.k.getAttribute("s-id"):"";{const s=e.k,i=u&&u!==e.N&&l.k.shadowRoot;nt(c,n,t,o,i?u:e.N),H(o),i&&l.k.insertBefore(s,l.k.children[0])}s.push(e),i.push(e),l.m||(l.m=[]),l.m[e.I]=e}var nt=(t,n,e,o,l)=>{var s,i;let r=o.nextSibling;if(t[n]=t[n]||[],r&&!(null==(s=r.nodeValue)?void 0:s.startsWith("s.")))do{!r||(r.getAttribute&&r.getAttribute("slot")||r["s-sn"])!==e&&(""!==e||r["s-sn"]||r.getAttribute&&r.getAttribute("slot")||8!==r.nodeType&&3!==r.nodeType)||(r["s-sn"]=e,t[n].push({slot:o,node:r,hostId:l})),r=null==r?void 0:r.nextSibling}while(r&&!(null==(i=r.nodeValue)?void 0:i.startsWith("s.")))},et=(t,n)=>{let e=t;do{e=e.nextSibling}while(e&&(e.nodeType!==n||!e.nodeValue));return e},ot=t=>{if(!t)return;const n=Object.keys(t);if(0===n.length)return;let e=!1;for(const o of n){if(e)break;for(const n of t[o])if("string"==typeof n){e=!0;break}}if(!e)return t;const o={};for(const e of n)o[e]=t[e].map((t=>"string"==typeof t?{[t]:0}:t));return o},lt=class l{static fromLocalValue(t){const n=t[e],s=o in t?t[o]:void 0;switch(n){case"string":case"boolean":return s;case"bigint":return BigInt(s);case"undefined":return;case"null":return null;case"number":return"NaN"===s?NaN:"-0"===s?-0:"Infinity"===s?1/0:"-Infinity"===s?-1/0:s;case"array":return s.map((t=>l.fromLocalValue(t)));case"date":return new Date(s);case"map":const t=new Map;for(const[n,e]of s){const o="object"==typeof n&&null!==n?l.fromLocalValue(n):n,s=l.fromLocalValue(e);t.set(o,s)}return t;case"object":const e={};for(const[t,n]of s)e[t]=l.fromLocalValue(n);return e;case"regexp":const{pattern:o,flags:i}=s;return RegExp(o,i);case"set":const r=new Set;for(const t of s)r.add(l.fromLocalValue(t));return r;case"symbol":return Symbol(s);default:throw Error("Unsupported type: "+n)}}static fromLocalValueArray(t){return t.map((t=>l.fromLocalValue(t)))}static isLocalValueObject(l){if("object"!=typeof l||null===l)return!1;if(!l.hasOwnProperty(e))return!1;const s=l[e];return!!Object.values({...t,...n}).includes(s)&&("null"===s||"undefined"===s||l.hasOwnProperty(o))}};var st,it,rt=(t,n)=>"string"==typeof t&&t.startsWith(l)?t=function(t){return"string"==typeof t&&t.startsWith(l)?lt.fromLocalValue(JSON.parse(function(t){const n=atob(t),e=new Uint8Array(n.length);for(let t=0;t<n.length;t++)e[t]=n.charCodeAt(t);return(new TextDecoder).decode(e)}(t.slice(11)))):t}(t):null==t||z(t)?t:4&n?"false"!==t&&(""===t||!!t):2&n?"string"==typeof t?parseFloat(t):"number"==typeof t?t:NaN:1&n?t+"":t,ct=t=>{var n;return null==(n=r(t))?void 0:n.$hostElement$},ut=(t,n,e)=>{const o=ct(t);return{emit:t=>ft(o,n,{bubbles:!!(4&e),composed:!!(2&e),cancelable:!!(1&e),detail:t})}},ft=(t,n,e)=>{const o=g.ce(n,e);return t.dispatchEvent(o),o},at=(t,n,e,o,l,s,i)=>{if(e===o)return;let c=u(t,n),f=n.toLowerCase();if("class"===n){const n=t.classList,l=ht(e);let s=ht(o);if((t["s-si"]||t["s-sc"])&&i){const e=t["s-sc"]||t["s-si"];s.push(e),l.forEach((t=>{t.startsWith(e)&&s.push(t)})),s=[...new Set(s)].filter((t=>t)),n.add(...s)}else n.remove(...l.filter((t=>t&&!s.includes(t)))),n.add(...s.filter((t=>t&&!l.includes(t))))}else if("style"===n){for(const n in e)o&&null!=o[n]||(n.includes("-")?t.style.removeProperty(n):t.style[n]="");for(const n in o)e&&o[n]===e[n]||(n.includes("-")?t.style.setProperty(n,o[n]):t.style[n]=o[n])}else if("key"===n);else if("ref"===n)o&&Ft(o,t);else if(c||"o"!==n[0]||"n"!==n[1]){if("a"===n[0]&&n.startsWith("attr:")){const e=n.slice(5);let l;{const n=r(t);if(n&&n.o&&n.o.t){const t=n.o.t[e];t&&t[1]&&(l=t[1])}}return l||(l=e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==o||!1===o?!1===o&&""!==t.getAttribute(l)||t.removeAttribute(l):t.setAttribute(l,!0===o?"":o))}if("p"===n[0]&&n.startsWith("prop:")){const e=n.slice(5);try{t[e]=o}catch(t){}return}{const i=z(o);if((c||i&&null!==o)&&!l)try{if(t.tagName.includes("-"))t[n]!==o&&(t[n]=o);else{const l=null==o?"":o;"list"===n?c=!1:null!=e&&t[n]===l||("function"==typeof t.__lookupSetter__(n)?t[n]=l:t.setAttribute(n,l))}}catch(t){}let r=!1;f!==(f=f.replace(/^xlink\:?/,""))&&(n=f,r=!0),null==o||!1===o?(!1!==o||""===t.getAttribute(n)||4&s&&!pt(n))&&(r?t.removeAttributeNS(y,n):t.removeAttribute(n)):(!c||4&s||l)&&!i&&1===t.nodeType&&(o=!0===o?"":o,r?t.setAttributeNS(y,n,o):t.setAttribute(n,o))}}else if(n="-"===n[2]?n.slice(3):u(b,f)?f.slice(2):f[2]+n.slice(3),e||o){const l=n.endsWith($t);n=n.replace(mt,""),e&&g.rel(t,n,e,l),o&&g.ael(t,n,o,l)}},dt=new Set(["draggable","contenteditable","spellcheck"]),pt=t=>dt.has(t)||t.startsWith("aria-"),vt=/\s/,ht=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(vt):[]),$t="Capture",mt=RegExp($t+"$"),yt=(t,n,e,o)=>{const l=11===n.k.nodeType&&n.k.host?n.k.host:n.k,s=t&&t.$||{},i=n.$||{};for(const t of bt(Object.keys(s)))t in i||at(l,t,s[t],void 0,e,n.u,o);for(const t of bt(Object.keys(i)))at(l,t,s[t],i[t],e,n.u,o)};function bt(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var gt=!1,wt=!1,jt=!1,Ot=!1,St=[],kt=[],Nt=(t,n,e)=>{var o;const l=n.m[e];let s,i,r,c=0;if(gt||(jt=!0,"slot"===l.S&&(l.u|=l.m?2:1)),null!=l.h)s=l.k=b.document.createTextNode(l.h);else if(1&l.u)s=l.k=b.document.createTextNode(""),yt(null,l,Ot);else{if(Ot||(Ot="svg"===l.S),!b.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(s=l.k=b.document.createElementNS(Ot?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",!gt&&2&l.u?"slot-fb":l.S),Ot&&"foreignObject"===l.S&&(Ot=!1),yt(null,l,Ot),l.m){const n="template"===l.S?s.content:s;for(c=0;c<l.m.length;++c)i=Nt(t,l,c),i&&n.appendChild(i)}"svg"===l.S?Ot=!1:"foreignObject"===s.tagName&&(Ot=!0)}return s["s-hn"]=it,3&l.u&&(s["s-sr"]=!0,s["s-cr"]=st,s["s-sn"]=l.O||"",s["s-rf"]=null==(o=l.$)?void 0:o.ref,H(s),r=t&&t.m&&t.m[e],r&&r.S===l.S&&t.k&&xt(t.k)),s},xt=t=>{g.u|=1;const n=t.closest(it.toLowerCase());if(null!=n){const e=Array.from(n.__childNodes||n.childNodes).find((t=>t["s-cr"])),o=Array.from(t.__childNodes||t.childNodes);for(const t of e?o.reverse():o)null!=t["s-sh"]&&(Pt(n,t,null!=e?e:null),t["s-sh"]=void 0,jt=!0)}g.u&=-2},Et=(t,n)=>{g.u|=1;const e=Array.from(t.__childNodes||t.childNodes);if(t["s-sr"]){let n=t;for(;n=n.nextSibling;)n&&n["s-sn"]===t["s-sn"]&&n["s-sh"]===it&&e.push(n)}for(let t=e.length-1;t>=0;t--){const o=e[t];o["s-hn"]!==it&&o["s-ol"]&&(Pt(Lt(o).parentNode,o,Lt(o)),o["s-ol"].remove(),o["s-ol"]=void 0,o["s-sh"]=void 0,jt=!0),n&&Et(o,n)}g.u&=-2},Mt=(t,n,e,o,l,s)=>{let i,r=t["s-cr"]&&t["s-cr"].parentNode||t;for("template"===e.S&&(r=r.content);l<=s;++l)o[l]&&(i=Nt(null,e,l),i&&(o[l].k=i,Pt(r,i,Lt(n))))},Ct=(t,n,e)=>{for(let o=n;o<=e;++o){const n=t[o];if(n){const t=n.k;Dt(n),t&&(wt=!0,t["s-ol"]?t["s-ol"].remove():Et(t,!0),t.remove())}}},It=(t,n,e=!1)=>t.S===n.S&&("slot"===t.S?t.O===n.O:e?(e&&!t.j&&n.j&&(t.j=n.j),!0):t.j===n.j),Lt=t=>t&&t["s-ol"]||t,Tt=(t,n,e=!1)=>{const o=n.k=t.k,l=t.m,s=n.m,i=n.S,r=n.h;let c;null==r?(Ot="svg"===i||"foreignObject"!==i&&Ot,"slot"!==i||gt||t.O!==n.O&&(n.k["s-sn"]=n.O||"",xt(n.k.parentElement)),yt(t,n,Ot,e),null!==l&&null!==s?((t,n,e,o,l=!1)=>{let s,i,r=0,c=0,u=0,f=0,a=n.length-1,d=n[0],p=n[a],v=o.length-1,h=o[0],$=o[v];const m="template"===e.S?t.content:t;for(;r<=a&&c<=v;)if(null==d)d=n[++r];else if(null==p)p=n[--a];else if(null==h)h=o[++c];else if(null==$)$=o[--v];else if(It(d,h,l))Tt(d,h,l),d=n[++r],h=o[++c];else if(It(p,$,l))Tt(p,$,l),p=n[--a],$=o[--v];else if(It(d,$,l))"slot"!==d.S&&"slot"!==$.S||Et(d.k.parentNode,!1),Tt(d,$,l),Pt(m,d.k,p.k.nextSibling),d=n[++r],$=o[--v];else if(It(p,h,l))"slot"!==d.S&&"slot"!==$.S||Et(p.k.parentNode,!1),Tt(p,h,l),Pt(m,p.k,d.k),p=n[--a],h=o[++c];else{for(u=-1,f=r;f<=a;++f)if(n[f]&&null!==n[f].j&&n[f].j===h.j){u=f;break}u>=0?(i=n[u],i.S!==h.S?s=Nt(n&&n[c],e,u):(Tt(i,h,l),n[u]=void 0,s=i.k),h=o[++c]):(s=Nt(n&&n[c],e,c),h=o[++c]),s&&Pt(Lt(d.k).parentNode,s,Lt(d.k))}r>a?Mt(t,null==o[v+1]?null:o[v+1].k,e,o,c,v):c>v&&Ct(n,r,a)})(o,l,n,s,e):null!==s?(null!==t.h&&(o.textContent=""),Mt(o,null,n,s,0,s.length-1)):e||null===l?e&&null!==l&&null===s&&(n.m=l):Ct(l,0,l.length-1),Ot&&"svg"===i&&(Ot=!1)):(c=o["s-cr"])?c.parentNode.textContent=r:t.h!==r&&(o.data=r)},Rt=[],At=t=>{let n,e,o;const l=t.__childNodes||t.childNodes;for(const t of l){if(t["s-sr"]&&(n=t["s-cr"])&&n.parentNode){e=n.parentNode.__childNodes||n.parentNode.childNodes;const l=t["s-sn"];for(o=e.length-1;o>=0;o--)if(n=e[o],!n["s-cn"]&&!n["s-nr"]&&n["s-hn"]!==t["s-hn"]&&(!n["s-sh"]||n["s-sh"]!==t["s-hn"]||""!==l&&P(n)===l))if(D(n,l)){let e=Rt.find((t=>t.L===n));wt=!0,n["s-sn"]=n["s-sn"]||l,e?(e.L["s-sh"]=t["s-hn"],e.T=t):(n["s-sh"]=t["s-hn"],Rt.push({T:t,L:n})),n["s-sr"]&&Rt.map((t=>{D(t.L,n["s-sn"])&&(e=Rt.find((t=>t.L===n)),e&&!t.T&&(t.T=e.T))}))}else Rt.some((t=>t.L===n))||Rt.push({L:n})}1===t.nodeType&&At(t)}},Dt=t=>{t.$&&t.$.ref&&St.push((()=>t.$.ref(null))),t.m&&t.m.map(Dt)},Ft=(t,n)=>{kt.push((()=>t(n)))},Pt=(t,n,e,o)=>{if("string"==typeof n["s-sn"]){t.insertBefore(n,e);const{slotNode:l}=function(t,n){var e;if(!(n=n||(null==(e=t["s-ol"])?void 0:e.parentElement)))return{slotNode:null,slotName:""};const o=t["s-sn"]=P(t)||"";return{slotNode:R(U(n,"childNodes"),n.tagName,o)[0],slotName:o}}(n);return l&&!o&&function(t){t.dispatchEvent(new CustomEvent("slotchange",{bubbles:!1,cancelable:!1,composed:!1}))}(l),n}return(null==t?void 0:t.__insertBefore)?t.__insertBefore(n,e):null==t?void 0:t.insertBefore(n,e)},Ht=(t,n)=>{if(n&&!t.R&&n["s-p"]){const e=n["s-p"].push(new Promise((o=>t.R=()=>{n["s-p"].splice(e-1,1),o()})))}},Ut=(t,n)=>{if(t.u|=16,4&t.u)return void(t.u|=512);Ht(t,t.A);const e=()=>Vt(t,n);if(!n)return L(e);queueMicrotask((()=>{e()}))},Vt=(t,n)=>{const e=t.$hostElement$,o=t.i;if(!o)throw Error(`Can't render component <${e.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return n?(t.D&&(t.D=!1,Jt(o,"connectedCallback",void 0,e)),t.u|=256,t.F&&(t.F.map((([t,n])=>Jt(o,t,n,e))),t.F=void 0),t.P.length&&t.P.forEach((t=>t(e))),l=Jt(o,"componentWillLoad",void 0,e)):l=Jt(o,"componentWillUpdate",void 0,e),l=Bt(l,(()=>Jt(o,"componentWillRender",void 0,e))),Bt(l,(()=>zt(t,o,n)))},Bt=(t,n)=>_t(t)?t.then(n).catch((t=>{console.error(t),n()})):n(),_t=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,zt=async(t,n,e)=>{var o;const l=t.$hostElement$,s=l["s-rc"];e&&(t=>{const n=t.o;((t,n)=>{var e,o,l;const s=_(n),i=p.get(s);if(!b.document)return s;if(t=11===t.nodeType?t:b.document,i)if("string"==typeof i){let l,r=B.get(t=t.head||t);r||B.set(t,r=new Set);const c=t.querySelector(`[${h}="${s}"]`);if(c)c.textContent=i;else if(!r.has(s)){l=b.document.createElement("style"),l.textContent=i;const c=null!=(e=g.H)?e:V(b.document);if(null!=c&&l.setAttribute("nonce",c),!(1&n.u))if("HEAD"===t.nodeName){const n=t.querySelectorAll("link[rel=preconnect]"),e=n.length>0?n[n.length-1].nextSibling:t.querySelector("style");t.insertBefore(l,(null==e?void 0:e.parentNode)===t?e:null)}else if("host"in t)if(j){const n=new(null!=(o=t.defaultView)?o:t.ownerDocument.defaultView).CSSStyleSheet;n.replaceSync(i),O?t.adoptedStyleSheets.unshift(n):t.adoptedStyleSheets=[n,...t.adoptedStyleSheets]}else{const n=t.querySelector("style");n?n.textContent=i+n.textContent:t.prepend(l)}else t.append(l);1&n.u&&t.insertBefore(l,null),4&n.u&&(l.textContent+=m),r&&r.add(s)}}else{let n=B.get(t);if(n||B.set(t,n=new Set),!n.has(s)){const e=null!=(l=t.defaultView)?l:t.ownerDocument.defaultView;let o;if(i.constructor===e.CSSStyleSheet)o=i;else{o=new e.CSSStyleSheet;for(let t=0;t<i.cssRules.length;t++)o.insertRule(i.cssRules[t].cssText,t)}if(O?t.adoptedStyleSheets.push(o):t.adoptedStyleSheets=[...t.adoptedStyleSheets,o],n.add(s),"host"in t){const n=t.querySelector(`[${h}="${s}"]`);n&&L((()=>n.remove()))}}}})(t.$hostElement$.getRootNode(),n)})(t);Wt(t,n,l,e),s&&(s.map((t=>t())),l["s-rc"]=void 0);{const n=null!=(o=l["s-p"])?o:[],e=()=>qt(t);0===n.length?e():(Promise.all(n).then(e).catch(e),t.u|=4,n.length=0)}},Wt=(t,n,e,o)=>{try{n=n.render(),t.u&=-17,t.u|=2,((t,n,e=!1)=>{var o,l,s,i,r;const c=t.$hostElement$,u=t.o,f=t.U||q(null,null),a=(t=>t&&t.S===Y)(n)?n:W(null,null,n);if(it=c.tagName,u.V&&(a.$=a.$||{},u.V.forEach((([t,n])=>{a.$[n]=c[t]}))),e&&a.$)for(const t of Object.keys(a.$))c.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(a.$[t]=c[t]);if(a.S=null,a.u|=4,t.U=a,a.k=f.k=c,gt=!1,st=c["s-cr"],wt=!1,Tt(f,a,e),g.u|=1,jt){At(a.k);for(const t of Rt){const n=t.L;if(!n["s-ol"]&&b.document){const t=b.document.createTextNode("");t["s-nr"]=n,Pt(n.parentNode,n["s-ol"]=t,n,e)}}for(const t of Rt){const n=t.L,r=t.T;if(1===n.nodeType&&e&&(n["s-ih"]=null!=(o=n.hidden)&&o),r){const t=r.parentNode;let o=r.nextSibling;if(o&&1===o.nodeType){let e=null==(l=n["s-ol"])?void 0:l.previousSibling;for(;e;){let l=null!=(s=e["s-nr"])?s:null;if(l&&l["s-sn"]===n["s-sn"]&&t===(l.__parentNode||l.parentNode)){for(l=l.nextSibling;l===n||(null==l?void 0:l["s-sr"]);)l=null==l?void 0:l.nextSibling;if(!l||!l["s-nr"]){o=l;break}}e=e.previousSibling}}if((!o&&t!==(n.__parentNode||n.parentNode)||(n.__nextSibling||n.nextSibling)!==o)&&n!==o){if(Pt(t,n,o,e),8===n.nodeType&&n.nodeValue.startsWith("s-nt-")){const t=b.document.createTextNode(n.nodeValue.replace(/^s-nt-/,""));t["s-hn"]=n["s-hn"],t["s-sn"]=n["s-sn"],t["s-sh"]=n["s-sh"],t["s-sr"]=n["s-sr"],t["s-ol"]=n["s-ol"],t["s-ol"]["s-nr"]=t,Pt(n.parentNode,t,n,e),n.parentNode.removeChild(n)}1===n.nodeType&&"SLOT-FB"!==n.tagName&&(n.hidden=null!=(i=n["s-ih"])&&i)}n&&"function"==typeof r["s-rf"]&&r["s-rf"](r)}else 1===n.nodeType&&(n.hidden=!0)}}if(wt&&T(a.k),g.u&=-2,Rt.length=0,!gt&&!(1&u.u)&&c["s-cr"]){const t=a.k.__childNodes||a.k.childNodes;for(const n of t)if(n["s-hn"]!==it&&!n["s-sh"])if(e&&null==n["s-ih"]&&(n["s-ih"]=null!=(r=n.hidden)&&r),1===n.nodeType)n.hidden=!0;else if(3===n.nodeType&&n.nodeValue.trim()){const t=b.document.createComment("s-nt-"+n.nodeValue);t["s-sn"]=n["s-sn"],Pt(n.parentNode,t,n,e),n.parentNode.removeChild(n)}}st=void 0,St.forEach((t=>t())),St.length=0,kt.forEach((t=>t())),kt.length=0})(t,n,o)}catch(n){f(n,t.$hostElement$)}return null},qt=t=>{const n=t.$hostElement$,e=t.i,o=t.A;Jt(e,"componentDidRender",void 0,n),64&t.u?Jt(e,"componentDidUpdate",void 0,n):(t.u|=64,Zt(n),Jt(e,"componentDidLoad",void 0,n),t.B(n),o||Gt()),t._(n),t.R&&(t.R(),t.R=void 0),512&t.u&&I((()=>Ut(t,!1))),t.u&=-517},Yt=t=>{var n;{const e=r(t),o=null==(n=null==e?void 0:e.$hostElement$)?void 0:n.isConnected;return o&&2==(18&e.u)&&Ut(e,!1),o}},Gt=()=>{var t;I((()=>ft(b,"appload",{detail:{namespace:"apollo-core"}}))),(null==(t=g.W)?void 0:t.size)&&g.W.clear()},Jt=(t,n,e,o)=>{if(t&&t[n])try{return t[n](e)}catch(t){f(t,o)}},Zt=t=>t.classList.add("hydrated"),Kt=(t,n,e,o)=>{const l=r(t);if(!l)return;if(!l)throw Error(`Couldn't find host element for "${o.v}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`);const s=l.$hostElement$,i=l.l.get(n),c=l.u,u=l.i;if(e=rt(e,o.t[n][0]),!(8&c&&void 0!==i||e===i||Number.isNaN(i)&&Number.isNaN(e))){if(l.l.set(n,e),o.q){const t=o.q[n];t&&t.map((t=>{try{const[[o,s]]=Object.entries(t);(128&c||1&s)&&(u?u[o](e,i,n):l.P.push((()=>{l.i[o](e,i,n)})))}catch(t){f(t,s)}}))}if(2&c){if(u.componentShouldUpdate&&!1===u.componentShouldUpdate(e,i,n)&&!(16&c))return;16&c||Ut(l,!1)}}},Qt=(t,n,e)=>{var o,l;const i=t.prototype;{t.watchers&&!n.q&&(n.q=ot(t.watchers)),t.deserializers&&!n.Y&&(n.Y=t.deserializers),t.serializers&&!n.G&&(n.G=t.serializers);const c=Object.entries(null!=(o=n.t)?o:{});if(c.map((([t,[o]])=>{if(31&o||2&e&&32&o){const{get:l,set:c}=s(i,t)||{};l&&(n.t[t][0]|=2048),c&&(n.t[t][0]|=4096),(1&e||!l)&&Object.defineProperty(i,t,{get(){{if(!(2048&n.t[t][0]))return((t,n)=>r(this).l.get(n))(0,t);const e=r(this),o=e?e.i:i;if(!o)return;return o[t]}},configurable:!0,enumerable:!0}),Object.defineProperty(i,t,{set(l){const s=r(this);if(s){if(c)return void 0===(32&o?this[t]:s.$hostElement$[t])&&s.l.get(t)&&(l=s.l.get(t)),c.call(this,rt(l,o)),void Kt(this,t,l=32&o?this[t]:s.$hostElement$[t],n);{if(!(1&e&&4096&n.t[t][0]))return Kt(this,t,l,n),void(1&e&&!s.i&&s.P.push((()=>{4096&n.t[t][0]&&s.i[t]!==s.l.get(t)&&(s.i[t]=l)})));const i=()=>{const e=s.i[t];!s.l.get(t)&&e&&s.l.set(t,e),s.i[t]=rt(l,o),Kt(this,t,s.i[t],n)};s.i?i():s.P.push((()=>{i()}))}}}})}else 1&e&&64&o&&Object.defineProperty(i,t,{value(...n){var e;const o=r(this);return null==(e=null==o?void 0:o.J)?void 0:e.then((()=>{var e;return null==(e=o.i)?void 0:e[t](...n)}))}})})),1&e){const e=new Map;i.attributeChangedCallback=function(t,o,l){g.jmp((()=>{var s;const u=e.get(t),f=r(this);if(this.hasOwnProperty(u)&&(l=this[u],delete this[u]),i.hasOwnProperty(u)&&"number"==typeof this[u]&&this[u]==l)return;if(null==u){const e=null==f?void 0:f.u;if(f&&e&&!(8&e)&&l!==o){const i=f.i,r=null==(s=n.q)?void 0:s[t];null==r||r.forEach((n=>{const[[s,r]]=Object.entries(n);null!=i[s]&&(128&e||1&r)&&i[s].call(i,l,o,t)}))}return}const a=c.find((([t])=>t===u)),d=a?a[1][0]:0,p=4&d;if(512&d&&8&d&&!z(this[u])&&(t=>null==t||!1===t?null:!0===t?"":t+"")(this[u])===l)return;const v=p&&null===l&&void 0===this[u];p&&(l=null!==l&&"false"!==l);const h=Object.getOwnPropertyDescriptor(i,u);v||l==this[u]||h.get&&!h.set||(this[u]=l)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(l=n.q)?l:{}),...c.filter((([t,n])=>31&n[0])).map((([t,o])=>{var l;const s=o[1]||t;return e.set(s,t),512&o[0]&&(null==(l=n.V)||l.push([t,s])),s}))]))}}return t},Xt=async(t,n,e)=>{var o;let l;try{if(!(32&n.u)){if(n.u|=32,n.u&=-1025,e.Z){const s=((t,n)=>{var e;const o=t.v.replace(/-/g,"_"),l=t.Z;if(!l)return;const s=a.get(l);if(s)return s[o];const i=null!=(e=d.get(l))?e:0,r=[i>0?"s-retry="+i:"",""].filter(Boolean).join("&");
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/
|
|
3
|
+
return import(`./${l}.entry.js${r?"?"+r:""}`).then((t=>(d.delete(l),a.set(l,t),t[o])),(t=>{d.set(l,i+1),f(t,n.$hostElement$)}))})(e,n);if(s&&"then"in s){const t=()=>{};l=await s,t()}else l=s;if(!l)throw n.u&=-33,n.K=(null!=(o=n.K)?o:0)+1,n.K<3&&(n.u|=1024),Error(`Constructor for "${e.v}#${n.X}" was not found`);l.isProxied||(e.q=ot(l.watchers),e.G=l.serializers,e.Y=l.deserializers,Qt(l,e,2),l.isProxied=!0);const i=()=>{};n.u|=8;try{new l(n)}catch(n){f(n,t)}n.u&=-9,n.u|=128,i(),4&e.u?n.D=!0:tn(n.i,t)}else l=t.constructor,customElements.whenDefined(t.localName).then((()=>n.u|=128));if(l&&l.style){let t;"string"==typeof l.style&&(t=l.style);const n=_(e);if(!p.has(n)){const o=()=>{};((t,n,e)=>{let o=p.get(t);j&&e?(o=o||new CSSStyleSheet,"string"==typeof o?o=n:o.replaceSync(n)):o=n,p.set(t,o)})(n,t,!!(1&e.u)),o()}}}const s=n.A,i=()=>Ut(n,!0);s&&s["s-rc"]?s["s-rc"].push(i):i()}catch(e){f(e,t),n.R&&(n.R(),n.R=void 0),!n.B||1024&n.u||n.B(t)}},tn=(t,n)=>{Jt(t,"connectedCallback",void 0,n)},nn=t=>{if(!b.document)return;const n=t["s-cr"]=b.document.createComment("");n["s-cn"]=!0,Pt(t,n,t.firstChild)},en=(t,n)=>{Jt(t,"disconnectedCallback",void 0,n||t)},on=(t,n={})=>{var e;if(!b.document)return void console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");const o=[],l=n.exclude||[],s=b.customElements,i=b.document.head,c=i.querySelector("meta[charset]"),u=b.document.createElement("style"),f=[];let a,d=!0;Object.assign(g,n),g.p=new URL(n.resourcesUrl||"./",b.document.baseURI).href,g.u|=2;let p=!1;if(t.map((t=>{t[1].map((n=>{var e,i;const c={u:n[0],v:n[1],t:n[2],tt:n[3]};4&c.u&&(p=!0),c.t=n[2],c.tt=n[3],c.V=[],c.q=ot(n[4]),c.G=null!=(e=n[5])?e:{},c.Y=null!=(i=n[6])?i:{};const u=c.v,h=class extends HTMLElement{"s-p";"s-rc";hasRegisteredEventListeners=!1;constructor(t){super(t),((t,n)=>{const e={u:0,$hostElement$:t,o:n,l:new Map,nt:new Map};e.J=new Promise((t=>e._=t)),e.et=new Promise((t=>e.B=t)),t["s-p"]=[],t["s-rc"]=[],e.P=[];const o=e;t.__stencil__getHostRef=()=>o})(t=this,c)}connectedCallback(){const t=r(this);t&&(this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0,sn(this,t,c.tt)),a&&(clearTimeout(a),a=null),d?f.push(this):g.jmp((()=>(t=>{if(!(1&g.u)){const n=r(t);if(!n)return;const e=n.o,o=()=>{};if(1&n.u)sn(t,n,e.tt),(null==n?void 0:n.i)?tn(n.i,t):1024&n.u?setTimeout((()=>Xt(t,n,e)),1e3):(null==n?void 0:n.et)&&n.et.then((()=>tn(n.i,t)));else{let o;n.u|=1,o=t.getAttribute(v),o&&((t,n,e,o)=>{var l,s,i,c;const u=t.shadowRoot,f=[],a=[],d=q(n,null);d.k=t,!b.document||g.W&&g.W.size||Q(b.document.body,g.W=new Map),t[v]=e,t.removeAttribute(v),o.U=K(d,f,[],null,t,t,e,a);let p=0;const h=f.length;let $;for(;p<h;p++){$=f[p];const e=$.N+"."+$.M,o=g.W.get(e),s=$.k;if(u){if((null==(l=$.S)?void 0:(""+l).includes("-"))&&"slot-fb"!==$.S&&!$.k.shadowRoot){const t=r($.k);if(t){const n=_(t.o),e=b.document.querySelector(`style[sty-id="${n}"]`);e&&null.unshift(e.cloneNode(!0))}}}else s["s-hn"]=n.toUpperCase(),"slot"===$.S&&(s["s-cr"]=t["s-cr"]);"slot"===$.S&&($.O=$.k["s-sn"]||$.k.name||null,$.m?($.u|=2,$.k.childNodes.length||$.m.forEach((t=>{$.k.appendChild(t.k)}))):$.u|=1),o&&o.isConnected&&(o.parentElement.shadowRoot&&""===o["s-en"]&&o.parentNode.insertBefore(s,o.nextSibling),o.parentNode.removeChild(o),u||(s["s-oo"]=parseInt($.M))),o&&!o["s-id"]&&g.W.delete(e)}const m=[],y=a.length;let w,j,O,S,k=0,N=0;for(;k<y;k++)if(w=a[k],w&&w.length)for(O=w.length,j=0;j<O;j++){if(S=w[j],m[S.hostId]||(m[S.hostId]=g.W.get(S.hostId)),!m[S.hostId])continue;const t=m[S.hostId];t.shadowRoot&&S.node.parentElement!==t&&t.insertBefore(S.node,null==(i=null==(s=w[j-1])?void 0:s.node)?void 0:i.nextSibling),t.shadowRoot&&u||(S.slot["s-cr"]||(S.slot["s-cr"]=t["s-cr"],S.slot["s-cr"]=!S.slot["s-cr"]&&t.shadowRoot?t:(t.__childNodes||t.childNodes)[0]),F(S.node,S.slot,0,S.node["s-oo"]||N),(null==(c=S.node.parentElement)?void 0:c.shadowRoot)&&S.node.getAttribute&&S.node.getAttribute("slot")&&S.node.removeAttribute("slot")),N=(S.node["s-oo"]||N)+1}o.$hostElement$=t})(t,e.v,o,n),o||12&e.u&&nn(t);{let e=t;for(;e=e.parentNode||e.host;)if(1===e.nodeType&&e.hasAttribute("s-id")&&e["s-p"]||e["s-p"]){Ht(n,n.A=e);break}}e.t&&Object.entries(e.t).map((([n,[e]])=>{if(31&e&&Object.prototype.hasOwnProperty.call(t,n)){const e=t[n];delete t[n],t[n]=e}})),Xt(t,n,e)}o()}})(this))))}disconnectedCallback(){g.jmp((()=>(async t=>{if(!(1&g.u)){const n=r(t);(null==n?void 0:n.ot)&&(n.ot.map((t=>t())),n.ot=void 0),(null==n?void 0:n.i)?en(n.i,t):(null==n?void 0:n.et)&&n.et.then((()=>en(n.i,t)))}B.has(t)&&B.delete(t),t.shadowRoot&&B.has(t.shadowRoot)&&B.delete(t.shadowRoot)})(this))),I((()=>{var t;const n=r(this);if(!n)return;const e=f.findIndex((t=>t===this));e>-1&&f.splice(e,1),(null==(t=null==n?void 0:n.U)?void 0:t.k)instanceof Node&&!n.U.k.isConnected&&delete n.U.k}))}componentOnReady(){var t;return null==(t=r(this))?void 0:t.et}};c.Z=t[0],l.includes(u)||s.get(u)||(o.push(u),s.define(u,Qt(h,c,1)))}))})),o.length>0&&(p&&(u.textContent+=m),u.textContent+=o.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",u.innerHTML.length)){u.setAttribute("data-styles","");const t=null!=(e=g.H)?e:V(b.document);null!=t&&u.setAttribute("nonce",t),i.insertBefore(u,c?c.nextSibling:i.firstChild)}d=!1,f.length?f.map((t=>t.connectedCallback())):g.jmp((()=>a=setTimeout(Gt,30)))},ln=(t,n)=>n,sn=(t,n,e)=>{e&&b.document&&e.map((([e,o,l])=>{const s=cn(b.document,t,e),i=rn(n,l),r=un(e);g.ael(s,o,i,r),(n.ot=n.ot||[]).push((()=>g.rel(s,o,i,r)))}))},rn=(t,n)=>e=>{var o;try{256&t.u?null==(o=t.i)||o[n](e):(t.F=t.F||[]).push([n,e])}catch(n){f(n,t.$hostElement$)}},cn=(t,n,e)=>4&e?t:8&e?b:n,un=t=>({passive:!!(1&t),capture:!!(2&t)}),fn=t=>g.H=t;export{ln as F,Y as H,on as b,ut as c,Yt as f,ct as g,W as h,w as p,c as r,fn as s}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,h as t,H as e}from"./p-
|
|
1
|
+
import{r as s,h as t,H as e}from"./p-CJABLO_1.js";const i=class{constructor(t){s(this,t),this.shape="rectangle",this.size="custom"}render(){return t(e,{key:"faa4173a2910d1dc3943fca5e7efbf5d1805aa9b",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}})}};export{i as xpl_skeleton}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as a,h as s,H as t,g as e}from"./p-CJABLO_1.js";import{g as l,a as r,t as b}from"./p-BQtbf88X.js";const c=class{constructor(s){a(this,s),this.selected=!1}render(){const a=l(this.el),e=this.target??"",c=r(a,e),p=b(a,e);return s(t,{key:"ab151f12048635eb5e47f4cbafcd6f04637f7dfd","aria-labelledby":p,class:{"xpl-tab-panel":!0,"xpl-tab-panel--selected":this.selected},id:c,role:"tabpanel"},s("slot",{key:"81d82c0f3d8b019ec0abf6cbec34529b216b6533"}))}get el(){return e(this)}};export{c as xpl_tab_panel}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,h as s,H as t}from"./p-CJABLO_1.js";const d={success:"green",warning:"yellow",inactive:"gray",error:"red"},a=class{constructor(s){e(this,s),this.bordered=!1,this.dotOnly=!1,this.shape="rounded",this.size="default",this.variant="purple"}get resolvedVariant(){return d[this.variant]??this.variant}render(){return s(t,{key:"df70cb8e95cecc50abc78308edb0b3de90b1e8d5"},s("div",{key:"de762267e9a338127b65027fbb77a297939e997a",class:{"xpl-badge--dot-only":!!this.dotOnly,"xpl-badge--dot-only-bordered":!!this.dotOnly&&!!this.bordered,"xpl-badge":!this.dotOnly,"xpl-badge--dot":!this.dotOnly&&!!this.dot,[`xpl-badge--${this.resolvedVariant}`]:!0,[`xpl-badge--size-${this.size}`]:!!this.size,[`xpl-badge--shape-${this.shape}`]:!this.dotOnly&&!!this.shape}},s("span",{key:"99f8e2cfb87fd814c520532ef0701095e2b8f606",class:"xpl-badge__label"},s("slot",{key:"c49400097ee9bdfc04344464d7be3e02133b199c"}))))}};export{a as xpl_badge}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as s,H as i,g as n}from"./p-
|
|
1
|
+
import{r as t,h as s,H as i,g as n}from"./p-CJABLO_1.js";const h=class{constructor(s){t(this,s),this.disabled=!1,this.fullWidth=!1,this.icon="",this.iconOnly=!1,this.iconPosition="start",this.isLoading=!1,this.sentiment="neutral",this.size="default",this.variant="primary"}componentDidRender(){const t=this.el.attributes,s=Object.keys(t).map((t=>Number(t))).filter((s=>{const i=t[s];return i?.name.includes("data-test")||i?.name.includes("aria-")||!1})).reduce(((s,i)=>{const n=t[i];return n&&(s[n.name]=n.value),s}),{}),i=this.el.querySelector("button");i&&Object.entries(s).forEach((([t,s])=>{i.setAttribute(t,s),this.el.removeAttribute(t)}))}handleDisabledClick(t){this.disabled&&(t.preventDefault(),t.stopImmediatePropagation())}renderIcon(){return this.icon?s("xpl-icon",{icon:this.icon}):null}handleLoadingState(t){this.isLoading&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}render(){return s(i,{key:"22c276771971610882e3f2761685fc0194bf4b53",class:{"xpl-button":!0,[`xpl-button--${this.size}`]:!0,[`xpl-button--${this.variant}`]:!0,[`xpl-button--${this.state?this.state:this.sentiment}`]:!0,[this.icon?`xpl-button__icon-position--${this.iconPosition}`:""]:!!this.icon,"xpl-button--full-width":this.fullWidth,"xpl-button--icon-only":this.iconOnly,"xpl-button--disabled":this.disabled,"xpl-button--loading":this.isLoading&&!this.link}},this.link?s("slot",null):s("button",{...this.controlAttrs??{},disabled:this.disabled,onClick:t=>this.handleLoadingState(t),type:!this.isLoading||"submit"!==this.type&&"reset"!==this.type&&void 0!==this.type?this.type:"button",name:this.name,value:this.value,form:this.form,"aria-busy":this.isLoading?"true":void 0},this.icon&&s("span",{class:"xpl-button__icon"},this.renderIcon()),s("slot",null),this.isLoading&&s("span",{class:"xpl-button__loading-overlay","aria-hidden":"true"},s("span",{class:"xpl-button__loading-spinner"},s("xpl-icon",{icon:"loader-4",size:20})))))}get el(){return n(this)}};export{h as xpl_button}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,h as s,H as e,g as h}from"./p-ukZKsqqq.js";import{v as a}from"./p-CK3_k8jD.js";import{f as r}from"./p-CH4yJ6Qx.js";import{i as n}from"./p-Dqb1pIRo.js";const l=class{constructor(s){t(this,s),this.blurEvent=i(this,"blurEvent",7),this.focusEvent=i(this,"focusEvent",7),this.inputEvent=i(this,"inputEvent",7),this.search=i(this,"search",7),this.valueChange=i(this,"valueChange",7),this.multiline=!1,this.dateFormat="Y-m-d",this.timeFormat="24h",this.allowCustomOption=!1,this.mode="single",this.accept="",this.multiple=!1,this.hideTriggerOnSelect=!1,this.hideFileNames=!1,this.hideAcceptText=!1,this.defaultCountry="US",this.isInternational=!0,this.ariaLabel="",this.type="text",this.handleChildValueChange=t=>{t.stopPropagation(),this.valueChange.emit(t.detail)},this.valueChanged=t=>{this.valueChange.emit(t.target.value)},this.characterCount=0,this.passwordVisible=!1,this.hasPreSlotContent=!1,this.handleBlur=t=>{this.blurEvent.emit(t)},this.handleFocus=t=>{this.focusEvent.emit(t)},this.handleInput=t=>{this.multiline&&this.updateCharacterCount();const{value:i}=t.target;this.inputEvent.emit(i)},this.handleSearchBlurForward=t=>{const{detail:i}=t;i&&(t.stopPropagation(),this.blurEvent.emit(i))},this.handleSearchCommit=t=>{t.stopPropagation(),this.search.emit(t.detail)},this.handleSearchFocusForward=t=>{const{detail:i}=t;i&&(t.stopPropagation(),this.focusEvent.emit(i))}}connectedCallback(){this.syncPreSlotContent(),this.connectPreSlotObserver()}disconnectedCallback(){void 0!==this.preSlotSyncTimeoutId&&(clearTimeout(this.preSlotSyncTimeoutId),this.preSlotSyncTimeoutId=void 0),this.disconnectPreSlotObserver()}componentWillLoad(){null!=this._id&&""!==this._id||(this._id=a()),this.multiline&&void 0!==this.maxCharacterCount&&(this.characterCount=void 0!==this.value?this.value.length:0),this.syncPreSlotContent()}componentWillRender(){this.disconnectPreSlotObserver()}componentDidRender(){this.schedulePreSlotSync()}async setFocus(){"search"!==this.type?this.input?.focus():await(this.searchInputRef?.setFocus())}connectPreSlotObserver(){this.disconnectPreSlotObserver(),this.multiline||"search"===this.type||"undefined"==typeof MutationObserver||(this.preSlotObserver=new MutationObserver((()=>{this.schedulePreSlotSync()})),this.preSlotObserver.observe(this.el,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["slot"]}))}disconnectPreSlotObserver(){this.preSlotObserver?.disconnect(),this.preSlotObserver=void 0}schedulePreSlotSync(){void 0!==this.preSlotSyncTimeoutId&&clearTimeout(this.preSlotSyncTimeoutId),this.preSlotSyncTimeoutId=setTimeout((()=>{this.preSlotSyncTimeoutId=void 0,this.el.isConnected&&(this.syncPreSlotContent(),this.connectPreSlotObserver())}),0)}syncPreSlotContent(){if(this.multiline||"search"===this.type)return;const t=Array.from(this.el.querySelectorAll('[slot="pre"]')).some((t=>t.closest("xpl-input")===this.el));t!==this.hasPreSlotContent&&(this.hasPreSlotContent=t)}updateCharacterCount(){this.characterCount=this.input?.value.length??0}renderInput(){switch(this.type){case"file":return s("xpl-input-file",{accept:this.accept,disabled:this.disabled,hideAcceptText:this.hideAcceptText,hideFileNames:this.hideFileNames,hideTriggerOnSelect:this.hideTriggerOnSelect,multiple:this.multiple,name:this.name,onInputChange:this.handleChildValueChange,_id:this._id},s("slot",{name:"trigger"}));case"color":return s("xpl-input-color",{disabled:this.disabled,value:this.value,placeholder:this.placeholder,required:this.required,hideEyeDropper:this.hideEyeDropper,onInputChange:this.handleChildValueChange});case"date":return s("xpl-input-date",{inputId:this._id,disabled:this.disabled,name:this.name,required:this.required,readonly:this.readonly,value:this.value,placeholder:this.placeholder,post:this.post,pre:this.pre,max:this.max,min:this.min,dateFormat:this.dateFormat,mode:this.mode,onValueChange:this.handleChildValueChange});case"time":return s("xpl-input-time",{inputId:this._id,disabled:this.disabled,name:this.name,required:this.required,readonly:this.readonly,value:this.value,placeholder:this.placeholder,max:this.max,min:this.min,step:this.step,mode:this.mode,timeFormat:this.timeFormat,allowCustomOption:this.allowCustomOption,onValueChange:this.handleChildValueChange});case"phone":return s("xpl-input-phone",{inputId:this._id,disabled:this.disabled,error:void 0!==this.error,name:this.name,required:this.required,readonly:this.readonly,value:this.value,placeholder:this.placeholder,defaultCountry:this.defaultCountry,preferredCountries:this.preferredCountries,isInternational:this.isInternational,onValueChange:this.handleChildValueChange});case"search":{const t=Boolean((this.label??"").trim()),i=void 0!==this.error,e=i&&(this.error?.length??0)>0;return s("xpl-input-search",{ariaLabel:(this.ariaLabel??"").trim()||"Search",autocomplete:this.autocomplete??"off",disabled:this.disabled,errorMessageId:e?`${this._id}-error`:void 0,hasError:i,hasVisibleLabel:t,inputId:this._id??"",name:this.name,onBlurEvent:this.handleSearchBlurForward,onFocusEvent:this.handleSearchFocusForward,onSearch:this.handleSearchCommit,onValueChange:this.handleChildValueChange,placeholder:this.placeholder??"Search",readonly:this.readonly,ref:t=>{this.searchInputRef=t??void 0},required:this.required,shape:this.shape??"rounded",value:this.value??""})}default:return s("div",{class:"xpl-input-wrapper"},!this.multiline&&s("label",{class:{"xpl-input-pre":!0,"xpl-input-pre--hidden":!this.pre&&!this.hasPreSlotContent},htmlFor:this._id},s("slot",{name:"pre"},this.pre)),this.multiline?s("textarea",{disabled:this.disabled,id:this._id,name:this.name,placeholder:this.placeholder,readonly:this.readonly,ref:t=>{this.input=t??void 0},required:this.required,onChange:this.valueChanged,onFocus:this.handleFocus,onBlur:this.handleBlur,onInput:this.handleInput},this.value):s("input",{autocomplete:this.autocomplete,disabled:this.disabled,id:this._id,max:this.max,min:this.min,name:this.name,placeholder:this.placeholder,readonly:this.readonly,ref:t=>{this.input=t??void 0},required:this.required,step:this.step,type:this.type,value:this.value,onChange:this.valueChanged,onFocus:this.handleFocus,onBlur:this.handleBlur,onInput:this.handleInput}),"password"===this.type&&s("button",{"aria-label":"Toggle password visibility",class:"xpl-input-password",onClick:()=>{this.passwordVisible=!this.passwordVisible},role:"presentation"},s("xpl-icon",{icon:this.passwordVisible?"eye-closed":"eye",size:24})),this.post&&!this.multiline&&s("label",{class:"xpl-input-post",htmlFor:this._id},this.post),this.multiline&&void 0!==this.maxCharacterCount&&s("span",{class:"xpl-input-characters"},this.characterCount,"/",this.maxCharacterCount))}}render(){let t=!1;return(void 0!==this.error||this.multiline&&void 0!==this.maxCharacterCount&&this.characterCount>this.maxCharacterCount)&&(t=!0),s(e,{key:"a276769b767bc7df63e2701697600c0ecbfa593e",class:{"xpl-input":!0,"xpl-input--disabled":!!this.disabled,"xpl-input--error":t,"xpl-input--readonly":!!this.readonly,[`xpl-input--${this.type}`]:!0}},this.label&&s("label",{key:"1686d1f5c9fc573929190bc1a04bf9efd2ad6957",class:"xpl-input-label",htmlFor:this._id},this.label,this.description&&s("small",{key:"1f74f68e8eeae5186e50ace2e96a9896b022fa30"},this.description)),this.renderInput(),(this.error?.length??0)>0&&s("label",{key:"2ee7de8b1dcb4cc27d7dcf8b34be66727ace1bfe",class:"xpl-input-error",htmlFor:this._id,id:`${this._id}-error`},s("xpl-icon",{key:"d3965b339f2d24dec0fdde367e76aacfefd25061",icon:"circle-warning",size:16}),s("span",{key:"b6269e3f122a53980438c21cfbda2e18b3c77a7e"},this.error)))}get el(){return h(this)}};function o(t){if(!n())return;let i=t.parentElement;for(;i&&i!==document.body&&i!==document.documentElement;){const t=getComputedStyle(i);if(/auto|scroll/.test(t.overflow+t.overflowX+t.overflowY))return i;i=i.parentElement}}const c=(t=!1)=>`<svg width="8" height="12" viewBox="0 0 8 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="${t?"M0.557948 5.6813L6.06209 0.132167C6.23831 -0.0440556 6.52327 -0.0440556 6.69949 0.132167L7.44187 0.874551C7.61809 1.05077 7.61809 1.33573 7.44187 1.51195L2.99882 6L7.44187 10.488C7.61809 10.6643 7.61809 10.9492 7.44187 11.1254L6.69949 11.8678C6.52327 12.0441 6.23831 12.0441 6.06209 11.8678L0.557948 6.3187C0.381726 6.14248 0.381726 5.85752 0.557948 5.6813Z":"M7.44187 6.3187L1.93773 11.8678C1.76151 12.0441 1.47655 12.0441 1.30033 11.8678L0.557948 11.1254C0.381726 10.9492 0.381726 10.6643 0.557948 10.488L5.001 6L0.557948 1.51195C0.381726 1.33573 0.381726 1.05077 0.557948 0.874551L1.30033 0.132167C1.47655 -0.0440556 1.76151 -0.0440556 1.93773 0.132167L7.44187 5.6813C7.6181 5.85752 7.6181 6.14248 7.44187 6.3187Z"}" /></svg>`,d=class{constructor(s){t(this,s),this.valueChange=i(this,"valueChange",7),this.hasErrorStateChanged=i(this,"hasErrorStateChanged",7),this.rangeSelected=i(this,"rangeSelected",7),this.dateFormat="Y-m-d",this.mode="single",this.flatpickrStaticLayout=!1,this.valueChanged=t=>{this.valueChange.emit(t.target.value)}}onHasErrorStateChanged(t){this.hasErrorStateChanged.emit(t)}onValueChanged(t){this.flatpickrInstance?.setDate(t)}connectedCallback(){queueMicrotask((()=>this.ensureFlatpickr()))}disconnectedCallback(){this.flatpickrInstance?.destroy(),this.flatpickrInstance=void 0,this.flatpickrStaticLayout=!1,this.unwrapStaleFlatpickrWrapper()}componentDidRender(){this.ensureFlatpickr()}ensureFlatpickr(){n()&&!this.flatpickrInstance&&this.input&&this.el.isConnected&&(this.unwrapStaleFlatpickrWrapper(),this.initFlatpickr())}initFlatpickr(){const{input:t}=this;if(!t)return;const i=function(t){if(!n())return!1;let i=t.parentElement;for(;i&&i!==document.body&&i!==document.documentElement;){if("fixed"===getComputedStyle(i).position)return!0;i=i.parentElement}return!1}(this.el);this.flatpickrInstance=r(t,{allowInput:!0,...i?{static:!0}:{appendTo:o(this.el)},dateFormat:this.dateFormat,defaultDate:this.value,maxDate:this.max,minDate:this.min,mode:this.mode,nextArrow:c(),prevArrow:c(!0),onClose:t=>{if(this.hasErrorState=t.length<(this.required?"single"===this.mode?1:2:0)?"required":null,2===t.length){const[i,s]=t;this.rangeSelected.emit({start:i,end:s})}}}),queueMicrotask((()=>{this.flatpickrStaticLayout!==i&&(this.flatpickrStaticLayout=i)}))}unwrapStaleFlatpickrWrapper(){const{input:t}=this,i=t?.parentElement;if(!i?.classList.contains("flatpickr-wrapper"))return;const s=i.parentElement;if(s){for(;i.firstChild;)s.insertBefore(i.firstChild,i);s.removeChild(i)}}render(){return s(e,{key:"f1b3189eb8ba737e5e96826042d8c3aadce9b0d1",class:{"xpl-input-date":!0,[`xpl-input-date--mode-${this.mode}`]:!0,"xpl-input-date--error":!!this.hasErrorState,"xpl-input-date--flatpickr-static":this.flatpickrStaticLayout}},s("div",{key:"1c292279aad8ae7f48358d5e42189d60ecd1d97d",class:"xpl-input-wrapper"},this.pre&&s("label",{key:"f8ed452f69f664fd4e3b83e428070f3f4b14d5c6",class:"xpl-input-pre",htmlFor:this.inputId},this.pre),s("input",{key:"e1659c6ad3cb2cb0a5d88a7635672917d2f58ebb",type:"date",id:this.inputId,disabled:this.disabled,name:this.name,required:this.required,readonly:this.readonly,placeholder:this.placeholder,max:this.max,min:this.min,ref:t=>{this.input=t??void 0},onChange:t=>{this.valueChanged(t)}}),s("xpl-icon",{key:"577c881edf4ef8dfd3c910c8bbdd268af7448e6c",class:"xpl-input-calendar",icon:"calendar",size:24}),this.post&&s("label",{key:"5acfeb3ea72d9c5a193116e305fd54d323276910",class:"xpl-input-post",htmlFor:this.inputId},this.post)))}get el(){return h(this)}static get watchers(){return{hasErrorState:[{onHasErrorStateChanged:0}],value:[{onValueChanged:0}]}}},p=class{constructor(s){t(this,s),this.inputChange=i(this,"inputChange",7),this.accept="",this.multiple=!1,this.hideTriggerOnSelect=!1,this.hideFileNames=!1,this.hideAcceptText=!1,this.files=null,this.openFileDialog=()=>{this.disabled||this.fileInput?.click()},this.handleFileChange=t=>{const i=t.target;this.files=i.files?Array.from(i.files):null},this.onRemoveFileByIndex=t=>{this.files=(this.files??[]).filter(((i,s)=>s!==t))}}onFilesChange(t){this.inputChange.emit({type:"file",value:t})}async removeFileByIndex(t){this.onRemoveFileByIndex(t)}render(){return s(e,{key:"87eead553435ce984945ccb72ca262bfd6123562",class:{"xpl-input-file":!0,"xpl-input-file--hide-trigger-on-select":!!this.hideTriggerOnSelect,"xpl-input-file--disabled":!!this.disabled}},s("span",{key:"f345204405d1bb784fc662fa3c29e9edaeca9c67",class:{"xpl-input-file__trigger-wrapper":!0,"xpl-input-file__trigger-wrapper--hidden":!!this.hideTriggerOnSelect&&(this.files?.length??0)>0},role:"button",tabIndex:0,onClick:this.openFileDialog},s("slot",{key:"46c4e817cb8f8b050b4de5c571757c7ed84698a7",name:"trigger"})),(this.files?.length??0)>0&&!this.hideFileNames&&s("ul",{key:"455af4a3cad84232464927efb880ce0a26cebf71",class:"xpl-input-file__file-list"},(this.files??[]).map(((t,i)=>s("li",{class:"xpl-input-file__file-item"},s("span",{class:"xpl-input-file__file-name"},t.name),s("xpl-icon",{icon:"x-circle",size:24,onClick:t=>{t.preventDefault(),t.stopPropagation(),this.onRemoveFileByIndex(i)},class:"xpl-input-file__remove-icon"}))))),this.accept&&!this.hideAcceptText&&s("span",{key:"77abc822d8d44b33f251d4ba9ef21cfc7dd6c287",class:"xpl-input-file__accept"},"Accepted file types: ",this.accept),s("input",{key:"d75ec23921943259d789b0f32828dca57864520e",onChange:this.handleFileChange,type:"file",ref:t=>{this.fileInput=t??void 0},hidden:!0,accept:this.accept,multiple:this.multiple,name:this.name}))}get el(){return h(this)}static get watchers(){return{files:[{onFilesChange:0}]}}},u=class{constructor(s){t(this,s),this.blurEvent=i(this,"blurEvent",7),this.focusEvent=i(this,"focusEvent",7),this.inputEvent=i(this,"inputEvent",7),this.search=i(this,"search",7),this.valueChange=i(this,"valueChange",7),this.hasAncestorForm=!1,this.ariaLabel="Search",this.autocomplete="off",this.disabled=!1,this.hasError=!1,this.hasVisibleLabel=!1,this.placeholder="Search",this.readonly=!1,this.required=!1,this.shape="rounded",this.value="",this.handleInnerFormSubmit=t=>{t.preventDefault(),this.disabled||this.readonly||this.emitSearchCommit(this.value.trim())},this.handleClear=t=>{t.preventDefault(),this.disabled||this.readonly||(this.value="",this.valueChange.emit(""),this.inputEvent.emit(""),this.inputEl?.focus())},this.handleInput=t=>{const i=t.target;this.value=i.value,this.valueChange.emit(i.value),this.inputEvent.emit(i.value)},this.handleKeyDown=t=>{"Enter"===t.key&&(this.disabled||this.readonly||t.target.form||(t.preventDefault(),this.emitSearchCommit(this.value.trim())))},this.handleFocus=t=>{this.focusEvent.emit(t)},this.handleBlur=t=>{this.blurEvent.emit(t)}}connectedCallback(){this.syncAncestorFormFlag()}async setFocus(){this.inputEl?.focus()}syncAncestorFormFlag(){const t=this.el,i=Boolean(t&&"function"==typeof t.closest&&t.closest("form"));this.hasAncestorForm!==i&&(this.hasAncestorForm=i)}get hasValue(){return void 0!==this.value&&this.value.length>0}get resolvedInputAriaLabel(){if(!this.hasVisibleLabel)return(this.ariaLabel??"").trim()||"Search"}get rendersInnerSearchForm(){return!this.hasAncestorForm}emitSearchCommit(t){this.search.emit(t)}renderShell(){const t=s("div",{class:"xpl-input-search__shell"},s("span",{class:"xpl-input-search__icon","aria-hidden":"true"},s("xpl-icon",{icon:"magnifier",size:20})),s("input",{"aria-describedby":this.hasError?this.errorMessageId:void 0,"aria-invalid":this.hasError?"true":void 0,"aria-label":this.resolvedInputAriaLabel,autocomplete:this.autocomplete,class:"xpl-input-search__input",disabled:this.disabled,id:this.inputId,name:this.name,onBlur:this.handleBlur,onFocus:this.handleFocus,onInput:this.handleInput,onKeyDown:this.handleKeyDown,placeholder:this.placeholder,readonly:this.readonly,ref:t=>{this.inputEl=t??void 0},required:this.required,role:"searchbox",type:"text",value:this.value}),s("button",{"aria-hidden":this.hasValue?void 0:"true","aria-label":"Clear search",class:"xpl-input-search__clear",disabled:this.disabled||this.readonly,onClick:this.handleClear,type:"button"},s("xpl-icon",{icon:"circle-xmark",size:16})));return this.rendersInnerSearchForm?s("form",{class:"xpl-input-search__form",onSubmit:this.handleInnerFormSubmit},t):t}render(){return s(e,{key:"90b29d51b36655d1dc5f7fa9b67edf6382cb90af",class:{"xpl-input-search":!0,"xpl-input-search--disabled":this.disabled,"xpl-input-search--error":this.hasError,"xpl-input-search--has-value":this.hasValue,"xpl-input-search--readonly":this.readonly,"xpl-input-search--shape-box":"box"===this.shape}},this.renderShell())}get el(){return h(this)}};export{l as xpl_input,d as xpl_input_date,p as xpl_input_file,u as xpl_input_search}
|
|
1
|
+
import{r as t,c as i,h as s,H as e,g as h}from"./p-CJABLO_1.js";import{v as a}from"./p-CK3_k8jD.js";import{f as r}from"./p-CH4yJ6Qx.js";import{i as n}from"./p-Dqb1pIRo.js";const l=class{constructor(s){t(this,s),this.blurEvent=i(this,"blurEvent",7),this.focusEvent=i(this,"focusEvent",7),this.inputEvent=i(this,"inputEvent",7),this.search=i(this,"search",7),this.valueChange=i(this,"valueChange",7),this.multiline=!1,this.dateFormat="Y-m-d",this.timeFormat="24h",this.allowCustomOption=!1,this.mode="single",this.accept="",this.multiple=!1,this.hideTriggerOnSelect=!1,this.hideFileNames=!1,this.hideAcceptText=!1,this.defaultCountry="US",this.isInternational=!0,this.ariaLabel="",this.type="text",this.handleChildValueChange=t=>{t.stopPropagation(),this.valueChange.emit(t.detail)},this.valueChanged=t=>{this.valueChange.emit(t.target.value)},this.characterCount=0,this.passwordVisible=!1,this.hasPreSlotContent=!1,this.handleBlur=t=>{this.blurEvent.emit(t)},this.handleFocus=t=>{this.focusEvent.emit(t)},this.handleInput=t=>{this.multiline&&this.updateCharacterCount();const{value:i}=t.target;this.inputEvent.emit(i)},this.handleSearchBlurForward=t=>{const{detail:i}=t;i&&(t.stopPropagation(),this.blurEvent.emit(i))},this.handleSearchCommit=t=>{t.stopPropagation(),this.search.emit(t.detail)},this.handleSearchFocusForward=t=>{const{detail:i}=t;i&&(t.stopPropagation(),this.focusEvent.emit(i))}}connectedCallback(){this.syncPreSlotContent(),this.connectPreSlotObserver()}disconnectedCallback(){void 0!==this.preSlotSyncTimeoutId&&(clearTimeout(this.preSlotSyncTimeoutId),this.preSlotSyncTimeoutId=void 0),this.disconnectPreSlotObserver()}componentWillLoad(){null!=this._id&&""!==this._id||(this._id=a()),this.multiline&&void 0!==this.maxCharacterCount&&(this.characterCount=void 0!==this.value?this.value.length:0),this.syncPreSlotContent()}componentWillRender(){this.disconnectPreSlotObserver()}componentDidRender(){this.schedulePreSlotSync()}async setFocus(){"search"!==this.type?this.input?.focus():await(this.searchInputRef?.setFocus())}connectPreSlotObserver(){this.disconnectPreSlotObserver(),this.multiline||"search"===this.type||"undefined"==typeof MutationObserver||(this.preSlotObserver=new MutationObserver((()=>{this.schedulePreSlotSync()})),this.preSlotObserver.observe(this.el,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["slot"]}))}disconnectPreSlotObserver(){this.preSlotObserver?.disconnect(),this.preSlotObserver=void 0}schedulePreSlotSync(){void 0!==this.preSlotSyncTimeoutId&&clearTimeout(this.preSlotSyncTimeoutId),this.preSlotSyncTimeoutId=setTimeout((()=>{this.preSlotSyncTimeoutId=void 0,this.el.isConnected&&(this.syncPreSlotContent(),this.connectPreSlotObserver())}),0)}syncPreSlotContent(){if(this.multiline||"search"===this.type)return;const t=Array.from(this.el.querySelectorAll('[slot="pre"]')).some((t=>t.closest("xpl-input")===this.el));t!==this.hasPreSlotContent&&(this.hasPreSlotContent=t)}updateCharacterCount(){this.characterCount=this.input?.value.length??0}renderInput(){switch(this.type){case"file":return s("xpl-input-file",{accept:this.accept,disabled:this.disabled,hideAcceptText:this.hideAcceptText,hideFileNames:this.hideFileNames,hideTriggerOnSelect:this.hideTriggerOnSelect,multiple:this.multiple,name:this.name,onInputChange:this.handleChildValueChange,_id:this._id},s("slot",{name:"trigger"}));case"color":return s("xpl-input-color",{disabled:this.disabled,value:this.value,placeholder:this.placeholder,required:this.required,hideEyeDropper:this.hideEyeDropper,onInputChange:this.handleChildValueChange});case"date":return s("xpl-input-date",{inputId:this._id,disabled:this.disabled,name:this.name,required:this.required,readonly:this.readonly,value:this.value,placeholder:this.placeholder,post:this.post,pre:this.pre,max:this.max,min:this.min,dateFormat:this.dateFormat,mode:this.mode,onValueChange:this.handleChildValueChange});case"time":return s("xpl-input-time",{inputId:this._id,disabled:this.disabled,name:this.name,required:this.required,readonly:this.readonly,value:this.value,placeholder:this.placeholder,max:this.max,min:this.min,step:this.step,mode:this.mode,timeFormat:this.timeFormat,allowCustomOption:this.allowCustomOption,onValueChange:this.handleChildValueChange});case"phone":return s("xpl-input-phone",{inputId:this._id,disabled:this.disabled,error:void 0!==this.error,name:this.name,required:this.required,readonly:this.readonly,value:this.value,placeholder:this.placeholder,defaultCountry:this.defaultCountry,preferredCountries:this.preferredCountries,isInternational:this.isInternational,onValueChange:this.handleChildValueChange});case"search":{const t=Boolean((this.label??"").trim()),i=void 0!==this.error,e=i&&(this.error?.length??0)>0;return s("xpl-input-search",{ariaLabel:(this.ariaLabel??"").trim()||"Search",autocomplete:this.autocomplete??"off",disabled:this.disabled,errorMessageId:e?`${this._id}-error`:void 0,hasError:i,hasVisibleLabel:t,inputId:this._id??"",name:this.name,onBlurEvent:this.handleSearchBlurForward,onFocusEvent:this.handleSearchFocusForward,onSearch:this.handleSearchCommit,onValueChange:this.handleChildValueChange,placeholder:this.placeholder??"Search",readonly:this.readonly,ref:t=>{this.searchInputRef=t??void 0},required:this.required,shape:this.shape??"rounded",value:this.value??""})}default:return s("div",{class:"xpl-input-wrapper"},!this.multiline&&s("label",{class:{"xpl-input-pre":!0,"xpl-input-pre--hidden":!this.pre&&!this.hasPreSlotContent},htmlFor:this._id},s("slot",{name:"pre"},this.pre)),this.multiline?s("textarea",{disabled:this.disabled,id:this._id,name:this.name,placeholder:this.placeholder,readonly:this.readonly,ref:t=>{this.input=t??void 0},required:this.required,onChange:this.valueChanged,onFocus:this.handleFocus,onBlur:this.handleBlur,onInput:this.handleInput},this.value):s("input",{autocomplete:this.autocomplete,disabled:this.disabled,id:this._id,max:this.max,min:this.min,name:this.name,placeholder:this.placeholder,readonly:this.readonly,ref:t=>{this.input=t??void 0},required:this.required,step:this.step,type:this.type,value:this.value,onChange:this.valueChanged,onFocus:this.handleFocus,onBlur:this.handleBlur,onInput:this.handleInput}),"password"===this.type&&s("button",{"aria-label":"Toggle password visibility",class:"xpl-input-password",onClick:()=>{this.passwordVisible=!this.passwordVisible},role:"presentation"},s("xpl-icon",{icon:this.passwordVisible?"eye-closed":"eye",size:24})),this.post&&!this.multiline&&s("label",{class:"xpl-input-post",htmlFor:this._id},this.post),this.multiline&&void 0!==this.maxCharacterCount&&s("span",{class:"xpl-input-characters"},this.characterCount,"/",this.maxCharacterCount))}}render(){let t=!1;return(void 0!==this.error||this.multiline&&void 0!==this.maxCharacterCount&&this.characterCount>this.maxCharacterCount)&&(t=!0),s(e,{key:"d57ab7978ef701d4783f6780bbd807e8ee07ac7d",class:{"xpl-input":!0,"xpl-input--disabled":!!this.disabled,"xpl-input--error":t,"xpl-input--readonly":!!this.readonly,[`xpl-input--${this.type}`]:!0}},this.label&&s("label",{key:"cdc55154c334fcc2ed8049113d012e046e77fde7",class:"xpl-input-label",htmlFor:this._id},this.label,this.description&&s("small",{key:"37a1685a6e0b9b7da8abc6209df998154affbb79"},this.description)),this.renderInput(),(this.error?.length??0)>0&&s("label",{key:"c7a636a36d902543c9228a72c81db408912b3d58",class:"xpl-input-error",htmlFor:this._id,id:`${this._id}-error`},s("xpl-icon",{key:"e73b36e29ebe7812564e5d27710ebda1b9bf2185",icon:"circle-warning",size:16}),s("span",{key:"10149a258c81cbc439778e84f49bc6dfdc97d26d"},this.error)))}get el(){return h(this)}};function o(t){if(!n())return;let i=t.parentElement;for(;i&&i!==document.body&&i!==document.documentElement;){const t=getComputedStyle(i);if(/auto|scroll/.test(t.overflow+t.overflowX+t.overflowY))return i;i=i.parentElement}}const c=(t=!1)=>`<svg width="8" height="12" viewBox="0 0 8 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="${t?"M0.557948 5.6813L6.06209 0.132167C6.23831 -0.0440556 6.52327 -0.0440556 6.69949 0.132167L7.44187 0.874551C7.61809 1.05077 7.61809 1.33573 7.44187 1.51195L2.99882 6L7.44187 10.488C7.61809 10.6643 7.61809 10.9492 7.44187 11.1254L6.69949 11.8678C6.52327 12.0441 6.23831 12.0441 6.06209 11.8678L0.557948 6.3187C0.381726 6.14248 0.381726 5.85752 0.557948 5.6813Z":"M7.44187 6.3187L1.93773 11.8678C1.76151 12.0441 1.47655 12.0441 1.30033 11.8678L0.557948 11.1254C0.381726 10.9492 0.381726 10.6643 0.557948 10.488L5.001 6L0.557948 1.51195C0.381726 1.33573 0.381726 1.05077 0.557948 0.874551L1.30033 0.132167C1.47655 -0.0440556 1.76151 -0.0440556 1.93773 0.132167L7.44187 5.6813C7.6181 5.85752 7.6181 6.14248 7.44187 6.3187Z"}" /></svg>`,d=class{constructor(s){t(this,s),this.valueChange=i(this,"valueChange",7),this.hasErrorStateChanged=i(this,"hasErrorStateChanged",7),this.rangeSelected=i(this,"rangeSelected",7),this.dateFormat="Y-m-d",this.mode="single",this.flatpickrStaticLayout=!1,this.valueChanged=t=>{this.valueChange.emit(t.target.value)}}onHasErrorStateChanged(t){this.hasErrorStateChanged.emit(t)}onValueChanged(t){this.flatpickrInstance?.setDate(t)}connectedCallback(){queueMicrotask((()=>this.ensureFlatpickr()))}disconnectedCallback(){this.flatpickrInstance?.destroy(),this.flatpickrInstance=void 0,this.flatpickrStaticLayout=!1,this.unwrapStaleFlatpickrWrapper()}componentDidRender(){this.ensureFlatpickr()}ensureFlatpickr(){n()&&!this.flatpickrInstance&&this.input&&this.el.isConnected&&(this.unwrapStaleFlatpickrWrapper(),this.initFlatpickr())}initFlatpickr(){const{input:t}=this;if(!t)return;const i=function(t){if(!n())return!1;let i=t.parentElement;for(;i&&i!==document.body&&i!==document.documentElement;){if("fixed"===getComputedStyle(i).position)return!0;i=i.parentElement}return!1}(this.el);this.flatpickrInstance=r(t,{allowInput:!0,...i?{static:!0}:{appendTo:o(this.el)},dateFormat:this.dateFormat,defaultDate:this.value,maxDate:this.max,minDate:this.min,mode:this.mode,nextArrow:c(),prevArrow:c(!0),onClose:t=>{if(this.hasErrorState=t.length<(this.required?"single"===this.mode?1:2:0)?"required":null,2===t.length){const[i,s]=t;this.rangeSelected.emit({start:i,end:s})}}}),queueMicrotask((()=>{this.flatpickrStaticLayout!==i&&(this.flatpickrStaticLayout=i)}))}unwrapStaleFlatpickrWrapper(){const{input:t}=this,i=t?.parentElement;if(!i?.classList.contains("flatpickr-wrapper"))return;const s=i.parentElement;if(s){for(;i.firstChild;)s.insertBefore(i.firstChild,i);s.removeChild(i)}}render(){return s(e,{key:"f1b3189eb8ba737e5e96826042d8c3aadce9b0d1",class:{"xpl-input-date":!0,[`xpl-input-date--mode-${this.mode}`]:!0,"xpl-input-date--error":!!this.hasErrorState,"xpl-input-date--flatpickr-static":this.flatpickrStaticLayout}},s("div",{key:"1c292279aad8ae7f48358d5e42189d60ecd1d97d",class:"xpl-input-wrapper"},this.pre&&s("label",{key:"f8ed452f69f664fd4e3b83e428070f3f4b14d5c6",class:"xpl-input-pre",htmlFor:this.inputId},this.pre),s("input",{key:"e1659c6ad3cb2cb0a5d88a7635672917d2f58ebb",type:"date",id:this.inputId,disabled:this.disabled,name:this.name,required:this.required,readonly:this.readonly,placeholder:this.placeholder,max:this.max,min:this.min,ref:t=>{this.input=t??void 0},onChange:t=>{this.valueChanged(t)}}),s("xpl-icon",{key:"577c881edf4ef8dfd3c910c8bbdd268af7448e6c",class:"xpl-input-calendar",icon:"calendar",size:24}),this.post&&s("label",{key:"5acfeb3ea72d9c5a193116e305fd54d323276910",class:"xpl-input-post",htmlFor:this.inputId},this.post)))}get el(){return h(this)}static get watchers(){return{hasErrorState:[{onHasErrorStateChanged:0}],value:[{onValueChanged:0}]}}},p=class{constructor(s){t(this,s),this.inputChange=i(this,"inputChange",7),this.accept="",this.multiple=!1,this.hideTriggerOnSelect=!1,this.hideFileNames=!1,this.hideAcceptText=!1,this.files=null,this.openFileDialog=()=>{this.disabled||this.fileInput?.click()},this.handleFileChange=t=>{const i=t.target;this.files=i.files?Array.from(i.files):null},this.onRemoveFileByIndex=t=>{this.files=(this.files??[]).filter(((i,s)=>s!==t))}}onFilesChange(t){this.inputChange.emit({type:"file",value:t})}async removeFileByIndex(t){this.onRemoveFileByIndex(t)}render(){return s(e,{key:"87eead553435ce984945ccb72ca262bfd6123562",class:{"xpl-input-file":!0,"xpl-input-file--hide-trigger-on-select":!!this.hideTriggerOnSelect,"xpl-input-file--disabled":!!this.disabled}},s("span",{key:"f345204405d1bb784fc662fa3c29e9edaeca9c67",class:{"xpl-input-file__trigger-wrapper":!0,"xpl-input-file__trigger-wrapper--hidden":!!this.hideTriggerOnSelect&&(this.files?.length??0)>0},role:"button",tabIndex:0,onClick:this.openFileDialog},s("slot",{key:"46c4e817cb8f8b050b4de5c571757c7ed84698a7",name:"trigger"})),(this.files?.length??0)>0&&!this.hideFileNames&&s("ul",{key:"455af4a3cad84232464927efb880ce0a26cebf71",class:"xpl-input-file__file-list"},(this.files??[]).map(((t,i)=>s("li",{class:"xpl-input-file__file-item"},s("span",{class:"xpl-input-file__file-name"},t.name),s("xpl-icon",{icon:"x-circle",size:24,onClick:t=>{t.preventDefault(),t.stopPropagation(),this.onRemoveFileByIndex(i)},class:"xpl-input-file__remove-icon"}))))),this.accept&&!this.hideAcceptText&&s("span",{key:"77abc822d8d44b33f251d4ba9ef21cfc7dd6c287",class:"xpl-input-file__accept"},"Accepted file types: ",this.accept),s("input",{key:"d75ec23921943259d789b0f32828dca57864520e",onChange:this.handleFileChange,type:"file",ref:t=>{this.fileInput=t??void 0},hidden:!0,accept:this.accept,multiple:this.multiple,name:this.name}))}get el(){return h(this)}static get watchers(){return{files:[{onFilesChange:0}]}}},u=class{constructor(s){t(this,s),this.blurEvent=i(this,"blurEvent",7),this.focusEvent=i(this,"focusEvent",7),this.inputEvent=i(this,"inputEvent",7),this.search=i(this,"search",7),this.valueChange=i(this,"valueChange",7),this.hasAncestorForm=!1,this.ariaLabel="Search",this.autocomplete="off",this.disabled=!1,this.hasError=!1,this.hasVisibleLabel=!1,this.placeholder="Search",this.readonly=!1,this.required=!1,this.shape="rounded",this.value="",this.handleInnerFormSubmit=t=>{t.preventDefault(),this.disabled||this.readonly||this.emitSearchCommit(this.value.trim())},this.handleClear=t=>{t.preventDefault(),this.disabled||this.readonly||(this.value="",this.valueChange.emit(""),this.inputEvent.emit(""),this.inputEl?.focus())},this.handleInput=t=>{const i=t.target;this.value=i.value,this.valueChange.emit(i.value),this.inputEvent.emit(i.value)},this.handleKeyDown=t=>{"Enter"===t.key&&(this.disabled||this.readonly||t.target.form||(t.preventDefault(),this.emitSearchCommit(this.value.trim())))},this.handleFocus=t=>{this.focusEvent.emit(t)},this.handleBlur=t=>{this.blurEvent.emit(t)}}connectedCallback(){this.syncAncestorFormFlag()}async setFocus(){this.inputEl?.focus()}syncAncestorFormFlag(){const t=this.el,i=Boolean(t&&"function"==typeof t.closest&&t.closest("form"));this.hasAncestorForm!==i&&(this.hasAncestorForm=i)}get hasValue(){return void 0!==this.value&&this.value.length>0}get resolvedInputAriaLabel(){if(!this.hasVisibleLabel)return(this.ariaLabel??"").trim()||"Search"}get rendersInnerSearchForm(){return!this.hasAncestorForm}emitSearchCommit(t){this.search.emit(t)}renderShell(){const t=s("div",{class:"xpl-input-search__shell"},s("span",{class:"xpl-input-search__icon","aria-hidden":"true"},s("xpl-icon",{icon:"magnifier",size:20})),s("input",{"aria-describedby":this.hasError?this.errorMessageId:void 0,"aria-invalid":this.hasError?"true":void 0,"aria-label":this.resolvedInputAriaLabel,autocomplete:this.autocomplete,class:"xpl-input-search__input",disabled:this.disabled,id:this.inputId,name:this.name,onBlur:this.handleBlur,onFocus:this.handleFocus,onInput:this.handleInput,onKeyDown:this.handleKeyDown,placeholder:this.placeholder,readonly:this.readonly,ref:t=>{this.inputEl=t??void 0},required:this.required,role:"searchbox",type:"text",value:this.value}),s("button",{"aria-hidden":this.hasValue?void 0:"true","aria-label":"Clear search",class:"xpl-input-search__clear",disabled:this.disabled||this.readonly,onClick:this.handleClear,type:"button"},s("xpl-icon",{icon:"circle-xmark",size:16})));return this.rendersInnerSearchForm?s("form",{class:"xpl-input-search__form",onSubmit:this.handleInnerFormSubmit},t):t}render(){return s(e,{key:"90b29d51b36655d1dc5f7fa9b67edf6382cb90af",class:{"xpl-input-search":!0,"xpl-input-search--disabled":this.disabled,"xpl-input-search--error":this.hasError,"xpl-input-search--has-value":this.hasValue,"xpl-input-search--readonly":this.readonly,"xpl-input-search--shape-box":"box"===this.shape}},this.renderShell())}get el(){return h(this)}};export{l as xpl_input,d as xpl_input_date,p as xpl_input_file,u as xpl_input_search}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as s,h as i,H as e,g as n}from"./p-ukZKsqqq.js";import{h as o}from"./p-DkqlawVY.js";import{i as a}from"./p-Dqb1pIRo.js";const h=[".xpl-top-nav__brand-logo-slot",".xpl-top-nav__brand-bar"],l=".xpl-top-nav__user-menu-panel",r=[l,".xpl-top-nav__user-menu-stash"],p=[".xpl-top-nav__user-popover",".xpl-top-nav__user-menu-stash",".xpl-top-nav__right-user"],c=[l],d=class{constructor(i){t(this,i),this.brandClick=s(this,"brandClick",7),this.navOpen=s(this,"navOpen",7),this.slotProjectionDirty=!1,this.userPopoverDrawerSyncHost=null,this.brandLogoSlotPresent=!1,this.open=!1,this.slotProjectionNonce=0,this.userMenuSlotPresent=!1,this.userMenuTriggerSlotPresent=!1,this.focusNavControlAfterClose=()=>{void 0!==this.navControlFocusTimeoutId&&clearTimeout(this.navControlFocusTimeoutId),this.navControlFocusTimeoutId=setTimeout((()=>{this.navControlFocusTimeoutId=void 0,this.el.querySelector(".xpl-top-nav__nav-control")?.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.onDocClickOutsideDismiss=t=>{if(!this.navControl||!this.open)return;const s=t.target;null==s||this.anyDescendantPopoverIsOpen()||this.el.querySelector(".xpl-top-nav__left-primary")?.contains(s)||this.el.querySelector(".xpl-top-nav__nav-control")?.contains(s)||(this.open=!1,this.resetMobileCascade(),this.navOpen.emit(!1))},this.onNavToggle=()=>{const t=this.open;this.open=!this.open,this.navOpen.emit(this.open),t&&!this.open&&(this.resetMobileCascade(),this.focusNavControlAfterClose())},this.onUserPopoverInnerOpenClassChange=()=>{const t=this.userPopoverDrawerSyncHost;if(!t)return;const s=t.querySelector(".xpl-popover");s?.classList.contains("xpl-popover--is-open")&&this.closeMobileDrawerWhenAccountMenuOpens()},this.syncBrandLogoSlot=()=>{const t=o(this.el,"brand-logo",{hostTag:"xpl-top-nav",projectionRegionSelectors:h});t!==this.brandLogoSlotPresent&&(this.brandLogoSlotPresent=t)},this.syncUserMenuSlots=()=>{const t=o(this.el,"user-menu",{hostTag:"xpl-top-nav",projectionRegionSelectors:r}),s=o(this.el,"user-menu-trigger",{hostTag:"xpl-top-nav",projectionRegionSelectors:p,excludedRegionSelectors:c});t!==this.userMenuSlotPresent&&(this.userMenuSlotPresent=t),s!==this.userMenuTriggerSlotPresent&&(this.userMenuTriggerSlotPresent=s)}}onNavControlChanged(){this.syncOpenFromNavControl(),this.syncDocDismissListeners()}connectedCallback(){this.syncOpenFromNavControl(),this.syncDocDismissListeners(),this.syncBrandLogoSlot(),this.syncUserMenuSlots(),this.connectSlotContentObserver(),this.flushPendingSlotProjection()}disconnectedCallback(){void 0!==this.navControlFocusTimeoutId&&(clearTimeout(this.navControlFocusTimeoutId),this.navControlFocusTimeoutId=void 0),void 0!==this.deferredSlotContentObserverSyncTimeoutId&&(clearTimeout(this.deferredSlotContentObserverSyncTimeoutId),this.deferredSlotContentObserverSyncTimeoutId=void 0),this.removeDocDismissListeners(),this.disconnectSlotContentObserver(),this.disconnectUserPopoverDrawerSync()}componentWillLoad(){this.syncOpenFromNavControl(),this.syncBrandLogoSlot(),this.syncUserMenuSlots()}componentWillRender(){this.disconnectSlotContentObserver()}componentDidRender(){this.connectSlotContentObserver(),this.connectUserPopoverDrawerSync()}get childAccountLabelText(){return this.childAccountLabel?.trim()??""}get hasBrand(){const t=this.brandName?.trim()??"",s=this.brandLogo?.trim()??"";return t.length>0||s.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 i=t[s].querySelector(".xpl-popover");if(i?.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((t=>{this.scheduleSlotContentSyncFromObserver(t)})),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(){this.slotContentObserver?.disconnect(),this.slotContentObserver=void 0}disconnectUserPopoverDrawerSync(){this.userPopoverDrawerSyncHost&&(this.userPopoverDrawerSyncHost.removeEventListener("isOpenChange",this.handleUserPopoverIsOpenChange),this.userPopoverDrawerSyncHost=null),this.userPopoverDrawerOpenObserver?.disconnect(),this.userPopoverDrawerOpenObserver=void 0}removeDocDismissListeners(){const t=this.el.ownerDocument;t.removeEventListener("keydown",this.onDocKeyDownEscape,!1),t.removeEventListener("click",this.onDocClickOutsideDismiss,!0)}resetMobileCascade(){const t=this.el.querySelector(".xpl-top-nav__left-primary > xpl-top-nav-item.xpl-top-nav-item--dropdown-open");t?.closeMenu().catch((()=>{}))}scheduleSlotContentSyncFromObserver(t){this.mutationsAffectHostSlotting(t)&&(this.slotProjectionDirty=!0),void 0!==this.deferredSlotContentObserverSyncTimeoutId&&clearTimeout(this.deferredSlotContentObserverSyncTimeoutId),this.deferredSlotContentObserverSyncTimeoutId=setTimeout((()=>{this.deferredSlotContentObserverSyncTimeoutId=void 0,this.el.isConnected&&(this.syncBrandLogoSlot(),this.syncUserMenuSlots(),this.flushPendingSlotProjection())}),0)}flushPendingSlotProjection(){this.slotProjectionDirty&&(this.slotProjectionDirty=!1,this.slotProjectionNonce+=1)}mutationsAffectHostSlotting(t){return t.some((t=>"attributes"===t.type||"childList"===t.type&&t.target===this.el))}syncDocDismissListeners(){if(this.removeDocDismissListeners(),a()&&this.navControl){const t=this.el.ownerDocument;t.addEventListener("keydown",this.onDocKeyDownEscape,!1),t.addEventListener("click",this.onDocClickOutsideDismiss,!0)}}syncOpenFromNavControl(){const t=this.open;this.open=!1,t&&!this.navControl&&(this.resetMobileCascade(),this.navOpen.emit(!1))}render(){return i(e,{key:"f51ed285523198b4ef39de7ea1e5dc025d5a308a",class:{"xpl-top-nav":!0,"xpl-top-nav--nav-control":Boolean(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:"c2c14ed2ba975299efd76a391dfd6371b9214449","aria-label":this.label??"top-navigation-bar",class:"xpl-top-nav__bar"},i("div",{key:"c223b947ffbcb55c6c6a06fa3adaeaee7661b61e",class:"xpl-top-nav__inner-left"},this.navControl&&i("button",{key:"d364b6dd709d59730d40e7a0d41f9dd8fd55d40b",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:"b84614dc20189f641b2f5a08eef1c76610135598",class:"xpl-top-nav__control-icon",icon:"menu",size:32})),this.hasBrand&&i("div",{key:"90b104133cbdea89643923fd06f54179978862a5",class:"xpl-top-nav__brand-bar"},i("xpl-top-nav-item",{key:"2b40b31ba1312a76231f7a89b1e95508a5a146a1",class:"xpl-top-nav__brand",href:this.brandHref,onNavItemClick:this.onBrandNavItemClick},this.brandLogo?.trim()?i("img",{class:"xpl-top-nav__brand-logo",src:this.brandLogo,alt:this.brandName?.trim()?this.brandName.trim():"Brand"}):this.brandLogoSlotPresent?i("span",{class:"xpl-top-nav__brand-logo-slot"},i("slot",{name:"brand-logo"})):null,this.brandName?.trim()?i("span",{class:"xpl-top-nav__brand-name"},this.brandName.trim()):null)),i("div",{key:"ca3e9b4501ab3756301b2079bcb9632734e56922",class:{"xpl-top-nav__aside":!0,"xpl-nav-left":!0}},i("div",{key:"f2674faf140853536150058d13a5d40c7399979e",class:"xpl-top-nav__left-primary",role:"list"},i("slot",{key:"29363ac15d3f3bf7a43b237a7f7e0622c5bd54c4",name:"left-aside"})))),i("div",{key:"7c83bd0a80649b9cbe9ed757ead1136b6fabd09c",class:{"xpl-top-nav__aside":!0,"xpl-nav-right":!0}},i("div",{key:"c67e6d3365d90cd7f7c55b08dcc4fa56dcb3e291",class:"xpl-nav-right__list"},i("div",{key:"46b9c3b0b010bf52a5632bc81b279310c0a54438",class:"xpl-top-nav__right-rail"},i("div",{key:"72279d15a5464dfabd9f92c04bc231e270ea04b9",class:"xpl-top-nav__right-lead"},i("slot",{key:"d8b44d01141f9cfbeb7d6b019345ffc8c94fd0c3",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 n(this)}static get watchers(){return{navControl:[{onNavControlChanged:0}]}}};export{d as xpl_top_nav}
|
|
1
|
+
import{r as t,c as s,h as i,H as e,g as n}from"./p-CJABLO_1.js";import{h as o}from"./p-DkqlawVY.js";import{i as a}from"./p-Dqb1pIRo.js";const h=[".xpl-top-nav__brand-logo-slot",".xpl-top-nav__brand-bar"],l=".xpl-top-nav__user-menu-panel",r=[l,".xpl-top-nav__user-menu-stash"],p=[".xpl-top-nav__user-popover",".xpl-top-nav__user-menu-stash",".xpl-top-nav__right-user"],c=[l],d=class{constructor(i){t(this,i),this.brandClick=s(this,"brandClick",7),this.navOpen=s(this,"navOpen",7),this.slotProjectionDirty=!1,this.userPopoverDrawerSyncHost=null,this.brandLogoSlotPresent=!1,this.open=!1,this.slotProjectionNonce=0,this.userMenuSlotPresent=!1,this.userMenuTriggerSlotPresent=!1,this.focusNavControlAfterClose=()=>{void 0!==this.navControlFocusTimeoutId&&clearTimeout(this.navControlFocusTimeoutId),this.navControlFocusTimeoutId=setTimeout((()=>{this.navControlFocusTimeoutId=void 0,this.el.querySelector(".xpl-top-nav__nav-control")?.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.onDocClickOutsideDismiss=t=>{if(!this.navControl||!this.open)return;const s=t.target;null==s||this.anyDescendantPopoverIsOpen()||this.el.querySelector(".xpl-top-nav__left-primary")?.contains(s)||this.el.querySelector(".xpl-top-nav__nav-control")?.contains(s)||(this.open=!1,this.resetMobileCascade(),this.navOpen.emit(!1))},this.onNavToggle=()=>{const t=this.open;this.open=!this.open,this.navOpen.emit(this.open),t&&!this.open&&(this.resetMobileCascade(),this.focusNavControlAfterClose())},this.onUserPopoverInnerOpenClassChange=()=>{const t=this.userPopoverDrawerSyncHost;if(!t)return;const s=t.querySelector(".xpl-popover");s?.classList.contains("xpl-popover--is-open")&&this.closeMobileDrawerWhenAccountMenuOpens()},this.syncBrandLogoSlot=()=>{const t=o(this.el,"brand-logo",{hostTag:"xpl-top-nav",projectionRegionSelectors:h});t!==this.brandLogoSlotPresent&&(this.brandLogoSlotPresent=t)},this.syncUserMenuSlots=()=>{const t=o(this.el,"user-menu",{hostTag:"xpl-top-nav",projectionRegionSelectors:r}),s=o(this.el,"user-menu-trigger",{hostTag:"xpl-top-nav",projectionRegionSelectors:p,excludedRegionSelectors:c});t!==this.userMenuSlotPresent&&(this.userMenuSlotPresent=t),s!==this.userMenuTriggerSlotPresent&&(this.userMenuTriggerSlotPresent=s)}}onNavControlChanged(){this.syncOpenFromNavControl(),this.syncDocDismissListeners()}connectedCallback(){this.syncOpenFromNavControl(),this.syncDocDismissListeners(),this.syncBrandLogoSlot(),this.syncUserMenuSlots(),this.connectSlotContentObserver(),this.flushPendingSlotProjection()}disconnectedCallback(){void 0!==this.navControlFocusTimeoutId&&(clearTimeout(this.navControlFocusTimeoutId),this.navControlFocusTimeoutId=void 0),void 0!==this.deferredSlotContentObserverSyncTimeoutId&&(clearTimeout(this.deferredSlotContentObserverSyncTimeoutId),this.deferredSlotContentObserverSyncTimeoutId=void 0),this.removeDocDismissListeners(),this.disconnectSlotContentObserver(),this.disconnectUserPopoverDrawerSync()}componentWillLoad(){this.syncOpenFromNavControl(),this.syncBrandLogoSlot(),this.syncUserMenuSlots()}componentWillRender(){this.disconnectSlotContentObserver()}componentDidRender(){this.connectSlotContentObserver(),this.connectUserPopoverDrawerSync()}get childAccountLabelText(){return this.childAccountLabel?.trim()??""}get hasBrand(){const t=this.brandName?.trim()??"",s=this.brandLogo?.trim()??"";return t.length>0||s.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 i=t[s].querySelector(".xpl-popover");if(i?.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((t=>{this.scheduleSlotContentSyncFromObserver(t)})),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(){this.slotContentObserver?.disconnect(),this.slotContentObserver=void 0}disconnectUserPopoverDrawerSync(){this.userPopoverDrawerSyncHost&&(this.userPopoverDrawerSyncHost.removeEventListener("isOpenChange",this.handleUserPopoverIsOpenChange),this.userPopoverDrawerSyncHost=null),this.userPopoverDrawerOpenObserver?.disconnect(),this.userPopoverDrawerOpenObserver=void 0}removeDocDismissListeners(){const t=this.el.ownerDocument;t.removeEventListener("keydown",this.onDocKeyDownEscape,!1),t.removeEventListener("click",this.onDocClickOutsideDismiss,!0)}resetMobileCascade(){const t=this.el.querySelector(".xpl-top-nav__left-primary > xpl-top-nav-item.xpl-top-nav-item--dropdown-open");t?.closeMenu().catch((()=>{}))}scheduleSlotContentSyncFromObserver(t){this.mutationsAffectHostSlotting(t)&&(this.slotProjectionDirty=!0),void 0!==this.deferredSlotContentObserverSyncTimeoutId&&clearTimeout(this.deferredSlotContentObserverSyncTimeoutId),this.deferredSlotContentObserverSyncTimeoutId=setTimeout((()=>{this.deferredSlotContentObserverSyncTimeoutId=void 0,this.el.isConnected&&(this.syncBrandLogoSlot(),this.syncUserMenuSlots(),this.flushPendingSlotProjection())}),0)}flushPendingSlotProjection(){this.slotProjectionDirty&&(this.slotProjectionDirty=!1,this.slotProjectionNonce+=1)}mutationsAffectHostSlotting(t){return t.some((t=>"attributes"===t.type||"childList"===t.type&&t.target===this.el))}syncDocDismissListeners(){if(this.removeDocDismissListeners(),a()&&this.navControl){const t=this.el.ownerDocument;t.addEventListener("keydown",this.onDocKeyDownEscape,!1),t.addEventListener("click",this.onDocClickOutsideDismiss,!0)}}syncOpenFromNavControl(){const t=this.open;this.open=!1,t&&!this.navControl&&(this.resetMobileCascade(),this.navOpen.emit(!1))}render(){return i(e,{key:"f51ed285523198b4ef39de7ea1e5dc025d5a308a",class:{"xpl-top-nav":!0,"xpl-top-nav--nav-control":Boolean(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:"c2c14ed2ba975299efd76a391dfd6371b9214449","aria-label":this.label??"top-navigation-bar",class:"xpl-top-nav__bar"},i("div",{key:"c223b947ffbcb55c6c6a06fa3adaeaee7661b61e",class:"xpl-top-nav__inner-left"},this.navControl&&i("button",{key:"d364b6dd709d59730d40e7a0d41f9dd8fd55d40b",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:"b84614dc20189f641b2f5a08eef1c76610135598",class:"xpl-top-nav__control-icon",icon:"menu",size:32})),this.hasBrand&&i("div",{key:"90b104133cbdea89643923fd06f54179978862a5",class:"xpl-top-nav__brand-bar"},i("xpl-top-nav-item",{key:"2b40b31ba1312a76231f7a89b1e95508a5a146a1",class:"xpl-top-nav__brand",href:this.brandHref,onNavItemClick:this.onBrandNavItemClick},this.brandLogo?.trim()?i("img",{class:"xpl-top-nav__brand-logo",src:this.brandLogo,alt:this.brandName?.trim()?this.brandName.trim():"Brand"}):this.brandLogoSlotPresent?i("span",{class:"xpl-top-nav__brand-logo-slot"},i("slot",{name:"brand-logo"})):null,this.brandName?.trim()?i("span",{class:"xpl-top-nav__brand-name"},this.brandName.trim()):null)),i("div",{key:"ca3e9b4501ab3756301b2079bcb9632734e56922",class:{"xpl-top-nav__aside":!0,"xpl-nav-left":!0}},i("div",{key:"f2674faf140853536150058d13a5d40c7399979e",class:"xpl-top-nav__left-primary",role:"list"},i("slot",{key:"29363ac15d3f3bf7a43b237a7f7e0622c5bd54c4",name:"left-aside"})))),i("div",{key:"7c83bd0a80649b9cbe9ed757ead1136b6fabd09c",class:{"xpl-top-nav__aside":!0,"xpl-nav-right":!0}},i("div",{key:"c67e6d3365d90cd7f7c55b08dcc4fa56dcb3e291",class:"xpl-nav-right__list"},i("div",{key:"46b9c3b0b010bf52a5632bc81b279310c0a54438",class:"xpl-top-nav__right-rail"},i("div",{key:"72279d15a5464dfabd9f92c04bc231e270ea04b9",class:"xpl-top-nav__right-lead"},i("slot",{key:"d8b44d01141f9cfbeb7d6b019345ffc8c94fd0c3",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 n(this)}static get watchers(){return{navControl:[{onNavControlChanged:0}]}}};export{d as xpl_top_nav}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,h as s,H as e,g as n}from"./p-ukZKsqqq.js";import{T as h,i as o}from"./p-Dqb1pIRo.js";import{T as r}from"./p-CWdQxaaX.js";const a="hoverClose",l=class{constructor(s){t(this,s),this.navItemClick=i(this,"navItemClick",7),this.openChange=i(this,"openChange",7),this.dropdownPanelId=`xpl-top-nav-item-dropdown-${Math.random().toString(36).slice(2,11)}`,this.hoverOpened=!1,this.timers=new h,this.hasActiveDescendant=!1,this.hasDropdown=!1,this.isLeadingIconSlotPresent=!1,this.isMobileViewport=!1,this.hostListitemRole=!1,this.isTrailingIconSlotPresent=!1,this.active=!1,this.icon="",this.open=!1,this.openMode="click",this.selected=!1,this.onDocClickCapture=t=>{if(!this.hasDropdown||!this.open)return;const i=t.target;i&&!this.el.contains(i)&&(this.open=!1)},this.onDocKeyDownCapture=t=>{this.hasDropdown&&this.open&&"Escape"===t.key&&(t.preventDefault(),t.stopPropagation(),this.open=!1,this.focusTriggerAfterEscape())},this.handleClick=t=>{if(this.hasDropdown){if(t.preventDefault(),t.stopPropagation(),this.timers.clearCoalesced(a),this.open&&this.hoverOpened&&this.hoverModeActive()&&t.detail>0)return;return this.hoverOpened=!1,void(this.open=!this.open)}this.navItemClick.emit(t)},this.handleKeyDown=t=>{if(null!=this.href&&!this.hasDropdown&&" "===t.key){t.preventDefault();const i=this.el.querySelector(".xpl-top-nav-item__inner");i?.click()}},this.onMobileViewportChange=()=>{this.isMobileViewport=this.mobileMq?.matches??!1},this.handleMouseEnter=()=>{this.hasDropdown&&this.hoverModeActive()&&(this.timers.clearCoalesced(a),this.open||(this.hoverOpened=!0,this.open=!0))},this.handleMouseLeave=()=>{this.hasDropdown&&this.open&&this.hoverOpened&&this.timers.scheduleCoalesced(a,(()=>{this.hoverOpened&&!this.el.contains(this.el.ownerDocument.activeElement)&&(this.open=!1)}),150)}}onHasDropdownChanged(){this.hasDropdown||(this.open=!1),this.syncDropdownDocListeners()}onOpenChanged(t){this.openChange.emit(t),t||(this.hoverOpened=!1),t&&this.hasDropdown&&this.broadcastCloseOtherDropdownHosts()}connectedCallback(){o()&&"function"==typeof window.matchMedia&&(this.hoverOpenMq=window.matchMedia("(hover: hover) and (pointer: fine) and (min-width: 768px)"),this.mobileMq=window.matchMedia(r),this.mobileMq.addEventListener("change",this.onMobileViewportChange),this.isMobileViewport=this.mobileMq.matches),this.syncHostListitemRole(),this.syncHasDropdownFromDom(),this.syncDropdownDocListeners(),this.connectDropdownSlotObserver()}disconnectedCallback(){this.timers.dispose(),this.hoverOpenMq=void 0,this.mobileMq?.removeEventListener("change",this.onMobileViewportChange),this.mobileMq=void 0,this.disconnectDropdownSlotObserver(),this.disconnectListitemContextObservers();const t=this.el.ownerDocument;t.removeEventListener("click",this.onDocClickCapture,!0),t.removeEventListener("keydown",this.onDocKeyDownCapture,!0)}componentWillLoad(){this.syncHostListitemRole(),this.syncHasDropdownFromDom()}componentWillRender(){this.disconnectDropdownSlotObserver(),this.disconnectListitemContextObservers()}componentDidRender(){this.schedulePostRenderTopNavItemWork()}handleCloseNavDropdownRequest(){this.hasDropdown&&this.open&&(this.open=!1)}async closeMenu(){this.hasDropdown&&(this.open=!1)}async openMenu(){this.hasDropdown&&(this.timers.clearCoalesced(a),this.hoverOpened=!1,this.open=!0)}async toggleMenu(){this.hasDropdown&&(this.open=!this.open)}scheduleHasDropdownSyncFromObserver(){this.timers.scheduleCoalesced("hasDropdownSync",(()=>{this.el.isConnected&&this.syncHasDropdownFromDom()}))}connectDropdownSlotObserver(){this.disconnectDropdownSlotObserver(),"undefined"!=typeof MutationObserver&&(this.dropdownSlotObserver=new MutationObserver((()=>{this.scheduleHasDropdownSyncFromObserver()})),this.dropdownSlotObserver.observe(this.el,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["slot"]}))}disconnectDropdownSlotObserver(){this.dropdownSlotObserver?.disconnect(),this.dropdownSlotObserver=void 0}disconnectListitemContextObservers(){this.parentListitemContextObserver?.disconnect(),this.parentListitemContextObserver=void 0,this.selfListitemContextObserver?.disconnect(),this.selfListitemContextObserver=void 0}connectListitemContextObservers(){if(this.disconnectListitemContextObservers(),"undefined"==typeof MutationObserver||!this.el.isConnected)return;this.selfListitemContextObserver=new MutationObserver((()=>{this.schedulePostRenderTopNavItemWork()})),this.selfListitemContextObserver.observe(this.el,{attributes:!0,attributeFilter:["class","slot"]});const t=this.el.parentElement;if(t){this.parentListitemContextObserver=new MutationObserver((()=>{this.schedulePostRenderTopNavItemWork()}));const i="xpl-top-nav"===t.tagName.toLowerCase()&&"left-aside"===this.el.getAttribute("slot")?t.querySelector(".xpl-top-nav__left-primary"):null;this.parentListitemContextObserver.observe(i??t,{attributes:!0,attributeFilter:["role"],subtree:!1})}}schedulePostRenderTopNavItemWork(){this.timers.scheduleCoalesced("postRender",(()=>{this.el.isConnected&&(this.syncHostListitemRole(),this.syncHasDropdownFromDom(),this.connectListitemContextObservers(),this.connectDropdownSlotObserver())}))}syncDropdownDocListeners(){if(!o())return;const t=this.el.ownerDocument;t.removeEventListener("click",this.onDocClickCapture,!0),t.removeEventListener("keydown",this.onDocKeyDownCapture,!0),this.hasDropdown&&(t.addEventListener("click",this.onDocClickCapture,!0),t.addEventListener("keydown",this.onDocKeyDownCapture,!0))}hasSlottedChildOwnedByThisHost(t){return Array.from(this.el.querySelectorAll(`[slot="${t}"]`)).some((t=>t.closest("xpl-top-nav-item")===this.el))}syncHasDropdownFromDom(){const t=null!=this.el.querySelector('[slot="dropdown"]');t!==this.hasDropdown&&(this.hasDropdown=t);const i=this.hasSlottedChildOwnedByThisHost("leading-icon");i!==this.isLeadingIconSlotPresent&&(this.isLeadingIconSlotPresent=i);const s=this.hasSlottedChildOwnedByThisHost("trailing-icon");s!==this.isTrailingIconSlotPresent&&(this.isTrailingIconSlotPresent=s);const e=!!t&&(null!==this.el.querySelector('[slot="dropdown"] .xpl-top-nav-item--active')||null!==this.el.querySelector('[slot="dropdown"] .xpl-top-nav-item--selected'));e!==this.hasActiveDescendant&&(this.hasActiveDescendant=e)}getNavDropdownBroadcastRoot(){return this.el.closest("xpl-top-nav-menu")??this.el.closest("xpl-nav-header-menu")??this.el.closest("xpl-top-nav")??this.el.ownerDocument}broadcastCloseOtherDropdownHosts(){this.getNavDropdownBroadcastRoot().querySelectorAll("xpl-top-nav-item").forEach((t=>{t!==this.el&&t.parentElement===this.el.parentElement&&t.dispatchEvent(new CustomEvent("_xplCloseNavDropdown",{bubbles:!1}))}))}hoverModeActive(){return"hover"===this.openMode&&(this.hoverOpenMq?.matches??!1)}focusTriggerAfterEscape(){this.timers.scheduleCoalesced("focusTriggerAfterEscape",(()=>{this.el.isConnected&&this.el.querySelector(".xpl-top-nav-item__inner")?.focus()}))}static isInternalRenderedHostChild(t){return t.classList.contains("xpl-top-nav-item__inner")||t.classList.contains("xpl-top-nav-item__dropdown")}hasNonDropdownLightDomChild(){return Array.from(this.el.childNodes).some((t=>{if(t.nodeType===Node.TEXT_NODE)return Boolean(t.textContent?.trim());if(t.nodeType===Node.ELEMENT_NODE){const i=t;if(l.isInternalRenderedHostChild(i))return!1;const s=i.getAttribute("slot");return null==s||""===s}return!1}))}getInnerAriaLabel(){if(this.label?.trim())return;if(this.hasNonDropdownLightDomChild())return;const t=this.itemAriaLabel?.trim();return t||(this.icon?.trim()||this.isLeadingIconSlotPresent?"Navigation item":void 0)}computeHostListitemRole(){const{el:t}=this;if(t.classList.contains("xpl-top-nav__brand"))return!1;if("right-aside-mobile"===t.getAttribute("slot"))return!1;const i=t.parentElement;return"list"===i?.getAttribute("role")||null!=i&&"xpl-nav-header-menu"===i.tagName.toLowerCase()||null!=i&&"xpl-top-nav-menu"===i.tagName.toLowerCase()||"left-aside"===t.getAttribute("slot")&&"xpl-top-nav"===i?.tagName.toLowerCase()&&null!=i.querySelector('.xpl-top-nav__left-primary[role="list"]')}syncHostListitemRole(){const t=this.computeHostListitemRole();this.hostListitemRole!==t&&(this.hostListitemRole=t)}renderLabelContent(){if(!this.label)return s("slot",null);const t=this.description?.trim();return t?s("span",{class:"xpl-top-nav-item__label-group"},s("span",{class:"xpl-top-nav-item__label",title:this.label},this.label),s("span",{class:"xpl-top-nav-item__description"},t)):s("span",{class:"xpl-top-nav-item__label",title:this.label},this.label)}renderLeading(){return this.isLeadingIconSlotPresent?s("span",{class:"xpl-top-nav-item__leading"},s("slot",{name:"leading-icon"})):this.icon?s("span",{class:"xpl-top-nav-item__leading"},s("xpl-icon",{size:16,icon:this.icon})):null}renderTrailing(){return this.isTrailingIconSlotPresent?s("span",{class:"xpl-top-nav-item__trailing"},s("slot",{name:"trailing-icon"})):this.hasDropdown?s("span",{class:"xpl-top-nav-item__trailing"},s("xpl-icon",{icon:this.isMobileViewport?"chevron-right":"chevron-down"})):null}renderInner(){const t=this.selected?"page":void 0,i=this.hasDropdown?this.open?"true":"false":void 0,e=this.getInnerAriaLabel(),n={class:"xpl-top-nav-item__inner",tabIndex:0,"aria-current":t,"aria-expanded":i,"aria-haspopup":this.hasDropdown?"true":void 0,"aria-controls":this.hasDropdown?this.dropdownPanelId:void 0,...e?{"aria-label":e}:{},onClick:this.handleClick,onKeyDown:this.handleKeyDown};return null==this.href||this.hasDropdown?s("button",{...n,type:"button"},this.renderLeading(),this.renderLabelContent(),this.renderTrailing()):s("a",{...n,href:this.href},this.renderLeading(),this.renderLabelContent(),this.renderTrailing())}render(){return s(e,{key:"fe53cfd84cba8502089c4a3fae62dfed10c0cdf0",class:{"xpl-top-nav-item":!0,"xpl-top-nav-item--active":this.active,"xpl-top-nav-item--dropdown-open":this.hasDropdown&&this.open,"xpl-top-nav-item--has-active-descendant":this.hasActiveDescendant,"xpl-top-nav-item--has-dropdown":this.hasDropdown,"xpl-top-nav-item--selected":this.selected,dark:!0},onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,...this.hostListitemRole?{role:"listitem"}:{}},this.renderInner(),this.hasDropdown&&s("div",{key:"954f83c94bd56d9bd328212f2ecc070861b1fd54",id:this.dropdownPanelId,class:"xpl-top-nav-item__dropdown"},s("slot",{key:"4d830a9386f12026cd1a2ecb454bcb9df2202431",name:"dropdown"})))}get el(){return n(this)}static get watchers(){return{hasDropdown:[{onHasDropdownChanged:0}],open:[{onOpenChanged:0}]}}};export{l as xpl_top_nav_item}
|
|
1
|
+
import{r as t,c as i,h as s,H as e,g as n}from"./p-CJABLO_1.js";import{T as h,i as o}from"./p-Dqb1pIRo.js";import{T as r}from"./p-CWdQxaaX.js";const a="hoverClose",l=class{constructor(s){t(this,s),this.navItemClick=i(this,"navItemClick",7),this.openChange=i(this,"openChange",7),this.dropdownPanelId=`xpl-top-nav-item-dropdown-${Math.random().toString(36).slice(2,11)}`,this.hoverOpened=!1,this.timers=new h,this.hasActiveDescendant=!1,this.hasDropdown=!1,this.isLeadingIconSlotPresent=!1,this.isMobileViewport=!1,this.hostListitemRole=!1,this.isTrailingIconSlotPresent=!1,this.active=!1,this.icon="",this.open=!1,this.openMode="click",this.selected=!1,this.onDocClickCapture=t=>{if(!this.hasDropdown||!this.open)return;const i=t.target;i&&!this.el.contains(i)&&(this.open=!1)},this.onDocKeyDownCapture=t=>{this.hasDropdown&&this.open&&"Escape"===t.key&&(t.preventDefault(),t.stopPropagation(),this.open=!1,this.focusTriggerAfterEscape())},this.handleClick=t=>{if(this.hasDropdown){if(t.preventDefault(),t.stopPropagation(),this.timers.clearCoalesced(a),this.open&&this.hoverOpened&&this.hoverModeActive()&&t.detail>0)return;return this.hoverOpened=!1,void(this.open=!this.open)}this.navItemClick.emit(t)},this.handleKeyDown=t=>{if(null!=this.href&&!this.hasDropdown&&" "===t.key){t.preventDefault();const i=this.el.querySelector(".xpl-top-nav-item__inner");i?.click()}},this.onMobileViewportChange=()=>{this.isMobileViewport=this.mobileMq?.matches??!1},this.handleMouseEnter=()=>{this.hasDropdown&&this.hoverModeActive()&&(this.timers.clearCoalesced(a),this.open||(this.hoverOpened=!0,this.open=!0))},this.handleMouseLeave=()=>{this.hasDropdown&&this.open&&this.hoverOpened&&this.timers.scheduleCoalesced(a,(()=>{this.hoverOpened&&!this.el.contains(this.el.ownerDocument.activeElement)&&(this.open=!1)}),150)}}onHasDropdownChanged(){this.hasDropdown||(this.open=!1),this.syncDropdownDocListeners()}onOpenChanged(t){this.openChange.emit(t),t||(this.hoverOpened=!1),t&&this.hasDropdown&&this.broadcastCloseOtherDropdownHosts()}connectedCallback(){o()&&"function"==typeof window.matchMedia&&(this.hoverOpenMq=window.matchMedia("(hover: hover) and (pointer: fine) and (min-width: 768px)"),this.mobileMq=window.matchMedia(r),this.mobileMq.addEventListener("change",this.onMobileViewportChange),this.isMobileViewport=this.mobileMq.matches),this.syncHostListitemRole(),this.syncHasDropdownFromDom(),this.syncDropdownDocListeners(),this.connectDropdownSlotObserver()}disconnectedCallback(){this.timers.dispose(),this.hoverOpenMq=void 0,this.mobileMq?.removeEventListener("change",this.onMobileViewportChange),this.mobileMq=void 0,this.disconnectDropdownSlotObserver(),this.disconnectListitemContextObservers();const t=this.el.ownerDocument;t.removeEventListener("click",this.onDocClickCapture,!0),t.removeEventListener("keydown",this.onDocKeyDownCapture,!0)}componentWillLoad(){this.syncHostListitemRole(),this.syncHasDropdownFromDom()}componentWillRender(){this.disconnectDropdownSlotObserver(),this.disconnectListitemContextObservers()}componentDidRender(){this.schedulePostRenderTopNavItemWork()}handleCloseNavDropdownRequest(){this.hasDropdown&&this.open&&(this.open=!1)}async closeMenu(){this.hasDropdown&&(this.open=!1)}async openMenu(){this.hasDropdown&&(this.timers.clearCoalesced(a),this.hoverOpened=!1,this.open=!0)}async toggleMenu(){this.hasDropdown&&(this.open=!this.open)}scheduleHasDropdownSyncFromObserver(){this.timers.scheduleCoalesced("hasDropdownSync",(()=>{this.el.isConnected&&this.syncHasDropdownFromDom()}))}connectDropdownSlotObserver(){this.disconnectDropdownSlotObserver(),"undefined"!=typeof MutationObserver&&(this.dropdownSlotObserver=new MutationObserver((()=>{this.scheduleHasDropdownSyncFromObserver()})),this.dropdownSlotObserver.observe(this.el,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["slot"]}))}disconnectDropdownSlotObserver(){this.dropdownSlotObserver?.disconnect(),this.dropdownSlotObserver=void 0}disconnectListitemContextObservers(){this.parentListitemContextObserver?.disconnect(),this.parentListitemContextObserver=void 0,this.selfListitemContextObserver?.disconnect(),this.selfListitemContextObserver=void 0}connectListitemContextObservers(){if(this.disconnectListitemContextObservers(),"undefined"==typeof MutationObserver||!this.el.isConnected)return;this.selfListitemContextObserver=new MutationObserver((()=>{this.schedulePostRenderTopNavItemWork()})),this.selfListitemContextObserver.observe(this.el,{attributes:!0,attributeFilter:["class","slot"]});const t=this.el.parentElement;if(t){this.parentListitemContextObserver=new MutationObserver((()=>{this.schedulePostRenderTopNavItemWork()}));const i="xpl-top-nav"===t.tagName.toLowerCase()&&"left-aside"===this.el.getAttribute("slot")?t.querySelector(".xpl-top-nav__left-primary"):null;this.parentListitemContextObserver.observe(i??t,{attributes:!0,attributeFilter:["role"],subtree:!1})}}schedulePostRenderTopNavItemWork(){this.timers.scheduleCoalesced("postRender",(()=>{this.el.isConnected&&(this.syncHostListitemRole(),this.syncHasDropdownFromDom(),this.connectListitemContextObservers(),this.connectDropdownSlotObserver())}))}syncDropdownDocListeners(){if(!o())return;const t=this.el.ownerDocument;t.removeEventListener("click",this.onDocClickCapture,!0),t.removeEventListener("keydown",this.onDocKeyDownCapture,!0),this.hasDropdown&&(t.addEventListener("click",this.onDocClickCapture,!0),t.addEventListener("keydown",this.onDocKeyDownCapture,!0))}hasSlottedChildOwnedByThisHost(t){return Array.from(this.el.querySelectorAll(`[slot="${t}"]`)).some((t=>t.closest("xpl-top-nav-item")===this.el))}syncHasDropdownFromDom(){const t=null!=this.el.querySelector('[slot="dropdown"]');t!==this.hasDropdown&&(this.hasDropdown=t);const i=this.hasSlottedChildOwnedByThisHost("leading-icon");i!==this.isLeadingIconSlotPresent&&(this.isLeadingIconSlotPresent=i);const s=this.hasSlottedChildOwnedByThisHost("trailing-icon");s!==this.isTrailingIconSlotPresent&&(this.isTrailingIconSlotPresent=s);const e=!!t&&(null!==this.el.querySelector('[slot="dropdown"] .xpl-top-nav-item--active')||null!==this.el.querySelector('[slot="dropdown"] .xpl-top-nav-item--selected'));e!==this.hasActiveDescendant&&(this.hasActiveDescendant=e)}getNavDropdownBroadcastRoot(){return this.el.closest("xpl-top-nav-menu")??this.el.closest("xpl-nav-header-menu")??this.el.closest("xpl-top-nav")??this.el.ownerDocument}broadcastCloseOtherDropdownHosts(){this.getNavDropdownBroadcastRoot().querySelectorAll("xpl-top-nav-item").forEach((t=>{t!==this.el&&t.parentElement===this.el.parentElement&&t.dispatchEvent(new CustomEvent("_xplCloseNavDropdown",{bubbles:!1}))}))}hoverModeActive(){return"hover"===this.openMode&&(this.hoverOpenMq?.matches??!1)}focusTriggerAfterEscape(){this.timers.scheduleCoalesced("focusTriggerAfterEscape",(()=>{this.el.isConnected&&this.el.querySelector(".xpl-top-nav-item__inner")?.focus()}))}static isInternalRenderedHostChild(t){return t.classList.contains("xpl-top-nav-item__inner")||t.classList.contains("xpl-top-nav-item__dropdown")}hasNonDropdownLightDomChild(){return Array.from(this.el.childNodes).some((t=>{if(t.nodeType===Node.TEXT_NODE)return Boolean(t.textContent?.trim());if(t.nodeType===Node.ELEMENT_NODE){const i=t;if(l.isInternalRenderedHostChild(i))return!1;const s=i.getAttribute("slot");return null==s||""===s}return!1}))}getInnerAriaLabel(){if(this.label?.trim())return;if(this.hasNonDropdownLightDomChild())return;const t=this.itemAriaLabel?.trim();return t||(this.icon?.trim()||this.isLeadingIconSlotPresent?"Navigation item":void 0)}computeHostListitemRole(){const{el:t}=this;if(t.classList.contains("xpl-top-nav__brand"))return!1;if("right-aside-mobile"===t.getAttribute("slot"))return!1;const i=t.parentElement;return"list"===i?.getAttribute("role")||null!=i&&"xpl-nav-header-menu"===i.tagName.toLowerCase()||null!=i&&"xpl-top-nav-menu"===i.tagName.toLowerCase()||"left-aside"===t.getAttribute("slot")&&"xpl-top-nav"===i?.tagName.toLowerCase()&&null!=i.querySelector('.xpl-top-nav__left-primary[role="list"]')}syncHostListitemRole(){const t=this.computeHostListitemRole();this.hostListitemRole!==t&&(this.hostListitemRole=t)}renderLabelContent(){if(!this.label)return s("slot",null);const t=this.description?.trim();return t?s("span",{class:"xpl-top-nav-item__label-group"},s("span",{class:"xpl-top-nav-item__label",title:this.label},this.label),s("span",{class:"xpl-top-nav-item__description"},t)):s("span",{class:"xpl-top-nav-item__label",title:this.label},this.label)}renderLeading(){return this.isLeadingIconSlotPresent?s("span",{class:"xpl-top-nav-item__leading"},s("slot",{name:"leading-icon"})):this.icon?s("span",{class:"xpl-top-nav-item__leading"},s("xpl-icon",{size:16,icon:this.icon})):null}renderTrailing(){return this.isTrailingIconSlotPresent?s("span",{class:"xpl-top-nav-item__trailing"},s("slot",{name:"trailing-icon"})):this.hasDropdown?s("span",{class:"xpl-top-nav-item__trailing"},s("xpl-icon",{icon:this.isMobileViewport?"chevron-right":"chevron-down"})):null}renderInner(){const t=this.selected?"page":void 0,i=this.hasDropdown?this.open?"true":"false":void 0,e=this.getInnerAriaLabel(),n={class:"xpl-top-nav-item__inner",tabIndex:0,"aria-current":t,"aria-expanded":i,"aria-haspopup":this.hasDropdown?"true":void 0,"aria-controls":this.hasDropdown?this.dropdownPanelId:void 0,...e?{"aria-label":e}:{},onClick:this.handleClick,onKeyDown:this.handleKeyDown};return null==this.href||this.hasDropdown?s("button",{...n,type:"button"},this.renderLeading(),this.renderLabelContent(),this.renderTrailing()):s("a",{...n,href:this.href},this.renderLeading(),this.renderLabelContent(),this.renderTrailing())}render(){return s(e,{key:"59b96ce313362796a55a0e109a3cd3918b88a6b3",class:{"xpl-top-nav-item":!0,"xpl-top-nav-item--active":this.active,"xpl-top-nav-item--dropdown-open":this.hasDropdown&&this.open,"xpl-top-nav-item--has-active-descendant":this.hasActiveDescendant,"xpl-top-nav-item--has-dropdown":this.hasDropdown,"xpl-top-nav-item--selected":this.selected,dark:!0},onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,...this.hostListitemRole?{role:"listitem"}:{}},this.renderInner(),this.hasDropdown&&s("div",{key:"8daced29efc97c4a36934dfd70764768440acbef",id:this.dropdownPanelId,class:"xpl-top-nav-item__dropdown"},s("slot",{key:"aa1f47af8c810d24e21b18ded427c8a80f20ead2",name:"dropdown"})))}get el(){return n(this)}static get watchers(){return{hasDropdown:[{onHasDropdownChanged:0}],open:[{onOpenChanged:0}]}}};export{l as xpl_top_nav_item}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as a,h as e,H as t,g as c}from"./p-CJABLO_1.js";const s=class{constructor(e){a(this,e),this.selectedItemCount=0}componentDidLoad(){const a=this.el.querySelector('[slot="actions-right"]');null!==a&&(a.style.marginLeft="auto")}listenToSelectedItemCountChange(a){this.selectedItemCount=a.detail.length}render(){return e(t,{key:"627eed07ad6f3c06145126cad4b9780a3bec7258",class:{"xpl-toolbar":!0,dark:!0,hidden:0===this.selectedItemCount}},e("div",{key:"ccae2ca6612e91c87bae43479bc7aa4bf8731ad3",class:"toolbar"},e("p",{key:"360658d3ed621e4d6d5920baf41c63f8649a7a9f",class:"selected-item-count"},this.selectedItemCount," Selected"),e("div",{key:"386e61abd7294286aca11f0e365f24b466193088",class:"actions"},e("slot",{key:"4999110aaf0762dd60fdb4fbc3540040dadac003",name:"actions-left"}),e("slot",{key:"621b28dcb128f6a89d8ca3f7ec54503c3660a5bc",name:"actions-right"}))))}get el(){return c(this)}};export{s as xpl_toolbar}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,h as a,H as c}from"./p-CJABLO_1.js";const r=class{constructor(a){e(this,a),this.size="wide"}render(){return a(c,{key:"039b66267939780a105ead45dee7fdbab2826555"},a("main",{key:"457e5701bed865b094c8031fef9a4f2d4f167e2a",class:`xpl-content-area-wrapper xpl-content-area-wrapper__${this.size}`},a("div",{key:"174ca226c7c4cf56bd03f0636b985f5c13b72ddc",class:"xpl-content-area"},a("slot",{key:"74e699c02c468d99032e37f8bdc025a5ad443e53"}))))}};export{r as xpl_content_area}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,c as t,h as n,H as i,g as a}from"./p-ukZKsqqq.js";import{v as s}from"./p-CK3_k8jD.js";const o=[{countryCode:"US",dialCode:"+1",name:"United States"},{countryCode:"CA",dialCode:"+1",name:"Canada"},{countryCode:"GB",dialCode:"+44",name:"United Kingdom"},{countryCode:"AU",dialCode:"+61",name:"Australia"},{countryCode:"DE",dialCode:"+49",name:"Germany"},{countryCode:"FR",dialCode:"+33",name:"France"},{countryCode:"ES",dialCode:"+34",name:"Spain"},{countryCode:"IT",dialCode:"+39",name:"Italy"},{countryCode:"NL",dialCode:"+31",name:"Netherlands"},{countryCode:"BE",dialCode:"+32",name:"Belgium"},{countryCode:"AT",dialCode:"+43",name:"Austria"},{countryCode:"CH",dialCode:"+41",name:"Switzerland"},{countryCode:"PL",dialCode:"+48",name:"Poland"},{countryCode:"IE",dialCode:"+353",name:"Ireland"},{countryCode:"PT",dialCode:"+351",name:"Portugal"},{countryCode:"SE",dialCode:"+46",name:"Sweden"},{countryCode:"NO",dialCode:"+47",name:"Norway"},{countryCode:"DK",dialCode:"+45",name:"Denmark"},{countryCode:"FI",dialCode:"+358",name:"Finland"},{countryCode:"NZ",dialCode:"+64",name:"New Zealand"},{countryCode:"JP",dialCode:"+81",name:"Japan"},{countryCode:"CN",dialCode:"+86",name:"China"},{countryCode:"IN",dialCode:"+91",name:"India"},{countryCode:"BR",dialCode:"+55",name:"Brazil"},{countryCode:"MX",dialCode:"+52",name:"Mexico"},{countryCode:"ZA",dialCode:"+27",name:"South Africa"},{countryCode:"SG",dialCode:"+65",name:"Singapore"},{countryCode:"HK",dialCode:"+852",name:"Hong Kong"},{countryCode:"KR",dialCode:"+82",name:"South Korea"}];function r(e){return o.find((t=>t.countryCode===e))}function c(e){return(e||"").replace(/\D/g,"")}function d(e){switch(e){case"US":case"CA":case"MX":case"JP":case"IN":case"KR":return 10;case"GB":case"DE":case"AT":case"CH":case"BR":case"CN":return 11;case"AU":case"FR":return 9;default:return 15}}function h(e,t){if(!e)return"";const n=e.replace(/\D/g,"");switch(t){case"US":case"CA":return function(e){const t=Math.min(e.length,10);return t<=3?e.slice(0,t):t<=6?`${e.slice(0,3)} ${e.slice(3,t)}`:`${e.slice(0,3)} ${e.slice(3,6)} ${e.slice(6,t)}`}(n);case"GB":return function(e){const t=Math.min(e.length,11);return t<=4?e.slice(0,t):t<=7?`${e.slice(0,4)} ${e.slice(4,t)}`:`${e.slice(0,4)} ${e.slice(4,7)} ${e.slice(7,t)}`}(n);case"AU":return function(e){const t=Math.min(e.length,9);return t<=1?e.slice(0,t):t<=4?`${e.slice(0,1)} ${e.slice(1,t)}`:t<=7?`${e.slice(0,1)} ${e.slice(1,4)} ${e.slice(4,t)}`:`${e.slice(0,1)} ${e.slice(1,4)} ${e.slice(4,7)} ${e.slice(7,t)}`}(n);case"DE":case"AT":case"CH":return function(e){const t=Math.min(e.length,11);return t<=3?e.slice(0,t):`${e.slice(0,3)} ${e.slice(3,t)}`}(n);case"FR":return function(e){const t=Math.min(e.length,9),n=[];let i=0;for(t>0&&(n.push(e.slice(0,1)),i=1);i<t&&i+2<=t;)n.push(e.slice(i,i+2)),i+=2;return i<t&&n.push(e.slice(i)),n.join(" ")}(n);case"BR":return function(e){const t=Math.min(e.length,11);return t<=2?t?`(${e}`:"":t<=6||7===t?`(${e.slice(0,2)}) ${e.slice(2,t)}`:`(${e.slice(0,2)}) ${e.slice(2,7)}-${e.slice(7,t)}`}(n);case"MX":return function(e){const t=Math.min(e.length,10);return t<=3?e.slice(0,t):t<=6?`${e.slice(0,3)} ${e.slice(3,t)}`:`${e.slice(0,3)} ${e.slice(3,6)} ${e.slice(6,t)}`}(n);case"JP":return function(e){const t=Math.min(e.length,10);return t<=3?e.slice(0,t):t<=7?`${e.slice(0,3)}-${e.slice(3,t)}`:`${e.slice(0,3)}-${e.slice(3,7)}-${e.slice(7,t)}`}(n);case"CN":return function(e){const t=Math.min(e.length,11);return t<=3?e.slice(0,t):t<=7?`${e.slice(0,3)} ${e.slice(3,t)}`:`${e.slice(0,3)} ${e.slice(3,7)} ${e.slice(7,t)}`}(n);case"IN":return function(e){const t=Math.min(e.length,10);return t<=5?e.slice(0,t):`${e.slice(0,5)} ${e.slice(5,t)}`}(n);case"KR":return function(e){const t=Math.min(e.length,10);return t<=3?e.slice(0,t):t<=7?`${e.slice(0,3)} ${e.slice(3,t)}`:`${e.slice(0,3)} ${e.slice(3,7)} ${e.slice(7,t)}`}(n);default:return function(e){const t=e.length;if(t<=3)return e;const n=[];let i=0;for(;i<t;){const a=t-i>=4?4:3;n.push(e.slice(i,i+a)),i+=a}return n.join(" ")}(n)}}function u(e){return e.toLowerCase().replace(/ /g,"-")}const l=class{constructor(n){e(this,n),this.hasErrorStateChanged=t(this,"hasErrorStateChanged",7),this.valueChange=t(this,"valueChange",7),this.lastCursorRef=0,this.lastFormattedRef="",this.dropdownOpen=!1,this.hasErrorState=null,this.nationalNumber="",this.searchQuery="",this.triggerId=`xpl-input-phone-trigger-${s()}`,this.defaultCountry="US",this.isInternational=!0,this.handleTriggerClick=()=>{this.isEditable&&(this.dropdownOpen=!this.dropdownOpen)},this.handleNumberInput=e=>{const t=e.target,n=t.value||"";let i;if(this.lastCursorRef=t.selectionStart??0,this.lastFormattedRef=n,this.isInternational&&n.startsWith("+")){const e=c(n),t=this.effectiveDialCode.slice(1).replace(/\D/g,"");i=t&&e.startsWith(t)?e.slice(t.length):e}else i=c(n);const a=d(this.effectiveCountryCode);i.length>a&&(i=i.slice(0,a)),this.nationalNumber=i,this.emitValue(),t.value=this.displayValue},this.handleClear=()=>{this.nationalNumber="",this.emitValue(),this.inputEl?.focus()},this.handleDropdownUpdate=(e,{component:t})=>{const n=t??this.dropdownRef;if(!n)return;const{options:i}=n;if(i?.length){const e=i.reduce(((e,t)=>[...e,...t.groupName?t.options??[]:[t]]),[]).find((e=>e.isSelected));if(e?.value){const t=r(e.value);t&&(this.selectedCountry=t,this.emitValue(),this.inputEl?.focus())}}}}onDropdownOpenChange(e){e&&(this.searchQuery="")}onHasErrorStateChanged(e){this.hasErrorStateChanged.emit(e)}onValueChange(e){if(null==e||""===e){const e=r(this.defaultCountry??"US")||o[0];return this.selectedCountry=e,void(this.nationalNumber="")}const t=function(e){if(!e||!e.startsWith("+"))return null;const t=e.slice(1).replace(/\D/g,"");if(!t.length)return null;const n=[...o].sort(((e,t)=>t.dialCode.replace(/\D/g,"").length-e.dialCode.replace(/\D/g,"").length)).find((e=>{const n=e.dialCode.slice(1).replace(/\D/g,"");return t.startsWith(n)}));if(!n)return null;const i=n.dialCode.slice(1).replace(/\D/g,""),a=t.slice(i.length);return{dialCode:n.dialCode,nationalNumber:a}}(e);if(t)if(this.selectedCountry?.dialCode===t.dialCode)this.nationalNumber=t.nationalNumber;else{const e=r(this.defaultCountry??"US"),i=(e?.dialCode===t.dialCode?e:void 0)??(n=t.dialCode,o.find((e=>e.dialCode===n)));i&&(this.selectedCountry=i,this.nationalNumber=t.nationalNumber)}else this.selectedCountry||(this.selectedCountry=r(this.defaultCountry??"US")||o[0]);var n}componentWillLoad(){this.value?this.onValueChange(this.value):this.selectedCountry=r(this.defaultCountry??"US")||o[0]}componentDidUpdate(){if(this.inputEl&&this.lastFormattedRef&&"function"==typeof this.inputEl.setSelectionRange){const e=function(e,t,n){if(n>=e.length)return t.length;const i=c(e.slice(0,n)).length;let a=0,s=0;for(let e=0;e<t.length;e+=1){if(/\d/.test(t[e])&&(s+=1,s>=i)){a=e+(s===i?1:0);break}a=e+1}return Math.min(a,t.length)}(this.lastFormattedRef,this.displayValue,this.lastCursorRef);this.inputEl.setSelectionRange(e,e),this.lastFormattedRef=""}else this.inputEl&&this.lastFormattedRef&&(this.lastFormattedRef="")}get effectiveCountryCode(){return this.selectedCountry?.countryCode??this.defaultCountry??"US"}get effectiveDialCode(){return this.selectedCountry?.dialCode??"+1"}get isEditable(){return!this.disabled&&!this.readonly}get orderedCountries(){const e=this.preferredCountries||[],t=o.filter((t=>!e.includes(t.countryCode)));return[...e.map((e=>r(e))).filter((e=>void 0!==e)),...t]}get filteredCountries(){const e=this.searchQuery.trim().toLowerCase();return e?this.orderedCountries.filter((t=>t.name.toLowerCase().includes(e)||t.dialCode.includes(e)||t.countryCode.toLowerCase().includes(e))):this.orderedCountries}get displayValue(){return this.nationalNumber?h(this.nationalNumber,this.effectiveCountryCode):""}get effectivePlaceholder(){if(this.placeholder)return this.placeholder;const e=this.selectedCountry;return e?function(e){switch(e){case"US":case"CA":case"MX":default:return"000 000 0000";case"GB":return"0000 000 0000";case"AU":return"0 000 000 000";case"DE":case"AT":case"CH":return"000 0000000";case"FR":return"0 00 00 00 00";case"BR":return"00 00000 0000";case"JP":case"CN":case"KR":return"000 0000 0000";case"IN":return"00000 00000"}}(e.countryCode):""}get dropdownOptions(){return this.filteredCountries.map((e=>({icon:u(e.name),label:`${e.name} (${e.dialCode})`,value:e.countryCode,isSelected:this.selectedCountry?.countryCode===e.countryCode})))}get maxInputLength(){const e=d(this.effectiveCountryCode);return h("9".repeat(e),this.effectiveCountryCode).length}emitValue(){const e=this.nationalNumber?function(e,t){const n=(e.slice(1)+t).replace(/\D/g,"");return n.length?`+${n}`:""}(this.effectiveDialCode,this.nationalNumber):"";this.value=e||void 0,this.valueChange.emit(e||""),this.validate()}validate(){this.hasErrorState=!this.required||this.nationalNumber.trim()?null:"required"}render(){return n(i,{key:"c78f7ab5d5c6f6982356d7610fe32855d7f214c5",class:{"xpl-input-phone":!0,"xpl-input-phone--error":!!this.hasErrorState||!!this.error,"xpl-input-phone--open":this.dropdownOpen,"xpl-input-phone--domestic":!this.isInternational}},n("div",{key:"3b30f8755836376728336f769afeb714b9a3dfa9",class:"xpl-input-wrapper"},this.isInternational&&n("button",{key:"c83ff2255a465d7d5d233ce02a816845858594be",type:"button",id:this.triggerId,class:"xpl-input-phone__trigger",disabled:this.disabled,"aria-haspopup":"listbox","aria-expanded":this.dropdownOpen?"true":"false","aria-label":"Select country",onClick:this.handleTriggerClick},this.selectedCountry?.name&&n("xpl-icon",{key:"f0a62a5052b940f4a2212ed77929696e62b4825f",class:"xpl-input-phone__flag",icon:u(this.selectedCountry.name),size:24,"aria-hidden":"true"}),n("xpl-icon",{key:"68782b949fd1cf41a8b0883ad6caba18d9aa1ac5",class:"xpl-input-phone__trigger-icon",icon:"chevron-down",size:20,"aria-hidden":"true"})),n("div",{key:"6aa5f75f34b413bd8939d46c55b7cc42128db247",class:"xpl-input-phone__input-wrap"},this.isInternational&&n("span",{key:"81dc5727f8dca528f34994736c1a8a2223e8fe63",class:"xpl-input-phone__dial-code"},this.effectiveDialCode),n("input",{key:"d0faecadd4216bf6a7b79fc9623052e194900c15",ref:e=>{this.inputEl=e??void 0},type:"tel",id:this.inputId,class:"xpl-input-phone__input",name:this.name,disabled:this.disabled,readonly:this.readonly,required:this.required,"aria-invalid":this.hasErrorState||this.error?"true":"false",placeholder:this.effectivePlaceholder,autocomplete:this.isInternational?"tel-national":"tel",inputmode:"numeric",maxlength:this.maxInputLength,value:this.displayValue,onInput:this.handleNumberInput}),this.nationalNumber&&this.isEditable&&n("button",{key:"12a2e4ce8adb80ca4d6fca1c706c54db01d22101",type:"button",class:"xpl-input-phone__clear","aria-label":"Clear phone number",onClick:this.handleClear},n("xpl-icon",{key:"f1ae5e69258654e8ba5bf511755020e0d7d91088",icon:"x-circle",size:16})))),this.isInternational&&this.isEditable&&n("xpl-dropdown",{key:"d8a75cf0b95d9affae6e03292c011a73dcff98b4",ref:e=>{this.dropdownRef=e??void 0},isOpen:this.dropdownOpen,triggerId:this.triggerId,anchorToTrigger:!0,closeOnSelect:!0,mode:"single",options:this.dropdownOptions,update:this.handleDropdownUpdate,onIsOpenChange:e=>{this.dropdownOpen=e.detail},"aria-label":"Country"},n("div",{key:"b46a4a9985604720099c3212714804aee5a1f58b",slot:"header",class:"xpl-input-phone__search-wrap"},n("xpl-input",{key:"55bdc0f6ff4b1a1a2d17b5ba10849bcab472d7d8",class:"xpl-input-phone__search",type:"text",label:"",placeholder:"Search",value:this.searchQuery,autocomplete:"off",onInputEvent:e=>{this.searchQuery=e.detail??""}},n("xpl-icon",{key:"af0fd388d39e6d9bcac5a032c7c0cf5f192cc4d3",slot:"pre",class:"xpl-input-phone__search-icon",icon:"magnifier",size:20})))))}get el(){return a(this)}static get watchers(){return{dropdownOpen:[{onDropdownOpenChange:0}],hasErrorState:[{onHasErrorStateChanged:0}],value:[{onValueChange:0}]}}};export{l as xpl_input_phone}
|
|
1
|
+
import{r as e,c as t,h as n,H as i,g as a}from"./p-CJABLO_1.js";import{v as s}from"./p-CK3_k8jD.js";const o=[{countryCode:"US",dialCode:"+1",name:"United States"},{countryCode:"CA",dialCode:"+1",name:"Canada"},{countryCode:"GB",dialCode:"+44",name:"United Kingdom"},{countryCode:"AU",dialCode:"+61",name:"Australia"},{countryCode:"DE",dialCode:"+49",name:"Germany"},{countryCode:"FR",dialCode:"+33",name:"France"},{countryCode:"ES",dialCode:"+34",name:"Spain"},{countryCode:"IT",dialCode:"+39",name:"Italy"},{countryCode:"NL",dialCode:"+31",name:"Netherlands"},{countryCode:"BE",dialCode:"+32",name:"Belgium"},{countryCode:"AT",dialCode:"+43",name:"Austria"},{countryCode:"CH",dialCode:"+41",name:"Switzerland"},{countryCode:"PL",dialCode:"+48",name:"Poland"},{countryCode:"IE",dialCode:"+353",name:"Ireland"},{countryCode:"PT",dialCode:"+351",name:"Portugal"},{countryCode:"SE",dialCode:"+46",name:"Sweden"},{countryCode:"NO",dialCode:"+47",name:"Norway"},{countryCode:"DK",dialCode:"+45",name:"Denmark"},{countryCode:"FI",dialCode:"+358",name:"Finland"},{countryCode:"NZ",dialCode:"+64",name:"New Zealand"},{countryCode:"JP",dialCode:"+81",name:"Japan"},{countryCode:"CN",dialCode:"+86",name:"China"},{countryCode:"IN",dialCode:"+91",name:"India"},{countryCode:"BR",dialCode:"+55",name:"Brazil"},{countryCode:"MX",dialCode:"+52",name:"Mexico"},{countryCode:"ZA",dialCode:"+27",name:"South Africa"},{countryCode:"SG",dialCode:"+65",name:"Singapore"},{countryCode:"HK",dialCode:"+852",name:"Hong Kong"},{countryCode:"KR",dialCode:"+82",name:"South Korea"}];function r(e){return o.find((t=>t.countryCode===e))}function c(e){return(e||"").replace(/\D/g,"")}function d(e){switch(e){case"US":case"CA":case"MX":case"JP":case"IN":case"KR":return 10;case"GB":case"DE":case"AT":case"CH":case"BR":case"CN":return 11;case"AU":case"FR":return 9;default:return 15}}function h(e,t){if(!e)return"";const n=e.replace(/\D/g,"");switch(t){case"US":case"CA":return function(e){const t=Math.min(e.length,10);return t<=3?e.slice(0,t):t<=6?`${e.slice(0,3)} ${e.slice(3,t)}`:`${e.slice(0,3)} ${e.slice(3,6)} ${e.slice(6,t)}`}(n);case"GB":return function(e){const t=Math.min(e.length,11);return t<=4?e.slice(0,t):t<=7?`${e.slice(0,4)} ${e.slice(4,t)}`:`${e.slice(0,4)} ${e.slice(4,7)} ${e.slice(7,t)}`}(n);case"AU":return function(e){const t=Math.min(e.length,9);return t<=1?e.slice(0,t):t<=4?`${e.slice(0,1)} ${e.slice(1,t)}`:t<=7?`${e.slice(0,1)} ${e.slice(1,4)} ${e.slice(4,t)}`:`${e.slice(0,1)} ${e.slice(1,4)} ${e.slice(4,7)} ${e.slice(7,t)}`}(n);case"DE":case"AT":case"CH":return function(e){const t=Math.min(e.length,11);return t<=3?e.slice(0,t):`${e.slice(0,3)} ${e.slice(3,t)}`}(n);case"FR":return function(e){const t=Math.min(e.length,9),n=[];let i=0;for(t>0&&(n.push(e.slice(0,1)),i=1);i<t&&i+2<=t;)n.push(e.slice(i,i+2)),i+=2;return i<t&&n.push(e.slice(i)),n.join(" ")}(n);case"BR":return function(e){const t=Math.min(e.length,11);return t<=2?t?`(${e}`:"":t<=6||7===t?`(${e.slice(0,2)}) ${e.slice(2,t)}`:`(${e.slice(0,2)}) ${e.slice(2,7)}-${e.slice(7,t)}`}(n);case"MX":return function(e){const t=Math.min(e.length,10);return t<=3?e.slice(0,t):t<=6?`${e.slice(0,3)} ${e.slice(3,t)}`:`${e.slice(0,3)} ${e.slice(3,6)} ${e.slice(6,t)}`}(n);case"JP":return function(e){const t=Math.min(e.length,10);return t<=3?e.slice(0,t):t<=7?`${e.slice(0,3)}-${e.slice(3,t)}`:`${e.slice(0,3)}-${e.slice(3,7)}-${e.slice(7,t)}`}(n);case"CN":return function(e){const t=Math.min(e.length,11);return t<=3?e.slice(0,t):t<=7?`${e.slice(0,3)} ${e.slice(3,t)}`:`${e.slice(0,3)} ${e.slice(3,7)} ${e.slice(7,t)}`}(n);case"IN":return function(e){const t=Math.min(e.length,10);return t<=5?e.slice(0,t):`${e.slice(0,5)} ${e.slice(5,t)}`}(n);case"KR":return function(e){const t=Math.min(e.length,10);return t<=3?e.slice(0,t):t<=7?`${e.slice(0,3)} ${e.slice(3,t)}`:`${e.slice(0,3)} ${e.slice(3,7)} ${e.slice(7,t)}`}(n);default:return function(e){const t=e.length;if(t<=3)return e;const n=[];let i=0;for(;i<t;){const a=t-i>=4?4:3;n.push(e.slice(i,i+a)),i+=a}return n.join(" ")}(n)}}function u(e){return e.toLowerCase().replace(/ /g,"-")}const l=class{constructor(n){e(this,n),this.hasErrorStateChanged=t(this,"hasErrorStateChanged",7),this.valueChange=t(this,"valueChange",7),this.lastCursorRef=0,this.lastFormattedRef="",this.dropdownOpen=!1,this.hasErrorState=null,this.nationalNumber="",this.searchQuery="",this.triggerId=`xpl-input-phone-trigger-${s()}`,this.defaultCountry="US",this.isInternational=!0,this.handleTriggerClick=()=>{this.isEditable&&(this.dropdownOpen=!this.dropdownOpen)},this.handleNumberInput=e=>{const t=e.target,n=t.value||"";let i;if(this.lastCursorRef=t.selectionStart??0,this.lastFormattedRef=n,this.isInternational&&n.startsWith("+")){const e=c(n),t=this.effectiveDialCode.slice(1).replace(/\D/g,"");i=t&&e.startsWith(t)?e.slice(t.length):e}else i=c(n);const a=d(this.effectiveCountryCode);i.length>a&&(i=i.slice(0,a)),this.nationalNumber=i,this.emitValue(),t.value=this.displayValue},this.handleClear=()=>{this.nationalNumber="",this.emitValue(),this.inputEl?.focus()},this.handleDropdownUpdate=(e,{component:t})=>{const n=t??this.dropdownRef;if(!n)return;const{options:i}=n;if(i?.length){const e=i.reduce(((e,t)=>[...e,...t.groupName?t.options??[]:[t]]),[]).find((e=>e.isSelected));if(e?.value){const t=r(e.value);t&&(this.selectedCountry=t,this.emitValue(),this.inputEl?.focus())}}}}onDropdownOpenChange(e){e&&(this.searchQuery="")}onHasErrorStateChanged(e){this.hasErrorStateChanged.emit(e)}onValueChange(e){if(null==e||""===e){const e=r(this.defaultCountry??"US")||o[0];return this.selectedCountry=e,void(this.nationalNumber="")}const t=function(e){if(!e||!e.startsWith("+"))return null;const t=e.slice(1).replace(/\D/g,"");if(!t.length)return null;const n=[...o].sort(((e,t)=>t.dialCode.replace(/\D/g,"").length-e.dialCode.replace(/\D/g,"").length)).find((e=>{const n=e.dialCode.slice(1).replace(/\D/g,"");return t.startsWith(n)}));if(!n)return null;const i=n.dialCode.slice(1).replace(/\D/g,""),a=t.slice(i.length);return{dialCode:n.dialCode,nationalNumber:a}}(e);if(t)if(this.selectedCountry?.dialCode===t.dialCode)this.nationalNumber=t.nationalNumber;else{const e=r(this.defaultCountry??"US"),i=(e?.dialCode===t.dialCode?e:void 0)??(n=t.dialCode,o.find((e=>e.dialCode===n)));i&&(this.selectedCountry=i,this.nationalNumber=t.nationalNumber)}else this.selectedCountry||(this.selectedCountry=r(this.defaultCountry??"US")||o[0]);var n}componentWillLoad(){this.value?this.onValueChange(this.value):this.selectedCountry=r(this.defaultCountry??"US")||o[0]}componentDidUpdate(){if(this.inputEl&&this.lastFormattedRef&&"function"==typeof this.inputEl.setSelectionRange){const e=function(e,t,n){if(n>=e.length)return t.length;const i=c(e.slice(0,n)).length;let a=0,s=0;for(let e=0;e<t.length;e+=1){if(/\d/.test(t[e])&&(s+=1,s>=i)){a=e+(s===i?1:0);break}a=e+1}return Math.min(a,t.length)}(this.lastFormattedRef,this.displayValue,this.lastCursorRef);this.inputEl.setSelectionRange(e,e),this.lastFormattedRef=""}else this.inputEl&&this.lastFormattedRef&&(this.lastFormattedRef="")}get effectiveCountryCode(){return this.selectedCountry?.countryCode??this.defaultCountry??"US"}get effectiveDialCode(){return this.selectedCountry?.dialCode??"+1"}get isEditable(){return!this.disabled&&!this.readonly}get orderedCountries(){const e=this.preferredCountries||[],t=o.filter((t=>!e.includes(t.countryCode)));return[...e.map((e=>r(e))).filter((e=>void 0!==e)),...t]}get filteredCountries(){const e=this.searchQuery.trim().toLowerCase();return e?this.orderedCountries.filter((t=>t.name.toLowerCase().includes(e)||t.dialCode.includes(e)||t.countryCode.toLowerCase().includes(e))):this.orderedCountries}get displayValue(){return this.nationalNumber?h(this.nationalNumber,this.effectiveCountryCode):""}get effectivePlaceholder(){if(this.placeholder)return this.placeholder;const e=this.selectedCountry;return e?function(e){switch(e){case"US":case"CA":case"MX":default:return"000 000 0000";case"GB":return"0000 000 0000";case"AU":return"0 000 000 000";case"DE":case"AT":case"CH":return"000 0000000";case"FR":return"0 00 00 00 00";case"BR":return"00 00000 0000";case"JP":case"CN":case"KR":return"000 0000 0000";case"IN":return"00000 00000"}}(e.countryCode):""}get dropdownOptions(){return this.filteredCountries.map((e=>({icon:u(e.name),label:`${e.name} (${e.dialCode})`,value:e.countryCode,isSelected:this.selectedCountry?.countryCode===e.countryCode})))}get maxInputLength(){const e=d(this.effectiveCountryCode);return h("9".repeat(e),this.effectiveCountryCode).length}emitValue(){const e=this.nationalNumber?function(e,t){const n=(e.slice(1)+t).replace(/\D/g,"");return n.length?`+${n}`:""}(this.effectiveDialCode,this.nationalNumber):"";this.value=e||void 0,this.valueChange.emit(e||""),this.validate()}validate(){this.hasErrorState=!this.required||this.nationalNumber.trim()?null:"required"}render(){return n(i,{key:"c78f7ab5d5c6f6982356d7610fe32855d7f214c5",class:{"xpl-input-phone":!0,"xpl-input-phone--error":!!this.hasErrorState||!!this.error,"xpl-input-phone--open":this.dropdownOpen,"xpl-input-phone--domestic":!this.isInternational}},n("div",{key:"3b30f8755836376728336f769afeb714b9a3dfa9",class:"xpl-input-wrapper"},this.isInternational&&n("button",{key:"c83ff2255a465d7d5d233ce02a816845858594be",type:"button",id:this.triggerId,class:"xpl-input-phone__trigger",disabled:this.disabled,"aria-haspopup":"listbox","aria-expanded":this.dropdownOpen?"true":"false","aria-label":"Select country",onClick:this.handleTriggerClick},this.selectedCountry?.name&&n("xpl-icon",{key:"f0a62a5052b940f4a2212ed77929696e62b4825f",class:"xpl-input-phone__flag",icon:u(this.selectedCountry.name),size:24,"aria-hidden":"true"}),n("xpl-icon",{key:"68782b949fd1cf41a8b0883ad6caba18d9aa1ac5",class:"xpl-input-phone__trigger-icon",icon:"chevron-down",size:20,"aria-hidden":"true"})),n("div",{key:"6aa5f75f34b413bd8939d46c55b7cc42128db247",class:"xpl-input-phone__input-wrap"},this.isInternational&&n("span",{key:"81dc5727f8dca528f34994736c1a8a2223e8fe63",class:"xpl-input-phone__dial-code"},this.effectiveDialCode),n("input",{key:"d0faecadd4216bf6a7b79fc9623052e194900c15",ref:e=>{this.inputEl=e??void 0},type:"tel",id:this.inputId,class:"xpl-input-phone__input",name:this.name,disabled:this.disabled,readonly:this.readonly,required:this.required,"aria-invalid":this.hasErrorState||this.error?"true":"false",placeholder:this.effectivePlaceholder,autocomplete:this.isInternational?"tel-national":"tel",inputmode:"numeric",maxlength:this.maxInputLength,value:this.displayValue,onInput:this.handleNumberInput}),this.nationalNumber&&this.isEditable&&n("button",{key:"12a2e4ce8adb80ca4d6fca1c706c54db01d22101",type:"button",class:"xpl-input-phone__clear","aria-label":"Clear phone number",onClick:this.handleClear},n("xpl-icon",{key:"f1ae5e69258654e8ba5bf511755020e0d7d91088",icon:"x-circle",size:16})))),this.isInternational&&this.isEditable&&n("xpl-dropdown",{key:"d8a75cf0b95d9affae6e03292c011a73dcff98b4",ref:e=>{this.dropdownRef=e??void 0},isOpen:this.dropdownOpen,triggerId:this.triggerId,anchorToTrigger:!0,closeOnSelect:!0,mode:"single",options:this.dropdownOptions,update:this.handleDropdownUpdate,onIsOpenChange:e=>{this.dropdownOpen=e.detail},"aria-label":"Country"},n("div",{key:"b46a4a9985604720099c3212714804aee5a1f58b",slot:"header",class:"xpl-input-phone__search-wrap"},n("xpl-input",{key:"55bdc0f6ff4b1a1a2d17b5ba10849bcab472d7d8",class:"xpl-input-phone__search",type:"text",label:"",placeholder:"Search",value:this.searchQuery,autocomplete:"off",onInputEvent:e=>{this.searchQuery=e.detail??""}},n("xpl-icon",{key:"af0fd388d39e6d9bcac5a032c7c0cf5f192cc4d3",slot:"pre",class:"xpl-input-phone__search-icon",icon:"magnifier",size:20})))))}get el(){return a(this)}static get watchers(){return{dropdownOpen:[{onDropdownOpenChange:0}],hasErrorState:[{onHasErrorStateChanged:0}],value:[{onValueChange:0}]}}};export{l as xpl_input_phone}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,h as i,H as t,g as s}from"./p-
|
|
1
|
+
import{r as e,h as i,H as t,g as s}from"./p-CJABLO_1.js";import{h as a}from"./p-DkqlawVY.js";const d=[".xpl-nav-header-menu__right-aside-mobile"],h=class{constructor(i){e(this,i),this.rightAsideMobilePresent=!1}connectedCallback(){this.syncRightAsideMobileSlotPresent(),this.connectRightAsideMobileSlotObserver()}disconnectedCallback(){void 0!==this.deferredRightAsideSlotWorkTimeoutId&&(clearTimeout(this.deferredRightAsideSlotWorkTimeoutId),this.deferredRightAsideSlotWorkTimeoutId=void 0),this.disconnectRightAsideMobileSlotObserver()}componentWillLoad(){this.syncRightAsideMobileSlotPresent()}componentWillRender(){this.disconnectRightAsideMobileSlotObserver()}componentDidRender(){this.scheduleDeferredRightAsideSlotWork()}scheduleDeferredRightAsideSlotWork(){void 0!==this.deferredRightAsideSlotWorkTimeoutId&&clearTimeout(this.deferredRightAsideSlotWorkTimeoutId),this.deferredRightAsideSlotWorkTimeoutId=setTimeout((()=>{this.deferredRightAsideSlotWorkTimeoutId=void 0,this.el.isConnected&&(this.syncRightAsideMobileSlotPresent(),this.connectRightAsideMobileSlotObserver())}),0)}connectRightAsideMobileSlotObserver(){this.disconnectRightAsideMobileSlotObserver(),"undefined"!=typeof MutationObserver&&(this.rightAsideMobileSlotObserver=new MutationObserver((()=>{this.scheduleDeferredRightAsideSlotWork()})),this.rightAsideMobileSlotObserver.observe(this.el,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["slot"]}))}disconnectRightAsideMobileSlotObserver(){this.rightAsideMobileSlotObserver?.disconnect(),this.rightAsideMobileSlotObserver=void 0}syncRightAsideMobileSlotPresent(){const e=a(this.el,"right-aside-mobile",{hostTag:"xpl-nav-header-menu",projectionRegionSelectors:d});e!==this.rightAsideMobilePresent&&(this.rightAsideMobilePresent=e)}render(){return i(t,{key:"4f03d42e8b1fb74ed6311b05cf8271347b6d6f54",class:{"xpl-nav-header-menu":!0,"xpl-nav-header-menu--has-right-aside-mobile":this.rightAsideMobilePresent,dark:!0}},(!!this.username||!!this.email)&&i("div",{key:"0efea5710b8f5e96b9a31f41ccb17a3463295739",class:"xpl-nav-header-menu__profile"},i("div",{key:"a23b89cdc2f00e3611303083a062823ece388df3",class:"xpl-nav-header-menu__info"},this.username&&i("div",{key:"755cbf613b70da2238521d26a8221b5cc60f16cb",class:"xpl-nav-header-menu__username",title:this.username},this.username),this.email&&i("div",{key:"34214d815c2558606ed1d8cf1fcd4cd5fd29eb24",class:"xpl-nav-header-menu__email",title:this.email},this.email))),i("div",{key:"59bf60e44aa73fbd785423a387c0e5778c14635e",class:"xpl-nav-header-menu__right-aside-mobile"},i("slot",{key:"48c61e23313d0bbbd6949d98fabe1ba79399e4e9",name:"right-aside-mobile"})),i("div",{key:"12f7bb51b54f217a1fe21cdc7c0af50a5dbc1a6d",class:"xpl-nav-header-menu__slot",role:"list"},i("slot",{key:"3ab8954d96137ab0fcc12eba87e4b381173976f0"})))}get el(){return s(this)}};export{h as xpl_nav_header_menu}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as s,h as e,H as i,g as o}from"./p-CJABLO_1.js";import{a as n,c as a,o as l,f as h,b as c,h as d}from"./p-1M1pu0C2.js";import{i as r}from"./p-Dqb1pIRo.js";const p=4;function f(t){const{offsetPx:s=p,flipFallbackPlacements:e,sizeApply:i}=t;return[l(s),h(e&&e.length>0?{fallbackPlacements:e}:{}),c({apply:i}),d()]}const u={rowHeight:45,overscan:20,virtualizeFrom:200};function m(t,s){const{groupName:i,options:o,subtitle:n,...a}=t;if(i)return e("xpl-dropdown-group",{groupName:i,options:o,...a});const l=void 0!==s;return e("xpl-dropdown-option",{class:l?"xpl-dropdown-option--virtual":void 0,style:l?{transform:`translateY(${s*u.rowHeight}px)`}:void 0,subtitle:n,...a})}const g=class{constructor(e){t(this,e),this.isOpenChange=s(this,"isOpenChange",7),this.virtualEnd=0,this.virtualStart=0,this.isOpen=!1,this.closeOnSelect=!0,this.mode="single",this.anchorToTrigger=!1,this.placement="bottom-start",this.selectOnFocus=!1,this.floating=null,this.virtualScrollRaf=null,this.openAlignmentRaf=null,this.previousOptionCount=0,this.handleClickOutside=({target:t})=>{const{triggerId:s}=this,e=t,i=s?document.getElementById(s):null,o=i?.contains(e),n=this.hostElement.contains(e),a=e?.closest("label"),l=!!a&&!!s&&a.getAttribute("for")===s;n||o||l||!this.isOpen||(this.isOpen=!1)},this.handleKeyDown=t=>{"Escape"===t.key&&this.isOpen&&(this.isOpen=!1)},this.handleVirtualScroll=()=>{null===this.virtualScrollRaf&&(this.virtualScrollRaf=requestAnimationFrame((()=>{this.virtualScrollRaf=null,this.updateVirtualRange()})))},this.setListEl=t=>{t!==this.listEl&&(this.listEl=t,this.listResizeObserver?.disconnect(),t&&"undefined"!=typeof ResizeObserver&&(this.listResizeObserver??(this.listResizeObserver=new ResizeObserver((()=>{this.isVirtualized&&this.handleVirtualScroll()}))),this.listResizeObserver.observe(t)))},this.scheduleOpenAlignment=()=>{null===this.openAlignmentRaf&&(this.openAlignmentRaf=requestAnimationFrame((()=>{this.openAlignmentRaf=null,this.scrollSelectedIntoView(),this.updateVirtualRange()})))}}onOptionsChanged(){const t=this.options?.length??0,s=t!==this.previousOptionCount;if(this.previousOptionCount=t,!this.isVirtualized)return this.virtualStart=0,void(this.virtualEnd=0);const e=this.listEl;if(e){const i=Math.max(0,t*u.rowHeight-e.clientHeight);if(e.scrollTop>i&&(e.scrollTop=i),this.isOpen&&s){const t=this.options?.findIndex((t=>t.isSelected))??-1;t>=0&&(t<this.virtualStart||t>=this.virtualEnd)&&this.scrollSelectedIntoView()}}this.updateVirtualRange()}onAnchorToTriggerChanged(){this.isOpen&&this.startPositioning()}onFlipFallbackPlacementsChanged(){this.isOpen&&this.anchorToTrigger&&this.startPositioning()}onPlacementChanged(){this.isOpen&&this.anchorToTrigger&&this.startPositioning()}onTriggerIdChanged(){this.isOpen&&this.startPositioning()}onSelectedValuesChanged(t,s=!1){if(this.options&&this.options.length>0){this.options.flatMap((t=>t.groupName&&t.options?t.options:[t])).forEach((s=>{const e=s.value||s.label||"";if("single"===this.mode)s.isSelected=e===t;else{const i=Array.isArray(t)?t:[];s.isSelected=i.includes(e)}}));const e=t=>(t.options=t.groupName?t.options?.map(e):void 0,t);this.options=this.options.map(e),this.update&&!s&&this.update(null,{component:this})}}onIsOpenStateChange(t){this.isOpenChange.emit(t),t?(this.startPositioning(),this.alignOnOpen()):(this.stopPositioning(),this.cancelVirtualScroll(),this.virtualStart=0,this.virtualEnd=0)}connectedCallback(){r()&&(document.addEventListener("mousedown",this.handleClickOutside),document.addEventListener("keydown",this.handleKeyDown))}disconnectedCallback(){document.removeEventListener("mousedown",this.handleClickOutside),document.removeEventListener("keydown",this.handleKeyDown),this.stopPositioning(),this.cancelVirtualScroll(),this.listResizeObserver?.disconnect()}componentWillLoad(){this.handleSelect=this.handleSelect.bind(this),this.selectedValues&&this.onSelectedValuesChanged(this.selectedValues,!0),this.previousOptionCount=this.options?.length??0}componentDidLoad(){this.isOpen&&(this.startPositioning(),this.alignOnOpen())}async handleSelect(t,{component:s}){const{hostElement:e,mode:i,options:o,update:n}=this,a="single"===i,l="multi"===i;if(o){const t=s.hostElement.value||s.hostElement.label;if(o.some((t=>t.groupName))){o.flatMap((t=>t.groupName&&t.options?t.options:[t])).forEach((e=>{const i=(e.value||e.label)===t;a?(e.isSelected=i,s.hostElement.isSelected=!0):l&&i&&(e.isSelected=!e.isSelected,s.hostElement.isSelected=e.isSelected)}));const e=t=>(t.options=t.groupName?t.options?.map(e):void 0,t);this.options=o.map(e)}else o.forEach((e=>{const i=(e.value||e.label)===t;a?(e.isSelected=i,i&&(s.hostElement.isSelected=!0)):l&&i&&(e.isSelected=!e.isSelected,s.hostElement.isSelected=e.isSelected)})),this.options=[...o]}else a?Array.from(e.querySelectorAll("xpl-dropdown-option")).forEach((t=>{t.isSelected=t===s.hostElement})):l&&(s.isSelected=!s.isSelected);n&&n(t,{component:this})}startPositioning(){if(!this.anchorToTrigger||!this.triggerId)return;const t=document.getElementById(this.triggerId);t&&(this.stopPositioning(),this.floating=function(t,s,e){if(!r())return{update:async()=>{},stop:()=>{}};const{placement:i,strategy:o,middleware:l,onPosition:h,onReferenceHidden:c,onError:d}=e;let p=0,f=null,u=!0;const m=async()=>{if(!u)return;const e=p;try{const n=await a(t,s,{placement:i,strategy:o,middleware:l});if(!u||e!==p)return;if(n.middlewareData.hide?.referenceHidden&&!0===c?.())return;h(n)}catch(t){if(!u||e!==p)return;d?.(t)}};return f=n(t,s,m),{update:m,stop:()=>{u=!1,p+=1,f&&(f(),f=null)}}}(t,this.hostElement,{placement:this.placement,strategy:"fixed",middleware:f({flipFallbackPlacements:this.flipFallbackPlacements,sizeApply:({availableHeight:t,rects:s})=>{const e=this.hostElement.querySelector(".xpl-dropdown-list");let i=0;if(e){const t=Array.from(this.hostElement.children),s=t.indexOf(e);t.slice(0,s).forEach((t=>{t instanceof HTMLElement&&(i+=t.offsetHeight)}))}const o=getComputedStyle(this.hostElement),n=parseFloat(o.paddingTop)+parseFloat(o.paddingBottom)+parseFloat(o.borderTopWidth)+parseFloat(o.borderBottomWidth),a=e?parseFloat(getComputedStyle(e).getPropertyValue("--xpl-dropdown-list-max-height")):1/0,l=Math.min(a,Math.max(0,t-i-n));Object.assign(this.hostElement.style,{width:`${s.reference.width}px`}),e&&(e.style.maxHeight=`${l}px`)}}),onPosition:({x:t,y:s,placement:e})=>{if(!this.floating)return;const i="top"===e.split("-")[0];Object.assign(this.hostElement.style,{left:`${t}px`,top:`${s}px`}),this.hostElement.classList.toggle("xpl-dropdown--above",i),this.hostElement.classList.toggle("xpl-dropdown--below",!i)},onReferenceHidden:()=>(this.isOpen=!1,!0)}))}stopPositioning(){this.floating?.stop(),this.floating=null,this.hostElement.style.left="",this.hostElement.style.top="",this.hostElement.style.width="",this.hostElement.querySelector(".xpl-dropdown-list")?.style.removeProperty("max-height"),this.hostElement.classList.remove("xpl-dropdown--above","xpl-dropdown--below")}cancelVirtualScroll(){null!==this.virtualScrollRaf&&(cancelAnimationFrame(this.virtualScrollRaf),this.virtualScrollRaf=null),null!==this.openAlignmentRaf&&(cancelAnimationFrame(this.openAlignmentRaf),this.openAlignmentRaf=null)}alignOnOpen(){this.scrollSelectedIntoView(),this.updateVirtualRange(),this.scheduleOpenAlignment()}scrollSelectedIntoView(){const{listEl:t,options:s}=this;if(!t||!s?.length||!this.isVirtualized)return;const e=s.findIndex((t=>t.isSelected));if(e<0)return;const{rowHeight:i}=u,o=e*i-(t.clientHeight-i)/2,n=Math.max(0,s.length*i-t.clientHeight);t.scrollTop=Math.max(0,Math.min(o,n))}updateVirtualRange(){const t=this.listEl,s=this.options?.length??0;if(!t||!s)return;const{rowHeight:e,overscan:i}=u,o=Math.floor(t.scrollTop/e),n=Math.ceil(t.clientHeight/e)||1,a=Math.max(0,o-i),l=Math.min(s,o+n+i);a===this.virtualStart&&l===this.virtualEnd||(this.virtualStart=a,this.virtualEnd=l)}get isVirtualized(){const{options:t}=this;return!!t&&t.length>u.virtualizeFrom&&t.every((t=>!t.groupName&&!t.subtitle))}render(){const{isOpen:t,mode:s,options:o}=this,n=this.isVirtualized;let a;if(o&&o.length)if(n){const{rowHeight:t,overscan:s}=u,i=o.length,n=Math.min(this.virtualStart,i),l=Math.min(i,Math.ceil(300/t)+2*s);a=e("li",{key:"8430b65a3af7d86f95d4e5f7097fdd54c5d26b57",class:"xpl-dropdown__virtual-sizer",style:{height:i*t+"px"}},o.slice(n,this.virtualEnd>n?this.virtualEnd:l).map(((t,s)=>m(t,n+s))))}else a=o.map((t=>m(t)));else a=e("slot",{key:"1d251963757071def866eb219bb3a33f3bc6df5c",name:"options"});return e(i,{key:"7a3687087564c55a008fd1bd2fece17c1dfb23dd","aria-expanded":t?"true":"false",class:{"xpl-dropdown":!0,"xpl-dropdown--multi":"multi"===s,"xpl-dropdown--open":t,"xpl-dropdown--anchor-to-trigger":this.anchorToTrigger,"xpl-dropdown--virtualized":n},role:"listbox"},e("slot",{key:"46caefc7c1f62c63c45340ade0b1586c9ad64238",name:"header"}),e("ul",{key:"40c83a3f32bceec5814fd95fc6d0256a729c86ce",class:"xpl-dropdown-list",ref:t=>{this.setListEl(t)},onScroll:n?this.handleVirtualScroll:void 0},a))}get hostElement(){return o(this)}static get watchers(){return{options:[{onOptionsChanged:0}],anchorToTrigger:[{onAnchorToTriggerChanged:0}],flipFallbackPlacements:[{onFlipFallbackPlacementsChanged:0}],placement:[{onPlacementChanged:0}],triggerId:[{onTriggerIdChanged:0}],selectedValues:[{onSelectedValuesChanged:0}],isOpen:[{onIsOpenStateChange:0}]}}},b=class{constructor(s){t(this,s)}render(){const{groupName:t,options:s}=this,o=s&&s.length&&s.map((({groupName:t,...s})=>t?e("xpl-dropdown-group",{label:t,...s}):e("xpl-dropdown-option",{...s})));return e(i,{key:"c9a5ff35e59c6d64fb3b2bdf8d8e9381f53f843b",role:"group","aria-label":t},e("li",{key:"610646a5285bbda17ad9ef1a77abd8ccff657676",class:"xpl-dropdown-list-item"},e("xpl-dropdown-heading",{key:"6daa3fa23425eae46c2d85370523af456c2dced3",label:t}),e("ul",{key:"0409673dbab16cd5fc72c5f7a50d23c531d91d66",class:"xpl-dropdown-list"},o||e("slot",{key:"19d7a3d59640af4759076e90c055556fa4a90f5f",name:"options"}))))}},w=class{constructor(s){t(this,s)}render(){return e(i,{key:"06a117cb42389f17449401733d384b6669c39859",class:{"xpl-dropdown-heading":!0},role:"presentation"},e("span",{key:"58262cf943e31880cf1d942af06dfefaa380cf8b"},this.label||e("slot",{key:"3e0081cc6c9fc738f4d14c9f9838a8cff2c01b21",name:"heading"})))}},x=class{constructor(s){t(this,s),this.dropdown=null}componentWillLoad(){this.dropdown=this.hostElement.closest("xpl-dropdown")}handleClick(t){if(!this.dropdown)return;const{closeOnSelect:s,mode:e}=this.dropdown;t.x&&t.y&&(this.dropdown.handleSelect(t,{component:this}),"single"===e&&s&&(this.dropdown.isOpen=!1))}handleKeyup(t){if(!this.dropdown)return;const{dropdown:s}=this,{closeOnSelect:e,mode:i,selectOnFocus:o}=this.dropdown;if(o&&["ArrowDown","ArrowLeft","ArrowRight","ArrowUp","Tab"].includes(t.key)){const{activeElement:o}=document,n=o?.closest("xpl-dropdown-option")??null;return s.handleSelect(t,{component:{hostElement:n}}),void("single"===i&&e&&(this.dropdown.isOpen=!1))}["Escape","Enter"].includes(t.key)&&(s.handleSelect(t,{component:this}),("Escape"===t.key||this.dropdown.closeOnSelect&&"Enter"===t.key)&&(this.dropdown.isOpen=!1))}connectedCallback(){this.hostElement.addEventListener("click",this.handleClick.bind(this)),this.hostElement.addEventListener("keyup",this.handleKeyup.bind(this))}disconnectedCallback(){this.hostElement.removeEventListener("click",this.handleClick),this.hostElement.removeEventListener("keyup",this.handleKeyup)}render(){const{label:t,isSelected:s,isDisabled:o,value:n,subtitle:a,icon:l}=this;return e(i,{key:"cc7bdfecd0354f3b1f9080535e3014d946a697c4",class:{"xpl-dropdown-option":!0,"xpl-dropdown-option--disabled":!!o,"xpl-dropdown-option--selected":!!s},role:"option","aria-checked":s,"aria-disabled":o,"aria-selected":s,value:n},e("li",{key:"4ef95d229611225a2019d0d8871b81f2ae603b6a",class:"xpl-dropdown-list-item"},l&&e("xpl-icon",{key:"e8380b63e1aac6fb00e36ae565147edfd4588415",class:"xpl-dropdown-list-item__icon",icon:l,size:20}),t||e("slot",{key:"0c040b57a16cd9b2e9fbf18d04dd1cde215f81b1",name:"option"}),a&&e("span",{key:"f8518da421611e4f3e72f28f38ac294bca9e9aad",class:"xpl-dropdown-list-item__subtitle"},a)))}get hostElement(){return o(this)}};export{g as xpl_dropdown,b as xpl_dropdown_group,w as xpl_dropdown_heading,x as xpl_dropdown_option}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as e,H as s}from"./p-CJABLO_1.js";const i=class{constructor(e){t(this,e),this.disabled=!1,this.selected=!1,this.isDisabled=!1}componentWillLoad(){this.isDisabled=this.disabled}componentDidLoad(){this.updateRowCellsDisabledState()}componentDidUpdate(){this.updateRowCellsDisabledState()}updateRowCellsDisabledState(){(this.hostElement?.querySelectorAll("xpl-dynamic-table-cell")??[]).forEach((t=>{t.disabled=this.isDisabled}))}render(){return e(s,{key:"94044631c91c393c734c437ff74f182fdeb950dd",role:"row",class:`xpl-dynamic-table-row\n ${this.isDisabled?"disabled":""}\n ${this.selected?"selected":""}`,ref:t=>{this.hostElement=t??void 0}},e("slot",{key:"182eabc2d78e66cd92cff945b814b32d734ef326"}))}};export{i as xpl_dynamic_table_row}
|