@pine-ds/core 3.8.1 → 3.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (346) hide show
  1. package/components/pds-accordion.js +1 -1
  2. package/components/pds-accordion.js.map +1 -1
  3. package/components/pds-box2.js +2 -2
  4. package/components/pds-box2.js.map +1 -1
  5. package/components/pds-input.js +3 -2
  6. package/components/pds-input.js.map +1 -1
  7. package/components/pds-progress.js +1 -1
  8. package/components/pds-progress.js.map +1 -1
  9. package/components/pds-radio.js +34 -7
  10. package/components/pds-radio.js.map +1 -1
  11. package/components/pds-row.js +19 -1
  12. package/components/pds-row.js.map +1 -1
  13. package/components/pds-select.js +3 -2
  14. package/components/pds-select.js.map +1 -1
  15. package/components/pds-sortable-item.js +1 -1
  16. package/components/pds-sortable.js +1 -1
  17. package/components/pds-switch.js +3 -3
  18. package/components/pds-tab.js +3 -3
  19. package/components/pds-table-body.js +1 -1
  20. package/components/pds-table-cell2.js +2 -2
  21. package/components/pds-table-head-cell2.js +2 -2
  22. package/components/pds-table-head.js +1 -1
  23. package/components/pds-table-row.js +1 -1
  24. package/components/pds-tabpanel.js +1 -1
  25. package/components/pds-tabs.js +1 -1
  26. package/components/pds-text2.js +1 -1
  27. package/components/pds-textarea.js +6 -5
  28. package/components/pds-textarea.js.map +1 -1
  29. package/components/pds-toast.js +3 -3
  30. package/components/pds-tooltip.js +2 -2
  31. package/dist/cjs/loader.cjs.js +1 -1
  32. package/dist/cjs/pds-accordion.cjs.entry.js +1 -1
  33. package/dist/cjs/pds-accordion.cjs.entry.js.map +1 -1
  34. package/dist/cjs/pds-accordion.entry.cjs.js.map +1 -1
  35. package/dist/cjs/pds-box.cjs.entry.js +2 -2
  36. package/dist/cjs/pds-box.cjs.entry.js.map +1 -1
  37. package/dist/cjs/pds-box.entry.cjs.js.map +1 -1
  38. package/dist/cjs/pds-input.cjs.entry.js +2 -2
  39. package/dist/cjs/pds-input.cjs.entry.js.map +1 -1
  40. package/dist/cjs/pds-input.entry.cjs.js.map +1 -1
  41. package/dist/cjs/pds-progress.cjs.entry.js +1 -1
  42. package/dist/cjs/pds-progress.cjs.entry.js.map +1 -1
  43. package/dist/cjs/pds-progress.entry.cjs.js.map +1 -1
  44. package/dist/cjs/pds-radio.cjs.entry.js +30 -5
  45. package/dist/cjs/pds-radio.cjs.entry.js.map +1 -1
  46. package/dist/cjs/pds-radio.entry.cjs.js.map +1 -1
  47. package/dist/cjs/pds-row.cjs.entry.js +19 -1
  48. package/dist/cjs/pds-row.cjs.entry.js.map +1 -1
  49. package/dist/cjs/pds-row.entry.cjs.js.map +1 -1
  50. package/dist/cjs/pds-select.cjs.entry.js +2 -2
  51. package/dist/cjs/pds-select.cjs.entry.js.map +1 -1
  52. package/dist/cjs/pds-select.entry.cjs.js.map +1 -1
  53. package/dist/cjs/pds-sortable-item.cjs.entry.js +1 -1
  54. package/dist/cjs/pds-sortable.cjs.entry.js +1 -1
  55. package/dist/cjs/pds-switch.cjs.entry.js +3 -3
  56. package/dist/cjs/pds-tab.cjs.entry.js +3 -3
  57. package/dist/cjs/pds-table-body.cjs.entry.js +1 -1
  58. package/dist/cjs/pds-table-cell.cjs.entry.js +2 -2
  59. package/dist/cjs/pds-table-head-cell.cjs.entry.js +2 -2
  60. package/dist/cjs/pds-table-head.cjs.entry.js +1 -1
  61. package/dist/cjs/pds-table-row.cjs.entry.js +1 -1
  62. package/dist/cjs/pds-tabpanel.cjs.entry.js +1 -1
  63. package/dist/cjs/pds-tabs.cjs.entry.js +1 -1
  64. package/dist/cjs/pds-text.cjs.entry.js +1 -1
  65. package/dist/cjs/pds-textarea.cjs.entry.js +5 -5
  66. package/dist/cjs/pds-textarea.cjs.entry.js.map +1 -1
  67. package/dist/cjs/pds-textarea.entry.cjs.js.map +1 -1
  68. package/dist/cjs/pds-toast.cjs.entry.js +3 -3
  69. package/dist/cjs/pds-tooltip.cjs.entry.js +2 -2
  70. package/dist/cjs/pine-core.cjs.js +1 -1
  71. package/dist/collection/components/pds-accordion/pds-accordion.js +2 -1
  72. package/dist/collection/components/pds-accordion/pds-accordion.js.map +1 -1
  73. package/dist/collection/components/pds-box/pds-box.css +2740 -40
  74. package/dist/collection/components/pds-box/pds-box.js +241 -241
  75. package/dist/collection/components/pds-box/pds-box.js.map +1 -1
  76. package/dist/collection/components/pds-input/pds-input.css +13 -0
  77. package/dist/collection/components/pds-input/pds-input.js +20 -1
  78. package/dist/collection/components/pds-input/pds-input.js.map +1 -1
  79. package/dist/collection/components/pds-input/stories/pds-input.stories.js +37 -0
  80. package/dist/collection/components/pds-progress/pds-progress.css +2 -2
  81. package/dist/collection/components/pds-radio/pds-radio.css +145 -3
  82. package/dist/collection/components/pds-radio/pds-radio.js +62 -5
  83. package/dist/collection/components/pds-radio/pds-radio.js.map +1 -1
  84. package/dist/collection/components/pds-radio/stories/pds-radio.stories.js +37 -0
  85. package/dist/collection/components/pds-row/pds-row.js +31 -13
  86. package/dist/collection/components/pds-row/pds-row.js.map +1 -1
  87. package/dist/collection/components/pds-select/pds-select.css +15 -0
  88. package/dist/collection/components/pds-select/pds-select.js +20 -1
  89. package/dist/collection/components/pds-select/pds-select.js.map +1 -1
  90. package/dist/collection/components/pds-select/stories/pds-select.stories.js +14 -0
  91. package/dist/collection/components/pds-sortable/pds-sortable-item/pds-sortable-item.js +1 -1
  92. package/dist/collection/components/pds-sortable/pds-sortable.js +1 -1
  93. package/dist/collection/components/pds-switch/pds-switch.js +3 -3
  94. package/dist/collection/components/pds-table/pds-table-body/pds-table-body.js +1 -1
  95. package/dist/collection/components/pds-table/pds-table-cell/pds-table-cell.js +2 -2
  96. package/dist/collection/components/pds-table/pds-table-head/pds-table-head.js +1 -1
  97. package/dist/collection/components/pds-table/pds-table-head-cell/pds-table-head-cell.js +2 -2
  98. package/dist/collection/components/pds-table/pds-table-row/pds-table-row.js +1 -1
  99. package/dist/collection/components/pds-tabs/pds-tab/pds-tab.js +3 -3
  100. package/dist/collection/components/pds-tabs/pds-tabpanel/pds-tabpanel.js +1 -1
  101. package/dist/collection/components/pds-tabs/pds-tabs.js +1 -1
  102. package/dist/collection/components/pds-text/pds-text.js +1 -1
  103. package/dist/collection/components/pds-textarea/pds-textarea.css +16 -0
  104. package/dist/collection/components/pds-textarea/pds-textarea.js +23 -4
  105. package/dist/collection/components/pds-textarea/pds-textarea.js.map +1 -1
  106. package/dist/collection/components/pds-textarea/stories/pds-textarea.stories.js +13 -0
  107. package/dist/collection/components/pds-toast/pds-toast.js +3 -3
  108. package/dist/collection/components/pds-tooltip/pds-tooltip.js +2 -2
  109. package/dist/collection/utils/types.js.map +1 -1
  110. package/dist/docs.json +6905 -2244
  111. package/dist/esm/loader.js +1 -1
  112. package/dist/esm/pds-accordion.entry.js +1 -1
  113. package/dist/esm/pds-accordion.entry.js.map +1 -1
  114. package/dist/esm/pds-box.entry.js +2 -2
  115. package/dist/esm/pds-box.entry.js.map +1 -1
  116. package/dist/esm/pds-input.entry.js +2 -2
  117. package/dist/esm/pds-input.entry.js.map +1 -1
  118. package/dist/esm/pds-progress.entry.js +1 -1
  119. package/dist/esm/pds-progress.entry.js.map +1 -1
  120. package/dist/esm/pds-radio.entry.js +31 -6
  121. package/dist/esm/pds-radio.entry.js.map +1 -1
  122. package/dist/esm/pds-row.entry.js +19 -1
  123. package/dist/esm/pds-row.entry.js.map +1 -1
  124. package/dist/esm/pds-select.entry.js +2 -2
  125. package/dist/esm/pds-select.entry.js.map +1 -1
  126. package/dist/esm/pds-sortable-item.entry.js +1 -1
  127. package/dist/esm/pds-sortable.entry.js +1 -1
  128. package/dist/esm/pds-switch.entry.js +3 -3
  129. package/dist/esm/pds-tab.entry.js +3 -3
  130. package/dist/esm/pds-table-body.entry.js +1 -1
  131. package/dist/esm/pds-table-cell.entry.js +2 -2
  132. package/dist/esm/pds-table-head-cell.entry.js +2 -2
  133. package/dist/esm/pds-table-head.entry.js +1 -1
  134. package/dist/esm/pds-table-row.entry.js +1 -1
  135. package/dist/esm/pds-tabpanel.entry.js +1 -1
  136. package/dist/esm/pds-tabs.entry.js +1 -1
  137. package/dist/esm/pds-text.entry.js +1 -1
  138. package/dist/esm/pds-textarea.entry.js +5 -5
  139. package/dist/esm/pds-textarea.entry.js.map +1 -1
  140. package/dist/esm/pds-toast.entry.js +3 -3
  141. package/dist/esm/pds-tooltip.entry.js +2 -2
  142. package/dist/esm/pine-core.js +1 -1
  143. package/dist/esm-es5/loader.js +1 -1
  144. package/dist/esm-es5/pds-accordion.entry.js +1 -1
  145. package/dist/esm-es5/pds-accordion.entry.js.map +1 -1
  146. package/dist/esm-es5/pds-box.entry.js +1 -1
  147. package/dist/esm-es5/pds-box.entry.js.map +1 -1
  148. package/dist/esm-es5/pds-input.entry.js +1 -1
  149. package/dist/esm-es5/pds-input.entry.js.map +1 -1
  150. package/dist/esm-es5/pds-progress.entry.js +1 -1
  151. package/dist/esm-es5/pds-progress.entry.js.map +1 -1
  152. package/dist/esm-es5/pds-radio.entry.js +1 -1
  153. package/dist/esm-es5/pds-radio.entry.js.map +1 -1
  154. package/dist/esm-es5/pds-row.entry.js +1 -1
  155. package/dist/esm-es5/pds-row.entry.js.map +1 -1
  156. package/dist/esm-es5/pds-select.entry.js +1 -1
  157. package/dist/esm-es5/pds-select.entry.js.map +1 -1
  158. package/dist/esm-es5/pds-sortable-item.entry.js +1 -1
  159. package/dist/esm-es5/pds-sortable.entry.js +1 -1
  160. package/dist/esm-es5/pds-switch.entry.js +1 -1
  161. package/dist/esm-es5/pds-tab.entry.js +1 -1
  162. package/dist/esm-es5/pds-table-body.entry.js +1 -1
  163. package/dist/esm-es5/pds-table-cell.entry.js +1 -1
  164. package/dist/esm-es5/pds-table-head-cell.entry.js +1 -1
  165. package/dist/esm-es5/pds-table-head.entry.js +1 -1
  166. package/dist/esm-es5/pds-table-row.entry.js +1 -1
  167. package/dist/esm-es5/pds-tabpanel.entry.js +1 -1
  168. package/dist/esm-es5/pds-tabs.entry.js +1 -1
  169. package/dist/esm-es5/pds-text.entry.js +1 -1
  170. package/dist/esm-es5/pds-textarea.entry.js +1 -1
  171. package/dist/esm-es5/pds-textarea.entry.js.map +1 -1
  172. package/dist/esm-es5/pds-toast.entry.js +1 -1
  173. package/dist/esm-es5/pds-tooltip.entry.js +1 -1
  174. package/dist/esm-es5/pine-core.js +1 -1
  175. package/dist/pine-core/p-00f6f3af.system.entry.js +2 -0
  176. package/dist/pine-core/p-00f6f3af.system.entry.js.map +1 -0
  177. package/dist/pine-core/p-04ad9d2c.system.entry.js +2 -0
  178. package/dist/pine-core/p-04ad9d2c.system.entry.js.map +1 -0
  179. package/dist/pine-core/p-0b593535.system.entry.js +2 -0
  180. package/dist/pine-core/p-1039e8e9.entry.js +2 -0
  181. package/dist/pine-core/{p-a2708028.entry.js.map → p-1039e8e9.entry.js.map} +1 -1
  182. package/dist/pine-core/{p-73a2e028.system.entry.js → p-18179981.system.entry.js} +2 -2
  183. package/dist/pine-core/p-18179981.system.entry.js.map +1 -0
  184. package/dist/pine-core/{p-bac9fcfa.entry.js → p-1a7cd7a6.entry.js} +2 -2
  185. package/dist/pine-core/p-1d127ddc.system.entry.js +2 -0
  186. package/dist/pine-core/p-1d127ddc.system.entry.js.map +1 -0
  187. package/dist/pine-core/p-2c407961.entry.js +2 -0
  188. package/dist/pine-core/p-2c407961.entry.js.map +1 -0
  189. package/dist/pine-core/{p-94183716.entry.js → p-332338ee.entry.js} +2 -2
  190. package/dist/pine-core/{p-e5adbf74.system.entry.js → p-3cc92094.system.entry.js} +2 -2
  191. package/dist/pine-core/{p-a3785977.entry.js → p-41abb654.entry.js} +2 -2
  192. package/dist/pine-core/{p-ae4ec5cf.system.entry.js → p-4802f8de.system.entry.js} +2 -2
  193. package/dist/pine-core/{p-f6d0bd39.entry.js → p-4c6ec7c4.entry.js} +2 -2
  194. package/dist/pine-core/{p-8f69dd71.system.entry.js → p-4ef17b95.system.entry.js} +2 -2
  195. package/dist/pine-core/{p-55d06d0a.system.entry.js → p-544fea4c.system.entry.js} +2 -2
  196. package/dist/pine-core/p-5b1d6cd2.entry.js +2 -0
  197. package/dist/pine-core/p-5b1d6cd2.entry.js.map +1 -0
  198. package/dist/pine-core/{p-00346c62.system.entry.js → p-6d48604a.system.entry.js} +2 -2
  199. package/dist/pine-core/{p-449ebe39.system.entry.js → p-7792f47d.system.entry.js} +2 -2
  200. package/dist/pine-core/p-7af21e83.system.entry.js +2 -0
  201. package/dist/pine-core/p-7af21e83.system.entry.js.map +1 -0
  202. package/dist/pine-core/{p-d4d22aee.entry.js → p-81972d0f.entry.js} +2 -2
  203. package/dist/pine-core/p-8b3f4c31.entry.js +2 -0
  204. package/dist/pine-core/{p-41e2fe3a.entry.js → p-8ff41ba8.entry.js} +2 -2
  205. package/dist/pine-core/{p-8b5fc4b4.system.entry.js → p-90e83476.system.entry.js} +2 -2
  206. package/dist/pine-core/{p-d1b27fa4.entry.js → p-96a60a99.entry.js} +2 -2
  207. package/dist/pine-core/p-96a60a99.entry.js.map +1 -0
  208. package/dist/pine-core/{p-c3579585.system.entry.js → p-97299c83.system.entry.js} +2 -2
  209. package/dist/pine-core/p-972a511a.entry.js +2 -0
  210. package/dist/pine-core/p-972a511a.entry.js.map +1 -0
  211. package/dist/pine-core/{p-a2cb65df.entry.js → p-9ac84e63.entry.js} +2 -2
  212. package/dist/pine-core/{p-2fb6f9d5.entry.js → p-9c1bfa68.entry.js} +2 -2
  213. package/dist/pine-core/p-9c1bfa68.entry.js.map +1 -0
  214. package/dist/pine-core/{p-3dce3bc0.system.entry.js → p-9fbb9f0e.system.entry.js} +2 -2
  215. package/dist/pine-core/{p-yaM1kuaC.system.js.map → p-B8JDvOCM.system.js.map} +1 -1
  216. package/dist/pine-core/{p-DtdXdmNp.system.js.map → p-BDK6YCRb.system.js.map} +1 -1
  217. package/dist/pine-core/p-BILpjGVZ.system.js.map +1 -0
  218. package/dist/pine-core/{p-CJNB_wrl.system.js.map → p-BJ3oNLWN.system.js.map} +1 -1
  219. package/dist/pine-core/p-BPjnTOEL.system.js +1 -1
  220. package/dist/pine-core/p-BbhWs2I3.system.js.map +1 -0
  221. package/dist/pine-core/p-CEUtKiTx.system.js.map +1 -0
  222. package/dist/pine-core/p-CQwYeJqz.system.js.map +1 -0
  223. package/dist/pine-core/{p-DN3VK2yy.system.js.map → p-CTkQ9Pq-.system.js.map} +1 -1
  224. package/dist/pine-core/{p-iazk4jjL.system.js.map → p-CdcQ02yR.system.js.map} +1 -1
  225. package/dist/pine-core/{p-Cxlv_2hD.system.js.map → p-CfyzuJNE.system.js.map} +1 -1
  226. package/dist/pine-core/p-CyFXZIZs.system.js.map +1 -0
  227. package/dist/pine-core/p-CypP0PZf.system.js.map +1 -0
  228. package/dist/pine-core/{p-BVDuy7iI.system.js.map → p-DExobiBX.system.js.map} +1 -1
  229. package/dist/pine-core/{p-C3iAHQC6.system.js.map → p-DJ7iTbji.system.js.map} +1 -1
  230. package/dist/pine-core/p-DhDw2HLE.system.js.map +1 -0
  231. package/dist/pine-core/{p-Ctdx1tCG.system.js.map → p-DiWDsjtE.system.js.map} +1 -1
  232. package/dist/pine-core/p-DmdrRtWG.system.js.map +1 -0
  233. package/dist/pine-core/{p-D0foS5EP.system.js.map → p-K3LH4gRE.system.js.map} +1 -1
  234. package/dist/pine-core/{p-1b9d4482.entry.js → p-ae2d59cd.entry.js} +2 -2
  235. package/dist/pine-core/{p-2054b5cb.system.entry.js → p-b9e12535.system.entry.js} +2 -2
  236. package/dist/pine-core/p-bc2530d7.entry.js +2 -0
  237. package/dist/pine-core/p-c2599425.entry.js +2 -0
  238. package/dist/pine-core/p-c2599425.entry.js.map +1 -0
  239. package/dist/pine-core/{p-DpzRSULT.system.js.map → p-ch9PI3Vl.system.js.map} +1 -1
  240. package/dist/pine-core/p-d61f3ab0.system.entry.js +2 -0
  241. package/dist/pine-core/p-d61f3ab0.system.entry.js.map +1 -0
  242. package/dist/pine-core/{p-d69f0f51.system.entry.js → p-da1fb45d.system.entry.js} +2 -2
  243. package/dist/pine-core/{p-9cf2b7a6.entry.js → p-e18c3044.entry.js} +2 -2
  244. package/dist/pine-core/p-e692908e.entry.js +2 -0
  245. package/dist/pine-core/p-e692908e.entry.js.map +1 -0
  246. package/dist/pine-core/{p-2597bc59.system.entry.js → p-ed724664.system.entry.js} +2 -2
  247. package/dist/pine-core/{p-e34c1224.system.entry.js → p-ed7bea99.system.entry.js} +2 -2
  248. package/dist/pine-core/{p-2aab28b1.system.entry.js → p-f0e44449.system.entry.js} +2 -2
  249. package/dist/pine-core/p-f0e44449.system.entry.js.map +1 -0
  250. package/dist/pine-core/p-f25274c9.entry.js +2 -0
  251. package/dist/pine-core/p-f25274c9.entry.js.map +1 -0
  252. package/dist/pine-core/{p-1b932ee3.entry.js → p-f8e1545e.entry.js} +2 -2
  253. package/dist/pine-core/p-fc2f3466.system.entry.js +2 -0
  254. package/dist/pine-core/p-fc2f3466.system.entry.js.map +1 -0
  255. package/dist/pine-core/{p-79422986.entry.js → p-fe60ee09.entry.js} +2 -2
  256. package/dist/pine-core/{p-BIjeWHX_.system.js.map → p-hop4Cgg5.system.js.map} +1 -1
  257. package/dist/pine-core/{p-DOqVoXeA.system.js.map → p-qQVNUF7F.system.js.map} +1 -1
  258. package/dist/pine-core/{p-C1KChp5Q.system.js.map → p-rnM09DN4.system.js.map} +1 -1
  259. package/dist/pine-core/pds-accordion.entry.esm.js.map +1 -1
  260. package/dist/pine-core/pds-box.entry.esm.js.map +1 -1
  261. package/dist/pine-core/pds-input.entry.esm.js.map +1 -1
  262. package/dist/pine-core/pds-progress.entry.esm.js.map +1 -1
  263. package/dist/pine-core/pds-radio.entry.esm.js.map +1 -1
  264. package/dist/pine-core/pds-row.entry.esm.js.map +1 -1
  265. package/dist/pine-core/pds-select.entry.esm.js.map +1 -1
  266. package/dist/pine-core/pds-textarea.entry.esm.js.map +1 -1
  267. package/dist/pine-core/pine-core.esm.js +1 -1
  268. package/dist/types/components/pds-accordion/pds-accordion.d.ts +1 -0
  269. package/dist/types/components/pds-box/pds-box.d.ts +61 -61
  270. package/dist/types/components/pds-input/pds-input.d.ts +4 -0
  271. package/dist/types/components/pds-radio/pds-radio.d.ts +14 -1
  272. package/dist/types/components/pds-row/pds-row.d.ts +4 -4
  273. package/dist/types/components/pds-select/pds-select.d.ts +4 -0
  274. package/dist/types/components/pds-textarea/pds-textarea.d.ts +4 -0
  275. package/dist/types/components.d.ts +163 -129
  276. package/dist/types/utils/types.d.ts +1 -1
  277. package/hydrate/index.js +100 -47
  278. package/hydrate/index.mjs +100 -47
  279. package/package.json +2 -2
  280. package/dist/pine-core/p-20466115.entry.js +0 -2
  281. package/dist/pine-core/p-20466115.entry.js.map +0 -1
  282. package/dist/pine-core/p-25cf2860.system.entry.js +0 -2
  283. package/dist/pine-core/p-25cf2860.system.entry.js.map +0 -1
  284. package/dist/pine-core/p-2aab28b1.system.entry.js.map +0 -1
  285. package/dist/pine-core/p-2fb6f9d5.entry.js.map +0 -1
  286. package/dist/pine-core/p-39648ce2.entry.js +0 -2
  287. package/dist/pine-core/p-39648ce2.entry.js.map +0 -1
  288. package/dist/pine-core/p-465e3418.system.entry.js +0 -2
  289. package/dist/pine-core/p-465e3418.system.entry.js.map +0 -1
  290. package/dist/pine-core/p-61a25ab2.entry.js +0 -2
  291. package/dist/pine-core/p-61a25ab2.entry.js.map +0 -1
  292. package/dist/pine-core/p-6ed297cb.entry.js +0 -2
  293. package/dist/pine-core/p-6ed297cb.entry.js.map +0 -1
  294. package/dist/pine-core/p-708e963c.system.entry.js +0 -2
  295. package/dist/pine-core/p-708e963c.system.entry.js.map +0 -1
  296. package/dist/pine-core/p-73a2e028.system.entry.js.map +0 -1
  297. package/dist/pine-core/p-75187352.system.entry.js +0 -2
  298. package/dist/pine-core/p-75187352.system.entry.js.map +0 -1
  299. package/dist/pine-core/p-786967e8.entry.js +0 -2
  300. package/dist/pine-core/p-875d5d5a.system.entry.js +0 -2
  301. package/dist/pine-core/p-BJjdD3yf.system.js.map +0 -1
  302. package/dist/pine-core/p-BkPtASB1.system.js.map +0 -1
  303. package/dist/pine-core/p-CnPN6prI.system.js.map +0 -1
  304. package/dist/pine-core/p-D7B3vOdC.system.js.map +0 -1
  305. package/dist/pine-core/p-DfrSuf6X.system.js.map +0 -1
  306. package/dist/pine-core/p-DpemOPFJ.system.js.map +0 -1
  307. package/dist/pine-core/p-GrmqKqN8.system.js.map +0 -1
  308. package/dist/pine-core/p-HHZU8rBT.system.js.map +0 -1
  309. package/dist/pine-core/p-a2708028.entry.js +0 -2
  310. package/dist/pine-core/p-a645818a.entry.js +0 -2
  311. package/dist/pine-core/p-acd87a10.entry.js +0 -2
  312. package/dist/pine-core/p-acd87a10.entry.js.map +0 -1
  313. package/dist/pine-core/p-bc2fecd4.system.entry.js +0 -2
  314. package/dist/pine-core/p-bc2fecd4.system.entry.js.map +0 -1
  315. package/dist/pine-core/p-be5ef841.entry.js +0 -2
  316. package/dist/pine-core/p-be5ef841.entry.js.map +0 -1
  317. package/dist/pine-core/p-d1b27fa4.entry.js.map +0 -1
  318. package/dist/pine-core/p-f92d7570.system.entry.js +0 -2
  319. package/dist/pine-core/p-f92d7570.system.entry.js.map +0 -1
  320. /package/dist/pine-core/{p-875d5d5a.system.entry.js.map → p-0b593535.system.entry.js.map} +0 -0
  321. /package/dist/pine-core/{p-bac9fcfa.entry.js.map → p-1a7cd7a6.entry.js.map} +0 -0
  322. /package/dist/pine-core/{p-94183716.entry.js.map → p-332338ee.entry.js.map} +0 -0
  323. /package/dist/pine-core/{p-e5adbf74.system.entry.js.map → p-3cc92094.system.entry.js.map} +0 -0
  324. /package/dist/pine-core/{p-a3785977.entry.js.map → p-41abb654.entry.js.map} +0 -0
  325. /package/dist/pine-core/{p-ae4ec5cf.system.entry.js.map → p-4802f8de.system.entry.js.map} +0 -0
  326. /package/dist/pine-core/{p-f6d0bd39.entry.js.map → p-4c6ec7c4.entry.js.map} +0 -0
  327. /package/dist/pine-core/{p-8f69dd71.system.entry.js.map → p-4ef17b95.system.entry.js.map} +0 -0
  328. /package/dist/pine-core/{p-55d06d0a.system.entry.js.map → p-544fea4c.system.entry.js.map} +0 -0
  329. /package/dist/pine-core/{p-00346c62.system.entry.js.map → p-6d48604a.system.entry.js.map} +0 -0
  330. /package/dist/pine-core/{p-449ebe39.system.entry.js.map → p-7792f47d.system.entry.js.map} +0 -0
  331. /package/dist/pine-core/{p-d4d22aee.entry.js.map → p-81972d0f.entry.js.map} +0 -0
  332. /package/dist/pine-core/{p-786967e8.entry.js.map → p-8b3f4c31.entry.js.map} +0 -0
  333. /package/dist/pine-core/{p-41e2fe3a.entry.js.map → p-8ff41ba8.entry.js.map} +0 -0
  334. /package/dist/pine-core/{p-8b5fc4b4.system.entry.js.map → p-90e83476.system.entry.js.map} +0 -0
  335. /package/dist/pine-core/{p-c3579585.system.entry.js.map → p-97299c83.system.entry.js.map} +0 -0
  336. /package/dist/pine-core/{p-a2cb65df.entry.js.map → p-9ac84e63.entry.js.map} +0 -0
  337. /package/dist/pine-core/{p-3dce3bc0.system.entry.js.map → p-9fbb9f0e.system.entry.js.map} +0 -0
  338. /package/dist/pine-core/{p-1b9d4482.entry.js.map → p-ae2d59cd.entry.js.map} +0 -0
  339. /package/dist/pine-core/{p-2054b5cb.system.entry.js.map → p-b9e12535.system.entry.js.map} +0 -0
  340. /package/dist/pine-core/{p-a645818a.entry.js.map → p-bc2530d7.entry.js.map} +0 -0
  341. /package/dist/pine-core/{p-d69f0f51.system.entry.js.map → p-da1fb45d.system.entry.js.map} +0 -0
  342. /package/dist/pine-core/{p-9cf2b7a6.entry.js.map → p-e18c3044.entry.js.map} +0 -0
  343. /package/dist/pine-core/{p-2597bc59.system.entry.js.map → p-ed724664.system.entry.js.map} +0 -0
  344. /package/dist/pine-core/{p-e34c1224.system.entry.js.map → p-ed7bea99.system.entry.js.map} +0 -0
  345. /package/dist/pine-core/{p-1b932ee3.entry.js.map → p-f8e1545e.entry.js.map} +0 -0
  346. /package/dist/pine-core/{p-79422986.entry.js.map → p-fe60ee09.entry.js.map} +0 -0
@@ -5,6 +5,7 @@
5
5
  align-items: center;
6
6
  display: flex;
7
7
  flex-flow: row wrap;
8
+ position: relative;
8
9
  }
9
10
 
10
11
  :host(.is-invalid) input {
@@ -25,6 +26,37 @@
25
26
  color: var(--pine-color-text-message-danger);
26
27
  }
27
28
 
29
+ :host(.has-border) {
30
+ align-items: flex-start;
31
+ border: var(--pine-border);
32
+ border-radius: var(--pine-dimension-125);
33
+ column-gap: var(--pine-dimension-xs);
34
+ display: flex;
35
+ flex: 1;
36
+ flex-direction: column;
37
+ padding: var(--pine-dimension-md);
38
+ }
39
+ :host(.has-border):hover {
40
+ border: var(--pine-border-hover);
41
+ }
42
+ :host(.has-border):has(input:checked) {
43
+ box-shadow: 0 0 0 2px var(--pine-color-primary-hover);
44
+ }
45
+ :host(.has-border) label {
46
+ color: var(--pine-color-text);
47
+ font-weight: var(--pine-font-weight-semi-bold);
48
+ }
49
+ :host(.has-border) label::after {
50
+ content: "";
51
+ cursor: pointer;
52
+ height: 100%;
53
+ left: 0;
54
+ position: absolute;
55
+ top: 0;
56
+ width: 100%;
57
+ z-index: 1;
58
+ }
59
+
28
60
  input {
29
61
  appearance: none;
30
62
  background: var(--pine-color-background-container);
@@ -36,6 +68,19 @@ input {
36
68
  margin-block-start: var(--pine-dimension-025);
37
69
  position: relative;
38
70
  width: var(--sizing-input-size);
71
+ /* stylelint-disable-next-line selector-no-qualifying-type */
72
+ }
73
+ input.visually-hidden {
74
+ border: 0;
75
+ clip: rect(0 0 0 0);
76
+ clip-path: polygon(0 0, 0 0, 0 0);
77
+ height: 1px;
78
+ margin: -1px;
79
+ overflow: hidden;
80
+ padding: 0;
81
+ position: absolute;
82
+ white-space: nowrap;
83
+ width: 1px;
39
84
  }
40
85
  input:hover {
41
86
  background: var(--pine-color-background-container-hover);
@@ -103,17 +148,114 @@ label {
103
148
 
104
149
  .pds-radio__message {
105
150
  color: var(--pine-color-text-message);
106
- font: var(--pine-typography-body-sm-medium);
107
- margin-block-start: var(--sizing-margin-block-start);
151
+ font: var(--pine-typography-body);
108
152
  margin-inline-start: var(--pine-dimension-md);
109
153
  width: 100%;
110
154
  }
111
155
 
112
156
  .pds-radio__message--error {
113
157
  display: flex;
114
- font-size: var(--pine-font-size-body-sm);
115
158
  gap: var(--pine-dimension-2xs);
116
159
  }
117
160
  .pds-radio__message--error pds-icon {
118
161
  margin-block-start: var(--pine-dimension-025);
162
+ }
163
+
164
+ :host(.has-image) {
165
+ align-items: center;
166
+ border: var(--pine-border);
167
+ border-radius: var(--pine-dimension-125);
168
+ column-gap: var(--pine-dimension-xs);
169
+ display: flex;
170
+ flex: 1;
171
+ padding: var(--pine-dimension-md);
172
+ }
173
+ :host(.has-image):hover {
174
+ border: var(--pine-border-hover);
175
+ }
176
+ :host(.has-image):has(input:checked) {
177
+ box-shadow: 0 0 0 2px var(--pine-color-primary-hover);
178
+ }
179
+ :host(.has-image) label {
180
+ color: var(--pine-color-text);
181
+ display: flex;
182
+ font-weight: var(--pine-font-weight-semi-bold);
183
+ gap: var(--pine-dimension-xs);
184
+ }
185
+ :host(.has-image) label::after {
186
+ content: "";
187
+ cursor: pointer;
188
+ height: 100%;
189
+ left: 0;
190
+ position: absolute;
191
+ top: 0;
192
+ width: 100%;
193
+ z-index: 1;
194
+ }
195
+ :host(.has-image) .pds-radio__image-container {
196
+ align-items: center;
197
+ align-self: center;
198
+ border: var(--pine-border);
199
+ border-radius: var(--pine-border-radius-full);
200
+ cursor: pointer;
201
+ display: flex;
202
+ flex: none;
203
+ grid-area: image;
204
+ justify-content: center;
205
+ overflow: hidden;
206
+ position: relative;
207
+ transition: all 0.2s ease;
208
+ }
209
+ :host(.has-image) .pds-radio__image-container:hover {
210
+ border-color: var(--pine-color-border-hover);
211
+ }
212
+ :host(.has-image) .pds-radio__image-container .pds-radio__image {
213
+ height: 100%;
214
+ object-fit: cover;
215
+ width: 100%;
216
+ }
217
+ :host(.has-image) .pds-radio__message {
218
+ grid-area: message;
219
+ margin-block-start: 0;
220
+ margin-inline-start: 0;
221
+ }
222
+ :host(.has-image).is-disabled .pds-radio__image-container {
223
+ border-color: var(--pine-color-border-disabled);
224
+ cursor: not-allowed;
225
+ opacity: 0.6;
226
+ }
227
+ :host(.has-image).is-disabled .pds-radio__image-container:hover {
228
+ border-color: var(--pine-color-border-disabled);
229
+ }
230
+ :host(.has-image).is-disabled label {
231
+ cursor: not-allowed;
232
+ }
233
+ :host(.has-image).is-invalid .pds-radio__image-container {
234
+ border-color: var(--pine-color-border-danger);
235
+ }
236
+ :host(.has-image).is-invalid .pds-radio__image-container:hover {
237
+ border-color: var(--pine-color-border-danger-hover);
238
+ }
239
+ :host(.has-image).is-invalid:has(input:checked) {
240
+ box-shadow: 0 0 0 2px var(--pine-color-border-danger);
241
+ }
242
+ :host(.has-image).is-invalid:has(input:checked) .pds-radio__image-container {
243
+ border-color: var(--pine-color-border-danger);
244
+ box-shadow: 0 0 0 2px var(--pine-color-border-danger);
245
+ /* stylelint-disable-next-line */
246
+ /* stylelint-disable-next-line */
247
+ }
248
+ :host(.has-image).is-invalid:has(input:checked) .pds-radio__image-container::after {
249
+ background: var(--pine-color-border-danger);
250
+ }
251
+ :host(.has-image).is-invalid:has(input:checked) .pds-radio__image-container:hover {
252
+ border-color: var(--pine-color-border-danger-hover);
253
+ box-shadow: 0 0 0 2px var(--pine-color-border-danger-hover);
254
+ }
255
+ :host(.has-image).is-invalid:has(input:checked):hover {
256
+ box-shadow: 0 0 0 2px var(--pine-color-border-danger-hover);
257
+ }
258
+ :host(.has-image).is-invalid label,
259
+ :host(.has-image).is-invalid .pds-radio__message--error {
260
+ color: var(--pine-color-text-message-danger);
119
261
  }
@@ -1,9 +1,14 @@
1
1
  import { Host, h } from "@stencil/core";
2
2
  import { assignDescription, messageId, exposeTypeProperty } from "../../utils/form";
3
3
  import { danger } from "@pine-ds/icons/icons";
4
+ /**
5
+ * @slot image - Custom image content to display instead of the default radio input
6
+ * @part image-container - The container for the image
7
+ */
4
8
  export class PdsRadio {
5
9
  constructor() {
6
10
  this._type = 'radio';
11
+ this._hasImage = false;
7
12
  /**
8
13
  * Determines whether or not the radio is checked.
9
14
  * @defaultValue false
@@ -14,6 +19,11 @@ export class PdsRadio {
14
19
  * @defaultValue false
15
20
  */
16
21
  this.disabled = false;
22
+ /**
23
+ * Adds a border around the radio component for better visual separation.
24
+ * @defaultValue false
25
+ */
26
+ this.hasBorder = false;
17
27
  /**
18
28
  * Determines whether or not the radio is invalid.
19
29
  * @defaultValue false
@@ -33,6 +43,13 @@ export class PdsRadio {
33
43
  this.pdsRadioChange.emit(isChecked);
34
44
  };
35
45
  }
46
+ hasImageSlot() {
47
+ const imageSlot = this.el.querySelector('[slot="image"]');
48
+ return !!imageSlot;
49
+ }
50
+ hasImage() {
51
+ return this._hasImage;
52
+ }
36
53
  classNames() {
37
54
  const classNames = [];
38
55
  if (this.invalid) {
@@ -41,16 +58,28 @@ export class PdsRadio {
41
58
  if (this.disabled) {
42
59
  classNames.push('is-disabled');
43
60
  }
44
- return classNames.join(' ');
61
+ if (this.hasBorder) {
62
+ classNames.push('has-border');
63
+ }
64
+ if (this.hasImage()) {
65
+ classNames.push('has-image');
66
+ }
67
+ return classNames.join(' ');
68
+ }
69
+ componentWillLoad() {
70
+ this._hasImage = this.hasImageSlot();
45
71
  }
46
72
  connectedCallback() {
47
73
  // Expose type property on the element instance to match native form element behavior
48
74
  exposeTypeProperty(this.el, () => this._type);
49
75
  }
50
76
  render() {
51
- return (h(Host, { key: '06e5b348a9fe664ac157f0383dab869885644f28', class: this.classNames() }, h("label", { key: '12d203aa9a181de09a4323b0644905f308209e10', htmlFor: this.componentId }, h("input", { key: '693af2832937dfa368859bc5d34e33813093bd19', "aria-describedby": assignDescription(this.componentId, this.invalid, this.helperMessage), "aria-invalid": this.invalid ? "true" : undefined, type: "radio", id: this.componentId, name: this.name, value: this.value, checked: this.checked, required: this.required, disabled: this.disabled, onChange: this.handleRadioChange }), h("span", { key: '12cbafe6f967b0336e12083e506d0347fd60bb1a', class: this.hideLabel ? 'visually-hidden' : '' }, this.label)), this.helperMessage &&
52
- h("div", { key: 'd4c416a2c24331bb23c6bd829aff51dfe142ac4a', class: 'pds-radio__message', id: messageId(this.componentId, 'helper') }, this.helperMessage), this.errorMessage &&
53
- h("div", { key: '8b973854356bdf1d36401bb7f818bacf573da010', class: `pds-radio__message pds-radio__message--error`, id: messageId(this.componentId, 'error'), "aria-live": "assertive" }, h("pds-icon", { key: '85abae586504b4d64a19bf078ddd5fab099e4e06', icon: danger, size: "small" }), this.errorMessage)));
77
+ const renderLabelAndMessages = () => [
78
+ h("label", { htmlFor: this.componentId, key: `${this.componentId}-label` }, h("input", { key: '714cf76fc30ab26b58523c6d802650a12de9c01a', "aria-describedby": assignDescription(this.componentId, this.invalid, this.helperMessage), "aria-invalid": this.invalid ? "true" : undefined, type: "radio", id: this.componentId, name: this.name, value: this.value, checked: this.checked, required: this.required, disabled: this.disabled, onChange: this.handleRadioChange, class: this.hasImage() ? 'visually-hidden' : '' }), h("span", { key: 'fc5deb9d38f9d2cc19a793dc32c46d88c9831482', class: this.hideLabel ? 'visually-hidden' : '' }, this.label)),
79
+ this.helperMessage && (h("div", { key: `${this.componentId}-helper`, class: 'pds-radio__message', id: messageId(this.componentId, 'helper') }, this.helperMessage)),
80
+ this.errorMessage && (h("div", { key: `${this.componentId}-error`, class: `pds-radio__message pds-radio__message--error`, id: messageId(this.componentId, 'error'), "aria-live": "assertive" }, h("pds-icon", { key: '771d1a284a0f24f204691c04addc7120d60c7a8c', icon: danger, size: "small" }), this.errorMessage))
81
+ ];
82
+ return (h(Host, { key: 'edf86e2d9070289457c0256e1dbf7a5febdbc386', class: this.classNames() }, this.hasImage() && (h("div", { key: 'fddaf8db228e2e4a2b00ded0fe9afba80c876503', class: "pds-radio__image-container", part: "image-container" }, h("slot", { key: '2a5dbf40e955d039f6618fe9fa7e345ad5b6548d', name: "image", onSlotchange: () => (this._hasImage = this.hasImageSlot()) }))), this.hasImage() ? (h("div", { class: "pds-radio__content-wrapper" }, renderLabelAndMessages())) : (renderLabelAndMessages())));
54
83
  }
55
84
  static get is() { return "pds-radio"; }
56
85
  static get encapsulation() { return "scoped"; }
@@ -169,6 +198,29 @@ export class PdsRadio {
169
198
  "attribute": "helper-message",
170
199
  "reflect": false
171
200
  },
201
+ "hasBorder": {
202
+ "type": "boolean",
203
+ "mutable": false,
204
+ "complexType": {
205
+ "original": "boolean",
206
+ "resolved": "boolean",
207
+ "references": {}
208
+ },
209
+ "required": false,
210
+ "optional": false,
211
+ "docs": {
212
+ "tags": [{
213
+ "name": "defaultValue",
214
+ "text": "false"
215
+ }],
216
+ "text": "Adds a border around the radio component for better visual separation."
217
+ },
218
+ "getter": false,
219
+ "setter": false,
220
+ "attribute": "has-border",
221
+ "reflect": false,
222
+ "defaultValue": "false"
223
+ },
172
224
  "invalid": {
173
225
  "type": "boolean",
174
226
  "mutable": false,
@@ -293,6 +345,11 @@ export class PdsRadio {
293
345
  }
294
346
  };
295
347
  }
348
+ static get states() {
349
+ return {
350
+ "_hasImage": {}
351
+ };
352
+ }
296
353
  static get events() {
297
354
  return [{
298
355
  "method": "pdsRadioChange",
@@ -302,7 +359,7 @@ export class PdsRadio {
302
359
  "composed": true,
303
360
  "docs": {
304
361
  "tags": [],
305
- "text": "Emits a boolean indicating whether the checkbox is currently checked or unchecked."
362
+ "text": "Emits a boolean indicating whether the radio is currently checked or unchecked."
306
363
  },
307
364
  "complexType": {
308
365
  "original": "boolean",
@@ -1 +1 @@
1
- {"version":3,"file":"pds-radio.js","sourceRoot":"","sources":["../../../src/components/pds-radio/pds-radio.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAgB,OAAO,EAAE,MAAM,eAAe,CAAC;AACvF,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACpF,OAAO,EAAE,MAAM,EAAE,MAAM,sB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component, Host, h, Prop, Event, EventEmitter, Element } from '@stencil/core';\nimport { assignDescription, messageId, exposeTypeProperty } from '../../utils/form';\nimport { danger } from '@pine-ds/icons/icons';\n\n@Component({\n tag: 'pds-radio',\n styleUrls: ['../../global/styles/utils/label.scss', 'pds-radio.scss'],\n scoped: true,\n})\nexport class PdsRadio {\n private readonly _type = 'radio' as const;\n\n @Element() el: HTMLPdsRadioElement;\n\n /**\n * Determines whether or not the radio is checked.\n * @defaultValue false\n */\n @Prop() checked = 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 * Determines whether or not the radio is disabled.\n * @defaultValue false\n */\n @Prop() disabled = false;\n\n /**\n * Displays error message text describing an invalid state.\n */\n @Prop() errorMessage: string;\n\n /**\n * Displays helper message text below radio.\n */\n @Prop() helperMessage: string;\n\n /**\n * Determines whether or not the radio is invalid.\n * @defaultValue false\n */\n @Prop() invalid = false;\n\n /**\n * String used for label text next to radio.\n */\n @Prop() label: string;\n\n /**\n * Visually hides the label text for instances where only the radio should be displayed. Label remains accessible to assistive technology such as screen readers.\n */\n @Prop() hideLabel: boolean;\n\n /**\n * String used for radio `name` attribute.\n */\n @Prop() name: string;\n\n /**\n * Determines whether or not the radio is required.\n * @defaultValue false\n */\n @Prop() required = false;\n\n /**\n * The value of the radio that is submitted with a form.\n */\n @Prop() value: string;\n\n\n /**\n * Emits a boolean indicating whether the checkbox is currently checked or unchecked.\n */\n @Event() pdsRadioChange: EventEmitter<boolean>;\n\n private handleRadioChange = (e: Event) => {\n if (this.disabled) {\n return;\n }\n\n const target = e.target as HTMLInputElement;\n const isChecked = target.checked;\n\n this.pdsRadioChange.emit(isChecked);\n }\n\n private classNames() {\n const classNames = [];\n\n if (this.invalid) {\n classNames.push('is-invalid');\n }\n if (this.disabled) {\n classNames.push('is-disabled');\n }\n\n return classNames.join(' ');\n }\n\n connectedCallback() {\n // Expose type property on the element instance to match native form element behavior\n exposeTypeProperty(this.el, () => this._type);\n }\n\n render() {\n return (\n <Host class={this.classNames()}>\n <label htmlFor={this.componentId}>\n <input\n aria-describedby={assignDescription(this.componentId, this.invalid, this.helperMessage)}\n aria-invalid={this.invalid ? \"true\" : undefined}\n type=\"radio\"\n id={this.componentId}\n name={this.name}\n value={this.value}\n checked={this.checked}\n required={this.required}\n disabled={this.disabled}\n onChange={this.handleRadioChange}\n />\n <span class={this.hideLabel ? 'visually-hidden' : ''}>\n {this.label}\n </span>\n </label>\n {this.helperMessage &&\n <div\n class={'pds-radio__message'}\n id={messageId(this.componentId, 'helper')}\n >\n {this.helperMessage}\n </div>\n }\n {this.errorMessage &&\n <div\n class={`pds-radio__message pds-radio__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-radio.js","sourceRoot":"","sources":["../../../src/components/pds-radio/pds-radio.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAgB,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC9F,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACpF,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C;;;GAGG;AAMH,MAAM,OAAO,QAAQ;IALrB;QAMmB,UAAK,GAAG,OAAgB,CAAC;QAIzB,cAAS,GAAG,KAAK,CAAC;QAEnC;;;WAGG;QACK,YAAO,GAAG,KAAK,CAAC;QAOxB;;;WAGG;QACK,aAAQ,GAAG,KAAK,CAAC;QAYzB;;;WAGG;QACK,cAAS,GAAG,KAAK,CAAC;QAExB;;;SAGC;QACO,YAAO,GAAG,KAAK,CAAC;QAiB1B;;;WAGG;QACK,aAAQ,GAAG,KAAK,CAAC;QAajB,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C9B,WAAW;gBAErB,iEAAU,IAAI,EAAE,MAAM,EAAE,IAAI,EAAC,OAAO,GAAG;gBACtC,IAAI,CAAC,YAAY,CACd,CACP;SACF,CAAC;QAEF,OAAO,CACL,EAAC,IAAI,qDAAC,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE;YAC3B,IAAI,CAAC,QAAQ,EAAE,IAAI,CAClB,4DAAK,KAAK,EAAC,4BAA4B,EAAC,IAAI,EAAC,iBAAiB;gBAC5D,6DAAM,IAAI,EAAC,OAAO,EAAC,YAAY,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC,GAAI,CAC7E,CACP;YACA,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,CACjB,WAAK,KAAK,EAAC,4BAA4B,IACpC,sBAAsB,EAAE,CACrB,CACP,CAAC,CAAC,CAAC,CACF,sBAAsB,EAAE,CACzB,CACI,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop, Event, EventEmitter, Element, State } from '@stencil/core';\nimport { assignDescription, messageId, exposeTypeProperty } from '../../utils/form';\nimport { danger } from '@pine-ds/icons/icons';\n\n/**\n * @slot image - Custom image content to display instead of the default radio input\n * @part image-container - The container for the image\n */\n@Component({\n tag: 'pds-radio',\n styleUrls: ['../../global/styles/utils/label.scss', 'pds-radio.scss'],\n scoped: true,\n})\nexport class PdsRadio {\n private readonly _type = 'radio' as const;\n\n @Element() el: HTMLPdsRadioElement;\n\n @State() private _hasImage = false;\n\n /**\n * Determines whether or not the radio is checked.\n * @defaultValue false\n */\n @Prop() checked = 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 * Determines whether or not the radio is disabled.\n * @defaultValue false\n */\n @Prop() disabled = false;\n\n /**\n * Displays error message text describing an invalid state.\n */\n @Prop() errorMessage: string;\n\n /**\n * Displays helper message text below radio.\n */\n @Prop() helperMessage: string;\n\n /**\n * Adds a border around the radio component for better visual separation.\n * @defaultValue false\n */\n @Prop() hasBorder = false;\n\n /**\n * Determines whether or not the radio is invalid.\n * @defaultValue false\n */\n @Prop() invalid = false;\n\n /**\n * String used for label text next to radio.\n */\n @Prop() label: string;\n\n /**\n * Visually hides the label text for instances where only the radio should be displayed. Label remains accessible to assistive technology such as screen readers.\n */\n @Prop() hideLabel: boolean;\n\n /**\n * String used for radio `name` attribute.\n */\n @Prop() name: string;\n\n /**\n * Determines whether or not the radio is required.\n * @defaultValue false\n */\n @Prop() required = false;\n\n /**\n * The value of the radio that is submitted with a form.\n */\n @Prop() value: string;\n\n\n /**\n * Emits a boolean indicating whether the radio is currently checked or unchecked.\n */\n @Event() pdsRadioChange: EventEmitter<boolean>;\n\n private handleRadioChange = (e: Event) => {\n if (this.disabled) {\n return;\n }\n\n const target = e.target as HTMLInputElement;\n const isChecked = target.checked;\n\n this.pdsRadioChange.emit(isChecked);\n }\n\n private hasImageSlot(): boolean {\n const imageSlot = this.el.querySelector('[slot=\"image\"]');\n return !!imageSlot;\n }\n\n private hasImage(): boolean {\n return this._hasImage;\n }\n\n private classNames() {\n const classNames = [];\n\n if (this.invalid) {\n classNames.push('is-invalid');\n }\n if (this.disabled) {\n classNames.push('is-disabled');\n }\n if (this.hasBorder) {\n classNames.push('has-border');\n }\n if (this.hasImage()) {\n classNames.push('has-image');\n }\n\n return classNames.join(' ');\n }\n\n componentWillLoad() {\n this._hasImage = this.hasImageSlot();\n }\n\n connectedCallback() {\n // Expose type property on the element instance to match native form element behavior\n exposeTypeProperty(this.el, () => this._type);\n }\n\n render() {\n const renderLabelAndMessages = () => [\n <label htmlFor={this.componentId} key={`${this.componentId}-label`}>\n <input\n aria-describedby={assignDescription(this.componentId, this.invalid, this.helperMessage)}\n aria-invalid={this.invalid ? \"true\" : undefined}\n type=\"radio\"\n id={this.componentId}\n name={this.name}\n value={this.value}\n checked={this.checked}\n required={this.required}\n disabled={this.disabled}\n onChange={this.handleRadioChange}\n class={this.hasImage() ? 'visually-hidden' : ''}\n />\n <span class={this.hideLabel ? 'visually-hidden' : ''}>\n {this.label}\n </span>\n </label>,\n this.helperMessage && (\n <div\n key={`${this.componentId}-helper`}\n class={'pds-radio__message'}\n id={messageId(this.componentId, 'helper')}\n >\n {this.helperMessage}\n </div>\n ),\n this.errorMessage && (\n <div\n key={`${this.componentId}-error`}\n class={`pds-radio__message pds-radio__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 ];\n\n return (\n <Host class={this.classNames()}>\n {this.hasImage() && (\n <div class=\"pds-radio__image-container\" part=\"image-container\">\n <slot name=\"image\" onSlotchange={() => (this._hasImage = this.hasImageSlot())} />\n </div>\n )}\n {this.hasImage() ? (\n <div class=\"pds-radio__content-wrapper\">\n {renderLabelAndMessages()}\n </div>\n ) : (\n renderLabelAndMessages()\n )}\n </Host>\n );\n }\n}\n"]}
@@ -6,6 +6,7 @@ export default {
6
6
  args: {
7
7
  checked: false,
8
8
  disabled: false,
9
+ hasBorder: false,
9
10
  invalid: false,
10
11
  hideLabel: false,
11
12
  required: false,
@@ -28,6 +29,7 @@ const BaseTemplate = (args) =>
28
29
  ?checked=${args.checked}
29
30
  ?disabled=${args.disabled}
30
31
  error-message=${args.errorMessage}
32
+ ?has-border=${args.hasBorder}
31
33
  helper-message=${args.helperMessage}
32
34
  ?hide-label=${args.hideLabel}
33
35
  name=${args.name}
@@ -71,3 +73,38 @@ Invalid.args = {
71
73
  label: 'Label text',
72
74
  invalid: true,
73
75
  };
76
+
77
+ export const WithBorder = BaseTemplate.bind();
78
+ WithBorder.args = {
79
+ componentId: 'with-border',
80
+ label: 'Label text',
81
+ hasBorder: true,
82
+ helperMessage: 'This radio has a border for better visual separation',
83
+ };
84
+
85
+ const ImageTemplate = (args) =>
86
+ html` <pds-radio
87
+ component-id=${args.componentId}
88
+ label=${args.label}
89
+ ?checked=${args.checked}
90
+ ?disabled=${args.disabled}
91
+ error-message=${args.errorMessage}
92
+ ?has-border=${args.hasBorder}
93
+ helper-message=${args.helperMessage}
94
+ ?hide-label=${args.hideLabel}
95
+ name=${args.name}
96
+ ?required=${args.required}
97
+ value=${args.value}
98
+ ?invalid=${args.invalid}
99
+ >
100
+ <pds-box slot="image" background-color="var(--pine-color-accent)" border-radius="full" padding="sm">
101
+ <pds-icon icon="danger" size="medium" color="var(--pine-color-white)" />
102
+ </pds-box>
103
+ </pds-radio>`;
104
+
105
+ export const WithImage = ImageTemplate.bind();
106
+ WithImage.args = {
107
+ componentId: 'with-image',
108
+ label: 'Option with image',
109
+ helperMessage: 'This radio includes an image using the image slot',
110
+ };
@@ -18,6 +18,24 @@ export class PdsRow {
18
18
  lg: '2.25rem',
19
19
  xl: '3rem',
20
20
  xxl: '4rem',
21
+ '025': 'var(--pine-dimension-025)',
22
+ '050': 'var(--pine-dimension-050)',
23
+ '100': 'var(--pine-dimension-100)',
24
+ '125': 'var(--pine-dimension-125)',
25
+ '150': 'var(--pine-dimension-150)',
26
+ '200': 'var(--pine-dimension-200)',
27
+ '250': 'var(--pine-dimension-250)',
28
+ '300': 'var(--pine-dimension-300)',
29
+ '350': 'var(--pine-dimension-350)',
30
+ '400': 'var(--pine-dimension-400)',
31
+ '450': 'var(--pine-dimension-450)',
32
+ '500': 'var(--pine-dimension-500)',
33
+ '550': 'var(--pine-dimension-550)',
34
+ '600': 'var(--pine-dimension-600)',
35
+ '650': 'var(--pine-dimension-650)',
36
+ '700': 'var(--pine-dimension-700)',
37
+ '750': 'var(--pine-dimension-750)',
38
+ '800': 'var(--pine-dimension-800)'
21
39
  };
22
40
  }
23
41
  render() {
@@ -37,7 +55,7 @@ export class PdsRow {
37
55
  })), (this.minHeight && {
38
56
  'min-height': this.minHeight,
39
57
  }));
40
- return h(Host, { key: 'd9fd2087c959b16ca168ee2b011a3d4bd466c113', class: `pds-row ${rowClasses}`, style: rowInlineStyles });
58
+ return h(Host, { key: '8e3f5095c33ca22b26dc2cd328ec84663e3bc46b', class: `pds-row ${rowClasses}`, style: rowInlineStyles });
41
59
  }
42
60
  static get is() { return "pds-row"; }
43
61
  static get originalStyleUrls() {
@@ -98,13 +116,13 @@ export class PdsRow {
98
116
  "type": "string",
99
117
  "mutable": false,
100
118
  "complexType": {
101
- "original": "BoxTShirtSizeType | null",
102
- "resolved": "\"lg\" | \"md\" | \"none\" | \"sm\" | \"xl\" | \"xs\" | \"xxl\" | \"xxs\"",
119
+ "original": "BoxSpacingType | null",
120
+ "resolved": "\"none\" | \"xxs\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" | \"xxl\" | \"025\" | \"050\" | \"100\" | \"125\" | \"150\" | \"200\" | \"250\" | \"300\" | \"350\" | \"400\" | \"450\" | \"500\" | \"550\" | \"600\" | \"650\" | \"700\" | \"750\" | \"800\"",
103
121
  "references": {
104
- "BoxTShirtSizeType": {
122
+ "BoxSpacingType": {
105
123
  "location": "import",
106
124
  "path": "../../utils/types",
107
- "id": "src/utils/types.ts::BoxTShirtSizeType"
125
+ "id": "src/utils/types.ts::BoxSpacingType"
108
126
  }
109
127
  }
110
128
  },
@@ -123,13 +141,13 @@ export class PdsRow {
123
141
  "type": "string",
124
142
  "mutable": false,
125
143
  "complexType": {
126
- "original": "BoxTShirtSizeType | null",
127
- "resolved": "\"lg\" | \"md\" | \"none\" | \"sm\" | \"xl\" | \"xs\" | \"xxl\" | \"xxs\"",
144
+ "original": "BoxSpacingType | null",
145
+ "resolved": "\"none\" | \"xxs\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" | \"xxl\" | \"025\" | \"050\" | \"100\" | \"125\" | \"150\" | \"200\" | \"250\" | \"300\" | \"350\" | \"400\" | \"450\" | \"500\" | \"550\" | \"600\" | \"650\" | \"700\" | \"750\" | \"800\"",
128
146
  "references": {
129
- "BoxTShirtSizeType": {
147
+ "BoxSpacingType": {
130
148
  "location": "import",
131
149
  "path": "../../utils/types",
132
- "id": "src/utils/types.ts::BoxTShirtSizeType"
150
+ "id": "src/utils/types.ts::BoxSpacingType"
133
151
  }
134
152
  }
135
153
  },
@@ -148,13 +166,13 @@ export class PdsRow {
148
166
  "type": "string",
149
167
  "mutable": false,
150
168
  "complexType": {
151
- "original": "BoxTShirtSizeType | null",
152
- "resolved": "\"lg\" | \"md\" | \"none\" | \"sm\" | \"xl\" | \"xs\" | \"xxl\" | \"xxs\"",
169
+ "original": "BoxSpacingType | null",
170
+ "resolved": "\"none\" | \"xxs\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" | \"xxl\" | \"025\" | \"050\" | \"100\" | \"125\" | \"150\" | \"200\" | \"250\" | \"300\" | \"350\" | \"400\" | \"450\" | \"500\" | \"550\" | \"600\" | \"650\" | \"700\" | \"750\" | \"800\"",
153
171
  "references": {
154
- "BoxTShirtSizeType": {
172
+ "BoxSpacingType": {
155
173
  "location": "import",
156
174
  "path": "../../utils/types",
157
- "id": "src/utils/types.ts::BoxTShirtSizeType"
175
+ "id": "src/utils/types.ts::BoxSpacingType"
158
176
  }
159
177
  }
160
178
  },
@@ -1 +1 @@
1
- {"version":3,"file":"pds-row.js","sourceRoot":"","sources":["../../../src/components/pds-row/pds-row.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAQzD,MAAM,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,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE;SACzG,CAAC,GACC,CAAC,IAAI,CAAC,WAAW,IAAI;YACtB,aAAa,EAAE,IAAI,CAAC,WAAW,KAAK,SAAS,IAAI,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAE;SACxH,CAAC,GACC,CAAC,IAAI,CAAC,YAAY,IAAI;YACvB,aAAa,EAAE,IAAI,CAAC,YAAY,KAAK,SAAS,IAAI,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,EAAE;SAC3H,CAAC,GACC,CAAC,IAAI,CAAC,SAAS,IAAI;YACpB,YAAY,EAAE,IAAI,CAAC,SAAS;SAC7B,CAAC,CACH,CAAC;QAEF,OAAO,EAAC,IAAI,qDAAC,KAAK,EAAE,WAAW,UAAU,EAAE,EAAE,KAAK,EAAE,eAAe,GAAS,CAAC;IAC/E,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, h, Host } from '@stencil/core';\n\nimport { BoxTShirtSizeType } from '../../utils/types';\n\n@Component({\n tag: 'pds-row',\n styleUrl: 'pds-row.scss',\n})\nexport class PdsRow {\n /**\n * Defines the vertical alignment of the row items.\n * @defaultValue start\n */\n @Prop() alignItems?: `start` | `center` | `end` | `baseline` | `stretch`;\n\n /**\n * If `true`, the row will have a border.\n */\n @Prop() border? = false;\n\n /**\n * Defines the spacing between the row items.\n */\n @Prop() colGap?: BoxTShirtSizeType | null;\n\n /**\n * Defines the spacing between the row items vertically.\n */\n @Prop() colGapBlock?: BoxTShirtSizeType | null;\n\n /**\n * Defines the spacing between the row items horizontally.\n */\n @Prop() colGapInline?: BoxTShirtSizeType | null;\n\n /**\n * A unique identifier used for the underlying component `id` attribute.\n */\n @Prop() componentId: string;\n\n /**\n * Defines the horizontal alignment of the row items.\n * @defaultValue start\n */\n @Prop() justifyContent?: `start` | `center` | `end` | `space-between` | `space-around`;\n\n /**\n * The minimum height of the row. Used in conjunction with alignment props\n */\n @Prop() minHeight?: string;\n\n /**\n * If `true`, the row items will not wrap to the next line if horizontal space is not available.\n */\n @Prop() noWrap? = false;\n\n private colGapMap: { [key in BoxTShirtSizeType]: string } = {\n none: '0',\n xxs: '.25rem',\n xs: '.5rem',\n sm: '1rem',\n md: '1.5rem',\n lg: '2.25rem',\n xl: '3rem',\n xxl: '4rem',\n };\n\n render() {\n const rowClasses = `\n ${this.alignItems !== undefined && this.alignItems.trim() !== '' ? `pds-align-items-${this.alignItems}` : ''}\n ${this.border ? 'pds-row--border' : ''}\n ${this.justifyContent !== undefined && this.justifyContent.trim() !== '' ? `pds-justify-content-${this.justifyContent}` : ''}\n ${this.noWrap ? 'pds-row--no-wrap' : ''}\n `;\n\n const rowInlineStyles = {\n ...(this.colGap && {\n '--row-gap-x': this.colGap !== undefined && this.colGap.trim() !== '' ? this.colGapMap[this.colGap] : '',\n '--row-gap-y': this.colGap !== undefined && this.colGap.trim() !== '' ? this.colGapMap[this.colGap] : '',\n }),\n ...(this.colGapBlock && {\n '--row-gap-y': this.colGapBlock !== undefined && this.colGapBlock.trim() !== '' ? this.colGapMap[this.colGapBlock] : '',\n }),\n ...(this.colGapInline && {\n '--row-gap-x': this.colGapInline !== undefined && this.colGapInline.trim() !== '' ? this.colGapMap[this.colGapInline] : '',\n }),\n ...(this.minHeight && {\n 'min-height': this.minHeight,\n }),\n };\n\n return <Host class={`pds-row ${rowClasses}`} style={rowInlineStyles}></Host>;\n }\n}\n"]}
1
+ {"version":3,"file":"pds-row.js","sourceRoot":"","sources":["../../../src/components/pds-row/pds-row.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAQzD,MAAM,OAAO,MAAM;IAJnB;QAWE;;WAEG;QACK,WAAM,GAAI,KAAK,CAAC;QAiCxB;;WAEG;QACK,WAAM,GAAI,KAAK,CAAC;QAEhB,cAAS,GAAwC;YACvD,IAAI,EAAE,GAAG;YACT,GAAG,EAAE,QAAQ;YACb,EAAE,EAAE,OAAO;YACX,EAAE,EAAE,MAAM;YACV,EAAE,EAAE,QAAQ;YACZ,EAAE,EAAE,SAAS;YACb,EAAE,EAAE,MAAM;YACV,GAAG,EAAE,MAAM;YACX,KAAK,EAAE,2BAA2B;YAClC,KAAK,EAAE,2BAA2B;YAClC,KAAK,EAAE,2BAA2B;YAClC,KAAK,EAAE,2BAA2B;YAClC,KAAK,EAAE,2BAA2B;YAClC,KAAK,EAAE,2BAA2B;YAClC,KAAK,EAAE,2BAA2B;YAClC,KAAK,EAAE,2BAA2B;YAClC,KAAK,EAAE,2BAA2B;YAClC,KAAK,EAAE,2BAA2B;YAClC,KAAK,EAAE,2BAA2B;YAClC,KAAK,EAAE,2BAA2B;YAClC,KAAK,EAAE,2BAA2B;YAClC,KAAK,EAAE,2BAA2B;YAClC,KAAK,EAAE,2BAA2B;YAClC,KAAK,EAAE,2BAA2B;YAClC,KAAK,EAAE,2BAA2B;YAClC,KAAK,EAAE,2BAA2B;SACnC,CAAC;KA4BH;IA1BC,MAAM;QACJ,MAAM,UAAU,GAAG;MACjB,IAAI,CAAC,UAAU,KAAK,SAAS,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,KAAK,EAAE,CAA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C,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,EAAE;SAC3H,CAAC,GACC,CAAC,IAAI,CAAC,SAAS,IAAI;YACpB,YAAY,EAAE,IAAI,CAAC,SAAS;SAC7B,CAAC,CACH,CAAC;QAEF,OAAO,EAAC,IAAI,qDAAC,KAAK,EAAE,WAAW,UAAU,EAAE,EAAE,KAAK,EAAE,eAAe,GAAS,CAAC;IAC/E,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, h, Host } from '@stencil/core';\n\nimport { BoxSpacingType } from '../../utils/types';\n\n@Component({\n tag: 'pds-row',\n styleUrl: 'pds-row.scss',\n})\nexport class PdsRow {\n /**\n * Defines the vertical alignment of the row items.\n * @defaultValue start\n */\n @Prop() alignItems?: `start` | `center` | `end` | `baseline` | `stretch`;\n\n /**\n * If `true`, the row will have a border.\n */\n @Prop() border? = false;\n\n /**\n * Defines the spacing between the row items.\n */\n @Prop() colGap?: BoxSpacingType | null;\n\n /**\n * Defines the spacing between the row items vertically.\n */\n @Prop() colGapBlock?: BoxSpacingType | null;\n\n /**\n * Defines the spacing between the row items horizontally.\n */\n @Prop() colGapInline?: BoxSpacingType | null;\n\n /**\n * A unique identifier used for the underlying component `id` attribute.\n */\n @Prop() componentId: string;\n\n /**\n * Defines the horizontal alignment of the row items.\n * @defaultValue start\n */\n @Prop() justifyContent?: `start` | `center` | `end` | `space-between` | `space-around`;\n\n /**\n * The minimum height of the row. Used in conjunction with alignment props\n */\n @Prop() minHeight?: string;\n\n /**\n * If `true`, the row items will not wrap to the next line if horizontal space is not available.\n */\n @Prop() noWrap? = false;\n\n private colGapMap: { [key in BoxSpacingType]: string } = {\n none: '0',\n xxs: '.25rem',\n xs: '.5rem',\n sm: '1rem',\n md: '1.5rem',\n lg: '2.25rem',\n xl: '3rem',\n xxl: '4rem',\n '025': 'var(--pine-dimension-025)',\n '050': 'var(--pine-dimension-050)',\n '100': 'var(--pine-dimension-100)',\n '125': 'var(--pine-dimension-125)',\n '150': 'var(--pine-dimension-150)',\n '200': 'var(--pine-dimension-200)',\n '250': 'var(--pine-dimension-250)',\n '300': 'var(--pine-dimension-300)',\n '350': 'var(--pine-dimension-350)',\n '400': 'var(--pine-dimension-400)',\n '450': 'var(--pine-dimension-450)',\n '500': 'var(--pine-dimension-500)',\n '550': 'var(--pine-dimension-550)',\n '600': 'var(--pine-dimension-600)',\n '650': 'var(--pine-dimension-650)',\n '700': 'var(--pine-dimension-700)',\n '750': 'var(--pine-dimension-750)',\n '800': 'var(--pine-dimension-800)'\n };\n\n render() {\n const rowClasses = `\n ${this.alignItems !== undefined && this.alignItems.trim() !== '' ? `pds-align-items-${this.alignItems}` : ''}\n ${this.border ? 'pds-row--border' : ''}\n ${this.justifyContent !== undefined && this.justifyContent.trim() !== '' ? `pds-justify-content-${this.justifyContent}` : ''}\n ${this.noWrap ? 'pds-row--no-wrap' : ''}\n `;\n\n const rowInlineStyles = {\n ...(this.colGap && {\n '--row-gap-x': this.colGap !== undefined && this.colGap.trim() !== '' ? this.colGapMap[this.colGap] : '',\n '--row-gap-y': this.colGap !== undefined && this.colGap.trim() !== '' ? this.colGapMap[this.colGap] : '',\n }),\n ...(this.colGapBlock && {\n '--row-gap-y': this.colGapBlock !== undefined && this.colGapBlock.trim() !== '' ? this.colGapMap[this.colGapBlock] : '',\n }),\n ...(this.colGapInline && {\n '--row-gap-x': this.colGapInline !== undefined && this.colGapInline.trim() !== '' ? this.colGapMap[this.colGapInline] : '',\n }),\n ...(this.minHeight && {\n 'min-height': this.minHeight,\n }),\n };\n\n return <Host class={`pds-row ${rowClasses}`} style={rowInlineStyles}></Host>;\n }\n}\n"]}
@@ -96,6 +96,21 @@ select:has(~ .pds-select__message .pds-select__error-message):focus-visible {
96
96
  outline-color: var(--pine-color-focus-ring-danger);
97
97
  }
98
98
 
99
+ :host([highlight]:not(.is-disabled):not(.is-invalid)) select {
100
+ background-color: var(--pine-color-accent-disabled);
101
+ border-color: var(--pine-color-accent);
102
+ color: var(--pine-color-text-accent);
103
+ }
104
+ :host([highlight]:not(.is-disabled):not(.is-invalid)) select:hover:not(:disabled) {
105
+ border-color: var(--pine-color-accent-hover);
106
+ }
107
+ :host([highlight]:not(.is-disabled):not(.is-invalid)) select:focus-visible {
108
+ outline-color: var(--pine-color-focus-ring);
109
+ }
110
+ :host([highlight]:not(.is-disabled):not(.is-invalid)) .pds-select__select-icon {
111
+ color: var(--pine-color-text-accent);
112
+ }
113
+
99
114
  .pds-select__error-message,
100
115
  .pds-select__helper-message {
101
116
  color: var(--pine-color-text-message);
@@ -212,7 +212,7 @@ export class PdsSelect {
212
212
  }
213
213
  render() {
214
214
  const hasAction = this.el.querySelector('[slot="action"]') !== null;
215
- return (h(Host, { key: '807a2ecdb0734b8c91936ec4c46e4d4f08572ccb', "aria-disabled": this.disabled ? 'true' : null, class: this.classNames(), "has-action": hasAction && !this.hideLabel ? 'true' : null }, h("div", { key: 'febbc7cac34855dc9574ba5b1ab1edef4acef664', class: "pds-select" }, !this.hideLabel && (h("div", { key: '92d97d395ac108616a67111a8dc25ee554a33c12', class: "pds-select__label-wrapper" }, h("label", { key: '42885b3d3d01af615e248655308324ba843dab42', htmlFor: this.componentId }, h("span", { key: '24ffeb13dafc9a042c4099442a81d020732f0336', class: this.hideLabel ? 'visually-hidden' : '' }, this.label)), hasAction && this.renderAction())), h("select", { key: '7be3328511bb074844715ed649e22ef6d0d9866a', "aria-label": this.hideLabel ? this.label : undefined, autocomplete: this.autocomplete || undefined, class: "pds-select__field", disabled: this.disabled, id: this.componentId, multiple: this.multiple, name: this.name, onChange: this.onSelectUpdate, part: "select", required: this.required, ref: (el) => (this.selectEl = el) }), h("div", { key: '0febab292f965293e53be574c492619294fcbe26', "aria-hidden": "true", class: "hidden", ref: (el) => (this.slotContainer = el) }, h("slot", { key: 'e8022a71a6391c72388a681ee47c8720d751afb8', onSlotchange: this.handleSlotChange })), this.renderMessages(), !this.multiple && h("pds-icon", { key: 'cb196851d9afacd32c81d64922492fda1b937d74', class: "pds-select__select-icon", icon: enlarge }))));
215
+ return (h(Host, { key: 'b3be9584f5fddb4f1a55517f54c1713f99881217', "aria-disabled": this.disabled ? 'true' : null, class: this.classNames(), "has-action": hasAction && !this.hideLabel ? 'true' : null }, h("div", { key: '89ea75fbce2c1a0e5b4b744f10bacfd84db73773', class: "pds-select" }, !this.hideLabel && (h("div", { key: 'bf1c8c06c96d941d7d93b960de9279df4520f10f', class: "pds-select__label-wrapper" }, h("label", { key: 'eb7beaa77f9f2be302e7b14642c6c5153db4cebe', htmlFor: this.componentId }, h("span", { key: '47a737210afc1c86431c123aa2449827f0b9755d', class: this.hideLabel ? 'visually-hidden' : '' }, this.label)), hasAction && this.renderAction())), h("select", { key: 'f510d59fe20742e210c4fb949d468184bb2f12cc', "aria-label": this.hideLabel ? this.label : undefined, autocomplete: this.autocomplete || undefined, class: "pds-select__field", disabled: this.disabled, id: this.componentId, multiple: this.multiple, name: this.name, onChange: this.onSelectUpdate, part: "select", required: this.required, ref: (el) => (this.selectEl = el) }), h("div", { key: '7653404278cc8446de96e3e1fdbfcf47ea6b8edc', "aria-hidden": "true", class: "hidden", ref: (el) => (this.slotContainer = el) }, h("slot", { key: '04626b23972a2d3fe73b09ea8fbe94021e89d98d', onSlotchange: this.handleSlotChange })), this.renderMessages(), !this.multiple && h("pds-icon", { key: '0d97224a202e0a6e7ad36e2b8a027975ff22079d', class: "pds-select__select-icon", icon: enlarge }))));
216
216
  }
217
217
  static get is() { return "pds-select"; }
218
218
  static get encapsulation() { return "shadow"; }
@@ -450,6 +450,25 @@ export class PdsSelect {
450
450
  "reflect": false,
451
451
  "defaultValue": "false"
452
452
  },
453
+ "highlight": {
454
+ "type": "boolean",
455
+ "mutable": false,
456
+ "complexType": {
457
+ "original": "boolean",
458
+ "resolved": "boolean",
459
+ "references": {}
460
+ },
461
+ "required": false,
462
+ "optional": true,
463
+ "docs": {
464
+ "tags": [],
465
+ "text": "Applies highlight styling to the select field."
466
+ },
467
+ "getter": false,
468
+ "setter": false,
469
+ "attribute": "highlight",
470
+ "reflect": true
471
+ },
453
472
  "value": {
454
473
  "type": "string",
455
474
  "mutable": true,