@pine-ds/core 3.22.1 → 3.24.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 (607) hide show
  1. package/components/floating-ui.dom.js +142 -129
  2. package/components/floating-ui.dom.js.map +1 -1
  3. package/components/form.js +14 -1
  4. package/components/form.js.map +1 -1
  5. package/components/index.d.ts +2 -0
  6. package/components/index.js +1 -0
  7. package/components/index.js.map +1 -1
  8. package/components/index2.js +1 -1
  9. package/components/index2.js.map +1 -1
  10. package/components/mock-pds-modal.js +1 -1
  11. package/components/pds-alert.js +1 -1
  12. package/components/pds-alert.js.map +1 -1
  13. package/components/pds-avatar.js +1 -1
  14. package/components/pds-avatar.js.map +1 -1
  15. package/components/pds-checkbox2.js +5 -7
  16. package/components/pds-checkbox2.js.map +1 -1
  17. package/components/pds-chip2.js +1 -1
  18. package/components/pds-chip2.js.map +1 -1
  19. package/components/pds-combobox.js +46 -41
  20. package/components/pds-combobox.js.map +1 -1
  21. package/components/pds-container.d.ts +11 -0
  22. package/components/pds-container.js +61 -0
  23. package/components/pds-container.js.map +1 -0
  24. package/components/pds-copytext.js +1 -1
  25. package/components/pds-divider.js +1 -1
  26. package/components/pds-dropdown-menu-item.js +1 -1
  27. package/components/pds-dropdown-menu-item.js.map +1 -1
  28. package/components/pds-dropdown-menu-separator.js +1 -1
  29. package/components/pds-dropdown-menu.js +1 -1
  30. package/components/pds-filter.js +1 -1
  31. package/components/pds-filters.js +1 -1
  32. package/components/pds-image.js +2 -2
  33. package/components/pds-input.js +4 -2
  34. package/components/pds-input.js.map +1 -1
  35. package/components/pds-link2.js +2 -2
  36. package/components/pds-loader2.js +1 -1
  37. package/components/pds-modal-content.js +2 -2
  38. package/components/pds-modal-footer.js +1 -1
  39. package/components/pds-modal-header.js +1 -1
  40. package/components/pds-modal.js +3 -3
  41. package/components/pds-multiselect.js +199 -40
  42. package/components/pds-multiselect.js.map +1 -1
  43. package/components/pds-select.js +4 -2
  44. package/components/pds-select.js.map +1 -1
  45. package/components/pds-sortable-item.js +1 -1
  46. package/components/pds-sortable-item.js.map +1 -1
  47. package/components/pds-sortable.js +98 -93
  48. package/components/pds-sortable.js.map +1 -1
  49. package/components/pds-switch.js +5 -7
  50. package/components/pds-switch.js.map +1 -1
  51. package/components/pds-textarea.js +8 -6
  52. package/components/pds-textarea.js.map +1 -1
  53. package/components/pds-toast.js +3 -3
  54. package/components/pds-toast.js.map +1 -1
  55. package/dist/cjs/{floating-ui.dom-Ca6tS7ef.js → floating-ui.dom-BZk7Blsu.js} +144 -131
  56. package/dist/cjs/floating-ui.dom-BZk7Blsu.js.map +1 -0
  57. package/dist/cjs/{form-DUqlzovE.js → form-CpM5Z8q7.js} +16 -2
  58. package/dist/cjs/form-CpM5Z8q7.js.map +1 -0
  59. package/dist/cjs/{index-D8mNsvM8.js → index-DGBoDsAL.js} +3 -3
  60. package/dist/cjs/index-DGBoDsAL.js.map +1 -0
  61. package/dist/cjs/loader.cjs.js +1 -1
  62. package/dist/cjs/mock-pds-modal.cjs.entry.js +1 -1
  63. package/dist/cjs/pds-accordion.cjs.entry.js +1 -1
  64. package/dist/cjs/pds-alert.cjs.entry.js +1 -1
  65. package/dist/cjs/pds-alert.entry.cjs.js.map +1 -1
  66. package/dist/cjs/pds-avatar.cjs.entry.js +2 -2
  67. package/dist/cjs/pds-avatar.entry.cjs.js.map +1 -1
  68. package/dist/cjs/pds-button.cjs.entry.js +1 -1
  69. package/dist/cjs/pds-checkbox.cjs.entry.js +6 -8
  70. package/dist/cjs/pds-checkbox.entry.cjs.js.map +1 -1
  71. package/dist/cjs/pds-chip.cjs.entry.js +2 -2
  72. package/dist/cjs/pds-chip.entry.cjs.js.map +1 -1
  73. package/dist/cjs/pds-combobox.cjs.entry.js +46 -42
  74. package/dist/cjs/pds-combobox.entry.cjs.js.map +1 -1
  75. package/dist/cjs/pds-container.cjs.entry.js +37 -0
  76. package/dist/cjs/pds-container.entry.cjs.js.map +1 -0
  77. package/dist/cjs/pds-copytext.cjs.entry.js +4 -4
  78. package/dist/cjs/pds-divider.cjs.entry.js +1 -1
  79. package/dist/cjs/pds-dropdown-menu-item.cjs.entry.js +1 -1
  80. package/dist/cjs/pds-dropdown-menu-item.entry.cjs.js.map +1 -1
  81. package/dist/cjs/pds-dropdown-menu-separator.cjs.entry.js +1 -1
  82. package/dist/cjs/pds-dropdown-menu.cjs.entry.js +2 -2
  83. package/dist/cjs/pds-filter.cjs.entry.js +2 -2
  84. package/dist/cjs/pds-filters.cjs.entry.js +1 -1
  85. package/dist/cjs/pds-image.cjs.entry.js +2 -2
  86. package/dist/cjs/pds-input.cjs.entry.js +5 -3
  87. package/dist/cjs/pds-input.entry.cjs.js.map +1 -1
  88. package/dist/cjs/pds-link.cjs.entry.js +3 -3
  89. package/dist/cjs/pds-loader.cjs.entry.js +1 -1
  90. package/dist/cjs/pds-modal-content.cjs.entry.js +2 -2
  91. package/dist/cjs/pds-modal-footer.cjs.entry.js +1 -1
  92. package/dist/cjs/pds-modal-header.cjs.entry.js +1 -1
  93. package/dist/cjs/pds-modal.cjs.entry.js +3 -3
  94. package/dist/cjs/pds-multiselect.cjs.entry.js +187 -38
  95. package/dist/cjs/pds-multiselect.entry.cjs.js.map +1 -1
  96. package/dist/cjs/pds-radio-group.cjs.entry.js +2 -2
  97. package/dist/cjs/pds-radio.cjs.entry.js +2 -2
  98. package/dist/cjs/pds-select.cjs.entry.js +5 -3
  99. package/dist/cjs/pds-select.entry.cjs.js.map +1 -1
  100. package/dist/cjs/pds-sortable-item.cjs.entry.js +2 -2
  101. package/dist/cjs/pds-sortable-item.entry.cjs.js.map +1 -1
  102. package/dist/cjs/pds-sortable.cjs.entry.js +95 -93
  103. package/dist/cjs/pds-sortable.entry.cjs.js.map +1 -1
  104. package/dist/cjs/pds-switch.cjs.entry.js +6 -8
  105. package/dist/cjs/pds-switch.entry.cjs.js.map +1 -1
  106. package/dist/cjs/pds-table-cell.cjs.entry.js +2 -2
  107. package/dist/cjs/pds-table-head-cell.cjs.entry.js +1 -1
  108. package/dist/cjs/pds-text.cjs.entry.js +2 -2
  109. package/dist/cjs/pds-textarea.cjs.entry.js +9 -7
  110. package/dist/cjs/pds-textarea.entry.cjs.js.map +1 -1
  111. package/dist/cjs/pds-toast.cjs.entry.js +3 -3
  112. package/dist/cjs/pds-toast.entry.cjs.js.map +1 -1
  113. package/dist/cjs/pds-tooltip.cjs.entry.js +1 -1
  114. package/dist/cjs/pine-core.cjs.js +1 -1
  115. package/dist/cjs/{truncation-tooltip-BGGnm8SZ.js → truncation-tooltip-CVzAha5B.js} +3 -3
  116. package/dist/cjs/{truncation-tooltip-BGGnm8SZ.js.map → truncation-tooltip-CVzAha5B.js.map} +1 -1
  117. package/dist/collection/collection-manifest.json +1 -0
  118. package/dist/collection/components/pds-alert/pds-alert.js +2 -1
  119. package/dist/collection/components/pds-alert/pds-alert.js.map +1 -1
  120. package/dist/collection/components/pds-avatar/pds-avatar.js +3 -1
  121. package/dist/collection/components/pds-avatar/pds-avatar.js.map +1 -1
  122. package/dist/collection/components/pds-checkbox/pds-checkbox.js +5 -7
  123. package/dist/collection/components/pds-checkbox/pds-checkbox.js.map +1 -1
  124. package/dist/collection/components/pds-chip/pds-chip.js +2 -1
  125. package/dist/collection/components/pds-chip/pds-chip.js.map +1 -1
  126. package/dist/collection/components/pds-combobox/pds-combobox.css +5 -0
  127. package/dist/collection/components/pds-combobox/pds-combobox.js +53 -37
  128. package/dist/collection/components/pds-combobox/pds-combobox.js.map +1 -1
  129. package/dist/collection/components/pds-container/pds-container.css +26 -0
  130. package/dist/collection/components/pds-container/pds-container.js +112 -0
  131. package/dist/collection/components/pds-container/pds-container.js.map +1 -0
  132. package/dist/collection/components/pds-container/stories/pds-container.stories.js +89 -0
  133. package/dist/collection/components/pds-copytext/pds-copytext.js +1 -1
  134. package/dist/collection/components/pds-divider/pds-divider.js +1 -1
  135. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.js +4 -1
  136. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.js.map +1 -1
  137. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-separator/pds-dropdown-menu-separator.js +1 -1
  138. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu.js +1 -1
  139. package/dist/collection/components/pds-filters/pds-filter/pds-filter.js +1 -1
  140. package/dist/collection/components/pds-filters/pds-filters.js +1 -1
  141. package/dist/collection/components/pds-image/pds-image.js +2 -2
  142. package/dist/collection/components/pds-input/pds-input.js +4 -2
  143. package/dist/collection/components/pds-input/pds-input.js.map +1 -1
  144. package/dist/collection/components/pds-link/pds-link.js +2 -2
  145. package/dist/collection/components/pds-loader/pds-loader.js +1 -1
  146. package/dist/collection/components/pds-modal/pds-modal-content/pds-modal-content.js +2 -2
  147. package/dist/collection/components/pds-modal/pds-modal-footer/pds-modal-footer.js +1 -1
  148. package/dist/collection/components/pds-modal/pds-modal-header/pds-modal-header.js +1 -1
  149. package/dist/collection/components/pds-modal/pds-modal.js +3 -3
  150. package/dist/collection/components/pds-modal/test/mock-pds-modal.js +1 -1
  151. package/dist/collection/components/pds-multiselect/multiselect-interface.js.map +1 -1
  152. package/dist/collection/components/pds-multiselect/pds-multiselect.css +83 -1
  153. package/dist/collection/components/pds-multiselect/pds-multiselect.js +258 -37
  154. package/dist/collection/components/pds-multiselect/pds-multiselect.js.map +1 -1
  155. package/dist/collection/components/pds-multiselect/stories/pds-multiselect.stories.js +226 -0
  156. package/dist/collection/components/pds-select/pds-select.js +4 -2
  157. package/dist/collection/components/pds-select/pds-select.js.map +1 -1
  158. package/dist/collection/components/pds-sortable/pds-sortable-item/pds-sortable-item.css +12 -2
  159. package/dist/collection/components/pds-sortable/pds-sortable.js +46 -4
  160. package/dist/collection/components/pds-sortable/pds-sortable.js.map +1 -1
  161. package/dist/collection/components/pds-sortable/sortable-interface.js.map +1 -1
  162. package/dist/collection/components/pds-sortable/stories/pds-sortable.stories.js +19 -4
  163. package/dist/collection/components/pds-switch/pds-switch.js +5 -7
  164. package/dist/collection/components/pds-switch/pds-switch.js.map +1 -1
  165. package/dist/collection/components/pds-textarea/pds-textarea.js +8 -6
  166. package/dist/collection/components/pds-textarea/pds-textarea.js.map +1 -1
  167. package/dist/collection/components/pds-toast/pds-toast.js +6 -3
  168. package/dist/collection/components/pds-toast/pds-toast.js.map +1 -1
  169. package/dist/collection/utils/form.js +13 -0
  170. package/dist/collection/utils/form.js.map +1 -1
  171. package/dist/docs.json +346 -15
  172. package/dist/esm/{floating-ui.dom-BO6p966C.js → floating-ui.dom-DDtwbwIl.js} +144 -131
  173. package/dist/esm/floating-ui.dom-DDtwbwIl.js.map +1 -0
  174. package/dist/esm/{form-CN-lL5QG.js → form-C3xDZBme.js} +16 -3
  175. package/dist/esm/form-C3xDZBme.js.map +1 -0
  176. package/dist/esm/{index-Bmf4Ow_8.js → index-D4ys0pep.js} +3 -3
  177. package/dist/esm/index-D4ys0pep.js.map +1 -0
  178. package/dist/esm/loader.js +1 -1
  179. package/dist/esm/mock-pds-modal.entry.js +1 -1
  180. package/dist/esm/pds-accordion.entry.js +1 -1
  181. package/dist/esm/pds-alert.entry.js +1 -1
  182. package/dist/esm/pds-alert.entry.js.map +1 -1
  183. package/dist/esm/pds-avatar.entry.js +2 -2
  184. package/dist/esm/pds-avatar.entry.js.map +1 -1
  185. package/dist/esm/pds-button.entry.js +1 -1
  186. package/dist/esm/pds-checkbox.entry.js +6 -8
  187. package/dist/esm/pds-checkbox.entry.js.map +1 -1
  188. package/dist/esm/pds-chip.entry.js +2 -2
  189. package/dist/esm/pds-chip.entry.js.map +1 -1
  190. package/dist/esm/pds-combobox.entry.js +46 -42
  191. package/dist/esm/pds-combobox.entry.js.map +1 -1
  192. package/dist/esm/pds-container.entry.js +35 -0
  193. package/dist/esm/pds-container.entry.js.map +1 -0
  194. package/dist/esm/pds-copytext.entry.js +4 -4
  195. package/dist/esm/pds-divider.entry.js +1 -1
  196. package/dist/esm/pds-dropdown-menu-item.entry.js +1 -1
  197. package/dist/esm/pds-dropdown-menu-item.entry.js.map +1 -1
  198. package/dist/esm/pds-dropdown-menu-separator.entry.js +1 -1
  199. package/dist/esm/pds-dropdown-menu.entry.js +2 -2
  200. package/dist/esm/pds-filter.entry.js +2 -2
  201. package/dist/esm/pds-filters.entry.js +1 -1
  202. package/dist/esm/pds-image.entry.js +2 -2
  203. package/dist/esm/pds-input.entry.js +5 -3
  204. package/dist/esm/pds-input.entry.js.map +1 -1
  205. package/dist/esm/pds-link.entry.js +3 -3
  206. package/dist/esm/pds-loader.entry.js +1 -1
  207. package/dist/esm/pds-modal-content.entry.js +2 -2
  208. package/dist/esm/pds-modal-footer.entry.js +1 -1
  209. package/dist/esm/pds-modal-header.entry.js +1 -1
  210. package/dist/esm/pds-modal.entry.js +3 -3
  211. package/dist/esm/pds-multiselect.entry.js +187 -38
  212. package/dist/esm/pds-multiselect.entry.js.map +1 -1
  213. package/dist/esm/pds-radio-group.entry.js +2 -2
  214. package/dist/esm/pds-radio.entry.js +2 -2
  215. package/dist/esm/pds-select.entry.js +5 -3
  216. package/dist/esm/pds-select.entry.js.map +1 -1
  217. package/dist/esm/pds-sortable-item.entry.js +2 -2
  218. package/dist/esm/pds-sortable-item.entry.js.map +1 -1
  219. package/dist/esm/pds-sortable.entry.js +95 -93
  220. package/dist/esm/pds-sortable.entry.js.map +1 -1
  221. package/dist/esm/pds-switch.entry.js +6 -8
  222. package/dist/esm/pds-switch.entry.js.map +1 -1
  223. package/dist/esm/pds-table-cell.entry.js +2 -2
  224. package/dist/esm/pds-table-head-cell.entry.js +1 -1
  225. package/dist/esm/pds-text.entry.js +2 -2
  226. package/dist/esm/pds-textarea.entry.js +9 -7
  227. package/dist/esm/pds-textarea.entry.js.map +1 -1
  228. package/dist/esm/pds-toast.entry.js +3 -3
  229. package/dist/esm/pds-toast.entry.js.map +1 -1
  230. package/dist/esm/pds-tooltip.entry.js +1 -1
  231. package/dist/esm/pine-core.js +1 -1
  232. package/dist/esm/{truncation-tooltip-CTHpMbU3.js → truncation-tooltip-Blk4GigP.js} +3 -3
  233. package/dist/{esm-es5/truncation-tooltip-CTHpMbU3.js.map → esm/truncation-tooltip-Blk4GigP.js.map} +1 -1
  234. package/dist/esm-es5/floating-ui.dom-DDtwbwIl.js +2 -0
  235. package/dist/esm-es5/floating-ui.dom-DDtwbwIl.js.map +1 -0
  236. package/dist/esm-es5/{form-CN-lL5QG.js → form-C3xDZBme.js} +2 -2
  237. package/dist/esm-es5/form-C3xDZBme.js.map +1 -0
  238. package/dist/esm-es5/{index-Bmf4Ow_8.js → index-D4ys0pep.js} +1 -1
  239. package/dist/esm-es5/index-D4ys0pep.js.map +1 -0
  240. package/dist/esm-es5/loader.js +1 -1
  241. package/dist/esm-es5/mock-pds-modal.entry.js +1 -1
  242. package/dist/esm-es5/pds-accordion.entry.js +1 -1
  243. package/dist/esm-es5/pds-alert.entry.js +1 -1
  244. package/dist/esm-es5/pds-alert.entry.js.map +1 -1
  245. package/dist/esm-es5/pds-avatar.entry.js +1 -1
  246. package/dist/esm-es5/pds-avatar.entry.js.map +1 -1
  247. package/dist/esm-es5/pds-button.entry.js +1 -1
  248. package/dist/esm-es5/pds-checkbox.entry.js +1 -1
  249. package/dist/esm-es5/pds-checkbox.entry.js.map +1 -1
  250. package/dist/esm-es5/pds-chip.entry.js +1 -1
  251. package/dist/esm-es5/pds-chip.entry.js.map +1 -1
  252. package/dist/esm-es5/pds-combobox.entry.js +2 -2
  253. package/dist/esm-es5/pds-combobox.entry.js.map +1 -1
  254. package/dist/esm-es5/pds-container.entry.js +2 -0
  255. package/dist/esm-es5/pds-container.entry.js.map +1 -0
  256. package/dist/esm-es5/pds-copytext.entry.js +1 -1
  257. package/dist/esm-es5/pds-divider.entry.js +1 -1
  258. package/dist/esm-es5/pds-dropdown-menu-item.entry.js +1 -1
  259. package/dist/esm-es5/pds-dropdown-menu-item.entry.js.map +1 -1
  260. package/dist/esm-es5/pds-dropdown-menu-separator.entry.js +1 -1
  261. package/dist/esm-es5/pds-dropdown-menu.entry.js +1 -1
  262. package/dist/esm-es5/pds-filter.entry.js +1 -1
  263. package/dist/esm-es5/pds-filters.entry.js +1 -1
  264. package/dist/esm-es5/pds-image.entry.js +1 -1
  265. package/dist/esm-es5/pds-input.entry.js +1 -1
  266. package/dist/esm-es5/pds-input.entry.js.map +1 -1
  267. package/dist/esm-es5/pds-link.entry.js +1 -1
  268. package/dist/esm-es5/pds-loader.entry.js +1 -1
  269. package/dist/esm-es5/pds-modal-content.entry.js +1 -1
  270. package/dist/esm-es5/pds-modal-footer.entry.js +1 -1
  271. package/dist/esm-es5/pds-modal-header.entry.js +1 -1
  272. package/dist/esm-es5/pds-modal.entry.js +1 -1
  273. package/dist/esm-es5/pds-multiselect.entry.js +1 -1
  274. package/dist/esm-es5/pds-multiselect.entry.js.map +1 -1
  275. package/dist/esm-es5/pds-radio-group.entry.js +1 -1
  276. package/dist/esm-es5/pds-radio.entry.js +1 -1
  277. package/dist/esm-es5/pds-select.entry.js +1 -1
  278. package/dist/esm-es5/pds-select.entry.js.map +1 -1
  279. package/dist/esm-es5/pds-sortable-item.entry.js +1 -1
  280. package/dist/esm-es5/pds-sortable-item.entry.js.map +1 -1
  281. package/dist/esm-es5/pds-sortable.entry.js +2 -2
  282. package/dist/esm-es5/pds-sortable.entry.js.map +1 -1
  283. package/dist/esm-es5/pds-switch.entry.js +1 -1
  284. package/dist/esm-es5/pds-switch.entry.js.map +1 -1
  285. package/dist/esm-es5/pds-table-cell.entry.js +1 -1
  286. package/dist/esm-es5/pds-table-head-cell.entry.js +1 -1
  287. package/dist/esm-es5/pds-text.entry.js +1 -1
  288. package/dist/esm-es5/pds-textarea.entry.js +1 -1
  289. package/dist/esm-es5/pds-textarea.entry.js.map +1 -1
  290. package/dist/esm-es5/pds-toast.entry.js +1 -1
  291. package/dist/esm-es5/pds-toast.entry.js.map +1 -1
  292. package/dist/esm-es5/pds-tooltip.entry.js +1 -1
  293. package/dist/esm-es5/pine-core.js +1 -1
  294. package/dist/esm-es5/{truncation-tooltip-CTHpMbU3.js → truncation-tooltip-Blk4GigP.js} +2 -2
  295. package/dist/{esm/truncation-tooltip-CTHpMbU3.js.map → esm-es5/truncation-tooltip-Blk4GigP.js.map} +1 -1
  296. package/dist/pine-core/p--XSKe449.system.js.map +1 -0
  297. package/dist/pine-core/p-06921b1a.system.entry.js +2 -0
  298. package/dist/pine-core/p-06921b1a.system.entry.js.map +1 -0
  299. package/dist/pine-core/{p-5f63b999.entry.js → p-0e35b09a.entry.js} +2 -2
  300. package/dist/pine-core/{p-b2a7c2bf.entry.js → p-0f376270.entry.js} +2 -2
  301. package/dist/pine-core/p-10e0be55.entry.js +2 -0
  302. package/dist/pine-core/{p-9f09e116.system.entry.js → p-137517ea.system.entry.js} +2 -2
  303. package/dist/pine-core/{p-203f6e9e.entry.js → p-14ca4f31.entry.js} +2 -2
  304. package/dist/pine-core/p-1fa303af.entry.js +2 -0
  305. package/dist/pine-core/p-213d0f72.system.entry.js +2 -0
  306. package/dist/pine-core/p-213d0f72.system.entry.js.map +1 -0
  307. package/dist/pine-core/p-23450d7a.system.entry.js +2 -0
  308. package/dist/pine-core/p-23450d7a.system.entry.js.map +1 -0
  309. package/dist/pine-core/{p-b6ede995.system.entry.js → p-2483b797.system.entry.js} +2 -2
  310. package/dist/pine-core/p-29a8ef8a.entry.js +2 -0
  311. package/dist/pine-core/p-29a8ef8a.entry.js.map +1 -0
  312. package/dist/pine-core/{p-f179c88f.system.entry.js → p-2f0eb2b5.system.entry.js} +2 -2
  313. package/dist/pine-core/{p-68f97bdf.entry.js → p-2f6f60d9.entry.js} +2 -2
  314. package/dist/pine-core/p-3a527283.entry.js +8 -0
  315. package/dist/pine-core/p-3a527283.entry.js.map +1 -0
  316. package/dist/pine-core/{p-73be1c83.entry.js → p-3b342c35.entry.js} +2 -2
  317. package/dist/pine-core/{p-9ba4acdf.system.entry.js → p-3f0a6a75.system.entry.js} +2 -2
  318. package/dist/pine-core/{p-51d2999d.entry.js → p-426e90cb.entry.js} +2 -2
  319. package/dist/pine-core/{p-119ccf73.entry.js → p-426f5f57.entry.js} +2 -2
  320. package/dist/pine-core/p-4591a359.system.entry.js +9 -0
  321. package/dist/pine-core/p-4591a359.system.entry.js.map +1 -0
  322. package/dist/pine-core/{p-7737e4e8.system.entry.js → p-4d2e9e8d.system.entry.js} +2 -2
  323. package/dist/pine-core/p-4f6487b9.system.entry.js +2 -0
  324. package/dist/pine-core/p-4f6487b9.system.entry.js.map +1 -0
  325. package/dist/pine-core/{p-DKT0sVlZ.system.js.map → p-5L_gsODn.system.js.map} +1 -1
  326. package/dist/pine-core/p-66644048.entry.js +2 -0
  327. package/dist/pine-core/{p-b8f21554.system.entry.js → p-6b456e02.system.entry.js} +2 -2
  328. package/dist/pine-core/{p-d0504aa8.system.entry.js → p-6be19a23.system.entry.js} +2 -2
  329. package/dist/pine-core/{p-d8d796ad.system.entry.js → p-6dcd7876.system.entry.js} +2 -2
  330. package/dist/pine-core/{p-8a53ae6d.system.entry.js → p-712e0d82.system.entry.js} +2 -2
  331. package/dist/pine-core/p-72a27cb7.system.entry.js +2 -0
  332. package/dist/pine-core/p-72a27cb7.system.entry.js.map +1 -0
  333. package/dist/pine-core/{p-3fc8dbc9.system.entry.js → p-75a53dce.system.entry.js} +2 -2
  334. package/dist/pine-core/{p-2f663747.system.entry.js → p-7dfb5b1f.system.entry.js} +2 -2
  335. package/dist/pine-core/{p-e9eb3fc3.system.entry.js → p-811e510d.system.entry.js} +2 -2
  336. package/dist/pine-core/{p-7fc20a77.system.entry.js → p-84b696ce.system.entry.js} +2 -2
  337. package/dist/pine-core/p-8501bb6b.entry.js +2 -0
  338. package/dist/pine-core/p-8501bb6b.entry.js.map +1 -0
  339. package/dist/pine-core/p-8c000d7c.entry.js +2 -0
  340. package/dist/pine-core/{p-ccdee55a.entry.js → p-8c0fc8ff.entry.js} +2 -2
  341. package/dist/pine-core/p-8f48fa0b.system.entry.js +2 -0
  342. package/dist/pine-core/p-8f48fa0b.system.entry.js.map +1 -0
  343. package/dist/pine-core/{p-18a3b6ba.system.entry.js → p-92df334f.system.entry.js} +2 -2
  344. package/dist/pine-core/{p-1b0dc99e.system.entry.js → p-93eeca70.system.entry.js} +2 -2
  345. package/dist/pine-core/p-98e202b8.system.entry.js +2 -0
  346. package/dist/pine-core/{p-445c5ec5.system.entry.js → p-9947c6cd.system.entry.js} +2 -2
  347. package/dist/pine-core/{p-1d82417a.entry.js → p-9d2e89e5.entry.js} +2 -2
  348. package/dist/pine-core/{p-cbf49268.entry.js → p-9ea92b46.entry.js} +2 -2
  349. package/dist/pine-core/p-9f0f1389.entry.js +2 -0
  350. package/dist/pine-core/{p-bf712423.entry.js.map → p-9f0f1389.entry.js.map} +1 -1
  351. package/dist/pine-core/{p-Bch44a-T.system.js → p-B1u-QvFn.system.js} +2 -2
  352. package/dist/pine-core/p-B1u-QvFn.system.js.map +1 -0
  353. package/dist/pine-core/{p-BASnRvhy.system.js.map → p-B8OHXU49.system.js.map} +1 -1
  354. package/dist/pine-core/{p-5hPM5knE.js → p-BNSGedhN.js} +2 -2
  355. package/dist/pine-core/{p-5hPM5knE.js.map → p-BNSGedhN.js.map} +1 -1
  356. package/dist/pine-core/p-B_IKQKhn.system.js.map +1 -0
  357. package/dist/pine-core/{p-CSe1fQxQ.system.js.map → p-Bb4REZL1.system.js.map} +1 -1
  358. package/dist/pine-core/p-BfOM0dtX.system.js.map +1 -0
  359. package/dist/pine-core/{p-C1p8XJSR.system.js.map → p-BgNsCT1R.system.js.map} +1 -1
  360. package/dist/pine-core/p-Bng_-RSY.system.js.map +1 -0
  361. package/dist/pine-core/{p-dPhHNR2G.system.js.map → p-Bp9jwGLH.system.js.map} +1 -1
  362. package/dist/pine-core/{p-B9rVdQdy.system.js.map → p-BqPhyc8k.system.js.map} +1 -1
  363. package/dist/pine-core/p-BrLs99ML.system.js +2 -0
  364. package/dist/pine-core/p-BrLs99ML.system.js.map +1 -0
  365. package/dist/pine-core/p-C3xDZBme.js +2 -0
  366. package/dist/pine-core/p-C3xDZBme.js.map +1 -0
  367. package/dist/pine-core/{p-CFL53vBy.system.js → p-C62JIZmE.system.js} +1 -1
  368. package/dist/pine-core/p-C62JIZmE.system.js.map +1 -0
  369. package/dist/pine-core/{p-DQCerqxZ.system.js.map → p-C6TsH_RJ.system.js.map} +1 -1
  370. package/dist/pine-core/p-C9msrPdv.system.js.map +1 -0
  371. package/dist/pine-core/{p-BR9M75xt.system.js.map → p-CI7DD4Gj.system.js.map} +1 -1
  372. package/dist/pine-core/{p-DXVwADJT.system.js → p-CRCxGYgw.system.js} +2 -2
  373. package/dist/pine-core/{p-DXVwADJT.system.js.map → p-CRCxGYgw.system.js.map} +1 -1
  374. package/dist/pine-core/p-CXhVuzyx.system.js.map +1 -0
  375. package/dist/pine-core/{p-9SGoKSa6.system.js.map → p-CYFz3obB.system.js.map} +1 -1
  376. package/dist/pine-core/{p-BeJr-4oL.system.js.map → p-CZnOhE0g.system.js.map} +1 -1
  377. package/dist/pine-core/p-CdMCGjQj.system.js.map +1 -0
  378. package/dist/pine-core/{p-sgZDP7ET.system.js.map → p-CijIWK3K.system.js.map} +1 -1
  379. package/dist/pine-core/{p-DZt6ah_A.system.js.map → p-ClPf_JF1.system.js.map} +1 -1
  380. package/dist/pine-core/{p-Bsen6aos.system.js.map → p-Co9FFVKs.system.js.map} +1 -1
  381. package/dist/pine-core/{p-CfNEp0k0.system.js.map → p-Cvql9iy1.system.js.map} +1 -1
  382. package/dist/pine-core/p-CyOICl1j.system.js.map +1 -0
  383. package/dist/pine-core/{p-DmWm26A6.system.js.map → p-D0GkJmlY.system.js.map} +1 -1
  384. package/dist/pine-core/{p-Bmf4Ow_8.js → p-D4ys0pep.js} +1 -1
  385. package/dist/pine-core/p-D4ys0pep.js.map +1 -0
  386. package/dist/pine-core/p-DDtwbwIl.js +2 -0
  387. package/dist/pine-core/p-DDtwbwIl.js.map +1 -0
  388. package/dist/pine-core/p-DLZO3aKG.system.js.map +1 -0
  389. package/dist/pine-core/p-DO--6n89.system.js.map +1 -0
  390. package/dist/pine-core/p-DQJGHOVq.system.js.map +1 -0
  391. package/dist/pine-core/{p-D02u2D7r.system.js.map → p-DkNlmqjM.system.js.map} +1 -1
  392. package/dist/pine-core/p-Dl-o5ymF.system.js.map +1 -0
  393. package/dist/pine-core/p-DqfjMab8.system.js.map +1 -0
  394. package/dist/pine-core/{p-CsWO_n3t.system.js.map → p-DyrMiAYl.system.js.map} +1 -1
  395. package/dist/pine-core/{p-DzmLlvu3.system.js.map → p-FWsvMskO.system.js.map} +1 -1
  396. package/dist/pine-core/p-JAVnELnm.system.js +1 -1
  397. package/dist/pine-core/p-a11c3642.system.entry.js +2 -0
  398. package/dist/pine-core/{p-08cdf7f2.system.entry.js → p-a55bc143.system.entry.js} +2 -2
  399. package/dist/pine-core/{p-abb72971.system.entry.js → p-a85e565c.system.entry.js} +2 -2
  400. package/dist/pine-core/{p-56d0e6f4.entry.js → p-aa331370.entry.js} +2 -2
  401. package/dist/pine-core/{p-BUtyruql.system.js.map → p-abrage-l.system.js.map} +1 -1
  402. package/dist/pine-core/p-ac186cd4.system.entry.js +2 -0
  403. package/dist/pine-core/{p-edbaff73.system.entry.js → p-ae238530.system.entry.js} +2 -2
  404. package/dist/pine-core/{p-b7f2f9f3.system.entry.js → p-afad45f6.system.entry.js} +2 -2
  405. package/dist/pine-core/p-b2218fa1.entry.js +2 -0
  406. package/dist/pine-core/p-b2218fa1.entry.js.map +1 -0
  407. package/dist/pine-core/{p-36478643.system.entry.js → p-b2a5b6ae.system.entry.js} +2 -2
  408. package/dist/pine-core/p-b83f79a7.entry.js +2 -0
  409. package/dist/pine-core/p-b83f79a7.entry.js.map +1 -0
  410. package/dist/pine-core/{p-Be8OBmYb.system.js.map → p-bkQbPz-z.system.js.map} +1 -1
  411. package/dist/pine-core/{p-bf157830.entry.js → p-c38eb8e9.entry.js} +2 -2
  412. package/dist/pine-core/p-ca9da7ea.system.entry.js +2 -0
  413. package/dist/pine-core/p-ca9da7ea.system.entry.js.map +1 -0
  414. package/dist/pine-core/{p-5e83f6e3.system.entry.js → p-cb668b61.system.entry.js} +2 -2
  415. package/dist/pine-core/{p-39cb879d.entry.js → p-ccf46b90.entry.js} +2 -2
  416. package/dist/pine-core/p-cdd8175e.entry.js +2 -0
  417. package/dist/pine-core/p-cdd8175e.entry.js.map +1 -0
  418. package/dist/pine-core/{p-867ef2f1.entry.js → p-ceca2cb1.entry.js} +2 -2
  419. package/dist/pine-core/{p-9558fa60.entry.js → p-d045b245.entry.js} +2 -2
  420. package/dist/pine-core/{p-ea721a45.entry.js → p-d0eebd6d.entry.js} +2 -2
  421. package/dist/pine-core/{p-599a5903.system.entry.js → p-d1313dd6.system.entry.js} +2 -2
  422. package/dist/pine-core/p-d3e64f4e.system.entry.js +4 -0
  423. package/dist/pine-core/p-d3e64f4e.system.entry.js.map +1 -0
  424. package/dist/pine-core/{p-3e2fc38f.entry.js → p-d4844049.entry.js} +2 -2
  425. package/dist/pine-core/p-d8698ac5.entry.js +3 -0
  426. package/dist/pine-core/p-d8698ac5.entry.js.map +1 -0
  427. package/dist/pine-core/p-e0f21c22.entry.js +2 -0
  428. package/dist/pine-core/{p-9b2cd9fc.entry.js → p-e463b9d3.entry.js} +2 -2
  429. package/dist/pine-core/{p-5107c129.entry.js → p-e73b5859.entry.js} +2 -2
  430. package/dist/pine-core/{p-De6wHGVf.system.js.map → p-eUcBQ_fh.system.js.map} +1 -1
  431. package/dist/pine-core/p-ed447b3e.entry.js +2 -0
  432. package/dist/pine-core/p-ed447b3e.entry.js.map +1 -0
  433. package/dist/pine-core/p-f42e65fd.system.entry.js +2 -0
  434. package/dist/pine-core/{p-46d61c98.system.entry.js.map → p-f42e65fd.system.entry.js.map} +1 -1
  435. package/dist/pine-core/{p-9c0e22d4.entry.js → p-f74bd712.entry.js} +2 -2
  436. package/dist/pine-core/p-f84b6b5a.entry.js +2 -0
  437. package/dist/pine-core/p-f84b6b5a.entry.js.map +1 -0
  438. package/dist/pine-core/p-fa21e054.system.entry.js +2 -0
  439. package/dist/pine-core/{p-64c6c4a0.entry.js → p-fa51ae5d.entry.js} +2 -2
  440. package/dist/pine-core/p-fc830d8b.entry.js +2 -0
  441. package/dist/pine-core/{p-7c1b1fb8.entry.js.map → p-fc830d8b.entry.js.map} +1 -1
  442. package/dist/pine-core/{p-CEE11B7K.system.js.map → p-k9PMan7S.system.js.map} +1 -1
  443. package/dist/pine-core/p-kR80YJVM.system.js.map +1 -0
  444. package/dist/pine-core/p-uIsnJ30J.system.js.map +1 -0
  445. package/dist/pine-core/pds-alert.entry.esm.js.map +1 -1
  446. package/dist/pine-core/pds-avatar.entry.esm.js.map +1 -1
  447. package/dist/pine-core/pds-checkbox.entry.esm.js.map +1 -1
  448. package/dist/pine-core/pds-chip.entry.esm.js.map +1 -1
  449. package/dist/pine-core/pds-combobox.entry.esm.js.map +1 -1
  450. package/dist/pine-core/pds-container.entry.esm.js.map +1 -0
  451. package/dist/pine-core/pds-dropdown-menu-item.entry.esm.js.map +1 -1
  452. package/dist/pine-core/pds-input.entry.esm.js.map +1 -1
  453. package/dist/pine-core/pds-multiselect.entry.esm.js.map +1 -1
  454. package/dist/pine-core/pds-select.entry.esm.js.map +1 -1
  455. package/dist/pine-core/pds-sortable-item.entry.esm.js.map +1 -1
  456. package/dist/pine-core/pds-sortable.entry.esm.js.map +1 -1
  457. package/dist/pine-core/pds-switch.entry.esm.js.map +1 -1
  458. package/dist/pine-core/pds-textarea.entry.esm.js.map +1 -1
  459. package/dist/pine-core/pds-toast.entry.esm.js.map +1 -1
  460. package/dist/pine-core/pine-core.esm.js +1 -1
  461. package/dist/types/components/pds-alert/pds-alert.d.ts +1 -0
  462. package/dist/types/components/pds-avatar/pds-avatar.d.ts +2 -0
  463. package/dist/types/components/pds-chip/pds-chip.d.ts +1 -0
  464. package/dist/types/components/pds-combobox/pds-combobox.d.ts +9 -1
  465. package/dist/types/components/pds-container/pds-container.d.ts +22 -0
  466. package/dist/types/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.d.ts +3 -0
  467. package/dist/types/components/pds-multiselect/multiselect-interface.d.ts +8 -0
  468. package/dist/types/components/pds-multiselect/pds-multiselect.d.ts +31 -0
  469. package/dist/types/components/pds-sortable/pds-sortable.d.ts +8 -1
  470. package/dist/types/components/pds-sortable/sortable-interface.d.ts +1 -0
  471. package/dist/types/components/pds-toast/pds-toast.d.ts +3 -0
  472. package/dist/types/components.d.ts +97 -6
  473. package/dist/types/utils/form.d.ts +10 -0
  474. package/dist/vscode.html-data.json +10529 -0
  475. package/hydrate/index.js +596 -349
  476. package/hydrate/index.mjs +596 -349
  477. package/package.json +2 -2
  478. package/dist/cjs/floating-ui.dom-Ca6tS7ef.js.map +0 -1
  479. package/dist/cjs/form-DUqlzovE.js.map +0 -1
  480. package/dist/cjs/index-D8mNsvM8.js.map +0 -1
  481. package/dist/esm/floating-ui.dom-BO6p966C.js.map +0 -1
  482. package/dist/esm/form-CN-lL5QG.js.map +0 -1
  483. package/dist/esm/index-Bmf4Ow_8.js.map +0 -1
  484. package/dist/esm-es5/floating-ui.dom-BO6p966C.js +0 -2
  485. package/dist/esm-es5/floating-ui.dom-BO6p966C.js.map +0 -1
  486. package/dist/esm-es5/form-CN-lL5QG.js.map +0 -1
  487. package/dist/esm-es5/index-Bmf4Ow_8.js.map +0 -1
  488. package/dist/pine-core/p-0b3d6527.entry.js +0 -2
  489. package/dist/pine-core/p-0b3d6527.entry.js.map +0 -1
  490. package/dist/pine-core/p-221b4348.entry.js +0 -2
  491. package/dist/pine-core/p-221b4348.entry.js.map +0 -1
  492. package/dist/pine-core/p-25255ab8.system.entry.js +0 -4
  493. package/dist/pine-core/p-25255ab8.system.entry.js.map +0 -1
  494. package/dist/pine-core/p-2a7b94ba.system.entry.js +0 -2
  495. package/dist/pine-core/p-2a7b94ba.system.entry.js.map +0 -1
  496. package/dist/pine-core/p-31bfac45.entry.js +0 -2
  497. package/dist/pine-core/p-3239c67a.entry.js +0 -2
  498. package/dist/pine-core/p-396d4b63.entry.js +0 -8
  499. package/dist/pine-core/p-396d4b63.entry.js.map +0 -1
  500. package/dist/pine-core/p-3fd70f83.entry.js +0 -2
  501. package/dist/pine-core/p-3fd70f83.entry.js.map +0 -1
  502. package/dist/pine-core/p-44035cf4.entry.js +0 -3
  503. package/dist/pine-core/p-44035cf4.entry.js.map +0 -1
  504. package/dist/pine-core/p-46d61c98.system.entry.js +0 -2
  505. package/dist/pine-core/p-4c0e71ce.entry.js +0 -2
  506. package/dist/pine-core/p-4c0e71ce.entry.js.map +0 -1
  507. package/dist/pine-core/p-4c82bff5.entry.js +0 -2
  508. package/dist/pine-core/p-79f0b007.entry.js +0 -2
  509. package/dist/pine-core/p-79f0b007.entry.js.map +0 -1
  510. package/dist/pine-core/p-7c1b1fb8.entry.js +0 -2
  511. package/dist/pine-core/p-7da176b4.system.entry.js +0 -9
  512. package/dist/pine-core/p-7da176b4.system.entry.js.map +0 -1
  513. package/dist/pine-core/p-8a31ccd4.entry.js +0 -2
  514. package/dist/pine-core/p-8a31ccd4.entry.js.map +0 -1
  515. package/dist/pine-core/p-91781a0a.system.entry.js +0 -2
  516. package/dist/pine-core/p-91781a0a.system.entry.js.map +0 -1
  517. package/dist/pine-core/p-94a9ff2a.system.entry.js +0 -2
  518. package/dist/pine-core/p-BB9Md7vT.system.js.map +0 -1
  519. package/dist/pine-core/p-BGc1L0Ao.system.js.map +0 -1
  520. package/dist/pine-core/p-BO6p966C.js +0 -2
  521. package/dist/pine-core/p-BO6p966C.js.map +0 -1
  522. package/dist/pine-core/p-Bch44a-T.system.js.map +0 -1
  523. package/dist/pine-core/p-Bmf4Ow_8.js.map +0 -1
  524. package/dist/pine-core/p-BohZ8Mvm.system.js.map +0 -1
  525. package/dist/pine-core/p-CEll-OBZ.system.js.map +0 -1
  526. package/dist/pine-core/p-CFL53vBy.system.js.map +0 -1
  527. package/dist/pine-core/p-CFqOsbKv.system.js.map +0 -1
  528. package/dist/pine-core/p-CH2XYz0c.system.js.map +0 -1
  529. package/dist/pine-core/p-CN-lL5QG.js +0 -2
  530. package/dist/pine-core/p-CN-lL5QG.js.map +0 -1
  531. package/dist/pine-core/p-CTDKHxjD.system.js.map +0 -1
  532. package/dist/pine-core/p-D-iLwshJ.system.js.map +0 -1
  533. package/dist/pine-core/p-D2eS6fhD.system.js +0 -2
  534. package/dist/pine-core/p-D2eS6fhD.system.js.map +0 -1
  535. package/dist/pine-core/p-D497NWkn.system.js.map +0 -1
  536. package/dist/pine-core/p-DHNujrRT.system.js.map +0 -1
  537. package/dist/pine-core/p-DcrqbXJe.system.js.map +0 -1
  538. package/dist/pine-core/p-DdR8iWme.system.js.map +0 -1
  539. package/dist/pine-core/p-DqO0Rc5m.system.js.map +0 -1
  540. package/dist/pine-core/p-a553b40b.system.entry.js +0 -2
  541. package/dist/pine-core/p-a553b40b.system.entry.js.map +0 -1
  542. package/dist/pine-core/p-af5bf21d.entry.js +0 -2
  543. package/dist/pine-core/p-bPSIyJOo.system.js.map +0 -1
  544. package/dist/pine-core/p-ba195382.system.entry.js +0 -2
  545. package/dist/pine-core/p-bd2329cd.entry.js +0 -2
  546. package/dist/pine-core/p-bf712423.entry.js +0 -2
  547. package/dist/pine-core/p-d6139188.system.entry.js +0 -2
  548. package/dist/pine-core/p-ed5ca877.system.entry.js +0 -2
  549. package/dist/pine-core/p-ef7d0535.system.entry.js +0 -2
  550. package/dist/pine-core/p-ef7d0535.system.entry.js.map +0 -1
  551. package/dist/pine-core/p-f298baeb.system.entry.js +0 -2
  552. package/dist/pine-core/p-f298baeb.system.entry.js.map +0 -1
  553. package/dist/pine-core/p-f9c32940.system.entry.js +0 -2
  554. package/dist/pine-core/p-f9c32940.system.entry.js.map +0 -1
  555. /package/dist/pine-core/{p-5f63b999.entry.js.map → p-0e35b09a.entry.js.map} +0 -0
  556. /package/dist/pine-core/{p-b2a7c2bf.entry.js.map → p-0f376270.entry.js.map} +0 -0
  557. /package/dist/pine-core/{p-31bfac45.entry.js.map → p-10e0be55.entry.js.map} +0 -0
  558. /package/dist/pine-core/{p-9f09e116.system.entry.js.map → p-137517ea.system.entry.js.map} +0 -0
  559. /package/dist/pine-core/{p-203f6e9e.entry.js.map → p-14ca4f31.entry.js.map} +0 -0
  560. /package/dist/pine-core/{p-4c82bff5.entry.js.map → p-1fa303af.entry.js.map} +0 -0
  561. /package/dist/pine-core/{p-b6ede995.system.entry.js.map → p-2483b797.system.entry.js.map} +0 -0
  562. /package/dist/pine-core/{p-f179c88f.system.entry.js.map → p-2f0eb2b5.system.entry.js.map} +0 -0
  563. /package/dist/pine-core/{p-68f97bdf.entry.js.map → p-2f6f60d9.entry.js.map} +0 -0
  564. /package/dist/pine-core/{p-73be1c83.entry.js.map → p-3b342c35.entry.js.map} +0 -0
  565. /package/dist/pine-core/{p-9ba4acdf.system.entry.js.map → p-3f0a6a75.system.entry.js.map} +0 -0
  566. /package/dist/pine-core/{p-51d2999d.entry.js.map → p-426e90cb.entry.js.map} +0 -0
  567. /package/dist/pine-core/{p-119ccf73.entry.js.map → p-426f5f57.entry.js.map} +0 -0
  568. /package/dist/pine-core/{p-7737e4e8.system.entry.js.map → p-4d2e9e8d.system.entry.js.map} +0 -0
  569. /package/dist/pine-core/{p-3239c67a.entry.js.map → p-66644048.entry.js.map} +0 -0
  570. /package/dist/pine-core/{p-b8f21554.system.entry.js.map → p-6b456e02.system.entry.js.map} +0 -0
  571. /package/dist/pine-core/{p-d0504aa8.system.entry.js.map → p-6be19a23.system.entry.js.map} +0 -0
  572. /package/dist/pine-core/{p-d8d796ad.system.entry.js.map → p-6dcd7876.system.entry.js.map} +0 -0
  573. /package/dist/pine-core/{p-8a53ae6d.system.entry.js.map → p-712e0d82.system.entry.js.map} +0 -0
  574. /package/dist/pine-core/{p-3fc8dbc9.system.entry.js.map → p-75a53dce.system.entry.js.map} +0 -0
  575. /package/dist/pine-core/{p-2f663747.system.entry.js.map → p-7dfb5b1f.system.entry.js.map} +0 -0
  576. /package/dist/pine-core/{p-e9eb3fc3.system.entry.js.map → p-811e510d.system.entry.js.map} +0 -0
  577. /package/dist/pine-core/{p-7fc20a77.system.entry.js.map → p-84b696ce.system.entry.js.map} +0 -0
  578. /package/dist/pine-core/{p-bd2329cd.entry.js.map → p-8c000d7c.entry.js.map} +0 -0
  579. /package/dist/pine-core/{p-ccdee55a.entry.js.map → p-8c0fc8ff.entry.js.map} +0 -0
  580. /package/dist/pine-core/{p-18a3b6ba.system.entry.js.map → p-92df334f.system.entry.js.map} +0 -0
  581. /package/dist/pine-core/{p-1b0dc99e.system.entry.js.map → p-93eeca70.system.entry.js.map} +0 -0
  582. /package/dist/pine-core/{p-ed5ca877.system.entry.js.map → p-98e202b8.system.entry.js.map} +0 -0
  583. /package/dist/pine-core/{p-445c5ec5.system.entry.js.map → p-9947c6cd.system.entry.js.map} +0 -0
  584. /package/dist/pine-core/{p-1d82417a.entry.js.map → p-9d2e89e5.entry.js.map} +0 -0
  585. /package/dist/pine-core/{p-cbf49268.entry.js.map → p-9ea92b46.entry.js.map} +0 -0
  586. /package/dist/pine-core/{p-94a9ff2a.system.entry.js.map → p-a11c3642.system.entry.js.map} +0 -0
  587. /package/dist/pine-core/{p-08cdf7f2.system.entry.js.map → p-a55bc143.system.entry.js.map} +0 -0
  588. /package/dist/pine-core/{p-abb72971.system.entry.js.map → p-a85e565c.system.entry.js.map} +0 -0
  589. /package/dist/pine-core/{p-56d0e6f4.entry.js.map → p-aa331370.entry.js.map} +0 -0
  590. /package/dist/pine-core/{p-ba195382.system.entry.js.map → p-ac186cd4.system.entry.js.map} +0 -0
  591. /package/dist/pine-core/{p-edbaff73.system.entry.js.map → p-ae238530.system.entry.js.map} +0 -0
  592. /package/dist/pine-core/{p-b7f2f9f3.system.entry.js.map → p-afad45f6.system.entry.js.map} +0 -0
  593. /package/dist/pine-core/{p-36478643.system.entry.js.map → p-b2a5b6ae.system.entry.js.map} +0 -0
  594. /package/dist/pine-core/{p-bf157830.entry.js.map → p-c38eb8e9.entry.js.map} +0 -0
  595. /package/dist/pine-core/{p-5e83f6e3.system.entry.js.map → p-cb668b61.system.entry.js.map} +0 -0
  596. /package/dist/pine-core/{p-39cb879d.entry.js.map → p-ccf46b90.entry.js.map} +0 -0
  597. /package/dist/pine-core/{p-867ef2f1.entry.js.map → p-ceca2cb1.entry.js.map} +0 -0
  598. /package/dist/pine-core/{p-9558fa60.entry.js.map → p-d045b245.entry.js.map} +0 -0
  599. /package/dist/pine-core/{p-ea721a45.entry.js.map → p-d0eebd6d.entry.js.map} +0 -0
  600. /package/dist/pine-core/{p-599a5903.system.entry.js.map → p-d1313dd6.system.entry.js.map} +0 -0
  601. /package/dist/pine-core/{p-3e2fc38f.entry.js.map → p-d4844049.entry.js.map} +0 -0
  602. /package/dist/pine-core/{p-af5bf21d.entry.js.map → p-e0f21c22.entry.js.map} +0 -0
  603. /package/dist/pine-core/{p-9b2cd9fc.entry.js.map → p-e463b9d3.entry.js.map} +0 -0
  604. /package/dist/pine-core/{p-5107c129.entry.js.map → p-e73b5859.entry.js.map} +0 -0
  605. /package/dist/pine-core/{p-9c0e22d4.entry.js.map → p-f74bd712.entry.js.map} +0 -0
  606. /package/dist/pine-core/{p-d6139188.system.entry.js.map → p-fa21e054.system.entry.js.map} +0 -0
  607. /package/dist/pine-core/{p-64c6c4a0.entry.js.map → p-fa51ae5d.entry.js.map} +0 -0
@@ -1,5 +1,5 @@
1
1
  import { Host, h } from "@stencil/core";
2
- import { messageId, exposeTypeProperty } from "../../utils/form";
2
+ import { isSpecTest, messageId, exposeTypeProperty } from "../../utils/form";
3
3
  import { danger, enlarge } from "@pine-ds/icons/icons";
4
4
  /**
5
5
  * @slot action - Content to be displayed in the label area, typically for help icons or links
@@ -161,6 +161,8 @@ export class PdsSelect {
161
161
  * Updates the form value using ElementInternals API
162
162
  */
163
163
  updateFormValue() {
164
+ if (isSpecTest())
165
+ return;
164
166
  if (this.internals && this.internals.setFormValue) {
165
167
  const value = this.value;
166
168
  // Handle multi-select arrays by converting to FormData or comma-separated string
@@ -221,7 +223,7 @@ export class PdsSelect {
221
223
  }
222
224
  render() {
223
225
  const hasAction = this.el.querySelector('[slot="action"]') !== null;
224
- return (h(Host, { key: 'd36bddf20910ae21ba2209bbf7e3f13b1ce9c3bf', "aria-disabled": this.disabled ? 'true' : null, class: this.classNames(), "has-action": hasAction && !this.hideLabel ? 'true' : null }, h("div", { key: '72fe6ee352834fbd6e8f5f9d9e96b1be232f2988', class: "pds-select" }, !this.hideLabel && (h("div", { key: 'c2894f7ec00402425f74f1145d449da13d870161', class: "pds-select__label-wrapper" }, h("label", { key: '4f6277c3f7b40f3d52995231cb49824e58ebae1b', htmlFor: this.componentId }, h("span", { key: 'f1b0cf90091843c1a994699263905f811888d4bd', class: this.hideLabel ? 'visually-hidden' : '' }, this.label)), hasAction && this.renderAction())), h("select", { key: '727c1644e8ea5afc194e33e29e9730d6b08c3784', "aria-label": this.hideLabel ? this.label : undefined, autocomplete: this.autocomplete || undefined, class: "pds-select__field", disabled: this.disabled, id: this.componentId, multiple: this.multiple, name: this.name, onBlur: this.onBlur, onChange: this.onSelectUpdate, onFocus: this.onFocus, onKeyDown: this.onKeyDown, part: "select", required: this.required, ref: (el) => (this.selectEl = el) }), h("div", { key: 'd7c0c3f3b765b13c6dc34a9c5c13bbcfd081a274', "aria-hidden": "true", class: "hidden", ref: (el) => (this.slotContainer = el) }, h("slot", { key: '2305afcacb082c0d5faca8b77295919f8d9c9e0b', onSlotchange: this.handleSlotChange })), this.renderMessages(), !this.multiple && h("pds-icon", { key: '4a1d6ced0ffc14ae17763d116a85324e5a6c7ce5', class: "pds-select__select-icon", icon: enlarge }))));
226
+ return (h(Host, { key: '28292440973cbb60c63a296415a617e05fc9c5ce', "aria-disabled": this.disabled ? 'true' : null, class: this.classNames(), "has-action": hasAction && !this.hideLabel ? 'true' : null }, h("div", { key: '4a0f255ecc75c9fcedfc933c0a728d26918d9a9c', class: "pds-select" }, !this.hideLabel && (h("div", { key: '1f0b2a9ccf4ce2b79d5bb4dd40ff076b415bc6ac', class: "pds-select__label-wrapper" }, h("label", { key: '9e30b1b0266981f73f0821c05e833cb66a3caf3c', htmlFor: this.componentId }, h("span", { key: '7790be41907be6c5e3b460aa84b7ea54773cc14d', class: this.hideLabel ? 'visually-hidden' : '' }, this.label)), hasAction && this.renderAction())), h("select", { key: 'd66b39ee412bfbf3c6dfff722cb061f24ba82df6', "aria-label": this.hideLabel ? this.label : undefined, autocomplete: this.autocomplete || undefined, class: "pds-select__field", disabled: this.disabled, id: this.componentId, multiple: this.multiple, name: this.name, onBlur: this.onBlur, onChange: this.onSelectUpdate, onFocus: this.onFocus, onKeyDown: this.onKeyDown, part: "select", required: this.required, ref: (el) => (this.selectEl = el) }), h("div", { key: 'daf4846494666ebade54249c8d925423e71e7d33', "aria-hidden": "true", class: "hidden", ref: (el) => (this.slotContainer = el) }, h("slot", { key: '545f421fd2679d4bb6ee34658f7dd4089ece4f81', onSlotchange: this.handleSlotChange })), this.renderMessages(), !this.multiple && h("pds-icon", { key: '0b3bcd3ceee6e6b2ab24b52f16f6cbd89ae88322', class: "pds-select__select-icon", icon: enlarge }))));
225
227
  }
226
228
  static get is() { return "pds-select"; }
227
229
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- {"version":3,"file":"pds-select.js","sourceRoot":"","sources":["../../../../src/components/pds-select/pds-select.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC9F,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEvD;;GAEG;AAOH,MAAM,OAAO,SAAS;IANtB;QAWU,UAAK,GAAqC,YAAY,CAAC;QAc/D;;;W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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, Host, h, Prop, Watch } from '@stencil/core';\nimport { messageId, exposeTypeProperty } from '../../utils/form';\nimport { danger, enlarge } from '@pine-ds/icons/icons';\n\n/**\n * @slot action - Content to be displayed in the label area, typically for help icons or links\n */\n@Component({\n tag: 'pds-select',\n styleUrls: ['pds-select.tokens.scss', '../../global/styles/utils/label.scss', 'pds-select.scss'],\n shadow: true,\n formAssociated: true,\n})\nexport class PdsSelect {\n\n private selectEl!: HTMLSelectElement;\n private slotContainer!: HTMLDivElement;\n private internals?: ElementInternals;\n private _type: 'select-one' | 'select-multiple' = 'select-one';\n\n @Element() el: HTMLPdsSelectElement;\n\n /**\n * Specifies if and how the browser provides `autocomplete` assistance for the field.\n */\n @Prop() autocomplete: string;\n\n /**\n * A unique identifier used for the underlying component `id` attribute.\n */\n @Prop() componentId!: string;\n\n /**\n * Indicates whether or not the select field is disabled.\n * @defaultValue false\n */\n @Prop() disabled = false\n\n /**\n * Displays error message text describing an invalid state.\n */\n @Prop() errorMessage: string;\n\n /**\n * Visually hides the label text for instances where only the select should be displayed. Label remains accessible to assistive technology such as screen readers.\n * Note: When true, the action slot is also hidden to maintain a minimal UI.\n */\n @Prop() hideLabel: boolean;\n\n /**\n * Displays helper message text below select.\n */\n @Prop() helperMessage: string;\n\n /**\n * Determines whether or not the select is invalid.\n */\n @Prop() invalid?: boolean;\n\n /**\n * Text to be displayed as the select label.\n */\n @Prop() label?: string;\n\n /**\n * Indicates whether multiple options can be selected.\n * @defaultValue false\n */\n @Prop() multiple = false;\n\n /**\n * Specifies the name. Submitted with the form name/value pair.\n */\n @Prop() name!: string;\n\n /**\n * Indicates whether or not the select field is required.\n * @defaultValue false\n */\n @Prop() required = false;\n\n /**\n * Applies highlight styling to the select field.\n */\n @Prop({ reflect: true }) highlight?: boolean;\n\n /**\n * The value(s) of the selected option(s).\n *\n */\n @Prop({ mutable: true }) value?: string | string[];\n\n\n /**\n * Emitted when the select value changes.\n */\n @Event() pdsSelectChange: EventEmitter<InputEvent>;\n\n /**\n * Emitted when the select loses focus.\n */\n @Event() pdsBlur!: EventEmitter<FocusEvent>;\n\n /**\n * Emitted when the select gains focus.\n */\n @Event() pdsFocus!: EventEmitter<FocusEvent>;\n\n /**\n * Emitted when a key is pressed down in the select.\n */\n @Event() pdsKeyDown!: EventEmitter<KeyboardEvent>;\n\n @Watch('value')\n /**\n * Handles the change in the value of the select component.\n * This method is called whenever the value of the select component changes.\n * It updates the selected option accordingly.\n */\n valueChanged() {\n this.updateSelectedOption();\n this.updateFormValue();\n }\n\n @Watch('multiple')\n /**\n * Updates the type property when multiple changes to match native select behavior.\n */\n multipleChanged() {\n this.updateType();\n }\n\n private updateType() {\n this._type = this.multiple ? 'select-multiple' : 'select-one';\n }\n\n connectedCallback() {\n // Initialize ElementInternals for form association (only once per element instance)\n if (this.el.attachInternals && !this.internals) {\n this.internals = this.el.attachInternals();\n }\n\n // Expose type property on the element instance to match native form element behavior\n exposeTypeProperty(this.el, () => this._type);\n }\n\n componentWillLoad() {\n // Set initial type based on multiple prop\n this.updateType();\n this.updateSelectedOption();\n }\n\n componentDidLoad() {\n // Set initial form value\n this.updateFormValue();\n }\n\n /**\n * Updates the selected option in the select element based on the current value.\n *\n * This method iterates through all the options of the select element and sets the\n * 'selected' attribute on the option that matches the current value. If an option\n * does not match the current value, the 'selected' attribute is removed.\n *\n * @private\n * @returns {void}\n */\n private updateSelectedOption() {\n if (this.selectEl) {\n const options = this.selectEl.options;\n\n // Update the selected attribute for all options.\n Array.from(options).map((option: HTMLOptionElement) => {\n if (Array.isArray(this.value)) {\n option.selected = this.value.includes(option.value);\n } else {\n option.selected = this.value === option.value;\n }\n });\n };\n }\n\n /**\n * Emits an event on input change.\n */\n private onSelectUpdate = (e: Event) => {\n const target = e.target as HTMLSelectElement\n\n const values = Array.from(target.options)\n .filter((option) => ( option.selected))\n .map((option) => ( option.value));\n\n if (values.length === 1 && !this.multiple) {\n this.value = values[0];\n } else {\n this.value = values;\n }\n\n this.pdsSelectChange.emit(e as InputEvent);\n };\n\n private onBlur = (ev: FocusEvent) => {\n this.pdsBlur.emit(ev);\n };\n\n private onFocus = (ev: FocusEvent) => {\n this.pdsFocus.emit(ev);\n };\n\n private onKeyDown = (ev: KeyboardEvent) => {\n this.pdsKeyDown.emit(ev);\n };\n\n /**\n * Handles the change event for the slot element.\n * This method is triggered when the slot content changes.\n * It updates the inner HTML of the select element by cloning and appending\n * the assigned <option> elements from the slot.\n */\n private handleSlotChange = () => {\n const slot = this.slotContainer.querySelector('slot') as HTMLSlotElement;\n\n this.selectEl.innerHTML = '';\n const assignedElements = slot.assignedElements({ flatten: true }) as (HTMLOptionElement | HTMLOptGroupElement)[];\n\n assignedElements.forEach((item) => {\n if ( ['OPTION', 'OPTGROUP'].includes(item.tagName)) {\n const clonedItem = item.cloneNode(true) as HTMLOptionElement | HTMLOptGroupElement;\n if (clonedItem.tagName === 'OPTION' && (clonedItem as HTMLOptionElement).value === this.value) {\n (clonedItem as HTMLOptionElement).selected = true;\n }\n this.selectEl.appendChild(clonedItem);\n }\n });\n\n this.updateSelectedOption();\n };\n\n private getHelperMessage() {\n return this.helperMessage && (\n <p class=\"pds-select__helper-message\" id={messageId(this.componentId, 'helper')}>\n {this.helperMessage}\n </p>\n );\n }\n\n private getErrorMessage() {\n return this.errorMessage && (\n <p class=\"pds-select__error-message\" id={messageId(this.componentId, 'error')} aria-live=\"assertive\">\n <pds-icon icon={danger} size=\"small\"></pds-icon>\n {this.errorMessage}\n </p>\n );\n }\n\n private renderMessages() {\n if (!this.helperMessage && !this.errorMessage) return null;\n\n return (\n <div class=\"pds-select__message\">\n {this.getHelperMessage()}\n {this.getErrorMessage()}\n </div>\n );\n }\n\n private classNames() {\n const classNames = [];\n\n if (this.invalid) { classNames.push('is-invalid'); }\n if (this.disabled) { classNames.push('is-disabled'); }\n\n return classNames.join(' ');\n }\n\n private renderAction() {\n const hasAction = this.el.querySelector('[slot=\"action\"]') !== null;\n if (hasAction) {\n return (\n <div class=\"pds-select__action\" part=\"action\">\n <slot name=\"action\"></slot>\n </div>\n );\n }\n return null;\n }\n\n /**\n * Updates the form value using ElementInternals API\n */\n private updateFormValue() {\n if (this.internals && this.internals.setFormValue) {\n const value = this.value;\n\n // Handle multi-select arrays by converting to FormData or comma-separated string\n if (Array.isArray(value)) {\n if (value.length > 1) {\n // For multiple values, create FormData with multiple entries\n const formData = new FormData();\n value.forEach(val => formData.append(this.name || '', val));\n this.internals.setFormValue(formData);\n } else {\n // Single value in array, use the string value\n this.internals.setFormValue(value[0] || null);\n }\n } else {\n // Single string value\n this.internals.setFormValue(value || null);\n }\n\n // Set validity based on native select validation\n if (this.selectEl && this.internals && this.internals.setValidity) {\n this.internals.setValidity(\n this.selectEl.validity,\n this.selectEl.validationMessage,\n this.selectEl\n );\n }\n }\n }\n\n /**\n * Form Associated Custom Elements API: Called when the form is reset\n */\n formResetCallback() {\n this.value = '';\n this.updateFormValue();\n }\n\n /**\n * Form Associated Custom Elements API: Called when the form is disabled\n */\n formDisabledCallback(disabled: boolean) {\n this.disabled = disabled;\n }\n\n /**\n * Form Associated Custom Elements API: Called to restore form state\n */\n formStateRestoreCallback(state: string | FormData | null) {\n if (typeof state === 'string') {\n this.value = state;\n } else if (state instanceof FormData && this.name) {\n // Extract value(s) from FormData using the select's name\n const values = state.getAll(this.name);\n if (values.length > 1) {\n // Multi-select: convert to string array\n this.value = values.filter(v => typeof v === 'string') as string[];\n } else if (values.length === 1 && typeof values[0] === 'string') {\n // Single select: use string value\n this.value = values[0];\n }\n }\n }\n\n render() {\n const hasAction = this.el.querySelector('[slot=\"action\"]') !== null;\n\n return (\n <Host aria-disabled={this.disabled ? 'true' : null} class={this.classNames()} has-action={hasAction && !this.hideLabel ? 'true' : null}>\n <div class=\"pds-select\">\n {!this.hideLabel && (\n <div class=\"pds-select__label-wrapper\">\n <label htmlFor={this.componentId}>\n <span class={this.hideLabel ? 'visually-hidden' : ''}>\n {this.label}\n </span>\n </label>\n {hasAction && this.renderAction()}\n </div>\n )}\n <select\n aria-label={this.hideLabel ? this.label : undefined}\n autocomplete={this.autocomplete || undefined}\n class=\"pds-select__field\"\n disabled={this.disabled}\n id={this.componentId}\n multiple={this.multiple}\n name={this.name}\n onBlur={this.onBlur}\n onChange={this.onSelectUpdate}\n onFocus={this.onFocus}\n onKeyDown={this.onKeyDown}\n part=\"select\"\n required={this.required}\n ref={(el) => (this.selectEl = el as HTMLSelectElement)}\n ></select>\n <div aria-hidden=\"true\" class=\"hidden\" ref={(el) => (this.slotContainer = el)}>\n <slot onSlotchange={this.handleSlotChange}></slot>\n </div>\n {this.renderMessages()}\n {!this.multiple && <pds-icon class=\"pds-select__select-icon\" icon={enlarge} />}\n </div>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"pds-select.js","sourceRoot":"","sources":["../../../../src/components/pds-select/pds-select.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC9F,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC7E,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEvD;;GAEG;AAOH,MAAM,OAAO,SAAS;IANtB;QAWU,UAAK,GAAqC,YAAY,CAAC;QAc/D;;;WAGG;QACK,aAAQ,GAAG,KAAK,CAAA;QA4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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, Host, h, Prop, Watch } from '@stencil/core';\nimport { isSpecTest, messageId, exposeTypeProperty } from '../../utils/form';\nimport { danger, enlarge } from '@pine-ds/icons/icons';\n\n/**\n * @slot action - Content to be displayed in the label area, typically for help icons or links\n */\n@Component({\n tag: 'pds-select',\n styleUrls: ['pds-select.tokens.scss', '../../global/styles/utils/label.scss', 'pds-select.scss'],\n shadow: true,\n formAssociated: true,\n})\nexport class PdsSelect {\n\n private selectEl!: HTMLSelectElement;\n private slotContainer!: HTMLDivElement;\n private internals?: ElementInternals;\n private _type: 'select-one' | 'select-multiple' = 'select-one';\n\n @Element() el: HTMLPdsSelectElement;\n\n /**\n * Specifies if and how the browser provides `autocomplete` assistance for the field.\n */\n @Prop() autocomplete: string;\n\n /**\n * A unique identifier used for the underlying component `id` attribute.\n */\n @Prop() componentId!: string;\n\n /**\n * Indicates whether or not the select field is disabled.\n * @defaultValue false\n */\n @Prop() disabled = false\n\n /**\n * Displays error message text describing an invalid state.\n */\n @Prop() errorMessage: string;\n\n /**\n * Visually hides the label text for instances where only the select should be displayed. Label remains accessible to assistive technology such as screen readers.\n * Note: When true, the action slot is also hidden to maintain a minimal UI.\n */\n @Prop() hideLabel: boolean;\n\n /**\n * Displays helper message text below select.\n */\n @Prop() helperMessage: string;\n\n /**\n * Determines whether or not the select is invalid.\n */\n @Prop() invalid?: boolean;\n\n /**\n * Text to be displayed as the select label.\n */\n @Prop() label?: string;\n\n /**\n * Indicates whether multiple options can be selected.\n * @defaultValue false\n */\n @Prop() multiple = false;\n\n /**\n * Specifies the name. Submitted with the form name/value pair.\n */\n @Prop() name!: string;\n\n /**\n * Indicates whether or not the select field is required.\n * @defaultValue false\n */\n @Prop() required = false;\n\n /**\n * Applies highlight styling to the select field.\n */\n @Prop({ reflect: true }) highlight?: boolean;\n\n /**\n * The value(s) of the selected option(s).\n *\n */\n @Prop({ mutable: true }) value?: string | string[];\n\n\n /**\n * Emitted when the select value changes.\n */\n @Event() pdsSelectChange: EventEmitter<InputEvent>;\n\n /**\n * Emitted when the select loses focus.\n */\n @Event() pdsBlur!: EventEmitter<FocusEvent>;\n\n /**\n * Emitted when the select gains focus.\n */\n @Event() pdsFocus!: EventEmitter<FocusEvent>;\n\n /**\n * Emitted when a key is pressed down in the select.\n */\n @Event() pdsKeyDown!: EventEmitter<KeyboardEvent>;\n\n @Watch('value')\n /**\n * Handles the change in the value of the select component.\n * This method is called whenever the value of the select component changes.\n * It updates the selected option accordingly.\n */\n valueChanged() {\n this.updateSelectedOption();\n this.updateFormValue();\n }\n\n @Watch('multiple')\n /**\n * Updates the type property when multiple changes to match native select behavior.\n */\n multipleChanged() {\n this.updateType();\n }\n\n private updateType() {\n this._type = this.multiple ? 'select-multiple' : 'select-one';\n }\n\n connectedCallback() {\n // Initialize ElementInternals for form association (only once per element instance)\n if (this.el.attachInternals && !this.internals) {\n this.internals = this.el.attachInternals();\n }\n\n // Expose type property on the element instance to match native form element behavior\n exposeTypeProperty(this.el, () => this._type);\n }\n\n componentWillLoad() {\n // Set initial type based on multiple prop\n this.updateType();\n this.updateSelectedOption();\n }\n\n componentDidLoad() {\n // Set initial form value\n this.updateFormValue();\n }\n\n /**\n * Updates the selected option in the select element based on the current value.\n *\n * This method iterates through all the options of the select element and sets the\n * 'selected' attribute on the option that matches the current value. If an option\n * does not match the current value, the 'selected' attribute is removed.\n *\n * @private\n * @returns {void}\n */\n private updateSelectedOption() {\n if (this.selectEl) {\n const options = this.selectEl.options;\n\n // Update the selected attribute for all options.\n Array.from(options).map((option: HTMLOptionElement) => {\n if (Array.isArray(this.value)) {\n option.selected = this.value.includes(option.value);\n } else {\n option.selected = this.value === option.value;\n }\n });\n };\n }\n\n /**\n * Emits an event on input change.\n */\n private onSelectUpdate = (e: Event) => {\n const target = e.target as HTMLSelectElement\n\n const values = Array.from(target.options)\n .filter((option) => ( option.selected))\n .map((option) => ( option.value));\n\n if (values.length === 1 && !this.multiple) {\n this.value = values[0];\n } else {\n this.value = values;\n }\n\n this.pdsSelectChange.emit(e as InputEvent);\n };\n\n private onBlur = (ev: FocusEvent) => {\n this.pdsBlur.emit(ev);\n };\n\n private onFocus = (ev: FocusEvent) => {\n this.pdsFocus.emit(ev);\n };\n\n private onKeyDown = (ev: KeyboardEvent) => {\n this.pdsKeyDown.emit(ev);\n };\n\n /**\n * Handles the change event for the slot element.\n * This method is triggered when the slot content changes.\n * It updates the inner HTML of the select element by cloning and appending\n * the assigned <option> elements from the slot.\n */\n private handleSlotChange = () => {\n const slot = this.slotContainer.querySelector('slot') as HTMLSlotElement;\n\n this.selectEl.innerHTML = '';\n const assignedElements = slot.assignedElements({ flatten: true }) as (HTMLOptionElement | HTMLOptGroupElement)[];\n\n assignedElements.forEach((item) => {\n if ( ['OPTION', 'OPTGROUP'].includes(item.tagName)) {\n const clonedItem = item.cloneNode(true) as HTMLOptionElement | HTMLOptGroupElement;\n if (clonedItem.tagName === 'OPTION' && (clonedItem as HTMLOptionElement).value === this.value) {\n (clonedItem as HTMLOptionElement).selected = true;\n }\n this.selectEl.appendChild(clonedItem);\n }\n });\n\n this.updateSelectedOption();\n };\n\n private getHelperMessage() {\n return this.helperMessage && (\n <p class=\"pds-select__helper-message\" id={messageId(this.componentId, 'helper')}>\n {this.helperMessage}\n </p>\n );\n }\n\n private getErrorMessage() {\n return this.errorMessage && (\n <p class=\"pds-select__error-message\" id={messageId(this.componentId, 'error')} aria-live=\"assertive\">\n <pds-icon icon={danger} size=\"small\"></pds-icon>\n {this.errorMessage}\n </p>\n );\n }\n\n private renderMessages() {\n if (!this.helperMessage && !this.errorMessage) return null;\n\n return (\n <div class=\"pds-select__message\">\n {this.getHelperMessage()}\n {this.getErrorMessage()}\n </div>\n );\n }\n\n private classNames() {\n const classNames = [];\n\n if (this.invalid) { classNames.push('is-invalid'); }\n if (this.disabled) { classNames.push('is-disabled'); }\n\n return classNames.join(' ');\n }\n\n private renderAction() {\n const hasAction = this.el.querySelector('[slot=\"action\"]') !== null;\n if (hasAction) {\n return (\n <div class=\"pds-select__action\" part=\"action\">\n <slot name=\"action\"></slot>\n </div>\n );\n }\n return null;\n }\n\n /**\n * Updates the form value using ElementInternals API\n */\n private updateFormValue() {\n if (isSpecTest()) return;\n\n if (this.internals && this.internals.setFormValue) {\n const value = this.value;\n\n // Handle multi-select arrays by converting to FormData or comma-separated string\n if (Array.isArray(value)) {\n if (value.length > 1) {\n // For multiple values, create FormData with multiple entries\n const formData = new FormData();\n value.forEach(val => formData.append(this.name || '', val));\n this.internals.setFormValue(formData);\n } else {\n // Single value in array, use the string value\n this.internals.setFormValue(value[0] || null);\n }\n } else {\n // Single string value\n this.internals.setFormValue(value || null);\n }\n\n // Set validity based on native select validation\n if (this.selectEl && this.internals && this.internals.setValidity) {\n this.internals.setValidity(\n this.selectEl.validity,\n this.selectEl.validationMessage,\n this.selectEl\n );\n }\n }\n }\n\n /**\n * Form Associated Custom Elements API: Called when the form is reset\n */\n formResetCallback() {\n this.value = '';\n this.updateFormValue();\n }\n\n /**\n * Form Associated Custom Elements API: Called when the form is disabled\n */\n formDisabledCallback(disabled: boolean) {\n this.disabled = disabled;\n }\n\n /**\n * Form Associated Custom Elements API: Called to restore form state\n */\n formStateRestoreCallback(state: string | FormData | null) {\n if (typeof state === 'string') {\n this.value = state;\n } else if (state instanceof FormData && this.name) {\n // Extract value(s) from FormData using the select's name\n const values = state.getAll(this.name);\n if (values.length > 1) {\n // Multi-select: convert to string array\n this.value = values.filter(v => typeof v === 'string') as string[];\n } else if (values.length === 1 && typeof values[0] === 'string') {\n // Single select: use string value\n this.value = values[0];\n }\n }\n }\n\n render() {\n const hasAction = this.el.querySelector('[slot=\"action\"]') !== null;\n\n return (\n <Host aria-disabled={this.disabled ? 'true' : null} class={this.classNames()} has-action={hasAction && !this.hideLabel ? 'true' : null}>\n <div class=\"pds-select\">\n {!this.hideLabel && (\n <div class=\"pds-select__label-wrapper\">\n <label htmlFor={this.componentId}>\n <span class={this.hideLabel ? 'visually-hidden' : ''}>\n {this.label}\n </span>\n </label>\n {hasAction && this.renderAction()}\n </div>\n )}\n <select\n aria-label={this.hideLabel ? this.label : undefined}\n autocomplete={this.autocomplete || undefined}\n class=\"pds-select__field\"\n disabled={this.disabled}\n id={this.componentId}\n multiple={this.multiple}\n name={this.name}\n onBlur={this.onBlur}\n onChange={this.onSelectUpdate}\n onFocus={this.onFocus}\n onKeyDown={this.onKeyDown}\n part=\"select\"\n required={this.required}\n ref={(el) => (this.selectEl = el as HTMLSelectElement)}\n ></select>\n <div aria-hidden=\"true\" class=\"hidden\" ref={(el) => (this.slotContainer = el)}>\n <slot onSlotchange={this.handleSlotChange}></slot>\n </div>\n {this.renderMessages()}\n {!this.multiple && <pds-icon class=\"pds-select__select-icon\" icon={enlarge} />}\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -32,11 +32,21 @@
32
32
  .pds-sortable--handle-type-handle :host(.pds-sortable-item) .pds-sortable-item__handle {
33
33
  cursor: grab;
34
34
  }
35
+ .pds-sortable--disabled :host(.pds-sortable-item) {
36
+ cursor: not-allowed;
37
+ opacity: 0.5;
38
+ }
39
+ .pds-sortable--disabled :host(.pds-sortable-item) .pds-sortable-item__handle {
40
+ cursor: not-allowed;
41
+ }
35
42
 
36
- :host(.pds-sortable-item):hover {
43
+ .pds-sortable--disabled :host(.pds-sortable-item):hover {
44
+ background-color: transparent;
45
+ }
46
+ .pds-sortable:not(.pds-sortable--disabled) :host(.pds-sortable-item):hover {
37
47
  background-color: var(--pine-color-background-container-hover);
38
48
  }
39
- :host(.pds-sortable-item):hover pds-icon {
49
+ .pds-sortable:not(.pds-sortable--disabled) :host(.pds-sortable-item):hover pds-icon {
40
50
  color: var(--pine-color-info);
41
51
  }
42
52
 
@@ -8,7 +8,12 @@ export class PdsSortable {
8
8
  */
9
9
  this.border = false;
10
10
  /**
11
- * Deternines whether `sortable` items should be divided with border.
11
+ * Determines whether or not the sortable is disabled.
12
+ * @defaultValue false
13
+ */
14
+ this.disabled = false;
15
+ /**
16
+ * Determines whether `sortable` items should be divided with border.
12
17
  */
13
18
  this.dividers = false;
14
19
  /**
@@ -16,11 +21,18 @@ export class PdsSortable {
16
21
  */
17
22
  this.handleType = 'row';
18
23
  }
24
+ handleDisabledChange() {
25
+ var _a;
26
+ (_a = this.sortableInstance) === null || _a === void 0 ? void 0 : _a.option('disabled', this.disabled);
27
+ }
19
28
  classNames() {
20
29
  const classNames = ['pds-sortable'];
21
30
  if (this.border) {
22
31
  classNames.push('pds-sortable--bordered');
23
32
  }
33
+ if (this.disabled) {
34
+ classNames.push('pds-sortable--disabled');
35
+ }
24
36
  if (this.dividers) {
25
37
  classNames.push('pds-sortable--divided');
26
38
  }
@@ -32,6 +44,7 @@ export class PdsSortable {
32
44
  componentDidLoad() {
33
45
  let sortableOptions = {
34
46
  animation: 150,
47
+ disabled: this.disabled,
35
48
  ghostClass: 'pds-sortable-item--ghost',
36
49
  dragClass: 'pds-sortable-item--drag',
37
50
  onEnd: (evt) => {
@@ -41,10 +54,10 @@ export class PdsSortable {
41
54
  if (this.handleType === 'handle') {
42
55
  sortableOptions = Object.assign(Object.assign({}, sortableOptions), { handle: '.pds-sortable-item__handle' });
43
56
  }
44
- Sortable.create(this.el, sortableOptions);
57
+ this.sortableInstance = Sortable.create(this.el, sortableOptions);
45
58
  }
46
59
  render() {
47
- return (h(Host, { key: '98083e17bb18c5adde8b4c0c387daa28ca2bda91', class: this.classNames(), id: this.componentId }, h("slot", { key: '4ffcd0844153824c3509e42f5636c5851dc7fcbe' })));
60
+ return (h(Host, { key: '562bfb1ecea0b3a3f246b2e277b71f70d14b854c', class: this.classNames(), id: this.componentId }, h("slot", { key: 'a1ff894a9cd6049e532d2fa744429cec6d97e280' })));
48
61
  }
49
62
  static get is() { return "pds-sortable"; }
50
63
  static get encapsulation() { return "scoped"; }
@@ -83,6 +96,29 @@ export class PdsSortable {
83
96
  "attribute": "border",
84
97
  "defaultValue": "false"
85
98
  },
99
+ "disabled": {
100
+ "type": "boolean",
101
+ "mutable": false,
102
+ "complexType": {
103
+ "original": "boolean",
104
+ "resolved": "boolean",
105
+ "references": {}
106
+ },
107
+ "required": false,
108
+ "optional": false,
109
+ "docs": {
110
+ "tags": [{
111
+ "name": "defaultValue",
112
+ "text": "false"
113
+ }],
114
+ "text": "Determines whether or not the sortable is disabled."
115
+ },
116
+ "getter": false,
117
+ "setter": false,
118
+ "reflect": true,
119
+ "attribute": "disabled",
120
+ "defaultValue": "false"
121
+ },
86
122
  "componentId": {
87
123
  "type": "string",
88
124
  "mutable": false,
@@ -114,7 +150,7 @@ export class PdsSortable {
114
150
  "optional": false,
115
151
  "docs": {
116
152
  "tags": [],
117
- "text": "Deternines whether `sortable` items should be divided with border."
153
+ "text": "Determines whether `sortable` items should be divided with border."
118
154
  },
119
155
  "getter": false,
120
156
  "setter": false,
@@ -169,5 +205,11 @@ export class PdsSortable {
169
205
  }];
170
206
  }
171
207
  static get elementRef() { return "el"; }
208
+ static get watchers() {
209
+ return [{
210
+ "propName": "disabled",
211
+ "methodName": "handleDisabledChange"
212
+ }];
213
+ }
172
214
  }
173
215
  //# sourceMappingURL=pds-sortable.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pds-sortable.js","sourceRoot":"","sources":["../../../../src/components/pds-sortable/pds-sortable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAGvF,OAAO,QAAQ,MAAM,YAAY,CA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AW;YAClD,8DAAa,CACR,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, Host, h, Prop } from '@stencil/core';\nimport type { SortableEvent } from 'sortablejs';\nimport { SortableType } from './sortable-interface';\nimport Sortable from 'sortablejs';\n\n@Component({\n tag: 'pds-sortable',\n styleUrls: ['pds-sortable.scss'],\n scoped: true,\n})\nexport class PdsSortable {\n @Element() el: HTMLPdsSortableElement;\n\n /**\n * Event emitted when a sortable item is moved.\n */\n @Event() pdsSortableItemMoved: EventEmitter<SortableEvent>;\n\n /**\n * Determines whether `sortable` should have a border.\n * @defaultValue false\n */\n @Prop({ reflect: true }) border = false;\n\n /**\n * A unique identifier used for the sortable container `id` attribute.\n */\n @Prop() componentId!: string;\n\n /**\n * Deternines whether `sortable` items should be divided with border.\n */\n @Prop({ reflect: true }) dividers = false;\n\n /**\n * Determines the grabbable area for the `pds-sortable-item`.\n */\n @Prop() handleType: 'handle' | 'row' = 'row';\n\n private classNames() {\n const classNames = ['pds-sortable'];\n\n if (this.border) {\n classNames.push('pds-sortable--bordered');\n }\n\n if (this.dividers) {\n classNames.push('pds-sortable--divided');\n }\n\n if (this.handleType !== undefined) {\n classNames.push(`pds-sortable--handle-type-${this.handleType}`);\n }\n\n return classNames.join(' ');\n }\n\n componentDidLoad() {\n\n let sortableOptions: SortableType = {\n animation: 150,\n ghostClass: 'pds-sortable-item--ghost',\n dragClass: 'pds-sortable-item--drag',\n onEnd: (evt) => {\n this.pdsSortableItemMoved.emit(evt);\n },\n };\n\n if (this.handleType === 'handle') {\n sortableOptions = {\n ...sortableOptions,\n handle: '.pds-sortable-item__handle',\n };\n }\n\n Sortable.create(this.el as HTMLElement, sortableOptions);\n }\n\n render() {\n return (\n <Host class={this.classNames()} id={this.componentId}>\n <slot></slot>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"pds-sortable.js","sourceRoot":"","sources":["../../../../src/components/pds-sortable/pds-sortable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAG9F,OAAO,QAAQ,MAAM,YAAY,CAAC;AAOlC,MAAM,OAAO,WAAW;IALxB;QAaE;;;WAGG;QACsB,WAAM,GAAG,KAAK,CAAC;QAExC;;;WAGG;QACsB,aAAQ,GAAG,KAAK,CAAC;QAO1C;;WAEG;QACsB,aAAQ,GAAG,KAAK,CAAC;QAE1C;;WAEG;QACK,eAAU,GAAqB,KAAK,CAAC;KA4D9C;IAvDC,oBAAoB;;QAClB,MAAA,IAAI,CAAC,gBAAgB,0CAAE,MAAM,CAAC,UAAU,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC3D,CAAC;IAEO,UAAU;QAChB,MAAM,UAAU,GAAG,CAAC,cAAc,CAAC,CAAC;QAEpC,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,UAAU,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;QAC5C,CAAC;QAED,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClB,UAAU,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;QAC5C,CAAC;QAED,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClB,UAAU,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC;QAC3C,CAAC;QAED,IAAI,IAAI,CAAC,UAAU,KAAK,SAAS,EAAE,CAAC;YAClC,UAAU,CAAC,IAAI,CAAC,6BAA6B,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC;QAClE,CAAC;QAED,OAAO,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;IAED,gBAAgB;QAEd,IAAI,eAAe,GAAiB;YAClC,SAAS,EAAE,GAAG;YACd,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,UAAU,EAAE,0BAA0B;YACtC,SAAS,EAAE,yBAAyB;YACpC,KAAK,EAAE,CAAC,GAAG,EAAE,EAAE;gBACb,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YACtC,CAAC;SACF,CAAC;QAEF,IAAI,IAAI,CAAC,UAAU,KAAK,QAAQ,EAAE,CAAC;YACjC,eAAe,mCACV,eAAe,KAClB,MAAM,EAAE,4BAA4B,GACrC,CAAC;QACJ,CAAC;QAED,IAAI,CAAC,gBAAgB,GAAG,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,EAAiB,EAAE,eAAe,CAAC,CAAC;IACnF,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDAAC,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,EAAE,EAAE,EAAE,IAAI,CAAC,WAAW;YAClD,8DAAa,CACR,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, Host, h, Prop, Watch } from '@stencil/core';\nimport type { SortableEvent } from 'sortablejs';\nimport { SortableType } from './sortable-interface';\nimport Sortable from 'sortablejs';\n\n@Component({\n tag: 'pds-sortable',\n styleUrls: ['pds-sortable.scss'],\n scoped: true,\n})\nexport class PdsSortable {\n @Element() el: HTMLPdsSortableElement;\n\n /**\n * Event emitted when a sortable item is moved.\n */\n @Event() pdsSortableItemMoved: EventEmitter<SortableEvent>;\n\n /**\n * Determines whether `sortable` should have a border.\n * @defaultValue false\n */\n @Prop({ reflect: true }) border = false;\n\n /**\n * Determines whether or not the sortable is disabled.\n * @defaultValue false\n */\n @Prop({ reflect: true }) disabled = false;\n\n /**\n * A unique identifier used for the sortable container `id` attribute.\n */\n @Prop() componentId!: string;\n\n /**\n * Determines whether `sortable` items should be divided with border.\n */\n @Prop({ reflect: true }) dividers = false;\n\n /**\n * Determines the grabbable area for the `pds-sortable-item`.\n */\n @Prop() handleType: 'handle' | 'row' = 'row';\n\n private sortableInstance: InstanceType<typeof Sortable>;\n\n @Watch('disabled')\n handleDisabledChange() {\n this.sortableInstance?.option('disabled', this.disabled);\n }\n\n private classNames() {\n const classNames = ['pds-sortable'];\n\n if (this.border) {\n classNames.push('pds-sortable--bordered');\n }\n\n if (this.disabled) {\n classNames.push('pds-sortable--disabled');\n }\n\n if (this.dividers) {\n classNames.push('pds-sortable--divided');\n }\n\n if (this.handleType !== undefined) {\n classNames.push(`pds-sortable--handle-type-${this.handleType}`);\n }\n\n return classNames.join(' ');\n }\n\n componentDidLoad() {\n\n let sortableOptions: SortableType = {\n animation: 150,\n disabled: this.disabled,\n ghostClass: 'pds-sortable-item--ghost',\n dragClass: 'pds-sortable-item--drag',\n onEnd: (evt) => {\n this.pdsSortableItemMoved.emit(evt);\n },\n };\n\n if (this.handleType === 'handle') {\n sortableOptions = {\n ...sortableOptions,\n handle: '.pds-sortable-item__handle',\n };\n }\n\n this.sortableInstance = Sortable.create(this.el as HTMLElement, sortableOptions);\n }\n\n render() {\n return (\n <Host class={this.classNames()} id={this.componentId}>\n <slot></slot>\n </Host>\n );\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"sortable-interface.js","sourceRoot":"","sources":["../../../../src/components/pds-sortable/sortable-interface.ts"],"names":[],"mappings":"","sourcesContent":["import type { SortableEvent } from 'sortablejs';\n\nexport interface SortableType {\n animation: number;\n ghostClass: string;\n dragClass: string;\n onEnd: (evt: SortableEvent) => void;\n handle?: string;\n}\n\n"]}
1
+ {"version":3,"file":"sortable-interface.js","sourceRoot":"","sources":["../../../../src/components/pds-sortable/sortable-interface.ts"],"names":[],"mappings":"","sourcesContent":["import type { SortableEvent } from 'sortablejs';\n\nexport interface SortableType {\n animation: number;\n disabled: boolean;\n ghostClass: string;\n dragClass: string;\n onEnd: (evt: SortableEvent) => void;\n handle?: string;\n}\n\n"]}
@@ -9,21 +9,21 @@ export default {
9
9
  };
10
10
 
11
11
  const BaseTemplate = (args) => html`
12
- <pds-sortable ?border=${args.border} component-id="${args.componentId}" ?dividers=${args.dividers} handle-type="${args.handleType}">
12
+ <pds-sortable ?border=${args.border} component-id="${args.componentId}" ?disabled=${args.disabled} ?dividers=${args.dividers} handle-type="${args.handleType}">
13
13
  <pds-sortable-item>Item 1</pds-sortable-item>
14
14
  <pds-sortable-item>Item 2</pds-sortable-item>
15
15
  <pds-sortable-item>Item 3</pds-sortable-item>
16
16
  </pds-sortable>`;
17
17
 
18
18
  const HandleTemplate = (args) => html`
19
- <pds-sortable ?border=${args.border} component-id="${args.componentId}" ?dividers=${args.dividers} handle-type="${args.handleType}">
19
+ <pds-sortable ?border=${args.border} component-id="${args.componentId}" ?disabled=${args.disabled} ?dividers=${args.dividers} handle-type="${args.handleType}">
20
20
  <pds-sortable-item>Item 1</pds-sortable-item>
21
21
  <pds-sortable-item>Item 2</pds-sortable-item>
22
22
  <pds-sortable-item>Item 3</pds-sortable-item>
23
23
  </pds-sortable>`;
24
24
 
25
25
  const ActionsTemplate = (args) => html`
26
- <pds-sortable ?border=${args.border} component-id="${args.componentId}" ?dividers=${args.dividers} handle-type="${args.handleType}">
26
+ <pds-sortable ?border=${args.border} component-id="${args.componentId}" ?disabled=${args.disabled} ?dividers=${args.dividers} handle-type="${args.handleType}">
27
27
  <pds-sortable-item enable-actions>
28
28
  <div>Item 1</div>
29
29
  <div slot="sortable-item-actions">
@@ -45,7 +45,7 @@ const ActionsTemplate = (args) => html`
45
45
  </pds-sortable>`;
46
46
 
47
47
  const FullDemoTemplate = (args) => html`
48
- <pds-sortable ?border=${args.border} component-id="${args.componentId}" ?dividers=${args.dividers} handle-type="${args.handleType}">
48
+ <pds-sortable ?border=${args.border} component-id="${args.componentId}" ?disabled=${args.disabled} ?dividers=${args.dividers} handle-type="${args.handleType}">
49
49
  <pds-sortable-item enable-actions>
50
50
  <div>
51
51
  <div><strong>Item 1</strong></div>
@@ -79,6 +79,7 @@ export const Default = BaseTemplate.bind();
79
79
  Default.args = {
80
80
  componentId: 'default',
81
81
  border: false,
82
+ disabled: false,
82
83
  dividers: false,
83
84
  handleType: 'row',
84
85
  };
@@ -87,14 +88,25 @@ export const Bordered = BaseTemplate.bind();
87
88
  Bordered.args = {
88
89
  componentId: 'bordered',
89
90
  border: true,
91
+ disabled: false,
90
92
  dividers: false,
91
93
  handleType: 'row',
92
94
  };
93
95
 
96
+ export const Disabled = BaseTemplate.bind();
97
+ Disabled.args = {
98
+ componentId: 'disabled',
99
+ border: true,
100
+ disabled: true,
101
+ dividers: true,
102
+ handleType: 'row',
103
+ };
104
+
94
105
  export const Dividers = BaseTemplate.bind();
95
106
  Dividers.args = {
96
107
  componentId: 'dividers',
97
108
  border: false,
109
+ disabled: false,
98
110
  dividers: true,
99
111
  handleType: 'row',
100
112
  };
@@ -103,6 +115,7 @@ export const Handle = HandleTemplate.bind();
103
115
  Handle.args = {
104
116
  componentId: 'handle',
105
117
  border: false,
118
+ disabled: false,
106
119
  dividers: false,
107
120
  handleType: 'handle',
108
121
  };
@@ -111,6 +124,7 @@ export const Actions = ActionsTemplate.bind();
111
124
  Actions.args = {
112
125
  componentId: 'actions',
113
126
  border: false,
127
+ disabled: false,
114
128
  dividers: false,
115
129
  handleType: 'row',
116
130
  };
@@ -119,6 +133,7 @@ export const FullDemo = FullDemoTemplate.bind();
119
133
  FullDemo.args = {
120
134
  componentId: 'demo',
121
135
  border: true,
136
+ disabled: false,
122
137
  dividers: true,
123
138
  handleType: 'row',
124
139
  };
@@ -1,5 +1,5 @@
1
1
  import { Host, h } from "@stencil/core";
2
- import { assignDescription, messageId, exposeTypeProperty } from "../../utils/form";
2
+ import { assignDescription, isSpecTest, messageId, exposeTypeProperty } from "../../utils/form";
3
3
  import { danger } from "@pine-ds/icons/icons";
4
4
  import { inheritAriaAttributes } from "../../utils/attributes";
5
5
  export class PdsSwitch {
@@ -56,10 +56,8 @@ export class PdsSwitch {
56
56
  this.updateFormValue();
57
57
  }
58
58
  updateFormValue() {
59
- var _a;
60
- if (typeof jest !== 'undefined' || typeof process !== 'undefined' && ((_a = process.env) === null || _a === void 0 ? void 0 : _a.NODE_ENV) === 'test') {
59
+ if (isSpecTest())
61
60
  return;
62
- }
63
61
  if (this.internals && this.internals.setFormValue) {
64
62
  // For switches, only send the value when checked, otherwise send null
65
63
  const formValue = this.checked ? (this.value || 'on') : null;
@@ -84,9 +82,9 @@ export class PdsSwitch {
84
82
  this.inheritedAttributes = Object.assign({}, inheritAriaAttributes(this.el));
85
83
  }
86
84
  render() {
87
- return (h(Host, { key: 'e26422622075f925f0df3dbc2f5ea8223aed9902', class: this.switchClassNames(), "aria-disabled": this.disabled ? 'true' : null }, h("label", { key: 'b63cdac80d3cd55bc4845979f15b382c92883cf5', htmlFor: this.componentId }, h("input", Object.assign({ key: '910a7f6cd2093a6062c57c63600bb1721c147c75', "aria-describedby": assignDescription(this.componentId, this.invalid, this.errorMessage || this.helperMessage), "aria-invalid": this.invalid ? "true" : undefined, checked: this.checked, class: "pds-switch__input", disabled: this.disabled, id: this.componentId, name: this.name ? this.name : this.componentId, onChange: this.onSwitchUpdate, required: this.required, type: "checkbox", value: this.value }, this.inheritedAttributes)), h("span", { key: '45661afcaba7852a6ddf6ebbf4606502bc8b72e2', class: this.hideLabel ? 'visually-hidden' : '' }, this.label)), this.helperMessage &&
88
- h("div", { key: 'be3a6fbf3938b7846ca3a9e6eef54d6ee25391fa', class: `pds-switch__message`, id: messageId(this.componentId, 'helper') }, this.helperMessage), this.errorMessage &&
89
- h("div", { key: 'a5944169798ae8531f9e6414deac2c3631339b0a', class: `pds-switch__message pds-switch__message--error`, id: messageId(this.componentId, 'error'), "aria-live": "assertive" }, h("pds-icon", { key: '5b864b6ac441c9bd71dc22dbc9722c87c1b781e6', icon: danger, size: "small" }), this.errorMessage)));
85
+ return (h(Host, { key: '96ee8c40c04e95b461ba2942b740503897a56b27', class: this.switchClassNames(), "aria-disabled": this.disabled ? 'true' : null }, h("label", { key: '441d6854f2c0b02ecf3d874198b3e0636d68c83b', htmlFor: this.componentId }, h("input", Object.assign({ key: 'a26cd5fb407abc20da3e9dcfe0e52333690b783a', "aria-describedby": assignDescription(this.componentId, this.invalid, this.errorMessage || this.helperMessage), "aria-invalid": this.invalid ? "true" : undefined, checked: this.checked, class: "pds-switch__input", disabled: this.disabled, id: this.componentId, name: this.name ? this.name : this.componentId, onChange: this.onSwitchUpdate, required: this.required, type: "checkbox", value: this.value }, this.inheritedAttributes)), h("span", { key: '5762c48f481c5c5d7b62e8dab40579a4e7ff290b', class: this.hideLabel ? 'visually-hidden' : '' }, this.label)), this.helperMessage &&
86
+ h("div", { key: '64c14b8833b45b4e9efb2f76faa47f0d24127c91', class: `pds-switch__message`, id: messageId(this.componentId, 'helper') }, this.helperMessage), this.errorMessage &&
87
+ h("div", { key: 'cecd2e8da713e74b8e6b528b50733015f5d5069b', class: `pds-switch__message pds-switch__message--error`, id: messageId(this.componentId, 'error'), "aria-live": "assertive" }, h("pds-icon", { key: '3a1c8f87b3909cdad1bc680931f5521ecb77acd6', icon: danger, size: "small" }), this.errorMessage)));
90
88
  }
91
89
  static get is() { return "pds-switch"; }
92
90
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- {"version":3,"file":"pds-switch.js","sourceRoot":"","sources":["../../../../src/components/pds-switch/pds-switch.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC9F,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,kBAAk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AAE,SAAS,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,IAExC,IAAI,CAAC,aAAa,CACf;YAEP,IAAI,CAAC,YAAY;gBAChB,4DACE,KAAK,EAAE,gDAAgD,EACvD,EAAE,EAAE,SAAS,CAAC,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC,eAC9B,WAAW;oBAErB,iEAAU,IAAI,EAAE,MAAM,EAAE,IAAI,EAAC,OAAO,GAAG;oBACtC,IAAI,CAAC,YAAY,CACd,CAEH,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, Host, h, Prop, Watch } from '@stencil/core';\nimport { assignDescription, messageId, exposeTypeProperty } from '../../utils/form';\nimport { danger } from '@pine-ds/icons/icons';\n\nimport { inheritAriaAttributes } from '@utils/attributes';\nimport type { Attributes } from '@utils/attributes';\n\n@Component({\n tag: 'pds-switch',\n styleUrls: ['../../global/styles/utils/label.scss', 'pds-switch.scss'],\n shadow: true,\n formAssociated: true,\n})\nexport class PdsSwitch {\n private inheritedAttributes: Attributes = {};\n private internals?: ElementInternals;\n private readonly _type = 'checkbox' as const;\n\n @Element() el: HTMLPdsSwitchElement;\n\n /**\n * A unique identifier used for the underlying component `id` attribute and the label `for` attribute.\n */\n @Prop() componentId!: string;\n\n /**\n * Determines the input 'checked' state.\n */\n @Prop({ mutable: true }) checked = false;\n\n /**\n * Determines the input 'disabled' state, preventing user interaction.\n */\n @Prop() disabled? = false;\n\n /**\n * Displays message text describing an invalid state.\n */\n @Prop() errorMessage?: string;\n\n /**\n * Visually hides the label text for instances where only the switch should be displayed. Label remains accessible to assistive technology such as screen readers.\n */\n @Prop() hideLabel: boolean;\n\n /**\n * Displays help text for additional description of an input.\n */\n @Prop() helperMessage: string;\n\n /**\n * Determines the input 'invalid' state, signifying an error is present.\n */\n @Prop() invalid? = false;\n\n /**\n * Displays text to describe the input.\n */\n @Prop() label!: string;\n\n /**\n * Identifies form data and unifies a group of radio inputs for toggling a single property/value.\n */\n @Prop() name: string;\n\n /**\n * Determines the 'required' state of the input.\n */\n @Prop() required? = false;\n\n /**\n * Provides input with a string submitted in form data.\n */\n @Prop() value: string;\n\n\n /**\n * Emits an event on input change.\n */\n @Event() pdsSwitchChange: EventEmitter<InputEvent>;\n\n private onSwitchUpdate = (e: Event) => {\n if (this.disabled) return;\n\n const input = e.target as HTMLInputElement;\n this.checked = input.checked;\n\n this.updateFormValue();\n\n this.pdsSwitchChange.emit(e as InputEvent);\n };\n\n private switchClassNames = () => {\n let switchClasses = `pds-switch`;\n\n if (this.invalid === true) {\n switchClasses += \" pds-switch--error\";\n }\n if (this.helperMessage !== undefined) {\n switchClasses += \" pds-switch--message\";\n }\n return switchClasses;\n };\n\n connectedCallback() {\n // Initialize ElementInternals for form association (only once per element instance)\n if (this.el.attachInternals && !this.internals) {\n this.internals = this.el.attachInternals();\n }\n\n // Expose type property on the element instance to match native form element behavior\n exposeTypeProperty(this.el, () => this._type);\n }\n\n componentDidLoad() {\n this.updateFormValue();\n }\n\n @Watch('checked')\n checkedChanged() {\n this.updateFormValue();\n }\n\n private updateFormValue() {\n if (typeof jest !== 'undefined' || typeof process !== 'undefined' && process.env?.NODE_ENV === 'test') {\n return;\n }\n\n if (this.internals && this.internals.setFormValue) {\n // For switches, only send the value when checked, otherwise send null\n const formValue = this.checked ? (this.value || 'on') : null;\n this.internals.setFormValue(formValue);\n }\n\n if (this.internals && this.internals.setValidity) {\n this.internals.setValidity({});\n }\n }\n\n formStateRestoreCallback(state: string | FormData | null) {\n if (state instanceof FormData) {\n // For switches, restore if the value exists in FormData\n const value = this.value || 'on';\n this.checked = state.get(this.name || this.componentId) === value;\n } else if (typeof state === 'string') {\n // Restore from string state\n this.checked = state === (this.value || 'on');\n }\n }\n\n componentWillLoad() {\n this.inheritedAttributes = {\n ...inheritAriaAttributes(this.el)\n }\n }\n\n render() {\n return (\n <Host class={this.switchClassNames()} aria-disabled={this.disabled ? 'true' : null}>\n <label htmlFor={this.componentId}>\n <input\n aria-describedby={assignDescription(this.componentId, this.invalid, this.errorMessage || this.helperMessage)}\n aria-invalid={this.invalid ? \"true\" : undefined}\n checked={this.checked}\n class=\"pds-switch__input\"\n disabled={this.disabled}\n id={this.componentId}\n name={this.name ? this.name : this.componentId}\n onChange={this.onSwitchUpdate}\n required={this.required}\n type=\"checkbox\"\n value={this.value}\n {...this.inheritedAttributes}\n />\n <span class={this.hideLabel ? 'visually-hidden' : ''}>\n {this.label}\n </span>\n </label>\n {this.helperMessage &&\n <div\n class={`pds-switch__message`}\n id={messageId(this.componentId, 'helper')}\n >\n {this.helperMessage}\n </div>\n }\n {this.errorMessage &&\n <div\n class={`pds-switch__message pds-switch__message--error`}\n id={messageId(this.componentId, 'error')}\n aria-live=\"assertive\"\n >\n <pds-icon icon={danger} size=\"small\" />\n {this.errorMessage}\n </div>\n }\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"pds-switch.js","sourceRoot":"","sources":["../../../../src/components/pds-switch/pds-switch.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC9F,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAChG,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,OAAO,EAAE,qBAAqB,E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IAAI,EAAE,MAAM,EAAE,IAAI,EAAC,OAAO,GAAG;oBACtC,IAAI,CAAC,YAAY,CACd,CAEH,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, Host, h, Prop, Watch } from '@stencil/core';\nimport { assignDescription, isSpecTest, messageId, exposeTypeProperty } from '../../utils/form';\nimport { danger } from '@pine-ds/icons/icons';\n\nimport { inheritAriaAttributes } from '@utils/attributes';\nimport type { Attributes } from '@utils/attributes';\n\n@Component({\n tag: 'pds-switch',\n styleUrls: ['../../global/styles/utils/label.scss', 'pds-switch.scss'],\n shadow: true,\n formAssociated: true,\n})\nexport class PdsSwitch {\n private inheritedAttributes: Attributes = {};\n private internals?: ElementInternals;\n private readonly _type = 'checkbox' as const;\n\n @Element() el: HTMLPdsSwitchElement;\n\n /**\n * A unique identifier used for the underlying component `id` attribute and the label `for` attribute.\n */\n @Prop() componentId!: string;\n\n /**\n * Determines the input 'checked' state.\n */\n @Prop({ mutable: true }) checked = false;\n\n /**\n * Determines the input 'disabled' state, preventing user interaction.\n */\n @Prop() disabled? = false;\n\n /**\n * Displays message text describing an invalid state.\n */\n @Prop() errorMessage?: string;\n\n /**\n * Visually hides the label text for instances where only the switch should be displayed. Label remains accessible to assistive technology such as screen readers.\n */\n @Prop() hideLabel: boolean;\n\n /**\n * Displays help text for additional description of an input.\n */\n @Prop() helperMessage: string;\n\n /**\n * Determines the input 'invalid' state, signifying an error is present.\n */\n @Prop() invalid? = false;\n\n /**\n * Displays text to describe the input.\n */\n @Prop() label!: string;\n\n /**\n * Identifies form data and unifies a group of radio inputs for toggling a single property/value.\n */\n @Prop() name: string;\n\n /**\n * Determines the 'required' state of the input.\n */\n @Prop() required? = false;\n\n /**\n * Provides input with a string submitted in form data.\n */\n @Prop() value: string;\n\n\n /**\n * Emits an event on input change.\n */\n @Event() pdsSwitchChange: EventEmitter<InputEvent>;\n\n private onSwitchUpdate = (e: Event) => {\n if (this.disabled) return;\n\n const input = e.target as HTMLInputElement;\n this.checked = input.checked;\n\n this.updateFormValue();\n\n this.pdsSwitchChange.emit(e as InputEvent);\n };\n\n private switchClassNames = () => {\n let switchClasses = `pds-switch`;\n\n if (this.invalid === true) {\n switchClasses += \" pds-switch--error\";\n }\n if (this.helperMessage !== undefined) {\n switchClasses += \" pds-switch--message\";\n }\n return switchClasses;\n };\n\n connectedCallback() {\n // Initialize ElementInternals for form association (only once per element instance)\n if (this.el.attachInternals && !this.internals) {\n this.internals = this.el.attachInternals();\n }\n\n // Expose type property on the element instance to match native form element behavior\n exposeTypeProperty(this.el, () => this._type);\n }\n\n componentDidLoad() {\n this.updateFormValue();\n }\n\n @Watch('checked')\n checkedChanged() {\n this.updateFormValue();\n }\n\n private updateFormValue() {\n if (isSpecTest()) return;\n\n if (this.internals && this.internals.setFormValue) {\n // For switches, only send the value when checked, otherwise send null\n const formValue = this.checked ? (this.value || 'on') : null;\n this.internals.setFormValue(formValue);\n }\n\n if (this.internals && this.internals.setValidity) {\n this.internals.setValidity({});\n }\n }\n\n formStateRestoreCallback(state: string | FormData | null) {\n if (state instanceof FormData) {\n // For switches, restore if the value exists in FormData\n const value = this.value || 'on';\n this.checked = state.get(this.name || this.componentId) === value;\n } else if (typeof state === 'string') {\n // Restore from string state\n this.checked = state === (this.value || 'on');\n }\n }\n\n componentWillLoad() {\n this.inheritedAttributes = {\n ...inheritAriaAttributes(this.el)\n }\n }\n\n render() {\n return (\n <Host class={this.switchClassNames()} aria-disabled={this.disabled ? 'true' : null}>\n <label htmlFor={this.componentId}>\n <input\n aria-describedby={assignDescription(this.componentId, this.invalid, this.errorMessage || this.helperMessage)}\n aria-invalid={this.invalid ? \"true\" : undefined}\n checked={this.checked}\n class=\"pds-switch__input\"\n disabled={this.disabled}\n id={this.componentId}\n name={this.name ? this.name : this.componentId}\n onChange={this.onSwitchUpdate}\n required={this.required}\n type=\"checkbox\"\n value={this.value}\n {...this.inheritedAttributes}\n />\n <span class={this.hideLabel ? 'visually-hidden' : ''}>\n {this.label}\n </span>\n </label>\n {this.helperMessage &&\n <div\n class={`pds-switch__message`}\n id={messageId(this.componentId, 'helper')}\n >\n {this.helperMessage}\n </div>\n }\n {this.errorMessage &&\n <div\n class={`pds-switch__message pds-switch__message--error`}\n id={messageId(this.componentId, 'error')}\n aria-live=\"assertive\"\n >\n <pds-icon icon={danger} size=\"small\" />\n {this.errorMessage}\n </div>\n }\n </Host>\n );\n }\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  import { Host, h } from "@stencil/core";
2
- import { assignDescription, isRequired, messageId, exposeTypeProperty } from "../../utils/form";
2
+ import { assignDescription, isRequired, isSpecTest, messageId, exposeTypeProperty } from "../../utils/form";
3
3
  import { debounceEvent } from "../../utils/utils";
4
4
  import { inheritAttributes, inheritAriaAttributes } from "../../utils/attributes";
5
5
  import { danger } from "@pine-ds/icons/icons";
@@ -119,7 +119,7 @@ export class PdsTextarea {
119
119
  this.setupResizeObserver();
120
120
  }
121
121
  // Update ElementInternals validity when maxLength changes
122
- if (this.internals && this.internals.setValidity && this.nativeTextarea) {
122
+ if (!isSpecTest() && this.internals && this.internals.setValidity && this.nativeTextarea) {
123
123
  const isTooLong = this.nativeTextarea.value.length > (this.maxLength || 0);
124
124
  this.internals.setValidity({ tooLong: isTooLong }, isTooLong ? 'Value exceeds maxLength' : '', this.nativeTextarea);
125
125
  }
@@ -253,6 +253,8 @@ export class PdsTextarea {
253
253
  * Updates the form value using ElementInternals API
254
254
  */
255
255
  updateFormValue() {
256
+ if (isSpecTest())
257
+ return;
256
258
  if (this.internals && this.internals.setFormValue) {
257
259
  const value = this.getValue();
258
260
  this.internals.setFormValue(value || null);
@@ -292,10 +294,10 @@ export class PdsTextarea {
292
294
  }
293
295
  render() {
294
296
  const value = this.getValue();
295
- return (h(Host, { key: '3930616df94105a62fc1d837bda9a03526ab1f8d', "aria-disabled": this.disabled ? 'true' : null, "aria-readonly": this.readonly ? 'true' : null, "has-action": this.hasAction && !this.hideLabel ? 'true' : null }, h("div", { key: 'da1befdef1050646ebcd8dd27b93d8dc8d777a15', class: "pds-textarea" }, this.label &&
296
- h("div", { key: '4140a3852e9f3f7d490457b9c8d0d15ab04ea4c2', class: "pds-textarea__label-wrapper" }, h("label", { key: '7a38d1b5f394e0304252827c11ca5fc89c22abf9', htmlFor: this.componentId }, h("span", { key: 'da9a2cff7f0cf25d027de8cf05feae97a89e38d9', class: this.hideLabel ? 'visually-hidden' : '' }, this.label)), !this.hideLabel && this.renderAction()), h("div", { key: '443e7d2fc01781ae0808c4212ba29887545c1225', class: "pds-textarea__field-wrapper" }, h("textarea", Object.assign({ key: '41c0cb685f60fec270102fb67a73d4c341033c6e', ref: (el) => this.nativeTextarea = el, "aria-describedby": assignDescription(this.componentId, this.invalid, this.helperMessage), "aria-invalid": this.invalid ? "true" : undefined, autocomplete: this.autocomplete, class: this.textareaClassNames(), disabled: this.disabled, id: this.componentId, maxlength: this.maxLength, name: this.name, placeholder: this.placeholder, readOnly: this.readonly, required: this.required, rows: this.rows, onBlur: this.onBlur, onChange: this.onTextareaChange, onFocus: this.onFocus, onInput: this.onInput, onKeyDown: this.onKeyDown }, this.inheritedAttributes), value), this.renderCharacterCounter()), this.helperMessage &&
297
- h("p", { key: '3bfc2cc6ff60ef1e54feec57c3b1194342ec6d45', class: "pds-textarea__helper-message", id: messageId(this.componentId, 'helper') }, this.helperMessage), this.invalid &&
298
- h("p", { key: 'cb288096c3398103b8458b09576fabb7154c9867', "aria-live": "assertive", class: "pds-textarea__error-message", id: messageId(this.componentId, 'error') }, h("pds-icon", { key: '3274739f2dcea054a9df861f8ac5dd97f8267b4c', icon: danger, size: "small" }), this.errorMessage))));
297
+ return (h(Host, { key: '09726ef6454fe84a5c8d0ea25c6e8a7a6da128f9', "aria-disabled": this.disabled ? 'true' : null, "aria-readonly": this.readonly ? 'true' : null, "has-action": this.hasAction && !this.hideLabel ? 'true' : null }, h("div", { key: '6244104f11d26b25a908fbaf13a815988a3c33d9', class: "pds-textarea" }, this.label &&
298
+ h("div", { key: '5dd7f6caedd7ebf5ecaacf8d111ec5e2426e84ae', class: "pds-textarea__label-wrapper" }, h("label", { key: 'd19f62cd28612423abf0d5696ff1cd88f39d32fe', htmlFor: this.componentId }, h("span", { key: '37f4e9e34ae3205bafa5f1bc8574a98d3a90060d', class: this.hideLabel ? 'visually-hidden' : '' }, this.label)), !this.hideLabel && this.renderAction()), h("div", { key: '4c3c8fadc5596630485ee1775f5d87d77c11d95b', class: "pds-textarea__field-wrapper" }, h("textarea", Object.assign({ key: 'a60be5f3d362cb9bcd2ecf5af16ffc467fc8322a', ref: (el) => this.nativeTextarea = el, "aria-describedby": assignDescription(this.componentId, this.invalid, this.helperMessage), "aria-invalid": this.invalid ? "true" : undefined, autocomplete: this.autocomplete, class: this.textareaClassNames(), disabled: this.disabled, id: this.componentId, maxlength: this.maxLength, name: this.name, placeholder: this.placeholder, readOnly: this.readonly, required: this.required, rows: this.rows, onBlur: this.onBlur, onChange: this.onTextareaChange, onFocus: this.onFocus, onInput: this.onInput, onKeyDown: this.onKeyDown }, this.inheritedAttributes), value), this.renderCharacterCounter()), this.helperMessage &&
299
+ h("p", { key: 'ae03337ef85ac2a3995e967fe671e0ad2c352710', class: "pds-textarea__helper-message", id: messageId(this.componentId, 'helper') }, this.helperMessage), this.invalid &&
300
+ h("p", { key: 'a2bda9a477e7d2b81862833da43158a626d8cc6f', "aria-live": "assertive", class: "pds-textarea__error-message", id: messageId(this.componentId, 'error') }, h("pds-icon", { key: '5ac785e8012aeb49dd0b1c5823233671531b0a7a', icon: danger, size: "small" }), this.errorMessage))));
299
301
  }
300
302
  static get is() { return "pds-textarea"; }
301
303
  static get encapsulation() { return "shadow"; }