@pine-ds/core 4.7.2 → 4.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/pds-avatar.js +1 -1
- package/components/pds-button2.js +1 -1
- package/components/pds-checkbox2.js +1 -1
- package/components/pds-chip2.js +1 -1
- package/components/pds-combobox.js +1 -1
- package/components/pds-dropdown-menu-item.js +1 -1
- package/components/pds-dropdown-menu.js +1 -1
- package/components/pds-modal-content.js +1 -1
- package/components/pds-modal2.js +1 -1
- package/components/pds-multiselect.js +1 -1
- package/components/pds-popover.js +1 -1
- package/components/pds-radio-group.js +1 -1
- package/components/pds-radio.js +1 -1
- package/components/pds-switch.js +1 -1
- package/components/pds-table-head-cell2.js +1 -1
- package/components/pds-textarea.js +1 -1
- package/components/pds-toast.js +1 -1
- package/components/truncation-tooltip.js +1 -1
- package/dist/cjs/{index-5Azb8EQG.js → index-Do70atou.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/pds-accordion.cjs.entry.js +1 -1
- package/dist/cjs/pds-avatar.cjs.entry.js +3 -3
- package/dist/cjs/pds-button.cjs.entry.js +24 -21
- package/dist/cjs/pds-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/pds-chip.cjs.entry.js +4 -4
- package/dist/cjs/pds-combobox.cjs.entry.js +4 -4
- package/dist/cjs/pds-copytext.cjs.entry.js +2 -2
- package/dist/cjs/pds-datepicker.cjs.entry.js +1 -1
- package/dist/cjs/pds-dropdown-menu-item.cjs.entry.js +31 -2
- package/dist/cjs/pds-dropdown-menu.cjs.entry.js +4 -4
- package/dist/cjs/pds-filter.cjs.entry.js +1 -1
- package/dist/cjs/pds-input.cjs.entry.js +1 -1
- package/dist/cjs/pds-link.cjs.entry.js +1 -1
- package/dist/cjs/pds-modal-content.cjs.entry.js +32 -30
- package/dist/cjs/pds-modal.cjs.entry.js +4 -4
- package/dist/cjs/pds-multiselect.cjs.entry.js +6 -6
- package/dist/cjs/pds-popover.cjs.entry.js +187 -11
- package/dist/cjs/pds-radio-group.cjs.entry.js +2 -2
- package/dist/cjs/pds-radio.cjs.entry.js +3 -3
- package/dist/cjs/pds-select.cjs.entry.js +1 -1
- package/dist/cjs/pds-sortable-item.cjs.entry.js +1 -1
- package/dist/cjs/pds-switch.cjs.entry.js +2 -2
- package/dist/cjs/pds-table-cell.cjs.entry.js +1 -1
- package/dist/cjs/pds-table-head-cell.cjs.entry.js +2 -2
- package/dist/cjs/pds-text.cjs.entry.js +1 -1
- package/dist/cjs/pds-textarea.cjs.entry.js +2 -2
- package/dist/cjs/pds-toast.cjs.entry.js +1 -1
- package/dist/cjs/pine-core.cjs.js +1 -1
- package/dist/cjs/{truncation-tooltip-DO9xli2e.js → truncation-tooltip-BtuiXLV0.js} +31 -6
- package/dist/collection/components/pds-avatar/pds-avatar.js +2 -2
- package/dist/collection/components/pds-button/pds-button.js +24 -22
- package/dist/collection/components/pds-button/stories/pds-button.stories.js +3 -3
- package/dist/collection/components/pds-checkbox/pds-checkbox.js +1 -1
- package/dist/collection/components/pds-chip/pds-chip.js +2 -2
- package/dist/collection/components/pds-combobox/pds-combobox.js +4 -4
- package/dist/collection/components/pds-datepicker/stories/pds-datepicker.stories.js +1 -1
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.css +8 -0
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.js +58 -6
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu.js +4 -4
- package/dist/collection/components/pds-dropdown-menu/stories/pds-dropdown-menu.stories.js +39 -0
- package/dist/collection/components/pds-modal/pds-modal-content/pds-modal-content.js +32 -30
- package/dist/collection/components/pds-modal/pds-modal.js +4 -4
- package/dist/collection/components/pds-multiselect/pds-multiselect.js +5 -5
- package/dist/collection/components/pds-popover/pds-popover.js +240 -11
- package/dist/collection/components/pds-popover/stories/pds-popover.stories.js +31 -0
- package/dist/collection/components/pds-radio/pds-radio.js +2 -2
- package/dist/collection/components/pds-radio-group/pds-radio-group.js +1 -1
- package/dist/collection/components/pds-switch/pds-switch.js +1 -1
- package/dist/collection/components/pds-table/pds-table-head-cell/pds-table-head-cell.js +1 -1
- package/dist/collection/components/pds-table/stories/pds-table.stories.js +1 -1
- package/dist/collection/components/pds-text/stories/pds-text.stories.js +1 -1
- package/dist/collection/components/pds-textarea/pds-textarea.js +1 -1
- package/dist/collection/components/pds-toast/pds-toast.js +1 -1
- package/dist/collection/utils/truncation-tooltip.js +31 -6
- package/dist/docs.json +124 -7
- package/dist/esm/{index-BJXk71tO.js → index-BWDu62Mo.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/pds-accordion.entry.js +1 -1
- package/dist/esm/pds-avatar.entry.js +3 -3
- package/dist/esm/pds-button.entry.js +24 -21
- package/dist/esm/pds-checkbox.entry.js +2 -2
- package/dist/esm/pds-chip.entry.js +4 -4
- package/dist/esm/pds-combobox.entry.js +4 -4
- package/dist/esm/pds-copytext.entry.js +2 -2
- package/dist/esm/pds-datepicker.entry.js +1 -1
- package/dist/esm/pds-dropdown-menu-item.entry.js +31 -2
- package/dist/esm/pds-dropdown-menu.entry.js +4 -4
- package/dist/esm/pds-filter.entry.js +1 -1
- package/dist/esm/pds-input.entry.js +1 -1
- package/dist/esm/pds-link.entry.js +1 -1
- package/dist/esm/pds-modal-content.entry.js +32 -30
- package/dist/esm/pds-modal.entry.js +4 -4
- package/dist/esm/pds-multiselect.entry.js +6 -6
- package/dist/esm/pds-popover.entry.js +187 -11
- package/dist/esm/pds-radio-group.entry.js +2 -2
- package/dist/esm/pds-radio.entry.js +3 -3
- package/dist/esm/pds-select.entry.js +1 -1
- package/dist/esm/pds-sortable-item.entry.js +1 -1
- package/dist/esm/pds-switch.entry.js +2 -2
- package/dist/esm/pds-table-cell.entry.js +1 -1
- package/dist/esm/pds-table-head-cell.entry.js +2 -2
- package/dist/esm/pds-text.entry.js +1 -1
- package/dist/esm/pds-textarea.entry.js +2 -2
- package/dist/esm/pds-toast.entry.js +1 -1
- package/dist/esm/pine-core.js +1 -1
- package/dist/esm/{truncation-tooltip-DRXsdKk1.js → truncation-tooltip-FaW67DiY.js} +31 -6
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/pds-accordion.entry.js +1 -1
- package/dist/esm-es5/pds-avatar.entry.js +1 -1
- package/dist/esm-es5/pds-button.entry.js +1 -1
- package/dist/esm-es5/pds-checkbox.entry.js +1 -1
- package/dist/esm-es5/pds-chip.entry.js +1 -1
- package/dist/esm-es5/pds-combobox.entry.js +1 -1
- package/dist/esm-es5/pds-copytext.entry.js +1 -1
- package/dist/esm-es5/pds-datepicker.entry.js +1 -1
- package/dist/esm-es5/pds-dropdown-menu-item.entry.js +1 -1
- package/dist/esm-es5/pds-dropdown-menu.entry.js +1 -1
- package/dist/esm-es5/pds-filter.entry.js +1 -1
- package/dist/esm-es5/pds-input.entry.js +1 -1
- package/dist/esm-es5/pds-link.entry.js +1 -1
- package/dist/esm-es5/pds-modal-content.entry.js +1 -1
- package/dist/esm-es5/pds-modal.entry.js +1 -1
- package/dist/esm-es5/pds-multiselect.entry.js +1 -1
- package/dist/esm-es5/pds-popover.entry.js +1 -1
- package/dist/esm-es5/pds-radio-group.entry.js +1 -1
- package/dist/esm-es5/pds-radio.entry.js +1 -1
- package/dist/esm-es5/pds-select.entry.js +1 -1
- package/dist/esm-es5/pds-sortable-item.entry.js +1 -1
- package/dist/esm-es5/pds-switch.entry.js +1 -1
- package/dist/esm-es5/pds-table-cell.entry.js +1 -1
- package/dist/esm-es5/pds-table-head-cell.entry.js +1 -1
- package/dist/esm-es5/pds-text.entry.js +1 -1
- package/dist/esm-es5/pds-textarea.entry.js +1 -1
- package/dist/esm-es5/pds-toast.entry.js +1 -1
- package/dist/esm-es5/pine-core.js +1 -1
- package/dist/esm-es5/truncation-tooltip-FaW67DiY.js +1 -0
- package/dist/pine-core/{p-e836f3ec.system.entry.js → p-00a50de5.system.entry.js} +2 -2
- package/dist/pine-core/{p-1437585e.system.entry.js → p-047433a4.system.entry.js} +1 -1
- package/dist/pine-core/{p-7fa66cad.entry.js → p-089c3e60.entry.js} +1 -1
- package/dist/pine-core/{p-341c38f1.system.entry.js → p-0af0d752.system.entry.js} +1 -1
- package/dist/pine-core/{p-3a959459.system.entry.js → p-121612a7.system.entry.js} +1 -1
- package/dist/pine-core/{p-cde8eb81.entry.js → p-138b278b.entry.js} +1 -1
- package/dist/pine-core/{p-cfd012d4.entry.js → p-158b2f51.entry.js} +1 -1
- package/dist/pine-core/p-17f97f1a.entry.js +1 -0
- package/dist/pine-core/{p-5c90091e.system.entry.js → p-19ba2788.system.entry.js} +1 -1
- package/dist/pine-core/{p-355e4cf9.entry.js → p-25ea48d1.entry.js} +1 -1
- package/dist/pine-core/{p-c81d8ac8.entry.js → p-295f64ea.entry.js} +1 -1
- package/dist/pine-core/{p-576cf904.system.entry.js → p-29cd4113.system.entry.js} +1 -1
- package/dist/pine-core/{p-1ee86d87.system.entry.js → p-332590c7.system.entry.js} +1 -1
- package/dist/pine-core/p-36cb4bf6.entry.js +1 -0
- package/dist/pine-core/{p-080cb087.system.entry.js → p-3c977d8d.system.entry.js} +1 -1
- package/dist/pine-core/p-3d51891a.entry.js +1 -0
- package/dist/pine-core/{p-72865997.entry.js → p-44f546ae.entry.js} +1 -1
- package/dist/pine-core/{p-b60ac7eb.system.entry.js → p-4bfc8b3e.system.entry.js} +1 -1
- package/dist/pine-core/p-5833a072.system.entry.js +1 -0
- package/dist/pine-core/p-5cfd4d41.system.entry.js +1 -0
- package/dist/pine-core/{p-f2c253d8.entry.js → p-62433f32.entry.js} +1 -1
- package/dist/pine-core/{p-ebd0bff2.entry.js → p-631f5bcc.entry.js} +1 -1
- package/dist/pine-core/p-717323e4.entry.js +1 -0
- package/dist/pine-core/{p-e7a95a49.system.entry.js → p-719542e1.system.entry.js} +1 -1
- package/dist/pine-core/p-73f931a1.entry.js +1 -0
- package/dist/pine-core/{p-f77905aa.system.entry.js → p-884cb31d.system.entry.js} +1 -1
- package/dist/pine-core/{p-4435fff6.system.entry.js → p-8987fd45.system.entry.js} +1 -1
- package/dist/pine-core/{p-02088776.entry.js → p-8c588ca0.entry.js} +1 -1
- package/dist/pine-core/p-8e3ff75d.entry.js +1 -0
- package/dist/pine-core/{p-bd26a5e8.entry.js → p-90d5edc6.entry.js} +1 -1
- package/dist/pine-core/p-91f60173.entry.js +1 -0
- package/dist/pine-core/{p-258770cf.system.entry.js → p-9265497e.system.entry.js} +1 -1
- package/dist/pine-core/p-99fdf70f.entry.js +1 -0
- package/dist/pine-core/{p-0a84d220.entry.js → p-9aaedded.entry.js} +1 -1
- package/dist/pine-core/p-9df5e204.entry.js +1 -0
- package/dist/pine-core/p-CuSNnuFu.system.js +1 -1
- package/dist/pine-core/p-D04W0cAO.system.js +1 -0
- package/dist/pine-core/{p-6d603d16.system.entry.js → p-acca5f7b.system.entry.js} +1 -1
- package/dist/pine-core/{p-a19cd59c.entry.js → p-aff411d0.entry.js} +1 -1
- package/dist/pine-core/{p-bb73ad66.entry.js → p-b182f806.entry.js} +1 -1
- package/dist/pine-core/{p-01aa382c.system.entry.js → p-b9d145f8.system.entry.js} +1 -1
- package/dist/pine-core/p-bdac8f2b.entry.js +1 -0
- package/dist/pine-core/{p-aa032a5e.system.entry.js → p-be9b6e63.system.entry.js} +1 -1
- package/dist/pine-core/{p-ff3de72e.entry.js → p-c483997a.entry.js} +1 -1
- package/dist/pine-core/p-c4e12f0a.entry.js +1 -0
- package/dist/pine-core/{p-e8cb76e8.entry.js → p-c97bfac9.entry.js} +1 -1
- package/dist/pine-core/{p-bd67156b.system.entry.js → p-ca4ee736.system.entry.js} +1 -1
- package/dist/pine-core/p-cccfe60f.system.entry.js +1 -0
- package/dist/pine-core/{p-c5c9ed36.system.entry.js → p-d3d69ca4.system.entry.js} +1 -1
- package/dist/pine-core/{p-f0d24298.system.entry.js → p-ea340c55.system.entry.js} +1 -1
- package/dist/pine-core/{p-88ff1604.entry.js → p-ea8f5d29.entry.js} +1 -1
- package/dist/pine-core/{p-d8570b4b.system.entry.js → p-eaf85be6.system.entry.js} +1 -1
- package/dist/pine-core/{p-fc25b956.system.entry.js → p-ecc7a531.system.entry.js} +1 -1
- package/dist/pine-core/{p-cfc52b95.system.entry.js → p-ee0e30bf.system.entry.js} +1 -1
- package/dist/pine-core/{p-e803f629.system.entry.js → p-ef13f665.system.entry.js} +1 -1
- package/dist/pine-core/{p-97d0b89e.system.entry.js → p-f3067d90.system.entry.js} +1 -1
- package/dist/pine-core/{p-JtdHT_W5.js → p-jrkGLEPe.js} +1 -1
- package/dist/pine-core/pine-core.esm.js +1 -1
- package/dist/types/components/pds-button/pds-button.d.ts +3 -4
- package/dist/types/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.d.ts +13 -3
- package/dist/types/components/pds-modal/pds-modal-content/pds-modal-content.d.ts +2 -0
- package/dist/types/components/pds-popover/pds-popover.d.ts +43 -1
- package/dist/types/components.d.ts +43 -10
- package/dist/types/utils/truncation-tooltip.d.ts +4 -4
- package/dist/types/utils/types.d.ts +1 -0
- package/dist/vscode.html-data.json +50 -7
- package/hydrate/index.js +340 -103
- package/hydrate/index.mjs +340 -103
- package/package.json +2 -2
- package/dist/esm-es5/truncation-tooltip-DRXsdKk1.js +0 -1
- package/dist/pine-core/p-153ba77b.entry.js +0 -1
- package/dist/pine-core/p-645a482b.system.entry.js +0 -1
- package/dist/pine-core/p-7bf6563a.system.entry.js +0 -1
- package/dist/pine-core/p-80a698ae.entry.js +0 -1
- package/dist/pine-core/p-82cf4ec6.entry.js +0 -1
- package/dist/pine-core/p-8d292b48.entry.js +0 -1
- package/dist/pine-core/p-92ae6082.entry.js +0 -1
- package/dist/pine-core/p-993d1043.entry.js +0 -1
- package/dist/pine-core/p-a787b34a.system.entry.js +0 -1
- package/dist/pine-core/p-b69f04b7.entry.js +0 -1
- package/dist/pine-core/p-beb23781.entry.js +0 -1
- package/dist/pine-core/p-c36b490e.entry.js +0 -1
- package/dist/pine-core/p-ca0d48e8.entry.js +0 -1
- package/dist/pine-core/p-f474d7de.entry.js +0 -1
- package/dist/pine-core/p-qhdoK1Jp.system.js +0 -1
- /package/dist/esm-es5/{index-BJXk71tO.js → index-BWDu62Mo.js} +0 -0
- /package/dist/pine-core/{p-BJXk71tO.js → p-BWDu62Mo.js} +0 -0
- /package/dist/pine-core/{p-n3_ytl_p.system.js → p-ClDiSG97.system.js} +0 -0
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
var index = require('./index-jl_Q819j.js');
|
|
4
4
|
var utils = require('./utils-BhRmyxT8.js');
|
|
5
|
-
var index$1 = require('./index-
|
|
5
|
+
var index$1 = require('./index-Do70atou.js');
|
|
6
6
|
require('./keep-hydrated-CiXgkEYd.js');
|
|
7
7
|
|
|
8
8
|
const pdsButtonCss = () => `:host{--pds-button-background:var(--pds-button-color-background-default);--pds-button-border:var(--pine-border);--pds-button-border-radius:var(--pine-border-radius-full);--pds-button-border-radius-start-end:var(--pine-border-radius-full);--pds-button-border-radius-start-start:var(--pine-border-radius-full);--pds-button-border-radius-end-end:var(--pine-border-radius-full);--pds-button-border-radius-end-start:var(--pine-border-radius-full);--pds-button-min-height:var(--pine-dimension-450);--pds-button-outline-offset:var(--pine-border-width);--pds-button-color-border-default:transparent;--pds-button-color-border-disabled:transparent;--pds-button-color-border-focus:transparent;--pds-button-color-border-hover:transparent;--button-loader-color:var(--pds-button-color-text-default);display:-ms-inline-flexbox;display:inline-flex;vertical-align:middle}:host([full-width=true]){display:-ms-flexbox;display:flex;width:100%}:host([full-width=true]) a,:host([full-width=true]) button{-ms-flex-pack:center;justify-content:center;width:100%}:host([full-width=true]) .pds-button__content{-ms-flex-pack:center;justify-content:center;text-align:center}:host([loading=true]){cursor:wait;pointer-events:none}:host([aria-disabled=true]){pointer-events:none}.pds-button{--pds-loader-color:var(--pds-button-color-text-default);-ms-flex-align:center;align-items:center;background-color:var(--pds-button-background, var(--pds-button-color-background-default));border:var(--pds-button-border);border-color:var(--pds-button-color-border-default);border-radius:var(--pds-button-border-radius);border-end-end-radius:var(--pds-button-border-radius-end-end, var(--pds-button-border-radius));border-end-start-radius:var(--pds-button-border-radius-end-start, var(--pds-button-border-radius));border-start-end-radius:var(--pds-button-border-radius-start-end, var(--pds-button-border-radius));border-start-start-radius:var(--pds-button-border-radius-start-start, var(--pds-button-border-radius));-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--pds-button-color-text-default);cursor:pointer;display:-ms-flexbox;display:flex;font:var(--pine-typography-body-brand-label);letter-spacing:var(--pine-letter-spacing);min-height:var(--pds-button-min-height);padding:calc(var(--pine-dimension-xs) - var(--pine-border-width)) var(--pine-dimension-sm);position:relative;text-decoration:none}.pds-button pds-icon{color:currentColor;fill:currentColor}.pds-button:hover{background-color:var(--pds-button-color-background-hover);border-color:var(--pds-button-color-border-hover)}.pds-button:focus-visible{border-color:var(--pds-button-color-border-focus);-webkit-box-shadow:var(--pds-button-box-shadow-focus, none);box-shadow:var(--pds-button-box-shadow-focus, none);outline:var(--pds-button-outline-focus, var(--pine-outline-focus));outline-offset:var(--pds-button-outline-offset)}.pds-button:disabled{background-color:var(--pds-button-color-background-disabled);border-color:var(--pds-button-color-border-disabled);color:var(--pds-button-color-text-disabled);pointer-events:none}.pds-button--primary{--pds-button-color-background-default:var(--pine-color-primary);--pds-button-color-background-hover:var(--pine-color-primary-hover);--pds-button-color-background-disabled:var(--pine-color-primary-disabled);--pds-button-color-border-default:var(--pine-color-primary);--pds-button-color-border-hover:var(--pine-color-primary-hover);--pds-button-color-text-default:var(--pine-color-text-primary);--pds-button-color-text-disabled:var(--pine-color-text-primary-disabled);--pds-button-color-outline:var(--pine-color-focus-ring);--button-loader-color:var(--pine-color-text-primary)}.pds-button--accent{--pds-button-color-background-default:var(--pine-color-accent);--pds-button-color-background-hover:var(--pine-color-accent-hover);--pds-button-color-background-disabled:var(--pine-color-accent-disabled);--pds-button-color-border-default:var(--pine-color-accent);--pds-button-color-border-hover:var(--pine-color-accent-hover);--pds-button-color-text-default:var(--pine-color-text-primary);--pds-button-color-text-disabled:var(--pine-color-text-accent-disabled);--pds-button-color-outline:var(--pine-color-focus-ring);--button-loader-color:var(--pine-color-text-primary)}.pds-button--destructive{--pds-button-color-background-default:var(--pine-color-danger);--pds-button-color-background-hover:var(--pine-color-danger-hover);--pds-button-color-background-disabled:var(--pine-color-danger-disabled);--pds-button-color-border-default:var(--pine-color-danger);--pds-button-color-border-hover:var(--pine-color-danger-hover);--pds-button-color-text-default:var(--pine-color-white);--pds-button-color-text-disabled:var(--pine-color-text-danger-disabled);--pds-button-color-outline:var(--pine-color-focus-ring-danger);--button-loader-color:var(--pine-color-text-primary)}.pds-button--destructive:focus-visible{outline-color:var(--pine-color-focus-ring-danger)}.pds-button--secondary,.pds-button--disclosure{--pds-button-color-background-default:var(--pine-color-secondary);--pds-button-color-background-hover:var(--pine-color-secondary-hover);--pds-button-color-background-disabled:var(--pine-color-secondary-disabled);--pds-button-color-border-disabled:var(--pine-color-border-disabled);--pds-button-color-border-focus:var(--pine-color-border);--pds-button-color-border-hover:var(--pine-color-border-hover);--pds-button-color-border-default:var(--pine-color-border);--pds-button-color-text-default:var(--pine-color-text-secondary);--pds-button-color-text-disabled:var(--pine-color-text-secondary-disabled);--pds-button-color-outline:var(--pine-color-focus-ring);--button-loader-color:var(--pine-color-text-secondary)}.pds-button--secondary:hover,.pds-button--disclosure:hover{background-color:var(--pine-color-secondary-hover)}.pds-button--tertiary{--pds-button-color-background-default:transparent;--pds-button-color-background-hover:var(--pine-color-background-muted);--pds-button-color-background-disabled:transparent;--pds-button-color-border-default:transparent;--pds-button-color-border-hover:var(--pine-color-background-muted);--pds-button-color-border-disabled:transparent;--pds-button-color-text-default:var(--pine-color-text-secondary);--pds-button-color-text-disabled:var(--pine-color-text-secondary-disabled);--pds-button-color-outline:var(--pine-color-focus-ring);--button-loader-color:var(--pine-color-text-secondary)}.pds-button--filter{--pds-button-color-background-default:var(--pine-color-background-container);--pds-button-color-background-hover:var(--pine-color-background-subtle);--pds-button-color-background-disabled:var(--pine-color-white);--pds-button-color-border-default:transparent;--pds-button-color-border-hover:transparent;--pds-button-color-border-focus:transparent;--pds-button-color-text-default:var(--pine-color-text-secondary);--pds-button-color-text-hover:var(--pine-color-text-hover);--pds-button-color-text-disabled:var(--pine-color-text-disabled);--pds-button-color-outline:var(--pine-color-focus-ring);--button-loader-color:var(--pine-color-text-secondary);--pds-button-border-radius:var(--pine-dimension-125);--pds-button-border-radius-start-end:var(--pine-dimension-125);--pds-button-border-radius-start-start:var(--pine-dimension-125);--pds-button-border-radius-end-end:var(--pine-dimension-125);--pds-button-border-radius-end-start:var(--pine-dimension-125);padding:var(--pine-dimension-xs) var(--pine-dimension-sm)}.pds-button--filter:disabled{background-color:var(--pine-color-background-container)}.pds-button--filter:hover{color:var(--pds-button-color-text-hover)}.pds-button--unstyled{--pds-button-color-background-default:transparent;--pds-button-color-background-hover:transparent;--pds-button-color-background-disabled:transparent;--pds-button-color-text-default:var(--pine-color-text);--button-loader-color:var(--pine-color-text);border-width:var(--pine-dimension-none);margin:var(--pine-dimension-none);min-height:auto;padding:var(--pine-dimension-none);width:inherit}.pds-button__content{-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;gap:var(--pine-dimension-xs);position:relative;width:100%}.pds-button__icon{display:-ms-inline-flexbox;display:inline-flex}.pds-button__icon--empty{display:none}.pds-button__text{-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;white-space:nowrap}.pds-button__icon--hidden,.pds-button__text--hidden{opacity:0}.pds-button__loader{height:var(--pine-dimension-250);left:50%;position:absolute;top:50%;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);width:var(--pine-dimension-250)}.pds-button--loading{cursor:wait;pointer-events:none}.pds-button--loading .pds-button__loader pds-loader{--loader-color:var(--button-loader-color)}.pds-button--small{min-height:var(--pine-dimension-400);padding:calc(var(--pine-dimension-2xs) - var(--pine-border-width)) var(--pine-dimension-sm)}.pds-button--micro{font-size:var(--pine-font-size-085);min-height:var(--pine-dimension-300);padding:var(--pine-dimension-025) var(--pine-dimension-xs)}.pds-button--icon-only{-ms-flex-align:center;align-items:center;border-radius:var(--pine-border-radius-full);height:var(--button-dimension);-ms-flex-pack:center;justify-content:center;min-height:var(--button-dimension);min-width:var(--button-dimension);padding:var(--pine-dimension-xs);width:var(--button-dimension)}.pds-button--icon-only .pds-button__content{height:100%;-ms-flex-pack:center;justify-content:center;width:100%}.pds-button--icon-only .pds-button__text--hidden{border:0;clip:rect(0 0 0 0);-webkit-clip-path:polygon(0 0, 0 0, 0 0);clip-path:polygon(0 0, 0 0, 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.pds-button--icon-only.pds-button--small{height:var(--pine-dimension-400);min-height:var(--pine-dimension-400);min-width:var(--pine-dimension-400);padding:var(--pine-dimension-2xs);width:var(--pine-dimension-400)}.pds-button--icon-only.pds-button--micro{height:var(--pine-dimension-300);min-height:var(--pine-dimension-300);min-width:var(--pine-dimension-300);padding:var(--pine-dimension-3xs);width:var(--pine-dimension-300)}`;
|
|
9
9
|
|
|
10
|
+
const FORWARDED_ARIA_ATTRIBUTES = ['aria-current', 'aria-expanded', 'aria-haspopup', 'aria-label', 'aria-pressed'];
|
|
10
11
|
const PdsButton = class {
|
|
11
12
|
constructor(hostRef) {
|
|
12
13
|
index.registerInstance(this, hostRef);
|
|
@@ -54,11 +55,16 @@ const PdsButton = class {
|
|
|
54
55
|
this.variant = 'primary';
|
|
55
56
|
this.hasStartContent = false;
|
|
56
57
|
this.hasEndContent = false;
|
|
57
|
-
this.
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
58
|
+
this.forwardedAria = {};
|
|
59
|
+
// Copied rather than moved: frameworks and DOM morphs put host attributes back on every update,
|
|
60
|
+
// so taking them off the host would fight each one.
|
|
61
|
+
this.syncHostAria = () => {
|
|
62
|
+
const forwarded = {};
|
|
63
|
+
FORWARDED_ARIA_ATTRIBUTES.forEach((name) => (forwarded[name] = this.el.getAttribute(name)));
|
|
64
|
+
// A new object always re-renders, and frameworks re-set unchanged attributes on every render of their own.
|
|
65
|
+
if (FORWARDED_ARIA_ATTRIBUTES.some((name) => forwarded[name] !== this.forwardedAria[name])) {
|
|
66
|
+
this.forwardedAria = forwarded;
|
|
67
|
+
}
|
|
62
68
|
this.forwardAriaControls();
|
|
63
69
|
};
|
|
64
70
|
this.handleStartSlotChange = (event) => {
|
|
@@ -96,19 +102,19 @@ const PdsButton = class {
|
|
|
96
102
|
};
|
|
97
103
|
}
|
|
98
104
|
connectedCallback() {
|
|
99
|
-
this.
|
|
105
|
+
this.syncHostAria();
|
|
100
106
|
if (typeof MutationObserver === 'undefined')
|
|
101
107
|
return;
|
|
102
|
-
//
|
|
103
|
-
this.
|
|
104
|
-
this.
|
|
105
|
-
attributeFilter:
|
|
108
|
+
// Consumers, popovers and menus set these on the host, often after render, but only the inner element is announced.
|
|
109
|
+
this.hostAriaObserver = new MutationObserver(this.syncHostAria);
|
|
110
|
+
this.hostAriaObserver.observe(this.el, {
|
|
111
|
+
attributeFilter: FORWARDED_ARIA_ATTRIBUTES.concat('aria-controls'),
|
|
106
112
|
});
|
|
107
113
|
}
|
|
108
114
|
disconnectedCallback() {
|
|
109
115
|
var _a;
|
|
110
|
-
(_a = this.
|
|
111
|
-
this.
|
|
116
|
+
(_a = this.hostAriaObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
117
|
+
this.hostAriaObserver = undefined;
|
|
112
118
|
}
|
|
113
119
|
componentDidRender() {
|
|
114
120
|
this.forwardAriaControls();
|
|
@@ -226,16 +232,13 @@ const PdsButton = class {
|
|
|
226
232
|
}
|
|
227
233
|
render() {
|
|
228
234
|
// Common props for both button and anchor elements
|
|
229
|
-
const commonProps = {
|
|
230
|
-
'aria-expanded': this.triggerExpanded,
|
|
231
|
-
'aria-haspopup': this.triggerHasPopup,
|
|
232
|
-
class: this.classNames(),
|
|
233
|
-
part: 'button',
|
|
234
|
-
ref: (el) => (this.contentEl = el),
|
|
235
|
-
};
|
|
235
|
+
const commonProps = Object.assign(Object.assign({}, this.forwardedAria), { class: this.classNames(), part: 'button', ref: (el) => (this.contentEl = el) });
|
|
236
236
|
const attributes = () => {
|
|
237
237
|
if (this.href) {
|
|
238
|
-
return Object.assign(Object.assign({}, commonProps), {
|
|
238
|
+
return Object.assign(Object.assign({}, commonProps), {
|
|
239
|
+
// ARIA allows aria-pressed only on buttons, so a link never gets it.
|
|
240
|
+
'aria-pressed': null, download: this.download, href: this.disabled ? null : this.href, target: this.target
|
|
241
|
+
});
|
|
239
242
|
}
|
|
240
243
|
return Object.assign(Object.assign({}, commonProps), { 'aria-busy': this.loading ? 'true' : null, 'aria-live': this.loading ? 'polite' : null, 'disabled': this.disabled, 'name': this.name, 'type': this.type, 'value': this.value });
|
|
241
244
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var index = require('./index-jl_Q819j.js');
|
|
4
4
|
var form = require('./form-MhwfKTuo.js');
|
|
5
|
-
var index$1 = require('./index-
|
|
5
|
+
var index$1 = require('./index-Do70atou.js');
|
|
6
6
|
var attributes = require('./attributes-BJ7KBHql.js');
|
|
7
7
|
require('./keep-hydrated-CiXgkEYd.js');
|
|
8
8
|
|
|
@@ -126,7 +126,7 @@ const PdsCheckbox = class {
|
|
|
126
126
|
this.hostKeeper.record(hostClass);
|
|
127
127
|
return (index.h(index.Host, { key: 'bbe09a5e9eb55f62b2921b09a04ddc9476a871ae', class: hostClass }, index.h("label", { key: 'fa1856d9306eb8c0c19618ea5e2619ea20c3c51d', htmlFor: this.componentId }, index.h("input", Object.assign({ key: '8537d97a8e69a17d0d563306dac179e393885dda', type: "checkbox", "aria-describedby": form.assignDescription(this.componentId, this.invalid, this.helperMessage, this.errorMessage), "aria-invalid": this.invalid ? "true" : undefined, id: this.componentId, indeterminate: this.indeterminate, name: this.name, value: this.value, checked: this.checked, required: this.required, disabled: this.disabled, onChange: this.handleCheckboxChange, onInput: this.handleInput }, this.inheritedAttributes)), index.h("span", { key: 'e523922889c80a2d18243cb560cd855bab95803d', class: this.hideLabel ? 'visually-hidden' : '' }, index.h("slot", { key: 'b6ff34ecbc346d254a0211bfa610823feedb486b', name: "label", onSlotchange: this.updateHasLabelSlot }), !this.hasLabelSlot && this.label)), this.helperMessage &&
|
|
128
128
|
index.h("div", { key: '55dcca850dff0aa93d9ba63d6827d9155ac35dab', class: 'pds-checkbox__message', id: form.messageId(this.componentId, 'helper') }, this.helperMessage), this.errorMessage &&
|
|
129
|
-
index.h("div", { key: '5af843679994d29f084d41e90e41e0939c951063', class: `pds-checkbox__message pds-checkbox__message--error`, id: form.messageId(this.componentId, 'error'), "aria-live": "assertive" }, index.h("pds-icon", { key: '
|
|
129
|
+
index.h("div", { key: '5af843679994d29f084d41e90e41e0939c951063', class: `pds-checkbox__message pds-checkbox__message--error`, id: form.messageId(this.componentId, 'error'), "aria-live": "assertive" }, index.h("pds-icon", { key: '88a46a17abc1c7b3b3e90543ce8dcf38a14c878c', "aria-hidden": "true", icon: index$1.danger, size: "small" }), this.errorMessage)));
|
|
130
130
|
}
|
|
131
131
|
static get formAssociated() { return true; }
|
|
132
132
|
get el() { return index.getElement(this); }
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-jl_Q819j.js');
|
|
4
|
-
var index$1 = require('./index-
|
|
4
|
+
var index$1 = require('./index-Do70atou.js');
|
|
5
5
|
var attributes = require('./attributes-BJ7KBHql.js');
|
|
6
|
-
var truncationTooltip = require('./truncation-tooltip-
|
|
6
|
+
var truncationTooltip = require('./truncation-tooltip-BtuiXLV0.js');
|
|
7
7
|
var utils = require('./utils-BhRmyxT8.js');
|
|
8
8
|
require('./keep-hydrated-CiXgkEYd.js');
|
|
9
9
|
require('./floating-ui.dom-Dc8Anyel.js');
|
|
@@ -239,13 +239,13 @@ const PdsChip = class {
|
|
|
239
239
|
'aria-label': this.dismissLabel,
|
|
240
240
|
};
|
|
241
241
|
};
|
|
242
|
-
return (index.h(CloseElement, Object.assign({}, closeAttributes(), { onClick: this.handleCloseClick }), index.h("pds-icon", { icon: index$1.remove, size: this.iconSize })));
|
|
242
|
+
return (index.h(CloseElement, Object.assign({}, closeAttributes(), { onClick: this.handleCloseClick }), index.h("pds-icon", { icon: index$1.remove, size: this.iconSize, "aria-hidden": "true" })));
|
|
243
243
|
}
|
|
244
244
|
render() {
|
|
245
245
|
const hostClass = this.classNames();
|
|
246
246
|
const hostStyles = this.hostStyles;
|
|
247
247
|
this.hostKeeper.record(hostClass, hostStyles);
|
|
248
|
-
return (index.h(index.Host, { key: '
|
|
248
|
+
return (index.h(index.Host, { key: 'fa432fa987afb5b856e5e7d3894a88be043805d2', class: hostClass, id: this.componentId, style: hostStyles }, this.setChipContent(), this.effectiveVariant === 'tag' && this.renderCloseButton()));
|
|
249
249
|
}
|
|
250
250
|
get el() { return index.getElement(this); }
|
|
251
251
|
};
|
|
@@ -3964,7 +3964,7 @@ const PdsCombobox = class {
|
|
|
3964
3964
|
'pds-combobox__option--layout': isLayout,
|
|
3965
3965
|
'pds-combobox__option--chip': isChip,
|
|
3966
3966
|
'pds-combobox__option--disabled': isDisabled,
|
|
3967
|
-
}, "data-option-index": index$1, onMouseDown: this.onOptionMouseDown, onClick: this.onOptionClick, onMouseEnter: this.onOptionMouseEnter, onKeyDown: this.onOptionKeyDown }, isLayout ? (index.h("pds-box", { class: "pds-combobox__option-layout-wrapper", innerHTML: this.getOptionLayoutContent(option) })) : isChip ? (this.renderOptionChip(option)) : (this.renderOptionLabel(option)), isSelected && index.h("pds-icon", { icon: "check", size: "regular", class: "pds-combobox__option-check" })));
|
|
3967
|
+
}, "data-option-index": index$1, onMouseDown: this.onOptionMouseDown, onClick: this.onOptionClick, onMouseEnter: this.onOptionMouseEnter, onKeyDown: this.onOptionKeyDown }, isLayout ? (index.h("pds-box", { class: "pds-combobox__option-layout-wrapper", innerHTML: this.getOptionLayoutContent(option) })) : isChip ? (this.renderOptionChip(option)) : (this.renderOptionLabel(option)), isSelected && index.h("pds-icon", { icon: "check", size: "regular", "aria-hidden": "true", class: "pds-combobox__option-check" })));
|
|
3968
3968
|
}
|
|
3969
3969
|
/** An option's text, after its `data-icon` when it has one. */
|
|
3970
3970
|
renderOptionLabel(option) {
|
|
@@ -4163,7 +4163,7 @@ const PdsCombobox = class {
|
|
|
4163
4163
|
}
|
|
4164
4164
|
// Helper method to render chip trigger default content
|
|
4165
4165
|
renderChipTriggerDefaultContent() {
|
|
4166
|
-
return (index.h("span", { class: "pds-combobox__chip-trigger-label" }, this.selectedChipIcon && index.h("pds-icon", { icon: this.selectedChipIcon, class: "pds-combobox__chip-trigger-icon" }), this.selectedLabel || this.placeholder));
|
|
4166
|
+
return (index.h("span", { class: "pds-combobox__chip-trigger-label" }, this.selectedChipIcon && index.h("pds-icon", { icon: this.selectedChipIcon, "aria-hidden": "true", class: "pds-combobox__chip-trigger-icon" }), this.selectedLabel || this.placeholder));
|
|
4167
4167
|
}
|
|
4168
4168
|
// Helper method to render option as chip (new automatic approach)
|
|
4169
4169
|
renderOptionChip(option) {
|
|
@@ -4194,13 +4194,13 @@ const PdsCombobox = class {
|
|
|
4194
4194
|
]
|
|
4195
4195
|
.filter(Boolean)
|
|
4196
4196
|
.join(' ');
|
|
4197
|
-
return (index.h(index.Host, { key: '
|
|
4197
|
+
return (index.h(index.Host, { key: 'c4bc64f28f6f8f2170d199bd89ba02b3fbe41bad', "aria-disabled": this.disabled ? 'true' : null }, index.h("div", { key: '7648c513d133e11376e50a9a15bc9a227b8fe1d2', class: "pds-combobox", tabIndex: -1, onFocusout: this.onComboboxFocusOut, part: "combobox" }, this.hasVisibleLabel && (index.h("label", { key: '1be4dce04b943119265b99c2b14002e5faba337f', htmlFor: this.trigger === 'input' ? this.componentId : undefined, id: this.labelId, class: "pds-combobox__label", onClick: this.onLabelClick }, this.label)), this.trigger === 'input' ? (index.h("div", { class: "pds-combobox__input-wrapper", style: { width: this.triggerWidth } }, index.h("input", { ref: el => {
|
|
4198
4198
|
this.inputEl = el;
|
|
4199
4199
|
this.triggerEl = el;
|
|
4200
4200
|
}, class: {
|
|
4201
4201
|
'pds-combobox__input': true,
|
|
4202
4202
|
'pds-combobox__input--invalid': this.isInvalid(),
|
|
4203
|
-
}, type: "text", role: "combobox", "aria-autocomplete": "list", "aria-haspopup": this.inputPopupRole === 'tree' ? 'tree' : undefined, "aria-controls": this.listboxId, "aria-describedby": form.assignDescription(this.componentId, this.isInvalid(), this.helperMessage, this.errorMessage), "aria-invalid": this.isInvalid() ? 'true' : undefined, "aria-activedescendant": this.usesPanelSearch ? undefined : this.activeDescendantId, "aria-expanded": this.isOpen ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', "aria-label": this.hideLabel ? this.label : undefined, id: this.componentId, value: this.displayText, placeholder: this.placeholder, disabled: this.disabled, onInput: this.handleInput, onClick: this.handleInputClick, onKeyDown: this.handleKeyDown, autocomplete: "off", part: "input" }), index.h("pds-icon", { icon: "enlarge", "aria-hidden": "true", class: "pds-combobox__input-icon" }))) : this.trigger === 'chip' ? (index.h("div", { class: this.getChipTriggerClass(), style: { width: this.triggerWidth }, role: this.usesPanelSearch ? 'button' : 'combobox', "aria-haspopup": this.triggerPopupRole, "aria-controls": this.listboxId, "aria-describedby": form.assignDescription(this.componentId, this.isInvalid(), this.helperMessage, this.errorMessage), "aria-invalid": this.isInvalid() ? 'true' : undefined, "aria-activedescendant": this.usesPanelSearch ? undefined : this.activeDescendantId, "aria-expanded": this.isOpen ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', "aria-label": this.triggerAriaLabel, "aria-labelledby": this.triggerLabelledBy, id: this.componentId, tabIndex: this.disabled ? -1 : 0, onClick: this.onButtonTriggerClick, "data-layout": this.customTriggerContent, onKeyDown: this.onButtonTriggerKeyDown, onKeyUp: this.onButtonTriggerKeyUp, ref: el => (this.triggerEl = el), part: "chip-trigger" }, this.renderChipTriggerContent())) : (index.h("div", { class: triggerClass, style: { width: this.triggerWidth }, role: this.usesPanelSearch ? 'button' : 'combobox', "aria-haspopup": this.triggerPopupRole, "aria-controls": this.listboxId, "aria-describedby": form.assignDescription(this.componentId, this.isInvalid(), this.helperMessage, this.errorMessage), "aria-invalid": this.isInvalid() ? 'true' : undefined, "aria-activedescendant": this.usesPanelSearch ? undefined : this.activeDescendantId, "aria-expanded": this.isOpen ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', "aria-label": this.triggerAriaLabel, "aria-labelledby": this.triggerLabelledBy, id: this.componentId, tabIndex: this.disabled ? -1 : 0, onClick: this.onButtonTriggerClick, "data-layout": this.customTriggerContent, onKeyDown: this.onButtonTriggerKeyDown, onKeyUp: this.onButtonTriggerKeyUp, ref: el => (this.triggerEl = el), part: "button-trigger" }, this.renderButtonTriggerContent())), this.renderMessages(), index.h("div", { key: '
|
|
4203
|
+
}, type: "text", role: "combobox", "aria-autocomplete": "list", "aria-haspopup": this.inputPopupRole === 'tree' ? 'tree' : undefined, "aria-controls": this.listboxId, "aria-describedby": form.assignDescription(this.componentId, this.isInvalid(), this.helperMessage, this.errorMessage), "aria-invalid": this.isInvalid() ? 'true' : undefined, "aria-activedescendant": this.usesPanelSearch ? undefined : this.activeDescendantId, "aria-expanded": this.isOpen ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', "aria-label": this.hideLabel ? this.label : undefined, id: this.componentId, value: this.displayText, placeholder: this.placeholder, disabled: this.disabled, onInput: this.handleInput, onClick: this.handleInputClick, onKeyDown: this.handleKeyDown, autocomplete: "off", part: "input" }), index.h("pds-icon", { icon: "enlarge", "aria-hidden": "true", class: "pds-combobox__input-icon" }))) : this.trigger === 'chip' ? (index.h("div", { class: this.getChipTriggerClass(), style: { width: this.triggerWidth }, role: this.usesPanelSearch ? 'button' : 'combobox', "aria-haspopup": this.triggerPopupRole, "aria-controls": this.listboxId, "aria-describedby": form.assignDescription(this.componentId, this.isInvalid(), this.helperMessage, this.errorMessage), "aria-invalid": this.isInvalid() ? 'true' : undefined, "aria-activedescendant": this.usesPanelSearch ? undefined : this.activeDescendantId, "aria-expanded": this.isOpen ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', "aria-label": this.triggerAriaLabel, "aria-labelledby": this.triggerLabelledBy, id: this.componentId, tabIndex: this.disabled ? -1 : 0, onClick: this.onButtonTriggerClick, "data-layout": this.customTriggerContent, onKeyDown: this.onButtonTriggerKeyDown, onKeyUp: this.onButtonTriggerKeyUp, ref: el => (this.triggerEl = el), part: "chip-trigger" }, this.renderChipTriggerContent())) : (index.h("div", { class: triggerClass, style: { width: this.triggerWidth }, role: this.usesPanelSearch ? 'button' : 'combobox', "aria-haspopup": this.triggerPopupRole, "aria-controls": this.listboxId, "aria-describedby": form.assignDescription(this.componentId, this.isInvalid(), this.helperMessage, this.errorMessage), "aria-invalid": this.isInvalid() ? 'true' : undefined, "aria-activedescendant": this.usesPanelSearch ? undefined : this.activeDescendantId, "aria-expanded": this.isOpen ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', "aria-label": this.triggerAriaLabel, "aria-labelledby": this.triggerLabelledBy, id: this.componentId, tabIndex: this.disabled ? -1 : 0, onClick: this.onButtonTriggerClick, "data-layout": this.customTriggerContent, onKeyDown: this.onButtonTriggerKeyDown, onKeyUp: this.onButtonTriggerKeyUp, ref: el => (this.triggerEl = el), part: "button-trigger" }, this.renderButtonTriggerContent())), this.renderMessages(), index.h("div", { key: 'f9aca483c67dd0cdf2fcbdc651a13cfb8fcfe7f1', style: { display: 'none' } }, index.h("slot", { key: '7a0dc5718ccf377b41bd1716030f16a135700518', onSlotchange: () => this.updateOptions() })), this.renderDropdown(), this.groupDisplay !== 'inline' && [
|
|
4204
4204
|
index.h("span", { key: "drill-status", class: "visually-hidden", role: "status", "aria-live": "polite" }, this.isOpen && this.effectiveGroupDisplay === 'drill-in' && this.openGroup !== null ? this.openGroup.label : ''),
|
|
4205
4205
|
// Its own region: sharing one, revealing a row then opening it would leave the text the
|
|
4206
4206
|
// same, and opening the group would go unannounced.
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
var index = require('./index-jl_Q819j.js');
|
|
4
4
|
var attributes = require('./attributes-BJ7KBHql.js');
|
|
5
|
-
var index$1 = require('./index-
|
|
5
|
+
var index$1 = require('./index-Do70atou.js');
|
|
6
6
|
var reflectedAttributeDefault = require('./reflected-attribute-default-DVYHG6O1.js');
|
|
7
|
-
var truncationTooltip = require('./truncation-tooltip-
|
|
7
|
+
var truncationTooltip = require('./truncation-tooltip-BtuiXLV0.js');
|
|
8
8
|
require('./keep-hydrated-CiXgkEYd.js');
|
|
9
9
|
require('./floating-ui.dom-Dc8Anyel.js');
|
|
10
10
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var index = require('./index-jl_Q819j.js');
|
|
4
4
|
var floatingUi_dom = require('./floating-ui.dom-Dc8Anyel.js');
|
|
5
|
-
var index$1 = require('./index-
|
|
5
|
+
var index$1 = require('./index-Do70atou.js');
|
|
6
6
|
var form = require('./form-MhwfKTuo.js');
|
|
7
7
|
var i18nFormat = require('./i18n-format-BD0PmYzT.js');
|
|
8
8
|
var closest = require('./closest-D0qyYtJ3.js');
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var index = require('./index-jl_Q819j.js');
|
|
4
4
|
require('./keep-hydrated-CiXgkEYd.js');
|
|
5
5
|
|
|
6
|
-
const pdsDropdownMenuItemCss = () => `:host{cursor:pointer;display:-ms-flexbox;display:flex;width:100%;}:host(.is-disabled){cursor:not-allowed !important;opacity:0.5 !important}:host(.is-disabled) .pds-dropdown-menu-item__content{cursor:not-allowed !important;pointer-events:none !important}.pds-dropdown-menu-item__content{-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;border-radius:var(--pine-dimension-xs);color:var(--pine-color-text);display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;font:var(--pine-typography-body-medium);gap:var(--pine-dimension-xs);margin:calc(var(--pine-border-width) + 2px);padding:var(--pine-dimension-xs);text-align:start;width:100%;}.pds-dropdown-menu-item__content:hover{background-color:var(--pine-color-background-muted);color:var(--pine-color-text-hover)}.pds-dropdown-menu-item__content{}.pds-dropdown-menu-item__content:focus,.pds-dropdown-menu-item__content:focus-visible,.pds-dropdown-menu-item__content.has-focus{outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}:host(.destructive) .pds-dropdown-menu-item__content{--pds-context-link-color:var(--pine-color-danger);--pds-context-link-color-hover:var(--pine-color-danger-hover);-ms-flex-align:center;align-items:center;color:var(--pine-color-danger)}:host(.destructive) .pds-dropdown-menu-item__content:hover{background-color:var(--pine-color-danger-disabled);color:var(--pine-color-danger-hover)}:host(.destructive) .pds-dropdown-menu-item__content:focus,:host(.destructive) .pds-dropdown-menu-item__content:focus-visible,:host(.destructive) .pds-dropdown-menu-item__content.has-focus{background-color:var(--pine-color-danger-disabled);outline:var(--pine-outline-focus-danger);outline-offset:var(--pine-border-width)}pds-link::part(link):focus,pds-link::part(link):focus-visible{-webkit-box-shadow:none;box-shadow:none;outline:none}pds-link::part(link){-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--pine-dimension-xs);margin:calc(var(--pine-dimension-xs) * -1);padding:var(--pine-dimension-xs);text-decoration:none;width:calc(100% + var(--pine-dimension-xs) * 2)}`;
|
|
6
|
+
const pdsDropdownMenuItemCss = () => `:host{cursor:pointer;display:-ms-flexbox;display:flex;width:100%;}:host(.is-disabled){cursor:not-allowed !important;opacity:0.5 !important}:host(.is-disabled) .pds-dropdown-menu-item__content{cursor:not-allowed !important;pointer-events:none !important}.pds-dropdown-menu-item__content{-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;border-radius:var(--pine-dimension-xs);color:var(--pine-color-text);display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;font:var(--pine-typography-body-medium);gap:var(--pine-dimension-xs);margin:calc(var(--pine-border-width) + 2px);padding:var(--pine-dimension-xs);text-align:start;width:100%;}.pds-dropdown-menu-item__content:hover{background-color:var(--pine-color-background-muted);color:var(--pine-color-text-hover)}.pds-dropdown-menu-item__content{}.pds-dropdown-menu-item__content:focus,.pds-dropdown-menu-item__content:focus-visible,.pds-dropdown-menu-item__content.has-focus{outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}:host(.is-informational){cursor:default}:host(.is-informational) .pds-dropdown-menu-item__content:hover{background-color:transparent;color:var(--pine-color-text)}:host(.destructive) .pds-dropdown-menu-item__content{--pds-context-link-color:var(--pine-color-danger);--pds-context-link-color-hover:var(--pine-color-danger-hover);-ms-flex-align:center;align-items:center;color:var(--pine-color-danger)}:host(.destructive) .pds-dropdown-menu-item__content:hover{background-color:var(--pine-color-danger-disabled);color:var(--pine-color-danger-hover)}:host(.destructive) .pds-dropdown-menu-item__content:focus,:host(.destructive) .pds-dropdown-menu-item__content:focus-visible,:host(.destructive) .pds-dropdown-menu-item__content.has-focus{background-color:var(--pine-color-danger-disabled);outline:var(--pine-outline-focus-danger);outline-offset:var(--pine-border-width)}pds-link::part(link):focus,pds-link::part(link):focus-visible{-webkit-box-shadow:none;box-shadow:none;outline:none}pds-link::part(link){-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--pine-dimension-xs);margin:calc(var(--pine-dimension-xs) * -1);padding:var(--pine-dimension-xs);text-decoration:none;width:calc(100% + var(--pine-dimension-xs) * 2)}`;
|
|
7
7
|
|
|
8
8
|
const PdsDropdownMenuItem = class {
|
|
9
9
|
constructor(hostRef) {
|
|
@@ -19,9 +19,17 @@ const PdsDropdownMenuItem = class {
|
|
|
19
19
|
* @defaultValue false
|
|
20
20
|
*/
|
|
21
21
|
this.disabled = false;
|
|
22
|
+
/**
|
|
23
|
+
* It determines whether or not the dropdown-item is informational: text that the arrow keys
|
|
24
|
+
* reach but that can't be activated. Takes precedence over `href` and `destructive`.
|
|
25
|
+
* Screen readers announce it as dimmed or unavailable, the same way as a disabled item.
|
|
26
|
+
* @defaultValue false
|
|
27
|
+
*/
|
|
28
|
+
this.informational = false;
|
|
22
29
|
/**
|
|
23
30
|
* Determines whether the link should open in a new tab and display an external icon.
|
|
24
31
|
* This is a simpler alternative to using `target="_blank"` for the common case.
|
|
32
|
+
* Ignored when `informational` is set.
|
|
25
33
|
* @defaultValue false
|
|
26
34
|
*/
|
|
27
35
|
this.external = false;
|
|
@@ -32,6 +40,12 @@ const PdsDropdownMenuItem = class {
|
|
|
32
40
|
this.handleBlur = () => {
|
|
33
41
|
this.hasFocus = false;
|
|
34
42
|
};
|
|
43
|
+
// Space would otherwise scroll the page, since nothing in the item takes the key.
|
|
44
|
+
this.handleInformationalKeyDown = (event) => {
|
|
45
|
+
if (event.key === ' ') {
|
|
46
|
+
event.preventDefault();
|
|
47
|
+
}
|
|
48
|
+
};
|
|
35
49
|
this.handleKeyDown = (event) => {
|
|
36
50
|
// Handle keyboard events
|
|
37
51
|
if (!this.disabled && (event.key === 'Enter')) {
|
|
@@ -53,6 +67,8 @@ const PdsDropdownMenuItem = class {
|
|
|
53
67
|
;
|
|
54
68
|
handleClick() {
|
|
55
69
|
var _a;
|
|
70
|
+
if (this.informational)
|
|
71
|
+
return;
|
|
56
72
|
// Filter only pds-dropdown-menu-item elements and find the index of the current item
|
|
57
73
|
const menuItems = Array.from(this.host.parentNode.children).filter((child) => child.tagName.toLowerCase() === 'pds-dropdown-menu-item');
|
|
58
74
|
const itemIndex = menuItems.indexOf(this.host);
|
|
@@ -65,6 +81,12 @@ const PdsDropdownMenuItem = class {
|
|
|
65
81
|
});
|
|
66
82
|
}
|
|
67
83
|
renderElement() {
|
|
84
|
+
if (this.informational) {
|
|
85
|
+
return (index.h("div", { class: {
|
|
86
|
+
'pds-dropdown-menu-item__content': true,
|
|
87
|
+
'has-focus': this.hasFocus
|
|
88
|
+
}, role: "menuitem", "aria-disabled": "true", part: "button", tabIndex: this.disabled ? -1 : 0, onKeyDown: this.handleInformationalKeyDown, onFocus: this.handleFocus, onBlur: this.handleBlur }, index.h("slot", null)));
|
|
89
|
+
}
|
|
68
90
|
if (this.href != null) {
|
|
69
91
|
return (index.h("pds-link", { download: this.download, href: this.disabled ? null : this.href, external: this.external, target: this.target, class: {
|
|
70
92
|
'pds-dropdown-menu-item__content': true,
|
|
@@ -77,7 +99,14 @@ const PdsDropdownMenuItem = class {
|
|
|
77
99
|
}, tabIndex: this.disabled ? -1 : 0, type: "button", part: "button", onKeyDown: this.handleKeyDown, onFocus: this.handleFocus, onBlur: this.handleBlur, disabled: this.disabled, "aria-disabled": this.disabled ? 'true' : null }, index.h("slot", null)));
|
|
78
100
|
}
|
|
79
101
|
render() {
|
|
80
|
-
return (index.h(index.Host, { key: '
|
|
102
|
+
return (index.h(index.Host, { key: '47a62550fde33f892d7af4f4e71b67ebf7aa2c3f', id: this.componentId, class: {
|
|
103
|
+
'is-disabled': this.disabled,
|
|
104
|
+
'is-informational': this.informational,
|
|
105
|
+
'destructive': !this.disabled && !this.informational && this.destructive
|
|
106
|
+
}, onClick: () => !this.disabled && this.handleClick(), role: "none",
|
|
107
|
+
// ARIA ignores role="none" on focusable elements, so a focusable host would sit between
|
|
108
|
+
// the menu and the informational menuitem as an unexpected child.
|
|
109
|
+
tabIndex: this.informational ? null : -1, "aria-disabled": this.disabled && !this.informational ? 'true' : null }, this.renderElement()));
|
|
81
110
|
}
|
|
82
111
|
get host() { return index.getElement(this); }
|
|
83
112
|
};
|
|
@@ -203,11 +203,11 @@ const PdsDropdownMenu = class {
|
|
|
203
203
|
if (tagName === 'pds-dropdown-menu-item') {
|
|
204
204
|
// For pds-dropdown-menu-item, focus the inner element
|
|
205
205
|
const menuItem = item;
|
|
206
|
-
const
|
|
206
|
+
const innerControl = (_a = menuItem.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('button, [role="menuitem"]');
|
|
207
207
|
const innerLink = ((_d = (_c = (_b = menuItem.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('pds-link')) === null || _c === void 0 ? void 0 : _c.shadowRoot) === null || _d === void 0 ? void 0 : _d.querySelector('a'))
|
|
208
208
|
|| ((_e = menuItem.shadowRoot) === null || _e === void 0 ? void 0 : _e.querySelector('a'));
|
|
209
|
-
if (
|
|
210
|
-
|
|
209
|
+
if (innerControl) {
|
|
210
|
+
innerControl.focus();
|
|
211
211
|
}
|
|
212
212
|
else if (innerLink) {
|
|
213
213
|
innerLink.focus();
|
|
@@ -359,7 +359,7 @@ const PdsDropdownMenu = class {
|
|
|
359
359
|
}
|
|
360
360
|
}
|
|
361
361
|
render() {
|
|
362
|
-
return (index.h(index.Host, { key: '
|
|
362
|
+
return (index.h(index.Host, { key: '1765909c8c3c140e52dc3f6b50693c97d6bcc003', id: this.componentId }, index.h("slot", { key: '0b566cd288428a0694a2d61d4a73bd79def4bfad', name: "trigger", onSlotchange: this.handleTriggerSlotChange }), index.h("pds-box", { key: '16cdfc208cfe7f6e074289c30aa0e1188a34876d', "border-radius": "sm", display: "flex", direction: "column", class: "pds-dropdown-menu--panel is-hidden", shadow: "100", part: "menu-panel" }, index.h("div", { key: 'a28c1736ad02e8ac3d82c0fe1933606a7216989b', class: { 'pds-dropdown-menu__header': true, 'is-hidden': !this.hasHeader } }, index.h("slot", { key: '9c6dfddefb266083f68aa27d6cc01127a69cd1cf', name: "header", onSlotchange: this.handleHeaderSlotChange })), index.h("div", { key: '8cfe85c10f92d4a4ec6b5d2d0264d054a74ba29b', class: "pds-dropdown-menu__items", role: "menu", "aria-orientation": "vertical" }, index.h("slot", { key: '1a5b4aa406d2706ca8cef49deb05140a5763be1c', onSlotchange: this.handleSlotChange })))));
|
|
363
363
|
}
|
|
364
364
|
get host() { return index.getElement(this); }
|
|
365
365
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var index = require('./index-jl_Q819j.js');
|
|
4
4
|
var scroll = require('./scroll-2XcoE_6Q.js');
|
|
5
|
-
var index$1 = require('./index-
|
|
5
|
+
var index$1 = require('./index-Do70atou.js');
|
|
6
6
|
require('./keep-hydrated-CiXgkEYd.js');
|
|
7
7
|
|
|
8
8
|
const pdsFilterCss = () => `:host{--box-shadow-focus:0 0 0 1px var(--pine-color-background-container), 0 0 0 3px var(--pine-color-focus-ring);display:inline-block;position:relative}.pds-filter__trigger{-ms-flex-align:center;align-items:center;anchor-name:--filter-trigger;background:var(--pine-color-background-container);border:var(--pine-border);border-radius:var(--pine-dimension-100);-webkit-box-shadow:var(--pine-box-shadow-050);box-shadow:var(--pine-box-shadow-050);-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--pine-color-text-tertiary);cursor:pointer;display:-ms-inline-flexbox;display:inline-flex;font-family:var(--pine-font-family-inter);font-size:var(--pine-font-size-100);font-weight:var(--pine-font-weight-400);gap:var(--pine-dimension-050);letter-spacing:var(--pine-letter-spacing-114);line-height:var(--pine-line-height-150);padding:var(--pine-dimension-025) var(--pine-dimension-125);position:relative;-webkit-transition:all var(--pine-motion-duration-base) ease;transition:all var(--pine-motion-duration-base) ease}.pds-filter__trigger pds-icon{block-size:var(--pine-font-size-100);color:var(--pine-color-text-secondary);-ms-flex-negative:0;flex-shrink:0;inline-size:var(--pine-font-size-100)}.pds-filter__trigger:hover,.pds-filter__trigger.pds-filter__trigger--open{background-color:var(--pine-color-background-subtle);border-color:var(--pine-color-border-hover);color:var(--pine-color-text-hover)}.pds-filter__trigger:hover pds-icon,.pds-filter__trigger.pds-filter__trigger--open pds-icon{color:var(--pine-color-text-secondary)}.pds-filter__trigger:focus-visible{-webkit-box-shadow:var(--box-shadow-focus);box-shadow:var(--box-shadow-focus);outline:none}.pds-filter__trigger:disabled{cursor:not-allowed;opacity:0.5}.pds-filter__trigger--selected{background-color:var(--pine-color-purple-050);border-color:var(--pine-color-purple-500);color:var(--pine-color-purple-600)}.pds-filter__trigger--selected pds-icon{color:var(--pine-color-purple-600)}.pds-filter__trigger--selected:hover,.pds-filter__trigger--selected.pds-filter__trigger--open{background-color:var(--pine-color-purple-100);border-color:var(--pine-color-purple-500);color:var(--pine-color-purple-600)}.pds-filter__trigger--selected:hover pds-icon,.pds-filter__trigger--selected.pds-filter__trigger--open pds-icon{color:var(--pine-color-purple-600)}.pds-filter__trigger--selected:focus-visible{-webkit-box-shadow:var(--box-shadow-focus);box-shadow:var(--box-shadow-focus);outline:none}.pds-filter__trigger--more{background-color:var(--pine-color-background-container-hover);border:var(--pine-border-width-thin) dashed var(--pine-color-border);color:var(--pine-color-text-tertiary)}.pds-filter__trigger--more pds-icon{color:var(--pine-color-text-secondary)}.pds-filter__trigger--more:hover,.pds-filter__trigger--more.pds-filter__trigger--open{background-color:var(--pine-color-background-subtle);border-color:var(--pine-color-border-hover);color:var(--pine-color-text-hover)}.pds-filter__trigger--more:hover pds-icon,.pds-filter__trigger--more.pds-filter__trigger--open pds-icon{color:var(--pine-color-text-secondary)}.pds-filter__trigger--more:focus-visible{-webkit-box-shadow:var(--box-shadow-focus);box-shadow:var(--box-shadow-focus);outline:none}.pds-filter__trigger--clear{background:transparent;border:var(--pine-border-width-thin) solid transparent;border-radius:var(--pine-dimension-100);-webkit-box-shadow:none;box-shadow:none;color:var(--pine-color-purple-600)}.pds-filter__trigger--clear pds-icon{color:var(--pine-color-purple-600)}.pds-filter__trigger--clear:hover{background-color:var(--pine-color-purple-100);border-color:var(--pine-color-purple-100);color:var(--pine-color-purple-600)}.pds-filter__trigger--clear:hover pds-icon{color:var(--pine-color-purple-600)}.pds-filter__trigger--clear:focus-visible{-webkit-box-shadow:var(--box-shadow-focus);box-shadow:var(--box-shadow-focus);outline:none}.pds-filter__button-content{-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;gap:var(--pine-dimension-050);max-inline-size:148px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pds-filter__button-text{line-height:var(--pine-line-height-150);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pds-filter__dropdown-icon{block-size:var(--pine-dimension-200);-ms-flex-negative:0;flex-shrink:0;inline-size:var(--pine-dimension-200)}.pds-filter__popover{background-color:var(--pine-color-background-overlay);border:0;border-radius:var(--pine-dimension-100);-webkit-box-shadow:var(--pine-box-shadow-100);box-shadow:var(--pine-box-shadow-100);display:none;inline-size:228px;inset:unset;padding:var(--pine-dimension-100);z-index:var(--pine-z-index-overlay);}.pds-filter__popover:popover-open,.pds-filter__popover.is-open{display:block}.pds-filter__popover{}@supports (anchor-name: --test){.pds-filter__popover{inset-block-start:calc(anchor(--filter-trigger bottom) + var(--pine-dimension-100));inset-inline-start:anchor(--filter-trigger start);position:fixed;position-anchor:--filter-trigger;}.pds-filter__popover.popover-flip-horizontal{inset-inline-end:anchor(--filter-trigger end);inset-inline-start:auto}.pds-filter__popover.popover-flip-vertical{inset-block-start:anchor(--filter-trigger top);-webkit-transform:translateY(calc(-100% - var(--pine-dimension-100)));transform:translateY(calc(-100% - var(--pine-dimension-100)))}.pds-filter__popover.popover-flip-horizontal.popover-flip-vertical{inset-block-start:anchor(--filter-trigger top);inset-inline-end:anchor(--filter-trigger end);inset-inline-start:auto;-webkit-transform:translateY(calc(-100% - var(--pine-dimension-100)));transform:translateY(calc(-100% - var(--pine-dimension-100)))}.pds-filter__popover{}.pds-filter__popover.is-open.popover-flip-horizontal{inset-inline-end:anchor(--filter-trigger end);inset-inline-start:auto}.pds-filter__popover.is-open.popover-flip-vertical{inset-block-start:anchor(--filter-trigger top);-webkit-transform:translateY(calc(-100% - var(--pine-dimension-100)));transform:translateY(calc(-100% - var(--pine-dimension-100)))}.pds-filter__popover.is-open.popover-flip-horizontal.popover-flip-vertical{inset-block-start:anchor(--filter-trigger top);inset-inline-end:anchor(--filter-trigger end);inset-inline-start:auto;-webkit-transform:translateY(calc(-100% - var(--pine-dimension-100)));transform:translateY(calc(-100% - var(--pine-dimension-100)))}}`;
|
|
@@ -4,7 +4,7 @@ var index = require('./index-jl_Q819j.js');
|
|
|
4
4
|
var form = require('./form-MhwfKTuo.js');
|
|
5
5
|
var attributes = require('./attributes-BJ7KBHql.js');
|
|
6
6
|
var utils = require('./utils-BhRmyxT8.js');
|
|
7
|
-
var index$1 = require('./index-
|
|
7
|
+
var index$1 = require('./index-Do70atou.js');
|
|
8
8
|
require('./keep-hydrated-CiXgkEYd.js');
|
|
9
9
|
|
|
10
10
|
const pdsInputTokensCss = () => `:host{--pine-input-color-background-danger:var(--pine-color-red-050)}`;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var index = require('./index-jl_Q819j.js');
|
|
4
4
|
var utils = require('./utils-BhRmyxT8.js');
|
|
5
|
-
var index$1 = require('./index-
|
|
5
|
+
var index$1 = require('./index-Do70atou.js');
|
|
6
6
|
require('./keep-hydrated-CiXgkEYd.js');
|
|
7
7
|
|
|
8
8
|
const pdsLinkCss = () => `:host{display:inline}:host pds-icon{-webkit-margin-start:var(--pine-dimension-2xs);margin-inline-start:var(--pine-dimension-2xs)}.pds-link{-ms-flex-align:center;align-items:center;color:var(--color, var(--pds-context-link-color, var(--pine-color-text)));display:-ms-inline-flexbox;display:inline-flex;font-weight:var(--pine-font-weight-medium)}.pds-link:focus-visible{border-radius:var(--pine-dimension-2xs);outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width-thick);position:relative}.pds-link:hover{color:var(--color, var(--pds-context-link-color-hover, var(--pine-color-text-hover)));text-decoration:none}:host([color=secondary]) .pds-link{color:var(--pine-color-text-primary)}:host([color=secondary]) .pds-link:hover{color:var(--pine-color-text-inverse-secondary)}:host([color=accent]) .pds-link{color:var(--pine-color-accent)}:host([color=accent]) .pds-link:hover{color:var(--pine-color-accent-hover)}:host([color=danger]) .pds-link{color:var(--pine-color-danger)}:host([color=danger]) .pds-link:hover{color:var(--pine-color-danger-hover)}.pds-link--sm{font-size:var(--pine-font-size-body-xs)}.pds-link--sm pds-icon{height:var(--pine-dimension-xs);width:var(--pine-dimension-xs)}.pds-link--md{font-size:var(--pine-font-size-body-sm)}.pds-link--md pds-icon{height:var(--pine-dimension-xs);width:var(--pine-dimension-xs)}.pds-link--lg{font-size:var(--pine-font-size-body-md)}.pds-link--lg pds-icon{height:var(--pine-dimension-sm);width:var(--pine-dimension-sm)}.pds-link--plain{text-decoration:none}.pds-link--plain:hover{color:var(--color, var(--pds-context-link-color-hover, var(--pine-color-text-hover)));text-decoration:underline}:host([active]) .pds-link{color:var(--pds-context-link-color, var(--pine-color-text-strong));text-decoration:underline}:host([active]) .pds-link:hover{color:var(--pds-context-link-color-hover, var(--pine-color-text-strong));text-decoration:underline}`;
|
|
@@ -19,6 +19,21 @@ const PdsModalContent = class {
|
|
|
19
19
|
* Tracks whether the border prop was explicitly set by the user
|
|
20
20
|
*/
|
|
21
21
|
this.userSetBorder = false;
|
|
22
|
+
this.hasLoaded = false;
|
|
23
|
+
/**
|
|
24
|
+
* Handle scroll events
|
|
25
|
+
*/
|
|
26
|
+
this.handleScroll = () => {
|
|
27
|
+
this.updateBorders();
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Handle resize events
|
|
31
|
+
*/
|
|
32
|
+
this.handleResize = () => {
|
|
33
|
+
this.calculateMaxHeight();
|
|
34
|
+
// Update borders after resize as content scrollability might change
|
|
35
|
+
setTimeout(() => this.updateBorders(), 50);
|
|
36
|
+
};
|
|
22
37
|
}
|
|
23
38
|
// Unwraps a nested .pds-modal-content left by a page-cache (Turbo, bfcache) reconnect.
|
|
24
39
|
componentDidRender() {
|
|
@@ -32,43 +47,30 @@ const PdsModalContent = class {
|
|
|
32
47
|
this.userSetBorder = hasBorderAttribute || this.border !== 'none';
|
|
33
48
|
}
|
|
34
49
|
componentDidLoad() {
|
|
50
|
+
this.hasLoaded = true;
|
|
35
51
|
this.calculateMaxHeight();
|
|
36
|
-
// Set up resize listener
|
|
37
|
-
window.addEventListener('resize', this.handleResize.bind(this));
|
|
38
|
-
// Only set up scroll listener for border updates if borders are managed automatically
|
|
39
52
|
if (!this.userSetBorder) {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
this.el.addEventListener('scroll', this.handleScroll.bind(this));
|
|
43
|
-
// Initial border update after everything is set up
|
|
44
|
-
setTimeout(() => this.updateBorders(), 100);
|
|
45
|
-
}, 100);
|
|
53
|
+
// Initial border update after everything is set up
|
|
54
|
+
setTimeout(() => this.updateBorders(), 200);
|
|
46
55
|
}
|
|
47
56
|
}
|
|
57
|
+
// Here rather than in componentDidLoad, which runs once: content taken out of the page and put
|
|
58
|
+
// back (a DOM morph or a framework moving it) gets its listeners and header/footer observer back.
|
|
59
|
+
connectedCallback() {
|
|
60
|
+
window.addEventListener('resize', this.handleResize);
|
|
61
|
+
// The scroll happens on the component element itself (this.el), not the inner div
|
|
62
|
+
this.el.addEventListener('scroll', this.handleScroll);
|
|
63
|
+
if (this.hasLoaded)
|
|
64
|
+
this.calculateMaxHeight();
|
|
65
|
+
}
|
|
48
66
|
disconnectedCallback() {
|
|
49
|
-
window.removeEventListener('resize', this.handleResize
|
|
50
|
-
|
|
51
|
-
if (!this.userSetBorder) {
|
|
52
|
-
this.el.removeEventListener('scroll', this.handleScroll.bind(this));
|
|
53
|
-
}
|
|
67
|
+
window.removeEventListener('resize', this.handleResize);
|
|
68
|
+
this.el.removeEventListener('scroll', this.handleScroll);
|
|
54
69
|
if (this.mutationObserver) {
|
|
55
70
|
this.mutationObserver.disconnect();
|
|
71
|
+
this.mutationObserver = undefined;
|
|
56
72
|
}
|
|
57
73
|
}
|
|
58
|
-
/**
|
|
59
|
-
* Handle scroll events
|
|
60
|
-
*/
|
|
61
|
-
handleScroll() {
|
|
62
|
-
this.updateBorders();
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Handle resize events
|
|
66
|
-
*/
|
|
67
|
-
handleResize() {
|
|
68
|
-
this.calculateMaxHeight();
|
|
69
|
-
// Update borders after resize as content scrollability might change
|
|
70
|
-
setTimeout(() => this.updateBorders(), 50);
|
|
71
|
-
}
|
|
72
74
|
/**
|
|
73
75
|
* Updates border visibility based on scroll state (only if not user-defined)
|
|
74
76
|
*/
|
|
@@ -185,10 +187,10 @@ const PdsModalContent = class {
|
|
|
185
187
|
render() {
|
|
186
188
|
// Only apply max-height style if it's not 'none'
|
|
187
189
|
const styleObj = this.contentMaxHeight !== 'none' ? { maxHeight: this.contentMaxHeight } : {};
|
|
188
|
-
return (index.h(index.Host, { key: '
|
|
190
|
+
return (index.h(index.Host, { key: 'c83e230d23444e3d5358d995170e2b8386884fe8' }, index.h("div", { key: 'b91de2c71e693b5a1ba2b257d741e7b0418c2d76', class: {
|
|
189
191
|
'pds-modal-content': true,
|
|
190
192
|
[`pds-modal-content--border-${this.border}`]: true
|
|
191
|
-
}, style: styleObj, tabindex: "-1" }, index.h("slot", { key: '
|
|
193
|
+
}, style: styleObj, tabindex: "-1" }, index.h("slot", { key: '971cbd44ffeac4bb13a651948a119c603bed9e4f' }))));
|
|
192
194
|
}
|
|
193
195
|
get el() { return index.getElement(this); }
|
|
194
196
|
};
|
|
@@ -107,7 +107,7 @@ function containsComposed(ancestor, node) {
|
|
|
107
107
|
*/
|
|
108
108
|
const openModals = new Map();
|
|
109
109
|
let openSequence = 0;
|
|
110
|
-
/** Whether an open
|
|
110
|
+
/** Whether the panel of an open popover that takes Escape sits in `root`, including inside shadow roots under it. */
|
|
111
111
|
function hasOpenPopover(root) {
|
|
112
112
|
if (root.querySelector('[data-pds-popover-open]'))
|
|
113
113
|
return true;
|
|
@@ -651,14 +651,14 @@ const PdsModal = class {
|
|
|
651
651
|
}
|
|
652
652
|
render() {
|
|
653
653
|
const [sizeClass = 'md', customSize] = this.resolveSize();
|
|
654
|
-
return (index.h("dialog", { key: '
|
|
654
|
+
return (index.h("dialog", { key: '0a3ea92246b5ae704bc7dcbadf4f4e0d5a54e9e6', class: {
|
|
655
655
|
'pds-modal__backdrop': true,
|
|
656
656
|
'open': this.open
|
|
657
|
-
}, "aria-modal": this.disableTopLayer ? 'false' : 'true', "aria-labelledby": `${this.componentId}-heading`, onClick: this.handleBackdropClick, onCancel: this.handleCancel }, index.h("div", { key: '
|
|
657
|
+
}, "aria-modal": this.disableTopLayer ? 'false' : 'true', "aria-labelledby": `${this.componentId}-heading`, onClick: this.handleBackdropClick, onCancel: this.handleCancel }, index.h("div", { key: 'a38029c2284ed345bec2ce7638fc3415818cd609', class: {
|
|
658
658
|
'pds-modal': true,
|
|
659
659
|
[`pds-modal--${sizeClass}`]: true,
|
|
660
660
|
'pds-modal--scrollable': this.scrollable
|
|
661
|
-
}, style: customSize !== undefined ? { '--pds-modal-max-width': customSize } : undefined, part: "modal" }, index.h("slot", { key: '
|
|
661
|
+
}, style: customSize !== undefined ? { '--pds-modal-max-width': customSize } : undefined, part: "modal" }, index.h("slot", { key: '396da81af42685f5c083f853afa207a6844e444e' }))));
|
|
662
662
|
}
|
|
663
663
|
get el() { return index.getElement(this); }
|
|
664
664
|
static get watchers() { return {
|
|
@@ -4,7 +4,7 @@ var index = require('./index-jl_Q819j.js');
|
|
|
4
4
|
var floatingUi_dom = require('./floating-ui.dom-Dc8Anyel.js');
|
|
5
5
|
var utils = require('./utils-BhRmyxT8.js');
|
|
6
6
|
var form = require('./form-MhwfKTuo.js');
|
|
7
|
-
var index$1 = require('./index-
|
|
7
|
+
var index$1 = require('./index-Do70atou.js');
|
|
8
8
|
var i18nFormat = require('./i18n-format-BD0PmYzT.js');
|
|
9
9
|
require('./keep-hydrated-CiXgkEYd.js');
|
|
10
10
|
|
|
@@ -1182,7 +1182,7 @@ const PdsMultiselect = class {
|
|
|
1182
1182
|
'pds-multiselect__option--selected': isSelected,
|
|
1183
1183
|
'pds-multiselect__option--create': isCreateOption,
|
|
1184
1184
|
'pds-multiselect__option--disabled': isDisabled || isCreateDisabled,
|
|
1185
|
-
}, role: "option", "aria-selected": isSelected ? 'true' : 'false', "aria-disabled": isDisabled || isCreateDisabled ? 'true' : undefined, "aria-label": isCreateOption ? i18nFormat.formatMessage(this.createOptionAriaLabel, { text: option.text }) : undefined, "aria-describedby": hasAction ? `${optionId}-action-description` : undefined, "data-index": index$1, onMouseDown: this.handleOptionMouseDown(option), onClick: this.handleOptionClick, onMouseEnter: this.handleOptionMouseEnter(index$1, option) }, isCreateOption ? (index.h("pds-box", { class: "pds-multiselect__create-option", "align-items": "center", gap: "xs" }, index.h("pds-icon", { name: "add", size: "small" }), index.h("pds-text", null, i18nFormat.formatMessage(this.createOptionLabel, { text: option.text })))) : (index.h("pds-checkbox", { componentId: `${this.componentId}-checkbox-${index$1}`, checked: isSelected, label: option.text, disabled: isDisabled, style: { pointerEvents: 'none' } }, this.optionDisplay === 'chip' && (index.h("pds-chip", { slot: "label", sentiment: "subtle", dot: !!option.dotColor, "dot-color": option.dotColor, "max-width": "100%" }, option.text)))), hasAction && this.renderOptionAction(option, optionId, isHighlighted)));
|
|
1185
|
+
}, role: "option", "aria-selected": isSelected ? 'true' : 'false', "aria-disabled": isDisabled || isCreateDisabled ? 'true' : undefined, "aria-label": isCreateOption ? i18nFormat.formatMessage(this.createOptionAriaLabel, { text: option.text }) : undefined, "aria-describedby": hasAction ? `${optionId}-action-description` : undefined, "data-index": index$1, onMouseDown: this.handleOptionMouseDown(option), onClick: this.handleOptionClick, onMouseEnter: this.handleOptionMouseEnter(index$1, option) }, isCreateOption ? (index.h("pds-box", { class: "pds-multiselect__create-option", "align-items": "center", gap: "xs" }, index.h("pds-icon", { name: "add", size: "small", "aria-hidden": "true" }), index.h("pds-text", null, i18nFormat.formatMessage(this.createOptionLabel, { text: option.text })))) : (index.h("pds-checkbox", { componentId: `${this.componentId}-checkbox-${index$1}`, checked: isSelected, label: option.text, disabled: isDisabled, style: { pointerEvents: 'none' } }, this.optionDisplay === 'chip' && (index.h("pds-chip", { slot: "label", sentiment: "subtle", dot: !!option.dotColor, "dot-color": option.dotColor, "max-width": "100%" }, option.text)))), hasAction && this.renderOptionAction(option, optionId, isHighlighted)));
|
|
1186
1186
|
}
|
|
1187
1187
|
renderOptionAction(option, optionId, isHighlighted) {
|
|
1188
1188
|
var _a;
|
|
@@ -1205,7 +1205,7 @@ const PdsMultiselect = class {
|
|
|
1205
1205
|
const hasSlottedEmpty = !!this.el.querySelector('[slot="empty"]');
|
|
1206
1206
|
const hasSlottedLoading = !!this.el.querySelector('[slot="loading"]');
|
|
1207
1207
|
const hasSlottedFooter = !!this.el.querySelector('[slot="footer"]');
|
|
1208
|
-
return (index.h("div", { class: "pds-multiselect__panel", ref: el => (this.panelEl = el), style: { minWidth: this.minWidth } }, index.h("div", { class: "pds-multiselect__search" }, index.h("pds-icon", { name: "search", size: "small" }), index.h("input", { ref: el => (this.searchInputEl = el), type: "text", class: "pds-multiselect__search-input", placeholder: this.searchPlaceholder, value: this.searchQuery, "aria-label": this.searchOptionsLabel, "aria-controls": `${this.componentId}-listbox`, "aria-activedescendant": this.highlightedIndex >= 0 ? `${this.componentId}-option-${this.highlightedIndex}` : undefined, role: "combobox", "aria-haspopup": "listbox", "aria-expanded": "true", "aria-autocomplete": "list", autocomplete: "off", onInput: this.handleSearchInputChange, onKeyDown: this.handleSearchInputKeyDown })), this.renderSelectedItemsList(), index.h("ul", { class: "pds-multiselect__listbox", role: "listbox", "aria-multiselectable": "true", "aria-label": this.label || this.optionsLabel, id: `${this.componentId}-listbox`, ref: el => (this.listboxEl = el), style: { maxHeight: this.maxHeight }, onScroll: this.handleScroll }, this.loading && (index.h("li", { class: "pds-multiselect__loading", role: "presentation" }, hasSlottedLoading ? (index.h("slot", { name: "loading" })) : (index.h("pds-loader", { size: "small" })))), !this.loading && filteredOptions.length === 0 && (index.h("li", { class: "pds-multiselect__empty", role: "presentation" }, hasSlottedEmpty ? (index.h("slot", { name: "empty" })) : (index.h("span", null, this.noOptionsFoundLabel)))), this.getGroupedRenderItems(filteredOptions).map((item, itemIndex) => {
|
|
1208
|
+
return (index.h("div", { class: "pds-multiselect__panel", ref: el => (this.panelEl = el), style: { minWidth: this.minWidth } }, index.h("div", { class: "pds-multiselect__search" }, index.h("pds-icon", { name: "search", size: "small", "aria-hidden": "true" }), index.h("input", { ref: el => (this.searchInputEl = el), type: "text", class: "pds-multiselect__search-input", placeholder: this.searchPlaceholder, value: this.searchQuery, "aria-label": this.searchOptionsLabel, "aria-controls": `${this.componentId}-listbox`, "aria-activedescendant": this.highlightedIndex >= 0 ? `${this.componentId}-option-${this.highlightedIndex}` : undefined, role: "combobox", "aria-haspopup": "listbox", "aria-expanded": "true", "aria-autocomplete": "list", autocomplete: "off", onInput: this.handleSearchInputChange, onKeyDown: this.handleSearchInputKeyDown })), this.renderSelectedItemsList(), index.h("ul", { class: "pds-multiselect__listbox", role: "listbox", "aria-multiselectable": "true", "aria-label": this.label || this.optionsLabel, id: `${this.componentId}-listbox`, ref: el => (this.listboxEl = el), style: { maxHeight: this.maxHeight }, onScroll: this.handleScroll }, this.loading && (index.h("li", { class: "pds-multiselect__loading", role: "presentation" }, hasSlottedLoading ? (index.h("slot", { name: "loading" })) : (index.h("pds-loader", { size: "small" })))), !this.loading && filteredOptions.length === 0 && (index.h("li", { class: "pds-multiselect__empty", role: "presentation" }, hasSlottedEmpty ? (index.h("slot", { name: "empty" })) : (index.h("span", null, this.noOptionsFoundLabel)))), this.getGroupedRenderItems(filteredOptions).map((item, itemIndex) => {
|
|
1209
1209
|
if (item.type === 'group') {
|
|
1210
1210
|
return (index.h("li", { key: `group-${itemIndex}`, role: "group", "aria-label": item.group, class: "pds-multiselect__group" }, index.h("span", { class: "pds-multiselect__group-header", "aria-hidden": "true" }, item.group), index.h("ul", { class: "pds-multiselect__group-list", role: "presentation" }, item.options.map(({ option, index }) => this.renderOption(option, index, valueArray)))));
|
|
1211
1211
|
}
|
|
@@ -1264,10 +1264,10 @@ const PdsMultiselect = class {
|
|
|
1264
1264
|
}
|
|
1265
1265
|
render() {
|
|
1266
1266
|
const hasSelections = this.selectedItems.length > 0;
|
|
1267
|
-
return (index.h(index.Host, { key: '
|
|
1267
|
+
return (index.h(index.Host, { key: 'd0879469e6ff943374c2f035c0a8d6d57c25dc5f', "aria-disabled": this.disabled ? 'true' : null }, index.h("div", { key: '80caa694099218561b85c93d547ec9208def0ec7', class: "pds-multiselect", onFocusout: this.handleContainerFocusOut }, this.label && (index.h("label", { key: 'b4eaa2c9e2901c28ecb0b8f55e63e33ad899e945', id: `${this.componentId}-label`, htmlFor: this.componentId, class: {
|
|
1268
1268
|
'pds-multiselect__label': true,
|
|
1269
1269
|
'visually-hidden': this.hideLabel,
|
|
1270
|
-
} }, this.label)), index.h("div", { key: '
|
|
1270
|
+
} }, this.label)), index.h("div", { key: '404ed58aa6bfb2248ffad5e56ebabfe65149b9a4', class: "pds-multiselect__wrapper", ref: el => (this.containerEl = el), style: { width: this.triggerWidth } }, this.slottedTriggerEl ? (index.h("slot", { name: "trigger" })) : this.selectedDisplay === 'pill' && this.pillPosition === 'inline' ? (index.h("div", { ref: el => (this.pillInlineTriggerEl = el || undefined), part: "trigger", class: {
|
|
1271
1271
|
'pds-multiselect__trigger': true,
|
|
1272
1272
|
'pds-multiselect__trigger--open': this.isOpen,
|
|
1273
1273
|
'pds-multiselect__trigger--disabled': this.disabled,
|
|
@@ -1283,7 +1283,7 @@ const PdsMultiselect = class {
|
|
|
1283
1283
|
}, id: this.componentId, disabled: this.disabled, "aria-required": this.required ? 'true' : undefined, "aria-expanded": this.isOpen ? 'true' : 'false', "aria-haspopup": "listbox", "aria-describedby": form.assignDescription(this.componentId, this.invalid || !!this.errorMessage, this.helperMessage, this.errorMessage), "aria-invalid": this.invalid || !!this.errorMessage ? 'true' : undefined, onClick: this.handleTriggerClick, onKeyDown: this.handleTriggerKeyDown }, index.h("span", { class: {
|
|
1284
1284
|
'pds-multiselect__trigger-text': true,
|
|
1285
1285
|
'pds-multiselect__trigger-text--placeholder': !hasSelections || (this.selectedDisplay === 'pill' && this.pillPosition === 'below'),
|
|
1286
|
-
} }, this.getTriggerText()), index.h("pds-icon", { "aria-hidden": "true", class: "pds-multiselect__icon", icon: index$1.enlarge }))), this.renderDropdown()), this.selectedDisplay === 'pill' && this.pillPosition === 'below' && this.renderBelowPills(), index.h("span", { key: '
|
|
1286
|
+
} }, this.getTriggerText()), index.h("pds-icon", { "aria-hidden": "true", class: "pds-multiselect__icon", icon: index$1.enlarge }))), this.renderDropdown()), this.selectedDisplay === 'pill' && this.pillPosition === 'below' && this.renderBelowPills(), index.h("span", { key: '73f17916a37722fefebd6b5a184a7b3dca6f4a9d', class: "visually-hidden", "aria-live": "polite", "aria-atomic": "true" }, this.removalAnnouncement), this.helperMessage && !(this.errorMessage && this.errorMessage.length > 0) && (index.h("p", { key: '1a987562b21da6f8d2f8c9f94e93e8c99a7abd74', class: "pds-multiselect__helper", id: form.messageId(this.componentId, 'helper') }, this.helperMessage)), this.errorMessage && (index.h("p", { key: 'ce1f7f48d6f8dee320d87cb7088f084e68cb3ab5', class: "pds-multiselect__error", id: form.messageId(this.componentId, 'error') }, index.h("pds-icon", { key: '8347dfdec6ef1b81d4cf9f72cba3d9ec965dcf08', "aria-hidden": "true", icon: index$1.danger, size: "small" }), this.errorMessage)), index.h("div", { key: '74cd840e102ad635d2f4bc23cf3bcfaa61d5cea1', style: { display: 'none' } }, index.h("slot", { key: 'c2fd9e71363a9661062c8d88be0dd78fc98b964d' })))));
|
|
1287
1287
|
}
|
|
1288
1288
|
static get formAssociated() { return true; }
|
|
1289
1289
|
get el() { return index.getElement(this); }
|