@xplortech/apollo-core 2.8.1 → 2.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.typings/apollo-components.html-data.json +20 -12
- package/build/style.css +2086 -1875
- package/dist/apollo-core/apollo-core.css +20 -18
- package/dist/apollo-core/apollo-core.esm.js +1 -1
- package/dist/apollo-core/p-0e45f332.entry.js +1 -0
- package/dist/apollo-core/p-0f251f98.entry.js +1 -0
- package/dist/apollo-core/p-1691c4f3.entry.js +1 -0
- package/dist/apollo-core/p-172ac720.entry.js +1 -0
- package/dist/apollo-core/p-23870463.entry.js +1 -0
- package/dist/apollo-core/{p-36ba29da.entry.js → p-3b8639b7.entry.js} +1 -1
- package/dist/apollo-core/p-44a16751.entry.js +1 -0
- package/dist/apollo-core/p-4efecab2.entry.js +1 -0
- package/dist/apollo-core/p-5094dd97.entry.js +1 -0
- package/dist/apollo-core/p-70e7facc.entry.js +1 -0
- package/dist/apollo-core/{p-6a15f1e0.entry.js → p-728341d2.entry.js} +1 -1
- package/dist/apollo-core/p-910be81f.entry.js +1 -0
- package/dist/apollo-core/{p-b61d7952.entry.js → p-9adf3694.entry.js} +1 -1
- package/dist/apollo-core/p-CK3_k8jD.js +1 -0
- package/dist/apollo-core/p-CXkZUm1c.js +2 -0
- package/dist/apollo-core/p-c17b6351.entry.js +1 -0
- package/dist/apollo-core/p-e08b434c.entry.js +1 -0
- package/dist/apollo-core/{p-ca127ee8.entry.js → p-e9e7577f.entry.js} +1 -1
- package/dist/cjs/apollo-core.cjs.js +3 -3
- package/dist/cjs/{index-BQ97-AWw.js → index-BaXVr8ux.js} +36 -9
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/package.json +3 -0
- package/dist/cjs/v4-_2BfiRUa.js +52 -0
- package/dist/cjs/xpl-accordion.cjs.entry.js +3 -3
- package/dist/cjs/xpl-application-shell.cjs.entry.js +2 -2
- package/dist/cjs/xpl-avatar_54.cjs.entry.js +709 -177
- package/dist/cjs/xpl-button-row.cjs.entry.js +2 -2
- package/dist/cjs/xpl-calendar.cjs.entry.js +3 -3
- package/dist/cjs/xpl-dynamic-table-cell.cjs.entry.js +3 -3
- package/dist/cjs/xpl-dynamic-table-row.cjs.entry.js +3 -3
- package/dist/cjs/xpl-dynamic-table.cjs.entry.js +2 -2
- package/dist/cjs/xpl-grid-item.cjs.entry.js +2 -2
- package/dist/cjs/xpl-grid.cjs.entry.js +2 -2
- package/dist/cjs/xpl-large-card.cjs.entry.js +2 -2
- package/dist/cjs/xpl-main-nav.cjs.entry.js +2 -2
- package/dist/cjs/xpl-table-header-cell.cjs.entry.js +1 -1
- package/dist/cjs/xpl-table-header.cjs.entry.js +2 -2
- package/dist/cjs/xpl-toggle.cjs.entry.js +5 -5
- package/dist/cjs/xpl-toolbar.cjs.entry.js +3 -3
- package/dist/collection/collection-manifest.json +5 -5
- 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-avatar/xpl-avatar.js +4 -4
- package/dist/collection/components/xpl-backdrop/xpl-backdrop.js +1 -1
- package/dist/collection/components/xpl-badge/xpl-badge.js +2 -2
- 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 +16 -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 +11 -9
- 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 +5 -5
- 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 +16 -6
- 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 +4 -4
- package/dist/collection/components/xpl-toast/xpl-toast.js +2 -2
- package/dist/collection/components/xpl-toggle/xpl-toggle.js +3 -3
- package/dist/collection/components/xpl-toolbar/xpl-toolbar.js +2 -2
- package/dist/collection/components/xpl-tooltip/tooltip-arrow.js +1 -1
- package/dist/collection/components/xpl-tooltip/tooltip.stories.js +6 -37
- package/dist/collection/components/xpl-tooltip/xpl-tooltip.js +1 -1
- package/dist/collection/components/xpl-top-nav/xpl-nav-header-menu/xpl-nav-header-menu.js +2 -2
- package/dist/collection/components/xpl-top-nav/xpl-top-nav-item/xpl-top-nav-item.js +2 -2
- package/dist/collection/components/xpl-top-nav/xpl-top-nav.js +5 -5
- package/dist/collection/components/xpl-utility-bar/xpl-utility-bar.js +1 -1
- package/dist/components/index.d.ts +141 -12
- package/dist/components/index.js +1 -1
- package/dist/components/p-3qMYyqTe.js +1 -0
- package/dist/components/p-B1PBAEzg.js +1 -0
- package/dist/components/p-BG0-6Xek.js +1 -0
- package/dist/components/p-BT_Lq3Vd.js +1 -0
- package/dist/components/p-BWyAzrwu.js +1 -0
- package/dist/components/p-B_Wi--Ov.js +1 -0
- package/dist/components/p-Bd6JweBt.js +1 -0
- package/dist/components/p-Bn-27-xj.js +1 -0
- package/dist/components/{xpl-top-nav-item2.js → p-Bs6vq0C6.js} +1 -1
- package/dist/components/{xpl-input-file2.js → p-C9BO2vL-.js} +1 -1
- package/dist/components/p-CFW_w5Wj.js +1 -0
- package/dist/components/{floating-ui.dom.js → p-CFpsSZyr.js} +1 -1
- package/dist/components/p-CGNq3DyC.js +1 -0
- package/dist/components/p-CK3_k8jD.js +1 -0
- package/dist/components/p-CVqbA9op.js +1 -0
- package/dist/components/p-CtIUusUL.js +1 -0
- package/dist/components/p-CzwViN3U.js +1 -0
- package/dist/components/p-D97c0GjM.js +1 -0
- package/dist/components/p-DBWV65V-.js +1 -0
- package/dist/components/{xpl-tag2.js → p-DEl4Rvzs.js} +1 -1
- package/dist/components/p-DPTHmitJ.js +1 -0
- package/dist/components/{xpl-input-search2.js → p-DllC7F-H.js} +1 -1
- package/dist/components/p-Ds28UyUR.js +1 -0
- package/dist/components/p-U5dPMCXE.js +1 -0
- package/dist/components/p-hPUzON4O.js +1 -0
- package/dist/components/p-kPHfCq1d.js +1 -0
- package/dist/components/xpl-accordion.js +1 -1
- package/dist/components/xpl-application-shell.js +1 -1
- package/dist/components/xpl-avatar.js +1 -1
- package/dist/components/xpl-backdrop.js +1 -1
- package/dist/components/xpl-badge.js +1 -1
- package/dist/components/xpl-banner.js +1 -1
- package/dist/components/xpl-breadcrumb-item.js +1 -1
- package/dist/components/xpl-breadcrumbs.js +1 -1
- package/dist/components/xpl-button-row.js +1 -1
- package/dist/components/xpl-button.js +1 -1
- package/dist/components/xpl-calendar.js +1 -1
- package/dist/components/xpl-checkbox.js +1 -1
- package/dist/components/xpl-choicelist.js +1 -1
- package/dist/components/xpl-content-area.js +1 -1
- package/dist/components/xpl-dashboard.js +1 -1
- package/dist/components/xpl-data-card.js +1 -1
- package/dist/components/xpl-divider.js +1 -1
- package/dist/components/xpl-dropdown-group.js +1 -1
- package/dist/components/xpl-dropdown-heading.js +1 -1
- package/dist/components/xpl-dropdown-option.js +1 -1
- package/dist/components/xpl-dropdown.js +1 -1
- package/dist/components/xpl-dynamic-table-cell.js +1 -1
- package/dist/components/xpl-dynamic-table-row.js +1 -1
- package/dist/components/xpl-dynamic-table.js +1 -1
- package/dist/components/xpl-grid-item.js +1 -1
- package/dist/components/xpl-grid.js +1 -1
- package/dist/components/xpl-header-accordion.js +1 -1
- package/dist/components/xpl-icon.js +1 -1
- package/dist/components/xpl-input-color.js +1 -1
- package/dist/components/xpl-input-date.js +1 -1
- package/dist/components/xpl-input-file.js +1 -1
- package/dist/components/xpl-input-phone.js +1 -1
- package/dist/components/xpl-input-search.js +1 -1
- package/dist/components/xpl-input-time.js +1 -1
- package/dist/components/xpl-input.js +1 -1
- package/dist/components/xpl-large-card.js +1 -1
- package/dist/components/xpl-list-item.js +1 -1
- package/dist/components/xpl-list.js +1 -1
- package/dist/components/xpl-main-nav.js +1 -1
- package/dist/components/xpl-modal.js +1 -1
- package/dist/components/xpl-nav-header-menu.js +1 -1
- package/dist/components/xpl-nav-item.js +1 -1
- package/dist/components/xpl-pagination.js +1 -1
- package/dist/components/xpl-panel.js +1 -1
- package/dist/components/xpl-popover.js +1 -1
- package/dist/components/xpl-progress-bar.js +1 -1
- package/dist/components/xpl-progress-indicator.js +1 -1
- package/dist/components/xpl-radio.js +1 -1
- package/dist/components/xpl-secondary-nav.js +1 -1
- package/dist/components/xpl-select.js +1 -1
- package/dist/components/xpl-side-nav-item.js +1 -1
- package/dist/components/xpl-side-nav.js +1 -1
- package/dist/components/xpl-skeleton.js +1 -1
- package/dist/components/xpl-slideout.js +1 -1
- package/dist/components/xpl-spotlight.js +1 -1
- package/dist/components/xpl-tab-panel.js +1 -1
- package/dist/components/xpl-tab.js +1 -1
- package/dist/components/xpl-table-header-cell.js +1 -1
- package/dist/components/xpl-table-header.js +1 -1
- package/dist/components/xpl-table.js +1 -1
- package/dist/components/xpl-tabs.js +1 -1
- package/dist/components/xpl-tag.js +1 -1
- package/dist/components/xpl-toast.js +1 -1
- package/dist/components/xpl-toggle.js +1 -1
- package/dist/components/xpl-toolbar.js +1 -1
- package/dist/components/xpl-tooltip.js +1 -1
- package/dist/components/xpl-top-nav-item.js +1 -1
- package/dist/components/xpl-top-nav.js +1 -1
- package/dist/components/xpl-utility-bar.js +1 -1
- package/dist/docs/xpl-backdrop/readme.md +2 -0
- package/dist/docs/xpl-badge/readme.md +34 -0
- package/dist/docs/xpl-button/readme.md +2 -0
- package/dist/docs/xpl-button-row/readme.md +13 -0
- package/dist/docs/xpl-checkbox/readme.md +23 -1
- package/dist/docs/xpl-divider/readme.md +22 -4
- package/dist/docs/xpl-input/readme.md +51 -0
- package/dist/docs/xpl-input/xpl-input-date/readme.md +7 -0
- package/dist/docs/xpl-input/xpl-input-phone/readme.md +21 -0
- package/dist/docs/xpl-popover/readme.md +24 -0
- package/dist/docs/xpl-radio/readme.md +21 -4
- package/dist/docs/xpl-side-nav/readme.md +153 -5
- package/dist/docs/xpl-side-nav/xpl-side-nav-item/readme.md +165 -32
- package/dist/docs/xpl-table/readme.md +2 -0
- package/dist/docs/xpl-tooltip/readme.md +29 -1
- package/dist/esm/apollo-core.js +4 -4
- package/dist/esm/{index-C7bgJs6C.js → index-CXkZUm1c.js} +36 -9
- package/dist/esm/loader.js +3 -3
- package/dist/esm/v4-CK3_k8jD.js +50 -0
- package/dist/esm/xpl-accordion.entry.js +3 -3
- package/dist/esm/xpl-application-shell.entry.js +2 -2
- package/dist/esm/xpl-avatar_54.entry.js +709 -177
- package/dist/esm/xpl-button-row.entry.js +2 -2
- package/dist/esm/xpl-calendar.entry.js +3 -3
- package/dist/esm/xpl-dynamic-table-cell.entry.js +3 -3
- package/dist/esm/xpl-dynamic-table-row.entry.js +3 -3
- package/dist/esm/xpl-dynamic-table.entry.js +2 -2
- package/dist/esm/xpl-grid-item.entry.js +2 -2
- package/dist/esm/xpl-grid.entry.js +2 -2
- package/dist/esm/xpl-large-card.entry.js +2 -2
- package/dist/esm/xpl-main-nav.entry.js +2 -2
- package/dist/esm/xpl-table-header-cell.entry.js +1 -1
- package/dist/esm/xpl-table-header.entry.js +2 -2
- package/dist/esm/xpl-toggle.entry.js +5 -5
- package/dist/esm/xpl-toolbar.entry.js +3 -3
- package/dist/types/components/xpl-banner/banner.stories.d.ts +2 -0
- package/dist/types/components/xpl-button/button.stories.d.ts +2 -0
- package/dist/types/components/xpl-button/xpl-button.d.ts +1 -0
- package/dist/types/components/xpl-dropdown/xpl-dropdown.d.ts +16 -0
- package/dist/types/components/xpl-input/xpl-input-phone/xpl-input-phone.d.ts +1 -0
- package/dist/types/components/xpl-pagination/xpl-pagination.d.ts +4 -0
- package/dist/types/components/xpl-radio/radio.stories.d.ts +11 -10
- package/dist/types/components/xpl-side-nav/side-nav-constants.d.ts +2 -0
- package/dist/types/components/xpl-side-nav/side-nav.stories.d.ts +53 -32
- package/dist/types/components/xpl-side-nav/xpl-side-nav-item/xpl-side-nav-item.d.ts +10 -0
- package/dist/types/components/xpl-side-nav/xpl-side-nav.d.ts +31 -0
- package/dist/types/components/xpl-spotlight/xpl-spotlight.d.ts +1 -0
- package/dist/types/components.d.ts +223 -20
- package/dist/types/stencil-public-runtime.d.ts +1 -0
- package/package.json +39 -38
- package/dist/apollo-core/p-0bf50890.entry.js +0 -1
- package/dist/apollo-core/p-1947e7a8.entry.js +0 -1
- package/dist/apollo-core/p-27928cb0.entry.js +0 -1
- package/dist/apollo-core/p-34438721.entry.js +0 -1
- package/dist/apollo-core/p-35c2f72d.entry.js +0 -1
- package/dist/apollo-core/p-368c81f1.entry.js +0 -1
- package/dist/apollo-core/p-406b27a8.entry.js +0 -1
- package/dist/apollo-core/p-5d63b4ce.entry.js +0 -1
- package/dist/apollo-core/p-689f1dae.entry.js +0 -1
- package/dist/apollo-core/p-8d692d05.entry.js +0 -1
- package/dist/apollo-core/p-C7bgJs6C.js +0 -2
- package/dist/apollo-core/p-Cqlsd6nf.js +0 -1
- package/dist/apollo-core/p-cd56a3d5.entry.js +0 -1
- package/dist/apollo-core/p-dc205893.entry.js +0 -1
- package/dist/cjs/v4-D4KzFnn8.js +0 -67
- package/dist/components/index3.js +0 -1
- package/dist/components/v4.js +0 -1
- package/dist/components/xpl-avatar2.js +0 -1
- package/dist/components/xpl-backdrop2.js +0 -1
- package/dist/components/xpl-badge2.js +0 -1
- package/dist/components/xpl-button2.js +0 -1
- package/dist/components/xpl-checkbox2.js +0 -1
- package/dist/components/xpl-divider2.js +0 -1
- package/dist/components/xpl-dropdown-group2.js +0 -1
- package/dist/components/xpl-dropdown-heading2.js +0 -1
- package/dist/components/xpl-dropdown-option2.js +0 -1
- package/dist/components/xpl-dropdown2.js +0 -1
- package/dist/components/xpl-icon2.js +0 -1
- package/dist/components/xpl-input-date2.js +0 -1
- package/dist/components/xpl-input2.js +0 -1
- package/dist/components/xpl-list-item2.js +0 -1
- package/dist/components/xpl-popover2.js +0 -1
- package/dist/components/xpl-radio2.js +0 -1
- package/dist/components/xpl-select2.js +0 -1
- package/dist/components/xpl-tooltip2.js +0 -1
- package/dist/esm/v4-Cqlsd6nf.js +0 -65
- /package/dist/components/{_commonjsHelpers.js → p-BFTU3MAI.js} +0 -0
- /package/dist/components/{index2.js → p-CH4yJ6Qx.js} +0 -0
- /package/dist/components/{tab-a11y-ids.js → p-Yj_QFaRn.js} +0 -0
- /package/dist/{index.cjs.js → index.cjs} +0 -0
- /package/dist/types/{Users/roc/Sites → home/runner/work/apollo}/apollo/packages/apollo-core/.stencil/css/typography.stories.d.ts +0 -0
- /package/loader/{cdn.js → cdn.cjs} +0 -0
- /package/loader/{index.cjs.js → index.cjs} +0 -0
|
@@ -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: 'b2a2b4630df394470daa56346215ad1193727557', 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: 'd2329582e74d40946d23ae522b40130b1d780522', 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: '9ae6e297af2b7cf5b40ae9848a1479d6e87b6a3e' }, h("main", { key: '2ca4359f4090262b7186689207b4725883e5378e', class: `xpl-content-area-wrapper xpl-content-area-wrapper__${this.size}` }, h("div", { key: '6e4e1e2947eb4e7e8d5d9201b48074cd9cb102ed', class: "xpl-content-area" }, h("slot", { key: 'bf8de84eb947b3ce40fd5df93169f382d3a896cf' })))));
|
|
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: 'e3736f9e707de77addac539a4e7f0950133d0e08' }, h("dl", { key: 'de1add10d2f37c0a541d2f60f7156cf920eabd69', class: "xpl-dashboard" }, h("slot", { key: 'acd2becab0a555bf2599d0b2db4ebe0c9d744744' }))));
|
|
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: '6220a2a6ba1ac0744ba62e701c015964c05bdea9', role: "group", class: `xpl-data-card ${this.link ? 'xpl-data-card__link' : ''}`, tabindex: "0" }, h("dt", { key: '44da16abf81bc72a9c777f19d7c22ab998f55e94', class: headerClasses }, h("header", { key: '4ac3524629d31f3e74a245eef3e4ed6fc3a6832a' }, !!this.leadingIcon && this.icon && (h("span", { key: '53f7476c16eee3432e43a6bdebf744caeb9f9829', class: `xpl-data-card__icon--${this.variant}` }, h("xpl-icon", { key: 'af9ed04389ba00e4d0c79f978c1364a0530b1db7', icon: this.icon, "background-color": bgColorHue, size: 20 }))), h("slot", { key: '164396b94252374a1978cadf336ca74685fe9ba4', name: "title" }, this.name)), this.link && (h("span", { key: '31ce9874f295b1fef5705a28d81365d66a67a18b', class: "xpl-data-card__header-arrow" }, h("xpl-icon", { key: 'f5d169eeb150ed2eaa663ca1388e1075e61f6b7b', icon: "chevron-right", size: 16 })))), h("dd", { key: '59711740ae613b61ab5ae463cbfc2aaed500fdc9', class: "xpl-data-card__body" }, h("div", { key: '35571a65469ba1c413114a50233340057f5df200', class: "xpl-data-card__left" }, h("span", { key: 'b1409661fc43dea4126e423d5dc74fe4b0a5ef5f', 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: '634b386799ed06de06ca212005d20e6f79c54124', class: "xpl-data-card__detail" }, this.detail)), hasContentSlot && (h("div", { key: '9e88749b9c2efd65d22ec92881eaf316103ddb97', class: "xpl-data-card__right" }, h("slot", { key: '467388943d1c8a6bbfb334e6ab763dc7e92e59c8', 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: '8b6563d7c6c85814d5dc0527246c90eea82c0dbd', class: className }, h("span", { key: '2935de22e9c70183386b5f6e1e18ff6437a42a41' }, h("slot", { key: '10e4e4c5c861647302217f78af0a369ad330c410' }))));
|
|
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: 'a33169d78e635bb53987322f02869ffc1f1a9908', role: "group", "aria-label": groupName }, h("li", { key: '58a1ff78bb923fec60eb51ef05a2026e03e3058b', class: "xpl-dropdown-list-item" }, h("xpl-dropdown-heading", { key: '6d8556e1d96cbfccd61038e5089e9669917b919e', label: groupName }), h("ul", { key: 'dd485e18b79920d9992e506fe83b36fcadb9e020', class: "xpl-dropdown-list" }, mappedOptions || h("slot", { key: '2eca2f6aa7c44aacdb67c3658029822b4ba1c0aa', 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: '9b05e54ae226524434ac8485c51e7fccd4e5fe9e', class: { 'xpl-dropdown-heading': true }, role: "presentation" }, h("span", { key: 'c5ada81fbed76834515cff75f1fd1ce87b2ccbe3' }, this.label || h("slot", { key: 'dfe135bf2499e858e75ab1e87793ae75eb0982c6', 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: '4ff7cc350e34059ad4df757b88112756c7f5b83e', 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: 'a014d09116703f5477a48cace194ba1beef602d5', class: "xpl-dropdown-list-item" }, icon && (h("xpl-icon", { key: 'af16591b7f1195351facaafa67c07368ce42d072', class: "xpl-dropdown-list-item__icon", icon: icon, size: 20 })), label || h("slot", { key: '72c0dbd67ab7930924cb1ef3ee9f0b4b53cf28a6', name: "option" }), subtitle && h("span", { key: '0893e031740ebdd8fc8ca7de2cb10d0b4d7c95ae', 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: '859e13193ab2db2f10197aaf8b9699a177d480c6', 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: '2e197eebf453591ec714ebbc60a6c8ba57646cb9', 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: '0ffdb0e5d1dc13c83b692244f8e5e65f70c9c745', "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: 'ff204bc8c903a5d0a47b95521781df2467c9b4a7', name: "header" }), h("ul", { key: '2685e64254a9424f9da75787c3d18ff182e9f7a1', 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: '3d5c3e5aea065c98323fbdbf17392af63975c9dd', role: "grid", class: "xpl-dynamic-table", "aria-colcount": this.colCount }, h("slot", { key: 'f6076fef5e85fdf22b03e532e920396ce5f6ce63', name: "header" }), h("slot", { key: '3b94b04b8f6b7a1cca9277161c0c32b117ce315f', 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: 'e6e9a3695c9d8ca3743b188284bc8e69f50f3397', 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: 'abfa632a3ac88d663acaaacbc431d07c9da4b375' })));
|
|
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: 'e070f32db6cee0bcbf0dd84e41e13e6d3b88e8a1', role: "row", class: classList, ref: (el) => {
|
|
28
28
|
this.hostElement = el;
|
|
29
|
-
} }, h("slot", { key: '
|
|
29
|
+
} }, h("slot", { key: '78ea8e02e97e0017dc4aa35af4883446d4e4c4bf' })));
|
|
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: '0036b594c89e75a9b302e7a7d9c99d4703a8b729', 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: 'bb28d83b6fd6ee92390ffcb5a505f5084f5624b9', class: className }, h("slot", { key: 'db3cf487db67044879425c830a14a44e06d19414' })));
|
|
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: 'ec426d05bbf030c8e782e7e74fda505bc8b9011a', class: "xpl-header-accordion" }, h("div", { key: 'b9da9063757f65ab682f542dd138f3f8f8dc471f', class: `header-accordion header-accordion--${this.expanded ? 'expanded' : 'collapsed'}` }, this.hasCheckbox && (h("xpl-checkbox", { key: '8b97b3e36f49549dcd18978628bfde93f75a084e', class: "xpl-header-accordion__parent-checkbox", checked: this.parentChecked, disabled: this.disabled, indeterminate: this.parentIndeterminate, onCheckboxChange: (event) => this.handleParentCheckboxChange(event.detail) })), h("button", { key: '7bdf4043d478bb1c04f44de14717ac3753236e1a', "aria-expanded": this.expanded, "aria-controls": this.contentId, class: "toggle-area", onClick: this.toggleAccordion, type: "button" }, h("slot", { key: '0a6197fd9b5dabff14f1da4137d8a99c7a4cbc93', name: "title" }), h("xpl-icon", { key: '5a74ba13feb88a46df377f255eb134d5b609be53', size: 16, icon: "chevron-down", class: this.expanded && 'rotate' }))), h("div", { key: '8d048d3480f0185ed34440c3e6d84befb3cf4dee', id: this.contentId, role: "region", class: !this.expanded ? 'content--hidden' : 'content--shown' }, h("slot", { key: 'fa374cd9feba5ef3eb72d50f027651dc84f80ec8', 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: 'cf84ae3e7ff4ae0b4ae8e1b1cf3b9331bc887c6c' }, h("figure", { key: '74e2727f9bf4ff8d710eff9b99632ffa669b84ae', class: wrapperClasses }, h("span", { key: '2d8be2bd318bd27e0bc4299cfe518668e424fffe', "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: '3c7a383da59ac0766500273799b203a28c7c7ff3' }, this.icon, " icon"))));
|
|
23
23
|
}
|
|
24
24
|
static get is() { return "xpl-icon"; }
|
|
25
25
|
static get originalStyleUrls() {
|
|
@@ -61,7 +61,7 @@ export class InputColor {
|
|
|
61
61
|
};
|
|
62
62
|
this.onHexInputChange = (event) => {
|
|
63
63
|
var _a;
|
|
64
|
-
const hex = event.detail;
|
|
64
|
+
const hex = event.detail ? event.detail.trim().replace(/#/g, '') : '';
|
|
65
65
|
if (hex) {
|
|
66
66
|
const [r, g, b] = hexToRgb(hex);
|
|
67
67
|
this.colorValues = {
|
|
@@ -162,10 +162,12 @@ export class InputColor {
|
|
|
162
162
|
const { r, g, b, a, hue, alpha, hex } = this.colorInputElements;
|
|
163
163
|
hex.addEventListener('valueChange', (e) => {
|
|
164
164
|
this.onHexInputChange(e);
|
|
165
|
+
e.stopPropagation();
|
|
165
166
|
});
|
|
166
167
|
[r, g, b, a].forEach((el) => {
|
|
167
168
|
el.addEventListener('valueChange', (e) => {
|
|
168
169
|
this.onRgbaInputChange(el, e);
|
|
170
|
+
e.stopPropagation();
|
|
169
171
|
});
|
|
170
172
|
});
|
|
171
173
|
[hue, alpha].forEach((el) => {
|
|
@@ -193,16 +195,16 @@ export class InputColor {
|
|
|
193
195
|
top: `${y}px`,
|
|
194
196
|
background: `rgb(${r}, ${g}, ${b})`,
|
|
195
197
|
};
|
|
196
|
-
return (h(Host, { key: '
|
|
198
|
+
return (h(Host, { key: 'eb7a6f1f77a5d184c05a7825f9f20829b8112d49', class: "xpl-input-color" }, h("xpl-popover", { key: '5f1588d21649cbbdfcadb0ab2bd46f848c7fc2d8', disabled: this.disabled, display: "menu" }, h("div", { key: 'cecec4d250e2c3b26fc364436f2d16fb97162dff', slot: "trigger" }, h("div", { key: '02a4945abec58618cb116eb04bca1c4672f16a4f', class: {
|
|
197
199
|
'xpl-input-color__display': true,
|
|
198
200
|
'xpl-input-color__display--disabled': this.disabled,
|
|
199
201
|
'xpl-input-color__display--error': !!this.hasErrorState,
|
|
200
|
-
} }, h("span", { key: '
|
|
202
|
+
} }, h("span", { key: '622be07c8fe6de7c5d714a8961146ff53160247d', class: "xpl-input-color__color", style: {
|
|
201
203
|
background: objectToStringColor(this.colorValues),
|
|
202
|
-
} }), 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: 'fd14c6b7aad4e33977008cf11b5cbff2352aab80', size: 20, icon: "eye-dropper", class: "xpl-input-color__icon", onClick: (e) => {
|
|
203
205
|
e.stopPropagation();
|
|
204
206
|
this.openEyeDropper();
|
|
205
|
-
} })))), h("div", { key: '
|
|
207
|
+
} })))), h("div", { key: 'ad85b32a641a3bf0face2efa81fe14de17777fdf', class: "xpl-input-color__menu" }, h("div", { key: 'caaee0b4bf18c0c3dbc72745167df475b0cc91cc', class: "xpl-input-color__sl-grid", ref: (el) => {
|
|
206
208
|
this.colorInputElements.slGrid = el;
|
|
207
209
|
}, style: {
|
|
208
210
|
background: [
|
|
@@ -210,9 +212,9 @@ export class InputColor {
|
|
|
210
212
|
`linear-gradient(to right, #fff, #fff0)`,
|
|
211
213
|
`rgb(${hueBaseColor.r} ${hueBaseColor.g} ${hueBaseColor.b})`,
|
|
212
214
|
].join(', '),
|
|
213
|
-
}, onMouseDown: this.startDrag, onTouchStart: this.startDrag }, h("div", { key: '
|
|
215
|
+
}, onMouseDown: this.startDrag, onTouchStart: this.startDrag }, h("div", { key: '34867bf1cbca3e4d56552e02ba99a112c061be64', class: "xpl-input-color__sl-thumb", style: slThumbStyle })), h("div", { key: '3070aa4d152d18944a7942dc7298538be432fb2c', class: "xpl-input-color__grid" }, h("input", { key: '557445a1167af6ebfb786fbe390b63167ac0c2bf', type: "range", min: "0", max: "360", value: this.hue, class: "xpl-input-color__slider xpl-input-color__hue", name: "color-hue-slider", ref: (el) => {
|
|
214
216
|
this.colorInputElements.hue = el;
|
|
215
|
-
} }), h("input", { key: '
|
|
217
|
+
} }), h("input", { key: '86cabdd053207c6073592b46a85fe74ca74942fb', 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) => {
|
|
216
218
|
this.colorInputElements.alpha = el;
|
|
217
219
|
}, style: {
|
|
218
220
|
backgroundImage: [
|
|
@@ -222,9 +224,9 @@ export class InputColor {
|
|
|
222
224
|
`linear-gradient(45deg, transparent 75%, #ccc 75%)`,
|
|
223
225
|
`linear-gradient(-45deg, transparent 75%, #ccc 75%)`,
|
|
224
226
|
].join(', '),
|
|
225
|
-
} }), h("div", { key: '
|
|
227
|
+
} }), h("div", { key: 'bb9ee49e36d78441380248bdb021443f9abbb250', class: "xpl-input-color__preview", style: {
|
|
226
228
|
background: `rgba(${r}, ${g}, ${b}, ${a})`,
|
|
227
|
-
} })), h("div", { key: '
|
|
229
|
+
} })), h("div", { key: '08bc820781d2de091036289b50f9f5f3810db61b', class: "xpl-input-color__inputs" }, Object.entries(this.colorInputElements)
|
|
228
230
|
.filter(([key]) => ['hex', 'r', 'g', 'b', 'a'].includes(key))
|
|
229
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) => {
|
|
230
232
|
this.colorInputElements[key] = elRef;
|