genesys-spark-components 3.3.2 → 3.4.2
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/CHANGELOG.md +32 -0
- package/dist/cjs/genesys-webcomponents.cjs.js +1 -1
- package/dist/cjs/gux-accordion-legacy.cjs.entry.js +1 -1
- package/dist/cjs/gux-accordion.cjs.entry.js +1 -1
- package/dist/cjs/gux-action-button-legacy.cjs.entry.js +1 -1
- package/dist/cjs/gux-action-button.cjs.entry.js +1 -1
- package/dist/cjs/gux-action-list-legacy.cjs.entry.js +1 -1
- package/dist/cjs/gux-action-toast.cjs.entry.js +1 -1
- package/dist/cjs/gux-advanced-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/gux-badge-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-breadcrumbs.cjs.entry.js +1 -1
- package/dist/cjs/gux-button-multi-legacy.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 +2 -2
- package/dist/cjs/gux-button.cjs.entry.js +2 -2
- package/dist/cjs/gux-calendar.cjs.entry.js +1 -1
- package/dist/cjs/gux-card-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-chart-column-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-chart-donut-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-chart-line-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-chart-pie-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-chart-scatter-plot-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-command-palette-legacy.cjs.entry.js +1 -1
- package/dist/cjs/gux-content-search.cjs.entry.js +1 -1
- package/dist/cjs/gux-copy-to-clipboard-beta.cjs.entry.js +65 -0
- 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-legacy.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-input-clear-button.cjs.entry.js +1 -1
- package/dist/cjs/gux-form-field-legacy.cjs.entry.js +1 -1
- package/dist/cjs/gux-form-field-number.cjs.entry.js +2 -2
- 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-icon.cjs.entry.js +1 -1
- package/dist/cjs/gux-list-item-legacy_2.cjs.entry.js +1 -1
- package/dist/cjs/gux-list.cjs.entry.js +1 -1
- package/dist/cjs/gux-modal.cjs.entry.js +1 -1
- package/dist/cjs/gux-notification-toast.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 +1 -1
- package/dist/cjs/gux-pagination.cjs.entry.js +1 -1
- package/dist/cjs/gux-panel-frame-legacy.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-side-panel-legacy.cjs.entry.js +1 -1
- package/dist/cjs/gux-simple-toast.cjs.entry.js +1 -1
- package/dist/cjs/gux-switch.cjs.entry.js +1 -1
- package/dist/cjs/gux-tab-advanced-list.cjs.entry.js +6 -4
- package/dist/cjs/gux-table-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-tabs-advanced.cjs.entry.js +1 -1
- package/dist/cjs/gux-tabs-legacy.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-text-label-legacy.cjs.entry.js +1 -1
- package/dist/cjs/gux-time-picker-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-toggle.cjs.entry.js +1 -1
- package/dist/cjs/gux-tooltip_2.cjs.entry.js +6 -2
- package/dist/cjs/gux-visualization-beta.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{usage-tracking-1c0d27be.js → usage-tracking-dad68b30.js} +2 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/beta/gux-button-slot/gux-button-slot.css +3 -1
- package/dist/collection/components/beta/gux-copy-to-clipboard/gux-copy-to-clipboard.css +63 -0
- package/dist/collection/components/beta/gux-copy-to-clipboard/gux-copy-to-clipboard.js +81 -0
- package/dist/collection/components/stable/gux-button/gux-button.css +3 -3
- package/dist/collection/components/stable/gux-form-field/components/gux-form-field-number/gux-form-field-number.css +3 -1
- package/dist/collection/components/stable/gux-icon/icons/badge-x.svg +1 -0
- package/dist/collection/components/stable/gux-tabs-advanced/gux-tab-advanced-list/gux-tab-advanced-list.css +25 -45
- package/dist/collection/components/stable/gux-tabs-advanced/gux-tab-advanced-list/gux-tab-advanced-list.js +6 -4
- package/dist/collection/components/stable/gux-tooltip/gux-tooltip.js +28 -1
- package/dist/collection/components/stable/gux-tooltip/gux-tooltip.types.js +1 -0
- package/dist/deploy-info.json +3 -3
- package/dist/esm/genesys-webcomponents.js +1 -1
- package/dist/esm/gux-accordion-legacy.entry.js +1 -1
- package/dist/esm/gux-accordion.entry.js +1 -1
- package/dist/esm/gux-action-button-legacy.entry.js +1 -1
- package/dist/esm/gux-action-button.entry.js +1 -1
- package/dist/esm/gux-action-list-legacy.entry.js +1 -1
- package/dist/esm/gux-action-toast.entry.js +1 -1
- package/dist/esm/gux-advanced-dropdown.entry.js +1 -1
- package/dist/esm/gux-badge-beta.entry.js +1 -1
- package/dist/esm/gux-breadcrumbs.entry.js +1 -1
- package/dist/esm/gux-button-multi-legacy.entry.js +1 -1
- package/dist/esm/gux-button-multi.entry.js +1 -1
- package/dist/esm/gux-button-slot-beta.entry.js +2 -2
- package/dist/esm/gux-button.entry.js +2 -2
- package/dist/esm/gux-calendar.entry.js +1 -1
- package/dist/esm/gux-card-beta.entry.js +1 -1
- package/dist/esm/gux-chart-column-beta.entry.js +1 -1
- package/dist/esm/gux-chart-donut-beta.entry.js +1 -1
- package/dist/esm/gux-chart-line-beta.entry.js +1 -1
- package/dist/esm/gux-chart-pie-beta.entry.js +1 -1
- package/dist/esm/gux-chart-scatter-plot-beta.entry.js +1 -1
- package/dist/esm/gux-command-palette-legacy.entry.js +1 -1
- package/dist/esm/gux-content-search.entry.js +1 -1
- package/dist/esm/gux-copy-to-clipboard-beta.entry.js +61 -0
- 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-legacy.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-input-clear-button.entry.js +1 -1
- package/dist/esm/gux-form-field-legacy.entry.js +1 -1
- package/dist/esm/gux-form-field-number.entry.js +2 -2
- 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-icon.entry.js +1 -1
- package/dist/esm/gux-list-item-legacy_2.entry.js +1 -1
- package/dist/esm/gux-list.entry.js +1 -1
- package/dist/esm/gux-modal.entry.js +1 -1
- package/dist/esm/gux-notification-toast.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 +1 -1
- package/dist/esm/gux-pagination.entry.js +1 -1
- package/dist/esm/gux-panel-frame-legacy.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-side-panel-legacy.entry.js +1 -1
- package/dist/esm/gux-simple-toast.entry.js +1 -1
- package/dist/esm/gux-switch.entry.js +1 -1
- package/dist/esm/gux-tab-advanced-list.entry.js +6 -4
- package/dist/esm/gux-table-beta.entry.js +1 -1
- package/dist/esm/gux-tabs-advanced.entry.js +1 -1
- package/dist/esm/gux-tabs-legacy.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-text-label-legacy.entry.js +1 -1
- package/dist/esm/gux-time-picker-beta.entry.js +1 -1
- package/dist/esm/gux-toggle.entry.js +1 -1
- package/dist/esm/gux-tooltip_2.entry.js +6 -2
- package/dist/esm/gux-visualization-beta.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{usage-tracking-f006c6f1.js → usage-tracking-e780a146.js} +2 -1
- package/dist/genesys-webcomponents/genesys-webcomponents.esm.js +1 -1
- package/dist/genesys-webcomponents/i18n/genesys-webcomponents.i18n.en.json +1 -1
- package/dist/genesys-webcomponents/icons/badge-x.svg +1 -0
- package/dist/genesys-webcomponents/{p-2b02de07.entry.js → p-03f786bb.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-8d6a8fc1.js → p-0749ddc0.js} +1 -1
- package/dist/genesys-webcomponents/{p-dc9dd886.entry.js → p-0842e67c.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-c1d1abf2.entry.js → p-0bccbc5e.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-d07860b4.entry.js → p-0ddd8d4f.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-ac50f2bc.entry.js → p-1031b574.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-8a89e64d.entry.js → p-155bb34f.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-46eda40c.entry.js → p-17d4a2ef.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-d2b3e17f.entry.js → p-18788841.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-999fc762.entry.js → p-1892eb76.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-12d89212.entry.js → p-1d011a81.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-0a19a218.entry.js → p-22c63b2f.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-e2736b7d.entry.js → p-266acba3.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-124fff7a.entry.js → p-269963ec.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-de91e9e7.entry.js → p-28c7f729.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-ccea6901.entry.js → p-29014d1e.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-f5be2690.entry.js → p-2a39b40e.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-77e52c95.entry.js → p-2caf5f99.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-f9dc4d90.entry.js → p-2cf45506.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-e90d4ca5.entry.js → p-3095605b.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-0b7c65e9.entry.js → p-32e65c1f.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-8b77e017.entry.js → p-34b626d1.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-480ec6a6.entry.js → p-378cd6cf.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-fbf17aac.entry.js → p-382be864.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-905084ef.entry.js → p-3c2622bb.entry.js} +1 -1
- package/dist/genesys-webcomponents/p-4ade0038.entry.js +1 -0
- package/dist/genesys-webcomponents/{p-872adf75.entry.js → p-5238df29.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-51ae0e2d.entry.js → p-53b57303.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-0edbe224.entry.js → p-5854940b.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-71fbdde7.entry.js → p-5e4a13fa.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-fcc726bc.entry.js → p-5fa06e39.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-668065e8.entry.js → p-60556732.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-a174d034.entry.js → p-636c54c6.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-f00d881c.entry.js → p-648daaad.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-d4c9c1ae.entry.js → p-65b6304c.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-e4387b01.entry.js → p-6ae02bd1.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-87394f1f.entry.js → p-6cba93cf.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-e49a2254.entry.js → p-6eea2eb5.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-a683c274.entry.js → p-7009289e.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-b544df8e.entry.js → p-7190ade6.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-f1d97ec4.entry.js → p-730b7824.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-7bbf7540.entry.js → p-7b189793.entry.js} +1 -1
- package/dist/genesys-webcomponents/p-7cef90a5.entry.js +1 -0
- package/dist/genesys-webcomponents/{p-02e05dcc.entry.js → p-80e8d129.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-de030af3.entry.js → p-8582d04a.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-998863df.entry.js → p-85e91ce9.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-50f34d26.entry.js → p-918a52ca.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-17e7c330.entry.js → p-9268a785.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-5a9052a5.entry.js → p-96011a34.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-a25d7f47.entry.js → p-983933c0.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-54d12357.entry.js → p-9e8e412b.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-42da5782.entry.js → p-b1662ae2.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-b5caba1b.entry.js → p-be064568.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-ca7e69dc.entry.js → p-bfd2effd.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-724bc744.entry.js → p-c09846a5.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-3dd33b5a.entry.js → p-c528cbba.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-ce45cd42.entry.js → p-c6588eae.entry.js} +1 -1
- package/dist/genesys-webcomponents/p-c6eab0f6.entry.js +1 -0
- package/dist/genesys-webcomponents/{p-6f3adb70.entry.js → p-c7b78b58.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-0caf0252.entry.js → p-cd9ddc56.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-b61c9c77.entry.js → p-ceeb8e8b.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-6343d101.entry.js → p-d19a7fb6.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-d690c62f.entry.js → p-d230bf80.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-16377f5d.entry.js → p-d5da8ebb.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-4338a051.entry.js → p-d7ea3dd5.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-3bd13f4e.entry.js → p-dc35acd6.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-e9221bb1.entry.js → p-e6759802.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-0c056961.entry.js → p-e8009e30.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-26b2cfff.entry.js → p-e902c88f.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-d9b2414d.entry.js → p-ed5511fd.entry.js} +1 -1
- package/dist/genesys-webcomponents/p-f2188fb8.entry.js +1 -0
- package/dist/genesys-webcomponents/{p-3a0cb71d.entry.js → p-f6ee453e.entry.js} +1 -1
- package/dist/stencil-wrapper.js +1 -1
- package/dist/types/components/beta/gux-copy-to-clipboard/gux-copy-to-clipboard.d.ts +13 -0
- package/dist/types/components/stable/gux-tooltip/gux-tooltip.d.ts +5 -0
- package/dist/types/components/stable/gux-tooltip/gux-tooltip.types.d.ts +1 -0
- package/dist/types/components.d.ts +22 -0
- package/package.json +2 -1
- package/dist/genesys-webcomponents/p-1083e07f.entry.js +0 -1
- package/dist/genesys-webcomponents/p-61504012.entry.js +0 -1
- package/dist/genesys-webcomponents/p-8bcf179a.entry.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as i,H as e,g as o}from"./p-a085b143.js";import{r as s}from"./p-cbcbd1bb.js";import{t as r}from"./p-0749ddc0.js";import{c as n}from"./p-4c66f794.js";import{l as h}from"./p-3184268e.js";import{O as l}from"./p-4b7056b2.js";const a=class{constructor(i){t(this,i),this.mouseenterHandler=()=>this.show(),this.mouseleaveHandler=()=>this.hide(),this.focusinHandler=()=>this.show(),this.focusoutHandler=()=>this.hide(),this.id=s("gux-tooltip"),this.placement="bottom-start",this.isShown=!1}handleKeyDown(t){"Escape"===t.key&&this.isShown&&this.hide()}async showTooltip(){this.show()}async hideTooltip(){this.hide()}show(){this.popperInstance.forceUpdate(),this.delayTimeout=setTimeout((()=>{this.isShown=!0}),750)}hide(){clearTimeout(this.delayTimeout),this.isShown=!1}getForElement(){this.forElement=this.for?document.getElementById(this.for):this.root.parentElement}logForAttributeError(){console.error(`gux-tooltip: invalid element supplied to 'for': "${this.for}"`)}connectedCallback(){this.getForElement(),this.forElement?(this.forElement.setAttribute("aria-describedby",this.id),this.popperInstance=n(this.forElement,this.root,{modifiers:[{name:"offset",options:{offset:[0,16]}}],placement:this.placement,strategy:"fixed"}),this.forElement.addEventListener("mouseenter",this.mouseenterHandler),this.forElement.addEventListener("mouseleave",this.mouseleaveHandler),this.forElement.addEventListener("focusin",this.focusinHandler),this.forElement.addEventListener("focusout",this.focusoutHandler)):this.logForAttributeError()}componentWillLoad(){r(this.root)}disconnectedCallback(){this.forElement.removeAttribute("aria-describedby"),this.popperInstance&&(this.popperInstance.destroy(),this.popperInstance=null),this.forElement.removeEventListener("mouseenter",this.mouseenterHandler),this.forElement.removeEventListener("mouseleave",this.mouseleaveHandler),this.forElement.removeEventListener("focusin",this.focusinHandler),this.forElement.removeEventListener("focusout",this.focusoutHandler)}render(){return i(e,{id:this.id,class:{"gux-show":this.isShown},role:"tooltip"},i("slot",null))}get root(){return o(this)}};a.style=":host{z-index:1;box-sizing:border-box;max-width:250px;padding:6px 12px;font-size:12px;color:#2e394c;pointer-events:none;visibility:hidden !important;background-color:#fdfdfd;border:1px solid #b4bccb;border-radius:4px;box-shadow:0 2px 4px rgba(32, 41, 55, 0.24);opacity:0;transition:opacity 0.25s ease-in-out}:host(.gux-show){visibility:visible !important;opacity:1}";const c=class{constructor(i){t(this,i),this.hasTooltip=!1,this.showTooltip=!1,this.iconOnly=!1,this.titleName=""}onmouseenter(t){t.buttons||(this.showTooltip=!0)}onmouseleave(){this.showTooltip=!1}onmousedown(){this.showTooltip=!1}async setShowTooltip(){this.tooltipElement&&(this.showTooltip=!0,await this.tooltipElement.showTooltip())}async setHideTooltip(){this.tooltipElement&&(this.showTooltip=!1,await this.tooltipElement.hideTooltip())}onMutation(){this.titleName=this.setTooltipTitleText(),this.checkForTooltipHideOrShow()}componentWillLoad(){this.titleName=this.setTooltipTitleText()}componentDidLoad(){this.logErrorNoIconSrText()}logErrorNoIconSrText(){this.iconOnly&&!this.titleName&&h("gux-tooltip-title","No screenreader-text provided. Provide a localized screenreader-text property for the gux-icon. The screenreader-text property is used for the icon screenreader text and the tooltip.")}addIconDecorative(){this.root.classList.add("gux-tooltip-icon-decorative")}getTitleElements(){var t;const i=this.root.querySelector("slot"),e=null===(t=this.root.querySelector(".gux-title-container span"))||void 0===t?void 0:t.children;return i?i.assignedElements():e?Array.from(e):[]}getTitleTextContent(){return this.root.querySelector("slot")?this.root.querySelector("slot").assignedNodes().map((t=>t.textContent)).join("").trim():this.root.querySelector(".gux-title-container")?this.root.querySelector(".gux-title-container").textContent.trim():""}setTooltipTitleText(){let t=this.getTitleTextContent();return this.getTitleElements().forEach((i=>{"GUX-ICON"!==i.tagName||this.getTitleTextContent()?"GUX-ICON"===i.tagName&&this.getTitleTextContent()&&this.addIconDecorative():(this.iconOnly=!0,t=i.getAttribute("screenreader-text"))})),t}checkForTooltipHideOrShow(){const t=this.root.querySelector(".gux-title-container");this.root.classList.remove("gux-overflow-hidden"),this.iconOnly&&this.titleName?this.hasTooltip=!0:(null==t?void 0:t.scrollWidth)>(null==t?void 0:t.offsetWidth)?(this.root.classList.add("gux-overflow-hidden"),this.hasTooltip=!0):this.hasTooltip=!1}render(){return[i("span",{class:"gux-title-container"},i("slot",null)),this.renderTooltip()]}renderTooltip(){if(this.hasTooltip)return i("gux-tooltip",{"aria-hidden":"true",ref:t=>this.tooltipElement=t,hidden:!this.showTooltip},this.titleName)}get root(){return o(this)}};(function(t,i,e,o){var s,r=arguments.length,n=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,i,e,o);else for(var h=t.length-1;h>=0;h--)(s=t[h])&&(n=(r<3?s(n):r>3?s(i,e,n):s(i,e))||n);r>3&&n&&Object.defineProperty(i,e,n)})([l({childList:!0,subtree:!0})],c.prototype,"onMutation",null),c.style="gux-tooltip-title{overflow:hidden;cursor:default}gux-tooltip{font-weight:normal;line-height:normal;text-align:left;overflow-wrap:break-word;white-space:normal}.gux-overflow-hidden .gux-title-container ::slotted(span){overflow:hidden;text-overflow:ellipsis}.gux-overflow-hidden .gux-title-container>*{overflow:hidden;text-overflow:ellipsis}.gux-title-container{display:flex;pointer-events:none}.gux-tooltip-icon-decorative .gux-title-container{position:relative;margin-left:calc(1rem + 4px)}.gux-tooltip-icon-decorative .gux-title-container gux-icon,.gux-tooltip-icon-decorative .gux-title-container ::slotted(gux-icon){position:absolute;left:calc(-1rem - 4px);flex-shrink:0}";export{a as gux_tooltip,c as gux_tooltip_title}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,h as o,g as l}from"./p-a085b143.js";import{t}from"./p-
|
|
1
|
+
import{r as e,h as o,g as l}from"./p-a085b143.js";import{t}from"./p-0749ddc0.js";import{b as r}from"./p-2548bdad.js";import"./p-8a133b9b.js";const a={neutral:"badge with label: {label}, color: neutral","neutral-bold":"badge with label: {label}, color: neutral bold",green:"badge with label: {label}, color: green","green-bold":"badge with label: {label}, color: green bold",yellow:"badge with label: {label}, color: yellow","yellow-bold":"badge with label: {label}, color: yellow bold",red:"badge with label: {label}, color: red","red-bold":"badge with label: {label}, color: red bold"},d=class{constructor(o){e(this,o),this.color="neutral",this.bold=!1}onSlotChange(e){const o=e.composedPath()[0].assignedNodes();this.label=o.map((e=>e.textContent)).join("")}renderBadgeTitle(){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.getVariant(),{label:this.label}))}getVariant(){return`${this.color}${this.bold?"-bold":""}`}async componentWillLoad(){t(this.root),this.i18n=await r(this.root,a)}render(){return o("div",{class:{"gux-badge":!0,[`gux-${this.color}`]:!0,"gux-bold":this.bold}},this.renderBadgeTitle(),this.renderSrText())}get root(){return l(this)}};d.style=":host{display:inline-block}.gux-badge{display:flex;flex-direction:row;flex-wrap:nowrap;align-content:stretch;align-items:center;justify-content:flex-start;height:20px;padding:2px 8px;color:#fdfdfd;background-color:#2e394c;border-radius:4px;font-family:Roboto, sans-serif;font-weight:400;font-weight:700;font-size:12px;line-height:16px}.gux-badge gux-tooltip-title{white-space:nowrap;cursor:default}.gux-badge gux-tooltip-title ::slotted(gux-icon){height:16px;font-size:16px}.gux-badge .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-badge.gux-neutral{color:#2e394c;background-color:#e2e6ee}.gux-badge.gux-neutral.gux-bold{color:#fdfdfd;background-color:#2e394c}.gux-badge.gux-red{color:#8f0707;background-color:#fceaea}.gux-badge.gux-red.gux-bold{color:#fdfdfd;background-color:#ea0b0b}.gux-badge.gux-yellow{color:#976700;background-color:#fdf8ec}.gux-badge.gux-yellow.gux-bold{color:#2e394c;background-color:#ffae00}.gux-badge.gux-green{color:#205a10;background-color:#eefcea}.gux-badge.gux-green.gux-bold{color:#fdfdfd;background-color:#3c8527}";export{d as gux_badge_beta}
|
package/dist/stencil-wrapper.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { defineCustomElements } from '../dist/loader';
|
|
8
8
|
// Value templated out during build process (see scripts/wrap-stencil.js)
|
|
9
|
-
const CDN_URL = 'https://app.mypurecloud.com/spark-components/build-assets/3.
|
|
9
|
+
const CDN_URL = 'https://app.mypurecloud.com/spark-components/build-assets/3.4.1-42/genesys-webcomponents/';
|
|
10
10
|
export function registerElements() {
|
|
11
11
|
if (CDN_URL) {
|
|
12
12
|
defineCustomElements(window, { resourcesUrl: CDN_URL });
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { JSX } from '../../../stencil-public-runtime';
|
|
2
|
+
export declare class GuxCopyToClipboard {
|
|
3
|
+
private i18n;
|
|
4
|
+
private root;
|
|
5
|
+
tooltipContent: string;
|
|
6
|
+
onMouseleave(): void;
|
|
7
|
+
onFocusout(): void;
|
|
8
|
+
onFocus(): void;
|
|
9
|
+
private resetTooltip;
|
|
10
|
+
private onCopyToClipboard;
|
|
11
|
+
componentWillLoad(): Promise<void>;
|
|
12
|
+
render(): JSX.Element;
|
|
13
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { JSX } from '../../../stencil-public-runtime';
|
|
2
|
+
import { GuxTooltipPlacements } from './gux-tooltip.types';
|
|
2
3
|
/**
|
|
3
4
|
* @slot - Content of the tooltip
|
|
4
5
|
*/
|
|
@@ -16,6 +17,10 @@ export declare class GuxTooltip {
|
|
|
16
17
|
* Indicates the id of the element the popover should anchor to. (If not supplied the parent element is used)
|
|
17
18
|
*/
|
|
18
19
|
for: string;
|
|
20
|
+
/**
|
|
21
|
+
* Placement of the tooltip. Default is bottom-start
|
|
22
|
+
*/
|
|
23
|
+
placement: GuxTooltipPlacements;
|
|
19
24
|
/**
|
|
20
25
|
* If tooltip is shown or not
|
|
21
26
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type GuxTooltipPlacements = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'right' | 'right-start' | 'right-end' | 'left' | 'left-start' | 'left-end' | 'auto' | 'auto-start' | 'auto-end';
|
|
@@ -35,6 +35,7 @@ import { GuxTableSelectedState, GuxTableSortState } from "./components/beta/gux-
|
|
|
35
35
|
import { GuxTabsAlignment, GuxTabsOrientation } from "./components/stable/gux-tabs/gux-tabs-types";
|
|
36
36
|
import { GuxTagColor } from "./components/beta/gux-tag/gux-tag.types";
|
|
37
37
|
import { GuxToggleLabelPosition } from "./components/stable/gux-toggle/gux-toggle.types";
|
|
38
|
+
import { GuxTooltipPlacements } from "./components/stable/gux-tooltip/gux-tooltip.types";
|
|
38
39
|
export namespace Components {
|
|
39
40
|
interface GuxAccordion {
|
|
40
41
|
"singleOpenSection": boolean;
|
|
@@ -509,6 +510,8 @@ export namespace Components {
|
|
|
509
510
|
*/
|
|
510
511
|
"matchCount": number;
|
|
511
512
|
}
|
|
513
|
+
interface GuxCopyToClipboardBeta {
|
|
514
|
+
}
|
|
512
515
|
interface GuxDatepicker {
|
|
513
516
|
/**
|
|
514
517
|
* Disable the input and prevent interactions.
|
|
@@ -1213,6 +1216,10 @@ export namespace Components {
|
|
|
1213
1216
|
*/
|
|
1214
1217
|
"for": string;
|
|
1215
1218
|
"hideTooltip": () => Promise<void>;
|
|
1219
|
+
/**
|
|
1220
|
+
* Placement of the tooltip. Default is bottom-start
|
|
1221
|
+
*/
|
|
1222
|
+
"placement": GuxTooltipPlacements;
|
|
1216
1223
|
"showTooltip": () => Promise<void>;
|
|
1217
1224
|
}
|
|
1218
1225
|
interface GuxTooltipTitle {
|
|
@@ -1583,6 +1590,12 @@ declare global {
|
|
|
1583
1590
|
prototype: HTMLGuxContentSearchElement;
|
|
1584
1591
|
new (): HTMLGuxContentSearchElement;
|
|
1585
1592
|
};
|
|
1593
|
+
interface HTMLGuxCopyToClipboardBetaElement extends Components.GuxCopyToClipboardBeta, HTMLStencilElement {
|
|
1594
|
+
}
|
|
1595
|
+
var HTMLGuxCopyToClipboardBetaElement: {
|
|
1596
|
+
prototype: HTMLGuxCopyToClipboardBetaElement;
|
|
1597
|
+
new (): HTMLGuxCopyToClipboardBetaElement;
|
|
1598
|
+
};
|
|
1586
1599
|
interface HTMLGuxDatepickerElement extends Components.GuxDatepicker, HTMLStencilElement {
|
|
1587
1600
|
}
|
|
1588
1601
|
var HTMLGuxDatepickerElement: {
|
|
@@ -2141,6 +2154,7 @@ declare global {
|
|
|
2141
2154
|
"gux-command-action": HTMLGuxCommandActionElement;
|
|
2142
2155
|
"gux-command-palette-legacy": HTMLGuxCommandPaletteLegacyElement;
|
|
2143
2156
|
"gux-content-search": HTMLGuxContentSearchElement;
|
|
2157
|
+
"gux-copy-to-clipboard-beta": HTMLGuxCopyToClipboardBetaElement;
|
|
2144
2158
|
"gux-datepicker": HTMLGuxDatepickerElement;
|
|
2145
2159
|
"gux-disclosure-button": HTMLGuxDisclosureButtonElement;
|
|
2146
2160
|
"gux-dismiss-button": HTMLGuxDismissButtonElement;
|
|
@@ -2712,6 +2726,8 @@ declare namespace LocalJSX {
|
|
|
2712
2726
|
*/
|
|
2713
2727
|
"onGuxcurrentmatchchanged"?: (event: GuxContentSearchCustomEvent<number>) => void;
|
|
2714
2728
|
}
|
|
2729
|
+
interface GuxCopyToClipboardBeta {
|
|
2730
|
+
}
|
|
2715
2731
|
interface GuxDatepicker {
|
|
2716
2732
|
/**
|
|
2717
2733
|
* Disable the input and prevent interactions.
|
|
@@ -3465,6 +3481,10 @@ declare namespace LocalJSX {
|
|
|
3465
3481
|
* Indicates the id of the element the popover should anchor to. (If not supplied the parent element is used)
|
|
3466
3482
|
*/
|
|
3467
3483
|
"for"?: string;
|
|
3484
|
+
/**
|
|
3485
|
+
* Placement of the tooltip. Default is bottom-start
|
|
3486
|
+
*/
|
|
3487
|
+
"placement"?: GuxTooltipPlacements;
|
|
3468
3488
|
}
|
|
3469
3489
|
interface GuxTooltipTitle {
|
|
3470
3490
|
}
|
|
@@ -3504,6 +3524,7 @@ declare namespace LocalJSX {
|
|
|
3504
3524
|
"gux-command-action": GuxCommandAction;
|
|
3505
3525
|
"gux-command-palette-legacy": GuxCommandPaletteLegacy;
|
|
3506
3526
|
"gux-content-search": GuxContentSearch;
|
|
3527
|
+
"gux-copy-to-clipboard-beta": GuxCopyToClipboardBeta;
|
|
3507
3528
|
"gux-datepicker": GuxDatepicker;
|
|
3508
3529
|
"gux-disclosure-button": GuxDisclosureButton;
|
|
3509
3530
|
"gux-dismiss-button": GuxDismissButton;
|
|
@@ -3627,6 +3648,7 @@ declare module "@stencil/core" {
|
|
|
3627
3648
|
"gux-command-action": LocalJSX.GuxCommandAction & JSXBase.HTMLAttributes<HTMLGuxCommandActionElement>;
|
|
3628
3649
|
"gux-command-palette-legacy": LocalJSX.GuxCommandPaletteLegacy & JSXBase.HTMLAttributes<HTMLGuxCommandPaletteLegacyElement>;
|
|
3629
3650
|
"gux-content-search": LocalJSX.GuxContentSearch & JSXBase.HTMLAttributes<HTMLGuxContentSearchElement>;
|
|
3651
|
+
"gux-copy-to-clipboard-beta": LocalJSX.GuxCopyToClipboardBeta & JSXBase.HTMLAttributes<HTMLGuxCopyToClipboardBetaElement>;
|
|
3630
3652
|
"gux-datepicker": LocalJSX.GuxDatepicker & JSXBase.HTMLAttributes<HTMLGuxDatepickerElement>;
|
|
3631
3653
|
"gux-disclosure-button": LocalJSX.GuxDisclosureButton & JSXBase.HTMLAttributes<HTMLGuxDisclosureButtonElement>;
|
|
3632
3654
|
"gux-dismiss-button": LocalJSX.GuxDismissButton & JSXBase.HTMLAttributes<HTMLGuxDismissButtonElement>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "genesys-spark-components",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.2",
|
|
4
4
|
"description": "Common webcomponents",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/stencil-wrapper.js",
|
|
@@ -175,6 +175,7 @@
|
|
|
175
175
|
"rules": {
|
|
176
176
|
"no-descending-specificity": null,
|
|
177
177
|
"no-duplicate-selectors": null,
|
|
178
|
+
"value-no-vendor-prefix": null,
|
|
178
179
|
"property-no-vendor-prefix": null,
|
|
179
180
|
"selector-type-no-unknown": [
|
|
180
181
|
true,
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r,h as s,g as t}from"./p-a085b143.js";import{t as a}from"./p-8d6a8fc1.js";const e=class{constructor(s){r(this,s)}componentWillLoad(){a(this.root)}render(){return s("gux-radial-loading",{class:"gux-spinner","screenreader-text":this.screenreaderText,context:"full-page"})}get root(){return t(this)}};e.style=":host{display:flex}.gux-spinner{margin:auto}";export{e as gux_page_loading_spinner}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as i,H as e,g as o}from"./p-a085b143.js";import{r as s}from"./p-cbcbd1bb.js";import{t as r}from"./p-8d6a8fc1.js";import{c as n}from"./p-4c66f794.js";import{l as h}from"./p-3184268e.js";import{O as l}from"./p-4b7056b2.js";const a=class{constructor(i){t(this,i),this.mouseenterHandler=()=>this.show(),this.mouseleaveHandler=()=>this.hide(),this.focusinHandler=()=>this.show(),this.focusoutHandler=()=>this.hide(),this.id=s("gux-tooltip"),this.isShown=!1}handleKeyDown(t){"Escape"===t.key&&this.isShown&&this.hide()}async showTooltip(){this.show()}async hideTooltip(){this.hide()}show(){this.popperInstance.forceUpdate(),this.delayTimeout=setTimeout((()=>{this.isShown=!0}),750)}hide(){clearTimeout(this.delayTimeout),this.isShown=!1}getForElement(){this.forElement=this.for?document.getElementById(this.for):this.root.parentElement}logForAttributeError(){console.error(`gux-tooltip: invalid element supplied to 'for': "${this.for}"`)}connectedCallback(){this.getForElement(),this.forElement?(this.forElement.setAttribute("aria-describedby",this.id),this.popperInstance=n(this.forElement,this.root,{modifiers:[{name:"offset",options:{offset:[0,16]}}],placement:"bottom-start",strategy:"fixed"}),this.forElement.addEventListener("mouseenter",this.mouseenterHandler),this.forElement.addEventListener("mouseleave",this.mouseleaveHandler),this.forElement.addEventListener("focusin",this.focusinHandler),this.forElement.addEventListener("focusout",this.focusoutHandler)):this.logForAttributeError()}componentWillLoad(){r(this.root)}disconnectedCallback(){this.forElement.removeAttribute("aria-describedby"),this.popperInstance&&(this.popperInstance.destroy(),this.popperInstance=null),this.forElement.removeEventListener("mouseenter",this.mouseenterHandler),this.forElement.removeEventListener("mouseleave",this.mouseleaveHandler),this.forElement.removeEventListener("focusin",this.focusinHandler),this.forElement.removeEventListener("focusout",this.focusoutHandler)}render(){return i(e,{id:this.id,class:{"gux-show":this.isShown},role:"tooltip"},i("slot",null))}get root(){return o(this)}};a.style=":host{z-index:1;box-sizing:border-box;max-width:250px;padding:6px 12px;font-size:12px;color:#2e394c;pointer-events:none;visibility:hidden !important;background-color:#fdfdfd;border:1px solid #b4bccb;border-radius:4px;box-shadow:0 2px 4px rgba(32, 41, 55, 0.24);opacity:0;transition:opacity 0.25s ease-in-out}:host(.gux-show){visibility:visible !important;opacity:1}";const c=class{constructor(i){t(this,i),this.hasTooltip=!1,this.showTooltip=!1,this.iconOnly=!1,this.titleName=""}onmouseenter(t){t.buttons||(this.showTooltip=!0)}onmouseleave(){this.showTooltip=!1}onmousedown(){this.showTooltip=!1}async setShowTooltip(){this.tooltipElement&&(this.showTooltip=!0,await this.tooltipElement.showTooltip())}async setHideTooltip(){this.tooltipElement&&(this.showTooltip=!1,await this.tooltipElement.hideTooltip())}onMutation(){this.titleName=this.setTooltipTitleText(),this.checkForTooltipHideOrShow()}componentWillLoad(){this.titleName=this.setTooltipTitleText()}componentDidLoad(){this.logErrorNoIconSrText()}logErrorNoIconSrText(){this.iconOnly&&!this.titleName&&h("gux-tooltip-title","No screenreader-text provided. Provide a localized screenreader-text property for the gux-icon. The screenreader-text property is used for the icon screenreader text and the tooltip.")}addIconDecorative(){this.root.classList.add("gux-tooltip-icon-decorative")}getTitleElements(){var t;const i=this.root.querySelector("slot"),e=null===(t=this.root.querySelector(".gux-title-container span"))||void 0===t?void 0:t.children;return i?i.assignedElements():e?Array.from(e):[]}getTitleTextContent(){return this.root.querySelector("slot")?this.root.querySelector("slot").assignedNodes().map((t=>t.textContent)).join("").trim():this.root.querySelector(".gux-title-container")?this.root.querySelector(".gux-title-container").textContent.trim():""}setTooltipTitleText(){let t=this.getTitleTextContent();return this.getTitleElements().forEach((i=>{"GUX-ICON"!==i.tagName||this.getTitleTextContent()?"GUX-ICON"===i.tagName&&this.getTitleTextContent()&&this.addIconDecorative():(this.iconOnly=!0,t=i.getAttribute("screenreader-text"))})),t}checkForTooltipHideOrShow(){const t=this.root.querySelector(".gux-title-container");this.root.classList.remove("gux-overflow-hidden"),this.iconOnly&&this.titleName?this.hasTooltip=!0:(null==t?void 0:t.scrollWidth)>(null==t?void 0:t.offsetWidth)?(this.root.classList.add("gux-overflow-hidden"),this.hasTooltip=!0):this.hasTooltip=!1}render(){return[i("span",{class:"gux-title-container"},i("slot",null)),this.renderTooltip()]}renderTooltip(){if(this.hasTooltip)return i("gux-tooltip",{"aria-hidden":"true",ref:t=>this.tooltipElement=t,hidden:!this.showTooltip},this.titleName)}get root(){return o(this)}};(function(t,i,e,o){var s,r=arguments.length,n=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,i,e,o);else for(var h=t.length-1;h>=0;h--)(s=t[h])&&(n=(r<3?s(n):r>3?s(i,e,n):s(i,e))||n);r>3&&n&&Object.defineProperty(i,e,n)})([l({childList:!0,subtree:!0})],c.prototype,"onMutation",null),c.style="gux-tooltip-title{overflow:hidden;cursor:default}gux-tooltip{font-weight:normal;line-height:normal;text-align:left;overflow-wrap:break-word;white-space:normal}.gux-overflow-hidden .gux-title-container ::slotted(span){overflow:hidden;text-overflow:ellipsis}.gux-overflow-hidden .gux-title-container>*{overflow:hidden;text-overflow:ellipsis}.gux-title-container{display:flex;pointer-events:none}.gux-tooltip-icon-decorative .gux-title-container{position:relative;margin-left:calc(1rem + 4px)}.gux-tooltip-icon-decorative .gux-title-container gux-icon,.gux-tooltip-icon-decorative .gux-title-container ::slotted(gux-icon){position:absolute;left:calc(-1rem - 4px);flex-shrink:0}";export{a as gux_tooltip,c as gux_tooltip_title}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as i,d as a,w as o,h as s,g as n}from"./p-a085b143.js";import{S as e}from"./p-020b6498.js";import{O as c}from"./p-4b7056b2.js";import{b as r}from"./p-2548bdad.js";import{e as l}from"./p-29e8b184.js";import{t as d}from"./p-2c3d934a.js";import"./p-8a133b9b.js";const b=class{constructor(a){t(this,a),this.newTab=i(this,"newTab",7),this.sortChanged=i(this,"sortChanged",7),this.moveFocusDelay=100,this.showNewTabButton=!0,this.tabLimit=1/0,this.allowSort=!0,this.focused=0,this.disableAddTabButton=!1,this.hasScrollbar=!1,this.keyboardSort=!1,this.initialSortIndex=0,this.ariaLiveAlert=""}onFocusin(t){this.allowSort&&l(".gux-scrollable-section",t)&&!this.keyboardSort&&(this.ariaLiveAlert="toggleSort")}onFocusout(t){this.root.querySelector(".gux-scrollable-section").contains(t.relatedTarget)||this.tabTriggers.forEach((async(t,i)=>{await t.guxGetActive()?this.focused=i:(t.querySelector(".gux-tab-button").setAttribute("tabindex","-1"),t.querySelector(".gux-tab-options-button")&&t.querySelector(".gux-tab-options-button").setAttribute("tabindex","-1"))}))}onMutation(){this.setTabTriggers()}onKeydown(t){switch(t.key){case"ArrowRight":case"ArrowDown":if(t.preventDefault(),this.keyboardSort&&!l(".gux-tab-options-button",t)){this.ariaLiveAlert="";const t=this.root.querySelector(".gux-scrollable-section"),i=t.querySelectorAll("gux-tab-advanced"),a=Array.prototype.indexOf.call(i,this.sortTarget);let o;o=a===i.length-1?i[0]:i[a+2],t.insertBefore(this.sortTarget,o),this.tabTriggers=this.root.querySelectorAll("gux-tab-advanced"),this.tabTriggers.forEach(((t,i)=>{var a;t.tabId===(null===(a=this.sortTarget)||void 0===a?void 0:a.getAttribute("tab-id"))&&(this.focused=i)})),this.focusTab(this.focused)}else l(".gux-tab-options-button",t)||l(".gux-dropdown-option-container",t)||this.handleKeyboardScroll("forward");break;case"ArrowLeft":case"ArrowUp":if(t.preventDefault(),this.keyboardSort&&!l(".gux-tab-options-button",t)){this.ariaLiveAlert="";const t=this.root.querySelector(".gux-scrollable-section"),i=t.querySelectorAll("gux-tab-advanced"),a=Array.prototype.indexOf.call(i,this.sortTarget);t.insertBefore(this.sortTarget,i[a-1]||null),this.tabTriggers=this.root.querySelectorAll("gux-tab-advanced"),this.tabTriggers.forEach(((t,i)=>{var a;t.tabId===(null===(a=this.sortTarget)||void 0===a?void 0:a.getAttribute("tab-id"))&&(this.focused=i)})),this.focusTab(this.focused)}else l(".gux-tab-options-button",t)||l(".gux-dropdown-option-container",t)||this.handleKeyboardScroll("backward");break;case"Escape":t.preventDefault(),this.keyboardSort&&this.allowSort&&(this.keyboardSort=!1,this.ariaLiveAlert="sortCancelled",this.root.querySelector(".gux-scrollable-section").insertBefore(this.sortTarget,this.tabTriggers[this.initialSortIndex]||null)),this.tabTriggers=this.root.querySelectorAll("gux-tab-advanced"),this.tabTriggers.forEach(((t,i)=>{var a;t.tabId===(null===(a=this.sortTarget)||void 0===a?void 0:a.getAttribute("tab-id"))&&(this.focused=i)})),this.focusTab(this.initialSortIndex),setTimeout((()=>{this.focusTab(this.initialSortIndex)}),this.moveFocusDelay);break;case"Enter":this.keyboardSort&&(t.preventDefault(),this.keyboardSort=!1,this.ariaLiveAlert="sortComplete",this.tabTriggers=this.root.querySelectorAll("gux-tab-advanced"),this.tabTriggers.forEach(((t,i)=>{var a;t.tabId===(null===(a=this.sortTarget)||void 0===a?void 0:a.getAttribute("tab-id"))&&(this.focused=i)})));break;case"Tab":this.keyboardSort&&(this.keyboardSort=!1,this.ariaLiveAlert="sortCancelled");break;case"Home":t.preventDefault(),this.focusTab(0);break;case"End":t.preventDefault(),this.focusTab(this.tabTriggers.length-1)}}onKeyup(t){switch(t.key){case" ":l(".gux-tab",t)&&!l(".gux-tab-options-button",t)&&!l("gux-popover-list",t)&&this.allowSort&&(t.preventDefault(),!0===this.keyboardSort?(this.keyboardSort=!1,this.ariaLiveAlert="sortComplete",this.tabTriggers=this.root.querySelectorAll("gux-tab-advanced"),this.tabTriggers.forEach(((t,i)=>{var a;t.tabId===(null===(a=this.sortTarget)||void 0===a?void 0:a.getAttribute("tab-id"))&&(this.focused=i)})),this.focusTab(this.focused)):(this.keyboardSort=!0,this.sortTarget=t.target.parentNode.parentNode,this.tabTriggers.forEach(((t,i)=>{var a;t.tabId===(null===(a=this.sortTarget)||void 0===a?void 0:a.getAttribute("tab-id"))&&(this.initialSortIndex=i)})),this.ariaLiveAlert="sortModeOn"))}}async guxSetActive(t){this.tabTriggers.forEach(((i,a)=>{const o=i.tabId===t;i.guxSetActive(o),o&&(this.focused=a)}))}focusTab(t){this.focused=t,this.tabTriggers.forEach((async(t,i)=>{const a=await t.guxGetActive();this.focused===i||a||(t.querySelector(".gux-tab-button").setAttribute("tabindex","-1"),t.querySelector(".gux-tab-options-button")&&t.querySelector(".gux-tab-options-button").setAttribute("tabindex","-1"))})),this.tabTriggers[this.focused].querySelector("button").setAttribute("tabindex","0"),this.tabTriggers[this.focused].querySelector(".gux-tab-options-button")&&this.tabTriggers[this.focused].querySelector(".gux-tab-options-button").setAttribute("tabindex","0"),this.tabTriggers[this.focused].guxFocus()}setTabTriggers(){this.tabTriggers=this.root.querySelectorAll("gux-tab-advanced"),this.triggerIds=this.tabTriggers?Array.from(this.tabTriggers).map((t=>`gux-${t.getAttribute("tab-id")}-tab`)).join(" "):""}createSortable(){this.sortableInstance=new e(this.root.querySelector(".gux-scrollable-section"),{animation:250,draggable:"gux-tab-advanced",filter:".ignore-sort",onMove:t=>!t.related.classList.contains("ignore-sort"),onUpdate:()=>{const t=Array.from(this.root.querySelectorAll("gux-tab-advanced")).map((t=>t.tabId));this.sortChanged.emit(t)}})}destroySortable(){this.sortableInstance&&(this.sortableInstance.destroy(),this.sortableInstance=null)}checkForScrollbarHideOrShow(){a((()=>{const t=this.root.querySelector(".gux-scrollable-section"),i=t.clientWidth<t.scrollWidth;i!==this.hasScrollbar&&(this.hasScrollbar=i)}))}handleKeyboardScroll(t){const i=this.root.querySelector(".gux-scrollable-section"),a=this.root.querySelectorAll("gux-tab-advanced")[this.focused];"forward"===t?this.focused<this.tabTriggers.length-1?(o((()=>{this.hasScrollbar&&i.scrollBy(a.clientWidth,0)})),this.focusTab(this.focused+1)):(o((()=>{this.hasScrollbar&&i.scrollBy(-i.scrollWidth,0)})),this.focusTab(0)):"backward"===t&&(this.focused>0?(o((()=>{this.hasScrollbar&&i.scrollBy(-a.clientWidth,0)})),this.focusTab(this.focused-1)):(o((()=>{this.hasScrollbar&&i.scrollBy(i.scrollWidth,0)})),this.focusTab(this.tabTriggers.length-1)))}disconnectedCallback(){this.sortableInstance&&this.destroySortable(),this.resizeObserver&&this.resizeObserver.unobserve(this.root.querySelector(".gux-tab-container")),this.domObserver&&this.domObserver.disconnect()}async componentWillLoad(){this.setTabTriggers(),this.i18n=await r(this.root,d,"gux-tabs-advanced")}componentDidLoad(){this.allowSort&&!this.sortableInstance&&this.createSortable(),!this.resizeObserver&&window.ResizeObserver&&(this.resizeObserver=new ResizeObserver((()=>this.checkForScrollbarHideOrShow()))),this.resizeObserver&&this.resizeObserver.observe(this.root.querySelector(".gux-scrollable-section")),!this.domObserver&&window.MutationObserver&&(this.domObserver=new MutationObserver((()=>this.checkForScrollbarHideOrShow()))),this.domObserver&&this.domObserver.observe(this.root,{childList:!0,attributes:!1,subtree:!0}),setTimeout((()=>{this.checkForScrollbarHideOrShow()}),500)}scrollLeft(){o((()=>{this.root.querySelector(".gux-scrollable-section").scrollBy(-100,0)}))}scrollRight(){o((()=>{this.root.querySelector(".gux-scrollable-section").scrollBy(100,0)}))}scrollUp(){o((()=>{this.root.querySelector(".gux-scrollable-section").scrollBy(0,-100)}))}scrollDown(){o((()=>{this.root.querySelector(".gux-scrollable-section").scrollBy(0,100)}))}componentWillRender(){Array.from(this.root.querySelectorAll("gux-tab-advanced")).length>=this.tabLimit&&(this.disableAddTabButton=!0)}render(){const t=t=>s("button",{title:this.i18n(this.disableAddTabButton?"disableNewTab":"createNewTab"),class:"add-tab",onClick:()=>t.onClick(),disabled:this.disableAddTabButton},s("gux-icon",{"icon-name":"add",decorative:!0}));return[s("span",{class:"gux-sr-only gux-aria-live-region","aria-live":"polite"},this.ariaLiveAlert?this.i18n(this.ariaLiveAlert):""),s("div",{class:"gux-tab-container"},s("div",{class:"action-button-container"},this.renderScrollButton(this.hasScrollbar?"scrollLeft":"scrollUp")),s("div",{role:"tablist",class:"gux-scrollable-section "+(this.keyboardSort?"gux-tab-sorting":""),"aria-owns":this.triggerIds},s("slot",null)),s("div",{class:"new-tab"},this.showNewTabButton&&!this.hasScrollbar?s(t,{onClick:()=>this.newTab.emit()}):null),s("div",{class:"action-button-container"},this.renderScrollButton(this.hasScrollbar?"scrollRight":"scrollDown"),this.showNewTabButton&&this.hasScrollbar?s(t,{onClick:()=>this.newTab.emit()}):null))]}renderScrollButton(t){return s("div",{class:"gux-scroll-button-container"},this.hasScrollbar?s("button",{tabindex:"-1",title:this.i18n(t),"aria-label":this.i18n(t),class:"gux-scroll-button",onClick:()=>this.getScrollDirection(t)},s("gux-icon",{"icon-name":this.getChevronIconName(t),decorative:!0})):null)}getScrollDirection(t){switch(t){case"scrollLeft":this.scrollLeft();break;case"scrollRight":this.scrollRight();break;case"scrollUp":this.scrollUp();break;case"scrollDown":this.scrollDown()}}getChevronIconName(t){switch(t){case"scrollLeft":return"chevron-left";case"scrollRight":return"chevron-right";case"scrollUp":return"chevron-up";case"scrollDown":return"chevron-down"}}get root(){return n(this)}};(function(t,i,a,o){var s,n=arguments.length,e=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,a):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)e=Reflect.decorate(t,i,a,o);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(e=(n<3?s(e):n>3?s(i,a,e):s(i,a))||e);n>3&&e&&Object.defineProperty(i,a,e)})([c({childList:!0,subtree:!0})],b.prototype,"onMutation",null),b.style="gux-tab-advanced-list .gux-tab-container{display:flex;align-items:flex-end;width:100%;height:50px;margin-bottom:16px;overflow-x:auto;overflow-y:hidden;background-color:#f6f7f9;border-bottom:1px solid #d7dce5;border-radius:4px 4px 0 0}gux-tab-advanced-list .gux-tab-container .action-button-container{display:flex;border-radius:4px}gux-tab-advanced-list .gux-tab-container .action-button-container .add-tab{display:flex;align-items:center;justify-content:center;width:35px;height:50px;margin-left:2px;color:#2e394c;background-color:#e2e6ee;border:none;border-radius:4px;transition:color 0.25s}gux-tab-advanced-list .gux-tab-container .action-button-container .add-tab:disabled{opacity:0.5}gux-tab-advanced-list .gux-tab-container .action-button-container .add-tab:hover{background-color:#d7dce5}gux-tab-advanced-list .gux-tab-container .action-button-container .add-tab:active{background-color:#c8cfda}gux-tab-advanced-list .gux-tab-container .action-button-container .add-tab:focus{border:3px solid #aac9ff;outline:none}gux-tab-advanced-list .gux-tab-container .action-button-container .add-tab:focus-visible{border:3px solid #aac9ff;border-radius:5px;outline:none}gux-tab-advanced-list .gux-tab-container .action-button-container .add-tab gux-icon{width:16px;height:16px}gux-tab-advanced-list .gux-tab-container .action-button-container .gux-scroll-button-container{display:flex;border-radius:4px}gux-tab-advanced-list .gux-tab-container .action-button-container .gux-scroll-button-container .gux-scroll-button{display:flex;align-items:center;justify-content:center;width:28px;height:50px;padding:0;color:#2e394c;background-color:#e2e6ee;border:none;border-radius:4px;transition:color 0.25s}gux-tab-advanced-list .gux-tab-container .action-button-container .gux-scroll-button-container .gux-scroll-button:focus-visible{border:3px solid #aac9ff;border-radius:5px;outline:none}gux-tab-advanced-list .gux-tab-container .action-button-container .gux-scroll-button-container .gux-scroll-button gux-icon{width:16px;height:16px}gux-tab-advanced-list .gux-tab-container .action-button-container .gux-scroll-button-container .gux-scroll-button:focus{border:3px solid #aac9ff;outline:none}gux-tab-advanced-list .gux-tab-container .action-button-container .gux-scroll-button-container .gux-scroll-button:hover{background-color:#d7dce5}gux-tab-advanced-list .gux-tab-container .action-button-container .gux-scroll-button-container .gux-scroll-button:active{background-color:#c8cfda}gux-tab-advanced-list .gux-tab-container .action-button-container .gux-scroll-button-container .gux-scroll-button:focus-visible{outline:none;box-shadow:0 0 0 1px #fdfdfd, 0 0 0 4px #aac9ff}gux-tab-advanced-list .gux-tab-container .new-tab .add-tab{display:flex;align-items:center;justify-content:center;width:35px;height:50px;padding:0;color:#2e394c;background-color:#e2e6ee;border:none;border-radius:4px;transition:color 0.25s}gux-tab-advanced-list .gux-tab-container .new-tab .add-tab:hover{background-color:#d7dce5}gux-tab-advanced-list .gux-tab-container .new-tab .add-tab:active{background-color:#c8cfda}gux-tab-advanced-list .gux-tab-container .new-tab .add-tab:focus{border:3px solid #aac9ff;outline:none}gux-tab-advanced-list .gux-tab-container .new-tab .add-tab:focus-visible{border:3px solid #aac9ff;border-radius:5px;outline:none}gux-tab-advanced-list .gux-tab-container .new-tab .add-tab gux-icon{width:16px;height:16px}gux-tab-advanced-list .gux-tab-container .gux-scrollable-section{display:flex;align-items:flex-end;height:50px;overflow-x:auto;scroll-behavior:smooth;scrollbar-width:none}gux-tab-advanced-list .gux-tab-container .gux-scrollable-section::-webkit-scrollbar{height:0}gux-tab-advanced-list .gux-sr-only{position:absolute;top:auto;left:-10000px;width:1px;height:1px;overflow:hidden}";export{b as gux_tab_advanced_list}
|