@pine-ds/core 4.0.0-mercury.0 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1346) hide show
  1. package/components/attributes.js +1 -0
  2. package/components/closest.js +1 -11
  3. package/components/floating-ui.dom.js +1 -0
  4. package/components/form.js +1 -0
  5. package/components/i18n-format.js +1 -0
  6. package/components/index.d.ts +41 -0
  7. package/components/index.js +1 -33
  8. package/components/index2.js +1 -14
  9. package/components/mock-pds-modal.d.ts +11 -0
  10. package/components/mock-pds-modal.js +1 -0
  11. package/components/pds-accordion.js +1 -68
  12. package/components/pds-alert.d.ts +11 -0
  13. package/components/pds-alert.js +1 -0
  14. package/components/pds-avatar.js +1 -103
  15. package/components/pds-box.js +1 -124
  16. package/components/pds-box2.js +1 -0
  17. package/components/pds-button.js +1 -8
  18. package/components/pds-button2.js +1 -84
  19. package/components/pds-checkbox.js +1 -8
  20. package/components/pds-checkbox2.js +1 -101
  21. package/components/pds-chip.js +1 -78
  22. package/components/pds-chip2.js +1 -0
  23. package/components/pds-combobox.d.ts +11 -0
  24. package/components/pds-combobox.js +2 -0
  25. package/components/pds-container.d.ts +11 -0
  26. package/components/pds-container.js +1 -0
  27. package/components/pds-copytext.js +1 -88
  28. package/components/pds-divider.js +1 -54
  29. package/components/pds-dropdown-menu-item.d.ts +11 -0
  30. package/components/pds-dropdown-menu-item.js +1 -0
  31. package/components/pds-dropdown-menu-separator.d.ts +11 -0
  32. package/components/pds-dropdown-menu-separator.js +1 -0
  33. package/components/pds-dropdown-menu.d.ts +11 -0
  34. package/components/pds-dropdown-menu.js +1 -0
  35. package/components/pds-filter.d.ts +11 -0
  36. package/components/pds-filter.js +1 -0
  37. package/components/pds-filters.d.ts +11 -0
  38. package/components/pds-filters.js +1 -0
  39. package/components/pds-icon.js +1 -8
  40. package/components/pds-icon2.js +1 -370
  41. package/components/pds-image.js +1 -55
  42. package/components/pds-input.js +1 -72
  43. package/components/pds-link.js +1 -65
  44. package/components/pds-link2.js +1 -0
  45. package/components/pds-loader.js +1 -68
  46. package/components/pds-loader2.js +1 -0
  47. package/components/pds-modal-content.d.ts +11 -0
  48. package/components/pds-modal-content.js +1 -0
  49. package/components/pds-modal-footer.d.ts +11 -0
  50. package/components/pds-modal-footer.js +1 -0
  51. package/components/pds-modal-header.d.ts +11 -0
  52. package/components/pds-modal-header.js +1 -0
  53. package/components/pds-modal.d.ts +11 -0
  54. package/components/pds-modal.js +1 -0
  55. package/components/pds-multiselect.d.ts +11 -0
  56. package/components/pds-multiselect.js +1 -0
  57. package/components/pds-popover.d.ts +11 -0
  58. package/components/pds-popover.js +1 -0
  59. package/components/pds-progress.js +1 -49
  60. package/components/pds-property.d.ts +11 -0
  61. package/components/pds-property.js +1 -0
  62. package/components/pds-radio-group.d.ts +11 -0
  63. package/components/pds-radio-group.js +1 -0
  64. package/components/pds-radio.js +1 -78
  65. package/components/pds-row.js +1 -72
  66. package/components/pds-select.d.ts +11 -0
  67. package/components/pds-select.js +1 -0
  68. package/components/pds-sortable-item.js +1 -58
  69. package/components/pds-sortable.js +3 -2718
  70. package/components/pds-switch.js +1 -82
  71. package/components/pds-tab.js +1 -53
  72. package/components/pds-table-body.js +1 -36
  73. package/components/pds-table-cell.js +1 -8
  74. package/components/pds-table-cell2.js +1 -72
  75. package/components/pds-table-head-cell.js +1 -8
  76. package/components/pds-table-head-cell2.js +1 -98
  77. package/components/pds-table-head.js +1 -90
  78. package/components/pds-table-row.js +1 -95
  79. package/components/pds-table.js +1 -124
  80. package/components/pds-tabpanel.js +1 -45
  81. package/components/pds-tabs.js +1 -119
  82. package/components/pds-text.d.ts +11 -0
  83. package/components/pds-text.js +1 -0
  84. package/components/pds-text2.js +1 -0
  85. package/components/pds-textarea.js +1 -82
  86. package/components/pds-toast.d.ts +11 -0
  87. package/components/pds-toast.js +1 -0
  88. package/components/pds-tooltip.js +1 -178
  89. package/components/reconnected-content.js +1 -0
  90. package/components/scroll.js +1 -0
  91. package/components/truncation-tooltip.js +1 -0
  92. package/components/utils.js +1 -0
  93. package/dist/cjs/attributes-oNMnBEnP.js +85 -0
  94. package/dist/cjs/closest-BZXvuB_Y.js +11 -0
  95. package/dist/cjs/floating-ui.dom-BZk7Blsu.js +1635 -0
  96. package/dist/cjs/form-MhwfKTuo.js +69 -0
  97. package/dist/cjs/i18n-format-CrpIhahc.js +64 -0
  98. package/dist/cjs/index-BMV0nzMk.js +31 -0
  99. package/dist/cjs/index-CuQil7H0.js +2926 -0
  100. package/dist/cjs/index.cjs.js +0 -4
  101. package/dist/cjs/loader.cjs.js +3 -8
  102. package/dist/cjs/mock-pds-modal.cjs.entry.js +91 -0
  103. package/dist/cjs/pds-accordion.cjs.entry.js +15 -14
  104. package/dist/cjs/pds-alert.cjs.entry.js +74 -0
  105. package/dist/cjs/pds-avatar.cjs.entry.js +92 -25
  106. package/dist/cjs/pds-box.cjs.entry.js +111 -38
  107. package/dist/cjs/pds-button.cjs.entry.js +169 -25
  108. package/dist/cjs/pds-checkbox.cjs.entry.js +66 -26
  109. package/dist/cjs/pds-chip.cjs.entry.js +157 -23
  110. package/dist/cjs/pds-combobox.cjs.entry.js +2905 -0
  111. package/dist/cjs/pds-container.cjs.entry.js +36 -0
  112. package/dist/cjs/pds-copytext.cjs.entry.js +72 -17
  113. package/dist/cjs/pds-divider.cjs.entry.js +15 -11
  114. package/dist/cjs/pds-dropdown-menu-item.cjs.entry.js +85 -0
  115. package/dist/cjs/pds-dropdown-menu-separator.cjs.entry.js +22 -0
  116. package/dist/cjs/pds-dropdown-menu.cjs.entry.js +318 -0
  117. package/dist/cjs/pds-filter.cjs.entry.js +489 -0
  118. package/dist/cjs/pds-filters.cjs.entry.js +17 -0
  119. package/dist/cjs/pds-icon.cjs.entry.js +273 -40
  120. package/dist/cjs/pds-image.cjs.entry.js +15 -16
  121. package/dist/cjs/pds-input.cjs.entry.js +296 -26
  122. package/dist/cjs/pds-link.cjs.entry.js +41 -13
  123. package/dist/cjs/pds-loader.cjs.entry.js +21 -14
  124. package/dist/cjs/pds-modal-content.cjs.entry.js +196 -0
  125. package/dist/cjs/pds-modal-footer.cjs.entry.js +23 -0
  126. package/dist/cjs/pds-modal-header.cjs.entry.js +23 -0
  127. package/dist/cjs/pds-modal.cjs.entry.js +297 -0
  128. package/dist/cjs/pds-multiselect.cjs.entry.js +1068 -0
  129. package/dist/cjs/pds-popover.cjs.entry.js +571 -0
  130. package/dist/cjs/pds-progress.cjs.entry.js +16 -12
  131. package/dist/cjs/pds-property.cjs.entry.js +21 -0
  132. package/dist/cjs/pds-radio-group.cjs.entry.js +193 -0
  133. package/dist/cjs/pds-radio.cjs.entry.js +79 -23
  134. package/dist/cjs/pds-row.cjs.entry.js +35 -17
  135. package/dist/cjs/pds-select.cjs.entry.js +256 -0
  136. package/dist/cjs/pds-sortable-item.cjs.entry.js +26 -11
  137. package/dist/cjs/pds-sortable.cjs.entry.js +139 -117
  138. package/dist/cjs/pds-switch.cjs.entry.js +78 -26
  139. package/dist/cjs/pds-tab.cjs.entry.js +66 -16
  140. package/dist/cjs/pds-table-body.cjs.entry.js +4 -9
  141. package/dist/cjs/pds-table-cell.cjs.entry.js +107 -17
  142. package/dist/cjs/pds-table-head-cell.cjs.entry.js +169 -26
  143. package/dist/cjs/pds-table-head.cjs.entry.js +16 -13
  144. package/dist/cjs/pds-table-row.cjs.entry.js +103 -16
  145. package/dist/cjs/pds-table.cjs.entry.js +178 -22
  146. package/dist/cjs/pds-tabpanel.cjs.entry.js +19 -13
  147. package/dist/cjs/pds-tabs.cjs.entry.js +88 -17
  148. package/dist/cjs/pds-text.cjs.entry.js +122 -0
  149. package/dist/cjs/pds-textarea.cjs.entry.js +311 -29
  150. package/dist/cjs/pds-toast.cjs.entry.js +145 -0
  151. package/dist/cjs/pds-tooltip.cjs.entry.js +318 -109
  152. package/dist/cjs/pine-core.cjs.js +7 -10
  153. package/dist/cjs/reconnected-content-CpnEQcTp.js +29 -0
  154. package/dist/cjs/scroll-2XcoE_6Q.js +79 -0
  155. package/dist/cjs/truncation-tooltip-CVzAha5B.js +246 -0
  156. package/dist/cjs/utils-7jx8T2mW.js +76 -0
  157. package/dist/collection/collection-manifest.json +23 -2
  158. package/dist/collection/components/_internal/pds-label/pds-label.js +0 -1
  159. package/dist/collection/components/pds-accordion/pds-accordion.css +24 -29
  160. package/dist/collection/components/pds-accordion/pds-accordion.js +35 -8
  161. package/dist/collection/components/pds-accordion/stories/pds-accordion.stories.js +12 -18
  162. package/dist/collection/components/pds-alert/pds-alert.css +131 -0
  163. package/dist/collection/components/pds-alert/pds-alert.js +255 -0
  164. package/dist/collection/components/pds-alert/pds-alert.tokens.css +85 -0
  165. package/dist/collection/components/pds-alert/stories/pds-alert.stories.js +110 -0
  166. package/dist/collection/components/pds-avatar/pds-avatar.css +56 -23
  167. package/dist/collection/components/pds-avatar/pds-avatar.js +226 -24
  168. package/dist/collection/components/pds-avatar/stories/pds-avatar.stories.js +38 -2
  169. package/dist/collection/components/pds-box/pds-box.css +5435 -263
  170. package/dist/collection/components/pds-box/pds-box.js +2796 -231
  171. package/dist/collection/components/pds-box/stories/pds-box.stories.js +20 -6
  172. package/dist/collection/components/pds-button/pds-button.css +256 -93
  173. package/dist/collection/components/pds-button/pds-button.js +404 -39
  174. package/dist/collection/components/pds-button/stories/pds-button.stories.js +228 -16
  175. package/dist/collection/components/pds-checkbox/checkbox-interface.js +0 -1
  176. package/dist/collection/components/pds-checkbox/pds-checkbox.css +68 -58
  177. package/dist/collection/components/pds-checkbox/pds-checkbox.js +112 -46
  178. package/dist/collection/components/pds-checkbox/stories/pds-checkbox.stories.js +8 -16
  179. package/dist/collection/components/pds-chip/pds-chip.css +185 -114
  180. package/dist/collection/components/pds-chip/pds-chip.js +330 -60
  181. package/dist/collection/components/pds-chip/pds-chip.tokens.css +53 -0
  182. package/dist/collection/components/pds-chip/stories/pds-chip.stories.js +109 -24
  183. package/dist/collection/components/pds-combobox/combobox-interface.js +1 -0
  184. package/dist/collection/components/pds-combobox/pds-combobox.css +499 -0
  185. package/dist/collection/components/pds-combobox/pds-combobox.js +2347 -0
  186. package/dist/collection/components/pds-combobox/stories/pds-combobox.stories.js +485 -0
  187. package/dist/collection/components/pds-container/pds-container.css +26 -0
  188. package/dist/collection/components/pds-container/pds-container.js +111 -0
  189. package/dist/collection/components/pds-container/stories/pds-container.stories.js +89 -0
  190. package/dist/collection/components/pds-copytext/pds-copytext.css +39 -51
  191. package/dist/collection/components/pds-copytext/pds-copytext.js +90 -21
  192. package/dist/collection/components/pds-copytext/stories/pds-copytext.stories.js +6 -12
  193. package/dist/collection/components/pds-divider/pds-divider.css +71 -40
  194. package/dist/collection/components/pds-divider/pds-divider.js +46 -10
  195. package/dist/collection/components/pds-divider/stories/pds-divider.stories.js +7 -2
  196. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.css +76 -0
  197. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.js +291 -0
  198. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-separator/pds-dropdown-menu-separator.css +7 -0
  199. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-separator/pds-dropdown-menu-separator.js +71 -0
  200. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu.css +52 -0
  201. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu.js +394 -0
  202. package/dist/collection/components/pds-dropdown-menu/stories/pds-dropdown-menu.stories.js +38 -0
  203. package/dist/collection/components/pds-filters/pds-filter/filter-interface.js +1 -0
  204. package/dist/collection/components/pds-filters/pds-filter/pds-filter.css +199 -0
  205. package/dist/collection/components/pds-filters/pds-filter/pds-filter.js +739 -0
  206. package/dist/collection/components/pds-filters/pds-filter/stories/pds-filter.stories.js +87 -0
  207. package/dist/collection/components/pds-filters/pds-filters.css +10 -0
  208. package/dist/collection/components/pds-filters/pds-filters.js +44 -0
  209. package/dist/collection/components/pds-filters/stories/pds-filters.stories.js +34 -0
  210. package/dist/collection/components/pds-icon/stories/pds-icon.stories.js +2 -2
  211. package/dist/collection/components/pds-image/pds-image.css +3 -2
  212. package/dist/collection/components/pds-image/pds-image.js +54 -29
  213. package/dist/collection/components/pds-image/stories/pds-image.stories.js +8 -8
  214. package/dist/collection/components/pds-input/input-interface.js +1 -0
  215. package/dist/collection/components/pds-input/pds-input.css +275 -63
  216. package/dist/collection/components/pds-input/pds-input.js +678 -56
  217. package/dist/collection/components/pds-input/pds-input.tokens.css +3 -0
  218. package/dist/collection/components/pds-input/stories/pds-input.stories.js +309 -14
  219. package/dist/collection/components/pds-link/pds-link.css +45 -30
  220. package/dist/collection/components/pds-link/pds-link.js +305 -19
  221. package/dist/collection/components/pds-link/stories/pds-link.stories.js +29 -4
  222. package/dist/collection/components/pds-loader/pds-loader.css +17 -30
  223. package/dist/collection/components/pds-loader/pds-loader.js +31 -11
  224. package/dist/collection/components/pds-loader/stories/pds-loader.stories.js +3 -5
  225. package/dist/collection/components/pds-modal/pds-modal-content/pds-modal-content.css +25 -0
  226. package/dist/collection/components/pds-modal/pds-modal-content/pds-modal-content.js +230 -0
  227. package/dist/collection/components/pds-modal/pds-modal-footer/pds-modal-footer.css +8 -0
  228. package/dist/collection/components/pds-modal/pds-modal-footer/pds-modal-footer.js +23 -0
  229. package/dist/collection/components/pds-modal/pds-modal-header/pds-modal-header.css +8 -0
  230. package/dist/collection/components/pds-modal/pds-modal-header/pds-modal-header.js +23 -0
  231. package/dist/collection/components/pds-modal/pds-modal.css +122 -0
  232. package/dist/collection/components/pds-modal/pds-modal.js +516 -0
  233. package/dist/collection/components/pds-modal/stories/pds-modal.stories.js +731 -0
  234. package/dist/collection/components/pds-modal/test/mock-pds-modal.js +286 -0
  235. package/dist/collection/components/pds-multiselect/multiselect-interface.js +1 -0
  236. package/dist/collection/components/pds-multiselect/pds-multiselect.css +324 -0
  237. package/dist/collection/components/pds-multiselect/pds-multiselect.js +2153 -0
  238. package/dist/collection/components/pds-multiselect/stories/pds-multiselect.stories.js +731 -0
  239. package/dist/collection/components/pds-popover/pds-popover.css +10 -0
  240. package/dist/collection/components/pds-popover/pds-popover.js +802 -0
  241. package/dist/collection/components/pds-popover/popover-interface.js +1 -0
  242. package/dist/collection/components/pds-popover/stories/pds-popover.stories.js +86 -0
  243. package/dist/collection/components/pds-progress/pds-progress.css +11 -24
  244. package/dist/collection/components/pds-progress/pds-progress.js +34 -14
  245. package/dist/collection/components/pds-progress/stories/pds-progress.stories.js +2 -4
  246. package/dist/collection/components/pds-property/pds-property.css +4 -0
  247. package/dist/collection/components/pds-property/pds-property.js +70 -0
  248. package/dist/collection/components/pds-property/stories/pds-property.stories.js +16 -0
  249. package/dist/collection/components/pds-radio/pds-radio.css +219 -54
  250. package/dist/collection/components/pds-radio/pds-radio.js +179 -51
  251. package/dist/collection/components/pds-radio/stories/pds-radio.stories.js +47 -15
  252. package/dist/collection/components/pds-radio-group/pds-radio-group.css +45 -0
  253. package/dist/collection/components/pds-radio-group/pds-radio-group.js +447 -0
  254. package/dist/collection/components/pds-radio-group/radio-group-interface.js +1 -0
  255. package/dist/collection/components/pds-radio-group/stories/pds-radio-group.stories.js +134 -0
  256. package/dist/collection/components/pds-row/pds-row.css +10 -9
  257. package/dist/collection/components/pds-row/pds-row.js +115 -26
  258. package/dist/collection/components/pds-row/stories/pds-row.stories.js +16 -14
  259. package/dist/collection/components/pds-select/pds-select.css +168 -0
  260. package/dist/collection/components/pds-select/pds-select.js +602 -0
  261. package/dist/collection/components/pds-select/pds-select.tokens.css +3 -0
  262. package/dist/collection/components/pds-select/stories/pds-select.stories.js +205 -0
  263. package/dist/collection/components/pds-sortable/pds-sortable-item/pds-sortable-item.css +26 -26
  264. package/dist/collection/components/pds-sortable/pds-sortable-item/pds-sortable-item.js +32 -7
  265. package/dist/collection/components/pds-sortable/pds-sortable-item/stories/pds-sortable-item.stories.js +0 -2
  266. package/dist/collection/components/pds-sortable/pds-sortable.css +2 -4
  267. package/dist/collection/components/pds-sortable/pds-sortable.js +77 -12
  268. package/dist/collection/components/pds-sortable/sortable-interface.js +0 -1
  269. package/dist/collection/components/pds-sortable/stories/pds-sortable.stories.js +22 -13
  270. package/dist/collection/components/pds-switch/pds-switch.css +56 -58
  271. package/dist/collection/components/pds-switch/pds-switch.js +142 -70
  272. package/dist/collection/components/pds-switch/stories/pds-switch.stories.js +11 -28
  273. package/dist/collection/components/pds-table/pds-table-body/pds-table-body.js +1 -2
  274. package/dist/collection/components/pds-table/pds-table-cell/pds-table-cell.css +36 -19
  275. package/dist/collection/components/pds-table/pds-table-cell/pds-table-cell.js +128 -13
  276. package/dist/collection/components/pds-table/pds-table-cell/stories/pds-table-cell.stories.js +22 -7
  277. package/dist/collection/components/pds-table/pds-table-head/pds-table-head.css +22 -5
  278. package/dist/collection/components/pds-table/pds-table-head/pds-table-head.js +71 -11
  279. package/dist/collection/components/pds-table/pds-table-head-cell/pds-table-head-cell.css +46 -25
  280. package/dist/collection/components/pds-table/pds-table-head-cell/pds-table-head-cell.js +236 -20
  281. package/dist/collection/components/pds-table/pds-table-head-cell/stories/pds-table-head-cell.stories.js +12 -7
  282. package/dist/collection/components/pds-table/pds-table-row/pds-table-row.css +14 -5
  283. package/dist/collection/components/pds-table/pds-table-row/pds-table-row.js +114 -13
  284. package/dist/collection/components/pds-table/pds-table-row/stories/pds-table-row.stories.js +3 -9
  285. package/dist/collection/components/pds-table/pds-table.css +98 -17
  286. package/dist/collection/components/pds-table/pds-table.js +285 -41
  287. package/dist/collection/components/pds-table/stories/pds-table.stories.js +297 -27
  288. package/dist/collection/components/pds-tabs/pds-tab/pds-tab.css +102 -60
  289. package/dist/collection/components/pds-tabs/pds-tab/pds-tab.js +226 -18
  290. package/dist/collection/components/pds-tabs/pds-tab/stories/pds-tab.stories.js +15 -0
  291. package/dist/collection/components/pds-tabs/pds-tabpanel/pds-tabpanel.css +15 -2
  292. package/dist/collection/components/pds-tabs/pds-tabpanel/pds-tabpanel.js +53 -12
  293. package/dist/collection/components/pds-tabs/pds-tabpanel/stories/pds-tabpanel.stories.js +15 -0
  294. package/dist/collection/components/pds-tabs/pds-tabs.css +31 -11
  295. package/dist/collection/components/pds-tabs/pds-tabs.js +180 -25
  296. package/dist/collection/components/pds-tabs/stories/pds-tabs.stories.js +69 -26
  297. package/dist/collection/components/pds-text/pds-text.css +207 -0
  298. package/dist/collection/components/pds-text/pds-text.js +293 -0
  299. package/dist/collection/components/pds-text/stories/pds-text.stories.js +125 -0
  300. package/dist/collection/components/pds-textarea/pds-textarea.css +127 -57
  301. package/dist/collection/components/pds-textarea/pds-textarea.js +591 -57
  302. package/dist/collection/components/pds-textarea/stories/pds-textarea.stories.js +112 -25
  303. package/dist/collection/components/pds-textarea/textarea-interface.js +0 -1
  304. package/dist/collection/components/pds-toast/pds-toast.css +153 -0
  305. package/dist/collection/components/pds-toast/pds-toast.js +330 -0
  306. package/dist/collection/components/pds-toast/stories/pds-toast.stories.js +95 -0
  307. package/dist/collection/components/pds-tooltip/pds-tooltip.css +63 -81
  308. package/dist/collection/components/pds-tooltip/pds-tooltip.js +366 -78
  309. package/dist/collection/components/pds-tooltip/stories/pds-tooltip.stories.js +22 -24
  310. package/dist/collection/global/pine-ui-global.js +0 -1
  311. package/dist/collection/global/styles/utils/label.css +17 -0
  312. package/dist/collection/i18n/i18n-format.js +59 -0
  313. package/dist/collection/i18n/index.js +1 -0
  314. package/dist/collection/index.js +1 -1
  315. package/dist/collection/utils/attributes.js +83 -0
  316. package/dist/collection/utils/closest.js +0 -1
  317. package/dist/collection/utils/form.js +41 -8
  318. package/dist/collection/utils/interfaces.js +1 -0
  319. package/dist/collection/utils/overlay.js +66 -50
  320. package/dist/collection/utils/reconnected-content.js +25 -0
  321. package/dist/collection/utils/scroll.js +77 -0
  322. package/dist/collection/utils/test/axe.js +106 -0
  323. package/dist/collection/utils/test/reconnect-safety.js +31 -0
  324. package/dist/collection/utils/truncation-tooltip.js +241 -0
  325. package/dist/collection/utils/types.js +18 -2
  326. package/dist/collection/utils/utils.js +66 -4
  327. package/dist/docs.d.ts +45 -0
  328. package/dist/docs.json +22531 -3270
  329. package/dist/esm/attributes-C0M1gTKv.js +82 -0
  330. package/dist/esm/closest-DnUJodVd.js +9 -0
  331. package/dist/esm/floating-ui.dom-DDtwbwIl.js +1628 -0
  332. package/dist/esm/form-BuRbS7Hp.js +63 -0
  333. package/dist/esm/i18n-format-BKsJZTyn.js +61 -0
  334. package/dist/esm/index-Bu9gFIxM.js +17 -0
  335. package/dist/esm/index-CTLu1TM4.js +2915 -0
  336. package/dist/esm/index.js +0 -2
  337. package/dist/esm/loader.js +3 -6
  338. package/dist/esm/mock-pds-modal.entry.js +89 -0
  339. package/dist/esm/pds-accordion.entry.js +15 -12
  340. package/dist/esm/pds-alert.entry.js +72 -0
  341. package/dist/esm/pds-avatar.entry.js +92 -23
  342. package/dist/esm/pds-box.entry.js +111 -36
  343. package/dist/esm/pds-button.entry.js +168 -22
  344. package/dist/esm/pds-checkbox.entry.js +67 -25
  345. package/dist/esm/pds-chip.entry.js +158 -22
  346. package/dist/esm/pds-combobox.entry.js +2903 -0
  347. package/dist/esm/pds-container.entry.js +34 -0
  348. package/dist/esm/pds-copytext.entry.js +72 -15
  349. package/dist/esm/pds-divider.entry.js +15 -9
  350. package/dist/esm/pds-dropdown-menu-item.entry.js +83 -0
  351. package/dist/esm/pds-dropdown-menu-separator.entry.js +20 -0
  352. package/dist/esm/pds-dropdown-menu.entry.js +316 -0
  353. package/dist/esm/pds-filter.entry.js +487 -0
  354. package/dist/esm/pds-filters.entry.js +15 -0
  355. package/dist/esm/pds-icon.entry.js +273 -38
  356. package/dist/esm/pds-image.entry.js +15 -14
  357. package/dist/esm/pds-input.entry.js +297 -25
  358. package/dist/esm/pds-link.entry.js +41 -11
  359. package/dist/esm/pds-loader.entry.js +21 -12
  360. package/dist/esm/pds-modal-content.entry.js +194 -0
  361. package/dist/esm/pds-modal-footer.entry.js +21 -0
  362. package/dist/esm/pds-modal-header.entry.js +21 -0
  363. package/dist/esm/pds-modal.entry.js +295 -0
  364. package/dist/esm/pds-multiselect.entry.js +1066 -0
  365. package/dist/esm/pds-popover.entry.js +569 -0
  366. package/dist/esm/pds-progress.entry.js +16 -10
  367. package/dist/esm/pds-property.entry.js +19 -0
  368. package/dist/esm/pds-radio-group.entry.js +191 -0
  369. package/dist/esm/pds-radio.entry.js +80 -22
  370. package/dist/esm/pds-row.entry.js +35 -15
  371. package/dist/esm/pds-select.entry.js +254 -0
  372. package/dist/esm/pds-sortable-item.entry.js +26 -9
  373. package/dist/esm/pds-sortable.entry.js +139 -115
  374. package/dist/esm/pds-switch.entry.js +79 -25
  375. package/dist/esm/pds-tab.entry.js +66 -14
  376. package/dist/esm/pds-table-body.entry.js +4 -7
  377. package/dist/esm/pds-table-cell.entry.js +107 -15
  378. package/dist/esm/pds-table-head-cell.entry.js +169 -24
  379. package/dist/esm/pds-table-head.entry.js +16 -11
  380. package/dist/esm/pds-table-row.entry.js +103 -14
  381. package/dist/esm/pds-table.entry.js +178 -20
  382. package/dist/esm/pds-tabpanel.entry.js +19 -11
  383. package/dist/esm/pds-tabs.entry.js +88 -15
  384. package/dist/esm/pds-text.entry.js +120 -0
  385. package/dist/esm/pds-textarea.entry.js +312 -28
  386. package/dist/esm/pds-toast.entry.js +143 -0
  387. package/dist/esm/pds-tooltip.entry.js +318 -107
  388. package/dist/esm/pine-core.js +5 -7
  389. package/dist/esm/reconnected-content-RFpTWV6r.js +27 -0
  390. package/dist/esm/scroll-DtgUQhjl.js +75 -0
  391. package/dist/esm/truncation-tooltip-Blk4GigP.js +244 -0
  392. package/dist/esm/utils-tJa4KYNO.js +71 -0
  393. package/dist/esm-es5/attributes-C0M1gTKv.js +1 -0
  394. package/dist/esm-es5/closest-DnUJodVd.js +1 -0
  395. package/dist/esm-es5/floating-ui.dom-DDtwbwIl.js +1 -0
  396. package/dist/esm-es5/form-BuRbS7Hp.js +1 -0
  397. package/dist/esm-es5/i18n-format-BKsJZTyn.js +1 -0
  398. package/dist/esm-es5/index-Bu9gFIxM.js +1 -0
  399. package/dist/esm-es5/index-CTLu1TM4.js +2 -0
  400. package/dist/esm-es5/index.js +0 -2
  401. package/dist/esm-es5/loader.js +1 -2
  402. package/dist/esm-es5/mock-pds-modal.entry.js +1 -0
  403. package/dist/esm-es5/pds-accordion.entry.js +1 -2
  404. package/dist/esm-es5/pds-alert.entry.js +1 -0
  405. package/dist/esm-es5/pds-avatar.entry.js +1 -2
  406. package/dist/esm-es5/pds-box.entry.js +1 -2
  407. package/dist/esm-es5/pds-button.entry.js +1 -2
  408. package/dist/esm-es5/pds-checkbox.entry.js +1 -2
  409. package/dist/esm-es5/pds-chip.entry.js +1 -2
  410. package/dist/esm-es5/pds-combobox.entry.js +2 -0
  411. package/dist/esm-es5/pds-container.entry.js +1 -0
  412. package/dist/esm-es5/pds-copytext.entry.js +1 -2
  413. package/dist/esm-es5/pds-divider.entry.js +1 -2
  414. package/dist/esm-es5/pds-dropdown-menu-item.entry.js +1 -0
  415. package/dist/esm-es5/pds-dropdown-menu-separator.entry.js +1 -0
  416. package/dist/esm-es5/pds-dropdown-menu.entry.js +1 -0
  417. package/dist/esm-es5/pds-filter.entry.js +1 -0
  418. package/dist/esm-es5/pds-filters.entry.js +1 -0
  419. package/dist/esm-es5/pds-icon.entry.js +1 -2
  420. package/dist/esm-es5/pds-image.entry.js +1 -2
  421. package/dist/esm-es5/pds-input.entry.js +1 -2
  422. package/dist/esm-es5/pds-link.entry.js +1 -2
  423. package/dist/esm-es5/pds-loader.entry.js +1 -2
  424. package/dist/esm-es5/pds-modal-content.entry.js +1 -0
  425. package/dist/esm-es5/pds-modal-footer.entry.js +1 -0
  426. package/dist/esm-es5/pds-modal-header.entry.js +1 -0
  427. package/dist/esm-es5/pds-modal.entry.js +1 -0
  428. package/dist/esm-es5/pds-multiselect.entry.js +1 -0
  429. package/dist/esm-es5/pds-popover.entry.js +1 -0
  430. package/dist/esm-es5/pds-progress.entry.js +1 -2
  431. package/dist/esm-es5/pds-property.entry.js +1 -0
  432. package/dist/esm-es5/pds-radio-group.entry.js +1 -0
  433. package/dist/esm-es5/pds-radio.entry.js +1 -2
  434. package/dist/esm-es5/pds-row.entry.js +1 -2
  435. package/dist/esm-es5/pds-select.entry.js +1 -0
  436. package/dist/esm-es5/pds-sortable-item.entry.js +1 -2
  437. package/dist/esm-es5/pds-sortable.entry.js +3 -4
  438. package/dist/esm-es5/pds-switch.entry.js +1 -2
  439. package/dist/esm-es5/pds-tab.entry.js +1 -2
  440. package/dist/esm-es5/pds-table-body.entry.js +1 -2
  441. package/dist/esm-es5/pds-table-cell.entry.js +1 -2
  442. package/dist/esm-es5/pds-table-head-cell.entry.js +1 -2
  443. package/dist/esm-es5/pds-table-head.entry.js +1 -2
  444. package/dist/esm-es5/pds-table-row.entry.js +1 -2
  445. package/dist/esm-es5/pds-table.entry.js +1 -2
  446. package/dist/esm-es5/pds-tabpanel.entry.js +1 -2
  447. package/dist/esm-es5/pds-tabs.entry.js +1 -2
  448. package/dist/esm-es5/pds-text.entry.js +1 -0
  449. package/dist/esm-es5/pds-textarea.entry.js +1 -2
  450. package/dist/esm-es5/pds-toast.entry.js +1 -0
  451. package/dist/esm-es5/pds-tooltip.entry.js +1 -2
  452. package/dist/esm-es5/pine-core.js +1 -2
  453. package/dist/esm-es5/reconnected-content-RFpTWV6r.js +1 -0
  454. package/dist/esm-es5/scroll-DtgUQhjl.js +1 -0
  455. package/dist/esm-es5/truncation-tooltip-Blk4GigP.js +1 -0
  456. package/dist/esm-es5/utils-tJa4KYNO.js +1 -0
  457. package/dist/pine-core/index.esm.js +0 -2
  458. package/dist/pine-core/p-04a30a2d.system.entry.js +1 -0
  459. package/dist/pine-core/p-056667f0.entry.js +1 -0
  460. package/dist/pine-core/p-08151143.system.entry.js +1 -0
  461. package/dist/pine-core/p-0d73d473.entry.js +1 -0
  462. package/dist/pine-core/p-0e89a189.entry.js +1 -0
  463. package/dist/pine-core/p-0fcda1ec.entry.js +1 -0
  464. package/dist/pine-core/p-12ec8186.system.entry.js +1 -0
  465. package/dist/pine-core/p-1649dd61.system.entry.js +1 -0
  466. package/dist/pine-core/p-1ba361cb.entry.js +1 -0
  467. package/dist/pine-core/p-1e952dbb.entry.js +7 -0
  468. package/dist/pine-core/p-210f0994.system.entry.js +1 -0
  469. package/dist/pine-core/p-222ff58e.system.entry.js +1 -0
  470. package/dist/pine-core/p-226232a7.system.entry.js +1 -0
  471. package/dist/pine-core/p-228a9068.system.entry.js +1 -0
  472. package/dist/pine-core/p-2af19aa7.entry.js +1 -0
  473. package/dist/pine-core/p-2d4b9253.entry.js +1 -0
  474. package/dist/pine-core/p-2e214db6.entry.js +1 -0
  475. package/dist/pine-core/p-2fd71a0c.entry.js +1 -0
  476. package/dist/pine-core/p-3050c66f.entry.js +1 -0
  477. package/dist/pine-core/p-33de0eb7.system.entry.js +1 -0
  478. package/dist/pine-core/p-3aec9079.entry.js +1 -0
  479. package/dist/pine-core/p-3b9e77b3.entry.js +1 -0
  480. package/dist/pine-core/p-3cdc1a5b.entry.js +1 -0
  481. package/dist/pine-core/p-460aa66f.system.entry.js +1 -0
  482. package/dist/pine-core/p-463eb0e6.system.entry.js +1 -0
  483. package/dist/pine-core/p-46f0dda5.system.entry.js +1 -0
  484. package/dist/pine-core/p-4923a3fe.entry.js +1 -0
  485. package/dist/pine-core/p-4d6944aa.entry.js +1 -0
  486. package/dist/pine-core/p-4dad0878.entry.js +1 -0
  487. package/dist/pine-core/p-4faff617.entry.js +1 -0
  488. package/dist/pine-core/p-50e0f726.system.entry.js +1 -0
  489. package/dist/pine-core/p-520f7a5b.entry.js +1 -0
  490. package/dist/pine-core/p-53999cd6.system.entry.js +1 -0
  491. package/dist/pine-core/p-544ccf67.entry.js +1 -0
  492. package/dist/pine-core/p-5c239f0a.entry.js +1 -0
  493. package/dist/pine-core/p-5d585aa8.entry.js +1 -0
  494. package/dist/pine-core/p-6089d811.entry.js +1 -0
  495. package/dist/pine-core/p-611f68b7.system.entry.js +1 -0
  496. package/dist/pine-core/p-63f5f66f.system.entry.js +1 -0
  497. package/dist/pine-core/p-65557500.entry.js +1 -0
  498. package/dist/pine-core/p-714bfdbd.entry.js +1 -0
  499. package/dist/pine-core/p-7691a875.system.entry.js +3 -0
  500. package/dist/pine-core/p-7a1971ec.entry.js +1 -0
  501. package/dist/pine-core/p-7b1e3e91.entry.js +1 -0
  502. package/dist/pine-core/p-7c18e9e8.system.entry.js +8 -0
  503. package/dist/pine-core/p-85434de8.system.entry.js +1 -0
  504. package/dist/pine-core/p-86bc2a0c.entry.js +1 -0
  505. package/dist/pine-core/p-8702635d.system.entry.js +1 -0
  506. package/dist/pine-core/p-897fe88c.entry.js +1 -0
  507. package/dist/pine-core/p-8e6a8a8e.entry.js +1 -0
  508. package/dist/pine-core/p-902b3e8b.system.entry.js +1 -0
  509. package/dist/pine-core/p-9187c26c.system.entry.js +1 -0
  510. package/dist/pine-core/p-92c79ed4.system.entry.js +1 -0
  511. package/dist/pine-core/p-92ef1608.system.entry.js +1 -0
  512. package/dist/pine-core/p-9487ff20.system.entry.js +1 -0
  513. package/dist/pine-core/p-9507eb49.system.entry.js +1 -0
  514. package/dist/pine-core/p-97198cb6.system.entry.js +1 -0
  515. package/dist/pine-core/p-9a7294e7.system.entry.js +1 -0
  516. package/dist/pine-core/p-9b68669f.entry.js +1 -0
  517. package/dist/pine-core/p-9fd1e8f4.system.entry.js +1 -0
  518. package/dist/pine-core/p-BG6uGRQj.system.js +1 -0
  519. package/dist/pine-core/p-BKsJZTyn.js +1 -0
  520. package/dist/pine-core/p-BNSGedhN.js +1 -0
  521. package/dist/pine-core/p-BbXp4qBM.system.js +1 -0
  522. package/dist/pine-core/p-BhQhw0S3.system.js +1 -0
  523. package/dist/pine-core/p-Bjc6fc_Y.system.js +1 -0
  524. package/dist/pine-core/p-BrLs99ML.system.js +1 -0
  525. package/dist/pine-core/p-Bu9gFIxM.js +1 -0
  526. package/dist/pine-core/p-BuRbS7Hp.js +1 -0
  527. package/dist/pine-core/p-BxIzb-Wc.system.js +1 -0
  528. package/dist/pine-core/p-C0M1gTKv.js +1 -0
  529. package/dist/pine-core/p-CRCxGYgw.system.js +1 -0
  530. package/dist/pine-core/p-CTLu1TM4.js +2 -0
  531. package/dist/pine-core/p-Cr7-rJtJ.system.js +1 -0
  532. package/dist/pine-core/p-DAIsVNlL.system.js +2 -0
  533. package/dist/pine-core/p-DDtwbwIl.js +1 -0
  534. package/dist/pine-core/p-DVra397g.system.js +1 -0
  535. package/dist/pine-core/p-DnUJodVd.js +1 -0
  536. package/dist/pine-core/p-Dr-FzkdE.system.js +1 -0
  537. package/dist/pine-core/p-DtgUQhjl.js +1 -0
  538. package/dist/pine-core/p-RFpTWV6r.js +1 -0
  539. package/dist/pine-core/p-YWpyar7R.system.js +1 -0
  540. package/dist/pine-core/p-a3c4c0ee.entry.js +1 -0
  541. package/dist/pine-core/p-a53222f7.entry.js +1 -0
  542. package/dist/pine-core/p-a7eabc0c.system.entry.js +1 -0
  543. package/dist/pine-core/p-a8ab4d9b.entry.js +1 -0
  544. package/dist/pine-core/p-a9e54964.entry.js +1 -0
  545. package/dist/pine-core/p-aa208514.entry.js +1 -0
  546. package/dist/pine-core/p-ae296598.entry.js +1 -0
  547. package/dist/pine-core/p-aecaff12.entry.js +1 -0
  548. package/dist/pine-core/p-af4a24d9.entry.js +1 -0
  549. package/dist/pine-core/p-afd07d5b.entry.js +1 -0
  550. package/dist/pine-core/p-b0531455.entry.js +1 -0
  551. package/dist/pine-core/p-b109de2e.entry.js +1 -0
  552. package/dist/pine-core/p-b17fa86a.system.entry.js +1 -0
  553. package/dist/pine-core/p-b255d3b7.entry.js +1 -0
  554. package/dist/pine-core/p-b52deffb.entry.js +1 -0
  555. package/dist/pine-core/p-b6c2090f.system.entry.js +1 -0
  556. package/dist/pine-core/p-ba8bd9dc.system.entry.js +1 -0
  557. package/dist/pine-core/p-bba759f8.system.entry.js +1 -0
  558. package/dist/pine-core/p-bf3afa16.system.entry.js +1 -0
  559. package/dist/pine-core/p-bfa640f4.system.entry.js +1 -0
  560. package/dist/pine-core/p-c0753d9f.entry.js +1 -0
  561. package/dist/pine-core/p-c09dab1a.system.entry.js +1 -0
  562. package/dist/pine-core/p-c713ffc6.system.entry.js +1 -0
  563. package/dist/pine-core/p-ce63f726.system.entry.js +1 -0
  564. package/dist/pine-core/p-ce79321b.system.entry.js +1 -0
  565. package/dist/pine-core/p-cf72e9b1.system.entry.js +1 -0
  566. package/dist/pine-core/p-d157a33a.entry.js +1 -0
  567. package/dist/pine-core/p-d27ef352.system.entry.js +1 -0
  568. package/dist/pine-core/p-d415bb01.entry.js +2 -0
  569. package/dist/pine-core/p-d54af26c.system.entry.js +1 -0
  570. package/dist/pine-core/p-d804d37b.system.entry.js +1 -0
  571. package/dist/pine-core/p-e11795db.system.entry.js +1 -0
  572. package/dist/pine-core/p-e1653d75.system.entry.js +1 -0
  573. package/dist/pine-core/p-e16dfb32.system.entry.js +1 -0
  574. package/dist/pine-core/p-e450eb27.system.entry.js +1 -0
  575. package/dist/pine-core/p-eb4058ed.system.entry.js +1 -0
  576. package/dist/pine-core/p-f09ce49e.entry.js +1 -0
  577. package/dist/pine-core/p-f35596cd.entry.js +1 -0
  578. package/dist/pine-core/p-f3683be8.entry.js +1 -0
  579. package/dist/pine-core/p-fcf91f14.system.entry.js +1 -0
  580. package/dist/pine-core/p-kYMYDfJY.system.js +1 -0
  581. package/dist/pine-core/p-tJa4KYNO.js +1 -0
  582. package/dist/pine-core/pine-core.css +1 -1
  583. package/dist/pine-core/pine-core.esm.js +1 -2
  584. package/dist/pine-core/pine-core.js +1 -1
  585. package/dist/scripts/vscode-custom-data-generator.js +406 -0
  586. package/dist/scripts/vscode-settings-patcher.cjs +89 -0
  587. package/dist/types/components/pds-accordion/pds-accordion.d.ts +8 -0
  588. package/dist/types/components/pds-alert/pds-alert.d.ts +51 -0
  589. package/dist/types/components/pds-avatar/pds-avatar.d.ts +38 -0
  590. package/dist/types/components/pds-box/pds-box.d.ts +475 -14
  591. package/dist/types/components/pds-button/pds-button.d.ts +70 -12
  592. package/dist/types/components/pds-checkbox/pds-checkbox.d.ts +11 -1
  593. package/dist/types/components/pds-chip/pds-chip.d.ts +62 -13
  594. package/dist/types/components/pds-combobox/combobox-interface.d.ts +23 -0
  595. package/dist/types/components/pds-combobox/pds-combobox.d.ts +372 -0
  596. package/dist/types/components/pds-container/pds-container.d.ts +22 -0
  597. package/dist/types/components/pds-copytext/pds-copytext.d.ts +14 -4
  598. package/dist/types/components/pds-divider/pds-divider.d.ts +9 -1
  599. package/dist/types/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.d.ts +66 -0
  600. package/dist/types/components/pds-dropdown-menu/pds-dropdown-menu-separator/pds-dropdown-menu-separator.d.ts +13 -0
  601. package/dist/types/components/pds-dropdown-menu/pds-dropdown-menu.d.ts +39 -0
  602. package/dist/types/components/pds-filters/pds-filter/filter-interface.d.ts +19 -0
  603. package/dist/types/components/pds-filters/pds-filter/pds-filter.d.ts +133 -0
  604. package/dist/types/components/pds-filters/pds-filters.d.ts +11 -0
  605. package/dist/types/components/pds-image/pds-image.d.ts +7 -3
  606. package/dist/types/components/pds-input/input-interface.d.ts +12 -0
  607. package/dist/types/components/pds-input/pds-input.d.ts +163 -8
  608. package/dist/types/components/pds-link/pds-link.d.ts +73 -11
  609. package/dist/types/components/pds-loader/pds-loader.d.ts +2 -1
  610. package/dist/types/components/pds-modal/pds-modal-content/pds-modal-content.d.ts +38 -0
  611. package/dist/types/components/pds-modal/pds-modal-footer/pds-modal-footer.d.ts +5 -0
  612. package/dist/types/components/pds-modal/pds-modal-header/pds-modal-header.d.ts +5 -0
  613. package/dist/types/components/pds-modal/pds-modal.d.ts +88 -0
  614. package/dist/types/components/pds-modal/test/mock-pds-modal.d.ts +68 -0
  615. package/dist/types/components/pds-multiselect/multiselect-interface.d.ts +42 -0
  616. package/dist/types/components/pds-multiselect/pds-multiselect.d.ts +326 -0
  617. package/dist/types/components/pds-popover/pds-popover.d.ts +179 -0
  618. package/dist/types/components/pds-popover/popover-interface.d.ts +4 -0
  619. package/dist/types/components/pds-property/pds-property.d.ts +14 -0
  620. package/dist/types/components/pds-radio/pds-radio.d.ts +30 -9
  621. package/dist/types/components/pds-radio-group/pds-radio-group.d.ts +73 -0
  622. package/dist/types/components/pds-radio-group/radio-group-interface.d.ts +5 -0
  623. package/dist/types/components/pds-row/pds-row.d.ts +10 -2
  624. package/dist/types/components/pds-select/pds-select.d.ts +146 -0
  625. package/dist/types/components/pds-sortable/pds-sortable-item/pds-sortable-item.d.ts +1 -0
  626. package/dist/types/components/pds-sortable/pds-sortable.d.ts +10 -2
  627. package/dist/types/components/pds-sortable/sortable-interface.d.ts +3 -1
  628. package/dist/types/components/pds-switch/pds-switch.d.ts +24 -19
  629. package/dist/types/components/pds-table/pds-table-cell/pds-table-cell.d.ts +26 -1
  630. package/dist/types/components/pds-table/pds-table-head/pds-table-head.d.ts +15 -2
  631. package/dist/types/components/pds-table/pds-table-head-cell/pds-table-head-cell.d.ts +52 -2
  632. package/dist/types/components/pds-table/pds-table-row/pds-table-row.d.ts +23 -4
  633. package/dist/types/components/pds-table/pds-table.d.ts +62 -10
  634. package/dist/types/components/pds-tabs/pds-tab/pds-tab.d.ts +49 -0
  635. package/dist/types/components/pds-tabs/pds-tabpanel/pds-tabpanel.d.ts +6 -0
  636. package/dist/types/components/pds-tabs/pds-tabs.d.ts +27 -3
  637. package/dist/types/components/pds-text/pds-text.d.ts +55 -0
  638. package/dist/types/components/pds-textarea/pds-textarea.d.ts +138 -15
  639. package/dist/types/components/pds-textarea/textarea-interface.d.ts +5 -1
  640. package/dist/types/components/pds-toast/pds-toast.d.ts +70 -0
  641. package/dist/types/components/pds-tooltip/pds-tooltip.d.ts +45 -19
  642. package/dist/types/components.d.ts +5600 -1197
  643. package/dist/types/home/runner/work/pine/pine/libs/core/.stencil/scripts/vscode-custom-data-generator.d.ts +6 -0
  644. package/dist/types/i18n/i18n-format.d.ts +38 -0
  645. package/dist/types/i18n/index.d.ts +2 -0
  646. package/dist/types/index.d.ts +1 -0
  647. package/dist/types/stencil-public-runtime.d.ts +195 -8
  648. package/dist/types/utils/attributes.d.ts +10 -0
  649. package/dist/types/utils/form.d.ts +23 -1
  650. package/dist/types/utils/interfaces.d.ts +6 -0
  651. package/dist/types/utils/overlay.d.ts +3 -3
  652. package/dist/types/utils/reconnected-content.d.ts +14 -0
  653. package/dist/types/utils/scroll.d.ts +21 -0
  654. package/dist/types/utils/test/axe.d.ts +81 -0
  655. package/dist/types/utils/test/reconnect-safety.d.ts +11 -0
  656. package/dist/types/utils/truncation-tooltip.d.ts +21 -0
  657. package/dist/types/utils/types.d.ts +8 -2
  658. package/dist/types/utils/utils.d.ts +14 -2
  659. package/dist/vscode.html-data.json +10944 -0
  660. package/hydrate/index.d.ts +58 -7
  661. package/hydrate/index.js +21570 -3575
  662. package/hydrate/index.mjs +21568 -3575
  663. package/package.json +47 -25
  664. package/readme.md +1 -1
  665. package/components/closest.js.map +0 -1
  666. package/components/index.js.map +0 -1
  667. package/components/index2.js.map +0 -1
  668. package/components/pds-accordion.js.map +0 -1
  669. package/components/pds-avatar.js.map +0 -1
  670. package/components/pds-box.js.map +0 -1
  671. package/components/pds-button.js.map +0 -1
  672. package/components/pds-button2.js.map +0 -1
  673. package/components/pds-checkbox.js.map +0 -1
  674. package/components/pds-checkbox2.js.map +0 -1
  675. package/components/pds-chip.js.map +0 -1
  676. package/components/pds-copytext.js.map +0 -1
  677. package/components/pds-divider.js.map +0 -1
  678. package/components/pds-icon.js.map +0 -1
  679. package/components/pds-icon2.js.map +0 -1
  680. package/components/pds-image.js.map +0 -1
  681. package/components/pds-input.js.map +0 -1
  682. package/components/pds-label.js +0 -39
  683. package/components/pds-label.js.map +0 -1
  684. package/components/pds-link.js.map +0 -1
  685. package/components/pds-loader.js.map +0 -1
  686. package/components/pds-progress.js.map +0 -1
  687. package/components/pds-radio.js.map +0 -1
  688. package/components/pds-row.js.map +0 -1
  689. package/components/pds-sortable-item.js.map +0 -1
  690. package/components/pds-sortable.js.map +0 -1
  691. package/components/pds-switch.js.map +0 -1
  692. package/components/pds-tab.js.map +0 -1
  693. package/components/pds-table-body.js.map +0 -1
  694. package/components/pds-table-cell.js.map +0 -1
  695. package/components/pds-table-cell2.js.map +0 -1
  696. package/components/pds-table-head-cell.js.map +0 -1
  697. package/components/pds-table-head-cell2.js.map +0 -1
  698. package/components/pds-table-head.js.map +0 -1
  699. package/components/pds-table-row.js.map +0 -1
  700. package/components/pds-table.js.map +0 -1
  701. package/components/pds-tabpanel.js.map +0 -1
  702. package/components/pds-tabs.js.map +0 -1
  703. package/components/pds-textarea.js.map +0 -1
  704. package/components/pds-tooltip.js.map +0 -1
  705. package/dist/cjs/app-globals-3a1e7e63.js +0 -7
  706. package/dist/cjs/app-globals-3a1e7e63.js.map +0 -1
  707. package/dist/cjs/closest-b45138d3.js +0 -13
  708. package/dist/cjs/closest-b45138d3.js.map +0 -1
  709. package/dist/cjs/index-46fb0736.js +0 -1956
  710. package/dist/cjs/index-46fb0736.js.map +0 -1
  711. package/dist/cjs/index-de3f0730.js +0 -24
  712. package/dist/cjs/index-de3f0730.js.map +0 -1
  713. package/dist/cjs/index.cjs.js.map +0 -1
  714. package/dist/cjs/loader.cjs.js.map +0 -1
  715. package/dist/cjs/pds-accordion.cjs.entry.js.map +0 -1
  716. package/dist/cjs/pds-avatar.cjs.entry.js.map +0 -1
  717. package/dist/cjs/pds-box.cjs.entry.js.map +0 -1
  718. package/dist/cjs/pds-button.cjs.entry.js.map +0 -1
  719. package/dist/cjs/pds-checkbox.cjs.entry.js.map +0 -1
  720. package/dist/cjs/pds-chip.cjs.entry.js.map +0 -1
  721. package/dist/cjs/pds-copytext.cjs.entry.js.map +0 -1
  722. package/dist/cjs/pds-divider.cjs.entry.js.map +0 -1
  723. package/dist/cjs/pds-icon.cjs.entry.js.map +0 -1
  724. package/dist/cjs/pds-image.cjs.entry.js.map +0 -1
  725. package/dist/cjs/pds-input.cjs.entry.js.map +0 -1
  726. package/dist/cjs/pds-label-7aabdc4e.js +0 -44
  727. package/dist/cjs/pds-label-7aabdc4e.js.map +0 -1
  728. package/dist/cjs/pds-link.cjs.entry.js.map +0 -1
  729. package/dist/cjs/pds-loader.cjs.entry.js.map +0 -1
  730. package/dist/cjs/pds-progress.cjs.entry.js.map +0 -1
  731. package/dist/cjs/pds-radio.cjs.entry.js.map +0 -1
  732. package/dist/cjs/pds-row.cjs.entry.js.map +0 -1
  733. package/dist/cjs/pds-sortable-item.cjs.entry.js.map +0 -1
  734. package/dist/cjs/pds-sortable.cjs.entry.js.map +0 -1
  735. package/dist/cjs/pds-switch.cjs.entry.js.map +0 -1
  736. package/dist/cjs/pds-tab.cjs.entry.js.map +0 -1
  737. package/dist/cjs/pds-table-body.cjs.entry.js.map +0 -1
  738. package/dist/cjs/pds-table-cell.cjs.entry.js.map +0 -1
  739. package/dist/cjs/pds-table-head-cell.cjs.entry.js.map +0 -1
  740. package/dist/cjs/pds-table-head.cjs.entry.js.map +0 -1
  741. package/dist/cjs/pds-table-row.cjs.entry.js.map +0 -1
  742. package/dist/cjs/pds-table.cjs.entry.js.map +0 -1
  743. package/dist/cjs/pds-tabpanel.cjs.entry.js.map +0 -1
  744. package/dist/cjs/pds-tabs.cjs.entry.js.map +0 -1
  745. package/dist/cjs/pds-textarea.cjs.entry.js.map +0 -1
  746. package/dist/cjs/pds-tooltip.cjs.entry.js.map +0 -1
  747. package/dist/cjs/pine-core.cjs.js.map +0 -1
  748. package/dist/collection/components/_internal/pds-label/pds-label.js.map +0 -1
  749. package/dist/collection/components/pds-accordion/pds-accordion.js.map +0 -1
  750. package/dist/collection/components/pds-avatar/pds-avatar.js.map +0 -1
  751. package/dist/collection/components/pds-box/pds-box.js.map +0 -1
  752. package/dist/collection/components/pds-button/pds-button.js.map +0 -1
  753. package/dist/collection/components/pds-checkbox/checkbox-interface.js.map +0 -1
  754. package/dist/collection/components/pds-checkbox/pds-checkbox.js.map +0 -1
  755. package/dist/collection/components/pds-chip/pds-chip.js.map +0 -1
  756. package/dist/collection/components/pds-copytext/pds-copytext.js.map +0 -1
  757. package/dist/collection/components/pds-divider/pds-divider.js.map +0 -1
  758. package/dist/collection/components/pds-image/pds-image.js.map +0 -1
  759. package/dist/collection/components/pds-input/pds-input.js.map +0 -1
  760. package/dist/collection/components/pds-link/pds-link.js.map +0 -1
  761. package/dist/collection/components/pds-loader/pds-loader.js.map +0 -1
  762. package/dist/collection/components/pds-progress/pds-progress.js.map +0 -1
  763. package/dist/collection/components/pds-radio/pds-radio.js.map +0 -1
  764. package/dist/collection/components/pds-row/pds-row.js.map +0 -1
  765. package/dist/collection/components/pds-sortable/pds-sortable-item/pds-sortable-item.js.map +0 -1
  766. package/dist/collection/components/pds-sortable/pds-sortable.js.map +0 -1
  767. package/dist/collection/components/pds-sortable/sortable-interface.js.map +0 -1
  768. package/dist/collection/components/pds-switch/pds-switch.js.map +0 -1
  769. package/dist/collection/components/pds-table/pds-table-body/pds-table-body.js.map +0 -1
  770. package/dist/collection/components/pds-table/pds-table-cell/pds-table-cell.js.map +0 -1
  771. package/dist/collection/components/pds-table/pds-table-head/pds-table-head.js.map +0 -1
  772. package/dist/collection/components/pds-table/pds-table-head-cell/pds-table-head-cell.js.map +0 -1
  773. package/dist/collection/components/pds-table/pds-table-row/pds-table-row.js.map +0 -1
  774. package/dist/collection/components/pds-table/pds-table.js.map +0 -1
  775. package/dist/collection/components/pds-tabs/pds-tab/pds-tab.js.map +0 -1
  776. package/dist/collection/components/pds-tabs/pds-tabpanel/pds-tabpanel.js.map +0 -1
  777. package/dist/collection/components/pds-tabs/pds-tabs.js.map +0 -1
  778. package/dist/collection/components/pds-textarea/pds-textarea.js.map +0 -1
  779. package/dist/collection/components/pds-textarea/textarea-interface.js.map +0 -1
  780. package/dist/collection/components/pds-tooltip/pds-tooltip.js.map +0 -1
  781. package/dist/collection/global/pine-ui-global.js.map +0 -1
  782. package/dist/collection/index.js.map +0 -1
  783. package/dist/collection/stories/_helpers/index.js +0 -15
  784. package/dist/collection/stories/_helpers/index.js.map +0 -1
  785. package/dist/collection/utils/closest.js.map +0 -1
  786. package/dist/collection/utils/form.js.map +0 -1
  787. package/dist/collection/utils/overlay.js.map +0 -1
  788. package/dist/collection/utils/types.js.map +0 -1
  789. package/dist/collection/utils/utils.js.map +0 -1
  790. package/dist/esm/app-globals-0f993ce5.js +0 -5
  791. package/dist/esm/app-globals-0f993ce5.js.map +0 -1
  792. package/dist/esm/closest-d2d192be.js +0 -11
  793. package/dist/esm/closest-d2d192be.js.map +0 -1
  794. package/dist/esm/index-2a33b470.js +0 -1927
  795. package/dist/esm/index-2a33b470.js.map +0 -1
  796. package/dist/esm/index-a1e2f9af.js +0 -14
  797. package/dist/esm/index-a1e2f9af.js.map +0 -1
  798. package/dist/esm/index.js.map +0 -1
  799. package/dist/esm/loader.js.map +0 -1
  800. package/dist/esm/pds-accordion.entry.js.map +0 -1
  801. package/dist/esm/pds-avatar.entry.js.map +0 -1
  802. package/dist/esm/pds-box.entry.js.map +0 -1
  803. package/dist/esm/pds-button.entry.js.map +0 -1
  804. package/dist/esm/pds-checkbox.entry.js.map +0 -1
  805. package/dist/esm/pds-chip.entry.js.map +0 -1
  806. package/dist/esm/pds-copytext.entry.js.map +0 -1
  807. package/dist/esm/pds-divider.entry.js.map +0 -1
  808. package/dist/esm/pds-icon.entry.js.map +0 -1
  809. package/dist/esm/pds-image.entry.js.map +0 -1
  810. package/dist/esm/pds-input.entry.js.map +0 -1
  811. package/dist/esm/pds-label-31a5848b.js +0 -39
  812. package/dist/esm/pds-label-31a5848b.js.map +0 -1
  813. package/dist/esm/pds-link.entry.js.map +0 -1
  814. package/dist/esm/pds-loader.entry.js.map +0 -1
  815. package/dist/esm/pds-progress.entry.js.map +0 -1
  816. package/dist/esm/pds-radio.entry.js.map +0 -1
  817. package/dist/esm/pds-row.entry.js.map +0 -1
  818. package/dist/esm/pds-sortable-item.entry.js.map +0 -1
  819. package/dist/esm/pds-sortable.entry.js.map +0 -1
  820. package/dist/esm/pds-switch.entry.js.map +0 -1
  821. package/dist/esm/pds-tab.entry.js.map +0 -1
  822. package/dist/esm/pds-table-body.entry.js.map +0 -1
  823. package/dist/esm/pds-table-cell.entry.js.map +0 -1
  824. package/dist/esm/pds-table-head-cell.entry.js.map +0 -1
  825. package/dist/esm/pds-table-head.entry.js.map +0 -1
  826. package/dist/esm/pds-table-row.entry.js.map +0 -1
  827. package/dist/esm/pds-table.entry.js.map +0 -1
  828. package/dist/esm/pds-tabpanel.entry.js.map +0 -1
  829. package/dist/esm/pds-tabs.entry.js.map +0 -1
  830. package/dist/esm/pds-textarea.entry.js.map +0 -1
  831. package/dist/esm/pds-tooltip.entry.js.map +0 -1
  832. package/dist/esm/pine-core.js.map +0 -1
  833. package/dist/esm-es5/app-globals-0f993ce5.js +0 -2
  834. package/dist/esm-es5/app-globals-0f993ce5.js.map +0 -1
  835. package/dist/esm-es5/closest-d2d192be.js +0 -2
  836. package/dist/esm-es5/closest-d2d192be.js.map +0 -1
  837. package/dist/esm-es5/index-2a33b470.js +0 -3
  838. package/dist/esm-es5/index-2a33b470.js.map +0 -1
  839. package/dist/esm-es5/index-a1e2f9af.js +0 -2
  840. package/dist/esm-es5/index-a1e2f9af.js.map +0 -1
  841. package/dist/esm-es5/index.js.map +0 -1
  842. package/dist/esm-es5/loader.js.map +0 -1
  843. package/dist/esm-es5/pds-accordion.entry.js.map +0 -1
  844. package/dist/esm-es5/pds-avatar.entry.js.map +0 -1
  845. package/dist/esm-es5/pds-box.entry.js.map +0 -1
  846. package/dist/esm-es5/pds-button.entry.js.map +0 -1
  847. package/dist/esm-es5/pds-checkbox.entry.js.map +0 -1
  848. package/dist/esm-es5/pds-chip.entry.js.map +0 -1
  849. package/dist/esm-es5/pds-copytext.entry.js.map +0 -1
  850. package/dist/esm-es5/pds-divider.entry.js.map +0 -1
  851. package/dist/esm-es5/pds-icon.entry.js.map +0 -1
  852. package/dist/esm-es5/pds-image.entry.js.map +0 -1
  853. package/dist/esm-es5/pds-input.entry.js.map +0 -1
  854. package/dist/esm-es5/pds-label-31a5848b.js +0 -2
  855. package/dist/esm-es5/pds-label-31a5848b.js.map +0 -1
  856. package/dist/esm-es5/pds-link.entry.js.map +0 -1
  857. package/dist/esm-es5/pds-loader.entry.js.map +0 -1
  858. package/dist/esm-es5/pds-progress.entry.js.map +0 -1
  859. package/dist/esm-es5/pds-radio.entry.js.map +0 -1
  860. package/dist/esm-es5/pds-row.entry.js.map +0 -1
  861. package/dist/esm-es5/pds-sortable-item.entry.js.map +0 -1
  862. package/dist/esm-es5/pds-sortable.entry.js.map +0 -1
  863. package/dist/esm-es5/pds-switch.entry.js.map +0 -1
  864. package/dist/esm-es5/pds-tab.entry.js.map +0 -1
  865. package/dist/esm-es5/pds-table-body.entry.js.map +0 -1
  866. package/dist/esm-es5/pds-table-cell.entry.js.map +0 -1
  867. package/dist/esm-es5/pds-table-head-cell.entry.js.map +0 -1
  868. package/dist/esm-es5/pds-table-head.entry.js.map +0 -1
  869. package/dist/esm-es5/pds-table-row.entry.js.map +0 -1
  870. package/dist/esm-es5/pds-table.entry.js.map +0 -1
  871. package/dist/esm-es5/pds-tabpanel.entry.js.map +0 -1
  872. package/dist/esm-es5/pds-tabs.entry.js.map +0 -1
  873. package/dist/esm-es5/pds-textarea.entry.js.map +0 -1
  874. package/dist/esm-es5/pds-tooltip.entry.js.map +0 -1
  875. package/dist/esm-es5/pine-core.js.map +0 -1
  876. package/dist/pine-core/index.esm.js.map +0 -1
  877. package/dist/pine-core/p-06c33261.system.entry.js +0 -2
  878. package/dist/pine-core/p-06c33261.system.entry.js.map +0 -1
  879. package/dist/pine-core/p-07f80cb6.entry.js +0 -2
  880. package/dist/pine-core/p-07f80cb6.entry.js.map +0 -1
  881. package/dist/pine-core/p-09b1c7f1.system.entry.js +0 -2
  882. package/dist/pine-core/p-09b1c7f1.system.entry.js.map +0 -1
  883. package/dist/pine-core/p-0a4b1ce9.system.entry.js +0 -2
  884. package/dist/pine-core/p-0a4b1ce9.system.entry.js.map +0 -1
  885. package/dist/pine-core/p-0b541f88.js +0 -3
  886. package/dist/pine-core/p-0b541f88.js.map +0 -1
  887. package/dist/pine-core/p-0b77685e.js +0 -2
  888. package/dist/pine-core/p-0b77685e.js.map +0 -1
  889. package/dist/pine-core/p-0d6fafef.system.entry.js +0 -2
  890. package/dist/pine-core/p-0d6fafef.system.entry.js.map +0 -1
  891. package/dist/pine-core/p-0e1c0d03.entry.js +0 -8
  892. package/dist/pine-core/p-0e1c0d03.entry.js.map +0 -1
  893. package/dist/pine-core/p-0e936138.entry.js +0 -2
  894. package/dist/pine-core/p-0e936138.entry.js.map +0 -1
  895. package/dist/pine-core/p-143795e5.system.entry.js +0 -2
  896. package/dist/pine-core/p-143795e5.system.entry.js.map +0 -1
  897. package/dist/pine-core/p-1f2b0be3.system.entry.js +0 -2
  898. package/dist/pine-core/p-1f2b0be3.system.entry.js.map +0 -1
  899. package/dist/pine-core/p-224a435b.system.js +0 -2
  900. package/dist/pine-core/p-224a435b.system.js.map +0 -1
  901. package/dist/pine-core/p-31056348.system.entry.js +0 -2
  902. package/dist/pine-core/p-31056348.system.entry.js.map +0 -1
  903. package/dist/pine-core/p-32498622.system.entry.js +0 -2
  904. package/dist/pine-core/p-32498622.system.entry.js.map +0 -1
  905. package/dist/pine-core/p-3261fdf5.system.entry.js +0 -2
  906. package/dist/pine-core/p-3261fdf5.system.entry.js.map +0 -1
  907. package/dist/pine-core/p-32e41e3d.system.entry.js +0 -2
  908. package/dist/pine-core/p-32e41e3d.system.entry.js.map +0 -1
  909. package/dist/pine-core/p-34631565.system.js +0 -2
  910. package/dist/pine-core/p-34631565.system.js.map +0 -1
  911. package/dist/pine-core/p-3aa152c6.entry.js +0 -2
  912. package/dist/pine-core/p-3aa152c6.entry.js.map +0 -1
  913. package/dist/pine-core/p-3ba3d44c.entry.js +0 -2
  914. package/dist/pine-core/p-3ba3d44c.entry.js.map +0 -1
  915. package/dist/pine-core/p-46161cec.entry.js +0 -2
  916. package/dist/pine-core/p-46161cec.entry.js.map +0 -1
  917. package/dist/pine-core/p-4f69a7b7.entry.js +0 -2
  918. package/dist/pine-core/p-4f69a7b7.entry.js.map +0 -1
  919. package/dist/pine-core/p-50a23474.entry.js +0 -2
  920. package/dist/pine-core/p-50a23474.entry.js.map +0 -1
  921. package/dist/pine-core/p-511bf308.entry.js +0 -2
  922. package/dist/pine-core/p-511bf308.entry.js.map +0 -1
  923. package/dist/pine-core/p-52515d64.system.entry.js +0 -2
  924. package/dist/pine-core/p-52515d64.system.entry.js.map +0 -1
  925. package/dist/pine-core/p-56ba5cbf.system.js +0 -2
  926. package/dist/pine-core/p-56ba5cbf.system.js.map +0 -1
  927. package/dist/pine-core/p-5a384517.entry.js +0 -2
  928. package/dist/pine-core/p-5a384517.entry.js.map +0 -1
  929. package/dist/pine-core/p-5bee6677.system.entry.js +0 -2
  930. package/dist/pine-core/p-5bee6677.system.entry.js.map +0 -1
  931. package/dist/pine-core/p-5df76e04.system.js +0 -2
  932. package/dist/pine-core/p-5df76e04.system.js.map +0 -1
  933. package/dist/pine-core/p-62ec9a0f.system.entry.js +0 -2
  934. package/dist/pine-core/p-62ec9a0f.system.entry.js.map +0 -1
  935. package/dist/pine-core/p-6a7a864f.entry.js +0 -2
  936. package/dist/pine-core/p-6a7a864f.entry.js.map +0 -1
  937. package/dist/pine-core/p-6ae2f0f5.entry.js +0 -2
  938. package/dist/pine-core/p-6ae2f0f5.entry.js.map +0 -1
  939. package/dist/pine-core/p-6d9edf7d.system.entry.js +0 -2
  940. package/dist/pine-core/p-6d9edf7d.system.entry.js.map +0 -1
  941. package/dist/pine-core/p-6e146962.entry.js +0 -2
  942. package/dist/pine-core/p-6e146962.entry.js.map +0 -1
  943. package/dist/pine-core/p-6ff9ebfa.entry.js +0 -2
  944. package/dist/pine-core/p-6ff9ebfa.entry.js.map +0 -1
  945. package/dist/pine-core/p-701ba882.entry.js +0 -2
  946. package/dist/pine-core/p-701ba882.entry.js.map +0 -1
  947. package/dist/pine-core/p-73eb1722.entry.js +0 -2
  948. package/dist/pine-core/p-73eb1722.entry.js.map +0 -1
  949. package/dist/pine-core/p-78c6c37a.system.entry.js +0 -2
  950. package/dist/pine-core/p-78c6c37a.system.entry.js.map +0 -1
  951. package/dist/pine-core/p-79ca4ab9.system.entry.js +0 -2
  952. package/dist/pine-core/p-79ca4ab9.system.entry.js.map +0 -1
  953. package/dist/pine-core/p-7c33a02e.entry.js +0 -2
  954. package/dist/pine-core/p-7c33a02e.entry.js.map +0 -1
  955. package/dist/pine-core/p-7dac515e.system.entry.js +0 -2
  956. package/dist/pine-core/p-7dac515e.system.entry.js.map +0 -1
  957. package/dist/pine-core/p-7ea6838b.system.entry.js +0 -2
  958. package/dist/pine-core/p-7ea6838b.system.entry.js.map +0 -1
  959. package/dist/pine-core/p-7ebfdef4.system.entry.js +0 -2
  960. package/dist/pine-core/p-7ebfdef4.system.entry.js.map +0 -1
  961. package/dist/pine-core/p-829777e4.system.entry.js +0 -2
  962. package/dist/pine-core/p-829777e4.system.entry.js.map +0 -1
  963. package/dist/pine-core/p-8317c6c2.js +0 -2
  964. package/dist/pine-core/p-8317c6c2.js.map +0 -1
  965. package/dist/pine-core/p-8469b65a.entry.js +0 -2
  966. package/dist/pine-core/p-8469b65a.entry.js.map +0 -1
  967. package/dist/pine-core/p-8d8de5fd.entry.js +0 -2
  968. package/dist/pine-core/p-8d8de5fd.entry.js.map +0 -1
  969. package/dist/pine-core/p-8df8debd.entry.js +0 -2
  970. package/dist/pine-core/p-8df8debd.entry.js.map +0 -1
  971. package/dist/pine-core/p-8f73bf14.system.entry.js +0 -2
  972. package/dist/pine-core/p-8f73bf14.system.entry.js.map +0 -1
  973. package/dist/pine-core/p-8fbec4fe.system.js +0 -2
  974. package/dist/pine-core/p-8fbec4fe.system.js.map +0 -1
  975. package/dist/pine-core/p-909b305c.system.entry.js +0 -2
  976. package/dist/pine-core/p-909b305c.system.entry.js.map +0 -1
  977. package/dist/pine-core/p-936d96ec.system.entry.js +0 -9
  978. package/dist/pine-core/p-936d96ec.system.entry.js.map +0 -1
  979. package/dist/pine-core/p-9583e6d5.entry.js +0 -2
  980. package/dist/pine-core/p-9583e6d5.entry.js.map +0 -1
  981. package/dist/pine-core/p-96c750d1.entry.js +0 -2
  982. package/dist/pine-core/p-96c750d1.entry.js.map +0 -1
  983. package/dist/pine-core/p-a03e587c.entry.js +0 -2
  984. package/dist/pine-core/p-a03e587c.entry.js.map +0 -1
  985. package/dist/pine-core/p-a79a8159.entry.js +0 -2
  986. package/dist/pine-core/p-a79a8159.entry.js.map +0 -1
  987. package/dist/pine-core/p-a962fe8e.entry.js +0 -2
  988. package/dist/pine-core/p-a962fe8e.entry.js.map +0 -1
  989. package/dist/pine-core/p-ad4238c9.system.entry.js +0 -2
  990. package/dist/pine-core/p-ad4238c9.system.entry.js.map +0 -1
  991. package/dist/pine-core/p-af7df3c2.system.entry.js +0 -2
  992. package/dist/pine-core/p-af7df3c2.system.entry.js.map +0 -1
  993. package/dist/pine-core/p-b18b20f4.system.js +0 -2
  994. package/dist/pine-core/p-b18b20f4.system.js.map +0 -1
  995. package/dist/pine-core/p-b4518566.entry.js +0 -2
  996. package/dist/pine-core/p-b4518566.entry.js.map +0 -1
  997. package/dist/pine-core/p-b5c7e02a.entry.js +0 -2
  998. package/dist/pine-core/p-b5c7e02a.entry.js.map +0 -1
  999. package/dist/pine-core/p-bc20946b.system.entry.js +0 -2
  1000. package/dist/pine-core/p-bc20946b.system.entry.js.map +0 -1
  1001. package/dist/pine-core/p-c52d0465.system.entry.js +0 -2
  1002. package/dist/pine-core/p-c52d0465.system.entry.js.map +0 -1
  1003. package/dist/pine-core/p-c84cc2f8.system.entry.js +0 -2
  1004. package/dist/pine-core/p-c84cc2f8.system.entry.js.map +0 -1
  1005. package/dist/pine-core/p-ca239d59.system.entry.js +0 -2
  1006. package/dist/pine-core/p-ca239d59.system.entry.js.map +0 -1
  1007. package/dist/pine-core/p-e1255160.js +0 -2
  1008. package/dist/pine-core/p-e1255160.js.map +0 -1
  1009. package/dist/pine-core/p-e4b3115c.entry.js +0 -2
  1010. package/dist/pine-core/p-e4b3115c.entry.js.map +0 -1
  1011. package/dist/pine-core/p-e60fccc0.js +0 -2
  1012. package/dist/pine-core/p-e60fccc0.js.map +0 -1
  1013. package/dist/pine-core/p-eb56f262.system.entry.js +0 -2
  1014. package/dist/pine-core/p-eb56f262.system.entry.js.map +0 -1
  1015. package/dist/pine-core/p-ec484bf6.entry.js +0 -2
  1016. package/dist/pine-core/p-ec484bf6.entry.js.map +0 -1
  1017. package/dist/pine-core/p-f59d4a46.entry.js +0 -2
  1018. package/dist/pine-core/p-f59d4a46.entry.js.map +0 -1
  1019. package/dist/pine-core/p-f74c489d.system.js +0 -3
  1020. package/dist/pine-core/p-f74c489d.system.js.map +0 -1
  1021. package/dist/pine-core/pine-core.esm.js.map +0 -1
  1022. package/dist/pine-core/svg/access-key.svg +0 -1
  1023. package/dist/pine-core/svg/add-circle.svg +0 -1
  1024. package/dist/pine-core/svg/add-image.svg +0 -1
  1025. package/dist/pine-core/svg/add-small.svg +0 -1
  1026. package/dist/pine-core/svg/add-square.svg +0 -1
  1027. package/dist/pine-core/svg/add.svg +0 -1
  1028. package/dist/pine-core/svg/advanced.svg +0 -1
  1029. package/dist/pine-core/svg/ai-sparkle.svg +0 -1
  1030. package/dist/pine-core/svg/ai-writer-filled.svg +0 -1
  1031. package/dist/pine-core/svg/ai-writer.svg +0 -1
  1032. package/dist/pine-core/svg/align-center.svg +0 -1
  1033. package/dist/pine-core/svg/align-justify.svg +0 -1
  1034. package/dist/pine-core/svg/align-left.svg +0 -1
  1035. package/dist/pine-core/svg/align-right.svg +0 -1
  1036. package/dist/pine-core/svg/app-store.svg +0 -1
  1037. package/dist/pine-core/svg/archive.svg +0 -1
  1038. package/dist/pine-core/svg/arrow-corner.svg +0 -1
  1039. package/dist/pine-core/svg/arrow-down.svg +0 -1
  1040. package/dist/pine-core/svg/arrow-left.svg +0 -1
  1041. package/dist/pine-core/svg/arrow-right.svg +0 -1
  1042. package/dist/pine-core/svg/arrow-up.svg +0 -1
  1043. package/dist/pine-core/svg/assessment.svg +0 -1
  1044. package/dist/pine-core/svg/at-sign.svg +0 -1
  1045. package/dist/pine-core/svg/attach.svg +0 -1
  1046. package/dist/pine-core/svg/automations.svg +0 -1
  1047. package/dist/pine-core/svg/ban.svg +0 -1
  1048. package/dist/pine-core/svg/bank.svg +0 -1
  1049. package/dist/pine-core/svg/bar-chart-10-tone.svg +0 -1
  1050. package/dist/pine-core/svg/bell-01-tone.svg +0 -1
  1051. package/dist/pine-core/svg/bell.svg +0 -1
  1052. package/dist/pine-core/svg/block.svg +0 -1
  1053. package/dist/pine-core/svg/blog-filled.svg +0 -1
  1054. package/dist/pine-core/svg/blog.svg +0 -1
  1055. package/dist/pine-core/svg/bold.svg +0 -1
  1056. package/dist/pine-core/svg/broadcast.svg +0 -1
  1057. package/dist/pine-core/svg/bulb.svg +0 -1
  1058. package/dist/pine-core/svg/button.svg +0 -1
  1059. package/dist/pine-core/svg/calendar-date.svg +0 -1
  1060. package/dist/pine-core/svg/calendar-schedule.svg +0 -1
  1061. package/dist/pine-core/svg/calendar-simple.svg +0 -1
  1062. package/dist/pine-core/svg/card-amex.svg +0 -1
  1063. package/dist/pine-core/svg/card-android.svg +0 -1
  1064. package/dist/pine-core/svg/card-apple.svg +0 -1
  1065. package/dist/pine-core/svg/card-diners-club.svg +0 -1
  1066. package/dist/pine-core/svg/card-discover.svg +0 -1
  1067. package/dist/pine-core/svg/card-generic.svg +0 -1
  1068. package/dist/pine-core/svg/card-gpay.svg +0 -1
  1069. package/dist/pine-core/svg/card-mastercard.svg +0 -1
  1070. package/dist/pine-core/svg/card-paypal.svg +0 -1
  1071. package/dist/pine-core/svg/card-stripe.svg +0 -1
  1072. package/dist/pine-core/svg/card-update.svg +0 -1
  1073. package/dist/pine-core/svg/card-visa.svg +0 -1
  1074. package/dist/pine-core/svg/caret-down.svg +0 -1
  1075. package/dist/pine-core/svg/caret-left.svg +0 -1
  1076. package/dist/pine-core/svg/caret-right.svg +0 -1
  1077. package/dist/pine-core/svg/caret-up.svg +0 -1
  1078. package/dist/pine-core/svg/cart-add.svg +0 -1
  1079. package/dist/pine-core/svg/cart.svg +0 -1
  1080. package/dist/pine-core/svg/certificate.svg +0 -1
  1081. package/dist/pine-core/svg/chart-filled.svg +0 -1
  1082. package/dist/pine-core/svg/chart.svg +0 -1
  1083. package/dist/pine-core/svg/check-circle-filled.svg +0 -1
  1084. package/dist/pine-core/svg/check-circle.svg +0 -1
  1085. package/dist/pine-core/svg/check.svg +0 -1
  1086. package/dist/pine-core/svg/circle-1.svg +0 -1
  1087. package/dist/pine-core/svg/circle-2.svg +0 -1
  1088. package/dist/pine-core/svg/circle-3.svg +0 -1
  1089. package/dist/pine-core/svg/circle-4.svg +0 -1
  1090. package/dist/pine-core/svg/circle-5.svg +0 -1
  1091. package/dist/pine-core/svg/circle-6.svg +0 -1
  1092. package/dist/pine-core/svg/circle-7.svg +0 -1
  1093. package/dist/pine-core/svg/circle-8.svg +0 -1
  1094. package/dist/pine-core/svg/circle-9.svg +0 -1
  1095. package/dist/pine-core/svg/circle-a.svg +0 -1
  1096. package/dist/pine-core/svg/circle-b.svg +0 -1
  1097. package/dist/pine-core/svg/circle-dashed.svg +0 -1
  1098. package/dist/pine-core/svg/clapperboard-tone.svg +0 -1
  1099. package/dist/pine-core/svg/clock.svg +0 -1
  1100. package/dist/pine-core/svg/closed-captions.svg +0 -1
  1101. package/dist/pine-core/svg/cloud-upload.svg +0 -1
  1102. package/dist/pine-core/svg/code-block.svg +0 -1
  1103. package/dist/pine-core/svg/code.svg +0 -1
  1104. package/dist/pine-core/svg/color.svg +0 -1
  1105. package/dist/pine-core/svg/columns.svg +0 -1
  1106. package/dist/pine-core/svg/comment-no.svg +0 -1
  1107. package/dist/pine-core/svg/comment.svg +0 -1
  1108. package/dist/pine-core/svg/connect.svg +0 -1
  1109. package/dist/pine-core/svg/contact.svg +0 -1
  1110. package/dist/pine-core/svg/conversation.svg +0 -1
  1111. package/dist/pine-core/svg/copy.svg +0 -1
  1112. package/dist/pine-core/svg/coupon.svg +0 -1
  1113. package/dist/pine-core/svg/course-filled.svg +0 -1
  1114. package/dist/pine-core/svg/course.svg +0 -1
  1115. package/dist/pine-core/svg/creator-studio-filled.svg +0 -1
  1116. package/dist/pine-core/svg/creator-studio.svg +0 -1
  1117. package/dist/pine-core/svg/credit-card-02-tone.svg +0 -1
  1118. package/dist/pine-core/svg/cube-01-tone.svg +0 -1
  1119. package/dist/pine-core/svg/cursor-pointer.svg +0 -1
  1120. package/dist/pine-core/svg/cursor.svg +0 -1
  1121. package/dist/pine-core/svg/custom-field.svg +0 -1
  1122. package/dist/pine-core/svg/customize.svg +0 -1
  1123. package/dist/pine-core/svg/danger-filled.svg +0 -1
  1124. package/dist/pine-core/svg/danger.svg +0 -1
  1125. package/dist/pine-core/svg/delete-circle.svg +0 -1
  1126. package/dist/pine-core/svg/delete-key.svg +0 -1
  1127. package/dist/pine-core/svg/delete-x.svg +0 -1
  1128. package/dist/pine-core/svg/dollar.svg +0 -1
  1129. package/dist/pine-core/svg/dot-menu-horizontal.svg +0 -1
  1130. package/dist/pine-core/svg/dots-horizontal-tone.svg +0 -1
  1131. package/dist/pine-core/svg/down-small.svg +0 -1
  1132. package/dist/pine-core/svg/download.svg +0 -1
  1133. package/dist/pine-core/svg/downsell.svg +0 -1
  1134. package/dist/pine-core/svg/draft.svg +0 -1
  1135. package/dist/pine-core/svg/drawer-collapse.svg +0 -1
  1136. package/dist/pine-core/svg/drawer-expand.svg +0 -1
  1137. package/dist/pine-core/svg/drop.svg +0 -1
  1138. package/dist/pine-core/svg/duplicate.svg +0 -1
  1139. package/dist/pine-core/svg/editor-filled.svg +0 -1
  1140. package/dist/pine-core/svg/editor.svg +0 -1
  1141. package/dist/pine-core/svg/email-activity.svg +0 -1
  1142. package/dist/pine-core/svg/emoji.svg +0 -1
  1143. package/dist/pine-core/svg/enlarge-vertical.svg +0 -1
  1144. package/dist/pine-core/svg/enlarge.svg +0 -1
  1145. package/dist/pine-core/svg/expand.svg +0 -1
  1146. package/dist/pine-core/svg/favorite.svg +0 -1
  1147. package/dist/pine-core/svg/feedback.svg +0 -1
  1148. package/dist/pine-core/svg/file-02.svg +0 -1
  1149. package/dist/pine-core/svg/file-money.svg +0 -1
  1150. package/dist/pine-core/svg/file.svg +0 -1
  1151. package/dist/pine-core/svg/filter.svg +0 -1
  1152. package/dist/pine-core/svg/flag.svg +0 -1
  1153. package/dist/pine-core/svg/flash-filled.svg +0 -1
  1154. package/dist/pine-core/svg/flash.svg +0 -1
  1155. package/dist/pine-core/svg/floppy-disk.svg +0 -1
  1156. package/dist/pine-core/svg/folder-group.svg +0 -1
  1157. package/dist/pine-core/svg/folder.svg +0 -1
  1158. package/dist/pine-core/svg/form-field.svg +0 -1
  1159. package/dist/pine-core/svg/form-filled.svg +0 -1
  1160. package/dist/pine-core/svg/form.svg +0 -1
  1161. package/dist/pine-core/svg/fullscreen.svg +0 -1
  1162. package/dist/pine-core/svg/funnel.svg +0 -1
  1163. package/dist/pine-core/svg/gear-filled.svg +0 -1
  1164. package/dist/pine-core/svg/gear.svg +0 -1
  1165. package/dist/pine-core/svg/grant-offer.svg +0 -1
  1166. package/dist/pine-core/svg/handle-2-vertical.svg +0 -1
  1167. package/dist/pine-core/svg/handle-2.svg +0 -1
  1168. package/dist/pine-core/svg/handle.svg +0 -1
  1169. package/dist/pine-core/svg/hashtag.svg +0 -1
  1170. package/dist/pine-core/svg/hd-video.svg +0 -1
  1171. package/dist/pine-core/svg/heading-1.svg +0 -1
  1172. package/dist/pine-core/svg/heading-2.svg +0 -1
  1173. package/dist/pine-core/svg/heading-3.svg +0 -1
  1174. package/dist/pine-core/svg/heading-4.svg +0 -1
  1175. package/dist/pine-core/svg/heading-5.svg +0 -1
  1176. package/dist/pine-core/svg/heading-6.svg +0 -1
  1177. package/dist/pine-core/svg/heading-large.svg +0 -1
  1178. package/dist/pine-core/svg/heading-small.svg +0 -1
  1179. package/dist/pine-core/svg/headset-tone.svg +0 -1
  1180. package/dist/pine-core/svg/headset.svg +0 -1
  1181. package/dist/pine-core/svg/help-filled.svg +0 -1
  1182. package/dist/pine-core/svg/help.svg +0 -1
  1183. package/dist/pine-core/svg/home-02-tone.svg +0 -1
  1184. package/dist/pine-core/svg/home-alt.svg +0 -1
  1185. package/dist/pine-core/svg/home-filled.svg +0 -1
  1186. package/dist/pine-core/svg/home.svg +0 -1
  1187. package/dist/pine-core/svg/horizontal-line.svg +0 -1
  1188. package/dist/pine-core/svg/image.svg +0 -1
  1189. package/dist/pine-core/svg/info-circle-filled.svg +0 -1
  1190. package/dist/pine-core/svg/info-circle.svg +0 -1
  1191. package/dist/pine-core/svg/ios-battery.svg +0 -1
  1192. package/dist/pine-core/svg/ios-data.svg +0 -1
  1193. package/dist/pine-core/svg/ios-wifi.svg +0 -1
  1194. package/dist/pine-core/svg/italic.svg +0 -1
  1195. package/dist/pine-core/svg/kajabi-filled.svg +0 -1
  1196. package/dist/pine-core/svg/kajabi.svg +0 -1
  1197. package/dist/pine-core/svg/klarna.svg +0 -1
  1198. package/dist/pine-core/svg/lab.svg +0 -1
  1199. package/dist/pine-core/svg/launch.svg +0 -1
  1200. package/dist/pine-core/svg/layout-grid.svg +0 -1
  1201. package/dist/pine-core/svg/layout-list.svg +0 -1
  1202. package/dist/pine-core/svg/left-small.svg +0 -1
  1203. package/dist/pine-core/svg/list-bullet.svg +0 -1
  1204. package/dist/pine-core/svg/list-details.svg +0 -1
  1205. package/dist/pine-core/svg/list-numbers.svg +0 -1
  1206. package/dist/pine-core/svg/location.svg +0 -1
  1207. package/dist/pine-core/svg/lock-alt.svg +0 -1
  1208. package/dist/pine-core/svg/lock.svg +0 -1
  1209. package/dist/pine-core/svg/logo-afterpay.svg +0 -1
  1210. package/dist/pine-core/svg/logo-facebook-round.svg +0 -1
  1211. package/dist/pine-core/svg/logo-facebook.svg +0 -1
  1212. package/dist/pine-core/svg/logo-instagram.svg +0 -1
  1213. package/dist/pine-core/svg/logo-linkedin.svg +0 -1
  1214. package/dist/pine-core/svg/logo-tiktok.svg +0 -1
  1215. package/dist/pine-core/svg/logo-twitter-x.svg +0 -1
  1216. package/dist/pine-core/svg/logo-twitter.svg +0 -1
  1217. package/dist/pine-core/svg/logo-youtube.svg +0 -1
  1218. package/dist/pine-core/svg/loop.svg +0 -1
  1219. package/dist/pine-core/svg/mail-01-tone.svg +0 -1
  1220. package/dist/pine-core/svg/mail-filled.svg +0 -1
  1221. package/dist/pine-core/svg/mail-open.svg +0 -1
  1222. package/dist/pine-core/svg/mail.svg +0 -1
  1223. package/dist/pine-core/svg/map.svg +0 -1
  1224. package/dist/pine-core/svg/mapped.svg +0 -1
  1225. package/dist/pine-core/svg/margin-left.svg +0 -1
  1226. package/dist/pine-core/svg/margin-right.svg +0 -1
  1227. package/dist/pine-core/svg/marker-filled.svg +0 -1
  1228. package/dist/pine-core/svg/marker.svg +0 -1
  1229. package/dist/pine-core/svg/megaphone-filled.svg +0 -1
  1230. package/dist/pine-core/svg/megaphone.svg +0 -1
  1231. package/dist/pine-core/svg/menu-alt.svg +0 -1
  1232. package/dist/pine-core/svg/menu-bordered.svg +0 -1
  1233. package/dist/pine-core/svg/menu.svg +0 -1
  1234. package/dist/pine-core/svg/merge.svg +0 -1
  1235. package/dist/pine-core/svg/microphone-off.svg +0 -1
  1236. package/dist/pine-core/svg/microphone.svg +0 -1
  1237. package/dist/pine-core/svg/monitor-03-tone.svg +0 -1
  1238. package/dist/pine-core/svg/monitor-filled.svg +0 -1
  1239. package/dist/pine-core/svg/monitor.svg +0 -1
  1240. package/dist/pine-core/svg/more-menu-filled.svg +0 -1
  1241. package/dist/pine-core/svg/more-menu.svg +0 -1
  1242. package/dist/pine-core/svg/move-left.svg +0 -1
  1243. package/dist/pine-core/svg/move-right.svg +0 -1
  1244. package/dist/pine-core/svg/multi-pay.svg +0 -1
  1245. package/dist/pine-core/svg/newsletter-2.svg +0 -1
  1246. package/dist/pine-core/svg/newsletter.svg +0 -1
  1247. package/dist/pine-core/svg/one-off-session.svg +0 -1
  1248. package/dist/pine-core/svg/one-time.svg +0 -1
  1249. package/dist/pine-core/svg/packages.svg +0 -1
  1250. package/dist/pine-core/svg/pause-circle.svg +0 -1
  1251. package/dist/pine-core/svg/pause.svg +0 -1
  1252. package/dist/pine-core/svg/payout.svg +0 -1
  1253. package/dist/pine-core/svg/pen.svg +0 -1
  1254. package/dist/pine-core/svg/phone-02-tone.svg +0 -1
  1255. package/dist/pine-core/svg/phone-portrait.svg +0 -1
  1256. package/dist/pine-core/svg/phone-toolbar-filled.svg +0 -1
  1257. package/dist/pine-core/svg/phone-toolbar.svg +0 -1
  1258. package/dist/pine-core/svg/play-circle.svg +0 -1
  1259. package/dist/pine-core/svg/play-outline.svg +0 -1
  1260. package/dist/pine-core/svg/play-store.svg +0 -1
  1261. package/dist/pine-core/svg/play.svg +0 -1
  1262. package/dist/pine-core/svg/plug.svg +0 -1
  1263. package/dist/pine-core/svg/premium.svg +0 -1
  1264. package/dist/pine-core/svg/present.svg +0 -1
  1265. package/dist/pine-core/svg/preview-off.svg +0 -1
  1266. package/dist/pine-core/svg/preview-on.svg +0 -1
  1267. package/dist/pine-core/svg/product-filled.svg +0 -1
  1268. package/dist/pine-core/svg/product.svg +0 -1
  1269. package/dist/pine-core/svg/question-circle.svg +0 -1
  1270. package/dist/pine-core/svg/quote.svg +0 -1
  1271. package/dist/pine-core/svg/redo.svg +0 -1
  1272. package/dist/pine-core/svg/refresh.svg +0 -1
  1273. package/dist/pine-core/svg/remove-circle.svg +0 -1
  1274. package/dist/pine-core/svg/remove.svg +0 -1
  1275. package/dist/pine-core/svg/rename.svg +0 -1
  1276. package/dist/pine-core/svg/reset-password.svg +0 -1
  1277. package/dist/pine-core/svg/restore.svg +0 -1
  1278. package/dist/pine-core/svg/right-small.svg +0 -1
  1279. package/dist/pine-core/svg/rocket-filled.svg +0 -1
  1280. package/dist/pine-core/svg/rocket.svg +0 -1
  1281. package/dist/pine-core/svg/round-dollar.svg +0 -1
  1282. package/dist/pine-core/svg/rows.svg +0 -1
  1283. package/dist/pine-core/svg/scissor.svg +0 -1
  1284. package/dist/pine-core/svg/screen-share-off.svg +0 -1
  1285. package/dist/pine-core/svg/screen-share-on.svg +0 -1
  1286. package/dist/pine-core/svg/search-md-tone.svg +0 -1
  1287. package/dist/pine-core/svg/search-small.svg +0 -1
  1288. package/dist/pine-core/svg/search.svg +0 -1
  1289. package/dist/pine-core/svg/send-message.svg +0 -1
  1290. package/dist/pine-core/svg/sequences.svg +0 -1
  1291. package/dist/pine-core/svg/settings-01-tone.svg +0 -1
  1292. package/dist/pine-core/svg/share.svg +0 -1
  1293. package/dist/pine-core/svg/skipped.svg +0 -1
  1294. package/dist/pine-core/svg/slash-divider.svg +0 -1
  1295. package/dist/pine-core/svg/speaker.svg +0 -1
  1296. package/dist/pine-core/svg/stack.svg +0 -1
  1297. package/dist/pine-core/svg/star.svg +0 -1
  1298. package/dist/pine-core/svg/stars-01-tone.svg +0 -1
  1299. package/dist/pine-core/svg/stop.svg +0 -1
  1300. package/dist/pine-core/svg/stopwatch.svg +0 -1
  1301. package/dist/pine-core/svg/strikethrough.svg +0 -1
  1302. package/dist/pine-core/svg/subscript.svg +0 -1
  1303. package/dist/pine-core/svg/subscriptions.svg +0 -1
  1304. package/dist/pine-core/svg/super-admin.svg +0 -1
  1305. package/dist/pine-core/svg/superscript.svg +0 -1
  1306. package/dist/pine-core/svg/sync.svg +0 -1
  1307. package/dist/pine-core/svg/tablet-landscape.svg +0 -1
  1308. package/dist/pine-core/svg/tablet-portrait.svg +0 -1
  1309. package/dist/pine-core/svg/tag-filled.svg +0 -1
  1310. package/dist/pine-core/svg/tag.svg +0 -1
  1311. package/dist/pine-core/svg/text-styles.svg +0 -1
  1312. package/dist/pine-core/svg/theme-store-filled.svg +0 -1
  1313. package/dist/pine-core/svg/theme-store.svg +0 -1
  1314. package/dist/pine-core/svg/thumb-down-filled.svg +0 -1
  1315. package/dist/pine-core/svg/thumb-down.svg +0 -1
  1316. package/dist/pine-core/svg/thumb-up-filled.svg +0 -1
  1317. package/dist/pine-core/svg/thumb-up.svg +0 -1
  1318. package/dist/pine-core/svg/trash.svg +0 -1
  1319. package/dist/pine-core/svg/trophy-filled.svg +0 -1
  1320. package/dist/pine-core/svg/trophy.svg +0 -1
  1321. package/dist/pine-core/svg/underline.svg +0 -1
  1322. package/dist/pine-core/svg/undo.svg +0 -1
  1323. package/dist/pine-core/svg/unlock.svg +0 -1
  1324. package/dist/pine-core/svg/unmapped.svg +0 -1
  1325. package/dist/pine-core/svg/up-small.svg +0 -1
  1326. package/dist/pine-core/svg/upload.svg +0 -1
  1327. package/dist/pine-core/svg/url.svg +0 -1
  1328. package/dist/pine-core/svg/user-circle-filled.svg +0 -1
  1329. package/dist/pine-core/svg/user-circle.svg +0 -1
  1330. package/dist/pine-core/svg/user-filled.svg +0 -1
  1331. package/dist/pine-core/svg/user-star-filled.svg +0 -1
  1332. package/dist/pine-core/svg/user-star.svg +0 -1
  1333. package/dist/pine-core/svg/user.svg +0 -1
  1334. package/dist/pine-core/svg/users-02-tone.svg +0 -1
  1335. package/dist/pine-core/svg/users-alt.svg +0 -1
  1336. package/dist/pine-core/svg/users-filled.svg +0 -1
  1337. package/dist/pine-core/svg/users.svg +0 -1
  1338. package/dist/pine-core/svg/video-off.svg +0 -1
  1339. package/dist/pine-core/svg/video-on.svg +0 -1
  1340. package/dist/pine-core/svg/warning-filled.svg +0 -1
  1341. package/dist/pine-core/svg/warning.svg +0 -1
  1342. package/dist/pine-core/svg/window-paragraph.svg +0 -1
  1343. package/dist/pine-core/svg/world.svg +0 -1
  1344. package/dist/pine-core/svg/wrench.svg +0 -1
  1345. package/dist/types/stories/_helpers/index.d.ts +0 -12
  1346. package/loader/package.json +0 -11
@@ -0,0 +1,2903 @@
1
+ import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-CTLu1TM4.js';
2
+ import { i as isSpecTest, m as messageId, a as assignDescription } from './form-BuRbS7Hp.js';
3
+ import { c as computePosition, a as autoUpdate, o as offset, f as flip, s as shift } from './floating-ui.dom-DDtwbwIl.js';
4
+ import { d as debounceEvent } from './utils-tJa4KYNO.js';
5
+
6
+ /*! @license DOMPurify 3.3.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.3/LICENSE */
7
+
8
+ const {
9
+ entries,
10
+ setPrototypeOf,
11
+ isFrozen,
12
+ getPrototypeOf,
13
+ getOwnPropertyDescriptor
14
+ } = Object;
15
+ let {
16
+ freeze,
17
+ seal,
18
+ create
19
+ } = Object; // eslint-disable-line import/no-mutable-exports
20
+ let {
21
+ apply,
22
+ construct
23
+ } = typeof Reflect !== 'undefined' && Reflect;
24
+ if (!freeze) {
25
+ freeze = function freeze(x) {
26
+ return x;
27
+ };
28
+ }
29
+ if (!seal) {
30
+ seal = function seal(x) {
31
+ return x;
32
+ };
33
+ }
34
+ if (!apply) {
35
+ apply = function apply(func, thisArg) {
36
+ for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
37
+ args[_key - 2] = arguments[_key];
38
+ }
39
+ return func.apply(thisArg, args);
40
+ };
41
+ }
42
+ if (!construct) {
43
+ construct = function construct(Func) {
44
+ for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
45
+ args[_key2 - 1] = arguments[_key2];
46
+ }
47
+ return new Func(...args);
48
+ };
49
+ }
50
+ const arrayForEach = unapply(Array.prototype.forEach);
51
+ const arrayLastIndexOf = unapply(Array.prototype.lastIndexOf);
52
+ const arrayPop = unapply(Array.prototype.pop);
53
+ const arrayPush = unapply(Array.prototype.push);
54
+ const arraySplice = unapply(Array.prototype.splice);
55
+ const stringToLowerCase = unapply(String.prototype.toLowerCase);
56
+ const stringToString = unapply(String.prototype.toString);
57
+ const stringMatch = unapply(String.prototype.match);
58
+ const stringReplace = unapply(String.prototype.replace);
59
+ const stringIndexOf = unapply(String.prototype.indexOf);
60
+ const stringTrim = unapply(String.prototype.trim);
61
+ const objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty);
62
+ const regExpTest = unapply(RegExp.prototype.test);
63
+ const typeErrorCreate = unconstruct(TypeError);
64
+ /**
65
+ * Creates a new function that calls the given function with a specified thisArg and arguments.
66
+ *
67
+ * @param func - The function to be wrapped and called.
68
+ * @returns A new function that calls the given function with a specified thisArg and arguments.
69
+ */
70
+ function unapply(func) {
71
+ return function (thisArg) {
72
+ if (thisArg instanceof RegExp) {
73
+ thisArg.lastIndex = 0;
74
+ }
75
+ for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
76
+ args[_key3 - 1] = arguments[_key3];
77
+ }
78
+ return apply(func, thisArg, args);
79
+ };
80
+ }
81
+ /**
82
+ * Creates a new function that constructs an instance of the given constructor function with the provided arguments.
83
+ *
84
+ * @param func - The constructor function to be wrapped and called.
85
+ * @returns A new function that constructs an instance of the given constructor function with the provided arguments.
86
+ */
87
+ function unconstruct(Func) {
88
+ return function () {
89
+ for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
90
+ args[_key4] = arguments[_key4];
91
+ }
92
+ return construct(Func, args);
93
+ };
94
+ }
95
+ /**
96
+ * Add properties to a lookup table
97
+ *
98
+ * @param set - The set to which elements will be added.
99
+ * @param array - The array containing elements to be added to the set.
100
+ * @param transformCaseFunc - An optional function to transform the case of each element before adding to the set.
101
+ * @returns The modified set with added elements.
102
+ */
103
+ function addToSet(set, array) {
104
+ let transformCaseFunc = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : stringToLowerCase;
105
+ if (setPrototypeOf) {
106
+ // Make 'in' and truthy checks like Boolean(set.constructor)
107
+ // independent of any properties defined on Object.prototype.
108
+ // Prevent prototype setters from intercepting set as a this value.
109
+ setPrototypeOf(set, null);
110
+ }
111
+ let l = array.length;
112
+ while (l--) {
113
+ let element = array[l];
114
+ if (typeof element === 'string') {
115
+ const lcElement = transformCaseFunc(element);
116
+ if (lcElement !== element) {
117
+ // Config presets (e.g. tags.js, attrs.js) are immutable.
118
+ if (!isFrozen(array)) {
119
+ array[l] = lcElement;
120
+ }
121
+ element = lcElement;
122
+ }
123
+ }
124
+ set[element] = true;
125
+ }
126
+ return set;
127
+ }
128
+ /**
129
+ * Clean up an array to harden against CSPP
130
+ *
131
+ * @param array - The array to be cleaned.
132
+ * @returns The cleaned version of the array
133
+ */
134
+ function cleanArray(array) {
135
+ for (let index = 0; index < array.length; index++) {
136
+ const isPropertyExist = objectHasOwnProperty(array, index);
137
+ if (!isPropertyExist) {
138
+ array[index] = null;
139
+ }
140
+ }
141
+ return array;
142
+ }
143
+ /**
144
+ * Shallow clone an object
145
+ *
146
+ * @param object - The object to be cloned.
147
+ * @returns A new object that copies the original.
148
+ */
149
+ function clone(object) {
150
+ const newObject = create(null);
151
+ for (const [property, value] of entries(object)) {
152
+ const isPropertyExist = objectHasOwnProperty(object, property);
153
+ if (isPropertyExist) {
154
+ if (Array.isArray(value)) {
155
+ newObject[property] = cleanArray(value);
156
+ } else if (value && typeof value === 'object' && value.constructor === Object) {
157
+ newObject[property] = clone(value);
158
+ } else {
159
+ newObject[property] = value;
160
+ }
161
+ }
162
+ }
163
+ return newObject;
164
+ }
165
+ /**
166
+ * This method automatically checks if the prop is function or getter and behaves accordingly.
167
+ *
168
+ * @param object - The object to look up the getter function in its prototype chain.
169
+ * @param prop - The property name for which to find the getter function.
170
+ * @returns The getter function found in the prototype chain or a fallback function.
171
+ */
172
+ function lookupGetter(object, prop) {
173
+ while (object !== null) {
174
+ const desc = getOwnPropertyDescriptor(object, prop);
175
+ if (desc) {
176
+ if (desc.get) {
177
+ return unapply(desc.get);
178
+ }
179
+ if (typeof desc.value === 'function') {
180
+ return unapply(desc.value);
181
+ }
182
+ }
183
+ object = getPrototypeOf(object);
184
+ }
185
+ function fallbackValue() {
186
+ return null;
187
+ }
188
+ return fallbackValue;
189
+ }
190
+
191
+ const html$1 = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'search', 'section', 'select', 'shadow', 'slot', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']);
192
+ const svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'enterkeyhint', 'exportparts', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'inputmode', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'part', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);
193
+ const svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feDropShadow', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']);
194
+ // List of SVG elements that are disallowed by default.
195
+ // We still need to know them so that we can do namespace
196
+ // checks properly in case one wants to add them to
197
+ // allow-list.
198
+ const svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'foreignobject', 'hatch', 'hatchpath', 'mesh', 'meshgradient', 'meshpatch', 'meshrow', 'missing-glyph', 'script', 'set', 'solidcolor', 'unknown', 'use']);
199
+ const mathMl$1 = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow', 'ms', 'mspace', 'msqrt', 'mstyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', 'munderover', 'mprescripts']);
200
+ // Similarly to SVG, we want to know all MathML elements,
201
+ // even those that we disallow by default.
202
+ const mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);
203
+ const text = freeze(['#text']);
204
+
205
+ const html = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'exportparts', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inert', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'nonce', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'part', 'pattern', 'placeholder', 'playsinline', 'popover', 'popovertarget', 'popovertargetaction', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'slot', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'wrap', 'xmlns', 'slot']);
206
+ const svg = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'amplitude', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'exponent', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'intercept', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'mask-type', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'slope', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'tablevalues', 'targetx', 'targety', 'transform', 'transform-origin', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']);
207
+ const mathMl = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnsalign', 'columnlines', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lspace', 'lquote', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']);
208
+ const xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);
209
+
210
+ // eslint-disable-next-line unicorn/better-regex
211
+ const MUSTACHE_EXPR = seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode
212
+ const ERB_EXPR = seal(/<%[\w\W]*|[\w\W]*%>/gm);
213
+ const TMPLIT_EXPR = seal(/\$\{[\w\W]*/gm); // eslint-disable-line unicorn/better-regex
214
+ const DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]+$/); // eslint-disable-line no-useless-escape
215
+ const ARIA_ATTR = seal(/^aria-[\-\w]+$/); // eslint-disable-line no-useless-escape
216
+ const IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i // eslint-disable-line no-useless-escape
217
+ );
218
+ const IS_SCRIPT_OR_DATA = seal(/^(?:\w+script|data):/i);
219
+ const ATTR_WHITESPACE = seal(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g // eslint-disable-line no-control-regex
220
+ );
221
+ const DOCTYPE_NAME = seal(/^html$/i);
222
+ const CUSTOM_ELEMENT = seal(/^[a-z][.\w]*(-[.\w]+)+$/i);
223
+
224
+ var EXPRESSIONS = /*#__PURE__*/Object.freeze({
225
+ __proto__: null,
226
+ ARIA_ATTR: ARIA_ATTR,
227
+ ATTR_WHITESPACE: ATTR_WHITESPACE,
228
+ CUSTOM_ELEMENT: CUSTOM_ELEMENT,
229
+ DATA_ATTR: DATA_ATTR,
230
+ DOCTYPE_NAME: DOCTYPE_NAME,
231
+ ERB_EXPR: ERB_EXPR,
232
+ IS_ALLOWED_URI: IS_ALLOWED_URI,
233
+ IS_SCRIPT_OR_DATA: IS_SCRIPT_OR_DATA,
234
+ MUSTACHE_EXPR: MUSTACHE_EXPR,
235
+ TMPLIT_EXPR: TMPLIT_EXPR
236
+ });
237
+
238
+ /* eslint-disable @typescript-eslint/indent */
239
+ // https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType
240
+ const NODE_TYPE = {
241
+ element: 1,
242
+ text: 3,
243
+ // Deprecated
244
+ progressingInstruction: 7,
245
+ comment: 8,
246
+ document: 9};
247
+ const getGlobal = function getGlobal() {
248
+ return typeof window === 'undefined' ? null : window;
249
+ };
250
+ /**
251
+ * Creates a no-op policy for internal use only.
252
+ * Don't export this function outside this module!
253
+ * @param trustedTypes The policy factory.
254
+ * @param purifyHostElement The Script element used to load DOMPurify (to determine policy name suffix).
255
+ * @return The policy created (or null, if Trusted Types
256
+ * are not supported or creating the policy failed).
257
+ */
258
+ const _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, purifyHostElement) {
259
+ if (typeof trustedTypes !== 'object' || typeof trustedTypes.createPolicy !== 'function') {
260
+ return null;
261
+ }
262
+ // Allow the callers to control the unique policy name
263
+ // by adding a data-tt-policy-suffix to the script element with the DOMPurify.
264
+ // Policy creation with duplicate names throws in Trusted Types.
265
+ let suffix = null;
266
+ const ATTR_NAME = 'data-tt-policy-suffix';
267
+ if (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) {
268
+ suffix = purifyHostElement.getAttribute(ATTR_NAME);
269
+ }
270
+ const policyName = 'dompurify' + (suffix ? '#' + suffix : '');
271
+ try {
272
+ return trustedTypes.createPolicy(policyName, {
273
+ createHTML(html) {
274
+ return html;
275
+ },
276
+ createScriptURL(scriptUrl) {
277
+ return scriptUrl;
278
+ }
279
+ });
280
+ } catch (_) {
281
+ // Policy creation failed (most likely another DOMPurify script has
282
+ // already run). Skip creating the policy, as this will only cause errors
283
+ // if TT are enforced.
284
+ console.warn('TrustedTypes policy ' + policyName + ' could not be created.');
285
+ return null;
286
+ }
287
+ };
288
+ const _createHooksMap = function _createHooksMap() {
289
+ return {
290
+ afterSanitizeAttributes: [],
291
+ afterSanitizeElements: [],
292
+ afterSanitizeShadowDOM: [],
293
+ beforeSanitizeAttributes: [],
294
+ beforeSanitizeElements: [],
295
+ beforeSanitizeShadowDOM: [],
296
+ uponSanitizeAttribute: [],
297
+ uponSanitizeElement: [],
298
+ uponSanitizeShadowNode: []
299
+ };
300
+ };
301
+ function createDOMPurify() {
302
+ let window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();
303
+ const DOMPurify = root => createDOMPurify(root);
304
+ DOMPurify.version = '3.3.3';
305
+ DOMPurify.removed = [];
306
+ if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document || !window.Element) {
307
+ // Not running in a browser, provide a factory function
308
+ // so that you can pass your own Window
309
+ DOMPurify.isSupported = false;
310
+ return DOMPurify;
311
+ }
312
+ let {
313
+ document
314
+ } = window;
315
+ const originalDocument = document;
316
+ const currentScript = originalDocument.currentScript;
317
+ const {
318
+ DocumentFragment,
319
+ HTMLTemplateElement,
320
+ Node,
321
+ Element,
322
+ NodeFilter,
323
+ NamedNodeMap = window.NamedNodeMap || window.MozNamedAttrMap,
324
+ HTMLFormElement,
325
+ DOMParser,
326
+ trustedTypes
327
+ } = window;
328
+ const ElementPrototype = Element.prototype;
329
+ const cloneNode = lookupGetter(ElementPrototype, 'cloneNode');
330
+ const remove = lookupGetter(ElementPrototype, 'remove');
331
+ const getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');
332
+ const getChildNodes = lookupGetter(ElementPrototype, 'childNodes');
333
+ const getParentNode = lookupGetter(ElementPrototype, 'parentNode');
334
+ // As per issue #47, the web-components registry is inherited by a
335
+ // new document created via createHTMLDocument. As per the spec
336
+ // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)
337
+ // a new empty registry is used when creating a template contents owner
338
+ // document, so we use that as our parent document to ensure nothing
339
+ // is inherited.
340
+ if (typeof HTMLTemplateElement === 'function') {
341
+ const template = document.createElement('template');
342
+ if (template.content && template.content.ownerDocument) {
343
+ document = template.content.ownerDocument;
344
+ }
345
+ }
346
+ let trustedTypesPolicy;
347
+ let emptyHTML = '';
348
+ const {
349
+ implementation,
350
+ createNodeIterator,
351
+ createDocumentFragment,
352
+ getElementsByTagName
353
+ } = document;
354
+ const {
355
+ importNode
356
+ } = originalDocument;
357
+ let hooks = _createHooksMap();
358
+ /**
359
+ * Expose whether this browser supports running the full DOMPurify.
360
+ */
361
+ DOMPurify.isSupported = typeof entries === 'function' && typeof getParentNode === 'function' && implementation && implementation.createHTMLDocument !== undefined;
362
+ const {
363
+ MUSTACHE_EXPR,
364
+ ERB_EXPR,
365
+ TMPLIT_EXPR,
366
+ DATA_ATTR,
367
+ ARIA_ATTR,
368
+ IS_SCRIPT_OR_DATA,
369
+ ATTR_WHITESPACE,
370
+ CUSTOM_ELEMENT
371
+ } = EXPRESSIONS;
372
+ let {
373
+ IS_ALLOWED_URI: IS_ALLOWED_URI$1
374
+ } = EXPRESSIONS;
375
+ /**
376
+ * We consider the elements and attributes below to be safe. Ideally
377
+ * don't add any new ones but feel free to remove unwanted ones.
378
+ */
379
+ /* allowed element names */
380
+ let ALLOWED_TAGS = null;
381
+ const DEFAULT_ALLOWED_TAGS = addToSet({}, [...html$1, ...svg$1, ...svgFilters, ...mathMl$1, ...text]);
382
+ /* Allowed attribute names */
383
+ let ALLOWED_ATTR = null;
384
+ const DEFAULT_ALLOWED_ATTR = addToSet({}, [...html, ...svg, ...mathMl, ...xml]);
385
+ /*
386
+ * Configure how DOMPurify should handle custom elements and their attributes as well as customized built-in elements.
387
+ * @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)
388
+ * @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)
389
+ * @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.
390
+ */
391
+ let CUSTOM_ELEMENT_HANDLING = Object.seal(create(null, {
392
+ tagNameCheck: {
393
+ writable: true,
394
+ configurable: false,
395
+ enumerable: true,
396
+ value: null
397
+ },
398
+ attributeNameCheck: {
399
+ writable: true,
400
+ configurable: false,
401
+ enumerable: true,
402
+ value: null
403
+ },
404
+ allowCustomizedBuiltInElements: {
405
+ writable: true,
406
+ configurable: false,
407
+ enumerable: true,
408
+ value: false
409
+ }
410
+ }));
411
+ /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */
412
+ let FORBID_TAGS = null;
413
+ /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */
414
+ let FORBID_ATTR = null;
415
+ /* Config object to store ADD_TAGS/ADD_ATTR functions (when used as functions) */
416
+ const EXTRA_ELEMENT_HANDLING = Object.seal(create(null, {
417
+ tagCheck: {
418
+ writable: true,
419
+ configurable: false,
420
+ enumerable: true,
421
+ value: null
422
+ },
423
+ attributeCheck: {
424
+ writable: true,
425
+ configurable: false,
426
+ enumerable: true,
427
+ value: null
428
+ }
429
+ }));
430
+ /* Decide if ARIA attributes are okay */
431
+ let ALLOW_ARIA_ATTR = true;
432
+ /* Decide if custom data attributes are okay */
433
+ let ALLOW_DATA_ATTR = true;
434
+ /* Decide if unknown protocols are okay */
435
+ let ALLOW_UNKNOWN_PROTOCOLS = false;
436
+ /* Decide if self-closing tags in attributes are allowed.
437
+ * Usually removed due to a mXSS issue in jQuery 3.0 */
438
+ let ALLOW_SELF_CLOSE_IN_ATTR = true;
439
+ /* Output should be safe for common template engines.
440
+ * This means, DOMPurify removes data attributes, mustaches and ERB
441
+ */
442
+ let SAFE_FOR_TEMPLATES = false;
443
+ /* Output should be safe even for XML used within HTML and alike.
444
+ * This means, DOMPurify removes comments when containing risky content.
445
+ */
446
+ let SAFE_FOR_XML = true;
447
+ /* Decide if document with <html>... should be returned */
448
+ let WHOLE_DOCUMENT = false;
449
+ /* Track whether config is already set on this instance of DOMPurify. */
450
+ let SET_CONFIG = false;
451
+ /* Decide if all elements (e.g. style, script) must be children of
452
+ * document.body. By default, browsers might move them to document.head */
453
+ let FORCE_BODY = false;
454
+ /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html
455
+ * string (or a TrustedHTML object if Trusted Types are supported).
456
+ * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead
457
+ */
458
+ let RETURN_DOM = false;
459
+ /* Decide if a DOM `DocumentFragment` should be returned, instead of a html
460
+ * string (or a TrustedHTML object if Trusted Types are supported) */
461
+ let RETURN_DOM_FRAGMENT = false;
462
+ /* Try to return a Trusted Type object instead of a string, return a string in
463
+ * case Trusted Types are not supported */
464
+ let RETURN_TRUSTED_TYPE = false;
465
+ /* Output should be free from DOM clobbering attacks?
466
+ * This sanitizes markups named with colliding, clobberable built-in DOM APIs.
467
+ */
468
+ let SANITIZE_DOM = true;
469
+ /* Achieve full DOM Clobbering protection by isolating the namespace of named
470
+ * properties and JS variables, mitigating attacks that abuse the HTML/DOM spec rules.
471
+ *
472
+ * HTML/DOM spec rules that enable DOM Clobbering:
473
+ * - Named Access on Window (§7.3.3)
474
+ * - DOM Tree Accessors (§3.1.5)
475
+ * - Form Element Parent-Child Relations (§4.10.3)
476
+ * - Iframe srcdoc / Nested WindowProxies (§4.8.5)
477
+ * - HTMLCollection (§4.2.10.2)
478
+ *
479
+ * Namespace isolation is implemented by prefixing `id` and `name` attributes
480
+ * with a constant string, i.e., `user-content-`
481
+ */
482
+ let SANITIZE_NAMED_PROPS = false;
483
+ const SANITIZE_NAMED_PROPS_PREFIX = 'user-content-';
484
+ /* Keep element content when removing element? */
485
+ let KEEP_CONTENT = true;
486
+ /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead
487
+ * of importing it into a new Document and returning a sanitized copy */
488
+ let IN_PLACE = false;
489
+ /* Allow usage of profiles like html, svg and mathMl */
490
+ let USE_PROFILES = {};
491
+ /* Tags to ignore content of when KEEP_CONTENT is true */
492
+ let FORBID_CONTENTS = null;
493
+ const DEFAULT_FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']);
494
+ /* Tags that are safe for data: URIs */
495
+ let DATA_URI_TAGS = null;
496
+ const DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);
497
+ /* Attributes safe for values like "javascript:" */
498
+ let URI_SAFE_ATTRIBUTES = null;
499
+ const DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'role', 'summary', 'title', 'value', 'style', 'xmlns']);
500
+ const MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';
501
+ const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
502
+ const HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';
503
+ /* Document namespace */
504
+ let NAMESPACE = HTML_NAMESPACE;
505
+ let IS_EMPTY_INPUT = false;
506
+ /* Allowed XHTML+XML namespaces */
507
+ let ALLOWED_NAMESPACES = null;
508
+ const DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString);
509
+ let MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']);
510
+ let HTML_INTEGRATION_POINTS = addToSet({}, ['annotation-xml']);
511
+ // Certain elements are allowed in both SVG and HTML
512
+ // namespace. We need to specify them explicitly
513
+ // so that they don't get erroneously deleted from
514
+ // HTML namespace.
515
+ const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ['title', 'style', 'font', 'a', 'script']);
516
+ /* Parsing of strict XHTML documents */
517
+ let PARSER_MEDIA_TYPE = null;
518
+ const SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html'];
519
+ const DEFAULT_PARSER_MEDIA_TYPE = 'text/html';
520
+ let transformCaseFunc = null;
521
+ /* Keep a reference to config to pass to hooks */
522
+ let CONFIG = null;
523
+ /* Ideally, do not touch anything below this line */
524
+ /* ______________________________________________ */
525
+ const formElement = document.createElement('form');
526
+ const isRegexOrFunction = function isRegexOrFunction(testValue) {
527
+ return testValue instanceof RegExp || testValue instanceof Function;
528
+ };
529
+ /**
530
+ * _parseConfig
531
+ *
532
+ * @param cfg optional config literal
533
+ */
534
+ // eslint-disable-next-line complexity
535
+ const _parseConfig = function _parseConfig() {
536
+ let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
537
+ if (CONFIG && CONFIG === cfg) {
538
+ return;
539
+ }
540
+ /* Shield configuration object from tampering */
541
+ if (!cfg || typeof cfg !== 'object') {
542
+ cfg = {};
543
+ }
544
+ /* Shield configuration object from prototype pollution */
545
+ cfg = clone(cfg);
546
+ PARSER_MEDIA_TYPE =
547
+ // eslint-disable-next-line unicorn/prefer-includes
548
+ SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? DEFAULT_PARSER_MEDIA_TYPE : cfg.PARSER_MEDIA_TYPE;
549
+ // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.
550
+ transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? stringToString : stringToLowerCase;
551
+ /* Set configuration parameters */
552
+ ALLOWED_TAGS = objectHasOwnProperty(cfg, 'ALLOWED_TAGS') ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;
553
+ ALLOWED_ATTR = objectHasOwnProperty(cfg, 'ALLOWED_ATTR') ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;
554
+ ALLOWED_NAMESPACES = objectHasOwnProperty(cfg, 'ALLOWED_NAMESPACES') ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;
555
+ URI_SAFE_ATTRIBUTES = objectHasOwnProperty(cfg, 'ADD_URI_SAFE_ATTR') ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), cfg.ADD_URI_SAFE_ATTR, transformCaseFunc) : DEFAULT_URI_SAFE_ATTRIBUTES;
556
+ DATA_URI_TAGS = objectHasOwnProperty(cfg, 'ADD_DATA_URI_TAGS') ? addToSet(clone(DEFAULT_DATA_URI_TAGS), cfg.ADD_DATA_URI_TAGS, transformCaseFunc) : DEFAULT_DATA_URI_TAGS;
557
+ FORBID_CONTENTS = objectHasOwnProperty(cfg, 'FORBID_CONTENTS') ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;
558
+ FORBID_TAGS = objectHasOwnProperty(cfg, 'FORBID_TAGS') ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : clone({});
559
+ FORBID_ATTR = objectHasOwnProperty(cfg, 'FORBID_ATTR') ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : clone({});
560
+ USE_PROFILES = objectHasOwnProperty(cfg, 'USE_PROFILES') ? cfg.USE_PROFILES : false;
561
+ ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true
562
+ ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true
563
+ ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false
564
+ ALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false; // Default true
565
+ SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false
566
+ SAFE_FOR_XML = cfg.SAFE_FOR_XML !== false; // Default true
567
+ WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false
568
+ RETURN_DOM = cfg.RETURN_DOM || false; // Default false
569
+ RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false
570
+ RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false
571
+ FORCE_BODY = cfg.FORCE_BODY || false; // Default false
572
+ SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true
573
+ SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false; // Default false
574
+ KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true
575
+ IN_PLACE = cfg.IN_PLACE || false; // Default false
576
+ IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI;
577
+ NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;
578
+ MATHML_TEXT_INTEGRATION_POINTS = cfg.MATHML_TEXT_INTEGRATION_POINTS || MATHML_TEXT_INTEGRATION_POINTS;
579
+ HTML_INTEGRATION_POINTS = cfg.HTML_INTEGRATION_POINTS || HTML_INTEGRATION_POINTS;
580
+ CUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING || {};
581
+ if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) {
582
+ CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;
583
+ }
584
+ if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) {
585
+ CUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;
586
+ }
587
+ if (cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === 'boolean') {
588
+ CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements;
589
+ }
590
+ if (SAFE_FOR_TEMPLATES) {
591
+ ALLOW_DATA_ATTR = false;
592
+ }
593
+ if (RETURN_DOM_FRAGMENT) {
594
+ RETURN_DOM = true;
595
+ }
596
+ /* Parse profile info */
597
+ if (USE_PROFILES) {
598
+ ALLOWED_TAGS = addToSet({}, text);
599
+ ALLOWED_ATTR = create(null);
600
+ if (USE_PROFILES.html === true) {
601
+ addToSet(ALLOWED_TAGS, html$1);
602
+ addToSet(ALLOWED_ATTR, html);
603
+ }
604
+ if (USE_PROFILES.svg === true) {
605
+ addToSet(ALLOWED_TAGS, svg$1);
606
+ addToSet(ALLOWED_ATTR, svg);
607
+ addToSet(ALLOWED_ATTR, xml);
608
+ }
609
+ if (USE_PROFILES.svgFilters === true) {
610
+ addToSet(ALLOWED_TAGS, svgFilters);
611
+ addToSet(ALLOWED_ATTR, svg);
612
+ addToSet(ALLOWED_ATTR, xml);
613
+ }
614
+ if (USE_PROFILES.mathMl === true) {
615
+ addToSet(ALLOWED_TAGS, mathMl$1);
616
+ addToSet(ALLOWED_ATTR, mathMl);
617
+ addToSet(ALLOWED_ATTR, xml);
618
+ }
619
+ }
620
+ /* Prevent function-based ADD_ATTR / ADD_TAGS from leaking across calls */
621
+ if (!objectHasOwnProperty(cfg, 'ADD_TAGS')) {
622
+ EXTRA_ELEMENT_HANDLING.tagCheck = null;
623
+ }
624
+ if (!objectHasOwnProperty(cfg, 'ADD_ATTR')) {
625
+ EXTRA_ELEMENT_HANDLING.attributeCheck = null;
626
+ }
627
+ /* Merge configuration parameters */
628
+ if (cfg.ADD_TAGS) {
629
+ if (typeof cfg.ADD_TAGS === 'function') {
630
+ EXTRA_ELEMENT_HANDLING.tagCheck = cfg.ADD_TAGS;
631
+ } else {
632
+ if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {
633
+ ALLOWED_TAGS = clone(ALLOWED_TAGS);
634
+ }
635
+ addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);
636
+ }
637
+ }
638
+ if (cfg.ADD_ATTR) {
639
+ if (typeof cfg.ADD_ATTR === 'function') {
640
+ EXTRA_ELEMENT_HANDLING.attributeCheck = cfg.ADD_ATTR;
641
+ } else {
642
+ if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {
643
+ ALLOWED_ATTR = clone(ALLOWED_ATTR);
644
+ }
645
+ addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);
646
+ }
647
+ }
648
+ if (cfg.ADD_URI_SAFE_ATTR) {
649
+ addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);
650
+ }
651
+ if (cfg.FORBID_CONTENTS) {
652
+ if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {
653
+ FORBID_CONTENTS = clone(FORBID_CONTENTS);
654
+ }
655
+ addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);
656
+ }
657
+ if (cfg.ADD_FORBID_CONTENTS) {
658
+ if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {
659
+ FORBID_CONTENTS = clone(FORBID_CONTENTS);
660
+ }
661
+ addToSet(FORBID_CONTENTS, cfg.ADD_FORBID_CONTENTS, transformCaseFunc);
662
+ }
663
+ /* Add #text in case KEEP_CONTENT is set to true */
664
+ if (KEEP_CONTENT) {
665
+ ALLOWED_TAGS['#text'] = true;
666
+ }
667
+ /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */
668
+ if (WHOLE_DOCUMENT) {
669
+ addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);
670
+ }
671
+ /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */
672
+ if (ALLOWED_TAGS.table) {
673
+ addToSet(ALLOWED_TAGS, ['tbody']);
674
+ delete FORBID_TAGS.tbody;
675
+ }
676
+ if (cfg.TRUSTED_TYPES_POLICY) {
677
+ if (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== 'function') {
678
+ throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
679
+ }
680
+ if (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== 'function') {
681
+ throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
682
+ }
683
+ // Overwrite existing TrustedTypes policy.
684
+ trustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY;
685
+ // Sign local variables required by `sanitize`.
686
+ emptyHTML = trustedTypesPolicy.createHTML('');
687
+ } else {
688
+ // Uninitialized policy, attempt to initialize the internal dompurify policy.
689
+ if (trustedTypesPolicy === undefined) {
690
+ trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript);
691
+ }
692
+ // If creating the internal policy succeeded sign internal variables.
693
+ if (trustedTypesPolicy !== null && typeof emptyHTML === 'string') {
694
+ emptyHTML = trustedTypesPolicy.createHTML('');
695
+ }
696
+ }
697
+ // Prevent further manipulation of configuration.
698
+ // Not available in IE8, Safari 5, etc.
699
+ if (freeze) {
700
+ freeze(cfg);
701
+ }
702
+ CONFIG = cfg;
703
+ };
704
+ /* Keep track of all possible SVG and MathML tags
705
+ * so that we can perform the namespace checks
706
+ * correctly. */
707
+ const ALL_SVG_TAGS = addToSet({}, [...svg$1, ...svgFilters, ...svgDisallowed]);
708
+ const ALL_MATHML_TAGS = addToSet({}, [...mathMl$1, ...mathMlDisallowed]);
709
+ /**
710
+ * @param element a DOM element whose namespace is being checked
711
+ * @returns Return false if the element has a
712
+ * namespace that a spec-compliant parser would never
713
+ * return. Return true otherwise.
714
+ */
715
+ const _checkValidNamespace = function _checkValidNamespace(element) {
716
+ let parent = getParentNode(element);
717
+ // In JSDOM, if we're inside shadow DOM, then parentNode
718
+ // can be null. We just simulate parent in this case.
719
+ if (!parent || !parent.tagName) {
720
+ parent = {
721
+ namespaceURI: NAMESPACE,
722
+ tagName: 'template'
723
+ };
724
+ }
725
+ const tagName = stringToLowerCase(element.tagName);
726
+ const parentTagName = stringToLowerCase(parent.tagName);
727
+ if (!ALLOWED_NAMESPACES[element.namespaceURI]) {
728
+ return false;
729
+ }
730
+ if (element.namespaceURI === SVG_NAMESPACE) {
731
+ // The only way to switch from HTML namespace to SVG
732
+ // is via <svg>. If it happens via any other tag, then
733
+ // it should be killed.
734
+ if (parent.namespaceURI === HTML_NAMESPACE) {
735
+ return tagName === 'svg';
736
+ }
737
+ // The only way to switch from MathML to SVG is via`
738
+ // svg if parent is either <annotation-xml> or MathML
739
+ // text integration points.
740
+ if (parent.namespaceURI === MATHML_NAMESPACE) {
741
+ return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);
742
+ }
743
+ // We only allow elements that are defined in SVG
744
+ // spec. All others are disallowed in SVG namespace.
745
+ return Boolean(ALL_SVG_TAGS[tagName]);
746
+ }
747
+ if (element.namespaceURI === MATHML_NAMESPACE) {
748
+ // The only way to switch from HTML namespace to MathML
749
+ // is via <math>. If it happens via any other tag, then
750
+ // it should be killed.
751
+ if (parent.namespaceURI === HTML_NAMESPACE) {
752
+ return tagName === 'math';
753
+ }
754
+ // The only way to switch from SVG to MathML is via
755
+ // <math> and HTML integration points
756
+ if (parent.namespaceURI === SVG_NAMESPACE) {
757
+ return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];
758
+ }
759
+ // We only allow elements that are defined in MathML
760
+ // spec. All others are disallowed in MathML namespace.
761
+ return Boolean(ALL_MATHML_TAGS[tagName]);
762
+ }
763
+ if (element.namespaceURI === HTML_NAMESPACE) {
764
+ // The only way to switch from SVG to HTML is via
765
+ // HTML integration points, and from MathML to HTML
766
+ // is via MathML text integration points
767
+ if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {
768
+ return false;
769
+ }
770
+ if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {
771
+ return false;
772
+ }
773
+ // We disallow tags that are specific for MathML
774
+ // or SVG and should never appear in HTML namespace
775
+ return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);
776
+ }
777
+ // For XHTML and XML documents that support custom namespaces
778
+ if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && ALLOWED_NAMESPACES[element.namespaceURI]) {
779
+ return true;
780
+ }
781
+ // The code should never reach this place (this means
782
+ // that the element somehow got namespace that is not
783
+ // HTML, SVG, MathML or allowed via ALLOWED_NAMESPACES).
784
+ // Return false just in case.
785
+ return false;
786
+ };
787
+ /**
788
+ * _forceRemove
789
+ *
790
+ * @param node a DOM node
791
+ */
792
+ const _forceRemove = function _forceRemove(node) {
793
+ arrayPush(DOMPurify.removed, {
794
+ element: node
795
+ });
796
+ try {
797
+ // eslint-disable-next-line unicorn/prefer-dom-node-remove
798
+ getParentNode(node).removeChild(node);
799
+ } catch (_) {
800
+ remove(node);
801
+ }
802
+ };
803
+ /**
804
+ * _removeAttribute
805
+ *
806
+ * @param name an Attribute name
807
+ * @param element a DOM node
808
+ */
809
+ const _removeAttribute = function _removeAttribute(name, element) {
810
+ try {
811
+ arrayPush(DOMPurify.removed, {
812
+ attribute: element.getAttributeNode(name),
813
+ from: element
814
+ });
815
+ } catch (_) {
816
+ arrayPush(DOMPurify.removed, {
817
+ attribute: null,
818
+ from: element
819
+ });
820
+ }
821
+ element.removeAttribute(name);
822
+ // We void attribute values for unremovable "is" attributes
823
+ if (name === 'is') {
824
+ if (RETURN_DOM || RETURN_DOM_FRAGMENT) {
825
+ try {
826
+ _forceRemove(element);
827
+ } catch (_) {}
828
+ } else {
829
+ try {
830
+ element.setAttribute(name, '');
831
+ } catch (_) {}
832
+ }
833
+ }
834
+ };
835
+ /**
836
+ * _initDocument
837
+ *
838
+ * @param dirty - a string of dirty markup
839
+ * @return a DOM, filled with the dirty markup
840
+ */
841
+ const _initDocument = function _initDocument(dirty) {
842
+ /* Create a HTML document */
843
+ let doc = null;
844
+ let leadingWhitespace = null;
845
+ if (FORCE_BODY) {
846
+ dirty = '<remove></remove>' + dirty;
847
+ } else {
848
+ /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */
849
+ const matches = stringMatch(dirty, /^[\r\n\t ]+/);
850
+ leadingWhitespace = matches && matches[0];
851
+ }
852
+ if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && NAMESPACE === HTML_NAMESPACE) {
853
+ // Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict)
854
+ dirty = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + dirty + '</body></html>';
855
+ }
856
+ const dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;
857
+ /*
858
+ * Use the DOMParser API by default, fallback later if needs be
859
+ * DOMParser not work for svg when has multiple root element.
860
+ */
861
+ if (NAMESPACE === HTML_NAMESPACE) {
862
+ try {
863
+ doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);
864
+ } catch (_) {}
865
+ }
866
+ /* Use createHTMLDocument in case DOMParser is not available */
867
+ if (!doc || !doc.documentElement) {
868
+ doc = implementation.createDocument(NAMESPACE, 'template', null);
869
+ try {
870
+ doc.documentElement.innerHTML = IS_EMPTY_INPUT ? emptyHTML : dirtyPayload;
871
+ } catch (_) {
872
+ // Syntax error if dirtyPayload is invalid xml
873
+ }
874
+ }
875
+ const body = doc.body || doc.documentElement;
876
+ if (dirty && leadingWhitespace) {
877
+ body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);
878
+ }
879
+ /* Work on whole document or just its body */
880
+ if (NAMESPACE === HTML_NAMESPACE) {
881
+ return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0];
882
+ }
883
+ return WHOLE_DOCUMENT ? doc.documentElement : body;
884
+ };
885
+ /**
886
+ * Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.
887
+ *
888
+ * @param root The root element or node to start traversing on.
889
+ * @return The created NodeIterator
890
+ */
891
+ const _createNodeIterator = function _createNodeIterator(root) {
892
+ return createNodeIterator.call(root.ownerDocument || root, root,
893
+ // eslint-disable-next-line no-bitwise
894
+ NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION | NodeFilter.SHOW_CDATA_SECTION, null);
895
+ };
896
+ /**
897
+ * _isClobbered
898
+ *
899
+ * @param element element to check for clobbering attacks
900
+ * @return true if clobbered, false if safe
901
+ */
902
+ const _isClobbered = function _isClobbered(element) {
903
+ return element instanceof HTMLFormElement && (typeof element.nodeName !== 'string' || typeof element.textContent !== 'string' || typeof element.removeChild !== 'function' || !(element.attributes instanceof NamedNodeMap) || typeof element.removeAttribute !== 'function' || typeof element.setAttribute !== 'function' || typeof element.namespaceURI !== 'string' || typeof element.insertBefore !== 'function' || typeof element.hasChildNodes !== 'function');
904
+ };
905
+ /**
906
+ * Checks whether the given object is a DOM node.
907
+ *
908
+ * @param value object to check whether it's a DOM node
909
+ * @return true is object is a DOM node
910
+ */
911
+ const _isNode = function _isNode(value) {
912
+ return typeof Node === 'function' && value instanceof Node;
913
+ };
914
+ function _executeHooks(hooks, currentNode, data) {
915
+ arrayForEach(hooks, hook => {
916
+ hook.call(DOMPurify, currentNode, data, CONFIG);
917
+ });
918
+ }
919
+ /**
920
+ * _sanitizeElements
921
+ *
922
+ * @protect nodeName
923
+ * @protect textContent
924
+ * @protect removeChild
925
+ * @param currentNode to check for permission to exist
926
+ * @return true if node was killed, false if left alive
927
+ */
928
+ const _sanitizeElements = function _sanitizeElements(currentNode) {
929
+ let content = null;
930
+ /* Execute a hook if present */
931
+ _executeHooks(hooks.beforeSanitizeElements, currentNode, null);
932
+ /* Check if element is clobbered or can clobber */
933
+ if (_isClobbered(currentNode)) {
934
+ _forceRemove(currentNode);
935
+ return true;
936
+ }
937
+ /* Now let's check the element's type and name */
938
+ const tagName = transformCaseFunc(currentNode.nodeName);
939
+ /* Execute a hook if present */
940
+ _executeHooks(hooks.uponSanitizeElement, currentNode, {
941
+ tagName,
942
+ allowedTags: ALLOWED_TAGS
943
+ });
944
+ /* Detect mXSS attempts abusing namespace confusion */
945
+ if (SAFE_FOR_XML && currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(/<[/\w!]/g, currentNode.innerHTML) && regExpTest(/<[/\w!]/g, currentNode.textContent)) {
946
+ _forceRemove(currentNode);
947
+ return true;
948
+ }
949
+ /* Remove any occurrence of processing instructions */
950
+ if (currentNode.nodeType === NODE_TYPE.progressingInstruction) {
951
+ _forceRemove(currentNode);
952
+ return true;
953
+ }
954
+ /* Remove any kind of possibly harmful comments */
955
+ if (SAFE_FOR_XML && currentNode.nodeType === NODE_TYPE.comment && regExpTest(/<[/\w]/g, currentNode.data)) {
956
+ _forceRemove(currentNode);
957
+ return true;
958
+ }
959
+ /* Remove element if anything forbids its presence */
960
+ if (!(EXTRA_ELEMENT_HANDLING.tagCheck instanceof Function && EXTRA_ELEMENT_HANDLING.tagCheck(tagName)) && (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName])) {
961
+ /* Check if we have a custom element to handle */
962
+ if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {
963
+ if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {
964
+ return false;
965
+ }
966
+ if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) {
967
+ return false;
968
+ }
969
+ }
970
+ /* Keep content except for bad-listed elements */
971
+ if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {
972
+ const parentNode = getParentNode(currentNode) || currentNode.parentNode;
973
+ const childNodes = getChildNodes(currentNode) || currentNode.childNodes;
974
+ if (childNodes && parentNode) {
975
+ const childCount = childNodes.length;
976
+ for (let i = childCount - 1; i >= 0; --i) {
977
+ const childClone = cloneNode(childNodes[i], true);
978
+ childClone.__removalCount = (currentNode.__removalCount || 0) + 1;
979
+ parentNode.insertBefore(childClone, getNextSibling(currentNode));
980
+ }
981
+ }
982
+ }
983
+ _forceRemove(currentNode);
984
+ return true;
985
+ }
986
+ /* Check whether element has a valid namespace */
987
+ if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) {
988
+ _forceRemove(currentNode);
989
+ return true;
990
+ }
991
+ /* Make sure that older browsers don't get fallback-tag mXSS */
992
+ if ((tagName === 'noscript' || tagName === 'noembed' || tagName === 'noframes') && regExpTest(/<\/no(script|embed|frames)/i, currentNode.innerHTML)) {
993
+ _forceRemove(currentNode);
994
+ return true;
995
+ }
996
+ /* Sanitize element content to be template-safe */
997
+ if (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {
998
+ /* Get the element's text content */
999
+ content = currentNode.textContent;
1000
+ arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {
1001
+ content = stringReplace(content, expr, ' ');
1002
+ });
1003
+ if (currentNode.textContent !== content) {
1004
+ arrayPush(DOMPurify.removed, {
1005
+ element: currentNode.cloneNode()
1006
+ });
1007
+ currentNode.textContent = content;
1008
+ }
1009
+ }
1010
+ /* Execute a hook if present */
1011
+ _executeHooks(hooks.afterSanitizeElements, currentNode, null);
1012
+ return false;
1013
+ };
1014
+ /**
1015
+ * _isValidAttribute
1016
+ *
1017
+ * @param lcTag Lowercase tag name of containing element.
1018
+ * @param lcName Lowercase attribute name.
1019
+ * @param value Attribute value.
1020
+ * @return Returns true if `value` is valid, otherwise false.
1021
+ */
1022
+ // eslint-disable-next-line complexity
1023
+ const _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {
1024
+ /* FORBID_ATTR must always win, even if ADD_ATTR predicate would allow it */
1025
+ if (FORBID_ATTR[lcName]) {
1026
+ return false;
1027
+ }
1028
+ /* Make sure attribute cannot clobber */
1029
+ if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) {
1030
+ return false;
1031
+ }
1032
+ /* Allow valid data-* attributes: At least one character after "-"
1033
+ (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)
1034
+ XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)
1035
+ We don't need to check the value; it's always URI safe. */
1036
+ if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR, lcName)) ; else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR, lcName)) ; else if (EXTRA_ELEMENT_HANDLING.attributeCheck instanceof Function && EXTRA_ELEMENT_HANDLING.attributeCheck(lcName, lcTag)) ; else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {
1037
+ if (
1038
+ // First condition does a very basic check if a) it's basically a valid custom element tagname AND
1039
+ // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
1040
+ // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
1041
+ _isBasicCustomElement(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName, lcTag)) ||
1042
+ // Alternative, second condition checks if it's an `is`-attribute, AND
1043
+ // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
1044
+ lcName === 'is' && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value))) ; else {
1045
+ return false;
1046
+ }
1047
+ /* Check value is safe. First, is attr inert? If so, is safe */
1048
+ } else if (URI_SAFE_ATTRIBUTES[lcName]) ; else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE, ''))) ; else if ((lcName === 'src' || lcName === 'xlink:href' || lcName === 'href') && lcTag !== 'script' && stringIndexOf(value, 'data:') === 0 && DATA_URI_TAGS[lcTag]) ; else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA, stringReplace(value, ATTR_WHITESPACE, ''))) ; else if (value) {
1049
+ return false;
1050
+ } else ;
1051
+ return true;
1052
+ };
1053
+ /**
1054
+ * _isBasicCustomElement
1055
+ * checks if at least one dash is included in tagName, and it's not the first char
1056
+ * for more sophisticated checking see https://github.com/sindresorhus/validate-element-name
1057
+ *
1058
+ * @param tagName name of the tag of the node to sanitize
1059
+ * @returns Returns true if the tag name meets the basic criteria for a custom element, otherwise false.
1060
+ */
1061
+ const _isBasicCustomElement = function _isBasicCustomElement(tagName) {
1062
+ return tagName !== 'annotation-xml' && stringMatch(tagName, CUSTOM_ELEMENT);
1063
+ };
1064
+ /**
1065
+ * _sanitizeAttributes
1066
+ *
1067
+ * @protect attributes
1068
+ * @protect nodeName
1069
+ * @protect removeAttribute
1070
+ * @protect setAttribute
1071
+ *
1072
+ * @param currentNode to sanitize
1073
+ */
1074
+ const _sanitizeAttributes = function _sanitizeAttributes(currentNode) {
1075
+ /* Execute a hook if present */
1076
+ _executeHooks(hooks.beforeSanitizeAttributes, currentNode, null);
1077
+ const {
1078
+ attributes
1079
+ } = currentNode;
1080
+ /* Check if we have attributes; if not we might have a text node */
1081
+ if (!attributes || _isClobbered(currentNode)) {
1082
+ return;
1083
+ }
1084
+ const hookEvent = {
1085
+ attrName: '',
1086
+ attrValue: '',
1087
+ keepAttr: true,
1088
+ allowedAttributes: ALLOWED_ATTR,
1089
+ forceKeepAttr: undefined
1090
+ };
1091
+ let l = attributes.length;
1092
+ /* Go backwards over all attributes; safely remove bad ones */
1093
+ while (l--) {
1094
+ const attr = attributes[l];
1095
+ const {
1096
+ name,
1097
+ namespaceURI,
1098
+ value: attrValue
1099
+ } = attr;
1100
+ const lcName = transformCaseFunc(name);
1101
+ const initValue = attrValue;
1102
+ let value = name === 'value' ? initValue : stringTrim(initValue);
1103
+ /* Execute a hook if present */
1104
+ hookEvent.attrName = lcName;
1105
+ hookEvent.attrValue = value;
1106
+ hookEvent.keepAttr = true;
1107
+ hookEvent.forceKeepAttr = undefined; // Allows developers to see this is a property they can set
1108
+ _executeHooks(hooks.uponSanitizeAttribute, currentNode, hookEvent);
1109
+ value = hookEvent.attrValue;
1110
+ /* Full DOM Clobbering protection via namespace isolation,
1111
+ * Prefix id and name attributes with `user-content-`
1112
+ */
1113
+ if (SANITIZE_NAMED_PROPS && (lcName === 'id' || lcName === 'name')) {
1114
+ // Remove the attribute with this value
1115
+ _removeAttribute(name, currentNode);
1116
+ // Prefix the value and later re-create the attribute with the sanitized value
1117
+ value = SANITIZE_NAMED_PROPS_PREFIX + value;
1118
+ }
1119
+ /* Work around a security issue with comments inside attributes */
1120
+ if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, value)) {
1121
+ _removeAttribute(name, currentNode);
1122
+ continue;
1123
+ }
1124
+ /* Make sure we cannot easily use animated hrefs, even if animations are allowed */
1125
+ if (lcName === 'attributename' && stringMatch(value, 'href')) {
1126
+ _removeAttribute(name, currentNode);
1127
+ continue;
1128
+ }
1129
+ /* Did the hooks approve of the attribute? */
1130
+ if (hookEvent.forceKeepAttr) {
1131
+ continue;
1132
+ }
1133
+ /* Did the hooks approve of the attribute? */
1134
+ if (!hookEvent.keepAttr) {
1135
+ _removeAttribute(name, currentNode);
1136
+ continue;
1137
+ }
1138
+ /* Work around a security issue in jQuery 3.0 */
1139
+ if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(/\/>/i, value)) {
1140
+ _removeAttribute(name, currentNode);
1141
+ continue;
1142
+ }
1143
+ /* Sanitize attribute content to be template-safe */
1144
+ if (SAFE_FOR_TEMPLATES) {
1145
+ arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {
1146
+ value = stringReplace(value, expr, ' ');
1147
+ });
1148
+ }
1149
+ /* Is `value` valid for this attribute? */
1150
+ const lcTag = transformCaseFunc(currentNode.nodeName);
1151
+ if (!_isValidAttribute(lcTag, lcName, value)) {
1152
+ _removeAttribute(name, currentNode);
1153
+ continue;
1154
+ }
1155
+ /* Handle attributes that require Trusted Types */
1156
+ if (trustedTypesPolicy && typeof trustedTypes === 'object' && typeof trustedTypes.getAttributeType === 'function') {
1157
+ if (namespaceURI) ; else {
1158
+ switch (trustedTypes.getAttributeType(lcTag, lcName)) {
1159
+ case 'TrustedHTML':
1160
+ {
1161
+ value = trustedTypesPolicy.createHTML(value);
1162
+ break;
1163
+ }
1164
+ case 'TrustedScriptURL':
1165
+ {
1166
+ value = trustedTypesPolicy.createScriptURL(value);
1167
+ break;
1168
+ }
1169
+ }
1170
+ }
1171
+ }
1172
+ /* Handle invalid data-* attribute set by try-catching it */
1173
+ if (value !== initValue) {
1174
+ try {
1175
+ if (namespaceURI) {
1176
+ currentNode.setAttributeNS(namespaceURI, name, value);
1177
+ } else {
1178
+ /* Fallback to setAttribute() for browser-unrecognized namespaces e.g. "x-schema". */
1179
+ currentNode.setAttribute(name, value);
1180
+ }
1181
+ if (_isClobbered(currentNode)) {
1182
+ _forceRemove(currentNode);
1183
+ } else {
1184
+ arrayPop(DOMPurify.removed);
1185
+ }
1186
+ } catch (_) {
1187
+ _removeAttribute(name, currentNode);
1188
+ }
1189
+ }
1190
+ }
1191
+ /* Execute a hook if present */
1192
+ _executeHooks(hooks.afterSanitizeAttributes, currentNode, null);
1193
+ };
1194
+ /**
1195
+ * _sanitizeShadowDOM
1196
+ *
1197
+ * @param fragment to iterate over recursively
1198
+ */
1199
+ const _sanitizeShadowDOM = function _sanitizeShadowDOM(fragment) {
1200
+ let shadowNode = null;
1201
+ const shadowIterator = _createNodeIterator(fragment);
1202
+ /* Execute a hook if present */
1203
+ _executeHooks(hooks.beforeSanitizeShadowDOM, fragment, null);
1204
+ while (shadowNode = shadowIterator.nextNode()) {
1205
+ /* Execute a hook if present */
1206
+ _executeHooks(hooks.uponSanitizeShadowNode, shadowNode, null);
1207
+ /* Sanitize tags and elements */
1208
+ _sanitizeElements(shadowNode);
1209
+ /* Check attributes next */
1210
+ _sanitizeAttributes(shadowNode);
1211
+ /* Deep shadow DOM detected */
1212
+ if (shadowNode.content instanceof DocumentFragment) {
1213
+ _sanitizeShadowDOM(shadowNode.content);
1214
+ }
1215
+ }
1216
+ /* Execute a hook if present */
1217
+ _executeHooks(hooks.afterSanitizeShadowDOM, fragment, null);
1218
+ };
1219
+ // eslint-disable-next-line complexity
1220
+ DOMPurify.sanitize = function (dirty) {
1221
+ let cfg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1222
+ let body = null;
1223
+ let importedNode = null;
1224
+ let currentNode = null;
1225
+ let returnNode = null;
1226
+ /* Make sure we have a string to sanitize.
1227
+ DO NOT return early, as this will return the wrong type if
1228
+ the user has requested a DOM object rather than a string */
1229
+ IS_EMPTY_INPUT = !dirty;
1230
+ if (IS_EMPTY_INPUT) {
1231
+ dirty = '<!-->';
1232
+ }
1233
+ /* Stringify, in case dirty is an object */
1234
+ if (typeof dirty !== 'string' && !_isNode(dirty)) {
1235
+ if (typeof dirty.toString === 'function') {
1236
+ dirty = dirty.toString();
1237
+ if (typeof dirty !== 'string') {
1238
+ throw typeErrorCreate('dirty is not a string, aborting');
1239
+ }
1240
+ } else {
1241
+ throw typeErrorCreate('toString is not a function');
1242
+ }
1243
+ }
1244
+ /* Return dirty HTML if DOMPurify cannot run */
1245
+ if (!DOMPurify.isSupported) {
1246
+ return dirty;
1247
+ }
1248
+ /* Assign config vars */
1249
+ if (!SET_CONFIG) {
1250
+ _parseConfig(cfg);
1251
+ }
1252
+ /* Clean up removed elements */
1253
+ DOMPurify.removed = [];
1254
+ /* Check if dirty is correctly typed for IN_PLACE */
1255
+ if (typeof dirty === 'string') {
1256
+ IN_PLACE = false;
1257
+ }
1258
+ if (IN_PLACE) {
1259
+ /* Do some early pre-sanitization to avoid unsafe root nodes */
1260
+ if (dirty.nodeName) {
1261
+ const tagName = transformCaseFunc(dirty.nodeName);
1262
+ if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
1263
+ throw typeErrorCreate('root node is forbidden and cannot be sanitized in-place');
1264
+ }
1265
+ }
1266
+ } else if (dirty instanceof Node) {
1267
+ /* If dirty is a DOM element, append to an empty document to avoid
1268
+ elements being stripped by the parser */
1269
+ body = _initDocument('<!---->');
1270
+ importedNode = body.ownerDocument.importNode(dirty, true);
1271
+ if (importedNode.nodeType === NODE_TYPE.element && importedNode.nodeName === 'BODY') {
1272
+ /* Node is already a body, use as is */
1273
+ body = importedNode;
1274
+ } else if (importedNode.nodeName === 'HTML') {
1275
+ body = importedNode;
1276
+ } else {
1277
+ // eslint-disable-next-line unicorn/prefer-dom-node-append
1278
+ body.appendChild(importedNode);
1279
+ }
1280
+ } else {
1281
+ /* Exit directly if we have nothing to do */
1282
+ if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT &&
1283
+ // eslint-disable-next-line unicorn/prefer-includes
1284
+ dirty.indexOf('<') === -1) {
1285
+ return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty;
1286
+ }
1287
+ /* Initialize the document to work on */
1288
+ body = _initDocument(dirty);
1289
+ /* Check we have a DOM node from the data */
1290
+ if (!body) {
1291
+ return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : '';
1292
+ }
1293
+ }
1294
+ /* Remove first element node (ours) if FORCE_BODY is set */
1295
+ if (body && FORCE_BODY) {
1296
+ _forceRemove(body.firstChild);
1297
+ }
1298
+ /* Get node iterator */
1299
+ const nodeIterator = _createNodeIterator(IN_PLACE ? dirty : body);
1300
+ /* Now start iterating over the created document */
1301
+ while (currentNode = nodeIterator.nextNode()) {
1302
+ /* Sanitize tags and elements */
1303
+ _sanitizeElements(currentNode);
1304
+ /* Check attributes next */
1305
+ _sanitizeAttributes(currentNode);
1306
+ /* Shadow DOM detected, sanitize it */
1307
+ if (currentNode.content instanceof DocumentFragment) {
1308
+ _sanitizeShadowDOM(currentNode.content);
1309
+ }
1310
+ }
1311
+ /* If we sanitized `dirty` in-place, return it. */
1312
+ if (IN_PLACE) {
1313
+ return dirty;
1314
+ }
1315
+ /* Return sanitized string or DOM */
1316
+ if (RETURN_DOM) {
1317
+ if (RETURN_DOM_FRAGMENT) {
1318
+ returnNode = createDocumentFragment.call(body.ownerDocument);
1319
+ while (body.firstChild) {
1320
+ // eslint-disable-next-line unicorn/prefer-dom-node-append
1321
+ returnNode.appendChild(body.firstChild);
1322
+ }
1323
+ } else {
1324
+ returnNode = body;
1325
+ }
1326
+ if (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmode) {
1327
+ /*
1328
+ AdoptNode() is not used because internal state is not reset
1329
+ (e.g. the past names map of a HTMLFormElement), this is safe
1330
+ in theory but we would rather not risk another attack vector.
1331
+ The state that is cloned by importNode() is explicitly defined
1332
+ by the specs.
1333
+ */
1334
+ returnNode = importNode.call(originalDocument, returnNode, true);
1335
+ }
1336
+ return returnNode;
1337
+ }
1338
+ let serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;
1339
+ /* Serialize doctype if allowed */
1340
+ if (WHOLE_DOCUMENT && ALLOWED_TAGS['!doctype'] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) {
1341
+ serializedHTML = '<!DOCTYPE ' + body.ownerDocument.doctype.name + '>\n' + serializedHTML;
1342
+ }
1343
+ /* Sanitize final string template-safe */
1344
+ if (SAFE_FOR_TEMPLATES) {
1345
+ arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {
1346
+ serializedHTML = stringReplace(serializedHTML, expr, ' ');
1347
+ });
1348
+ }
1349
+ return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML;
1350
+ };
1351
+ DOMPurify.setConfig = function () {
1352
+ let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1353
+ _parseConfig(cfg);
1354
+ SET_CONFIG = true;
1355
+ };
1356
+ DOMPurify.clearConfig = function () {
1357
+ CONFIG = null;
1358
+ SET_CONFIG = false;
1359
+ };
1360
+ DOMPurify.isValidAttribute = function (tag, attr, value) {
1361
+ /* Initialize shared config vars if necessary. */
1362
+ if (!CONFIG) {
1363
+ _parseConfig({});
1364
+ }
1365
+ const lcTag = transformCaseFunc(tag);
1366
+ const lcName = transformCaseFunc(attr);
1367
+ return _isValidAttribute(lcTag, lcName, value);
1368
+ };
1369
+ DOMPurify.addHook = function (entryPoint, hookFunction) {
1370
+ if (typeof hookFunction !== 'function') {
1371
+ return;
1372
+ }
1373
+ arrayPush(hooks[entryPoint], hookFunction);
1374
+ };
1375
+ DOMPurify.removeHook = function (entryPoint, hookFunction) {
1376
+ if (hookFunction !== undefined) {
1377
+ const index = arrayLastIndexOf(hooks[entryPoint], hookFunction);
1378
+ return index === -1 ? undefined : arraySplice(hooks[entryPoint], index, 1)[0];
1379
+ }
1380
+ return arrayPop(hooks[entryPoint]);
1381
+ };
1382
+ DOMPurify.removeHooks = function (entryPoint) {
1383
+ hooks[entryPoint] = [];
1384
+ };
1385
+ DOMPurify.removeAllHooks = function () {
1386
+ hooks = _createHooksMap();
1387
+ };
1388
+ return DOMPurify;
1389
+ }
1390
+ var purify = createDOMPurify();
1391
+
1392
+ const pdsComboboxCss = () => `:host{display:block}:host([aria-disabled=true]) .pds-combobox__input-icon{color:var(--pine-color-text-disabled);pointer-events:none}.pds-combobox{position:relative}.pds-combobox__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-combobox__input-wrapper{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;position:relative;width:100%}.pds-combobox__input{background:var(--pine-color-background-container);border:var(--pine-border);border-radius:var(--pine-dimension-125);-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--pine-color-text-strong);-ms-flex:1;flex:1;font:var(--pine-typography-body-medium);padding:var(--pine-dimension-xs) var(--pine-dimension-450) var(--pine-dimension-xs) var(--pine-dimension-150);-webkit-transition:border-color var(--pine-motion-duration-base) ease;transition:border-color var(--pine-motion-duration-base) ease;width:100%}.pds-combobox__input:hover:not(:disabled){border-color:var(--pine-color-border-hover)}.pds-combobox__input: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-combobox__input:disabled::-webkit-input-placeholder{color:var(--pine-color-text-placeholder-disabled)}.pds-combobox__input:disabled::-moz-placeholder{color:var(--pine-color-text-placeholder-disabled)}.pds-combobox__input:disabled:-ms-input-placeholder{color:var(--pine-color-text-placeholder-disabled)}.pds-combobox__input:disabled::-ms-input-placeholder{color:var(--pine-color-text-placeholder-disabled)}.pds-combobox__input:disabled::placeholder{color:var(--pine-color-text-placeholder-disabled)}.pds-combobox__input:focus-visible{border-color:var(--pine-color-border-active);outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-combobox__input::-webkit-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-combobox__input::-moz-placeholder{color:var(--pine-color-text-placeholder)}.pds-combobox__input:-ms-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-combobox__input::-ms-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-combobox__input::placeholder{color:var(--pine-color-text-placeholder)}.pds-combobox__input.pds-combobox__input--invalid{background:var(--pine-color-red-050);border-color:var(--pine-color-border-danger)}:host-context([data-theme=dark]) .pds-combobox__input.pds-combobox__input--invalid{background:var(--pine-color-red-950)}.pds-combobox__input.pds-combobox__input--invalid:hover:not(:disabled){border-color:var(--pine-color-border-danger)}.pds-combobox__input.pds-combobox__input--invalid:focus-visible{outline-color:var(--pine-color-focus-ring-danger)}.pds-combobox__input-icon{color:var(--pine-color-text-secondary);inset-inline-end:var(--pine-dimension-150);pointer-events:none;position:absolute;z-index:calc(var(--pine-z-index-raised) - 1)}.pds-combobox__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)}.pds-combobox__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)}.pds-combobox__error pds-icon{-ms-flex-negative:0;flex-shrink:0;-webkit-margin-before:var(--pine-dimension-025);margin-block-start:var(--pine-dimension-025)}.pds-combobox__listbox{background:var(--pine-color-background-overlay);border:0;border-radius:var(--pine-dimension-125);-webkit-box-shadow:var(--pine-box-shadow);box-shadow:var(--pine-box-shadow);list-style:none;margin:0;min-width:220px;overflow-y:auto;padding:var(--pine-dimension-xs);position:absolute;z-index:var(--pine-z-index-raised)}.pds-combobox__option{-ms-flex-align:center;align-items:center;background:transparent;border-radius:var(--pine-dimension-125);color:var(--pine-color-text-secondary);cursor:pointer;display:-ms-flexbox;display:flex;font:var(--pine-typography-body-medium);-ms-flex-pack:justify;justify-content:space-between;padding:var(--pine-dimension-xs) var(--pine-dimension-sm);position:relative;-webkit-transition:background 0.15s;transition:background 0.15s}.pds-combobox__option[aria-selected=true]{background:var(--pine-color-background-muted)}.pds-combobox__option:focus-visible{outline:0}.pds-combobox__option.pds-combobox__option--layout .pds-combobox__option-layout-wrapper{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;width:100%}.pds-combobox__option.pds-combobox__option--chip .pds-combobox__option-chip{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;width:100%}.pds-combobox__option:last-child{-webkit-margin-after:0;margin-block-end:0}.pds-combobox__option--highlighted,.pds-combobox__option[selected],.pds-combobox__option--selected{background:var(--pine-color-background-muted)}.pds-combobox__option-check{color:currentColor;font-size:var(--pine-dimension-150);-webkit-margin-start:var(--pine-dimension-150);margin-inline-start:var(--pine-dimension-150)}.pds-combobox__group-label{color:var(--pine-color-text-tertiary);cursor:default;font:var(--pine-typography-heading-caption);-webkit-margin-after:var(--pine-dimension-2xs);margin-block-end:var(--pine-dimension-2xs);-webkit-margin-before:var(--pine-dimension-150);margin-block-start:var(--pine-dimension-150);padding:var(--pine-dimension-2xs) var(--pine-dimension-sm);text-transform:uppercase}.pds-combobox__group-label:first-child{-webkit-margin-before:0;margin-block-start:0}.pds-combobox__loading{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;padding:var(--pine-dimension-150)}.pds-combobox__empty{color:var(--pine-color-text-tertiary);padding:var(--pine-dimension-150) var(--pine-dimension-sm);text-align:center}.pds-combobox__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-150)}.pds-combobox__button-trigger{-ms-flex-align:center;align-items:center;background:var(--color-background-default, var(--pine-color-secondary));border:var(--pine-border);border-radius:var(--pine-border-radius-full);color:var(--color-text-default, var(--pine-color-text-inverse-emphasis));cursor:pointer;display:-ms-flexbox;display:flex;font:var(--pine-typography-body-medium);-ms-flex-pack:justify;justify-content:space-between;min-height:var(--pine-dimension-450);outline:none;padding:0 var(--pine-dimension-sm);-webkit-transition:border-color 0.15s, background 0.15s, -webkit-box-shadow 0.15s;transition:border-color 0.15s, background 0.15s, -webkit-box-shadow 0.15s;transition:border-color 0.15s, box-shadow 0.15s, background 0.15s;transition:border-color 0.15s, box-shadow 0.15s, background 0.15s, -webkit-box-shadow 0.15s;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.pds-combobox__button-trigger .pds-combobox__button-trigger-layout-wrapper{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex:1;flex:1}.pds-combobox__button-trigger .trigger-content{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;width:100%}.pds-combobox__button-trigger:focus-visible{border-color:var(--color-border-focus, var(--pine-color-border));-webkit-box-shadow:0 0 0 2px var(--color-outline, var(--pine-color-focus-ring));box-shadow:0 0 0 2px var(--color-outline, var(--pine-color-focus-ring))}.pds-combobox__button-trigger:hover{background:var(--color-background-hover, var(--pine-color-secondary-hover));border-color:var(--color-border-hover, var(--pine-color-border-hover))}.pds-combobox__button-trigger[aria-disabled=true],.pds-combobox__button-trigger:disabled{background:var(--color-background-disabled, var(--pine-color-secondary-disabled));border-color:var(--color-border-disabled, var(--pine-color-border-disabled));color:var(--color-text-disabled, var(--pine-color-text-secondary-disabled));cursor:not-allowed;opacity:0.6}.pds-combobox__button-trigger-label{color:inherit;-ms-flex:1 1 auto;flex:1 1 auto;text-align:start}.pds-combobox__button-trigger--input-shape{border-radius:var(--pine-dimension-125);min-height:var(--pine-dimension-500)}.pds-combobox__button-trigger-chevron{color:currentColor;-webkit-margin-start:var(--pine-dimension-150);margin-inline-start:var(--pine-dimension-150)}.pds-combobox__button-trigger--primary{--color-background-default:var(--pine-color-primary);--color-background-hover:var(--pine-color-primary-hover);--color-background-disabled:var(--pine-color-primary-disabled);--color-border-default:var(--pine-color-primary);--color-border-hover:var(--pine-color-primary-hover);--color-border-disabled:var(--pine-color-primary-disabled);--color-border-focus:var(--pine-color-primary);--color-text-default:var(--pine-color-text-primary);--color-text-disabled:var(--pine-color-text-primary-disabled);--color-outline:var(--pine-color-focus-ring)}.pds-combobox__button-trigger--accent{--color-background-default:var(--pine-color-accent);--color-background-hover:var(--pine-color-accent-hover);--color-background-disabled:var(--pine-color-accent-disabled);--color-border-default:var(--pine-color-accent);--color-border-hover:var(--pine-color-accent-hover);--color-border-disabled:var(--pine-color-accent-disabled);--color-border-focus:var(--pine-color-accent);--color-text-default:var(--pine-color-white);--color-text-disabled:var(--pine-color-text-accent-disabled);--color-outline:var(--pine-color-focus-ring)}.pds-combobox__button-trigger--secondary{--color-background-default:var(--pine-color-secondary);--color-background-hover:var(--pine-color-secondary-hover);--color-background-disabled:var(--pine-color-secondary-disabled);--color-border-default:var(--pine-color-border);--color-border-hover:var(--pine-color-border-hover);--color-border-disabled:var(--pine-color-border-disabled);--color-border-focus:var(--pine-color-border);--color-text-default:var(--pine-color-text-secondary);--color-text-disabled:var(--pine-color-text-secondary-disabled);--color-outline:var(--pine-color-focus-ring)}.pds-combobox__button-trigger--destructive{--color-background-default:var(--pine-color-danger);--color-background-hover:var(--pine-color-danger-hover);--color-background-disabled:var(--pine-color-danger-disabled);--color-border-default:var(--pine-color-danger);--color-border-hover:var(--pine-color-danger-hover);--color-border-disabled:var(--pine-color-danger-disabled);--color-border-focus:var(--pine-color-danger);--color-text-default:var(--pine-color-white);--color-text-disabled:var(--pine-color-text-danger-disabled);--color-outline:var(--pine-color-focus-ring-danger)}.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}[data-layout]{border-radius:var(--pine-dimension-125);padding-block:var(--pine-dimension-xs)}.pds-combobox__chip-trigger{-ms-flex-align:center;align-items:center;border-radius:var(--pine-dimension-sm);cursor:pointer;display:-ms-inline-flexbox;display:inline-flex;font:var(--pine-typography-body-medium);-ms-flex-pack:justify;justify-content:space-between;outline:none;padding-block:var(--pine-dimension-025);padding-inline:var(--pine-dimension-150);-webkit-transition:all 0.15s ease;transition:all 0.15s ease;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.pds-combobox__chip-trigger .pds-combobox__chip-trigger-layout-wrapper{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex:1;flex:1}.pds-combobox__chip-trigger .trigger-content{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;width:100%}.pds-combobox__chip-trigger:focus-visible{outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-combobox__chip-trigger[aria-disabled=true]{cursor:not-allowed;opacity:0.6}.pds-combobox__chip-trigger-label{color:inherit;-ms-flex:1 1 auto;flex:1 1 auto;text-align:start}.pds-combobox__chip-trigger-chevron{color:currentColor;-webkit-margin-start:var(--pine-dimension-150);margin-inline-start:var(--pine-dimension-150)}.pds-combobox__chip-trigger-icon{-webkit-margin-end:var(--pine-dimension-2xs);margin-inline-end:var(--pine-dimension-2xs)}.pds-combobox__chip-trigger--neutral,.pds-combobox__chip-trigger--accent,.pds-combobox__chip-trigger--success,.pds-combobox__chip-trigger--warning,.pds-combobox__chip-trigger--danger,.pds-combobox__chip-trigger--info{background:var(--chip-bg);border:var(--pine-border-width) solid var(--chip-border);color:var(--chip-text)}.pds-combobox__chip-trigger--neutral:hover:not([aria-disabled=true]),.pds-combobox__chip-trigger--accent:hover:not([aria-disabled=true]),.pds-combobox__chip-trigger--success:hover:not([aria-disabled=true]),.pds-combobox__chip-trigger--warning:hover:not([aria-disabled=true]),.pds-combobox__chip-trigger--danger:hover:not([aria-disabled=true]),.pds-combobox__chip-trigger--info:hover:not([aria-disabled=true]){background:var(--chip-bg-hover)}.pds-combobox__chip-trigger--neutral:focus-visible,.pds-combobox__chip-trigger--accent:focus-visible,.pds-combobox__chip-trigger--success:focus-visible,.pds-combobox__chip-trigger--warning:focus-visible,.pds-combobox__chip-trigger--danger:focus-visible,.pds-combobox__chip-trigger--info:focus-visible{border-color:var(--chip-border)}.pds-combobox__chip-trigger--neutral{--chip-bg:var(--pine-chip-color-neutral);--chip-bg-hover:var(--pine-chip-color-neutral-hover);--chip-border:var(--pine-chip-color-neutral-hover);--chip-text:var(--pine-color-text-neutral)}.pds-combobox__chip-trigger--accent{--chip-bg:var(--pine-chip-color-accent);--chip-bg-hover:var(--pine-chip-color-accent-hover);--chip-border:var(--pine-chip-color-accent-hover);--chip-text:var(--pine-color-text-accent)}.pds-combobox__chip-trigger--success{--chip-bg:var(--pine-chip-color-success);--chip-bg-hover:var(--pine-chip-color-success-hover);--chip-border:var(--pine-chip-color-success-hover);--chip-text:var(--pine-color-text-success)}.pds-combobox__chip-trigger--warning{--chip-bg:var(--pine-chip-color-warning);--chip-bg-hover:var(--pine-chip-color-warning-hover);--chip-border:var(--pine-chip-color-warning-hover);--chip-text:var(--pine-color-text-warning)}.pds-combobox__chip-trigger--danger{--chip-bg:var(--pine-chip-color-danger);--chip-bg-hover:var(--pine-chip-color-danger-hover);--chip-border:var(--pine-chip-color-danger-hover);--chip-text:var(--pine-color-text-danger)}.pds-combobox__chip-trigger--info{--chip-bg:var(--pine-chip-color-info);--chip-bg-hover:var(--pine-chip-color-info-hover);--chip-border:var(--pine-chip-color-info-hover);--chip-text:var(--pine-color-text-info)}.pds-combobox__chip-trigger--brand{background:-webkit-gradient(linear, left top, right top, from(#FF3E14), to(#6B62F2));background:linear-gradient(90deg, #FF3E14 0%, #6B62F2 100%);border:0;color:var(--pine-color-text-neutral);padding:1px;position:relative}.pds-combobox__chip-trigger--brand .pds-combobox__chip-trigger-label{background:rgba(255, 255, 255, 0.9);border-radius:calc(var(--pine-dimension-sm) - 1px);color:var(--pine-color-text-neutral);font-weight:var(--pine-font-weight-medium);padding:var(--pine-dimension-025) var(--pine-dimension-150);position:relative;z-index:1}.pds-combobox__chip-trigger--brand .pds-combobox__chip-trigger-chevron{position:relative;z-index:1}.pds-combobox__chip-trigger--brand:hover:not([aria-disabled=true]) .pds-combobox__chip-trigger-label{background:rgba(255, 255, 255, 0.8)}.pds-combobox__chip-trigger--dropdown:not(.pds-combobox__chip-trigger--brand){padding:var(--pine-dimension-none)}.pds-combobox__chip-trigger--dropdown:not(.pds-combobox__chip-trigger--brand) .pds-combobox__chip-trigger-label{padding:var(--pine-dimension-025) var(--pine-dimension-150)}.pds-combobox__chip-trigger--large .pds-combobox__chip-trigger-label{font-family:var(--pine-font-family-heading);font-size:var(--pine-font-size-heading-6);font-weight:var(--pine-font-weight-medium);letter-spacing:var(--pine-letter-spacing-heading-6)}.pds-combobox__chip-trigger--dot .pds-combobox__chip-trigger-label::before{border:var(--pine-border-width) solid transparent;border-radius:var(--pine-border-radius-full);content:"";display:inline-block;height:var(--pine-dimension-2xs);-webkit-margin-end:var(--pine-dimension-2xs);margin-inline-end:var(--pine-dimension-2xs);width:var(--pine-dimension-2xs)}`;
1393
+
1394
+ const PdsCombobox = class {
1395
+ constructor(hostRef) {
1396
+ registerInstance(this, hostRef);
1397
+ this.pdsComboboxChange = createEvent(this, "pdsComboboxChange");
1398
+ this.pdsComboboxSearch = createEvent(this, "pdsComboboxSearch");
1399
+ this.pdsComboboxLoadOptions = createEvent(this, "pdsComboboxLoadOptions");
1400
+ /**
1401
+ * Enable custom layout content for options. Options with data-layout attribute will render their HTML content.
1402
+ * ⚠️ Security Warning: Only use with trusted content. Basic XSS protection is applied, but avoid user-generated content.
1403
+ * @default false
1404
+ */
1405
+ this.customOptionLayouts = false;
1406
+ /**
1407
+ * Enable custom layout content for the button trigger via the trigger-content slot.
1408
+ * When true, uses slot content for initial state but updates dynamically with selected option layout.
1409
+ * ⚠️ Security Warning: Only use with trusted content. Basic XSS protection is applied, but avoid user-generated content.
1410
+ * @default false
1411
+ */
1412
+ this.customTriggerContent = false;
1413
+ /**
1414
+ * If true, the combobox is disabled.
1415
+ */
1416
+ this.disabled = false;
1417
+ /**
1418
+ * Placement of the dropdown relative to the trigger.
1419
+ * @default 'bottom-start'
1420
+ */
1421
+ this.dropdownPlacement = 'bottom-start';
1422
+ /**
1423
+ * Width of the dropdown. Any valid CSS width value.
1424
+ * @default '236px'
1425
+ */
1426
+ this.dropdownWidth = '236px';
1427
+ /**
1428
+ * Where to mount the dropdown listbox (`host` or `body`, sometimes called “append to body”).
1429
+ * Use `body` inside scrollable containers (for example modals) so the list is not clipped by
1430
+ * `overflow: hidden` ancestors. The portal is appended to the nearest `<dialog>` when present
1431
+ * (including `pds-modal` / `showModal()`), using a composed ascent so shadow DOM and slot
1432
+ * boundaries do not hide the dialog from discovery; otherwise it is appended to `document.body`.
1433
+ * Keyboard focus remains on the trigger via
1434
+ * `aria-activedescendant` so modal focus traps continue to work. Custom `empty` and `loading`
1435
+ * slots are not supported when `body` is used; the default empty and loading content is shown instead.
1436
+ * @default 'host'
1437
+ */
1438
+ this.dropdownMount = 'host';
1439
+ /**
1440
+ * Visually hides the label text for instances where only the combobox should be displayed.
1441
+ * The visible `<label>` is omitted (same pattern as `pds-select`) so label spacing does not reserve layout;
1442
+ * the trigger uses `aria-label` so the name stays available to assistive technology.
1443
+ */
1444
+ this.hideLabel = false;
1445
+ /**
1446
+ * Determines the combobox mode: 'filter' (filter options as you type) or 'select-only' (show all options).
1447
+ * In filter mode, reopening the menu while the input still shows the label of the selected option temporarily lists
1448
+ * all options until you type (so you can switch to a different choice without clearing the field first).
1449
+ * @default 'filter'
1450
+ */
1451
+ this.mode = 'filter';
1452
+ /**
1453
+ * Determines the combobox trigger: 'input' (editable input), 'button' (button-like, non-editable), or 'chip' (chip-like, non-editable).
1454
+ * @default 'input'
1455
+ */
1456
+ this.trigger = 'input';
1457
+ /**
1458
+ * Width of the trigger (button or input). Any valid CSS width value.
1459
+ * @default 'fit-content'
1460
+ */
1461
+ this.triggerWidth = 'fit-content';
1462
+ /**
1463
+ * The visual variant for the button trigger. Matches Pine button variants.
1464
+ * @default 'secondary'
1465
+ */
1466
+ this.triggerVariant = 'secondary';
1467
+ /**
1468
+ * The shape of the button trigger. Use 'input' to render the trigger with input-like styling
1469
+ * (subtle border radius, input height) for use in form or filter rows alongside PdsSelect and PdsMultiselect.
1470
+ * @default 'pill'
1471
+ */
1472
+ this.triggerShape = 'pill';
1473
+ /**
1474
+ * The sentiment for the chip trigger. Matches Pine chip sentiments.
1475
+ * @default 'neutral'
1476
+ */
1477
+ this.chipSentiment = 'neutral';
1478
+ /**
1479
+ * Whether the chip trigger should be displayed in a larger size.
1480
+ * @default false
1481
+ */
1482
+ this.chipLarge = false;
1483
+ /**
1484
+ * Whether a dot should be displayed on the chip trigger.
1485
+ * @default false
1486
+ */
1487
+ this.chipDot = false;
1488
+ /**
1489
+ * The value of the combobox input.
1490
+ */
1491
+ this.value = '';
1492
+ /**
1493
+ * HTTP method for async requests.
1494
+ */
1495
+ this.asyncMethod = 'GET';
1496
+ /**
1497
+ * Debounce delay in milliseconds for search/fetch.
1498
+ */
1499
+ this.debounce = 300;
1500
+ /**
1501
+ * Timeout in milliseconds for async fetch requests.
1502
+ */
1503
+ this.fetchTimeout = 30000;
1504
+ /**
1505
+ * Whether the component is currently loading async options.
1506
+ */
1507
+ this.loading = false;
1508
+ /**
1509
+ * Internal state for the display text shown in the input/trigger
1510
+ */
1511
+ this.displayText = '';
1512
+ /**
1513
+ * Internal state for filtered options and group labels
1514
+ */
1515
+ this.filteredItems = [];
1516
+ /**
1517
+ * Internal state for the currently highlighted option index
1518
+ */
1519
+ this.highlightedIndex = -1;
1520
+ /**
1521
+ * Internal state for dropdown open/close
1522
+ */
1523
+ this.isOpen = false;
1524
+ /**
1525
+ * Internal state for the currently selected option
1526
+ */
1527
+ this.selectedOption = null;
1528
+ /**
1529
+ * Internal state for the sanitized layout content of the selected option
1530
+ */
1531
+ this.selectedOptionLayoutContent = '';
1532
+ /**
1533
+ * Internal state to track chip properties for automatic rendering
1534
+ */
1535
+ this.selectedOptionChipProps = null;
1536
+ /**
1537
+ * Internal state for async options.
1538
+ */
1539
+ this.internalOptions = [];
1540
+ /**
1541
+ * Internal state for current page (pagination).
1542
+ */
1543
+ this.currentPage = 1;
1544
+ /**
1545
+ * Internal state for hasMore (pagination).
1546
+ */
1547
+ this.hasMore = false;
1548
+ this.optionEls = [];
1549
+ this.allItems = [];
1550
+ this.portalEl = null;
1551
+ this.bodyPortalAutoUpdateActive = false;
1552
+ this.isUpdatingFromSelection = false;
1553
+ /**
1554
+ * In filter mode, after choosing an option the input still shows the label and would
1555
+ * otherwise filter the list to matching substrings only. While this flag is true,
1556
+ * the list shows every option until the user types (then normal filtering applies).
1557
+ */
1558
+ this.expandFilterListWhileOpen = false;
1559
+ this.handleInput = (e) => {
1560
+ const target = e.target;
1561
+ this.clearExpandFilterList();
1562
+ this.displayText = target.value;
1563
+ this.isOpen = true;
1564
+ this.filterOptions();
1565
+ // Emit search event for consumer-managed async
1566
+ this.pdsComboboxSearch.emit({ query: this.displayText });
1567
+ // Fetch from async URL if configured
1568
+ if (this.asyncUrl) {
1569
+ this.debouncedFetchAsyncOptions(this.displayText, 1);
1570
+ }
1571
+ setTimeout(() => this.openDropdownPositioning(), 0);
1572
+ };
1573
+ this.handleInputClick = () => {
1574
+ // Open dropdown when input is clicked (but not when tabbed into)
1575
+ if (!this.isOpen) {
1576
+ this.isOpen = true;
1577
+ this.prepareExpandFilterListOnOpen();
1578
+ this.filterOptions();
1579
+ // Trigger initial fetch if async and no options loaded yet
1580
+ if (this.asyncUrl && this.internalOptions.length === 0) {
1581
+ this.debouncedFetchAsyncOptions(this.displayText, 1);
1582
+ }
1583
+ this.setInitialHighlightedIndex();
1584
+ setTimeout(() => {
1585
+ this.openDropdownPositioning();
1586
+ if (this.trigger === 'input' && this.expandFilterListWhileOpen && this.inputEl) {
1587
+ this.inputEl.select();
1588
+ }
1589
+ }, 0);
1590
+ }
1591
+ };
1592
+ this.handleKeyDown = (e) => {
1593
+ if (!this.isOpen && (e.key === 'ArrowDown' || e.key === 'ArrowUp' || (e.altKey && e.key === 'ArrowDown'))) {
1594
+ e.preventDefault();
1595
+ this.isOpen = true;
1596
+ this.prepareExpandFilterListOnOpen();
1597
+ this.filterOptions();
1598
+ // Set highlighted index immediately for testing
1599
+ this.setInitialHighlightedIndex();
1600
+ setTimeout(() => {
1601
+ this.openDropdownPositioning();
1602
+ // For input trigger, keep focus on input and use aria-activedescendant
1603
+ // For button trigger, move focus to first option for keyboard navigation
1604
+ if (this.trigger === 'input') {
1605
+ this.focusFirstOption();
1606
+ }
1607
+ else {
1608
+ this.focusFirstOptionForArrowKeys();
1609
+ }
1610
+ }, 0);
1611
+ return;
1612
+ }
1613
+ if (!this.isOpen) {
1614
+ return;
1615
+ }
1616
+ // Get only the option elements (skip group labels) for navigation
1617
+ const selectableOptions = this.filteredItems.filter(item => item.tagName === 'OPTION');
1618
+ switch (e.key) {
1619
+ case 'ArrowDown':
1620
+ e.preventDefault();
1621
+ // If no option is highlighted and we have options, start at 0
1622
+ if (this.highlightedIndex < 0 && selectableOptions.length > 0) {
1623
+ this.highlightedIndex = 0;
1624
+ }
1625
+ else {
1626
+ this.highlightedIndex = Math.min(this.highlightedIndex + 1, selectableOptions.length - 1);
1627
+ }
1628
+ this.updateOptionFocus();
1629
+ break;
1630
+ case 'ArrowUp':
1631
+ e.preventDefault();
1632
+ // If no option is highlighted and we have options, start at last option
1633
+ if (this.highlightedIndex < 0 && selectableOptions.length > 0) {
1634
+ this.highlightedIndex = selectableOptions.length - 1;
1635
+ }
1636
+ else {
1637
+ this.highlightedIndex = Math.max(this.highlightedIndex - 1, 0);
1638
+ }
1639
+ this.updateOptionFocus();
1640
+ break;
1641
+ case 'Home':
1642
+ e.preventDefault();
1643
+ if (selectableOptions.length > 0) {
1644
+ this.highlightedIndex = 0;
1645
+ this.updateOptionFocus();
1646
+ }
1647
+ break;
1648
+ case 'End':
1649
+ e.preventDefault();
1650
+ if (selectableOptions.length > 0) {
1651
+ this.highlightedIndex = selectableOptions.length - 1;
1652
+ this.updateOptionFocus();
1653
+ }
1654
+ break;
1655
+ case 'PageDown':
1656
+ e.preventDefault();
1657
+ if (selectableOptions.length > 0) {
1658
+ const nextIndex = Math.min(this.highlightedIndex + 10, selectableOptions.length - 1);
1659
+ this.highlightedIndex = nextIndex;
1660
+ this.updateOptionFocus();
1661
+ }
1662
+ break;
1663
+ case 'PageUp':
1664
+ e.preventDefault();
1665
+ if (selectableOptions.length > 0) {
1666
+ const prevIndex = Math.max(this.highlightedIndex - 10, 0);
1667
+ this.highlightedIndex = prevIndex;
1668
+ this.updateOptionFocus();
1669
+ }
1670
+ break;
1671
+ case 'Enter':
1672
+ e.preventDefault();
1673
+ if (this.highlightedIndex >= 0 && this.highlightedIndex < selectableOptions.length) {
1674
+ this.handleOptionClick(selectableOptions[this.highlightedIndex]);
1675
+ this.restoreFocusToTrigger();
1676
+ }
1677
+ break;
1678
+ case ' ':
1679
+ e.preventDefault();
1680
+ if (this.highlightedIndex >= 0 && this.highlightedIndex < selectableOptions.length) {
1681
+ this.handleOptionClick(selectableOptions[this.highlightedIndex]);
1682
+ this.restoreFocusToTrigger();
1683
+ }
1684
+ break;
1685
+ case 'Escape':
1686
+ e.preventDefault();
1687
+ this.isOpen = false;
1688
+ this.highlightedIndex = -1;
1689
+ this.clearExpandFilterList();
1690
+ this.isArrowKeyNavigationMode = false; // Reset arrow-key navigation mode
1691
+ this.restoreFocusToTrigger();
1692
+ break;
1693
+ case 'Tab':
1694
+ // Allow normal tab behavior to close dropdown and move focus
1695
+ this.isOpen = false;
1696
+ this.highlightedIndex = -1;
1697
+ this.clearExpandFilterList();
1698
+ this.isArrowKeyNavigationMode = false; // Reset arrow-key navigation mode
1699
+ break;
1700
+ }
1701
+ };
1702
+ // Track if we're in arrow-key navigation mode (focus should move between options)
1703
+ this.isArrowKeyNavigationMode = false;
1704
+ // Event handler for option click
1705
+ this.onOptionClick = (event) => {
1706
+ const idx = Number(event.currentTarget.getAttribute('data-option-index'));
1707
+ const selectableOptions = this.filteredItems.filter(item => item.tagName === 'OPTION');
1708
+ const option = selectableOptions[idx];
1709
+ this.handleOptionClick(option);
1710
+ };
1711
+ // Event handler for mouse enter on option
1712
+ this.onOptionMouseEnter = (event) => {
1713
+ const idx = Number(event.currentTarget.getAttribute('data-option-index'));
1714
+ this.highlightedIndex = idx;
1715
+ };
1716
+ // Prevent blur on mousedown
1717
+ this.onOptionMouseDown = (event) => {
1718
+ event.preventDefault();
1719
+ };
1720
+ // Event handler for option keyboard events
1721
+ this.onOptionKeyDown = (event) => {
1722
+ // Delegate to main keyboard handler
1723
+ this.handleKeyDown(event);
1724
+ };
1725
+ // Handler for button trigger click
1726
+ this.onButtonTriggerClick = () => {
1727
+ this.isOpen = !this.isOpen;
1728
+ if (this.isOpen) {
1729
+ this.prepareExpandFilterListOnOpen();
1730
+ this.filterOptions();
1731
+ // Trigger initial fetch if async and no options loaded yet
1732
+ if (this.asyncUrl && this.internalOptions.length === 0) {
1733
+ this.debouncedFetchAsyncOptions(this.displayText, 1);
1734
+ }
1735
+ // Set highlighted index and prepare for keyboard navigation
1736
+ this.setInitialHighlightedIndex();
1737
+ // For button trigger, prepare for arrow-key navigation mode
1738
+ this.isArrowKeyNavigationMode = true;
1739
+ setTimeout(() => this.openDropdownPositioning(), 0);
1740
+ }
1741
+ else {
1742
+ // Reset navigation mode when closing
1743
+ this.clearExpandFilterList();
1744
+ this.isArrowKeyNavigationMode = false;
1745
+ }
1746
+ };
1747
+ // Handler for button trigger keyboard events
1748
+ this.onButtonTriggerKeyDown = (e) => {
1749
+ if ((e.key === 'Enter' || e.key === ' ' || e.key === 'ArrowDown' || e.key === 'ArrowUp') && !this.isOpen) {
1750
+ e.preventDefault();
1751
+ e.stopPropagation(); // Prevent the event from bubbling and triggering click
1752
+ this.isOpen = true;
1753
+ this.prepareExpandFilterListOnOpen();
1754
+ this.filterOptions();
1755
+ // Set highlighted index immediately
1756
+ this.setInitialHighlightedIndex();
1757
+ setTimeout(() => {
1758
+ this.openDropdownPositioning();
1759
+ // For all button trigger keyboard opening, focus the first option so subsequent navigation works
1760
+ this.focusFirstOptionForArrowKeys();
1761
+ }, 0);
1762
+ }
1763
+ else if (e.key === 'Escape') {
1764
+ e.preventDefault();
1765
+ if (this.isOpen) {
1766
+ this.isOpen = false;
1767
+ this.highlightedIndex = -1;
1768
+ this.clearExpandFilterList();
1769
+ this.updateAriaActiveDescendant(); // Clear aria-activedescendant
1770
+ this.restoreFocusToTrigger();
1771
+ }
1772
+ }
1773
+ else if (this.isOpen) {
1774
+ // Delegate other keys to main keyboard handler when dropdown is open
1775
+ this.handleKeyDown(e);
1776
+ }
1777
+ };
1778
+ // Handler for button trigger keyup events - prevents space key from triggering synthetic click
1779
+ this.onButtonTriggerKeyUp = (e) => {
1780
+ if (e.key === ' ') {
1781
+ e.preventDefault();
1782
+ e.stopPropagation();
1783
+ }
1784
+ };
1785
+ // Close dropdown when focus leaves the combobox
1786
+ this.onComboboxFocusOut = (event) => {
1787
+ var _a, _b;
1788
+ const relatedTarget = event.relatedTarget;
1789
+ const isRelatedTargetInListbox = relatedTarget &&
1790
+ (((_a = this.listboxEl) === null || _a === void 0 ? void 0 : _a.contains(relatedTarget)) || ((_b = this.portalEl) === null || _b === void 0 ? void 0 : _b.contains(relatedTarget)));
1791
+ const isRelatedTargetInCombobox = this.el.contains(relatedTarget);
1792
+ // Don't close if focus is moving to an option in the listbox or staying within the combobox
1793
+ if (!isRelatedTargetInCombobox && !isRelatedTargetInListbox) {
1794
+ this.isOpen = false;
1795
+ this.highlightedIndex = -1;
1796
+ this.clearExpandFilterList();
1797
+ this.isArrowKeyNavigationMode = false; // Reset arrow-key navigation mode
1798
+ this.updateAriaActiveDescendant(); // Clear aria-activedescendant
1799
+ // If there's a selected option but the display text doesn't match, restore the selected option's display text
1800
+ if (this.selectedOption && this.displayText !== this.getOptionLabel(this.selectedOption)) {
1801
+ this.displayText = this.getOptionLabel(this.selectedOption);
1802
+ // The @Watch('selectedOption') will handle value and form internals if needed
1803
+ }
1804
+ }
1805
+ };
1806
+ this.handleScroll = (e) => {
1807
+ if (!this.asyncUrl || !this.hasMore || this.loading)
1808
+ return;
1809
+ const target = e.target;
1810
+ const scrollBottom = target.scrollHeight - target.scrollTop - target.clientHeight;
1811
+ // Load more when near bottom (within 50px)
1812
+ if (scrollBottom < 50) {
1813
+ this.pdsComboboxLoadOptions.emit({
1814
+ query: this.displayText,
1815
+ page: this.currentPage + 1,
1816
+ });
1817
+ this.debouncedFetchAsyncOptions(this.displayText, this.currentPage + 1);
1818
+ }
1819
+ };
1820
+ }
1821
+ connectedCallback() {
1822
+ // Initialize ElementInternals for form association (only once per element instance)
1823
+ if (this.el.attachInternals && !this.internals) {
1824
+ this.internals = this.el.attachInternals();
1825
+ }
1826
+ }
1827
+ componentWillLoad() {
1828
+ this.originalSearchEmitter = this.pdsComboboxSearch;
1829
+ this.updateOptions();
1830
+ }
1831
+ componentDidLoad() {
1832
+ var _a, _b, _c;
1833
+ this.setupDebounce();
1834
+ // Check for value-based preselection if no option is selected yet
1835
+ if (!this.selectedOption && this.value && this.optionEls.length > 0) {
1836
+ const matchingOption = this.optionEls.find(opt => opt.value === this.value);
1837
+ if (matchingOption) {
1838
+ this.setSelectedOption(matchingOption);
1839
+ // Update the display text to show the option's text content
1840
+ this.displayText = this.getOptionLabel(matchingOption);
1841
+ // Keep this.value as the actual option value
1842
+ // this.value remains unchanged (already matches matchingOption.value)
1843
+ }
1844
+ }
1845
+ // Initialize form value with current value
1846
+ this.updateFormValue((_c = (_b = (_a = this.selectedOption) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : this.value) !== null && _c !== void 0 ? _c : '');
1847
+ }
1848
+ disconnectedCallback() {
1849
+ var _a;
1850
+ if (this.deferredPortalTeardownId !== undefined) {
1851
+ clearTimeout(this.deferredPortalTeardownId);
1852
+ this.deferredPortalTeardownId = undefined;
1853
+ }
1854
+ (_a = this.observer) === null || _a === void 0 ? void 0 : _a.disconnect();
1855
+ this.clearAsyncFetchState();
1856
+ this.removeBodyPortal();
1857
+ }
1858
+ componentDidRender() {
1859
+ if (this.usesBodyPortal && this.isOpen) {
1860
+ this.syncBodyPortal();
1861
+ }
1862
+ }
1863
+ isOpenChanged(isOpen) {
1864
+ if (isOpen && this.deferredPortalTeardownId !== undefined) {
1865
+ clearTimeout(this.deferredPortalTeardownId);
1866
+ this.deferredPortalTeardownId = undefined;
1867
+ }
1868
+ if (isOpen && this.usesBodyPortal) {
1869
+ // Rapid reopen can cancel deferred teardown while the portal still holds the previous
1870
+ // listbox node; clear portal state before the next render attaches the new listbox, and
1871
+ // reset Floating UI autoUpdate bookkeeping.
1872
+ this.removeBodyPortal();
1873
+ }
1874
+ if (!isOpen && this.usesBodyPortal) {
1875
+ if (this.deferredPortalTeardownId !== undefined) {
1876
+ clearTimeout(this.deferredPortalTeardownId);
1877
+ }
1878
+ this.deferredPortalTeardownId = setTimeout(() => {
1879
+ this.deferredPortalTeardownId = undefined;
1880
+ if (!this.el.isConnected) {
1881
+ return;
1882
+ }
1883
+ if (!this.isOpen) {
1884
+ this.removeBodyPortal();
1885
+ }
1886
+ }, 0);
1887
+ return;
1888
+ }
1889
+ if (!isOpen) {
1890
+ this.removeBodyPortal();
1891
+ }
1892
+ }
1893
+ get usesBodyPortal() {
1894
+ return this.dropdownMount === 'body';
1895
+ }
1896
+ get listboxId() {
1897
+ return `${this.componentId}-listbox`;
1898
+ }
1899
+ optionDomId(optionIndex) {
1900
+ return `${this.componentId}-option-${optionIndex}`;
1901
+ }
1902
+ setupDebounce() {
1903
+ const { pdsComboboxSearch, debounce, originalSearchEmitter } = this;
1904
+ this.pdsComboboxSearch = debounce === undefined
1905
+ ? originalSearchEmitter !== null && originalSearchEmitter !== void 0 ? originalSearchEmitter : pdsComboboxSearch
1906
+ : debounceEvent(pdsComboboxSearch, debounce);
1907
+ }
1908
+ optionsChanged() {
1909
+ if (this.options) {
1910
+ this.internalOptions = [...this.options];
1911
+ this.updateOptionsFromAsync();
1912
+ }
1913
+ }
1914
+ handleValueChange() {
1915
+ this.filterOptions();
1916
+ // Sync with form internals for form association
1917
+ this.updateFormValue(this.value);
1918
+ // Find and select option that matches the value (for external value changes)
1919
+ // Only do this if we're not already updating from a selection
1920
+ if (!this.isUpdatingFromSelection && this.value && this.optionEls.length > 0) {
1921
+ const currentSelectedValue = this.selectedOption ? this.selectedOption.value : null;
1922
+ // If the value doesn't match the currently selected option's value, we need to update
1923
+ if (this.value !== currentSelectedValue) {
1924
+ const matchingOption = this.optionEls.find(opt => opt.value === this.value);
1925
+ if (matchingOption) {
1926
+ this.isUpdatingFromSelection = true;
1927
+ this.setSelectedOption(matchingOption);
1928
+ // Update the display text to show the option's text content
1929
+ this.displayText = this.getOptionLabel(matchingOption);
1930
+ // Keep this.value as the actual option value (already correct)
1931
+ this.isUpdatingFromSelection = false;
1932
+ }
1933
+ }
1934
+ }
1935
+ }
1936
+ handleSelectedOptionChange() {
1937
+ // Update the layout content when selected option changes
1938
+ this.selectedOptionLayoutContent = this.selectedOption && this.isOptionLayout(this.selectedOption)
1939
+ ? this.getOptionLayoutContent(this.selectedOption)
1940
+ : '';
1941
+ // Update chip properties for automatic rendering when selected option changes
1942
+ this.selectedOptionChipProps = this.selectedOption && this.isOptionChip(this.selectedOption)
1943
+ ? this.getOptionChipProps(this.selectedOption)
1944
+ : null;
1945
+ // Update display text when selected option changes
1946
+ if (this.selectedOption) {
1947
+ this.displayText = this.getOptionLabel(this.selectedOption);
1948
+ this.value = this.selectedOption.value;
1949
+ // Update form internals with the actual option value
1950
+ this.updateFormValue(this.selectedOption.value);
1951
+ }
1952
+ else {
1953
+ this.displayText = '';
1954
+ this.value = '';
1955
+ this.updateFormValue('');
1956
+ }
1957
+ }
1958
+ updateFormValue(value) {
1959
+ if (isSpecTest())
1960
+ return;
1961
+ if (this.internals && this.internals.setFormValue) {
1962
+ this.internals.setFormValue(value);
1963
+ }
1964
+ }
1965
+ clearAsyncFetchState() {
1966
+ var _a;
1967
+ if (this.fetchDebounceTimer !== undefined) {
1968
+ window.clearTimeout(this.fetchDebounceTimer);
1969
+ this.fetchDebounceTimer = undefined;
1970
+ }
1971
+ if (this.fetchTimeoutTimer !== undefined) {
1972
+ window.clearTimeout(this.fetchTimeoutTimer);
1973
+ this.fetchTimeoutTimer = undefined;
1974
+ }
1975
+ (_a = this.abortController) === null || _a === void 0 ? void 0 : _a.abort();
1976
+ this.abortController = undefined;
1977
+ }
1978
+ debouncedFetchAsyncOptions(query, page = 1) {
1979
+ var _a;
1980
+ if (!this.asyncUrl)
1981
+ return;
1982
+ if (this.fetchDebounceTimer !== undefined) {
1983
+ window.clearTimeout(this.fetchDebounceTimer);
1984
+ }
1985
+ const delay = Math.max(0, (_a = this.debounce) !== null && _a !== void 0 ? _a : 0);
1986
+ this.fetchDebounceTimer = window.setTimeout(() => {
1987
+ this.fetchDebounceTimer = undefined;
1988
+ this.fetchOptions(query, page);
1989
+ }, delay);
1990
+ }
1991
+ async fetchOptions(query, page = 1) {
1992
+ var _a;
1993
+ if (!this.asyncUrl)
1994
+ return;
1995
+ // Abort any pending request and clear existing timeout
1996
+ (_a = this.abortController) === null || _a === void 0 ? void 0 : _a.abort();
1997
+ if (this.fetchTimeoutTimer !== undefined) {
1998
+ window.clearTimeout(this.fetchTimeoutTimer);
1999
+ this.fetchTimeoutTimer = undefined;
2000
+ }
2001
+ this.abortController = new AbortController();
2002
+ this.loading = true;
2003
+ // Set up timeout for fetch request
2004
+ this.fetchTimeoutTimer = window.setTimeout(() => {
2005
+ var _a;
2006
+ (_a = this.abortController) === null || _a === void 0 ? void 0 : _a.abort();
2007
+ this.fetchTimeoutTimer = undefined;
2008
+ }, this.fetchTimeout);
2009
+ try {
2010
+ // Guard against malformed asyncUrl
2011
+ let url;
2012
+ try {
2013
+ url = new URL(this.asyncUrl, window.location.origin);
2014
+ }
2015
+ catch (urlError) {
2016
+ throw new TypeError(`Invalid asyncUrl: ${this.asyncUrl}`);
2017
+ }
2018
+ if (this.asyncMethod === 'GET') {
2019
+ url.searchParams.set('search', query);
2020
+ url.searchParams.set('page', String(page));
2021
+ }
2022
+ const response = await fetch(url.toString(), Object.assign({ method: this.asyncMethod, signal: this.abortController.signal, headers: {
2023
+ 'Content-Type': 'application/json',
2024
+ 'Accept': 'application/json',
2025
+ } }, (this.asyncMethod === 'POST' && {
2026
+ body: JSON.stringify({ search: query, page }),
2027
+ })));
2028
+ // Clear timeout on successful response
2029
+ if (this.fetchTimeoutTimer !== undefined) {
2030
+ window.clearTimeout(this.fetchTimeoutTimer);
2031
+ this.fetchTimeoutTimer = undefined;
2032
+ }
2033
+ if (!response.ok)
2034
+ throw new Error('Failed to fetch options');
2035
+ const data = await response.json();
2036
+ const formattedResults = data.results.map(item => {
2037
+ // If formatResult is provided, use it
2038
+ if (this.formatResult) {
2039
+ return this.formatResult(item);
2040
+ }
2041
+ // Defensive check: ensure item is an object before spreading
2042
+ if (typeof item === 'object' && item !== null) {
2043
+ return Object.assign({ id: item.id, text: item.text }, item);
2044
+ }
2045
+ // Handle primitives by converting to safe shape
2046
+ return {
2047
+ id: String(item),
2048
+ text: String(item),
2049
+ };
2050
+ });
2051
+ if (page === 1) {
2052
+ this.internalOptions = formattedResults;
2053
+ }
2054
+ else {
2055
+ this.internalOptions = [...this.internalOptions, ...formattedResults];
2056
+ }
2057
+ this.hasMore = data.totalCount ? this.internalOptions.length < data.totalCount : false;
2058
+ this.currentPage = page;
2059
+ // Update DOM options from async data
2060
+ this.updateOptionsFromAsync();
2061
+ }
2062
+ catch (error) {
2063
+ // Clear timeout on error
2064
+ if (this.fetchTimeoutTimer !== undefined) {
2065
+ window.clearTimeout(this.fetchTimeoutTimer);
2066
+ this.fetchTimeoutTimer = undefined;
2067
+ }
2068
+ if (error.name !== 'AbortError') {
2069
+ console.error('PdsCombobox: Failed to fetch options', error);
2070
+ }
2071
+ }
2072
+ finally {
2073
+ this.loading = false;
2074
+ }
2075
+ }
2076
+ updateOptionsFromAsync() {
2077
+ if (!this.asyncUrl && !this.options)
2078
+ return;
2079
+ // Clear existing slot-based options when using async
2080
+ this.optionEls = [];
2081
+ this.allItems = [];
2082
+ // Create option elements from async data
2083
+ const asyncOptions = this.options || this.internalOptions;
2084
+ asyncOptions.forEach(opt => {
2085
+ const optionEl = document.createElement('option');
2086
+ optionEl.value = String(opt.id);
2087
+ optionEl.textContent = opt.text;
2088
+ this.optionEls.push(optionEl);
2089
+ this.allItems.push(optionEl);
2090
+ });
2091
+ // Re-apply preselection if a value is set but no option has been selected yet.
2092
+ // This handles the case where `value` is set before async options have loaded.
2093
+ if (this.value && !this.selectedOption) {
2094
+ const matchingOption = this.optionEls.find(opt => opt.value === this.value);
2095
+ if (matchingOption) {
2096
+ this.setSelectedOption(matchingOption);
2097
+ }
2098
+ }
2099
+ this.filterOptions();
2100
+ }
2101
+ updateOptions() {
2102
+ var _a;
2103
+ // Skip slot-based options if using async
2104
+ if (this.asyncUrl || this.options) {
2105
+ this.updateOptionsFromAsync();
2106
+ return;
2107
+ }
2108
+ // Get all elements from the slot
2109
+ const slot = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('slot[name="option"], slot:not([name])');
2110
+ if (slot) {
2111
+ const allElements = slot.assignedElements({ flatten: true });
2112
+ // Separate options from group labels and flatten optgroups
2113
+ this.allItems = [];
2114
+ this.optionEls = [];
2115
+ allElements.forEach(el => {
2116
+ if (el.tagName === 'OPTION') {
2117
+ this.optionEls.push(el);
2118
+ this.allItems.push(el);
2119
+ }
2120
+ else if (el.tagName === 'OPTGROUP') {
2121
+ const optgroup = el;
2122
+ this.allItems.push(optgroup);
2123
+ // Add optgroup children (options)
2124
+ Array.from(optgroup.children).forEach(child => {
2125
+ if (child.tagName === 'OPTION') {
2126
+ this.optionEls.push(child);
2127
+ this.allItems.push(child);
2128
+ }
2129
+ });
2130
+ }
2131
+ else if (el.tagName === 'PDS-TEXT') {
2132
+ this.allItems.push(el);
2133
+ }
2134
+ });
2135
+ // Set initial selected option based on value property
2136
+ let initialSelected = null;
2137
+ // Check if value property matches any option
2138
+ if (this.value) {
2139
+ initialSelected = this.optionEls.find(opt => opt.value === this.value) || null;
2140
+ if (initialSelected) {
2141
+ // Update the display text to show the option's text content
2142
+ this.displayText = this.getOptionLabel(initialSelected);
2143
+ // Keep this.value as the actual option value (already correct)
2144
+ }
2145
+ }
2146
+ // For chip triggers, ensure we always have a selected option
2147
+ if (!initialSelected && this.trigger === 'chip' && this.optionEls.length > 0) {
2148
+ initialSelected = this.optionEls[0]; // Select first option as default
2149
+ this.value = initialSelected.value;
2150
+ this.displayText = this.getOptionLabel(initialSelected);
2151
+ console.warn('PDS Combobox: Chip triggers should always have a selected option. Automatically selected the first option.');
2152
+ }
2153
+ // Update selection if we found a different selected option or if we don't have one
2154
+ if (initialSelected && initialSelected !== this.selectedOption) {
2155
+ this.setSelectedOption(initialSelected);
2156
+ }
2157
+ else if (!this.selectedOption && initialSelected) {
2158
+ this.setSelectedOption(initialSelected);
2159
+ }
2160
+ this.filterOptions();
2161
+ }
2162
+ }
2163
+ // Helper method to get option label, falling back to text content if no label attribute
2164
+ getOptionLabel(option) {
2165
+ return option.label || option.textContent || '';
2166
+ }
2167
+ // Helper method to get option layout content
2168
+ getOptionLayoutContent(option) {
2169
+ return this.sanitizeHtml(option.innerHTML || '');
2170
+ }
2171
+ // HTML sanitization using DOMPurify library to prevent XSS attacks
2172
+ sanitizeHtml(html) {
2173
+ // Configure DOMPurify to allow Pine Design System components while removing dangerous content
2174
+ const config = {
2175
+ // Allow all custom elements (including pds-* components)
2176
+ CUSTOM_ELEMENT_HANDLING: {
2177
+ tagNameCheck: (tagName) => {
2178
+ // Allow all pds-* tags and standard safe HTML tags
2179
+ return tagName.startsWith('pds-') || /^[a-z]+$/i.test(tagName);
2180
+ },
2181
+ attributeNameCheck: (attr) => {
2182
+ // Allow standard HTML attributes, data-* attributes, and Pine component attributes
2183
+ return /^[a-zA-Z][a-zA-Z0-9-]*$/.test(attr) || attr.startsWith('data-') || attr.startsWith('aria-');
2184
+ },
2185
+ allowCustomizedBuiltInElements: false,
2186
+ },
2187
+ // Allow standard safe attributes
2188
+ ALLOW_DATA_ATTR: true,
2189
+ ALLOW_ARIA_ATTR: true,
2190
+ // Specifically forbid dangerous tags
2191
+ FORBID_TAGS: ['script', 'iframe', 'object', 'embed', 'form', 'input', 'textarea', 'select', 'button', 'style'],
2192
+ // Forbid all event handler attributes
2193
+ FORBID_ATTR: [
2194
+ 'onerror', 'onload', 'onclick', 'onmouseover', 'onmouseout', 'onmousemove',
2195
+ 'onfocus', 'onblur', 'onchange', 'onsubmit', 'onkeydown', 'onkeyup', 'onkeypress',
2196
+ 'onmousedown', 'onmouseup', 'ondblclick', 'oncontextmenu', 'onscroll'
2197
+ ],
2198
+ // Safe protocol whitelist
2199
+ ALLOWED_URI_REGEXP: /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp|data):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,
2200
+ };
2201
+ return purify.sanitize(html, config);
2202
+ }
2203
+ // Helper method to check if option should render as layout
2204
+ isOptionLayout(option) {
2205
+ return this.customOptionLayouts && option.hasAttribute('data-layout');
2206
+ }
2207
+ // Helper method to check if option has chip attributes (new automatic approach)
2208
+ isOptionChip(option) {
2209
+ return option.hasAttribute('chip-sentiment') ||
2210
+ option.hasAttribute('chip-large') ||
2211
+ option.hasAttribute('chip-icon') ||
2212
+ option.hasAttribute('chip-dot');
2213
+ }
2214
+ // Helper method to get chip properties from option attributes
2215
+ getOptionChipProps(option) {
2216
+ return {
2217
+ sentiment: option.getAttribute('chip-sentiment') || 'neutral',
2218
+ large: option.hasAttribute('chip-large'),
2219
+ icon: option.getAttribute('chip-icon') || undefined,
2220
+ dot: option.hasAttribute('chip-dot')
2221
+ };
2222
+ }
2223
+ // Helper method to check if option is selected (single source of truth)
2224
+ isOptionSelected(option) {
2225
+ return this.selectedOption === option;
2226
+ }
2227
+ // Helper method to set selected option (centralized state management)
2228
+ setSelectedOption(option) {
2229
+ this.selectedOption = option;
2230
+ // Immediately update chip properties for automatic rendering to ensure reactivity
2231
+ if (option && this.isOptionChip(option)) {
2232
+ this.selectedOptionChipProps = this.getOptionChipProps(option);
2233
+ }
2234
+ else {
2235
+ this.selectedOptionChipProps = null;
2236
+ }
2237
+ }
2238
+ filterOptions() {
2239
+ // Ensure allItems includes optionEls if not already populated (for edge cases)
2240
+ if (this.allItems.length === 0 && this.optionEls.length > 0) {
2241
+ this.allItems = [...this.optionEls];
2242
+ }
2243
+ if (this.mode === 'select-only' || this.expandFilterListWhileOpen) {
2244
+ this.filteredItems = [...this.allItems];
2245
+ }
2246
+ else {
2247
+ const val = this.displayText.toLowerCase();
2248
+ const filteredOptions = this.optionEls.filter(option => {
2249
+ // For layout options, search both text content and data-search-text attribute
2250
+ if (this.isOptionLayout(option)) {
2251
+ const searchText = option.getAttribute('data-search-text') || option.textContent || '';
2252
+ return searchText.toLowerCase().includes(val);
2253
+ }
2254
+ return this.getOptionLabel(option).toLowerCase().includes(val);
2255
+ });
2256
+ // Rebuild filtered items maintaining group structure - simplified approach
2257
+ this.filteredItems = [];
2258
+ let currentGroupLabel = null;
2259
+ this.allItems.forEach(item => {
2260
+ if (item.tagName === 'OPTGROUP' || item.tagName === 'PDS-TEXT') {
2261
+ currentGroupLabel = item;
2262
+ }
2263
+ else if (item.tagName === 'OPTION' && filteredOptions.includes(item)) {
2264
+ const optionEl = item;
2265
+ const parent = optionEl.parentElement;
2266
+ let labelToUse = null;
2267
+ if (parent && parent.tagName === 'OPTGROUP') {
2268
+ // Only use the actual parent optgroup as label
2269
+ labelToUse = parent;
2270
+ }
2271
+ else if (currentGroupLabel && currentGroupLabel.tagName === 'PDS-TEXT') {
2272
+ // Allow pds-text to label subsequent top-level options until another label appears
2273
+ labelToUse = currentGroupLabel;
2274
+ }
2275
+ if (labelToUse && !this.filteredItems.includes(labelToUse)) {
2276
+ this.filteredItems.push(labelToUse);
2277
+ }
2278
+ this.filteredItems.push(optionEl);
2279
+ }
2280
+ });
2281
+ }
2282
+ this.highlightedIndex = -1;
2283
+ }
2284
+ clearExpandFilterList() {
2285
+ this.expandFilterListWhileOpen = false;
2286
+ }
2287
+ /**
2288
+ * When reopening the dropdown in filter mode with the input still showing the
2289
+ * committed selection label, show the full option list until the user edits the query.
2290
+ */
2291
+ prepareExpandFilterListOnOpen() {
2292
+ if (this.mode === 'filter' &&
2293
+ this.selectedOption &&
2294
+ this.displayText === this.getOptionLabel(this.selectedOption)) {
2295
+ this.expandFilterListWhileOpen = true;
2296
+ }
2297
+ else {
2298
+ this.expandFilterListWhileOpen = false;
2299
+ }
2300
+ }
2301
+ positionDropdown() {
2302
+ if (!this.triggerEl || !this.listboxEl) {
2303
+ return;
2304
+ }
2305
+ const strategy = this.usesBodyPortal ? 'fixed' : 'absolute';
2306
+ const zIndex = this.usesBodyPortal
2307
+ ? 'var(--pine-z-index-priority)'
2308
+ : 'var(--pine-z-index-raised)';
2309
+ this.listboxEl.style.width = this.dropdownWidth;
2310
+ if (this.maxHeight) {
2311
+ this.listboxEl.style.maxHeight = this.maxHeight;
2312
+ this.listboxEl.style.overflowY = 'auto';
2313
+ }
2314
+ return computePosition(this.triggerEl, this.listboxEl, {
2315
+ placement: this.dropdownPlacement,
2316
+ strategy,
2317
+ middleware: [offset(12), flip(), shift({ padding: 5 })],
2318
+ }).then(({ x, y }) => {
2319
+ if (!this.listboxEl) {
2320
+ return;
2321
+ }
2322
+ Object.assign(this.listboxEl.style, {
2323
+ left: `${x}px`,
2324
+ top: `${y}px`,
2325
+ position: strategy,
2326
+ zIndex,
2327
+ });
2328
+ });
2329
+ }
2330
+ openDropdownPositioning() {
2331
+ if (!this.triggerEl || !this.listboxEl) {
2332
+ return;
2333
+ }
2334
+ void this.positionDropdown();
2335
+ }
2336
+ startBodyPortalAutoUpdate() {
2337
+ if (this.bodyPortalAutoUpdateActive || !this.triggerEl || !this.listboxEl) {
2338
+ return;
2339
+ }
2340
+ this.cleanupPositionAutoUpdate = autoUpdate(this.triggerEl, this.listboxEl, () => {
2341
+ void this.positionDropdown();
2342
+ });
2343
+ this.bodyPortalAutoUpdateActive = true;
2344
+ }
2345
+ stopBodyPortalAutoUpdate() {
2346
+ var _a;
2347
+ (_a = this.cleanupPositionAutoUpdate) === null || _a === void 0 ? void 0 : _a.call(this);
2348
+ this.cleanupPositionAutoUpdate = undefined;
2349
+ this.bodyPortalAutoUpdateActive = false;
2350
+ }
2351
+ getPortalMountRoot() {
2352
+ var _a;
2353
+ return (_a = this.findNearestDialogForPortal(this.el)) !== null && _a !== void 0 ? _a : document.body;
2354
+ }
2355
+ /**
2356
+ * Resolves the native `<dialog>` to host the portaled listbox so it stays in the same top layer
2357
+ * as `showModal()`. `Element.closest('dialog')` stops at shadow boundaries and can miss a
2358
+ * dialog that only wraps slotted content; this walks assigned slots and shadow hosts, and
2359
+ * falls back to `pds-modal`'s dialog when the combobox lives inside that subtree.
2360
+ */
2361
+ findNearestDialogForPortal(from) {
2362
+ const seen = new Set();
2363
+ let current = from;
2364
+ while (current && !seen.has(current)) {
2365
+ seen.add(current);
2366
+ if (current.nodeType === Node.ELEMENT_NODE && current.localName === 'dialog') {
2367
+ return current;
2368
+ }
2369
+ if (current.nodeType === Node.ELEMENT_NODE) {
2370
+ const assigned = current.assignedSlot;
2371
+ if (assigned) {
2372
+ current = assigned;
2373
+ continue;
2374
+ }
2375
+ }
2376
+ const parent = current.parentNode;
2377
+ if (parent) {
2378
+ current = parent instanceof ShadowRoot ? parent.host : parent;
2379
+ continue;
2380
+ }
2381
+ break;
2382
+ }
2383
+ const pineModal = from.closest('pds-modal');
2384
+ if (pineModal) {
2385
+ const pineDialog = pineModal.querySelector('dialog');
2386
+ if (pineDialog) {
2387
+ return pineDialog;
2388
+ }
2389
+ }
2390
+ return null;
2391
+ }
2392
+ ensureBodyPortal() {
2393
+ if (this.portalEl !== null) {
2394
+ const target = this.getPortalMountRoot();
2395
+ if (this.portalEl.parentElement !== target) {
2396
+ target.appendChild(this.portalEl);
2397
+ }
2398
+ return this.portalEl;
2399
+ }
2400
+ this.portalEl = document.createElement('div');
2401
+ this.portalEl.className = 'pds-combobox-dropdown-portal';
2402
+ this.getPortalMountRoot().appendChild(this.portalEl);
2403
+ return this.portalEl;
2404
+ }
2405
+ syncBodyPortal() {
2406
+ if (!this.listboxEl) {
2407
+ return;
2408
+ }
2409
+ const portal = this.ensureBodyPortal();
2410
+ for (const stale of Array.from(portal.children)) {
2411
+ if (stale !== this.listboxEl) {
2412
+ stale.remove();
2413
+ }
2414
+ }
2415
+ if (this.listboxEl.parentElement !== portal) {
2416
+ portal.appendChild(this.listboxEl);
2417
+ void this.positionDropdown();
2418
+ this.startBodyPortalAutoUpdate();
2419
+ }
2420
+ }
2421
+ removeBodyPortal() {
2422
+ var _a;
2423
+ this.stopBodyPortalAutoUpdate();
2424
+ if ((_a = this.portalEl) === null || _a === void 0 ? void 0 : _a.parentNode) {
2425
+ this.portalEl.parentNode.removeChild(this.portalEl);
2426
+ }
2427
+ this.portalEl = null;
2428
+ if (this.listboxEl && !this.listboxEl.isConnected) {
2429
+ this.listboxEl = undefined;
2430
+ }
2431
+ }
2432
+ /**
2433
+ * Sets focus on the native input element.
2434
+ */
2435
+ async setFocus() {
2436
+ var _a;
2437
+ if (this.inputEl) {
2438
+ this.inputEl.focus();
2439
+ }
2440
+ else {
2441
+ (_a = this.triggerEl) === null || _a === void 0 ? void 0 : _a.focus();
2442
+ }
2443
+ }
2444
+ /**
2445
+ * Sets the initial highlighted index when dropdown opens.
2446
+ * If there's a selected option, highlight it. Otherwise, highlight the first option.
2447
+ */
2448
+ setInitialHighlightedIndex() {
2449
+ const selectableOptions = this.filteredItems.filter(item => item.tagName === 'OPTION');
2450
+ if (selectableOptions.length === 0) {
2451
+ this.highlightedIndex = -1;
2452
+ return;
2453
+ }
2454
+ // If there's a selected option, find its index in the filtered options
2455
+ if (this.selectedOption) {
2456
+ const selectedIndex = selectableOptions.findIndex(option => option === this.selectedOption);
2457
+ if (selectedIndex >= 0) {
2458
+ this.highlightedIndex = selectedIndex;
2459
+ return;
2460
+ }
2461
+ }
2462
+ // No selected option or selected option not in filtered results, highlight first option
2463
+ this.highlightedIndex = 0;
2464
+ }
2465
+ /**
2466
+ * Focus management helper - moves focus to the first option when dropdown opens
2467
+ */
2468
+ focusFirstOption() {
2469
+ if (this.isOpen) {
2470
+ const selectableOptions = this.filteredItems.filter(item => item.tagName === 'OPTION');
2471
+ if (selectableOptions.length > 0) {
2472
+ this.setInitialHighlightedIndex();
2473
+ // DON'T focus the option elements - keep focus on trigger and use aria-activedescendant
2474
+ // This prevents the focusout event that was closing the dropdown
2475
+ // But still call updateOptionFocus for scrolling
2476
+ if (this.listboxEl) {
2477
+ this.updateOptionFocus();
2478
+ }
2479
+ }
2480
+ }
2481
+ }
2482
+ /**
2483
+ * Focus management helper - actually focuses the first option when opened via arrow keys
2484
+ */
2485
+ focusFirstOptionForArrowKeys() {
2486
+ if (!this.isOpen) {
2487
+ return;
2488
+ }
2489
+ // Body-mounted listboxes stay outside modal focus traps; keep focus on the trigger.
2490
+ if (this.usesBodyPortal) {
2491
+ this.isArrowKeyNavigationMode = true;
2492
+ this.focusFirstOption();
2493
+ return;
2494
+ }
2495
+ this.isArrowKeyNavigationMode = true;
2496
+ const selectableOptions = this.filteredItems.filter(item => item.tagName === 'OPTION');
2497
+ if (selectableOptions.length > 0) {
2498
+ this.setInitialHighlightedIndex();
2499
+ if (this.listboxEl) {
2500
+ const optionElements = this.listboxEl.querySelectorAll('[role="option"]');
2501
+ const highlightedOption = optionElements[this.highlightedIndex];
2502
+ if (highlightedOption) {
2503
+ optionElements.forEach(option => {
2504
+ option.setAttribute('tabindex', '-1');
2505
+ });
2506
+ highlightedOption.setAttribute('tabindex', '0');
2507
+ highlightedOption.focus();
2508
+ highlightedOption.scrollIntoView({ block: 'nearest', behavior: 'smooth' });
2509
+ }
2510
+ }
2511
+ this.updateAriaActiveDescendant();
2512
+ }
2513
+ }
2514
+ /**
2515
+ * Focus management helper - updates visual state and scrolling for the currently highlighted option
2516
+ * Note: We don't actually focus the option to prevent focusout events that close the dropdown
2517
+ */
2518
+ updateOptionFocus() {
2519
+ if (!this.listboxEl || this.highlightedIndex < 0)
2520
+ return;
2521
+ const optionElements = this.listboxEl.querySelectorAll('[role="option"]');
2522
+ const currentOption = optionElements[this.highlightedIndex];
2523
+ if (currentOption) {
2524
+ // Check if any option currently has focus OR if we're in arrow-key navigation mode
2525
+ const hasOptionFocus = Array.from(optionElements).some(el => el === document.activeElement);
2526
+ const shouldFocusOption = !this.usesBodyPortal && (hasOptionFocus || this.isArrowKeyNavigationMode);
2527
+ if (shouldFocusOption) {
2528
+ optionElements.forEach(option => {
2529
+ option.setAttribute('tabindex', '-1');
2530
+ });
2531
+ currentOption.setAttribute('tabindex', '0');
2532
+ currentOption.focus();
2533
+ }
2534
+ // Always scroll the option into view
2535
+ currentOption.scrollIntoView({ block: 'nearest', behavior: 'smooth' });
2536
+ }
2537
+ // Always update aria-activedescendant on the trigger element
2538
+ this.updateAriaActiveDescendant();
2539
+ }
2540
+ /**
2541
+ * Updates aria-activedescendant on the trigger element
2542
+ */
2543
+ updateAriaActiveDescendant() {
2544
+ if (this.triggerEl && this.highlightedIndex >= 0) {
2545
+ this.triggerEl.setAttribute('aria-activedescendant', this.optionDomId(this.highlightedIndex));
2546
+ }
2547
+ else if (this.triggerEl) {
2548
+ this.triggerEl.removeAttribute('aria-activedescendant');
2549
+ }
2550
+ }
2551
+ /**
2552
+ * Focus management helper - restores focus to the trigger element
2553
+ */
2554
+ restoreFocusToTrigger() {
2555
+ setTimeout(() => {
2556
+ if (this.inputEl) {
2557
+ this.inputEl.focus();
2558
+ }
2559
+ else if (this.triggerEl) {
2560
+ this.triggerEl.focus();
2561
+ }
2562
+ }, 0);
2563
+ }
2564
+ /**
2565
+ * Gets the value of the currently selected option.
2566
+ */
2567
+ async getSelectedValue() {
2568
+ return this.selectedOption ? this.selectedOption.value : null;
2569
+ }
2570
+ /**
2571
+ * Clears the selected value and resets the component.
2572
+ */
2573
+ async clear() {
2574
+ const hadValue = this.value !== '' || this.displayText !== '';
2575
+ this.displayText = '';
2576
+ this.setSelectedOption(null);
2577
+ this.value = '';
2578
+ this.filterOptions();
2579
+ this.updateFormValue('');
2580
+ if (hadValue) {
2581
+ this.pdsComboboxChange.emit({ value: '' });
2582
+ }
2583
+ }
2584
+ // Get the label of the selected option
2585
+ get selectedLabel() {
2586
+ return this.displayText || '';
2587
+ }
2588
+ // Get the layout content of the selected option for button trigger
2589
+ get selectedLayoutContent() {
2590
+ return this.selectedOptionLayoutContent;
2591
+ }
2592
+ // Check if selected option has layout
2593
+ get selectedHasLayout() {
2594
+ return this.selectedOption ? this.isOptionLayout(this.selectedOption) : false;
2595
+ }
2596
+ // Extract chip sentiment from selected option's attributes, layout content, or slotted trigger content
2597
+ get selectedChipSentiment() {
2598
+ // First priority: Check selected option's chip attributes (new automatic approach)
2599
+ if (this.selectedOption && this.isOptionChip(this.selectedOption)) {
2600
+ const sentiment = this.selectedOption.getAttribute('chip-sentiment');
2601
+ if (sentiment)
2602
+ return sentiment;
2603
+ }
2604
+ // Second priority: Check selected option's layout content (existing custom layout approach)
2605
+ if (this.selectedOption && this.isOptionLayout(this.selectedOption)) {
2606
+ const chipElement = this.selectedOption.querySelector('pds-chip');
2607
+ const sentiment = chipElement === null || chipElement === void 0 ? void 0 : chipElement.getAttribute('sentiment');
2608
+ if (sentiment)
2609
+ return sentiment;
2610
+ }
2611
+ // Third priority: Check if we have custom trigger content with a chip (initial state)
2612
+ if (this.customTriggerContent) {
2613
+ const slottedChip = this.el.querySelector('pds-chip[slot="trigger-content"]');
2614
+ if (slottedChip) {
2615
+ const sentiment = slottedChip.getAttribute('sentiment');
2616
+ if (sentiment)
2617
+ return sentiment;
2618
+ }
2619
+ }
2620
+ // Fallback: Use component props
2621
+ return this.chipSentiment;
2622
+ }
2623
+ // Extract chip large from selected option's attributes, layout content, or slotted trigger content
2624
+ get selectedChipLarge() {
2625
+ // First priority: Check selected option's chip attributes (new automatic approach)
2626
+ if (this.selectedOption && this.isOptionChip(this.selectedOption)) {
2627
+ if (this.selectedOption.hasAttribute('chip-large'))
2628
+ return true;
2629
+ }
2630
+ // Second priority: Check selected option's layout content (existing custom layout approach)
2631
+ if (this.selectedOption && this.isOptionLayout(this.selectedOption)) {
2632
+ const chipElement = this.selectedOption.querySelector('pds-chip');
2633
+ if ((chipElement === null || chipElement === void 0 ? void 0 : chipElement.getAttribute('size')) === 'lg')
2634
+ return true;
2635
+ }
2636
+ // Third priority: Check if we have custom trigger content with a chip (initial state)
2637
+ if (this.customTriggerContent) {
2638
+ const slottedChip = this.el.querySelector('pds-chip[slot="trigger-content"]');
2639
+ if (slottedChip && slottedChip.getAttribute('size') === 'lg') {
2640
+ return true;
2641
+ }
2642
+ }
2643
+ // Fallback: Use component props
2644
+ return this.chipLarge;
2645
+ }
2646
+ // Extract chip icon from selected option's attributes, layout content, or slotted trigger content
2647
+ get selectedChipIcon() {
2648
+ // First priority: Check selected option's chip attributes (new automatic approach)
2649
+ if (this.selectedOption && this.isOptionChip(this.selectedOption)) {
2650
+ const icon = this.selectedOption.getAttribute('chip-icon');
2651
+ if (icon)
2652
+ return icon;
2653
+ }
2654
+ // Second priority: Check selected option's layout content (existing custom layout approach)
2655
+ if (this.selectedOption && this.isOptionLayout(this.selectedOption)) {
2656
+ const chipElement = this.selectedOption.querySelector('pds-chip');
2657
+ const icon = chipElement === null || chipElement === void 0 ? void 0 : chipElement.getAttribute('icon');
2658
+ if (icon)
2659
+ return icon;
2660
+ }
2661
+ // Third priority: Check if we have custom trigger content with a chip (initial state)
2662
+ if (this.customTriggerContent) {
2663
+ const slottedChip = this.el.querySelector('pds-chip[slot="trigger-content"]');
2664
+ if (slottedChip) {
2665
+ const icon = slottedChip.getAttribute('icon');
2666
+ if (icon)
2667
+ return icon;
2668
+ }
2669
+ }
2670
+ // Fallback: Use component props
2671
+ return this.chipIcon;
2672
+ }
2673
+ // Extract chip dot from selected option's attributes, layout content, or slotted trigger content
2674
+ get selectedChipDot() {
2675
+ // First priority: Check selected option's chip attributes (new automatic approach)
2676
+ if (this.selectedOption && this.isOptionChip(this.selectedOption)) {
2677
+ if (this.selectedOption.hasAttribute('chip-dot'))
2678
+ return true;
2679
+ }
2680
+ // Second priority: Check selected option's layout content (existing custom layout approach)
2681
+ if (this.selectedOption && this.isOptionLayout(this.selectedOption)) {
2682
+ const chipElement = this.selectedOption.querySelector('pds-chip');
2683
+ if (chipElement === null || chipElement === void 0 ? void 0 : chipElement.hasAttribute('dot'))
2684
+ return true;
2685
+ }
2686
+ // Third priority: Check if we have custom trigger content with a chip (initial state)
2687
+ if (this.customTriggerContent) {
2688
+ const slottedChip = this.el.querySelector('pds-chip[slot="trigger-content"]');
2689
+ if (slottedChip && slottedChip.hasAttribute('dot')) {
2690
+ return true;
2691
+ }
2692
+ }
2693
+ // Fallback: Use component props
2694
+ return this.chipDot;
2695
+ }
2696
+ handleOptionClick(option) {
2697
+ // Update reactive state - single source of truth
2698
+ // The @Watch('selectedOption') will handle displayText, value, and form internals
2699
+ this.setSelectedOption(option);
2700
+ this.isOpen = false;
2701
+ this.clearExpandFilterList();
2702
+ this.pdsComboboxChange.emit({ value: option.value });
2703
+ }
2704
+ renderDropdown() {
2705
+ if (!this.isOpen) {
2706
+ return null;
2707
+ }
2708
+ const hasSlottedEmpty = !this.usesBodyPortal && !!this.el.querySelector('[slot="empty"]');
2709
+ const hasSlottedLoading = !this.usesBodyPortal && !!this.el.querySelector('[slot="loading"]');
2710
+ let optionIndex = 0;
2711
+ const selectableOptions = this.filteredItems.filter(item => item.tagName === 'OPTION');
2712
+ return (h("ul", { class: "pds-combobox__listbox", role: "listbox", id: this.listboxId, "aria-label": this.label || 'Options', "aria-multiselectable": "false", ref: el => (this.listboxEl = el), onScroll: this.handleScroll }, this.loading && (h("li", { class: "pds-combobox__loading", role: "presentation" }, hasSlottedLoading ? (h("slot", { name: "loading" })) : (h("pds-loader", { size: "small" })))), !this.loading && this.filteredItems.length === 0 && (h("li", { class: "pds-combobox__empty", role: "presentation" }, hasSlottedEmpty ? (h("slot", { name: "empty" })) : (h("span", null, "No options found")))), this.filteredItems.map((item, itemIdx) => {
2713
+ if (item.tagName === 'OPTGROUP') {
2714
+ const optgroup = item;
2715
+ return (h("li", { key: `optgroup-${itemIdx}`, class: "pds-combobox__group-label", role: "presentation", "aria-label": optgroup.label }, optgroup.label));
2716
+ }
2717
+ else if (item.tagName === 'PDS-TEXT') {
2718
+ const pdsText = item;
2719
+ return (h("li", { key: `pds-text-${itemIdx}`, class: "pds-combobox__group-label", role: "presentation" }, pdsText.textContent));
2720
+ }
2721
+ else if (item.tagName === 'OPTION') {
2722
+ const option = item;
2723
+ const isSelected = this.isOptionSelected(option);
2724
+ const isHighlighted = this.highlightedIndex === optionIndex;
2725
+ const isLayout = this.isOptionLayout(option);
2726
+ const isChip = this.isOptionChip(option);
2727
+ const currentOptionIndex = optionIndex++;
2728
+ return (h("li", { key: option.value, id: this.optionDomId(currentOptionIndex), role: "option", "aria-selected": isSelected ? 'true' : 'false', "aria-setsize": selectableOptions.length, "aria-posinset": currentOptionIndex + 1, "aria-label": isLayout || isChip ? option.getAttribute('aria-label') || this.getOptionLabel(option) : undefined, tabindex: this.usesBodyPortal ? '-1' : isHighlighted ? '0' : '-1', class: {
2729
+ 'pds-combobox__option': true,
2730
+ 'pds-combobox__option--highlighted': isHighlighted,
2731
+ 'pds-combobox__option--layout': isLayout,
2732
+ 'pds-combobox__option--chip': isChip,
2733
+ }, "data-option-index": currentOptionIndex, onMouseDown: this.onOptionMouseDown, onClick: this.onOptionClick, onMouseEnter: this.onOptionMouseEnter, onKeyDown: this.onOptionKeyDown }, isLayout ? (h("pds-box", { class: "pds-combobox__option-layout-wrapper", innerHTML: this.getOptionLayoutContent(option) })) : isChip ? (this.renderOptionChip(option)) : (this.getOptionLabel(option)), isSelected && h("pds-icon", { icon: "check", size: "regular", class: "pds-combobox__option-check" })));
2734
+ }
2735
+ return null;
2736
+ }), this.hasMore && !this.loading && (h("li", { class: "pds-combobox__load-more", role: "presentation" }, h("pds-loader", { size: "small" })))));
2737
+ }
2738
+ // Helper method to render the caret icon
2739
+ renderCaretIcon() {
2740
+ return h("pds-icon", { icon: "caret-down", "aria-hidden": "true", class: "pds-combobox__button-trigger-chevron" });
2741
+ }
2742
+ // Helper method to render layout content
2743
+ renderLayoutContent() {
2744
+ return (h("div", { class: "pds-combobox__button-trigger-layout-wrapper", innerHTML: this.selectedLayoutContent }));
2745
+ }
2746
+ // Helper method to render default text content
2747
+ renderDefaultContent() {
2748
+ return (h("span", { class: "pds-combobox__button-trigger-label" }, this.selectedLabel || this.placeholder));
2749
+ }
2750
+ // Helper method to check if we should show layout content
2751
+ shouldShowLayoutContent() {
2752
+ return this.selectedHasLayout && !!this.selectedLayoutContent;
2753
+ }
2754
+ // Helper method to build chip trigger CSS classes
2755
+ getChipTriggerClass() {
2756
+ const classes = ['pds-combobox__chip-trigger'];
2757
+ // Add sentiment class
2758
+ classes.push(`pds-combobox__chip-trigger--${this.selectedChipSentiment}`);
2759
+ // Always use dropdown variant for chip triggers
2760
+ classes.push('pds-combobox__chip-trigger--dropdown');
2761
+ // Add large class if needed
2762
+ if (this.selectedChipLarge) {
2763
+ classes.push('pds-combobox__chip-trigger--large');
2764
+ }
2765
+ // Add dot class if needed
2766
+ if (this.selectedChipDot) {
2767
+ classes.push('pds-combobox__chip-trigger--dot');
2768
+ }
2769
+ return classes.join(' ');
2770
+ }
2771
+ renderButtonTriggerContent() {
2772
+ // Case 1: Custom trigger content with layout priority
2773
+ if (this.customTriggerContent) {
2774
+ if (this.shouldShowLayoutContent()) {
2775
+ return [this.renderLayoutContent(), this.renderCaretIcon()];
2776
+ }
2777
+ // Fall back to slot content when no layout is available
2778
+ return h("slot", { name: "trigger-content" });
2779
+ }
2780
+ // Case 2: Standard mode with layout content
2781
+ if (this.shouldShowLayoutContent()) {
2782
+ return [this.renderLayoutContent(), this.renderCaretIcon()];
2783
+ }
2784
+ // Case 3: Standard mode with default text content
2785
+ return [this.renderDefaultContent(), this.renderCaretIcon()];
2786
+ }
2787
+ renderChipTriggerContent() {
2788
+ // Case 1: Custom trigger content with layout priority
2789
+ if (this.customTriggerContent) {
2790
+ if (this.shouldShowLayoutContent()) {
2791
+ // When using custom layouts, the chip handles its own dropdown arrow
2792
+ return this.renderChipTriggerLayoutContent();
2793
+ }
2794
+ // Fall back to slot content when no layout is available - chip handles its own dropdown arrow
2795
+ return h("slot", { name: "trigger-content" });
2796
+ }
2797
+ // Case 2: Standard mode with layout content
2798
+ if (this.shouldShowLayoutContent()) {
2799
+ // When using custom layouts, the chip handles its own dropdown arrow
2800
+ return this.renderChipTriggerLayoutContent();
2801
+ }
2802
+ // Case 3: Automatic chip mode - selected option has chip attributes
2803
+ if (this.selectedOption && this.selectedOptionChipProps) {
2804
+ // Render as chip automatically - chip handles its own dropdown arrow
2805
+ return this.renderSelectedOptionAsChip();
2806
+ }
2807
+ // Case 4: Standard mode with default text content
2808
+ return [
2809
+ this.renderChipTriggerDefaultContent(),
2810
+ this.renderCaretIcon()
2811
+ ];
2812
+ }
2813
+ // Helper method to render selected option as chip for trigger (automatic approach)
2814
+ renderSelectedOptionAsChip() {
2815
+ if (!this.selectedOption || !this.selectedOptionChipProps)
2816
+ return null;
2817
+ return (h("pds-chip", { sentiment: this.selectedOptionChipProps.sentiment, variant: "dropdown" // Always use dropdown variant for triggers
2818
+ ,
2819
+ size: this.selectedOptionChipProps.large ? 'lg' : undefined, icon: this.selectedOptionChipProps.icon, dot: this.selectedOptionChipProps.dot, class: "pds-combobox__chip-trigger-auto" }, this.getOptionLabel(this.selectedOption)));
2820
+ }
2821
+ // Helper method to render chip trigger layout content
2822
+ renderChipTriggerLayoutContent() {
2823
+ return (h("div", { class: "pds-combobox__chip-trigger-layout-wrapper", innerHTML: this.getModifiedLayoutContentForTrigger() }));
2824
+ }
2825
+ // Helper method to modify layout content for trigger use (ensure dropdown variant)
2826
+ getModifiedLayoutContentForTrigger() {
2827
+ let content = this.selectedLayoutContent;
2828
+ // If the content contains a pds-chip, ensure it has variant="dropdown"
2829
+ if (content.includes('<pds-chip')) {
2830
+ // Use a temporary div to parse and modify the HTML
2831
+ const tempDiv = document.createElement('div');
2832
+ tempDiv.innerHTML = content;
2833
+ const chipElement = tempDiv.querySelector('pds-chip');
2834
+ if (chipElement) {
2835
+ chipElement.setAttribute('variant', 'dropdown');
2836
+ content = tempDiv.innerHTML;
2837
+ }
2838
+ }
2839
+ return content;
2840
+ }
2841
+ // Helper method to render chip trigger default content
2842
+ renderChipTriggerDefaultContent() {
2843
+ return (h("span", { class: "pds-combobox__chip-trigger-label" }, this.selectedChipIcon && h("pds-icon", { icon: this.selectedChipIcon, class: "pds-combobox__chip-trigger-icon" }), this.selectedLabel || this.placeholder));
2844
+ }
2845
+ // Helper method to render option as chip (new automatic approach)
2846
+ renderOptionChip(option) {
2847
+ const chipProps = this.getOptionChipProps(option);
2848
+ return (h("pds-chip", { sentiment: chipProps.sentiment, variant: "text" // Dropdown options use text variant, not dropdown
2849
+ ,
2850
+ size: chipProps.large ? 'lg' : undefined, icon: chipProps.icon, dot: chipProps.dot, class: "pds-combobox__option-chip" }, this.getOptionLabel(option)));
2851
+ }
2852
+ // Mirrors pds-multiselect and pds-select: an error message on its own puts the
2853
+ // field in an invalid state, so assistive tech agrees with the visual treatment.
2854
+ isInvalid() {
2855
+ return Boolean(this.invalid) || Boolean(this.errorMessage);
2856
+ }
2857
+ renderMessages() {
2858
+ const hasErrorMessage = Boolean(this.errorMessage);
2859
+ const showHelperMessage = Boolean(this.helperMessage) && !hasErrorMessage;
2860
+ return [
2861
+ showHelperMessage && (h("p", { class: "pds-combobox__helper", id: messageId(this.componentId, 'helper') }, this.helperMessage)),
2862
+ hasErrorMessage && (h("p", { class: "pds-combobox__error", id: messageId(this.componentId, 'error'), "aria-live": "assertive" }, h("pds-icon", { icon: "danger", size: "small", "aria-hidden": "true" }), this.errorMessage)),
2863
+ ];
2864
+ }
2865
+ render() {
2866
+ const triggerClass = [
2867
+ 'pds-combobox__button-trigger',
2868
+ `pds-combobox__button-trigger--${this.triggerVariant}`,
2869
+ this.triggerShape === 'input' && 'pds-combobox__button-trigger--input-shape',
2870
+ ]
2871
+ .filter(Boolean)
2872
+ .join(' ');
2873
+ return (h(Host, { key: 'a39df3c86a29028344943bd3a2828d5e99106d77', "aria-disabled": this.disabled ? 'true' : null }, h("div", { key: '32cdb8ce31f9d7c9eac8f995cd233fe6f4d9dfc3', class: "pds-combobox", tabIndex: -1, onFocusout: this.onComboboxFocusOut, part: "combobox" }, this.label && !this.hideLabel && (h("label", { key: '64ed7fe37082e2f895daae0090ae3dfac472e3c3', htmlFor: this.componentId, class: "pds-combobox__label" }, this.label)), this.trigger === 'input' ? (h("div", { class: "pds-combobox__input-wrapper", style: { width: this.triggerWidth } }, h("input", { ref: el => {
2874
+ this.inputEl = el;
2875
+ this.triggerEl = el;
2876
+ }, class: {
2877
+ 'pds-combobox__input': true,
2878
+ 'pds-combobox__input--invalid': this.isInvalid(),
2879
+ }, type: "text", role: "combobox", "aria-autocomplete": "list", "aria-controls": this.listboxId, "aria-describedby": assignDescription(this.componentId, this.isInvalid(), this.helperMessage, this.errorMessage), "aria-invalid": this.isInvalid() ? 'true' : undefined, "aria-activedescendant": this.isOpen && this.highlightedIndex >= 0 ? this.optionDomId(this.highlightedIndex) : undefined, "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" }), h("pds-icon", { icon: "enlarge", "aria-hidden": "true", class: "pds-combobox__input-icon" }))) : this.trigger === 'chip' ? (h("div", { class: this.getChipTriggerClass(), style: { width: this.triggerWidth }, role: "combobox", "aria-haspopup": "listbox", "aria-controls": this.listboxId, "aria-describedby": assignDescription(this.componentId, this.isInvalid(), this.helperMessage, this.errorMessage), "aria-invalid": this.isInvalid() ? 'true' : undefined, "aria-activedescendant": this.isOpen && this.highlightedIndex >= 0 ? this.optionDomId(this.highlightedIndex) : undefined, "aria-expanded": this.isOpen ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', "aria-label": this.hideLabel ? this.label : undefined, 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())) : (h("div", { class: triggerClass, style: { width: this.triggerWidth }, role: "combobox", "aria-haspopup": "listbox", "aria-controls": this.listboxId, "aria-describedby": assignDescription(this.componentId, this.isInvalid(), this.helperMessage, this.errorMessage), "aria-invalid": this.isInvalid() ? 'true' : undefined, "aria-activedescendant": this.isOpen && this.highlightedIndex >= 0 ? this.optionDomId(this.highlightedIndex) : undefined, "aria-expanded": this.isOpen ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', "aria-label": this.hideLabel ? this.label : undefined, 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(), h("div", { key: '48041c41a39987f2f4093bd048d6c495ea69514b', style: { display: 'none' } }, h("slot", { key: '5f4d95fefbd3dbdb33ecb25af593c9429df0e10b', onSlotchange: () => this.updateOptions() })), this.renderDropdown())));
2880
+ }
2881
+ static get formAssociated() { return true; }
2882
+ get el() { return getElement(this); }
2883
+ static get watchers() { return {
2884
+ "isOpen": [{
2885
+ "isOpenChanged": 0
2886
+ }],
2887
+ "debounce": [{
2888
+ "setupDebounce": 0
2889
+ }],
2890
+ "options": [{
2891
+ "optionsChanged": 0
2892
+ }],
2893
+ "value": [{
2894
+ "handleValueChange": 0
2895
+ }],
2896
+ "selectedOption": [{
2897
+ "handleSelectedOptionChange": 0
2898
+ }]
2899
+ }; }
2900
+ };
2901
+ PdsCombobox.style = pdsComboboxCss();
2902
+
2903
+ export { PdsCombobox as pds_combobox };