@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
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host, g as getElement, c as createEvent, F as Fragment, f as forceUpdate } from './index-
|
|
2
|
-
import { v as v4 } from './v4-
|
|
1
|
+
import { r as registerInstance, h, H as Host, g as getElement, c as createEvent, F as Fragment, f as forceUpdate } from './index-CXkZUm1c.js';
|
|
2
|
+
import { v as v4 } from './v4-CK3_k8jD.js';
|
|
3
3
|
import { f as flatpickr } from './index-CH4yJ6Qx.js';
|
|
4
|
+
import { T as TimerManager } from './lifecycle-BUgtURvw.js';
|
|
4
5
|
|
|
5
6
|
const LEGACY_STATUS_TO_BADGE = {
|
|
6
7
|
active: 'green',
|
|
@@ -167,7 +168,7 @@ const Backdrop = class {
|
|
|
167
168
|
this.relative = false;
|
|
168
169
|
}
|
|
169
170
|
render() {
|
|
170
|
-
return (h(Host, { key: '
|
|
171
|
+
return (h(Host, { key: '7d5a73e7d7927828e0cb1a7cdca6648c4512cc5a', class: {
|
|
171
172
|
'xpl-backdrop': true,
|
|
172
173
|
'xpl-backdrop--fixed': !this.relative,
|
|
173
174
|
'xpl-backdrop--relative': this.relative,
|
|
@@ -204,7 +205,7 @@ const Badge = class {
|
|
|
204
205
|
[`xpl-badge--size-${this.size}`]: !!this.size,
|
|
205
206
|
[`xpl-badge--shape-${this.shape}`]: !this.dotOnly && !!this.shape,
|
|
206
207
|
};
|
|
207
|
-
return (h(Host, { key: '
|
|
208
|
+
return (h(Host, { key: '3a2ab519bb627a1e46bc7686c6aafdcb3c789822' }, h("div", { key: 'e9ebf0d6a9a6a6f516065ceb969aca5f68cbb3ee', class: className }, h("span", { key: '1bd6735a1a67a9720424833a213fcde9e5e6db46', class: "xpl-badge__label" }, h("slot", { key: '397cb4768204c4b4a2dd7cd85534270a165776d8' })))));
|
|
208
209
|
}
|
|
209
210
|
};
|
|
210
211
|
|
|
@@ -269,13 +270,13 @@ const Banner = class {
|
|
|
269
270
|
const actionState = this.getActionButtonState();
|
|
270
271
|
const isHeadingPresent = !!((_c = this.heading) === null || _c === void 0 ? void 0 : _c.trim());
|
|
271
272
|
const isDescPresent = !!((_d = this.description) === null || _d === void 0 ? void 0 : _d.trim());
|
|
272
|
-
return (h(Host, { key: '
|
|
273
|
+
return (h(Host, { key: '6d137a4577f93942bcb41b3b2f67f3d851bee454', class: {
|
|
273
274
|
'xpl-banner': true,
|
|
274
275
|
'xpl-banner--section': this.isSection,
|
|
275
276
|
[`xpl-banner--${this.appearance}`]: true,
|
|
276
277
|
'xpl-banner--truncate-desc': this.truncateDesc,
|
|
277
278
|
'xpl-banner--no-icon': this.isSection && !this.hasIcon,
|
|
278
|
-
}, role: "region", "aria-label": this.getAriaLabel() }, (!this.isSection || this.hasIcon) && (h("div", { key: '
|
|
279
|
+
}, role: "region", "aria-label": this.getAriaLabel() }, (!this.isSection || this.hasIcon) && (h("div", { key: 'e854bc2ca363a23e3e6cb9eb512886c325e09362', class: "xpl-banner__icon", "aria-hidden": "true" }, h("xpl-icon", { key: '14a0916310e6e0b68f9a36b4e1714cee015ad22f', icon: this.getIcon(), size: 24 }))), h("div", { key: 'bea8f5cafe66e649926aa0ee634b71ffa0f1b73e', class: "xpl-banner__body" }, isHeadingPresent && h("p", { key: 'f18ae9e7d4014211eea3a160fb05945149705832', class: "xpl-banner__heading" }, this.heading), isDescPresent && (h("p", { key: 'e36c00dadf6bd0d35b88c9a091d140573e6b6677', class: "xpl-banner__description", title: this.truncateDesc ? this.description : undefined }, this.description))), (hasAction || hasSecondaryAction) && (h("div", { key: 'dda19df805050c93d5c5ea8214f97084a5b0c0eb', class: "xpl-banner__actions" }, hasAction && (h("xpl-button", { key: '5bd3047d1b8250ed28a7720fb09f316a3b45bae1', size: "xs", variant: actionVariant, state: actionState, onClick: () => this.action.emit() }, this.actionText)), hasSecondaryAction && (h("xpl-button", { key: 'c0f0a32b69384194e4033ae85eebc788e005a8af', size: "xs", variant: actionVariant, state: actionState, onClick: () => this.secondaryAction.emit() }, this.secondaryActionText)))), this.isDismissible && (h("button", { key: '721faa946e9fc896a6bafafd8450d81f50e982ed', class: "xpl-banner__dismiss", type: "button", "aria-label": `Dismiss ${this.isSection ? 'section ' : ''}banner`, onClick: () => this.dismiss.emit() }, h("xpl-icon", { key: '4c27dbd8b394839ed98f5b4e2d4720eba1b0184f', icon: "xmark", size: 24, "aria-hidden": "true" })))));
|
|
279
280
|
}
|
|
280
281
|
};
|
|
281
282
|
|
|
@@ -288,7 +289,7 @@ const BreadcrumbItem = class {
|
|
|
288
289
|
`;
|
|
289
290
|
}
|
|
290
291
|
render() {
|
|
291
|
-
return (h(Host, { key: '
|
|
292
|
+
return (h(Host, { key: 'dd246c29fcb1afca4007299380a59b47c0a10c9d', class: "xpl-breadcrumb-item", role: "listitem" }, h("li", { key: 'b6df20888b3891241e52f0f2be14f1eedee2cac6', role: "none" }, h("slot", { key: 'f2f64effe0f58bb33bc983abfaa8b2996714e3b4' })), h("span", { key: '31c15dd296e6dab1d207a84179a4803b7366c1a2', innerHTML: this.chevron })));
|
|
292
293
|
}
|
|
293
294
|
};
|
|
294
295
|
|
|
@@ -297,7 +298,7 @@ const Breadcrumbs = class {
|
|
|
297
298
|
registerInstance(this, hostRef);
|
|
298
299
|
}
|
|
299
300
|
render() {
|
|
300
|
-
return (h(Host, { key: '
|
|
301
|
+
return (h(Host, { key: 'd4a4ae7bbf7f8eafc8a44b56c66983303e039d7e' }, h("nav", { key: '8e5decbdce778c1768e3412a59663cd37938f361', class: "xpl-breadcrumbs", "aria-label": "Breadcrumb" }, h("ol", { key: '612620c37a84ad022b9da5cdb884410a4df4dd29', role: "list" }, h("slot", { key: 'ae6cfc4f4e65ba7ca755fa7d9eb3751aae8905ff' })))));
|
|
301
302
|
}
|
|
302
303
|
};
|
|
303
304
|
|
|
@@ -354,7 +355,7 @@ const Button = class {
|
|
|
354
355
|
}
|
|
355
356
|
render() {
|
|
356
357
|
var _a;
|
|
357
|
-
return (h(Host, { key: '
|
|
358
|
+
return (h(Host, { key: '4fa90ae10b235af3fbfadb40097c5cc238e40dc6', class: {
|
|
358
359
|
'xpl-button': true,
|
|
359
360
|
[`xpl-button--${this.size}`]: true,
|
|
360
361
|
[`xpl-button--${this.variant}`]: true,
|
|
@@ -387,14 +388,14 @@ const Checkbox = class {
|
|
|
387
388
|
}
|
|
388
389
|
render() {
|
|
389
390
|
var _a;
|
|
390
|
-
return (h(Host, { key: '
|
|
391
|
+
return (h(Host, { key: 'd173bab038a25f785864e5614b29ec2fde832786', class: {
|
|
391
392
|
'xpl-checkbox-radio-container': true,
|
|
392
393
|
styled: this.styled,
|
|
393
394
|
disabled: this.disabled,
|
|
394
|
-
} }, h("input", { key: '
|
|
395
|
+
} }, h("input", { key: 'badfc1e403ba5b51b757823354c4cec86f678116', class: "xpl-checkbox", type: "checkbox", "aria-label": ((_a = this.ariaLabel) !== null && _a !== void 0 ? _a : '').trim() || undefined, 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 }), h("label", { key: 'b56888525a7b3d9544d8595b71d1ffe36f00e7b8', class: {
|
|
395
396
|
'xpl-label': true,
|
|
396
397
|
'xpl-label--disabled': this.disabled,
|
|
397
|
-
}, htmlFor: this.id }, h("slot", { key: '
|
|
398
|
+
}, htmlFor: this.id }, h("slot", { key: 'a5f06411725e10f5e5fafc33ff5e8f4adfec9e5b' }), this.description && (h("small", { key: '16ac47d9316e4a78f732cb3c0851efd8eaf903f2', class: {
|
|
398
399
|
'xpl-description': true,
|
|
399
400
|
'xpl-description--disabled': this.disabled,
|
|
400
401
|
} }, this.description)))));
|
|
@@ -440,7 +441,7 @@ const Choicelist = class {
|
|
|
440
441
|
this.onChoicesPropChange(this.choices);
|
|
441
442
|
}
|
|
442
443
|
render() {
|
|
443
|
-
return (h(Host, { key: '
|
|
444
|
+
return (h(Host, { key: 'a5ced1a4f1e3e5323dbc247c66ddf5ad489edc5f', class: "xpl-choicelist-container" }, this.heading !== undefined || this.description !== undefined ? (h("div", { class: "xpl-choicelist-heading" }, this.heading && h("h3", null, this.heading), this.description && h("p", null, this.description))) : null, this.choices && (h("ul", { key: '70f4738e8f5d1e1a72858d139eb4a3b531973449', class: {
|
|
444
445
|
'xpl-choicelist': true,
|
|
445
446
|
'xpl-choicelist--styled': this.styled,
|
|
446
447
|
} }, this.choices.map((choice, i) => {
|
|
@@ -469,7 +470,7 @@ const ContentArea = class {
|
|
|
469
470
|
this.size = 'wide';
|
|
470
471
|
}
|
|
471
472
|
render() {
|
|
472
|
-
return (h(Host, { key: '
|
|
473
|
+
return (h(Host, { key: '926cdfb1b6e52baabfb46bac6d837c5f1ba45183' }, h("main", { key: '71dacea3a70c90ae0471a1ec3c39add237faa119', class: `xpl-content-area-wrapper xpl-content-area-wrapper__${this.size}` }, h("div", { key: '5e53fe46cf9dc459d4a9d1f0540464b8bd695d8a', class: "xpl-content-area" }, h("slot", { key: '2f74936219cf75dccd583ee01a173807f0f80079' })))));
|
|
473
474
|
}
|
|
474
475
|
};
|
|
475
476
|
|
|
@@ -478,7 +479,7 @@ const Dashboard = class {
|
|
|
478
479
|
registerInstance(this, hostRef);
|
|
479
480
|
}
|
|
480
481
|
render() {
|
|
481
|
-
return (h(Host, { key: '
|
|
482
|
+
return (h(Host, { key: '1eb93f83a05cfe198aed91b0d8771bdbe6e7aaee' }, h("dl", { key: 'bdb8f39b30d318ae25a203ac75966f12a9299b35', class: "xpl-dashboard" }, h("slot", { key: 'caf043e38777ac0a397782957f0936bb34436f63' }))));
|
|
482
483
|
}
|
|
483
484
|
};
|
|
484
485
|
|
|
@@ -515,8 +516,8 @@ const DataCard = class {
|
|
|
515
516
|
: this.smallStatVariant === 'negative'
|
|
516
517
|
? 'arrow-down-right'
|
|
517
518
|
: 'dash';
|
|
518
|
-
return (h(Host, { key: '
|
|
519
|
-
(this.tooltipTextSmallStat ? (h("xpl-tooltip", { text: this.tooltipTextSmallStat }, h("div", { class: "xpl-data-card-stat xpl-data-card-stat--small" }, h("xpl-icon", { icon: this.smallStatIcon, size: 16 }), this.smallStat))) : (h("div", { class: "xpl-data-card-stat xpl-data-card-stat--small" }, h("xpl-icon", { icon: this.smallStatIcon, size: 16 }), this.smallStat)))), !!this.detail && h("span", { key: '
|
|
519
|
+
return (h(Host, { key: 'cbf0c9eb79fbd3e66c683e821e9b992d46d5ec1a', role: "group", class: `xpl-data-card ${this.link ? 'xpl-data-card__link' : ''}`, tabindex: "0" }, h("dt", { key: '92bc8a02b1acfa3c080a2a975d43118be54f10d5', class: headerClasses }, h("header", { key: 'f6a0baa73ab0e9d3a6eb9252acba54677a1083dc' }, !!this.leadingIcon && this.icon && (h("span", { key: 'dad99548c0ded82140b345e9887747c31ee9f6c7', class: `xpl-data-card__icon--${this.variant}` }, h("xpl-icon", { key: 'd591758d2ce1647ea67f03a27e4ae2efd29e4652', icon: this.icon, "background-color": bgColorHue, size: 20 }))), h("slot", { key: '07760d38b11971d96d7841c9897aa13481ea234c', name: "title" }, this.name)), this.link && (h("span", { key: '6ac3587f2ab1375cee605b22fe515e2c9a489e72', class: "xpl-data-card__header-arrow" }, h("xpl-icon", { key: '160ebeeedc59a31e0ea3480dd393ec4623afb831', icon: "chevron-right", size: 16 })))), h("dd", { key: 'dcf0703823e9f58f71a112a83de3d65cd43e1ae1', class: "xpl-data-card__body" }, h("div", { key: 'd7551579d17cfebed3dac59d32b56eb166afb530', class: "xpl-data-card__left" }, h("span", { key: 'c5c412c76f9785de5ff8686db3dcb71540b79b1f', class: "xpl-data-card-stat xpl-data-card-stat--long" }, this.stat), this.tooltipTextStat ? (h("xpl-tooltip", { text: this.tooltipTextStat }, h("div", { class: "xpl-data-card-stat xpl-data-card-stat--short" }, this.shortStat ? this.shortStat : this.stat))) : (h("div", { class: "xpl-data-card-stat xpl-data-card-stat--short" }, h("abbr", { title: this.stat }, this.shortStat ? this.shortStat : this.stat))), this.smallStatVariant ? (this.tooltipTextSmallStat ? (h("xpl-tooltip", { text: this.tooltipTextSmallStat }, h("div", { class: `xpl-data-card-stat xpl-data-card-stat--small ${this.smallStatVariant}` }, h("xpl-icon", { icon: smallStatIcon, size: 16 }), this.smallStat))) : (h("div", { class: `xpl-data-card-stat xpl-data-card-stat--small ${this.smallStatVariant}` }, h("xpl-icon", { icon: smallStatIcon, size: 16 }), this.smallStat))) : (this.smallStatIcon &&
|
|
520
|
+
(this.tooltipTextSmallStat ? (h("xpl-tooltip", { text: this.tooltipTextSmallStat }, h("div", { class: "xpl-data-card-stat xpl-data-card-stat--small" }, h("xpl-icon", { icon: this.smallStatIcon, size: 16 }), this.smallStat))) : (h("div", { class: "xpl-data-card-stat xpl-data-card-stat--small" }, h("xpl-icon", { icon: this.smallStatIcon, size: 16 }), this.smallStat)))), !!this.detail && h("span", { key: 'b33a9a133cf0a18deaccf6e3772ab1a797f9fa1f', class: "xpl-data-card__detail" }, this.detail)), hasContentSlot && (h("div", { key: 'e9dc031341b49ebf121cbe8cc081df6978aa13ad', class: "xpl-data-card__right" }, h("slot", { key: '37c8414e9dc60052f1d5a69d86ece17b7cdbc1da', name: contentSlot }))))));
|
|
520
521
|
}
|
|
521
522
|
get el() { return getElement(this); }
|
|
522
523
|
static get watchers() { return {
|
|
@@ -536,7 +537,7 @@ const Divider = class {
|
|
|
536
537
|
render() {
|
|
537
538
|
let className = 'xpl-divider';
|
|
538
539
|
className += ` xpl-divider--${this.tier}`;
|
|
539
|
-
return (h(Host, { key: '
|
|
540
|
+
return (h(Host, { key: '1926b1e92a89dc5039042d29491f246cf3900efa', class: className }, h("span", { key: '492651208216149bfd4d2ed7cc8610b2bc8b05ea' }, h("slot", { key: '1e8b9e121ab1cb946b7a13d2bacbeea9a490a289' }))));
|
|
540
541
|
}
|
|
541
542
|
};
|
|
542
543
|
|
|
@@ -2257,10 +2258,27 @@ var __rest$1 = (undefined && undefined.__rest) || function (s, e) {
|
|
|
2257
2258
|
}
|
|
2258
2259
|
return t;
|
|
2259
2260
|
};
|
|
2261
|
+
const VIRTUAL_LIST = {
|
|
2262
|
+
rowHeight: 45,
|
|
2263
|
+
overscan: 20,
|
|
2264
|
+
virtualizeFrom: 200,
|
|
2265
|
+
};
|
|
2266
|
+
function renderOption(option, virtualIndex) {
|
|
2267
|
+
const { groupName, options: opts, subtitle } = option, properties = __rest$1(option, ["groupName", "options", "subtitle"]);
|
|
2268
|
+
if (groupName) {
|
|
2269
|
+
return (h("xpl-dropdown-group", Object.assign({ groupName: groupName, options: opts }, properties)));
|
|
2270
|
+
}
|
|
2271
|
+
const isVirtual = virtualIndex !== undefined;
|
|
2272
|
+
return (h("xpl-dropdown-option", Object.assign({ class: isVirtual ? 'xpl-dropdown-option--virtual' : undefined, style: isVirtual
|
|
2273
|
+
? { transform: `translateY(${virtualIndex * VIRTUAL_LIST.rowHeight}px)` }
|
|
2274
|
+
: undefined, subtitle: subtitle }, properties)));
|
|
2275
|
+
}
|
|
2260
2276
|
const Dropdown = class {
|
|
2261
2277
|
constructor(hostRef) {
|
|
2262
2278
|
registerInstance(this, hostRef);
|
|
2263
2279
|
this.isOpenChange = createEvent(this, "isOpenChange", 7);
|
|
2280
|
+
this.virtualEnd = 0;
|
|
2281
|
+
this.virtualStart = 0;
|
|
2264
2282
|
this.isOpen = false;
|
|
2265
2283
|
this.closeOnSelect = true;
|
|
2266
2284
|
this.mode = 'single';
|
|
@@ -2268,6 +2286,9 @@ const Dropdown = class {
|
|
|
2268
2286
|
this.placement = 'bottom-start';
|
|
2269
2287
|
this.selectOnFocus = false;
|
|
2270
2288
|
this.cleanupAutoUpdate = null;
|
|
2289
|
+
this.virtualScrollRaf = null;
|
|
2290
|
+
this.openAlignmentRaf = null;
|
|
2291
|
+
this.previousOptionCount = 0;
|
|
2271
2292
|
this.updateDropdownPosition = async (triggerEl) => {
|
|
2272
2293
|
var _a, _b;
|
|
2273
2294
|
const { x, y, placement, middlewareData } = await computePosition(triggerEl, this.hostElement, {
|
|
@@ -2339,6 +2360,64 @@ const Dropdown = class {
|
|
|
2339
2360
|
this.isOpen = false;
|
|
2340
2361
|
}
|
|
2341
2362
|
};
|
|
2363
|
+
this.handleVirtualScroll = () => {
|
|
2364
|
+
if (this.virtualScrollRaf !== null)
|
|
2365
|
+
return;
|
|
2366
|
+
this.virtualScrollRaf = requestAnimationFrame(() => {
|
|
2367
|
+
this.virtualScrollRaf = null;
|
|
2368
|
+
this.updateVirtualRange();
|
|
2369
|
+
});
|
|
2370
|
+
};
|
|
2371
|
+
this.setListEl = (el) => {
|
|
2372
|
+
var _a, _b;
|
|
2373
|
+
if (el === this.listEl)
|
|
2374
|
+
return;
|
|
2375
|
+
this.listEl = el;
|
|
2376
|
+
(_a = this.listResizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
2377
|
+
if (el && typeof ResizeObserver !== 'undefined') {
|
|
2378
|
+
(_b = this.listResizeObserver) !== null && _b !== void 0 ? _b : (this.listResizeObserver = new ResizeObserver(() => {
|
|
2379
|
+
if (this.isVirtualized)
|
|
2380
|
+
this.handleVirtualScroll();
|
|
2381
|
+
}));
|
|
2382
|
+
this.listResizeObserver.observe(el);
|
|
2383
|
+
}
|
|
2384
|
+
};
|
|
2385
|
+
this.scheduleOpenAlignment = () => {
|
|
2386
|
+
if (this.openAlignmentRaf !== null)
|
|
2387
|
+
return;
|
|
2388
|
+
this.openAlignmentRaf = requestAnimationFrame(() => {
|
|
2389
|
+
this.openAlignmentRaf = null;
|
|
2390
|
+
this.scrollSelectedIntoView();
|
|
2391
|
+
this.updateVirtualRange();
|
|
2392
|
+
});
|
|
2393
|
+
};
|
|
2394
|
+
}
|
|
2395
|
+
onOptionsChanged() {
|
|
2396
|
+
var _a, _b, _c, _d;
|
|
2397
|
+
const total = (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;
|
|
2398
|
+
const listReplaced = total !== this.previousOptionCount;
|
|
2399
|
+
this.previousOptionCount = total;
|
|
2400
|
+
if (!this.isVirtualized) {
|
|
2401
|
+
this.virtualStart = 0;
|
|
2402
|
+
this.virtualEnd = 0;
|
|
2403
|
+
return;
|
|
2404
|
+
}
|
|
2405
|
+
const list = this.listEl;
|
|
2406
|
+
if (list) {
|
|
2407
|
+
const maxScroll = Math.max(0, total * VIRTUAL_LIST.rowHeight - list.clientHeight);
|
|
2408
|
+
if (list.scrollTop > maxScroll) {
|
|
2409
|
+
list.scrollTop = maxScroll;
|
|
2410
|
+
}
|
|
2411
|
+
if (this.isOpen && listReplaced) {
|
|
2412
|
+
const selectedIndex = (_d = (_c = this.options) === null || _c === void 0 ? void 0 : _c.findIndex((option) => option.isSelected)) !== null && _d !== void 0 ? _d : -1;
|
|
2413
|
+
const outOfWindow = selectedIndex >= 0 &&
|
|
2414
|
+
(selectedIndex < this.virtualStart || selectedIndex >= this.virtualEnd);
|
|
2415
|
+
if (outOfWindow) {
|
|
2416
|
+
this.scrollSelectedIntoView();
|
|
2417
|
+
}
|
|
2418
|
+
}
|
|
2419
|
+
}
|
|
2420
|
+
this.updateVirtualRange();
|
|
2342
2421
|
}
|
|
2343
2422
|
onAnchorToTriggerChanged() {
|
|
2344
2423
|
if (this.isOpen) {
|
|
@@ -2362,7 +2441,7 @@ const Dropdown = class {
|
|
|
2362
2441
|
}
|
|
2363
2442
|
onSelectedValuesChanged(newValues, initialRender = false) {
|
|
2364
2443
|
if (this.options && this.options.length > 0) {
|
|
2365
|
-
const flatOptions = this.options.
|
|
2444
|
+
const flatOptions = this.options.flatMap((curr) => curr.groupName && curr.options ? curr.options : [curr]);
|
|
2366
2445
|
flatOptions.forEach((option) => {
|
|
2367
2446
|
const optionValue = option.value || option.label;
|
|
2368
2447
|
if (this.mode === 'single') {
|
|
@@ -2387,9 +2466,13 @@ const Dropdown = class {
|
|
|
2387
2466
|
this.isOpenChange.emit(newValue);
|
|
2388
2467
|
if (newValue) {
|
|
2389
2468
|
this.startPositioning();
|
|
2469
|
+
this.alignOnOpen();
|
|
2390
2470
|
}
|
|
2391
2471
|
else {
|
|
2392
2472
|
this.stopPositioning();
|
|
2473
|
+
this.cancelVirtualScroll();
|
|
2474
|
+
this.virtualStart = 0;
|
|
2475
|
+
this.virtualEnd = 0;
|
|
2393
2476
|
}
|
|
2394
2477
|
}
|
|
2395
2478
|
connectedCallback() {
|
|
@@ -2397,44 +2480,68 @@ const Dropdown = class {
|
|
|
2397
2480
|
document.addEventListener('keydown', this.handleKeyDown);
|
|
2398
2481
|
}
|
|
2399
2482
|
disconnectedCallback() {
|
|
2483
|
+
var _a;
|
|
2400
2484
|
document.removeEventListener('mousedown', this.handleClickOutside);
|
|
2401
2485
|
document.removeEventListener('keydown', this.handleKeyDown);
|
|
2402
2486
|
this.stopPositioning();
|
|
2487
|
+
this.cancelVirtualScroll();
|
|
2488
|
+
(_a = this.listResizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
2403
2489
|
}
|
|
2404
2490
|
componentWillLoad() {
|
|
2491
|
+
var _a, _b;
|
|
2405
2492
|
this.handleSelect = this.handleSelect.bind(this);
|
|
2406
2493
|
if (this.selectedValues) {
|
|
2407
2494
|
this.onSelectedValuesChanged(this.selectedValues, true);
|
|
2408
2495
|
}
|
|
2496
|
+
this.previousOptionCount = (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;
|
|
2409
2497
|
}
|
|
2410
2498
|
componentDidLoad() {
|
|
2411
|
-
if (this.isOpen)
|
|
2499
|
+
if (this.isOpen) {
|
|
2412
2500
|
this.startPositioning();
|
|
2501
|
+
this.alignOnOpen();
|
|
2502
|
+
}
|
|
2413
2503
|
}
|
|
2414
2504
|
async handleSelect(e, { component }) {
|
|
2415
2505
|
const { hostElement, mode, options, update } = this;
|
|
2416
2506
|
const isSingle = mode === 'single';
|
|
2417
2507
|
const isMulti = mode === 'multi';
|
|
2418
2508
|
if (options) {
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
(
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2509
|
+
const targetValue = component.hostElement.value || component.hostElement.label;
|
|
2510
|
+
const hasGroups = options.some((option) => option.groupName);
|
|
2511
|
+
if (!hasGroups) {
|
|
2512
|
+
options.forEach((option) => {
|
|
2513
|
+
const isMatch = (option.value || option.label) === targetValue;
|
|
2514
|
+
if (isSingle) {
|
|
2515
|
+
option.isSelected = isMatch;
|
|
2516
|
+
if (isMatch)
|
|
2517
|
+
component.hostElement.isSelected = true;
|
|
2518
|
+
}
|
|
2519
|
+
else if (isMulti && isMatch) {
|
|
2520
|
+
option.isSelected = !option.isSelected;
|
|
2521
|
+
component.hostElement.isSelected = option.isSelected;
|
|
2522
|
+
}
|
|
2523
|
+
});
|
|
2524
|
+
this.options = [...options];
|
|
2525
|
+
}
|
|
2526
|
+
else {
|
|
2527
|
+
const flatOptions = options.flatMap((curr) => curr.groupName && curr.options ? curr.options : [curr]);
|
|
2528
|
+
flatOptions.forEach((option) => {
|
|
2529
|
+
const isMatch = (option.value || option.label) === targetValue;
|
|
2530
|
+
if (isSingle) {
|
|
2531
|
+
option.isSelected = isMatch;
|
|
2532
|
+
component.hostElement.isSelected = true;
|
|
2533
|
+
}
|
|
2534
|
+
else if (isMulti && isMatch) {
|
|
2535
|
+
option.isSelected = !option.isSelected;
|
|
2536
|
+
component.hostElement.isSelected = option.isSelected;
|
|
2537
|
+
}
|
|
2538
|
+
});
|
|
2539
|
+
const mapOptions = (option) => {
|
|
2540
|
+
option.options = option.groupName ? option.options.map(mapOptions) : undefined;
|
|
2541
|
+
return option;
|
|
2542
|
+
};
|
|
2543
|
+
this.options = options.map(mapOptions);
|
|
2544
|
+
}
|
|
2438
2545
|
}
|
|
2439
2546
|
else if (isSingle) {
|
|
2440
2547
|
const optionNodes = Array.from(hostElement.querySelectorAll('xpl-dropdown-option'));
|
|
@@ -2473,24 +2580,89 @@ const Dropdown = class {
|
|
|
2473
2580
|
.querySelector('.xpl-dropdown-list')) === null || _a === void 0 ? void 0 : _a.style.removeProperty('max-height');
|
|
2474
2581
|
this.hostElement.classList.remove('xpl-dropdown--above', 'xpl-dropdown--below');
|
|
2475
2582
|
}
|
|
2583
|
+
cancelVirtualScroll() {
|
|
2584
|
+
if (this.virtualScrollRaf !== null) {
|
|
2585
|
+
cancelAnimationFrame(this.virtualScrollRaf);
|
|
2586
|
+
this.virtualScrollRaf = null;
|
|
2587
|
+
}
|
|
2588
|
+
if (this.openAlignmentRaf !== null) {
|
|
2589
|
+
cancelAnimationFrame(this.openAlignmentRaf);
|
|
2590
|
+
this.openAlignmentRaf = null;
|
|
2591
|
+
}
|
|
2592
|
+
}
|
|
2593
|
+
alignOnOpen() {
|
|
2594
|
+
this.scrollSelectedIntoView();
|
|
2595
|
+
this.updateVirtualRange();
|
|
2596
|
+
this.scheduleOpenAlignment();
|
|
2597
|
+
}
|
|
2598
|
+
scrollSelectedIntoView() {
|
|
2599
|
+
const { listEl: list, options } = this;
|
|
2600
|
+
if (!list || !(options === null || options === void 0 ? void 0 : options.length) || !this.isVirtualized)
|
|
2601
|
+
return;
|
|
2602
|
+
const selectedIndex = options.findIndex((option) => option.isSelected);
|
|
2603
|
+
if (selectedIndex < 0)
|
|
2604
|
+
return;
|
|
2605
|
+
const { rowHeight } = VIRTUAL_LIST;
|
|
2606
|
+
const centered = selectedIndex * rowHeight - (list.clientHeight - rowHeight) / 2;
|
|
2607
|
+
const maxScroll = Math.max(0, options.length * rowHeight - list.clientHeight);
|
|
2608
|
+
list.scrollTop = Math.max(0, Math.min(centered, maxScroll));
|
|
2609
|
+
}
|
|
2610
|
+
updateVirtualRange() {
|
|
2611
|
+
var _a, _b;
|
|
2612
|
+
const list = this.listEl;
|
|
2613
|
+
const total = (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;
|
|
2614
|
+
if (!list || !total)
|
|
2615
|
+
return;
|
|
2616
|
+
const { rowHeight, overscan } = VIRTUAL_LIST;
|
|
2617
|
+
const firstVisible = Math.floor(list.scrollTop / rowHeight);
|
|
2618
|
+
const visibleCount = Math.ceil(list.clientHeight / rowHeight) || 1;
|
|
2619
|
+
const start = Math.max(0, firstVisible - overscan);
|
|
2620
|
+
const end = Math.min(total, firstVisible + visibleCount + overscan);
|
|
2621
|
+
if (start !== this.virtualStart || end !== this.virtualEnd) {
|
|
2622
|
+
this.virtualStart = start;
|
|
2623
|
+
this.virtualEnd = end;
|
|
2624
|
+
}
|
|
2625
|
+
}
|
|
2626
|
+
get isVirtualized() {
|
|
2627
|
+
const { options } = this;
|
|
2628
|
+
return (!!options &&
|
|
2629
|
+
options.length > VIRTUAL_LIST.virtualizeFrom &&
|
|
2630
|
+
options.every((option) => !option.groupName && !option.subtitle));
|
|
2631
|
+
}
|
|
2476
2632
|
render() {
|
|
2477
|
-
const { isOpen } = this;
|
|
2478
|
-
const
|
|
2479
|
-
const
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2633
|
+
const { isOpen, mode, options } = this;
|
|
2634
|
+
const hasOptions = !!(options && options.length);
|
|
2635
|
+
const shouldVirtualize = this.isVirtualized;
|
|
2636
|
+
let listContent;
|
|
2637
|
+
if (!hasOptions) {
|
|
2638
|
+
listContent = h("slot", { key: '7a604ed002d4c412eb709aa7c3ef1a9e80f614ed', name: "options" });
|
|
2639
|
+
}
|
|
2640
|
+
else if (shouldVirtualize) {
|
|
2641
|
+
const { rowHeight, overscan } = VIRTUAL_LIST;
|
|
2642
|
+
const total = options.length;
|
|
2643
|
+
const start = Math.min(this.virtualStart, total);
|
|
2644
|
+
const fallbackEnd = Math.min(total, Math.ceil(300 / rowHeight) + overscan * 2);
|
|
2645
|
+
const end = this.virtualEnd > start ? this.virtualEnd : fallbackEnd;
|
|
2646
|
+
listContent = (h("li", { key: 'd7730538dfae58a6efc6a8971e0078b28fc5b9de', class: "xpl-dropdown__virtual-sizer", style: { height: `${total * rowHeight}px` } }, options.slice(start, end).map((option, i) => renderOption(option, start + i))));
|
|
2647
|
+
}
|
|
2648
|
+
else {
|
|
2649
|
+
listContent = options.map((option) => renderOption(option));
|
|
2650
|
+
}
|
|
2651
|
+
return (h(Host, { key: '282d3bc09a8ce0e63d55bbc9707936afe0efae01', "aria-expanded": isOpen ? 'true' : 'false', class: {
|
|
2486
2652
|
'xpl-dropdown': true,
|
|
2487
2653
|
'xpl-dropdown--multi': mode === 'multi',
|
|
2488
2654
|
'xpl-dropdown--open': isOpen,
|
|
2489
2655
|
'xpl-dropdown--anchor-to-trigger': this.anchorToTrigger,
|
|
2490
|
-
|
|
2656
|
+
'xpl-dropdown--virtualized': shouldVirtualize,
|
|
2657
|
+
}, role: "listbox" }, h("slot", { key: '977cfb27b24bcecaf22587bd2e6350ad52743cad', name: "header" }), h("ul", { key: '46274999327ffdb9749a012b839ef124df4d72d2', class: "xpl-dropdown-list", ref: (el) => {
|
|
2658
|
+
this.setListEl(el);
|
|
2659
|
+
}, onScroll: shouldVirtualize ? this.handleVirtualScroll : undefined }, listContent)));
|
|
2491
2660
|
}
|
|
2492
2661
|
get hostElement() { return getElement(this); }
|
|
2493
2662
|
static get watchers() { return {
|
|
2663
|
+
"options": [{
|
|
2664
|
+
"onOptionsChanged": 0
|
|
2665
|
+
}],
|
|
2494
2666
|
"anchorToTrigger": [{
|
|
2495
2667
|
"onAnchorToTriggerChanged": 0
|
|
2496
2668
|
}],
|
|
@@ -2536,7 +2708,7 @@ const DropdownGroup = class {
|
|
|
2536
2708
|
var { groupName: optsGroupName } = _a, properties = __rest(_a, ["groupName"]);
|
|
2537
2709
|
return optsGroupName ? (h("xpl-dropdown-group", Object.assign({ label: optsGroupName }, properties))) : (h("xpl-dropdown-option", Object.assign({}, properties)));
|
|
2538
2710
|
});
|
|
2539
|
-
return (h(Host, { key: '
|
|
2711
|
+
return (h(Host, { key: 'e6326e88bf725b9f3f9c2701dbb6e62a185ad2e7', role: "group", "aria-label": groupName }, h("li", { key: '92b0a065e228bf368fc8a6214d7d3d86c986f4dd', class: "xpl-dropdown-list-item" }, h("xpl-dropdown-heading", { key: '60cda98e80262dfd23b5fe0b18370d8b6245d39a', label: groupName }), h("ul", { key: '7a7c186e05a04286650d7292e156deb41638f703', class: "xpl-dropdown-list" }, mappedOptions || h("slot", { key: 'da798e46d297ec28a0880cf04e4f0e20220ab28a', name: "options" })))));
|
|
2540
2712
|
}
|
|
2541
2713
|
};
|
|
2542
2714
|
|
|
@@ -2545,7 +2717,7 @@ const DropdownHeading = class {
|
|
|
2545
2717
|
registerInstance(this, hostRef);
|
|
2546
2718
|
}
|
|
2547
2719
|
render() {
|
|
2548
|
-
return (h(Host, { key: '
|
|
2720
|
+
return (h(Host, { key: 'e4444b617fe160dbf259f4ecc2aafd6166859dce', class: { 'xpl-dropdown-heading': true }, role: "presentation" }, h("span", { key: '1e1e37499c0add5b53fcd0a836f97fa5b9e1a9bd' }, this.label || h("slot", { key: 'c310120a37646452e989db2ead01d77a89b96f0d', name: "heading" }))));
|
|
2549
2721
|
}
|
|
2550
2722
|
};
|
|
2551
2723
|
|
|
@@ -2602,11 +2774,11 @@ const DropdownOptionCpnt = class {
|
|
|
2602
2774
|
}
|
|
2603
2775
|
render() {
|
|
2604
2776
|
const { label, isSelected, isDisabled, value, subtitle, icon } = this;
|
|
2605
|
-
return (h(Host, { key: '
|
|
2777
|
+
return (h(Host, { key: '66ffacb152e80f270877a189488048ef6b36b7af', class: {
|
|
2606
2778
|
'xpl-dropdown-option': true,
|
|
2607
2779
|
'xpl-dropdown-option--disabled': isDisabled,
|
|
2608
2780
|
'xpl-dropdown-option--selected': isSelected,
|
|
2609
|
-
}, role: "option", "aria-checked": isSelected, "aria-disabled": isDisabled, "aria-selected": isSelected, value: value }, h("li", { key: '
|
|
2781
|
+
}, role: "option", "aria-checked": isSelected, "aria-disabled": isDisabled, "aria-selected": isSelected, value: value }, h("li", { key: '274fa639d506ef3feb5bafc3f0b21ed8bf80e95a', class: "xpl-dropdown-list-item" }, icon && (h("xpl-icon", { key: 'e7f63ede84adca57d99baa06dc1555d3afacd02c', class: "xpl-dropdown-list-item__icon", icon: icon, size: 20 })), label || h("slot", { key: 'cc0874abba079616e8516d366981a38ddef550b1', name: "option" }), subtitle && h("span", { key: '37cd186edb0de3f4c33b9faa2dfa983424a011bd', class: "xpl-dropdown-list-item__subtitle" }, subtitle))));
|
|
2610
2782
|
}
|
|
2611
2783
|
get hostElement() { return getElement(this); }
|
|
2612
2784
|
};
|
|
@@ -2681,7 +2853,7 @@ const HeaderAccordion = class {
|
|
|
2681
2853
|
this.applyBorderRadiusToLastRow();
|
|
2682
2854
|
}
|
|
2683
2855
|
render() {
|
|
2684
|
-
return (h(Host, { key: '
|
|
2856
|
+
return (h(Host, { key: '5a1f1085ff8351162fc87a30e939035ec81795fc', class: "xpl-header-accordion" }, h("div", { key: 'dd3e3b0a441b380e28fb898283e93d53d7347866', class: `header-accordion header-accordion--${this.expanded ? 'expanded' : 'collapsed'}` }, this.hasCheckbox && (h("xpl-checkbox", { key: '6550eb878d0f55262beb1ee114ea54801037ad16', class: "xpl-header-accordion__parent-checkbox", checked: this.parentChecked, disabled: this.disabled, indeterminate: this.parentIndeterminate, onCheckboxChange: (event) => this.handleParentCheckboxChange(event.detail) })), h("button", { key: '80e0b49c5d52866293eac2aef91bbe97d4a8ad96', "aria-expanded": this.expanded, "aria-controls": this.contentId, class: "toggle-area", onClick: this.toggleAccordion, type: "button" }, h("slot", { key: '9a29e3496f29f6179aae2c122e17db09943e2067', name: "title" }), h("xpl-icon", { key: 'c3fddf66a6c41353240adb706da7faf6231caa57', size: 16, icon: "chevron-down", class: this.expanded && 'rotate' }))), h("div", { key: 'e1ffea5a3a456b5556d67f42326ec17eb80fe305', id: this.contentId, role: "region", class: !this.expanded ? 'content--hidden' : 'content--shown' }, h("slot", { key: '7c4e2677463ad9bbd1adcafc95692bdd95a09c0b', name: "content" }))));
|
|
2685
2857
|
}
|
|
2686
2858
|
get el() { return getElement(this); }
|
|
2687
2859
|
static get watchers() { return {
|
|
@@ -9897,6 +10069,41 @@ var data = {
|
|
|
9897
10069
|
path: "<g fill=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M27.14 11.57l-11.12 11.13-11.13-11.13\"></path></g>"
|
|
9898
10070
|
}
|
|
9899
10071
|
}
|
|
10072
|
+
},
|
|
10073
|
+
"chevron-expand-y": {
|
|
10074
|
+
name: "chevron-expand-y",
|
|
10075
|
+
keywords: [
|
|
10076
|
+
"chevron-expand-y",
|
|
10077
|
+
"chevron",
|
|
10078
|
+
"arrow",
|
|
10079
|
+
"expand",
|
|
10080
|
+
"vertical",
|
|
10081
|
+
"resize",
|
|
10082
|
+
"maximize",
|
|
10083
|
+
"unfold",
|
|
10084
|
+
"select",
|
|
10085
|
+
"dropdown",
|
|
10086
|
+
"nav",
|
|
10087
|
+
"more"
|
|
10088
|
+
],
|
|
10089
|
+
heights: {
|
|
10090
|
+
"16": {
|
|
10091
|
+
width: 16,
|
|
10092
|
+
path: "<g fill=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.4\" d=\"M4.69 5.36l3.35-3.35 3.35 3.35\"></path><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.4\" d=\"M11.39 10.72l-3.35 3.35-3.35-3.35\"></path></g>"
|
|
10093
|
+
},
|
|
10094
|
+
"20": {
|
|
10095
|
+
width: 20,
|
|
10096
|
+
path: "<g fill=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.6\" d=\"M5.81 6.64l4.15-4.15 4.15 4.15\"></path><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.6\" d=\"M14.11 13.28l-4.15 4.15-4.15-4.15\"></path></g>"
|
|
10097
|
+
},
|
|
10098
|
+
"24": {
|
|
10099
|
+
width: 24,
|
|
10100
|
+
path: "<g fill=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.75\" d=\"M7 8l5-5 5 5\"></path><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.75\" d=\"M17 16l-5 5-5-5\"></path></g>"
|
|
10101
|
+
},
|
|
10102
|
+
"32": {
|
|
10103
|
+
width: 32,
|
|
10104
|
+
path: "<g fill=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M9.31 10.64l6.65-6.65 6.65 6.65\"></path><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M22.61 21.28l-6.65 6.65-6.65-6.65\"></path></g>"
|
|
10105
|
+
}
|
|
10106
|
+
}
|
|
9900
10107
|
},
|
|
9901
10108
|
"chevron-left": {
|
|
9902
10109
|
name: "chevron-left",
|
|
@@ -11637,6 +11844,39 @@ var data = {
|
|
|
11637
11844
|
path: "<g fill=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M10.23 12.02h3.56\"></path><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M10.23 17.36h11.57\"></path><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M10.23 22.7h11.57\"></path><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M4.9 25.37v-18.7a3.56 3.56 0 0 1 3.56-3.56h9.94c0.47 0 0.93 0.19 1.26 0.53l6.96 6.96a1.78 1.78 0 0 1 0.52 1.26v13.5a3.56 3.56 0 0 1-3.56 3.56h-15.13a3.56 3.56 0 0 1-3.56-3.56z\"></path><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M26.98 11.13h-6.07a1.78 1.78 0 0 1-1.78-1.79v-6.04\"></path></g>"
|
|
11638
11845
|
}
|
|
11639
11846
|
}
|
|
11847
|
+
},
|
|
11848
|
+
"file-pin": {
|
|
11849
|
+
name: "file-pin",
|
|
11850
|
+
keywords: [
|
|
11851
|
+
"file",
|
|
11852
|
+
"pin",
|
|
11853
|
+
"pinned",
|
|
11854
|
+
"note",
|
|
11855
|
+
"notes",
|
|
11856
|
+
"thumbtack",
|
|
11857
|
+
"tack",
|
|
11858
|
+
"document",
|
|
11859
|
+
"saved",
|
|
11860
|
+
"save"
|
|
11861
|
+
],
|
|
11862
|
+
heights: {
|
|
11863
|
+
"16": {
|
|
11864
|
+
width: 16,
|
|
11865
|
+
path: "<g fill=\"none\"><g><path fill=\"currentColor\" fill-rule=\"evenodd\" d=\"M12.2803 9.19531C12.9006 8.575 13.9068 8.57527 14.5273 9.19531L15.5352 10.2031C16.1555 10.8236 16.1556 11.8298 15.5352 12.4502L14.3838 13.5996C14.3722 13.7163 14.3565 13.8412 14.3311 13.9717L14.2734 14.2246C14.0967 14.897 13.7807 15.3871 13.5508 15.6836L13.5479 15.6807C13.53 15.7037 13.5143 15.7289 13.4932 15.75C13.2198 16.0233 12.7763 16.0233 12.5029 15.75L11.2363 14.4834L10.2529 15.4678C9.97963 15.7411 9.53608 15.7409 9.2627 15.4678C8.98969 15.1944 8.98962 14.7518 9.2627 14.4785L10.2471 13.4941L8.98047 12.2275C8.83875 12.0855 8.76474 11.8888 8.77734 11.6885C8.79015 11.4882 8.88829 11.3027 9.04688 11.1797C9.34336 10.9498 9.83347 10.6338 10.5059 10.457C10.7294 10.3982 10.9393 10.3636 11.1289 10.3447L12.2803 9.19531ZM13.5371 10.1846C13.4635 10.1116 13.3441 10.1115 13.2705 10.1846L11.9346 11.5205C11.808 11.647 11.6379 11.7206 11.459 11.7256C11.3329 11.729 11.1861 11.7413 11.0264 11.7725L10.8613 11.8105C10.7767 11.8328 10.6961 11.8586 10.6201 11.8867L12.8418 14.1084C12.8698 14.0326 12.8977 13.9526 12.9199 13.8682C12.979 13.6437 13.0003 13.4393 13.0049 13.2715L13.0205 13.1396C13.0491 13.0103 13.115 12.8909 13.21 12.7959L14.5449 11.46C14.6186 11.3863 14.6185 11.2671 14.5449 11.1934L13.5371 10.1846Z\"></path><path fill=\"currentColor\" fill-rule=\"evenodd\" d=\"M9.1875 0.855469C9.6086 0.855482 10.0121 1.02293 10.3105 1.32129L13.7881 4.79883C13.9241 4.93412 14.0311 5.09211 14.1094 5.2627C14.1139 5.27248 14.119 5.28197 14.123 5.29199C14.2091 5.49011 14.2559 5.70482 14.2559 5.92383V7.22461C14.2558 7.61108 13.9421 7.92469 13.5557 7.9248C13.1691 7.9248 12.8555 7.61115 12.8555 7.22461V6.25586H10.4443C9.56727 6.25574 8.85564 5.54404 8.85547 4.66699V2.25586H4.22168C3.62663 2.25609 3.14477 2.73839 3.14453 3.33301V12.667C3.14471 13.2617 3.6266 13.7439 4.22168 13.7441H7.12402C7.51055 13.7441 7.8241 14.0578 7.82422 14.4443C7.82415 14.8309 7.51058 15.1445 7.12402 15.1445H4.22168C2.85294 15.1443 1.74432 14.0344 1.74414 12.667V3.33301C1.74438 1.96565 2.85297 0.855703 4.22168 0.855469H9.1875ZM10.2559 4.66699C10.256 4.77085 10.3405 4.85535 10.4443 4.85547H11.8652L10.2559 3.24609V4.66699Z\"></path><path fill=\"currentColor\" d=\"M9.11133 7.9668C9.49793 7.9668 9.81152 8.28039 9.81152 8.66699C9.81136 9.05345 9.49783 9.36719 9.11133 9.36719H5.11133C4.72483 9.36719 4.4113 9.05345 4.41113 8.66699C4.41113 8.28039 4.72473 7.9668 5.11133 7.9668H9.11133Z\"></path><path fill=\"currentColor\" d=\"M6.88867 5.2998C7.27527 5.2998 7.58887 5.6134 7.58887 6C7.58887 6.3866 7.27527 6.7002 6.88867 6.7002H5.11133C4.72473 6.7002 4.41113 6.3866 4.41113 6C4.41113 5.6134 4.72473 5.2998 5.11133 5.2998H6.88867Z\"></path></g></g>"
|
|
11866
|
+
},
|
|
11867
|
+
"20": {
|
|
11868
|
+
width: 20,
|
|
11869
|
+
path: "<g fill=\"none\"><path fill=\"currentColor\" fill-rule=\"evenodd\" d=\"M15.4043 11.5479C16.1506 10.8015 17.3611 10.8015 18.1074 11.5479L19.3672 12.8076C20.1131 13.554 20.1133 14.7646 19.3672 15.5107L17.9092 16.9668C17.895 17.118 17.875 17.2806 17.8418 17.4512L17.7705 17.7627C17.5641 18.5476 17.2012 19.1293 16.9229 19.499C16.8921 19.5472 16.8565 19.5937 16.8145 19.6357C16.5022 19.9479 15.995 19.9476 15.6826 19.6357L14.0459 17.998L12.7627 19.2822C12.4504 19.5942 11.9442 19.5942 11.6318 19.2822C11.3195 18.9698 11.3195 18.4628 11.6318 18.1504L12.9141 16.8672L11.2803 15.2324C11.118 15.0701 11.0326 14.8453 11.0469 14.6162C11.0614 14.3872 11.1742 14.1758 11.3555 14.0352C11.7209 13.7518 12.3243 13.3622 13.1523 13.1445L13.4629 13.0732C13.6331 13.04 13.7952 13.0191 13.9463 13.0049L15.4043 11.5479ZM16.9756 12.6787C16.8542 12.5576 16.6576 12.5577 16.5361 12.6787L14.8662 14.3486C14.7216 14.4932 14.5266 14.5774 14.3223 14.583C14.1073 14.5889 13.8467 14.6159 13.5596 14.6914C13.4099 14.7308 13.2699 14.7794 13.1416 14.832L14.6025 16.293C14.6057 16.296 14.6092 16.2987 14.6123 16.3018C14.6134 16.3029 14.6141 16.3046 14.6152 16.3057L16.082 17.7715C16.1345 17.6435 16.1834 17.5048 16.2227 17.3555C16.2982 17.0683 16.3262 16.8064 16.332 16.5918C16.3377 16.3875 16.4219 16.1934 16.5664 16.0488L18.2354 14.3789C18.3567 14.2576 18.3564 14.061 18.2354 13.9395L16.9756 12.6787Z\"></path><path fill=\"currentColor\" fill-rule=\"evenodd\" d=\"M11.4844 1.14453C11.9909 1.14453 12.477 1.34518 12.8359 1.7041L17.1836 6.05176L17.3105 6.19238C17.4177 6.32275 17.5057 6.46633 17.5742 6.61816C17.5798 6.63068 17.5849 6.64341 17.5898 6.65625C17.6899 6.89119 17.7441 7.14505 17.7441 7.4043V9.03125C17.744 9.47293 17.3861 9.83105 16.9443 9.83105C16.5027 9.83094 16.1447 9.47286 16.1445 9.03125V7.74414H13.0557C12.0005 7.74414 11.1445 6.88817 11.1445 5.83301V2.74414H5.27832C4.49267 2.74414 3.85553 3.38195 3.85547 4.16699V15.833C3.85547 16.6181 4.49263 17.2559 5.27832 17.2559H8.90527C9.34706 17.2559 9.70501 17.6139 9.70508 18.0557C9.70496 18.4974 9.34703 18.8555 8.90527 18.8555H5.27832C3.60845 18.8555 2.25586 17.5012 2.25586 15.833V4.16699C2.25593 2.49881 3.60849 1.14453 5.27832 1.14453H11.4844ZM12.7441 5.83301C12.7441 6.00451 12.8842 6.14453 13.0557 6.14453H15.0137L12.7441 3.875V5.83301Z\"></path><path fill=\"currentColor\" d=\"M11.3887 10.0332C11.8304 10.0332 12.1883 10.3913 12.1885 10.833C12.1885 11.2748 11.8305 11.6328 11.3887 11.6328H6.38867C5.94684 11.6328 5.58887 11.2748 5.58887 10.833C5.58903 10.3913 5.94695 10.0332 6.38867 10.0332H11.3887Z\"></path><path fill=\"currentColor\" d=\"M8.61133 6.7002C9.05296 6.70043 9.41113 7.05832 9.41113 7.5C9.41113 7.94168 9.05296 8.29957 8.61133 8.2998H6.38867C5.94684 8.2998 5.58887 7.94183 5.58887 7.5C5.58887 7.05817 5.94684 6.7002 6.38867 6.7002H8.61133Z\"></path></g>"
|
|
11870
|
+
},
|
|
11871
|
+
"24": {
|
|
11872
|
+
width: 24,
|
|
11873
|
+
path: "<g fill=\"none\"><path fill=\"currentColor\" fill-rule=\"evenodd\" d=\"M18.5459 13.917C19.4082 13.0551 20.8057 13.055 21.668 13.917L23.1807 15.4297C24.0422 16.292 24.0424 17.6896 23.1807 18.5518L21.4092 20.3223C21.3832 20.6146 21.3344 20.9425 21.2422 21.293C20.9958 22.2301 20.5622 22.9233 20.2314 23.3604C20.1989 23.4103 20.161 23.4581 20.1172 23.502C19.7756 23.8435 19.2216 23.8432 18.8799 23.502L16.8555 21.4775L15.2559 23.0781C14.9141 23.4196 14.3592 23.4198 14.0176 23.0781C13.6764 22.7365 13.6762 22.1824 14.0176 21.8408L15.6172 20.2402L13.5957 18.2188C13.4183 18.0412 13.3261 17.7954 13.3418 17.5449C13.3576 17.2943 13.4803 17.0621 13.6787 16.9082C14.1112 16.5728 14.8249 16.1129 15.8037 15.8555L16.1719 15.7705C16.3852 15.7289 16.5876 15.7032 16.7754 15.6865L18.5459 13.917ZM20.4307 15.1543C20.2518 14.9757 19.9621 14.9758 19.7832 15.1543L17.7793 17.1582C17.6211 17.3163 17.4081 17.4079 17.1846 17.4141C16.9211 17.4212 16.6021 17.4552 16.25 17.5479C16.0204 17.6082 15.8105 17.6854 15.6221 17.7695L19.3271 21.4746C19.4111 21.2864 19.4895 21.078 19.5498 20.8486C19.6424 20.4968 19.6764 20.1759 19.6836 19.9131L19.6895 19.8291C19.7133 19.6366 19.8012 19.4567 19.9395 19.3184L21.9424 17.3145C22.1212 17.1356 22.1211 16.846 21.9424 16.667L20.4307 15.1543Z\"></path><path fill=\"currentColor\" fill-rule=\"evenodd\" d=\"M13.7812 1.45801C14.3663 1.45801 14.928 1.69001 15.3428 2.10449L20.5596 7.32227C20.7348 7.49666 20.8761 7.69864 20.9824 7.91602C20.997 7.94279 21.0097 7.97065 21.0215 7.99902C21.1431 8.27641 21.2089 8.57742 21.209 8.88477V10.8369C21.209 11.3201 20.8171 11.7117 20.334 11.7119C19.8507 11.7119 19.459 11.3202 19.459 10.8369V9.20898H15.666C14.4471 9.20881 13.4582 8.21894 13.458 7V3.20801H6.33398C5.34429 3.20801 4.54216 4.0111 4.54199 5V19C4.54217 19.9889 5.34429 20.791 6.33398 20.791H10.6865C11.1696 20.791 11.5612 21.1831 11.5615 21.666C11.5615 22.1493 11.1698 22.541 10.6865 22.541H6.33398C4.37723 22.541 2.79217 20.9548 2.79199 19V5C2.79216 3.04518 4.37722 1.45801 6.33398 1.45801H13.7812ZM15.208 7C15.2082 7.25245 15.4136 7.45881 15.666 7.45898H18.2217L15.208 4.44531V7Z\"></path><path fill=\"currentColor\" d=\"M13.667 12.125C14.1502 12.125 14.542 12.5168 14.542 13C14.542 13.4832 14.1502 13.875 13.667 13.875H7.66699C7.18374 13.875 6.79199 13.4832 6.79199 13C6.79199 12.5168 7.18374 12.125 7.66699 12.125H13.667Z\"></path><path fill=\"currentColor\" d=\"M10.334 8.125C10.8171 8.12518 11.209 8.51686 11.209 9C11.209 9.48314 10.8171 9.87482 10.334 9.875H7.66699C7.18374 9.875 6.79199 9.48325 6.79199 9C6.79199 8.51675 7.18374 8.125 7.66699 8.125H10.334Z\"></path></g>"
|
|
11874
|
+
},
|
|
11875
|
+
"32": {
|
|
11876
|
+
width: 32,
|
|
11877
|
+
path: "<g fill=\"none\"><path fill=\"currentColor\" fill-rule=\"evenodd\" d=\"M24.8438 18.6738C25.9285 17.5891 27.6877 17.5891 28.7725 18.6738L30.7881 20.6895C31.8728 21.7742 31.8728 23.5334 30.7881 24.6182L28.3867 27.0186C28.3547 27.4161 28.2882 27.8657 28.1611 28.3486C27.8253 29.6262 27.2243 30.5581 26.7861 31.123C26.7608 31.1556 26.734 31.1878 26.7041 31.2178C26.3136 31.6082 25.6796 31.6082 25.2891 31.2178L22.4736 28.4023L20.2227 30.6533C19.8322 31.0437 19.1991 31.0436 18.8086 30.6533C18.4182 30.2628 18.4182 29.6298 18.8086 29.2393L21.0596 26.9883L18.2451 24.1738C18.0422 23.9709 17.9361 23.6898 17.9541 23.4033C17.9722 23.117 18.1122 22.8517 18.3389 22.6758C18.9038 22.2376 19.8358 21.6367 21.1133 21.3008C21.5959 21.1737 22.0449 21.1063 22.4424 21.0742L24.8438 18.6738ZM27.3584 20.0879C27.0548 19.7843 26.5625 19.7845 26.2588 20.0879L23.5869 22.7588C23.406 22.9396 23.1629 23.0448 22.9072 23.0518C22.5454 23.0616 22.107 23.108 21.623 23.2354C21.2161 23.3423 20.8552 23.4871 20.543 23.6426L25.8184 28.918C25.9738 28.6058 26.1196 28.2457 26.2266 27.8389C26.3539 27.355 26.4003 26.9157 26.4102 26.5547L26.417 26.459C26.4442 26.2388 26.545 26.0332 26.7031 25.875L29.374 23.2041C29.6776 22.9005 29.6775 22.4082 29.374 22.1045L27.3584 20.0879Z\"></path><path fill=\"currentColor\" fill-rule=\"evenodd\" d=\"M18.375 2.11133C19.1111 2.11136 19.8171 2.40312 20.3389 2.9248L27.2949 9.88184L27.4805 10.0859C27.8876 10.5813 28.1113 11.2046 28.1113 11.8477V14.4502C28.111 15.0021 27.6632 15.45 27.1113 15.4502C26.5592 15.4502 26.1116 15.0022 26.1113 14.4502V12.1104H20.8887C19.3553 12.1101 18.1114 10.8664 18.1113 9.33301V4.11133H8.44434C7.0325 4.11133 5.88867 5.25628 5.88867 6.66699V25.334C5.88904 26.7444 7.03273 27.8887 8.44434 27.8887H14.248C14.8002 27.8887 15.2478 28.3366 15.248 28.8887C15.2479 29.4408 14.8002 29.8887 14.248 29.8887H8.44434C5.92751 29.8887 3.88904 27.8483 3.88867 25.334V6.66699C3.88867 4.15237 5.92728 2.11133 8.44434 2.11133H18.375ZM20.1113 9.33301C20.1114 9.76185 20.4599 10.1101 20.8887 10.1104H24.6953L20.1113 5.52539V9.33301Z\"></path><path fill=\"currentColor\" d=\"M18.2227 16.333C18.7748 16.333 19.2225 16.7809 19.2227 17.333C19.2227 17.8853 18.7749 18.333 18.2227 18.333H10.2227C9.67037 18.333 9.22266 17.8853 9.22266 17.333C9.22282 16.7809 9.67047 16.333 10.2227 16.333H18.2227Z\"></path><path fill=\"currentColor\" d=\"M13.7783 11C14.3306 11.0001 14.7783 11.4478 14.7783 12C14.7783 12.5522 14.3306 12.9999 13.7783 13H10.2227C9.67037 13 9.22266 12.5523 9.22266 12C9.22266 11.4477 9.67037 11 10.2227 11H13.7783Z\"></path></g>"
|
|
11878
|
+
}
|
|
11879
|
+
}
|
|
11640
11880
|
},
|
|
11641
11881
|
"file-plus": {
|
|
11642
11882
|
name: "file-plus",
|
|
@@ -16612,10 +16852,10 @@ const Icon = class {
|
|
|
16612
16852
|
let wrapperClasses = 'xpl-icon__wrapper ';
|
|
16613
16853
|
if (this.backgroundColor)
|
|
16614
16854
|
wrapperClasses += `xpl-icon__wrapper--with-background xpl-icon__wrapper--with-background--${this.backgroundColor}`;
|
|
16615
|
-
return (h(Host, { key: '
|
|
16855
|
+
return (h(Host, { key: '81c2fcdfacbdb3cc34b1bd870a13041a3b3720c8' }, h("figure", { key: 'd8bc04651492fb705fdc6a10cc44a19013da078b', class: wrapperClasses }, h("span", { key: '8c9d18ade708bbf3caf4e1fce9779680ee9f6892', "aria-label": this.icon, role: "img", class: "xpl-icon", style: {
|
|
16616
16856
|
width: `${options.width}px`,
|
|
16617
16857
|
height: `${options.height}px`,
|
|
16618
|
-
}, innerHTML: (_a = apolloIcons.getIcon(this.icon)) === null || _a === void 0 ? void 0 : _a.toSVG(options) }), h("figcaption", { key: '
|
|
16858
|
+
}, innerHTML: (_a = apolloIcons.getIcon(this.icon)) === null || _a === void 0 ? void 0 : _a.toSVG(options) }), h("figcaption", { key: 'd26da1d1df59a9aa414c50bcfb9861d860a6ae65' }, this.icon, " icon"))));
|
|
16619
16859
|
}
|
|
16620
16860
|
};
|
|
16621
16861
|
Icon.style = xplIconCss();
|
|
@@ -16741,7 +16981,7 @@ const Input = class {
|
|
|
16741
16981
|
case 'time':
|
|
16742
16982
|
return (h("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 }));
|
|
16743
16983
|
case 'phone':
|
|
16744
|
-
return (h("xpl-input-phone", { inputId: this._id, disabled: this.disabled, 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 }));
|
|
16984
|
+
return (h("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 }));
|
|
16745
16985
|
case 'search': {
|
|
16746
16986
|
const hasVisibleLabel = Boolean(((_a = this.label) !== null && _a !== void 0 ? _a : '').trim());
|
|
16747
16987
|
const hasErrorMessage = Boolean(this.error && this.error.length > 0);
|
|
@@ -16773,13 +17013,13 @@ const Input = class {
|
|
|
16773
17013
|
this.characterCount > this.maxCharacterCount) {
|
|
16774
17014
|
hasError = true;
|
|
16775
17015
|
}
|
|
16776
|
-
return (h(Host, { key: '
|
|
17016
|
+
return (h(Host, { key: '909cf5bbf56456a5bc27e5a3cb6a662ada8df1a7', class: {
|
|
16777
17017
|
'xpl-input': true,
|
|
16778
17018
|
'xpl-input--disabled': this.disabled,
|
|
16779
17019
|
'xpl-input--error': hasError,
|
|
16780
17020
|
'xpl-input--readonly': this.readonly,
|
|
16781
17021
|
[`xpl-input--${this.type}`]: true,
|
|
16782
|
-
} }, this.label && (h("label", { key: '
|
|
17022
|
+
} }, this.label && (h("label", { key: '0391385b4f19a7a4e36e0a42f4bac9e0400fd7df', class: "xpl-input-label", htmlFor: this._id }, this.label, this.description && h("small", { key: '5724a1710c660297a31cbc37b46b68a0e837e583' }, this.description))), this.renderInput(), ((_a = this.error) === null || _a === void 0 ? void 0 : _a.length) > 0 && (h("label", { key: 'ea1f4fe026d00c4119df392df786648f46e21e4b', class: "xpl-input-error", htmlFor: this._id, id: `${this._id}-error` }, h("xpl-icon", { key: '42c279d5e037da8178c4db4e4b934150ddc43a42', icon: "alert-circle", size: 16 }), h("span", { key: '461f9c09aaa8642df9645e856fa10a312572054c' }, this.error)))));
|
|
16783
17023
|
}
|
|
16784
17024
|
get el() { return getElement(this); }
|
|
16785
17025
|
};
|
|
@@ -17149,16 +17389,16 @@ const InputColor = class {
|
|
|
17149
17389
|
top: `${y}px`,
|
|
17150
17390
|
background: `rgb(${r}, ${g}, ${b})`,
|
|
17151
17391
|
};
|
|
17152
|
-
return (h(Host, { key: '
|
|
17392
|
+
return (h(Host, { key: '9700bba0a5c9b7cd11135a21167e5e06463483b5', class: "xpl-input-color" }, h("xpl-popover", { key: '486c2fc5660d7e7c60b7922fa4363174baa7892e', disabled: this.disabled, display: "menu" }, h("div", { key: 'c51bd4c77381c46726bf32c319f69611eba845d1', slot: "trigger" }, h("div", { key: '9a78cf317854ce56532d49c551d1e1041daf1484', class: {
|
|
17153
17393
|
'xpl-input-color__display': true,
|
|
17154
17394
|
'xpl-input-color__display--disabled': this.disabled,
|
|
17155
17395
|
'xpl-input-color__display--error': !!this.hasErrorState,
|
|
17156
|
-
} }, h("span", { key: '
|
|
17396
|
+
} }, h("span", { key: 'a78d2b771ad17897820805f1f5d1e265cdd6cbfa', class: "xpl-input-color__color", style: {
|
|
17157
17397
|
background: objectToStringColor(this.colorValues),
|
|
17158
|
-
} }), this.colorValues.hex ? (h("span", { class: "xpl-input-color__value" }, objectToStringColor(this.colorValues))) : (h("span", { class: "xpl-input-color__placeholder" }, this.placeholder)), this.eyeDropperSupported && !this.hideEyeDropper && (h("xpl-icon", { key: '
|
|
17398
|
+
} }), this.colorValues.hex ? (h("span", { class: "xpl-input-color__value" }, objectToStringColor(this.colorValues))) : (h("span", { class: "xpl-input-color__placeholder" }, this.placeholder)), this.eyeDropperSupported && !this.hideEyeDropper && (h("xpl-icon", { key: '2a176659e06f5f971b1de14c9e6f2978a766dd35', size: 20, icon: "eye-dropper", class: "xpl-input-color__icon", onClick: (e) => {
|
|
17159
17399
|
e.stopPropagation();
|
|
17160
17400
|
this.openEyeDropper();
|
|
17161
|
-
} })))), h("div", { key: '
|
|
17401
|
+
} })))), h("div", { key: '4cfadf2209a0d453f8a1ecc74a343d63b48c5b36', class: "xpl-input-color__menu" }, h("div", { key: '5acdd216cf4e1714ec493a53c0a974d6d25e0c49', class: "xpl-input-color__sl-grid", ref: (el) => {
|
|
17162
17402
|
this.colorInputElements.slGrid = el;
|
|
17163
17403
|
}, style: {
|
|
17164
17404
|
background: [
|
|
@@ -17166,9 +17406,9 @@ const InputColor = class {
|
|
|
17166
17406
|
`linear-gradient(to right, #fff, #fff0)`,
|
|
17167
17407
|
`rgb(${hueBaseColor.r} ${hueBaseColor.g} ${hueBaseColor.b})`,
|
|
17168
17408
|
].join(', '),
|
|
17169
|
-
}, onMouseDown: this.startDrag, onTouchStart: this.startDrag }, h("div", { key: '
|
|
17409
|
+
}, onMouseDown: this.startDrag, onTouchStart: this.startDrag }, h("div", { key: '519a19802a049f1c47fe9acd8ca074c9679cb667', class: "xpl-input-color__sl-thumb", style: slThumbStyle })), h("div", { key: '4c6cc466a3ba89897f0b59cce99835f9a2bc842a', class: "xpl-input-color__grid" }, h("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: (el) => {
|
|
17170
17410
|
this.colorInputElements.hue = el;
|
|
17171
|
-
} }), h("input", { key: '
|
|
17411
|
+
} }), h("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: (el) => {
|
|
17172
17412
|
this.colorInputElements.alpha = el;
|
|
17173
17413
|
}, style: {
|
|
17174
17414
|
backgroundImage: [
|
|
@@ -17178,9 +17418,9 @@ const InputColor = class {
|
|
|
17178
17418
|
`linear-gradient(45deg, transparent 75%, #ccc 75%)`,
|
|
17179
17419
|
`linear-gradient(-45deg, transparent 75%, #ccc 75%)`,
|
|
17180
17420
|
].join(', '),
|
|
17181
|
-
} }), h("div", { key: '
|
|
17421
|
+
} }), h("div", { key: 'a1cf7bde4bd0d2fc7b19b60cff878f56aeb70e2e', class: "xpl-input-color__preview", style: {
|
|
17182
17422
|
background: `rgba(${r}, ${g}, ${b}, ${a})`,
|
|
17183
|
-
} })), h("div", { key: '
|
|
17423
|
+
} })), h("div", { key: '3a82739b45a8ac2be0e732ea27cff2a583503eaf', class: "xpl-input-color__inputs" }, Object.entries(this.colorInputElements)
|
|
17184
17424
|
.filter(([key]) => ['hex', 'r', 'g', 'b', 'a'].includes(key))
|
|
17185
17425
|
.map(([key]) => (h("xpl-input", { key: key, label: key.toLocaleUpperCase(), name: `color-${key}-input`, placeholder: key === 'hex' ? '793EF7' : '0', value: this.colorValues[key], ref: (elRef) => {
|
|
17186
17426
|
this.colorInputElements[key] = elRef;
|
|
@@ -17303,16 +17543,16 @@ const InputDate = class {
|
|
|
17303
17543
|
parent.removeChild(wrapper);
|
|
17304
17544
|
}
|
|
17305
17545
|
render() {
|
|
17306
|
-
return (h(Host, { key: '
|
|
17546
|
+
return (h(Host, { key: 'c038443e47f6b246c2c91ff27a5eb6afcf1c1967', class: {
|
|
17307
17547
|
'xpl-input-date': true,
|
|
17308
17548
|
[`xpl-input-date--mode-${this.mode}`]: true,
|
|
17309
17549
|
'xpl-input-date--error': !!this.hasErrorState,
|
|
17310
17550
|
'xpl-input-date--flatpickr-static': this.flatpickrStaticLayout,
|
|
17311
|
-
} }, h("div", { key: '
|
|
17551
|
+
} }, h("div", { key: '45b9b4ebc53293dcc4c0d527df6d2ef234ac2509', class: "xpl-input-wrapper" }, this.pre && (h("label", { key: 'b112ce85a056e1090391ee9e626c66da47cac750', class: "xpl-input-pre", htmlFor: this.inputId }, this.pre)), h("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: (el) => {
|
|
17312
17552
|
this.input = el;
|
|
17313
17553
|
}, onChange: (event) => {
|
|
17314
17554
|
this.valueChanged(event);
|
|
17315
|
-
} }), h("xpl-icon", { key: '
|
|
17555
|
+
} }), h("xpl-icon", { key: 'f20a83ef7b788aae76ebb6f76ba786eff4c71aeb', class: "xpl-input-calendar", icon: "calendar", size: 24 }), this.post && (h("label", { key: '0aad7e2ec12c88b27e94de978580f6b35b318fce', class: "xpl-input-post", htmlFor: this.inputId }, this.post)))));
|
|
17316
17556
|
}
|
|
17317
17557
|
get el() { return getElement(this); }
|
|
17318
17558
|
static get watchers() { return {
|
|
@@ -17361,18 +17601,18 @@ const InputFile = class {
|
|
|
17361
17601
|
}
|
|
17362
17602
|
render() {
|
|
17363
17603
|
var _a, _b;
|
|
17364
|
-
return (h(Host, { key: '
|
|
17604
|
+
return (h(Host, { key: '42d8f9897e024eb89dc7568f3b99f5a395131294', class: {
|
|
17365
17605
|
'xpl-input-file': true,
|
|
17366
17606
|
'xpl-input-file--hide-trigger-on-select': this.hideTriggerOnSelect,
|
|
17367
17607
|
'xpl-input-file--disabled': this.disabled,
|
|
17368
|
-
} }, h("span", { key: '
|
|
17608
|
+
} }, h("span", { key: '90d5962d5c72ed675cfb18444d814d26a231e4a6', class: {
|
|
17369
17609
|
'xpl-input-file__trigger-wrapper': true,
|
|
17370
17610
|
'xpl-input-file__trigger-wrapper--hidden': this.hideTriggerOnSelect && ((_a = this.files) === null || _a === void 0 ? void 0 : _a.length) > 0,
|
|
17371
|
-
}, role: "button", tabIndex: 0, onClick: this.openFileDialog }, h("slot", { key: '
|
|
17611
|
+
}, role: "button", tabIndex: 0, onClick: this.openFileDialog }, h("slot", { key: 'ad648187fbd71bdccd99db542460e85715507f76', name: "trigger" })), ((_b = this.files) === null || _b === void 0 ? void 0 : _b.length) > 0 && !this.hideFileNames && (h("ul", { key: 'edf302f553f738ecc35e0ce64f73e4b6713b76e7', class: "xpl-input-file__file-list" }, this.files.map((file, fileIndex) => (h("li", { class: "xpl-input-file__file-item" }, h("span", { class: "xpl-text-callout" }, file.name), h("xpl-icon", { icon: "x-circle", size: 24, onClick: (e) => {
|
|
17372
17612
|
e.preventDefault();
|
|
17373
17613
|
e.stopPropagation();
|
|
17374
17614
|
this.onRemoveFileByIndex(fileIndex);
|
|
17375
|
-
}, class: "xpl-input-file__remove-icon" })))))), this.accept && !this.hideAcceptText && (h("span", { key: '
|
|
17615
|
+
}, class: "xpl-input-file__remove-icon" })))))), this.accept && !this.hideAcceptText && (h("span", { key: '56f627241c314b9018cd963ea55a997364b63abf', class: "xpl-input-file__accept xpl-text-caption" }, "Accepted file types: ", this.accept)), h("input", { key: '47180dbed43ab7f3291faeadbe0ddce261d75f25', onChange: this.handleFileChange, type: "file", ref: (el) => {
|
|
17376
17616
|
this.fileInput = el;
|
|
17377
17617
|
}, hidden: true, accept: this.accept, multiple: this.multiple, name: this.name })));
|
|
17378
17618
|
}
|
|
@@ -17860,21 +18100,21 @@ const InputPhone = class {
|
|
|
17860
18100
|
}
|
|
17861
18101
|
render() {
|
|
17862
18102
|
var _a;
|
|
17863
|
-
return (h(Host, { key: '
|
|
18103
|
+
return (h(Host, { key: '1b29d31aca23d7047c36a910bfce85aa54784377', class: {
|
|
17864
18104
|
'xpl-input-phone': true,
|
|
17865
|
-
'xpl-input-phone--error': !!this.hasErrorState,
|
|
18105
|
+
'xpl-input-phone--error': !!this.hasErrorState || !!this.error,
|
|
17866
18106
|
'xpl-input-phone--open': this.dropdownOpen,
|
|
17867
18107
|
'xpl-input-phone--domestic': !this.isInternational,
|
|
17868
|
-
} }, h("div", { key: '
|
|
18108
|
+
} }, h("div", { key: '6b7fa8dab343d6236a5de65b73cb731da1997695', class: "xpl-input-wrapper" }, this.isInternational && (h("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 }, ((_a = this.selectedCountry) === null || _a === void 0 ? void 0 : _a.name) && (h("xpl-icon", { key: '0edbeee2da23758c9335f30b01b2a5f24ece73a3', class: "xpl-input-phone__flag", icon: getCountryIconName(this.selectedCountry.name), size: 24, "aria-hidden": "true" })), h("xpl-icon", { key: '310ae67c8eb2fc30c550782011921051492fae54', class: "xpl-input-phone__trigger-icon", icon: "chevron-down", size: 20, "aria-hidden": "true" }))), h("div", { key: '84abb24d097c61bfd76be3e5bbe1ea7bd9718d30', class: "xpl-input-phone__input-wrap" }, this.isInternational && (h("span", { key: '29975e649c40580f7e126bfc2f72be2a07f6c813', class: "xpl-input-phone__dial-code" }, this.effectiveDialCode)), h("input", { key: '55c85bc4fd439a9913b5b58a8fbbc3f1a328cac9', ref: (el) => {
|
|
17869
18109
|
this.inputEl = el;
|
|
17870
|
-
}, 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 ? '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 && (h("button", { key: '
|
|
18110
|
+
}, 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 && (h("button", { key: '2b05b045d36937e3c85ff93308a75bededd56f4e', type: "button", class: "xpl-input-phone__clear", "aria-label": "Clear phone number", onClick: this.handleClear }, h("xpl-icon", { key: '0834f75780e6cba9e5fef6e4f8613d89dad42216', icon: "x-circle", size: 16 }))))), this.isInternational && this.isEditable && (h("xpl-dropdown", { key: '1e19c6663b14de3f5fd9f740417fc6f342a47177', ref: (el) => {
|
|
17871
18111
|
this.dropdownRef = el;
|
|
17872
18112
|
}, isOpen: this.dropdownOpen, triggerId: this.triggerId, anchorToTrigger: true, closeOnSelect: true, mode: "single", options: this.dropdownOptions, update: this.handleDropdownUpdate, onIsOpenChange: (e) => {
|
|
17873
18113
|
this.dropdownOpen = e.detail;
|
|
17874
|
-
}, "aria-label": "Country" }, h("div", { key: '
|
|
18114
|
+
}, "aria-label": "Country" }, h("div", { key: '910ee42b45fcfea4b5670ca300c6cd7d9a15c709', slot: "header", class: "xpl-input-phone__search-wrap" }, h("xpl-input", { key: 'd7b79cd82d6f1dcd4ed57938f7c4389925426b0c', class: "xpl-input-phone__search", type: "text", label: "", placeholder: "Search", value: this.searchQuery, autocomplete: "off", onInputEvent: (e) => {
|
|
17875
18115
|
var _a;
|
|
17876
18116
|
this.searchQuery = (_a = e.detail) !== null && _a !== void 0 ? _a : '';
|
|
17877
|
-
} }, h("xpl-icon", { key: '
|
|
18117
|
+
} }, h("xpl-icon", { key: '7e8a462d8c0949421d0668b3b289a7c7e7169dbe', slot: "pre", class: "xpl-input-phone__search-icon", icon: "magnifier", size: 20 })))))));
|
|
17878
18118
|
}
|
|
17879
18119
|
get el() { return getElement(this); }
|
|
17880
18120
|
static get watchers() { return {
|
|
@@ -17993,7 +18233,7 @@ const InputSearch = class {
|
|
|
17993
18233
|
return shell;
|
|
17994
18234
|
}
|
|
17995
18235
|
render() {
|
|
17996
|
-
return (h(Host, { key: '
|
|
18236
|
+
return (h(Host, { key: 'bbbcb91c290fec3f0ad0f7df9cb9e43c699f3ab2', class: {
|
|
17997
18237
|
'xpl-input-search': true,
|
|
17998
18238
|
'xpl-input-search--disabled': this.disabled,
|
|
17999
18239
|
'xpl-input-search--error': this.hasError,
|
|
@@ -18177,11 +18417,11 @@ const InputTime = class {
|
|
|
18177
18417
|
}));
|
|
18178
18418
|
}
|
|
18179
18419
|
render() {
|
|
18180
|
-
return (h(Host, { key: '
|
|
18420
|
+
return (h(Host, { key: 'aef2e65955381ed89dd800e889bd20469a201172', class: {
|
|
18181
18421
|
'xpl-input-time': true,
|
|
18182
18422
|
[`xpl-input-time--mode-${this.mode}`]: true,
|
|
18183
18423
|
'xpl-input-time--error': !!this.hasErrorState,
|
|
18184
|
-
} }, h("xpl-input", { key: '
|
|
18424
|
+
} }, h("xpl-input", { key: '90f85f631d876714e65134e964ec521bce1d7948', pre: h("xpl-icon", { class: "xpl-input-time__clock-icon", icon: "clock", size: 24 }), post: this.timeFormat === '12h' ? 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 && (h("xpl-dropdown", { key: 'f42c653946921b15cb0c1b24db01d299c22406c1', options: this.options, isOpen: this.showOptions, ref: (el) => {
|
|
18185
18425
|
this.dropdown = el;
|
|
18186
18426
|
}, class: "xpl-input-time__dropdown" }))));
|
|
18187
18427
|
}
|
|
@@ -18195,55 +18435,6 @@ const InputTime = class {
|
|
|
18195
18435
|
}; }
|
|
18196
18436
|
};
|
|
18197
18437
|
|
|
18198
|
-
class TimerManager {
|
|
18199
|
-
constructor() {
|
|
18200
|
-
this.timeouts = new Set();
|
|
18201
|
-
this.intervals = new Set();
|
|
18202
|
-
this.rafs = new Set();
|
|
18203
|
-
}
|
|
18204
|
-
setTimeout(callback, delay) {
|
|
18205
|
-
const id = setTimeout(() => {
|
|
18206
|
-
this.timeouts.delete(id);
|
|
18207
|
-
callback();
|
|
18208
|
-
}, delay);
|
|
18209
|
-
this.timeouts.add(id);
|
|
18210
|
-
return id;
|
|
18211
|
-
}
|
|
18212
|
-
clearTimeout(id) {
|
|
18213
|
-
clearTimeout(id);
|
|
18214
|
-
this.timeouts.delete(id);
|
|
18215
|
-
}
|
|
18216
|
-
setInterval(callback, delay) {
|
|
18217
|
-
const id = setInterval(callback, delay);
|
|
18218
|
-
this.intervals.add(id);
|
|
18219
|
-
return id;
|
|
18220
|
-
}
|
|
18221
|
-
clearInterval(id) {
|
|
18222
|
-
clearInterval(id);
|
|
18223
|
-
this.intervals.delete(id);
|
|
18224
|
-
}
|
|
18225
|
-
requestAnimationFrame(callback) {
|
|
18226
|
-
const id = requestAnimationFrame((time) => {
|
|
18227
|
-
this.rafs.delete(id);
|
|
18228
|
-
callback(time);
|
|
18229
|
-
});
|
|
18230
|
-
this.rafs.add(id);
|
|
18231
|
-
return id;
|
|
18232
|
-
}
|
|
18233
|
-
cancelAnimationFrame(id) {
|
|
18234
|
-
cancelAnimationFrame(id);
|
|
18235
|
-
this.rafs.delete(id);
|
|
18236
|
-
}
|
|
18237
|
-
dispose() {
|
|
18238
|
-
this.timeouts.forEach((id) => clearTimeout(id));
|
|
18239
|
-
this.timeouts.clear();
|
|
18240
|
-
this.intervals.forEach((id) => clearInterval(id));
|
|
18241
|
-
this.intervals.clear();
|
|
18242
|
-
this.rafs.forEach((id) => cancelAnimationFrame(id));
|
|
18243
|
-
this.rafs.clear();
|
|
18244
|
-
}
|
|
18245
|
-
}
|
|
18246
|
-
|
|
18247
18438
|
let xplListItemsPropDeprecationWarned = false;
|
|
18248
18439
|
function getListItemFromComposedPath(e) {
|
|
18249
18440
|
var _a, _b;
|
|
@@ -18615,12 +18806,12 @@ const List = class {
|
|
|
18615
18806
|
var _a, _b, _c;
|
|
18616
18807
|
const ariaLabelledBy = ((_a = this.labelledBy) === null || _a === void 0 ? void 0 : _a.trim()) ? this.labelledBy.trim() : undefined;
|
|
18617
18808
|
const ariaLabel = !ariaLabelledBy && ((_b = this.label) === null || _b === void 0 ? void 0 : _b.trim()) ? this.label.trim() : undefined;
|
|
18618
|
-
return (h(Host, { key: '
|
|
18809
|
+
return (h(Host, { key: '66c41bf0c252a6ae1e61aea6d8c1c40fc594d8c7', role: "list", class: { 'xpl-list': true }, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy }, (_c = this.items) === null || _c === void 0 ? void 0 :
|
|
18619
18810
|
_c.map((item, index) => {
|
|
18620
18811
|
var _a;
|
|
18621
18812
|
const legacyRowId = (_a = item.id) !== null && _a !== void 0 ? _a : `item-${index}`;
|
|
18622
18813
|
return (h("xpl-list-item", { key: `legacy-item-${legacyRowId}`, item: item, href: item.href, itemId: legacyRowId }));
|
|
18623
|
-
}), h("slot", { key: '
|
|
18814
|
+
}), h("slot", { key: '922088a7fe36e8bb2ee905ac79ac845eff101707' }), this.reorderable ? (h("div", { class: "xpl-list__reorder-live", "aria-live": "assertive", "aria-atomic": "true" }, this.reorderLiveMessage)) : null));
|
|
18624
18815
|
}
|
|
18625
18816
|
get el() { return getElement(this); }
|
|
18626
18817
|
static get watchers() { return {
|
|
@@ -19108,6 +19299,9 @@ const Modal = class {
|
|
|
19108
19299
|
this.modalClosed.emit();
|
|
19109
19300
|
};
|
|
19110
19301
|
this.handleNativeBackdropClick = (event) => {
|
|
19302
|
+
if (event.target !== this.dialogElement) {
|
|
19303
|
+
return;
|
|
19304
|
+
}
|
|
19111
19305
|
const rect = this.dialogElement.getBoundingClientRect();
|
|
19112
19306
|
const clickedOutsideDialog = event.clientX < rect.left ||
|
|
19113
19307
|
event.clientX > rect.right ||
|
|
@@ -19143,7 +19337,7 @@ const Modal = class {
|
|
|
19143
19337
|
}
|
|
19144
19338
|
}
|
|
19145
19339
|
render() {
|
|
19146
|
-
return (h(Host, { key: '
|
|
19340
|
+
return (h(Host, { key: 'd1457065d1448b866f21a5a7a903fbc8504567a5', class: "xpl-modal" }, this.isOpen && h("xpl-backdrop", { key: '05807b08500c1ba557c9dabe04ca059f3638f36c' }), h("dialog", { key: '14f78e63f6e19f83fd159604175381b054848ad6', class: `xpl-modal__dialog xpl-modal-size--${this.size} xpl-modal--${this.isOpen ? 'is-open' : 'is-closed'}` }, h("div", { key: '54cbd855c642bad93f74d8f6f875c32728d8539a', class: "xpl-modal__header" }, h("div", { key: 'd0ae962e9ddb8df05eeefd2cd083c0aaf6253814', class: "xpl-modal__title" }, this.variant === 'warning' && (h("xpl-icon", { key: '896dbc9e4c614b456f2b22626c294f86e655f811', size: 20, icon: "alert-triangle", class: "xpl-modal__alert-icon" })), h("slot", { key: '859b27499e4ae644c06d376225f56d47b0081dc2', name: "title" }), h("xpl-button", { key: '288822a0310d17b13360acb7d358e7b5711fa79f', type: "button", class: "xpl-modal__close-button", "icon-only": true, size: "sm", variant: "tertiary", onClick: this.handleDialogClose }, h("xpl-icon", { key: '14181eec31afd43bf07a21f6ae65664ea12f789a', icon: "x" }))), h("div", { key: '4d23417d83bdb3312f1c883a367687e1d4fdfa7c', class: "xpl-modal__subtitle" }, h("slot", { key: '5db4d5c7997a4a27f7195cdd0ff56d81238835e1', name: "subtitle" }))), h("div", { key: 'e17d7805f75d00422d6eaa8148a1f0f3297369df', class: "xpl-modal__body" }, h("slot", { key: 'f1f43ce5fce6c1567bf856071b5d283c28a64bbe', name: "body" })), h("div", { key: 'c7757cabc4d718a19ee8c91020f20e4437b73d6d', class: "xpl-modal__footer" }, h("slot", { key: 'bdcf1d5ca962025e7cdd2368b1dd6117b5dc190a', name: "tertiary" }), h("slot", { key: '483ce3eb24f84d4c08a84e97e6e6a9af9829b007', name: "secondary" }), h("slot", { key: '7c7ec707d80fecb81a21c997c84a1622370285b0', name: "primary" })))));
|
|
19147
19341
|
}
|
|
19148
19342
|
get element() { return getElement(this); }
|
|
19149
19343
|
static get watchers() { return {
|
|
@@ -19219,11 +19413,11 @@ const NavHeaderMenu = class {
|
|
|
19219
19413
|
}
|
|
19220
19414
|
render() {
|
|
19221
19415
|
const hasProfile = !!this.username || !!this.email;
|
|
19222
|
-
return (h(Host, { key: '
|
|
19416
|
+
return (h(Host, { key: 'c2a9e2904ae2cd06462f7e2d4407ac3e34ded34e', class: {
|
|
19223
19417
|
'xpl-nav-header-menu': true,
|
|
19224
19418
|
'xpl-nav-header-menu--has-right-aside-mobile': this.rightAsideMobilePresent,
|
|
19225
19419
|
dark: true,
|
|
19226
|
-
} }, hasProfile && (h("div", { key: '
|
|
19420
|
+
} }, hasProfile && (h("div", { key: '0b7c1b081ac1e73b95bf36724e83511c27e522be', class: "xpl-nav-header-menu__profile" }, h("div", { key: '77ac13de474f5508b5bae03aba09f782a0a05cbc', class: "xpl-nav-header-menu__info" }, this.username && (h("div", { key: '58722b17d64c8cffe7a38b81f30f885a26b0b19e', class: "xpl-nav-header-menu__username" }, this.username)), this.email && (h("div", { key: 'ad7aa885518ee8c205cc3f0e1c84a24b3e486335', class: "xpl-nav-header-menu__email" }, this.email))))), h("div", { key: 'e8c6cdb4e57b02d8b9591eef07a9f0458b73acaa', class: "xpl-nav-header-menu__right-aside-mobile" }, h("slot", { key: 'bb884eeb89b4de9d45cb4a7466cc2d7aac90cf6f', name: "right-aside-mobile" })), h("div", { key: '4fa5347923a9f9db10e8875e9ec00407b843263c', class: "xpl-nav-header-menu__slot", role: "list" }, h("slot", { key: '694d33b2fe8b1cfa302de845a15aa24fdb33fc62' }))));
|
|
19227
19421
|
}
|
|
19228
19422
|
get el() { return getElement(this); }
|
|
19229
19423
|
};
|
|
@@ -19240,11 +19434,11 @@ const NavItem = class {
|
|
|
19240
19434
|
}
|
|
19241
19435
|
}
|
|
19242
19436
|
render() {
|
|
19243
|
-
return (h(Host, { key: '
|
|
19437
|
+
return (h(Host, { key: 'f7494edb113b4eccf244c312447e69248af495ba', class: "xpl-nav-item", role: "listitem", onClick: () => {
|
|
19244
19438
|
if (this.navControl) {
|
|
19245
19439
|
this.onNavToggle();
|
|
19246
19440
|
}
|
|
19247
|
-
} }, h("slot", { key: '
|
|
19441
|
+
} }, h("slot", { key: 'acde5d80edbead75a558b964954caa18e1cc0c5f', name: "link" }, h("slot", { key: '66838cf7e6610e48d7102475cc6463aa65f4651b', name: "icon" }), h("slot", { key: 'de185eaab42a425cf82eaaf6883b1472fecb9754' }))));
|
|
19248
19442
|
}
|
|
19249
19443
|
};
|
|
19250
19444
|
|
|
@@ -19260,6 +19454,7 @@ const Pagination = class {
|
|
|
19260
19454
|
this.selectedRowsPerPage = 10;
|
|
19261
19455
|
this.rowsPerPageSelectRef = null;
|
|
19262
19456
|
this.pageSelectRef = null;
|
|
19457
|
+
this.pageChoices = [];
|
|
19263
19458
|
this.handleNextPage = () => {
|
|
19264
19459
|
if (this.currentPage < this.totalPages) {
|
|
19265
19460
|
this.currentPage += 1;
|
|
@@ -19293,11 +19488,29 @@ const Pagination = class {
|
|
|
19293
19488
|
else if (newValue > this.totalPages) {
|
|
19294
19489
|
this.currentPage = this.totalPages;
|
|
19295
19490
|
}
|
|
19491
|
+
this.buildPageChoices();
|
|
19296
19492
|
this.pageChange.emit(this.currentPage);
|
|
19297
19493
|
}
|
|
19494
|
+
onTotalPagesUpdate() {
|
|
19495
|
+
if (this.currentPage > this.totalPages) {
|
|
19496
|
+
this.currentPage = this.totalPages;
|
|
19497
|
+
return;
|
|
19498
|
+
}
|
|
19499
|
+
this.buildPageChoices();
|
|
19500
|
+
}
|
|
19298
19501
|
onRowsPerPageUpdate(newValue) {
|
|
19299
19502
|
this.rowsPerPageChange.emit(newValue);
|
|
19300
19503
|
}
|
|
19504
|
+
buildPageChoices() {
|
|
19505
|
+
this.pageChoices = Array.from({ length: this.totalPages }, (_, index) => ({
|
|
19506
|
+
label: `Page ${index + 1}`,
|
|
19507
|
+
value: (index + 1).toString(),
|
|
19508
|
+
isSelected: index + 1 === this.currentPage,
|
|
19509
|
+
}));
|
|
19510
|
+
}
|
|
19511
|
+
componentWillLoad() {
|
|
19512
|
+
this.buildPageChoices();
|
|
19513
|
+
}
|
|
19301
19514
|
componentDidLoad() {
|
|
19302
19515
|
var _a, _b;
|
|
19303
19516
|
(_a = this.rowsPerPageSelectRef) === null || _a === void 0 ? void 0 : _a.addEventListener('changeEvent', this.handleRowsChange);
|
|
@@ -19311,28 +19524,27 @@ const Pagination = class {
|
|
|
19311
19524
|
render() {
|
|
19312
19525
|
const disablePrev = this.currentPage <= 1;
|
|
19313
19526
|
const disableNext = this.currentPage >= this.totalPages;
|
|
19314
|
-
return (h(Host, { key: '
|
|
19527
|
+
return (h(Host, { key: '7ee32b9506487555cf9c96b8204bc06acff20614', class: {
|
|
19315
19528
|
'xpl-pagination': true,
|
|
19316
19529
|
'xpl-pagination__with-page-control': this.withPageControl,
|
|
19317
19530
|
'xpl-pagination__no-page-control': !this.withPageControl,
|
|
19318
|
-
} }, this.withPageControl && (h("div", { key: '
|
|
19531
|
+
} }, this.withPageControl && (h("div", { key: 'd0b77c50e30c046df37e806912d9d144066ce8ea', class: "xpl-pagination__rows-per-page" }, h("label", { key: '5a596a7f2e440f007cc51ffb965f8c6da057bd11', class: "xpl-pagination__rows-label" }, "Rows per page:"), h("xpl-select", { key: '3592c6c2b8efa704536e64bf6ae085f228921573', class: "xpl-pagination__rows-per-page-select", dropdownFlipFallbackPlacements: ['bottom-start'], dropdownPlacement: "top-start", choices: this.rowsPerPageOptionsArray.map((option) => ({
|
|
19319
19532
|
label: option.toString(),
|
|
19320
19533
|
value: option.toString(),
|
|
19321
19534
|
isSelected: option === this.selectedRowsPerPage,
|
|
19322
19535
|
})), ref: (el) => {
|
|
19323
19536
|
this.rowsPerPageSelectRef = el;
|
|
19324
|
-
} }))), h("div", { key: '
|
|
19325
|
-
label: `Page ${index + 1}`,
|
|
19326
|
-
value: (index + 1).toString(),
|
|
19327
|
-
isSelected: index + 1 === this.currentPage,
|
|
19328
|
-
})), "custom-display-value": true, ref: (el) => {
|
|
19537
|
+
} }))), h("div", { key: '0c4e020f133b9bff31e185fb3ea11d3e98f0ac00', class: "xpl-pagination__pager" }, h("button", { key: 'add5b2b91bb1c1d08637bc7e8cf907274126765c', class: "xpl-pagination__pager-button xpl-pagination__pager-button-prev", disabled: disablePrev, onClick: this.handlePrevPage, "aria-label": "Previous Page", tabindex: "0" }, h("xpl-icon", { key: 'ca29bdc9acb1f220afb7cbb5a2f1bfc8602c07c9', icon: "arrow-left", size: 20 })), h("xpl-select", { key: '89244ec17d7e8f10188a6b7b25dde30f9885aef2', class: "xpl-pagination__page-select", dropdownFlipFallbackPlacements: ['bottom-start'], dropdownPlacement: "top-start", choices: this.pageChoices, "custom-display-value": true, ref: (el) => {
|
|
19329
19538
|
this.pageSelectRef = el;
|
|
19330
|
-
} }, h("div", { key: '
|
|
19539
|
+
} }, h("div", { key: '916de27d7e201ba0920c265109edf2a6e9bd0620', slot: "custom-display-value" }, `${this.currentPage} of ${this.totalPages}`)), h("button", { key: '7ddaf9be0ab94e8e0e1fdbdca20e76294d7d2706', class: "xpl-pagination__pager-button xpl-pagination__pager-button-next", disabled: disableNext, onClick: this.handleNextPage, "aria-label": "Next Page", tabindex: "0" }, h("xpl-icon", { key: '37703d9e35a8288bf24c8675e4e973a400f7a0e9', icon: "arrow-right", size: 20 })))));
|
|
19331
19540
|
}
|
|
19332
19541
|
static get watchers() { return {
|
|
19333
19542
|
"currentPage": [{
|
|
19334
19543
|
"onPageUpdate": 0
|
|
19335
19544
|
}],
|
|
19545
|
+
"totalPages": [{
|
|
19546
|
+
"onTotalPagesUpdate": 0
|
|
19547
|
+
}],
|
|
19336
19548
|
"selectedRowsPerPage": [{
|
|
19337
19549
|
"onRowsPerPageUpdate": 0
|
|
19338
19550
|
}]
|
|
@@ -19347,11 +19559,11 @@ const XplPanel = class {
|
|
|
19347
19559
|
}
|
|
19348
19560
|
render() {
|
|
19349
19561
|
const hasAccent = this.accent !== 'none';
|
|
19350
|
-
return (h(Host, { key: '
|
|
19562
|
+
return (h(Host, { key: 'f7216acfba4419e26d171a24aa64153991841701', class: {
|
|
19351
19563
|
'xpl-panel': true,
|
|
19352
19564
|
[`xpl-panel--accent-${this.accent}`]: hasAccent,
|
|
19353
19565
|
[`xpl-panel--padding-${this.padding}`]: true,
|
|
19354
|
-
} }, hasAccent && h("div", { key: '
|
|
19566
|
+
} }, hasAccent && h("div", { key: '18f1ed385cb4d29dbe18e7272e779a40a2ead05e', "aria-hidden": "true", class: "xpl-panel__accent" }), h("div", { key: 'd0a13066c9c4b472b505ffd7592f882bb886b9a2', class: "xpl-panel__content" }, h("slot", { key: '0c8c6495afcbd3a897a6f118e17df75dc7328363' }))));
|
|
19355
19567
|
}
|
|
19356
19568
|
};
|
|
19357
19569
|
|
|
@@ -20014,16 +20226,16 @@ const Popover = class {
|
|
|
20014
20226
|
});
|
|
20015
20227
|
}
|
|
20016
20228
|
render() {
|
|
20017
|
-
return (h(Host, { key: '
|
|
20229
|
+
return (h(Host, { key: 'fd4ba66077f4909fe71a47b719fc76e8b0970bcc' }, h("div", { key: 'f54d27275be2e332ae72e225197eb76350803db3', class: {
|
|
20018
20230
|
'xpl-popover': true,
|
|
20019
20231
|
[`xpl-popover--${this.actualPosition}`]: true,
|
|
20020
20232
|
'xpl-popover--is-open': this.isOpenState,
|
|
20021
|
-
} }, h("span", { key: '
|
|
20233
|
+
} }, h("span", { key: 'a45378d297636bcb6eddd0ea2927703291f27571', role: "button", tabindex: "0", "aria-haspopup": "dialog", "aria-expanded": this.isOpenState ? 'true' : 'false', onClick: this.togglePopover, ref: (el) => {
|
|
20022
20234
|
this.triggerRef = el;
|
|
20023
|
-
} }, h("slot", { key: '
|
|
20235
|
+
} }, h("slot", { key: 'e40f33425dede71e45fefca68eed6231f569b6f4', name: "trigger" })), this.display === 'arrow' && (h("div", { key: '4c6dbd56d3b6c782bdd25c9674df29b92866e55c', class: "xpl-popover__arrow" }, h("svg", { key: '6492c5f9ffd7609ed0fb334f515bf5448db9b837', width: "17", height: "14", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: 'e1e92c7c65caece9b89b9b23f6031409cd67312c', d: "M0 5h15l-7.5 7.5L0 5Z", fill: "white", stroke: "none", class: "arrow-fill" }), h("path", { key: '496097d86300cdd3a09732e3fb5492e8b3e4a292', d: "M0 5 L7.5 12.5 L15 5", fill: "none", stroke: "black", "stroke-width": "1", class: "arrow-stroke" })))), h("div", { key: 'ed12d8116e9c230dbe166b4479b19d640849b873', class: {
|
|
20024
20236
|
'xpl-popover__content': true,
|
|
20025
20237
|
[`xpl-popover__content--display-${this.display}`]: true,
|
|
20026
|
-
}, ref: (el) => (this.contentRef = el) }, h("slot", { key: '
|
|
20238
|
+
}, ref: (el) => (this.contentRef = el) }, h("slot", { key: 'ad827a2a95546d4e3c975cd410ba4067fd69ad04' })))));
|
|
20027
20239
|
}
|
|
20028
20240
|
get el() { return getElement(this); }
|
|
20029
20241
|
static get watchers() { return {
|
|
@@ -20063,12 +20275,12 @@ const ProgressBar = class {
|
|
|
20063
20275
|
return this.variant === 'indeterminate';
|
|
20064
20276
|
}
|
|
20065
20277
|
render() {
|
|
20066
|
-
return (h(Host, { key: '
|
|
20278
|
+
return (h(Host, { key: 'bae4b080ca10ce596b7f889fc50b41199bcee67b', class: {
|
|
20067
20279
|
'xpl-progress-bar': true,
|
|
20068
20280
|
[`xpl-progress-bar--${this.size}`]: true,
|
|
20069
20281
|
[`xpl-progress-bar--${this.variant}`]: true,
|
|
20070
20282
|
'xpl-progress-bar--complete': this.isComplete,
|
|
20071
|
-
} }, h("div", { key: '
|
|
20283
|
+
} }, h("div", { key: '3e13c35002888a7ea5b4710ec96ea72ab6e8811c', class: "xpl-progress-bar__wrapper" }, (this.label || this.showStatusIcon) && (h("div", { key: 'c41d0c11ef55fc3be48b8007716439a0791245c5', class: "xpl-progress-bar__header" }, this.label && h("div", { key: 'c680eb355e174bfa3a17b29e64d5d9e8d3699718', class: "xpl-progress-bar__label" }, this.label), this.showStatusIcon && (h("div", { key: 'a4d541ee3fa68549dbfa8f371b8d3e5a5d9dcfd0', class: "xpl-progress-bar__icon" }, this.isError ? (h("xpl-icon", { icon: "circle-xmark-1" })) : (h("xpl-icon", { icon: "circle-check-1" })))))), h("div", { key: '24aa03523c672a1604b91da88dae9a58895a412b', class: "xpl-progress-bar__row" }, this.isIndeterminate ? (h("div", { class: "xpl-progress-bar__track xpl-progress-bar__track--indeterminate", role: "progressbar", "aria-label": this.label || 'Progress' }, h("div", { class: "xpl-progress-bar__indeterminate" }))) : (h("progress", { class: "xpl-progress-bar__progress", value: this.clampedValue, max: this.max, "aria-label": this.label || 'Progress' }))), this.helperText && (h("div", { key: '67a687ba35eb5208286833834b1a4e75d64ca47d', class: "xpl-progress-bar__helper" }, this.helperText)))));
|
|
20072
20284
|
}
|
|
20073
20285
|
};
|
|
20074
20286
|
|
|
@@ -20129,7 +20341,7 @@ const ProgressIndicator = class {
|
|
|
20129
20341
|
? `Progress: all ${totalSteps} ${totalSteps === 1 ? 'step' : 'steps'} complete`
|
|
20130
20342
|
: `Progress: step ${currentStepNumber} of ${totalSteps}`
|
|
20131
20343
|
: 'Progress';
|
|
20132
|
-
return (h(Host, { key: '
|
|
20344
|
+
return (h(Host, { key: '267a70a3c6ceffe23390abb57a524d5ddb2b53a6', class: hostClasses, role: "group", "aria-label": ariaLabel }, h("div", { key: 'd34a875d04fb035cc5cda9c8194135d173f7ebae', class: "xpl-progress-indicator-container", role: "list" }, steps.map((step, index) => this.renderStep(step, index)))));
|
|
20133
20345
|
}
|
|
20134
20346
|
static get watchers() { return {
|
|
20135
20347
|
"steps": [{
|
|
@@ -20163,14 +20375,14 @@ const Radio = class {
|
|
|
20163
20375
|
return Boolean(this.checked);
|
|
20164
20376
|
}
|
|
20165
20377
|
render() {
|
|
20166
|
-
return (h(Host, { key: '
|
|
20378
|
+
return (h(Host, { key: 'b25d59aa55a08aa7264e1dadc670b540d3740dfc', class: {
|
|
20167
20379
|
'xpl-checkbox-radio-container': true,
|
|
20168
20380
|
styled: this.styled,
|
|
20169
20381
|
disabled: this.disabled,
|
|
20170
|
-
} }, h("input", { key: '
|
|
20382
|
+
} }, h("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 }), h("label", { key: 'd521ca252872494ed28826721dde6270e441a3a3', class: {
|
|
20171
20383
|
'xpl-label': true,
|
|
20172
20384
|
'xpl-label--disabled': this.disabled,
|
|
20173
|
-
}, htmlFor: this.id }, h("slot", { key: '
|
|
20385
|
+
}, htmlFor: this.id }, h("slot", { key: '5093a78e1fb18908b700cb90cf932de06a3ce76d' }), this.description && (h("small", { key: '8806e9374a812df4db6fa8a9a9e1672abd282299', class: {
|
|
20174
20386
|
'xpl-description': true,
|
|
20175
20387
|
'xpl-description--disabled': this.disabled,
|
|
20176
20388
|
} }, this.description)))));
|
|
@@ -20182,7 +20394,7 @@ const SecondaryNav = class {
|
|
|
20182
20394
|
registerInstance(this, hostRef);
|
|
20183
20395
|
}
|
|
20184
20396
|
render() {
|
|
20185
|
-
return (h(Host, { key: '
|
|
20397
|
+
return (h(Host, { key: '8137a8f7ecc1682f1b7e64d41f12c70b9030dd4d', class: "xpl-secondary-nav" }, h("nav", { key: 'f2f65911a356c4265ee583f37ffeb9f78f12d9b4', "aria-label": "Secondary Nav" }, h("slot", { key: '972a51f6d4d59f17a88681f1fbd537ff0dc9fe0b' }))));
|
|
20186
20398
|
}
|
|
20187
20399
|
};
|
|
20188
20400
|
|
|
@@ -20195,7 +20407,7 @@ function getDisplayValue(choice) {
|
|
|
20195
20407
|
return choice.label || choice.value;
|
|
20196
20408
|
}
|
|
20197
20409
|
function flattenChoices(choices) {
|
|
20198
|
-
return choices.
|
|
20410
|
+
return choices.flatMap((choice) => choice.groupName && choice.options ? choice.options : [choice]);
|
|
20199
20411
|
}
|
|
20200
20412
|
const Select = class {
|
|
20201
20413
|
constructor(hostRef) {
|
|
@@ -20385,16 +20597,21 @@ const Select = class {
|
|
|
20385
20597
|
(_a = this.handleResizeThrottled) === null || _a === void 0 ? void 0 : _a.cancel();
|
|
20386
20598
|
}
|
|
20387
20599
|
handleDropdownTrigger() {
|
|
20388
|
-
var _a;
|
|
20389
|
-
|
|
20600
|
+
var _a, _b;
|
|
20601
|
+
if (this.disabled) {
|
|
20602
|
+
return;
|
|
20603
|
+
}
|
|
20604
|
+
const prevState = (_b = (_a = this.dropdown) === null || _a === void 0 ? void 0 : _a.isOpen) !== null && _b !== void 0 ? _b : false;
|
|
20390
20605
|
const nextState = !prevState;
|
|
20391
20606
|
const e = this.triggerDropdown.emit({
|
|
20392
20607
|
prevState,
|
|
20393
20608
|
nextState,
|
|
20394
20609
|
});
|
|
20395
|
-
if (!e.defaultPrevented
|
|
20610
|
+
if (!e.defaultPrevented) {
|
|
20396
20611
|
this.dropdownOpenState = nextState;
|
|
20397
|
-
this.dropdown
|
|
20612
|
+
if (this.dropdown) {
|
|
20613
|
+
this.dropdown.isOpen = nextState;
|
|
20614
|
+
}
|
|
20398
20615
|
}
|
|
20399
20616
|
}
|
|
20400
20617
|
async reset() {
|
|
@@ -20413,21 +20630,21 @@ const Select = class {
|
|
|
20413
20630
|
this.truncate &&
|
|
20414
20631
|
!this.customDisplayValue;
|
|
20415
20632
|
const truncatedText = `+ ${Math.abs(this.choicesState.filter((a) => a.isSelected).length - this.visibleChoices)} more`;
|
|
20416
|
-
return (h(Host, { key: '
|
|
20633
|
+
return (h(Host, { key: '1428590871e33aa2b506904114caa4b36d08e9f9', class: {
|
|
20417
20634
|
'xpl-select': true,
|
|
20418
20635
|
'xpl-select--disabled': this.disabled,
|
|
20419
20636
|
'xpl-select--no-truncate': !this.truncate,
|
|
20420
20637
|
[(_c = this.classNames) !== null && _c !== void 0 ? _c : '']: !!this.classNames,
|
|
20421
20638
|
}, onKeyDown: this.handleTabKeyDown, ref: (el) => {
|
|
20422
20639
|
this.container = el;
|
|
20423
|
-
} }, this.renderLabel(), h("div", { key: '
|
|
20640
|
+
} }, this.renderLabel(), h("div", { key: '02766a897e7e1152fc7e0a65c561ac8b25cd2ce4', class: {
|
|
20424
20641
|
'xpl-input': true,
|
|
20425
20642
|
'xpl-input--disabled': this.disabled,
|
|
20426
20643
|
'xpl-input--error': ((_d = this.error) === null || _d === void 0 ? void 0 : _d.length) >= 0,
|
|
20427
|
-
} }, h("div", { key: '
|
|
20644
|
+
} }, h("div", { key: 'd18740165a8c8a3334603500ad4b633783274935', class: "xpl-input-wrapper" }, h("button", { key: 'a54e65c565ace5276a72d1f1cb6ac9cccbcf3f2e', class: "xpl-select__trigger", disabled: this.disabled, id: this.id, onKeyDown: this.handleTabKeyDown, onClick: (e) => {
|
|
20428
20645
|
e.preventDefault();
|
|
20429
20646
|
this.handleDropdownTrigger();
|
|
20430
|
-
}, type: "button" }, h("div", { key: '
|
|
20647
|
+
}, type: "button" }, h("div", { key: 'fca29be85e2655a50f9ed0e1619c7de9b7220321', class: {
|
|
20431
20648
|
'xpl-select-value': true,
|
|
20432
20649
|
'xpl-select-value--active': this.mode === 'multi' && this.value.length > 0,
|
|
20433
20650
|
'has-value': this.value.length > 0,
|
|
@@ -20447,7 +20664,7 @@ const Select = class {
|
|
|
20447
20664
|
return this.renderSelectedTags();
|
|
20448
20665
|
}
|
|
20449
20666
|
return this.placeholder;
|
|
20450
|
-
})(), isTextTruncated && truncatedText), h("xpl-icon", { key: '
|
|
20667
|
+
})(), isTextTruncated && truncatedText), h("xpl-icon", { key: 'c58b026d3e2831c832c3bc54489525119af70e8f', class: "xpl-select__chevron-down", icon: this.selectIcon }))), !this.disabled && (h("xpl-dropdown", { key: 'c0f1a6e4be933f05c5ba88ed20a3ccebeaf895c5', ref: (el) => {
|
|
20451
20668
|
this.dropdown = el;
|
|
20452
20669
|
}, isOpen: this.dropdownOpenState, options: this.choicesState, selectedValues: this.selectedValues, mode: this.mode, triggerId: this.id, update: (_e, { component }) => {
|
|
20453
20670
|
const { options } = component;
|
|
@@ -20456,7 +20673,7 @@ const Select = class {
|
|
|
20456
20673
|
}
|
|
20457
20674
|
}, onIsOpenChange: (e) => {
|
|
20458
20675
|
this.dropdownOpenState = e.detail;
|
|
20459
|
-
}, onWheel: this.handleDropdownScroll, anchorToTrigger: true, flipFallbackPlacements: this.dropdownFlipFallbackPlacements, placement: this.dropdownPlacement })), this.renderError()), h("input", { key: '
|
|
20676
|
+
}, onWheel: this.handleDropdownScroll, anchorToTrigger: true, flipFallbackPlacements: this.dropdownFlipFallbackPlacements, placement: this.dropdownPlacement })), this.renderError()), h("input", { key: '48958ae33322efe0e3de08eb9da2baac981e58a2', type: "hidden", name: this.name, value: this.value })));
|
|
20460
20677
|
}
|
|
20461
20678
|
static get watchers() { return {
|
|
20462
20679
|
"choices": [{
|
|
@@ -20477,15 +20694,213 @@ const Select = class {
|
|
|
20477
20694
|
}; }
|
|
20478
20695
|
};
|
|
20479
20696
|
|
|
20697
|
+
const SIDE_NAV_MOBILE_MQ = '(max-width: 767px)';
|
|
20698
|
+
const SIDE_NAV_CLOSE_ANIMATION_MS = 600;
|
|
20699
|
+
|
|
20480
20700
|
const SideNav = class {
|
|
20481
20701
|
constructor(hostRef) {
|
|
20482
20702
|
registerInstance(this, hostRef);
|
|
20703
|
+
this.openChange = createEvent(this, "openChange", 7);
|
|
20704
|
+
this.drawerClosing = false;
|
|
20705
|
+
this.open = false;
|
|
20706
|
+
this.onViewportChange = () => {
|
|
20707
|
+
this.clearCloseTransition();
|
|
20708
|
+
this.syncDocKeyDownListener();
|
|
20709
|
+
};
|
|
20710
|
+
this.focusToggleAfterClose = () => {
|
|
20711
|
+
if (!this.isBelowMdBreakpoint())
|
|
20712
|
+
return;
|
|
20713
|
+
if (this.toggleFocusTimeoutId !== undefined) {
|
|
20714
|
+
clearTimeout(this.toggleFocusTimeoutId);
|
|
20715
|
+
}
|
|
20716
|
+
this.toggleFocusTimeoutId = setTimeout(() => {
|
|
20717
|
+
var _a;
|
|
20718
|
+
this.toggleFocusTimeoutId = undefined;
|
|
20719
|
+
(_a = this.el.querySelector('.xpl-side-nav__toggle button')) === null || _a === void 0 ? void 0 : _a.focus();
|
|
20720
|
+
}, 0);
|
|
20721
|
+
};
|
|
20722
|
+
this.focusDrawerOnOpen = () => {
|
|
20723
|
+
if (!this.isBelowMdBreakpoint())
|
|
20724
|
+
return;
|
|
20725
|
+
if (this.drawerFocusTimeoutId !== undefined) {
|
|
20726
|
+
clearTimeout(this.drawerFocusTimeoutId);
|
|
20727
|
+
}
|
|
20728
|
+
this.drawerFocusTimeoutId = setTimeout(() => {
|
|
20729
|
+
var _a;
|
|
20730
|
+
this.drawerFocusTimeoutId = undefined;
|
|
20731
|
+
const wrapper = this.el.querySelector('.xpl-side-nav__wrapper');
|
|
20732
|
+
const first = wrapper
|
|
20733
|
+
? this.getFocusableElements().find((el) => wrapper.contains(el))
|
|
20734
|
+
: undefined;
|
|
20735
|
+
const fallback = this.el.querySelector('.xpl-side-nav__toggle button');
|
|
20736
|
+
(_a = (first !== null && first !== void 0 ? first : fallback)) === null || _a === void 0 ? void 0 : _a.focus();
|
|
20737
|
+
}, 0);
|
|
20738
|
+
};
|
|
20739
|
+
this.onBackdropClick = () => this.setOpenState(false);
|
|
20740
|
+
this.onDocKeyDown = (e) => {
|
|
20741
|
+
if (!this.isMobileDrawerActive())
|
|
20742
|
+
return;
|
|
20743
|
+
if (this.shouldYieldFocusToExternalModal())
|
|
20744
|
+
return;
|
|
20745
|
+
switch (e.key.toLowerCase()) {
|
|
20746
|
+
case 'escape': {
|
|
20747
|
+
if (!this.open)
|
|
20748
|
+
return;
|
|
20749
|
+
if (this.anyDescendantPopoverIsOpen())
|
|
20750
|
+
return;
|
|
20751
|
+
e.preventDefault();
|
|
20752
|
+
e.stopPropagation();
|
|
20753
|
+
this.setOpenState(false);
|
|
20754
|
+
return;
|
|
20755
|
+
}
|
|
20756
|
+
case 'tab': {
|
|
20757
|
+
this.trapTabKey(e);
|
|
20758
|
+
break;
|
|
20759
|
+
}
|
|
20760
|
+
}
|
|
20761
|
+
};
|
|
20762
|
+
this.onToggleClick = () => this.setOpenState(!this.open);
|
|
20763
|
+
}
|
|
20764
|
+
onOpenChanged(newValue, oldValue) {
|
|
20765
|
+
if (oldValue && !newValue && this.isBelowMdBreakpoint()) {
|
|
20766
|
+
this.drawerClosing = true;
|
|
20767
|
+
if (this.closeTransitionTimeoutId !== undefined) {
|
|
20768
|
+
clearTimeout(this.closeTransitionTimeoutId);
|
|
20769
|
+
}
|
|
20770
|
+
this.closeTransitionTimeoutId = setTimeout(() => {
|
|
20771
|
+
this.closeTransitionTimeoutId = undefined;
|
|
20772
|
+
this.drawerClosing = false;
|
|
20773
|
+
this.syncDocKeyDownListener();
|
|
20774
|
+
}, SIDE_NAV_CLOSE_ANIMATION_MS);
|
|
20775
|
+
}
|
|
20776
|
+
else {
|
|
20777
|
+
this.clearCloseTransition();
|
|
20778
|
+
}
|
|
20779
|
+
this.syncDocKeyDownListener();
|
|
20780
|
+
if (oldValue && !newValue)
|
|
20781
|
+
this.focusToggleAfterClose();
|
|
20782
|
+
if (!oldValue && newValue)
|
|
20783
|
+
this.focusDrawerOnOpen();
|
|
20784
|
+
}
|
|
20785
|
+
connectedCallback() {
|
|
20786
|
+
if (typeof window !== 'undefined') {
|
|
20787
|
+
this.mobileMq = window.matchMedia(SIDE_NAV_MOBILE_MQ);
|
|
20788
|
+
this.mobileMq.addEventListener('change', this.onViewportChange);
|
|
20789
|
+
}
|
|
20790
|
+
this.syncDocKeyDownListener();
|
|
20791
|
+
}
|
|
20792
|
+
componentDidLoad() {
|
|
20793
|
+
if (this.open) {
|
|
20794
|
+
this.syncDocKeyDownListener();
|
|
20795
|
+
this.focusDrawerOnOpen();
|
|
20796
|
+
}
|
|
20797
|
+
}
|
|
20798
|
+
disconnectedCallback() {
|
|
20799
|
+
var _a;
|
|
20800
|
+
if (this.toggleFocusTimeoutId !== undefined) {
|
|
20801
|
+
clearTimeout(this.toggleFocusTimeoutId);
|
|
20802
|
+
this.toggleFocusTimeoutId = undefined;
|
|
20803
|
+
}
|
|
20804
|
+
if (this.drawerFocusTimeoutId !== undefined) {
|
|
20805
|
+
clearTimeout(this.drawerFocusTimeoutId);
|
|
20806
|
+
this.drawerFocusTimeoutId = undefined;
|
|
20807
|
+
}
|
|
20808
|
+
this.clearCloseTransition();
|
|
20809
|
+
(_a = this.mobileMq) === null || _a === void 0 ? void 0 : _a.removeEventListener('change', this.onViewportChange);
|
|
20810
|
+
this.mobileMq = undefined;
|
|
20811
|
+
this.removeDocKeyDownListener();
|
|
20812
|
+
}
|
|
20813
|
+
async toggle() {
|
|
20814
|
+
this.setOpenState(!this.open);
|
|
20815
|
+
}
|
|
20816
|
+
async setOpen(open) {
|
|
20817
|
+
this.setOpenState(open);
|
|
20818
|
+
}
|
|
20819
|
+
removeDocKeyDownListener() {
|
|
20820
|
+
this.el.ownerDocument.removeEventListener('keydown', this.onDocKeyDown, false);
|
|
20821
|
+
}
|
|
20822
|
+
syncDocKeyDownListener() {
|
|
20823
|
+
this.removeDocKeyDownListener();
|
|
20824
|
+
if (this.isMobileDrawerActive()) {
|
|
20825
|
+
this.el.ownerDocument.addEventListener('keydown', this.onDocKeyDown, false);
|
|
20826
|
+
}
|
|
20827
|
+
}
|
|
20828
|
+
isBelowMdBreakpoint() {
|
|
20829
|
+
var _a, _b;
|
|
20830
|
+
return (_b = (_a = this.mobileMq) === null || _a === void 0 ? void 0 : _a.matches) !== null && _b !== void 0 ? _b : false;
|
|
20831
|
+
}
|
|
20832
|
+
isMobileDrawerActive() {
|
|
20833
|
+
return (this.open || this.drawerClosing) && this.isBelowMdBreakpoint();
|
|
20834
|
+
}
|
|
20835
|
+
clearCloseTransition() {
|
|
20836
|
+
if (this.closeTransitionTimeoutId !== undefined) {
|
|
20837
|
+
clearTimeout(this.closeTransitionTimeoutId);
|
|
20838
|
+
this.closeTransitionTimeoutId = undefined;
|
|
20839
|
+
}
|
|
20840
|
+
this.drawerClosing = false;
|
|
20841
|
+
}
|
|
20842
|
+
shouldYieldFocusToExternalModal() {
|
|
20843
|
+
const active = this.el.ownerDocument.activeElement;
|
|
20844
|
+
if (!active || this.el.contains(active))
|
|
20845
|
+
return false;
|
|
20846
|
+
return active.closest('[aria-modal="true"]') !== null;
|
|
20847
|
+
}
|
|
20848
|
+
anyDescendantPopoverIsOpen() {
|
|
20849
|
+
const hosts = this.el.querySelectorAll('xpl-popover');
|
|
20850
|
+
for (let i = 0; i < hosts.length; i += 1) {
|
|
20851
|
+
const inner = hosts[i].querySelector('.xpl-popover');
|
|
20852
|
+
if (inner === null || inner === void 0 ? void 0 : inner.classList.contains('xpl-popover--is-open')) {
|
|
20853
|
+
return true;
|
|
20854
|
+
}
|
|
20855
|
+
}
|
|
20856
|
+
return false;
|
|
20857
|
+
}
|
|
20858
|
+
setOpenState(open) {
|
|
20859
|
+
const wasOpen = this.open;
|
|
20860
|
+
if (open === wasOpen)
|
|
20861
|
+
return;
|
|
20862
|
+
this.open = open;
|
|
20863
|
+
this.openChange.emit(open);
|
|
20864
|
+
if (wasOpen && !open)
|
|
20865
|
+
this.focusToggleAfterClose();
|
|
20866
|
+
}
|
|
20867
|
+
getFocusableElements() {
|
|
20868
|
+
const selector = 'button:not([disabled]), a[href]:not([tabindex="-1"]), input:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
20869
|
+
const active = this.el.ownerDocument.activeElement;
|
|
20870
|
+
return Array.from(this.el.querySelectorAll(selector)).filter((node) => !node.closest('[inert]') && (node.offsetParent !== null || node === active));
|
|
20871
|
+
}
|
|
20872
|
+
trapTabKey(e) {
|
|
20873
|
+
if (this.shouldYieldFocusToExternalModal())
|
|
20874
|
+
return;
|
|
20875
|
+
const focusable = this.getFocusableElements();
|
|
20876
|
+
if (focusable.length === 0)
|
|
20877
|
+
return;
|
|
20878
|
+
const first = focusable[0];
|
|
20879
|
+
const last = focusable[focusable.length - 1];
|
|
20880
|
+
const active = this.el.ownerDocument.activeElement;
|
|
20881
|
+
if (e.shiftKey) {
|
|
20882
|
+
if (active === first || !this.el.contains(active)) {
|
|
20883
|
+
e.preventDefault();
|
|
20884
|
+
last.focus();
|
|
20885
|
+
}
|
|
20886
|
+
}
|
|
20887
|
+
else if (active === last || !this.el.contains(active)) {
|
|
20888
|
+
e.preventDefault();
|
|
20889
|
+
first.focus();
|
|
20890
|
+
}
|
|
20483
20891
|
}
|
|
20484
20892
|
render() {
|
|
20485
|
-
return (h(Host, { key: '
|
|
20893
|
+
return (h(Host, { key: 'a007b689281cf2d2f5c24d7517a478c165c992bf', class: {
|
|
20486
20894
|
'xpl-side-nav': true,
|
|
20487
|
-
|
|
20895
|
+
'xpl-side-nav--open': this.open,
|
|
20896
|
+
} }, h("xpl-button", { key: '4828b88c0e14e4202535e19e406def9558533892', class: "xpl-side-nav__toggle", variant: "tertiary", iconOnly: true, icon: this.open ? 'sidebar-left-hide' : 'sidebar-left-show', "aria-expanded": this.open ? 'true' : 'false', "aria-label": this.open ? 'Close navigation menu' : 'Open navigation menu', onClick: this.onToggleClick }), h("div", { key: '193bf28ee1b495f3352e46d255e0488d38f59a03', class: "xpl-side-nav__wrapper" }, h("nav", { key: '36461f0c57dbe069381aed7d8cad57a484bdc5c6', class: "xpl-side-nav__content", "aria-label": this.label }, h("div", { key: '7e88ee25d63a9489894e54030ec5e943be803bde', class: "xpl-side-nav__section" }, h("slot", { key: '2fb0b53cd888824afcd73d1c08f35939e7729b88', name: "section" })), h("div", { key: 'ee3beba191a7633a98312f225013db4f05891388', class: "xpl-side-nav__footer" }, h("slot", { key: 'e876c45f33e5fd200cbe4a6c5ef6fcd85c43eccd', name: "nav-footer" })))), h("xpl-backdrop", { key: '74bef30e9ffb2c3d640e2cab2b2fe328b7f37c52', class: "xpl-side-nav__backdrop", onClick: this.onBackdropClick })));
|
|
20488
20897
|
}
|
|
20898
|
+
get el() { return getElement(this); }
|
|
20899
|
+
static get watchers() { return {
|
|
20900
|
+
"open": [{
|
|
20901
|
+
"onOpenChanged": 0
|
|
20902
|
+
}]
|
|
20903
|
+
}; }
|
|
20489
20904
|
};
|
|
20490
20905
|
|
|
20491
20906
|
const SideNavItem = class {
|
|
@@ -20493,6 +20908,7 @@ const SideNavItem = class {
|
|
|
20493
20908
|
registerInstance(this, hostRef);
|
|
20494
20909
|
this.expandedChange = createEvent(this, "expandedChange", 7);
|
|
20495
20910
|
this.navClick = createEvent(this, "navClick", 7);
|
|
20911
|
+
this.hasTrailingSlot = false;
|
|
20496
20912
|
this.disabled = false;
|
|
20497
20913
|
this.expanded = false;
|
|
20498
20914
|
this.hasChildren = false;
|
|
@@ -20514,11 +20930,66 @@ const SideNavItem = class {
|
|
|
20514
20930
|
syncLinkHasChildrenExclusivity() {
|
|
20515
20931
|
this.enforceLinkExcludesHasChildren();
|
|
20516
20932
|
}
|
|
20933
|
+
connectedCallback() {
|
|
20934
|
+
this.syncTrailingSlot();
|
|
20935
|
+
this.connectTrailingSlotObserver();
|
|
20936
|
+
}
|
|
20937
|
+
disconnectedCallback() {
|
|
20938
|
+
if (this.trailingSlotSyncTimeoutId !== undefined) {
|
|
20939
|
+
clearTimeout(this.trailingSlotSyncTimeoutId);
|
|
20940
|
+
this.trailingSlotSyncTimeoutId = undefined;
|
|
20941
|
+
}
|
|
20942
|
+
this.disconnectTrailingSlotObserver();
|
|
20943
|
+
}
|
|
20517
20944
|
componentWillLoad() {
|
|
20518
20945
|
this.syncLinkHasChildrenExclusivity();
|
|
20946
|
+
this.syncTrailingSlot();
|
|
20519
20947
|
}
|
|
20520
20948
|
componentWillRender() {
|
|
20521
20949
|
this.syncLinkHasChildrenExclusivity();
|
|
20950
|
+
this.disconnectTrailingSlotObserver();
|
|
20951
|
+
}
|
|
20952
|
+
componentDidRender() {
|
|
20953
|
+
this.scheduleTrailingSlotSync();
|
|
20954
|
+
}
|
|
20955
|
+
connectTrailingSlotObserver() {
|
|
20956
|
+
this.disconnectTrailingSlotObserver();
|
|
20957
|
+
if (typeof MutationObserver === 'undefined') {
|
|
20958
|
+
return;
|
|
20959
|
+
}
|
|
20960
|
+
this.trailingSlotObserver = new MutationObserver(() => {
|
|
20961
|
+
this.scheduleTrailingSlotSync();
|
|
20962
|
+
});
|
|
20963
|
+
this.trailingSlotObserver.observe(this.el, {
|
|
20964
|
+
childList: true,
|
|
20965
|
+
subtree: true,
|
|
20966
|
+
attributes: true,
|
|
20967
|
+
attributeFilter: ['slot'],
|
|
20968
|
+
});
|
|
20969
|
+
}
|
|
20970
|
+
disconnectTrailingSlotObserver() {
|
|
20971
|
+
var _a;
|
|
20972
|
+
(_a = this.trailingSlotObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
20973
|
+
this.trailingSlotObserver = undefined;
|
|
20974
|
+
}
|
|
20975
|
+
scheduleTrailingSlotSync() {
|
|
20976
|
+
if (this.trailingSlotSyncTimeoutId !== undefined) {
|
|
20977
|
+
clearTimeout(this.trailingSlotSyncTimeoutId);
|
|
20978
|
+
}
|
|
20979
|
+
this.trailingSlotSyncTimeoutId = setTimeout(() => {
|
|
20980
|
+
this.trailingSlotSyncTimeoutId = undefined;
|
|
20981
|
+
if (!this.el.isConnected) {
|
|
20982
|
+
return;
|
|
20983
|
+
}
|
|
20984
|
+
this.syncTrailingSlot();
|
|
20985
|
+
this.connectTrailingSlotObserver();
|
|
20986
|
+
}, 0);
|
|
20987
|
+
}
|
|
20988
|
+
syncTrailingSlot() {
|
|
20989
|
+
const next = Array.from(this.el.querySelectorAll('[slot="trailing"]')).some((node) => node.closest('xpl-side-nav-item') === this.el);
|
|
20990
|
+
if (next !== this.hasTrailingSlot) {
|
|
20991
|
+
this.hasTrailingSlot = next;
|
|
20992
|
+
}
|
|
20522
20993
|
}
|
|
20523
20994
|
enforceLinkExcludesHasChildren() {
|
|
20524
20995
|
if (!this.link)
|
|
@@ -20532,15 +21003,20 @@ const SideNavItem = class {
|
|
|
20532
21003
|
}
|
|
20533
21004
|
render() {
|
|
20534
21005
|
var _a;
|
|
20535
|
-
const
|
|
21006
|
+
const showAutoChevron = this.hasChildren && !this.hasTrailingSlot;
|
|
21007
|
+
const buttonClass = {
|
|
20536
21008
|
'xpl-side-nav-item__link': true,
|
|
20537
21009
|
expanded: this.expanded,
|
|
20538
21010
|
selected: this.selected,
|
|
20539
21011
|
};
|
|
20540
|
-
return (h(Host, { key: '
|
|
21012
|
+
return (h(Host, { key: '9aa4038c1fd52b62a0ea393b4cd60f94dc299beb', class: {
|
|
20541
21013
|
'xpl-side-nav-item': true,
|
|
20542
21014
|
'xpl-side-nav-item--link-disabled': this.link && this.disabled,
|
|
20543
|
-
} }, this.link ? (h("slot", null)) : (h("button", { type: "button", class:
|
|
21015
|
+
} }, this.link ? (h("slot", null)) : (h("button", { type: "button", class: buttonClass, "aria-current": this.selected ? 'page' : undefined, "aria-expanded": this.hasChildren ? (this.expanded ? 'true' : 'false') : undefined, onClick: this.handleClick, disabled: this.disabled }, h("span", { class: "xpl-side-nav-item__leading" }, h("slot", { name: "leading" }, this.icon ? (h("xpl-icon", { icon: this.icon, size: 16 })) : null)), h("span", { class: "xpl-side-nav-item__label" }, (_a = this.label) !== null && _a !== void 0 ? _a : ''), (this.hasTrailingSlot || this.hasChildren) && (h("span", { class: {
|
|
21016
|
+
'xpl-side-nav-item__trailing': true,
|
|
21017
|
+
'xpl-side-nav-item__trailing--chevron': showAutoChevron,
|
|
21018
|
+
expanded: showAutoChevron && this.expanded,
|
|
21019
|
+
}, "aria-hidden": showAutoChevron ? 'true' : undefined }, h("slot", { name: "trailing" }, showAutoChevron ? (h("xpl-icon", { icon: this.expanded ? 'chevron-up' : 'chevron-down', size: 16 })) : null))))), this.hasChildren && !this.link && (h("div", { key: '3e8f5a31a9d65ba35b699cee901795f733a915d9', class: `xpl-side-nav-item__children ${this.expanded ? 'expanded' : ''}`, inert: !this.expanded ? true : undefined }, h("div", { key: '30d431f2d0cc3286421815e1fe0b43b59cbb56a2', class: "xpl-side-nav-item__children-inner" }, h("slot", { key: 'b5e24e70a35121b27a853d5178017927ebbf4baf' }))))));
|
|
20544
21020
|
}
|
|
20545
21021
|
get el() { return getElement(this); }
|
|
20546
21022
|
static get watchers() { return {
|
|
@@ -20560,7 +21036,7 @@ const Skeleton = class {
|
|
|
20560
21036
|
this.size = 'custom';
|
|
20561
21037
|
}
|
|
20562
21038
|
render() {
|
|
20563
|
-
return (h(Host, { key: '
|
|
21039
|
+
return (h(Host, { key: '6d2a1a9164bb1568663b944f3f4ea66517256528', class: {
|
|
20564
21040
|
'xpl-skeleton': true,
|
|
20565
21041
|
[`xpl-skeleton--shape-${this.shape}`]: true,
|
|
20566
21042
|
[`xpl-skeleton--size-${this.size}`]: true,
|
|
@@ -20603,7 +21079,7 @@ const Slideout = class {
|
|
|
20603
21079
|
this.handleScroll();
|
|
20604
21080
|
}
|
|
20605
21081
|
render() {
|
|
20606
|
-
return (h(Host, { key: '
|
|
21082
|
+
return (h(Host, { key: '2784d3da5b726f04552fa93289f34ff0347d3e70', class: "xpl-slideout" }, this.backdrop && this.isOpen && (h("xpl-backdrop", { key: 'b8978c6811b9d1c175bfaee2296fbcb433c048d4', onClick: this.handleClose })), h("aside", { key: '0e4357253aa004531aa86fc2f93fb1332cec089b', class: `slideout slideout--${!this.isOpen && 'closed'}` }, h("header", { key: '132170bf2c8ff6c23e6bc85bce4dc8a2aec0c5d5', class: "header" }, h("div", { key: 'a38f7f2a2da8c622a9d2ef53c370560761b87b51', class: "title" }, h("slot", { key: 'ba7b485b02bd472a4f64e067cabf5cf6ae0ad1b0', name: "title" }), h("xpl-button", { key: '9538bc33599840f7756e747c63d9717cf14a0c58', class: "close-button", "icon-only": true, size: "sm", variant: "tertiary", onClick: this.handleClose }, h("xpl-icon", { key: '6d6846794afea4053736bc67b3c0c90fb822ca96', icon: "x" }))), h("div", { key: 'da9630c9cdc8d9c3e57242c58993f5815052e684', class: "subtitle" }, h("slot", { key: 'c923c0cdae7e6f09713592e31216ec10accce39f', name: "subtitle" })), h("div", { key: 'c9fc409c7e2c14987b4df6be17d7d2c9a5906100', class: "search" }, h("slot", { key: 'b963bc05b745e55bbdc27cc4bb224af97feccdda', name: "search" }))), h("xpl-divider", { key: 'e5f9201e96ac5d6b202e3e88edfa07dacfbb3786', tier: 0, class: "divider top" }), h("article", { key: '41b424ea94bdc2577b56166f45de2b1addc3a8b4', class: "content", tabIndex: 0 }, h("slot", { key: '5d316d1981d44536af9cc5d67ef7fd20f6375ec8', name: "content" })), this.showFooter && (h("footer", { key: '3d9c2b22153b6a9057d3c40b98af97d345b9e9c1' }, h("xpl-divider", { key: '77e87834d203624cc03ff2b0cf894300c2749094', tier: 0, class: "divider bottom" }), h("div", { key: '44737714daf25a087ad2c0d8938f94ec4668b071', class: "footer" }, h("slot", { key: '2c0c7b62872fa826ef117a730c92369ba7e340f1', name: "tertiary" }), h("slot", { key: '31ac0e95189487b668b3e5c0bd8d414ab7d73f30', name: "secondary" }), h("slot", { key: 'a0dd4999caac29b546cd0526e652596937dff83b', name: "primary" })))))));
|
|
20607
21083
|
}
|
|
20608
21084
|
get el() { return getElement(this); }
|
|
20609
21085
|
static get watchers() { return {
|
|
@@ -20768,6 +21244,7 @@ const Spotlight = class {
|
|
|
20768
21244
|
this.hasFloatingPosition = false;
|
|
20769
21245
|
this.hasImageSlotContent = false;
|
|
20770
21246
|
this.hasTitleSlotContent = false;
|
|
21247
|
+
this.dialogLabelId = undefined;
|
|
20771
21248
|
this.isVisible = false;
|
|
20772
21249
|
this.resolvedAnchorPosition = 'top-left';
|
|
20773
21250
|
this.actionLayout = 'default';
|
|
@@ -20944,6 +21421,7 @@ const Spotlight = class {
|
|
|
20944
21421
|
this.hasBodySlotContent = this.hasSlottedContent('body');
|
|
20945
21422
|
this.hasImageSlotContent = this.hasSlottedContent('image');
|
|
20946
21423
|
this.hasTitleSlotContent = this.hasSlottedContent('title');
|
|
21424
|
+
this.dialogLabelId = this.getDialogLabelId();
|
|
20947
21425
|
if (this.isOpenEnabled) {
|
|
20948
21426
|
this.previousFocus =
|
|
20949
21427
|
document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
@@ -20974,6 +21452,10 @@ const Spotlight = class {
|
|
|
20974
21452
|
if (this.isOpenEnabled) {
|
|
20975
21453
|
this.syncTitleSlotIds();
|
|
20976
21454
|
}
|
|
21455
|
+
const nextLabelId = this.getDialogLabelId();
|
|
21456
|
+
if (this.dialogLabelId !== nextLabelId) {
|
|
21457
|
+
this.dialogLabelId = nextLabelId;
|
|
21458
|
+
}
|
|
20977
21459
|
if (this.pendingEnterVisible && this.isOpenEnabled) {
|
|
20978
21460
|
this.pendingEnterVisible = false;
|
|
20979
21461
|
this.enterVisibleFrameId = requestAnimationFrame(() => {
|
|
@@ -21142,10 +21624,13 @@ const Spotlight = class {
|
|
|
21142
21624
|
return fromHost;
|
|
21143
21625
|
}
|
|
21144
21626
|
const slot = this.el.querySelector('slot[name="title"]');
|
|
21145
|
-
if (
|
|
21146
|
-
|
|
21627
|
+
if (slot && typeof slot.assignedNodes === 'function') {
|
|
21628
|
+
const assigned = Array.from(slot.assignedNodes({ flatten: true })).find((node) => node.nodeType === Node.ELEMENT_NODE);
|
|
21629
|
+
if (assigned) {
|
|
21630
|
+
return assigned;
|
|
21631
|
+
}
|
|
21147
21632
|
}
|
|
21148
|
-
return (
|
|
21633
|
+
return (_a = this.el.querySelector('[slot="title"]')) !== null && _a !== void 0 ? _a : null;
|
|
21149
21634
|
}
|
|
21150
21635
|
getDialogLabelId() {
|
|
21151
21636
|
if (this.hasTitleSlotContent) {
|
|
@@ -21298,7 +21783,7 @@ const Spotlight = class {
|
|
|
21298
21783
|
'xpl-spotlight--only-primary-action': showActions && showPrimaryAction && !showSecondaryAction,
|
|
21299
21784
|
'xpl-spotlight--only-secondary-action': showActions && showSecondaryAction && !showPrimaryAction,
|
|
21300
21785
|
'xpl-spotlight--visible': this.isVisible,
|
|
21301
|
-
}, role: "dialog", "aria-modal": "false", "aria-label": this.
|
|
21786
|
+
}, role: "dialog", "aria-modal": "false", "aria-label": this.dialogLabelId ? undefined : 'Tour step', "aria-labelledby": this.dialogLabelId, tabindex: -1 }, h("button", { type: "button", class: "xpl-spotlight__target", "aria-label": "Spotlight indicator", onClick: this.handleTargetClick }, h("div", { class: "xpl-spotlight__target-outer" }), h("div", { class: "xpl-spotlight__target-inner" })), this.isDismissibleEnabled && (h("div", { class: "xpl-spotlight__dismiss" }, h("xpl-button", { variant: "secondary", size: "sm", iconOnly: true, "aria-label": "Dismiss tour step", onClick: this.handleDismissClick }, h("xpl-icon", { icon: "xmark", size: 16 })))), h("div", { class: "xpl-spotlight__frame" }, h("div", { class: {
|
|
21302
21787
|
'xpl-spotlight__image-container': true,
|
|
21303
21788
|
'xpl-spotlight__image-container--empty': !this.hasImageSlotContent,
|
|
21304
21789
|
'xpl-spotlight__image-container--hidden': !showImage,
|
|
@@ -21431,10 +21916,10 @@ const TabPanel = class {
|
|
|
21431
21916
|
const t = (_a = this.target) !== null && _a !== void 0 ? _a : '';
|
|
21432
21917
|
const panelId = tabPanelDomId(groupId, t);
|
|
21433
21918
|
const labelledBy = tabTriggerId(groupId, t);
|
|
21434
|
-
return (h(Host, { key: '
|
|
21919
|
+
return (h(Host, { key: 'd1d6b910b84ee0aa483d605d10aaabf662d2efcf', "aria-labelledby": labelledBy, class: {
|
|
21435
21920
|
'xpl-tab-panel': true,
|
|
21436
21921
|
'xpl-tab-panel--selected': this.selected,
|
|
21437
|
-
}, id: panelId, role: "tabpanel" }, h("slot", { key: '
|
|
21922
|
+
}, id: panelId, role: "tabpanel" }, h("slot", { key: '1fe282e7372fb0353cf1c32db841269aaa3c44a9' })));
|
|
21438
21923
|
}
|
|
21439
21924
|
get el() { return getElement(this); }
|
|
21440
21925
|
};
|
|
@@ -21462,29 +21947,23 @@ const Table = class {
|
|
|
21462
21947
|
this.sortTypeArray = [];
|
|
21463
21948
|
this.selectAllValue = Math.random().toString(36).slice(2);
|
|
21464
21949
|
this.selectAll = (e) => {
|
|
21465
|
-
const
|
|
21466
|
-
if (!(target instanceof HTMLInputElement))
|
|
21467
|
-
return;
|
|
21468
|
-
const { checked } = target;
|
|
21950
|
+
const checked = e.detail;
|
|
21469
21951
|
this.areAllSelected = checked;
|
|
21470
21952
|
this.selected =
|
|
21471
21953
|
this.selectedValues.length > 0
|
|
21472
|
-
?
|
|
21473
|
-
Array.from(this.el.querySelectorAll('tbody td:first-child input')).map((input) => checked ? input === null || input === void 0 ? void 0 : input.value : checked)
|
|
21954
|
+
? Array.from(this.el.querySelectorAll('tbody td:first-child xpl-checkbox')).map((checkbox) => (checked ? checkbox.value : checked))
|
|
21474
21955
|
: this.selected.map(() => checked);
|
|
21475
21956
|
this.onChange();
|
|
21476
21957
|
};
|
|
21477
21958
|
this.selectOne = (e, checkboxIdx) => {
|
|
21478
|
-
const
|
|
21479
|
-
|
|
21480
|
-
return;
|
|
21481
|
-
const { checked, value } = target;
|
|
21482
|
-
this.areAllSelected = false;
|
|
21959
|
+
const checked = e.detail;
|
|
21960
|
+
const { value } = e.target;
|
|
21483
21961
|
this.selected = this.selected.map((v, selectedIdx) => {
|
|
21484
21962
|
if (selectedIdx !== checkboxIdx)
|
|
21485
21963
|
return v;
|
|
21486
21964
|
return this.selectedValues.length > 0 ? (checked ? value : checked) : checked;
|
|
21487
21965
|
});
|
|
21966
|
+
this.areAllSelected = this.selected.every((v) => !!v);
|
|
21488
21967
|
this.onChange();
|
|
21489
21968
|
};
|
|
21490
21969
|
this.onChange = () => {
|
|
@@ -21575,27 +22054,24 @@ const Table = class {
|
|
|
21575
22054
|
(!this.sortTypeArray || this.sortTypeArray.length !== this.columns.length)) {
|
|
21576
22055
|
this.sortTypeArray = this.columns.map(() => null);
|
|
21577
22056
|
}
|
|
21578
|
-
return (h(Host, { key: '
|
|
22057
|
+
return (h(Host, { key: 'feca62966731c111adc18988af07bd269dd63868' }, h("div", { key: 'b585fe5b3161eb7763e4292a7015fb3209a3fa90', class: "xpl-table-container", onScroll: this.onScroll, ref: (el) => {
|
|
21579
22058
|
this.container = el;
|
|
21580
|
-
} }, h("table", { key: '
|
|
22059
|
+
} }, h("table", { key: '37930d45de6739b43ff6d541d46d7f960d922716', class: {
|
|
21581
22060
|
'xpl-table': true,
|
|
21582
22061
|
'xpl-table--striped': this.striped,
|
|
21583
22062
|
'xpl-table--freeze': this.freeze,
|
|
21584
22063
|
'xpl-table--has-scrolled': this.hasScrolled,
|
|
21585
|
-
} }, this.columns && (h("thead", { key: '
|
|
22064
|
+
} }, this.columns && (h("thead", { key: '40e9b8bb9cb641a2f89a63a707ecaa3a286fc99d' }, this.columns.map((column, i) => {
|
|
21586
22065
|
var _a;
|
|
21587
22066
|
const iconType = getIconType((_a = this.sortTypeArray) === null || _a === void 0 ? void 0 : _a[i]);
|
|
21588
22067
|
const isColumnSortable = !!(this.isSortable && this.sortableColumns[i]);
|
|
21589
|
-
return (h("th", null, h("label", { onClick: (e) => this.handleSort(e, isColumnSortable, i, column.replace(/ /g, '-').toLowerCase()), class: isColumnSortable ? 'cursor-pointer' : '' }, this.multiselect && i === 0 && (h("
|
|
21590
|
-
this.selected.some((a) => a), onClick: (e) => {
|
|
21591
|
-
|
|
21592
|
-
this.selectAll(e);
|
|
21593
|
-
}, type: "checkbox", value: `select-all-${this.selectAllValue}` })), column, isColumnSortable && !!this.sortTypeArray[i] && (h("xpl-icon", { icon: iconType, size: 16 })))));
|
|
21594
|
-
}))), h("tbody", { key: 'b13ca1d1a738de189d4f040dfd309187671b341d' }, this.rowData.map((row, rowNum) => (h("tr", { class: this.selected && this.selected[rowNum]
|
|
22068
|
+
return (h("th", null, h("label", { onClick: (e) => this.handleSort(e, isColumnSortable, i, column.replace(/ /g, '-').toLowerCase()), class: isColumnSortable ? 'cursor-pointer' : '' }, this.multiselect && i === 0 && (h("xpl-checkbox", { checked: this.areAllSelected, indeterminate: !this.areAllSelected &&
|
|
22069
|
+
this.selected.some((a) => a), onClick: (e) => e.stopPropagation(), onCheckboxChange: (e) => this.selectAll(e), value: `select-all-${this.selectAllValue}`, "aria-label": "Select all rows" })), column, isColumnSortable && !!this.sortTypeArray[i] && (h("xpl-icon", { icon: iconType, size: 16 })))));
|
|
22070
|
+
}))), h("tbody", { key: '99bc5a0fd8b91d040483cc5749490b5319097ab9' }, this.rowData.map((row, rowNum) => (h("tr", { class: this.selected && this.selected[rowNum]
|
|
21595
22071
|
? 'xpl-table-row-selected'
|
|
21596
|
-
: '' }, row.map((cell, i) => (h("td", null, this.multiselect && i === 0 ? (h("label",
|
|
22072
|
+
: '' }, row.map((cell, i) => (h("td", null, this.multiselect && i === 0 ? (h("label", null, h("xpl-checkbox", { checked: !!this.selected[rowNum], onCheckboxChange: (e) => this.selectOne(e, rowNum), value: this.selectedValues.length > 0
|
|
21597
22073
|
? this.selectedValues[rowNum]
|
|
21598
|
-
: `xpl-table-checkbox-${rowNum}` }), h("div", { innerHTML: cell }))) : (h("div", { innerHTML: cell }))))))))), ((_a = this.rowFooterData) === null || _a === void 0 ? void 0 : _a.length) > 0 && (h("tfoot", { key: '
|
|
22074
|
+
: `xpl-table-checkbox-${rowNum}`, "aria-label": `Select row ${rowNum + 1}` }), h("div", { innerHTML: cell }))) : (h("div", { innerHTML: cell }))))))))), ((_a = this.rowFooterData) === null || _a === void 0 ? void 0 : _a.length) > 0 && (h("tfoot", { key: '404659d5846461f017e974786ec359473be0a7b6' }, this.rowFooterData.map((row) => (h("tr", null, row.map((cell) => (h("td", null, h("div", { innerHTML: cell })))))))))))));
|
|
21599
22075
|
}
|
|
21600
22076
|
get el() { return getElement(this); }
|
|
21601
22077
|
static get watchers() { return {
|
|
@@ -21931,11 +22407,11 @@ const Tabs = class {
|
|
|
21931
22407
|
}
|
|
21932
22408
|
render() {
|
|
21933
22409
|
const isSegment = this.type === 'segment';
|
|
21934
|
-
return (h(Host, { key: '
|
|
22410
|
+
return (h(Host, { key: '712b11ca22e287b8e981c327d1793fbc627c8508', class: {
|
|
21935
22411
|
'xpl-tabs': true,
|
|
21936
22412
|
'xpl-tabs--full-width': this.fullWidth,
|
|
21937
22413
|
'xpl-tabs--segment': isSegment,
|
|
21938
|
-
}, "data-choices-tick": this.choicesTick }, h("xpl-select", { key: '
|
|
22414
|
+
}, "data-choices-tick": this.choicesTick }, h("xpl-select", { key: 'ca013d1c4848a13e3210e3e010f90969a70b609f', classNames: this.mobileSelectClassNames(), choices: this.renderChoices(), disabled: this.disabled, selectedValues: this.selectedValue, onDropdownStateChange: (event) => {
|
|
21939
22415
|
if (event.detail) {
|
|
21940
22416
|
this.isMobileSelectChange = true;
|
|
21941
22417
|
}
|
|
@@ -21946,17 +22422,17 @@ const Tabs = class {
|
|
|
21946
22422
|
this.tabChange.emit(selectedValue);
|
|
21947
22423
|
this.isMobileSelectChange = false;
|
|
21948
22424
|
}
|
|
21949
|
-
} }), h("nav", { key: '
|
|
22425
|
+
} }), h("nav", { key: 'bbabd600ae5e210b7a3e9cfa9c5938f12ee14e1d', "aria-orientation": "horizontal", class: "xpl-tabs__headings", role: "tablist", ref: (el) => {
|
|
21950
22426
|
this.headingsContainerRef = el;
|
|
21951
22427
|
}, onTabChange: (event) => {
|
|
21952
22428
|
event.stopPropagation();
|
|
21953
22429
|
this.isMobileSelectChange = false;
|
|
21954
22430
|
this.handleTabChange(event.detail);
|
|
21955
22431
|
this.tabChange.emit(event.detail);
|
|
21956
|
-
} }, !isSegment && (h("div", { key: '
|
|
22432
|
+
} }, !isSegment && (h("div", { key: 'fe8c53716bd0fe10b02a22ac3df643aa6627303d', class: "xpl-tabs__active-bar", style: {
|
|
21957
22433
|
transform: `translateX(${this.activeBarPosition.left}px)`,
|
|
21958
22434
|
width: `${this.activeBarPosition.width}px`,
|
|
21959
|
-
} })), h("slot", { key: '
|
|
22435
|
+
} })), h("slot", { key: '8a1232936ec72a91e4fcd57f1f35f598a337dd99', name: "heading" })), h("div", { key: '2ef4b61b894a326bc370a1c7631308b8b13261b5', class: "xpl-tabs__panels" }, h("slot", { key: '28c9ccce6482c7cbe9ee46960c65bd59aaacb4b9', name: "panel" }))));
|
|
21960
22436
|
}
|
|
21961
22437
|
get el() { return getElement(this); }
|
|
21962
22438
|
static get watchers() { return {
|
|
@@ -22102,7 +22578,7 @@ const Tag = class {
|
|
|
22102
22578
|
}
|
|
22103
22579
|
render() {
|
|
22104
22580
|
const dragEnabled = this.isDraggable && !this.disabled;
|
|
22105
|
-
return (h(Host, { key: '
|
|
22581
|
+
return (h(Host, { key: '4b8228da443d411561306e790333d676fc3907e3', class: {
|
|
22106
22582
|
'xpl-tag': true,
|
|
22107
22583
|
'xpl-tag-container': true,
|
|
22108
22584
|
'xpl-tag--disabled': this.disabled,
|
|
@@ -22110,7 +22586,7 @@ const Tag = class {
|
|
|
22110
22586
|
'xpl-tag--dragging': this.isDragging,
|
|
22111
22587
|
'xpl-tag--draggable': dragEnabled,
|
|
22112
22588
|
'xpl-tag--sm': this.size === 'sm',
|
|
22113
|
-
}, onDragOver: dragEnabled ? this.handleDragOver : undefined, onDragEnter: dragEnabled ? this.handleDragEnter : undefined, onDragStart: this.isDraggable ? this.handleHostDragStart : undefined }, dragEnabled ? (h("div", { class: "xpl-tag__content xpl-tag", role: "button", tabIndex: 0, draggable: true, "aria-grabbed": String(this.isDragging), onClick: this.handleTagClick, onKeyDown: this.handleContentKeyDown, onDragStart: this.handleDragStart, onDragEnd: this.handleDragEnd }, h("slot", null))) : (h("button", { class: "xpl-tag__content xpl-tag", type: "button", disabled: this.disabled, onClick: this.handleTagClick }, h("slot", null))), this.dismissible && (h("button", { key: '
|
|
22589
|
+
}, onDragOver: dragEnabled ? this.handleDragOver : undefined, onDragEnter: dragEnabled ? this.handleDragEnter : undefined, onDragStart: this.isDraggable ? this.handleHostDragStart : undefined }, dragEnabled ? (h("div", { class: "xpl-tag__content xpl-tag", role: "button", tabIndex: 0, draggable: true, "aria-grabbed": String(this.isDragging), onClick: this.handleTagClick, onKeyDown: this.handleContentKeyDown, onDragStart: this.handleDragStart, onDragEnd: this.handleDragEnd }, h("slot", null))) : (h("button", { class: "xpl-tag__content xpl-tag", type: "button", disabled: this.disabled, onClick: this.handleTagClick }, h("slot", null))), this.dismissible && (h("button", { key: 'bf634c6b75d1cd2eaadff8e4459b74a097e3f221', class: "xpl-tag__dismiss xpl-tag__close", type: "button", draggable: false, disabled: this.disabled, "aria-label": `Dismiss ${this.dismissAriaLabelSuffix}`, onClick: this.handleDismissClick }, h("xpl-icon", { key: 'fb37896890c9afb56c02a3ff4e62f096c416a569', icon: "xmark", size: 10 })))));
|
|
22114
22590
|
}
|
|
22115
22591
|
get el() { return getElement(this); }
|
|
22116
22592
|
static get watchers() { return {
|
|
@@ -22160,14 +22636,14 @@ const Toast = class {
|
|
|
22160
22636
|
}
|
|
22161
22637
|
render() {
|
|
22162
22638
|
var _a;
|
|
22163
|
-
return (h(Host, { key: '
|
|
22639
|
+
return (h(Host, { key: 'c9abdb6db66a9dad0d6ed3d2e6d178ea34852c86', class: `xpl-toast xpl-toast--${this.variant}`, onAnimationEnd: this.handleAnimationEnd }, h("div", { key: '7057e31e0f25dab1ba8b093f1dca15e6f08c44e4', class: "xpl-toast__left" }, this.showIcon && (h("div", { key: '7875c518753729ae39a7bb9f2051751924a0d558', class: `xpl-toast__icon xpl-toast__icon--${this.variant}` }, this.getIcon())), h("div", { key: 'e38c7d0593c16f3dfa83bc4e521f89ee644b46d4', class: "xpl-toast__notification" }, h("p", { key: '8186437158381780554d2509a806704c52450f8c', class: "xpl-toast__title" }, h("slot", { key: '0aa8df0520c33b4576acfb1ad4750a72928b94d5', name: "title" })), this.caption !== '' && (h("p", { key: '3a4ce8f73e498373344b8b692e624f177212a70a', class: "xpl-toast__caption" }, (_a = this.caption) === null || _a === void 0 ? void 0 : _a.substring(0, 85))))), h("div", { key: '636ff5b9476cea09d21b97f3e1b78860a6f10669', class: "xpl-toast__action", ref: (el) => {
|
|
22164
22640
|
this.actionSlot = el;
|
|
22165
|
-
} }, h("slot", { key: '
|
|
22641
|
+
} }, h("slot", { key: '733bc27fba998cdbb97cc1124d8449b539a0fc21', name: "action" })), this.dismissable && (h("div", { key: '8f555e8a02c8aed5095ab659a792e19c242dae98', class: "xpl-toast__close" }, h("button", { key: 'ca64c6cb98c4cda5d2dab208afef54db4832e103', tabIndex: 0, onClick: this.dismiss }, h("xpl-icon", { key: 'bf00f852ecffd16504a8ec95f3f6630b1aa569c9', icon: "x" }))))));
|
|
22166
22642
|
}
|
|
22167
22643
|
get el() { return getElement(this); }
|
|
22168
22644
|
};
|
|
22169
22645
|
|
|
22170
|
-
const TooltipArrow = () => (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "
|
|
22646
|
+
const TooltipArrow = () => (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "13" }, h("path", { d: "M0.5 5h15l-7.5 7.5L0.5 5Z", fill: "white", stroke: "none", class: "xpl-tooltip-arrow__fill" }), h("path", { d: "M0.5 5 L8 12.5 L15.5 5", fill: "none", stroke: "black", "stroke-width": "1", class: "xpl-tooltip-arrow__stroke" })));
|
|
22171
22647
|
|
|
22172
22648
|
const Tooltip = class {
|
|
22173
22649
|
constructor(hostRef) {
|
|
@@ -22176,7 +22652,7 @@ const Tooltip = class {
|
|
|
22176
22652
|
this.hideArrow = false;
|
|
22177
22653
|
}
|
|
22178
22654
|
render() {
|
|
22179
|
-
return (h(Host, { key: '
|
|
22655
|
+
return (h(Host, { key: '9890dea245d2fbd24c67fea6e39ce3430ffc8d81' }, h("div", { key: '0930c7ee1f0e1f6a625f41e34f31d2432fdff7eb', class: "xpl-tooltip-container" }, h("slot", { key: '3b9a8aebce020a13f3d7ef624b59c06e55398907' }), h("div", { key: '50fe33b8bef96df08899b449065558ea8f2ed820', class: `xpl-tooltip xpl-tooltip--${this.position}` }, this.text, !this.hideArrow && (h("div", { key: '53668e28af956a2293c36eb4991782aee8542378', class: "xpl-tooltip-arrow" }, h(TooltipArrow, { key: 'ebbbf0e6b2a848af99d14ddecdb70723bff5181b' })))))));
|
|
22180
22656
|
}
|
|
22181
22657
|
};
|
|
22182
22658
|
|
|
@@ -22233,6 +22709,7 @@ const TopNav = class {
|
|
|
22233
22709
|
this.open = !this.open;
|
|
22234
22710
|
this.navOpen.emit(this.open);
|
|
22235
22711
|
if (wasOpen && !this.open) {
|
|
22712
|
+
this.resetMobileCascade();
|
|
22236
22713
|
this.focusNavControlAfterClose();
|
|
22237
22714
|
}
|
|
22238
22715
|
};
|
|
@@ -22392,6 +22869,10 @@ const TopNav = class {
|
|
|
22392
22869
|
removeDocEscapeListener() {
|
|
22393
22870
|
this.el.ownerDocument.removeEventListener('keydown', this.onDocKeyDownEscape, false);
|
|
22394
22871
|
}
|
|
22872
|
+
resetMobileCascade() {
|
|
22873
|
+
const openItem = this.el.querySelector('.xpl-top-nav__left-primary > xpl-top-nav-item.xpl-top-nav-item--dropdown-open');
|
|
22874
|
+
openItem === null || openItem === void 0 ? void 0 : openItem.closeMenu().catch(() => undefined);
|
|
22875
|
+
}
|
|
22395
22876
|
scheduleSlotContentSyncFromObserver() {
|
|
22396
22877
|
if (this.deferredSlotContentObserverSyncTimeoutId !== undefined) {
|
|
22397
22878
|
clearTimeout(this.deferredSlotContentObserverSyncTimeoutId);
|
|
@@ -22415,12 +22896,13 @@ const TopNav = class {
|
|
|
22415
22896
|
const wasOpen = this.open;
|
|
22416
22897
|
this.open = false;
|
|
22417
22898
|
if (wasOpen && !this.navControl) {
|
|
22899
|
+
this.resetMobileCascade();
|
|
22418
22900
|
this.navOpen.emit(false);
|
|
22419
22901
|
}
|
|
22420
22902
|
}
|
|
22421
22903
|
render() {
|
|
22422
22904
|
var _a, _b, _c, _d;
|
|
22423
|
-
return (h(Host, { key: '
|
|
22905
|
+
return (h(Host, { key: 'a1556bcc2dfc2d35b9b9540a3f0e0d162d547923', class: {
|
|
22424
22906
|
'xpl-top-nav': true,
|
|
22425
22907
|
'xpl-top-nav--nav-control': Boolean(this.navControl),
|
|
22426
22908
|
'xpl-top-nav--open': this.open,
|
|
@@ -22428,15 +22910,15 @@ const TopNav = class {
|
|
|
22428
22910
|
'xpl-top-nav--has-brand': this.hasBrand,
|
|
22429
22911
|
'xpl-top-nav--has-user-menu': this.hasUserMenu,
|
|
22430
22912
|
dark: true,
|
|
22431
|
-
} }, h("nav", { key: '
|
|
22913
|
+
} }, h("nav", { key: '5531a9157af00cbd8b8d5459801ae00337c5e4ec', "aria-label": (_a = this.label) !== null && _a !== void 0 ? _a : 'top-navigation-bar', class: "xpl-top-nav__bar" }, h("div", { key: '5257bb97f7c388358820ae85e872644666538304', class: "xpl-top-nav__inner-left" }, this.navControl && (h("button", { key: '8e8acb60ee8cac9bf84bb559444fbdcfcee13a10', type: "button", class: "xpl-top-nav__nav-control", "aria-expanded": this.open ? 'true' : 'false', "aria-label": this.open ? 'Close navigation menu' : 'Open navigation menu', onClick: this.onNavToggle }, h("xpl-icon", { key: '7bafdf086e9df7d4a2333ea9d2fed86de8466912', class: "xpl-top-nav__control-icon", icon: "menu", size: 32 }))), this.hasBrand && (h("div", { key: '39fc108bfb4b30a98bc06ca8d12331527708d3ef', class: "xpl-top-nav__brand-bar" }, h("xpl-top-nav-item", { key: '7c951eb3c0e349170bb017f6e1d375f3b328653f', class: "xpl-top-nav__brand", href: this.brandHref, onNavItemClick: this.onBrandNavItemClick }, ((_b = this.brandLogo) === null || _b === void 0 ? void 0 : _b.trim()) ? (h("img", { class: "xpl-top-nav__brand-logo", src: this.brandLogo, alt: ((_c = this.brandName) === null || _c === void 0 ? void 0 : _c.trim())
|
|
22432
22914
|
? this.brandName.trim()
|
|
22433
|
-
: 'Brand' })) : this.brandLogoSlotPresent ? (h("span", { class: "xpl-top-nav__brand-logo-slot" }, h("slot", { name: "brand-logo" }))) : null, ((_d = this.brandName) === null || _d === void 0 ? void 0 : _d.trim()) ? (h("span", { class: "xpl-top-nav__brand-name" }, this.brandName.trim())) : null))), h("div", { key: '
|
|
22915
|
+
: 'Brand' })) : this.brandLogoSlotPresent ? (h("span", { class: "xpl-top-nav__brand-logo-slot" }, h("slot", { name: "brand-logo" }))) : null, ((_d = this.brandName) === null || _d === void 0 ? void 0 : _d.trim()) ? (h("span", { class: "xpl-top-nav__brand-name" }, this.brandName.trim())) : null))), h("div", { key: '16fa404db5c59741ec4a4c8c92c6f43f7502e906', class: {
|
|
22434
22916
|
'xpl-top-nav__aside': true,
|
|
22435
22917
|
'xpl-nav-left': true,
|
|
22436
|
-
} }, h("div", { key: '
|
|
22918
|
+
} }, h("div", { key: 'd5421d83454aadb4252cc244b24c9d3bf9881c69', class: "xpl-top-nav__left-primary", role: "list" }, h("slot", { key: 'c95fcd2f6365dbc03ee4e4e99db15e3460fd5358', name: "left-aside" })))), h("div", { key: 'fa5afd226b5eed1468ef066fba956852f7f0d65d', class: {
|
|
22437
22919
|
'xpl-top-nav__aside': true,
|
|
22438
22920
|
'xpl-nav-right': true,
|
|
22439
|
-
} }, h("div", { key: '
|
|
22921
|
+
} }, h("div", { key: 'd84a6fc492147429d725b49681637a203fc36c35', class: "xpl-nav-right__list" }, h("div", { key: '63ef2b0eddef28da05d172bb05b2edd64ad173dd', class: "xpl-top-nav__right-rail" }, h("div", { key: '3ead1c8076e1ed51283ec6251c4ed252835457e3', class: "xpl-top-nav__right-lead" }, h("slot", { key: '8076be6d9d726a2b380f41077d114b37cdfe15e9', name: "right-aside" })), this.hasUserMenu ? (h("div", { class: "xpl-top-nav__right-user" }, h("xpl-popover", { class: "xpl-top-nav__user-popover dark", position: "bottom-end", display: "menu" }, this.userMenuTriggerSlotPresent ? (h("slot", { name: "user-menu-trigger", slot: "trigger" })) : this.usesBuiltInChildAccountTrigger ? (h("xpl-button", { slot: "trigger", class: "xpl-top-nav__child-account-trigger", type: "button", variant: "tertiary", icon: "chevron-down", iconPosition: "end", iconOnly: this.childAccountLabelText.length === 0, "aria-haspopup": "dialog", "aria-label": this.childAccountLabelText.length > 0
|
|
22440
22922
|
? undefined
|
|
22441
22923
|
: 'Open account menu' }, this.childAccountLabelText.length > 0
|
|
22442
22924
|
? this.childAccountLabelText
|
|
@@ -22450,40 +22932,60 @@ const TopNav = class {
|
|
|
22450
22932
|
}; }
|
|
22451
22933
|
};
|
|
22452
22934
|
|
|
22935
|
+
const TOP_NAV_ITEM_HOVER_OPEN_MQ = '(hover: hover) and (pointer: fine) and (min-width: 768px)';
|
|
22936
|
+
const TOP_NAV_ITEM_HOVER_CLOSE_DELAY_MS = 150;
|
|
22937
|
+
|
|
22938
|
+
const TIMER = {
|
|
22939
|
+
hasDropdownSync: 'hasDropdownSync',
|
|
22940
|
+
postRender: 'postRender',
|
|
22941
|
+
focusTriggerAfterEscape: 'focusTriggerAfterEscape',
|
|
22942
|
+
hoverClose: 'hoverClose',
|
|
22943
|
+
};
|
|
22453
22944
|
const TopNavItem = class {
|
|
22454
22945
|
constructor(hostRef) {
|
|
22455
22946
|
registerInstance(this, hostRef);
|
|
22456
22947
|
this.navItemClick = createEvent(this, "navItemClick", 7);
|
|
22948
|
+
this.openChange = createEvent(this, "openChange", 7);
|
|
22949
|
+
this.dropdownPanelId = `xpl-top-nav-item-dropdown-${Math.random().toString(36).slice(2, 11)}`;
|
|
22950
|
+
this.hoverOpened = false;
|
|
22951
|
+
this.timers = new TimerManager();
|
|
22952
|
+
this.hasActiveDescendant = false;
|
|
22457
22953
|
this.hasDropdown = false;
|
|
22954
|
+
this.isLeadingIconSlotPresent = false;
|
|
22458
22955
|
this.hostListitemRole = false;
|
|
22459
|
-
this.
|
|
22956
|
+
this.isTrailingIconSlotPresent = false;
|
|
22460
22957
|
this.active = false;
|
|
22461
22958
|
this.icon = '';
|
|
22959
|
+
this.open = false;
|
|
22960
|
+
this.openMode = 'click';
|
|
22462
22961
|
this.selected = false;
|
|
22463
22962
|
this.onDocClickCapture = (e) => {
|
|
22464
|
-
if (!this.hasDropdown || !this.open)
|
|
22963
|
+
if (!this.hasDropdown || !this.open)
|
|
22465
22964
|
return;
|
|
22466
|
-
}
|
|
22467
22965
|
const target = e.target;
|
|
22468
22966
|
if (target && !this.el.contains(target)) {
|
|
22469
22967
|
this.open = false;
|
|
22470
22968
|
}
|
|
22471
22969
|
};
|
|
22472
22970
|
this.onDocKeyDownCapture = (e) => {
|
|
22473
|
-
if (!this.hasDropdown || !this.open)
|
|
22971
|
+
if (!this.hasDropdown || !this.open)
|
|
22474
22972
|
return;
|
|
22475
|
-
}
|
|
22476
22973
|
if (e.key === 'Escape') {
|
|
22477
22974
|
e.preventDefault();
|
|
22478
22975
|
e.stopPropagation();
|
|
22479
22976
|
this.open = false;
|
|
22977
|
+
this.focusTriggerAfterEscape();
|
|
22480
22978
|
}
|
|
22481
22979
|
};
|
|
22482
22980
|
this.handleClick = (e) => {
|
|
22483
22981
|
if (this.hasDropdown) {
|
|
22484
22982
|
e.preventDefault();
|
|
22485
22983
|
e.stopPropagation();
|
|
22486
|
-
this.
|
|
22984
|
+
this.timers.clearCoalesced(TIMER.hoverClose);
|
|
22985
|
+
if (this.open && this.hoverOpened && this.hoverModeActive() && e.detail > 0) {
|
|
22986
|
+
return;
|
|
22987
|
+
}
|
|
22988
|
+
this.hoverOpened = false;
|
|
22487
22989
|
this.open = !this.open;
|
|
22488
22990
|
return;
|
|
22489
22991
|
}
|
|
@@ -22491,44 +22993,58 @@ const TopNavItem = class {
|
|
|
22491
22993
|
};
|
|
22492
22994
|
this.handleKeyDown = (e) => {
|
|
22493
22995
|
const isLinkMode = this.href != null && !this.hasDropdown;
|
|
22494
|
-
if (isLinkMode) {
|
|
22495
|
-
|
|
22496
|
-
|
|
22497
|
-
|
|
22498
|
-
if (e.key === ' ') {
|
|
22499
|
-
e.preventDefault();
|
|
22500
|
-
const anchor = this.el.querySelector('.xpl-top-nav-item__inner');
|
|
22501
|
-
anchor === null || anchor === void 0 ? void 0 : anchor.click();
|
|
22502
|
-
return;
|
|
22503
|
-
}
|
|
22996
|
+
if (isLinkMode && e.key === ' ') {
|
|
22997
|
+
e.preventDefault();
|
|
22998
|
+
const anchor = this.el.querySelector('.xpl-top-nav-item__inner');
|
|
22999
|
+
anchor === null || anchor === void 0 ? void 0 : anchor.click();
|
|
22504
23000
|
}
|
|
22505
|
-
|
|
23001
|
+
};
|
|
23002
|
+
this.handleMouseEnter = () => {
|
|
23003
|
+
if (!this.hasDropdown || !this.hoverModeActive()) {
|
|
22506
23004
|
return;
|
|
22507
|
-
|
|
22508
|
-
this.
|
|
23005
|
+
}
|
|
23006
|
+
this.timers.clearCoalesced(TIMER.hoverClose);
|
|
23007
|
+
if (!this.open) {
|
|
23008
|
+
this.hoverOpened = true;
|
|
23009
|
+
this.open = true;
|
|
23010
|
+
}
|
|
23011
|
+
};
|
|
23012
|
+
this.handleMouseLeave = () => {
|
|
23013
|
+
if (!this.hasDropdown || !this.open || !this.hoverOpened) {
|
|
23014
|
+
return;
|
|
23015
|
+
}
|
|
23016
|
+
this.timers.scheduleCoalesced(TIMER.hoverClose, () => {
|
|
23017
|
+
if (!this.hoverOpened || this.el.contains(this.el.ownerDocument.activeElement)) {
|
|
23018
|
+
return;
|
|
23019
|
+
}
|
|
23020
|
+
this.open = false;
|
|
23021
|
+
}, TOP_NAV_ITEM_HOVER_CLOSE_DELAY_MS);
|
|
22509
23022
|
};
|
|
22510
23023
|
}
|
|
22511
23024
|
onHasDropdownChanged() {
|
|
22512
|
-
if (!this.hasDropdown)
|
|
23025
|
+
if (!this.hasDropdown)
|
|
22513
23026
|
this.open = false;
|
|
22514
|
-
}
|
|
22515
23027
|
this.syncDropdownDocListeners();
|
|
22516
23028
|
}
|
|
23029
|
+
onOpenChanged(next) {
|
|
23030
|
+
this.openChange.emit(next);
|
|
23031
|
+
if (!next)
|
|
23032
|
+
this.hoverOpened = false;
|
|
23033
|
+
if (next && this.hasDropdown)
|
|
23034
|
+
this.broadcastCloseOtherDropdownHosts();
|
|
23035
|
+
}
|
|
22517
23036
|
connectedCallback() {
|
|
23037
|
+
if (typeof window !== 'undefined' && typeof window.matchMedia === 'function') {
|
|
23038
|
+
this.hoverOpenMq = window.matchMedia(TOP_NAV_ITEM_HOVER_OPEN_MQ);
|
|
23039
|
+
}
|
|
22518
23040
|
this.syncHostListitemRole();
|
|
22519
23041
|
this.syncHasDropdownFromDom();
|
|
22520
23042
|
this.syncDropdownDocListeners();
|
|
22521
23043
|
this.connectDropdownSlotObserver();
|
|
22522
23044
|
}
|
|
22523
23045
|
disconnectedCallback() {
|
|
22524
|
-
|
|
22525
|
-
|
|
22526
|
-
this.deferredHasDropdownObserverSyncTimeoutId = undefined;
|
|
22527
|
-
}
|
|
22528
|
-
if (this.deferredPostRenderTopNavItemTimeoutId !== undefined) {
|
|
22529
|
-
clearTimeout(this.deferredPostRenderTopNavItemTimeoutId);
|
|
22530
|
-
this.deferredPostRenderTopNavItemTimeoutId = undefined;
|
|
22531
|
-
}
|
|
23046
|
+
this.timers.dispose();
|
|
23047
|
+
this.hoverOpenMq = undefined;
|
|
22532
23048
|
this.disconnectDropdownSlotObserver();
|
|
22533
23049
|
this.disconnectListitemContextObservers();
|
|
22534
23050
|
const doc = this.el.ownerDocument;
|
|
@@ -22552,23 +23068,35 @@ const TopNavItem = class {
|
|
|
22552
23068
|
this.open = false;
|
|
22553
23069
|
}
|
|
22554
23070
|
}
|
|
23071
|
+
async closeMenu() {
|
|
23072
|
+
if (!this.hasDropdown)
|
|
23073
|
+
return;
|
|
23074
|
+
this.open = false;
|
|
23075
|
+
}
|
|
23076
|
+
async openMenu() {
|
|
23077
|
+
if (!this.hasDropdown)
|
|
23078
|
+
return;
|
|
23079
|
+
this.timers.clearCoalesced(TIMER.hoverClose);
|
|
23080
|
+
this.hoverOpened = false;
|
|
23081
|
+
this.open = true;
|
|
23082
|
+
}
|
|
23083
|
+
async toggleMenu() {
|
|
23084
|
+
if (!this.hasDropdown)
|
|
23085
|
+
return;
|
|
23086
|
+
this.open = !this.open;
|
|
23087
|
+
}
|
|
22555
23088
|
scheduleHasDropdownSyncFromObserver() {
|
|
22556
|
-
|
|
22557
|
-
clearTimeout(this.deferredHasDropdownObserverSyncTimeoutId);
|
|
22558
|
-
}
|
|
22559
|
-
this.deferredHasDropdownObserverSyncTimeoutId = setTimeout(() => {
|
|
22560
|
-
this.deferredHasDropdownObserverSyncTimeoutId = undefined;
|
|
23089
|
+
this.timers.scheduleCoalesced(TIMER.hasDropdownSync, () => {
|
|
22561
23090
|
if (!this.el.isConnected) {
|
|
22562
23091
|
return;
|
|
22563
23092
|
}
|
|
22564
23093
|
this.syncHasDropdownFromDom();
|
|
22565
|
-
}
|
|
23094
|
+
});
|
|
22566
23095
|
}
|
|
22567
23096
|
connectDropdownSlotObserver() {
|
|
22568
23097
|
this.disconnectDropdownSlotObserver();
|
|
22569
|
-
if (typeof MutationObserver === 'undefined')
|
|
23098
|
+
if (typeof MutationObserver === 'undefined')
|
|
22570
23099
|
return;
|
|
22571
|
-
}
|
|
22572
23100
|
this.dropdownSlotObserver = new MutationObserver(() => {
|
|
22573
23101
|
this.scheduleHasDropdownSyncFromObserver();
|
|
22574
23102
|
});
|
|
@@ -22622,18 +23150,15 @@ const TopNavItem = class {
|
|
|
22622
23150
|
}
|
|
22623
23151
|
}
|
|
22624
23152
|
schedulePostRenderTopNavItemWork() {
|
|
22625
|
-
|
|
22626
|
-
clearTimeout(this.deferredPostRenderTopNavItemTimeoutId);
|
|
22627
|
-
}
|
|
22628
|
-
this.deferredPostRenderTopNavItemTimeoutId = setTimeout(() => {
|
|
22629
|
-
this.deferredPostRenderTopNavItemTimeoutId = undefined;
|
|
23153
|
+
this.timers.scheduleCoalesced(TIMER.postRender, () => {
|
|
22630
23154
|
if (!this.el.isConnected) {
|
|
22631
23155
|
return;
|
|
22632
23156
|
}
|
|
22633
23157
|
this.syncHostListitemRole();
|
|
23158
|
+
this.syncHasDropdownFromDom();
|
|
22634
23159
|
this.connectListitemContextObservers();
|
|
22635
23160
|
this.connectDropdownSlotObserver();
|
|
22636
|
-
}
|
|
23161
|
+
});
|
|
22637
23162
|
}
|
|
22638
23163
|
syncDropdownDocListeners() {
|
|
22639
23164
|
const doc = this.el.ownerDocument;
|
|
@@ -22645,35 +23170,54 @@ const TopNavItem = class {
|
|
|
22645
23170
|
doc.addEventListener('click', this.onDocClickCapture, true);
|
|
22646
23171
|
doc.addEventListener('keydown', this.onDocKeyDownCapture, true);
|
|
22647
23172
|
}
|
|
23173
|
+
hasSlottedChildOwnedByThisHost(slotName) {
|
|
23174
|
+
return Array.from(this.el.querySelectorAll(`[slot="${slotName}"]`)).some((node) => node.closest('xpl-top-nav-item') === this.el);
|
|
23175
|
+
}
|
|
22648
23176
|
syncHasDropdownFromDom() {
|
|
22649
|
-
|
|
23177
|
+
const nextHasDropdown = this.el.querySelector('[slot="dropdown"]') != null;
|
|
23178
|
+
if (nextHasDropdown !== this.hasDropdown) {
|
|
23179
|
+
this.hasDropdown = nextHasDropdown;
|
|
23180
|
+
}
|
|
23181
|
+
const nextLeading = this.hasSlottedChildOwnedByThisHost('leading-icon');
|
|
23182
|
+
if (nextLeading !== this.isLeadingIconSlotPresent) {
|
|
23183
|
+
this.isLeadingIconSlotPresent = nextLeading;
|
|
23184
|
+
}
|
|
23185
|
+
const nextTrailing = this.hasSlottedChildOwnedByThisHost('trailing-icon');
|
|
23186
|
+
if (nextTrailing !== this.isTrailingIconSlotPresent) {
|
|
23187
|
+
this.isTrailingIconSlotPresent = nextTrailing;
|
|
23188
|
+
}
|
|
23189
|
+
const nextActiveDescendant = nextHasDropdown
|
|
23190
|
+
? this.el.querySelector('[slot="dropdown"] .xpl-top-nav-item--active') !== null ||
|
|
23191
|
+
this.el.querySelector('[slot="dropdown"] .xpl-top-nav-item--selected') !== null
|
|
23192
|
+
: false;
|
|
23193
|
+
if (nextActiveDescendant !== this.hasActiveDescendant) {
|
|
23194
|
+
this.hasActiveDescendant = nextActiveDescendant;
|
|
23195
|
+
}
|
|
22650
23196
|
}
|
|
22651
23197
|
getNavDropdownBroadcastRoot() {
|
|
22652
|
-
var _a, _b;
|
|
22653
|
-
return ((_b = (_a = this.el.closest('xpl-top-nav')) !== null && _a !== void 0 ? _a : this.el.closest('xpl-nav-header-menu')) !== null && _b !== void 0 ? _b : this.el.ownerDocument);
|
|
23198
|
+
var _a, _b, _c;
|
|
23199
|
+
return ((_c = (_b = (_a = this.el.closest('xpl-top-nav-menu')) !== null && _a !== void 0 ? _a : this.el.closest('xpl-nav-header-menu')) !== null && _b !== void 0 ? _b : this.el.closest('xpl-top-nav')) !== null && _c !== void 0 ? _c : this.el.ownerDocument);
|
|
22654
23200
|
}
|
|
22655
23201
|
broadcastCloseOtherDropdownHosts() {
|
|
22656
23202
|
const root = this.getNavDropdownBroadcastRoot();
|
|
22657
23203
|
root.querySelectorAll('xpl-top-nav-item').forEach((host) => {
|
|
22658
|
-
if (host === this.el) {
|
|
23204
|
+
if (host === this.el || host.parentElement !== this.el.parentElement) {
|
|
22659
23205
|
return;
|
|
22660
23206
|
}
|
|
22661
23207
|
host.dispatchEvent(new CustomEvent('_xplCloseNavDropdown', { bubbles: false }));
|
|
22662
23208
|
});
|
|
22663
23209
|
}
|
|
22664
|
-
|
|
22665
|
-
var _a;
|
|
22666
|
-
|
|
22667
|
-
|
|
22668
|
-
|
|
22669
|
-
|
|
22670
|
-
|
|
22671
|
-
|
|
22672
|
-
|
|
22673
|
-
|
|
22674
|
-
|
|
22675
|
-
clientY: cy,
|
|
22676
|
-
view: (_a = e.view) !== null && _a !== void 0 ? _a : undefined,
|
|
23210
|
+
hoverModeActive() {
|
|
23211
|
+
var _a, _b;
|
|
23212
|
+
return this.openMode === 'hover' && ((_b = (_a = this.hoverOpenMq) === null || _a === void 0 ? void 0 : _a.matches) !== null && _b !== void 0 ? _b : false);
|
|
23213
|
+
}
|
|
23214
|
+
focusTriggerAfterEscape() {
|
|
23215
|
+
this.timers.scheduleCoalesced(TIMER.focusTriggerAfterEscape, () => {
|
|
23216
|
+
var _a;
|
|
23217
|
+
if (!this.el.isConnected) {
|
|
23218
|
+
return;
|
|
23219
|
+
}
|
|
23220
|
+
(_a = this.el.querySelector('.xpl-top-nav-item__inner')) === null || _a === void 0 ? void 0 : _a.focus();
|
|
22677
23221
|
});
|
|
22678
23222
|
}
|
|
22679
23223
|
static isInternalRenderedHostChild(el) {
|
|
@@ -22691,43 +23235,40 @@ const TopNavItem = class {
|
|
|
22691
23235
|
if (TopNavItem.isInternalRenderedHostChild(child)) {
|
|
22692
23236
|
return false;
|
|
22693
23237
|
}
|
|
22694
|
-
|
|
23238
|
+
const slotName = child.getAttribute('slot');
|
|
23239
|
+
return slotName == null || slotName === '';
|
|
22695
23240
|
}
|
|
22696
23241
|
return false;
|
|
22697
23242
|
});
|
|
22698
23243
|
}
|
|
22699
23244
|
getInnerAriaLabel() {
|
|
22700
23245
|
var _a, _b, _c;
|
|
22701
|
-
if ((_a = this.label) === null || _a === void 0 ? void 0 : _a.trim())
|
|
23246
|
+
if ((_a = this.label) === null || _a === void 0 ? void 0 : _a.trim())
|
|
22702
23247
|
return undefined;
|
|
22703
|
-
|
|
22704
|
-
if (this.hasNonDropdownLightDomChild()) {
|
|
23248
|
+
if (this.hasNonDropdownLightDomChild())
|
|
22705
23249
|
return undefined;
|
|
22706
|
-
}
|
|
22707
23250
|
const custom = (_b = this.itemAriaLabel) === null || _b === void 0 ? void 0 : _b.trim();
|
|
22708
|
-
if (custom)
|
|
23251
|
+
if (custom)
|
|
22709
23252
|
return custom;
|
|
22710
|
-
|
|
22711
|
-
if ((_c = this.icon) === null || _c === void 0 ? void 0 : _c.trim()) {
|
|
23253
|
+
if (((_c = this.icon) === null || _c === void 0 ? void 0 : _c.trim()) || this.isLeadingIconSlotPresent)
|
|
22712
23254
|
return 'Navigation item';
|
|
22713
|
-
}
|
|
22714
23255
|
return undefined;
|
|
22715
23256
|
}
|
|
22716
23257
|
computeHostListitemRole() {
|
|
22717
23258
|
const { el } = this;
|
|
22718
|
-
if (el.classList.contains('xpl-top-nav__brand'))
|
|
23259
|
+
if (el.classList.contains('xpl-top-nav__brand'))
|
|
22719
23260
|
return false;
|
|
22720
|
-
|
|
22721
|
-
if (el.getAttribute('slot') === 'right-aside-mobile') {
|
|
23261
|
+
if (el.getAttribute('slot') === 'right-aside-mobile')
|
|
22722
23262
|
return false;
|
|
22723
|
-
}
|
|
22724
23263
|
const parent = el.parentElement;
|
|
22725
|
-
if ((parent === null || parent === void 0 ? void 0 : parent.getAttribute('role')) === 'list')
|
|
23264
|
+
if ((parent === null || parent === void 0 ? void 0 : parent.getAttribute('role')) === 'list')
|
|
22726
23265
|
return true;
|
|
22727
|
-
}
|
|
22728
23266
|
if (parent != null && parent.tagName.toLowerCase() === 'xpl-nav-header-menu') {
|
|
22729
23267
|
return true;
|
|
22730
23268
|
}
|
|
23269
|
+
if (parent != null && parent.tagName.toLowerCase() === 'xpl-top-nav-menu') {
|
|
23270
|
+
return true;
|
|
23271
|
+
}
|
|
22731
23272
|
if (el.getAttribute('slot') === 'left-aside' &&
|
|
22732
23273
|
(parent === null || parent === void 0 ? void 0 : parent.tagName.toLowerCase()) === 'xpl-top-nav' &&
|
|
22733
23274
|
parent.querySelector('.xpl-top-nav__left-primary[role="list"]') != null) {
|
|
@@ -22737,36 +23278,68 @@ const TopNavItem = class {
|
|
|
22737
23278
|
}
|
|
22738
23279
|
syncHostListitemRole() {
|
|
22739
23280
|
const next = this.computeHostListitemRole();
|
|
22740
|
-
if (this.hostListitemRole !== next)
|
|
23281
|
+
if (this.hostListitemRole !== next)
|
|
22741
23282
|
this.hostListitemRole = next;
|
|
23283
|
+
}
|
|
23284
|
+
renderLabelContent() {
|
|
23285
|
+
var _a;
|
|
23286
|
+
if (!this.label) {
|
|
23287
|
+
return h("slot", null);
|
|
23288
|
+
}
|
|
23289
|
+
const description = (_a = this.description) === null || _a === void 0 ? void 0 : _a.trim();
|
|
23290
|
+
if (!description) {
|
|
23291
|
+
return (h("span", { class: "xpl-top-nav-item__label", title: this.label }, this.label));
|
|
22742
23292
|
}
|
|
23293
|
+
return (h("span", { class: "xpl-top-nav-item__label-group" }, h("span", { class: "xpl-top-nav-item__label", title: this.label }, this.label), h("span", { class: "xpl-top-nav-item__description" }, description)));
|
|
23294
|
+
}
|
|
23295
|
+
renderLeading() {
|
|
23296
|
+
if (this.isLeadingIconSlotPresent) {
|
|
23297
|
+
return (h("span", { class: "xpl-top-nav-item__leading" }, h("slot", { name: "leading-icon" })));
|
|
23298
|
+
}
|
|
23299
|
+
if (this.icon) {
|
|
23300
|
+
return (h("span", { class: "xpl-top-nav-item__leading" }, h("xpl-icon", { size: 16, icon: this.icon })));
|
|
23301
|
+
}
|
|
23302
|
+
return null;
|
|
23303
|
+
}
|
|
23304
|
+
renderTrailing() {
|
|
23305
|
+
if (this.isTrailingIconSlotPresent) {
|
|
23306
|
+
return (h("span", { class: "xpl-top-nav-item__trailing" }, h("slot", { name: "trailing-icon" })));
|
|
23307
|
+
}
|
|
23308
|
+
if (this.hasDropdown) {
|
|
23309
|
+
return (h("span", { class: "xpl-top-nav-item__trailing" }, h("xpl-icon", { icon: "chevron-down" })));
|
|
23310
|
+
}
|
|
23311
|
+
return null;
|
|
22743
23312
|
}
|
|
22744
23313
|
renderInner() {
|
|
22745
23314
|
const tabIndex = 0;
|
|
22746
23315
|
const ariaCurrent = this.selected ? 'page' : undefined;
|
|
22747
23316
|
const ariaExpanded = this.hasDropdown ? (this.open ? 'true' : 'false') : undefined;
|
|
22748
23317
|
const ariaLabel = this.getInnerAriaLabel();
|
|
22749
|
-
const shared = Object.assign(Object.assign({ class: 'xpl-top-nav-item__inner', tabIndex, 'aria-current': ariaCurrent, 'aria-expanded': ariaExpanded }, (ariaLabel ? { 'aria-label': ariaLabel } : {})), { onClick: this.handleClick, onKeyDown: this.handleKeyDown });
|
|
23318
|
+
const shared = Object.assign(Object.assign({ class: 'xpl-top-nav-item__inner', tabIndex, 'aria-current': ariaCurrent, 'aria-expanded': ariaExpanded, 'aria-haspopup': this.hasDropdown ? 'true' : undefined, 'aria-controls': this.hasDropdown ? this.dropdownPanelId : undefined }, (ariaLabel ? { 'aria-label': ariaLabel } : {})), { onClick: this.handleClick, onKeyDown: this.handleKeyDown });
|
|
22750
23319
|
const useAnchor = this.href != null && !this.hasDropdown;
|
|
22751
23320
|
if (useAnchor) {
|
|
22752
|
-
return (h("a", Object.assign({}, shared, { href: this.href }), this.
|
|
23321
|
+
return (h("a", Object.assign({}, shared, { href: this.href }), this.renderLeading(), this.renderLabelContent(), this.renderTrailing()));
|
|
22753
23322
|
}
|
|
22754
|
-
return (h("
|
|
23323
|
+
return (h("button", Object.assign({}, shared, { type: "button" }), this.renderLeading(), this.renderLabelContent(), this.renderTrailing()));
|
|
22755
23324
|
}
|
|
22756
23325
|
render() {
|
|
22757
|
-
return (h(Host, Object.assign({ key: '
|
|
23326
|
+
return (h(Host, Object.assign({ key: '5de7a361dd1f3e0aaa3f98ebb8013118cb5c1a22', class: {
|
|
22758
23327
|
'xpl-top-nav-item': true,
|
|
22759
23328
|
'xpl-top-nav-item--active': this.active,
|
|
22760
|
-
'xpl-top-nav-item--dropdown-open': this.open,
|
|
23329
|
+
'xpl-top-nav-item--dropdown-open': this.hasDropdown && this.open,
|
|
23330
|
+
'xpl-top-nav-item--has-active-descendant': this.hasActiveDescendant,
|
|
22761
23331
|
'xpl-top-nav-item--has-dropdown': this.hasDropdown,
|
|
22762
23332
|
'xpl-top-nav-item--selected': this.selected,
|
|
22763
23333
|
dark: true,
|
|
22764
|
-
} }, (this.hostListitemRole ? { role: 'listitem' } : {})), this.renderInner(), this.hasDropdown && (h("div", { key: '
|
|
23334
|
+
}, onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave }, (this.hostListitemRole ? { role: 'listitem' } : {})), this.renderInner(), this.hasDropdown && (h("div", { key: 'e076a46dab0d877fdac2eadf09c1fa1bdc97b9bd', id: this.dropdownPanelId, class: "xpl-top-nav-item__dropdown" }, h("slot", { key: '3a6c88fe606672b09b45bb5d8a22d05b26e84e30', name: "dropdown" })))));
|
|
22765
23335
|
}
|
|
22766
23336
|
get el() { return getElement(this); }
|
|
22767
23337
|
static get watchers() { return {
|
|
22768
23338
|
"hasDropdown": [{
|
|
22769
23339
|
"onHasDropdownChanged": 0
|
|
23340
|
+
}],
|
|
23341
|
+
"open": [{
|
|
23342
|
+
"onOpenChanged": 0
|
|
22770
23343
|
}]
|
|
22771
23344
|
}; }
|
|
22772
23345
|
};
|
|
@@ -22785,7 +23358,7 @@ const UtilityBar = class {
|
|
|
22785
23358
|
this.open = this.isNavOpenAtStartup !== undefined ? this.isNavOpenAtStartup : this.open;
|
|
22786
23359
|
}
|
|
22787
23360
|
render() {
|
|
22788
|
-
return (h(Host, { key: '
|
|
23361
|
+
return (h(Host, { key: 'e990b6a7176fdb1d48fd1859f359f217a6600015' }, h("nav", { key: '3b331ed5294f208dcededae078659d9b0d7b118f', "aria-label": "utility navigation bar", class: "xpl-utility-bar" }, this.navControl ? (h("div", null, h("button", { class: "xpl-utility-bar__nav-control", onClick: () => this.onNavToggle() }, h("xpl-icon", { class: "xpl-utility-nav__bars", icon: "three-bars" })), h("slot", { name: "aside" }))) : (h("slot", { name: "aside" })), h("slot", { key: '444363c10471bd6206d39d2da37bafdae6291137', name: "main" }))));
|
|
22789
23362
|
}
|
|
22790
23363
|
};
|
|
22791
23364
|
|