@pine-ds/core 3.14.0 → 3.14.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (462) hide show
  1. package/components/floating-ui.dom.js +161 -40
  2. package/components/floating-ui.dom.js.map +1 -1
  3. package/components/index.d.ts +2 -0
  4. package/components/index.js +1 -0
  5. package/components/index.js.map +1 -1
  6. package/components/index2.js +1 -1
  7. package/components/index2.js.map +1 -1
  8. package/components/pds-combobox.js +65 -25
  9. package/components/pds-combobox.js.map +1 -1
  10. package/components/pds-dropdown-menu-item.js +1 -1
  11. package/components/pds-dropdown-menu-item.js.map +1 -1
  12. package/components/pds-dropdown-menu.js +3 -2
  13. package/components/pds-dropdown-menu.js.map +1 -1
  14. package/components/pds-filter.js +1 -1
  15. package/components/pds-filter.js.map +1 -1
  16. package/components/pds-multiselect.d.ts +11 -0
  17. package/components/pds-multiselect.js +666 -0
  18. package/components/pds-multiselect.js.map +1 -0
  19. package/components/pds-popover.js +1 -1
  20. package/components/pds-progress.js +1 -1
  21. package/components/pds-property.js +1 -1
  22. package/components/pds-radio-group.js +3 -3
  23. package/components/pds-radio.js +3 -3
  24. package/components/pds-row.js +1 -1
  25. package/components/pds-select.js +1 -1
  26. package/components/pds-sortable-item.js +1 -1
  27. package/components/pds-sortable.js +1 -1
  28. package/components/pds-switch.js +3 -3
  29. package/components/pds-tab.js +4 -4
  30. package/components/pds-tab.js.map +1 -1
  31. package/components/pds-table-body.js +1 -1
  32. package/components/pds-table-cell2.js +2 -2
  33. package/components/pds-table-head-cell2.js +35 -6
  34. package/components/pds-table-head-cell2.js.map +1 -1
  35. package/components/pds-table-head.js +1 -1
  36. package/components/pds-table-row.js +1 -1
  37. package/components/pds-tabpanel.js +1 -1
  38. package/components/pds-tabs.js +1 -1
  39. package/components/pds-text2.js +1 -1
  40. package/components/pds-textarea.js +4 -4
  41. package/components/pds-toast.js +3 -3
  42. package/components/pds-tooltip.js +2 -2
  43. package/dist/cjs/{floating-ui.dom-DTAy35nv.js → floating-ui.dom-Ca6tS7ef.js} +163 -41
  44. package/dist/cjs/floating-ui.dom-Ca6tS7ef.js.map +1 -0
  45. package/dist/cjs/{index-CMeuo765.js → index-BA--jsiy.js} +3 -3
  46. package/dist/cjs/index-BA--jsiy.js.map +1 -0
  47. package/dist/cjs/loader.cjs.js +1 -1
  48. package/dist/cjs/pds-accordion.cjs.entry.js +1 -1
  49. package/dist/cjs/pds-avatar.cjs.entry.js +1 -1
  50. package/dist/cjs/pds-button.cjs.entry.js +1 -1
  51. package/dist/cjs/pds-checkbox.cjs.entry.js +1 -1
  52. package/dist/cjs/pds-chip.cjs.entry.js +1 -1
  53. package/dist/cjs/pds-combobox.cjs.entry.js +66 -26
  54. package/dist/cjs/pds-combobox.entry.cjs.js.map +1 -1
  55. package/dist/cjs/pds-copytext.cjs.entry.js +1 -1
  56. package/dist/cjs/pds-dropdown-menu-item.cjs.entry.js +1 -1
  57. package/dist/cjs/pds-dropdown-menu-item.entry.cjs.js.map +1 -1
  58. package/dist/cjs/pds-dropdown-menu.cjs.entry.js +4 -3
  59. package/dist/cjs/pds-dropdown-menu.entry.cjs.js.map +1 -1
  60. package/dist/cjs/pds-filter.cjs.entry.js +2 -2
  61. package/dist/cjs/pds-filter.entry.cjs.js.map +1 -1
  62. package/dist/cjs/pds-input.cjs.entry.js +1 -1
  63. package/dist/cjs/pds-link.cjs.entry.js +1 -1
  64. package/dist/cjs/pds-multiselect.cjs.entry.js +592 -0
  65. package/dist/cjs/pds-multiselect.entry.cjs.js.map +1 -0
  66. package/dist/cjs/pds-popover.cjs.entry.js +1 -1
  67. package/dist/cjs/pds-progress.cjs.entry.js +1 -1
  68. package/dist/cjs/pds-property.cjs.entry.js +1 -1
  69. package/dist/cjs/pds-radio-group.cjs.entry.js +4 -4
  70. package/dist/cjs/pds-radio.cjs.entry.js +4 -4
  71. package/dist/cjs/pds-row.cjs.entry.js +1 -1
  72. package/dist/cjs/pds-select.cjs.entry.js +2 -2
  73. package/dist/cjs/pds-sortable-item.cjs.entry.js +2 -2
  74. package/dist/cjs/pds-sortable.cjs.entry.js +1 -1
  75. package/dist/cjs/pds-switch.cjs.entry.js +4 -4
  76. package/dist/cjs/pds-tab.cjs.entry.js +4 -4
  77. package/dist/cjs/pds-tab.entry.cjs.js.map +1 -1
  78. package/dist/cjs/pds-table-body.cjs.entry.js +1 -1
  79. package/dist/cjs/pds-table-cell.cjs.entry.js +2 -2
  80. package/dist/cjs/pds-table-head-cell.cjs.entry.js +33 -6
  81. package/dist/cjs/pds-table-head-cell.entry.cjs.js.map +1 -1
  82. package/dist/cjs/pds-table-head.cjs.entry.js +1 -1
  83. package/dist/cjs/pds-table-row.cjs.entry.js +1 -1
  84. package/dist/cjs/pds-tabpanel.cjs.entry.js +1 -1
  85. package/dist/cjs/pds-tabs.cjs.entry.js +1 -1
  86. package/dist/cjs/pds-text.cjs.entry.js +1 -1
  87. package/dist/cjs/pds-textarea.cjs.entry.js +5 -5
  88. package/dist/cjs/pds-toast.cjs.entry.js +3 -3
  89. package/dist/cjs/pds-tooltip.cjs.entry.js +3 -3
  90. package/dist/cjs/pine-core.cjs.js +1 -1
  91. package/dist/collection/collection-manifest.json +1 -0
  92. package/dist/collection/components/pds-box/pds-box.css +0 -191
  93. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.css +3 -1
  94. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu.css +1 -1
  95. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu.js +2 -1
  96. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu.js.map +1 -1
  97. package/dist/collection/components/pds-filters/pds-filter/pds-filter.css +6 -2
  98. package/dist/collection/components/pds-multiselect/multiselect-interface.js +2 -0
  99. package/dist/collection/components/pds-multiselect/multiselect-interface.js.map +1 -0
  100. package/dist/collection/components/pds-multiselect/pds-multiselect.css +232 -0
  101. package/dist/collection/components/pds-multiselect/pds-multiselect.js +1152 -0
  102. package/dist/collection/components/pds-multiselect/pds-multiselect.js.map +1 -0
  103. package/dist/collection/components/pds-multiselect/stories/pds-multiselect.stories.js +371 -0
  104. package/dist/collection/components/pds-popover/pds-popover.js +1 -1
  105. package/dist/collection/components/pds-progress/pds-progress.js +1 -1
  106. package/dist/collection/components/pds-property/pds-property.js +1 -1
  107. package/dist/collection/components/pds-radio/pds-radio.js +3 -3
  108. package/dist/collection/components/pds-radio-group/pds-radio-group.js +3 -3
  109. package/dist/collection/components/pds-row/pds-row.js +1 -1
  110. package/dist/collection/components/pds-select/pds-select.js +1 -1
  111. package/dist/collection/components/pds-sortable/pds-sortable-item/pds-sortable-item.js +1 -1
  112. package/dist/collection/components/pds-sortable/pds-sortable.js +1 -1
  113. package/dist/collection/components/pds-switch/pds-switch.js +3 -3
  114. package/dist/collection/components/pds-table/pds-table-body/pds-table-body.js +1 -1
  115. package/dist/collection/components/pds-table/pds-table-cell/pds-table-cell.js +2 -2
  116. package/dist/collection/components/pds-table/pds-table-head/pds-table-head.js +1 -1
  117. package/dist/collection/components/pds-table/pds-table-head-cell/pds-table-head-cell.js +51 -6
  118. package/dist/collection/components/pds-table/pds-table-head-cell/pds-table-head-cell.js.map +1 -1
  119. package/dist/collection/components/pds-table/pds-table-row/pds-table-row.js +1 -1
  120. package/dist/collection/components/pds-table/stories/pds-table.stories.js +32 -4
  121. package/dist/collection/components/pds-tabs/pds-tab/pds-tab.css +6 -2
  122. package/dist/collection/components/pds-tabs/pds-tab/pds-tab.js +3 -3
  123. package/dist/collection/components/pds-tabs/pds-tabpanel/pds-tabpanel.js +1 -1
  124. package/dist/collection/components/pds-tabs/pds-tabs.js +1 -1
  125. package/dist/collection/components/pds-text/pds-text.js +1 -1
  126. package/dist/collection/components/pds-textarea/pds-textarea.js +4 -4
  127. package/dist/collection/components/pds-toast/pds-toast.js +3 -3
  128. package/dist/collection/components/pds-tooltip/pds-tooltip.js +2 -2
  129. package/dist/docs.json +960 -174
  130. package/dist/esm/{floating-ui.dom-DbQzNDdQ.js → floating-ui.dom-BO6p966C.js} +163 -42
  131. package/dist/esm/floating-ui.dom-BO6p966C.js.map +1 -0
  132. package/dist/esm/{index-xbb79yLt.js → index-DY8eSueV.js} +3 -3
  133. package/dist/esm/index-DY8eSueV.js.map +1 -0
  134. package/dist/esm/loader.js +1 -1
  135. package/dist/esm/pds-accordion.entry.js +1 -1
  136. package/dist/esm/pds-avatar.entry.js +1 -1
  137. package/dist/esm/pds-button.entry.js +1 -1
  138. package/dist/esm/pds-checkbox.entry.js +1 -1
  139. package/dist/esm/pds-chip.entry.js +1 -1
  140. package/dist/esm/pds-combobox.entry.js +66 -26
  141. package/dist/esm/pds-combobox.entry.js.map +1 -1
  142. package/dist/esm/pds-copytext.entry.js +1 -1
  143. package/dist/esm/pds-dropdown-menu-item.entry.js +1 -1
  144. package/dist/esm/pds-dropdown-menu-item.entry.js.map +1 -1
  145. package/dist/esm/pds-dropdown-menu.entry.js +4 -3
  146. package/dist/esm/pds-dropdown-menu.entry.js.map +1 -1
  147. package/dist/esm/pds-filter.entry.js +2 -2
  148. package/dist/esm/pds-filter.entry.js.map +1 -1
  149. package/dist/esm/pds-input.entry.js +1 -1
  150. package/dist/esm/pds-link.entry.js +1 -1
  151. package/dist/esm/pds-multiselect.entry.js +590 -0
  152. package/dist/esm/pds-multiselect.entry.js.map +1 -0
  153. package/dist/esm/pds-popover.entry.js +1 -1
  154. package/dist/esm/pds-progress.entry.js +1 -1
  155. package/dist/esm/pds-property.entry.js +1 -1
  156. package/dist/esm/pds-radio-group.entry.js +4 -4
  157. package/dist/esm/pds-radio.entry.js +4 -4
  158. package/dist/esm/pds-row.entry.js +1 -1
  159. package/dist/esm/pds-select.entry.js +2 -2
  160. package/dist/esm/pds-sortable-item.entry.js +2 -2
  161. package/dist/esm/pds-sortable.entry.js +1 -1
  162. package/dist/esm/pds-switch.entry.js +4 -4
  163. package/dist/esm/pds-tab.entry.js +4 -4
  164. package/dist/esm/pds-tab.entry.js.map +1 -1
  165. package/dist/esm/pds-table-body.entry.js +1 -1
  166. package/dist/esm/pds-table-cell.entry.js +2 -2
  167. package/dist/esm/pds-table-head-cell.entry.js +33 -6
  168. package/dist/esm/pds-table-head-cell.entry.js.map +1 -1
  169. package/dist/esm/pds-table-head.entry.js +1 -1
  170. package/dist/esm/pds-table-row.entry.js +1 -1
  171. package/dist/esm/pds-tabpanel.entry.js +1 -1
  172. package/dist/esm/pds-tabs.entry.js +1 -1
  173. package/dist/esm/pds-text.entry.js +1 -1
  174. package/dist/esm/pds-textarea.entry.js +5 -5
  175. package/dist/esm/pds-toast.entry.js +3 -3
  176. package/dist/esm/pds-tooltip.entry.js +3 -3
  177. package/dist/esm/pine-core.js +1 -1
  178. package/dist/esm-es5/floating-ui.dom-BO6p966C.js +2 -0
  179. package/dist/esm-es5/floating-ui.dom-BO6p966C.js.map +1 -0
  180. package/dist/esm-es5/{index-xbb79yLt.js → index-DY8eSueV.js} +1 -1
  181. package/dist/esm-es5/index-DY8eSueV.js.map +1 -0
  182. package/dist/esm-es5/loader.js +1 -1
  183. package/dist/esm-es5/pds-accordion.entry.js +1 -1
  184. package/dist/esm-es5/pds-avatar.entry.js +1 -1
  185. package/dist/esm-es5/pds-button.entry.js +1 -1
  186. package/dist/esm-es5/pds-checkbox.entry.js +1 -1
  187. package/dist/esm-es5/pds-chip.entry.js +1 -1
  188. package/dist/esm-es5/pds-combobox.entry.js +2 -2
  189. package/dist/esm-es5/pds-combobox.entry.js.map +1 -1
  190. package/dist/esm-es5/pds-copytext.entry.js +1 -1
  191. package/dist/esm-es5/pds-dropdown-menu-item.entry.js +1 -1
  192. package/dist/esm-es5/pds-dropdown-menu-item.entry.js.map +1 -1
  193. package/dist/esm-es5/pds-dropdown-menu.entry.js +1 -1
  194. package/dist/esm-es5/pds-dropdown-menu.entry.js.map +1 -1
  195. package/dist/esm-es5/pds-filter.entry.js +1 -1
  196. package/dist/esm-es5/pds-filter.entry.js.map +1 -1
  197. package/dist/esm-es5/pds-input.entry.js +1 -1
  198. package/dist/esm-es5/pds-link.entry.js +1 -1
  199. package/dist/esm-es5/pds-multiselect.entry.js +2 -0
  200. package/dist/esm-es5/pds-multiselect.entry.js.map +1 -0
  201. package/dist/esm-es5/pds-popover.entry.js +1 -1
  202. package/dist/esm-es5/pds-progress.entry.js +1 -1
  203. package/dist/esm-es5/pds-property.entry.js +1 -1
  204. package/dist/esm-es5/pds-radio-group.entry.js +1 -1
  205. package/dist/esm-es5/pds-radio.entry.js +1 -1
  206. package/dist/esm-es5/pds-row.entry.js +1 -1
  207. package/dist/esm-es5/pds-select.entry.js +1 -1
  208. package/dist/esm-es5/pds-sortable-item.entry.js +1 -1
  209. package/dist/esm-es5/pds-sortable.entry.js +1 -1
  210. package/dist/esm-es5/pds-switch.entry.js +1 -1
  211. package/dist/esm-es5/pds-tab.entry.js +1 -1
  212. package/dist/esm-es5/pds-tab.entry.js.map +1 -1
  213. package/dist/esm-es5/pds-table-body.entry.js +1 -1
  214. package/dist/esm-es5/pds-table-cell.entry.js +1 -1
  215. package/dist/esm-es5/pds-table-head-cell.entry.js +1 -1
  216. package/dist/esm-es5/pds-table-head-cell.entry.js.map +1 -1
  217. package/dist/esm-es5/pds-table-head.entry.js +1 -1
  218. package/dist/esm-es5/pds-table-row.entry.js +1 -1
  219. package/dist/esm-es5/pds-tabpanel.entry.js +1 -1
  220. package/dist/esm-es5/pds-tabs.entry.js +1 -1
  221. package/dist/esm-es5/pds-text.entry.js +1 -1
  222. package/dist/esm-es5/pds-textarea.entry.js +1 -1
  223. package/dist/esm-es5/pds-toast.entry.js +1 -1
  224. package/dist/esm-es5/pds-tooltip.entry.js +1 -1
  225. package/dist/esm-es5/pine-core.js +1 -1
  226. package/dist/pine-core/p-02f48157.system.entry.js +2 -0
  227. package/dist/pine-core/{p-b30424e3.system.entry.js → p-063afa19.system.entry.js} +2 -2
  228. package/dist/pine-core/p-0sPVsRFU.system.js.map +1 -0
  229. package/dist/pine-core/{p-15202869.entry.js → p-10dbe3e2.entry.js} +2 -2
  230. package/dist/pine-core/{p-5b7ab891.entry.js → p-12360e47.entry.js} +2 -2
  231. package/dist/pine-core/{p-ac14c8e3.system.entry.js → p-137b3289.system.entry.js} +2 -2
  232. package/dist/pine-core/{p-a737df90.entry.js → p-154a32f4.entry.js} +2 -2
  233. package/dist/pine-core/p-1ca116fa.entry.js +3 -0
  234. package/dist/pine-core/p-1ca116fa.entry.js.map +1 -0
  235. package/dist/pine-core/{p-a847fad3.entry.js → p-2537aacb.entry.js} +2 -2
  236. package/dist/pine-core/{p-4d25449c.entry.js → p-2cd0d520.entry.js} +2 -2
  237. package/dist/pine-core/{p-cd335ec2.system.entry.js → p-2fe330d0.system.entry.js} +2 -2
  238. package/dist/pine-core/p-30ea3668.system.entry.js +2 -0
  239. package/dist/pine-core/{p-1daf66d1.entry.js → p-31168da5.entry.js} +2 -2
  240. package/dist/pine-core/{p-732e2564.system.entry.js → p-325b3b0d.system.entry.js} +2 -2
  241. package/dist/pine-core/p-32c13896.system.entry.js +2 -0
  242. package/dist/pine-core/p-32c13896.system.entry.js.map +1 -0
  243. package/dist/pine-core/{p-95f2782c.entry.js → p-3f97a965.entry.js} +2 -2
  244. package/dist/pine-core/{p-ff182316.system.entry.js → p-40988b4d.system.entry.js} +2 -2
  245. package/dist/pine-core/{p-b02936d2.entry.js → p-415ba884.entry.js} +2 -2
  246. package/dist/pine-core/p-475bb340.entry.js +2 -0
  247. package/dist/pine-core/p-475bb340.entry.js.map +1 -0
  248. package/dist/pine-core/{p-CGo2P4Fr.system.js.map → p-4EbKXnVN.system.js.map} +1 -1
  249. package/dist/pine-core/{p-4SEjggIC.system.js.map → p-4alPHnzl.system.js.map} +1 -1
  250. package/dist/pine-core/{p-9bfaed7e.system.entry.js → p-4c23c75b.system.entry.js} +2 -2
  251. package/dist/pine-core/{p-bdf8bff3.system.entry.js → p-4d85945b.system.entry.js} +2 -2
  252. package/dist/pine-core/{p-3f8b0885.system.entry.js → p-4d9eee67.system.entry.js} +2 -2
  253. package/dist/pine-core/{p-4fD2iHS9.system.js.map → p-4f1cRPxE.system.js.map} +1 -1
  254. package/dist/pine-core/{p-e2104c31.entry.js → p-5040a872.entry.js} +2 -2
  255. package/dist/pine-core/p-51114c2b.system.entry.js +2 -0
  256. package/dist/pine-core/p-51114c2b.system.entry.js.map +1 -0
  257. package/dist/pine-core/{p-bbc349b3.system.entry.js → p-5b3ac18e.system.entry.js} +2 -2
  258. package/dist/pine-core/{p-bbc349b3.system.entry.js.map → p-5b3ac18e.system.entry.js.map} +1 -1
  259. package/dist/pine-core/{p-a08b60ae.entry.js → p-5b9110fe.entry.js} +2 -2
  260. package/dist/pine-core/{p-e3d76aa3.system.entry.js → p-5c982339.system.entry.js} +2 -2
  261. package/dist/pine-core/{p-94b1997d.system.entry.js → p-5e92aa34.system.entry.js} +2 -2
  262. package/dist/pine-core/{p-41d89f20.entry.js → p-5f2865df.entry.js} +2 -2
  263. package/dist/pine-core/{p-41d89f20.entry.js.map → p-5f2865df.entry.js.map} +1 -1
  264. package/dist/pine-core/p-6321b70b.entry.js +2 -0
  265. package/dist/pine-core/p-6321b70b.entry.js.map +1 -0
  266. package/dist/pine-core/p-63269b89.entry.js +2 -0
  267. package/dist/pine-core/p-6e862168.system.entry.js +2 -0
  268. package/dist/pine-core/{p-dcc6ad67.system.entry.js.map → p-6e862168.system.entry.js.map} +1 -1
  269. package/dist/pine-core/{p-cf2e1c07.system.entry.js → p-70aa35fc.system.entry.js} +2 -2
  270. package/dist/pine-core/{p-fc0ee6da.entry.js → p-757c7b80.entry.js} +2 -2
  271. package/dist/pine-core/{p-1df25b57.system.entry.js → p-78ee2e08.system.entry.js} +2 -2
  272. package/dist/pine-core/{p-2319298c.system.entry.js → p-7b5c8248.system.entry.js} +2 -2
  273. package/dist/pine-core/{p-dad604e4.system.entry.js → p-84c7f663.system.entry.js} +2 -2
  274. package/dist/pine-core/{p-f9ef2f74.system.entry.js → p-87eb8d4b.system.entry.js} +2 -2
  275. package/dist/pine-core/p-8b201c9a.system.entry.js +2 -0
  276. package/dist/pine-core/p-8b201c9a.system.entry.js.map +1 -0
  277. package/dist/pine-core/p-8eb1c168.entry.js +2 -0
  278. package/dist/pine-core/{p-e5bc22b6.system.entry.js → p-8fdb10c4.system.entry.js} +2 -2
  279. package/dist/pine-core/{p-232e4282.system.entry.js → p-90615423.system.entry.js} +2 -2
  280. package/dist/pine-core/{p-f79f6f08.system.entry.js → p-932283cf.system.entry.js} +2 -2
  281. package/dist/pine-core/{p-0b05708b.entry.js → p-9ada659b.entry.js} +2 -2
  282. package/dist/pine-core/{p-4778ae70.entry.js → p-9bb6cc3d.entry.js} +2 -2
  283. package/dist/pine-core/{p-3f6b9520.entry.js → p-9c928c44.entry.js} +2 -2
  284. package/dist/pine-core/{p-646ac76d.entry.js → p-9e4fc025.entry.js} +2 -2
  285. package/dist/pine-core/{p-e8aad8dc.entry.js → p-9eccf7b9.entry.js} +2 -2
  286. package/dist/pine-core/{p-WhfStK1C.system.js.map → p-B0Otb6kF.system.js.map} +1 -1
  287. package/dist/pine-core/{p-CUmDvil2.system.js.map → p-BA95hFrH.system.js.map} +1 -1
  288. package/dist/pine-core/{p-B4EMeCRH.system.js.map → p-BHjZufAO.system.js.map} +1 -1
  289. package/dist/pine-core/{p-DC2NZwtk.system.js.map → p-BJE1EIse.system.js.map} +1 -1
  290. package/dist/pine-core/{p-IH8oGXiE.system.js.map → p-BJtTt670.system.js.map} +1 -1
  291. package/dist/pine-core/p-BO6p966C.js +2 -0
  292. package/dist/pine-core/p-BO6p966C.js.map +1 -0
  293. package/dist/pine-core/{p-jBhqNO5u.system.js.map → p-BSRmAvMC.system.js.map} +1 -1
  294. package/dist/pine-core/{p-DyrNlfLT.system.js.map → p-BTe59phF.system.js.map} +1 -1
  295. package/dist/pine-core/{p-PMNjgK0C.system.js.map → p-BmKJgY0X.system.js.map} +1 -1
  296. package/dist/pine-core/{p-B0Y1Zs9b.system.js.map → p-Bn36FPag.system.js.map} +1 -1
  297. package/dist/pine-core/p-CBCT89qf.system.js.map +1 -0
  298. package/dist/pine-core/{p-DpeOrUYB.system.js.map → p-CG5jdxoZ.system.js.map} +1 -1
  299. package/dist/pine-core/{p-CKzDRRgx.system.js → p-CP48ADFM.system.js} +1 -1
  300. package/dist/pine-core/p-CP48ADFM.system.js.map +1 -0
  301. package/dist/pine-core/p-CR01VmO6.system.js.map +1 -0
  302. package/dist/pine-core/{p-CAnnMfDw.system.js.map → p-CSLo9qKS.system.js.map} +1 -1
  303. package/dist/pine-core/{p-DmVKABQy.system.js.map → p-CboCokff.system.js.map} +1 -1
  304. package/dist/pine-core/{p-XCTiWii8.system.js.map → p-CfZCQYfD.system.js.map} +1 -1
  305. package/dist/pine-core/{p-r_cS5LMw.system.js.map → p-Civ2VHC7.system.js.map} +1 -1
  306. package/dist/pine-core/{p-ChiYqN-p.system.js.map → p-CmquVvkz.system.js.map} +1 -1
  307. package/dist/pine-core/{p-tHMXRB8d.system.js.map → p-CpyTw2IQ.system.js.map} +1 -1
  308. package/dist/pine-core/{p-Brpt0zl5.system.js.map → p-Ct9csNdF.system.js.map} +1 -1
  309. package/dist/pine-core/{p-B_Co5NfG.system.js.map → p-Cun139qe.system.js.map} +1 -1
  310. package/dist/pine-core/p-D2eS6fhD.system.js +2 -0
  311. package/dist/pine-core/p-D2eS6fhD.system.js.map +1 -0
  312. package/dist/pine-core/{p-CTfQ_9yC.system.js.map → p-DFXWnbHE.system.js.map} +1 -1
  313. package/dist/pine-core/{p-xbb79yLt.js → p-DY8eSueV.js} +1 -1
  314. package/dist/pine-core/p-DY8eSueV.js.map +1 -0
  315. package/dist/pine-core/{p-CXGuX44q.system.js.map → p-DaXZLSA0.system.js.map} +1 -1
  316. package/dist/pine-core/{p-DB45WSlG.system.js.map → p-DwQewDCV.system.js.map} +1 -1
  317. package/dist/pine-core/p-JAVnELnm.system.js +1 -1
  318. package/dist/pine-core/{p-DAvCgWA9.system.js.map → p-Lk6DnEPT.system.js.map} +1 -1
  319. package/dist/pine-core/{p-Bjj4Pcbb.system.js.map → p-YqHO7iPZ.system.js.map} +1 -1
  320. package/dist/pine-core/{p-00568c20.system.entry.js → p-a07b8e45.system.entry.js} +2 -2
  321. package/dist/pine-core/p-a3bCMZF8.system.js.map +1 -0
  322. package/dist/pine-core/{p-c5013d20.entry.js → p-a3cdff85.entry.js} +2 -2
  323. package/dist/pine-core/{p-a4b16b32.system.entry.js → p-a5b24b1d.system.entry.js} +2 -2
  324. package/dist/pine-core/{p-596acf65.entry.js → p-a99e8caf.entry.js} +2 -2
  325. package/dist/pine-core/{p-002fe322.system.entry.js → p-ac240034.system.entry.js} +2 -2
  326. package/dist/pine-core/{p-fe28b975.system.entry.js → p-b9650ed9.system.entry.js} +2 -2
  327. package/dist/pine-core/{p-f8fba315.entry.js → p-bc85016b.entry.js} +2 -2
  328. package/dist/pine-core/{p-61588eac.entry.js → p-bddc9c5a.entry.js} +2 -2
  329. package/dist/pine-core/{p--gPqixhD.system.js.map → p-bs74TBAh.system.js.map} +1 -1
  330. package/dist/pine-core/{p-7de73ac5.entry.js → p-c24d11c7.entry.js} +2 -2
  331. package/dist/pine-core/p-c292e5da.system.entry.js +2 -0
  332. package/dist/pine-core/{p-6bc7d67f.system.entry.js.map → p-c292e5da.system.entry.js.map} +1 -1
  333. package/dist/pine-core/p-c68bceb1.entry.js +2 -0
  334. package/dist/pine-core/{p-478d1107.entry.js.map → p-c68bceb1.entry.js.map} +1 -1
  335. package/dist/pine-core/{p-0ace9c16.entry.js → p-c7c00a27.entry.js} +2 -2
  336. package/dist/pine-core/{p-cb6c279a.system.entry.js → p-cac3128b.system.entry.js} +2 -2
  337. package/dist/pine-core/p-ccab748a.entry.js +2 -0
  338. package/dist/pine-core/p-ccab748a.entry.js.map +1 -0
  339. package/dist/pine-core/{p-098cbcd7.system.entry.js → p-cfb24f97.system.entry.js} +2 -2
  340. package/dist/pine-core/p-d41112ad.entry.js +2 -0
  341. package/dist/pine-core/{p-f82b464c.entry.js.map → p-d41112ad.entry.js.map} +1 -1
  342. package/dist/pine-core/{p-6cba6806.entry.js → p-d6302edd.entry.js} +2 -2
  343. package/dist/pine-core/{p-04294b28.system.entry.js → p-daa36570.system.entry.js} +2 -2
  344. package/dist/pine-core/p-db06ad25.system.entry.js +4 -0
  345. package/dist/pine-core/p-db06ad25.system.entry.js.map +1 -0
  346. package/dist/pine-core/{p-15650db8.entry.js → p-e6dc2297.entry.js} +2 -2
  347. package/dist/pine-core/{p-9f53eb94.system.entry.js → p-e8cf15d7.system.entry.js} +2 -2
  348. package/dist/pine-core/p-eb026745.entry.js +2 -0
  349. package/dist/pine-core/{p-e011d7e5.entry.js → p-fa05ea14.entry.js} +2 -2
  350. package/dist/pine-core/{p-D8Jc24Qq.system.js.map → p-htODgUCV.system.js.map} +1 -1
  351. package/dist/pine-core/{p-DYq1Mef8.system.js.map → p-j0609tLE.system.js.map} +1 -1
  352. package/dist/pine-core/{p-DoP8Sl1O.system.js.map → p-rcUX-rt5.system.js.map} +1 -1
  353. package/dist/pine-core/{p-DSwKfctG.system.js.map → p-uyztncxJ.system.js.map} +1 -1
  354. package/dist/pine-core/pds-combobox.entry.esm.js.map +1 -1
  355. package/dist/pine-core/pds-dropdown-menu-item.entry.esm.js.map +1 -1
  356. package/dist/pine-core/pds-dropdown-menu.entry.esm.js.map +1 -1
  357. package/dist/pine-core/pds-filter.entry.esm.js.map +1 -1
  358. package/dist/pine-core/pds-multiselect.entry.esm.js.map +1 -0
  359. package/dist/pine-core/pds-tab.entry.esm.js.map +1 -1
  360. package/dist/pine-core/pds-table-head-cell.entry.esm.js.map +1 -1
  361. package/dist/pine-core/pine-core.esm.js +1 -1
  362. package/dist/types/components/pds-multiselect/multiselect-interface.d.ts +24 -0
  363. package/dist/types/components/pds-multiselect/pds-multiselect.d.ts +175 -0
  364. package/dist/types/components/pds-table/pds-table-head-cell/pds-table-head-cell.d.ts +10 -0
  365. package/dist/types/components.d.ts +250 -0
  366. package/dist/vscode.html-data.json +156 -0
  367. package/hydrate/index.js +918 -100
  368. package/hydrate/index.mjs +918 -100
  369. package/package.json +5 -5
  370. package/dist/cjs/floating-ui.dom-DTAy35nv.js.map +0 -1
  371. package/dist/cjs/index-CMeuo765.js.map +0 -1
  372. package/dist/esm/floating-ui.dom-DbQzNDdQ.js.map +0 -1
  373. package/dist/esm/index-xbb79yLt.js.map +0 -1
  374. package/dist/esm-es5/floating-ui.dom-DbQzNDdQ.js +0 -2
  375. package/dist/esm-es5/floating-ui.dom-DbQzNDdQ.js.map +0 -1
  376. package/dist/esm-es5/index-xbb79yLt.js.map +0 -1
  377. package/dist/pine-core/p-43990889.entry.js +0 -2
  378. package/dist/pine-core/p-478d1107.entry.js +0 -2
  379. package/dist/pine-core/p-534e44cb.system.entry.js +0 -4
  380. package/dist/pine-core/p-534e44cb.system.entry.js.map +0 -1
  381. package/dist/pine-core/p-54a56826.entry.js +0 -3
  382. package/dist/pine-core/p-54a56826.entry.js.map +0 -1
  383. package/dist/pine-core/p-553e4543.entry.js +0 -2
  384. package/dist/pine-core/p-553e4543.entry.js.map +0 -1
  385. package/dist/pine-core/p-5f6cd30d.system.entry.js +0 -2
  386. package/dist/pine-core/p-5f6cd30d.system.entry.js.map +0 -1
  387. package/dist/pine-core/p-6bc7d67f.system.entry.js +0 -2
  388. package/dist/pine-core/p-9e62c418.system.entry.js +0 -2
  389. package/dist/pine-core/p-9e62c418.system.entry.js.map +0 -1
  390. package/dist/pine-core/p-BOmQOnQe.system.js +0 -2
  391. package/dist/pine-core/p-BOmQOnQe.system.js.map +0 -1
  392. package/dist/pine-core/p-Bnp3zJ0T.system.js.map +0 -1
  393. package/dist/pine-core/p-CKzDRRgx.system.js.map +0 -1
  394. package/dist/pine-core/p-DbQzNDdQ.js +0 -2
  395. package/dist/pine-core/p-DbQzNDdQ.js.map +0 -1
  396. package/dist/pine-core/p-DfCCzxYg.system.js.map +0 -1
  397. package/dist/pine-core/p-X0_TH-op.system.js.map +0 -1
  398. package/dist/pine-core/p-ac2f9463.entry.js +0 -2
  399. package/dist/pine-core/p-ac2f9463.entry.js.map +0 -1
  400. package/dist/pine-core/p-b59a0c6b.system.entry.js +0 -2
  401. package/dist/pine-core/p-d0e336b7.system.entry.js +0 -2
  402. package/dist/pine-core/p-dcc6ad67.system.entry.js +0 -2
  403. package/dist/pine-core/p-e7e25d42.entry.js +0 -2
  404. package/dist/pine-core/p-f82b464c.entry.js +0 -2
  405. package/dist/pine-core/p-f92055f3.entry.js +0 -2
  406. package/dist/pine-core/p-xbb79yLt.js.map +0 -1
  407. /package/dist/pine-core/{p-b59a0c6b.system.entry.js.map → p-02f48157.system.entry.js.map} +0 -0
  408. /package/dist/pine-core/{p-b30424e3.system.entry.js.map → p-063afa19.system.entry.js.map} +0 -0
  409. /package/dist/pine-core/{p-15202869.entry.js.map → p-10dbe3e2.entry.js.map} +0 -0
  410. /package/dist/pine-core/{p-5b7ab891.entry.js.map → p-12360e47.entry.js.map} +0 -0
  411. /package/dist/pine-core/{p-ac14c8e3.system.entry.js.map → p-137b3289.system.entry.js.map} +0 -0
  412. /package/dist/pine-core/{p-a737df90.entry.js.map → p-154a32f4.entry.js.map} +0 -0
  413. /package/dist/pine-core/{p-a847fad3.entry.js.map → p-2537aacb.entry.js.map} +0 -0
  414. /package/dist/pine-core/{p-4d25449c.entry.js.map → p-2cd0d520.entry.js.map} +0 -0
  415. /package/dist/pine-core/{p-cd335ec2.system.entry.js.map → p-2fe330d0.system.entry.js.map} +0 -0
  416. /package/dist/pine-core/{p-d0e336b7.system.entry.js.map → p-30ea3668.system.entry.js.map} +0 -0
  417. /package/dist/pine-core/{p-1daf66d1.entry.js.map → p-31168da5.entry.js.map} +0 -0
  418. /package/dist/pine-core/{p-732e2564.system.entry.js.map → p-325b3b0d.system.entry.js.map} +0 -0
  419. /package/dist/pine-core/{p-95f2782c.entry.js.map → p-3f97a965.entry.js.map} +0 -0
  420. /package/dist/pine-core/{p-ff182316.system.entry.js.map → p-40988b4d.system.entry.js.map} +0 -0
  421. /package/dist/pine-core/{p-b02936d2.entry.js.map → p-415ba884.entry.js.map} +0 -0
  422. /package/dist/pine-core/{p-9bfaed7e.system.entry.js.map → p-4c23c75b.system.entry.js.map} +0 -0
  423. /package/dist/pine-core/{p-bdf8bff3.system.entry.js.map → p-4d85945b.system.entry.js.map} +0 -0
  424. /package/dist/pine-core/{p-3f8b0885.system.entry.js.map → p-4d9eee67.system.entry.js.map} +0 -0
  425. /package/dist/pine-core/{p-e2104c31.entry.js.map → p-5040a872.entry.js.map} +0 -0
  426. /package/dist/pine-core/{p-a08b60ae.entry.js.map → p-5b9110fe.entry.js.map} +0 -0
  427. /package/dist/pine-core/{p-e3d76aa3.system.entry.js.map → p-5c982339.system.entry.js.map} +0 -0
  428. /package/dist/pine-core/{p-94b1997d.system.entry.js.map → p-5e92aa34.system.entry.js.map} +0 -0
  429. /package/dist/pine-core/{p-43990889.entry.js.map → p-63269b89.entry.js.map} +0 -0
  430. /package/dist/pine-core/{p-cf2e1c07.system.entry.js.map → p-70aa35fc.system.entry.js.map} +0 -0
  431. /package/dist/pine-core/{p-fc0ee6da.entry.js.map → p-757c7b80.entry.js.map} +0 -0
  432. /package/dist/pine-core/{p-1df25b57.system.entry.js.map → p-78ee2e08.system.entry.js.map} +0 -0
  433. /package/dist/pine-core/{p-2319298c.system.entry.js.map → p-7b5c8248.system.entry.js.map} +0 -0
  434. /package/dist/pine-core/{p-dad604e4.system.entry.js.map → p-84c7f663.system.entry.js.map} +0 -0
  435. /package/dist/pine-core/{p-f9ef2f74.system.entry.js.map → p-87eb8d4b.system.entry.js.map} +0 -0
  436. /package/dist/pine-core/{p-e7e25d42.entry.js.map → p-8eb1c168.entry.js.map} +0 -0
  437. /package/dist/pine-core/{p-e5bc22b6.system.entry.js.map → p-8fdb10c4.system.entry.js.map} +0 -0
  438. /package/dist/pine-core/{p-232e4282.system.entry.js.map → p-90615423.system.entry.js.map} +0 -0
  439. /package/dist/pine-core/{p-f79f6f08.system.entry.js.map → p-932283cf.system.entry.js.map} +0 -0
  440. /package/dist/pine-core/{p-0b05708b.entry.js.map → p-9ada659b.entry.js.map} +0 -0
  441. /package/dist/pine-core/{p-4778ae70.entry.js.map → p-9bb6cc3d.entry.js.map} +0 -0
  442. /package/dist/pine-core/{p-3f6b9520.entry.js.map → p-9c928c44.entry.js.map} +0 -0
  443. /package/dist/pine-core/{p-646ac76d.entry.js.map → p-9e4fc025.entry.js.map} +0 -0
  444. /package/dist/pine-core/{p-e8aad8dc.entry.js.map → p-9eccf7b9.entry.js.map} +0 -0
  445. /package/dist/pine-core/{p-00568c20.system.entry.js.map → p-a07b8e45.system.entry.js.map} +0 -0
  446. /package/dist/pine-core/{p-c5013d20.entry.js.map → p-a3cdff85.entry.js.map} +0 -0
  447. /package/dist/pine-core/{p-a4b16b32.system.entry.js.map → p-a5b24b1d.system.entry.js.map} +0 -0
  448. /package/dist/pine-core/{p-596acf65.entry.js.map → p-a99e8caf.entry.js.map} +0 -0
  449. /package/dist/pine-core/{p-002fe322.system.entry.js.map → p-ac240034.system.entry.js.map} +0 -0
  450. /package/dist/pine-core/{p-fe28b975.system.entry.js.map → p-b9650ed9.system.entry.js.map} +0 -0
  451. /package/dist/pine-core/{p-f8fba315.entry.js.map → p-bc85016b.entry.js.map} +0 -0
  452. /package/dist/pine-core/{p-61588eac.entry.js.map → p-bddc9c5a.entry.js.map} +0 -0
  453. /package/dist/pine-core/{p-7de73ac5.entry.js.map → p-c24d11c7.entry.js.map} +0 -0
  454. /package/dist/pine-core/{p-0ace9c16.entry.js.map → p-c7c00a27.entry.js.map} +0 -0
  455. /package/dist/pine-core/{p-cb6c279a.system.entry.js.map → p-cac3128b.system.entry.js.map} +0 -0
  456. /package/dist/pine-core/{p-098cbcd7.system.entry.js.map → p-cfb24f97.system.entry.js.map} +0 -0
  457. /package/dist/pine-core/{p-6cba6806.entry.js.map → p-d6302edd.entry.js.map} +0 -0
  458. /package/dist/pine-core/{p-04294b28.system.entry.js.map → p-daa36570.system.entry.js.map} +0 -0
  459. /package/dist/pine-core/{p-15650db8.entry.js.map → p-e6dc2297.entry.js.map} +0 -0
  460. /package/dist/pine-core/{p-9f53eb94.system.entry.js.map → p-e8cf15d7.system.entry.js.map} +0 -0
  461. /package/dist/pine-core/{p-f92055f3.entry.js.map → p-eb026745.entry.js.map} +0 -0
  462. /package/dist/pine-core/{p-e011d7e5.entry.js.map → p-fa05ea14.entry.js.map} +0 -0
@@ -0,0 +1,666 @@
1
+ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
+ import { a as autoUpdate, c as computePosition, o as offset, f as flip, s as shift, b as size } from './floating-ui.dom.js';
3
+ import { d as debounceEvent } from './utils.js';
4
+ import { a as assignDescription, m as messageId } from './form.js';
5
+ import { g as enlarge, h as danger } from './index2.js';
6
+ import { d as defineCustomElement$4 } from './pds-checkbox2.js';
7
+ import { d as defineCustomElement$3 } from './pds-icon2.js';
8
+ import { d as defineCustomElement$2 } from './pds-loader2.js';
9
+
10
+ const pdsMultiselectCss = ":host{display:block}:host([aria-disabled=true]) .pds-multiselect__trigger{background:var(--pine-color-background-container-disabled);border-color:var(--pine-color-border-disabled);color:var(--pine-color-text-disabled);cursor:not-allowed}:host([aria-disabled=true]) .pds-multiselect__icon{color:var(--pine-color-text-disabled)}.pds-multiselect{position:relative}.pds-multiselect__label{color:var(--pine-color-text-label);display:block;font:var(--pine-typography-body-medium);letter-spacing:var(--pine-letter-spacing);-webkit-margin-after:var(--pine-dimension-2xs);margin-block-end:var(--pine-dimension-2xs)}.pds-multiselect__wrapper{position:relative}.pds-multiselect__trigger{-ms-flex-align:center;align-items:center;background:var(--pine-color-background-container);border:var(--pine-border);border-radius:var(--pine-dimension-125);cursor:pointer;display:-ms-flexbox;display:flex;font:var(--pine-typography-body);gap:var(--pine-dimension-xs);-ms-flex-pack:justify;justify-content:space-between;letter-spacing:var(--pine-letter-spacing);min-height:var(--pine-dimension-550);padding:var(--pine-dimension-xs) var(--pine-dimension-sm);position:relative;text-align:start;-webkit-transition:border-color 0.2s ease, -webkit-box-shadow 0.2s ease;transition:border-color 0.2s ease, -webkit-box-shadow 0.2s ease;transition:border-color 0.2s ease, box-shadow 0.2s ease;transition:border-color 0.2s ease, box-shadow 0.2s ease, -webkit-box-shadow 0.2s ease;width:100%}.pds-multiselect__trigger:hover:not(.pds-multiselect__trigger--disabled){border-color:var(--pine-color-border-hover)}.pds-multiselect__trigger:focus:not(.pds-multiselect__trigger--disabled){border-color:var(--pine-color-border-active);outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-multiselect__trigger.pds-multiselect__trigger--open{border-color:var(--pine-color-border-active)}.pds-multiselect__trigger.pds-multiselect__trigger--invalid{background-color:var(--pine-color-red-050);border-color:var(--pine-color-border-danger)}.pds-multiselect__trigger.pds-multiselect__trigger--invalid:focus{outline-color:var(--pine-color-focus-ring-danger)}.pds-multiselect__trigger.pds-multiselect__trigger--disabled{background:var(--pine-color-background-container-disabled);border-color:var(--pine-color-border-disabled);color:var(--pine-color-text-disabled);cursor:not-allowed}.pds-multiselect__trigger-text{color:var(--pine-color-text-strong);-ms-flex:1;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pds-multiselect__trigger-text.pds-multiselect__trigger-text--placeholder{color:var(--pine-color-text-placeholder)}.pds-multiselect__trigger--disabled .pds-multiselect__trigger-text{color:var(--pine-color-text-disabled)}.pds-multiselect__icon{color:var(--pine-color-icon);-ms-flex-negative:var(--pine-dimension-none);flex-shrink:var(--pine-dimension-none)}.pds-multiselect__panel{background:var(--pine-color-background-container);border-radius:var(--pine-dimension-125);-webkit-box-shadow:var(--pine-box-shadow);box-shadow:var(--pine-box-shadow);-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:absolute;z-index:var(--pine-z-index-raised)}.pds-multiselect__search{-ms-flex-align:center;align-items:center;-webkit-border-after:var(--pine-border);border-block-end:var(--pine-border);border-block-end-color:var(--pine-color-border-subtle);display:-ms-flexbox;display:flex;gap:var(--pine-dimension-xs);padding:var(--pine-dimension-xs) var(--pine-dimension-sm)}.pds-multiselect__search pds-icon{color:var(--pine-color-text-muted);-ms-flex-negative:var(--pine-dimension-none);flex-shrink:var(--pine-dimension-none)}.pds-multiselect__search-input{background:transparent;border:var(--pine-dimension-none);color:var(--pine-color-text-strong);-ms-flex:1;flex:1;font:var(--pine-typography-body);letter-spacing:var(--pine-letter-spacing);min-width:var(--pine-dimension-none);outline:none}.pds-multiselect__search-input::-webkit-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-multiselect__search-input::-moz-placeholder{color:var(--pine-color-text-placeholder)}.pds-multiselect__search-input:-ms-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-multiselect__search-input::-ms-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-multiselect__search-input::placeholder{color:var(--pine-color-text-placeholder)}.pds-multiselect__selected-section{-webkit-border-after:var(--pine-border);border-block-end:var(--pine-border);border-block-end-color:var(--pine-color-border-subtle);padding:var(--pine-dimension-xs)}.pds-multiselect__selected-list{list-style:none;margin:var(--pine-dimension-none);padding:var(--pine-dimension-none)}.pds-multiselect__selected-item{color:var(--pine-color-text-strong);font:var(--pine-typography-body);letter-spacing:var(--pine-letter-spacing);overflow:hidden;padding:var(--pine-dimension-2xs) var(--pine-dimension-xs);text-overflow:ellipsis;white-space:nowrap}.pds-multiselect__listbox{background:transparent;border:var(--pine-dimension-none);-webkit-box-sizing:border-box;box-sizing:border-box;list-style:none;margin:var(--pine-dimension-none);overflow-y:auto;padding:var(--pine-dimension-xs)}.pds-multiselect__option{-ms-flex-align:center;align-items:center;background:transparent;border-radius:var(--pine-dimension-xs);cursor:pointer;display:-ms-flexbox;display:flex;padding:var(--pine-dimension-2xs) var(--pine-dimension-xs);-webkit-transition:background 0.15s;transition:background 0.15s}.pds-multiselect__option pds-checkbox{pointer-events:none;width:100%}.pds-multiselect__option:hover,.pds-multiselect__option.pds-multiselect__option--highlighted{background:var(--pine-color-background-muted)}.pds-multiselect__option:focus-visible{outline:var(--pine-dimension-none)}.pds-multiselect__empty,.pds-multiselect__loading{-ms-flex-align:center;align-items:center;color:var(--pine-color-text-muted);display:-ms-flexbox;display:flex;font:var(--pine-typography-body);-ms-flex-pack:center;justify-content:center;padding:var(--pine-dimension-sm)}.pds-multiselect__load-more{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;padding:var(--pine-dimension-xs)}.pds-multiselect__helper{color:var(--pine-color-text-message);font:var(--pine-typography-body-sm);-webkit-margin-before:var(--pine-dimension-2xs);margin-block-start:var(--pine-dimension-2xs);-webkit-margin-start:var(--pine-dimension-none);margin-inline-start:var(--pine-dimension-none)}.pds-multiselect__error{-ms-flex-align:start;align-items:flex-start;color:var(--pine-color-text-message-danger);display:-ms-flexbox;display:flex;font:var(--pine-typography-body-sm);gap:var(--pine-dimension-2xs);-webkit-margin-before:var(--pine-dimension-2xs);margin-block-start:var(--pine-dimension-2xs);-webkit-margin-start:var(--pine-dimension-none);margin-inline-start:var(--pine-dimension-none)}.pds-multiselect__error pds-icon{-ms-flex-negative:var(--pine-dimension-none);flex-shrink:var(--pine-dimension-none);-webkit-margin-before:var(--pine-dimension-025);margin-block-start:var(--pine-dimension-025)}.visually-hidden{border:var(--pine-dimension-none);clip:rect(0 0 0 0);-webkit-clip-path:polygon(0 0, 0 0, 0 0);clip-path:polygon(0 0, 0 0, 0 0);height:1px;margin:-1px;overflow:hidden;padding:var(--pine-dimension-none);position:absolute;white-space:nowrap;width:1px}";
11
+
12
+ const PdsMultiselect$1 = /*@__PURE__*/ proxyCustomElement(class PdsMultiselect extends HTMLElement {
13
+ constructor(registerHost) {
14
+ super();
15
+ if (registerHost !== false) {
16
+ this.__registerHost();
17
+ }
18
+ this.__attachShadow();
19
+ this.pdsMultiselectChange = createEvent(this, "pdsMultiselectChange", 7);
20
+ this.pdsMultiselectSearch = createEvent(this, "pdsMultiselectSearch", 7);
21
+ this.pdsMultiselectLoadOptions = createEvent(this, "pdsMultiselectLoadOptions", 7);
22
+ /**
23
+ * Placeholder text for the input field.
24
+ */
25
+ this.placeholder = 'Select...';
26
+ /**
27
+ * Array of selected option values.
28
+ */
29
+ this.value = [];
30
+ /**
31
+ * Determines whether or not the multiselect is disabled.
32
+ */
33
+ this.disabled = false;
34
+ /**
35
+ * HTTP method for async requests.
36
+ */
37
+ this.asyncMethod = 'GET';
38
+ /**
39
+ * Debounce delay in milliseconds for search/fetch.
40
+ */
41
+ this.debounce = 300;
42
+ /**
43
+ * Maximum height of the dropdown before scrolling.
44
+ */
45
+ this.maxHeight = '300px';
46
+ /**
47
+ * Width of the trigger button (and reference for dropdown positioning).
48
+ */
49
+ this.triggerWidth = '100%';
50
+ /**
51
+ * Minimum width of the dropdown panel.
52
+ */
53
+ this.minWidth = '250px';
54
+ /**
55
+ * Visually hides the label but keeps it accessible.
56
+ */
57
+ this.hideLabel = false;
58
+ /**
59
+ * If true, the multiselect is required.
60
+ */
61
+ this.required = false;
62
+ /**
63
+ * Whether the component is currently loading async options.
64
+ */
65
+ this.loading = false;
66
+ // Internal state
67
+ this.isOpen = false;
68
+ this.searchQuery = '';
69
+ this.highlightedIndex = -1;
70
+ this.internalOptions = [];
71
+ this.selectedItems = [];
72
+ this.currentPage = 1;
73
+ this.hasMore = false;
74
+ // Flag to prevent focusout from closing during open transition
75
+ this.isOpening = false;
76
+ this.handleTriggerClick = () => {
77
+ if (this.disabled)
78
+ return;
79
+ if (this.isOpen) {
80
+ this.closeDropdown();
81
+ }
82
+ else {
83
+ this.openDropdown();
84
+ }
85
+ };
86
+ this.handleTriggerKeyDown = (e) => {
87
+ switch (e.key) {
88
+ case 'ArrowDown':
89
+ case 'ArrowUp':
90
+ case 'Enter':
91
+ case ' ':
92
+ e.preventDefault();
93
+ if (!this.isOpen) {
94
+ this.openDropdown();
95
+ }
96
+ break;
97
+ }
98
+ };
99
+ this.handleSearchInputChange = (e) => {
100
+ const target = e.target;
101
+ this.searchQuery = target.value;
102
+ this.highlightedIndex = -1;
103
+ // Emit search event for consumer-managed async
104
+ this.pdsMultiselectSearch.emit({ query: this.searchQuery });
105
+ // Fetch from async URL if configured
106
+ if (this.asyncUrl) {
107
+ this.debouncedFetchAsyncOptions(this.searchQuery, 1);
108
+ }
109
+ };
110
+ this.handleSearchInputKeyDown = (e) => {
111
+ const filteredOptions = this.getFilteredOptions();
112
+ switch (e.key) {
113
+ case 'ArrowDown':
114
+ e.preventDefault();
115
+ this.highlightedIndex = Math.min(this.highlightedIndex + 1, filteredOptions.length - 1);
116
+ this.scrollOptionIntoView();
117
+ break;
118
+ case 'ArrowUp':
119
+ e.preventDefault();
120
+ this.highlightedIndex = Math.max(this.highlightedIndex - 1, 0);
121
+ this.scrollOptionIntoView();
122
+ break;
123
+ case 'Enter':
124
+ e.preventDefault();
125
+ if (this.highlightedIndex >= 0) {
126
+ const option = filteredOptions[this.highlightedIndex];
127
+ if (option) {
128
+ this.selectOption(option);
129
+ }
130
+ }
131
+ break;
132
+ // Escape is handled by the global @Listen('keydown') handler
133
+ case 'Tab':
134
+ this.closeDropdown();
135
+ break;
136
+ }
137
+ };
138
+ this.handleContainerFocusOut = () => {
139
+ // Use setTimeout to delay the check - this allows click events and focus transitions to complete
140
+ // before we decide to close the dropdown
141
+ setTimeout(() => {
142
+ var _a;
143
+ // Don't close if we're in the middle of opening or already closed
144
+ if (!this.isOpen || this.isOpening)
145
+ return;
146
+ const activeElement = document.activeElement;
147
+ // Check if focus is within our component's shadow root
148
+ const isInShadowRoot = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.contains(activeElement);
149
+ // Also check if focus is on the host element itself
150
+ const isOnHost = activeElement === this.el;
151
+ if (!isInShadowRoot && !isOnHost) {
152
+ this.closeDropdown();
153
+ }
154
+ }, 0);
155
+ };
156
+ this.handleOptionMouseDown = (option) => (e) => {
157
+ e.preventDefault(); // Prevent focus change
158
+ this.toggleOption(option);
159
+ };
160
+ this.handleOptionMouseEnter = (index) => () => {
161
+ this.highlightedIndex = index;
162
+ };
163
+ this.handleScroll = (e) => {
164
+ if (!this.asyncUrl || !this.hasMore || this.loading)
165
+ return;
166
+ const target = e.target;
167
+ const scrollBottom = target.scrollHeight - target.scrollTop - target.clientHeight;
168
+ // Load more when near bottom (within 50px)
169
+ if (scrollBottom < 50) {
170
+ this.pdsMultiselectLoadOptions.emit({
171
+ query: this.searchQuery,
172
+ page: this.currentPage + 1,
173
+ });
174
+ this.debouncedFetchAsyncOptions(this.searchQuery, this.currentPage + 1);
175
+ }
176
+ };
177
+ }
178
+ connectedCallback() {
179
+ if (this.el.attachInternals) {
180
+ this.internals = this.el.attachInternals();
181
+ }
182
+ }
183
+ componentWillLoad() {
184
+ this.originalSearchEmitter = this.pdsMultiselectSearch;
185
+ this.syncSelectedItems();
186
+ }
187
+ componentDidLoad() {
188
+ this.setupDebounce();
189
+ this.setupMutationObserver();
190
+ this.setupSlotChangeListener();
191
+ this.updateFormValue();
192
+ // Ensure preselected values sync after DOM is fully ready
193
+ // This handles cases where slot content loads after initial render (e.g., in docs/MDX)
194
+ requestAnimationFrame(() => {
195
+ this.updateOptionsFromSlot();
196
+ this.syncSelectedItems();
197
+ });
198
+ }
199
+ setupSlotChangeListener() {
200
+ var _a;
201
+ const slot = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('slot:not([name])');
202
+ if (slot) {
203
+ slot.addEventListener('slotchange', () => {
204
+ this.updateOptionsFromSlot();
205
+ this.syncSelectedItems();
206
+ });
207
+ // Also call it immediately in case content is already slotted
208
+ this.updateOptionsFromSlot();
209
+ }
210
+ }
211
+ disconnectedCallback() {
212
+ var _a, _b;
213
+ (_a = this.observer) === null || _a === void 0 ? void 0 : _a.disconnect();
214
+ (_b = this.cleanupAutoUpdate) === null || _b === void 0 ? void 0 : _b.call(this);
215
+ this.clearAsyncFetchState();
216
+ }
217
+ setupDebounce() {
218
+ const { pdsMultiselectSearch, debounce, originalSearchEmitter } = this;
219
+ this.pdsMultiselectSearch = debounce === undefined
220
+ ? originalSearchEmitter !== null && originalSearchEmitter !== void 0 ? originalSearchEmitter : pdsMultiselectSearch
221
+ : debounceEvent(pdsMultiselectSearch, debounce);
222
+ }
223
+ valueChanged(newValue) {
224
+ // Handle JSON string values (from HTML attributes)
225
+ if (typeof newValue === 'string') {
226
+ try {
227
+ const parsed = JSON.parse(newValue);
228
+ if (Array.isArray(parsed)) {
229
+ this.value = parsed;
230
+ return; // The assignment will trigger this watcher again with the array
231
+ }
232
+ }
233
+ catch (_a) {
234
+ // Not valid JSON, treat as single value
235
+ this.value = newValue ? [newValue] : [];
236
+ return;
237
+ }
238
+ }
239
+ this.syncSelectedItems();
240
+ this.updateFormValue();
241
+ }
242
+ optionsChanged() {
243
+ if (this.options) {
244
+ this.internalOptions = [...this.options];
245
+ }
246
+ }
247
+ internalOptionsChanged() {
248
+ // Re-sync selected items when options become available
249
+ // This handles the case where value is set before options are loaded (e.g., from slot)
250
+ this.syncSelectedItems();
251
+ }
252
+ /**
253
+ * Sets focus on the trigger button.
254
+ */
255
+ async setFocus() {
256
+ var _a;
257
+ (_a = this.triggerEl) === null || _a === void 0 ? void 0 : _a.focus();
258
+ }
259
+ /**
260
+ * Handle global keyboard events for accessibility.
261
+ * Closes dropdown on Escape key press regardless of focus location.
262
+ */
263
+ handleWindowKeyDown(event) {
264
+ var _a;
265
+ if (!this.isOpen)
266
+ return;
267
+ if (event.key === 'Escape') {
268
+ event.preventDefault();
269
+ this.closeDropdown();
270
+ (_a = this.triggerEl) === null || _a === void 0 ? void 0 : _a.focus();
271
+ }
272
+ }
273
+ setupMutationObserver() {
274
+ this.observer = new MutationObserver(() => {
275
+ this.updateOptionsFromSlot();
276
+ });
277
+ this.observer.observe(this.el, {
278
+ childList: true,
279
+ subtree: true,
280
+ });
281
+ }
282
+ updateOptionsFromSlot() {
283
+ var _a;
284
+ const slot = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('slot:not([name])');
285
+ if (!slot)
286
+ return;
287
+ const options = slot.assignedElements({ flatten: true })
288
+ .filter((el) => el.tagName === 'OPTION')
289
+ .map(opt => ({
290
+ id: opt.value,
291
+ text: opt.textContent || opt.value,
292
+ }));
293
+ // Only update if we actually found options AND we're not using async/external options
294
+ // Don't clear internalOptions if slot returns empty (might be mid-DOM-update)
295
+ if (options.length > 0 && !this.asyncUrl && !this.options) {
296
+ this.internalOptions = options;
297
+ }
298
+ }
299
+ clearAsyncFetchState() {
300
+ var _a;
301
+ if (this.fetchDebounceTimer !== undefined) {
302
+ window.clearTimeout(this.fetchDebounceTimer);
303
+ this.fetchDebounceTimer = undefined;
304
+ }
305
+ (_a = this.abortController) === null || _a === void 0 ? void 0 : _a.abort();
306
+ this.abortController = undefined;
307
+ }
308
+ debouncedFetchAsyncOptions(query, page = 1) {
309
+ var _a;
310
+ if (!this.asyncUrl)
311
+ return;
312
+ if (this.fetchDebounceTimer !== undefined) {
313
+ window.clearTimeout(this.fetchDebounceTimer);
314
+ }
315
+ const delay = Math.max(0, (_a = this.debounce) !== null && _a !== void 0 ? _a : 0);
316
+ this.fetchDebounceTimer = window.setTimeout(() => {
317
+ this.fetchDebounceTimer = undefined;
318
+ this.fetchOptions(query, page);
319
+ }, delay);
320
+ }
321
+ syncSelectedItems() {
322
+ // Ensure value is an array (may be string from HTML attribute)
323
+ const valueArray = this.ensureValueArray();
324
+ const allOptions = this.getAllOptions();
325
+ this.selectedItems = valueArray
326
+ .map(val => allOptions.find(opt => String(opt.id) === String(val)))
327
+ .filter((opt) => opt !== undefined);
328
+ }
329
+ ensureValueArray() {
330
+ // Handle JSON string values passed via HTML attribute
331
+ if (typeof this.value === 'string') {
332
+ try {
333
+ const parsed = JSON.parse(this.value);
334
+ if (Array.isArray(parsed)) {
335
+ this.value = parsed;
336
+ return parsed;
337
+ }
338
+ }
339
+ catch (_a) {
340
+ // Not valid JSON, treat as single value
341
+ const singleValue = this.value;
342
+ this.value = singleValue ? [singleValue] : [];
343
+ return this.value;
344
+ }
345
+ }
346
+ return Array.isArray(this.value) ? this.value : [];
347
+ }
348
+ getAllOptions() {
349
+ return this.options || this.internalOptions;
350
+ }
351
+ getFilteredOptions() {
352
+ const allOptions = this.getAllOptions();
353
+ const query = this.searchQuery.toLowerCase();
354
+ return allOptions.filter(opt => {
355
+ // Filter by search query only - don't filter out selected items
356
+ if (query) {
357
+ return opt.text.toLowerCase().includes(query);
358
+ }
359
+ return true;
360
+ });
361
+ }
362
+ updateFormValue() {
363
+ var _a;
364
+ if ((_a = this.internals) === null || _a === void 0 ? void 0 : _a.setFormValue) {
365
+ // Ensure value is an array before iterating
366
+ const valueArray = this.ensureValueArray();
367
+ // Submit as multiple values with same name (native select multiple behavior)
368
+ const formData = new FormData();
369
+ valueArray.forEach(val => {
370
+ if (this.name) {
371
+ formData.append(this.name, val);
372
+ }
373
+ });
374
+ this.internals.setFormValue(formData);
375
+ // Update validity state for required validation
376
+ if (this.required && valueArray.length === 0) {
377
+ this.internals.setValidity({ valueMissing: true }, 'Please select at least one option.', this.triggerEl);
378
+ }
379
+ else {
380
+ this.internals.setValidity({});
381
+ }
382
+ }
383
+ }
384
+ async fetchOptions(query, page = 1) {
385
+ var _a;
386
+ if (!this.asyncUrl)
387
+ return;
388
+ (_a = this.abortController) === null || _a === void 0 ? void 0 : _a.abort();
389
+ this.abortController = new AbortController();
390
+ this.loading = true;
391
+ try {
392
+ const url = new URL(this.asyncUrl, window.location.origin);
393
+ if (this.asyncMethod === 'GET') {
394
+ url.searchParams.set('search', query);
395
+ url.searchParams.set('page', String(page));
396
+ }
397
+ const response = await fetch(url.toString(), Object.assign({ method: this.asyncMethod, signal: this.abortController.signal, headers: {
398
+ 'Content-Type': 'application/json',
399
+ 'Accept': 'application/json',
400
+ } }, (this.asyncMethod === 'POST' && {
401
+ body: JSON.stringify({ search: query, page }),
402
+ })));
403
+ if (!response.ok)
404
+ throw new Error('Failed to fetch options');
405
+ const data = await response.json();
406
+ const formattedResults = data.results.map(item => {
407
+ if (this.formatResult) {
408
+ return this.formatResult(item);
409
+ }
410
+ return Object.assign({ id: item.id, text: item.text }, item);
411
+ });
412
+ if (page === 1) {
413
+ this.internalOptions = formattedResults;
414
+ }
415
+ else {
416
+ this.internalOptions = [...this.internalOptions, ...formattedResults];
417
+ }
418
+ this.hasMore = data.totalCount ? this.internalOptions.length < data.totalCount : false;
419
+ this.currentPage = page;
420
+ }
421
+ catch (error) {
422
+ if (error.name !== 'AbortError') {
423
+ console.error('PdsMultiselect: Failed to fetch options', error);
424
+ }
425
+ }
426
+ finally {
427
+ this.loading = false;
428
+ }
429
+ }
430
+ openDropdown() {
431
+ if (this.disabled)
432
+ return;
433
+ this.isOpening = true;
434
+ this.isOpen = true;
435
+ this.highlightedIndex = -1;
436
+ // Trigger initial fetch if async
437
+ if (this.asyncUrl && this.internalOptions.length === 0) {
438
+ this.debouncedFetchAsyncOptions(this.searchQuery, 1);
439
+ }
440
+ requestAnimationFrame(() => {
441
+ var _a;
442
+ this.positionDropdown();
443
+ // Focus the search input after the panel is positioned
444
+ (_a = this.searchInputEl) === null || _a === void 0 ? void 0 : _a.focus();
445
+ // Clear the opening flag after focus has moved
446
+ setTimeout(() => {
447
+ this.isOpening = false;
448
+ }, 50);
449
+ });
450
+ }
451
+ closeDropdown() {
452
+ this.isOpen = false;
453
+ this.highlightedIndex = -1;
454
+ this.searchQuery = '';
455
+ // Clean up auto-update
456
+ if (this.cleanupAutoUpdate) {
457
+ this.cleanupAutoUpdate();
458
+ this.cleanupAutoUpdate = undefined;
459
+ }
460
+ }
461
+ positionDropdown() {
462
+ if (!this.containerEl || !this.panelEl)
463
+ return;
464
+ const referenceEl = this.triggerEl || this.containerEl;
465
+ const { minWidth, panelWidth } = this;
466
+ const updatePosition = () => {
467
+ computePosition(referenceEl, this.panelEl, {
468
+ placement: 'bottom-start',
469
+ strategy: 'absolute',
470
+ middleware: [
471
+ offset(12),
472
+ flip(),
473
+ shift({ padding: 8 }),
474
+ size({
475
+ apply: ({ rects, elements }) => {
476
+ Object.assign(elements.floating.style, {
477
+ width: panelWidth !== null && panelWidth !== void 0 ? panelWidth : `${rects.reference.width}px`,
478
+ minWidth,
479
+ });
480
+ },
481
+ }),
482
+ ],
483
+ }).then(({ x, y }) => {
484
+ if (this.panelEl) {
485
+ this.panelEl.style.left = `${x}px`;
486
+ this.panelEl.style.top = `${y}px`;
487
+ }
488
+ });
489
+ };
490
+ // Initial position
491
+ updatePosition();
492
+ // Set up auto-update for window resize and scroll
493
+ const cleanupAutoUpdate = autoUpdate(referenceEl, this.panelEl, updatePosition);
494
+ this.cleanupAutoUpdate = () => {
495
+ cleanupAutoUpdate();
496
+ this.clearAsyncFetchState();
497
+ };
498
+ }
499
+ scrollOptionIntoView() {
500
+ requestAnimationFrame(() => {
501
+ var _a;
502
+ const highlighted = (_a = this.listboxEl) === null || _a === void 0 ? void 0 : _a.querySelector(`[data-index="${this.highlightedIndex}"]`);
503
+ highlighted === null || highlighted === void 0 ? void 0 : highlighted.scrollIntoView({ block: 'nearest', behavior: 'smooth' });
504
+ });
505
+ }
506
+ toggleOption(option) {
507
+ var _a;
508
+ const isSelected = this.value.includes(String(option.id));
509
+ if (isSelected) {
510
+ // Remove from selection
511
+ const newValue = this.value.filter(v => v !== String(option.id));
512
+ this.value = newValue;
513
+ const newSelectedItems = this.selectedItems.filter(item => String(item.id) !== String(option.id));
514
+ this.pdsMultiselectChange.emit({
515
+ values: newValue,
516
+ items: newSelectedItems,
517
+ });
518
+ }
519
+ else {
520
+ // Add to selection
521
+ if (this.maxSelections && this.value.length >= this.maxSelections) {
522
+ return;
523
+ }
524
+ const newValue = [...this.value, String(option.id)];
525
+ this.value = newValue;
526
+ const newSelectedItems = [...this.selectedItems, option];
527
+ this.pdsMultiselectChange.emit({
528
+ values: newValue,
529
+ items: newSelectedItems,
530
+ });
531
+ }
532
+ // Keep focus on search input, don't close dropdown
533
+ (_a = this.searchInputEl) === null || _a === void 0 ? void 0 : _a.focus();
534
+ }
535
+ selectOption(option) {
536
+ // For keyboard navigation - toggle the option
537
+ this.toggleOption(option);
538
+ }
539
+ renderSelectedItemsList() {
540
+ if (this.selectedItems.length === 0)
541
+ return null;
542
+ return (h("div", { class: "pds-multiselect__selected-section" }, h("ul", { class: "pds-multiselect__selected-list", role: "list" }, this.selectedItems.map(item => (h("li", { key: String(item.id), class: "pds-multiselect__selected-item" }, item.text))))));
543
+ }
544
+ renderDropdown() {
545
+ if (!this.isOpen)
546
+ return null;
547
+ const filteredOptions = this.getFilteredOptions();
548
+ const valueArray = this.ensureValueArray();
549
+ const hasSlottedEmpty = !!this.el.querySelector('[slot="empty"]');
550
+ const hasSlottedLoading = !!this.el.querySelector('[slot="loading"]');
551
+ return (h("div", { class: "pds-multiselect__panel", ref: el => (this.panelEl = el), style: { minWidth: this.minWidth } }, h("div", { class: "pds-multiselect__search" }, h("pds-icon", { name: "search", size: "small" }), h("input", { ref: el => (this.searchInputEl = el), type: "text", class: "pds-multiselect__search-input", placeholder: "Find...", value: this.searchQuery, "aria-label": "Search options", "aria-controls": `${this.componentId}-listbox`, "aria-activedescendant": this.highlightedIndex >= 0 ? `${this.componentId}-option-${this.highlightedIndex}` : undefined, role: "combobox", "aria-haspopup": "listbox", "aria-expanded": "true", "aria-autocomplete": "list", autocomplete: "off", onInput: this.handleSearchInputChange, onKeyDown: this.handleSearchInputKeyDown })), this.renderSelectedItemsList(), h("ul", { class: "pds-multiselect__listbox", role: "listbox", "aria-multiselectable": "true", "aria-label": this.label || 'Options', id: `${this.componentId}-listbox`, ref: el => (this.listboxEl = el), style: { maxHeight: this.maxHeight }, onScroll: this.handleScroll }, this.loading && (h("li", { class: "pds-multiselect__loading", role: "presentation" }, hasSlottedLoading ? (h("slot", { name: "loading" })) : (h("pds-loader", { size: "small" })))), !this.loading && filteredOptions.length === 0 && (h("li", { class: "pds-multiselect__empty", role: "presentation" }, hasSlottedEmpty ? (h("slot", { name: "empty" })) : (h("span", null, "No options found")))), filteredOptions.map((option, index) => {
552
+ const isSelected = valueArray.includes(String(option.id));
553
+ const isHighlighted = index === this.highlightedIndex;
554
+ const optionId = `${this.componentId}-option-${index}`;
555
+ return (h("li", { key: String(option.id), id: optionId, class: {
556
+ 'pds-multiselect__option': true,
557
+ 'pds-multiselect__option--highlighted': isHighlighted,
558
+ 'pds-multiselect__option--selected': isSelected,
559
+ }, role: "option", "aria-selected": isSelected ? 'true' : 'false', "data-index": index, onMouseDown: this.handleOptionMouseDown(option), onMouseEnter: this.handleOptionMouseEnter(index) }, h("pds-checkbox", { componentId: `${this.componentId}-checkbox-${index}`, checked: isSelected, label: option.text, style: { pointerEvents: 'none' } })));
560
+ }), this.hasMore && !this.loading && (h("li", { class: "pds-multiselect__load-more", role: "presentation" }, h("pds-loader", { size: "small" }))))));
561
+ }
562
+ getTriggerText() {
563
+ const count = this.selectedItems.length;
564
+ if (count === 0) {
565
+ return this.placeholder || 'Select...';
566
+ }
567
+ return `${count} item${count === 1 ? '' : 's'}`;
568
+ }
569
+ render() {
570
+ const hasSelections = this.selectedItems.length > 0;
571
+ return (h(Host, { key: '0d8a40829a0a7f2cf89d9fbe036c0880d17652c0', "aria-disabled": this.disabled ? 'true' : null }, h("div", { key: '375297b4cc85ca3afd28965b2138fcd144a42474', class: "pds-multiselect" }, this.label && (h("label", { key: '3976caded352614dbae48b710d8615f2c46fe688', htmlFor: this.componentId, class: {
572
+ 'pds-multiselect__label': true,
573
+ 'visually-hidden': this.hideLabel,
574
+ } }, this.label)), h("div", { key: 'ec02d5c84873688d155be28b0cdd8c495d60d796', class: "pds-multiselect__wrapper", ref: el => (this.containerEl = el), onFocusout: this.handleContainerFocusOut, style: { width: this.triggerWidth } }, h("button", { key: '87c5a8847d26e18425389dd8fd8f1f198263a7c0', ref: el => (this.triggerEl = el), type: "button", class: {
575
+ 'pds-multiselect__trigger': true,
576
+ 'pds-multiselect__trigger--open': this.isOpen,
577
+ 'pds-multiselect__trigger--disabled': this.disabled,
578
+ 'pds-multiselect__trigger--invalid': this.invalid || !!this.errorMessage,
579
+ 'pds-multiselect__trigger--has-value': hasSelections,
580
+ }, id: this.componentId, disabled: this.disabled, "aria-required": this.required ? 'true' : undefined, "aria-expanded": this.isOpen ? 'true' : 'false', "aria-haspopup": "listbox", "aria-describedby": assignDescription(this.componentId, this.invalid || !!this.errorMessage, this.errorMessage || this.helperMessage), "aria-invalid": this.invalid || !!this.errorMessage ? 'true' : undefined, onClick: this.handleTriggerClick, onKeyDown: this.handleTriggerKeyDown }, h("span", { key: '4660140f3fa4201b5706b6e4870e463ed718cd0d', class: {
581
+ 'pds-multiselect__trigger-text': true,
582
+ 'pds-multiselect__trigger-text--placeholder': !hasSelections,
583
+ } }, this.getTriggerText()), h("pds-icon", { key: 'dbba532de1a4b915c64b3b79d414cf3b53203c5f', class: "pds-multiselect__icon", icon: enlarge })), this.renderDropdown()), this.helperMessage && !this.errorMessage && (h("p", { key: '0524ae0fabff8365f9bf61ab71878c6d3bec362d', class: "pds-multiselect__helper", id: messageId(this.componentId, 'helper') }, this.helperMessage)), this.errorMessage && (h("p", { key: 'e014047181cb25a40fae151797406cdd726ee3ea', class: "pds-multiselect__error", id: messageId(this.componentId, 'error') }, h("pds-icon", { key: '45cd498f7f60b4b15193e16a6521bb2324cca06d', icon: danger, size: "small" }), this.errorMessage)), h("div", { key: 'fc24922ae45ef799a34f5fa696cd7a5e4e1d945f', style: { display: 'none' } }, h("slot", { key: '0c3a84477eabf0779e84feaf2b936b3ca7ad9606' })))));
584
+ }
585
+ static get formAssociated() { return true; }
586
+ get el() { return this; }
587
+ static get watchers() { return {
588
+ "debounce": ["setupDebounce"],
589
+ "value": ["valueChanged"],
590
+ "options": ["optionsChanged"],
591
+ "internalOptions": ["internalOptionsChanged"]
592
+ }; }
593
+ static get style() { return pdsMultiselectCss; }
594
+ }, [321, "pds-multiselect", {
595
+ "componentId": [1, "component-id"],
596
+ "label": [1],
597
+ "placeholder": [1],
598
+ "name": [1],
599
+ "value": [1040],
600
+ "disabled": [4],
601
+ "asyncUrl": [1, "async-url"],
602
+ "asyncMethod": [1, "async-method"],
603
+ "debounce": [2],
604
+ "maxSelections": [2, "max-selections"],
605
+ "maxHeight": [1, "max-height"],
606
+ "triggerWidth": [1, "trigger-width"],
607
+ "minWidth": [1, "min-width"],
608
+ "panelWidth": [1, "panel-width"],
609
+ "hideLabel": [4, "hide-label"],
610
+ "errorMessage": [1, "error-message"],
611
+ "helperMessage": [1, "helper-message"],
612
+ "invalid": [4],
613
+ "required": [4],
614
+ "loading": [1028],
615
+ "options": [16],
616
+ "formatResult": [16],
617
+ "isOpen": [32],
618
+ "searchQuery": [32],
619
+ "highlightedIndex": [32],
620
+ "internalOptions": [32],
621
+ "selectedItems": [32],
622
+ "currentPage": [32],
623
+ "hasMore": [32],
624
+ "setFocus": [64]
625
+ }, [[8, "keydown", "handleWindowKeyDown"]], {
626
+ "debounce": ["setupDebounce"],
627
+ "value": ["valueChanged"],
628
+ "options": ["optionsChanged"],
629
+ "internalOptions": ["internalOptionsChanged"]
630
+ }]);
631
+ function defineCustomElement$1() {
632
+ if (typeof customElements === "undefined") {
633
+ return;
634
+ }
635
+ const components = ["pds-multiselect", "pds-checkbox", "pds-icon", "pds-loader"];
636
+ components.forEach(tagName => { switch (tagName) {
637
+ case "pds-multiselect":
638
+ if (!customElements.get(tagName)) {
639
+ customElements.define(tagName, PdsMultiselect$1);
640
+ }
641
+ break;
642
+ case "pds-checkbox":
643
+ if (!customElements.get(tagName)) {
644
+ defineCustomElement$4();
645
+ }
646
+ break;
647
+ case "pds-icon":
648
+ if (!customElements.get(tagName)) {
649
+ defineCustomElement$3();
650
+ }
651
+ break;
652
+ case "pds-loader":
653
+ if (!customElements.get(tagName)) {
654
+ defineCustomElement$2();
655
+ }
656
+ break;
657
+ } });
658
+ }
659
+
660
+ const PdsMultiselect = PdsMultiselect$1;
661
+ const defineCustomElement = defineCustomElement$1;
662
+
663
+ export { PdsMultiselect, defineCustomElement };
664
+ //# sourceMappingURL=pds-multiselect.js.map
665
+
666
+ //# sourceMappingURL=pds-multiselect.js.map