@persona/design-system 0.10.11 → 0.10.13

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 (375) hide show
  1. package/CHANGELOG.md +52 -0
  2. package/dist/{Action-sLO73eKq.d.mts → Action-CHWYwpYR.d.mts} +2 -2
  3. package/dist/Action.d.mts +1 -1
  4. package/dist/AdvancedFilterRuleRow.d.mts +3 -0
  5. package/dist/AdvancedFilterRulesPopover.d.mts +4 -0
  6. package/dist/Attribute.d.mts +2 -2
  7. package/dist/{Badge-DZq6ByIU.mjs → Badge-B2AJMf3d.mjs} +2 -2
  8. package/dist/{Badge-DZq6ByIU.mjs.map → Badge-B2AJMf3d.mjs.map} +1 -1
  9. package/dist/{Breadcrumbs-DpsNZWF9.mjs → Breadcrumbs-DRs9eo1o.mjs} +8 -8
  10. package/dist/{Breadcrumbs-DpsNZWF9.mjs.map → Breadcrumbs-DRs9eo1o.mjs.map} +1 -1
  11. package/dist/{Button-C4a4BTjL.d.mts → Button-DjD8QxcY.d.mts} +2 -2
  12. package/dist/Button.d.mts +1 -1
  13. package/dist/CalendarBase.d.mts +1 -1
  14. package/dist/{Card-CPV4_mHk.d.mts → Card-DiUHtYg_.d.mts} +4 -4
  15. package/dist/Card.d.mts +1 -1
  16. package/dist/Card2.d.mts +1 -1
  17. package/dist/CardGrouping.d.mts +1 -1
  18. package/dist/{CardV2-DCoDfEvr.mjs → CardV2-DO-8COfu.mjs} +12 -12
  19. package/dist/{CardV2-DCoDfEvr.mjs.map → CardV2-DO-8COfu.mjs.map} +1 -1
  20. package/dist/{Checkbox-C3z7UUSC.mjs → Checkbox-BAh-wF_F.mjs} +5 -5
  21. package/dist/{Checkbox-C3z7UUSC.mjs.map → Checkbox-BAh-wF_F.mjs.map} +1 -1
  22. package/dist/{CheckboxGroupField-BT87OVOF.d.mts → CheckboxGroupField-BW_BcW3L.d.mts} +2 -2
  23. package/dist/CheckboxGroupField.d.mts +1 -1
  24. package/dist/{Combobox-aOJDTjzC.d.mts → Combobox-DgYwerwd.d.mts} +3 -3
  25. package/dist/{Combobox-BkK_tosd.mjs → Combobox-DmFQ5cAy.mjs} +92 -89
  26. package/dist/Combobox-DmFQ5cAy.mjs.map +1 -0
  27. package/dist/Combobox.d.mts +2 -2
  28. package/dist/{ComboboxBase-Brgv5nxk.d.mts → ComboboxBase-DoKiRjgS.d.mts} +6 -6
  29. package/dist/ComboboxBase.d.mts +1 -1
  30. package/dist/{ComboboxMultiSelect-DJyAv0Eg.d.mts → ComboboxMultiSelect-DsoIMJiZ.d.mts} +2 -2
  31. package/dist/ComboboxMultiSelect.d.mts +1 -1
  32. package/dist/{ComboboxSingleSelect-CP8-HLKl.d.mts → ComboboxSingleSelect-CKsqOAGB.d.mts} +3 -3
  33. package/dist/ComboboxSingleSelect.d.mts +1 -1
  34. package/dist/{CompactBar-B0LhjrYV.d.mts → CompactBar-tNtY2EhN.d.mts} +3 -3
  35. package/dist/CompactBar.d.mts +1 -1
  36. package/dist/{ConfigFormGroup-DAUqAhJW.mjs → ConfigFormGroup-BCTWCws5.mjs} +2 -2
  37. package/dist/{ConfigFormGroup-DAUqAhJW.mjs.map → ConfigFormGroup-BCTWCws5.mjs.map} +1 -1
  38. package/dist/{ControlBar-B3Jn8G0k.d.mts → ControlBar-CDb6b1_6.d.mts} +5 -3
  39. package/dist/ControlBar.d.mts +1 -1
  40. package/dist/{DataTable-DiwzhNMt.mjs → DataTable-DZ0B2Zm9.mjs} +159 -90
  41. package/dist/DataTable-DZ0B2Zm9.mjs.map +1 -0
  42. package/dist/{DataTable-CSl5Jn3E.d.mts → DataTable-on3vGhyi.d.mts} +32 -8
  43. package/dist/DataTable.d.mts +1 -1
  44. package/dist/{DatePicker-BK7ioKBm.mjs → DatePicker-CHVYVKB-.mjs} +375 -375
  45. package/dist/DatePicker-CHVYVKB-.mjs.map +1 -0
  46. package/dist/{DropdownButton-Dp-MZ5tA.mjs → DropdownButton-BxZ5hn0X.mjs} +3 -3
  47. package/dist/{DropdownButton-Dp-MZ5tA.mjs.map → DropdownButton-BxZ5hn0X.mjs.map} +1 -1
  48. package/dist/DropdownButton.d.mts +2 -2
  49. package/dist/{DropdownMenu-jJSHQaih.mjs → DropdownMenu-Ip75l4Th.mjs} +21 -4
  50. package/dist/DropdownMenu-Ip75l4Th.mjs.map +1 -0
  51. package/dist/{DropdownMenu-BnHPeHOm.d.mts → DropdownMenu-eVY-Yjpq.d.mts} +3 -3
  52. package/dist/DropdownMenu.d.mts +1 -1
  53. package/dist/{FilterBar-DDyk14sx.d.mts → FilterBar-CA4mDAXK.d.mts} +10 -2
  54. package/dist/FilterBar.d.mts +1 -1
  55. package/dist/{FloatingActionBar-BUgSKimy.d.mts → FloatingActionBar-CfgjHs81.d.mts} +5 -1
  56. package/dist/FloatingActionBar.d.mts +1 -1
  57. package/dist/{FloatingToolbar-rfKurDs8.mjs → FloatingToolbar-BA8Fqmrz.mjs} +4 -4
  58. package/dist/{FloatingToolbar-rfKurDs8.mjs.map → FloatingToolbar-BA8Fqmrz.mjs.map} +1 -1
  59. package/dist/{FormControl-DPYbLcBK.d.mts → FormControl-BQe3GRhi.d.mts} +2 -2
  60. package/dist/{FormControl--pbTH3bY.mjs → FormControl-BoKGiWdQ.mjs} +3 -3
  61. package/dist/{FormControl--pbTH3bY.mjs.map → FormControl-BoKGiWdQ.mjs.map} +1 -1
  62. package/dist/FormControl.d.mts +1 -1
  63. package/dist/FormControlLabel.d.mts +2 -2
  64. package/dist/{FormField-CYNGm2bJ.d.mts → FormField-BW5uMzId.d.mts} +2 -2
  65. package/dist/{FormField-DMxjftFw.mjs → FormField-BfVrDOY0.mjs} +13 -13
  66. package/dist/{FormField-DMxjftFw.mjs.map → FormField-BfVrDOY0.mjs.map} +1 -1
  67. package/dist/FormField.d.mts +1 -1
  68. package/dist/{Grid-DVC0SSEZ.mjs → Grid-CYpOqTUu.mjs} +2 -2
  69. package/dist/{Grid-DVC0SSEZ.mjs.map → Grid-CYpOqTUu.mjs.map} +1 -1
  70. package/dist/{Header-DaaUprCL.d.mts → Header-CV0Lcf0C.d.mts} +2 -2
  71. package/dist/Header.d.mts +1 -1
  72. package/dist/{HelperTooltip-C5BDdJSI.d.mts → HelperTooltip-BNM3pTM-.d.mts} +2 -2
  73. package/dist/HelperTooltip.d.mts +1 -1
  74. package/dist/HighlightedText.d.mts +1 -1
  75. package/dist/{HoverCopyableField-B2-xlwUt.mjs → HoverCopyableField-CJ_p3llp.mjs} +5 -5
  76. package/dist/{HoverCopyableField-B2-xlwUt.mjs.map → HoverCopyableField-CJ_p3llp.mjs.map} +1 -1
  77. package/dist/{IconButton-kSjnfhWt.mjs → IconButton-Bj1fry_K.mjs} +8 -8
  78. package/dist/{IconButton-kSjnfhWt.mjs.map → IconButton-Bj1fry_K.mjs.map} +1 -1
  79. package/dist/{IconButton-7k-wjvH3.d.mts → IconButton-C_ReZm8v.d.mts} +2 -2
  80. package/dist/IconButton.d.mts +1 -1
  81. package/dist/ImageTile.d.mts +1 -1
  82. package/dist/IndexTableLayout.d.mts +12 -4
  83. package/dist/InlineCombobox.d.mts +1 -1
  84. package/dist/InlineInput.d.mts +1 -1
  85. package/dist/{Input-CwvrBsiS.d.mts → Input-DH-5dKor.d.mts} +3 -3
  86. package/dist/{Input-TRmTBEav.mjs → Input-DcbzPaax.mjs} +5 -5
  87. package/dist/{Input-TRmTBEav.mjs.map → Input-DcbzPaax.mjs.map} +1 -1
  88. package/dist/Input.d.mts +1 -1
  89. package/dist/{Link-XvzUN8sY.mjs → Link-Df3zJrj2.mjs} +4 -4
  90. package/dist/{Link-XvzUN8sY.mjs.map → Link-Df3zJrj2.mjs.map} +1 -1
  91. package/dist/{ListBox-DahM1PgU.mjs → ListBox-BRgjgUSp.mjs} +12 -12
  92. package/dist/{ListBox-DahM1PgU.mjs.map → ListBox-BRgjgUSp.mjs.map} +1 -1
  93. package/dist/{ListBox-BePQBYR7.d.mts → ListBox-Bgug8YZF.d.mts} +3 -3
  94. package/dist/ListBox.d.mts +1 -1
  95. package/dist/{ListBoxField-lj7JN1BX.d.mts → ListBoxField-Cc1sX2bo.d.mts} +4 -4
  96. package/dist/ListBoxField.d.mts +1 -1
  97. package/dist/{LoadingShimmer-CpfKTSUs.mjs → LoadingShimmer-BVVdBeN-.mjs} +18 -21
  98. package/dist/LoadingShimmer-BVVdBeN-.mjs.map +1 -0
  99. package/dist/LoadingShimmer.d.mts +1 -1
  100. package/dist/{LogicRow-Do7t7Suf.d.mts → LogicRow-B1_35ZJT.d.mts} +2 -2
  101. package/dist/LogicRow.d.mts +1 -1
  102. package/dist/MaskedInput.d.mts +2 -2
  103. package/dist/MatchHighlight.d.mts +1 -1
  104. package/dist/{Menu-BvMzSH2I.mjs → Menu-BVn1jh46.mjs} +5 -5
  105. package/dist/{Menu-BvMzSH2I.mjs.map → Menu-BVn1jh46.mjs.map} +1 -1
  106. package/dist/{Menu-Ca5ftvo6.d.mts → Menu-keVl-eKm.d.mts} +4 -4
  107. package/dist/Menu.d.mts +1 -1
  108. package/dist/{MiddleTruncatedText--jzGTD00.mjs → MiddleTruncatedText-DicQsLDG.mjs} +2 -2
  109. package/dist/{MiddleTruncatedText--jzGTD00.mjs.map → MiddleTruncatedText-DicQsLDG.mjs.map} +1 -1
  110. package/dist/{Modal-BPfFyzkw.d.mts → Modal-CujB7DuB.d.mts} +3 -3
  111. package/dist/{Modal-B6X5AgWj.mjs → Modal-SnCo7ecm.mjs} +8 -7
  112. package/dist/Modal-SnCo7ecm.mjs.map +1 -0
  113. package/dist/Modal.d.mts +1 -1
  114. package/dist/{PageHeader-bhQTjuZF.mjs → PageHeader-6KvtGED-.mjs} +2 -2
  115. package/dist/{PageHeader-bhQTjuZF.mjs.map → PageHeader-6KvtGED-.mjs.map} +1 -1
  116. package/dist/{PageHeader-BeBmYmUX.d.mts → PageHeader-UPiqJpIF.d.mts} +2 -2
  117. package/dist/PageHeader.d.mts +1 -1
  118. package/dist/{PageLayout-BXM_pyrU.d.mts → PageLayout-BdVM37bV.d.mts} +2 -2
  119. package/dist/{PageLayout-DgEGcZgB.mjs → PageLayout-CPiVnS_r.mjs} +5 -3
  120. package/dist/PageLayout-CPiVnS_r.mjs.map +1 -0
  121. package/dist/PageLayout.d.mts +1 -1
  122. package/dist/{PageSelector-C14ABZVL.d.mts → PageSelector-B5CcAzss.d.mts} +2 -2
  123. package/dist/PageSelector.d.mts +1 -1
  124. package/dist/{Pagination-DE8wT55m.mjs → Pagination-CqFvnlXc.mjs} +5 -5
  125. package/dist/{Pagination-DE8wT55m.mjs.map → Pagination-CqFvnlXc.mjs.map} +1 -1
  126. package/dist/{Pii-C42ZY88Y.mjs → Pii-BYPkrBuT.mjs} +2 -2
  127. package/dist/{Pii-C42ZY88Y.mjs.map → Pii-BYPkrBuT.mjs.map} +1 -1
  128. package/dist/{Popover-DuFjaSoq.mjs → Popover-DP9DXReH.mjs} +48 -20
  129. package/dist/Popover-DP9DXReH.mjs.map +1 -0
  130. package/dist/Popover.d.mts +1 -1
  131. package/dist/ProgressBar.d.mts +1 -1
  132. package/dist/{ProgressIndicator-hy1P-RG1.mjs → ProgressIndicator-zt3ndT9U.mjs} +3 -3
  133. package/dist/{ProgressIndicator-hy1P-RG1.mjs.map → ProgressIndicator-zt3ndT9U.mjs.map} +1 -1
  134. package/dist/{Radio-B4TBAho6.mjs → Radio-B1H_S-Qj.mjs} +4 -4
  135. package/dist/{Radio-B4TBAho6.mjs.map → Radio-B1H_S-Qj.mjs.map} +1 -1
  136. package/dist/{RadioGroup-Bf24GKOb.mjs → RadioGroup-7hdcVhsp.mjs} +3 -3
  137. package/dist/{RadioGroup-Bf24GKOb.mjs.map → RadioGroup-7hdcVhsp.mjs.map} +1 -1
  138. package/dist/RichTextEditor.d.mts +1 -1
  139. package/dist/SectionHeading.d.mts +1 -1
  140. package/dist/{SegmentedControl-BpR7sUWO.mjs → SegmentedControl-BNOJ1FYQ.mjs} +3 -3
  141. package/dist/{SegmentedControl-BpR7sUWO.mjs.map → SegmentedControl-BNOJ1FYQ.mjs.map} +1 -1
  142. package/dist/{Select-DYdn73Nh.d.mts → Select-CiofH5-f.d.mts} +2 -2
  143. package/dist/{Select-RdTT2KoH.mjs → Select-DbWEgH5c.mjs} +9 -9
  144. package/dist/{Select-RdTT2KoH.mjs.map → Select-DbWEgH5c.mjs.map} +1 -1
  145. package/dist/Select.d.mts +1 -1
  146. package/dist/SmartTextInput.d.mts +1 -1
  147. package/dist/SmartTextInputField.d.mts +2 -2
  148. package/dist/SmartTextInputFunctionDialog.d.mts +1 -1
  149. package/dist/SmartTextInputListbox.d.mts +8 -3
  150. package/dist/SmartTextInputPopover.d.mts +1 -1
  151. package/dist/{Spinner-vcApnJzv.mjs → Spinner-k9ZiOdTr.mjs} +2 -2
  152. package/dist/{Spinner-vcApnJzv.mjs.map → Spinner-k9ZiOdTr.mjs.map} +1 -1
  153. package/dist/{Stack-B6MrjJeW.d.mts → Stack-CODxfzhl.d.mts} +2 -2
  154. package/dist/Stack.d.mts +1 -1
  155. package/dist/{StatusIndicator-lwt35J6B.mjs → StatusIndicator-CzRaEFSz.mjs} +3 -3
  156. package/dist/{StatusIndicator-lwt35J6B.mjs.map → StatusIndicator-CzRaEFSz.mjs.map} +1 -1
  157. package/dist/{Sticker-jfOM4Yi6.mjs → Sticker-4VdGEFAu.mjs} +5 -5
  158. package/dist/{Sticker-jfOM4Yi6.mjs.map → Sticker-4VdGEFAu.mjs.map} +1 -1
  159. package/dist/{Sticker-C7Wv3Obx.d.mts → Sticker-CLvRB8V5.d.mts} +4 -4
  160. package/dist/Sticker.d.mts +1 -1
  161. package/dist/Tab.d.mts +2 -2
  162. package/dist/{TabBar-DwHgbIQ6.mjs → TabBar-d4sdknti.mjs} +6 -6
  163. package/dist/{TabBar-DwHgbIQ6.mjs.map → TabBar-d4sdknti.mjs.map} +1 -1
  164. package/dist/{Table-SMJAWqoe.mjs → Table-9mNn8Q-d.mjs} +10 -10
  165. package/dist/{Table-SMJAWqoe.mjs.map → Table-9mNn8Q-d.mjs.map} +1 -1
  166. package/dist/{TableBox-DS8mpN3-.mjs → TableBox-RxpwflEb.mjs} +14 -14
  167. package/dist/{TableBox-DS8mpN3-.mjs.map → TableBox-RxpwflEb.mjs.map} +1 -1
  168. package/dist/TableBox.d.mts +1 -1
  169. package/dist/{TableBoxCell-Bo5xYEmR.d.mts → TableBoxCell-C65YFYqj.d.mts} +6 -6
  170. package/dist/TableBoxCell.d.mts +1 -1
  171. package/dist/{TableBoxField-CdgjSGLK.d.mts → TableBoxField-CHpClgsE.d.mts} +5 -5
  172. package/dist/TableBoxField.d.mts +1 -1
  173. package/dist/{TableBoxRow-DuWS2iRC.d.mts → TableBoxRow-CK-b79uD.d.mts} +2 -2
  174. package/dist/TableBoxRow.d.mts +1 -1
  175. package/dist/{TableBoxRowActions-zW74DkXt.d.mts → TableBoxRowActions-CRaabjaY.d.mts} +2 -2
  176. package/dist/TableBoxRowActions.d.mts +1 -1
  177. package/dist/{TableCell-uv_jqT5e.d.mts → TableCell-CQsF7t4e.d.mts} +2 -2
  178. package/dist/TableCell.d.mts +1 -1
  179. package/dist/{TableControls-CX7BvgD2.mjs → TableControls-DM4RddQ_.mjs} +77 -36
  180. package/dist/TableControls-DM4RddQ_.mjs.map +1 -0
  181. package/dist/{TableControls-9vz-HfDu.d.mts → TableControls-v1NmlFTW.d.mts} +5 -5
  182. package/dist/TableControls.d.mts +1 -1
  183. package/dist/{TableControlsContext-D0Hn3rwL.d.mts → TableControlsContext-DHYICXxy.d.mts} +2 -2
  184. package/dist/TableControlsContext.d.mts +1 -1
  185. package/dist/{TableViewConfigurationDropdown-CZcLH8uR.d.mts → TableViewConfigurationDropdown-1nT8wneI.d.mts} +2 -2
  186. package/dist/TableViewConfigurationDropdown.d.mts +1 -1
  187. package/dist/{TechnicalSticker-DrN45Vut.mjs → TechnicalSticker-DtV7Gawf.mjs} +7 -7
  188. package/dist/{TechnicalSticker-DrN45Vut.mjs.map → TechnicalSticker-DtV7Gawf.mjs.map} +1 -1
  189. package/dist/{Text-CdHeSHCc.d.mts → Text-CvaqognH.d.mts} +2 -2
  190. package/dist/Text.d.mts +1 -1
  191. package/dist/{TextUnderlineTooltip-By1VVsSs.d.mts → TextUnderlineTooltip-Bd5e8KH3.d.mts} +3 -3
  192. package/dist/TextUnderlineTooltip.d.mts +1 -1
  193. package/dist/Tile.d.mts +1 -1
  194. package/dist/{Toggle-DjmkjJlw.mjs → Toggle-CzHoIR-n.mjs} +6 -6
  195. package/dist/{Toggle-DjmkjJlw.mjs.map → Toggle-CzHoIR-n.mjs.map} +1 -1
  196. package/dist/{Tooltip-C2VB8I6y.mjs → Tooltip-CVBxc1yf.mjs} +4 -4
  197. package/dist/{Tooltip-C2VB8I6y.mjs.map → Tooltip-CVBxc1yf.mjs.map} +1 -1
  198. package/dist/{Tooltip-OxVvOfn8.d.mts → Tooltip-Ddy2Jq0K.d.mts} +3 -3
  199. package/dist/Tooltip.d.mts +1 -1
  200. package/dist/{TruncatedText-Dqj94BFK.d.mts → TruncatedText-sr9Fhm3N.d.mts} +2 -2
  201. package/dist/WizardModal.d.mts +1 -1
  202. package/dist/{clientFilterUtils-CMLuN8kK.d.mts → clientFilterUtils-CaF2QZBy.d.mts} +2 -2
  203. package/dist/clientFilterUtils.d.mts +1 -1
  204. package/dist/components/Accordion/index.mjs +5 -5
  205. package/dist/components/Attribute/index.mjs +6 -6
  206. package/dist/components/Badge/index.mjs +1 -1
  207. package/dist/components/Banner/index.mjs +3 -3
  208. package/dist/components/BottomPanel/index.mjs +7 -7
  209. package/dist/components/Breadcrumbs/index.mjs +1 -1
  210. package/dist/components/Button/index.d.mts +2 -2
  211. package/dist/components/Button/index.mjs +1 -1
  212. package/dist/components/ButtonGroup/index.mjs +2 -2
  213. package/dist/components/Card/index.d.mts +2 -2
  214. package/dist/components/CardV2/index.d.mts +1 -1
  215. package/dist/components/CardV2/index.mjs +1 -1
  216. package/dist/components/Checkbox/index.mjs +1 -1
  217. package/dist/components/CodeHighlight/index.mjs +4 -4
  218. package/dist/components/Combobox/index.d.mts +4 -4
  219. package/dist/components/Combobox/index.mjs +1 -1
  220. package/dist/components/ConfigFormGroup/index.mjs +1 -1
  221. package/dist/components/DataTable/TableControls/index.d.mts +9 -9
  222. package/dist/components/DataTable/TableControls/index.mjs +1 -1
  223. package/dist/components/DataTable/index.d.mts +6 -6
  224. package/dist/components/DataTable/index.mjs +1 -1
  225. package/dist/components/DataTable/types.d.mts +1 -1
  226. package/dist/components/DatePicker/index.mjs +1 -1
  227. package/dist/components/DropdownButton/index.mjs +1 -1
  228. package/dist/components/DropdownMenu/index.d.mts +1 -1
  229. package/dist/components/DropdownMenu/index.mjs +1 -1
  230. package/dist/components/FloatingPanel/index.mjs +8 -8
  231. package/dist/components/FloatingToolbar/index.mjs +1 -1
  232. package/dist/components/FormControl/index.d.mts +1 -1
  233. package/dist/components/FormControl/index.mjs +1 -1
  234. package/dist/components/FormField/index.d.mts +5 -5
  235. package/dist/components/FormField/index.mjs +1 -1
  236. package/dist/components/Grid/index.mjs +1 -1
  237. package/dist/components/HoverCopyableField/index.mjs +1 -1
  238. package/dist/components/ImageTile/index.mjs +8 -8
  239. package/dist/components/Input/index.d.mts +1 -1
  240. package/dist/components/Input/index.mjs +1 -1
  241. package/dist/components/Link/index.mjs +1 -1
  242. package/dist/components/ListBox/index.d.mts +3 -3
  243. package/dist/components/ListBox/index.mjs +1 -1
  244. package/dist/components/LoadingShimmer/index.mjs +1 -1
  245. package/dist/components/MaskedInput/index.mjs +1 -1
  246. package/dist/components/Menu/index.d.mts +1 -1
  247. package/dist/components/Menu/index.mjs +1 -1
  248. package/dist/components/Modal/index.d.mts +1 -1
  249. package/dist/components/Modal/index.mjs +1 -1
  250. package/dist/components/PageHeader/index.d.mts +1 -1
  251. package/dist/components/PageHeader/index.mjs +1 -1
  252. package/dist/components/Pagination/index.d.mts +1 -1
  253. package/dist/components/Pagination/index.mjs +1 -1
  254. package/dist/components/Pii/index.mjs +1 -1
  255. package/dist/components/Popover/index.mjs +1 -1
  256. package/dist/components/ProgressBar/index.mjs +2 -2
  257. package/dist/components/ProgressIndicator/index.mjs +1 -1
  258. package/dist/components/Radio/index.mjs +1 -1
  259. package/dist/components/RadioGroup/index.mjs +1 -1
  260. package/dist/components/RichTextEditor/index.mjs +9 -9
  261. package/dist/components/RightPanel/index.mjs +4 -4
  262. package/dist/components/SegmentedControl/index.mjs +1 -1
  263. package/dist/components/Select/index.d.mts +1 -1
  264. package/dist/components/Select/index.mjs +1 -1
  265. package/dist/components/SelectionCard/index.mjs +5 -5
  266. package/dist/components/Slider/index.mjs +4 -4
  267. package/dist/components/SmartTextInput/index.mjs +112 -118
  268. package/dist/components/SmartTextInput/index.mjs.map +1 -1
  269. package/dist/{safe-parse.d.mts → components/SmartTextInput/parser/safe-parse.d.mts} +1 -1
  270. package/dist/components/SmartTextInput/parser/safe-parse.mjs +30 -0
  271. package/dist/components/SmartTextInput/parser/safe-parse.mjs.map +1 -0
  272. package/dist/{tree.d.mts → components/SmartTextInput/parser/tree.d.mts} +1 -1
  273. package/dist/components/SmartTextInput/parser/tree.mjs +42 -0
  274. package/dist/components/SmartTextInput/parser/tree.mjs.map +1 -0
  275. package/dist/components/Spinner/index.mjs +1 -1
  276. package/dist/components/Stack/index.d.mts +1 -1
  277. package/dist/components/StatusIndicator/index.mjs +1 -1
  278. package/dist/components/Sticker/index.d.mts +1 -1
  279. package/dist/components/Sticker/index.mjs +1 -1
  280. package/dist/components/SwatchPicker/index.mjs +1 -1
  281. package/dist/components/TabBar/index.mjs +1 -1
  282. package/dist/components/Table/index.d.mts +1 -1
  283. package/dist/components/Table/index.mjs +1 -1
  284. package/dist/components/TableBox/index.d.mts +1 -1
  285. package/dist/components/TableBox/index.mjs +1 -1
  286. package/dist/components/TechnicalSticker/index.mjs +1 -1
  287. package/dist/components/Text/index.d.mts +1 -1
  288. package/dist/components/Tile/index.mjs +2 -2
  289. package/dist/components/Toast/index.mjs +4 -4
  290. package/dist/components/Toggle/index.mjs +1 -1
  291. package/dist/components/Tooltip/index.d.mts +3 -3
  292. package/dist/components/Tooltip/index.mjs +1 -1
  293. package/dist/components/VersionHistory/index.mjs +7 -7
  294. package/dist/fieldPickerOptions.d.mts +1 -1
  295. package/dist/{filters-By_TYKAZ.d.mts → filters-CShP0Jag.d.mts} +3 -3
  296. package/dist/filters.d.mts +1 -1
  297. package/dist/{helpers-BIHsqdyX.d.mts → helpers-Bbi1LyMW.d.mts} +5 -3
  298. package/dist/helpers.d.mts +1 -1
  299. package/dist/{index-CZJp4Af6.d.mts → index-3-eDlpcj.d.mts} +3 -3
  300. package/dist/{index-BozzRwby.d.mts → index-DTM_t7OG.d.mts} +2 -2
  301. package/dist/index2.d.mts +1 -1
  302. package/dist/index4.d.mts +2 -2
  303. package/dist/index6.d.mts +2 -2
  304. package/dist/{inputFields-BqO2H-Kj.d.mts → inputFields-Dobwb4kT.d.mts} +6 -6
  305. package/dist/inputFields.d.mts +1 -1
  306. package/dist/lib/MiddleTruncatedText.mjs +1 -1
  307. package/dist/lib/PDSProvider.d.mts +2 -1
  308. package/dist/lib/PDSProvider.mjs +8 -3
  309. package/dist/lib/PDSProvider.mjs.map +1 -1
  310. package/dist/lib/TruncatedText.d.mts +1 -1
  311. package/dist/lib/TruncatedTextWithTooltip.d.mts +1 -1
  312. package/dist/lib/TruncatedTextWithTooltip.mjs +1 -1
  313. package/dist/lib/colorMode.d.mts +19 -8
  314. package/dist/lib/colorMode.mjs +47 -13
  315. package/dist/lib/colorMode.mjs.map +1 -1
  316. package/dist/lib/schemaOptions.mjs +1 -1
  317. package/dist/lib/schemaOptions.mjs.map +1 -1
  318. package/dist/lib/useChain.d.mts +1 -1
  319. package/dist/lib/useCloseFocus.d.mts +45 -0
  320. package/dist/lib/useCloseFocus.mjs +123 -0
  321. package/dist/lib/useCloseFocus.mjs.map +1 -0
  322. package/dist/mixins/focus.mjs +1 -1
  323. package/dist/mixins/hoverable.mjs +1 -1
  324. package/dist/mixins/input.mjs +2 -2
  325. package/dist/mixins/motion.d.mts +6 -2
  326. package/dist/mixins/motion.mjs +25 -3
  327. package/dist/mixins/motion.mjs.map +1 -1
  328. package/dist/patterns/CardGrouping/index.mjs +8 -8
  329. package/dist/patterns/IndexTableLayout/index.mjs +23 -16
  330. package/dist/patterns/IndexTableLayout/index.mjs.map +1 -1
  331. package/dist/patterns/LayoutLoadingShimmer/index.mjs +4 -4
  332. package/dist/patterns/LayoutLoadingSpinner/index.mjs +1 -1
  333. package/dist/patterns/PageLayout/index.d.mts +1 -1
  334. package/dist/patterns/PageLayout/index.mjs +1 -1
  335. package/dist/patterns/WizardModal/index.mjs +4 -4
  336. package/dist/tone.d.mts +1 -1
  337. package/dist/{types-C_CncajO.d.mts → types-BTaKBrxG.d.mts} +2 -2
  338. package/dist/{types-D5txFacG.d.mts → types-CUnL8JJj.d.mts} +7 -5
  339. package/dist/types5.d.mts +1 -1
  340. package/dist/{useChain-x9fd9Fyq.d.mts → useChain-B--KAtdN.d.mts} +2 -2
  341. package/dist/useChainAtCursor.d.mts +1 -1
  342. package/dist/useColumnConfiguration.d.mts +2 -2
  343. package/dist/useComboboxFooterAction.d.mts +1 -1
  344. package/dist/{useTableColumns-BEKJNrb1.d.mts → useTableColumns-BuxN7Usm.d.mts} +17 -2
  345. package/dist/useTableColumns.d.mts +1 -1
  346. package/dist/useTruncation.d.mts +1 -1
  347. package/dist/utils4.d.mts +1 -1
  348. package/dist/value-labels.d.mts +12 -0
  349. package/dist/withDisabledReason.d.mts +19 -0
  350. package/llms.txt +5 -4
  351. package/package.json +10 -12
  352. package/skills/ui-authoring/COMPONENTS.md +1 -2
  353. package/skills/ui-authoring/PATTERNS.md +6 -66
  354. package/skills/ui-authoring/STANDARD.md +11 -1
  355. package/skills/ui-authoring/TOKENS.md +14 -25
  356. package/dist/ChartFrame.d.mts +0 -61
  357. package/dist/ChartLegend.d.mts +0 -60
  358. package/dist/ChartPopover.d.mts +0 -155
  359. package/dist/Combobox-BkK_tosd.mjs.map +0 -1
  360. package/dist/DataTable-DiwzhNMt.mjs.map +0 -1
  361. package/dist/DatePicker-BK7ioKBm.mjs.map +0 -1
  362. package/dist/DropdownMenu-jJSHQaih.mjs.map +0 -1
  363. package/dist/LoadingShimmer-CpfKTSUs.mjs.map +0 -1
  364. package/dist/Modal-B6X5AgWj.mjs.map +0 -1
  365. package/dist/PageLayout-DgEGcZgB.mjs.map +0 -1
  366. package/dist/Popover-DuFjaSoq.mjs.map +0 -1
  367. package/dist/TableControls-CX7BvgD2.mjs.map +0 -1
  368. package/dist/chartColors.d.mts +0 -92
  369. package/dist/chartFrameLayout.d.mts +0 -46
  370. package/dist/components/Chart/index.d.mts +0 -9
  371. package/dist/components/Chart/index.mjs +0 -680
  372. package/dist/components/Chart/index.mjs.map +0 -1
  373. package/dist/useChartColors.d.mts +0 -30
  374. package/dist/useChartSeriesVisibility.d.mts +0 -22
  375. package/dist/useChartStyles.d.mts +0 -108
@@ -1,10 +1,10 @@
1
1
  import { a as styled, r as css } from "./styledComponentsInterop-Cs5CCPRy.mjs";
2
2
  import { semanticColor } from "./lib/semanticColor.mjs";
3
- import { a as Tooltip, n as TextWithDashedUnderline } from "./Tooltip-C2VB8I6y.mjs";
3
+ import { a as Tooltip, n as TextWithDashedUnderline } from "./Tooltip-CVBxc1yf.mjs";
4
4
  import { n as useFormGroup } from "./useFormGroup-DSQkoWLh.mjs";
5
5
  import { n as useFormField, t as FormControlContext } from "./useFormField-pOVkb5BK.mjs";
6
- import { Color, Spacing, Typography } from "@persona/design-tokens";
7
6
  import { Children, forwardRef, isValidElement, useMemo } from "react";
7
+ import { Color, Spacing, Typography } from "@persona/design-tokens";
8
8
  import { jsx, jsxs } from "react/jsx-runtime";
9
9
  import { uniqueId } from "lodash-es";
10
10
  import { Root } from "@radix-ui/react-label";
@@ -181,4 +181,4 @@ const FormControl = forwardRef(function FormControl({ children, hasError, hasWar
181
181
  //#endregion
182
182
  export { FormLabel as a, FormInputContainer as i, ErrorText as n, HelperText as o, FormControl as r, WarningText as s, Container as t };
183
183
 
184
- //# sourceMappingURL=FormControl--pbTH3bY.mjs.map
184
+ //# sourceMappingURL=FormControl-BoKGiWdQ.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"FormControl--pbTH3bY.mjs","names":[],"sources":["../src/components/FormControl/FormControl.tsx"],"sourcesContent":["import { Root } from '@radix-ui/react-label';\nimport { uniqueId } from 'lodash-es';\nimport {\n Children,\n type ComponentPropsWithoutRef,\n forwardRef,\n isValidElement,\n type ReactNode,\n useMemo,\n} from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { Color, Spacing, Typography } from '@persona/design-tokens';\n\nimport useFormGroup from '#src/components/ConfigFormGroup/useFormGroup';\nimport useFormField, {\n FormControlContext,\n type FormControlContextProps,\n} from '#src/components/FormControl/useFormField';\nimport Tooltip, { TextWithDashedUnderline } from '#src/components/Tooltip';\nimport { semanticColor } from '#src/lib/semanticColor';\nimport type ErrorProps from '#src/types/ErrorProps';\n\ntype LabelSizes = 'md' | 'sm';\n\ninterface StyledLabelProps {\n $size?: LabelSizes;\n}\n\nconst LabelBase = styled(Root)<StyledLabelProps>`\n ${({ $size }) => {\n switch ($size) {\n default:\n case 'md':\n return css`\n ${Typography.TextMedium};\n `;\n case 'sm':\n return css`\n ${Typography.TextSmall};\n `;\n }\n }}\n\n color: ${({ theme }) => semanticColor(theme, 'FgPrimary', theme.color.text.primary)};\n`;\n\nexport interface FormLabelProps extends ComponentPropsWithoutRef<typeof Root> {\n tooltip?: ReactNode;\n size?: LabelSizes;\n side?: 'top' | 'right' | 'bottom' | 'left';\n labelTooltipZIndex?: number;\n required?: boolean;\n}\n\nconst RequiredIndicator = styled.span`\n margin-left: ${Spacing[1]};\n vertical-align: top;\n color: ${({ theme }) => semanticColor(theme, 'FgDanger1', theme.color.variants.danger.default)};\n`;\n\nexport const FormLabel = ({\n tooltip,\n side,\n size,\n children,\n labelTooltipZIndex,\n required,\n ...props\n}: FormLabelProps) => {\n const field = useFormField({ labelId: props.id, required });\n const formGroup = useFormGroup();\n const labelProps = {\n id: field.labelId,\n htmlFor: field.inputId,\n ...props,\n };\n\n // Use labelTooltipZIndex from props, then from form group context\n const effectivelabelTooltipZIndex = labelTooltipZIndex ?? formGroup.labelTooltipZIndex;\n\n if (tooltip) {\n return (\n <Tooltip\n size={size}\n trigger={\n <LabelBase {...labelProps} $size={size}>\n <TextWithDashedUnderline>{children}</TextWithDashedUnderline>\n {field.required && <RequiredIndicator aria-hidden>*</RequiredIndicator>}\n </LabelBase>\n }\n side={side}\n {...(effectivelabelTooltipZIndex != null && { zIndex: effectivelabelTooltipZIndex })}\n >\n {tooltip}\n </Tooltip>\n );\n }\n\n return (\n <LabelBase {...labelProps} $size={size}>\n {children}\n {field.required && <RequiredIndicator aria-hidden>*</RequiredIndicator>}\n </LabelBase>\n );\n};\n\n/**\n * Used to target an input field within a FormControl.\n */\nexport const FormInputContainer = styled.div``;\n\nconst HelperTextBase = styled.div<ErrorProps>`\n ${Typography.TextSmall};\n line-height: 1;\n color: ${({ theme, hasWarning, hasError }) =>\n hasError\n ? semanticColor(theme, 'FgDanger1', theme.color.variants.danger.default)\n : hasWarning\n ? semanticColor(theme, 'FgWarning1', Color.CoreOrange900)\n : semanticColor(theme, 'FgSecondary', theme.color.text.secondary)};\n`;\n\ninterface HelperTextProps extends ComponentPropsWithoutRef<'div'>, ErrorProps {}\n\nexport const HelperText = forwardRef<HTMLDivElement, HelperTextProps>(\n function HelperText(props, ref) {\n const field = useFormField({ helperTextId: props.id });\n return (\n <HelperTextBase\n hasError={field.hasError}\n hasWarning={field.hasWarning}\n id={field.helperTextId}\n ref={ref}\n {...props}\n />\n );\n },\n);\n\nexport const ErrorText = forwardRef<HTMLDivElement, React.ComponentPropsWithoutRef<'div'>>(\n function ErrorText(props, ref) {\n const field = useFormField({ errorTextId: props.id });\n return <HelperTextBase hasError id={field.errorTextId} ref={ref} {...props} />;\n },\n);\n\nexport const WarningText = forwardRef<HTMLDivElement, React.ComponentPropsWithoutRef<'div'>>(\n function WarningText(props, ref) {\n const field = useFormField({ warningTextId: props.id });\n return <HelperTextBase hasWarning id={field.warningTextId} ref={ref} {...props} />;\n },\n);\n\nexport const Container = styled.div<{\n $configField?: boolean;\n $hasRightActions?: boolean;\n $configFieldInputWidth?: string;\n}>`\n display: flex;\n ${({ $configField, $hasRightActions, $configFieldInputWidth }) =>\n $configField\n ? $hasRightActions\n ? css`\n flex-direction: column;\n `\n : css`\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n gap: ${Spacing[4]};\n min-width: 288px;\n\n > ${FormInputContainer} {\n display: flex;\n flex-direction: row-reverse;\n width: ${$configFieldInputWidth ?? '50%'};\n min-width: 180px;\n }\n\n &:has(textarea) {\n flex-direction: column;\n align-items: flex-start;\n gap: ${Spacing[1]};\n\n > ${FormInputContainer} {\n width: 100%;\n }\n }\n `\n : css`\n flex-direction: column;\n margin-bottom: ${Spacing[3]};\n `}\n\n > *:not(:first-child) {\n margin-top: ${({ $configField, $hasRightActions }) =>\n $hasRightActions ? Spacing[1] : $configField ? Spacing[0] : Spacing[2]};\n }\n\n > ${HelperTextBase} {\n margin-top: ${Spacing[1]};\n }\n`;\n\nexport interface FormControlBaseProps extends ErrorProps {\n inputId?: string;\n disabled?: boolean;\n /** Marks the field as required. `FormLabel` renders an asterisk. */\n required?: boolean;\n /**\n * Whether to render the form field as a config field.\n * This will remove the label and helper text.\n */\n configField?: boolean;\n /**\n * Whether the form field has right actions.\n */\n hasRightActions?: boolean;\n /**\n * Override the width of the form input container 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\nexport interface FormControlProps extends ComponentPropsWithoutRef<'div'>, FormControlBaseProps {}\n\nexport const FormControl = forwardRef<HTMLDivElement, FormControlProps>(function FormControl(\n {\n children,\n hasError,\n hasWarning,\n inputId,\n disabled,\n required,\n configField,\n hasRightActions,\n configFieldInputWidth,\n ...props\n }: FormControlProps,\n ref,\n) {\n const generatedId = useMemo(() => uniqueId('pds_form_control__'), []);\n\n const initFormField: FormControlContextProps = {\n hasError,\n hasWarning,\n disabled,\n required: required ?? false,\n inputId: inputId ?? generatedId,\n configField,\n };\n\n Children.map(children, (child: ReactNode) => {\n if (isValidElement(child)) {\n switch (child.type) {\n case FormLabel: {\n initFormField.labelId = child.props.id ?? `${initFormField.inputId}-label`;\n break;\n }\n case HelperText: {\n initFormField.helperTextId = child.props.id ?? `${initFormField.inputId}-help-text`;\n break;\n }\n case ErrorText: {\n initFormField.errorTextId = child.props.id ?? `${initFormField.inputId}-error-text`;\n break;\n }\n case WarningText: {\n initFormField.warningTextId = child.props.id ?? `${initFormField.inputId}-warning-text`;\n break;\n }\n }\n }\n });\n\n const field = useFormField(initFormField);\n\n return (\n <FormControlContext.Provider value={field}>\n <Container\n ref={ref}\n $configField={field.configField}\n $hasRightActions={hasRightActions}\n $configFieldInputWidth={configFieldInputWidth}\n {...props}\n >\n {children}\n </Container>\n </FormControlContext.Provider>\n );\n});\n\nexport default FormControl;\n"],"mappings":";;;;;;;;;;;AA6BA,MAAM,YAAY,OAAO,KAAK;KACzB,EAAE,YAAY;AACf,SAAQ,OAAR;EACE;EACA,KAAK,KACH,QAAO,GAAG;YACN,WAAW,WAAW;;EAE5B,KAAK,KACH,QAAO,GAAG;YACN,WAAW,UAAU;;;EAG7B;;YAEQ,EAAE,YAAY,cAAc,OAAO,aAAa,MAAM,MAAM,KAAK,QAAQ,CAAC;;AAWtF,MAAM,oBAAoB,OAAO,IAAI;iBACpB,QAAQ,GAAG;;YAEhB,EAAE,YAAY,cAAc,OAAO,aAAa,MAAM,MAAM,SAAS,OAAO,QAAQ,CAAC;;AAGjG,MAAa,aAAa,EACxB,SACA,MACA,MACA,UACA,oBACA,UACA,GAAG,YACiB;CACpB,MAAM,QAAQ,aAAa;EAAE,SAAS,MAAM;EAAI;EAAU,CAAC;CAC3D,MAAM,YAAY,cAAc;CAChC,MAAM,aAAa;E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MAAM;GACpB,kBAAkB;GAClB,wBAAwB;GACxB,GAAI;GAEH;GACS,CAAA;EACgB,CAAA;EAEhC"}
1
+ {"version":3,"file":"FormControl-BoKGiWdQ.mjs","names":[],"sources":["../src/components/FormControl/FormControl.tsx"],"sourcesContent":["import { Root } from '@radix-ui/react-label';\nimport { uniqueId } from 'lodash-es';\nimport {\n Children,\n type ComponentPropsWithoutRef,\n forwardRef,\n isValidElement,\n type ReactNode,\n useMemo,\n} from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { Color, Spacing, Typography } from '@persona/design-tokens';\n\nimport useFormGroup from '#src/components/ConfigFormGroup/useFormGroup';\nimport useFormField, {\n FormControlContext,\n type FormControlContextProps,\n} from '#src/components/FormControl/useFormField';\nimport Tooltip, { TextWithDashedUnderline } from '#src/components/Tooltip';\nimport { semanticColor } from '#src/lib/semanticColor';\nimport type ErrorProps from '#src/types/ErrorProps';\n\ntype LabelSizes = 'md' | 'sm';\n\ninterface StyledLabelProps {\n $size?: LabelSizes;\n}\n\nconst LabelBase = styled(Root)<StyledLabelProps>`\n ${({ $size }) => {\n switch ($size) {\n default:\n case 'md':\n return css`\n ${Typography.TextMedium};\n `;\n case 'sm':\n return css`\n ${Typography.TextSmall};\n `;\n }\n }}\n\n color: ${({ theme }) => semanticColor(theme, 'FgPrimary', theme.color.text.primary)};\n`;\n\nexport interface FormLabelProps extends ComponentPropsWithoutRef<typeof Root> {\n tooltip?: ReactNode;\n size?: LabelSizes;\n side?: 'top' | 'right' | 'bottom' | 'left';\n labelTooltipZIndex?: number;\n required?: boolean;\n}\n\nconst RequiredIndicator = styled.span`\n margin-left: ${Spacing[1]};\n vertical-align: top;\n color: ${({ theme }) => semanticColor(theme, 'FgDanger1', theme.color.variants.danger.default)};\n`;\n\nexport const FormLabel = ({\n tooltip,\n side,\n size,\n children,\n labelTooltipZIndex,\n required,\n ...props\n}: FormLabelProps) => {\n const field = useFormField({ labelId: props.id, required });\n const formGroup = useFormGroup();\n const labelProps = {\n id: field.labelId,\n htmlFor: field.inputId,\n ...props,\n };\n\n // Use labelTooltipZIndex from props, then from form group context\n const effectivelabelTooltipZIndex = labelTooltipZIndex ?? formGroup.labelTooltipZIndex;\n\n if (tooltip) {\n return (\n <Tooltip\n size={size}\n trigger={\n <LabelBase {...labelProps} $size={size}>\n <TextWithDashedUnderline>{children}</TextWithDashedUnderline>\n {field.required && <RequiredIndicator aria-hidden>*</RequiredIndicator>}\n </LabelBase>\n }\n side={side}\n {...(effectivelabelTooltipZIndex != null && { zIndex: effectivelabelTooltipZIndex })}\n >\n {tooltip}\n </Tooltip>\n );\n }\n\n return (\n <LabelBase {...labelProps} $size={size}>\n {children}\n {field.required && <RequiredIndicator aria-hidden>*</RequiredIndicator>}\n </LabelBase>\n );\n};\n\n/**\n * Used to target an input field within a FormControl.\n */\nexport const FormInputContainer = styled.div``;\n\nconst HelperTextBase = styled.div<ErrorProps>`\n ${Typography.TextSmall};\n line-height: 1;\n color: ${({ theme, hasWarning, hasError }) =>\n hasError\n ? semanticColor(theme, 'FgDanger1', theme.color.variants.danger.default)\n : hasWarning\n ? semanticColor(theme, 'FgWarning1', Color.CoreOrange900)\n : semanticColor(theme, 'FgSecondary', theme.color.text.secondary)};\n`;\n\ninterface HelperTextProps extends ComponentPropsWithoutRef<'div'>, ErrorProps {}\n\nexport const HelperText = forwardRef<HTMLDivElement, HelperTextProps>(\n function HelperText(props, ref) {\n const field = useFormField({ helperTextId: props.id });\n return (\n <HelperTextBase\n hasError={field.hasError}\n hasWarning={field.hasWarning}\n id={field.helperTextId}\n ref={ref}\n {...props}\n />\n );\n },\n);\n\nexport const ErrorText = forwardRef<HTMLDivElement, React.ComponentPropsWithoutRef<'div'>>(\n function ErrorText(props, ref) {\n const field = useFormField({ errorTextId: props.id });\n return <HelperTextBase hasError id={field.errorTextId} ref={ref} {...props} />;\n },\n);\n\nexport const WarningText = forwardRef<HTMLDivElement, React.ComponentPropsWithoutRef<'div'>>(\n function WarningText(props, ref) {\n const field = useFormField({ warningTextId: props.id });\n return <HelperTextBase hasWarning id={field.warningTextId} ref={ref} {...props} />;\n },\n);\n\nexport const Container = styled.div<{\n $configField?: boolean;\n $hasRightActions?: boolean;\n $configFieldInputWidth?: string;\n}>`\n display: flex;\n ${({ $configField, $hasRightActions, $configFieldInputWidth }) =>\n $configField\n ? $hasRightActions\n ? css`\n flex-direction: column;\n `\n : css`\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n gap: ${Spacing[4]};\n min-width: 288px;\n\n > ${FormInputContainer} {\n display: flex;\n flex-direction: row-reverse;\n width: ${$configFieldInputWidth ?? '50%'};\n min-width: 180px;\n }\n\n &:has(textarea) {\n flex-direction: column;\n align-items: flex-start;\n gap: ${Spacing[1]};\n\n > ${FormInputContainer} {\n width: 100%;\n }\n }\n `\n : css`\n flex-direction: column;\n margin-bottom: ${Spacing[3]};\n `}\n\n > *:not(:first-child) {\n margin-top: ${({ $configField, $hasRightActions }) =>\n $hasRightActions ? Spacing[1] : $configField ? Spacing[0] : Spacing[2]};\n }\n\n > ${HelperTextBase} {\n margin-top: ${Spacing[1]};\n }\n`;\n\nexport interface FormControlBaseProps extends ErrorProps {\n inputId?: string;\n disabled?: boolean;\n /** Marks the field as required. `FormLabel` renders an asterisk. */\n required?: boolean;\n /**\n * Whether to render the form field as a config field.\n * This will remove the label and helper text.\n */\n configField?: boolean;\n /**\n * Whether the form field has right actions.\n */\n hasRightActions?: boolean;\n /**\n * Override the width of the form input container 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\nexport interface FormControlProps extends ComponentPropsWithoutRef<'div'>, FormControlBaseProps {}\n\nexport const FormControl = forwardRef<HTMLDivElement, FormControlProps>(function FormControl(\n {\n children,\n hasError,\n hasWarning,\n inputId,\n disabled,\n required,\n configField,\n hasRightActions,\n configFieldInputWidth,\n ...props\n }: FormControlProps,\n ref,\n) {\n const generatedId = useMemo(() => uniqueId('pds_form_control__'), []);\n\n const initFormField: FormControlContextProps = {\n hasError,\n hasWarning,\n disabled,\n required: required ?? false,\n inputId: inputId ?? generatedId,\n configField,\n };\n\n Children.map(children, (child: ReactNode) => {\n if (isValidElement(child)) {\n switch (child.type) {\n case FormLabel: {\n initFormField.labelId = child.props.id ?? `${initFormField.inputId}-label`;\n break;\n }\n case HelperText: {\n initFormField.helperTextId = child.props.id ?? `${initFormField.inputId}-help-text`;\n break;\n }\n case ErrorText: {\n initFormField.errorTextId = child.props.id ?? `${initFormField.inputId}-error-text`;\n break;\n }\n case WarningText: {\n initFormField.warningTextId = child.props.id ?? `${initFormField.inputId}-warning-text`;\n break;\n }\n }\n }\n });\n\n const field = useFormField(initFormField);\n\n return (\n <FormControlContext.Provider value={field}>\n <Container\n ref={ref}\n $configField={field.configField}\n $hasRightActions={hasRightActions}\n $configFieldInputWidth={configFieldInputWidth}\n {...props}\n >\n {children}\n </Container>\n </FormControlContext.Provider>\n );\n});\n\nexport default FormControl;\n"],"mappings":";;;;;;;;;;;AA6BA,MAAM,YAAY,OAAO,KAAK;KACzB,EAAE,YAAY;AACf,SAAQ,OAAR;EACE;EACA,KAAK,KACH,QAAO,GAAG;YACN,WAAW,WAAW;;EAE5B,KAAK,KACH,QAAO,GAAG;YACN,WAAW,UAAU;;;EAG7B;;YAEQ,EAAE,YAAY,cAAc,OAAO,aAAa,MAAM,MAAM,KAAK,QAAQ,CAAC;;AAWtF,MAAM,oBAAoB,OAAO,IAAI;iBACpB,QAAQ,GAAG;;YAEhB,EAAE,YAAY,cAAc,OAAO,aAAa,MAAM,MAAM,SAAS,OAAO,QAAQ,CAAC;;AAGjG,MAAa,aAAa,EACxB,SACA,MACA,MACA,UACA,oBACA,UACA,GAAG,YACiB;CACpB,MAAM,QAAQ,aAAa;EAAE,SAAS,MAAM;EAAI;EAAU,CAAC;CAC3D,MAAM,YAAY,cAAc;CAChC,MAAM,aAAa;EACjB,IAAI,MAAM;EACV,SAAS,MAAM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B;GACxB,GAAI;GAEH;GACS,CAAA;EACgB,CAAA;EAEhC"}
@@ -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-DPYbLcBK.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-BQe3GRhi.mjs";
2
2
  export { Container, ErrorText, FormControl, FormControl as default, FormControlBaseProps, FormControlProps, FormInputContainer, FormLabel, FormLabelProps, HelperText, WarningText };
@@ -1,6 +1,6 @@
1
- import { c as ParagraphProps, o as LabelProps, u as SpanProps } from "./Text-CdHeSHCc.mjs";
2
- import * as _$styled_components0 from "styled-components";
1
+ import { c as ParagraphProps, o as LabelProps, u as SpanProps } from "./Text-CvaqognH.mjs";
3
2
  import * as _$react from "react";
3
+ import * as _$styled_components0 from "styled-components";
4
4
 
5
5
  //#region src/components/DataTable/FormControlLabel/FormControlLabel.d.ts
6
6
  declare const FormControlLabel: _$styled_components0.StyledComponent<_$react.FC<_$react.PropsWithChildren<SpanProps>>, any, ParagraphProps & LabelProps & {
@@ -1,4 +1,4 @@
1
- import { a as FormControlProps, l as HelperText, n as ErrorText, s as FormLabel, u as WarningText } from "./FormControl-DPYbLcBK.mjs";
1
+ import { a as FormControlProps, l as HelperText, n as ErrorText, s as FormLabel, u as WarningText } from "./FormControl-BQe3GRhi.mjs";
2
2
  import * as _$react from "react";
3
3
  import { ComponentPropsWithRef, ReactElement, ReactNode } from "react";
4
4
 
@@ -67,4 +67,4 @@ interface FormFieldProps extends Omit<FormControlProps, 'children'>, FormFieldBa
67
67
  declare const FormField: _$react.ForwardRefExoticComponent<FormFieldProps & _$react.RefAttributes<HTMLDivElement>>;
68
68
  //#endregion
69
69
  export { FormFieldBaseProps as n, FormFieldProps as r, FormField as t };
70
- //# sourceMappingURL=FormField-CYNGm2bJ.d.mts.map
70
+ //# sourceMappingURL=FormField-BW5uMzId.d.mts.map
@@ -1,21 +1,21 @@
1
1
  import { t as HStack } from "./Stack-Bzom2BTR.mjs";
2
- import { t as IconButton } from "./IconButton-kSjnfhWt.mjs";
2
+ import { t as IconButton } from "./IconButton-Bj1fry_K.mjs";
3
3
  import { n as useFormGroup } from "./useFormGroup-DSQkoWLh.mjs";
4
4
  import { t as FormControlContext } from "./useFormField-pOVkb5BK.mjs";
5
5
  import Input_default from "./components/Input/index.mjs";
6
- import { n as DropdownMenu_default } from "./DropdownMenu-jJSHQaih.mjs";
7
- import { t as Checkbox } from "./Checkbox-C3z7UUSC.mjs";
8
- import { t as Combobox } from "./Combobox-BkK_tosd.mjs";
9
- import { a as FormLabel, i as FormInputContainer, n as ErrorText, o as HelperText, r as FormControl, s as WarningText } from "./FormControl--pbTH3bY.mjs";
10
- import { n as Select } from "./Select-RdTT2KoH.mjs";
11
- import { t as ListBox } from "./ListBox-DahM1PgU.mjs";
12
- import { t as RadioGroup } from "./RadioGroup-Bf24GKOb.mjs";
13
- import { t as SegmentedControl } from "./SegmentedControl-BpR7sUWO.mjs";
6
+ import { n as DropdownMenu_default } from "./DropdownMenu-Ip75l4Th.mjs";
7
+ import { t as Checkbox } from "./Checkbox-BAh-wF_F.mjs";
8
+ import { t as Combobox } from "./Combobox-DmFQ5cAy.mjs";
9
+ import { n as Select } from "./Select-DbWEgH5c.mjs";
10
+ import { a as FormLabel, i as FormInputContainer, n as ErrorText, o as HelperText, r as FormControl, s as WarningText } from "./FormControl-BoKGiWdQ.mjs";
11
+ import { t as ListBox } from "./ListBox-BRgjgUSp.mjs";
12
+ import { t as RadioGroup } from "./RadioGroup-7hdcVhsp.mjs";
13
+ import { t as SegmentedControl } from "./SegmentedControl-BNOJ1FYQ.mjs";
14
14
  import { t as TextAreaWithStyle } from "./TextArea-CQ1YNi2b.mjs";
15
- import { t as Toggle } from "./Toggle-DjmkjJlw.mjs";
16
- import { t as TableBox } from "./TableBox-DS8mpN3-.mjs";
17
- import { Spacing } from "@persona/design-tokens";
15
+ import { t as Toggle } from "./Toggle-CzHoIR-n.mjs";
16
+ import { t as TableBox } from "./TableBox-RxpwflEb.mjs";
18
17
  import { Children, Fragment, cloneElement, createContext, forwardRef, useContext, useMemo, useRef, useState } from "react";
18
+ import { Spacing } from "@persona/design-tokens";
19
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-es";
@@ -483,4 +483,4 @@ TableBoxField.Cell = TableBox.Cell;
483
483
  //#endregion
484
484
  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 };
485
485
 
486
- //# sourceMappingURL=FormField-DMxjftFw.mjs.map
486
+ //# sourceMappingURL=FormField-BfVrDOY0.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"FormField-DMxjftFw.mjs","names":["Input","TextArea","DropdownMenu","DropdownMenu"],"sources":["../src/components/FormField/FormField.tsx","../src/components/FormField/inputFields.tsx","../src/components/FormField/CheckboxGroupField.tsx","../src/components/FormField/ListBoxField.tsx","../src/components/FormField/TableBoxField.tsx"],"sourcesContent":["import { type ComponentPropsWithRef, forwardRef, type ReactElement, type ReactNode } from 'react';\n\nimport { Spacing } from '@persona/design-tokens';\n\nimport useFormGroup from '#src/components/ConfigFormGroup/useFormGroup';\nimport FormControl, {\n ErrorText,\n type FormControlProps,\n FormInputContainer,\n FormLabel,\n HelperText,\n WarningText,\n} from '#src/components/FormControl';\nimport { HStack } from '#src/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 /** Marks the field as required. The label renders an asterisk; composed fields also forward `required` to their input. */\n required?: boolean;\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 * Helper component with preset slots for label, input, and helper texts.\n *\n * Prefer a composed field component, such as `<TextField>`, `<SelectField>`, or\n * `<CheckboxField>`, when one is available for the input type. Use `<FormField>` directly\n * when composing a custom control or layout.\n *\n * ## Usage\n *\n * ```tsx\n * import FormField from '@persona/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-es';\nimport { forwardRef, useMemo } from 'react';\n\nimport Checkbox, { type CheckboxProps } from '#src/components/Checkbox';\nimport Combobox from '#src/components/Combobox';\nimport type { ComboboxMultiSelectProps } from '#src/components/Combobox/ComboboxMultiSelect';\nimport type { ComboboxSingleSelectProps } from '#src/components/Combobox/ComboboxSingleSelect';\nimport FormField, { type FormFieldBaseProps } from '#src/components/FormField/FormField';\nimport Input, { type InputProps } from '#src/components/Input';\nimport RadioGroup, { type RadioGroupProps } from '#src/components/RadioGroup';\nimport SegmentedControl, { type SegmentedControlProps } from '#src/components/SegmentedControl';\nimport Select, { type SelectProps } from '#src/components/Select';\nimport TextArea, { type TextAreaProps } from '#src/components/TextArea';\nimport Toggle, { type ToggleProps } from '#src/components/Toggle';\n\nexport type ImplementsFormField = Omit<FormFieldBaseProps, 'children'>;\n\ntype ExtractFormFieldProps<T extends ImplementsFormField> = Pick<\n T,\n | 'label'\n | 'inputId'\n | 'required'\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<\n T,\n Exclude<keyof ExtractFormFieldProps<T>, 'required'>\n>;\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 required: props.required,\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 = ({ id, children, ...props }: SelectFieldProps) => {\n const { formFieldProps, inputProps } = splitOutFormFieldProps(props);\n const linkedId = useMemo(\n () => formFieldProps.inputId ?? id ?? uniqueId('pds-form-field-input-fields-select__'),\n [formFieldProps.inputId, id],\n );\n\n return (\n <FormField\n {...formFieldProps}\n inputId={linkedId}\n labelProps={{ htmlFor: linkedId, size: inputProps.size, ...formFieldProps.labelProps }}\n >\n <Select {...inputProps} 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 required,\n children,\n ...props\n}: RadioGroupFieldProps) => {\n return (\n <FormField\n label={label}\n helperText={helperText}\n warningText={warningText}\n errorText={errorText}\n required={required}\n >\n <RadioGroup {...props} aria-required={required}>\n {children}\n </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 required,\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 required={required}\n >\n <Checkbox label={checkboxLabel} required={required} {...props} />\n </FormField>\n );\n};\n\nexport interface ToggleFieldProps extends ImplementsFormField, ToggleProps {}\n\nexport const ToggleField = forwardRef<HTMLDivElement, ToggleFieldProps>(\n function ToggleField(props, ref) {\n const { formFieldProps, inputProps } = splitOutFormFieldProps(props);\n\n return (\n <FormField\n {...formFieldProps}\n labelProps={{ size: inputProps.size, ...formFieldProps.labelProps }}\n >\n <Toggle {...inputProps} ref={ref} />\n </FormField>\n );\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 {\n label,\n helperText,\n errorText,\n warningText,\n configField,\n required,\n children,\n labelProps,\n ...props\n },\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 required={required}\n >\n <SegmentedControl fullWidth {...props} aria-required={required} 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 props: ComboboxSingleSelectFieldProps | ComboboxMultiSelectFieldProps,\n) => {\n // `Combobox` registers its own id with the surrounding `FormControl`, which is what links the\n // label to it, so the field only forwards an explicit `inputId` when one is given. Each mode is\n // split separately: `multiple` discriminates the two, and a union split at once loses that.\n if (props.multiple) {\n const { formFieldProps, inputProps } = splitOutFormFieldProps(props);\n\n return (\n <FormField {...formFieldProps}>\n <Combobox {...inputProps} />\n </FormField>\n );\n }\n\n const { formFieldProps, inputProps } = splitOutFormFieldProps(props);\n\n return (\n <FormField {...formFieldProps}>\n <Combobox {...inputProps} />\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 '#src/components/Checkbox';\nimport type Checkbox from '#src/components/Checkbox';\nimport { FormControlContext } from '#src/components/FormControl/useFormField';\nimport FormField from '#src/components/FormField/FormField';\nimport type { ImplementsFormField } from '#src/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 required={required}\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';\n\nimport { IconButton } from '#src/components/Button';\nimport useFormGroup from '#src/components/ConfigFormGroup/useFormGroup';\nimport DropdownMenu from '#src/components/DropdownMenu';\nimport FormField from '#src/components/FormField/FormField';\nimport type { ImplementsFormField } from '#src/components/FormField/inputFields';\nimport ListBox, { type ListBoxProps } from '#src/components/ListBox';\nimport type { MenuItemProps } from '#src/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 /** Disables the add button, e.g. while the list is read-only. */\n addDisabled?: boolean;\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 required,\n onAdd,\n onDelete,\n deleteDisabled,\n configField: configFieldProp,\n size = 'md',\n actions = [],\n addDropdownConfig,\n addDisabled,\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' disabled={addDisabled}>\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 required={required}\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 required,\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 required={required}\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":";;;;;;;;;;;;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,eAAe,qBAAqB,KAAA;GACzC;GACD;GACV,GAAI;GAEH;GACQ,CAAA;EACD,CAAA;;AAKhB,cAAc,MAAM,SAAS;AAC7B,cAAc,OAAO,SAAS"}
1
+ {"version":3,"file":"FormField-BfVrDOY0.mjs","names":["Input","TextArea","DropdownMenu","DropdownMenu"],"sources":["../src/components/FormField/FormField.tsx","../src/components/FormField/inputFields.tsx","../src/components/FormField/CheckboxGroupField.tsx","../src/components/FormField/ListBoxField.tsx","../src/components/FormField/TableBoxField.tsx"],"sourcesContent":["import { type ComponentPropsWithRef, forwardRef, type ReactElement, type ReactNode } from 'react';\n\nimport { Spacing } from '@persona/design-tokens';\n\nimport useFormGroup from '#src/components/ConfigFormGroup/useFormGroup';\nimport FormControl, {\n ErrorText,\n type FormControlProps,\n FormInputContainer,\n FormLabel,\n HelperText,\n WarningText,\n} from '#src/components/FormControl';\nimport { HStack } from '#src/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 /** Marks the field as required. The label renders an asterisk; composed fields also forward `required` to their input. */\n required?: boolean;\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 * Helper component with preset slots for label, input, and helper texts.\n *\n * Prefer a composed field component, such as `<TextField>`, `<SelectField>`, or\n * `<CheckboxField>`, when one is available for the input type. Use `<FormField>` directly\n * when composing a custom control or layout.\n *\n * ## Usage\n *\n * ```tsx\n * import FormField from '@persona/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-es';\nimport { forwardRef, useMemo } from 'react';\n\nimport Checkbox, { type CheckboxProps } from '#src/components/Checkbox';\nimport Combobox from '#src/components/Combobox';\nimport type { ComboboxMultiSelectProps } from '#src/components/Combobox/ComboboxMultiSelect';\nimport type { ComboboxSingleSelectProps } from '#src/components/Combobox/ComboboxSingleSelect';\nimport FormField, { type FormFieldBaseProps } from '#src/components/FormField/FormField';\nimport Input, { type InputProps } from '#src/components/Input';\nimport RadioGroup, { type RadioGroupProps } from '#src/components/RadioGroup';\nimport SegmentedControl, { type SegmentedControlProps } from '#src/components/SegmentedControl';\nimport Select, { type SelectProps } from '#src/components/Select';\nimport TextArea, { type TextAreaProps } from '#src/components/TextArea';\nimport Toggle, { type ToggleProps } from '#src/components/Toggle';\n\nexport type ImplementsFormField = Omit<FormFieldBaseProps, 'children'>;\n\ntype ExtractFormFieldProps<T extends ImplementsFormField> = Pick<\n T,\n | 'label'\n | 'inputId'\n | 'required'\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<\n T,\n Exclude<keyof ExtractFormFieldProps<T>, 'required'>\n>;\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 required: props.required,\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 = ({ id, children, ...props }: SelectFieldProps) => {\n const { formFieldProps, inputProps } = splitOutFormFieldProps(props);\n const linkedId = useMemo(\n () => formFieldProps.inputId ?? id ?? uniqueId('pds-form-field-input-fields-select__'),\n [formFieldProps.inputId, id],\n );\n\n return (\n <FormField\n {...formFieldProps}\n inputId={linkedId}\n labelProps={{ htmlFor: linkedId, size: inputProps.size, ...formFieldProps.labelProps }}\n >\n <Select {...inputProps} 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 required,\n children,\n ...props\n}: RadioGroupFieldProps) => {\n return (\n <FormField\n label={label}\n helperText={helperText}\n warningText={warningText}\n errorText={errorText}\n required={required}\n >\n <RadioGroup {...props} aria-required={required}>\n {children}\n </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 required,\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 required={required}\n >\n <Checkbox label={checkboxLabel} required={required} {...props} />\n </FormField>\n );\n};\n\nexport interface ToggleFieldProps extends ImplementsFormField, ToggleProps {}\n\nexport const ToggleField = forwardRef<HTMLDivElement, ToggleFieldProps>(\n function ToggleField(props, ref) {\n const { formFieldProps, inputProps } = splitOutFormFieldProps(props);\n\n return (\n <FormField\n {...formFieldProps}\n labelProps={{ size: inputProps.size, ...formFieldProps.labelProps }}\n >\n <Toggle {...inputProps} ref={ref} />\n </FormField>\n );\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 {\n label,\n helperText,\n errorText,\n warningText,\n configField,\n required,\n children,\n labelProps,\n ...props\n },\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 required={required}\n >\n <SegmentedControl fullWidth {...props} aria-required={required} 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 props: ComboboxSingleSelectFieldProps | ComboboxMultiSelectFieldProps,\n) => {\n // `Combobox` registers its own id with the surrounding `FormControl`, which is what links the\n // label to it, so the field only forwards an explicit `inputId` when one is given. Each mode is\n // split separately: `multiple` discriminates the two, and a union split at once loses that.\n if (props.multiple) {\n const { formFieldProps, inputProps } = splitOutFormFieldProps(props);\n\n return (\n <FormField {...formFieldProps}>\n <Combobox {...inputProps} />\n </FormField>\n );\n }\n\n const { formFieldProps, inputProps } = splitOutFormFieldProps(props);\n\n return (\n <FormField {...formFieldProps}>\n <Combobox {...inputProps} />\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 '#src/components/Checkbox';\nimport type Checkbox from '#src/components/Checkbox';\nimport { FormControlContext } from '#src/components/FormControl/useFormField';\nimport FormField from '#src/components/FormField/FormField';\nimport type { ImplementsFormField } from '#src/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 required={required}\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';\n\nimport { IconButton } from '#src/components/Button';\nimport useFormGroup from '#src/components/ConfigFormGroup/useFormGroup';\nimport DropdownMenu from '#src/components/DropdownMenu';\nimport FormField from '#src/components/FormField/FormField';\nimport type { ImplementsFormField } from '#src/components/FormField/inputFields';\nimport ListBox, { type ListBoxProps } from '#src/components/ListBox';\nimport type { MenuItemProps } from '#src/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 /** Disables the add button, e.g. while the list is read-only. */\n addDisabled?: boolean;\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 required,\n onAdd,\n onDelete,\n deleteDisabled,\n configField: configFieldProp,\n size = 'md',\n actions = [],\n addDropdownConfig,\n addDisabled,\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' disabled={addDisabled}>\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 required={required}\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 required,\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 required={required}\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwFA,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;QA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BAACA,qBAAa,SAAd,EAAwB,CAAA,EAC1E,oBAACA,qBAAa,MAAd;MACE,GAAI;MACJ,UAAU,YAAY,MAAM;MAC5B,eAAe,MAAM,QAAQ,YAAY;MACzC,MAAK;gBAEJ,MAAM;MACW,CAAA,CACX,EAAA,EAVI,GAAG,MAAM,MAAM,GAAG,aAUtB;MAEb;IACW,CAAA;IAEf,SAAS,iBAAiB,CAAC,qBAAqB;GACjD,qBACC,oBAACA,sBAAD;IAAc,SAAS;IAAW,QAAA;cAC/B,kBAAkB,QAAQ,KAAK,WAC9B,oBAACA,qBAAa,MAAd;KAEE,GAAI;KACJ,eAAe,kBAAkB,YAAY,OAAO,MAAM;KAC1D,MAAK;eAEJ,OAAO;KACU,EANb,OAAO,MAMM,CACpB;IACW,CAAA;GAEhB,EAAA,CAAA;YAIP,oBAAC,UAAD;GACE,cAAY,GAAG,MAAM;GAER;GACb,oBAAoB,QAAQ;AAC1B,wBAAoB,IAAI;AACxB,mBAAe,IAAI;;GAEN;GACL;GACV,gBAAgB,eAAe,qBAAqB,KAAA;GACzC;GACD;GACV,GAAI;GAEH;GACQ,CAAA;EACD,CAAA;;AAKhB,cAAc,MAAM,SAAS;AAC7B,cAAc,OAAO,SAAS"}
@@ -1,2 +1,2 @@
1
- import { n as FormFieldBaseProps, r as FormFieldProps, t as FormField } from "./FormField-CYNGm2bJ.mjs";
1
+ import { n as FormFieldBaseProps, r as FormFieldProps, t as FormField } from "./FormField-BW5uMzId.mjs";
2
2
  export { FormField, FormField as default, FormFieldBaseProps, FormFieldProps };
@@ -1,6 +1,6 @@
1
1
  import { a as styled, r as css } from "./styledComponentsInterop-Cs5CCPRy.mjs";
2
- import { Spacing } from "@persona/design-tokens";
3
2
  import { createContext, useContext, useLayoutEffect, useRef, useState } from "react";
3
+ import { Spacing } from "@persona/design-tokens";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
  //#region src/components/Grid/Grid.tsx
6
6
  const GRID_BREAKPOINTS = {
@@ -89,4 +89,4 @@ const GridItem = ({ span, children, ...rest }) => /* @__PURE__ */ jsx(Item, {
89
89
  //#endregion
90
90
  export { useGridBreakpoint as i, GRID_BREAKPOINTS as n, Grid as r, GridItem as t };
91
91
 
92
- //# sourceMappingURL=Grid-DVC0SSEZ.mjs.map
92
+ //# sourceMappingURL=Grid-CYpOqTUu.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Grid-DVC0SSEZ.mjs","names":[],"sources":["../src/components/Grid/Grid.tsx","../src/components/Grid/GridItem.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n createContext,\n type ReactNode,\n type RefObject,\n useContext,\n useLayoutEffect,\n useRef,\n useState,\n} from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { Spacing } from '@persona/design-tokens';\n\nexport const GRID_BREAKPOINTS = { sm: 768, md: 1024, lg: 1408 } as const;\n\ntype Breakpoint = 'xs' | 'sm' | 'md' | 'lg';\n\nconst GridBreakpointContext = createContext<Breakpoint>('md');\n\n/** Breakpoint of the nearest `Grid`, measured from that grid's width. */\nexport const useGridBreakpoint = (): Breakpoint => useContext(GridBreakpointContext);\n\nconst getBreakpoint = (width: number): Breakpoint => {\n if (width >= GRID_BREAKPOINTS.lg) {\n return 'lg';\n }\n if (width >= GRID_BREAKPOINTS.md) {\n return 'md';\n }\n if (width >= GRID_BREAKPOINTS.sm) {\n return 'sm';\n }\n return 'xs';\n};\n\nconst useMeasuredGridBreakpoint = (ref: RefObject<HTMLDivElement>) => {\n const [breakpoint, setBreakpoint] = useState<Breakpoint>('md');\n useLayoutEffect(() => {\n const node = ref.current;\n if (!node) {\n return;\n }\n const update = () => setBreakpoint(getBreakpoint(node.offsetWidth));\n update();\n const observer = new ResizeObserver(update);\n observer.observe(node);\n return () => observer.disconnect();\n }, [ref]);\n return breakpoint;\n};\n\nconst Root = styled.div<{ $mode: GridProps['mode']; $breakpoint: Breakpoint }>`\n display: grid;\n width: 100%;\n grid-template-columns: repeat(12, minmax(0, 1fr));\n box-sizing: border-box;\n\n ${({ $breakpoint }) =>\n $breakpoint === 'xs' &&\n css`\n min-width: ${GRID_BREAKPOINTS.sm - 1}px;\n `}\n\n ${({ $breakpoint }) =>\n $breakpoint === 'xs' || $breakpoint === 'sm'\n ? css`\n gap: ${Spacing[3]};\n padding-inline: ${Spacing[5]};\n `\n : css`\n gap: ${Spacing[4]};\n padding-inline: ${Spacing[6]};\n `}\n\n // max-width equals the lg threshold; offsetWidth reads the clamped border-box width and getBreakpoint uses >=, so the clamp stays 'lg'\n ${({ $mode, $breakpoint }) =>\n $mode === 'fixed' &&\n $breakpoint === 'lg' &&\n css`\n max-width: ${GRID_BREAKPOINTS.lg}px;\n margin-inline: auto;\n `}\n`;\n\nexport interface GridProps extends ComponentPropsWithoutRef<'div'> {\n /**\n * Selects the grid width behavior at the large breakpoint. `fixed` centers the grid at a\n * maximum width of 1408px, while `fluid` fills the available width.\n *\n * Breakpoints:\n * - ≤767px: 12 columns, 24px margins, 12px gutters, and a 767px minimum width.\n * - 768–1023px: 12 columns, 24px margins, 12px gutters, and 100% width.\n * - 1024–1407px: 12 columns, 32px margins, 16px gutters, and 100% width.\n * - ≥1408px: 12 columns, 32px margins, 16px gutters, and either fixed or fluid width.\n */\n mode: 'fixed' | 'fluid';\n children: ReactNode;\n}\n\n/**\n * Provides a 12-column CSS grid that measures its own width with a ResizeObserver for responsive\n * horizontal margins and gutters. Vertical spacing is left to the consumer.\n *\n * The grid measures breakpoints against its own width rather than the viewport. Use `fixed` to\n * center the grid at its large-screen maximum width, or `fluid` to keep it at 100% width.\n */\nexport const Grid = ({ mode, children, ...rest }: GridProps) => {\n const ref = useRef<HTMLDivElement>(null);\n const breakpoint = useMeasuredGridBreakpoint(ref);\n return (\n <GridBreakpointContext.Provider value={breakpoint}>\n <Root ref={ref} $mode={mode} $breakpoint={breakpoint} {...rest}>\n {children}\n </Root>\n </GridBreakpointContext.Provider>\n );\n};\n\nexport default Grid;\n","import type { ComponentPropsWithoutRef, ReactNode } from 'react';\nimport styled from 'styled-components';\n\nexport type GridSpan = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n\nexport interface GridItemProps extends ComponentPropsWithoutRef<'div'> {\n span: GridSpan;\n children: ReactNode;\n}\n\nconst Item = styled.div<{ $span: GridSpan }>`\n grid-column: span ${({ $span }) => $span};\n min-width: 0;\n`;\n\nexport const GridItem = ({ span, children, ...rest }: GridItemProps) => (\n <Item $span={span} {...rest}>\n {children}\n </Item>\n);\n\nexport default GridItem;\n"],"mappings":";;;;;AAcA,MAAa,mBAAmB;CAAE,IAAI;CAAK,IAAI;CAAM,IAAI;CAAM;AAI/D,MAAM,wBAAwB,cAA0B,KAAK;;AAG7D,MAAa,0BAAsC,WAAW,sBAAsB;AAEpF,MAAM,iBAAiB,UAA8B;AACnD,KAAI,SAAS,iBAAiB,GAC5B,QAAO;AAET,KAAI,SAAS,iBAAiB,GAC5B,QAAO;AAET,KAAI,SAAS,iBAAiB,GAC5B,QAAO;AAET,QAAO;;AAGT,MAAM,6BAA6B,QAAmC;CACpE,MAAM,CAAC,YAAY,iBAAiB,SAAqB,KAAK;AAC9D,uBAAsB;EACpB,MAAM,OAAO,IAAI;AACjB,MAAI,CAAC,KACH;EAEF,MAAM,eAAe,cAAc,cAAc,KAAK,YAAY,CAAC;AACnE,UAAQ;EACR,MAAM,WAAW,IAAI,eAAe,OAAO;AAC3C,WAAS,QAAQ,KAAK;AACtB,eAAa,SAAS,YAAY;IACjC,CAAC,IAAI,CAAC;AACT,QAAO;;AAGT,MAAM,OAAO,OAAO,GAA0D;;;;;;KAMzE,EAAE,kBACH,gBAAgB,QAChB,GAAG;mBACY,iBAAiB,KAAK,EAAE;MACrC;;KAED,EAAE,kBACH,gBAAgB,QAAQ,gBAAgB,OACpC,GAAG;iBACM,QAAQ,GAAG;4BACA,QAAQ,GAAG;YAE/B,GAAG;iBACM,QAAQ,GAAG;4BACA,QAAQ,GAAG;UAC7B;;;KAGL,EAAE,OAAO,kBACV,UAAU,WACV,gBAAgB,QAChB,GAAG;mBACY,iBAAiB,GAAG;;MAEjC;;;;;;;;;AAyBN,MAAa,QAAQ,EAAE,MAAM,UAAU,GAAG,WAAsB;CAC9D,MAAM,MAAM,OAAuB,KAAK;CACxC,MAAM,aAAa,0BAA0B,IAAI;AACjD,QACE,oBAAC,sBAAsB,UAAvB;EAAgC,OAAO;YACrC,oBAAC,MAAD;GAAW;GAAK,OAAO;GAAM,aAAa;GAAY,GAAI;GACvD;GACI,CAAA;EACwB,CAAA;;;;ACzGrC,MAAM,OAAO,OAAO,GAAwB;uBACrB,EAAE,YAAY,MAAM;;;AAI3C,MAAa,YAAY,EAAE,MAAM,UAAU,GAAG,WAC5C,oBAAC,MAAD;CAAM,OAAO;CAAM,GAAI;CACpB;CACI,CAAA"}
1
+ {"version":3,"file":"Grid-CYpOqTUu.mjs","names":[],"sources":["../src/components/Grid/Grid.tsx","../src/components/Grid/GridItem.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n createContext,\n type ReactNode,\n type RefObject,\n useContext,\n useLayoutEffect,\n useRef,\n useState,\n} from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { Spacing } from '@persona/design-tokens';\n\nexport const GRID_BREAKPOINTS = { sm: 768, md: 1024, lg: 1408 } as const;\n\ntype Breakpoint = 'xs' | 'sm' | 'md' | 'lg';\n\nconst GridBreakpointContext = createContext<Breakpoint>('md');\n\n/** Breakpoint of the nearest `Grid`, measured from that grid's width. */\nexport const useGridBreakpoint = (): Breakpoint => useContext(GridBreakpointContext);\n\nconst getBreakpoint = (width: number): Breakpoint => {\n if (width >= GRID_BREAKPOINTS.lg) {\n return 'lg';\n }\n if (width >= GRID_BREAKPOINTS.md) {\n return 'md';\n }\n if (width >= GRID_BREAKPOINTS.sm) {\n return 'sm';\n }\n return 'xs';\n};\n\nconst useMeasuredGridBreakpoint = (ref: RefObject<HTMLDivElement>) => {\n const [breakpoint, setBreakpoint] = useState<Breakpoint>('md');\n useLayoutEffect(() => {\n const node = ref.current;\n if (!node) {\n return;\n }\n const update = () => setBreakpoint(getBreakpoint(node.offsetWidth));\n update();\n const observer = new ResizeObserver(update);\n observer.observe(node);\n return () => observer.disconnect();\n }, [ref]);\n return breakpoint;\n};\n\nconst Root = styled.div<{ $mode: GridProps['mode']; $breakpoint: Breakpoint }>`\n display: grid;\n width: 100%;\n grid-template-columns: repeat(12, minmax(0, 1fr));\n box-sizing: border-box;\n\n ${({ $breakpoint }) =>\n $breakpoint === 'xs' &&\n css`\n min-width: ${GRID_BREAKPOINTS.sm - 1}px;\n `}\n\n ${({ $breakpoint }) =>\n $breakpoint === 'xs' || $breakpoint === 'sm'\n ? css`\n gap: ${Spacing[3]};\n padding-inline: ${Spacing[5]};\n `\n : css`\n gap: ${Spacing[4]};\n padding-inline: ${Spacing[6]};\n `}\n\n // max-width equals the lg threshold; offsetWidth reads the clamped border-box width and getBreakpoint uses >=, so the clamp stays 'lg'\n ${({ $mode, $breakpoint }) =>\n $mode === 'fixed' &&\n $breakpoint === 'lg' &&\n css`\n max-width: ${GRID_BREAKPOINTS.lg}px;\n margin-inline: auto;\n `}\n`;\n\nexport interface GridProps extends ComponentPropsWithoutRef<'div'> {\n /**\n * Selects the grid width behavior at the large breakpoint. `fixed` centers the grid at a\n * maximum width of 1408px, while `fluid` fills the available width.\n *\n * Breakpoints:\n * - ≤767px: 12 columns, 24px margins, 12px gutters, and a 767px minimum width.\n * - 768–1023px: 12 columns, 24px margins, 12px gutters, and 100% width.\n * - 1024–1407px: 12 columns, 32px margins, 16px gutters, and 100% width.\n * - ≥1408px: 12 columns, 32px margins, 16px gutters, and either fixed or fluid width.\n */\n mode: 'fixed' | 'fluid';\n children: ReactNode;\n}\n\n/**\n * Provides a 12-column CSS grid that measures its own width with a ResizeObserver for responsive\n * horizontal margins and gutters. Vertical spacing is left to the consumer.\n *\n * The grid measures breakpoints against its own width rather than the viewport. Use `fixed` to\n * center the grid at its large-screen maximum width, or `fluid` to keep it at 100% width.\n */\nexport const Grid = ({ mode, children, ...rest }: GridProps) => {\n const ref = useRef<HTMLDivElement>(null);\n const breakpoint = useMeasuredGridBreakpoint(ref);\n return (\n <GridBreakpointContext.Provider value={breakpoint}>\n <Root ref={ref} $mode={mode} $breakpoint={breakpoint} {...rest}>\n {children}\n </Root>\n </GridBreakpointContext.Provider>\n );\n};\n\nexport default Grid;\n","import type { ComponentPropsWithoutRef, ReactNode } from 'react';\nimport styled from 'styled-components';\n\nexport type GridSpan = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n\nexport interface GridItemProps extends ComponentPropsWithoutRef<'div'> {\n span: GridSpan;\n children: ReactNode;\n}\n\nconst Item = styled.div<{ $span: GridSpan }>`\n grid-column: span ${({ $span }) => $span};\n min-width: 0;\n`;\n\nexport const GridItem = ({ span, children, ...rest }: GridItemProps) => (\n <Item $span={span} {...rest}>\n {children}\n </Item>\n);\n\nexport default GridItem;\n"],"mappings":";;;;;AAcA,MAAa,mBAAmB;CAAE,IAAI;CAAK,IAAI;CAAM,IAAI;CAAM;AAI/D,MAAM,wBAAwB,cAA0B,KAAK;;AAG7D,MAAa,0BAAsC,WAAW,sBAAsB;AAEpF,MAAM,iBAAiB,UAA8B;AACnD,KAAI,SAAS,iBAAiB,GAC5B,QAAO;AAET,KAAI,SAAS,iBAAiB,GAC5B,QAAO;AAET,KAAI,SAAS,iBAAiB,GAC5B,QAAO;AAET,QAAO;;AAGT,MAAM,6BAA6B,QAAmC;CACpE,MAAM,CAAC,YAAY,iBAAiB,SAAqB,KAAK;AAC9D,uBAAsB;EACpB,MAAM,OAAO,IAAI;AACjB,MAAI,CAAC,KACH;EAEF,MAAM,eAAe,cAAc,cAAc,KAAK,YAAY,CAAC;AACnE,UAAQ;EACR,MAAM,WAAW,IAAI,eAAe,OAAO;AAC3C,WAAS,QAAQ,KAAK;AACtB,eAAa,SAAS,YAAY;IACjC,CAAC,IAAI,CAAC;AACT,QAAO;;AAGT,MAAM,OAAO,OAAO,GAA0D;;;;;;KAMzE,EAAE,kBACH,gBAAgB,QAChB,GAAG;mBACY,iBAAiB,KAAK,EAAE;MACrC;;KAED,EAAE,kBACH,gBAAgB,QAAQ,gBAAgB,OACpC,GAAG;iBACM,QAAQ,GAAG;4BACA,QAAQ,GAAG;YAE/B,GAAG;iBACM,QAAQ,GAAG;4BACA,QAAQ,GAAG;UAC7B;;;KAGL,EAAE,OAAO,kBACV,UAAU,WACV,gBAAgB,QAChB,GAAG;mBACY,iBAAiB,GAAG;;MAEjC;;;;;;;;;AAyBN,MAAa,QAAQ,EAAE,MAAM,UAAU,GAAG,WAAsB;CAC9D,MAAM,MAAM,OAAuB,KAAK;CACxC,MAAM,aAAa,0BAA0B,IAAI;AACjD,QACE,oBAAC,sBAAsB,UAAvB;EAAgC,OAAO;YACrC,oBAAC,MAAD;GAAW;GAAK,OAAO;GAAM,aAAa;GAAY,GAAI;GACvD;GACI,CAAA;EACwB,CAAA;;;;ACzGrC,MAAM,OAAO,OAAO,GAAwB;uBACrB,EAAE,YAAY,MAAM;;;AAI3C,MAAa,YAAY,EAAE,MAAM,UAAU,GAAG,WAC5C,oBAAC,MAAD;CAAM,OAAO;CAAM,GAAI;CACpB;CACI,CAAA"}
@@ -1,5 +1,5 @@
1
- import * as _$styled_components0 from "styled-components";
2
1
  import { ComponentPropsWithoutRef, ReactNode } from "react";
2
+ import * as _$styled_components0 from "styled-components";
3
3
  import * as _$react_jsx_runtime0 from "react/jsx-runtime";
4
4
 
5
5
  //#region src/components/Card/Header/Header.d.ts
@@ -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-DaaUprCL.d.mts.map
35
+ //# sourceMappingURL=Header-CV0Lcf0C.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-DaaUprCL.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-CV0Lcf0C.mjs";
2
2
  export { ActionsContainer, HeaderContainer, HeaderProps, Root, Title, TitleContainer, Header as default };
@@ -1,4 +1,4 @@
1
- import { i as TooltipWithIconProps } from "./Tooltip-OxVvOfn8.mjs";
1
+ import { i as TooltipWithIconProps } from "./Tooltip-Ddy2Jq0K.mjs";
2
2
  import { ReactNode } from "react";
3
3
  import * as _$react_jsx_runtime0 from "react/jsx-runtime";
4
4
 
@@ -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-C5BDdJSI.d.mts.map
20
+ //# sourceMappingURL=HelperTooltip-BNM3pTM-.d.mts.map
@@ -1,2 +1,2 @@
1
- import { n as HelperTooltipProps, t as HelperTooltip } from "./HelperTooltip-C5BDdJSI.mjs";
1
+ import { n as HelperTooltipProps, t as HelperTooltip } from "./HelperTooltip-BNM3pTM-.mjs";
2
2
  export { HelperTooltipProps, HelperTooltip as default };
@@ -1,9 +1,9 @@
1
1
  import { t as ASTNode } from "./types-DeVO4sCM.mjs";
2
2
  import { a as Mode, l as TextStyle, u as ValueType } from "./types-02Ij0dgs.mjs";
3
3
  import { SchemaValidator } from "./validation2.mjs";
4
- import * as _$styled_components0 from "styled-components";
5
4
  import * as _$react from "react";
6
5
  import { FC, ReactNode } from "react";
6
+ import * as _$styled_components0 from "styled-components";
7
7
 
8
8
  //#region src/components/SmartTextInput/HighlightedText.d.ts
9
9
  type OverlayContainerProps = {
@@ -1,11 +1,11 @@
1
1
  import { a as styled } from "./styledComponentsInterop-Cs5CCPRy.mjs";
2
- import "./variables/transitions.mjs";
3
- import { fadeIn } from "./variables/keyframes.mjs";
4
2
  import { t as Card_default } from "./Card-DuQHyroh.mjs";
5
3
  import { i as Paragraph } from "./Text-D0vEReED.mjs";
6
4
  import { t as useToggle } from "./useToggle-1z8JE7Ym.mjs";
7
- import { n as Button } from "./IconButton-kSjnfhWt.mjs";
8
- import { s as Popover_default } from "./Popover-DuFjaSoq.mjs";
5
+ import { fadeIn } from "./variables/keyframes.mjs";
6
+ import "./variables/transitions.mjs";
7
+ import { n as Button } from "./IconButton-Bj1fry_K.mjs";
8
+ import { s as Popover_default } from "./Popover-DP9DXReH.mjs";
9
9
  import { Spacing } from "@persona/design-tokens";
10
10
  import { jsx, jsxs } from "react/jsx-runtime";
11
11
  import { CopyIcon } from "@persona/icons";
@@ -116,4 +116,4 @@ const HoverCopyableField = ({ copyValue, confirmationText = "Copied", onCopySucc
116
116
  //#endregion
117
117
  export { HoverCopyableField as t };
118
118
 
119
- //# sourceMappingURL=HoverCopyableField-B2-xlwUt.mjs.map
119
+ //# sourceMappingURL=HoverCopyableField-CJ_p3llp.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"HoverCopyableField-B2-xlwUt.mjs","names":["Card","Popover"],"sources":["../src/components/HoverCopyableField/HoverCopyableField.tsx"],"sourcesContent":["import type { MouseEvent, ReactNode } from 'react';\nimport styled from 'styled-components';\n\nimport { Spacing } from '@persona/design-tokens';\nimport { CopyIcon } from '@persona/icons';\n\nimport Button from '#src/components/Button';\nimport Card from '#src/components/Card';\nimport Popover from '#src/components/Popover';\nimport { Paragraph } from '#src/components/Text';\nimport useToggle from '#src/lib/useToggle';\nimport { fadeIn } from '#src/variables/keyframes';\nimport { TransitionDuration, TransitionEasing } from '#src/variables/transitions';\n\nexport type CopySuccessDetail = {\n text: string;\n clientX: number;\n clientY: number;\n};\n\nexport type HoverCopyableFieldProps = {\n copyValue: string | undefined;\n confirmationText?: string;\n /**\n * Called after a successful clipboard write. When provided, the Copied\n * popover is skipped so the host can own post-copy UX.\n */\n onCopySuccess?: (detail: CopySuccessDetail) => void;\n children: ReactNode;\n};\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 clickOrigin = (e: MouseEvent<HTMLButtonElement>): { clientX: number; clientY: number } => {\n const rect = e.currentTarget.getBoundingClientRect();\n const hasPointer = e.clientX !== 0 || e.clientY !== 0;\n return {\n clientX: hasPointer ? e.clientX : rect.left + rect.width / 2,\n clientY: rect.top,\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 opacity: ${({ isActive }) => (isActive ? 1 : 0)};\n visibility: ${({ isActive }) => (isActive ? 'visible' : 'hidden')};\n transition: ${({ isActive }) =>\n [\n ...['background-color', 'color', 'border-color'].map(\n (property) => `${property} ${TransitionDuration.Fast} ${TransitionEasing.Move}`,\n ),\n isActive\n ? `opacity ${TransitionDuration.Fast} ${TransitionEasing.Enter}, visibility 0s`\n : `opacity ${TransitionDuration.Faster} ${TransitionEasing.Exit}, visibility 0s linear ${TransitionDuration.Faster}`,\n ].join(', ')};\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.Fast} ${TransitionEasing.Enter};\n padding: 6px;\n margin: 0;\n`;\n\nconst HoverCopyableField = ({\n copyValue,\n confirmationText = 'Copied',\n onCopySuccess,\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 (origin: { clientX: number; clientY: number }) => {\n if (copyValue == null) {\n return;\n }\n const copyWasSuccessful = await copyToClipboard(copyValue);\n if (!copyWasSuccessful) {\n return;\n }\n if (onCopySuccess) {\n onCopySuccess({ text: copyValue, ...origin });\n hideCopyButton();\n return;\n }\n showConfirmation();\n setTimeout(() => {\n hideCopyButton();\n hideConfirmation();\n }, 1200);\n };\n\n const copyField = (e: MouseEvent<HTMLButtonElement>) => {\n e.preventDefault();\n e.stopPropagation();\n void copyTextToClipboard(clickOrigin(e));\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"],"mappings":";;;;;;;;;;;;AA+BA,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,eAAe,MAA2E;CAC9F,MAAM,OAAO,EAAE,cAAc,uBAAuB;AAEpD,QAAO;EACL,SAFiB,EAAE,YAAY,KAAK,EAAE,YAAY,IAE5B,EAAE,UAAU,KAAK,OAAO,KAAK,QAAQ;EAC3D,SAAS,KAAK;EACf;;AAGH,MAA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;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"}
1
+ {"version":3,"file":"HoverCopyableField-CJ_p3llp.mjs","names":["Card","Popover"],"sources":["../src/components/HoverCopyableField/HoverCopyableField.tsx"],"sourcesContent":["import type { MouseEvent, ReactNode } from 'react';\nimport styled from 'styled-components';\n\nimport { Spacing } from '@persona/design-tokens';\nimport { CopyIcon } from '@persona/icons';\n\nimport Button from '#src/components/Button';\nimport Card from '#src/components/Card';\nimport Popover from '#src/components/Popover';\nimport { Paragraph } from '#src/components/Text';\nimport useToggle from '#src/lib/useToggle';\nimport { fadeIn } from '#src/variables/keyframes';\nimport { TransitionDuration, TransitionEasing } from '#src/variables/transitions';\n\nexport type CopySuccessDetail = {\n text: string;\n clientX: number;\n clientY: number;\n};\n\nexport type HoverCopyableFieldProps = {\n copyValue: string | undefined;\n confirmationText?: string;\n /**\n * Called after a successful clipboard write. When provided, the Copied\n * popover is skipped so the host can own post-copy UX.\n */\n onCopySuccess?: (detail: CopySuccessDetail) => void;\n children: ReactNode;\n};\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 clickOrigin = (e: MouseEvent<HTMLButtonElement>): { clientX: number; clientY: number } => {\n const rect = e.currentTarget.getBoundingClientRect();\n const hasPointer = e.clientX !== 0 || e.clientY !== 0;\n return {\n clientX: hasPointer ? e.clientX : rect.left + rect.width / 2,\n clientY: rect.top,\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 opacity: ${({ isActive }) => (isActive ? 1 : 0)};\n visibility: ${({ isActive }) => (isActive ? 'visible' : 'hidden')};\n transition: ${({ isActive }) =>\n [\n ...['background-color', 'color', 'border-color'].map(\n (property) => `${property} ${TransitionDuration.Fast} ${TransitionEasing.Move}`,\n ),\n isActive\n ? `opacity ${TransitionDuration.Fast} ${TransitionEasing.Enter}, visibility 0s`\n : `opacity ${TransitionDuration.Faster} ${TransitionEasing.Exit}, visibility 0s linear ${TransitionDuration.Faster}`,\n ].join(', ')};\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.Fast} ${TransitionEasing.Enter};\n padding: 6px;\n margin: 0;\n`;\n\nconst HoverCopyableField = ({\n copyValue,\n confirmationText = 'Copied',\n onCopySuccess,\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 (origin: { clientX: number; clientY: number }) => {\n if (copyValue == null) {\n return;\n }\n const copyWasSuccessful = await copyToClipboard(copyValue);\n if (!copyWasSuccessful) {\n return;\n }\n if (onCopySuccess) {\n onCopySuccess({ text: copyValue, ...origin });\n hideCopyButton();\n return;\n }\n showConfirmation();\n setTimeout(() => {\n hideCopyButton();\n hideConfirmation();\n }, 1200);\n };\n\n const copyField = (e: MouseEvent<HTMLButtonElement>) => {\n e.preventDefault();\n e.stopPropagation();\n void copyTextToClipboard(clickOrigin(e));\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"],"mappings":";;;;;;;;;;;;AA+BA,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,eAAe,MAA2E;CAC9F,MAAM,OAAO,EAAE,cAAc,uBAAuB;AAEpD,QAAO;EACL,SAFiB,EAAE,YAAY,KAAK,EAAE,YAAY,IAE5B,EAAE,UAAU,KAAK,OAAO,KAAK,QAAQ;EAC3D,SAAS,KAAK;EACf;;AAGH,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;cACR,EAAE,eAAgB,WAAW,IAAI,EAAG;iBACjC,EAAE,eAAgB,WAAW,YAAY,SAAU;iBACnD,EAAE,eACf,CACE,GAAG;CAAC;CAAoB;CAAS;CAAe,CAAC,KAC9C,aAAa,GAAG,SAAS,qCAC3B,EACD,WACI,4DACA,uEACL,CAAC,KAAK,KAAK,CAAC;;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ComponentsInterop-Cs5CCPRy.mjs";
2
- import { isDisabled, isHovered, isNotDisabled } from "./lib/pseudoClass.mjs";
3
2
  import { semanticColor, semanticOnly, semanticTokens } from "./lib/semanticColor.mjs";
4
- import { focusOutlineControlled } from "./mixins/focus.mjs";
3
+ import { n as RouterLink } from "./router-BxmA940v.mjs";
4
+ import { paragraphMixins } from "./mixins/text.mjs";
5
+ import { t as useToggle } from "./useToggle-1z8JE7Ym.mjs";
6
+ import { rotate } from "./variables/keyframes.mjs";
5
7
  import "./variables/transitions.mjs";
6
8
  import { opacityOf, transparent, withAlpha } from "./lib/color.mjs";
9
+ import { isDisabled, isHovered, isNotDisabled } from "./lib/pseudoClass.mjs";
10
+ import { focusOutlineControlled } from "./mixins/focus.mjs";
7
11
  import { printMixins } from "./mixins/print/index.mjs";
8
- import { rotate } from "./variables/keyframes.mjs";
9
- import { paragraphMixins } from "./mixins/text.mjs";
10
- import { n as RouterLink } from "./router-BxmA940v.mjs";
11
- import { t as useToggle } from "./useToggle-1z8JE7Ym.mjs";
12
- import { BorderRadius, Color, Spacing } from "@persona/design-tokens";
13
12
  import { forwardRef, useCallback } from "react";
13
+ import { BorderRadius, Color, Spacing } from "@persona/design-tokens";
14
14
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
15
15
  import { LoaderIcon } from "@persona/icons";
16
16
  import { isEmpty, isFunction } from "lodash-es";
@@ -448,4 +448,4 @@ const IconButton = forwardRef(function IconButton({ size = "xs", ...props }, ref
448
448
  //#endregion
449
449
  export { SuffixIconContainer as a, StyledButton as i, Button as n, buttonPalette as o, ButtonChildren as r, IconButton as t };
450
450
 
451
- //# sourceMappingURL=IconButton-kSjnfhWt.mjs.map
451
+ //# sourceMappingURL=IconButton-Bj1fry_K.mjs.map