@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
|
@@ -11,14 +11,14 @@ export class Checkbox {
|
|
|
11
11
|
}
|
|
12
12
|
render() {
|
|
13
13
|
var _a;
|
|
14
|
-
return (h(Host, { key: '
|
|
14
|
+
return (h(Host, { key: 'd173bab038a25f785864e5614b29ec2fde832786', class: {
|
|
15
15
|
'xpl-checkbox-radio-container': true,
|
|
16
16
|
styled: this.styled,
|
|
17
17
|
disabled: this.disabled,
|
|
18
|
-
} }, h("input", { key: '
|
|
18
|
+
} }, 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: {
|
|
19
19
|
'xpl-label': true,
|
|
20
20
|
'xpl-label--disabled': this.disabled,
|
|
21
|
-
}, htmlFor: this.id }, h("slot", { key: '
|
|
21
|
+
}, htmlFor: this.id }, h("slot", { key: 'a5f06411725e10f5e5fafc33ff5e8f4adfec9e5b' }), this.description && (h("small", { key: '16ac47d9316e4a78f732cb3c0851efd8eaf903f2', class: {
|
|
22
22
|
'xpl-description': true,
|
|
23
23
|
'xpl-description--disabled': this.disabled,
|
|
24
24
|
} }, this.description)))));
|
|
@@ -153,7 +153,7 @@ export class Checkbox {
|
|
|
153
153
|
"optional": true,
|
|
154
154
|
"docs": {
|
|
155
155
|
"tags": [],
|
|
156
|
-
"text": "The value attribute for the checkbox input.\n(
|
|
156
|
+
"text": "The value attribute for the checkbox input.\n(submitted in form as name/value pair)"
|
|
157
157
|
},
|
|
158
158
|
"getter": false,
|
|
159
159
|
"setter": false,
|
|
@@ -36,7 +36,7 @@ export class Choicelist {
|
|
|
36
36
|
this.onChoicesPropChange(this.choices);
|
|
37
37
|
}
|
|
38
38
|
render() {
|
|
39
|
-
return (h(Host, { key: '
|
|
39
|
+
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: {
|
|
40
40
|
'xpl-choicelist': true,
|
|
41
41
|
'xpl-choicelist--styled': this.styled,
|
|
42
42
|
} }, this.choices.map((choice, i) => {
|
|
@@ -4,7 +4,7 @@ export class ContentArea {
|
|
|
4
4
|
this.size = 'wide';
|
|
5
5
|
}
|
|
6
6
|
render() {
|
|
7
|
-
return (h(Host, { key: '
|
|
7
|
+
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' })))));
|
|
8
8
|
}
|
|
9
9
|
static get is() { return "xpl-content-area"; }
|
|
10
10
|
static get properties() {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
2
|
export class Dashboard {
|
|
3
3
|
render() {
|
|
4
|
-
return (h(Host, { key: '
|
|
4
|
+
return (h(Host, { key: '1eb93f83a05cfe198aed91b0d8771bdbe6e7aaee' }, h("dl", { key: 'bdb8f39b30d318ae25a203ac75966f12a9299b35', class: "xpl-dashboard" }, h("slot", { key: 'caf043e38777ac0a397782957f0936bb34436f63' }))));
|
|
5
5
|
}
|
|
6
6
|
static get is() { return "xpl-dashboard"; }
|
|
7
7
|
}
|
|
@@ -31,8 +31,8 @@ export class DataCard {
|
|
|
31
31
|
: this.smallStatVariant === 'negative'
|
|
32
32
|
? 'arrow-down-right'
|
|
33
33
|
: 'dash';
|
|
34
|
-
return (h(Host, { key: '
|
|
35
|
-
(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: '
|
|
34
|
+
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 &&
|
|
35
|
+
(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 }))))));
|
|
36
36
|
}
|
|
37
37
|
static get is() { return "xpl-data-card"; }
|
|
38
38
|
static get properties() {
|
|
@@ -3,7 +3,7 @@ export class Divider {
|
|
|
3
3
|
render() {
|
|
4
4
|
let className = 'xpl-divider';
|
|
5
5
|
className += ` xpl-divider--${this.tier}`;
|
|
6
|
-
return (h(Host, { key: '
|
|
6
|
+
return (h(Host, { key: '1926b1e92a89dc5039042d29491f246cf3900efa', class: className }, h("span", { key: '492651208216149bfd4d2ed7cc8610b2bc8b05ea' }, h("slot", { key: '1e8b9e121ab1cb946b7a13d2bacbeea9a490a289' }))));
|
|
7
7
|
}
|
|
8
8
|
static get is() { return "xpl-divider"; }
|
|
9
9
|
static get properties() {
|
|
@@ -20,7 +20,7 @@ export class DropdownGroup {
|
|
|
20
20
|
var { groupName: optsGroupName } = _a, properties = __rest(_a, ["groupName"]);
|
|
21
21
|
return optsGroupName ? (h("xpl-dropdown-group", Object.assign({ label: optsGroupName }, properties))) : (h("xpl-dropdown-option", Object.assign({}, properties)));
|
|
22
22
|
});
|
|
23
|
-
return (h(Host, { key: '
|
|
23
|
+
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" })))));
|
|
24
24
|
}
|
|
25
25
|
static get is() { return "xpl-dropdown-group"; }
|
|
26
26
|
static get properties() {
|
package/dist/collection/components/xpl-dropdown/xpl-dropdown-heading/xpl-dropdown-heading.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
2
|
export class DropdownHeading {
|
|
3
3
|
render() {
|
|
4
|
-
return (h(Host, { key: '
|
|
4
|
+
return (h(Host, { key: 'e4444b617fe160dbf259f4ecc2aafd6166859dce', class: { 'xpl-dropdown-heading': true }, role: "presentation" }, h("span", { key: '1e1e37499c0add5b53fcd0a836f97fa5b9e1a9bd' }, this.label || h("slot", { key: 'c310120a37646452e989db2ead01d77a89b96f0d', name: "heading" }))));
|
|
5
5
|
}
|
|
6
6
|
static get is() { return "xpl-dropdown-heading"; }
|
|
7
7
|
static get properties() {
|
|
@@ -49,11 +49,11 @@ export class DropdownOptionCpnt {
|
|
|
49
49
|
}
|
|
50
50
|
render() {
|
|
51
51
|
const { label, isSelected, isDisabled, value, subtitle, icon } = this;
|
|
52
|
-
return (h(Host, { key: '
|
|
52
|
+
return (h(Host, { key: '66ffacb152e80f270877a189488048ef6b36b7af', class: {
|
|
53
53
|
'xpl-dropdown-option': true,
|
|
54
54
|
'xpl-dropdown-option--disabled': isDisabled,
|
|
55
55
|
'xpl-dropdown-option--selected': isSelected,
|
|
56
|
-
}, role: "option", "aria-checked": isSelected, "aria-disabled": isDisabled, "aria-selected": isSelected, value: value }, h("li", { key: '
|
|
56
|
+
}, 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))));
|
|
57
57
|
}
|
|
58
58
|
static get is() { return "xpl-dropdown-option"; }
|
|
59
59
|
static get properties() {
|
|
@@ -12,8 +12,25 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
12
12
|
};
|
|
13
13
|
import { h, Host, } from "@stencil/core";
|
|
14
14
|
import { autoUpdate, computePosition, flip, hide, offset, size, } from "@floating-ui/dom";
|
|
15
|
+
const VIRTUAL_LIST = {
|
|
16
|
+
rowHeight: 45,
|
|
17
|
+
overscan: 20,
|
|
18
|
+
virtualizeFrom: 200,
|
|
19
|
+
};
|
|
20
|
+
function renderOption(option, virtualIndex) {
|
|
21
|
+
const { groupName, options: opts, subtitle } = option, properties = __rest(option, ["groupName", "options", "subtitle"]);
|
|
22
|
+
if (groupName) {
|
|
23
|
+
return (h("xpl-dropdown-group", Object.assign({ groupName: groupName, options: opts }, properties)));
|
|
24
|
+
}
|
|
25
|
+
const isVirtual = virtualIndex !== undefined;
|
|
26
|
+
return (h("xpl-dropdown-option", Object.assign({ class: isVirtual ? 'xpl-dropdown-option--virtual' : undefined, style: isVirtual
|
|
27
|
+
? { transform: `translateY(${virtualIndex * VIRTUAL_LIST.rowHeight}px)` }
|
|
28
|
+
: undefined, subtitle: subtitle }, properties)));
|
|
29
|
+
}
|
|
15
30
|
export class Dropdown {
|
|
16
31
|
constructor() {
|
|
32
|
+
this.virtualEnd = 0;
|
|
33
|
+
this.virtualStart = 0;
|
|
17
34
|
this.isOpen = false;
|
|
18
35
|
this.closeOnSelect = true;
|
|
19
36
|
this.mode = 'single';
|
|
@@ -21,6 +38,9 @@ export class Dropdown {
|
|
|
21
38
|
this.placement = 'bottom-start';
|
|
22
39
|
this.selectOnFocus = false;
|
|
23
40
|
this.cleanupAutoUpdate = null;
|
|
41
|
+
this.virtualScrollRaf = null;
|
|
42
|
+
this.openAlignmentRaf = null;
|
|
43
|
+
this.previousOptionCount = 0;
|
|
24
44
|
this.updateDropdownPosition = async (triggerEl) => {
|
|
25
45
|
var _a, _b;
|
|
26
46
|
const { x, y, placement, middlewareData } = await computePosition(triggerEl, this.hostElement, {
|
|
@@ -92,6 +112,64 @@ export class Dropdown {
|
|
|
92
112
|
this.isOpen = false;
|
|
93
113
|
}
|
|
94
114
|
};
|
|
115
|
+
this.handleVirtualScroll = () => {
|
|
116
|
+
if (this.virtualScrollRaf !== null)
|
|
117
|
+
return;
|
|
118
|
+
this.virtualScrollRaf = requestAnimationFrame(() => {
|
|
119
|
+
this.virtualScrollRaf = null;
|
|
120
|
+
this.updateVirtualRange();
|
|
121
|
+
});
|
|
122
|
+
};
|
|
123
|
+
this.setListEl = (el) => {
|
|
124
|
+
var _a, _b;
|
|
125
|
+
if (el === this.listEl)
|
|
126
|
+
return;
|
|
127
|
+
this.listEl = el;
|
|
128
|
+
(_a = this.listResizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
129
|
+
if (el && typeof ResizeObserver !== 'undefined') {
|
|
130
|
+
(_b = this.listResizeObserver) !== null && _b !== void 0 ? _b : (this.listResizeObserver = new ResizeObserver(() => {
|
|
131
|
+
if (this.isVirtualized)
|
|
132
|
+
this.handleVirtualScroll();
|
|
133
|
+
}));
|
|
134
|
+
this.listResizeObserver.observe(el);
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
this.scheduleOpenAlignment = () => {
|
|
138
|
+
if (this.openAlignmentRaf !== null)
|
|
139
|
+
return;
|
|
140
|
+
this.openAlignmentRaf = requestAnimationFrame(() => {
|
|
141
|
+
this.openAlignmentRaf = null;
|
|
142
|
+
this.scrollSelectedIntoView();
|
|
143
|
+
this.updateVirtualRange();
|
|
144
|
+
});
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
onOptionsChanged() {
|
|
148
|
+
var _a, _b, _c, _d;
|
|
149
|
+
const total = (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;
|
|
150
|
+
const listReplaced = total !== this.previousOptionCount;
|
|
151
|
+
this.previousOptionCount = total;
|
|
152
|
+
if (!this.isVirtualized) {
|
|
153
|
+
this.virtualStart = 0;
|
|
154
|
+
this.virtualEnd = 0;
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
const list = this.listEl;
|
|
158
|
+
if (list) {
|
|
159
|
+
const maxScroll = Math.max(0, total * VIRTUAL_LIST.rowHeight - list.clientHeight);
|
|
160
|
+
if (list.scrollTop > maxScroll) {
|
|
161
|
+
list.scrollTop = maxScroll;
|
|
162
|
+
}
|
|
163
|
+
if (this.isOpen && listReplaced) {
|
|
164
|
+
const selectedIndex = (_d = (_c = this.options) === null || _c === void 0 ? void 0 : _c.findIndex((option) => option.isSelected)) !== null && _d !== void 0 ? _d : -1;
|
|
165
|
+
const outOfWindow = selectedIndex >= 0 &&
|
|
166
|
+
(selectedIndex < this.virtualStart || selectedIndex >= this.virtualEnd);
|
|
167
|
+
if (outOfWindow) {
|
|
168
|
+
this.scrollSelectedIntoView();
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
this.updateVirtualRange();
|
|
95
173
|
}
|
|
96
174
|
onAnchorToTriggerChanged() {
|
|
97
175
|
if (this.isOpen) {
|
|
@@ -115,7 +193,7 @@ export class Dropdown {
|
|
|
115
193
|
}
|
|
116
194
|
onSelectedValuesChanged(newValues, initialRender = false) {
|
|
117
195
|
if (this.options && this.options.length > 0) {
|
|
118
|
-
const flatOptions = this.options.
|
|
196
|
+
const flatOptions = this.options.flatMap((curr) => curr.groupName && curr.options ? curr.options : [curr]);
|
|
119
197
|
flatOptions.forEach((option) => {
|
|
120
198
|
const optionValue = option.value || option.label;
|
|
121
199
|
if (this.mode === 'single') {
|
|
@@ -140,9 +218,13 @@ export class Dropdown {
|
|
|
140
218
|
this.isOpenChange.emit(newValue);
|
|
141
219
|
if (newValue) {
|
|
142
220
|
this.startPositioning();
|
|
221
|
+
this.alignOnOpen();
|
|
143
222
|
}
|
|
144
223
|
else {
|
|
145
224
|
this.stopPositioning();
|
|
225
|
+
this.cancelVirtualScroll();
|
|
226
|
+
this.virtualStart = 0;
|
|
227
|
+
this.virtualEnd = 0;
|
|
146
228
|
}
|
|
147
229
|
}
|
|
148
230
|
connectedCallback() {
|
|
@@ -150,44 +232,68 @@ export class Dropdown {
|
|
|
150
232
|
document.addEventListener('keydown', this.handleKeyDown);
|
|
151
233
|
}
|
|
152
234
|
disconnectedCallback() {
|
|
235
|
+
var _a;
|
|
153
236
|
document.removeEventListener('mousedown', this.handleClickOutside);
|
|
154
237
|
document.removeEventListener('keydown', this.handleKeyDown);
|
|
155
238
|
this.stopPositioning();
|
|
239
|
+
this.cancelVirtualScroll();
|
|
240
|
+
(_a = this.listResizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
156
241
|
}
|
|
157
242
|
componentWillLoad() {
|
|
243
|
+
var _a, _b;
|
|
158
244
|
this.handleSelect = this.handleSelect.bind(this);
|
|
159
245
|
if (this.selectedValues) {
|
|
160
246
|
this.onSelectedValuesChanged(this.selectedValues, true);
|
|
161
247
|
}
|
|
248
|
+
this.previousOptionCount = (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;
|
|
162
249
|
}
|
|
163
250
|
componentDidLoad() {
|
|
164
|
-
if (this.isOpen)
|
|
251
|
+
if (this.isOpen) {
|
|
165
252
|
this.startPositioning();
|
|
253
|
+
this.alignOnOpen();
|
|
254
|
+
}
|
|
166
255
|
}
|
|
167
256
|
async handleSelect(e, { component }) {
|
|
168
257
|
const { hostElement, mode, options, update } = this;
|
|
169
258
|
const isSingle = mode === 'single';
|
|
170
259
|
const isMulti = mode === 'multi';
|
|
171
260
|
if (options) {
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
(
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
261
|
+
const targetValue = component.hostElement.value || component.hostElement.label;
|
|
262
|
+
const hasGroups = options.some((option) => option.groupName);
|
|
263
|
+
if (!hasGroups) {
|
|
264
|
+
options.forEach((option) => {
|
|
265
|
+
const isMatch = (option.value || option.label) === targetValue;
|
|
266
|
+
if (isSingle) {
|
|
267
|
+
option.isSelected = isMatch;
|
|
268
|
+
if (isMatch)
|
|
269
|
+
component.hostElement.isSelected = true;
|
|
270
|
+
}
|
|
271
|
+
else if (isMulti && isMatch) {
|
|
272
|
+
option.isSelected = !option.isSelected;
|
|
273
|
+
component.hostElement.isSelected = option.isSelected;
|
|
274
|
+
}
|
|
275
|
+
});
|
|
276
|
+
this.options = [...options];
|
|
277
|
+
}
|
|
278
|
+
else {
|
|
279
|
+
const flatOptions = options.flatMap((curr) => curr.groupName && curr.options ? curr.options : [curr]);
|
|
280
|
+
flatOptions.forEach((option) => {
|
|
281
|
+
const isMatch = (option.value || option.label) === targetValue;
|
|
282
|
+
if (isSingle) {
|
|
283
|
+
option.isSelected = isMatch;
|
|
284
|
+
component.hostElement.isSelected = true;
|
|
285
|
+
}
|
|
286
|
+
else if (isMulti && isMatch) {
|
|
287
|
+
option.isSelected = !option.isSelected;
|
|
288
|
+
component.hostElement.isSelected = option.isSelected;
|
|
289
|
+
}
|
|
290
|
+
});
|
|
291
|
+
const mapOptions = (option) => {
|
|
292
|
+
option.options = option.groupName ? option.options.map(mapOptions) : undefined;
|
|
293
|
+
return option;
|
|
294
|
+
};
|
|
295
|
+
this.options = options.map(mapOptions);
|
|
296
|
+
}
|
|
191
297
|
}
|
|
192
298
|
else if (isSingle) {
|
|
193
299
|
const optionNodes = Array.from(hostElement.querySelectorAll('xpl-dropdown-option'));
|
|
@@ -226,21 +332,83 @@ export class Dropdown {
|
|
|
226
332
|
.querySelector('.xpl-dropdown-list')) === null || _a === void 0 ? void 0 : _a.style.removeProperty('max-height');
|
|
227
333
|
this.hostElement.classList.remove('xpl-dropdown--above', 'xpl-dropdown--below');
|
|
228
334
|
}
|
|
335
|
+
cancelVirtualScroll() {
|
|
336
|
+
if (this.virtualScrollRaf !== null) {
|
|
337
|
+
cancelAnimationFrame(this.virtualScrollRaf);
|
|
338
|
+
this.virtualScrollRaf = null;
|
|
339
|
+
}
|
|
340
|
+
if (this.openAlignmentRaf !== null) {
|
|
341
|
+
cancelAnimationFrame(this.openAlignmentRaf);
|
|
342
|
+
this.openAlignmentRaf = null;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
alignOnOpen() {
|
|
346
|
+
this.scrollSelectedIntoView();
|
|
347
|
+
this.updateVirtualRange();
|
|
348
|
+
this.scheduleOpenAlignment();
|
|
349
|
+
}
|
|
350
|
+
scrollSelectedIntoView() {
|
|
351
|
+
const { listEl: list, options } = this;
|
|
352
|
+
if (!list || !(options === null || options === void 0 ? void 0 : options.length) || !this.isVirtualized)
|
|
353
|
+
return;
|
|
354
|
+
const selectedIndex = options.findIndex((option) => option.isSelected);
|
|
355
|
+
if (selectedIndex < 0)
|
|
356
|
+
return;
|
|
357
|
+
const { rowHeight } = VIRTUAL_LIST;
|
|
358
|
+
const centered = selectedIndex * rowHeight - (list.clientHeight - rowHeight) / 2;
|
|
359
|
+
const maxScroll = Math.max(0, options.length * rowHeight - list.clientHeight);
|
|
360
|
+
list.scrollTop = Math.max(0, Math.min(centered, maxScroll));
|
|
361
|
+
}
|
|
362
|
+
updateVirtualRange() {
|
|
363
|
+
var _a, _b;
|
|
364
|
+
const list = this.listEl;
|
|
365
|
+
const total = (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;
|
|
366
|
+
if (!list || !total)
|
|
367
|
+
return;
|
|
368
|
+
const { rowHeight, overscan } = VIRTUAL_LIST;
|
|
369
|
+
const firstVisible = Math.floor(list.scrollTop / rowHeight);
|
|
370
|
+
const visibleCount = Math.ceil(list.clientHeight / rowHeight) || 1;
|
|
371
|
+
const start = Math.max(0, firstVisible - overscan);
|
|
372
|
+
const end = Math.min(total, firstVisible + visibleCount + overscan);
|
|
373
|
+
if (start !== this.virtualStart || end !== this.virtualEnd) {
|
|
374
|
+
this.virtualStart = start;
|
|
375
|
+
this.virtualEnd = end;
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
get isVirtualized() {
|
|
379
|
+
const { options } = this;
|
|
380
|
+
return (!!options &&
|
|
381
|
+
options.length > VIRTUAL_LIST.virtualizeFrom &&
|
|
382
|
+
options.every((option) => !option.groupName && !option.subtitle));
|
|
383
|
+
}
|
|
229
384
|
render() {
|
|
230
|
-
const { isOpen } = this;
|
|
231
|
-
const
|
|
232
|
-
const
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
385
|
+
const { isOpen, mode, options } = this;
|
|
386
|
+
const hasOptions = !!(options && options.length);
|
|
387
|
+
const shouldVirtualize = this.isVirtualized;
|
|
388
|
+
let listContent;
|
|
389
|
+
if (!hasOptions) {
|
|
390
|
+
listContent = h("slot", { key: '7a604ed002d4c412eb709aa7c3ef1a9e80f614ed', name: "options" });
|
|
391
|
+
}
|
|
392
|
+
else if (shouldVirtualize) {
|
|
393
|
+
const { rowHeight, overscan } = VIRTUAL_LIST;
|
|
394
|
+
const total = options.length;
|
|
395
|
+
const start = Math.min(this.virtualStart, total);
|
|
396
|
+
const fallbackEnd = Math.min(total, Math.ceil(300 / rowHeight) + overscan * 2);
|
|
397
|
+
const end = this.virtualEnd > start ? this.virtualEnd : fallbackEnd;
|
|
398
|
+
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))));
|
|
399
|
+
}
|
|
400
|
+
else {
|
|
401
|
+
listContent = options.map((option) => renderOption(option));
|
|
402
|
+
}
|
|
403
|
+
return (h(Host, { key: '282d3bc09a8ce0e63d55bbc9707936afe0efae01', "aria-expanded": isOpen ? 'true' : 'false', class: {
|
|
239
404
|
'xpl-dropdown': true,
|
|
240
405
|
'xpl-dropdown--multi': mode === 'multi',
|
|
241
406
|
'xpl-dropdown--open': isOpen,
|
|
242
407
|
'xpl-dropdown--anchor-to-trigger': this.anchorToTrigger,
|
|
243
|
-
|
|
408
|
+
'xpl-dropdown--virtualized': shouldVirtualize,
|
|
409
|
+
}, role: "listbox" }, h("slot", { key: '977cfb27b24bcecaf22587bd2e6350ad52743cad', name: "header" }), h("ul", { key: '46274999327ffdb9749a012b839ef124df4d72d2', class: "xpl-dropdown-list", ref: (el) => {
|
|
410
|
+
this.setListEl(el);
|
|
411
|
+
}, onScroll: shouldVirtualize ? this.handleVirtualScroll : undefined }, listContent)));
|
|
244
412
|
}
|
|
245
413
|
static get is() { return "xpl-dropdown"; }
|
|
246
414
|
static get properties() {
|
|
@@ -482,6 +650,12 @@ export class Dropdown {
|
|
|
482
650
|
}
|
|
483
651
|
};
|
|
484
652
|
}
|
|
653
|
+
static get states() {
|
|
654
|
+
return {
|
|
655
|
+
"virtualEnd": {},
|
|
656
|
+
"virtualStart": {}
|
|
657
|
+
};
|
|
658
|
+
}
|
|
485
659
|
static get events() {
|
|
486
660
|
return [{
|
|
487
661
|
"method": "isOpenChange",
|
|
@@ -542,6 +716,9 @@ export class Dropdown {
|
|
|
542
716
|
static get elementRef() { return "hostElement"; }
|
|
543
717
|
static get watchers() {
|
|
544
718
|
return [{
|
|
719
|
+
"propName": "options",
|
|
720
|
+
"methodName": "onOptionsChanged"
|
|
721
|
+
}, {
|
|
545
722
|
"propName": "anchorToTrigger",
|
|
546
723
|
"methodName": "onAnchorToTriggerChanged"
|
|
547
724
|
}, {
|
|
@@ -51,7 +51,7 @@ export class DynamicTable {
|
|
|
51
51
|
this.updateColumnCount();
|
|
52
52
|
}
|
|
53
53
|
render() {
|
|
54
|
-
return (h("div", { key: '
|
|
54
|
+
return (h("div", { key: '7b1ac3b1461e69fb7001baf63c256abcc65cb3a3', role: "grid", class: "xpl-dynamic-table", "aria-colcount": this.colCount }, h("slot", { key: '5d7484d4517b132dbb2400f7c63da3be14064586', name: "header" }), h("slot", { key: '292c502f9cb58467bbb69a3eeacff51af557d826', name: "body" })));
|
|
55
55
|
}
|
|
56
56
|
static get is() { return "xpl-dynamic-table"; }
|
|
57
57
|
static get states() {
|
|
@@ -19,9 +19,9 @@ export class DynamicTableCell {
|
|
|
19
19
|
}
|
|
20
20
|
render() {
|
|
21
21
|
const colIndex = Array.from(this.el.parentElement.children).indexOf(this.el) + 1;
|
|
22
|
-
return (h(Host, { key: '
|
|
22
|
+
return (h(Host, { key: '18dbf3410d7ecd8ccf08b4b7e8927c50777967b8', role: "gridcell", "aria-colindex": colIndex, class: "xpl-dynamic-table-cell", ref: (el) => {
|
|
23
23
|
this.hostElement = el;
|
|
24
|
-
} }, h("slot", { key: '
|
|
24
|
+
} }, h("slot", { key: '7efb10712db0c91fb2f745f23946270c488885a5' })));
|
|
25
25
|
}
|
|
26
26
|
static get is() { return "xpl-dynamic-table-cell"; }
|
|
27
27
|
static get properties() {
|
|
@@ -24,9 +24,9 @@ export class DynamicTableRow {
|
|
|
24
24
|
const classList = `xpl-dynamic-table-row
|
|
25
25
|
${this.isDisabled ? 'disabled' : ''}
|
|
26
26
|
${this.selected ? 'selected' : ''}`;
|
|
27
|
-
return (h(Host, { key: '
|
|
27
|
+
return (h(Host, { key: '17fac4d9214237c1896a136839c79377dc9b3169', role: "row", class: classList, ref: (el) => {
|
|
28
28
|
this.hostElement = el;
|
|
29
|
-
} }, h("slot", { key: '
|
|
29
|
+
} }, h("slot", { key: '7d41f904e2c1fa3dcde2b7652cd2840c6bde3470' })));
|
|
30
30
|
}
|
|
31
31
|
static get is() { return "xpl-dynamic-table-row"; }
|
|
32
32
|
static get properties() {
|
|
@@ -22,7 +22,7 @@ export class Grid {
|
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
24
|
render() {
|
|
25
|
-
return h(Host, { key: '
|
|
25
|
+
return h(Host, { key: '3700079a0f7bbea9755a217d7757dff5a82ee601', class: "xpl-grid" });
|
|
26
26
|
}
|
|
27
27
|
static get is() { return "xpl-grid"; }
|
|
28
28
|
static get elementRef() { return "container"; }
|
|
@@ -12,7 +12,7 @@ export class GridItem {
|
|
|
12
12
|
className += ` xpl-grid-item-sm-${this.sm}`;
|
|
13
13
|
className += ` xpl-grid-item-md-${this.md}`;
|
|
14
14
|
className += ` xpl-grid-item-lg-${this.lg}`;
|
|
15
|
-
return (h(Host, { key: '
|
|
15
|
+
return (h(Host, { key: 'a541967d85e9a4fcd643aa95b62226e46c476dc6', class: className }, h("slot", { key: 'e20ba799288ffb654334698215518e8cfe6ba9a3' })));
|
|
16
16
|
}
|
|
17
17
|
static get is() { return "xpl-grid-item"; }
|
|
18
18
|
static get properties() {
|
|
@@ -68,7 +68,7 @@ export class HeaderAccordion {
|
|
|
68
68
|
this.applyBorderRadiusToLastRow();
|
|
69
69
|
}
|
|
70
70
|
render() {
|
|
71
|
-
return (h(Host, { key: '
|
|
71
|
+
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" }))));
|
|
72
72
|
}
|
|
73
73
|
static get is() { return "xpl-header-accordion"; }
|
|
74
74
|
static get properties() {
|
|
@@ -16,10 +16,10 @@ export class Icon {
|
|
|
16
16
|
let wrapperClasses = 'xpl-icon__wrapper ';
|
|
17
17
|
if (this.backgroundColor)
|
|
18
18
|
wrapperClasses += `xpl-icon__wrapper--with-background xpl-icon__wrapper--with-background--${this.backgroundColor}`;
|
|
19
|
-
return (h(Host, { key: '
|
|
19
|
+
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: {
|
|
20
20
|
width: `${options.width}px`,
|
|
21
21
|
height: `${options.height}px`,
|
|
22
|
-
}, innerHTML: (_a = apolloIcons.getIcon(this.icon)) === null || _a === void 0 ? void 0 : _a.toSVG(options) }), h("figcaption", { key: '
|
|
22
|
+
}, innerHTML: (_a = apolloIcons.getIcon(this.icon)) === null || _a === void 0 ? void 0 : _a.toSVG(options) }), h("figcaption", { key: 'd26da1d1df59a9aa414c50bcfb9861d860a6ae65' }, this.icon, " icon"))));
|
|
23
23
|
}
|
|
24
24
|
static get is() { return "xpl-icon"; }
|
|
25
25
|
static get originalStyleUrls() {
|
|
@@ -195,16 +195,16 @@ export class InputColor {
|
|
|
195
195
|
top: `${y}px`,
|
|
196
196
|
background: `rgb(${r}, ${g}, ${b})`,
|
|
197
197
|
};
|
|
198
|
-
return (h(Host, { key: '
|
|
198
|
+
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: {
|
|
199
199
|
'xpl-input-color__display': true,
|
|
200
200
|
'xpl-input-color__display--disabled': this.disabled,
|
|
201
201
|
'xpl-input-color__display--error': !!this.hasErrorState,
|
|
202
|
-
} }, h("span", { key: '
|
|
202
|
+
} }, h("span", { key: 'a78d2b771ad17897820805f1f5d1e265cdd6cbfa', class: "xpl-input-color__color", style: {
|
|
203
203
|
background: objectToStringColor(this.colorValues),
|
|
204
|
-
} }), 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: '
|
|
204
|
+
} }), 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) => {
|
|
205
205
|
e.stopPropagation();
|
|
206
206
|
this.openEyeDropper();
|
|
207
|
-
} })))), h("div", { key: '
|
|
207
|
+
} })))), h("div", { key: '4cfadf2209a0d453f8a1ecc74a343d63b48c5b36', class: "xpl-input-color__menu" }, h("div", { key: '5acdd216cf4e1714ec493a53c0a974d6d25e0c49', class: "xpl-input-color__sl-grid", ref: (el) => {
|
|
208
208
|
this.colorInputElements.slGrid = el;
|
|
209
209
|
}, style: {
|
|
210
210
|
background: [
|
|
@@ -212,9 +212,9 @@ export class InputColor {
|
|
|
212
212
|
`linear-gradient(to right, #fff, #fff0)`,
|
|
213
213
|
`rgb(${hueBaseColor.r} ${hueBaseColor.g} ${hueBaseColor.b})`,
|
|
214
214
|
].join(', '),
|
|
215
|
-
}, onMouseDown: this.startDrag, onTouchStart: this.startDrag }, h("div", { key: '
|
|
215
|
+
}, 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) => {
|
|
216
216
|
this.colorInputElements.hue = el;
|
|
217
|
-
} }), h("input", { key: '
|
|
217
|
+
} }), 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) => {
|
|
218
218
|
this.colorInputElements.alpha = el;
|
|
219
219
|
}, style: {
|
|
220
220
|
backgroundImage: [
|
|
@@ -224,9 +224,9 @@ export class InputColor {
|
|
|
224
224
|
`linear-gradient(45deg, transparent 75%, #ccc 75%)`,
|
|
225
225
|
`linear-gradient(-45deg, transparent 75%, #ccc 75%)`,
|
|
226
226
|
].join(', '),
|
|
227
|
-
} }), h("div", { key: '
|
|
227
|
+
} }), h("div", { key: 'a1cf7bde4bd0d2fc7b19b60cff878f56aeb70e2e', class: "xpl-input-color__preview", style: {
|
|
228
228
|
background: `rgba(${r}, ${g}, ${b}, ${a})`,
|
|
229
|
-
} })), h("div", { key: '
|
|
229
|
+
} })), h("div", { key: '3a82739b45a8ac2be0e732ea27cff2a583503eaf', class: "xpl-input-color__inputs" }, Object.entries(this.colorInputElements)
|
|
230
230
|
.filter(([key]) => ['hex', 'r', 'g', 'b', 'a'].includes(key))
|
|
231
231
|
.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) => {
|
|
232
232
|
this.colorInputElements[key] = elRef;
|