genesys-spark-components 4.0.0-beta.4 → 4.0.0-beta.5
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/dist/cjs/gux-accordion.cjs.entry.js +1 -1
- package/dist/cjs/gux-action-button.cjs.entry.js +1 -1
- package/dist/cjs/gux-action-toast-legacy.cjs.entry.js +1 -1
- package/dist/cjs/gux-advanced-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/gux-announce-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-badge-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-blank-state-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-breadcrumbs.cjs.entry.js +1 -1
- package/dist/cjs/gux-button-multi.cjs.entry.js +1 -1
- package/dist/cjs/gux-button-slot-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-button.cjs.entry.js +1 -1
- package/dist/cjs/gux-calendar.cjs.entry.js +1 -1
- package/dist/cjs/gux-card.cjs.entry.js +1 -1
- package/dist/cjs/gux-column-manager-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-content-search.cjs.entry.js +1 -1
- package/dist/cjs/gux-context-menu-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-copy-to-clipboard.cjs.entry.js +1 -1
- package/dist/cjs/gux-date-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-date-time-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-datepicker.cjs.entry.js +1 -1
- package/dist/cjs/gux-disclosure-button.cjs.entry.js +1 -1
- package/dist/cjs/gux-dismiss-button.cjs.entry.js +1 -1
- package/dist/cjs/gux-dropdown-multi-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-dropdown_3.cjs.entry.js +1 -1
- package/dist/cjs/gux-error-message-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-flyout-menu-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-form-field-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/gux-form-field-color.cjs.entry.js +1 -1
- package/dist/cjs/gux-form-field-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/gux-form-field-input-clear-button.cjs.entry.js +1 -1
- package/dist/cjs/gux-form-field-number_3.cjs.entry.js +1 -1
- package/dist/cjs/gux-form-field-phone.cjs.entry.js +1 -1
- package/dist/cjs/gux-form-field-radio.cjs.entry.js +1 -1
- package/dist/cjs/gux-form-field-range.cjs.entry.js +1 -1
- package/dist/cjs/gux-form-field-search.cjs.entry.js +1 -1
- package/dist/cjs/gux-form-field-select.cjs.entry.js +1 -1
- package/dist/cjs/gux-form-field-text-like.cjs.entry.js +1 -1
- package/dist/cjs/gux-form-field-textarea.cjs.entry.js +1 -1
- package/dist/cjs/gux-form-field-time-picker.cjs.entry.js +1 -1
- package/dist/cjs/gux-icon.cjs.entry.js +1 -1
- package/dist/cjs/gux-inline-alert.cjs.entry.js +1 -1
- package/dist/cjs/gux-list.cjs.entry.js +1 -1
- package/dist/cjs/gux-listbox-multi.cjs.entry.js +1 -1
- package/dist/cjs/gux-loading-message-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-modal.cjs.entry.js +1 -1
- package/dist/cjs/gux-month-picker-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-notification-toast-legacy.cjs.entry.js +1 -1
- package/dist/cjs/gux-page-loading-spinner.cjs.entry.js +1 -1
- package/dist/cjs/gux-pagination-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-pagination-cursor.cjs.entry.js +4 -4
- package/dist/cjs/gux-pagination.cjs.entry.js +1 -1
- package/dist/cjs/gux-phone-input-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-popover-list-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-popover-list.cjs.entry.js +1 -1
- package/dist/cjs/gux-popover.cjs.entry.js +1 -1
- package/dist/cjs/gux-radial-loading.cjs.entry.js +1 -1
- package/dist/cjs/gux-radial-progress.cjs.entry.js +1 -1
- package/dist/cjs/gux-rating.cjs.entry.js +1 -1
- package/dist/cjs/gux-region-icon.cjs.entry.js +1 -1
- package/dist/cjs/gux-screen-reader-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-simple-toast-legacy.cjs.entry.js +1 -1
- package/dist/cjs/gux-skip-navigation-list-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-sort-control.cjs.entry.js +1 -1
- package/dist/cjs/gux-switch.cjs.entry.js +1 -1
- package/dist/cjs/gux-table-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-table-toolbar-action.cjs.entry.js +1 -1
- package/dist/cjs/gux-table-toolbar-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-table-toolbar-custom-action.cjs.entry.js +1 -1
- package/dist/cjs/gux-table-toolbar-menu-button.cjs.entry.js +1 -1
- package/dist/cjs/gux-tabs-advanced.cjs.entry.js +1 -1
- package/dist/cjs/gux-tabs.cjs.entry.js +1 -1
- package/dist/cjs/gux-tag-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-text-highlight.cjs.entry.js +1 -1
- package/dist/cjs/gux-time-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-time-picker-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-toast.cjs.entry.js +1 -1
- package/dist/cjs/gux-toggle.cjs.entry.js +1 -1
- package/dist/cjs/gux-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/{usage-010f0789.js → usage-2c2d30d0.js} +1 -1
- package/dist/collection/components/stable/gux-pagination-cursor/gux-pagination-cursor.css +14 -28
- package/dist/collection/components/stable/gux-pagination-cursor/gux-pagination-cursor.js +3 -3
- package/dist/deploy-info.json +3 -3
- package/dist/esm/gux-accordion.entry.js +1 -1
- package/dist/esm/gux-action-button.entry.js +1 -1
- package/dist/esm/gux-action-toast-legacy.entry.js +1 -1
- package/dist/esm/gux-advanced-dropdown.entry.js +1 -1
- package/dist/esm/gux-announce-beta.entry.js +1 -1
- package/dist/esm/gux-badge-beta.entry.js +1 -1
- package/dist/esm/gux-blank-state-beta.entry.js +1 -1
- package/dist/esm/gux-breadcrumbs.entry.js +1 -1
- package/dist/esm/gux-button-multi.entry.js +1 -1
- package/dist/esm/gux-button-slot-beta.entry.js +1 -1
- package/dist/esm/gux-button.entry.js +1 -1
- package/dist/esm/gux-calendar.entry.js +1 -1
- package/dist/esm/gux-card.entry.js +1 -1
- package/dist/esm/gux-column-manager-beta.entry.js +1 -1
- package/dist/esm/gux-content-search.entry.js +1 -1
- package/dist/esm/gux-context-menu-beta.entry.js +1 -1
- package/dist/esm/gux-copy-to-clipboard.entry.js +1 -1
- package/dist/esm/gux-date-beta.entry.js +1 -1
- package/dist/esm/gux-date-time-beta.entry.js +1 -1
- package/dist/esm/gux-datepicker.entry.js +1 -1
- package/dist/esm/gux-disclosure-button.entry.js +1 -1
- package/dist/esm/gux-dismiss-button.entry.js +1 -1
- package/dist/esm/gux-dropdown-multi-beta.entry.js +1 -1
- package/dist/esm/gux-dropdown_3.entry.js +1 -1
- package/dist/esm/gux-error-message-beta.entry.js +1 -1
- package/dist/esm/gux-flyout-menu-beta.entry.js +1 -1
- package/dist/esm/gux-form-field-checkbox.entry.js +1 -1
- package/dist/esm/gux-form-field-color.entry.js +1 -1
- package/dist/esm/gux-form-field-dropdown.entry.js +1 -1
- package/dist/esm/gux-form-field-input-clear-button.entry.js +1 -1
- package/dist/esm/gux-form-field-number_3.entry.js +1 -1
- package/dist/esm/gux-form-field-phone.entry.js +1 -1
- package/dist/esm/gux-form-field-radio.entry.js +1 -1
- package/dist/esm/gux-form-field-range.entry.js +1 -1
- package/dist/esm/gux-form-field-search.entry.js +1 -1
- package/dist/esm/gux-form-field-select.entry.js +1 -1
- package/dist/esm/gux-form-field-text-like.entry.js +1 -1
- package/dist/esm/gux-form-field-textarea.entry.js +1 -1
- package/dist/esm/gux-form-field-time-picker.entry.js +1 -1
- package/dist/esm/gux-icon.entry.js +1 -1
- package/dist/esm/gux-inline-alert.entry.js +1 -1
- package/dist/esm/gux-list.entry.js +1 -1
- package/dist/esm/gux-listbox-multi.entry.js +1 -1
- package/dist/esm/gux-loading-message-beta.entry.js +1 -1
- package/dist/esm/gux-modal.entry.js +1 -1
- package/dist/esm/gux-month-picker-beta.entry.js +1 -1
- package/dist/esm/gux-notification-toast-legacy.entry.js +1 -1
- package/dist/esm/gux-page-loading-spinner.entry.js +1 -1
- package/dist/esm/gux-pagination-beta.entry.js +1 -1
- package/dist/esm/gux-pagination-cursor.entry.js +4 -4
- package/dist/esm/gux-pagination.entry.js +1 -1
- package/dist/esm/gux-phone-input-beta.entry.js +1 -1
- package/dist/esm/gux-popover-list-beta.entry.js +1 -1
- package/dist/esm/gux-popover-list.entry.js +1 -1
- package/dist/esm/gux-popover.entry.js +1 -1
- package/dist/esm/gux-radial-loading.entry.js +1 -1
- package/dist/esm/gux-radial-progress.entry.js +1 -1
- package/dist/esm/gux-rating.entry.js +1 -1
- package/dist/esm/gux-region-icon.entry.js +1 -1
- package/dist/esm/gux-screen-reader-beta.entry.js +1 -1
- package/dist/esm/gux-simple-toast-legacy.entry.js +1 -1
- package/dist/esm/gux-skip-navigation-list-beta.entry.js +1 -1
- package/dist/esm/gux-sort-control.entry.js +1 -1
- package/dist/esm/gux-switch.entry.js +1 -1
- package/dist/esm/gux-table-beta.entry.js +1 -1
- package/dist/esm/gux-table-toolbar-action.entry.js +1 -1
- package/dist/esm/gux-table-toolbar-beta.entry.js +1 -1
- package/dist/esm/gux-table-toolbar-custom-action.entry.js +1 -1
- package/dist/esm/gux-table-toolbar-menu-button.entry.js +1 -1
- package/dist/esm/gux-tabs-advanced.entry.js +1 -1
- package/dist/esm/gux-tabs.entry.js +1 -1
- package/dist/esm/gux-tag-beta.entry.js +1 -1
- package/dist/esm/gux-text-highlight.entry.js +1 -1
- package/dist/esm/gux-time-beta.entry.js +1 -1
- package/dist/esm/gux-time-picker-beta.entry.js +1 -1
- package/dist/esm/gux-toast.entry.js +1 -1
- package/dist/esm/gux-toggle.entry.js +1 -1
- package/dist/esm/gux-tooltip.entry.js +1 -1
- package/dist/esm/{usage-bfef43d7.js → usage-6a065244.js} +1 -1
- package/dist/genesys-webcomponents/genesys-webcomponents.css +30 -1
- package/dist/genesys-webcomponents/genesys-webcomponents.esm.js +1 -1
- package/dist/genesys-webcomponents/{p-5dd86c3c.entry.js → p-02834f4b.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-dc7eda15.entry.js → p-065dfcb5.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-bca404bf.entry.js → p-07ba6582.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-c084e729.entry.js → p-09260b54.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-e76b9627.entry.js → p-0f4dc346.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-b770a4aa.entry.js → p-14301475.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-b50e70f8.entry.js → p-1a990281.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-de89fcb4.entry.js → p-1dd2e1d2.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-61f7c550.entry.js → p-1f3c3a89.entry.js} +1 -1
- package/dist/genesys-webcomponents/p-21266439.entry.js +1 -0
- package/dist/genesys-webcomponents/{p-b1796b4f.entry.js → p-233c0566.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-6113321c.entry.js → p-24c8a3da.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-b429507e.entry.js → p-261dfba4.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-0af7012f.entry.js → p-284415fa.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-9915c303.entry.js → p-2e27167a.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-ba435972.entry.js → p-2f704deb.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-12a08666.entry.js → p-398e3760.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-66fa67d7.entry.js → p-3bbd394d.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-58abf9d5.entry.js → p-3befa564.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-46e95b90.entry.js → p-3efcf41d.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-cbc80950.entry.js → p-3f6a0e19.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-501aaa00.entry.js → p-3fb11797.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-9a2c31be.entry.js → p-43a195b0.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-c6efca99.entry.js → p-46578cdc.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-912825cb.entry.js → p-52270d18.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-db8cc8a8.entry.js → p-5265f3e0.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-655e3ad1.entry.js → p-52f443d6.entry.js} +1 -1
- package/dist/genesys-webcomponents/p-54effc6d.entry.js +1 -0
- package/dist/genesys-webcomponents/{p-42e02d0a.entry.js → p-59146356.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-54a25ce5.entry.js → p-5bae9e84.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-d355783f.entry.js → p-5d67b3ab.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-8c2fcb56.entry.js → p-62a9f3bc.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-a6adfa74.entry.js → p-62d3fbbd.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-2258507a.entry.js → p-634c85ec.entry.js} +1 -1
- package/dist/genesys-webcomponents/p-68dc65c4.entry.js +1 -0
- package/dist/genesys-webcomponents/{p-d5b56dfb.entry.js → p-6b6048c4.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-0cd541ba.entry.js → p-6df07350.entry.js} +1 -1
- package/dist/genesys-webcomponents/p-6fbe35ec.entry.js +1 -0
- package/dist/genesys-webcomponents/{p-5c647142.entry.js → p-724178a7.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-59b5043e.entry.js → p-7946aac5.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-f7a9b28d.entry.js → p-7d6cf29d.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-a5d41844.entry.js → p-7e9f97c7.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-a9682b86.entry.js → p-7ec73c98.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-b2ceff59.entry.js → p-854eaa48.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-76a8e7bc.entry.js → p-85678958.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-b80935a0.entry.js → p-864044af.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-7ffacfab.entry.js → p-8797ebd7.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-cf7f97a3.entry.js → p-8901b0d7.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-3d82a3d3.entry.js → p-8afa9533.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-37ab2f4f.entry.js → p-8b5e20b8.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-bb854fd8.entry.js → p-941df4de.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-0afc1d48.entry.js → p-9756b007.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-c440922f.entry.js → p-9839e3a1.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-d14cb303.entry.js → p-995a0981.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-2f506871.entry.js → p-995fd359.entry.js} +1 -1
- package/dist/genesys-webcomponents/p-99b0b8e3.entry.js +1 -0
- package/dist/genesys-webcomponents/{p-5a1d0394.entry.js → p-9b497375.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-85da3eea.entry.js → p-a9a8d206.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-bb0ab283.entry.js → p-aaf5194a.entry.js} +1 -1
- package/dist/genesys-webcomponents/p-ad19fdb4.entry.js +1 -0
- package/dist/genesys-webcomponents/{p-95397548.entry.js → p-ada83f90.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-f58c35ec.entry.js → p-ae031b68.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-aeb9bd95.entry.js → p-bba252b0.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-ca8a7753.entry.js → p-c091c4d6.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-4ec8d6c9.entry.js → p-c5c92fd8.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-11abc0f2.entry.js → p-cc9cfe49.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-e32a07e1.entry.js → p-d09a04e9.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-6e07c9dd.entry.js → p-daba61db.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-4fc061fa.entry.js → p-db3fd2f0.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-061ecf7b.entry.js → p-de1e0b57.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-f24b87f9.entry.js → p-defd1281.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-af4a6b41.js → p-e1558f84.js} +1 -1
- package/dist/genesys-webcomponents/{p-ff3ad932.entry.js → p-e2547280.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-22747d02.entry.js → p-e7468691.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-8564b5cf.entry.js → p-e874ef2c.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-ea0f2939.entry.js → p-eb2eaa6f.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-bc08fdea.entry.js → p-f49c69b9.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-53c7ff9e.entry.js → p-f4cacd3c.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-958f8403.entry.js → p-fbb3071b.entry.js} +1 -1
- package/dist/stencil-wrapper.js +1 -1
- package/dist/types/stencil-wrapper.d.ts +1 -1
- package/package.json +1 -1
- package/dist/genesys-webcomponents/p-06e95994.entry.js +0 -1
- package/dist/genesys-webcomponents/p-24f2a8e7.entry.js +0 -1
- package/dist/genesys-webcomponents/p-26b9c41b.entry.js +0 -1
- package/dist/genesys-webcomponents/p-4db87725.entry.js +0 -1
- package/dist/genesys-webcomponents/p-690a9a5a.entry.js +0 -1
- package/dist/genesys-webcomponents/p-f544ad28.entry.js +0 -1
@@ -1 +1 @@
|
|
1
|
-
import{r as t,c as s,f as e,d as i,h,H as o,g as l}from"./p-7d26b2e1.js";import{b as a}from"./p-deee079e.js";import{w as r}from"./p-76ff3e75.js";import{r as n}from"./p-cbcbd1bb.js";import{t as c}from"./p-af4a6b41.js";import{t as b}from"./p-e310debb.js";import"./p-8a133b9b.js";const u=class{constructor(i){t(this,i),this.guxselectionchanged=s(this,"guxselectionchanged",7),this.guxsortchanged=s(this,"guxsortchanged",7),this.slotObserver=new MutationObserver((()=>e(this))),this.tableId=n("gux-table"),this.columnsWidths={},this.tableWidth=this.getElementComputedWidth(this.slottedTable),this.isVerticalScroll=!1,this.isHorizontalScroll=!1,this.isScrolledToFirstCell=!0,this.isScrolledToLastCell=!1,this.columnResizeHover=!1,this.compact=!1,this.objectTable=!1,this.emptyMessage=void 0,this.resizableColumns=void 0}async componentWillLoad(){c(this.root),this.i18n=await a(this.root,b)}componentDidLoad(){this.resizableColumns&&this.prepareResizableColumns(),this.prepareSelectableRows(),this.checkHorizontalScroll(),this.checkVerticalScroll(),!this.resizeObserver&&window.ResizeObserver&&(this.resizeObserver=new ResizeObserver((()=>{i((()=>{this.checkHorizontalScroll(),this.checkVerticalScroll(),this.updateScrollState(),this.scaleColumnWidths()}))}))),this.resizeObserver&&(this.resizeObserver.observe(this.tableContainer),this.resizeObserver.observe(this.slottedTable)),this.slotObserver.observe(this.slottedTable,{subtree:!0,childList:!0})}disconnectedCallback(){this.resizeObserver&&(this.resizeObserver.unobserve(this.tableContainer),this.resizeObserver.unobserve(this.slottedTable)),this.resizableColumns&&document.getElementById(`${this.tableId}-resizable-styles`).remove()}onScroll(){this.updateScrollState()}onInternalAllRowSelectChange(t){t.stopPropagation(),this.handleSelectAllRows()}onInternalRowSelectChange(t){t.stopPropagation(),this.handleRowSelection(t.target)}onMouseMove(t){this.resizableColumns&&this.updateResizeState(t)}onMouseDown(t){this.resizableColumns&&this.maybeStartResizing(t)}onMouseUp(){this.resizableColumns&&this.stopResizing()}get tableContainer(){return this.root.shadowRoot.querySelector(".gux-table-container")}get slottedTable(){return this.root.querySelector('table[slot="data"]')}get tableRows(){return Array.from(this.slottedTable.querySelectorAll("tbody tr"))}get tableColumns(){return Array.from(this.slottedTable.querySelectorAll("thead th"))}get rowCheckboxes(){return Array.from(this.slottedTable.querySelectorAll("tbody tr td gux-row-select"))}get selectAllCheckbox(){return this.slottedTable.querySelector("thead tr th gux-all-row-select")}async getSelected(){return this.getSelectedInternal()}getSelectedInternal(){return{selectedRowIds:Array.from(this.rowCheckboxes).filter((t=>t.selected)).map((t=>t.closest("tr").getAttribute("data-row-id")))}}prepareSelectableRows(){this.rowCheckboxes.forEach((t=>{this.updateRowSelection(t)})),this.updateSelectAllBoxState()}updateSelectAllBoxState(){const t=this.selectAllCheckbox;if(t){const s=this.rowCheckboxes,e=s.filter((t=>0==t.hasAttribute("disabled"))),i=e.filter((t=>t.selected)),h=Boolean(s.length),o=i.length===e.length,l=0===i.length;t.selected=h&&o,t.setIndeterminate(h&&!o&&!l)}}handleSelectAllRows(){const t=this.selectAllCheckbox;this.rowCheckboxes.forEach((s=>{s.hasAttribute("disabled")||(s.selected=t.selected,this.updateRowSelection(s))})),this.emitSelectionEvent()}handleRowSelection(t){this.updateRowSelection(t),this.updateSelectAllBoxState(),this.emitSelectionEvent()}emitSelectionEvent(){this.guxselectionchanged.emit(this.getSelectedInternal())}updateRowSelection(t){const s=t.closest("tr");t.selected?s.setAttribute("data-selected-row",""):s.removeAttribute("data-selected-row")}nextColumn(){const t=this.tableColumns,s=this.tableContainer.getBoundingClientRect();let e=(t.find((t=>t.getBoundingClientRect().right>s.right))||t[t.length-1]).getBoundingClientRect().right-s.right;e>s.width&&(e=.9*s.width),this.tableContainer.scrollLeft+=Math.ceil(e),this.updateScrollState()}previousColumn(){const t=this.tableColumns,s=this.tableContainer.getBoundingClientRect(),e=(t.reverse().find((t=>t.getBoundingClientRect().left<s.left))||t[0]).getBoundingClientRect();let i=s.left-e.left;i>s.width&&(i=.9*s.width),this.tableContainer.scrollLeft+=-Math.ceil(i),this.updateScrollState()}updateScrollState(){const t=this.tableContainer.scrollLeft,s=this.tableContainer.scrollWidth-this.tableContainer.clientWidth;this.isScrolledToFirstCell=0===t,this.isScrolledToLastCell=s-t-this.tableScrollbarConstant<=0}checkHorizontalScroll(){const t=this.slottedTable.getBoundingClientRect().width,s=this.root.getBoundingClientRect().width;this.isHorizontalScroll=t>s}checkVerticalScroll(){const t=this.tableContainer;this.isVerticalScroll=t.scrollHeight>t.clientHeight}get tableScrollbarConstant(){const t=this.tableContainer;return t?t.offsetWidth-t.clientWidth:0}prepareResizableColumns(){const t=document.createElement("style");t.id=`${this.tableId}-resizable-styles`,document.querySelector("head").appendChild(t);const s=this.calculateColumnWidths(this.tableColumns);this.tableWidth=this.getElementComputedWidth(this.slottedTable),s.slice(0,-1).forEach((t=>this.columnsWidths[t.name]=t.width)),this.setResizableColumnsStyles()}scaleColumnWidths(){if(!this.columnResizeState&&this.resizableColumns&&!this.isHorizontalScroll){const t=this.calculateColumnWidths(this.tableColumns),s=this.tableWidth,e=this.getElementComputedWidth(this.slottedTable);t.map((t=>Object.assign(Object.assign({},t),{width:this.calcScaledColWidth(t.width,s,e)}))).slice(0,-1).forEach((t=>this.columnsWidths[t.name]=t.width)),this.tableWidth=e,this.setResizableColumnsStyles()}}calcScaledColWidth(t,s,e){const i=Math.round(t/s*e);return Math.max(i,1)}updateResizeState(t){if(this.columnResizeState){const s=this.columnResizeState.resizableColumn.dataset.columnName,e=Math.max(this.columnResizeState.resizableColumnInitialWidth+(t.pageX-this.columnResizeState.columnResizeMouseStartX),1),i=this.calculateColumnWidths(this.tableColumns).map((t=>t.name===s?Object.assign(Object.assign({},t),{width:e}):t));this.columnsWidths[s]=i.find((t=>t.name===s)).width,this.setResizableColumnsStyles(),this.tableWidth=this.getElementComputedWidth(this.slottedTable)}else this.columnResizeHover=!1,r("th",t,(s=>{this.tableColumns.length-1!==s.cellIndex&&this.isInResizeZone(t,s)&&(this.columnResizeHover=!0)}))}maybeStartResizing(t){r("th",t,(s=>{this.isInResizeZone(t,s)&&(this.columnResizeState={resizableColumn:s,columnResizeMouseStartX:t.pageX,resizableColumnInitialWidth:this.getElementComputedWidth(s)})}))}stopResizing(){this.columnResizeState&&(this.columnResizeState=null)}isInResizeZone(t,s){return s.getBoundingClientRect().right-t.clientX<3}getElementComputedWidth(t){return t.clientWidth-parseInt(window.getComputedStyle(t).paddingLeft)-parseInt(window.getComputedStyle(t).paddingRight)}calculateColumnWidths(t){return t.map((t=>({name:t.dataset.columnName,width:this.getElementComputedWidth(t)})))}setResizableColumnsStyles(){const t=document.getElementById(`${this.tableId}-resizable-styles`);let s="";Object.keys(this.columnsWidths).forEach((t=>{s+=`[gs-table-id=${this.tableId}] th[data-column-name="${t}"]{\n width:${String(this.columnsWidths[t])}px;\n min-width:${String(this.columnsWidths[t])}px;\n }`})),t.innerHTML=s}get isTableEmpty(){return!this.root.children[0]||this.tableRows.length<1}get tableContainerClasses(){return{"gux-table-container":!0,"gux-column-resizing":Boolean(this.columnResizeState),"gux-column-resizing-hover":this.columnResizeHover}}render(){return h(o,{"gs-table-id":this.tableId,"gs-v-scroll":this.isVerticalScroll,"gs-h-scroll":this.isHorizontalScroll,"gs-obj-table":this.objectTable,"gs-compact":this.compact},h("div",{class:"gux-table"},h("div",{tabindex:this.isVerticalScroll?"0":"-1",id:this.tableId,class:this.tableContainerClasses},h("slot",{name:"data"})),this.isHorizontalScroll&&h("gux-button-slot-beta",{accent:"secondary"},h("button",{class:"gux-table-scroll-left",disabled:this.isScrolledToFirstCell,onClick:!this.isScrolledToFirstCell&&this.previousColumn.bind(this)},h("gux-icon",{"icon-name":"chevron-left","screenreader-text":this.i18n("scrollLeft")}))),this.isHorizontalScroll&&h("gux-button-slot-beta",{accent:"secondary",style:{marginRight:`${this.tableScrollbarConstant}px`}},h("button",{class:"gux-table-scroll-right",disabled:this.isScrolledToLastCell,style:{marginRight:`${this.tableScrollbarConstant}px`},onClick:!this.isScrolledToLastCell&&this.nextColumn.bind(this)},h("gux-icon",{"icon-name":"chevron-right","screenreader-text":this.i18n("scrollRight")}))),this.isTableEmpty&&h("div",{class:"gux-empty-table"},this.emptyMessage||this.i18n("emptyMessage"))))}get root(){return l(this)}};u.style=":host{display:block;isolation:isolate}:host .gux-table{position:relative;height:inherit}:host .gux-table .gux-table-scroll-left,:host .gux-table .gux-table-scroll-right{position:absolute;top:0;z-index:1;display:flex;align-items:center;justify-content:center;width:24px;min-width:0;height:40px;padding:0;color:#2e394c;cursor:pointer;border-radius:4px}:host .gux-table .gux-table-scroll-left gux-icon,:host .gux-table .gux-table-scroll-right gux-icon{width:8px;height:8px}:host .gux-table .gux-table-scroll-left{border-top-left-radius:0;border-bottom-left-radius:0}:host .gux-table .gux-table-scroll-right{right:0;border-top-right-radius:0;border-bottom-right-radius:0}:host .gux-table .gux-table-container{width:100%;max-height:100%;overflow-x:hidden;scrollbar-color:rgba(32, 41, 55, 0.24) #fdfdfd;scrollbar-width:thin}:host .gux-table .gux-table-container::-webkit-scrollbar{width:4px}:host .gux-table .gux-table-container::-webkit-scrollbar-track{background:#fdfdfd}:host .gux-table .gux-table-container::-webkit-scrollbar-thumb{background:rgba(32, 41, 55, 0.24)}:host .gux-table .gux-table-container::-webkit-scrollbar-thumb:hover{background:rgba(32, 41, 55, 0.48)}:host .gux-table .gux-table-container.gux-column-resizing-hover,:host .gux-table .gux-table-container.gux-column-resizing{cursor:col-resize}:host .gux-empty-table{display:flex;align-items:center;justify-content:center;height:150px;color:#596373;background:#fdfdfd;font-family:Roboto, sans-serif;font-weight:400;font-weight:300;font-size:18px;line-height:24px}";export{u as gux_table_beta}
|
1
|
+
import{r as t,c as s,f as e,d as i,h,H as o,g as l}from"./p-7d26b2e1.js";import{b as a}from"./p-deee079e.js";import{w as r}from"./p-76ff3e75.js";import{r as n}from"./p-cbcbd1bb.js";import{t as c}from"./p-e1558f84.js";import{t as b}from"./p-e310debb.js";import"./p-8a133b9b.js";const u=class{constructor(i){t(this,i),this.guxselectionchanged=s(this,"guxselectionchanged",7),this.guxsortchanged=s(this,"guxsortchanged",7),this.slotObserver=new MutationObserver((()=>e(this))),this.tableId=n("gux-table"),this.columnsWidths={},this.tableWidth=this.getElementComputedWidth(this.slottedTable),this.isVerticalScroll=!1,this.isHorizontalScroll=!1,this.isScrolledToFirstCell=!0,this.isScrolledToLastCell=!1,this.columnResizeHover=!1,this.compact=!1,this.objectTable=!1,this.emptyMessage=void 0,this.resizableColumns=void 0}async componentWillLoad(){c(this.root),this.i18n=await a(this.root,b)}componentDidLoad(){this.resizableColumns&&this.prepareResizableColumns(),this.prepareSelectableRows(),this.checkHorizontalScroll(),this.checkVerticalScroll(),!this.resizeObserver&&window.ResizeObserver&&(this.resizeObserver=new ResizeObserver((()=>{i((()=>{this.checkHorizontalScroll(),this.checkVerticalScroll(),this.updateScrollState(),this.scaleColumnWidths()}))}))),this.resizeObserver&&(this.resizeObserver.observe(this.tableContainer),this.resizeObserver.observe(this.slottedTable)),this.slotObserver.observe(this.slottedTable,{subtree:!0,childList:!0})}disconnectedCallback(){this.resizeObserver&&(this.resizeObserver.unobserve(this.tableContainer),this.resizeObserver.unobserve(this.slottedTable)),this.resizableColumns&&document.getElementById(`${this.tableId}-resizable-styles`).remove()}onScroll(){this.updateScrollState()}onInternalAllRowSelectChange(t){t.stopPropagation(),this.handleSelectAllRows()}onInternalRowSelectChange(t){t.stopPropagation(),this.handleRowSelection(t.target)}onMouseMove(t){this.resizableColumns&&this.updateResizeState(t)}onMouseDown(t){this.resizableColumns&&this.maybeStartResizing(t)}onMouseUp(){this.resizableColumns&&this.stopResizing()}get tableContainer(){return this.root.shadowRoot.querySelector(".gux-table-container")}get slottedTable(){return this.root.querySelector('table[slot="data"]')}get tableRows(){return Array.from(this.slottedTable.querySelectorAll("tbody tr"))}get tableColumns(){return Array.from(this.slottedTable.querySelectorAll("thead th"))}get rowCheckboxes(){return Array.from(this.slottedTable.querySelectorAll("tbody tr td gux-row-select"))}get selectAllCheckbox(){return this.slottedTable.querySelector("thead tr th gux-all-row-select")}async getSelected(){return this.getSelectedInternal()}getSelectedInternal(){return{selectedRowIds:Array.from(this.rowCheckboxes).filter((t=>t.selected)).map((t=>t.closest("tr").getAttribute("data-row-id")))}}prepareSelectableRows(){this.rowCheckboxes.forEach((t=>{this.updateRowSelection(t)})),this.updateSelectAllBoxState()}updateSelectAllBoxState(){const t=this.selectAllCheckbox;if(t){const s=this.rowCheckboxes,e=s.filter((t=>0==t.hasAttribute("disabled"))),i=e.filter((t=>t.selected)),h=Boolean(s.length),o=i.length===e.length,l=0===i.length;t.selected=h&&o,t.setIndeterminate(h&&!o&&!l)}}handleSelectAllRows(){const t=this.selectAllCheckbox;this.rowCheckboxes.forEach((s=>{s.hasAttribute("disabled")||(s.selected=t.selected,this.updateRowSelection(s))})),this.emitSelectionEvent()}handleRowSelection(t){this.updateRowSelection(t),this.updateSelectAllBoxState(),this.emitSelectionEvent()}emitSelectionEvent(){this.guxselectionchanged.emit(this.getSelectedInternal())}updateRowSelection(t){const s=t.closest("tr");t.selected?s.setAttribute("data-selected-row",""):s.removeAttribute("data-selected-row")}nextColumn(){const t=this.tableColumns,s=this.tableContainer.getBoundingClientRect();let e=(t.find((t=>t.getBoundingClientRect().right>s.right))||t[t.length-1]).getBoundingClientRect().right-s.right;e>s.width&&(e=.9*s.width),this.tableContainer.scrollLeft+=Math.ceil(e),this.updateScrollState()}previousColumn(){const t=this.tableColumns,s=this.tableContainer.getBoundingClientRect(),e=(t.reverse().find((t=>t.getBoundingClientRect().left<s.left))||t[0]).getBoundingClientRect();let i=s.left-e.left;i>s.width&&(i=.9*s.width),this.tableContainer.scrollLeft+=-Math.ceil(i),this.updateScrollState()}updateScrollState(){const t=this.tableContainer.scrollLeft,s=this.tableContainer.scrollWidth-this.tableContainer.clientWidth;this.isScrolledToFirstCell=0===t,this.isScrolledToLastCell=s-t-this.tableScrollbarConstant<=0}checkHorizontalScroll(){const t=this.slottedTable.getBoundingClientRect().width,s=this.root.getBoundingClientRect().width;this.isHorizontalScroll=t>s}checkVerticalScroll(){const t=this.tableContainer;this.isVerticalScroll=t.scrollHeight>t.clientHeight}get tableScrollbarConstant(){const t=this.tableContainer;return t?t.offsetWidth-t.clientWidth:0}prepareResizableColumns(){const t=document.createElement("style");t.id=`${this.tableId}-resizable-styles`,document.querySelector("head").appendChild(t);const s=this.calculateColumnWidths(this.tableColumns);this.tableWidth=this.getElementComputedWidth(this.slottedTable),s.slice(0,-1).forEach((t=>this.columnsWidths[t.name]=t.width)),this.setResizableColumnsStyles()}scaleColumnWidths(){if(!this.columnResizeState&&this.resizableColumns&&!this.isHorizontalScroll){const t=this.calculateColumnWidths(this.tableColumns),s=this.tableWidth,e=this.getElementComputedWidth(this.slottedTable);t.map((t=>Object.assign(Object.assign({},t),{width:this.calcScaledColWidth(t.width,s,e)}))).slice(0,-1).forEach((t=>this.columnsWidths[t.name]=t.width)),this.tableWidth=e,this.setResizableColumnsStyles()}}calcScaledColWidth(t,s,e){const i=Math.round(t/s*e);return Math.max(i,1)}updateResizeState(t){if(this.columnResizeState){const s=this.columnResizeState.resizableColumn.dataset.columnName,e=Math.max(this.columnResizeState.resizableColumnInitialWidth+(t.pageX-this.columnResizeState.columnResizeMouseStartX),1),i=this.calculateColumnWidths(this.tableColumns).map((t=>t.name===s?Object.assign(Object.assign({},t),{width:e}):t));this.columnsWidths[s]=i.find((t=>t.name===s)).width,this.setResizableColumnsStyles(),this.tableWidth=this.getElementComputedWidth(this.slottedTable)}else this.columnResizeHover=!1,r("th",t,(s=>{this.tableColumns.length-1!==s.cellIndex&&this.isInResizeZone(t,s)&&(this.columnResizeHover=!0)}))}maybeStartResizing(t){r("th",t,(s=>{this.isInResizeZone(t,s)&&(this.columnResizeState={resizableColumn:s,columnResizeMouseStartX:t.pageX,resizableColumnInitialWidth:this.getElementComputedWidth(s)})}))}stopResizing(){this.columnResizeState&&(this.columnResizeState=null)}isInResizeZone(t,s){return s.getBoundingClientRect().right-t.clientX<3}getElementComputedWidth(t){return t.clientWidth-parseInt(window.getComputedStyle(t).paddingLeft)-parseInt(window.getComputedStyle(t).paddingRight)}calculateColumnWidths(t){return t.map((t=>({name:t.dataset.columnName,width:this.getElementComputedWidth(t)})))}setResizableColumnsStyles(){const t=document.getElementById(`${this.tableId}-resizable-styles`);let s="";Object.keys(this.columnsWidths).forEach((t=>{s+=`[gs-table-id=${this.tableId}] th[data-column-name="${t}"]{\n width:${String(this.columnsWidths[t])}px;\n min-width:${String(this.columnsWidths[t])}px;\n }`})),t.innerHTML=s}get isTableEmpty(){return!this.root.children[0]||this.tableRows.length<1}get tableContainerClasses(){return{"gux-table-container":!0,"gux-column-resizing":Boolean(this.columnResizeState),"gux-column-resizing-hover":this.columnResizeHover}}render(){return h(o,{"gs-table-id":this.tableId,"gs-v-scroll":this.isVerticalScroll,"gs-h-scroll":this.isHorizontalScroll,"gs-obj-table":this.objectTable,"gs-compact":this.compact},h("div",{class:"gux-table"},h("div",{tabindex:this.isVerticalScroll?"0":"-1",id:this.tableId,class:this.tableContainerClasses},h("slot",{name:"data"})),this.isHorizontalScroll&&h("gux-button-slot-beta",{accent:"secondary"},h("button",{class:"gux-table-scroll-left",disabled:this.isScrolledToFirstCell,onClick:!this.isScrolledToFirstCell&&this.previousColumn.bind(this)},h("gux-icon",{"icon-name":"chevron-left","screenreader-text":this.i18n("scrollLeft")}))),this.isHorizontalScroll&&h("gux-button-slot-beta",{accent:"secondary",style:{marginRight:`${this.tableScrollbarConstant}px`}},h("button",{class:"gux-table-scroll-right",disabled:this.isScrolledToLastCell,style:{marginRight:`${this.tableScrollbarConstant}px`},onClick:!this.isScrolledToLastCell&&this.nextColumn.bind(this)},h("gux-icon",{"icon-name":"chevron-right","screenreader-text":this.i18n("scrollRight")}))),this.isTableEmpty&&h("div",{class:"gux-empty-table"},this.emptyMessage||this.i18n("emptyMessage"))))}get root(){return l(this)}};u.style=":host{display:block;isolation:isolate}:host .gux-table{position:relative;height:inherit}:host .gux-table .gux-table-scroll-left,:host .gux-table .gux-table-scroll-right{position:absolute;top:0;z-index:1;display:flex;align-items:center;justify-content:center;width:24px;min-width:0;height:40px;padding:0;color:#2e394c;cursor:pointer;border-radius:4px}:host .gux-table .gux-table-scroll-left gux-icon,:host .gux-table .gux-table-scroll-right gux-icon{width:8px;height:8px}:host .gux-table .gux-table-scroll-left{border-top-left-radius:0;border-bottom-left-radius:0}:host .gux-table .gux-table-scroll-right{right:0;border-top-right-radius:0;border-bottom-right-radius:0}:host .gux-table .gux-table-container{width:100%;max-height:100%;overflow-x:hidden;scrollbar-color:rgba(32, 41, 55, 0.24) #fdfdfd;scrollbar-width:thin}:host .gux-table .gux-table-container::-webkit-scrollbar{width:4px}:host .gux-table .gux-table-container::-webkit-scrollbar-track{background:#fdfdfd}:host .gux-table .gux-table-container::-webkit-scrollbar-thumb{background:rgba(32, 41, 55, 0.24)}:host .gux-table .gux-table-container::-webkit-scrollbar-thumb:hover{background:rgba(32, 41, 55, 0.48)}:host .gux-table .gux-table-container.gux-column-resizing-hover,:host .gux-table .gux-table-container.gux-column-resizing{cursor:col-resize}:host .gux-empty-table{display:flex;align-items:center;justify-content:center;height:150px;color:#596373;background:#fdfdfd;font-family:Roboto, sans-serif;font-weight:400;font-weight:300;font-size:18px;line-height:24px}";export{u as gux_table_beta}
|
@@ -1 +1 @@
|
|
1
|
-
import{r as e,d as t,h as n,g as i}from"./p-7d26b2e1.js";import{t as o}from"./p-
|
1
|
+
import{r as e,d as t,h as n,g as i}from"./p-7d26b2e1.js";import{t as o}from"./p-e1558f84.js";import{O as a}from"./p-13dd4c6b.js";const s=class{constructor(t){e(this,t),this.blankStateSize=void 0}onResize(){this.setBlankStateSize()}componentWillLoad(){o(this.root)}componentDidLoad(){this.setBlankStateSize()}setBlankStateSize(){t((()=>{const e=this.root.clientWidth;this.blankStateSize=e<=160?"small":e<=300?"medium":"large"}))}render(){return n("div",{class:{"gux-container":!0,[`gux-${this.blankStateSize}`]:!0}},n("slot",{name:"image"}),n("div",{class:"gux-message-container"},n("slot",{name:"primary-message"})),n("div",{class:"gux-guidance-container"},n("slot",{name:"additional-guidance"})),n("gux-button-slot-beta",{accent:"primary"},n("slot",{name:"call-to-action"})))}get root(){return i(this)}};(function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var g=e.length-1;g>=0;g--)(o=e[g])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);a>3&&s&&Object.defineProperty(t,n,s)})([a()],s.prototype,"onResize",null),s.style=":host{display:flex;flex-direction:column;align-items:center;justify-content:center}.gux-container{display:flex;flex-direction:column;align-items:center;justify-content:center}.gux-container ::slotted(gux-icon){width:48px;height:48px;color:#c8cfda}.gux-container slot[name='primary-message']{color:#364154;text-align:center;font-family:Roboto, sans-serif;font-weight:400;font-weight:700;font-size:14px;line-height:20px}.gux-container slot[name='additional-guidance']{color:#364154;text-align:center;font-family:Roboto, sans-serif;font-weight:400;font-size:11px;line-height:16px}.gux-container.gux-small .gux-message-container,.gux-container.gux-medium .gux-message-container{padding:8px 0 4px}.gux-container.gux-small .gux-guidance-container,.gux-container.gux-medium .gux-guidance-container{padding-bottom:8px}.gux-container.gux-large .gux-message-container{padding:16px 0 4px}.gux-container.gux-large .gux-message-container slot[name='primary-message']{font-family:Roboto, sans-serif;font-weight:400;font-weight:300;font-size:24px;line-height:32px}.gux-container.gux-large .gux-guidance-container{padding-bottom:16px}.gux-container.gux-large .gux-guidance-container slot[name='additional-guidance']{font-family:Roboto, sans-serif;font-weight:400;font-size:14px;line-height:24px}";export{s as gux_blank_state_beta}
|
@@ -1 +1 @@
|
|
1
|
-
import{r as t,c as i,f as e,h as s,g as o,H as n}from"./p-7d26b2e1.js";import{O as r}from"./p-9d18d475.js";import{b as a}from"./p-deee079e.js";import{s as l}from"./p-d176c2ae.js";import{o as d,c as u}from"./p-3f5341ea.js";import{b as h}from"./p-091f51f6.js";import{t as c}from"./p-af4a6b41.js";import{O as x}from"./p-f34ce7dc.js";import{k as g,g as p,s as f,c as b,a as v,b as m,h as w,d as y,e as F,f as j,i as k,j as L,m as E,o as C}from"./p-55cf6d81.js";import{w as O}from"./p-76ff3e75.js";import{r as T}from"./p-cbcbd1bb.js";import"./p-8a133b9b.js";const A={filterResults:"Type to filter dropdown results",noSelection:"Select...",dropdown:"Dropdown"};var I=function(t,i,e,s){var o,n=arguments.length,r=n<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,i,e,s);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(n<3?o(r):n>3?o(i,e,r):o(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};const S=class{constructor(e){t(this,e),this.guxexpanded=i(this,"guxexpanded",7),this.guxcollapsed=i(this,"guxcollapsed",7),this.guxfilter=i(this,"guxfilter",7),this.value=void 0,this.disabled=!1,this.required=!1,this.loading=!1,this.placeholder=void 0,this.filterable=!1,this.filterType="none",this.hasError=!1,this.expanded=!1,this.filter=""}watchExpanded(t){t||(this.filter="")}watchValue(t){this.validateValue(t,this.listboxElement)}handleFilter(t){this.guxfilter.emit(t)}onKeydown(t){switch(t.key){case"Escape":return this.isFilterable()&&document.activeElement===this.listboxElement?this.filterElement.focus():void this.collapseListbox("focusFieldButton");case"Tab":return this.shiftTabFromFilterListbox(t)?(t.preventDefault(),this.filterElement.focus()):this.shiftTabFromExpandedFilterInput(t)?(t.preventDefault(),this.collapseListbox("focusFieldButton")):void this.collapseListbox("noFocusChange");case"ArrowDown":return void(this.activeElementNotListbox()&&(t.preventDefault(),this.expanded=!0))}}onInternallistboxoptionsupdated(t){t.stopPropagation(),e(this.root)}onBlur(t){this.stopPropagationOfInternalFocusEvents(t)}onFocus(t){this.stopPropagationOfInternalFocusEvents(t)}onFocusout(t){this.stopPropagationOfInternalFocusEvents(t)}onFocusin(t){this.stopPropagationOfInternalFocusEvents(t)}onClickOutside(){this.collapseListbox("noFocusChange")}onMutation(){var t;this.listboxElement||(this.listboxElement=null===(t=this.root)||void 0===t?void 0:t.querySelector("gux-listbox"),this.applyListboxEventListeners())}onInternalExpanded(t){t.stopPropagation(),this.guxexpanded.emit(),this.listboxElement&&h((()=>{this.listboxElement.focus(),this.isFilterable()&&this.filterElement&&this.filterElement.focus()}))}onInternalCollapsed(t){t.stopPropagation(),this.guxcollapsed.emit()}connectedCallback(){var t;this.listboxElement=null===(t=this.root)||void 0===t?void 0:t.querySelector("gux-listbox"),this.listboxElement&&this.validateValue(this.value,this.listboxElement)}async componentWillLoad(){c(this.root),this.i18n=await a(this.root,A),d(this.root,(()=>{e(this.root)}))}componentDidLoad(){this.applyListboxEventListeners()}componentWillRender(){this.listboxElement&&(this.validateValue(this.value,this.listboxElement),this.listboxElement.loading=this.loading,this.listboxElement.filterType=this.filterType,this.listboxElement.filter=this.filter)}showTooltip(){var t;null===(t=this.truncateElement)||void 0===t||t.setShowTooltip()}hideTooltip(){var t;null===(t=this.truncateElement)||void 0===t||t.setHideTooltip()}validateValue(t,i){void 0!==t?this.getOptionElementByValue(t)&&(i.value=t):i&&(i.value=t)}applyListboxEventListeners(){var t,i;null===(t=this.listboxElement)||void 0===t||t.addEventListener("input",(t=>{t.stopPropagation(),this.updateValue(t.target.value)})),null===(i=this.listboxElement)||void 0===i||i.addEventListener("change",(t=>{t.stopPropagation()}))}stopPropagationOfInternalFocusEvents(t){if(this.root.contains(t.relatedTarget))return t.stopImmediatePropagation()}isFilterable(){return this.filterable||"starts-with"===this.filterType||"custom"===this.filterType}get optionElements(){return g(this.listboxElement)}getOptionElementByValue(t){return this.optionElements.find((i=>i.value===t))}fieldButtonClick(){this.expanded=!this.expanded}filterInput(t){t.stopPropagation(),this.filter=this.filterElement.value}shiftTabFromExpandedFilterInput(t){return t.shiftKey&&this.isFilterable()&&this.expanded&&!(document.activeElement===this.listboxElement)}shiftTabFromFilterListbox(t){return t.shiftKey&&this.isFilterable()&&document.activeElement===this.listboxElement}activeElementNotListbox(){return document.activeElement!==this.listboxElement}filterKeydown(t){switch(t.key){case"ArrowDown":return t.stopImmediatePropagation(),void this.listboxElement.focus();case"Enter":return this.listboxElement.guxSelectActive(),void t.preventDefault()}}filterKeyup(t){" "!==t.key||t.preventDefault()}collapseListbox(t){this.expanded&&(this.expanded=!1),"focusFieldButton"===t&&this.fieldButtonElement.focus()}updateValue(t){this.value!==t&&(this.value=t,l(this.root,"input"),l(this.root,"change")),this.collapseListbox("focusFieldButton")}getTypeaheadText(t){const i=t.length;if(i>0&&!this.loading){const e=p(this.listboxElement,t);if(e&&"custom"!==this.filterType)return e.textContent.trim().substring(i)}return""}renderTargetDisplay(){const t=this.getOptionElementByValue(this.value);return t?s("div",{class:"gux-selected-option"},this.renderSelectedItem(t)):s("div",{class:"gux-placeholder"},this.placeholder||this.i18n("noSelection"))}renderSelectedItem(t){const i=t.tagName.toLowerCase();switch(i){case"gux-option":return s("gux-truncate",{ref:t=>this.truncateElement=t},t.textContent);case"gux-option-icon":return this.renderIconOption(t);default:return i}}renderIconOption(t){let i=null;return null!==t.iconColor&&(i={color:t.iconColor}),s("span",{class:"gux-selected-icon"},s("gux-icon",{"icon-name":t.iconName,style:i,decorative:!0}),s("gux-truncate",{ref:t=>this.truncateElement=t},t.textContent))}renderFilterInputField(){if(this.expanded&&this.isFilterable())return s("div",{class:"gux-field gux-input-field"},s("div",{class:"gux-field-content"},s("div",{class:"gux-filter"},s("div",{class:"gux-filter-display"},s("span",{class:"gux-filter-text"},this.filter),s("span",{class:"gux-filter-suggestion"},this.getTypeaheadText(this.filter))),s("div",{class:"input-and-dropdown-button"},s("input",{onClick:this.fieldButtonClick.bind(this),class:"gux-filter-input",type:"text","aria-label":this.i18n("filterResults"),ref:t=>this.filterElement=t,onInput:this.filterInput.bind(this),onKeyDown:this.filterKeydown.bind(this),onKeyUp:this.filterKeyup.bind(this)})))))}renderPopup(){return s("div",{slot:"popup",class:"gux-listbox-container"},s("slot",null))}renderTarget(){return s("div",{class:{"gux-target-container-expanded":this.expanded&&this.isFilterable(),"gux-target-container-collapsed":!(this.expanded&&this.isFilterable()),"gux-error":this.hasError},slot:"target"},this.renderFilterInputField(),s("button",{type:"button",class:"gux-field gux-field-button",disabled:u(this.root),onClick:this.fieldButtonClick.bind(this),onFocusin:this.showTooltip.bind(this),onFocusout:this.hideTooltip.bind(this),ref:t=>this.fieldButtonElement=t,"aria-haspopup":"listbox","aria-expanded":this.expanded.toString()},this.renderTargetContent(),this.renderRadialLoading(),s("gux-icon",{class:{"gux-expand-icon":!0},"screenreader-text":this.i18n("dropdown"),iconName:"chevron-small-down"})))}renderTargetContent(){if(!this.expanded||!this.isFilterable())return s("div",{class:"gux-field-content"},this.renderTargetDisplay())}renderRadialLoading(){if(this.loading&&!this.expanded)return s("gux-radial-loading",{context:"input"})}render(){return s("gux-popup",{expanded:this.expanded&&(!this.loading||this.isFilterable()),disabled:this.disabled},this.renderTarget(),this.renderPopup())}static get delegatesFocus(){return!0}get root(){return o(this)}static get watchers(){return{expanded:["watchExpanded"],value:["watchValue"],filter:["handleFilter"]}}};I([r({triggerEvents:"mousedown"})],S.prototype,"onClickOutside",null),I([x({childList:!0,subtree:!0})],S.prototype,"onMutation",null),S.style=":host{color:#2e394c}.gux-field,.gux-target-container-expanded{all:unset;box-sizing:border-box;display:flex;flex-direction:row;flex-wrap:nowrap;align-content:stretch;align-items:center;justify-content:center;width:100%;height:32px;padding:6px 8px;font-family:inherit;font-size:12px;line-height:1.6667;cursor:pointer;background-color:#f6f7f9}.gux-error.gux-target-container-collapsed .gux-field-button,.gux-error.gux-target-container-expanded{border-color:#ea0b0b}.gux-field.gux-input-field{height:30px}.gux-field .gux-field-content{--gux-zindex-tooltip:3;display:flex;flex:1 1 0;flex-direction:row;flex-wrap:nowrap;align-content:stretch;align-items:flex-start;justify-content:flex-start;min-width:0;height:100%}.gux-field .gux-field-content .gux-filter,.gux-field .gux-field-content .gux-selected-option,.gux-field .gux-field-content .gux-placeholder{flex:1 1 auto;align-self:auto;order:0;padding:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gux-field .gux-field-content .gux-filter{position:relative;height:100%}.gux-field .gux-field-content .gux-filter .gux-filter-input{all:unset;width:100%;color:transparent;caret-color:#2e394c}.gux-field .gux-field-content .gux-filter .gux-filter-display{white-space:pre}.gux-field .gux-field-content .gux-filter .gux-filter-display .gux-filter-text{color:#2e394c}.gux-field .gux-field-content .gux-filter .gux-filter-display .gux-filter-suggestion{color:#596373}.gux-field .gux-field-content .gux-filter .gux-filter-input,.gux-field .gux-field-content .gux-filter .gux-filter-display{position:absolute}.gux-field .gux-field-content .gux-placeholder{color:#596373}.gux-field .gux-expand-icon{flex:0 0 auto;align-self:auto;order:0;width:16px;height:16px;padding-left:8px;color:#596373}.gux-target-container-expanded{border:1px solid #6b7585;border-radius:4px;box-shadow:inset 0 0 4px rgba(32, 41, 55, 0.16)}.gux-target-container-expanded:focus-visible,.gux-target-container-expanded:focus-within{outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}.gux-target-container-expanded .gux-filter-input{background-color:inherit;border:none}.gux-target-container-expanded .gux-filter-input:focus{border:none;outline:none}.gux-target-container-expanded .gux-field-button{width:auto;height:30px;padding:0 0 0 8px;margin:0;background:inherit;border:none;outline:none;box-shadow:none}.gux-target-container-expanded .gux-field-button:focus{outline:none}.gux-target-container-collapsed .gux-field-button{border:1px solid #6b7585;border-radius:4px;box-shadow:inset 0 0 4px rgba(32, 41, 55, 0.16)}.gux-target-container-collapsed .gux-field-button:focus-visible,.gux-target-container-collapsed .gux-field-button:focus-within{outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}.gux-listbox-container{box-sizing:border-box;margin:0;color:#2e394c}gux-popup::part(gux-popup-container){width:inherit}.gux-selected-icon{display:flex;align-items:center}.gux-selected-icon gux-icon{width:16px;height:16px;padding-right:8px}";const B=["gux-option","gux-option-icon"].join(","),R={noMatches:"No matches",loading:"Loading..."},z=class{constructor(e){t(this,e),this.internallistboxoptionsupdated=i(this,"internallistboxoptionsupdated",7),this.value=void 0,this.filter="",this.filterType="none",this.loading=!1,this.selectedValues=[],this.listboxOptions=[],this.allListboxOptionsFiltered=void 0}onFocus(){f(this.root)}onBlur(){b(this.root)}onKeydown(t){switch(t.key){case"Enter":return t.preventDefault(),void k(this.root,(t=>this.updateValue(t)));case"ArrowDown":return t.preventDefault(),void(F(this.root)?(t.stopPropagation(),j(this.root)):m(this.root));case"ArrowUp":return t.preventDefault(),void(w(this.root)?(t.stopPropagation(),y(this.root)):v(this.root));case"Home":return t.preventDefault(),void m(this.root);case"End":return t.preventDefault(),void v(this.root);case" ":return void t.preventDefault()}1!==t.key.length||L(this.root,t.key)}onKeyup(t){" "!==t.key||k(this.root,(t=>this.updateValue(t)))}onMousemove(){b(this.root)}onClick(t){O(B,t,(t=>{C(t,(t=>this.updateValue(t)))}))}async guxSelectActive(){k(this.root,(t=>this.updateValue(t)))}setListboxOptions(){this.value&&(this.selectedValues=this.value.split(",")),this.listboxOptions=Array.from(this.root.children),this.internallistboxoptionsupdated.emit()}updateValue(t){this.value!==t&&(this.value=t),l(this.root,"input"),l(this.root,"change")}async componentWillLoad(){c(this.root),this.i18n=await a(this.root,R),this.setListboxOptions()}componentWillRender(){this.listboxOptions.forEach((t=>{t.selected=t.value===this.value,"custom"!==this.filterType&&(t.filtered=!E(t,this.filter))})),this.allListboxOptionsFiltered=0===this.listboxOptions.filter((t=>!t.filtered)).length,!this.allListboxOptionsFiltered&&this.filter?m(this.root):b(this.root)}renderHiddenSlot(){return s("div",{hidden:!0},s("slot",{onSlotchange:()=>this.setListboxOptions()}))}renderLoading(){return[s("div",{class:"gux-message-container"},s("gux-radial-loading",{context:"modal"}),s("span",null,this.i18n("loading"))),this.renderHiddenSlot()]}renderAllListboxOptionsFiltered(){return[s("div",{class:"gux-message-container"},s("div",{class:"gux-no-matches"},this.i18n("noMatches"))),this.renderHiddenSlot()]}render(){return this.loading?this.renderLoading():this.allListboxOptionsFiltered?this.renderAllListboxOptionsFiltered():s(n,{role:"listbox",tabindex:0},s("slot",{onSlotchange:()=>this.setListboxOptions()}))}get root(){return o(this)}};z.style=":host{box-sizing:border-box;display:block;max-height:20rem;padding:8px 0;margin:0;overflow-y:auto;color:#2e394c;background:#fdfdfd;border:1px solid #b4bccb;border-radius:4px;outline:none}:host(:focus){outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}.gux-message-container{display:flex;flex-direction:column;flex-wrap:nowrap;align-content:stretch;align-items:center;justify-content:center}.gux-message-container .gux-no-matches{box-sizing:border-box;height:32px;padding:8px 16px;color:#2e394c}";const D=class{constructor(i){t(this,i),this.value=void 0,this.active=!1,this.selected=!1,this.disabled=!1,this.filtered=!1,this.hovered=!1}onmouseenter(){this.hovered=!0}onMouseleave(){this.hovered=!1}handleActive(t){var i,e;t?null===(i=this.truncateElement)||void 0===i||i.setShowTooltip():null===(e=this.truncateElement)||void 0===e||e.setHideTooltip()}componentWillLoad(){this.root.id=this.root.id||T("gux-option")}getAriaSelected(){return!this.disabled&&(this.selected?"true":"false")}render(){return s(n,{role:"option",class:{"gux-active":this.active,"gux-disabled":this.disabled,"gux-filtered":this.filtered,"gux-hovered":this.hovered,"gux-selected":this.selected},"aria-selected":this.getAriaSelected(),"aria-disabled":this.disabled.toString()},s("gux-truncate",{ref:t=>this.truncateElement=t},s("slot",null)))}get root(){return o(this)}static get watchers(){return{active:["handleActive"]}}};D.style="gux-option{box-sizing:border-box;display:flex;height:32px;padding:6px 8px;color:#2e394c;word-wrap:break-word;cursor:pointer}gux-option.gux-disabled{pointer-events:none;cursor:default;opacity:0.5}gux-option.gux-selected{background:#deeaff}gux-option.gux-active,gux-option.gux-hovered:not(:disabled){color:#fdfdfd;background:#2a60c8}gux-option.gux-filtered{display:none}gux-option .gux-slot-container{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}";export{S as gux_dropdown,z as gux_listbox,D as gux_option}
|
1
|
+
import{r as t,c as i,f as e,h as s,g as o,H as n}from"./p-7d26b2e1.js";import{O as r}from"./p-9d18d475.js";import{b as a}from"./p-deee079e.js";import{s as l}from"./p-d176c2ae.js";import{o as d,c as u}from"./p-3f5341ea.js";import{b as h}from"./p-091f51f6.js";import{t as c}from"./p-e1558f84.js";import{O as x}from"./p-f34ce7dc.js";import{k as g,g as p,s as f,c as b,a as v,b as m,h as w,d as y,e as F,f as j,i as k,j as L,m as E,o as C}from"./p-55cf6d81.js";import{w as O}from"./p-76ff3e75.js";import{r as T}from"./p-cbcbd1bb.js";import"./p-8a133b9b.js";const A={filterResults:"Type to filter dropdown results",noSelection:"Select...",dropdown:"Dropdown"};var I=function(t,i,e,s){var o,n=arguments.length,r=n<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,i,e,s);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(n<3?o(r):n>3?o(i,e,r):o(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};const S=class{constructor(e){t(this,e),this.guxexpanded=i(this,"guxexpanded",7),this.guxcollapsed=i(this,"guxcollapsed",7),this.guxfilter=i(this,"guxfilter",7),this.value=void 0,this.disabled=!1,this.required=!1,this.loading=!1,this.placeholder=void 0,this.filterable=!1,this.filterType="none",this.hasError=!1,this.expanded=!1,this.filter=""}watchExpanded(t){t||(this.filter="")}watchValue(t){this.validateValue(t,this.listboxElement)}handleFilter(t){this.guxfilter.emit(t)}onKeydown(t){switch(t.key){case"Escape":return this.isFilterable()&&document.activeElement===this.listboxElement?this.filterElement.focus():void this.collapseListbox("focusFieldButton");case"Tab":return this.shiftTabFromFilterListbox(t)?(t.preventDefault(),this.filterElement.focus()):this.shiftTabFromExpandedFilterInput(t)?(t.preventDefault(),this.collapseListbox("focusFieldButton")):void this.collapseListbox("noFocusChange");case"ArrowDown":return void(this.activeElementNotListbox()&&(t.preventDefault(),this.expanded=!0))}}onInternallistboxoptionsupdated(t){t.stopPropagation(),e(this.root)}onBlur(t){this.stopPropagationOfInternalFocusEvents(t)}onFocus(t){this.stopPropagationOfInternalFocusEvents(t)}onFocusout(t){this.stopPropagationOfInternalFocusEvents(t)}onFocusin(t){this.stopPropagationOfInternalFocusEvents(t)}onClickOutside(){this.collapseListbox("noFocusChange")}onMutation(){var t;this.listboxElement||(this.listboxElement=null===(t=this.root)||void 0===t?void 0:t.querySelector("gux-listbox"),this.applyListboxEventListeners())}onInternalExpanded(t){t.stopPropagation(),this.guxexpanded.emit(),this.listboxElement&&h((()=>{this.listboxElement.focus(),this.isFilterable()&&this.filterElement&&this.filterElement.focus()}))}onInternalCollapsed(t){t.stopPropagation(),this.guxcollapsed.emit()}connectedCallback(){var t;this.listboxElement=null===(t=this.root)||void 0===t?void 0:t.querySelector("gux-listbox"),this.listboxElement&&this.validateValue(this.value,this.listboxElement)}async componentWillLoad(){c(this.root),this.i18n=await a(this.root,A),d(this.root,(()=>{e(this.root)}))}componentDidLoad(){this.applyListboxEventListeners()}componentWillRender(){this.listboxElement&&(this.validateValue(this.value,this.listboxElement),this.listboxElement.loading=this.loading,this.listboxElement.filterType=this.filterType,this.listboxElement.filter=this.filter)}showTooltip(){var t;null===(t=this.truncateElement)||void 0===t||t.setShowTooltip()}hideTooltip(){var t;null===(t=this.truncateElement)||void 0===t||t.setHideTooltip()}validateValue(t,i){void 0!==t?this.getOptionElementByValue(t)&&(i.value=t):i&&(i.value=t)}applyListboxEventListeners(){var t,i;null===(t=this.listboxElement)||void 0===t||t.addEventListener("input",(t=>{t.stopPropagation(),this.updateValue(t.target.value)})),null===(i=this.listboxElement)||void 0===i||i.addEventListener("change",(t=>{t.stopPropagation()}))}stopPropagationOfInternalFocusEvents(t){if(this.root.contains(t.relatedTarget))return t.stopImmediatePropagation()}isFilterable(){return this.filterable||"starts-with"===this.filterType||"custom"===this.filterType}get optionElements(){return g(this.listboxElement)}getOptionElementByValue(t){return this.optionElements.find((i=>i.value===t))}fieldButtonClick(){this.expanded=!this.expanded}filterInput(t){t.stopPropagation(),this.filter=this.filterElement.value}shiftTabFromExpandedFilterInput(t){return t.shiftKey&&this.isFilterable()&&this.expanded&&!(document.activeElement===this.listboxElement)}shiftTabFromFilterListbox(t){return t.shiftKey&&this.isFilterable()&&document.activeElement===this.listboxElement}activeElementNotListbox(){return document.activeElement!==this.listboxElement}filterKeydown(t){switch(t.key){case"ArrowDown":return t.stopImmediatePropagation(),void this.listboxElement.focus();case"Enter":return this.listboxElement.guxSelectActive(),void t.preventDefault()}}filterKeyup(t){" "!==t.key||t.preventDefault()}collapseListbox(t){this.expanded&&(this.expanded=!1),"focusFieldButton"===t&&this.fieldButtonElement.focus()}updateValue(t){this.value!==t&&(this.value=t,l(this.root,"input"),l(this.root,"change")),this.collapseListbox("focusFieldButton")}getTypeaheadText(t){const i=t.length;if(i>0&&!this.loading){const e=p(this.listboxElement,t);if(e&&"custom"!==this.filterType)return e.textContent.trim().substring(i)}return""}renderTargetDisplay(){const t=this.getOptionElementByValue(this.value);return t?s("div",{class:"gux-selected-option"},this.renderSelectedItem(t)):s("div",{class:"gux-placeholder"},this.placeholder||this.i18n("noSelection"))}renderSelectedItem(t){const i=t.tagName.toLowerCase();switch(i){case"gux-option":return s("gux-truncate",{ref:t=>this.truncateElement=t},t.textContent);case"gux-option-icon":return this.renderIconOption(t);default:return i}}renderIconOption(t){let i=null;return null!==t.iconColor&&(i={color:t.iconColor}),s("span",{class:"gux-selected-icon"},s("gux-icon",{"icon-name":t.iconName,style:i,decorative:!0}),s("gux-truncate",{ref:t=>this.truncateElement=t},t.textContent))}renderFilterInputField(){if(this.expanded&&this.isFilterable())return s("div",{class:"gux-field gux-input-field"},s("div",{class:"gux-field-content"},s("div",{class:"gux-filter"},s("div",{class:"gux-filter-display"},s("span",{class:"gux-filter-text"},this.filter),s("span",{class:"gux-filter-suggestion"},this.getTypeaheadText(this.filter))),s("div",{class:"input-and-dropdown-button"},s("input",{onClick:this.fieldButtonClick.bind(this),class:"gux-filter-input",type:"text","aria-label":this.i18n("filterResults"),ref:t=>this.filterElement=t,onInput:this.filterInput.bind(this),onKeyDown:this.filterKeydown.bind(this),onKeyUp:this.filterKeyup.bind(this)})))))}renderPopup(){return s("div",{slot:"popup",class:"gux-listbox-container"},s("slot",null))}renderTarget(){return s("div",{class:{"gux-target-container-expanded":this.expanded&&this.isFilterable(),"gux-target-container-collapsed":!(this.expanded&&this.isFilterable()),"gux-error":this.hasError},slot:"target"},this.renderFilterInputField(),s("button",{type:"button",class:"gux-field gux-field-button",disabled:u(this.root),onClick:this.fieldButtonClick.bind(this),onFocusin:this.showTooltip.bind(this),onFocusout:this.hideTooltip.bind(this),ref:t=>this.fieldButtonElement=t,"aria-haspopup":"listbox","aria-expanded":this.expanded.toString()},this.renderTargetContent(),this.renderRadialLoading(),s("gux-icon",{class:{"gux-expand-icon":!0},"screenreader-text":this.i18n("dropdown"),iconName:"chevron-small-down"})))}renderTargetContent(){if(!this.expanded||!this.isFilterable())return s("div",{class:"gux-field-content"},this.renderTargetDisplay())}renderRadialLoading(){if(this.loading&&!this.expanded)return s("gux-radial-loading",{context:"input"})}render(){return s("gux-popup",{expanded:this.expanded&&(!this.loading||this.isFilterable()),disabled:this.disabled},this.renderTarget(),this.renderPopup())}static get delegatesFocus(){return!0}get root(){return o(this)}static get watchers(){return{expanded:["watchExpanded"],value:["watchValue"],filter:["handleFilter"]}}};I([r({triggerEvents:"mousedown"})],S.prototype,"onClickOutside",null),I([x({childList:!0,subtree:!0})],S.prototype,"onMutation",null),S.style=":host{color:#2e394c}.gux-field,.gux-target-container-expanded{all:unset;box-sizing:border-box;display:flex;flex-direction:row;flex-wrap:nowrap;align-content:stretch;align-items:center;justify-content:center;width:100%;height:32px;padding:6px 8px;font-family:inherit;font-size:12px;line-height:1.6667;cursor:pointer;background-color:#f6f7f9}.gux-error.gux-target-container-collapsed .gux-field-button,.gux-error.gux-target-container-expanded{border-color:#ea0b0b}.gux-field.gux-input-field{height:30px}.gux-field .gux-field-content{--gux-zindex-tooltip:3;display:flex;flex:1 1 0;flex-direction:row;flex-wrap:nowrap;align-content:stretch;align-items:flex-start;justify-content:flex-start;min-width:0;height:100%}.gux-field .gux-field-content .gux-filter,.gux-field .gux-field-content .gux-selected-option,.gux-field .gux-field-content .gux-placeholder{flex:1 1 auto;align-self:auto;order:0;padding:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gux-field .gux-field-content .gux-filter{position:relative;height:100%}.gux-field .gux-field-content .gux-filter .gux-filter-input{all:unset;width:100%;color:transparent;caret-color:#2e394c}.gux-field .gux-field-content .gux-filter .gux-filter-display{white-space:pre}.gux-field .gux-field-content .gux-filter .gux-filter-display .gux-filter-text{color:#2e394c}.gux-field .gux-field-content .gux-filter .gux-filter-display .gux-filter-suggestion{color:#596373}.gux-field .gux-field-content .gux-filter .gux-filter-input,.gux-field .gux-field-content .gux-filter .gux-filter-display{position:absolute}.gux-field .gux-field-content .gux-placeholder{color:#596373}.gux-field .gux-expand-icon{flex:0 0 auto;align-self:auto;order:0;width:16px;height:16px;padding-left:8px;color:#596373}.gux-target-container-expanded{border:1px solid #6b7585;border-radius:4px;box-shadow:inset 0 0 4px rgba(32, 41, 55, 0.16)}.gux-target-container-expanded:focus-visible,.gux-target-container-expanded:focus-within{outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}.gux-target-container-expanded .gux-filter-input{background-color:inherit;border:none}.gux-target-container-expanded .gux-filter-input:focus{border:none;outline:none}.gux-target-container-expanded .gux-field-button{width:auto;height:30px;padding:0 0 0 8px;margin:0;background:inherit;border:none;outline:none;box-shadow:none}.gux-target-container-expanded .gux-field-button:focus{outline:none}.gux-target-container-collapsed .gux-field-button{border:1px solid #6b7585;border-radius:4px;box-shadow:inset 0 0 4px rgba(32, 41, 55, 0.16)}.gux-target-container-collapsed .gux-field-button:focus-visible,.gux-target-container-collapsed .gux-field-button:focus-within{outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}.gux-listbox-container{box-sizing:border-box;margin:0;color:#2e394c}gux-popup::part(gux-popup-container){width:inherit}.gux-selected-icon{display:flex;align-items:center}.gux-selected-icon gux-icon{width:16px;height:16px;padding-right:8px}";const B=["gux-option","gux-option-icon"].join(","),R={noMatches:"No matches",loading:"Loading..."},z=class{constructor(e){t(this,e),this.internallistboxoptionsupdated=i(this,"internallistboxoptionsupdated",7),this.value=void 0,this.filter="",this.filterType="none",this.loading=!1,this.selectedValues=[],this.listboxOptions=[],this.allListboxOptionsFiltered=void 0}onFocus(){f(this.root)}onBlur(){b(this.root)}onKeydown(t){switch(t.key){case"Enter":return t.preventDefault(),void k(this.root,(t=>this.updateValue(t)));case"ArrowDown":return t.preventDefault(),void(F(this.root)?(t.stopPropagation(),j(this.root)):m(this.root));case"ArrowUp":return t.preventDefault(),void(w(this.root)?(t.stopPropagation(),y(this.root)):v(this.root));case"Home":return t.preventDefault(),void m(this.root);case"End":return t.preventDefault(),void v(this.root);case" ":return void t.preventDefault()}1!==t.key.length||L(this.root,t.key)}onKeyup(t){" "!==t.key||k(this.root,(t=>this.updateValue(t)))}onMousemove(){b(this.root)}onClick(t){O(B,t,(t=>{C(t,(t=>this.updateValue(t)))}))}async guxSelectActive(){k(this.root,(t=>this.updateValue(t)))}setListboxOptions(){this.value&&(this.selectedValues=this.value.split(",")),this.listboxOptions=Array.from(this.root.children),this.internallistboxoptionsupdated.emit()}updateValue(t){this.value!==t&&(this.value=t),l(this.root,"input"),l(this.root,"change")}async componentWillLoad(){c(this.root),this.i18n=await a(this.root,R),this.setListboxOptions()}componentWillRender(){this.listboxOptions.forEach((t=>{t.selected=t.value===this.value,"custom"!==this.filterType&&(t.filtered=!E(t,this.filter))})),this.allListboxOptionsFiltered=0===this.listboxOptions.filter((t=>!t.filtered)).length,!this.allListboxOptionsFiltered&&this.filter?m(this.root):b(this.root)}renderHiddenSlot(){return s("div",{hidden:!0},s("slot",{onSlotchange:()=>this.setListboxOptions()}))}renderLoading(){return[s("div",{class:"gux-message-container"},s("gux-radial-loading",{context:"modal"}),s("span",null,this.i18n("loading"))),this.renderHiddenSlot()]}renderAllListboxOptionsFiltered(){return[s("div",{class:"gux-message-container"},s("div",{class:"gux-no-matches"},this.i18n("noMatches"))),this.renderHiddenSlot()]}render(){return this.loading?this.renderLoading():this.allListboxOptionsFiltered?this.renderAllListboxOptionsFiltered():s(n,{role:"listbox",tabindex:0},s("slot",{onSlotchange:()=>this.setListboxOptions()}))}get root(){return o(this)}};z.style=":host{box-sizing:border-box;display:block;max-height:20rem;padding:8px 0;margin:0;overflow-y:auto;color:#2e394c;background:#fdfdfd;border:1px solid #b4bccb;border-radius:4px;outline:none}:host(:focus){outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}.gux-message-container{display:flex;flex-direction:column;flex-wrap:nowrap;align-content:stretch;align-items:center;justify-content:center}.gux-message-container .gux-no-matches{box-sizing:border-box;height:32px;padding:8px 16px;color:#2e394c}";const D=class{constructor(i){t(this,i),this.value=void 0,this.active=!1,this.selected=!1,this.disabled=!1,this.filtered=!1,this.hovered=!1}onmouseenter(){this.hovered=!0}onMouseleave(){this.hovered=!1}handleActive(t){var i,e;t?null===(i=this.truncateElement)||void 0===i||i.setShowTooltip():null===(e=this.truncateElement)||void 0===e||e.setHideTooltip()}componentWillLoad(){this.root.id=this.root.id||T("gux-option")}getAriaSelected(){return!this.disabled&&(this.selected?"true":"false")}render(){return s(n,{role:"option",class:{"gux-active":this.active,"gux-disabled":this.disabled,"gux-filtered":this.filtered,"gux-hovered":this.hovered,"gux-selected":this.selected},"aria-selected":this.getAriaSelected(),"aria-disabled":this.disabled.toString()},s("gux-truncate",{ref:t=>this.truncateElement=t},s("slot",null)))}get root(){return o(this)}static get watchers(){return{active:["handleActive"]}}};D.style="gux-option{box-sizing:border-box;display:flex;height:32px;padding:6px 8px;color:#2e394c;word-wrap:break-word;cursor:pointer}gux-option.gux-disabled{pointer-events:none;cursor:default;opacity:0.5}gux-option.gux-selected{background:#deeaff}gux-option.gux-active,gux-option.gux-hovered:not(:disabled){color:#fdfdfd;background:#2a60c8}gux-option.gux-filtered{display:none}gux-option .gux-slot-container{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}";export{S as gux_dropdown,z as gux_listbox,D as gux_option}
|
@@ -1 +1 @@
|
|
1
|
-
import{r as e,c as t,h as i,g as s}from"./p-7d26b2e1.js";import{o}from"./p-93904222.js";import{O as n}from"./p-9d18d475.js";import{a as r}from"./p-091f51f6.js";import{t as p}from"./p-
|
1
|
+
import{r as e,c as t,h as i,g as s}from"./p-7d26b2e1.js";import{o}from"./p-93904222.js";import{O as n}from"./p-9d18d475.js";import{a as r}from"./p-091f51f6.js";import{t as p}from"./p-e1558f84.js";import{b as a}from"./p-deee079e.js";import"./p-8a133b9b.js";const u={searchAria:"Search"};const d=class{constructor(i){e(this,i),this.input=t(this,"input",7),this.filter=t(this,"filter",7),this.disabled=!1,this.placeholder=void 0,this.noFilter=!1,this.filterDebounceTimeout=500,this.dropdownHeight="320px",this.srLabelledby=void 0,this.opened=void 0,this.currentlySelectedOption=void 0,this.selectionOptions=void 0}watchValue(e){this.opened&&e&&this.closeDropdown(!1)}get value(){var e;return null===(e=this.currentlySelectedOption)||void 0===e?void 0:e.text}getSelectedValues(){return Promise.resolve([this.value])}async setLabeledBy(e){this.srLabelledby=e}onClickOutside(){this.closeDropdown(!1)}async componentWillLoad(){p(this.root),this.i18n=await a(this.root,u),this.handleSelectionChange=this.handleSelectionChange.bind(this),this.updateSelectionState(),this.addOptionListener(),this.slotObserver=o(this.root,(()=>this.updateSelectionState()))}disconnectedCallback(){this.slotObserver&&this.slotObserver.disconnect()}render(){return i("gux-popup",{expanded:this.opened,disabled:this.disabled},i("div",{slot:"target",class:"gux-select-field",onMouseDown:()=>this.inputMouseDown()},i("a",{ref:e=>this.inputBox=e,class:"gux-select-input","aria-labelledby":this.srLabelledby,tabindex:"0",onKeyDown:e=>this.inputKeyDown(e)},this.placeholder&&!this.value&&i("span",{class:"gux-select-placeholder",title:this.placeholder},this.placeholder),this.value&&i("span",{class:"gux-select-value",title:this.value},this.value)),i("div",{class:"gux-icon-wrapper"},i("gux-icon",{decorative:!0,"icon-name":"chevron-small-down"}))),i("div",{slot:"popup",class:"gux-advanced-dropdown-menu"},i("div",{class:"gux-dropdown-menu-container"},i("gux-form-field-search",{"label-position":"screenreader"},i("label",{slot:"label"},this.i18n("searchAria")),i("input",{slot:"input",type:"search",onInput:e=>{this.handleSearchInput(e)},ref:e=>this.searchInput=e})),i("div",{class:"gux-dropdown-options",style:{maxHeight:this.dropdownHeight},onKeyDown:e=>this.optionsKeyDown(e)},i("slot",null)))))}updateSelectionState(){this.selectionOptions=this.getSelectionOptions(),this.currentlySelectedOption=this.selectionOptions.find((e=>e.selected))}addOptionListener(){this.root.addEventListener("selectedChanged",(e=>this.handleSelectionChange(e)))}handleSelectionChange({target:e}){const t=e;this.closeDropdown(!0),this.currentlySelectedOption!==t&&(this.currentlySelectedOption&&(this.currentlySelectedOption.selected=!1),this.currentlySelectedOption=t,this.input.emit(t.value))}getSelectionOptions(){const e=this.root.querySelectorAll("gux-dropdown-option");return Array.from(e)}inputMouseDown(){this.disabled||(this.opened?this.closeDropdown(!0):this.openDropdown(!1))}getFocusIndex(){return this.selectionOptions.findIndex((e=>e.matches(":focus")))}optionsKeyDown(e){switch(e.key){case"ArrowUp":{e.preventDefault();const t=this.getFocusIndex();t>0&&this.selectionOptions[t-1].focus();break}case"ArrowDown":{e.preventDefault();const t=this.getFocusIndex();t<this.selectionOptions.length-1&&this.selectionOptions[t+1].focus();break}case"Home":if(!this.selectionOptions.length)return;this.selectionOptions[0].focus();break;case"End":if(!this.selectionOptions.length)return;this.selectionOptions[this.selectionOptions.length-1].focus()}}inputKeyDown(e){switch(e.key){case"ArrowUp":case"ArrowDown":case" ":this.openDropdown(!0)}}handleSearchInput(e){e.stopPropagation(),clearTimeout(this.filterDebounceTimer),this.filterDebounceTimer=setTimeout((()=>this.searchRequested()),this.filterDebounceTimeout)}searchRequested(){this.filter.emit(this.searchInput.value),this.setFilteredOptions()}setFilteredOptions(){const e=this.searchInput.value;if(!this.noFilter)for(const t of this.selectionOptions)t.shouldFilter(e).then((e=>{t.filtered=e}))}changeFocusToSearch(){r((()=>{this.searchInput.focus()}))}openDropdown(e){this.opened=!0,e&&this.changeFocusToSearch()}closeDropdown(e){this.opened=!1,this.searchInput.value="",this.setFilteredOptions(),e&&this.inputBox.focus()}get root(){return s(this)}static get watchers(){return{disabled:["watchValue"]}}};(function(e,t,i,s){var o,n=arguments.length,r=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var p=e.length-1;p>=0;p--)(o=e[p])&&(r=(n<3?o(r):n>3?o(t,i,r):o(t,i))||r);n>3&&r&&Object.defineProperty(t,i,r)})([n({triggerEvents:"mousedown"})],d.prototype,"onClickOutside",null),d.style=":host{color:#2e394c}gux-popup{display:block;margin:4px 0}gux-popup .gux-select-field{position:relative;width:100%;height:32px}gux-popup .gux-select-field a.gux-select-input{position:absolute;inset:0;padding:6px 24px 6px 12px;overflow:hidden;color:#2e394c;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;background-color:#f6f7f9;background-image:none;border:1px solid #6b7585;border-radius:4px;box-shadow:inset 0 0 4px rgba(32, 41, 55, 0.16)}gux-popup .gux-select-field a.gux-select-input .gux-select-placeholder,gux-popup .gux-select-field a.gux-select-input .gux-select-value{line-height:20px}gux-popup .gux-select-field a.gux-select-input .gux-select-placeholder{color:#596373}gux-popup .gux-select-field a.gux-select-input:focus-visible{outline:none;box-shadow:0 0 0 3px rgba(117, 168, 255, 0.5)}gux-popup .gux-select-field .gux-icon-wrapper{position:absolute;top:1px;right:8px;bottom:0;display:flex;align-items:center;overflow:hidden;cursor:pointer}gux-popup .gux-select-field .gux-icon-wrapper gux-icon{width:16px;height:16px;color:#596373}gux-popup .gux-select-field:hover .gux-icon-wrapper gux-icon{color:#2e394c}gux-popup .gux-advanced-dropdown-menu{width:100%;background:#fdfdfd;border:1px solid #b4bccb;border-radius:4px;box-shadow:0 0 2px 0 rgba(32, 41, 55, 0.24);box-shadow:0 2px 4px rgba(32, 41, 55, 0.24)}gux-popup .gux-advanced-dropdown-menu .gux-dropdown-menu-container gux-form-field-search{margin:8px 16px}gux-popup .gux-advanced-dropdown-menu .gux-dropdown-menu-container gux-form-field-search input::-webkit-search-cancel-button,gux-popup .gux-advanced-dropdown-menu .gux-dropdown-menu-container gux-form-field-search input::-webkit-search-results-button,gux-popup .gux-advanced-dropdown-menu .gux-dropdown-menu-container gux-form-field-search input::-webkit-calendar-picker-indicator{display:none;-webkit-appearance:none}gux-popup .gux-dropdown-options{padding:8px 0;margin:0;overflow-y:auto;color:#2e394c;background:#fdfdfd;border-radius:4px;box-shadow:none}gux-popup::part(gux-popup-container){width:inherit}";export{d as gux_advanced_dropdown}
|
@@ -1 +1 @@
|
|
1
|
-
import{r as t,h as o,H as e,g as n}from"./p-7d26b2e1.js";import{t as r}from"./p-
|
1
|
+
import{r as t,h as o,H as e,g as n}from"./p-7d26b2e1.js";import{t as r}from"./p-e1558f84.js";import{l as a}from"./p-d0805f56.js";const u=class{constructor(o){t(this,o),this.accent="secondary"}validateSlotContent(){let t=this.root.children[0],o=t.tagName;if("SLOT"===o&&(t=t.assignedNodes()[0],o=t.tagName),"BUTTON"!==o){if("INPUT"===o){const o=t.getAttribute("type");if("button"===o||"submit"===o)return}a(this.root,'You must slot a button, input[type="button"] or input[type="submit"] element.')}}componentWillLoad(){r(this.root),this.validateSlotContent()}render(){return o(e,{accent:this.accent},o("slot",null))}get root(){return n(this)}};u.style=":host{display:inline-block;pointer-events:none}::slotted(input[type=button]),::slotted(input[type=submit]),::slotted(button){font-family:var(--gse-ui-button-text-fontFamily);font-weight:var(--gse-ui-button-text-fontWeight);font-size:var(--gse-ui-button-text-fontSize);line-height:var(--gse-ui-button-text-lineHeight);color:var(--gse-ui-button-secondary-default-foregroundColor);background-color:var(--gse-ui-button-secondary-default-backgroundColor);width:100%;min-width:var(--gse-ui-button-icon-only-width);height:var(--gse-ui-button-height);padding:var(--gse-ui-button-padding);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:auto;cursor:pointer;border:none;border-radius:var(--gse-ui-button-borderRadius)}::slotted(input[type=button][disabled]),::slotted(input[type=submit][disabled]),::slotted(button[disabled]){opacity:var(--gse-ui-button-disabled-opacity);cursor:default}::slotted(input[type=button]:focus),::slotted(input[type=submit]:focus),::slotted(button:focus){outline:none}::slotted(input[type=button]:focus-visible:enabled),::slotted(input[type=submit]:focus-visible:enabled),::slotted(button:focus-visible:enabled){outline:3px solid #7b88f7;outline-offset:1px;border-radius:3px}::slotted(input[type=button]:hover:enabled),::slotted(input[type=submit]:hover:enabled),::slotted(button:hover:enabled){color:var(--gse-ui-button-secondary-hover-foregroundColor);background-color:var(--gse-ui-button-secondary-hover-backgroundColor)}::slotted(input[type=button]:active:enabled),::slotted(input[type=submit]:active:enabled),::slotted(button:active:enabled){color:var(--gse-ui-button-secondary-active-foregroundColor);background-color:var(--gse-ui-button-secondary-active-backgroundColor)}:host([accent=primary]) ::slotted(input[type=button]),:host([accent=primary]) ::slotted(input[type=submit]),:host([accent=primary]) ::slotted(button){color:var(--gse-ui-button-primary-default-foregroundColor);background-color:var(--gse-ui-button-primary-default-backgroundColor)}:host([accent=primary]) ::slotted(input[type=button]:hover:enabled),:host([accent=primary]) ::slotted(input[type=submit]:hover:enabled),:host([accent=primary]) ::slotted(button:hover:enabled){color:var(--gse-ui-button-primary-hover-foregroundColor);background-color:var(--gse-ui-button-primary-hover-backgroundColor)}:host([accent=primary]) ::slotted(input[type=button]:active:enabled),:host([accent=primary]) ::slotted(input[type=submit]:active:enabled),:host([accent=primary]) ::slotted(button:active:enabled){color:var(--gse-ui-button-primary-active-foregroundColor);background-color:var(--gse-ui-button-primary-active-backgroundColor)}:host([accent=tertiary]) ::slotted(input[type=button]),:host([accent=tertiary]) ::slotted(input[type=submit]),:host([accent=tertiary]) ::slotted(button){color:var(--gse-ui-button-tertiary-default-foregroundColor);background-color:var(--gse-ui-button-tertiary-default-backgroundColor);border-width:var(--gse-ui-button-tertiary-default-border-width);border-style:var(--gse-ui-button-tertiary-default-border-style);border-color:var(--gse-ui-button-tertiary-default-border-color)}:host([accent=tertiary]) ::slotted(input[type=button]:hover:enabled),:host([accent=tertiary]) ::slotted(input[type=submit]:hover:enabled),:host([accent=tertiary]) ::slotted(button:hover:enabled){color:var(--gse-ui-button-tertiary-hover-foregroundColor);background-color:var(--gse-ui-button-tertiary-hover-backgroundColor)}:host([accent=tertiary]) ::slotted(input[type=button]:active:enabled),:host([accent=tertiary]) ::slotted(input[type=submit]:active:enabled),:host([accent=tertiary]) ::slotted(button:active:enabled){color:var(--gse-ui-button-tertiary-active-foregroundColor);background-color:var(--gse-ui-button-tertiary-active-backgroundColor)}:host([accent=ghost]) ::slotted(input[type=button]),:host([accent=ghost]) ::slotted(input[type=submit]),:host([accent=ghost]) ::slotted(button){color:var(--gse-ui-button-ghost-default-foregroundColor);background-color:var(--gse-ui-button-ghost-default-backgroundColor)}:host([accent=ghost]) ::slotted(input[type=button]:hover:enabled),:host([accent=ghost]) ::slotted(input[type=submit]:hover:enabled),:host([accent=ghost]) ::slotted(button:hover:enabled){color:var(--gse-ui-button-ghost-hover-foregroundColor);background-color:var(--gse-ui-button-ghost-hover-backgroundColor)}:host([accent=ghost]) ::slotted(input[type=button]:active:enabled),:host([accent=ghost]) ::slotted(input[type=submit]:active:enabled),:host([accent=ghost]) ::slotted(button:active:enabled){color:var(--gse-ui-button-ghost-active-foregroundColor);background-color:var(--gse-ui-button-ghost-active-backgroundColor)}:host([accent=danger]) ::slotted(input[type=button]),:host([accent=danger]) ::slotted(input[type=submit]),:host([accent=danger]) ::slotted(button){color:var(--gse-ui-button-danger-default-foregroundColor);background-color:var(--gse-ui-button-danger-default-backgroundColor)}:host([accent=danger]) ::slotted(input[type=button]:hover:enabled),:host([accent=danger]) ::slotted(input[type=submit]:hover:enabled),:host([accent=danger]) ::slotted(button:hover:enabled){color:var(--gse-ui-button-danger-hover-foregroundColor);background-color:var(--gse-ui-button-danger-hover-backgroundColor)}:host([accent=danger]) ::slotted(input[type=button]:active:enabled),:host([accent=danger]) ::slotted(input[type=submit]:active:enabled),:host([accent=danger]) ::slotted(button:active:enabled){color:var(--gse-ui-button-danger-active-foregroundColor);background-color:var(--gse-ui-button-danger-active-backgroundColor)}:host([accent=inline]){min-width:initial}:host([accent=inline]) ::slotted(input[type=button]),:host([accent=inline]) ::slotted(input[type=submit]),:host([accent=inline]) ::slotted(button){height:initial;padding:0;color:var(--gse-ui-link-default-color);background:none;border:none}:host([accent=inline]) ::slotted(input[type=button][disabled]),:host([accent=inline]) ::slotted(input[type=submit][disabled]),:host([accent=inline]) ::slotted(button[disabled]){color:var(--gse-ui-link-disabled-color)}:host([accent=inline]) ::slotted(input[type=button]:hover:enabled),:host([accent=inline]) ::slotted(input[type=submit]:hover:enabled),:host([accent=inline]) ::slotted(button:hover:enabled){text-decoration:underline;color:var(--gse-ui-link-hover-color);background:none}:host([accent=inline]) ::slotted(input[type=button]:active:enabled),:host([accent=inline]) ::slotted(input[type=submit]:active:enabled),:host([accent=inline]) ::slotted(button:active:enabled){text-decoration:underline;color:var(--gse-ui-link-active-color);background:none}";export{u as gux_button_slot_beta}
|
@@ -1 +1 @@
|
|
1
|
-
import{r as t,h as o,g as e}from"./p-7d26b2e1.js";import{t as r}from"./p-
|
1
|
+
import{r as t,h as o,g as e}from"./p-7d26b2e1.js";import{t as r}from"./p-e1558f84.js";import{b as n}from"./p-deee079e.js";import"./p-8a133b9b.js";const i={clear:"Clear"},s=class{constructor(o){t(this,o)}async componentWillLoad(){r(this.root),this.i18n=await n(this.root,i)}render(){return o("button",{tabIndex:-1,type:"button",title:this.i18n("clear")},o("gux-icon",{"icon-name":"close",decorative:!0}))}static get delegatesFocus(){return!0}get root(){return e(this)}};s.style="button{flex:0 1 auto;align-self:auto;order:0;padding:2px;color:#596373;background:transparent;border:none;border-radius:4px}button:not(:disabled):focus-visible,button:not(:disabled):hover{color:#2e394c;cursor:pointer}button gux-icon{width:12px;height:12px;margin:4px;border-radius:4px}button:focus{outline:none}button:focus-visible:enabled gux-icon{outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}";export{s as gux_form_field_input_clear_button}
|
@@ -1 +1 @@
|
|
1
|
-
import{r as g,c as a,h as o,g as r}from"./p-7d26b2e1.js";import{b as u}from"./p-deee079e.js";import{t as l}from"./p-af4a6b41.js";import"./p-8a133b9b.js";const e={tag:"tag with label: {label}","tag-disabled":"disabled tag with label: {label}","remove-tag":"Remove tag with label: {label}"},c=class{constructor(o){g(this,o),this.guxdelete=a(this,"guxdelete",7),this.color="default",this.accent="default",this.value=void 0,this.disabled=!1,this.removable=!1,this.label=void 0}onKeyDown(g){switch(g.key){case"Backspace":case"Delete":this.removeTag()}}removeTag(){!this.disabled&&this.removable&&this.guxdelete.emit(this.value)}onSlotChange(g){const a=g.composedPath()[0].assignedNodes();this.label=a.map((g=>g.textContent)).join("")}renderTagTitle(){return o("gux-tooltip-title",null,o("span",null,o("slot",{"aria-hidden":"true",onSlotchange:this.onSlotChange.bind(this)})))}renderSrText(){return o("div",{class:"gux-sr-only"},this.i18n(this.disabled?"tag-disabled":"tag",{label:this.label}))}renderRemoveButton(){if(this.removable)return o("button",{class:"gux-tag-remove-button",onClick:this.removeTag.bind(this),type:"button",disabled:this.disabled},o("gux-icon",{class:"gux-tag-remove-icon","icon-name":"close","screenreader-text":this.i18n("remove-tag",{label:this.label})}))}componentWillLoad(){l(this.root,{variant:this.removable?"removable":"permenant"})}async componentWillRender(){this.i18n=await u(this.root,e)}render(){return o("div",{class:{"gux-tag":!0,[`gux-${this.color}`]:!0,[`gux-accent-${this.accent}`]:!0,"gux-disabled":this.disabled},"aria-disabled":this.disabled.toString()},this.renderTagTitle(),this.renderSrText(),this.renderRemoveButton())}get root(){return r(this)}};c.style=":host{display:inline-block}.gux-tag{display:flex;flex-direction:row;flex-wrap:nowrap;align-content:stretch;align-items:center;justify-content:flex-start;padding:2px 8px;font-size:12px;font-weight:bold;color:#fdfdfd;background-color:#2e394c;border-radius:4px}.gux-tag gux-tooltip-title{white-space:nowrap;cursor:default}.gux-tag gux-tooltip-title ::slotted(gux-icon){height:20px;font-size:16px}.gux-tag .gux-sr-only:not(:focus):not(:active){position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}.gux-tag .gux-tag-remove-button{all:unset;display:flex;align-content:center;align-items:center;justify-content:center;margin-left:8px}.gux-tag .gux-tag-remove-button:not(:disabled):hover{cursor:pointer}.gux-tag .gux-tag-remove-button .gux-tag-remove-icon{width:16px;height:16px;border-radius:25%}.gux-tag .gux-tag-remove-button:focus-within .gux-tag-remove-icon{outline:2px solid #aac9ff;outline-offset:0}.gux-tag.gux-disabled{background-color:rgba(46, 57, 76, 0.5)}.gux-tag.gux-default{background-color:#2e394c}.gux-tag.gux-default.gux-disabled{background-color:rgba(46, 57, 76, 0.5)}.gux-tag.gux-default-subtle{color:#2e394c;background-color:#e2e6ee}.gux-tag.gux-default-subtle.gux-disabled{color:rgba(46, 57, 76, 0.5);background-color:rgba(226, 230, 238, 0.5)}.gux-tag.gux-navy{background-color:#203b73}.gux-tag.gux-navy.gux-disabled{background-color:rgba(32, 59, 115, 0.5)}.gux-tag.gux-blue{color:#2e394c;background-color:#75a8ff}.gux-tag.gux-blue.gux-disabled{color:rgba(46, 57, 76, 0.5);background-color:rgba(117, 168, 255, 0.5)}.gux-tag.gux-electric-purple{background-color:#8452cf}.gux-tag.gux-electric-purple.gux-disabled{background-color:rgba(132, 82, 207, 0.5)}.gux-tag.gux-aqua-green{color:#202937;background-color:#1da8b3}.gux-tag.gux-aqua-green.gux-disabled{color:rgba(32, 41, 55, 0.5);background-color:rgba(29, 168, 179, 0.5)}.gux-tag.gux-fuchsia{color:#000000;background-color:#cc3ebe}.gux-tag.gux-fuchsia.gux-disabled{color:rgba(0, 0, 0, 0.5);background-color:rgba(204, 62, 190, 0.5)}.gux-tag.gux-dark-purple{background-color:#5e5782}.gux-tag.gux-dark-purple.gux-disabled{background-color:rgba(94, 87, 130, 0.5)}.gux-tag.gux-bubblegum-pink{color:#2e394c;background-color:#ff8fdd}.gux-tag.gux-bubblegum-pink.gux-disabled{color:rgba(46, 57, 76, 0.5);background-color:rgba(255, 143, 221, 0.5)}.gux-tag.gux-olive-green{color:#151d28;background-color:#868c1e}.gux-tag.gux-olive-green.gux-disabled{color:rgba(21, 29, 40, 0.5);background-color:rgba(134, 140, 30, 0.5)}.gux-tag.gux-lilac{color:#2e394c;background-color:#b5b5eb}.gux-tag.gux-lilac.gux-disabled{color:rgba(46, 57, 76, 0.5);background-color:rgba(181, 181, 235, 0.5)}.gux-tag.gux-alert-yellow-green{color:#2e394c;background-color:#ddd933}.gux-tag.gux-alert-yellow-green.gux-disabled{color:rgba(46, 57, 76, 0.5);background-color:rgba(221, 217, 51, 0.5)}.gux-tag.gux-blue-10{background-color:#172b52}.gux-tag.gux-blue-10.gux-disabled{background-color:rgba(23, 43, 82, 0.5)}.gux-tag.gux-blue-20{background-color:#1c3363}.gux-tag.gux-blue-20.gux-disabled{background-color:rgba(28, 51, 99, 0.5)}.gux-tag.gux-blue-30{background-color:#203b73}.gux-tag.gux-blue-30.gux-disabled{background-color:rgba(32, 59, 115, 0.5)}.gux-tag.gux-blue-40{background-color:#23478f}.gux-tag.gux-blue-40.gux-disabled{background-color:rgba(35, 71, 143, 0.5)}.gux-tag.gux-blue-50{background-color:#2754ac}.gux-tag.gux-blue-50.gux-disabled{background-color:rgba(39, 84, 172, 0.5)}.gux-tag.gux-blue-60{background-color:#2a60c8}.gux-tag.gux-blue-60.gux-disabled{background-color:rgba(42, 96, 200, 0.5)}.gux-tag.gux-blue-70{color:#151d28;background-color:#5084e3}.gux-tag.gux-blue-70.gux-disabled{color:rgba(21, 29, 40, 0.5);background-color:rgba(80, 132, 227, 0.5)}.gux-tag.gux-blue-80{color:#2e394c;background-color:#75a8ff}.gux-tag.gux-blue-80.gux-disabled{color:rgba(46, 57, 76, 0.5);background-color:rgba(117, 168, 255, 0.5)}.gux-tag.gux-blue-90{color:#2e394c;background-color:#aac9ff}.gux-tag.gux-blue-90.gux-disabled{color:rgba(46, 57, 76, 0.5);background-color:rgba(170, 201, 255, 0.5)}.gux-tag.gux-blue-100{color:#2e394c;background-color:#deeaff}.gux-tag.gux-blue-100.gux-disabled{color:rgba(46, 57, 76, 0.5);background-color:rgba(222, 234, 255, 0.5)}.gux-tag.gux-alert-red-10{background-color:#520404}.gux-tag.gux-alert-red-10.gux-disabled{background-color:rgba(82, 4, 4, 0.5)}.gux-tag.gux-alert-red-20{background-color:#700505}.gux-tag.gux-alert-red-20.gux-disabled{background-color:rgba(112, 5, 5, 0.5)}.gux-tag.gux-alert-red-30{background-color:#8f0707}.gux-tag.gux-alert-red-30.gux-disabled{background-color:rgba(143, 7, 7, 0.5)}.gux-tag.gux-alert-red-40{background-color:#ad0808}.gux-tag.gux-alert-red-40.gux-disabled{background-color:rgba(173, 8, 8, 0.5)}.gux-tag.gux-alert-red-50{background-color:#cc0a0a}.gux-tag.gux-alert-red-50.gux-disabled{background-color:rgba(204, 10, 10, 0.5)}.gux-tag.gux-alert-red-60{background-color:#ea0b0b}.gux-tag.gux-alert-red-60.gux-disabled{background-color:rgba(234, 11, 11, 0.5)}.gux-tag.gux-alert-red-70{color:#000000;background-color:#ef4343}.gux-tag.gux-alert-red-70.gux-disabled{color:rgba(0, 0, 0, 0.5);background-color:rgba(239, 67, 67, 0.5)}.gux-tag.gux-alert-red-80{color:#283243;background-color:#f37a7a}.gux-tag.gux-alert-red-80.gux-disabled{color:rgba(40, 50, 67, 0.5);background-color:rgba(243, 122, 122, 0.5)}.gux-tag.gux-alert-red-90{color:#2e394c;background-color:#f8b2b2}.gux-tag.gux-alert-red-90.gux-disabled{color:rgba(46, 57, 76, 0.5);background-color:rgba(248, 178, 178, 0.5)}.gux-tag.gux-alert-red-100{color:#2e394c;background-color:#fceaea}.gux-tag.gux-alert-red-100.gux-disabled{color:rgba(46, 57, 76, 0.5);background-color:rgba(252, 234, 234, 0.5)}.gux-tag.gux-alert-green-10{background-color:#0d3d00}.gux-tag.gux-alert-green-10.gux-disabled{background-color:rgba(13, 61, 0, 0.5)}.gux-tag.gux-alert-green-20{background-color:#164b08}.gux-tag.gux-alert-green-20.gux-disabled{background-color:rgba(22, 75, 8, 0.5)}.gux-tag.gux-alert-green-30{background-color:#205a10}.gux-tag.gux-alert-green-30.gux-disabled{background-color:rgba(32, 90, 16, 0.5)}.gux-tag.gux-alert-green-40{background-color:#296817}.gux-tag.gux-alert-green-40.gux-disabled{background-color:rgba(41, 104, 23, 0.5)}.gux-tag.gux-alert-green-50{background-color:#33771f}.gux-tag.gux-alert-green-50.gux-disabled{background-color:rgba(51, 119, 31, 0.5)}.gux-tag.gux-alert-green-60{background-color:#3c8527}.gux-tag.gux-alert-green-60.gux-disabled{background-color:rgba(60, 133, 39, 0.5)}.gux-tag.gux-alert-green-70{color:#202937;background-color:#69a358}.gux-tag.gux-alert-green-70.gux-disabled{color:rgba(32, 41, 55, 0.5);background-color:rgba(105, 163, 88, 0.5)}.gux-tag.gux-alert-green-80{color:#2e394c;background-color:#95c189}.gux-tag.gux-alert-green-80.gux-disabled{color:rgba(46, 57, 76, 0.5);background-color:rgba(149, 193, 137, 0.5)}.gux-tag.gux-alert-green-90{color:#2e394c;background-color:#c2deb9}.gux-tag.gux-alert-green-90.gux-disabled{color:rgba(46, 57, 76, 0.5);background-color:rgba(194, 222, 185, 0.5)}.gux-tag.gux-alert-green-100{color:#2e394c;background-color:#eefcea}.gux-tag.gux-alert-green-100.gux-disabled{color:rgba(46, 57, 76, 0.5);background-color:rgba(238, 252, 234, 0.5)}.gux-tag.gux-alert-yellow-10{background-color:#523800}.gux-tag.gux-alert-yellow-10.gux-disabled{background-color:rgba(82, 56, 0, 0.5)}.gux-tag.gux-alert-yellow-20{background-color:#755000}.gux-tag.gux-alert-yellow-20.gux-disabled{background-color:rgba(117, 80, 0, 0.5)}.gux-tag.gux-alert-yellow-30{background-color:#976700}.gux-tag.gux-alert-yellow-30.gux-disabled{background-color:rgba(151, 103, 0, 0.5)}.gux-tag.gux-alert-yellow-40{color:#151d28;background-color:#ba7f00}.gux-tag.gux-alert-yellow-40.gux-disabled{color:rgba(21, 29, 40, 0.5);background-color:rgba(186, 127, 0, 0.5)}.gux-tag.gux-alert-yellow-50{color:#2e394c;background-color:#dc9600}.gux-tag.gux-alert-yellow-50.gux-disabled{color:rgba(46, 57, 76, 0.5);background-color:rgba(220, 150, 0, 0.5)}.gux-tag.gux-alert-yellow-60{color:#2e394c;background-color:#ffae00}.gux-tag.gux-alert-yellow-60.gux-disabled{color:rgba(46, 57, 76, 0.5);background-color:rgba(255, 174, 0, 0.5)}.gux-tag.gux-alert-yellow-70{color:#2e394c;background-color:#fbbe3b}.gux-tag.gux-alert-yellow-70.gux-disabled{color:rgba(46, 57, 76, 0.5);background-color:rgba(251, 190, 59, 0.5)}.gux-tag.gux-alert-yellow-80{color:#2e394c;background-color:#fcd276}.gux-tag.gux-alert-yellow-80.gux-disabled{color:rgba(46, 57, 76, 0.5);background-color:rgba(252, 210, 118, 0.5)}.gux-tag.gux-alert-yellow-90{color:#2e394c;background-color:#fce5b1}.gux-tag.gux-alert-yellow-90.gux-disabled{color:rgba(46, 57, 76, 0.5);background-color:rgba(252, 229, 177, 0.5)}.gux-tag.gux-alert-yellow-100{color:#2e394c;background-color:#fdf8ec}.gux-tag.gux-alert-yellow-100.gux-disabled{color:rgba(46, 57, 76, 0.5);background-color:rgba(253, 248, 236, 0.5)}.gux-tag.gux-brand-orange{color:#151d28;background-color:#ff4f1f}.gux-tag.gux-brand-orange.gux-disabled{color:rgba(21, 29, 40, 0.5);background-color:rgba(255, 79, 31, 0.5)}.gux-tag.gux-brand-teal{color:#283243;background-color:#00ae9e}.gux-tag.gux-brand-teal.gux-disabled{color:rgba(40, 50, 67, 0.5);background-color:rgba(0, 174, 158, 0.5)}.gux-tag.gux-brand-navy{background-color:#23395d}.gux-tag.gux-brand-navy.gux-disabled{background-color:rgba(35, 57, 93, 0.5)}.gux-tag.gux-brand-light-blue{color:#151d28;background-color:#3b90aa}.gux-tag.gux-brand-light-blue.gux-disabled{color:rgba(21, 29, 40, 0.5);background-color:rgba(59, 144, 170, 0.5)}.gux-tag.gux-brand-yellow{color:#2e394c;background-color:#ff8f14}.gux-tag.gux-brand-yellow.gux-disabled{color:rgba(46, 57, 76, 0.5);background-color:rgba(255, 143, 20, 0.5)}";export{c as gux_tag_beta}
|
1
|
+
import{r as g,c as o,h as a,g as r}from"./p-7d26b2e1.js";import{b as u}from"./p-deee079e.js";import{t as l}from"./p-e1558f84.js";import"./p-8a133b9b.js";const e={tag:"tag with label: {label}","tag-disabled":"disabled tag with label: {label}","remove-tag":"Remove tag with label: {label}"},c=class{constructor(a){g(this,a),this.guxdelete=o(this,"guxdelete",7),this.color="default",this.accent="default",this.value=void 0,this.disabled=!1,this.removable=!1,this.label=void 0}onKeyDown(g){switch(g.key){case"Backspace":case"Delete":this.removeTag()}}removeTag(){!this.disabled&&this.removable&&this.guxdelete.emit(this.value)}onSlotChange(g){const o=g.composedPath()[0].assignedNodes();this.label=o.map((g=>g.textContent)).join("")}renderTagTitle(){return a("gux-tooltip-title",null,a("span",null,a("slot",{"aria-hidden":"true",onSlotchange:this.onSlotChange.bind(this)})))}renderSrText(){return a("div",{class:"gux-sr-only"},this.i18n(this.disabled?"tag-disabled":"tag",{label:this.label}))}renderRemoveButton(){if(this.removable)return a("button",{class:"gux-tag-remove-button",onClick:this.removeTag.bind(this),type:"button",disabled:this.disabled},a("gux-icon",{class:"gux-tag-remove-icon","icon-name":"close","screenreader-text":this.i18n("remove-tag",{label:this.label})}))}componentWillLoad(){l(this.root,{variant:this.removable?"removable":"permenant"})}async componentWillRender(){this.i18n=await u(this.root,e)}render(){return a("div",{class:{"gux-tag":!0,[`gux-${this.color}`]:!0,[`gux-accent-${this.accent}`]:!0,"gux-disabled":this.disabled},"aria-disabled":this.disabled.toString()},this.renderTagTitle(),this.renderSrText(),this.renderRemoveButton())}get root(){return r(this)}};c.style=":host{display:inline-block}.gux-tag{display:flex;flex-direction:row;flex-wrap:nowrap;align-content:stretch;align-items:center;justify-content:flex-start;padding:2px 8px;font-size:12px;font-weight:bold;color:#fdfdfd;background-color:#2e394c;border-radius:4px}.gux-tag gux-tooltip-title{white-space:nowrap;cursor:default}.gux-tag gux-tooltip-title ::slotted(gux-icon){height:20px;font-size:16px}.gux-tag .gux-sr-only:not(:focus):not(:active){position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}.gux-tag .gux-tag-remove-button{all:unset;display:flex;align-content:center;align-items:center;justify-content:center;margin-left:8px}.gux-tag .gux-tag-remove-button:not(:disabled):hover{cursor:pointer}.gux-tag .gux-tag-remove-button .gux-tag-remove-icon{width:16px;height:16px;border-radius:25%}.gux-tag .gux-tag-remove-button:focus-within .gux-tag-remove-icon{outline:2px solid #aac9ff;outline-offset:0}.gux-tag.gux-disabled{background-color:rgba(46, 57, 76, 0.5)}.gux-tag.gux-default{background-color:#2e394c}.gux-tag.gux-default.gux-disabled{background-color:rgba(46, 57, 76, 0.5)}.gux-tag.gux-default-subtle{color:#2e394c;background-color:#e2e6ee}.gux-tag.gux-default-subtle.gux-disabled{color:rgba(46, 57, 76, 0.5);background-color:rgba(226, 230, 238, 0.5)}.gux-tag.gux-navy{background-color:#203b73}.gux-tag.gux-navy.gux-disabled{background-color:rgba(32, 59, 115, 0.5)}.gux-tag.gux-blue{color:#2e394c;background-color:#75a8ff}.gux-tag.gux-blue.gux-disabled{color:rgba(46, 57, 76, 0.5);background-color:rgba(117, 168, 255, 0.5)}.gux-tag.gux-electric-purple{background-color:#8452cf}.gux-tag.gux-electric-purple.gux-disabled{background-color:rgba(132, 82, 207, 0.5)}.gux-tag.gux-aqua-green{color:#202937;background-color:#1da8b3}.gux-tag.gux-aqua-green.gux-disabled{color:rgba(32, 41, 55, 0.5);background-color:rgba(29, 168, 179, 0.5)}.gux-tag.gux-fuchsia{color:#000000;background-color:#cc3ebe}.gux-tag.gux-fuchsia.gux-disabled{color:rgba(0, 0, 0, 0.5);background-color:rgba(204, 62, 190, 0.5)}.gux-tag.gux-dark-purple{background-color:#5e5782}.gux-tag.gux-dark-purple.gux-disabled{background-color:rgba(94, 87, 130, 0.5)}.gux-tag.gux-bubblegum-pink{color:#2e394c;background-color:#ff8fdd}.gux-tag.gux-bubblegum-pink.gux-disabled{color:rgba(46, 57, 76, 0.5);background-color:rgba(255, 143, 221, 0.5)}.gux-tag.gux-olive-green{color:#151d28;background-color:#868c1e}.gux-tag.gux-olive-green.gux-disabled{color:rgba(21, 29, 40, 0.5);background-color:rgba(134, 140, 30, 0.5)}.gux-tag.gux-lilac{color:#2e394c;background-color:#b5b5eb}.gux-tag.gux-lilac.gux-disabled{color:rgba(46, 57, 76, 0.5);background-color:rgba(181, 181, 235, 0.5)}.gux-tag.gux-alert-yellow-green{color:#2e394c;background-color:#ddd933}.gux-tag.gux-alert-yellow-green.gux-disabled{color:rgba(46, 57, 76, 0.5);background-color:rgba(221, 217, 51, 0.5)}.gux-tag.gux-blue-10{background-color:#172b52}.gux-tag.gux-blue-10.gux-disabled{background-color:rgba(23, 43, 82, 0.5)}.gux-tag.gux-blue-20{background-color:#1c3363}.gux-tag.gux-blue-20.gux-disabled{background-color:rgba(28, 51, 99, 0.5)}.gux-tag.gux-blue-30{background-color:#203b73}.gux-tag.gux-blue-30.gux-disabled{background-color:rgba(32, 59, 115, 0.5)}.gux-tag.gux-blue-40{background-color:#23478f}.gux-tag.gux-blue-40.gux-disabled{background-color:rgba(35, 71, 143, 0.5)}.gux-tag.gux-blue-50{background-color:#2754ac}.gux-tag.gux-blue-50.gux-disabled{background-color:rgba(39, 84, 172, 0.5)}.gux-tag.gux-blue-60{background-color:#2a60c8}.gux-tag.gux-blue-60.gux-disabled{background-color:rgba(42, 96, 200, 0.5)}.gux-tag.gux-blue-70{color:#151d28;background-color:#5084e3}.gux-tag.gux-blue-70.gux-disabled{color:rgba(21, 29, 40, 0.5);background-color:rgba(80, 132, 227, 0.5)}.gux-tag.gux-blue-80{color:#2e394c;background-color:#75a8ff}.gux-tag.gux-blue-80.gux-disabled{color:rgba(46, 57, 76, 0.5);background-color:rgba(117, 168, 255, 0.5)}.gux-tag.gux-blue-90{color:#2e394c;background-color:#aac9ff}.gux-tag.gux-blue-90.gux-disabled{color:rgba(46, 57, 76, 0.5);background-color:rgba(170, 201, 255, 0.5)}.gux-tag.gux-blue-100{color:#2e394c;background-color:#deeaff}.gux-tag.gux-blue-100.gux-disabled{color:rgba(46, 57, 76, 0.5);background-color:rgba(222, 234, 255, 0.5)}.gux-tag.gux-alert-red-10{background-color:#520404}.gux-tag.gux-alert-red-10.gux-disabled{background-color:rgba(82, 4, 4, 0.5)}.gux-tag.gux-alert-red-20{background-color:#700505}.gux-tag.gux-alert-red-20.gux-disabled{background-color:rgba(112, 5, 5, 0.5)}.gux-tag.gux-alert-red-30{background-color:#8f0707}.gux-tag.gux-alert-red-30.gux-disabled{background-color:rgba(143, 7, 7, 0.5)}.gux-tag.gux-alert-red-40{background-color:#ad0808}.gux-tag.gux-alert-red-40.gux-disabled{background-color:rgba(173, 8, 8, 0.5)}.gux-tag.gux-alert-red-50{background-color:#cc0a0a}.gux-tag.gux-alert-red-50.gux-disabled{background-color:rgba(204, 10, 10, 0.5)}.gux-tag.gux-alert-red-60{background-color:#ea0b0b}.gux-tag.gux-alert-red-60.gux-disabled{background-color:rgba(234, 11, 11, 0.5)}.gux-tag.gux-alert-red-70{color:#000000;background-color:#ef4343}.gux-tag.gux-alert-red-70.gux-disabled{color:rgba(0, 0, 0, 0.5);background-color:rgba(239, 67, 67, 0.5)}.gux-tag.gux-alert-red-80{color:#283243;background-color:#f37a7a}.gux-tag.gux-alert-red-80.gux-disabled{color:rgba(40, 50, 67, 0.5);background-color:rgba(243, 122, 122, 0.5)}.gux-tag.gux-alert-red-90{color:#2e394c;background-color:#f8b2b2}.gux-tag.gux-alert-red-90.gux-disabled{color:rgba(46, 57, 76, 0.5);background-color:rgba(248, 178, 178, 0.5)}.gux-tag.gux-alert-red-100{color:#2e394c;background-color:#fceaea}.gux-tag.gux-alert-red-100.gux-disabled{color:rgba(46, 57, 76, 0.5);background-color:rgba(252, 234, 234, 0.5)}.gux-tag.gux-alert-green-10{background-color:#0d3d00}.gux-tag.gux-alert-green-10.gux-disabled{background-color:rgba(13, 61, 0, 0.5)}.gux-tag.gux-alert-green-20{background-color:#164b08}.gux-tag.gux-alert-green-20.gux-disabled{background-color:rgba(22, 75, 8, 0.5)}.gux-tag.gux-alert-green-30{background-color:#205a10}.gux-tag.gux-alert-green-30.gux-disabled{background-color:rgba(32, 90, 16, 0.5)}.gux-tag.gux-alert-green-40{background-color:#296817}.gux-tag.gux-alert-green-40.gux-disabled{background-color:rgba(41, 104, 23, 0.5)}.gux-tag.gux-alert-green-50{background-color:#33771f}.gux-tag.gux-alert-green-50.gux-disabled{background-color:rgba(51, 119, 31, 0.5)}.gux-tag.gux-alert-green-60{background-color:#3c8527}.gux-tag.gux-alert-green-60.gux-disabled{background-color:rgba(60, 133, 39, 0.5)}.gux-tag.gux-alert-green-70{color:#202937;background-color:#69a358}.gux-tag.gux-alert-green-70.gux-disabled{color:rgba(32, 41, 55, 0.5);background-color:rgba(105, 163, 88, 0.5)}.gux-tag.gux-alert-green-80{color:#2e394c;background-color:#95c189}.gux-tag.gux-alert-green-80.gux-disabled{color:rgba(46, 57, 76, 0.5);background-color:rgba(149, 193, 137, 0.5)}.gux-tag.gux-alert-green-90{color:#2e394c;background-color:#c2deb9}.gux-tag.gux-alert-green-90.gux-disabled{color:rgba(46, 57, 76, 0.5);background-color:rgba(194, 222, 185, 0.5)}.gux-tag.gux-alert-green-100{color:#2e394c;background-color:#eefcea}.gux-tag.gux-alert-green-100.gux-disabled{color:rgba(46, 57, 76, 0.5);background-color:rgba(238, 252, 234, 0.5)}.gux-tag.gux-alert-yellow-10{background-color:#523800}.gux-tag.gux-alert-yellow-10.gux-disabled{background-color:rgba(82, 56, 0, 0.5)}.gux-tag.gux-alert-yellow-20{background-color:#755000}.gux-tag.gux-alert-yellow-20.gux-disabled{background-color:rgba(117, 80, 0, 0.5)}.gux-tag.gux-alert-yellow-30{background-color:#976700}.gux-tag.gux-alert-yellow-30.gux-disabled{background-color:rgba(151, 103, 0, 0.5)}.gux-tag.gux-alert-yellow-40{color:#151d28;background-color:#ba7f00}.gux-tag.gux-alert-yellow-40.gux-disabled{color:rgba(21, 29, 40, 0.5);background-color:rgba(186, 127, 0, 0.5)}.gux-tag.gux-alert-yellow-50{color:#2e394c;background-color:#dc9600}.gux-tag.gux-alert-yellow-50.gux-disabled{color:rgba(46, 57, 76, 0.5);background-color:rgba(220, 150, 0, 0.5)}.gux-tag.gux-alert-yellow-60{color:#2e394c;background-color:#ffae00}.gux-tag.gux-alert-yellow-60.gux-disabled{color:rgba(46, 57, 76, 0.5);background-color:rgba(255, 174, 0, 0.5)}.gux-tag.gux-alert-yellow-70{color:#2e394c;background-color:#fbbe3b}.gux-tag.gux-alert-yellow-70.gux-disabled{color:rgba(46, 57, 76, 0.5);background-color:rgba(251, 190, 59, 0.5)}.gux-tag.gux-alert-yellow-80{color:#2e394c;background-color:#fcd276}.gux-tag.gux-alert-yellow-80.gux-disabled{color:rgba(46, 57, 76, 0.5);background-color:rgba(252, 210, 118, 0.5)}.gux-tag.gux-alert-yellow-90{color:#2e394c;background-color:#fce5b1}.gux-tag.gux-alert-yellow-90.gux-disabled{color:rgba(46, 57, 76, 0.5);background-color:rgba(252, 229, 177, 0.5)}.gux-tag.gux-alert-yellow-100{color:#2e394c;background-color:#fdf8ec}.gux-tag.gux-alert-yellow-100.gux-disabled{color:rgba(46, 57, 76, 0.5);background-color:rgba(253, 248, 236, 0.5)}.gux-tag.gux-brand-orange{color:#151d28;background-color:#ff4f1f}.gux-tag.gux-brand-orange.gux-disabled{color:rgba(21, 29, 40, 0.5);background-color:rgba(255, 79, 31, 0.5)}.gux-tag.gux-brand-teal{color:#283243;background-color:#00ae9e}.gux-tag.gux-brand-teal.gux-disabled{color:rgba(40, 50, 67, 0.5);background-color:rgba(0, 174, 158, 0.5)}.gux-tag.gux-brand-navy{background-color:#23395d}.gux-tag.gux-brand-navy.gux-disabled{background-color:rgba(35, 57, 93, 0.5)}.gux-tag.gux-brand-light-blue{color:#151d28;background-color:#3b90aa}.gux-tag.gux-brand-light-blue.gux-disabled{color:rgba(21, 29, 40, 0.5);background-color:rgba(59, 144, 170, 0.5)}.gux-tag.gux-brand-yellow{color:#2e394c;background-color:#ff8f14}.gux-tag.gux-brand-yellow.gux-disabled{color:rgba(46, 57, 76, 0.5);background-color:rgba(255, 143, 20, 0.5)}";export{c as gux_tag_beta}
|
@@ -1 +1 @@
|
|
1
|
-
import{r as t,h as o,g as i}from"./p-7d26b2e1.js";import{t as s}from"./p-
|
1
|
+
import{r as t,h as o,g as i}from"./p-7d26b2e1.js";import{t as s}from"./p-e1558f84.js";import{b as e}from"./p-deee079e.js";import"./p-8a133b9b.js";const n={dismiss:"Dismiss"},r=class{constructor(o){t(this,o),this.position="absolute"}async componentWillLoad(){s(this.root,{variant:this.position}),this.i18n=await e(this.root,n)}render(){return o("button",{class:"inherit"==this.position?"gux-inherit":void 0,type:"button",title:this.i18n("dismiss")},o("gux-icon",{"icon-name":"close","screenreader-text":this.i18n("dismiss")}))}static get delegatesFocus(){return!0}get root(){return i(this)}};r.style="button{position:absolute;top:0;right:0;padding:2px;color:#596373;background:transparent;border:none;border-radius:4px}button.gux-inherit{position:inherit}button:not(:disabled):focus-visible,button:not(:disabled):hover{color:#2e394c;cursor:pointer}button gux-icon{width:16px;height:16px;margin:4px;border-radius:4px}button:focus{outline:none}button:focus gux-icon{outline:none}button:focus-visible:enabled gux-icon{outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}";export{r as gux_dismiss_button}
|
@@ -1 +1 @@
|
|
1
|
-
import{r as t,c as e,f as i,h as s,g as n}from"./p-7d26b2e1.js";import{O as o}from"./p-9d18d475.js";import{b as r}from"./p-deee079e.js";import{s as l}from"./p-d176c2ae.js";import{b as u}from"./p-091f51f6.js";import{o as a}from"./p-3f5341ea.js";import{t as d}from"./p-af4a6b41.js";import{g as h}from"./p-55cf6d81.js";import{O as c}from"./p-f34ce7dc.js";import"./p-8a133b9b.js";const x={textInputResults:"Type to filter dropdown results",noSelection:"Select...",dropdown:"Dropdown",numberSelected:"{numberSelected} selected",pressEnterToCreate:"Press Enter to create new option, {textInputValue}"};var g=function(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var l=t.length-1;l>=0;l--)(n=t[l])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);return o>3&&r&&Object.defineProperty(e,i,r),r};const p=class{constructor(i){t(this,i),this.guxcreateoption=e(this,"guxcreateoption",7),this.guxexpanded=e(this,"guxexpanded",7),this.guxcollapsed=e(this,"guxcollapsed",7),this.guxfilter=e(this,"guxfilter",7),this.value=void 0,this.disabled=!1,this.required=!1,this.loading=!1,this.placeholder=void 0,this.filterable=!1,this.filterType="none",this.hasError=!1,this.hasCreate=!1,this.expanded=!1,this.textInput=""}onMutation(){var t;this.listboxElement||(this.listboxElement=null===(t=this.root)||void 0===t?void 0:t.querySelector("gux-listbox-multi"),this.applyListboxEventListeners())}onInternalExpanded(t){t.stopPropagation(),this.guxexpanded.emit()}onInternalCollapsed(t){t.stopPropagation(),this.guxcollapsed.emit()}focusSelectedItemAfterRender(t){t&&this.listboxElement&&u((()=>{this.hasTextInput()?this.textInputElement.focus():this.listboxElement.focus()})),t||(this.textInput="")}watchValue(t){this.validateValue(t,this.listboxElement)}handleFilter(t){this.guxfilter.emit(t)}getSelectedValues(){var t;return Promise.resolve((null===(t=this.value)||void 0===t?void 0:t.split(","))||[])}onKeydown(t){switch(t.key){case"Escape":return this.hasTextInput()&&document.activeElement===this.listboxElement?this.textInputElement.focus():void this.collapseListbox("focusFieldButton");case"Tab":return this.shiftTabFromFilterListbox(t)?(t.preventDefault(),this.textInputElement.focus()):this.shiftTabFromExpandedFilterInput(t)?(t.preventDefault(),this.collapseListbox("focusFieldButton")):void this.collapseListbox("noFocusChange");case"ArrowDown":return void(this.activeElementNotListbox()&&(t.preventDefault(),this.expanded=!0));case"Enter":this.canCreateNewOption()&&this.isActiveElement()&&this.emitCreateOption()}}onInternallistboxoptionsupdated(t){t.stopPropagation(),i(this.root)}onClearselected(t){t.stopPropagation(),this.updateValue(""),this.listboxElement&&(this.listboxElement.value=void 0),this.validateValue(this.value,this.listboxElement),this.fieldButtonElement.focus()}onCreatenewoption(t){t.stopPropagation(),this.emitCreateOption()}onBlur(t){this.stopPropagationOfInternalFocusEvents(t)}onFocus(t){this.stopPropagationOfInternalFocusEvents(t)}onFocusout(t){this.stopPropagationOfInternalFocusEvents(t)}onFocusin(t){this.stopPropagationOfInternalFocusEvents(t)}onClickOutside(){this.collapseListbox("noFocusChange")}connectedCallback(){var t;this.listboxElement=null===(t=this.root)||void 0===t?void 0:t.querySelector("gux-listbox-multi"),this.listboxElement&&(this.validateValue(this.value,this.listboxElement),this.hasCreate=!!this.root.querySelector("gux-create-option"))}async componentWillLoad(){d(this.root),this.i18n=await r(this.root,x),a(this.root,(()=>{i(this.root)}))}componentDidLoad(){this.applyListboxEventListeners()}componentWillRender(){this.listboxElement&&(this.validateValue(this.value,this.listboxElement),this.listboxElement.loading=this.loading,this.listboxElement.filterType=this.filterType,this.listboxElement.textInput=this.textInput)}validateValue(t,e){void 0!==t?this.getOptionElementByValue(t)?e.value=t:this.value=void 0:e&&(e.value=t)}hasTextInput(){return this.isFilterable()||this.hasCreate}applyListboxEventListeners(){var t,e;null===(t=this.listboxElement)||void 0===t||t.addEventListener("input",(t=>{t.stopPropagation(),this.updateValue(t.target.value)})),null===(e=this.listboxElement)||void 0===e||e.addEventListener("change",(t=>{t.stopPropagation()}))}isFilterable(){return this.filterable||"custom"===this.filterType||"starts-with"===this.filterType}stopPropagationOfInternalFocusEvents(t){if(this.root.contains(t.relatedTarget))return t.stopImmediatePropagation()}getOptionElementByValue(t){const e=Array.from(this.root.querySelectorAll("gux-option-multi")),i=t?t.split(","):void 0;if(i)return e.filter((t=>i.includes(t.value)))}fieldButtonClick(){this.expanded=!this.expanded}fieldButtonInputClick(){this.expanded||(this.expanded=!this.expanded)}filterInput(t){t.stopPropagation(),this.textInput=this.textInputElement.value}shiftTabFromExpandedFilterInput(t){return t.shiftKey&&this.hasTextInput()&&this.expanded&&!(document.activeElement===this.listboxElement)}shiftTabFromFilterListbox(t){return t.shiftKey&&this.hasTextInput()&&document.activeElement===this.listboxElement}emitCreateOption(){this.guxcreateoption.emit(this.textInput),this.textInput="",this.textInputElement.value=""}canCreateNewOption(){return this.hasCreate&&this.textInput&&!this.listboxElement.hasExactMatch}isActiveElement(){return document.activeElement===this.root}activeElementNotListbox(){return document.activeElement!==this.listboxElement}filterKeydown(t){if("ArrowDown"===t.key)return t.stopImmediatePropagation(),void this.listboxElement.focus()}filterKeyup(t){" "!==t.key||t.preventDefault()}collapseListbox(t){this.expanded&&(this.expanded=!1),"focusFieldButton"===t&&this.fieldButtonElement.focus()}updateValue(t){this.value!==t&&(this.value=t,l(this.root,"input"),l(this.root,"change"))}getTypeaheadText(t){var e;const i=t.length;if(i>0&&!this.loading){const s=h(this.listboxElement,t);if(s&&"custom"!==this.filterType){const t=null===(e=s.querySelector("[gux-slot-container]"))||void 0===e?void 0:e.textContent;return null==t?void 0:t.substring(i)}return""}}renderTargetDisplay(){return s("div",{class:"gux-placeholder"},this.placeholder||this.i18n("noSelection"),this.getSrSelectedText())}getSrSelectedText(){const t=this.getOptionElementByValue(this.value);if(null==t?void 0:t.length)return s("span",{class:"gux-sr-only"},this.i18n("numberSelected",{numberSelected:t.length.toString()}))}getInputAriaLabel(){return this.canCreateNewOption()&&this.isActiveElement()?this.i18n("pressEnterToCreate",{textInputValue:this.textInput}):this.i18n("textInputResults")}renderTag(){const t=this.getOptionElementByValue(this.value);if(null==t?void 0:t.length)return s("gux-dropdown-multi-tag",{disabled:this.disabled,"number-selected":t.length})}renderFilterInputField(){if(this.expanded&&this.hasTextInput())return s("div",{class:"gux-field gux-input-field"},s("div",{class:"gux-field-content"},s("div",{class:"gux-filter"},s("div",{class:"gux-filter-display"},s("span",{class:"gux-filter-text"},this.textInput),s("span",{class:"gux-filter-suggestion"},this.getTypeaheadText(this.textInput))),s("div",{class:"input-and-dropdown-button"},s("input",{onClick:this.fieldButtonInputClick.bind(this),placeholder:this.placeholder||this.i18n("noSelection"),class:"gux-filter-input",type:"text","aria-label":this.getInputAriaLabel(),ref:t=>this.textInputElement=t,onInput:this.filterInput.bind(this),onKeyDown:this.filterKeydown.bind(this),onKeyUp:this.filterKeyup.bind(this)})))))}renderPopup(){return s("div",{slot:"popup",class:"gux-listbox-container"},s("slot",null))}renderTarget(){return s("div",{class:{"gux-target-container":!0,"gux-target-container-expanded":this.expanded&&this.hasTextInput(),"gux-target-container-collapsed":!(this.expanded&&this.hasTextInput()),"gux-error":this.hasError},slot:"target"},this.renderFilterInputField(),s("button",{type:"button",class:"gux-field gux-field-button",disabled:this.disabled,onClick:this.fieldButtonClick.bind(this),ref:t=>this.fieldButtonElement=t,"aria-haspopup":"listbox","aria-expanded":this.expanded.toString()},this.renderTargetContent(),this.renderTag(),this.renderRadialLoading(),s("gux-icon",{class:{"gux-expand-icon":!0},"screenreader-text":this.i18n("dropdown"),iconName:"chevron-small-down"})))}renderTargetContent(){if(!this.expanded||!this.hasTextInput())return s("div",{class:"gux-field-content"},this.renderTargetDisplay())}renderRadialLoading(){if(this.loading&&!this.expanded)return s("gux-radial-loading",{context:"input"})}render(){return[s("div",{class:"gux-dropdown-container"},s("gux-popup",{expanded:this.expanded&&(!this.loading||this.isFilterable()),disabled:this.disabled},this.renderTarget(),this.renderPopup()))]}static get delegatesFocus(){return!0}get root(){return n(this)}static get watchers(){return{expanded:["focusSelectedItemAfterRender"],value:["watchValue"],textInput:["handleFilter"]}}};g([c({childList:!0,subtree:!0})],p.prototype,"onMutation",null),g([o({triggerEvents:"mousedown"})],p.prototype,"onClickOutside",null),p.style=":host{color:#2e394c}.gux-dropdown-container{position:relative}.gux-error.gux-target-container-collapsed .gux-field-button,.gux-error.gux-target-container-expanded{border-color:#ea0b0b}.gux-field,.gux-target-container-expanded{all:unset;box-sizing:border-box;display:flex;flex-direction:row;flex-wrap:nowrap;align-content:stretch;align-items:center;justify-content:center;width:100%;height:32px;padding:6px 0 6px 6px;font-family:inherit;font-size:12px;line-height:1.6667;cursor:pointer;background-color:#f6f7f9}.gux-field.gux-input-field{height:30px;cursor:text}.gux-field .gux-field-content{position:relative;display:flex;flex:1 1 0;flex-direction:row;flex-wrap:nowrap;align-content:stretch;align-items:flex-start;justify-content:flex-start;min-width:0;height:100%}.gux-field .gux-field-content .gux-filter,.gux-field .gux-field-content .gux-selected-option,.gux-field .gux-field-content .gux-placeholder{flex:1 1 auto;align-self:auto;order:0;padding-left:6px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gux-field .gux-field-content .gux-filter .gux-sr-only:not(:focus):not(:active),.gux-field .gux-field-content .gux-selected-option .gux-sr-only:not(:focus):not(:active),.gux-field .gux-field-content .gux-placeholder .gux-sr-only:not(:focus):not(:active){position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}.gux-field .gux-field-content .gux-filter{position:relative;height:100%;padding-left:0}.gux-field .gux-field-content .gux-filter .gux-filter-input{all:unset;width:100%;color:transparent;caret-color:#2e394c}.gux-field .gux-field-content .gux-filter .gux-filter-display{white-space:pre}.gux-field .gux-field-content .gux-filter .gux-filter-display .gux-filter-text{color:#2e394c}.gux-field .gux-field-content .gux-filter .gux-filter-display .gux-filter-suggestion{color:#596373}.gux-field .gux-field-content .gux-filter .gux-filter-input,.gux-field .gux-field-content .gux-filter .gux-filter-display{position:absolute}.gux-field .gux-field-content .gux-placeholder{color:#596373}.gux-field .gux-expand-icon{flex:0 0 auto;align-self:auto;order:0;width:16px;height:16px;padding:0 8px;color:#596373}.gux-target-container-expanded{border:1px solid #6b7585;border-radius:4px;box-shadow:inset 0 0 4px rgba(32, 41, 55, 0.16)}.gux-target-container-expanded:focus-visible,.gux-target-container-expanded:focus-within{outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}.gux-target-container-expanded .gux-filter-input{background-color:inherit;border:none}.gux-target-container-expanded .gux-filter-input:focus{border:none;outline:none}.gux-target-container-expanded .gux-field-button{width:auto;height:30px;padding:0 0 0 8px;margin:0;background:inherit;border:none;outline:none;box-shadow:none}.gux-target-container-expanded .gux-field-button:focus{outline:none}.gux-target-container-collapsed .gux-field-button{border:1px solid #6b7585;border-radius:4px;box-shadow:inset 0 0 4px rgba(32, 41, 55, 0.16)}.gux-target-container-collapsed .gux-field-button:focus-visible,.gux-target-container-collapsed .gux-field-button:focus-within{outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}.gux-listbox-container{box-sizing:border-box;margin:0;color:#2e394c}gux-popup::part(gux-popup-container){width:inherit}.gux-error-message-container{display:none;margin:4px 0}.gux-error-message-container.gux-show{display:flex}";export{p as gux_dropdown_multi_beta}
|
1
|
+
import{r as t,c as e,f as i,h as s,g as n}from"./p-7d26b2e1.js";import{O as o}from"./p-9d18d475.js";import{b as r}from"./p-deee079e.js";import{s as l}from"./p-d176c2ae.js";import{b as u}from"./p-091f51f6.js";import{o as a}from"./p-3f5341ea.js";import{t as d}from"./p-e1558f84.js";import{g as h}from"./p-55cf6d81.js";import{O as c}from"./p-f34ce7dc.js";import"./p-8a133b9b.js";const x={textInputResults:"Type to filter dropdown results",noSelection:"Select...",dropdown:"Dropdown",numberSelected:"{numberSelected} selected",pressEnterToCreate:"Press Enter to create new option, {textInputValue}"};var g=function(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var l=t.length-1;l>=0;l--)(n=t[l])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);return o>3&&r&&Object.defineProperty(e,i,r),r};const p=class{constructor(i){t(this,i),this.guxcreateoption=e(this,"guxcreateoption",7),this.guxexpanded=e(this,"guxexpanded",7),this.guxcollapsed=e(this,"guxcollapsed",7),this.guxfilter=e(this,"guxfilter",7),this.value=void 0,this.disabled=!1,this.required=!1,this.loading=!1,this.placeholder=void 0,this.filterable=!1,this.filterType="none",this.hasError=!1,this.hasCreate=!1,this.expanded=!1,this.textInput=""}onMutation(){var t;this.listboxElement||(this.listboxElement=null===(t=this.root)||void 0===t?void 0:t.querySelector("gux-listbox-multi"),this.applyListboxEventListeners())}onInternalExpanded(t){t.stopPropagation(),this.guxexpanded.emit()}onInternalCollapsed(t){t.stopPropagation(),this.guxcollapsed.emit()}focusSelectedItemAfterRender(t){t&&this.listboxElement&&u((()=>{this.hasTextInput()?this.textInputElement.focus():this.listboxElement.focus()})),t||(this.textInput="")}watchValue(t){this.validateValue(t,this.listboxElement)}handleFilter(t){this.guxfilter.emit(t)}getSelectedValues(){var t;return Promise.resolve((null===(t=this.value)||void 0===t?void 0:t.split(","))||[])}onKeydown(t){switch(t.key){case"Escape":return this.hasTextInput()&&document.activeElement===this.listboxElement?this.textInputElement.focus():void this.collapseListbox("focusFieldButton");case"Tab":return this.shiftTabFromFilterListbox(t)?(t.preventDefault(),this.textInputElement.focus()):this.shiftTabFromExpandedFilterInput(t)?(t.preventDefault(),this.collapseListbox("focusFieldButton")):void this.collapseListbox("noFocusChange");case"ArrowDown":return void(this.activeElementNotListbox()&&(t.preventDefault(),this.expanded=!0));case"Enter":this.canCreateNewOption()&&this.isActiveElement()&&this.emitCreateOption()}}onInternallistboxoptionsupdated(t){t.stopPropagation(),i(this.root)}onClearselected(t){t.stopPropagation(),this.updateValue(""),this.listboxElement&&(this.listboxElement.value=void 0),this.validateValue(this.value,this.listboxElement),this.fieldButtonElement.focus()}onCreatenewoption(t){t.stopPropagation(),this.emitCreateOption()}onBlur(t){this.stopPropagationOfInternalFocusEvents(t)}onFocus(t){this.stopPropagationOfInternalFocusEvents(t)}onFocusout(t){this.stopPropagationOfInternalFocusEvents(t)}onFocusin(t){this.stopPropagationOfInternalFocusEvents(t)}onClickOutside(){this.collapseListbox("noFocusChange")}connectedCallback(){var t;this.listboxElement=null===(t=this.root)||void 0===t?void 0:t.querySelector("gux-listbox-multi"),this.listboxElement&&(this.validateValue(this.value,this.listboxElement),this.hasCreate=!!this.root.querySelector("gux-create-option"))}async componentWillLoad(){d(this.root),this.i18n=await r(this.root,x),a(this.root,(()=>{i(this.root)}))}componentDidLoad(){this.applyListboxEventListeners()}componentWillRender(){this.listboxElement&&(this.validateValue(this.value,this.listboxElement),this.listboxElement.loading=this.loading,this.listboxElement.filterType=this.filterType,this.listboxElement.textInput=this.textInput)}validateValue(t,e){void 0!==t?this.getOptionElementByValue(t)?e.value=t:this.value=void 0:e&&(e.value=t)}hasTextInput(){return this.isFilterable()||this.hasCreate}applyListboxEventListeners(){var t,e;null===(t=this.listboxElement)||void 0===t||t.addEventListener("input",(t=>{t.stopPropagation(),this.updateValue(t.target.value)})),null===(e=this.listboxElement)||void 0===e||e.addEventListener("change",(t=>{t.stopPropagation()}))}isFilterable(){return this.filterable||"custom"===this.filterType||"starts-with"===this.filterType}stopPropagationOfInternalFocusEvents(t){if(this.root.contains(t.relatedTarget))return t.stopImmediatePropagation()}getOptionElementByValue(t){const e=Array.from(this.root.querySelectorAll("gux-option-multi")),i=t?t.split(","):void 0;if(i)return e.filter((t=>i.includes(t.value)))}fieldButtonClick(){this.expanded=!this.expanded}fieldButtonInputClick(){this.expanded||(this.expanded=!this.expanded)}filterInput(t){t.stopPropagation(),this.textInput=this.textInputElement.value}shiftTabFromExpandedFilterInput(t){return t.shiftKey&&this.hasTextInput()&&this.expanded&&!(document.activeElement===this.listboxElement)}shiftTabFromFilterListbox(t){return t.shiftKey&&this.hasTextInput()&&document.activeElement===this.listboxElement}emitCreateOption(){this.guxcreateoption.emit(this.textInput),this.textInput="",this.textInputElement.value=""}canCreateNewOption(){return this.hasCreate&&this.textInput&&!this.listboxElement.hasExactMatch}isActiveElement(){return document.activeElement===this.root}activeElementNotListbox(){return document.activeElement!==this.listboxElement}filterKeydown(t){if("ArrowDown"===t.key)return t.stopImmediatePropagation(),void this.listboxElement.focus()}filterKeyup(t){" "!==t.key||t.preventDefault()}collapseListbox(t){this.expanded&&(this.expanded=!1),"focusFieldButton"===t&&this.fieldButtonElement.focus()}updateValue(t){this.value!==t&&(this.value=t,l(this.root,"input"),l(this.root,"change"))}getTypeaheadText(t){var e;const i=t.length;if(i>0&&!this.loading){const s=h(this.listboxElement,t);if(s&&"custom"!==this.filterType){const t=null===(e=s.querySelector("[gux-slot-container]"))||void 0===e?void 0:e.textContent;return null==t?void 0:t.substring(i)}return""}}renderTargetDisplay(){return s("div",{class:"gux-placeholder"},this.placeholder||this.i18n("noSelection"),this.getSrSelectedText())}getSrSelectedText(){const t=this.getOptionElementByValue(this.value);if(null==t?void 0:t.length)return s("span",{class:"gux-sr-only"},this.i18n("numberSelected",{numberSelected:t.length.toString()}))}getInputAriaLabel(){return this.canCreateNewOption()&&this.isActiveElement()?this.i18n("pressEnterToCreate",{textInputValue:this.textInput}):this.i18n("textInputResults")}renderTag(){const t=this.getOptionElementByValue(this.value);if(null==t?void 0:t.length)return s("gux-dropdown-multi-tag",{disabled:this.disabled,"number-selected":t.length})}renderFilterInputField(){if(this.expanded&&this.hasTextInput())return s("div",{class:"gux-field gux-input-field"},s("div",{class:"gux-field-content"},s("div",{class:"gux-filter"},s("div",{class:"gux-filter-display"},s("span",{class:"gux-filter-text"},this.textInput),s("span",{class:"gux-filter-suggestion"},this.getTypeaheadText(this.textInput))),s("div",{class:"input-and-dropdown-button"},s("input",{onClick:this.fieldButtonInputClick.bind(this),placeholder:this.placeholder||this.i18n("noSelection"),class:"gux-filter-input",type:"text","aria-label":this.getInputAriaLabel(),ref:t=>this.textInputElement=t,onInput:this.filterInput.bind(this),onKeyDown:this.filterKeydown.bind(this),onKeyUp:this.filterKeyup.bind(this)})))))}renderPopup(){return s("div",{slot:"popup",class:"gux-listbox-container"},s("slot",null))}renderTarget(){return s("div",{class:{"gux-target-container":!0,"gux-target-container-expanded":this.expanded&&this.hasTextInput(),"gux-target-container-collapsed":!(this.expanded&&this.hasTextInput()),"gux-error":this.hasError},slot:"target"},this.renderFilterInputField(),s("button",{type:"button",class:"gux-field gux-field-button",disabled:this.disabled,onClick:this.fieldButtonClick.bind(this),ref:t=>this.fieldButtonElement=t,"aria-haspopup":"listbox","aria-expanded":this.expanded.toString()},this.renderTargetContent(),this.renderTag(),this.renderRadialLoading(),s("gux-icon",{class:{"gux-expand-icon":!0},"screenreader-text":this.i18n("dropdown"),iconName:"chevron-small-down"})))}renderTargetContent(){if(!this.expanded||!this.hasTextInput())return s("div",{class:"gux-field-content"},this.renderTargetDisplay())}renderRadialLoading(){if(this.loading&&!this.expanded)return s("gux-radial-loading",{context:"input"})}render(){return[s("div",{class:"gux-dropdown-container"},s("gux-popup",{expanded:this.expanded&&(!this.loading||this.isFilterable()),disabled:this.disabled},this.renderTarget(),this.renderPopup()))]}static get delegatesFocus(){return!0}get root(){return n(this)}static get watchers(){return{expanded:["focusSelectedItemAfterRender"],value:["watchValue"],textInput:["handleFilter"]}}};g([c({childList:!0,subtree:!0})],p.prototype,"onMutation",null),g([o({triggerEvents:"mousedown"})],p.prototype,"onClickOutside",null),p.style=":host{color:#2e394c}.gux-dropdown-container{position:relative}.gux-error.gux-target-container-collapsed .gux-field-button,.gux-error.gux-target-container-expanded{border-color:#ea0b0b}.gux-field,.gux-target-container-expanded{all:unset;box-sizing:border-box;display:flex;flex-direction:row;flex-wrap:nowrap;align-content:stretch;align-items:center;justify-content:center;width:100%;height:32px;padding:6px 0 6px 6px;font-family:inherit;font-size:12px;line-height:1.6667;cursor:pointer;background-color:#f6f7f9}.gux-field.gux-input-field{height:30px;cursor:text}.gux-field .gux-field-content{position:relative;display:flex;flex:1 1 0;flex-direction:row;flex-wrap:nowrap;align-content:stretch;align-items:flex-start;justify-content:flex-start;min-width:0;height:100%}.gux-field .gux-field-content .gux-filter,.gux-field .gux-field-content .gux-selected-option,.gux-field .gux-field-content .gux-placeholder{flex:1 1 auto;align-self:auto;order:0;padding-left:6px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gux-field .gux-field-content .gux-filter .gux-sr-only:not(:focus):not(:active),.gux-field .gux-field-content .gux-selected-option .gux-sr-only:not(:focus):not(:active),.gux-field .gux-field-content .gux-placeholder .gux-sr-only:not(:focus):not(:active){position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}.gux-field .gux-field-content .gux-filter{position:relative;height:100%;padding-left:0}.gux-field .gux-field-content .gux-filter .gux-filter-input{all:unset;width:100%;color:transparent;caret-color:#2e394c}.gux-field .gux-field-content .gux-filter .gux-filter-display{white-space:pre}.gux-field .gux-field-content .gux-filter .gux-filter-display .gux-filter-text{color:#2e394c}.gux-field .gux-field-content .gux-filter .gux-filter-display .gux-filter-suggestion{color:#596373}.gux-field .gux-field-content .gux-filter .gux-filter-input,.gux-field .gux-field-content .gux-filter .gux-filter-display{position:absolute}.gux-field .gux-field-content .gux-placeholder{color:#596373}.gux-field .gux-expand-icon{flex:0 0 auto;align-self:auto;order:0;width:16px;height:16px;padding:0 8px;color:#596373}.gux-target-container-expanded{border:1px solid #6b7585;border-radius:4px;box-shadow:inset 0 0 4px rgba(32, 41, 55, 0.16)}.gux-target-container-expanded:focus-visible,.gux-target-container-expanded:focus-within{outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}.gux-target-container-expanded .gux-filter-input{background-color:inherit;border:none}.gux-target-container-expanded .gux-filter-input:focus{border:none;outline:none}.gux-target-container-expanded .gux-field-button{width:auto;height:30px;padding:0 0 0 8px;margin:0;background:inherit;border:none;outline:none;box-shadow:none}.gux-target-container-expanded .gux-field-button:focus{outline:none}.gux-target-container-collapsed .gux-field-button{border:1px solid #6b7585;border-radius:4px;box-shadow:inset 0 0 4px rgba(32, 41, 55, 0.16)}.gux-target-container-collapsed .gux-field-button:focus-visible,.gux-target-container-collapsed .gux-field-button:focus-within{outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}.gux-listbox-container{box-sizing:border-box;margin:0;color:#2e394c}gux-popup::part(gux-popup-container){width:inherit}.gux-error-message-container{display:none;margin:4px 0}.gux-error-message-container.gux-show{display:flex}";export{p as gux_dropdown_multi_beta}
|
@@ -1 +1 @@
|
|
1
|
-
import{r as t,c as e,h as r,g as o}from"./p-7d26b2e1.js";import{O as p}from"./p-9d18d475.js";import{b as i}from"./p-3701eff0.js";import{t as a}from"./p-
|
1
|
+
import{r as t,c as e,h as r,g as o}from"./p-7d26b2e1.js";import{O as p}from"./p-9d18d475.js";import{b as i}from"./p-3701eff0.js";import{t as a}from"./p-e1558f84.js";import{g as s}from"./p-3e6097e5.js";import{f as n}from"./p-7d614de7.js";import{c as d}from"./p-e459974a.js";const h=class{constructor(r){t(this,r),this.guxdismiss=e(this,"guxdismiss",7),this.for=void 0,this.position="bottom",this.displayDismissButton=void 0,this.closeOnClickOutside=!1,this.hidden=!0}hiddenHandler(t){t||this.popperInstance?!t&&this.popperInstance&&this.popperInstance.forceUpdate():this.runPopper()}checkForClickOutside(t){const e=t.composedPath(),r=n(this.root,this.for),o=e.includes(r);!this.closeOnClickOutside&&this.displayDismissButton||this.hidden||o||this.dismiss()}get titleSlot(){return s(this.root,"title")}runPopper(){const t=n(this.root,this.for);t?this.popupElement&&(this.popperInstance=d(t,this.popupElement,{modifiers:[{name:"computeStyles",options:{gpuAcceleration:!1}},{name:"offset",options:{offset:[0,7]}},{name:"arrow",options:{padding:16}}],placement:this.position})):console.error(`gux-popover: invalid "for" attribute. No element in page with the id "${this.for}"`)}destroyPopper(){this.popperInstance&&(this.popperInstance.destroy(),this.popperInstance=null)}dismiss(){this.guxdismiss.emit().defaultPrevented||this.root.setAttribute("hidden","")}connectedCallback(){a(this.root,{variant:this.position}),this.hiddenObserver=i(this.root,(t=>{this.hidden=t})),this.hidden=this.root.hidden}componentDidLoad(){this.runPopper()}disconnectedCallback(){this.destroyPopper(),this.hiddenObserver&&this.hiddenObserver.disconnect()}renderDismissButton(){if(this.displayDismissButton)return r("gux-dismiss-button",{onClick:this.dismiss.bind(this),position:"inherit"})}render(){return r("div",{ref:t=>this.popupElement=t,class:"gux-popover-wrapper"},r("div",{class:"gux-arrow","data-popper-arrow":!0}),r("div",{class:{"gux-popover-header":Boolean(this.titleSlot)}},r("slot",{name:"title"}),this.renderDismissButton()),r("div",{class:"gux-popover-content"},r("slot",null)))}get root(){return o(this)}static get watchers(){return{hidden:["hiddenHandler"]}}};(function(t,e,r,o){var p,i=arguments.length,a=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,o);else for(var s=t.length-1;s>=0;s--)(p=t[s])&&(a=(i<3?p(a):i>3?p(e,r,a):p(e,r))||a);i>3&&a&&Object.defineProperty(e,r,a)})([p({triggerEvents:"mousedown"})],h.prototype,"checkForClickOutside",null),h.style=":host{color:#2e394c}.gux-popover-wrapper{z-index:var(--gux-zindex-popover, 2);display:inline-block;padding:16px;background-color:#fdfdfd;border-radius:4px;box-shadow:0 3px 14px rgba(46, 57, 76, 0.22)}.gux-popover-wrapper .gux-arrow,.gux-popover-wrapper .gux-arrow::before{position:absolute;width:10px;height:10px;background:inherit}.gux-popover-wrapper .gux-arrow{visibility:hidden}.gux-popover-wrapper .gux-arrow::before{visibility:visible;content:'';transform:rotate(45deg)}.gux-popover-wrapper[data-popper-placement='bottom'] .gux-arrow,.gux-popover-wrapper[data-popper-placement='bottom-start'] .gux-arrow,.gux-popover-wrapper[data-popper-placement='bottom-end'] .gux-arrow{top:-5px}.gux-popover-wrapper[data-popper-placement='top'] .gux-arrow,.gux-popover-wrapper[data-popper-placement='top-start'] .gux-arrow,.gux-popover-wrapper[data-popper-placement='top-end'] .gux-arrow{bottom:-5px}.gux-popover-wrapper[data-popper-placement='left'] .gux-arrow,.gux-popover-wrapper[data-popper-placement='left-start'] .gux-arrow,.gux-popover-wrapper[data-popper-placement='left-end'] .gux-arrow{right:-5px}.gux-popover-wrapper[data-popper-placement='right'] .gux-arrow,.gux-popover-wrapper[data-popper-placement='right-start'] .gux-arrow,.gux-popover-wrapper[data-popper-placement='right-end'] .gux-arrow{left:-5px}.gux-popover-wrapper .gux-popover-header{font-size:12px;line-height:20px;font-family:Roboto, sans-serif;font-weight:400;font-weight:700;display:flex;flex-direction:row;align-content:center;align-items:center;justify-content:space-between;padding-bottom:16px}.gux-popover-wrapper gux-dismiss-button{float:right}";export{h as gux_popover}
|
@@ -1 +1 @@
|
|
1
|
-
import{r as o,h as r,g as t}from"./p-7d26b2e1.js";import{t as e}from"./p-
|
1
|
+
import{r as o,h as r,g as t}from"./p-7d26b2e1.js";import{t as e}from"./p-e1558f84.js";const n=class{constructor(r){o(this,r),this.type="button",this.guxTitle=void 0,this.disabled=!1,this.accent="secondary"}componentWillLoad(){e(this.root,{variant:this.accent}),this.makeSlotContentDisableable()}render(){return r("button",{type:this.type,title:this.guxTitle,disabled:this.disabled,class:`gux-${this.accent}`},r("slot",null))}makeSlotContentDisableable(){this.root.shadowRoot.addEventListener("click",(o=>{this.disabled&&(o.stopImmediatePropagation(),o.stopPropagation(),o.preventDefault())})),Array.from(this.root.children).forEach((o=>{o.addEventListener("click",(o=>{this.disabled&&(o.stopImmediatePropagation(),o.stopPropagation(),o.preventDefault())}))}))}static get delegatesFocus(){return!0}get root(){return t(this)}};n.style=":host{display:inline-block;pointer-events:none;-webkit-user-select:none;user-select:none}:host(:focus){outline:none}:host(:focus) button{outline:none}::slotted(gux-icon){width:var(--gse-ui-button-icon-size);height:var(--gse-ui-button-icon-size)}::slotted(*){padding-left:8px;vertical-align:middle}::slotted(*:first-child){padding:0}button{font-family:var(--gse-ui-button-text-fontFamily);font-weight:var(--gse-ui-button-text-fontWeight);font-size:var(--gse-ui-button-text-fontSize);line-height:var(--gse-ui-button-text-lineHeight);color:var(--gse-ui-button-secondary-default-foregroundColor);background-color:var(--gse-ui-button-secondary-default-backgroundColor);width:100%;min-width:var(--gse-ui-button-icon-only-width);height:var(--gse-ui-button-height);padding:var(--gse-ui-button-padding);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:auto;cursor:pointer;border:none;border-radius:var(--gse-ui-button-borderRadius)}button[disabled]{opacity:var(--gse-ui-button-disabled-opacity);cursor:default}button:hover:enabled{color:var(--gse-ui-button-secondary-hover-foregroundColor);background-color:var(--gse-ui-button-secondary-hover-backgroundColor)}button:active:enabled{color:var(--gse-ui-button-secondary-active-foregroundColor);background-color:var(--gse-ui-button-secondary-active-backgroundColor)}button:focus-visible:enabled{outline:3px solid #7b88f7;outline-offset:1px;border-radius:3px}button.gux-primary{color:var(--gse-ui-button-primary-default-foregroundColor);background-color:var(--gse-ui-button-primary-default-backgroundColor)}button.gux-primary:hover:enabled{color:var(--gse-ui-button-primary-hover-foregroundColor);background-color:var(--gse-ui-button-primary-hover-backgroundColor)}button.gux-primary:active:enabled{color:var(--gse-ui-button-primary-active-foregroundColor);background-color:var(--gse-ui-button-primary-active-backgroundColor)}button.gux-tertiary{color:var(--gse-ui-button-tertiary-default-foregroundColor);background-color:var(--gse-ui-button-tertiary-default-backgroundColor);border-width:var(--gse-ui-button-tertiary-default-border-width);border-style:var(--gse-ui-button-tertiary-default-border-style);border-color:var(--gse-ui-button-tertiary-default-border-color)}button.gux-tertiary:hover:enabled{color:var(--gse-ui-button-tertiary-hover-foregroundColor);background-color:var(--gse-ui-button-tertiary-hover-backgroundColor)}button.gux-tertiary:active:enabled{color:var(--gse-ui-button-tertiary-active-foregroundColor);background-color:var(--gse-ui-button-tertiary-active-backgroundColor)}button.gux-ghost{color:var(--gse-ui-button-ghost-default-foregroundColor);background-color:var(--gse-ui-button-ghost-default-backgroundColor)}button.gux-ghost:hover:enabled{color:var(--gse-ui-button-ghost-hover-foregroundColor);background-color:var(--gse-ui-button-ghost-hover-backgroundColor)}button.gux-ghost:active:enabled{color:var(--gse-ui-button-ghost-active-foregroundColor);background-color:var(--gse-ui-button-ghost-active-backgroundColor)}button.gux-danger{color:var(--gse-ui-button-danger-default-foregroundColor);background-color:var(--gse-ui-button-danger-default-backgroundColor)}button.gux-danger:hover:enabled{color:var(--gse-ui-button-danger-hover-foregroundColor);background-color:var(--gse-ui-button-danger-hover-backgroundColor)}button.gux-danger:active:enabled{color:var(--gse-ui-button-danger-active-foregroundColor);background-color:var(--gse-ui-button-danger-active-backgroundColor)}button.gux-inline{min-width:initial;height:initial;padding:0;color:var(--gse-ui-link-default-color);background:none;border:none}button.gux-inline[disabled]{color:var(--gse-ui-link-disabled-color)}button.gux-inline:hover:enabled{text-decoration:underline;color:var(--gse-ui-link-hover-color);background:none}button.gux-inline:active:enabled{text-decoration:underline;color:var(--gse-ui-link-active-color);background:none}";export{n as gux_button}
|
@@ -1 +1 @@
|
|
1
|
-
const t="4.0.0-beta.
|
1
|
+
const t="4.0.0-beta.5",e=20,n=3e4,o=[function(t){const[e,n,...o]=t.split(".");return{name:"spark-library",metadata:{fullVersion:`${e}.${n}.${o.join(".")}`,majorVersion:e,minorVersion:`${e}.${n}`}}}(t)];function i(){const t=window.newrelic;if(t){for(let r=0;r<e;r++){if(0==o.length)return void setTimeout(i,n);const e=o.shift();t.addPageAction(e.name,Object.assign(Object.assign({},e.metadata),{queueDepth:o.length}))}setTimeout(i,n)}}let r=!1;function a(e,n){window.newrelic&&(r||(r=!0,i()),document.contains(e)&&o.push({name:"spark-component",metadata:Object.assign(Object.assign({},n),{component:e.tagName.toLowerCase(),version:t})}))}export{a as t}
|
@@ -1 +1 @@
|
|
1
|
-
import{r as e,d as t,h as i,g as n}from"./p-7d26b2e1.js";import{a}from"./p-091f51f6.js";import{t as o}from"./p-
|
1
|
+
import{r as e,d as t,h as i,g as n}from"./p-7d26b2e1.js";import{a}from"./p-091f51f6.js";import{t as o}from"./p-e1558f84.js";const s=class{constructor(t){e(this,t),this.hasAdditionalGuidance=void 0,this.loadingMessageSize=void 0}updateLoadingMessageSize(){t((()=>{const e=this.root.clientWidth;this.loadingMessageSize=e<=160?"small":e<=300?"medium":"large"}))}componentWillLoad(){o(this.root)}componentDidLoad(){!this.resizeObserver&&window.ResizeObserver&&(this.resizeObserver=new ResizeObserver((()=>{this.updateLoadingMessageSize()}))),this.resizeObserver&&this.resizeObserver.observe(this.root),a((()=>{this.updateLoadingMessageSize()}),500)}disconnectedCallback(){this.resizeObserver&&this.resizeObserver.unobserve(this.root)}render(){return i("div",{class:{"gux-container":!0,[`gux-${this.loadingMessageSize}`]:!0},role:"alert","aria-live":"assertive"},i("slot",{name:"progress"}),i("slot",{name:"primary-message"}),i("slot",{name:"additional-guidance"}))}get root(){return n(this)}};s.style=":host{display:flex;flex-direction:column;align-items:center;justify-content:center}.gux-container{display:flex;flex-direction:column;align-items:center;justify-content:center}.gux-container slot[name='primary-message']{color:#364154;text-align:center}.gux-container slot[name='additional-guidance']{color:#596373;text-align:center}.gux-container.gux-small,.gux-container.gux-medium{padding:8px 0 4px}.gux-container.gux-small slot[name='primary-message'],.gux-container.gux-medium slot[name='primary-message']{font-family:Roboto, sans-serif;font-weight:400;font-weight:700;font-size:14px;line-height:20px}.gux-container.gux-small slot[name='additional-guidance'],.gux-container.gux-medium slot[name='additional-guidance']{font-family:Roboto, sans-serif;font-weight:400;font-size:11px;line-height:16px}.gux-container.gux-large{padding:16px 0 4px}.gux-container.gux-large slot[name='primary-message']{font-family:Roboto, sans-serif;font-weight:400;font-weight:300;font-size:24px;line-height:32px}.gux-container.gux-large slot[name='additional-guidance']{font-family:Roboto, sans-serif;font-weight:400;font-size:14px;line-height:24px}";export{s as gux_loading_message_beta}
|
@@ -1 +1 @@
|
|
1
|
-
import{r as t,c as s,h as i,H as a,g as h}from"./p-7d26b2e1.js";import{t as o}from"./p-
|
1
|
+
import{r as t,c as s,h as i,H as a,g as h}from"./p-7d26b2e1.js";import{t as o}from"./p-e1558f84.js";const n=class{constructor(i){t(this,i),this.guxactivetabchange=s(this,"guxactivetabchange",7),this.tabList=void 0,this.tabPanels=[],this.activeTab=void 0}watchActiveTab(t){this.activateTab(t,this.tabList,this.tabPanels),this.guxactivetabchange.emit(t)}onInternalActivateTabPanel(t){t.stopPropagation(),this.activateTab(t.detail,this.tabList,this.tabPanels)}async guxActivate(t){this.activateTab(t,this.tabList,this.tabPanels)}onSlotchange(){const[t,s]=Array.from(this.root.shadowRoot.querySelectorAll("slot"));this.tabList=t.assignedElements()[0],this.tabPanels=s.assignedElements(),this.activateTab(this.activeTab,this.tabList,this.tabPanels)}activateTab(t,s,i){var a;this.activeTab=t||(null===(a=null==s?void 0:s.querySelector("gux-tab-advanced"))||void 0===a?void 0:a.getAttribute("tab-id")),s.guxSetActive(this.activeTab),i.forEach((t=>{t.guxSetActive(t.tabId===this.activeTab)}))}componentWillLoad(){o(this.root)}render(){return i(a,null,i("div",{class:"gux-tabs"},i("slot",{name:"tab-list"}),i("div",null,i("slot",{onSlotchange:this.onSlotchange.bind(this)}))))}get root(){return h(this)}static get watchers(){return{activeTab:["watchActiveTab"]}}};n.style="gux-tabs-advanced{-custom-noop:noop}";export{n as gux_tabs_advanced}
|
@@ -1 +1 @@
|
|
1
|
-
import{r as t,c as o,h as a,g as i}from"./p-7d26b2e1.js";import{r as n}from"./p-cbcbd1bb.js";import{t as s}from"./p-
|
1
|
+
import{r as t,c as o,h as a,g as i}from"./p-7d26b2e1.js";import{r as n}from"./p-cbcbd1bb.js";import{t as s}from"./p-e1558f84.js";const e=class{constructor(a){t(this,a),this.guxdismiss=o(this,"guxdismiss",7),this.size="dynamic",this.trapFocus=!0,this.initialFocus=void 0}handleKeyEvent(t){"Escape"===t.key&&this.onDismissHandler(t)}connectedCallback(){this.triggerElement=document.activeElement}componentWillLoad(){s(this.root,{variant:`${this.size}-${this.trapFocus?"trapfocuson":"trapfocusoff"}`})}componentDidLoad(){var t,o,a;const i=this.getInitialFocusElement();i?null===(t=i.focus)||void 0===t||t.call(i):this.dismissButton&&(null===(a=(o=this.dismissButton).focus)||void 0===a||a.call(o))}render(){const t=this.hasModalTitleSlot(),o=this.hasFooterButtons(),i=n();return a("div",{class:"gux-modal",role:"dialog","aria-modal":"true","aria-labelledby":t?i:null},a("div",{class:`gux-modal-container gux-${this.size}`},this.renderModalTrapFocusEl(),t&&a("h1",{class:"gux-modal-header",id:i},a("slot",{name:"title"})),a("gux-dismiss-button",{onClick:this.onDismissHandler.bind(this),ref:t=>this.dismissButton=t}),a("div",{class:{"gux-modal-content":!0,"gux-no-buttons":!o}},a("p",null,a("slot",{name:"content"}))),o&&a("div",{class:"gux-button-footer"},a("div",{class:"gux-left-align-buttons"},a("slot",{name:"left-align-buttons"})),a("div",{class:"gux-right-align-buttons"},a("slot",{name:"right-align-buttons"}))),this.renderModalTrapFocusEl()))}renderModalTrapFocusEl(){if(this.trapFocus)return a("span",{onFocus:()=>this.dismissButton.focus(),tabindex:"0"})}getInitialFocusElement(){return this.initialFocus?this.root.querySelector(this.initialFocus):void 0}hasModalTitleSlot(){return Boolean(this.root.querySelector('[slot="title"]'))}hasFooterButtons(){return Boolean(this.root.querySelector('[slot="left-align-buttons"]'))||Boolean(this.root.querySelector('[slot="right-align-buttons"]'))}onDismissHandler(t){var o;t.stopPropagation(),this.guxdismiss.emit().defaultPrevented||(this.root.remove(),null===(o=this.triggerElement)||void 0===o||o.focus())}get root(){return i(this)}};e.style=":host .gux-modal{position:fixed;inset:0;z-index:var(--gux-zindex-modal, 1);display:flex;align-items:center;justify-content:center;color:#2e394c;background:rgba(32, 41, 55, 0.8)}:host .gux-modal .gux-modal-container{box-shadow:0 8px 24px rgba(32, 41, 55, 0.4);position:relative;box-sizing:border-box;display:flex;flex-direction:column;justify-content:space-between;padding:40px;background:#fdfdfd;border:1px solid #b4bccb;border-radius:4px}:host .gux-modal .gux-modal-container.gux-small{width:416px;max-height:min(368px, 100vh - 2 * 24px)}:host .gux-modal .gux-modal-container.gux-medium{width:672px;max-height:min(640px, 100vh - 2 * 24px)}:host .gux-modal .gux-modal-container.gux-large{width:940px;max-height:min(640px, 100vh - 2 * 24px)}:host .gux-modal .gux-modal-container.gux-dynamic{max-width:calc(100vw - 2 * 24px);max-height:calc(100vh - 2 * 24px)}:host .gux-modal .gux-modal-container.gux-dynamic .gux-modal-content{max-height:none}:host .gux-modal .gux-modal-container .gux-modal-header{padding-bottom:24px;margin:0;font-family:Roboto, sans-serif;font-weight:400;font-weight:300;font-size:24px;line-height:32px}:host .gux-modal .gux-modal-container .gux-modal-content{max-height:432px;margin:0 8px 24px;overflow-y:auto}:host .gux-modal .gux-modal-container .gux-modal-content.gux-no-buttons{margin-bottom:0}:host .gux-modal .gux-modal-container .gux-button-footer{display:flex;justify-content:space-between}:host .gux-modal .gux-modal-container .gux-button-footer .gux-left-align-buttons gux-button{padding-right:5px}:host .gux-modal .gux-modal-container .gux-button-footer .gux-right-align-buttons gux-button{padding-left:5px}@media (max-width: 416px){:host .gux-modal .gux-modal-container.gux-small,:host .gux-modal .gux-modal-container.gux-medium,:host .gux-modal .gux-modal-container.gux-large{width:100%;height:100%}}";export{e as gux_modal}
|
@@ -1 +1 @@
|
|
1
|
-
import{r as t,f as i,h as e,g as o}from"./p-7d26b2e1.js";import{c as r,o as n}from"./p-3f5341ea.js";import{O as s}from"./p-f34ce7dc.js";import{o as a}from"./p-3701eff0.js";import{p as l}from"./p-c10e41a9.js";import{h as p}from"./p-08bc2e6b.js";import{h,d as f,G as u,a as x,g as c,v as d,b as g}from"./p-b3c9fd06.js";import{G as m,a as b}from"./p-a733f4ca.js";import{t as w}from"./p-
|
1
|
+
import{r as t,f as i,h as e,g as o}from"./p-7d26b2e1.js";import{c as r,o as n}from"./p-3f5341ea.js";import{O as s}from"./p-f34ce7dc.js";import{o as a}from"./p-3701eff0.js";import{p as l}from"./p-c10e41a9.js";import{h as p}from"./p-08bc2e6b.js";import{h,d as f,G as u,a as x,g as c,v as d,b as g}from"./p-b3c9fd06.js";import{G as m,a as b}from"./p-a733f4ca.js";import{t as w}from"./p-e1558f84.js";import"./p-cbcbd1bb.js";import"./p-d0805f56.js";import"./p-d176c2ae.js";const v=class{constructor(i){t(this,i),this.labelPosition=void 0,this.computedLabelPosition="above",this.clearable=!0,this.disabled=void 0,this.required=void 0,this.hasContent=!1,this.hasError=!1,this.hasHelp=!1}onMutation(){this.hasError=p(this.root,"error"),this.hasHelp=p(this.root,"help")}async guxForceUpdate(){this.hasContent=h(this.input),this.hasError=p(this.root,"error"),this.hasHelp=p(this.root,"help"),i(this.root)}componentWillLoad(){this.setInput(),this.setLabel(),this.hasError=p(this.root,"error"),this.hasHelp=p(this.root,"help"),w(this.root,{variant:this.variant})}disconnectedCallback(){this.disabledObserver&&this.disabledObserver.disconnect(),this.requiredObserver&&this.requiredObserver.disconnect()}render(){return e(b,{labelPosition:this.computedLabelPosition},e(m,{position:this.computedLabelPosition,required:this.required},e("slot",{name:"label",onSlotchange:()=>this.setLabel()})),e("div",{class:"gux-input-and-error-container"},e("div",{class:{"gux-input":!0,"gux-input-error":this.hasError}},e("div",{class:{"gux-input-container":!0,"gux-disabled":this.disabled}},e("gux-icon",{"icon-name":"search",decorative:!0}),e("slot",{name:"input"}),this.clearable&&this.hasContent&&!this.disabled&&e("gux-form-field-input-clear-button",{onClick:()=>f(this.input)}))),e(u,{show:this.hasError},e("slot",{name:"error"})),e(x,{show:!this.hasError&&this.hasHelp},e("slot",{name:"help"}))))}get variant(){const t=this.labelPosition?this.labelPosition.toLowerCase():"none";return`${this.input.getAttribute("type")}-${t}`}setInput(){this.input=c(this.root,'input[type="search"][slot="input"]'),this.hasContent=h(this.input),l(this.input),this.input.addEventListener("input",(()=>{this.hasContent=h(this.input)})),this.disabled=r(this.input),this.required=this.input.required,this.disabledObserver=n(this.input,(t=>{this.disabled=t})),this.requiredObserver=a(this.input,(t=>{this.required=t})),d(this.root,this.input)}setLabel(){this.label=this.root.querySelector('label[slot="label"]'),this.computedLabelPosition=g(this.label,this.labelPosition)}get root(){return o(this)}};(function(t,i,e,o){var r,n=arguments.length,s=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,i,e,o);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(n<3?r(s):n>3?r(i,e,s):r(i,e))||s);n>3&&s&&Object.defineProperty(i,e,s)})([s({childList:!0,subtree:!0})],v.prototype,"onMutation",null),v.style=".gux-form-field-container{margin:var(--gux-form-field-container-margin-top, 16px) 0 var(--gux-form-field-container-margin-bottom, 16px) 0}.gux-form-field-container.gux-beside{display:flex;flex-direction:row}.gux-form-field-error{display:none;flex-direction:row;flex-wrap:nowrap;align-content:stretch;align-items:flex-start;justify-content:flex-start;margin:4px 0;font-size:12px;line-height:20px;color:#2e394c}.gux-form-field-error.gux-show{display:flex}.gux-form-field-error gux-icon{flex:0 1 auto;align-self:auto;order:0;min-width:16px;min-height:16px;margin:2px 4px 0 0;color:#ea0b0b}.gux-form-field-error .gux-message{flex:0 1 auto;align-self:auto;order:0}.gux-form-field-label.gux-required::after{font-size:12px;color:#ea0b0b;content:' *'}.gux-form-field-label.gux-beside{position:relative;top:8px;width:fit-content;min-width:45px;margin-right:8px}.gux-form-field-label.gux-above{margin-bottom:8px}.gux-form-field-label.gux-screenreader{position:absolute;top:auto;left:-10000px;width:1px;height:1px;overflow:hidden}.gux-form-field-help{display:none;flex-direction:row;flex-wrap:nowrap;align-content:stretch;align-items:flex-start;justify-content:flex-start;margin:4px 0;font-size:12px;font-weight:400;line-height:20px;color:#6b7585}.gux-form-field-help.gux-show{display:flex}.gux-form-field-help .gux-message{flex:0 1 auto;align-self:none;order:0}:host{display:block;color:#2e394c}::slotted(label){font-family:Roboto, sans-serif;font-weight:400;font-weight:700;font-size:12px;line-height:16px}::slotted(input){flex:1 1 auto;align-self:auto;order:0;width:100%;overflow:hidden;font-size:12px;color:#2e394c;text-overflow:ellipsis;background-color:#f6f7f9;border:none;outline:none}::slotted(input)::placeholder{color:#596373;opacity:1}.gux-input-and-error-container{flex-grow:1}.gux-input-and-error-container .gux-input{display:flex;flex-direction:row;flex-wrap:nowrap;align-content:stretch;align-items:center}.gux-input-and-error-container .gux-input .gux-input-container{box-sizing:border-box;display:flex;flex:1 1 auto;flex-direction:row;flex-wrap:nowrap;align-content:stretch;align-items:center;align-self:auto;justify-content:center;order:0;width:100%;height:32px;padding:4px 8px;font-size:12px;line-height:1.6667;color:#2e394c;background-color:#f6f7f9;background-image:none;border:1px solid #6b7585;border-radius:4px;box-shadow:inset 0 0 4px rgba(32, 41, 55, 0.16)}.gux-input-and-error-container .gux-input .gux-input-container.gux-disabled{opacity:0.5}.gux-input-and-error-container .gux-input .gux-input-container gux-icon[icon-name='search']{flex:0 0 auto;align-self:auto;order:0;width:16px;height:16px;margin-right:4px;color:#596373}.gux-input-and-error-container .gux-input .gux-input-container:focus-within{border-color:#2a60c8;outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}.gux-input-and-error-container .gux-input.gux-input-error .gux-input-container{border-color:#ea0b0b}";export{v as gux_form_field_search}
|
@@ -1 +1 @@
|
|
1
|
-
import{r as t,h as o,H as s,g as e}from"./p-7d26b2e1.js";import{a as i}from"./p-091f51f6.js";import{t as r}from"./p-
|
1
|
+
import{r as t,h as o,H as s,g as e}from"./p-7d26b2e1.js";import{a as i}from"./p-091f51f6.js";import{t as r}from"./p-e1558f84.js";import{h as n}from"./p-837e3eff.js";import{c as a}from"./p-e459974a.js";const u=class{constructor(o){t(this,o),this.isShown=!1}forceUpdate(t){t&&this.popperInstance&&this.popperInstance.update()}onKeydown(t){if(t.stopPropagation(),this.isShown)switch(t.key){case"Escape":case"ArrowLeft":case"ArrowUp":return void this.root.focus();case"ArrowDown":return t.preventDefault(),void this.focusOnMenu();case"Enter":return void(this.hideDelayTimeout=i((()=>{this.focusOnMenu()})))}}onKeyup(t){t.stopPropagation()," "!==t.key||(this.menuContentElement.contains(document.activeElement)?this.root.focus():this.hideDelayTimeout=i((()=>{this.focusOnMenu()})))}onmouseenter(){this.show()}onMouseleave(){this.hide()}onClick(t){0!==t.detail&&this.hide(),this.root.focus()}onFocusin(){this.show()}onFocusout(){this.hide()}show(){clearTimeout(this.hideDelayTimeout),this.isShown=!0}hide(){this.isShown&&(this.hideDelayTimeout=setTimeout((()=>{this.isShown=!1}),n))}runPopper(){this.popperInstance=a(this.targetElement,document.querySelector("gux-menu"),{modifiers:[{name:"offset",options:{offset:[0,16]}},{name:"arrow",options:{padding:16}}],placement:"bottom-start"})}destroyPopper(){this.popperInstance&&(this.popperInstance.destroy(),this.popperInstance=null)}focusOnMenu(){if(this.menuContentElement.contains(document.activeElement))return;const t=this.root.querySelector("gux-menu");Array.from(t.children)[0].guxFocus()}componentWillLoad(){r(this.root)}componentDidLoad(){this.runPopper()}disconnectedCallback(){this.destroyPopper()}render(){return o(s,{tabIndex:0,"aria-haspopup":"true"},o("span",{ref:t=>this.targetElement=t},o("slot",{name:"target"})),o("div",{class:{"gux-flyout-menu-content":!0,"gux-shown":this.isShown},ref:t=>this.menuContentElement=t},o("slot",{name:"menu"})))}get root(){return e(this)}static get watchers(){return{isShown:["forceUpdate"]}}};u.style=":host{z-index:var(--gux-zindex-popover, 2);color:#2e394c;cursor:default}:host(:focus){outline:none}:host(:focus-visible){outline:3px solid #aac9ff;outline-offset:1px;box-shadow:0 0 0 1px #fdfdfd}.gux-flyout-menu-content{display:none;margin:0}.gux-flyout-menu-content.gux-shown{display:flex}.gux-arrow,.gux-arrow::before{position:absolute;top:-3px;width:10px;height:10px;background:inherit}.gux-arrow::before{visibility:visible;content:'';border-top:1px solid #b4bccb;border-left:1px solid #b4bccb;transform:rotate(45deg)}";export{u as gux_flyout_menu_beta}
|
@@ -1 +1 @@
|
|
1
|
-
import{r as t,c as s,h as i,g as o}from"./p-7d26b2e1.js";import{r as e}from"./p-cbcbd1bb.js";import{t as r}from"./p-
|
1
|
+
import{r as t,c as s,h as i,g as o}from"./p-7d26b2e1.js";import{r as e}from"./p-cbcbd1bb.js";import{t as r}from"./p-e1558f84.js";import{b as n}from"./p-deee079e.js";import"./p-8a133b9b.js";const u={defaultLabel:"Disclosure button"},a=class{constructor(i){t(this,i),this.active=s(this,"active",7),this.panelId=e("gux-disclosure-button-panel"),this.position="left",this.label=void 0,this.isOpen=!1,this.icon="arrow-solid-right"}watchIsOpen(){this.updateIcon()}changeState(){this.togglePanel(),this.active.emit(this.isOpen)}togglePanel(){this.isOpen=!this.isOpen}updateIcon(){this.icon="right"===this.position?this.isOpen?"arrow-solid-right":"arrow-solid-left":this.isOpen?"arrow-solid-left":"arrow-solid-right"}async componentWillLoad(){r(this.root,{variant:this.position}),this.i18n=await n(this.root,u),this.updateIcon()}render(){return i("div",{class:`gux-disclosure-button-container gux-${this.position}`},i("button",{class:"gux-disclosure-button",onClick:()=>this.changeState(),"aria-controls":this.panelId,"aria-expanded":this.isOpen.toString(),"aria-label":this.label||this.i18n("defaultLabel")},i("gux-icon",{"icon-name":`${this.icon}`,decorative:!0})),i("div",{id:this.panelId,class:{"gux-disclosure-panel":!0,"gux-active":this.isOpen},role:"region"},i("slot",{name:"panel-content"})))}get root(){return o(this)}static get watchers(){return{isOpen:["watchIsOpen"]}}};a.style=":host{height:100%;color:#2e394c}.gux-disclosure-button-container{display:flex;flex-direction:row;justify-content:flex-start;height:100%}.gux-disclosure-button-container .gux-disclosure-button{width:16px;padding:0;margin:0;color:#2e394c;background:transparent;border-top:none;border-right:1px solid #e2e6ee;border-bottom:none;border-left:1px solid #e2e6ee}.gux-disclosure-button-container .gux-disclosure-button gux-icon{width:12px;height:12px}.gux-disclosure-button-container .gux-disclosure-button:focus{outline:none}.gux-disclosure-button-container .gux-disclosure-panel{display:none;order:-1;width:100%}.gux-disclosure-button-container .gux-disclosure-panel.gux-active{display:block}.gux-disclosure-button-container.gux-right{justify-content:flex-end}.gux-disclosure-button-container.gux-right .gux-disclosure-panel{order:1}";export{a as gux_disclosure_button}
|
@@ -1 +1 @@
|
|
1
|
-
import{r as t,c as s,h as i,H as h,g as a}from"./p-7d26b2e1.js";import{t as e}from"./p-
|
1
|
+
import{r as t,c as s,h as i,H as h,g as a}from"./p-7d26b2e1.js";import{t as e}from"./p-e1558f84.js";const o=class{constructor(i){t(this,i),this.guxactivetabchange=s(this,"guxactivetabchange",7),this.activeTab=void 0,this.orientation="horizontal",this.alignment="left",this.tabList=void 0,this.tabPanels=[]}watchActiveTab(t){this.activateTab(t,this.tabList,this.tabPanels),this.guxactivetabchange.emit(t)}onInternalActivateTabPanel(t){t.stopPropagation(),this.activateTab(t.detail,this.tabList,this.tabPanels)}async guxActivate(t){this.activateTab(t,this.tabList,this.tabPanels)}onSlotchange(){const[t,s]=Array.from(this.root.shadowRoot.querySelectorAll("slot"));this.tabList=t.assignedElements()[0],this.tabPanels=s.assignedElements(),this.activateTab(this.activeTab,this.tabList,this.tabPanels)}activateTab(t,s,i){this.activeTab=t||i[0].tabId,s.guxSetActive(this.activeTab),i.forEach((t=>{t.guxSetActive(t.tabId===this.activeTab)}))}componentWillLoad(){e(this.root)}render(){return i(h,null,i("div",{class:`gux-tabs gux-${this.alignment} gux-${this.orientation}`},i("slot",{name:"tab-list"}),i("div",{class:`gux-${this.alignment} gux-${this.orientation}`},i("slot",{onSlotchange:this.onSlotchange.bind(this)}))))}get root(){return a(this)}static get watchers(){return{activeTab:["watchActiveTab"]}}};o.style=".gux-tabs.gux-vertical{display:flex;height:100%}";export{o as gux_tabs}
|
package/dist/stencil-wrapper.js
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
*/
|
8
8
|
import { defineCustomElements } from '../dist/loader';
|
9
9
|
// Value templated out during build process (see scripts/wrap-stencil.js)
|
10
|
-
export const CDN_URL = '/spark-components/build-assets/4.0.0-beta.
|
10
|
+
export const CDN_URL = '/spark-components/build-assets/4.0.0-beta.5-55/genesys-webcomponents/';
|
11
11
|
// Default domain to load assets from
|
12
12
|
const DEFAULT_DOMAIN = 'mypurecloud.com';
|
13
13
|
// List of Genesys UI domains
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export declare const CDN_URL = "/spark-components/build-assets/4.0.0-beta.
|
1
|
+
export declare const CDN_URL = "/spark-components/build-assets/4.0.0-beta.5-55/genesys-webcomponents/";
|
2
2
|
export declare function registerElements(): Promise<void>;
|