@pine-ds/core 3.4.0 → 3.4.2

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 (562) hide show
  1. package/components/mock-pds-modal.js +1 -1
  2. package/components/mock-pds-modal.js.map +1 -1
  3. package/components/pds-box2.js +8 -4
  4. package/components/pds-box2.js.map +1 -1
  5. package/components/pds-button2.js +1 -1
  6. package/components/pds-button2.js.map +1 -1
  7. package/components/pds-checkbox2.js +45 -7
  8. package/components/pds-checkbox2.js.map +1 -1
  9. package/components/pds-input.js +56 -3
  10. package/components/pds-input.js.map +1 -1
  11. package/components/pds-modal.js +1 -1
  12. package/components/pds-modal.js.map +1 -1
  13. package/components/pds-radio.js +1 -1
  14. package/components/pds-radio.js.map +1 -1
  15. package/components/pds-select.js +77 -3
  16. package/components/pds-select.js.map +1 -1
  17. package/components/pds-switch.js +47 -4
  18. package/components/pds-switch.js.map +1 -1
  19. package/components/pds-textarea.js +56 -6
  20. package/components/pds-textarea.js.map +1 -1
  21. package/components/utils.js +38 -5
  22. package/components/utils.js.map +1 -1
  23. package/dist/cjs/{index-CxX7ua5d.js → index-g-uSeICs.js} +30 -2
  24. package/dist/cjs/index-g-uSeICs.js.map +1 -0
  25. package/dist/cjs/index.cjs.js +1 -1
  26. package/dist/cjs/loader.cjs.js +2 -2
  27. package/dist/cjs/mock-pds-modal.cjs.entry.js +2 -2
  28. package/dist/cjs/mock-pds-modal.cjs.entry.js.map +1 -1
  29. package/dist/cjs/mock-pds-modal.entry.cjs.js.map +1 -1
  30. package/dist/cjs/pds-accordion.cjs.entry.js +1 -1
  31. package/dist/cjs/pds-alert.cjs.entry.js +1 -1
  32. package/dist/cjs/pds-avatar.cjs.entry.js +1 -1
  33. package/dist/cjs/pds-box.cjs.entry.js +9 -5
  34. package/dist/cjs/pds-box.cjs.entry.js.map +1 -1
  35. package/dist/cjs/pds-box.entry.cjs.js.map +1 -1
  36. package/dist/cjs/pds-button.cjs.entry.js +3 -3
  37. package/dist/cjs/pds-button.cjs.entry.js.map +1 -1
  38. package/dist/cjs/pds-button.entry.cjs.js.map +1 -1
  39. package/dist/cjs/pds-checkbox.cjs.entry.js +44 -6
  40. package/dist/cjs/pds-checkbox.cjs.entry.js.map +1 -1
  41. package/dist/cjs/pds-checkbox.entry.cjs.js.map +1 -1
  42. package/dist/cjs/pds-chip.cjs.entry.js +1 -1
  43. package/dist/cjs/pds-combobox.cjs.entry.js +1 -1
  44. package/dist/cjs/pds-copytext.cjs.entry.js +1 -1
  45. package/dist/cjs/pds-divider.cjs.entry.js +1 -1
  46. package/dist/cjs/pds-dropdown-menu-item.cjs.entry.js +1 -1
  47. package/dist/cjs/pds-dropdown-menu-separator.cjs.entry.js +1 -1
  48. package/dist/cjs/pds-dropdown-menu.cjs.entry.js +1 -1
  49. package/dist/cjs/pds-icon.cjs.entry.js +1 -1
  50. package/dist/cjs/pds-image.cjs.entry.js +1 -1
  51. package/dist/cjs/pds-input.cjs.entry.js +56 -4
  52. package/dist/cjs/pds-input.cjs.entry.js.map +1 -1
  53. package/dist/cjs/pds-input.entry.cjs.js.map +1 -1
  54. package/dist/cjs/pds-link.cjs.entry.js +2 -2
  55. package/dist/cjs/pds-loader.cjs.entry.js +1 -1
  56. package/dist/cjs/pds-modal-content.cjs.entry.js +1 -1
  57. package/dist/cjs/pds-modal-footer.cjs.entry.js +1 -1
  58. package/dist/cjs/pds-modal-header.cjs.entry.js +1 -1
  59. package/dist/cjs/pds-modal.cjs.entry.js +2 -2
  60. package/dist/cjs/pds-modal.cjs.entry.js.map +1 -1
  61. package/dist/cjs/pds-modal.entry.cjs.js.map +1 -1
  62. package/dist/cjs/pds-popover.cjs.entry.js +1 -1
  63. package/dist/cjs/pds-progress.cjs.entry.js +1 -1
  64. package/dist/cjs/pds-property.cjs.entry.js +1 -1
  65. package/dist/cjs/pds-radio.cjs.entry.js +2 -2
  66. package/dist/cjs/pds-radio.cjs.entry.js.map +1 -1
  67. package/dist/cjs/pds-radio.entry.cjs.js.map +1 -1
  68. package/dist/cjs/pds-row.cjs.entry.js +1 -1
  69. package/dist/cjs/pds-select.cjs.entry.js +77 -3
  70. package/dist/cjs/pds-select.cjs.entry.js.map +1 -1
  71. package/dist/cjs/pds-select.entry.cjs.js.map +1 -1
  72. package/dist/cjs/pds-sortable-item.cjs.entry.js +1 -1
  73. package/dist/cjs/pds-sortable.cjs.entry.js +1 -1
  74. package/dist/cjs/pds-switch.cjs.entry.js +45 -4
  75. package/dist/cjs/pds-switch.cjs.entry.js.map +1 -1
  76. package/dist/cjs/pds-switch.entry.cjs.js.map +1 -1
  77. package/dist/cjs/pds-tab.cjs.entry.js +1 -1
  78. package/dist/cjs/pds-table-body.cjs.entry.js +1 -1
  79. package/dist/cjs/pds-table-cell.cjs.entry.js +1 -1
  80. package/dist/cjs/pds-table-head-cell.cjs.entry.js +1 -1
  81. package/dist/cjs/pds-table-head.cjs.entry.js +1 -1
  82. package/dist/cjs/pds-table-row.cjs.entry.js +1 -1
  83. package/dist/cjs/pds-table.cjs.entry.js +1 -1
  84. package/dist/cjs/pds-tabpanel.cjs.entry.js +1 -1
  85. package/dist/cjs/pds-tabs.cjs.entry.js +1 -1
  86. package/dist/cjs/pds-text.cjs.entry.js +2 -2
  87. package/dist/cjs/pds-textarea.cjs.entry.js +57 -7
  88. package/dist/cjs/pds-textarea.cjs.entry.js.map +1 -1
  89. package/dist/cjs/pds-textarea.entry.cjs.js.map +1 -1
  90. package/dist/cjs/pds-toast.cjs.entry.js +1 -1
  91. package/dist/cjs/pds-tooltip.cjs.entry.js +1 -1
  92. package/dist/cjs/pine-core.cjs.js +2 -2
  93. package/dist/cjs/utils-7jx8T2mW.js +79 -0
  94. package/dist/cjs/utils-7jx8T2mW.js.map +1 -0
  95. package/dist/collection/components/pds-box/pds-box.css +1 -1
  96. package/dist/collection/components/pds-box/pds-box.js +10 -6
  97. package/dist/collection/components/pds-box/pds-box.js.map +1 -1
  98. package/dist/collection/components/pds-button/pds-button.css +3 -2
  99. package/dist/collection/components/pds-checkbox/pds-checkbox.css +1 -0
  100. package/dist/collection/components/pds-checkbox/pds-checkbox.js +44 -3
  101. package/dist/collection/components/pds-checkbox/pds-checkbox.js.map +1 -1
  102. package/dist/collection/components/pds-input/pds-input.css +10 -6
  103. package/dist/collection/components/pds-input/pds-input.js +72 -1
  104. package/dist/collection/components/pds-input/pds-input.js.map +1 -1
  105. package/dist/collection/components/pds-input/stories/pds-input.stories.js +11 -0
  106. package/dist/collection/components/pds-modal/pds-modal.css +1 -1
  107. package/dist/collection/components/pds-radio/pds-radio.css +1 -0
  108. package/dist/collection/components/pds-select/pds-select.css +2 -1
  109. package/dist/collection/components/pds-select/pds-select.js +75 -1
  110. package/dist/collection/components/pds-select/pds-select.js.map +1 -1
  111. package/dist/collection/components/pds-switch/pds-switch.js +47 -3
  112. package/dist/collection/components/pds-switch/pds-switch.js.map +1 -1
  113. package/dist/collection/components/pds-textarea/pds-textarea.css +1 -1
  114. package/dist/collection/components/pds-textarea/pds-textarea.js +54 -4
  115. package/dist/collection/components/pds-textarea/pds-textarea.js.map +1 -1
  116. package/dist/collection/utils/utils.js +37 -4
  117. package/dist/collection/utils/utils.js.map +1 -1
  118. package/dist/docs.json +28 -14
  119. package/dist/esm/{index-Uh5ntVcq.js → index-BVCWKPy3.js} +30 -2
  120. package/dist/esm/index-BVCWKPy3.js.map +1 -0
  121. package/dist/esm/index.js +1 -1
  122. package/dist/esm/loader.js +3 -3
  123. package/dist/esm/mock-pds-modal.entry.js +2 -2
  124. package/dist/esm/mock-pds-modal.entry.js.map +1 -1
  125. package/dist/esm/pds-accordion.entry.js +1 -1
  126. package/dist/esm/pds-alert.entry.js +1 -1
  127. package/dist/esm/pds-avatar.entry.js +1 -1
  128. package/dist/esm/pds-box.entry.js +9 -5
  129. package/dist/esm/pds-box.entry.js.map +1 -1
  130. package/dist/esm/pds-button.entry.js +3 -3
  131. package/dist/esm/pds-button.entry.js.map +1 -1
  132. package/dist/esm/pds-checkbox.entry.js +44 -6
  133. package/dist/esm/pds-checkbox.entry.js.map +1 -1
  134. package/dist/esm/pds-chip.entry.js +1 -1
  135. package/dist/esm/pds-combobox.entry.js +1 -1
  136. package/dist/esm/pds-copytext.entry.js +1 -1
  137. package/dist/esm/pds-divider.entry.js +1 -1
  138. package/dist/esm/pds-dropdown-menu-item.entry.js +1 -1
  139. package/dist/esm/pds-dropdown-menu-separator.entry.js +1 -1
  140. package/dist/esm/pds-dropdown-menu.entry.js +1 -1
  141. package/dist/esm/pds-icon.entry.js +1 -1
  142. package/dist/esm/pds-image.entry.js +1 -1
  143. package/dist/esm/pds-input.entry.js +56 -4
  144. package/dist/esm/pds-input.entry.js.map +1 -1
  145. package/dist/esm/pds-link.entry.js +2 -2
  146. package/dist/esm/pds-loader.entry.js +1 -1
  147. package/dist/esm/pds-modal-content.entry.js +1 -1
  148. package/dist/esm/pds-modal-footer.entry.js +1 -1
  149. package/dist/esm/pds-modal-header.entry.js +1 -1
  150. package/dist/esm/pds-modal.entry.js +2 -2
  151. package/dist/esm/pds-modal.entry.js.map +1 -1
  152. package/dist/esm/pds-popover.entry.js +1 -1
  153. package/dist/esm/pds-progress.entry.js +1 -1
  154. package/dist/esm/pds-property.entry.js +1 -1
  155. package/dist/esm/pds-radio.entry.js +2 -2
  156. package/dist/esm/pds-radio.entry.js.map +1 -1
  157. package/dist/esm/pds-row.entry.js +1 -1
  158. package/dist/esm/pds-select.entry.js +77 -3
  159. package/dist/esm/pds-select.entry.js.map +1 -1
  160. package/dist/esm/pds-sortable-item.entry.js +1 -1
  161. package/dist/esm/pds-sortable.entry.js +1 -1
  162. package/dist/esm/pds-switch.entry.js +45 -4
  163. package/dist/esm/pds-switch.entry.js.map +1 -1
  164. package/dist/esm/pds-tab.entry.js +1 -1
  165. package/dist/esm/pds-table-body.entry.js +1 -1
  166. package/dist/esm/pds-table-cell.entry.js +1 -1
  167. package/dist/esm/pds-table-head-cell.entry.js +1 -1
  168. package/dist/esm/pds-table-head.entry.js +1 -1
  169. package/dist/esm/pds-table-row.entry.js +1 -1
  170. package/dist/esm/pds-table.entry.js +1 -1
  171. package/dist/esm/pds-tabpanel.entry.js +1 -1
  172. package/dist/esm/pds-tabs.entry.js +1 -1
  173. package/dist/esm/pds-text.entry.js +2 -2
  174. package/dist/esm/pds-textarea.entry.js +57 -7
  175. package/dist/esm/pds-textarea.entry.js.map +1 -1
  176. package/dist/esm/pds-toast.entry.js +1 -1
  177. package/dist/esm/pds-tooltip.entry.js +1 -1
  178. package/dist/esm/pine-core.js +3 -3
  179. package/dist/esm/utils-tJa4KYNO.js +74 -0
  180. package/dist/esm/utils-tJa4KYNO.js.map +1 -0
  181. package/dist/esm-es5/index-BVCWKPy3.js +3 -0
  182. package/dist/esm-es5/index-BVCWKPy3.js.map +1 -0
  183. package/dist/esm-es5/index.js +1 -1
  184. package/dist/esm-es5/loader.js +1 -1
  185. package/dist/esm-es5/mock-pds-modal.entry.js +1 -1
  186. package/dist/esm-es5/mock-pds-modal.entry.js.map +1 -1
  187. package/dist/esm-es5/pds-accordion.entry.js +1 -1
  188. package/dist/esm-es5/pds-alert.entry.js +1 -1
  189. package/dist/esm-es5/pds-avatar.entry.js +1 -1
  190. package/dist/esm-es5/pds-box.entry.js +1 -1
  191. package/dist/esm-es5/pds-box.entry.js.map +1 -1
  192. package/dist/esm-es5/pds-button.entry.js +1 -1
  193. package/dist/esm-es5/pds-button.entry.js.map +1 -1
  194. package/dist/esm-es5/pds-checkbox.entry.js +1 -1
  195. package/dist/esm-es5/pds-checkbox.entry.js.map +1 -1
  196. package/dist/esm-es5/pds-chip.entry.js +1 -1
  197. package/dist/esm-es5/pds-combobox.entry.js +1 -1
  198. package/dist/esm-es5/pds-copytext.entry.js +1 -1
  199. package/dist/esm-es5/pds-divider.entry.js +1 -1
  200. package/dist/esm-es5/pds-dropdown-menu-item.entry.js +1 -1
  201. package/dist/esm-es5/pds-dropdown-menu-separator.entry.js +1 -1
  202. package/dist/esm-es5/pds-dropdown-menu.entry.js +1 -1
  203. package/dist/esm-es5/pds-icon.entry.js +1 -1
  204. package/dist/esm-es5/pds-image.entry.js +1 -1
  205. package/dist/esm-es5/pds-input.entry.js +1 -1
  206. package/dist/esm-es5/pds-input.entry.js.map +1 -1
  207. package/dist/esm-es5/pds-link.entry.js +1 -1
  208. package/dist/esm-es5/pds-loader.entry.js +1 -1
  209. package/dist/esm-es5/pds-modal-content.entry.js +1 -1
  210. package/dist/esm-es5/pds-modal-footer.entry.js +1 -1
  211. package/dist/esm-es5/pds-modal-header.entry.js +1 -1
  212. package/dist/esm-es5/pds-modal.entry.js +1 -1
  213. package/dist/esm-es5/pds-modal.entry.js.map +1 -1
  214. package/dist/esm-es5/pds-popover.entry.js +1 -1
  215. package/dist/esm-es5/pds-progress.entry.js +1 -1
  216. package/dist/esm-es5/pds-property.entry.js +1 -1
  217. package/dist/esm-es5/pds-radio.entry.js +1 -1
  218. package/dist/esm-es5/pds-radio.entry.js.map +1 -1
  219. package/dist/esm-es5/pds-row.entry.js +1 -1
  220. package/dist/esm-es5/pds-select.entry.js +1 -1
  221. package/dist/esm-es5/pds-select.entry.js.map +1 -1
  222. package/dist/esm-es5/pds-sortable-item.entry.js +1 -1
  223. package/dist/esm-es5/pds-sortable.entry.js +1 -1
  224. package/dist/esm-es5/pds-switch.entry.js +1 -1
  225. package/dist/esm-es5/pds-switch.entry.js.map +1 -1
  226. package/dist/esm-es5/pds-tab.entry.js +1 -1
  227. package/dist/esm-es5/pds-table-body.entry.js +1 -1
  228. package/dist/esm-es5/pds-table-cell.entry.js +1 -1
  229. package/dist/esm-es5/pds-table-head-cell.entry.js +1 -1
  230. package/dist/esm-es5/pds-table-head.entry.js +1 -1
  231. package/dist/esm-es5/pds-table-row.entry.js +1 -1
  232. package/dist/esm-es5/pds-table.entry.js +1 -1
  233. package/dist/esm-es5/pds-tabpanel.entry.js +1 -1
  234. package/dist/esm-es5/pds-tabs.entry.js +1 -1
  235. package/dist/esm-es5/pds-text.entry.js +1 -1
  236. package/dist/esm-es5/pds-textarea.entry.js +1 -1
  237. package/dist/esm-es5/pds-textarea.entry.js.map +1 -1
  238. package/dist/esm-es5/pds-toast.entry.js +1 -1
  239. package/dist/esm-es5/pds-tooltip.entry.js +1 -1
  240. package/dist/esm-es5/pine-core.js +1 -1
  241. package/dist/esm-es5/utils-tJa4KYNO.js +2 -0
  242. package/dist/esm-es5/utils-tJa4KYNO.js.map +1 -0
  243. package/dist/pine-core/index.esm.js +1 -1
  244. package/dist/pine-core/mock-pds-modal.entry.esm.js.map +1 -1
  245. package/dist/pine-core/{p-fd3b7077.entry.js → p-0066d249.entry.js} +2 -2
  246. package/dist/pine-core/{p-c5da4a97.system.entry.js → p-0199e3e9.system.entry.js} +2 -2
  247. package/dist/pine-core/{p-982edcaf.system.entry.js → p-03d17841.system.entry.js} +2 -2
  248. package/dist/pine-core/p-03d17841.system.entry.js.map +1 -0
  249. package/dist/pine-core/p-042ee55c.entry.js +2 -0
  250. package/dist/pine-core/p-042ee55c.entry.js.map +1 -0
  251. package/dist/pine-core/{p-9d8bb7f7.system.entry.js → p-051ff780.system.entry.js} +2 -2
  252. package/dist/pine-core/{p-2a2cd90d.entry.js → p-064e3d73.entry.js} +2 -2
  253. package/dist/pine-core/{p-90a8d1bd.entry.js → p-075eecf9.entry.js} +2 -2
  254. package/dist/pine-core/{p-3df372d1.entry.js → p-0a4fc9c7.entry.js} +3 -3
  255. package/dist/pine-core/{p-30449e82.entry.js → p-0dbb2ae9.entry.js} +2 -2
  256. package/dist/pine-core/{p-667eb50e.entry.js → p-11d4036e.entry.js} +2 -2
  257. package/dist/pine-core/{p-f29baa16.entry.js → p-126197e5.entry.js} +2 -2
  258. package/dist/pine-core/{p-b6d18604.entry.js → p-13ac0852.entry.js} +2 -2
  259. package/dist/pine-core/{p-d64527b2.system.entry.js → p-14b424ab.system.entry.js} +2 -2
  260. package/dist/pine-core/{p-eef645bd.system.entry.js → p-1858ad6d.system.entry.js} +2 -2
  261. package/dist/pine-core/p-19d08886.system.entry.js +2 -0
  262. package/dist/pine-core/p-19d08886.system.entry.js.map +1 -0
  263. package/dist/pine-core/{p-f7c02b89.entry.js → p-1a5e79af.entry.js} +2 -2
  264. package/dist/pine-core/p-209b1d69.entry.js +2 -0
  265. package/dist/pine-core/p-209b1d69.entry.js.map +1 -0
  266. package/dist/pine-core/p-2436cb86.system.entry.js +2 -0
  267. package/dist/pine-core/p-2436cb86.system.entry.js.map +1 -0
  268. package/dist/pine-core/{p-383af1d4.system.entry.js → p-276a6a8b.system.entry.js} +2 -2
  269. package/dist/pine-core/{p-e7322ff9.system.entry.js → p-280a0ec1.system.entry.js} +2 -2
  270. package/dist/pine-core/{p-160c6806.system.entry.js → p-2aad0209.system.entry.js} +2 -2
  271. package/dist/pine-core/{p-357b6dd6.system.entry.js → p-2fb60757.system.entry.js} +2 -2
  272. package/dist/pine-core/{p-ClrDO1lY.system.js.map → p-2kXtbFXu.system.js.map} +1 -1
  273. package/dist/pine-core/{p-5a1af174.entry.js → p-33016dd0.entry.js} +2 -2
  274. package/dist/pine-core/p-380d1056.entry.js +2 -0
  275. package/dist/pine-core/p-380d1056.entry.js.map +1 -0
  276. package/dist/pine-core/{p-d451c7b5.system.entry.js → p-39488f2c.system.entry.js} +2 -2
  277. package/dist/pine-core/p-3EWr6ZgL.system.js.map +1 -0
  278. package/dist/pine-core/{p-000ed179.entry.js → p-3e6229cc.entry.js} +3 -3
  279. package/dist/pine-core/{p-e0a6ba6f.system.entry.js → p-3f83d4c4.system.entry.js} +2 -2
  280. package/dist/pine-core/{p-e8a4eafa.system.entry.js → p-4066a9c0.system.entry.js} +2 -2
  281. package/dist/pine-core/{p-e8a4eafa.system.entry.js.map → p-4066a9c0.system.entry.js.map} +1 -1
  282. package/dist/pine-core/{p-2fbc5f8c.system.entry.js → p-41bf807f.system.entry.js} +2 -2
  283. package/dist/pine-core/{p-91520803.system.entry.js → p-487552a9.system.entry.js} +2 -2
  284. package/dist/pine-core/{p-b214c043.entry.js → p-4e5b9d19.entry.js} +2 -2
  285. package/dist/pine-core/{p-62bc2080.system.entry.js → p-51d83489.system.entry.js} +2 -2
  286. package/dist/pine-core/{p-a4d19fb1.entry.js → p-51e463bf.entry.js} +2 -2
  287. package/dist/pine-core/{p-a4d19fb1.entry.js.map → p-51e463bf.entry.js.map} +1 -1
  288. package/dist/pine-core/{p-f4fff209.system.entry.js → p-52af1890.system.entry.js} +2 -2
  289. package/dist/pine-core/{p-256d15bc.system.entry.js → p-55bf6be2.system.entry.js} +2 -2
  290. package/dist/pine-core/{p-47a7a65b.entry.js → p-5a709348.entry.js} +2 -2
  291. package/dist/pine-core/{p-fe73a67f.entry.js → p-63ef55dd.entry.js} +2 -2
  292. package/dist/pine-core/{p-fe73a67f.entry.js.map → p-63ef55dd.entry.js.map} +1 -1
  293. package/dist/pine-core/{p-d6b1f60d.system.entry.js → p-6438a29d.system.entry.js} +2 -2
  294. package/dist/pine-core/p-65275835.system.entry.js +2 -0
  295. package/dist/pine-core/p-65275835.system.entry.js.map +1 -0
  296. package/dist/pine-core/{p-6ef51211.entry.js → p-66b10d29.entry.js} +2 -2
  297. package/dist/pine-core/p-6bd5811c.system.entry.js +2 -0
  298. package/dist/pine-core/p-6bd5811c.system.entry.js.map +1 -0
  299. package/dist/pine-core/{p-b93825c4.system.entry.js → p-6d601fc2.system.entry.js} +2 -2
  300. package/dist/pine-core/{p-5fdbbab9.entry.js → p-6fd385ec.entry.js} +2 -2
  301. package/dist/pine-core/{p-7da6180d.system.entry.js → p-7a95a90f.system.entry.js} +2 -2
  302. package/dist/pine-core/{p-d989287d.entry.js → p-7c867f1b.entry.js} +2 -2
  303. package/dist/pine-core/{p-e416f7a8.system.entry.js → p-7eb4ac7c.system.entry.js} +2 -2
  304. package/dist/pine-core/{p-61b7ff04.system.entry.js → p-8096b988.system.entry.js} +2 -2
  305. package/dist/pine-core/p-8096b988.system.entry.js.map +1 -0
  306. package/dist/pine-core/{p-e53547e2.system.entry.js → p-81a28f54.system.entry.js} +2 -2
  307. package/dist/pine-core/{p-faaa1caa.system.entry.js → p-89d9f273.system.entry.js} +3 -3
  308. package/dist/pine-core/{p-36d3352a.entry.js → p-8cb99f2f.entry.js} +2 -2
  309. package/dist/pine-core/{p-82388e60.entry.js → p-91c6bd68.entry.js} +2 -2
  310. package/dist/pine-core/{p-64c897bb.entry.js → p-94982c57.entry.js} +2 -2
  311. package/dist/pine-core/{p-ef08f005.entry.js → p-978e722a.entry.js} +2 -2
  312. package/dist/pine-core/{p-cc15bf6c.system.entry.js → p-9860d0a8.system.entry.js} +2 -2
  313. package/dist/pine-core/p-987a7e4f.entry.js +2 -0
  314. package/dist/pine-core/p-987a7e4f.entry.js.map +1 -0
  315. package/dist/pine-core/{p-Bgszb25I.system.js.map → p-ACQU83St.system.js.map} +1 -1
  316. package/dist/pine-core/p-B0PUl1_1.system.js.map +1 -0
  317. package/dist/pine-core/{p-Cly-fzRE.system.js.map → p-B4ww2WM0.system.js.map} +1 -1
  318. package/dist/pine-core/{p-ydqm5FGv.system.js.map → p-B6IFMveo.system.js.map} +1 -1
  319. package/dist/pine-core/{p-B2gfQpwn.system.js.map → p-B7S-9dbT.system.js.map} +1 -1
  320. package/dist/pine-core/{p-DKGUedTE.system.js.map → p-BCZ4LK15.system.js.map} +1 -1
  321. package/dist/pine-core/{p-CLscfXhT.system.js.map → p-BEky6idI.system.js.map} +1 -1
  322. package/dist/pine-core/p-BG6uGRQj.system.js +2 -0
  323. package/dist/pine-core/p-BG6uGRQj.system.js.map +1 -0
  324. package/dist/pine-core/p-BGbUqsWH.system.js +2 -0
  325. package/dist/pine-core/p-BGbUqsWH.system.js.map +1 -0
  326. package/dist/pine-core/p-BVCWKPy3.js +3 -0
  327. package/dist/pine-core/p-BVCWKPy3.js.map +1 -0
  328. package/dist/pine-core/{p-B-xQ7Q5Y.system.js.map → p-BY7O1nGC.system.js.map} +1 -1
  329. package/dist/pine-core/p-B_C-mRjx.system.js +3 -0
  330. package/dist/pine-core/p-B_C-mRjx.system.js.map +1 -0
  331. package/dist/pine-core/{p-PwBWYqtO.system.js.map → p-B_c-HOvq.system.js.map} +1 -1
  332. package/dist/pine-core/p-BdBU6s5P.system.js.map +1 -0
  333. package/dist/pine-core/p-BmoX08WO.system.js.map +1 -0
  334. package/dist/pine-core/{p-Ci1ZzxGS.system.js.map → p-Bw9e5h_G.system.js.map} +1 -1
  335. package/dist/pine-core/{p-b6lYO9O3.system.js.map → p-C36pvE-A.system.js.map} +1 -1
  336. package/dist/pine-core/{p-CaJHqbdu.system.js.map → p-C3lnYhcV.system.js.map} +1 -1
  337. package/dist/pine-core/{p-CtuIf6LK.system.js.map → p-C5Wo1bN2.system.js.map} +1 -1
  338. package/dist/pine-core/{p-CTJnwc4I.system.js.map → p-C5Y492i0.system.js.map} +1 -1
  339. package/dist/pine-core/{p-lWwPttyv.system.js.map → p-CG_aggl0.system.js.map} +1 -1
  340. package/dist/pine-core/{p-zZHye4hT.system.js.map → p-CMLxdmO2.system.js.map} +1 -1
  341. package/dist/pine-core/{p-C47kwjaJ.system.js.map → p-CNOeJ6ra.system.js.map} +1 -1
  342. package/dist/pine-core/p-CXLBzkzl.system.js.map +1 -0
  343. package/dist/pine-core/{p-DQCWs_Ih.system.js.map → p-CbDQeXQ4.system.js.map} +1 -1
  344. package/dist/pine-core/{p-Bdnq3aMi.system.js.map → p-ChslVme6.system.js.map} +1 -1
  345. package/dist/pine-core/p-CmJBNVRO.system.js.map +1 -0
  346. package/dist/pine-core/{p-BPlIGHM4.system.js.map → p-CoHBlcHu.system.js.map} +1 -1
  347. package/dist/pine-core/{p-DX9uSGoE.system.js.map → p-CqzGa2j0.system.js.map} +1 -1
  348. package/dist/pine-core/{p-y1DacLeb.system.js.map → p-DCdSlcTO.system.js.map} +1 -1
  349. package/dist/pine-core/{p-mWJg54bF.system.js.map → p-DKuFjXiD.system.js.map} +1 -1
  350. package/dist/pine-core/{p-PuPjQNmU.system.js.map → p-DMNp4slx.system.js.map} +1 -1
  351. package/dist/pine-core/{p-CD40xhZg.system.js.map → p-DQ-QGnGf.system.js.map} +1 -1
  352. package/dist/pine-core/{p-DwwM3-D4.system.js.map → p-DQnK6lQ2.system.js.map} +1 -1
  353. package/dist/pine-core/{p-Gn2xhxDz.system.js.map → p-DRqkTTfb.system.js.map} +1 -1
  354. package/dist/pine-core/{p-CuHZffVk.system.js.map → p-DXuK7cEc.system.js.map} +1 -1
  355. package/dist/pine-core/{p-B-hSZadO.system.js.map → p-DYb5Y47j.system.js.map} +1 -1
  356. package/dist/pine-core/{p-D1LdgjO0.system.js.map → p-DdEbUZw3.system.js.map} +1 -1
  357. package/dist/pine-core/p-De9tROL-.system.js +2 -0
  358. package/dist/pine-core/{p-BsL2GDnH.system.js.map → p-De9tROL-.system.js.map} +1 -1
  359. package/dist/pine-core/p-DgMvQlxU.system.js.map +1 -0
  360. package/dist/pine-core/{p-BJRnZhwF.system.js.map → p-DvZWnvRb.system.js.map} +1 -1
  361. package/dist/pine-core/{p-ipxZYSGJ.system.js.map → p-EytFbMH4.system.js.map} +1 -1
  362. package/dist/pine-core/{p-Bpn2QYa2.system.js.map → p-KkT5zjJU.system.js.map} +1 -1
  363. package/dist/pine-core/{p-Bok_Wwo5.system.js.map → p-PgQPKVDh.system.js.map} +1 -1
  364. package/dist/pine-core/{p-BSg_Clcf.system.js.map → p-REBgf8JA.system.js.map} +1 -1
  365. package/dist/pine-core/{p-6tdMlyau.system.js.map → p-XHvXi3U6.system.js.map} +1 -1
  366. package/dist/pine-core/{p-2f0aedfa.entry.js → p-a2d16624.entry.js} +2 -2
  367. package/dist/pine-core/{p-3b43a1ea.entry.js → p-a54f1d9e.entry.js} +2 -2
  368. package/dist/pine-core/p-a7204f01.entry.js +2 -0
  369. package/dist/pine-core/p-a7cb24c3.system.entry.js +2 -0
  370. package/dist/pine-core/p-a7cb24c3.system.entry.js.map +1 -0
  371. package/dist/pine-core/p-aafb6e06.system.entry.js +2 -0
  372. package/dist/pine-core/p-aafb6e06.system.entry.js.map +1 -0
  373. package/dist/pine-core/{p-9df7ba40.system.entry.js → p-adf2449e.system.entry.js} +2 -2
  374. package/dist/pine-core/{p-e0a35811.system.entry.js → p-b2b405ca.system.entry.js} +3 -3
  375. package/dist/pine-core/p-b649d711.entry.js +2 -0
  376. package/dist/pine-core/p-b649d711.entry.js.map +1 -0
  377. package/dist/pine-core/{p-d21156cf.entry.js → p-b956922a.entry.js} +2 -2
  378. package/dist/pine-core/{p-5706c81b.system.entry.js → p-b9fe17b8.system.entry.js} +2 -2
  379. package/dist/pine-core/{p-af5c9fbd.system.entry.js → p-c1099665.system.entry.js} +2 -2
  380. package/dist/pine-core/{p-0c6e9ba0.system.entry.js → p-c1115d78.system.entry.js} +2 -2
  381. package/dist/pine-core/{p-6d36fae0.entry.js → p-c16d01cc.entry.js} +2 -2
  382. package/dist/pine-core/{p-b5dc7a18.entry.js → p-c1a1475e.entry.js} +2 -2
  383. package/dist/pine-core/{p-27b52fc5.entry.js → p-c1f5148f.entry.js} +2 -2
  384. package/dist/pine-core/p-c1f5148f.entry.js.map +1 -0
  385. package/dist/pine-core/{p-9e22eab5.system.entry.js → p-c3f32f26.system.entry.js} +2 -2
  386. package/dist/pine-core/{p-9e22eab5.system.entry.js.map → p-c3f32f26.system.entry.js.map} +1 -1
  387. package/dist/pine-core/{p-5033d9e8.entry.js → p-c652847a.entry.js} +2 -2
  388. package/dist/pine-core/{p-31fe86a6.entry.js → p-c7075f11.entry.js} +2 -2
  389. package/dist/pine-core/p-c7075f11.entry.js.map +1 -0
  390. package/dist/pine-core/p-c721e8cf.entry.js +2 -0
  391. package/dist/pine-core/p-c721e8cf.entry.js.map +1 -0
  392. package/dist/pine-core/{p-4d22ca40.entry.js → p-c82c277f.entry.js} +2 -2
  393. package/dist/pine-core/{p-f9005ac9.entry.js → p-c82d0a99.entry.js} +2 -2
  394. package/dist/pine-core/{p-c93786f1.system.entry.js → p-ce0d9f05.system.entry.js} +2 -2
  395. package/dist/pine-core/{p-9b8a3659.system.entry.js → p-cf5506db.system.entry.js} +2 -2
  396. package/dist/pine-core/{p-c5a7c8e9.system.entry.js → p-d08ecd18.system.entry.js} +2 -2
  397. package/dist/pine-core/{p-4a69106a.system.entry.js → p-d6d87fbc.system.entry.js} +2 -2
  398. package/dist/pine-core/{p-80246c79.entry.js → p-df15e16a.entry.js} +2 -2
  399. package/dist/pine-core/{p-d0ec666b.entry.js → p-e05135c5.entry.js} +2 -2
  400. package/dist/pine-core/{p-39fbd912.entry.js → p-e30601a6.entry.js} +2 -2
  401. package/dist/pine-core/{p-1e056ca3.system.entry.js → p-e3fb0bc2.system.entry.js} +2 -2
  402. package/dist/pine-core/{p-3bbb6fc1.entry.js → p-e8d76117.entry.js} +2 -2
  403. package/dist/pine-core/{p-f30b1479.entry.js → p-ed94947b.entry.js} +2 -2
  404. package/dist/pine-core/{p-822e90ee.entry.js → p-f35a5afa.entry.js} +2 -2
  405. package/dist/pine-core/{p-9cc1844a.system.entry.js → p-f647c1af.system.entry.js} +2 -2
  406. package/dist/pine-core/{p-1ef5f46b.system.entry.js → p-f9bd0bc2.system.entry.js} +2 -2
  407. package/dist/pine-core/{p-7a431264.system.entry.js → p-ffe867ef.system.entry.js} +2 -2
  408. package/dist/pine-core/{p-U_efBpHV.system.js.map → p-lMetQ5Q0.system.js.map} +1 -1
  409. package/dist/pine-core/{p-Bq1H4MPi.system.js.map → p-pm8ElBzm.system.js.map} +1 -1
  410. package/dist/pine-core/p-qjvXmIGJ.system.js.map +1 -0
  411. package/dist/pine-core/p-tJa4KYNO.js +2 -0
  412. package/dist/pine-core/p-tJa4KYNO.js.map +1 -0
  413. package/dist/pine-core/pds-box.entry.esm.js.map +1 -1
  414. package/dist/pine-core/pds-button.entry.esm.js.map +1 -1
  415. package/dist/pine-core/pds-checkbox.entry.esm.js.map +1 -1
  416. package/dist/pine-core/pds-input.entry.esm.js.map +1 -1
  417. package/dist/pine-core/pds-modal.entry.esm.js.map +1 -1
  418. package/dist/pine-core/pds-radio.entry.esm.js.map +1 -1
  419. package/dist/pine-core/pds-select.entry.esm.js.map +1 -1
  420. package/dist/pine-core/pds-switch.entry.esm.js.map +1 -1
  421. package/dist/pine-core/pds-textarea.entry.esm.js.map +1 -1
  422. package/dist/pine-core/pine-core.esm.js +1 -1
  423. package/dist/pine-core/pine-core.js +1 -1
  424. package/dist/types/components/pds-box/pds-box.d.ts +2 -1
  425. package/dist/types/components/pds-checkbox/pds-checkbox.d.ts +6 -0
  426. package/dist/types/components/pds-input/pds-input.d.ts +22 -0
  427. package/dist/types/components/pds-select/pds-select.d.ts +19 -0
  428. package/dist/types/components/pds-switch/pds-switch.d.ts +6 -0
  429. package/dist/types/components/pds-textarea/pds-textarea.d.ts +17 -0
  430. package/dist/types/components.d.ts +12 -4
  431. package/dist/types/utils/utils.d.ts +10 -3
  432. package/hydrate/index.js +359 -67
  433. package/hydrate/index.mjs +359 -67
  434. package/package.json +2 -2
  435. package/dist/cjs/index-CxX7ua5d.js.map +0 -1
  436. package/dist/cjs/utils-jWx-Mf12.js +0 -45
  437. package/dist/cjs/utils-jWx-Mf12.js.map +0 -1
  438. package/dist/esm/index-Uh5ntVcq.js.map +0 -1
  439. package/dist/esm/utils-DkabwBZT.js +0 -41
  440. package/dist/esm/utils-DkabwBZT.js.map +0 -1
  441. package/dist/esm-es5/index-Uh5ntVcq.js +0 -3
  442. package/dist/esm-es5/index-Uh5ntVcq.js.map +0 -1
  443. package/dist/esm-es5/utils-DkabwBZT.js +0 -2
  444. package/dist/esm-es5/utils-DkabwBZT.js.map +0 -1
  445. package/dist/pine-core/p-27b52fc5.entry.js.map +0 -1
  446. package/dist/pine-core/p-307b456a.entry.js +0 -2
  447. package/dist/pine-core/p-307b456a.entry.js.map +0 -1
  448. package/dist/pine-core/p-31fe86a6.entry.js.map +0 -1
  449. package/dist/pine-core/p-38248640.entry.js +0 -2
  450. package/dist/pine-core/p-38248640.entry.js.map +0 -1
  451. package/dist/pine-core/p-3fd658ad.system.entry.js +0 -2
  452. package/dist/pine-core/p-3fd658ad.system.entry.js.map +0 -1
  453. package/dist/pine-core/p-447fa824.system.entry.js +0 -2
  454. package/dist/pine-core/p-447fa824.system.entry.js.map +0 -1
  455. package/dist/pine-core/p-495a206d.entry.js +0 -2
  456. package/dist/pine-core/p-495a206d.entry.js.map +0 -1
  457. package/dist/pine-core/p-61b7ff04.system.entry.js.map +0 -1
  458. package/dist/pine-core/p-708c66c2.entry.js +0 -2
  459. package/dist/pine-core/p-708c66c2.entry.js.map +0 -1
  460. package/dist/pine-core/p-73412ca9.system.entry.js +0 -2
  461. package/dist/pine-core/p-73412ca9.system.entry.js.map +0 -1
  462. package/dist/pine-core/p-982edcaf.system.entry.js.map +0 -1
  463. package/dist/pine-core/p-BHZ6CSg4.system.js.map +0 -1
  464. package/dist/pine-core/p-BhPuKJbQ.system.js +0 -2
  465. package/dist/pine-core/p-BhPuKJbQ.system.js.map +0 -1
  466. package/dist/pine-core/p-BlpTiOHo.system.js.map +0 -1
  467. package/dist/pine-core/p-BsL2GDnH.system.js +0 -2
  468. package/dist/pine-core/p-CLsVcJCa.system.js.map +0 -1
  469. package/dist/pine-core/p-CUHK9C55.system.js.map +0 -1
  470. package/dist/pine-core/p-C_8VmA8d.system.js +0 -3
  471. package/dist/pine-core/p-C_8VmA8d.system.js.map +0 -1
  472. package/dist/pine-core/p-Ctwx2R4g.system.js.map +0 -1
  473. package/dist/pine-core/p-CuIq_L5Z.system.js +0 -2
  474. package/dist/pine-core/p-CuIq_L5Z.system.js.map +0 -1
  475. package/dist/pine-core/p-DJPo1iGw.system.js.map +0 -1
  476. package/dist/pine-core/p-DNqc41uY.system.js.map +0 -1
  477. package/dist/pine-core/p-DkabwBZT.js +0 -2
  478. package/dist/pine-core/p-DkabwBZT.js.map +0 -1
  479. package/dist/pine-core/p-DxydR7R6.system.js.map +0 -1
  480. package/dist/pine-core/p-Uh5ntVcq.js +0 -3
  481. package/dist/pine-core/p-Uh5ntVcq.js.map +0 -1
  482. package/dist/pine-core/p-d2d6b3a6.system.entry.js +0 -2
  483. package/dist/pine-core/p-d2d6b3a6.system.entry.js.map +0 -1
  484. package/dist/pine-core/p-e68dd704.system.entry.js +0 -2
  485. package/dist/pine-core/p-e68dd704.system.entry.js.map +0 -1
  486. package/dist/pine-core/p-ec1c3452.system.entry.js +0 -2
  487. package/dist/pine-core/p-ec1c3452.system.entry.js.map +0 -1
  488. package/dist/pine-core/p-ee0117a2.entry.js +0 -2
  489. package/dist/pine-core/p-ee0117a2.entry.js.map +0 -1
  490. package/dist/pine-core/p-f256dd8a.entry.js +0 -2
  491. package/dist/pine-core/p-f256dd8a.entry.js.map +0 -1
  492. package/dist/pine-core/p-f455deb5.entry.js +0 -2
  493. /package/dist/pine-core/{p-fd3b7077.entry.js.map → p-0066d249.entry.js.map} +0 -0
  494. /package/dist/pine-core/{p-c5da4a97.system.entry.js.map → p-0199e3e9.system.entry.js.map} +0 -0
  495. /package/dist/pine-core/{p-9d8bb7f7.system.entry.js.map → p-051ff780.system.entry.js.map} +0 -0
  496. /package/dist/pine-core/{p-2a2cd90d.entry.js.map → p-064e3d73.entry.js.map} +0 -0
  497. /package/dist/pine-core/{p-90a8d1bd.entry.js.map → p-075eecf9.entry.js.map} +0 -0
  498. /package/dist/pine-core/{p-3df372d1.entry.js.map → p-0a4fc9c7.entry.js.map} +0 -0
  499. /package/dist/pine-core/{p-30449e82.entry.js.map → p-0dbb2ae9.entry.js.map} +0 -0
  500. /package/dist/pine-core/{p-667eb50e.entry.js.map → p-11d4036e.entry.js.map} +0 -0
  501. /package/dist/pine-core/{p-f29baa16.entry.js.map → p-126197e5.entry.js.map} +0 -0
  502. /package/dist/pine-core/{p-b6d18604.entry.js.map → p-13ac0852.entry.js.map} +0 -0
  503. /package/dist/pine-core/{p-d64527b2.system.entry.js.map → p-14b424ab.system.entry.js.map} +0 -0
  504. /package/dist/pine-core/{p-eef645bd.system.entry.js.map → p-1858ad6d.system.entry.js.map} +0 -0
  505. /package/dist/pine-core/{p-f7c02b89.entry.js.map → p-1a5e79af.entry.js.map} +0 -0
  506. /package/dist/pine-core/{p-383af1d4.system.entry.js.map → p-276a6a8b.system.entry.js.map} +0 -0
  507. /package/dist/pine-core/{p-e7322ff9.system.entry.js.map → p-280a0ec1.system.entry.js.map} +0 -0
  508. /package/dist/pine-core/{p-160c6806.system.entry.js.map → p-2aad0209.system.entry.js.map} +0 -0
  509. /package/dist/pine-core/{p-357b6dd6.system.entry.js.map → p-2fb60757.system.entry.js.map} +0 -0
  510. /package/dist/pine-core/{p-5a1af174.entry.js.map → p-33016dd0.entry.js.map} +0 -0
  511. /package/dist/pine-core/{p-d451c7b5.system.entry.js.map → p-39488f2c.system.entry.js.map} +0 -0
  512. /package/dist/pine-core/{p-000ed179.entry.js.map → p-3e6229cc.entry.js.map} +0 -0
  513. /package/dist/pine-core/{p-e0a6ba6f.system.entry.js.map → p-3f83d4c4.system.entry.js.map} +0 -0
  514. /package/dist/pine-core/{p-2fbc5f8c.system.entry.js.map → p-41bf807f.system.entry.js.map} +0 -0
  515. /package/dist/pine-core/{p-91520803.system.entry.js.map → p-487552a9.system.entry.js.map} +0 -0
  516. /package/dist/pine-core/{p-b214c043.entry.js.map → p-4e5b9d19.entry.js.map} +0 -0
  517. /package/dist/pine-core/{p-62bc2080.system.entry.js.map → p-51d83489.system.entry.js.map} +0 -0
  518. /package/dist/pine-core/{p-f4fff209.system.entry.js.map → p-52af1890.system.entry.js.map} +0 -0
  519. /package/dist/pine-core/{p-256d15bc.system.entry.js.map → p-55bf6be2.system.entry.js.map} +0 -0
  520. /package/dist/pine-core/{p-47a7a65b.entry.js.map → p-5a709348.entry.js.map} +0 -0
  521. /package/dist/pine-core/{p-d6b1f60d.system.entry.js.map → p-6438a29d.system.entry.js.map} +0 -0
  522. /package/dist/pine-core/{p-6ef51211.entry.js.map → p-66b10d29.entry.js.map} +0 -0
  523. /package/dist/pine-core/{p-b93825c4.system.entry.js.map → p-6d601fc2.system.entry.js.map} +0 -0
  524. /package/dist/pine-core/{p-5fdbbab9.entry.js.map → p-6fd385ec.entry.js.map} +0 -0
  525. /package/dist/pine-core/{p-7da6180d.system.entry.js.map → p-7a95a90f.system.entry.js.map} +0 -0
  526. /package/dist/pine-core/{p-d989287d.entry.js.map → p-7c867f1b.entry.js.map} +0 -0
  527. /package/dist/pine-core/{p-e416f7a8.system.entry.js.map → p-7eb4ac7c.system.entry.js.map} +0 -0
  528. /package/dist/pine-core/{p-e53547e2.system.entry.js.map → p-81a28f54.system.entry.js.map} +0 -0
  529. /package/dist/pine-core/{p-faaa1caa.system.entry.js.map → p-89d9f273.system.entry.js.map} +0 -0
  530. /package/dist/pine-core/{p-36d3352a.entry.js.map → p-8cb99f2f.entry.js.map} +0 -0
  531. /package/dist/pine-core/{p-82388e60.entry.js.map → p-91c6bd68.entry.js.map} +0 -0
  532. /package/dist/pine-core/{p-64c897bb.entry.js.map → p-94982c57.entry.js.map} +0 -0
  533. /package/dist/pine-core/{p-ef08f005.entry.js.map → p-978e722a.entry.js.map} +0 -0
  534. /package/dist/pine-core/{p-cc15bf6c.system.entry.js.map → p-9860d0a8.system.entry.js.map} +0 -0
  535. /package/dist/pine-core/{p-2f0aedfa.entry.js.map → p-a2d16624.entry.js.map} +0 -0
  536. /package/dist/pine-core/{p-3b43a1ea.entry.js.map → p-a54f1d9e.entry.js.map} +0 -0
  537. /package/dist/pine-core/{p-f455deb5.entry.js.map → p-a7204f01.entry.js.map} +0 -0
  538. /package/dist/pine-core/{p-9df7ba40.system.entry.js.map → p-adf2449e.system.entry.js.map} +0 -0
  539. /package/dist/pine-core/{p-e0a35811.system.entry.js.map → p-b2b405ca.system.entry.js.map} +0 -0
  540. /package/dist/pine-core/{p-d21156cf.entry.js.map → p-b956922a.entry.js.map} +0 -0
  541. /package/dist/pine-core/{p-5706c81b.system.entry.js.map → p-b9fe17b8.system.entry.js.map} +0 -0
  542. /package/dist/pine-core/{p-af5c9fbd.system.entry.js.map → p-c1099665.system.entry.js.map} +0 -0
  543. /package/dist/pine-core/{p-0c6e9ba0.system.entry.js.map → p-c1115d78.system.entry.js.map} +0 -0
  544. /package/dist/pine-core/{p-6d36fae0.entry.js.map → p-c16d01cc.entry.js.map} +0 -0
  545. /package/dist/pine-core/{p-b5dc7a18.entry.js.map → p-c1a1475e.entry.js.map} +0 -0
  546. /package/dist/pine-core/{p-5033d9e8.entry.js.map → p-c652847a.entry.js.map} +0 -0
  547. /package/dist/pine-core/{p-4d22ca40.entry.js.map → p-c82c277f.entry.js.map} +0 -0
  548. /package/dist/pine-core/{p-f9005ac9.entry.js.map → p-c82d0a99.entry.js.map} +0 -0
  549. /package/dist/pine-core/{p-c93786f1.system.entry.js.map → p-ce0d9f05.system.entry.js.map} +0 -0
  550. /package/dist/pine-core/{p-9b8a3659.system.entry.js.map → p-cf5506db.system.entry.js.map} +0 -0
  551. /package/dist/pine-core/{p-c5a7c8e9.system.entry.js.map → p-d08ecd18.system.entry.js.map} +0 -0
  552. /package/dist/pine-core/{p-4a69106a.system.entry.js.map → p-d6d87fbc.system.entry.js.map} +0 -0
  553. /package/dist/pine-core/{p-80246c79.entry.js.map → p-df15e16a.entry.js.map} +0 -0
  554. /package/dist/pine-core/{p-d0ec666b.entry.js.map → p-e05135c5.entry.js.map} +0 -0
  555. /package/dist/pine-core/{p-39fbd912.entry.js.map → p-e30601a6.entry.js.map} +0 -0
  556. /package/dist/pine-core/{p-1e056ca3.system.entry.js.map → p-e3fb0bc2.system.entry.js.map} +0 -0
  557. /package/dist/pine-core/{p-3bbb6fc1.entry.js.map → p-e8d76117.entry.js.map} +0 -0
  558. /package/dist/pine-core/{p-f30b1479.entry.js.map → p-ed94947b.entry.js.map} +0 -0
  559. /package/dist/pine-core/{p-822e90ee.entry.js.map → p-f35a5afa.entry.js.map} +0 -0
  560. /package/dist/pine-core/{p-9cc1844a.system.entry.js.map → p-f647c1af.system.entry.js.map} +0 -0
  561. /package/dist/pine-core/{p-1ef5f46b.system.entry.js.map → p-f9bd0bc2.system.entry.js.map} +0 -0
  562. /package/dist/pine-core/{p-7a431264.system.entry.js.map → p-ffe867ef.system.entry.js.map} +0 -0
@@ -1073,7 +1073,7 @@ pds-box {
1073
1073
  }
1074
1074
 
1075
1075
  .pds-border-radius-md {
1076
- border-radius: var(--pine-dimension-100);
1076
+ border-radius: var(--pine-dimension-125);
1077
1077
  }
1078
1078
 
1079
1079
  .pds-border-radius-lg {
@@ -1,4 +1,5 @@
1
1
  import { h, Host } from "@stencil/core";
2
+ import { normalizeColorValue } from "../../utils/utils";
2
3
  export class PdsBox {
3
4
  constructor() {
4
5
  /**
@@ -17,7 +18,7 @@ export class PdsBox {
17
18
  ${this.display !== undefined && this.display.trim() !== '' ? `pds-box--display-${this.display}` : ''}
18
19
  ${this.fit ? 'pds-box--fit' : ''}
19
20
  ${this.gap !== undefined && this.gap.trim() !== '' ? `pds-box-gap-${this.gap}` : ''}
20
- ${this.flex !== undefined && this.flex.trim() !== '' ? `pds-box--flex-${this.flex}` : ''}
21
+ ${this.flex !== undefined && this.flex.trim() !== '' && ['none', 'grow', 'shrink'].includes(this.flex) ? `pds-box--flex-${this.flex}` : ''}
21
22
  ${this.justifyContent !== undefined && this.justifyContent.trim() !== '' ? `pds-justify-content-${this.justifyContent}` : ''}
22
23
  ${this.marginBlockStart !== undefined && this.marginBlockStart.trim() !== '' ? `pds-margin-block-start-${this.marginBlockStart}` : ''}
23
24
  ${this.marginInlineStart !== undefined && this.marginInlineStart.trim() !== '' ? `pds-margin-inline-start-${this.marginInlineStart}` : ''}
@@ -47,8 +48,11 @@ export class PdsBox {
47
48
  this.sizeLg == undefined &&
48
49
  this.sizeXl == undefined ? 'pds-box' : ''}
49
50
  `;
50
- const boxInlineStyles = Object.assign(Object.assign(Object.assign(Object.assign({}, (this.backgroundColor && { '--color-background-box': this.backgroundColor })), (this.borderColor && { '--color-border-box': this.borderColor })), (this.minHeight && { '--sizing-min-height-box': this.minHeight })), (this.minWidth && { '--sizing-min-width-box': this.minWidth }));
51
- return (h(Host, { key: '5a16a73506e9322444b85626dc71dceacbfac263', class: boxClasses, style: boxInlineStyles }));
51
+ // Normalize so pds-box accepts --token, var(--token), or literals (no semantic names)
52
+ const normalizedBackground = normalizeColorValue(this.backgroundColor);
53
+ const normalizedBorder = normalizeColorValue(this.borderColor);
54
+ const boxInlineStyles = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (normalizedBackground && { '--color-background-box': normalizedBackground })), (normalizedBorder && { '--color-border-box': normalizedBorder })), (this.minHeight && { '--sizing-min-height-box': this.minHeight })), (this.minWidth && { '--sizing-min-width-box': this.minWidth })), (this.flex && !['none', 'grow', 'shrink'].includes(this.flex) && { 'flex': this.flex }));
55
+ return (h(Host, { key: 'ba5e7700117f6cf138ce1346676b44c50e746563', class: boxClasses, style: boxInlineStyles }));
52
56
  }
53
57
  static get is() { return "pds-box"; }
54
58
  static get originalStyleUrls() {
@@ -301,8 +305,8 @@ export class PdsBox {
301
305
  "type": "string",
302
306
  "mutable": false,
303
307
  "complexType": {
304
- "original": "`none` | `grow` | `shrink`",
305
- "resolved": "\"grow\" | \"none\" | \"shrink\"",
308
+ "original": "`none` | `grow` | `shrink` | string",
309
+ "resolved": "string",
306
310
  "references": {}
307
311
  },
308
312
  "required": false,
@@ -312,7 +316,7 @@ export class PdsBox {
312
316
  "name": "defaultValue",
313
317
  "text": "none"
314
318
  }],
315
- "text": "Defines how a box will grow or shrink to fit the space available in its container."
319
+ "text": "Defines how a box will grow or shrink to fit the space available in its container.\nCan be a predefined value ('none', 'grow', 'shrink') or a custom flex value (e.g., '1', '0 1 auto')."
316
320
  },
317
321
  "getter": false,
318
322
  "setter": false,
@@ -1 +1 @@
1
- {"version":3,"file":"pds-box.js","sourceRoot":"","sources":["../../../src/components/pds-box/pds-box.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAQzD,MAAM,OAAO,MAAM;IAJnB;QA2BE;;WAEG;QAC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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, Host, Prop } from '@stencil/core';\n\nimport { BoxColumnType, BoxTShirtSizeType, BoxShadowSizeType } from '../../utils/types';\n\n@Component({\n tag: 'pds-box',\n styleUrl: 'pds-box.scss',\n})\nexport class PdsBox {\n /**\n * Defines how items within the box are aligned.\n * @defaultValue start\n */\n @Prop() alignItems?: `start` | `center` | `end` | `baseline` | `stretch`;\n\n /**\n * Defines how the box is aligned within its container.\n * @defaultValue start\n */\n @Prop() alignSelf?: `start` | `center` | `end` | `baseline` | `stretch`;\n\n /**\n * If `true`, the box will be sized to fit its contents.\n */\n @Prop() auto?: boolean;\n\n /**\n * Defines the background-color of the box.\n */\n @Prop() backgroundColor?: string;\n\n /**\n * If `true`, the box will have a border.\n */\n @Prop() border? = false;\n\n /**\n * Defines the border color of the box.\n */\n @Prop() borderColor?: string;\n\n /**\n * Defines how rounded the box corners are.\n * @defaultValue none\n */\n @Prop() borderRadius?: `none` | `xs`| `sm` | `md` | `lg` | `circle`;\n\n /**\n * Defines the orientation of the box items.\n * @defaultValue row\n */\n @Prop() direction?: `row` | `column`;\n\n /**\n * Defines the display style of the box.\n * @defaultValue flex\n */\n @Prop() display?: `flex` | `inline-flex` | `block` | `inline-block`;\n\n /**\n * If `true`, sets the box `max-width` to `100%`.\n */\n @Prop() fit?: boolean;\n\n /**\n * Defines the spacing between the box items.\n * @defaultValue none\n */\n @Prop() gap?: BoxTShirtSizeType;\n\n /**\n * Defines how a box will grow or shrink to fit the space available in its container.\n * @defaultValue none\n */\n @Prop() flex?: `none` | `grow` | `shrink`;\n\n /**\n * Defines the horizontal alignment of the box items.\n * @defaultValue start\n */\n @Prop() justifyContent?: `start` | `center` | `end` | `space-between` | `space-around`;\n\n /**\n * Defines the box's outer top spacing.\n * @defaultValue none\n */\n @Prop() marginBlockStart?: BoxTShirtSizeType;\n\n /**\n * Defines the box's outer left spacing.\n * @defaultValue none\n */\n @Prop() marginInlineStart?: BoxTShirtSizeType;\n\n /**\n * Defines the box's outer right spacing.\n * @defaultValue none\n */\n @Prop() marginInlineEnd?: BoxTShirtSizeType;\n\n /**\n * Defines the box's outer bottom spacing.\n * @defaultValue none\n */\n @Prop() marginBlockEnd?: BoxTShirtSizeType;\n\n /**\n * The minimum height of the row. Used in conjunction with alignment props\n */\n @Prop() minHeight?: string;\n\n /**\n * The minimum width of the row. Used in conjunction with alignment props\n */\n @Prop() minWidth?: string;\n\n /**\n * Move columns to the end direction of the row for all screen sizes. Increases the starting margin of a column by specified number of columns.\n */\n @Prop() offset?: BoxColumnType;\n\n /**\n * Move columns to the end direction of the row for `XS` screen sizes. Increases the starting margin of a column by specified number of columns.\n */\n @Prop() offsetXs?: BoxColumnType;\n\n /**\n * Move columns to the end direction of the row for `SM` screen sizes. Increases the starting margin of a column by specified number of columns.\n */\n @Prop() offsetSm?: BoxColumnType;\n\n /**\n * Move columns to the end direction of the row for `MD` screen sizes. Increases the starting margin of a column by specified number of columns.\n */\n @Prop() offsetMd?: BoxColumnType;\n\n /**\n * Move columns to the end direction of the row for `LG` screen sizes. Increases the starting margin of a column by specified number of columns.\n */\n @Prop() offsetLg?: BoxColumnType;\n\n /**\n * Move columns to the end direction of the row for `XL` screen sizes. Increases the starting margin of a column by specified number of columns.\n */\n @Prop() offsetXl?: BoxColumnType;\n\n /**\n * Defines the spacing between the box items.\n * @defaultValue none\n */\n @Prop() padding?: BoxTShirtSizeType;\n\n\n /**\n * Defines the top spacing.\n * @defaultValue none\n */\n @Prop() paddingBlockStart?: BoxTShirtSizeType;\n\n /**\n * Defines the bottom spacing.\n * @defaultValue none\n */\n @Prop() paddingBlockEnd?: BoxTShirtSizeType;\n\n /**\n * Defines the left spacing.\n * @defaultValue none\n */\n @Prop() paddingInlineStart?: BoxTShirtSizeType;\n\n /**\n * Defines the right spacing.\n * @defaultValue none\n */\n @Prop() paddingInlineEnd?: BoxTShirtSizeType;\n\n /**\n * Defines the box shadow.\n * @defaultValue none\n */\n @Prop() shadow?: BoxShadowSizeType;\n\n /**\n * Sets the default column width for the component. This value applies from the smallest screen size (XS) upwards, unless overridden by a breakpoint-specific size prop at that breakpoint or larger.\n */\n @Prop() size?: BoxColumnType;\n\n /**\n * At the XS breakpoint, this prop will take the number of columns specified. This overrides the base size prop for this specific range.\n */\n @Prop() sizeXs?: BoxColumnType;\n\n /**\n * At screen sizes from the SM breakpoint and larger (576px and up), this will take the specified number of columns. This overrides any value set by size or sizeXs.\n */\n @Prop() sizeSm?: BoxColumnType;\n\n /**\n * At screen sizes from the MD breakpoint and larger (768px and up), this will take the specified number of columns. This overrides any value set by size, sizeXs, and up.\n */\n @Prop() sizeMd?: BoxColumnType;\n\n /**\n * At screen sizes from the LG breakpoint and larger (992px and up), this will take the specified number of columns. This overrides any value set by size, sizeXs, and up.\n */\n @Prop() sizeLg?: BoxColumnType;\n\n /**\n * At screen sizes from the XL breakpoint and larger (1200px and up), this will take the specified number of columns. This overrides any value set by size, sizeXs, and up.\n */\n @Prop() sizeXl?: BoxColumnType;\n\n\n\n render() {\n const boxClasses = `\n ${this.alignItems !== undefined && this.alignItems.trim() !== '' ? `pds-align-items-${this.alignItems}` : ''}\n ${this.alignSelf !== undefined && this.alignSelf.trim() !== '' ? `pds-align-self-${this.alignSelf}` : ''}\n ${this.auto ? 'pds-box--auto' : ''}\n ${this.border ? 'pds-box--border' : ''}\n ${this.borderRadius !== undefined && this.borderRadius.trim() !== '' ? `pds-border-radius-${this.borderRadius}` : ''}\n ${this.direction !== undefined && this.direction.trim() !== '' ? `pds-box-direction-${this.direction}` : ''}\n ${this.display !== undefined && this.display.trim() !== '' ? `pds-box--display-${this.display}` : ''}\n ${this.fit ? 'pds-box--fit' : ''}\n ${this.gap !== undefined && this.gap.trim() !== '' ? `pds-box-gap-${this.gap}` : ''}\n ${this.flex !== undefined && this.flex.trim() !== '' ? `pds-box--flex-${this.flex}` : ''}\n ${this.justifyContent !== undefined && this.justifyContent.trim() !== '' ? `pds-justify-content-${this.justifyContent}` : ''}\n ${this.marginBlockStart !== undefined && this.marginBlockStart.trim() !== '' ? `pds-margin-block-start-${this.marginBlockStart}` : ''}\n ${this.marginInlineStart !== undefined && this.marginInlineStart.trim() !== '' ? `pds-margin-inline-start-${this.marginInlineStart}` : ''}\n ${this.marginInlineEnd !== undefined && this.marginInlineEnd.trim() !== '' ? `pds-margin-inline-end-${this.marginInlineEnd}` : ''}\n ${this.marginBlockEnd !== undefined && this.marginBlockEnd.trim() !== '' ? `pds-margin-block-end-${this.marginBlockEnd}` : ''}\n ${this.offset !== undefined && this.offset.trim() !== '' ? `pds-box-offset-${this.offset}` : ''}\n ${this.offsetXs !== undefined && this.offsetXs.trim() !== '' ? `pds-box-offset-xs-${this.offsetXs}` : ''}\n ${this.offsetSm !== undefined && this.offsetSm.trim() !== '' ? `pds-box-offset-sm-${this.offsetSm}` : ''}\n ${this.offsetMd !== undefined && this.offsetMd.trim() !== '' ? `pds-box-offset-md-${this.offsetMd}` : ''}\n ${this.offsetLg !== undefined && this.offsetLg.trim() !== '' ? `pds-box-offset-lg-${this.offsetLg}` : ''}\n ${this.offsetXl !== undefined && this.offsetXl.trim() !== '' ? `pds-box-offset-xl-${this.offsetXl}` : ''}\n ${this.padding !== undefined && this.padding.trim() !== '' ? `pds-padding-${this.padding}` : ''}\n ${this.paddingBlockStart !== undefined && this.paddingBlockStart.trim() !== '' ? `pds-padding-block-start-${this.paddingBlockStart}` : ''}\n ${this.paddingBlockEnd !== undefined && this.paddingBlockEnd.trim() !== '' ? `pds-padding-block-end-${this.paddingBlockEnd}` : ''}\n ${this.paddingInlineStart !== undefined && this.paddingInlineStart.trim() !== '' ? `pds-padding-inline-start-${this.paddingInlineStart}` : ''}\n ${this.paddingInlineEnd !== undefined && this.paddingInlineEnd.trim() !== '' ? `pds-padding-inline-end-${this.paddingInlineEnd}` : ''}\n ${this.shadow !== undefined && this.shadow.trim() !== '' ? `pds-shadow-${this.shadow}` : ''}\n ${this.size !== undefined && this.size.trim() !== '' ? `pds-box pds-box-${this.size}` : ''}\n ${this.sizeXs !== undefined && this.sizeXs.trim() !== '' ? `pds-box-xs-${this.sizeXs}` : ''}\n ${this.sizeSm !== undefined && this.sizeSm.trim() !== '' ? `pds-box-sm-${this.sizeSm}` : ''}\n ${this.sizeMd !== undefined && this.sizeMd.trim() !== '' ? `pds-box-md-${this.sizeMd}` : ''}\n ${this.sizeLg !== undefined && this.sizeLg.trim() !== '' ? `pds-box-lg-${this.sizeLg}` : ''}\n ${this.sizeXl !== undefined && this.sizeXl.trim() !== '' ? `pds-box-xl-${this.sizeXl}` : ''}\n ${this.size == undefined &&\n this.sizeSm == undefined &&\n this.sizeMd == undefined &&\n this.sizeLg == undefined &&\n this.sizeXl == undefined ? 'pds-box' : ''}\n `;\n\n const boxInlineStyles = {\n ...(this.backgroundColor && { '--color-background-box': this.backgroundColor }),\n ...(this.borderColor && { '--color-border-box': this.borderColor }),\n ...(this.minHeight && { '--sizing-min-height-box': this.minHeight }),\n ...(this.minWidth && { '--sizing-min-width-box': this.minWidth }),\n };\n\n return (\n <Host class={boxClasses} style={boxInlineStyles}>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"pds-box.js","sourceRoot":"","sources":["../../../src/components/pds-box/pds-box.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAGzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAMxD,MAAM,OAAO,MAAM;IAJnB;QA2BE;;WAEG;QACK,WAAM,GAAI,KAAK,CAAC;KAiPzB;IA3DC,MAAM;QACJ,MAAM,UAAU,GAAG;MACjB,IAAI,CAAC,UAAU,KAAK,SAAS,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,mBAAmB,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE;MAC1G,IAAI,CAAC,SAAS,KAAK,SAAS,IAAI,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,kBAAkB,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE;MACtG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE;MAChC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE;MACpC,IAAI,CAAC,YAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, Host, Prop } from '@stencil/core';\n\nimport { BoxColumnType, BoxTShirtSizeType, BoxShadowSizeType } from '../../utils/types';\nimport { normalizeColorValue } from '../../utils/utils';\n\n@Component({\n tag: 'pds-box',\n styleUrl: 'pds-box.scss',\n})\nexport class PdsBox {\n /**\n * Defines how items within the box are aligned.\n * @defaultValue start\n */\n @Prop() alignItems?: `start` | `center` | `end` | `baseline` | `stretch`;\n\n /**\n * Defines how the box is aligned within its container.\n * @defaultValue start\n */\n @Prop() alignSelf?: `start` | `center` | `end` | `baseline` | `stretch`;\n\n /**\n * If `true`, the box will be sized to fit its contents.\n */\n @Prop() auto?: boolean;\n\n /**\n * Defines the background-color of the box.\n */\n @Prop() backgroundColor?: string;\n\n /**\n * If `true`, the box will have a border.\n */\n @Prop() border? = false;\n\n /**\n * Defines the border color of the box.\n */\n @Prop() borderColor?: string;\n\n /**\n * Defines how rounded the box corners are.\n * @defaultValue none\n */\n @Prop() borderRadius?: `none` | `xs`| `sm` | `md` | `lg` | `circle`;\n\n /**\n * Defines the orientation of the box items.\n * @defaultValue row\n */\n @Prop() direction?: `row` | `column`;\n\n /**\n * Defines the display style of the box.\n * @defaultValue flex\n */\n @Prop() display?: `flex` | `inline-flex` | `block` | `inline-block`;\n\n /**\n * If `true`, sets the box `max-width` to `100%`.\n */\n @Prop() fit?: boolean;\n\n /**\n * Defines the spacing between the box items.\n * @defaultValue none\n */\n @Prop() gap?: BoxTShirtSizeType;\n\n /**\n * Defines how a box will grow or shrink to fit the space available in its container.\n * Can be a predefined value ('none', 'grow', 'shrink') or a custom flex value (e.g., '1', '0 1 auto').\n * @defaultValue none\n */\n @Prop() flex?: `none` | `grow` | `shrink` | string;\n\n /**\n * Defines the horizontal alignment of the box items.\n * @defaultValue start\n */\n @Prop() justifyContent?: `start` | `center` | `end` | `space-between` | `space-around`;\n\n /**\n * Defines the box's outer top spacing.\n * @defaultValue none\n */\n @Prop() marginBlockStart?: BoxTShirtSizeType;\n\n /**\n * Defines the box's outer left spacing.\n * @defaultValue none\n */\n @Prop() marginInlineStart?: BoxTShirtSizeType;\n\n /**\n * Defines the box's outer right spacing.\n * @defaultValue none\n */\n @Prop() marginInlineEnd?: BoxTShirtSizeType;\n\n /**\n * Defines the box's outer bottom spacing.\n * @defaultValue none\n */\n @Prop() marginBlockEnd?: BoxTShirtSizeType;\n\n /**\n * The minimum height of the row. Used in conjunction with alignment props\n */\n @Prop() minHeight?: string;\n\n /**\n * The minimum width of the row. Used in conjunction with alignment props\n */\n @Prop() minWidth?: string;\n\n /**\n * Move columns to the end direction of the row for all screen sizes. Increases the starting margin of a column by specified number of columns.\n */\n @Prop() offset?: BoxColumnType;\n\n /**\n * Move columns to the end direction of the row for `XS` screen sizes. Increases the starting margin of a column by specified number of columns.\n */\n @Prop() offsetXs?: BoxColumnType;\n\n /**\n * Move columns to the end direction of the row for `SM` screen sizes. Increases the starting margin of a column by specified number of columns.\n */\n @Prop() offsetSm?: BoxColumnType;\n\n /**\n * Move columns to the end direction of the row for `MD` screen sizes. Increases the starting margin of a column by specified number of columns.\n */\n @Prop() offsetMd?: BoxColumnType;\n\n /**\n * Move columns to the end direction of the row for `LG` screen sizes. Increases the starting margin of a column by specified number of columns.\n */\n @Prop() offsetLg?: BoxColumnType;\n\n /**\n * Move columns to the end direction of the row for `XL` screen sizes. Increases the starting margin of a column by specified number of columns.\n */\n @Prop() offsetXl?: BoxColumnType;\n\n /**\n * Defines the spacing between the box items.\n * @defaultValue none\n */\n @Prop() padding?: BoxTShirtSizeType;\n\n\n /**\n * Defines the top spacing.\n * @defaultValue none\n */\n @Prop() paddingBlockStart?: BoxTShirtSizeType;\n\n /**\n * Defines the bottom spacing.\n * @defaultValue none\n */\n @Prop() paddingBlockEnd?: BoxTShirtSizeType;\n\n /**\n * Defines the left spacing.\n * @defaultValue none\n */\n @Prop() paddingInlineStart?: BoxTShirtSizeType;\n\n /**\n * Defines the right spacing.\n * @defaultValue none\n */\n @Prop() paddingInlineEnd?: BoxTShirtSizeType;\n\n /**\n * Defines the box shadow.\n * @defaultValue none\n */\n @Prop() shadow?: BoxShadowSizeType;\n\n /**\n * Sets the default column width for the component. This value applies from the smallest screen size (XS) upwards, unless overridden by a breakpoint-specific size prop at that breakpoint or larger.\n */\n @Prop() size?: BoxColumnType;\n\n /**\n * At the XS breakpoint, this prop will take the number of columns specified. This overrides the base size prop for this specific range.\n */\n @Prop() sizeXs?: BoxColumnType;\n\n /**\n * At screen sizes from the SM breakpoint and larger (576px and up), this will take the specified number of columns. This overrides any value set by size or sizeXs.\n */\n @Prop() sizeSm?: BoxColumnType;\n\n /**\n * At screen sizes from the MD breakpoint and larger (768px and up), this will take the specified number of columns. This overrides any value set by size, sizeXs, and up.\n */\n @Prop() sizeMd?: BoxColumnType;\n\n /**\n * At screen sizes from the LG breakpoint and larger (992px and up), this will take the specified number of columns. This overrides any value set by size, sizeXs, and up.\n */\n @Prop() sizeLg?: BoxColumnType;\n\n /**\n * At screen sizes from the XL breakpoint and larger (1200px and up), this will take the specified number of columns. This overrides any value set by size, sizeXs, and up.\n */\n @Prop() sizeXl?: BoxColumnType;\n\n\n\n render() {\n const boxClasses = `\n ${this.alignItems !== undefined && this.alignItems.trim() !== '' ? `pds-align-items-${this.alignItems}` : ''}\n ${this.alignSelf !== undefined && this.alignSelf.trim() !== '' ? `pds-align-self-${this.alignSelf}` : ''}\n ${this.auto ? 'pds-box--auto' : ''}\n ${this.border ? 'pds-box--border' : ''}\n ${this.borderRadius !== undefined && this.borderRadius.trim() !== '' ? `pds-border-radius-${this.borderRadius}` : ''}\n ${this.direction !== undefined && this.direction.trim() !== '' ? `pds-box-direction-${this.direction}` : ''}\n ${this.display !== undefined && this.display.trim() !== '' ? `pds-box--display-${this.display}` : ''}\n ${this.fit ? 'pds-box--fit' : ''}\n ${this.gap !== undefined && this.gap.trim() !== '' ? `pds-box-gap-${this.gap}` : ''}\n ${this.flex !== undefined && this.flex.trim() !== '' && ['none', 'grow', 'shrink'].includes(this.flex) ? `pds-box--flex-${this.flex}` : ''}\n ${this.justifyContent !== undefined && this.justifyContent.trim() !== '' ? `pds-justify-content-${this.justifyContent}` : ''}\n ${this.marginBlockStart !== undefined && this.marginBlockStart.trim() !== '' ? `pds-margin-block-start-${this.marginBlockStart}` : ''}\n ${this.marginInlineStart !== undefined && this.marginInlineStart.trim() !== '' ? `pds-margin-inline-start-${this.marginInlineStart}` : ''}\n ${this.marginInlineEnd !== undefined && this.marginInlineEnd.trim() !== '' ? `pds-margin-inline-end-${this.marginInlineEnd}` : ''}\n ${this.marginBlockEnd !== undefined && this.marginBlockEnd.trim() !== '' ? `pds-margin-block-end-${this.marginBlockEnd}` : ''}\n ${this.offset !== undefined && this.offset.trim() !== '' ? `pds-box-offset-${this.offset}` : ''}\n ${this.offsetXs !== undefined && this.offsetXs.trim() !== '' ? `pds-box-offset-xs-${this.offsetXs}` : ''}\n ${this.offsetSm !== undefined && this.offsetSm.trim() !== '' ? `pds-box-offset-sm-${this.offsetSm}` : ''}\n ${this.offsetMd !== undefined && this.offsetMd.trim() !== '' ? `pds-box-offset-md-${this.offsetMd}` : ''}\n ${this.offsetLg !== undefined && this.offsetLg.trim() !== '' ? `pds-box-offset-lg-${this.offsetLg}` : ''}\n ${this.offsetXl !== undefined && this.offsetXl.trim() !== '' ? `pds-box-offset-xl-${this.offsetXl}` : ''}\n ${this.padding !== undefined && this.padding.trim() !== '' ? `pds-padding-${this.padding}` : ''}\n ${this.paddingBlockStart !== undefined && this.paddingBlockStart.trim() !== '' ? `pds-padding-block-start-${this.paddingBlockStart}` : ''}\n ${this.paddingBlockEnd !== undefined && this.paddingBlockEnd.trim() !== '' ? `pds-padding-block-end-${this.paddingBlockEnd}` : ''}\n ${this.paddingInlineStart !== undefined && this.paddingInlineStart.trim() !== '' ? `pds-padding-inline-start-${this.paddingInlineStart}` : ''}\n ${this.paddingInlineEnd !== undefined && this.paddingInlineEnd.trim() !== '' ? `pds-padding-inline-end-${this.paddingInlineEnd}` : ''}\n ${this.shadow !== undefined && this.shadow.trim() !== '' ? `pds-shadow-${this.shadow}` : ''}\n ${this.size !== undefined && this.size.trim() !== '' ? `pds-box pds-box-${this.size}` : ''}\n ${this.sizeXs !== undefined && this.sizeXs.trim() !== '' ? `pds-box-xs-${this.sizeXs}` : ''}\n ${this.sizeSm !== undefined && this.sizeSm.trim() !== '' ? `pds-box-sm-${this.sizeSm}` : ''}\n ${this.sizeMd !== undefined && this.sizeMd.trim() !== '' ? `pds-box-md-${this.sizeMd}` : ''}\n ${this.sizeLg !== undefined && this.sizeLg.trim() !== '' ? `pds-box-lg-${this.sizeLg}` : ''}\n ${this.sizeXl !== undefined && this.sizeXl.trim() !== '' ? `pds-box-xl-${this.sizeXl}` : ''}\n ${this.size == undefined &&\n this.sizeSm == undefined &&\n this.sizeMd == undefined &&\n this.sizeLg == undefined &&\n this.sizeXl == undefined ? 'pds-box' : ''}\n `;\n\n // Normalize so pds-box accepts --token, var(--token), or literals (no semantic names)\n const normalizedBackground = normalizeColorValue(this.backgroundColor);\n const normalizedBorder = normalizeColorValue(this.borderColor);\n\n const boxInlineStyles = {\n ...(normalizedBackground && { '--color-background-box': normalizedBackground }),\n ...(normalizedBorder && { '--color-border-box': normalizedBorder }),\n ...(this.minHeight && { '--sizing-min-height-box': this.minHeight }),\n ...(this.minWidth && { '--sizing-min-width-box': this.minWidth }),\n ...(this.flex && !['none', 'grow', 'shrink'].includes(this.flex) && { 'flex': this.flex }),\n };\n\n return (\n <Host class={boxClasses} style={boxInlineStyles}>\n </Host>\n );\n }\n}\n"]}
@@ -6,7 +6,7 @@
6
6
  --pds-button-border-radius-start-start: var(--pine-border-radius-full);
7
7
  --pds-button-border-radius-end-end: var(--pine-border-radius-full);
8
8
  --pds-button-border-radius-end-start: var(--pine-border-radius-full);
9
- --pds-button-min-height: 40px;
9
+ --pds-button-min-height: var(--pine-dimension-450);
10
10
  --color-border-default: transparent;
11
11
  --color-border-disabled: transparent;
12
12
  --color-border-focus: transparent;
@@ -56,7 +56,7 @@
56
56
  font: var(--pine-typography-body-brand-label);
57
57
  letter-spacing: var(--pine-letter-spacing);
58
58
  min-height: var(--pds-button-min-height);
59
- padding: var(--pine-dimension-xs) var(--pine-dimension-sm);
59
+ padding: calc(var(--pine-dimension-xs) - var(--pine-border-width)) var(--pine-dimension-sm);
60
60
  position: relative;
61
61
  text-decoration: none;
62
62
  }
@@ -166,6 +166,7 @@
166
166
  .pds-button__text {
167
167
  align-items: center;
168
168
  display: inline-flex;
169
+ white-space: nowrap;
169
170
  }
170
171
 
171
172
  .pds-button__icon--hidden,
@@ -124,6 +124,7 @@ label {
124
124
 
125
125
  .pds-checkbox__message {
126
126
  color: var(--pine-color-text-message);
127
+ font: var(--pine-typography-body-sm-medium);
127
128
  margin-block-start: 6px;
128
129
  margin-inline-start: var(--pine-dimension-md);
129
130
  width: 100%;
@@ -15,6 +15,7 @@ export class PdsCheckbox {
15
15
  }
16
16
  const target = e.target;
17
17
  this.checked = target.checked;
18
+ this.updateFormValue();
18
19
  this.pdsCheckboxChange.emit({
19
20
  checked: target.checked,
20
21
  value: this.value
@@ -43,16 +44,53 @@ export class PdsCheckbox {
43
44
  }
44
45
  return classNames.join(' ');
45
46
  }
47
+ connectedCallback() {
48
+ if (this.el.attachInternals) {
49
+ this.internals = this.el.attachInternals();
50
+ }
51
+ }
52
+ componentDidLoad() {
53
+ this.updateFormValue();
54
+ }
55
+ checkedChanged() {
56
+ this.updateFormValue();
57
+ }
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') {
61
+ return;
62
+ }
63
+ if (this.internals && this.internals.setFormValue) {
64
+ // For checkboxes, only send the value when checked, otherwise send null
65
+ const formValue = this.checked ? (this.value || 'on') : null;
66
+ this.internals.setFormValue(formValue);
67
+ }
68
+ if (this.internals && this.internals.setValidity) {
69
+ this.internals.setValidity({});
70
+ }
71
+ }
72
+ formStateRestoreCallback(state) {
73
+ if (state instanceof FormData) {
74
+ // For checkboxes, restore if the value exists in FormData
75
+ const value = this.value || 'on';
76
+ this.checked = state.get(this.name) === value;
77
+ }
78
+ else if (typeof state === 'string') {
79
+ // Restore from string state
80
+ this.checked = state === (this.value || 'on');
81
+ }
82
+ }
46
83
  componentWillLoad() {
47
84
  this.inheritedAttributes = Object.assign({}, inheritAriaAttributes(this.el));
48
85
  }
49
86
  render() {
50
- return (h(Host, { key: 'a60ffb7c96f1d15735f263cb55cd982fbfcbe729', class: this.classNames() }, h("label", { key: '6ed2c8670cded5165761374362d9f1e9f386a4d2', htmlFor: this.componentId }, h("input", Object.assign({ key: '0661b30a9af3bd8ee83b2f3ceb249810a78f19a5', type: "checkbox", "aria-describedby": assignDescription(this.componentId, this.invalid, this.errorMessage || this.helperMessage), "aria-invalid": this.invalid ? "true" : undefined, id: this.componentId, indeterminate: this.indeterminate, name: this.name, value: this.value, checked: this.checked, required: this.required, disabled: this.disabled, onChange: this.handleCheckboxChange, onInput: this.handleInput }, this.inheritedAttributes)), h("span", { key: 'b16d78ead4da7ebdffb0f37127bdacf8b1538f86', class: this.hideLabel ? 'visually-hidden' : '' }, this.label)), this.helperMessage &&
51
- h("div", { key: '78e88b11ba9e2759264e08ff0ce9e16c9cf67170', class: 'pds-checkbox__message', id: messageId(this.componentId, 'helper') }, this.helperMessage), this.errorMessage &&
52
- h("div", { key: '0ba7d2bd2b4f6c996eecdd103abe3fb6497e4376', class: `pds-checkbox__message pds-checkbox__message--error`, id: messageId(this.componentId, 'error'), "aria-live": "assertive" }, h("pds-icon", { key: '65a94316603638e5230de0644fc8ca60e9543b63', icon: danger, size: "small" }), this.errorMessage)));
87
+ return (h(Host, { key: 'f3a4cc998ec87374f2ee2dd91956d3bdd94d18ca', class: this.classNames() }, h("label", { key: '5c8ec6b36e50dedd76b0c23f912091ed40278d0f', htmlFor: this.componentId }, h("input", Object.assign({ key: '0969ba3846816446acc935636176b44aec9d90f5', type: "checkbox", "aria-describedby": assignDescription(this.componentId, this.invalid, this.errorMessage || this.helperMessage), "aria-invalid": this.invalid ? "true" : undefined, id: this.componentId, indeterminate: this.indeterminate, name: this.name, value: this.value, checked: this.checked, required: this.required, disabled: this.disabled, onChange: this.handleCheckboxChange, onInput: this.handleInput }, this.inheritedAttributes)), h("span", { key: 'ba47123715955ddad09296fbcfab6a423940f1f3', class: this.hideLabel ? 'visually-hidden' : '' }, this.label)), this.helperMessage &&
88
+ h("div", { key: '942c6ae8e8d77be86480395263dee5071e8132ea', class: 'pds-checkbox__message', id: messageId(this.componentId, 'helper') }, this.helperMessage), this.errorMessage &&
89
+ h("div", { key: '74ea1c3b398d072faf9d5359f00bacaa9a0a4169', class: `pds-checkbox__message pds-checkbox__message--error`, id: messageId(this.componentId, 'error'), "aria-live": "assertive" }, h("pds-icon", { key: '9b7aa5f226c169a1cd8e559dc731ea49be7ada6c', icon: danger, size: "small" }), this.errorMessage)));
53
90
  }
54
91
  static get is() { return "pds-checkbox"; }
55
92
  static get encapsulation() { return "shadow"; }
93
+ static get formAssociated() { return true; }
56
94
  static get originalStyleUrls() {
57
95
  return {
58
96
  "$": ["../../global/styles/utils/label.scss", "pds-checkbox.scss"]
@@ -346,6 +384,9 @@ export class PdsCheckbox {
346
384
  return [{
347
385
  "propName": "checked",
348
386
  "methodName": "updateIndeterminate"
387
+ }, {
388
+ "propName": "checked",
389
+ "methodName": "checkedChanged"
349
390
  }];
350
391
  }
351
392
  }
@@ -1 +1 @@
1
- {"version":3,"file":"pds-checkbox.js","sourceRoot":"","sources":["../../../src/components/pds-checkbox/pds-checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAgB,KAAK,EAAE,MAAM,eAAe,CAAC;AAC9F,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAEhE,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAQ1D,MAAM,OAAO,WAAW;IALxB;QAMU,wBAAmB,GAAe,EAAE,CAAC;QAI7C;;WAEG;QACsB,YAAO,GAAa,KAAK,CAAC;QAsE3C,yBAAoB,GAAG,CAAC,CAAQ,EAAE,EAAE;YAC1C,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;gBAClB,OAAO;YACT,CAAC;YAED,MAAM,MAAM,GAAG,CAAC,CAAC,MAA0B,CAAC;YAC5C,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;YAE9B,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC;gBAC1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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, h, Prop, Host, Event, EventEmitter, Watch } from '@stencil/core';\nimport { assignDescription, messageId } from '../../utils/form';\nimport { CheckboxChangeEventDetail } from './checkbox-interface';\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-checkbox',\n styleUrls: ['../../global/styles/utils/label.scss', 'pds-checkbox.scss'],\n shadow: true,\n})\nexport class PdsCheckbox {\n private inheritedAttributes: Attributes = {};\n\n @Element() el: HTMLPdsCheckboxElement;\n\n /**\n * It determines whether or not the checkbox is checked.\n */\n @Prop({ mutable: true }) checked?: boolean = false;\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 * It determines whether or not the checkbox is disabled.\n */\n @Prop() disabled: boolean;\n\n /**\n * Displays message text describing an invalid state.\n */\n @Prop() errorMessage: string;\n\n /**\n * String used for helper message below checkbox.\n */\n @Prop() helperMessage: string;\n\n /**\n * If `true`, the checkbox will visually appear as indeterminate.\n * Only JavaScript can set the objects `indeterminate` property. See [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#indeterminate_state_checkboxes).\n */\n @Prop({ mutable: true }) indeterminate: boolean;\n\n /**\n * It determines whether or not the checkbox is invalid.\n */\n @Prop() invalid: boolean;\n\n /**\n * String used for label text next to checkbox.\n */\n @Prop() label: string;\n\n /**\n * Visually hides the label text for instances where only the checkbox should be displayed. Label remains accessible to assistive technology such as screen readers.\n */\n @Prop() hideLabel: boolean;\n\n /**\n * String used for checkbox `name` attribute.\n */\n @Prop() name: string;\n\n /**\n * It determines whether or not the checkbox is required.\n */\n @Prop() required: boolean;\n\n /**\n * The value of the checkbox that is submitted with a form.\n */\n @Prop() value: string;\n\n /**\n * Event emitted that contains the `value` and `checked`.\n */\n @Event() pdsCheckboxChange: EventEmitter<CheckboxChangeEventDetail>;\n\n @Event() pdsCheckboxInput: EventEmitter<CheckboxChangeEventDetail>;\n\n @Watch('checked')\n updateIndeterminate() {\n this.indeterminate = undefined\n }\n\n private handleCheckboxChange = (e: Event) => {\n if (this.disabled) {\n return;\n }\n\n const target = e.target as HTMLInputElement;\n this.checked = target.checked;\n\n this.pdsCheckboxChange.emit({\n checked: target.checked,\n value: this.value\n });\n }\n\n private handleInput = () => {\n this.pdsCheckboxInput.emit({\n checked: this.checked,\n value: this.value\n });\n }\n\n private classNames() {\n const classNames = [];\n\n if (this.invalid) { classNames.push('is-invalid'); }\n if (this.indeterminate) { classNames.push('is-indeterminate'); }\n if (this.disabled) { classNames.push('is-disabled'); }\n\n return classNames.join(' ');\n }\n\n componentWillLoad() {\n this.inheritedAttributes = {\n ...inheritAriaAttributes(this.el)\n }\n }\n\n render() {\n return (\n <Host class={this.classNames()}>\n <label htmlFor={this.componentId}>\n <input\n type=\"checkbox\"\n aria-describedby={assignDescription(this.componentId, this.invalid, this.errorMessage || this.helperMessage)}\n aria-invalid={this.invalid ? \"true\" : undefined}\n id={this.componentId}\n indeterminate={this.indeterminate}\n name={this.name}\n value={this.value}\n checked={this.checked}\n required={this.required}\n disabled={this.disabled}\n onChange={this.handleCheckboxChange}\n onInput={this.handleInput}\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-checkbox__message'}\n id={messageId(this.componentId, 'helper')}\n >\n {this.helperMessage}\n </div>\n }\n {this.errorMessage &&\n <div\n class={`pds-checkbox__message pds-checkbox__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-checkbox.js","sourceRoot":"","sources":["../../../src/components/pds-checkbox/pds-checkbox.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,EAC5B;gBACF,6DAAM,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,IACjD,IAAI,CAAC,KAAK,CACN,CACD;YACP,IAAI,CAAC,aAAa;gBACjB,4DACE,KAAK,EAAE,uBAAuB,EAC9B,EAAE,EAAE,SAAS,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,IAExC,IAAI,CAAC,aAAa,CACf;YAEP,IAAI,CAAC,YAAY;gBAChB,4DACE,KAAK,EAAE,oDAAoD,EAC3D,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, h, Prop, Host, Event, EventEmitter, Watch } from '@stencil/core';\nimport { assignDescription, messageId } from '../../utils/form';\nimport { CheckboxChangeEventDetail } from './checkbox-interface';\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-checkbox',\n styleUrls: ['../../global/styles/utils/label.scss', 'pds-checkbox.scss'],\n shadow: true,\n formAssociated: true,\n})\nexport class PdsCheckbox {\n private inheritedAttributes: Attributes = {};\n private internals?: ElementInternals;\n\n @Element() el: HTMLPdsCheckboxElement;\n\n /**\n * It determines whether or not the checkbox is checked.\n */\n @Prop({ mutable: true }) checked?: boolean = false;\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 * It determines whether or not the checkbox is disabled.\n */\n @Prop() disabled: boolean;\n\n /**\n * Displays message text describing an invalid state.\n */\n @Prop() errorMessage: string;\n\n /**\n * String used for helper message below checkbox.\n */\n @Prop() helperMessage: string;\n\n /**\n * If `true`, the checkbox will visually appear as indeterminate.\n * Only JavaScript can set the objects `indeterminate` property. See [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#indeterminate_state_checkboxes).\n */\n @Prop({ mutable: true }) indeterminate: boolean;\n\n /**\n * It determines whether or not the checkbox is invalid.\n */\n @Prop() invalid: boolean;\n\n /**\n * String used for label text next to checkbox.\n */\n @Prop() label: string;\n\n /**\n * Visually hides the label text for instances where only the checkbox should be displayed. Label remains accessible to assistive technology such as screen readers.\n */\n @Prop() hideLabel: boolean;\n\n /**\n * String used for checkbox `name` attribute.\n */\n @Prop() name: string;\n\n /**\n * It determines whether or not the checkbox is required.\n */\n @Prop() required: boolean;\n\n /**\n * The value of the checkbox that is submitted with a form.\n */\n @Prop() value: string;\n\n /**\n * Event emitted that contains the `value` and `checked`.\n */\n @Event() pdsCheckboxChange: EventEmitter<CheckboxChangeEventDetail>;\n\n @Event() pdsCheckboxInput: EventEmitter<CheckboxChangeEventDetail>;\n\n @Watch('checked')\n updateIndeterminate() {\n this.indeterminate = undefined\n }\n\n private handleCheckboxChange = (e: Event) => {\n if (this.disabled) {\n return;\n }\n\n const target = e.target as HTMLInputElement;\n this.checked = target.checked;\n\n this.updateFormValue();\n\n this.pdsCheckboxChange.emit({\n checked: target.checked,\n value: this.value\n });\n }\n\n private handleInput = () => {\n this.pdsCheckboxInput.emit({\n checked: this.checked,\n value: this.value\n });\n }\n\n private classNames() {\n const classNames = [];\n\n if (this.invalid) { classNames.push('is-invalid'); }\n if (this.indeterminate) { classNames.push('is-indeterminate'); }\n if (this.disabled) { classNames.push('is-disabled'); }\n\n return classNames.join(' ');\n }\n\n connectedCallback() {\n if (this.el.attachInternals) {\n this.internals = this.el.attachInternals();\n }\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 checkboxes, 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 checkboxes, restore if the value exists in FormData\n const value = this.value || 'on';\n this.checked = state.get(this.name as string) === 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.classNames()}>\n <label htmlFor={this.componentId}>\n <input\n type=\"checkbox\"\n aria-describedby={assignDescription(this.componentId, this.invalid, this.errorMessage || this.helperMessage)}\n aria-invalid={this.invalid ? \"true\" : undefined}\n id={this.componentId}\n indeterminate={this.indeterminate}\n name={this.name}\n value={this.value}\n checked={this.checked}\n required={this.required}\n disabled={this.disabled}\n onChange={this.handleCheckboxChange}\n onInput={this.handleInput}\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-checkbox__message'}\n id={messageId(this.componentId, 'helper')}\n >\n {this.helperMessage}\n </div>\n }\n {this.errorMessage &&\n <div\n class={`pds-checkbox__message pds-checkbox__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"]}
@@ -6,7 +6,7 @@
6
6
  --pds-input-border-radius: var(--pine-dimension-125);
7
7
  --pds-input-border-width: var(--pine-border-width-thin);
8
8
  --pds-input-padding-x: var(--pine-dimension-150);
9
- --pds-input-padding-y: var(--pine-dimension-xs);
9
+ --pds-input-padding-y: calc(var(--pine-dimension-xs) - var(--pine-border-width));
10
10
  --pds-input-font: var(--pine-typography-body);
11
11
  --pds-input-text-color: var(--pine-color-text-active);
12
12
  --pds-input-placeholder-color: var(--pine-color-text-placeholder);
@@ -19,7 +19,7 @@
19
19
  --pds-input-error-border-hover: var(--pine-color-border-danger-hover);
20
20
  --pds-input-addon-background: var(--pine-color-background-subtle);
21
21
  --pds-input-addon-color: var(--pine-color-text-secondary);
22
- --pds-input-field-min-height: calc(var(--pine-dimension-450) + 2px);
22
+ --pds-input-field-min-height: var(--pine-dimension-450);
23
23
  --box-shadow-focus: 0 0 0 1px #ffffff, 0 0 0 3px var(--pine-color-focus-ring);
24
24
  --box-shadow-focus-error: 0 0 0 1px #ffffff, 0 0 0 3px var(--pine-color-focus-ring-danger);
25
25
  display: inline;
@@ -93,7 +93,7 @@
93
93
  --pds-select-border: var(--pine-border-width-none);
94
94
  --pds-select-border-radius-end-end: var(--pine-dimension-none);
95
95
  --pds-select-border-radius-start-end: var(--pine-dimension-none);
96
- --pds-select-min-height: var(--pine-dimension-450);
96
+ --pds-select-min-height: calc(var(--pine-dimension-450) - calc(2 * var(--pine-border-width)));
97
97
  }
98
98
 
99
99
  /* stylelint-disable-next-line */
@@ -102,7 +102,7 @@
102
102
  --pds-select-border: var(--pine-border-width-none);
103
103
  --pds-select-border-radius-end-start: var(--pine-dimension-none);
104
104
  --pds-select-border-radius-start-start: var(--pine-dimension-none);
105
- --pds-select-min-height: var(--pine-dimension-450);
105
+ --pds-select-min-height: calc(var(--pine-dimension-450) - calc(2 * var(--pine-border-width)));
106
106
  }
107
107
 
108
108
  :host([aria-readonly=true]) input {
@@ -115,6 +115,10 @@
115
115
  border: var(--pds-input-border-width) solid var(--pds-input-border-color-disabled);
116
116
  }
117
117
 
118
+ :host([full-width=true]) {
119
+ width: 100%;
120
+ }
121
+
118
122
  :host([invalid=true])::part(prepend), :host([invalid=true])::part(append) {
119
123
  background-color: var(--pds-input-error-background);
120
124
  border: var(--pds-input-border-width) solid var(--pds-input-error-border);
@@ -123,7 +127,6 @@
123
127
  .pds-input {
124
128
  display: flex;
125
129
  flex-direction: column;
126
- gap: var(--pine-dimension-2xs);
127
130
  }
128
131
 
129
132
  .pds-input__label-wrapper {
@@ -221,7 +224,8 @@
221
224
 
222
225
  .pds-input__error-message,
223
226
  .pds-input__helper-message {
224
- font: var(--pine-typography-body-sm-medium);
227
+ color: var(--pine-color-text-message);
228
+ font: var(--pine-typography-body-sm);
225
229
  margin-block-end: var(--pine-dimension-none);
226
230
  margin-block-start: var(--pine-dimension-2xs);
227
231
  }
@@ -147,9 +147,17 @@ export class PdsInput {
147
147
  // Store the original pdsInput event emitter
148
148
  this.originalPdsInput = this.pdsInput;
149
149
  }
150
+ connectedCallback() {
151
+ // Initialize ElementInternals for form association
152
+ if (this.el.attachInternals) {
153
+ this.internals = this.el.attachInternals();
154
+ }
155
+ }
150
156
  componentDidLoad() {
151
157
  this.debounceChanged();
152
158
  this.updateAddonWidths();
159
+ // Set initial form value
160
+ this.updateFormValue();
153
161
  }
154
162
  componentDidUpdate() {
155
163
  this.updateAddonWidths();
@@ -168,6 +176,8 @@ export class PdsInput {
168
176
  if (nativeInput && nativeInput.value !== value && !this.isComposing) {
169
177
  nativeInput.value = value;
170
178
  }
179
+ // Update form value when value changes
180
+ this.updateFormValue();
171
181
  }
172
182
  getValue() {
173
183
  return typeof this.value === 'number' ? this.value.toString() : (this.value || '').toString();
@@ -190,6 +200,47 @@ export class PdsInput {
190
200
  const newValue = value == null ? value : value.toString();
191
201
  this.pdsInput.emit({ value: newValue, event });
192
202
  }
203
+ /**
204
+ * Updates the form value using ElementInternals API
205
+ */
206
+ updateFormValue() {
207
+ if (this.internals && this.internals.setFormValue) {
208
+ const value = this.getValue();
209
+ this.internals.setFormValue(value || null);
210
+ // Set validity based on native input validation
211
+ if (this.nativeInput && this.internals && this.internals.setValidity) {
212
+ this.internals.setValidity(this.nativeInput.validity, this.nativeInput.validationMessage, this.nativeInput);
213
+ }
214
+ }
215
+ }
216
+ /**
217
+ * Form Associated Custom Elements API: Called when the form is reset
218
+ */
219
+ formResetCallback() {
220
+ this.value = '';
221
+ this.updateFormValue();
222
+ }
223
+ /**
224
+ * Form Associated Custom Elements API: Called when the form is disabled
225
+ */
226
+ formDisabledCallback(disabled) {
227
+ this.disabled = disabled;
228
+ }
229
+ /**
230
+ * Form Associated Custom Elements API: Called to restore form state
231
+ */
232
+ formStateRestoreCallback(state) {
233
+ if (typeof state === 'string') {
234
+ this.value = state;
235
+ }
236
+ else if (state instanceof FormData && this.name) {
237
+ // Extract value from FormData using the input's name
238
+ const value = state.get(this.name);
239
+ if (typeof value === 'string') {
240
+ this.value = value;
241
+ }
242
+ }
243
+ }
193
244
  render() {
194
245
  const { componentId, disabled, errorMessage, helperMessage, invalid = false, label, } = this;
195
246
  const value = this.getValue();
@@ -203,10 +254,11 @@ export class PdsInput {
203
254
  'has-prepend': this.hasPrepend,
204
255
  'has-append': this.hasAppend,
205
256
  };
206
- return (h(Host, { key: 'a8cf9aaa6dc90cb0790a7cad75603a2ebf48451a', "aria-disabled": this.disabled ? 'true' : null, "aria-readonly": this.readonly ? 'true' : null, "has-prefix": this.hasPrefix ? 'true' : null, "has-suffix": this.hasSuffix ? 'true' : null, "has-prepend": this.hasPrepend ? 'true' : null, "has-append": this.hasAppend ? 'true' : null, "has-action": this.hasAction ? 'true' : null }, h("div", { key: '355f87099825b4db4d97500dac2b94a5892a3981', class: "pds-input" }, label && (h("div", { key: 'ee7bdec715478f0945cd1bf6ba435c50e885ebda', class: "pds-input__label-wrapper" }, h("label", { key: '56622a09c8f7313f8c2276363ded8efd2e985fb7', htmlFor: componentId, class: "pds-input__label" }, label, this.required && h("span", { key: 'fb95186cd446e4d338822840423566110ac9dbd0', class: "pds-input__required-indicator" }, " *")), this.renderAction())), h("div", { key: 'c7b209515121ab4e44f054eb817f61e6d9241323', class: inputWrapperClasses }, this.renderPrepend(), this.renderPrefix(), h("input", Object.assign({ key: '02f8238ee2b87b7484da0b4b5282ce22c7dd3de1', ref: (input) => (this.nativeInput = input), class: "pds-input__field", "aria-describedby": assignDescription(componentId, invalid, helperMessage), "aria-invalid": invalid ? "true" : undefined, autocomplete: this.autocomplete, disabled: disabled, id: componentId, max: this.max, maxlength: this.maxlength, min: this.min, minlength: this.minlength, name: this.name, pattern: this.pattern, placeholder: this.placeholder, readOnly: this.readonly, required: this.required, step: this.step, type: this.type, value: value, onInput: this.onInputEvent, onChange: this.onChangeEvent, onBlur: this.onBlurEvent, onFocus: this.onFocusEvent, onCompositionstart: this.onCompositionStart, onCompositionend: this.onCompositionEnd }, this.inheritedAttributes)), this.renderSuffix(), this.renderAppend()), helperMessage && (h("p", { key: 'b93e6b54755d300e9093ac78854b52d296703a00', class: "pds-input__helper-message", id: messageId(componentId, 'helper') }, helperMessage)), errorMessage && (h("p", { key: 'bc16a204c2ad99b28759cde1f066b6ba790a5c80', class: "pds-input__error-message", id: messageId(componentId, 'error') }, h("pds-icon", { key: '354293fa6512ff16603e7190a4131096f58ca819', icon: danger, size: "small" }), errorMessage)))));
257
+ return (h(Host, { key: 'eac6a9c04f98b10e4eb6cb3eee49c7ecf4e2d8a2', "aria-disabled": this.disabled ? 'true' : null, "aria-readonly": this.readonly ? 'true' : null, "has-prefix": this.hasPrefix ? 'true' : null, "has-suffix": this.hasSuffix ? 'true' : null, "has-prepend": this.hasPrepend ? 'true' : null, "has-append": this.hasAppend ? 'true' : null, "has-action": this.hasAction ? 'true' : null, "full-width": this.fullWidth ? 'true' : null }, h("div", { key: 'f67b518f3debb5f21cf48bd573126962d81deff5', class: "pds-input" }, label && (h("div", { key: 'a45a7bd41f7d3f8009d2bbf6bcc432c45c0fc733', class: "pds-input__label-wrapper" }, h("label", { key: '31b41266335a5197313d6aa44c277de57afe2f54', htmlFor: componentId, class: "pds-input__label" }, label, this.required && h("span", { key: '4113f0e0e85cb81c5a501e52b3489b125fdb1cbf', class: "pds-input__required-indicator" }, " *")), this.renderAction())), h("div", { key: 'ea99ed08f755dc72517fb1594054250a492340d0', class: inputWrapperClasses }, this.renderPrepend(), this.renderPrefix(), h("input", Object.assign({ key: 'b48f1ccb88fdaa96b9e81cb1c459d3bfd1b512e0', ref: (input) => (this.nativeInput = input), class: "pds-input__field", "aria-describedby": assignDescription(componentId, invalid, helperMessage), "aria-invalid": invalid ? "true" : undefined, autocomplete: this.autocomplete, disabled: disabled, id: componentId, max: this.max, maxlength: this.maxlength, min: this.min, minlength: this.minlength, name: this.name, pattern: this.pattern, placeholder: this.placeholder, readOnly: this.readonly, required: this.required, step: this.step, type: this.type, value: value, onInput: this.onInputEvent, onChange: this.onChangeEvent, onBlur: this.onBlurEvent, onFocus: this.onFocusEvent, onCompositionstart: this.onCompositionStart, onCompositionend: this.onCompositionEnd }, this.inheritedAttributes)), this.renderSuffix(), this.renderAppend()), helperMessage && (h("p", { key: '3f84a41082d20917d9ab85051cdfbb7c2a6407ee', class: "pds-input__helper-message", id: messageId(componentId, 'helper') }, helperMessage)), errorMessage && (h("p", { key: 'd991dfdfc44a41640ef0070ce17e52b3f86b7782', class: "pds-input__error-message", id: messageId(componentId, 'error') }, h("pds-icon", { key: '5ea499d7d2f5ff2602dbf39f81df59c06116c6d2', icon: danger, size: "small" }), errorMessage)))));
207
258
  }
208
259
  static get is() { return "pds-input"; }
209
260
  static get encapsulation() { return "shadow"; }
261
+ static get formAssociated() { return true; }
210
262
  static get originalStyleUrls() {
211
263
  return {
212
264
  "$": ["pds-input.tokens.scss", "../../global/styles/utils/label.scss", "pds-input.scss"]
@@ -603,6 +655,25 @@ export class PdsInput {
603
655
  "attribute": "value",
604
656
  "reflect": false,
605
657
  "defaultValue": "''"
658
+ },
659
+ "fullWidth": {
660
+ "type": "boolean",
661
+ "mutable": false,
662
+ "complexType": {
663
+ "original": "boolean",
664
+ "resolved": "boolean",
665
+ "references": {}
666
+ },
667
+ "required": false,
668
+ "optional": true,
669
+ "docs": {
670
+ "tags": [],
671
+ "text": "Determines whether or not the input field takes full width of its container."
672
+ },
673
+ "getter": false,
674
+ "setter": false,
675
+ "attribute": "full-width",
676
+ "reflect": false
606
677
  }
607
678
  };
608
679
  }
@@ -1 +1 @@
1
- {"version":3,"file":"pds-input.js","sourceRoot":"","sources":["../../../src/components/pds-input/pds-input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC7G,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAG1D,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C;;;;;;GAMG;AAMH,MAAM,OAAO,QAAQ;IALrB;QAOU,wBAAmB,GAAe,EAAE,CAAC;QACrC,gBAAW,GAAG,KAAK,CAAC;QAQ5B;;WAEG;QACM,cAAS,GAAG,KAAK,CAAC;QAE3B;;WAEG;QACM,cAAS,GAAG,KAAK,CAAC;QAE3B;;WAEG;QACM,eAAU,GAAG,KAAK,CAAC;QAE5B;;WAEG;QACM,cAAS,GAAG,KAAK,CAAC;QAE3B;;WAEG;QACM,cAAS,GAAG,KAAK,CAAC;QA8H3B;;;;WAIG;QAC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AAE,QAAQ,CAAC,IACtE,aAAa,CACZ,CACL;gBAEA,YAAY,IAAI,CACf,0DAAG,KAAK,EAAC,0BAA0B,EAAC,EAAE,EAAE,SAAS,CAAC,WAAW,EAAE,OAAO,CAAC;oBACrE,iEAAU,IAAI,EAAE,MAAM,EAAE,IAAI,EAAC,OAAO,GAAG;oBACtC,YAAY,CACX,CACL,CACG,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch } from '@stencil/core';\nimport { assignDescription, messageId } from '../../utils/form';\nimport { inheritAriaAttributes } from '@utils/attributes';\nimport type { Attributes } from '@utils/attributes';\nimport { InputChangeEventDetail, InputInputEventDetail } from './input-interface';\nimport { debounceEvent } from '@utils/utils';\nimport { danger } from '@pine-ds/icons/icons';\n\n/**\n * @slot append - Content to be displayed after the input field\n * @slot prefix - Content that is displayed visually within the input field before the input field\n * @slot prepend - Content to be displayed before the input field\n * @slot suffix - Content that is displayed visually within the input field after the input field\n * @slot action - Content to be displayed in the label area, typically for help icons or links\n */\n@Component({\n tag: 'pds-input',\n styleUrls: ['pds-input.tokens.scss', '../../global/styles/utils/label.scss', 'pds-input.scss'],\n shadow: true,\n})\nexport class PdsInput {\n private nativeInput?: HTMLInputElement;\n private inheritedAttributes: Attributes = {};\n private isComposing = false;\n private prefixEl?: HTMLElement;\n private suffixEl?: HTMLElement;\n private focusedValue?: string | number | null;\n private originalPdsInput?: EventEmitter<InputInputEventDetail>;\n\n @Element() el!: HTMLPdsInputElement;\n\n /**\n * If true, the input has prefix content (non-focusable)\n */\n @State() hasPrefix = false;\n\n /**\n * If true, the input has suffix content (non-focusable)\n */\n @State() hasSuffix = false;\n\n /**\n * If true, the input has prepend content (focusable)\n */\n @State() hasPrepend = false;\n\n /**\n * If true, the input has append content (focusable)\n */\n @State() hasAppend = false;\n\n /**\n * If true, the input has action content in the label area\n */\n @State() hasAction = false;\n\n /**\n * Emitted when the input loses focus.\n */\n @Event() pdsBlur!: EventEmitter<FocusEvent>;\n\n /**\n * Emitted when the value has changed.\n *\n * This event will not emit when programmatically setting the `value` property.\n */\n @Event() pdsChange!: EventEmitter<InputChangeEventDetail>;\n\n /**\n * Emitted when the input has focus.\n */\n @Event() pdsFocus!: EventEmitter<FocusEvent>;\n\n /**\n * Emitted when a keyboard input occurs.\n */\n @Event() pdsInput: EventEmitter<InputInputEventDetail>;\n\n /**\n * Sets focus on the native `input` in the `pds-input`. Use this method instead of the global\n * `input.focus()`.\n */\n @Method()\n async setFocus() {\n if (this.nativeInput) {\n this.nativeInput.focus();\n }\n }\n\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 * Sets the number of milliseconds to wait before updating the value.\n */\n @Prop() debounce?: number;\n\n /**\n * Determines whether or not the input field is disabled.\n */\n @Prop() disabled?: boolean;\n\n /**\n * Specifies the error message and provides an error-themed treatment to the field.\n */\n @Prop() errorMessage?: string;\n\n /**\n * Displays a message or hint below the input field.\n */\n @Prop() helperMessage?: string;\n\n /**\n * Determines whether or not the input field is invalid or throws an error.\n */\n @Prop() invalid?: boolean;\n\n /**\n * Text to be displayed as the input label.\n */\n @Prop() label?: string;\n\n /**\n * Specifies the maximum value for the input field.\n */\n @Prop() max?: string;\n\n /**\n * Specifies the maximum number of characters allowed in the input field.\n */\n @Prop() maxlength?: string;\n\n /**\n * Specifies the minimum value for the input field.\n */\n @Prop() min?: string;\n\n /**\n * Specifies the minimum number of characters allowed in the input field.\n */\n @Prop() minlength?: string;\n\n /**\n * Specifies the name. Submitted with the form name/value pair.\n */\n @Prop() name?: string;\n\n /**\n * Specifies the regular expression that the input value is checked against.\n */\n @Prop() pattern?: string;\n\n /**\n * Specifies a short hint that describes the expected value of the input field.\n */\n @Prop() placeholder?: string;\n\n /**\n * Determines whether or not the input field is readonly.\n */\n @Prop() readonly?: boolean;\n\n /**\n * Determines whether or not the input field is required.\n */\n @Prop() required?: boolean;\n\n /**\n * Works with the `min` and `max` attributes to define increments for the input field.\n */\n @Prop() step?: string;\n\n /**\n * Determines the type of control that will be displayed\n * `'email'`, `'number'`, `'password'`, `'tel'`, `'text'`, `'url'`\n * @defaultValue \"text\"\n */\n @Prop() type = 'text';\n\n /**\n * The value of the input.\n */\n @Prop({mutable: true}) value?: string | number | null = '';\n\n /**\n * Determines if the input has focus.\n */\n @State() hasFocus = false;\n\n private updateAddonWidths() {\n requestAnimationFrame(() => {\n if (this.prefixEl) {\n const prefixWidth = this.prefixEl.offsetWidth;\n this.el.style.setProperty('--prefix-width', `${prefixWidth}px`);\n }\n\n if (this.suffixEl) {\n const suffixWidth = this.suffixEl.offsetWidth;\n this.el.style.setProperty('--suffix-width', `${suffixWidth}px`);\n }\n });\n }\n\n private renderPrefix() {\n const hasPrefix = this.el.querySelector('[slot=\"prefix\"]') !== null;\n if (hasPrefix) {\n return (\n <div class=\"pds-input__prefix\" part=\"prefix\" ref={(el) => this.prefixEl = el as HTMLElement}>\n <slot name=\"prefix\" onSlotchange={() => this.updateAddonWidths()}></slot>\n </div>\n );\n }\n return null;\n }\n\n private renderSuffix() {\n const hasSuffix = this.el.querySelector('[slot=\"suffix\"]') !== null;\n if (hasSuffix) {\n return (\n <div class=\"pds-input__suffix\" part=\"suffix\" ref={(el) => this.suffixEl = el as HTMLElement}>\n <slot name=\"suffix\" onSlotchange={() => this.updateAddonWidths()}></slot>\n </div>\n );\n }\n return null;\n }\n\n private renderPrepend() {\n const hasPrepend = this.el.querySelector('[slot=\"prepend\"]') !== null;\n if (hasPrepend) {\n return (\n <div class=\"pds-input__prepend\" part=\"prepend\">\n <slot name=\"prepend\"></slot>\n </div>\n );\n }\n return null;\n }\n\n private renderAppend() {\n const hasAppend = this.el.querySelector('[slot=\"append\"]') !== null;\n if (hasAppend) {\n return (\n <div class=\"pds-input__append\" part=\"append\">\n <slot name=\"append\"></slot>\n </div>\n );\n }\n return null;\n }\n\n private renderAction() {\n const hasAction = this.el.querySelector('[slot=\"action\"]') !== null;\n if (hasAction) {\n return (\n <div class=\"pds-input__action\" part=\"action\">\n <slot name=\"action\"></slot>\n </div>\n );\n }\n return null;\n }\n\n componentWillLoad() {\n this.inheritedAttributes = {\n ...inheritAriaAttributes(this.el)\n };\n this.hasPrefix = this.el.querySelector('[slot=\"prefix\"]') !== null;\n this.hasSuffix = this.el.querySelector('[slot=\"suffix\"]') !== null;\n this.hasPrepend = this.el.querySelector('[slot=\"prepend\"]') !== null;\n this.hasAppend = this.el.querySelector('[slot=\"append\"]') !== null;\n this.hasAction = this.el.querySelector('[slot=\"action\"]') !== null;\n\n // Store the original pdsInput event emitter\n this.originalPdsInput = this.pdsInput;\n }\n\n componentDidLoad() {\n this.debounceChanged();\n this.updateAddonWidths();\n }\n\n componentDidUpdate() {\n this.updateAddonWidths();\n }\n\n @Watch('debounce')\n protected debounceChanged() {\n const { pdsInput, debounce, originalPdsInput } = this;\n\n /**\n * If debounce is undefined, we have to manually revert the pdsInput emitter in case\n * debounce used to be set to a number. Otherwise, the event would stay debounced.\n */\n this.pdsInput = debounce === undefined ? originalPdsInput ?? pdsInput : debounceEvent(pdsInput, debounce);\n }\n\n @Watch('value')\n protected valueChanged() {\n const nativeInput = this.nativeInput;\n const value = this.getValue();\n\n if (nativeInput && nativeInput.value !== value && !this.isComposing) {\n nativeInput.value = value;\n }\n }\n\n private getValue(): string {\n return typeof this.value === 'number' ? this.value.toString() : (this.value || '').toString();\n }\n\n private onInputEvent = (ev: Event) => {\n const input = ev.target as HTMLInputElement | null;\n if (input) {\n this.value = input.value || '';\n }\n this.emitInputChange(ev);\n };\n\n private onChangeEvent = (ev: Event) => {\n this.emitValueChange(ev);\n };\n\n private onBlurEvent = (ev: FocusEvent) => {\n this.hasFocus = false;\n\n if (this.focusedValue !== this.value) {\n /**\n * Emits the `pdsChange` event when the input value\n * is different than the value when the input was focused.\n */\n this.emitValueChange(ev);\n }\n\n this.pdsBlur.emit(ev);\n };\n\n private onFocusEvent = (ev: FocusEvent) => {\n this.hasFocus = true;\n this.focusedValue = this.value;\n\n this.pdsFocus.emit(ev);\n };\n\n private onCompositionStart = () => {\n this.isComposing = true;\n }\n\n private onCompositionEnd = () => {\n this.isComposing = false;\n }\n\n /**\n * Emits a pdsChange event\n */\n private emitValueChange(event?: Event) {\n const { value } = this;\n const newValue = value == null ? value : value.toString();\n\n this.focusedValue = newValue;\n this.pdsChange.emit({ value: newValue, event });\n }\n\n /**\n * Emits a `pdsInput` event\n */\n private emitInputChange(event?: Event) {\n const { value } = this;\n\n // Checks for both null and undefined values\n const newValue = value == null ? value : value.toString();\n\n this.pdsInput.emit({ value: newValue, event });\n }\n\n render() {\n const {\n componentId,\n disabled,\n errorMessage,\n helperMessage,\n invalid = false,\n label,\n } = this;\n\n const value = this.getValue();\n\n const inputWrapperClasses = {\n 'pds-input__field-wrapper': true,\n 'has-focus': this.hasFocus,\n 'has-error': invalid || !!errorMessage,\n 'is-disabled': disabled,\n 'has-prefix': this.hasPrefix,\n 'has-suffix': this.hasSuffix,\n 'has-prepend': this.hasPrepend,\n 'has-append': this.hasAppend,\n };\n\n return (\n <Host\n aria-disabled={this.disabled ? 'true' : null}\n aria-readonly={this.readonly ? 'true' : null}\n has-prefix={this.hasPrefix ? 'true' : null}\n has-suffix={this.hasSuffix ? 'true' : null}\n has-prepend={this.hasPrepend ? 'true' : null}\n has-append={this.hasAppend ? 'true' : null}\n has-action={this.hasAction ? 'true' : null}\n >\n <div class=\"pds-input\">\n {label && (\n <div class=\"pds-input__label-wrapper\">\n <label htmlFor={componentId} class=\"pds-input__label\">\n {label}\n {this.required && <span class=\"pds-input__required-indicator\"> *</span>}\n </label>\n {this.renderAction()}\n </div>\n )}\n\n <div class={inputWrapperClasses}>\n {this.renderPrepend()}\n {this.renderPrefix()}\n <input\n ref={(input) => (this.nativeInput = input)}\n class=\"pds-input__field\"\n aria-describedby={assignDescription(componentId, invalid, helperMessage)}\n aria-invalid={invalid ? \"true\" : undefined}\n autocomplete={this.autocomplete}\n disabled={disabled}\n id={componentId}\n max={this.max}\n maxlength={this.maxlength}\n min={this.min}\n minlength={this.minlength}\n name={this.name}\n pattern={this.pattern}\n placeholder={this.placeholder}\n readOnly={this.readonly}\n required={this.required}\n step={this.step}\n type={this.type}\n value={value}\n onInput={this.onInputEvent}\n onChange={this.onChangeEvent}\n onBlur={this.onBlurEvent}\n onFocus={this.onFocusEvent}\n onCompositionstart={this.onCompositionStart}\n onCompositionend={this.onCompositionEnd}\n {...this.inheritedAttributes}\n />\n {this.renderSuffix()}\n {this.renderAppend()}\n </div>\n\n {helperMessage && (\n <p class=\"pds-input__helper-message\" id={messageId(componentId, 'helper')}>\n {helperMessage}\n </p>\n )}\n\n {errorMessage && (\n <p class=\"pds-input__error-message\" id={messageId(componentId, 'error')}>\n <pds-icon icon={danger} size=\"small\" />\n {errorMessage}\n </p>\n )}\n </div>\n </Host>\n );\n }\n}\n"]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AAC;oBACrE,iEAAU,IAAI,EAAE,MAAM,EAAE,IAAI,EAAC,OAAO,GAAG;oBACtC,YAAY,CACX,CACL,CACG,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch } from '@stencil/core';\nimport { assignDescription, messageId } from '../../utils/form';\nimport { inheritAriaAttributes } from '@utils/attributes';\nimport type { Attributes } from '@utils/attributes';\nimport { InputChangeEventDetail, InputInputEventDetail } from './input-interface';\nimport { debounceEvent } from '@utils/utils';\nimport { danger } from '@pine-ds/icons/icons';\n\n/**\n * @slot append - Content to be displayed after the input field\n * @slot prefix - Content that is displayed visually within the input field before the input field\n * @slot prepend - Content to be displayed before the input field\n * @slot suffix - Content that is displayed visually within the input field after the input field\n * @slot action - Content to be displayed in the label area, typically for help icons or links\n */\n@Component({\n tag: 'pds-input',\n styleUrls: ['pds-input.tokens.scss', '../../global/styles/utils/label.scss', 'pds-input.scss'],\n shadow: true,\n formAssociated: true,\n})\nexport class PdsInput {\n\n private nativeInput?: HTMLInputElement;\n private inheritedAttributes: Attributes = {};\n private isComposing = false;\n private prefixEl?: HTMLElement;\n private suffixEl?: HTMLElement;\n private focusedValue?: string | number | null;\n private originalPdsInput?: EventEmitter<InputInputEventDetail>;\n private internals?: ElementInternals;\n\n @Element() el!: HTMLPdsInputElement;\n\n /**\n * If true, the input has prefix content (non-focusable)\n */\n @State() hasPrefix = false;\n\n /**\n * If true, the input has suffix content (non-focusable)\n */\n @State() hasSuffix = false;\n\n /**\n * If true, the input has prepend content (focusable)\n */\n @State() hasPrepend = false;\n\n /**\n * If true, the input has append content (focusable)\n */\n @State() hasAppend = false;\n\n /**\n * If true, the input has action content in the label area\n */\n @State() hasAction = false;\n\n /**\n * Emitted when the input loses focus.\n */\n @Event() pdsBlur!: EventEmitter<FocusEvent>;\n\n /**\n * Emitted when the value has changed.\n *\n * This event will not emit when programmatically setting the `value` property.\n */\n @Event() pdsChange!: EventEmitter<InputChangeEventDetail>;\n\n /**\n * Emitted when the input has focus.\n */\n @Event() pdsFocus!: EventEmitter<FocusEvent>;\n\n /**\n * Emitted when a keyboard input occurs.\n */\n @Event() pdsInput: EventEmitter<InputInputEventDetail>;\n\n /**\n * Sets focus on the native `input` in the `pds-input`. Use this method instead of the global\n * `input.focus()`.\n */\n @Method()\n async setFocus() {\n if (this.nativeInput) {\n this.nativeInput.focus();\n }\n }\n\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 * Sets the number of milliseconds to wait before updating the value.\n */\n @Prop() debounce?: number;\n\n /**\n * Determines whether or not the input field is disabled.\n */\n @Prop() disabled?: boolean;\n\n /**\n * Specifies the error message and provides an error-themed treatment to the field.\n */\n @Prop() errorMessage?: string;\n\n /**\n * Displays a message or hint below the input field.\n */\n @Prop() helperMessage?: string;\n\n /**\n * Determines whether or not the input field is invalid or throws an error.\n */\n @Prop() invalid?: boolean;\n\n /**\n * Text to be displayed as the input label.\n */\n @Prop() label?: string;\n\n /**\n * Specifies the maximum value for the input field.\n */\n @Prop() max?: string;\n\n /**\n * Specifies the maximum number of characters allowed in the input field.\n */\n @Prop() maxlength?: string;\n\n /**\n * Specifies the minimum value for the input field.\n */\n @Prop() min?: string;\n\n /**\n * Specifies the minimum number of characters allowed in the input field.\n */\n @Prop() minlength?: string;\n\n /**\n * Specifies the name. Submitted with the form name/value pair.\n */\n @Prop() name?: string;\n\n /**\n * Specifies the regular expression that the input value is checked against.\n */\n @Prop() pattern?: string;\n\n /**\n * Specifies a short hint that describes the expected value of the input field.\n */\n @Prop() placeholder?: string;\n\n /**\n * Determines whether or not the input field is readonly.\n */\n @Prop() readonly?: boolean;\n\n /**\n * Determines whether or not the input field is required.\n */\n @Prop() required?: boolean;\n\n /**\n * Works with the `min` and `max` attributes to define increments for the input field.\n */\n @Prop() step?: string;\n\n /**\n * Determines the type of control that will be displayed\n * `'email'`, `'number'`, `'password'`, `'tel'`, `'text'`, `'url'`\n * @defaultValue \"text\"\n */\n @Prop() type = 'text';\n\n /**\n * The value of the input.\n */\n @Prop({mutable: true}) value?: string | number | null = '';\n\n /**\n * Determines whether or not the input field takes full width of its container.\n */\n @Prop() fullWidth?: boolean;\n\n /**\n * Determines if the input has focus.\n */\n @State() hasFocus = false;\n\n private updateAddonWidths() {\n requestAnimationFrame(() => {\n if (this.prefixEl) {\n const prefixWidth = this.prefixEl.offsetWidth;\n this.el.style.setProperty('--prefix-width', `${prefixWidth}px`);\n }\n\n if (this.suffixEl) {\n const suffixWidth = this.suffixEl.offsetWidth;\n this.el.style.setProperty('--suffix-width', `${suffixWidth}px`);\n }\n });\n }\n\n private renderPrefix() {\n const hasPrefix = this.el.querySelector('[slot=\"prefix\"]') !== null;\n if (hasPrefix) {\n return (\n <div class=\"pds-input__prefix\" part=\"prefix\" ref={(el) => this.prefixEl = el as HTMLElement}>\n <slot name=\"prefix\" onSlotchange={() => this.updateAddonWidths()}></slot>\n </div>\n );\n }\n return null;\n }\n\n private renderSuffix() {\n const hasSuffix = this.el.querySelector('[slot=\"suffix\"]') !== null;\n if (hasSuffix) {\n return (\n <div class=\"pds-input__suffix\" part=\"suffix\" ref={(el) => this.suffixEl = el as HTMLElement}>\n <slot name=\"suffix\" onSlotchange={() => this.updateAddonWidths()}></slot>\n </div>\n );\n }\n return null;\n }\n\n private renderPrepend() {\n const hasPrepend = this.el.querySelector('[slot=\"prepend\"]') !== null;\n if (hasPrepend) {\n return (\n <div class=\"pds-input__prepend\" part=\"prepend\">\n <slot name=\"prepend\"></slot>\n </div>\n );\n }\n return null;\n }\n\n private renderAppend() {\n const hasAppend = this.el.querySelector('[slot=\"append\"]') !== null;\n if (hasAppend) {\n return (\n <div class=\"pds-input__append\" part=\"append\">\n <slot name=\"append\"></slot>\n </div>\n );\n }\n return null;\n }\n\n private renderAction() {\n const hasAction = this.el.querySelector('[slot=\"action\"]') !== null;\n if (hasAction) {\n return (\n <div class=\"pds-input__action\" part=\"action\">\n <slot name=\"action\"></slot>\n </div>\n );\n }\n return null;\n }\n\n componentWillLoad() {\n this.inheritedAttributes = {\n ...inheritAriaAttributes(this.el)\n };\n this.hasPrefix = this.el.querySelector('[slot=\"prefix\"]') !== null;\n this.hasSuffix = this.el.querySelector('[slot=\"suffix\"]') !== null;\n this.hasPrepend = this.el.querySelector('[slot=\"prepend\"]') !== null;\n this.hasAppend = this.el.querySelector('[slot=\"append\"]') !== null;\n this.hasAction = this.el.querySelector('[slot=\"action\"]') !== null;\n\n // Store the original pdsInput event emitter\n this.originalPdsInput = this.pdsInput;\n }\n\n connectedCallback() {\n // Initialize ElementInternals for form association\n if (this.el.attachInternals) {\n this.internals = this.el.attachInternals();\n }\n }\n\n componentDidLoad() {\n this.debounceChanged();\n this.updateAddonWidths();\n // Set initial form value\n this.updateFormValue();\n }\n\n componentDidUpdate() {\n this.updateAddonWidths();\n }\n\n @Watch('debounce')\n protected debounceChanged() {\n const { pdsInput, debounce, originalPdsInput } = this;\n\n /**\n * If debounce is undefined, we have to manually revert the pdsInput emitter in case\n * debounce used to be set to a number. Otherwise, the event would stay debounced.\n */\n this.pdsInput = debounce === undefined ? originalPdsInput ?? pdsInput : debounceEvent(pdsInput, debounce);\n }\n\n @Watch('value')\n protected valueChanged() {\n const nativeInput = this.nativeInput;\n const value = this.getValue();\n\n if (nativeInput && nativeInput.value !== value && !this.isComposing) {\n nativeInput.value = value;\n }\n\n // Update form value when value changes\n this.updateFormValue();\n }\n\n private getValue(): string {\n return typeof this.value === 'number' ? this.value.toString() : (this.value || '').toString();\n }\n\n private onInputEvent = (ev: Event) => {\n const input = ev.target as HTMLInputElement | null;\n if (input) {\n this.value = input.value || '';\n }\n this.emitInputChange(ev);\n };\n\n private onChangeEvent = (ev: Event) => {\n this.emitValueChange(ev);\n };\n\n private onBlurEvent = (ev: FocusEvent) => {\n this.hasFocus = false;\n\n if (this.focusedValue !== this.value) {\n /**\n * Emits the `pdsChange` event when the input value\n * is different than the value when the input was focused.\n */\n this.emitValueChange(ev);\n }\n\n this.pdsBlur.emit(ev);\n };\n\n private onFocusEvent = (ev: FocusEvent) => {\n this.hasFocus = true;\n this.focusedValue = this.value;\n\n this.pdsFocus.emit(ev);\n };\n\n private onCompositionStart = () => {\n this.isComposing = true;\n }\n\n private onCompositionEnd = () => {\n this.isComposing = false;\n }\n\n /**\n * Emits a pdsChange event\n */\n private emitValueChange(event?: Event) {\n const { value } = this;\n const newValue = value == null ? value : value.toString();\n\n this.focusedValue = newValue;\n this.pdsChange.emit({ value: newValue, event });\n }\n\n /**\n * Emits a `pdsInput` event\n */\n private emitInputChange(event?: Event) {\n const { value } = this;\n\n // Checks for both null and undefined values\n const newValue = value == null ? value : value.toString();\n\n this.pdsInput.emit({ value: newValue, event });\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.getValue();\n this.internals.setFormValue(value || null);\n\n // Set validity based on native input validation\n if (this.nativeInput && this.internals && this.internals.setValidity) {\n this.internals.setValidity(\n this.nativeInput.validity,\n this.nativeInput.validationMessage,\n this.nativeInput\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 from FormData using the input's name\n const value = state.get(this.name);\n if (typeof value === 'string') {\n this.value = value;\n }\n }\n }\n\n render() {\n const {\n componentId,\n disabled,\n errorMessage,\n helperMessage,\n invalid = false,\n label,\n } = this;\n\n const value = this.getValue();\n\n const inputWrapperClasses = {\n 'pds-input__field-wrapper': true,\n 'has-focus': this.hasFocus,\n 'has-error': invalid || !!errorMessage,\n 'is-disabled': disabled,\n 'has-prefix': this.hasPrefix,\n 'has-suffix': this.hasSuffix,\n 'has-prepend': this.hasPrepend,\n 'has-append': this.hasAppend,\n };\n\n return (\n <Host\n aria-disabled={this.disabled ? 'true' : null}\n aria-readonly={this.readonly ? 'true' : null}\n has-prefix={this.hasPrefix ? 'true' : null}\n has-suffix={this.hasSuffix ? 'true' : null}\n has-prepend={this.hasPrepend ? 'true' : null}\n has-append={this.hasAppend ? 'true' : null}\n has-action={this.hasAction ? 'true' : null}\n full-width={this.fullWidth ? 'true' : null}\n >\n <div class=\"pds-input\">\n {label && (\n <div class=\"pds-input__label-wrapper\">\n <label htmlFor={componentId} class=\"pds-input__label\">\n {label}\n {this.required && <span class=\"pds-input__required-indicator\"> *</span>}\n </label>\n {this.renderAction()}\n </div>\n )}\n\n <div class={inputWrapperClasses}>\n {this.renderPrepend()}\n {this.renderPrefix()}\n <input\n ref={(input) => (this.nativeInput = input)}\n class=\"pds-input__field\"\n aria-describedby={assignDescription(componentId, invalid, helperMessage)}\n aria-invalid={invalid ? \"true\" : undefined}\n autocomplete={this.autocomplete}\n disabled={disabled}\n id={componentId}\n max={this.max}\n maxlength={this.maxlength}\n min={this.min}\n minlength={this.minlength}\n name={this.name}\n pattern={this.pattern}\n placeholder={this.placeholder}\n readOnly={this.readonly}\n required={this.required}\n step={this.step}\n type={this.type}\n value={value}\n onInput={this.onInputEvent}\n onChange={this.onChangeEvent}\n onBlur={this.onBlurEvent}\n onFocus={this.onFocusEvent}\n onCompositionstart={this.onCompositionStart}\n onCompositionend={this.onCompositionEnd}\n {...this.inheritedAttributes}\n />\n {this.renderSuffix()}\n {this.renderAppend()}\n </div>\n\n {helperMessage && (\n <p class=\"pds-input__helper-message\" id={messageId(componentId, 'helper')}>\n {helperMessage}\n </p>\n )}\n\n {errorMessage && (\n <p class=\"pds-input__error-message\" id={messageId(componentId, 'error')}>\n <pds-icon icon={danger} size=\"small\" />\n {errorMessage}\n </p>\n )}\n </div>\n </Host>\n );\n }\n}\n"]}