@persona/design-system 0.1.9 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (450) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/{Action-CVtzREhU.d.mts → Action-DnR0YTxO.d.mts} +3 -3
  3. package/dist/Action.d.mts +1 -1
  4. package/dist/AdvancedFilterRuleRow.d.mts +3 -3
  5. package/dist/AdvancedFilterRulesPopover.d.mts +3 -3
  6. package/dist/ArrayValueControl.d.mts +1 -1
  7. package/dist/Attribute.d.mts +4 -4
  8. package/dist/AttributeGrid.d.mts +1 -1
  9. package/dist/{Badge-DEVbRlJX.mjs → Badge-DRn_r6is.mjs} +2 -2
  10. package/dist/{Badge-DEVbRlJX.mjs.map → Badge-DRn_r6is.mjs.map} +1 -1
  11. package/dist/Banner.d.mts +1 -1
  12. package/dist/BooleanValueControl.d.mts +1 -1
  13. package/dist/{Breadcrumb-lziQ1FX9.d.mts → Breadcrumb-DEwZFJHF.d.mts} +10 -2
  14. package/dist/Breadcrumb.d.mts +1 -1
  15. package/dist/{Breadcrumbs-DJ5qqqRD.d.mts → Breadcrumbs-0e_3v9FF.d.mts} +2 -2
  16. package/dist/{Breadcrumbs-W8hIhdHD.mjs → Breadcrumbs-Byf2ye6H.mjs} +43 -26
  17. package/dist/Breadcrumbs-Byf2ye6H.mjs.map +1 -0
  18. package/dist/Breadcrumbs.d.mts +1 -1
  19. package/dist/{Button-Vd5O4DUp.d.mts → Button-DkjwN_Op.d.mts} +3 -3
  20. package/dist/Button.d.mts +1 -1
  21. package/dist/ButtonGroup.d.mts +1 -1
  22. package/dist/Calendar.d.mts +1 -1
  23. package/dist/CalendarBase.d.mts +1 -1
  24. package/dist/{Card-BMCB9eFC.mjs → Card-CLTkZLKr.mjs} +4 -4
  25. package/dist/{Card-BMCB9eFC.mjs.map → Card-CLTkZLKr.mjs.map} +1 -1
  26. package/dist/{Card-CqnG--CU.d.mts → Card-DxFajLnx.d.mts} +4 -4
  27. package/dist/Card.d.mts +1 -1
  28. package/dist/Card2.d.mts +1 -1
  29. package/dist/{CardV2-C0fcOUdp.mjs → CardV2-m9yOInMU.mjs} +16 -16
  30. package/dist/{CardV2-C0fcOUdp.mjs.map → CardV2-m9yOInMU.mjs.map} +1 -1
  31. package/dist/{Checkbox-Bm8exUfH.d.mts → Checkbox-Bmm-r5ei.d.mts} +1 -1
  32. package/dist/{Checkbox-BcuiFvK7.mjs → Checkbox-CU27-Aa8.mjs} +6 -6
  33. package/dist/{Checkbox-BcuiFvK7.mjs.map → Checkbox-CU27-Aa8.mjs.map} +1 -1
  34. package/dist/Checkbox.d.mts +1 -1
  35. package/dist/CheckboxGroupField.d.mts +2 -2
  36. package/dist/ChoicesValueControl.d.mts +1 -1
  37. package/dist/{Combobox-BaD0f2Du.d.mts → Combobox-BgKEHP9p.d.mts} +3 -3
  38. package/dist/{Combobox-B6JyLog8.mjs → Combobox-DhTUY8JT.mjs} +55 -31
  39. package/dist/Combobox-DhTUY8JT.mjs.map +1 -0
  40. package/dist/Combobox.d.mts +2 -2
  41. package/dist/{ComboboxBase-BsPf8BZh.d.mts → ComboboxBase-Dmzn8a53.d.mts} +7 -7
  42. package/dist/ComboboxBase.d.mts +1 -1
  43. package/dist/{ComboboxMultiSelect-DhLzCWbz.d.mts → ComboboxMultiSelect-BLKUKNEW.d.mts} +2 -2
  44. package/dist/ComboboxMultiSelect.d.mts +1 -1
  45. package/dist/{ComboboxSingleSelect-P0r5rs_u.d.mts → ComboboxSingleSelect-Kpl-iOok.d.mts} +4 -4
  46. package/dist/ComboboxSingleSelect.d.mts +1 -1
  47. package/dist/{CompactBar-CXqlVKy7.d.mts → CompactBar-E9hPDRvI.d.mts} +3 -3
  48. package/dist/CompactBar.d.mts +1 -1
  49. package/dist/{ConfigFormGroup-yhb2jldT.mjs → ConfigFormGroup-GgzSDzgL.mjs} +3 -3
  50. package/dist/{ConfigFormGroup-yhb2jldT.mjs.map → ConfigFormGroup-GgzSDzgL.mjs.map} +1 -1
  51. package/dist/{ControlBar-tOCQnbAl.d.mts → ControlBar-DYrjBDzu.d.mts} +2 -2
  52. package/dist/ControlBar.d.mts +1 -1
  53. package/dist/DataTable.d.mts +4 -4
  54. package/dist/DateField.d.mts +1 -1
  55. package/dist/{DatePicker-Bw79p-Lx.mjs → DatePicker-DpGvo7Bd.mjs} +23 -23
  56. package/dist/DatePicker-DpGvo7Bd.mjs.map +1 -0
  57. package/dist/DatePicker.d.mts +1 -1
  58. package/dist/DateRangePicker.d.mts +2 -1
  59. package/dist/DateValueControl.d.mts +1 -1
  60. package/dist/{DropdownButton-BI3IFJun.mjs → DropdownButton-DGgfGW_o.mjs} +3 -3
  61. package/dist/{DropdownButton-BI3IFJun.mjs.map → DropdownButton-DGgfGW_o.mjs.map} +1 -1
  62. package/dist/DropdownButton.d.mts +2 -2
  63. package/dist/{DropdownMenu-D6nfAsi0.d.mts → DropdownMenu-B2t3Bwky.d.mts} +3 -3
  64. package/dist/{DropdownMenu-D25WBCah.mjs → DropdownMenu-DZIFSJXD.mjs} +3 -3
  65. package/dist/{DropdownMenu-D25WBCah.mjs.map → DropdownMenu-DZIFSJXD.mjs.map} +1 -1
  66. package/dist/DropdownMenu.d.mts +1 -1
  67. package/dist/{ErrorProps-CN2XjaOX.d.mts → ErrorProps-DX50vo-U.d.mts} +1 -1
  68. package/dist/ErrorProps.d.mts +1 -1
  69. package/dist/{FieldRegistry-rqSkjchY.d.mts → FieldRegistry-COyIA4VU.d.mts} +2 -2
  70. package/dist/FieldRegistry.d.mts +1 -1
  71. package/dist/{FilterBar-D3LiIy1-.d.mts → FilterBar-CS2YjiTr.d.mts} +8 -5
  72. package/dist/FilterBar.d.mts +1 -1
  73. package/dist/FilterPickerMenu.d.mts +3 -3
  74. package/dist/FilterPill.d.mts +1 -1
  75. package/dist/FilterPopover.d.mts +13 -3
  76. package/dist/FloatValueControl.d.mts +1 -1
  77. package/dist/{FormControl-CFU9uKF7.mjs → FormControl-BIXJ-FPI.mjs} +5 -5
  78. package/dist/{FormControl-CFU9uKF7.mjs.map → FormControl-BIXJ-FPI.mjs.map} +1 -1
  79. package/dist/{FormControl-DH3bgqaB.d.mts → FormControl-CZFmub1N.d.mts} +3 -3
  80. package/dist/FormControl.d.mts +1 -1
  81. package/dist/FormControlLabel.d.mts +1 -1
  82. package/dist/{FormField-BugkBvN4.d.mts → FormField-8rlT8pm0.d.mts} +2 -2
  83. package/dist/{FormField-DdmgSWq4.mjs → FormField-DcGQvgNW.mjs} +32 -31
  84. package/dist/FormField-DcGQvgNW.mjs.map +1 -0
  85. package/dist/FormField.d.mts +1 -1
  86. package/dist/{Header-CDTYK1XJ.d.mts → Header-OLZuv8fF.d.mts} +2 -2
  87. package/dist/Header.d.mts +1 -1
  88. package/dist/{HelperTooltip-B7Ysh8B3.d.mts → HelperTooltip-CJDG7Ugp.d.mts} +3 -3
  89. package/dist/HelperTooltip.d.mts +1 -1
  90. package/dist/{HoverCopyableField-7TWP0Y1Z.mjs → HoverCopyableField-BHdCaR-R.mjs} +6 -6
  91. package/dist/{HoverCopyableField-7TWP0Y1Z.mjs.map → HoverCopyableField-BHdCaR-R.mjs.map} +1 -1
  92. package/dist/HoverCopyableField.d.mts +1 -1
  93. package/dist/{IconButton-P8w0JDI5.mjs → IconButton-DC4rh6ow.mjs} +5 -5
  94. package/dist/{IconButton-P8w0JDI5.mjs.map → IconButton-DC4rh6ow.mjs.map} +1 -1
  95. package/dist/{IconButton-BHCmHIx5.d.mts → IconButton-Dc17jZPG.d.mts} +2 -2
  96. package/dist/IconButton.d.mts +1 -1
  97. package/dist/ImageTile.d.mts +2 -2
  98. package/dist/InlineCombobox.d.mts +2 -2
  99. package/dist/InlineInput.d.mts +1 -1
  100. package/dist/{Input-DMgVyZyq.d.mts → Input-DsS4J78T.d.mts} +5 -5
  101. package/dist/{Input-QC6xla6I.mjs → Input-PWfwMSJ7.mjs} +5 -5
  102. package/dist/{Input-QC6xla6I.mjs.map → Input-PWfwMSJ7.mjs.map} +1 -1
  103. package/dist/Input.d.mts +1 -1
  104. package/dist/{InputProps-BnjxrdWQ.d.mts → InputProps-Buxtnz77.d.mts} +2 -2
  105. package/dist/InputProps.d.mts +1 -1
  106. package/dist/IntegerValueControl.d.mts +1 -1
  107. package/dist/LayoutLoadingShimmer.d.mts +1 -1
  108. package/dist/Link.d.mts +1 -1
  109. package/dist/{ListBox-TrL3Tb7X.mjs → ListBox-BwD-q7wF.mjs} +12 -12
  110. package/dist/{ListBox-TrL3Tb7X.mjs.map → ListBox-BwD-q7wF.mjs.map} +1 -1
  111. package/dist/{ListBox-D09N1a5D.d.mts → ListBox-Nl9aOBeh.d.mts} +5 -5
  112. package/dist/ListBox.d.mts +1 -1
  113. package/dist/ListBoxField.d.mts +3 -3
  114. package/dist/{LoadingShimmer-Dsc_RCCf.mjs → LoadingShimmer-BPYPtFE1.mjs} +1 -1
  115. package/dist/{LoadingShimmer-Dsc_RCCf.mjs.map → LoadingShimmer-BPYPtFE1.mjs.map} +1 -1
  116. package/dist/LoadingShimmer.d.mts +2 -2
  117. package/dist/{LogicRow-BcuiSTHN.d.mts → LogicRow-BAREMenx.d.mts} +4 -4
  118. package/dist/LogicRow.d.mts +1 -1
  119. package/dist/MaskedInput.d.mts +1 -1
  120. package/dist/{Menu-Bv8dsrz6.d.mts → Menu-DM9OoZ71.d.mts} +4 -4
  121. package/dist/{Menu-DmeMgN-i.mjs → Menu-DpM8o234.mjs} +4 -4
  122. package/dist/{Menu-DmeMgN-i.mjs.map → Menu-DpM8o234.mjs.map} +1 -1
  123. package/dist/Menu.d.mts +1 -1
  124. package/dist/{MiddleTruncatedText-GXI-CPvs.mjs → MiddleTruncatedText-Bzpg3zAU.mjs} +3 -3
  125. package/dist/{MiddleTruncatedText-GXI-CPvs.mjs.map → MiddleTruncatedText-Bzpg3zAU.mjs.map} +1 -1
  126. package/dist/Modal.d.mts +3 -3
  127. package/dist/{PageHeader-jSLud2JI.mjs → PageHeader-Dq-J3san.mjs} +3 -3
  128. package/dist/{PageHeader-jSLud2JI.mjs.map → PageHeader-Dq-J3san.mjs.map} +1 -1
  129. package/dist/PageHeader.d.mts +2 -2
  130. package/dist/PageLayout.d.mts +16 -0
  131. package/dist/{PageSelector-vay4jpMp.d.mts → PageSelector-Ca4TcyxG.d.mts} +3 -3
  132. package/dist/PageSelector.d.mts +1 -1
  133. package/dist/{Pagination-ygLutOst.d.mts → Pagination-Dcmv7bVe.d.mts} +2 -2
  134. package/dist/{Pagination-BeYukNCj.mjs → Pagination-GALyid4q.mjs} +7 -7
  135. package/dist/{Pagination-BeYukNCj.mjs.map → Pagination-GALyid4q.mjs.map} +1 -1
  136. package/dist/Pagination.d.mts +1 -1
  137. package/dist/{Pii-QsTrz8wn.mjs → Pii-BalLvfze.mjs} +2 -2
  138. package/dist/{Pii-QsTrz8wn.mjs.map → Pii-BalLvfze.mjs.map} +1 -1
  139. package/dist/Pii.d.mts +1 -1
  140. package/dist/PillShell.d.mts +1 -1
  141. package/dist/{Popover-BkDpDdaO.mjs → Popover-BZ5Bs80y.mjs} +5 -5
  142. package/dist/{Popover-BkDpDdaO.mjs.map → Popover-BZ5Bs80y.mjs.map} +1 -1
  143. package/dist/Popover.d.mts +1 -1
  144. package/dist/ProgressBar.d.mts +1 -1
  145. package/dist/ProgressIndicator.d.mts +1 -1
  146. package/dist/{PseudoClassProps-DLxPxo7T.d.mts → PseudoClassProps-CcSlKNev.d.mts} +1 -1
  147. package/dist/PseudoClassProps.d.mts +1 -1
  148. package/dist/{Radio-CSX2eO-O.mjs → Radio-CtPz3EzX.mjs} +3 -3
  149. package/dist/{Radio-CSX2eO-O.mjs.map → Radio-CtPz3EzX.mjs.map} +1 -1
  150. package/dist/{RadioGroup-DKqbSfju.d.mts → RadioGroup-Xn46ovrV.d.mts} +1 -1
  151. package/dist/{RadioGroup-CnK0opBd.mjs → RadioGroup-sjBzFE_-.mjs} +3 -3
  152. package/dist/{RadioGroup-CnK0opBd.mjs.map → RadioGroup-sjBzFE_-.mjs.map} +1 -1
  153. package/dist/RadioGroup.d.mts +1 -1
  154. package/dist/RangeCalendar.d.mts +3 -1
  155. package/dist/RangeCalendarPresets.d.mts +1 -1
  156. package/dist/RuleEditorFields.d.mts +3 -3
  157. package/dist/RulesPill.d.mts +1 -1
  158. package/dist/{SearchInput-Bp2yjaE1.d.mts → SearchInput-Try11aJD.d.mts} +10 -3
  159. package/dist/SearchInput.d.mts +1 -1
  160. package/dist/Section.d.mts +1 -1
  161. package/dist/{SectionHeading-Q-rx2LEd.d.mts → SectionHeading-DvP9NEgN.d.mts} +2 -2
  162. package/dist/SectionHeading.d.mts +1 -1
  163. package/dist/{SegmentedControl-CgDQIVll.mjs → SegmentedControl-BugnH-h2.mjs} +4 -4
  164. package/dist/{SegmentedControl-CgDQIVll.mjs.map → SegmentedControl-BugnH-h2.mjs.map} +1 -1
  165. package/dist/{SegmentedControl-DrjdUOU9.d.mts → SegmentedControl-DckAdhcD.d.mts} +2 -2
  166. package/dist/SegmentedControl.d.mts +1 -1
  167. package/dist/{Select-Bk27TgN8.d.mts → Select-BmJ1OjXA.d.mts} +4 -4
  168. package/dist/{Select-C1ZoRk39.mjs → Select-DL-AjL0Q.mjs} +9 -9
  169. package/dist/{Select-C1ZoRk39.mjs.map → Select-DL-AjL0Q.mjs.map} +1 -1
  170. package/dist/Select.d.mts +1 -1
  171. package/dist/Slider.d.mts +1 -1
  172. package/dist/SliderRHF.d.mts +1 -1
  173. package/dist/SliderThumb.d.mts +1 -1
  174. package/dist/{Spacer-CJp0lwkL.mjs → Spacer-Ln3KChb5.mjs} +1 -1
  175. package/dist/{Spacer-CJp0lwkL.mjs.map → Spacer-Ln3KChb5.mjs.map} +1 -1
  176. package/dist/{Spinner-BEPF42RW.mjs → Spinner-BgBCCHGo.mjs} +1 -1
  177. package/dist/{Spinner-BEPF42RW.mjs.map → Spinner-BgBCCHGo.mjs.map} +1 -1
  178. package/dist/{Stack-CkV7k7TE.d.mts → Stack-CbcJykx9.d.mts} +2 -2
  179. package/dist/{Stack-Bl54WmhY.mjs → Stack-ckRN7LrP.mjs} +1 -1
  180. package/dist/{Stack-Bl54WmhY.mjs.map → Stack-ckRN7LrP.mjs.map} +1 -1
  181. package/dist/Stack.d.mts +1 -1
  182. package/dist/StatusIndicator.d.mts +1 -1
  183. package/dist/{Sticker-CyGb9dEu.mjs → Sticker-B0TbkV4o.mjs} +3 -3
  184. package/dist/{Sticker-CyGb9dEu.mjs.map → Sticker-B0TbkV4o.mjs.map} +1 -1
  185. package/dist/{Sticker-Bs25ISz7.d.mts → Sticker-BIVuastf.d.mts} +5 -5
  186. package/dist/Sticker.d.mts +1 -1
  187. package/dist/StringValueControl.d.mts +1 -1
  188. package/dist/SwatchPicker.d.mts +1 -1
  189. package/dist/Tab.d.mts +2 -2
  190. package/dist/{TabBar-Bn8PHHBZ.mjs → TabBar-DLf4Hwa4.mjs} +4 -4
  191. package/dist/{TabBar-Bn8PHHBZ.mjs.map → TabBar-DLf4Hwa4.mjs.map} +1 -1
  192. package/dist/TabBarIconButton.d.mts +1 -1
  193. package/dist/{Table-BNScLj9g.d.mts → Table-8jXlKYLy.d.mts} +1 -1
  194. package/dist/{Table-BfontAeY.mjs → Table-C-mx8Uj0.mjs} +5 -5
  195. package/dist/{Table-BfontAeY.mjs.map → Table-C-mx8Uj0.mjs.map} +1 -1
  196. package/dist/Table.d.mts +1 -1
  197. package/dist/{TableBody-CrDNMyT8.d.mts → TableBody-ByEcFueE.d.mts} +1 -1
  198. package/dist/TableBody.d.mts +1 -1
  199. package/dist/{TableBox-bmrKh_ax.mjs → TableBox-DGjKVQFO.mjs} +65 -55
  200. package/dist/TableBox-DGjKVQFO.mjs.map +1 -0
  201. package/dist/TableBox.d.mts +2 -2
  202. package/dist/{TableBoxCell-CvjLYhTV.d.mts → TableBoxCell-BmoPs1u1.d.mts} +7 -7
  203. package/dist/TableBoxCell.d.mts +1 -1
  204. package/dist/TableBoxField.d.mts +4 -4
  205. package/dist/{TableBoxRow-BzXECgid.d.mts → TableBoxRow-BAYvEDjT.d.mts} +4 -4
  206. package/dist/TableBoxRow.d.mts +1 -1
  207. package/dist/{TableBoxRowActions-BAiFXiCh.d.mts → TableBoxRowActions-DRs4MdK0.d.mts} +2 -2
  208. package/dist/TableBoxRowActions.d.mts +1 -1
  209. package/dist/TableCell.d.mts +1 -1
  210. package/dist/{TableControls-DVTtNAPo.mjs → TableControls-BK8DCsqi.mjs} +139 -67
  211. package/dist/TableControls-BK8DCsqi.mjs.map +1 -0
  212. package/dist/{TableControls-BehR7CKS.d.mts → TableControls-DscP6fyt.d.mts} +4 -4
  213. package/dist/TableControls.d.mts +1 -1
  214. package/dist/{TableControlsContext-D_SBFZN1.d.mts → TableControlsContext-BeJ7GHPN.d.mts} +2 -2
  215. package/dist/TableControlsContext.d.mts +1 -1
  216. package/dist/{TableHead-LxvG0e9k.d.mts → TableHead-g3afLl5B.d.mts} +1 -1
  217. package/dist/TableHead.d.mts +1 -1
  218. package/dist/{TableHeaderCell-Br8ZE3Xe.d.mts → TableHeaderCell-CWTMf2Fe.d.mts} +1 -1
  219. package/dist/TableHeaderCell.d.mts +1 -1
  220. package/dist/{TableLayout-BZeP8qfg.d.mts → TableLayout-hPlVO3dD.d.mts} +1 -1
  221. package/dist/TableLayout.d.mts +1 -1
  222. package/dist/{TableRow-BvS4yjo6.d.mts → TableRow-lvjbVccA.d.mts} +2 -2
  223. package/dist/TableRow.d.mts +1 -1
  224. package/dist/TableTH.d.mts +1 -1
  225. package/dist/{TableViewConfigurationDropdown-BYPh4dIP.d.mts → TableViewConfigurationDropdown-Ccxtk5dA.d.mts} +2 -2
  226. package/dist/TableViewConfigurationDropdown.d.mts +1 -1
  227. package/dist/TechnicalSticker-BrvR0zhC.mjs +266 -0
  228. package/dist/TechnicalSticker-BrvR0zhC.mjs.map +1 -0
  229. package/dist/TechnicalSticker.d.mts +7 -1
  230. package/dist/{Text-DNPbAuUG.d.mts → Text-CfIFUyHt.d.mts} +3 -3
  231. package/dist/{Text-RcEfNFLx.mjs → Text-hEoPeOc9.mjs} +1 -1
  232. package/dist/{Text-RcEfNFLx.mjs.map → Text-hEoPeOc9.mjs.map} +1 -1
  233. package/dist/Text.d.mts +1 -1
  234. package/dist/{TextArea-NCLsW-03.mjs → TextArea-BFsXUkuj.mjs} +3 -3
  235. package/dist/{TextArea-NCLsW-03.mjs.map → TextArea-BFsXUkuj.mjs.map} +1 -1
  236. package/dist/{TextArea-B89wtTsF.d.mts → TextArea-DiKEhpfD.d.mts} +2 -2
  237. package/dist/TextArea.d.mts +1 -1
  238. package/dist/{TextUnderlineTooltip-5-0D8s4z.d.mts → TextUnderlineTooltip-Bs6Jn5yr.d.mts} +3 -3
  239. package/dist/TextUnderlineTooltip.d.mts +1 -1
  240. package/dist/Tile.d.mts +2 -2
  241. package/dist/Toast.d.mts +1 -1
  242. package/dist/{Toggle-Bie9zCem.mjs → Toggle-CC2FTAKS.mjs} +5 -5
  243. package/dist/{Toggle-Bie9zCem.mjs.map → Toggle-CC2FTAKS.mjs.map} +1 -1
  244. package/dist/{Toggle-DzYLgxGk.d.mts → Toggle-oukvAn6V.d.mts} +1 -1
  245. package/dist/Toggle.d.mts +1 -1
  246. package/dist/{Tooltip-CUC-JuRL.d.mts → Tooltip-0iXDCV2O.d.mts} +3 -3
  247. package/dist/{Tooltip-BvDbmXak.mjs → Tooltip-CDvOu1UN.mjs} +3 -3
  248. package/dist/{Tooltip-BvDbmXak.mjs.map → Tooltip-CDvOu1UN.mjs.map} +1 -1
  249. package/dist/Tooltip.d.mts +1 -1
  250. package/dist/{TruncatedText-BJnowVTx.d.mts → TruncatedText-CdeU19Ev.d.mts} +1 -1
  251. package/dist/components/Attribute/index.mjs +10 -10
  252. package/dist/components/Attribute/index.mjs.map +1 -1
  253. package/dist/components/Badge/index.mjs +1 -1
  254. package/dist/components/Banner/index.mjs +1 -1
  255. package/dist/components/Breadcrumbs/index.d.mts +1 -1
  256. package/dist/components/Breadcrumbs/index.mjs +1 -1
  257. package/dist/components/Button/index.d.mts +2 -2
  258. package/dist/components/Button/index.mjs +1 -1
  259. package/dist/components/ButtonGroup/index.mjs +3 -3
  260. package/dist/components/Card/index.d.mts +2 -2
  261. package/dist/components/Card/index.mjs +1 -1
  262. package/dist/components/CardV2/index.d.mts +1 -1
  263. package/dist/components/CardV2/index.mjs +1 -1
  264. package/dist/components/Checkbox/index.d.mts +1 -1
  265. package/dist/components/Checkbox/index.mjs +1 -1
  266. package/dist/components/Combobox/index.d.mts +2 -2
  267. package/dist/components/Combobox/index.mjs +1 -1
  268. package/dist/components/ConfigFormGroup/index.mjs +2 -2
  269. package/dist/components/DataTable/TableControls/index.d.mts +15 -15
  270. package/dist/components/DataTable/TableControls/index.mjs +1 -1
  271. package/dist/components/DataTable/index.mjs +21 -21
  272. package/dist/components/DataTable/index.mjs.map +1 -1
  273. package/dist/components/DataTable/types.d.mts +2 -2
  274. package/dist/components/DatePicker/index.mjs +1 -1
  275. package/dist/components/DropdownButton/index.mjs +1 -1
  276. package/dist/components/DropdownMenu/index.d.mts +1 -1
  277. package/dist/components/DropdownMenu/index.mjs +1 -1
  278. package/dist/components/FormControl/index.d.mts +2 -2
  279. package/dist/components/FormControl/index.mjs +2 -2
  280. package/dist/components/FormField/index.d.mts +1 -1
  281. package/dist/components/FormField/index.mjs +1 -1
  282. package/dist/components/HoverCopyableField/index.mjs +1 -1
  283. package/dist/components/ImageTile/index.mjs +8 -8
  284. package/dist/components/Input/index.d.mts +1 -1
  285. package/dist/components/Input/index.mjs +1 -1
  286. package/dist/components/Link/index.mjs +1 -1
  287. package/dist/components/ListBox/index.d.mts +3 -3
  288. package/dist/components/ListBox/index.mjs +1 -1
  289. package/dist/components/LoadingShimmer/index.mjs +1 -1
  290. package/dist/components/MaskedInput/index.mjs +2 -2
  291. package/dist/components/Menu/index.d.mts +1 -1
  292. package/dist/components/Menu/index.mjs +1 -1
  293. package/dist/components/Modal/index.mjs +16 -8
  294. package/dist/components/Modal/index.mjs.map +1 -1
  295. package/dist/components/PageHeader/index.mjs +1 -1
  296. package/dist/components/Pagination/index.d.mts +3 -3
  297. package/dist/components/Pagination/index.mjs +1 -1
  298. package/dist/components/Pii/index.mjs +1 -1
  299. package/dist/components/Popover/index.mjs +1 -1
  300. package/dist/components/ProgressBar/index.mjs +1 -1
  301. package/dist/components/Radio/index.mjs +1 -1
  302. package/dist/components/RadioGroup/index.d.mts +1 -1
  303. package/dist/components/RadioGroup/index.mjs +1 -1
  304. package/dist/components/SegmentedControl/index.d.mts +1 -1
  305. package/dist/components/SegmentedControl/index.mjs +1 -1
  306. package/dist/components/Select/index.d.mts +1 -1
  307. package/dist/components/Select/index.mjs +1 -1
  308. package/dist/components/Slider/index.mjs +2 -2
  309. package/dist/components/Spacer/index.mjs +1 -1
  310. package/dist/components/Spinner/index.mjs +1 -1
  311. package/dist/components/Stack/index.d.mts +1 -1
  312. package/dist/components/Stack/index.mjs +1 -1
  313. package/dist/components/Sticker/index.d.mts +1 -1
  314. package/dist/components/Sticker/index.mjs +1 -1
  315. package/dist/components/TabBar/index.mjs +1 -1
  316. package/dist/components/Table/index.d.mts +7 -7
  317. package/dist/components/Table/index.mjs +1 -1
  318. package/dist/components/TableBox/index.d.mts +2 -2
  319. package/dist/components/TableBox/index.mjs +1 -1
  320. package/dist/components/TechnicalSticker/index.mjs +1 -231
  321. package/dist/components/Text/index.d.mts +1 -1
  322. package/dist/components/Text/index.mjs +1 -1
  323. package/dist/components/TextArea/index.d.mts +1 -1
  324. package/dist/components/TextArea/index.mjs +1 -1
  325. package/dist/components/Tile/index.mjs +4 -4
  326. package/dist/components/Toast/index.mjs +1 -1
  327. package/dist/components/Toggle/index.d.mts +1 -1
  328. package/dist/components/Toggle/index.mjs +1 -1
  329. package/dist/components/Tooltip/index.d.mts +3 -3
  330. package/dist/components/Tooltip/index.mjs +1 -1
  331. package/dist/compound-expression.d.mts +1 -1
  332. package/dist/{constants-BASogfT_.d.mts → constants-bA9kCzRQ.d.mts} +1 -1
  333. package/dist/constants.d.mts +1 -1
  334. package/dist/containers.d.mts +1 -1
  335. package/dist/display.d.mts +1 -1
  336. package/dist/fieldPickerOptions.d.mts +2 -2
  337. package/dist/{filter-size-context-Blw6Sd69.d.mts → filter-size-context-C1TvrE_O.d.mts} +2 -2
  338. package/dist/filter-size-context.d.mts +1 -1
  339. package/dist/helpers.d.mts +1 -1
  340. package/dist/{index-4_B2yRzD.d.mts → index-BC4edEsD.d.mts} +2 -2
  341. package/dist/{index-BxXTpeUb2.d.mts → index-CdaoOvFH.d.mts} +5 -5
  342. package/dist/{index-DDbjWdk0.d.mts → index-DJn4AeE4.d.mts} +4 -4
  343. package/dist/index.d.mts +1 -1
  344. package/dist/index2.d.mts +1 -1
  345. package/dist/index3.d.mts +3 -3
  346. package/dist/index4.d.mts +10 -10
  347. package/dist/{input-Bv5fKt5J.d.mts → input-D3Qd6dI8.d.mts} +3 -3
  348. package/dist/inputFields.d.mts +11 -11
  349. package/dist/{intersperse-vOYvFOfF.mjs → intersperse-yd3oMrQl.mjs} +1 -1
  350. package/dist/{intersperse-vOYvFOfF.mjs.map → intersperse-yd3oMrQl.mjs.map} +1 -1
  351. package/dist/lib/MiddleTruncatedText.mjs +1 -1
  352. package/dist/lib/PDSProvider.d.mts +1 -1
  353. package/dist/lib/TruncatedText.d.mts +1 -1
  354. package/dist/lib/TruncatedText.mjs +1 -1
  355. package/dist/lib/TruncatedTextWithTooltip.d.mts +1 -1
  356. package/dist/lib/TruncatedTextWithTooltip.mjs +2 -2
  357. package/dist/lib/embeddedSurfaceProtocol.d.mts +29 -0
  358. package/dist/lib/embeddedSurfaceProtocol.mjs +74 -0
  359. package/dist/lib/embeddedSurfaceProtocol.mjs.map +1 -0
  360. package/dist/lib/embeddedSurfaceRegistry.d.mts +11 -0
  361. package/dist/lib/embeddedSurfaceRegistry.mjs +19 -0
  362. package/dist/lib/embeddedSurfaceRegistry.mjs.map +1 -0
  363. package/dist/lib/message.d.mts +1 -1
  364. package/dist/lib/pseudoClass.d.mts +1 -1
  365. package/dist/lib/useEmbeddedSurface.d.mts +6 -0
  366. package/dist/lib/useEmbeddedSurface.mjs +135 -0
  367. package/dist/lib/useEmbeddedSurface.mjs.map +1 -0
  368. package/dist/lib/zindex.d.mts +2 -0
  369. package/dist/lib/zindex.mjs +2 -0
  370. package/dist/lib/zindex.mjs.map +1 -1
  371. package/dist/{message-CMHvlPGn.d.mts → message-CsK3sIq0.d.mts} +1 -1
  372. package/dist/mixins/focus.d.mts +1 -1
  373. package/dist/mixins/hoverable.d.mts +2 -2
  374. package/dist/mixins/input.d.mts +1 -1
  375. package/dist/mixins/menuItem.d.mts +2 -2
  376. package/dist/mixins/text.d.mts +1 -1
  377. package/dist/{operators-Bo31xlc2.d.mts → operators-C_xPzItk.d.mts} +2 -2
  378. package/dist/operators.d.mts +1 -1
  379. package/dist/{layouts → patterns}/LayoutLoadingShimmer/index.mjs +7 -7
  380. package/dist/patterns/LayoutLoadingShimmer/index.mjs.map +1 -0
  381. package/dist/patterns/PageLayout/index.d.mts +2 -0
  382. package/dist/patterns/PageLayout/index.mjs +35 -0
  383. package/dist/patterns/PageLayout/index.mjs.map +1 -0
  384. package/dist/{text-B21s9mRZ.d.mts → text-BaQdW8qa.d.mts} +1 -1
  385. package/dist/{theme-BzBpJXhO.d.mts → theme-D9Y6NOzb.d.mts} +1 -1
  386. package/dist/theme.d.mts +1 -1
  387. package/dist/{types-D7ppqnNj.d.mts → types-BKEwt0uq.d.mts} +2 -2
  388. package/dist/{types-DEh_pXgS.d.mts → types-CjHuZoVJ.d.mts} +1 -1
  389. package/dist/{types-TV9nVfSe.d.mts → types-DVsBRqjZ.d.mts} +1 -1
  390. package/dist/{types-D58IoRx6.d.mts → types-mb3woqzE.d.mts} +6 -7
  391. package/dist/types.d.mts +1 -1
  392. package/dist/types2.d.mts +1 -1
  393. package/dist/types3.d.mts +1 -1
  394. package/dist/types4.d.mts +1 -1
  395. package/dist/useComboboxFooterAction.d.mts +1 -1
  396. package/dist/{useFilterStateV2-DCQghouq.d.mts → useFilterStateV2-CGzRyv0i.d.mts} +3 -3
  397. package/dist/useFilterStateV2.d.mts +1 -1
  398. package/dist/{useFormField-D8mLsiQc.d.mts → useFormField-DhwEi45-.d.mts} +2 -2
  399. package/dist/{useFormField-DhYd6bNn.mjs → useFormField-eftOPiXj.mjs} +2 -2
  400. package/dist/{useFormField-DhYd6bNn.mjs.map → useFormField-eftOPiXj.mjs.map} +1 -1
  401. package/dist/useFormField.d.mts +1 -1
  402. package/dist/{useFormGroup-DWVW7A9f.mjs → useFormGroup-BMukAMAd.mjs} +1 -1
  403. package/dist/{useFormGroup-DWVW7A9f.mjs.map → useFormGroup-BMukAMAd.mjs.map} +1 -1
  404. package/dist/{useTableBoxDragAndDrop-BMo-iaUF.d.mts → useTableBoxDragAndDrop-CsnN52lx.d.mts} +1 -1
  405. package/dist/useTableBoxDragAndDrop.d.mts +1 -1
  406. package/dist/{useToggle-Bo3yd14Y.mjs → useToggle-3k3EkV8V.mjs} +1 -1
  407. package/dist/{useToggle-Bo3yd14Y.mjs.map → useToggle-3k3EkV8V.mjs.map} +1 -1
  408. package/dist/useTruncation.d.mts +1 -1
  409. package/dist/{utilities-BO_95qFA.d.mts → utilities-DnSIlR1i.d.mts} +1 -1
  410. package/dist/utilities.d.mts +1 -1
  411. package/dist/utils/storybook.mjs +1 -1
  412. package/dist/utils/testing.d.mts +1 -1
  413. package/dist/utils/testing.mjs +1 -1
  414. package/dist/utils.d.mts +1 -1
  415. package/dist/{validation-vLh3t2dk.d.mts → validation-BdP2vajF.d.mts} +3 -3
  416. package/dist/validation.d.mts +1 -1
  417. package/dist/{value-control-resolver-CE-bqdAl.d.mts → value-control-resolver-CiGEHQAc.d.mts} +2 -2
  418. package/dist/value-control-resolver.d.mts +1 -1
  419. package/llms.txt +43 -0
  420. package/package.json +14 -5
  421. package/skills/ui-authoring/SKILL.md +27 -1
  422. package/dist/Breadcrumbs-W8hIhdHD.mjs.map +0 -1
  423. package/dist/Combobox-B6JyLog8.mjs.map +0 -1
  424. package/dist/DatePicker-Bw79p-Lx.mjs.map +0 -1
  425. package/dist/FormField-DdmgSWq4.mjs.map +0 -1
  426. package/dist/TableBox-bmrKh_ax.mjs.map +0 -1
  427. package/dist/TableControls-DVTtNAPo.mjs.map +0 -1
  428. package/dist/components/TechnicalSticker/index.mjs.map +0 -1
  429. package/dist/layouts/LayoutLoadingShimmer/index.mjs.map +0 -1
  430. /package/dist/{index--p6oQT9I.d.mts → index-0-W_aPej.d.mts} +0 -0
  431. /package/dist/{index-BYd3Btr1.d.mts → index-7in8TPrM.d.mts} +0 -0
  432. /package/dist/{index-CDGG7lCB.d.mts → index-7rWKHdox.d.mts} +0 -0
  433. /package/dist/{index-CMuRFTR3.d.mts → index-B4woaFSm.d.mts} +0 -0
  434. /package/dist/{index-CNxS4Tlu.d.mts → index-BINnViIh.d.mts} +0 -0
  435. /package/dist/{index-CWB6exYm.d.mts → index-BNRXMhlr.d.mts} +0 -0
  436. /package/dist/{index-CzItj62a.d.mts → index-BO_854F2.d.mts} +0 -0
  437. /package/dist/{index-D4DUvwPf.d.mts → index-BOn0AAue.d.mts} +0 -0
  438. /package/dist/{index-D5tSVhTd.d.mts → index-CCt0lwyI.d.mts} +0 -0
  439. /package/dist/{index-DGsJdI5l.d.mts → index-CREkvfw9.d.mts} +0 -0
  440. /package/dist/{index-DM6vVDZD.d.mts → index-CRo77wc3.d.mts} +0 -0
  441. /package/dist/{index-DWfPppPU.d.mts → index-Ci-uuV07.d.mts} +0 -0
  442. /package/dist/{index-DXJd7-2Z.d.mts → index-CsuikFeJ.d.mts} +0 -0
  443. /package/dist/{index-DkrC-i1D.d.mts → index-CzUpNo0e.d.mts} +0 -0
  444. /package/dist/{index-DvuJXuAN.d.mts → index-DDdPqD_H.d.mts} +0 -0
  445. /package/dist/{index-Iujpc9_6.d.mts → index-DeVKzGce.d.mts} +0 -0
  446. /package/dist/{index-PWQavSPf.d.mts → index-Es5nKSSL.d.mts} +0 -0
  447. /package/dist/{index-e6k85DKM.d.mts → index-FtE8MXJ_.d.mts} +0 -0
  448. /package/dist/{index-lIMqGGJz.d.mts → index-ehD5GjMH.d.mts} +0 -0
  449. /package/dist/{index-sViox9YW.d.mts → index-uMNhmxEh.d.mts} +0 -0
  450. /package/dist/{layouts → patterns}/LayoutLoadingShimmer/index.d.mts +0 -0
@@ -1,8 +1,8 @@
1
- import { t as ErrorProps } from "./ErrorProps-CN2XjaOX.mjs";
1
+ import { t as ErrorProps } from "./ErrorProps-DX50vo-U.mjs";
2
2
  import * as _$styled_components0 from "styled-components";
3
- import * as _$react_jsx_runtime0 from "react/jsx-runtime";
4
3
  import * as _$react from "react";
5
4
  import { ComponentPropsWithoutRef, ReactNode } from "react";
5
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
6
6
  import { Root } from "@radix-ui/react-label";
7
7
 
8
8
  //#region components/FormControl/FormControl.d.ts
@@ -57,4 +57,4 @@ interface FormControlProps extends ComponentPropsWithoutRef<'div'>, FormControlB
57
57
  declare const FormControl: _$react.ForwardRefExoticComponent<FormControlProps & _$react.RefAttributes<HTMLDivElement>>;
58
58
  //#endregion
59
59
  export { FormControlProps as a, FormLabelProps as c, FormControlBaseProps as i, HelperText as l, ErrorText as n, FormInputContainer as o, FormControl as r, FormLabel as s, Container as t, WarningText as u };
60
- //# sourceMappingURL=FormControl-DH3bgqaB.d.mts.map
60
+ //# sourceMappingURL=FormControl-CZFmub1N.d.mts.map
@@ -1,2 +1,2 @@
1
- import { a as FormControlProps, c as FormLabelProps, i as FormControlBaseProps, l as HelperText, n as ErrorText, o as FormInputContainer, r as FormControl, s as FormLabel, t as Container, u as WarningText } from "./FormControl-DH3bgqaB.mjs";
1
+ import { a as FormControlProps, c as FormLabelProps, i as FormControlBaseProps, l as HelperText, n as ErrorText, o as FormInputContainer, r as FormControl, s as FormLabel, t as Container, u as WarningText } from "./FormControl-CZFmub1N.mjs";
2
2
  export { Container, ErrorText, FormControl, FormControl as default, FormControlBaseProps, FormControlProps, FormInputContainer, FormLabel, FormLabelProps, HelperText, WarningText };
@@ -1,4 +1,4 @@
1
- import { c as ParagraphProps, o as LabelProps, u as SpanProps } from "./Text-DNPbAuUG.mjs";
1
+ import { c as ParagraphProps, o as LabelProps, u as SpanProps } from "./Text-CfIFUyHt.mjs";
2
2
  import * as _$styled_components0 from "styled-components";
3
3
  import * as _$react from "react";
4
4
 
@@ -1,4 +1,4 @@
1
- import { a as FormControlProps, l as HelperText, n as ErrorText, s as FormLabel, u as WarningText } from "./FormControl-DH3bgqaB.mjs";
1
+ import { a as FormControlProps, l as HelperText, n as ErrorText, s as FormLabel, u as WarningText } from "./FormControl-CZFmub1N.mjs";
2
2
  import * as _$react from "react";
3
3
  import { ComponentPropsWithRef, ReactElement, ReactNode } from "react";
4
4
 
@@ -66,4 +66,4 @@ interface FormFieldProps extends Omit<FormControlProps, 'children'>, FormFieldBa
66
66
  declare const FormField: _$react.ForwardRefExoticComponent<FormFieldProps & _$react.RefAttributes<HTMLDivElement>>;
67
67
  //#endregion
68
68
  export { FormFieldBaseProps as n, FormFieldProps as r, FormField as t };
69
- //# sourceMappingURL=FormField-BugkBvN4.d.mts.map
69
+ //# sourceMappingURL=FormField-8rlT8pm0.d.mts.map
@@ -1,22 +1,22 @@
1
- import { t as HStack } from "./Stack-Bl54WmhY.mjs";
2
- import { t as IconButton } from "./IconButton-P8w0JDI5.mjs";
3
- import { n as DropdownMenu_default } from "./DropdownMenu-D25WBCah.mjs";
4
- import { n as useFormGroup } from "./useFormGroup-DWVW7A9f.mjs";
5
- import { t as FormControlContext } from "./useFormField-DhYd6bNn.mjs";
1
+ import { t as HStack } from "./Stack-ckRN7LrP.mjs";
2
+ import { t as IconButton } from "./IconButton-DC4rh6ow.mjs";
3
+ import { n as useFormGroup } from "./useFormGroup-BMukAMAd.mjs";
4
+ import { t as FormControlContext } from "./useFormField-eftOPiXj.mjs";
6
5
  import Input_default from "./components/Input/index.mjs";
7
- import { t as Checkbox } from "./Checkbox-BcuiFvK7.mjs";
8
- import { t as Combobox } from "./Combobox-B6JyLog8.mjs";
9
- import { n as Select } from "./Select-C1ZoRk39.mjs";
10
- import { t as Toggle } from "./Toggle-Bie9zCem.mjs";
11
- import { a as FormLabel, i as FormInputContainer, n as ErrorText, o as HelperText, r as FormControl, s as WarningText } from "./FormControl-CFU9uKF7.mjs";
12
- import { t as ListBox } from "./ListBox-TrL3Tb7X.mjs";
13
- import { t as RadioGroup } from "./RadioGroup-CnK0opBd.mjs";
14
- import { t as SegmentedControl } from "./SegmentedControl-CgDQIVll.mjs";
15
- import { t as TextAreaWithStyle } from "./TextArea-NCLsW-03.mjs";
16
- import { t as TableBox } from "./TableBox-bmrKh_ax.mjs";
6
+ import { t as Checkbox } from "./Checkbox-CU27-Aa8.mjs";
7
+ import { n as DropdownMenu_default } from "./DropdownMenu-DZIFSJXD.mjs";
8
+ import { t as Combobox } from "./Combobox-DhTUY8JT.mjs";
9
+ import { n as Select } from "./Select-DL-AjL0Q.mjs";
10
+ import { t as Toggle } from "./Toggle-CC2FTAKS.mjs";
11
+ import { a as FormLabel, i as FormInputContainer, n as ErrorText, o as HelperText, r as FormControl, s as WarningText } from "./FormControl-BIXJ-FPI.mjs";
12
+ import { t as ListBox } from "./ListBox-BwD-q7wF.mjs";
13
+ import { t as RadioGroup } from "./RadioGroup-sjBzFE_-.mjs";
14
+ import { t as SegmentedControl } from "./SegmentedControl-BugnH-h2.mjs";
15
+ import { t as TextAreaWithStyle } from "./TextArea-BFsXUkuj.mjs";
16
+ import { t as TableBox } from "./TableBox-DGjKVQFO.mjs";
17
17
  import { Spacing } from "@persona/design-tokens";
18
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
19
- import { Children, Fragment as Fragment$1, cloneElement, createContext, forwardRef, useContext, useMemo, useRef, useState } from "react";
18
+ import { Children, Fragment, cloneElement, createContext, forwardRef, useContext, useMemo, useRef, useState } from "react";
19
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
20
20
  import { MoreIcon, PlusIcon } from "@persona/icons";
21
21
  import { uniqueId } from "lodash/fp.js";
22
22
  import { mergeProps, useCheckboxGroup, useCheckboxGroupItem } from "react-aria";
@@ -120,17 +120,18 @@ const TextField = forwardRef(function TextField(props, ref) {
120
120
  })
121
121
  });
122
122
  });
123
- const TextAreaField = forwardRef(function TextAreaField({ label, helperText, errorText, warningText, inputId, id, configField, ...props }, ref) {
123
+ const TextAreaField = forwardRef(function TextAreaField(props, ref) {
124
+ const { formFieldProps, inputProps } = splitOutFormFieldProps(props);
125
+ const { id, ...rest } = inputProps;
124
126
  return /* @__PURE__ */ jsx(FormField, {
125
- inputId: inputId ?? id,
126
- label,
127
- labelProps: { size: props.size },
128
- helperText,
129
- warningText,
130
- errorText,
131
- configField,
127
+ ...formFieldProps,
128
+ labelProps: {
129
+ size: props.size,
130
+ ...formFieldProps.labelProps
131
+ },
132
+ inputId: formFieldProps.inputId ?? id,
132
133
  children: /* @__PURE__ */ jsx(TextAreaWithStyle, {
133
- ...props,
134
+ ...rest,
134
135
  ref
135
136
  })
136
137
  });
@@ -315,7 +316,7 @@ const ListBoxField = ({ label, helperText, errorText, warningText, labelProps, h
315
316
  warningProps,
316
317
  inputId,
317
318
  configField,
318
- rightActions: configField && /* @__PURE__ */ jsxs(Fragment, { children: [
319
+ rightActions: configField && /* @__PURE__ */ jsxs(Fragment$1, { children: [
319
320
  menuActions.length > 0 && /* @__PURE__ */ jsx(DropdownMenu_default, {
320
321
  trigger: /* @__PURE__ */ jsx(IconButton, {
321
322
  "aria-label": "Actions",
@@ -403,7 +404,7 @@ const TableBoxField = ({ label, helperText, errorText, warningText, labelProps:
403
404
  errorProps,
404
405
  warningProps,
405
406
  inputId,
406
- rightActions: configField && /* @__PURE__ */ jsxs(Fragment, { children: [
407
+ rightActions: configField && /* @__PURE__ */ jsxs(Fragment$1, { children: [
407
408
  visibleMenuActions.length > 0 && /* @__PURE__ */ jsx(DropdownMenu_default, {
408
409
  trigger: /* @__PURE__ */ jsx(IconButton, {
409
410
  "aria-label": "Actions",
@@ -414,7 +415,7 @@ const TableBoxField = ({ label, helperText, errorText, warningText, labelProps:
414
415
  portal: true,
415
416
  children: visibleMenuActions.map((entry, entryIndex) => {
416
417
  const previousEntry = visibleMenuActions[entryIndex - 1];
417
- if (isActionGroup(entry)) return /* @__PURE__ */ jsxs(Fragment$1, { children: [
418
+ if (isActionGroup(entry)) return /* @__PURE__ */ jsxs(Fragment, { children: [
418
419
  entryIndex > 0 && /* @__PURE__ */ jsx(DropdownMenu_default.Divider, {}),
419
420
  /* @__PURE__ */ jsx(DropdownMenu_default.Heading, {
420
421
  size: "sm",
@@ -428,7 +429,7 @@ const TableBoxField = ({ label, helperText, errorText, warningText, labelProps:
428
429
  children: action.label
429
430
  }, action.label))
430
431
  ] }, `${entry.heading}-${entryIndex}`);
431
- return /* @__PURE__ */ jsxs(Fragment$1, { children: [previousEntry && isActionGroup(previousEntry) && /* @__PURE__ */ jsx(DropdownMenu_default.Divider, {}), /* @__PURE__ */ jsx(DropdownMenu_default.Item, {
432
+ return /* @__PURE__ */ jsxs(Fragment, { children: [previousEntry && isActionGroup(previousEntry) && /* @__PURE__ */ jsx(DropdownMenu_default.Divider, {}), /* @__PURE__ */ jsx(DropdownMenu_default.Item, {
432
433
  ...entry,
433
434
  disabled: disabled || entry.disabled,
434
435
  onClick: () => entry.onClick(selectedKey),
@@ -471,4 +472,4 @@ TableBoxField.Cell = TableBox.Cell;
471
472
  //#endregion
472
473
  export { CheckboxField as a, SegmentedControlField as c, TextField as d, ToggleField as f, CheckboxGroupField as i, SelectField as l, FormField as m, TableBoxField as n, ComboboxField as o, splitOutFormFieldProps as p, ListBoxField as r, RadioGroupField as s, TABLE_BOX_FIELD_ADD_BUTTON_ARIA_LABEL as t, TextAreaField as u };
473
474
 
474
- //# sourceMappingURL=FormField-DdmgSWq4.mjs.map
475
+ //# sourceMappingURL=FormField-DcGQvgNW.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormField-DcGQvgNW.mjs","names":["Input","TextArea","DropdownMenu","DropdownMenu"],"sources":["../components/FormField/FormField.tsx","../components/FormField/inputFields.tsx","../components/FormField/CheckboxGroupField.tsx","../components/FormField/ListBoxField.tsx","../components/FormField/TableBoxField.tsx"],"sourcesContent":["import { type ComponentPropsWithRef, forwardRef, type ReactElement, type ReactNode } from 'react';\n\nimport { Spacing } from '@persona/design-tokens';\nimport useFormGroup from 'design-system/components/ConfigFormGroup/useFormGroup';\nimport FormControl, {\n ErrorText,\n type FormControlProps,\n FormInputContainer,\n FormLabel,\n HelperText,\n WarningText,\n} from 'design-system/components/FormControl';\nimport { HStack } from 'design-system/components/Stack';\n\nexport interface FormFieldBaseProps {\n /**\n * Renders `<Label>` above input\n */\n label?: ReactNode;\n\n /**\n * ID of the input element. Providing this will automatically link the label to the input.\n */\n inputId?: string;\n\n /**\n * Renders `<HelperText>` below input\n */\n helperText?: ReactNode;\n\n /**\n * Renders `<ErrorText>` below input and helper text.\n */\n errorText?: ReactNode;\n\n /**\n * Renders `<WarningText>` below input and helper text.\n */\n warningText?: ReactNode;\n\n /**\n * Should be an input of some sort\n */\n children?: ReactElement;\n\n labelProps?: ComponentPropsWithRef<typeof FormLabel>;\n helperProps?: ComponentPropsWithRef<typeof HelperText>;\n warningProps?: ComponentPropsWithRef<typeof WarningText>;\n errorProps?: ComponentPropsWithRef<typeof ErrorText>;\n\n /**\n * Whether to render the form field as a config field.\n * This will render the helper text as a tooltip.\n */\n configField?: boolean;\n\n /**\n * Override the width of the input area when `configField` is true.\n * Accepts any valid CSS width value (e.g. `'33%'`, `'66.67%'`).\n * Defaults to `'50%'`.\n */\n configFieldInputWidth?: string;\n\n /**\n * Renders actions to the right of the label.\n */\n rightActions?: ReactNode;\n}\n\nexport interface FormFieldProps extends Omit<FormControlProps, 'children'>, FormFieldBaseProps {}\n\n/**\n * > **Please do not use in production! This component is subject to API and style changes.**\n *\n * Helper components with preset slots for label, input, and helper texts.\n * Fully composed components with different form input types are available.\n * This is the recommended way to implement form elements.\n * You can use `<FormControl>` if you require more flexibility.\n *\n * ## Usage\n *\n * ```tsx\n * import FormField from 'design-system/components/FormField';\n * ```\n */\nexport const FormField = forwardRef<HTMLDivElement, FormFieldProps>(function FormField(\n {\n label,\n children,\n helperText,\n warningText,\n errorText,\n labelProps,\n helperProps,\n warningProps,\n errorProps,\n configField: configFieldProp,\n configFieldInputWidth,\n rightActions,\n ...props\n }: FormFieldProps,\n ref,\n) {\n const { configField: configFieldFormGroup } = useFormGroup();\n const configField = configFieldProp ?? configFieldFormGroup;\n\n const labelElement = label ? (\n <FormLabel tooltip={configField && helperText ? helperText : undefined} {...labelProps}>\n {label}\n </FormLabel>\n ) : null;\n\n return (\n <FormControl\n hasError={!!errorText}\n hasWarning={!!warningText}\n ref={ref}\n configField={configField}\n hasRightActions={!!rightActions}\n configFieldInputWidth={configFieldInputWidth}\n {...props}\n >\n {rightActions ? (\n <HStack justify='space-between' align='center'>\n {labelElement}\n <HStack spacing={Spacing[1]}>{rightActions}</HStack>\n </HStack>\n ) : (\n labelElement\n )}\n <FormInputContainer>{children}</FormInputContainer>\n {!configField && helperText && <HelperText {...helperProps}>{helperText}</HelperText>}\n {!configField && warningText && <WarningText {...warningProps}>{warningText}</WarningText>}\n {!configField && errorText && <ErrorText {...errorProps}>{errorText}</ErrorText>}\n </FormControl>\n );\n});\n\nexport default FormField;\n","import { uniqueId } from 'lodash/fp';\nimport { forwardRef, useMemo } from 'react';\n\nimport Checkbox, { type CheckboxProps } from 'design-system/components/Checkbox';\nimport Combobox from 'design-system/components/Combobox';\nimport type { ComboboxMultiSelectProps } from 'design-system/components/Combobox/ComboboxMultiSelect';\nimport type { ComboboxSingleSelectProps } from 'design-system/components/Combobox/ComboboxSingleSelect';\nimport FormField, { type FormFieldBaseProps } from 'design-system/components/FormField/FormField';\nimport Input, { type InputProps } from 'design-system/components/Input';\nimport RadioGroup, { type RadioGroupProps } from 'design-system/components/RadioGroup';\nimport SegmentedControl, {\n type SegmentedControlProps,\n} from 'design-system/components/SegmentedControl';\nimport Select, { type SelectProps } from 'design-system/components/Select';\nimport TextArea, { type TextAreaProps } from 'design-system/components/TextArea';\nimport Toggle, { type ToggleProps } from 'design-system/components/Toggle';\n\nexport type ImplementsFormField = Omit<FormFieldBaseProps, 'children'>;\n\ntype ExtractFormFieldProps<T extends ImplementsFormField> = Pick<\n T,\n | 'label'\n | 'inputId'\n | 'helperText'\n | 'errorText'\n | 'warningText'\n | 'labelProps'\n | 'helperProps'\n | 'warningProps'\n | 'errorProps'\n | 'configField'\n | 'configFieldInputWidth'\n | 'rightActions'\n>;\ntype OmitFormFieldProps<T extends ImplementsFormField> = Omit<T, keyof ExtractFormFieldProps<T>>;\n\n/**\n * Helper to split out props that are sent to the FormField component from props sent\n * to the underlying input component.\n */\nexport const splitOutFormFieldProps = <T extends ImplementsFormField>(\n props: T,\n): {\n formFieldProps: ExtractFormFieldProps<T>;\n inputProps: OmitFormFieldProps<T>;\n} => {\n const {\n label,\n inputId,\n helperText,\n errorText,\n warningText,\n labelProps,\n helperProps,\n warningProps,\n errorProps,\n configField,\n configFieldInputWidth,\n rightActions,\n ...inputProps\n } = props;\n\n return {\n formFieldProps: {\n label,\n inputId,\n helperText,\n errorText,\n warningText,\n labelProps,\n helperProps,\n warningProps,\n errorProps,\n configField,\n configFieldInputWidth,\n rightActions,\n },\n inputProps,\n };\n};\n\nexport interface TextFieldProps extends ImplementsFormField, InputProps {}\n\nexport const TextField = forwardRef<HTMLInputElement, TextFieldProps>(\n function TextField(props, ref) {\n const { formFieldProps, inputProps } = splitOutFormFieldProps(props);\n const { id, ...rest } = inputProps;\n\n return (\n <FormField\n {...formFieldProps}\n labelProps={{ size: props.size, ...formFieldProps.labelProps }}\n inputId={formFieldProps.inputId ?? id}\n >\n <Input {...rest} ref={ref} />\n </FormField>\n );\n },\n);\n\nexport interface TextAreaFieldProps extends ImplementsFormField, TextAreaProps {}\n\nexport const TextAreaField = forwardRef<HTMLTextAreaElement, TextAreaFieldProps>(\n function TextAreaField(props, ref) {\n const { formFieldProps, inputProps } = splitOutFormFieldProps(props);\n const { id, ...rest } = inputProps;\n\n return (\n <FormField\n {...formFieldProps}\n labelProps={{ size: props.size, ...formFieldProps.labelProps }}\n inputId={formFieldProps.inputId ?? id}\n >\n <TextArea {...rest} ref={ref} />\n </FormField>\n );\n },\n);\n\nexport interface SelectFieldProps extends ImplementsFormField, SelectProps {}\n\nexport const SelectField = ({\n id,\n label,\n helperText,\n errorText,\n warningText,\n children,\n configField,\n labelProps,\n ...props\n}: SelectFieldProps) => {\n const linkedId = useMemo(() => id ?? uniqueId('pds-form-field-input-fields-select__'), [id]);\n\n return (\n <FormField\n label={label}\n labelProps={{ htmlFor: linkedId, size: props.size, ...labelProps }}\n helperText={helperText}\n warningText={warningText}\n errorText={errorText}\n configField={configField}\n >\n <Select {...props} id={linkedId}>\n {children}\n </Select>\n </FormField>\n );\n};\n\nexport interface RadioGroupFieldProps\n extends Omit<ImplementsFormField, 'configField'>, RadioGroupProps {}\n\nexport const RadioGroupField = ({\n label,\n helperText,\n errorText,\n warningText,\n children,\n ...props\n}: RadioGroupFieldProps) => {\n return (\n <FormField\n label={label}\n helperText={helperText}\n warningText={warningText}\n errorText={errorText}\n >\n <RadioGroup {...props}>{children}</RadioGroup>\n </FormField>\n );\n};\n\nexport interface CheckboxFieldProps extends ImplementsFormField, CheckboxProps {\n checkboxLabel?: CheckboxProps['label'];\n}\n\nexport const CheckboxField = ({\n label,\n helperText,\n errorText,\n warningText,\n checkboxLabel,\n configField,\n labelProps,\n ...props\n}: CheckboxFieldProps) => {\n return (\n <FormField\n label={label}\n helperText={helperText}\n warningText={warningText}\n errorText={errorText}\n configField={configField}\n labelProps={labelProps}\n >\n <Checkbox label={checkboxLabel} {...props} />\n </FormField>\n );\n};\n\nexport interface ToggleFieldProps extends ImplementsFormField, ToggleProps {}\n\nexport const ToggleField = forwardRef<HTMLDivElement, ToggleFieldProps>(function ToggleField(\n { label, helperText, errorText, warningText, configField, ...props },\n ref,\n) {\n return (\n <FormField\n label={label}\n labelProps={{ size: props.size }}\n helperText={helperText}\n warningText={warningText}\n errorText={errorText}\n configField={configField}\n >\n <Toggle {...props} ref={ref} />\n </FormField>\n );\n});\n\nexport interface SegmentedControlFieldProps\n extends ImplementsFormField, Omit<SegmentedControlProps, 'children'> {\n children?: SegmentedControlProps['children'];\n}\n\nexport const SegmentedControlField = forwardRef<HTMLDivElement, SegmentedControlFieldProps>(\n function SegmentedControlField(\n { label, helperText, errorText, warningText, configField, children, labelProps, ...props },\n ref,\n ) {\n return (\n <FormField\n label={label}\n helperText={helperText}\n warningText={warningText}\n errorText={errorText}\n configField={configField}\n labelProps={labelProps}\n >\n <SegmentedControl fullWidth {...props} ref={ref}>\n {children}\n </SegmentedControl>\n </FormField>\n );\n },\n);\n\nexport type ComboboxSingleSelectFieldProps<T = string> = ImplementsFormField &\n ComboboxSingleSelectProps<T>;\nexport type ComboboxMultiSelectFieldProps<T = string> = ImplementsFormField &\n ComboboxMultiSelectProps<T>;\n\nexport const ComboboxField = ({\n label,\n labelProps,\n helperText,\n errorText,\n warningText,\n configField,\n ...props\n}: ComboboxSingleSelectFieldProps | ComboboxMultiSelectFieldProps) => {\n return (\n <FormField\n label={label}\n labelProps={labelProps}\n helperText={helperText}\n warningText={warningText}\n errorText={errorText}\n configField={configField}\n >\n <Combobox {...props} />\n </FormField>\n );\n};\n","import {\n Children,\n cloneElement,\n type ComponentPropsWithRef,\n createContext,\n type ReactElement,\n type ReactNode,\n useContext,\n useRef,\n} from 'react';\nimport {\n type AriaCheckboxGroupProps,\n mergeProps,\n useCheckboxGroup,\n useCheckboxGroupItem,\n} from 'react-aria';\nimport innerText from 'react-innertext';\nimport { type CheckboxGroupState, useCheckboxGroupState } from 'react-stately';\n\nimport type { CheckboxProps } from 'design-system/components/Checkbox';\nimport type Checkbox from 'design-system/components/Checkbox';\nimport { FormControlContext } from 'design-system/components/FormControl/useFormField';\nimport FormField from 'design-system/components/FormField/FormField';\nimport type { ImplementsFormField } from 'design-system/components/FormField/inputFields';\n\n/* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\nconst CheckboxGroupContext = createContext<CheckboxGroupState>(null);\n\n/** Preserves the parent FormControl context (disabled, hasError, etc.) but clears\n * inputId so each Checkbox inside the group generates its own unique id. */\nconst ClearGroupInputId = ({ children }: { children: ReactNode }) => {\n const parentContext = useContext(FormControlContext);\n return (\n <FormControlContext.Provider value={{ ...parentContext, inputId: undefined }}>\n {children}\n </FormControlContext.Provider>\n );\n};\n\ninterface CheckboxGroupItemProps {\n children: ReactElement<ComponentPropsWithRef<typeof Checkbox>>;\n}\n\nconst CheckboxGroupItem = (props: CheckboxGroupItemProps) => {\n const { children } = props;\n const checkboxProps = children.props;\n\n const state = useContext(CheckboxGroupContext);\n const ref = useRef();\n const { inputProps } = useCheckboxGroupItem(\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n {\n ...checkboxProps,\n onChange: undefined,\n isDisabled: checkboxProps.disabled,\n isReadOnly: checkboxProps.readOnly,\n isRequired: checkboxProps.required,\n isIndeterminate: checkboxProps.indeterminate,\n value: String(children.props.value),\n 'aria-label': innerText(checkboxProps.label),\n },\n state,\n ref,\n );\n\n return cloneElement(\n children,\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n mergeProps(inputProps, {\n onChange: checkboxProps.onChange,\n disabled: state.isDisabled || checkboxProps.disabled,\n checked: state.isSelected(String(inputProps.value)),\n ref,\n } as ComponentPropsWithRef<typeof Checkbox>),\n );\n};\n\ninterface CheckboxGroupFieldProps\n extends\n Omit<ImplementsFormField, 'configField'>,\n Omit<\n AriaCheckboxGroupProps,\n 'description' | 'disabled' | 'isReadOnly' | 'isRequired' | 'errorMessage'\n > {\n children?: ReactElement<CheckboxProps>[];\n disabled?: boolean;\n readOnly?: boolean;\n required?: boolean;\n}\n\nconst CheckboxGroupField = ({\n children,\n name,\n onChange,\n disabled,\n readOnly,\n required,\n ...props\n}: CheckboxGroupFieldProps) => {\n const reactAriaProps = {\n ...props,\n description: props.helperText,\n errorMessage: props.errorText,\n onChange,\n name,\n isDisabled: disabled,\n isReadOnly: readOnly,\n isRequired: required,\n };\n const state = useCheckboxGroupState(reactAriaProps);\n const { groupProps, labelProps, descriptionProps, errorMessageProps } = useCheckboxGroup(\n reactAriaProps,\n state,\n );\n\n return (\n <FormField\n labelProps={labelProps}\n helperProps={descriptionProps}\n errorProps={errorMessageProps}\n disabled={disabled}\n {...groupProps}\n {...props}\n >\n <ClearGroupInputId>\n <CheckboxGroupContext.Provider value={state}>\n {Children.map(children, (checkbox) => (\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n <CheckboxGroupItem>{checkbox}</CheckboxGroupItem>\n ))}\n </CheckboxGroupContext.Provider>\n </ClearGroupInputId>\n </FormField>\n );\n};\n\nexport default CheckboxGroupField;\n","import { type ReactNode, useState } from 'react';\n\nimport { MoreIcon, PlusIcon } from '@persona/icons';\nimport { IconButton } from 'design-system/components/Button';\nimport useFormGroup from 'design-system/components/ConfigFormGroup/useFormGroup';\nimport DropdownMenu from 'design-system/components/DropdownMenu';\nimport FormField from 'design-system/components/FormField/FormField';\nimport type { ImplementsFormField } from 'design-system/components/FormField/inputFields';\nimport ListBox, { type ListBoxProps } from 'design-system/components/ListBox';\nimport type { MenuItemProps } from 'design-system/components/Menu';\n\ninterface ListBoxFieldAction extends Omit<MenuItemProps, 'children'> {\n label: string;\n onClick: (selectedKeys: ListBoxProps<any>['selectedKeys']) => void;\n}\n\ninterface AddDropdownConfig {\n options: ({ label: ReactNode; value: string } & Omit<MenuItemProps, 'children'>)[];\n onSelection: (value: string) => void;\n}\n\ninterface ListBoxFieldProps<T extends object> extends ImplementsFormField, ListBoxProps<T> {\n actions?: ListBoxFieldAction[];\n addDropdownConfig?: AddDropdownConfig;\n}\n\nconst ListBoxField = <T extends object>({\n label,\n helperText,\n errorText,\n warningText,\n labelProps,\n helperProps,\n errorProps,\n warningProps,\n inputId,\n onAdd,\n onDelete,\n deleteDisabled,\n configField: configFieldProp,\n size = 'md',\n actions = [],\n addDropdownConfig,\n selectedKeys: selectedKeysProp,\n onSelectionChange,\n defaultSelectedKeys,\n ...props\n}: ListBoxFieldProps<T>) => {\n const { configField } = useFormGroup({ configField: configFieldProp });\n const menuActions: ListBoxFieldAction[] = [...actions];\n const [selectedKeysState, setSelectedKeys] = useState(defaultSelectedKeys);\n const selectedKeys = selectedKeysProp ?? selectedKeysState;\n const effectiveSize = configField ? 'sm' : size;\n\n if (onDelete) {\n menuActions.unshift({\n label: 'Delete',\n onClick: () => onDelete(selectedKeys),\n disabled:\n deleteDisabled ||\n selectedKeys == null ||\n (typeof selectedKeys === 'object' && [...selectedKeys].length === 0),\n });\n }\n\n const addButton = (\n <IconButton size='sm' onClick={onAdd} aria-label='Add item to list'>\n <PlusIcon />\n </IconButton>\n );\n\n return (\n <FormField\n label={label}\n helperText={helperText}\n errorText={errorText}\n warningText={warningText}\n labelProps={labelProps}\n helperProps={helperProps}\n errorProps={errorProps}\n warningProps={warningProps}\n inputId={inputId}\n configField={configField}\n rightActions={\n configField && (\n <>\n {menuActions.length > 0 && (\n <DropdownMenu\n trigger={\n <IconButton aria-label='Actions' size='sm'>\n <MoreIcon />\n </IconButton>\n }\n portal\n >\n {menuActions.map((action) => (\n <DropdownMenu.Item\n key={action.label}\n {...action}\n onClick={() => action.onClick(selectedKeys)}\n size={effectiveSize}\n >\n {action.label}\n </DropdownMenu.Item>\n ))}\n </DropdownMenu>\n )}\n {onAdd && !addDropdownConfig && addButton}\n {addDropdownConfig && (\n <DropdownMenu trigger={addButton} align='start' portal>\n {addDropdownConfig.options.map((option) => (\n <DropdownMenu.Item\n key={option.value}\n {...option}\n onClick={() => addDropdownConfig.onSelection(option.value)}\n size={effectiveSize}\n >\n {option.label}\n </DropdownMenu.Item>\n ))}\n </DropdownMenu>\n )}\n </>\n )\n }\n >\n <ListBox\n id={inputId}\n fullWidth={configField}\n size={effectiveSize}\n deleteDisabled={deleteDisabled}\n // We have to control the keys so we can power the `rightActions`\n selectedKeys={selectedKeys}\n onSelectionChange={(keys) => {\n onSelectionChange?.(keys);\n setSelectedKeys(keys);\n }}\n {...props}\n />\n </FormField>\n );\n};\n\nexport default ListBoxField;\n","import { Fragment, type MouseEvent, type ReactNode, useState } from 'react';\n\nimport { IconButton } from '@persona/design-system/components/Button';\nimport { useFormGroup } from '@persona/design-system/components/ConfigFormGroup';\nimport DropdownMenu from '@persona/design-system/components/DropdownMenu';\nimport type { FormLabelProps } from '@persona/design-system/components/FormControl';\nimport type { MenuItemProps } from '@persona/design-system/components/Menu';\nimport TableBox, { type TableBoxProps } from '@persona/design-system/components/TableBox';\nimport { MoreIcon, PlusIcon } from '@persona/icons';\n\nimport FormField from './FormField';\nimport type { ImplementsFormField } from './inputFields';\n\nexport interface TableBoxFieldAction extends Omit<MenuItemProps, 'children'> {\n label: string;\n onClick: (selectedKey: TableBoxProps['selectedKey']) => void;\n}\n\nexport interface TableBoxFieldActionGroup {\n type: 'group';\n heading: string;\n actions: TableBoxFieldAction[];\n}\n\nexport type TableBoxFieldActionEntry = TableBoxFieldAction | TableBoxFieldActionGroup;\n\n/** Aria-label on TableBoxField's + button. Consumers that style or detect that\n * button (e.g. popover toggle guards) should import this rather than redefining it. */\nexport const TABLE_BOX_FIELD_ADD_BUTTON_ARIA_LABEL = 'Add item to table';\n\nconst isActionGroup = (action: TableBoxFieldActionEntry): action is TableBoxFieldActionGroup =>\n 'type' in action && action.type === 'group';\n\ninterface AddDropdownConfig {\n options: Array<{ label: string; value: string }>;\n onSelection: (value: string) => void;\n}\n\ninterface TableBoxFieldProps<T extends object = object>\n extends ImplementsFormField, Omit<TableBoxProps<T>, 'aria-label' | 'onCreateNewRow'> {\n onAdd?: (e: MouseEvent<HTMLButtonElement>) => void;\n onDelete?: (selectedKey: string | null) => void;\n deleteDisabled?: boolean;\n /** Actions and labeled action groups rendered in order. Empty groups are omitted. */\n actions?: TableBoxFieldActionEntry[];\n addDropdownConfig?: AddDropdownConfig;\n\n /**\n * Callback to create a new row and add it to the rows array\n * Should return the id of the newly created row\n */\n createNewRow?: () => string;\n children?: ReactNode;\n}\n\nconst TableBoxField = <T extends object = object>({\n label,\n helperText,\n errorText,\n warningText,\n labelProps: labelPropsProp,\n helperProps,\n errorProps,\n warningProps,\n inputId,\n onAdd,\n onDelete,\n deleteDisabled,\n configField: configFieldProp = true,\n actions = [],\n addDropdownConfig,\n selectedKey: selectedKeyProp,\n onSelectionChange,\n defaultSelectedKey,\n selectionMode,\n disabled,\n createNewRow,\n children,\n emptyText = 'No data',\n ...props\n}: TableBoxFieldProps<T>) => {\n const { configField } = useFormGroup({ configField: configFieldProp });\n const menuActions: TableBoxFieldActionEntry[] = [...actions];\n const [selectedKeyState, setSelectedKey] = useState(defaultSelectedKey);\n const selectedKey = selectedKeyProp ?? selectedKeyState;\n const [newRowId, setNewRowId] = useState<string | null>(null);\n const labelProps: FormLabelProps = { size: 'sm', ...labelPropsProp };\n\n const handleCreateNewRow = () => {\n if (createNewRow) {\n setNewRowId(createNewRow());\n }\n };\n\n // Handle add button click\n const handleAddClick = (e: MouseEvent<HTMLButtonElement>) => {\n if (createNewRow) {\n handleCreateNewRow();\n } else if (onAdd) {\n onAdd(e);\n }\n };\n\n if (onDelete) {\n menuActions.unshift({\n label: 'Delete',\n onClick: () => selectedKey && onDelete(selectedKey),\n disabled: deleteDisabled || selectedKey == null,\n });\n }\n const visibleMenuActions = menuActions.filter(\n (action) => !isActionGroup(action) || action.actions.length > 0,\n );\n\n const addButton = (\n <IconButton\n size='sm'\n onClick={handleAddClick}\n aria-label={TABLE_BOX_FIELD_ADD_BUTTON_ARIA_LABEL}\n disabled={disabled}\n >\n <PlusIcon />\n </IconButton>\n );\n\n return (\n <FormField\n label={label}\n helperText={helperText}\n errorText={errorText}\n warningText={warningText}\n labelProps={labelProps}\n helperProps={helperProps}\n errorProps={errorProps}\n warningProps={warningProps}\n inputId={inputId}\n rightActions={\n configField && (\n <>\n {visibleMenuActions.length > 0 && (\n <DropdownMenu\n trigger={\n <IconButton aria-label='Actions' size='sm' disabled={disabled}>\n <MoreIcon />\n </IconButton>\n }\n portal\n >\n {visibleMenuActions.map((entry, entryIndex) => {\n const previousEntry = visibleMenuActions[entryIndex - 1];\n if (isActionGroup(entry)) {\n return (\n <Fragment key={`${entry.heading}-${entryIndex}`}>\n {entryIndex > 0 && <DropdownMenu.Divider />}\n <DropdownMenu.Heading size='sm'>{entry.heading}</DropdownMenu.Heading>\n {entry.actions.map((action) => (\n <DropdownMenu.Item\n key={action.label}\n {...action}\n disabled={disabled || action.disabled}\n onClick={() => action.onClick(selectedKey)}\n size='sm'\n >\n {action.label}\n </DropdownMenu.Item>\n ))}\n </Fragment>\n );\n }\n\n return (\n <Fragment key={`${entry.label}-${entryIndex}`}>\n {previousEntry && isActionGroup(previousEntry) && <DropdownMenu.Divider />}\n <DropdownMenu.Item\n {...entry}\n disabled={disabled || entry.disabled}\n onClick={() => entry.onClick(selectedKey)}\n size='sm'\n >\n {entry.label}\n </DropdownMenu.Item>\n </Fragment>\n );\n })}\n </DropdownMenu>\n )}\n {(onAdd || createNewRow) && !addDropdownConfig && addButton}\n {addDropdownConfig && (\n <DropdownMenu trigger={addButton} portal>\n {addDropdownConfig.options.map((option) => (\n <DropdownMenu.Item\n key={option.value}\n {...option}\n onClick={() => addDropdownConfig.onSelection(option.value)}\n size='sm'\n >\n {option.label}\n </DropdownMenu.Item>\n ))}\n </DropdownMenu>\n )}\n </>\n )\n }\n >\n <TableBox\n aria-label={`${label} table`}\n // We have to control the keys so we can power the `rightActions`\n selectedKey={selectedKey}\n onSelectionChange={(key) => {\n onSelectionChange?.(key);\n setSelectedKey(key);\n }}\n selectionMode={selectionMode}\n newRowId={newRowId}\n onCreateNewRow={createNewRow ? handleCreateNewRow : undefined}\n emptyText={emptyText}\n disabled={disabled}\n {...props}\n >\n {children}\n </TableBox>\n </FormField>\n );\n};\n\n// Attach subcomponents to TableBoxField\nTableBoxField.Row = TableBox.Row;\nTableBoxField.Cell = TableBox.Cell;\n\nexport default TableBoxField;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqFA,MAAa,YAAY,WAA2C,SAAS,UAC3E,EACE,OACA,UACA,YACA,aACA,WACA,YACA,aACA,cACA,YACA,aAAa,iBACb,uBACA,cACA,GAAG,SAEL,KACA;CACA,MAAM,EAAE,aAAa,yBAAyB,cAAc;CAC5D,MAAM,cAAc,mBAAmB;CAEvC,MAAM,eAAe,QACnB,oBAAC,WAAD;EAAW,SAAS,eAAe,aAAa,aAAa,KAAA;EAAW,GAAI;YACzE;EACS,CAAA,GACV;AAEJ,QACE,qBAAC,aAAD;EACE,UAAU,CAAC,CAAC;EACZ,YAAY,CAAC,CAAC;EACT;EACQ;EACb,iBAAiB,CAAC,CAAC;EACI;EACvB,GAAI;YAPN;GASG,eACC,qBAAC,QAAD;IAAQ,SAAQ;IAAgB,OAAM;cAAtC,CACG,cACD,oBAAC,QAAD;KAAQ,SAAS,QAAQ;eAAK;KAAsB,CAAA,CAC7C;QAET;GAEF,oBAAC,oBAAD,EAAqB,UAA8B,CAAA;GAClD,CAAC,eAAe,cAAc,oBAAC,YAAD;IAAY,GAAI;cAAc;IAAwB,CAAA;GACpF,CAAC,eAAe,eAAe,oBAAC,aAAD;IAAa,GAAI;cAAe;IAA0B,CAAA;GACzF,CAAC,eAAe,aAAa,oBAAC,WAAD;IAAW,GAAI;cAAa;IAAsB,CAAA;GACpE;;EAEhB;;;;;;;AChGF,MAAa,0BACX,UAIG;CACH,MAAM,EACJ,OACA,SACA,YACA,WACA,aACA,YACA,aACA,cACA,YACA,aACA,uBACA,cACA,GAAG,eACD;AAEJ,QAAO;EACL,gBAAgB;GACd;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD;EACD;EACD;;AAKH,MAAa,YAAY,WACvB,SAAS,UAAU,OAAO,KAAK;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1
+ import { n as FormFieldBaseProps, r as FormFieldProps, t as FormField } from "./FormField-8rlT8pm0.mjs";
2
2
  export { FormField, FormField as default, FormFieldBaseProps, FormFieldProps };
@@ -1,6 +1,6 @@
1
1
  import * as _$styled_components0 from "styled-components";
2
- import * as _$react_jsx_runtime0 from "react/jsx-runtime";
3
2
  import { ComponentPropsWithoutRef, ReactNode } from "react";
3
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
4
4
 
5
5
  //#region components/Card/Header/Header.d.ts
6
6
  interface HeaderProps {
@@ -32,4 +32,4 @@ declare const Root: ({
32
32
  }: HeaderProps & ComponentPropsWithoutRef<"div">) => _$react_jsx_runtime0.JSX.Element;
33
33
  //#endregion
34
34
  export { Root as a, HeaderProps as i, Header as n, Title as o, HeaderContainer as r, TitleContainer as s, ActionsContainer as t };
35
- //# sourceMappingURL=Header-CDTYK1XJ.d.mts.map
35
+ //# sourceMappingURL=Header-OLZuv8fF.d.mts.map
package/dist/Header.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { a as Root, i as HeaderProps, n as Header, o as Title, r as HeaderContainer, s as TitleContainer, t as ActionsContainer } from "./Header-CDTYK1XJ.mjs";
1
+ import { a as Root, i as HeaderProps, n as Header, o as Title, r as HeaderContainer, s as TitleContainer, t as ActionsContainer } from "./Header-OLZuv8fF.mjs";
2
2
  export { ActionsContainer, HeaderContainer, HeaderProps, Root, Title, TitleContainer, Header as default };
@@ -1,6 +1,6 @@
1
- import { i as TooltipWithIconProps } from "./Tooltip-CUC-JuRL.mjs";
2
- import * as _$react_jsx_runtime0 from "react/jsx-runtime";
1
+ import { i as TooltipWithIconProps } from "./Tooltip-0iXDCV2O.mjs";
3
2
  import { ReactNode } from "react";
3
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
4
4
 
5
5
  //#region components/Tooltip/HelperTooltip.d.ts
6
6
  interface HelperTooltipProps extends Omit<TooltipWithIconProps, 'iconTrigger'> {
@@ -17,4 +17,4 @@ declare const HelperTooltip: ({
17
17
  }: HelperTooltipProps) => _$react_jsx_runtime0.JSX.Element;
18
18
  //#endregion
19
19
  export { HelperTooltipProps as n, HelperTooltip as t };
20
- //# sourceMappingURL=HelperTooltip-B7Ysh8B3.d.mts.map
20
+ //# sourceMappingURL=HelperTooltip-CJDG7Ugp.d.mts.map
@@ -1,2 +1,2 @@
1
- import { n as HelperTooltipProps, t as HelperTooltip } from "./HelperTooltip-B7Ysh8B3.mjs";
1
+ import { n as HelperTooltipProps, t as HelperTooltip } from "./HelperTooltip-CJDG7Ugp.mjs";
2
2
  export { HelperTooltipProps, HelperTooltip as default };
@@ -1,10 +1,10 @@
1
1
  import "./variables/transitions.mjs";
2
- import { t as Card_default } from "./Card-BMCB9eFC.mjs";
3
- import { i as Paragraph } from "./Text-RcEfNFLx.mjs";
4
- import { t as useToggle } from "./useToggle-Bo3yd14Y.mjs";
2
+ 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
5
  import { fadeIn } from "./variables/keyframes.mjs";
6
- import { n as Button } from "./IconButton-P8w0JDI5.mjs";
7
- import { s as Popover_default } from "./Popover-BkDpDdaO.mjs";
6
+ import { n as Button } from "./IconButton-DC4rh6ow.mjs";
7
+ import { s as Popover_default } from "./Popover-BZ5Bs80y.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-7TWP0Y1Z.mjs.map
103
+ //# sourceMappingURL=HoverCopyableField-BHdCaR-R.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"HoverCopyableField-7TWP0Y1Z.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-BHdCaR-R.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,5 +1,5 @@
1
- import * as _$react_jsx_runtime0 from "react/jsx-runtime";
2
1
  import { ReactNode } from "react";
2
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
3
3
 
4
4
  //#region components/HoverCopyableField/HoverCopyableField.d.ts
5
5
  interface HoverCopyableFieldProps {
@@ -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-Bo3yd14Y.mjs";
6
+ import { t as useToggle } from "./useToggle-3k3EkV8V.mjs";
7
7
  import { rotate } from "./variables/keyframes.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";
12
10
  import { forwardRef, useCallback } from "react";
11
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
13
12
  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, { children: [prefixIconType === "basic" && /* @__PURE__ */ jsx(PrefixIconContainer, { children: prefixIcon }), prefixIconType === "inherit" && /* @__PURE__ */ jsx(InheritPrefixIconContainer, { children: prefixIcon })] }),
287
+ prefixIcon != null && /* @__PURE__ */ jsxs(Fragment$1, { 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-P8w0JDI5.mjs.map
341
+ //# sourceMappingURL=IconButton-DC4rh6ow.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"IconButton-P8w0JDI5.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/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/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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CAAA;IAEd,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-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/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/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,S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;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,4 +1,4 @@
1
- import { r as ButtonProps } from "./Button-Vd5O4DUp.mjs";
1
+ import { r as ButtonProps } from "./Button-DkjwN_Op.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-BHCmHIx5.d.mts.map
24
+ //# sourceMappingURL=IconButton-Dc17jZPG.d.mts.map
@@ -1,2 +1,2 @@
1
- import { n as IconButtonProps, t as IconButton } from "./IconButton-BHCmHIx5.mjs";
1
+ import { n as IconButtonProps, t as IconButton } from "./IconButton-Dc17jZPG.mjs";
2
2
  export { IconButtonProps, IconButton as default };
@@ -1,6 +1,6 @@
1
- import { i as TextAction } from "./Action-CVtzREhU.mjs";
2
- import * as _$react_jsx_runtime0 from "react/jsx-runtime";
1
+ import { i as TextAction } from "./Action-DnR0YTxO.mjs";
3
2
  import { ComponentPropsWithoutRef, MouseEvent, ReactNode } from "react";
3
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
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-CvjLYhTV.mjs";
2
- import * as _$react_jsx_runtime0 from "react/jsx-runtime";
1
+ import { r as InlineEditConfig } from "./TableBoxCell-BmoPs1u1.mjs";
3
2
  import { RefObject } from "react";
3
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
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-CvjLYhTV.mjs";
1
+ import { r as InlineEditConfig } from "./TableBoxCell-BmoPs1u1.mjs";
2
2
  import * as _$react_jsx_runtime0 from "react/jsx-runtime";
3
3
 
4
4
  //#region components/TableBox/InlineInput.d.ts
@@ -1,6 +1,6 @@
1
- import { t as PseudoClassProps } from "./PseudoClassProps-DLxPxo7T.mjs";
2
- import { r as ButtonProps } from "./Button-Vd5O4DUp.mjs";
3
- import { n as InputSizes, t as InputMixinProps } from "./input-Bv5fKt5J.mjs";
1
+ import { t as PseudoClassProps } from "./PseudoClassProps-CcSlKNev.mjs";
2
+ import { r as ButtonProps } from "./Button-DkjwN_Op.mjs";
3
+ import { n as InputSizes, t as InputMixinProps } from "./input-D3Qd6dI8.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";
@@ -9,7 +9,7 @@ import { ComponentPropsWithoutRef, MouseEventHandler, ReactElement, ReactNode }
9
9
  declare const ClearButton: _$styled_components0.StyledComponent<_$react.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & _$react.RefAttributes<HTMLButtonElement>>, any, {
10
10
  width: "icon";
11
11
  variant: "basic";
12
- } & PseudoClassProps, "width" | "variant">;
12
+ } & PseudoClassProps, "variant" | "width">;
13
13
  interface StyledInputProps extends InputMixinProps {
14
14
  $leftIcon?: ReactNode;
15
15
  $hasRightItem?: boolean;
@@ -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-DMgVyZyq.d.mts.map
65
+ //# sourceMappingURL=Input-DsS4J78T.d.mts.map
@@ -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-RcEfNFLx.mjs";
4
- import { n as Button } from "./IconButton-P8w0JDI5.mjs";
5
- import { n as useFormField, t as FormControlContext } from "./useFormField-DhYd6bNn.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";
6
6
  import { BorderRadius, Color, Spacing } from "@persona/design-tokens";
7
7
  import styled, { css } from "styled-components";
8
- import { jsx, jsxs } from "react/jsx-runtime";
9
8
  import { cloneElement, forwardRef, useEffect, useRef, useState } from "react";
9
+ import { jsx, jsxs } from "react/jsx-runtime";
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-QC6xla6I.mjs.map
190
+ //# sourceMappingURL=Input-PWfwMSJ7.mjs.map