@persona/design-system 0.3.1 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (404) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/README.md +1 -1
  3. package/dist/{Action-DL3kHI9Z.d.mts → Action-CcAyQpYN.d.mts} +3 -3
  4. package/dist/Action.d.mts +1 -1
  5. package/dist/AdvancedFilterRuleRow.d.mts +4 -4
  6. package/dist/AdvancedFilterRulesPopover.d.mts +3 -3
  7. package/dist/ArrayValueControl.d.mts +1 -1
  8. package/dist/Attribute.d.mts +3 -3
  9. package/dist/BooleanValueControl.d.mts +1 -1
  10. package/dist/BottomPanel.d.mts +32 -0
  11. package/dist/{Breadcrumb-Czgdi0xf.d.mts → Breadcrumb-Df06cTnA.d.mts} +1 -1
  12. package/dist/Breadcrumb.d.mts +1 -1
  13. package/dist/{Breadcrumbs-zei-cpdU.d.mts → Breadcrumbs-D_Gzd4_J.d.mts} +2 -2
  14. package/dist/{Breadcrumbs-ed4wRDS7.mjs → Breadcrumbs-Zi5p0HDR.mjs} +3 -3
  15. package/dist/{Breadcrumbs-ed4wRDS7.mjs.map → Breadcrumbs-Zi5p0HDR.mjs.map} +1 -1
  16. package/dist/Breadcrumbs.d.mts +1 -1
  17. package/dist/{Button-CKzNTpPL.d.mts → Button-BrI1s2-r.d.mts} +2 -2
  18. package/dist/Button.d.mts +1 -1
  19. package/dist/{Calendar-CcxN7y3e.d.mts → Calendar-DjnoZVcT.d.mts} +1 -1
  20. package/dist/Calendar.d.mts +1 -1
  21. package/dist/CalendarBase.d.mts +1 -1
  22. package/dist/{Card-pr4FQWjn.d.mts → Card-mZDNFaJy.d.mts} +3 -3
  23. package/dist/Card.d.mts +1 -1
  24. package/dist/{CardV2-D3m5EKlp.mjs → CardV2-CXxzl1EZ.mjs} +6 -6
  25. package/dist/{CardV2-D3m5EKlp.mjs.map → CardV2-CXxzl1EZ.mjs.map} +1 -1
  26. package/dist/{Checkbox-Bmm-r5ei.d.mts → Checkbox-CwPXPLCi.d.mts} +1 -1
  27. package/dist/{Checkbox-Ccuicmlo.mjs → Checkbox-DxNHp59y.mjs} +1 -1
  28. package/dist/{Checkbox-Ccuicmlo.mjs.map → Checkbox-DxNHp59y.mjs.map} +1 -1
  29. package/dist/Checkbox.d.mts +1 -1
  30. package/dist/CheckboxGroupField.d.mts +1 -1
  31. package/dist/ChoicesValueControl.d.mts +1 -1
  32. package/dist/{Combobox-BGRyr_-L.mjs → Combobox-BUtqtzKl.mjs} +5 -5
  33. package/dist/{Combobox-BGRyr_-L.mjs.map → Combobox-BUtqtzKl.mjs.map} +1 -1
  34. package/dist/{Combobox-Bf_Xe1BG.d.mts → Combobox-C9QBItsc.d.mts} +3 -3
  35. package/dist/Combobox.d.mts +2 -2
  36. package/dist/{ComboboxBase-CWzN8GML.d.mts → ComboboxBase-BkSpdmsT.d.mts} +6 -6
  37. package/dist/ComboboxBase.d.mts +1 -1
  38. package/dist/{ComboboxMultiSelect-iSuvyOx2.d.mts → ComboboxMultiSelect-DkVfwSKH.d.mts} +2 -2
  39. package/dist/ComboboxMultiSelect.d.mts +1 -1
  40. package/dist/{ComboboxSingleSelect-DVRFKPi1.d.mts → ComboboxSingleSelect-CpumBcDn.d.mts} +4 -4
  41. package/dist/ComboboxSingleSelect.d.mts +1 -1
  42. package/dist/{CompactBar-C_61pgp7.d.mts → CompactBar-COxu_FDd.d.mts} +3 -3
  43. package/dist/CompactBar.d.mts +1 -1
  44. package/dist/{ConfigFormGroup-DGCTW3by.mjs → ConfigFormGroup-aSdn2r6Z.mjs} +1 -1
  45. package/dist/{ConfigFormGroup-DGCTW3by.mjs.map → ConfigFormGroup-aSdn2r6Z.mjs.map} +1 -1
  46. package/dist/{ControlBar-0XwbM4yC.d.mts → ControlBar-DwAhPcb5.d.mts} +12 -2
  47. package/dist/ControlBar.d.mts +1 -1
  48. package/dist/DataTable.d.mts +4 -3
  49. package/dist/{DateField-CKeSIhGy.d.mts → DateField-tOyrGcx1.d.mts} +2 -2
  50. package/dist/DateField.d.mts +1 -1
  51. package/dist/{DatePicker-B1iWrqR5.d.mts → DatePicker-Bs9JODNg.d.mts} +2 -2
  52. package/dist/{DatePicker-BNnZ6L1y.mjs → DatePicker-CLP-ajza.mjs} +71 -16
  53. package/dist/DatePicker-CLP-ajza.mjs.map +1 -0
  54. package/dist/DatePicker.d.mts +1 -1
  55. package/dist/{DateRangePicker-BmF9eH9R.d.mts → DateRangePicker-BT6-j8V7.d.mts} +24 -4
  56. package/dist/DateRangePicker.d.mts +2 -2
  57. package/dist/DateRangeValueControl.d.mts +8 -4
  58. package/dist/DateValueControl.d.mts +1 -1
  59. package/dist/{DropdownButton-BlVeFbJ0.mjs → DropdownButton-CCAfNZ9h.mjs} +2 -2
  60. package/dist/{DropdownButton-BlVeFbJ0.mjs.map → DropdownButton-CCAfNZ9h.mjs.map} +1 -1
  61. package/dist/DropdownButton.d.mts +2 -2
  62. package/dist/{DropdownMenu-DuTnq9j7.d.mts → DropdownMenu-BoatixlO.d.mts} +2 -2
  63. package/dist/{DropdownMenu-82xH1AZr.mjs → DropdownMenu-CUnf420M.mjs} +2 -2
  64. package/dist/{DropdownMenu-82xH1AZr.mjs.map → DropdownMenu-CUnf420M.mjs.map} +1 -1
  65. package/dist/DropdownMenu.d.mts +1 -1
  66. package/dist/{ErrorProps-DX50vo-U.d.mts → ErrorProps-C9T857Wk.d.mts} +1 -1
  67. package/dist/ErrorProps.d.mts +1 -1
  68. package/dist/{FieldRegistry-D1vghSC_.d.mts → FieldRegistry-D6niLExM.d.mts} +2 -2
  69. package/dist/FieldRegistry.d.mts +1 -1
  70. package/dist/{FilterBar-Ck085Dic.d.mts → FilterBar-DfBV7yKM.d.mts} +10 -4
  71. package/dist/FilterBar.d.mts +1 -1
  72. package/dist/FilterPickerMenu.d.mts +2 -2
  73. package/dist/FilterPill.d.mts +1 -1
  74. package/dist/FilterPopover.d.mts +1 -1
  75. package/dist/FloatValueControl.d.mts +1 -1
  76. package/dist/{FormControl-CfpwZGlD.d.mts → FormControl-0H0Jeind.d.mts} +2 -2
  77. package/dist/{FormControl-D1HIqDKm.mjs → FormControl-1BmoYFCu.mjs} +1 -1
  78. package/dist/{FormControl-D1HIqDKm.mjs.map → FormControl-1BmoYFCu.mjs.map} +1 -1
  79. package/dist/FormControl.d.mts +1 -1
  80. package/dist/FormControlLabel.d.mts +1 -1
  81. package/dist/{FormField-0p4y0sS5.d.mts → FormField-BcaFdmo5.d.mts} +2 -2
  82. package/dist/{FormField-CVnbsNvU.mjs → FormField-oBKH25qf.mjs} +11 -11
  83. package/dist/{FormField-CVnbsNvU.mjs.map → FormField-oBKH25qf.mjs.map} +1 -1
  84. package/dist/FormField.d.mts +1 -1
  85. package/dist/Grid.d.mts +38 -0
  86. package/dist/GridItem.d.mts +17 -0
  87. package/dist/{Header-gDUTQgWj.d.mts → Header-BjSoTEX_.d.mts} +1 -1
  88. package/dist/Header.d.mts +1 -1
  89. package/dist/{HelperTooltip-CqhiRb5g.d.mts → HelperTooltip-S20wVFCS.d.mts} +2 -2
  90. package/dist/HelperTooltip.d.mts +1 -1
  91. package/dist/{HoverCopyableField-HWshrU_1.mjs → HoverCopyableField-GMXeF-3J.mjs} +2 -2
  92. package/dist/{HoverCopyableField-HWshrU_1.mjs.map → HoverCopyableField-GMXeF-3J.mjs.map} +1 -1
  93. package/dist/{IconButton-CLsHdYm7.d.mts → IconButton-BpyOr8Ev.d.mts} +2 -2
  94. package/dist/IconButton.d.mts +1 -1
  95. package/dist/ImageTile.d.mts +1 -1
  96. package/dist/InlineCombobox.d.mts +1 -1
  97. package/dist/InlineInput.d.mts +1 -1
  98. package/dist/{Input-DoB8YswA.mjs → Input-BWlvBYB3.mjs} +1 -1
  99. package/dist/{Input-DoB8YswA.mjs.map → Input-BWlvBYB3.mjs.map} +1 -1
  100. package/dist/{Input-BHHWpSKN.d.mts → Input-qlQVD5h0.d.mts} +5 -5
  101. package/dist/Input.d.mts +1 -1
  102. package/dist/{InputProps-sHxlDiss.d.mts → InputProps-D_7MnQfE.d.mts} +2 -2
  103. package/dist/InputProps.d.mts +1 -1
  104. package/dist/IntegerValueControl.d.mts +1 -1
  105. package/dist/{ListBox-B9uuMt2R.mjs → ListBox-9jHHEaqW.mjs} +5 -5
  106. package/dist/{ListBox-B9uuMt2R.mjs.map → ListBox-9jHHEaqW.mjs.map} +1 -1
  107. package/dist/{ListBox-BrY1bQ5-.d.mts → ListBox-ZE3MYMt6.d.mts} +3 -3
  108. package/dist/ListBox.d.mts +1 -1
  109. package/dist/ListBoxField.d.mts +2 -2
  110. package/dist/{LoadingShimmer-dsBWRdTU.mjs → LoadingShimmer-a2Hv0kAq.mjs} +1 -1
  111. package/dist/{LoadingShimmer-dsBWRdTU.mjs.map → LoadingShimmer-a2Hv0kAq.mjs.map} +1 -1
  112. package/dist/LoadingShimmer.d.mts +1 -1
  113. package/dist/{LogicRow-9a_klV2v.d.mts → LogicRow-CbMmaWXU.d.mts} +3 -3
  114. package/dist/LogicRow.d.mts +1 -1
  115. package/dist/MaskedInput.d.mts +2 -2
  116. package/dist/{Menu-CHbUf9PQ.mjs → Menu-38UCGcte.mjs} +1 -1
  117. package/dist/{Menu-CHbUf9PQ.mjs.map → Menu-38UCGcte.mjs.map} +1 -1
  118. package/dist/{Menu-D4Y_J-QI.d.mts → Menu-ZShdhNd7.d.mts} +3 -3
  119. package/dist/Menu.d.mts +1 -1
  120. package/dist/Modal.d.mts +1 -1
  121. package/dist/{PageHeader-XxGsFLHb.mjs → PageHeader-B2-Slzhl.mjs} +2 -2
  122. package/dist/{PageHeader-XxGsFLHb.mjs.map → PageHeader-B2-Slzhl.mjs.map} +1 -1
  123. package/dist/PageHeader.d.mts +1 -1
  124. package/dist/{PageSelector-BDo3ge1E.d.mts → PageSelector-BcZx4nqe.d.mts} +3 -3
  125. package/dist/PageSelector.d.mts +1 -1
  126. package/dist/{Pagination-DvVKQLdC.mjs → Pagination-CtUz0gdA.mjs} +3 -3
  127. package/dist/{Pagination-DvVKQLdC.mjs.map → Pagination-CtUz0gdA.mjs.map} +1 -1
  128. package/dist/{Pagination-Dcmv7bVe.d.mts → Pagination-j4hF7GOk.d.mts} +2 -2
  129. package/dist/Pagination.d.mts +1 -1
  130. package/dist/{Pii-BD48BtZ0.mjs → Pii-RwKn-K84.mjs} +1 -1
  131. package/dist/{Pii-BD48BtZ0.mjs.map → Pii-RwKn-K84.mjs.map} +1 -1
  132. package/dist/PillShell.d.mts +1 -1
  133. package/dist/{Popover-DNH8Jx1-.mjs → Popover-DlXyKYL5.mjs} +1 -1
  134. package/dist/{Popover-DNH8Jx1-.mjs.map → Popover-DlXyKYL5.mjs.map} +1 -1
  135. package/dist/ProgressIndicator.d.mts +5 -3
  136. package/dist/{PseudoClassProps-DgT5G_z5.d.mts → PseudoClassProps-BPdn-ofQ.d.mts} +1 -1
  137. package/dist/PseudoClassProps.d.mts +1 -1
  138. package/dist/{Radio-DSMPX5_2.mjs → Radio-cLL9oatf.mjs} +1 -1
  139. package/dist/{Radio-DSMPX5_2.mjs.map → Radio-cLL9oatf.mjs.map} +1 -1
  140. package/dist/{RadioGroup-D5IITQLz.mjs → RadioGroup-BGo_kXKh.mjs} +2 -2
  141. package/dist/{RadioGroup-D5IITQLz.mjs.map → RadioGroup-BGo_kXKh.mjs.map} +1 -1
  142. package/dist/{RadioGroup-Jl1yAvGu.d.mts → RadioGroup-BqULCH-D.d.mts} +1 -1
  143. package/dist/RadioGroup.d.mts +1 -1
  144. package/dist/RangeCalendar.d.mts +5 -0
  145. package/dist/RangeCalendarPresets.d.mts +12 -2
  146. package/dist/ResizableVerticalPanel.d.mts +22 -0
  147. package/dist/ResizeHandle.d.mts +19 -0
  148. package/dist/RightPanel.d.mts +41 -0
  149. package/dist/RightPanelLoadingContent.d.mts +7 -0
  150. package/dist/RightPanelResizeHandle.d.mts +14 -0
  151. package/dist/RuleEditorFields.d.mts +4 -4
  152. package/dist/RulesPill.d.mts +1 -1
  153. package/dist/{SearchInput-CaKHRC_s.d.mts → SearchInput-Dc90GLTF.d.mts} +2 -2
  154. package/dist/SearchInput.d.mts +1 -1
  155. package/dist/SectionHeading.d.mts +1 -1
  156. package/dist/{SegmentedControl-JUgRw_M-.mjs → SegmentedControl-CvWJGhwy.mjs} +1 -1
  157. package/dist/{SegmentedControl-JUgRw_M-.mjs.map → SegmentedControl-CvWJGhwy.mjs.map} +1 -1
  158. package/dist/{SegmentedControl-e6xDtoHC.d.mts → SegmentedControl-Db78Pzo_.d.mts} +1 -1
  159. package/dist/SegmentedControl.d.mts +1 -1
  160. package/dist/{Select-DX3toj6M.mjs → Select-U_vQhK1A.mjs} +3 -4
  161. package/dist/Select-U_vQhK1A.mjs.map +1 -0
  162. package/dist/{Select-CPYztD4m.d.mts → Select-bafAe2wd.d.mts} +3 -3
  163. package/dist/Select.d.mts +1 -1
  164. package/dist/{Spinner-D3wXIoXN.mjs → Spinner-BTyc6glU.mjs} +1 -1
  165. package/dist/{Spinner-D3wXIoXN.mjs.map → Spinner-BTyc6glU.mjs.map} +1 -1
  166. package/dist/{Stack-DHaK1-dw.d.mts → Stack-_JcvIE31.d.mts} +1 -1
  167. package/dist/Stack.d.mts +1 -1
  168. package/dist/{Sticker-DnSemOcW.d.mts → Sticker-OKVOQt_C.d.mts} +4 -4
  169. package/dist/Sticker.d.mts +1 -1
  170. package/dist/StringValueControl.d.mts +1 -1
  171. package/dist/Tab.d.mts +1 -1
  172. package/dist/{TabBar-sYllYizt.mjs → TabBar-B5NtgtgC.mjs} +1 -1
  173. package/dist/{TabBar-sYllYizt.mjs.map → TabBar-B5NtgtgC.mjs.map} +1 -1
  174. package/dist/TabBarIconButton.d.mts +1 -1
  175. package/dist/{Table-CFbPINKr.d.mts → Table-BcAgCIWq.d.mts} +1 -1
  176. package/dist/{Table-C2pkP5Xg.mjs → Table-DfUD3I2s.mjs} +2 -2
  177. package/dist/{Table-C2pkP5Xg.mjs.map → Table-DfUD3I2s.mjs.map} +1 -1
  178. package/dist/Table.d.mts +1 -1
  179. package/dist/{TableBody-BQsGc4Lw.d.mts → TableBody-D-RDBun9.d.mts} +1 -1
  180. package/dist/TableBody.d.mts +1 -1
  181. package/dist/{TableBox-CaTHcR4F.mjs → TableBox-0GvWjRln.mjs} +18 -12
  182. package/dist/{TableBox-CaTHcR4F.mjs.map → TableBox-0GvWjRln.mjs.map} +1 -1
  183. package/dist/TableBox.d.mts +2 -2
  184. package/dist/{TableBoxCell-52g97gEg.d.mts → TableBoxCell-WXc57DwN.d.mts} +10 -7
  185. package/dist/TableBoxCell.d.mts +1 -1
  186. package/dist/TableBoxField.d.mts +3 -3
  187. package/dist/{TableBoxRow-DnoumHIE.d.mts → TableBoxRow-BQz0a9vr.d.mts} +3 -3
  188. package/dist/TableBoxRow.d.mts +1 -1
  189. package/dist/{TableBoxRowActions-CDcREhP4.d.mts → TableBoxRowActions-DfewtLrn.d.mts} +2 -2
  190. package/dist/TableBoxRowActions.d.mts +1 -1
  191. package/dist/TableCell.d.mts +1 -1
  192. package/dist/{TableControls-CrGGlkEG.d.mts → TableControls-C26vGkWZ.d.mts} +4 -3
  193. package/dist/{TableControls-3bXyd8gS.mjs → TableControls-WUNbzSNq.mjs} +238 -45
  194. package/dist/TableControls-WUNbzSNq.mjs.map +1 -0
  195. package/dist/TableControls.d.mts +1 -1
  196. package/dist/{TableControlsContext-BKZt2Jid.d.mts → TableControlsContext-ChFsFEjR.d.mts} +2 -2
  197. package/dist/TableControlsContext.d.mts +1 -1
  198. package/dist/{TableHead-CqVIJfjh.d.mts → TableHead-PPaqXC0K.d.mts} +1 -1
  199. package/dist/TableHead.d.mts +1 -1
  200. package/dist/{TableHeaderCell-DK4R8vdK.d.mts → TableHeaderCell-K_avn-rR.d.mts} +1 -1
  201. package/dist/TableHeaderCell.d.mts +1 -1
  202. package/dist/{TableLayout-BcIazRB-.d.mts → TableLayout-_Hd-Tvto.d.mts} +1 -1
  203. package/dist/TableLayout.d.mts +1 -1
  204. package/dist/{TableRow-DdJcjG2b.d.mts → TableRow-BTWf9xVC.d.mts} +2 -2
  205. package/dist/TableRow.d.mts +1 -1
  206. package/dist/TableTH.d.mts +1 -1
  207. package/dist/{TableViewConfigurationDropdown-CHBOjw7O.d.mts → TableViewConfigurationDropdown-BqB7pOh8.d.mts} +2 -2
  208. package/dist/TableViewConfigurationDropdown.d.mts +1 -1
  209. package/dist/{TechnicalSticker-D3eeGMDR.mjs → TechnicalSticker-ClRR_6Ly.mjs} +1 -1
  210. package/dist/{TechnicalSticker-D3eeGMDR.mjs.map → TechnicalSticker-ClRR_6Ly.mjs.map} +1 -1
  211. package/dist/{Text-BIgrwIdS.d.mts → Text-CAKHcXSd.d.mts} +3 -3
  212. package/dist/Text.d.mts +1 -1
  213. package/dist/{TextArea-CiLttt0s.d.mts → TextArea-NjdArapc.d.mts} +2 -2
  214. package/dist/{TextArea-DWXuV2aZ.mjs → TextArea-n4IKHJKo.mjs} +1 -1
  215. package/dist/{TextArea-DWXuV2aZ.mjs.map → TextArea-n4IKHJKo.mjs.map} +1 -1
  216. package/dist/TextArea.d.mts +1 -1
  217. package/dist/{TextUnderlineTooltip-_7mIrZ2-.d.mts → TextUnderlineTooltip-Duzxfc_r.d.mts} +2 -2
  218. package/dist/TextUnderlineTooltip.d.mts +1 -1
  219. package/dist/Tile.d.mts +1 -1
  220. package/dist/Toast.d.mts +1 -1
  221. package/dist/{Toggle-Cav7bMxg.d.mts → Toggle-fh80PA8P.d.mts} +1 -1
  222. package/dist/Toggle.d.mts +1 -1
  223. package/dist/{Tooltip-DX-N-szt.d.mts → Tooltip-DabloV0o.d.mts} +2 -2
  224. package/dist/Tooltip.d.mts +1 -1
  225. package/dist/{TruncatedText-D2R7uy_y.d.mts → TruncatedText-B1W4BivL.d.mts} +1 -1
  226. package/dist/codec-B0dZTwlG.d.mts +29 -0
  227. package/dist/codec.d.mts +2 -0
  228. package/dist/components/BottomPanel/index.d.mts +2 -0
  229. package/dist/components/BottomPanel/index.mjs +293 -0
  230. package/dist/components/BottomPanel/index.mjs.map +1 -0
  231. package/dist/components/Breadcrumbs/index.d.mts +1 -1
  232. package/dist/components/Breadcrumbs/index.mjs +1 -1
  233. package/dist/components/Button/index.d.mts +2 -2
  234. package/dist/components/Card/index.d.mts +2 -2
  235. package/dist/components/CardV2/index.d.mts +1 -1
  236. package/dist/components/CardV2/index.mjs +1 -1
  237. package/dist/components/Checkbox/index.d.mts +1 -1
  238. package/dist/components/Checkbox/index.mjs +1 -1
  239. package/dist/components/Combobox/index.d.mts +2 -2
  240. package/dist/components/Combobox/index.mjs +1 -1
  241. package/dist/components/ConfigFormGroup/index.mjs +1 -1
  242. package/dist/components/DataTable/TableControls/index.d.mts +19 -16
  243. package/dist/components/DataTable/TableControls/index.mjs +2 -2
  244. package/dist/components/DataTable/index.mjs +7 -7
  245. package/dist/components/DataTable/types.d.mts +2 -2
  246. package/dist/components/DatePicker/index.d.mts +5 -5
  247. package/dist/components/DatePicker/index.mjs +1 -1
  248. package/dist/components/DropdownButton/index.mjs +1 -1
  249. package/dist/components/DropdownMenu/index.d.mts +1 -1
  250. package/dist/components/DropdownMenu/index.mjs +1 -1
  251. package/dist/components/FormControl/index.d.mts +2 -2
  252. package/dist/components/FormControl/index.mjs +1 -1
  253. package/dist/components/FormField/index.d.mts +1 -1
  254. package/dist/components/FormField/index.mjs +1 -1
  255. package/dist/components/Grid/index.d.mts +3 -0
  256. package/dist/components/Grid/index.mjs +85 -0
  257. package/dist/components/Grid/index.mjs.map +1 -0
  258. package/dist/components/HoverCopyableField/index.mjs +1 -1
  259. package/dist/components/ImageTile/index.mjs +3 -3
  260. package/dist/components/Input/index.d.mts +1 -1
  261. package/dist/components/Input/index.mjs +1 -1
  262. package/dist/components/ListBox/index.d.mts +3 -3
  263. package/dist/components/ListBox/index.mjs +1 -1
  264. package/dist/components/LoadingShimmer/index.mjs +1 -1
  265. package/dist/components/MaskedInput/index.mjs +1 -1
  266. package/dist/components/Menu/index.d.mts +1 -1
  267. package/dist/components/Menu/index.mjs +1 -1
  268. package/dist/components/Modal/index.mjs +1 -1
  269. package/dist/components/PageHeader/index.mjs +1 -1
  270. package/dist/components/Pagination/index.d.mts +3 -3
  271. package/dist/components/Pagination/index.mjs +1 -1
  272. package/dist/components/Pii/index.mjs +1 -1
  273. package/dist/components/Popover/index.mjs +1 -1
  274. package/dist/components/ProgressIndicator/index.mjs +12 -8
  275. package/dist/components/ProgressIndicator/index.mjs.map +1 -1
  276. package/dist/components/Radio/index.mjs +1 -1
  277. package/dist/components/RadioGroup/index.d.mts +1 -1
  278. package/dist/components/RadioGroup/index.mjs +1 -1
  279. package/dist/components/RightPanel/index.d.mts +2 -0
  280. package/dist/components/RightPanel/index.mjs +294 -0
  281. package/dist/components/RightPanel/index.mjs.map +1 -0
  282. package/dist/components/SegmentedControl/index.d.mts +1 -1
  283. package/dist/components/SegmentedControl/index.mjs +1 -1
  284. package/dist/components/Select/index.d.mts +1 -1
  285. package/dist/components/Select/index.mjs +1 -1
  286. package/dist/components/Spinner/index.mjs +1 -1
  287. package/dist/components/Stack/index.d.mts +1 -1
  288. package/dist/components/Sticker/index.d.mts +1 -1
  289. package/dist/components/TabBar/index.mjs +1 -1
  290. package/dist/components/Table/index.d.mts +7 -7
  291. package/dist/components/Table/index.mjs +1 -1
  292. package/dist/components/TableBox/index.d.mts +2 -2
  293. package/dist/components/TableBox/index.mjs +1 -1
  294. package/dist/components/TechnicalSticker/index.mjs +1 -1
  295. package/dist/components/Text/index.d.mts +1 -1
  296. package/dist/components/TextArea/index.d.mts +1 -1
  297. package/dist/components/TextArea/index.mjs +1 -1
  298. package/dist/components/Toggle/index.d.mts +1 -1
  299. package/dist/components/Tooltip/index.d.mts +3 -3
  300. package/dist/compound-expression.d.mts +1 -1
  301. package/dist/{constants-bA9kCzRQ.d.mts → constants-DcJ3tnwY.d.mts} +1 -1
  302. package/dist/constants.d.mts +1 -1
  303. package/dist/date-filter-BbWgAXy3.mjs +176 -0
  304. package/dist/date-filter-BbWgAXy3.mjs.map +1 -0
  305. package/dist/date-range-rule-value-DBEEWTQp.d.mts +17 -0
  306. package/dist/date-range-rule-value.d.mts +2 -0
  307. package/dist/date-rule-intent-BArNGT2E.d.mts +20 -0
  308. package/dist/date-rule-intent.d.mts +2 -0
  309. package/dist/display.d.mts +2 -2
  310. package/dist/fieldPickerOptions.d.mts +2 -2
  311. package/dist/{filter-size-context-C7injfBh.d.mts → filter-size-context-D1UhTwOG.d.mts} +2 -2
  312. package/dist/filter-size-context.d.mts +1 -1
  313. package/dist/helpers.d.mts +1 -1
  314. package/dist/{index-BPfK-u7y.d.mts → index-DASkW991.d.mts} +2 -2
  315. package/dist/{index-d_fTFuMM.d.mts → index-Dc_BgmPv.d.mts} +3 -3
  316. package/dist/{index-BxBsQi2S.d.mts → index-Dpo-RP6S.d.mts} +3 -3
  317. package/dist/index-e6k85DKM.d.mts +1 -0
  318. package/dist/index-uY8Qbwfx.d.mts +1 -0
  319. package/dist/index.d.mts +1 -1
  320. package/dist/index2.d.mts +1 -1
  321. package/dist/index3.d.mts +3 -3
  322. package/dist/index4.d.mts +14 -11
  323. package/dist/{input-D9FuQmlI.d.mts → input-M7BEIewR.d.mts} +3 -3
  324. package/dist/inputFields.d.mts +10 -10
  325. package/dist/{intersperse-CLkblj9A.mjs → intersperse-DQAyfeEw.mjs} +1 -1
  326. package/dist/{intersperse-CLkblj9A.mjs.map → intersperse-DQAyfeEw.mjs.map} +1 -1
  327. package/dist/lib/PDSProvider.d.mts +1 -1
  328. package/dist/lib/TruncatedText.d.mts +1 -1
  329. package/dist/lib/TruncatedTextWithTooltip.d.mts +1 -1
  330. package/dist/lib/date-filter/index.d.mts +3 -0
  331. package/dist/lib/date-filter/index.mjs +2 -0
  332. package/dist/lib/message.d.mts +1 -1
  333. package/dist/lib/pseudoClass.d.mts +1 -1
  334. package/dist/lib/useResizablePanel.d.mts +49 -0
  335. package/dist/lib/useResizablePanel.mjs +75 -0
  336. package/dist/lib/useResizablePanel.mjs.map +1 -0
  337. package/dist/{message-CqKB5mko.d.mts → message-DaiDXonE.d.mts} +1 -1
  338. package/dist/mixins/focus.d.mts +1 -1
  339. package/dist/mixins/hoverable.d.mts +2 -2
  340. package/dist/mixins/input.d.mts +1 -1
  341. package/dist/mixins/menuItem.d.mts +2 -2
  342. package/dist/mixins/text.d.mts +1 -1
  343. package/dist/{operators-CgcsYzfy.d.mts → operators-BsSl7gPE.d.mts} +10 -3
  344. package/dist/operators.d.mts +2 -2
  345. package/dist/patterns/LayoutLoadingShimmer/index.mjs +4 -4
  346. package/dist/relative-date-label.d.mts +15 -0
  347. package/dist/{text-xwtyWIbE.d.mts → text-DjTGRUM1.d.mts} +1 -1
  348. package/dist/{theme-Ftogn9Wo.d.mts → theme-Biwx2eJZ.d.mts} +1 -1
  349. package/dist/theme.d.mts +1 -1
  350. package/dist/{types-BrNreYUU.d.mts → types-B5VmRRMR.d.mts} +5 -3
  351. package/dist/types-Bsf1VsW6.d.mts +24 -0
  352. package/dist/{types-DVsBRqjZ.d.mts → types-Cg3aXHUh2.d.mts} +1 -1
  353. package/dist/{types-0_9G0kWg.d.mts → types-Df0D37uh.d.mts} +1 -1
  354. package/dist/{types-D55MZSyx.d.mts → types-V8UJX-rk.d.mts} +14 -2
  355. package/dist/types.d.mts +1 -1
  356. package/dist/types2.d.mts +2 -2
  357. package/dist/types3.d.mts +2 -2
  358. package/dist/types4.d.mts +2 -2
  359. package/dist/types5.d.mts +2 -0
  360. package/dist/url-state-ektb0HnB.d.mts +42 -0
  361. package/dist/url-state.d.mts +2 -0
  362. package/dist/useComboboxFooterAction.d.mts +1 -1
  363. package/dist/{useFilterStateV2-D8Q8QKhS.d.mts → useFilterStateV2-BB14vCC-.d.mts} +3 -3
  364. package/dist/useFilterStateV2.d.mts +1 -1
  365. package/dist/{useFormField-BBbq1izo.d.mts → useFormField-CQo08dR4.d.mts} +2 -2
  366. package/dist/useFormField.d.mts +1 -1
  367. package/dist/{useTableBoxDragAndDrop-Bye8gJTl.d.mts → useTableBoxDragAndDrop-B-Dev5D6.d.mts} +1 -1
  368. package/dist/useTableBoxDragAndDrop.d.mts +1 -1
  369. package/dist/useTruncation.d.mts +1 -1
  370. package/dist/{utilities-Bmwk_DRn.d.mts → utilities-BHMNnJ8h.d.mts} +1 -1
  371. package/dist/utilities.d.mts +1 -1
  372. package/dist/utils.d.mts +1 -1
  373. package/dist/{validation-CAtTuHO9.d.mts → validation-B22QjCrV.d.mts} +3 -3
  374. package/dist/validation.d.mts +1 -1
  375. package/dist/{value-control-resolver-DadI8r9a.d.mts → value-control-resolver-qKTH1ErF.d.mts} +5 -3
  376. package/dist/value-control-resolver.d.mts +1 -1
  377. package/llms.txt +3 -3
  378. package/package.json +11 -1
  379. package/skills/ui-authoring/COMPONENTS.md +2 -0
  380. package/skills/ui-authoring/PATTERNS.md +3 -1
  381. package/skills/ui-authoring/SKILL.md +2 -2
  382. package/dist/DatePicker-BNnZ6L1y.mjs.map +0 -1
  383. package/dist/Select-DX3toj6M.mjs.map +0 -1
  384. package/dist/TableControls-3bXyd8gS.mjs.map +0 -1
  385. /package/dist/{index-0-W_aPej.d.mts → index-7rWKHdox.d.mts} +0 -0
  386. /package/dist/{index-7in8TPrM.d.mts → index-8SLBz2NH.d.mts} +0 -0
  387. /package/dist/{index-BNRXMhlr.d.mts → index-B_BBnMou.d.mts} +0 -0
  388. /package/dist/{index-BO_854F2.d.mts → index-BcsXXrHq.d.mts} +0 -0
  389. /package/dist/{index-BSVhZrWN.d.mts → index-Bt4QNofW.d.mts} +0 -0
  390. /package/dist/{index-BrGZHEgX.d.mts → index-BwFl_eS0.d.mts} +0 -0
  391. /package/dist/{index-BwAfCVZH2.d.mts → index-CMuRFTR3.d.mts} +0 -0
  392. /package/dist/{index-CCt0lwyI.d.mts → index-CRo77wc3.d.mts} +0 -0
  393. /package/dist/{index-CFhUdAHM.d.mts → index-CX869wwk.d.mts} +0 -0
  394. /package/dist/{index-CREkvfw9.d.mts → index-CliqZ9rj.d.mts} +0 -0
  395. /package/dist/{index-CROz1VSV.d.mts → index-CuheJfs-.d.mts} +0 -0
  396. /package/dist/{index-CsuikFeJ.d.mts → index-D4DUvwPf.d.mts} +0 -0
  397. /package/dist/{index-CzUpNo0e.d.mts → index-DBGd4WeR.d.mts} +0 -0
  398. /package/dist/{index-DA6_cwf8.d.mts → index-DDdPqD_H.d.mts} +0 -0
  399. /package/dist/{index-DM6vVDZD.d.mts → index-DMRtRo7y.d.mts} +0 -0
  400. /package/dist/{index-DeVKzGce.d.mts → index-Dflz2i1X.d.mts} +0 -0
  401. /package/dist/{index-Jh0C5PIG.d.mts → index-DvmLVvRD.d.mts} +0 -0
  402. /package/dist/{index-Oio5ygqN.d.mts → index-DztUdPP_.d.mts} +0 -0
  403. /package/dist/{index-PWQavSPf.d.mts → index-Wc1llEvP.d.mts} +0 -0
  404. /package/dist/{index-sViox9YW.d.mts → index-dhjtMp5F.d.mts} +0 -0
@@ -3,17 +3,17 @@ import { t as IconButton } from "./IconButton-BgL3QUVO.mjs";
3
3
  import { n as useFormGroup } from "./useFormGroup-CaTiD_Yt.mjs";
4
4
  import { t as FormControlContext } from "./useFormField-Bz2iMPBO.mjs";
5
5
  import Input_default from "./components/Input/index.mjs";
6
- import { n as DropdownMenu_default } from "./DropdownMenu-82xH1AZr.mjs";
7
- import { t as Checkbox } from "./Checkbox-Ccuicmlo.mjs";
8
- import { t as Combobox } from "./Combobox-BGRyr_-L.mjs";
9
- import { n as Select } from "./Select-DX3toj6M.mjs";
6
+ import { n as DropdownMenu_default } from "./DropdownMenu-CUnf420M.mjs";
7
+ import { t as Checkbox } from "./Checkbox-DxNHp59y.mjs";
8
+ import { t as Combobox } from "./Combobox-BUtqtzKl.mjs";
9
+ import { n as Select } from "./Select-U_vQhK1A.mjs";
10
10
  import { t as Toggle } from "./Toggle-e8DCYa6i.mjs";
11
- import { a as FormLabel, i as FormInputContainer, n as ErrorText, o as HelperText, r as FormControl, s as WarningText } from "./FormControl-D1HIqDKm.mjs";
12
- import { t as ListBox } from "./ListBox-B9uuMt2R.mjs";
13
- import { t as RadioGroup } from "./RadioGroup-D5IITQLz.mjs";
14
- import { t as SegmentedControl } from "./SegmentedControl-JUgRw_M-.mjs";
15
- import { t as TextAreaWithStyle } from "./TextArea-DWXuV2aZ.mjs";
16
- import { t as TableBox } from "./TableBox-CaTHcR4F.mjs";
11
+ import { a as FormLabel, i as FormInputContainer, n as ErrorText, o as HelperText, r as FormControl, s as WarningText } from "./FormControl-1BmoYFCu.mjs";
12
+ import { t as ListBox } from "./ListBox-9jHHEaqW.mjs";
13
+ import { t as RadioGroup } from "./RadioGroup-BGo_kXKh.mjs";
14
+ import { t as SegmentedControl } from "./SegmentedControl-CvWJGhwy.mjs";
15
+ import { t as TextAreaWithStyle } from "./TextArea-n4IKHJKo.mjs";
16
+ import { t as TableBox } from "./TableBox-0GvWjRln.mjs";
17
17
  import { Spacing } from "@persona/design-tokens";
18
18
  import { Children, Fragment, cloneElement, createContext, forwardRef, useContext, useMemo, useRef, useState } from "react";
19
19
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
@@ -474,4 +474,4 @@ TableBoxField.Cell = TableBox.Cell;
474
474
  //#endregion
475
475
  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 };
476
476
 
477
- //# sourceMappingURL=FormField-CVnbsNvU.mjs.map
477
+ //# sourceMappingURL=FormField-oBKH25qf.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"FormField-CVnbsNvU.mjs","names":["Input","TextArea","DropdownMenu","DropdownMenu"],"sources":["../components/FormField/FormField.tsx","../components/FormField/inputFields.tsx","../components/FormField/CheckboxGroupField.tsx","../components/FormField/ListBoxField.tsx","../components/FormField/TableBoxField.tsx"],"sourcesContent":["import { type ComponentPropsWithRef, forwardRef, type ReactElement, type ReactNode } from 'react';\n\nimport { Spacing } from '@persona/design-tokens';\nimport useFormGroup from 'design-system/components/ConfigFormGroup/useFormGroup';\nimport FormControl, {\n ErrorText,\n type FormControlProps,\n FormInputContainer,\n FormLabel,\n HelperText,\n WarningText,\n} from 'design-system/components/FormControl';\nimport { HStack } from 'design-system/components/Stack';\n\nexport interface FormFieldBaseProps {\n /**\n * Renders `<Label>` above input\n */\n label?: ReactNode;\n\n /**\n * ID of the input element. Providing this will automatically link the label to the input.\n */\n inputId?: string;\n\n /**\n * Renders `<HelperText>` below input\n */\n helperText?: ReactNode;\n\n /**\n * Renders `<ErrorText>` below input and helper text.\n */\n errorText?: ReactNode;\n\n /**\n * Renders `<WarningText>` below input and helper text.\n */\n warningText?: ReactNode;\n\n /**\n * Should be an input of some sort\n */\n children?: ReactElement;\n\n labelProps?: ComponentPropsWithRef<typeof FormLabel>;\n helperProps?: ComponentPropsWithRef<typeof HelperText>;\n warningProps?: ComponentPropsWithRef<typeof WarningText>;\n errorProps?: ComponentPropsWithRef<typeof ErrorText>;\n\n /**\n * Whether to render the form field as a config field.\n * This will render the helper text as a tooltip.\n */\n configField?: boolean;\n\n /**\n * Override the width of the input area when `configField` is true.\n * Accepts any valid CSS width value (e.g. `'33%'`, `'66.67%'`).\n * Defaults to `'50%'`.\n */\n configFieldInputWidth?: string;\n\n /**\n * Renders actions to the right of the label.\n */\n rightActions?: ReactNode;\n}\n\nexport interface FormFieldProps extends Omit<FormControlProps, 'children'>, FormFieldBaseProps {}\n\n/**\n * > **Please do not use in production! This component is subject to API and style changes.**\n *\n * Helper components with preset slots for label, input, and helper texts.\n * Fully composed components with different form input types are available.\n * This is the recommended way to implement form elements.\n * You can use `<FormControl>` if you require more flexibility.\n *\n * ## Usage\n *\n * ```tsx\n * import FormField from 'design-system/components/FormField';\n * ```\n */\nexport const FormField = forwardRef<HTMLDivElement, FormFieldProps>(function FormField(\n {\n label,\n children,\n helperText,\n warningText,\n errorText,\n labelProps,\n helperProps,\n warningProps,\n errorProps,\n configField: configFieldProp,\n configFieldInputWidth,\n rightActions,\n ...props\n }: FormFieldProps,\n ref,\n) {\n const { configField: configFieldFormGroup } = useFormGroup();\n const configField = configFieldProp ?? configFieldFormGroup;\n\n const labelElement = label ? (\n <FormLabel tooltip={configField && helperText ? helperText : undefined} {...labelProps}>\n {label}\n </FormLabel>\n ) : null;\n\n return (\n <FormControl\n hasError={!!errorText}\n hasWarning={!!warningText}\n ref={ref}\n configField={configField}\n hasRightActions={!!rightActions}\n configFieldInputWidth={configFieldInputWidth}\n {...props}\n >\n {rightActions ? (\n <HStack justify='space-between' align='center'>\n {labelElement}\n <HStack spacing={Spacing[1]}>{rightActions}</HStack>\n </HStack>\n ) : (\n labelElement\n )}\n <FormInputContainer>{children}</FormInputContainer>\n {!configField && helperText && <HelperText {...helperProps}>{helperText}</HelperText>}\n {!configField && warningText && <WarningText {...warningProps}>{warningText}</WarningText>}\n {!configField && errorText && <ErrorText {...errorProps}>{errorText}</ErrorText>}\n </FormControl>\n );\n});\n\nexport default FormField;\n","import { uniqueId } from 'lodash-es';\nimport { forwardRef, useMemo } from 'react';\n\nimport Checkbox, { type CheckboxProps } from 'design-system/components/Checkbox';\nimport Combobox from 'design-system/components/Combobox';\nimport type { ComboboxMultiSelectProps } from 'design-system/components/Combobox/ComboboxMultiSelect';\nimport type { ComboboxSingleSelectProps } from 'design-system/components/Combobox/ComboboxSingleSelect';\nimport FormField, { type FormFieldBaseProps } from 'design-system/components/FormField/FormField';\nimport Input, { type InputProps } from 'design-system/components/Input';\nimport RadioGroup, { type RadioGroupProps } from 'design-system/components/RadioGroup';\nimport SegmentedControl, {\n type SegmentedControlProps,\n} from 'design-system/components/SegmentedControl';\nimport Select, { type SelectProps } from 'design-system/components/Select';\nimport TextArea, { type TextAreaProps } from 'design-system/components/TextArea';\nimport Toggle, { type ToggleProps } from 'design-system/components/Toggle';\n\nexport type ImplementsFormField = Omit<FormFieldBaseProps, 'children'>;\n\ntype ExtractFormFieldProps<T extends ImplementsFormField> = Pick<\n T,\n | 'label'\n | 'inputId'\n | 'helperText'\n | 'errorText'\n | 'warningText'\n | 'labelProps'\n | 'helperProps'\n | 'warningProps'\n | 'errorProps'\n | 'configField'\n | 'configFieldInputWidth'\n | 'rightActions'\n>;\ntype OmitFormFieldProps<T extends ImplementsFormField> = Omit<T, keyof ExtractFormFieldProps<T>>;\n\n/**\n * Helper to split out props that are sent to the FormField component from props sent\n * to the underlying input component.\n */\nexport const splitOutFormFieldProps = <T extends ImplementsFormField>(\n props: T,\n): {\n formFieldProps: ExtractFormFieldProps<T>;\n inputProps: OmitFormFieldProps<T>;\n} => {\n const {\n label,\n inputId,\n helperText,\n errorText,\n warningText,\n labelProps,\n helperProps,\n warningProps,\n errorProps,\n configField,\n configFieldInputWidth,\n rightActions,\n ...inputProps\n } = props;\n\n return {\n formFieldProps: {\n label,\n inputId,\n helperText,\n errorText,\n warningText,\n labelProps,\n helperProps,\n warningProps,\n errorProps,\n configField,\n configFieldInputWidth,\n rightActions,\n },\n inputProps,\n };\n};\n\nexport interface TextFieldProps extends ImplementsFormField, InputProps {}\n\nexport const TextField = forwardRef<HTMLInputElement, TextFieldProps>(\n function TextField(props, ref) {\n const { formFieldProps, inputProps } = splitOutFormFieldProps(props);\n const { id, ...rest } = inputProps;\n\n return (\n <FormField\n {...formFieldProps}\n labelProps={{ size: props.size, ...formFieldProps.labelProps }}\n inputId={formFieldProps.inputId ?? id}\n >\n <Input {...rest} ref={ref} />\n </FormField>\n );\n },\n);\n\nexport interface TextAreaFieldProps extends ImplementsFormField, TextAreaProps {}\n\nexport const TextAreaField = forwardRef<HTMLTextAreaElement, TextAreaFieldProps>(\n function TextAreaField(props, ref) {\n const { formFieldProps, inputProps } = splitOutFormFieldProps(props);\n const { id, ...rest } = inputProps;\n\n return (\n <FormField\n {...formFieldProps}\n labelProps={{ size: props.size, ...formFieldProps.labelProps }}\n inputId={formFieldProps.inputId ?? id}\n >\n <TextArea {...rest} ref={ref} />\n </FormField>\n );\n },\n);\n\nexport interface SelectFieldProps extends ImplementsFormField, SelectProps {}\n\nexport const SelectField = ({ 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 children,\n ...props\n}: RadioGroupFieldProps) => {\n return (\n <FormField\n label={label}\n helperText={helperText}\n warningText={warningText}\n errorText={errorText}\n >\n <RadioGroup {...props}>{children}</RadioGroup>\n </FormField>\n );\n};\n\nexport interface CheckboxFieldProps extends ImplementsFormField, CheckboxProps {\n checkboxLabel?: CheckboxProps['label'];\n}\n\nexport const CheckboxField = ({\n label,\n helperText,\n errorText,\n warningText,\n checkboxLabel,\n configField,\n labelProps,\n ...props\n}: CheckboxFieldProps) => {\n return (\n <FormField\n label={label}\n helperText={helperText}\n warningText={warningText}\n errorText={errorText}\n configField={configField}\n labelProps={labelProps}\n >\n <Checkbox label={checkboxLabel} {...props} />\n </FormField>\n );\n};\n\nexport interface ToggleFieldProps extends ImplementsFormField, ToggleProps {}\n\nexport const ToggleField = forwardRef<HTMLDivElement, ToggleFieldProps>(\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 { label, helperText, errorText, warningText, configField, children, labelProps, ...props },\n ref,\n ) {\n return (\n <FormField\n label={label}\n helperText={helperText}\n warningText={warningText}\n errorText={errorText}\n configField={configField}\n labelProps={labelProps}\n >\n <SegmentedControl fullWidth {...props} ref={ref}>\n {children}\n </SegmentedControl>\n </FormField>\n );\n },\n);\n\nexport type ComboboxSingleSelectFieldProps<T = string> = ImplementsFormField &\n ComboboxSingleSelectProps<T>;\nexport type ComboboxMultiSelectFieldProps<T = string> = ImplementsFormField &\n ComboboxMultiSelectProps<T>;\n\nexport const ComboboxField = (\n 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 'design-system/components/Checkbox';\nimport type Checkbox from 'design-system/components/Checkbox';\nimport { FormControlContext } from 'design-system/components/FormControl/useFormField';\nimport FormField from 'design-system/components/FormField/FormField';\nimport type { ImplementsFormField } from 'design-system/components/FormField/inputFields';\n\n/* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\nconst CheckboxGroupContext = createContext<CheckboxGroupState>(null);\n\n/** Preserves the parent FormControl context (disabled, hasError, etc.) but clears\n * inputId so each Checkbox inside the group generates its own unique id. */\nconst ClearGroupInputId = ({ children }: { children: ReactNode }) => {\n const parentContext = useContext(FormControlContext);\n return (\n <FormControlContext.Provider value={{ ...parentContext, inputId: undefined }}>\n {children}\n </FormControlContext.Provider>\n );\n};\n\ninterface CheckboxGroupItemProps {\n children: ReactElement<ComponentPropsWithRef<typeof Checkbox>>;\n}\n\nconst CheckboxGroupItem = (props: CheckboxGroupItemProps) => {\n const { children } = props;\n const checkboxProps = children.props;\n\n const state = useContext(CheckboxGroupContext);\n const ref = useRef();\n const { inputProps } = useCheckboxGroupItem(\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n {\n ...checkboxProps,\n onChange: undefined,\n isDisabled: checkboxProps.disabled,\n isReadOnly: checkboxProps.readOnly,\n isRequired: checkboxProps.required,\n isIndeterminate: checkboxProps.indeterminate,\n value: String(children.props.value),\n 'aria-label': innerText(checkboxProps.label),\n },\n state,\n ref,\n );\n\n return cloneElement(\n children,\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n mergeProps(inputProps, {\n onChange: checkboxProps.onChange,\n disabled: state.isDisabled || checkboxProps.disabled,\n checked: state.isSelected(String(inputProps.value)),\n ref,\n } as ComponentPropsWithRef<typeof Checkbox>),\n );\n};\n\ninterface CheckboxGroupFieldProps\n extends\n Omit<ImplementsFormField, 'configField'>,\n Omit<\n AriaCheckboxGroupProps,\n 'description' | 'disabled' | 'isReadOnly' | 'isRequired' | 'errorMessage'\n > {\n children?: ReactElement<CheckboxProps>[];\n disabled?: boolean;\n readOnly?: boolean;\n required?: boolean;\n}\n\nconst CheckboxGroupField = ({\n children,\n name,\n onChange,\n disabled,\n readOnly,\n required,\n ...props\n}: CheckboxGroupFieldProps) => {\n const reactAriaProps = {\n ...props,\n description: props.helperText,\n errorMessage: props.errorText,\n onChange,\n name,\n isDisabled: disabled,\n isReadOnly: readOnly,\n isRequired: required,\n };\n const state = useCheckboxGroupState(reactAriaProps);\n const { groupProps, labelProps, descriptionProps, errorMessageProps } = useCheckboxGroup(\n reactAriaProps,\n state,\n );\n\n return (\n <FormField\n labelProps={labelProps}\n helperProps={descriptionProps}\n errorProps={errorMessageProps}\n disabled={disabled}\n {...groupProps}\n {...props}\n >\n <ClearGroupInputId>\n <CheckboxGroupContext.Provider value={state}>\n {Children.map(children, (checkbox) => (\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n <CheckboxGroupItem>{checkbox}</CheckboxGroupItem>\n ))}\n </CheckboxGroupContext.Provider>\n </ClearGroupInputId>\n </FormField>\n );\n};\n\nexport default CheckboxGroupField;\n","import { type ReactNode, useState } from 'react';\n\nimport { MoreIcon, PlusIcon } from '@persona/icons';\nimport { IconButton } from 'design-system/components/Button';\nimport useFormGroup from 'design-system/components/ConfigFormGroup/useFormGroup';\nimport DropdownMenu from 'design-system/components/DropdownMenu';\nimport FormField from 'design-system/components/FormField/FormField';\nimport type { ImplementsFormField } from 'design-system/components/FormField/inputFields';\nimport ListBox, { type ListBoxProps } from 'design-system/components/ListBox';\nimport type { MenuItemProps } from 'design-system/components/Menu';\n\ninterface ListBoxFieldAction extends Omit<MenuItemProps, 'children'> {\n label: string;\n onClick: (selectedKeys: ListBoxProps<any>['selectedKeys']) => void;\n}\n\ninterface AddDropdownConfig {\n options: ({ label: ReactNode; value: string } & Omit<MenuItemProps, 'children'>)[];\n onSelection: (value: string) => void;\n}\n\ninterface ListBoxFieldProps<T extends object> extends ImplementsFormField, ListBoxProps<T> {\n actions?: ListBoxFieldAction[];\n addDropdownConfig?: AddDropdownConfig;\n /** 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 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 configField={configField}\n rightActions={\n configField && (\n <>\n {menuActions.length > 0 && (\n <DropdownMenu\n trigger={\n <IconButton aria-label='Actions' size='sm'>\n <MoreIcon />\n </IconButton>\n }\n portal\n >\n {menuActions.map((action) => (\n <DropdownMenu.Item\n key={action.label}\n {...action}\n onClick={() => action.onClick(selectedKeys)}\n size={effectiveSize}\n >\n {action.label}\n </DropdownMenu.Item>\n ))}\n </DropdownMenu>\n )}\n {onAdd && !addDropdownConfig && addButton}\n {addDropdownConfig && (\n <DropdownMenu trigger={addButton} align='start' portal>\n {addDropdownConfig.options.map((option) => (\n <DropdownMenu.Item\n key={option.value}\n {...option}\n onClick={() => addDropdownConfig.onSelection(option.value)}\n size={effectiveSize}\n >\n {option.label}\n </DropdownMenu.Item>\n ))}\n </DropdownMenu>\n )}\n </>\n )\n }\n >\n <ListBox\n id={inputId}\n fullWidth={configField}\n size={effectiveSize}\n deleteDisabled={deleteDisabled}\n // We have to control the keys so we can power the `rightActions`\n selectedKeys={selectedKeys}\n onSelectionChange={(keys) => {\n onSelectionChange?.(keys);\n setSelectedKeys(keys);\n }}\n {...props}\n />\n </FormField>\n );\n};\n\nexport default ListBoxField;\n","import { Fragment, type MouseEvent, type ReactNode, useState } from 'react';\n\nimport { IconButton } from '@persona/design-system/components/Button';\nimport { useFormGroup } from '@persona/design-system/components/ConfigFormGroup';\nimport DropdownMenu from '@persona/design-system/components/DropdownMenu';\nimport type { FormLabelProps } from '@persona/design-system/components/FormControl';\nimport type { MenuItemProps } from '@persona/design-system/components/Menu';\nimport TableBox, { type TableBoxProps } from '@persona/design-system/components/TableBox';\nimport { MoreIcon, PlusIcon } from '@persona/icons';\n\nimport FormField from './FormField';\nimport type { ImplementsFormField } from './inputFields';\n\nexport interface TableBoxFieldAction extends Omit<MenuItemProps, 'children'> {\n label: string;\n onClick: (selectedKey: TableBoxProps['selectedKey']) => void;\n}\n\nexport interface TableBoxFieldActionGroup {\n type: 'group';\n heading: string;\n actions: TableBoxFieldAction[];\n}\n\nexport type TableBoxFieldActionEntry = TableBoxFieldAction | TableBoxFieldActionGroup;\n\n/** Aria-label on TableBoxField's + button. Consumers that style or detect that\n * button (e.g. popover toggle guards) should import this rather than redefining it. */\nexport const TABLE_BOX_FIELD_ADD_BUTTON_ARIA_LABEL = 'Add item to table';\n\nconst isActionGroup = (action: TableBoxFieldActionEntry): action is TableBoxFieldActionGroup =>\n 'type' in action && action.type === 'group';\n\ninterface AddDropdownConfig {\n options: Array<{ label: string; value: string }>;\n onSelection: (value: string) => void;\n}\n\ninterface TableBoxFieldProps<T extends object = object>\n extends ImplementsFormField, Omit<TableBoxProps<T>, 'aria-label' | 'onCreateNewRow'> {\n onAdd?: (e: MouseEvent<HTMLButtonElement>) => void;\n onDelete?: (selectedKey: string | null) => void;\n deleteDisabled?: boolean;\n /** Actions and labeled action groups rendered in order. Empty groups are omitted. */\n actions?: TableBoxFieldActionEntry[];\n addDropdownConfig?: AddDropdownConfig;\n\n /**\n * Callback to create a new row and add it to the rows array\n * Should return the id of the newly created row\n */\n createNewRow?: () => string;\n children?: ReactNode;\n}\n\nconst TableBoxField = <T extends object = object>({\n label,\n helperText,\n errorText,\n warningText,\n labelProps: labelPropsProp,\n helperProps,\n errorProps,\n warningProps,\n inputId,\n onAdd,\n onDelete,\n deleteDisabled,\n configField: configFieldProp = true,\n actions = [],\n addDropdownConfig,\n selectedKey: selectedKeyProp,\n onSelectionChange,\n defaultSelectedKey,\n selectionMode,\n disabled,\n createNewRow,\n children,\n emptyText = 'No data',\n ...props\n}: TableBoxFieldProps<T>) => {\n const { configField } = useFormGroup({ configField: configFieldProp });\n const menuActions: TableBoxFieldActionEntry[] = [...actions];\n const [selectedKeyState, setSelectedKey] = useState(defaultSelectedKey);\n const selectedKey = selectedKeyProp ?? selectedKeyState;\n const [newRowId, setNewRowId] = useState<string | null>(null);\n const labelProps: FormLabelProps = { size: 'sm', ...labelPropsProp };\n\n const handleCreateNewRow = () => {\n if (createNewRow) {\n setNewRowId(createNewRow());\n }\n };\n\n // Handle add button click\n const handleAddClick = (e: MouseEvent<HTMLButtonElement>) => {\n if (createNewRow) {\n handleCreateNewRow();\n } else if (onAdd) {\n onAdd(e);\n }\n };\n\n if (onDelete) {\n menuActions.unshift({\n label: 'Delete',\n onClick: () => selectedKey && onDelete(selectedKey),\n disabled: deleteDisabled || selectedKey == null,\n });\n }\n const visibleMenuActions = menuActions.filter(\n (action) => !isActionGroup(action) || action.actions.length > 0,\n );\n\n const addButton = (\n <IconButton\n size='sm'\n onClick={handleAddClick}\n aria-label={TABLE_BOX_FIELD_ADD_BUTTON_ARIA_LABEL}\n disabled={disabled}\n >\n <PlusIcon />\n </IconButton>\n );\n\n return (\n <FormField\n label={label}\n helperText={helperText}\n errorText={errorText}\n warningText={warningText}\n labelProps={labelProps}\n helperProps={helperProps}\n errorProps={errorProps}\n warningProps={warningProps}\n inputId={inputId}\n rightActions={\n configField && (\n <>\n {visibleMenuActions.length > 0 && (\n <DropdownMenu\n trigger={\n <IconButton aria-label='Actions' size='sm' disabled={disabled}>\n <MoreIcon />\n </IconButton>\n }\n portal\n >\n {visibleMenuActions.map((entry, entryIndex) => {\n const previousEntry = visibleMenuActions[entryIndex - 1];\n if (isActionGroup(entry)) {\n return (\n <Fragment key={`${entry.heading}-${entryIndex}`}>\n {entryIndex > 0 && <DropdownMenu.Divider />}\n <DropdownMenu.Heading size='sm'>{entry.heading}</DropdownMenu.Heading>\n {entry.actions.map((action) => (\n <DropdownMenu.Item\n key={action.label}\n {...action}\n disabled={disabled || action.disabled}\n onClick={() => action.onClick(selectedKey)}\n size='sm'\n >\n {action.label}\n </DropdownMenu.Item>\n ))}\n </Fragment>\n );\n }\n\n return (\n <Fragment key={`${entry.label}-${entryIndex}`}>\n {previousEntry && isActionGroup(previousEntry) && <DropdownMenu.Divider />}\n <DropdownMenu.Item\n {...entry}\n disabled={disabled || entry.disabled}\n onClick={() => entry.onClick(selectedKey)}\n size='sm'\n >\n {entry.label}\n </DropdownMenu.Item>\n </Fragment>\n );\n })}\n </DropdownMenu>\n )}\n {(onAdd || createNewRow) && !addDropdownConfig && addButton}\n {addDropdownConfig && (\n <DropdownMenu trigger={addButton} portal>\n {addDropdownConfig.options.map((option) => (\n <DropdownMenu.Item\n key={option.value}\n {...option}\n onClick={() => addDropdownConfig.onSelection(option.value)}\n size='sm'\n >\n {option.label}\n </DropdownMenu.Item>\n ))}\n </DropdownMenu>\n )}\n </>\n )\n }\n >\n <TableBox\n aria-label={`${label} table`}\n // We have to control the keys so we can power the `rightActions`\n selectedKey={selectedKey}\n onSelectionChange={(key) => {\n onSelectionChange?.(key);\n setSelectedKey(key);\n }}\n selectionMode={selectionMode}\n newRowId={newRowId}\n onCreateNewRow={createNewRow ? handleCreateNewRow : undefined}\n emptyText={emptyText}\n disabled={disabled}\n {...props}\n >\n {children}\n </TableBox>\n </FormField>\n );\n};\n\n// Attach subcomponents to TableBoxField\nTableBoxField.Row = TableBox.Row;\nTableBoxField.Cell = TableBox.Cell;\n\nexport default TableBoxField;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqFA,MAAa,YAAY,WAA2C,SAAS,UAC3E,EACE,OACA,UACA,YACA,aACA,WACA,YACA,aACA,cACA,YACA,aAAa,iBACb,uBACA,cACA,GAAG,SAEL,KACA;CACA,MAAM,EAAE,aAAa,yBAAyB,cAAc;CAC5D,MAAM,cAAc,mBAAmB;CAEvC,MAAM,eAAe,QACnB,oBAAC,WAAD;EAAW,SAAS,eAAe,aAAa,aAAa,KAAA;EAAW,GAAI;YACzE;EACS,CAAA,GACV;AAEJ,QACE,qBAAC,aAAD;EACE,UAAU,CAAC,CAAC;EACZ,YAAY,CAAC,CAAC;EACT;EACQ;EACb,iBAAiB,CAAC,CAAC;EACI;EACvB,GAAI;YAPN;GASG,eACC,qBAAC,QAAD;IAAQ,SAAQ;IAAgB,OAAM;cAAtC,CACG,cACD,oBAAC,QAAD;KAAQ,SAAS,QAAQ;eAAK;KAAsB,CAAA,CAC7C;QAET;GAEF,oBAAC,oBAAD,EAAqB,UAA8B,CAAA;GAClD,CAAC,eAAe,cAAc,oBAAC,YAAD;IAAY,GAAI;cAAc;IAAwB,CAAA;GACpF,CAAC,eAAe,eAAe,oBAAC,aAAD;IAAa,GAAI;cAAe;IAA0B,CAAA;GACzF,CAAC,eAAe,aAAa,oBAAC,WAAD;IAAW,GAAI;cAAa;IAAsB,CAAA;GACpE;;EAEhB;;;;;;;AChGF,MAAa,0BACX,UAIG;CACH,MAAM,EACJ,OACA,SACA,YACA,WACA,aACA,YACA,aACA,cACA,YACA,aACA,uBACA,cACA,GAAG,eACD;AAEJ,QAAO;EACL,gBAAgB;GACd;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD;EACD;EACD;;AAK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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
+ {"version":3,"file":"FormField-oBKH25qf.mjs","names":["Input","TextArea","DropdownMenu","DropdownMenu"],"sources":["../components/FormField/FormField.tsx","../components/FormField/inputFields.tsx","../components/FormField/CheckboxGroupField.tsx","../components/FormField/ListBoxField.tsx","../components/FormField/TableBoxField.tsx"],"sourcesContent":["import { type ComponentPropsWithRef, forwardRef, type ReactElement, type ReactNode } from 'react';\n\nimport { Spacing } from '@persona/design-tokens';\nimport useFormGroup from 'design-system/components/ConfigFormGroup/useFormGroup';\nimport FormControl, {\n ErrorText,\n type FormControlProps,\n FormInputContainer,\n FormLabel,\n HelperText,\n WarningText,\n} from 'design-system/components/FormControl';\nimport { HStack } from 'design-system/components/Stack';\n\nexport interface FormFieldBaseProps {\n /**\n * Renders `<Label>` above input\n */\n label?: ReactNode;\n\n /**\n * ID of the input element. Providing this will automatically link the label to the input.\n */\n inputId?: string;\n\n /**\n * Renders `<HelperText>` below input\n */\n helperText?: ReactNode;\n\n /**\n * Renders `<ErrorText>` below input and helper text.\n */\n errorText?: ReactNode;\n\n /**\n * Renders `<WarningText>` below input and helper text.\n */\n warningText?: ReactNode;\n\n /**\n * Should be an input of some sort\n */\n children?: ReactElement;\n\n labelProps?: ComponentPropsWithRef<typeof FormLabel>;\n helperProps?: ComponentPropsWithRef<typeof HelperText>;\n warningProps?: ComponentPropsWithRef<typeof WarningText>;\n errorProps?: ComponentPropsWithRef<typeof ErrorText>;\n\n /**\n * Whether to render the form field as a config field.\n * This will render the helper text as a tooltip.\n */\n configField?: boolean;\n\n /**\n * Override the width of the input area when `configField` is true.\n * Accepts any valid CSS width value (e.g. `'33%'`, `'66.67%'`).\n * Defaults to `'50%'`.\n */\n configFieldInputWidth?: string;\n\n /**\n * Renders actions to the right of the label.\n */\n rightActions?: ReactNode;\n}\n\nexport interface FormFieldProps extends Omit<FormControlProps, 'children'>, FormFieldBaseProps {}\n\n/**\n * > **Please do not use in production! This component is subject to API and style changes.**\n *\n * Helper components with preset slots for label, input, and helper texts.\n * Fully composed components with different form input types are available.\n * This is the recommended way to implement form elements.\n * You can use `<FormControl>` if you require more flexibility.\n *\n * ## Usage\n *\n * ```tsx\n * import FormField from 'design-system/components/FormField';\n * ```\n */\nexport const FormField = forwardRef<HTMLDivElement, FormFieldProps>(function FormField(\n {\n label,\n children,\n helperText,\n warningText,\n errorText,\n labelProps,\n helperProps,\n warningProps,\n errorProps,\n configField: configFieldProp,\n configFieldInputWidth,\n rightActions,\n ...props\n }: FormFieldProps,\n ref,\n) {\n const { configField: configFieldFormGroup } = useFormGroup();\n const configField = configFieldProp ?? configFieldFormGroup;\n\n const labelElement = label ? (\n <FormLabel tooltip={configField && helperText ? helperText : undefined} {...labelProps}>\n {label}\n </FormLabel>\n ) : null;\n\n return (\n <FormControl\n hasError={!!errorText}\n hasWarning={!!warningText}\n ref={ref}\n configField={configField}\n hasRightActions={!!rightActions}\n configFieldInputWidth={configFieldInputWidth}\n {...props}\n >\n {rightActions ? (\n <HStack justify='space-between' align='center'>\n {labelElement}\n <HStack spacing={Spacing[1]}>{rightActions}</HStack>\n </HStack>\n ) : (\n labelElement\n )}\n <FormInputContainer>{children}</FormInputContainer>\n {!configField && helperText && <HelperText {...helperProps}>{helperText}</HelperText>}\n {!configField && warningText && <WarningText {...warningProps}>{warningText}</WarningText>}\n {!configField && errorText && <ErrorText {...errorProps}>{errorText}</ErrorText>}\n </FormControl>\n );\n});\n\nexport default FormField;\n","import { uniqueId } from 'lodash-es';\nimport { forwardRef, useMemo } from 'react';\n\nimport Checkbox, { type CheckboxProps } from 'design-system/components/Checkbox';\nimport Combobox from 'design-system/components/Combobox';\nimport type { ComboboxMultiSelectProps } from 'design-system/components/Combobox/ComboboxMultiSelect';\nimport type { ComboboxSingleSelectProps } from 'design-system/components/Combobox/ComboboxSingleSelect';\nimport FormField, { type FormFieldBaseProps } from 'design-system/components/FormField/FormField';\nimport Input, { type InputProps } from 'design-system/components/Input';\nimport RadioGroup, { type RadioGroupProps } from 'design-system/components/RadioGroup';\nimport SegmentedControl, {\n type SegmentedControlProps,\n} from 'design-system/components/SegmentedControl';\nimport Select, { type SelectProps } from 'design-system/components/Select';\nimport TextArea, { type TextAreaProps } from 'design-system/components/TextArea';\nimport Toggle, { type ToggleProps } from 'design-system/components/Toggle';\n\nexport type ImplementsFormField = Omit<FormFieldBaseProps, 'children'>;\n\ntype ExtractFormFieldProps<T extends ImplementsFormField> = Pick<\n T,\n | 'label'\n | 'inputId'\n | 'helperText'\n | 'errorText'\n | 'warningText'\n | 'labelProps'\n | 'helperProps'\n | 'warningProps'\n | 'errorProps'\n | 'configField'\n | 'configFieldInputWidth'\n | 'rightActions'\n>;\ntype OmitFormFieldProps<T extends ImplementsFormField> = Omit<T, keyof ExtractFormFieldProps<T>>;\n\n/**\n * Helper to split out props that are sent to the FormField component from props sent\n * to the underlying input component.\n */\nexport const splitOutFormFieldProps = <T extends ImplementsFormField>(\n props: T,\n): {\n formFieldProps: ExtractFormFieldProps<T>;\n inputProps: OmitFormFieldProps<T>;\n} => {\n const {\n label,\n inputId,\n helperText,\n errorText,\n warningText,\n labelProps,\n helperProps,\n warningProps,\n errorProps,\n configField,\n configFieldInputWidth,\n rightActions,\n ...inputProps\n } = props;\n\n return {\n formFieldProps: {\n label,\n inputId,\n helperText,\n errorText,\n warningText,\n labelProps,\n helperProps,\n warningProps,\n errorProps,\n configField,\n configFieldInputWidth,\n rightActions,\n },\n inputProps,\n };\n};\n\nexport interface TextFieldProps extends ImplementsFormField, InputProps {}\n\nexport const TextField = forwardRef<HTMLInputElement, TextFieldProps>(\n function TextField(props, ref) {\n const { formFieldProps, inputProps } = splitOutFormFieldProps(props);\n const { id, ...rest } = inputProps;\n\n return (\n <FormField\n {...formFieldProps}\n labelProps={{ size: props.size, ...formFieldProps.labelProps }}\n inputId={formFieldProps.inputId ?? id}\n >\n <Input {...rest} ref={ref} />\n </FormField>\n );\n },\n);\n\nexport interface TextAreaFieldProps extends ImplementsFormField, TextAreaProps {}\n\nexport const TextAreaField = forwardRef<HTMLTextAreaElement, TextAreaFieldProps>(\n function TextAreaField(props, ref) {\n const { formFieldProps, inputProps } = splitOutFormFieldProps(props);\n const { id, ...rest } = inputProps;\n\n return (\n <FormField\n {...formFieldProps}\n labelProps={{ size: props.size, ...formFieldProps.labelProps }}\n inputId={formFieldProps.inputId ?? id}\n >\n <TextArea {...rest} ref={ref} />\n </FormField>\n );\n },\n);\n\nexport interface SelectFieldProps extends ImplementsFormField, SelectProps {}\n\nexport const SelectField = ({ 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 children,\n ...props\n}: RadioGroupFieldProps) => {\n return (\n <FormField\n label={label}\n helperText={helperText}\n warningText={warningText}\n errorText={errorText}\n >\n <RadioGroup {...props}>{children}</RadioGroup>\n </FormField>\n );\n};\n\nexport interface CheckboxFieldProps extends ImplementsFormField, CheckboxProps {\n checkboxLabel?: CheckboxProps['label'];\n}\n\nexport const CheckboxField = ({\n label,\n helperText,\n errorText,\n warningText,\n checkboxLabel,\n configField,\n labelProps,\n ...props\n}: CheckboxFieldProps) => {\n return (\n <FormField\n label={label}\n helperText={helperText}\n warningText={warningText}\n errorText={errorText}\n configField={configField}\n labelProps={labelProps}\n >\n <Checkbox label={checkboxLabel} {...props} />\n </FormField>\n );\n};\n\nexport interface ToggleFieldProps extends ImplementsFormField, ToggleProps {}\n\nexport const ToggleField = forwardRef<HTMLDivElement, ToggleFieldProps>(\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 { label, helperText, errorText, warningText, configField, children, labelProps, ...props },\n ref,\n ) {\n return (\n <FormField\n label={label}\n helperText={helperText}\n warningText={warningText}\n errorText={errorText}\n configField={configField}\n labelProps={labelProps}\n >\n <SegmentedControl fullWidth {...props} ref={ref}>\n {children}\n </SegmentedControl>\n </FormField>\n );\n },\n);\n\nexport type ComboboxSingleSelectFieldProps<T = string> = ImplementsFormField &\n ComboboxSingleSelectProps<T>;\nexport type ComboboxMultiSelectFieldProps<T = string> = ImplementsFormField &\n ComboboxMultiSelectProps<T>;\n\nexport const ComboboxField = (\n 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 'design-system/components/Checkbox';\nimport type Checkbox from 'design-system/components/Checkbox';\nimport { FormControlContext } from 'design-system/components/FormControl/useFormField';\nimport FormField from 'design-system/components/FormField/FormField';\nimport type { ImplementsFormField } from 'design-system/components/FormField/inputFields';\n\n/* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\nconst CheckboxGroupContext = createContext<CheckboxGroupState>(null);\n\n/** Preserves the parent FormControl context (disabled, hasError, etc.) but clears\n * inputId so each Checkbox inside the group generates its own unique id. */\nconst ClearGroupInputId = ({ children }: { children: ReactNode }) => {\n const parentContext = useContext(FormControlContext);\n return (\n <FormControlContext.Provider value={{ ...parentContext, inputId: undefined }}>\n {children}\n </FormControlContext.Provider>\n );\n};\n\ninterface CheckboxGroupItemProps {\n children: ReactElement<ComponentPropsWithRef<typeof Checkbox>>;\n}\n\nconst CheckboxGroupItem = (props: CheckboxGroupItemProps) => {\n const { children } = props;\n const checkboxProps = children.props;\n\n const state = useContext(CheckboxGroupContext);\n const ref = useRef();\n const { inputProps } = useCheckboxGroupItem(\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n {\n ...checkboxProps,\n onChange: undefined,\n isDisabled: checkboxProps.disabled,\n isReadOnly: checkboxProps.readOnly,\n isRequired: checkboxProps.required,\n isIndeterminate: checkboxProps.indeterminate,\n value: String(children.props.value),\n 'aria-label': innerText(checkboxProps.label),\n },\n state,\n ref,\n );\n\n return cloneElement(\n children,\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n mergeProps(inputProps, {\n onChange: checkboxProps.onChange,\n disabled: state.isDisabled || checkboxProps.disabled,\n checked: state.isSelected(String(inputProps.value)),\n ref,\n } as ComponentPropsWithRef<typeof Checkbox>),\n );\n};\n\ninterface CheckboxGroupFieldProps\n extends\n Omit<ImplementsFormField, 'configField'>,\n Omit<\n AriaCheckboxGroupProps,\n 'description' | 'disabled' | 'isReadOnly' | 'isRequired' | 'errorMessage'\n > {\n children?: ReactElement<CheckboxProps>[];\n disabled?: boolean;\n readOnly?: boolean;\n required?: boolean;\n}\n\nconst CheckboxGroupField = ({\n children,\n name,\n onChange,\n disabled,\n readOnly,\n required,\n ...props\n}: CheckboxGroupFieldProps) => {\n const reactAriaProps = {\n ...props,\n description: props.helperText,\n errorMessage: props.errorText,\n onChange,\n name,\n isDisabled: disabled,\n isReadOnly: readOnly,\n isRequired: required,\n };\n const state = useCheckboxGroupState(reactAriaProps);\n const { groupProps, labelProps, descriptionProps, errorMessageProps } = useCheckboxGroup(\n reactAriaProps,\n state,\n );\n\n return (\n <FormField\n labelProps={labelProps}\n helperProps={descriptionProps}\n errorProps={errorMessageProps}\n disabled={disabled}\n {...groupProps}\n {...props}\n >\n <ClearGroupInputId>\n <CheckboxGroupContext.Provider value={state}>\n {Children.map(children, (checkbox) => (\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n <CheckboxGroupItem>{checkbox}</CheckboxGroupItem>\n ))}\n </CheckboxGroupContext.Provider>\n </ClearGroupInputId>\n </FormField>\n );\n};\n\nexport default CheckboxGroupField;\n","import { type ReactNode, useState } from 'react';\n\nimport { MoreIcon, PlusIcon } from '@persona/icons';\nimport { IconButton } from 'design-system/components/Button';\nimport useFormGroup from 'design-system/components/ConfigFormGroup/useFormGroup';\nimport DropdownMenu from 'design-system/components/DropdownMenu';\nimport FormField from 'design-system/components/FormField/FormField';\nimport type { ImplementsFormField } from 'design-system/components/FormField/inputFields';\nimport ListBox, { type ListBoxProps } from 'design-system/components/ListBox';\nimport type { MenuItemProps } from 'design-system/components/Menu';\n\ninterface ListBoxFieldAction extends Omit<MenuItemProps, 'children'> {\n label: string;\n onClick: (selectedKeys: ListBoxProps<any>['selectedKeys']) => void;\n}\n\ninterface AddDropdownConfig {\n options: ({ label: ReactNode; value: string } & Omit<MenuItemProps, 'children'>)[];\n onSelection: (value: string) => void;\n}\n\ninterface ListBoxFieldProps<T extends object> extends ImplementsFormField, ListBoxProps<T> {\n actions?: ListBoxFieldAction[];\n addDropdownConfig?: AddDropdownConfig;\n /** 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 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 configField={configField}\n rightActions={\n configField && (\n <>\n {menuActions.length > 0 && (\n <DropdownMenu\n trigger={\n <IconButton aria-label='Actions' size='sm'>\n <MoreIcon />\n </IconButton>\n }\n portal\n >\n {menuActions.map((action) => (\n <DropdownMenu.Item\n key={action.label}\n {...action}\n onClick={() => action.onClick(selectedKeys)}\n size={effectiveSize}\n >\n {action.label}\n </DropdownMenu.Item>\n ))}\n </DropdownMenu>\n )}\n {onAdd && !addDropdownConfig && addButton}\n {addDropdownConfig && (\n <DropdownMenu trigger={addButton} align='start' portal>\n {addDropdownConfig.options.map((option) => (\n <DropdownMenu.Item\n key={option.value}\n {...option}\n onClick={() => addDropdownConfig.onSelection(option.value)}\n size={effectiveSize}\n >\n {option.label}\n </DropdownMenu.Item>\n ))}\n </DropdownMenu>\n )}\n </>\n )\n }\n >\n <ListBox\n id={inputId}\n fullWidth={configField}\n size={effectiveSize}\n deleteDisabled={deleteDisabled}\n // We have to control the keys so we can power the `rightActions`\n selectedKeys={selectedKeys}\n onSelectionChange={(keys) => {\n onSelectionChange?.(keys);\n setSelectedKeys(keys);\n }}\n {...props}\n />\n </FormField>\n );\n};\n\nexport default ListBoxField;\n","import { Fragment, type MouseEvent, type ReactNode, useState } from 'react';\n\nimport { IconButton } from '@persona/design-system/components/Button';\nimport { useFormGroup } from '@persona/design-system/components/ConfigFormGroup';\nimport DropdownMenu from '@persona/design-system/components/DropdownMenu';\nimport type { FormLabelProps } from '@persona/design-system/components/FormControl';\nimport type { MenuItemProps } from '@persona/design-system/components/Menu';\nimport TableBox, { type TableBoxProps } from '@persona/design-system/components/TableBox';\nimport { MoreIcon, PlusIcon } from '@persona/icons';\n\nimport FormField from './FormField';\nimport type { ImplementsFormField } from './inputFields';\n\nexport interface TableBoxFieldAction extends Omit<MenuItemProps, 'children'> {\n label: string;\n onClick: (selectedKey: TableBoxProps['selectedKey']) => void;\n}\n\nexport interface TableBoxFieldActionGroup {\n type: 'group';\n heading: string;\n actions: TableBoxFieldAction[];\n}\n\nexport type TableBoxFieldActionEntry = TableBoxFieldAction | TableBoxFieldActionGroup;\n\n/** Aria-label on TableBoxField's + button. Consumers that style or detect that\n * button (e.g. popover toggle guards) should import this rather than redefining it. */\nexport const TABLE_BOX_FIELD_ADD_BUTTON_ARIA_LABEL = 'Add item to table';\n\nconst isActionGroup = (action: TableBoxFieldActionEntry): action is TableBoxFieldActionGroup =>\n 'type' in action && action.type === 'group';\n\ninterface AddDropdownConfig {\n options: Array<{ label: string; value: string }>;\n onSelection: (value: string) => void;\n}\n\ninterface TableBoxFieldProps<T extends object = object>\n extends ImplementsFormField, Omit<TableBoxProps<T>, 'aria-label' | 'onCreateNewRow'> {\n onAdd?: (e: MouseEvent<HTMLButtonElement>) => void;\n onDelete?: (selectedKey: string | null) => void;\n deleteDisabled?: boolean;\n /** Actions and labeled action groups rendered in order. Empty groups are omitted. */\n actions?: TableBoxFieldActionEntry[];\n addDropdownConfig?: AddDropdownConfig;\n\n /**\n * Callback to create a new row and add it to the rows array\n * Should return the id of the newly created row\n */\n createNewRow?: () => string;\n children?: ReactNode;\n}\n\nconst TableBoxField = <T extends object = object>({\n label,\n helperText,\n errorText,\n warningText,\n labelProps: labelPropsProp,\n helperProps,\n errorProps,\n warningProps,\n inputId,\n onAdd,\n onDelete,\n deleteDisabled,\n configField: configFieldProp = true,\n actions = [],\n addDropdownConfig,\n selectedKey: selectedKeyProp,\n onSelectionChange,\n defaultSelectedKey,\n selectionMode,\n disabled,\n createNewRow,\n children,\n emptyText = 'No data',\n ...props\n}: TableBoxFieldProps<T>) => {\n const { configField } = useFormGroup({ configField: configFieldProp });\n const menuActions: TableBoxFieldActionEntry[] = [...actions];\n const [selectedKeyState, setSelectedKey] = useState(defaultSelectedKey);\n const selectedKey = selectedKeyProp ?? selectedKeyState;\n const [newRowId, setNewRowId] = useState<string | null>(null);\n const labelProps: FormLabelProps = { size: 'sm', ...labelPropsProp };\n\n const handleCreateNewRow = () => {\n if (createNewRow) {\n setNewRowId(createNewRow());\n }\n };\n\n // Handle add button click\n const handleAddClick = (e: MouseEvent<HTMLButtonElement>) => {\n if (createNewRow) {\n handleCreateNewRow();\n } else if (onAdd) {\n onAdd(e);\n }\n };\n\n if (onDelete) {\n menuActions.unshift({\n label: 'Delete',\n onClick: () => selectedKey && onDelete(selectedKey),\n disabled: deleteDisabled || selectedKey == null,\n });\n }\n const visibleMenuActions = menuActions.filter(\n (action) => !isActionGroup(action) || action.actions.length > 0,\n );\n\n const addButton = (\n <IconButton\n size='sm'\n onClick={handleAddClick}\n aria-label={TABLE_BOX_FIELD_ADD_BUTTON_ARIA_LABEL}\n disabled={disabled}\n >\n <PlusIcon />\n </IconButton>\n );\n\n return (\n <FormField\n label={label}\n helperText={helperText}\n errorText={errorText}\n warningText={warningText}\n labelProps={labelProps}\n helperProps={helperProps}\n errorProps={errorProps}\n warningProps={warningProps}\n inputId={inputId}\n rightActions={\n configField && (\n <>\n {visibleMenuActions.length > 0 && (\n <DropdownMenu\n trigger={\n <IconButton aria-label='Actions' size='sm' disabled={disabled}>\n <MoreIcon />\n </IconButton>\n }\n portal\n >\n {visibleMenuActions.map((entry, entryIndex) => {\n const previousEntry = visibleMenuActions[entryIndex - 1];\n if (isActionGroup(entry)) {\n return (\n <Fragment key={`${entry.heading}-${entryIndex}`}>\n {entryIndex > 0 && <DropdownMenu.Divider />}\n <DropdownMenu.Heading size='sm'>{entry.heading}</DropdownMenu.Heading>\n {entry.actions.map((action) => (\n <DropdownMenu.Item\n key={action.label}\n {...action}\n disabled={disabled || action.disabled}\n onClick={() => action.onClick(selectedKey)}\n size='sm'\n >\n {action.label}\n </DropdownMenu.Item>\n ))}\n </Fragment>\n );\n }\n\n return (\n <Fragment key={`${entry.label}-${entryIndex}`}>\n {previousEntry && isActionGroup(previousEntry) && <DropdownMenu.Divider />}\n <DropdownMenu.Item\n {...entry}\n disabled={disabled || entry.disabled}\n onClick={() => entry.onClick(selectedKey)}\n size='sm'\n >\n {entry.label}\n </DropdownMenu.Item>\n </Fragment>\n );\n })}\n </DropdownMenu>\n )}\n {(onAdd || createNewRow) && !addDropdownConfig && addButton}\n {addDropdownConfig && (\n <DropdownMenu trigger={addButton} portal>\n {addDropdownConfig.options.map((option) => (\n <DropdownMenu.Item\n key={option.value}\n {...option}\n onClick={() => addDropdownConfig.onSelection(option.value)}\n size='sm'\n >\n {option.label}\n </DropdownMenu.Item>\n ))}\n </DropdownMenu>\n )}\n </>\n )\n }\n >\n <TableBox\n aria-label={`${label} table`}\n // We have to control the keys so we can power the `rightActions`\n selectedKey={selectedKey}\n onSelectionChange={(key) => {\n onSelectionChange?.(key);\n setSelectedKey(key);\n }}\n selectionMode={selectionMode}\n newRowId={newRowId}\n onCreateNewRow={createNewRow ? handleCreateNewRow : undefined}\n emptyText={emptyText}\n disabled={disabled}\n {...props}\n >\n {children}\n </TableBox>\n </FormField>\n );\n};\n\n// Attach subcomponents to TableBoxField\nTableBoxField.Row = TableBox.Row;\nTableBoxField.Cell = TableBox.Cell;\n\nexport default TableBoxField;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqFA,MAAa,YAAY,WAA2C,SAAS,UAC3E,EACE,OACA,UACA,YACA,aACA,WACA,YACA,aACA,cACA,YACA,aAAa,iBACb,uBACA,cACA,GAAG,SAEL,KACA;CACA,MAAM,EAAE,aAAa,yBAAyB,cAAc;CAC5D,MAAM,cAAc,mBAAmB;CAEvC,MAAM,eAAe,QACnB,oBAAC,WAAD;EAAW,SAAS,eAAe,aAAa,aAAa,KAAA;EAAW,GAAI;YACzE;EACS,CAAA,GACV;AAEJ,QACE,qBAAC,aAAD;EACE,UAAU,CAAC,CAAC;EACZ,YAAY,CAAC,CAAC;EACT;EACQ;EACb,iBAAiB,CAAC,CAAC;EACI;EACvB,GAAI;YAPN;GASG,eACC,qBAAC,QAAD;IAAQ,SAAQ;IAAgB,OAAM;cAAtC,CACG,cACD,oBAAC,QAAD;KAAQ,SAAS,QAAQ;eAAK;KAAsB,CAAA,CAC7C;QAET;GAEF,oBAAC,oBAAD,EAAqB,UAA8B,CAAA;GAClD,CAAC,eAAe,cAAc,oBAAC,YAAD;IAAY,GAAI;cAA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G,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-0p4y0sS5.mjs";
1
+ import { n as FormFieldBaseProps, r as FormFieldProps, t as FormField } from "./FormField-BcaFdmo5.mjs";
2
2
  export { FormField, FormField as default, FormFieldBaseProps, FormFieldProps };
@@ -0,0 +1,38 @@
1
+ import { ComponentPropsWithoutRef, ReactNode } from "react";
2
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
3
+
4
+ //#region components/Grid/Grid.d.ts
5
+ declare const GRID_BREAKPOINTS: {
6
+ readonly sm: 768;
7
+ readonly md: 1024;
8
+ readonly lg: 1408;
9
+ };
10
+ interface GridProps extends ComponentPropsWithoutRef<'div'> {
11
+ /**
12
+ * Selects the grid width behavior at the large breakpoint. `fixed` centers the grid at a
13
+ * maximum width of 1408px, while `fluid` fills the available width.
14
+ *
15
+ * Breakpoints:
16
+ * - ≤767px: 12 columns, 24px margins, 12px gutters, and a 767px minimum width.
17
+ * - 768–1023px: 12 columns, 24px margins, 12px gutters, and 100% width.
18
+ * - 1024–1407px: 12 columns, 32px margins, 16px gutters, and 100% width.
19
+ * - ≥1408px: 12 columns, 32px margins, 16px gutters, and either fixed or fluid width.
20
+ */
21
+ mode: 'fixed' | 'fluid';
22
+ children: ReactNode;
23
+ }
24
+ /**
25
+ * Provides a 12-column CSS grid that measures its own width with a ResizeObserver for responsive
26
+ * horizontal margins and gutters. Vertical spacing is left to the consumer.
27
+ *
28
+ * The grid measures breakpoints against its own width rather than the viewport. Use `fixed` to
29
+ * center the grid at its large-screen maximum width, or `fluid` to keep it at 100% width.
30
+ */
31
+ declare const Grid: ({
32
+ mode,
33
+ children,
34
+ ...rest
35
+ }: GridProps) => _$react_jsx_runtime0.JSX.Element;
36
+ //#endregion
37
+ export { GRID_BREAKPOINTS, Grid, Grid as default, GridProps };
38
+ //# sourceMappingURL=Grid.d.mts.map
@@ -0,0 +1,17 @@
1
+ import { ComponentPropsWithoutRef, ReactNode } from "react";
2
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
3
+
4
+ //#region components/Grid/GridItem.d.ts
5
+ type GridSpan = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
6
+ interface GridItemProps extends ComponentPropsWithoutRef<'div'> {
7
+ span: GridSpan;
8
+ children: ReactNode;
9
+ }
10
+ declare const GridItem: ({
11
+ span,
12
+ children,
13
+ ...rest
14
+ }: GridItemProps) => _$react_jsx_runtime0.JSX.Element;
15
+ //#endregion
16
+ export { GridItem, GridItem as default, GridItemProps, GridSpan };
17
+ //# sourceMappingURL=GridItem.d.mts.map
@@ -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-gDUTQgWj.d.mts.map
35
+ //# sourceMappingURL=Header-BjSoTEX_.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-gDUTQgWj.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-BjSoTEX_.mjs";
2
2
  export { ActionsContainer, HeaderContainer, HeaderProps, Root, Title, TitleContainer, Header as default };
@@ -1,4 +1,4 @@
1
- import { i as TooltipWithIconProps } from "./Tooltip-DX-N-szt.mjs";
1
+ import { i as TooltipWithIconProps } from "./Tooltip-DabloV0o.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-CqhiRb5g.d.mts.map
20
+ //# sourceMappingURL=HelperTooltip-S20wVFCS.d.mts.map
@@ -1,2 +1,2 @@
1
- import { n as HelperTooltipProps, t as HelperTooltip } from "./HelperTooltip-CqhiRb5g.mjs";
1
+ import { n as HelperTooltipProps, t as HelperTooltip } from "./HelperTooltip-S20wVFCS.mjs";
2
2
  export { HelperTooltipProps, HelperTooltip as default };
@@ -5,7 +5,7 @@ import { t as useToggle } from "./useToggle-Bo3yd14Y.mjs";
5
5
  import { fadeIn } from "./variables/keyframes.mjs";
6
6
  import "./variables/transitions.mjs";
7
7
  import { n as Button } from "./IconButton-BgL3QUVO.mjs";
8
- import { s as Popover_default } from "./Popover-DNH8Jx1-.mjs";
8
+ import { s as Popover_default } from "./Popover-DlXyKYL5.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";
@@ -111,4 +111,4 @@ const HoverCopyableField = ({ copyValue, confirmationText = "Copied", onCopySucc
111
111
  //#endregion
112
112
  export { HoverCopyableField as t };
113
113
 
114
- //# sourceMappingURL=HoverCopyableField-HWshrU_1.mjs.map
114
+ //# sourceMappingURL=HoverCopyableField-GMXeF-3J.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"HoverCopyableField-HWshrU_1.mjs","names":["Card","Popover"],"sources":["../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';\nimport Button from 'design-system/components/Button';\nimport Card from 'design-system/components/Card';\nimport Popover from 'design-system/components/Popover';\nimport { Paragraph } from 'design-system/components/Text';\nimport useToggle from 'design-system/lib/useToggle';\nimport { fadeIn } from 'design-system/variables/keyframes';\nimport { TransitionDuration } from 'design-system/variables/transitions';\n\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 visibility: ${({ isActive }) => (isActive ? 'visible' : 'hidden')};\n animation: ${fadeIn} ${TransitionDuration.Medium} ease-in-out;\n svg {\n width: 14px;\n height: 14px;\n }\n`;\n\nconst StyledCard = styled(Card)`\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 4px;\n animation: ${fadeIn} ${TransitionDuration.Medium} ease-in-out;\n padding: 6px;\n margin: 0;\n`;\n\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 </C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;;CAGV,MAAM,aAAa,MAAqC;AACtD,IAAE,gBAAgB;AAClB,IAAE,iBAAiB;AACd,sBAAoB,YAAY,EAAE,CAAC;;AAG1C,QAAO,aAAa,QAAQ,UAAU,MAAM,CAAC,SAAS,IACpD,qBAAC,wBAAD;EAAwB,cAAc;EAAgB,cAAc;YAApE,CACG,UACD,qBAACC,iBAAD;GAAS,MAAM;aAAf,CACE,oBAACA,gBAAQ,QAAT;IAAgB,SAAA;cACd,oBAAC,YAAD;KACE,IAAG;KACH,UAAU,oBAAoB;KAC9B,SAAS;eAET,oBAAC,UAAD;MAAU,OAAO;MAAI,QAAQ;MAAM,CAAA;KACxB,CAAA;IACE,CAAA,EACjB,oBAACA,gBAAQ,SAAT;IAAiB,MAAK;IAAM,OAAM;IAAS,OAAO,EAAE,QAAQ,GAAG;cAC7D,oBAAC,YAAD;KAAY,UAAA;eACV,oBAAC,WAAD,EAAA,UAAY,kBAA6B,CAAA;KAC9B,CAAA;IACG,CAAA,CACV;KACa;MACvB"}
1
+ {"version":3,"file":"HoverCopyableField-GMXeF-3J.mjs","names":["Card","Popover"],"sources":["../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';\nimport Button from 'design-system/components/Button';\nimport Card from 'design-system/components/Card';\nimport Popover from 'design-system/components/Popover';\nimport { Paragraph } from 'design-system/components/Text';\nimport useToggle from 'design-system/lib/useToggle';\nimport { fadeIn } from 'design-system/variables/keyframes';\nimport { TransitionDuration } from 'design-system/variables/transitions';\n\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 visibility: ${({ isActive }) => (isActive ? 'visible' : 'hidden')};\n animation: ${fadeIn} ${TransitionDuration.Medium} ease-in-out;\n svg {\n width: 14px;\n height: 14px;\n }\n`;\n\nconst StyledCard = styled(Card)`\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 4px;\n animation: ${fadeIn} ${TransitionDuration.Medium} ease-in-out;\n padding: 6px;\n margin: 0;\n`;\n\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":";;;;;;;;;;;;AA8BA,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;iBACL,EAAE,eAAgB,WAAW,YAAY,SAAU;eACrD,OAAO,GAAA,QAA6B;;;;;;AAOnD,MAAM,aAAa,OAAOA,aAAK;;;;;eAKhB,OAAO,GAAA,QAA6B;;;;AAKnD,MAAM,sBAAsB,EAC1B,WACA,mBAAmB,UACnB,eACA,eAC6B;CAC7B,MAAM,CAAC,kBAAkB,EAAE,QAAQ,gBAAgB,SAAS,oBAAoB,UAAU,MAAM;CAChG,MAAM,CAAC,oBAAoB,EAAE,QAAQ,kBAAkB,SAAS,sBAC9D,UAAU,MAAM;CAElB,MAAM,sBAAsB,OAAO,WAAiD;AAClF,MAAI,aAAa,KACf;AAGF,MAAI,CAAC,MAD2B,gBAAgB,UAAU,CAExD;AAEF,MAAI,eAAe;AACjB,iBAAc;IAAE,MAAM;IAAW,GAAG;IAAQ,CAAC;AAC7C,mBAAgB;AAChB;;AAEF,oBAAkB;AAClB,mBAAiB;AACf,mBAAgB;AAChB,qBAAkB;KACjB,KAAK;;CAGV,MAAM,aAAa,MAAqC;AACtD,IAAE,gBAAgB;AAClB,IAAE,iBAAiB;AACd,sBAAoB,YAAY,EAAE,CAAC;;AAG1C,QAAO,aAAa,QAAQ,UAAU,MAAM,CAAC,SAAS,IACpD,qBAAC,wBAAD;EAAwB,cAAc;EAAgB,cAAc;YAApE,CACG,UACD,qBAACC,iBAAD;GAAS,MAAM;aAAf,CACE,oBAACA,gBAAQ,QAAT;IAAgB,SAAA;cACd,oBAAC,YAAD;KACE,IAAG;KACH,UAAU,oBAAoB;KAC9B,SAAS;eAET,oBAAC,UAAD;MAAU,OAAO;MAAI,QAAQ;MAAM,CAAA;KACxB,CAAA;IACE,CAAA,EACjB,oBAACA,gBAAQ,SAAT;IAAiB,MAAK;IAAM,OAAM;IAAS,OAAO,EAAE,QAAQ,GAAG;cAC7D,oBAAC,YAAD;KAAY,UAAA;eACV,oBAAC,WAAD,EAAA,UAAY,kBAA6B,CAAA;KAC9B,CAAA;IACG,CAAA,CACV;KACa;MACvB"}
@@ -1,4 +1,4 @@
1
- import { r as ButtonProps } from "./Button-CKzNTpPL.mjs";
1
+ import { r as ButtonProps } from "./Button-BrI1s2-r.mjs";
2
2
  import * as _$react from "react";
3
3
 
4
4
  //#region components/Button/IconButton.d.ts
@@ -21,4 +21,4 @@ interface IconButtonProps extends Omit<ButtonProps, 'width' | 'prefixIcon' | 'pr
21
21
  declare const IconButton: _$react.ForwardRefExoticComponent<Omit<IconButtonProps, "ref"> & _$react.RefAttributes<HTMLButtonElement>>;
22
22
  //#endregion
23
23
  export { IconButtonProps as n, IconButton as t };
24
- //# sourceMappingURL=IconButton-CLsHdYm7.d.mts.map
24
+ //# sourceMappingURL=IconButton-BpyOr8Ev.d.mts.map
@@ -1,2 +1,2 @@
1
- import { n as IconButtonProps, t as IconButton } from "./IconButton-CLsHdYm7.mjs";
1
+ import { n as IconButtonProps, t as IconButton } from "./IconButton-BpyOr8Ev.mjs";
2
2
  export { IconButtonProps, IconButton as default };
@@ -1,4 +1,4 @@
1
- import { i as TextAction } from "./Action-DL3kHI9Z.mjs";
1
+ import { i as TextAction } from "./Action-CcAyQpYN.mjs";
2
2
  import { ComponentPropsWithoutRef, MouseEvent, ReactNode } from "react";
3
3
  import * as _$react_jsx_runtime0 from "react/jsx-runtime";
4
4
 
@@ -1,4 +1,4 @@
1
- import { r as InlineEditConfig } from "./TableBoxCell-52g97gEg.mjs";
1
+ import { r as InlineEditConfig } from "./TableBoxCell-WXc57DwN.mjs";
2
2
  import { RefObject } from "react";
3
3
  import * as _$react_jsx_runtime0 from "react/jsx-runtime";
4
4
 
@@ -1,4 +1,4 @@
1
- import { r as InlineEditConfig } from "./TableBoxCell-52g97gEg.mjs";
1
+ import { r as InlineEditConfig } from "./TableBoxCell-WXc57DwN.mjs";
2
2
  import * as _$react_jsx_runtime0 from "react/jsx-runtime";
3
3
 
4
4
  //#region components/TableBox/InlineInput.d.ts
@@ -187,4 +187,4 @@ const InputGroup = forwardRef(function InputGroup({ size = "md", leftIcon, onCle
187
187
  //#endregion
188
188
  export { Input as n, InputGroup as r, ClearButton as t };
189
189
 
190
- //# sourceMappingURL=Input-DoB8YswA.mjs.map
190
+ //# sourceMappingURL=Input-BWlvBYB3.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Input-DoB8YswA.mjs","names":["SmallCircleXInverseIcon"],"sources":["../components/Input/Input.tsx"],"sourcesContent":["import {\n cloneElement,\n type ComponentPropsWithoutRef,\n type CSSProperties,\n forwardRef,\n type MouseEventHandler,\n type ReactElement,\n type ReactNode,\n useEffect,\n useRef,\n useState,\n} from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { BorderRadius, Color, Spacing } from '@persona/design-tokens';\nimport { CircleXInverseIcon } from '@persona/icons';\nimport { CircleXInverseIcon as SmallCircleXInverseIcon } from '@persona/icons/12px';\nimport Button, { type ButtonProps } from 'design-system/components/Button';\nimport useFormField, {\n FormControlContext,\n} from 'design-system/components/FormControl/useFormField';\nimport { Paragraph } from 'design-system/components/Text';\nimport { isHovered, isNotDisabled } from 'design-system/lib/pseudoClass';\nimport inputMixin, { type InputMixinProps, type InputSizes } from 'design-system/mixins/input';\n\nconst Container = styled.div`\n display: flex;\n position: relative;\n width: 100%;\n`;\n\nconst LeftIcon = styled.div<{ $size?: InputSizes }>`\n position: absolute;\n left: ${Spacing[2]};\n top: 50%;\n transform: translateY(-50%);\n margin: 0;\n font-size: 0px;\n color: ${Color.BorderIconSecondary};\n height: ${({ $size }) => ($size === 'sm' ? '12px' : '16px')};\n width: ${({ $size }) => ($size === 'sm' ? '12px' : '16px')};\n pointer-events: none;\n\n svg {\n height: 100%;\n width: 100%;\n }\n`;\n\nconst InputButtonContainer = styled.div<{ $size?: InputSizes }>`\n position: absolute;\n display: flex;\n gap: ${Spacing[2]};\n right: ${({ $size }) => ($size === 'sm' ? '3px' : Spacing[1])};\n top: 50%;\n transform: translateY(-50%);\n margin: 0;\n font-size: 0px;\n`;\n\nexport const ClearButton = styled(Button).attrs({\n width: 'icon',\n variant: 'basic',\n})`\n background-color: transparent;\n padding: 0;\n height: ${({ size }) => (size === 'sm' ? '18px' : '24px')};\n width: ${({ size }) => (size === 'sm' ? '18px' : '24px')};\n border-radius: ${BorderRadius.Md};\n color: ${Color.BorderIconSecondary};\n\n ${({ disabled }) =>\n disabled &&\n css`\n color: ${Color.BorderIconDisabled};\n `}\n\n &${isHovered}${isNotDisabled} {\n background-color: transparent;\n }\n\n svg {\n height: ${({ size }) => (size === 'sm' ? '12px' : '16px')};\n width: ${({ size }) => (size === 'sm' ? '12px' : '16px')};\n }\n`;\n\nconst SuffixTextContainer = styled.div<{ $size: InputSizes }>`\n position: absolute;\n right: ${Spacing[2]};\n top: ${({ $size }) => ($size === 'sm' ? '2px' : '6px')};\n`;\n\ninterface StyledInputProps extends InputMixinProps {\n $leftIcon?: ReactNode;\n $hasRightItem?: boolean;\n}\n\nexport interface InputProps\n extends Omit<ComponentPropsWithoutRef<'input'>, 'size'>, Omit<InputMixinProps, '$size'> {\n /**\n * Size of the input. If you need the HTML size attr, use inputSize.\n */\n size?: InputSizes;\n\n /**\n * `size` HTML attr on `<input>`\n */\n inputSize?: ComponentPropsWithoutRef<'input'>['size'];\n\n leftIcon?: StyledInputProps['$leftIcon'];\n hasRightItem?: boolean;\n}\n\nconst InputBase = styled.input<StyledInputProps>`\n ${inputMixin};\n line-height: 1;\n\n &::placeholder {\n color: ${({ theme }) => theme.color.text.secondary};\n }\n\n ${({ $size, $leftIcon, $hasRightItem }) => {\n let btnSpacing: string;\n switch ($size) {\n default:\n case 'md':\n btnSpacing = `calc(${Spacing[3]} + 16px + ${Spacing[1]})`;\n return css`\n padding-right: ${$hasRightItem ? btnSpacing : Spacing[3]};\n padding-left: ${$leftIcon ? btnSpacing : Spacing[3]};\n `;\n case 'sm':\n btnSpacing = `calc(${Spacing[2]} + 16px + ${Spacing[1]})`;\n return css`\n padding-right: ${$hasRightItem ? btnSpacing : Spacing[2]};\n padding-left: ${$leftIcon ? btnSpacing : Spacing[2]};\n `;\n }\n }}\n`;\n\nexport const Input = forwardRef<HTMLInputElement, InputProps>(function Input(\n { size, leftIcon, hasRightItem, id, hasWarning, hasError, disabled, maxLength, ...props },\n ref,\n) {\n const field = useFormField({ hasWarning, hasError, disabled, inputId: id, maxLength });\n\n return (\n <InputBase\n $size={size}\n $leftIcon={leftIcon}\n $hasRightItem={hasRightItem}\n ref={ref}\n id={field.inputId}\n aria-describedby={`${field.helperTextId}${field.hasWarning ? ` ${field.warningTextId}` : ''}`}\n aria-errormessage={field.hasError ? field.errorTextId : undefined}\n aria-invalid={field.hasError}\n hasWarning={field.hasWarning}\n hasError={field.hasError}\n disabled={field.disabled}\n maxLength={field.maxLength}\n {...props}\n size={props.inputSize}\n />\n );\n});\n\nexport interface InputGroupProps\n extends ComponentPropsWithoutRef<'div'>, Omit<InputMixinProps, '$size'> {\n /**\n * Input\n */\n children: ReactElement<InputProps>;\n\n /**\n * Size of the input. If you need the HTML size attr, use inputSize.\n */\n size?: InputSizes;\n\n /**\n * Icon to render to the left of the input field.\n *\n * Import icon from `@persona/icons`. Use 24px for `lg` input size.\n */\n leftIcon?: ReactNode;\n\n /**\n * Renders clear button to the right and calls function upon click.\n */\n onClear?: MouseEventHandler<HTMLButtonElement>;\n\n /**\n * Button to be rendered to the right of the input\n */\n rightButton?: ReactElement<ButtonProps>;\n\n /**\n * Disabled prop will be passed down to `<Input>`\n */\n disabled?: boolean;\n\n /**\n * Suffix text to be shown to the right of the input (inside the input field)\n */\n suffix?: string;\n}\n\nexport const InputGroup = forwardRef<HTMLDivElement, InputGroupProps>(function InputGroup(\n {\n size = 'md',\n leftIcon,\n onClear,\n rightButton,\n children,\n disabled,\n hasWarning,\n hasError,\n suffix,\n ...props\n },\n ref,\n) {\n const field = useFormField({ hasWarning, hasError, disabled });\n const inputButtonContainerRef = useRef<HTMLDivElement>();\n const [inputPaddingRight, setInputPaddingRight] = useState<string | null>(null);\n\n const suffixContainerRef = useRef<HTMLDivElement | null>(null);\n const [suffixPaddingRight, setSuffixPaddingRight] = useState<string | null>(null);\n\n useEffect(() => {\n // We only need to calculate padding in presence of the right button\n if (rightButton && inputButtonContainerRef.current) {\n setInputPaddingRight(`${12 + inputButtonContainerRef.current.offsetWidth + 4}px`);\n }\n }, [setInputPaddingRight]);\n\n useEffect(() => {\n if (suffix && suffixContainerRef.current) {\n // 12px is 8px padding to the right, plus the 4px gap between the suffix and the input.\n setSuffixPaddingRight(`${12 + suffixContainerRef.current.offsetWidth}px`);\n }\n }, [suffix, setSuffixPaddingRight]);\n\n const rightButtonStyles: CSSProperties =\n size === 'sm'\n ? {\n height: '18px',\n }\n : {};\n\n return (\n <FormControlContext.Provider value={field}>\n <Container ref={ref} {...props}>\n {leftIcon && <LeftIcon $size={size}>{leftIcon}</LeftIcon>}\n {cloneElement(children, {\n size,\n leftIcon: leftIcon,\n ...(rightButton ? { rightButton } : {}),\n hasRightItem: onClear || suffix,\n style:\n inputPaddingRight || suffixPaddingRight\n ? {\n paddingRight: inputPaddingRight || suffixPaddingRight,\n }\n : {},\n })}\n\n {/* Renders only if there's a suffix and NO button */}\n {/* At some point, this should be moved so that it's not absolutely positioned, and\n these are both wrapped within an \"input\" container */}\n {suffix && !(onClear || rightButton) && (\n <SuffixTextContainer $size={size} ref={suffixContainerRef}>\n <Paragraph size={size}>{suffix}</Paragraph>\n </SuffixTextContainer>\n )}\n\n {(onClear || rightButton) && ( // TODO: Render only if value is present\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n <InputButtonContainer ref={inputButtonContainerRef} $size={size}>\n {onClear && (\n <ClearButton\n onClick={onClear}\n disabled={field.disabled}\n aria-label='Clear'\n size={size}\n >\n {size === 'sm' ? <SmallCircleXInverseIcon /> : <CircleXInverseIcon />}\n </ClearButton>\n )}\n {rightButton &&\n cloneElement(rightButton, {\n size: 'sm',\n width: rightButton.props.width || 'auto',\n style: rightButtonStyles,\n })}\n </InputButtonContainer>\n )}\n </Container>\n </FormControlContext.Provider>\n );\n});\n\nexport default Input;\n"],"mappings":";;;;;;;;;;;;AAyBA,MAAM,YAAY,OAAO,GAAG;;;;;AAM5B,MAAM,WAAW,OAAO,GAA2B;;UAEzC,QAAQ,GAAG;;;;;WAKV,MAAM,oBAAoB;aACxB,EAAE,YAAa,UAAU,OAA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AAI,cAAc,EAAE,aAAa,GAAG,EAAE;KACtC,cAAc,WAAW;KACzB,OACE,qBAAqB,qBACjB,EACE,cAAc,qBAAqB,oBACpC,GACD,EAAE;KACT,CAAC;IAKD,UAAU,EAAE,WAAW,gBACtB,oBAAC,qBAAD;KAAqB,OAAO;KAAM,KAAK;eACrC,oBAAC,WAAD;MAAiB;gBAAO;MAAmB,CAAA;KACvB,CAAA;KAGtB,WAAW,gBAEX,qBAAC,sBAAD;KAAsB,KAAK;KAAyB,OAAO;eAA3D,CACG,WACC,oBAAC,aAAD;MACE,SAAS;MACT,UAAU,MAAM;MAChB,cAAW;MACL;gBAEL,SAAS,OAAO,oBAACA,sBAAD,EAA2B,CAAA,GAAG,oBAAC,oBAAD,EAAsB,CAAA;MACzD,CAAA,EAEf,eACC,aAAa,aAAa;MACxB,MAAM;MACN,OAAO,YAAY,MAAM,SAAS;MAClC,OAAO;MACR,CAAC,CACiB;;IAEf;;EACgB,CAAA;EAEhC"}
1
+ {"version":3,"file":"Input-BWlvBYB3.mjs","names":["SmallCircleXInverseIcon"],"sources":["../components/Input/Input.tsx"],"sourcesContent":["import {\n cloneElement,\n type ComponentPropsWithoutRef,\n type CSSProperties,\n forwardRef,\n type MouseEventHandler,\n type ReactElement,\n type ReactNode,\n useEffect,\n useRef,\n useState,\n} from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { BorderRadius, Color, Spacing } from '@persona/design-tokens';\nimport { CircleXInverseIcon } from '@persona/icons';\nimport { CircleXInverseIcon as SmallCircleXInverseIcon } from '@persona/icons/12px';\nimport Button, { type ButtonProps } from 'design-system/components/Button';\nimport useFormField, {\n FormControlContext,\n} from 'design-system/components/FormControl/useFormField';\nimport { Paragraph } from 'design-system/components/Text';\nimport { isHovered, isNotDisabled } from 'design-system/lib/pseudoClass';\nimport inputMixin, { type InputMixinProps, type InputSizes } from 'design-system/mixins/input';\n\nconst Container = styled.div`\n display: flex;\n position: relative;\n width: 100%;\n`;\n\nconst LeftIcon = styled.div<{ $size?: InputSizes }>`\n position: absolute;\n left: ${Spacing[2]};\n top: 50%;\n transform: translateY(-50%);\n margin: 0;\n font-size: 0px;\n color: ${Color.BorderIconSecondary};\n height: ${({ $size }) => ($size === 'sm' ? '12px' : '16px')};\n width: ${({ $size }) => ($size === 'sm' ? '12px' : '16px')};\n pointer-events: none;\n\n svg {\n height: 100%;\n width: 100%;\n }\n`;\n\nconst InputButtonContainer = styled.div<{ $size?: InputSizes }>`\n position: absolute;\n display: flex;\n gap: ${Spacing[2]};\n right: ${({ $size }) => ($size === 'sm' ? '3px' : Spacing[1])};\n top: 50%;\n transform: translateY(-50%);\n margin: 0;\n font-size: 0px;\n`;\n\nexport const ClearButton = styled(Button).attrs({\n width: 'icon',\n variant: 'basic',\n})`\n background-color: transparent;\n padding: 0;\n height: ${({ size }) => (size === 'sm' ? '18px' : '24px')};\n width: ${({ size }) => (size === 'sm' ? '18px' : '24px')};\n border-radius: ${BorderRadius.Md};\n color: ${Color.BorderIconSecondary};\n\n ${({ disabled }) =>\n disabled &&\n css`\n color: ${Color.BorderIconDisabled};\n `}\n\n &${isHovered}${isNotDisabled} {\n background-color: transparent;\n }\n\n svg {\n height: ${({ size }) => (size === 'sm' ? '12px' : '16px')};\n width: ${({ size }) => (size === 'sm' ? '12px' : '16px')};\n }\n`;\n\nconst SuffixTextContainer = styled.div<{ $size: InputSizes }>`\n position: absolute;\n right: ${Spacing[2]};\n top: ${({ $size }) => ($size === 'sm' ? '2px' : '6px')};\n`;\n\ninterface StyledInputProps extends InputMixinProps {\n $leftIcon?: ReactNode;\n $hasRightItem?: boolean;\n}\n\nexport interface InputProps\n extends Omit<ComponentPropsWithoutRef<'input'>, 'size'>, Omit<InputMixinProps, '$size'> {\n /**\n * Size of the input. If you need the HTML size attr, use inputSize.\n */\n size?: InputSizes;\n\n /**\n * `size` HTML attr on `<input>`\n */\n inputSize?: ComponentPropsWithoutRef<'input'>['size'];\n\n leftIcon?: StyledInputProps['$leftIcon'];\n hasRightItem?: boolean;\n}\n\nconst InputBase = styled.input<StyledInputProps>`\n ${inputMixin};\n line-height: 1;\n\n &::placeholder {\n color: ${({ theme }) => theme.color.text.secondary};\n }\n\n ${({ $size, $leftIcon, $hasRightItem }) => {\n let btnSpacing: string;\n switch ($size) {\n default:\n case 'md':\n btnSpacing = `calc(${Spacing[3]} + 16px + ${Spacing[1]})`;\n return css`\n padding-right: ${$hasRightItem ? btnSpacing : Spacing[3]};\n padding-left: ${$leftIcon ? btnSpacing : Spacing[3]};\n `;\n case 'sm':\n btnSpacing = `calc(${Spacing[2]} + 16px + ${Spacing[1]})`;\n return css`\n padding-right: ${$hasRightItem ? btnSpacing : Spacing[2]};\n padding-left: ${$leftIcon ? btnSpacing : Spacing[2]};\n `;\n }\n }}\n`;\n\nexport const Input = forwardRef<HTMLInputElement, InputProps>(function Input(\n { size, leftIcon, hasRightItem, id, hasWarning, hasError, disabled, maxLength, ...props },\n ref,\n) {\n const field = useFormField({ hasWarning, hasError, disabled, inputId: id, maxLength });\n\n return (\n <InputBase\n $size={size}\n $leftIcon={leftIcon}\n $hasRightItem={hasRightItem}\n ref={ref}\n id={field.inputId}\n aria-describedby={`${field.helperTextId}${field.hasWarning ? ` ${field.warningTextId}` : ''}`}\n aria-errormessage={field.hasError ? field.errorTextId : undefined}\n aria-invalid={field.hasError}\n hasWarning={field.hasWarning}\n hasError={field.hasError}\n disabled={field.disabled}\n maxLength={field.maxLength}\n {...props}\n size={props.inputSize}\n />\n );\n});\n\nexport interface InputGroupProps\n extends ComponentPropsWithoutRef<'div'>, Omit<InputMixinProps, '$size'> {\n /**\n * Input\n */\n children: ReactElement<InputProps>;\n\n /**\n * Size of the input. If you need the HTML size attr, use inputSize.\n */\n size?: InputSizes;\n\n /**\n * Icon to render to the left of the input field.\n *\n * Import icon from `@persona/icons`. Use 24px for `lg` input size.\n */\n leftIcon?: ReactNode;\n\n /**\n * Renders clear button to the right and calls function upon click.\n */\n onClear?: MouseEventHandler<HTMLButtonElement>;\n\n /**\n * Button to be rendered to the right of the input\n */\n rightButton?: ReactElement<ButtonProps>;\n\n /**\n * Disabled prop will be passed down to `<Input>`\n */\n disabled?: boolean;\n\n /**\n * Suffix text to be shown to the right of the input (inside the input field)\n */\n suffix?: string;\n}\n\nexport const InputGroup = forwardRef<HTMLDivElement, InputGroupProps>(function InputGroup(\n {\n size = 'md',\n leftIcon,\n onClear,\n rightButton,\n children,\n disabled,\n hasWarning,\n hasError,\n suffix,\n ...props\n },\n ref,\n) {\n const field = useFormField({ hasWarning, hasError, disabled });\n const inputButtonContainerRef = useRef<HTMLDivElement>();\n const [inputPaddingRight, setInputPaddingRight] = useState<string | null>(null);\n\n const suffixContainerRef = useRef<HTMLDivElement | null>(null);\n const [suffixPaddingRight, setSuffixPaddingRight] = useState<string | null>(null);\n\n useEffect(() => {\n // We only need to calculate padding in presence of the right button\n if (rightButton && inputButtonContainerRef.current) {\n setInputPaddingRight(`${12 + inputButtonContainerRef.current.offsetWidth + 4}px`);\n }\n }, [setInputPaddingRight]);\n\n useEffect(() => {\n if (suffix && suffixContainerRef.current) {\n // 12px is 8px padding to the right, plus the 4px gap between the suffix and the input.\n setSuffixPaddingRight(`${12 + suffixContainerRef.current.offsetWidth}px`);\n }\n }, [suffix, setSuffixPaddingRight]);\n\n const rightButtonStyles: CSSProperties =\n size === 'sm'\n ? {\n height: '18px',\n }\n : {};\n\n return (\n <FormControlContext.Provider value={field}>\n <Container ref={ref} {...props}>\n {leftIcon && <LeftIcon $size={size}>{leftIcon}</LeftIcon>}\n {cloneElement(children, {\n size,\n leftIcon: leftIcon,\n ...(rightButton ? { rightButton } : {}),\n hasRightItem: onClear || suffix,\n style:\n inputPaddingRight || suffixPaddingRight\n ? {\n paddingRight: inputPaddingRight || suffixPaddingRight,\n }\n : {},\n })}\n\n {/* Renders only if there's a suffix and NO button */}\n {/* At some point, this should be moved so that it's not absolutely positioned, and\n these are both wrapped within an \"input\" container */}\n {suffix && !(onClear || rightButton) && (\n <SuffixTextContainer $size={size} ref={suffixContainerRef}>\n <Paragraph size={size}>{suffix}</Paragraph>\n </SuffixTextContainer>\n )}\n\n {(onClear || rightButton) && ( // TODO: Render only if value is present\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n <InputButtonContainer ref={inputButtonContainerRef} $size={size}>\n {onClear && (\n <ClearButton\n onClick={onClear}\n disabled={field.disabled}\n aria-label='Clear'\n size={size}\n >\n {size === 'sm' ? <SmallCircleXInverseIcon /> : <CircleXInverseIcon />}\n </ClearButton>\n )}\n {rightButton &&\n cloneElement(rightButton, {\n size: 'sm',\n width: rightButton.props.width || 'auto',\n style: rightButtonStyles,\n })}\n </InputButtonContainer>\n )}\n </Container>\n </FormControlContext.Provider>\n );\n});\n\nexport default Input;\n"],"mappings":";;;;;;;;;;;;AAyBA,MAAM,YAAY,OAAO,GAAG;;;;;AAM5B,MAAM,WAAW,OAAO,GAA2B;;UAEzC,QAAQ,GAAG;;;;;WAKV,MAAM,oBAAoB;aACxB,EAAE,YAAa,UAAU,OAAO,SAAS,OAAQ;YAClD,EAAE,YAAa,UAAU,OAAO,SAAS,OAAQ;;;;;;;;AAS7D,MAAM,uBAAuB,OAAO,GAA2B;;;SAGtD,QAAQ,GAAG;YACR,EAAE,YAAa,UAAU,OAAO,QAAQ,QAAQ,GAAI;;;;;;AAOhE,MAAa,cAAc,OAAO,OAAO,CAAC,MAAM;CAC9C,OAAO;CACP,SAAS;CACV,CAAC;;;aAGW,EAAE,WAAY,SAAS,OAAO,SAAS,OAAQ;YAChD,EAAE,WAAY,SAAS,OAAO,SAAS,OAAQ;mBACxC,aAAa,GAAG;WACxB,MAAM,oBAAoB;;KAEhC,EAAE,eACH,YACA,GAAG;eACQ,MAAM,mBAAmB;MAClC;;KAED,YAAY,cAAc;;;;;eAKhB,EAAE,WAAY,SAAS,OAAO,SAAS,OAAQ;cAChD,EAAE,WAAY,SAAS,OAAO,SAAS,OAAQ;;;AAI7D,MAAM,sBAAsB,OAAO,GAA0B;;WAElD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;EAEhC"}
@@ -1,6 +1,6 @@
1
- import { t as PseudoClassProps } from "./PseudoClassProps-DgT5G_z5.mjs";
2
- import { r as ButtonProps } from "./Button-CKzNTpPL.mjs";
3
- import { n as InputSizes, t as InputMixinProps } from "./input-D9FuQmlI.mjs";
1
+ import { t as PseudoClassProps } from "./PseudoClassProps-BPdn-ofQ.mjs";
2
+ import { r as ButtonProps } from "./Button-BrI1s2-r.mjs";
3
+ import { n as InputSizes, t as InputMixinProps } from "./input-M7BEIewR.mjs";
4
4
  import * as _$react from "react";
5
5
  import { ComponentPropsWithoutRef, MouseEventHandler, ReactElement, ReactNode } from "react";
6
6
  import * as _$styled_components0 from "styled-components";
@@ -9,7 +9,7 @@ import * as _$styled_components0 from "styled-components";
9
9
  declare const ClearButton: _$styled_components0.StyledComponent<_$react.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & _$react.RefAttributes<HTMLButtonElement>>, any, {
10
10
  width: "icon";
11
11
  variant: "basic";
12
- } & PseudoClassProps, "variant" | "width">;
12
+ } & PseudoClassProps, "width" | "variant">;
13
13
  interface StyledInputProps extends InputMixinProps {
14
14
  $leftIcon?: ReactNode;
15
15
  $hasRightItem?: boolean;
@@ -62,4 +62,4 @@ interface InputGroupProps extends ComponentPropsWithoutRef<'div'>, Omit<InputMix
62
62
  declare const InputGroup: _$react.ForwardRefExoticComponent<InputGroupProps & _$react.RefAttributes<HTMLDivElement>>;
63
63
  //#endregion
64
64
  export { InputProps as a, InputGroupProps as i, Input as n, InputGroup as r, ClearButton as t };
65
- //# sourceMappingURL=Input-BHHWpSKN.d.mts.map
65
+ //# sourceMappingURL=Input-qlQVD5h0.d.mts.map
package/dist/Input.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { a as InputProps, i as InputGroupProps, n as Input, r as InputGroup, t as ClearButton } from "./Input-BHHWpSKN.mjs";
1
+ import { a as InputProps, i as InputGroupProps, n as Input, r as InputGroup, t as ClearButton } from "./Input-qlQVD5h0.mjs";
2
2
  export { ClearButton, Input, Input as default, InputGroup, InputGroupProps, InputProps };
@@ -1,4 +1,4 @@
1
- import { n as InputSizes, t as InputMixinProps } from "./input-D9FuQmlI.mjs";
1
+ import { n as InputSizes, t as InputMixinProps } from "./input-M7BEIewR.mjs";
2
2
 
3
3
  //#region types/InputProps.d.ts
4
4
  interface InputProps extends Omit<InputMixinProps, '$size'> {
@@ -13,4 +13,4 @@ interface InputProps extends Omit<InputMixinProps, '$size'> {
13
13
  }
14
14
  //#endregion
15
15
  export { InputProps as t };
16
- //# sourceMappingURL=InputProps-sHxlDiss.d.mts.map
16
+ //# sourceMappingURL=InputProps-D_7MnQfE.d.mts.map
@@ -1,2 +1,2 @@
1
- import { t as InputProps } from "./InputProps-sHxlDiss.mjs";
1
+ import { t as InputProps } from "./InputProps-D_7MnQfE.mjs";
2
2
  export { InputProps };
@@ -1,4 +1,4 @@
1
- import { t as ValueControlProps } from "./types-BrNreYUU.mjs";
1
+ import { t as ValueControlProps } from "./types-B5VmRRMR.mjs";
2
2
  import * as _$react_jsx_runtime0 from "react/jsx-runtime";
3
3
 
4
4
  //#region components/DataTable/TableControls/FiltersV2/value-controls/IntegerValueControl/IntegerValueControl.d.ts
@@ -8,10 +8,10 @@ import { n as Stack } from "./Stack-Bre2oiov.mjs";
8
8
  import { n as Button$1, t as IconButton } from "./IconButton-BgL3QUVO.mjs";
9
9
  import { a as StyledTruncatedText, i as StickerContentContainer, n as Sticker, r as StickerContainer } from "./Sticker-CQ6sOKUj.mjs";
10
10
  import { t as FormGroupContext } from "./useFormGroup-CaTiD_Yt.mjs";
11
- import { o as MenuHeading, r as ListItem } from "./Menu-CHbUf9PQ.mjs";
12
- import { n as DropdownMenu_default } from "./DropdownMenu-82xH1AZr.mjs";
13
- import { s as Popover_default } from "./Popover-DNH8Jx1-.mjs";
14
- import { t as Container } from "./FormControl-D1HIqDKm.mjs";
11
+ import { o as MenuHeading, r as ListItem } from "./Menu-38UCGcte.mjs";
12
+ import { n as DropdownMenu_default } from "./DropdownMenu-CUnf420M.mjs";
13
+ import { s as Popover_default } from "./Popover-DlXyKYL5.mjs";
14
+ import { t as Container } from "./FormControl-1BmoYFCu.mjs";
15
15
  import { BorderRadius, Color, Spacing, Typography } from "@persona/design-tokens";
16
16
  import { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
17
17
  import { DropIndicator, GridList, GridListItem, Header, ListBoxSection, useDragAndDrop } from "react-aria-components";
@@ -444,4 +444,4 @@ const ListBox = Object.assign(ListBox$1, { LogicRow });
444
444
  //#endregion
445
445
  export { useListBoxContext as n, ListBox as t };
446
446
 
447
- //# sourceMappingURL=ListBox-B9uuMt2R.mjs.map
447
+ //# sourceMappingURL=ListBox-9jHHEaqW.mjs.map