@xplortech/apollo-core 2.6.0 → 2.7.1
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 +626 -35
- package/build/style.css +5949 -3070
- package/dist/apollo-core/apollo-core.css +29 -19
- package/dist/apollo-core/apollo-core.esm.js +1 -1
- package/dist/apollo-core/p-0bf50890.entry.js +1 -0
- package/dist/apollo-core/p-1947e7a8.entry.js +1 -0
- package/dist/apollo-core/p-27928cb0.entry.js +1 -0
- package/dist/apollo-core/{p-5549756c.entry.js → p-34438721.entry.js} +1 -1
- package/dist/apollo-core/p-35c2f72d.entry.js +1 -0
- package/dist/apollo-core/p-368c81f1.entry.js +1 -0
- package/dist/apollo-core/{p-f5af9539.entry.js → p-36ba29da.entry.js} +1 -1
- package/dist/apollo-core/p-406b27a8.entry.js +1 -0
- package/dist/apollo-core/p-5d63b4ce.entry.js +1 -0
- package/dist/apollo-core/{p-02167464.entry.js → p-6a15f1e0.entry.js} +1 -1
- package/dist/apollo-core/p-8d692d05.entry.js +1 -0
- package/dist/apollo-core/{p-C_Z2nG0p.js → p-C7bgJs6C.js} +2 -2
- package/dist/apollo-core/{p-42016063.entry.js → p-b61d7952.entry.js} +1 -1
- package/dist/apollo-core/{p-8a1affce.entry.js → p-ca127ee8.entry.js} +1 -1
- package/dist/apollo-core/p-d1c9c233.entry.js +1 -0
- package/dist/apollo-core/p-dc205893.entry.js +1 -0
- package/dist/apollo-core/p-e2a5d41c.entry.js +1 -0
- package/dist/cjs/apollo-core.cjs.js +3 -3
- package/dist/cjs/{index-DH6pgWru.js → index-BQ97-AWw.js} +18 -7
- package/dist/cjs/loader.cjs.js +2 -2
- 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_47.cjs.entry.js → xpl-avatar_54.cjs.entry.js} +3726 -536
- package/dist/cjs/xpl-button-row.cjs.entry.js +2 -2
- package/dist/cjs/xpl-calendar.cjs.entry.js +2 -2
- 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 +4 -4
- package/dist/cjs/xpl-toolbar.cjs.entry.js +3 -3
- package/dist/collection/collection-manifest.json +11 -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/avatar.stories.js +122 -107
- package/dist/collection/components/xpl-avatar/xpl-avatar.js +249 -15
- package/dist/collection/components/xpl-backdrop/xpl-backdrop.js +1 -1
- package/dist/collection/components/xpl-badge/badge.stories.js +1 -33
- package/dist/collection/components/xpl-badge/xpl-badge.js +1 -1
- package/dist/collection/components/xpl-banner/xpl-banner.js +4 -3
- package/dist/collection/components/xpl-breadcrumbs/xpl-breadcrumb-item/xpl-breadcrumb-item.js +1 -1
- package/dist/collection/components/xpl-breadcrumbs/xpl-breadcrumbs/xpl-breadcrumbs.js +1 -1
- package/dist/collection/components/xpl-button/xpl-button.js +21 -3
- 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 +25 -3
- package/dist/collection/components/xpl-choicelist/xpl-choicelist.js +1 -1
- package/dist/collection/components/xpl-content-area/xpl-content-area.js +1 -1
- package/dist/collection/components/xpl-dashboard/xpl-dashboard.js +1 -1
- package/dist/collection/components/xpl-data-card/xpl-data-card.js +2 -2
- package/dist/collection/components/xpl-divider/xpl-divider.js +1 -1
- package/dist/collection/components/xpl-dropdown/xpl-dropdown-group/xpl-dropdown-group.js +1 -1
- package/dist/collection/components/xpl-dropdown/xpl-dropdown-heading/xpl-dropdown-heading.js +1 -1
- package/dist/collection/components/xpl-dropdown/xpl-dropdown-option/xpl-dropdown-option.js +2 -2
- package/dist/collection/components/xpl-dropdown/xpl-dropdown.js +77 -7
- 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 +96 -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 +5 -5
- package/dist/collection/components/xpl-input/xpl-input-search/xpl-input-search.js +485 -0
- package/dist/collection/components/xpl-input/xpl-input-time/xpl-input-time.js +2 -2
- package/dist/collection/components/xpl-input/xpl-input.js +130 -18
- package/dist/collection/components/xpl-large-card/xpl-large-card.js +1 -1
- package/dist/collection/components/xpl-list/list.stories.js +300 -63
- package/dist/collection/components/xpl-list/xpl-list-item/xpl-list-item.js +818 -0
- package/dist/collection/components/xpl-list/xpl-list.js +579 -21
- package/dist/collection/components/xpl-main-nav/xpl-main-nav.js +1 -1
- package/dist/collection/components/xpl-modal/xpl-modal.js +1 -1
- package/dist/collection/components/xpl-nav-item/xpl-nav-item.js +2 -2
- package/dist/collection/components/xpl-pagination/pagination.stories.js +18 -0
- package/dist/collection/components/xpl-pagination/xpl-pagination.js +7 -3
- package/dist/collection/components/xpl-panel/panel.stories.js +5 -3
- package/dist/collection/components/xpl-panel/xpl-panel.js +3 -3
- 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/progress-indicator.stories.js +118 -0
- package/dist/collection/components/xpl-progress-indicator/xpl-progress-indicator.js +171 -0
- 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 +58 -6
- package/dist/collection/components/xpl-side-nav/xpl-side-nav-item/xpl-side-nav-item.js +2 -2
- package/dist/collection/components/xpl-side-nav/xpl-side-nav.js +2 -2
- 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/spotlight.stories.js +385 -0
- package/dist/collection/components/xpl-spotlight/xpl-spotlight.js +1085 -0
- package/dist/collection/components/xpl-tab/xpl-tab.js +261 -8
- package/dist/collection/components/xpl-tab-panel/xpl-tab-panel.js +22 -15
- package/dist/collection/components/xpl-table/xpl-table.js +5 -5
- package/dist/collection/components/xpl-table-header/xpl-table-header.js +1 -1
- package/dist/collection/components/xpl-tabs/segment-control.stories.js +31 -0
- package/dist/collection/components/xpl-tabs/tabs.shared.js +156 -0
- package/dist/collection/components/xpl-tabs/tabs.stories.js +10 -60
- package/dist/collection/components/xpl-tabs/xpl-tabs.js +338 -62
- package/dist/collection/components/xpl-tag/tag.stories.js +153 -0
- package/dist/collection/components/xpl-tag/xpl-tag.js +312 -9
- 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/xpl-tooltip.js +1 -1
- package/dist/collection/components/xpl-top-nav/top-nav.stories.js +625 -0
- package/dist/collection/components/xpl-top-nav/xpl-nav-header-menu/xpl-nav-header-menu.js +122 -0
- package/dist/collection/components/xpl-top-nav/xpl-top-nav-item/xpl-top-nav-item.js +481 -0
- package/dist/collection/components/xpl-top-nav/xpl-top-nav.js +433 -0
- package/dist/collection/components/xpl-utility-bar/xpl-utility-bar.js +1 -1
- package/dist/collection/utils/lifecycle.js +79 -0
- package/dist/collection/utils/tab-a11y-ids.js +22 -0
- package/dist/components/floating-ui.dom.js +1 -0
- package/dist/components/index.js +1 -1
- package/dist/components/tab-a11y-ids.js +1 -0
- package/dist/components/xpl-accordion.js +1 -1
- package/dist/components/xpl-application-shell.js +1 -1
- package/dist/components/xpl-avatar2.js +1 -1
- package/dist/components/xpl-backdrop2.js +1 -1
- package/dist/components/xpl-badge2.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-button2.js +1 -1
- package/dist/components/xpl-calendar.js +1 -1
- package/dist/components/xpl-checkbox2.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-divider2.js +1 -1
- package/dist/components/xpl-dropdown-group2.js +1 -1
- package/dist/components/xpl-dropdown-heading2.js +1 -1
- package/dist/components/xpl-dropdown-option2.js +1 -1
- package/dist/components/xpl-dropdown2.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-icon2.js +1 -1
- package/dist/components/xpl-input-date2.js +1 -1
- package/dist/components/xpl-input-file2.js +1 -1
- package/dist/components/xpl-input-search.d.ts +11 -0
- package/dist/components/xpl-input-search.js +1 -0
- package/dist/components/xpl-input-search2.js +1 -0
- package/dist/components/xpl-input2.js +1 -1
- package/dist/components/xpl-large-card.js +1 -1
- package/dist/components/{xpl-progress.d.ts → xpl-list-item.d.ts} +4 -4
- package/dist/components/xpl-list-item.js +1 -0
- package/dist/components/xpl-list-item2.js +1 -0
- 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.d.ts +11 -0
- package/dist/components/xpl-nav-header-menu.js +1 -0
- 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-popover2.js +1 -1
- package/dist/components/xpl-progress-bar.js +1 -1
- package/dist/components/xpl-progress-indicator.d.ts +11 -0
- package/dist/components/xpl-progress-indicator.js +1 -0
- package/dist/components/xpl-radio2.js +1 -1
- package/dist/components/xpl-secondary-nav.js +1 -1
- package/dist/components/xpl-select2.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.d.ts +11 -0
- package/dist/components/xpl-spotlight.js +1 -0
- package/dist/components/xpl-tab-panel.js +1 -1
- package/dist/components/xpl-tab.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-tag2.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-tooltip2.js +1 -1
- package/dist/components/xpl-top-nav-item.d.ts +11 -0
- package/dist/components/xpl-top-nav-item.js +1 -0
- package/dist/components/xpl-top-nav-item2.js +1 -0
- package/dist/components/xpl-top-nav.d.ts +11 -0
- package/dist/components/xpl-top-nav.js +1 -0
- package/dist/components/xpl-utility-bar.js +1 -1
- package/dist/docs/xpl-avatar/readme.md +289 -15
- package/dist/docs/xpl-badge/readme.md +14 -9
- package/dist/docs/xpl-banner/readme.md +48 -11
- package/dist/docs/xpl-button/readme.md +28 -18
- package/dist/docs/xpl-calendar/readme.md +1 -1
- package/dist/docs/xpl-checkbox/readme.md +12 -11
- package/dist/docs/xpl-divider/readme.md +6 -4
- package/dist/docs/xpl-dropdown/readme.md +14 -12
- package/dist/docs/xpl-icon/readme.md +14 -2
- package/dist/docs/xpl-input/readme.md +66 -41
- package/dist/docs/xpl-input/xpl-input-color/readme.md +1 -0
- package/dist/docs/xpl-input/xpl-input-phone/readme.md +1 -0
- package/dist/docs/xpl-input/xpl-input-search/readme.md +175 -0
- package/dist/docs/xpl-input/xpl-input-time/readme.md +1 -0
- package/dist/docs/xpl-list/readme.md +320 -10
- package/dist/docs/xpl-list/xpl-list-item/readme.md +99 -0
- package/dist/docs/xpl-pagination/readme.md +1 -0
- package/dist/docs/xpl-panel/readme.md +108 -17
- package/dist/docs/xpl-popover/readme.md +2 -0
- package/dist/docs/xpl-progress-indicator/readme.md +234 -0
- package/dist/docs/xpl-radio/readme.md +6 -4
- package/dist/docs/xpl-select/readme.md +19 -16
- package/dist/docs/xpl-side-nav/readme.md +2 -2
- package/dist/docs/xpl-slideout/readme.md +1 -1
- package/dist/docs/xpl-spotlight/readme.md +235 -0
- package/dist/docs/xpl-tab/readme.md +43 -7
- package/dist/docs/xpl-tab-panel/readme.md +42 -0
- package/dist/docs/xpl-tabs/readme.md +62 -8
- package/dist/docs/xpl-tag/readme.md +379 -4
- package/dist/docs/xpl-toast/readme.md +1 -1
- package/dist/docs/xpl-top-nav/readme.md +179 -0
- package/dist/docs/xpl-top-nav/xpl-nav-header-menu/readme.md +81 -0
- package/dist/docs/xpl-top-nav/xpl-top-nav-item/readme.md +87 -0
- package/dist/esm/apollo-core.js +4 -4
- package/dist/esm/{index-C_Z2nG0p.js → index-C7bgJs6C.js} +18 -8
- package/dist/esm/loader.js +3 -3
- package/dist/esm/xpl-accordion.entry.js +3 -3
- package/dist/esm/xpl-application-shell.entry.js +2 -2
- package/dist/esm/{xpl-avatar_47.entry.js → xpl-avatar_54.entry.js} +3719 -536
- package/dist/esm/xpl-button-row.entry.js +2 -2
- package/dist/esm/xpl-calendar.entry.js +2 -2
- 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 +4 -4
- package/dist/esm/xpl-toolbar.entry.js +3 -3
- package/dist/types/components/xpl-avatar/avatar.stories.d.ts +88 -29
- package/dist/types/components/xpl-avatar/xpl-avatar.d.ts +29 -2
- package/dist/types/components/xpl-badge/badge.stories.d.ts +0 -19
- package/dist/types/components/xpl-button/xpl-button.d.ts +7 -0
- package/dist/types/components/xpl-checkbox/xpl-checkbox.d.ts +2 -1
- package/dist/types/components/xpl-dropdown/xpl-dropdown.d.ts +5 -0
- package/dist/types/components/xpl-input/input.stories.d.ts +1 -0
- package/dist/types/components/xpl-input/xpl-input-search/xpl-input-search.d.ts +39 -0
- package/dist/types/components/xpl-input/xpl-input.d.ts +13 -5
- package/dist/types/components/xpl-list/list.stories.d.ts +299 -13
- package/dist/types/components/xpl-list/listitem.d.ts +13 -0
- package/dist/types/components/xpl-list/xpl-list-item/xpl-list-item.d.ts +71 -0
- package/dist/types/components/xpl-list/xpl-list.d.ts +55 -2
- package/dist/types/components/xpl-pagination/pagination.stories.d.ts +13 -0
- package/dist/types/components/xpl-panel/panel.stories.d.ts +2 -0
- package/dist/types/components/xpl-progress-indicator/progress-indicator.stories.d.ts +62 -0
- package/dist/types/components/xpl-progress-indicator/xpl-progress-indicator.d.ts +11 -0
- package/dist/types/components/xpl-select/xpl-select.d.ts +3 -0
- package/dist/types/components/xpl-spotlight/spotlight.stories.d.ts +197 -0
- package/dist/types/components/xpl-spotlight/xpl-spotlight.d.ts +101 -0
- package/dist/types/components/xpl-tab/xpl-tab.d.ts +14 -1
- package/dist/types/components/xpl-tab-panel/xpl-tab-panel.d.ts +2 -1
- package/dist/types/components/xpl-tabs/segment-control.stories.d.ts +112 -0
- package/dist/types/components/xpl-tabs/tabs.shared.d.ts +156 -0
- package/dist/types/components/xpl-tabs/tabs.stories.d.ts +65 -12
- package/dist/types/components/xpl-tabs/xpl-tabs.d.ts +37 -18
- package/dist/types/components/xpl-tag/tag.stories.d.ts +65 -0
- package/dist/types/components/xpl-tag/xpl-tag.d.ts +36 -1
- package/dist/types/components/xpl-top-nav/top-nav.stories.d.ts +471 -0
- package/dist/types/components/xpl-top-nav/xpl-nav-header-menu/xpl-nav-header-menu.d.ts +18 -0
- package/dist/types/components/xpl-top-nav/xpl-top-nav-item/xpl-top-nav-item.d.ts +48 -0
- package/dist/types/components/xpl-top-nav/xpl-top-nav.d.ts +51 -0
- package/dist/types/components.d.ts +1521 -83
- package/dist/types/utils/lifecycle.d.ts +16 -0
- package/dist/types/utils/tab-a11y-ids.d.ts +4 -0
- package/package.json +12 -3
- package/dist/apollo-core/p-0bce3874.entry.js +0 -1
- package/dist/apollo-core/p-1fd3dc87.entry.js +0 -1
- package/dist/apollo-core/p-56fa4941.entry.js +0 -1
- package/dist/apollo-core/p-76c324da.entry.js +0 -1
- package/dist/apollo-core/p-7a3224b4.entry.js +0 -1
- package/dist/apollo-core/p-7e924697.entry.js +0 -1
- package/dist/apollo-core/p-9efca9e1.entry.js +0 -1
- package/dist/apollo-core/p-b252b380.entry.js +0 -1
- package/dist/apollo-core/p-c91daac1.entry.js +0 -1
- package/dist/apollo-core/p-d9b62508.entry.js +0 -1
- package/dist/apollo-core/p-eaea16d1.entry.js +0 -1
- package/dist/apollo-core/p-eed13bca.entry.js +0 -1
- package/dist/cjs/xpl-list.cjs.entry.js +0 -32
- package/dist/collection/components/xpl-progress/progress.stories.js +0 -106
- package/dist/collection/components/xpl-progress/xpl-progress.js +0 -60
- package/dist/components/xpl-progress.js +0 -1
- package/dist/docs/xpl-progress/readme.md +0 -22
- package/dist/esm/xpl-list.entry.js +0 -30
- package/dist/types/components/xpl-progress/progress.stories.d.ts +0 -38
- package/dist/types/components/xpl-progress/xpl-progress.d.ts +0 -6
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{proxyCustomElement as s,HTMLElement as t,h as e,Host as r,transformTag as i}from"@stencil/core/internal/client";import{d as o}from"./xpl-icon2.js";const c=s(class extends t{constructor(s){super(),!1!==s&&this.__registerHost(),this.currentStep=0,this.layout="horizontal",this.showLabels=!0,this.showNumbers=!0}validateCurrentStep(){if(!this.steps||0===this.steps.length)return;const s=this.steps.length;this.currentStep<0?this.currentStep=0:this.currentStep>s&&(this.currentStep=s)}renderStepContent(s,t){return t?e("xpl-icon",{icon:"check-2",size:20,class:"xpl-progress-indicator-step-checkmark"}):this.showNumbers?e("span",{class:"xpl-progress-indicator-step-number"},s+1):e("span",{class:"xpl-progress-indicator-step-dot"})}renderStep(s,t){const r=this.currentStep>t,i=this.currentStep===t,o="horizontal"===this.layout,c=e("div",{class:"xpl-progress-indicator-step-circle"},this.renderStepContent(t,r)),n=this.showLabels&&e("div",{class:"xpl-progress-indicator-step-text"},s),p=o?e("div",{class:"xpl-progress-indicator-step-content"},c,n):[c,n];return e("div",{class:{"xpl-progress-indicator-step":!0,"xpl-progress-indicator-step-active":i,"xpl-progress-indicator-step-finished":r},role:"listitem","aria-label":`${s}, ${r?"completed":i?"current":"upcoming"}`,"aria-current":i?"step":void 0},p)}render(){const s=this.steps||[],t=s.length;return e(r,{key:"3a6f253693fd47f982541099a1729ca36d0ce64a",class:{"xpl-progress-indicator":!0,"xpl-progress-indicator-horizontal":"horizontal"===this.layout,"xpl-progress-indicator-vertical":"vertical"===this.layout,"xpl-progress-indicator-no-labels":!this.showLabels},role:"group","aria-label":t>0?this.currentStep>=t?`Progress: all ${t} ${1===t?"step":"steps"} complete`:`Progress: step ${Math.min(this.currentStep+1,t)} of ${t}`:"Progress"},e("div",{key:"c25b47994c43135ed3147ca579bdc3d8124d7c8a",class:"xpl-progress-indicator-container",role:"list"},s.map(((s,t)=>this.renderStep(s,t)))))}static get watchers(){return{steps:[{validateCurrentStep:0}],currentStep:[{validateCurrentStep:0}]}}},[0,"xpl-progress-indicator",{currentStep:[1026,"current-step"],layout:[1],showLabels:[4,"show-labels"],showNumbers:[4,"show-numbers"],steps:[16]},void 0,{steps:[{validateCurrentStep:0}],currentStep:[{validateCurrentStep:0}]}]),n=c,p=function(){"undefined"!=typeof customElements&&["xpl-progress-indicator","xpl-icon"].forEach((s=>{switch(s){case"xpl-progress-indicator":customElements.get(i(s))||customElements.define(i(s),c);break;case"xpl-icon":customElements.get(i(s))||o()}}))};export{n as XplProgressIndicator,p as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as s,createEvent as i,h as t,Host as
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as s,createEvent as i,h as t,Host as c,transformTag as d}from"@stencil/core/internal/client";import{v as a}from"./v4.js";const l=e(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.radioChange=i(this,"radioChange",7),this.id=a(),this.onChange=e=>{this.radioChange.emit(this.value?this.value:e.target.checked)}}render(){return t(c,{key:"959940093b1988f6e362c17e463fe2139cd828c5",class:{"xpl-checkbox-radio-container":!0,styled:this.styled,disabled:this.disabled}},t("input",{key:"cccccd581ee84a2c5c39a625565877cc080e9702",class:"xpl-radio",type:"radio",checked:this.checked,disabled:this.disabled,id:this.id,name:this.name,required:this.required,onChange:this.onChange,value:this.value}),t("label",{key:"3dd39b409818d7f2921c6dc7dc2c3d790a088833",class:{"xpl-label":!0,"xpl-label--disabled":this.disabled},htmlFor:this.id},t("slot",{key:"0e0af25e2b1679bef0aa053d20df8f0ec7390d18"}),this.description&&t("small",{key:"dcc8791c823ec66dcdb806ae4aeaf7daf6c72298",class:{"xpl-description":!0,"xpl-description--disabled":this.disabled}},this.description)))}},[260,"xpl-radio",{checked:[4],description:[1],disabled:[4],name:[1],value:[1],required:[4],styled:[4],id:[32]}]);function r(){"undefined"!=typeof customElements&&["xpl-radio"].forEach((e=>{"xpl-radio"===e&&(customElements.get(d(e))||customElements.define(d(e),l))}))}export{l as R,r as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as c,h as n,Host as a,transformTag as s}from"@stencil/core/internal/client";const
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as c,h as n,Host as a,transformTag as s}from"@stencil/core/internal/client";const d=e(class extends c{constructor(e){super(),!1!==e&&this.__registerHost()}render(){return n(a,{key:"f4fdd93b13c1dc779c84e8b00b12caeff58df960",class:"xpl-secondary-nav"},n("nav",{key:"4092d23357761026ad5fddfbc32a221d957cce1e","aria-label":"Secondary Nav"},n("slot",{key:"c3ae9f1821a6d22babece27971cc1faf15037cdb"})))}},[260,"xpl-secondary-nav"]),t=d,o=function(){"undefined"!=typeof customElements&&["xpl-secondary-nav"].forEach((e=>{"xpl-secondary-nav"===e&&(customElements.get(s(e))||customElements.define(s(e),d))}))};export{t as XplSecondaryNav,o as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as t,createEvent as s,h as i,Host as l,Fragment as o,transformTag as n}from"@stencil/core/internal/client";import{t as a}from"./index3.js";import{d
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as t,createEvent as s,h as i,Host as l,Fragment as o,transformTag as n}from"@stencil/core/internal/client";import{t as a}from"./index3.js";import{d}from"./xpl-dropdown2.js";import{d as h}from"./xpl-dropdown-group2.js";import{d as c}from"./xpl-dropdown-heading2.js";import{d as r}from"./xpl-dropdown-option2.js";import{d as p}from"./xpl-icon2.js";import{d as u}from"./xpl-tag2.js";import{v as m}from"./v4.js";function v(e){return e.label||e.value}function b(e){return e.reduce(((e,t)=>[...e,...t.groupName?t.options:[t]]),[])}const g=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.selectChange=s(this,"selectChange",7),this.changeEvent=s(this,"changeEvent",7),this.dropdownStateChange=s(this,"dropdownStateChange",7),this.triggerDropdown=s(this,"triggerDropdown",7),this.choices=[],this.selectIcon="chevron-down",this.dropdownPlacement="bottom-start",this.mode="single",this.truncate=!0,this.active=!1,this.id=m(),this.keepFocus=!1,this.visibleChoices=1/0,this.choicesState=[],this.value=this.calculateValue(),this.dropdownOpenState=!1,this.container=null,this.dropdown=null,this.handleResizeThrottled=a((()=>{this.maybeTruncateChoices()}),250),this.handleTabKeyDown=e=>{"Tab"===e.key&&(this.keepFocus=!0)},this.handleTagRemove=e=>{const t=t=>(null==e?void 0:e.value)&&t.value===e.value||(null==e?void 0:e.label)&&t.label===e.label;this.choicesState=this.choicesState.map((e=>{var s;return Object.assign(Object.assign({},e),{isSelected:!t(e)&&e.isSelected,options:null===(s=e.options)||void 0===s?void 0:s.map((e=>Object.assign(Object.assign({},e),{isSelected:!t(e)&&e.isSelected})))})}))},this.handleDropdownScroll=e=>{const{scrollTop:t,scrollHeight:s,clientHeight:i}=this.dropdown.querySelector(".xpl-dropdown-list");(0===t&&e.deltaY<0||t+i>=s&&e.deltaY>0)&&e.preventDefault()}}onChoicesPropChanged(e){this.choicesState=this.initializeChoicesState()}onSelectedValuesPropChanged(){this.choicesState=this.initializeChoicesState()}onChoicesStateChanged(){this.update()}handleValueStateChange(e){this.selectChange.emit(e),this.changeEvent.emit("single"===this.mode?e:(null==e?void 0:e.length)?e.split("|"):[]),this.customDisplayValue&&null!==this.container&&(this.container.querySelectorAll(".custom-display-value").forEach((t=>{t.classList.toggle("display-active",e.length>0),t.classList.toggle("display-inactive",0===e.length)})),this.container.querySelectorAll(".placeholder").forEach((t=>{t.classList.toggle("placeholder-hidden",e.length>0)})))}onDropdownOpenStateChanged(e){this.dropdownStateChange.emit(e)}initializeChoicesState(){return this.choices.map((e=>{var t;const s="string"==typeof this.selectedValues?[this.selectedValues]:this.selectedValues;return Object.assign(Object.assign({},e),{isSelected:e.isSelected||(null==s?void 0:s.includes(e.value||e.label)),options:null===(t=e.options)||void 0===t?void 0:t.map((e=>Object.assign(Object.assign({},e),{isSelected:e.isSelected||(null==s?void 0:s.includes(e.value||e.label))})))})}))}maybeTruncateChoices(){var e,t;if("single"===this.mode||!this.truncate)return;const s=null===(e=this.container)||void 0===e?void 0:e.getBoundingClientRect().width;let i=0,l=0;const o=null===(t=b(this.choicesState))||void 0===t?void 0:t.filter((e=>e.isSelected));if(!o.length)return;const n=o.length;o.forEach(((e,t)=>(l+=function(e){const t=document.createElement("canvas").getContext("2d");return t.font="14px apple-system, system-ui, 'Segoe UI', Arial, Helvetica, Roboto, sans-serif",t.measureText(e).width+44}(v(o[t])),l>s-140||(i+=1),null))),i>=n&&(i=1/0),i<1&&(i=1),this.visibleChoices=i}closeDropdown(){var e;(null===(e=this.dropdown)||void 0===e?void 0:e.isOpen)&&(this.dropdown.isOpen=!1,this.active=!1)}calculateValue(){const e=b(this.choicesState).filter((e=>e.isSelected));return e.length?"single"===this.mode?e[0].value||e[0].label:e.map((e=>e.value||e.label)).join("|"):""}update(){this.value=this.calculateValue(),this.maybeTruncateChoices()}renderLabel(){return this.label||this.description?i("label",{class:{"xpl-label":!0,"xpl-label--disabled":this.disabled},htmlFor:this.id},this.label,this.description&&i("small",{class:{"xpl-description":!0,"xpl-description--disabled":this.disabled}},this.description)):null}renderSelectedTags(){let e=0;const t=b(this.choicesState).filter((e=>e.isSelected));return t.length?t.map(((s,l)=>e>=this.visibleChoices?null:(e+=1,i("xpl-tag",{onClose:()=>this.handleTagRemove(t[l])},v(t[l]))))):null}renderError(){return this.error?i("label",{class:"xpl-input-error",htmlFor:this.id},i("xpl-icon",{icon:"alert-circle"}),this.error):null}componentWillLoad(){this.choicesState=this.initializeChoicesState()}handleClickEvent(e){const t=e.target.closest(".xpl-select");null!==t&&t===this.container||this.closeDropdown()}handleKeyDown(e){var t;"Escape"===e.key&&(this.active||(null===(t=this.container)||void 0===t?void 0:t.contains(document.activeElement)))&&this.closeDropdown()}handleResize(){this.handleResizeThrottled()}componentDidLoad(){requestAnimationFrame((()=>{this.maybeTruncateChoices()}))}disconnectedCallback(){var e;null===(e=this.handleResizeThrottled)||void 0===e||e.cancel()}handleDropdownTrigger(){var e;const t=null!==(e=this.dropdown.isOpen)&&void 0!==e&&e,s=!t;this.triggerDropdown.emit({prevState:t,nextState:s}).defaultPrevented||this.disabled||(this.dropdownOpenState=s,this.dropdown.isOpen=s)}async reset(){this.closeDropdown(),this.choicesState=this.choicesState.map((e=>{var t;return Object.assign(Object.assign({},e),{isSelected:!1,options:null===(t=e.options)||void 0===t?void 0:t.map((e=>Object.assign(Object.assign({},e),{isSelected:!1})))})}))}render(){var e,t,s,n;const a=b(this.choicesState).filter((e=>e.isSelected)),d=(null===(e=a[0])||void 0===e?void 0:e.label)||(null===(t=a[0])||void 0===t?void 0:t.value),h=a.length>1&&this.visibleChoices<1/0&&this.truncate&&!this.customDisplayValue,c=`+ ${Math.abs(this.choicesState.filter((e=>e.isSelected)).length-this.visibleChoices)} more`;return i(l,{key:"09d3587fa268cb0621ea293d246e23cde93d75df",class:{"xpl-select":!0,"xpl-select--disabled":this.disabled,"xpl-select--no-truncate":!this.truncate,[null!==(s=this.classNames)&&void 0!==s?s:""]:!!this.classNames},onKeyDown:this.handleTabKeyDown,ref:e=>{this.container=e}},this.renderLabel(),i("div",{key:"007a61cc60c948d0691d6983cb197652084e417d",class:{"xpl-input":!0,"xpl-input--disabled":this.disabled,"xpl-input--error":(null===(n=this.error)||void 0===n?void 0:n.length)>=0}},i("div",{key:"e1edfe6e4b205bd6332f07031ee51ef7f9f6ac91",class:"xpl-input-wrapper"},i("button",{key:"53d079f28b8a1bcdd5498287dfd88bb7a3ba7b50",class:"xpl-select__trigger",disabled:this.disabled,id:this.id,onKeyDown:this.handleTabKeyDown,onClick:e=>{e.preventDefault(),this.handleDropdownTrigger()},type:"button"},i("div",{key:"5cfec98b2e829ea48e96b373e09e740d5bf02ef6",class:{"xpl-select-value":!0,"xpl-select-value--active":"multi"===this.mode&&this.value.length>0,"has-value":this.value.length>0}},(()=>this.customDisplayValue?i(o,null,i("div",{class:{"custom-display-value":!0,"custom-display-value--inactive":0===this.value.length}},i("slot",{name:"custom-display-value"})),i("span",{class:{"xpl-placeholder--hidden":this.value.length>0}},this.placeholder)):"single"===this.mode?d||this.placeholder:this.value.length>0?this.renderSelectedTags():this.placeholder)(),h&&c),i("xpl-icon",{key:"8bb01d1e8b206fb3c1963cdebcd293eeb2277e05",class:"xpl-select__chevron-down",icon:this.selectIcon}))),!this.disabled&&i("xpl-dropdown",{key:"f5e770c4b26449f3025d172d768d6df69bd0ae03",ref:e=>{this.dropdown=e},isOpen:this.dropdownOpenState,options:this.choicesState,selectedValues:this.selectedValues,mode:this.mode,triggerId:this.id,update:(e,{component:t})=>{const{options:s}=t;s&&s.length>0&&(this.choicesState=s)},onIsOpenChange:e=>{this.dropdownOpenState=e.detail},onWheel:this.handleDropdownScroll,anchorToTrigger:!0,flipFallbackPlacements:this.dropdownFlipFallbackPlacements,placement:this.dropdownPlacement}),this.renderError()),i("input",{key:"fe84c16780622e730100a58a948fc4fe27f6ddb5",type:"hidden",name:this.name,value:this.value}))}static get watchers(){return{choices:[{onChoicesPropChanged:0}],selectedValues:[{onSelectedValuesPropChanged:0}],choicesState:[{onChoicesStateChanged:0}],value:[{handleValueStateChange:0}],dropdownOpenState:[{onDropdownOpenStateChanged:0}]}}},[260,"xpl-select",{choices:[16],selectIcon:[1,"select-icon"],description:[1],disabled:[4],dropdownFlipFallbackPlacements:[16],dropdownPlacement:[1,"dropdown-placement"],error:[1],label:[1],mode:[1],name:[1],placeholder:[1],truncate:[4],customDisplayValue:[4,"custom-display-value"],selectedValues:[1,"selected-values"],classNames:[1,"class-names"],active:[32],id:[32],keepFocus:[32],visibleChoices:[32],choicesState:[32],value:[32],dropdownOpenState:[32],reset:[64]},[[8,"click","handleClickEvent"],[8,"keydown","handleKeyDown"],[9,"resize","handleResize"]],{choices:[{onChoicesPropChanged:0}],selectedValues:[{onSelectedValuesPropChanged:0}],choicesState:[{onChoicesStateChanged:0}],value:[{handleValueStateChange:0}],dropdownOpenState:[{onDropdownOpenStateChanged:0}]}]);function x(){"undefined"!=typeof customElements&&["xpl-select","xpl-dropdown","xpl-dropdown-group","xpl-dropdown-heading","xpl-dropdown-option","xpl-icon","xpl-tag"].forEach((e=>{switch(e){case"xpl-select":customElements.get(n(e))||customElements.define(n(e),g);break;case"xpl-dropdown":customElements.get(n(e))||d();break;case"xpl-dropdown-group":customElements.get(n(e))||h();break;case"xpl-dropdown-heading":customElements.get(n(e))||c();break;case"xpl-dropdown-option":customElements.get(n(e))||r();break;case"xpl-icon":customElements.get(n(e))||p();break;case"xpl-tag":customElements.get(n(e))||u()}}))}export{g as S,x as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as i,HTMLElement as s,createEvent as e,h as t,Host as n,transformTag as l}from"@stencil/core/internal/client";import{d
|
|
1
|
+
import{proxyCustomElement as i,HTMLElement as s,createEvent as e,h as t,Host as n,transformTag as l}from"@stencil/core/internal/client";import{d}from"./xpl-icon2.js";const a=i(class extends s{constructor(i){super(),!1!==i&&this.__registerHost(),this.expandedChange=e(this,"expandedChange",7),this.navClick=e(this,"navClick",7),this.disabled=!1,this.expanded=!1,this.hasChildren=!1,this.hidden=!1,this.link=!1,this.selected=!1,this.handleClick=()=>{this.disabled||(this.hasChildren?(this.expanded=!this.expanded,this.expandedChange.emit(this.expanded)):this.navClick.emit())}}syncLinkHasChildrenExclusivity(){this.enforceLinkExcludesHasChildren()}componentWillLoad(){this.syncLinkHasChildrenExclusivity()}componentWillRender(){this.syncLinkHasChildrenExclusivity()}enforceLinkExcludesHasChildren(){this.link&&(this.hasChildren&&(this.hasChildren=!1),this.el.hasAttribute("has-children")&&this.el.removeAttribute("has-children"))}render(){var i;const s={"xpl-side-nav-item__link":!0,expanded:this.expanded,selected:this.selected};return t(n,{key:"a621f4f9c04d79de708a34a4f4eab06e523a299a",class:{"xpl-side-nav-item":!0,"xpl-side-nav-item--link-disabled":this.link&&this.disabled}},this.link?t("slot",null):t("button",{type:"button",class:s,"aria-current":this.selected?"page":void 0,"aria-expanded":this.hasChildren?this.expanded?"true":"false":void 0,onClick:this.handleClick,disabled:this.disabled},this.hasChildren&&t("span",{class:"xpl-side-nav-item__arrow "+(this.expanded?"expanded":"")},t("xpl-icon",{icon:"chevron-down",size:16})),!this.hasChildren&&t("span",{class:"xpl-side-nav-item__icon"},t("slot",{name:"icon"},this.icon?t("xpl-icon",{icon:this.icon,size:16}):null)),t("span",{class:"xpl-side-nav-item__label"},null!==(i=this.label)&&void 0!==i?i:"")),this.hasChildren&&!this.link&&t("div",{key:"3e22894c0bd9427f568b86bba00cdab822921997",class:"xpl-side-nav-item__children "+(this.expanded?"expanded":""),inert:!this.expanded||void 0},t("div",{key:"41486a4241e4402232531d140e972b39d863ffd9",class:"xpl-side-nav-item__children-inner"},t("slot",{key:"d334c6ecac7dd1dd12602a461db444cd1ccefc86"}))))}get el(){return this}static get watchers(){return{hasChildren:[{syncLinkHasChildrenExclusivity:0}],link:[{syncLinkHasChildrenExclusivity:0}]}}},[260,"xpl-side-nav-item",{disabled:[516],expanded:[1540],hasChildren:[1540,"has-children"],hidden:[516],icon:[1],label:[1],link:[516],selected:[516]},void 0,{hasChildren:[{syncLinkHasChildrenExclusivity:0}],link:[{syncLinkHasChildrenExclusivity:0}]}]),h=a,c=function(){"undefined"!=typeof customElements&&["xpl-side-nav-item","xpl-icon"].forEach((i=>{switch(i){case"xpl-side-nav-item":customElements.get(l(i))||customElements.define(l(i),a);break;case"xpl-icon":customElements.get(l(i))||d()}}))};export{h as XplSideNavItem,c as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as a,h as c,Host as s,transformTag as d}from"@stencil/core/internal/client";const n=e(class extends a{constructor(e){super(),!1!==e&&this.__registerHost()}render(){return c(s,{key:"
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as a,h as c,Host as s,transformTag as d}from"@stencil/core/internal/client";const n=e(class extends a{constructor(e){super(),!1!==e&&this.__registerHost()}render(){return c(s,{key:"d01e8e27671eabc92613a803818b4351334011ac",class:{"xpl-side-nav":!0}},c("div",{key:"92c9f31fa0d9d564164cde99d17e30562c30abb7",class:"xpl-side-nav__wrapper"},c("nav",{key:"5ddd8b18d4f74bb752b747ec4e1c48780a0738de",class:"xpl-side-nav__content","aria-label":this.label},c("div",{key:"8b830945bf6ec1da8ab2e2c955c10a1077652590",class:"xpl-side-nav__section"},c("slot",{key:"66e5cd33c23bdc8963d661e0741d34f80a0640fb",name:"section"})),c("div",{key:"f0da4e3c25822453efcbfb3c6f8ea7ec328e717d",class:"xpl-side-nav__footer"},c("slot",{key:"76b829e978361be9fd62bd412489ea4559852c3f",name:"nav-footer"})))))}},[260,"xpl-side-nav",{label:[1]}]),t=n,l=function(){"undefined"!=typeof customElements&&["xpl-side-nav"].forEach((e=>{"xpl-side-nav"===e&&(customElements.get(d(e))||customElements.define(d(e),n))}))};export{t as XplSideNav,l as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as t,h as s,Host as l,transformTag as i}from"@stencil/core/internal/client";const n=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.shape="rectangle",this.size="custom"}render(){return s(l,{key:"
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as t,h as s,Host as l,transformTag as i}from"@stencil/core/internal/client";const n=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.shape="rectangle",this.size="custom"}render(){return s(l,{key:"0ac86ae7bf109ea51bca36ac502d506ac7d0b66e",class:{"xpl-skeleton":!0,["xpl-skeleton--shape-"+this.shape]:!0,["xpl-skeleton--size-"+this.size]:!0,[this.classNames]:!!this.classNames,"xpl-skeleton--full-width":this.fullWidth},style:{width:this.width||void 0,height:this.height||void 0,margin:this.margin||void 0}})}},[0,"xpl-skeleton",{classNames:[1,"class-names"],fullWidth:[4,"full-width"],height:[1],width:[1],margin:[1],shape:[1],size:[1]}]),o=n,h=function(){"undefined"!=typeof customElements&&["xpl-skeleton"].forEach((e=>{"xpl-skeleton"===e&&(customElements.get(i(e))||customElements.define(i(e),n))}))};export{o as XplSkeleton,h as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as a,createEvent as t,h as s,Host as c,transformTag as d}from"@stencil/core/internal/client";import{d as o}from"./xpl-backdrop2.js";import{d as i}from"./xpl-button2.js";import{d as l}from"./xpl-divider2.js";import{d as b}from"./xpl-icon2.js";const f=e(class extends a{constructor(e){super(),!1!==e&&this.__registerHost(),this.isOpenChange=t(this,"isOpenChange",7),this.isOpen=!1,this.backdrop=!1,this.variant="default",this.showFooter=!0,this.handleClose=()=>{this.isOpen=!1}}watchPropHandler(e){this.isOpen=e,this.isOpenChange.emit(e)}handleScroll(){const e=this.el.querySelector(".content");e.scrollHeight>e.clientHeight?e.classList.add("has-shadow"):e.classList.remove("has-shadow")}componentDidLoad(){this.handleScroll()}render(){return s(c,{key:"8a3f7af854b35469bf4a383cc4cb1fcfcaa15748",class:"xpl-slideout"},this.backdrop&&this.isOpen&&s("xpl-backdrop",{key:"7033d78efa9ac2642a99d2b2dca278a3e9a44368",onClick:this.handleClose}),s("aside",{key:"2999e4119a0dbaac5125c7a1ef5f03761f445a0e",class:"slideout slideout--"+(!this.isOpen&&"closed")},s("header",{key:"5e6bcf1284c2b2a4fbc05dd8e5100a33fa7597b4",class:"header"},s("div",{key:"88172efe113b56a533761b975605a44ef52c5174",class:"title"},s("slot",{key:"c8f13168f62f96374250b11814ace756fa680503",name:"title"}),s("xpl-button",{key:"8e0e29a8ad2a5f45b250f9d563886fe7ad2a7cb8",class:"close-button","icon-only":!0,size:"sm",variant:"tertiary",onClick:this.handleClose},s("xpl-icon",{key:"110cbd50e31b51319745d6fed61188c1c885b8b3",icon:"x"}))),s("div",{key:"96e6cddf4b078736201116f220f27ddf34b90b44",class:"subtitle"},s("slot",{key:"eb02b4fce6ff5e658ec51c83819a5257f452d3a1",name:"subtitle"})),s("div",{key:"ac8dfe1f99428cdf728027aa5a04d58d497f34f0",class:"search"},s("slot",{key:"28deb70ef99f4880fba55beb2d2b4b1d3136a240",name:"search"}))),s("xpl-divider",{key:"928d20ef8e74eed4e06351c5dab0c0af9934d2b8",tier:0,class:"divider top"}),s("article",{key:"d6460cb29abb33f6676d2e4f517c1f2befa57148",class:"content",tabIndex:0},s("slot",{key:"b415af9cadedc61407623773fd6b2b1130caf5df",name:"content"})),this.showFooter&&s("footer",{key:"db6a58277112f134dc150266446cc67c79bc6bc5"},s("xpl-divider",{key:"129a61ba1a8a588e94d710b7e7fb1059c4b7f5e6",tier:0,class:"divider bottom"}),s("div",{key:"6c81348acf8ee2bb4c12c2f3207daae564e78aa2",class:"footer"},s("slot",{key:"8c9a6d4c215154bb2e66d62aa462b3b085ef0f5b",name:"tertiary"}),s("slot",{key:"e66e45e2d090f45305f818c6496541b737c96aeb",name:"secondary"}),s("slot",{key:"8892bdf075a38237a5c858bfd951e1203fc3c892",name:"primary"})))))}get el(){return this}static get watchers(){return{isOpen:[{watchPropHandler:0}]}}},[260,"xpl-slideout",{isOpen:[1540,"is-open"],backdrop:[4],variant:[1],showFooter:[4,"show-footer"]},[[9,"scroll","handleScroll"]],{isOpen:[{watchPropHandler:0}]}]),r=f,n=function(){"undefined"!=typeof customElements&&["xpl-slideout","xpl-backdrop","xpl-button","xpl-divider","xpl-icon"].forEach((e=>{switch(e){case"xpl-slideout":customElements.get(d(e))||customElements.define(d(e),f);break;case"xpl-backdrop":customElements.get(d(e))||o();break;case"xpl-button":customElements.get(d(e))||i();break;case"xpl-divider":customElements.get(d(e))||l();break;case"xpl-icon":customElements.get(d(e))||b()}}))};export{r as XplSlideout,n as defineCustomElement}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface XplSpotlight extends Components.XplSpotlight, HTMLElement {}
|
|
4
|
+
export const XplSpotlight: {
|
|
5
|
+
prototype: XplSpotlight;
|
|
6
|
+
new (): XplSpotlight;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{proxyCustomElement as t,HTMLElement as i,createEvent as s,forceUpdate as o,h,Host as e,transformTag as n}from"@stencil/core/internal/client";import{c as l,a,o as r,f as c,s as p}from"./floating-ui.dom.js";import{d}from"./xpl-button2.js";import{d as u}from"./xpl-icon2.js";const g=".xpl-spotlight__dismiss button, .xpl-spotlight__actions button";let m=0;const v={"top-left":"top-start","top-right":"top-end","bottom-left":"bottom-start","bottom-right":"bottom-end"},x={top:"bottom-left","top-start":"bottom-left","top-end":"bottom-right",bottom:"top-left","bottom-start":"top-left","bottom-end":"top-right",left:"top-right","left-start":"top-right","left-end":"bottom-right",right:"top-left","right-start":"top-left","right-end":"bottom-left"},b=t(class t extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.dismiss=s(this,"dismiss",7),this.primaryAction=s(this,"primaryAction",7),this.secondaryAction=s(this,"secondaryAction",7),this.targetClick=s(this,"targetClick",7),this.cleanupAutoUpdate=null,this.enterVisibleFrameId=null,this.focusFrameId=null,this.hasCompletedInitialLoad=!1,this.headingId=(m+=1,"xpl-spotlight-heading-"+m),this.pendingEnterTransitionAfterAnchor=!1,this.pendingEnterVisible=!1,this.positioningGeneration=0,this.previousFocus=null,this.referenceEl=null,this.shouldMoveFocusOnRender=!1,this.shouldReinitializeAfterReconnect=!1,this.slotContentObserver=null,this.hasBodySlotContent=!1,this.hasFloatingPosition=!1,this.hasImageSlotContent=!1,this.hasTitleSlotContent=!1,this.isVisible=!1,this.resolvedAnchorPosition="top-left",this.actionLayout="default",this.anchorPosition="top-left",this.currentStep=1,this.isDismissible=!0,this.isOpen=!0,this.primaryActionLabel="Next",this.secondaryActionLabel="Back",this.showActions=!0,this.showImage=!0,this.showSteps=!0,this.totalSteps=1,this.emitDismiss=()=>{this.dismiss.emit()},this.handleDismissClick=()=>{this.emitDismiss()},this.handlePrimaryClick=()=>{this.primaryAction.emit()},this.handleSecondaryClick=()=>{this.secondaryAction.emit()},this.handleTargetClick=()=>{this.targetClick.emit()},this.syncTitleSlotIds=()=>{const t=this.getFirstTitleSlottedElement();t&&!t.id&&(t.id=this.headingId)},this.handleBodySlotChange=()=>{this.refreshBodySlotState()},this.handleTitleSlotChange=()=>{this.refreshTitleSlotState(),this.syncTitleSlotIds()},this.handleImageSlotChange=()=>{this.refreshImageSlotState()},this.handleSlotContentMutation=()=>{this.refreshBodySlotState(),this.refreshImageSlotState(),this.refreshTitleSlotState(),this.syncTitleSlotIds()},this.updatePosition=async t=>{var i,s,h,e,n,a;const d=this.positioningGeneration;try{const o=v[this.anchorPosition],{x:u,y:g,placement:m,middlewareData:b}=await l(t,this.el,{strategy:"fixed",placement:o,middleware:[r(12),c({crossAxis:!1}),p({padding:8})]});if(d!==this.positioningGeneration)return;this.el.style.left=u+"px",this.el.style.top=g+"px";const f=null!==(s=null===(i=b.shift)||void 0===i?void 0:i.x)&&void 0!==s?s:0,y=null!==(e=null===(h=b.shift)||void 0===h?void 0:h.y)&&void 0!==e?e:0;this.el.style.setProperty("--xpl-spotlight-shift-x",-f+"px"),this.el.style.setProperty("--xpl-spotlight-shift-y",-y+"px"),this.hasFloatingPosition=!0;const _=null!==(n=x[m])&&void 0!==n?n:x[null!==(a=m.split("-")[0])&&void 0!==a?a:""];this.resolvedAnchorPosition=null!=_?_:this.anchorPosition,this.pendingEnterTransitionAfterAnchor&&this.scheduleEnterTransition()}catch(t){if(d!==this.positioningGeneration)return;this.clearFloatingHostCoordinates(),this.isOpenEnabled&&(this.scheduleEnterTransition({skipAnchorWait:!0}),await o(this))}}}onAnchorPositionChange(){this.target&&this.referenceEl?this.updatePosition(this.referenceEl).catch((()=>{})):this.resolvedAnchorPosition=this.anchorPosition}onIsOpenChange(s){if(t.coerceBoolean(s))return this.previousFocus=document.activeElement instanceof i?document.activeElement:null,this.shouldMoveFocusOnRender=!0,this.isVisible=!1,this.refreshBodySlotState(),this.refreshTitleSlotState(),this.refreshImageSlotState(),this.target&&(this.cleanupAutoUpdate&&this.referenceEl&&this.el.ownerDocument.contains(this.referenceEl)?this.hasFloatingPosition=!1:this.startPositioning()),void this.scheduleEnterTransition();this.cancelEnterTransition(),this.cancelPendingFocusWait(),this.isVisible=!1,this.target||this.stopPositioning(),this.restoreFocus()}onTargetChange(){if(!this.target)return this.stopPositioning(),void(this.resolvedAnchorPosition=this.anchorPosition);this.startPositioning()}connectedCallback(){this.shouldReinitializeAfterReconnect&&(this.shouldReinitializeAfterReconnect=!1,this.startSlotContentObserver(),this.target&&this.startPositioning(),this.isOpenEnabled?(this.previousFocus=document.activeElement instanceof i?document.activeElement:null,this.shouldMoveFocusOnRender=!0,this.scheduleEnterTransition(),this.pendingEnterVisible&&Promise.resolve(o(this)).catch((()=>{}))):this.isVisible=!1)}disconnectedCallback(){this.cancelEnterTransition(),this.cancelPendingFocusWait(),this.stopSlotContentObserver(),this.stopPositioning(),this.hasCompletedInitialLoad&&(this.shouldReinitializeAfterReconnect=!0)}componentWillLoad(){this.resolvedAnchorPosition=this.anchorPosition,this.hasBodySlotContent=this.hasSlottedContent("body"),this.hasImageSlotContent=this.hasSlottedContent("image"),this.hasTitleSlotContent=this.hasSlottedContent("title"),this.isOpenEnabled&&(this.previousFocus=document.activeElement instanceof i?document.activeElement:null,this.target||(this.pendingEnterVisible=!0)),this.shouldMoveFocusOnRender=this.isOpenEnabled}componentDidLoad(){this.hasCompletedInitialLoad=!0,this.startSlotContentObserver(),this.target&&this.startPositioning(),this.isOpenEnabled?this.target&&(this.scheduleEnterTransition(),this.pendingEnterVisible&&Promise.resolve(o(this)).catch((()=>{}))):this.isVisible=!1}componentDidRender(){this.isOpenEnabled&&this.syncTitleSlotIds(),this.pendingEnterVisible&&this.isOpenEnabled&&(this.pendingEnterVisible=!1,this.enterVisibleFrameId=requestAnimationFrame((()=>{this.enterVisibleFrameId=null,this.isOpenEnabled&&(this.isVisible=!0)}))),this.shouldMoveFocusOnRender&&this.isOpenEnabled&&(this.shouldMoveFocusOnRender=!1,this.focusInitial())}handleKeyDown(t){"Escape"===t.key&&this.shouldHandleDismissKeyboardEvent()&&(t.preventDefault(),this.emitDismiss())}get effectiveTotalSteps(){return Math.max(1,this.totalSteps)}get effectiveCurrentStep(){return Math.min(this.effectiveTotalSteps,Math.max(1,this.currentStep))}get isDismissibleEnabled(){return t.coerceBoolean(this.isDismissible)}get isOpenEnabled(){return t.coerceBoolean(this.isOpen)}get isSingleActionLayout(){return"single"===this.actionLayout}get usesHiddenEdgeActions(){return"dual"===this.actionLayout}get isPrimaryStepActionDisabled(){return!this.usesHiddenEdgeActions&&this.showStepsEnabled&&this.effectiveCurrentStep>=this.effectiveTotalSteps}get isSecondaryStepActionDisabled(){return!this.usesHiddenEdgeActions&&this.showStepsEnabled&&this.effectiveCurrentStep<=1}get shouldShowPrimaryAction(){return!!this.isSingleActionLayout||!this.usesHiddenEdgeActions||!this.showStepsEnabled||this.effectiveCurrentStep<this.effectiveTotalSteps}get shouldShowSecondaryAction(){return!this.isSingleActionLayout&&(!this.usesHiddenEdgeActions||!this.showStepsEnabled||this.effectiveCurrentStep>1)}get hasRenderableFocusChrome(){return!!this.isDismissibleEnabled||!!this.showActionsEnabled&&(this.shouldShowPrimaryAction||this.shouldShowSecondaryAction)}get showActionsEnabled(){return t.coerceBoolean(this.showActions)}get showImageEnabled(){return t.coerceBoolean(this.showImage)}get showStepsEnabled(){return t.coerceBoolean(this.showSteps)}get headingPropHasText(){var t;return!!(null===(t=this.heading)||void 0===t?void 0:t.trim())}get bodyPropHasText(){var t;return!!(null===(t=this.body)||void 0===t?void 0:t.trim())}async focusInitial(){var t;if(null===(t=this.focusAbort)||void 0===t||t.abort(),this.focusAbort=new AbortController,!this.hasRenderableFocusChrome&&this.isOpenEnabled)return void(this.focusFrameId=requestAnimationFrame((()=>{this.focusFrameId=null,this.isOpenEnabled&&this.el.focus()})));const i=await function(t,i){var s;const o=t.querySelector(g);return o?Promise.resolve(o):(null===(s=null==i?void 0:i.signal)||void 0===s?void 0:s.aborted)?Promise.resolve(null):"undefined"==typeof MutationObserver?function(t,i){return new Promise((s=>{var o,h;if(null===(o=null==i?void 0:i.signal)||void 0===o?void 0:o.aborted)return void s(null);let e,n,l=0;const a=t=>{void 0!==e&&"undefined"!=typeof cancelAnimationFrame&&cancelAnimationFrame(e),void 0!==n&&clearTimeout(n),s(t)},r=()=>a(null);null===(h=null==i?void 0:i.signal)||void 0===h||h.addEventListener("abort",r,{once:!0});const c=t=>{"undefined"!=typeof requestAnimationFrame?e=requestAnimationFrame((()=>{e=void 0,t()})):n=setTimeout((()=>{n=void 0,t()}),0)},p=()=>{var s,o,h;if(null===(s=null==i?void 0:i.signal)||void 0===s?void 0:s.aborted)return void a(null);const e=t.querySelector(g);return e?(null===(o=null==i?void 0:i.signal)||void 0===o||o.removeEventListener("abort",r),void a(e)):(l+=1,l>=120?(null===(h=null==i?void 0:i.signal)||void 0===h||h.removeEventListener("abort",r),void a(null)):void c(p))};c(p)}))}(t,i):new Promise((s=>{var o;let h,e,n=!1;function l(t){n||(n=!0,e.disconnect(),void 0!==h&&clearTimeout(h),s(t))}e=new MutationObserver((()=>{const i=t.querySelector(g);i&&l(i)})),e.observe(t instanceof Node?t:document,{childList:!0,subtree:!0}),h=setTimeout((()=>l(null)),2500),null===(o=null==i?void 0:i.signal)||void 0===o||o.addEventListener("abort",(()=>{l(null)}),{once:!0})}))}(this.el,{signal:this.focusAbort.signal});i?i.focus():this.isOpenEnabled&&this.el.focus()}shouldHandleDismissKeyboardEvent(){if(!this.isDismissibleEnabled||!this.isOpenEnabled||!this.isVisible)return!1;const{activeElement:t}=document;return!!t&&(t===this.el||this.el.contains(t))}restoreFocus(){var t;(null===(t=this.previousFocus)||void 0===t?void 0:t.isConnected)&&this.previousFocus.focus()}cancelPendingFocusWait(){var t;null===(t=this.focusAbort)||void 0===t||t.abort(),null!=this.focusFrameId&&(cancelAnimationFrame(this.focusFrameId),this.focusFrameId=null)}cancelEnterTransition(){null!==this.enterVisibleFrameId&&(cancelAnimationFrame(this.enterVisibleFrameId),this.enterVisibleFrameId=null),this.pendingEnterVisible=!1}scheduleEnterTransition(t){this.cancelEnterTransition(),(null==t?void 0:t.skipAnchorWait)||!this.target||!this.referenceEl||this.hasFloatingPosition?(this.pendingEnterTransitionAfterAnchor=!1,this.pendingEnterVisible=!0):this.pendingEnterTransitionAfterAnchor=!0}getFirstTitleSlottedElement(){var t;const i=Array.from(this.el.children).find((t=>t.nodeType===Node.ELEMENT_NODE&&"title"===t.getAttribute("slot")));if(i)return i;const s=this.el.querySelector('slot[name="title"]');return s&&null!==(t=Array.from(s.assignedNodes({flatten:!0})).find((t=>t.nodeType===Node.ELEMENT_NODE)))&&void 0!==t?t:null}getDialogLabelId(){if(this.hasTitleSlotContent){const t=this.getFirstTitleSlottedElement();return(null==t?void 0:t.id)?t.id:this.headingId}if(this.headingPropHasText)return this.headingId}refreshBodySlotState(){const t=this.hasSlottedContent("body");this.hasBodySlotContent!==t&&(this.hasBodySlotContent=t)}refreshTitleSlotState(){const t=this.hasSlottedContent("title");this.hasTitleSlotContent!==t&&(this.hasTitleSlotContent=t)}static coerceBoolean(t){return"string"==typeof t?"false"!==t.trim().toLowerCase():!!t}refreshImageSlotState(){const t=this.hasSlottedContent("image");this.hasImageSlotContent!==t&&(this.hasImageSlotContent=t)}startSlotContentObserver(){"undefined"==typeof MutationObserver||this.slotContentObserver||(this.slotContentObserver=new MutationObserver(this.handleSlotContentMutation),this.slotContentObserver.observe(this.el,{attributes:!0,attributeFilter:["slot"],childList:!0,subtree:!0}))}stopSlotContentObserver(){var t;null===(t=this.slotContentObserver)||void 0===t||t.disconnect(),this.slotContentObserver=null}hasSlottedContent(t){const i=this.el.querySelector(`slot[name="${t}"]`),s=this.el.querySelector(`[slot="${t}"]`),o=Array.from(this.el.children).some((i=>i.getAttribute("slot")===t)),h=!!i&&i.assignedNodes({flatten:!0}).some((t=>{var i;return t.nodeType===Node.ELEMENT_NODE||t.nodeType===Node.TEXT_NODE&&(null===(i=t.textContent)||void 0===i?void 0:i.trim())}));return!(!s&&!o)||h}startPositioning(){if(!this.target)return;let t=null;try{t=this.el.ownerDocument.querySelector(this.target)}catch(t){return this.stopPositioning(),void(this.resolvedAnchorPosition=this.anchorPosition)}if(!t)return this.stopPositioning(),void(this.resolvedAnchorPosition=this.anchorPosition);this.detachFloatingUiListeners(),this.referenceEl=t,this.cleanupAutoUpdate=a(t,this.el,(()=>{this.updatePosition(t).catch((()=>{}))}))}detachFloatingUiListeners(){this.positioningGeneration+=1,this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null)}resetFloatingHostPosition(){this.el.style.left="",this.el.style.top="",this.el.style.removeProperty("--xpl-spotlight-shift-x"),this.el.style.removeProperty("--xpl-spotlight-shift-y"),this.hasFloatingPosition=!1,this.pendingEnterTransitionAfterAnchor=!1,this.referenceEl=null}clearFloatingHostCoordinates(){this.el.style.left="",this.el.style.top="",this.el.style.removeProperty("--xpl-spotlight-shift-x"),this.el.style.removeProperty("--xpl-spotlight-shift-y"),this.hasFloatingPosition=!1,this.pendingEnterTransitionAfterAnchor=!1,this.resolvedAnchorPosition=this.anchorPosition}stopPositioning(){this.detachFloatingUiListeners(),this.resetFloatingHostPosition()}render(){if(!this.isOpenEnabled)return this.target?h(e,{class:{"xpl-spotlight":!0,"xpl-spotlight--target-only":!0,["xpl-spotlight--"+this.resolvedAnchorPosition]:!0,"xpl-spotlight--anchored":this.hasFloatingPosition}},h("button",{type:"button",class:"xpl-spotlight__target","aria-label":"Spotlight indicator",onClick:this.handleTargetClick},h("div",{class:"xpl-spotlight__target-outer"}),h("div",{class:"xpl-spotlight__target-inner"}))):h(e,{"aria-hidden":"true",class:{"xpl-spotlight":!0,"xpl-spotlight--closed":!0}});const{isSingleActionLayout:t,shouldShowPrimaryAction:i,shouldShowSecondaryAction:s,showActionsEnabled:o,showImageEnabled:n,showStepsEnabled:l}=this;return h(e,{class:{["xpl-spotlight--action-layout-"+this.actionLayout]:o,"xpl-spotlight":!0,["xpl-spotlight--"+this.resolvedAnchorPosition]:!0,"xpl-spotlight--anchored":this.hasFloatingPosition,"xpl-spotlight--no-image":!n,"xpl-spotlight--only-primary-action":o&&i&&!s,"xpl-spotlight--only-secondary-action":o&&s&&!i,"xpl-spotlight--visible":this.isVisible},role:"dialog","aria-modal":"false","aria-label":this.getDialogLabelId()?void 0:"Tour step","aria-labelledby":this.getDialogLabelId(),tabindex:-1},h("button",{type:"button",class:"xpl-spotlight__target","aria-label":"Spotlight indicator",onClick:this.handleTargetClick},h("div",{class:"xpl-spotlight__target-outer"}),h("div",{class:"xpl-spotlight__target-inner"})),this.isDismissibleEnabled&&h("div",{class:"xpl-spotlight__dismiss"},h("xpl-button",{variant:"secondary",size:"sm",iconOnly:!0,"aria-label":"Dismiss tour step",onClick:this.handleDismissClick},h("xpl-icon",{icon:"xmark",size:16}))),h("div",{class:"xpl-spotlight__frame"},h("div",{class:{"xpl-spotlight__image-container":!0,"xpl-spotlight__image-container--empty":!this.hasImageSlotContent,"xpl-spotlight__image-container--hidden":!n}},!this.hasImageSlotContent&&n&&h("div",{class:"xpl-spotlight__image-placeholder","aria-hidden":"true"},h("xpl-icon",{icon:"photo",size:24}),h("xpl-icon",{icon:"video",size:24})),h("slot",{name:"image",onSlotchange:this.handleImageSlotChange})),h("div",{class:"xpl-spotlight__content"},h("div",{class:"xpl-spotlight__header"},h("slot",{name:"title",onSlotchange:this.handleTitleSlotChange},!this.hasTitleSlotContent&&this.headingPropHasText&&h("span",{class:"xpl-spotlight__title",id:this.headingId},this.heading)),h("slot",{name:"body",onSlotchange:this.handleBodySlotChange},!this.hasBodySlotContent&&this.bodyPropHasText&&h("p",{class:"xpl-spotlight__body"},this.body))),o&&h("div",{class:{"xpl-spotlight__actions":!0,"xpl-spotlight__actions--dual":!t,"xpl-spotlight__actions--single":t,"xpl-spotlight__actions--with-steps":l,"xpl-spotlight__actions--only-primary":i&&!s,"xpl-spotlight__actions--only-secondary":s&&!i}},h("div",{class:"xpl-spotlight__action-slot xpl-spotlight__action-slot--secondary"},s&&h("xpl-button",{class:"xpl-spotlight__secondary-action",variant:"secondary",size:"default",disabled:this.isSecondaryStepActionDisabled,onClick:this.handleSecondaryClick},this.secondaryActionLabel)),l&&h("span",{class:"xpl-spotlight__step-text"},this.effectiveCurrentStep," of ",this.effectiveTotalSteps),h("div",{class:"xpl-spotlight__action-slot xpl-spotlight__action-slot--primary"},i&&h("xpl-button",{class:"xpl-spotlight__primary-action",variant:"primary",size:"default",disabled:this.isPrimaryStepActionDisabled,onClick:this.handlePrimaryClick},this.primaryActionLabel))))))}get el(){return this}static get watchers(){return{anchorPosition:[{onAnchorPositionChange:0}],isOpen:[{onIsOpenChange:0}],target:[{onTargetChange:0}]}}},[260,"xpl-spotlight",{actionLayout:[1,"action-layout"],anchorPosition:[1,"anchor-position"],body:[1],currentStep:[2,"current-step"],heading:[1],isDismissible:[4,"is-dismissible"],isOpen:[4,"is-open"],primaryActionLabel:[1,"primary-action-label"],secondaryActionLabel:[1,"secondary-action-label"],showActions:[4,"show-actions"],showImage:[4,"show-image"],showSteps:[4,"show-steps"],target:[1],totalSteps:[2,"total-steps"],hasBodySlotContent:[32],hasFloatingPosition:[32],hasImageSlotContent:[32],hasTitleSlotContent:[32],isVisible:[32],resolvedAnchorPosition:[32]},[[4,"keydown","handleKeyDown"]],{anchorPosition:[{onAnchorPositionChange:0}],isOpen:[{onIsOpenChange:0}],target:[{onTargetChange:0}]}]),f=b,y=function(){"undefined"!=typeof customElements&&["xpl-spotlight","xpl-button","xpl-icon"].forEach((t=>{switch(t){case"xpl-spotlight":customElements.get(n(t))||customElements.define(n(t),b);break;case"xpl-button":customElements.get(n(t))||d();break;case"xpl-icon":customElements.get(n(t))||u()}}))};export{f as XplSpotlight,y as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as t,h as
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as t,h as a,Host as s,transformTag as l}from"@stencil/core/internal/client";import{g as n,a as c,t as r}from"./tab-a11y-ids.js";const o=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.selected=!1}render(){var e;const t=n(this.el),l=null!==(e=this.target)&&void 0!==e?e:"",o=c(t,l),d=r(t,l);return a(s,{key:"4c4a86dda347872ea6b1c4569f8424bd6cac7bd9","aria-labelledby":d,class:{"xpl-tab-panel":!0,"xpl-tab-panel--selected":this.selected},id:o,role:"tabpanel"},a("slot",{key:"30c9ae6f3748dc02a73da7535443266b1043d61b"}))}get el(){return this}},[260,"xpl-tab-panel",{selected:[4],target:[1]}]),d=o,i=function(){"undefined"!=typeof customElements&&["xpl-tab-panel"].forEach((e=>{"xpl-tab-panel"===e&&(customElements.get(l(e))||customElements.define(l(e),o))}))};export{d as XplTabPanel,i as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as t,HTMLElement as
|
|
1
|
+
import{proxyCustomElement as t,HTMLElement as s,createEvent as e,h as i,Host as n,transformTag as a}from"@stencil/core/internal/client";import{g as l,t as o,a as r}from"./tab-a11y-ids.js";import{d as c}from"./xpl-button2.js";import{d as h}from"./xpl-icon2.js";const u=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.tabChange=e(this,"tabChange",7),this.disabled=!1,this.fullWidth=!1,this.groupDisabled=!1,this.iconPosition="start",this.selected=!1,this.variant="tabs",this.handleTabClick=()=>{this.effectivelyDisabled||this.tabChange.emit(this.target)}}async getFocusableElement(){return this.el.querySelector(this.isSegment?"xpl-button button":".xpl-tab__button")}async setTabIndex(t){const s=await this.getFocusableElement();s&&(s.tabIndex=t)}async focusTrigger(){const t=await this.getFocusableElement();null==t||t.focus()}get a11yIds(){var t;const s=l(this.el),e=null!==(t=this.target)&&void 0!==t?t:"";return{panelId:r(s,e),triggerId:o(s,e)}}get effectivelyDisabled(){return this.disabled||this.groupDisabled}get isSegment(){return"segment"===this.variant}render(){var t;const s=this.isSegment,{panelId:e,triggerId:a}=this.a11yIds,l=this.selected?"true":"false";return i(n,{class:{"xpl-tab":!0,"xpl-tab--selected":this.selected,"xpl-tab--segment":s,"xpl-tab--disabled":this.effectivelyDisabled}},s?i("xpl-button",{controlAttrs:{id:a,role:"tab","aria-controls":e,"aria-selected":l},disabled:this.effectivelyDisabled,fullWidth:this.fullWidth,icon:null!==(t=this.icon)&&void 0!==t?t:"",iconPosition:this.iconPosition,onClick:this.handleTabClick,size:"sm",type:"button",variant:this.selected?"primary":"tertiary"},i("slot",null)):i("button",{"aria-controls":e,"aria-selected":l,class:"xpl-tab__button",disabled:this.effectivelyDisabled,id:a,onClick:this.handleTabClick,role:"tab",type:"button"},i("slot",null)))}get el(){return this}},[260,"xpl-tab",{disabled:[516],fullWidth:[4,"full-width"],groupDisabled:[1540,"data-group-disabled"],icon:[513],iconPosition:[1,"icon-position"],selected:[4],target:[1],variant:[1],getFocusableElement:[64],setTabIndex:[64],focusTrigger:[64]}]),b=u,d=function(){"undefined"!=typeof customElements&&["xpl-tab","xpl-button","xpl-icon"].forEach((t=>{switch(t){case"xpl-tab":customElements.get(a(t))||customElements.define(a(t),u);break;case"xpl-button":customElements.get(a(t))||c();break;case"xpl-icon":customElements.get(a(t))||h()}}))};export{b as XplTab,d as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as t,h as
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as t,h as l,Host as r,transformTag as s}from"@stencil/core/internal/client";const a=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost()}render(){return l(r,{key:"7b36c9e640bd43ac38ea2625e7600e8699a13c5f",role:"row",class:"xpl-table-header"},l("slot",{key:"d03fe894a829477b6bf25dbd6dfa724b224b8d42"}))}},[260,"xpl-table-header"]),n=a,c=function(){"undefined"!=typeof customElements&&["xpl-table-header"].forEach((e=>{"xpl-table-header"===e&&(customElements.get(s(e))||customElements.define(s(e),a))}))};export{n as XplTableHeader,c as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as t,HTMLElement as s,createEvent as e,h as i,Host as h,transformTag as a}from"@stencil/core/internal/client";import{d as l}from"./xpl-icon2.js";const c=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.tableSelect=e(this,"tableSelect",7),this.sortChanged=e(this,"sortChanged",3),this.selectedValues=[],this.isSortable=!1,this.sortableColumns=[],this.areAllSelected=!1,this.hasScrolled=!1,this.sortTypeArray=[],this.selectAllValue=Math.random().toString(36).slice(2),this.selectAll=t=>{const{target:s}=t;if(!(s instanceof HTMLInputElement))return;const{checked:e}=s;this.areAllSelected=e,this.selected=this.selectedValues.length>0?Array.from(this.el.querySelectorAll("tbody td:first-child input")).map((t=>e?null==t?void 0:t.value:e)):this.selected.map((()=>e)),this.onChange()},this.selectOne=(t,s)=>{const{target:e}=t;if(!(e instanceof HTMLInputElement))return;const{checked:i,value:h}=e;this.areAllSelected=!1,this.selected=this.selected.map(((t,e)=>e!==s?t:this.selectedValues.length>0&&i?h:i)),this.onChange()},this.onChange=()=>{this.tableSelect.emit({selected:this.selected,areAllSelected:this.areAllSelected})},this.onScroll=()=>{this.hasScrolled=this.container.scrollLeft>0},this.sortBy=(t,s)=>{const e=(s,e)=>s[t].toLocaleLowerCase()<e[t].toLocaleLowerCase()?-1:s[t].toLocaleLowerCase()>e[t].toLocaleLowerCase()?1:0;switch(s[t]){case"asc":this.rowData.sort(((t,s)=>e(t,s)));break;case"desc":this.rowData.sort(((t,s)=>e(s,t)));break;default:this.rowData=this.data,this.sortTypeArray[t]=null}this.rowData=Array.from(this.rowData),this.render()},this.setData=()=>{this.rowData=void 0!==this.data?Array.from(this.data):[]},this.setFooterData=()=>{this.rowFooterData=void 0!==this.footer?Array.from(this.footer):[]}}handleSort(t,s,e,i){t.preventDefault(),t.stopPropagation(),s&&(this.sortTypeArray=this.sortTypeArray.map(((t,s)=>{if(s!==e)return null;switch(t){case"asc":return"desc";case"desc":return null;default:return"asc"}})),this.sortChanged.emit({colNum:e,colName:i,sortTypeArr:this.sortTypeArray}).defaultPrevented||this.sortBy(e,this.sortTypeArray))}watchData(){this.setData()}watchFooterData(){this.setFooterData()}watchColumns(){this.sortTypeArray=this.columns?this.columns.map((()=>null)):[]}componentWillLoad(){this.areAllSelected=!1,this.setData(),this.setFooterData(),this.selected=Array(this.rowData.length).fill(!1),this.sortTypeArray=this.columns?this.columns.map((()=>null)):[]}render(){var t;return!this.columns||this.sortTypeArray&&this.sortTypeArray.length===this.columns.length||(this.sortTypeArray=this.columns.map((()=>null))),i(h,{key:"
|
|
1
|
+
import{proxyCustomElement as t,HTMLElement as s,createEvent as e,h as i,Host as h,transformTag as a}from"@stencil/core/internal/client";import{d as l}from"./xpl-icon2.js";const c=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.tableSelect=e(this,"tableSelect",7),this.sortChanged=e(this,"sortChanged",3),this.selectedValues=[],this.isSortable=!1,this.sortableColumns=[],this.areAllSelected=!1,this.hasScrolled=!1,this.sortTypeArray=[],this.selectAllValue=Math.random().toString(36).slice(2),this.selectAll=t=>{const{target:s}=t;if(!(s instanceof HTMLInputElement))return;const{checked:e}=s;this.areAllSelected=e,this.selected=this.selectedValues.length>0?Array.from(this.el.querySelectorAll("tbody td:first-child input")).map((t=>e?null==t?void 0:t.value:e)):this.selected.map((()=>e)),this.onChange()},this.selectOne=(t,s)=>{const{target:e}=t;if(!(e instanceof HTMLInputElement))return;const{checked:i,value:h}=e;this.areAllSelected=!1,this.selected=this.selected.map(((t,e)=>e!==s?t:this.selectedValues.length>0&&i?h:i)),this.onChange()},this.onChange=()=>{this.tableSelect.emit({selected:this.selected,areAllSelected:this.areAllSelected})},this.onScroll=()=>{this.hasScrolled=this.container.scrollLeft>0},this.sortBy=(t,s)=>{const e=(s,e)=>s[t].toLocaleLowerCase()<e[t].toLocaleLowerCase()?-1:s[t].toLocaleLowerCase()>e[t].toLocaleLowerCase()?1:0;switch(s[t]){case"asc":this.rowData.sort(((t,s)=>e(t,s)));break;case"desc":this.rowData.sort(((t,s)=>e(s,t)));break;default:this.rowData=this.data,this.sortTypeArray[t]=null}this.rowData=Array.from(this.rowData),this.render()},this.setData=()=>{this.rowData=void 0!==this.data?Array.from(this.data):[]},this.setFooterData=()=>{this.rowFooterData=void 0!==this.footer?Array.from(this.footer):[]}}handleSort(t,s,e,i){t.preventDefault(),t.stopPropagation(),s&&(this.sortTypeArray=this.sortTypeArray.map(((t,s)=>{if(s!==e)return null;switch(t){case"asc":return"desc";case"desc":return null;default:return"asc"}})),this.sortChanged.emit({colNum:e,colName:i,sortTypeArr:this.sortTypeArray}).defaultPrevented||this.sortBy(e,this.sortTypeArray))}watchData(){this.setData()}watchFooterData(){this.setFooterData()}watchColumns(){this.sortTypeArray=this.columns?this.columns.map((()=>null)):[]}componentWillLoad(){this.areAllSelected=!1,this.setData(),this.setFooterData(),this.selected=Array(this.rowData.length).fill(!1),this.sortTypeArray=this.columns?this.columns.map((()=>null)):[]}render(){var t;return!this.columns||this.sortTypeArray&&this.sortTypeArray.length===this.columns.length||(this.sortTypeArray=this.columns.map((()=>null))),i(h,{key:"10b0bfd08e28fada9a2c8509d405c5314cce1689"},i("div",{key:"8e5b4fe928618b175a58f858f6cfd65f4bd29c53",class:"xpl-table-container",onScroll:this.onScroll,ref:t=>{this.container=t}},i("table",{key:"a6df646737b9a1d5e67cebe9eaad41911ab606ca",class:{"xpl-table":!0,"xpl-table--striped":this.striped,"xpl-table--freeze":this.freeze,"xpl-table--has-scrolled":this.hasScrolled}},this.columns&&i("thead",{key:"5f14766107d69f26b865f63c323d417f43260267"},this.columns.map(((t,s)=>{var e;const h=(t=>{switch(t){case"asc":return"arrow-up";case"desc":return"arrow-down";default:return"dash"}})(null===(e=this.sortTypeArray)||void 0===e?void 0:e[s]),a=!(!this.isSortable||!this.sortableColumns[s]);return i("th",null,i("label",{onClick:e=>this.handleSort(e,a,s,t.replace(/ /g,"-").toLowerCase()),class:a?"cursor-pointer":""},this.multiselect&&0===s&&i("input",{checked:this.areAllSelected,id:"__xpl-table-th",indeterminate:!this.areAllSelected&&this.selected.some((t=>t)),onClick:t=>{t.stopPropagation(),this.selectAll(t)},type:"checkbox",value:"select-all-"+this.selectAllValue}),t,a&&!!this.sortTypeArray[s]&&i("xpl-icon",{icon:h,size:16})))}))),i("tbody",{key:"b13ca1d1a738de189d4f040dfd309187671b341d"},this.rowData.map(((t,s)=>i("tr",{class:this.selected&&this.selected[s]?"xpl-table-row-selected":""},t.map(((t,e)=>i("td",null,this.multiselect&&0===e?i("label",{htmlFor:"__xpl-table-row-"+s},i("input",{id:"__xpl-table-row-"+s,checked:!!this.selected[s],type:"checkbox",onChange:t=>this.selectOne(t,s),value:this.selectedValues.length>0?this.selectedValues[s]:"xpl-table-checkbox-"+s}),i("div",{innerHTML:t})):i("div",{innerHTML:t})))))))),(null===(t=this.rowFooterData)||void 0===t?void 0:t.length)>0&&i("tfoot",{key:"5d45854ba21aa7e0bfaaf3b8a537e0c121538ac9"},this.rowFooterData.map((t=>i("tr",null,t.map((t=>i("td",null,i("div",{innerHTML:t})))))))))))}get el(){return this}static get watchers(){return{data:[{watchData:0}],footer:[{watchFooterData:0}],columns:[{watchColumns:0}]}}},[0,"xpl-table",{columns:[16],data:[16],footer:[16],freeze:[4],multiselect:[4],striped:[4],selectedValues:[16],isSortable:[4,"is-sortable"],sortableColumns:[16],areAllSelected:[32],rowData:[32],rowFooterData:[32],hasScrolled:[32],selected:[32],sortTypeArray:[32]},void 0,{data:[{watchData:0}],footer:[{watchFooterData:0}],columns:[{watchColumns:0}]}]),r=c,o=function(){"undefined"!=typeof customElements&&["xpl-table","xpl-icon"].forEach((t=>{switch(t){case"xpl-table":customElements.get(a(t))||customElements.define(a(t),c);break;case"xpl-icon":customElements.get(a(t))||l()}}))};export{r as XplTable,o as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as
|
|
1
|
+
import{proxyCustomElement as t,HTMLElement as e,createEvent as s,h as i,Host as n,transformTag as a}from"@stencil/core/internal/client";import{d as o}from"./xpl-dropdown2.js";import{d as l}from"./xpl-dropdown-group2.js";import{d as h}from"./xpl-dropdown-heading2.js";import{d as r}from"./xpl-dropdown-option2.js";import{d}from"./xpl-icon2.js";import{d as c}from"./xpl-select2.js";import{d as p}from"./xpl-tag2.js";let u=0;function b(t){var s,i;const n=t.querySelector("xpl-button button");if(n){const t=n.cloneNode(!0);if(t instanceof e){t.querySelectorAll(".xpl-button__icon, xpl-icon").forEach((t=>t.remove()));const e=null===(s=t.textContent)||void 0===s?void 0:s.replace(/\s+/g," ").trim();if(e)return e}}const a=t.querySelector(".xpl-tab__button");return a?Array.from(a.childNodes).filter((t=>t.nodeType===Node.TEXT_NODE)).map((t=>{var e;return(null!==(e=t.textContent)&&void 0!==e?e:"").trim()})).join(" "):null!==(i=t.getAttribute("target"))&&void 0!==i?i:""}const m=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.tabChange=s(this,"tabChange",7),this.tabHeadings=[],this.tabPanels=[],this.tablistKeydownBound=!1,this.activeBarPosition={left:0,width:0},this.choicesTick=1,this.isMobileSelectChange=!1,this.selectedValue="",this.disabled=!1,this.fullWidth=!1,this.type="tabs",this.handleTabChange=t=>{this.applySelection(t)},this.onTablistKeydown=async t=>{var e,s;if(this.disabled)return;const i=null===(s=null===(e=t.target)||void 0===e?void 0:e.closest)||void 0===s?void 0:s.call(e,"xpl-tab");if(!i||!this.tabHeadings.includes(i))return;const{key:n}=t;let a=!1,o=!1;this.isTablistRtl()?"ArrowLeft"===n||"ArrowDown"===n?a=!0:"ArrowRight"!==n&&"ArrowUp"!==n||(o=!0):"ArrowRight"===n||"ArrowDown"===n?a=!0:"ArrowLeft"!==n&&"ArrowUp"!==n||(o=!0);const l=a||o,h="Home"===n;if(!l&&!h&&"End"!==n)return;const r=this.getEnabledTabHeadingsSync();if(0===r.length)return;const d=r.indexOf(i);if(-1===d)return;let c;c=l?a?(d+1)%r.length:(d-1+r.length)%r.length:h?0:r.length-1;const p=r[c],u=null==p?void 0:p.getAttribute("target");if(!u)return;const b=i.getAttribute("target");t.preventDefault(),u!==b&&(this.applySelection(u),await p.focusTrigger(),this.tabChange.emit(u))}}onDisabledChanged(){this.syncGroupDisabledOnTabs(),this.disabled||this.syncRovingTabindex()}onFullWidthChanged(){this.syncFullWidthOnTabs()}onTypeChanged(){this.syncVariantOnTabs()}onValueChanged(t){this.applySelection(t)}connectedCallback(){this.el.hasAttribute("data-tabs-instance-id")||(u+=1,this.el.setAttribute("data-tabs-instance-id","xpl-tg-"+u)),"undefined"!=typeof MutationObserver&&(this.observer=new MutationObserver((()=>{this.collectTabs(!0)})),this.observer.observe(this.el,{childList:!0,subtree:!0}))}disconnectedCallback(){var t;null===(t=this.observer)||void 0===t||t.disconnect(),this.headingsContainerRef&&this.tablistKeydownBound&&(this.headingsContainerRef.removeEventListener("keydown",this.onTablistKeydown),this.tablistKeydownBound=!1),void 0!==this.rafId&&(cancelAnimationFrame(this.rafId),this.rafId=void 0)}componentWillLoad(){this.selectedValue=this.getDefaultValue()}componentDidLoad(){this.collectTabs(!1),this.attachTablistKeydown()}componentDidUpdate(){this.updateActiveBarPosition(),this.syncRovingTabindex()}componentDidRender(){!this.tablistKeydownBound&&this.headingsContainerRef&&this.attachTablistKeydown()}onWindowResize(){this.updateActiveBarPosition()}syncGroupDisabledOnTabs(){this.tabHeadings.forEach((t=>{this.disabled?t.setAttribute("data-group-disabled",""):t.removeAttribute("data-group-disabled")}))}applySelection(t){this.tabHeadings.forEach((e=>{t===e.getAttribute("target")?e.setAttribute("selected",""):e.removeAttribute("selected")})),this.tabPanels.forEach((e=>{t===e.getAttribute("target")?e.setAttribute("selected",""):e.removeAttribute("selected")})),this.syncGroupDisabledOnTabs(),void 0!==this.rafId&&cancelAnimationFrame(this.rafId),this.rafId=requestAnimationFrame((()=>{this.rafId=void 0,this.selectedValue=t,this.updateActiveBarPosition(),this.syncRovingTabindex()}))}isOwnedTabOrPanel(t){return t.closest("xpl-tabs")===this.el}collectTabs(t){this.tabHeadings=Array.from(this.el.querySelectorAll("xpl-tab")).filter((t=>this.isOwnedTabOrPanel(t))),this.tabPanels=Array.from(this.el.querySelectorAll("xpl-tab-panel")).filter((t=>this.isOwnedTabOrPanel(t))),this.syncVariantOnTabs(),this.syncFullWidthOnTabs(),this.applySelection(this.getDefaultValue()),t&&(this.choicesTick+=1)}syncVariantOnTabs(){this.tabHeadings.forEach((t=>{t.variant=this.type}))}syncFullWidthOnTabs(){this.tabHeadings.forEach((t=>{t.fullWidth=this.fullWidth}))}getDefaultValue(){var t,e;return this.value||(null===(e=null===(t=this.tabHeadings)||void 0===t?void 0:t[0])||void 0===e?void 0:e.getAttribute("target"))||""}async syncRovingTabindex(){this.disabled||await Promise.all(this.tabHeadings.map((async t=>{var e;const s=(null!==(e=t.getAttribute("target"))&&void 0!==e?e:"")===this.selectedValue;await t.setTabIndex(s?0:-1)})))}getEnabledTabHeadingsSync(){return this.tabHeadings.filter((t=>{if(this.disabled||t.hasAttribute("disabled"))return!1;const e=t.querySelector("segment"===t.variant?"xpl-button button":".xpl-tab__button");return!(!e||e.disabled)}))}attachTablistKeydown(){const t=this.headingsContainerRef;t&&!this.tablistKeydownBound&&(t.addEventListener("keydown",this.onTablistKeydown),this.tablistKeydownBound=!0)}isTablistRtl(){const t=this.headingsContainerRef;return!!t&&"rtl"===getComputedStyle(t).direction}renderChoices(){return this.tabHeadings.map((t=>{var e;const s=null!==(e=t.getAttribute("target"))&&void 0!==e?e:"",i=this.disabled||t.hasAttribute("disabled"),n="segment"===this.type&&t.getAttribute("icon")||void 0;return Object.assign({label:b(t),value:s,isDisabled:i},n?{icon:n}:{})}))}updateActiveBarPosition(){if("segment"===this.type)return;const t=this.tabHeadings.find((t=>t.getAttribute("target")===this.selectedValue));if(!this.headingsContainerRef||!t)return;const e=t.getBoundingClientRect(),s=this.headingsContainerRef.getBoundingClientRect(),i=e.left-s.left,n=e.width;this.activeBarPosition.left===i&&this.activeBarPosition.width===n||(this.activeBarPosition={left:i,width:n})}mobileSelectClassNames(){const t="xpl-tabs__mobile-select";return"segment"===this.type?t+" xpl-tabs__mobile-select--segment":t}render(){const t="segment"===this.type;return i(n,{key:"9998ae067e13e7c08338ae29bfe05bc3adacaa87",class:{"xpl-tabs":!0,"xpl-tabs--full-width":this.fullWidth,"xpl-tabs--segment":t},"data-choices-tick":this.choicesTick},i("xpl-select",{key:"18209c354e77267a13ce0c7380df0e419595cca7",classNames:this.mobileSelectClassNames(),choices:this.renderChoices(),disabled:this.disabled,selectedValues:this.selectedValue,onDropdownStateChange:t=>{t.detail&&(this.isMobileSelectChange=!0)},onChangeEvent:t=>{if(this.isMobileSelectChange){const e=""+t.detail;this.handleTabChange(e),this.tabChange.emit(e),this.isMobileSelectChange=!1}}}),i("nav",{key:"cf1bf2ec95fbbe7f0a6b8774cc5ce26928c7d6ca","aria-orientation":"horizontal",class:"xpl-tabs__headings",role:"tablist",ref:t=>{this.headingsContainerRef=t},onTabChange:t=>{t.stopPropagation(),this.isMobileSelectChange=!1,this.handleTabChange(t.detail),this.tabChange.emit(t.detail)}},!t&&i("div",{key:"5bfd13566a17723ec166a934bc72e59307eacb8c",class:"xpl-tabs__active-bar",style:{transform:`translateX(${this.activeBarPosition.left}px)`,width:this.activeBarPosition.width+"px"}}),i("slot",{key:"52baf508a46759fe908f8721b3089d3db0189383",name:"heading"})),i("div",{key:"363fe87f244eace0dc0af0903e0b8c25da3a613f",class:"xpl-tabs__panels"},i("slot",{key:"f3872844f486cf831bca26a228eba88fa18b42c3",name:"panel"})))}get el(){return this}static get watchers(){return{disabled:[{onDisabledChanged:0}],fullWidth:[{onFullWidthChanged:0}],type:[{onTypeChanged:0}],value:[{onValueChanged:0}]}}},[260,"xpl-tabs",{disabled:[4],fullWidth:[4,"full-width"],type:[513],value:[1],activeBarPosition:[32],choicesTick:[32],isMobileSelectChange:[32],selectedValue:[32]},[[9,"resize","onWindowResize"]],{disabled:[{onDisabledChanged:0}],fullWidth:[{onFullWidthChanged:0}],type:[{onTypeChanged:0}],value:[{onValueChanged:0}]}]),f=m,g=function(){"undefined"!=typeof customElements&&["xpl-tabs","xpl-dropdown","xpl-dropdown-group","xpl-dropdown-heading","xpl-dropdown-option","xpl-icon","xpl-select","xpl-tag"].forEach((t=>{switch(t){case"xpl-tabs":customElements.get(a(t))||customElements.define(a(t),m);break;case"xpl-dropdown":customElements.get(a(t))||o();break;case"xpl-dropdown-group":customElements.get(a(t))||l();break;case"xpl-dropdown-heading":customElements.get(a(t))||h();break;case"xpl-dropdown-option":customElements.get(a(t))||r();break;case"xpl-icon":customElements.get(a(t))||d();break;case"xpl-select":customElements.get(a(t))||c();break;case"xpl-tag":customElements.get(a(t))||p()}}))};export{f as XplTabs,g as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as
|
|
1
|
+
import{proxyCustomElement as t,HTMLElement as s,createEvent as i,h as a,Host as e,transformTag as h}from"@stencil/core/internal/client";import{d as n}from"./xpl-icon2.js";const l=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.close=i(this,"close",7),this.tagDragEnd=i(this,"tagDragEnd",7),this.tagDragStart=i(this,"tagDragStart",7),this.tagRemove=i(this,"tagRemove",7),this.dismissAriaLabelSuffix="tag",this.isDragging=!1,this.disabled=!1,this.dismissible=!0,this.isDraggable=!1,this.size="default",this.handleTagClick=()=>{this.disabled||this.isDraggable||this.close.emit()},this.setDragPreviewToHost=t=>{if(t.dataTransfer)try{const s=this.el.getBoundingClientRect(),i=Math.max(0,t.clientX-s.left),a=Math.max(0,t.clientY-s.top);t.dataTransfer.setDragImage(this.el,i,a)}catch(t){}},this.handleContentKeyDown=t=>{this.disabled||"Enter"!==t.key&&" "!==t.key||t.preventDefault()},this.handleDismissClick=t=>{t.stopPropagation(),this.disabled||(this.close.emit(),this.tagRemove.emit())},this.handleDragStart=t=>{this.isDragging=!0,t.dataTransfer&&(t.dataTransfer.effectAllowed="move",this.setDragPreviewToHost(t),this.tagId&&t.dataTransfer.setData("application/x-tag-id",this.tagId),t.dataTransfer.setData("text/plain",this.getContentLabelText())),this.tagDragStart.emit({tagId:this.tagId,content:this.getContentLabelText(),originalEvent:t})},this.handleDragEnd=t=>{var s;this.isDragging=!1;const i="move"===(null===(s=t.dataTransfer)||void 0===s?void 0:s.dropEffect);this.tagDragEnd.emit({tagId:this.tagId,dropped:i,originalEvent:t})},this.handleDragOver=t=>{!this.disabled&&this.isDraggable&&(t.preventDefault(),t.dataTransfer&&(t.dataTransfer.dropEffect="move"))},this.handleDragEnter=t=>{!this.disabled&&this.isDraggable&&t.preventDefault()},this.handleHostDragStart=t=>{t.target===this.el&&this.isDraggable&&t.preventDefault()}}onDisabledChange(t){t&&this.isDragging&&(this.isDragging=!1)}onIsDraggableChange(t){!t&&this.isDragging&&(this.isDragging=!1)}componentDidRender(){queueMicrotask((()=>this.syncDismissAriaLabelSuffix()))}getContentLabelText(){var t,s;return(null!==(s=null===(t=this.el.querySelector(".xpl-tag__content"))||void 0===t?void 0:t.textContent)&&void 0!==s?s:"").trim()}syncDismissAriaLabelSuffix(){if(!this.el.isConnected)return;const t=this.getContentLabelText(),s=""===t?"tag":t;s!==this.dismissAriaLabelSuffix&&(this.dismissAriaLabelSuffix=s)}render(){const t=this.isDraggable&&!this.disabled;return a(e,{key:"7e85098bb9f5e8c0fceee3e7947337e0799c4de8",class:{"xpl-tag":!0,"xpl-tag-container":!0,"xpl-tag--disabled":this.disabled,"xpl-tag--dismissible":this.dismissible,"xpl-tag--dragging":this.isDragging,"xpl-tag--draggable":t,"xpl-tag--sm":"sm"===this.size},onDragOver:t?this.handleDragOver:void 0,onDragEnter:t?this.handleDragEnter:void 0,onDragStart:this.isDraggable?this.handleHostDragStart:void 0},t?a("div",{class:"xpl-tag__content xpl-tag",role:"button",tabIndex:0,draggable:!0,"aria-grabbed":String(this.isDragging),onClick:this.handleTagClick,onKeyDown:this.handleContentKeyDown,onDragStart:this.handleDragStart,onDragEnd:this.handleDragEnd},a("slot",null)):a("button",{class:"xpl-tag__content xpl-tag",type:"button",disabled:this.disabled,onClick:this.handleTagClick},a("slot",null)),this.dismissible&&a("button",{key:"cb875506819a0a58d42add85a1a09e95e4786eba",class:"xpl-tag__dismiss xpl-tag__close",type:"button",draggable:!1,disabled:this.disabled,"aria-label":`Dismiss ${this.dismissAriaLabelSuffix}`,onClick:this.handleDismissClick},a("xpl-icon",{key:"431f061a4c96dacb9dc76a753c9d2de01491b2be",icon:"xmark",size:10})))}get el(){return this}static get watchers(){return{disabled:[{onDisabledChange:0}],isDraggable:[{onIsDraggableChange:0}]}}},[260,"xpl-tag",{disabled:[4],dismissible:[4],isDraggable:[4,"is-draggable"],size:[1],tagId:[1,"tag-id"],dismissAriaLabelSuffix:[32],isDragging:[32]},void 0,{disabled:[{onDisabledChange:0}],isDraggable:[{onIsDraggableChange:0}]}]);function o(){"undefined"!=typeof customElements&&["xpl-tag","xpl-icon"].forEach((t=>{switch(t){case"xpl-tag":customElements.get(h(t))||customElements.define(h(t),l);break;case"xpl-icon":customElements.get(h(t))||n()}}))}export{l as T,o as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as t,HTMLElement as s,h as
|
|
1
|
+
import{proxyCustomElement as t,HTMLElement as s,h as e,Host as a,transformTag as i}from"@stencil/core/internal/client";import{d as c}from"./xpl-icon2.js";const o=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.variant="neutral",this.showIcon=!0,this.dismissable=!0,this.timeout=8e3,this.handleAnimationEnd=()=>{var t,s;(null===(t=this.el)||void 0===t?void 0:t.classList.contains("xpl-toast--dismissed"))&&(null===(s=this.el)||void 0===s||s.remove())},this.getIcon=()=>{switch(this.variant){case"warning":return e("xpl-icon",{size:24,icon:"alert-hex"});case"success":return e("xpl-icon",{size:24,icon:"check-circle"});default:return e("xpl-icon",{size:24,icon:"comment-alt"})}},this.dismiss=()=>{var t;null===(t=this.el)||void 0===t||t.classList.add("xpl-toast--dismissed")}}componentDidLoad(){this.actionSlot.children.length<1&&setTimeout((()=>{this.dismiss()}),this.timeout)}render(){var t;return e(a,{key:"4f470ceb525c35a86ddbf65365fac1674ebe7033",class:"xpl-toast xpl-toast--"+this.variant,onAnimationEnd:this.handleAnimationEnd},e("div",{key:"04da6ca2777ceb222da2f4fd831d8aef5101a667",class:"xpl-toast__left"},this.showIcon&&e("div",{key:"0e5e75aa05e96361700c0c7b9eccbc4c5b75a00c",class:"xpl-toast__icon xpl-toast__icon--"+this.variant},this.getIcon()),e("div",{key:"f1ccc651318b6d7128255918bdd68ef36a249e9f",class:"xpl-toast__notification"},e("p",{key:"1ae879d8a670a0f1a4928bfa2a0692581040dca1",class:"xpl-toast__title"},e("slot",{key:"b819a773c11b88cb00f8638db8a960de55ce6508",name:"title"})),""!==this.caption&&e("p",{key:"8f6eb8dd769e4aaf5b16b3caafd9e9ec5408a7e1",class:"xpl-toast__caption"},null===(t=this.caption)||void 0===t?void 0:t.substring(0,85)))),e("div",{key:"46ae2f04fa38b50d2a07082b6972590f6bd28005",class:"xpl-toast__action",ref:t=>{this.actionSlot=t}},e("slot",{key:"69512a9b482bb54252527d798dfa2884a19b7d8c",name:"action"})),this.dismissable&&e("div",{key:"818a5f9dde1a9c9b7ab3cd62cd807200e3687af6",class:"xpl-toast__close"},e("button",{key:"3a617189f8f031e119a125efce0ab35a7f5cf31f",tabIndex:0,onClick:this.dismiss},e("xpl-icon",{key:"d86187aed0665da278f953be5ab92f7051f44438",icon:"x"}))))}get el(){return this}},[260,"xpl-toast",{variant:[1],showIcon:[4,"show-icon"],caption:[1],dismissable:[4],timeout:[2]}]),n=o,l=function(){"undefined"!=typeof customElements&&["xpl-toast","xpl-icon"].forEach((t=>{switch(t){case"xpl-toast":customElements.get(i(t))||customElements.define(i(t),o);break;case"xpl-icon":customElements.get(i(t))||c()}}))};export{n as XplToast,l as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as t,h as l,Host as s,transformTag as i}from"@stencil/core/internal/client";import{v as a}from"./v4.js";const c=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.variant="default",this.id=a()}render(){let e="xpl-toggle-container";this.disabled&&(e+=" xpl-toggle-container--disabled");let t="xpl-toggle";return"small"===this.variant&&(t+=" xpl-toggle--small"),l(s,{key:"
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as t,h as l,Host as s,transformTag as i}from"@stencil/core/internal/client";import{v as a}from"./v4.js";const c=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.variant="default",this.id=a()}render(){let e="xpl-toggle-container";this.disabled&&(e+=" xpl-toggle-container--disabled");let t="xpl-toggle";return"small"===this.variant&&(t+=" xpl-toggle--small"),l(s,{key:"0cf2e99934bbe447559fbe88cc61989bbfabbdea",class:e},(this.heading||this.description)&&l("label",{key:"7ab6e5535b8d88a5aabb5ced76faca68b2a8abcd",class:{"xpl-label":!0,"xpl-label--disabled":this.disabled},htmlFor:this.id},this.heading,this.description&&l("small",{key:"0b8157e097f3890d6c521c399cf1f9c25514e341",class:{"xpl-description":!0,"xpl-description--disabled":this.disabled}},this.description)),l("input",{key:"3bcfe674974e16e50a38d17836da0aa1c49fd6dc",class:t,type:"checkbox",checked:this.checked,disabled:this.disabled,id:this.id,name:this.name}),this.label&&l("label",{key:"cc91cdb86fb6bb4c7bfbabb6d47edf03adb53857",htmlFor:this.id},this.label))}},[0,"xpl-toggle",{checked:[4],description:[1],disabled:[4],heading:[1],label:[1],name:[1],variant:[1],id:[32]}]),d=c,b=function(){"undefined"!=typeof customElements&&["xpl-toggle"].forEach((e=>{"xpl-toggle"===e&&(customElements.get(i(e))||customElements.define(i(e),c))}))};export{d as XplToggle,b as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as t,h as
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as t,h as a,Host as o,transformTag as s}from"@stencil/core/internal/client";const c=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.selectedItemCount=0}componentDidLoad(){const e=this.el.querySelector('[slot="actions-right"]');null!==e&&(e.style.marginLeft="auto")}listenToSelectedItemCountChange(e){this.selectedItemCount=e.detail.length}render(){return a(o,{key:"156bc52063283c17215e1d3a90c25939ae92685b",class:{"xpl-toolbar":!0,dark:!0,hidden:0===this.selectedItemCount}},a("div",{key:"184e28d57a16d8ba6e10f29a95c931a036f44515",class:"toolbar"},a("p",{key:"ff6a7137db216c71859eac4398bbaf8bc6fe18f9",class:"selected-item-count"},this.selectedItemCount," Selected"),a("div",{key:"a610539a08383a3d1d3dad8d95a8b75f43eaf1a3",class:"actions"},a("slot",{key:"dd8ea3150b40926ab40f36d38770daaa969a6fff",name:"actions-left"}),a("slot",{key:"b51f8940fb52dd6880841a917574f782e0d0c72c",name:"actions-right"}))))}get el(){return this}},[260,"xpl-toolbar",{selectedItemCount:[2,"selected-item-count"]},[[8,"selectedItemCountChange","listenToSelectedItemCountChange"]]]),n=c,l=function(){"undefined"!=typeof customElements&&["xpl-toolbar"].forEach((e=>{"xpl-toolbar"===e&&(customElements.get(s(e))||customElements.define(s(e),c))}))};export{n as XplToolbar,l as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as e,proxyCustomElement as t,HTMLElement as o,Host as
|
|
1
|
+
import{h as e,proxyCustomElement as t,HTMLElement as o,Host as a,transformTag as i}from"@stencil/core/internal/client";const l=()=>e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"17",height:"14"},e("g",{filter:"url(#a)"},e("path",{d:"M0 5h15l-7.5 7.5L0 5Z"})),e("defs",null,e("filter",{id:"a",width:"20",height:"8.171",x:".5",y:"5","color-interpolation-filters":"sRGB",filterUnits:"userSpaceOnUse"},e("feFlood",{"flood-opacity":"0",result:"BackgroundImageFix"}),e("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),e("feOffset",{dy:"1"}),e("feComposite",{in2:"hardAlpha",operator:"out"}),e("feColorMatrix",{values:"0 0 0 0 0.882353 0 0 0 0 0.886275 0 0 0 0 0.909804 0 0 0 1 0"}),e("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_20073_3067"}),e("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_20073_3067",result:"shape"})))),r=t(class extends o{constructor(e){super(),!1!==e&&this.__registerHost(),this.position="top-middle",this.hideArrow=!1}render(){return e(a,{key:"a118d629923a433680360f746e063ca94d5f1c6a"},e("div",{key:"cfd9742ee2cebd56994480bd2a601cb4e93b12a9",class:"xpl-tooltip-container"},e("slot",{key:"8aae99e1a187f8f737e896ccfd00d67f1cfeb3b3"}),e("div",{key:"4b418074b2ac7f8760f09e3af033ea93f7a0012e",class:`xpl-tooltip xpl-tooltip--${this.position}`},this.text),!this.hideArrow&&e("div",{key:"ef6a166f78250f1f98eae41661fd7020b36eeaae",class:"xpl-tooltip-arrow"},e(l,{key:"7baecae00ab178f715c89443d250b068861afe5f"}))))}},[260,"xpl-tooltip",{text:[1],position:[1],hideArrow:[4,"hide-arrow"]}]);function s(){"undefined"!=typeof customElements&&["xpl-tooltip"].forEach((e=>{"xpl-tooltip"===e&&(customElements.get(i(e))||customElements.define(i(e),r))}))}export{r as T,s as d}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface XplTopNavItem extends Components.XplTopNavItem, HTMLElement {}
|
|
4
|
+
export const XplTopNavItem: {
|
|
5
|
+
prototype: XplTopNavItem;
|
|
6
|
+
new (): XplTopNavItem;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{T as o,d as t}from"./xpl-top-nav-item2.js";const p=o,s=t;export{p as XplTopNavItem,s as defineCustomElement}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{proxyCustomElement as t,HTMLElement as i,createEvent as s,h as e,Host as o,transformTag as n}from"@stencil/core/internal/client";import{d as l}from"./xpl-icon2.js";const r=t(class t extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.navItemClick=s(this,"navItemClick",7),this.hasDropdown=!1,this.hostListitemRole=!1,this.open=!1,this.active=!1,this.icon="",this.selected=!1,this.onDocClickCapture=t=>{if(!this.hasDropdown||!this.open)return;const i=t.target;i&&!this.el.contains(i)&&(this.open=!1)},this.onDocKeyDownCapture=t=>{this.hasDropdown&&this.open&&"Escape"===t.key&&(t.preventDefault(),t.stopPropagation(),this.open=!1)},this.handleClick=t=>{if(this.hasDropdown)return t.preventDefault(),t.stopPropagation(),this.broadcastCloseOtherDropdownHosts(),void(this.open=!this.open);this.navItemClick.emit(t)},this.handleKeyDown=t=>{if(null!=this.href&&!this.hasDropdown){if("Enter"===t.key)return;if(" "===t.key){t.preventDefault();const i=this.el.querySelector(".xpl-top-nav-item__inner");return void(null==i||i.click())}}"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),this.handleClick(this.syntheticActivationClickFromKeyboard(t)))}}onHasDropdownChanged(){this.hasDropdown||(this.open=!1),this.syncDropdownDocListeners()}connectedCallback(){this.syncHostListitemRole(),this.syncHasDropdownFromDom(),this.syncDropdownDocListeners(),this.connectDropdownSlotObserver()}disconnectedCallback(){void 0!==this.deferredHasDropdownObserverSyncTimeoutId&&(clearTimeout(this.deferredHasDropdownObserverSyncTimeoutId),this.deferredHasDropdownObserverSyncTimeoutId=void 0),void 0!==this.deferredPostRenderTopNavItemTimeoutId&&(clearTimeout(this.deferredPostRenderTopNavItemTimeoutId),this.deferredPostRenderTopNavItemTimeoutId=void 0),this.disconnectDropdownSlotObserver(),this.disconnectListitemContextObservers();const t=this.el.ownerDocument;t.removeEventListener("click",this.onDocClickCapture,!0),t.removeEventListener("keydown",this.onDocKeyDownCapture,!0)}componentWillLoad(){this.syncHostListitemRole(),this.syncHasDropdownFromDom(),this.syncDropdownDocListeners()}componentWillRender(){this.disconnectDropdownSlotObserver(),this.disconnectListitemContextObservers()}componentDidRender(){this.schedulePostRenderTopNavItemWork()}handleCloseNavDropdownRequest(){this.hasDropdown&&this.open&&(this.open=!1)}scheduleHasDropdownSyncFromObserver(){void 0!==this.deferredHasDropdownObserverSyncTimeoutId&&clearTimeout(this.deferredHasDropdownObserverSyncTimeoutId),this.deferredHasDropdownObserverSyncTimeoutId=setTimeout((()=>{this.deferredHasDropdownObserverSyncTimeoutId=void 0,this.el.isConnected&&this.syncHasDropdownFromDom()}),0)}connectDropdownSlotObserver(){this.disconnectDropdownSlotObserver(),"undefined"!=typeof MutationObserver&&(this.dropdownSlotObserver=new MutationObserver((()=>{this.scheduleHasDropdownSyncFromObserver()})),this.dropdownSlotObserver.observe(this.el,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["slot"]}))}disconnectDropdownSlotObserver(){var t;null===(t=this.dropdownSlotObserver)||void 0===t||t.disconnect(),this.dropdownSlotObserver=void 0}disconnectListitemContextObservers(){var t,i;null===(t=this.parentListitemContextObserver)||void 0===t||t.disconnect(),this.parentListitemContextObserver=void 0,null===(i=this.selfListitemContextObserver)||void 0===i||i.disconnect(),this.selfListitemContextObserver=void 0}connectListitemContextObservers(){if(this.disconnectListitemContextObservers(),"undefined"==typeof MutationObserver||!this.el.isConnected)return;this.selfListitemContextObserver=new MutationObserver((()=>{this.schedulePostRenderTopNavItemWork()})),this.selfListitemContextObserver.observe(this.el,{attributes:!0,attributeFilter:["class","slot"]});const t=this.el.parentElement;if(t){this.parentListitemContextObserver=new MutationObserver((()=>{this.schedulePostRenderTopNavItemWork()}));const i="xpl-top-nav"===t.tagName.toLowerCase()&&"left-aside"===this.el.getAttribute("slot")?t.querySelector(".xpl-top-nav__left-primary"):null;this.parentListitemContextObserver.observe(null!=i?i:t,{attributes:!0,attributeFilter:["role"],subtree:!1})}}schedulePostRenderTopNavItemWork(){void 0!==this.deferredPostRenderTopNavItemTimeoutId&&clearTimeout(this.deferredPostRenderTopNavItemTimeoutId),this.deferredPostRenderTopNavItemTimeoutId=setTimeout((()=>{this.deferredPostRenderTopNavItemTimeoutId=void 0,this.el.isConnected&&(this.syncHostListitemRole(),this.connectListitemContextObservers(),this.connectDropdownSlotObserver())}),0)}syncDropdownDocListeners(){const t=this.el.ownerDocument;t.removeEventListener("click",this.onDocClickCapture,!0),t.removeEventListener("keydown",this.onDocKeyDownCapture,!0),this.hasDropdown&&(t.addEventListener("click",this.onDocClickCapture,!0),t.addEventListener("keydown",this.onDocKeyDownCapture,!0))}syncHasDropdownFromDom(){this.hasDropdown=!!this.el.querySelector('[slot="dropdown"]')}getNavDropdownBroadcastRoot(){var t,i;return null!==(i=null!==(t=this.el.closest("xpl-top-nav"))&&void 0!==t?t:this.el.closest("xpl-nav-header-menu"))&&void 0!==i?i:this.el.ownerDocument}broadcastCloseOtherDropdownHosts(){this.getNavDropdownBroadcastRoot().querySelectorAll("xpl-top-nav-item").forEach((t=>{t!==this.el&&t.dispatchEvent(new CustomEvent("_xplCloseNavDropdown",{bubbles:!1}))}))}syntheticActivationClickFromKeyboard(t){var i;const s=this.el.querySelector(".xpl-top-nav-item__inner"),e=null==s?void 0:s.getBoundingClientRect();return new MouseEvent("click",{bubbles:!0,cancelable:!0,button:0,clientX:e?e.left+e.width/2:0,clientY:e?e.top+e.height/2:0,view:null!==(i=t.view)&&void 0!==i?i:void 0})}static isInternalRenderedHostChild(t){return t.classList.contains("xpl-top-nav-item__inner")||t.classList.contains("xpl-top-nav-item__dropdown")}hasNonDropdownLightDomChild(){return Array.from(this.el.childNodes).some((i=>{var s;if(i.nodeType===Node.TEXT_NODE)return Boolean(null===(s=i.textContent)||void 0===s?void 0:s.trim());if(i.nodeType===Node.ELEMENT_NODE){const s=i;return!t.isInternalRenderedHostChild(s)&&"dropdown"!==s.getAttribute("slot")}return!1}))}getInnerAriaLabel(){var t,i,s;if(null===(t=this.label)||void 0===t?void 0:t.trim())return;if(this.hasNonDropdownLightDomChild())return;return(null===(i=this.itemAriaLabel)||void 0===i?void 0:i.trim())||((null===(s=this.icon)||void 0===s?void 0:s.trim())?"Navigation item":void 0)}computeHostListitemRole(){const{el:t}=this;if(t.classList.contains("xpl-top-nav__brand"))return!1;if("right-aside-mobile"===t.getAttribute("slot"))return!1;const i=t.parentElement;return"list"===(null==i?void 0:i.getAttribute("role"))||null!=i&&"xpl-nav-header-menu"===i.tagName.toLowerCase()||"left-aside"===t.getAttribute("slot")&&"xpl-top-nav"===(null==i?void 0:i.tagName.toLowerCase())&&null!=i.querySelector('.xpl-top-nav__left-primary[role="list"]')}syncHostListitemRole(){const t=this.computeHostListitemRole();this.hostListitemRole!==t&&(this.hostListitemRole=t)}renderInner(){const t=this.selected?"page":void 0,i=this.hasDropdown?this.open?"true":"false":void 0,s=this.getInnerAriaLabel(),o=Object.assign(Object.assign({class:"xpl-top-nav-item__inner",tabIndex:0,"aria-current":t,"aria-expanded":i},s?{"aria-label":s}:{}),{onClick:this.handleClick,onKeyDown:this.handleKeyDown});return null==this.href||this.hasDropdown?e("div",Object.assign({},o,{role:"button"}),this.icon&&e("xpl-icon",{size:16,icon:this.icon}),this.label?e("span",{class:"xpl-top-nav-item__label",title:this.label},this.label):e("slot",null),this.hasDropdown&&e("xpl-icon",{icon:"chevron-down"})):e("a",Object.assign({},o,{href:this.href}),this.icon&&e("xpl-icon",{size:16,icon:this.icon}),this.label?e("span",{class:"xpl-top-nav-item__label",title:this.label},this.label):e("slot",null))}render(){return e(o,Object.assign({key:"4758b54726318591f140bcfea8d4db22c70c96ff",class:{"xpl-top-nav-item":!0,"xpl-top-nav-item--active":this.active,"xpl-top-nav-item--dropdown-open":this.open,"xpl-top-nav-item--has-dropdown":this.hasDropdown,"xpl-top-nav-item--selected":this.selected,dark:!0}},this.hostListitemRole?{role:"listitem"}:{}),this.renderInner(),this.hasDropdown&&e("div",{key:"65f53889e4815fb974d7abe12d13dd8be19c1943",class:"xpl-top-nav-item__dropdown"},e("slot",{key:"2f4f164deaec561be73a13e2303cc13e037699bb",name:"dropdown"})))}get el(){return this}static get watchers(){return{hasDropdown:[{onHasDropdownChanged:0}]}}},[260,"xpl-top-nav-item",{active:[516],href:[1],icon:[1],itemAriaLabel:[1,"item-aria-label"],label:[1],selected:[516],hasDropdown:[32],hostListitemRole:[32],open:[32]},[[0,"_xplCloseNavDropdown","handleCloseNavDropdownRequest"]],{hasDropdown:[{onHasDropdownChanged:0}]}]);function h(){"undefined"!=typeof customElements&&["xpl-top-nav-item","xpl-icon"].forEach((t=>{switch(t){case"xpl-top-nav-item":customElements.get(n(t))||customElements.define(n(t),r);break;case"xpl-icon":customElements.get(n(t))||l()}}))}export{r as T,h as d}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface XplTopNav extends Components.XplTopNav, HTMLElement {}
|
|
4
|
+
export const XplTopNav: {
|
|
5
|
+
prototype: XplTopNav;
|
|
6
|
+
new (): XplTopNav;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{proxyCustomElement as t,HTMLElement as s,createEvent as e,h as i,Host as n,transformTag as o}from"@stencil/core/internal/client";import{d as a}from"./xpl-button2.js";import{d as l}from"./xpl-icon2.js";import{d as r}from"./xpl-popover2.js";import{d as h}from"./xpl-top-nav-item2.js";const c=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.brandClick=e(this,"brandClick",7),this.navOpen=e(this,"navOpen",7),this.userPopoverDrawerSyncHost=null,this.brandLogoSlotPresent=!1,this.open=!1,this.userMenuSlotPresent=!1,this.userMenuTriggerSlotPresent=!1,this.focusNavControlAfterClose=()=>{void 0!==this.navControlFocusTimeoutId&&clearTimeout(this.navControlFocusTimeoutId),this.navControlFocusTimeoutId=setTimeout((()=>{var t;this.navControlFocusTimeoutId=void 0,null===(t=this.el.querySelector(".xpl-top-nav__nav-control"))||void 0===t||t.focus()}),0)},this.handleUserPopoverIsOpenChange=t=>{const{detail:s}=t;!0===s&&this.closeMobileDrawerWhenAccountMenuOpens()},this.onBrandNavItemClick=t=>{null==this.brandHref&&this.brandClick.emit(t.detail)},this.onDocKeyDownEscape=t=>{this.navControl&&this.open&&"Escape"===t.key&&(this.anyDescendantPopoverIsOpen()||this.el.querySelector("xpl-top-nav-item.xpl-top-nav-item--dropdown-open")||(t.preventDefault(),t.stopPropagation(),this.open=!1,this.navOpen.emit(!1),this.focusNavControlAfterClose()))},this.onNavToggle=()=>{const t=this.open;this.open=!this.open,this.navOpen.emit(this.open),t&&!this.open&&this.focusNavControlAfterClose()},this.onUserPopoverInnerOpenClassChange=()=>{const t=this.userPopoverDrawerSyncHost;if(!t)return;const s=t.querySelector(".xpl-popover");(null==s?void 0:s.classList.contains("xpl-popover--is-open"))&&this.closeMobileDrawerWhenAccountMenuOpens()},this.syncBrandLogoSlot=()=>{const t=null!=this.el.querySelector('[slot="brand-logo"]');t!==this.brandLogoSlotPresent&&(this.brandLogoSlotPresent=t)},this.syncUserMenuSlots=()=>{const t=null!=this.el.querySelector('[slot="user-menu"]'),s=null!=this.el.querySelector('[slot="user-menu-trigger"]');t!==this.userMenuSlotPresent&&(this.userMenuSlotPresent=t),s!==this.userMenuTriggerSlotPresent&&(this.userMenuTriggerSlotPresent=s)}}onNavControlChanged(){this.syncOpenFromNavControl(),this.syncDocEscapeListener()}connectedCallback(){this.syncOpenFromNavControl(),this.syncDocEscapeListener(),this.syncBrandLogoSlot(),this.syncUserMenuSlots(),this.connectSlotContentObserver()}disconnectedCallback(){void 0!==this.navControlFocusTimeoutId&&(clearTimeout(this.navControlFocusTimeoutId),this.navControlFocusTimeoutId=void 0),void 0!==this.deferredSlotContentObserverSyncTimeoutId&&(clearTimeout(this.deferredSlotContentObserverSyncTimeoutId),this.deferredSlotContentObserverSyncTimeoutId=void 0),this.removeDocEscapeListener(),this.disconnectSlotContentObserver(),this.disconnectUserPopoverDrawerSync()}componentWillLoad(){this.syncOpenFromNavControl(),this.syncBrandLogoSlot(),this.syncUserMenuSlots()}componentWillRender(){this.disconnectSlotContentObserver()}componentDidRender(){this.connectSlotContentObserver(),this.connectUserPopoverDrawerSync()}get childAccountLabelText(){var t,s;return null!==(s=null===(t=this.childAccountLabel)||void 0===t?void 0:t.trim())&&void 0!==s?s:""}get hasBrand(){var t,s,e,i;const n=null!==(s=null===(t=this.brandName)||void 0===t?void 0:t.trim())&&void 0!==s?s:"",o=null!==(i=null===(e=this.brandLogo)||void 0===e?void 0:e.trim())&&void 0!==i?i:"";return n.length>0||o.length>0||this.brandLogoSlotPresent}get hasUserMenu(){return this.userMenuSlotPresent}get needsUserMenuSlotStash(){return!this.userMenuSlotPresent&&this.userMenuTriggerSlotPresent}get usesBuiltInChildAccountTrigger(){return this.hasUserMenu&&!this.userMenuTriggerSlotPresent}anyDescendantPopoverIsOpen(){const t=this.el.querySelectorAll("xpl-popover");for(let s=0;s<t.length;s+=1){const e=t[s].querySelector(".xpl-popover");if(null==e?void 0:e.classList.contains("xpl-popover--is-open"))return!0}return!1}closeMobileDrawerWhenAccountMenuOpens(){this.navControl&&this.open&&(this.open=!1,this.navOpen.emit(!1))}connectSlotContentObserver(){this.disconnectSlotContentObserver(),"undefined"!=typeof MutationObserver&&(this.slotContentObserver=new MutationObserver((()=>{this.scheduleSlotContentSyncFromObserver()})),this.slotContentObserver.observe(this.el,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["slot"]}))}connectUserPopoverDrawerSync(){const t=this.hasUserMenu?this.el.querySelector("xpl-popover.xpl-top-nav__user-popover"):null;if(t===this.userPopoverDrawerSyncHost)return;if(this.disconnectUserPopoverDrawerSync(),!t)return;this.userPopoverDrawerSyncHost=t,t.addEventListener("isOpenChange",this.handleUserPopoverIsOpenChange);const s=t.querySelector(".xpl-popover");s&&"undefined"!=typeof MutationObserver&&(this.userPopoverDrawerOpenObserver=new MutationObserver((()=>{this.onUserPopoverInnerOpenClassChange()})),this.userPopoverDrawerOpenObserver.observe(s,{attributes:!0,attributeFilter:["class"]}),this.onUserPopoverInnerOpenClassChange())}disconnectSlotContentObserver(){var t;null===(t=this.slotContentObserver)||void 0===t||t.disconnect(),this.slotContentObserver=void 0}disconnectUserPopoverDrawerSync(){var t;this.userPopoverDrawerSyncHost&&(this.userPopoverDrawerSyncHost.removeEventListener("isOpenChange",this.handleUserPopoverIsOpenChange),this.userPopoverDrawerSyncHost=null),null===(t=this.userPopoverDrawerOpenObserver)||void 0===t||t.disconnect(),this.userPopoverDrawerOpenObserver=void 0}removeDocEscapeListener(){this.el.ownerDocument.removeEventListener("keydown",this.onDocKeyDownEscape,!1)}scheduleSlotContentSyncFromObserver(){void 0!==this.deferredSlotContentObserverSyncTimeoutId&&clearTimeout(this.deferredSlotContentObserverSyncTimeoutId),this.deferredSlotContentObserverSyncTimeoutId=setTimeout((()=>{this.deferredSlotContentObserverSyncTimeoutId=void 0,this.el.isConnected&&(this.syncBrandLogoSlot(),this.syncUserMenuSlots())}),0)}syncDocEscapeListener(){this.removeDocEscapeListener(),this.navControl&&this.el.ownerDocument.addEventListener("keydown",this.onDocKeyDownEscape,!1)}syncOpenFromNavControl(){const t=this.open;this.open=!1,t&&!this.navControl&&this.navOpen.emit(!1)}render(){var t,s,e,o;return i(n,{key:"9f65d609c6b4cf08b2899216fe8bc70fe0e12db9",class:{"xpl-top-nav":!0,"xpl-top-nav--nav-control":!!this.navControl,"xpl-top-nav--open":this.open,"xpl-top-nav--has-child-account-label":this.childAccountLabelText.length>0,"xpl-top-nav--has-brand":this.hasBrand,"xpl-top-nav--has-user-menu":this.hasUserMenu,dark:!0}},i("nav",{key:"a3d613acbe13866886bca363372127e8e869ec2c","aria-label":null!==(t=this.label)&&void 0!==t?t:"top-navigation-bar",class:"xpl-top-nav__bar"},i("div",{key:"b7057ef80f36e98def53bbfc2a39bd30bacd9b4c",class:"xpl-top-nav__inner-left"},this.navControl&&i("button",{key:"3c4091842c7e4c1a62fea5446f6e29486617b11a",type:"button",class:"xpl-top-nav__nav-control","aria-expanded":this.open?"true":"false","aria-label":this.open?"Close navigation menu":"Open navigation menu",onClick:this.onNavToggle},i("xpl-icon",{key:"cd5fd2cd1cf1dae5c765b63678e14cb87588c3b2",class:"xpl-top-nav__control-icon",icon:"menu",size:20})),this.hasBrand&&i("div",{key:"3cabfe3ce8ff58d9aed0ed9b4adccd896f6cad08",class:"xpl-top-nav__brand-bar"},i("xpl-top-nav-item",{key:"bca3924f36affd16b6c17d0d8cc1ccc57c488ef6",class:"xpl-top-nav__brand",href:this.brandHref,onNavItemClick:this.onBrandNavItemClick},(null===(s=this.brandLogo)||void 0===s?void 0:s.trim())?i("img",{class:"xpl-top-nav__brand-logo",src:this.brandLogo,alt:(null===(e=this.brandName)||void 0===e?void 0:e.trim())?this.brandName.trim():"Brand"}):this.brandLogoSlotPresent?i("span",{class:"xpl-top-nav__brand-logo-slot"},i("slot",{name:"brand-logo"})):null,(null===(o=this.brandName)||void 0===o?void 0:o.trim())?i("span",{class:"xpl-top-nav__brand-name"},this.brandName.trim()):null)),i("div",{key:"1e9a1af5fbeca22c0f440556c121c38b8528d9ba",class:{"xpl-top-nav__aside":!0,"xpl-nav-left":!0}},i("div",{key:"b5d67e1adf5bc6a751be3d8bfa448bdb682039bc",class:"xpl-top-nav__left-primary",role:"list"},i("slot",{key:"c738eb6fbda41c8320fa2645fb88f43ef11731b6",name:"left-aside"})))),i("div",{key:"8573832a3922746b2301f9bc8b4fa6ab7e1ac441",class:{"xpl-top-nav__aside":!0,"xpl-nav-right":!0}},i("div",{key:"a21b318496a47000cde7a0346d3376999e7893ea",class:"xpl-nav-right__list"},i("div",{key:"5934e7d3976b13abba77b4361b4fe1c6f49bcc2e",class:"xpl-top-nav__right-rail"},i("div",{key:"49b44ea3d59eec32d6859978754e81ce6acc1bec",class:"xpl-top-nav__right-lead"},i("slot",{key:"054671b75354700b873a85f08998a14d7fc7073b",name:"right-aside"})),this.hasUserMenu?i("div",{class:"xpl-top-nav__right-user"},i("xpl-popover",{class:"xpl-top-nav__user-popover dark",position:"bottom-end",display:"menu"},this.userMenuTriggerSlotPresent?i("slot",{name:"user-menu-trigger",slot:"trigger"}):this.usesBuiltInChildAccountTrigger?i("xpl-button",{slot:"trigger",class:"xpl-top-nav__child-account-trigger",type:"button",variant:"tertiary",icon:"chevron-down",iconPosition:"end",iconOnly:0===this.childAccountLabelText.length,"aria-haspopup":"dialog","aria-label":this.childAccountLabelText.length>0?void 0:"Open account menu"},this.childAccountLabelText.length>0?this.childAccountLabelText:null):null,i("div",{class:"xpl-top-nav__user-menu-panel"},i("slot",{name:"user-menu"})))):null,this.needsUserMenuSlotStash?i("div",{class:"xpl-top-nav__user-menu-stash",hidden:!0,"aria-hidden":"true"},i("slot",{name:"user-menu-trigger"}),i("slot",{name:"user-menu"})):null)))))}get el(){return this}static get watchers(){return{navControl:[{onNavControlChanged:0}]}}},[260,"xpl-top-nav",{brandHref:[1,"brand-href"],brandLogo:[1,"brand-logo"],brandName:[1,"brand-name"],childAccountLabel:[1,"child-account-label"],label:[1],navControl:[516,"nav-control"],brandLogoSlotPresent:[32],open:[32],userMenuSlotPresent:[32],userMenuTriggerSlotPresent:[32]},void 0,{navControl:[{onNavControlChanged:0}]}]),p=c,d=function(){"undefined"!=typeof customElements&&["xpl-top-nav","xpl-button","xpl-icon","xpl-popover","xpl-top-nav-item"].forEach((t=>{switch(t){case"xpl-top-nav":customElements.get(o(t))||customElements.define(o(t),c);break;case"xpl-button":customElements.get(o(t))||a();break;case"xpl-icon":customElements.get(o(t))||l();break;case"xpl-popover":customElements.get(o(t))||r();break;case"xpl-top-nav-item":customElements.get(o(t))||h()}}))};export{p as XplTopNav,d as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as t,HTMLElement as i,createEvent as s,h as a,Host as
|
|
1
|
+
import{proxyCustomElement as t,HTMLElement as i,createEvent as s,h as a,Host as n,transformTag as e}from"@stencil/core/internal/client";import{d as l}from"./xpl-icon2.js";const o=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.navOpen=s(this,"navOpen",7),this.open=!0}onNavToggle(){this.open=!this.open,this.navOpen.emit(this.open)}componentWillLoad(){this.open=void 0!==this.isNavOpenAtStartup?this.isNavOpenAtStartup:this.open}render(){return a(n,{key:"2af96247c611b67255b7f285dfb2b8b1dada47cc"},a("nav",{key:"135186097dd0d8f308a1a08b5fbf4a5537c10f25","aria-label":"utility navigation bar",class:"xpl-utility-bar"},this.navControl?a("div",null,a("button",{class:"xpl-utility-bar__nav-control",onClick:()=>this.onNavToggle()},a("xpl-icon",{class:"xpl-utility-nav__bars",icon:"three-bars"})),a("slot",{name:"aside"})):a("slot",{name:"aside"}),a("slot",{key:"3346444f9813b20d8c4ed13b5a0784205dcfbbb1",name:"main"})))}},[260,"xpl-utility-bar",{navControl:[4,"nav-control"],isNavOpenAtStartup:[4,"is-nav-open-at-startup"],open:[32]}]),c=o,r=function(){"undefined"!=typeof customElements&&["xpl-utility-bar","xpl-icon"].forEach((t=>{switch(t){case"xpl-utility-bar":customElements.get(e(t))||customElements.define(e(t),o);break;case"xpl-icon":customElements.get(e(t))||l()}}))};export{c as XplUtilityBar,r as defineCustomElement}
|