@xplortech/apollo-core 2.9.0 → 2.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.typings/apollo-components.html-data.json +55 -14
- package/build/style.css +2338 -1902
- package/dist/apollo-core/apollo-core.css +26 -24
- package/dist/apollo-core/apollo-core.esm.js +1 -1
- package/dist/apollo-core/{p-6a15f1e0.entry.js → p-048fdde0.entry.js} +1 -1
- package/dist/apollo-core/{p-34438721.entry.js → p-0abc496e.entry.js} +1 -1
- package/dist/apollo-core/p-1442c052.entry.js +1 -0
- package/dist/apollo-core/{p-3bb14840.entry.js → p-1e498763.entry.js} +1 -1
- package/dist/apollo-core/p-26c3a508.entry.js +1 -0
- package/dist/apollo-core/{p-36ba29da.entry.js → p-3b8639b7.entry.js} +1 -1
- package/dist/apollo-core/p-4ce52107.entry.js +1 -0
- package/dist/apollo-core/p-6710fb29.entry.js +1 -0
- package/dist/apollo-core/p-7e622809.entry.js +1 -0
- package/dist/apollo-core/p-87068144.entry.js +1 -0
- package/dist/apollo-core/p-BUgtURvw.js +1 -0
- package/dist/apollo-core/p-CK3_k8jD.js +1 -0
- package/dist/apollo-core/p-CXkZUm1c.js +2 -0
- package/dist/apollo-core/p-a3b4820a.entry.js +1 -0
- package/dist/apollo-core/p-b2d6dd0e.entry.js +1 -0
- package/dist/apollo-core/{p-ca127ee8.entry.js → p-bd2249ef.entry.js} +1 -1
- package/dist/apollo-core/p-c96b7957.entry.js +1 -0
- package/dist/apollo-core/p-d6be63cd.entry.js +1 -0
- package/dist/apollo-core/{p-b61d7952.entry.js → p-ddf76cee.entry.js} +1 -1
- package/dist/apollo-core/p-f0554edd.entry.js +1 -0
- package/dist/cjs/apollo-core.cjs.js +3 -3
- package/dist/cjs/{index-BQ97-AWw.js → index-BaXVr8ux.js} +40 -9
- package/dist/cjs/lifecycle-Bf3QwiVa.js +70 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/package.json +3 -0
- package/dist/cjs/v4-_2BfiRUa.js +52 -0
- package/dist/cjs/xpl-accordion.cjs.entry.js +3 -3
- package/dist/cjs/xpl-application-shell.cjs.entry.js +2 -2
- package/dist/cjs/xpl-avatar_54.cjs.entry.js +879 -306
- package/dist/cjs/xpl-button-row.cjs.entry.js +2 -2
- package/dist/cjs/xpl-calendar.cjs.entry.js +3 -3
- package/dist/cjs/xpl-dynamic-table-cell.cjs.entry.js +3 -3
- package/dist/cjs/xpl-dynamic-table-row.cjs.entry.js +3 -3
- package/dist/cjs/xpl-dynamic-table.cjs.entry.js +2 -2
- package/dist/cjs/xpl-grid-item.cjs.entry.js +2 -2
- package/dist/cjs/xpl-grid.cjs.entry.js +2 -2
- package/dist/cjs/xpl-large-card.cjs.entry.js +2 -2
- package/dist/cjs/xpl-main-nav.cjs.entry.js +2 -2
- package/dist/cjs/xpl-table-header-cell.cjs.entry.js +1 -1
- package/dist/cjs/xpl-table-header.cjs.entry.js +2 -2
- package/dist/cjs/xpl-toggle.cjs.entry.js +5 -5
- package/dist/cjs/xpl-toolbar.cjs.entry.js +3 -3
- package/dist/cjs/xpl-top-nav-menu.cjs.entry.js +97 -0
- package/dist/collection/collection-manifest.json +7 -6
- package/dist/collection/components/xpl-accordion/xpl-accordion.js +2 -2
- package/dist/collection/components/xpl-application-shell/xpl-application-shell.js +1 -1
- package/dist/collection/components/xpl-backdrop/xpl-backdrop.js +1 -1
- package/dist/collection/components/xpl-badge/xpl-badge.js +1 -1
- package/dist/collection/components/xpl-banner/banner.stories.js +5 -0
- package/dist/collection/components/xpl-banner/xpl-banner.js +2 -2
- package/dist/collection/components/xpl-breadcrumbs/xpl-breadcrumb-item/xpl-breadcrumb-item.js +1 -1
- package/dist/collection/components/xpl-breadcrumbs/xpl-breadcrumbs/xpl-breadcrumbs.js +1 -1
- package/dist/collection/components/xpl-button/button.stories.js +5 -0
- package/dist/collection/components/xpl-button/xpl-button.js +1 -1
- package/dist/collection/components/xpl-button-row/button-row.stories.js +1 -11
- package/dist/collection/components/xpl-button-row/xpl-button-row.js +1 -1
- package/dist/collection/components/xpl-calendar/xpl-calendar.js +1 -1
- package/dist/collection/components/xpl-checkbox/xpl-checkbox.js +4 -4
- package/dist/collection/components/xpl-choicelist/xpl-choicelist.js +1 -1
- package/dist/collection/components/xpl-content-area/xpl-content-area.js +1 -1
- package/dist/collection/components/xpl-dashboard/xpl-dashboard.js +1 -1
- package/dist/collection/components/xpl-data-card/xpl-data-card.js +2 -2
- package/dist/collection/components/xpl-divider/xpl-divider.js +1 -1
- package/dist/collection/components/xpl-dropdown/xpl-dropdown-group/xpl-dropdown-group.js +1 -1
- package/dist/collection/components/xpl-dropdown/xpl-dropdown-heading/xpl-dropdown-heading.js +1 -1
- package/dist/collection/components/xpl-dropdown/xpl-dropdown-option/xpl-dropdown-option.js +2 -2
- package/dist/collection/components/xpl-dropdown/xpl-dropdown.js +208 -31
- package/dist/collection/components/xpl-dynamic-table/xpl-dynamic-table.js +1 -1
- package/dist/collection/components/xpl-dynamic-table-cell/xpl-dynamic-table-cell.js +2 -2
- package/dist/collection/components/xpl-dynamic-table-row/xpl-dynamic-table-row.js +2 -2
- package/dist/collection/components/xpl-grid/xpl-grid.js +1 -1
- package/dist/collection/components/xpl-grid-item/xpl-grid-item.js +1 -1
- package/dist/collection/components/xpl-header-accordion/xpl-header-accordion.js +1 -1
- package/dist/collection/components/xpl-icon/xpl-icon.js +2 -2
- package/dist/collection/components/xpl-input/input.stories.js +1 -1
- package/dist/collection/components/xpl-input/xpl-input-color/xpl-input-color.js +8 -8
- package/dist/collection/components/xpl-input/xpl-input-date/xpl-input-date.js +3 -3
- package/dist/collection/components/xpl-input/xpl-input-file/xpl-input-file.js +4 -4
- package/dist/collection/components/xpl-input/xpl-input-phone/xpl-input-phone.js +25 -6
- package/dist/collection/components/xpl-input/xpl-input-search/xpl-input-search.js +1 -1
- package/dist/collection/components/xpl-input/xpl-input-time/xpl-input-time.js +2 -2
- package/dist/collection/components/xpl-input/xpl-input.js +3 -3
- package/dist/collection/components/xpl-large-card/xpl-large-card.js +1 -1
- package/dist/collection/components/xpl-list/xpl-list.js +2 -2
- package/dist/collection/components/xpl-main-nav/xpl-main-nav.js +1 -1
- package/dist/collection/components/xpl-modal/xpl-modal.js +4 -1
- package/dist/collection/components/xpl-nav-item/xpl-nav-item.js +2 -2
- package/dist/collection/components/xpl-pagination/xpl-pagination.js +26 -8
- package/dist/collection/components/xpl-panel/xpl-panel.js +2 -2
- package/dist/collection/components/xpl-popover/popover.stories.js +3 -7
- package/dist/collection/components/xpl-popover/xpl-popover.js +4 -4
- package/dist/collection/components/xpl-progress-bar/xpl-progress-bar.js +2 -2
- package/dist/collection/components/xpl-progress-indicator/xpl-progress-indicator.js +1 -1
- package/dist/collection/components/xpl-radio/radio.stories.js +19 -17
- package/dist/collection/components/xpl-radio/xpl-radio.js +3 -3
- package/dist/collection/components/xpl-secondary-nav/xpl-secondary-nav.js +1 -1
- package/dist/collection/components/xpl-select/xpl-select.js +16 -11
- package/dist/collection/components/xpl-side-nav/side-nav-constants.js +2 -0
- package/dist/collection/components/xpl-side-nav/side-nav.stories.js +301 -186
- package/dist/collection/components/xpl-side-nav/xpl-side-nav-item/xpl-side-nav-item.js +80 -14
- package/dist/collection/components/xpl-side-nav/xpl-side-nav.js +284 -3
- package/dist/collection/components/xpl-skeleton/xpl-skeleton.js +1 -1
- package/dist/collection/components/xpl-slideout/xpl-slideout.js +1 -1
- package/dist/collection/components/xpl-spotlight/xpl-spotlight.js +14 -4
- package/dist/collection/components/xpl-tab-panel/xpl-tab-panel.js +2 -2
- package/dist/collection/components/xpl-table/xpl-table.js +13 -22
- package/dist/collection/components/xpl-table-header/xpl-table-header.js +1 -1
- package/dist/collection/components/xpl-tabs/xpl-tabs.js +5 -5
- package/dist/collection/components/xpl-tag/xpl-tag.js +2 -2
- package/dist/collection/components/xpl-toast/xpl-toast.js +2 -2
- package/dist/collection/components/xpl-toggle/xpl-toggle.js +3 -3
- package/dist/collection/components/xpl-toolbar/xpl-toolbar.js +2 -2
- package/dist/collection/components/xpl-tooltip/tooltip-arrow.js +1 -1
- package/dist/collection/components/xpl-tooltip/tooltip.stories.js +6 -37
- package/dist/collection/components/xpl-tooltip/xpl-tooltip.js +1 -1
- package/dist/collection/components/xpl-top-nav/top-nav-constants.js +1 -0
- package/dist/collection/components/xpl-top-nav/top-nav.stories.js +131 -11
- 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/top-nav-item-constants.js +2 -0
- package/dist/collection/components/xpl-top-nav/xpl-top-nav-item/xpl-top-nav-item.js +305 -85
- package/dist/collection/components/xpl-top-nav/xpl-top-nav-menu/xpl-top-nav-menu.js +119 -0
- package/dist/collection/components/xpl-top-nav/xpl-top-nav.js +11 -5
- package/dist/collection/components/xpl-utility-bar/xpl-utility-bar.js +1 -1
- package/dist/collection/utils/lifecycle.js +18 -0
- package/dist/components/index.d.ts +143 -12
- package/dist/components/index.js +1 -1
- package/dist/components/p-2xGSxBGa.js +1 -0
- package/dist/components/p-B8RYNiz-.js +1 -0
- package/dist/components/p-BDWXBWGE.js +1 -0
- package/dist/components/p-BJqNuBZr.js +1 -0
- package/dist/components/p-BT_Lq3Vd.js +1 -0
- package/dist/components/p-BUgtURvw.js +1 -0
- package/dist/components/{xpl-input-search2.js → p-B_sq_SAX.js} +1 -1
- package/dist/components/p-Bsy-VVS5.js +1 -0
- package/dist/components/p-BxHFEnPN.js +1 -0
- package/dist/components/p-ByJRw26d.js +1 -0
- package/dist/components/p-C5_Yo0ZP.js +1 -0
- package/dist/components/p-C8rmEAx6.js +1 -0
- package/dist/components/p-CF_YTx16.js +1 -0
- package/dist/components/{floating-ui.dom.js → p-CFpsSZyr.js} +1 -1
- package/dist/components/p-CK3_k8jD.js +1 -0
- package/dist/components/p-CUYkG-PB.js +1 -0
- package/dist/components/p-CaW0fL0P.js +1 -0
- package/dist/components/p-CuisR8WP.js +1 -0
- package/dist/components/p-CzwViN3U.js +1 -0
- package/dist/components/p-D2SFagIb.js +1 -0
- package/dist/components/p-DKUNbsb0.js +1 -0
- package/dist/components/p-DcXL24UI.js +1 -0
- package/dist/components/p-Dp3H99Yc.js +1 -0
- package/dist/components/p-M900WO1C.js +1 -0
- package/dist/components/{xpl-tag2.js → p-ZTFt9sBy.js} +1 -1
- package/dist/components/p-gfb3l9Pr.js +1 -0
- package/dist/components/{xpl-input-file2.js → p-h1Gbk5lO.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-item.js +1 -1
- package/dist/components/xpl-side-nav.js +1 -1
- package/dist/components/xpl-skeleton.js +1 -1
- package/dist/components/xpl-slideout.js +1 -1
- package/dist/components/xpl-spotlight.js +1 -1
- package/dist/components/xpl-tab-panel.js +1 -1
- package/dist/components/xpl-tab.js +1 -1
- package/dist/components/xpl-table-header-cell.js +1 -1
- package/dist/components/xpl-table-header.js +1 -1
- package/dist/components/xpl-table.js +1 -1
- package/dist/components/xpl-tabs.js +1 -1
- package/dist/components/xpl-tag.js +1 -1
- package/dist/components/xpl-toast.js +1 -1
- package/dist/components/xpl-toggle.js +1 -1
- package/dist/components/xpl-toolbar.js +1 -1
- package/dist/components/xpl-tooltip.js +1 -1
- package/dist/components/xpl-top-nav-item.js +1 -1
- package/dist/components/xpl-top-nav-menu.d.ts +11 -0
- package/dist/components/xpl-top-nav-menu.js +1 -0
- package/dist/components/xpl-top-nav.js +1 -1
- package/dist/components/xpl-utility-bar.js +1 -1
- package/dist/docs/xpl-backdrop/readme.md +2 -0
- package/dist/docs/xpl-badge/readme.md +34 -0
- package/dist/docs/xpl-button/readme.md +2 -0
- package/dist/docs/xpl-button-row/readme.md +13 -0
- package/dist/docs/xpl-checkbox/readme.md +23 -1
- package/dist/docs/xpl-divider/readme.md +22 -4
- package/dist/docs/xpl-icon/readme.md +2 -0
- package/dist/docs/xpl-input/readme.md +51 -0
- package/dist/docs/xpl-input/xpl-input-date/readme.md +7 -0
- package/dist/docs/xpl-input/xpl-input-phone/readme.md +21 -0
- package/dist/docs/xpl-popover/readme.md +24 -0
- package/dist/docs/xpl-radio/readme.md +21 -4
- package/dist/docs/xpl-side-nav/readme.md +153 -5
- package/dist/docs/xpl-side-nav/xpl-side-nav-item/readme.md +165 -32
- package/dist/docs/xpl-table/readme.md +2 -0
- package/dist/docs/xpl-tooltip/readme.md +29 -1
- package/dist/docs/xpl-top-nav/readme.md +3 -0
- package/dist/docs/xpl-top-nav/xpl-top-nav-item/readme.md +79 -20
- package/dist/docs/xpl-top-nav/xpl-top-nav-menu/readme.md +96 -0
- package/dist/esm/apollo-core.js +4 -4
- package/dist/esm/{index-C7bgJs6C.js → index-CXkZUm1c.js} +40 -9
- package/dist/esm/lifecycle-BUgtURvw.js +68 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/v4-CK3_k8jD.js +50 -0
- package/dist/esm/xpl-accordion.entry.js +3 -3
- package/dist/esm/xpl-application-shell.entry.js +2 -2
- package/dist/esm/xpl-avatar_54.entry.js +878 -305
- package/dist/esm/xpl-button-row.entry.js +2 -2
- package/dist/esm/xpl-calendar.entry.js +3 -3
- package/dist/esm/xpl-dynamic-table-cell.entry.js +3 -3
- package/dist/esm/xpl-dynamic-table-row.entry.js +3 -3
- package/dist/esm/xpl-dynamic-table.entry.js +2 -2
- package/dist/esm/xpl-grid-item.entry.js +2 -2
- package/dist/esm/xpl-grid.entry.js +2 -2
- package/dist/esm/xpl-large-card.entry.js +2 -2
- package/dist/esm/xpl-main-nav.entry.js +2 -2
- package/dist/esm/xpl-table-header-cell.entry.js +1 -1
- package/dist/esm/xpl-table-header.entry.js +2 -2
- package/dist/esm/xpl-toggle.entry.js +5 -5
- package/dist/esm/xpl-toolbar.entry.js +3 -3
- package/dist/esm/xpl-top-nav-menu.entry.js +95 -0
- package/dist/types/components/xpl-banner/banner.stories.d.ts +2 -0
- package/dist/types/components/xpl-button/button.stories.d.ts +2 -0
- package/dist/types/components/xpl-dropdown/xpl-dropdown.d.ts +16 -0
- package/dist/types/components/xpl-input/xpl-input-phone/xpl-input-phone.d.ts +1 -0
- package/dist/types/components/xpl-pagination/xpl-pagination.d.ts +4 -0
- package/dist/types/components/xpl-radio/radio.stories.d.ts +11 -10
- package/dist/types/components/xpl-side-nav/side-nav-constants.d.ts +2 -0
- package/dist/types/components/xpl-side-nav/side-nav.stories.d.ts +53 -32
- package/dist/types/components/xpl-side-nav/xpl-side-nav-item/xpl-side-nav-item.d.ts +10 -0
- package/dist/types/components/xpl-side-nav/xpl-side-nav.d.ts +31 -0
- package/dist/types/components/xpl-spotlight/xpl-spotlight.d.ts +1 -0
- package/dist/types/components/xpl-top-nav/top-nav-constants.d.ts +1 -0
- package/dist/types/components/xpl-top-nav/top-nav.stories.d.ts +70 -1
- package/dist/types/components/xpl-top-nav/xpl-top-nav-item/top-nav-item-constants.d.ts +2 -0
- package/dist/types/components/xpl-top-nav/xpl-top-nav-item/xpl-top-nav-item.d.ts +23 -4
- package/dist/types/components/xpl-top-nav/xpl-top-nav-menu/xpl-top-nav-menu.d.ts +18 -0
- package/dist/types/components/xpl-top-nav/xpl-top-nav.d.ts +1 -0
- package/dist/types/components.d.ts +402 -39
- package/dist/types/stencil-public-runtime.d.ts +1 -0
- package/dist/types/utils/lifecycle.d.ts +3 -0
- package/package.json +53 -34
- package/dist/apollo-core/p-0bf50890.entry.js +0 -1
- package/dist/apollo-core/p-1947e7a8.entry.js +0 -1
- package/dist/apollo-core/p-27928cb0.entry.js +0 -1
- package/dist/apollo-core/p-35c2f72d.entry.js +0 -1
- package/dist/apollo-core/p-368c81f1.entry.js +0 -1
- package/dist/apollo-core/p-406b27a8.entry.js +0 -1
- package/dist/apollo-core/p-5d63b4ce.entry.js +0 -1
- package/dist/apollo-core/p-8d692d05.entry.js +0 -1
- package/dist/apollo-core/p-C7bgJs6C.js +0 -2
- package/dist/apollo-core/p-Cqlsd6nf.js +0 -1
- package/dist/apollo-core/p-cd56a3d5.entry.js +0 -1
- package/dist/apollo-core/p-dc205893.entry.js +0 -1
- package/dist/cjs/v4-D4KzFnn8.js +0 -67
- package/dist/components/index3.js +0 -1
- package/dist/components/v4.js +0 -1
- package/dist/components/xpl-avatar2.js +0 -1
- package/dist/components/xpl-backdrop2.js +0 -1
- package/dist/components/xpl-badge2.js +0 -1
- package/dist/components/xpl-button2.js +0 -1
- package/dist/components/xpl-checkbox2.js +0 -1
- package/dist/components/xpl-divider2.js +0 -1
- package/dist/components/xpl-dropdown-group2.js +0 -1
- package/dist/components/xpl-dropdown-heading2.js +0 -1
- package/dist/components/xpl-dropdown-option2.js +0 -1
- package/dist/components/xpl-dropdown2.js +0 -1
- package/dist/components/xpl-icon2.js +0 -1
- package/dist/components/xpl-input-date2.js +0 -1
- package/dist/components/xpl-input2.js +0 -1
- package/dist/components/xpl-list-item2.js +0 -1
- package/dist/components/xpl-popover2.js +0 -1
- package/dist/components/xpl-radio2.js +0 -1
- package/dist/components/xpl-select2.js +0 -1
- package/dist/components/xpl-tooltip2.js +0 -1
- package/dist/components/xpl-top-nav-item2.js +0 -1
- package/dist/esm/v4-Cqlsd6nf.js +0 -65
- /package/dist/components/{_commonjsHelpers.js → p-BFTU3MAI.js} +0 -0
- /package/dist/components/{index2.js → p-CH4yJ6Qx.js} +0 -0
- /package/dist/components/{tab-a11y-ids.js → p-Yj_QFaRn.js} +0 -0
- /package/dist/{index.cjs.js → index.cjs} +0 -0
- /package/loader/{cdn.js → cdn.cjs} +0 -0
- /package/loader/{index.cjs.js → index.cjs} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as e,H as s,h as t,c as a,t as d}from"./p-BT_Lq3Vd.js";const i={success:"green",warning:"yellow",inactive:"gray",error:"red"},l=e(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.bordered=!1,this.dotOnly=!1,this.shape="rounded",this.size="default",this.variant="purple"}get resolvedVariant(){var e;return null!==(e=i[this.variant])&&void 0!==e?e:this.variant}render(){return t(a,{key:"3a2ab519bb627a1e46bc7686c6aafdcb3c789822"},t("div",{key:"e9ebf0d6a9a6a6f516065ceb969aca5f68cbb3ee",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}},t("span",{key:"1bd6735a1a67a9720424833a213fcde9e5e6db46",class:"xpl-badge__label"},t("slot",{key:"397cb4768204c4b4a2dd7cd85534270a165776d8"}))))}},[260,"xpl-badge",{bordered:[4],dot:[4],dotOnly:[4,"dot-only"],shape:[1],size:[1],variant:[1]}]);function r(){"undefined"!=typeof customElements&&["xpl-badge"].forEach((e=>{"xpl-badge"===e&&(customElements.get(d(e))||customElements.define(d(e),l))}))}export{l as B,r as d}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as e,H as s,h as t,t as c,c as a}from"./p-BT_Lq3Vd.js";const r=e(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.relative=!1}render(){return t(a,{key:"7d5a73e7d7927828e0cb1a7cdca6648c4512cc5a",class:{"xpl-backdrop":!0,"xpl-backdrop--fixed":!this.relative,"xpl-backdrop--relative":this.relative},"aria-hidden":"true"})}},[0,"xpl-backdrop",{relative:[4]}]);function d(){"undefined"!=typeof customElements&&["xpl-backdrop"].forEach((e=>{"xpl-backdrop"===e&&(customElements.get(c(e))||customElements.define(c(e),r))}))}export{r as B,d}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as e,H as s,d as a,h as t,c as i,t as d}from"./p-BT_Lq3Vd.js";import{v as c}from"./p-CK3_k8jD.js";const l=e(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.checkboxChange=a(this,"checkboxChange",7),this.id=c(),this.ariaLabel="",this.onChange=e=>{this.checkboxChange.emit(e.target.checked)}}render(){var e;return t(i,{key:"d173bab038a25f785864e5614b29ec2fde832786",class:{"xpl-checkbox-radio-container":!0,styled:this.styled,disabled:this.disabled}},t("input",{key:"badfc1e403ba5b51b757823354c4cec86f678116",class:"xpl-checkbox",type:"checkbox","aria-label":(null!==(e=this.ariaLabel)&&void 0!==e?e:"").trim()||void 0,checked:this.checked,"data-id":this.dataId,disabled:this.disabled,id:this.id,indeterminate:this.indeterminate,onChange:this.onChange,name:this.name,required:this.required,value:this.value}),t("label",{key:"b56888525a7b3d9544d8595b71d1ffe36f00e7b8",class:{"xpl-label":!0,"xpl-label--disabled":this.disabled},htmlFor:this.id},t("slot",{key:"a5f06411725e10f5e5fafc33ff5e8f4adfec9e5b"}),this.description&&t("small",{key:"16ac47d9316e4a78f732cb3c0851efd8eaf903f2",class:{"xpl-description":!0,"xpl-description--disabled":this.disabled}},this.description)))}},[260,"xpl-checkbox",{ariaLabel:[1,"aria-label"],checked:[4],description:[1],disabled:[4],indeterminate:[4],name:[1],value:[1],required:[4],styled:[4],dataId:[1,"data-id"],id:[32]}]);function h(){"undefined"!=typeof customElements&&["xpl-checkbox"].forEach((e=>{"xpl-checkbox"===e&&(customElements.get(d(e))||customElements.define(d(e),l))}))}export{l as C,h as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const t=["top","right","bottom","left"],n=Math.min,e=Math.max,o=Math.round,r=Math.floor,i=t=>({x:t,y:t}),c={left:"right",right:"left",bottom:"top",top:"bottom"};function a(t,o,r){return e(t,n(o,r))}function l(t,n){return"function"==typeof t?t(n):t}function s(t){return t.split("-")[0]}function u(t){return t.split("-")[1]}function f(t){return"x"===t?"y":"x"}function d(t){return"y"===t?"height":"width"}function m(t){const n=t[0];return"t"===n||"b"===n?"y":"x"}function h(t){return f(m(t))}function y(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const p=["left","right"],w=["right","left"],g=["top","bottom"],x=["bottom","top"];function v(t){const n=s(t);return c[n]+t.slice(n.length)}function b(t){const{x:n,y:e,width:o,height:r}=t;return{width:o,height:r,top:e,left:n,right:n+o,bottom:e+r,x:n,y:e}}function A(t,n,e){let{reference:o,floating:r}=t;const i=m(n),c=h(n),a=d(c),l=s(n),f="y"===i,y=o.x+o.width/2-r.width/2,p=o.y+o.height/2-r.height/2,w=o[a]/2-r[a]/2;let g;switch(l){case"top":g={x:y,y:o.y-r.height};break;case"bottom":g={x:y,y:o.y+o.height};break;case"right":g={x:o.x+o.width,y:p};break;case"left":g={x:o.x-r.width,y:p};break;default:g={x:o.x,y:o.y}}switch(u(n)){case"start":g[c]-=w*(e&&f?-1:1);break;case"end":g[c]+=w*(e&&f?-1:1)}return g}async function S(t,n){var e;void 0===n&&(n={});const{x:o,y:r,platform:i,rects:c,elements:a,strategy:s}=t,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:m=!1,padding:h=0}=l(n,t),y=function(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}(h),p=a[m?"floating"===d?"reference":"floating":d],w=b(await i.getClippingRect({element:null==(e=await(null==i.isElement?void 0:i.isElement(p)))||e?p:p.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:f,strategy:s})),g="floating"===d?{x:o,y:r,width:c.floating.width,height:c.floating.height}:c.reference,x=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),v=await(null==i.isElement?void 0:i.isElement(x))&&await(null==i.getScale?void 0:i.getScale(x))||{x:1,y:1},A=b(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:x,strategy:s}):g);return{top:(w.top-A.top+y.top)/v.y,bottom:(A.bottom-w.bottom+y.bottom)/v.y,left:(w.left-A.left+y.left)/v.x,right:(A.right-w.right+y.right)/v.x}}function R(t,n){return{top:t.top-n.height,right:t.right-n.width,bottom:t.bottom-n.height,left:t.left-n.width}}function F(n){return t.some((t=>n[t]>=0))}const k=new Set(["left","top"]);function O(){return"undefined"!=typeof window}function C(t){return P(t)?(t.nodeName||"").toLowerCase():"#document"}function T(t){var n;return(null==t||null==(n=t.ownerDocument)?void 0:n.defaultView)||window}function M(t){var n;return null==(n=(P(t)?t.ownerDocument:t.document)||window.document)?void 0:n.documentElement}function P(t){return!!O()&&(t instanceof Node||t instanceof T(t).Node)}function z(t){return!!O()&&(t instanceof Element||t instanceof T(t).Element)}function D(t){return!!O()&&(t instanceof HTMLElement||t instanceof T(t).HTMLElement)}function H(t){return!(!O()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof T(t).ShadowRoot)}function L(t){const{overflow:n,overflowX:e,overflowY:o,display:r}=X(t);return/auto|scroll|overlay|hidden|clip/.test(n+o+e)&&"inline"!==r&&"contents"!==r}function B(t){return/^(table|td|th)$/.test(C(t))}function E(t){try{if(t.matches(":popover-open"))return!0}catch(t){}try{return t.matches(":modal")}catch(t){return!1}}const $=/transform|translate|scale|rotate|perspective|filter/,I=/paint|layout|strict|content/,N=t=>!!t&&"none"!==t;let j;function q(t){const n=z(t)?X(t):t;return N(n.transform)||N(n.translate)||N(n.scale)||N(n.rotate)||N(n.perspective)||!V()&&(N(n.backdropFilter)||N(n.filter))||$.test(n.willChange||"")||I.test(n.contain||"")}function V(){return null==j&&(j="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),j}function W(t){return/^(html|body|#document)$/.test(C(t))}function X(t){return T(t).getComputedStyle(t)}function Y(t){return z(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function _(t){if("html"===C(t))return t;const n=t.assignedSlot||t.parentNode||H(t)&&t.host||M(t);return H(n)?n.host:n}function G(t){const n=_(t);return W(n)?t.ownerDocument?t.ownerDocument.body:t.body:D(n)&&L(n)?n:G(n)}function J(t,n,e){var o;void 0===n&&(n=[]),void 0===e&&(e=!0);const r=G(t),i=r===(null==(o=t.ownerDocument)?void 0:o.body),c=T(r);if(i){const t=K(c);return n.concat(c,c.visualViewport||[],L(r)?r:[],t&&e?J(t):[])}return n.concat(r,J(r,[],e))}function K(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Q(t){const n=X(t);let e=parseFloat(n.width)||0,r=parseFloat(n.height)||0;const i=D(t),c=i?t.offsetWidth:e,a=i?t.offsetHeight:r,l=o(e)!==c||o(r)!==a;return l&&(e=c,r=a),{width:e,height:r,$:l}}function U(t){return z(t)?t:t.contextElement}function Z(t){const n=U(t);if(!D(n))return i(1);const e=n.getBoundingClientRect(),{width:r,height:c,$:a}=Q(n);let l=(a?o(e.width):e.width)/r,s=(a?o(e.height):e.height)/c;return l&&Number.isFinite(l)||(l=1),s&&Number.isFinite(s)||(s=1),{x:l,y:s}}const tt=i(0);function nt(t){const n=T(t);return V()&&n.visualViewport?{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}:tt}function et(t,n,e,o){void 0===n&&(n=!1),void 0===e&&(e=!1);const r=t.getBoundingClientRect(),c=U(t);let a=i(1);n&&(o?z(o)&&(a=Z(o)):a=Z(t));const l=function(t,n,e){return void 0===n&&(n=!1),!(!e||n&&e!==T(t))&&n}(c,e,o)?nt(c):i(0);let s=(r.left+l.x)/a.x,u=(r.top+l.y)/a.y,f=r.width/a.x,d=r.height/a.y;if(c){const t=T(c),n=o&&z(o)?T(o):o;let e=t,r=K(e);for(;r&&o&&n!==e;){const t=Z(r),n=r.getBoundingClientRect(),o=X(r),i=n.left+(r.clientLeft+parseFloat(o.paddingLeft))*t.x,c=n.top+(r.clientTop+parseFloat(o.paddingTop))*t.y;s*=t.x,u*=t.y,f*=t.x,d*=t.y,s+=i,u+=c,e=T(r),r=K(e)}}return b({width:f,height:d,x:s,y:u})}function ot(t,n){const e=Y(t).scrollLeft;return n?n.left+e:et(M(t)).left+e}function rt(t,n){const e=t.getBoundingClientRect();return{x:e.left+n.scrollLeft-ot(t,e),y:e.top+n.scrollTop}}function it(t,n,o){let r;if("viewport"===n)r=function(t,n){const e=T(t),o=M(t),r=e.visualViewport;let i=o.clientWidth,c=o.clientHeight,a=0,l=0;if(r){i=r.width,c=r.height;const t=V();(!t||t&&"fixed"===n)&&(a=r.offsetLeft,l=r.offsetTop)}const s=ot(o);if(s<=0){const t=o.ownerDocument,n=t.body,e=getComputedStyle(n),r="CSS1Compat"===t.compatMode&&parseFloat(e.marginLeft)+parseFloat(e.marginRight)||0,c=Math.abs(o.clientWidth-n.clientWidth-r);c<=25&&(i-=c)}else s<=25&&(i+=s);return{width:i,height:c,x:a,y:l}}(t,o);else if("document"===n)r=function(t){const n=M(t),o=Y(t),r=t.ownerDocument.body,i=e(n.scrollWidth,n.clientWidth,r.scrollWidth,r.clientWidth),c=e(n.scrollHeight,n.clientHeight,r.scrollHeight,r.clientHeight);let a=-o.scrollLeft+ot(t);const l=-o.scrollTop;return"rtl"===X(r).direction&&(a+=e(n.clientWidth,r.clientWidth)-i),{width:i,height:c,x:a,y:l}}(M(t));else if(z(n))r=function(t,n){const e=et(t,!0,"fixed"===n),o=e.top+t.clientTop,r=e.left+t.clientLeft,c=D(t)?Z(t):i(1);return{width:t.clientWidth*c.x,height:t.clientHeight*c.y,x:r*c.x,y:o*c.y}}(n,o);else{const e=nt(t);r={x:n.x-e.x,y:n.y-e.y,width:n.width,height:n.height}}return b(r)}function ct(t,n){const e=_(t);return!(e===n||!z(e)||W(e))&&("fixed"===X(e).position||ct(e,n))}function at(t,n,e){const o=D(n),r=M(n),c="fixed"===e,a=et(t,!0,c,n);let l={scrollLeft:0,scrollTop:0};const s=i(0);function u(){s.x=ot(r)}if(o||!o&&!c)if(("body"!==C(n)||L(r))&&(l=Y(n)),o){const t=et(n,!0,c,n);s.x=t.x+n.clientLeft,s.y=t.y+n.clientTop}else r&&u();c&&!o&&r&&u();const f=!r||o||c?i(0):rt(r,l);return{x:a.left+l.scrollLeft-s.x-f.x,y:a.top+l.scrollTop-s.y-f.y,width:a.width,height:a.height}}function lt(t){return"static"===X(t).position}function st(t,n){if(!D(t)||"fixed"===X(t).position)return null;if(n)return n(t);let e=t.offsetParent;return M(t)===e&&(e=e.ownerDocument.body),e}function ut(t,n){const e=T(t);if(E(t))return e;if(!D(t)){let n=_(t);for(;n&&!W(n);){if(z(n)&&!lt(n))return n;n=_(n)}return e}let o=st(t,n);for(;o&&B(o)&<(o);)o=st(o,n);return o&&W(o)&<(o)&&!q(o)?e:o||function(t){let n=_(t);for(;D(n)&&!W(n);){if(q(n))return n;if(E(n))return null;n=_(n)}return null}(t)||e}const ft={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:n,rect:e,offsetParent:o,strategy:r}=t;const c="fixed"===r,a=M(o),l=!!n&&E(n.floating);if(o===a||l&&c)return e;let s={scrollLeft:0,scrollTop:0},u=i(1);const f=i(0),d=D(o);if((d||!d&&!c)&&(("body"!==C(o)||L(a))&&(s=Y(o)),d)){const t=et(o);u=Z(o),f.x=t.x+o.clientLeft,f.y=t.y+o.clientTop}const m=!a||d||c?i(0):rt(a,s);return{width:e.width*u.x,height:e.height*u.y,x:e.x*u.x-s.scrollLeft*u.x+f.x+m.x,y:e.y*u.y-s.scrollTop*u.y+f.y+m.y}},getDocumentElement:M,getClippingRect:function(t){let{element:o,boundary:r,rootBoundary:i,strategy:c}=t;const a=[..."clippingAncestors"===r?E(o)?[]:function(t,n){const e=n.get(t);if(e)return e;let o=J(t,[],!1).filter((t=>z(t)&&"body"!==C(t))),r=null;const i="fixed"===X(t).position;let c=i?_(t):t;for(;z(c)&&!W(c);){const n=X(c),e=q(c);e||"fixed"!==n.position||(r=null),(i?!e&&!r:!e&&"static"===n.position&&r&&("absolute"===r.position||"fixed"===r.position)||L(c)&&!e&&ct(t,c))?o=o.filter((t=>t!==c)):r=n,c=_(c)}return n.set(t,o),o}(o,this._c):[].concat(r),i],l=it(o,a[0],c);let s=l.top,u=l.right,f=l.bottom,d=l.left;for(let t=1;t<a.length;t++){const r=it(o,a[t],c);s=e(r.top,s),u=n(r.right,u),f=n(r.bottom,f),d=e(r.left,d)}return{width:u-d,height:f-s,x:d,y:s}},getOffsetParent:ut,getElementRects:async function(t){const n=this.getOffsetParent||ut,e=this.getDimensions,o=await e(t.floating);return{reference:at(t.reference,await n(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:n,height:e}=Q(t);return{width:n,height:e}},getScale:Z,isElement:z,isRTL:function(t){return"rtl"===X(t).direction}};function dt(t,n){return t.x===n.x&&t.y===n.y&&t.width===n.width&&t.height===n.height}function mt(t,o,i,c){void 0===c&&(c={});const{ancestorScroll:a=!0,ancestorResize:l=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:u="function"==typeof IntersectionObserver,animationFrame:f=!1}=c,d=U(t),m=a||l?[...d?J(d):[],...o?J(o):[]]:[];m.forEach((t=>{a&&t.addEventListener("scroll",i,{passive:!0}),l&&t.addEventListener("resize",i)}));const h=d&&u?function(t,o){let i,c=null;const a=M(t);function l(){var t;clearTimeout(i),null==(t=c)||t.disconnect(),c=null}return function s(u,f){void 0===u&&(u=!1),void 0===f&&(f=1),l();const d=t.getBoundingClientRect(),{left:m,top:h,width:y,height:p}=d;if(u||o(),!y||!p)return;const w={rootMargin:-r(h)+"px "+-r(a.clientWidth-(m+y))+"px "+-r(a.clientHeight-(h+p))+"px "+-r(m)+"px",threshold:e(0,n(1,f))||1};let g=!0;function x(n){const e=n[0].intersectionRatio;if(e!==f){if(!g)return s();e?s(!1,e):i=setTimeout((()=>{s(!1,1e-7)}),1e3)}1!==e||dt(d,t.getBoundingClientRect())||s(),g=!1}try{c=new IntersectionObserver(x,{...w,root:a.ownerDocument})}catch(t){c=new IntersectionObserver(x,w)}c.observe(t)}(!0),l}(d,i):null;let y,p=-1,w=null;s&&(w=new ResizeObserver((t=>{let[n]=t;n&&n.target===d&&w&&o&&(w.unobserve(o),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var t;null==(t=w)||t.observe(o)}))),i()})),d&&!f&&w.observe(d),o&&w.observe(o));let g=f?et(t):null;return f&&function n(){const e=et(t);g&&!dt(g,e)&&i(),g=e,y=requestAnimationFrame(n)}(),i(),()=>{var t;m.forEach((t=>{a&&t.removeEventListener("scroll",i),l&&t.removeEventListener("resize",i)})),null==h||h(),null==(t=w)||t.disconnect(),w=null,f&&cancelAnimationFrame(y)}}const ht=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(n){var e,o;const{x:r,y:i,placement:c,middlewareData:a}=n,f=await async function(t,n){const{placement:e,platform:o,elements:r}=t,i=await(null==o.isRTL?void 0:o.isRTL(r.floating)),c=s(e),a=u(e),f="y"===m(e),d=k.has(c)?-1:1,h=i&&f?-1:1,y=l(n,t);let{mainAxis:p,crossAxis:w,alignmentAxis:g}="number"==typeof y?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:y.mainAxis||0,crossAxis:y.crossAxis||0,alignmentAxis:y.alignmentAxis};return a&&"number"==typeof g&&(w="end"===a?-1*g:g),f?{x:w*h,y:p*d}:{x:p*d,y:w*h}}(n,t);return c===(null==(e=a.offset)?void 0:e.placement)&&null!=(o=a.arrow)&&o.alignmentOffset?{}:{x:r+f.x,y:i+f.y,data:{...f,placement:c}}}}},yt=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(n){const{x:e,y:o,placement:r,platform:i}=n,{mainAxis:c=!0,crossAxis:u=!1,limiter:d={fn:t=>{let{x:n,y:e}=t;return{x:n,y:e}}},...h}=l(t,n),y={x:e,y:o},p=await i.detectOverflow(n,h),w=m(s(r)),g=f(w);let x=y[g],v=y[w];c&&(x=a(x+p["y"===g?"top":"left"],x,x-p["y"===g?"bottom":"right"])),u&&(v=a(v+p["y"===w?"top":"left"],v,v-p["y"===w?"bottom":"right"]));const b=d.fn({...n,[g]:x,[w]:v});return{...b,data:{x:b.x-e,y:b.y-o,enabled:{[g]:c,[w]:u}}}}}},pt=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(n){var e,o;const{placement:r,middlewareData:i,rects:c,initialPlacement:a,platform:f,elements:b}=n,{mainAxis:A=!0,crossAxis:S=!0,fallbackPlacements:R,fallbackStrategy:F="bestFit",fallbackAxisSideDirection:k="none",flipAlignment:O=!0,...C}=l(t,n);if(null!=(e=i.arrow)&&e.alignmentOffset)return{};const T=s(r),M=m(a),P=s(a)===a,z=await(null==f.isRTL?void 0:f.isRTL(b.floating)),D=R||(P||!O?[v(a)]:function(t){const n=v(t);return[y(t),n,y(n)]}(a)),H="none"!==k;!R&&H&&D.push(...function(t,n,e,o){const r=u(t);let i=function(t,n,e){switch(t){case"top":case"bottom":return e?n?w:p:n?p:w;case"left":case"right":return n?g:x;default:return[]}}(s(t),"start"===e,o);return r&&(i=i.map((t=>t+"-"+r)),n&&(i=i.concat(i.map(y)))),i}(a,O,k,z));const L=[a,...D],B=await f.detectOverflow(n,C),E=[];let $=(null==(o=i.flip)?void 0:o.overflows)||[];if(A&&E.push(B[T]),S){const t=function(t,n,e){void 0===e&&(e=!1);const o=u(t),r=h(t),i=d(r);let c="x"===r?o===(e?"end":"start")?"right":"left":"start"===o?"bottom":"top";return n.reference[i]>n.floating[i]&&(c=v(c)),[c,v(c)]}(r,c,z);E.push(B[t[0]],B[t[1]])}if($=[...$,{placement:r,overflows:E}],!E.every((t=>t<=0))){var I,N;const t=((null==(I=i.flip)?void 0:I.index)||0)+1,n=L[t];if(n&&("alignment"!==S||M===m(n)||$.every((t=>m(t.placement)!==M||t.overflows[0]>0))))return{data:{index:t,overflows:$},reset:{placement:n}};let e=null==(N=$.filter((t=>t.overflows[0]<=0)).sort(((t,n)=>t.overflows[1]-n.overflows[1]))[0])?void 0:N.placement;if(!e)switch(F){case"bestFit":{var j;const t=null==(j=$.filter((t=>{if(H){const n=m(t.placement);return n===M||"y"===n}return!0})).map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,n)=>t+n),0)])).sort(((t,n)=>t[1]-n[1]))[0])?void 0:j[0];t&&(e=t);break}case"initialPlacement":e=a}if(r!==e)return{reset:{placement:e}}}return{}}}},wt=function(t){return void 0===t&&(t={}),{name:"size",options:t,async fn(o){var r,i;const{placement:c,rects:a,platform:f,elements:d}=o,{apply:h=()=>{},...y}=l(t,o),p=await f.detectOverflow(o,y),w=s(c),g=u(c),x="y"===m(c),{width:v,height:b}=a.floating;let A,S;"top"===w||"bottom"===w?(A=w,S=g===(await(null==f.isRTL?void 0:f.isRTL(d.floating))?"start":"end")?"left":"right"):(S=w,A="end"===g?"top":"bottom");const R=b-p.top-p.bottom,F=v-p.left-p.right;let k=n(b-p[A],R),O=n(v-p[S],F);if(null!=(r=o.middlewareData.shift)&&r.enabled.x&&(O=F),null!=(i=o.middlewareData.shift)&&i.enabled.y&&(k=R),!o.middlewareData.shift&&!g){const t=e(p.left,0),n=e(p.right,0),o=e(p.top,0),r=e(p.bottom,0);x?O=v-2*(0!==t||0!==n?t+n:e(p.left,p.right)):k=b-2*(0!==o||0!==r?o+r:e(p.top,p.bottom))}await h({...o,availableWidth:O,availableHeight:k});const C=await f.getDimensions(d.floating);return v!==C.width||b!==C.height?{reset:{rects:!0}}:{}}}},gt=function(t){return void 0===t&&(t={}),{name:"hide",options:t,async fn(n){const{rects:e,platform:o}=n,{strategy:r="referenceHidden",...i}=l(t,n);switch(r){case"referenceHidden":{const t=R(await o.detectOverflow(n,{...i,elementContext:"reference"}),e.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:F(t)}}}case"escaped":{const t=R(await o.detectOverflow(n,{...i,altBoundary:!0}),e.floating);return{data:{escapedOffsets:t,escaped:F(t)}}}default:return{}}}}},xt=(t,n,e)=>{const o=new Map,r={platform:ft,...e},i={...r.platform,_c:o};return(async(t,n,e)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:c}=e,a=c.detectOverflow?c:{...c,detectOverflow:S},l=await(null==c.isRTL?void 0:c.isRTL(n));let s=await c.getElementRects({reference:t,floating:n,strategy:r}),{x:u,y:f}=A(s,o,l),d=o,m=0;const h={};for(let e=0;e<i.length;e++){const y=i[e];if(!y)continue;const{name:p,fn:w}=y,{x:g,y:x,data:v,reset:b}=await w({x:u,y:f,initialPlacement:o,placement:d,strategy:r,middlewareData:h,rects:s,platform:a,elements:{reference:t,floating:n}});u=null!=g?g:u,f=null!=x?x:f,h[p]={...h[p],...v},b&&m<50&&(m++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(s=!0===b.rects?await c.getElementRects({reference:t,floating:n,strategy:r}):b.rects),({x:u,y:f}=A(s,d,l))),e=-1)}return{x:u,y:f,placement:d,strategy:r,middlewareData:h}})(t,n,{...r,platform:i})};export{mt as a,wt as b,xt as c,pt as f,gt as h,ht as o,yt as s}
|
|
1
|
+
const t=["top","right","bottom","left"],n=Math.min,e=Math.max,o=Math.round,r=Math.floor,i=t=>({x:t,y:t}),c={left:"right",right:"left",bottom:"top",top:"bottom"};function a(t,o,r){return e(t,n(o,r))}function l(t,n){return"function"==typeof t?t(n):t}function s(t){return t.split("-")[0]}function u(t){return t.split("-")[1]}function f(t){return"x"===t?"y":"x"}function d(t){return"y"===t?"height":"width"}function m(t){const n=t[0];return"t"===n||"b"===n?"y":"x"}function h(t){return f(m(t))}function y(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const p=["left","right"],w=["right","left"],g=["top","bottom"],x=["bottom","top"];function v(t){const n=s(t);return c[n]+t.slice(n.length)}function b(t){const{x:n,y:e,width:o,height:r}=t;return{width:o,height:r,top:e,left:n,right:n+o,bottom:e+r,x:n,y:e}}function A(t,n,e){let{reference:o,floating:r}=t;const i=m(n),c=h(n),a=d(c),l=s(n),f="y"===i,y=o.x+o.width/2-r.width/2,p=o.y+o.height/2-r.height/2,w=o[a]/2-r[a]/2;let g;switch(l){case"top":g={x:y,y:o.y-r.height};break;case"bottom":g={x:y,y:o.y+o.height};break;case"right":g={x:o.x+o.width,y:p};break;case"left":g={x:o.x-r.width,y:p};break;default:g={x:o.x,y:o.y}}switch(u(n)){case"start":g[c]-=w*(e&&f?-1:1);break;case"end":g[c]+=w*(e&&f?-1:1)}return g}async function S(t,n){var e;void 0===n&&(n={});const{x:o,y:r,platform:i,rects:c,elements:a,strategy:s}=t,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:m=!1,padding:h=0}=l(n,t),y=function(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}(h),p=a[m?"floating"===d?"reference":"floating":d],w=b(await i.getClippingRect({element:null==(e=await(null==i.isElement?void 0:i.isElement(p)))||e?p:p.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:f,strategy:s})),g="floating"===d?{x:o,y:r,width:c.floating.width,height:c.floating.height}:c.reference,x=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),v=await(null==i.isElement?void 0:i.isElement(x))&&await(null==i.getScale?void 0:i.getScale(x))||{x:1,y:1},A=b(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:x,strategy:s}):g);return{top:(w.top-A.top+y.top)/v.y,bottom:(A.bottom-w.bottom+y.bottom)/v.y,left:(w.left-A.left+y.left)/v.x,right:(A.right-w.right+y.right)/v.x}}function R(t,n){return{top:t.top-n.height,right:t.right-n.width,bottom:t.bottom-n.height,left:t.left-n.width}}function F(n){return t.some((t=>n[t]>=0))}const k=new Set(["left","top"]);function O(){return"undefined"!=typeof window}function C(t){return P(t)?(t.nodeName||"").toLowerCase():"#document"}function T(t){var n;return(null==t||null==(n=t.ownerDocument)?void 0:n.defaultView)||window}function M(t){var n;return null==(n=(P(t)?t.ownerDocument:t.document)||window.document)?void 0:n.documentElement}function P(t){return!!O()&&(t instanceof Node||t instanceof T(t).Node)}function z(t){return!!O()&&(t instanceof Element||t instanceof T(t).Element)}function D(t){return!!O()&&(t instanceof HTMLElement||t instanceof T(t).HTMLElement)}function H(t){return!(!O()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof T(t).ShadowRoot)}function L(t){const{overflow:n,overflowX:e,overflowY:o,display:r}=X(t);return/auto|scroll|overlay|hidden|clip/.test(n+o+e)&&"inline"!==r&&"contents"!==r}function B(t){return/^(table|td|th)$/.test(C(t))}function E(t){try{if(t.matches(":popover-open"))return!0}catch(t){}try{return t.matches(":modal")}catch(t){return!1}}const $=/transform|translate|scale|rotate|perspective|filter/,I=/paint|layout|strict|content/,N=t=>!!t&&"none"!==t;let j;function q(t){const n=z(t)?X(t):t;return N(n.transform)||N(n.translate)||N(n.scale)||N(n.rotate)||N(n.perspective)||!V()&&(N(n.backdropFilter)||N(n.filter))||$.test(n.willChange||"")||I.test(n.contain||"")}function V(){return null==j&&(j="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),j}function W(t){return/^(html|body|#document)$/.test(C(t))}function X(t){return T(t).getComputedStyle(t)}function Y(t){return z(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function _(t){if("html"===C(t))return t;const n=t.assignedSlot||t.parentNode||H(t)&&t.host||M(t);return H(n)?n.host:n}function G(t){const n=_(t);return W(n)?t.ownerDocument?t.ownerDocument.body:t.body:D(n)&&L(n)?n:G(n)}function J(t,n,e){var o;void 0===n&&(n=[]),void 0===e&&(e=!0);const r=G(t),i=r===(null==(o=t.ownerDocument)?void 0:o.body),c=T(r);if(i){const t=K(c);return n.concat(c,c.visualViewport||[],L(r)?r:[],t&&e?J(t):[])}return n.concat(r,J(r,[],e))}function K(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Q(t){const n=X(t);let e=parseFloat(n.width)||0,r=parseFloat(n.height)||0;const i=D(t),c=i?t.offsetWidth:e,a=i?t.offsetHeight:r,l=o(e)!==c||o(r)!==a;return l&&(e=c,r=a),{width:e,height:r,$:l}}function U(t){return z(t)?t:t.contextElement}function Z(t){const n=U(t);if(!D(n))return i(1);const e=n.getBoundingClientRect(),{width:r,height:c,$:a}=Q(n);let l=(a?o(e.width):e.width)/r,s=(a?o(e.height):e.height)/c;return l&&Number.isFinite(l)||(l=1),s&&Number.isFinite(s)||(s=1),{x:l,y:s}}const tt=i(0);function nt(t){const n=T(t);return V()&&n.visualViewport?{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}:tt}function et(t,n,e,o){void 0===n&&(n=!1),void 0===e&&(e=!1);const r=t.getBoundingClientRect(),c=U(t);let a=i(1);n&&(o?z(o)&&(a=Z(o)):a=Z(t));const l=function(t,n,e){return void 0===n&&(n=!1),!(!e||n&&e!==T(t))&&n}(c,e,o)?nt(c):i(0);let s=(r.left+l.x)/a.x,u=(r.top+l.y)/a.y,f=r.width/a.x,d=r.height/a.y;if(c){const t=T(c),n=o&&z(o)?T(o):o;let e=t,r=K(e);for(;r&&o&&n!==e;){const t=Z(r),n=r.getBoundingClientRect(),o=X(r),i=n.left+(r.clientLeft+parseFloat(o.paddingLeft))*t.x,c=n.top+(r.clientTop+parseFloat(o.paddingTop))*t.y;s*=t.x,u*=t.y,f*=t.x,d*=t.y,s+=i,u+=c,e=T(r),r=K(e)}}return b({width:f,height:d,x:s,y:u})}function ot(t,n){const e=Y(t).scrollLeft;return n?n.left+e:et(M(t)).left+e}function rt(t,n){const e=t.getBoundingClientRect();return{x:e.left+n.scrollLeft-ot(t,e),y:e.top+n.scrollTop}}function it(t,n,o){let r;if("viewport"===n)r=function(t,n){const e=T(t),o=M(t),r=e.visualViewport;let i=o.clientWidth,c=o.clientHeight,a=0,l=0;if(r){i=r.width,c=r.height;const t=V();(!t||t&&"fixed"===n)&&(a=r.offsetLeft,l=r.offsetTop)}const s=ot(o);if(s<=0){const t=o.ownerDocument,n=t.body,e=getComputedStyle(n),r="CSS1Compat"===t.compatMode&&parseFloat(e.marginLeft)+parseFloat(e.marginRight)||0,c=Math.abs(o.clientWidth-n.clientWidth-r);c<=25&&(i-=c)}else s<=25&&(i+=s);return{width:i,height:c,x:a,y:l}}(t,o);else if("document"===n)r=function(t){const n=M(t),o=Y(t),r=t.ownerDocument.body,i=e(n.scrollWidth,n.clientWidth,r.scrollWidth,r.clientWidth),c=e(n.scrollHeight,n.clientHeight,r.scrollHeight,r.clientHeight);let a=-o.scrollLeft+ot(t);const l=-o.scrollTop;return"rtl"===X(r).direction&&(a+=e(n.clientWidth,r.clientWidth)-i),{width:i,height:c,x:a,y:l}}(M(t));else if(z(n))r=function(t,n){const e=et(t,!0,"fixed"===n),o=e.top+t.clientTop,r=e.left+t.clientLeft,c=D(t)?Z(t):i(1);return{width:t.clientWidth*c.x,height:t.clientHeight*c.y,x:r*c.x,y:o*c.y}}(n,o);else{const e=nt(t);r={x:n.x-e.x,y:n.y-e.y,width:n.width,height:n.height}}return b(r)}function ct(t,n){const e=_(t);return!(e===n||!z(e)||W(e))&&("fixed"===X(e).position||ct(e,n))}function at(t,n,e){const o=D(n),r=M(n),c="fixed"===e,a=et(t,!0,c,n);let l={scrollLeft:0,scrollTop:0};const s=i(0);function u(){s.x=ot(r)}if(o||!o&&!c)if(("body"!==C(n)||L(r))&&(l=Y(n)),o){const t=et(n,!0,c,n);s.x=t.x+n.clientLeft,s.y=t.y+n.clientTop}else r&&u();c&&!o&&r&&u();const f=!r||o||c?i(0):rt(r,l);return{x:a.left+l.scrollLeft-s.x-f.x,y:a.top+l.scrollTop-s.y-f.y,width:a.width,height:a.height}}function lt(t){return"static"===X(t).position}function st(t,n){if(!D(t)||"fixed"===X(t).position)return null;if(n)return n(t);let e=t.offsetParent;return M(t)===e&&(e=e.ownerDocument.body),e}function ut(t,n){const e=T(t);if(E(t))return e;if(!D(t)){let n=_(t);for(;n&&!W(n);){if(z(n)&&!lt(n))return n;n=_(n)}return e}let o=st(t,n);for(;o&&B(o)&<(o);)o=st(o,n);return o&&W(o)&<(o)&&!q(o)?e:o||function(t){let n=_(t);for(;D(n)&&!W(n);){if(q(n))return n;if(E(n))return null;n=_(n)}return null}(t)||e}const ft={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:n,rect:e,offsetParent:o,strategy:r}=t;const c="fixed"===r,a=M(o),l=!!n&&E(n.floating);if(o===a||l&&c)return e;let s={scrollLeft:0,scrollTop:0},u=i(1);const f=i(0),d=D(o);if((d||!d&&!c)&&(("body"!==C(o)||L(a))&&(s=Y(o)),d)){const t=et(o);u=Z(o),f.x=t.x+o.clientLeft,f.y=t.y+o.clientTop}const m=!a||d||c?i(0):rt(a,s);return{width:e.width*u.x,height:e.height*u.y,x:e.x*u.x-s.scrollLeft*u.x+f.x+m.x,y:e.y*u.y-s.scrollTop*u.y+f.y+m.y}},getDocumentElement:M,getClippingRect:function(t){let{element:o,boundary:r,rootBoundary:i,strategy:c}=t;const a=[..."clippingAncestors"===r?E(o)?[]:function(t,n){const e=n.get(t);if(e)return e;let o=J(t,[],!1).filter((t=>z(t)&&"body"!==C(t))),r=null;const i="fixed"===X(t).position;let c=i?_(t):t;for(;z(c)&&!W(c);){const n=X(c),e=q(c);e||"fixed"!==n.position||(r=null),(i?!e&&!r:!e&&"static"===n.position&&r&&("absolute"===r.position||"fixed"===r.position)||L(c)&&!e&&ct(t,c))?o=o.filter((t=>t!==c)):r=n,c=_(c)}return n.set(t,o),o}(o,this._c):[].concat(r),i],l=it(o,a[0],c);let s=l.top,u=l.right,f=l.bottom,d=l.left;for(let t=1;t<a.length;t++){const r=it(o,a[t],c);s=e(r.top,s),u=n(r.right,u),f=n(r.bottom,f),d=e(r.left,d)}return{width:u-d,height:f-s,x:d,y:s}},getOffsetParent:ut,getElementRects:async function(t){const n=this.getOffsetParent||ut,e=this.getDimensions,o=await e(t.floating);return{reference:at(t.reference,await n(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:n,height:e}=Q(t);return{width:n,height:e}},getScale:Z,isElement:z,isRTL:function(t){return"rtl"===X(t).direction}};function dt(t,n){return t.x===n.x&&t.y===n.y&&t.width===n.width&&t.height===n.height}function mt(t,o,i,c){void 0===c&&(c={});const{ancestorScroll:a=!0,ancestorResize:l=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:u="function"==typeof IntersectionObserver,animationFrame:f=!1}=c,d=U(t),m=a||l?[...d?J(d):[],...o?J(o):[]]:[];m.forEach((t=>{a&&t.addEventListener("scroll",i,{passive:!0}),l&&t.addEventListener("resize",i)}));const h=d&&u?function(t,o){let i,c=null;const a=M(t);function l(){var t;clearTimeout(i),null==(t=c)||t.disconnect(),c=null}return function s(u,f){void 0===u&&(u=!1),void 0===f&&(f=1),l();const d=t.getBoundingClientRect(),{left:m,top:h,width:y,height:p}=d;if(u||o(),!y||!p)return;const w={rootMargin:-r(h)+"px "+-r(a.clientWidth-(m+y))+"px "+-r(a.clientHeight-(h+p))+"px "+-r(m)+"px",threshold:e(0,n(1,f))||1};let g=!0;function x(n){const e=n[0].intersectionRatio;if(e!==f){if(!g)return s();e?s(!1,e):i=setTimeout((()=>{s(!1,1e-7)}),1e3)}1!==e||dt(d,t.getBoundingClientRect())||s(),g=!1}try{c=new IntersectionObserver(x,{...w,root:a.ownerDocument})}catch(t){c=new IntersectionObserver(x,w)}c.observe(t)}(!0),l}(d,i):null;let y,p=-1,w=null;s&&(w=new ResizeObserver((t=>{let[n]=t;n&&n.target===d&&w&&o&&(w.unobserve(o),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var t;null==(t=w)||t.observe(o)}))),i()})),d&&!f&&w.observe(d),o&&w.observe(o));let g=f?et(t):null;return f&&function n(){const e=et(t);g&&!dt(g,e)&&i(),g=e,y=requestAnimationFrame(n)}(),i(),()=>{var t;m.forEach((t=>{a&&t.removeEventListener("scroll",i),l&&t.removeEventListener("resize",i)})),null==h||h(),null==(t=w)||t.disconnect(),w=null,f&&cancelAnimationFrame(y)}}const ht=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(n){var e,o;const{x:r,y:i,placement:c,middlewareData:a}=n,f=await async function(t,n){const{placement:e,platform:o,elements:r}=t,i=await(null==o.isRTL?void 0:o.isRTL(r.floating)),c=s(e),a=u(e),f="y"===m(e),d=k.has(c)?-1:1,h=i&&f?-1:1,y=l(n,t);let{mainAxis:p,crossAxis:w,alignmentAxis:g}="number"==typeof y?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:y.mainAxis||0,crossAxis:y.crossAxis||0,alignmentAxis:y.alignmentAxis};return a&&"number"==typeof g&&(w="end"===a?-1*g:g),f?{x:w*h,y:p*d}:{x:p*d,y:w*h}}(n,t);return c===(null==(e=a.offset)?void 0:e.placement)&&null!=(o=a.arrow)&&o.alignmentOffset?{}:{x:r+f.x,y:i+f.y,data:{...f,placement:c}}}}},yt=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(n){const{x:e,y:o,placement:r,platform:i}=n,{mainAxis:c=!0,crossAxis:u=!1,limiter:d={fn:t=>{let{x:n,y:e}=t;return{x:n,y:e}}},...h}=l(t,n),y={x:e,y:o},p=await i.detectOverflow(n,h),w=m(s(r)),g=f(w);let x=y[g],v=y[w];c&&(x=a(x+p["y"===g?"top":"left"],x,x-p["y"===g?"bottom":"right"])),u&&(v=a(v+p["y"===w?"top":"left"],v,v-p["y"===w?"bottom":"right"]));const b=d.fn({...n,[g]:x,[w]:v});return{...b,data:{x:b.x-e,y:b.y-o,enabled:{[g]:c,[w]:u}}}}}},pt=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(n){var e,o;const{placement:r,middlewareData:i,rects:c,initialPlacement:a,platform:f,elements:b}=n,{mainAxis:A=!0,crossAxis:S=!0,fallbackPlacements:R,fallbackStrategy:F="bestFit",fallbackAxisSideDirection:k="none",flipAlignment:O=!0,...C}=l(t,n);if(null!=(e=i.arrow)&&e.alignmentOffset)return{};const T=s(r),M=m(a),P=s(a)===a,z=await(null==f.isRTL?void 0:f.isRTL(b.floating)),D=R||(P||!O?[v(a)]:function(t){const n=v(t);return[y(t),n,y(n)]}(a)),H="none"!==k;!R&&H&&D.push(...function(t,n,e,o){const r=u(t);let i=function(t,n,e){switch(t){case"top":case"bottom":return e?n?w:p:n?p:w;case"left":case"right":return n?g:x;default:return[]}}(s(t),"start"===e,o);return r&&(i=i.map((t=>t+"-"+r)),n&&(i=i.concat(i.map(y)))),i}(a,O,k,z));const L=[a,...D],B=await f.detectOverflow(n,C),E=[];let $=(null==(o=i.flip)?void 0:o.overflows)||[];if(A&&E.push(B[T]),S){const t=function(t,n,e){void 0===e&&(e=!1);const o=u(t),r=h(t),i=d(r);let c="x"===r?o===(e?"end":"start")?"right":"left":"start"===o?"bottom":"top";return n.reference[i]>n.floating[i]&&(c=v(c)),[c,v(c)]}(r,c,z);E.push(B[t[0]],B[t[1]])}if($=[...$,{placement:r,overflows:E}],!E.every((t=>t<=0))){var I,N;const t=((null==(I=i.flip)?void 0:I.index)||0)+1,n=L[t];if(n&&("alignment"!==S||M===m(n)||$.every((t=>m(t.placement)!==M||t.overflows[0]>0))))return{data:{index:t,overflows:$},reset:{placement:n}};let e=null==(N=$.filter((t=>t.overflows[0]<=0)).sort(((t,n)=>t.overflows[1]-n.overflows[1]))[0])?void 0:N.placement;if(!e)switch(F){case"bestFit":{var j;const t=null==(j=$.filter((t=>{if(H){const n=m(t.placement);return n===M||"y"===n}return!0})).map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,n)=>t+n),0)])).sort(((t,n)=>t[1]-n[1]))[0])?void 0:j[0];t&&(e=t);break}case"initialPlacement":e=a}if(r!==e)return{reset:{placement:e}}}return{}}}},wt=function(t){return void 0===t&&(t={}),{name:"size",options:t,async fn(o){var r,i;const{placement:c,rects:a,platform:f,elements:d}=o,{apply:h=()=>{},...y}=l(t,o),p=await f.detectOverflow(o,y),w=s(c),g=u(c),x="y"===m(c),{width:v,height:b}=a.floating;let A,S;"top"===w||"bottom"===w?(A=w,S=g===(await(null==f.isRTL?void 0:f.isRTL(d.floating))?"start":"end")?"left":"right"):(S=w,A="end"===g?"top":"bottom");const R=b-p.top-p.bottom,F=v-p.left-p.right;let k=n(b-p[A],R),O=n(v-p[S],F);if(null!=(r=o.middlewareData.shift)&&r.enabled.x&&(O=F),null!=(i=o.middlewareData.shift)&&i.enabled.y&&(k=R),!o.middlewareData.shift&&!g){const t=e(p.left,0),n=e(p.right,0),o=e(p.top,0),r=e(p.bottom,0);x?O=v-2*(0!==t||0!==n?t+n:e(p.left,p.right)):k=b-2*(0!==o||0!==r?o+r:e(p.top,p.bottom))}await h({...o,availableWidth:O,availableHeight:k});const C=await f.getDimensions(d.floating);return v!==C.width||b!==C.height?{reset:{rects:!0}}:{}}}},gt=function(t){return void 0===t&&(t={}),{name:"hide",options:t,async fn(n){const{rects:e,platform:o}=n,{strategy:r="referenceHidden",...i}=l(t,n);switch(r){case"referenceHidden":{const t=R(await o.detectOverflow(n,{...i,elementContext:"reference"}),e.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:F(t)}}}case"escaped":{const t=R(await o.detectOverflow(n,{...i,altBoundary:!0}),e.floating);return{data:{escapedOffsets:t,escaped:F(t)}}}default:return{}}}}},xt=(t,n,e)=>{const o=new Map,r={platform:ft,...e},i={...r.platform,_c:o};return(async(t,n,e)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:c}=e,a=c.detectOverflow?c:{...c,detectOverflow:S},l=await(null==c.isRTL?void 0:c.isRTL(n));let s=await c.getElementRects({reference:t,floating:n,strategy:r}),{x:u,y:f}=A(s,o,l),d=o,m=0;const h={};for(let e=0;e<i.length;e++){const y=i[e];if(!y)continue;const{name:p,fn:w}=y,{x:g,y:x,data:v,reset:b}=await w({x:u,y:f,initialPlacement:o,placement:d,strategy:r,middlewareData:h,rects:s,platform:a,elements:{reference:t,floating:n}});u=null!=g?g:u,f=null!=x?x:f,h[p]={...h[p],...v},b&&m<50&&(m++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(s=!0===b.rects?await c.getElementRects({reference:t,floating:n,strategy:r}):b.rects),({x:u,y:f}=A(s,d,l))),e=-1)}return{x:u,y:f,placement:d,strategy:r,middlewareData:h}})(t,n,{...r,platform:i})};export{mt as a,yt as b,xt as c,pt as f,gt as h,ht as o,wt as s}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const t=[];for(let n=0;n<256;++n)t.push((n+256).toString(16).slice(1));const n=new Uint8Array(16);function r(r){return crypto.randomUUID?crypto.randomUUID():function(r){const o=(r=r||{}).random??r.rng?.()??crypto.getRandomValues(n);if(o.length<16)throw new Error("Random bytes length must be >= 16");return o[6]=15&o[6]|64,o[8]=63&o[8]|128,function(n,r=0){return(t[n[r+0]]+t[n[r+1]]+t[n[r+2]]+t[n[r+3]]+"-"+t[n[r+4]]+t[n[r+5]]+"-"+t[n[r+6]]+t[n[r+7]]+"-"+t[n[r+8]]+t[n[r+9]]+"-"+t[n[r+10]]+t[n[r+11]]+t[n[r+12]]+t[n[r+13]]+t[n[r+14]]+t[n[r+15]]).toLowerCase()}(o)}(r)}export{r as v}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as e,H as t,h as s,c as o,t as i}from"./p-BT_Lq3Vd.js";import{d as n}from"./p-ByJRw26d.js";const d=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost()}componentWillLoad(){this.dropdown=this.hostElement.closest("xpl-dropdown")}handleClick(e){if(!this.dropdown)return;const{closeOnSelect:t,mode:s}=this.dropdown;e.x&&e.y&&(this.dropdown.handleSelect(e,{component:this}),"single"===s&&t&&(this.dropdown.isOpen=!1))}handleKeyup(e){if(!this.dropdown)return;const{dropdown:t}=this,{closeOnSelect:s,mode:o,selectOnFocus:i}=this.dropdown;if(i&&["ArrowDown","ArrowLeft","ArrowRight","ArrowUp","Tab"].includes(e.key)){const i=document.activeElement.closest("xpl-dropdown-option");return t.handleSelect(e,{component:{hostElement:i}}),void("single"===o&&s&&(this.dropdown.isOpen=!1))}["Escape","Enter"].includes(e.key)&&(t.handleSelect(e,{component:this}),("Escape"===e.key||this.dropdown.closeOnSelect&&"Enter"===e.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:e,isSelected:t,isDisabled:i,value:n,subtitle:d,icon:c}=this;return s(o,{key:"66ffacb152e80f270877a189488048ef6b36b7af",class:{"xpl-dropdown-option":!0,"xpl-dropdown-option--disabled":i,"xpl-dropdown-option--selected":t},role:"option","aria-checked":t,"aria-disabled":i,"aria-selected":t,value:n},s("li",{key:"274fa639d506ef3feb5bafc3f0b21ed8bf80e95a",class:"xpl-dropdown-list-item"},c&&s("xpl-icon",{key:"e7f63ede84adca57d99baa06dc1555d3afacd02c",class:"xpl-dropdown-list-item__icon",icon:c,size:20}),e||s("slot",{key:"cc0874abba079616e8516d366981a38ddef550b1",name:"option"}),d&&s("span",{key:"37cd186edb0de3f4c33b9faa2dfa983424a011bd",class:"xpl-dropdown-list-item__subtitle"},d)))}get hostElement(){return this}},[260,"xpl-dropdown-option",{isDisabled:[516,"disabled"],label:[1],value:[1],subtitle:[1],icon:[1],isSelected:[4,"selected"]}]);function c(){"undefined"!=typeof customElements&&["xpl-dropdown-option","xpl-icon"].forEach((e=>{switch(e){case"xpl-dropdown-option":customElements.get(i(e))||customElements.define(i(e),d);break;case"xpl-icon":customElements.get(i(e))||n()}}))}export{d as D,c as d}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as t,H as e,d as i,h as s,c as a,t as r}from"./p-BT_Lq3Vd.js";import{f as n}from"./p-CH4yJ6Qx.js";import{d as o}from"./p-ByJRw26d.js";function h(t){let e=t.parentElement;for(;e&&e!==document.body&&e!==document.documentElement;){const t=getComputedStyle(e);if(/auto|scroll/.test(t.overflow+t.overflowX+t.overflowY))return e;e=e.parentElement}}const l=(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>`,c=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),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){var e;null===(e=this.flatpickrInstance)||void 0===e||e.setDate(t)}connectedCallback(){queueMicrotask((()=>this.ensureFlatpickr()))}disconnectedCallback(){var t;null===(t=this.flatpickrInstance)||void 0===t||t.destroy(),this.flatpickrInstance=void 0,this.flatpickrStaticLayout=!1,this.unwrapStaleFlatpickrWrapper()}componentDidRender(){this.ensureFlatpickr()}ensureFlatpickr(){!this.flatpickrInstance&&this.input&&this.el.isConnected&&(this.unwrapStaleFlatpickrWrapper(),this.initFlatpickr())}initFlatpickr(){const t=function(t){let e=t.parentElement;for(;e&&e!==document.body&&e!==document.documentElement;){if("fixed"===getComputedStyle(e).position)return!0;e=e.parentElement}return!1}(this.el);this.flatpickrInstance=n(this.input,Object.assign(Object.assign({allowInput:!0},t?{static:!0}:{appendTo:h(this.el)}),{dateFormat:this.dateFormat,defaultDate:this.value,maxDate:this.max,minDate:this.min,mode:this.mode,nextArrow:l(),prevArrow:l(!0),onClose:t=>{if(this.hasErrorState=t.length<(this.required?"single"===this.mode?1:2:0)?"required":null,2===t.length){const[e,i]=t;this.rangeSelected.emit({start:e,end:i})}}})),queueMicrotask((()=>{this.flatpickrStaticLayout!==t&&(this.flatpickrStaticLayout=t)}))}unwrapStaleFlatpickrWrapper(){const{input:t}=this,e=null==t?void 0:t.parentElement;if(!(null==e?void 0:e.classList.contains("flatpickr-wrapper")))return;const i=e.parentElement;if(i){for(;e.firstChild;)i.insertBefore(e.firstChild,e);i.removeChild(e)}}render(){return s(a,{key:"c038443e47f6b246c2c91ff27a5eb6afcf1c1967",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:"45b9b4ebc53293dcc4c0d527df6d2ef234ac2509",class:"xpl-input-wrapper"},this.pre&&s("label",{key:"b112ce85a056e1090391ee9e626c66da47cac750",class:"xpl-input-pre",htmlFor:this.inputId},this.pre),s("input",{key:"e3f218c1b205660ec7eb153396aa358e0769e829",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},onChange:t=>{this.valueChanged(t)}}),s("xpl-icon",{key:"f20a83ef7b788aae76ebb6f76ba786eff4c71aeb",class:"xpl-input-calendar",icon:"calendar",size:24}),this.post&&s("label",{key:"0aad7e2ec12c88b27e94de978580f6b35b318fce",class:"xpl-input-post",htmlFor:this.inputId},this.post)))}get el(){return this}static get watchers(){return{hasErrorState:[{onHasErrorStateChanged:0}],value:[{onValueChanged:0}]}}},[0,"xpl-input-date",{inputId:[1,"input-id"],disabled:[4],name:[1],required:[4],readonly:[4],value:[1],placeholder:[1],post:[1],pre:[1],max:[8],min:[8],dateFormat:[1,"date-format"],mode:[1],flatpickrStaticLayout:[32],hasErrorState:[32]},void 0,{hasErrorState:[{onHasErrorStateChanged:0}],value:[{onValueChanged:0}]}]);function d(){"undefined"!=typeof customElements&&["xpl-input-date","xpl-icon"].forEach((t=>{switch(t){case"xpl-input-date":customElements.get(r(t))||customElements.define(r(t),c);break;case"xpl-icon":customElements.get(r(t))||o()}}))}export{c as I,d}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as t,H as e,d as i,h as s,c as n,t as a}from"./p-BT_Lq3Vd.js";import{d as o}from"./p-DKUNbsb0.js";import{d as r}from"./p-BDWXBWGE.js";import{d as l}from"./p-2xGSxBGa.js";import{d as h}from"./p-CUYkG-PB.js";import{d as c}from"./p-ByJRw26d.js";import{d as u}from"./p-CaW0fL0P.js";import{d}from"./p-h1Gbk5lO.js";import{d as p}from"./p-B_sq_SAX.js";import{v as m}from"./p-CK3_k8jD.js";import{d as b}from"./p-BJqNuBZr.js";const f=(t,e,i)=>{const s=(i/=100)*(e/=100),n=s*(1-Math.abs(t/60%2-1)),a=i-s;let o=0,r=0,l=0;return t<60?(o=s,r=n,l=0):t<120?(o=n,r=s,l=0):t<180?(o=0,r=s,l=n):t<240?(o=0,r=n,l=s):t<300?(o=n,r=0,l=s):(o=s,r=0,l=n),{r:Math.round(255*(o+a)),g:Math.round(255*(r+a)),b:Math.round(255*(l+a))}},x=(t,e,i)=>[t,e,i].map((t=>t.toString(16).padStart(2,"0"))).join(""),g=t=>{var e,i;if(t.startsWith("#")){if(!/^#([a-fA-F\d]{6})$/.test(t))throw new Error("Only 6-digit hex format supported (e.g. #aabbcc)");const e=t.toLowerCase().slice(1),i=parseInt(e.slice(0,2),16),s=parseInt(e.slice(2,4),16),n=parseInt(e.slice(4,6),16);return{hex:e,r:i,g:s,b:n,a:1}}if(t.startsWith("rgba")||t.startsWith("rgb")){const i=null===(e=t.match(/[\d.]+/g))||void 0===e?void 0:e.map(Number);if(!i||i.length<3)throw new Error("Invalid rgba/rgb format");const[s,n,a,o=1]=i,r=t=>t.toString(16).padStart(2,"0");return{hex:`${r(s)}${r(n)}${r(a)}`.toLowerCase(),r:s,g:n,b:a,a:o}}if(t.startsWith("hsla")||t.startsWith("hsl")){const e=null===(i=t.match(/[\d.]+/g))||void 0===i?void 0:i.map(Number);if(!e||e.length<3)throw new Error("Invalid hsla/hsl format");const[s,n,a,o=1]=e,r=((t,e,i,s)=>{i/=100;const n=e=>(e+t/30)%12,a=(e/=100)*Math.min(i,1-i),o=t=>i-a*Math.max(-1,Math.min(n(t)-3,Math.min(9-n(t),1)));return`rgba(${Math.round(255*o(0))}, ${Math.round(255*o(8))}, ${Math.round(255*o(4))}, ${s})`})(s,n,a,o),[l,h,c]=r.match(/[\d.]+/g).map(Number);return{hex:x(l,h,c).toLowerCase(),r:l,g:h,b:c,a:o}}throw new Error("Unsupported color format")},v=t=>t.a&&1!==t.a?`rgba(${t.r}, ${t.g}, ${t.b}, ${t.a})`:`#${t.hex}`,C=[{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 y(t){return C.find((e=>e.countryCode===t))}function $(t){return(t||"").replace(/\D/g,"")}function k(t){switch(t){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 E(t,e){if(!t)return"";const i=t.replace(/\D/g,"");switch(e){case"US":case"CA":return function(t){const e=Math.min(t.length,10);return e<=3?t.slice(0,e):e<=6?`${t.slice(0,3)} ${t.slice(3,e)}`:`${t.slice(0,3)} ${t.slice(3,6)} ${t.slice(6,e)}`}(i);case"GB":return function(t){const e=Math.min(t.length,11);return e<=4?t.slice(0,e):e<=7?`${t.slice(0,4)} ${t.slice(4,e)}`:`${t.slice(0,4)} ${t.slice(4,7)} ${t.slice(7,e)}`}(i);case"AU":return function(t){const e=Math.min(t.length,9);return e<=1?t.slice(0,e):e<=4?`${t.slice(0,1)} ${t.slice(1,e)}`:e<=7?`${t.slice(0,1)} ${t.slice(1,4)} ${t.slice(4,e)}`:`${t.slice(0,1)} ${t.slice(1,4)} ${t.slice(4,7)} ${t.slice(7,e)}`}(i);case"DE":case"AT":case"CH":return function(t){const e=Math.min(t.length,11);return e<=3?t.slice(0,e):`${t.slice(0,3)} ${t.slice(3,e)}`}(i);case"FR":return function(t){const e=Math.min(t.length,9),i=[];let s=0;for(e>0&&(i.push(t.slice(0,1)),s=1);s<e&&s+2<=e;)i.push(t.slice(s,s+2)),s+=2;return s<e&&i.push(t.slice(s)),i.join(" ")}(i);case"BR":return function(t){const e=Math.min(t.length,11);return e<=2?e?`(${t}`:"":e<=6||7===e?`(${t.slice(0,2)}) ${t.slice(2,e)}`:`(${t.slice(0,2)}) ${t.slice(2,7)}-${t.slice(7,e)}`}(i);case"MX":return function(t){const e=Math.min(t.length,10);return e<=3?t.slice(0,e):e<=6?`${t.slice(0,3)} ${t.slice(3,e)}`:`${t.slice(0,3)} ${t.slice(3,6)} ${t.slice(6,e)}`}(i);case"JP":return function(t){const e=Math.min(t.length,10);return e<=3?t.slice(0,e):e<=7?`${t.slice(0,3)}-${t.slice(3,e)}`:`${t.slice(0,3)}-${t.slice(3,7)}-${t.slice(7,e)}`}(i);case"CN":return function(t){const e=Math.min(t.length,11);return e<=3?t.slice(0,e):e<=7?`${t.slice(0,3)} ${t.slice(3,e)}`:`${t.slice(0,3)} ${t.slice(3,7)} ${t.slice(7,e)}`}(i);case"IN":return function(t){const e=Math.min(t.length,10);return e<=5?t.slice(0,e):`${t.slice(0,5)} ${t.slice(5,e)}`}(i);case"KR":return function(t){const e=Math.min(t.length,10);return e<=3?t.slice(0,e):e<=7?`${t.slice(0,3)} ${t.slice(3,e)}`:`${t.slice(0,3)} ${t.slice(3,7)} ${t.slice(7,e)}`}(i);default:return function(t){const e=t.length;if(e<=3)return t;const i=[];let s=0;for(;s<e;){const n=e-s>=4?4:3;i.push(t.slice(s,s+n)),s+=n}return i.join(" ")}(i)}}function w(t){const[e,i]=t.split(":"),s=Number(e)>=12?"PM":"AM";return[(Number(e)%12||12).toString(),i,s]}const _=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.valueChange=i(this,"valueChange",7),this.hasErrorStateChanged=i(this,"hasErrorStateChanged",7),this.max="23:59",this.min="00:00",this.step=30,this.mode="single",this.timeFormat="24h",this.allowCustomOption=!1,this.showOptions=!1,this.options=[],this.handleInput=t=>{var e;const i=null===(e=t.target.value)||void 0===e?void 0:e.replace(/[^0-9:apmAPM]/g,"");this.value=i},this.handleFocus=()=>{this.showOptions=!0},this.handleBlur=()=>{this.value=function(t){if(!t||""===t.trim()||0===t.replace(/[^0-9]/g,"").length)return null;let e=t.trim().toLowerCase();e=e.replace(/(\d)\s+(am|pm)/g,"$1$2"),/^\d{1,2}(am|pm)?$/.test(e)&&(e=e.replace(/(am|pm)?$/,":00$1")),/^\d{1,2}$/.test(e)&&(e=`${e}:00`),/^\d{1,2}:\d{1}$/.test(e)&&(e=`${e}0`);const[i,s]=e.split(":"),n=s.replace(/[^0-9]/g,""),a=e.includes("am");return e.includes("pm")||a?a?`${(Number(i)%12).toString().padStart(2,"0")}:${n}`:`${Number(i)%12+12}:${n}`:`${i.padStart(2,"0")}:${n}`}(this.value)},this.handleClick=()=>{this.showOptions=!0}}onValueChange(t){this.valueChange.emit(t),this.updateState(t)}updateState(t){this.formattedValue=this.formatDisplayedTime(t),this.amPm=this.formatDisplayedAmPm(t),this.validateValue()}formatDisplayedTime(t){if(!t)return"";if("12h"===this.timeFormat&&t.includes(":")){const[e,i]=w(t);return`${e}:${i}`}return t}formatDisplayedAmPm(t){if(!t||"12h"!==this.timeFormat)return"";const[,,e]=w(t);return e}validateValue(){this.hasErrorState=this.value?!this.value.includes(":")||this.value.trim().length<4||this.value.trim().length>5?"Invalid time format, must be HH:MM":this.value<this.min||this.value>this.max?"Out of range":this.allowCustomOption||this.options.some((t=>t.value===this.value))?null:"Invalid option":this.required?"required":null}onHasErrorStateChanged(t){this.hasErrorStateChanged.emit(t)}componentDidLoad(){var t;"range"===this.mode&&console.warn("Range mode is not supported for time inputs at this time."),null===(t=this.dropdown)||void 0===t||t.addEventListener("isOpenChange",(t=>{this.showOptions=t.detail}))}componentWillLoad(){this.options=this.getOptions(),this.value&&this.updateState(this.value)}getOptions(){return function(t,e,i,s){const n=t=>{const[e,i]=t.split(":").map(Number);return 60*e+i},a=n(e.toString()),o=n(i.toString()),r=[];for(let e=a;e<=o;e+=t)r.push((l=e,`${Math.floor(l/60).toString().padStart(2,"0")}:${(l%60).toString().padStart(2,"0")}`));var l;return r.map((t=>({label:"12h"===s?function(t){const[e,i,s]=w(t);return`${e}:${i} ${s}`}(t):t,value:t})))}(this.step,this.min.toString(),this.max.toString(),this.timeFormat).map((({label:t,value:e})=>({label:t,value:e,onClick:()=>{this.value=e,this.showOptions=!1}})))}render(){return s(n,{key:"aef2e65955381ed89dd800e889bd20469a201172",class:{"xpl-input-time":!0,[`xpl-input-time--mode-${this.mode}`]:!0,"xpl-input-time--error":!!this.hasErrorState}},s("xpl-input",{key:"90f85f631d876714e65134e964ec521bce1d7948",pre:s("xpl-icon",{class:"xpl-input-time__clock-icon",icon:"clock",size:24}),post:"12h"===this.timeFormat?this.amPm||"AM":null,type:"text",_id:this.inputId,disabled:this.disabled,name:this.name,required:this.required,readonly:this.readonly,placeholder:this.placeholder,max:this.max,min:this.min,onInput:this.handleInput,value:this.formattedValue,onFocusEvent:this.handleFocus,onBlurEvent:this.handleBlur,onClick:this.handleClick}),!this.readonly&&!this.disabled&&s("xpl-dropdown",{key:"f42c653946921b15cb0c1b24db01d299c22406c1",options:this.options,isOpen:this.showOptions,ref:t=>{this.dropdown=t},class:"xpl-input-time__dropdown"}))}static get watchers(){return{value:[{onValueChange:0}],hasErrorState:[{onHasErrorStateChanged:0}]}}},[0,"xpl-input-time",{inputId:[1,"input-id"],disabled:[4],name:[1],required:[4],readonly:[4],value:[1537],placeholder:[1],max:[8],min:[8],step:[2],mode:[1],timeFormat:[1,"time-format"],allowCustomOption:[4,"allow-custom-option"],formattedValue:[32],hasErrorState:[32],showOptions:[32],options:[32],amPm:[32]},void 0,{value:[{onValueChange:0}],hasErrorState:[{onHasErrorStateChanged:0}]}]);function M(){"undefined"!=typeof customElements&&["xpl-input-time","xpl-dropdown","xpl-dropdown-group","xpl-dropdown-heading","xpl-dropdown-option","xpl-icon","xpl-input","xpl-input-color","xpl-input-date","xpl-input-file","xpl-input-phone","xpl-input-search","xpl-input-time"].forEach((t=>{switch(t){case"xpl-input-time":customElements.get(a(t))||customElements.define(a(t),_);break;case"xpl-dropdown":customElements.get(a(t))||o();break;case"xpl-dropdown-group":customElements.get(a(t))||r();break;case"xpl-dropdown-heading":customElements.get(a(t))||l();break;case"xpl-dropdown-option":customElements.get(a(t))||h();break;case"xpl-icon":customElements.get(a(t))||c();break;case"xpl-input":customElements.get(a(t))||A();break;case"xpl-input-color":customElements.get(a(t))||F();break;case"xpl-input-date":customElements.get(a(t))||u();break;case"xpl-input-file":customElements.get(a(t))||d();break;case"xpl-input-phone":customElements.get(a(t))||D();break;case"xpl-input-search":customElements.get(a(t))||p();break;case"xpl-input-time":customElements.get(a(t))||M()}}))}function S(t){return t.toLowerCase().replace(/ /g,"-")}const I=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.hasErrorStateChanged=i(this,"hasErrorStateChanged",7),this.valueChange=i(this,"valueChange",7),this.lastCursorRef=0,this.lastFormattedRef="",this.dropdownOpen=!1,this.hasErrorState=null,this.nationalNumber="",this.searchQuery="",this.triggerId=`xpl-input-phone-trigger-${m()}`,this.defaultCountry="US",this.isInternational=!0,this.handleTriggerClick=()=>{this.isEditable&&(this.dropdownOpen=!this.dropdownOpen)},this.handleNumberInput=t=>{var e;const i=t.target,s=i.value||"";let n;if(this.lastCursorRef=null!==(e=i.selectionStart)&&void 0!==e?e:0,this.lastFormattedRef=s,this.isInternational&&s.startsWith("+")){const t=$(s),e=this.effectiveDialCode.slice(1).replace(/\D/g,"");n=e&&t.startsWith(e)?t.slice(e.length):t}else n=$(s);const a=k(this.effectiveCountryCode);n.length>a&&(n=n.slice(0,a)),this.nationalNumber=n,this.emitValue(),i.value=this.displayValue},this.handleClear=()=>{var t;this.nationalNumber="",this.emitValue(),null===(t=this.inputEl)||void 0===t||t.focus()},this.handleDropdownUpdate=(t,{component:e})=>{var i;const s=null!=e?e:this.dropdownRef;if(!s)return;const{options:n}=s;if(null==n?void 0:n.length){const t=n.reduce(((t,e)=>{var i;return[...t,...e.groupName?null!==(i=e.options)&&void 0!==i?i:[]:[e]]}),[]),e=t.find((t=>t.isSelected));if(null==e?void 0:e.value){const t=y(e.value);t&&(this.selectedCountry=t,this.emitValue(),null===(i=this.inputEl)||void 0===i||i.focus())}}}}onDropdownOpenChange(t){t&&(this.searchQuery="")}onHasErrorStateChanged(t){this.hasErrorStateChanged.emit(t)}onValueChange(t){var e,i;if(null==t||""===t){const t=y(this.defaultCountry)||C[0];return this.selectedCountry=t,void(this.nationalNumber="")}const s=function(t){if(!t||!t.startsWith("+"))return null;const e=t.slice(1).replace(/\D/g,"");if(!e.length)return null;const i=[...C].sort(((t,e)=>e.dialCode.replace(/\D/g,"").length-t.dialCode.replace(/\D/g,"").length)).find((t=>{const i=t.dialCode.slice(1).replace(/\D/g,"");return e.startsWith(i)}));if(!i)return null;const s=i.dialCode.slice(1).replace(/\D/g,""),n=e.slice(s.length);return{dialCode:i.dialCode,nationalNumber:n}}(t);if(s)if((null===(e=this.selectedCountry)||void 0===e?void 0:e.dialCode)===s.dialCode)this.nationalNumber=s.nationalNumber;else{const t=y(this.defaultCountry),e=null!==(i=(null==t?void 0:t.dialCode)===s.dialCode?t:void 0)&&void 0!==i?i:(n=s.dialCode,C.find((t=>t.dialCode===n)));e&&(this.selectedCountry=e,this.nationalNumber=s.nationalNumber)}else this.selectedCountry||(this.selectedCountry=y(this.defaultCountry)||C[0]);var n}componentWillLoad(){this.value?this.onValueChange(this.value):this.selectedCountry=y(this.defaultCountry)||C[0]}componentDidUpdate(){if(this.inputEl&&this.lastFormattedRef&&"function"==typeof this.inputEl.setSelectionRange){const t=function(t,e,i){if(i>=t.length)return e.length;const s=$(t.slice(0,i)).length;let n=0,a=0;for(let t=0;t<e.length;t+=1){if(/\d/.test(e[t])&&(a+=1,a>=s)){n=t+(a===s?1:0);break}n=t+1}return Math.min(n,e.length)}(this.lastFormattedRef,this.displayValue,this.lastCursorRef);this.inputEl.setSelectionRange(t,t),this.lastFormattedRef=""}else this.inputEl&&this.lastFormattedRef&&(this.lastFormattedRef="")}get effectiveCountryCode(){var t,e,i;return null!==(i=null!==(e=null===(t=this.selectedCountry)||void 0===t?void 0:t.countryCode)&&void 0!==e?e:this.defaultCountry)&&void 0!==i?i:"US"}get effectiveDialCode(){var t,e;return null!==(e=null===(t=this.selectedCountry)||void 0===t?void 0:t.dialCode)&&void 0!==e?e:"+1"}get isEditable(){return!this.disabled&&!this.readonly}get orderedCountries(){const t=this.preferredCountries||[],e=C.filter((e=>!t.includes(e.countryCode)));return[...t.map((t=>y(t))).filter(Boolean),...e]}get filteredCountries(){const t=this.searchQuery.trim().toLowerCase();return t?this.orderedCountries.filter((e=>e.name.toLowerCase().includes(t)||e.dialCode.includes(t)||e.countryCode.toLowerCase().includes(t))):this.orderedCountries}get displayValue(){return this.nationalNumber?E(this.nationalNumber,this.effectiveCountryCode):""}get effectivePlaceholder(){if(this.placeholder)return this.placeholder;const t=this.selectedCountry;return t?function(t){switch(t){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"}}(t.countryCode):""}get dropdownOptions(){return this.filteredCountries.map((t=>{var e;return{icon:S(t.name),label:`${t.name} (${t.dialCode})`,value:t.countryCode,isSelected:(null===(e=this.selectedCountry)||void 0===e?void 0:e.countryCode)===t.countryCode}}))}get maxInputLength(){const t=k(this.effectiveCountryCode);return E("9".repeat(t),this.effectiveCountryCode).length}emitValue(){const t=this.nationalNumber?function(t,e){const i=(t.slice(1)+e).replace(/\D/g,"");return i.length?`+${i}`:""}(this.effectiveDialCode,this.nationalNumber):"";this.value=t||void 0,this.valueChange.emit(t||""),this.validate()}validate(){this.hasErrorState=!this.required||this.nationalNumber.trim()?null:"required"}render(){var t;return s(n,{key:"1b29d31aca23d7047c36a910bfce85aa54784377",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}},s("div",{key:"6b7fa8dab343d6236a5de65b73cb731da1997695",class:"xpl-input-wrapper"},this.isInternational&&s("button",{key:"cb785ee5ad4da9ea7ee316b7895bf2ca3992a6ae",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},(null===(t=this.selectedCountry)||void 0===t?void 0:t.name)&&s("xpl-icon",{key:"0edbeee2da23758c9335f30b01b2a5f24ece73a3",class:"xpl-input-phone__flag",icon:S(this.selectedCountry.name),size:24,"aria-hidden":"true"}),s("xpl-icon",{key:"310ae67c8eb2fc30c550782011921051492fae54",class:"xpl-input-phone__trigger-icon",icon:"chevron-down",size:20,"aria-hidden":"true"})),s("div",{key:"84abb24d097c61bfd76be3e5bbe1ea7bd9718d30",class:"xpl-input-phone__input-wrap"},this.isInternational&&s("span",{key:"29975e649c40580f7e126bfc2f72be2a07f6c813",class:"xpl-input-phone__dial-code"},this.effectiveDialCode),s("input",{key:"55c85bc4fd439a9913b5b58a8fbbc3f1a328cac9",ref:t=>{this.inputEl=t},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&&s("button",{key:"2b05b045d36937e3c85ff93308a75bededd56f4e",type:"button",class:"xpl-input-phone__clear","aria-label":"Clear phone number",onClick:this.handleClear},s("xpl-icon",{key:"0834f75780e6cba9e5fef6e4f8613d89dad42216",icon:"x-circle",size:16})))),this.isInternational&&this.isEditable&&s("xpl-dropdown",{key:"1e19c6663b14de3f5fd9f740417fc6f342a47177",ref:t=>{this.dropdownRef=t},isOpen:this.dropdownOpen,triggerId:this.triggerId,anchorToTrigger:!0,closeOnSelect:!0,mode:"single",options:this.dropdownOptions,update:this.handleDropdownUpdate,onIsOpenChange:t=>{this.dropdownOpen=t.detail},"aria-label":"Country"},s("div",{key:"910ee42b45fcfea4b5670ca300c6cd7d9a15c709",slot:"header",class:"xpl-input-phone__search-wrap"},s("xpl-input",{key:"d7b79cd82d6f1dcd4ed57938f7c4389925426b0c",class:"xpl-input-phone__search",type:"text",label:"",placeholder:"Search",value:this.searchQuery,autocomplete:"off",onInputEvent:t=>{var e;this.searchQuery=null!==(e=t.detail)&&void 0!==e?e:""}},s("xpl-icon",{key:"7e8a462d8c0949421d0668b3b289a7c7e7169dbe",slot:"pre",class:"xpl-input-phone__search-icon",icon:"magnifier",size:20})))))}get el(){return this}static get watchers(){return{dropdownOpen:[{onDropdownOpenChange:0}],hasErrorState:[{onHasErrorStateChanged:0}],value:[{onValueChange:0}]}}},[0,"xpl-input-phone",{defaultCountry:[1,"default-country"],disabled:[4],error:[4],inputId:[1,"input-id"],isInternational:[4,"is-international"],name:[1],placeholder:[1],preferredCountries:[16],readonly:[4],required:[4],value:[1537],dropdownOpen:[32],hasErrorState:[32],nationalNumber:[32],searchQuery:[32],selectedCountry:[32],triggerId:[32]},void 0,{dropdownOpen:[{onDropdownOpenChange:0}],hasErrorState:[{onHasErrorStateChanged:0}],value:[{onValueChange:0}]}]);function D(){"undefined"!=typeof customElements&&["xpl-input-phone","xpl-dropdown","xpl-dropdown-group","xpl-dropdown-heading","xpl-dropdown-option","xpl-icon","xpl-input","xpl-input-color","xpl-input-date","xpl-input-file","xpl-input-phone","xpl-input-search","xpl-input-time"].forEach((t=>{switch(t){case"xpl-input-phone":customElements.get(a(t))||customElements.define(a(t),I);break;case"xpl-dropdown":customElements.get(a(t))||o();break;case"xpl-dropdown-group":customElements.get(a(t))||r();break;case"xpl-dropdown-heading":customElements.get(a(t))||l();break;case"xpl-dropdown-option":customElements.get(a(t))||h();break;case"xpl-icon":customElements.get(a(t))||c();break;case"xpl-input":customElements.get(a(t))||A();break;case"xpl-input-color":customElements.get(a(t))||F();break;case"xpl-input-date":customElements.get(a(t))||u();break;case"xpl-input-file":customElements.get(a(t))||d();break;case"xpl-input-phone":customElements.get(a(t))||D();break;case"xpl-input-search":customElements.get(a(t))||p();break;case"xpl-input-time":customElements.get(a(t))||M()}}))}const O={hex:"",r:0,g:0,b:0,a:1},N=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.inputChange=i(this,"inputChange",7),this.hasErrorStateChanged=i(this,"hasErrorStateChanged",7),this.placeholder="Select color",this.eyeDropperSupported="EyeDropper"in window,this.colorInputElements={hex:null,r:null,g:null,b:null,a:null,hue:null,slGrid:null,alpha:null},this.handleMove=t=>{const e=this.colorInputElements.slGrid.getBoundingClientRect(),i="touches"in t?t.touches[0].clientY:t.clientY,s=Math.max(0,Math.min(("touches"in t?t.touches[0].clientX:t.clientX)-e.left,e.width)),n=Math.max(0,Math.min(i-e.top,e.height)),a=s/e.width,o=n/e.height,r=f(this.hue,100,100),l=(255*(1-a)+a*r.r)*(1-o),h=(255*(1-a)+a*r.g)*(1-o),c=(255*(1-a)+a*r.b)*(1-o),u={r:Math.round(l),g:Math.round(h),b:Math.round(c),hex:x(Math.round(l),Math.round(h),Math.round(c)),a:this.colorValues.a};this.colorValues=u},this.startDrag=t=>{t.preventDefault(),this.handleMove(t),window.addEventListener("mousemove",this.handleMove),window.addEventListener("mouseup",this.stopDrag),window.addEventListener("touchmove",this.handleMove),window.addEventListener("touchend",this.stopDrag)},this.stopDrag=()=>{window.removeEventListener("mousemove",this.handleMove),window.removeEventListener("mouseup",this.stopDrag),window.removeEventListener("touchmove",this.handleMove),window.removeEventListener("touchend",this.stopDrag)},this.onHexInputChange=t=>{var e;const i=t.detail?t.detail.trim().replace(/#/g,""):"";if(i){const[t,s,n]=(t=>t?t.match(/\w\w/g).map((t=>parseInt(t,16))):[0,0,0])(i);this.colorValues={hex:i,r:t,g:s,b:n,a:null!==(e=this.colorValues.a)&&void 0!==e?e:1}}else this.colorValues=Object.assign({},O)},this.onRgbaInputChange=(t,e)=>{const i=parseFloat(e.detail);if(Number.isNaN(i))return void(this.hasErrorState=`invalid value from ${t.name}: ${i}`);const s=Object.assign({},this.colorValues);switch(t.name){case"color-r-input":s.r=i;break;case"color-g-input":s.g=i;break;case"color-b-input":s.b=i;break;case"color-a-input":s.a=i;break;default:this.hasErrorState=`unhandled input: ${t.name}`}s.hex=x(s.r,s.g,s.b),this.colorValues=s},this.onSliderInputChange=t=>{const e=parseFloat(t.value);if(Number.isNaN(e))this.hasErrorState=`invalid value from ${t.name}: ${e}`;else switch(t.name){case"color-hue-slider":this.colorValues=g(`hsla(${e}, 100%, 50%, 1)`),this.hue=e;break;case"color-alpha-slider":this.colorValues=Object.assign(Object.assign({},this.colorValues),{a:e});break;default:this.hasErrorState=`unhandled input: ${t.name}`}}}valueChanged(t){this.hasErrorState=this.required&&!t.hex?"required":null,this.inputChange.emit(t.hex?v(t):"")}onHasErrorStateChanged(t){this.hasErrorStateChanged.emit(t)}onValuePropChange(t){this.syncColorFromValue(t)}syncColorFromValue(t){if(t)try{this.colorValues=g(t),this.hue=(()=>{const t=this.colorValues.r/255,e=this.colorValues.g/255,i=this.colorValues.b/255,s=Math.max(t,e,i),n=Math.min(t,e,i),a=s-n;let o=0,r=0;const l=(s+n)/2;if(0!==a){switch(r=a/(1-Math.abs(2*l-1)),s){case t:o=(e-i)/a%6;break;case e:o=(i-t)/a+2;break;case i:o=(t-e)/a+4}o*=60,o<0&&(o+=360)}return{hue:Math.round(o),saturation:Math.round(100*r),lightness:Math.round(100*l)}})().hue}catch(t){this.hasErrorState="invalid color format",this.hue=0}else this.colorValues=Object.assign({},O),this.hasErrorState=null,this.hue=0}componentWillLoad(){this.syncColorFromValue(this.value)}componentDidLoad(){const{r:t,g:e,b:i,a:s,hue:n,alpha:a,hex:o}=this.colorInputElements;o.addEventListener("valueChange",(t=>{this.onHexInputChange(t),t.stopPropagation()})),[t,e,i,s].forEach((t=>{t.addEventListener("valueChange",(e=>{this.onRgbaInputChange(t,e),e.stopPropagation()}))})),[n,a].forEach((t=>{t.addEventListener("input",(()=>{this.onSliderInputChange(t)}))}))}async openEyeDropper(){try{const t=new window.EyeDropper,e=await t.open();this.colorValues=g(e.sRGBHex)}catch(t){this.hasErrorState=`eyedropper cancelled or failed: ${t}`}}render(){const{r:t,g:e,b:i,a}=this.colorValues,o=f(this.hue,100,100),{x:r,y:l}=((t,e,i,s)=>{const{s:n,v:a}=((t,e,i,s)=>{t/=255,e/=255,i/=255;const n=Math.max(t,e,i),a=n-Math.min(t,e,i);let o=0;return o=0===a?0:n===t?(e-i)/a%6:n===e?(i-t)/a+2:(t-e)/a+4,o=Math.round(60*o),o<0&&(o+=360),{h:null!=s?s:o,s:0===n?0:a/n,v:n}})(e.r,e.g,e.b,t);return{x:Math.round(n*i),y:Math.round((1-a)*s)}})(this.hue,{r:t,g:e,b:i},288,160),h={left:`${r}px`,top:`${l}px`,background:`rgb(${t}, ${e}, ${i})`};return s(n,{key:"9700bba0a5c9b7cd11135a21167e5e06463483b5",class:"xpl-input-color"},s("xpl-popover",{key:"486c2fc5660d7e7c60b7922fa4363174baa7892e",disabled:this.disabled,display:"menu"},s("div",{key:"c51bd4c77381c46726bf32c319f69611eba845d1",slot:"trigger"},s("div",{key:"9a78cf317854ce56532d49c551d1e1041daf1484",class:{"xpl-input-color__display":!0,"xpl-input-color__display--disabled":this.disabled,"xpl-input-color__display--error":!!this.hasErrorState}},s("span",{key:"a78d2b771ad17897820805f1f5d1e265cdd6cbfa",class:"xpl-input-color__color",style:{background:v(this.colorValues)}}),this.colorValues.hex?s("span",{class:"xpl-input-color__value"},v(this.colorValues)):s("span",{class:"xpl-input-color__placeholder"},this.placeholder),this.eyeDropperSupported&&!this.hideEyeDropper&&s("xpl-icon",{key:"2a176659e06f5f971b1de14c9e6f2978a766dd35",size:20,icon:"eye-dropper",class:"xpl-input-color__icon",onClick:t=>{t.stopPropagation(),this.openEyeDropper()}}))),s("div",{key:"4cfadf2209a0d453f8a1ecc74a343d63b48c5b36",class:"xpl-input-color__menu"},s("div",{key:"5acdd216cf4e1714ec493a53c0a974d6d25e0c49",class:"xpl-input-color__sl-grid",ref:t=>{this.colorInputElements.slGrid=t},style:{background:["linear-gradient(to top, #000, #0000)","linear-gradient(to right, #fff, #fff0)",`rgb(${o.r} ${o.g} ${o.b})`].join(", ")},onMouseDown:this.startDrag,onTouchStart:this.startDrag},s("div",{key:"519a19802a049f1c47fe9acd8ca074c9679cb667",class:"xpl-input-color__sl-thumb",style:h})),s("div",{key:"4c6cc466a3ba89897f0b59cce99835f9a2bc842a",class:"xpl-input-color__grid"},s("input",{key:"e32fa17e45e231c5d3492c8900feb643ab36f206",type:"range",min:"0",max:"360",value:this.hue,class:"xpl-input-color__slider xpl-input-color__hue",name:"color-hue-slider",ref:t=>{this.colorInputElements.hue=t}}),s("input",{key:"52ca6f9ae33a4129b0b050b7c2c2b8f74616fe5d",type:"range",min:"0",max:"1",step:"0.01",value:a,class:"xpl-input-color__slider xpl-input-color__alpha",name:"color-alpha-slider",ref:t=>{this.colorInputElements.alpha=t},style:{backgroundImage:[`linear-gradient(to right, rgb(${t} ${e} ${i} / 0) 0%, rgb(${t} ${e} ${i} / 1) 100%)`,"linear-gradient(45deg, #ccc 25%, transparent 25%)","linear-gradient(-45deg, #ccc 25%, transparent 25%)","linear-gradient(45deg, transparent 75%, #ccc 75%)","linear-gradient(-45deg, transparent 75%, #ccc 75%)"].join(", ")}}),s("div",{key:"a1cf7bde4bd0d2fc7b19b60cff878f56aeb70e2e",class:"xpl-input-color__preview",style:{background:`rgba(${t}, ${e}, ${i}, ${a})`}})),s("div",{key:"3a82739b45a8ac2be0e732ea27cff2a583503eaf",class:"xpl-input-color__inputs"},Object.entries(this.colorInputElements).filter((([t])=>["hex","r","g","b","a"].includes(t))).map((([t])=>s("xpl-input",{key:t,label:t.toLocaleUpperCase(),name:`color-${t}-input`,placeholder:"hex"===t?"793EF7":"0",value:this.colorValues[t],ref:e=>{this.colorInputElements[t]=e}})))))))}static get watchers(){return{colorValues:[{valueChanged:0}],hasErrorState:[{onHasErrorStateChanged:0}],value:[{onValuePropChange:0}]}}},[0,"xpl-input-color",{value:[1],placeholder:[1],disabled:[4],required:[4],hideEyeDropper:[4,"hide-eye-dropper"],hasErrorState:[32],colorValues:[32],eyeDropperSupported:[32],hue:[32]},void 0,{colorValues:[{valueChanged:0}],hasErrorState:[{onHasErrorStateChanged:0}],value:[{onValuePropChange:0}]}]);function F(){"undefined"!=typeof customElements&&["xpl-input-color","xpl-icon","xpl-input","xpl-input-color","xpl-input-date","xpl-input-file","xpl-input-phone","xpl-input-search","xpl-input-time","xpl-popover"].forEach((t=>{switch(t){case"xpl-input-color":customElements.get(a(t))||customElements.define(a(t),N);break;case"xpl-icon":customElements.get(a(t))||c();break;case"xpl-input":customElements.get(a(t))||A();break;case"xpl-input-color":customElements.get(a(t))||F();break;case"xpl-input-date":customElements.get(a(t))||u();break;case"xpl-input-file":customElements.get(a(t))||d();break;case"xpl-input-phone":customElements.get(a(t))||D();break;case"xpl-input-search":customElements.get(a(t))||p();break;case"xpl-input-time":customElements.get(a(t))||M();break;case"xpl-popover":customElements.get(a(t))||b()}}))}const B=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),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:e}=t.target;this.inputEvent.emit(e)},this.syncPreSlotContent=()=>{const t=this.hasDirectPreSlotChild();t!==this.hasPreSlotContent&&(this.hasPreSlotContent=t)},this.handleSearchBlurForward=t=>{const{detail:e}=t;e&&(t.stopPropagation(),this.blurEvent.emit(e))},this.handleSearchCommit=t=>{t.stopPropagation(),this.search.emit(t.detail)},this.handleSearchFocusForward=t=>{const{detail:e}=t;e&&(t.stopPropagation(),this.focusEvent.emit(e))}}hasDirectPreSlotChild(){return Array.from(this.el.children).some((t=>"pre"===t.getAttribute("slot")))}updateCharacterCount(){this.characterCount=this.input.value.length}componentWillLoad(){null!=this._id&&""!==this._id||(this._id=m()),this.multiline&&void 0!==this.maxCharacterCount&&(this.characterCount=void 0!==this.value?this.value.length:0),this.multiline||(this.hasPreSlotContent=this.hasDirectPreSlotChild())}componentDidLoad(){this.multiline||"search"===this.type||"undefined"!=typeof MutationObserver&&(this.preSlotObserver=new MutationObserver(this.syncPreSlotContent),this.preSlotObserver.observe(this.el,{childList:!0}))}disconnectedCallback(){var t;null===(t=this.preSlotObserver)||void 0===t||t.disconnect()}async setFocus(){var t,e;"search"!==this.type?null===(e=this.input)||void 0===e||e.focus():await(null===(t=this.searchInputRef)||void 0===t?void 0:t.setFocus())}renderInput(){var t,e,i,n,a,o;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:!!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 r=Boolean((null!==(t=this.label)&&void 0!==t?t:"").trim()),l=Boolean(this.error&&this.error.length>0);return s("xpl-input-search",{ariaLabel:(null!==(e=this.ariaLabel)&&void 0!==e?e:"").trim()||"Search",autocomplete:null!==(i=this.autocomplete)&&void 0!==i?i:"off",disabled:this.disabled,errorMessageId:l?`${this._id}-error`:void 0,hasError:l,hasVisibleLabel:r,inputId:this._id,name:this.name,onBlurEvent:this.handleSearchBlurForward,onFocusEvent:this.handleSearchFocusForward,onSearch:this.handleSearchCommit,onValueChange:this.handleChildValueChange,placeholder:null!==(n=this.placeholder)&&void 0!==n?n:"Search",readonly:this.readonly,ref:t=>{this.searchInputRef=null!=t?t:void 0},required:this.required,shape:null!==(a=this.shape)&&void 0!==a?a:"rounded",value:null!==(o=this.value)&&void 0!==o?o:""})}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},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},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(){var t;let e=!1;return(this.error||this.multiline&&void 0!==this.maxCharacterCount&&this.characterCount>this.maxCharacterCount)&&(e=!0),s(n,{key:"909cf5bbf56456a5bc27e5a3cb6a662ada8df1a7",class:{"xpl-input":!0,"xpl-input--disabled":this.disabled,"xpl-input--error":e,"xpl-input--readonly":this.readonly,[`xpl-input--${this.type}`]:!0}},this.label&&s("label",{key:"0391385b4f19a7a4e36e0a42f4bac9e0400fd7df",class:"xpl-input-label",htmlFor:this._id},this.label,this.description&&s("small",{key:"5724a1710c660297a31cbc37b46b68a0e837e583"},this.description)),this.renderInput(),(null===(t=this.error)||void 0===t?void 0:t.length)>0&&s("label",{key:"ea1f4fe026d00c4119df392df786648f46e21e4b",class:"xpl-input-error",htmlFor:this._id,id:`${this._id}-error`},s("xpl-icon",{key:"42c279d5e037da8178c4db4e4b934150ddc43a42",icon:"alert-circle",size:16}),s("span",{key:"461f9c09aaa8642df9645e856fa10a312572054c"},this.error)))}get el(){return this}},[260,"xpl-input",{_id:[1],description:[1],disabled:[4],error:[1],label:[1],name:[1],required:[4],readonly:[4],value:[1],autocomplete:[1],placeholder:[1],post:[1],pre:[1],max:[8],min:[8],step:[2],multiline:[4],maxCharacterCount:[2,"max-character-count"],dateFormat:[1,"date-format"],timeFormat:[1,"time-format"],allowCustomOption:[4,"allow-custom-option"],mode:[1],accept:[1],multiple:[4],hideTriggerOnSelect:[4,"hide-trigger-on-select"],hideFileNames:[4,"hide-file-names"],hideAcceptText:[4,"hide-accept-text"],hideEyeDropper:[4,"hide-eye-dropper"],defaultCountry:[1,"default-country"],preferredCountries:[16],isInternational:[4,"is-international"],ariaLabel:[1,"aria-label"],shape:[1],type:[1],characterCount:[32],passwordVisible:[32],hasPreSlotContent:[32],setFocus:[64]}]);function A(){"undefined"!=typeof customElements&&["xpl-input","xpl-dropdown","xpl-dropdown-group","xpl-dropdown-heading","xpl-dropdown-option","xpl-icon","xpl-input","xpl-input-color","xpl-input-date","xpl-input-file","xpl-input-phone","xpl-input-search","xpl-input-time","xpl-popover"].forEach((t=>{switch(t){case"xpl-input":customElements.get(a(t))||customElements.define(a(t),B);break;case"xpl-dropdown":customElements.get(a(t))||o();break;case"xpl-dropdown-group":customElements.get(a(t))||r();break;case"xpl-dropdown-heading":customElements.get(a(t))||l();break;case"xpl-dropdown-option":customElements.get(a(t))||h();break;case"xpl-icon":customElements.get(a(t))||c();break;case"xpl-input":customElements.get(a(t))||A();break;case"xpl-input-color":customElements.get(a(t))||F();break;case"xpl-input-date":customElements.get(a(t))||u();break;case"xpl-input-file":customElements.get(a(t))||d();break;case"xpl-input-phone":customElements.get(a(t))||D();break;case"xpl-input-search":customElements.get(a(t))||p();break;case"xpl-input-time":customElements.get(a(t))||M();break;case"xpl-popover":customElements.get(a(t))||b()}}))}export{B as I,N as a,F as b,I as c,A as d,D as e,_ as f,M as g}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as t,g as n}from"./p-BFTU3MAI.js";var r,i,e=n(function(){if(i)return r;i=1;var n="Expected a function",e=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,f=/^0o[0-7]+$/i,c=parseInt,a="object"==typeof self&&self&&self.Object===Object&&self,v="object"==typeof t&&t&&t.Object===Object&&t||a||Function("return this")(),s=Object.prototype.toString,p=Math.max,y=Math.min,b=function(){return v.Date.now()};function d(t){var n=typeof t;return!!t&&("object"==n||"function"==n)}function l(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&"[object Symbol]"==s.call(t)}(t))return NaN;if(d(t)){var n="function"==typeof t.valueOf?t.valueOf():t;t=d(n)?n+"":n}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(e,"");var r=u.test(t);return r||f.test(t)?c(t.slice(2),r?2:8):o.test(t)?NaN:+t}return r=function(t,r,i){var e=!0,o=!0;if("function"!=typeof t)throw new TypeError(n);return d(i)&&(e="leading"in i?!!i.leading:e,o="trailing"in i?!!i.trailing:o),function(t,r,i){var e,o,u,f,c,a,v=0,s=!1,m=!1,j=!0;if("function"!=typeof t)throw new TypeError(n);function g(n){var r=e,i=o;return e=o=void 0,v=n,f=t.apply(i,r)}function T(t){var n=t-a;return void 0===a||n>=r||n<0||m&&t-v>=u}function h(){var t=b();if(T(t))return x(t);c=setTimeout(h,function(t){var n=r-(t-a);return m?y(n,u-(t-v)):n}(t))}function x(t){return c=void 0,j&&e?g(t):(e=o=void 0,f)}function w(){var t=b(),n=T(t);if(e=arguments,o=this,a=t,n){if(void 0===c)return function(t){return v=t,c=setTimeout(h,r),s?g(t):f}(a);if(m)return c=setTimeout(h,r),g(a)}return void 0===c&&(c=setTimeout(h,r)),f}return r=l(r)||0,d(i)&&(s=!!i.leading,u=(m="maxWait"in i)?p(l(i.maxWait)||0,r):u,j="trailing"in i?!!i.trailing:j),w.cancel=function(){void 0!==c&&clearTimeout(c),v=0,e=a=o=c=void 0},w.flush=function(){return void 0===c?f:x(b())},w}(t,r,{leading:e,maxWait:r,trailing:o})}}());export{e as t}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as t,H as i,h as s,c as n,t as o}from"./p-BT_Lq3Vd.js";import{d as l}from"./p-ByJRw26d.js";const e=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),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,i=Object.keys(t).filter((i=>{const s=t[i].name;return!!s&&(s.includes("data-test")||s.includes("aria-"))})).reduce(((i,s)=>Object.assign(Object.assign({},i),{[t[s].name]:t[s].value})),{}),s=this.el.querySelector("button");s&&Object.keys(i).forEach((t=>{s.setAttribute(t,i[t]),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(){var t;return s(n,{key:"4fa90ae10b235af3fbfadb40097c5cc238e40dc6",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",Object.assign({},null!==(t=this.controlAttrs)&&void 0!==t?t:{},{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"})))))}get el(){return this}},[260,"xpl-button",{controlAttrs:[16],disabled:[4],form:[1],fullWidth:[4,"full-width"],icon:[1],iconOnly:[4,"icon-only"],iconPosition:[1,"icon-position"],isLoading:[4,"is-loading"],link:[4],name:[1],sentiment:[1],size:[1],state:[1],type:[1],value:[1],variant:[1]},[[2,"click","handleDisabledClick"]]]);function a(){"undefined"!=typeof customElements&&["xpl-button","xpl-icon"].forEach((t=>{switch(t){case"xpl-button":customElements.get(o(t))||customElements.define(o(t),e);break;case"xpl-icon":customElements.get(o(t))||l()}}))}export{e as B,a as d}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as t,H as s,d as e,h as i,c as o,t as n}from"./p-BT_Lq3Vd.js";import{c as l,a as h,o as a,f as r,s as d,h as c}from"./p-CFpsSZyr.js";import{d as p}from"./p-BDWXBWGE.js";import{d as u}from"./p-2xGSxBGa.js";import{d as g}from"./p-CUYkG-PB.js";import{d as m}from"./p-ByJRw26d.js";const f={rowHeight:45,overscan:20,virtualizeFrom:200};function v(t,s){const{groupName:e,options:o,subtitle:n}=t,l=function(t,s){var e={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&s.indexOf(i)<0&&(e[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(t);o<i.length;o++)s.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(t,i[o])&&(e[i[o]]=t[i[o]])}return e}(t,["groupName","options","subtitle"]);if(e)return i("xpl-dropdown-group",Object.assign({groupName:e,options:o},l));const h=void 0!==s;return i("xpl-dropdown-option",Object.assign({class:h?"xpl-dropdown-option--virtual":void 0,style:h?{transform:`translateY(${s*f.rowHeight}px)`}:void 0,subtitle:n},l))}const w=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.isOpenChange=e(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.cleanupAutoUpdate=null,this.virtualScrollRaf=null,this.openAlignmentRaf=null,this.previousOptionCount=0,this.updateDropdownPosition=async t=>{var e,i;const{x:o,y:n,placement:h,middlewareData:p}=await l(t,this.hostElement,{strategy:"fixed",placement:this.placement,middleware:[a(4),r((null===(e=this.flipFallbackPlacements)||void 0===e?void 0:e.length)?{fallbackPlacements:this.flipFallbackPlacements}:{}),d({apply:({availableHeight:t,rects:e})=>{const i=this.hostElement.querySelector(".xpl-dropdown-list");let o=0;if(i){const t=Array.from(this.hostElement.children),e=t.indexOf(i);t.slice(0,e).forEach((t=>{t instanceof s&&(o+=t.offsetHeight)}))}const n=getComputedStyle(this.hostElement),l=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)+parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth),h=i?parseFloat(getComputedStyle(i).getPropertyValue("--xpl-dropdown-list-max-height")):1/0,a=Math.min(h,Math.max(0,t-o-l));Object.assign(this.hostElement.style,{width:`${e.reference.width}px`}),i&&(i.style.maxHeight=`${a}px`)}}),c()]});if(!this.cleanupAutoUpdate)return;if(null===(i=p.hide)||void 0===i?void 0:i.referenceHidden)return void(this.isOpen=!1);const u=h.startsWith("top");Object.assign(this.hostElement.style,{left:`${o}px`,top:`${n}px`}),this.hostElement.classList.toggle("xpl-dropdown--above",u),this.hostElement.classList.toggle("xpl-dropdown--below",!u)},this.handleClickOutside=({target:t})=>{const{triggerId:s}=this,e=s?document.getElementById(s):null,i=null==e?void 0:e.contains(t);this.hostElement.contains(t)||i||!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=>{var s,e;t!==this.listEl&&(this.listEl=t,null===(s=this.listResizeObserver)||void 0===s||s.disconnect(),t&&"undefined"!=typeof ResizeObserver&&(null!==(e=this.listResizeObserver)&&void 0!==e||(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(){var t,s,e,i;const o=null!==(s=null===(t=this.options)||void 0===t?void 0:t.length)&&void 0!==s?s:0,n=o!==this.previousOptionCount;if(this.previousOptionCount=o,!this.isVirtualized)return this.virtualStart=0,void(this.virtualEnd=0);const l=this.listEl;if(l){const t=Math.max(0,o*f.rowHeight-l.clientHeight);if(l.scrollTop>t&&(l.scrollTop=t),this.isOpen&&n){const t=null!==(i=null===(e=this.options)||void 0===e?void 0:e.findIndex((t=>t.isSelected)))&&void 0!==i?i:-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(){document.addEventListener("mousedown",this.handleClickOutside),document.addEventListener("keydown",this.handleKeyDown)}disconnectedCallback(){var t;document.removeEventListener("mousedown",this.handleClickOutside),document.removeEventListener("keydown",this.handleKeyDown),this.stopPositioning(),this.cancelVirtualScroll(),null===(t=this.listResizeObserver)||void 0===t||t.disconnect()}componentWillLoad(){var t,s;this.handleSelect=this.handleSelect.bind(this),this.selectedValues&&this.onSelectedValuesChanged(this.selectedValues,!0),this.previousOptionCount=null!==(s=null===(t=this.options)||void 0===t?void 0:t.length)&&void 0!==s?s:0}componentDidLoad(){this.isOpen&&(this.startPositioning(),this.alignOnOpen())}async handleSelect(t,{component:s}){const{hostElement:e,mode:i,options:o,update:n}=this,l="single"===i,h="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;l?(e.isSelected=i,s.hostElement.isSelected=!0):h&&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;l?(e.isSelected=i,i&&(s.hostElement.isSelected=!0)):h&&i&&(e.isSelected=!e.isSelected,s.hostElement.isSelected=e.isSelected)})),this.options=[...o]}else l?Array.from(e.querySelectorAll("xpl-dropdown-option")).forEach((t=>{t.isSelected=t===s.hostElement})):h&&(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.cleanupAutoUpdate=h(t,this.hostElement,(()=>{this.updateDropdownPosition(t)})))}stopPositioning(){var t;this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null),this.hostElement.style.left="",this.hostElement.style.top="",this.hostElement.style.width="",null===(t=this.hostElement.querySelector(".xpl-dropdown-list"))||void 0===t||t.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||!(null==s?void 0:s.length)||!this.isVirtualized)return;const e=s.findIndex((t=>t.isSelected));if(e<0)return;const{rowHeight:i}=f,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(){var t,s;const e=this.listEl,i=null!==(s=null===(t=this.options)||void 0===t?void 0:t.length)&&void 0!==s?s:0;if(!e||!i)return;const{rowHeight:o,overscan:n}=f,l=Math.floor(e.scrollTop/o),h=Math.ceil(e.clientHeight/o)||1,a=Math.max(0,l-n),r=Math.min(i,l+h+n);a===this.virtualStart&&r===this.virtualEnd||(this.virtualStart=a,this.virtualEnd=r)}get isVirtualized(){const{options:t}=this;return!!t&&t.length>f.virtualizeFrom&&t.every((t=>!t.groupName&&!t.subtitle))}render(){const{isOpen:t,mode:s,options:e}=this,n=this.isVirtualized;let l;if(e&&e.length)if(n){const{rowHeight:t,overscan:s}=f,o=e.length,n=Math.min(this.virtualStart,o),h=Math.min(o,Math.ceil(300/t)+2*s);l=i("li",{key:"d7730538dfae58a6efc6a8971e0078b28fc5b9de",class:"xpl-dropdown__virtual-sizer",style:{height:o*t+"px"}},e.slice(n,this.virtualEnd>n?this.virtualEnd:h).map(((t,s)=>v(t,n+s))))}else l=e.map((t=>v(t)));else l=i("slot",{key:"7a604ed002d4c412eb709aa7c3ef1a9e80f614ed",name:"options"});return i(o,{key:"282d3bc09a8ce0e63d55bbc9707936afe0efae01","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"},i("slot",{key:"977cfb27b24bcecaf22587bd2e6350ad52743cad",name:"header"}),i("ul",{key:"46274999327ffdb9749a012b839ef124df4d72d2",class:"xpl-dropdown-list",ref:t=>{this.setListEl(t)},onScroll:n?this.handleVirtualScroll:void 0},l))}get hostElement(){return 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}]}}},[260,"xpl-dropdown",{isOpen:[1540,"open"],closeOnSelect:[4,"close-on-select"],mode:[1],options:[1040],anchorToTrigger:[4,"anchor-to-trigger"],flipFallbackPlacements:[16],placement:[1],selectedValues:[1,"selected-values"],selectOnFocus:[4,"select-on-focus"],triggerId:[1,"trigger-id"],update:[16],virtualEnd:[32],virtualStart:[32],handleSelect:[64]},void 0,{options:[{onOptionsChanged:0}],anchorToTrigger:[{onAnchorToTriggerChanged:0}],flipFallbackPlacements:[{onFlipFallbackPlacementsChanged:0}],placement:[{onPlacementChanged:0}],triggerId:[{onTriggerIdChanged:0}],selectedValues:[{onSelectedValuesChanged:0}],isOpen:[{onIsOpenStateChange:0}]}]);function b(){"undefined"!=typeof customElements&&["xpl-dropdown","xpl-dropdown-group","xpl-dropdown-heading","xpl-dropdown-option","xpl-icon"].forEach((t=>{switch(t){case"xpl-dropdown":customElements.get(n(t))||customElements.define(n(t),w);break;case"xpl-dropdown-group":customElements.get(n(t))||p();break;case"xpl-dropdown-heading":customElements.get(n(t))||u();break;case"xpl-dropdown-option":customElements.get(n(t))||g();break;case"xpl-icon":customElements.get(n(t))||m()}}))}export{w as D,b as d}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as e,H as s,d as i,h as t,c as d,t as a}from"./p-BT_Lq3Vd.js";import{v as l}from"./p-CK3_k8jD.js";const c=e(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.radioChange=i(this,"radioChange",7),this.id=l(),this.onChange=e=>{this.radioChange.emit(this.value?this.value:e.target.checked)}}get isChecked(){return void 0!==this.selectedValue&&void 0!==this.value?this.selectedValue===this.value:Boolean(this.checked)}render(){return t(d,{key:"b25d59aa55a08aa7264e1dadc670b540d3740dfc",class:{"xpl-checkbox-radio-container":!0,styled:this.styled,disabled:this.disabled}},t("input",{key:"df724428d276baf063679829f2b1ffcdcbfbf2b2",class:"xpl-radio",type:"radio",checked:this.isChecked,disabled:this.disabled,id:this.id,name:this.name,required:this.required,onChange:this.onChange,value:this.value}),t("label",{key:"d521ca252872494ed28826721dde6270e441a3a3",class:{"xpl-label":!0,"xpl-label--disabled":this.disabled},htmlFor:this.id},t("slot",{key:"5093a78e1fb18908b700cb90cf932de06a3ce76d"}),this.description&&t("small",{key:"8806e9374a812df4db6fa8a9a9e1672abd282299",class:{"xpl-description":!0,"xpl-description--disabled":this.disabled}},this.description)))}},[260,"xpl-radio",{checked:[4],description:[1],disabled:[4],name:[1],value:[1],required:[4],selectedValue:[1,"selected-value"],styled:[4],id:[32]}]);function h(){"undefined"!=typeof customElements&&["xpl-radio"].forEach((e=>{"xpl-radio"===e&&(customElements.get(a(e))||customElements.define(a(e),c))}))}export{c as R,h as d}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as t,H as e,d as i,h as s,c as a,F as l,t as r}from"./p-BT_Lq3Vd.js";import{d as n}from"./p-Bsy-VVS5.js";import{d}from"./p-C5_Yo0ZP.js";import{d as h}from"./p-D2SFagIb.js";import{d as o}from"./p-BxHFEnPN.js";import{d as c}from"./p-ByJRw26d.js";import{d as m}from"./p-DcXL24UI.js";const p=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.itemDragEnd=i(this,"itemDragEnd",7),this.itemDragStart=i(this,"itemDragStart",7),this.itemDrop=i(this,"itemDrop",7),this.itemSelect=i(this,"itemSelect",7),this.dragFromHandle=!1,this.slotPresence={actions:!1,avatar:!1,badges:!1,details:!1,errorText:!1,metadata:!1,stackedExtra1:!1,stackedExtra2:!1,stackedExtra3:!1,titleBadge:!1,title:!1},this.isKeyboardMode=!1,this.disabled=!1,this.error=!1,this.hidden=!1,this.keyboardActive=!1,this.reorderable=!1,this.selectable=!1,this.selected=!1,this.showDivider=!1,this.handleDragStart=t=>{if(this.disabled)return void t.preventDefault();if(!this.dragFromHandle)return void t.preventDefault();this.detachDragHandlePointerReleaseListeners(),t.dataTransfer&&(t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text/plain",this.itemId||this.el.id||""));const e=this.el.querySelector(".xpl-list-item__wrapper");null==e||e.classList.add("dragging"),this.itemDragStart.emit({itemId:this.itemId,item:this.el})},this.handleDrop=t=>{this.disabled||(t.preventDefault(),this.detachDragHandlePointerReleaseListeners(),this.dragFromHandle=!1,this.itemDrop.emit({itemId:this.itemId,item:this.el}))},this.handleDragOver=t=>{this.disabled||(t.preventDefault(),t.dataTransfer&&this.reorderable&&(t.dataTransfer.dropEffect="move"))},this.handleDragEnter=t=>{if(this.disabled)return;t.preventDefault();const e=this.el.querySelector(".xpl-list-item__wrapper");null==e||e.classList.add("drag-over")},this.handleDragLeave=t=>{if(this.disabled)return;const e=this.el.querySelector(".xpl-list-item__wrapper");e&&!e.contains(t.relatedTarget)&&e.classList.remove("drag-over")},this.handleDragEnd=()=>{this.detachDragHandlePointerReleaseListeners(),this.dragFromHandle=!1;const t=this.el.querySelector(".xpl-list-item__wrapper");null==t||t.classList.remove("dragging","drag-over");const e=this.el.parentElement;e&&Array.from(e.children).forEach((t=>{if("xpl-list-item"!==t.tagName.toLowerCase())return;const e=t.querySelector(".xpl-list-item__wrapper");null==e||e.classList.remove("drag-over")})),this.itemDragEnd.emit({itemId:this.itemId,item:this.el})},this.handleDragHandleMouseDown=()=>{if(this.disabled)return;this.detachDragHandlePointerReleaseListeners(),this.dragFromHandle=!0;const t=()=>{this.detachDragHandlePointerReleaseListeners(),this.dragFromHandle=!1};document.addEventListener("pointerup",t,!0),document.addEventListener("pointercancel",t,!0),this.dragHandlePointerReleaseCleanup=()=>{document.removeEventListener("pointerup",t,!0),document.removeEventListener("pointercancel",t,!0)},this.el.dispatchEvent(new CustomEvent("xplListItemReorder",{bubbles:!0,composed:!0,detail:{exitKeyboardMode:!0}}))},this.preventRowLinkNavigation=t=>{this.href&&(t.preventDefault(),t.stopPropagation())},this.handleMouseDown=()=>{this.isKeyboardMode&&this.el.dispatchEvent(new CustomEvent("xplListItemReorder",{bubbles:!0,composed:!0,detail:{itemId:this.itemId,exitKeyboardMode:!0}}))},this.handleDragHandleKeyDown=t=>{this.disabled?"Escape"===t.key&&this.isKeyboardMode&&(t.preventDefault(),this.el.dispatchEvent(new CustomEvent("xplListItemReorder",{bubbles:!0,composed:!0,detail:{itemId:this.itemId,exitKeyboardMode:!0}}))):"Escape"!==t.key?this.isKeyboardMode?"ArrowUp"!==t.key&&"ArrowDown"!==t.key||(t.preventDefault(),this.el.dispatchEvent(new CustomEvent("xplListItemReorder",{bubbles:!0,composed:!0,detail:{direction:"ArrowUp"===t.key?"up":"down",item:this.el,itemId:this.itemId,keyboardMode:!0}}))):"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),this.el.dispatchEvent(new CustomEvent("xplListItemReorder",{bubbles:!0,composed:!0,detail:{item:this.el,itemId:this.itemId,keyboardMode:!0}}))):this.isKeyboardMode&&(t.preventDefault(),this.el.dispatchEvent(new CustomEvent("xplListItemReorder",{bubbles:!0,composed:!0,detail:{itemId:this.itemId,exitKeyboardMode:!0}})))},this.handleRadioChange=()=>{this.disabled||this.itemSelect.emit({itemId:this.itemId})},this.handleRadioClick=t=>{this.href&&t.stopPropagation()}}handleItemChange(){this.updateSlotPresence()}handleKeyboardActiveChange(t){this.isKeyboardMode=t}handleSelectedChange(t){const e=this.el.querySelector('.xpl-list-item__selectable input[type="radio"]');e instanceof HTMLInputElement&&e.checked!==t&&(e.checked=t)}handleTitleBadgeVariantChange(){this.updateSlotPresence()}connectedCallback(){this.el.addEventListener("mousedown",this.handleMouseDown,!0)}disconnectedCallback(){this.el.removeEventListener("mousedown",this.handleMouseDown,!0),this.detachDragHandlePointerReleaseListeners()}componentWillLoad(){this.updateSlotPresence(),this.isKeyboardMode=!!this.keyboardActive;const t=this.el.getAttribute("item-id");t&&!this.itemId&&(this.itemId=t),this.el.id&&!this.itemId&&(this.itemId=this.el.id)}componentDidRender(){this.syncReorderDragHandleA11y()}handleSlotChange(){this.updateSlotPresence()}updateSlotPresence(){const t=this.el.getAttribute("title-badge-variant")||this.el.getAttribute("titlebadgevariant");this.slotPresence={actions:this.hasSlot("actions"),avatar:this.hasSlot("avatar"),badges:this.hasSlot("badges"),details:this.hasSlot("details"),errorText:this.hasSlot("error-text"),metadata:this.hasSlot("metadata"),stackedExtra1:this.hasSlot("stacked-extra-1"),stackedExtra2:this.hasSlot("stacked-extra-2"),stackedExtra3:this.hasSlot("stacked-extra-3"),title:this.hasSlot("title"),titleBadge:!!(this.titleBadgeVariant&&String(this.titleBadgeVariant).length>0||t&&t.length>0)}}detachDragHandlePointerReleaseListeners(){this.dragHandlePointerReleaseCleanup&&(this.dragHandlePointerReleaseCleanup(),this.dragHandlePointerReleaseCleanup=void 0)}hasSlot(t){if(Array.from(this.el.children).some((e=>e.getAttribute("slot")===t)))return!0;const e=Array.from(this.el.querySelectorAll(`slot[name="${t}"]`)).find((t=>t.closest("xpl-list-item")===this.el));return!(!e||"function"!=typeof e.assignedNodes)&&e.assignedNodes({flatten:!0}).length>0}getTitleSlotAccessibleText(){var t;const e=Array.from(this.el.children).find((t=>"title"===t.getAttribute("slot")));if(e)return null!==(t=e.textContent)&&void 0!==t?t:void 0;const i=Array.from(this.el.querySelectorAll('slot[name="title"]')).find((t=>t.closest("xpl-list-item")===this.el));if(i&&"function"==typeof i.assignedNodes){const t=i.assignedNodes({flatten:!0}).map((t=>{var e,i;return t.nodeType===Node.TEXT_NODE?null!==(e=t.textContent)&&void 0!==e?e:"":t.nodeType===Node.ELEMENT_NODE&&null!==(i=t.textContent)&&void 0!==i?i:""})).join("").trim();return t||void 0}}getRowIdForAccessibleLabel(){var t,e,i;const s=null===(t=this.itemId)||void 0===t?void 0:t.trim();if(s)return s;const a=null===(e=this.el.getAttribute("item-id"))||void 0===e?void 0:e.trim();if(a)return a;return(null===(i=this.el.id)||void 0===i?void 0:i.trim())||""}getSelectableRadioLabel(){var t;const e=this.getRowIdForAccessibleLabel();if(this.slotPresence.title){return(null===(t=this.getTitleSlotAccessibleText())||void 0===t?void 0:t.trim())||(e?`Select ${e}`:"Select list item")}return e?`Select ${e}`:"Select list item"}renderLegacyAvatarCell(){return this.item.avatar&&"string"==typeof this.item.avatar?"/"===this.item.avatar.slice(0,1)||"http"===this.item.avatar.slice(0,4)?s("xpl-avatar",{src:this.item.avatar,name:this.item.title}):s("xpl-avatar",{name:this.item.title},this.item.avatar):null}renderPropBasedItem(){const{item:t}=this,e=t.avatars||t.badges||t.subtext,i=t.href?"a":"div",l=t.href?{href:t.href}:{};return s(a,{role:"listitem",class:{"xpl-list-item":!0,"xpl-list-item--error":this.error,"xpl-list-item--disabled":this.disabled},hidden:this.hidden},this.renderLegacyAvatarCell(),s(i,Object.assign({class:"xpl-list-item-content"},l),s("div",{class:"xpl-list-left"},s("div",null,s("h4",null,t.title),t.metadata&&s("ul",{class:"xpl-list-item-metadata"},t.metadata.map((t=>"string"==typeof t?s("li",null,t):s("li",null,s("xpl-icon",{icon:t.icon})," ",t.text)))))),e&&s("div",{class:"xpl-list-right"},t.subtext&&s("div",{class:"xpl-list-item-subtext"},t.subtext),t.avatars&&s("div",{class:"xpl-avatar-group xpl-avatar-group--s"},t.avatars.map((t=>s("img",{src:t,alt:""})))),t.badges&&t.badges.map((t=>"string"==typeof t?s("xpl-badge",null,t):s("xpl-badge",{dot:t.dot,variant:t.variant},t.text)))),t.href?s("span",{class:"xpl-list-item__link-chevron","aria-hidden":"true"},s("xpl-icon",{icon:"chevron-right",size:12})):null))}renderTitleBadge(){if(!this.slotPresence.titleBadge)return null;const t=this.titleBadgeVariant||this.el.getAttribute("title-badge-variant")||this.el.getAttribute("titlebadgevariant")||"purple";return s("div",{class:"xpl-list-item__title-badge"},s("xpl-badge",{dotOnly:!0,size:"small",variant:t}))}renderSlotBasedItem(){var t;const e=this.slotPresence.details||this.slotPresence.badges||this.slotPresence.actions,i=this.slotPresence.title||this.slotPresence.metadata||this.slotPresence.stackedExtra1||this.slotPresence.stackedExtra2||this.slotPresence.stackedExtra3,r=this.radioName||this.el.getAttribute("radio-name")||"",n=this.reorderable&&!this.disabled,d="xpl-list-item__wrapper",h={draggable:n,onDragStart:this.handleDragStart,onDragOver:this.handleDragOver,onDragEnter:this.handleDragEnter,onDragLeave:this.handleDragLeave,onDrop:this.handleDrop,onDragEnd:this.handleDragEnd},o=s(l,null,n&&s("div",{class:"xpl-list-item__reorderable"},s("xpl-button",{class:{"xpl-list-item__drag-handle":!0,"xpl-list-item__drag-handle--keyboard-mode":this.isKeyboardMode},type:"button",variant:"tertiary",sentiment:"neutral",iconOnly:!0,icon:this.isKeyboardMode?"caret-expand-y":"grip-dots-vertical",disabled:this.disabled,onClick:this.preventRowLinkNavigation,onMouseDown:this.handleDragHandleMouseDown,onKeyDown:this.handleDragHandleKeyDown})),this.selectable&&r?s("div",{class:"xpl-list-item__selectable",onClick:this.handleRadioClick},s("xpl-radio",{checked:this.selected,disabled:this.disabled,name:r,value:null!==(t=this.itemId)&&void 0!==t?t:"",onRadioChange:this.handleRadioChange},this.getSelectableRadioLabel())):null,this.slotPresence.avatar&&s("div",{class:"xpl-list-item__avatar",onClick:this.preventRowLinkNavigation},s("slot",{name:"avatar"})),i&&s("div",{class:"xpl-list-item__stacked"},(this.slotPresence.title||this.slotPresence.titleBadge)&&s("div",{class:"xpl-list-item__title-row"},s("div",{class:"xpl-list-item__title-wrapper"},this.renderTitleBadge(),s("slot",{name:"title"}))),this.showDivider&&s("xpl-divider",null),this.slotPresence.metadata&&s("div",{class:"xpl-list-item__metadata-row"},s("slot",{name:"metadata"})),this.slotPresence.stackedExtra1&&s("div",{class:"xpl-list-item__stacked-extra-1"},s("slot",{name:"stacked-extra-1"})),this.slotPresence.stackedExtra2&&s("div",{class:"xpl-list-item__stacked-extra-2"},s("slot",{name:"stacked-extra-2"})),this.slotPresence.stackedExtra3&&s("div",{class:"xpl-list-item__stacked-extra-3"},s("slot",{name:"stacked-extra-3"}))),e&&s("div",{class:"xpl-list-item__right"},this.slotPresence.details&&s("div",{class:"xpl-list-item__details"},s("slot",{name:"details"})),this.slotPresence.badges&&s("div",{class:"xpl-list-item__badges"},s("slot",{name:"badges"})),this.slotPresence.actions&&s("div",{class:"xpl-list-item__actions",onClick:this.preventRowLinkNavigation},s("slot",{name:"actions"}))),this.href?s("span",{class:"xpl-list-item__link-chevron","aria-hidden":"true"},s("xpl-icon",{icon:"chevron-right",size:12})):null);return s(a,{class:{"xpl-list-item":!0,"xpl-list-item--error":this.error||this.slotPresence.errorText,"xpl-list-item--disabled":this.disabled,"xpl-list-item--slot-based":!0,"xpl-list-item--selected":this.selected},hidden:this.hidden},this.href?s("div",{role:"listitem",class:"xpl-list-item__listitem-shell"},s("a",Object.assign({class:d,href:this.href},h),o)):s("div",Object.assign({role:"listitem",class:d},h),o),this.slotPresence.errorText&&s("div",{class:"xpl-list-item__error-text"},s("xpl-icon",{icon:"circle-warning",size:16}),s("slot",{name:"error-text"})))}syncReorderDragHandleA11y(){if(!this.reorderable||this.disabled)return;const t=this.el.querySelector("xpl-button.xpl-list-item__drag-handle"),e=null==t?void 0:t.querySelector("button");e&&(e.setAttribute("aria-label",this.isKeyboardMode?"Press arrow up or down to reorder, Escape to exit":"Press Enter or Space to activate keyboard reorder mode, or drag to reorder"),e.setAttribute("aria-pressed",this.isKeyboardMode?"true":"false"))}render(){return this.hidden?s(a,{hidden:!0}):this.item?this.renderPropBasedItem():this.renderSlotBasedItem()}get el(){return this}static get watchers(){return{item:[{handleItemChange:0}],keyboardActive:[{handleKeyboardActiveChange:0}],selected:[{handleSelectedChange:0}],titleBadgeVariant:[{handleTitleBadgeVariantChange:0}]}}},[260,"xpl-list-item",{disabled:[4],error:[4],hidden:[4],href:[1],item:[16],itemId:[1025,"item-id"],keyboardActive:[4,"keyboard-active"],radioName:[1,"radio-name"],reorderable:[4],selectable:[4],selected:[4],showDivider:[4,"show-divider"],titleBadgeVariant:[1,"title-badge-variant"],slotPresence:[32],isKeyboardMode:[32]},[[0,"slotchange","handleSlotChange"]],{item:[{handleItemChange:0}],keyboardActive:[{handleKeyboardActiveChange:0}],selected:[{handleSelectedChange:0}],titleBadgeVariant:[{handleTitleBadgeVariantChange:0}]}]);function x(){"undefined"!=typeof customElements&&["xpl-list-item","xpl-avatar","xpl-badge","xpl-button","xpl-divider","xpl-icon","xpl-radio"].forEach((t=>{switch(t){case"xpl-list-item":customElements.get(r(t))||customElements.define(r(t),p);break;case"xpl-avatar":customElements.get(r(t))||n();break;case"xpl-badge":customElements.get(r(t))||d();break;case"xpl-button":customElements.get(r(t))||h();break;case"xpl-divider":customElements.get(r(t))||o();break;case"xpl-icon":customElements.get(r(t))||c();break;case"xpl-radio":customElements.get(r(t))||m()}}))}export{p as X,x as d}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as t,H as i,d as s,h as e,c as n,t as o}from"./p-BT_Lq3Vd.js";import{T as h}from"./p-BUgtURvw.js";import{d as l}from"./p-ByJRw26d.js";const r="hoverClose",a=t(class t extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.navItemClick=s(this,"navItemClick",7),this.openChange=s(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.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(r),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");null==i||i.click()}},this.handleMouseEnter=()=>{this.hasDropdown&&this.hoverModeActive()&&(this.timers.clearCoalesced(r),this.open||(this.hoverOpened=!0,this.open=!0))},this.handleMouseLeave=()=>{this.hasDropdown&&this.open&&this.hoverOpened&&this.timers.scheduleCoalesced(r,(()=>{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(){"undefined"!=typeof window&&"function"==typeof window.matchMedia&&(this.hoverOpenMq=window.matchMedia("(hover: hover) and (pointer: fine) and (min-width: 768px)")),this.syncHostListitemRole(),this.syncHasDropdownFromDom(),this.syncDropdownDocListeners(),this.connectDropdownSlotObserver()}disconnectedCallback(){this.timers.dispose(),this.hoverOpenMq=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(),this.syncDropdownDocListeners()}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(r),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(){var t;null===(t=this.dropdownSlotObserver)||void 0===t||t.disconnect(),this.dropdownSlotObserver=void 0}disconnectListitemContextObservers(){var t,i;null===(t=this.parentListitemContextObserver)||void 0===t||t.disconnect(),this.parentListitemContextObserver=void 0,null===(i=this.selfListitemContextObserver)||void 0===i||i.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(null!=i?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(){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(){var t,i,s;return null!==(s=null!==(i=null!==(t=this.el.closest("xpl-top-nav-menu"))&&void 0!==t?t:this.el.closest("xpl-nav-header-menu"))&&void 0!==i?i:this.el.closest("xpl-top-nav"))&&void 0!==s?s: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(){var t,i;return"hover"===this.openMode&&null!==(i=null===(t=this.hoverOpenMq)||void 0===t?void 0:t.matches)&&void 0!==i&&i}focusTriggerAfterEscape(){this.timers.scheduleCoalesced("focusTriggerAfterEscape",(()=>{var t;this.el.isConnected&&(null===(t=this.el.querySelector(".xpl-top-nav-item__inner"))||void 0===t||t.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((i=>{var s;if(i.nodeType===Node.TEXT_NODE)return Boolean(null===(s=i.textContent)||void 0===s?void 0:s.trim());if(i.nodeType===Node.ELEMENT_NODE){const s=i;if(t.isInternalRenderedHostChild(s))return!1;const e=s.getAttribute("slot");return null==e||""===e}return!1}))}getInnerAriaLabel(){var t,i,s;if(null===(t=this.label)||void 0===t?void 0:t.trim())return;if(this.hasNonDropdownLightDomChild())return;return(null===(i=this.itemAriaLabel)||void 0===i?void 0:i.trim())||((null===(s=this.icon)||void 0===s?void 0:s.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"===(null==i?void 0: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"===(null==i?void 0: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(){var t;if(!this.label)return e("slot",null);const i=null===(t=this.description)||void 0===t?void 0:t.trim();return i?e("span",{class:"xpl-top-nav-item__label-group"},e("span",{class:"xpl-top-nav-item__label",title:this.label},this.label),e("span",{class:"xpl-top-nav-item__description"},i)):e("span",{class:"xpl-top-nav-item__label",title:this.label},this.label)}renderLeading(){return this.isLeadingIconSlotPresent?e("span",{class:"xpl-top-nav-item__leading"},e("slot",{name:"leading-icon"})):this.icon?e("span",{class:"xpl-top-nav-item__leading"},e("xpl-icon",{size:16,icon:this.icon})):null}renderTrailing(){return this.isTrailingIconSlotPresent?e("span",{class:"xpl-top-nav-item__trailing"},e("slot",{name:"trailing-icon"})):this.hasDropdown?e("span",{class:"xpl-top-nav-item__trailing"},e("xpl-icon",{icon:"chevron-down"})):null}renderInner(){const t=this.selected?"page":void 0,i=this.hasDropdown?this.open?"true":"false":void 0,s=this.getInnerAriaLabel(),n=Object.assign(Object.assign({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},s?{"aria-label":s}:{}),{onClick:this.handleClick,onKeyDown:this.handleKeyDown});return null==this.href||this.hasDropdown?e("button",Object.assign({},n,{type:"button"}),this.renderLeading(),this.renderLabelContent(),this.renderTrailing()):e("a",Object.assign({},n,{href:this.href}),this.renderLeading(),this.renderLabelContent(),this.renderTrailing())}render(){return e(n,Object.assign({key:"5de7a361dd1f3e0aaa3f98ebb8013118cb5c1a22",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&&e("div",{key:"e076a46dab0d877fdac2eadf09c1fa1bdc97b9bd",id:this.dropdownPanelId,class:"xpl-top-nav-item__dropdown"},e("slot",{key:"3a6c88fe606672b09b45bb5d8a22d05b26e84e30",name:"dropdown"})))}get el(){return this}static get watchers(){return{hasDropdown:[{onHasDropdownChanged:0}],open:[{onOpenChanged:0}]}}},[260,"xpl-top-nav-item",{active:[516],description:[1],href:[1],icon:[1],itemAriaLabel:[1,"item-aria-label"],label:[1],open:[1540],openMode:[513,"open-mode"],selected:[516],hasActiveDescendant:[32],hasDropdown:[32],isLeadingIconSlotPresent:[32],hostListitemRole:[32],isTrailingIconSlotPresent:[32],closeMenu:[64],openMenu:[64],toggleMenu:[64]},[[0,"_xplCloseNavDropdown","handleCloseNavDropdownRequest"]],{hasDropdown:[{onHasDropdownChanged:0}],open:[{onOpenChanged:0}]}]);function d(){"undefined"!=typeof customElements&&["xpl-top-nav-item","xpl-icon"].forEach((t=>{switch(t){case"xpl-top-nav-item":customElements.get(o(t))||customElements.define(o(t),a);break;case"xpl-icon":customElements.get(o(t))||l()}}))}export{a as T,d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{p as t,H as s,d as i,h as a,c as e,t as h}from"./p-BT_Lq3Vd.js";import{d as n}from"./p-ByJRw26d.js";const l=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.close=i(this,"close",7),this.tagDragEnd=i(this,"tagDragEnd",7),this.tagDragStart=i(this,"tagDragStart",7),this.tagRemove=i(this,"tagRemove",7),this.dismissAriaLabelSuffix="tag",this.isDragging=!1,this.disabled=!1,this.dismissible=!0,this.isDraggable=!1,this.size="default",this.handleTagClick=()=>{this.disabled||this.isDraggable||this.close.emit()},this.setDragPreviewToHost=t=>{if(t.dataTransfer)try{const s=this.el.getBoundingClientRect(),i=Math.max(0,t.clientX-s.left),a=Math.max(0,t.clientY-s.top);t.dataTransfer.setDragImage(this.el,i,a)}catch(t){}},this.handleContentKeyDown=t=>{this.disabled||"Enter"!==t.key&&" "!==t.key||t.preventDefault()},this.handleDismissClick=t=>{t.stopPropagation(),this.disabled||(this.close.emit(),this.tagRemove.emit())},this.handleDragStart=t=>{this.isDragging=!0,t.dataTransfer&&(t.dataTransfer.effectAllowed="move",this.setDragPreviewToHost(t),this.tagId&&t.dataTransfer.setData("application/x-tag-id",this.tagId),t.dataTransfer.setData("text/plain",this.getContentLabelText())),this.tagDragStart.emit({tagId:this.tagId,content:this.getContentLabelText(),originalEvent:t})},this.handleDragEnd=t=>{var s;this.isDragging=!1;const i="move"===(null===(s=t.dataTransfer)||void 0===s?void 0:s.dropEffect);this.tagDragEnd.emit({tagId:this.tagId,dropped:i,originalEvent:t})},this.handleDragOver=t=>{!this.disabled&&this.isDraggable&&(t.preventDefault(),t.dataTransfer&&(t.dataTransfer.dropEffect="move"))},this.handleDragEnter=t=>{!this.disabled&&this.isDraggable&&t.preventDefault()},this.handleHostDragStart=t=>{t.target===this.el&&this.isDraggable&&t.preventDefault()}}onDisabledChange(t){t&&this.isDragging&&(this.isDragging=!1)}onIsDraggableChange(t){!t&&this.isDragging&&(this.isDragging=!1)}componentDidRender(){queueMicrotask((()=>this.syncDismissAriaLabelSuffix()))}getContentLabelText(){var t,s;return(null!==(s=null===(t=this.el.querySelector(".xpl-tag__content"))||void 0===t?void 0:t.textContent)&&void 0!==s?s:"").trim()}syncDismissAriaLabelSuffix(){if(!this.el.isConnected)return;const t=this.getContentLabelText(),s=""===t?"tag":t;s!==this.dismissAriaLabelSuffix&&(this.dismissAriaLabelSuffix=s)}render(){const t=this.isDraggable&&!this.disabled;return a(e,{key:"4b8228da443d411561306e790333d676fc3907e3",class:{"xpl-tag":!0,"xpl-tag-container":!0,"xpl-tag--disabled":this.disabled,"xpl-tag--dismissible":this.dismissible,"xpl-tag--dragging":this.isDragging,"xpl-tag--draggable":t,"xpl-tag--sm":"sm"===this.size},onDragOver:t?this.handleDragOver:void 0,onDragEnter:t?this.handleDragEnter:void 0,onDragStart:this.isDraggable?this.handleHostDragStart:void 0},t?a("div",{class:"xpl-tag__content xpl-tag",role:"button",tabIndex:0,draggable:!0,"aria-grabbed":String(this.isDragging),onClick:this.handleTagClick,onKeyDown:this.handleContentKeyDown,onDragStart:this.handleDragStart,onDragEnd:this.handleDragEnd},a("slot",null)):a("button",{class:"xpl-tag__content xpl-tag",type:"button",disabled:this.disabled,onClick:this.handleTagClick},a("slot",null)),this.dismissible&&a("button",{key:"bf634c6b75d1cd2eaadff8e4459b74a097e3f221",class:"xpl-tag__dismiss xpl-tag__close",type:"button",draggable:!1,disabled:this.disabled,"aria-label":`Dismiss ${this.dismissAriaLabelSuffix}`,onClick:this.handleDismissClick},a("xpl-icon",{key:"fb37896890c9afb56c02a3ff4e62f096c416a569",icon:"xmark",size:10})))}get el(){return this}static get watchers(){return{disabled:[{onDisabledChange:0}],isDraggable:[{onIsDraggableChange:0}]}}},[260,"xpl-tag",{disabled:[4],dismissible:[4],isDraggable:[4,"is-draggable"],size:[1],tagId:[1,"tag-id"],dismissAriaLabelSuffix:[32],isDragging:[32]},void 0,{disabled:[{onDisabledChange:0}],isDraggable:[{onIsDraggableChange:0}]}]);function o(){"undefined"!=typeof customElements&&["xpl-tag","xpl-icon"].forEach((t=>{switch(t){case"xpl-tag":customElements.get(h(t))||customElements.define(h(t),l);break;case"xpl-icon":customElements.get(h(t))||n()}}))}export{l as T,o as d}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as e,H as t,d as s,h as i,F as l,c as o,t as n}from"./p-BT_Lq3Vd.js";import{t as a}from"./p-CzwViN3U.js";import{d as c}from"./p-DKUNbsb0.js";import{d as h}from"./p-BDWXBWGE.js";import{d}from"./p-2xGSxBGa.js";import{d as r}from"./p-CUYkG-PB.js";import{d as p}from"./p-ByJRw26d.js";import{d as u}from"./p-ZTFt9sBy.js";import{v}from"./p-CK3_k8jD.js";function m(e){return e.label||e.value}function b(e){return e.flatMap((e=>e.groupName&&e.options?e.options:[e]))}const g=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.selectChange=s(this,"selectChange",7),this.changeEvent=s(this,"changeEvent",7),this.dropdownStateChange=s(this,"dropdownStateChange",7),this.triggerDropdown=s(this,"triggerDropdown",7),this.choices=[],this.selectIcon="chevron-down",this.dropdownPlacement="bottom-start",this.mode="single",this.truncate=!0,this.active=!1,this.id=v(),this.keepFocus=!1,this.visibleChoices=1/0,this.choicesState=[],this.value=this.calculateValue(),this.dropdownOpenState=!1,this.container=null,this.dropdown=null,this.handleResizeThrottled=a((()=>{this.maybeTruncateChoices()}),250),this.handleTabKeyDown=e=>{"Tab"===e.key&&(this.keepFocus=!0)},this.handleTagRemove=e=>{const t=t=>(null==e?void 0:e.value)&&t.value===e.value||(null==e?void 0:e.label)&&t.label===e.label;this.choicesState=this.choicesState.map((e=>{var s;return Object.assign(Object.assign({},e),{isSelected:!t(e)&&e.isSelected,options:null===(s=e.options)||void 0===s?void 0:s.map((e=>Object.assign(Object.assign({},e),{isSelected:!t(e)&&e.isSelected})))})}))},this.handleDropdownScroll=e=>{const{scrollTop:t,scrollHeight:s,clientHeight:i}=this.dropdown.querySelector(".xpl-dropdown-list");(0===t&&e.deltaY<0||t+i>=s&&e.deltaY>0)&&e.preventDefault()}}onChoicesPropChanged(e){this.choicesState=this.initializeChoicesState()}onSelectedValuesPropChanged(){this.choicesState=this.initializeChoicesState()}onChoicesStateChanged(){this.update()}handleValueStateChange(e){this.selectChange.emit(e),this.changeEvent.emit("single"===this.mode?e:(null==e?void 0:e.length)?e.split("|"):[]),this.customDisplayValue&&null!==this.container&&(this.container.querySelectorAll(".custom-display-value").forEach((t=>{t.classList.toggle("display-active",e.length>0),t.classList.toggle("display-inactive",0===e.length)})),this.container.querySelectorAll(".placeholder").forEach((t=>{t.classList.toggle("placeholder-hidden",e.length>0)})))}onDropdownOpenStateChanged(e){this.dropdownStateChange.emit(e)}initializeChoicesState(){return this.choices.map((e=>{var t;const s="string"==typeof this.selectedValues?[this.selectedValues]:this.selectedValues;return Object.assign(Object.assign({},e),{isSelected:e.isSelected||(null==s?void 0:s.includes(e.value||e.label)),options:null===(t=e.options)||void 0===t?void 0:t.map((e=>Object.assign(Object.assign({},e),{isSelected:e.isSelected||(null==s?void 0:s.includes(e.value||e.label))})))})}))}maybeTruncateChoices(){var e,t;if("single"===this.mode||!this.truncate)return;const s=null===(e=this.container)||void 0===e?void 0:e.getBoundingClientRect().width;let i=0,l=0;const o=null===(t=b(this.choicesState))||void 0===t?void 0:t.filter((e=>e.isSelected));if(!o.length)return;const n=o.length;o.forEach(((e,t)=>(l+=function(e){const t=document.createElement("canvas").getContext("2d");return t.font="14px apple-system, system-ui, 'Segoe UI', Arial, Helvetica, Roboto, sans-serif",t.measureText(e).width+44}(m(o[t])),l>s-140||(i+=1),null))),i>=n&&(i=1/0),i<1&&(i=1),this.visibleChoices=i}closeDropdown(){var e;(null===(e=this.dropdown)||void 0===e?void 0:e.isOpen)&&(this.dropdown.isOpen=!1,this.active=!1)}calculateValue(){const e=b(this.choicesState).filter((e=>e.isSelected));return e.length?"single"===this.mode?e[0].value||e[0].label:e.map((e=>e.value||e.label)).join("|"):""}update(){this.value=this.calculateValue(),this.maybeTruncateChoices()}renderLabel(){return this.label||this.description?i("label",{class:{"xpl-label":!0,"xpl-label--disabled":this.disabled},htmlFor:this.id},this.label,this.description&&i("small",{class:{"xpl-description":!0,"xpl-description--disabled":this.disabled}},this.description)):null}renderSelectedTags(){let e=0;const t=b(this.choicesState).filter((e=>e.isSelected));return t.length?t.map(((s,l)=>e>=this.visibleChoices?null:(e+=1,i("xpl-tag",{onClose:()=>this.handleTagRemove(t[l])},m(t[l]))))):null}renderError(){return this.error?i("label",{class:"xpl-input-error",htmlFor:this.id},i("xpl-icon",{icon:"alert-circle"}),this.error):null}componentWillLoad(){this.choicesState=this.initializeChoicesState()}handleClickEvent(e){const t=e.target.closest(".xpl-select");null!==t&&t===this.container||this.closeDropdown()}handleKeyDown(e){var t;"Escape"===e.key&&(this.active||(null===(t=this.container)||void 0===t?void 0:t.contains(document.activeElement)))&&this.closeDropdown()}handleResize(){this.handleResizeThrottled()}componentDidLoad(){requestAnimationFrame((()=>{this.maybeTruncateChoices()}))}disconnectedCallback(){var e;null===(e=this.handleResizeThrottled)||void 0===e||e.cancel()}handleDropdownTrigger(){var e,t;if(this.disabled)return;const s=null!==(t=null===(e=this.dropdown)||void 0===e?void 0:e.isOpen)&&void 0!==t&&t,i=!s;this.triggerDropdown.emit({prevState:s,nextState:i}).defaultPrevented||(this.dropdownOpenState=i,this.dropdown&&(this.dropdown.isOpen=i))}async reset(){this.closeDropdown(),this.choicesState=this.choicesState.map((e=>{var t;return Object.assign(Object.assign({},e),{isSelected:!1,options:null===(t=e.options)||void 0===t?void 0:t.map((e=>Object.assign(Object.assign({},e),{isSelected:!1})))})}))}render(){var e,t,s,n;const a=b(this.choicesState).filter((e=>e.isSelected)),c=(null===(e=a[0])||void 0===e?void 0:e.label)||(null===(t=a[0])||void 0===t?void 0:t.value),h=a.length>1&&this.visibleChoices<1/0&&this.truncate&&!this.customDisplayValue,d=`+ ${Math.abs(this.choicesState.filter((e=>e.isSelected)).length-this.visibleChoices)} more`;return i(o,{key:"1428590871e33aa2b506904114caa4b36d08e9f9",class:{"xpl-select":!0,"xpl-select--disabled":this.disabled,"xpl-select--no-truncate":!this.truncate,[null!==(s=this.classNames)&&void 0!==s?s:""]:!!this.classNames},onKeyDown:this.handleTabKeyDown,ref:e=>{this.container=e}},this.renderLabel(),i("div",{key:"02766a897e7e1152fc7e0a65c561ac8b25cd2ce4",class:{"xpl-input":!0,"xpl-input--disabled":this.disabled,"xpl-input--error":(null===(n=this.error)||void 0===n?void 0:n.length)>=0}},i("div",{key:"d18740165a8c8a3334603500ad4b633783274935",class:"xpl-input-wrapper"},i("button",{key:"a54e65c565ace5276a72d1f1cb6ac9cccbcf3f2e",class:"xpl-select__trigger",disabled:this.disabled,id:this.id,onKeyDown:this.handleTabKeyDown,onClick:e=>{e.preventDefault(),this.handleDropdownTrigger()},type:"button"},i("div",{key:"fca29be85e2655a50f9ed0e1619c7de9b7220321",class:{"xpl-select-value":!0,"xpl-select-value--active":"multi"===this.mode&&this.value.length>0,"has-value":this.value.length>0}},(()=>this.customDisplayValue?i(l,null,i("div",{class:{"custom-display-value":!0,"custom-display-value--inactive":0===this.value.length}},i("slot",{name:"custom-display-value"})),i("span",{class:{"xpl-placeholder--hidden":this.value.length>0}},this.placeholder)):"single"===this.mode?c||this.placeholder:this.value.length>0?this.renderSelectedTags():this.placeholder)(),h&&d),i("xpl-icon",{key:"c58b026d3e2831c832c3bc54489525119af70e8f",class:"xpl-select__chevron-down",icon:this.selectIcon}))),!this.disabled&&i("xpl-dropdown",{key:"c0f1a6e4be933f05c5ba88ed20a3ccebeaf895c5",ref:e=>{this.dropdown=e},isOpen:this.dropdownOpenState,options:this.choicesState,selectedValues:this.selectedValues,mode:this.mode,triggerId:this.id,update:(e,{component:t})=>{const{options:s}=t;s&&s.length>0&&(this.choicesState=s)},onIsOpenChange:e=>{this.dropdownOpenState=e.detail},onWheel:this.handleDropdownScroll,anchorToTrigger:!0,flipFallbackPlacements:this.dropdownFlipFallbackPlacements,placement:this.dropdownPlacement}),this.renderError()),i("input",{key:"48958ae33322efe0e3de08eb9da2baac981e58a2",type:"hidden",name:this.name,value:this.value}))}static get watchers(){return{choices:[{onChoicesPropChanged:0}],selectedValues:[{onSelectedValuesPropChanged:0}],choicesState:[{onChoicesStateChanged:0}],value:[{handleValueStateChange:0}],dropdownOpenState:[{onDropdownOpenStateChanged:0}]}}},[260,"xpl-select",{choices:[16],selectIcon:[1,"select-icon"],description:[1],disabled:[4],dropdownFlipFallbackPlacements:[16],dropdownPlacement:[1,"dropdown-placement"],error:[1],label:[1],mode:[1],name:[1],placeholder:[1],truncate:[4],customDisplayValue:[4,"custom-display-value"],selectedValues:[1,"selected-values"],classNames:[1,"class-names"],active:[32],id:[32],keepFocus:[32],visibleChoices:[32],choicesState:[32],value:[32],dropdownOpenState:[32],reset:[64]},[[8,"click","handleClickEvent"],[8,"keydown","handleKeyDown"],[9,"resize","handleResize"]],{choices:[{onChoicesPropChanged:0}],selectedValues:[{onSelectedValuesPropChanged:0}],choicesState:[{onChoicesStateChanged:0}],value:[{handleValueStateChange:0}],dropdownOpenState:[{onDropdownOpenStateChanged:0}]}]);function x(){"undefined"!=typeof customElements&&["xpl-select","xpl-dropdown","xpl-dropdown-group","xpl-dropdown-heading","xpl-dropdown-option","xpl-icon","xpl-tag"].forEach((e=>{switch(e){case"xpl-select":customElements.get(n(e))||customElements.define(n(e),g);break;case"xpl-dropdown":customElements.get(n(e))||c();break;case"xpl-dropdown-group":customElements.get(n(e))||h();break;case"xpl-dropdown-heading":customElements.get(n(e))||d();break;case"xpl-dropdown-option":customElements.get(n(e))||r();break;case"xpl-icon":customElements.get(n(e))||p();break;case"xpl-tag":customElements.get(n(e))||u()}}))}export{g as S,x as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{p as e,H as i,d as t,h as s,c as l,t as n}from"./p-BT_Lq3Vd.js";import{d as c}from"./p-ByJRw26d.js";const a=e(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.inputChange=t(this,"inputChange",7),this.accept="",this.multiple=!1,this.hideTriggerOnSelect=!1,this.hideFileNames=!1,this.hideAcceptText=!1,this.files=null,this.openFileDialog=()=>{var e;this.disabled||null===(e=this.fileInput)||void 0===e||e.click()},this.handleFileChange=e=>{this.files=Array.from(e.target.files)},this.onRemoveFileByIndex=e=>{this.files=this.files.filter(((i,t)=>t!==e))}}onFilesChange(e){this.inputChange.emit({type:"file",value:e})}async removeFileByIndex(e){this.onRemoveFileByIndex(e)}render(){var e,i;return s(l,{key:"42d8f9897e024eb89dc7568f3b99f5a395131294",class:{"xpl-input-file":!0,"xpl-input-file--hide-trigger-on-select":this.hideTriggerOnSelect,"xpl-input-file--disabled":this.disabled}},s("span",{key:"90d5962d5c72ed675cfb18444d814d26a231e4a6",class:{"xpl-input-file__trigger-wrapper":!0,"xpl-input-file__trigger-wrapper--hidden":this.hideTriggerOnSelect&&(null===(e=this.files)||void 0===e?void 0:e.length)>0},role:"button",tabIndex:0,onClick:this.openFileDialog},s("slot",{key:"ad648187fbd71bdccd99db542460e85715507f76",name:"trigger"})),(null===(i=this.files)||void 0===i?void 0:i.length)>0&&!this.hideFileNames&&s("ul",{key:"edf302f553f738ecc35e0ce64f73e4b6713b76e7",class:"xpl-input-file__file-list"},this.files.map(((e,i)=>s("li",{class:"xpl-input-file__file-item"},s("span",{class:"xpl-text-callout"},e.name),s("xpl-icon",{icon:"x-circle",size:24,onClick:e=>{e.preventDefault(),e.stopPropagation(),this.onRemoveFileByIndex(i)},class:"xpl-input-file__remove-icon"}))))),this.accept&&!this.hideAcceptText&&s("span",{key:"56f627241c314b9018cd963ea55a997364b63abf",class:"xpl-input-file__accept xpl-text-caption"},"Accepted file types: ",this.accept),s("input",{key:"47180dbed43ab7f3291faeadbe0ddce261d75f25",onChange:this.handleFileChange,type:"file",ref:e=>{this.fileInput=e},hidden:!0,accept:this.accept,multiple:this.multiple,name:this.name}))}get el(){return this}static get watchers(){return{files:[{onFilesChange:0}]}}},[260,"xpl-input-file",{disabled:[4],name:[1],_id:[1],accept:[1],multiple:[4],hideTriggerOnSelect:[4,"hide-trigger-on-select"],hideFileNames:[4,"hide-file-names"],hideAcceptText:[4,"hide-accept-text"],files:[32],removeFileByIndex:[64]},void 0,{files:[{onFilesChange:0}]}]);function p(){"undefined"!=typeof customElements&&["xpl-input-file","xpl-icon"].forEach((e=>{switch(e){case"xpl-input-file":customElements.get(n(e))||customElements.define(n(e),a);break;case"xpl-icon":customElements.get(n(e))||c()}}))}export{a as I,p as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{p as e,t as c,H as n,h as o,c as t}from"./p-BT_Lq3Vd.js";import{d as a}from"./p-ByJRw26d.js";const i=e(class extends n{constructor(e){super(),!1!==e&&this.__registerHost(),this.initialExpanded=!1,this.size="3",this.borderType="none",this.expanded=this.initialExpanded,this.toggleAccordion=e=>{e.stopPropagation(),this.expanded=!this.expanded}}watchInitialExpanded(){this.expanded=this.initialExpanded}async parentCheckboxChange(e){return this.el.querySelectorAll(".xpl-accordion-content .xpl-checkbox:not([disabled])").forEach((c=>{c.checked=e})),null}handleChildCheckboxChange(){const e=this.el.querySelectorAll(".xpl-accordion-content .xpl-checkbox:not([disabled])"),c=Array.from(e).filter((e=>e.checked)).length,n=this.el.querySelector(".xpl-accordion-header xpl-checkbox")||this.el.querySelector(".xpl-accordion-header input");if(n)switch(c){case 0:n.checked=!1,n.indeterminate=!1;break;case e.length:n.checked=!0,n.indeterminate=!1;break;default:n.checked=!1,n.indeterminate=!0}}listenToChangeEvent(){this.handleChildCheckboxChange()}render(){return o(t,{key:"bae6a1bb97a21f3f49792be58fc72941ce5d8bed",class:"xpl-accordion "+{none:"",bordered:"xpl-accordion--border-bordered"+(this.expanded?"--expanded":""),bottom:"xpl-accordion--border-bottom"+(this.expanded?"--expanded":"")}[this.borderType]},o("button",{key:"255fc29fec4cdcc45f8e02daef062f35c5b8b74b","aria-expanded":this.expanded,"aria-controls":this.contentId,class:"xpl-accordion-toggle-area",onClick:this.toggleAccordion,type:"button"},o("header",{key:"0e5454de19424b6412b01c50227bc001e6ab5b3a",class:"xpl-accordion-header xpl-accordion-header--size-"+this.size},o("slot",{key:"438e8876c6c1c1b04282ce4d978284e3d6f7fa9a",name:"heading"},this.header),o("xpl-icon",{key:"055818cbd1606ad560e4fa172c3d1130a6831f5f",size:16,icon:"chevron-down",class:"xpl-accordion-icon-chevron "+(this.expanded?"xpl-accordion-icon-chevron--rotate":"")})),o("div",{key:"45f9ec5e1b6b4f6d21f7b126972543849353747c",class:"xpl-accordion-description"},o("slot",{key:"af85f48df4ddf572f5bef6da49c852152f44cc06",name:"description"},this.description))),o("section",{key:"fc2c6d12354cb6e972cf82ae988e647ea0a0dc26",id:this.contentId,role:"region",class:`xpl-accordion-content xpl-accordion-content--${this.expanded?"shown":"hidden"} ${this.expanded?{none:"",bordered:"xpl-accordion-content--shown-bordered",bottom:"xpl-accordion-content--shown-border-bottom"}[this.borderType]:""}`},o("slot",{key:"9fe9c25e6180a84cd73fec1a69984455417dc225",name:"content"})))}get el(){return this}static get watchers(){return{initialExpanded:[{watchInitialExpanded:0}]}}},[260,"xpl-accordion",{contentId:[1,"content-id"],header:[1],description:[1],initialExpanded:[4,"initial-expanded"],size:[1],borderType:[1,"border-type"],expanded:[32],parentCheckboxChange:[64]},[[0,"checkboxChange","listenToChangeEvent"]],{initialExpanded:[{watchInitialExpanded:0}]}]),d=i,s=function(){"undefined"!=typeof customElements&&["xpl-accordion","xpl-icon"].forEach((e=>{switch(e){case"xpl-accordion":customElements.get(c(e))||customElements.define(c(e),i);break;case"xpl-icon":customElements.get(c(e))||a()}}))};export{d as XplAccordion,s as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{p as e,H as a,h as t,c as l,t as i}from"./p-BT_Lq3Vd.js";import{d as s}from"./p-C8rmEAx6.js";const n=e(class extends a{constructor(e){super(),!1!==e&&this.__registerHost(),this.withSubnav=!1,this.withUtility=!0,this.navWidth="default",this.navOpen=!0}closeNavOnMobile(){window.innerWidth<=640&&(this.navOpen=!1)}navToggleHandler(){this.navOpen=!this.navOpen}navWithHandler(e){this.navWidth=e.detail}onWindowResize(){this.closeNavOnMobile()}connectedCallback(){this.closeNavOnMobile()}componentWillLoad(){this.navOpen=void 0!==this.isNavOpenAtStartup?this.isNavOpenAtStartup:this.navOpen}render(){let e="xpl-application-shell";this.withUtility&&(e+=" xpl-application-shell--with_utility");let a="xpl-application-shell__nav";return a+=this.navOpen?` xpl-application-shell__nav--${this.navWidth}--open`:" xpl-application-shell__nav--"+this.navWidth,t(l,{key:"1e7abbb1e45ea9cadfa9528ae2053f8239e69242",class:e},t("div",{key:"5fa3455f3de406db9bf392ae14a515f7fe603d59",class:a},t("slot",{key:"b9ee294553892cc2235f9b2b4c3503d293d56ddc",name:"nav"})),t("div",{key:"dc6ad7c9288385a47e1d6992bef56ceafcd04603",class:"xpl-application-shell__subnav"},t("slot",{key:"b31965275416b556194f4f65e4b66bf72f531779",name:"subnav"})),t("div",{key:"664d58b3ce69d7106ead13fe1a6a7a72cec0cceb",class:"xpl-application-shell__utility"},t("slot",{key:"d44f3614b627099443c70f23f258016a66d42716",name:"utility"})),t("div",{key:"0f8c629b737114fe40ae3bf3d2fbe3d18e3af0b9",class:"xpl-application-shell__content"},t("slot",{key:"814afd80ea91d4b2859e3619e499791f728eb22b",name:"content"})),t("xpl-backdrop",{key:"490bf22787f1920f500f75eabf6a692e545d0ea3",onClick:()=>this.navToggleHandler(),class:{"xpl-application-shell__backdrop--open":this.navOpen},relative:!0}))}},[260,"xpl-application-shell",{withSubnav:[4,"with-subnav"],withUtility:[4,"with-utility"],navWidth:[1,"nav-width"],isNavOpenAtStartup:[4,"is-nav-open-at-startup"],navOpen:[32]},[[0,"navOpen","navToggleHandler"],[0,"navWidth","navWithHandler"],[9,"resize","onWindowResize"]]]),p=n,c=function(){"undefined"!=typeof customElements&&["xpl-application-shell","xpl-backdrop"].forEach((e=>{switch(e){case"xpl-application-shell":customElements.get(i(e))||customElements.define(i(e),n);break;case"xpl-backdrop":customElements.get(i(e))||s()}}))};export{p as XplApplicationShell,c as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as
|
|
1
|
+
import{A as s,d as o}from"./p-Bsy-VVS5.js";const p=s,r=o;export{p as XplAvatar,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as o,d as
|
|
1
|
+
import{B as o,d as r}from"./p-C8rmEAx6.js";const s=o,m=r;export{s as XplBackdrop,m as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as o,d as s}from"./
|
|
1
|
+
import{B as o,d as s}from"./p-C5_Yo0ZP.js";const p=o,r=s;export{p as XplBadge,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{p as e,H as i,d as t,h as s,c as n,t as a}from"./p-BT_Lq3Vd.js";import{d as r}from"./p-D2SFagIb.js";import{d as o}from"./p-ByJRw26d.js";const c=e(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.action=t(this,"action",7),this.dismiss=t(this,"dismiss",7),this.secondaryAction=t(this,"secondaryAction",7),this.appearance="information",this.hasIcon=!0,this.isDismissible=!0,this.isSection=!1,this.truncateDesc=!1}getIcon(){switch(this.appearance){case"positive":return"circle-check";case"warning":return"triangle-warning";case"error":return"octagon-warning";default:return"circle-info"}}getActionButtonState(){return this.isSection&&"positive"===this.appearance?"success":"error"===this.appearance?"warning":void 0}getActionButtonVariant(){return this.isSection?"subtle":"error"===this.appearance?"primary":"subtle"}getAriaLabel(){var e;return this.isSection?(null===(e=this.heading)||void 0===e?void 0:e.trim())||"Section banner":{information:"Information banner",positive:"Positive banner",warning:"Warning banner",error:"Error banner"}[this.appearance]}render(){var e,i,t,a;const r=!!(null===(e=this.actionText)||void 0===e?void 0:e.trim()),o=!!(null===(i=this.secondaryActionText)||void 0===i?void 0:i.trim()),c=this.getActionButtonVariant(),b=this.getActionButtonState(),d=!!(null===(t=this.heading)||void 0===t?void 0:t.trim()),l=!!(null===(a=this.description)||void 0===a?void 0:a.trim());return s(n,{key:"6d137a4577f93942bcb41b3b2f67f3d851bee454",class:{"xpl-banner":!0,"xpl-banner--section":this.isSection,["xpl-banner--"+this.appearance]:!0,"xpl-banner--truncate-desc":this.truncateDesc,"xpl-banner--no-icon":this.isSection&&!this.hasIcon},role:"region","aria-label":this.getAriaLabel()},(!this.isSection||this.hasIcon)&&s("div",{key:"e854bc2ca363a23e3e6cb9eb512886c325e09362",class:"xpl-banner__icon","aria-hidden":"true"},s("xpl-icon",{key:"14a0916310e6e0b68f9a36b4e1714cee015ad22f",icon:this.getIcon(),size:24})),s("div",{key:"bea8f5cafe66e649926aa0ee634b71ffa0f1b73e",class:"xpl-banner__body"},d&&s("p",{key:"f18ae9e7d4014211eea3a160fb05945149705832",class:"xpl-banner__heading"},this.heading),l&&s("p",{key:"e36c00dadf6bd0d35b88c9a091d140573e6b6677",class:"xpl-banner__description",title:this.truncateDesc?this.description:void 0},this.description)),(r||o)&&s("div",{key:"dda19df805050c93d5c5ea8214f97084a5b0c0eb",class:"xpl-banner__actions"},r&&s("xpl-button",{key:"5bd3047d1b8250ed28a7720fb09f316a3b45bae1",size:"xs",variant:c,state:b,onClick:()=>this.action.emit()},this.actionText),o&&s("xpl-button",{key:"c0f0a32b69384194e4033ae85eebc788e005a8af",size:"xs",variant:c,state:b,onClick:()=>this.secondaryAction.emit()},this.secondaryActionText)),this.isDismissible&&s("button",{key:"721faa946e9fc896a6bafafd8450d81f50e982ed",class:"xpl-banner__dismiss",type:"button","aria-label":`Dismiss ${this.isSection?"section ":""}banner`,onClick:()=>this.dismiss.emit()},s("xpl-icon",{key:"4c27dbd8b394839ed98f5b4e2d4720eba1b0184f",icon:"xmark",size:24,"aria-hidden":"true"})))}},[0,"xpl-banner",{actionText:[1,"action-text"],appearance:[1],description:[1],hasIcon:[4,"has-icon"],heading:[1],isDismissible:[4,"is-dismissible"],isSection:[4,"is-section"],secondaryActionText:[1,"secondary-action-text"],truncateDesc:[4,"truncate-desc"]}]),b=c,d=function(){"undefined"!=typeof customElements&&["xpl-banner","xpl-button","xpl-icon"].forEach((e=>{switch(e){case"xpl-banner":customElements.get(a(e))||customElements.define(a(e),c);break;case"xpl-button":customElements.get(a(e))||r();break;case"xpl-icon":customElements.get(a(e))||o()}}))};export{b as XplBanner,d as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{p as e,H as a,h as t,c,t as s}from"./p-BT_Lq3Vd.js";const r=e(class extends a{constructor(e){super(),!1!==e&&this.__registerHost(),this.chevron='<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="chevron-right" class="svg-inline--fa fa-chevron-right fa-w-10" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512">\n <path fill="currentColor" d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"></path>\n </svg>\n '}render(){return t(c,{key:"dd246c29fcb1afca4007299380a59b47c0a10c9d",class:"xpl-breadcrumb-item",role:"listitem"},t("li",{key:"b6df20888b3891241e52f0f2be14f1eedee2cac6",role:"none"},t("slot",{key:"f2f64effe0f58bb33bc983abfaa8b2996714e3b4"})),t("span",{key:"31c15dd296e6dab1d207a84179a4803b7366c1a2",innerHTML:this.chevron}))}},[260,"xpl-breadcrumb-item"]),n=r,i=function(){"undefined"!=typeof customElements&&["xpl-breadcrumb-item"].forEach((e=>{"xpl-breadcrumb-item"===e&&(customElements.get(s(e))||customElements.define(s(e),r))}))};export{n as XplBreadcrumbItem,i as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{p as e,H as a,h as c,c as s,t as d}from"./p-BT_Lq3Vd.js";const r=e(class extends a{constructor(e){super(),!1!==e&&this.__registerHost()}render(){return c(s,{key:"d4a4ae7bbf7f8eafc8a44b56c66983303e039d7e"},c("nav",{key:"8e5decbdce778c1768e3412a59663cd37938f361",class:"xpl-breadcrumbs","aria-label":"Breadcrumb"},c("ol",{key:"612620c37a84ad022b9da5cdb884410a4df4dd29",role:"list"},c("slot",{key:"ae6cfc4f4e65ba7ca755fa7d9eb3751aae8905ff"}))))}},[260,"xpl-breadcrumbs"]),t=r,b=function(){"undefined"!=typeof customElements&&["xpl-breadcrumbs"].forEach((e=>{"xpl-breadcrumbs"===e&&(customElements.get(d(e))||customElements.define(d(e),r))}))};export{t as XplBreadcrumbs,b as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{p as t,H as s,d as e,h as c,c as i,t as o}from"./p-BT_Lq3Vd.js";import{d as a}from"./p-D2SFagIb.js";import{d as n}from"./p-ByJRw26d.js";const r=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.clickPrimary=e(this,"clickPrimary",7),this.clickSecondary=e(this,"clickSecondary",7),this.clickTertiary=e(this,"clickTertiary",7),this.onPrimary=()=>this.clickPrimary.emit(),this.onSecondary=()=>this.clickSecondary.emit(),this.onTertiary=()=>this.clickTertiary.emit()}render(){return c(i,{key:"9cd6193bed50a82872803b95bd5fc56c9347dd1a",class:"xpl-button-row"},c("div",{key:"eefebfcad667ceec154117b9318e2ff88c420f8f",class:"xpl-button-row-inner"},c("div",{key:"94633d213b36306cf51a70e04d21a964ca13c430",class:"xpl-button-row__left"},this.secondary&&c("xpl-button",{key:"2e47003e6f35f5acd7a6129c903d4591cc10759f",variant:"secondary",type:"button",onClick:this.onSecondary},this.secondary)),c("div",{key:"05397d469cd97188f56934354850a8c3cd77e4d6",class:"xpl-button-row__right"},this.tertiary&&c("xpl-button",{key:"d3f6a953144e8e64aa34a37c9c80f7363dc0ee9c",variant:"subtle",type:"button",onClick:this.onTertiary},this.tertiary),this.secondary&&c("xpl-button",{key:"abd03f3c33a48517a7f268ecf302767e605a2400",variant:"secondary",type:"button",onClick:this.onSecondary},this.secondary),this.primary&&c("xpl-button",{key:"be417c38b0427e9cdbbacb700d4651677cff8ec9",class:"xpl-button-row__primary",onClick:this.onPrimary},this.primary))))}},[0,"xpl-button-row",{primary:[1],secondary:[1],tertiary:[1]}]),l=r,d=function(){"undefined"!=typeof customElements&&["xpl-button-row","xpl-button","xpl-icon"].forEach((t=>{switch(t){case"xpl-button-row":customElements.get(o(t))||customElements.define(o(t),r);break;case"xpl-button":customElements.get(o(t))||a();break;case"xpl-icon":customElements.get(o(t))||n()}}))};export{l as XplButtonRow,d as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as o,d as
|
|
1
|
+
import{B as o,d as s}from"./p-D2SFagIb.js";const a=o,p=s;export{a as XplButton,p as defineCustomElement}
|