@pine-ds/core 4.6.0 → 4.7.1

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.
Files changed (174) hide show
  1. package/components/pds-box2.js +1 -1
  2. package/components/pds-checkbox2.js +1 -1
  3. package/components/pds-chip2.js +1 -1
  4. package/components/pds-combobox.js +1 -1
  5. package/components/pds-copytext.js +1 -1
  6. package/components/pds-drawer.js +1 -1
  7. package/components/pds-dropdown-menu-item.js +1 -1
  8. package/components/pds-dropdown-menu.js +1 -1
  9. package/components/pds-modal2.js +1 -1
  10. package/components/pds-multiselect.js +1 -1
  11. package/components/pds-popover.js +1 -1
  12. package/components/pds-radio.js +1 -1
  13. package/components/pds-row.js +1 -1
  14. package/components/pds-switch.js +1 -1
  15. package/components/pds-table-cell2.js +1 -1
  16. package/components/pds-text2.js +1 -1
  17. package/components/truncation-tooltip.js +1 -1
  18. package/dist/cjs/loader.cjs.js +1 -1
  19. package/dist/cjs/pds-box.cjs.entry.js +96 -96
  20. package/dist/cjs/pds-checkbox.cjs.entry.js +16 -4
  21. package/dist/cjs/pds-chip.cjs.entry.js +34 -9
  22. package/dist/cjs/pds-combobox.cjs.entry.js +47 -4
  23. package/dist/cjs/pds-copytext.cjs.entry.js +7 -2
  24. package/dist/cjs/pds-drawer.cjs.entry.js +23 -10
  25. package/dist/cjs/pds-dropdown-menu-item.cjs.entry.js +2 -2
  26. package/dist/cjs/pds-dropdown-menu.cjs.entry.js +9 -5
  27. package/dist/cjs/pds-modal.cjs.entry.js +175 -49
  28. package/dist/cjs/pds-multiselect.cjs.entry.js +40 -9
  29. package/dist/cjs/pds-popover.cjs.entry.js +170 -26
  30. package/dist/cjs/pds-radio.cjs.entry.js +1 -1
  31. package/dist/cjs/pds-row.cjs.entry.js +7 -7
  32. package/dist/cjs/pds-switch.cjs.entry.js +15 -3
  33. package/dist/cjs/pds-table-cell.cjs.entry.js +24 -4
  34. package/dist/cjs/pds-text.cjs.entry.js +17 -9
  35. package/dist/cjs/pine-core.cjs.js +1 -1
  36. package/dist/cjs/{truncation-tooltip-CYgQfBLt.js → truncation-tooltip-DO9xli2e.js} +7 -7
  37. package/dist/collection/components/pds-box/pds-box.js +96 -96
  38. package/dist/collection/components/pds-checkbox/pds-checkbox.css +4 -0
  39. package/dist/collection/components/pds-checkbox/pds-checkbox.js +15 -3
  40. package/dist/collection/components/pds-chip/pds-chip.js +33 -8
  41. package/dist/collection/components/pds-chip/stories/pds-chip.stories.js +17 -0
  42. package/dist/collection/components/pds-combobox/pds-combobox.js +48 -5
  43. package/dist/collection/components/pds-combobox/stories/pds-combobox.stories.js +1 -1
  44. package/dist/collection/components/pds-copytext/pds-copytext.js +6 -1
  45. package/dist/collection/components/pds-drawer/pds-drawer.css +4 -1
  46. package/dist/collection/components/pds-drawer/pds-drawer.js +54 -17
  47. package/dist/collection/components/pds-drawer/stories/pds-drawer.stories.js +6 -1
  48. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.js +2 -2
  49. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu.js +15 -5
  50. package/dist/collection/components/pds-modal/pds-modal.js +180 -50
  51. package/dist/collection/components/pds-multiselect/pds-multiselect.css +4 -0
  52. package/dist/collection/components/pds-multiselect/pds-multiselect.js +42 -11
  53. package/dist/collection/components/pds-popover/pds-popover.js +171 -27
  54. package/dist/collection/components/pds-radio/pds-radio.css +6 -0
  55. package/dist/collection/components/pds-row/pds-row.js +7 -7
  56. package/dist/collection/components/pds-switch/pds-switch.js +15 -3
  57. package/dist/collection/components/pds-table/pds-table-cell/pds-table-cell.js +23 -3
  58. package/dist/collection/components/pds-text/pds-text.js +16 -8
  59. package/dist/collection/utils/truncation-tooltip.js +7 -7
  60. package/dist/docs.json +48 -9
  61. package/dist/esm/loader.js +1 -1
  62. package/dist/esm/pds-box.entry.js +96 -96
  63. package/dist/esm/pds-checkbox.entry.js +16 -4
  64. package/dist/esm/pds-chip.entry.js +34 -9
  65. package/dist/esm/pds-combobox.entry.js +47 -4
  66. package/dist/esm/pds-copytext.entry.js +7 -2
  67. package/dist/esm/pds-drawer.entry.js +23 -10
  68. package/dist/esm/pds-dropdown-menu-item.entry.js +2 -2
  69. package/dist/esm/pds-dropdown-menu.entry.js +9 -5
  70. package/dist/esm/pds-modal.entry.js +175 -49
  71. package/dist/esm/pds-multiselect.entry.js +40 -9
  72. package/dist/esm/pds-popover.entry.js +171 -27
  73. package/dist/esm/pds-radio.entry.js +1 -1
  74. package/dist/esm/pds-row.entry.js +7 -7
  75. package/dist/esm/pds-switch.entry.js +15 -3
  76. package/dist/esm/pds-table-cell.entry.js +24 -4
  77. package/dist/esm/pds-text.entry.js +17 -9
  78. package/dist/esm/pine-core.js +1 -1
  79. package/dist/esm/{truncation-tooltip-_902ENWC.js → truncation-tooltip-DRXsdKk1.js} +7 -7
  80. package/dist/esm-es5/loader.js +1 -1
  81. package/dist/esm-es5/pds-box.entry.js +1 -1
  82. package/dist/esm-es5/pds-checkbox.entry.js +1 -1
  83. package/dist/esm-es5/pds-chip.entry.js +1 -1
  84. package/dist/esm-es5/pds-combobox.entry.js +1 -1
  85. package/dist/esm-es5/pds-copytext.entry.js +1 -1
  86. package/dist/esm-es5/pds-drawer.entry.js +1 -1
  87. package/dist/esm-es5/pds-dropdown-menu-item.entry.js +1 -1
  88. package/dist/esm-es5/pds-dropdown-menu.entry.js +1 -1
  89. package/dist/esm-es5/pds-modal.entry.js +1 -1
  90. package/dist/esm-es5/pds-multiselect.entry.js +1 -1
  91. package/dist/esm-es5/pds-popover.entry.js +1 -1
  92. package/dist/esm-es5/pds-radio.entry.js +1 -1
  93. package/dist/esm-es5/pds-row.entry.js +1 -1
  94. package/dist/esm-es5/pds-switch.entry.js +1 -1
  95. package/dist/esm-es5/pds-table-cell.entry.js +1 -1
  96. package/dist/esm-es5/pds-text.entry.js +1 -1
  97. package/dist/esm-es5/pine-core.js +1 -1
  98. package/dist/esm-es5/truncation-tooltip-DRXsdKk1.js +1 -0
  99. package/dist/pine-core/{p-9af131d6.system.entry.js → p-11d98408.system.entry.js} +1 -1
  100. package/dist/pine-core/p-153ba77b.entry.js +1 -0
  101. package/dist/pine-core/p-355e4cf9.entry.js +1 -0
  102. package/dist/pine-core/p-4435fff6.system.entry.js +1 -0
  103. package/dist/pine-core/p-576cf904.system.entry.js +1 -0
  104. package/dist/pine-core/{p-4f94b4f1.system.entry.js → p-645a482b.system.entry.js} +1 -1
  105. package/dist/pine-core/{p-4fa63723.system.entry.js → p-6d603d16.system.entry.js} +1 -1
  106. package/dist/pine-core/p-74a05bcc.entry.js +1 -0
  107. package/dist/pine-core/p-7fa66cad.entry.js +1 -0
  108. package/dist/pine-core/p-80a698ae.entry.js +1 -0
  109. package/dist/pine-core/{p-bf7ee3b7.system.entry.js → p-80e6f3a0.system.entry.js} +1 -1
  110. package/dist/pine-core/p-88ff1604.entry.js +1 -0
  111. package/dist/pine-core/p-92ae6082.entry.js +1 -0
  112. package/dist/pine-core/{p-6eec23a7.system.entry.js → p-97d0b89e.system.entry.js} +1 -1
  113. package/dist/pine-core/p-993d1043.entry.js +1 -0
  114. package/dist/pine-core/p-CuSNnuFu.system.js +1 -1
  115. package/dist/pine-core/p-JtdHT_W5.js +1 -0
  116. package/dist/pine-core/p-a787b34a.system.entry.js +1 -0
  117. package/dist/pine-core/p-a939b471.entry.js +1 -0
  118. package/dist/pine-core/p-aa032a5e.system.entry.js +1 -0
  119. package/dist/pine-core/{p-646afbca.system.entry.js → p-b60ac7eb.system.entry.js} +1 -1
  120. package/dist/pine-core/p-bb73ad66.entry.js +2 -0
  121. package/dist/pine-core/p-bd26a5e8.entry.js +1 -0
  122. package/dist/pine-core/p-bf5887e8.system.entry.js +1 -0
  123. package/dist/pine-core/p-c36b490e.entry.js +1 -0
  124. package/dist/pine-core/p-c81d8ac8.entry.js +1 -0
  125. package/dist/pine-core/p-ca0a8f5c.entry.js +1 -0
  126. package/dist/pine-core/p-ca0d48e8.entry.js +1 -0
  127. package/dist/pine-core/p-cfc52b95.system.entry.js +1 -0
  128. package/dist/pine-core/{p-ba1f65c2.system.entry.js → p-d8570b4b.system.entry.js} +1 -1
  129. package/dist/pine-core/{p-9e0f920a.system.entry.js → p-e7a95a49.system.entry.js} +1 -1
  130. package/dist/pine-core/p-e803f629.system.entry.js +1 -0
  131. package/dist/pine-core/{p-df539c42.system.entry.js → p-e836f3ec.system.entry.js} +2 -2
  132. package/dist/pine-core/{p-b8e8a4ce.entry.js → p-f474d7de.entry.js} +1 -1
  133. package/dist/pine-core/{p-CBu9UrXr.system.js → p-qhdoK1Jp.system.js} +1 -1
  134. package/dist/pine-core/pine-core.esm.js +1 -1
  135. package/dist/types/components/pds-checkbox/pds-checkbox.d.ts +4 -0
  136. package/dist/types/components/pds-combobox/pds-combobox.d.ts +7 -1
  137. package/dist/types/components/pds-drawer/pds-drawer.d.ts +21 -9
  138. package/dist/types/components/pds-dropdown-menu/pds-dropdown-menu.d.ts +1 -0
  139. package/dist/types/components/pds-modal/pds-modal.d.ts +16 -3
  140. package/dist/types/components/pds-multiselect/pds-multiselect.d.ts +10 -3
  141. package/dist/types/components/pds-popover/pds-popover.d.ts +31 -1
  142. package/dist/types/components/pds-switch/pds-switch.d.ts +4 -0
  143. package/dist/types/components/pds-table/pds-table-cell/pds-table-cell.d.ts +3 -0
  144. package/dist/types/components/pds-text/pds-text.d.ts +1 -0
  145. package/dist/types/components.d.ts +47 -32
  146. package/dist/types/utils/truncation-tooltip.d.ts +15 -2
  147. package/dist/vscode.html-data.json +11 -4
  148. package/hydrate/index.js +698 -253
  149. package/hydrate/index.mjs +698 -253
  150. package/package.json +2 -2
  151. package/dist/esm-es5/truncation-tooltip-_902ENWC.js +0 -1
  152. package/dist/pine-core/p-01c9b8f3.entry.js +0 -1
  153. package/dist/pine-core/p-258d5e83.entry.js +0 -1
  154. package/dist/pine-core/p-3c27088f.system.entry.js +0 -1
  155. package/dist/pine-core/p-4849fda7.entry.js +0 -1
  156. package/dist/pine-core/p-4de8f333.entry.js +0 -1
  157. package/dist/pine-core/p-550c2fd3.entry.js +0 -1
  158. package/dist/pine-core/p-6bf853c9.entry.js +0 -1
  159. package/dist/pine-core/p-6d3610f9.entry.js +0 -1
  160. package/dist/pine-core/p-73eb47fa.entry.js +0 -1
  161. package/dist/pine-core/p-7f367db4.system.entry.js +0 -1
  162. package/dist/pine-core/p-84e9b7da.entry.js +0 -1
  163. package/dist/pine-core/p-9a0083dd.system.entry.js +0 -1
  164. package/dist/pine-core/p-CnM3cCof.js +0 -1
  165. package/dist/pine-core/p-a3735199.entry.js +0 -1
  166. package/dist/pine-core/p-a85a6ab9.system.entry.js +0 -1
  167. package/dist/pine-core/p-cf08a6dd.system.entry.js +0 -1
  168. package/dist/pine-core/p-da103a54.system.entry.js +0 -1
  169. package/dist/pine-core/p-e800a2b1.entry.js +0 -1
  170. package/dist/pine-core/p-eb5465ce.entry.js +0 -1
  171. package/dist/pine-core/p-ec5428fb.entry.js +0 -1
  172. package/dist/pine-core/p-ed4b979e.entry.js +0 -1
  173. package/dist/pine-core/p-f1f17940.entry.js +0 -2
  174. package/dist/pine-core/p-f25e4731.system.entry.js +0 -1
package/hydrate/index.js CHANGED
@@ -6451,18 +6451,18 @@ class PdsBox {
6451
6451
  }
6452
6452
  render() {
6453
6453
  const boxClasses = `
6454
- ${this.alignItems !== undefined && this.alignItems.trim() !== '' ? `pds-align-items-${this.alignItems}` : ''}
6455
- ${this.alignItemsXs !== undefined && this.alignItemsXs.trim() !== '' ? `pds-align-items-xs-${this.alignItemsXs}` : ''}
6456
- ${this.alignItemsSm !== undefined && this.alignItemsSm.trim() !== '' ? `pds-align-items-sm-${this.alignItemsSm}` : ''}
6457
- ${this.alignItemsMd !== undefined && this.alignItemsMd.trim() !== '' ? `pds-align-items-md-${this.alignItemsMd}` : ''}
6458
- ${this.alignItemsLg !== undefined && this.alignItemsLg.trim() !== '' ? `pds-align-items-lg-${this.alignItemsLg}` : ''}
6459
- ${this.alignItemsXl !== undefined && this.alignItemsXl.trim() !== '' ? `pds-align-items-xl-${this.alignItemsXl}` : ''}
6460
- ${this.alignSelf !== undefined && this.alignSelf.trim() !== '' ? `pds-align-self-${this.alignSelf}` : ''}
6461
- ${this.alignSelfXs !== undefined && this.alignSelfXs.trim() !== '' ? `pds-align-self-xs-${this.alignSelfXs}` : ''}
6462
- ${this.alignSelfSm !== undefined && this.alignSelfSm.trim() !== '' ? `pds-align-self-sm-${this.alignSelfSm}` : ''}
6463
- ${this.alignSelfMd !== undefined && this.alignSelfMd.trim() !== '' ? `pds-align-self-md-${this.alignSelfMd}` : ''}
6464
- ${this.alignSelfLg !== undefined && this.alignSelfLg.trim() !== '' ? `pds-align-self-lg-${this.alignSelfLg}` : ''}
6465
- ${this.alignSelfXl !== undefined && this.alignSelfXl.trim() !== '' ? `pds-align-self-xl-${this.alignSelfXl}` : ''}
6454
+ ${this.alignItems != null && this.alignItems.trim() !== '' ? `pds-align-items-${this.alignItems}` : ''}
6455
+ ${this.alignItemsXs != null && this.alignItemsXs.trim() !== '' ? `pds-align-items-xs-${this.alignItemsXs}` : ''}
6456
+ ${this.alignItemsSm != null && this.alignItemsSm.trim() !== '' ? `pds-align-items-sm-${this.alignItemsSm}` : ''}
6457
+ ${this.alignItemsMd != null && this.alignItemsMd.trim() !== '' ? `pds-align-items-md-${this.alignItemsMd}` : ''}
6458
+ ${this.alignItemsLg != null && this.alignItemsLg.trim() !== '' ? `pds-align-items-lg-${this.alignItemsLg}` : ''}
6459
+ ${this.alignItemsXl != null && this.alignItemsXl.trim() !== '' ? `pds-align-items-xl-${this.alignItemsXl}` : ''}
6460
+ ${this.alignSelf != null && this.alignSelf.trim() !== '' ? `pds-align-self-${this.alignSelf}` : ''}
6461
+ ${this.alignSelfXs != null && this.alignSelfXs.trim() !== '' ? `pds-align-self-xs-${this.alignSelfXs}` : ''}
6462
+ ${this.alignSelfSm != null && this.alignSelfSm.trim() !== '' ? `pds-align-self-sm-${this.alignSelfSm}` : ''}
6463
+ ${this.alignSelfMd != null && this.alignSelfMd.trim() !== '' ? `pds-align-self-md-${this.alignSelfMd}` : ''}
6464
+ ${this.alignSelfLg != null && this.alignSelfLg.trim() !== '' ? `pds-align-self-lg-${this.alignSelfLg}` : ''}
6465
+ ${this.alignSelfXl != null && this.alignSelfXl.trim() !== '' ? `pds-align-self-xl-${this.alignSelfXl}` : ''}
6466
6466
  ${this.auto ? 'pds-box--auto' : ''}
6467
6467
  ${this.autoXs ? 'pds-box--auto-xs' : ''}
6468
6468
  ${this.autoSm ? 'pds-box--auto-sm' : ''}
@@ -6478,101 +6478,101 @@ class PdsBox {
6478
6478
  ${this.borderInlineStart === false ? 'pds-box--border-inline-start-none' : ''}
6479
6479
  ${this.borderInlineEnd === true ? 'pds-box--border-inline-end' : ''}
6480
6480
  ${this.borderInlineEnd === false ? 'pds-box--border-inline-end-none' : ''}
6481
- ${this.borderRadius !== undefined && this.borderRadius.trim() !== '' ? `pds-border-radius-${this.borderRadius}` : ''}
6482
- ${this.direction !== undefined && this.direction.trim() !== '' ? `pds-box-direction-${this.direction}` : ''}
6483
- ${this.display !== undefined && this.display.trim() !== '' ? `pds-box--display-${this.display}` : ''}
6481
+ ${this.borderRadius != null && this.borderRadius.trim() !== '' ? `pds-border-radius-${this.borderRadius}` : ''}
6482
+ ${this.direction != null && this.direction.trim() !== '' ? `pds-box-direction-${this.direction}` : ''}
6483
+ ${this.display != null && this.display.trim() !== '' ? `pds-box--display-${this.display}` : ''}
6484
6484
  ${this.fit ? 'pds-box--fit' : ''}
6485
6485
  ${this.fitXs ? 'pds-box--fit-xs' : ''}
6486
6486
  ${this.fitSm ? 'pds-box--fit-sm' : ''}
6487
6487
  ${this.fitMd ? 'pds-box--fit-md' : ''}
6488
6488
  ${this.fitLg ? 'pds-box--fit-lg' : ''}
6489
6489
  ${this.fitXl ? 'pds-box--fit-xl' : ''}
6490
- ${this.gap !== undefined && this.gap.trim() !== '' ? `pds-box-gap-${this.gap}` : ''}
6491
- ${this.gapXs !== undefined && this.gapXs.trim() !== '' ? `pds-box-gap-xs-${this.gapXs}` : ''}
6492
- ${this.gapSm !== undefined && this.gapSm.trim() !== '' ? `pds-box-gap-sm-${this.gapSm}` : ''}
6493
- ${this.gapMd !== undefined && this.gapMd.trim() !== '' ? `pds-box-gap-md-${this.gapMd}` : ''}
6494
- ${this.gapLg !== undefined && this.gapLg.trim() !== '' ? `pds-box-gap-lg-${this.gapLg}` : ''}
6495
- ${this.gapXl !== undefined && this.gapXl.trim() !== '' ? `pds-box-gap-xl-${this.gapXl}` : ''}
6490
+ ${this.gap != null && this.gap.trim() !== '' ? `pds-box-gap-${this.gap}` : ''}
6491
+ ${this.gapXs != null && this.gapXs.trim() !== '' ? `pds-box-gap-xs-${this.gapXs}` : ''}
6492
+ ${this.gapSm != null && this.gapSm.trim() !== '' ? `pds-box-gap-sm-${this.gapSm}` : ''}
6493
+ ${this.gapMd != null && this.gapMd.trim() !== '' ? `pds-box-gap-md-${this.gapMd}` : ''}
6494
+ ${this.gapLg != null && this.gapLg.trim() !== '' ? `pds-box-gap-lg-${this.gapLg}` : ''}
6495
+ ${this.gapXl != null && this.gapXl.trim() !== '' ? `pds-box-gap-xl-${this.gapXl}` : ''}
6496
6496
  ${this.wrap ? 'pds-box--wrap' : ''}
6497
6497
  ${this.wrapXs ? 'pds-box--wrap-xs' : ''}
6498
6498
  ${this.wrapSm ? 'pds-box--wrap-sm' : ''}
6499
6499
  ${this.wrapMd ? 'pds-box--wrap-md' : ''}
6500
6500
  ${this.wrapLg ? 'pds-box--wrap-lg' : ''}
6501
6501
  ${this.wrapXl ? 'pds-box--wrap-xl' : ''}
6502
- ${this.flex !== undefined && this.flex.trim() !== '' && ['none', 'grow', 'shrink'].includes(this.flex) ? `pds-box--flex-${this.flex}` : ''}
6503
- ${this.justifyContent !== undefined && this.justifyContent.trim() !== '' ? `pds-justify-content-${this.justifyContent}` : ''}
6504
- ${this.justifyContentXs !== undefined && this.justifyContentXs.trim() !== '' ? `pds-justify-content-xs-${this.justifyContentXs}` : ''}
6505
- ${this.justifyContentSm !== undefined && this.justifyContentSm.trim() !== '' ? `pds-justify-content-sm-${this.justifyContentSm}` : ''}
6506
- ${this.justifyContentMd !== undefined && this.justifyContentMd.trim() !== '' ? `pds-justify-content-md-${this.justifyContentMd}` : ''}
6507
- ${this.justifyContentLg !== undefined && this.justifyContentLg.trim() !== '' ? `pds-justify-content-lg-${this.justifyContentLg}` : ''}
6508
- ${this.justifyContentXl !== undefined && this.justifyContentXl.trim() !== '' ? `pds-justify-content-xl-${this.justifyContentXl}` : ''}
6509
- ${this.marginBlockStart !== undefined && this.marginBlockStart.trim() !== '' ? `pds-margin-block-start-${this.marginBlockStart}` : ''}
6510
- ${this.marginBlockStartXs !== undefined && this.marginBlockStartXs.trim() !== '' ? `pds-margin-block-start-xs-${this.marginBlockStartXs}` : ''}
6511
- ${this.marginBlockStartSm !== undefined && this.marginBlockStartSm.trim() !== '' ? `pds-margin-block-start-sm-${this.marginBlockStartSm}` : ''}
6512
- ${this.marginBlockStartMd !== undefined && this.marginBlockStartMd.trim() !== '' ? `pds-margin-block-start-md-${this.marginBlockStartMd}` : ''}
6513
- ${this.marginBlockStartLg !== undefined && this.marginBlockStartLg.trim() !== '' ? `pds-margin-block-start-lg-${this.marginBlockStartLg}` : ''}
6514
- ${this.marginBlockStartXl !== undefined && this.marginBlockStartXl.trim() !== '' ? `pds-margin-block-start-xl-${this.marginBlockStartXl}` : ''}
6515
- ${this.marginInlineStart !== undefined && this.marginInlineStart.trim() !== '' ? `pds-margin-inline-start-${this.marginInlineStart}` : ''}
6516
- ${this.marginInlineStartXs !== undefined && this.marginInlineStartXs.trim() !== '' ? `pds-margin-inline-start-xs-${this.marginInlineStartXs}` : ''}
6517
- ${this.marginInlineStartSm !== undefined && this.marginInlineStartSm.trim() !== '' ? `pds-margin-inline-start-sm-${this.marginInlineStartSm}` : ''}
6518
- ${this.marginInlineStartMd !== undefined && this.marginInlineStartMd.trim() !== '' ? `pds-margin-inline-start-md-${this.marginInlineStartMd}` : ''}
6519
- ${this.marginInlineStartLg !== undefined && this.marginInlineStartLg.trim() !== '' ? `pds-margin-inline-start-lg-${this.marginInlineStartLg}` : ''}
6520
- ${this.marginInlineStartXl !== undefined && this.marginInlineStartXl.trim() !== '' ? `pds-margin-inline-start-xl-${this.marginInlineStartXl}` : ''}
6521
- ${this.marginInlineEnd !== undefined && this.marginInlineEnd.trim() !== '' ? `pds-margin-inline-end-${this.marginInlineEnd}` : ''}
6522
- ${this.marginInlineEndXs !== undefined && this.marginInlineEndXs.trim() !== '' ? `pds-margin-inline-end-xs-${this.marginInlineEndXs}` : ''}
6523
- ${this.marginInlineEndSm !== undefined && this.marginInlineEndSm.trim() !== '' ? `pds-margin-inline-end-sm-${this.marginInlineEndSm}` : ''}
6524
- ${this.marginInlineEndMd !== undefined && this.marginInlineEndMd.trim() !== '' ? `pds-margin-inline-end-md-${this.marginInlineEndMd}` : ''}
6525
- ${this.marginInlineEndLg !== undefined && this.marginInlineEndLg.trim() !== '' ? `pds-margin-inline-end-lg-${this.marginInlineEndLg}` : ''}
6526
- ${this.marginInlineEndXl !== undefined && this.marginInlineEndXl.trim() !== '' ? `pds-margin-inline-end-xl-${this.marginInlineEndXl}` : ''}
6527
- ${this.marginBlockEnd !== undefined && this.marginBlockEnd.trim() !== '' ? `pds-margin-block-end-${this.marginBlockEnd}` : ''}
6528
- ${this.marginBlockEndXs !== undefined && this.marginBlockEndXs.trim() !== '' ? `pds-margin-block-end-xs-${this.marginBlockEndXs}` : ''}
6529
- ${this.marginBlockEndSm !== undefined && this.marginBlockEndSm.trim() !== '' ? `pds-margin-block-end-sm-${this.marginBlockEndSm}` : ''}
6530
- ${this.marginBlockEndMd !== undefined && this.marginBlockEndMd.trim() !== '' ? `pds-margin-block-end-md-${this.marginBlockEndMd}` : ''}
6531
- ${this.marginBlockEndLg !== undefined && this.marginBlockEndLg.trim() !== '' ? `pds-margin-block-end-lg-${this.marginBlockEndLg}` : ''}
6532
- ${this.marginBlockEndXl !== undefined && this.marginBlockEndXl.trim() !== '' ? `pds-margin-block-end-xl-${this.marginBlockEndXl}` : ''}
6533
- ${this.offset !== undefined && this.offset.trim() !== '' ? `pds-box-offset-${this.offset}` : ''}
6534
- ${this.offsetXs !== undefined && this.offsetXs.trim() !== '' ? `pds-box-offset-xs-${this.offsetXs}` : ''}
6535
- ${this.offsetSm !== undefined && this.offsetSm.trim() !== '' ? `pds-box-offset-sm-${this.offsetSm}` : ''}
6536
- ${this.offsetMd !== undefined && this.offsetMd.trim() !== '' ? `pds-box-offset-md-${this.offsetMd}` : ''}
6537
- ${this.offsetLg !== undefined && this.offsetLg.trim() !== '' ? `pds-box-offset-lg-${this.offsetLg}` : ''}
6538
- ${this.offsetXl !== undefined && this.offsetXl.trim() !== '' ? `pds-box-offset-xl-${this.offsetXl}` : ''}
6539
- ${this.padding !== undefined && this.padding.trim() !== '' ? `pds-padding-${this.padding}` : ''}
6540
- ${this.paddingXs !== undefined && this.paddingXs.trim() !== '' ? `pds-padding-xs-${this.paddingXs}` : ''}
6541
- ${this.paddingSm !== undefined && this.paddingSm.trim() !== '' ? `pds-padding-sm-${this.paddingSm}` : ''}
6542
- ${this.paddingMd !== undefined && this.paddingMd.trim() !== '' ? `pds-padding-md-${this.paddingMd}` : ''}
6543
- ${this.paddingLg !== undefined && this.paddingLg.trim() !== '' ? `pds-padding-lg-${this.paddingLg}` : ''}
6544
- ${this.paddingXl !== undefined && this.paddingXl.trim() !== '' ? `pds-padding-xl-${this.paddingXl}` : ''}
6545
- ${this.paddingBlockStart !== undefined && this.paddingBlockStart.trim() !== '' ? `pds-padding-block-start-${this.paddingBlockStart}` : ''}
6546
- ${this.paddingBlockStartXs !== undefined && this.paddingBlockStartXs.trim() !== '' ? `pds-padding-block-start-xs-${this.paddingBlockStartXs}` : ''}
6547
- ${this.paddingBlockStartSm !== undefined && this.paddingBlockStartSm.trim() !== '' ? `pds-padding-block-start-sm-${this.paddingBlockStartSm}` : ''}
6548
- ${this.paddingBlockStartMd !== undefined && this.paddingBlockStartMd.trim() !== '' ? `pds-padding-block-start-md-${this.paddingBlockStartMd}` : ''}
6549
- ${this.paddingBlockStartLg !== undefined && this.paddingBlockStartLg.trim() !== '' ? `pds-padding-block-start-lg-${this.paddingBlockStartLg}` : ''}
6550
- ${this.paddingBlockStartXl !== undefined && this.paddingBlockStartXl.trim() !== '' ? `pds-padding-block-start-xl-${this.paddingBlockStartXl}` : ''}
6551
- ${this.paddingBlockEnd !== undefined && this.paddingBlockEnd.trim() !== '' ? `pds-padding-block-end-${this.paddingBlockEnd}` : ''}
6552
- ${this.paddingBlockEndXs !== undefined && this.paddingBlockEndXs.trim() !== '' ? `pds-padding-block-end-xs-${this.paddingBlockEndXs}` : ''}
6553
- ${this.paddingBlockEndSm !== undefined && this.paddingBlockEndSm.trim() !== '' ? `pds-padding-block-end-sm-${this.paddingBlockEndSm}` : ''}
6554
- ${this.paddingBlockEndMd !== undefined && this.paddingBlockEndMd.trim() !== '' ? `pds-padding-block-end-md-${this.paddingBlockEndMd}` : ''}
6555
- ${this.paddingBlockEndLg !== undefined && this.paddingBlockEndLg.trim() !== '' ? `pds-padding-block-end-lg-${this.paddingBlockEndLg}` : ''}
6556
- ${this.paddingBlockEndXl !== undefined && this.paddingBlockEndXl.trim() !== '' ? `pds-padding-block-end-xl-${this.paddingBlockEndXl}` : ''}
6557
- ${this.paddingInlineStart !== undefined && this.paddingInlineStart.trim() !== '' ? `pds-padding-inline-start-${this.paddingInlineStart}` : ''}
6558
- ${this.paddingInlineStartXs !== undefined && this.paddingInlineStartXs.trim() !== '' ? `pds-padding-inline-start-xs-${this.paddingInlineStartXs}` : ''}
6559
- ${this.paddingInlineStartSm !== undefined && this.paddingInlineStartSm.trim() !== '' ? `pds-padding-inline-start-sm-${this.paddingInlineStartSm}` : ''}
6560
- ${this.paddingInlineStartMd !== undefined && this.paddingInlineStartMd.trim() !== '' ? `pds-padding-inline-start-md-${this.paddingInlineStartMd}` : ''}
6561
- ${this.paddingInlineStartLg !== undefined && this.paddingInlineStartLg.trim() !== '' ? `pds-padding-inline-start-lg-${this.paddingInlineStartLg}` : ''}
6562
- ${this.paddingInlineStartXl !== undefined && this.paddingInlineStartXl.trim() !== '' ? `pds-padding-inline-start-xl-${this.paddingInlineStartXl}` : ''}
6563
- ${this.paddingInlineEnd !== undefined && this.paddingInlineEnd.trim() !== '' ? `pds-padding-inline-end-${this.paddingInlineEnd}` : ''}
6564
- ${this.paddingInlineEndXs !== undefined && this.paddingInlineEndXs.trim() !== '' ? `pds-padding-inline-end-xs-${this.paddingInlineEndXs}` : ''}
6565
- ${this.paddingInlineEndSm !== undefined && this.paddingInlineEndSm.trim() !== '' ? `pds-padding-inline-end-sm-${this.paddingInlineEndSm}` : ''}
6566
- ${this.paddingInlineEndMd !== undefined && this.paddingInlineEndMd.trim() !== '' ? `pds-padding-inline-end-md-${this.paddingInlineEndMd}` : ''}
6567
- ${this.paddingInlineEndLg !== undefined && this.paddingInlineEndLg.trim() !== '' ? `pds-padding-inline-end-lg-${this.paddingInlineEndLg}` : ''}
6568
- ${this.paddingInlineEndXl !== undefined && this.paddingInlineEndXl.trim() !== '' ? `pds-padding-inline-end-xl-${this.paddingInlineEndXl}` : ''}
6569
- ${this.shadow !== undefined && this.shadow.trim() !== '' ? `pds-shadow-${this.shadow}` : ''}
6570
- ${this.size !== undefined && this.size.trim() !== '' ? `pds-box pds-box-${this.size}` : ''}
6571
- ${this.sizeXs !== undefined && this.sizeXs.trim() !== '' ? `pds-box-xs-${this.sizeXs}` : ''}
6572
- ${this.sizeSm !== undefined && this.sizeSm.trim() !== '' ? `pds-box-sm-${this.sizeSm}` : ''}
6573
- ${this.sizeMd !== undefined && this.sizeMd.trim() !== '' ? `pds-box-md-${this.sizeMd}` : ''}
6574
- ${this.sizeLg !== undefined && this.sizeLg.trim() !== '' ? `pds-box-lg-${this.sizeLg}` : ''}
6575
- ${this.sizeXl !== undefined && this.sizeXl.trim() !== '' ? `pds-box-xl-${this.sizeXl}` : ''}
6502
+ ${this.flex != null && this.flex.trim() !== '' && ['none', 'grow', 'shrink'].includes(this.flex) ? `pds-box--flex-${this.flex}` : ''}
6503
+ ${this.justifyContent != null && this.justifyContent.trim() !== '' ? `pds-justify-content-${this.justifyContent}` : ''}
6504
+ ${this.justifyContentXs != null && this.justifyContentXs.trim() !== '' ? `pds-justify-content-xs-${this.justifyContentXs}` : ''}
6505
+ ${this.justifyContentSm != null && this.justifyContentSm.trim() !== '' ? `pds-justify-content-sm-${this.justifyContentSm}` : ''}
6506
+ ${this.justifyContentMd != null && this.justifyContentMd.trim() !== '' ? `pds-justify-content-md-${this.justifyContentMd}` : ''}
6507
+ ${this.justifyContentLg != null && this.justifyContentLg.trim() !== '' ? `pds-justify-content-lg-${this.justifyContentLg}` : ''}
6508
+ ${this.justifyContentXl != null && this.justifyContentXl.trim() !== '' ? `pds-justify-content-xl-${this.justifyContentXl}` : ''}
6509
+ ${this.marginBlockStart != null && this.marginBlockStart.trim() !== '' ? `pds-margin-block-start-${this.marginBlockStart}` : ''}
6510
+ ${this.marginBlockStartXs != null && this.marginBlockStartXs.trim() !== '' ? `pds-margin-block-start-xs-${this.marginBlockStartXs}` : ''}
6511
+ ${this.marginBlockStartSm != null && this.marginBlockStartSm.trim() !== '' ? `pds-margin-block-start-sm-${this.marginBlockStartSm}` : ''}
6512
+ ${this.marginBlockStartMd != null && this.marginBlockStartMd.trim() !== '' ? `pds-margin-block-start-md-${this.marginBlockStartMd}` : ''}
6513
+ ${this.marginBlockStartLg != null && this.marginBlockStartLg.trim() !== '' ? `pds-margin-block-start-lg-${this.marginBlockStartLg}` : ''}
6514
+ ${this.marginBlockStartXl != null && this.marginBlockStartXl.trim() !== '' ? `pds-margin-block-start-xl-${this.marginBlockStartXl}` : ''}
6515
+ ${this.marginInlineStart != null && this.marginInlineStart.trim() !== '' ? `pds-margin-inline-start-${this.marginInlineStart}` : ''}
6516
+ ${this.marginInlineStartXs != null && this.marginInlineStartXs.trim() !== '' ? `pds-margin-inline-start-xs-${this.marginInlineStartXs}` : ''}
6517
+ ${this.marginInlineStartSm != null && this.marginInlineStartSm.trim() !== '' ? `pds-margin-inline-start-sm-${this.marginInlineStartSm}` : ''}
6518
+ ${this.marginInlineStartMd != null && this.marginInlineStartMd.trim() !== '' ? `pds-margin-inline-start-md-${this.marginInlineStartMd}` : ''}
6519
+ ${this.marginInlineStartLg != null && this.marginInlineStartLg.trim() !== '' ? `pds-margin-inline-start-lg-${this.marginInlineStartLg}` : ''}
6520
+ ${this.marginInlineStartXl != null && this.marginInlineStartXl.trim() !== '' ? `pds-margin-inline-start-xl-${this.marginInlineStartXl}` : ''}
6521
+ ${this.marginInlineEnd != null && this.marginInlineEnd.trim() !== '' ? `pds-margin-inline-end-${this.marginInlineEnd}` : ''}
6522
+ ${this.marginInlineEndXs != null && this.marginInlineEndXs.trim() !== '' ? `pds-margin-inline-end-xs-${this.marginInlineEndXs}` : ''}
6523
+ ${this.marginInlineEndSm != null && this.marginInlineEndSm.trim() !== '' ? `pds-margin-inline-end-sm-${this.marginInlineEndSm}` : ''}
6524
+ ${this.marginInlineEndMd != null && this.marginInlineEndMd.trim() !== '' ? `pds-margin-inline-end-md-${this.marginInlineEndMd}` : ''}
6525
+ ${this.marginInlineEndLg != null && this.marginInlineEndLg.trim() !== '' ? `pds-margin-inline-end-lg-${this.marginInlineEndLg}` : ''}
6526
+ ${this.marginInlineEndXl != null && this.marginInlineEndXl.trim() !== '' ? `pds-margin-inline-end-xl-${this.marginInlineEndXl}` : ''}
6527
+ ${this.marginBlockEnd != null && this.marginBlockEnd.trim() !== '' ? `pds-margin-block-end-${this.marginBlockEnd}` : ''}
6528
+ ${this.marginBlockEndXs != null && this.marginBlockEndXs.trim() !== '' ? `pds-margin-block-end-xs-${this.marginBlockEndXs}` : ''}
6529
+ ${this.marginBlockEndSm != null && this.marginBlockEndSm.trim() !== '' ? `pds-margin-block-end-sm-${this.marginBlockEndSm}` : ''}
6530
+ ${this.marginBlockEndMd != null && this.marginBlockEndMd.trim() !== '' ? `pds-margin-block-end-md-${this.marginBlockEndMd}` : ''}
6531
+ ${this.marginBlockEndLg != null && this.marginBlockEndLg.trim() !== '' ? `pds-margin-block-end-lg-${this.marginBlockEndLg}` : ''}
6532
+ ${this.marginBlockEndXl != null && this.marginBlockEndXl.trim() !== '' ? `pds-margin-block-end-xl-${this.marginBlockEndXl}` : ''}
6533
+ ${this.offset != null && this.offset.trim() !== '' ? `pds-box-offset-${this.offset}` : ''}
6534
+ ${this.offsetXs != null && this.offsetXs.trim() !== '' ? `pds-box-offset-xs-${this.offsetXs}` : ''}
6535
+ ${this.offsetSm != null && this.offsetSm.trim() !== '' ? `pds-box-offset-sm-${this.offsetSm}` : ''}
6536
+ ${this.offsetMd != null && this.offsetMd.trim() !== '' ? `pds-box-offset-md-${this.offsetMd}` : ''}
6537
+ ${this.offsetLg != null && this.offsetLg.trim() !== '' ? `pds-box-offset-lg-${this.offsetLg}` : ''}
6538
+ ${this.offsetXl != null && this.offsetXl.trim() !== '' ? `pds-box-offset-xl-${this.offsetXl}` : ''}
6539
+ ${this.padding != null && this.padding.trim() !== '' ? `pds-padding-${this.padding}` : ''}
6540
+ ${this.paddingXs != null && this.paddingXs.trim() !== '' ? `pds-padding-xs-${this.paddingXs}` : ''}
6541
+ ${this.paddingSm != null && this.paddingSm.trim() !== '' ? `pds-padding-sm-${this.paddingSm}` : ''}
6542
+ ${this.paddingMd != null && this.paddingMd.trim() !== '' ? `pds-padding-md-${this.paddingMd}` : ''}
6543
+ ${this.paddingLg != null && this.paddingLg.trim() !== '' ? `pds-padding-lg-${this.paddingLg}` : ''}
6544
+ ${this.paddingXl != null && this.paddingXl.trim() !== '' ? `pds-padding-xl-${this.paddingXl}` : ''}
6545
+ ${this.paddingBlockStart != null && this.paddingBlockStart.trim() !== '' ? `pds-padding-block-start-${this.paddingBlockStart}` : ''}
6546
+ ${this.paddingBlockStartXs != null && this.paddingBlockStartXs.trim() !== '' ? `pds-padding-block-start-xs-${this.paddingBlockStartXs}` : ''}
6547
+ ${this.paddingBlockStartSm != null && this.paddingBlockStartSm.trim() !== '' ? `pds-padding-block-start-sm-${this.paddingBlockStartSm}` : ''}
6548
+ ${this.paddingBlockStartMd != null && this.paddingBlockStartMd.trim() !== '' ? `pds-padding-block-start-md-${this.paddingBlockStartMd}` : ''}
6549
+ ${this.paddingBlockStartLg != null && this.paddingBlockStartLg.trim() !== '' ? `pds-padding-block-start-lg-${this.paddingBlockStartLg}` : ''}
6550
+ ${this.paddingBlockStartXl != null && this.paddingBlockStartXl.trim() !== '' ? `pds-padding-block-start-xl-${this.paddingBlockStartXl}` : ''}
6551
+ ${this.paddingBlockEnd != null && this.paddingBlockEnd.trim() !== '' ? `pds-padding-block-end-${this.paddingBlockEnd}` : ''}
6552
+ ${this.paddingBlockEndXs != null && this.paddingBlockEndXs.trim() !== '' ? `pds-padding-block-end-xs-${this.paddingBlockEndXs}` : ''}
6553
+ ${this.paddingBlockEndSm != null && this.paddingBlockEndSm.trim() !== '' ? `pds-padding-block-end-sm-${this.paddingBlockEndSm}` : ''}
6554
+ ${this.paddingBlockEndMd != null && this.paddingBlockEndMd.trim() !== '' ? `pds-padding-block-end-md-${this.paddingBlockEndMd}` : ''}
6555
+ ${this.paddingBlockEndLg != null && this.paddingBlockEndLg.trim() !== '' ? `pds-padding-block-end-lg-${this.paddingBlockEndLg}` : ''}
6556
+ ${this.paddingBlockEndXl != null && this.paddingBlockEndXl.trim() !== '' ? `pds-padding-block-end-xl-${this.paddingBlockEndXl}` : ''}
6557
+ ${this.paddingInlineStart != null && this.paddingInlineStart.trim() !== '' ? `pds-padding-inline-start-${this.paddingInlineStart}` : ''}
6558
+ ${this.paddingInlineStartXs != null && this.paddingInlineStartXs.trim() !== '' ? `pds-padding-inline-start-xs-${this.paddingInlineStartXs}` : ''}
6559
+ ${this.paddingInlineStartSm != null && this.paddingInlineStartSm.trim() !== '' ? `pds-padding-inline-start-sm-${this.paddingInlineStartSm}` : ''}
6560
+ ${this.paddingInlineStartMd != null && this.paddingInlineStartMd.trim() !== '' ? `pds-padding-inline-start-md-${this.paddingInlineStartMd}` : ''}
6561
+ ${this.paddingInlineStartLg != null && this.paddingInlineStartLg.trim() !== '' ? `pds-padding-inline-start-lg-${this.paddingInlineStartLg}` : ''}
6562
+ ${this.paddingInlineStartXl != null && this.paddingInlineStartXl.trim() !== '' ? `pds-padding-inline-start-xl-${this.paddingInlineStartXl}` : ''}
6563
+ ${this.paddingInlineEnd != null && this.paddingInlineEnd.trim() !== '' ? `pds-padding-inline-end-${this.paddingInlineEnd}` : ''}
6564
+ ${this.paddingInlineEndXs != null && this.paddingInlineEndXs.trim() !== '' ? `pds-padding-inline-end-xs-${this.paddingInlineEndXs}` : ''}
6565
+ ${this.paddingInlineEndSm != null && this.paddingInlineEndSm.trim() !== '' ? `pds-padding-inline-end-sm-${this.paddingInlineEndSm}` : ''}
6566
+ ${this.paddingInlineEndMd != null && this.paddingInlineEndMd.trim() !== '' ? `pds-padding-inline-end-md-${this.paddingInlineEndMd}` : ''}
6567
+ ${this.paddingInlineEndLg != null && this.paddingInlineEndLg.trim() !== '' ? `pds-padding-inline-end-lg-${this.paddingInlineEndLg}` : ''}
6568
+ ${this.paddingInlineEndXl != null && this.paddingInlineEndXl.trim() !== '' ? `pds-padding-inline-end-xl-${this.paddingInlineEndXl}` : ''}
6569
+ ${this.shadow != null && this.shadow.trim() !== '' ? `pds-shadow-${this.shadow}` : ''}
6570
+ ${this.size != null && this.size.trim() !== '' ? `pds-box pds-box-${this.size}` : ''}
6571
+ ${this.sizeXs != null && this.sizeXs.trim() !== '' ? `pds-box-xs-${this.sizeXs}` : ''}
6572
+ ${this.sizeSm != null && this.sizeSm.trim() !== '' ? `pds-box-sm-${this.sizeSm}` : ''}
6573
+ ${this.sizeMd != null && this.sizeMd.trim() !== '' ? `pds-box-md-${this.sizeMd}` : ''}
6574
+ ${this.sizeLg != null && this.sizeLg.trim() !== '' ? `pds-box-lg-${this.sizeLg}` : ''}
6575
+ ${this.sizeXl != null && this.sizeXl.trim() !== '' ? `pds-box-xl-${this.sizeXl}` : ''}
6576
6576
  ${this.size == undefined &&
6577
6577
  this.sizeSm == undefined &&
6578
6578
  this.sizeMd == undefined &&
@@ -6584,7 +6584,7 @@ class PdsBox {
6584
6584
  const normalizedBorder = normalizeColorValue$1(this.borderColor);
6585
6585
  const boxInlineStyles = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (normalizedBackground && { '--color-background-box': normalizedBackground })), (normalizedBorder && { '--color-border-box': normalizedBorder })), (this.minHeight && { '--sizing-min-height-box': this.minHeight })), (this.minWidth && { '--sizing-min-width-box': this.minWidth })), (this.flex && !['none', 'grow', 'shrink'].includes(this.flex) && { 'flex': this.flex }));
6586
6586
  this.hostKeeper.record(boxClasses, boxInlineStyles);
6587
- return (hAsync(Host, { key: 'dc4d939daf38b24ecbfa0eb0a95ab67b97a85665', class: boxClasses, style: boxInlineStyles }));
6587
+ return (hAsync(Host, { key: '8a1348247b5a4c546759232f0f155721798797e5', class: boxClasses, style: boxInlineStyles }));
6588
6588
  }
6589
6589
  get el() { return getElement(this); }
6590
6590
  static get style() { return pdsBoxCss(); }
@@ -7068,7 +7068,7 @@ const isSpecTest = () => {
7068
7068
 
7069
7069
  const labelCss$5 = () => `:host{display:inline-block}:host([aria-disabled=true]) label{color:var(--pine-color-text-label-disabled)}:host([aria-readonly=true]) label{color:var(--pine-color-text-label-readonly)}label{color:var(--pine-color-text-label);font:var(--pine-typography-body-medium);letter-spacing:var(--pine-letter-spacing)}`;
7070
7070
 
7071
- const pdsCheckboxCss = () => `:host{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-flow:row wrap;flex-flow:row wrap}:host(.is-invalid) input{border-color:var(--pine-color-border-danger)}:host(.is-invalid) input:checked{background:var(--pine-color-danger)}:host(.is-invalid) input:checked::after{border-color:var(--pine-color-white)}:host(.is-invalid) input:checked:hover{background:var(--pine-color-danger-hover);border-color:var(--pine-color-border-danger-hover)}:host(.is-invalid) input:focus-visible{outline-color:var(--pine-color-focus-ring-danger)}:host(.is-invalid) label,:host(.is-invalid) .pds-checkbox__message--error{color:var(--pine-color-text-message-danger)}:host(.is-indeterminate) input{background:var(--pine-color-accent);border-color:var(--pine-color-accent)}:host(.is-indeterminate) input:hover{background:var(--pine-color-accent);border-color:var(--pine-color-accent-hover)}:host(.is-indeterminate) input::after{border:1px solid var(--pine-color-text-primary);-webkit-border-after:var(--pine-border-width-none);border-block-end:var(--pine-border-width-none);-webkit-border-before:var(--pine-border-width-none);border-block-start:var(--pine-border-width-none);-webkit-border-start:var(--pine-border-width-none);border-inline-start:var(--pine-border-width-none);content:"";display:block;height:7px;inset-block-start:50%;inset-inline-start:50%;position:absolute;-webkit-transform:translate(-50%, -50%) rotate(90deg);transform:translate(-50%, -50%) rotate(90deg);width:4px}input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--pine-color-background-container);border:var(--pine-border);border-radius:var(--pine-dimension-2xs);-ms-flex:none;flex:none;height:var(--pine-dimension-sm);margin:0;-webkit-margin-before:var(--pine-dimension-025);margin-block-start:var(--pine-dimension-025);position:relative;width:var(--pine-dimension-sm)}input:hover{background:var(--pine-color-background-container-hover);border:var(--pine-border-hover)}input:checked{background:var(--pine-color-accent);border-color:var(--pine-color-accent)}input:checked:hover{background:var(--pine-color-accent-hover);border-color:var(--pine-color-accent-hover)}input:checked::after{border:1px solid var(--pine-color-text-primary);-webkit-border-before:var(--pine-border-width-none);border-block-start:var(--pine-border-width-none);-webkit-border-start:var(--pine-border-width-none);border-inline-start:var(--pine-border-width-none);content:"";display:block;height:7px;inset-block-start:50%;inset-inline-start:50%;position:absolute;-webkit-transform:translate(-50%, -60%) rotate(43deg);transform:translate(-50%, -60%) rotate(43deg);width:4px}input:disabled{background:var(--pine-color-background-container-disabled);border-color:var(--pine-color-border-disabled);cursor:not-allowed}input:disabled:checked{background:var(--pine-color-background-container-disabled);border-color:var(--pine-color-border-disabled)}input:disabled:checked::after{border-color:var(--pine-color-border)}input:disabled+label{cursor:not-allowed}input:disabled~.pds-checkbox__message{color:var(--pine-color-text-disabled)}input:focus-visible{outline:var(--pine-outline-focus)}:host-context([dir=rtl]) input:checked::after{-webkit-transform:translate(-50%, -60%) rotate(-43deg);transform:translate(-50%, -60%) rotate(-43deg)}label{display:-ms-flexbox;display:flex;gap:var(--pine-dimension-xs)}:host(.has-label-slot) label{-ms-flex-align:center;align-items:center}:host(.has-label-slot) input{-webkit-margin-before:0;margin-block-start:0}.visually-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-checkbox__message{color:var(--pine-color-text-message);font:var(--pine-typography-body-sm-medium);-webkit-margin-before:6px;margin-block-start:6px;-webkit-margin-start:var(--pine-dimension-md);margin-inline-start:var(--pine-dimension-md);width:100%}.pds-checkbox__message--error{display:-ms-flexbox;display:flex;gap:var(--pine-dimension-2xs)}.pds-checkbox__message--error pds-icon{-webkit-margin-before:var(--pine-dimension-025);margin-block-start:var(--pine-dimension-025)}`;
7071
+ const pdsCheckboxCss = () => `:host{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-flow:row wrap;flex-flow:row wrap}:host(.is-invalid) input{border-color:var(--pine-color-border-danger)}:host(.is-invalid) input:checked{background:var(--pine-color-danger)}:host(.is-invalid) input:checked::after{border-color:var(--pine-color-white)}:host(.is-invalid) input:checked:hover{background:var(--pine-color-danger-hover);border-color:var(--pine-color-border-danger-hover)}:host(.is-invalid) input:focus-visible{outline-color:var(--pine-color-focus-ring-danger)}:host(.is-invalid) label,:host(.is-invalid) .pds-checkbox__message--error{color:var(--pine-color-text-message-danger)}:host(.is-indeterminate) input{background:var(--pine-color-accent);border-color:var(--pine-color-accent)}:host(.is-indeterminate) input:hover{background:var(--pine-color-accent);border-color:var(--pine-color-accent-hover)}:host(.is-indeterminate) input::after{border:1px solid var(--pine-color-text-primary);-webkit-border-after:var(--pine-border-width-none);border-block-end:var(--pine-border-width-none);-webkit-border-before:var(--pine-border-width-none);border-block-start:var(--pine-border-width-none);-webkit-border-start:var(--pine-border-width-none);border-inline-start:var(--pine-border-width-none);content:"";display:block;height:7px;inset-block-start:50%;inset-inline-start:50%;position:absolute;-webkit-transform:translate(-50%, -50%) rotate(90deg);transform:translate(-50%, -50%) rotate(90deg);width:4px}input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--pine-color-background-container);border:var(--pine-border);border-radius:var(--pine-dimension-2xs);-ms-flex:none;flex:none;height:var(--pine-dimension-sm);margin:0;-webkit-margin-before:var(--pine-dimension-025);margin-block-start:var(--pine-dimension-025);position:relative;width:var(--pine-dimension-sm)}input:hover{background:var(--pine-color-background-container-hover);border:var(--pine-border-hover)}input:checked{background:var(--pine-color-accent);border-color:var(--pine-color-accent)}input:checked:hover{background:var(--pine-color-accent-hover);border-color:var(--pine-color-accent-hover)}input:checked::after{border:1px solid var(--pine-color-text-primary);-webkit-border-before:var(--pine-border-width-none);border-block-start:var(--pine-border-width-none);-webkit-border-start:var(--pine-border-width-none);border-inline-start:var(--pine-border-width-none);content:"";display:block;height:7px;inset-block-start:50%;inset-inline-start:50%;position:absolute;-webkit-transform:translate(-50%, -60%) rotate(43deg);transform:translate(-50%, -60%) rotate(43deg);width:4px}input:disabled{background:var(--pine-color-background-container-disabled);border-color:var(--pine-color-border-disabled);cursor:not-allowed}input:disabled:checked{background:var(--pine-color-background-container-disabled);border-color:var(--pine-color-border-disabled)}input:disabled:checked::after{border-color:var(--pine-color-border)}input:disabled+label{cursor:not-allowed}input:disabled~.pds-checkbox__message{color:var(--pine-color-text-disabled)}input:focus-visible{outline:var(--pine-outline-focus)}:host-context([dir=rtl]) input:checked::after{-webkit-transform:translate(-50%, -60%) rotate(-43deg);transform:translate(-50%, -60%) rotate(-43deg)}label{display:-ms-flexbox;display:flex;gap:var(--pine-dimension-xs)}:host(.has-label-slot) label{-ms-flex-align:center;align-items:center}:host(.has-label-slot) label,:host(.has-label-slot) label>span{min-width:0}:host(.has-label-slot) input{-webkit-margin-before:0;margin-block-start:0}.visually-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-checkbox__message{color:var(--pine-color-text-message);font:var(--pine-typography-body-sm-medium);-webkit-margin-before:6px;margin-block-start:6px;-webkit-margin-start:var(--pine-dimension-md);margin-inline-start:var(--pine-dimension-md);width:100%}.pds-checkbox__message--error{display:-ms-flexbox;display:flex;gap:var(--pine-dimension-2xs)}.pds-checkbox__message--error pds-icon{-webkit-margin-before:var(--pine-dimension-025);margin-block-start:var(--pine-dimension-025)}`;
7072
7072
 
7073
7073
  /**
7074
7074
  * @slot label - Content displayed as the checkbox label in place of the `label` text. Clicking it toggles the checkbox.
@@ -7168,6 +7168,18 @@ class PdsCheckbox {
7168
7168
  this.checked = state === (this.value || 'on');
7169
7169
  }
7170
7170
  }
7171
+ /**
7172
+ * Form Associated Custom Elements API: Called when the form is disabled
7173
+ */
7174
+ formDisabledCallback(disabled) {
7175
+ // Also fires when this element's own `disabled` attribute is merely present, even as the
7176
+ // literal string "false" (a consumer's or React's attribute serialization can write that) —
7177
+ // the platform treats any value as disabled, independent of fieldset state. A real disabled
7178
+ // fieldset ancestor confirms this is genuinely that, not this element's own attribute.
7179
+ if (disabled && !this.el.closest('fieldset[disabled]'))
7180
+ return;
7181
+ this.disabled = disabled;
7182
+ }
7171
7183
  componentWillLoad() {
7172
7184
  this.inheritedAttributes = Object.assign({}, inheritAriaAttributes(this.el));
7173
7185
  this.updateHasLabelSlot();
@@ -7175,9 +7187,9 @@ class PdsCheckbox {
7175
7187
  render() {
7176
7188
  const hostClass = this.classNames();
7177
7189
  this.hostKeeper.record(hostClass);
7178
- return (hAsync(Host, { key: '2d63feb42a7fa2a0121c1b25625ff7c6b6844fa9', class: hostClass }, hAsync("label", { key: '07158e232a025c978c2725bdd938ce8254a244ac', htmlFor: this.componentId }, hAsync("input", Object.assign({ key: 'c1f47d9de63fef8e373f6b76efb1386cb7ab4921', 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: 'e04db0b2a5600e3da74fb9857a276547f602c7eb', class: this.hideLabel ? 'visually-hidden' : '' }, hAsync("slot", { key: '3af6b6bf89e9ab74821f63753843fca575aaea2f', name: "label", onSlotchange: this.updateHasLabelSlot }), !this.hasLabelSlot && this.label)), this.helperMessage &&
7179
- hAsync("div", { key: '78c2f5f6b0cdc93facee367662ba190906a5421c', class: 'pds-checkbox__message', id: messageId(this.componentId, 'helper') }, this.helperMessage), this.errorMessage &&
7180
- hAsync("div", { key: 'd776e3539d2ff057c5a2471df4069df8fc3af864', class: `pds-checkbox__message pds-checkbox__message--error`, id: messageId(this.componentId, 'error'), "aria-live": "assertive" }, hAsync("pds-icon", { key: 'f74131e597bc37569062b683b118b676af418a28', icon: danger, size: "small" }), this.errorMessage)));
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 &&
7191
+ hAsync("div", { key: '55dcca850dff0aa93d9ba63d6827d9155ac35dab', class: 'pds-checkbox__message', id: messageId(this.componentId, 'helper') }, this.helperMessage), this.errorMessage &&
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: '10f7efe5d4b252d9dea6f398eff973ba32506898', icon: danger, size: "small" }), this.errorMessage)));
7181
7193
  }
7182
7194
  static get formAssociated() { return true; }
7183
7195
  get el() { return getElement(this); }
@@ -8988,7 +9000,7 @@ function isOverflowing(el) {
8988
9000
  * @returns A cleanup function that removes all listeners, observers, and DOM elements.
8989
9001
  */
8990
9002
  function setupTruncationTooltip(options) {
8991
- const { hostEl, contentEl, getTooltipText, placement = 'top', manageTabIndex = true } = options;
9003
+ const { hostEl, contentEl, getTooltipText, placement = 'top', reference = hostEl, manageTabIndex = true, focusEl = hostEl } = options;
8992
9004
  injectStyles();
8993
9005
  let portalEl = null;
8994
9006
  let isHovering = false;
@@ -9083,7 +9095,7 @@ function setupTruncationTooltip(options) {
9083
9095
  if (!portalEl)
9084
9096
  return;
9085
9097
  try {
9086
- const { x, y } = await computePosition(hostEl, portalEl, {
9098
+ const { x, y } = await computePosition(reference, portalEl, {
9087
9099
  placement,
9088
9100
  strategy: 'fixed',
9089
9101
  middleware: [offset(4), flip(), shift({ padding: 5 })],
@@ -9096,7 +9108,7 @@ function setupTruncationTooltip(options) {
9096
9108
  catch (_a) {
9097
9109
  // Fallback: position above the element with bounds checking
9098
9110
  if (portalEl) {
9099
- const rect = hostEl.getBoundingClientRect();
9111
+ const rect = reference.getBoundingClientRect();
9100
9112
  const portalRect = portalEl.getBoundingClientRect();
9101
9113
  const padding = 5;
9102
9114
  // Ensure tooltip stays within viewport bounds
@@ -9182,8 +9194,8 @@ function setupTruncationTooltip(options) {
9182
9194
  }
9183
9195
  hostEl.addEventListener('mouseenter', handleMouseEnter);
9184
9196
  hostEl.addEventListener('mouseleave', handleMouseLeave);
9185
- hostEl.addEventListener('focusin', handleFocusIn);
9186
- hostEl.addEventListener('focusout', handleFocusOut);
9197
+ focusEl.addEventListener('focusin', handleFocusIn);
9198
+ focusEl.addEventListener('focusout', handleFocusOut);
9187
9199
  // Return cleanup function
9188
9200
  return () => {
9189
9201
  disposed = true;
@@ -9203,8 +9215,8 @@ function setupTruncationTooltip(options) {
9203
9215
  }
9204
9216
  hostEl.removeEventListener('mouseenter', handleMouseEnter);
9205
9217
  hostEl.removeEventListener('mouseleave', handleMouseLeave);
9206
- hostEl.removeEventListener('focusin', handleFocusIn);
9207
- hostEl.removeEventListener('focusout', handleFocusOut);
9218
+ focusEl.removeEventListener('focusin', handleFocusIn);
9219
+ focusEl.removeEventListener('focusout', handleFocusOut);
9208
9220
  removePortal();
9209
9221
  };
9210
9222
  }
@@ -9223,6 +9235,26 @@ const SENTIMENT_DOT_COLORS = {
9223
9235
  success: 'var(--pine-chip-color-success-dot)',
9224
9236
  warning: 'var(--pine-chip-color-warning-dot)',
9225
9237
  };
9238
+ // Controls a chip can sit inside that already take focus, so a clipped label adds no tab stop of its own.
9239
+ // Not any `[tabindex]`: a focusable scroll region full of chips would show every chip's tooltip at once.
9240
+ const FOCUSABLE_WRAPPER = 'a[href], button, summary, pds-button, pds-link, pds-tab, pds-dropdown-menu-item, [role="option"]';
9241
+ // Beside the listbox and level with the option, so the tooltip never covers the other options.
9242
+ function besideListbox(wrapper) {
9243
+ const option = (wrapper === null || wrapper === void 0 ? void 0 : wrapper.matches('[role="option"]')) ? wrapper : null;
9244
+ const listbox = option === null || option === void 0 ? void 0 : option.closest('[role="listbox"]');
9245
+ if (!option || !listbox)
9246
+ return {};
9247
+ return {
9248
+ placement: 'right',
9249
+ reference: {
9250
+ getBoundingClientRect: () => {
9251
+ const { top, bottom, height } = option.getBoundingClientRect();
9252
+ const { left, right, width } = listbox.getBoundingClientRect();
9253
+ return { x: left, y: top, top, left, bottom, right, width, height };
9254
+ },
9255
+ },
9256
+ };
9257
+ }
9226
9258
  /**
9227
9259
  * @slot (default) - The chip's label text.
9228
9260
  * @part button
@@ -9263,6 +9295,11 @@ class PdsChip {
9263
9295
  }
9264
9296
  connectedCallback() {
9265
9297
  this.hostKeeper.connect(this.el);
9298
+ // A moved chip reconnects without re-rendering, so componentDidRender won't re-bind what
9299
+ // disconnectedCallback tore down. Before the first render there's no label, and it binds there.
9300
+ if (this.maxWidth && this.labelTextEl) {
9301
+ this.initTruncationTooltip();
9302
+ }
9266
9303
  }
9267
9304
  // Bind (and re-bind) here, not just on load: changing variant/size remounts
9268
9305
  // the label span, so the tooltip has to re-attach to the current node or it
@@ -9287,16 +9324,15 @@ class PdsChip {
9287
9324
  initTruncationTooltip() {
9288
9325
  this.destroyTruncationTooltip();
9289
9326
  if (this.labelTextEl) {
9290
- this.truncationCleanup = setupTruncationTooltip({
9291
- hostEl: this.el,
9292
- contentEl: this.labelTextEl,
9293
- getTooltipText: () => this.el.textContent || '',
9327
+ const wrapper = this.el.closest(FOCUSABLE_WRAPPER);
9328
+ this.truncationCleanup = setupTruncationTooltip(Object.assign({ hostEl: this.el, contentEl: this.labelTextEl, getTooltipText: () => this.el.textContent || '',
9294
9329
  // The dropdown variant's label span already sits inside
9295
9330
  // `<button class="pds-chip__button">`, which is already focusable and
9296
9331
  // bubbles focusin to the host — a tabindex on the span too would nest
9297
9332
  // a second tab stop inside the button.
9298
- manageTabIndex: this.effectiveVariant !== 'dropdown',
9299
- });
9333
+ manageTabIndex: this.effectiveVariant !== 'dropdown' && !wrapper,
9334
+ // A wrapping control sits outside the host, so its focus never reaches the host's listener.
9335
+ focusEl: wrapper !== null && wrapper !== void 0 ? wrapper : this.el }, besideListbox(wrapper)));
9300
9336
  this.tooltipBoundEl = this.labelTextEl;
9301
9337
  }
9302
9338
  }
@@ -9353,7 +9389,8 @@ class PdsChip {
9353
9389
  // label span already sits inside `<button class="pds-chip__button">`,
9354
9390
  // which is already focusable and bubbles focusin to the host, so
9355
9391
  // initTruncationTooltip passes `manageTabIndex: false` there to avoid
9356
- // nesting a second tab stop inside the button.
9392
+ // nesting a second tab stop inside the button. The same goes for a chip
9393
+ // inside a consumer's own focusable control (FOCUSABLE_WRAPPER).
9357
9394
  const chipContent = isDropdown ? (hAsync("button", { class: "pds-chip__button", type: "button", part: "button" }, this.icon && hAsync("pds-icon", { class: "pds-chip__icon", part: "icon", icon: this.icon, size: this.iconSize, "aria-hidden": "true" }), showDot && hAsync("i", { class: "pds-chip__dot", part: "dot", "aria-hidden": "true" }), hAsync("span", { class: "pds-chip__label-text", ref: (el) => (this.labelTextEl = el) }, hAsync("slot", null)), hAsync("pds-icon", { icon: downSmall, size: this.iconSize, "aria-hidden": "true" }))) : (hAsync("span", { class: "pds-chip__label" }, this.icon && hAsync("pds-icon", { class: "pds-chip__icon", part: "icon", icon: this.icon, size: this.iconSize, "aria-hidden": "true" }), showDot && hAsync("i", { class: "pds-chip__dot", part: "dot", "aria-hidden": "true" }), hAsync("span", { class: "pds-chip__label-text", ref: (el) => (this.labelTextEl = el) }, hAsync("slot", null))));
9358
9395
  return chipContent;
9359
9396
  }
@@ -9427,7 +9464,7 @@ class PdsChip {
9427
9464
  const hostClass = this.classNames();
9428
9465
  const hostStyles = this.hostStyles;
9429
9466
  this.hostKeeper.record(hostClass, hostStyles);
9430
- return (hAsync(Host, { key: '63e00360276ca3941fb543b2c35211a709fbfc2b', class: hostClass, id: this.componentId, style: hostStyles }, this.setChipContent(), this.effectiveVariant === 'tag' && this.renderCloseButton()));
9467
+ return (hAsync(Host, { key: 'f82d84a7f0a4f1c980d47bf75cd4ffeef042607d', class: hostClass, id: this.componentId, style: hostStyles }, this.setChipContent(), this.effectiveVariant === 'tag' && this.renderCloseButton()));
9431
9468
  }
9432
9469
  get el() { return getElement(this); }
9433
9470
  static get style() { return pdsChipTokensCss() + pdsChipCss(); }
@@ -11625,6 +11662,9 @@ class PdsCombobox {
11625
11662
  };
11626
11663
  // Handler for button trigger click
11627
11664
  this.onButtonTriggerClick = () => {
11665
+ // The button and chip triggers are divs, so a click reaches them even while disabled.
11666
+ if (this.disabled)
11667
+ return;
11628
11668
  this.isOpen = !this.isOpen;
11629
11669
  if (this.isOpen) {
11630
11670
  this.prepareExpandFilterListOnOpen();
@@ -11644,6 +11684,13 @@ class PdsCombobox {
11644
11684
  };
11645
11685
  // Handler for button trigger keyboard events
11646
11686
  this.onButtonTriggerKeyDown = (e) => {
11687
+ // Disabled takes it out of the tab order, but setFocus() or a click can still focus it.
11688
+ if (this.disabled) {
11689
+ // Keep Space from scrolling the page, as on a native disabled button.
11690
+ if (e.key === ' ')
11691
+ e.preventDefault();
11692
+ return;
11693
+ }
11647
11694
  // Escape closes an open group before the dropdown. Other keys reach the tree through handleKeyDown.
11648
11695
  if (this.isOpen && e.key === 'Escape' && this.handleGroupedPanelKey(e))
11649
11696
  return;
@@ -11664,8 +11711,9 @@ class PdsCombobox {
11664
11711
  }, 0);
11665
11712
  }
11666
11713
  else if (e.key === 'Escape') {
11667
- e.preventDefault();
11714
+ // Only an open dropdown claims Escape; a closed one leaves it to a modal or popover around it.
11668
11715
  if (this.isOpen) {
11716
+ e.preventDefault();
11669
11717
  this.isOpen = false;
11670
11718
  this.highlightedIndex = -1;
11671
11719
  this.clearExpandFilterList();
@@ -11776,6 +11824,18 @@ class PdsCombobox {
11776
11824
  this.internals = this.el.attachInternals();
11777
11825
  }
11778
11826
  }
11827
+ /**
11828
+ * Form Associated Custom Elements API: Called when the form is disabled
11829
+ */
11830
+ formDisabledCallback(disabled) {
11831
+ // Also fires when this element's own `disabled` attribute is merely present, even as the
11832
+ // literal string "false" (a consumer's or React's attribute serialization can write that) —
11833
+ // the platform treats any value as disabled, independent of fieldset state. A real disabled
11834
+ // fieldset ancestor confirms this is genuinely that, not this element's own attribute.
11835
+ if (disabled && !this.el.closest('fieldset[disabled]'))
11836
+ return;
11837
+ this.disabled = disabled;
11838
+ }
11779
11839
  componentWillLoad() {
11780
11840
  this.originalSearchEmitter = this.pdsComboboxSearch;
11781
11841
  this.updateOptions();
@@ -11910,6 +11970,22 @@ class PdsCombobox {
11910
11970
  if (this.isOpen && this.hidesPanelSearch && this.panelTreeEl)
11911
11971
  this.focusPanel(this.panelTreeEl);
11912
11972
  }
11973
+ disabledChanged(disabled) {
11974
+ var _a, _b, _c, _d, _e;
11975
+ if (!disabled || !this.isOpen)
11976
+ return;
11977
+ const shadowActive = (_b = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.activeElement) !== null && _b !== void 0 ? _b : null;
11978
+ const focusInDropdown = !!((_d = (_c = this.portalEl) === null || _c === void 0 ? void 0 : _c.shadowRoot) === null || _d === void 0 ? void 0 : _d.activeElement) || (!!shadowActive && !!((_e = this.listboxEl) === null || _e === void 0 ? void 0 : _e.contains(shadowActive)));
11979
+ this.isOpen = false;
11980
+ this.highlightedIndex = -1;
11981
+ this.isArrowKeyNavigationMode = false;
11982
+ this.clearExpandFilterList();
11983
+ this.updateAriaActiveDescendant();
11984
+ // Closing removes the search field or option that held focus. A button or chip trigger can still
11985
+ // take it (aria-disabled), so focus doesn't fall to the page; a disabled input can't, as natively.
11986
+ if (focusInDropdown && this.trigger !== 'input')
11987
+ this.restoreFocusToTrigger();
11988
+ }
11913
11989
  isOpenChanged(isOpen) {
11914
11990
  if (!isOpen) {
11915
11991
  this.revealedGroupLabel = null;
@@ -13047,7 +13123,8 @@ class PdsCombobox {
13047
13123
  return this.selectedOption ? this.selectedOption.value : null;
13048
13124
  }
13049
13125
  /**
13050
- * Clears the selected value and resets the component.
13126
+ * Clears the selected value and resets the component. Works while disabled too, as setting a
13127
+ * native control's value from script does.
13051
13128
  */
13052
13129
  async clear() {
13053
13130
  const hadValue = this.value !== '' || this.displayText !== '';
@@ -13624,13 +13701,13 @@ class PdsCombobox {
13624
13701
  ]
13625
13702
  .filter(Boolean)
13626
13703
  .join(' ');
13627
- return (hAsync(Host, { key: 'e934b937916e45f715e6fb54d23a2a5e7c8ce4f6', "aria-disabled": this.disabled ? 'true' : null }, hAsync("div", { key: '79d282907c4f218e124b4f9250e0aedb0e9ea51d', class: "pds-combobox", tabIndex: -1, onFocusout: this.onComboboxFocusOut, part: "combobox" }, this.hasVisibleLabel && (hAsync("label", { key: 'd05a4a8fe5362b2b0a684f36115c127689c35c2f', 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 => {
13704
+ return (hAsync(Host, { key: 'ead770a3b7ba531a1cfdc6b02aef6d7159481ed0', "aria-disabled": this.disabled ? 'true' : null }, hAsync("div", { key: '3ca6fd299acd1db8a0e476eee5f7606bc6153625', class: "pds-combobox", tabIndex: -1, onFocusout: this.onComboboxFocusOut, part: "combobox" }, this.hasVisibleLabel && (hAsync("label", { key: '44c72d099c5ccddce18400b9d3c66158f485de05', 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 => {
13628
13705
  this.inputEl = el;
13629
13706
  this.triggerEl = el;
13630
13707
  }, class: {
13631
13708
  'pds-combobox__input': true,
13632
13709
  'pds-combobox__input--invalid': this.isInvalid(),
13633
- }, 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: '38d9c018d59472ef8b7eb3facb47bea5c73f5f1e', style: { display: 'none' } }, hAsync("slot", { key: '26acb32e5f301b568485d52e29b68e526ef1d525', onSlotchange: () => this.updateOptions() })), this.renderDropdown(), this.groupDisplay !== 'inline' && [
13710
+ }, 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: '349af9dc6fdae018d4443b178e21b1627fcc85ca', style: { display: 'none' } }, hAsync("slot", { key: '9af42db6d08f148b7d7b5e4b3199f7c9af7699a4', onSlotchange: () => this.updateOptions() })), this.renderDropdown(), this.groupDisplay !== 'inline' && [
13634
13711
  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 : ''),
13635
13712
  // Its own region: sharing one, revealing a row then opening it would leave the text the
13636
13713
  // same, and opening the group would go unannounced.
@@ -13649,6 +13726,9 @@ class PdsCombobox {
13649
13726
  "flyoutFallback": [{
13650
13727
  "flyoutFallbackChanged": 0
13651
13728
  }],
13729
+ "disabled": [{
13730
+ "disabledChanged": 0
13731
+ }],
13652
13732
  "isOpen": [{
13653
13733
  "isOpenChanged": 0
13654
13734
  }],
@@ -13825,6 +13905,11 @@ class PdsCopytext {
13825
13905
  }
13826
13906
  connectedCallback() {
13827
13907
  this.hostKeeper.connect(this.el);
13908
+ // componentDidLoad runs once, so a moved element re-binds here what disconnectedCallback tore
13909
+ // down. Before the first render there's no valueSpanEl yet, and componentDidLoad binds it.
13910
+ if (this.truncate && this.valueSpanEl) {
13911
+ this.initTruncationTooltip();
13912
+ }
13828
13913
  }
13829
13914
  restoreBorderDefault(newValue) {
13830
13915
  this.border = restoreReflectedDefault(this.el, 'border', newValue, true);
@@ -13887,7 +13972,7 @@ class PdsCopytext {
13887
13972
  render() {
13888
13973
  const hostClass = this.classNames();
13889
13974
  this.hostKeeper.record(hostClass);
13890
- return (hAsync(Host, { key: 'd9bd40af6e435d606841cb551341eab33c5983b7', class: hostClass, id: this.componentId }, hAsync("pds-button", { key: '7a42b32678fccb2cbe0d7a68a5da6d5fe5276a4a', type: "button", variant: "unstyled", onClick: this.handleClick }, hAsync("span", { key: '732db283b8075ebad8e1daff70692bac2978aade', ref: (el) => this.valueSpanEl = el }, this.value), hAsync("pds-icon", { key: 'ebfd34b9b5a47b78783302ce97d752af09e3f3e3', "aria-hidden": "true", icon: copy, size: "16px" }))));
13975
+ return (hAsync(Host, { key: 'a3517b135fc3e3677e30b6ad5811c1170a819b65', class: hostClass, id: this.componentId }, hAsync("pds-button", { key: '02f56bed02ed3963a3d80a92148d6619a845224a', type: "button", variant: "unstyled", onClick: this.handleClick }, hAsync("span", { key: '95fd1284e3d227b74dab613eb71f5385c3a0be29', ref: (el) => this.valueSpanEl = el }, this.value), hAsync("pds-icon", { key: '21af67a8c9165e56d2d2b0cf19df7c7e3f290c72', "aria-hidden": "true", icon: copy, size: "16px" }))));
13891
13976
  }
13892
13977
  get el() { return getElement(this); }
13893
13978
  static get watchers() { return {
@@ -16082,22 +16167,24 @@ function unwrapReconnectedContent(container, selector, contentSelector) {
16082
16167
  }
16083
16168
  }
16084
16169
 
16085
- const pdsDrawerCss = () => `.pds-drawer__modal>.pds-modal__backdrop{-ms-flex-align:stretch;align-items:stretch;background-color:transparent;pointer-events:none}@supports ((-webkit-backdrop-filter: blur(3px)) or (backdrop-filter: blur(3px))){.pds-drawer__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}`;
16170
+ 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}`;
16086
16171
 
16087
- // Known selectors for content Pine components portal to document.body rather
16088
- // than rendering in place — pds-popover, pds-tooltip, pds-combobox's dropdown.
16172
+ // Known selectors for content Pine components portal out of place rather than
16173
+ // rendering where they are — pds-tooltip and pds-combobox's dropdown in
16174
+ // document.body, pds-popover in the body or the open dialog it's in.
16089
16175
  // A pointerdown landing on one of these is not "outside" the drawer in the
16090
16176
  // sense light dismiss cares about: it belongs to an overlay something inside
16091
16177
  // the drawer opened, even though it is not a DOM descendant of the drawer.
16092
16178
  const PORTALED_OVERLAY_SELECTOR = '.pds-popover, .pds-tooltip, .pds-combobox-dropdown-portal';
16093
16179
  /**
16094
- * A non-modal side panel composed from `pds-modal`.
16180
+ * A side panel composed from `pds-modal`, non-modal by default.
16095
16181
  *
16096
- * Unlike `pds-modal`, the page stays interactive while a drawer is open: no
16097
- * dimming, no blur, no scroll lock, no click blocking. `pds-drawer` renders a
16098
- * `pds-modal` internally with `disableTopLayer` always on and its backdrop
16099
- * suppressed, and adds the edge, width and dismiss behavior a side panel
16100
- * needs on top. It does not reimplement focus, Escape or dialog semantics —
16182
+ * By default, unlike `pds-modal`, the page stays interactive while a drawer
16183
+ * is open: no dimming, no blur, no scroll lock, no click blocking.
16184
+ * `pds-drawer` renders a `pds-modal` internally with `disableTopLayer` on and
16185
+ * its backdrop suppressed, and adds the edge, width and dismiss behavior a
16186
+ * side panel needs on top. With `modal`, it opens that `pds-modal` in the top
16187
+ * layer instead and keeps its backdrop. It does not reimplement focus, Escape or dialog semantics —
16101
16188
  * those come from `pds-modal` unchanged.
16102
16189
  * @lightDom renders-markup
16103
16190
  */
@@ -16128,8 +16215,18 @@ class PdsDrawer {
16128
16215
  */
16129
16216
  this.scrollable = true;
16130
16217
  /**
16131
- * Whether the drawer can be dismissed with a pointerdown outside it.
16132
- * Replaces `pds-modal`'s `backdropDismiss` — there is no backdrop to click.
16218
+ * Whether the drawer is modal. A modal drawer dims the page behind it with a
16219
+ * backdrop, makes the page inert, and keeps focus inside the drawer, like
16220
+ * `pds-modal`. Use it for a task the page should wait on. Leave it off for a
16221
+ * panel people work alongside the page. Read when the drawer opens; changing
16222
+ * it while the drawer is open is not supported.
16223
+ * @default false
16224
+ */
16225
+ this.modal = false;
16226
+ /**
16227
+ * Whether the drawer can be dismissed with a pointerdown outside it (in a
16228
+ * `modal` drawer, a click on its backdrop).
16229
+ * Replaces `pds-modal`'s `backdropDismiss`.
16133
16230
  * This also gates Escape, matching how `backdropDismiss` gates Escape on
16134
16231
  * `pds-modal` today: setting this to `false` means the close button is the
16135
16232
  * only way out.
@@ -16148,7 +16245,8 @@ class PdsDrawer {
16148
16245
  * background event while the user is mid-task elsewhere on the page —
16149
16246
  * moving focus there would interrupt them, and the page stays live under
16150
16247
  * a non-modal drawer, so it is a genuine data-entry risk, not just an
16151
- * annoyance.
16248
+ * annoyance. A `modal` drawer ignores `none`: the page behind it is inert,
16249
+ * so focus starts in the drawer.
16152
16250
  * @default 'auto'
16153
16251
  */
16154
16252
  this.initialFocus = 'auto';
@@ -16194,7 +16292,8 @@ class PdsDrawer {
16194
16292
  // page underneath stays genuinely clickable, which means a click there
16195
16293
  // never reaches pds-modal's backdrop element at all.
16196
16294
  handleOutsidePointerDown(e) {
16197
- if (!this.lightDismiss || !this.open)
16295
+ // A modal drawer's backdrop takes the click instead, through pds-modal.
16296
+ if (this.modal || !this.lightDismiss || !this.open)
16198
16297
  return;
16199
16298
  const target = e.target;
16200
16299
  if (!target)
@@ -16204,7 +16303,7 @@ class PdsDrawer {
16204
16303
  if (target.closest(PORTALED_OVERLAY_SELECTOR))
16205
16304
  return;
16206
16305
  // A datepicker's portaled calendar counts as inside only when its datepicker is in the drawer,
16207
- // or in an overlay portaled from it (a pds-popover in the drawer puts its content on the body).
16306
+ // or in an overlay portaled from it (a pds-popover in the drawer puts its content beside it).
16208
16307
  const calendar = target.closest('.pds-datepicker-calendar-portal');
16209
16308
  const owner = calendar === null || calendar === void 0 ? void 0 : calendar.pdsDatepicker;
16210
16309
  if (owner && (containsComposed$1(this.el, owner) || closest$1(PORTALED_OVERLAY_SELECTOR, owner)))
@@ -16220,11 +16319,11 @@ class PdsDrawer {
16220
16319
  this.open = false;
16221
16320
  }
16222
16321
  render() {
16223
- return (hAsync(Host, { key: 'ae7e67ed196ef95a39c2b729e859712ce5c41144', class: {
16322
+ return (hAsync(Host, { key: '287bf043c991209488eb1b617031acffb59ff9af', class: {
16224
16323
  'pds-drawer': true,
16225
16324
  [`pds-drawer--${this.side}`]: true,
16226
16325
  [`pds-drawer--${this.size}`]: true,
16227
- } }, hAsync("pds-modal", { key: '9b35ce377c84612a844a561d5540e98b08c0e499', class: "pds-drawer__modal", ref: (el) => (this.modalEl = el), componentId: this.componentId, open: this.open, scrollable: this.scrollable, disableTopLayer: true, backdropDismiss: this.lightDismiss, disableInitialFocus: this.initialFocus === 'none' }, hAsync("slot", { key: 'dda01aa40dc41b3d17073238a8cad8d816571e18' }))));
16326
+ } }, hAsync("pds-modal", { key: 'cd86fb552353f5cc12fb36fc956033432a91847c', class: { 'pds-drawer__modal': true, 'pds-drawer__modal--modal': this.modal }, ref: (el) => (this.modalEl = el), componentId: this.componentId, open: this.open, scrollable: this.scrollable, disableTopLayer: !this.modal, backdropDismiss: this.lightDismiss, disableInitialFocus: !this.modal && this.initialFocus === 'none' }, hAsync("slot", { key: '56bbe9b5c26b10b07c0f503ba147899a57a5de85' }))));
16228
16327
  }
16229
16328
  get el() { return getElement(this); }
16230
16329
  static get style() { return pdsDrawerCss(); }
@@ -16237,6 +16336,7 @@ class PdsDrawer {
16237
16336
  "side": [1],
16238
16337
  "size": [1],
16239
16338
  "scrollable": [4],
16339
+ "modal": [4],
16240
16340
  "lightDismiss": [4, "light-dismiss"],
16241
16341
  "initialFocus": [1, "initial-focus"]
16242
16342
  },
@@ -16588,15 +16688,19 @@ class PdsDropdownMenu {
16588
16688
  this.focusItemByIndex(prevIndex);
16589
16689
  }
16590
16690
  }
16691
+ // Escape is taken in document's capture phase, before a modal around the menu hears it on
16692
+ // document and closes too.
16693
+ handleEscapeKeyDown(event) {
16694
+ if (!this.isOpen || event.key !== 'Escape' || event.defaultPrevented)
16695
+ return;
16696
+ event.preventDefault();
16697
+ this.closeDropdown();
16698
+ }
16591
16699
  // Handle keyboard events for the dropdown
16592
16700
  handleKeyDown(event) {
16593
16701
  if (!this.isOpen)
16594
16702
  return;
16595
16703
  switch (event.key) {
16596
- case 'Escape':
16597
- event.preventDefault();
16598
- this.closeDropdown();
16599
- break;
16600
16704
  case 'ArrowDown':
16601
16705
  event.preventDefault();
16602
16706
  this.focusNextItem();
@@ -16688,7 +16792,7 @@ class PdsDropdownMenu {
16688
16792
  }
16689
16793
  }
16690
16794
  render() {
16691
- return (hAsync(Host, { key: '0dd585168e8fa86378c4812ce54fd09108861d5b', id: this.componentId }, hAsync("slot", { key: 'c7144f8d6aaebe37b585c6c6230102c013230a9e', name: "trigger", onSlotchange: this.handleTriggerSlotChange }), hAsync("pds-box", { key: '82292e051337141bc9fd83b90292b188b0bb3489', "border-radius": "sm", display: "flex", direction: "column", class: "pds-dropdown-menu--panel is-hidden", shadow: "100", part: "menu-panel" }, hAsync("div", { key: 'c0f49dca14df0ba3885865c51562c380155bf8a8', class: { 'pds-dropdown-menu__header': true, 'is-hidden': !this.hasHeader } }, hAsync("slot", { key: 'dc80c97a8dbb79ab4563524b3dea68d144e8570c', name: "header", onSlotchange: this.handleHeaderSlotChange })), hAsync("div", { key: '29cb56bdf28a0438296f33e0fa86c9da7b51902c', class: "pds-dropdown-menu__items", role: "menu", "aria-orientation": "vertical" }, hAsync("slot", { key: '8f91ceeb1eedc4acc79f09032dedc69a2ba1f99a', onSlotchange: this.handleSlotChange })))));
16795
+ return (hAsync(Host, { key: '18dac4d59ea236fe171f4c16f6571cb1547059c6', id: this.componentId }, hAsync("slot", { key: '95201a75a33ccb70dbd51a5cf9d78c76ebf26f65', name: "trigger", onSlotchange: this.handleTriggerSlotChange }), hAsync("pds-box", { key: '7fc588f40f607ad81ad70bf74a525d078d32a80b', "border-radius": "sm", display: "flex", direction: "column", class: "pds-dropdown-menu--panel is-hidden", shadow: "100", part: "menu-panel" }, hAsync("div", { key: '73d13d94edccb68db7b703f930b50f729334efa8', class: { 'pds-dropdown-menu__header': true, 'is-hidden': !this.hasHeader } }, hAsync("slot", { key: '7066f3a6f71c8961326f38f0509f1c0cc17098ae', name: "header", onSlotchange: this.handleHeaderSlotChange })), hAsync("div", { key: '9f07ec488b688c58c6422b575015ccd364075fe8', class: "pds-dropdown-menu__items", role: "menu", "aria-orientation": "vertical" }, hAsync("slot", { key: 'd0aad3f9ac3b58779669411523adbb8878dec61c', onSlotchange: this.handleSlotChange })))));
16692
16796
  }
16693
16797
  get host() { return getElement(this); }
16694
16798
  static get style() { return pdsDropdownMenuCss(); }
@@ -16701,7 +16805,7 @@ class PdsDropdownMenu {
16701
16805
  "currentFocusIndex": [32],
16702
16806
  "hasHeader": [32]
16703
16807
  },
16704
- "$listeners$": [[8, "keydown", "handleKeyDown"], [8, "click", "handleWindowClick"]],
16808
+ "$listeners$": [[6, "keydown", "handleEscapeKeyDown"], [8, "keydown", "handleKeyDown"], [8, "click", "handleWindowClick"]],
16705
16809
  "$lazyBundleId$": "-",
16706
16810
  "$attrsToReflect$": []
16707
16811
  }; }
@@ -16772,7 +16876,7 @@ class PdsDropdownMenuItem {
16772
16876
  });
16773
16877
  }
16774
16878
  renderElement() {
16775
- if (this.href !== undefined) {
16879
+ if (this.href != null) {
16776
16880
  return (hAsync("pds-link", { download: this.download, href: this.disabled ? null : this.href, external: this.external, target: this.target, class: {
16777
16881
  'pds-dropdown-menu-item__content': true,
16778
16882
  'has-focus': this.hasFocus
@@ -16784,7 +16888,7 @@ class PdsDropdownMenuItem {
16784
16888
  }, 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)));
16785
16889
  }
16786
16890
  render() {
16787
- return (hAsync(Host, { key: '33bd645d7c9547e3fd07429cf795302e6a482296', id: this.componentId, class: { 'is-disabled': this.disabled, 'destructive': !this.disabled && this.destructive }, onClick: () => !this.disabled && this.handleClick(), role: "none", tabIndex: -1, "aria-disabled": this.disabled ? 'true' : null }, this.renderElement()));
16891
+ return (hAsync(Host, { key: '2d499a06768bdc4b9a34774d16c1f1e10804b3d5', id: this.componentId, class: { 'is-disabled': this.disabled, 'destructive': !this.disabled && this.destructive }, onClick: () => !this.disabled && this.handleClick(), role: "none", tabIndex: -1, "aria-disabled": this.disabled ? 'true' : null }, this.renderElement()));
16788
16892
  }
16789
16893
  get host() { return getElement(this); }
16790
16894
  static get style() { return pdsDropdownMenuItemCss(); }
@@ -18562,6 +18666,20 @@ function oneRadioPerGroup(elements) {
18562
18666
  const stops = new Set(groups.map((radios) => { var _a; return (_a = radios.find((radio) => radio.checked)) !== null && _a !== void 0 ? _a : radios[0]; }));
18563
18667
  return elements.filter((el) => groupedRadio(el) === null || stops.has(el));
18564
18668
  }
18669
+ /** The controls Tab reaches in `root`, in order: visible ones, and one radio per group. */
18670
+ function tabbableIn(root) {
18671
+ const found = [];
18672
+ collectTabbable(root, found);
18673
+ // checkVisibility() also drops an element inside a hidden ancestor, whose own computed
18674
+ // display isn't none; such an element can't take focus.
18675
+ const visible = found.filter(el => {
18676
+ if (typeof el.checkVisibility === 'function')
18677
+ return el.checkVisibility({ checkVisibilityCSS: true });
18678
+ const style = window.getComputedStyle(el);
18679
+ return style.display !== 'none' && style.visibility !== 'hidden';
18680
+ });
18681
+ return oneRadioPerGroup(visible);
18682
+ }
18565
18683
  /** Whether `node` is `ancestor` or inside it, crossing shadow roots, which `Node.contains` doesn't. */
18566
18684
  function containsComposed(ancestor, node) {
18567
18685
  for (let current = node; current; current = current instanceof ShadowRoot ? current.host : current.parentNode) {
@@ -18570,8 +18688,36 @@ function containsComposed(ancestor, node) {
18570
18688
  }
18571
18689
  return false;
18572
18690
  }
18691
+ /**
18692
+ * Every open modal, with the order it opened in, which ranks top-layer modals and the modals
18693
+ * inside them. Kept here rather than queried from the document, which can't see a modal inside
18694
+ * another component's shadow root.
18695
+ */
18696
+ const openModals = new Map();
18697
+ let openSequence = 0;
18698
+ /** Whether an open auto popover's panel sits in `root`, including inside shadow roots under it. */
18699
+ function hasOpenPopover(root) {
18700
+ if (root.querySelector('[data-pds-popover-open]'))
18701
+ return true;
18702
+ return Array.from(root.querySelectorAll('*')).some(el => !!el.shadowRoot && hasOpenPopover(el.shadowRoot));
18703
+ }
18704
+ /**
18705
+ * Whether `a` comes before `b` in the page. `compareDocumentPosition` is arbitrary across a shadow
18706
+ * boundary, so each side climbs to its host until both are in the same tree.
18707
+ */
18708
+ function precedesComposed(a, b) {
18709
+ // A document has no host, which ends each climb.
18710
+ for (let x = a; x; x = x.getRootNode().host) {
18711
+ for (let y = b; y; y = y.getRootNode().host) {
18712
+ if (x.getRootNode() === y.getRootNode()) {
18713
+ return !!(x.compareDocumentPosition(y) & Node.DOCUMENT_POSITION_FOLLOWING);
18714
+ }
18715
+ }
18716
+ }
18717
+ return false;
18718
+ }
18573
18719
  /** The focused element, followed down through shadow roots to the control that has focus. */
18574
- function deepActiveElement() {
18720
+ function deepActiveElement$1() {
18575
18721
  var _a;
18576
18722
  let active = document.activeElement;
18577
18723
  while ((_a = active === null || active === void 0 ? void 0 : active.shadowRoot) === null || _a === void 0 ? void 0 : _a.activeElement)
@@ -18588,7 +18734,8 @@ class PdsModal {
18588
18734
  this.pdsModalClose = createEvent(this, "pdsModalClose");
18589
18735
  this.focusableElements = [];
18590
18736
  /**
18591
- * Whether the modal can be dismissed by clicking the backdrop
18737
+ * Whether the modal can be dismissed by clicking the backdrop, pressing Escape, or the browser's
18738
+ * own close request (such as a back gesture)
18592
18739
  * @default true
18593
18740
  */
18594
18741
  this.backdropDismiss = true;
@@ -18636,19 +18783,33 @@ class PdsModal {
18636
18783
  * Stores the list of focusable elements in the modal
18637
18784
  */
18638
18785
  this.focusableElementsArray = [];
18786
+ // The browser's own close request (an Escape nothing prevented, a back gesture) would close the
18787
+ // dialog without updating `open`, so close it through hideModal() instead, or not at all.
18788
+ this.handleCancel = (e) => {
18789
+ e.preventDefault();
18790
+ if (!this.open)
18791
+ return;
18792
+ // The request reaches the top-layer dialog even when a disableTopLayer modal inside it is on
18793
+ // top; that one closes first, as it would on Escape.
18794
+ const top = this.innermostOpenModal();
18795
+ const target = (top && containsComposed(this.el, top) ? top : this.el);
18796
+ if (target.backdropDismiss)
18797
+ target.hideModal();
18798
+ };
18639
18799
  this.handleBackdropClick = (e) => {
18640
18800
  if (!this.backdropDismiss || !this.open)
18641
18801
  return;
18642
- if (e.target.classList.contains('pds-modal__backdrop')) {
18802
+ // This modal's own backdrop; a nested modal's backdrop handles its own clicks.
18803
+ if (e.target === this.modalRef) {
18643
18804
  e.stopPropagation();
18644
18805
  // Only close if this is the innermost modal
18645
- if (this.isInnermostModal()) {
18806
+ if (this.innermostOpenModal() === this.el) {
18646
18807
  this.hideModal();
18647
18808
  }
18648
18809
  }
18649
18810
  };
18650
18811
  this.handleKeyDown = (e) => {
18651
- var _a, _b, _c;
18812
+ var _a, _b, _c, _d;
18652
18813
  // If the modal is not open, don't handle any keyboard events
18653
18814
  if (!this.open)
18654
18815
  return;
@@ -18671,24 +18832,39 @@ class PdsModal {
18671
18832
  if (!('__pdsActiveElementAtEscape' in eventSnapshot)) {
18672
18833
  const activeAtDispatch = document.activeElement;
18673
18834
  eventSnapshot.__pdsActiveElementAtEscape = activeAtDispatch;
18835
+ // Followed into shadow roots: for a modal inside one, document.activeElement is only the host.
18836
+ eventSnapshot.__pdsDeepActiveElementAtEscape = deepActiveElement$1();
18674
18837
  const topLayerDialog = (_a = activeAtDispatch === null || activeAtDispatch === void 0 ? void 0 : activeAtDispatch.closest('dialog')) !== null && _a !== void 0 ? _a : null;
18675
18838
  eventSnapshot.__pdsTopLayerDialogAtEscape = topLayerDialog;
18676
18839
  eventSnapshot.__pdsTopLayerDialogWasModalAtEscape = !!(topLayerDialog && topLayerDialog.matches(':modal'));
18840
+ // A control that closed on this Escape (a combobox on its own element, a dropdown menu or
18841
+ // multiselect in document's capture phase) has prevented it before this bubble listener.
18842
+ // Read before any modal prevents it below.
18843
+ eventSnapshot.__pdsEscapeHandledInside = e.defaultPrevented;
18844
+ // Which modal is innermost is read once too: the inner one closing first would make its
18845
+ // outer modal the innermost by the time that modal's listener runs.
18846
+ eventSnapshot.__pdsInnermostModalAtEscape = this.innermostOpenModal();
18677
18847
  }
18848
+ if (eventSnapshot.__pdsEscapeHandledInside)
18849
+ return;
18678
18850
  // Leave Escape to a genuinely stacked-above overlay (disableTopLayer's
18679
18851
  // reason for existing) — not just to anything outside this modal.
18680
18852
  const active = eventSnapshot.__pdsActiveElementAtEscape;
18681
18853
  if (this.disableTopLayer &&
18682
18854
  active &&
18683
18855
  active !== document.body &&
18684
- !this.el.contains(active) &&
18685
- this.isStackedAboveOverlay(active, (_b = eventSnapshot.__pdsTopLayerDialogAtEscape) !== null && _b !== void 0 ? _b : null, (_c = eventSnapshot.__pdsTopLayerDialogWasModalAtEscape) !== null && _c !== void 0 ? _c : false)) {
18856
+ !containsComposed(this.el, (_b = eventSnapshot.__pdsDeepActiveElementAtEscape) !== null && _b !== void 0 ? _b : active) &&
18857
+ this.isStackedAboveOverlay(active, (_c = eventSnapshot.__pdsTopLayerDialogAtEscape) !== null && _c !== void 0 ? _c : null, (_d = eventSnapshot.__pdsTopLayerDialogWasModalAtEscape) !== null && _d !== void 0 ? _d : false)) {
18686
18858
  return;
18687
18859
  }
18860
+ // An open popover inside takes Escape from its own document listener, which runs after this
18861
+ // one, so leave the key for it. Its preventDefault() keeps the native dialog open.
18862
+ if (this.modalRef && hasOpenPopover(this.modalRef))
18863
+ return;
18688
18864
  // Always prevent native dialog close behavior
18689
18865
  e.preventDefault();
18690
18866
  // Only close if backdropDismiss is enabled and this is the innermost modal
18691
- if (this.backdropDismiss && this.isInnermostModal()) {
18867
+ if (this.backdropDismiss && eventSnapshot.__pdsInnermostModalAtEscape === this.el) {
18692
18868
  this.hideModal();
18693
18869
  }
18694
18870
  return;
@@ -18708,7 +18884,7 @@ class PdsModal {
18708
18884
  // Every open modal hears this keydown. When focus is in a modal dialog opened above this one,
18709
18885
  // that dialog traps Tab: this modal's list also holds its controls, so it would wrap first. A
18710
18886
  // non-modal dialog inside (a disableTopLayer modal) doesn't trap, so this one still does.
18711
- const activeElement = deepActiveElement();
18887
+ const activeElement = deepActiveElement$1();
18712
18888
  if (!activeElement || this.modalDialogAbove(activeElement))
18713
18889
  return;
18714
18890
  // Content can change while the modal is open (rows fetched in, sections shown), so the
@@ -18748,8 +18924,6 @@ class PdsModal {
18748
18924
  }
18749
18925
  componentDidLoad() {
18750
18926
  this.modalRef = this.el.querySelector('.pds-modal__backdrop');
18751
- // Add keyboard event listener
18752
- document.addEventListener('keydown', this.handleKeyDown);
18753
18927
  // @Watch('open') only fires on a later change, not the prop's initial
18754
18928
  // value — a modal mounted with `open` already true (static markup, or a
18755
18929
  // framework passing it on first render) would otherwise never call
@@ -18765,9 +18939,18 @@ class PdsModal {
18765
18939
  componentDidRender() {
18766
18940
  unwrapReconnectedContent(this.el.querySelector('.pds-modal'), 'dialog.pds-modal__backdrop', '.pds-modal');
18767
18941
  }
18942
+ // Here rather than in componentDidLoad, which runs once: a modal taken out of the page and put
18943
+ // back (a morph or a framework moving it) gets its keyboard handling, and its place among the
18944
+ // open modals, back too. Adding the same listener twice is a no-op.
18945
+ connectedCallback() {
18946
+ document.addEventListener('keydown', this.handleKeyDown);
18947
+ if (this.open && !openModals.has(this.el))
18948
+ openModals.set(this.el, ++openSequence);
18949
+ }
18768
18950
  disconnectedCallback() {
18769
18951
  // Clean up event listener
18770
18952
  document.removeEventListener('keydown', this.handleKeyDown);
18953
+ openModals.delete(this.el);
18771
18954
  }
18772
18955
  handleOpenChange(newValue) {
18773
18956
  if (newValue) {
@@ -18783,17 +18966,7 @@ class PdsModal {
18783
18966
  updateFocusableElements() {
18784
18967
  if (!this.modalRef)
18785
18968
  return;
18786
- this.focusableElements = [];
18787
- collectTabbable(this.modalRef, this.focusableElements);
18788
- // checkVisibility() also drops an element inside a hidden ancestor, whose own computed
18789
- // display isn't none; such an element can't take focus, so it can't anchor the trap.
18790
- this.focusableElements = this.focusableElements.filter(el => {
18791
- if (typeof el.checkVisibility === 'function')
18792
- return el.checkVisibility({ checkVisibilityCSS: true });
18793
- const style = window.getComputedStyle(el);
18794
- return style.display !== 'none' && style.visibility !== 'hidden';
18795
- });
18796
- this.focusableElements = oneRadioPerGroup(this.focusableElements);
18969
+ this.focusableElements = tabbableIn(this.modalRef);
18797
18970
  }
18798
18971
  /**
18799
18972
  * Sets focus to the first focusable element in the modal
@@ -18817,10 +18990,13 @@ class PdsModal {
18817
18990
  * Opens the modal
18818
18991
  */
18819
18992
  async showModal() {
18993
+ var _a;
18820
18994
  if (this.modalRef) {
18821
18995
  try {
18822
- // Store the currently focused element to restore focus when modal closes
18823
- this.previousActiveElement = document.activeElement;
18996
+ // Store the currently focused element to restore focus when modal closes. Showing an open
18997
+ // modal again (the open watcher does) would record a control inside it instead.
18998
+ if (!this.modalRef.open)
18999
+ this.previousActiveElement = document.activeElement;
18824
19000
  // showModal() promotes the dialog to the browser top layer (and makes the
18825
19001
  // rest of the page inert), which prevents any overlay outside the dialog
18826
19002
  // from ever painting above it. show() opens a non-modal dialog that stays
@@ -18832,11 +19008,25 @@ class PdsModal {
18832
19008
  this.modalRef.showModal();
18833
19009
  }
18834
19010
  this.open = true;
19011
+ // Showing an open modal again doesn't move it above one opened after it.
19012
+ if (!openModals.has(this.el))
19013
+ openModals.set(this.el, ++openSequence);
18835
19014
  // Update focusable elements and set initial focus
18836
19015
  // Using a longer timeout to ensure all components are fully rendered
19016
+ const openedAs = (_a = openModals.get(this.el)) !== null && _a !== void 0 ? _a : 0;
18837
19017
  setTimeout(() => {
18838
19018
  var _a, _b;
18839
19019
  this.updateFocusableElements();
19020
+ // A modal opened above this one in the meantime has focus; don't take it back. Not this
19021
+ // modal itself (moving it gives it a new place), and not a disableTopLayer modal outside
19022
+ // it while this one is in the top layer, which sits below it.
19023
+ const openedAbove = Array.from(openModals).some(([modal, sequence]) => sequence > openedAs &&
19024
+ modal !== this.el &&
19025
+ (containsComposed(this.el, modal) || !modal.disableTopLayer || this.disableTopLayer));
19026
+ if (openedAbove) {
19027
+ this.pdsModalOpen.emit();
19028
+ return;
19029
+ }
18840
19030
  if (this.disableInitialFocus) {
18841
19031
  // show()/showModal() also move focus into the dialog natively (the
18842
19032
  // HTML spec's "dialog focusing steps") — that native step isn't
@@ -18880,6 +19070,7 @@ class PdsModal {
18880
19070
  * Closes the modal
18881
19071
  */
18882
19072
  async hideModal() {
19073
+ var _a;
18883
19074
  if (this.modalRef) {
18884
19075
  try {
18885
19076
  // Capture before close(): with the async task queue, a prop change
@@ -18894,11 +19085,19 @@ class PdsModal {
18894
19085
  const focusAlreadyMovedElsewhere = activeElement !== null && activeElement !== document.body && !this.modalRef.contains(activeElement);
18895
19086
  this.modalRef.close();
18896
19087
  this.open = false;
18897
- // Restore focus to the element that was focused before the modal was opened
18898
- if (!focusAlreadyMovedElsewhere &&
18899
- this.previousActiveElement &&
18900
- typeof this.previousActiveElement.focus === 'function') {
18901
- this.previousActiveElement.focus();
19088
+ openModals.delete(this.el);
19089
+ // Restore focus to the element that was focused before the modal was opened. If that's
19090
+ // gone or can't take focus (disabled, hidden, or nothing), fall back to the open modal now
19091
+ // on top, so focus doesn't land on an inert page behind it.
19092
+ if (!focusAlreadyMovedElsewhere) {
19093
+ const previous = this.previousActiveElement;
19094
+ if (previous && previous !== document.body && previous.isConnected)
19095
+ (_a = previous.focus) === null || _a === void 0 ? void 0 : _a.call(previous);
19096
+ const active = deepActiveElement$1();
19097
+ // document.body isn't a real restore target — it's just where focus lands when nothing
19098
+ // was focused before opening, so landing back there never counts as a successful restore.
19099
+ if (!previous || previous === document.body || !containsComposed(previous, active) || containsComposed(this.el, active))
19100
+ this.focusTopModal();
18902
19101
  }
18903
19102
  this.pdsModalClose.emit();
18904
19103
  }
@@ -18907,12 +19106,29 @@ class PdsModal {
18907
19106
  }
18908
19107
  }
18909
19108
  }
19109
+ /**
19110
+ * Focuses the first control of the open modal now on top, when the page behind it is inert: that
19111
+ * modal is in the top layer (or paints there inside a top-layer one), or it wraps this one. A
19112
+ * non-modal one over an interactive page, like a drawer, is left alone.
19113
+ */
19114
+ focusTopModal() {
19115
+ var _a;
19116
+ const top = this.innermostOpenModal();
19117
+ const dialog = top === null || top === void 0 ? void 0 : top.querySelector('.pds-modal__backdrop');
19118
+ if (!dialog)
19119
+ return;
19120
+ if (!closest$1('dialog:modal', dialog) && !containsComposed(top, this.el))
19121
+ return;
19122
+ (_a = tabbableIn(dialog).find(el => !containsComposed(this.el, el))) === null || _a === void 0 ? void 0 : _a.focus();
19123
+ }
18910
19124
  /**
18911
19125
  * Gets the z-index of a modal's backdrop element
18912
19126
  */
18913
19127
  getBackdropZIndex(modal) {
18914
19128
  const backdrop = modal.querySelector('.pds-modal__backdrop');
18915
- return backdrop ? parseInt(getComputedStyle(backdrop).zIndex, 10) : -1;
19129
+ // `auto` (no z-index token loaded) parses to NaN, which no comparison can rank.
19130
+ const zIndex = backdrop ? parseInt(getComputedStyle(backdrop).zIndex, 10) : -1;
19131
+ return Number.isNaN(zIndex) ? 0 : zIndex;
18916
19132
  }
18917
19133
  /**
18918
19134
  * Whether `active` sits inside a surface actually stacked above this modal.
@@ -18939,7 +19155,8 @@ class PdsModal {
18939
19155
  * lose that evidence depending on listener order.
18940
19156
  */
18941
19157
  isStackedAboveOverlay(active, topLayerDialog, topLayerDialogWasModal) {
18942
- if (topLayerDialog && topLayerDialog !== this.modalRef && topLayerDialogWasModal) {
19158
+ // A top-layer dialog this modal sits inside is underneath it, not an overlay above.
19159
+ if (topLayerDialog && topLayerDialog !== this.modalRef && topLayerDialogWasModal && !containsComposed(topLayerDialog, this.el)) {
18943
19160
  return true;
18944
19161
  }
18945
19162
  const ownZIndex = this.getBackdropZIndex(this.el);
@@ -18955,24 +19172,37 @@ class PdsModal {
18955
19172
  return false;
18956
19173
  }
18957
19174
  /**
18958
- * Checks if this modal is the innermost (highest z-index) modal
19175
+ * The open modal that takes Escape or a backdrop click, among those with no other open modal
19176
+ * inside them (a nested modal's backdrop can share its outer modal's z-index). A top-layer dialog
19177
+ * (or a modal inside one) paints above anything outside it, and within the top layer the last
19178
+ * opened is on top. Modals in the same layer (the page, or one top-layer dialog) then rank by
19179
+ * the highest backdrop, then the one later in the page.
18959
19180
  */
18960
- isInnermostModal() {
18961
- // Find all open modals
18962
- const openModals = Array.from(document.querySelectorAll('pds-modal')).filter(modal => modal.open);
18963
- if (openModals.length === 0)
18964
- return false;
18965
- // Get this modal's backdrop element
18966
- const thisBackdrop = this.el.querySelector('.pds-modal__backdrop');
18967
- if (!thisBackdrop)
18968
- return false;
18969
- // Get computed z-index of all open modal backdrops
18970
- const modalZIndexes = openModals.map(modal => this.getBackdropZIndex(modal));
18971
- // Get the highest z-index
18972
- const maxZIndex = Math.max(...modalZIndexes);
18973
- // Check if this modal's backdrop has the highest z-index
18974
- const thisZIndex = this.getBackdropZIndex(this.el);
18975
- return thisZIndex === maxZIndex;
19181
+ innermostOpenModal() {
19182
+ const open = Array.from(openModals.keys()).filter(modal => modal.isConnected);
19183
+ const innermost = open.filter(modal => !open.some(other => other !== modal && containsComposed(modal, other)));
19184
+ const byDocumentOrder = [...innermost].sort((a, b) => (precedesComposed(a, b) ? -1 : 1));
19185
+ // A modal inside a top-layer dialog paints in that dialog's place in the top layer, even when it
19186
+ // isn't in the top layer itself (disableTopLayer), so that dialog's open order ranks it first.
19187
+ const rank = (modal) => {
19188
+ var _a;
19189
+ const backdrop = modal.querySelector('.pds-modal__backdrop');
19190
+ const topLayerDialog = backdrop ? closest$1('dialog:modal', backdrop) : null;
19191
+ const topLayerModal = topLayerDialog === null || topLayerDialog === void 0 ? void 0 : topLayerDialog.closest('pds-modal');
19192
+ const layer = topLayerDialog ? ((_a = (topLayerModal && openModals.get(topLayerModal))) !== null && _a !== void 0 ? _a : 0) : 0;
19193
+ return [topLayerDialog ? 1 : 0, layer, this.getBackdropZIndex(modal), byDocumentOrder.indexOf(modal)];
19194
+ };
19195
+ let top = null;
19196
+ let topRank = [-1, -1, -1, -1];
19197
+ for (const modal of innermost) {
19198
+ const modalRank = rank(modal);
19199
+ const above = modalRank.findIndex((value, i) => value !== topRank[i]);
19200
+ if (above >= 0 && modalRank[above] > topRank[above]) {
19201
+ top = modal;
19202
+ topRank = modalRank;
19203
+ }
19204
+ }
19205
+ return top;
18976
19206
  }
18977
19207
  /** Whether a modal dialog other than this one sits between the focused element and this modal. */
18978
19208
  modalDialogAbove(active) {
@@ -19012,14 +19242,14 @@ class PdsModal {
19012
19242
  }
19013
19243
  render() {
19014
19244
  const [sizeClass = 'md', customSize] = this.resolveSize();
19015
- return (hAsync("dialog", { key: '12ea38928ea287f16ffa33e246caa2bfde6fc130', class: {
19245
+ return (hAsync("dialog", { key: '0b187f36910a859afe57b891f1ebffd1d2d49ab7', class: {
19016
19246
  'pds-modal__backdrop': true,
19017
19247
  'open': this.open
19018
- }, "aria-modal": this.disableTopLayer ? 'false' : 'true', "aria-labelledby": `${this.componentId}-heading`, onClick: this.handleBackdropClick }, hAsync("div", { key: 'b9d83cabda56c315d9115f7030e3bdbcf923ec08', class: {
19248
+ }, "aria-modal": this.disableTopLayer ? 'false' : 'true', "aria-labelledby": `${this.componentId}-heading`, onClick: this.handleBackdropClick, onCancel: this.handleCancel }, hAsync("div", { key: 'f5e652d4dae0e7c272b37b63eb9c65f04c69536a', class: {
19019
19249
  'pds-modal': true,
19020
19250
  [`pds-modal--${sizeClass}`]: true,
19021
19251
  'pds-modal--scrollable': this.scrollable
19022
- }, style: customSize !== undefined ? { '--pds-modal-max-width': customSize } : undefined, part: "modal" }, hAsync("slot", { key: '3c5edad1482cb124e503197adf411890573b076d' }))));
19252
+ }, style: customSize !== undefined ? { '--pds-modal-max-width': customSize } : undefined, part: "modal" }, hAsync("slot", { key: 'a954e1694741f78230599c476b270079797a263e' }))));
19023
19253
  }
19024
19254
  get el() { return getElement(this); }
19025
19255
  static get watchers() { return {
@@ -19312,7 +19542,7 @@ class PdsModalHeader {
19312
19542
  }; }
19313
19543
  }
19314
19544
 
19315
- const pdsMultiselectCss = () => `:host{display:block}:host([aria-disabled=true]) .pds-multiselect__trigger{background:var(--pine-color-background-container-disabled);border-color:var(--pine-color-border-disabled);color:var(--pine-color-text-disabled);cursor:not-allowed}:host([aria-disabled=true]) .pds-multiselect__icon{color:var(--pine-color-text-disabled)}.pds-multiselect{position:relative}.pds-multiselect__label{color:var(--pine-color-text-label);display:block;font:var(--pine-typography-body-medium);letter-spacing:var(--pine-letter-spacing);-webkit-margin-after:var(--pine-dimension-2xs);margin-block-end:var(--pine-dimension-2xs)}.pds-multiselect__wrapper{position:relative}.pds-multiselect__trigger{-ms-flex-align:center;align-items:center;background:var(--pine-color-background-container);border:var(--pine-border);border-radius:var(--pine-dimension-125);cursor:pointer;display:-ms-flexbox;display:flex;font:var(--pine-typography-body-medium);gap:var(--pine-dimension-xs);-ms-flex-pack:justify;justify-content:space-between;letter-spacing:var(--pine-letter-spacing);min-height:var(--pine-dimension-450);padding:var(--pine-dimension-xs) var(--pine-dimension-sm);position:relative;text-align:start;-webkit-transition:border-color var(--pine-motion-duration-base) ease, -webkit-box-shadow var(--pine-motion-duration-base) ease;transition:border-color var(--pine-motion-duration-base) ease, -webkit-box-shadow var(--pine-motion-duration-base) ease;transition:border-color var(--pine-motion-duration-base) ease, box-shadow var(--pine-motion-duration-base) ease;transition:border-color var(--pine-motion-duration-base) ease, box-shadow var(--pine-motion-duration-base) ease, -webkit-box-shadow var(--pine-motion-duration-base) ease;width:100%}.pds-multiselect__trigger:hover:not(.pds-multiselect__trigger--disabled){border-color:var(--pine-color-border-hover)}.pds-multiselect__trigger:focus:not(.pds-multiselect__trigger--disabled){border-color:var(--pine-color-border-active);outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-multiselect__trigger.pds-multiselect__trigger--open{border-color:var(--pine-color-border-active)}.pds-multiselect__trigger.pds-multiselect__trigger--invalid{background-color:var(--pine-color-red-050);border-color:var(--pine-color-border-danger)}.pds-multiselect__trigger.pds-multiselect__trigger--invalid:focus{outline-color:var(--pine-color-focus-ring-danger)}.pds-multiselect__trigger.pds-multiselect__trigger--disabled{background:var(--pine-color-background-container-disabled);border-color:var(--pine-color-border-disabled);color:var(--pine-color-text-disabled);cursor:not-allowed}.pds-multiselect__trigger-text{color:var(--pine-color-text-strong);-ms-flex:1;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pds-multiselect__trigger-text.pds-multiselect__trigger-text--placeholder{color:var(--pine-color-text-placeholder)}.pds-multiselect__trigger--disabled .pds-multiselect__trigger-text{color:var(--pine-color-text-disabled)}.pds-multiselect__icon{color:var(--pine-color-icon);-ms-flex-negative:var(--pine-dimension-none);flex-shrink:var(--pine-dimension-none)}.pds-multiselect__pill-list{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--pine-dimension-2xs)}.pds-multiselect__pill-list--inline{-ms-flex:1;flex:1;min-width:0}.pds-multiselect__pill-list--below{-webkit-margin-before:var(--pine-dimension-2xs);margin-block-start:var(--pine-dimension-2xs)}.pds-multiselect__pill-overflow{color:var(--pine-color-text-muted);font:var(--pine-typography-body-sm-medium);white-space:nowrap}.pds-multiselect__trigger--pill-inline{-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--pine-dimension-2xs);min-height:var(--pine-dimension-450);padding:var(--pine-dimension-2xs) var(--pine-dimension-sm)}.pds-multiselect__trigger--pill-inline.pds-multiselect__trigger--open{border-color:var(--pine-color-border-active)}.pds-multiselect__trigger--pill-inline:focus-within:not(.pds-multiselect__trigger--disabled){border-color:var(--pine-color-border-active);outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-multiselect__trigger--pill-inline.pds-multiselect__trigger--invalid:focus-within{outline-color:var(--pine-color-focus-ring-danger)}.pds-multiselect__pill-toggle{-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border-width:0;cursor:pointer;display:-ms-flexbox;display:flex;padding:0}.pds-multiselect__pill-toggle:focus{outline:3px solid transparent}.pds-multiselect__trigger--disabled .pds-multiselect__pill-toggle{cursor:not-allowed;pointer-events:none}.pds-multiselect__panel{background:var(--pine-color-background-overlay);border-radius:var(--pine-dimension-125);-webkit-box-shadow:var(--pine-box-shadow);box-shadow:var(--pine-box-shadow);-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:fixed;z-index:var(--pine-z-index-raised)}.pds-multiselect__search{-ms-flex-align:center;align-items:center;-webkit-border-after:var(--pine-border);border-block-end:var(--pine-border);border-block-end-color:var(--pine-color-border-subtle);display:-ms-flexbox;display:flex;gap:var(--pine-dimension-xs);padding:var(--pine-dimension-xs) var(--pine-dimension-sm)}.pds-multiselect__search pds-icon{color:var(--pine-color-text-muted);-ms-flex-negative:var(--pine-dimension-none);flex-shrink:var(--pine-dimension-none)}.pds-multiselect__search-input{background:transparent;border:var(--pine-dimension-none);color:var(--pine-color-text-strong);-ms-flex:1;flex:1;font:var(--pine-typography-body);letter-spacing:var(--pine-letter-spacing);min-width:var(--pine-dimension-none);outline:none}.pds-multiselect__search-input::-webkit-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-multiselect__search-input::-moz-placeholder{color:var(--pine-color-text-placeholder)}.pds-multiselect__search-input:-ms-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-multiselect__search-input::-ms-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-multiselect__search-input::placeholder{color:var(--pine-color-text-placeholder)}.pds-multiselect__selected-section{-webkit-border-after:var(--pine-border);border-block-end:var(--pine-border);border-block-end-color:var(--pine-color-border-subtle);padding:var(--pine-dimension-xs)}.pds-multiselect__selected-list{list-style:none;margin:var(--pine-dimension-none);padding:var(--pine-dimension-none)}.pds-multiselect__selected-item{color:var(--pine-color-text-strong);font:var(--pine-typography-body);letter-spacing:var(--pine-letter-spacing);overflow:hidden;padding:var(--pine-dimension-2xs) var(--pine-dimension-xs);text-overflow:ellipsis;white-space:nowrap}.pds-multiselect__listbox{background:transparent;border:var(--pine-dimension-none);-webkit-box-sizing:border-box;box-sizing:border-box;list-style:none;margin:var(--pine-dimension-none);overflow-y:auto;padding:var(--pine-dimension-xs)}.pds-multiselect__group-header{color:var(--pine-color-text-muted);display:block;font:var(--pine-typography-body-sm-medium);letter-spacing:var(--pine-letter-spacing);padding:var(--pine-dimension-sm) var(--pine-dimension-xs) var(--pine-dimension-2xs);text-transform:uppercase}.pds-multiselect__listbox>li:first-child>.pds-multiselect__group-header{-webkit-padding-before:var(--pine-dimension-xs);padding-block-start:var(--pine-dimension-xs)}.pds-multiselect__group-list{list-style:none;margin:var(--pine-dimension-none);padding:var(--pine-dimension-none)}.pds-multiselect__option{-ms-flex-align:center;align-items:center;background:transparent;border-radius:var(--pine-dimension-xs);cursor:pointer;display:-ms-flexbox;display:flex;padding:var(--pine-dimension-2xs) var(--pine-dimension-xs);-webkit-transition:background 0.15s;transition:background 0.15s}.pds-multiselect__option pds-checkbox{pointer-events:none;width:100%}.pds-multiselect__option:hover:not(.pds-multiselect__option--disabled),.pds-multiselect__option.pds-multiselect__option--highlighted:not(.pds-multiselect__option--disabled){background:var(--pine-color-background-muted)}.pds-multiselect__option.pds-multiselect__option--disabled{cursor:not-allowed;opacity:0.5}.pds-multiselect__option:focus-visible{outline:var(--pine-dimension-none)}.pds-multiselect__option-action{-ms-flex-align:center;align-items:center;block-size:var(--pine-dimension-md);color:var(--pine-color-icon);cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex-negative:0;flex-shrink:0;inline-size:var(--pine-dimension-md);-ms-flex-pack:center;justify-content:center;-webkit-margin-start:var(--pine-dimension-xs);margin-inline-start:var(--pine-dimension-xs)}.pds-multiselect__create-option{color:var(--pine-color-text-strong);width:100%}.pds-multiselect__create-option pds-icon{color:var(--pine-color-text-muted);-ms-flex-negative:var(--pine-dimension-none);flex-shrink:var(--pine-dimension-none)}.pds-multiselect__empty,.pds-multiselect__loading{-ms-flex-align:center;align-items:center;color:var(--pine-color-text-muted);display:-ms-flexbox;display:flex;font:var(--pine-typography-body);-ms-flex-pack:center;justify-content:center;padding:var(--pine-dimension-sm)}.pds-multiselect__load-more{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;padding:var(--pine-dimension-xs)}.pds-multiselect__footer{-webkit-border-before:var(--pine-border);border-block-start:var(--pine-border);border-block-start-color:var(--pine-color-border-subtle);padding:var(--pine-dimension-xs) var(--pine-dimension-sm)}.pds-multiselect__helper{color:var(--pine-color-text-message);font:var(--pine-typography-body-sm-medium);-webkit-margin-before:var(--pine-dimension-2xs);margin-block-start:var(--pine-dimension-2xs);-webkit-margin-start:var(--pine-dimension-none);margin-inline-start:var(--pine-dimension-none)}.pds-multiselect__error{-ms-flex-align:start;align-items:flex-start;color:var(--pine-color-text-message-danger);display:-ms-flexbox;display:flex;font:var(--pine-typography-body-sm-medium);gap:var(--pine-dimension-2xs);-webkit-margin-before:var(--pine-dimension-2xs);margin-block-start:var(--pine-dimension-2xs);-webkit-margin-start:var(--pine-dimension-none);margin-inline-start:var(--pine-dimension-none)}.pds-multiselect__error pds-icon{-ms-flex-negative:var(--pine-dimension-none);flex-shrink:var(--pine-dimension-none);-webkit-margin-before:var(--pine-dimension-025);margin-block-start:var(--pine-dimension-025)}.visually-hidden{border:var(--pine-dimension-none);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:var(--pine-dimension-none);position:absolute;white-space:nowrap;width:1px}`;
19545
+ const pdsMultiselectCss = () => `:host{display:block}:host([aria-disabled=true]) .pds-multiselect__trigger{background:var(--pine-color-background-container-disabled);border-color:var(--pine-color-border-disabled);color:var(--pine-color-text-disabled);cursor:not-allowed}:host([aria-disabled=true]) .pds-multiselect__icon{color:var(--pine-color-text-disabled)}.pds-multiselect{position:relative}.pds-multiselect__label{color:var(--pine-color-text-label);display:block;font:var(--pine-typography-body-medium);letter-spacing:var(--pine-letter-spacing);-webkit-margin-after:var(--pine-dimension-2xs);margin-block-end:var(--pine-dimension-2xs)}.pds-multiselect__wrapper{position:relative}.pds-multiselect__trigger{-ms-flex-align:center;align-items:center;background:var(--pine-color-background-container);border:var(--pine-border);border-radius:var(--pine-dimension-125);cursor:pointer;display:-ms-flexbox;display:flex;font:var(--pine-typography-body-medium);gap:var(--pine-dimension-xs);-ms-flex-pack:justify;justify-content:space-between;letter-spacing:var(--pine-letter-spacing);min-height:var(--pine-dimension-450);padding:var(--pine-dimension-xs) var(--pine-dimension-sm);position:relative;text-align:start;-webkit-transition:border-color var(--pine-motion-duration-base) ease, -webkit-box-shadow var(--pine-motion-duration-base) ease;transition:border-color var(--pine-motion-duration-base) ease, -webkit-box-shadow var(--pine-motion-duration-base) ease;transition:border-color var(--pine-motion-duration-base) ease, box-shadow var(--pine-motion-duration-base) ease;transition:border-color var(--pine-motion-duration-base) ease, box-shadow var(--pine-motion-duration-base) ease, -webkit-box-shadow var(--pine-motion-duration-base) ease;width:100%}.pds-multiselect__trigger:hover:not(.pds-multiselect__trigger--disabled){border-color:var(--pine-color-border-hover)}.pds-multiselect__trigger:focus:not(.pds-multiselect__trigger--disabled){border-color:var(--pine-color-border-active);outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-multiselect__trigger.pds-multiselect__trigger--open{border-color:var(--pine-color-border-active)}.pds-multiselect__trigger.pds-multiselect__trigger--invalid{background-color:var(--pine-color-red-050);border-color:var(--pine-color-border-danger)}.pds-multiselect__trigger.pds-multiselect__trigger--invalid:focus{outline-color:var(--pine-color-focus-ring-danger)}.pds-multiselect__trigger.pds-multiselect__trigger--disabled{background:var(--pine-color-background-container-disabled);border-color:var(--pine-color-border-disabled);color:var(--pine-color-text-disabled);cursor:not-allowed}.pds-multiselect__trigger-text{color:var(--pine-color-text-strong);-ms-flex:1;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pds-multiselect__trigger-text.pds-multiselect__trigger-text--placeholder{color:var(--pine-color-text-placeholder)}.pds-multiselect__trigger--disabled .pds-multiselect__trigger-text{color:var(--pine-color-text-disabled)}.pds-multiselect__icon{color:var(--pine-color-icon);-ms-flex-negative:var(--pine-dimension-none);flex-shrink:var(--pine-dimension-none)}.pds-multiselect__pill-list{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--pine-dimension-2xs)}.pds-multiselect__pill-list--inline{-ms-flex:1;flex:1;min-width:0}.pds-multiselect__pill-list--below{-webkit-margin-before:var(--pine-dimension-2xs);margin-block-start:var(--pine-dimension-2xs)}.pds-multiselect__pill-overflow{color:var(--pine-color-text-muted);font:var(--pine-typography-body-sm-medium);white-space:nowrap}.pds-multiselect__trigger--pill-inline{-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--pine-dimension-2xs);min-height:var(--pine-dimension-450);padding:var(--pine-dimension-2xs) var(--pine-dimension-sm)}.pds-multiselect__trigger--pill-inline.pds-multiselect__trigger--open{border-color:var(--pine-color-border-active)}.pds-multiselect__trigger--pill-inline:focus-within:not(.pds-multiselect__trigger--disabled){border-color:var(--pine-color-border-active);outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-multiselect__trigger--pill-inline.pds-multiselect__trigger--invalid:focus-within{outline-color:var(--pine-color-focus-ring-danger)}.pds-multiselect__pill-toggle{-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border-width:0;cursor:pointer;display:-ms-flexbox;display:flex;padding:0}.pds-multiselect__pill-toggle:focus{outline:3px solid transparent}.pds-multiselect__trigger--disabled .pds-multiselect__pill-toggle{cursor:not-allowed;pointer-events:none}.pds-multiselect__panel{background:var(--pine-color-background-overlay);border-radius:var(--pine-dimension-125);-webkit-box-shadow:var(--pine-box-shadow);box-shadow:var(--pine-box-shadow);-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:fixed;z-index:var(--pine-z-index-raised)}.pds-multiselect__search{-ms-flex-align:center;align-items:center;-webkit-border-after:var(--pine-border);border-block-end:var(--pine-border);border-block-end-color:var(--pine-color-border-subtle);display:-ms-flexbox;display:flex;gap:var(--pine-dimension-xs);padding:var(--pine-dimension-xs) var(--pine-dimension-sm)}.pds-multiselect__search pds-icon{color:var(--pine-color-text-muted);-ms-flex-negative:var(--pine-dimension-none);flex-shrink:var(--pine-dimension-none)}.pds-multiselect__search-input{background:transparent;border:var(--pine-dimension-none);color:var(--pine-color-text-strong);-ms-flex:1;flex:1;font:var(--pine-typography-body);letter-spacing:var(--pine-letter-spacing);min-width:var(--pine-dimension-none);outline:none}.pds-multiselect__search-input::-webkit-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-multiselect__search-input::-moz-placeholder{color:var(--pine-color-text-placeholder)}.pds-multiselect__search-input:-ms-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-multiselect__search-input::-ms-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-multiselect__search-input::placeholder{color:var(--pine-color-text-placeholder)}.pds-multiselect__selected-section{-webkit-border-after:var(--pine-border);border-block-end:var(--pine-border);border-block-end-color:var(--pine-color-border-subtle);padding:var(--pine-dimension-xs)}.pds-multiselect__selected-list{list-style:none;margin:var(--pine-dimension-none);padding:var(--pine-dimension-none)}.pds-multiselect__selected-item{color:var(--pine-color-text-strong);font:var(--pine-typography-body);letter-spacing:var(--pine-letter-spacing);overflow:hidden;padding:var(--pine-dimension-2xs) var(--pine-dimension-xs);text-overflow:ellipsis;white-space:nowrap}.pds-multiselect__listbox{background:transparent;border:var(--pine-dimension-none);-webkit-box-sizing:border-box;box-sizing:border-box;list-style:none;margin:var(--pine-dimension-none);overflow-y:auto;padding:var(--pine-dimension-xs)}.pds-multiselect__group-header{color:var(--pine-color-text-muted);display:block;font:var(--pine-typography-body-sm-medium);letter-spacing:var(--pine-letter-spacing);padding:var(--pine-dimension-sm) var(--pine-dimension-xs) var(--pine-dimension-2xs);text-transform:uppercase}.pds-multiselect__listbox>li:first-child>.pds-multiselect__group-header{-webkit-padding-before:var(--pine-dimension-xs);padding-block-start:var(--pine-dimension-xs)}.pds-multiselect__group-list{list-style:none;margin:var(--pine-dimension-none);padding:var(--pine-dimension-none)}.pds-multiselect__option{-ms-flex-align:center;align-items:center;background:transparent;border-radius:var(--pine-dimension-xs);cursor:pointer;display:-ms-flexbox;display:flex;padding:var(--pine-dimension-2xs) var(--pine-dimension-xs);-webkit-transition:background 0.15s;transition:background 0.15s}.pds-multiselect__option pds-checkbox{min-width:var(--pine-dimension-none);pointer-events:none;width:100%}.pds-multiselect__option pds-chip{pointer-events:auto}.pds-multiselect__option:hover:not(.pds-multiselect__option--disabled),.pds-multiselect__option.pds-multiselect__option--highlighted:not(.pds-multiselect__option--disabled){background:var(--pine-color-background-muted)}.pds-multiselect__option.pds-multiselect__option--disabled{cursor:not-allowed;opacity:0.5}.pds-multiselect__option:focus-visible{outline:var(--pine-dimension-none)}.pds-multiselect__option-action{-ms-flex-align:center;align-items:center;block-size:var(--pine-dimension-md);color:var(--pine-color-icon);cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex-negative:0;flex-shrink:0;inline-size:var(--pine-dimension-md);-ms-flex-pack:center;justify-content:center;-webkit-margin-start:var(--pine-dimension-xs);margin-inline-start:var(--pine-dimension-xs)}.pds-multiselect__create-option{color:var(--pine-color-text-strong);width:100%}.pds-multiselect__create-option pds-icon{color:var(--pine-color-text-muted);-ms-flex-negative:var(--pine-dimension-none);flex-shrink:var(--pine-dimension-none)}.pds-multiselect__empty,.pds-multiselect__loading{-ms-flex-align:center;align-items:center;color:var(--pine-color-text-muted);display:-ms-flexbox;display:flex;font:var(--pine-typography-body);-ms-flex-pack:center;justify-content:center;padding:var(--pine-dimension-sm)}.pds-multiselect__load-more{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;padding:var(--pine-dimension-xs)}.pds-multiselect__footer{-webkit-border-before:var(--pine-border);border-block-start:var(--pine-border);border-block-start-color:var(--pine-color-border-subtle);padding:var(--pine-dimension-xs) var(--pine-dimension-sm)}.pds-multiselect__helper{color:var(--pine-color-text-message);font:var(--pine-typography-body-sm-medium);-webkit-margin-before:var(--pine-dimension-2xs);margin-block-start:var(--pine-dimension-2xs);-webkit-margin-start:var(--pine-dimension-none);margin-inline-start:var(--pine-dimension-none)}.pds-multiselect__error{-ms-flex-align:start;align-items:flex-start;color:var(--pine-color-text-message-danger);display:-ms-flexbox;display:flex;font:var(--pine-typography-body-sm-medium);gap:var(--pine-dimension-2xs);-webkit-margin-before:var(--pine-dimension-2xs);margin-block-start:var(--pine-dimension-2xs);-webkit-margin-start:var(--pine-dimension-none);margin-inline-start:var(--pine-dimension-none)}.pds-multiselect__error pds-icon{-ms-flex-negative:var(--pine-dimension-none);flex-shrink:var(--pine-dimension-none);-webkit-margin-before:var(--pine-dimension-025);margin-block-start:var(--pine-dimension-025)}.visually-hidden{border:var(--pine-dimension-none);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:var(--pine-dimension-none);position:absolute;white-space:nowrap;width:1px}`;
19316
19546
 
19317
19547
  // Names only: pds-icon's `icon` prop also fetches URLs and data: SVGs, unsanitized.
19318
19548
  const PINE_ICON_NAME = /^[a-z0-9-]+$/i;
@@ -19662,6 +19892,11 @@ class PdsMultiselect {
19662
19892
  e.preventDefault(); // Prevent focus change
19663
19893
  this.toggleOption(option);
19664
19894
  };
19895
+ // mousedown already toggled the option. Without this, a click on the chip reaches the
19896
+ // checkbox through its label and toggles it a second time.
19897
+ this.handleOptionClick = (e) => {
19898
+ e.preventDefault();
19899
+ };
19665
19900
  this.handleOptionMouseEnter = (index, option) => () => {
19666
19901
  if (option.disabled)
19667
19902
  return;
@@ -19720,6 +19955,18 @@ class PdsMultiselect {
19720
19955
  this.internals = this.el.attachInternals();
19721
19956
  }
19722
19957
  }
19958
+ /**
19959
+ * Form Associated Custom Elements API: Called when the form is disabled
19960
+ */
19961
+ formDisabledCallback(disabled) {
19962
+ // Also fires when this element's own `disabled` attribute is merely present, even as the
19963
+ // literal string "false" (a consumer's or React's attribute serialization can write that) —
19964
+ // the platform treats any value as disabled, independent of fieldset state. A real disabled
19965
+ // fieldset ancestor confirms this is genuinely that, not this element's own attribute.
19966
+ if (disabled && !this.el.closest('fieldset[disabled]'))
19967
+ return;
19968
+ this.disabled = disabled;
19969
+ }
19723
19970
  componentWillLoad() {
19724
19971
  this.originalSearchEmitter = this.pdsMultiselectSearch;
19725
19972
  this.syncSelectedItems();
@@ -19818,8 +20065,20 @@ class PdsMultiselect {
19818
20065
  var _a;
19819
20066
  (_a = this.slottedTriggerEl) === null || _a === void 0 ? void 0 : _a.setAttribute('aria-expanded', String(this.isOpen));
19820
20067
  }
19821
- disabledChanged() {
20068
+ disabledChanged(disabled) {
20069
+ var _a, _b;
19822
20070
  this.syncSlottedTrigger();
20071
+ // A disabled control can't stay open, or its options could still be toggled.
20072
+ if (!disabled || !this.isOpen)
20073
+ return;
20074
+ const activeElement = document.activeElement;
20075
+ const focusInside = !!(((_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.contains(activeElement)) || this.el.contains(activeElement));
20076
+ this.closeDropdown();
20077
+ // A disabled built-in trigger can't take focus back (falls to <body>, as natively); a slotted
20078
+ // trigger without its own disabled property only gets aria-disabled and stays focusable, so
20079
+ // focus would otherwise stay stranded on the closed panel's former content.
20080
+ if (focusInside)
20081
+ (_b = this.activeTriggerEl) === null || _b === void 0 ? void 0 : _b.focus();
19823
20082
  }
19824
20083
  /**
19825
20084
  * Sets focus on the trigger button.
@@ -19829,7 +20088,8 @@ class PdsMultiselect {
19829
20088
  (_a = this.activeTriggerEl) === null || _a === void 0 ? void 0 : _a.focus();
19830
20089
  }
19831
20090
  /**
19832
- * Clears all selected values and resets the component.
20091
+ * Clears all selected values and resets the component. Works while disabled too, as setting a
20092
+ * native control's value from script does.
19833
20093
  */
19834
20094
  async clear() {
19835
20095
  const hadValues = this.value.length > 0 || this.searchQuery !== '';
@@ -19852,11 +20112,12 @@ class PdsMultiselect {
19852
20112
  }
19853
20113
  /**
19854
20114
  * Handle global keyboard events for accessibility.
19855
- * Closes dropdown on Escape key press regardless of focus location.
20115
+ * Closes dropdown on Escape key press regardless of focus location. Taken in document's capture
20116
+ * phase, before a modal around the multiselect hears it on document and closes too.
19856
20117
  */
19857
20118
  handleWindowKeyDown(event) {
19858
20119
  var _a;
19859
- if (!this.isOpen)
20120
+ if (!this.isOpen || event.defaultPrevented)
19860
20121
  return;
19861
20122
  if (event.key === 'Escape') {
19862
20123
  event.preventDefault();
@@ -20464,7 +20725,7 @@ class PdsMultiselect {
20464
20725
  'pds-multiselect__option--selected': isSelected,
20465
20726
  'pds-multiselect__option--create': isCreateOption,
20466
20727
  'pds-multiselect__option--disabled': isDisabled || isCreateDisabled,
20467
- }, 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), 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 }, option.text)))), hasAction && this.renderOptionAction(option, optionId, isHighlighted)));
20728
+ }, 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)));
20468
20729
  }
20469
20730
  renderOptionAction(option, optionId, isHighlighted) {
20470
20731
  var _a;
@@ -20546,10 +20807,10 @@ class PdsMultiselect {
20546
20807
  }
20547
20808
  render() {
20548
20809
  const hasSelections = this.selectedItems.length > 0;
20549
- return (hAsync(Host, { key: '0ef6791666063e0d951d28f980b3bca89cf24287', "aria-disabled": this.disabled ? 'true' : null }, hAsync("div", { key: 'f0ccbabfbd2dcf38f6df52f73f2152eb4bd2828e', class: "pds-multiselect", onFocusout: this.handleContainerFocusOut }, this.label && (hAsync("label", { key: '88e01c744644ce1f75c8d5b71dfaeeb79d1ef7df', id: `${this.componentId}-label`, htmlFor: this.componentId, class: {
20810
+ return (hAsync(Host, { key: 'a7806379c53598d41af91be63ee5bd300cc87755', "aria-disabled": this.disabled ? 'true' : null }, hAsync("div", { key: '0213d40953f1735b84c038e0e0afd1bc289d45ad', class: "pds-multiselect", onFocusout: this.handleContainerFocusOut }, this.label && (hAsync("label", { key: 'fa91c2337cdc9f5dea62173aeaa6b56e118a1316', id: `${this.componentId}-label`, htmlFor: this.componentId, class: {
20550
20811
  'pds-multiselect__label': true,
20551
20812
  'visually-hidden': this.hideLabel,
20552
- } }, this.label)), hAsync("div", { key: '0bf4a3b1378ff18e6d6b449507ebbae1bfb279e4', 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: {
20813
+ } }, this.label)), hAsync("div", { key: '54209b3edfb3583ab1bcecd2b1df973955abfcc3', 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: {
20553
20814
  'pds-multiselect__trigger': true,
20554
20815
  'pds-multiselect__trigger--open': this.isOpen,
20555
20816
  'pds-multiselect__trigger--disabled': this.disabled,
@@ -20565,7 +20826,7 @@ class PdsMultiselect {
20565
20826
  }, 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: {
20566
20827
  'pds-multiselect__trigger-text': true,
20567
20828
  'pds-multiselect__trigger-text--placeholder': !hasSelections || (this.selectedDisplay === 'pill' && this.pillPosition === 'below'),
20568
- } }, 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: '5202a263b219d06891bda739f98db0162bf33c48', class: "visually-hidden", "aria-live": "polite", "aria-atomic": "true" }, this.removalAnnouncement), this.helperMessage && !(this.errorMessage && this.errorMessage.length > 0) && (hAsync("p", { key: '47f7b55863c5b72d41c4ef1893b9364988fc0b56', class: "pds-multiselect__helper", id: messageId(this.componentId, 'helper') }, this.helperMessage)), this.errorMessage && (hAsync("p", { key: '3930dc30b2df7179d178873c470aa1da0f6f258c', class: "pds-multiselect__error", id: messageId(this.componentId, 'error') }, hAsync("pds-icon", { key: 'e31d55db3fd0173c56faa23e34e0be92371983d4', icon: danger, size: "small" }), this.errorMessage)), hAsync("div", { key: 'b3326cc1a5e5886be05327a066e0a7ddd36ccefc', style: { display: 'none' } }, hAsync("slot", { key: '91559cb9510abce6084348a17516460fd8545ef7' })))));
20829
+ } }, 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: 'e3c1bb5c484d851b332e994cd2a528ae95cbfc4d', class: "visually-hidden", "aria-live": "polite", "aria-atomic": "true" }, this.removalAnnouncement), this.helperMessage && !(this.errorMessage && this.errorMessage.length > 0) && (hAsync("p", { key: '2009f6487118252ef1ec14170ddd0c6853ad279f', class: "pds-multiselect__helper", id: messageId(this.componentId, 'helper') }, this.helperMessage)), this.errorMessage && (hAsync("p", { key: 'c740f4845ff0c1ccff4633810c1d9d92fb2e8a78', class: "pds-multiselect__error", id: messageId(this.componentId, 'error') }, hAsync("pds-icon", { key: 'b2406ab3b0957a440593b4b986c98476258349be', icon: danger, size: "small" }), this.errorMessage)), hAsync("div", { key: '6d2db6563864c71ab92ed9a8d4133efca23b1c55', style: { display: 'none' } }, hAsync("slot", { key: '2af0e0a7e2410b9850fd15ef524fb388c32dc320' })))));
20569
20830
  }
20570
20831
  static get formAssociated() { return true; }
20571
20832
  get el() { return getElement(this); }
@@ -20655,7 +20916,7 @@ class PdsMultiselect {
20655
20916
  "clear": [64],
20656
20917
  "refreshOptions": [64]
20657
20918
  },
20658
- "$listeners$": [[8, "keydown", "handleWindowKeyDown"]],
20919
+ "$listeners$": [[6, "keydown", "handleWindowKeyDown"]],
20659
20920
  "$lazyBundleId$": "-",
20660
20921
  "$attrsToReflect$": []
20661
20922
  }; }
@@ -20705,6 +20966,16 @@ const cssEscape = (value) => {
20705
20966
 
20706
20967
  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}`;
20707
20968
 
20969
+ /** Open auto popovers, in the order they opened: Escape goes to the last one it applies to. */
20970
+ const openAutoPopovers = [];
20971
+ /** The focused element, followed down through shadow roots to the control that has focus. */
20972
+ function deepActiveElement() {
20973
+ var _a;
20974
+ let active = document.activeElement;
20975
+ while ((_a = active === null || active === void 0 ? void 0 : active.shadowRoot) === null || _a === void 0 ? void 0 : _a.activeElement)
20976
+ active = active.shadowRoot.activeElement;
20977
+ return active;
20978
+ }
20708
20979
  /**
20709
20980
  * @slot trigger - The trigger element for the popover
20710
20981
  * @slot (default) - The content to display inside the popover
@@ -20740,7 +21011,7 @@ class PdsPopover {
20740
21011
  */
20741
21012
  this.triggerObserver = null;
20742
21013
  /**
20743
- * Portal element rendered in document.body
21014
+ * Portal element: in document.body, or in the open dialog the popover is in
20744
21015
  */
20745
21016
  this.portalEl = null;
20746
21017
  /**
@@ -20836,6 +21107,26 @@ class PdsPopover {
20836
21107
  break;
20837
21108
  }
20838
21109
  };
21110
+ /** The focus style copied into a shadow root the panel opened in, which `document.head` can't reach. */
21111
+ this.shadowFocusStyle = null;
21112
+ /** The dialog the panel was opened in, closed along with it. */
21113
+ this.watchedDialog = null;
21114
+ this.onDialogClose = () => {
21115
+ this.hide();
21116
+ };
21117
+ /**
21118
+ * Inside a dialog, the panel can sit in a form that wraps the dialog, which a body portal never
21119
+ * did. A submit from the panel (a button in it, or Enter in a field in it) is stopped, so the
21120
+ * panel behaves as it does in the body.
21121
+ */
21122
+ this.handleSubmitFromPanel = (event) => {
21123
+ if (!this.portalEl || !containsComposed$1(event.target, this.portalEl))
21124
+ return;
21125
+ if (containsComposed$1(this.portalEl, event.submitter) || containsComposed$1(this.portalEl, deepActiveElement())) {
21126
+ event.preventDefault();
21127
+ event.stopPropagation();
21128
+ }
21129
+ };
20839
21130
  }
20840
21131
  restorePlacementDefault(newValue) {
20841
21132
  this.placement = restoreReflectedDefault(this.el, 'placement', newValue, 'right');
@@ -20898,19 +21189,23 @@ class PdsPopover {
20898
21189
  (_a = this.triggerEl) === null || _a === void 0 ? void 0 : _a.addEventListener('click', this.handleTriggerClick);
20899
21190
  this.observeTrigger();
20900
21191
  this.linkTriggerToPortal();
20901
- // Still open after a move: the trigger moved, so the portal follows it.
21192
+ // Still open after a move: the trigger moved, so the portal follows it, into the dialog it
21193
+ // is in now, if any.
20902
21194
  if (this.active) {
21195
+ this.placePortal();
20903
21196
  requestAnimationFrame(() => this.handlePopoverPositioning());
20904
21197
  }
20905
21198
  }
20906
21199
  disconnectedCallback() {
20907
21200
  var _a;
20908
21201
  // Moved in one operation (a DOM morph, or a framework reparenting it), the popover is
20909
- // already back in the page. Its portal is in <body>, untouched, so it stays open, with focus
20910
- // where it was.
21202
+ // already back in the page. Its portal is outside the popover, so it stays open, with focus
21203
+ // where it was; connectedCallback moves it to follow the popover.
20911
21204
  if (this.el.isConnected)
20912
21205
  return;
20913
21206
  this.isComponentMounted = false;
21207
+ this.unwatchDialogClose();
21208
+ this.forgetOpen();
20914
21209
  // Open, the content sits in the portal; put it back before the portal goes. Only listeners on
20915
21210
  // the popover itself hear the close event now, but those are the ones mirroring its state.
20916
21211
  if (this.active) {
@@ -20931,6 +21226,7 @@ class PdsPopover {
20931
21226
  // Clean up all event listeners
20932
21227
  this.removeLightDismissListeners();
20933
21228
  this.removeScrollAndResizeListeners();
21229
+ document.removeEventListener('submit', this.handleSubmitFromPanel, true);
20934
21230
  // Clear any pending debounce timers
20935
21231
  this.clearDebounceTimers();
20936
21232
  // Remove portal from DOM
@@ -20975,9 +21271,6 @@ class PdsPopover {
20975
21271
  else {
20976
21272
  this.portalEl.id = `${this.componentId}-portal`;
20977
21273
  }
20978
- // Add accessibility attributes for screen readers
20979
- // Note: Native Popover API doesn't add a specific role, keeping semantic HTML
20980
- this.portalEl.setAttribute('aria-modal', 'false'); // Not a modal, can interact with rest of page
20981
21274
  // Append to body
20982
21275
  document.body.appendChild(this.portalEl);
20983
21276
  // Add global focus styles to match Pine design system
@@ -21061,7 +21354,27 @@ class PdsPopover {
21061
21354
  // Clear tracking array
21062
21355
  this.movedNodes = [];
21063
21356
  }
21357
+ copyFocusStylesInto(root) {
21358
+ var _a, _b, _c;
21359
+ // Outside a shadow root the document's own style applies, so drop a copy left in one.
21360
+ if (!(root instanceof ShadowRoot)) {
21361
+ (_a = this.shadowFocusStyle) === null || _a === void 0 ? void 0 : _a.remove();
21362
+ this.shadowFocusStyle = null;
21363
+ return;
21364
+ }
21365
+ if (((_b = this.shadowFocusStyle) === null || _b === void 0 ? void 0 : _b.parentNode) === root || !this.portalEl)
21366
+ return;
21367
+ const source = document.querySelector(`style[data-pds-popover-focus="${cssEscape(this.portalEl.id)}"]`);
21368
+ if (!source)
21369
+ return;
21370
+ (_c = this.shadowFocusStyle) === null || _c === void 0 ? void 0 : _c.remove();
21371
+ this.shadowFocusStyle = source.cloneNode(true);
21372
+ root.appendChild(this.shadowFocusStyle);
21373
+ }
21064
21374
  removePortal() {
21375
+ var _a;
21376
+ (_a = this.shadowFocusStyle) === null || _a === void 0 ? void 0 : _a.remove();
21377
+ this.shadowFocusStyle = null;
21065
21378
  if (this.portalEl) {
21066
21379
  // Remove the portal element from DOM
21067
21380
  if (this.portalEl.parentNode) {
@@ -21086,9 +21399,13 @@ class PdsPopover {
21086
21399
  // Record open timestamp to prevent immediate close from opening click
21087
21400
  this.openTimestamp = Date.now();
21088
21401
  this.linkTriggerToPortal();
21402
+ this.placePortal();
21089
21403
  // Update portal content with latest slot content
21090
21404
  this.updatePortalContent();
21091
- // Show portal
21405
+ // Show portal. The attribute tells a modal around it that this popover takes Escape first; only
21406
+ // an auto popover listens for Escape.
21407
+ if (this.popoverType === 'auto')
21408
+ this.portalEl.setAttribute('data-pds-popover-open', '');
21092
21409
  this.portalEl.style.display = 'block';
21093
21410
  this.portalEl.style.opacity = '1';
21094
21411
  this.portalEl.style.visibility = 'visible';
@@ -21100,8 +21417,10 @@ class PdsPopover {
21100
21417
  });
21101
21418
  // Add scroll and resize listeners for repositioning (always)
21102
21419
  this.addScrollAndResizeListeners();
21420
+ document.addEventListener('submit', this.handleSubmitFromPanel, true);
21103
21421
  // Add document listeners for light dismiss and escape key (auto type only)
21104
21422
  if (this.popoverType === 'auto') {
21423
+ openAutoPopovers.push(this);
21105
21424
  this.addLightDismissListeners();
21106
21425
  }
21107
21426
  // Emit open event
@@ -21117,12 +21436,16 @@ class PdsPopover {
21117
21436
  if (!this.active || !this.portalEl)
21118
21437
  return;
21119
21438
  this.active = false;
21120
- // Restoring the content drops its focus to the body, so check where focus is first.
21121
- const focusWasInside = this.portalEl.contains(document.activeElement);
21439
+ this.unwatchDialogClose();
21440
+ // Restoring the content drops its focus to the body, so check where focus is first. In a
21441
+ // shadow root, document.activeElement is only its host.
21442
+ const focusWasInside = containsComposed$1(this.portalEl, deepActiveElement());
21122
21443
  this.linkTriggerToPortal();
21123
21444
  // Restore content back to original slot positions
21124
21445
  this.restorePortalContent();
21125
- // Hide portal
21446
+ // Hide portal. The dark-mode border set in a shadow root is worked out again on the next open.
21447
+ this.portalEl.style.border = '';
21448
+ this.portalEl.removeAttribute('data-pds-popover-open');
21126
21449
  this.portalEl.style.display = 'none';
21127
21450
  this.portalEl.style.opacity = '0';
21128
21451
  this.portalEl.style.visibility = 'hidden';
@@ -21132,8 +21455,10 @@ class PdsPopover {
21132
21455
  this.returnFocusToTrigger();
21133
21456
  }
21134
21457
  // Remove all listeners
21458
+ this.forgetOpen();
21135
21459
  this.removeLightDismissListeners();
21136
21460
  this.removeScrollAndResizeListeners();
21461
+ document.removeEventListener('submit', this.handleSubmitFromPanel, true);
21137
21462
  // Clear any pending timers
21138
21463
  this.clearDebounceTimers();
21139
21464
  // Emit close event
@@ -21153,6 +21478,59 @@ class PdsPopover {
21153
21478
  this.show();
21154
21479
  }
21155
21480
  }
21481
+ /**
21482
+ * Puts the panel where it shows above everything around the popover. In an open dialog, it goes
21483
+ * inside it: a modal dialog sits in the top layer above the body and makes the rest of the page
21484
+ * inert, and a non-modal one sits above it by z-index. Right after the popover, it's next in the
21485
+ * Tab order. In another component's slot, though, it would have no slot to render in, and in a
21486
+ * form its buttons would submit it, so there it goes at the end of the dialog.
21487
+ */
21488
+ placePortal() {
21489
+ var _a, _b;
21490
+ if (!this.portalEl)
21491
+ return;
21492
+ const dialog = closest$1('dialog[open]', this.el);
21493
+ if (!dialog) {
21494
+ this.unwatchDialogClose();
21495
+ this.portalEl.style.border = '';
21496
+ if (this.portalEl.parentElement !== document.body)
21497
+ document.body.appendChild(this.portalEl);
21498
+ this.copyFocusStylesInto(document);
21499
+ return;
21500
+ }
21501
+ const form = closest$1('form', this.el);
21502
+ const besidePopover = !((_a = this.el.parentElement) === null || _a === void 0 ? void 0 : _a.shadowRoot) && !(form && containsComposed$1(dialog, form));
21503
+ if (besidePopover) {
21504
+ if (this.el.nextElementSibling !== this.portalEl)
21505
+ (_b = this.el.parentNode) === null || _b === void 0 ? void 0 : _b.insertBefore(this.portalEl, this.el.nextSibling);
21506
+ }
21507
+ else if (this.portalEl.parentNode !== dialog) {
21508
+ dialog.appendChild(this.portalEl);
21509
+ }
21510
+ this.watchDialogClose(dialog);
21511
+ const root = this.portalEl.getRootNode();
21512
+ this.copyFocusStylesInto(root);
21513
+ // In a shadow root, the copied dark-mode rule can't see a [data-theme="dark"] on the page.
21514
+ this.portalEl.style.border = root instanceof ShadowRoot && closest$1('[data-theme="dark"]', this.el) ? 'var(--pine-border)' : '';
21515
+ }
21516
+ forgetOpen() {
21517
+ const index = openAutoPopovers.indexOf(this);
21518
+ if (index >= 0)
21519
+ openAutoPopovers.splice(index, 1);
21520
+ }
21521
+ /**
21522
+ * Whether an Escape is this popover's. One from a dialog the popover isn't in belongs to that
21523
+ * dialog when it's above it: a top-layer dialog or a pds-modal. A plain non-modal dialog inside
21524
+ * the popover's modal doesn't close on Escape, so the popover takes it.
21525
+ */
21526
+ takesEscapeFrom(event) {
21527
+ var _a, _b;
21528
+ const origin = ((_b = (_a = event.composedPath) === null || _a === void 0 ? void 0 : _a.call(event)[0]) !== null && _b !== void 0 ? _b : event.target);
21529
+ const dialog = closest$1('dialog[open]', origin);
21530
+ if (!dialog || containsComposed$1(dialog, this.portalEl))
21531
+ return true;
21532
+ return !(dialog.classList.contains('pds-modal__backdrop') || dialog.matches(':modal'));
21533
+ }
21156
21534
  /**
21157
21535
  * Adds light dismiss listeners (click outside and escape key)
21158
21536
  */
@@ -21161,6 +21539,19 @@ class PdsPopover {
21161
21539
  document.addEventListener('click', this.boundClickOutsideHandler, true);
21162
21540
  document.addEventListener('keydown', this.boundEscapeKeyHandler);
21163
21541
  }
21542
+ /** Closes the popover when the dialog it opened in closes, so it isn't left open inside. */
21543
+ watchDialogClose(dialog) {
21544
+ if (this.watchedDialog === dialog)
21545
+ return;
21546
+ this.unwatchDialogClose();
21547
+ this.watchedDialog = dialog;
21548
+ dialog.addEventListener('close', this.onDialogClose);
21549
+ }
21550
+ unwatchDialogClose() {
21551
+ var _a;
21552
+ (_a = this.watchedDialog) === null || _a === void 0 ? void 0 : _a.removeEventListener('close', this.onDialogClose);
21553
+ this.watchedDialog = null;
21554
+ }
21164
21555
  /**
21165
21556
  * Removes light dismiss listeners
21166
21557
  */
@@ -21186,7 +21577,7 @@ class PdsPopover {
21186
21577
  * Handles clicks outside the popover for light dismiss (auto type only)
21187
21578
  */
21188
21579
  handleClickOutside(event) {
21189
- var _a, _b, _c, _d;
21580
+ var _a, _b;
21190
21581
  // Ignore events that occurred at or before the popover opened
21191
21582
  // This prevents the opening click from immediately closing the popover
21192
21583
  // Convert event.timeStamp (DOMHighResTimeStamp from performance.now()) to epoch time
@@ -21197,16 +21588,18 @@ class PdsPopover {
21197
21588
  if (eventTime <= this.openTimestamp) {
21198
21589
  return;
21199
21590
  }
21200
- const target = event.target;
21591
+ // In a shadow root, event.target is only its host.
21592
+ const target = ((_b = (_a = event.composedPath) === null || _a === void 0 ? void 0 : _a.call(event)[0]) !== null && _b !== void 0 ? _b : event.target);
21201
21593
  // A datepicker's calendar is portaled to the body: a click in the calendar of a datepicker
21202
- // inside this popover, in its content or its trigger, isn't outside it.
21203
- const calendar = (_b = (_a = target).closest) === null || _b === void 0 ? void 0 : _b.call(_a, '.pds-datepicker-calendar-portal');
21594
+ // inside this popover, in its content or its trigger, isn't outside it. The target can be
21595
+ // inside the calendar's shadow root, so look up across it.
21596
+ const calendar = closest$1('.pds-datepicker-calendar-portal', target);
21204
21597
  const owner = calendar === null || calendar === void 0 ? void 0 : calendar.pdsDatepicker;
21205
21598
  if (owner && (containsComposed$1(this.portalEl, owner) || containsComposed$1(this.triggerEl, owner)))
21206
21599
  return;
21207
21600
  // Check if click is outside both the popover portal and the trigger
21208
- const clickedInsidePopover = (_c = this.portalEl) === null || _c === void 0 ? void 0 : _c.contains(target);
21209
- const clickedInsideTrigger = (_d = this.triggerEl) === null || _d === void 0 ? void 0 : _d.contains(target);
21601
+ const clickedInsidePopover = containsComposed$1(this.portalEl, target);
21602
+ const clickedInsideTrigger = containsComposed$1(this.triggerEl, target);
21210
21603
  if (!clickedInsidePopover && !clickedInsideTrigger) {
21211
21604
  this.hide();
21212
21605
  }
@@ -21227,14 +21620,19 @@ class PdsPopover {
21227
21620
  * Mirrors native Popover API: Escape closes and returns focus to trigger
21228
21621
  */
21229
21622
  handleEscapeKey(event) {
21230
- if (event.key === 'Escape') {
21231
- // Prevent default Escape behavior and stop propagation
21232
- // This mirrors native Popover API which handles Escape exclusively
21233
- event.preventDefault();
21234
- event.stopPropagation();
21235
- // Close popover and return focus to trigger
21236
- this.hide();
21237
- }
21623
+ // A control inside that closes on Escape (a datepicker, a combobox) has handled it already.
21624
+ if (event.key !== 'Escape' || event.defaultPrevented)
21625
+ return;
21626
+ // Like the native Popover API, Escape closes only the top popover: the last one opened that
21627
+ // it applies to. Every open popover hears it, so each checks whether it's that one.
21628
+ const top = [...openAutoPopovers].reverse().find(popover => popover.takesEscapeFrom(event));
21629
+ if (top !== this)
21630
+ return;
21631
+ // Take the key, so the dialog or modal around it doesn't close too.
21632
+ event.preventDefault();
21633
+ event.stopPropagation();
21634
+ // Close popover and return focus to trigger
21635
+ this.hide();
21238
21636
  }
21239
21637
  /**
21240
21638
  * Handles scroll events to reposition the popover (debounced for performance)
@@ -21339,13 +21737,20 @@ class PdsPopover {
21339
21737
  }
21340
21738
  this.portalEl.style.top = `${top}px`;
21341
21739
  this.portalEl.style.left = `${left}px`;
21740
+ // `position: fixed` measures from the viewport unless an ancestor becomes its containing block,
21741
+ // as a modal dialog does with its backdrop filter. Shift by however far it landed from the spot.
21742
+ const placed = this.portalEl.getBoundingClientRect();
21743
+ if (Math.abs(placed.top - top) > 0.5 || Math.abs(placed.left - left) > 0.5) {
21744
+ this.portalEl.style.top = `${2 * top - placed.top}px`;
21745
+ this.portalEl.style.left = `${2 * left - placed.left}px`;
21746
+ }
21342
21747
  // Reset the repositioning guard after a short delay
21343
21748
  setTimeout(() => {
21344
21749
  this.isRepositioning = false;
21345
21750
  }, 16); // ~1 frame at 60fps
21346
21751
  }
21347
21752
  render() {
21348
- return (hAsync(Host, { key: 'd804db8c73e0dc2acf0d1bbca20edb77993ff7fd', id: this.componentId }, hAsync("span", { key: '5408d1856c9b13b327ea13b43cffc23af925a82f', class: "pds-popover__trigger-wrapper" }, hAsync("slot", { key: '9d0ff01292c67bdaa88d49114162c3c65ff8a20d', name: "trigger", onSlotchange: this.handleTriggerSlotChange })), hAsync("div", { key: 'cdd38016453ea1838d5718fb8e190cd4304ac8cc', class: "pds-popover__content-slot-wrapper" }, hAsync("slot", { key: '9faf60d7be7a2ff3c5fe6c3e4de374bafadf848a', onSlotchange: this.handleContentSlotChange }))));
21753
+ return (hAsync(Host, { key: 'da8a0c715df1199231b1265085f3f9ae0234032d', id: this.componentId }, hAsync("span", { key: 'f35023492399420829cec2e88556462f5ac1663e', class: "pds-popover__trigger-wrapper" }, hAsync("slot", { key: '38ebe92eebb87665467b3f92ff94dc8095450063', name: "trigger", onSlotchange: this.handleTriggerSlotChange })), hAsync("div", { key: '8917930f4520544d14bbd68b4c7936dd60af19e3', class: "pds-popover__content-slot-wrapper" }, hAsync("slot", { key: '28d3f9112256edd95721a79a7072a9e35a3712bf', onSlotchange: this.handleContentSlotChange }))));
21349
21754
  }
21350
21755
  get el() { return getElement(this); }
21351
21756
  static get watchers() { return {
@@ -21463,7 +21868,7 @@ class PdsProperty {
21463
21868
 
21464
21869
  const labelCss$3 = () => `.sc-pds-radio-h{display:inline-block}[aria-disabled=true].sc-pds-radio-h label.sc-pds-radio{color:var(--pine-color-text-label-disabled)}[aria-readonly=true].sc-pds-radio-h label.sc-pds-radio{color:var(--pine-color-text-label-readonly)}label.sc-pds-radio{color:var(--pine-color-text-label);font:var(--pine-typography-body-medium);letter-spacing:var(--pine-letter-spacing)}`;
21465
21870
 
21466
- const pdsRadioCss = () => `.sc-pds-radio-h{--sizing-check-size:6px;--sizing-input-size:var(--pine-dimension-sm);--sizing-margin-block-start:6px;-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-flow:row wrap;flex-flow:row wrap;position:relative}.is-invalid.sc-pds-radio-h .pds-radio__message--error.sc-pds-radio{color:var(--pine-color-text-message-danger)}.has-border.sc-pds-radio-h{-ms-flex-align:start;align-items:flex-start;border:var(--pine-border);border-radius:var(--pine-dimension-125);-webkit-column-gap:var(--pine-dimension-xs);-moz-column-gap:var(--pine-dimension-xs);column-gap:var(--pine-dimension-xs);display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-direction:column;flex-direction:column;padding:var(--pine-dimension-md)}@media (max-width: 767px){.has-border.sc-pds-radio-h{-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex:1 1 100%;flex:1 1 100%;max-width:100%;min-width:0}}.has-border.sc-pds-radio-h:hover{border:var(--pine-border-hover)}.has-border.sc-pds-radio-h:has(input:checked){-webkit-box-shadow:0 0 0 2px var(--pine-color-primary-hover);box-shadow:0 0 0 2px var(--pine-color-primary-hover)}.has-border.sc-pds-radio-h label.sc-pds-radio{color:var(--pine-color-text);font-weight:var(--pine-font-weight-semi-bold)}.has-border.sc-pds-radio-h label.sc-pds-radio::after{content:"";cursor:pointer;height:100%;left:0;position:absolute;top:0;width:100%;z-index:1}.has-border.sc-pds-radio-h:has(input:disabled){background:var(--pine-color-background-container-disabled);border-color:var(--pine-color-border-disabled);cursor:not-allowed}.has-border.sc-pds-radio-h:has(input:disabled) label.sc-pds-radio{color:var(--pine-color-text-label-disabled);cursor:not-allowed}.has-border.sc-pds-radio-h:has(input:disabled) label.sc-pds-radio::after{cursor:not-allowed}.has-border.is-invalid.sc-pds-radio-h .pds-radio__message--error.sc-pds-radio{color:var(--pine-color-text-message-danger)}input.sc-pds-radio{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--pine-color-background-container);border:var(--pine-border);border-radius:var(--pine-border-radius-full);-ms-flex:none;flex:none;height:var(--sizing-input-size);margin:0;-webkit-margin-before:var(--pine-dimension-025);margin-block-start:var(--pine-dimension-025);position:relative;width:var(--sizing-input-size)}input.visually-hidden.sc-pds-radio{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}input.sc-pds-radio:hover{background:var(--pine-color-background-container-hover);border:var(--pine-border-hover)}input.sc-pds-radio:checked{background:var(--pine-color-accent);border-color:var(--pine-color-accent)}input.sc-pds-radio:checked:hover{background:var(--pine-color-accent-hover);border-color:var(--pine-color-accent-hover)}input.sc-pds-radio:checked::after{background:var(--pine-color-text-primary);border-radius:var(--pine-border-radius-full);content:"";display:block;height:var(--sizing-check-size);left:50%;position:absolute;top:50%;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);width:var(--sizing-check-size)}input.sc-pds-radio:disabled{background:var(--pine-color-background-container-disabled);border-color:var(--pine-color-border-disabled);cursor:not-allowed}input.sc-pds-radio:disabled:checked{background-color:var(--pine-color-accent-disabled);border-color:var(--pine-color-border-disabled)}input.sc-pds-radio:disabled:checked::after{border-color:var(--pine-color-border-disabled)}input.sc-pds-radio:focus-visible{outline:var(--pine-outline-focus)}label.sc-pds-radio{display:-ms-flexbox;display:flex;gap:var(--pine-dimension-xs)}label.sc-pds-radio:has(input:disabled){color:var(--pine-color-text-label-disabled);cursor:not-allowed}.sc-pds-radio-h:has(input:disabled) .pds-radio__message.sc-pds-radio{color:var(--pine-color-text-label-disabled)}.visually-hidden.sc-pds-radio{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-radio__message.sc-pds-radio{color:var(--pine-color-text-message);-ms-flex-preferred-size:100%;flex-basis:100%;font:var(--pine-typography-body);-webkit-margin-start:var(--pine-dimension-md);margin-inline-start:var(--pine-dimension-md);width:100%}.pds-radio__message--error.sc-pds-radio{display:-ms-flexbox;display:flex;gap:var(--pine-dimension-2xs)}.pds-radio__message--error.sc-pds-radio pds-icon.sc-pds-radio{-webkit-margin-before:var(--pine-dimension-025);margin-block-start:var(--pine-dimension-025)}.has-image.sc-pds-radio-h{-ms-flex-align:center;align-items:center;border:var(--pine-border);border-radius:var(--pine-dimension-125);-webkit-column-gap:var(--pine-dimension-xs);-moz-column-gap:var(--pine-dimension-xs);column-gap:var(--pine-dimension-xs);display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;padding:var(--pine-dimension-md)}@media (max-width: 767px){.has-image.sc-pds-radio-h{-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex:1 1 100%;flex:1 1 100%;max-width:100%;min-width:0}}.has-image.sc-pds-radio-h:hover{border:var(--pine-border-hover)}.has-image.sc-pds-radio-h:has(input:checked){-webkit-box-shadow:0 0 0 2px var(--pine-color-primary-hover);box-shadow:0 0 0 2px var(--pine-color-primary-hover)}.has-image.sc-pds-radio-h label.sc-pds-radio{color:var(--pine-color-text);display:-ms-flexbox;display:flex;font-weight:var(--pine-font-weight-semi-bold);gap:var(--pine-dimension-xs)}.has-image.sc-pds-radio-h label.sc-pds-radio::after{content:"";cursor:pointer;height:100%;left:0;position:absolute;top:0;width:100%;z-index:1}.has-image.sc-pds-radio-h .pds-radio__image-container.sc-pds-radio{-ms-flex-align:center;align-items:center;align-self:center;border:var(--pine-border);border-radius:var(--pine-border-radius-full);cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex:none;flex:none;grid-area:image;-ms-flex-pack:center;justify-content:center;overflow:hidden;position:relative;-webkit-transition:all var(--pine-motion-duration-base) ease;transition:all var(--pine-motion-duration-base) ease}.has-image.sc-pds-radio-h .pds-radio__image-container.sc-pds-radio:hover{border-color:var(--pine-color-border-hover)}.has-image.sc-pds-radio-h .pds-radio__image-container.sc-pds-radio .pds-radio__image.sc-pds-radio{height:100%;-o-object-fit:cover;object-fit:cover;width:100%}.has-image.sc-pds-radio-h .pds-radio__message.sc-pds-radio{grid-area:message;-webkit-margin-before:0;margin-block-start:0;-webkit-margin-start:0;margin-inline-start:0}.has-image.is-disabled.sc-pds-radio-h{background:var(--pine-color-background-container-disabled);border-color:var(--pine-color-border-disabled);cursor:not-allowed}.has-image.is-disabled.sc-pds-radio-h .pds-radio__image-container.sc-pds-radio{border-color:var(--pine-color-border-disabled);cursor:not-allowed;opacity:0.5}.has-image.is-disabled.sc-pds-radio-h .pds-radio__image-container.sc-pds-radio:hover{border-color:var(--pine-color-border-disabled)}.has-image.is-disabled.sc-pds-radio-h label.sc-pds-radio{color:var(--pine-color-text-label-disabled);cursor:not-allowed}.has-image.is-disabled.sc-pds-radio-h label.sc-pds-radio::after{cursor:not-allowed}.has-image.is-disabled.sc-pds-radio-h .pds-radio__message.sc-pds-radio{color:var(--pine-color-text-label-disabled)}.has-image.is-invalid.sc-pds-radio-h .pds-radio__message--error.sc-pds-radio{color:var(--pine-color-text-message-danger)}`;
21871
+ const pdsRadioCss = () => `.sc-pds-radio-h{--sizing-check-size:6px;--sizing-input-size:var(--pine-dimension-sm);--sizing-margin-block-start:6px;-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-flow:row wrap;flex-flow:row wrap;position:relative}.is-invalid.sc-pds-radio-h .pds-radio__message--error.sc-pds-radio{color:var(--pine-color-text-message-danger)}.has-border.sc-pds-radio-h{-ms-flex-align:start;align-items:flex-start;border:var(--pine-border);border-radius:var(--pine-dimension-125);-webkit-column-gap:var(--pine-dimension-xs);-moz-column-gap:var(--pine-dimension-xs);column-gap:var(--pine-dimension-xs);display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-direction:column;flex-direction:column;padding:var(--pine-dimension-md)}@media (max-width: 767px){.has-border.sc-pds-radio-h{-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex:1 1 100%;flex:1 1 100%;max-width:100%;min-width:0}}.has-border.sc-pds-radio-h:hover{border:var(--pine-border-hover)}.has-border.sc-pds-radio-h:has(input:checked){-webkit-box-shadow:0 0 0 2px var(--pine-color-primary-hover);box-shadow:0 0 0 2px var(--pine-color-primary-hover)}.has-border.sc-pds-radio-h label.sc-pds-radio{color:var(--pine-color-text);font-weight:var(--pine-font-weight-semi-bold)}.has-border.sc-pds-radio-h label.sc-pds-radio::after{content:"";cursor:pointer;height:100%;left:0;position:absolute;top:0;width:100%;z-index:1}.has-border.sc-pds-radio-h:has(input:disabled){background:var(--pine-color-background-container-disabled);border-color:var(--pine-color-border-disabled);cursor:not-allowed}.has-border.sc-pds-radio-h:has(input:disabled) label.sc-pds-radio{color:var(--pine-color-text-label-disabled);cursor:not-allowed}.has-border.sc-pds-radio-h:has(input:disabled) label.sc-pds-radio::after{cursor:not-allowed}.has-border.is-invalid.sc-pds-radio-h .pds-radio__message--error.sc-pds-radio{color:var(--pine-color-text-message-danger)}input.sc-pds-radio{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--pine-color-background-container);border:var(--pine-border);border-radius:var(--pine-border-radius-full);-ms-flex:none;flex:none;height:var(--sizing-input-size);margin:0;-webkit-margin-before:var(--pine-dimension-025);margin-block-start:var(--pine-dimension-025);position:relative;width:var(--sizing-input-size)}input.visually-hidden.sc-pds-radio{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}input.sc-pds-radio:hover{background:var(--pine-color-background-container-hover);border:var(--pine-border-hover)}input.sc-pds-radio:checked{background:var(--pine-color-accent);border-color:var(--pine-color-accent)}input.sc-pds-radio:checked:hover{background:var(--pine-color-accent-hover);border-color:var(--pine-color-accent-hover)}input.sc-pds-radio:checked::after{background:var(--pine-color-text-primary);border-radius:var(--pine-border-radius-full);content:"";display:block;height:var(--sizing-check-size);left:50%;position:absolute;top:50%;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);width:var(--sizing-check-size)}input.sc-pds-radio:disabled{background:var(--pine-color-background-container-disabled);border-color:var(--pine-color-border-disabled);cursor:not-allowed}input.sc-pds-radio:disabled:checked{background-color:var(--pine-color-accent-disabled);border-color:var(--pine-color-border-disabled)}input.sc-pds-radio:disabled:checked::after{border-color:var(--pine-color-border-disabled)}input.sc-pds-radio:focus-visible{outline:var(--pine-outline-focus)}label.sc-pds-radio{display:-ms-flexbox;display:flex;gap:var(--pine-dimension-xs)}label.sc-pds-radio:has(input:disabled){color:var(--pine-color-text-label-disabled);cursor:not-allowed}.sc-pds-radio-h:has(input:disabled) .pds-radio__message.sc-pds-radio{color:var(--pine-color-text-label-disabled)}.visually-hidden.sc-pds-radio{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-radio__message.sc-pds-radio{color:var(--pine-color-text-message);-ms-flex-preferred-size:100%;flex-basis:100%;font:var(--pine-typography-body);-webkit-margin-start:var(--pine-dimension-md);margin-inline-start:var(--pine-dimension-md);width:100%}.pds-radio__message--error.sc-pds-radio{display:-ms-flexbox;display:flex;gap:var(--pine-dimension-2xs)}.pds-radio__message--error.sc-pds-radio pds-icon.sc-pds-radio{-webkit-margin-before:var(--pine-dimension-025);margin-block-start:var(--pine-dimension-025)}.has-image.sc-pds-radio-h{-ms-flex-align:center;align-items:center;border:var(--pine-border);border-radius:var(--pine-dimension-125);-webkit-column-gap:var(--pine-dimension-xs);-moz-column-gap:var(--pine-dimension-xs);column-gap:var(--pine-dimension-xs);display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-direction:row;flex-direction:row;padding:var(--pine-dimension-md)}@media (max-width: 767px){.has-image.sc-pds-radio-h{-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex:1 1 100%;flex:1 1 100%;max-width:100%;min-width:0}}.has-image.sc-pds-radio-h:hover{border:var(--pine-border-hover)}.has-image.sc-pds-radio-h:has(input:checked){-webkit-box-shadow:0 0 0 2px var(--pine-color-primary-hover);box-shadow:0 0 0 2px var(--pine-color-primary-hover)}.has-image.sc-pds-radio-h label.sc-pds-radio{color:var(--pine-color-text);display:-ms-flexbox;display:flex;font-weight:var(--pine-font-weight-semi-bold);gap:var(--pine-dimension-xs)}.has-image.sc-pds-radio-h label.sc-pds-radio::after{content:"";cursor:pointer;height:100%;left:0;position:absolute;top:0;width:100%;z-index:1}.has-image.sc-pds-radio-h .pds-radio__image-container.sc-pds-radio{-ms-flex-align:center;align-items:center;align-self:center;border:var(--pine-border);border-radius:var(--pine-border-radius-full);cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex:none;flex:none;grid-area:image;-ms-flex-pack:center;justify-content:center;overflow:hidden;position:relative;-webkit-transition:all var(--pine-motion-duration-base) ease;transition:all var(--pine-motion-duration-base) ease}.has-image.sc-pds-radio-h .pds-radio__image-container.sc-pds-radio:hover{border-color:var(--pine-color-border-hover)}.has-image.sc-pds-radio-h .pds-radio__image-container.sc-pds-radio .pds-radio__image.sc-pds-radio{height:100%;-o-object-fit:cover;object-fit:cover;width:100%}.has-image.sc-pds-radio-h .pds-radio__content-wrapper.sc-pds-radio{-ms-flex:1;flex:1;min-width:0;overflow-wrap:anywhere}.has-image.sc-pds-radio-h .pds-radio__message.sc-pds-radio{grid-area:message;-webkit-margin-before:0;margin-block-start:0;-webkit-margin-start:0;margin-inline-start:0}.has-image.is-disabled.sc-pds-radio-h{background:var(--pine-color-background-container-disabled);border-color:var(--pine-color-border-disabled);cursor:not-allowed}.has-image.is-disabled.sc-pds-radio-h .pds-radio__image-container.sc-pds-radio{border-color:var(--pine-color-border-disabled);cursor:not-allowed;opacity:0.5}.has-image.is-disabled.sc-pds-radio-h .pds-radio__image-container.sc-pds-radio:hover{border-color:var(--pine-color-border-disabled)}.has-image.is-disabled.sc-pds-radio-h label.sc-pds-radio{color:var(--pine-color-text-label-disabled);cursor:not-allowed}.has-image.is-disabled.sc-pds-radio-h label.sc-pds-radio::after{cursor:not-allowed}.has-image.is-disabled.sc-pds-radio-h .pds-radio__message.sc-pds-radio{color:var(--pine-color-text-label-disabled)}.has-image.is-invalid.sc-pds-radio-h .pds-radio__message--error.sc-pds-radio{color:var(--pine-color-text-message-danger)}`;
21467
21872
 
21468
21873
  /**
21469
21874
  * @slot image - Custom image content to display instead of the default radio input
@@ -21861,23 +22266,23 @@ class PdsRow {
21861
22266
  }
21862
22267
  render() {
21863
22268
  const rowClasses = `
21864
- ${this.alignItems !== undefined && this.alignItems.trim() !== '' ? `pds-align-items-${this.alignItems}` : ''}
22269
+ ${this.alignItems != null && this.alignItems.trim() !== '' ? `pds-align-items-${this.alignItems}` : ''}
21865
22270
  ${this.border ? 'pds-row--border' : ''}
21866
- ${this.justifyContent !== undefined && this.justifyContent.trim() !== '' ? `pds-justify-content-${this.justifyContent}` : ''}
22271
+ ${this.justifyContent != null && this.justifyContent.trim() !== '' ? `pds-justify-content-${this.justifyContent}` : ''}
21867
22272
  ${this.noWrap ? 'pds-row--no-wrap' : ''}
21868
22273
  `;
21869
22274
  const rowInlineStyles = Object.assign(Object.assign(Object.assign(Object.assign({}, (this.colGap && {
21870
- '--row-gap-x': this.colGap !== undefined && this.colGap.trim() !== '' ? this.colGapMap[this.colGap] : '',
21871
- '--row-gap-y': this.colGap !== undefined && this.colGap.trim() !== '' ? this.colGapMap[this.colGap] : '',
22275
+ '--row-gap-x': this.colGap != null && this.colGap.trim() !== '' ? this.colGapMap[this.colGap] : '',
22276
+ '--row-gap-y': this.colGap != null && this.colGap.trim() !== '' ? this.colGapMap[this.colGap] : '',
21872
22277
  })), (this.colGapBlock && {
21873
- '--row-gap-y': this.colGapBlock !== undefined && this.colGapBlock.trim() !== '' ? this.colGapMap[this.colGapBlock] : '',
22278
+ '--row-gap-y': this.colGapBlock != null && this.colGapBlock.trim() !== '' ? this.colGapMap[this.colGapBlock] : '',
21874
22279
  })), (this.colGapInline && {
21875
- '--row-gap-x': this.colGapInline !== undefined && this.colGapInline.trim() !== '' ? this.colGapMap[this.colGapInline] : '',
22280
+ '--row-gap-x': this.colGapInline != null && this.colGapInline.trim() !== '' ? this.colGapMap[this.colGapInline] : '',
21876
22281
  })), (this.minHeight && {
21877
22282
  'min-height': this.minHeight,
21878
22283
  }));
21879
22284
  this.hostKeeper.record(`pds-row ${rowClasses}`, rowInlineStyles);
21880
- return hAsync(Host, { key: '78a505fef7132f9545916155d2485a6d2df8f4a5', class: `pds-row ${rowClasses}`, style: rowInlineStyles });
22285
+ return hAsync(Host, { key: '452882c1105868f5d392e7cb165311b1abc4a243', class: `pds-row ${rowClasses}`, style: rowInlineStyles });
21881
22286
  }
21882
22287
  get el() { return getElement(this); }
21883
22288
  static get style() { return pdsRowCss(); }
@@ -25098,6 +25503,18 @@ class PdsSwitch {
25098
25503
  this.checked = state === (this.value || 'on');
25099
25504
  }
25100
25505
  }
25506
+ /**
25507
+ * Form Associated Custom Elements API: Called when the form is disabled
25508
+ */
25509
+ formDisabledCallback(disabled) {
25510
+ // Also fires when this element's own `disabled` attribute is merely present, even as the
25511
+ // literal string "false" (a consumer's or React's attribute serialization can write that) —
25512
+ // the platform treats any value as disabled, independent of fieldset state. A real disabled
25513
+ // fieldset ancestor confirms this is genuinely that, not this element's own attribute.
25514
+ if (disabled && !this.el.closest('fieldset[disabled]'))
25515
+ return;
25516
+ this.disabled = disabled;
25517
+ }
25101
25518
  componentWillLoad() {
25102
25519
  this.inheritedAttributes = Object.assign({}, inheritAriaAttributes(this.el));
25103
25520
  this.updateHasLabelSlot();
@@ -25106,9 +25523,9 @@ class PdsSwitch {
25106
25523
  const hostClass = this.switchClassNames();
25107
25524
  const ariaDisabled = this.disabled ? 'true' : null;
25108
25525
  this.hostKeeper.record(hostClass, {}, { 'aria-disabled': ariaDisabled });
25109
- return (hAsync(Host, { key: 'ee8576e523348ff9eed1b6087626849bb0966608', class: hostClass, "aria-disabled": ariaDisabled }, hAsync("label", { key: '09433b5356d718be65f4f2eb61f35fff1d000e10', htmlFor: this.componentId }, hAsync("input", Object.assign({ key: 'f996a0fad56119674cfb7d95e1444bf411b64396', "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: '4b23305d3cc0f5b37b23c6b79a14cfba57c16816', class: this.hideLabel ? 'visually-hidden' : '' }, hAsync("slot", { key: '258b5ccf0d4b01518df3a37772d694cb37569ffa', name: "label", onSlotchange: this.updateHasLabelSlot }), !this.hasLabelSlot && this.label)), this.helperMessage &&
25110
- hAsync("div", { key: 'c8196fa2ce832de3a8c6d987a78fd65d791c4c59', class: `pds-switch__message`, id: messageId(this.componentId, 'helper') }, this.helperMessage), this.errorMessage &&
25111
- hAsync("div", { key: '948894dd2e642689af6cad545a0b31f7c4711d87', class: `pds-switch__message pds-switch__message--error`, id: messageId(this.componentId, 'error'), "aria-live": "assertive" }, hAsync("pds-icon", { key: 'd4b72b49bfd38a396b8f7c0686e1b2ef92d65491', icon: danger, size: "small" }), this.errorMessage)));
25526
+ 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 &&
25527
+ hAsync("div", { key: '64874b15403f1f42344715ac34febdfb8d94042a', class: `pds-switch__message`, id: messageId(this.componentId, 'helper') }, this.helperMessage), this.errorMessage &&
25528
+ hAsync("div", { key: '560ea486859124bb0ac2f75ab4bd34b0bca7efbc', class: `pds-switch__message pds-switch__message--error`, id: messageId(this.componentId, 'error'), "aria-live": "assertive" }, hAsync("pds-icon", { key: 'f49caaba976579eb5588e442499595c7dba7ceff', icon: danger, size: "small" }), this.errorMessage)));
25112
25529
  }
25113
25530
  static get formAssociated() { return true; }
25114
25531
  get el() { return getElement(this); }
@@ -25553,6 +25970,7 @@ class PdsTableCell {
25553
25970
  this.scrollContainer = null;
25554
25971
  this.setupRetries = 0;
25555
25972
  this.truncationCleanup = null;
25973
+ this.hasLoaded = false;
25556
25974
  /**
25557
25975
  * Determines if the table is currently scrolling.
25558
25976
  * @defaultValue false
@@ -25578,8 +25996,23 @@ class PdsTableCell {
25578
25996
  componentWillRender() {
25579
25997
  this.tableRef = this.hostElement.closest('pds-table');
25580
25998
  }
25999
+ // Fires again each time the cell is moved (a sort re-appends every row), unlike componentDidLoad,
26000
+ // so it re-binds what disconnectedCallback tore down. The tooltip binds to the host, which exists before load.
26001
+ connectedCallback() {
26002
+ if (!this.hasLoaded)
26003
+ return;
26004
+ this.tableRef = this.hostElement.closest('pds-table');
26005
+ this.cleanupScrollListener();
26006
+ if (this.needsScrollShadow) {
26007
+ this.setupScrollListener();
26008
+ }
26009
+ if (this.truncate) {
26010
+ this.initTruncationTooltip();
26011
+ }
26012
+ }
25581
26013
  componentDidLoad() {
25582
- if (this.tableRef && this.tableRef.responsive && this.tableRef.fixedColumn) {
26014
+ this.hasLoaded = true;
26015
+ if (this.needsScrollShadow) {
25583
26016
  // For responsive tables with fixed columns, set up scroll detection
25584
26017
  // This enables the first column to show a shadow when the table is scrolled horizontally
25585
26018
  this.setupScrollListener();
@@ -25592,6 +26025,10 @@ class PdsTableCell {
25592
26025
  this.cleanupScrollListener();
25593
26026
  this.destroyTruncationTooltip();
25594
26027
  }
26028
+ get needsScrollShadow() {
26029
+ var _a;
26030
+ return Boolean(((_a = this.tableRef) === null || _a === void 0 ? void 0 : _a.responsive) && this.tableRef.fixedColumn);
26031
+ }
25595
26032
  setupScrollListener() {
25596
26033
  var _a;
25597
26034
  if (!this.tableRef)
@@ -25670,11 +26107,11 @@ class PdsTableCell {
25670
26107
  return classNames.join(' ');
25671
26108
  }
25672
26109
  render() {
25673
- return (hAsync(Host, { key: 'bedaeeb5723299656f872a760ed1dd80c7fe8793', class: this.classNames(), role: "gridcell", part: "cell", style: this.tableRef &&
26110
+ return (hAsync(Host, { key: 'de70a1002cc46e204f87349069b86ca43aa2129a', class: this.classNames(), role: "gridcell", part: "cell", style: this.tableRef &&
25674
26111
  this.tableRef.fixedColumn &&
25675
26112
  this.tableRef.selectable
25676
26113
  ? { '--fixed-cell-position': '40px' }
25677
- : {} }, hAsync("slot", { key: '45182ee3e004097660432f552780b3d27671bd46' })));
26114
+ : {} }, hAsync("slot", { key: '5e2b3308291e480323d7a1ac0575035758fb3695' })));
25678
26115
  }
25679
26116
  get hostElement() { return getElement(this); }
25680
26117
  static get watchers() { return {
@@ -26553,9 +26990,10 @@ class PdsText {
26553
26990
  }
26554
26991
  validateSize(newValue) {
26555
26992
  // Skip when the prop is omitted or explicitly cleared (an empty string is a
26556
- // common "unset" sentinel). Any other unsupported value — including a
26993
+ // common "unset" sentinel), or its attribute was removed (Stencil sets the
26994
+ // prop to `null`). Any other unsupported value — including a
26557
26995
  // whitespace-only string — is a developer mistake worth warning about.
26558
- if (newValue === undefined || newValue === '') {
26996
+ if (newValue == null || newValue === '') {
26559
26997
  return;
26560
26998
  }
26561
26999
  if (!TEXT_SIZES.includes(newValue)) {
@@ -26568,6 +27006,13 @@ class PdsText {
26568
27006
  // any attempt to apply an unknown size class. @Watch covers later changes.
26569
27007
  this.validateSize(this.size);
26570
27008
  }
27009
+ // componentDidLoad runs once, so a moved element re-binds here what disconnectedCallback tore
27010
+ // down. Before the first render there's no contentEl yet, and componentDidLoad binds it.
27011
+ connectedCallback() {
27012
+ if (this.truncate && this.contentEl) {
27013
+ this.initTruncationTooltip();
27014
+ }
27015
+ }
26571
27016
  componentDidLoad() {
26572
27017
  if (this.truncate) {
26573
27018
  this.initTruncationTooltip();
@@ -26597,23 +27042,23 @@ class PdsText {
26597
27042
  const Tag = this.tag;
26598
27043
  const typeClasses = `
26599
27044
  pds-text
26600
- ${this.align !== undefined && this.align.trim() !== ''
27045
+ ${this.align != null && this.align.trim() !== ''
26601
27046
  ? `pds-text--align-${this.align}`
26602
27047
  : ''}
26603
- ${this.gutter !== undefined && this.gutter.trim() !== ''
27048
+ ${this.gutter != null && this.gutter.trim() !== ''
26604
27049
  ? `pds-text--gutter-${this.gutter}`
26605
27050
  : ''}
26606
- ${this.size !== undefined && this.size.trim() !== ''
27051
+ ${this.size != null && this.size.trim() !== ''
26607
27052
  ? `pds-text--size-${this.size}`
26608
27053
  : ''}
26609
- ${this.weight !== undefined && this.weight.trim() !== ''
27054
+ ${this.weight != null && this.weight.trim() !== ''
26610
27055
  ? `pds-text--weight-${this.weight}`
26611
27056
  : ''}
26612
- ${this.decoration !== undefined && this.decoration.trim() !== ''
27057
+ ${this.decoration != null && this.decoration.trim() !== ''
26613
27058
  ? `pds-text--decoration-${this.decoration}`
26614
27059
  : ''}
26615
27060
  `;
26616
- return (hAsync(Tag, { key: '6ae89af63963745cd4e8fa734a62f37bc27c59ac', ref: (el) => (this.contentEl = el), style: this.color && setColor(this.color), class: typeClasses, part: "content" }, hAsync("slot", { key: '008f5852aeb4b43cff1a2fea9be9d8fbba9f7934' })));
27061
+ return (hAsync(Tag, { key: '6460288f1d395080a39aec214e55cab87fdaec9f', ref: (el) => (this.contentEl = el), style: this.color && setColor(this.color), class: typeClasses, part: "content" }, hAsync("slot", { key: 'a8be0d96f72d8ee44288d7c8615155dc68d92663' })));
26617
27062
  }
26618
27063
  get el() { return getElement(this); }
26619
27064
  static get watchers() { return {