@persona/design-system 0.1.7 → 0.1.8

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 (796) hide show
  1. package/CHANGELOG.md +343 -221
  2. package/dist/{Action-DkNqzc2X.d.mts → Action-CVtzREhU.d.mts} +3 -3
  3. package/dist/{Action-z1rV4qON.d.cts → Action-E90Wvqmc.d.cts} +3 -3
  4. package/dist/Action.d.cts +1 -1
  5. package/dist/Action.d.mts +1 -1
  6. package/dist/AdvancedFilterRuleRow.d.mts +37 -0
  7. package/dist/AdvancedFilterRulesPopover.d.mts +62 -0
  8. package/dist/ArrayValueControl.d.mts +38 -0
  9. package/dist/Attribute.d.mts +4 -4
  10. package/dist/AttributeGrid.d.mts +1 -1
  11. package/dist/{Badge-DAGPU4-e.cjs → Badge-ADPloFsd.cjs} +2 -2
  12. package/dist/{Badge-DAGPU4-e.cjs.map → Badge-ADPloFsd.cjs.map} +1 -1
  13. package/dist/{Badge-DRn_r6is.mjs → Badge-DortWowZ.mjs} +2 -2
  14. package/dist/{Badge-DRn_r6is.mjs.map → Badge-DortWowZ.mjs.map} +1 -1
  15. package/dist/Banner.d.mts +1 -1
  16. package/dist/BooleanValueControl.d.mts +20 -0
  17. package/dist/{Breadcrumb-BOxfam3E.d.cts → Breadcrumb-VH-Mwo-M.d.cts} +15 -2
  18. package/dist/{Breadcrumb-On7pOpgt.d.mts → Breadcrumb-lziQ1FX9.d.mts} +15 -2
  19. package/dist/Breadcrumb.d.cts +2 -2
  20. package/dist/Breadcrumb.d.mts +2 -2
  21. package/dist/Breadcrumbs-BBREROrw.d.cts +26 -0
  22. package/dist/Breadcrumbs-CDZ_Mrcg.mjs +288 -0
  23. package/dist/Breadcrumbs-CDZ_Mrcg.mjs.map +1 -0
  24. package/dist/Breadcrumbs-DJ5qqqRD.d.mts +26 -0
  25. package/dist/Breadcrumbs-tR49JqAS.cjs +295 -0
  26. package/dist/Breadcrumbs-tR49JqAS.cjs.map +1 -0
  27. package/dist/Breadcrumbs.d.cts +2 -20
  28. package/dist/Breadcrumbs.d.mts +2 -20
  29. package/dist/{Button-DXsYU5qU.d.mts → Button-9p469xA1.d.mts} +3 -3
  30. package/dist/Button.d.mts +1 -1
  31. package/dist/ButtonGroup.d.mts +1 -1
  32. package/dist/Calendar.d.mts +1 -1
  33. package/dist/CalendarBase.d.mts +1 -1
  34. package/dist/{Card-CLTkZLKr.mjs → Card-BMCB9eFC.mjs} +4 -4
  35. package/dist/{Card-CLTkZLKr.mjs.map → Card-BMCB9eFC.mjs.map} +1 -1
  36. package/dist/{Card-DnmrsQWi.d.cts → Card-CJPEmUvg.d.cts} +2 -2
  37. package/dist/{Card-IOBCsfke.d.mts → Card-CqnG--CU.d.mts} +4 -4
  38. package/dist/{Card-CaOItkgL.cjs → Card-Csz-PxX0.cjs} +4 -4
  39. package/dist/{Card-CaOItkgL.cjs.map → Card-Csz-PxX0.cjs.map} +1 -1
  40. package/dist/Card.d.cts +1 -1
  41. package/dist/Card.d.mts +1 -1
  42. package/dist/Card2.d.cts +1 -1
  43. package/dist/Card2.d.mts +1 -1
  44. package/dist/CardV2-C9z0Hr-c.mjs +411 -0
  45. package/dist/CardV2-C9z0Hr-c.mjs.map +1 -0
  46. package/dist/CardV2-DJXgFomd.cjs +419 -0
  47. package/dist/CardV2-DJXgFomd.cjs.map +1 -0
  48. package/dist/{Checkbox-BghGF-iW.mjs → Checkbox-B0bjZbji.mjs} +5 -5
  49. package/dist/{Checkbox-BghGF-iW.mjs.map → Checkbox-B0bjZbji.mjs.map} +1 -1
  50. package/dist/{Checkbox-MUC37dLY.d.mts → Checkbox-Bm8exUfH.d.mts} +1 -1
  51. package/dist/{Checkbox-DhxpxzGp.cjs → Checkbox-CmCujC1W.cjs} +5 -5
  52. package/dist/{Checkbox-DhxpxzGp.cjs.map → Checkbox-CmCujC1W.cjs.map} +1 -1
  53. package/dist/{Checkbox-DfI0Xp3y.d.cts → Checkbox-Cr8ifm10.d.cts} +1 -1
  54. package/dist/Checkbox.d.cts +1 -1
  55. package/dist/Checkbox.d.mts +1 -1
  56. package/dist/CheckboxGroupField.d.cts +1 -1
  57. package/dist/CheckboxGroupField.d.mts +2 -2
  58. package/dist/ChoicesValueControl.d.mts +35 -0
  59. package/dist/{Combobox-CeKMrlxy.mjs → Combobox-BdqU5WLG.mjs} +254 -70
  60. package/dist/Combobox-BdqU5WLG.mjs.map +1 -0
  61. package/dist/{Combobox-Bedo_GIj.d.mts → Combobox-C99xluaM.d.mts} +3 -3
  62. package/dist/{Combobox-4Bi9-N1p.cjs → Combobox-COXvmxlM.cjs} +247 -63
  63. package/dist/Combobox-COXvmxlM.cjs.map +1 -0
  64. package/dist/{Combobox-5rAFq_52.d.cts → Combobox-DBWMHwUt.d.cts} +3 -3
  65. package/dist/Combobox.d.cts +2 -2
  66. package/dist/Combobox.d.mts +2 -2
  67. package/dist/{ComboboxBase-DGZUdsQa.d.mts → ComboboxBase-BsY7CYoB.d.mts} +48 -8
  68. package/dist/{ComboboxBase-BoR9DVwe.d.cts → ComboboxBase-zZ3tE-dH.d.cts} +45 -5
  69. package/dist/ComboboxBase.d.cts +2 -2
  70. package/dist/ComboboxBase.d.mts +2 -2
  71. package/dist/{ComboboxMultiSelect-DMWPiBrE.d.mts → ComboboxMultiSelect-dNuETspL.d.mts} +2 -2
  72. package/dist/{ComboboxMultiSelect-CnI6sFAF.d.cts → ComboboxMultiSelect-ioB4Jx7_.d.cts} +2 -2
  73. package/dist/ComboboxMultiSelect.d.cts +1 -1
  74. package/dist/ComboboxMultiSelect.d.mts +1 -1
  75. package/dist/{ComboboxSingleSelect-CcppU_hq.d.mts → ComboboxSingleSelect-C8KvIJ43.d.mts} +4 -4
  76. package/dist/{ComboboxSingleSelect-Japejm0g.d.cts → ComboboxSingleSelect-Fn80tdhz.d.cts} +4 -4
  77. package/dist/ComboboxSingleSelect.d.cts +1 -1
  78. package/dist/ComboboxSingleSelect.d.mts +1 -1
  79. package/dist/{CompactBar-DTsGo1zU.d.cts → CompactBar-BEAK55kh.d.cts} +3 -3
  80. package/dist/{CompactBar-2cpJD7qg.d.mts → CompactBar-CXqlVKy7.d.mts} +3 -3
  81. package/dist/CompactBar.d.cts +1 -1
  82. package/dist/CompactBar.d.mts +1 -1
  83. package/dist/{ConfigFormGroup-DVRhkS2L.cjs → ConfigFormGroup-m5YdVa9n.cjs} +3 -3
  84. package/dist/{ConfigFormGroup-DVRhkS2L.cjs.map → ConfigFormGroup-m5YdVa9n.cjs.map} +1 -1
  85. package/dist/{ConfigFormGroup-DISUwz5j.mjs → ConfigFormGroup-yhb2jldT.mjs} +3 -3
  86. package/dist/{ConfigFormGroup-DISUwz5j.mjs.map → ConfigFormGroup-yhb2jldT.mjs.map} +1 -1
  87. package/dist/{ControlBar-DXyl1gjc.d.mts → ControlBar-D8CirAyZ.d.cts} +2 -2
  88. package/dist/{ControlBar-BGmXymCB.d.cts → ControlBar-tOCQnbAl.d.mts} +2 -2
  89. package/dist/ControlBar.d.cts +1 -1
  90. package/dist/ControlBar.d.mts +1 -1
  91. package/dist/DataTable.d.cts +3 -3
  92. package/dist/DataTable.d.mts +4 -4
  93. package/dist/DateField.d.cts +1 -1
  94. package/dist/DateField.d.mts +1 -1
  95. package/dist/DatePicker-BlCgFb7g.cjs +948 -0
  96. package/dist/DatePicker-BlCgFb7g.cjs.map +1 -0
  97. package/dist/DatePicker-DY1YA_Fu.mjs +922 -0
  98. package/dist/DatePicker-DY1YA_Fu.mjs.map +1 -0
  99. package/dist/DatePicker.d.cts +1 -1
  100. package/dist/DatePicker.d.mts +1 -1
  101. package/dist/DateRangePicker.d.cts +1 -1
  102. package/dist/DateRangePicker.d.mts +1 -1
  103. package/dist/DateValueControl.d.mts +26 -0
  104. package/dist/{DropdownButton-B397h6ka.mjs → DropdownButton-DKLjJylQ.mjs} +3 -3
  105. package/dist/{DropdownButton-B397h6ka.mjs.map → DropdownButton-DKLjJylQ.mjs.map} +1 -1
  106. package/dist/{DropdownButton-Du6dwZVL.cjs → DropdownButton-Dl7IEzAc.cjs} +3 -3
  107. package/dist/{DropdownButton-Du6dwZVL.cjs.map → DropdownButton-Dl7IEzAc.cjs.map} +1 -1
  108. package/dist/DropdownButton.d.cts +1 -1
  109. package/dist/DropdownButton.d.mts +2 -2
  110. package/dist/{DropdownMenu-5qIgQ14A.d.mts → DropdownMenu-CVPanvKA.d.mts} +3 -3
  111. package/dist/{DropdownMenu-cnkoGc7C.mjs → DropdownMenu-DGYexb7s.mjs} +3 -3
  112. package/dist/{DropdownMenu-cnkoGc7C.mjs.map → DropdownMenu-DGYexb7s.mjs.map} +1 -1
  113. package/dist/{DropdownMenu-CfJxgWN5.cjs → DropdownMenu-DnlQqTjs.cjs} +3 -3
  114. package/dist/{DropdownMenu-CfJxgWN5.cjs.map → DropdownMenu-DnlQqTjs.cjs.map} +1 -1
  115. package/dist/{DropdownMenu-FIYz6oAo.d.cts → DropdownMenu-FkiManPP.d.cts} +2 -2
  116. package/dist/DropdownMenu.d.cts +1 -1
  117. package/dist/DropdownMenu.d.mts +1 -1
  118. package/dist/{ErrorProps-BosuK6zJ.d.cts → ErrorProps-CN2XjaOX.d.mts} +1 -1
  119. package/dist/{ErrorProps-iEj4BIVA.d.mts → ErrorProps-Dxqb4gw_.d.cts} +1 -1
  120. package/dist/ErrorProps.d.cts +1 -1
  121. package/dist/ErrorProps.d.mts +1 -1
  122. package/dist/FieldRegistry-OX60T3hr.d.cts +122 -0
  123. package/dist/FieldRegistry-rqSkjchY.d.mts +122 -0
  124. package/dist/FieldRegistry.d.cts +2 -0
  125. package/dist/FieldRegistry.d.mts +2 -0
  126. package/dist/FilterBar-D3LiIy1-.d.mts +103 -0
  127. package/dist/FilterBar-YzOh02f9.d.cts +103 -0
  128. package/dist/FilterBar.d.cts +2 -0
  129. package/dist/FilterBar.d.mts +2 -0
  130. package/dist/FilterPickerMenu.d.mts +84 -0
  131. package/dist/FilterPill.d.mts +60 -0
  132. package/dist/FilterPopover.d.mts +87 -0
  133. package/dist/FloatValueControl.d.mts +40 -0
  134. package/dist/{FormControl-ArDcvmir.mjs → FormControl-B28qa7aQ.mjs} +6 -6
  135. package/dist/{FormControl-ArDcvmir.mjs.map → FormControl-B28qa7aQ.mjs.map} +1 -1
  136. package/dist/{FormControl-BrsML00L.d.cts → FormControl-DFp_qcW1.d.cts} +2 -2
  137. package/dist/{FormControl-DnsC4vTX.d.mts → FormControl-DH3bgqaB.d.mts} +3 -3
  138. package/dist/{FormControl-Czt95h2L.cjs → FormControl-MkBXuUF6.cjs} +6 -6
  139. package/dist/{FormControl-Czt95h2L.cjs.map → FormControl-MkBXuUF6.cjs.map} +1 -1
  140. package/dist/FormControl.d.cts +1 -1
  141. package/dist/FormControl.d.mts +1 -1
  142. package/dist/FormControlLabel.d.mts +1 -1
  143. package/dist/{FormField-BddCs6P0.d.mts → FormField-BugkBvN4.d.mts} +2 -2
  144. package/dist/FormField-D3XhxTMg.cjs +550 -0
  145. package/dist/FormField-D3XhxTMg.cjs.map +1 -0
  146. package/dist/FormField-PeYYRO4s.mjs +471 -0
  147. package/dist/FormField-PeYYRO4s.mjs.map +1 -0
  148. package/dist/{FormField-DoSXvnJ3.d.cts → FormField-idNLw5PW.d.cts} +2 -2
  149. package/dist/FormField.d.cts +1 -1
  150. package/dist/FormField.d.mts +1 -1
  151. package/dist/{Header-CkZvzbzL.d.cts → Header-C-WhPOin.d.cts} +3 -3
  152. package/dist/{Header-B-Us54dR.d.mts → Header-CDTYK1XJ.d.mts} +2 -2
  153. package/dist/Header.d.cts +1 -1
  154. package/dist/Header.d.mts +1 -1
  155. package/dist/{HelperTooltip-CofPKyZh.d.mts → HelperTooltip-B7Ysh8B3.d.mts} +3 -3
  156. package/dist/{HelperTooltip-C1CYMpJP.d.cts → HelperTooltip-T-sTGGLD.d.cts} +2 -2
  157. package/dist/HelperTooltip.d.cts +1 -1
  158. package/dist/HelperTooltip.d.mts +1 -1
  159. package/dist/{HoverCopyableField-B_WNB7Qp.cjs → HoverCopyableField-CRkM7o4B.cjs} +6 -6
  160. package/dist/{HoverCopyableField-B_WNB7Qp.cjs.map → HoverCopyableField-CRkM7o4B.cjs.map} +1 -1
  161. package/dist/{HoverCopyableField-DR575ayC.mjs → HoverCopyableField-ClXBg_ld.mjs} +6 -6
  162. package/dist/{HoverCopyableField-DR575ayC.mjs.map → HoverCopyableField-ClXBg_ld.mjs.map} +1 -1
  163. package/dist/HoverCopyableField.d.mts +1 -1
  164. package/dist/{IconButton-Dnnlf9uO.d.mts → IconButton-BSES_-6g.d.mts} +2 -2
  165. package/dist/{IconButton-DC4rh6ow.mjs → IconButton-CIWiEsS-.mjs} +5 -5
  166. package/dist/{IconButton-DC4rh6ow.mjs.map → IconButton-CIWiEsS-.mjs.map} +1 -1
  167. package/dist/{IconButton-DNy7g5zh.cjs → IconButton-nlgjJQCS.cjs} +4 -4
  168. package/dist/{IconButton-DNy7g5zh.cjs.map → IconButton-nlgjJQCS.cjs.map} +1 -1
  169. package/dist/IconButton.d.mts +1 -1
  170. package/dist/ImageTile.d.cts +1 -1
  171. package/dist/ImageTile.d.mts +2 -2
  172. package/dist/InlineCombobox.d.mts +2 -2
  173. package/dist/InlineInput.d.mts +1 -1
  174. package/dist/{Input-PWfwMSJ7.mjs → Input-BFI_e7aU.mjs} +5 -5
  175. package/dist/{Input-PWfwMSJ7.mjs.map → Input-BFI_e7aU.mjs.map} +1 -1
  176. package/dist/{Input-CEcTvtX2.d.cts → Input-BM0DzWEf.d.cts} +2 -2
  177. package/dist/{Input-4KeYlOWM.d.mts → Input-BPClVzwD.d.mts} +4 -4
  178. package/dist/{Input-BDLUq-pK.cjs → Input-OJPQ07TW.cjs} +5 -5
  179. package/dist/{Input-BDLUq-pK.cjs.map → Input-OJPQ07TW.cjs.map} +1 -1
  180. package/dist/Input.d.cts +1 -1
  181. package/dist/Input.d.mts +1 -1
  182. package/dist/{InputProps-DNlik5IZ.d.cts → InputProps-BnjxrdWQ.d.mts} +2 -2
  183. package/dist/{InputProps-CTLG2Tr0.d.mts → InputProps-CoVNpQSj.d.cts} +2 -2
  184. package/dist/InputProps.d.cts +1 -1
  185. package/dist/InputProps.d.mts +1 -1
  186. package/dist/IntegerValueControl.d.mts +39 -0
  187. package/dist/LayoutLoadingShimmer.d.cts +20 -0
  188. package/dist/LayoutLoadingShimmer.d.mts +20 -0
  189. package/dist/Link.d.mts +1 -1
  190. package/dist/{ListBox-BCscLcYL.cjs → ListBox-BP1eaG7L.cjs} +83 -14
  191. package/dist/ListBox-BP1eaG7L.cjs.map +1 -0
  192. package/dist/{ListBox-CDNOJmvz.mjs → ListBox-BwID8jpk.mjs} +83 -14
  193. package/dist/ListBox-BwID8jpk.mjs.map +1 -0
  194. package/dist/{ListBox-WyZvseo5.d.cts → ListBox-QaeRQBSC.d.cts} +2 -2
  195. package/dist/{ListBox-DZIAlPbc.d.mts → ListBox-_fcSPynx.d.mts} +5 -5
  196. package/dist/ListBox.d.cts +1 -1
  197. package/dist/ListBox.d.mts +1 -1
  198. package/dist/ListBoxField.d.cts +2 -2
  199. package/dist/ListBoxField.d.mts +3 -3
  200. package/dist/{LoadingShimmer-Bu6KtQ06.mjs → LoadingShimmer-Dsc_RCCf.mjs} +1 -1
  201. package/dist/{LoadingShimmer-Bu6KtQ06.mjs.map → LoadingShimmer-Dsc_RCCf.mjs.map} +1 -1
  202. package/dist/{LoadingShimmer-CUjbAqGd.cjs → LoadingShimmer-Dx6ncVUV.cjs} +1 -1
  203. package/dist/{LoadingShimmer-CUjbAqGd.cjs.map → LoadingShimmer-Dx6ncVUV.cjs.map} +1 -1
  204. package/dist/LoadingShimmer.d.mts +2 -2
  205. package/dist/LogicRow-BtCKGX_j.d.mts +40 -0
  206. package/dist/LogicRow-C6lrFIq0.d.cts +40 -0
  207. package/dist/LogicRow.d.cts +2 -0
  208. package/dist/LogicRow.d.mts +2 -0
  209. package/dist/MaskedInput.d.cts +2 -2
  210. package/dist/MaskedInput.d.mts +1 -1
  211. package/dist/{Menu-CVuFAxl2.mjs → Menu-CPYXo61N.mjs} +5 -5
  212. package/dist/{Menu-CVuFAxl2.mjs.map → Menu-CPYXo61N.mjs.map} +1 -1
  213. package/dist/{Menu-BJ5c7HGD.d.mts → Menu-CUp_9HgC.d.mts} +4 -4
  214. package/dist/{Menu-BKMxOXkj.d.cts → Menu-fUnbIYr5.d.cts} +3 -3
  215. package/dist/{Menu-BXic-30n.cjs → Menu-t2q8NrV0.cjs} +5 -5
  216. package/dist/{Menu-BXic-30n.cjs.map → Menu-t2q8NrV0.cjs.map} +1 -1
  217. package/dist/Menu.d.cts +1 -1
  218. package/dist/Menu.d.mts +1 -1
  219. package/dist/{MiddleTruncatedText-BIzKECv9.cjs → MiddleTruncatedText-CO76xIqP.cjs} +2 -2
  220. package/dist/{MiddleTruncatedText-BIzKECv9.cjs.map → MiddleTruncatedText-CO76xIqP.cjs.map} +1 -1
  221. package/dist/{MiddleTruncatedText-Bzpg3zAU.mjs → MiddleTruncatedText-GXI-CPvs.mjs} +3 -3
  222. package/dist/{MiddleTruncatedText-Bzpg3zAU.mjs.map → MiddleTruncatedText-GXI-CPvs.mjs.map} +1 -1
  223. package/dist/Modal.d.mts +3 -3
  224. package/dist/PageHeader-CUDnarkt.cjs +77 -0
  225. package/dist/PageHeader-CUDnarkt.cjs.map +1 -0
  226. package/dist/PageHeader-D-6W61E_.mjs +64 -0
  227. package/dist/PageHeader-D-6W61E_.mjs.map +1 -0
  228. package/dist/PageHeader.d.cts +11 -2
  229. package/dist/PageHeader.d.mts +12 -3
  230. package/dist/{PageSelector-DoROR_Uh.d.cts → PageSelector-CNnVp3Al.d.cts} +3 -3
  231. package/dist/{PageSelector-CMoV-cHa.d.mts → PageSelector-vay4jpMp.d.mts} +3 -3
  232. package/dist/PageSelector.d.cts +1 -1
  233. package/dist/PageSelector.d.mts +1 -1
  234. package/dist/PageSizeSelector.d.mts +7 -1
  235. package/dist/{Pagination-D4IVVj3S.cjs → Pagination-2Yo1vRJZ.cjs} +12 -9
  236. package/dist/Pagination-2Yo1vRJZ.cjs.map +1 -0
  237. package/dist/{Pagination-B97xQ-Wk.d.cts → Pagination-D04tn-tf.d.cts} +9 -3
  238. package/dist/{Pagination-QWNK_hH7.d.mts → Pagination-ygLutOst.d.mts} +9 -3
  239. package/dist/{Pagination-Cj08JRG9.mjs → Pagination-ztqhywAP.mjs} +13 -10
  240. package/dist/Pagination-ztqhywAP.mjs.map +1 -0
  241. package/dist/Pagination.d.cts +1 -1
  242. package/dist/Pagination.d.mts +1 -1
  243. package/dist/{Pii-D-Ry7L0t.cjs → Pii-DHTb3ewO.cjs} +2 -2
  244. package/dist/{Pii-D-Ry7L0t.cjs.map → Pii-DHTb3ewO.cjs.map} +1 -1
  245. package/dist/{Pii-Bxh6_R4T.mjs → Pii-DrrtEz7U.mjs} +2 -2
  246. package/dist/{Pii-Bxh6_R4T.mjs.map → Pii-DrrtEz7U.mjs.map} +1 -1
  247. package/dist/Pii.d.mts +1 -1
  248. package/dist/PillShell.d.mts +85 -0
  249. package/dist/{Popover-D0QY5f-J.mjs → Popover-BkDpDdaO.mjs} +5 -5
  250. package/dist/{Popover-D0QY5f-J.mjs.map → Popover-BkDpDdaO.mjs.map} +1 -1
  251. package/dist/{Popover-BAv7BujW.cjs → Popover-BzgMAhsX.cjs} +4 -4
  252. package/dist/{Popover-BAv7BujW.cjs.map → Popover-BzgMAhsX.cjs.map} +1 -1
  253. package/dist/Popover.d.mts +1 -1
  254. package/dist/ProgressBar.d.mts +1 -1
  255. package/dist/ProgressIndicator.d.mts +1 -1
  256. package/dist/{PseudoClassProps-ySXCGUEQ.d.mts → PseudoClassProps-DLxPxo7T.d.mts} +1 -1
  257. package/dist/PseudoClassProps.d.mts +1 -1
  258. package/dist/{Radio-nw846eRv.cjs → Radio-BrTzy7-C.cjs} +3 -3
  259. package/dist/{Radio-nw846eRv.cjs.map → Radio-BrTzy7-C.cjs.map} +1 -1
  260. package/dist/{Radio-C9DevagH.mjs → Radio-CSX2eO-O.mjs} +3 -3
  261. package/dist/{Radio-C9DevagH.mjs.map → Radio-CSX2eO-O.mjs.map} +1 -1
  262. package/dist/{RadioGroup-B3hRbIWF.mjs → RadioGroup-CnK0opBd.mjs} +3 -3
  263. package/dist/{RadioGroup-B3hRbIWF.mjs.map → RadioGroup-CnK0opBd.mjs.map} +1 -1
  264. package/dist/{RadioGroup-DmGVJCgT.cjs → RadioGroup-CriF2InQ.cjs} +3 -3
  265. package/dist/{RadioGroup-DmGVJCgT.cjs.map → RadioGroup-CriF2InQ.cjs.map} +1 -1
  266. package/dist/{RadioGroup-D_H1B7JV.d.cts → RadioGroup-DKqbSfju.d.mts} +1 -1
  267. package/dist/{RadioGroup-nhMXEbCx.d.mts → RadioGroup-XYWjprsv.d.cts} +1 -1
  268. package/dist/RadioGroup.d.cts +1 -1
  269. package/dist/RadioGroup.d.mts +1 -1
  270. package/dist/RangeCalendar.d.mts +1 -1
  271. package/dist/RangeCalendarPresets.d.mts +1 -1
  272. package/dist/RuleEditorFields.d.mts +37 -0
  273. package/dist/RulesPill.d.mts +65 -0
  274. package/dist/{SearchInput-s6qGC2WZ.d.mts → SearchInput-Bp2yjaE1.d.mts} +3 -3
  275. package/dist/{SearchInput-CAHYPQVX.d.cts → SearchInput-CTI59-NW.d.cts} +2 -2
  276. package/dist/SearchInput.d.cts +1 -1
  277. package/dist/SearchInput.d.mts +1 -1
  278. package/dist/Section.d.mts +1 -1
  279. package/dist/{SectionHeading-CDBQ4m9E.d.mts → SectionHeading-C6hjGdK-.d.cts} +2 -2
  280. package/dist/{SectionHeading-D-L4uPoX.d.cts → SectionHeading-Q-rx2LEd.d.mts} +2 -2
  281. package/dist/SectionHeading.d.cts +1 -1
  282. package/dist/SectionHeading.d.mts +1 -1
  283. package/dist/{SegmentedControl-CIJz0oxY.cjs → SegmentedControl-C2XZF0ys.cjs} +8 -7
  284. package/dist/SegmentedControl-C2XZF0ys.cjs.map +1 -0
  285. package/dist/{SegmentedControl-B1ZLgu61.mjs → SegmentedControl-CgDQIVll.mjs} +8 -7
  286. package/dist/SegmentedControl-CgDQIVll.mjs.map +1 -0
  287. package/dist/{SegmentedControl-BYuXohIp.d.cts → SegmentedControl-DrjdUOU9.d.mts} +2 -2
  288. package/dist/{SegmentedControl-CE845gnm.d.mts → SegmentedControl-nHIK1ZvR.d.cts} +1 -1
  289. package/dist/SegmentedControl.d.cts +1 -1
  290. package/dist/SegmentedControl.d.mts +1 -1
  291. package/dist/{Select-NcaURrGZ.d.cts → Select-2KbtKawr.d.mts} +11 -5
  292. package/dist/{Select-BMEwCfbv.d.mts → Select-BH3hXMxp.d.cts} +11 -5
  293. package/dist/{Select-C65bfYeT.cjs → Select-BurtT6bN.cjs} +13 -10
  294. package/dist/Select-BurtT6bN.cjs.map +1 -0
  295. package/dist/{Select-ByTgXOlU.mjs → Select-cPEORy70.mjs} +14 -11
  296. package/dist/Select-cPEORy70.mjs.map +1 -0
  297. package/dist/Select.d.cts +1 -1
  298. package/dist/Select.d.mts +1 -1
  299. package/dist/Slider.d.mts +1 -1
  300. package/dist/SliderRHF.d.mts +1 -1
  301. package/dist/SliderThumb.d.mts +1 -1
  302. package/dist/{Spacer-GYHbk-dS.cjs → Spacer-B2CerL6e.cjs} +1 -1
  303. package/dist/{Spacer-GYHbk-dS.cjs.map → Spacer-B2CerL6e.cjs.map} +1 -1
  304. package/dist/{Spacer-Ln3KChb5.mjs → Spacer-CJp0lwkL.mjs} +1 -1
  305. package/dist/{Spacer-Ln3KChb5.mjs.map → Spacer-CJp0lwkL.mjs.map} +1 -1
  306. package/dist/{Stack-ckRN7LrP.mjs → Stack-Bl54WmhY.mjs} +1 -1
  307. package/dist/{Stack-ckRN7LrP.mjs.map → Stack-Bl54WmhY.mjs.map} +1 -1
  308. package/dist/{Stack-D979gYU9.d.cts → Stack-BzVkf3cz.d.cts} +1 -1
  309. package/dist/{Stack-UMhJ6F_3.d.mts → Stack-CkV7k7TE.d.mts} +2 -2
  310. package/dist/{Stack-BF-9YjA1.cjs → Stack-UeifHn3c.cjs} +1 -1
  311. package/dist/{Stack-BF-9YjA1.cjs.map → Stack-UeifHn3c.cjs.map} +1 -1
  312. package/dist/Stack.d.cts +1 -1
  313. package/dist/Stack.d.mts +1 -1
  314. package/dist/StatusIndicator.d.cts +31 -3
  315. package/dist/StatusIndicator.d.mts +32 -4
  316. package/dist/{Sticker-DjF9VJQB.d.mts → Sticker-Bs25ISz7.d.mts} +5 -5
  317. package/dist/{Sticker-N8XZnv7M.d.cts → Sticker-CI-XxUmM.d.cts} +3 -3
  318. package/dist/{Sticker-D0jIU2Dt.cjs → Sticker-CIoseh9f.cjs} +3 -3
  319. package/dist/{Sticker-D0jIU2Dt.cjs.map → Sticker-CIoseh9f.cjs.map} +1 -1
  320. package/dist/{Sticker-B0TbkV4o.mjs → Sticker-DbqKLe33.mjs} +3 -3
  321. package/dist/{Sticker-B0TbkV4o.mjs.map → Sticker-DbqKLe33.mjs.map} +1 -1
  322. package/dist/Sticker.d.cts +1 -1
  323. package/dist/Sticker.d.mts +1 -1
  324. package/dist/StringValueControl.d.mts +39 -0
  325. package/dist/SwatchPicker.d.mts +1 -1
  326. package/dist/Tab.d.mts +2 -2
  327. package/dist/{TabBar-BpHMYvNb.cjs → TabBar-PFaDNRw0.cjs} +4 -4
  328. package/dist/{TabBar-BpHMYvNb.cjs.map → TabBar-PFaDNRw0.cjs.map} +1 -1
  329. package/dist/{TabBar-ByusqAXF.mjs → TabBar-zSA8kyE6.mjs} +4 -4
  330. package/dist/{TabBar-ByusqAXF.mjs.map → TabBar-zSA8kyE6.mjs.map} +1 -1
  331. package/dist/TabBarIconButton.d.mts +1 -1
  332. package/dist/{Table-DJZtluW3.d.cts → Table-BNScLj9g.d.mts} +1 -1
  333. package/dist/{Table-CNs8p8hL.mjs → Table-D8IcpACv.mjs} +5 -5
  334. package/dist/{Table-CNs8p8hL.mjs.map → Table-D8IcpACv.mjs.map} +1 -1
  335. package/dist/{Table-D3nyiZt0.d.mts → Table-DXqyNohc.d.cts} +1 -1
  336. package/dist/{Table-C9rjUVpn.cjs → Table-DxLvJYWK.cjs} +5 -5
  337. package/dist/{Table-C9rjUVpn.cjs.map → Table-DxLvJYWK.cjs.map} +1 -1
  338. package/dist/Table.d.cts +1 -1
  339. package/dist/Table.d.mts +1 -1
  340. package/dist/{TableBody-BFPF07n4.d.cts → TableBody-CrDNMyT8.d.mts} +1 -1
  341. package/dist/{TableBody-DpRjZgzU.d.mts → TableBody-CxwHmdNb.d.cts} +1 -1
  342. package/dist/TableBody.d.cts +1 -1
  343. package/dist/TableBody.d.mts +1 -1
  344. package/dist/{TableBox-DO-yToJk.cjs → TableBox-CiuXCXyv.cjs} +11 -11
  345. package/dist/{TableBox-DO-yToJk.cjs.map → TableBox-CiuXCXyv.cjs.map} +1 -1
  346. package/dist/{TableBox-DIJffyts.mjs → TableBox-luasMC73.mjs} +11 -11
  347. package/dist/{TableBox-DIJffyts.mjs.map → TableBox-luasMC73.mjs.map} +1 -1
  348. package/dist/TableBox.d.cts +2 -2
  349. package/dist/TableBox.d.mts +2 -2
  350. package/dist/{TableBoxCell-D1bjYv7b.d.mts → TableBoxCell-By1xE6_Q.d.mts} +7 -7
  351. package/dist/{TableBoxCell-DOQ8PnAT.d.cts → TableBoxCell-DIMenSwX.d.cts} +6 -6
  352. package/dist/TableBoxCell.d.cts +1 -1
  353. package/dist/TableBoxCell.d.mts +1 -1
  354. package/dist/TableBoxField.d.cts +3 -3
  355. package/dist/TableBoxField.d.mts +4 -4
  356. package/dist/{TableBoxRow-CTR14HJF.d.mts → TableBoxRow-CsRPRPQ-.d.mts} +4 -4
  357. package/dist/{TableBoxRow-BUK5RjRA.d.cts → TableBoxRow-RNQ6wJLh.d.cts} +3 -3
  358. package/dist/TableBoxRow.d.cts +1 -1
  359. package/dist/TableBoxRow.d.mts +1 -1
  360. package/dist/{TableBoxRowActions-CKgUEH38.d.cts → TableBoxRowActions-CYpoPhYZ.d.cts} +2 -2
  361. package/dist/{TableBoxRowActions-BoMt5d0b.d.mts → TableBoxRowActions-DMYOI8Do.d.mts} +2 -2
  362. package/dist/TableBoxRowActions.d.cts +1 -1
  363. package/dist/TableBoxRowActions.d.mts +1 -1
  364. package/dist/TableCell.d.cts +1 -1
  365. package/dist/TableCell.d.mts +1 -1
  366. package/dist/{TableControls-BZyiqk9V.d.mts → TableControls-BehR7CKS.d.mts} +4 -4
  367. package/dist/TableControls-BtXK7Ils.cjs +3995 -0
  368. package/dist/TableControls-BtXK7Ils.cjs.map +1 -0
  369. package/dist/{TableControls-Bkd3jhC1.d.cts → TableControls-CLNF0AJG.d.cts} +3 -3
  370. package/dist/TableControls-DHMs7o58.mjs +3859 -0
  371. package/dist/TableControls-DHMs7o58.mjs.map +1 -0
  372. package/dist/TableControls.d.cts +1 -1
  373. package/dist/TableControls.d.mts +1 -1
  374. package/dist/{TableControlsContext-D6XpuRVw.d.cts → TableControlsContext-DAZx6Rrj.d.cts} +2 -2
  375. package/dist/{TableControlsContext-CleTWT7z.d.mts → TableControlsContext-D_SBFZN1.d.mts} +2 -2
  376. package/dist/TableControlsContext.d.cts +1 -1
  377. package/dist/TableControlsContext.d.mts +1 -1
  378. package/dist/{TableHead-CTsZNRJm.d.cts → TableHead-Ch4Ho3LW.d.cts} +1 -1
  379. package/dist/{TableHead-wl78HqPT.d.mts → TableHead-LxvG0e9k.d.mts} +1 -1
  380. package/dist/TableHead.d.cts +1 -1
  381. package/dist/TableHead.d.mts +1 -1
  382. package/dist/{TableHeaderCell-UoY92mzR.d.cts → TableHeaderCell-Br8ZE3Xe.d.mts} +1 -1
  383. package/dist/{TableHeaderCell-B2yiOw4w.d.mts → TableHeaderCell-Crsa2R2g.d.cts} +1 -1
  384. package/dist/TableHeaderCell.d.cts +1 -1
  385. package/dist/TableHeaderCell.d.mts +1 -1
  386. package/dist/{TableLayout-GyRS-Awa.d.cts → TableLayout-Ct0kepcA.d.cts} +1 -1
  387. package/dist/{TableLayout-_TWUnffx.d.mts → TableLayout-nwy094C_.d.mts} +1 -1
  388. package/dist/TableLayout.d.cts +1 -1
  389. package/dist/TableLayout.d.mts +1 -1
  390. package/dist/{TableRow-C-faHbkL.d.mts → TableRow-BvS4yjo6.d.mts} +2 -2
  391. package/dist/{TableRow-BVzduO4G.d.cts → TableRow-DVTPqT4w.d.cts} +1 -1
  392. package/dist/TableRow.d.cts +1 -1
  393. package/dist/TableRow.d.mts +1 -1
  394. package/dist/TableTH.d.cts +1 -1
  395. package/dist/TableTH.d.mts +1 -1
  396. package/dist/{TableViewConfigurationDropdown-D2TM2wCv.d.mts → TableViewConfigurationDropdown-BYPh4dIP.d.mts} +2 -2
  397. package/dist/{TableViewConfigurationDropdown-u3-prEHJ.d.cts → TableViewConfigurationDropdown-CaiOGyrU.d.cts} +2 -2
  398. package/dist/TableViewConfigurationDropdown.d.cts +1 -1
  399. package/dist/TableViewConfigurationDropdown.d.mts +1 -1
  400. package/dist/TechnicalSticker.d.mts +1 -1
  401. package/dist/{Text-D3FXEnG6.d.mts → Text-DNPbAuUG.d.mts} +3 -3
  402. package/dist/{Text-CzN0DOXV.cjs → Text-G9QmYf0P.cjs} +1 -1
  403. package/dist/{Text-CzN0DOXV.cjs.map → Text-G9QmYf0P.cjs.map} +1 -1
  404. package/dist/{Text-hEoPeOc9.mjs → Text-RcEfNFLx.mjs} +1 -1
  405. package/dist/{Text-hEoPeOc9.mjs.map → Text-RcEfNFLx.mjs.map} +1 -1
  406. package/dist/Text.d.mts +1 -1
  407. package/dist/{TextArea-KpDoXg-5.d.cts → TextArea-B89wtTsF.d.mts} +2 -2
  408. package/dist/{TextArea-DVHi0K7M.cjs → TextArea-BNiipQDb.cjs} +3 -3
  409. package/dist/{TextArea-DVHi0K7M.cjs.map → TextArea-BNiipQDb.cjs.map} +1 -1
  410. package/dist/{TextArea-weASn4Hq.d.mts → TextArea-CHW9FKM4.d.cts} +2 -2
  411. package/dist/{TextArea-DIPeBLkr.mjs → TextArea-NCLsW-03.mjs} +3 -3
  412. package/dist/{TextArea-DIPeBLkr.mjs.map → TextArea-NCLsW-03.mjs.map} +1 -1
  413. package/dist/TextArea.d.cts +1 -1
  414. package/dist/TextArea.d.mts +1 -1
  415. package/dist/{TextUnderlineTooltip-Cep5cgEQ.d.mts → TextUnderlineTooltip-5-0D8s4z.d.mts} +3 -3
  416. package/dist/{TextUnderlineTooltip-cSMjZOuB.d.cts → TextUnderlineTooltip-DMEyOu8C.d.cts} +2 -2
  417. package/dist/TextUnderlineTooltip.d.cts +1 -1
  418. package/dist/TextUnderlineTooltip.d.mts +1 -1
  419. package/dist/Tile.d.cts +1 -1
  420. package/dist/Tile.d.mts +2 -2
  421. package/dist/Toast.d.cts +1 -1
  422. package/dist/Toast.d.mts +1 -1
  423. package/dist/{Toggle-CfjUQlcK.mjs → Toggle-Bie9zCem.mjs} +5 -5
  424. package/dist/{Toggle-CfjUQlcK.mjs.map → Toggle-Bie9zCem.mjs.map} +1 -1
  425. package/dist/{Toggle-CTtrhzsV.cjs → Toggle-Ce-rF8Xp.cjs} +5 -5
  426. package/dist/{Toggle-CTtrhzsV.cjs.map → Toggle-Ce-rF8Xp.cjs.map} +1 -1
  427. package/dist/{Toggle-BQCOJZjZ.d.mts → Toggle-DzYLgxGk.d.mts} +1 -1
  428. package/dist/{Toggle-CYQE1Nk_.d.cts → Toggle-tbIebQWC.d.cts} +1 -1
  429. package/dist/Toggle.d.cts +1 -1
  430. package/dist/Toggle.d.mts +1 -1
  431. package/dist/{Tooltip-BhGRP9QA.d.cts → Tooltip--eDrrk2r.d.cts} +2 -2
  432. package/dist/{Tooltip-CDvOu1UN.mjs → Tooltip-C6AR1xT-.mjs} +3 -3
  433. package/dist/{Tooltip-CDvOu1UN.mjs.map → Tooltip-C6AR1xT-.mjs.map} +1 -1
  434. package/dist/{Tooltip-DRgufW3i.d.mts → Tooltip-CUC-JuRL.d.mts} +3 -3
  435. package/dist/{Tooltip-vylydKVv.cjs → Tooltip-olP3rdUO.cjs} +3 -3
  436. package/dist/{Tooltip-vylydKVv.cjs.map → Tooltip-olP3rdUO.cjs.map} +1 -1
  437. package/dist/Tooltip.d.cts +1 -1
  438. package/dist/Tooltip.d.mts +1 -1
  439. package/dist/{TruncatedText-Cy8NpHzm.d.mts → TruncatedText-BJnowVTx.d.mts} +1 -1
  440. package/dist/{TruncatedText-D8f3AiBL.d.cts → TruncatedText-Dit2NJI6.d.cts} +1 -1
  441. package/dist/components/Attribute/index.cjs +6 -6
  442. package/dist/components/Attribute/index.mjs +10 -10
  443. package/dist/components/Attribute/index.mjs.map +1 -1
  444. package/dist/components/Badge/index.cjs +1 -1
  445. package/dist/components/Badge/index.mjs +1 -1
  446. package/dist/components/Banner/index.cjs +1 -1
  447. package/dist/components/Banner/index.mjs +1 -1
  448. package/dist/components/Breadcrumbs/index.cjs +3 -271
  449. package/dist/components/Breadcrumbs/index.d.cts +2 -2
  450. package/dist/components/Breadcrumbs/index.d.mts +2 -2
  451. package/dist/components/Breadcrumbs/index.mjs +1 -267
  452. package/dist/components/Button/index.cjs +1 -1
  453. package/dist/components/Button/index.d.mts +2 -2
  454. package/dist/components/Button/index.mjs +1 -1
  455. package/dist/components/ButtonGroup/index.cjs +3 -3
  456. package/dist/components/ButtonGroup/index.mjs +3 -3
  457. package/dist/components/Card/index.cjs +1 -1
  458. package/dist/components/Card/index.d.cts +2 -2
  459. package/dist/components/Card/index.d.mts +2 -2
  460. package/dist/components/Card/index.mjs +1 -1
  461. package/dist/components/CardV2/index.cjs +3 -415
  462. package/dist/components/CardV2/index.d.cts +1 -1
  463. package/dist/components/CardV2/index.d.mts +1 -1
  464. package/dist/components/CardV2/index.mjs +1 -410
  465. package/dist/components/Checkbox/index.cjs +1 -1
  466. package/dist/components/Checkbox/index.d.cts +1 -1
  467. package/dist/components/Checkbox/index.d.mts +1 -1
  468. package/dist/components/Checkbox/index.mjs +1 -1
  469. package/dist/components/Combobox/index.cjs +1 -1
  470. package/dist/components/Combobox/index.d.cts +2 -2
  471. package/dist/components/Combobox/index.d.mts +2 -2
  472. package/dist/components/Combobox/index.mjs +1 -1
  473. package/dist/components/ConfigFormGroup/index.cjs +2 -2
  474. package/dist/components/ConfigFormGroup/index.mjs +2 -2
  475. package/dist/components/DataTable/TableControls/index.cjs +15 -1
  476. package/dist/components/DataTable/TableControls/index.d.cts +16 -6
  477. package/dist/components/DataTable/TableControls/index.d.mts +16 -6
  478. package/dist/components/DataTable/TableControls/index.mjs +2 -2
  479. package/dist/components/DataTable/index.cjs +14 -14
  480. package/dist/components/DataTable/index.mjs +24 -24
  481. package/dist/components/DataTable/index.mjs.map +1 -1
  482. package/dist/components/DataTable/types.d.cts +2 -2
  483. package/dist/components/DataTable/types.d.mts +2 -2
  484. package/dist/components/DatePicker/index.cjs +6 -929
  485. package/dist/components/DatePicker/index.mjs +1 -921
  486. package/dist/components/DropdownButton/index.cjs +1 -1
  487. package/dist/components/DropdownButton/index.mjs +1 -1
  488. package/dist/components/DropdownMenu/index.cjs +1 -1
  489. package/dist/components/DropdownMenu/index.d.cts +1 -1
  490. package/dist/components/DropdownMenu/index.d.mts +1 -1
  491. package/dist/components/DropdownMenu/index.mjs +1 -1
  492. package/dist/components/FormControl/index.cjs +2 -2
  493. package/dist/components/FormControl/index.d.cts +2 -2
  494. package/dist/components/FormControl/index.d.mts +2 -2
  495. package/dist/components/FormControl/index.mjs +2 -2
  496. package/dist/components/FormField/index.cjs +15 -486
  497. package/dist/components/FormField/index.d.cts +1 -1
  498. package/dist/components/FormField/index.d.mts +1 -1
  499. package/dist/components/FormField/index.mjs +1 -470
  500. package/dist/components/HoverCopyableField/index.cjs +1 -1
  501. package/dist/components/HoverCopyableField/index.mjs +1 -1
  502. package/dist/components/ImageTile/index.cjs +8 -8
  503. package/dist/components/ImageTile/index.mjs +8 -8
  504. package/dist/components/Input/index.cjs +1 -1
  505. package/dist/components/Input/index.d.cts +1 -1
  506. package/dist/components/Input/index.d.mts +1 -1
  507. package/dist/components/Input/index.mjs +1 -1
  508. package/dist/components/Link/index.cjs +1 -1
  509. package/dist/components/Link/index.mjs +1 -1
  510. package/dist/components/ListBox/index.cjs +1 -1
  511. package/dist/components/ListBox/index.d.cts +4 -2
  512. package/dist/components/ListBox/index.d.mts +4 -2
  513. package/dist/components/ListBox/index.mjs +1 -1
  514. package/dist/components/LoadingShimmer/index.cjs +1 -1
  515. package/dist/components/LoadingShimmer/index.mjs +1 -1
  516. package/dist/components/MaskedInput/index.cjs +2 -2
  517. package/dist/components/MaskedInput/index.mjs +2 -2
  518. package/dist/components/Menu/index.cjs +1 -1
  519. package/dist/components/Menu/index.d.cts +1 -1
  520. package/dist/components/Menu/index.d.mts +1 -1
  521. package/dist/components/Menu/index.mjs +1 -1
  522. package/dist/components/Modal/index.cjs +7 -7
  523. package/dist/components/Modal/index.mjs +7 -7
  524. package/dist/components/PageHeader/index.cjs +3 -67
  525. package/dist/components/PageHeader/index.mjs +1 -63
  526. package/dist/components/Pagination/index.cjs +1 -1
  527. package/dist/components/Pagination/index.d.cts +3 -3
  528. package/dist/components/Pagination/index.d.mts +3 -3
  529. package/dist/components/Pagination/index.mjs +1 -1
  530. package/dist/components/Pii/index.cjs +1 -1
  531. package/dist/components/Pii/index.mjs +1 -1
  532. package/dist/components/Popover/index.cjs +1 -1
  533. package/dist/components/Popover/index.mjs +1 -1
  534. package/dist/components/ProgressBar/index.cjs +1 -1
  535. package/dist/components/ProgressBar/index.mjs +1 -1
  536. package/dist/components/Radio/index.cjs +1 -1
  537. package/dist/components/Radio/index.mjs +1 -1
  538. package/dist/components/RadioGroup/index.cjs +1 -1
  539. package/dist/components/RadioGroup/index.d.cts +1 -1
  540. package/dist/components/RadioGroup/index.d.mts +1 -1
  541. package/dist/components/RadioGroup/index.mjs +1 -1
  542. package/dist/components/SegmentedControl/index.cjs +1 -1
  543. package/dist/components/SegmentedControl/index.d.cts +1 -1
  544. package/dist/components/SegmentedControl/index.d.mts +1 -1
  545. package/dist/components/SegmentedControl/index.mjs +1 -1
  546. package/dist/components/Select/index.cjs +1 -1
  547. package/dist/components/Select/index.d.cts +1 -1
  548. package/dist/components/Select/index.d.mts +1 -1
  549. package/dist/components/Select/index.mjs +1 -1
  550. package/dist/components/Slider/index.cjs +2 -2
  551. package/dist/components/Slider/index.mjs +2 -2
  552. package/dist/components/Spacer/index.cjs +1 -1
  553. package/dist/components/Spacer/index.mjs +1 -1
  554. package/dist/components/Stack/index.cjs +1 -1
  555. package/dist/components/Stack/index.d.cts +1 -1
  556. package/dist/components/Stack/index.d.mts +1 -1
  557. package/dist/components/Stack/index.mjs +1 -1
  558. package/dist/components/StatusIndicator/index.cjs +60 -10
  559. package/dist/components/StatusIndicator/index.cjs.map +1 -1
  560. package/dist/components/StatusIndicator/index.d.cts +2 -2
  561. package/dist/components/StatusIndicator/index.d.mts +2 -2
  562. package/dist/components/StatusIndicator/index.mjs +61 -12
  563. package/dist/components/StatusIndicator/index.mjs.map +1 -1
  564. package/dist/components/Sticker/index.cjs +1 -1
  565. package/dist/components/Sticker/index.d.cts +1 -1
  566. package/dist/components/Sticker/index.d.mts +1 -1
  567. package/dist/components/Sticker/index.mjs +1 -1
  568. package/dist/components/TabBar/index.cjs +1 -1
  569. package/dist/components/TabBar/index.mjs +1 -1
  570. package/dist/components/Table/index.cjs +1 -1
  571. package/dist/components/Table/index.d.cts +7 -7
  572. package/dist/components/Table/index.d.mts +7 -7
  573. package/dist/components/Table/index.mjs +1 -1
  574. package/dist/components/TableBox/index.cjs +1 -1
  575. package/dist/components/TableBox/index.d.cts +2 -2
  576. package/dist/components/TableBox/index.d.mts +2 -2
  577. package/dist/components/TableBox/index.mjs +1 -1
  578. package/dist/components/TechnicalSticker/index.cjs +4 -4
  579. package/dist/components/TechnicalSticker/index.mjs +4 -4
  580. package/dist/components/Text/index.cjs +1 -1
  581. package/dist/components/Text/index.d.mts +1 -1
  582. package/dist/components/Text/index.mjs +1 -1
  583. package/dist/components/TextArea/index.cjs +1 -1
  584. package/dist/components/TextArea/index.d.cts +1 -1
  585. package/dist/components/TextArea/index.d.mts +1 -1
  586. package/dist/components/TextArea/index.mjs +1 -1
  587. package/dist/components/Tile/index.cjs +4 -4
  588. package/dist/components/Tile/index.mjs +4 -4
  589. package/dist/components/Toast/index.cjs +1 -1
  590. package/dist/components/Toast/index.mjs +1 -1
  591. package/dist/components/Toggle/index.cjs +1 -1
  592. package/dist/components/Toggle/index.d.cts +1 -1
  593. package/dist/components/Toggle/index.d.mts +1 -1
  594. package/dist/components/Toggle/index.mjs +1 -1
  595. package/dist/components/Tooltip/index.cjs +1 -1
  596. package/dist/components/Tooltip/index.d.cts +3 -3
  597. package/dist/components/Tooltip/index.d.mts +3 -3
  598. package/dist/components/Tooltip/index.mjs +1 -1
  599. package/dist/compound-expression.d.mts +9 -0
  600. package/dist/{constants-kwVsjw8O.d.cts → constants-B6c8S033.d.cts} +1 -1
  601. package/dist/{constants-DVwPpTt5.d.mts → constants-BASogfT_.d.mts} +1 -1
  602. package/dist/constants.d.cts +1 -1
  603. package/dist/constants.d.mts +1 -1
  604. package/dist/containers.d.mts +8 -0
  605. package/dist/display.d.mts +8 -0
  606. package/dist/fieldPickerOptions.d.mts +29 -0
  607. package/dist/filter-size-context-Blw6Sd69.d.mts +52 -0
  608. package/dist/filter-size-context-CIw0Zi6r.d.cts +52 -0
  609. package/dist/filter-size-context.d.cts +2 -0
  610. package/dist/filter-size-context.d.mts +2 -0
  611. package/dist/helpers.d.cts +1 -1
  612. package/dist/helpers.d.mts +1 -1
  613. package/dist/index-4_B2yRzD.d.mts +7 -0
  614. package/dist/{index-_tQRydn9.d.cts → index-Bw8QVu_o.d.cts} +3 -3
  615. package/dist/index-C9EIpBh8.d.cts +7 -0
  616. package/dist/index-D34XP8vp.d.cts +54 -0
  617. package/dist/{index-BPnJP0jZ.d.mts → index-DDbjWdk0.d.mts} +4 -4
  618. package/dist/index-IlwGkCAe2.d.mts +54 -0
  619. package/dist/index-sQecLSpR.d.cts +1 -0
  620. package/dist/index-sViox9YW.d.mts +1 -0
  621. package/dist/index.d.cts +1 -1
  622. package/dist/index.d.mts +1 -1
  623. package/dist/index2.d.cts +1 -1
  624. package/dist/index2.d.mts +1 -1
  625. package/dist/index3.d.cts +4 -1
  626. package/dist/index3.d.mts +4 -1
  627. package/dist/index4.d.cts +11 -0
  628. package/dist/index4.d.mts +11 -0
  629. package/dist/index5.d.cts +1 -0
  630. package/dist/index5.d.mts +2 -0
  631. package/dist/index6.d.mts +1 -0
  632. package/dist/{input-DrG6mA0V.d.mts → input-Bv5fKt5J.d.mts} +3 -3
  633. package/dist/{input-BkzqXwn7.d.cts → input-DPB0cX2m.d.cts} +2 -2
  634. package/dist/inputFields.d.cts +10 -10
  635. package/dist/inputFields.d.mts +11 -11
  636. package/dist/{intersperse-Gxwgpbk8.cjs → intersperse-_0nQM5Rb.cjs} +1 -1
  637. package/dist/{intersperse-Gxwgpbk8.cjs.map → intersperse-_0nQM5Rb.cjs.map} +1 -1
  638. package/dist/{intersperse-yd3oMrQl.mjs → intersperse-vOYvFOfF.mjs} +1 -1
  639. package/dist/{intersperse-yd3oMrQl.mjs.map → intersperse-vOYvFOfF.mjs.map} +1 -1
  640. package/dist/layouts/LayoutLoadingShimmer/index.cjs +139 -0
  641. package/dist/layouts/LayoutLoadingShimmer/index.cjs.map +1 -0
  642. package/dist/layouts/LayoutLoadingShimmer/index.d.cts +2 -0
  643. package/dist/layouts/LayoutLoadingShimmer/index.d.mts +2 -0
  644. package/dist/layouts/LayoutLoadingShimmer/index.mjs +133 -0
  645. package/dist/layouts/LayoutLoadingShimmer/index.mjs.map +1 -0
  646. package/dist/lib/MiddleTruncatedText.cjs +1 -1
  647. package/dist/lib/MiddleTruncatedText.mjs +1 -1
  648. package/dist/lib/PDSProvider.d.mts +1 -1
  649. package/dist/lib/TruncatedText.cjs +1 -1
  650. package/dist/lib/TruncatedText.d.cts +1 -1
  651. package/dist/lib/TruncatedText.d.mts +1 -1
  652. package/dist/lib/TruncatedText.mjs +1 -1
  653. package/dist/lib/TruncatedTextWithTooltip.cjs +2 -2
  654. package/dist/lib/TruncatedTextWithTooltip.d.cts +1 -1
  655. package/dist/lib/TruncatedTextWithTooltip.d.mts +1 -1
  656. package/dist/lib/TruncatedTextWithTooltip.mjs +2 -2
  657. package/dist/lib/message.d.cts +1 -1
  658. package/dist/lib/message.d.mts +1 -1
  659. package/dist/lib/pseudoClass.d.mts +1 -1
  660. package/dist/{message-C2286H-r.d.cts → message-BEgtEjQC.d.cts} +1 -1
  661. package/dist/{message-BfJ87aIU.d.mts → message-CMHvlPGn.d.mts} +1 -1
  662. package/dist/mixins/focus.d.mts +1 -1
  663. package/dist/mixins/hoverable.d.mts +2 -2
  664. package/dist/mixins/input.d.cts +1 -1
  665. package/dist/mixins/input.d.mts +1 -1
  666. package/dist/mixins/menuItem.d.mts +2 -2
  667. package/dist/mixins/text.d.mts +1 -1
  668. package/dist/operators-1qE2GpC7.d.cts +43 -0
  669. package/dist/operators-Bo31xlc2.d.mts +43 -0
  670. package/dist/operators.d.cts +2 -0
  671. package/dist/operators.d.mts +2 -0
  672. package/dist/{text-CtoDqqAO.d.mts → text-B21s9mRZ.d.mts} +1 -1
  673. package/dist/{theme-Bx2sn3Lt.d.mts → theme-BzBpJXhO.d.mts} +1 -1
  674. package/dist/theme.d.mts +1 -1
  675. package/dist/types-B_HHNlia.d.cts +158 -0
  676. package/dist/types-CCvc590y.d.cts +45 -0
  677. package/dist/{types-CuCT-YnX.d.cts → types-CkiXVJeR.d.cts} +1 -1
  678. package/dist/types-D58IoRx6.d.mts +158 -0
  679. package/dist/types-D7ppqnNj.d.mts +45 -0
  680. package/dist/{types-B34lbI2k.d.mts → types-DEh_pXgS.d.mts} +1 -1
  681. package/dist/{types-C_AUGurs.d.cts → types-SYSKcZKW.d.cts} +1 -1
  682. package/dist/{types-DTak9UTv.d.mts → types-TV9nVfSe.d.mts} +1 -1
  683. package/dist/types.d.cts +1 -1
  684. package/dist/types.d.mts +1 -1
  685. package/dist/types2.d.cts +2 -2
  686. package/dist/types2.d.mts +2 -2
  687. package/dist/types3.d.cts +2 -0
  688. package/dist/types3.d.mts +2 -0
  689. package/dist/types4.d.cts +2 -0
  690. package/dist/types4.d.mts +2 -0
  691. package/dist/use-rules-popover-selection.d.mts +19 -0
  692. package/dist/useComboboxFooterAction.d.mts +47 -0
  693. package/dist/useFilterStateV2-DCQghouq.d.mts +93 -0
  694. package/dist/useFilterStateV2-DbPwX5N1.d.cts +93 -0
  695. package/dist/useFilterStateV2.d.cts +2 -0
  696. package/dist/useFilterStateV2.d.mts +2 -0
  697. package/dist/{useFormField-CaIdE7JQ.d.cts → useFormField--Q8ZdpW5.d.cts} +2 -2
  698. package/dist/{useFormField-B98dmreO.cjs → useFormField-BZlArnsI.cjs} +2 -2
  699. package/dist/{useFormField-B98dmreO.cjs.map → useFormField-BZlArnsI.cjs.map} +1 -1
  700. package/dist/{useFormField-BE0rTBF1.d.mts → useFormField-D8mLsiQc.d.mts} +2 -2
  701. package/dist/{useFormField-eftOPiXj.mjs → useFormField-DhYd6bNn.mjs} +2 -2
  702. package/dist/{useFormField-eftOPiXj.mjs.map → useFormField-DhYd6bNn.mjs.map} +1 -1
  703. package/dist/useFormField.d.cts +1 -1
  704. package/dist/useFormField.d.mts +1 -1
  705. package/dist/{useFormGroup-BE7v9eAj.cjs → useFormGroup-Bmnzgq0S.cjs} +1 -1
  706. package/dist/{useFormGroup-BE7v9eAj.cjs.map → useFormGroup-Bmnzgq0S.cjs.map} +1 -1
  707. package/dist/{useFormGroup-BMukAMAd.mjs → useFormGroup-DWVW7A9f.mjs} +1 -1
  708. package/dist/{useFormGroup-BMukAMAd.mjs.map → useFormGroup-DWVW7A9f.mjs.map} +1 -1
  709. package/dist/{useTableBoxDragAndDrop--QBq2FQh.d.cts → useTableBoxDragAndDrop-BMo-iaUF.d.mts} +1 -1
  710. package/dist/{useTableBoxDragAndDrop-BTtv9PEt.d.mts → useTableBoxDragAndDrop-DnbUToce.d.cts} +1 -1
  711. package/dist/useTableBoxDragAndDrop.d.cts +1 -1
  712. package/dist/useTableBoxDragAndDrop.d.mts +1 -1
  713. package/dist/{useToggle-3k3EkV8V.mjs → useToggle-Bo3yd14Y.mjs} +1 -1
  714. package/dist/{useToggle-3k3EkV8V.mjs.map → useToggle-Bo3yd14Y.mjs.map} +1 -1
  715. package/dist/{useToggle-CSkZWXtQ.cjs → useToggle-DARO917w.cjs} +1 -1
  716. package/dist/{useToggle-CSkZWXtQ.cjs.map → useToggle-DARO917w.cjs.map} +1 -1
  717. package/dist/useTruncation.d.mts +1 -1
  718. package/dist/{utilities-DqO6Sh94.d.cts → utilities-BO_95qFA.d.mts} +1 -1
  719. package/dist/{utilities-SMbDe8oK.d.mts → utilities-mSlaTrjB.d.cts} +1 -1
  720. package/dist/utilities.d.cts +1 -1
  721. package/dist/utilities.d.mts +1 -1
  722. package/dist/utils/storybook.cjs +1 -1
  723. package/dist/utils/storybook.mjs +1 -1
  724. package/dist/utils/testing.cjs +1 -1
  725. package/dist/utils/testing.d.mts +1 -1
  726. package/dist/utils/testing.mjs +1 -1
  727. package/dist/utils.d.mts +22 -5
  728. package/dist/utils2.d.mts +9 -0
  729. package/dist/validation-CJymv6JE.d.cts +51 -0
  730. package/dist/validation-vLh3t2dk.d.mts +51 -0
  731. package/dist/validation.d.cts +2 -0
  732. package/dist/validation.d.mts +2 -0
  733. package/dist/value-control-resolver-B9p25q3G.d.cts +46 -0
  734. package/dist/value-control-resolver-CE-bqdAl.d.mts +46 -0
  735. package/dist/value-control-resolver.d.cts +2 -0
  736. package/dist/value-control-resolver.d.mts +2 -0
  737. package/package.json +12 -3
  738. package/dist/Combobox-4Bi9-N1p.cjs.map +0 -1
  739. package/dist/Combobox-CeKMrlxy.mjs.map +0 -1
  740. package/dist/ListBox-BCscLcYL.cjs.map +0 -1
  741. package/dist/ListBox-CDNOJmvz.mjs.map +0 -1
  742. package/dist/Pagination-Cj08JRG9.mjs.map +0 -1
  743. package/dist/Pagination-D4IVVj3S.cjs.map +0 -1
  744. package/dist/SegmentedControl-B1ZLgu61.mjs.map +0 -1
  745. package/dist/SegmentedControl-CIJz0oxY.cjs.map +0 -1
  746. package/dist/Select-ByTgXOlU.mjs.map +0 -1
  747. package/dist/Select-C65bfYeT.cjs.map +0 -1
  748. package/dist/TableControls-BkdSeQvt.mjs +0 -1029
  749. package/dist/TableControls-BkdSeQvt.mjs.map +0 -1
  750. package/dist/TableControls-DcbnNqeK.cjs +0 -1080
  751. package/dist/TableControls-DcbnNqeK.cjs.map +0 -1
  752. package/dist/components/Breadcrumbs/index.cjs.map +0 -1
  753. package/dist/components/Breadcrumbs/index.mjs.map +0 -1
  754. package/dist/components/CardV2/index.cjs.map +0 -1
  755. package/dist/components/CardV2/index.mjs.map +0 -1
  756. package/dist/components/DatePicker/index.cjs.map +0 -1
  757. package/dist/components/DatePicker/index.mjs.map +0 -1
  758. package/dist/components/FormField/index.cjs.map +0 -1
  759. package/dist/components/FormField/index.mjs.map +0 -1
  760. package/dist/components/PageHeader/index.cjs.map +0 -1
  761. package/dist/components/PageHeader/index.mjs.map +0 -1
  762. /package/dist/{index-8SLBz2NH.d.mts → index--p6oQT9I.d.mts} +0 -0
  763. /package/dist/{index-B2KLYYkM.d.cts → index-BIAn8oQh.d.cts} +0 -0
  764. /package/dist/{index-B5cbLMbC2.d.cts → index-BL32-cvv.d.cts} +0 -0
  765. /package/dist/{index-BCsiC0tv.d.cts → index-BXpMZvwA.d.cts} +0 -0
  766. /package/dist/{index-BPiqSRRl.d.mts → index-BYd3Btr1.d.mts} +0 -0
  767. /package/dist/{index-BSVhZrWN.d.mts → index-BhY1qu3m.d.cts} +0 -0
  768. /package/dist/{index-BTImeehL2.d.mts → index-BlwcRiXv.d.cts} +0 -0
  769. /package/dist/{index-C3kE54DD.d.mts → index-C1ihAKnV.d.cts} +0 -0
  770. /package/dist/{index-C6yvNuzO.d.cts → index-CDAfh8Ew.d.cts} +0 -0
  771. /package/dist/{index-C8k_zgEm.d.cts → index-CDGG7lCB.d.mts} +0 -0
  772. /package/dist/{index-CEqOS-7M.d.mts → index-CFG0_wK4.d.cts} +0 -0
  773. /package/dist/{index-CROz1VSV.d.mts → index-CKKoxA9V.d.mts} +0 -0
  774. /package/dist/{index-CWt1yJ75.d.cts → index-CMuRFTR3.d.mts} +0 -0
  775. /package/dist/{index-CmCelmEL.d.cts → index-CNxS4Tlu.d.mts} +0 -0
  776. /package/dist/{index-CmUzJ4E-2.d.cts → index-CQ25UCod.d.cts} +0 -0
  777. /package/dist/{index-CsuikFeJ.d.mts → index-CWB6exYm.d.mts} +0 -0
  778. /package/dist/{index-CtCMUyZA.d.cts → index-Cv0jeUQf2.d.cts} +0 -0
  779. /package/dist/{index-Cz6N-KeS.d.cts → index-CwSIy_W-.d.cts} +0 -0
  780. /package/dist/{index-D2HUTZ-d.d.cts → index-CzItj62a.d.mts} +0 -0
  781. /package/dist/{index-D8dPsry7.d.mts → index-D4DUvwPf.d.mts} +0 -0
  782. /package/dist/{index-DeEmP3Jc.d.cts → index-D6CnpA_r.d.cts} +0 -0
  783. /package/dist/{index-DeVKzGce.d.mts → index-D9IqtUDs.d.cts} +0 -0
  784. /package/dist/{index-DrZ2Dh-H.d.cts → index-DFKoAoY2.d.cts} +0 -0
  785. /package/dist/{index-DxSM7VXJ.d.cts → index-DGsJdI5l.d.mts} +0 -0
  786. /package/dist/{index-FtE8MXJ_.d.mts → index-DM6vVDZD.d.mts} +0 -0
  787. /package/dist/{index-JuxZj_Qp2.d.mts → index-DWfPppPU.d.mts} +0 -0
  788. /package/dist/{index-LhFpnU-f.d.mts → index-DXJd7-2Z.d.mts} +0 -0
  789. /package/dist/{index-N-OgGgfF.d.mts → index-DkrC-i1D.d.mts} +0 -0
  790. /package/dist/{index-NKYLt_R9.d.mts → index-DpEKQcoR.d.cts} +0 -0
  791. /package/dist/{index-VWno75SQ.d.mts → index-DvuJXuAN.d.mts} +0 -0
  792. /package/dist/{index-c55Utzva.d.mts → index-Iujpc9_6.d.mts} +0 -0
  793. /package/dist/{index-gpCH5158.d.mts → index-PWQavSPf.d.mts} +0 -0
  794. /package/dist/{index-lQ_hGQ08.d.cts → index-dC-i2r_u.d.cts} +0 -0
  795. /package/dist/{index-luywJTzJ.d.mts → index-e6k85DKM.d.mts} +0 -0
  796. /package/dist/{index-zO0Ly4bS.d.cts → index-lIMqGGJz.d.mts} +0 -0
@@ -1,11 +1,11 @@
1
1
  const require_chunk = require("./chunk-CKQMccvm.cjs");
2
2
  require("./variables/transitions.cjs");
3
- const require_Card = require("./Card-CaOItkgL.cjs");
4
- const require_Text = require("./Text-CzN0DOXV.cjs");
5
- const require_useToggle = require("./useToggle-CSkZWXtQ.cjs");
6
3
  const require_variables_keyframes = require("./variables/keyframes.cjs");
7
- const require_IconButton = require("./IconButton-DNy7g5zh.cjs");
8
- const require_Popover = require("./Popover-BAv7BujW.cjs");
4
+ const require_Card = require("./Card-Csz-PxX0.cjs");
5
+ const require_Text = require("./Text-G9QmYf0P.cjs");
6
+ const require_useToggle = require("./useToggle-DARO917w.cjs");
7
+ const require_IconButton = require("./IconButton-nlgjJQCS.cjs");
8
+ const require_Popover = require("./Popover-BzgMAhsX.cjs");
9
9
  let _persona_design_tokens = require("@persona/design-tokens");
10
10
  let styled_components = require("styled-components");
11
11
  styled_components = require_chunk.__toESM(styled_components);
@@ -107,4 +107,4 @@ Object.defineProperty(exports, "HoverCopyableField_default", {
107
107
  }
108
108
  });
109
109
 
110
- //# sourceMappingURL=HoverCopyableField-B_WNB7Qp.cjs.map
110
+ //# sourceMappingURL=HoverCopyableField-CRkM7o4B.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"HoverCopyableField-B_WNB7Qp.cjs","names":["Spacing","Button","fadeIn","Card","useToggle","Popover","CopyIcon","Paragraph"],"sources":["../components/HoverCopyableField/HoverCopyableField.tsx","../components/HoverCopyableField/index.ts"],"sourcesContent":["import type { MouseEvent, ReactNode } from 'react';\nimport styled from 'styled-components';\n\nimport { Spacing } from '@persona/design-tokens';\nimport { CopyIcon } from '@persona/icons';\nimport Button from 'design-system/components/Button';\nimport Card from 'design-system/components/Card';\nimport Popover from 'design-system/components/Popover';\nimport { Paragraph } from 'design-system/components/Text';\nimport useToggle from 'design-system/lib/useToggle';\nimport { fadeIn } from 'design-system/variables/keyframes';\nimport { TransitionDuration } from 'design-system/variables/transitions';\n\nconst copyToClipboard = async (text: string): Promise<boolean> => {\n try {\n if ('clipboard' in navigator) {\n await navigator.clipboard.writeText(text);\n return true;\n } else {\n return document.execCommand('copy', true, text);\n }\n } catch {\n return false;\n }\n};\n\nconst CopyableFieldContainer = styled.div`\n display: flex;\n gap: ${Spacing[1]};\n align-items: center;\n`;\n\nconst CopyButton = styled(Button).attrs(() => ({\n type: 'button',\n variant: 'inverse',\n width: 'icon',\n}))<{ isActive: boolean }>`\n height: ${Spacing[5]};\n width: ${Spacing[5]};\n visibility: ${({ isActive }) => (isActive ? 'visible' : 'hidden')};\n animation: ${fadeIn} ${TransitionDuration.Medium} ease-in-out;\n svg {\n width: 14px;\n height: 14px;\n }\n`;\n\nconst StyledCard = styled(Card)`\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 4px;\n animation: ${fadeIn} ${TransitionDuration.Medium} ease-in-out;\n padding: 6px;\n margin: 0;\n`;\n\ninterface HoverCopyableFieldProps {\n copyValue: string | undefined;\n confirmationText?: string;\n children: ReactNode;\n}\n\nconst HoverCopyableField = ({\n copyValue,\n confirmationText = 'Copied',\n children,\n}: HoverCopyableFieldProps) => {\n const [copyButtonActive, { enable: showCopyButton, disable: hideCopyButton }] = useToggle(false);\n const [confirmationActive, { enable: showConfirmation, disable: hideConfirmation }] =\n useToggle(false);\n\n const copyTextToClipboard = async () => {\n if (copyValue == null) {\n return;\n }\n const copyWasSuccessful = await copyToClipboard(copyValue);\n\n if (copyWasSuccessful) {\n showConfirmation();\n setTimeout(() => {\n hideCopyButton();\n hideConfirmation();\n }, 1200);\n }\n };\n\n const copyField = (e: MouseEvent<HTMLButtonElement>) => {\n e.preventDefault();\n e.stopPropagation();\n copyTextToClipboard();\n };\n\n return copyValue != null && copyValue.trim().length > 0 ? (\n <CopyableFieldContainer onMouseEnter={showCopyButton} onMouseLeave={hideCopyButton}>\n {children}\n <Popover open={confirmationActive}>\n <Popover.Anchor asChild>\n <CopyButton\n id='hover-copyable-field__copy-button'\n isActive={copyButtonActive || confirmationActive}\n onClick={copyField}\n >\n <CopyIcon width={16} height={16} />\n </CopyButton>\n </Popover.Anchor>\n <Popover.Content side='top' align='center' style={{ zIndex: 2 }}>\n <StyledCard elevated>\n <Paragraph>{confirmationText}</Paragraph>\n </StyledCard>\n </Popover.Content>\n </Popover>\n </CopyableFieldContainer>\n ) : null;\n};\n\nexport default HoverCopyableField;\n","import HoverCopyableField from './HoverCopyableField';\n\nexport default HoverCopyableField;\n"],"mappings":";;;;;;;;;;;;;;AAaA,MAAM,kBAAkB,OAAO,SAAmC;AAChE,KAAI;AACF,MAAI,eAAe,WAAW;AAC5B,SAAM,UAAU,UAAU,UAAU,KAAK;AACzC,UAAO;QAEP,QAAO,SAAS,YAAY,QAAQ,MAAM,KAAK;SAE3C;AACN,SAAO;;;AAIX,MAAM,yBAAyB,kBAAA,QAAO,GAAG;;SAEhCA,uBAAAA,QAAQ,GAAG;;;AAIpB,MAAM,aAAa,CAAA,GAAA,kBAAA,SAAOC,mBAAAA,OAAO,CAAC,aAAa;CAC7C,MAAM;CACN,SAAS;CACT,OAAO;CACR,EAAE;YACSD,uBAAAA,QAAQ,GAAG;WACZA,uBAAAA,QAAQ,GAAG;iBACL,EAAE,eAAgB,WAAW,YAAY,SAAU;eACrDE,4BAAAA,OAAO,GAAA,QAA6B;;;;;;AAOnD,MAAM,aAAa,CAAA,GAAA,kBAAA,SAAOC,aAAAA,aAAK;;;;;eAKhBD,4BAAAA,OAAO,GAAA,QAA6B;;;;AAWnD,MAAM,sBAAsB,EAC1B,WACA,mBAAmB,UACnB,eAC6B;CAC7B,MAAM,CAAC,kBAAkB,EAAE,QAAQ,gBAAgB,SAAS,oBAAoBE,kBAAAA,UAAU,MAAM;CAChG,MAAM,CAAC,oBAAoB,EAAE,QAAQ,kBAAkB,SAAS,sBAC9DA,kBAAAA,UAAU,MAAM;CAElB,MAAM,sBAAsB,YAAY;AACtC,MAAI,aAAa,KACf;AAIF,MAAI,MAF4B,gBAAgB,UAAU,EAEnC;AACrB,qBAAkB;AAClB,oBAAiB;AACf,oBAAgB;AAChB,sBAAkB;MACjB,KAAK;;;CAIZ,MAAM,aAAa,MAAqC;AACtD,IAAE,gBAAgB;AAClB,IAAE,iBAAiB;AACnB,uBAAqB;;AAGvB,QAAO,aAAa,QAAQ,UAAU,MAAM,CAAC,SAAS,IACpD,iBAAA,GAAA,kBAAA,MAAC,wBAAD;EAAwB,cAAc;EAAgB,cAAc;YAApE,CACG,UACD,iBAAA,GAAA,kBAAA,MAACC,gBAAAA,iBAAD;GAAS,MAAM;aAAf,CACE,iBAAA,GAAA,kBAAA,KAACA,gBAAAA,gBAAQ,QAAT;IAAgB,SAAA;cACd,iBAAA,GAAA,kBAAA,KAAC,YAAD;KACE,IAAG;KACH,UAAU,oBAAoB;KAC9B,SAAS;eAET,iBAAA,GAAA,kBAAA,KAACC,eAAAA,UAAD;MAAU,OAAO;MAAI,QAAQ;MAAM,CAAA;KACxB,CAAA;IACE,CAAA,EACjB,iBAAA,GAAA,kBAAA,KAACD,gBAAAA,gBAAQ,SAAT;IAAiB,MAAK;IAAM,OAAM;IAAS,OAAO,EAAE,QAAQ,GAAG;cAC7D,iBAAA,GAAA,kBAAA,KAAC,YAAD;KAAY,UAAA;eACV,iBAAA,GAAA,kBAAA,KAACE,aAAAA,WAAD,EAAA,UAAY,kBAA6B,CAAA;KAC9B,CAAA;IACG,CAAA,CACV;KACa;MACvB;;;;AC/GN,IAAA,6BAAe"}
1
+ {"version":3,"file":"HoverCopyableField-CRkM7o4B.cjs","names":["Spacing","Button","fadeIn","Card","useToggle","Popover","CopyIcon","Paragraph"],"sources":["../components/HoverCopyableField/HoverCopyableField.tsx","../components/HoverCopyableField/index.ts"],"sourcesContent":["import type { MouseEvent, ReactNode } from 'react';\nimport styled from 'styled-components';\n\nimport { Spacing } from '@persona/design-tokens';\nimport { CopyIcon } from '@persona/icons';\nimport Button from 'design-system/components/Button';\nimport Card from 'design-system/components/Card';\nimport Popover from 'design-system/components/Popover';\nimport { Paragraph } from 'design-system/components/Text';\nimport useToggle from 'design-system/lib/useToggle';\nimport { fadeIn } from 'design-system/variables/keyframes';\nimport { TransitionDuration } from 'design-system/variables/transitions';\n\nconst copyToClipboard = async (text: string): Promise<boolean> => {\n try {\n if ('clipboard' in navigator) {\n await navigator.clipboard.writeText(text);\n return true;\n } else {\n return document.execCommand('copy', true, text);\n }\n } catch {\n return false;\n }\n};\n\nconst CopyableFieldContainer = styled.div`\n display: flex;\n gap: ${Spacing[1]};\n align-items: center;\n`;\n\nconst CopyButton = styled(Button).attrs(() => ({\n type: 'button',\n variant: 'inverse',\n width: 'icon',\n}))<{ isActive: boolean }>`\n height: ${Spacing[5]};\n width: ${Spacing[5]};\n visibility: ${({ isActive }) => (isActive ? 'visible' : 'hidden')};\n animation: ${fadeIn} ${TransitionDuration.Medium} ease-in-out;\n svg {\n width: 14px;\n height: 14px;\n }\n`;\n\nconst StyledCard = styled(Card)`\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 4px;\n animation: ${fadeIn} ${TransitionDuration.Medium} ease-in-out;\n padding: 6px;\n margin: 0;\n`;\n\ninterface HoverCopyableFieldProps {\n copyValue: string | undefined;\n confirmationText?: string;\n children: ReactNode;\n}\n\nconst HoverCopyableField = ({\n copyValue,\n confirmationText = 'Copied',\n children,\n}: HoverCopyableFieldProps) => {\n const [copyButtonActive, { enable: showCopyButton, disable: hideCopyButton }] = useToggle(false);\n const [confirmationActive, { enable: showConfirmation, disable: hideConfirmation }] =\n useToggle(false);\n\n const copyTextToClipboard = async () => {\n if (copyValue == null) {\n return;\n }\n const copyWasSuccessful = await copyToClipboard(copyValue);\n\n if (copyWasSuccessful) {\n showConfirmation();\n setTimeout(() => {\n hideCopyButton();\n hideConfirmation();\n }, 1200);\n }\n };\n\n const copyField = (e: MouseEvent<HTMLButtonElement>) => {\n e.preventDefault();\n e.stopPropagation();\n copyTextToClipboard();\n };\n\n return copyValue != null && copyValue.trim().length > 0 ? (\n <CopyableFieldContainer onMouseEnter={showCopyButton} onMouseLeave={hideCopyButton}>\n {children}\n <Popover open={confirmationActive}>\n <Popover.Anchor asChild>\n <CopyButton\n id='hover-copyable-field__copy-button'\n isActive={copyButtonActive || confirmationActive}\n onClick={copyField}\n >\n <CopyIcon width={16} height={16} />\n </CopyButton>\n </Popover.Anchor>\n <Popover.Content side='top' align='center' style={{ zIndex: 2 }}>\n <StyledCard elevated>\n <Paragraph>{confirmationText}</Paragraph>\n </StyledCard>\n </Popover.Content>\n </Popover>\n </CopyableFieldContainer>\n ) : null;\n};\n\nexport default HoverCopyableField;\n","import HoverCopyableField from './HoverCopyableField';\n\nexport default HoverCopyableField;\n"],"mappings":";;;;;;;;;;;;;;AAaA,MAAM,kBAAkB,OAAO,SAAmC;AAChE,KAAI;AACF,MAAI,eAAe,WAAW;AAC5B,SAAM,UAAU,UAAU,UAAU,KAAK;AACzC,UAAO;QAEP,QAAO,SAAS,YAAY,QAAQ,MAAM,KAAK;SAE3C;AACN,SAAO;;;AAIX,MAAM,yBAAyB,kBAAA,QAAO,GAAG;;SAEhCA,uBAAAA,QAAQ,GAAG;;;AAIpB,MAAM,aAAa,CAAA,GAAA,kBAAA,SAAOC,mBAAAA,OAAO,CAAC,aAAa;CAC7C,MAAM;CACN,SAAS;CACT,OAAO;CACR,EAAE;YACSD,uBAAAA,QAAQ,GAAG;WACZA,uBAAAA,QAAQ,GAAG;iBACL,EAAE,eAAgB,WAAW,YAAY,SAAU;eACrDE,4BAAAA,OAAO,GAAA,QAA6B;;;;;;AAOnD,MAAM,aAAa,CAAA,GAAA,kBAAA,SAAOC,aAAAA,aAAK;;;;;eAKhBD,4BAAAA,OAAO,GAAA,QAA6B;;;;AAWnD,MAAM,sBAAsB,EAC1B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
- import { t as Card_default } from "./Card-CLTkZLKr.mjs";
3
- import { i as Paragraph } from "./Text-hEoPeOc9.mjs";
4
- import { t as useToggle } from "./useToggle-3k3EkV8V.mjs";
5
2
  import { fadeIn } from "./variables/keyframes.mjs";
6
- import { n as Button } from "./IconButton-DC4rh6ow.mjs";
7
- import { s as Popover_default } from "./Popover-D0QY5f-J.mjs";
3
+ import { t as Card_default } from "./Card-BMCB9eFC.mjs";
4
+ import { i as Paragraph } from "./Text-RcEfNFLx.mjs";
5
+ import { t as useToggle } from "./useToggle-Bo3yd14Y.mjs";
6
+ import { n as Button } from "./IconButton-CIWiEsS-.mjs";
7
+ import { s as Popover_default } from "./Popover-BkDpDdaO.mjs";
8
8
  import { Spacing } from "@persona/design-tokens";
9
9
  import styled from "styled-components";
10
10
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -100,4 +100,4 @@ var HoverCopyableField_default = HoverCopyableField;
100
100
  //#endregion
101
101
  export { HoverCopyableField_default as t };
102
102
 
103
- //# sourceMappingURL=HoverCopyableField-DR575ayC.mjs.map
103
+ //# sourceMappingURL=HoverCopyableField-ClXBg_ld.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"HoverCopyableField-DR575ayC.mjs","names":["Card","Popover"],"sources":["../components/HoverCopyableField/HoverCopyableField.tsx","../components/HoverCopyableField/index.ts"],"sourcesContent":["import type { MouseEvent, ReactNode } from 'react';\nimport styled from 'styled-components';\n\nimport { Spacing } from '@persona/design-tokens';\nimport { CopyIcon } from '@persona/icons';\nimport Button from 'design-system/components/Button';\nimport Card from 'design-system/components/Card';\nimport Popover from 'design-system/components/Popover';\nimport { Paragraph } from 'design-system/components/Text';\nimport useToggle from 'design-system/lib/useToggle';\nimport { fadeIn } from 'design-system/variables/keyframes';\nimport { TransitionDuration } from 'design-system/variables/transitions';\n\nconst copyToClipboard = async (text: string): Promise<boolean> => {\n try {\n if ('clipboard' in navigator) {\n await navigator.clipboard.writeText(text);\n return true;\n } else {\n return document.execCommand('copy', true, text);\n }\n } catch {\n return false;\n }\n};\n\nconst CopyableFieldContainer = styled.div`\n display: flex;\n gap: ${Spacing[1]};\n align-items: center;\n`;\n\nconst CopyButton = styled(Button).attrs(() => ({\n type: 'button',\n variant: 'inverse',\n width: 'icon',\n}))<{ isActive: boolean }>`\n height: ${Spacing[5]};\n width: ${Spacing[5]};\n visibility: ${({ isActive }) => (isActive ? 'visible' : 'hidden')};\n animation: ${fadeIn} ${TransitionDuration.Medium} ease-in-out;\n svg {\n width: 14px;\n height: 14px;\n }\n`;\n\nconst StyledCard = styled(Card)`\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 4px;\n animation: ${fadeIn} ${TransitionDuration.Medium} ease-in-out;\n padding: 6px;\n margin: 0;\n`;\n\ninterface HoverCopyableFieldProps {\n copyValue: string | undefined;\n confirmationText?: string;\n children: ReactNode;\n}\n\nconst HoverCopyableField = ({\n copyValue,\n confirmationText = 'Copied',\n children,\n}: HoverCopyableFieldProps) => {\n const [copyButtonActive, { enable: showCopyButton, disable: hideCopyButton }] = useToggle(false);\n const [confirmationActive, { enable: showConfirmation, disable: hideConfirmation }] =\n useToggle(false);\n\n const copyTextToClipboard = async () => {\n if (copyValue == null) {\n return;\n }\n const copyWasSuccessful = await copyToClipboard(copyValue);\n\n if (copyWasSuccessful) {\n showConfirmation();\n setTimeout(() => {\n hideCopyButton();\n hideConfirmation();\n }, 1200);\n }\n };\n\n const copyField = (e: MouseEvent<HTMLButtonElement>) => {\n e.preventDefault();\n e.stopPropagation();\n copyTextToClipboard();\n };\n\n return copyValue != null && copyValue.trim().length > 0 ? (\n <CopyableFieldContainer onMouseEnter={showCopyButton} onMouseLeave={hideCopyButton}>\n {children}\n <Popover open={confirmationActive}>\n <Popover.Anchor asChild>\n <CopyButton\n id='hover-copyable-field__copy-button'\n isActive={copyButtonActive || confirmationActive}\n onClick={copyField}\n >\n <CopyIcon width={16} height={16} />\n </CopyButton>\n </Popover.Anchor>\n <Popover.Content side='top' align='center' style={{ zIndex: 2 }}>\n <StyledCard elevated>\n <Paragraph>{confirmationText}</Paragraph>\n </StyledCard>\n </Popover.Content>\n </Popover>\n </CopyableFieldContainer>\n ) : null;\n};\n\nexport default HoverCopyableField;\n","import HoverCopyableField from './HoverCopyableField';\n\nexport default HoverCopyableField;\n"],"mappings":";;;;;;;;;;;;AAaA,MAAM,kBAAkB,OAAO,SAAmC;AAChE,KAAI;AACF,MAAI,eAAe,WAAW;AAC5B,SAAM,UAAU,UAAU,UAAU,KAAK;AACzC,UAAO;QAEP,QAAO,SAAS,YAAY,QAAQ,MAAM,KAAK;SAE3C;AACN,SAAO;;;AAIX,MAAM,yBAAyB,OAAO,GAAG;;SAEhC,QAAQ,GAAG;;;AAIpB,MAAM,aAAa,OAAO,OAAO,CAAC,aAAa;CAC7C,MAAM;CACN,SAAS;CACT,OAAO;CACR,EAAE;YACS,QAAQ,GAAG;WACZ,QAAQ,GAAG;iBACL,EAAE,eAAgB,WAAW,YAAY,SAAU;eACrD,OAAO,GAAA,QAA6B;;;;;;AAOnD,MAAM,aAAa,OAAOA,aAAK;;;;;eAKhB,OAAO,GAAA,QAA6B;;;;AAWnD,MAAM,sBAAsB,EAC1B,WACA,mBAAmB,UACnB,eAC6B;CAC7B,MAAM,CAAC,kBAAkB,EAAE,QAAQ,gBAAgB,SAAS,oBAAoB,UAAU,MAAM;CAChG,MAAM,CAAC,oBAAoB,EAAE,QAAQ,kBAAkB,SAAS,sBAC9D,UAAU,MAAM;CAElB,MAAM,sBAAsB,YAAY;AACtC,MAAI,aAAa,KACf;AAIF,MAAI,MAF4B,gBAAgB,UAAU,EAEnC;AACrB,qBAAkB;AAClB,oBAAiB;AACf,oBAAgB;AAChB,sBAAkB;MACjB,KAAK;;;CAIZ,MAAM,aAAa,MAAqC;AACtD,IAAE,gBAAgB;AAClB,IAAE,iBAAiB;AACnB,uBAAqB;;AAGvB,QAAO,aAAa,QAAQ,UAAU,MAAM,CAAC,SAAS,IACpD,qBAAC,wBAAD;EAAwB,cAAc;EAAgB,cAAc;YAApE,CACG,UACD,qBAACC,iBAAD;GAAS,MAAM;aAAf,CACE,oBAACA,gBAAQ,QAAT;IAAgB,SAAA;cACd,oBAAC,YAAD;KACE,IAAG;KACH,UAAU,oBAAoB;KAC9B,SAAS;eAET,oBAAC,UAAD;MAAU,OAAO;MAAI,QAAQ;MAAM,CAAA;KACxB,CAAA;IACE,CAAA,EACjB,oBAACA,gBAAQ,SAAT;IAAiB,MAAK;IAAM,OAAM;IAAS,OAAO,EAAE,QAAQ,GAAG;cAC7D,oBAAC,YAAD;KAAY,UAAA;eACV,oBAAC,WAAD,EAAA,UAAY,kBAA6B,CAAA;KAC9B,CAAA;IACG,CAAA,CACV;KACa;MACvB;;;;AC/GN,IAAA,6BAAe"}
1
+ {"version":3,"file":"HoverCopyableField-ClXBg_ld.mjs","names":["Card","Popover"],"sources":["../components/HoverCopyableField/HoverCopyableField.tsx","../components/HoverCopyableField/index.ts"],"sourcesContent":["import type { MouseEvent, ReactNode } from 'react';\nimport styled from 'styled-components';\n\nimport { Spacing } from '@persona/design-tokens';\nimport { CopyIcon } from '@persona/icons';\nimport Button from 'design-system/components/Button';\nimport Card from 'design-system/components/Card';\nimport Popover from 'design-system/components/Popover';\nimport { Paragraph } from 'design-system/components/Text';\nimport useToggle from 'design-system/lib/useToggle';\nimport { fadeIn } from 'design-system/variables/keyframes';\nimport { TransitionDuration } from 'design-system/variables/transitions';\n\nconst copyToClipboard = async (text: string): Promise<boolean> => {\n try {\n if ('clipboard' in navigator) {\n await navigator.clipboard.writeText(text);\n return true;\n } else {\n return document.execCommand('copy', true, text);\n }\n } catch {\n return false;\n }\n};\n\nconst CopyableFieldContainer = styled.div`\n display: flex;\n gap: ${Spacing[1]};\n align-items: center;\n`;\n\nconst CopyButton = styled(Button).attrs(() => ({\n type: 'button',\n variant: 'inverse',\n width: 'icon',\n}))<{ isActive: boolean }>`\n height: ${Spacing[5]};\n width: ${Spacing[5]};\n visibility: ${({ isActive }) => (isActive ? 'visible' : 'hidden')};\n animation: ${fadeIn} ${TransitionDuration.Medium} ease-in-out;\n svg {\n width: 14px;\n height: 14px;\n }\n`;\n\nconst StyledCard = styled(Card)`\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 4px;\n animation: ${fadeIn} ${TransitionDuration.Medium} ease-in-out;\n padding: 6px;\n margin: 0;\n`;\n\ninterface HoverCopyableFieldProps {\n copyValue: string | undefined;\n confirmationText?: string;\n children: ReactNode;\n}\n\nconst HoverCopyableField = ({\n copyValue,\n confirmationText = 'Copied',\n children,\n}: HoverCopyableFieldProps) => {\n const [copyButtonActive, { enable: showCopyButton, disable: hideCopyButton }] = useToggle(false);\n const [confirmationActive, { enable: showConfirmation, disable: hideConfirmation }] =\n useToggle(false);\n\n const copyTextToClipboard = async () => {\n if (copyValue == null) {\n return;\n }\n const copyWasSuccessful = await copyToClipboard(copyValue);\n\n if (copyWasSuccessful) {\n showConfirmation();\n setTimeout(() => {\n hideCopyButton();\n hideConfirmation();\n }, 1200);\n }\n };\n\n const copyField = (e: MouseEvent<HTMLButtonElement>) => {\n e.preventDefault();\n e.stopPropagation();\n copyTextToClipboard();\n };\n\n return copyValue != null && copyValue.trim().length > 0 ? (\n <CopyableFieldContainer onMouseEnter={showCopyButton} onMouseLeave={hideCopyButton}>\n {children}\n <Popover open={confirmationActive}>\n <Popover.Anchor asChild>\n <CopyButton\n id='hover-copyable-field__copy-button'\n isActive={copyButtonActive || confirmationActive}\n onClick={copyField}\n >\n <CopyIcon width={16} height={16} />\n </CopyButton>\n </Popover.Anchor>\n <Popover.Content side='top' align='center' style={{ zIndex: 2 }}>\n <StyledCard elevated>\n <Paragraph>{confirmationText}</Paragraph>\n </StyledCard>\n </Popover.Content>\n </Popover>\n </CopyableFieldContainer>\n ) : null;\n};\n\nexport default HoverCopyableField;\n","import HoverCopyableField from './HoverCopyableField';\n\nexport default HoverCopyableField;\n"],"mappings":";;;;;;;;;;;;AAaA,MAAM,kBAAkB,OAAO,SAAmC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IACE,CAAA,EACjB,oBAACA,gBAAQ,SAAT;IAAiB,MAAK;IAAM,OAAM;IAAS,OAAO,EAAE,QAAQ,GAAG;cAC7D,oBAAC,YAAD;KAAY,UAAA;eACV,oBAAC,WAAD,EAAA,UAAY,kBAA6B,CAAA;KAC9B,CAAA;IACG,CAAA,CACV;KACa;MACvB;;;;AC/GN,IAAA,6BAAe"}
@@ -1,5 +1,5 @@
1
- import { ReactNode } from "react";
2
1
  import * as _$react_jsx_runtime0 from "react/jsx-runtime";
2
+ import { ReactNode } from "react";
3
3
 
4
4
  //#region components/HoverCopyableField/HoverCopyableField.d.ts
5
5
  interface HoverCopyableFieldProps {
@@ -1,4 +1,4 @@
1
- import { r as ButtonProps } from "./Button-DXsYU5qU.mjs";
1
+ import { r as ButtonProps } from "./Button-9p469xA1.mjs";
2
2
  import * as _$react from "react";
3
3
 
4
4
  //#region components/Button/IconButton.d.ts
@@ -21,4 +21,4 @@ interface IconButtonProps extends Omit<ButtonProps, 'width' | 'prefixIcon' | 'pr
21
21
  declare const IconButton: _$react.ForwardRefExoticComponent<Omit<IconButtonProps, "ref"> & _$react.RefAttributes<HTMLButtonElement>>;
22
22
  //#endregion
23
23
  export { IconButtonProps as n, IconButton as t };
24
- //# sourceMappingURL=IconButton-Dnnlf9uO.d.mts.map
24
+ //# sourceMappingURL=IconButton-BSES_-6g.d.mts.map
@@ -3,14 +3,14 @@ import { focusOutlineControlled } from "./mixins/focus.mjs";
3
3
  import "./variables/transitions.mjs";
4
4
  import { printMixins } from "./mixins/print/index.mjs";
5
5
  import { paragraphMixins } from "./mixins/text.mjs";
6
- import { t as useToggle } from "./useToggle-3k3EkV8V.mjs";
7
6
  import { rotate } from "./variables/keyframes.mjs";
7
+ import { t as useToggle } from "./useToggle-Bo3yd14Y.mjs";
8
8
  import { BorderRadius, Color, Spacing } from "@persona/design-tokens";
9
9
  import styled, { css } from "styled-components";
10
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
11
+ import { Link } from "react-router-dom";
10
12
  import { forwardRef, useCallback } from "react";
11
- import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
12
13
  import { LoaderIcon } from "@persona/icons";
13
- import { Link } from "react-router-dom";
14
14
  import { isEmpty, isFunction } from "lodash/fp.js";
15
15
  //#region components/Button/Button.tsx
16
16
  const noop = () => void 0;
@@ -284,7 +284,7 @@ const Button = forwardRef(function Button({ id, children, prefixIcon, suffixIcon
284
284
  }), /* @__PURE__ */ jsxs(ButtonChildren, {
285
285
  isPending: loading,
286
286
  children: [
287
- prefixIcon != null && /* @__PURE__ */ jsxs(Fragment$1, { children: [prefixIconType === "basic" && /* @__PURE__ */ jsx(PrefixIconContainer, { children: prefixIcon }), prefixIconType === "inherit" && /* @__PURE__ */ jsx(InheritPrefixIconContainer, { children: prefixIcon })] }),
287
+ prefixIcon != null && /* @__PURE__ */ jsxs(Fragment, { children: [prefixIconType === "basic" && /* @__PURE__ */ jsx(PrefixIconContainer, { children: prefixIcon }), prefixIconType === "inherit" && /* @__PURE__ */ jsx(InheritPrefixIconContainer, { children: prefixIcon })] }),
288
288
  children && /* @__PURE__ */ jsx(ButtonText, {
289
289
  width,
290
290
  size,
@@ -338,4 +338,4 @@ const IconButton = forwardRef(function IconButton({ size = "xs", ...props }, ref
338
338
  //#endregion
339
339
  export { SuffixIconContainer as a, StyledButton as i, Button as n, ButtonChildren as r, IconButton as t };
340
340
 
341
- //# sourceMappingURL=IconButton-DC4rh6ow.mjs.map
341
+ //# sourceMappingURL=IconButton-CIWiEsS-.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"IconButton-DC4rh6ow.mjs","names":[],"sources":["../components/Button/Button.tsx","../components/Button/IconButton.tsx"],"sourcesContent":["import { isEmpty, isFunction } from 'lodash/fp';\nimport {\n type ComponentPropsWithoutRef,\n forwardRef,\n type MouseEvent,\n type ReactNode,\n type Ref,\n useCallback,\n} from 'react';\nimport { Link, type LinkProps } from 'react-router-dom';\nimport styled, {\n css,\n type DefaultTheme,\n type FlattenInterpolation,\n type ThemeProps,\n} from 'styled-components';\n\nimport { Color, Spacing } from '@persona/design-tokens';\nimport { LoaderIcon } from '@persona/icons';\nimport { isDisabled, isHovered, isNotDisabled } from 'design-system/lib/pseudoClass';\nimport useToggle from 'design-system/lib/useToggle';\nimport { focusOutlineControlled } from 'design-system/mixins/focus';\nimport { printMixins } from 'design-system/mixins/print';\nimport { paragraphMixins } from 'design-system/mixins/text';\nimport type PseudoClassProps from 'design-system/types/PseudoClassProps';\nimport { rotate } from 'design-system/variables/keyframes';\nimport { TransitionDuration } from 'design-system/variables/transitions';\n\nconst noop = (): void => undefined;\n\n// TODO(joseph): Bring this fix back to pseudoClass\nconst isActive = ({ active }: PseudoClassProps) => (active ? '' : ':active:enabled');\n\n/* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\nconst sizeStyles: Record<ButtonProps['size'], FlattenInterpolation<ThemeProps<DefaultTheme>>> = {\n md: css`\n ${paragraphMixins.md}\n height: ${({ theme }) => theme.button.height.md};\n padding: ${Spacing[2]};\n svg {\n height: 16px;\n width: 16px;\n }\n `,\n sm: css`\n ${paragraphMixins.sm}\n height: ${({ theme }) => theme.button.height.sm};\n padding: ${Spacing[1]} 6px;\n svg {\n height: 16px;\n width: 16px;\n }\n `,\n};\n\n/* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\nconst widthStyles: Record<ButtonProps['width'], FlattenInterpolation<ThemeProps<DefaultTheme>>> = {\n full: css`\n width: 100%;\n `,\n auto: css`\n width: auto;\n `,\n // TODO: rename this prop to 'element' as a standard unresponsive element width\n button: css`\n width: ${({ theme }) => theme.element.width.md};\n `,\n icon: css<ButtonProps>`\n width: ${({ theme, size }) => {\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n return theme.button.height[size];\n }};\n padding: 0;\n flex: none;\n `,\n};\n\ninterface ButtonPropsWithTransientProps extends Omit<ButtonProps, 'isPending'> {\n $isPending: boolean;\n $onSecondaryBackground?: boolean;\n}\n\nexport const StyledButton = styled.button.attrs<ButtonPropsWithTransientProps>(({ to, target }) => {\n if (isEmpty(to)) {\n return 'button';\n } else if (typeof to === 'string' && to.startsWith('https://')) {\n return {\n as: 'a',\n href: to,\n target: target ?? '_blank',\n rel: 'noreferrer',\n };\n } else {\n return {\n as: Link,\n };\n }\n})<ButtonPropsWithTransientProps>`\n cursor: pointer;\n border: none;\n box-sizing: border-box;\n white-space: nowrap;\n ${({ theme, variant }) => {\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n const palette = theme.color.variants[variant] as any;\n return css`\n &:disabled {\n background-color: ${palette.disabled};\n color: ${palette.textDisabled};\n svg path {\n stroke: ${palette.textDisabled};\n }\n\n /* For backwards compatibility with current coloring scheme (targeting stroke property) */\n svg.pds-icon {\n path {\n stroke: unset;\n }\n\n /* Support icons with stroke */\n path[stroke] {\n stroke: currentColor;\n }\n }\n\n user-select: none;\n }\n `;\n }}\n\n ${({ variant }) =>\n variant === 'outline' &&\n css`\n border: 1px solid ${({ theme }) => theme.color.border.input};\n `}\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n /* To properly position loading spinner */\n position: relative;\n\n border-radius: ${({ theme }) => theme.button.borderRadius};\n\n transition-duration: ${TransitionDuration.Fast};\n transition-property: background-color, color, border-color, width, height;\n\n ${({ size }) => {\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n return sizeStyles[size];\n }}\n ${({ width }) => {\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n return widthStyles[width];\n }}\n\n /* Variant styling */\n ${({ theme, variant, $isPending, $onSecondaryBackground }) => {\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n let palette = theme.color.variants[variant] as any;\n\n if (variant === 'basic' && $onSecondaryBackground) {\n palette = {\n ...palette,\n // eslint-disable-next-line rulesdir/no-core-color-tokens\n default: Color.CoreSlate300,\n // eslint-disable-next-line rulesdir/no-core-color-tokens\n hover: Color.CoreSlate400,\n // eslint-disable-next-line rulesdir/no-core-color-tokens\n active: Color.CoreSlate400,\n // eslint-disable-next-line rulesdir/no-core-color-tokens\n disabled: Color.CoreSlate100,\n };\n }\n\n return css`\n background-color: ${palette.default};\n color: ${palette.text};\n svg path {\n stroke: ${palette.text};\n }\n\n svg.pds-icon {\n path {\n stroke: unset;\n }\n\n path[stroke] {\n stroke: currentColor;\n }\n }\n\n &${isHovered}${isNotDisabled} {\n background-color: ${palette.hover};\n }\n\n &${isDisabled} {\n cursor: not-allowed;\n }\n\n &${isActive} {\n background-color: ${palette.active};\n }\n\n ${focusOutlineControlled}\n\n ${\n $isPending &&\n css`\n cursor: default;\n background-color: ${palette.active};\n &:disabled {\n background-color: ${({ theme }) => {\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n return theme.color.variants[variant].active;\n }};\n user-select: none;\n }\n\n svg path {\n stroke: ${palette.highlightDark};\n }\n\n // For backwards compatibility with current coloring scheme (targeting stroke property)\n svg.pds-icon {\n path {\n stroke: unset;\n }\n\n path[stroke] {\n stroke: currentColor;\n }\n }\n `\n }\n `;\n }}\n\n\n ${printMixins.hide}\n`;\n\ntype WithPendingProps = Pick<ButtonProps, 'isPending'>;\n\nconst LoaderContainer = styled.div<WithPendingProps>`\n position: absolute;\n height: 100%;\n width: 100%;\n top: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: opacity 2s;\n opacity: ${({ isPending }) => (isPending ? '1' : '0')};\n`;\n\nconst Loader = styled(LoaderIcon)`\n animation: ${rotate} linear 1s infinite;\n`;\n\nexport const ButtonChildren = styled('div').attrs(({ isPending }: WithPendingProps) => ({\n ['aria-hidden']: isPending,\n}))<WithPendingProps>`\n width: 100%;\n display: flex;\n flex-wrap: nowrap;\n align-items: center;\n justify-content: center;\n transition: opacity ${TransitionDuration.Fast};\n opacity: ${({ isPending }) => (isPending ? '0' : '1')};\n gap: ${Spacing[1]};\n`;\n\nconst PrefixIconContainer = styled.div`\n display: flex;\n align-items: center;\n`;\n\nconst InheritPrefixIconContainer = styled.div`\n display: flex;\n align-items: center;\n\n & svg {\n width: inherit;\n height: inherit;\n }\n`;\n\nexport const SuffixIconContainer = styled(PrefixIconContainer)`\n margin-right: 0;\n flex-grow: 1;\n justify-content: flex-end;\n`;\n\nconst ButtonText = styled.span<{ size: 'md' | 'sm'; width: 'full' | 'auto' | 'button' | 'icon' }>`\n position: relative;\n\n /* Needed to align for browsers that don't support text-box yet\n (which at this time, is firefox, and opera, and a few niche browsers)\n This checks firefox. Otherwise, it will default back to the original\n which is a slightly misaligned button\n */\n\n /* Was trying to use this with @supports not, but genuinely could not figure out why this wouldn't\n work */\n\n line-height: ${({ width }) => (width === 'icon' ? '0' : 'inherit')};\n @-moz-document url-prefix() {\n top: ${({ size }) => (size === 'md' ? '1px' : '0.5px')};\n }\n\n @supports (text-box: cap alphabetic) {\n text-box: ${({ width }) => (width === 'icon' ? 'normal' : 'cap alphabetic')};\n }\n`;\n\ntype MaybePromise =\n | ((e: MouseEvent<HTMLButtonElement>) => void)\n | ((e: MouseEvent<HTMLButtonElement>) => Promise<void>);\n\nexport interface ButtonProps\n extends ComponentPropsWithoutRef<'button'>, Omit<PseudoClassProps, 'checked'> {\n /**\n * Visual style of the button.\n *\n * - `primary` – filled brand colour, for the primary action on a surface.\n * - `basic` – subtle grey fill, for secondary actions.\n * - `outline` – transparent with a border, alternative secondary style.\n * - `text` – no background or border, for tertiary / inline actions.\n * - `inverse` – inverted fill for use on dark/coloured backgrounds.\n * - `danger` – red fill, for destructive actions.\n *\n * @defaultValue 'primary'\n */\n variant?: 'basic' | 'primary' | 'inverse' | 'danger' | 'text' | 'outline';\n /**\n * Shows a loading spinner and disables the button. Also triggers automatically\n * when `onClick` returns a Promise, clearing once the promise settles.\n */\n isPending?: boolean;\n /**\n * Icon rendered to the left of the button label.\n * Import from `@persona-id/icons`.\n */\n prefixIcon?: ReactNode;\n /**\n * Controls how the prefix icon inherits sizing.\n *\n * - `basic` – icon is rendered inside a fixed-size container.\n * - `inherit` – icon stretches to fill the surrounding element's dimensions.\n *\n * @defaultValue 'basic'\n */\n prefixIconType?: 'basic' | 'inherit';\n\n /**\n * Icon rendered to the right of the button label.\n * Import from `@persona-id/icons`.\n */\n suffixIcon?: ReactNode;\n\n /**\n * Height and typography scale of the button.\n *\n * @defaultValue 'md'\n */\n size?: 'md' | 'sm';\n\n /**\n * Changes the button into a link.\n * Pass a relative path to use `react-router-dom` `<Link>`, or an absolute\n * `https://` URL to render an `<a>` tag that opens in a new tab.\n */\n to?: LinkProps['to'];\n\n /**\n * Overrides the target of the link if `to` is provided and is an external link.\n */\n target?: LinkProps['target'];\n\n /**\n * Note: we may want to default this to 'button' in the future, but many instances of this Button component\n * in dashboard currently rely on the default 'submit' behavior that occurs when using this in redux-form\n * so we'll have to comb through and manually add the type='submit' prop.\n */\n type?: 'button' | 'reset' | 'submit';\n /**\n * Controls the width of the button.\n *\n * - `full` – stretches to fill its container (`width: 100%`).\n * - `auto` – shrinks to fit its content.\n * - `button` – a fixed medium element width (from design tokens).\n * - `icon` – square, sized to match the button height; use for icon-only buttons.\n *\n * @defaultValue 'full'\n */\n width?: 'full' | 'auto' | 'button' | 'icon';\n onClick?: MaybePromise;\n ref?: Ref<HTMLButtonElement>;\n\n /**\n * In some cases we render a button on a secondary background, which needs an adjustment\n * for certain variants.\n */\n onSecondaryBackground?: boolean;\n}\n\nconst Button = forwardRef<HTMLButtonElement, ButtonProps>(function Button(\n {\n id,\n children,\n prefixIcon,\n suffixIcon,\n disabled,\n isPending,\n type = 'button',\n prefixIconType = 'basic',\n variant = 'primary',\n size = 'md',\n width = 'full',\n onClick,\n onSecondaryBackground,\n ...props\n }: ButtonProps,\n ref,\n) {\n const [isResolving, { enable, disable }] = useToggle(false);\n const innerOnClick: MaybePromise = isFunction(onClick) ? onClick : noop;\n const loading = isPending || isResolving;\n\n const handleClick = useCallback(\n async (e: MouseEvent<HTMLButtonElement>) => {\n if (loading) {\n return;\n }\n\n const maybePromise = innerOnClick(e);\n\n if (maybePromise instanceof Promise) {\n enable();\n await maybePromise;\n disable();\n }\n },\n [loading, innerOnClick],\n );\n\n return (\n <StyledButton\n id={id}\n type={type}\n data-test={'button__' + variant}\n variant={variant}\n size={size}\n width={width}\n disabled={disabled || loading}\n $isPending={loading}\n $onSecondaryBackground={onSecondaryBackground}\n {...props}\n onClick={handleClick}\n ref={ref}\n >\n {loading && (\n <LoaderContainer isPending={loading}>\n <Loader aria-label={`Loading ${props['aria-label'] || ''}`} />\n </LoaderContainer>\n )}\n <ButtonChildren isPending={loading}>\n {prefixIcon != null && (\n <>\n {prefixIconType === 'basic' && <PrefixIconContainer>{prefixIcon}</PrefixIconContainer>}\n {prefixIconType === 'inherit' && (\n <InheritPrefixIconContainer>{prefixIcon}</InheritPrefixIconContainer>\n )}\n </>\n )}\n {children && (\n <ButtonText width={width} size={size}>\n {children}\n </ButtonText>\n )}\n {suffixIcon != null && <SuffixIconContainer>{suffixIcon}</SuffixIconContainer>}\n </ButtonChildren>\n </StyledButton>\n );\n});\n\nexport default Button;\n","import { forwardRef } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { BorderRadius } from '@persona/design-tokens';\n\nimport Button, { type ButtonProps } from './Button';\n\nconst BUTTON_SIZE_MAP = {\n xs: '16px',\n sm: '24px',\n md: '32px',\n};\n\nconst ICON_SIZE_MAP = {\n xs: '12px',\n sm: '16px',\n md: '16px',\n};\n\ntype IconBtnSize = keyof typeof BUTTON_SIZE_MAP;\n\nconst IconBtn = styled(Button).attrs({\n width: 'icon',\n variant: 'basic',\n})`\n background-color: transparent;\n padding: 0;\n border-radius: ${BorderRadius.Md};\n\n ${({ size }) => css`\n height: ${BUTTON_SIZE_MAP[size as IconBtnSize]};\n width: ${BUTTON_SIZE_MAP[size as IconBtnSize]};\n\n svg {\n width: ${ICON_SIZE_MAP[size as IconBtnSize]};\n height: ${ICON_SIZE_MAP[size as IconBtnSize]};\n }\n `}\n`;\n\nexport interface IconButtonProps extends Omit<\n ButtonProps,\n 'width' | 'prefixIcon' | 'prefixIconType' | 'suffixIcon' | 'variant' | 'size'\n> {\n /**\n * `xs` - 16px. `sm` - 24px. `md` - 32px.\n * Pair with a PDS icon in the prescribed size.\n */\n size?: IconBtnSize;\n}\n\n/**\n * Use to render icon-only buttons. Ensure buttons have proper aria properties.\n */\nconst IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(function IconButton(\n { size = 'xs', ...props },\n ref,\n) {\n return <IconBtn size={size as ButtonProps['size']} ref={ref} {...props} />;\n});\n\nexport default IconButton;\n"],"mappings":";;;;;;;;;;;;;;;AA4BA,MAAM,aAAmB,KAAA;AAGzB,MAAM,YAAY,EAAE,aAAgC,SAAS,KAAK;AAGlE,MAAM,aAA0F;CAC9F,IAAI,GAAG;MACH,gBAAgB,GAAG;eACV,EAAE,YAAY,MAAM,OAAO,OAAO,GAAG;eACrC,QAAQ,GAAG;;;;;;CAMxB,IAAI,GAAG;MACH,gBAAgB,GAAG;eACV,EAAE,YAAY,MAAM,OAAO,OAAO,GAAG;eACrC,QAAQ,GAAG;;;;;;CAMzB;AAGD,MAAM,cAA4F;CAChG,MAAM,GAAG;;;CAGT,MAAM,GAAG;;;CAIT,QAAQ,GAAG;cACC,EAAE,YAAY,MAAM,QAAQ,MAAM,GAAG;;CAEjD,MAAM,GAAgB;cACV,EAAE,OAAO,WAAW;AAE5B,SAAO,MAAM,OAAO,OAAO;GAC3B;;;;CAIL;AAOD,MAAa,eAAe,OAAO,OAAO,OAAsC,EAAE,IAAI,aAAa;AACjG,KAAI,QAAQ,GAAG,CACb,QAAO;UACE,OAAO,OAAO,YAAY,GAAG,WAAW,WAAW,CAC5D,QAAO;EACL,IAAI;EACJ,MAAM;EACN,QAAQ,UAAU;EAClB,KAAK;EACN;KAED,QAAO,EACL,IAAI,MACL;EAEH;;;;;KAKG,EAAE,OAAO,cAAc;CAExB,MAAM,UAAU,MAAM,MAAM,SAAS;AACrC,QAAO,GAAG;;4BAEc,QAAQ,SAAS;iBAC5B,QAAQ,aAAa;;oBAElB,QAAQ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AEd,cAAc,QAAQ,oBAAC,qBAAD,EAAA,UAAsB,YAAiC,CAAA;IAC/D;KACJ;;EAEjB;;;AC/dF,MAAM,kBAAkB;CACtB,IAAI;CACJ,IAAI;CACJ,IAAI;CACL;AAED,MAAM,gBAAgB;CACpB,IAAI;CACJ,IAAI;CACJ,IAAI;CACL;AAID,MAAM,UAAU,OAAO,OAAO,CAAC,MAAM;CACnC,OAAO;CACP,SAAS;CACV,CAAC;;;mBAGiB,aAAa,GAAG;;KAE9B,EAAE,WAAW,GAAG;cACP,gBAAgB,MAAqB;aACtC,gBAAgB,MAAqB;;;eAGnC,cAAc,MAAqB;gBAClC,cAAc,MAAqB;;IAE/C;;;;;AAiBJ,MAAM,aAAa,WAA+C,SAAS,WACzE,EAAE,OAAO,MAAM,GAAG,SAClB,KACA;AACA,QAAO,oBAAC,SAAD;EAAe;EAAkC;EAAK,GAAI;EAAS,CAAA;EAC1E"}
1
+ {"version":3,"file":"IconButton-CIWiEsS-.mjs","names":[],"sources":["../components/Button/Button.tsx","../components/Button/IconButton.tsx"],"sourcesContent":["import { isEmpty, isFunction } from 'lodash/fp';\nimport {\n type ComponentPropsWithoutRef,\n forwardRef,\n type MouseEvent,\n type ReactNode,\n type Ref,\n useCallback,\n} from 'react';\nimport { Link, type LinkProps } from 'react-router-dom';\nimport styled, {\n css,\n type DefaultTheme,\n type FlattenInterpolation,\n type ThemeProps,\n} from 'styled-components';\n\nimport { Color, Spacing } from '@persona/design-tokens';\nimport { LoaderIcon } from '@persona/icons';\nimport { isDisabled, isHovered, isNotDisabled } from 'design-system/lib/pseudoClass';\nimport useToggle from 'design-system/lib/useToggle';\nimport { focusOutlineControlled } from 'design-system/mixins/focus';\nimport { printMixins } from 'design-system/mixins/print';\nimport { paragraphMixins } from 'design-system/mixins/text';\nimport type PseudoClassProps from 'design-system/types/PseudoClassProps';\nimport { rotate } from 'design-system/variables/keyframes';\nimport { TransitionDuration } from 'design-system/variables/transitions';\n\nconst noop = (): void => undefined;\n\n// TODO(joseph): Bring this fix back to pseudoClass\nconst isActive = ({ active }: PseudoClassProps) => (active ? '' : ':active:enabled');\n\n/* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\nconst sizeStyles: Record<ButtonProps['size'], FlattenInterpolation<ThemeProps<DefaultTheme>>> = {\n md: css`\n ${paragraphMixins.md}\n height: ${({ theme }) => theme.button.height.md};\n padding: ${Spacing[2]};\n svg {\n height: 16px;\n width: 16px;\n }\n `,\n sm: css`\n ${paragraphMixins.sm}\n height: ${({ theme }) => theme.button.height.sm};\n padding: ${Spacing[1]} 6px;\n svg {\n height: 16px;\n width: 16px;\n }\n `,\n};\n\n/* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\nconst widthStyles: Record<ButtonProps['width'], FlattenInterpolation<ThemeProps<DefaultTheme>>> = {\n full: css`\n width: 100%;\n `,\n auto: css`\n width: auto;\n `,\n // TODO: rename this prop to 'element' as a standard unresponsive element width\n button: css`\n width: ${({ theme }) => theme.element.width.md};\n `,\n icon: css<ButtonProps>`\n width: ${({ theme, size }) => {\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n return theme.button.height[size];\n }};\n padding: 0;\n flex: none;\n `,\n};\n\ninterface ButtonPropsWithTransientProps extends Omit<ButtonProps, 'isPending'> {\n $isPending: boolean;\n $onSecondaryBackground?: boolean;\n}\n\nexport const StyledButton = styled.button.attrs<ButtonPropsWithTransientProps>(({ to, target }) => {\n if (isEmpty(to)) {\n return 'button';\n } else if (typeof to === 'string' && to.startsWith('https://')) {\n return {\n as: 'a',\n href: to,\n target: target ?? '_blank',\n rel: 'noreferrer',\n };\n } else {\n return {\n as: Link,\n };\n }\n})<ButtonPropsWithTransientProps>`\n cursor: pointer;\n border: none;\n box-sizing: border-box;\n white-space: nowrap;\n ${({ theme, variant }) => {\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n const palette = theme.color.variants[variant] as any;\n return css`\n &:disabled {\n background-color: ${palette.disabled};\n color: ${palette.textDisabled};\n svg path {\n stroke: ${palette.textDisabled};\n }\n\n /* For backwards compatibility with current coloring scheme (targeting stroke property) */\n svg.pds-icon {\n path {\n stroke: unset;\n }\n\n /* Support icons with stroke */\n path[stroke] {\n stroke: currentColor;\n }\n }\n\n user-select: none;\n }\n `;\n }}\n\n ${({ variant }) =>\n variant === 'outline' &&\n css`\n border: 1px solid ${({ theme }) => theme.color.border.input};\n `}\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n /* To properly position loading spinner */\n position: relative;\n\n border-radius: ${({ theme }) => theme.button.borderRadius};\n\n transition-duration: ${TransitionDuration.Fast};\n transition-property: background-color, color, border-color, width, height;\n\n ${({ size }) => {\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n return sizeStyles[size];\n }}\n ${({ width }) => {\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n return widthStyles[width];\n }}\n\n /* Variant styling */\n ${({ theme, variant, $isPending, $onSecondaryBackground }) => {\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n let palette = theme.color.variants[variant] as any;\n\n if (variant === 'basic' && $onSecondaryBackground) {\n palette = {\n ...palette,\n // eslint-disable-next-line rulesdir/no-core-color-tokens\n default: Color.CoreSlate300,\n // eslint-disable-next-line rulesdir/no-core-color-tokens\n hover: Color.CoreSlate400,\n // eslint-disable-next-line rulesdir/no-core-color-tokens\n active: Color.CoreSlate400,\n // eslint-disable-next-line rulesdir/no-core-color-tokens\n disabled: Color.CoreSlate100,\n };\n }\n\n return css`\n background-color: ${palette.default};\n color: ${palette.text};\n svg path {\n stroke: ${palette.text};\n }\n\n svg.pds-icon {\n path {\n stroke: unset;\n }\n\n path[stroke] {\n stroke: currentColor;\n }\n }\n\n &${isHovered}${isNotDisabled} {\n background-color: ${palette.hover};\n }\n\n &${isDisabled} {\n cursor: not-allowed;\n }\n\n &${isActive} {\n background-color: ${palette.active};\n }\n\n ${focusOutlineControlled}\n\n ${\n $isPending &&\n css`\n cursor: default;\n background-color: ${palette.active};\n &:disabled {\n background-color: ${({ theme }) => {\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n return theme.color.variants[variant].active;\n }};\n user-select: none;\n }\n\n svg path {\n stroke: ${palette.highlightDark};\n }\n\n // For backwards compatibility with current coloring scheme (targeting stroke property)\n svg.pds-icon {\n path {\n stroke: unset;\n }\n\n path[stroke] {\n stroke: currentColor;\n }\n }\n `\n }\n `;\n }}\n\n\n ${printMixins.hide}\n`;\n\ntype WithPendingProps = Pick<ButtonProps, 'isPending'>;\n\nconst LoaderContainer = styled.div<WithPendingProps>`\n position: absolute;\n height: 100%;\n width: 100%;\n top: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: opacity 2s;\n opacity: ${({ isPending }) => (isPending ? '1' : '0')};\n`;\n\nconst Loader = styled(LoaderIcon)`\n animation: ${rotate} linear 1s infinite;\n`;\n\nexport const ButtonChildren = styled('div').attrs(({ isPending }: WithPendingProps) => ({\n ['aria-hidden']: isPending,\n}))<WithPendingProps>`\n width: 100%;\n display: flex;\n flex-wrap: nowrap;\n align-items: center;\n justify-content: center;\n transition: opacity ${TransitionDuration.Fast};\n opacity: ${({ isPending }) => (isPending ? '0' : '1')};\n gap: ${Spacing[1]};\n`;\n\nconst PrefixIconContainer = styled.div`\n display: flex;\n align-items: center;\n`;\n\nconst InheritPrefixIconContainer = styled.div`\n display: flex;\n align-items: center;\n\n & svg {\n width: inherit;\n height: inherit;\n }\n`;\n\nexport const SuffixIconContainer = styled(PrefixIconContainer)`\n margin-right: 0;\n flex-grow: 1;\n justify-content: flex-end;\n`;\n\nconst ButtonText = styled.span<{ size: 'md' | 'sm'; width: 'full' | 'auto' | 'button' | 'icon' }>`\n position: relative;\n\n /* Needed to align for browsers that don't support text-box yet\n (which at this time, is firefox, and opera, and a few niche browsers)\n This checks firefox. Otherwise, it will default back to the original\n which is a slightly misaligned button\n */\n\n /* Was trying to use this with @supports not, but genuinely could not figure out why this wouldn't\n work */\n\n line-height: ${({ width }) => (width === 'icon' ? '0' : 'inherit')};\n @-moz-document url-prefix() {\n top: ${({ size }) => (size === 'md' ? '1px' : '0.5px')};\n }\n\n @supports (text-box: cap alphabetic) {\n text-box: ${({ width }) => (width === 'icon' ? 'normal' : 'cap alphabetic')};\n }\n`;\n\ntype MaybePromise =\n | ((e: MouseEvent<HTMLButtonElement>) => void)\n | ((e: MouseEvent<HTMLButtonElement>) => Promise<void>);\n\nexport interface ButtonProps\n extends ComponentPropsWithoutRef<'button'>, Omit<PseudoClassProps, 'checked'> {\n /**\n * Visual style of the button.\n *\n * - `primary` – filled brand colour, for the primary action on a surface.\n * - `basic` – subtle grey fill, for secondary actions.\n * - `outline` – transparent with a border, alternative secondary style.\n * - `text` – no background or border, for tertiary / inline actions.\n * - `inverse` – inverted fill for use on dark/coloured backgrounds.\n * - `danger` – red fill, for destructive actions.\n *\n * @defaultValue 'primary'\n */\n variant?: 'basic' | 'primary' | 'inverse' | 'danger' | 'text' | 'outline';\n /**\n * Shows a loading spinner and disables the button. Also triggers automatically\n * when `onClick` returns a Promise, clearing once the promise settles.\n */\n isPending?: boolean;\n /**\n * Icon rendered to the left of the button label.\n * Import from `@persona-id/icons`.\n */\n prefixIcon?: ReactNode;\n /**\n * Controls how the prefix icon inherits sizing.\n *\n * - `basic` – icon is rendered inside a fixed-size container.\n * - `inherit` – icon stretches to fill the surrounding element's dimensions.\n *\n * @defaultValue 'basic'\n */\n prefixIconType?: 'basic' | 'inherit';\n\n /**\n * Icon rendered to the right of the button label.\n * Import from `@persona-id/icons`.\n */\n suffixIcon?: ReactNode;\n\n /**\n * Height and typography scale of the button.\n *\n * @defaultValue 'md'\n */\n size?: 'md' | 'sm';\n\n /**\n * Changes the button into a link.\n * Pass a relative path to use `react-router-dom` `<Link>`, or an absolute\n * `https://` URL to render an `<a>` tag that opens in a new tab.\n */\n to?: LinkProps['to'];\n\n /**\n * Overrides the target of the link if `to` is provided and is an external link.\n */\n target?: LinkProps['target'];\n\n /**\n * Note: we may want to default this to 'button' in the future, but many instances of this Button component\n * in dashboard currently rely on the default 'submit' behavior that occurs when using this in redux-form\n * so we'll have to comb through and manually add the type='submit' prop.\n */\n type?: 'button' | 'reset' | 'submit';\n /**\n * Controls the width of the button.\n *\n * - `full` – stretches to fill its container (`width: 100%`).\n * - `auto` – shrinks to fit its content.\n * - `button` – a fixed medium element width (from design tokens).\n * - `icon` – square, sized to match the button height; use for icon-only buttons.\n *\n * @defaultValue 'full'\n */\n width?: 'full' | 'auto' | 'button' | 'icon';\n onClick?: MaybePromise;\n ref?: Ref<HTMLButtonElement>;\n\n /**\n * In some cases we render a button on a secondary background, which needs an adjustment\n * for certain variants.\n */\n onSecondaryBackground?: boolean;\n}\n\nconst Button = forwardRef<HTMLButtonElement, ButtonProps>(function Button(\n {\n id,\n children,\n prefixIcon,\n suffixIcon,\n disabled,\n isPending,\n type = 'button',\n prefixIconType = 'basic',\n variant = 'primary',\n size = 'md',\n width = 'full',\n onClick,\n onSecondaryBackground,\n ...props\n }: ButtonProps,\n ref,\n) {\n const [isResolving, { enable, disable }] = useToggle(false);\n const innerOnClick: MaybePromise = isFunction(onClick) ? onClick : noop;\n const loading = isPending || isResolving;\n\n const handleClick = useCallback(\n async (e: MouseEvent<HTMLButtonElement>) => {\n if (loading) {\n return;\n }\n\n const maybePromise = innerOnClick(e);\n\n if (maybePromise instanceof Promise) {\n enable();\n await maybePromise;\n disable();\n }\n },\n [loading, innerOnClick],\n );\n\n return (\n <StyledButton\n id={id}\n type={type}\n data-test={'button__' + variant}\n variant={variant}\n size={size}\n width={width}\n disabled={disabled || loading}\n $isPending={loading}\n $onSecondaryBackground={onSecondaryBackground}\n {...props}\n onClick={handleClick}\n ref={ref}\n >\n {loading && (\n <LoaderContainer isPending={loading}>\n <Loader aria-label={`Loading ${props['aria-label'] || ''}`} />\n </LoaderContainer>\n )}\n <ButtonChildren isPending={loading}>\n {prefixIcon != null && (\n <>\n {prefixIconType === 'basic' && <PrefixIconContainer>{prefixIcon}</PrefixIconContainer>}\n {prefixIconType === 'inherit' && (\n <InheritPrefixIconContainer>{prefixIcon}</InheritPrefixIconContainer>\n )}\n </>\n )}\n {children && (\n <ButtonText width={width} size={size}>\n {children}\n </ButtonText>\n )}\n {suffixIcon != null && <SuffixIconContainer>{suffixIcon}</SuffixIconContainer>}\n </ButtonChildren>\n </StyledButton>\n );\n});\n\nexport default Button;\n","import { forwardRef } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { BorderRadius } from '@persona/design-tokens';\n\nimport Button, { type ButtonProps } from './Button';\n\nconst BUTTON_SIZE_MAP = {\n xs: '16px',\n sm: '24px',\n md: '32px',\n};\n\nconst ICON_SIZE_MAP = {\n xs: '12px',\n sm: '16px',\n md: '16px',\n};\n\ntype IconBtnSize = keyof typeof BUTTON_SIZE_MAP;\n\nconst IconBtn = styled(Button).attrs({\n width: 'icon',\n variant: 'basic',\n})`\n background-color: transparent;\n padding: 0;\n border-radius: ${BorderRadius.Md};\n\n ${({ size }) => css`\n height: ${BUTTON_SIZE_MAP[size as IconBtnSize]};\n width: ${BUTTON_SIZE_MAP[size as IconBtnSize]};\n\n svg {\n width: ${ICON_SIZE_MAP[size as IconBtnSize]};\n height: ${ICON_SIZE_MAP[size as IconBtnSize]};\n }\n `}\n`;\n\nexport interface IconButtonProps extends Omit<\n ButtonProps,\n 'width' | 'prefixIcon' | 'prefixIconType' | 'suffixIcon' | 'variant' | 'size'\n> {\n /**\n * `xs` - 16px. `sm` - 24px. `md` - 32px.\n * Pair with a PDS icon in the prescribed size.\n */\n size?: IconBtnSize;\n}\n\n/**\n * Use to render icon-only buttons. Ensure buttons have proper aria properties.\n */\nconst IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(function IconButton(\n { size = 'xs', ...props },\n ref,\n) {\n return <IconBtn size={size as ButtonProps['size']} ref={ref} {...props} />;\n});\n\nexport default IconButton;\n"],"mappings":";;;;;;;;;;;;;;;AA4BA,MAAM,aAAmB,KAAA;AAGzB,MAAM,YAAY,EAAE,aAAgC,SAA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BAClC,cAAc,MAAqB;;IAE/C;;;;;AAiBJ,MAAM,aAAa,WAA+C,SAAS,WACzE,EAAE,OAAO,MAAM,GAAG,SAClB,KACA;AACA,QAAO,oBAAC,SAAD;EAAe;EAAkC;EAAK,GAAI;EAAS,CAAA;EAC1E"}
@@ -4,15 +4,15 @@ const require_mixins_focus = require("./mixins/focus.cjs");
4
4
  require("./variables/transitions.cjs");
5
5
  const require_mixins_print_index = require("./mixins/print/index.cjs");
6
6
  const require_mixins_text = require("./mixins/text.cjs");
7
- const require_useToggle = require("./useToggle-CSkZWXtQ.cjs");
8
7
  const require_variables_keyframes = require("./variables/keyframes.cjs");
8
+ const require_useToggle = require("./useToggle-DARO917w.cjs");
9
9
  let _persona_design_tokens = require("@persona/design-tokens");
10
10
  let styled_components = require("styled-components");
11
11
  styled_components = require_chunk.__toESM(styled_components);
12
- let react = require("react");
13
12
  let react_jsx_runtime = require("react/jsx-runtime");
14
- let _persona_icons = require("@persona/icons");
15
13
  let react_router_dom = require("react-router-dom");
14
+ let react = require("react");
15
+ let _persona_icons = require("@persona/icons");
16
16
  let lodash_fp_js = require("lodash/fp.js");
17
17
  //#region components/Button/Button.tsx
18
18
  const noop = () => void 0;
@@ -369,4 +369,4 @@ Object.defineProperty(exports, "SuffixIconContainer", {
369
369
  }
370
370
  });
371
371
 
372
- //# sourceMappingURL=IconButton-DNy7g5zh.cjs.map
372
+ //# sourceMappingURL=IconButton-nlgjJQCS.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"IconButton-DNy7g5zh.cjs","names":["paragraphMixins","Spacing","Link","Color","isHovered","isNotDisabled","isDisabled","focusOutlineControlled","printMixins","LoaderIcon","rotate","useToggle","BorderRadius"],"sources":["../components/Button/Button.tsx","../components/Button/IconButton.tsx"],"sourcesContent":["import { isEmpty, isFunction } from 'lodash/fp';\nimport {\n type ComponentPropsWithoutRef,\n forwardRef,\n type MouseEvent,\n type ReactNode,\n type Ref,\n useCallback,\n} from 'react';\nimport { Link, type LinkProps } from 'react-router-dom';\nimport styled, {\n css,\n type DefaultTheme,\n type FlattenInterpolation,\n type ThemeProps,\n} from 'styled-components';\n\nimport { Color, Spacing } from '@persona/design-tokens';\nimport { LoaderIcon } from '@persona/icons';\nimport { isDisabled, isHovered, isNotDisabled } from 'design-system/lib/pseudoClass';\nimport useToggle from 'design-system/lib/useToggle';\nimport { focusOutlineControlled } from 'design-system/mixins/focus';\nimport { printMixins } from 'design-system/mixins/print';\nimport { paragraphMixins } from 'design-system/mixins/text';\nimport type PseudoClassProps from 'design-system/types/PseudoClassProps';\nimport { rotate } from 'design-system/variables/keyframes';\nimport { TransitionDuration } from 'design-system/variables/transitions';\n\nconst noop = (): void => undefined;\n\n// TODO(joseph): Bring this fix back to pseudoClass\nconst isActive = ({ active }: PseudoClassProps) => (active ? '' : ':active:enabled');\n\n/* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\nconst sizeStyles: Record<ButtonProps['size'], FlattenInterpolation<ThemeProps<DefaultTheme>>> = {\n md: css`\n ${paragraphMixins.md}\n height: ${({ theme }) => theme.button.height.md};\n padding: ${Spacing[2]};\n svg {\n height: 16px;\n width: 16px;\n }\n `,\n sm: css`\n ${paragraphMixins.sm}\n height: ${({ theme }) => theme.button.height.sm};\n padding: ${Spacing[1]} 6px;\n svg {\n height: 16px;\n width: 16px;\n }\n `,\n};\n\n/* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\nconst widthStyles: Record<ButtonProps['width'], FlattenInterpolation<ThemeProps<DefaultTheme>>> = {\n full: css`\n width: 100%;\n `,\n auto: css`\n width: auto;\n `,\n // TODO: rename this prop to 'element' as a standard unresponsive element width\n button: css`\n width: ${({ theme }) => theme.element.width.md};\n `,\n icon: css<ButtonProps>`\n width: ${({ theme, size }) => {\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n return theme.button.height[size];\n }};\n padding: 0;\n flex: none;\n `,\n};\n\ninterface ButtonPropsWithTransientProps extends Omit<ButtonProps, 'isPending'> {\n $isPending: boolean;\n $onSecondaryBackground?: boolean;\n}\n\nexport const StyledButton = styled.button.attrs<ButtonPropsWithTransientProps>(({ to, target }) => {\n if (isEmpty(to)) {\n return 'button';\n } else if (typeof to === 'string' && to.startsWith('https://')) {\n return {\n as: 'a',\n href: to,\n target: target ?? '_blank',\n rel: 'noreferrer',\n };\n } else {\n return {\n as: Link,\n };\n }\n})<ButtonPropsWithTransientProps>`\n cursor: pointer;\n border: none;\n box-sizing: border-box;\n white-space: nowrap;\n ${({ theme, variant }) => {\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n const palette = theme.color.variants[variant] as any;\n return css`\n &:disabled {\n background-color: ${palette.disabled};\n color: ${palette.textDisabled};\n svg path {\n stroke: ${palette.textDisabled};\n }\n\n /* For backwards compatibility with current coloring scheme (targeting stroke property) */\n svg.pds-icon {\n path {\n stroke: unset;\n }\n\n /* Support icons with stroke */\n path[stroke] {\n stroke: currentColor;\n }\n }\n\n user-select: none;\n }\n `;\n }}\n\n ${({ variant }) =>\n variant === 'outline' &&\n css`\n border: 1px solid ${({ theme }) => theme.color.border.input};\n `}\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n /* To properly position loading spinner */\n position: relative;\n\n border-radius: ${({ theme }) => theme.button.borderRadius};\n\n transition-duration: ${TransitionDuration.Fast};\n transition-property: background-color, color, border-color, width, height;\n\n ${({ size }) => {\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n return sizeStyles[size];\n }}\n ${({ width }) => {\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n return widthStyles[width];\n }}\n\n /* Variant styling */\n ${({ theme, variant, $isPending, $onSecondaryBackground }) => {\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n let palette = theme.color.variants[variant] as any;\n\n if (variant === 'basic' && $onSecondaryBackground) {\n palette = {\n ...palette,\n // eslint-disable-next-line rulesdir/no-core-color-tokens\n default: Color.CoreSlate300,\n // eslint-disable-next-line rulesdir/no-core-color-tokens\n hover: Color.CoreSlate400,\n // eslint-disable-next-line rulesdir/no-core-color-tokens\n active: Color.CoreSlate400,\n // eslint-disable-next-line rulesdir/no-core-color-tokens\n disabled: Color.CoreSlate100,\n };\n }\n\n return css`\n background-color: ${palette.default};\n color: ${palette.text};\n svg path {\n stroke: ${palette.text};\n }\n\n svg.pds-icon {\n path {\n stroke: unset;\n }\n\n path[stroke] {\n stroke: currentColor;\n }\n }\n\n &${isHovered}${isNotDisabled} {\n background-color: ${palette.hover};\n }\n\n &${isDisabled} {\n cursor: not-allowed;\n }\n\n &${isActive} {\n background-color: ${palette.active};\n }\n\n ${focusOutlineControlled}\n\n ${\n $isPending &&\n css`\n cursor: default;\n background-color: ${palette.active};\n &:disabled {\n background-color: ${({ theme }) => {\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n return theme.color.variants[variant].active;\n }};\n user-select: none;\n }\n\n svg path {\n stroke: ${palette.highlightDark};\n }\n\n // For backwards compatibility with current coloring scheme (targeting stroke property)\n svg.pds-icon {\n path {\n stroke: unset;\n }\n\n path[stroke] {\n stroke: currentColor;\n }\n }\n `\n }\n `;\n }}\n\n\n ${printMixins.hide}\n`;\n\ntype WithPendingProps = Pick<ButtonProps, 'isPending'>;\n\nconst LoaderContainer = styled.div<WithPendingProps>`\n position: absolute;\n height: 100%;\n width: 100%;\n top: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: opacity 2s;\n opacity: ${({ isPending }) => (isPending ? '1' : '0')};\n`;\n\nconst Loader = styled(LoaderIcon)`\n animation: ${rotate} linear 1s infinite;\n`;\n\nexport const ButtonChildren = styled('div').attrs(({ isPending }: WithPendingProps) => ({\n ['aria-hidden']: isPending,\n}))<WithPendingProps>`\n width: 100%;\n display: flex;\n flex-wrap: nowrap;\n align-items: center;\n justify-content: center;\n transition: opacity ${TransitionDuration.Fast};\n opacity: ${({ isPending }) => (isPending ? '0' : '1')};\n gap: ${Spacing[1]};\n`;\n\nconst PrefixIconContainer = styled.div`\n display: flex;\n align-items: center;\n`;\n\nconst InheritPrefixIconContainer = styled.div`\n display: flex;\n align-items: center;\n\n & svg {\n width: inherit;\n height: inherit;\n }\n`;\n\nexport const SuffixIconContainer = styled(PrefixIconContainer)`\n margin-right: 0;\n flex-grow: 1;\n justify-content: flex-end;\n`;\n\nconst ButtonText = styled.span<{ size: 'md' | 'sm'; width: 'full' | 'auto' | 'button' | 'icon' }>`\n position: relative;\n\n /* Needed to align for browsers that don't support text-box yet\n (which at this time, is firefox, and opera, and a few niche browsers)\n This checks firefox. Otherwise, it will default back to the original\n which is a slightly misaligned button\n */\n\n /* Was trying to use this with @supports not, but genuinely could not figure out why this wouldn't\n work */\n\n line-height: ${({ width }) => (width === 'icon' ? '0' : 'inherit')};\n @-moz-document url-prefix() {\n top: ${({ size }) => (size === 'md' ? '1px' : '0.5px')};\n }\n\n @supports (text-box: cap alphabetic) {\n text-box: ${({ width }) => (width === 'icon' ? 'normal' : 'cap alphabetic')};\n }\n`;\n\ntype MaybePromise =\n | ((e: MouseEvent<HTMLButtonElement>) => void)\n | ((e: MouseEvent<HTMLButtonElement>) => Promise<void>);\n\nexport interface ButtonProps\n extends ComponentPropsWithoutRef<'button'>, Omit<PseudoClassProps, 'checked'> {\n /**\n * Visual style of the button.\n *\n * - `primary` – filled brand colour, for the primary action on a surface.\n * - `basic` – subtle grey fill, for secondary actions.\n * - `outline` – transparent with a border, alternative secondary style.\n * - `text` – no background or border, for tertiary / inline actions.\n * - `inverse` – inverted fill for use on dark/coloured backgrounds.\n * - `danger` – red fill, for destructive actions.\n *\n * @defaultValue 'primary'\n */\n variant?: 'basic' | 'primary' | 'inverse' | 'danger' | 'text' | 'outline';\n /**\n * Shows a loading spinner and disables the button. Also triggers automatically\n * when `onClick` returns a Promise, clearing once the promise settles.\n */\n isPending?: boolean;\n /**\n * Icon rendered to the left of the button label.\n * Import from `@persona-id/icons`.\n */\n prefixIcon?: ReactNode;\n /**\n * Controls how the prefix icon inherits sizing.\n *\n * - `basic` – icon is rendered inside a fixed-size container.\n * - `inherit` – icon stretches to fill the surrounding element's dimensions.\n *\n * @defaultValue 'basic'\n */\n prefixIconType?: 'basic' | 'inherit';\n\n /**\n * Icon rendered to the right of the button label.\n * Import from `@persona-id/icons`.\n */\n suffixIcon?: ReactNode;\n\n /**\n * Height and typography scale of the button.\n *\n * @defaultValue 'md'\n */\n size?: 'md' | 'sm';\n\n /**\n * Changes the button into a link.\n * Pass a relative path to use `react-router-dom` `<Link>`, or an absolute\n * `https://` URL to render an `<a>` tag that opens in a new tab.\n */\n to?: LinkProps['to'];\n\n /**\n * Overrides the target of the link if `to` is provided and is an external link.\n */\n target?: LinkProps['target'];\n\n /**\n * Note: we may want to default this to 'button' in the future, but many instances of this Button component\n * in dashboard currently rely on the default 'submit' behavior that occurs when using this in redux-form\n * so we'll have to comb through and manually add the type='submit' prop.\n */\n type?: 'button' | 'reset' | 'submit';\n /**\n * Controls the width of the button.\n *\n * - `full` – stretches to fill its container (`width: 100%`).\n * - `auto` – shrinks to fit its content.\n * - `button` – a fixed medium element width (from design tokens).\n * - `icon` – square, sized to match the button height; use for icon-only buttons.\n *\n * @defaultValue 'full'\n */\n width?: 'full' | 'auto' | 'button' | 'icon';\n onClick?: MaybePromise;\n ref?: Ref<HTMLButtonElement>;\n\n /**\n * In some cases we render a button on a secondary background, which needs an adjustment\n * for certain variants.\n */\n onSecondaryBackground?: boolean;\n}\n\nconst Button = forwardRef<HTMLButtonElement, ButtonProps>(function Button(\n {\n id,\n children,\n prefixIcon,\n suffixIcon,\n disabled,\n isPending,\n type = 'button',\n prefixIconType = 'basic',\n variant = 'primary',\n size = 'md',\n width = 'full',\n onClick,\n onSecondaryBackground,\n ...props\n }: ButtonProps,\n ref,\n) {\n const [isResolving, { enable, disable }] = useToggle(false);\n const innerOnClick: MaybePromise = isFunction(onClick) ? onClick : noop;\n const loading = isPending || isResolving;\n\n const handleClick = useCallback(\n async (e: MouseEvent<HTMLButtonElement>) => {\n if (loading) {\n return;\n }\n\n const maybePromise = innerOnClick(e);\n\n if (maybePromise instanceof Promise) {\n enable();\n await maybePromise;\n disable();\n }\n },\n [loading, innerOnClick],\n );\n\n return (\n <StyledButton\n id={id}\n type={type}\n data-test={'button__' + variant}\n variant={variant}\n size={size}\n width={width}\n disabled={disabled || loading}\n $isPending={loading}\n $onSecondaryBackground={onSecondaryBackground}\n {...props}\n onClick={handleClick}\n ref={ref}\n >\n {loading && (\n <LoaderContainer isPending={loading}>\n <Loader aria-label={`Loading ${props['aria-label'] || ''}`} />\n </LoaderContainer>\n )}\n <ButtonChildren isPending={loading}>\n {prefixIcon != null && (\n <>\n {prefixIconType === 'basic' && <PrefixIconContainer>{prefixIcon}</PrefixIconContainer>}\n {prefixIconType === 'inherit' && (\n <InheritPrefixIconContainer>{prefixIcon}</InheritPrefixIconContainer>\n )}\n </>\n )}\n {children && (\n <ButtonText width={width} size={size}>\n {children}\n </ButtonText>\n )}\n {suffixIcon != null && <SuffixIconContainer>{suffixIcon}</SuffixIconContainer>}\n </ButtonChildren>\n </StyledButton>\n );\n});\n\nexport default Button;\n","import { forwardRef } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { BorderRadius } from '@persona/design-tokens';\n\nimport Button, { type ButtonProps } from './Button';\n\nconst BUTTON_SIZE_MAP = {\n xs: '16px',\n sm: '24px',\n md: '32px',\n};\n\nconst ICON_SIZE_MAP = {\n xs: '12px',\n sm: '16px',\n md: '16px',\n};\n\ntype IconBtnSize = keyof typeof BUTTON_SIZE_MAP;\n\nconst IconBtn = styled(Button).attrs({\n width: 'icon',\n variant: 'basic',\n})`\n background-color: transparent;\n padding: 0;\n border-radius: ${BorderRadius.Md};\n\n ${({ size }) => css`\n height: ${BUTTON_SIZE_MAP[size as IconBtnSize]};\n width: ${BUTTON_SIZE_MAP[size as IconBtnSize]};\n\n svg {\n width: ${ICON_SIZE_MAP[size as IconBtnSize]};\n height: ${ICON_SIZE_MAP[size as IconBtnSize]};\n }\n `}\n`;\n\nexport interface IconButtonProps extends Omit<\n ButtonProps,\n 'width' | 'prefixIcon' | 'prefixIconType' | 'suffixIcon' | 'variant' | 'size'\n> {\n /**\n * `xs` - 16px. `sm` - 24px. `md` - 32px.\n * Pair with a PDS icon in the prescribed size.\n */\n size?: IconBtnSize;\n}\n\n/**\n * Use to render icon-only buttons. Ensure buttons have proper aria properties.\n */\nconst IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(function IconButton(\n { size = 'xs', ...props },\n ref,\n) {\n return <IconBtn size={size as ButtonProps['size']} ref={ref} {...props} />;\n});\n\nexport default IconButton;\n"],"mappings":";;;;;;;;;;;;;;;;;AA4BA,MAAM,aAAmB,KAAA;AAGzB,MAAM,YAAY,EAAE,aAAgC,SAAS,KAAK;AAGlE,MAAM,aAA0F;CAC9F,IAAI,kBAAA,GAAG;MACHA,oBAAAA,gBAAgB,GAAG;eACV,EAAE,YAAY,MAAM,OAAO,OAAO,GAAG;eACrCC,uBAAAA,QAAQ,GAAG;;;;;;CAMxB,IAAI,kBAAA,GAAG;MACHD,oBAAAA,gBAAgB,GAAG;eACV,EAAE,YAAY,MAAM,OAAO,OAAO,GAAG;eACrCC,uBAAAA,QAAQ,GAAG;;;;;;CAMzB;AAGD,MAAM,cAA4F;CAChG,MAAM,kBAAA,GAAG;;;CAGT,MAAM,kBAAA,GAAG;;;CAIT,QAAQ,kBAAA,GAAG;cACC,EAAE,YAAY,MAAM,QAAQ,MAAM,GAAG;;CAEjD,MAAM,kBAAA,GAAgB;cACV,EAAE,OAAO,WAAW;AAE5B,SAAO,MAAM,OAAO,OAAO;GAC3B;;;;CAIL;AAOD,MAAa,eAAe,kBAAA,QAAO,OAAO,OAAsC,EAAE,IAAI,aAAa;AACjG,MAAA,GAAA,aAAA,SAAY,GAAG,CACb,QAAO;UACE,OAAO,OAAO,YAAY,GAAG,WAAW,WAAW,CAC5D,QAAO;EACL,IAAI;EACJ,MAAM;EACN,QAAQ,UAAU;EAClB,KAAK;EACN;KAED,QAAO,EACL,IAAIC,iBAAAA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,CAAA;EAC1E"}
1
+ {"version":3,"file":"IconButton-nlgjJQCS.cjs","names":["paragraphMixins","Spacing","Link","Color","isHovered","isNotDisabled","isDisabled","focusOutlineControlled","printMixins","LoaderIcon","rotate","useToggle","BorderRadius"],"sources":["../components/Button/Button.tsx","../components/Button/IconButton.tsx"],"sourcesContent":["import { isEmpty, isFunction } from 'lodash/fp';\nimport {\n type ComponentPropsWithoutRef,\n forwardRef,\n type MouseEvent,\n type ReactNode,\n type Ref,\n useCallback,\n} from 'react';\nimport { Link, type LinkProps } from 'react-router-dom';\nimport styled, {\n css,\n type DefaultTheme,\n type FlattenInterpolation,\n type ThemeProps,\n} from 'styled-components';\n\nimport { Color, Spacing } from '@persona/design-tokens';\nimport { LoaderIcon } from '@persona/icons';\nimport { isDisabled, isHovered, isNotDisabled } from 'design-system/lib/pseudoClass';\nimport useToggle from 'design-system/lib/useToggle';\nimport { focusOutlineControlled } from 'design-system/mixins/focus';\nimport { printMixins } from 'design-system/mixins/print';\nimport { paragraphMixins } from 'design-system/mixins/text';\nimport type PseudoClassProps from 'design-system/types/PseudoClassProps';\nimport { rotate } from 'design-system/variables/keyframes';\nimport { TransitionDuration } from 'design-system/variables/transitions';\n\nconst noop = (): void => undefined;\n\n// TODO(joseph): Bring this fix back to pseudoClass\nconst isActive = ({ active }: PseudoClassProps) => (active ? '' : ':active:enabled');\n\n/* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\nconst sizeStyles: Record<ButtonProps['size'], FlattenInterpolation<ThemeProps<DefaultTheme>>> = {\n md: css`\n ${paragraphMixins.md}\n height: ${({ theme }) => theme.button.height.md};\n padding: ${Spacing[2]};\n svg {\n height: 16px;\n width: 16px;\n }\n `,\n sm: css`\n ${paragraphMixins.sm}\n height: ${({ theme }) => theme.button.height.sm};\n padding: ${Spacing[1]} 6px;\n svg {\n height: 16px;\n width: 16px;\n }\n `,\n};\n\n/* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\nconst widthStyles: Record<ButtonProps['width'], FlattenInterpolation<ThemeProps<DefaultTheme>>> = {\n full: css`\n width: 100%;\n `,\n auto: css`\n width: auto;\n `,\n // TODO: rename this prop to 'element' as a standard unresponsive element width\n button: css`\n width: ${({ theme }) => theme.element.width.md};\n `,\n icon: css<ButtonProps>`\n width: ${({ theme, size }) => {\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n return theme.button.height[size];\n }};\n padding: 0;\n flex: none;\n `,\n};\n\ninterface ButtonPropsWithTransientProps extends Omit<ButtonProps, 'isPending'> {\n $isPending: boolean;\n $onSecondaryBackground?: boolean;\n}\n\nexport const StyledButton = styled.button.attrs<ButtonPropsWithTransientProps>(({ to, target }) => {\n if (isEmpty(to)) {\n return 'button';\n } else if (typeof to === 'string' && to.startsWith('https://')) {\n return {\n as: 'a',\n href: to,\n target: target ?? '_blank',\n rel: 'noreferrer',\n };\n } else {\n return {\n as: Link,\n };\n }\n})<ButtonPropsWithTransientProps>`\n cursor: pointer;\n border: none;\n box-sizing: border-box;\n white-space: nowrap;\n ${({ theme, variant }) => {\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n const palette = theme.color.variants[variant] as any;\n return css`\n &:disabled {\n background-color: ${palette.disabled};\n color: ${palette.textDisabled};\n svg path {\n stroke: ${palette.textDisabled};\n }\n\n /* For backwards compatibility with current coloring scheme (targeting stroke property) */\n svg.pds-icon {\n path {\n stroke: unset;\n }\n\n /* Support icons with stroke */\n path[stroke] {\n stroke: currentColor;\n }\n }\n\n user-select: none;\n }\n `;\n }}\n\n ${({ variant }) =>\n variant === 'outline' &&\n css`\n border: 1px solid ${({ theme }) => theme.color.border.input};\n `}\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n /* To properly position loading spinner */\n position: relative;\n\n border-radius: ${({ theme }) => theme.button.borderRadius};\n\n transition-duration: ${TransitionDuration.Fast};\n transition-property: background-color, color, border-color, width, height;\n\n ${({ size }) => {\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n return sizeStyles[size];\n }}\n ${({ width }) => {\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n return widthStyles[width];\n }}\n\n /* Variant styling */\n ${({ theme, variant, $isPending, $onSecondaryBackground }) => {\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n let palette = theme.color.variants[variant] as any;\n\n if (variant === 'basic' && $onSecondaryBackground) {\n palette = {\n ...palette,\n // eslint-disable-next-line rulesdir/no-core-color-tokens\n default: Color.CoreSlate300,\n // eslint-disable-next-line rulesdir/no-core-color-tokens\n hover: Color.CoreSlate400,\n // eslint-disable-next-line rulesdir/no-core-color-tokens\n active: Color.CoreSlate400,\n // eslint-disable-next-line rulesdir/no-core-color-tokens\n disabled: Color.CoreSlate100,\n };\n }\n\n return css`\n background-color: ${palette.default};\n color: ${palette.text};\n svg path {\n stroke: ${palette.text};\n }\n\n svg.pds-icon {\n path {\n stroke: unset;\n }\n\n path[stroke] {\n stroke: currentColor;\n }\n }\n\n &${isHovered}${isNotDisabled} {\n background-color: ${palette.hover};\n }\n\n &${isDisabled} {\n cursor: not-allowed;\n }\n\n &${isActive} {\n background-color: ${palette.active};\n }\n\n ${focusOutlineControlled}\n\n ${\n $isPending &&\n css`\n cursor: default;\n background-color: ${palette.active};\n &:disabled {\n background-color: ${({ theme }) => {\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n return theme.color.variants[variant].active;\n }};\n user-select: none;\n }\n\n svg path {\n stroke: ${palette.highlightDark};\n }\n\n // For backwards compatibility with current coloring scheme (targeting stroke property)\n svg.pds-icon {\n path {\n stroke: unset;\n }\n\n path[stroke] {\n stroke: currentColor;\n }\n }\n `\n }\n `;\n }}\n\n\n ${printMixins.hide}\n`;\n\ntype WithPendingProps = Pick<ButtonProps, 'isPending'>;\n\nconst LoaderContainer = styled.div<WithPendingProps>`\n position: absolute;\n height: 100%;\n width: 100%;\n top: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: opacity 2s;\n opacity: ${({ isPending }) => (isPending ? '1' : '0')};\n`;\n\nconst Loader = styled(LoaderIcon)`\n animation: ${rotate} linear 1s infinite;\n`;\n\nexport const ButtonChildren = styled('div').attrs(({ isPending }: WithPendingProps) => ({\n ['aria-hidden']: isPending,\n}))<WithPendingProps>`\n width: 100%;\n display: flex;\n flex-wrap: nowrap;\n align-items: center;\n justify-content: center;\n transition: opacity ${TransitionDuration.Fast};\n opacity: ${({ isPending }) => (isPending ? '0' : '1')};\n gap: ${Spacing[1]};\n`;\n\nconst PrefixIconContainer = styled.div`\n display: flex;\n align-items: center;\n`;\n\nconst InheritPrefixIconContainer = styled.div`\n display: flex;\n align-items: center;\n\n & svg {\n width: inherit;\n height: inherit;\n }\n`;\n\nexport const SuffixIconContainer = styled(PrefixIconContainer)`\n margin-right: 0;\n flex-grow: 1;\n justify-content: flex-end;\n`;\n\nconst ButtonText = styled.span<{ size: 'md' | 'sm'; width: 'full' | 'auto' | 'button' | 'icon' }>`\n position: relative;\n\n /* Needed to align for browsers that don't support text-box yet\n (which at this time, is firefox, and opera, and a few niche browsers)\n This checks firefox. Otherwise, it will default back to the original\n which is a slightly misaligned button\n */\n\n /* Was trying to use this with @supports not, but genuinely could not figure out why this wouldn't\n work */\n\n line-height: ${({ width }) => (width === 'icon' ? '0' : 'inherit')};\n @-moz-document url-prefix() {\n top: ${({ size }) => (size === 'md' ? '1px' : '0.5px')};\n }\n\n @supports (text-box: cap alphabetic) {\n text-box: ${({ width }) => (width === 'icon' ? 'normal' : 'cap alphabetic')};\n }\n`;\n\ntype MaybePromise =\n | ((e: MouseEvent<HTMLButtonElement>) => void)\n | ((e: MouseEvent<HTMLButtonElement>) => Promise<void>);\n\nexport interface ButtonProps\n extends ComponentPropsWithoutRef<'button'>, Omit<PseudoClassProps, 'checked'> {\n /**\n * Visual style of the button.\n *\n * - `primary` – filled brand colour, for the primary action on a surface.\n * - `basic` – subtle grey fill, for secondary actions.\n * - `outline` – transparent with a border, alternative secondary style.\n * - `text` – no background or border, for tertiary / inline actions.\n * - `inverse` – inverted fill for use on dark/coloured backgrounds.\n * - `danger` – red fill, for destructive actions.\n *\n * @defaultValue 'primary'\n */\n variant?: 'basic' | 'primary' | 'inverse' | 'danger' | 'text' | 'outline';\n /**\n * Shows a loading spinner and disables the button. Also triggers automatically\n * when `onClick` returns a Promise, clearing once the promise settles.\n */\n isPending?: boolean;\n /**\n * Icon rendered to the left of the button label.\n * Import from `@persona-id/icons`.\n */\n prefixIcon?: ReactNode;\n /**\n * Controls how the prefix icon inherits sizing.\n *\n * - `basic` – icon is rendered inside a fixed-size container.\n * - `inherit` – icon stretches to fill the surrounding element's dimensions.\n *\n * @defaultValue 'basic'\n */\n prefixIconType?: 'basic' | 'inherit';\n\n /**\n * Icon rendered to the right of the button label.\n * Import from `@persona-id/icons`.\n */\n suffixIcon?: ReactNode;\n\n /**\n * Height and typography scale of the button.\n *\n * @defaultValue 'md'\n */\n size?: 'md' | 'sm';\n\n /**\n * Changes the button into a link.\n * Pass a relative path to use `react-router-dom` `<Link>`, or an absolute\n * `https://` URL to render an `<a>` tag that opens in a new tab.\n */\n to?: LinkProps['to'];\n\n /**\n * Overrides the target of the link if `to` is provided and is an external link.\n */\n target?: LinkProps['target'];\n\n /**\n * Note: we may want to default this to 'button' in the future, but many instances of this Button component\n * in dashboard currently rely on the default 'submit' behavior that occurs when using this in redux-form\n * so we'll have to comb through and manually add the type='submit' prop.\n */\n type?: 'button' | 'reset' | 'submit';\n /**\n * Controls the width of the button.\n *\n * - `full` – stretches to fill its container (`width: 100%`).\n * - `auto` – shrinks to fit its content.\n * - `button` – a fixed medium element width (from design tokens).\n * - `icon` – square, sized to match the button height; use for icon-only buttons.\n *\n * @defaultValue 'full'\n */\n width?: 'full' | 'auto' | 'button' | 'icon';\n onClick?: MaybePromise;\n ref?: Ref<HTMLButtonElement>;\n\n /**\n * In some cases we render a button on a secondary background, which needs an adjustment\n * for certain variants.\n */\n onSecondaryBackground?: boolean;\n}\n\nconst Button = forwardRef<HTMLButtonElement, ButtonProps>(function Button(\n {\n id,\n children,\n prefixIcon,\n suffixIcon,\n disabled,\n isPending,\n type = 'button',\n prefixIconType = 'basic',\n variant = 'primary',\n size = 'md',\n width = 'full',\n onClick,\n onSecondaryBackground,\n ...props\n }: ButtonProps,\n ref,\n) {\n const [isResolving, { enable, disable }] = useToggle(false);\n const innerOnClick: MaybePromise = isFunction(onClick) ? onClick : noop;\n const loading = isPending || isResolving;\n\n const handleClick = useCallback(\n async (e: MouseEvent<HTMLButtonElement>) => {\n if (loading) {\n return;\n }\n\n const maybePromise = innerOnClick(e);\n\n if (maybePromise instanceof Promise) {\n enable();\n await maybePromise;\n disable();\n }\n },\n [loading, innerOnClick],\n );\n\n return (\n <StyledButton\n id={id}\n type={type}\n data-test={'button__' + variant}\n variant={variant}\n size={size}\n width={width}\n disabled={disabled || loading}\n $isPending={loading}\n $onSecondaryBackground={onSecondaryBackground}\n {...props}\n onClick={handleClick}\n ref={ref}\n >\n {loading && (\n <LoaderContainer isPending={loading}>\n <Loader aria-label={`Loading ${props['aria-label'] || ''}`} />\n </LoaderContainer>\n )}\n <ButtonChildren isPending={loading}>\n {prefixIcon != null && (\n <>\n {prefixIconType === 'basic' && <PrefixIconContainer>{prefixIcon}</PrefixIconContainer>}\n {prefixIconType === 'inherit' && (\n <InheritPrefixIconContainer>{prefixIcon}</InheritPrefixIconContainer>\n )}\n </>\n )}\n {children && (\n <ButtonText width={width} size={size}>\n {children}\n </ButtonText>\n )}\n {suffixIcon != null && <SuffixIconContainer>{suffixIcon}</SuffixIconContainer>}\n </ButtonChildren>\n </StyledButton>\n );\n});\n\nexport default Button;\n","import { forwardRef } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { BorderRadius } from '@persona/design-tokens';\n\nimport Button, { type ButtonProps } from './Button';\n\nconst BUTTON_SIZE_MAP = {\n xs: '16px',\n sm: '24px',\n md: '32px',\n};\n\nconst ICON_SIZE_MAP = {\n xs: '12px',\n sm: '16px',\n md: '16px',\n};\n\ntype IconBtnSize = keyof typeof BUTTON_SIZE_MAP;\n\nconst IconBtn = styled(Button).attrs({\n width: 'icon',\n variant: 'basic',\n})`\n background-color: transparent;\n padding: 0;\n border-radius: ${BorderRadius.Md};\n\n ${({ size }) => css`\n height: ${BUTTON_SIZE_MAP[size as IconBtnSize]};\n width: ${BUTTON_SIZE_MAP[size as IconBtnSize]};\n\n svg {\n width: ${ICON_SIZE_MAP[size as IconBtnSize]};\n height: ${ICON_SIZE_MAP[size as IconBtnSize]};\n }\n `}\n`;\n\nexport interface IconButtonProps extends Omit<\n ButtonProps,\n 'width' | 'prefixIcon' | 'prefixIconType' | 'suffixIcon' | 'variant' | 'size'\n> {\n /**\n * `xs` - 16px. `sm` - 24px. `md` - 32px.\n * Pair with a PDS icon in the prescribed size.\n */\n size?: IconBtnSize;\n}\n\n/**\n * Use to render icon-only buttons. Ensure buttons have proper aria properties.\n */\nconst IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(function IconButton(\n { size = 'xs', ...props },\n ref,\n) {\n return <IconBtn size={size as ButtonProps['size']} ref={ref} {...props} />;\n});\n\nexport default IconButton;\n"],"mappings":";;;;;;;;;;;;;;;;;AA4BA,MAAM,aAAmB,KAAA;AAGzB,MAAM,YAAY,EAAE,aAAgC,SAAS,KAAK;AAGlE,MAAM,aAA0F;CAC9F,IAAI,kBAAA,GAAG;MACHA,oBAAAA,gBAAgB,GAAG;eACV,EAAE,YAAY,MAAM,OAAO,OAAO,GAAG;eACrCC,uBAAAA,QAAQ,GAAG;;;;;;CAMxB,IAAI,kBAAA,GAAG;MACHD,oBAAAA,gBAAgB,GAAG;eACV,EAAE,YAAY,MAAM,OAAO,OAAO,GAAG;eACrCC,uBAAAA,QAAQ,GAAG;;;;;;CAMzB;AAGD,MAAM,cAA4F;CAChG,MAAM,kBAAA,GAAG;;;CAGT,MAAM,kBAAA,GAAG;;;CAIT,QAAQ,kBAAA,GAAG;cACC,EAAE,YAAY,MAAM,QAAQ,MAAM,GAAG;;CAEjD,MAAM,kBAAA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CAAC;;;mBAGiBC,uBAAAA,aAAa,GAAG;;KAE9B,EAAE,WAAW,kBAAA,GAAG;cACP,gBAAgB,MAAqB;aACtC,gBAAgB,MAAqB;;;eAGnC,cAAc,MAAqB;gBAClC,cAAc,MAAqB;;IAE/C;;;;;AAiBJ,MAAM,cAAA,GAAA,MAAA,YAA4D,SAAS,WACzE,EAAE,OAAO,MAAM,GAAG,SAClB,KACA;AACA,QAAO,iBAAA,GAAA,kBAAA,KAAC,SAAD;EAAe;EAAkC;EAAK,GAAI;EAAS,CAAA;EAC1E"}
@@ -1,2 +1,2 @@
1
- import { n as IconButtonProps, t as IconButton } from "./IconButton-Dnnlf9uO.mjs";
1
+ import { n as IconButtonProps, t as IconButton } from "./IconButton-BSES_-6g.mjs";
2
2
  export { IconButtonProps, IconButton as default };
@@ -1,4 +1,4 @@
1
- import { i as TextAction } from "./Action-z1rV4qON.cjs";
1
+ import { i as TextAction } from "./Action-E90Wvqmc.cjs";
2
2
  import { ComponentPropsWithoutRef, MouseEvent, ReactNode } from "react";
3
3
  import * as _$react_jsx_runtime0 from "react/jsx-runtime.js";
4
4
 
@@ -1,6 +1,6 @@
1
- import { i as TextAction } from "./Action-DkNqzc2X.mjs";
2
- import { ComponentPropsWithoutRef, MouseEvent, ReactNode } from "react";
1
+ import { i as TextAction } from "./Action-CVtzREhU.mjs";
3
2
  import * as _$react_jsx_runtime0 from "react/jsx-runtime";
3
+ import { ComponentPropsWithoutRef, MouseEvent, ReactNode } from "react";
4
4
 
5
5
  //#region components/ImageTile/ImageTile.d.ts
6
6
  interface ImageTileProps extends Omit<ComponentPropsWithoutRef<'div'>, 'children'> {
@@ -1,6 +1,6 @@
1
- import { r as InlineEditConfig } from "./TableBoxCell-D1bjYv7b.mjs";
2
- import { RefObject } from "react";
1
+ import { r as InlineEditConfig } from "./TableBoxCell-By1xE6_Q.mjs";
3
2
  import * as _$react_jsx_runtime0 from "react/jsx-runtime";
3
+ import { RefObject } from "react";
4
4
 
5
5
  //#region components/TableBox/InlineCombobox.d.ts
6
6
  interface InlineComboboxProps {
@@ -1,4 +1,4 @@
1
- import { r as InlineEditConfig } from "./TableBoxCell-D1bjYv7b.mjs";
1
+ import { r as InlineEditConfig } from "./TableBoxCell-By1xE6_Q.mjs";
2
2
  import * as _$react_jsx_runtime0 from "react/jsx-runtime";
3
3
 
4
4
  //#region components/TableBox/InlineInput.d.ts
@@ -1,12 +1,12 @@
1
1
  import { isHovered, isNotDisabled } from "./lib/pseudoClass.mjs";
2
2
  import inputMixin from "./mixins/input.mjs";
3
- import { i as Paragraph } from "./Text-hEoPeOc9.mjs";
4
- import { n as Button } from "./IconButton-DC4rh6ow.mjs";
5
- import { n as useFormField, t as FormControlContext } from "./useFormField-eftOPiXj.mjs";
3
+ import { i as Paragraph } from "./Text-RcEfNFLx.mjs";
4
+ import { n as Button } from "./IconButton-CIWiEsS-.mjs";
5
+ import { n as useFormField, t as FormControlContext } from "./useFormField-DhYd6bNn.mjs";
6
6
  import { BorderRadius, Color, Spacing } from "@persona/design-tokens";
7
7
  import styled, { css } from "styled-components";
8
- import { cloneElement, forwardRef, useEffect, useRef, useState } from "react";
9
8
  import { jsx, jsxs } from "react/jsx-runtime";
9
+ import { cloneElement, forwardRef, useEffect, useRef, useState } from "react";
10
10
  import { CircleXInverseIcon } from "@persona/icons";
11
11
  import { CircleXInverseIcon as CircleXInverseIcon$1 } from "@persona/icons/12px";
12
12
  //#region components/Input/Input.tsx
@@ -187,4 +187,4 @@ const InputGroup = forwardRef(function InputGroup({ size = "md", leftIcon, onCle
187
187
  //#endregion
188
188
  export { Input as n, InputGroup as r, ClearButton as t };
189
189
 
190
- //# sourceMappingURL=Input-PWfwMSJ7.mjs.map
190
+ //# sourceMappingURL=Input-BFI_e7aU.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Input-PWfwMSJ7.mjs","names":["SmallCircleXInverseIcon"],"sources":["../components/Input/Input.tsx"],"sourcesContent":["import {\n cloneElement,\n type ComponentPropsWithoutRef,\n type CSSProperties,\n forwardRef,\n type MouseEventHandler,\n type ReactElement,\n type ReactNode,\n useEffect,\n useRef,\n useState,\n} from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { BorderRadius, Color, Spacing } from '@persona/design-tokens';\nimport { CircleXInverseIcon } from '@persona/icons';\nimport { CircleXInverseIcon as SmallCircleXInverseIcon } from '@persona/icons/12px';\nimport Button, { type ButtonProps } from 'design-system/components/Button';\nimport useFormField, {\n FormControlContext,\n} from 'design-system/components/FormControl/useFormField';\nimport { Paragraph } from 'design-system/components/Text';\nimport { isHovered, isNotDisabled } from 'design-system/lib/pseudoClass';\nimport inputMixin, { type InputMixinProps, type InputSizes } from 'design-system/mixins/input';\n\nconst Container = styled.div`\n display: flex;\n position: relative;\n width: 100%;\n`;\n\nconst LeftIcon = styled.div<{ $size?: InputSizes }>`\n position: absolute;\n left: ${Spacing[2]};\n top: 50%;\n transform: translateY(-50%);\n margin: 0;\n font-size: 0px;\n color: ${Color.BorderIconSecondary};\n height: ${({ $size }) => ($size === 'sm' ? '12px' : '16px')};\n width: ${({ $size }) => ($size === 'sm' ? '12px' : '16px')};\n pointer-events: none;\n\n svg {\n height: 100%;\n width: 100%;\n }\n`;\n\nconst InputButtonContainer = styled.div<{ $size?: InputSizes }>`\n position: absolute;\n display: flex;\n gap: ${Spacing[2]};\n right: ${({ $size }) => ($size === 'sm' ? '3px' : Spacing[1])};\n top: 50%;\n transform: translateY(-50%);\n margin: 0;\n font-size: 0px;\n`;\n\nexport const ClearButton = styled(Button).attrs({\n width: 'icon',\n variant: 'basic',\n})`\n background-color: transparent;\n padding: 0;\n height: ${({ size }) => (size === 'sm' ? '18px' : '24px')};\n width: ${({ size }) => (size === 'sm' ? '18px' : '24px')};\n border-radius: ${BorderRadius.Md};\n color: ${Color.BorderIconSecondary};\n\n ${({ disabled }) =>\n disabled &&\n css`\n color: ${Color.BorderIconDisabled};\n `}\n\n &${isHovered}${isNotDisabled} {\n background-color: transparent;\n }\n\n svg {\n height: ${({ size }) => (size === 'sm' ? '12px' : '16px')};\n width: ${({ size }) => (size === 'sm' ? '12px' : '16px')};\n }\n`;\n\nconst SuffixTextContainer = styled.div<{ $size: InputSizes }>`\n position: absolute;\n right: ${Spacing[2]};\n top: ${({ $size }) => ($size === 'sm' ? '2px' : '6px')};\n`;\n\ninterface StyledInputProps extends InputMixinProps {\n $leftIcon?: ReactNode;\n $hasRightItem?: boolean;\n}\n\nexport interface InputProps\n extends Omit<ComponentPropsWithoutRef<'input'>, 'size'>, Omit<InputMixinProps, '$size'> {\n /**\n * Size of the input. If you need the HTML size attr, use inputSize.\n */\n size?: InputSizes;\n\n /**\n * `size` HTML attr on `<input>`\n */\n inputSize?: ComponentPropsWithoutRef<'input'>['size'];\n\n leftIcon?: StyledInputProps['$leftIcon'];\n hasRightItem?: boolean;\n}\n\nconst InputBase = styled.input<StyledInputProps>`\n ${inputMixin};\n line-height: 1;\n\n &::placeholder {\n color: ${({ theme }) => theme.color.text.secondary};\n }\n\n ${({ $size, $leftIcon, $hasRightItem }) => {\n let btnSpacing: string;\n switch ($size) {\n default:\n case 'md':\n btnSpacing = `calc(${Spacing[3]} + 16px + ${Spacing[1]})`;\n return css`\n padding-right: ${$hasRightItem ? btnSpacing : Spacing[3]};\n padding-left: ${$leftIcon ? btnSpacing : Spacing[3]};\n `;\n case 'sm':\n btnSpacing = `calc(${Spacing[2]} + 16px + ${Spacing[1]})`;\n return css`\n padding-right: ${$hasRightItem ? btnSpacing : Spacing[2]};\n padding-left: ${$leftIcon ? btnSpacing : Spacing[2]};\n `;\n }\n }}\n`;\n\nexport const Input = forwardRef<HTMLInputElement, InputProps>(function Input(\n { size, leftIcon, hasRightItem, id, hasWarning, hasError, disabled, maxLength, ...props },\n ref,\n) {\n const field = useFormField({ hasWarning, hasError, disabled, inputId: id, maxLength });\n\n return (\n <InputBase\n $size={size}\n $leftIcon={leftIcon}\n $hasRightItem={hasRightItem}\n ref={ref}\n id={field.inputId}\n aria-describedby={`${field.helperTextId}${field.hasWarning ? ` ${field.warningTextId}` : ''}`}\n aria-errormessage={field.hasError ? field.errorTextId : undefined}\n aria-invalid={field.hasError}\n hasWarning={field.hasWarning}\n hasError={field.hasError}\n disabled={field.disabled}\n maxLength={field.maxLength}\n {...props}\n size={props.inputSize}\n />\n );\n});\n\nexport interface InputGroupProps\n extends ComponentPropsWithoutRef<'div'>, Omit<InputMixinProps, '$size'> {\n /**\n * Input\n */\n children: ReactElement<InputProps>;\n\n /**\n * Size of the input. If you need the HTML size attr, use inputSize.\n */\n size?: InputSizes;\n\n /**\n * Icon to render to the left of the input field.\n *\n * Import icon from `@persona-id/icons`. Use 24px for `lg` input size.\n */\n leftIcon?: ReactNode;\n\n /**\n * Renders clear button to the right and calls function upon click.\n */\n onClear?: MouseEventHandler<HTMLButtonElement>;\n\n /**\n * Button to be rendered to the right of the input\n */\n rightButton?: ReactElement<ButtonProps>;\n\n /**\n * Disabled prop will be passed down to `<Input>`\n */\n disabled?: boolean;\n\n /**\n * Suffix text to be shown to the right of the input (inside the input field)\n */\n suffix?: string;\n}\n\nexport const InputGroup = forwardRef<HTMLDivElement, InputGroupProps>(function InputGroup(\n {\n size = 'md',\n leftIcon,\n onClear,\n rightButton,\n children,\n disabled,\n hasWarning,\n hasError,\n suffix,\n ...props\n },\n ref,\n) {\n const field = useFormField({ hasWarning, hasError, disabled });\n const inputButtonContainerRef = useRef<HTMLDivElement>();\n const [inputPaddingRight, setInputPaddingRight] = useState<string | null>(null);\n\n const suffixContainerRef = useRef<HTMLDivElement | null>(null);\n const [suffixPaddingRight, setSuffixPaddingRight] = useState<string | null>(null);\n\n useEffect(() => {\n // We only need to calculate padding in presence of the right button\n if (rightButton && inputButtonContainerRef.current) {\n setInputPaddingRight(`${12 + inputButtonContainerRef.current.offsetWidth + 4}px`);\n }\n }, [setInputPaddingRight]);\n\n useEffect(() => {\n if (suffix && suffixContainerRef.current) {\n // 12px is 8px padding to the right, plus the 4px gap between the suffix and the input.\n setSuffixPaddingRight(`${12 + suffixContainerRef.current.offsetWidth}px`);\n }\n }, [suffix, setSuffixPaddingRight]);\n\n const rightButtonStyles: CSSProperties =\n size === 'sm'\n ? {\n height: '18px',\n }\n : {};\n\n return (\n <FormControlContext.Provider value={field}>\n <Container ref={ref} {...props}>\n {leftIcon && <LeftIcon $size={size}>{leftIcon}</LeftIcon>}\n {cloneElement(children, {\n size,\n leftIcon: leftIcon,\n ...(rightButton ? { rightButton } : {}),\n hasRightItem: onClear || suffix,\n style:\n inputPaddingRight || suffixPaddingRight\n ? {\n paddingRight: inputPaddingRight || suffixPaddingRight,\n }\n : {},\n })}\n\n {/* Renders only if there's a suffix and NO button */}\n {/* At some point, this should be moved so that it's not absolutely positioned, and\n these are both wrapped within an \"input\" container */}\n {suffix && !(onClear || rightButton) && (\n <SuffixTextContainer $size={size} ref={suffixContainerRef}>\n <Paragraph size={size}>{suffix}</Paragraph>\n </SuffixTextContainer>\n )}\n\n {(onClear || rightButton) && ( // TODO: Render only if value is present\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n <InputButtonContainer ref={inputButtonContainerRef} $size={size}>\n {onClear && (\n <ClearButton\n onClick={onClear}\n disabled={field.disabled}\n aria-label='Clear'\n size={size}\n >\n {size === 'sm' ? <SmallCircleXInverseIcon /> : <CircleXInverseIcon />}\n </ClearButton>\n )}\n {rightButton &&\n cloneElement(rightButton, {\n size: 'sm',\n width: rightButton.props.width || 'auto',\n style: rightButtonStyles,\n })}\n </InputButtonContainer>\n )}\n </Container>\n </FormControlContext.Provider>\n );\n});\n\nexport default Input;\n"],"mappings":";;;;;;;;;;;;AAyBA,MAAM,YAAY,OAAO,GAAG;;;;;AAM5B,MAAM,WAAW,OAAO,GAA2B;;UAEzC,QAAQ,GAAG;;;;;WAKV,MAAM,oBAAoB;aACxB,EAAE,YAAa,UAAU,OAAO,SAAS,OAAQ;YAClD,EAAE,YAAa,UAAU,OAAO,SAAS,OAAQ;;;;;;;;AAS7D,MAAM,uBAAuB,OAAO,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qB,oBACpC,GACD,EAAE;KACT,CAAC;IAKD,UAAU,EAAE,WAAW,gBACtB,oBAAC,qBAAD;KAAqB,OAAO;KAAM,KAAK;eACrC,oBAAC,WAAD;MAAiB;gBAAO;MAAmB,CAAA;KACvB,CAAA;KAGtB,WAAW,gBAEX,qBAAC,sBAAD;KAAsB,KAAK;KAAyB,OAAO;eAA3D,CACG,WACC,oBAAC,aAAD;MACE,SAAS;MACT,UAAU,MAAM;MAChB,cAAW;MACL;gBAEL,SAAS,OAAO,oBAACA,sBAAD,EAA2B,CAAA,GAAG,oBAAC,oBAAD,EAAsB,CAAA;MACzD,CAAA,EAEf,eACC,aAAa,aAAa;MACxB,MAAM;MACN,OAAO,YAAY,MAAM,SAAS;MAClC,OAAO;MACR,CAAC,CACiB;;IAEf;;EACgB,CAAA;EAEhC"}
1
+ {"version":3,"file":"Input-BFI_e7aU.mjs","names":["SmallCircleXInverseIcon"],"sources":["../components/Input/Input.tsx"],"sourcesContent":["import {\n cloneElement,\n type ComponentPropsWithoutRef,\n type CSSProperties,\n forwardRef,\n type MouseEventHandler,\n type ReactElement,\n type ReactNode,\n useEffect,\n useRef,\n useState,\n} from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { BorderRadius, Color, Spacing } from '@persona/design-tokens';\nimport { CircleXInverseIcon } from '@persona/icons';\nimport { CircleXInverseIcon as SmallCircleXInverseIcon } from '@persona/icons/12px';\nimport Button, { type ButtonProps } from 'design-system/components/Button';\nimport useFormField, {\n FormControlContext,\n} from 'design-system/components/FormControl/useFormField';\nimport { Paragraph } from 'design-system/components/Text';\nimport { isHovered, isNotDisabled } from 'design-system/lib/pseudoClass';\nimport inputMixin, { type InputMixinProps, type InputSizes } from 'design-system/mixins/input';\n\nconst Container = styled.div`\n display: flex;\n position: relative;\n width: 100%;\n`;\n\nconst LeftIcon = styled.div<{ $size?: InputSizes }>`\n position: absolute;\n left: ${Spacing[2]};\n top: 50%;\n transform: translateY(-50%);\n margin: 0;\n font-size: 0px;\n color: ${Color.BorderIconSecondary};\n height: ${({ $size }) => ($size === 'sm' ? '12px' : '16px')};\n width: ${({ $size }) => ($size === 'sm' ? '12px' : '16px')};\n pointer-events: none;\n\n svg {\n height: 100%;\n width: 100%;\n }\n`;\n\nconst InputButtonContainer = styled.div<{ $size?: InputSizes }>`\n position: absolute;\n display: flex;\n gap: ${Spacing[2]};\n right: ${({ $size }) => ($size === 'sm' ? '3px' : Spacing[1])};\n top: 50%;\n transform: translateY(-50%);\n margin: 0;\n font-size: 0px;\n`;\n\nexport const ClearButton = styled(Button).attrs({\n width: 'icon',\n variant: 'basic',\n})`\n background-color: transparent;\n padding: 0;\n height: ${({ size }) => (size === 'sm' ? '18px' : '24px')};\n width: ${({ size }) => (size === 'sm' ? '18px' : '24px')};\n border-radius: ${BorderRadius.Md};\n color: ${Color.BorderIconSecondary};\n\n ${({ disabled }) =>\n disabled &&\n css`\n color: ${Color.BorderIconDisabled};\n `}\n\n &${isHovered}${isNotDisabled} {\n background-color: transparent;\n }\n\n svg {\n height: ${({ size }) => (size === 'sm' ? '12px' : '16px')};\n width: ${({ size }) => (size === 'sm' ? '12px' : '16px')};\n }\n`;\n\nconst SuffixTextContainer = styled.div<{ $size: InputSizes }>`\n position: absolute;\n right: ${Spacing[2]};\n top: ${({ $size }) => ($size === 'sm' ? '2px' : '6px')};\n`;\n\ninterface StyledInputProps extends InputMixinProps {\n $leftIcon?: ReactNode;\n $hasRightItem?: boolean;\n}\n\nexport interface InputProps\n extends Omit<ComponentPropsWithoutRef<'input'>, 'size'>, Omit<InputMixinProps, '$size'> {\n /**\n * Size of the input. If you need the HTML size attr, use inputSize.\n */\n size?: InputSizes;\n\n /**\n * `size` HTML attr on `<input>`\n */\n inputSize?: ComponentPropsWithoutRef<'input'>['size'];\n\n leftIcon?: StyledInputProps['$leftIcon'];\n hasRightItem?: boolean;\n}\n\nconst InputBase = styled.input<StyledInputProps>`\n ${inputMixin};\n line-height: 1;\n\n &::placeholder {\n color: ${({ theme }) => theme.color.text.secondary};\n }\n\n ${({ $size, $leftIcon, $hasRightItem }) => {\n let btnSpacing: string;\n switch ($size) {\n default:\n case 'md':\n btnSpacing = `calc(${Spacing[3]} + 16px + ${Spacing[1]})`;\n return css`\n padding-right: ${$hasRightItem ? btnSpacing : Spacing[3]};\n padding-left: ${$leftIcon ? btnSpacing : Spacing[3]};\n `;\n case 'sm':\n btnSpacing = `calc(${Spacing[2]} + 16px + ${Spacing[1]})`;\n return css`\n padding-right: ${$hasRightItem ? btnSpacing : Spacing[2]};\n padding-left: ${$leftIcon ? btnSpacing : Spacing[2]};\n `;\n }\n }}\n`;\n\nexport const Input = forwardRef<HTMLInputElement, InputProps>(function Input(\n { size, leftIcon, hasRightItem, id, hasWarning, hasError, disabled, maxLength, ...props },\n ref,\n) {\n const field = useFormField({ hasWarning, hasError, disabled, inputId: id, maxLength });\n\n return (\n <InputBase\n $size={size}\n $leftIcon={leftIcon}\n $hasRightItem={hasRightItem}\n ref={ref}\n id={field.inputId}\n aria-describedby={`${field.helperTextId}${field.hasWarning ? ` ${field.warningTextId}` : ''}`}\n aria-errormessage={field.hasError ? field.errorTextId : undefined}\n aria-invalid={field.hasError}\n hasWarning={field.hasWarning}\n hasError={field.hasError}\n disabled={field.disabled}\n maxLength={field.maxLength}\n {...props}\n size={props.inputSize}\n />\n );\n});\n\nexport interface InputGroupProps\n extends ComponentPropsWithoutRef<'div'>, Omit<InputMixinProps, '$size'> {\n /**\n * Input\n */\n children: ReactElement<InputProps>;\n\n /**\n * Size of the input. If you need the HTML size attr, use inputSize.\n */\n size?: InputSizes;\n\n /**\n * Icon to render to the left of the input field.\n *\n * Import icon from `@persona-id/icons`. Use 24px for `lg` input size.\n */\n leftIcon?: ReactNode;\n\n /**\n * Renders clear button to the right and calls function upon click.\n */\n onClear?: MouseEventHandler<HTMLButtonElement>;\n\n /**\n * Button to be rendered to the right of the input\n */\n rightButton?: ReactElement<ButtonProps>;\n\n /**\n * Disabled prop will be passed down to `<Input>`\n */\n disabled?: boolean;\n\n /**\n * Suffix text to be shown to the right of the input (inside the input field)\n */\n suffix?: string;\n}\n\nexport const InputGroup = forwardRef<HTMLDivElement, InputGroupProps>(function InputGroup(\n {\n size = 'md',\n leftIcon,\n onClear,\n rightButton,\n children,\n disabled,\n hasWarning,\n hasError,\n suffix,\n ...props\n },\n ref,\n) {\n const field = useFormField({ hasWarning, hasError, disabled });\n const inputButtonContainerRef = useRef<HTMLDivElement>();\n const [inputPaddingRight, setInputPaddingRight] = useState<string | null>(null);\n\n const suffixContainerRef = useRef<HTMLDivElement | null>(null);\n const [suffixPaddingRight, setSuffixPaddingRight] = useState<string | null>(null);\n\n useEffect(() => {\n // We only need to calculate padding in presence of the right button\n if (rightButton && inputButtonContainerRef.current) {\n setInputPaddingRight(`${12 + inputButtonContainerRef.current.offsetWidth + 4}px`);\n }\n }, [setInputPaddingRight]);\n\n useEffect(() => {\n if (suffix && suffixContainerRef.current) {\n // 12px is 8px padding to the right, plus the 4px gap between the suffix and the input.\n setSuffixPaddingRight(`${12 + suffixContainerRef.current.offsetWidth}px`);\n }\n }, [suffix, setSuffixPaddingRight]);\n\n const rightButtonStyles: CSSProperties =\n size === 'sm'\n ? {\n height: '18px',\n }\n : {};\n\n return (\n <FormControlContext.Provider value={field}>\n <Container ref={ref} {...props}>\n {leftIcon && <LeftIcon $size={size}>{leftIcon}</LeftIcon>}\n {cloneElement(children, {\n size,\n leftIcon: leftIcon,\n ...(rightButton ? { rightButton } : {}),\n hasRightItem: onClear || suffix,\n style:\n inputPaddingRight || suffixPaddingRight\n ? {\n paddingRight: inputPaddingRight || suffixPaddingRight,\n }\n : {},\n })}\n\n {/* Renders only if there's a suffix and NO button */}\n {/* At some point, this should be moved so that it's not absolutely positioned, and\n these are both wrapped within an \"input\" container */}\n {suffix && !(onClear || rightButton) && (\n <SuffixTextContainer $size={size} ref={suffixContainerRef}>\n <Paragraph size={size}>{suffix}</Paragraph>\n </SuffixTextContainer>\n )}\n\n {(onClear || rightButton) && ( // TODO: Render only if value is present\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n <InputButtonContainer ref={inputButtonContainerRef} $size={size}>\n {onClear && (\n <ClearButton\n onClick={onClear}\n disabled={field.disabled}\n aria-label='Clear'\n size={size}\n >\n {size === 'sm' ? <SmallCircleXInverseIcon /> : <CircleXInverseIcon />}\n </ClearButton>\n )}\n {rightButton &&\n cloneElement(rightButton, {\n size: 'sm',\n width: rightButton.props.width || 'auto',\n style: rightButtonStyles,\n })}\n </InputButtonContainer>\n )}\n </Container>\n </FormControlContext.Provider>\n );\n});\n\nexport default Input;\n"],"mappings":";;;;;;;;;;;;AAyBA,MAAM,YAAY,OAAO,GAAG;;;;;AAM5B,MAAM,WAAW,OAAO,GAA2B;;UAEzC,QAAQ,GAAG;;;;;WAKV,MAAM,oBAAoB;aACxB,EAAE,YAAa,UAAU,OAAO,SAAS,OAAQ;YAClD,EAAE,YAAa,UAAU,OAAO,SAAS,OAAQ;;;;;;;;AAS7D,MAAM,uBAAuB,OAAO,GAA2B;;;SAGtD,QAAQ,GAAG;YACR,EAAE,YAAa,UAAU,OAAO,QAAQ,QAAQ,GAAI;;;;;;AAOhE,MAAa,cAAc,OAAO,OAAO,CAAC,MAAM;CAC9C,OAAO;CACP,SAAS;CACV,CAAC;;;aAGW,EAAE,WAAY,SAAS,OAAO,SAAS,OAAQ;YAChD,EAAE,WAAY,SAAS,OAAO,SAAS,OAAQ;mBACxC,aAAa,GAAG;WACxB,MAAM,oBAAoB;;KAEhC,EAAE,eACH,YACA,GAAG;eACQ,MAAM,mBAAmB;MAClC;;KAED,YAAY,cAAc;;;;;eAKhB,EAAE,WAAY,SAAS,OAAO,SAAS,OAAQ;cAChD,EAAE,WAAY,SAAS,OAAO,SAAS,OAAQ;;;AAI7D,MAAM,sBAAsB,OAAO,GAA0B;;WAElD,QAAQ,GAAG;UACZ,EAAE,YAAa,UAAU,OAAO,QAAQ,MAAO;;AAwBzD,MAAM,YAAY,OAAO,KAAuB;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r as ButtonProps } from "./Button-C_3p5Xfi.cjs";
3
- import { n as InputSizes, t as InputMixinProps } from "./input-BkzqXwn7.cjs";
3
+ import { n as InputSizes, t as InputMixinProps } from "./input-DPB0cX2m.cjs";
4
4
  import * as _$react from "react";
5
5
  import { ComponentPropsWithoutRef, MouseEventHandler, ReactElement, ReactNode } from "react";
6
6
  import * as _$styled_components0 from "styled-components";
@@ -62,4 +62,4 @@ interface InputGroupProps extends ComponentPropsWithoutRef<'div'>, Omit<InputMix
62
62
  declare const InputGroup: _$react.ForwardRefExoticComponent<InputGroupProps & _$react.RefAttributes<HTMLDivElement>>;
63
63
  //#endregion
64
64
  export { InputProps as a, InputGroupProps as i, Input as n, InputGroup as r, ClearButton as t };
65
- //# sourceMappingURL=Input-CEcTvtX2.d.cts.map
65
+ //# sourceMappingURL=Input-BM0DzWEf.d.cts.map
@@ -1,6 +1,6 @@
1
- import { t as PseudoClassProps } from "./PseudoClassProps-ySXCGUEQ.mjs";
2
- import { r as ButtonProps } from "./Button-DXsYU5qU.mjs";
3
- import { n as InputSizes, t as InputMixinProps } from "./input-DrG6mA0V.mjs";
1
+ import { t as PseudoClassProps } from "./PseudoClassProps-DLxPxo7T.mjs";
2
+ import { r as ButtonProps } from "./Button-9p469xA1.mjs";
3
+ import { n as InputSizes, t as InputMixinProps } from "./input-Bv5fKt5J.mjs";
4
4
  import * as _$styled_components0 from "styled-components";
5
5
  import * as _$react from "react";
6
6
  import { ComponentPropsWithoutRef, MouseEventHandler, ReactElement, ReactNode } from "react";
@@ -62,4 +62,4 @@ interface InputGroupProps extends ComponentPropsWithoutRef<'div'>, Omit<InputMix
62
62
  declare const InputGroup: _$react.ForwardRefExoticComponent<InputGroupProps & _$react.RefAttributes<HTMLDivElement>>;
63
63
  //#endregion
64
64
  export { InputProps as a, InputGroupProps as i, Input as n, InputGroup as r, ClearButton as t };
65
- //# sourceMappingURL=Input-4KeYlOWM.d.mts.map
65
+ //# sourceMappingURL=Input-BPClVzwD.d.mts.map
@@ -1,14 +1,14 @@
1
1
  const require_chunk = require("./chunk-CKQMccvm.cjs");
2
2
  const require_lib_pseudoClass = require("./lib/pseudoClass.cjs");
3
3
  const require_mixins_input = require("./mixins/input.cjs");
4
- const require_Text = require("./Text-CzN0DOXV.cjs");
5
- const require_IconButton = require("./IconButton-DNy7g5zh.cjs");
6
- const require_useFormField = require("./useFormField-B98dmreO.cjs");
4
+ const require_Text = require("./Text-G9QmYf0P.cjs");
5
+ const require_IconButton = require("./IconButton-nlgjJQCS.cjs");
6
+ const require_useFormField = require("./useFormField-BZlArnsI.cjs");
7
7
  let _persona_design_tokens = require("@persona/design-tokens");
8
8
  let styled_components = require("styled-components");
9
9
  styled_components = require_chunk.__toESM(styled_components);
10
- let react = require("react");
11
10
  let react_jsx_runtime = require("react/jsx-runtime");
11
+ let react = require("react");
12
12
  let _persona_icons = require("@persona/icons");
13
13
  let _persona_icons_12px = require("@persona/icons/12px");
14
14
  //#region components/Input/Input.tsx
@@ -206,4 +206,4 @@ Object.defineProperty(exports, "InputGroup", {
206
206
  }
207
207
  });
208
208
 
209
- //# sourceMappingURL=Input-BDLUq-pK.cjs.map
209
+ //# sourceMappingURL=Input-OJPQ07TW.cjs.map