@xplortech/apollo-core 2.5.0 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.typings/apollo-components.html-data.json +393 -26
- package/build/style.css +4224 -1016
- package/dist/apollo-core/apollo-core.css +18 -27
- package/dist/apollo-core/apollo-core.esm.js +1 -1
- package/dist/apollo-core/p-02167464.entry.js +1 -0
- package/dist/apollo-core/p-0bce3874.entry.js +1 -0
- package/dist/apollo-core/{p-0e1877a2.entry.js → p-1fd3dc87.entry.js} +1 -1
- package/dist/apollo-core/{p-0ac33b3a.entry.js → p-42016063.entry.js} +1 -1
- package/dist/apollo-core/p-5549756c.entry.js +1 -0
- package/dist/apollo-core/p-56fa4941.entry.js +1 -0
- package/dist/apollo-core/p-76c324da.entry.js +1 -0
- package/dist/apollo-core/p-7a3224b4.entry.js +1 -0
- package/dist/apollo-core/p-7e924697.entry.js +1 -0
- package/dist/apollo-core/{p-f4c2626d.entry.js → p-8a1affce.entry.js} +1 -1
- package/dist/apollo-core/p-9efca9e1.entry.js +1 -0
- package/dist/apollo-core/p-C_Z2nG0p.js +2 -0
- package/dist/apollo-core/p-b252b380.entry.js +1 -0
- package/dist/apollo-core/p-c91daac1.entry.js +1 -0
- package/dist/apollo-core/p-d9b62508.entry.js +1 -0
- package/dist/apollo-core/p-eaea16d1.entry.js +1 -0
- package/dist/apollo-core/p-eed13bca.entry.js +1 -0
- package/dist/apollo-core/{p-4fab8172.entry.js → p-f5af9539.entry.js} +1 -1
- package/dist/cjs/apollo-core.cjs.js +3 -3
- package/dist/cjs/{index-D__N_vw2.js → index-DH6pgWru.js} +137 -87
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/xpl-accordion.cjs.entry.js +5 -5
- package/dist/cjs/xpl-application-shell.cjs.entry.js +4 -4
- package/dist/cjs/{xpl-avatar_41.cjs.entry.js → xpl-avatar_47.cjs.entry.js} +2802 -272
- package/dist/cjs/xpl-button-row.cjs.entry.js +4 -4
- package/dist/cjs/xpl-calendar.cjs.entry.js +4 -4
- package/dist/cjs/xpl-dynamic-table-cell.cjs.entry.js +5 -5
- package/dist/cjs/xpl-dynamic-table-row.cjs.entry.js +5 -5
- package/dist/cjs/xpl-dynamic-table.cjs.entry.js +4 -4
- package/dist/cjs/xpl-grid-item.cjs.entry.js +4 -4
- package/dist/cjs/xpl-grid.cjs.entry.js +4 -4
- package/dist/cjs/xpl-large-card.cjs.entry.js +4 -4
- package/dist/cjs/xpl-list.cjs.entry.js +4 -4
- package/dist/cjs/xpl-main-nav.cjs.entry.js +4 -4
- package/dist/cjs/xpl-table-header-cell.cjs.entry.js +3 -3
- package/dist/cjs/xpl-table-header.cjs.entry.js +4 -4
- package/dist/cjs/xpl-toggle.cjs.entry.js +6 -6
- package/dist/cjs/xpl-toolbar.cjs.entry.js +5 -5
- package/dist/collection/collection-manifest.json +9 -2
- package/dist/collection/components/xpl-accordion/accordion.stories.js +4 -0
- package/dist/collection/components/xpl-accordion/xpl-accordion.js +3 -3
- package/dist/collection/components/xpl-application-shell/application-shell.stories.js +4 -0
- package/dist/collection/components/xpl-application-shell/xpl-application-shell.js +2 -2
- package/dist/collection/components/xpl-avatar/avatar.stories.js +4 -0
- package/dist/collection/components/xpl-avatar/xpl-avatar.js +3 -3
- package/dist/collection/components/xpl-backdrop/backdrop.stories.js +4 -0
- package/dist/collection/components/xpl-backdrop/xpl-backdrop.js +2 -2
- package/dist/collection/components/xpl-badge/badge.stories.js +108 -33
- package/dist/collection/components/xpl-badge/xpl-badge.js +122 -14
- package/dist/collection/components/xpl-banner/banner.stories.js +64 -0
- package/dist/collection/components/xpl-banner/xpl-banner.js +295 -0
- package/dist/collection/components/xpl-breadcrumbs/breadcrumbs.stories.js +4 -0
- package/dist/collection/components/xpl-breadcrumbs/xpl-breadcrumb-item/xpl-breadcrumb-item.js +2 -2
- package/dist/collection/components/xpl-breadcrumbs/xpl-breadcrumbs/xpl-breadcrumbs.js +2 -2
- package/dist/collection/components/xpl-button/button.stories.js +102 -98
- package/dist/collection/components/xpl-button/xpl-button.js +183 -93
- package/dist/collection/components/xpl-button-row/xpl-button-row.js +2 -2
- package/dist/collection/components/xpl-calendar/calendar.stories.js +4 -0
- package/dist/collection/components/xpl-calendar/xpl-calendar.js +2 -2
- package/dist/collection/components/xpl-checkbox/checkbox.stories.js +4 -0
- package/dist/collection/components/xpl-checkbox/xpl-checkbox.js +4 -4
- package/dist/collection/components/xpl-choicelist/choicelist.stories.js +4 -0
- package/dist/collection/components/xpl-choicelist/xpl-choicelist.js +2 -2
- package/dist/collection/components/xpl-content-area/xpl-content-area.js +2 -2
- package/dist/collection/components/xpl-dashboard/xpl-dashboard.js +2 -2
- package/dist/collection/components/xpl-data-card/data-card.stories.js +4 -0
- package/dist/collection/components/xpl-data-card/xpl-data-card.js +3 -3
- package/dist/collection/components/xpl-divider/divider.stories.js +4 -0
- package/dist/collection/components/xpl-divider/xpl-divider.js +2 -2
- package/dist/collection/components/xpl-dropdown/xpl-dropdown-group/xpl-dropdown-group.js +2 -2
- package/dist/collection/components/xpl-dropdown/xpl-dropdown-heading/xpl-dropdown-heading.js +2 -2
- package/dist/collection/components/xpl-dropdown/xpl-dropdown-option/xpl-dropdown-option.js +29 -4
- package/dist/collection/components/xpl-dropdown/xpl-dropdown.js +120 -79
- package/dist/collection/components/xpl-dynamic-table/xpl-dynamic-table.js +2 -2
- package/dist/collection/components/xpl-dynamic-table-cell/xpl-dynamic-table-cell.js +3 -3
- package/dist/collection/components/xpl-dynamic-table-row/xpl-dynamic-table-row.js +3 -3
- package/dist/collection/components/xpl-grid/xpl-grid.js +2 -2
- package/dist/collection/components/xpl-grid-item/xpl-grid-item.js +2 -2
- package/dist/collection/components/xpl-header-accordion/xpl-header-accordion.js +2 -2
- package/dist/collection/components/xpl-icon/xpl-icon.js +3 -3
- package/dist/collection/components/xpl-input/input.stories.js +75 -9
- package/dist/collection/components/xpl-input/xpl-input-color/xpl-input-color.js +9 -9
- package/dist/collection/components/xpl-input/xpl-input-date/xpl-input-date.js +55 -17
- package/dist/collection/components/xpl-input/xpl-input-file/xpl-input-file.js +5 -5
- package/dist/collection/components/xpl-input/xpl-input-phone/phone-country-data.js +58 -0
- package/dist/collection/components/xpl-input/xpl-input-phone/phone-format.js +219 -0
- package/dist/collection/components/xpl-input/xpl-input-phone/xpl-input-phone.js +469 -0
- package/dist/collection/components/xpl-input/xpl-input-time/xpl-input-time.js +3 -3
- package/dist/collection/components/xpl-input/xpl-input.js +101 -7
- package/dist/collection/components/xpl-large-card/large-card.stories.js +4 -0
- package/dist/collection/components/xpl-large-card/xpl-large-card.js +2 -2
- package/dist/collection/components/xpl-list/xpl-list.js +2 -2
- package/dist/collection/components/xpl-main-nav/xpl-main-nav.js +2 -2
- package/dist/collection/components/xpl-modal/modal.stories.js +4 -0
- package/dist/collection/components/xpl-modal/xpl-modal.js +2 -2
- package/dist/collection/components/xpl-nav-item/xpl-nav-item.js +3 -3
- package/dist/collection/components/xpl-pagination/pagination.stories.js +4 -0
- package/dist/collection/components/xpl-pagination/xpl-pagination.js +4 -4
- package/dist/collection/components/xpl-panel/panel.stories.js +51 -0
- package/dist/collection/components/xpl-panel/xpl-panel.js +60 -0
- package/dist/collection/components/xpl-popover/popover.stories.js +4 -0
- package/dist/collection/components/xpl-popover/xpl-popover.js +5 -5
- package/dist/collection/components/xpl-progress/xpl-progress.js +2 -2
- package/dist/collection/components/xpl-progress-bar/progress-bar.stories.js +96 -0
- package/dist/collection/components/xpl-progress-bar/xpl-progress-bar.js +158 -0
- package/dist/collection/components/xpl-radio/xpl-radio.js +4 -4
- package/dist/collection/components/xpl-secondary-nav/xpl-secondary-nav.js +2 -2
- package/dist/collection/components/xpl-select/xpl-select.js +7 -7
- package/dist/collection/components/xpl-side-nav/side-nav.stories.js +519 -0
- package/dist/collection/components/xpl-side-nav/xpl-side-nav-item/xpl-side-nav-item.js +259 -0
- package/dist/collection/components/xpl-side-nav/xpl-side-nav.js +32 -0
- package/dist/collection/components/xpl-skeleton/xpl-skeleton.js +2 -2
- package/dist/collection/components/xpl-slideout/xpl-slideout.js +2 -2
- package/dist/collection/components/xpl-tab/xpl-tab.js +3 -3
- package/dist/collection/components/xpl-tab-panel/xpl-tab-panel.js +3 -3
- package/dist/collection/components/xpl-table/xpl-table.js +6 -6
- package/dist/collection/components/xpl-table-header/xpl-table-header.js +2 -2
- package/dist/collection/components/xpl-table-header-cell/xpl-table-header-cell.js +1 -1
- package/dist/collection/components/xpl-tabs/xpl-tabs.js +6 -6
- package/dist/collection/components/xpl-tag/xpl-tag.js +3 -3
- package/dist/collection/components/xpl-toast/xpl-toast.js +3 -3
- package/dist/collection/components/xpl-toggle/xpl-toggle.js +4 -4
- package/dist/collection/components/xpl-toolbar/xpl-toolbar.js +3 -3
- package/dist/collection/components/xpl-tooltip/xpl-tooltip.js +2 -2
- package/dist/collection/components/xpl-utility-bar/xpl-utility-bar.js +2 -2
- package/dist/collection/utils/layout-ancestors.js +22 -0
- package/dist/components/index.js +1 -1
- package/dist/components/xpl-accordion.js +1 -1
- package/dist/components/xpl-application-shell.js +1 -1
- package/dist/components/xpl-avatar.js +1 -1
- package/dist/components/xpl-avatar2.js +1 -1
- package/dist/components/xpl-backdrop.js +1 -1
- package/dist/components/xpl-backdrop2.js +1 -1
- package/dist/components/xpl-badge.js +1 -1
- package/dist/components/xpl-badge2.js +1 -1
- package/dist/components/xpl-banner.d.ts +11 -0
- package/dist/components/xpl-banner.js +1 -0
- package/dist/components/xpl-breadcrumb-item.js +1 -1
- package/dist/components/xpl-breadcrumbs.js +1 -1
- package/dist/components/xpl-button-row.js +1 -1
- package/dist/components/xpl-button.js +1 -1
- package/dist/components/xpl-button2.js +1 -1
- package/dist/components/xpl-calendar.js +1 -1
- package/dist/components/xpl-checkbox.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-divider.js +1 -1
- package/dist/components/xpl-divider2.js +1 -1
- package/dist/components/xpl-dropdown-group.js +1 -1
- package/dist/components/xpl-dropdown-group2.js +1 -1
- package/dist/components/xpl-dropdown-heading.js +1 -1
- package/dist/components/xpl-dropdown-heading2.js +1 -1
- package/dist/components/xpl-dropdown-option.js +1 -1
- package/dist/components/xpl-dropdown-option2.js +1 -1
- package/dist/components/xpl-dropdown.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-icon.js +1 -1
- package/dist/components/xpl-icon2.js +1 -1
- package/dist/components/xpl-input-date.js +1 -1
- package/dist/components/xpl-input-date2.js +1 -1
- package/dist/components/xpl-input-file.js +1 -1
- package/dist/components/xpl-input-file2.js +1 -1
- package/dist/components/xpl-input-phone.d.ts +11 -0
- package/dist/components/xpl-input-phone.js +1 -0
- package/dist/components/xpl-input-time.js +1 -1
- package/dist/components/xpl-input.js +1 -1
- package/dist/components/xpl-input2.js +1 -1
- package/dist/components/xpl-large-card.js +1 -1
- package/dist/components/xpl-list.js +1 -1
- package/dist/components/xpl-main-nav.js +1 -1
- package/dist/components/xpl-modal.js +1 -1
- package/dist/components/xpl-nav-item.js +1 -1
- package/dist/components/xpl-pagination.js +1 -1
- package/dist/components/xpl-panel.d.ts +11 -0
- package/dist/components/xpl-panel.js +1 -0
- package/dist/components/xpl-popover.js +1 -1
- package/dist/components/xpl-popover2.js +1 -1
- package/dist/components/xpl-progress-bar.d.ts +11 -0
- package/dist/components/xpl-progress-bar.js +1 -0
- package/dist/components/xpl-progress.js +1 -1
- package/dist/components/xpl-radio.js +1 -1
- package/dist/components/xpl-radio2.js +1 -1
- package/dist/components/xpl-secondary-nav.js +1 -1
- package/dist/components/xpl-select.js +1 -1
- package/dist/components/xpl-select2.js +1 -1
- package/dist/components/xpl-side-nav-item.d.ts +11 -0
- package/dist/components/xpl-side-nav-item.js +1 -0
- package/dist/components/xpl-side-nav.d.ts +11 -0
- package/dist/components/xpl-side-nav.js +1 -0
- package/dist/components/xpl-skeleton.js +1 -1
- package/dist/components/xpl-slideout.js +1 -1
- package/dist/components/xpl-tab-panel.js +1 -1
- package/dist/components/xpl-tab.js +1 -1
- package/dist/components/xpl-table-header.js +1 -1
- package/dist/components/xpl-table.js +1 -1
- package/dist/components/xpl-tabs.js +1 -1
- package/dist/components/xpl-tag.js +1 -1
- package/dist/components/xpl-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-tooltip.js +1 -1
- package/dist/components/xpl-tooltip2.js +1 -1
- package/dist/components/xpl-utility-bar.js +1 -1
- package/dist/docs/xpl-accordion/readme.md +4 -0
- package/dist/docs/xpl-avatar/readme.md +5 -0
- package/dist/docs/xpl-backdrop/readme.md +1 -1
- package/dist/docs/xpl-badge/readme.md +97 -4
- package/dist/docs/xpl-banner/readme.md +166 -0
- package/dist/docs/xpl-button/readme.md +151 -14
- package/dist/docs/xpl-button-row/readme.md +1 -0
- package/dist/docs/xpl-calendar/readme.md +2 -1
- package/dist/docs/xpl-checkbox/readme.md +2 -0
- package/dist/docs/xpl-choicelist/readme.md +1 -0
- package/dist/docs/xpl-data-card/readme.md +2 -2
- package/dist/docs/xpl-divider/readme.md +1 -1
- package/dist/docs/xpl-dropdown/readme.md +14 -11
- package/dist/docs/xpl-dropdown/xpl-dropdown-group/readme.md +1 -0
- package/dist/docs/xpl-dropdown/xpl-dropdown-option/readme.md +6 -0
- package/dist/docs/xpl-icon/readme.md +12 -0
- package/dist/docs/xpl-input/readme.md +41 -31
- package/dist/docs/xpl-input/xpl-input-color/readme.md +4 -0
- package/dist/docs/xpl-input/xpl-input-phone/readme.md +167 -0
- package/dist/docs/xpl-input/xpl-input-time/readme.md +4 -0
- package/dist/docs/xpl-large-card/readme.md +1 -1
- package/dist/docs/xpl-modal/readme.md +3 -0
- package/dist/docs/xpl-pagination/readme.md +3 -0
- package/dist/docs/xpl-panel/readme.md +83 -0
- package/dist/docs/xpl-popover/readme.md +1 -1
- package/dist/docs/xpl-progress-bar/readme.md +145 -0
- package/dist/docs/xpl-select/readme.md +1 -0
- package/dist/docs/xpl-side-nav/readme.md +71 -0
- package/dist/docs/xpl-side-nav/xpl-side-nav-item/readme.md +115 -0
- package/dist/docs/xpl-slideout/readme.md +1 -0
- package/dist/docs/xpl-tabs/readme.md +1 -0
- package/dist/docs/xpl-toast/readme.md +55 -0
- package/dist/esm/apollo-core.js +4 -4
- package/dist/esm/{index-DhZas3eX.js → index-C_Z2nG0p.js} +137 -87
- package/dist/esm/loader.js +3 -3
- package/dist/esm/xpl-accordion.entry.js +5 -5
- package/dist/esm/xpl-application-shell.entry.js +4 -4
- package/dist/esm/{xpl-avatar_41.entry.js → xpl-avatar_47.entry.js} +2753 -229
- package/dist/esm/xpl-button-row.entry.js +4 -4
- package/dist/esm/xpl-calendar.entry.js +4 -4
- package/dist/esm/xpl-dynamic-table-cell.entry.js +5 -5
- package/dist/esm/xpl-dynamic-table-row.entry.js +5 -5
- package/dist/esm/xpl-dynamic-table.entry.js +4 -4
- package/dist/esm/xpl-grid-item.entry.js +4 -4
- package/dist/esm/xpl-grid.entry.js +4 -4
- package/dist/esm/xpl-large-card.entry.js +4 -4
- package/dist/esm/xpl-list.entry.js +4 -4
- package/dist/esm/xpl-main-nav.entry.js +4 -4
- package/dist/esm/xpl-table-header-cell.entry.js +3 -3
- package/dist/esm/xpl-table-header.entry.js +4 -4
- package/dist/esm/xpl-toggle.entry.js +6 -6
- package/dist/esm/xpl-toolbar.entry.js +5 -5
- package/dist/types/components/xpl-accordion/xpl-accordion.d.ts +1 -1
- package/dist/types/components/xpl-application-shell/application-shell.stories.d.ts +4 -0
- package/dist/types/components/xpl-application-shell/xpl-application-shell.d.ts +1 -1
- package/dist/types/components/xpl-avatar/avatar.stories.d.ts +4 -0
- package/dist/types/components/xpl-avatar/xpl-avatar.d.ts +1 -1
- package/dist/types/components/xpl-backdrop/backdrop.stories.d.ts +4 -0
- package/dist/types/components/xpl-backdrop/xpl-backdrop.d.ts +1 -1
- package/dist/types/components/xpl-badge/badge.stories.d.ts +66 -11
- package/dist/types/components/xpl-badge/xpl-badge.d.ts +9 -2
- package/dist/types/components/xpl-banner/banner.stories.d.ts +77 -0
- package/dist/types/components/xpl-banner/xpl-banner.d.ts +20 -0
- package/dist/types/components/xpl-breadcrumbs/breadcrumbs.stories.d.ts +4 -0
- package/dist/types/components/xpl-breadcrumbs/xpl-breadcrumb-item/xpl-breadcrumb-item.d.ts +1 -1
- package/dist/types/components/xpl-breadcrumbs/xpl-breadcrumbs/xpl-breadcrumbs.d.ts +1 -1
- package/dist/types/components/xpl-button/button.stories.d.ts +68 -30
- package/dist/types/components/xpl-button/xpl-button.d.ts +14 -8
- package/dist/types/components/xpl-button-row/xpl-button-row.d.ts +1 -1
- package/dist/types/components/xpl-calendar/calendar.stories.d.ts +4 -0
- package/dist/types/components/xpl-calendar/xpl-calendar.d.ts +1 -1
- package/dist/types/components/xpl-checkbox/checkbox.stories.d.ts +4 -0
- package/dist/types/components/xpl-checkbox/xpl-checkbox.d.ts +1 -1
- package/dist/types/components/xpl-choicelist/choicelist.stories.d.ts +4 -0
- package/dist/types/components/xpl-choicelist/xpl-choicelist.d.ts +1 -1
- package/dist/types/components/xpl-content-area/xpl-content-area.d.ts +1 -1
- package/dist/types/components/xpl-dashboard/xpl-dashboard.d.ts +1 -1
- package/dist/types/components/xpl-data-card/data-card.stories.d.ts +4 -0
- package/dist/types/components/xpl-data-card/xpl-data-card.d.ts +1 -1
- package/dist/types/components/xpl-divider/divider.stories.d.ts +4 -0
- package/dist/types/components/xpl-divider/xpl-divider.d.ts +1 -1
- package/dist/types/components/xpl-dropdown/dropdown-option.d.ts +1 -0
- package/dist/types/components/xpl-dropdown/dropdown.stories.d.ts +1 -1
- package/dist/types/components/xpl-dropdown/xpl-dropdown-group/xpl-dropdown-group.d.ts +1 -1
- package/dist/types/components/xpl-dropdown/xpl-dropdown-heading/xpl-dropdown-heading.d.ts +1 -1
- package/dist/types/components/xpl-dropdown/xpl-dropdown-option/xpl-dropdown-option.d.ts +3 -2
- package/dist/types/components/xpl-dropdown/xpl-dropdown.d.ts +11 -8
- package/dist/types/components/xpl-dynamic-table/xpl-dynamic-table.d.ts +1 -1
- package/dist/types/components/xpl-dynamic-table-cell/xpl-dynamic-table-cell.d.ts +1 -1
- package/dist/types/components/xpl-dynamic-table-row/xpl-dynamic-table-row.d.ts +1 -1
- package/dist/types/components/xpl-grid/xpl-grid.d.ts +1 -1
- package/dist/types/components/xpl-grid-item/xpl-grid-item.d.ts +1 -1
- package/dist/types/components/xpl-header-accordion/xpl-header-accordion.d.ts +1 -1
- package/dist/types/components/xpl-icon/xpl-icon.d.ts +1 -1
- package/dist/types/components/xpl-input/input.stories.d.ts +36 -7
- package/dist/types/components/xpl-input/xpl-input-color/xpl-input-color.d.ts +1 -1
- package/dist/types/components/xpl-input/xpl-input-date/xpl-input-date.d.ts +10 -3
- package/dist/types/components/xpl-input/xpl-input-file/xpl-input-file.d.ts +1 -1
- package/dist/types/components/xpl-input/xpl-input-phone/phone-country-data.d.ts +13 -0
- package/dist/types/components/xpl-input/xpl-input-phone/phone-format.d.ts +5 -0
- package/dist/types/components/xpl-input/xpl-input-phone/xpl-input-phone.d.ts +48 -0
- package/dist/types/components/xpl-input/xpl-input-time/xpl-input-time.d.ts +1 -1
- package/dist/types/components/xpl-input/xpl-input.d.ts +12 -2
- package/dist/types/components/xpl-large-card/large-card.stories.d.ts +4 -0
- package/dist/types/components/xpl-large-card/xpl-large-card.d.ts +1 -1
- package/dist/types/components/xpl-list/xpl-list.d.ts +1 -1
- package/dist/types/components/xpl-main-nav/xpl-main-nav.d.ts +1 -1
- package/dist/types/components/xpl-modal/modal.stories.d.ts +4 -0
- package/dist/types/components/xpl-modal/xpl-modal.d.ts +1 -1
- package/dist/types/components/xpl-nav-item/xpl-nav-item.d.ts +1 -1
- package/dist/types/components/xpl-pagination/pagination.stories.d.ts +4 -0
- package/dist/types/components/xpl-pagination/xpl-pagination.d.ts +1 -1
- package/dist/types/components/xpl-panel/panel.stories.d.ts +20 -0
- package/dist/types/components/xpl-panel/xpl-panel.d.ts +5 -0
- package/dist/types/components/xpl-popover/xpl-popover.d.ts +1 -1
- package/dist/types/components/xpl-progress/xpl-progress.d.ts +1 -1
- package/dist/types/components/xpl-progress-bar/progress-bar.stories.d.ts +73 -0
- package/dist/types/components/xpl-progress-bar/xpl-progress-bar.d.ts +15 -0
- package/dist/types/components/xpl-radio/xpl-radio.d.ts +1 -1
- package/dist/types/components/xpl-secondary-nav/xpl-secondary-nav.d.ts +1 -1
- package/dist/types/components/xpl-select/xpl-select.d.ts +1 -1
- package/dist/types/components/xpl-side-nav/side-nav.stories.d.ts +80 -0
- package/dist/types/components/xpl-side-nav/xpl-side-nav-item/xpl-side-nav-item.d.ts +20 -0
- package/dist/types/components/xpl-side-nav/xpl-side-nav.d.ts +4 -0
- package/dist/types/components/xpl-skeleton/xpl-skeleton.d.ts +1 -1
- package/dist/types/components/xpl-slideout/xpl-slideout.d.ts +1 -1
- package/dist/types/components/xpl-tab/xpl-tab.d.ts +1 -1
- package/dist/types/components/xpl-tab-panel/xpl-tab-panel.d.ts +1 -1
- package/dist/types/components/xpl-table/xpl-table.d.ts +1 -1
- package/dist/types/components/xpl-table-header/xpl-table-header.d.ts +1 -1
- package/dist/types/components/xpl-table-header-cell/xpl-table-header-cell.d.ts +1 -1
- package/dist/types/components/xpl-tabs/xpl-tabs.d.ts +2 -2
- package/dist/types/components/xpl-tag/xpl-tag.d.ts +1 -1
- package/dist/types/components/xpl-toast/xpl-toast.d.ts +1 -1
- package/dist/types/components/xpl-toggle/xpl-toggle.d.ts +1 -1
- package/dist/types/components/xpl-toolbar/xpl-toolbar.d.ts +1 -1
- package/dist/types/components/xpl-tooltip/xpl-tooltip.d.ts +1 -1
- package/dist/types/components/xpl-utility-bar/xpl-utility-bar.d.ts +1 -1
- package/dist/types/components.d.ts +1219 -178
- package/dist/types/stencil-public-runtime.d.ts +23 -2
- package/dist/types/utils/layout-ancestors.d.ts +2 -0
- package/package.json +41 -27
- package/dist/apollo-core/p-1c2e4034.entry.js +0 -1
- package/dist/apollo-core/p-3b5f8989.entry.js +0 -1
- package/dist/apollo-core/p-576ce90f.entry.js +0 -1
- package/dist/apollo-core/p-5ec45742.entry.js +0 -1
- package/dist/apollo-core/p-77f0fd4a.entry.js +0 -1
- package/dist/apollo-core/p-7b7db57a.entry.js +0 -1
- package/dist/apollo-core/p-7c22b842.entry.js +0 -1
- package/dist/apollo-core/p-7d245bf0.entry.js +0 -1
- package/dist/apollo-core/p-812bb0e4.entry.js +0 -1
- package/dist/apollo-core/p-845eef0d.entry.js +0 -1
- package/dist/apollo-core/p-9853028c.entry.js +0 -1
- package/dist/apollo-core/p-9d65ece7.entry.js +0 -1
- package/dist/apollo-core/p-DhZas3eX.js +0 -2
- package/dist/apollo-core/p-be292555.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{I as t,d as o}from"./xpl-input-date2.js";const p=t,s=o;export{p as XplInputDate,s as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as
|
|
1
|
+
import{proxyCustomElement as t,HTMLElement as e,createEvent as i,h as s,Host as a,transformTag as n}from"@stencil/core/internal/client";import{f as r}from"./index2.js";import{d as o}from"./xpl-icon2.js";function l(t){let e=t.parentElement;for(;e&&e!==document.body&&e!==document.documentElement;){const t=getComputedStyle(e);if(/auto|scroll/.test(t.overflow+t.overflowX+t.overflowY))return e;e=e.parentElement}}const d=(t=!1)=>`<svg width="8" height="12" viewBox="0 0 8 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="${t?"M0.557948 5.6813L6.06209 0.132167C6.23831 -0.0440556 6.52327 -0.0440556 6.69949 0.132167L7.44187 0.874551C7.61809 1.05077 7.61809 1.33573 7.44187 1.51195L2.99882 6L7.44187 10.488C7.61809 10.6643 7.61809 10.9492 7.44187 11.1254L6.69949 11.8678C6.52327 12.0441 6.23831 12.0441 6.06209 11.8678L0.557948 6.3187C0.381726 6.14248 0.381726 5.85752 0.557948 5.6813Z":"M7.44187 6.3187L1.93773 11.8678C1.76151 12.0441 1.47655 12.0441 1.30033 11.8678L0.557948 11.1254C0.381726 10.9492 0.381726 10.6643 0.557948 10.488L5.001 6L0.557948 1.51195C0.381726 1.33573 0.381726 1.05077 0.557948 0.874551L1.30033 0.132167C1.47655 -0.0440556 1.76151 -0.0440556 1.93773 0.132167L7.44187 5.6813C7.6181 5.85752 7.6181 6.14248 7.44187 6.3187Z"}" /></svg>`,h=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.valueChange=i(this,"valueChange",7),this.hasErrorStateChanged=i(this,"hasErrorStateChanged",7),this.rangeSelected=i(this,"rangeSelected",7),this.dateFormat="Y-m-d",this.mode="single",this.flatpickrStaticLayout=!1,this.valueChanged=t=>{this.valueChange.emit(t.target.value)}}onHasErrorStateChanged(t){this.hasErrorStateChanged.emit(t)}onValueChanged(t){var e;null===(e=this.flatpickrInstance)||void 0===e||e.setDate(t)}connectedCallback(){queueMicrotask((()=>this.ensureFlatpickr()))}disconnectedCallback(){var t;null===(t=this.flatpickrInstance)||void 0===t||t.destroy(),this.flatpickrInstance=void 0,this.flatpickrStaticLayout=!1,this.unwrapStaleFlatpickrWrapper()}componentDidRender(){this.ensureFlatpickr()}ensureFlatpickr(){!this.flatpickrInstance&&this.input&&this.el.isConnected&&(this.unwrapStaleFlatpickrWrapper(),this.initFlatpickr())}initFlatpickr(){const t=function(t){let e=t.parentElement;for(;e&&e!==document.body&&e!==document.documentElement;){if("fixed"===getComputedStyle(e).position)return!0;e=e.parentElement}return!1}(this.el);this.flatpickrInstance=r(this.input,Object.assign(Object.assign({allowInput:!0},t?{static:!0}:{appendTo:l(this.el)}),{dateFormat:this.dateFormat,defaultDate:this.value,maxDate:this.max,minDate:this.min,mode:this.mode,nextArrow:d(),prevArrow:d(!0),onClose:t=>{if(this.hasErrorState=t.length<(this.required?"single"===this.mode?1:2:0)?"required":null,2===t.length){const[e,i]=t;this.rangeSelected.emit({start:e,end:i})}}})),queueMicrotask((()=>{this.flatpickrStaticLayout!==t&&(this.flatpickrStaticLayout=t)}))}unwrapStaleFlatpickrWrapper(){const{input:t}=this,e=null==t?void 0:t.parentElement;if(!(null==e?void 0:e.classList.contains("flatpickr-wrapper")))return;const i=e.parentElement;if(i){for(;e.firstChild;)i.insertBefore(e.firstChild,e);i.removeChild(e)}}render(){return s(a,{key:"35f91387097b7fd5bdc59ff8608c3700470ff367",class:{"xpl-input-date":!0,[`xpl-input-date--mode-${this.mode}`]:!0,"xpl-input-date--error":!!this.hasErrorState,"xpl-input-date--flatpickr-static":this.flatpickrStaticLayout}},s("div",{key:"7f561dba2b2aa7d308d0029a20ace5d918368afc",class:"xpl-input-wrapper"},this.pre&&s("label",{key:"2e87d6e22a2a69db7e91c69fb3d59f81d8358e52",class:"xpl-input-pre",htmlFor:this.inputId},this.pre),s("input",{key:"53d05e6b6b637e298f31cb1f2b9c56d9d597688f",type:"date",id:this.inputId,disabled:this.disabled,name:this.name,required:this.required,readonly:this.readonly,placeholder:this.placeholder,max:this.max,min:this.min,ref:t=>{this.input=t},onChange:t=>{this.valueChanged(t)}}),s("xpl-icon",{key:"45c1d48fe6a312855cf3bd90e139d060821c4ba4",class:"xpl-input-calendar",icon:"calendar-month",size:24}),this.post&&s("label",{key:"037657e9a3cecc054d95b6fd835b58885eef8042",class:"xpl-input-post",htmlFor:this.inputId},this.post)))}get el(){return this}static get watchers(){return{hasErrorState:[{onHasErrorStateChanged:0}],value:[{onValueChanged:0}]}}},[0,"xpl-input-date",{inputId:[1,"input-id"],disabled:[4],name:[1],required:[4],readonly:[4],value:[1],placeholder:[1],post:[1],pre:[1],max:[8],min:[8],dateFormat:[1,"date-format"],mode:[1],flatpickrStaticLayout:[32],hasErrorState:[32]},void 0,{hasErrorState:[{onHasErrorStateChanged:0}],value:[{onValueChanged:0}]}]);function c(){"undefined"!=typeof customElements&&["xpl-input-date","xpl-icon"].forEach((t=>{switch(t){case"xpl-input-date":customElements.get(n(t))||customElements.define(n(t),h);break;case"xpl-icon":customElements.get(n(t))||o()}}))}export{h as I,c as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{I as o,d as p}from"./xpl-input-file2.js";const s=o,t=p;export{s as XplInputFile,t as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as i,createEvent as t,h as s,Host as l,transformTag as
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as i,createEvent as t,h as s,Host as l,transformTag as c}from"@stencil/core/internal/client";import{d as n}from"./xpl-icon2.js";const p=e(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.inputChange=t(this,"inputChange",7),this.accept="",this.multiple=!1,this.hideTriggerOnSelect=!1,this.hideFileNames=!1,this.hideAcceptText=!1,this.files=null,this.openFileDialog=()=>{var e;this.disabled||null===(e=this.fileInput)||void 0===e||e.click()},this.handleFileChange=e=>{this.files=Array.from(e.target.files)},this.onRemoveFileByIndex=e=>{this.files=this.files.filter(((i,t)=>t!==e))}}onFilesChange(e){this.inputChange.emit({type:"file",value:e})}async removeFileByIndex(e){this.onRemoveFileByIndex(e)}render(){var e,i;return s(l,{key:"87df3edce40c74988426ba9fcef4bc3f5740c56b",class:{"xpl-input-file":!0,"xpl-input-file--hide-trigger-on-select":this.hideTriggerOnSelect,"xpl-input-file--disabled":this.disabled}},s("span",{key:"11e4c220751ce3f06fd15a741a1f8b81d98c18bc",class:{"xpl-input-file__trigger-wrapper":!0,"xpl-input-file__trigger-wrapper--hidden":this.hideTriggerOnSelect&&(null===(e=this.files)||void 0===e?void 0:e.length)>0},role:"button",tabIndex:0,onClick:this.openFileDialog},s("slot",{key:"6daba4f9e520c12a791bfd18f2894e55f0da86f4",name:"trigger"})),(null===(i=this.files)||void 0===i?void 0:i.length)>0&&!this.hideFileNames&&s("ul",{key:"3459f9c3e8618962c02f1e25e6b80f63fe4d593d",class:"xpl-input-file__file-list"},this.files.map(((e,i)=>s("li",{class:"xpl-input-file__file-item"},s("span",{class:"xpl-text-callout"},e.name),s("xpl-icon",{icon:"x-circle",size:24,onClick:e=>{e.preventDefault(),e.stopPropagation(),this.onRemoveFileByIndex(i)},class:"xpl-input-file__remove-icon"}))))),this.accept&&!this.hideAcceptText&&s("span",{key:"2c8646cd5ef7e235e75c68bf4832ce1d9c578493",class:"xpl-input-file__accept xpl-text-caption"},"Accepted file types: ",this.accept),s("input",{key:"d303ac9e074e8031ed2d695cc85eef32ef40f058",onChange:this.handleFileChange,type:"file",ref:e=>{this.fileInput=e},hidden:!0,accept:this.accept,multiple:this.multiple,name:this.name}))}get el(){return this}static get watchers(){return{files:[{onFilesChange:0}]}}},[260,"xpl-input-file",{disabled:[4],name:[1],_id:[1],accept:[1],multiple:[4],hideTriggerOnSelect:[4,"hide-trigger-on-select"],hideFileNames:[4,"hide-file-names"],hideAcceptText:[4,"hide-accept-text"],files:[32],removeFileByIndex:[64]},void 0,{files:[{onFilesChange:0}]}]);function a(){"undefined"!=typeof customElements&&["xpl-input-file","xpl-icon"].forEach((e=>{switch(e){case"xpl-input-file":customElements.get(c(e))||customElements.define(c(e),p);break;case"xpl-icon":customElements.get(c(e))||n()}}))}export{p as I,a as d}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface XplInputPhone extends Components.XplInputPhone, HTMLElement {}
|
|
4
|
+
export const XplInputPhone: {
|
|
5
|
+
prototype: XplInputPhone;
|
|
6
|
+
new (): XplInputPhone;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as o,e as p}from"./xpl-input2.js";const s=o,t=p;export{s as XplInputPhone,t as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{f as o,g as p}from"./xpl-input2.js";const s=o,t=p;export{s as XplInputTime,t as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{I as o,d as p}from"./xpl-input2.js";const s=o,t=p;export{s as XplInput,t as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as t,HTMLElement as e,createEvent as i,h as s,Host as a,transformTag as o}from"@stencil/core/internal/client";import{d as r}from"./xpl-dropdown2.js";import{d as n}from"./xpl-dropdown-group2.js";import{d as l}from"./xpl-dropdown-heading2.js";import{d as h}from"./xpl-dropdown-option2.js";import{d as p}from"./xpl-icon2.js";import{d as c}from"./xpl-input-date2.js";import{d}from"./xpl-input-file2.js";import{d as u}from"./xpl-popover2.js";import{v as m}from"./v4.js";const b=(t,e,i)=>{const s=(i/=100)*(e/=100),a=s*(1-Math.abs(t/60%2-1)),o=i-s;let r=0,n=0,l=0;return t<60?(r=s,n=a,l=0):t<120?(r=a,n=s,l=0):t<180?(r=0,n=s,l=a):t<240?(r=0,n=a,l=s):t<300?(r=a,n=0,l=s):(r=s,n=0,l=a),{r:Math.round(255*(r+o)),g:Math.round(255*(n+o)),b:Math.round(255*(l+o))}},x=(t,e,i)=>[t,e,i].map((t=>t.toString(16).padStart(2,"0"))).join(""),f=t=>{var e,i;if(t.startsWith("#")){if(!/^#([a-fA-F\d]{6})$/.test(t))throw new Error("Only 6-digit hex format supported (e.g. #aabbcc)");const e=t.toLowerCase().slice(1),i=parseInt(e.slice(0,2),16),s=parseInt(e.slice(2,4),16),a=parseInt(e.slice(4,6),16);return{hex:e,r:i,g:s,b:a,a:1}}if(t.startsWith("rgba")||t.startsWith("rgb")){const i=null===(e=t.match(/[\d.]+/g))||void 0===e?void 0:e.map(Number);if(!i||i.length<3)throw new Error("Invalid rgba/rgb format");const[s,a,o,r=1]=i,n=t=>t.toString(16).padStart(2,"0");return{hex:`${n(s)}${n(a)}${n(o)}`.toLowerCase(),r:s,g:a,b:o,a:r}}if(t.startsWith("hsla")||t.startsWith("hsl")){const e=null===(i=t.match(/[\d.]+/g))||void 0===i?void 0:i.map(Number);if(!e||e.length<3)throw new Error("Invalid hsla/hsl format");const[s,a,o,r=1]=e,n=((t,e,i,s)=>{i/=100;const a=e=>(e+t/30)%12,o=(e/=100)*Math.min(i,1-i),r=t=>i-o*Math.max(-1,Math.min(a(t)-3,Math.min(9-a(t),1)));return`rgba(${Math.round(255*r(0))}, ${Math.round(255*r(8))}, ${Math.round(255*r(4))}, ${s})`})(s,a,o,r),[l,h,p]=n.match(/[\d.]+/g).map(Number);return{hex:x(l,h,p).toLowerCase(),r:l,g:h,b:p,a:r}}throw new Error("Unsupported color format")},g=t=>t.a&&1!==t.a?`rgba(${t.r}, ${t.g}, ${t.b}, ${t.a})`:`#${t.hex}`;function v(t){const[e,i]=t.split(":"),s=Number(e)>=12?"PM":"AM";return[(Number(e)%12||12).toString(),i,s]}const w=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.valueChange=i(this,"valueChange",7),this.hasErrorStateChanged=i(this,"hasErrorStateChanged",7),this.max="23:59",this.min="00:00",this.step=30,this.mode="single",this.timeFormat="24h",this.allowCustomOption=!1,this.showOptions=!1,this.options=[],this.handleInput=t=>{var e;const i=null===(e=t.target.value)||void 0===e?void 0:e.replace(/[^0-9:apmAPM]/g,"");this.value=i},this.handleFocus=()=>{this.showOptions=!0},this.handleBlur=()=>{this.value=function(t){if(!t||""===t.trim()||0===t.replace(/[^0-9]/g,"").length)return null;let e=t.trim().toLowerCase();e=e.replace(/(\d)\s+(am|pm)/g,"$1$2"),/^\d{1,2}(am|pm)?$/.test(e)&&(e=e.replace(/(am|pm)?$/,":00$1")),/^\d{1,2}$/.test(e)&&(e=`${e}:00`),/^\d{1,2}:\d{1}$/.test(e)&&(e=`${e}0`);const[i,s]=e.split(":"),a=s.replace(/[^0-9]/g,""),o=e.includes("am");return e.includes("pm")||o?o?`${(Number(i)%12).toString().padStart(2,"0")}:${a}`:`${Number(i)%12+12}:${a}`:`${i.padStart(2,"0")}:${a}`}(this.value)},this.handleClick=()=>{this.showOptions=!0}}onValueChange(t){this.valueChange.emit(t),this.updateState(t)}updateState(t){this.formattedValue=this.formatDisplayedTime(t),this.amPm=this.formatDisplayedAmPm(t),this.validateValue()}formatDisplayedTime(t){if(!t)return"";if("12h"===this.timeFormat&&t.includes(":")){const[e,i]=v(t);return`${e}:${i}`}return t}formatDisplayedAmPm(t){if(!t||"12h"!==this.timeFormat)return"";const[,,e]=v(t);return e}validateValue(){this.hasErrorState=this.value?!this.value.includes(":")||this.value.trim().length<4||this.value.trim().length>5?"Invalid time format, must be HH:MM":this.value<this.min||this.value>this.max?"Out of range":this.allowCustomOption||this.options.some((t=>t.value===this.value))?null:"Invalid option":this.required?"required":null}onHasErrorStateChanged(t){this.hasErrorStateChanged.emit(t)}componentDidLoad(){var t;"range"===this.mode&&console.warn("Range mode is not supported for time inputs at this time."),null===(t=this.dropdown)||void 0===t||t.addEventListener("isOpenChange",(t=>{this.showOptions=t.detail}))}componentWillLoad(){this.options=this.getOptions(),this.value&&this.updateState(this.value)}getOptions(){return function(t,e,i,s){const a=t=>{const[e,i]=t.split(":").map(Number);return 60*e+i},o=a(e.toString()),r=a(i.toString()),n=[];for(let e=o;e<=r;e+=t)n.push((l=e,`${Math.floor(l/60).toString().padStart(2,"0")}:${(l%60).toString().padStart(2,"0")}`));var l;return n.map((t=>({label:"12h"===s?function(t){const[e,i,s]=v(t);return`${e}:${i} ${s}`}(t):t,value:t})))}(this.step,this.min.toString(),this.max.toString(),this.timeFormat).map((({label:t,value:e})=>({label:t,value:e,onClick:()=>{this.value=e,this.showOptions=!1}})))}render(){return s(a,{key:"99b06c895d608dec6226f79f21ceda92225428b7",class:{"xpl-input-time":!0,[`xpl-input-time--mode-${this.mode}`]:!0,"xpl-input-time--error":!!this.hasErrorState}},s("xpl-input",{key:"8cdf996f46d969c243d246fdfe888c22c9c4999b",pre:s("xpl-icon",{class:"xpl-input-time__clock-icon",icon:"clock",size:24}),post:"12h"===this.timeFormat?this.amPm||"AM":null,type:"text",_id:this.inputId,disabled:this.disabled,name:this.name,required:this.required,readonly:this.readonly,placeholder:this.placeholder,max:this.max,min:this.min,onInput:this.handleInput,value:this.formattedValue,onFocusEvent:this.handleFocus,onBlurEvent:this.handleBlur,onClick:this.handleClick}),!this.readonly&&!this.disabled&&s("xpl-dropdown",{key:"5213fcd68da96d726d8b046277233afd6b5b20e8",options:this.options,isOpen:this.showOptions,ref:t=>{this.dropdown=t},class:"xpl-input-time__dropdown"}))}static get watchers(){return{value:[{onValueChange:0}],hasErrorState:[{onHasErrorStateChanged:0}]}}},[0,"xpl-input-time",{inputId:[1,"input-id"],disabled:[4],name:[1],required:[4],readonly:[4],value:[1537],placeholder:[1],max:[8],min:[8],step:[2],mode:[1],timeFormat:[1,"time-format"],allowCustomOption:[4,"allow-custom-option"],formattedValue:[32],hasErrorState:[32],showOptions:[32],options:[32],amPm:[32]},void 0,{value:[{onValueChange:0}],hasErrorState:[{onHasErrorStateChanged:0}]}]);function k(){"undefined"!=typeof customElements&&["xpl-input-time","xpl-dropdown","xpl-dropdown-group","xpl-dropdown-heading","xpl-dropdown-option","xpl-icon","xpl-input","xpl-input-color","xpl-input-date","xpl-input-file","xpl-input-time"].forEach((t=>{switch(t){case"xpl-input-time":customElements.get(o(t))||customElements.define(o(t),w);break;case"xpl-dropdown":customElements.get(o(t))||r();break;case"xpl-dropdown-group":customElements.get(o(t))||n();break;case"xpl-dropdown-heading":customElements.get(o(t))||l();break;case"xpl-dropdown-option":customElements.get(o(t))||h();break;case"xpl-icon":customElements.get(o(t))||p();break;case"xpl-input":customElements.get(o(t))||M();break;case"xpl-input-color":customElements.get(o(t))||$();break;case"xpl-input-date":customElements.get(o(t))||c();break;case"xpl-input-file":customElements.get(o(t))||d();break;case"xpl-input-time":customElements.get(o(t))||k()}}))}const y={hex:"",r:0,g:0,b:0,a:1},E=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.inputChange=i(this,"inputChange",7),this.hasErrorStateChanged=i(this,"hasErrorStateChanged",7),this.placeholder="Select color",this.eyeDropperSupported="EyeDropper"in window,this.colorInputElements={hex:null,r:null,g:null,b:null,a:null,hue:null,slGrid:null,alpha:null},this.handleMove=t=>{const e=this.colorInputElements.slGrid.getBoundingClientRect(),i="touches"in t?t.touches[0].clientY:t.clientY,s=Math.max(0,Math.min(("touches"in t?t.touches[0].clientX:t.clientX)-e.left,e.width)),a=Math.max(0,Math.min(i-e.top,e.height)),o=s/e.width,r=a/e.height,n=b(this.hue,100,100),l=(255*(1-o)+o*n.r)*(1-r),h=(255*(1-o)+o*n.g)*(1-r),p=(255*(1-o)+o*n.b)*(1-r),c={r:Math.round(l),g:Math.round(h),b:Math.round(p),hex:x(Math.round(l),Math.round(h),Math.round(p)),a:this.colorValues.a};this.colorValues=c},this.startDrag=t=>{t.preventDefault(),this.handleMove(t),window.addEventListener("mousemove",this.handleMove),window.addEventListener("mouseup",this.stopDrag),window.addEventListener("touchmove",this.handleMove),window.addEventListener("touchend",this.stopDrag)},this.stopDrag=()=>{window.removeEventListener("mousemove",this.handleMove),window.removeEventListener("mouseup",this.stopDrag),window.removeEventListener("touchmove",this.handleMove),window.removeEventListener("touchend",this.stopDrag)},this.onHexInputChange=t=>{var e;const i=t.detail;if(i){const[t,s,a]=(t=>t?t.match(/\w\w/g).map((t=>parseInt(t,16))):[0,0,0])(i);this.colorValues={hex:i,r:t,g:s,b:a,a:null!==(e=this.colorValues.a)&&void 0!==e?e:1}}else this.colorValues=Object.assign({},y)},this.onRgbaInputChange=(t,e)=>{const i=parseFloat(e.detail);if(Number.isNaN(i))return void(this.hasErrorState=`invalid value from ${t.name}: ${i}`);const s=Object.assign({},this.colorValues);switch(t.name){case"color-r-input":s.r=i;break;case"color-g-input":s.g=i;break;case"color-b-input":s.b=i;break;case"color-a-input":s.a=i;break;default:this.hasErrorState=`unhandled input: ${t.name}`}s.hex=x(s.r,s.g,s.b),this.colorValues=s},this.onSliderInputChange=t=>{const e=parseFloat(t.value);if(Number.isNaN(e))this.hasErrorState=`invalid value from ${t.name}: ${e}`;else switch(t.name){case"color-hue-slider":this.colorValues=f(`hsla(${e}, 100%, 50%, 1)`),this.hue=e;break;case"color-alpha-slider":this.colorValues=Object.assign(Object.assign({},this.colorValues),{a:e});break;default:this.hasErrorState=`unhandled input: ${t.name}`}}}valueChanged(t){this.hasErrorState=this.required&&!t.hex?"required":null,this.inputChange.emit(t.hex?g(t):"")}onHasErrorStateChanged(t){this.hasErrorStateChanged.emit(t)}onValuePropChange(t){this.syncColorFromValue(t)}syncColorFromValue(t){if(t)try{this.colorValues=f(t),this.hue=(()=>{const t=this.colorValues.r/255,e=this.colorValues.g/255,i=this.colorValues.b/255,s=Math.max(t,e,i),a=Math.min(t,e,i),o=s-a;let r=0,n=0;const l=(s+a)/2;if(0!==o){switch(n=o/(1-Math.abs(2*l-1)),s){case t:r=(e-i)/o%6;break;case e:r=(i-t)/o+2;break;case i:r=(t-e)/o+4}r*=60,r<0&&(r+=360)}return{hue:Math.round(r),saturation:Math.round(100*n),lightness:Math.round(100*l)}})().hue}catch(t){this.hasErrorState="invalid color format",this.hue=0}else this.colorValues=Object.assign({},y),this.hasErrorState=null,this.hue=0}componentWillLoad(){this.syncColorFromValue(this.value)}componentDidLoad(){const{r:t,g:e,b:i,a:s,hue:a,alpha:o,hex:r}=this.colorInputElements;r.addEventListener("valueChange",(t=>{this.onHexInputChange(t)})),[t,e,i,s].forEach((t=>{t.addEventListener("valueChange",(e=>{this.onRgbaInputChange(t,e)}))})),[a,o].forEach((t=>{t.addEventListener("input",(()=>{this.onSliderInputChange(t)}))}))}async openEyeDropper(){try{const t=new window.EyeDropper,e=await t.open();this.colorValues=f(e.sRGBHex)}catch(t){this.hasErrorState=`eyedropper cancelled or failed: ${t}`}}render(){const{r:t,g:e,b:i,a:o}=this.colorValues,r=b(this.hue,100,100),{x:n,y:l}=((t,e,i,s)=>{const{s:a,v:o}=((t,e,i,s)=>{t/=255,e/=255,i/=255;const a=Math.max(t,e,i),o=a-Math.min(t,e,i);let r=0;return r=0===o?0:a===t?(e-i)/o%6:a===e?(i-t)/o+2:(t-e)/o+4,r=Math.round(60*r),r<0&&(r+=360),{h:null!=s?s:r,s:0===a?0:o/a,v:a}})(e.r,e.g,e.b,t);return{x:Math.round(a*i),y:Math.round((1-o)*s)}})(this.hue,{r:t,g:e,b:i},288,160),h={left:`${n}px`,top:`${l}px`,background:`rgb(${t}, ${e}, ${i})`};return s(a,{key:"89789ef1ae21c4c555f67fd1a09159765eb1ef9e",class:"xpl-input-color"},s("xpl-popover",{key:"2eececd5d3592e0111bc507892eb7f7cd8bad8e6",disabled:this.disabled,display:"menu"},s("div",{key:"56d4a7bb25c3cdeb09d38d2fa986fe7595c453c0",slot:"trigger"},s("div",{key:"e49c0143d634a99cc547ead6af263716a28dd9ff",class:{"xpl-input-color__display":!0,"xpl-input-color__display--disabled":this.disabled,"xpl-input-color__display--error":!!this.hasErrorState}},s("span",{key:"e65efc371fab736e640f375446c22340f801b8a2",class:"xpl-input-color__color",style:{background:g(this.colorValues)}}),this.colorValues.hex?s("span",{class:"xpl-input-color__value"},g(this.colorValues)):s("span",{class:"xpl-input-color__placeholder"},this.placeholder),this.eyeDropperSupported&&!this.hideEyeDropper&&s("xpl-icon",{key:"b71aa6dd82c16ac328da186920e04b2992341317",size:20,icon:"eye-dropper",class:"xpl-input-color__icon",onClick:t=>{t.stopPropagation(),this.openEyeDropper()}}))),s("div",{key:"8e6add90e733d299cea94559dcbc29dd4e64d9cd",class:"xpl-input-color__menu"},s("div",{key:"a488c9b7ef3ff0cabbbb4bf5a631f209034a2539",class:"xpl-input-color__sl-grid",ref:t=>{this.colorInputElements.slGrid=t},style:{background:["linear-gradient(to top, #000, #0000)","linear-gradient(to right, #fff, #fff0)",`rgb(${r.r} ${r.g} ${r.b})`].join(", ")},onMouseDown:this.startDrag,onTouchStart:this.startDrag},s("div",{key:"542a5cafd651e6b49f813f6eecb46088b0b6f97c",class:"xpl-input-color__sl-thumb",style:h})),s("div",{key:"fd3268874bb0c0bc22c2d2db15dd50c38d3ae70a",class:"xpl-input-color__grid"},s("input",{key:"08ea52b5c2bbc2800b2ad5cca6981813e4578ce5",type:"range",min:"0",max:"360",value:this.hue,class:"xpl-input-color__slider xpl-input-color__hue",name:"color-hue-slider",ref:t=>{this.colorInputElements.hue=t}}),s("input",{key:"1692e362cb1e48446f33e2f82c5988546ad6a6f0",type:"range",min:"0",max:"1",step:"0.01",value:o,class:"xpl-input-color__slider xpl-input-color__alpha",name:"color-alpha-slider",ref:t=>{this.colorInputElements.alpha=t},style:{backgroundImage:[`linear-gradient(to right, rgb(${t} ${e} ${i} / 0) 0%, rgb(${t} ${e} ${i} / 1) 100%)`,"linear-gradient(45deg, #ccc 25%, transparent 25%)","linear-gradient(-45deg, #ccc 25%, transparent 25%)","linear-gradient(45deg, transparent 75%, #ccc 75%)","linear-gradient(-45deg, transparent 75%, #ccc 75%)"].join(", ")}}),s("div",{key:"5de3d1979fbb4c4a2892961fcbd7e6fc2d2723b4",class:"xpl-input-color__preview",style:{background:`rgba(${t}, ${e}, ${i}, ${o})`}})),s("div",{key:"3a660bdbb902bc8bfddb8c423f2462404b0221b8",class:"xpl-input-color__inputs"},Object.entries(this.colorInputElements).filter((([t])=>["hex","r","g","b","a"].includes(t))).map((([t])=>s("xpl-input",{key:t,label:t.toLocaleUpperCase(),name:`color-${t}-input`,placeholder:"hex"===t?"793EF7":"0",value:this.colorValues[t],ref:e=>{this.colorInputElements[t]=e}})))))))}static get watchers(){return{colorValues:[{valueChanged:0}],hasErrorState:[{onHasErrorStateChanged:0}],value:[{onValuePropChange:0}]}}},[0,"xpl-input-color",{value:[1],placeholder:[1],disabled:[4],required:[4],hideEyeDropper:[4,"hide-eye-dropper"],hasErrorState:[32],colorValues:[32],eyeDropperSupported:[32],hue:[32]},void 0,{colorValues:[{valueChanged:0}],hasErrorState:[{onHasErrorStateChanged:0}],value:[{onValuePropChange:0}]}]);function $(){"undefined"!=typeof customElements&&["xpl-input-color","xpl-icon","xpl-input","xpl-input-color","xpl-input-date","xpl-input-file","xpl-input-time","xpl-popover"].forEach((t=>{switch(t){case"xpl-input-color":customElements.get(o(t))||customElements.define(o(t),E);break;case"xpl-icon":customElements.get(o(t))||p();break;case"xpl-input":customElements.get(o(t))||M();break;case"xpl-input-color":customElements.get(o(t))||$();break;case"xpl-input-date":customElements.get(o(t))||c();break;case"xpl-input-file":customElements.get(o(t))||d();break;case"xpl-input-time":customElements.get(o(t))||k();break;case"xpl-popover":customElements.get(o(t))||u()}}))}const _=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.focusEvent=i(this,"focusEvent",7),this.blurEvent=i(this,"blurEvent",7),this.valueChange=i(this,"valueChange",7),this.inputEvent=i(this,"inputEvent",7),this.multiline=!1,this.dateFormat="Y-m-d",this.timeFormat="24h",this.allowCustomOption=!1,this.mode="single",this.accept="",this.multiple=!1,this.hideTriggerOnSelect=!1,this.hideFileNames=!1,this.hideAcceptText=!1,this.type="text",this.valueChanged=t=>{this.valueChange.emit(t.target.value)},this.characterCount=0,this.passwordVisible=!1,this.handleFocus=t=>{this.focusEvent.emit(t)},this.handleBlur=t=>{this.blurEvent.emit(t)},this.handleInput=t=>{this.multiline&&this.updateCharacterCount();const{value:e}=t.target;this.inputEvent.emit(e)}}updateCharacterCount(){this.characterCount=this.input.value.length}componentWillLoad(){null!=this._id&&""!==this._id||(this._id=m()),this.multiline&&void 0!==this.maxCharacterCount&&(this.characterCount=void 0!==this.value?this.value.length:0)}renderInput(){switch(this.type){case"file":return s("xpl-input-file",{accept:this.accept,disabled:this.disabled,hideAcceptText:this.hideAcceptText,hideFileNames:this.hideFileNames,hideTriggerOnSelect:this.hideTriggerOnSelect,multiple:this.multiple,name:this.name,_id:this._id},s("slot",{name:"trigger"}));case"color":return s("xpl-input-color",{disabled:this.disabled,value:this.value,placeholder:this.placeholder,required:this.required,hideEyeDropper:this.hideEyeDropper});case"date":return s("xpl-input-date",{inputId:this._id,disabled:this.disabled,name:this.name,required:this.required,readonly:this.readonly,value:this.value,placeholder:this.placeholder,post:this.post,pre:this.pre,max:this.max,min:this.min,dateFormat:this.dateFormat,mode:this.mode});case"time":return s("xpl-input-time",{inputId:this._id,disabled:this.disabled,name:this.name,required:this.required,readonly:this.readonly,value:this.value,placeholder:this.placeholder,max:this.max,min:this.min,step:this.step,mode:this.mode,timeFormat:this.timeFormat,allowCustomOption:this.allowCustomOption});default:return s("div",{class:"xpl-input-wrapper"},this.pre&&!this.multiline&&s("label",{class:"xpl-input-pre",htmlFor:this._id},this.pre),this.multiline?s("textarea",{disabled:this.disabled,id:this._id,name:this.name,placeholder:this.placeholder,readonly:this.readonly,ref:t=>{this.input=t},required:this.required,onChange:this.valueChanged,onFocus:this.handleFocus,onBlur:this.handleBlur,onInput:this.handleInput},this.value):s("input",{autocomplete:this.autocomplete,disabled:this.disabled,id:this._id,max:this.max,min:this.min,name:this.name,placeholder:this.placeholder,readonly:this.readonly,ref:t=>{this.input=t},required:this.required,step:this.step,type:this.type,value:this.value,onChange:this.valueChanged,onFocus:this.handleFocus,onBlur:this.handleBlur,onInput:this.handleInput}),"password"===this.type&&s("button",{"aria-label":"Toggle password visibility",class:"xpl-input-password",onClick:()=>{this.passwordVisible=!this.passwordVisible},role:"presentation"},s("xpl-icon",{icon:this.passwordVisible?"eye-closed":"eye",size:24})),this.post&&!this.multiline&&s("label",{class:"xpl-input-post",htmlFor:this._id},this.post),this.multiline&&void 0!==this.maxCharacterCount&&s("span",{class:"xpl-input-characters"},this.characterCount,"/",this.maxCharacterCount))}}render(){var t;let e=!1;return(this.error||this.multiline&&void 0!==this.maxCharacterCount&&this.characterCount>this.maxCharacterCount)&&(e=!0),s(a,{key:"c682985a3d592f9f9902a16013a5d00f40ce5e44",class:{"xpl-input":!0,"xpl-input--disabled":this.disabled,"xpl-input--error":e,"xpl-input--readonly":this.readonly,[`xpl-input--${this.type}`]:!0}},this.label&&s("label",{key:"21d863221e85a255f3dc5e662139b7abc0e72907",class:"xpl-input-label",htmlFor:this._id},this.label,this.description&&s("small",{key:"25d078a667c8b9cbf4d1b5d1f412c3d0e736013a"},this.description)),this.renderInput(),(null===(t=this.error)||void 0===t?void 0:t.length)>0&&s("label",{key:"7e13c1fc18496bdf50cdb2a239c113c182b83f18",class:"xpl-input-error",htmlFor:this._id},s("xpl-icon",{key:"900d641cfcd94d9f6cc85ba34e1e211448c203df",icon:"alert-circle",size:16}),s("span",{key:"74f7868861f5c262038bee3de2faeecc46b2454d"},this.error)))}},[260,"xpl-input",{_id:[1],description:[1],disabled:[4],error:[1],label:[1],name:[1],required:[4],readonly:[4],value:[1],autocomplete:[1],placeholder:[1],post:[1],pre:[1],max:[8],min:[8],step:[2],multiline:[4],maxCharacterCount:[2,"max-character-count"],dateFormat:[1,"date-format"],timeFormat:[1,"time-format"],allowCustomOption:[4,"allow-custom-option"],mode:[1],accept:[1],multiple:[4],hideTriggerOnSelect:[4,"hide-trigger-on-select"],hideFileNames:[4,"hide-file-names"],hideAcceptText:[4,"hide-accept-text"],hideEyeDropper:[4,"hide-eye-dropper"],type:[1],characterCount:[32],passwordVisible:[32]}]);function M(){"undefined"!=typeof customElements&&["xpl-input","xpl-dropdown","xpl-dropdown-group","xpl-dropdown-heading","xpl-dropdown-option","xpl-icon","xpl-input","xpl-input-color","xpl-input-date","xpl-input-file","xpl-input-time","xpl-popover"].forEach((t=>{switch(t){case"xpl-input":customElements.get(o(t))||customElements.define(o(t),_);break;case"xpl-dropdown":customElements.get(o(t))||r();break;case"xpl-dropdown-group":customElements.get(o(t))||n();break;case"xpl-dropdown-heading":customElements.get(o(t))||l();break;case"xpl-dropdown-option":customElements.get(o(t))||h();break;case"xpl-icon":customElements.get(o(t))||p();break;case"xpl-input":customElements.get(o(t))||M();break;case"xpl-input-color":customElements.get(o(t))||$();break;case"xpl-input-date":customElements.get(o(t))||c();break;case"xpl-input-file":customElements.get(o(t))||d();break;case"xpl-input-time":customElements.get(o(t))||k();break;case"xpl-popover":customElements.get(o(t))||u()}}))}export{_ as X,E as a,$ as b,w as c,M as d,k as e}
|
|
1
|
+
import{proxyCustomElement as t,HTMLElement as e,createEvent as i,h as s,Host as n,transformTag as a}from"@stencil/core/internal/client";import{d as o}from"./xpl-dropdown2.js";import{d as r}from"./xpl-dropdown-group2.js";import{d as l}from"./xpl-dropdown-heading2.js";import{d as h}from"./xpl-dropdown-option2.js";import{d as c}from"./xpl-icon2.js";import{d}from"./xpl-input-date2.js";import{d as p}from"./xpl-input-file2.js";import{v as u}from"./v4.js";import{d as m}from"./xpl-popover2.js";const f=(t,e,i)=>{const s=(i/=100)*(e/=100),n=s*(1-Math.abs(t/60%2-1)),a=i-s;let o=0,r=0,l=0;return t<60?(o=s,r=n,l=0):t<120?(o=n,r=s,l=0):t<180?(o=0,r=s,l=n):t<240?(o=0,r=n,l=s):t<300?(o=n,r=0,l=s):(o=s,r=0,l=n),{r:Math.round(255*(o+a)),g:Math.round(255*(r+a)),b:Math.round(255*(l+a))}},b=(t,e,i)=>[t,e,i].map((t=>t.toString(16).padStart(2,"0"))).join(""),x=t=>{var e,i;if(t.startsWith("#")){if(!/^#([a-fA-F\d]{6})$/.test(t))throw new Error("Only 6-digit hex format supported (e.g. #aabbcc)");const e=t.toLowerCase().slice(1),i=parseInt(e.slice(0,2),16),s=parseInt(e.slice(2,4),16),n=parseInt(e.slice(4,6),16);return{hex:e,r:i,g:s,b:n,a:1}}if(t.startsWith("rgba")||t.startsWith("rgb")){const i=null===(e=t.match(/[\d.]+/g))||void 0===e?void 0:e.map(Number);if(!i||i.length<3)throw new Error("Invalid rgba/rgb format");const[s,n,a,o=1]=i,r=t=>t.toString(16).padStart(2,"0");return{hex:`${r(s)}${r(n)}${r(a)}`.toLowerCase(),r:s,g:n,b:a,a:o}}if(t.startsWith("hsla")||t.startsWith("hsl")){const e=null===(i=t.match(/[\d.]+/g))||void 0===i?void 0:i.map(Number);if(!e||e.length<3)throw new Error("Invalid hsla/hsl format");const[s,n,a,o=1]=e,r=((t,e,i,s)=>{i/=100;const n=e=>(e+t/30)%12,a=(e/=100)*Math.min(i,1-i),o=t=>i-a*Math.max(-1,Math.min(n(t)-3,Math.min(9-n(t),1)));return`rgba(${Math.round(255*o(0))}, ${Math.round(255*o(8))}, ${Math.round(255*o(4))}, ${s})`})(s,n,a,o),[l,h,c]=r.match(/[\d.]+/g).map(Number);return{hex:b(l,h,c).toLowerCase(),r:l,g:h,b:c,a:o}}throw new Error("Unsupported color format")},g=t=>t.a&&1!==t.a?`rgba(${t.r}, ${t.g}, ${t.b}, ${t.a})`:`#${t.hex}`,v=[{countryCode:"US",dialCode:"+1",name:"United States"},{countryCode:"CA",dialCode:"+1",name:"Canada"},{countryCode:"GB",dialCode:"+44",name:"United Kingdom"},{countryCode:"AU",dialCode:"+61",name:"Australia"},{countryCode:"DE",dialCode:"+49",name:"Germany"},{countryCode:"FR",dialCode:"+33",name:"France"},{countryCode:"ES",dialCode:"+34",name:"Spain"},{countryCode:"IT",dialCode:"+39",name:"Italy"},{countryCode:"NL",dialCode:"+31",name:"Netherlands"},{countryCode:"BE",dialCode:"+32",name:"Belgium"},{countryCode:"AT",dialCode:"+43",name:"Austria"},{countryCode:"CH",dialCode:"+41",name:"Switzerland"},{countryCode:"PL",dialCode:"+48",name:"Poland"},{countryCode:"IE",dialCode:"+353",name:"Ireland"},{countryCode:"PT",dialCode:"+351",name:"Portugal"},{countryCode:"SE",dialCode:"+46",name:"Sweden"},{countryCode:"NO",dialCode:"+47",name:"Norway"},{countryCode:"DK",dialCode:"+45",name:"Denmark"},{countryCode:"FI",dialCode:"+358",name:"Finland"},{countryCode:"NZ",dialCode:"+64",name:"New Zealand"},{countryCode:"JP",dialCode:"+81",name:"Japan"},{countryCode:"CN",dialCode:"+86",name:"China"},{countryCode:"IN",dialCode:"+91",name:"India"},{countryCode:"BR",dialCode:"+55",name:"Brazil"},{countryCode:"MX",dialCode:"+52",name:"Mexico"},{countryCode:"ZA",dialCode:"+27",name:"South Africa"},{countryCode:"SG",dialCode:"+65",name:"Singapore"},{countryCode:"HK",dialCode:"+852",name:"Hong Kong"},{countryCode:"KR",dialCode:"+82",name:"South Korea"}];function C(t){return v.find((e=>e.countryCode===t))}function y(t){return(t||"").replace(/\D/g,"")}function $(t){switch(t){case"US":case"CA":case"MX":case"JP":case"IN":case"KR":return 10;case"GB":case"DE":case"AT":case"CH":case"BR":case"CN":return 11;case"AU":case"FR":return 9;default:return 15}}function w(t,e){if(!t)return"";const i=t.replace(/\D/g,"");switch(e){case"US":case"CA":return function(t){const e=Math.min(t.length,10);return e<=3?t.slice(0,e):e<=6?`${t.slice(0,3)} ${t.slice(3,e)}`:`${t.slice(0,3)} ${t.slice(3,6)} ${t.slice(6,e)}`}(i);case"GB":return function(t){const e=Math.min(t.length,11);return e<=4?t.slice(0,e):e<=7?`${t.slice(0,4)} ${t.slice(4,e)}`:`${t.slice(0,4)} ${t.slice(4,7)} ${t.slice(7,e)}`}(i);case"AU":return function(t){const e=Math.min(t.length,9);return e<=1?t.slice(0,e):e<=4?`${t.slice(0,1)} ${t.slice(1,e)}`:e<=7?`${t.slice(0,1)} ${t.slice(1,4)} ${t.slice(4,e)}`:`${t.slice(0,1)} ${t.slice(1,4)} ${t.slice(4,7)} ${t.slice(7,e)}`}(i);case"DE":case"AT":case"CH":return function(t){const e=Math.min(t.length,11);return e<=3?t.slice(0,e):`${t.slice(0,3)} ${t.slice(3,e)}`}(i);case"FR":return function(t){const e=Math.min(t.length,9),i=[];let s=0;for(e>0&&(i.push(t.slice(0,1)),s=1);s<e&&s+2<=e;)i.push(t.slice(s,s+2)),s+=2;return s<e&&i.push(t.slice(s)),i.join(" ")}(i);case"BR":return function(t){const e=Math.min(t.length,11);return e<=2?e?`(${t}`:"":e<=6||7===e?`(${t.slice(0,2)}) ${t.slice(2,e)}`:`(${t.slice(0,2)}) ${t.slice(2,7)}-${t.slice(7,e)}`}(i);case"MX":return function(t){const e=Math.min(t.length,10);return e<=3?t.slice(0,e):e<=6?`${t.slice(0,3)} ${t.slice(3,e)}`:`${t.slice(0,3)} ${t.slice(3,6)} ${t.slice(6,e)}`}(i);case"JP":return function(t){const e=Math.min(t.length,10);return e<=3?t.slice(0,e):e<=7?`${t.slice(0,3)}-${t.slice(3,e)}`:`${t.slice(0,3)}-${t.slice(3,7)}-${t.slice(7,e)}`}(i);case"CN":return function(t){const e=Math.min(t.length,11);return e<=3?t.slice(0,e):e<=7?`${t.slice(0,3)} ${t.slice(3,e)}`:`${t.slice(0,3)} ${t.slice(3,7)} ${t.slice(7,e)}`}(i);case"IN":return function(t){const e=Math.min(t.length,10);return e<=5?t.slice(0,e):`${t.slice(0,5)} ${t.slice(5,e)}`}(i);case"KR":return function(t){const e=Math.min(t.length,10);return e<=3?t.slice(0,e):e<=7?`${t.slice(0,3)} ${t.slice(3,e)}`:`${t.slice(0,3)} ${t.slice(3,7)} ${t.slice(7,e)}`}(i);default:return function(t){const e=t.length;if(e<=3)return t;const i=[];let s=0;for(;s<e;){const n=e-s>=4?4:3;i.push(t.slice(s,s+n)),s+=n}return i.join(" ")}(i)}}function k(t){const[e,i]=t.split(":"),s=Number(e)>=12?"PM":"AM";return[(Number(e)%12||12).toString(),i,s]}const E=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.valueChange=i(this,"valueChange",7),this.hasErrorStateChanged=i(this,"hasErrorStateChanged",7),this.max="23:59",this.min="00:00",this.step=30,this.mode="single",this.timeFormat="24h",this.allowCustomOption=!1,this.showOptions=!1,this.options=[],this.handleInput=t=>{var e;const i=null===(e=t.target.value)||void 0===e?void 0:e.replace(/[^0-9:apmAPM]/g,"");this.value=i},this.handleFocus=()=>{this.showOptions=!0},this.handleBlur=()=>{this.value=function(t){if(!t||""===t.trim()||0===t.replace(/[^0-9]/g,"").length)return null;let e=t.trim().toLowerCase();e=e.replace(/(\d)\s+(am|pm)/g,"$1$2"),/^\d{1,2}(am|pm)?$/.test(e)&&(e=e.replace(/(am|pm)?$/,":00$1")),/^\d{1,2}$/.test(e)&&(e=`${e}:00`),/^\d{1,2}:\d{1}$/.test(e)&&(e=`${e}0`);const[i,s]=e.split(":"),n=s.replace(/[^0-9]/g,""),a=e.includes("am");return e.includes("pm")||a?a?`${(Number(i)%12).toString().padStart(2,"0")}:${n}`:`${Number(i)%12+12}:${n}`:`${i.padStart(2,"0")}:${n}`}(this.value)},this.handleClick=()=>{this.showOptions=!0}}onValueChange(t){this.valueChange.emit(t),this.updateState(t)}updateState(t){this.formattedValue=this.formatDisplayedTime(t),this.amPm=this.formatDisplayedAmPm(t),this.validateValue()}formatDisplayedTime(t){if(!t)return"";if("12h"===this.timeFormat&&t.includes(":")){const[e,i]=k(t);return`${e}:${i}`}return t}formatDisplayedAmPm(t){if(!t||"12h"!==this.timeFormat)return"";const[,,e]=k(t);return e}validateValue(){this.hasErrorState=this.value?!this.value.includes(":")||this.value.trim().length<4||this.value.trim().length>5?"Invalid time format, must be HH:MM":this.value<this.min||this.value>this.max?"Out of range":this.allowCustomOption||this.options.some((t=>t.value===this.value))?null:"Invalid option":this.required?"required":null}onHasErrorStateChanged(t){this.hasErrorStateChanged.emit(t)}componentDidLoad(){var t;"range"===this.mode&&console.warn("Range mode is not supported for time inputs at this time."),null===(t=this.dropdown)||void 0===t||t.addEventListener("isOpenChange",(t=>{this.showOptions=t.detail}))}componentWillLoad(){this.options=this.getOptions(),this.value&&this.updateState(this.value)}getOptions(){return function(t,e,i,s){const n=t=>{const[e,i]=t.split(":").map(Number);return 60*e+i},a=n(e.toString()),o=n(i.toString()),r=[];for(let e=a;e<=o;e+=t)r.push((l=e,`${Math.floor(l/60).toString().padStart(2,"0")}:${(l%60).toString().padStart(2,"0")}`));var l;return r.map((t=>({label:"12h"===s?function(t){const[e,i,s]=k(t);return`${e}:${i} ${s}`}(t):t,value:t})))}(this.step,this.min.toString(),this.max.toString(),this.timeFormat).map((({label:t,value:e})=>({label:t,value:e,onClick:()=>{this.value=e,this.showOptions=!1}})))}render(){return s(n,{key:"2dfd50560c047646807e49c2263454286b607a35",class:{"xpl-input-time":!0,[`xpl-input-time--mode-${this.mode}`]:!0,"xpl-input-time--error":!!this.hasErrorState}},s("xpl-input",{key:"5ebb2d5031efae40beae3ac0cf2a40bed5b96ae5",pre:s("xpl-icon",{class:"xpl-input-time__clock-icon",icon:"clock",size:24}),post:"12h"===this.timeFormat?this.amPm||"AM":null,type:"text",_id:this.inputId,disabled:this.disabled,name:this.name,required:this.required,readonly:this.readonly,placeholder:this.placeholder,max:this.max,min:this.min,onInput:this.handleInput,value:this.formattedValue,onFocusEvent:this.handleFocus,onBlurEvent:this.handleBlur,onClick:this.handleClick}),!this.readonly&&!this.disabled&&s("xpl-dropdown",{key:"313ee3020ddf2710e82756f1bc0e260b8959ef9e",options:this.options,isOpen:this.showOptions,ref:t=>{this.dropdown=t},class:"xpl-input-time__dropdown"}))}static get watchers(){return{value:[{onValueChange:0}],hasErrorState:[{onHasErrorStateChanged:0}]}}},[0,"xpl-input-time",{inputId:[1,"input-id"],disabled:[4],name:[1],required:[4],readonly:[4],value:[1537],placeholder:[1],max:[8],min:[8],step:[2],mode:[1],timeFormat:[1,"time-format"],allowCustomOption:[4,"allow-custom-option"],formattedValue:[32],hasErrorState:[32],showOptions:[32],options:[32],amPm:[32]},void 0,{value:[{onValueChange:0}],hasErrorState:[{onHasErrorStateChanged:0}]}]);function _(){"undefined"!=typeof customElements&&["xpl-input-time","xpl-dropdown","xpl-dropdown-group","xpl-dropdown-heading","xpl-dropdown-option","xpl-icon","xpl-input","xpl-input-color","xpl-input-date","xpl-input-file","xpl-input-phone","xpl-input-time"].forEach((t=>{switch(t){case"xpl-input-time":customElements.get(a(t))||customElements.define(a(t),E);break;case"xpl-dropdown":customElements.get(a(t))||o();break;case"xpl-dropdown-group":customElements.get(a(t))||r();break;case"xpl-dropdown-heading":customElements.get(a(t))||l();break;case"xpl-dropdown-option":customElements.get(a(t))||h();break;case"xpl-icon":customElements.get(a(t))||c();break;case"xpl-input":customElements.get(a(t))||A();break;case"xpl-input-color":customElements.get(a(t))||N();break;case"xpl-input-date":customElements.get(a(t))||d();break;case"xpl-input-file":customElements.get(a(t))||p();break;case"xpl-input-phone":customElements.get(a(t))||I();break;case"xpl-input-time":customElements.get(a(t))||_()}}))}function M(t){return t.toLowerCase().replace(/ /g,"-")}const S=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.hasErrorStateChanged=i(this,"hasErrorStateChanged",7),this.valueChange=i(this,"valueChange",7),this.lastCursorRef=0,this.lastFormattedRef="",this.dropdownOpen=!1,this.hasErrorState=null,this.nationalNumber="",this.searchQuery="",this.triggerId=`xpl-input-phone-trigger-${u()}`,this.defaultCountry="US",this.isInternational=!0,this.handleTriggerClick=()=>{this.isEditable&&(this.dropdownOpen=!this.dropdownOpen)},this.handleNumberInput=t=>{var e;const i=t.target,s=i.value||"";let n;if(this.lastCursorRef=null!==(e=i.selectionStart)&&void 0!==e?e:0,this.lastFormattedRef=s,this.isInternational&&s.startsWith("+")){const t=y(s),e=this.effectiveDialCode.slice(1).replace(/\D/g,"");n=e&&t.startsWith(e)?t.slice(e.length):t}else n=y(s);const a=$(this.effectiveCountryCode);n.length>a&&(n=n.slice(0,a)),this.nationalNumber=n,this.emitValue(),i.value=this.displayValue},this.handleClear=()=>{var t;this.nationalNumber="",this.emitValue(),null===(t=this.inputEl)||void 0===t||t.focus()},this.handleDropdownUpdate=(t,{component:e})=>{var i;const s=null!=e?e:this.dropdownRef;if(!s)return;const{options:n}=s;if(null==n?void 0:n.length){const t=n.reduce(((t,e)=>{var i;return[...t,...e.groupName?null!==(i=e.options)&&void 0!==i?i:[]:[e]]}),[]),e=t.find((t=>t.isSelected));if(null==e?void 0:e.value){const t=C(e.value);t&&(this.selectedCountry=t,this.emitValue(),null===(i=this.inputEl)||void 0===i||i.focus())}}}}onDropdownOpenChange(t){t&&(this.searchQuery="")}onHasErrorStateChanged(t){this.hasErrorStateChanged.emit(t)}onValueChange(t){var e,i;if(null==t||""===t){const t=C(this.defaultCountry)||v[0];return this.selectedCountry=t,void(this.nationalNumber="")}const s=function(t){if(!t||!t.startsWith("+"))return null;const e=t.slice(1).replace(/\D/g,"");if(!e.length)return null;const i=[...v].sort(((t,e)=>e.dialCode.replace(/\D/g,"").length-t.dialCode.replace(/\D/g,"").length)).find((t=>{const i=t.dialCode.slice(1).replace(/\D/g,"");return e.startsWith(i)}));if(!i)return null;const s=i.dialCode.slice(1).replace(/\D/g,""),n=e.slice(s.length);return{dialCode:i.dialCode,nationalNumber:n}}(t);if(s)if((null===(e=this.selectedCountry)||void 0===e?void 0:e.dialCode)===s.dialCode)this.nationalNumber=s.nationalNumber;else{const t=C(this.defaultCountry),e=null!==(i=(null==t?void 0:t.dialCode)===s.dialCode?t:void 0)&&void 0!==i?i:(n=s.dialCode,v.find((t=>t.dialCode===n)));e&&(this.selectedCountry=e,this.nationalNumber=s.nationalNumber)}else this.selectedCountry||(this.selectedCountry=C(this.defaultCountry)||v[0]);var n}componentWillLoad(){this.value?this.onValueChange(this.value):this.selectedCountry=C(this.defaultCountry)||v[0]}componentDidUpdate(){if(this.inputEl&&this.lastFormattedRef&&"function"==typeof this.inputEl.setSelectionRange){const t=function(t,e,i){if(i>=t.length)return e.length;const s=y(t.slice(0,i)).length;let n=0,a=0;for(let t=0;t<e.length;t+=1){if(/\d/.test(e[t])&&(a+=1,a>=s)){n=t+(a===s?1:0);break}n=t+1}return Math.min(n,e.length)}(this.lastFormattedRef,this.displayValue,this.lastCursorRef);this.inputEl.setSelectionRange(t,t),this.lastFormattedRef=""}else this.inputEl&&this.lastFormattedRef&&(this.lastFormattedRef="")}get effectiveCountryCode(){var t,e,i;return null!==(i=null!==(e=null===(t=this.selectedCountry)||void 0===t?void 0:t.countryCode)&&void 0!==e?e:this.defaultCountry)&&void 0!==i?i:"US"}get effectiveDialCode(){var t,e;return null!==(e=null===(t=this.selectedCountry)||void 0===t?void 0:t.dialCode)&&void 0!==e?e:"+1"}get isEditable(){return!this.disabled&&!this.readonly}get orderedCountries(){const t=this.preferredCountries||[],e=v.filter((e=>!t.includes(e.countryCode)));return[...t.map((t=>C(t))).filter(Boolean),...e]}get filteredCountries(){const t=this.searchQuery.trim().toLowerCase();return t?this.orderedCountries.filter((e=>e.name.toLowerCase().includes(t)||e.dialCode.includes(t)||e.countryCode.toLowerCase().includes(t))):this.orderedCountries}get displayValue(){return this.nationalNumber?w(this.nationalNumber,this.effectiveCountryCode):""}get effectivePlaceholder(){if(this.placeholder)return this.placeholder;const t=this.selectedCountry;return t?function(t){switch(t){case"US":case"CA":case"MX":default:return"000 000 0000";case"GB":return"0000 000 0000";case"AU":return"0 000 000 000";case"DE":case"AT":case"CH":return"000 0000000";case"FR":return"0 00 00 00 00";case"BR":return"00 00000 0000";case"JP":case"CN":case"KR":return"000 0000 0000";case"IN":return"00000 00000"}}(t.countryCode):""}get dropdownOptions(){return this.filteredCountries.map((t=>{var e;return{icon:M(t.name),label:`${t.name} (${t.dialCode})`,value:t.countryCode,isSelected:(null===(e=this.selectedCountry)||void 0===e?void 0:e.countryCode)===t.countryCode}}))}get maxInputLength(){const t=$(this.effectiveCountryCode);return w("9".repeat(t),this.effectiveCountryCode).length}emitValue(){const t=this.nationalNumber?function(t,e){const i=(t.slice(1)+e).replace(/\D/g,"");return i.length?`+${i}`:""}(this.effectiveDialCode,this.nationalNumber):"";this.value=t||void 0,this.valueChange.emit(t||""),this.validate()}validate(){this.hasErrorState=!this.required||this.nationalNumber.trim()?null:"required"}render(){var t;return s(n,{key:"e966930ecc1ce026b03daf50902ee783d469af03",class:{"xpl-input-phone":!0,"xpl-input-phone--error":!!this.hasErrorState,"xpl-input-phone--open":this.dropdownOpen,"xpl-input-phone--domestic":!this.isInternational}},s("div",{key:"d594d5345f30bd1165662930abee8b4214b2640d",class:"xpl-input-wrapper"},this.isInternational&&s("button",{key:"64842282265b03cce24e5d80386ea3f56c36b5ad",type:"button",id:this.triggerId,class:"xpl-input-phone__trigger",disabled:this.disabled,"aria-haspopup":"listbox","aria-expanded":this.dropdownOpen?"true":"false","aria-label":"Select country",onClick:this.handleTriggerClick},(null===(t=this.selectedCountry)||void 0===t?void 0:t.name)&&s("xpl-icon",{key:"00b0b9e477d285cc3e1c61becfbc056511d99ea2",class:"xpl-input-phone__flag",icon:M(this.selectedCountry.name),size:24,"aria-hidden":"true"}),s("xpl-icon",{key:"9cc394beb1573e00e0eca641bfa8590a5837ff48",class:"xpl-input-phone__trigger-icon",icon:"chevron-down",size:20,"aria-hidden":"true"})),s("div",{key:"ade974ac878f7c7bc3aa07f613a3005283d86819",class:"xpl-input-phone__input-wrap"},this.isInternational&&s("span",{key:"f4907b6f5919184dad42bac3a1071b2bbfe71a06",class:"xpl-input-phone__dial-code"},this.effectiveDialCode),s("input",{key:"89dce440dba56953574a05eda46862b4f24f84f8",ref:t=>{this.inputEl=t},type:"tel",id:this.inputId,class:"xpl-input-phone__input",name:this.name,disabled:this.disabled,readonly:this.readonly,required:this.required,"aria-invalid":this.hasErrorState?"true":"false",placeholder:this.effectivePlaceholder,autocomplete:this.isInternational?"tel-national":"tel",inputmode:"numeric",maxlength:this.maxInputLength,value:this.displayValue,onInput:this.handleNumberInput}),this.nationalNumber&&this.isEditable&&s("button",{key:"21e63c5dad2d73c8969e71c10cae9c507da8574a",type:"button",class:"xpl-input-phone__clear","aria-label":"Clear phone number",onClick:this.handleClear},s("xpl-icon",{key:"ef1044fd8cc939db7281a8e68e72c54effb55101",icon:"x-circle",size:16})))),this.isInternational&&this.isEditable&&s("xpl-dropdown",{key:"0de330a03e99bdc73af073ad5b20a7b817192307",ref:t=>{this.dropdownRef=t},isOpen:this.dropdownOpen,triggerId:this.triggerId,anchorToTrigger:!0,closeOnSelect:!0,mode:"single",options:this.dropdownOptions,update:this.handleDropdownUpdate,onIsOpenChange:t=>{this.dropdownOpen=t.detail},"aria-label":"Country"},s("div",{key:"6055decf8f631611786fc8720b17cf84341ef316",slot:"header",class:"xpl-input-phone__search-wrap"},s("xpl-input",{key:"6c53dbde79069dc000214f22d29b17e568fde19f",class:"xpl-input-phone__search",type:"text",label:"",placeholder:"Search",value:this.searchQuery,autocomplete:"off",onInputEvent:t=>{var e;this.searchQuery=null!==(e=t.detail)&&void 0!==e?e:""}},s("xpl-icon",{key:"cb57543146d6f874849d518aea4c01f670e4afa4",slot:"pre",class:"xpl-input-phone__search-icon",icon:"magnifier",size:20})))))}get el(){return this}static get watchers(){return{dropdownOpen:[{onDropdownOpenChange:0}],hasErrorState:[{onHasErrorStateChanged:0}],value:[{onValueChange:0}]}}},[0,"xpl-input-phone",{defaultCountry:[1,"default-country"],disabled:[4],inputId:[1,"input-id"],isInternational:[4,"is-international"],name:[1],placeholder:[1],preferredCountries:[16],readonly:[4],required:[4],value:[1537],dropdownOpen:[32],hasErrorState:[32],nationalNumber:[32],searchQuery:[32],selectedCountry:[32],triggerId:[32]},void 0,{dropdownOpen:[{onDropdownOpenChange:0}],hasErrorState:[{onHasErrorStateChanged:0}],value:[{onValueChange:0}]}]);function I(){"undefined"!=typeof customElements&&["xpl-input-phone","xpl-dropdown","xpl-dropdown-group","xpl-dropdown-heading","xpl-dropdown-option","xpl-icon","xpl-input","xpl-input-color","xpl-input-date","xpl-input-file","xpl-input-phone","xpl-input-time"].forEach((t=>{switch(t){case"xpl-input-phone":customElements.get(a(t))||customElements.define(a(t),S);break;case"xpl-dropdown":customElements.get(a(t))||o();break;case"xpl-dropdown-group":customElements.get(a(t))||r();break;case"xpl-dropdown-heading":customElements.get(a(t))||l();break;case"xpl-dropdown-option":customElements.get(a(t))||h();break;case"xpl-icon":customElements.get(a(t))||c();break;case"xpl-input":customElements.get(a(t))||A();break;case"xpl-input-color":customElements.get(a(t))||N();break;case"xpl-input-date":customElements.get(a(t))||d();break;case"xpl-input-file":customElements.get(a(t))||p();break;case"xpl-input-phone":customElements.get(a(t))||I();break;case"xpl-input-time":customElements.get(a(t))||_()}}))}const D={hex:"",r:0,g:0,b:0,a:1},O=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.inputChange=i(this,"inputChange",7),this.hasErrorStateChanged=i(this,"hasErrorStateChanged",7),this.placeholder="Select color",this.eyeDropperSupported="EyeDropper"in window,this.colorInputElements={hex:null,r:null,g:null,b:null,a:null,hue:null,slGrid:null,alpha:null},this.handleMove=t=>{const e=this.colorInputElements.slGrid.getBoundingClientRect(),i="touches"in t?t.touches[0].clientY:t.clientY,s=Math.max(0,Math.min(("touches"in t?t.touches[0].clientX:t.clientX)-e.left,e.width)),n=Math.max(0,Math.min(i-e.top,e.height)),a=s/e.width,o=n/e.height,r=f(this.hue,100,100),l=(255*(1-a)+a*r.r)*(1-o),h=(255*(1-a)+a*r.g)*(1-o),c=(255*(1-a)+a*r.b)*(1-o),d={r:Math.round(l),g:Math.round(h),b:Math.round(c),hex:b(Math.round(l),Math.round(h),Math.round(c)),a:this.colorValues.a};this.colorValues=d},this.startDrag=t=>{t.preventDefault(),this.handleMove(t),window.addEventListener("mousemove",this.handleMove),window.addEventListener("mouseup",this.stopDrag),window.addEventListener("touchmove",this.handleMove),window.addEventListener("touchend",this.stopDrag)},this.stopDrag=()=>{window.removeEventListener("mousemove",this.handleMove),window.removeEventListener("mouseup",this.stopDrag),window.removeEventListener("touchmove",this.handleMove),window.removeEventListener("touchend",this.stopDrag)},this.onHexInputChange=t=>{var e;const i=t.detail;if(i){const[t,s,n]=(t=>t?t.match(/\w\w/g).map((t=>parseInt(t,16))):[0,0,0])(i);this.colorValues={hex:i,r:t,g:s,b:n,a:null!==(e=this.colorValues.a)&&void 0!==e?e:1}}else this.colorValues=Object.assign({},D)},this.onRgbaInputChange=(t,e)=>{const i=parseFloat(e.detail);if(Number.isNaN(i))return void(this.hasErrorState=`invalid value from ${t.name}: ${i}`);const s=Object.assign({},this.colorValues);switch(t.name){case"color-r-input":s.r=i;break;case"color-g-input":s.g=i;break;case"color-b-input":s.b=i;break;case"color-a-input":s.a=i;break;default:this.hasErrorState=`unhandled input: ${t.name}`}s.hex=b(s.r,s.g,s.b),this.colorValues=s},this.onSliderInputChange=t=>{const e=parseFloat(t.value);if(Number.isNaN(e))this.hasErrorState=`invalid value from ${t.name}: ${e}`;else switch(t.name){case"color-hue-slider":this.colorValues=x(`hsla(${e}, 100%, 50%, 1)`),this.hue=e;break;case"color-alpha-slider":this.colorValues=Object.assign(Object.assign({},this.colorValues),{a:e});break;default:this.hasErrorState=`unhandled input: ${t.name}`}}}valueChanged(t){this.hasErrorState=this.required&&!t.hex?"required":null,this.inputChange.emit(t.hex?g(t):"")}onHasErrorStateChanged(t){this.hasErrorStateChanged.emit(t)}onValuePropChange(t){this.syncColorFromValue(t)}syncColorFromValue(t){if(t)try{this.colorValues=x(t),this.hue=(()=>{const t=this.colorValues.r/255,e=this.colorValues.g/255,i=this.colorValues.b/255,s=Math.max(t,e,i),n=Math.min(t,e,i),a=s-n;let o=0,r=0;const l=(s+n)/2;if(0!==a){switch(r=a/(1-Math.abs(2*l-1)),s){case t:o=(e-i)/a%6;break;case e:o=(i-t)/a+2;break;case i:o=(t-e)/a+4}o*=60,o<0&&(o+=360)}return{hue:Math.round(o),saturation:Math.round(100*r),lightness:Math.round(100*l)}})().hue}catch(t){this.hasErrorState="invalid color format",this.hue=0}else this.colorValues=Object.assign({},D),this.hasErrorState=null,this.hue=0}componentWillLoad(){this.syncColorFromValue(this.value)}componentDidLoad(){const{r:t,g:e,b:i,a:s,hue:n,alpha:a,hex:o}=this.colorInputElements;o.addEventListener("valueChange",(t=>{this.onHexInputChange(t)})),[t,e,i,s].forEach((t=>{t.addEventListener("valueChange",(e=>{this.onRgbaInputChange(t,e)}))})),[n,a].forEach((t=>{t.addEventListener("input",(()=>{this.onSliderInputChange(t)}))}))}async openEyeDropper(){try{const t=new window.EyeDropper,e=await t.open();this.colorValues=x(e.sRGBHex)}catch(t){this.hasErrorState=`eyedropper cancelled or failed: ${t}`}}render(){const{r:t,g:e,b:i,a}=this.colorValues,o=f(this.hue,100,100),{x:r,y:l}=((t,e,i,s)=>{const{s:n,v:a}=((t,e,i,s)=>{t/=255,e/=255,i/=255;const n=Math.max(t,e,i),a=n-Math.min(t,e,i);let o=0;return o=0===a?0:n===t?(e-i)/a%6:n===e?(i-t)/a+2:(t-e)/a+4,o=Math.round(60*o),o<0&&(o+=360),{h:null!=s?s:o,s:0===n?0:a/n,v:n}})(e.r,e.g,e.b,t);return{x:Math.round(n*i),y:Math.round((1-a)*s)}})(this.hue,{r:t,g:e,b:i},288,160),h={left:`${r}px`,top:`${l}px`,background:`rgb(${t}, ${e}, ${i})`};return s(n,{key:"a8cdba9ff504fbeaf7b21167b778d8cf00216a1a",class:"xpl-input-color"},s("xpl-popover",{key:"535497f6aba0e7e9e65b894cd8c62cebe8ad3dd5",disabled:this.disabled,display:"menu"},s("div",{key:"436c51111938bbbef99698b94bd5c3123bc0b42d",slot:"trigger"},s("div",{key:"09e8f57c0d1a35d1b0a5785ebb141db62c3db4d2",class:{"xpl-input-color__display":!0,"xpl-input-color__display--disabled":this.disabled,"xpl-input-color__display--error":!!this.hasErrorState}},s("span",{key:"76da6216e95d48dd5cdbb890e7fe14cf1be85c6b",class:"xpl-input-color__color",style:{background:g(this.colorValues)}}),this.colorValues.hex?s("span",{class:"xpl-input-color__value"},g(this.colorValues)):s("span",{class:"xpl-input-color__placeholder"},this.placeholder),this.eyeDropperSupported&&!this.hideEyeDropper&&s("xpl-icon",{key:"c4a560be47d17c98f353c0e324c0f9025f535fae",size:20,icon:"eye-dropper",class:"xpl-input-color__icon",onClick:t=>{t.stopPropagation(),this.openEyeDropper()}}))),s("div",{key:"844a66fa0523b133ce3e2b6d83e395254e9b513f",class:"xpl-input-color__menu"},s("div",{key:"c687aaa94b122258e09cffabcc5029905ddccb27",class:"xpl-input-color__sl-grid",ref:t=>{this.colorInputElements.slGrid=t},style:{background:["linear-gradient(to top, #000, #0000)","linear-gradient(to right, #fff, #fff0)",`rgb(${o.r} ${o.g} ${o.b})`].join(", ")},onMouseDown:this.startDrag,onTouchStart:this.startDrag},s("div",{key:"7e65660cef09fc5ae0c9dc0d49fe7769ad15b55a",class:"xpl-input-color__sl-thumb",style:h})),s("div",{key:"5e76247d0d59fca5500416ddeaca53784dc42209",class:"xpl-input-color__grid"},s("input",{key:"5b891dd55f6d4f5d1242d142c9af8a3af496e398",type:"range",min:"0",max:"360",value:this.hue,class:"xpl-input-color__slider xpl-input-color__hue",name:"color-hue-slider",ref:t=>{this.colorInputElements.hue=t}}),s("input",{key:"ae20b7cbfa6303c6615afee0fc35d0dda3bc1f70",type:"range",min:"0",max:"1",step:"0.01",value:a,class:"xpl-input-color__slider xpl-input-color__alpha",name:"color-alpha-slider",ref:t=>{this.colorInputElements.alpha=t},style:{backgroundImage:[`linear-gradient(to right, rgb(${t} ${e} ${i} / 0) 0%, rgb(${t} ${e} ${i} / 1) 100%)`,"linear-gradient(45deg, #ccc 25%, transparent 25%)","linear-gradient(-45deg, #ccc 25%, transparent 25%)","linear-gradient(45deg, transparent 75%, #ccc 75%)","linear-gradient(-45deg, transparent 75%, #ccc 75%)"].join(", ")}}),s("div",{key:"c4b884401f5324e37e09637785a2148ef5c99112",class:"xpl-input-color__preview",style:{background:`rgba(${t}, ${e}, ${i}, ${a})`}})),s("div",{key:"5d8eff1bf9e51bd44116c01e3bfd016414662d92",class:"xpl-input-color__inputs"},Object.entries(this.colorInputElements).filter((([t])=>["hex","r","g","b","a"].includes(t))).map((([t])=>s("xpl-input",{key:t,label:t.toLocaleUpperCase(),name:`color-${t}-input`,placeholder:"hex"===t?"793EF7":"0",value:this.colorValues[t],ref:e=>{this.colorInputElements[t]=e}})))))))}static get watchers(){return{colorValues:[{valueChanged:0}],hasErrorState:[{onHasErrorStateChanged:0}],value:[{onValuePropChange:0}]}}},[0,"xpl-input-color",{value:[1],placeholder:[1],disabled:[4],required:[4],hideEyeDropper:[4,"hide-eye-dropper"],hasErrorState:[32],colorValues:[32],eyeDropperSupported:[32],hue:[32]},void 0,{colorValues:[{valueChanged:0}],hasErrorState:[{onHasErrorStateChanged:0}],value:[{onValuePropChange:0}]}]);function N(){"undefined"!=typeof customElements&&["xpl-input-color","xpl-icon","xpl-input","xpl-input-color","xpl-input-date","xpl-input-file","xpl-input-phone","xpl-input-time","xpl-popover"].forEach((t=>{switch(t){case"xpl-input-color":customElements.get(a(t))||customElements.define(a(t),O);break;case"xpl-icon":customElements.get(a(t))||c();break;case"xpl-input":customElements.get(a(t))||A();break;case"xpl-input-color":customElements.get(a(t))||N();break;case"xpl-input-date":customElements.get(a(t))||d();break;case"xpl-input-file":customElements.get(a(t))||p();break;case"xpl-input-phone":customElements.get(a(t))||I();break;case"xpl-input-time":customElements.get(a(t))||_();break;case"xpl-popover":customElements.get(a(t))||m()}}))}const F=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.focusEvent=i(this,"focusEvent",7),this.blurEvent=i(this,"blurEvent",7),this.valueChange=i(this,"valueChange",7),this.inputEvent=i(this,"inputEvent",7),this.multiline=!1,this.dateFormat="Y-m-d",this.timeFormat="24h",this.allowCustomOption=!1,this.mode="single",this.accept="",this.multiple=!1,this.hideTriggerOnSelect=!1,this.hideFileNames=!1,this.hideAcceptText=!1,this.defaultCountry="US",this.isInternational=!0,this.type="text",this.valueChanged=t=>{this.valueChange.emit(t.target.value)},this.characterCount=0,this.passwordVisible=!1,this.hasPreSlotContent=!1,this.handleFocus=t=>{this.focusEvent.emit(t)},this.handleBlur=t=>{this.blurEvent.emit(t)},this.handleInput=t=>{this.multiline&&this.updateCharacterCount();const{value:e}=t.target;this.inputEvent.emit(e)},this.syncPreSlotContent=()=>{const t=this.hasDirectPreSlotChild();t!==this.hasPreSlotContent&&(this.hasPreSlotContent=t)}}updateCharacterCount(){this.characterCount=this.input.value.length}hasDirectPreSlotChild(){return Array.from(this.el.children).some((t=>"pre"===t.getAttribute("slot")))}componentWillLoad(){null!=this._id&&""!==this._id||(this._id=u()),this.multiline&&void 0!==this.maxCharacterCount&&(this.characterCount=void 0!==this.value?this.value.length:0),this.multiline||(this.hasPreSlotContent=this.hasDirectPreSlotChild())}componentDidLoad(){this.multiline||"undefined"!=typeof MutationObserver&&(this.preSlotObserver=new MutationObserver(this.syncPreSlotContent),this.preSlotObserver.observe(this.el,{childList:!0}))}disconnectedCallback(){var t;null===(t=this.preSlotObserver)||void 0===t||t.disconnect()}renderInput(){switch(this.type){case"file":return s("xpl-input-file",{accept:this.accept,disabled:this.disabled,hideAcceptText:this.hideAcceptText,hideFileNames:this.hideFileNames,hideTriggerOnSelect:this.hideTriggerOnSelect,multiple:this.multiple,name:this.name,_id:this._id},s("slot",{name:"trigger"}));case"color":return s("xpl-input-color",{disabled:this.disabled,value:this.value,placeholder:this.placeholder,required:this.required,hideEyeDropper:this.hideEyeDropper});case"date":return s("xpl-input-date",{inputId:this._id,disabled:this.disabled,name:this.name,required:this.required,readonly:this.readonly,value:this.value,placeholder:this.placeholder,post:this.post,pre:this.pre,max:this.max,min:this.min,dateFormat:this.dateFormat,mode:this.mode});case"time":return s("xpl-input-time",{inputId:this._id,disabled:this.disabled,name:this.name,required:this.required,readonly:this.readonly,value:this.value,placeholder:this.placeholder,max:this.max,min:this.min,step:this.step,mode:this.mode,timeFormat:this.timeFormat,allowCustomOption:this.allowCustomOption});case"phone":return s("xpl-input-phone",{inputId:this._id,disabled:this.disabled,name:this.name,required:this.required,readonly:this.readonly,value:this.value,placeholder:this.placeholder,defaultCountry:this.defaultCountry,preferredCountries:this.preferredCountries,isInternational:this.isInternational});default:return s("div",{class:"xpl-input-wrapper"},!this.multiline&&s("label",{class:{"xpl-input-pre":!0,"xpl-input-pre--hidden":!this.pre&&!this.hasPreSlotContent},htmlFor:this._id},s("slot",{name:"pre"},this.pre)),this.multiline?s("textarea",{disabled:this.disabled,id:this._id,name:this.name,placeholder:this.placeholder,readonly:this.readonly,ref:t=>{this.input=t},required:this.required,onChange:this.valueChanged,onFocus:this.handleFocus,onBlur:this.handleBlur,onInput:this.handleInput},this.value):s("input",{autocomplete:this.autocomplete,disabled:this.disabled,id:this._id,max:this.max,min:this.min,name:this.name,placeholder:this.placeholder,readonly:this.readonly,ref:t=>{this.input=t},required:this.required,step:this.step,type:this.type,value:this.value,onChange:this.valueChanged,onFocus:this.handleFocus,onBlur:this.handleBlur,onInput:this.handleInput}),"password"===this.type&&s("button",{"aria-label":"Toggle password visibility",class:"xpl-input-password",onClick:()=>{this.passwordVisible=!this.passwordVisible},role:"presentation"},s("xpl-icon",{icon:this.passwordVisible?"eye-closed":"eye",size:24})),this.post&&!this.multiline&&s("label",{class:"xpl-input-post",htmlFor:this._id},this.post),this.multiline&&void 0!==this.maxCharacterCount&&s("span",{class:"xpl-input-characters"},this.characterCount,"/",this.maxCharacterCount))}}render(){var t;let e=!1;return(this.error||this.multiline&&void 0!==this.maxCharacterCount&&this.characterCount>this.maxCharacterCount)&&(e=!0),s(n,{key:"c0d3b87b9dca0c4f75c15accb6542d270a43f3d3",class:{"xpl-input":!0,"xpl-input--disabled":this.disabled,"xpl-input--error":e,"xpl-input--readonly":this.readonly,[`xpl-input--${this.type}`]:!0}},this.label&&s("label",{key:"1842998b20424a952ff618ed15d611d59d2e9eba",class:"xpl-input-label",htmlFor:this._id},this.label,this.description&&s("small",{key:"ccfe57e608f789d643d2219091922cf259971b12"},this.description)),this.renderInput(),(null===(t=this.error)||void 0===t?void 0:t.length)>0&&s("label",{key:"3a3147f7e1be2d1f109a400baf005289bb37d60f",class:"xpl-input-error",htmlFor:this._id},s("xpl-icon",{key:"b4960e9243db0126ca5d6d3b3226c551927c2f39",icon:"alert-circle",size:16}),s("span",{key:"d8f524d135f664c876ae83594e113967bb933cca"},this.error)))}get el(){return this}},[260,"xpl-input",{_id:[1],description:[1],disabled:[4],error:[1],label:[1],name:[1],required:[4],readonly:[4],value:[1],autocomplete:[1],placeholder:[1],post:[1],pre:[1],max:[8],min:[8],step:[2],multiline:[4],maxCharacterCount:[2,"max-character-count"],dateFormat:[1,"date-format"],timeFormat:[1,"time-format"],allowCustomOption:[4,"allow-custom-option"],mode:[1],accept:[1],multiple:[4],hideTriggerOnSelect:[4,"hide-trigger-on-select"],hideFileNames:[4,"hide-file-names"],hideAcceptText:[4,"hide-accept-text"],hideEyeDropper:[4,"hide-eye-dropper"],defaultCountry:[1,"default-country"],preferredCountries:[16],isInternational:[4,"is-international"],type:[1],characterCount:[32],passwordVisible:[32],hasPreSlotContent:[32]}]);function A(){"undefined"!=typeof customElements&&["xpl-input","xpl-dropdown","xpl-dropdown-group","xpl-dropdown-heading","xpl-dropdown-option","xpl-icon","xpl-input","xpl-input-color","xpl-input-date","xpl-input-file","xpl-input-phone","xpl-input-time","xpl-popover"].forEach((t=>{switch(t){case"xpl-input":customElements.get(a(t))||customElements.define(a(t),F);break;case"xpl-dropdown":customElements.get(a(t))||o();break;case"xpl-dropdown-group":customElements.get(a(t))||r();break;case"xpl-dropdown-heading":customElements.get(a(t))||l();break;case"xpl-dropdown-option":customElements.get(a(t))||h();break;case"xpl-icon":customElements.get(a(t))||c();break;case"xpl-input":customElements.get(a(t))||A();break;case"xpl-input-color":customElements.get(a(t))||N();break;case"xpl-input-date":customElements.get(a(t))||d();break;case"xpl-input-file":customElements.get(a(t))||p();break;case"xpl-input-phone":customElements.get(a(t))||I();break;case"xpl-input-time":customElements.get(a(t))||_();break;case"xpl-popover":customElements.get(a(t))||m()}}))}export{F as I,O as a,N as b,S as c,A as d,I as e,E as f,_ as g}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as a,h as c,Host as t,transformTag as s}from"@stencil/core/internal/client";import{d as r}from"./xpl-icon2.js";const d=e(class extends a{constructor(e){super(),!1!==e&&this.__registerHost()}componentDidLoad(){if(this.link){const e=this.el.getElementsByTagName("a")[0]||this.el.getElementsByTagName("button")[0],a=document.createTextNode(this.name),c=document.createElement("span");c.appendChild(a),e.setAttribute("class","xpl-large-card__anchor"),e.appendChild(c)}}render(){const e="graph-content",a=this.el.querySelector(`[slot="${e}"]`);return c(t,{key:"
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as a,h as c,Host as t,transformTag as s}from"@stencil/core/internal/client";import{d as r}from"./xpl-icon2.js";const d=e(class extends a{constructor(e){super(),!1!==e&&this.__registerHost()}componentDidLoad(){if(this.link){const e=this.el.getElementsByTagName("a")[0]||this.el.getElementsByTagName("button")[0],a=document.createTextNode(this.name),c=document.createElement("span");c.appendChild(a),e.setAttribute("class","xpl-large-card__anchor"),e.appendChild(c)}}render(){const e="graph-content",a=this.el.querySelector(`[slot="${e}"]`);return c(t,{key:"02b42037a8e13fb68df0f40a07804bad533f690b",role:"group",class:"xpl-large-card "+(this.link?"xpl-large-card__link":""),tabindex:"0"},c("dt",{key:"27a8aa72e6e97d3918aa8a066c2528dab7466946",class:"xpl-large-card__header"},c("header",{key:"9846eccca6988543cc671abe84f0a68e0dba06b0"},c("slot",{key:"002ebff29d02550decb87f66609e941e6128c284",name:"title"},this.name),this.link&&c("span",{key:"a5c4dfe1c7149d95c5f4e6c291f61f75e49ce088",class:"xpl-data-card__header-arrow"},c("xpl-icon",{key:"a12c2c98867a189cb6bcabfcbbc6a08f2691c763",icon:"chevron-right",size:16}))),this.description&&c("div",{key:"d7ca785313811f6fd962804964a90a161118d936",class:"xpl-large-card__description"},this.description)),c("dd",{key:"fe57a3a97ffd2d124e74e20c88077ffb68ea938a",class:"xpl-large-card__body"},a&&c("slot",{key:"2ebfb5e288ca2426d3085c97cc3a0bec81a72c46",name:e})))}get el(){return this}},[260,"xpl-large-card",{link:[4],name:[1],description:[1]}]),l=d,n=function(){"undefined"!=typeof customElements&&["xpl-large-card","xpl-icon"].forEach((e=>{switch(e){case"xpl-large-card":customElements.get(s(e))||customElements.define(s(e),d);break;case"xpl-icon":customElements.get(s(e))||r()}}))};export{l as XplLargeCard,n as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as t,HTMLElement as l,h as s,Host as a,transformTag as e,Fragment as i}from"@stencil/core/internal/client";import{d as r}from"./xpl-avatar2.js";import{d as
|
|
1
|
+
import{proxyCustomElement as t,HTMLElement as l,h as s,Host as a,transformTag as e,Fragment as i}from"@stencil/core/internal/client";import{d as r}from"./xpl-avatar2.js";import{d as c}from"./xpl-badge2.js";import{d as n}from"./xpl-icon2.js";const p=({avatar:t,avatars:l,badges:a,href:e,title:r,subtext:c,metadata:n})=>{const p=l||a||c,o=s(i,null,t&&("/"===t.slice(0,1)||"http"===t.slice(0,4)?s("xpl-avatar",{src:t,name:r}):s("xpl-avatar",{name:r},t)),s("div",{class:"xpl-list-item-content"},s("div",{class:"xpl-list-left"},s("div",null,s("h4",null,r),n&&s("ul",{class:"xpl-list-item-metadata"},n.map((t=>"string"==typeof t?s("li",null,t):s("li",null,s("xpl-icon",{icon:t.icon})," ",t.text)))))),p&&s("div",{class:"xpl-list-right"},c&&s("div",{class:"xpl-list-item-subtext"},c),l&&s("div",{class:"xpl-avatar-group xpl-avatar-group--s"},l.map((t=>s("img",{src:t,alt:""})))),a&&a.map((t=>"string"==typeof t?s("xpl-badge",null,t):s("xpl-badge",{dot:t.dot,variant:t.variant},t.text))))));return e?s("a",{class:"xpl-list-item",href:e},o):s("div",{class:"xpl-list-item"},o)},o=t(class extends l{constructor(t){super(),!1!==t&&this.__registerHost(),this.items=[]}render(){return s(a,{key:"441b4eae6f2837f20b58221819ca3c10a2fb3491"},this.items.map((t=>s(p,Object.assign({},t)))))}},[0,"xpl-list",{items:[16]}]),m=o,x=function(){"undefined"!=typeof customElements&&["xpl-list","xpl-avatar","xpl-badge","xpl-icon"].forEach((t=>{switch(t){case"xpl-list":customElements.get(e(t))||customElements.define(e(t),o);break;case"xpl-avatar":customElements.get(e(t))||r();break;case"xpl-badge":customElements.get(e(t))||c();break;case"xpl-icon":customElements.get(e(t))||n()}}))};export{m as XplList,x as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as a,HTMLElement as e,createEvent as n,h as
|
|
1
|
+
import{proxyCustomElement as a,HTMLElement as e,createEvent as n,h as t,Host as d,transformTag as i}from"@stencil/core/internal/client";const c=a(class extends e{constructor(a){super(),!1!==a&&this.__registerHost(),this.navWidth=n(this,"navWidth",7),this.width="default"}navWidthHandler(){this.navWidth.emit(this.width)}connectedCallback(){this.navWidthHandler()}componentDidUpdate(){this.navWidthHandler()}render(){return t(d,{key:"d8a79782b16a4e9f8ab3e6bf88c0314549aa501a",class:"xpl-main-nav xpl-main-nav--"+this.width,"aria-label":"Sidebar"},t("nav",{key:"64dcaed4426ad4f6590671425e7571df5a1cd1d9"},t("header",{key:"7e97eee88a0cfff836aa40c9a2cba2a6dbfa59aa","aria-label":"Sidebar Header"},t("slot",{key:"c281a9fbd5192cd0bda381ba52e55a9a1f6f063b",name:"logo"}),t("slot",{key:"988a49a475779b472cac084f20b7e73ed1528089",name:"brand-name"})),t("div",{key:"6fb1ff561b1136126e466ff86dfff9b124862eb2",class:"xpl-main-nav__main_section"},t("slot",{key:"bf5af4e8b47c8666f7014a8e63102601278c8038",name:"navigation"})),t("footer",{key:"a836bd8d08638490d14ddd812cdc76b1dbe70392",class:"xpl-main-nav__footer","aria-label":"Sidebar Footer"},t("slot",{key:"05143d5082b2f8d699e23611df2b584c90a423c5",name:"footer"}))))}},[260,"xpl-main-nav",{width:[1]}]),f=c,s=function(){"undefined"!=typeof customElements&&["xpl-main-nav"].forEach((a=>{"xpl-main-nav"===a&&(customElements.get(i(a))||customElements.define(i(a),c))}))};export{f as XplMainNav,s as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as t,createEvent as a,h as s,Host as
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as t,createEvent as a,h as s,Host as c,transformTag as l}from"@stencil/core/internal/client";import{d as i}from"./xpl-backdrop2.js";import{d}from"./xpl-button2.js";import{d as o}from"./xpl-icon2.js";const n=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.modalClosed=a(this,"modalClosed",7),this.isOpen=!1,this.size="medium",this.variant="default",this.handleDialogClose=()=>{this.isOpen=!1,this.modalClosed.emit()},this.handleNativeBackdropClick=e=>{const t=this.dialogElement.getBoundingClientRect();(e.clientX<t.left||e.clientX>t.right||e.clientY<t.top||e.clientY>t.bottom)&&this.handleDialogClose()}}componentDidLoad(){this.dialogElement=this.element.querySelector("dialog"),this.updateModalState(),this.dialogElement.addEventListener("cancel",this.handleDialogClose),this.dialogElement.addEventListener("click",this.handleNativeBackdropClick)}disconnectedCallback(){this.dialogElement&&(this.dialogElement.removeEventListener("cancel",this.handleDialogClose),this.dialogElement.removeEventListener("click",this.handleNativeBackdropClick))}updateModalState(){var e,t;this.isOpen?null===(t=null===(e=this.dialogElement)||void 0===e?void 0:e.showModal)||void 0===t||t.call(e):this.dialogElement&&"function"==typeof this.dialogElement.close&&setTimeout((()=>{var e;null===(e=this.dialogElement)||void 0===e||e.close()}),250)}render(){return s(c,{key:"54638721a2e8f0928bf9a3c2c4b40b3d4ad54db2",class:"xpl-modal"},this.isOpen&&s("xpl-backdrop",{key:"910ca79829054343c67906d7514a0d34b37832d0"}),s("dialog",{key:"e284d70e8d190e64cb2b8df9a3ae327e7d2b0c00",class:`xpl-modal__dialog xpl-modal-size--${this.size} xpl-modal--${this.isOpen?"is-open":"is-closed"}`},s("div",{key:"42f86b8a9ef1cec791aa8b10458db11130d74839",class:"xpl-modal__header"},s("div",{key:"1884139c12c8d06d23454d4840a32fb8a464dd7b",class:"xpl-modal__title"},"warning"===this.variant&&s("xpl-icon",{key:"5211e56c773f787a7f0a78b45fcf64b2c6eeb44f",size:20,icon:"alert-triangle",class:"xpl-modal__alert-icon"}),s("slot",{key:"64287ebfac58f8f4c7e0133fb7f1d12781d12126",name:"title"}),s("xpl-button",{key:"d10c9ab2f4c9df1b7e830da76414849a1191beaf",type:"button",class:"xpl-modal__close-button","icon-only":!0,size:"sm",variant:"tertiary",onClick:this.handleDialogClose},s("xpl-icon",{key:"55fc8bce80a2a65d522fb3d91b0689ffdb245ed0",icon:"x"}))),s("div",{key:"17474a7e0561833a34b8c21319943ff8bde044f3",class:"xpl-modal__subtitle"},s("slot",{key:"5b482ed4b113f17906e4d1106426ae567c937a4e",name:"subtitle"}))),s("div",{key:"85e702a36d347ef2b941f5c590504433798020a0",class:"xpl-modal__body"},s("slot",{key:"a5b9cc60582a82126e000ec9b74aee9376e37253",name:"body"})),s("div",{key:"cff53f9aec109cff62835a9e13d168e434baec73",class:"xpl-modal__footer"},s("slot",{key:"cafc86918fca71f085c1e8d9c88f244bd5230f78",name:"tertiary"}),s("slot",{key:"a0fbe836ebe814c85571514bb53316429e1e65e1",name:"secondary"}),s("slot",{key:"cbf2a03c2d032fc32d1b0ecd319df7383085cfd3",name:"primary"}))))}get element(){return this}static get watchers(){return{isOpen:[{updateModalState:0}]}}},[260,"xpl-modal",{isOpen:[1540,"is-open"],size:[1],variant:[1]},void 0,{isOpen:[{updateModalState:0}]}]),b=n,f=function(){"undefined"!=typeof customElements&&["xpl-modal","xpl-backdrop","xpl-button","xpl-icon"].forEach((e=>{switch(e){case"xpl-modal":customElements.get(l(e))||customElements.define(l(e),n);break;case"xpl-backdrop":customElements.get(l(e))||i();break;case"xpl-button":customElements.get(l(e))||d();break;case"xpl-icon":customElements.get(l(e))||o()}}))};export{b as XplModal,f as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as t,createEvent as n,h as s,Host as o,transformTag as c}from"@stencil/core/internal/client";const
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as t,createEvent as n,h as s,Host as o,transformTag as c}from"@stencil/core/internal/client";const a=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.navOpen=n(this,"navOpen",7),this.navControl=!1}onNavToggle(){window.innerWidth<=640&&this.navOpen.emit(!1)}render(){return s(o,{key:"7e852a7daf95bc3f9b4c87bad07504496b6a5863",class:"xpl-nav-item",role:"listitem",onClick:()=>{this.navControl&&this.onNavToggle()}},s("slot",{key:"a88118864c2bdc808b7de975a530b77916b3750f",name:"link"},s("slot",{key:"91d6a9c350e5de8c6221587795d43e1c315bb8cc",name:"icon"}),s("slot",{key:"e37e0ee23226eb03200b12092e11a7ae47800abf"})))}},[260,"xpl-nav-item",{navControl:[4,"nav-control"]}]),i=a,l=function(){"undefined"!=typeof customElements&&["xpl-nav-item"].forEach((e=>{"xpl-nav-item"===e&&(customElements.get(c(e))||customElements.define(c(e),a))}))};export{i as XplNavItem,l as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as t,createEvent as
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as t,createEvent as a,h as s,Host as o,transformTag as i}from"@stencil/core/internal/client";import{d as n}from"./xpl-dropdown2.js";import{d as l}from"./xpl-dropdown-group2.js";import{d as p}from"./xpl-dropdown-heading2.js";import{d as r}from"./xpl-dropdown-option2.js";import{d as c}from"./xpl-icon2.js";import{d}from"./xpl-select2.js";import{d as h}from"./xpl-tag2.js";const g=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.pageChange=a(this,"pageChange",7),this.rowsPerPageChange=a(this,"rowsPerPageChange",7),this.totalPages=1,this.withPageControl=!1,this.currentPage=1,this.rowsPerPageOptions="10,25,50,100,150",this.selectedRowsPerPage=10,this.rowsPerPageSelectRef=null,this.pageSelectRef=null,this.handleNextPage=()=>{this.currentPage<this.totalPages&&(this.currentPage+=1)},this.handlePrevPage=()=>{this.currentPage>1&&(this.currentPage-=1)},this.handlePageChange=e=>{const t=parseInt(e.detail,10);Number.isNaN(t)||(this.currentPage=t)},this.handleRowsChange=e=>{const t=parseInt(e.detail,10);Number.isNaN(t)||(this.selectedRowsPerPage=t)}}get rowsPerPageOptionsArray(){return this.rowsPerPageOptions.split(",").map(Number)}onPageUpdate(e){e<1?this.currentPage=1:e>this.totalPages&&(this.currentPage=this.totalPages),this.pageChange.emit(this.currentPage)}onRowsPerPageUpdate(e){this.rowsPerPageChange.emit(e)}componentDidLoad(){var e,t;null===(e=this.rowsPerPageSelectRef)||void 0===e||e.addEventListener("changeEvent",this.handleRowsChange),null===(t=this.pageSelectRef)||void 0===t||t.addEventListener("changeEvent",this.handlePageChange)}disconnectedCallback(){var e,t;null===(e=this.rowsPerPageSelectRef)||void 0===e||e.removeEventListener("changeEvent",this.handleRowsChange),null===(t=this.pageSelectRef)||void 0===t||t.removeEventListener("changeEvent",this.handlePageChange)}render(){const e=this.currentPage<=1,t=this.currentPage>=this.totalPages;return s(o,{key:"a4b8f4ddd9b29563f64282e5728119e1552e5358",class:`xpl-pagination xpl-pagination__${this.withPageControl?"with":"no"}-page-control`},this.withPageControl&&s("div",{key:"00c0d20d2bc57eebd82105ebafe08a5696496b16",class:"xpl-pagination__rows-per-page"},s("label",{key:"1b28a926bbaa4b888217941bb0bf2d897d79dfbc",class:"xpl-pagination__rows-label"},"Rows per page:"),s("xpl-select",{key:"f8265a8d87986cfc0afbfcd9d783d767748a8957",class:"xpl-pagination__rows-per-page-select",choices:this.rowsPerPageOptionsArray.map((e=>({label:""+e,value:""+e,isSelected:e===this.selectedRowsPerPage}))),ref:e=>{this.rowsPerPageSelectRef=e}})),s("div",{key:"1444d9005878427c44a573d4f6dd1d674b677228",class:"xpl-pagination__pager"},s("button",{key:"08b98f8c1983543dad93c53d7c71d1aa71b4a45a",class:"xpl-pagination__pager-button xpl-pagination__pager-button-prev",disabled:e,onClick:this.handlePrevPage,"aria-label":"Previous Page",tabindex:"0"},s("xpl-icon",{key:"dcc26fcb7be5f525b4767d0860766f3a216a93e4",icon:"arrow-left",size:20})),s("xpl-select",{key:"7ba55fb451e26b31aba360876d8ee3b2bb423e19",class:"xpl-pagination__page-select",choices:Array.from({length:this.totalPages},((e,t)=>({label:"Page "+(t+1),value:""+(t+1),isSelected:t+1===this.currentPage}))),"custom-display-value":!0,ref:e=>{this.pageSelectRef=e}},s("div",{key:"9c8adc967a098d954477d9032f6d22a0192948e0",slot:"custom-display-value"},`${this.currentPage} of ${this.totalPages}`)),s("button",{key:"73b5bcbe7ce988c7f5f12ec4ea179bb879f39919",class:"xpl-pagination__pager-button xpl-pagination__pager-button-next",disabled:t,onClick:this.handleNextPage,"aria-label":"Next Page",tabindex:"0"},s("xpl-icon",{key:"fb95a3807dc37c419195b2c88c2d8dc39b183880",icon:"arrow-right",size:20}))))}static get watchers(){return{currentPage:[{onPageUpdate:0}],selectedRowsPerPage:[{onRowsPerPageUpdate:0}]}}},[0,"xpl-pagination",{totalPages:[2,"total-pages"],withPageControl:[4,"with-page-control"],currentPage:[1026,"current-page"],rowsPerPageOptions:[1,"rows-per-page-options"],selectedRowsPerPage:[1026,"selected-rows-per-page"]},void 0,{currentPage:[{onPageUpdate:0}],selectedRowsPerPage:[{onRowsPerPageUpdate:0}]}]),b=g,u=function(){"undefined"!=typeof customElements&&["xpl-pagination","xpl-dropdown","xpl-dropdown-group","xpl-dropdown-heading","xpl-dropdown-option","xpl-icon","xpl-select","xpl-tag"].forEach((e=>{switch(e){case"xpl-pagination":customElements.get(i(e))||customElements.define(i(e),g);break;case"xpl-dropdown":customElements.get(i(e))||n();break;case"xpl-dropdown-group":customElements.get(i(e))||l();break;case"xpl-dropdown-heading":customElements.get(i(e))||p();break;case"xpl-dropdown-option":customElements.get(i(e))||r();break;case"xpl-icon":customElements.get(i(e))||c();break;case"xpl-select":customElements.get(i(e))||d();break;case"xpl-tag":customElements.get(i(e))||h()}}))};export{b as XplPagination,u as defineCustomElement}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface XplPanel extends Components.XplPanel, HTMLElement {}
|
|
4
|
+
export const XplPanel: {
|
|
5
|
+
prototype: XplPanel;
|
|
6
|
+
new (): XplPanel;
|
|
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 e,HTMLElement as n,h as a,Host as t,transformTag as l}from"@stencil/core/internal/client";const s=e(class extends n{constructor(e){super(),!1!==e&&this.__registerHost(),this.accent="none",this.padding="default"}render(){const e="none"!==this.accent;return a(t,{key:"a247ab70a6b062022146b88d95b382f879cb8ee7",class:{"xpl-panel":!0,["xpl-panel--accent-"+this.accent]:e,["xpl-panel--padding-"+this.padding]:!0}},e&&a("div",{key:"100febab4991a83e7463198331253fe7c7425a1d",class:"xpl-panel__accent"}),a("div",{key:"c0758ab1d25675236ab15f052f45a29432021019",class:"xpl-panel__content"},a("slot",{key:"948ec6423935f7ae825f78a89b456f72a66819a8"})))}},[260,"xpl-panel",{accent:[1],padding:[1]}]),c=s,p=function(){"undefined"!=typeof customElements&&["xpl-panel"].forEach((e=>{"xpl-panel"===e&&(customElements.get(l(e))||customElements.define(l(e),s))}))};export{c as XplPanel,p as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{P as o,d as p}from"./xpl-popover2.js";const r=o,s=p;export{r as XplPopover,s as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as t,HTMLElement as e,createEvent as o,h as i,Host as d,transformTag as s}from"@stencil/core/internal/client";import{t as r}from"./index3.js";const
|
|
1
|
+
import{proxyCustomElement as t,HTMLElement as e,createEvent as o,h as i,Host as d,transformTag as s}from"@stencil/core/internal/client";import{t as r}from"./index3.js";const a=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.isOpenChange=o(this,"isOpenChange",7),this.isOpen=!1,this.disabled=!1,this.position="bottom-middle",this.display="arrow",this.isOpenState=this.isOpen,this.actualPosition=this.position,this.togglePopover=()=>{this.disabled||(this.isOpenState=!this.isOpenState)},this.handleKeyDown=t=>{"Escape"===t.key&&this.isOpenState&&(this.isOpenState=!1)},this.handleClickOutside=({target:t})=>{!this.el.contains(t)&&this.isOpenState&&(this.isOpenState=!1)}}onIsOpenPropChange(t){this.isOpenState=t}onIsOpenStateChange(t){this.updateActualPosition(t),this.isOpenChange.emit(t)}updateActualPosition(t){if(!this.triggerRef||!this.contentRef||!t)return;const e={"top-left":["top-left","bottom-left","top-right","bottom-right","top-middle","bottom-middle"],"bottom-left":["bottom-left","top-left","bottom-right","top-right","bottom-middle","top-middle"],"top-right":["top-right","bottom-right","top-left","bottom-left","top-middle","bottom-middle"],"bottom-right":["bottom-right","top-right","bottom-left","top-left","bottom-middle","top-middle"],"middle-left":["middle-left","middle-right","bottom-left","top-left","bottom-middle","top-middle"],"middle-right":["middle-right","middle-left","bottom-right","top-right","bottom-middle","top-middle"],"top-middle":["top-middle","top-start","top-end","bottom-middle","top-left","top-right"],"bottom-middle":["bottom-middle","bottom-start","bottom-end","top-middle","bottom-left","bottom-right"],"top-start":["top-start","bottom-start","top-end","bottom-end","top-middle","bottom-middle"],"top-end":["top-end","bottom-end","top-start","bottom-start","top-middle","bottom-middle"],"bottom-start":["bottom-start","top-start","bottom-end","top-end","bottom-middle","top-middle"],"bottom-end":["bottom-end","top-end","bottom-start","top-start","bottom-middle","top-middle"]}[this.position].find((t=>{const{top:e,left:o,bottom:i,right:d}=this.triggerRef.getBoundingClientRect(),{width:s,height:r}=this.contentRef.getBoundingClientRect(),{innerWidth:a,innerHeight:n}=window,p=i+r<n,l=e-r>=0,m=o-s>=0,h=d+s<a,c=(e+i)/2,b=t=>t&&c-r/2>=0&&c+r/2<=n,f=(o+d)/2,g=t=>t&&f-s/2>=0&&f+s/2<=a,u=o+s<a,w=d-s>=0;switch(t){case"top-left":return p&&m;case"middle-left":return b(m);case"bottom-left":return l&&m;case"top-right":return p&&h;case"middle-right":return b(h);case"bottom-right":return l&&h;case"top-middle":return g(l);case"bottom-middle":return g(p);case"top-start":return l&&u;case"top-end":return l&&w;case"bottom-start":return p&&u;case"bottom-end":return p&&w;default:return!1}}))||this.position;this.actualPosition=e}connectedCallback(){document.addEventListener("mousedown",this.handleClickOutside.bind(this)),document.addEventListener("keydown",this.handleKeyDown),this.updateListener=r((()=>{this.updateActualPosition(this.isOpenState)})),["resize","scroll"].forEach((t=>{window.addEventListener(t,this.updateListener,{passive:!0})}))}disconnectedCallback(){document.removeEventListener("mousedown",this.handleClickOutside),document.removeEventListener("keydown",this.handleKeyDown),["resize","scroll"].forEach((t=>{window.removeEventListener(t,this.updateListener)}))}render(){return i(d,{key:"5ed2eca6cac15c5009d0a5440f4a1f1e4dce8260"},i("div",{key:"f396004504407a1215e76187be06a27e56bd4a49",class:{"xpl-popover":!0,[`xpl-popover--${this.actualPosition}`]:!0,"xpl-popover--is-open":this.isOpenState}},i("span",{key:"23ac1ebf38617b2a9bd91a1ccfe37d212191f76c",role:"button",tabindex:"0","aria-haspopup":"dialog","aria-expanded":this.isOpenState?"true":"false",onClick:this.togglePopover,ref:t=>{this.triggerRef=t}},i("slot",{key:"ee427ff33db360b11719a886ad724a2bceb64eed",name:"trigger"})),"arrow"===this.display&&i("div",{key:"27fb57c24abdf3eecb6aae0a96f9b6256ee593a3",class:"xpl-popover__arrow"},i("svg",{key:"3456fa0239edafe272047446d3aed0ebd4490275",width:"17",height:"14",xmlns:"http://www.w3.org/2000/svg"},i("path",{key:"e5de57c7cbf5301548af4eb5f79d14acc459d0a8",d:"M0 5h15l-7.5 7.5L0 5Z",fill:"white",stroke:"none",class:"arrow-fill"}),i("path",{key:"784f569c0baf0f6fdfad6bda1a36e6ee43293dce",d:"M0 5 L7.5 12.5 L15 5",fill:"none",stroke:"black","stroke-width":"1",class:"arrow-stroke"}))),i("div",{key:"6ca95b76529ddfa681d4b11a30dceaaa4a3a10c4",class:{"xpl-popover__content":!0,[`xpl-popover__content--display-${this.display}`]:!0},ref:t=>this.contentRef=t},i("slot",{key:"75c6768b7e10ac698d54bdc30d052a6c0e98bd75"}))))}get el(){return this}static get watchers(){return{isOpen:[{onIsOpenPropChange:0}],isOpenState:[{onIsOpenStateChange:0}]}}},[260,"xpl-popover",{isOpen:[4,"is-open"],disabled:[4],position:[1],display:[1],isOpenState:[32],actualPosition:[32],updateListener:[32]},void 0,{isOpen:[{onIsOpenPropChange:0}],isOpenState:[{onIsOpenStateChange:0}]}]);function n(){"undefined"!=typeof customElements&&["xpl-popover"].forEach((t=>{"xpl-popover"===t&&(customElements.get(s(t))||customElements.define(s(t),a))}))}export{a as P,n as d}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface XplProgressBar extends Components.XplProgressBar, HTMLElement {}
|
|
4
|
+
export const XplProgressBar: {
|
|
5
|
+
prototype: XplProgressBar;
|
|
6
|
+
new (): XplProgressBar;
|
|
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 e,HTMLElement as s,h as r,Host as a,transformTag as t}from"@stencil/core/internal/client";import{d as i}from"./xpl-icon2.js";const c=e(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.max=100,this.size="lg",this.value=0,this.variant="default"}get clampedValue(){return Math.max(0,Math.min(this.max,this.value))}get isComplete(){return this.value>=this.max&&"default"===this.variant}get isError(){return"error"===this.variant}get isSuccess(){return"success"===this.variant||this.isComplete}get showStatusIcon(){return this.isSuccess||this.isError}get isIndeterminate(){return"indeterminate"===this.variant}render(){return r(a,{key:"e07eee1ea1614d68190290be2ad16df663337215",class:{"xpl-progress-bar":!0,["xpl-progress-bar--"+this.size]:!0,["xpl-progress-bar--"+this.variant]:!0,"xpl-progress-bar--complete":this.isComplete}},r("div",{key:"e46025a05d42e0c275444f1057c8ee9827ce4d15",class:"xpl-progress-bar__wrapper"},(this.label||this.showStatusIcon)&&r("div",{key:"afc59b2fb32d9ac60afda9a40544121da045b237",class:"xpl-progress-bar__header"},this.label&&r("div",{key:"39d7add736c856c43bdecb61d083cf537e4da454",class:"xpl-progress-bar__label"},this.label),this.showStatusIcon&&r("div",{key:"4e54b04a314136cdae066f7b48a8449b20a8daff",class:"xpl-progress-bar__icon"},r("xpl-icon",this.isError?{icon:"circle-xmark-1"}:{icon:"circle-check-1"}))),r("div",{key:"6950cefcd5e90be2362201ae830bae73293b275a",class:"xpl-progress-bar__row"},this.isIndeterminate?r("div",{class:"xpl-progress-bar__track xpl-progress-bar__track--indeterminate",role:"progressbar","aria-label":this.label||"Progress"},r("div",{class:"xpl-progress-bar__indeterminate"})):r("progress",{class:"xpl-progress-bar__progress",value:this.clampedValue,max:this.max,"aria-label":this.label||"Progress"})),this.helperText&&r("div",{key:"e56af1b27ff6201a1eaa5cca7160c963a0fca529",class:"xpl-progress-bar__helper"},this.helperText)))}},[0,"xpl-progress-bar",{helperText:[1,"helper-text"],label:[1],max:[2],size:[1],value:[2],variant:[1]}]),l=c,p=function(){"undefined"!=typeof customElements&&["xpl-progress-bar","xpl-icon"].forEach((e=>{switch(e){case"xpl-progress-bar":customElements.get(t(e))||customElements.define(t(e),c);break;case"xpl-icon":customElements.get(t(e))||i()}}))};export{l as XplProgressBar,p as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as s,HTMLElement as e,h as r,Host as t,transformTag as p}from"@stencil/core/internal/client";const c=s(class extends e{constructor(s){super(),!1!==s&&this.__registerHost(),this.currentStep=0}getCircleClass(s){return this.currentStep<s?"":this.currentStep===s?"xpl-progress-step-active":"xpl-progress-step-finished"}render(){return r(t,{key:"
|
|
1
|
+
import{proxyCustomElement as s,HTMLElement as e,h as r,Host as t,transformTag as p}from"@stencil/core/internal/client";const c=s(class extends e{constructor(s){super(),!1!==s&&this.__registerHost(),this.currentStep=0}getCircleClass(s){return this.currentStep<s?"":this.currentStep===s?"xpl-progress-step-active":"xpl-progress-step-finished"}render(){return r(t,{key:"13245e4ec2137ea46a325fb6d8d70c41be0307f1",class:"xpl-progress"},r("div",{key:"d88e32dd9227ee388a7a6688863ce0a44354701c",class:"xpl-progress-container"},(this.steps||[]).map(((s,e)=>r("div",{class:"xpl-progress-step "+this.getCircleClass(e)},r("div",{class:"xpl-progress-step-content"},r("div",{class:"xpl-progress-step-circle"},e+1),r("div",{class:"xpl-progress-step-text"},s)))))))}},[0,"xpl-progress",{steps:[1040],currentStep:[1026,"current-step"]}]),l=c,o=function(){"undefined"!=typeof customElements&&["xpl-progress"].forEach((s=>{"xpl-progress"===s&&(customElements.get(p(s))||customElements.define(p(s),c))}))};export{l as XplProgress,o as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{R as o,d as r}from"./xpl-radio2.js";const s=o,a=r;export{s as XplRadio,a as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as s,createEvent as i,h as
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as s,createEvent as i,h as t,Host as a,transformTag as d}from"@stencil/core/internal/client";import{v as l}from"./v4.js";const c=e(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.radioChange=i(this,"radioChange",7),this.id=l(),this.onChange=e=>{this.radioChange.emit(this.value?this.value:e.target.checked)}}render(){return t(a,{key:"c5b11522a1b9b21adf40318ff7f74f2ff76aa3c2",class:{"xpl-checkbox-radio-container":!0,styled:this.styled,disabled:this.disabled}},t("input",{key:"950a769704369e2084834876242cb44d1609a166",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:"09f34b6e4a60d2c63e94734599b46f2ce1fc9a90",class:{"xpl-label":!0,"xpl-label--disabled":this.disabled},htmlFor:this.id},t("slot",{key:"2552eb83722cdf2e4b9d1a691fe2712d16e0fb84"}),this.description&&t("small",{key:"3bc230b6c18922aee661033b1ea5a1bc72384aac",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),c))}))}export{c as R,r as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as c,h as n,Host as a,transformTag as s}from"@stencil/core/internal/client";const f=e(class extends c{constructor(e){super(),!1!==e&&this.__registerHost()}render(){return n(a,{key:"3b015722c6fb8cf3cafb0c85054fab81a8362209",class:"xpl-secondary-nav"},n("nav",{key:"ffc4e57cc2ebdf792196477ff01d6b1f03da567f","aria-label":"Secondary Nav"},n("slot",{key:"b15b8bcadf7faa41f155e11dcd9f2e11231efbc4"})))}},[260,"xpl-secondary-nav"]),t=f,o=function(){"undefined"!=typeof customElements&&["xpl-secondary-nav"].forEach((e=>{"xpl-secondary-nav"===e&&(customElements.get(s(e))||customElements.define(s(e),f))}))};export{t as XplSecondaryNav,o as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{S as s,d as o}from"./xpl-select2.js";const t=s,e=o;export{t as XplSelect,e 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 as h}from"./xpl-dropdown2.js";import{d as c}from"./xpl-dropdown-group2.js";import{d}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}from"./v4.js";function
|
|
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 as h}from"./xpl-dropdown2.js";import{d as c}from"./xpl-dropdown-group2.js";import{d}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}from"./v4.js";function m(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.mode="single",this.truncate=!0,this.active=!1,this.id=v(),this.keepFocus=!1,this.visibleChoices=1/0,this.choicesState=[],this.value=this.calculateValue(),this.dropdownOpenState=!1,this.container=null,this.dropdown=null,this.handleResizeThrottled=a((()=>{this.maybeTruncateChoices()}),250),this.handleTabKeyDown=e=>{"Tab"===e.key&&(this.keepFocus=!0)},this.handleTagRemove=e=>{const t=t=>(null==e?void 0:e.value)&&t.value===e.value||(null==e?void 0:e.label)&&t.label===e.label;this.choicesState=this.choicesState.map((e=>{var s;return Object.assign(Object.assign({},e),{isSelected:!t(e)&&e.isSelected,options:null===(s=e.options)||void 0===s?void 0:s.map((e=>Object.assign(Object.assign({},e),{isSelected:!t(e)&&e.isSelected})))})}))},this.handleDropdownScroll=e=>{const{scrollTop:t,scrollHeight:s,clientHeight:i}=this.dropdown.querySelector(".xpl-dropdown-list");(0===t&&e.deltaY<0||t+i>=s&&e.deltaY>0)&&e.preventDefault()}}onChoicesPropChanged(e){this.choicesState=this.initializeChoicesState()}onSelectedValuesPropChanged(){this.choicesState=this.initializeChoicesState()}onChoicesStateChanged(){this.update()}handleValueStateChange(e){this.selectChange.emit(e),this.changeEvent.emit("single"===this.mode?e:(null==e?void 0:e.length)?e.split("|"):[]),this.customDisplayValue&&null!==this.container&&(this.container.querySelectorAll(".custom-display-value").forEach((t=>{t.classList.toggle("display-active",e.length>0),t.classList.toggle("display-inactive",0===e.length)})),this.container.querySelectorAll(".placeholder").forEach((t=>{t.classList.toggle("placeholder-hidden",e.length>0)})))}onDropdownOpenStateChanged(e){this.dropdownStateChange.emit(e)}initializeChoicesState(){return this.choices.map((e=>{var t;const s="string"==typeof this.selectedValues?[this.selectedValues]:this.selectedValues;return Object.assign(Object.assign({},e),{isSelected:e.isSelected||(null==s?void 0:s.includes(e.value||e.label)),options:null===(t=e.options)||void 0===t?void 0:t.map((e=>Object.assign(Object.assign({},e),{isSelected:e.isSelected||(null==s?void 0:s.includes(e.value||e.label))})))})}))}maybeTruncateChoices(){var e,t;if("single"===this.mode||!this.truncate)return;const s=null===(e=this.container)||void 0===e?void 0:e.getBoundingClientRect().width;let i=0,l=0;const o=null===(t=b(this.choicesState))||void 0===t?void 0:t.filter((e=>e.isSelected));if(!o.length)return;const n=o.length;o.forEach(((e,t)=>(l+=function(e){const t=document.createElement("canvas").getContext("2d");return t.font="14px apple-system, system-ui, 'Segoe UI', Arial, Helvetica, Roboto, sans-serif",t.measureText(e).width+44}(m(o[t])),l>s-140||(i+=1),null))),i>=n&&(i=1/0),i<1&&(i=1),this.visibleChoices=i}closeDropdown(){var e;(null===(e=this.dropdown)||void 0===e?void 0:e.isOpen)&&(this.dropdown.isOpen=!1,this.active=!1)}calculateValue(){const e=b(this.choicesState).filter((e=>e.isSelected));return e.length?"single"===this.mode?e[0].value||e[0].label:e.map((e=>e.value||e.label)).join("|"):""}update(){this.value=this.calculateValue(),this.maybeTruncateChoices()}renderLabel(){return this.label||this.description?i("label",{class:{"xpl-label":!0,"xpl-label--disabled":this.disabled},htmlFor:this.id},this.label,this.description&&i("small",{class:{"xpl-description":!0,"xpl-description--disabled":this.disabled}},this.description)):null}renderSelectedTags(){let e=0;const t=b(this.choicesState).filter((e=>e.isSelected));return t.length?t.map(((s,l)=>e>=this.visibleChoices?null:(e+=1,i("xpl-tag",{onClose:()=>this.handleTagRemove(t[l])},m(t[l]))))):null}renderError(){return this.error?i("label",{class:"xpl-input-error",htmlFor:this.id},i("xpl-icon",{icon:"alert-circle"}),this.error):null}componentWillLoad(){this.choicesState=this.initializeChoicesState()}handleClickEvent(e){const t=e.target.closest(".xpl-select");null!==t&&t===this.container||this.closeDropdown()}handleKeyDown(e){var t;"Escape"===e.key&&(this.active||(null===(t=this.container)||void 0===t?void 0:t.contains(document.activeElement)))&&this.closeDropdown()}handleResize(){this.handleResizeThrottled()}componentDidLoad(){requestAnimationFrame((()=>{this.maybeTruncateChoices()}))}disconnectedCallback(){var e;null===(e=this.handleResizeThrottled)||void 0===e||e.cancel()}handleDropdownTrigger(){var e;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)),h=(null===(e=a[0])||void 0===e?void 0:e.label)||(null===(t=a[0])||void 0===t?void 0:t.value),c=a.length>1&&this.visibleChoices<1/0&&this.truncate&&!this.customDisplayValue,d=`+ ${Math.abs(this.choicesState.filter((e=>e.isSelected)).length-this.visibleChoices)} more`;return i(l,{key:"5c6008a31abe121ac946c9c5fc23721d28df86eb",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:"f2de31e5b84fe2fdffa1e2b35ec611a4842a8323",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:"8a2192b28d75c56261f7a104ad02c76d49fb8787",class:"xpl-input-wrapper"},i("button",{key:"bb881153cd7cdbf4e43c40a96dfba8d95ca94aa6",class:"xpl-select__trigger",disabled:this.disabled,id:this.id,onKeyDown:this.handleTabKeyDown,onClick:e=>{e.preventDefault(),this.handleDropdownTrigger()},type:"button"},i("div",{key:"1518f2ef57c7eeaa0fedc1832222a0345c4c46ab",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?h||this.placeholder:this.value.length>0?this.renderSelectedTags():this.placeholder)(),c&&d),i("xpl-icon",{key:"f37a879df93e5078a4b1a4950291a3bf65d81f43",class:"xpl-select__chevron-down",icon:this.selectIcon}))),!this.disabled&&i("xpl-dropdown",{key:"920d7d4e1916613b0056e6da80e055e7cf94fba6",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}),this.renderError()),i("input",{key:"0137e17e78152e2ebc600156896df9a4c691f18a",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],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))||h();break;case"xpl-dropdown-group":customElements.get(n(e))||c();break;case"xpl-dropdown-heading":customElements.get(n(e))||d();break;case"xpl-dropdown-option":customElements.get(n(e))||r();break;case"xpl-icon":customElements.get(n(e))||p();break;case"xpl-tag":customElements.get(n(e))||u()}}))}export{g as S,x as d}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface XplSideNavItem extends Components.XplSideNavItem, HTMLElement {}
|
|
4
|
+
export const XplSideNavItem: {
|
|
5
|
+
prototype: XplSideNavItem;
|
|
6
|
+
new (): XplSideNavItem;
|
|
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 i,HTMLElement as s,createEvent as e,h as t,Host as n,transformTag as l}from"@stencil/core/internal/client";import{d as a}from"./xpl-icon2.js";const h=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:"10e32dc7b6e7e942ab11153a7311ee2401370a08",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:"32d07c601edd88297854bf88749411276e8cb51b",class:"xpl-side-nav-item__children "+(this.expanded?"expanded":""),inert:!this.expanded||void 0},t("div",{key:"bbaac77c9c89e7b494cf7693185f0c358f6a7136",class:"xpl-side-nav-item__children-inner"},t("slot",{key:"811067dca2ee2a73d896d1b45b899b9a8b27e7d6"}))))}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}]}]),d=h,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),h);break;case"xpl-icon":customElements.get(l(i))||a()}}))};export{d as XplSideNavItem,c as defineCustomElement}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface XplSideNav extends Components.XplSideNav, HTMLElement {}
|
|
4
|
+
export const XplSideNav: {
|
|
5
|
+
prototype: XplSideNav;
|
|
6
|
+
new (): XplSideNav;
|
|
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 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:"4c498e4a5ab9c93d2ba984fd973af77c871cb916",class:{"xpl-side-nav":!0}},c("div",{key:"ef7455c11a5dd27c7a8317f4b441fc3d29eea341",class:"xpl-side-nav__wrapper"},c("nav",{key:"11752dfaacd360fd1c6e20f253967236f1032d68",class:"xpl-side-nav__content","aria-label":this.label},c("div",{key:"1a94c00b7cc8297707a11aca19a816769e98dbfc",class:"xpl-side-nav__section"},c("slot",{key:"a3aaa6c108806c68bcb8af692ad6fd0edcae7870",name:"section"})),c("div",{key:"b6454f9ba4f795666b33c7eea70f3514cdf168b3",class:"xpl-side-nav__footer"},c("slot",{key:"f00b452ff6c732d95fa58962800d2d1f606c4c17",name:"nav-footer"})))))}},[260,"xpl-side-nav",{label:[1]}]),t=n,f=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,f 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:"86862cc926d5e915e303d274f0e837f364be6c08",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}
|