@pine-ds/core 4.7.1 → 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-drawer.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-drawer.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-drawer/pds-drawer.css +4 -0
- 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-drawer.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-drawer.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-1dc5a7e0.system.entry.js +1 -0
- 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-9713fb36.entry.js +1 -0
- 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 +341 -104
- package/hydrate/index.mjs +341 -104
- 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-74a05bcc.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-bf5887e8.system.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
package/hydrate/index.mjs
CHANGED
|
@@ -5752,7 +5752,7 @@ class MockPdsModal {
|
|
|
5752
5752
|
}; }
|
|
5753
5753
|
}
|
|
5754
5754
|
|
|
5755
|
-
/* pds-icons v10.
|
|
5755
|
+
/* pds-icons v10.7.0, ES Modules */
|
|
5756
5756
|
|
|
5757
5757
|
const addCircle = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' class='pdsicon'><path fill-rule='evenodd' d='M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18M1 12C1 5.925 5.925 1 12 1s11 4.925 11 11-4.925 11-11 11S1 18.075 1 12m11-5a1 1 0 0 1 1 1v3h3a1 1 0 1 1 0 2h-3v3a1 1 0 1 1-2 0v-3H8a1 1 0 1 1 0-2h3V8a1 1 0 0 1 1-1'/></svg>";
|
|
5758
5758
|
const calendarSimple = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' class='pdsicon'><path fill-rule='evenodd' d='M8 1a1 1 0 0 1 1 1v1h6V2a1 1 0 1 1 2 0v1.002c.476.003.891.013 1.252.042.562.046 1.079.145 1.564.392a4 4 0 0 1 1.748 1.748c.247.485.346 1.002.392 1.564C22 7.29 22 7.954 22 8.758v8.483c0 .805 0 1.47-.044 2.01-.046.563-.145 1.08-.392 1.565a4 4 0 0 1-1.748 1.748c-.485.247-1.002.346-1.564.392-.541.044-1.206.044-2.01.044H7.758c-.805 0-1.47 0-2.01-.044-.563-.046-1.08-.145-1.565-.392a4 4 0 0 1-1.748-1.748c-.247-.485-.346-1.002-.392-1.564C2 18.71 2 18.046 2 17.242V8.758c0-.805 0-1.47.044-2.01.046-.563.145-1.08.392-1.565a4 4 0 0 1 1.748-1.748c.485-.247 1.002-.346 1.564-.392.361-.03.777-.04 1.252-.042V2a1 1 0 0 1 1-1M7 5.002c-.446.003-.795.012-1.089.036-.438.035-.663.1-.819.18a2 2 0 0 0-.874.874c-.08.156-.145.38-.18.819C4 7.361 4 7.943 4 8.8V9h16v-.2c0-.857 0-1.439-.038-1.889-.035-.438-.1-.663-.18-.819a2 2 0 0 0-.874-.874c-.156-.08-.38-.145-.819-.18A15 15 0 0 0 17 5.002V6a1 1 0 1 1-2 0V5H9v1a1 1 0 1 1-2 0zM20 11H4v6.2c0 .857 0 1.439.038 1.889.035.438.1.663.18.819a2 2 0 0 0 .874.874c.156.08.38.145.819.18C6.361 21 6.943 21 7.8 21h8.4c.857 0 1.439 0 1.889-.038.438-.035.663-.1.819-.18a2 2 0 0 0 .874-.874c.08-.156.145-.38.18-.819.037-.45.038-1.032.038-1.889z'/></svg>";
|
|
@@ -6070,7 +6070,7 @@ class PdsAvatar {
|
|
|
6070
6070
|
// Percentage is average size of icon in relation to total avatar size
|
|
6071
6071
|
// of all preset sizes found in Figma.
|
|
6072
6072
|
// Used to allow icons to scale to container size
|
|
6073
|
-
return hAsync("pds-icon", { color: "var(--pine-color-brand)", icon: userFilled, size: "33.53%" });
|
|
6073
|
+
return hAsync("pds-icon", { color: "var(--pine-color-brand)", icon: userFilled, size: "33.53%", "aria-hidden": "true" });
|
|
6074
6074
|
};
|
|
6075
6075
|
this.classNames = () => ({
|
|
6076
6076
|
'pds-avatar': true,
|
|
@@ -6102,7 +6102,7 @@ class PdsAvatar {
|
|
|
6102
6102
|
}
|
|
6103
6103
|
}
|
|
6104
6104
|
render() {
|
|
6105
|
-
return (hAsync(Host, { key: '
|
|
6105
|
+
return (hAsync(Host, { key: 'bd60a3273eaa4e2f5fa4d0f5d0d27babd7674e09', id: this.componentId, class: Object.assign({}, this.classNames()) }, this.renderAvatar()));
|
|
6106
6106
|
}
|
|
6107
6107
|
get el() { return getElement(this); }
|
|
6108
6108
|
static get watchers() { return {
|
|
@@ -6721,6 +6721,7 @@ class PdsBox {
|
|
|
6721
6721
|
|
|
6722
6722
|
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)}`;
|
|
6723
6723
|
|
|
6724
|
+
const FORWARDED_ARIA_ATTRIBUTES = ['aria-current', 'aria-expanded', 'aria-haspopup', 'aria-label', 'aria-pressed'];
|
|
6724
6725
|
/**
|
|
6725
6726
|
* @part button - Exposes the underlying button (or anchor) element for styling, including custom size, shape, or surface on icon-only placements (e.g. a compact square or inverse icon button).
|
|
6726
6727
|
* @part button-content - Exposes the button content for styling.
|
|
@@ -6779,11 +6780,16 @@ class PdsButton {
|
|
|
6779
6780
|
this.variant = 'primary';
|
|
6780
6781
|
this.hasStartContent = false;
|
|
6781
6782
|
this.hasEndContent = false;
|
|
6782
|
-
this.
|
|
6783
|
-
|
|
6784
|
-
|
|
6785
|
-
|
|
6786
|
-
|
|
6783
|
+
this.forwardedAria = {};
|
|
6784
|
+
// Copied rather than moved: frameworks and DOM morphs put host attributes back on every update,
|
|
6785
|
+
// so taking them off the host would fight each one.
|
|
6786
|
+
this.syncHostAria = () => {
|
|
6787
|
+
const forwarded = {};
|
|
6788
|
+
FORWARDED_ARIA_ATTRIBUTES.forEach((name) => (forwarded[name] = this.el.getAttribute(name)));
|
|
6789
|
+
// A new object always re-renders, and frameworks re-set unchanged attributes on every render of their own.
|
|
6790
|
+
if (FORWARDED_ARIA_ATTRIBUTES.some((name) => forwarded[name] !== this.forwardedAria[name])) {
|
|
6791
|
+
this.forwardedAria = forwarded;
|
|
6792
|
+
}
|
|
6787
6793
|
this.forwardAriaControls();
|
|
6788
6794
|
};
|
|
6789
6795
|
this.handleStartSlotChange = (event) => {
|
|
@@ -6821,19 +6827,19 @@ class PdsButton {
|
|
|
6821
6827
|
};
|
|
6822
6828
|
}
|
|
6823
6829
|
connectedCallback() {
|
|
6824
|
-
this.
|
|
6830
|
+
this.syncHostAria();
|
|
6825
6831
|
if (typeof MutationObserver === 'undefined')
|
|
6826
6832
|
return;
|
|
6827
|
-
//
|
|
6828
|
-
this.
|
|
6829
|
-
this.
|
|
6830
|
-
attributeFilter:
|
|
6833
|
+
// Consumers, popovers and menus set these on the host, often after render, but only the inner element is announced.
|
|
6834
|
+
this.hostAriaObserver = new MutationObserver(this.syncHostAria);
|
|
6835
|
+
this.hostAriaObserver.observe(this.el, {
|
|
6836
|
+
attributeFilter: FORWARDED_ARIA_ATTRIBUTES.concat('aria-controls'),
|
|
6831
6837
|
});
|
|
6832
6838
|
}
|
|
6833
6839
|
disconnectedCallback() {
|
|
6834
6840
|
var _a;
|
|
6835
|
-
(_a = this.
|
|
6836
|
-
this.
|
|
6841
|
+
(_a = this.hostAriaObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
6842
|
+
this.hostAriaObserver = undefined;
|
|
6837
6843
|
}
|
|
6838
6844
|
componentDidRender() {
|
|
6839
6845
|
this.forwardAriaControls();
|
|
@@ -6951,16 +6957,13 @@ class PdsButton {
|
|
|
6951
6957
|
}
|
|
6952
6958
|
render() {
|
|
6953
6959
|
// Common props for both button and anchor elements
|
|
6954
|
-
const commonProps = {
|
|
6955
|
-
'aria-expanded': this.triggerExpanded,
|
|
6956
|
-
'aria-haspopup': this.triggerHasPopup,
|
|
6957
|
-
class: this.classNames(),
|
|
6958
|
-
part: 'button',
|
|
6959
|
-
ref: (el) => (this.contentEl = el),
|
|
6960
|
-
};
|
|
6960
|
+
const commonProps = Object.assign(Object.assign({}, this.forwardedAria), { class: this.classNames(), part: 'button', ref: (el) => (this.contentEl = el) });
|
|
6961
6961
|
const attributes = () => {
|
|
6962
6962
|
if (this.href) {
|
|
6963
|
-
return Object.assign(Object.assign({}, commonProps), {
|
|
6963
|
+
return Object.assign(Object.assign({}, commonProps), {
|
|
6964
|
+
// ARIA allows aria-pressed only on buttons, so a link never gets it.
|
|
6965
|
+
'aria-pressed': null, download: this.download, href: this.disabled ? null : this.href, target: this.target
|
|
6966
|
+
});
|
|
6964
6967
|
}
|
|
6965
6968
|
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 });
|
|
6966
6969
|
};
|
|
@@ -6993,8 +6996,7 @@ class PdsButton {
|
|
|
6993
6996
|
"variant": [1],
|
|
6994
6997
|
"hasStartContent": [32],
|
|
6995
6998
|
"hasEndContent": [32],
|
|
6996
|
-
"
|
|
6997
|
-
"triggerHasPopup": [32]
|
|
6999
|
+
"forwardedAria": [32]
|
|
6998
7000
|
},
|
|
6999
7001
|
"$listeners$": [[16, "keydown", "handleFormKeyDown"]],
|
|
7000
7002
|
"$lazyBundleId$": "-",
|
|
@@ -7187,7 +7189,7 @@ class PdsCheckbox {
|
|
|
7187
7189
|
this.hostKeeper.record(hostClass);
|
|
7188
7190
|
return (hAsync(Host, { key: 'bbe09a5e9eb55f62b2921b09a04ddc9476a871ae', class: hostClass }, hAsync("label", { key: 'fa1856d9306eb8c0c19618ea5e2619ea20c3c51d', htmlFor: this.componentId }, hAsync("input", Object.assign({ key: '8537d97a8e69a17d0d563306dac179e393885dda', type: "checkbox", "aria-describedby": 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)), hAsync("span", { key: 'e523922889c80a2d18243cb560cd855bab95803d', class: this.hideLabel ? 'visually-hidden' : '' }, hAsync("slot", { key: 'b6ff34ecbc346d254a0211bfa610823feedb486b', name: "label", onSlotchange: this.updateHasLabelSlot }), !this.hasLabelSlot && this.label)), this.helperMessage &&
|
|
7189
7191
|
hAsync("div", { key: '55dcca850dff0aa93d9ba63d6827d9155ac35dab', class: 'pds-checkbox__message', id: messageId(this.componentId, 'helper') }, this.helperMessage), this.errorMessage &&
|
|
7190
|
-
hAsync("div", { key: '5af843679994d29f084d41e90e41e0939c951063', class: `pds-checkbox__message pds-checkbox__message--error`, id: messageId(this.componentId, 'error'), "aria-live": "assertive" }, hAsync("pds-icon", { key: '
|
|
7192
|
+
hAsync("div", { key: '5af843679994d29f084d41e90e41e0939c951063', class: `pds-checkbox__message pds-checkbox__message--error`, id: messageId(this.componentId, 'error'), "aria-live": "assertive" }, hAsync("pds-icon", { key: '88a46a17abc1c7b3b3e90543ce8dcf38a14c878c', "aria-hidden": "true", icon: danger, size: "small" }), this.errorMessage)));
|
|
7191
7193
|
}
|
|
7192
7194
|
static get formAssociated() { return true; }
|
|
7193
7195
|
get el() { return getElement(this); }
|
|
@@ -8986,12 +8988,24 @@ function injectStyles() {
|
|
|
8986
8988
|
function isOverflowing(el) {
|
|
8987
8989
|
return el.scrollWidth > el.clientWidth;
|
|
8988
8990
|
}
|
|
8991
|
+
/**
|
|
8992
|
+
* Engines without `:focus-visible` throw on the selector, so there every
|
|
8993
|
+
* focus counts as visible rather than none.
|
|
8994
|
+
*/
|
|
8995
|
+
function isFocusVisible(el) {
|
|
8996
|
+
try {
|
|
8997
|
+
return el.matches(':focus-visible');
|
|
8998
|
+
}
|
|
8999
|
+
catch (_a) {
|
|
9000
|
+
return true;
|
|
9001
|
+
}
|
|
9002
|
+
}
|
|
8989
9003
|
/**
|
|
8990
9004
|
* Sets up automatic tooltip behavior for a truncated element.
|
|
8991
9005
|
*
|
|
8992
|
-
* When the element's text overflows, hovering
|
|
8993
|
-
* will display a tooltip showing the full text content. The
|
|
8994
|
-
* rendered as a portal on document.body and positioned with Floating UI.
|
|
9006
|
+
* When the element's text overflows, hovering the host element or giving it
|
|
9007
|
+
* keyboard focus will display a tooltip showing the full text content. The
|
|
9008
|
+
* tooltip is rendered as a portal on document.body and positioned with Floating UI.
|
|
8995
9009
|
*
|
|
8996
9010
|
* Also owns the element's `tabindex` while it is clipped — see syncTabIndex.
|
|
8997
9011
|
*
|
|
@@ -9182,18 +9196,30 @@ function setupTruncationTooltip(options) {
|
|
|
9182
9196
|
isHoveringPortal = false;
|
|
9183
9197
|
scheduleHide();
|
|
9184
9198
|
}
|
|
9185
|
-
|
|
9199
|
+
// Keyboard focus only: focus from a click would pin the tooltip open after the pointer leaves.
|
|
9200
|
+
// Events from inside a shadow root arrive retargeted to its host, so test the innermost target.
|
|
9201
|
+
function showForVisibleFocus(event) {
|
|
9202
|
+
if (!isFocusVisible(event.composedPath()[0]))
|
|
9203
|
+
return;
|
|
9186
9204
|
isFocused = true;
|
|
9187
9205
|
showTooltip();
|
|
9188
9206
|
}
|
|
9207
|
+
// A key press after a click makes focus visible in place, with no new focusin. keyup, not
|
|
9208
|
+
// keydown, so Tab's focus move lands first; Escape asks to dismiss, never to reveal.
|
|
9209
|
+
function handleKeyUp(event) {
|
|
9210
|
+
if (isFocused || event.key === 'Escape')
|
|
9211
|
+
return;
|
|
9212
|
+
showForVisibleFocus(event);
|
|
9213
|
+
}
|
|
9189
9214
|
function handleFocusOut() {
|
|
9190
9215
|
isFocused = false;
|
|
9191
9216
|
scheduleHide();
|
|
9192
9217
|
}
|
|
9193
9218
|
hostEl.addEventListener('mouseenter', handleMouseEnter);
|
|
9194
9219
|
hostEl.addEventListener('mouseleave', handleMouseLeave);
|
|
9195
|
-
focusEl.addEventListener('focusin',
|
|
9220
|
+
focusEl.addEventListener('focusin', showForVisibleFocus);
|
|
9196
9221
|
focusEl.addEventListener('focusout', handleFocusOut);
|
|
9222
|
+
focusEl.addEventListener('keyup', handleKeyUp);
|
|
9197
9223
|
// Return cleanup function
|
|
9198
9224
|
return () => {
|
|
9199
9225
|
disposed = true;
|
|
@@ -9213,8 +9239,9 @@ function setupTruncationTooltip(options) {
|
|
|
9213
9239
|
}
|
|
9214
9240
|
hostEl.removeEventListener('mouseenter', handleMouseEnter);
|
|
9215
9241
|
hostEl.removeEventListener('mouseleave', handleMouseLeave);
|
|
9216
|
-
focusEl.removeEventListener('focusin',
|
|
9242
|
+
focusEl.removeEventListener('focusin', showForVisibleFocus);
|
|
9217
9243
|
focusEl.removeEventListener('focusout', handleFocusOut);
|
|
9244
|
+
focusEl.removeEventListener('keyup', handleKeyUp);
|
|
9218
9245
|
removePortal();
|
|
9219
9246
|
};
|
|
9220
9247
|
}
|
|
@@ -9456,13 +9483,13 @@ class PdsChip {
|
|
|
9456
9483
|
'aria-label': this.dismissLabel,
|
|
9457
9484
|
};
|
|
9458
9485
|
};
|
|
9459
|
-
return (hAsync(CloseElement, Object.assign({}, closeAttributes(), { onClick: this.handleCloseClick }), hAsync("pds-icon", { icon: remove, size: this.iconSize })));
|
|
9486
|
+
return (hAsync(CloseElement, Object.assign({}, closeAttributes(), { onClick: this.handleCloseClick }), hAsync("pds-icon", { icon: remove, size: this.iconSize, "aria-hidden": "true" })));
|
|
9460
9487
|
}
|
|
9461
9488
|
render() {
|
|
9462
9489
|
const hostClass = this.classNames();
|
|
9463
9490
|
const hostStyles = this.hostStyles;
|
|
9464
9491
|
this.hostKeeper.record(hostClass, hostStyles);
|
|
9465
|
-
return (hAsync(Host, { key: '
|
|
9492
|
+
return (hAsync(Host, { key: 'fa432fa987afb5b856e5e7d3894a88be043805d2', class: hostClass, id: this.componentId, style: hostStyles }, this.setChipContent(), this.effectiveVariant === 'tag' && this.renderCloseButton()));
|
|
9466
9493
|
}
|
|
9467
9494
|
get el() { return getElement(this); }
|
|
9468
9495
|
static get style() { return pdsChipTokensCss() + pdsChipCss(); }
|
|
@@ -13469,7 +13496,7 @@ class PdsCombobox {
|
|
|
13469
13496
|
'pds-combobox__option--layout': isLayout,
|
|
13470
13497
|
'pds-combobox__option--chip': isChip,
|
|
13471
13498
|
'pds-combobox__option--disabled': isDisabled,
|
|
13472
|
-
}, "data-option-index": index, onMouseDown: this.onOptionMouseDown, onClick: this.onOptionClick, onMouseEnter: this.onOptionMouseEnter, onKeyDown: this.onOptionKeyDown }, isLayout ? (hAsync("pds-box", { class: "pds-combobox__option-layout-wrapper", innerHTML: this.getOptionLayoutContent(option) })) : isChip ? (this.renderOptionChip(option)) : (this.renderOptionLabel(option)), isSelected && hAsync("pds-icon", { icon: "check", size: "regular", class: "pds-combobox__option-check" })));
|
|
13499
|
+
}, "data-option-index": index, onMouseDown: this.onOptionMouseDown, onClick: this.onOptionClick, onMouseEnter: this.onOptionMouseEnter, onKeyDown: this.onOptionKeyDown }, isLayout ? (hAsync("pds-box", { class: "pds-combobox__option-layout-wrapper", innerHTML: this.getOptionLayoutContent(option) })) : isChip ? (this.renderOptionChip(option)) : (this.renderOptionLabel(option)), isSelected && hAsync("pds-icon", { icon: "check", size: "regular", "aria-hidden": "true", class: "pds-combobox__option-check" })));
|
|
13473
13500
|
}
|
|
13474
13501
|
/** An option's text, after its `data-icon` when it has one. */
|
|
13475
13502
|
renderOptionLabel(option) {
|
|
@@ -13668,7 +13695,7 @@ class PdsCombobox {
|
|
|
13668
13695
|
}
|
|
13669
13696
|
// Helper method to render chip trigger default content
|
|
13670
13697
|
renderChipTriggerDefaultContent() {
|
|
13671
|
-
return (hAsync("span", { class: "pds-combobox__chip-trigger-label" }, this.selectedChipIcon && hAsync("pds-icon", { icon: this.selectedChipIcon, class: "pds-combobox__chip-trigger-icon" }), this.selectedLabel || this.placeholder));
|
|
13698
|
+
return (hAsync("span", { class: "pds-combobox__chip-trigger-label" }, this.selectedChipIcon && hAsync("pds-icon", { icon: this.selectedChipIcon, "aria-hidden": "true", class: "pds-combobox__chip-trigger-icon" }), this.selectedLabel || this.placeholder));
|
|
13672
13699
|
}
|
|
13673
13700
|
// Helper method to render option as chip (new automatic approach)
|
|
13674
13701
|
renderOptionChip(option) {
|
|
@@ -13699,13 +13726,13 @@ class PdsCombobox {
|
|
|
13699
13726
|
]
|
|
13700
13727
|
.filter(Boolean)
|
|
13701
13728
|
.join(' ');
|
|
13702
|
-
return (hAsync(Host, { key: '
|
|
13729
|
+
return (hAsync(Host, { key: 'c4bc64f28f6f8f2170d199bd89ba02b3fbe41bad', "aria-disabled": this.disabled ? 'true' : null }, hAsync("div", { key: '7648c513d133e11376e50a9a15bc9a227b8fe1d2', class: "pds-combobox", tabIndex: -1, onFocusout: this.onComboboxFocusOut, part: "combobox" }, this.hasVisibleLabel && (hAsync("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' ? (hAsync("div", { class: "pds-combobox__input-wrapper", style: { width: this.triggerWidth } }, hAsync("input", { ref: el => {
|
|
13703
13730
|
this.inputEl = el;
|
|
13704
13731
|
this.triggerEl = el;
|
|
13705
13732
|
}, class: {
|
|
13706
13733
|
'pds-combobox__input': true,
|
|
13707
13734
|
'pds-combobox__input--invalid': this.isInvalid(),
|
|
13708
|
-
}, type: "text", role: "combobox", "aria-autocomplete": "list", "aria-haspopup": this.inputPopupRole === 'tree' ? 'tree' : undefined, "aria-controls": this.listboxId, "aria-describedby": 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" }), hAsync("pds-icon", { icon: "enlarge", "aria-hidden": "true", class: "pds-combobox__input-icon" }))) : this.trigger === 'chip' ? (hAsync("div", { class: this.getChipTriggerClass(), style: { width: this.triggerWidth }, role: this.usesPanelSearch ? 'button' : 'combobox', "aria-haspopup": this.triggerPopupRole, "aria-controls": this.listboxId, "aria-describedby": 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())) : (hAsync("div", { class: triggerClass, style: { width: this.triggerWidth }, role: this.usesPanelSearch ? 'button' : 'combobox', "aria-haspopup": this.triggerPopupRole, "aria-controls": this.listboxId, "aria-describedby": 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(), hAsync("div", { key: '
|
|
13735
|
+
}, type: "text", role: "combobox", "aria-autocomplete": "list", "aria-haspopup": this.inputPopupRole === 'tree' ? 'tree' : undefined, "aria-controls": this.listboxId, "aria-describedby": 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" }), hAsync("pds-icon", { icon: "enlarge", "aria-hidden": "true", class: "pds-combobox__input-icon" }))) : this.trigger === 'chip' ? (hAsync("div", { class: this.getChipTriggerClass(), style: { width: this.triggerWidth }, role: this.usesPanelSearch ? 'button' : 'combobox', "aria-haspopup": this.triggerPopupRole, "aria-controls": this.listboxId, "aria-describedby": 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())) : (hAsync("div", { class: triggerClass, style: { width: this.triggerWidth }, role: this.usesPanelSearch ? 'button' : 'combobox', "aria-haspopup": this.triggerPopupRole, "aria-controls": this.listboxId, "aria-describedby": 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(), hAsync("div", { key: 'f9aca483c67dd0cdf2fcbdc651a13cfb8fcfe7f1', style: { display: 'none' } }, hAsync("slot", { key: '7a0dc5718ccf377b41bd1716030f16a135700518', onSlotchange: () => this.updateOptions() })), this.renderDropdown(), this.groupDisplay !== 'inline' && [
|
|
13709
13736
|
hAsync("span", { key: "drill-status", class: "visually-hidden", role: "status", "aria-live": "polite" }, this.isOpen && this.effectiveGroupDisplay === 'drill-in' && this.openGroup !== null ? this.openGroup.label : ''),
|
|
13710
13737
|
// Its own region: sharing one, revealing a row then opening it would leave the text the
|
|
13711
13738
|
// same, and opening the group would go unannounced.
|
|
@@ -16165,7 +16192,7 @@ function unwrapReconnectedContent(container, selector, contentSelector) {
|
|
|
16165
16192
|
}
|
|
16166
16193
|
}
|
|
16167
16194
|
|
|
16168
|
-
const pdsDrawerCss = () => `.pds-drawer__modal>.pds-modal__backdrop{-ms-flex-align:stretch;align-items:stretch}.pds-drawer__modal:not(.pds-drawer__modal--modal)>.pds-modal__backdrop{background-color:transparent;pointer-events:none}@supports ((-webkit-backdrop-filter: blur(3px)) or (backdrop-filter: blur(3px))){.pds-drawer__modal:not(.pds-drawer__modal--modal)>.pds-modal__backdrop{-webkit-backdrop-filter:none;backdrop-filter:none}}.pds-drawer__modal>.pds-modal__backdrop[aria-modal]::before{content:none}.pds-drawer__modal>.pds-modal__backdrop>.pds-modal{border-radius:0;height:100%;margin:0;max-height:100%;max-width:100%;pointer-events:auto;width:var(--pds-drawer-width, 500px)}.pds-drawer{display:contents}.pds-drawer.pds-drawer--end .pds-drawer__modal>.pds-modal__backdrop{-ms-flex-pack:end;justify-content:flex-end}.pds-drawer.pds-drawer--start .pds-drawer__modal>.pds-modal__backdrop{-ms-flex-pack:start;justify-content:flex-start}.pds-drawer.pds-drawer--sm{--pds-drawer-width:360px}.pds-drawer.pds-drawer--md{--pds-drawer-width:500px}`;
|
|
16195
|
+
const pdsDrawerCss = () => `.pds-drawer__modal>.pds-modal__backdrop{-ms-flex-align:stretch;align-items:stretch}.pds-drawer__modal:not(.pds-drawer__modal--modal)>.pds-modal__backdrop{background-color:transparent;pointer-events:none}@supports ((-webkit-backdrop-filter: blur(3px)) or (backdrop-filter: blur(3px))){.pds-drawer__modal:not(.pds-drawer__modal--modal)>.pds-modal__backdrop{-webkit-backdrop-filter:none;backdrop-filter:none}}.pds-drawer__modal:not(.pds-drawer__modal--modal)>.pds-modal__backdrop>*{pointer-events:auto}.pds-drawer__modal>.pds-modal__backdrop[aria-modal]::before{content:none}.pds-drawer__modal>.pds-modal__backdrop>.pds-modal{border-radius:0;height:100%;margin:0;max-height:100%;max-width:100%;pointer-events:auto;width:var(--pds-drawer-width, 500px)}.pds-drawer{display:contents}.pds-drawer.pds-drawer--end .pds-drawer__modal>.pds-modal__backdrop{-ms-flex-pack:end;justify-content:flex-end}.pds-drawer.pds-drawer--start .pds-drawer__modal>.pds-modal__backdrop{-ms-flex-pack:start;justify-content:flex-start}.pds-drawer.pds-drawer--sm{--pds-drawer-width:360px}.pds-drawer.pds-drawer--md{--pds-drawer-width:500px}`;
|
|
16169
16196
|
|
|
16170
16197
|
// Known selectors for content Pine components portal out of place rather than
|
|
16171
16198
|
// rendering where they are — pds-tooltip and pds-combobox's dropdown in
|
|
@@ -16634,11 +16661,11 @@ class PdsDropdownMenu {
|
|
|
16634
16661
|
if (tagName === 'pds-dropdown-menu-item') {
|
|
16635
16662
|
// For pds-dropdown-menu-item, focus the inner element
|
|
16636
16663
|
const menuItem = item;
|
|
16637
|
-
const
|
|
16664
|
+
const innerControl = (_a = menuItem.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('button, [role="menuitem"]');
|
|
16638
16665
|
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'))
|
|
16639
16666
|
|| ((_e = menuItem.shadowRoot) === null || _e === void 0 ? void 0 : _e.querySelector('a'));
|
|
16640
|
-
if (
|
|
16641
|
-
|
|
16667
|
+
if (innerControl) {
|
|
16668
|
+
innerControl.focus();
|
|
16642
16669
|
}
|
|
16643
16670
|
else if (innerLink) {
|
|
16644
16671
|
innerLink.focus();
|
|
@@ -16790,7 +16817,7 @@ class PdsDropdownMenu {
|
|
|
16790
16817
|
}
|
|
16791
16818
|
}
|
|
16792
16819
|
render() {
|
|
16793
|
-
return (hAsync(Host, { key: '
|
|
16820
|
+
return (hAsync(Host, { key: '1765909c8c3c140e52dc3f6b50693c97d6bcc003', id: this.componentId }, hAsync("slot", { key: '0b566cd288428a0694a2d61d4a73bd79def4bfad', name: "trigger", onSlotchange: this.handleTriggerSlotChange }), hAsync("pds-box", { key: '16cdfc208cfe7f6e074289c30aa0e1188a34876d', "border-radius": "sm", display: "flex", direction: "column", class: "pds-dropdown-menu--panel is-hidden", shadow: "100", part: "menu-panel" }, hAsync("div", { key: 'a28c1736ad02e8ac3d82c0fe1933606a7216989b', class: { 'pds-dropdown-menu__header': true, 'is-hidden': !this.hasHeader } }, hAsync("slot", { key: '9c6dfddefb266083f68aa27d6cc01127a69cd1cf', name: "header", onSlotchange: this.handleHeaderSlotChange })), hAsync("div", { key: '8cfe85c10f92d4a4ec6b5d2d0264d054a74ba29b', class: "pds-dropdown-menu__items", role: "menu", "aria-orientation": "vertical" }, hAsync("slot", { key: '1a5b4aa406d2706ca8cef49deb05140a5763be1c', onSlotchange: this.handleSlotChange })))));
|
|
16794
16821
|
}
|
|
16795
16822
|
get host() { return getElement(this); }
|
|
16796
16823
|
static get style() { return pdsDropdownMenuCss(); }
|
|
@@ -16809,10 +16836,10 @@ class PdsDropdownMenu {
|
|
|
16809
16836
|
}; }
|
|
16810
16837
|
}
|
|
16811
16838
|
|
|
16812
|
-
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)}`;
|
|
16839
|
+
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)}`;
|
|
16813
16840
|
|
|
16814
16841
|
/**
|
|
16815
|
-
* @part button
|
|
16842
|
+
* @part button - Exposes the item's inner element for styling. Appears on button and informational items, not on links.
|
|
16816
16843
|
*/
|
|
16817
16844
|
class PdsDropdownMenuItem {
|
|
16818
16845
|
constructor(hostRef) {
|
|
@@ -16828,9 +16855,17 @@ class PdsDropdownMenuItem {
|
|
|
16828
16855
|
* @defaultValue false
|
|
16829
16856
|
*/
|
|
16830
16857
|
this.disabled = false;
|
|
16858
|
+
/**
|
|
16859
|
+
* It determines whether or not the dropdown-item is informational: text that the arrow keys
|
|
16860
|
+
* reach but that can't be activated. Takes precedence over `href` and `destructive`.
|
|
16861
|
+
* Screen readers announce it as dimmed or unavailable, the same way as a disabled item.
|
|
16862
|
+
* @defaultValue false
|
|
16863
|
+
*/
|
|
16864
|
+
this.informational = false;
|
|
16831
16865
|
/**
|
|
16832
16866
|
* Determines whether the link should open in a new tab and display an external icon.
|
|
16833
16867
|
* This is a simpler alternative to using `target="_blank"` for the common case.
|
|
16868
|
+
* Ignored when `informational` is set.
|
|
16834
16869
|
* @defaultValue false
|
|
16835
16870
|
*/
|
|
16836
16871
|
this.external = false;
|
|
@@ -16841,6 +16876,12 @@ class PdsDropdownMenuItem {
|
|
|
16841
16876
|
this.handleBlur = () => {
|
|
16842
16877
|
this.hasFocus = false;
|
|
16843
16878
|
};
|
|
16879
|
+
// Space would otherwise scroll the page, since nothing in the item takes the key.
|
|
16880
|
+
this.handleInformationalKeyDown = (event) => {
|
|
16881
|
+
if (event.key === ' ') {
|
|
16882
|
+
event.preventDefault();
|
|
16883
|
+
}
|
|
16884
|
+
};
|
|
16844
16885
|
this.handleKeyDown = (event) => {
|
|
16845
16886
|
// Handle keyboard events
|
|
16846
16887
|
if (!this.disabled && (event.key === 'Enter')) {
|
|
@@ -16862,6 +16903,8 @@ class PdsDropdownMenuItem {
|
|
|
16862
16903
|
;
|
|
16863
16904
|
handleClick() {
|
|
16864
16905
|
var _a;
|
|
16906
|
+
if (this.informational)
|
|
16907
|
+
return;
|
|
16865
16908
|
// Filter only pds-dropdown-menu-item elements and find the index of the current item
|
|
16866
16909
|
const menuItems = Array.from(this.host.parentNode.children).filter((child) => child.tagName.toLowerCase() === 'pds-dropdown-menu-item');
|
|
16867
16910
|
const itemIndex = menuItems.indexOf(this.host);
|
|
@@ -16874,6 +16917,12 @@ class PdsDropdownMenuItem {
|
|
|
16874
16917
|
});
|
|
16875
16918
|
}
|
|
16876
16919
|
renderElement() {
|
|
16920
|
+
if (this.informational) {
|
|
16921
|
+
return (hAsync("div", { class: {
|
|
16922
|
+
'pds-dropdown-menu-item__content': true,
|
|
16923
|
+
'has-focus': this.hasFocus
|
|
16924
|
+
}, role: "menuitem", "aria-disabled": "true", part: "button", tabIndex: this.disabled ? -1 : 0, onKeyDown: this.handleInformationalKeyDown, onFocus: this.handleFocus, onBlur: this.handleBlur }, hAsync("slot", null)));
|
|
16925
|
+
}
|
|
16877
16926
|
if (this.href != null) {
|
|
16878
16927
|
return (hAsync("pds-link", { download: this.download, href: this.disabled ? null : this.href, external: this.external, target: this.target, class: {
|
|
16879
16928
|
'pds-dropdown-menu-item__content': true,
|
|
@@ -16886,7 +16935,14 @@ class PdsDropdownMenuItem {
|
|
|
16886
16935
|
}, 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 }, hAsync("slot", null)));
|
|
16887
16936
|
}
|
|
16888
16937
|
render() {
|
|
16889
|
-
return (hAsync(Host, { key: '
|
|
16938
|
+
return (hAsync(Host, { key: '47a62550fde33f892d7af4f4e71b67ebf7aa2c3f', id: this.componentId, class: {
|
|
16939
|
+
'is-disabled': this.disabled,
|
|
16940
|
+
'is-informational': this.informational,
|
|
16941
|
+
'destructive': !this.disabled && !this.informational && this.destructive
|
|
16942
|
+
}, onClick: () => !this.disabled && this.handleClick(), role: "none",
|
|
16943
|
+
// ARIA ignores role="none" on focusable elements, so a focusable host would sit between
|
|
16944
|
+
// the menu and the informational menuitem as an unexpected child.
|
|
16945
|
+
tabIndex: this.informational ? null : -1, "aria-disabled": this.disabled && !this.informational ? 'true' : null }, this.renderElement()));
|
|
16890
16946
|
}
|
|
16891
16947
|
get host() { return getElement(this); }
|
|
16892
16948
|
static get style() { return pdsDropdownMenuItemCss(); }
|
|
@@ -16899,6 +16955,7 @@ class PdsDropdownMenuItem {
|
|
|
16899
16955
|
"disabled": [516],
|
|
16900
16956
|
"download": [1],
|
|
16901
16957
|
"href": [1],
|
|
16958
|
+
"informational": [516],
|
|
16902
16959
|
"external": [516],
|
|
16903
16960
|
"target": [513],
|
|
16904
16961
|
"hasFocus": [32],
|
|
@@ -16906,7 +16963,7 @@ class PdsDropdownMenuItem {
|
|
|
16906
16963
|
},
|
|
16907
16964
|
"$listeners$": undefined,
|
|
16908
16965
|
"$lazyBundleId$": "-",
|
|
16909
|
-
"$attrsToReflect$": [["disabled", "disabled"], ["external", "external"], ["target", "target"]]
|
|
16966
|
+
"$attrsToReflect$": [["disabled", "disabled"], ["informational", "informational"], ["external", "external"], ["target", "target"]]
|
|
16910
16967
|
}; }
|
|
16911
16968
|
}
|
|
16912
16969
|
|
|
@@ -18693,7 +18750,7 @@ function containsComposed(ancestor, node) {
|
|
|
18693
18750
|
*/
|
|
18694
18751
|
const openModals = new Map();
|
|
18695
18752
|
let openSequence = 0;
|
|
18696
|
-
/** Whether an open
|
|
18753
|
+
/** Whether the panel of an open popover that takes Escape sits in `root`, including inside shadow roots under it. */
|
|
18697
18754
|
function hasOpenPopover(root) {
|
|
18698
18755
|
if (root.querySelector('[data-pds-popover-open]'))
|
|
18699
18756
|
return true;
|
|
@@ -19240,14 +19297,14 @@ class PdsModal {
|
|
|
19240
19297
|
}
|
|
19241
19298
|
render() {
|
|
19242
19299
|
const [sizeClass = 'md', customSize] = this.resolveSize();
|
|
19243
|
-
return (hAsync("dialog", { key: '
|
|
19300
|
+
return (hAsync("dialog", { key: '0a3ea92246b5ae704bc7dcbadf4f4e0d5a54e9e6', class: {
|
|
19244
19301
|
'pds-modal__backdrop': true,
|
|
19245
19302
|
'open': this.open
|
|
19246
|
-
}, "aria-modal": this.disableTopLayer ? 'false' : 'true', "aria-labelledby": `${this.componentId}-heading`, onClick: this.handleBackdropClick, onCancel: this.handleCancel }, hAsync("div", { key: '
|
|
19303
|
+
}, "aria-modal": this.disableTopLayer ? 'false' : 'true', "aria-labelledby": `${this.componentId}-heading`, onClick: this.handleBackdropClick, onCancel: this.handleCancel }, hAsync("div", { key: 'a38029c2284ed345bec2ce7638fc3415818cd609', class: {
|
|
19247
19304
|
'pds-modal': true,
|
|
19248
19305
|
[`pds-modal--${sizeClass}`]: true,
|
|
19249
19306
|
'pds-modal--scrollable': this.scrollable
|
|
19250
|
-
}, style: customSize !== undefined ? { '--pds-modal-max-width': customSize } : undefined, part: "modal" }, hAsync("slot", { key: '
|
|
19307
|
+
}, style: customSize !== undefined ? { '--pds-modal-max-width': customSize } : undefined, part: "modal" }, hAsync("slot", { key: '396da81af42685f5c083f853afa207a6844e444e' }))));
|
|
19251
19308
|
}
|
|
19252
19309
|
get el() { return getElement(this); }
|
|
19253
19310
|
static get watchers() { return {
|
|
@@ -19298,6 +19355,21 @@ class PdsModalContent {
|
|
|
19298
19355
|
* Tracks whether the border prop was explicitly set by the user
|
|
19299
19356
|
*/
|
|
19300
19357
|
this.userSetBorder = false;
|
|
19358
|
+
this.hasLoaded = false;
|
|
19359
|
+
/**
|
|
19360
|
+
* Handle scroll events
|
|
19361
|
+
*/
|
|
19362
|
+
this.handleScroll = () => {
|
|
19363
|
+
this.updateBorders();
|
|
19364
|
+
};
|
|
19365
|
+
/**
|
|
19366
|
+
* Handle resize events
|
|
19367
|
+
*/
|
|
19368
|
+
this.handleResize = () => {
|
|
19369
|
+
this.calculateMaxHeight();
|
|
19370
|
+
// Update borders after resize as content scrollability might change
|
|
19371
|
+
setTimeout(() => this.updateBorders(), 50);
|
|
19372
|
+
};
|
|
19301
19373
|
}
|
|
19302
19374
|
// Unwraps a nested .pds-modal-content left by a page-cache (Turbo, bfcache) reconnect.
|
|
19303
19375
|
componentDidRender() {
|
|
@@ -19311,43 +19383,30 @@ class PdsModalContent {
|
|
|
19311
19383
|
this.userSetBorder = hasBorderAttribute || this.border !== 'none';
|
|
19312
19384
|
}
|
|
19313
19385
|
componentDidLoad() {
|
|
19386
|
+
this.hasLoaded = true;
|
|
19314
19387
|
this.calculateMaxHeight();
|
|
19315
|
-
// Set up resize listener
|
|
19316
|
-
window.addEventListener('resize', this.handleResize.bind(this));
|
|
19317
|
-
// Only set up scroll listener for border updates if borders are managed automatically
|
|
19318
19388
|
if (!this.userSetBorder) {
|
|
19319
|
-
|
|
19320
|
-
|
|
19321
|
-
this.el.addEventListener('scroll', this.handleScroll.bind(this));
|
|
19322
|
-
// Initial border update after everything is set up
|
|
19323
|
-
setTimeout(() => this.updateBorders(), 100);
|
|
19324
|
-
}, 100);
|
|
19389
|
+
// Initial border update after everything is set up
|
|
19390
|
+
setTimeout(() => this.updateBorders(), 200);
|
|
19325
19391
|
}
|
|
19326
19392
|
}
|
|
19393
|
+
// Here rather than in componentDidLoad, which runs once: content taken out of the page and put
|
|
19394
|
+
// back (a DOM morph or a framework moving it) gets its listeners and header/footer observer back.
|
|
19395
|
+
connectedCallback() {
|
|
19396
|
+
window.addEventListener('resize', this.handleResize);
|
|
19397
|
+
// The scroll happens on the component element itself (this.el), not the inner div
|
|
19398
|
+
this.el.addEventListener('scroll', this.handleScroll);
|
|
19399
|
+
if (this.hasLoaded)
|
|
19400
|
+
this.calculateMaxHeight();
|
|
19401
|
+
}
|
|
19327
19402
|
disconnectedCallback() {
|
|
19328
|
-
window.removeEventListener('resize', this.handleResize
|
|
19329
|
-
|
|
19330
|
-
if (!this.userSetBorder) {
|
|
19331
|
-
this.el.removeEventListener('scroll', this.handleScroll.bind(this));
|
|
19332
|
-
}
|
|
19403
|
+
window.removeEventListener('resize', this.handleResize);
|
|
19404
|
+
this.el.removeEventListener('scroll', this.handleScroll);
|
|
19333
19405
|
if (this.mutationObserver) {
|
|
19334
19406
|
this.mutationObserver.disconnect();
|
|
19407
|
+
this.mutationObserver = undefined;
|
|
19335
19408
|
}
|
|
19336
19409
|
}
|
|
19337
|
-
/**
|
|
19338
|
-
* Handle scroll events
|
|
19339
|
-
*/
|
|
19340
|
-
handleScroll() {
|
|
19341
|
-
this.updateBorders();
|
|
19342
|
-
}
|
|
19343
|
-
/**
|
|
19344
|
-
* Handle resize events
|
|
19345
|
-
*/
|
|
19346
|
-
handleResize() {
|
|
19347
|
-
this.calculateMaxHeight();
|
|
19348
|
-
// Update borders after resize as content scrollability might change
|
|
19349
|
-
setTimeout(() => this.updateBorders(), 50);
|
|
19350
|
-
}
|
|
19351
19410
|
/**
|
|
19352
19411
|
* Updates border visibility based on scroll state (only if not user-defined)
|
|
19353
19412
|
*/
|
|
@@ -19464,10 +19523,10 @@ class PdsModalContent {
|
|
|
19464
19523
|
render() {
|
|
19465
19524
|
// Only apply max-height style if it's not 'none'
|
|
19466
19525
|
const styleObj = this.contentMaxHeight !== 'none' ? { maxHeight: this.contentMaxHeight } : {};
|
|
19467
|
-
return (hAsync(Host, { key: '
|
|
19526
|
+
return (hAsync(Host, { key: 'c83e230d23444e3d5358d995170e2b8386884fe8' }, hAsync("div", { key: 'b91de2c71e693b5a1ba2b257d741e7b0418c2d76', class: {
|
|
19468
19527
|
'pds-modal-content': true,
|
|
19469
19528
|
[`pds-modal-content--border-${this.border}`]: true
|
|
19470
|
-
}, style: styleObj, tabindex: "-1" }, hAsync("slot", { key: '
|
|
19529
|
+
}, style: styleObj, tabindex: "-1" }, hAsync("slot", { key: '971cbd44ffeac4bb13a651948a119c603bed9e4f' }))));
|
|
19471
19530
|
}
|
|
19472
19531
|
get el() { return getElement(this); }
|
|
19473
19532
|
static get style() { return pdsModalContentCss(); }
|
|
@@ -20723,7 +20782,7 @@ class PdsMultiselect {
|
|
|
20723
20782
|
'pds-multiselect__option--selected': isSelected,
|
|
20724
20783
|
'pds-multiselect__option--create': isCreateOption,
|
|
20725
20784
|
'pds-multiselect__option--disabled': isDisabled || isCreateDisabled,
|
|
20726
|
-
}, role: "option", "aria-selected": isSelected ? 'true' : 'false', "aria-disabled": isDisabled || isCreateDisabled ? 'true' : undefined, "aria-label": isCreateOption ? formatMessage(this.createOptionAriaLabel, { text: option.text }) : undefined, "aria-describedby": hasAction ? `${optionId}-action-description` : undefined, "data-index": index, onMouseDown: this.handleOptionMouseDown(option), onClick: this.handleOptionClick, onMouseEnter: this.handleOptionMouseEnter(index, option) }, isCreateOption ? (hAsync("pds-box", { class: "pds-multiselect__create-option", "align-items": "center", gap: "xs" }, hAsync("pds-icon", { name: "add", size: "small" }), hAsync("pds-text", null, formatMessage(this.createOptionLabel, { text: option.text })))) : (hAsync("pds-checkbox", { componentId: `${this.componentId}-checkbox-${index}`, checked: isSelected, label: option.text, disabled: isDisabled, style: { pointerEvents: 'none' } }, this.optionDisplay === 'chip' && (hAsync("pds-chip", { slot: "label", sentiment: "subtle", dot: !!option.dotColor, "dot-color": option.dotColor, "max-width": "100%" }, option.text)))), hasAction && this.renderOptionAction(option, optionId, isHighlighted)));
|
|
20785
|
+
}, role: "option", "aria-selected": isSelected ? 'true' : 'false', "aria-disabled": isDisabled || isCreateDisabled ? 'true' : undefined, "aria-label": isCreateOption ? formatMessage(this.createOptionAriaLabel, { text: option.text }) : undefined, "aria-describedby": hasAction ? `${optionId}-action-description` : undefined, "data-index": index, onMouseDown: this.handleOptionMouseDown(option), onClick: this.handleOptionClick, onMouseEnter: this.handleOptionMouseEnter(index, option) }, isCreateOption ? (hAsync("pds-box", { class: "pds-multiselect__create-option", "align-items": "center", gap: "xs" }, hAsync("pds-icon", { name: "add", size: "small", "aria-hidden": "true" }), hAsync("pds-text", null, formatMessage(this.createOptionLabel, { text: option.text })))) : (hAsync("pds-checkbox", { componentId: `${this.componentId}-checkbox-${index}`, checked: isSelected, label: option.text, disabled: isDisabled, style: { pointerEvents: 'none' } }, this.optionDisplay === 'chip' && (hAsync("pds-chip", { slot: "label", sentiment: "subtle", dot: !!option.dotColor, "dot-color": option.dotColor, "max-width": "100%" }, option.text)))), hasAction && this.renderOptionAction(option, optionId, isHighlighted)));
|
|
20727
20786
|
}
|
|
20728
20787
|
renderOptionAction(option, optionId, isHighlighted) {
|
|
20729
20788
|
var _a;
|
|
@@ -20746,7 +20805,7 @@ class PdsMultiselect {
|
|
|
20746
20805
|
const hasSlottedEmpty = !!this.el.querySelector('[slot="empty"]');
|
|
20747
20806
|
const hasSlottedLoading = !!this.el.querySelector('[slot="loading"]');
|
|
20748
20807
|
const hasSlottedFooter = !!this.el.querySelector('[slot="footer"]');
|
|
20749
|
-
return (hAsync("div", { class: "pds-multiselect__panel", ref: el => (this.panelEl = el), style: { minWidth: this.minWidth } }, hAsync("div", { class: "pds-multiselect__search" }, hAsync("pds-icon", { name: "search", size: "small" }), hAsync("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(), hAsync("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 && (hAsync("li", { class: "pds-multiselect__loading", role: "presentation" }, hasSlottedLoading ? (hAsync("slot", { name: "loading" })) : (hAsync("pds-loader", { size: "small" })))), !this.loading && filteredOptions.length === 0 && (hAsync("li", { class: "pds-multiselect__empty", role: "presentation" }, hasSlottedEmpty ? (hAsync("slot", { name: "empty" })) : (hAsync("span", null, this.noOptionsFoundLabel)))), this.getGroupedRenderItems(filteredOptions).map((item, itemIndex) => {
|
|
20808
|
+
return (hAsync("div", { class: "pds-multiselect__panel", ref: el => (this.panelEl = el), style: { minWidth: this.minWidth } }, hAsync("div", { class: "pds-multiselect__search" }, hAsync("pds-icon", { name: "search", size: "small", "aria-hidden": "true" }), hAsync("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(), hAsync("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 && (hAsync("li", { class: "pds-multiselect__loading", role: "presentation" }, hasSlottedLoading ? (hAsync("slot", { name: "loading" })) : (hAsync("pds-loader", { size: "small" })))), !this.loading && filteredOptions.length === 0 && (hAsync("li", { class: "pds-multiselect__empty", role: "presentation" }, hasSlottedEmpty ? (hAsync("slot", { name: "empty" })) : (hAsync("span", null, this.noOptionsFoundLabel)))), this.getGroupedRenderItems(filteredOptions).map((item, itemIndex) => {
|
|
20750
20809
|
if (item.type === 'group') {
|
|
20751
20810
|
return (hAsync("li", { key: `group-${itemIndex}`, role: "group", "aria-label": item.group, class: "pds-multiselect__group" }, hAsync("span", { class: "pds-multiselect__group-header", "aria-hidden": "true" }, item.group), hAsync("ul", { class: "pds-multiselect__group-list", role: "presentation" }, item.options.map(({ option, index }) => this.renderOption(option, index, valueArray)))));
|
|
20752
20811
|
}
|
|
@@ -20805,10 +20864,10 @@ class PdsMultiselect {
|
|
|
20805
20864
|
}
|
|
20806
20865
|
render() {
|
|
20807
20866
|
const hasSelections = this.selectedItems.length > 0;
|
|
20808
|
-
return (hAsync(Host, { key: '
|
|
20867
|
+
return (hAsync(Host, { key: 'd0879469e6ff943374c2f035c0a8d6d57c25dc5f', "aria-disabled": this.disabled ? 'true' : null }, hAsync("div", { key: '80caa694099218561b85c93d547ec9208def0ec7', class: "pds-multiselect", onFocusout: this.handleContainerFocusOut }, this.label && (hAsync("label", { key: 'b4eaa2c9e2901c28ecb0b8f55e63e33ad899e945', id: `${this.componentId}-label`, htmlFor: this.componentId, class: {
|
|
20809
20868
|
'pds-multiselect__label': true,
|
|
20810
20869
|
'visually-hidden': this.hideLabel,
|
|
20811
|
-
} }, this.label)), hAsync("div", { key: '
|
|
20870
|
+
} }, this.label)), hAsync("div", { key: '404ed58aa6bfb2248ffad5e56ebabfe65149b9a4', class: "pds-multiselect__wrapper", ref: el => (this.containerEl = el), style: { width: this.triggerWidth } }, this.slottedTriggerEl ? (hAsync("slot", { name: "trigger" })) : this.selectedDisplay === 'pill' && this.pillPosition === 'inline' ? (hAsync("div", { ref: el => (this.pillInlineTriggerEl = el || undefined), part: "trigger", class: {
|
|
20812
20871
|
'pds-multiselect__trigger': true,
|
|
20813
20872
|
'pds-multiselect__trigger--open': this.isOpen,
|
|
20814
20873
|
'pds-multiselect__trigger--disabled': this.disabled,
|
|
@@ -20824,7 +20883,7 @@ class PdsMultiselect {
|
|
|
20824
20883
|
}, id: this.componentId, disabled: this.disabled, "aria-required": this.required ? 'true' : undefined, "aria-expanded": this.isOpen ? 'true' : 'false', "aria-haspopup": "listbox", "aria-describedby": 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 }, hAsync("span", { class: {
|
|
20825
20884
|
'pds-multiselect__trigger-text': true,
|
|
20826
20885
|
'pds-multiselect__trigger-text--placeholder': !hasSelections || (this.selectedDisplay === 'pill' && this.pillPosition === 'below'),
|
|
20827
|
-
} }, this.getTriggerText()), hAsync("pds-icon", { "aria-hidden": "true", class: "pds-multiselect__icon", icon: enlarge }))), this.renderDropdown()), this.selectedDisplay === 'pill' && this.pillPosition === 'below' && this.renderBelowPills(), hAsync("span", { key: '
|
|
20886
|
+
} }, this.getTriggerText()), hAsync("pds-icon", { "aria-hidden": "true", class: "pds-multiselect__icon", icon: enlarge }))), this.renderDropdown()), this.selectedDisplay === 'pill' && this.pillPosition === 'below' && this.renderBelowPills(), hAsync("span", { key: '73f17916a37722fefebd6b5a184a7b3dca6f4a9d', class: "visually-hidden", "aria-live": "polite", "aria-atomic": "true" }, this.removalAnnouncement), this.helperMessage && !(this.errorMessage && this.errorMessage.length > 0) && (hAsync("p", { key: '1a987562b21da6f8d2f8c9f94e93e8c99a7abd74', class: "pds-multiselect__helper", id: messageId(this.componentId, 'helper') }, this.helperMessage)), this.errorMessage && (hAsync("p", { key: 'ce1f7f48d6f8dee320d87cb7088f084e68cb3ab5', class: "pds-multiselect__error", id: messageId(this.componentId, 'error') }, hAsync("pds-icon", { key: '8347dfdec6ef1b81d4cf9f72cba3d9ec965dcf08', "aria-hidden": "true", icon: danger, size: "small" }), this.errorMessage)), hAsync("div", { key: '74cd840e102ad635d2f4bc23cf3bcfaa61d5cea1', style: { display: 'none' } }, hAsync("slot", { key: 'c2fd9e71363a9661062c8d88be0dd78fc98b964d' })))));
|
|
20828
20887
|
}
|
|
20829
20888
|
static get formAssociated() { return true; }
|
|
20830
20889
|
get el() { return getElement(this); }
|
|
@@ -20964,8 +21023,12 @@ const cssEscape = (value) => {
|
|
|
20964
21023
|
|
|
20965
21024
|
const pdsPopoverCss = () => `:host{--sizing-max-width-default:352px;display:inline-block}:host .pds-popover__trigger-wrapper{display:inline-block}:host .pds-popover__content-slot-wrapper{display:none}`;
|
|
20966
21025
|
|
|
20967
|
-
/** Open
|
|
20968
|
-
const
|
|
21026
|
+
/** Open popovers that close on Escape, in the order they opened: Escape goes to the last one it applies to. */
|
|
21027
|
+
const popoversTakingEscape = [];
|
|
21028
|
+
/** Hovering the trigger waits this long before opening, so a pointer passing over it doesn't open it. */
|
|
21029
|
+
const HOVER_OPEN_DELAY_MS = 120;
|
|
21030
|
+
/** Leaving the trigger and panel waits this long before closing, which covers the gap between them. */
|
|
21031
|
+
const HOVER_CLOSE_DELAY_MS = 200;
|
|
20969
21032
|
/** The focused element, followed down through shadow roots to the control that has focus. */
|
|
20970
21033
|
function deepActiveElement() {
|
|
20971
21034
|
var _a;
|
|
@@ -21029,11 +21092,29 @@ class PdsPopover {
|
|
|
21029
21092
|
* Timestamp when popover was opened (for preventing immediate close)
|
|
21030
21093
|
*/
|
|
21031
21094
|
this.openTimestamp = 0;
|
|
21095
|
+
/**
|
|
21096
|
+
* Set while hover holds the popover open, until a click pins it or it closes
|
|
21097
|
+
*/
|
|
21098
|
+
this.hoverOpened = false;
|
|
21099
|
+
/**
|
|
21100
|
+
* Set when the pointer left while focus was in the panel, so focus leaving it closes it instead
|
|
21101
|
+
*/
|
|
21102
|
+
this.closeWhenFocusLeaves = false;
|
|
21103
|
+
/**
|
|
21104
|
+
* How far the pointer was from the panel at its last move after leaving the trigger
|
|
21105
|
+
*/
|
|
21106
|
+
this.panelDistance = Infinity;
|
|
21032
21107
|
/**
|
|
21033
21108
|
* Determines the action that triggers the popover. For manual popovers, the consumer is responsible for toggling this value.
|
|
21034
21109
|
* @defaultValue "show"
|
|
21035
21110
|
*/
|
|
21036
21111
|
this.popoverTargetAction = 'show';
|
|
21112
|
+
/**
|
|
21113
|
+
* Determines how the popover opens. With `hover`, it also opens when the pointer rests on the trigger and closes
|
|
21114
|
+
* when the pointer leaves, until a click on the trigger keeps it open. Enter or Space on the trigger opens it either way.
|
|
21115
|
+
* @defaultValue "click"
|
|
21116
|
+
*/
|
|
21117
|
+
this.openOn = 'click';
|
|
21037
21118
|
/**
|
|
21038
21119
|
* Determines the type of popover. Auto popovers can be "light dismissed" by clicking outside of the popover.
|
|
21039
21120
|
* Manual popovers require the consumer to handle the visibility of the popover.
|
|
@@ -21044,6 +21125,11 @@ class PdsPopover {
|
|
|
21044
21125
|
* @defaultValue 352
|
|
21045
21126
|
*/
|
|
21046
21127
|
this.maxWidth = 352;
|
|
21128
|
+
/**
|
|
21129
|
+
* Sets the padding of the popover content
|
|
21130
|
+
* @defaultValue "md"
|
|
21131
|
+
*/
|
|
21132
|
+
this.padding = 'md';
|
|
21047
21133
|
/**
|
|
21048
21134
|
* Determines the preferred position of the popover
|
|
21049
21135
|
* @defaultValue "right"
|
|
@@ -21058,6 +21144,7 @@ class PdsPopover {
|
|
|
21058
21144
|
// Clean up previous trigger's event listener if it exists
|
|
21059
21145
|
if (this.triggerEl != null) {
|
|
21060
21146
|
this.triggerEl.removeEventListener('click', this.handleTriggerClick);
|
|
21147
|
+
this.stopListeningForHover(this.triggerEl);
|
|
21061
21148
|
}
|
|
21062
21149
|
if (assignedElements.length > 0) {
|
|
21063
21150
|
// Use the first assigned element as the trigger
|
|
@@ -21065,6 +21152,7 @@ class PdsPopover {
|
|
|
21065
21152
|
this.linkTriggerToPortal();
|
|
21066
21153
|
// Attach click listener to handle popover visibility
|
|
21067
21154
|
this.triggerEl.addEventListener('click', this.handleTriggerClick);
|
|
21155
|
+
this.listenForHover(this.triggerEl);
|
|
21068
21156
|
}
|
|
21069
21157
|
else {
|
|
21070
21158
|
this.triggerEl = null;
|
|
@@ -21091,6 +21179,13 @@ class PdsPopover {
|
|
|
21091
21179
|
if (!anchorWithHref) {
|
|
21092
21180
|
event.preventDefault();
|
|
21093
21181
|
}
|
|
21182
|
+
if (this.openOn === 'hover' && this.popoverTargetAction !== 'hide') {
|
|
21183
|
+
const heldByHover = this.hoverOpened;
|
|
21184
|
+
this.pin();
|
|
21185
|
+
// Pinning, not toggling: the hover before a click has already opened it.
|
|
21186
|
+
if (heldByHover)
|
|
21187
|
+
return;
|
|
21188
|
+
}
|
|
21094
21189
|
// Execute the appropriate action based on popoverTargetAction prop
|
|
21095
21190
|
switch (this.popoverTargetAction) {
|
|
21096
21191
|
case 'show':
|
|
@@ -21105,6 +21200,60 @@ class PdsPopover {
|
|
|
21105
21200
|
break;
|
|
21106
21201
|
}
|
|
21107
21202
|
};
|
|
21203
|
+
// A tap sends touch pointer events and then a click, so touch takes the click path alone.
|
|
21204
|
+
this.handleHoverEnter = (event) => {
|
|
21205
|
+
if (event.pointerType === 'touch')
|
|
21206
|
+
return;
|
|
21207
|
+
this.clearHoverTimers();
|
|
21208
|
+
if (this.active)
|
|
21209
|
+
return;
|
|
21210
|
+
this.hoverOpenTimer = setTimeout(() => {
|
|
21211
|
+
this.hoverOpenTimer = undefined;
|
|
21212
|
+
if (this.active || this.portalEl == null)
|
|
21213
|
+
return;
|
|
21214
|
+
this.hoverOpened = true;
|
|
21215
|
+
this.show();
|
|
21216
|
+
}, HOVER_OPEN_DELAY_MS);
|
|
21217
|
+
};
|
|
21218
|
+
this.handleHoverLeave = (event) => {
|
|
21219
|
+
if (event.pointerType === 'touch')
|
|
21220
|
+
return;
|
|
21221
|
+
this.clearHoverTimers();
|
|
21222
|
+
if (!this.hoverOpened)
|
|
21223
|
+
return;
|
|
21224
|
+
this.hoverCloseTimer = setTimeout(this.closeFromHover, HOVER_CLOSE_DELAY_MS);
|
|
21225
|
+
if (event.currentTarget !== this.triggerEl)
|
|
21226
|
+
return;
|
|
21227
|
+
this.panelDistance = this.distanceToPanel(event);
|
|
21228
|
+
document.addEventListener('pointermove', this.handleMoveTowardPanel);
|
|
21229
|
+
};
|
|
21230
|
+
// A slow diagonal from the trigger to a panel shorter than it runs beside the panel for longer
|
|
21231
|
+
// than the close delay, so each move that brings the pointer closer starts the delay again.
|
|
21232
|
+
this.handleMoveTowardPanel = (event) => {
|
|
21233
|
+
const distance = this.distanceToPanel(event);
|
|
21234
|
+
if (distance < this.panelDistance) {
|
|
21235
|
+
clearTimeout(this.hoverCloseTimer);
|
|
21236
|
+
this.hoverCloseTimer = setTimeout(this.closeFromHover, HOVER_CLOSE_DELAY_MS);
|
|
21237
|
+
}
|
|
21238
|
+
this.panelDistance = distance;
|
|
21239
|
+
};
|
|
21240
|
+
this.handleHoverFocusOut = (event) => {
|
|
21241
|
+
if (!this.closeWhenFocusLeaves || containsComposed$1(this.portalEl, event.relatedTarget))
|
|
21242
|
+
return;
|
|
21243
|
+
this.closeWhenFocusLeaves = false;
|
|
21244
|
+
this.hoverCloseTimer = setTimeout(this.closeFromHover, HOVER_CLOSE_DELAY_MS);
|
|
21245
|
+
};
|
|
21246
|
+
this.closeFromHover = () => {
|
|
21247
|
+
this.clearHoverTimers();
|
|
21248
|
+
if (!this.hoverOpened)
|
|
21249
|
+
return;
|
|
21250
|
+
// Content shown on hover stays while focus is in it (WCAG 1.4.13).
|
|
21251
|
+
if (containsComposed$1(this.portalEl, deepActiveElement())) {
|
|
21252
|
+
this.closeWhenFocusLeaves = true;
|
|
21253
|
+
return;
|
|
21254
|
+
}
|
|
21255
|
+
this.hide();
|
|
21256
|
+
};
|
|
21108
21257
|
/** The focus style copied into a shadow root the panel opened in, which `document.head` can't reach. */
|
|
21109
21258
|
this.shadowFocusStyle = null;
|
|
21110
21259
|
/** The dialog the panel was opened in, closed along with it. */
|
|
@@ -21126,6 +21275,32 @@ class PdsPopover {
|
|
|
21126
21275
|
}
|
|
21127
21276
|
};
|
|
21128
21277
|
}
|
|
21278
|
+
openOnChanged() {
|
|
21279
|
+
this.pin();
|
|
21280
|
+
this.stopListeningForHover(this.triggerEl);
|
|
21281
|
+
this.stopListeningForHover(this.portalEl);
|
|
21282
|
+
// Out of the page, connectedCallback binds them when it comes back.
|
|
21283
|
+
if (!this.isComponentMounted)
|
|
21284
|
+
return;
|
|
21285
|
+
this.listenForHover(this.triggerEl);
|
|
21286
|
+
this.listenForHover(this.portalEl);
|
|
21287
|
+
}
|
|
21288
|
+
applyPadding() {
|
|
21289
|
+
if (this.portalEl != null)
|
|
21290
|
+
this.portalEl.style.padding = this.paddingToken();
|
|
21291
|
+
}
|
|
21292
|
+
paddingToken() {
|
|
21293
|
+
switch (this.padding) {
|
|
21294
|
+
case 'none':
|
|
21295
|
+
return 'var(--pine-dimension-none)';
|
|
21296
|
+
case 'xs':
|
|
21297
|
+
return 'var(--pine-dimension-xs)';
|
|
21298
|
+
case 'sm':
|
|
21299
|
+
return 'var(--pine-dimension-sm)';
|
|
21300
|
+
default:
|
|
21301
|
+
return 'var(--pine-dimension-md)';
|
|
21302
|
+
}
|
|
21303
|
+
}
|
|
21129
21304
|
restorePlacementDefault(newValue) {
|
|
21130
21305
|
this.placement = restoreReflectedDefault(this.el, 'placement', newValue, 'right');
|
|
21131
21306
|
}
|
|
@@ -21176,6 +21351,48 @@ class PdsPopover {
|
|
|
21176
21351
|
// Skips values already in place, so the trigger observer's own callback doesn't loop.
|
|
21177
21352
|
return setAttributesIfChanged(this.triggerEl, { 'aria-expanded': String(this.active), 'aria-controls': this.portalEl.id });
|
|
21178
21353
|
}
|
|
21354
|
+
listenForHover(el) {
|
|
21355
|
+
if (this.openOn !== 'hover' || el == null)
|
|
21356
|
+
return;
|
|
21357
|
+
el.addEventListener('pointerenter', this.handleHoverEnter);
|
|
21358
|
+
el.addEventListener('pointerleave', this.handleHoverLeave);
|
|
21359
|
+
el.addEventListener('focusout', this.handleHoverFocusOut);
|
|
21360
|
+
}
|
|
21361
|
+
stopListeningForHover(el) {
|
|
21362
|
+
if (el == null)
|
|
21363
|
+
return;
|
|
21364
|
+
el.removeEventListener('pointerenter', this.handleHoverEnter);
|
|
21365
|
+
el.removeEventListener('pointerleave', this.handleHoverLeave);
|
|
21366
|
+
el.removeEventListener('focusout', this.handleHoverFocusOut);
|
|
21367
|
+
}
|
|
21368
|
+
distanceToPanel({ clientX, clientY }) {
|
|
21369
|
+
const panel = this.portalEl.getBoundingClientRect();
|
|
21370
|
+
return Math.hypot(Math.max(panel.left - clientX, 0, clientX - panel.right), Math.max(panel.top - clientY, 0, clientY - panel.bottom));
|
|
21371
|
+
}
|
|
21372
|
+
/**
|
|
21373
|
+
* Keeps a popover that hover opened open, closing from then on as one opened by a click does. A
|
|
21374
|
+
* manual one gives up Escape again, which it took only while hover held it.
|
|
21375
|
+
*/
|
|
21376
|
+
pin() {
|
|
21377
|
+
var _a;
|
|
21378
|
+
this.clearHoverTimers();
|
|
21379
|
+
if (!this.hoverOpened)
|
|
21380
|
+
return;
|
|
21381
|
+
this.hoverOpened = false;
|
|
21382
|
+
if (this.popoverType === 'auto')
|
|
21383
|
+
return;
|
|
21384
|
+
this.forgetOpen();
|
|
21385
|
+
(_a = this.portalEl) === null || _a === void 0 ? void 0 : _a.removeAttribute('data-pds-popover-open');
|
|
21386
|
+
document.removeEventListener('keydown', this.boundEscapeKeyHandler);
|
|
21387
|
+
}
|
|
21388
|
+
clearHoverTimers() {
|
|
21389
|
+
clearTimeout(this.hoverOpenTimer);
|
|
21390
|
+
clearTimeout(this.hoverCloseTimer);
|
|
21391
|
+
this.hoverOpenTimer = undefined;
|
|
21392
|
+
this.hoverCloseTimer = undefined;
|
|
21393
|
+
this.closeWhenFocusLeaves = false;
|
|
21394
|
+
document.removeEventListener('pointermove', this.handleMoveTowardPanel);
|
|
21395
|
+
}
|
|
21179
21396
|
// componentDidLoad doesn't run again when a popover comes back, so rebuild whatever
|
|
21180
21397
|
// disconnectedCallback tore down. Each step is a no-op when nothing was.
|
|
21181
21398
|
connectedCallback() {
|
|
@@ -21185,6 +21402,7 @@ class PdsPopover {
|
|
|
21185
21402
|
this.isComponentMounted = true;
|
|
21186
21403
|
this.createPortal();
|
|
21187
21404
|
(_a = this.triggerEl) === null || _a === void 0 ? void 0 : _a.addEventListener('click', this.handleTriggerClick);
|
|
21405
|
+
this.listenForHover(this.triggerEl);
|
|
21188
21406
|
this.observeTrigger();
|
|
21189
21407
|
this.linkTriggerToPortal();
|
|
21190
21408
|
// Still open after a move: the trigger moved, so the portal follows it, into the dialog it
|
|
@@ -21219,6 +21437,7 @@ class PdsPopover {
|
|
|
21219
21437
|
if (this.triggerEl != null) {
|
|
21220
21438
|
this.triggerEl.removeEventListener('click', this.handleTriggerClick);
|
|
21221
21439
|
}
|
|
21440
|
+
this.stopListeningForHover(this.triggerEl);
|
|
21222
21441
|
(_a = this.triggerObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
21223
21442
|
this.triggerObserver = null;
|
|
21224
21443
|
// Clean up all event listeners
|
|
@@ -21227,6 +21446,8 @@ class PdsPopover {
|
|
|
21227
21446
|
document.removeEventListener('submit', this.handleSubmitFromPanel, true);
|
|
21228
21447
|
// Clear any pending debounce timers
|
|
21229
21448
|
this.clearDebounceTimers();
|
|
21449
|
+
this.clearHoverTimers();
|
|
21450
|
+
this.hoverOpened = false;
|
|
21230
21451
|
// Remove portal from DOM
|
|
21231
21452
|
this.removePortal();
|
|
21232
21453
|
}
|
|
@@ -21260,7 +21481,7 @@ class PdsPopover {
|
|
|
21260
21481
|
this.portalEl.style.borderRadius = 'var(--pine-dimension-125)';
|
|
21261
21482
|
this.portalEl.style.boxShadow = 'var(--pine-box-shadow-200)';
|
|
21262
21483
|
this.portalEl.style.margin = 'var(--pine-dimension-none)';
|
|
21263
|
-
this.portalEl.style.padding =
|
|
21484
|
+
this.portalEl.style.padding = this.paddingToken();
|
|
21264
21485
|
// Generate unique ID
|
|
21265
21486
|
if (!this.componentId) {
|
|
21266
21487
|
(_a = this.generatedPortalId) !== null && _a !== void 0 ? _a : (this.generatedPortalId = `pds-popover-portal-${PdsPopover.instanceCounter++}`);
|
|
@@ -21274,6 +21495,7 @@ class PdsPopover {
|
|
|
21274
21495
|
// Add global focus styles to match Pine design system
|
|
21275
21496
|
// This is done after appending to ensure it's part of the document and can access CSS variables
|
|
21276
21497
|
this.addPortalFocusStyles();
|
|
21498
|
+
this.listenForHover(this.portalEl);
|
|
21277
21499
|
}
|
|
21278
21500
|
/**
|
|
21279
21501
|
* Adds Pine design system focus styles and dark mode border to the portal element
|
|
@@ -21401,8 +21623,8 @@ class PdsPopover {
|
|
|
21401
21623
|
// Update portal content with latest slot content
|
|
21402
21624
|
this.updatePortalContent();
|
|
21403
21625
|
// Show portal. The attribute tells a modal around it that this popover takes Escape first; only
|
|
21404
|
-
// an auto popover listens for Escape.
|
|
21405
|
-
if (this.popoverType === 'auto')
|
|
21626
|
+
// an auto popover, or one hover opened, listens for Escape.
|
|
21627
|
+
if (this.popoverType === 'auto' || this.hoverOpened)
|
|
21406
21628
|
this.portalEl.setAttribute('data-pds-popover-open', '');
|
|
21407
21629
|
this.portalEl.style.display = 'block';
|
|
21408
21630
|
this.portalEl.style.opacity = '1';
|
|
@@ -21416,11 +21638,16 @@ class PdsPopover {
|
|
|
21416
21638
|
// Add scroll and resize listeners for repositioning (always)
|
|
21417
21639
|
this.addScrollAndResizeListeners();
|
|
21418
21640
|
document.addEventListener('submit', this.handleSubmitFromPanel, true);
|
|
21419
|
-
// Add document listeners for light dismiss and escape key (auto type only)
|
|
21641
|
+
// Add document listeners for light dismiss and escape key (auto type only), or for the escape
|
|
21642
|
+
// key alone while hover holds a manual popover open
|
|
21420
21643
|
if (this.popoverType === 'auto') {
|
|
21421
|
-
|
|
21644
|
+
popoversTakingEscape.push(this);
|
|
21422
21645
|
this.addLightDismissListeners();
|
|
21423
21646
|
}
|
|
21647
|
+
else if (this.hoverOpened) {
|
|
21648
|
+
popoversTakingEscape.push(this);
|
|
21649
|
+
document.addEventListener('keydown', this.boundEscapeKeyHandler);
|
|
21650
|
+
}
|
|
21424
21651
|
// Emit open event
|
|
21425
21652
|
this.pdsPopoverOpen.emit({
|
|
21426
21653
|
componentId: this.componentId,
|
|
@@ -21431,9 +21658,11 @@ class PdsPopover {
|
|
|
21431
21658
|
* Closes the popover programmatically
|
|
21432
21659
|
*/
|
|
21433
21660
|
async hide() {
|
|
21661
|
+
this.clearHoverTimers();
|
|
21434
21662
|
if (!this.active || !this.portalEl)
|
|
21435
21663
|
return;
|
|
21436
21664
|
this.active = false;
|
|
21665
|
+
this.hoverOpened = false;
|
|
21437
21666
|
this.unwatchDialogClose();
|
|
21438
21667
|
// Restoring the content drops its focus to the body, so check where focus is first. In a
|
|
21439
21668
|
// shadow root, document.activeElement is only its host.
|
|
@@ -21512,9 +21741,9 @@ class PdsPopover {
|
|
|
21512
21741
|
this.portalEl.style.border = root instanceof ShadowRoot && closest$1('[data-theme="dark"]', this.el) ? 'var(--pine-border)' : '';
|
|
21513
21742
|
}
|
|
21514
21743
|
forgetOpen() {
|
|
21515
|
-
const index =
|
|
21744
|
+
const index = popoversTakingEscape.indexOf(this);
|
|
21516
21745
|
if (index >= 0)
|
|
21517
|
-
|
|
21746
|
+
popoversTakingEscape.splice(index, 1);
|
|
21518
21747
|
}
|
|
21519
21748
|
/**
|
|
21520
21749
|
* Whether an Escape is this popover's. One from a dialog the popover isn't in belongs to that
|
|
@@ -21623,7 +21852,7 @@ class PdsPopover {
|
|
|
21623
21852
|
return;
|
|
21624
21853
|
// Like the native Popover API, Escape closes only the top popover: the last one opened that
|
|
21625
21854
|
// it applies to. Every open popover hears it, so each checks whether it's that one.
|
|
21626
|
-
const top = [...
|
|
21855
|
+
const top = [...popoversTakingEscape].reverse().find(popover => popover.takesEscapeFrom(event));
|
|
21627
21856
|
if (top !== this)
|
|
21628
21857
|
return;
|
|
21629
21858
|
// Take the key, so the dialog or modal around it doesn't close too.
|
|
@@ -21748,10 +21977,16 @@ class PdsPopover {
|
|
|
21748
21977
|
}, 16); // ~1 frame at 60fps
|
|
21749
21978
|
}
|
|
21750
21979
|
render() {
|
|
21751
|
-
return (hAsync(Host, { key: '
|
|
21980
|
+
return (hAsync(Host, { key: 'e48b897acdc9e89f2e6b1449e7a358da7da1060c', id: this.componentId }, hAsync("span", { key: 'b83b2c234b07703c2c850a9991c94939ed2fdaf7', class: "pds-popover__trigger-wrapper" }, hAsync("slot", { key: '0a7f7829ee445fd57cf824ebee1409b3c571f983', name: "trigger", onSlotchange: this.handleTriggerSlotChange })), hAsync("div", { key: '8c1fe2d4d7c4342b4bd5eb4c56e596f17b4e14fa', class: "pds-popover__content-slot-wrapper" }, hAsync("slot", { key: '4ccfce1f335acbc436f7942e497f5d360f849d48', onSlotchange: this.handleContentSlotChange }))));
|
|
21752
21981
|
}
|
|
21753
21982
|
get el() { return getElement(this); }
|
|
21754
21983
|
static get watchers() { return {
|
|
21984
|
+
"openOn": [{
|
|
21985
|
+
"openOnChanged": 0
|
|
21986
|
+
}],
|
|
21987
|
+
"padding": [{
|
|
21988
|
+
"applyPadding": 0
|
|
21989
|
+
}],
|
|
21755
21990
|
"placement": [{
|
|
21756
21991
|
"restorePlacementDefault": 0
|
|
21757
21992
|
}]
|
|
@@ -21762,9 +21997,11 @@ class PdsPopover {
|
|
|
21762
21997
|
"$tagName$": "pds-popover",
|
|
21763
21998
|
"$members$": {
|
|
21764
21999
|
"popoverTargetAction": [1, "popover-target-action"],
|
|
22000
|
+
"openOn": [1, "open-on"],
|
|
21765
22001
|
"popoverType": [1, "popover-type"],
|
|
21766
22002
|
"componentId": [1, "component-id"],
|
|
21767
22003
|
"maxWidth": [2, "max-width"],
|
|
22004
|
+
"padding": [1],
|
|
21768
22005
|
"placement": [1537],
|
|
21769
22006
|
"active": [32],
|
|
21770
22007
|
"show": [64],
|
|
@@ -21969,11 +22206,11 @@ class PdsRadio {
|
|
|
21969
22206
|
const renderLabelAndMessages = () => [
|
|
21970
22207
|
hAsync("label", { htmlFor: this.componentId, key: `${this.componentId}-label` }, hAsync("input", { key: 'ccd618855831bcee309e815f2cd2712fd4e8fe1f', "aria-describedby": assignDescription(this.componentId, this.invalid, this.helperMessage, this.errorMessage), "aria-invalid": this.invalid ? "true" : undefined, type: "radio", id: this.componentId, name: this.name, value: this.value, checked: this.checked, required: this.required, disabled: this.disabled, onChange: this.handleRadioChange, class: this.hasImage() ? 'visually-hidden' : '' }), hAsync("span", { key: '2e372a880c28f48fb804bac2518208082c141fad', class: this.hideLabel ? 'visually-hidden' : '' }, this.label)),
|
|
21971
22208
|
this.helperMessage && (hAsync("div", { key: `${this.componentId}-helper`, class: 'pds-radio__message', id: messageId(this.componentId, 'helper') }, this.helperMessage)),
|
|
21972
|
-
this.errorMessage && (hAsync("div", { key: `${this.componentId}-error`, class: `pds-radio__message pds-radio__message--error`, id: messageId(this.componentId, 'error'), "aria-live": "assertive" }, hAsync("pds-icon", { key: '
|
|
22209
|
+
this.errorMessage && (hAsync("div", { key: `${this.componentId}-error`, class: `pds-radio__message pds-radio__message--error`, id: messageId(this.componentId, 'error'), "aria-live": "assertive" }, hAsync("pds-icon", { key: '08e7a2319eddc1d314ee9dddd51a5ce88cd4ae48', "aria-hidden": "true", icon: danger, size: "small" }), this.errorMessage))
|
|
21973
22210
|
];
|
|
21974
22211
|
const hostClass = this.classNames();
|
|
21975
22212
|
this.hostKeeper.record(hostClass);
|
|
21976
|
-
return (hAsync(Host, { key: '
|
|
22213
|
+
return (hAsync(Host, { key: '351376552abee90f50c3aceb03ecf8a81ae1b82b', class: hostClass }, this.hasImage() && (hAsync("div", { key: 'fd85fd36b2ebd99b12c3bb2a13cf3d3e3c26530f', class: "pds-radio__image-container", part: "image-container" }, hAsync("slot", { key: 'abe75dbe38d29340b805f70861b084c1b3836be9', name: "image", onSlotchange: () => (this._hasImage = this.hasImageSlot()) }))), this.hasImage() ? (hAsync("div", { class: "pds-radio__content-wrapper" }, renderLabelAndMessages())) : (renderLabelAndMessages())));
|
|
21977
22214
|
}
|
|
21978
22215
|
get el() { return getElement(this); }
|
|
21979
22216
|
static get style() { return labelCss$3() + pdsRadioCss(); }
|
|
@@ -22171,7 +22408,7 @@ class PdsRadioGroup {
|
|
|
22171
22408
|
'pds-radio-group__radios': true,
|
|
22172
22409
|
'pds-radio-group__radios--row': this.direction === 'row',
|
|
22173
22410
|
'pds-radio-group__radios--column': this.direction === 'column',
|
|
22174
|
-
} }, hAsync("slot", { key: 'd88dde3c631e25c01bc7b6d3ef5d517255fabd1a', onSlotchange: () => this.updateChildRadios() })), this.helperMessage && (hAsync("div", { key: 'a229214ed01663b0fc34f35e27c7148b4eb412ab', class: "pds-radio-group__message", id: messageId(this._groupId, 'helper') }, this.helperMessage)), this.errorMessage && (hAsync("div", { key: 'dc092f2e6dbef0cb369cf00a6eccf9a095a0313d', class: "pds-radio-group__message pds-radio-group__message--error", id: messageId(this._groupId, 'error'), "aria-live": "assertive" }, hAsync("pds-icon", { key: '
|
|
22411
|
+
} }, hAsync("slot", { key: 'd88dde3c631e25c01bc7b6d3ef5d517255fabd1a', onSlotchange: () => this.updateChildRadios() })), this.helperMessage && (hAsync("div", { key: 'a229214ed01663b0fc34f35e27c7148b4eb412ab', class: "pds-radio-group__message", id: messageId(this._groupId, 'helper') }, this.helperMessage)), this.errorMessage && (hAsync("div", { key: 'dc092f2e6dbef0cb369cf00a6eccf9a095a0313d', class: "pds-radio-group__message pds-radio-group__message--error", id: messageId(this._groupId, 'error'), "aria-live": "assertive" }, hAsync("pds-icon", { key: '83b0129d3d45b74ef1f53acc923387b2de7f079b', "aria-hidden": "true", icon: danger, size: "small" }), this.errorMessage))));
|
|
22175
22412
|
}
|
|
22176
22413
|
get el() { return getElement(this); }
|
|
22177
22414
|
static get watchers() { return {
|
|
@@ -25523,7 +25760,7 @@ class PdsSwitch {
|
|
|
25523
25760
|
this.hostKeeper.record(hostClass, {}, { 'aria-disabled': ariaDisabled });
|
|
25524
25761
|
return (hAsync(Host, { key: 'b8bd2870be101081aa8a65cdee45397bc4c21435', class: hostClass, "aria-disabled": ariaDisabled }, hAsync("label", { key: '1e223f22f7fc6c576098353ad67dc11500def8b4', htmlFor: this.componentId }, hAsync("input", Object.assign({ key: 'edf59869e165a65b97465ea9de06f7ea82fbc9a6', "aria-describedby": assignDescription(this.componentId, this.invalid, this.helperMessage, this.errorMessage), "aria-invalid": this.invalid ? "true" : undefined, checked: this.checked, class: "pds-switch__input", disabled: this.disabled, id: this.componentId, name: this.name ? this.name : this.componentId, onChange: this.onSwitchUpdate, required: this.required, type: "checkbox", value: this.value }, this.inheritedAttributes)), hAsync("span", { key: '1c252b9455471069f8c6ea6c13f2e88c99308b41', class: this.hideLabel ? 'visually-hidden' : '' }, hAsync("slot", { key: 'ce0d471918bd3018f5e55d0d1e6c5c2247790f81', name: "label", onSlotchange: this.updateHasLabelSlot }), !this.hasLabelSlot && this.label)), this.helperMessage &&
|
|
25525
25762
|
hAsync("div", { key: '64874b15403f1f42344715ac34febdfb8d94042a', class: `pds-switch__message`, id: messageId(this.componentId, 'helper') }, this.helperMessage), this.errorMessage &&
|
|
25526
|
-
hAsync("div", { key: '560ea486859124bb0ac2f75ab4bd34b0bca7efbc', class: `pds-switch__message pds-switch__message--error`, id: messageId(this.componentId, 'error'), "aria-live": "assertive" }, hAsync("pds-icon", { key: '
|
|
25763
|
+
hAsync("div", { key: '560ea486859124bb0ac2f75ab4bd34b0bca7efbc', class: `pds-switch__message pds-switch__message--error`, id: messageId(this.componentId, 'error'), "aria-live": "assertive" }, hAsync("pds-icon", { key: '2ae8dc876745af26fa2418f2265248aeb8f97a2b', "aria-hidden": "true", icon: danger, size: "small" }), this.errorMessage)));
|
|
25527
25764
|
}
|
|
25528
25765
|
static get formAssociated() { return true; }
|
|
25529
25766
|
get el() { return getElement(this); }
|
|
@@ -26403,7 +26640,7 @@ class PdsTableHeadCell {
|
|
|
26403
26640
|
this.tableRef.fixedColumn &&
|
|
26404
26641
|
this.tableRef.selectable
|
|
26405
26642
|
? { '--fixed-cell-position': '40px' }
|
|
26406
|
-
: {} }, hAsync("slot", { key: '96084d87a34d7b601a8e8325f344f1fe6601204e' }), this.sortable && this.isActive && (hAsync("pds-icon", { key: '
|
|
26643
|
+
: {} }, hAsync("slot", { key: '96084d87a34d7b601a8e8325f344f1fe6601204e' }), this.sortable && this.isActive && (hAsync("pds-icon", { key: '79606519d810dc9882a91cbc3b6a199457086631', icon: this.sortingDirection === 'asc' ? upSmall : downSmall, part: "sort-icon", "aria-hidden": "true" }))));
|
|
26407
26644
|
}
|
|
26408
26645
|
get hostElement() { return getElement(this); }
|
|
26409
26646
|
static get style() { return pdsTableHeadCellCss(); }
|
|
@@ -27405,7 +27642,7 @@ class PdsTextarea {
|
|
|
27405
27642
|
return (hAsync(Host, { key: '5933dab0c3cd25b1cf2f6851ece8e8064bc7f3b9', "aria-disabled": this.disabled ? 'true' : null, "aria-readonly": this.readonly ? 'true' : null, "has-action": this.hasAction && !this.hideLabel ? 'true' : null }, hAsync("div", { key: '4f1752514d8e5b0f0e3439515cb9e5f043607da1', class: "pds-textarea" }, this.label &&
|
|
27406
27643
|
hAsync("div", { key: 'd4e6df0b381d781b70eeae72ff2f0e9428c0d901', class: "pds-textarea__label-wrapper" }, hAsync("label", { key: '747d82067eb571d02840cfd981865821099f288b', htmlFor: this.componentId }, hAsync("span", { key: 'bfab6e8ede66d0169dd020b7dd97e125aba417b0', class: this.hideLabel ? 'visually-hidden' : '' }, this.label)), !this.hideLabel && this.renderAction()), hAsync("div", { key: 'a18611c03270e7491c1af69f931419c832192c06', class: "pds-textarea__field-wrapper" }, hAsync("textarea", Object.assign({ key: '868382c7b04a4e59c0daa9d98afcdc9048f6224f', ref: (el) => this.nativeTextarea = el, "aria-describedby": assignDescription(this.componentId, this.invalid, this.helperMessage, this.errorMessage), "aria-invalid": this.invalid ? "true" : undefined, autocomplete: this.autocomplete, class: this.textareaClassNames(), disabled: this.disabled, id: this.componentId, maxlength: this.maxLength, name: this.name, placeholder: this.placeholder, readOnly: this.readonly, required: this.required, rows: this.rows, onBlur: this.onBlur, onChange: this.onTextareaChange, onFocus: this.onFocus, onInput: this.onInput, onKeyDown: this.onKeyDown }, this.inheritedAttributes), value), this.renderCharacterCounter()), this.helperMessage &&
|
|
27407
27644
|
hAsync("p", { key: 'dcb36f21443d2a782c25b7c29c4ce6215f3b212b', class: "pds-textarea__helper-message", id: messageId(this.componentId, 'helper') }, this.helperMessage), this.invalid &&
|
|
27408
|
-
hAsync("p", { key: 'be30fb1a38453296e26b775955389c0ec569df67', "aria-live": "assertive", class: "pds-textarea__error-message", id: messageId(this.componentId, 'error') }, hAsync("pds-icon", { key: '
|
|
27645
|
+
hAsync("p", { key: 'be30fb1a38453296e26b775955389c0ec569df67', "aria-live": "assertive", class: "pds-textarea__error-message", id: messageId(this.componentId, 'error') }, hAsync("pds-icon", { key: '853f06489ef6ca50205799659d221bd3bea7d8da', "aria-hidden": "true", icon: danger, size: "small" }), this.errorMessage))));
|
|
27409
27646
|
}
|
|
27410
27647
|
static get formAssociated() { return true; }
|
|
27411
27648
|
get el() { return getElement(this); }
|
|
@@ -27585,7 +27822,7 @@ class PdsToast {
|
|
|
27585
27822
|
'pds-toast--animating-out': this.isAnimatingOut
|
|
27586
27823
|
}, role: "alert", "aria-live": "polite" }, this.renderIcon(), hAsync("span", { key: 'eaf615d41c138e2c73088d29bac9349f49a63ba7', class: "pds-toast__message" }, hAsync("slot", { key: '33973447154d80b016f5a7954b0473db03228379' })), this.dismissible && (hAsync("button", { key: 'e189834633e1e648282ee43633fd05e53ce38869', type: "button", part: "dismiss", class: "pds-toast__button", onClick: () => {
|
|
27587
27824
|
this.dismiss();
|
|
27588
|
-
}, "aria-label": this.dismissLabel }, hAsync("pds-icon", { key: '
|
|
27825
|
+
}, "aria-label": this.dismissLabel }, hAsync("pds-icon", { key: '913201979e52be743ba933ff173e023b81553362', name: "remove", "aria-hidden": "true" }))))));
|
|
27589
27826
|
}
|
|
27590
27827
|
get el() { return getElement(this); }
|
|
27591
27828
|
static get watchers() { return {
|