@persona/design-system 0.1.7 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (796) hide show
  1. package/CHANGELOG.md +343 -221
  2. package/dist/{Action-DkNqzc2X.d.mts → Action-CVtzREhU.d.mts} +3 -3
  3. package/dist/{Action-z1rV4qON.d.cts → Action-E90Wvqmc.d.cts} +3 -3
  4. package/dist/Action.d.cts +1 -1
  5. package/dist/Action.d.mts +1 -1
  6. package/dist/AdvancedFilterRuleRow.d.mts +37 -0
  7. package/dist/AdvancedFilterRulesPopover.d.mts +62 -0
  8. package/dist/ArrayValueControl.d.mts +38 -0
  9. package/dist/Attribute.d.mts +4 -4
  10. package/dist/AttributeGrid.d.mts +1 -1
  11. package/dist/{Badge-DAGPU4-e.cjs → Badge-ADPloFsd.cjs} +2 -2
  12. package/dist/{Badge-DAGPU4-e.cjs.map → Badge-ADPloFsd.cjs.map} +1 -1
  13. package/dist/{Badge-DRn_r6is.mjs → Badge-DortWowZ.mjs} +2 -2
  14. package/dist/{Badge-DRn_r6is.mjs.map → Badge-DortWowZ.mjs.map} +1 -1
  15. package/dist/Banner.d.mts +1 -1
  16. package/dist/BooleanValueControl.d.mts +20 -0
  17. package/dist/{Breadcrumb-BOxfam3E.d.cts → Breadcrumb-VH-Mwo-M.d.cts} +15 -2
  18. package/dist/{Breadcrumb-On7pOpgt.d.mts → Breadcrumb-lziQ1FX9.d.mts} +15 -2
  19. package/dist/Breadcrumb.d.cts +2 -2
  20. package/dist/Breadcrumb.d.mts +2 -2
  21. package/dist/Breadcrumbs-BBREROrw.d.cts +26 -0
  22. package/dist/Breadcrumbs-CDZ_Mrcg.mjs +288 -0
  23. package/dist/Breadcrumbs-CDZ_Mrcg.mjs.map +1 -0
  24. package/dist/Breadcrumbs-DJ5qqqRD.d.mts +26 -0
  25. package/dist/Breadcrumbs-tR49JqAS.cjs +295 -0
  26. package/dist/Breadcrumbs-tR49JqAS.cjs.map +1 -0
  27. package/dist/Breadcrumbs.d.cts +2 -20
  28. package/dist/Breadcrumbs.d.mts +2 -20
  29. package/dist/{Button-DXsYU5qU.d.mts → Button-9p469xA1.d.mts} +3 -3
  30. package/dist/Button.d.mts +1 -1
  31. package/dist/ButtonGroup.d.mts +1 -1
  32. package/dist/Calendar.d.mts +1 -1
  33. package/dist/CalendarBase.d.mts +1 -1
  34. package/dist/{Card-CLTkZLKr.mjs → Card-BMCB9eFC.mjs} +4 -4
  35. package/dist/{Card-CLTkZLKr.mjs.map → Card-BMCB9eFC.mjs.map} +1 -1
  36. package/dist/{Card-DnmrsQWi.d.cts → Card-CJPEmUvg.d.cts} +2 -2
  37. package/dist/{Card-IOBCsfke.d.mts → Card-CqnG--CU.d.mts} +4 -4
  38. package/dist/{Card-CaOItkgL.cjs → Card-Csz-PxX0.cjs} +4 -4
  39. package/dist/{Card-CaOItkgL.cjs.map → Card-Csz-PxX0.cjs.map} +1 -1
  40. package/dist/Card.d.cts +1 -1
  41. package/dist/Card.d.mts +1 -1
  42. package/dist/Card2.d.cts +1 -1
  43. package/dist/Card2.d.mts +1 -1
  44. package/dist/CardV2-C9z0Hr-c.mjs +411 -0
  45. package/dist/CardV2-C9z0Hr-c.mjs.map +1 -0
  46. package/dist/CardV2-DJXgFomd.cjs +419 -0
  47. package/dist/CardV2-DJXgFomd.cjs.map +1 -0
  48. package/dist/{Checkbox-BghGF-iW.mjs → Checkbox-B0bjZbji.mjs} +5 -5
  49. package/dist/{Checkbox-BghGF-iW.mjs.map → Checkbox-B0bjZbji.mjs.map} +1 -1
  50. package/dist/{Checkbox-MUC37dLY.d.mts → Checkbox-Bm8exUfH.d.mts} +1 -1
  51. package/dist/{Checkbox-DhxpxzGp.cjs → Checkbox-CmCujC1W.cjs} +5 -5
  52. package/dist/{Checkbox-DhxpxzGp.cjs.map → Checkbox-CmCujC1W.cjs.map} +1 -1
  53. package/dist/{Checkbox-DfI0Xp3y.d.cts → Checkbox-Cr8ifm10.d.cts} +1 -1
  54. package/dist/Checkbox.d.cts +1 -1
  55. package/dist/Checkbox.d.mts +1 -1
  56. package/dist/CheckboxGroupField.d.cts +1 -1
  57. package/dist/CheckboxGroupField.d.mts +2 -2
  58. package/dist/ChoicesValueControl.d.mts +35 -0
  59. package/dist/{Combobox-CeKMrlxy.mjs → Combobox-BdqU5WLG.mjs} +254 -70
  60. package/dist/Combobox-BdqU5WLG.mjs.map +1 -0
  61. package/dist/{Combobox-Bedo_GIj.d.mts → Combobox-C99xluaM.d.mts} +3 -3
  62. package/dist/{Combobox-4Bi9-N1p.cjs → Combobox-COXvmxlM.cjs} +247 -63
  63. package/dist/Combobox-COXvmxlM.cjs.map +1 -0
  64. package/dist/{Combobox-5rAFq_52.d.cts → Combobox-DBWMHwUt.d.cts} +3 -3
  65. package/dist/Combobox.d.cts +2 -2
  66. package/dist/Combobox.d.mts +2 -2
  67. package/dist/{ComboboxBase-DGZUdsQa.d.mts → ComboboxBase-BsY7CYoB.d.mts} +48 -8
  68. package/dist/{ComboboxBase-BoR9DVwe.d.cts → ComboboxBase-zZ3tE-dH.d.cts} +45 -5
  69. package/dist/ComboboxBase.d.cts +2 -2
  70. package/dist/ComboboxBase.d.mts +2 -2
  71. package/dist/{ComboboxMultiSelect-DMWPiBrE.d.mts → ComboboxMultiSelect-dNuETspL.d.mts} +2 -2
  72. package/dist/{ComboboxMultiSelect-CnI6sFAF.d.cts → ComboboxMultiSelect-ioB4Jx7_.d.cts} +2 -2
  73. package/dist/ComboboxMultiSelect.d.cts +1 -1
  74. package/dist/ComboboxMultiSelect.d.mts +1 -1
  75. package/dist/{ComboboxSingleSelect-CcppU_hq.d.mts → ComboboxSingleSelect-C8KvIJ43.d.mts} +4 -4
  76. package/dist/{ComboboxSingleSelect-Japejm0g.d.cts → ComboboxSingleSelect-Fn80tdhz.d.cts} +4 -4
  77. package/dist/ComboboxSingleSelect.d.cts +1 -1
  78. package/dist/ComboboxSingleSelect.d.mts +1 -1
  79. package/dist/{CompactBar-DTsGo1zU.d.cts → CompactBar-BEAK55kh.d.cts} +3 -3
  80. package/dist/{CompactBar-2cpJD7qg.d.mts → CompactBar-CXqlVKy7.d.mts} +3 -3
  81. package/dist/CompactBar.d.cts +1 -1
  82. package/dist/CompactBar.d.mts +1 -1
  83. package/dist/{ConfigFormGroup-DVRhkS2L.cjs → ConfigFormGroup-m5YdVa9n.cjs} +3 -3
  84. package/dist/{ConfigFormGroup-DVRhkS2L.cjs.map → ConfigFormGroup-m5YdVa9n.cjs.map} +1 -1
  85. package/dist/{ConfigFormGroup-DISUwz5j.mjs → ConfigFormGroup-yhb2jldT.mjs} +3 -3
  86. package/dist/{ConfigFormGroup-DISUwz5j.mjs.map → ConfigFormGroup-yhb2jldT.mjs.map} +1 -1
  87. package/dist/{ControlBar-DXyl1gjc.d.mts → ControlBar-D8CirAyZ.d.cts} +2 -2
  88. package/dist/{ControlBar-BGmXymCB.d.cts → ControlBar-tOCQnbAl.d.mts} +2 -2
  89. package/dist/ControlBar.d.cts +1 -1
  90. package/dist/ControlBar.d.mts +1 -1
  91. package/dist/DataTable.d.cts +3 -3
  92. package/dist/DataTable.d.mts +4 -4
  93. package/dist/DateField.d.cts +1 -1
  94. package/dist/DateField.d.mts +1 -1
  95. package/dist/DatePicker-BlCgFb7g.cjs +948 -0
  96. package/dist/DatePicker-BlCgFb7g.cjs.map +1 -0
  97. package/dist/DatePicker-DY1YA_Fu.mjs +922 -0
  98. package/dist/DatePicker-DY1YA_Fu.mjs.map +1 -0
  99. package/dist/DatePicker.d.cts +1 -1
  100. package/dist/DatePicker.d.mts +1 -1
  101. package/dist/DateRangePicker.d.cts +1 -1
  102. package/dist/DateRangePicker.d.mts +1 -1
  103. package/dist/DateValueControl.d.mts +26 -0
  104. package/dist/{DropdownButton-B397h6ka.mjs → DropdownButton-DKLjJylQ.mjs} +3 -3
  105. package/dist/{DropdownButton-B397h6ka.mjs.map → DropdownButton-DKLjJylQ.mjs.map} +1 -1
  106. package/dist/{DropdownButton-Du6dwZVL.cjs → DropdownButton-Dl7IEzAc.cjs} +3 -3
  107. package/dist/{DropdownButton-Du6dwZVL.cjs.map → DropdownButton-Dl7IEzAc.cjs.map} +1 -1
  108. package/dist/DropdownButton.d.cts +1 -1
  109. package/dist/DropdownButton.d.mts +2 -2
  110. package/dist/{DropdownMenu-5qIgQ14A.d.mts → DropdownMenu-CVPanvKA.d.mts} +3 -3
  111. package/dist/{DropdownMenu-cnkoGc7C.mjs → DropdownMenu-DGYexb7s.mjs} +3 -3
  112. package/dist/{DropdownMenu-cnkoGc7C.mjs.map → DropdownMenu-DGYexb7s.mjs.map} +1 -1
  113. package/dist/{DropdownMenu-CfJxgWN5.cjs → DropdownMenu-DnlQqTjs.cjs} +3 -3
  114. package/dist/{DropdownMenu-CfJxgWN5.cjs.map → DropdownMenu-DnlQqTjs.cjs.map} +1 -1
  115. package/dist/{DropdownMenu-FIYz6oAo.d.cts → DropdownMenu-FkiManPP.d.cts} +2 -2
  116. package/dist/DropdownMenu.d.cts +1 -1
  117. package/dist/DropdownMenu.d.mts +1 -1
  118. package/dist/{ErrorProps-BosuK6zJ.d.cts → ErrorProps-CN2XjaOX.d.mts} +1 -1
  119. package/dist/{ErrorProps-iEj4BIVA.d.mts → ErrorProps-Dxqb4gw_.d.cts} +1 -1
  120. package/dist/ErrorProps.d.cts +1 -1
  121. package/dist/ErrorProps.d.mts +1 -1
  122. package/dist/FieldRegistry-OX60T3hr.d.cts +122 -0
  123. package/dist/FieldRegistry-rqSkjchY.d.mts +122 -0
  124. package/dist/FieldRegistry.d.cts +2 -0
  125. package/dist/FieldRegistry.d.mts +2 -0
  126. package/dist/FilterBar-D3LiIy1-.d.mts +103 -0
  127. package/dist/FilterBar-YzOh02f9.d.cts +103 -0
  128. package/dist/FilterBar.d.cts +2 -0
  129. package/dist/FilterBar.d.mts +2 -0
  130. package/dist/FilterPickerMenu.d.mts +84 -0
  131. package/dist/FilterPill.d.mts +60 -0
  132. package/dist/FilterPopover.d.mts +87 -0
  133. package/dist/FloatValueControl.d.mts +40 -0
  134. package/dist/{FormControl-ArDcvmir.mjs → FormControl-B28qa7aQ.mjs} +6 -6
  135. package/dist/{FormControl-ArDcvmir.mjs.map → FormControl-B28qa7aQ.mjs.map} +1 -1
  136. package/dist/{FormControl-BrsML00L.d.cts → FormControl-DFp_qcW1.d.cts} +2 -2
  137. package/dist/{FormControl-DnsC4vTX.d.mts → FormControl-DH3bgqaB.d.mts} +3 -3
  138. package/dist/{FormControl-Czt95h2L.cjs → FormControl-MkBXuUF6.cjs} +6 -6
  139. package/dist/{FormControl-Czt95h2L.cjs.map → FormControl-MkBXuUF6.cjs.map} +1 -1
  140. package/dist/FormControl.d.cts +1 -1
  141. package/dist/FormControl.d.mts +1 -1
  142. package/dist/FormControlLabel.d.mts +1 -1
  143. package/dist/{FormField-BddCs6P0.d.mts → FormField-BugkBvN4.d.mts} +2 -2
  144. package/dist/FormField-D3XhxTMg.cjs +550 -0
  145. package/dist/FormField-D3XhxTMg.cjs.map +1 -0
  146. package/dist/FormField-PeYYRO4s.mjs +471 -0
  147. package/dist/FormField-PeYYRO4s.mjs.map +1 -0
  148. package/dist/{FormField-DoSXvnJ3.d.cts → FormField-idNLw5PW.d.cts} +2 -2
  149. package/dist/FormField.d.cts +1 -1
  150. package/dist/FormField.d.mts +1 -1
  151. package/dist/{Header-CkZvzbzL.d.cts → Header-C-WhPOin.d.cts} +3 -3
  152. package/dist/{Header-B-Us54dR.d.mts → Header-CDTYK1XJ.d.mts} +2 -2
  153. package/dist/Header.d.cts +1 -1
  154. package/dist/Header.d.mts +1 -1
  155. package/dist/{HelperTooltip-CofPKyZh.d.mts → HelperTooltip-B7Ysh8B3.d.mts} +3 -3
  156. package/dist/{HelperTooltip-C1CYMpJP.d.cts → HelperTooltip-T-sTGGLD.d.cts} +2 -2
  157. package/dist/HelperTooltip.d.cts +1 -1
  158. package/dist/HelperTooltip.d.mts +1 -1
  159. package/dist/{HoverCopyableField-B_WNB7Qp.cjs → HoverCopyableField-CRkM7o4B.cjs} +6 -6
  160. package/dist/{HoverCopyableField-B_WNB7Qp.cjs.map → HoverCopyableField-CRkM7o4B.cjs.map} +1 -1
  161. package/dist/{HoverCopyableField-DR575ayC.mjs → HoverCopyableField-ClXBg_ld.mjs} +6 -6
  162. package/dist/{HoverCopyableField-DR575ayC.mjs.map → HoverCopyableField-ClXBg_ld.mjs.map} +1 -1
  163. package/dist/HoverCopyableField.d.mts +1 -1
  164. package/dist/{IconButton-Dnnlf9uO.d.mts → IconButton-BSES_-6g.d.mts} +2 -2
  165. package/dist/{IconButton-DC4rh6ow.mjs → IconButton-CIWiEsS-.mjs} +5 -5
  166. package/dist/{IconButton-DC4rh6ow.mjs.map → IconButton-CIWiEsS-.mjs.map} +1 -1
  167. package/dist/{IconButton-DNy7g5zh.cjs → IconButton-nlgjJQCS.cjs} +4 -4
  168. package/dist/{IconButton-DNy7g5zh.cjs.map → IconButton-nlgjJQCS.cjs.map} +1 -1
  169. package/dist/IconButton.d.mts +1 -1
  170. package/dist/ImageTile.d.cts +1 -1
  171. package/dist/ImageTile.d.mts +2 -2
  172. package/dist/InlineCombobox.d.mts +2 -2
  173. package/dist/InlineInput.d.mts +1 -1
  174. package/dist/{Input-PWfwMSJ7.mjs → Input-BFI_e7aU.mjs} +5 -5
  175. package/dist/{Input-PWfwMSJ7.mjs.map → Input-BFI_e7aU.mjs.map} +1 -1
  176. package/dist/{Input-CEcTvtX2.d.cts → Input-BM0DzWEf.d.cts} +2 -2
  177. package/dist/{Input-4KeYlOWM.d.mts → Input-BPClVzwD.d.mts} +4 -4
  178. package/dist/{Input-BDLUq-pK.cjs → Input-OJPQ07TW.cjs} +5 -5
  179. package/dist/{Input-BDLUq-pK.cjs.map → Input-OJPQ07TW.cjs.map} +1 -1
  180. package/dist/Input.d.cts +1 -1
  181. package/dist/Input.d.mts +1 -1
  182. package/dist/{InputProps-DNlik5IZ.d.cts → InputProps-BnjxrdWQ.d.mts} +2 -2
  183. package/dist/{InputProps-CTLG2Tr0.d.mts → InputProps-CoVNpQSj.d.cts} +2 -2
  184. package/dist/InputProps.d.cts +1 -1
  185. package/dist/InputProps.d.mts +1 -1
  186. package/dist/IntegerValueControl.d.mts +39 -0
  187. package/dist/LayoutLoadingShimmer.d.cts +20 -0
  188. package/dist/LayoutLoadingShimmer.d.mts +20 -0
  189. package/dist/Link.d.mts +1 -1
  190. package/dist/{ListBox-BCscLcYL.cjs → ListBox-BP1eaG7L.cjs} +83 -14
  191. package/dist/ListBox-BP1eaG7L.cjs.map +1 -0
  192. package/dist/{ListBox-CDNOJmvz.mjs → ListBox-BwID8jpk.mjs} +83 -14
  193. package/dist/ListBox-BwID8jpk.mjs.map +1 -0
  194. package/dist/{ListBox-WyZvseo5.d.cts → ListBox-QaeRQBSC.d.cts} +2 -2
  195. package/dist/{ListBox-DZIAlPbc.d.mts → ListBox-_fcSPynx.d.mts} +5 -5
  196. package/dist/ListBox.d.cts +1 -1
  197. package/dist/ListBox.d.mts +1 -1
  198. package/dist/ListBoxField.d.cts +2 -2
  199. package/dist/ListBoxField.d.mts +3 -3
  200. package/dist/{LoadingShimmer-Bu6KtQ06.mjs → LoadingShimmer-Dsc_RCCf.mjs} +1 -1
  201. package/dist/{LoadingShimmer-Bu6KtQ06.mjs.map → LoadingShimmer-Dsc_RCCf.mjs.map} +1 -1
  202. package/dist/{LoadingShimmer-CUjbAqGd.cjs → LoadingShimmer-Dx6ncVUV.cjs} +1 -1
  203. package/dist/{LoadingShimmer-CUjbAqGd.cjs.map → LoadingShimmer-Dx6ncVUV.cjs.map} +1 -1
  204. package/dist/LoadingShimmer.d.mts +2 -2
  205. package/dist/LogicRow-BtCKGX_j.d.mts +40 -0
  206. package/dist/LogicRow-C6lrFIq0.d.cts +40 -0
  207. package/dist/LogicRow.d.cts +2 -0
  208. package/dist/LogicRow.d.mts +2 -0
  209. package/dist/MaskedInput.d.cts +2 -2
  210. package/dist/MaskedInput.d.mts +1 -1
  211. package/dist/{Menu-CVuFAxl2.mjs → Menu-CPYXo61N.mjs} +5 -5
  212. package/dist/{Menu-CVuFAxl2.mjs.map → Menu-CPYXo61N.mjs.map} +1 -1
  213. package/dist/{Menu-BJ5c7HGD.d.mts → Menu-CUp_9HgC.d.mts} +4 -4
  214. package/dist/{Menu-BKMxOXkj.d.cts → Menu-fUnbIYr5.d.cts} +3 -3
  215. package/dist/{Menu-BXic-30n.cjs → Menu-t2q8NrV0.cjs} +5 -5
  216. package/dist/{Menu-BXic-30n.cjs.map → Menu-t2q8NrV0.cjs.map} +1 -1
  217. package/dist/Menu.d.cts +1 -1
  218. package/dist/Menu.d.mts +1 -1
  219. package/dist/{MiddleTruncatedText-BIzKECv9.cjs → MiddleTruncatedText-CO76xIqP.cjs} +2 -2
  220. package/dist/{MiddleTruncatedText-BIzKECv9.cjs.map → MiddleTruncatedText-CO76xIqP.cjs.map} +1 -1
  221. package/dist/{MiddleTruncatedText-Bzpg3zAU.mjs → MiddleTruncatedText-GXI-CPvs.mjs} +3 -3
  222. package/dist/{MiddleTruncatedText-Bzpg3zAU.mjs.map → MiddleTruncatedText-GXI-CPvs.mjs.map} +1 -1
  223. package/dist/Modal.d.mts +3 -3
  224. package/dist/PageHeader-CUDnarkt.cjs +77 -0
  225. package/dist/PageHeader-CUDnarkt.cjs.map +1 -0
  226. package/dist/PageHeader-D-6W61E_.mjs +64 -0
  227. package/dist/PageHeader-D-6W61E_.mjs.map +1 -0
  228. package/dist/PageHeader.d.cts +11 -2
  229. package/dist/PageHeader.d.mts +12 -3
  230. package/dist/{PageSelector-DoROR_Uh.d.cts → PageSelector-CNnVp3Al.d.cts} +3 -3
  231. package/dist/{PageSelector-CMoV-cHa.d.mts → PageSelector-vay4jpMp.d.mts} +3 -3
  232. package/dist/PageSelector.d.cts +1 -1
  233. package/dist/PageSelector.d.mts +1 -1
  234. package/dist/PageSizeSelector.d.mts +7 -1
  235. package/dist/{Pagination-D4IVVj3S.cjs → Pagination-2Yo1vRJZ.cjs} +12 -9
  236. package/dist/Pagination-2Yo1vRJZ.cjs.map +1 -0
  237. package/dist/{Pagination-B97xQ-Wk.d.cts → Pagination-D04tn-tf.d.cts} +9 -3
  238. package/dist/{Pagination-QWNK_hH7.d.mts → Pagination-ygLutOst.d.mts} +9 -3
  239. package/dist/{Pagination-Cj08JRG9.mjs → Pagination-ztqhywAP.mjs} +13 -10
  240. package/dist/Pagination-ztqhywAP.mjs.map +1 -0
  241. package/dist/Pagination.d.cts +1 -1
  242. package/dist/Pagination.d.mts +1 -1
  243. package/dist/{Pii-D-Ry7L0t.cjs → Pii-DHTb3ewO.cjs} +2 -2
  244. package/dist/{Pii-D-Ry7L0t.cjs.map → Pii-DHTb3ewO.cjs.map} +1 -1
  245. package/dist/{Pii-Bxh6_R4T.mjs → Pii-DrrtEz7U.mjs} +2 -2
  246. package/dist/{Pii-Bxh6_R4T.mjs.map → Pii-DrrtEz7U.mjs.map} +1 -1
  247. package/dist/Pii.d.mts +1 -1
  248. package/dist/PillShell.d.mts +85 -0
  249. package/dist/{Popover-D0QY5f-J.mjs → Popover-BkDpDdaO.mjs} +5 -5
  250. package/dist/{Popover-D0QY5f-J.mjs.map → Popover-BkDpDdaO.mjs.map} +1 -1
  251. package/dist/{Popover-BAv7BujW.cjs → Popover-BzgMAhsX.cjs} +4 -4
  252. package/dist/{Popover-BAv7BujW.cjs.map → Popover-BzgMAhsX.cjs.map} +1 -1
  253. package/dist/Popover.d.mts +1 -1
  254. package/dist/ProgressBar.d.mts +1 -1
  255. package/dist/ProgressIndicator.d.mts +1 -1
  256. package/dist/{PseudoClassProps-ySXCGUEQ.d.mts → PseudoClassProps-DLxPxo7T.d.mts} +1 -1
  257. package/dist/PseudoClassProps.d.mts +1 -1
  258. package/dist/{Radio-nw846eRv.cjs → Radio-BrTzy7-C.cjs} +3 -3
  259. package/dist/{Radio-nw846eRv.cjs.map → Radio-BrTzy7-C.cjs.map} +1 -1
  260. package/dist/{Radio-C9DevagH.mjs → Radio-CSX2eO-O.mjs} +3 -3
  261. package/dist/{Radio-C9DevagH.mjs.map → Radio-CSX2eO-O.mjs.map} +1 -1
  262. package/dist/{RadioGroup-B3hRbIWF.mjs → RadioGroup-CnK0opBd.mjs} +3 -3
  263. package/dist/{RadioGroup-B3hRbIWF.mjs.map → RadioGroup-CnK0opBd.mjs.map} +1 -1
  264. package/dist/{RadioGroup-DmGVJCgT.cjs → RadioGroup-CriF2InQ.cjs} +3 -3
  265. package/dist/{RadioGroup-DmGVJCgT.cjs.map → RadioGroup-CriF2InQ.cjs.map} +1 -1
  266. package/dist/{RadioGroup-D_H1B7JV.d.cts → RadioGroup-DKqbSfju.d.mts} +1 -1
  267. package/dist/{RadioGroup-nhMXEbCx.d.mts → RadioGroup-XYWjprsv.d.cts} +1 -1
  268. package/dist/RadioGroup.d.cts +1 -1
  269. package/dist/RadioGroup.d.mts +1 -1
  270. package/dist/RangeCalendar.d.mts +1 -1
  271. package/dist/RangeCalendarPresets.d.mts +1 -1
  272. package/dist/RuleEditorFields.d.mts +37 -0
  273. package/dist/RulesPill.d.mts +65 -0
  274. package/dist/{SearchInput-s6qGC2WZ.d.mts → SearchInput-Bp2yjaE1.d.mts} +3 -3
  275. package/dist/{SearchInput-CAHYPQVX.d.cts → SearchInput-CTI59-NW.d.cts} +2 -2
  276. package/dist/SearchInput.d.cts +1 -1
  277. package/dist/SearchInput.d.mts +1 -1
  278. package/dist/Section.d.mts +1 -1
  279. package/dist/{SectionHeading-CDBQ4m9E.d.mts → SectionHeading-C6hjGdK-.d.cts} +2 -2
  280. package/dist/{SectionHeading-D-L4uPoX.d.cts → SectionHeading-Q-rx2LEd.d.mts} +2 -2
  281. package/dist/SectionHeading.d.cts +1 -1
  282. package/dist/SectionHeading.d.mts +1 -1
  283. package/dist/{SegmentedControl-CIJz0oxY.cjs → SegmentedControl-C2XZF0ys.cjs} +8 -7
  284. package/dist/SegmentedControl-C2XZF0ys.cjs.map +1 -0
  285. package/dist/{SegmentedControl-B1ZLgu61.mjs → SegmentedControl-CgDQIVll.mjs} +8 -7
  286. package/dist/SegmentedControl-CgDQIVll.mjs.map +1 -0
  287. package/dist/{SegmentedControl-BYuXohIp.d.cts → SegmentedControl-DrjdUOU9.d.mts} +2 -2
  288. package/dist/{SegmentedControl-CE845gnm.d.mts → SegmentedControl-nHIK1ZvR.d.cts} +1 -1
  289. package/dist/SegmentedControl.d.cts +1 -1
  290. package/dist/SegmentedControl.d.mts +1 -1
  291. package/dist/{Select-NcaURrGZ.d.cts → Select-2KbtKawr.d.mts} +11 -5
  292. package/dist/{Select-BMEwCfbv.d.mts → Select-BH3hXMxp.d.cts} +11 -5
  293. package/dist/{Select-C65bfYeT.cjs → Select-BurtT6bN.cjs} +13 -10
  294. package/dist/Select-BurtT6bN.cjs.map +1 -0
  295. package/dist/{Select-ByTgXOlU.mjs → Select-cPEORy70.mjs} +14 -11
  296. package/dist/Select-cPEORy70.mjs.map +1 -0
  297. package/dist/Select.d.cts +1 -1
  298. package/dist/Select.d.mts +1 -1
  299. package/dist/Slider.d.mts +1 -1
  300. package/dist/SliderRHF.d.mts +1 -1
  301. package/dist/SliderThumb.d.mts +1 -1
  302. package/dist/{Spacer-GYHbk-dS.cjs → Spacer-B2CerL6e.cjs} +1 -1
  303. package/dist/{Spacer-GYHbk-dS.cjs.map → Spacer-B2CerL6e.cjs.map} +1 -1
  304. package/dist/{Spacer-Ln3KChb5.mjs → Spacer-CJp0lwkL.mjs} +1 -1
  305. package/dist/{Spacer-Ln3KChb5.mjs.map → Spacer-CJp0lwkL.mjs.map} +1 -1
  306. package/dist/{Stack-ckRN7LrP.mjs → Stack-Bl54WmhY.mjs} +1 -1
  307. package/dist/{Stack-ckRN7LrP.mjs.map → Stack-Bl54WmhY.mjs.map} +1 -1
  308. package/dist/{Stack-D979gYU9.d.cts → Stack-BzVkf3cz.d.cts} +1 -1
  309. package/dist/{Stack-UMhJ6F_3.d.mts → Stack-CkV7k7TE.d.mts} +2 -2
  310. package/dist/{Stack-BF-9YjA1.cjs → Stack-UeifHn3c.cjs} +1 -1
  311. package/dist/{Stack-BF-9YjA1.cjs.map → Stack-UeifHn3c.cjs.map} +1 -1
  312. package/dist/Stack.d.cts +1 -1
  313. package/dist/Stack.d.mts +1 -1
  314. package/dist/StatusIndicator.d.cts +31 -3
  315. package/dist/StatusIndicator.d.mts +32 -4
  316. package/dist/{Sticker-DjF9VJQB.d.mts → Sticker-Bs25ISz7.d.mts} +5 -5
  317. package/dist/{Sticker-N8XZnv7M.d.cts → Sticker-CI-XxUmM.d.cts} +3 -3
  318. package/dist/{Sticker-D0jIU2Dt.cjs → Sticker-CIoseh9f.cjs} +3 -3
  319. package/dist/{Sticker-D0jIU2Dt.cjs.map → Sticker-CIoseh9f.cjs.map} +1 -1
  320. package/dist/{Sticker-B0TbkV4o.mjs → Sticker-DbqKLe33.mjs} +3 -3
  321. package/dist/{Sticker-B0TbkV4o.mjs.map → Sticker-DbqKLe33.mjs.map} +1 -1
  322. package/dist/Sticker.d.cts +1 -1
  323. package/dist/Sticker.d.mts +1 -1
  324. package/dist/StringValueControl.d.mts +39 -0
  325. package/dist/SwatchPicker.d.mts +1 -1
  326. package/dist/Tab.d.mts +2 -2
  327. package/dist/{TabBar-BpHMYvNb.cjs → TabBar-PFaDNRw0.cjs} +4 -4
  328. package/dist/{TabBar-BpHMYvNb.cjs.map → TabBar-PFaDNRw0.cjs.map} +1 -1
  329. package/dist/{TabBar-ByusqAXF.mjs → TabBar-zSA8kyE6.mjs} +4 -4
  330. package/dist/{TabBar-ByusqAXF.mjs.map → TabBar-zSA8kyE6.mjs.map} +1 -1
  331. package/dist/TabBarIconButton.d.mts +1 -1
  332. package/dist/{Table-DJZtluW3.d.cts → Table-BNScLj9g.d.mts} +1 -1
  333. package/dist/{Table-CNs8p8hL.mjs → Table-D8IcpACv.mjs} +5 -5
  334. package/dist/{Table-CNs8p8hL.mjs.map → Table-D8IcpACv.mjs.map} +1 -1
  335. package/dist/{Table-D3nyiZt0.d.mts → Table-DXqyNohc.d.cts} +1 -1
  336. package/dist/{Table-C9rjUVpn.cjs → Table-DxLvJYWK.cjs} +5 -5
  337. package/dist/{Table-C9rjUVpn.cjs.map → Table-DxLvJYWK.cjs.map} +1 -1
  338. package/dist/Table.d.cts +1 -1
  339. package/dist/Table.d.mts +1 -1
  340. package/dist/{TableBody-BFPF07n4.d.cts → TableBody-CrDNMyT8.d.mts} +1 -1
  341. package/dist/{TableBody-DpRjZgzU.d.mts → TableBody-CxwHmdNb.d.cts} +1 -1
  342. package/dist/TableBody.d.cts +1 -1
  343. package/dist/TableBody.d.mts +1 -1
  344. package/dist/{TableBox-DO-yToJk.cjs → TableBox-CiuXCXyv.cjs} +11 -11
  345. package/dist/{TableBox-DO-yToJk.cjs.map → TableBox-CiuXCXyv.cjs.map} +1 -1
  346. package/dist/{TableBox-DIJffyts.mjs → TableBox-luasMC73.mjs} +11 -11
  347. package/dist/{TableBox-DIJffyts.mjs.map → TableBox-luasMC73.mjs.map} +1 -1
  348. package/dist/TableBox.d.cts +2 -2
  349. package/dist/TableBox.d.mts +2 -2
  350. package/dist/{TableBoxCell-D1bjYv7b.d.mts → TableBoxCell-By1xE6_Q.d.mts} +7 -7
  351. package/dist/{TableBoxCell-DOQ8PnAT.d.cts → TableBoxCell-DIMenSwX.d.cts} +6 -6
  352. package/dist/TableBoxCell.d.cts +1 -1
  353. package/dist/TableBoxCell.d.mts +1 -1
  354. package/dist/TableBoxField.d.cts +3 -3
  355. package/dist/TableBoxField.d.mts +4 -4
  356. package/dist/{TableBoxRow-CTR14HJF.d.mts → TableBoxRow-CsRPRPQ-.d.mts} +4 -4
  357. package/dist/{TableBoxRow-BUK5RjRA.d.cts → TableBoxRow-RNQ6wJLh.d.cts} +3 -3
  358. package/dist/TableBoxRow.d.cts +1 -1
  359. package/dist/TableBoxRow.d.mts +1 -1
  360. package/dist/{TableBoxRowActions-CKgUEH38.d.cts → TableBoxRowActions-CYpoPhYZ.d.cts} +2 -2
  361. package/dist/{TableBoxRowActions-BoMt5d0b.d.mts → TableBoxRowActions-DMYOI8Do.d.mts} +2 -2
  362. package/dist/TableBoxRowActions.d.cts +1 -1
  363. package/dist/TableBoxRowActions.d.mts +1 -1
  364. package/dist/TableCell.d.cts +1 -1
  365. package/dist/TableCell.d.mts +1 -1
  366. package/dist/{TableControls-BZyiqk9V.d.mts → TableControls-BehR7CKS.d.mts} +4 -4
  367. package/dist/TableControls-BtXK7Ils.cjs +3995 -0
  368. package/dist/TableControls-BtXK7Ils.cjs.map +1 -0
  369. package/dist/{TableControls-Bkd3jhC1.d.cts → TableControls-CLNF0AJG.d.cts} +3 -3
  370. package/dist/TableControls-DHMs7o58.mjs +3859 -0
  371. package/dist/TableControls-DHMs7o58.mjs.map +1 -0
  372. package/dist/TableControls.d.cts +1 -1
  373. package/dist/TableControls.d.mts +1 -1
  374. package/dist/{TableControlsContext-D6XpuRVw.d.cts → TableControlsContext-DAZx6Rrj.d.cts} +2 -2
  375. package/dist/{TableControlsContext-CleTWT7z.d.mts → TableControlsContext-D_SBFZN1.d.mts} +2 -2
  376. package/dist/TableControlsContext.d.cts +1 -1
  377. package/dist/TableControlsContext.d.mts +1 -1
  378. package/dist/{TableHead-CTsZNRJm.d.cts → TableHead-Ch4Ho3LW.d.cts} +1 -1
  379. package/dist/{TableHead-wl78HqPT.d.mts → TableHead-LxvG0e9k.d.mts} +1 -1
  380. package/dist/TableHead.d.cts +1 -1
  381. package/dist/TableHead.d.mts +1 -1
  382. package/dist/{TableHeaderCell-UoY92mzR.d.cts → TableHeaderCell-Br8ZE3Xe.d.mts} +1 -1
  383. package/dist/{TableHeaderCell-B2yiOw4w.d.mts → TableHeaderCell-Crsa2R2g.d.cts} +1 -1
  384. package/dist/TableHeaderCell.d.cts +1 -1
  385. package/dist/TableHeaderCell.d.mts +1 -1
  386. package/dist/{TableLayout-GyRS-Awa.d.cts → TableLayout-Ct0kepcA.d.cts} +1 -1
  387. package/dist/{TableLayout-_TWUnffx.d.mts → TableLayout-nwy094C_.d.mts} +1 -1
  388. package/dist/TableLayout.d.cts +1 -1
  389. package/dist/TableLayout.d.mts +1 -1
  390. package/dist/{TableRow-C-faHbkL.d.mts → TableRow-BvS4yjo6.d.mts} +2 -2
  391. package/dist/{TableRow-BVzduO4G.d.cts → TableRow-DVTPqT4w.d.cts} +1 -1
  392. package/dist/TableRow.d.cts +1 -1
  393. package/dist/TableRow.d.mts +1 -1
  394. package/dist/TableTH.d.cts +1 -1
  395. package/dist/TableTH.d.mts +1 -1
  396. package/dist/{TableViewConfigurationDropdown-D2TM2wCv.d.mts → TableViewConfigurationDropdown-BYPh4dIP.d.mts} +2 -2
  397. package/dist/{TableViewConfigurationDropdown-u3-prEHJ.d.cts → TableViewConfigurationDropdown-CaiOGyrU.d.cts} +2 -2
  398. package/dist/TableViewConfigurationDropdown.d.cts +1 -1
  399. package/dist/TableViewConfigurationDropdown.d.mts +1 -1
  400. package/dist/TechnicalSticker.d.mts +1 -1
  401. package/dist/{Text-D3FXEnG6.d.mts → Text-DNPbAuUG.d.mts} +3 -3
  402. package/dist/{Text-CzN0DOXV.cjs → Text-G9QmYf0P.cjs} +1 -1
  403. package/dist/{Text-CzN0DOXV.cjs.map → Text-G9QmYf0P.cjs.map} +1 -1
  404. package/dist/{Text-hEoPeOc9.mjs → Text-RcEfNFLx.mjs} +1 -1
  405. package/dist/{Text-hEoPeOc9.mjs.map → Text-RcEfNFLx.mjs.map} +1 -1
  406. package/dist/Text.d.mts +1 -1
  407. package/dist/{TextArea-KpDoXg-5.d.cts → TextArea-B89wtTsF.d.mts} +2 -2
  408. package/dist/{TextArea-DVHi0K7M.cjs → TextArea-BNiipQDb.cjs} +3 -3
  409. package/dist/{TextArea-DVHi0K7M.cjs.map → TextArea-BNiipQDb.cjs.map} +1 -1
  410. package/dist/{TextArea-weASn4Hq.d.mts → TextArea-CHW9FKM4.d.cts} +2 -2
  411. package/dist/{TextArea-DIPeBLkr.mjs → TextArea-NCLsW-03.mjs} +3 -3
  412. package/dist/{TextArea-DIPeBLkr.mjs.map → TextArea-NCLsW-03.mjs.map} +1 -1
  413. package/dist/TextArea.d.cts +1 -1
  414. package/dist/TextArea.d.mts +1 -1
  415. package/dist/{TextUnderlineTooltip-Cep5cgEQ.d.mts → TextUnderlineTooltip-5-0D8s4z.d.mts} +3 -3
  416. package/dist/{TextUnderlineTooltip-cSMjZOuB.d.cts → TextUnderlineTooltip-DMEyOu8C.d.cts} +2 -2
  417. package/dist/TextUnderlineTooltip.d.cts +1 -1
  418. package/dist/TextUnderlineTooltip.d.mts +1 -1
  419. package/dist/Tile.d.cts +1 -1
  420. package/dist/Tile.d.mts +2 -2
  421. package/dist/Toast.d.cts +1 -1
  422. package/dist/Toast.d.mts +1 -1
  423. package/dist/{Toggle-CfjUQlcK.mjs → Toggle-Bie9zCem.mjs} +5 -5
  424. package/dist/{Toggle-CfjUQlcK.mjs.map → Toggle-Bie9zCem.mjs.map} +1 -1
  425. package/dist/{Toggle-CTtrhzsV.cjs → Toggle-Ce-rF8Xp.cjs} +5 -5
  426. package/dist/{Toggle-CTtrhzsV.cjs.map → Toggle-Ce-rF8Xp.cjs.map} +1 -1
  427. package/dist/{Toggle-BQCOJZjZ.d.mts → Toggle-DzYLgxGk.d.mts} +1 -1
  428. package/dist/{Toggle-CYQE1Nk_.d.cts → Toggle-tbIebQWC.d.cts} +1 -1
  429. package/dist/Toggle.d.cts +1 -1
  430. package/dist/Toggle.d.mts +1 -1
  431. package/dist/{Tooltip-BhGRP9QA.d.cts → Tooltip--eDrrk2r.d.cts} +2 -2
  432. package/dist/{Tooltip-CDvOu1UN.mjs → Tooltip-C6AR1xT-.mjs} +3 -3
  433. package/dist/{Tooltip-CDvOu1UN.mjs.map → Tooltip-C6AR1xT-.mjs.map} +1 -1
  434. package/dist/{Tooltip-DRgufW3i.d.mts → Tooltip-CUC-JuRL.d.mts} +3 -3
  435. package/dist/{Tooltip-vylydKVv.cjs → Tooltip-olP3rdUO.cjs} +3 -3
  436. package/dist/{Tooltip-vylydKVv.cjs.map → Tooltip-olP3rdUO.cjs.map} +1 -1
  437. package/dist/Tooltip.d.cts +1 -1
  438. package/dist/Tooltip.d.mts +1 -1
  439. package/dist/{TruncatedText-Cy8NpHzm.d.mts → TruncatedText-BJnowVTx.d.mts} +1 -1
  440. package/dist/{TruncatedText-D8f3AiBL.d.cts → TruncatedText-Dit2NJI6.d.cts} +1 -1
  441. package/dist/components/Attribute/index.cjs +6 -6
  442. package/dist/components/Attribute/index.mjs +10 -10
  443. package/dist/components/Attribute/index.mjs.map +1 -1
  444. package/dist/components/Badge/index.cjs +1 -1
  445. package/dist/components/Badge/index.mjs +1 -1
  446. package/dist/components/Banner/index.cjs +1 -1
  447. package/dist/components/Banner/index.mjs +1 -1
  448. package/dist/components/Breadcrumbs/index.cjs +3 -271
  449. package/dist/components/Breadcrumbs/index.d.cts +2 -2
  450. package/dist/components/Breadcrumbs/index.d.mts +2 -2
  451. package/dist/components/Breadcrumbs/index.mjs +1 -267
  452. package/dist/components/Button/index.cjs +1 -1
  453. package/dist/components/Button/index.d.mts +2 -2
  454. package/dist/components/Button/index.mjs +1 -1
  455. package/dist/components/ButtonGroup/index.cjs +3 -3
  456. package/dist/components/ButtonGroup/index.mjs +3 -3
  457. package/dist/components/Card/index.cjs +1 -1
  458. package/dist/components/Card/index.d.cts +2 -2
  459. package/dist/components/Card/index.d.mts +2 -2
  460. package/dist/components/Card/index.mjs +1 -1
  461. package/dist/components/CardV2/index.cjs +3 -415
  462. package/dist/components/CardV2/index.d.cts +1 -1
  463. package/dist/components/CardV2/index.d.mts +1 -1
  464. package/dist/components/CardV2/index.mjs +1 -410
  465. package/dist/components/Checkbox/index.cjs +1 -1
  466. package/dist/components/Checkbox/index.d.cts +1 -1
  467. package/dist/components/Checkbox/index.d.mts +1 -1
  468. package/dist/components/Checkbox/index.mjs +1 -1
  469. package/dist/components/Combobox/index.cjs +1 -1
  470. package/dist/components/Combobox/index.d.cts +2 -2
  471. package/dist/components/Combobox/index.d.mts +2 -2
  472. package/dist/components/Combobox/index.mjs +1 -1
  473. package/dist/components/ConfigFormGroup/index.cjs +2 -2
  474. package/dist/components/ConfigFormGroup/index.mjs +2 -2
  475. package/dist/components/DataTable/TableControls/index.cjs +15 -1
  476. package/dist/components/DataTable/TableControls/index.d.cts +16 -6
  477. package/dist/components/DataTable/TableControls/index.d.mts +16 -6
  478. package/dist/components/DataTable/TableControls/index.mjs +2 -2
  479. package/dist/components/DataTable/index.cjs +14 -14
  480. package/dist/components/DataTable/index.mjs +24 -24
  481. package/dist/components/DataTable/index.mjs.map +1 -1
  482. package/dist/components/DataTable/types.d.cts +2 -2
  483. package/dist/components/DataTable/types.d.mts +2 -2
  484. package/dist/components/DatePicker/index.cjs +6 -929
  485. package/dist/components/DatePicker/index.mjs +1 -921
  486. package/dist/components/DropdownButton/index.cjs +1 -1
  487. package/dist/components/DropdownButton/index.mjs +1 -1
  488. package/dist/components/DropdownMenu/index.cjs +1 -1
  489. package/dist/components/DropdownMenu/index.d.cts +1 -1
  490. package/dist/components/DropdownMenu/index.d.mts +1 -1
  491. package/dist/components/DropdownMenu/index.mjs +1 -1
  492. package/dist/components/FormControl/index.cjs +2 -2
  493. package/dist/components/FormControl/index.d.cts +2 -2
  494. package/dist/components/FormControl/index.d.mts +2 -2
  495. package/dist/components/FormControl/index.mjs +2 -2
  496. package/dist/components/FormField/index.cjs +15 -486
  497. package/dist/components/FormField/index.d.cts +1 -1
  498. package/dist/components/FormField/index.d.mts +1 -1
  499. package/dist/components/FormField/index.mjs +1 -470
  500. package/dist/components/HoverCopyableField/index.cjs +1 -1
  501. package/dist/components/HoverCopyableField/index.mjs +1 -1
  502. package/dist/components/ImageTile/index.cjs +8 -8
  503. package/dist/components/ImageTile/index.mjs +8 -8
  504. package/dist/components/Input/index.cjs +1 -1
  505. package/dist/components/Input/index.d.cts +1 -1
  506. package/dist/components/Input/index.d.mts +1 -1
  507. package/dist/components/Input/index.mjs +1 -1
  508. package/dist/components/Link/index.cjs +1 -1
  509. package/dist/components/Link/index.mjs +1 -1
  510. package/dist/components/ListBox/index.cjs +1 -1
  511. package/dist/components/ListBox/index.d.cts +4 -2
  512. package/dist/components/ListBox/index.d.mts +4 -2
  513. package/dist/components/ListBox/index.mjs +1 -1
  514. package/dist/components/LoadingShimmer/index.cjs +1 -1
  515. package/dist/components/LoadingShimmer/index.mjs +1 -1
  516. package/dist/components/MaskedInput/index.cjs +2 -2
  517. package/dist/components/MaskedInput/index.mjs +2 -2
  518. package/dist/components/Menu/index.cjs +1 -1
  519. package/dist/components/Menu/index.d.cts +1 -1
  520. package/dist/components/Menu/index.d.mts +1 -1
  521. package/dist/components/Menu/index.mjs +1 -1
  522. package/dist/components/Modal/index.cjs +7 -7
  523. package/dist/components/Modal/index.mjs +7 -7
  524. package/dist/components/PageHeader/index.cjs +3 -67
  525. package/dist/components/PageHeader/index.mjs +1 -63
  526. package/dist/components/Pagination/index.cjs +1 -1
  527. package/dist/components/Pagination/index.d.cts +3 -3
  528. package/dist/components/Pagination/index.d.mts +3 -3
  529. package/dist/components/Pagination/index.mjs +1 -1
  530. package/dist/components/Pii/index.cjs +1 -1
  531. package/dist/components/Pii/index.mjs +1 -1
  532. package/dist/components/Popover/index.cjs +1 -1
  533. package/dist/components/Popover/index.mjs +1 -1
  534. package/dist/components/ProgressBar/index.cjs +1 -1
  535. package/dist/components/ProgressBar/index.mjs +1 -1
  536. package/dist/components/Radio/index.cjs +1 -1
  537. package/dist/components/Radio/index.mjs +1 -1
  538. package/dist/components/RadioGroup/index.cjs +1 -1
  539. package/dist/components/RadioGroup/index.d.cts +1 -1
  540. package/dist/components/RadioGroup/index.d.mts +1 -1
  541. package/dist/components/RadioGroup/index.mjs +1 -1
  542. package/dist/components/SegmentedControl/index.cjs +1 -1
  543. package/dist/components/SegmentedControl/index.d.cts +1 -1
  544. package/dist/components/SegmentedControl/index.d.mts +1 -1
  545. package/dist/components/SegmentedControl/index.mjs +1 -1
  546. package/dist/components/Select/index.cjs +1 -1
  547. package/dist/components/Select/index.d.cts +1 -1
  548. package/dist/components/Select/index.d.mts +1 -1
  549. package/dist/components/Select/index.mjs +1 -1
  550. package/dist/components/Slider/index.cjs +2 -2
  551. package/dist/components/Slider/index.mjs +2 -2
  552. package/dist/components/Spacer/index.cjs +1 -1
  553. package/dist/components/Spacer/index.mjs +1 -1
  554. package/dist/components/Stack/index.cjs +1 -1
  555. package/dist/components/Stack/index.d.cts +1 -1
  556. package/dist/components/Stack/index.d.mts +1 -1
  557. package/dist/components/Stack/index.mjs +1 -1
  558. package/dist/components/StatusIndicator/index.cjs +60 -10
  559. package/dist/components/StatusIndicator/index.cjs.map +1 -1
  560. package/dist/components/StatusIndicator/index.d.cts +2 -2
  561. package/dist/components/StatusIndicator/index.d.mts +2 -2
  562. package/dist/components/StatusIndicator/index.mjs +61 -12
  563. package/dist/components/StatusIndicator/index.mjs.map +1 -1
  564. package/dist/components/Sticker/index.cjs +1 -1
  565. package/dist/components/Sticker/index.d.cts +1 -1
  566. package/dist/components/Sticker/index.d.mts +1 -1
  567. package/dist/components/Sticker/index.mjs +1 -1
  568. package/dist/components/TabBar/index.cjs +1 -1
  569. package/dist/components/TabBar/index.mjs +1 -1
  570. package/dist/components/Table/index.cjs +1 -1
  571. package/dist/components/Table/index.d.cts +7 -7
  572. package/dist/components/Table/index.d.mts +7 -7
  573. package/dist/components/Table/index.mjs +1 -1
  574. package/dist/components/TableBox/index.cjs +1 -1
  575. package/dist/components/TableBox/index.d.cts +2 -2
  576. package/dist/components/TableBox/index.d.mts +2 -2
  577. package/dist/components/TableBox/index.mjs +1 -1
  578. package/dist/components/TechnicalSticker/index.cjs +4 -4
  579. package/dist/components/TechnicalSticker/index.mjs +4 -4
  580. package/dist/components/Text/index.cjs +1 -1
  581. package/dist/components/Text/index.d.mts +1 -1
  582. package/dist/components/Text/index.mjs +1 -1
  583. package/dist/components/TextArea/index.cjs +1 -1
  584. package/dist/components/TextArea/index.d.cts +1 -1
  585. package/dist/components/TextArea/index.d.mts +1 -1
  586. package/dist/components/TextArea/index.mjs +1 -1
  587. package/dist/components/Tile/index.cjs +4 -4
  588. package/dist/components/Tile/index.mjs +4 -4
  589. package/dist/components/Toast/index.cjs +1 -1
  590. package/dist/components/Toast/index.mjs +1 -1
  591. package/dist/components/Toggle/index.cjs +1 -1
  592. package/dist/components/Toggle/index.d.cts +1 -1
  593. package/dist/components/Toggle/index.d.mts +1 -1
  594. package/dist/components/Toggle/index.mjs +1 -1
  595. package/dist/components/Tooltip/index.cjs +1 -1
  596. package/dist/components/Tooltip/index.d.cts +3 -3
  597. package/dist/components/Tooltip/index.d.mts +3 -3
  598. package/dist/components/Tooltip/index.mjs +1 -1
  599. package/dist/compound-expression.d.mts +9 -0
  600. package/dist/{constants-kwVsjw8O.d.cts → constants-B6c8S033.d.cts} +1 -1
  601. package/dist/{constants-DVwPpTt5.d.mts → constants-BASogfT_.d.mts} +1 -1
  602. package/dist/constants.d.cts +1 -1
  603. package/dist/constants.d.mts +1 -1
  604. package/dist/containers.d.mts +8 -0
  605. package/dist/display.d.mts +8 -0
  606. package/dist/fieldPickerOptions.d.mts +29 -0
  607. package/dist/filter-size-context-Blw6Sd69.d.mts +52 -0
  608. package/dist/filter-size-context-CIw0Zi6r.d.cts +52 -0
  609. package/dist/filter-size-context.d.cts +2 -0
  610. package/dist/filter-size-context.d.mts +2 -0
  611. package/dist/helpers.d.cts +1 -1
  612. package/dist/helpers.d.mts +1 -1
  613. package/dist/index-4_B2yRzD.d.mts +7 -0
  614. package/dist/{index-_tQRydn9.d.cts → index-Bw8QVu_o.d.cts} +3 -3
  615. package/dist/index-C9EIpBh8.d.cts +7 -0
  616. package/dist/index-D34XP8vp.d.cts +54 -0
  617. package/dist/{index-BPnJP0jZ.d.mts → index-DDbjWdk0.d.mts} +4 -4
  618. package/dist/index-IlwGkCAe2.d.mts +54 -0
  619. package/dist/index-sQecLSpR.d.cts +1 -0
  620. package/dist/index-sViox9YW.d.mts +1 -0
  621. package/dist/index.d.cts +1 -1
  622. package/dist/index.d.mts +1 -1
  623. package/dist/index2.d.cts +1 -1
  624. package/dist/index2.d.mts +1 -1
  625. package/dist/index3.d.cts +4 -1
  626. package/dist/index3.d.mts +4 -1
  627. package/dist/index4.d.cts +11 -0
  628. package/dist/index4.d.mts +11 -0
  629. package/dist/index5.d.cts +1 -0
  630. package/dist/index5.d.mts +2 -0
  631. package/dist/index6.d.mts +1 -0
  632. package/dist/{input-DrG6mA0V.d.mts → input-Bv5fKt5J.d.mts} +3 -3
  633. package/dist/{input-BkzqXwn7.d.cts → input-DPB0cX2m.d.cts} +2 -2
  634. package/dist/inputFields.d.cts +10 -10
  635. package/dist/inputFields.d.mts +11 -11
  636. package/dist/{intersperse-Gxwgpbk8.cjs → intersperse-_0nQM5Rb.cjs} +1 -1
  637. package/dist/{intersperse-Gxwgpbk8.cjs.map → intersperse-_0nQM5Rb.cjs.map} +1 -1
  638. package/dist/{intersperse-yd3oMrQl.mjs → intersperse-vOYvFOfF.mjs} +1 -1
  639. package/dist/{intersperse-yd3oMrQl.mjs.map → intersperse-vOYvFOfF.mjs.map} +1 -1
  640. package/dist/layouts/LayoutLoadingShimmer/index.cjs +139 -0
  641. package/dist/layouts/LayoutLoadingShimmer/index.cjs.map +1 -0
  642. package/dist/layouts/LayoutLoadingShimmer/index.d.cts +2 -0
  643. package/dist/layouts/LayoutLoadingShimmer/index.d.mts +2 -0
  644. package/dist/layouts/LayoutLoadingShimmer/index.mjs +133 -0
  645. package/dist/layouts/LayoutLoadingShimmer/index.mjs.map +1 -0
  646. package/dist/lib/MiddleTruncatedText.cjs +1 -1
  647. package/dist/lib/MiddleTruncatedText.mjs +1 -1
  648. package/dist/lib/PDSProvider.d.mts +1 -1
  649. package/dist/lib/TruncatedText.cjs +1 -1
  650. package/dist/lib/TruncatedText.d.cts +1 -1
  651. package/dist/lib/TruncatedText.d.mts +1 -1
  652. package/dist/lib/TruncatedText.mjs +1 -1
  653. package/dist/lib/TruncatedTextWithTooltip.cjs +2 -2
  654. package/dist/lib/TruncatedTextWithTooltip.d.cts +1 -1
  655. package/dist/lib/TruncatedTextWithTooltip.d.mts +1 -1
  656. package/dist/lib/TruncatedTextWithTooltip.mjs +2 -2
  657. package/dist/lib/message.d.cts +1 -1
  658. package/dist/lib/message.d.mts +1 -1
  659. package/dist/lib/pseudoClass.d.mts +1 -1
  660. package/dist/{message-C2286H-r.d.cts → message-BEgtEjQC.d.cts} +1 -1
  661. package/dist/{message-BfJ87aIU.d.mts → message-CMHvlPGn.d.mts} +1 -1
  662. package/dist/mixins/focus.d.mts +1 -1
  663. package/dist/mixins/hoverable.d.mts +2 -2
  664. package/dist/mixins/input.d.cts +1 -1
  665. package/dist/mixins/input.d.mts +1 -1
  666. package/dist/mixins/menuItem.d.mts +2 -2
  667. package/dist/mixins/text.d.mts +1 -1
  668. package/dist/operators-1qE2GpC7.d.cts +43 -0
  669. package/dist/operators-Bo31xlc2.d.mts +43 -0
  670. package/dist/operators.d.cts +2 -0
  671. package/dist/operators.d.mts +2 -0
  672. package/dist/{text-CtoDqqAO.d.mts → text-B21s9mRZ.d.mts} +1 -1
  673. package/dist/{theme-Bx2sn3Lt.d.mts → theme-BzBpJXhO.d.mts} +1 -1
  674. package/dist/theme.d.mts +1 -1
  675. package/dist/types-B_HHNlia.d.cts +158 -0
  676. package/dist/types-CCvc590y.d.cts +45 -0
  677. package/dist/{types-CuCT-YnX.d.cts → types-CkiXVJeR.d.cts} +1 -1
  678. package/dist/types-D58IoRx6.d.mts +158 -0
  679. package/dist/types-D7ppqnNj.d.mts +45 -0
  680. package/dist/{types-B34lbI2k.d.mts → types-DEh_pXgS.d.mts} +1 -1
  681. package/dist/{types-C_AUGurs.d.cts → types-SYSKcZKW.d.cts} +1 -1
  682. package/dist/{types-DTak9UTv.d.mts → types-TV9nVfSe.d.mts} +1 -1
  683. package/dist/types.d.cts +1 -1
  684. package/dist/types.d.mts +1 -1
  685. package/dist/types2.d.cts +2 -2
  686. package/dist/types2.d.mts +2 -2
  687. package/dist/types3.d.cts +2 -0
  688. package/dist/types3.d.mts +2 -0
  689. package/dist/types4.d.cts +2 -0
  690. package/dist/types4.d.mts +2 -0
  691. package/dist/use-rules-popover-selection.d.mts +19 -0
  692. package/dist/useComboboxFooterAction.d.mts +47 -0
  693. package/dist/useFilterStateV2-DCQghouq.d.mts +93 -0
  694. package/dist/useFilterStateV2-DbPwX5N1.d.cts +93 -0
  695. package/dist/useFilterStateV2.d.cts +2 -0
  696. package/dist/useFilterStateV2.d.mts +2 -0
  697. package/dist/{useFormField-CaIdE7JQ.d.cts → useFormField--Q8ZdpW5.d.cts} +2 -2
  698. package/dist/{useFormField-B98dmreO.cjs → useFormField-BZlArnsI.cjs} +2 -2
  699. package/dist/{useFormField-B98dmreO.cjs.map → useFormField-BZlArnsI.cjs.map} +1 -1
  700. package/dist/{useFormField-BE0rTBF1.d.mts → useFormField-D8mLsiQc.d.mts} +2 -2
  701. package/dist/{useFormField-eftOPiXj.mjs → useFormField-DhYd6bNn.mjs} +2 -2
  702. package/dist/{useFormField-eftOPiXj.mjs.map → useFormField-DhYd6bNn.mjs.map} +1 -1
  703. package/dist/useFormField.d.cts +1 -1
  704. package/dist/useFormField.d.mts +1 -1
  705. package/dist/{useFormGroup-BE7v9eAj.cjs → useFormGroup-Bmnzgq0S.cjs} +1 -1
  706. package/dist/{useFormGroup-BE7v9eAj.cjs.map → useFormGroup-Bmnzgq0S.cjs.map} +1 -1
  707. package/dist/{useFormGroup-BMukAMAd.mjs → useFormGroup-DWVW7A9f.mjs} +1 -1
  708. package/dist/{useFormGroup-BMukAMAd.mjs.map → useFormGroup-DWVW7A9f.mjs.map} +1 -1
  709. package/dist/{useTableBoxDragAndDrop--QBq2FQh.d.cts → useTableBoxDragAndDrop-BMo-iaUF.d.mts} +1 -1
  710. package/dist/{useTableBoxDragAndDrop-BTtv9PEt.d.mts → useTableBoxDragAndDrop-DnbUToce.d.cts} +1 -1
  711. package/dist/useTableBoxDragAndDrop.d.cts +1 -1
  712. package/dist/useTableBoxDragAndDrop.d.mts +1 -1
  713. package/dist/{useToggle-3k3EkV8V.mjs → useToggle-Bo3yd14Y.mjs} +1 -1
  714. package/dist/{useToggle-3k3EkV8V.mjs.map → useToggle-Bo3yd14Y.mjs.map} +1 -1
  715. package/dist/{useToggle-CSkZWXtQ.cjs → useToggle-DARO917w.cjs} +1 -1
  716. package/dist/{useToggle-CSkZWXtQ.cjs.map → useToggle-DARO917w.cjs.map} +1 -1
  717. package/dist/useTruncation.d.mts +1 -1
  718. package/dist/{utilities-DqO6Sh94.d.cts → utilities-BO_95qFA.d.mts} +1 -1
  719. package/dist/{utilities-SMbDe8oK.d.mts → utilities-mSlaTrjB.d.cts} +1 -1
  720. package/dist/utilities.d.cts +1 -1
  721. package/dist/utilities.d.mts +1 -1
  722. package/dist/utils/storybook.cjs +1 -1
  723. package/dist/utils/storybook.mjs +1 -1
  724. package/dist/utils/testing.cjs +1 -1
  725. package/dist/utils/testing.d.mts +1 -1
  726. package/dist/utils/testing.mjs +1 -1
  727. package/dist/utils.d.mts +22 -5
  728. package/dist/utils2.d.mts +9 -0
  729. package/dist/validation-CJymv6JE.d.cts +51 -0
  730. package/dist/validation-vLh3t2dk.d.mts +51 -0
  731. package/dist/validation.d.cts +2 -0
  732. package/dist/validation.d.mts +2 -0
  733. package/dist/value-control-resolver-B9p25q3G.d.cts +46 -0
  734. package/dist/value-control-resolver-CE-bqdAl.d.mts +46 -0
  735. package/dist/value-control-resolver.d.cts +2 -0
  736. package/dist/value-control-resolver.d.mts +2 -0
  737. package/package.json +12 -3
  738. package/dist/Combobox-4Bi9-N1p.cjs.map +0 -1
  739. package/dist/Combobox-CeKMrlxy.mjs.map +0 -1
  740. package/dist/ListBox-BCscLcYL.cjs.map +0 -1
  741. package/dist/ListBox-CDNOJmvz.mjs.map +0 -1
  742. package/dist/Pagination-Cj08JRG9.mjs.map +0 -1
  743. package/dist/Pagination-D4IVVj3S.cjs.map +0 -1
  744. package/dist/SegmentedControl-B1ZLgu61.mjs.map +0 -1
  745. package/dist/SegmentedControl-CIJz0oxY.cjs.map +0 -1
  746. package/dist/Select-ByTgXOlU.mjs.map +0 -1
  747. package/dist/Select-C65bfYeT.cjs.map +0 -1
  748. package/dist/TableControls-BkdSeQvt.mjs +0 -1029
  749. package/dist/TableControls-BkdSeQvt.mjs.map +0 -1
  750. package/dist/TableControls-DcbnNqeK.cjs +0 -1080
  751. package/dist/TableControls-DcbnNqeK.cjs.map +0 -1
  752. package/dist/components/Breadcrumbs/index.cjs.map +0 -1
  753. package/dist/components/Breadcrumbs/index.mjs.map +0 -1
  754. package/dist/components/CardV2/index.cjs.map +0 -1
  755. package/dist/components/CardV2/index.mjs.map +0 -1
  756. package/dist/components/DatePicker/index.cjs.map +0 -1
  757. package/dist/components/DatePicker/index.mjs.map +0 -1
  758. package/dist/components/FormField/index.cjs.map +0 -1
  759. package/dist/components/FormField/index.mjs.map +0 -1
  760. package/dist/components/PageHeader/index.cjs.map +0 -1
  761. package/dist/components/PageHeader/index.mjs.map +0 -1
  762. /package/dist/{index-8SLBz2NH.d.mts → index--p6oQT9I.d.mts} +0 -0
  763. /package/dist/{index-B2KLYYkM.d.cts → index-BIAn8oQh.d.cts} +0 -0
  764. /package/dist/{index-B5cbLMbC2.d.cts → index-BL32-cvv.d.cts} +0 -0
  765. /package/dist/{index-BCsiC0tv.d.cts → index-BXpMZvwA.d.cts} +0 -0
  766. /package/dist/{index-BPiqSRRl.d.mts → index-BYd3Btr1.d.mts} +0 -0
  767. /package/dist/{index-BSVhZrWN.d.mts → index-BhY1qu3m.d.cts} +0 -0
  768. /package/dist/{index-BTImeehL2.d.mts → index-BlwcRiXv.d.cts} +0 -0
  769. /package/dist/{index-C3kE54DD.d.mts → index-C1ihAKnV.d.cts} +0 -0
  770. /package/dist/{index-C6yvNuzO.d.cts → index-CDAfh8Ew.d.cts} +0 -0
  771. /package/dist/{index-C8k_zgEm.d.cts → index-CDGG7lCB.d.mts} +0 -0
  772. /package/dist/{index-CEqOS-7M.d.mts → index-CFG0_wK4.d.cts} +0 -0
  773. /package/dist/{index-CROz1VSV.d.mts → index-CKKoxA9V.d.mts} +0 -0
  774. /package/dist/{index-CWt1yJ75.d.cts → index-CMuRFTR3.d.mts} +0 -0
  775. /package/dist/{index-CmCelmEL.d.cts → index-CNxS4Tlu.d.mts} +0 -0
  776. /package/dist/{index-CmUzJ4E-2.d.cts → index-CQ25UCod.d.cts} +0 -0
  777. /package/dist/{index-CsuikFeJ.d.mts → index-CWB6exYm.d.mts} +0 -0
  778. /package/dist/{index-CtCMUyZA.d.cts → index-Cv0jeUQf2.d.cts} +0 -0
  779. /package/dist/{index-Cz6N-KeS.d.cts → index-CwSIy_W-.d.cts} +0 -0
  780. /package/dist/{index-D2HUTZ-d.d.cts → index-CzItj62a.d.mts} +0 -0
  781. /package/dist/{index-D8dPsry7.d.mts → index-D4DUvwPf.d.mts} +0 -0
  782. /package/dist/{index-DeEmP3Jc.d.cts → index-D6CnpA_r.d.cts} +0 -0
  783. /package/dist/{index-DeVKzGce.d.mts → index-D9IqtUDs.d.cts} +0 -0
  784. /package/dist/{index-DrZ2Dh-H.d.cts → index-DFKoAoY2.d.cts} +0 -0
  785. /package/dist/{index-DxSM7VXJ.d.cts → index-DGsJdI5l.d.mts} +0 -0
  786. /package/dist/{index-FtE8MXJ_.d.mts → index-DM6vVDZD.d.mts} +0 -0
  787. /package/dist/{index-JuxZj_Qp2.d.mts → index-DWfPppPU.d.mts} +0 -0
  788. /package/dist/{index-LhFpnU-f.d.mts → index-DXJd7-2Z.d.mts} +0 -0
  789. /package/dist/{index-N-OgGgfF.d.mts → index-DkrC-i1D.d.mts} +0 -0
  790. /package/dist/{index-NKYLt_R9.d.mts → index-DpEKQcoR.d.cts} +0 -0
  791. /package/dist/{index-VWno75SQ.d.mts → index-DvuJXuAN.d.mts} +0 -0
  792. /package/dist/{index-c55Utzva.d.mts → index-Iujpc9_6.d.mts} +0 -0
  793. /package/dist/{index-gpCH5158.d.mts → index-PWQavSPf.d.mts} +0 -0
  794. /package/dist/{index-lQ_hGQ08.d.cts → index-dC-i2r_u.d.cts} +0 -0
  795. /package/dist/{index-luywJTzJ.d.mts → index-e6k85DKM.d.mts} +0 -0
  796. /package/dist/{index-zO0Ly4bS.d.cts → index-lIMqGGJz.d.mts} +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.cjs","names":["Spacing","Typography","IconButton","Typography","Color","BorderRadius","Color","Typography","GregorianCalendar","ArrowLeftIcon","ArrowRightIcon","isFocused","Color","Spacing","inputMixin","isFocusedVisible","isNotDisabled","focusWithinOutline","OpenButton","Popover","Z_INDICES","VisuallyHidden","MenuItem","isNotDisabled","isHovered","isFocused","Color","Settings","MenuList","Spacing","BorderRadius","Card","Color","Settings","ArrowLeftIcon","ArrowRightIcon","RangeCalendarPresets","VisuallyHidden","FormLabel","Spacing","Typography","ClearButton","isDisabled","Settings","CalendarDate","Popover","CircleXInverseIcon","VisuallyHidden"],"sources":["../../../components/DatePicker/Calendar/CalendarBase.tsx","../../../components/DatePicker/Calendar/CalendarCell.tsx","../../../components/DatePicker/Calendar/CalendarGrid.tsx","../../../components/DatePicker/common.ts","../../../components/DatePicker/Calendar/Calendar.tsx","../../../components/DatePicker/DateField.tsx","../../../components/DatePicker/DatePicker.tsx","../../../components/DatePicker/Calendar/RangeCalendarPresets.tsx","../../../components/DatePicker/Calendar/RangeCalendar.tsx","../../../components/DatePicker/DateRangePicker.tsx"],"sourcesContent":["import { useRef } from 'react';\nimport { useButton } from 'react-aria';\nimport styled from 'styled-components';\n\nimport { Spacing, Typography } from '@persona/design-tokens';\nimport { IconButton } from 'design-system/components/Button';\nimport type { IconButtonProps } from 'design-system/components/Button/IconButton';\n\nexport const CalendarContainer = styled.div`\n display: inline-block;\n`;\n\nexport const CalendarHeader = styled.div`\n display: flex;\n align-items: center;\n margin-bottom: ${Spacing[2]};\n`;\n\nexport const CalendarHeading = styled.div`\n ${Typography.TextLargeBold};\n flex: 1;\n text-align: center;\n`;\n\nconst StyledCalendarButton = styled(IconButton)`\n width: 32px;\n height: 32px;\n`;\n\nexport const CalendarButton = (props: IconButtonProps) => {\n const ref = useRef();\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n const { buttonProps } = useButton(props, ref);\n\n return (\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n <StyledCalendarButton {...buttonProps} className={props.className} ref={ref}>\n {props.children}\n </StyledCalendarButton>\n );\n};\n","import { type CalendarDate, type DateValue, isSameDay, isSameMonth } from '@internationalized/date';\nimport { useRef } from 'react';\nimport { useCalendarCell } from 'react-aria';\nimport type { CalendarState, RangeCalendarState } from 'react-stately';\nimport styled, { css } from 'styled-components';\n\nimport { BorderRadius, Color, Typography } from '@persona/design-tokens';\n\nconst CalendarCellContainer = styled.td`\n text-align: center;\n width: 38px;\n height: 38px;\n padding: 0px;\n`;\n\ninterface CalendarCellButtonProps {\n isSelected?: boolean;\n isSelectionStart?: boolean;\n isSelectionEnd?: boolean;\n isInvalid?: boolean;\n isDisabled?: boolean;\n}\n\nconst CalendarCellButton = styled.button<CalendarCellButtonProps>`\n ${Typography.TextMedium};\n border-style: none;\n padding: 0;\n background: none;\n width: 100%;\n height: 100%;\n cursor: pointer;\n position: relative;\n\n ${({ isSelected }) =>\n isSelected &&\n css`\n background: ${Color.CorePurple100};\n `}\n\n ${({ isSelectionStart }) =>\n isSelectionStart &&\n css`\n background: ${Color.BackgroundButtonPrimary};\n color: ${Color.TextInverse};\n border-top-left-radius: ${BorderRadius.Sm};\n border-bottom-left-radius: ${BorderRadius.Sm};\n `}\n\n ${({ isSelectionEnd }) =>\n isSelectionEnd &&\n css`\n background: ${Color.BackgroundButtonPrimary};\n color: ${Color.TextInverse};\n border-top-right-radius: ${BorderRadius.Sm};\n border-bottom-right-radius: ${BorderRadius.Sm};\n `}\n\n ${({ isDisabled }) =>\n isDisabled &&\n css`\n color: ${Color.CoreSlate300};\n `}\n\n ${({ isInvalid }) =>\n isInvalid &&\n css`\n background: ${Color.BackgroundButtonDanger};\n color: ${Color.TextInverse};\n `}\n\n &:focus-visible {\n outline: 2px solid ${Color.BorderFocus};\n outline-offset: -2px;\n box-shadow: ${Color.PrimaryWhite} 0px 0px 0px 3px inset;\n z-index: 1;\n }\n`;\n\ninterface CalendarCellProps {\n state: CalendarState | RangeCalendarState;\n date: CalendarDate;\n currentMonth: DateValue;\n}\n\nconst CalendarCell = ({ state, date, currentMonth }: CalendarCellProps) => {\n const ref = useRef();\n const { cellProps, buttonProps, isSelected, isInvalid, isDisabled, formattedDate } =\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n useCalendarCell({ date }, state, ref);\n\n const highlightedRange = 'highlightedRange' in state && state.highlightedRange;\n\n const isOutsideMonth = !isSameMonth(currentMonth, date);\n const isSelectionStart = highlightedRange ? isSameDay(date, highlightedRange.start) : isSelected;\n const isSelectionEnd = highlightedRange ? isSameDay(date, highlightedRange.end) : isSelected;\n\n return (\n <CalendarCellContainer {...cellProps}>\n <CalendarCellButton\n {...buttonProps}\n hidden={isOutsideMonth}\n isSelected={isSelected}\n isSelectionStart={isSelectionStart}\n isSelectionEnd={isSelectionEnd}\n isInvalid={isInvalid}\n isDisabled={isDisabled}\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n ref={ref}\n >\n {formattedDate}\n </CalendarCellButton>\n </CalendarCellContainer>\n );\n};\n\nexport default CalendarCell;\n","import { type DateDuration, endOfMonth, getWeeksInMonth } from '@internationalized/date';\nimport { useCalendarGrid, useLocale } from 'react-aria';\nimport type { CalendarState, RangeCalendarState } from 'react-stately';\nimport styled from 'styled-components';\n\nimport { Color, Typography } from '@persona/design-tokens';\n\nimport CalendarCell from './CalendarCell';\n\nconst CalendarGridContainer = styled.table`\n width: 266px;\n border-spacing: 0px;\n border-collapse: collapse;\n\n &:focus-visible {\n outline: 2px solid ${Color.BorderFocus};\n outline-offset: 1px;\n }\n`;\n\nconst CalendarGridDayHeader = styled.th`\n ${Typography.TextMedium};\n color: ${Color.TextSecondary};\n`;\n\ninterface CalendarGridProps {\n state: CalendarState | RangeCalendarState;\n offset?: DateDuration;\n skipFromTabOrder?: boolean;\n}\n\nconst CalendarGrid = ({ state, offset = {}, skipFromTabOrder = false }: CalendarGridProps) => {\n const { locale } = useLocale();\n const startDate = state.visibleRange.start.add(offset);\n const endDate = endOfMonth(startDate);\n\n const { gridProps, headerProps, weekDays } = useCalendarGrid(\n {\n startDate,\n endDate,\n },\n state,\n );\n\n const weeksInMonth = getWeeksInMonth(startDate, locale);\n\n // Remove second calendar grid from tab order - use arrow keys to navigate between months\n const modifiedGridProps = skipFromTabOrder ? { ...gridProps, tabIndex: -1 } : gridProps;\n\n return (\n <CalendarGridContainer {...modifiedGridProps}>\n <thead {...headerProps}>\n <tr>\n {weekDays.map((day, index) => (\n <CalendarGridDayHeader key={index}>{day}</CalendarGridDayHeader>\n ))}\n </tr>\n </thead>\n <tbody>\n {[...new Array(weeksInMonth).keys()].map((weekIndex) => (\n <tr key={weekIndex}>\n {state\n .getDatesInWeek(weekIndex, startDate)\n .map((date, i) =>\n date ? (\n <CalendarCell key={i} state={state} date={date} currentMonth={startDate} />\n ) : (\n <td key={i} />\n ),\n )}\n </tr>\n ))}\n </tbody>\n </CalendarGridContainer>\n );\n};\n\nexport default CalendarGrid;\n","import { GregorianCalendar } from '@internationalized/date';\n\nexport const createCalendar = () => new GregorianCalendar();\n","import type { Ref } from 'react';\nimport { type AriaCalendarProps, type DateValue, useCalendar, useLocale } from 'react-aria';\nimport { useCalendarState } from 'react-stately';\n\nimport { ArrowLeftIcon, ArrowRightIcon } from '@persona/icons';\nimport {\n CalendarButton,\n CalendarContainer,\n CalendarHeader,\n CalendarHeading,\n} from 'design-system/components/DatePicker/Calendar/CalendarBase';\nimport CalendarGrid from 'design-system/components/DatePicker/Calendar/CalendarGrid';\nimport { createCalendar } from 'design-system/components/DatePicker/common';\n\ninterface CalendarProps extends AriaCalendarProps<DateValue> {\n calendarRef?: Ref<HTMLDivElement>;\n}\n\nconst Calendar = (props: CalendarProps) => {\n const { locale } = useLocale();\n const state = useCalendarState({ ...props, locale, createCalendar });\n const { calendarProps, prevButtonProps, nextButtonProps, title } = useCalendar(props, state);\n\n return (\n <CalendarContainer {...calendarProps} ref={props.calendarRef}>\n <CalendarHeader>\n <CalendarButton {...prevButtonProps}>\n <ArrowLeftIcon />\n </CalendarButton>\n <CalendarHeading>{title}</CalendarHeading>\n <CalendarButton {...nextButtonProps}>\n <ArrowRightIcon />\n </CalendarButton>\n </CalendarHeader>\n <CalendarGrid state={state} />\n </CalendarContainer>\n );\n};\n\nexport default Calendar;\n","import type { DateValue } from '@internationalized/date';\nimport { type AriaDateFieldProps, useDateField, useDateSegment } from '@react-aria/datepicker';\nimport { useLocale } from '@react-aria/i18n';\nimport { mergeRefs } from '@react-aria/utils';\nimport {\n type DateFieldState,\n type DateSegment as DateSegmentObj,\n type SegmentType,\n useDateFieldState,\n} from '@react-stately/datepicker';\nimport { forwardRef, useRef } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { Color, Spacing } from '@persona/design-tokens';\nimport { createCalendar } from 'design-system/components/DatePicker/common';\nimport { isFocused, isFocusedVisible, isNotDisabled } from 'design-system/lib/pseudoClass';\nimport { focusWithinOutline } from 'design-system/mixins/focus';\nimport inputMixin, { type InputMixinProps, type InputSizes } from 'design-system/mixins/input';\nimport type PseudoClassProps from 'design-system/types/PseudoClassProps';\n\ntype DateSegmentContainerProps = { $isComma?: boolean; $isTimezone?: boolean } & PseudoClassProps;\nconst DateSegmentContainer = styled.div<DateSegmentContainerProps>`\n font-variant-numeric: tabular-nums;\n box-sizing: content-box;\n text-align: end;\n\n ${isFocused} {\n outline: 2px solid ${Color.BorderFocus};\n outline-offset: 1px;\n background-color: ${Color.CorePurple200};\n }\n\n ${({ $isComma, $isTimezone }) =>\n ($isComma || $isTimezone) &&\n css`\n margin-left: 0.25ch;\n margin-right: 0.25ch;\n `}\n\n ${({ $isTimezone }) =>\n $isTimezone &&\n css`\n color: ${Color.TextSecondary};\n pointer-events: none;\n\n &:focus {\n outline: none;\n background-color: transparent;\n }\n `}\n`;\n\ntype DateSegmentPlaceholderProps = { isPlaceholder?: boolean; type: SegmentType };\nconst DateSegmentPlaceholder = styled.span<DateSegmentPlaceholderProps>`\n display: block;\n width: 100%;\n pointer-events: none;\n\n &:focus {\n outline: none;\n }\n\n ${({ isPlaceholder }) =>\n isPlaceholder\n ? css`\n height: 100%;\n color: ${({ theme }) => theme.color.text.tertiary};\n `\n : css`\n visibility: hidden;\n height: 0;\n `}\n ${({ type }) =>\n type === 'literal' &&\n css`\n padding-left: ${Spacing[1]};\n padding-right: ${Spacing[1]};\n `}\n ${({ type, isPlaceholder }) =>\n type === 'month' &&\n isPlaceholder &&\n css`\n width: 3ch;\n `}\n`;\n\ninterface DateSegmentProps {\n segment: DateSegmentObj;\n state: DateFieldState;\n}\n\nfunction DateSegment({ segment, state }: DateSegmentProps) {\n const ref = useRef();\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n const { segmentProps } = useDateSegment(segment, state, ref);\n\n let minWidth: string;\n\n switch (segment.type) {\n case 'dayPeriod': {\n minWidth = '2.75ch';\n break;\n }\n default: {\n minWidth = `${segment.maxValue != null && String(segment.maxValue).length + 0.25}ch`;\n break;\n }\n }\n\n const isComma = segment.type === 'literal' && segment.text === ', ';\n const isTimezone = segment.type === 'timeZoneName';\n\n return (\n <DateSegmentContainer\n {...segmentProps}\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n ref={ref}\n style={{\n ...segmentProps.style,\n minWidth,\n }}\n $isComma={isComma}\n $isTimezone={isTimezone}\n {...(isTimezone && { tabIndex: -1, role: 'presentation' })}\n >\n {/* Always reserve space for the placeholder, to prevent layout shift when editing. */}\n {segment.placeholder && (\n <DateSegmentPlaceholder\n aria-hidden='true'\n isPlaceholder={segment.isPlaceholder}\n type={segment.type}\n >\n {segment.placeholder}\n </DateSegmentPlaceholder>\n )}\n {segment.isPlaceholder ? '' : segment.text}\n </DateSegmentContainer>\n );\n}\n\nconst InputBox = styled.div<InputMixinProps & { $inputPosition: 'start' | 'end' }>`\n ${inputMixin};\n display: flex;\n padding-left: ${Spacing[2]};\n padding-right: ${Spacing[2]};\n line-height: 1;\n position: relative;\n\n &${isFocusedVisible}${isNotDisabled} {\n position: relative;\n z-index: 1;\n }\n\n ${focusWithinOutline}\n\n ${({ $inputPosition }) => {\n switch ($inputPosition) {\n case 'start': {\n return css`\n border-top-right-radius: 0px;\n border-bottom-right-radius: 0px;\n `;\n }\n case 'end': {\n return css`\n margin-left: -1px;\n border-top-left-radius: 0px;\n border-bottom-left-radius: 0px;\n `;\n }\n }\n }}\n`;\n\ninterface DateFieldProps extends AriaDateFieldProps<DateValue> {\n inputPosition?: 'start' | 'end';\n focused?: boolean;\n readOnly?: boolean;\n value?: DateValue;\n disabled?: boolean;\n size?: InputSizes;\n style?: React.CSSProperties;\n dateFieldProps?: {\n style?: React.CSSProperties;\n };\n hasError?: boolean;\n}\n\nexport const DateField = forwardRef<HTMLDivElement, DateFieldProps>(function DateField(\n props: DateFieldProps,\n forwardedRef,\n) {\n const { locale } = useLocale();\n const state = useDateFieldState({\n ...props,\n locale,\n createCalendar,\n });\n\n const ref = useRef<HTMLDivElement>();\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n const { fieldProps } = useDateField(props, state, ref);\n\n return (\n <InputBox\n {...fieldProps}\n {...(props.dateFieldProps || {})}\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n ref={mergeRefs<HTMLDivElement>(ref, forwardedRef)}\n focused={props.focused}\n disabled={props.disabled}\n aria-label={props['aria-label']}\n $size={props.size ?? 'md'}\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n $inputPosition={props.inputPosition}\n hasError={props.hasError}\n >\n {state.segments.map((segment, i) => (\n <DateSegment key={i} segment={segment} state={state} />\n ))}\n </InputBox>\n );\n});\n\nexport default DateField;\n","import type { DateValue } from '@internationalized/date';\nimport type { DatePickerProps as DatePickerBase } from '@react-types/datepicker';\nimport { type RefObject, useCallback, useRef, useState } from 'react';\nimport { mergeProps, useButton, useDatePicker, useFocusWithin, VisuallyHidden } from 'react-aria';\nimport { useDatePickerState } from 'react-stately';\n\nimport Calendar from 'design-system/components/DatePicker/Calendar/Calendar';\nimport DateField from 'design-system/components/DatePicker/DateField';\nimport Popover from 'design-system/components/Popover';\nimport { Z_INDICES } from 'design-system/lib/zindex';\nimport type { InputSizes } from 'design-system/mixins/input';\n\nexport interface DatePickerProps extends DatePickerBase<DateValue> {\n id?: string;\n dateFieldProps?: {\n style?: React.CSSProperties;\n };\n disabled?: boolean;\n size?: InputSizes;\n useModalZIndex?: boolean;\n}\n\nconst OpenButton = ({ calendarRef }: { calendarRef: RefObject<HTMLElement> }) => {\n const openCalBtnRef = useRef<HTMLButtonElement>(null);\n const { buttonProps } = useButton(\n {\n onPress: () => {\n if (calendarRef.current) {\n (\n calendarRef.current.querySelector('button[aria-label=\"Previous\"]') as HTMLButtonElement\n ).focus();\n }\n },\n },\n openCalBtnRef,\n );\n\n return <button {...buttonProps} ref={openCalBtnRef} aria-label='Open calendar' />;\n};\n\nexport const DatePicker = (props: DatePickerProps) => {\n const state = useDatePickerState(props);\n const ref = useRef<HTMLDivElement>(null);\n const fieldRef = useRef<HTMLDivElement>(null);\n const { groupProps, fieldProps, calendarProps } = useDatePicker(props, state, ref);\n const calendarRef = useRef<HTMLDivElement>(null);\n const [isClosing, setIsClosing] = useState(false);\n\n const { focusWithinProps } = useFocusWithin({\n onFocusWithin: () => {\n if (!state.isOpen && !isClosing) {\n state.setOpen(true);\n }\n },\n onBlurWithin: (e) => {\n // Close calendar if next target is not within the calendar\n if (e.relatedTarget && !calendarRef?.current?.contains(e.relatedTarget) && state.isOpen) {\n state.setOpen(false);\n }\n },\n });\n\n const handleOutsideClick = (e: Event) => {\n const target = e.target as Node;\n // Don't close if clicking on the date input itself\n if (ref.current?.contains(target)) {\n return;\n }\n if (state.isOpen) {\n state.setOpen(false);\n }\n };\n\n const handleKeyDown = useCallback(\n (event: React.KeyboardEvent) => {\n if (event.key === 'Enter' && !state.isOpen) {\n event.preventDefault();\n state.setOpen(true);\n }\n },\n [state],\n );\n\n return (\n <div style={{ display: 'flex', flexDirection: 'column' }}>\n <Popover\n open={state.isOpen}\n modal={false}\n contentProps={{\n style: { zIndex: props.useModalZIndex ? Z_INDICES.modalDropdown : Z_INDICES.dropdown },\n align: 'start',\n 'aria-modal': true,\n onInteractOutside: handleOutsideClick,\n onEscapeKeyDown: () => {\n state.setOpen(false);\n },\n onCloseAutoFocus: (e: Event) => {\n // Prevent Radix's default focus restoration\n e.preventDefault();\n setIsClosing(true);\n\n // Manually restore focus to the date field\n if (fieldRef.current) {\n const firstEditableSegment = fieldRef.current.querySelector('[tabindex=\"0\"]');\n if (firstEditableSegment instanceof HTMLElement) {\n firstEditableSegment.focus();\n }\n }\n\n // Reset flag after focus is done\n requestAnimationFrame(() => setIsClosing(false));\n },\n noPadding: true,\n }}\n >\n <Popover.Trigger asChild>\n <div\n {...mergeProps(groupProps, focusWithinProps)}\n ref={ref}\n style={{ display: 'flex', position: 'relative' }}\n >\n <DateField\n ref={fieldRef}\n id={props.id}\n dateFieldProps={props.dateFieldProps}\n disabled={props.disabled}\n size={props.size}\n {...mergeProps(fieldProps, { onKeyDown: handleKeyDown })}\n value={fieldProps.value ?? undefined}\n />\n <VisuallyHidden>\n <OpenButton calendarRef={calendarRef} />\n </VisuallyHidden>\n </div>\n </Popover.Trigger>\n <Calendar\n {...{ ...calendarProps, autoFocus: undefined }}\n calendarRef={calendarRef}\n id='calendar-popover'\n />\n </Popover>\n </div>\n );\n};\n\nexport default DatePicker;\n","import {\n type CalendarDate,\n type DateValue,\n endOfMonth,\n endOfYear,\n startOfMonth,\n startOfYear,\n today,\n} from '@internationalized/date';\nimport type { RangeValue } from '@react-types/shared';\nimport { Settings } from 'luxon';\nimport { memo, useRef } from 'react';\nimport { mergeProps, useButton } from 'react-aria';\nimport type { RangeCalendarState } from 'react-stately';\nimport styled, { css } from 'styled-components';\n\nimport { Color } from '@persona/design-tokens';\nimport { MenuItem, MenuList } from 'design-system/components/Menu';\nimport { isFocused, isHovered, isNotDisabled } from 'design-system/lib/pseudoClass';\n\ninterface DateRangePreset {\n label: string;\n range: RangeValue<CalendarDate>;\n}\n\nconst getDefaultPresets = (tz: string) => {\n const now = today(tz);\n return [\n {\n label: 'Last 7 days',\n range: {\n start: now.subtract({ days: 7 }),\n end: now,\n },\n },\n {\n label: 'Last 14 days',\n range: {\n start: now.subtract({ days: 14 }),\n end: now,\n },\n },\n {\n label: 'Last 30 days',\n range: {\n start: now.subtract({ days: 30 }),\n end: now,\n },\n },\n {\n label: 'This month',\n range: {\n start: startOfMonth(now),\n // Effectively, this should always be today, since we can't look forward\n end: now,\n },\n },\n {\n label: 'Last month',\n range: {\n start: startOfMonth(now.subtract({ months: 1 })),\n end: endOfMonth(now.subtract({ months: 1 })),\n },\n },\n {\n label: 'This year',\n range: {\n start: startOfYear(now),\n end: now,\n },\n },\n {\n label: 'Last year',\n range: {\n start: startOfYear(now.subtract({ years: 1 })),\n end: endOfYear(now.subtract({ years: 1 })),\n },\n },\n ];\n};\n\n/**\n * Compare two date values by year/month/day only, ignoring time components.\n */\nconst datesMatchByDay = (a: CalendarDate, b: DateValue): boolean =>\n a.year === b.year && a.month === b.month && a.day === b.day;\n\nconst Container = styled.div`\n display: flex;\n flex-direction: column;\n`;\n\ninterface PresetButtonProps {\n state: RangeCalendarState;\n preset: DateRangePreset;\n isSelected: boolean;\n setDateMode: (mode: 'start' | 'end' | null) => void;\n}\n\nconst StyledPresetButton = styled(MenuItem)`\n ${({ selected }) =>\n !selected &&\n css`\n &${isNotDisabled}${isHovered}, &${isNotDisabled}${isFocused} {\n background-color: transparent;\n }\n `}\n\n &:focus-visible {\n // MenuItems default to outline: none, so we need to override it here.\n outline: 2px solid ${Color.BorderFocus} !important;\n outline-offset: 1px;\n }\n`;\n\ninterface DateRangePickerPresetsProps {\n presetsFn?: (tz: string) => DateRangePreset[];\n state: RangeCalendarState;\n setDateMode: (mode: 'start' | 'end' | null) => void;\n}\n\nconst PresetButton = ({ state, preset, isSelected, setDateMode, ...props }: PresetButtonProps) => {\n const ref = useRef<HTMLDivElement>();\n const { buttonProps } = useButton(\n {\n onPress: () => {\n state.setValue(preset.range);\n setDateMode(null);\n },\n },\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n ref,\n );\n\n // Strip aria-current from useButton's props so it doesn't override MenuItem's.\n const { 'aria-current': _ariaCurrent, ...mergedProps } = mergeProps(props, buttonProps);\n\n return (\n <StyledPresetButton\n selected={isSelected}\n {...mergedProps}\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n ref={ref}\n >\n {preset.label}\n </StyledPresetButton>\n );\n};\n\nconst DateRangePickerPresets = ({\n presetsFn = getDefaultPresets,\n state,\n setDateMode,\n ...props\n}: DateRangePickerPresetsProps) => {\n // The reason that we need to do this at render time is because the default timezone for moment is set after\n // the current User's timezone is loaded. Thus we woudln't be getting the right timezone unless if we defer getting\n // the timezone.\n const presets = presetsFn(Settings.defaultZone.name);\n\n // First match wins — prevents multiple presets appearing selected when ranges overlap.\n const { value } = state;\n const selectedPresetIndex = value\n ? presets.findIndex(\n (preset) =>\n datesMatchByDay(preset.range.start, value.start) &&\n datesMatchByDay(preset.range.end, value.end),\n )\n : -1;\n\n return (\n <Container {...props}>\n <MenuList aria-label='Date range presets'>\n {presets.map((preset, i) => (\n <PresetButton\n key={i}\n preset={preset}\n state={state}\n setDateMode={setDateMode}\n isSelected={i === selectedPresetIndex}\n />\n ))}\n </MenuList>\n </Container>\n );\n};\n\n// Memoize to prevent re-renders when irrelevant state properties change\n// Only re-render when the actual selected date range (state.value) changes\nconst arePropsEqual = (\n prevProps: DateRangePickerPresetsProps,\n nextProps: DateRangePickerPresetsProps,\n) => {\n // Only care about the selected date range, not internal calendar state like isInvalid, visibleRange, etc.\n const prevValue = prevProps.state.value;\n const nextValue = nextProps.state.value;\n\n // If both are null/undefined, they're equal\n if (!prevValue && !nextValue) {\n return true;\n }\n // If only one is null/undefined, they're different\n if (!prevValue || !nextValue) {\n return false;\n }\n\n // Compare the actual date values\n return (\n prevValue.start.compare(nextValue.start) === 0 && prevValue.end.compare(nextValue.end) === 0\n );\n};\n\nexport default memo(DateRangePickerPresets, arePropsEqual);\n","import { type CalendarDate, type DateValue, toCalendarDateTime } from '@internationalized/date';\nimport { range } from 'lodash/fp';\nimport { Settings } from 'luxon';\nimport { type Ref, useRef } from 'react';\nimport {\n type DateRange,\n type RangeCalendarProps as RangeCalendarBaseProps,\n useDateFormatter,\n useLocale,\n useRangeCalendar,\n VisuallyHidden,\n} from 'react-aria';\nimport { type RangeCalendarState, useRangeCalendarState } from 'react-stately';\nimport styled from 'styled-components';\n\nimport { BorderRadius, Color, Spacing } from '@persona/design-tokens';\nimport { ArrowLeftIcon, ArrowRightIcon } from '@persona/icons';\nimport Card from 'design-system/components/Card';\nimport {\n CalendarButton,\n CalendarContainer,\n CalendarHeader,\n CalendarHeading,\n} from 'design-system/components/DatePicker/Calendar/CalendarBase';\nimport CalendarGrid from 'design-system/components/DatePicker/Calendar/CalendarGrid';\nimport RangeCalendarPresets from 'design-system/components/DatePicker/Calendar/RangeCalendarPresets';\nimport { createCalendar } from 'design-system/components/DatePicker/common';\n\nconst RangeCalendarHeader = styled(CalendarHeader)`\n gap: ${Spacing[5]};\n`;\n\nconst CalendarHeaderMonth = styled.div`\n display: grid;\n grid-template-columns: minmax(auto, 1fr) auto minmax(auto, 1fr);\n grid-template-areas: 'prev title next';\n width: 266px;\n align-items: center;\n`;\n\nconst CalendarGrids = styled.div`\n display: flex;\n gap: ${Spacing[5]};\n align-items: start;\n`;\n\nconst PrevButton = styled(CalendarButton)`\n grid-area: prev;\n justify-self: start;\n border-radius: ${BorderRadius.Sm};\n`;\n\nconst NextButton = styled(CalendarButton)`\n grid-area: next;\n justify-self: end;\n border-radius: ${BorderRadius.Sm};\n`;\n\nconst RangeCalendarHeading = styled(CalendarHeading)`\n grid-area: title;\n`;\n\nconst RangeCalendarContainer = styled.div`\n display: flex;\n`;\n\nconst PresetsContainer = styled(Card.Body)`\n border-right: 1px solid ${Color.BorderHairline};\n`;\n\nexport interface RangeCalendarProps extends RangeCalendarBaseProps<DateValue> {\n minDate?: RangeCalendarBaseProps<DateValue>['minValue'];\n maxDate?: RangeCalendarBaseProps<DateValue>['maxValue'];\n calendarRef?: Ref<HTMLDivElement>;\n hidePresets?: boolean;\n onSelectDate?: (d: CalendarDate) => void;\n setDateMode: (mode: 'start' | 'end' | null) => void;\n /**\n * From setValue of DateRangePicker\n */\n setValue: (value: DateRange | null) => void;\n granularity: 'day' | 'hour' | 'minute' | 'second';\n}\n\nconst RangeCalendar = ({\n calendarRef,\n onSelectDate,\n minDate,\n maxDate,\n hidePresets,\n setDateMode,\n setValue,\n granularity,\n ...props\n}: RangeCalendarProps) => {\n const visibleMonths = 2;\n const { locale } = useLocale();\n // Must gather the TZ from the user's settings.\n const timezoneName = Settings.defaultZone.name;\n const rangeCalendarState = useRangeCalendarState({\n ...props,\n minValue: minDate,\n maxValue: maxDate,\n visibleDuration: {\n months: visibleMonths,\n },\n locale,\n createCalendar,\n });\n\n const state: RangeCalendarState = {\n ...rangeCalendarState,\n setValue: (value) => {\n if (!value || granularity === 'day') {\n rangeCalendarState.setValue(value);\n return;\n }\n\n setValue({\n start: toCalendarDateTime(value.start),\n end: toCalendarDateTime(value.end),\n });\n },\n selectDate: (date) => {\n if (onSelectDate) {\n onSelectDate(date);\n rangeCalendarState.setAnchorDate(null);\n } else {\n rangeCalendarState.selectDate(date);\n }\n },\n };\n\n const ref = useRef();\n\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n const { calendarProps, prevButtonProps, nextButtonProps } = useRangeCalendar(props, state, ref);\n\n const monthDateFormatter = useDateFormatter({\n month: 'long',\n year: 'numeric',\n timeZone: timezoneName,\n });\n\n const monthHeaders = range(0, visibleMonths).map((i) => {\n return (\n <CalendarHeaderMonth key={`calendar-month-${i}`}>\n {i === 0 && (\n <PrevButton {...prevButtonProps}>\n <ArrowLeftIcon />\n </PrevButton>\n )}\n <RangeCalendarHeading aria-hidden>\n {monthDateFormatter.format(\n state.visibleRange.start.add({ months: i }).toDate(timezoneName),\n )}\n </RangeCalendarHeading>\n {i === visibleMonths - 1 && (\n <NextButton {...nextButtonProps}>\n <ArrowRightIcon />\n </NextButton>\n )}\n </CalendarHeaderMonth>\n );\n });\n\n const monthGrids = range(0, visibleMonths).map((i) => {\n return (\n <CalendarGrid\n key={`calendar-grid-${i}`}\n state={state}\n offset={{ months: i }}\n skipFromTabOrder={i > 0}\n />\n );\n });\n\n return (\n <RangeCalendarContainer ref={calendarRef}>\n {!hidePresets && (\n <PresetsContainer padding={Spacing[3]}>\n <RangeCalendarPresets state={state} setDateMode={setDateMode} />\n </PresetsContainer>\n )}\n <Card.Body padding={Spacing[3]}>\n {/* @ts-expect-error [strict-migration] The following line is not strict; please fix! */}\n <CalendarContainer {...calendarProps} ref={ref}>\n {/* Calendar header is separate from grid like this to facilitate a11y. */}\n <RangeCalendarHeader>\n <VisuallyHidden isFocusable={false}>{calendarProps['aria-label']}</VisuallyHidden>\n {monthHeaders}\n </RangeCalendarHeader>\n <CalendarGrids>{monthGrids}</CalendarGrids>\n </CalendarContainer>\n </Card.Body>\n </RangeCalendarContainer>\n );\n};\n\nexport default RangeCalendar;\n","import {\n CalendarDate,\n type DateValue,\n parseAbsolute,\n toCalendarDateTime,\n} from '@internationalized/date';\nimport type { DateRangePickerProps as DateRangePickerBase } from '@react-types/datepicker';\nimport type { AriaLabelingProps, RangeValue } from '@react-types/shared';\nimport { type DateTime, Settings } from 'luxon';\nimport { useCallback, useEffect, useRef, useState } from 'react';\nimport {\n mergeProps,\n useButton,\n useDateRangePicker,\n useFocusWithin,\n usePress,\n VisuallyHidden,\n} from 'react-aria';\nimport { useDateRangePickerState } from 'react-stately';\nimport styled from 'styled-components';\n\nimport { Spacing, Typography } from '@persona/design-tokens';\nimport { CircleXInverseIcon } from '@persona/icons';\nimport RangeCalendar from 'design-system/components/DatePicker/Calendar/RangeCalendar';\nimport DateField from 'design-system/components/DatePicker/DateField';\nimport { FormLabel } from 'design-system/components/FormControl';\nimport { ClearButton } from 'design-system/components/Input';\nimport Popover from 'design-system/components/Popover';\nimport { isDisabled } from 'design-system/lib/pseudoClass';\nimport type { InputSizes } from 'design-system/mixins/input';\n\nconst DateRangeContainer = styled.div`\n display: inline-flex;\n flex-direction: column;\n width: 100%;\n`;\n\nconst DateRangeInputs = styled.div`\n display: flex;\n align-items: center;\n`;\n\nconst CustomFormLabel = styled(FormLabel)`\n margin-bottom: ${Spacing[2]};\n ${Typography.TextMediumBold};\n`;\n\nexport type DateRange = {\n startDate?: DateTime;\n endDate?: DateTime;\n};\n\nexport interface DateRangePickerProps extends DateRangePickerBase<DateValue>, AriaLabelingProps {\n dateRange: DateRange;\n onChange: (range: RangeValue<DateValue> | null) => void;\n disabled?: boolean;\n size?: InputSizes;\n minDate?: DateValue;\n maxDate?: DateValue;\n label?: string | null;\n dataTest?: string;\n id?: string;\n hidePresets?: boolean;\n className?: string;\n /**\n * Whether or not to display clear button\n */\n showClear?: boolean;\n /**\n * Called when the clear button is clicked/pressed\n */\n onClear?: () => void;\n /**\n * z-index of the calendar popover\n */\n calendarZIndex?: number;\n /**\n * Element that should contain the calendar portal.\n */\n portalContainer?: HTMLElement | null;\n}\n\nconst OpenButton = ({ onOpen, disabled }: { onOpen: () => void; disabled?: boolean }) => {\n const openCalBtnRef = useRef<HTMLButtonElement>(null);\n const { buttonProps } = useButton(\n {\n isDisabled: disabled,\n onPress: onOpen,\n },\n openCalBtnRef,\n );\n\n return (\n <button\n {...buttonProps}\n type='button'\n ref={openCalBtnRef}\n aria-label='Open calendar'\n tabIndex={-1}\n />\n );\n};\n\nconst ClearRangeButton = styled(ClearButton)`\n height: 16px;\n width: 16px;\n margin-left: ${Spacing[2]};\n\n &${isDisabled}, &:disabled {\n background-color: transparent;\n }\n`;\n\nconst DateRangePicker = ({\n granularity = 'day',\n hideTimeZone = true,\n className,\n calendarZIndex,\n portalContainer,\n ...props\n}: DateRangePickerProps) => {\n const state = useDateRangePickerState({ granularity, hideTimeZone, ...props });\n const ref = useRef<HTMLDivElement>(null);\n const startFieldRef = useRef<HTMLDivElement>(null);\n const endFieldRef = useRef<HTMLDivElement>(null);\n const calendarRef = useRef<HTMLDivElement>(null);\n const [dateMode, setDateMode] = useState<'start' | 'end' | null>(null);\n const [isClosing, setIsClosing] = useState(false);\n const { groupProps, startFieldProps, endFieldProps, calendarProps, labelProps } =\n useDateRangePicker({ granularity, hideTimeZone, ...props }, state, ref);\n\n const focusCalendar = useCallback(() => {\n requestAnimationFrame(() => {\n const firstFocusableCalendarElement = calendarRef.current?.querySelector<HTMLElement>(\n '[role=\"menuitem\"], button:not(:disabled), [tabindex=\"0\"]',\n );\n firstFocusableCalendarElement?.focus();\n });\n }, []);\n\n const openCalendar = useCallback(() => {\n if (!props.disabled && !state.isOpen && !isClosing) {\n state.setOpen(true);\n }\n }, [isClosing, props.disabled, state]);\n\n const openCalendarWithFocus = useCallback(() => {\n openCalendar();\n focusCalendar();\n }, [focusCalendar, openCalendar]);\n\n useEffect(() => {\n // If not set, return early\n if (!props.dateRange.startDate || !props.dateRange.endDate) {\n return;\n }\n\n if (!props.dateRange.startDate.isValid || !props.dateRange.endDate.isValid) {\n return;\n }\n\n // Find out the real time by adjusting the date to the user's timezone\n const startDate = props.dateRange.startDate.setZone(Settings.defaultZone);\n const endDate = props.dateRange.endDate.setZone(Settings.defaultZone);\n\n if (!startDate.isValid || !endDate.isValid) {\n return;\n }\n\n // Months are 1-indexed, no translations need to happen to CalendarDates\n const startCalendar = state.hasTime\n ? parseAbsolute(startDate.toISO(), Settings.defaultZone.name)\n : new CalendarDate(startDate.year, startDate.month, startDate.day);\n const endCalendar = state.hasTime\n ? parseAbsolute(endDate.toISO(), Settings.defaultZone.name)\n : new CalendarDate(endDate.year, endDate.month, endDate.day);\n\n const dateRangeV2: RangeValue<DateValue> = {\n start: startCalendar,\n end: endCalendar,\n };\n\n state.setValue(dateRangeV2);\n }, [props.dateRange.startDate, props.dateRange.endDate, granularity]);\n\n // Auto-close overlay when a complete range is selected (e.g., from presets with time enabled)\n const prevValueRef = useRef<RangeValue<DateValue | null> | null>(state.value);\n useEffect(() => {\n const prevValue = prevValueRef.current;\n const currentValue = state.value;\n\n // Update ref for next comparison\n prevValueRef.current = currentValue;\n\n // Close overlay only if BOTH start and end changed simultaneously to DIFFERENT dates (e.g., preset selection)\n // Do not close during manual date selection where:\n // 1. Only one date changes at a time, OR\n // 2. Both dates are set to the same value (initial selection from empty state)\n // Use value comparison (.compare) instead of object identity to handle controlled component re-renders\n const startChanged =\n prevValue?.start && currentValue?.start\n ? prevValue.start.compare(currentValue.start) !== 0\n : prevValue?.start !== currentValue?.start;\n const endChanged =\n prevValue?.end && currentValue?.end\n ? prevValue.end.compare(currentValue.end) !== 0\n : prevValue?.end !== currentValue?.end;\n const datesAreDifferent =\n currentValue?.start &&\n currentValue?.end &&\n currentValue.start.compare(currentValue.end) !== 0;\n\n if (state.isOpen && startChanged && endChanged && datesAreDifferent) {\n state.setOpen(false);\n }\n }, [state.value, state.isOpen]);\n\n const { focusWithinProps: startFocusWithinProps } = useFocusWithin({\n onFocusWithin: () => {\n setDateMode('start');\n openCalendar();\n },\n });\n\n const { focusWithinProps: endFocusWithinProps } = useFocusWithin({\n onFocusWithin: () => {\n setDateMode('end');\n openCalendar();\n },\n });\n\n const { focusWithinProps: containerFocusProps } = useFocusWithin({\n onBlurWithin: () => {\n requestAnimationFrame(() => {\n // Wait for popover focus transitions to settle before closing.\n const activeElement = document.activeElement;\n const isFocusInDateRangeInput =\n activeElement instanceof Node && ref.current?.contains(activeElement);\n const isFocusInCalendar =\n activeElement instanceof Node && calendarRef.current?.contains(activeElement);\n\n if (isFocusInDateRangeInput || isFocusInCalendar) {\n return;\n }\n\n setDateMode(null);\n if (state.isOpen) {\n state.setOpen(false);\n }\n });\n },\n });\n\n const handleOutsideClick = (e: Event) => {\n const target = e.target as Node;\n // Don't close if clicking on the date inputs themselves\n if (ref.current?.contains(target)) {\n return;\n }\n\n // When there's a click outside of the containers + calendars, reset the highlighted date\n // Only close the calendar if it's open\n // Note: Radix UI's onInteractOutside already ensures the interaction is outside the popover content\n if (state.isOpen) {\n setDateMode(null);\n state.setOpen(false);\n }\n };\n\n const { pressProps: pressClearProps } = usePress({\n onPress: () => {\n state.setValue(null);\n\n if (props.onClear) {\n props.onClear();\n }\n },\n });\n\n const handleKeyDown = useCallback(\n (event: React.KeyboardEvent) => {\n if (event.key === 'Enter') {\n event.preventDefault(); // Prevent form submission\n openCalendarWithFocus();\n }\n },\n [openCalendarWithFocus],\n );\n\n const isValueNull = state.value && state.value.start == null && state.value.end == null;\n\n return (\n <DateRangeContainer data-test={props.dataTest} className={className}>\n {props.label && <CustomFormLabel {...labelProps}>{props.label}</CustomFormLabel>}\n <Popover\n open={state.isOpen}\n modal={false}\n portalProps={portalContainer ? { container: portalContainer } : undefined}\n contentProps={{\n align: 'start',\n 'aria-modal': true,\n 'aria-label': props['aria-label'] ?? undefined,\n onInteractOutside: handleOutsideClick,\n onOpenAutoFocus: (e: Event) => {\n // Field focus opens the calendar for editing, while Enter/Open calendar moves focus inside.\n e.preventDefault();\n },\n onEscapeKeyDown: () => {\n state.setOpen(false);\n // Restore focus to the date field for keyboard users\n if (dateMode) {\n const fieldRef = dateMode === 'start' ? startFieldRef : endFieldRef;\n const seg = fieldRef.current?.querySelector('[tabindex=\"0\"]');\n if (seg instanceof HTMLElement) {\n seg.focus();\n }\n }\n },\n onCloseAutoFocus: (e: Event) => {\n // Prevent Radix's default focus restoration — Escape handles its own above.\n e.preventDefault();\n setIsClosing(true);\n requestAnimationFrame(() => setIsClosing(false));\n },\n noPadding: true,\n style: { zIndex: calendarZIndex },\n zIndex: calendarZIndex,\n }}\n >\n <Popover.Trigger asChild>\n <DateRangeInputs {...mergeProps(groupProps, containerFocusProps)} ref={ref}>\n {/* @ts-expect-error [strict-migration] The following line is not strict; please fix! */}\n <DateField\n ref={startFieldRef}\n inputPosition='start'\n focused={dateMode === 'start'}\n disabled={props.disabled}\n size={props.size}\n {...mergeProps(startFieldProps, startFocusWithinProps, { onKeyDown: handleKeyDown })}\n />\n {/* @ts-expect-error [strict-migration] The following line is not strict; please fix! */}\n <DateField\n ref={endFieldRef}\n inputPosition='end'\n focused={dateMode === 'end'}\n disabled={props.disabled}\n size={props.size}\n {...mergeProps(endFieldProps, endFocusWithinProps, { onKeyDown: handleKeyDown })}\n />\n {props.showClear && (\n <ClearRangeButton\n {...pressClearProps}\n type='button'\n disabled={isValueNull}\n aria-label='Clear date range'\n >\n <CircleXInverseIcon />\n </ClearRangeButton>\n )}\n <VisuallyHidden>\n <OpenButton onOpen={openCalendarWithFocus} disabled={props.disabled} />\n </VisuallyHidden>\n </DateRangeInputs>\n </Popover.Trigger>\n <RangeCalendar\n {...{ ...calendarProps, autoFocus: undefined }}\n calendarRef={calendarRef}\n setDateMode={setDateMode}\n setValue={state.setValue}\n granularity={granularity}\n hidePresets={props.hidePresets}\n onSelectDate={(dateVal) => {\n /**\n * Please use caution when editing the logic below.\n * It is specific to react-aria's date picker and can be brittle.\n */\n if (dateVal) {\n const date = state.hasTime ? toCalendarDateTime(dateVal) : dateVal;\n\n if (dateMode === 'start') {\n // Handle a case where we've deleted both dates\n if (state.value.end == null && state.value.start == null) {\n state.setValue({\n start: date,\n end: date,\n });\n }\n // If end becomes the start\n else if (state.value.end && date.compare(state.value.end) > 0) {\n state.setValue({\n start: state.value.end,\n end: state.value.end.set(dateVal), // Preserve time\n });\n } else {\n state.setValue({\n // if start is not set, set it to the date or date + time value, otherwise set the dateVal to preserve time\n start: state.value.start == null ? date : state.value.start.set(dateVal),\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n\n end: state.value.end,\n });\n }\n setDateMode('end');\n } else {\n // Handle a case where we've deleted both dates\n if (state.value.end == null && state.value.start == null) {\n state.setValue({\n start: date,\n end: date,\n });\n }\n // If start becomes the end\n else if (state.value.start && date.compare(state.value.start) < 0) {\n state.setValue({\n start: state.value.start.set(dateVal),\n end: state.value.start,\n });\n } else {\n state.setValue({\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n start: state.value.start,\n // if end is not set, set it to the date or date + time value, otherwise set the dateVal to preserve time\n end: state.value.end == null ? date : state.value.end.set(dateVal),\n });\n }\n // Close popover and keep focus on end field\n state.setOpen(false);\n }\n }\n }}\n minDate={props.minDate}\n maxDate={props.maxDate}\n />\n </Popover>\n </DateRangeContainer>\n );\n};\n\nexport default DateRangePicker;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,MAAa,oBAAoB,oBAAA,QAAO,GAAG;;;AAI3C,MAAa,iBAAiB,oBAAA,QAAO,GAAG;;;mBAGrBA,uBAAAA,QAAQ,GAAG;;AAG9B,MAAa,kBAAkB,oBAAA,QAAO,GAAG;IACrCC,uBAAAA,WAAW,cAAc;;;;AAK7B,MAAM,uBAAuB,CAAA,GAAA,oBAAA,SAAOC,mBAAAA,WAAW;;;;AAK/C,MAAa,kBAAkB,UAA2B;CACxD,MAAM,OAAA,GAAA,MAAA,SAAc;CAEpB,MAAM,EAAE,iBAAA,GAAA,WAAA,WAA0B,OAAO,IAAI;AAE7C,QAEE,iBAAA,GAAA,kBAAA,KAAC,sBAAD;EAAsB,GAAI;EAAa,WAAW,MAAM;EAAgB;YACrE,MAAM;EACc,CAAA;;;;AC9B3B,MAAM,wBAAwB,kBAAA,QAAO,EAAE;;;;;;AAevC,MAAM,qBAAqB,kBAAA,QAAO,MAA+B;IAC7DC,uBAAAA,WAAW,WAAW;;;;;;;;;KASrB,EAAE,iBACH,cACA,kBAAA,GAAG;oBACaC,uBAAAA,MAAM,cAAc;MAClC;;KAED,EAAE,uBACH,oBACA,kBAAA,GAAG;oBACaA,uBAAAA,MAAM,wBAAwB;eACnCA,uB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MAAM,SAAS,KAAK,QAAQ,MAAM,MAAM,MAAM,GAAG,EAC9D,OAAM,SAAS;QACb,OAAO,MAAM,MAAM,MAAM,IAAI,QAAQ;QACrC,KAAK,MAAM,MAAM;QAClB,CAAC;WAEF,OAAM,SAAS;QAEb,OAAO,MAAM,MAAM;QAEnB,KAAK,MAAM,MAAM,OAAO,OAAO,OAAO,MAAM,MAAM,IAAI,IAAI,QAAQ;QACnE,CAAC;AAGJ,aAAM,QAAQ,MAAM;;;;IAI1B,SAAS,MAAM;IACf,SAAS,MAAM;IACf,CAAA,CACM;KACS"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","names":["useLocale","OpenButton","Popover","Card","RangeCalendarPresets","Popover"],"sources":["../../../components/DatePicker/Calendar/CalendarBase.tsx","../../../components/DatePicker/Calendar/CalendarCell.tsx","../../../components/DatePicker/Calendar/CalendarGrid.tsx","../../../components/DatePicker/common.ts","../../../components/DatePicker/Calendar/Calendar.tsx","../../../components/DatePicker/DateField.tsx","../../../components/DatePicker/DatePicker.tsx","../../../components/DatePicker/Calendar/RangeCalendarPresets.tsx","../../../components/DatePicker/Calendar/RangeCalendar.tsx","../../../components/DatePicker/DateRangePicker.tsx"],"sourcesContent":["import { useRef } from 'react';\nimport { useButton } from 'react-aria';\nimport styled from 'styled-components';\n\nimport { Spacing, Typography } from '@persona/design-tokens';\nimport { IconButton } from 'design-system/components/Button';\nimport type { IconButtonProps } from 'design-system/components/Button/IconButton';\n\nexport const CalendarContainer = styled.div`\n display: inline-block;\n`;\n\nexport const CalendarHeader = styled.div`\n display: flex;\n align-items: center;\n margin-bottom: ${Spacing[2]};\n`;\n\nexport const CalendarHeading = styled.div`\n ${Typography.TextLargeBold};\n flex: 1;\n text-align: center;\n`;\n\nconst StyledCalendarButton = styled(IconButton)`\n width: 32px;\n height: 32px;\n`;\n\nexport const CalendarButton = (props: IconButtonProps) => {\n const ref = useRef();\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n const { buttonProps } = useButton(props, ref);\n\n return (\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n <StyledCalendarButton {...buttonProps} className={props.className} ref={ref}>\n {props.children}\n </StyledCalendarButton>\n );\n};\n","import { type CalendarDate, type DateValue, isSameDay, isSameMonth } from '@internationalized/date';\nimport { useRef } from 'react';\nimport { useCalendarCell } from 'react-aria';\nimport type { CalendarState, RangeCalendarState } from 'react-stately';\nimport styled, { css } from 'styled-components';\n\nimport { BorderRadius, Color, Typography } from '@persona/design-tokens';\n\nconst CalendarCellContainer = styled.td`\n text-align: center;\n width: 38px;\n height: 38px;\n padding: 0px;\n`;\n\ninterface CalendarCellButtonProps {\n isSelected?: boolean;\n isSelectionStart?: boolean;\n isSelectionEnd?: boolean;\n isInvalid?: boolean;\n isDisabled?: boolean;\n}\n\nconst CalendarCellButton = styled.button<CalendarCellButtonProps>`\n ${Typography.TextMedium};\n border-style: none;\n padding: 0;\n background: none;\n width: 100%;\n height: 100%;\n cursor: pointer;\n position: relative;\n\n ${({ isSelected }) =>\n isSelected &&\n css`\n background: ${Color.CorePurple100};\n `}\n\n ${({ isSelectionStart }) =>\n isSelectionStart &&\n css`\n background: ${Color.BackgroundButtonPrimary};\n color: ${Color.TextInverse};\n border-top-left-radius: ${BorderRadius.Sm};\n border-bottom-left-radius: ${BorderRadius.Sm};\n `}\n\n ${({ isSelectionEnd }) =>\n isSelectionEnd &&\n css`\n background: ${Color.BackgroundButtonPrimary};\n color: ${Color.TextInverse};\n border-top-right-radius: ${BorderRadius.Sm};\n border-bottom-right-radius: ${BorderRadius.Sm};\n `}\n\n ${({ isDisabled }) =>\n isDisabled &&\n css`\n color: ${Color.CoreSlate300};\n `}\n\n ${({ isInvalid }) =>\n isInvalid &&\n css`\n background: ${Color.BackgroundButtonDanger};\n color: ${Color.TextInverse};\n `}\n\n &:focus-visible {\n outline: 2px solid ${Color.BorderFocus};\n outline-offset: -2px;\n box-shadow: ${Color.PrimaryWhite} 0px 0px 0px 3px inset;\n z-index: 1;\n }\n`;\n\ninterface CalendarCellProps {\n state: CalendarState | RangeCalendarState;\n date: CalendarDate;\n currentMonth: DateValue;\n}\n\nconst CalendarCell = ({ state, date, currentMonth }: CalendarCellProps) => {\n const ref = useRef();\n const { cellProps, buttonProps, isSelected, isInvalid, isDisabled, formattedDate } =\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n useCalendarCell({ date }, state, ref);\n\n const highlightedRange = 'highlightedRange' in state && state.highlightedRange;\n\n const isOutsideMonth = !isSameMonth(currentMonth, date);\n const isSelectionStart = highlightedRange ? isSameDay(date, highlightedRange.start) : isSelected;\n const isSelectionEnd = highlightedRange ? isSameDay(date, highlightedRange.end) : isSelected;\n\n return (\n <CalendarCellContainer {...cellProps}>\n <CalendarCellButton\n {...buttonProps}\n hidden={isOutsideMonth}\n isSelected={isSelected}\n isSelectionStart={isSelectionStart}\n isSelectionEnd={isSelectionEnd}\n isInvalid={isInvalid}\n isDisabled={isDisabled}\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n ref={ref}\n >\n {formattedDate}\n </CalendarCellButton>\n </CalendarCellContainer>\n );\n};\n\nexport default CalendarCell;\n","import { type DateDuration, endOfMonth, getWeeksInMonth } from '@internationalized/date';\nimport { useCalendarGrid, useLocale } from 'react-aria';\nimport type { CalendarState, RangeCalendarState } from 'react-stately';\nimport styled from 'styled-components';\n\nimport { Color, Typography } from '@persona/design-tokens';\n\nimport CalendarCell from './CalendarCell';\n\nconst CalendarGridContainer = styled.table`\n width: 266px;\n border-spacing: 0px;\n border-collapse: collapse;\n\n &:focus-visible {\n outline: 2px solid ${Color.BorderFocus};\n outline-offset: 1px;\n }\n`;\n\nconst CalendarGridDayHeader = styled.th`\n ${Typography.TextMedium};\n color: ${Color.TextSecondary};\n`;\n\ninterface CalendarGridProps {\n state: CalendarState | RangeCalendarState;\n offset?: DateDuration;\n skipFromTabOrder?: boolean;\n}\n\nconst CalendarGrid = ({ state, offset = {}, skipFromTabOrder = false }: CalendarGridProps) => {\n const { locale } = useLocale();\n const startDate = state.visibleRange.start.add(offset);\n const endDate = endOfMonth(startDate);\n\n const { gridProps, headerProps, weekDays } = useCalendarGrid(\n {\n startDate,\n endDate,\n },\n state,\n );\n\n const weeksInMonth = getWeeksInMonth(startDate, locale);\n\n // Remove second calendar grid from tab order - use arrow keys to navigate between months\n const modifiedGridProps = skipFromTabOrder ? { ...gridProps, tabIndex: -1 } : gridProps;\n\n return (\n <CalendarGridContainer {...modifiedGridProps}>\n <thead {...headerProps}>\n <tr>\n {weekDays.map((day, index) => (\n <CalendarGridDayHeader key={index}>{day}</CalendarGridDayHeader>\n ))}\n </tr>\n </thead>\n <tbody>\n {[...new Array(weeksInMonth).keys()].map((weekIndex) => (\n <tr key={weekIndex}>\n {state\n .getDatesInWeek(weekIndex, startDate)\n .map((date, i) =>\n date ? (\n <CalendarCell key={i} state={state} date={date} currentMonth={startDate} />\n ) : (\n <td key={i} />\n ),\n )}\n </tr>\n ))}\n </tbody>\n </CalendarGridContainer>\n );\n};\n\nexport default CalendarGrid;\n","import { GregorianCalendar } from '@internationalized/date';\n\nexport const createCalendar = () => new GregorianCalendar();\n","import type { Ref } from 'react';\nimport { type AriaCalendarProps, type DateValue, useCalendar, useLocale } from 'react-aria';\nimport { useCalendarState } from 'react-stately';\n\nimport { ArrowLeftIcon, ArrowRightIcon } from '@persona/icons';\nimport {\n CalendarButton,\n CalendarContainer,\n CalendarHeader,\n CalendarHeading,\n} from 'design-system/components/DatePicker/Calendar/CalendarBase';\nimport CalendarGrid from 'design-system/components/DatePicker/Calendar/CalendarGrid';\nimport { createCalendar } from 'design-system/components/DatePicker/common';\n\ninterface CalendarProps extends AriaCalendarProps<DateValue> {\n calendarRef?: Ref<HTMLDivElement>;\n}\n\nconst Calendar = (props: CalendarProps) => {\n const { locale } = useLocale();\n const state = useCalendarState({ ...props, locale, createCalendar });\n const { calendarProps, prevButtonProps, nextButtonProps, title } = useCalendar(props, state);\n\n return (\n <CalendarContainer {...calendarProps} ref={props.calendarRef}>\n <CalendarHeader>\n <CalendarButton {...prevButtonProps}>\n <ArrowLeftIcon />\n </CalendarButton>\n <CalendarHeading>{title}</CalendarHeading>\n <CalendarButton {...nextButtonProps}>\n <ArrowRightIcon />\n </CalendarButton>\n </CalendarHeader>\n <CalendarGrid state={state} />\n </CalendarContainer>\n );\n};\n\nexport default Calendar;\n","import type { DateValue } from '@internationalized/date';\nimport { type AriaDateFieldProps, useDateField, useDateSegment } from '@react-aria/datepicker';\nimport { useLocale } from '@react-aria/i18n';\nimport { mergeRefs } from '@react-aria/utils';\nimport {\n type DateFieldState,\n type DateSegment as DateSegmentObj,\n type SegmentType,\n useDateFieldState,\n} from '@react-stately/datepicker';\nimport { forwardRef, useRef } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { Color, Spacing } from '@persona/design-tokens';\nimport { createCalendar } from 'design-system/components/DatePicker/common';\nimport { isFocused, isFocusedVisible, isNotDisabled } from 'design-system/lib/pseudoClass';\nimport { focusWithinOutline } from 'design-system/mixins/focus';\nimport inputMixin, { type InputMixinProps, type InputSizes } from 'design-system/mixins/input';\nimport type PseudoClassProps from 'design-system/types/PseudoClassProps';\n\ntype DateSegmentContainerProps = { $isComma?: boolean; $isTimezone?: boolean } & PseudoClassProps;\nconst DateSegmentContainer = styled.div<DateSegmentContainerProps>`\n font-variant-numeric: tabular-nums;\n box-sizing: content-box;\n text-align: end;\n\n ${isFocused} {\n outline: 2px solid ${Color.BorderFocus};\n outline-offset: 1px;\n background-color: ${Color.CorePurple200};\n }\n\n ${({ $isComma, $isTimezone }) =>\n ($isComma || $isTimezone) &&\n css`\n margin-left: 0.25ch;\n margin-right: 0.25ch;\n `}\n\n ${({ $isTimezone }) =>\n $isTimezone &&\n css`\n color: ${Color.TextSecondary};\n pointer-events: none;\n\n &:focus {\n outline: none;\n background-color: transparent;\n }\n `}\n`;\n\ntype DateSegmentPlaceholderProps = { isPlaceholder?: boolean; type: SegmentType };\nconst DateSegmentPlaceholder = styled.span<DateSegmentPlaceholderProps>`\n display: block;\n width: 100%;\n pointer-events: none;\n\n &:focus {\n outline: none;\n }\n\n ${({ isPlaceholder }) =>\n isPlaceholder\n ? css`\n height: 100%;\n color: ${({ theme }) => theme.color.text.tertiary};\n `\n : css`\n visibility: hidden;\n height: 0;\n `}\n ${({ type }) =>\n type === 'literal' &&\n css`\n padding-left: ${Spacing[1]};\n padding-right: ${Spacing[1]};\n `}\n ${({ type, isPlaceholder }) =>\n type === 'month' &&\n isPlaceholder &&\n css`\n width: 3ch;\n `}\n`;\n\ninterface DateSegmentProps {\n segment: DateSegmentObj;\n state: DateFieldState;\n}\n\nfunction DateSegment({ segment, state }: DateSegmentProps) {\n const ref = useRef();\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n const { segmentProps } = useDateSegment(segment, state, ref);\n\n let minWidth: string;\n\n switch (segment.type) {\n case 'dayPeriod': {\n minWidth = '2.75ch';\n break;\n }\n default: {\n minWidth = `${segment.maxValue != null && String(segment.maxValue).length + 0.25}ch`;\n break;\n }\n }\n\n const isComma = segment.type === 'literal' && segment.text === ', ';\n const isTimezone = segment.type === 'timeZoneName';\n\n return (\n <DateSegmentContainer\n {...segmentProps}\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n ref={ref}\n style={{\n ...segmentProps.style,\n minWidth,\n }}\n $isComma={isComma}\n $isTimezone={isTimezone}\n {...(isTimezone && { tabIndex: -1, role: 'presentation' })}\n >\n {/* Always reserve space for the placeholder, to prevent layout shift when editing. */}\n {segment.placeholder && (\n <DateSegmentPlaceholder\n aria-hidden='true'\n isPlaceholder={segment.isPlaceholder}\n type={segment.type}\n >\n {segment.placeholder}\n </DateSegmentPlaceholder>\n )}\n {segment.isPlaceholder ? '' : segment.text}\n </DateSegmentContainer>\n );\n}\n\nconst InputBox = styled.div<InputMixinProps & { $inputPosition: 'start' | 'end' }>`\n ${inputMixin};\n display: flex;\n padding-left: ${Spacing[2]};\n padding-right: ${Spacing[2]};\n line-height: 1;\n position: relative;\n\n &${isFocusedVisible}${isNotDisabled} {\n position: relative;\n z-index: 1;\n }\n\n ${focusWithinOutline}\n\n ${({ $inputPosition }) => {\n switch ($inputPosition) {\n case 'start': {\n return css`\n border-top-right-radius: 0px;\n border-bottom-right-radius: 0px;\n `;\n }\n case 'end': {\n return css`\n margin-left: -1px;\n border-top-left-radius: 0px;\n border-bottom-left-radius: 0px;\n `;\n }\n }\n }}\n`;\n\ninterface DateFieldProps extends AriaDateFieldProps<DateValue> {\n inputPosition?: 'start' | 'end';\n focused?: boolean;\n readOnly?: boolean;\n value?: DateValue;\n disabled?: boolean;\n size?: InputSizes;\n style?: React.CSSProperties;\n dateFieldProps?: {\n style?: React.CSSProperties;\n };\n hasError?: boolean;\n}\n\nexport const DateField = forwardRef<HTMLDivElement, DateFieldProps>(function DateField(\n props: DateFieldProps,\n forwardedRef,\n) {\n const { locale } = useLocale();\n const state = useDateFieldState({\n ...props,\n locale,\n createCalendar,\n });\n\n const ref = useRef<HTMLDivElement>();\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n const { fieldProps } = useDateField(props, state, ref);\n\n return (\n <InputBox\n {...fieldProps}\n {...(props.dateFieldProps || {})}\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n ref={mergeRefs<HTMLDivElement>(ref, forwardedRef)}\n focused={props.focused}\n disabled={props.disabled}\n aria-label={props['aria-label']}\n $size={props.size ?? 'md'}\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n $inputPosition={props.inputPosition}\n hasError={props.hasError}\n >\n {state.segments.map((segment, i) => (\n <DateSegment key={i} segment={segment} state={state} />\n ))}\n </InputBox>\n );\n});\n\nexport default DateField;\n","import type { DateValue } from '@internationalized/date';\nimport type { DatePickerProps as DatePickerBase } from '@react-types/datepicker';\nimport { type RefObject, useCallback, useRef, useState } from 'react';\nimport { mergeProps, useButton, useDatePicker, useFocusWithin, VisuallyHidden } from 'react-aria';\nimport { useDatePickerState } from 'react-stately';\n\nimport Calendar from 'design-system/components/DatePicker/Calendar/Calendar';\nimport DateField from 'design-system/components/DatePicker/DateField';\nimport Popover from 'design-system/components/Popover';\nimport { Z_INDICES } from 'design-system/lib/zindex';\nimport type { InputSizes } from 'design-system/mixins/input';\n\nexport interface DatePickerProps extends DatePickerBase<DateValue> {\n id?: string;\n dateFieldProps?: {\n style?: React.CSSProperties;\n };\n disabled?: boolean;\n size?: InputSizes;\n useModalZIndex?: boolean;\n}\n\nconst OpenButton = ({ calendarRef }: { calendarRef: RefObject<HTMLElement> }) => {\n const openCalBtnRef = useRef<HTMLButtonElement>(null);\n const { buttonProps } = useButton(\n {\n onPress: () => {\n if (calendarRef.current) {\n (\n calendarRef.current.querySelector('button[aria-label=\"Previous\"]') as HTMLButtonElement\n ).focus();\n }\n },\n },\n openCalBtnRef,\n );\n\n return <button {...buttonProps} ref={openCalBtnRef} aria-label='Open calendar' />;\n};\n\nexport const DatePicker = (props: DatePickerProps) => {\n const state = useDatePickerState(props);\n const ref = useRef<HTMLDivElement>(null);\n const fieldRef = useRef<HTMLDivElement>(null);\n const { groupProps, fieldProps, calendarProps } = useDatePicker(props, state, ref);\n const calendarRef = useRef<HTMLDivElement>(null);\n const [isClosing, setIsClosing] = useState(false);\n\n const { focusWithinProps } = useFocusWithin({\n onFocusWithin: () => {\n if (!state.isOpen && !isClosing) {\n state.setOpen(true);\n }\n },\n onBlurWithin: (e) => {\n // Close calendar if next target is not within the calendar\n if (e.relatedTarget && !calendarRef?.current?.contains(e.relatedTarget) && state.isOpen) {\n state.setOpen(false);\n }\n },\n });\n\n const handleOutsideClick = (e: Event) => {\n const target = e.target as Node;\n // Don't close if clicking on the date input itself\n if (ref.current?.contains(target)) {\n return;\n }\n if (state.isOpen) {\n state.setOpen(false);\n }\n };\n\n const handleKeyDown = useCallback(\n (event: React.KeyboardEvent) => {\n if (event.key === 'Enter' && !state.isOpen) {\n event.preventDefault();\n state.setOpen(true);\n }\n },\n [state],\n );\n\n return (\n <div style={{ display: 'flex', flexDirection: 'column' }}>\n <Popover\n open={state.isOpen}\n modal={false}\n contentProps={{\n style: { zIndex: props.useModalZIndex ? Z_INDICES.modalDropdown : Z_INDICES.dropdown },\n align: 'start',\n 'aria-modal': true,\n onInteractOutside: handleOutsideClick,\n onEscapeKeyDown: () => {\n state.setOpen(false);\n },\n onCloseAutoFocus: (e: Event) => {\n // Prevent Radix's default focus restoration\n e.preventDefault();\n setIsClosing(true);\n\n // Manually restore focus to the date field\n if (fieldRef.current) {\n const firstEditableSegment = fieldRef.current.querySelector('[tabindex=\"0\"]');\n if (firstEditableSegment instanceof HTMLElement) {\n firstEditableSegment.focus();\n }\n }\n\n // Reset flag after focus is done\n requestAnimationFrame(() => setIsClosing(false));\n },\n noPadding: true,\n }}\n >\n <Popover.Trigger asChild>\n <div\n {...mergeProps(groupProps, focusWithinProps)}\n ref={ref}\n style={{ display: 'flex', position: 'relative' }}\n >\n <DateField\n ref={fieldRef}\n id={props.id}\n dateFieldProps={props.dateFieldProps}\n disabled={props.disabled}\n size={props.size}\n {...mergeProps(fieldProps, { onKeyDown: handleKeyDown })}\n value={fieldProps.value ?? undefined}\n />\n <VisuallyHidden>\n <OpenButton calendarRef={calendarRef} />\n </VisuallyHidden>\n </div>\n </Popover.Trigger>\n <Calendar\n {...{ ...calendarProps, autoFocus: undefined }}\n calendarRef={calendarRef}\n id='calendar-popover'\n />\n </Popover>\n </div>\n );\n};\n\nexport default DatePicker;\n","import {\n type CalendarDate,\n type DateValue,\n endOfMonth,\n endOfYear,\n startOfMonth,\n startOfYear,\n today,\n} from '@internationalized/date';\nimport type { RangeValue } from '@react-types/shared';\nimport { Settings } from 'luxon';\nimport { memo, useRef } from 'react';\nimport { mergeProps, useButton } from 'react-aria';\nimport type { RangeCalendarState } from 'react-stately';\nimport styled, { css } from 'styled-components';\n\nimport { Color } from '@persona/design-tokens';\nimport { MenuItem, MenuList } from 'design-system/components/Menu';\nimport { isFocused, isHovered, isNotDisabled } from 'design-system/lib/pseudoClass';\n\ninterface DateRangePreset {\n label: string;\n range: RangeValue<CalendarDate>;\n}\n\nconst getDefaultPresets = (tz: string) => {\n const now = today(tz);\n return [\n {\n label: 'Last 7 days',\n range: {\n start: now.subtract({ days: 7 }),\n end: now,\n },\n },\n {\n label: 'Last 14 days',\n range: {\n start: now.subtract({ days: 14 }),\n end: now,\n },\n },\n {\n label: 'Last 30 days',\n range: {\n start: now.subtract({ days: 30 }),\n end: now,\n },\n },\n {\n label: 'This month',\n range: {\n start: startOfMonth(now),\n // Effectively, this should always be today, since we can't look forward\n end: now,\n },\n },\n {\n label: 'Last month',\n range: {\n start: startOfMonth(now.subtract({ months: 1 })),\n end: endOfMonth(now.subtract({ months: 1 })),\n },\n },\n {\n label: 'This year',\n range: {\n start: startOfYear(now),\n end: now,\n },\n },\n {\n label: 'Last year',\n range: {\n start: startOfYear(now.subtract({ years: 1 })),\n end: endOfYear(now.subtract({ years: 1 })),\n },\n },\n ];\n};\n\n/**\n * Compare two date values by year/month/day only, ignoring time components.\n */\nconst datesMatchByDay = (a: CalendarDate, b: DateValue): boolean =>\n a.year === b.year && a.month === b.month && a.day === b.day;\n\nconst Container = styled.div`\n display: flex;\n flex-direction: column;\n`;\n\ninterface PresetButtonProps {\n state: RangeCalendarState;\n preset: DateRangePreset;\n isSelected: boolean;\n setDateMode: (mode: 'start' | 'end' | null) => void;\n}\n\nconst StyledPresetButton = styled(MenuItem)`\n ${({ selected }) =>\n !selected &&\n css`\n &${isNotDisabled}${isHovered}, &${isNotDisabled}${isFocused} {\n background-color: transparent;\n }\n `}\n\n &:focus-visible {\n // MenuItems default to outline: none, so we need to override it here.\n outline: 2px solid ${Color.BorderFocus} !important;\n outline-offset: 1px;\n }\n`;\n\ninterface DateRangePickerPresetsProps {\n presetsFn?: (tz: string) => DateRangePreset[];\n state: RangeCalendarState;\n setDateMode: (mode: 'start' | 'end' | null) => void;\n}\n\nconst PresetButton = ({ state, preset, isSelected, setDateMode, ...props }: PresetButtonProps) => {\n const ref = useRef<HTMLDivElement>();\n const { buttonProps } = useButton(\n {\n onPress: () => {\n state.setValue(preset.range);\n setDateMode(null);\n },\n },\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n ref,\n );\n\n // Strip aria-current from useButton's props so it doesn't override MenuItem's.\n const { 'aria-current': _ariaCurrent, ...mergedProps } = mergeProps(props, buttonProps);\n\n return (\n <StyledPresetButton\n selected={isSelected}\n {...mergedProps}\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n ref={ref}\n >\n {preset.label}\n </StyledPresetButton>\n );\n};\n\nconst DateRangePickerPresets = ({\n presetsFn = getDefaultPresets,\n state,\n setDateMode,\n ...props\n}: DateRangePickerPresetsProps) => {\n // The reason that we need to do this at render time is because the default timezone for moment is set after\n // the current User's timezone is loaded. Thus we woudln't be getting the right timezone unless if we defer getting\n // the timezone.\n const presets = presetsFn(Settings.defaultZone.name);\n\n // First match wins — prevents multiple presets appearing selected when ranges overlap.\n const { value } = state;\n const selectedPresetIndex = value\n ? presets.findIndex(\n (preset) =>\n datesMatchByDay(preset.range.start, value.start) &&\n datesMatchByDay(preset.range.end, value.end),\n )\n : -1;\n\n return (\n <Container {...props}>\n <MenuList aria-label='Date range presets'>\n {presets.map((preset, i) => (\n <PresetButton\n key={i}\n preset={preset}\n state={state}\n setDateMode={setDateMode}\n isSelected={i === selectedPresetIndex}\n />\n ))}\n </MenuList>\n </Container>\n );\n};\n\n// Memoize to prevent re-renders when irrelevant state properties change\n// Only re-render when the actual selected date range (state.value) changes\nconst arePropsEqual = (\n prevProps: DateRangePickerPresetsProps,\n nextProps: DateRangePickerPresetsProps,\n) => {\n // Only care about the selected date range, not internal calendar state like isInvalid, visibleRange, etc.\n const prevValue = prevProps.state.value;\n const nextValue = nextProps.state.value;\n\n // If both are null/undefined, they're equal\n if (!prevValue && !nextValue) {\n return true;\n }\n // If only one is null/undefined, they're different\n if (!prevValue || !nextValue) {\n return false;\n }\n\n // Compare the actual date values\n return (\n prevValue.start.compare(nextValue.start) === 0 && prevValue.end.compare(nextValue.end) === 0\n );\n};\n\nexport default memo(DateRangePickerPresets, arePropsEqual);\n","import { type CalendarDate, type DateValue, toCalendarDateTime } from '@internationalized/date';\nimport { range } from 'lodash/fp';\nimport { Settings } from 'luxon';\nimport { type Ref, useRef } from 'react';\nimport {\n type DateRange,\n type RangeCalendarProps as RangeCalendarBaseProps,\n useDateFormatter,\n useLocale,\n useRangeCalendar,\n VisuallyHidden,\n} from 'react-aria';\nimport { type RangeCalendarState, useRangeCalendarState } from 'react-stately';\nimport styled from 'styled-components';\n\nimport { BorderRadius, Color, Spacing } from '@persona/design-tokens';\nimport { ArrowLeftIcon, ArrowRightIcon } from '@persona/icons';\nimport Card from 'design-system/components/Card';\nimport {\n CalendarButton,\n CalendarContainer,\n CalendarHeader,\n CalendarHeading,\n} from 'design-system/components/DatePicker/Calendar/CalendarBase';\nimport CalendarGrid from 'design-system/components/DatePicker/Calendar/CalendarGrid';\nimport RangeCalendarPresets from 'design-system/components/DatePicker/Calendar/RangeCalendarPresets';\nimport { createCalendar } from 'design-system/components/DatePicker/common';\n\nconst RangeCalendarHeader = styled(CalendarHeader)`\n gap: ${Spacing[5]};\n`;\n\nconst CalendarHeaderMonth = styled.div`\n display: grid;\n grid-template-columns: minmax(auto, 1fr) auto minmax(auto, 1fr);\n grid-template-areas: 'prev title next';\n width: 266px;\n align-items: center;\n`;\n\nconst CalendarGrids = styled.div`\n display: flex;\n gap: ${Spacing[5]};\n align-items: start;\n`;\n\nconst PrevButton = styled(CalendarButton)`\n grid-area: prev;\n justify-self: start;\n border-radius: ${BorderRadius.Sm};\n`;\n\nconst NextButton = styled(CalendarButton)`\n grid-area: next;\n justify-self: end;\n border-radius: ${BorderRadius.Sm};\n`;\n\nconst RangeCalendarHeading = styled(CalendarHeading)`\n grid-area: title;\n`;\n\nconst RangeCalendarContainer = styled.div`\n display: flex;\n`;\n\nconst PresetsContainer = styled(Card.Body)`\n border-right: 1px solid ${Color.BorderHairline};\n`;\n\nexport interface RangeCalendarProps extends RangeCalendarBaseProps<DateValue> {\n minDate?: RangeCalendarBaseProps<DateValue>['minValue'];\n maxDate?: RangeCalendarBaseProps<DateValue>['maxValue'];\n calendarRef?: Ref<HTMLDivElement>;\n hidePresets?: boolean;\n onSelectDate?: (d: CalendarDate) => void;\n setDateMode: (mode: 'start' | 'end' | null) => void;\n /**\n * From setValue of DateRangePicker\n */\n setValue: (value: DateRange | null) => void;\n granularity: 'day' | 'hour' | 'minute' | 'second';\n}\n\nconst RangeCalendar = ({\n calendarRef,\n onSelectDate,\n minDate,\n maxDate,\n hidePresets,\n setDateMode,\n setValue,\n granularity,\n ...props\n}: RangeCalendarProps) => {\n const visibleMonths = 2;\n const { locale } = useLocale();\n // Must gather the TZ from the user's settings.\n const timezoneName = Settings.defaultZone.name;\n const rangeCalendarState = useRangeCalendarState({\n ...props,\n minValue: minDate,\n maxValue: maxDate,\n visibleDuration: {\n months: visibleMonths,\n },\n locale,\n createCalendar,\n });\n\n const state: RangeCalendarState = {\n ...rangeCalendarState,\n setValue: (value) => {\n if (!value || granularity === 'day') {\n rangeCalendarState.setValue(value);\n return;\n }\n\n setValue({\n start: toCalendarDateTime(value.start),\n end: toCalendarDateTime(value.end),\n });\n },\n selectDate: (date) => {\n if (onSelectDate) {\n onSelectDate(date);\n rangeCalendarState.setAnchorDate(null);\n } else {\n rangeCalendarState.selectDate(date);\n }\n },\n };\n\n const ref = useRef();\n\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n const { calendarProps, prevButtonProps, nextButtonProps } = useRangeCalendar(props, state, ref);\n\n const monthDateFormatter = useDateFormatter({\n month: 'long',\n year: 'numeric',\n timeZone: timezoneName,\n });\n\n const monthHeaders = range(0, visibleMonths).map((i) => {\n return (\n <CalendarHeaderMonth key={`calendar-month-${i}`}>\n {i === 0 && (\n <PrevButton {...prevButtonProps}>\n <ArrowLeftIcon />\n </PrevButton>\n )}\n <RangeCalendarHeading aria-hidden>\n {monthDateFormatter.format(\n state.visibleRange.start.add({ months: i }).toDate(timezoneName),\n )}\n </RangeCalendarHeading>\n {i === visibleMonths - 1 && (\n <NextButton {...nextButtonProps}>\n <ArrowRightIcon />\n </NextButton>\n )}\n </CalendarHeaderMonth>\n );\n });\n\n const monthGrids = range(0, visibleMonths).map((i) => {\n return (\n <CalendarGrid\n key={`calendar-grid-${i}`}\n state={state}\n offset={{ months: i }}\n skipFromTabOrder={i > 0}\n />\n );\n });\n\n return (\n <RangeCalendarContainer ref={calendarRef}>\n {!hidePresets && (\n <PresetsContainer padding={Spacing[3]}>\n <RangeCalendarPresets state={state} setDateMode={setDateMode} />\n </PresetsContainer>\n )}\n <Card.Body padding={Spacing[3]}>\n {/* @ts-expect-error [strict-migration] The following line is not strict; please fix! */}\n <CalendarContainer {...calendarProps} ref={ref}>\n {/* Calendar header is separate from grid like this to facilitate a11y. */}\n <RangeCalendarHeader>\n <VisuallyHidden isFocusable={false}>{calendarProps['aria-label']}</VisuallyHidden>\n {monthHeaders}\n </RangeCalendarHeader>\n <CalendarGrids>{monthGrids}</CalendarGrids>\n </CalendarContainer>\n </Card.Body>\n </RangeCalendarContainer>\n );\n};\n\nexport default RangeCalendar;\n","import {\n CalendarDate,\n type DateValue,\n parseAbsolute,\n toCalendarDateTime,\n} from '@internationalized/date';\nimport type { DateRangePickerProps as DateRangePickerBase } from '@react-types/datepicker';\nimport type { AriaLabelingProps, RangeValue } from '@react-types/shared';\nimport { type DateTime, Settings } from 'luxon';\nimport { useCallback, useEffect, useRef, useState } from 'react';\nimport {\n mergeProps,\n useButton,\n useDateRangePicker,\n useFocusWithin,\n usePress,\n VisuallyHidden,\n} from 'react-aria';\nimport { useDateRangePickerState } from 'react-stately';\nimport styled from 'styled-components';\n\nimport { Spacing, Typography } from '@persona/design-tokens';\nimport { CircleXInverseIcon } from '@persona/icons';\nimport RangeCalendar from 'design-system/components/DatePicker/Calendar/RangeCalendar';\nimport DateField from 'design-system/components/DatePicker/DateField';\nimport { FormLabel } from 'design-system/components/FormControl';\nimport { ClearButton } from 'design-system/components/Input';\nimport Popover from 'design-system/components/Popover';\nimport { isDisabled } from 'design-system/lib/pseudoClass';\nimport type { InputSizes } from 'design-system/mixins/input';\n\nconst DateRangeContainer = styled.div`\n display: inline-flex;\n flex-direction: column;\n width: 100%;\n`;\n\nconst DateRangeInputs = styled.div`\n display: flex;\n align-items: center;\n`;\n\nconst CustomFormLabel = styled(FormLabel)`\n margin-bottom: ${Spacing[2]};\n ${Typography.TextMediumBold};\n`;\n\nexport type DateRange = {\n startDate?: DateTime;\n endDate?: DateTime;\n};\n\nexport interface DateRangePickerProps extends DateRangePickerBase<DateValue>, AriaLabelingProps {\n dateRange: DateRange;\n onChange: (range: RangeValue<DateValue> | null) => void;\n disabled?: boolean;\n size?: InputSizes;\n minDate?: DateValue;\n maxDate?: DateValue;\n label?: string | null;\n dataTest?: string;\n id?: string;\n hidePresets?: boolean;\n className?: string;\n /**\n * Whether or not to display clear button\n */\n showClear?: boolean;\n /**\n * Called when the clear button is clicked/pressed\n */\n onClear?: () => void;\n /**\n * z-index of the calendar popover\n */\n calendarZIndex?: number;\n /**\n * Element that should contain the calendar portal.\n */\n portalContainer?: HTMLElement | null;\n}\n\nconst OpenButton = ({ onOpen, disabled }: { onOpen: () => void; disabled?: boolean }) => {\n const openCalBtnRef = useRef<HTMLButtonElement>(null);\n const { buttonProps } = useButton(\n {\n isDisabled: disabled,\n onPress: onOpen,\n },\n openCalBtnRef,\n );\n\n return (\n <button\n {...buttonProps}\n type='button'\n ref={openCalBtnRef}\n aria-label='Open calendar'\n tabIndex={-1}\n />\n );\n};\n\nconst ClearRangeButton = styled(ClearButton)`\n height: 16px;\n width: 16px;\n margin-left: ${Spacing[2]};\n\n &${isDisabled}, &:disabled {\n background-color: transparent;\n }\n`;\n\nconst DateRangePicker = ({\n granularity = 'day',\n hideTimeZone = true,\n className,\n calendarZIndex,\n portalContainer,\n ...props\n}: DateRangePickerProps) => {\n const state = useDateRangePickerState({ granularity, hideTimeZone, ...props });\n const ref = useRef<HTMLDivElement>(null);\n const startFieldRef = useRef<HTMLDivElement>(null);\n const endFieldRef = useRef<HTMLDivElement>(null);\n const calendarRef = useRef<HTMLDivElement>(null);\n const [dateMode, setDateMode] = useState<'start' | 'end' | null>(null);\n const [isClosing, setIsClosing] = useState(false);\n const { groupProps, startFieldProps, endFieldProps, calendarProps, labelProps } =\n useDateRangePicker({ granularity, hideTimeZone, ...props }, state, ref);\n\n const focusCalendar = useCallback(() => {\n requestAnimationFrame(() => {\n const firstFocusableCalendarElement = calendarRef.current?.querySelector<HTMLElement>(\n '[role=\"menuitem\"], button:not(:disabled), [tabindex=\"0\"]',\n );\n firstFocusableCalendarElement?.focus();\n });\n }, []);\n\n const openCalendar = useCallback(() => {\n if (!props.disabled && !state.isOpen && !isClosing) {\n state.setOpen(true);\n }\n }, [isClosing, props.disabled, state]);\n\n const openCalendarWithFocus = useCallback(() => {\n openCalendar();\n focusCalendar();\n }, [focusCalendar, openCalendar]);\n\n useEffect(() => {\n // If not set, return early\n if (!props.dateRange.startDate || !props.dateRange.endDate) {\n return;\n }\n\n if (!props.dateRange.startDate.isValid || !props.dateRange.endDate.isValid) {\n return;\n }\n\n // Find out the real time by adjusting the date to the user's timezone\n const startDate = props.dateRange.startDate.setZone(Settings.defaultZone);\n const endDate = props.dateRange.endDate.setZone(Settings.defaultZone);\n\n if (!startDate.isValid || !endDate.isValid) {\n return;\n }\n\n // Months are 1-indexed, no translations need to happen to CalendarDates\n const startCalendar = state.hasTime\n ? parseAbsolute(startDate.toISO(), Settings.defaultZone.name)\n : new CalendarDate(startDate.year, startDate.month, startDate.day);\n const endCalendar = state.hasTime\n ? parseAbsolute(endDate.toISO(), Settings.defaultZone.name)\n : new CalendarDate(endDate.year, endDate.month, endDate.day);\n\n const dateRangeV2: RangeValue<DateValue> = {\n start: startCalendar,\n end: endCalendar,\n };\n\n state.setValue(dateRangeV2);\n }, [props.dateRange.startDate, props.dateRange.endDate, granularity]);\n\n // Auto-close overlay when a complete range is selected (e.g., from presets with time enabled)\n const prevValueRef = useRef<RangeValue<DateValue | null> | null>(state.value);\n useEffect(() => {\n const prevValue = prevValueRef.current;\n const currentValue = state.value;\n\n // Update ref for next comparison\n prevValueRef.current = currentValue;\n\n // Close overlay only if BOTH start and end changed simultaneously to DIFFERENT dates (e.g., preset selection)\n // Do not close during manual date selection where:\n // 1. Only one date changes at a time, OR\n // 2. Both dates are set to the same value (initial selection from empty state)\n // Use value comparison (.compare) instead of object identity to handle controlled component re-renders\n const startChanged =\n prevValue?.start && currentValue?.start\n ? prevValue.start.compare(currentValue.start) !== 0\n : prevValue?.start !== currentValue?.start;\n const endChanged =\n prevValue?.end && currentValue?.end\n ? prevValue.end.compare(currentValue.end) !== 0\n : prevValue?.end !== currentValue?.end;\n const datesAreDifferent =\n currentValue?.start &&\n currentValue?.end &&\n currentValue.start.compare(currentValue.end) !== 0;\n\n if (state.isOpen && startChanged && endChanged && datesAreDifferent) {\n state.setOpen(false);\n }\n }, [state.value, state.isOpen]);\n\n const { focusWithinProps: startFocusWithinProps } = useFocusWithin({\n onFocusWithin: () => {\n setDateMode('start');\n openCalendar();\n },\n });\n\n const { focusWithinProps: endFocusWithinProps } = useFocusWithin({\n onFocusWithin: () => {\n setDateMode('end');\n openCalendar();\n },\n });\n\n const { focusWithinProps: containerFocusProps } = useFocusWithin({\n onBlurWithin: () => {\n requestAnimationFrame(() => {\n // Wait for popover focus transitions to settle before closing.\n const activeElement = document.activeElement;\n const isFocusInDateRangeInput =\n activeElement instanceof Node && ref.current?.contains(activeElement);\n const isFocusInCalendar =\n activeElement instanceof Node && calendarRef.current?.contains(activeElement);\n\n if (isFocusInDateRangeInput || isFocusInCalendar) {\n return;\n }\n\n setDateMode(null);\n if (state.isOpen) {\n state.setOpen(false);\n }\n });\n },\n });\n\n const handleOutsideClick = (e: Event) => {\n const target = e.target as Node;\n // Don't close if clicking on the date inputs themselves\n if (ref.current?.contains(target)) {\n return;\n }\n\n // When there's a click outside of the containers + calendars, reset the highlighted date\n // Only close the calendar if it's open\n // Note: Radix UI's onInteractOutside already ensures the interaction is outside the popover content\n if (state.isOpen) {\n setDateMode(null);\n state.setOpen(false);\n }\n };\n\n const { pressProps: pressClearProps } = usePress({\n onPress: () => {\n state.setValue(null);\n\n if (props.onClear) {\n props.onClear();\n }\n },\n });\n\n const handleKeyDown = useCallback(\n (event: React.KeyboardEvent) => {\n if (event.key === 'Enter') {\n event.preventDefault(); // Prevent form submission\n openCalendarWithFocus();\n }\n },\n [openCalendarWithFocus],\n );\n\n const isValueNull = state.value && state.value.start == null && state.value.end == null;\n\n return (\n <DateRangeContainer data-test={props.dataTest} className={className}>\n {props.label && <CustomFormLabel {...labelProps}>{props.label}</CustomFormLabel>}\n <Popover\n open={state.isOpen}\n modal={false}\n portalProps={portalContainer ? { container: portalContainer } : undefined}\n contentProps={{\n align: 'start',\n 'aria-modal': true,\n 'aria-label': props['aria-label'] ?? undefined,\n onInteractOutside: handleOutsideClick,\n onOpenAutoFocus: (e: Event) => {\n // Field focus opens the calendar for editing, while Enter/Open calendar moves focus inside.\n e.preventDefault();\n },\n onEscapeKeyDown: () => {\n state.setOpen(false);\n // Restore focus to the date field for keyboard users\n if (dateMode) {\n const fieldRef = dateMode === 'start' ? startFieldRef : endFieldRef;\n const seg = fieldRef.current?.querySelector('[tabindex=\"0\"]');\n if (seg instanceof HTMLElement) {\n seg.focus();\n }\n }\n },\n onCloseAutoFocus: (e: Event) => {\n // Prevent Radix's default focus restoration — Escape handles its own above.\n e.preventDefault();\n setIsClosing(true);\n requestAnimationFrame(() => setIsClosing(false));\n },\n noPadding: true,\n style: { zIndex: calendarZIndex },\n zIndex: calendarZIndex,\n }}\n >\n <Popover.Trigger asChild>\n <DateRangeInputs {...mergeProps(groupProps, containerFocusProps)} ref={ref}>\n {/* @ts-expect-error [strict-migration] The following line is not strict; please fix! */}\n <DateField\n ref={startFieldRef}\n inputPosition='start'\n focused={dateMode === 'start'}\n disabled={props.disabled}\n size={props.size}\n {...mergeProps(startFieldProps, startFocusWithinProps, { onKeyDown: handleKeyDown })}\n />\n {/* @ts-expect-error [strict-migration] The following line is not strict; please fix! */}\n <DateField\n ref={endFieldRef}\n inputPosition='end'\n focused={dateMode === 'end'}\n disabled={props.disabled}\n size={props.size}\n {...mergeProps(endFieldProps, endFocusWithinProps, { onKeyDown: handleKeyDown })}\n />\n {props.showClear && (\n <ClearRangeButton\n {...pressClearProps}\n type='button'\n disabled={isValueNull}\n aria-label='Clear date range'\n >\n <CircleXInverseIcon />\n </ClearRangeButton>\n )}\n <VisuallyHidden>\n <OpenButton onOpen={openCalendarWithFocus} disabled={props.disabled} />\n </VisuallyHidden>\n </DateRangeInputs>\n </Popover.Trigger>\n <RangeCalendar\n {...{ ...calendarProps, autoFocus: undefined }}\n calendarRef={calendarRef}\n setDateMode={setDateMode}\n setValue={state.setValue}\n granularity={granularity}\n hidePresets={props.hidePresets}\n onSelectDate={(dateVal) => {\n /**\n * Please use caution when editing the logic below.\n * It is specific to react-aria's date picker and can be brittle.\n */\n if (dateVal) {\n const date = state.hasTime ? toCalendarDateTime(dateVal) : dateVal;\n\n if (dateMode === 'start') {\n // Handle a case where we've deleted both dates\n if (state.value.end == null && state.value.start == null) {\n state.setValue({\n start: date,\n end: date,\n });\n }\n // If end becomes the start\n else if (state.value.end && date.compare(state.value.end) > 0) {\n state.setValue({\n start: state.value.end,\n end: state.value.end.set(dateVal), // Preserve time\n });\n } else {\n state.setValue({\n // if start is not set, set it to the date or date + time value, otherwise set the dateVal to preserve time\n start: state.value.start == null ? date : state.value.start.set(dateVal),\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n\n end: state.value.end,\n });\n }\n setDateMode('end');\n } else {\n // Handle a case where we've deleted both dates\n if (state.value.end == null && state.value.start == null) {\n state.setValue({\n start: date,\n end: date,\n });\n }\n // If start becomes the end\n else if (state.value.start && date.compare(state.value.start) < 0) {\n state.setValue({\n start: state.value.start.set(dateVal),\n end: state.value.start,\n });\n } else {\n state.setValue({\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n start: state.value.start,\n // if end is not set, set it to the date or date + time value, otherwise set the dateVal to preserve time\n end: state.value.end == null ? date : state.value.end.set(dateVal),\n });\n }\n // Close popover and keep focus on end field\n state.setOpen(false);\n }\n }\n }}\n minDate={props.minDate}\n maxDate={props.maxDate}\n />\n </Popover>\n </DateRangeContainer>\n );\n};\n\nexport default DateRangePicker;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAQA,MAAa,oBAAoB,OAAO,GAAG;;;AAI3C,MAAa,iBAAiB,OAAO,GAAG;;;mBAGrB,QAAQ,GAAG;;AAG9B,MAAa,kBAAkB,OAAO,GAAG;IACrC,WAAW,cAAc;;;;AAK7B,MAAM,uBAAuB,OAAO,WAAW;;;;AAK/C,MAAa,kBAAkB,UAA2B;CACxD,MAAM,MAAM,QAAQ;CAEpB,MAAM,EAAE,gBAAgB,UAAU,OAAO,IAAI;AAE7C,QAEE,oBAAC,sBAAD;EAAsB,GAAI;EAAa,WAAW,MAAM;EAAgB;YACrE,MAAM;EACc,CAAA;;;;AC9B3B,MAAM,wBAAwB,OAAO,EAAE;;;;;;AAevC,MAAM,qBAAqB,OAAO,MAA+B;IAC7D,WAAW,WAAW;;;;;;;;;KASrB,EAAE,iBACH,cACA,GAAG;oBACa,MAAM,cAAc;MAClC;;KAED,EAAE,uBACH,oBACA,GAAG;oBACa,MAAM,wBAAwB;eACnC,MAAM,YAAY;gCACD,aAAa,GAAG;mCACb,aAAa,GAAG;MAC7C;;KAED,EAAE,qBACH,kBACA,GAAG;oBACa,MAAM,wBAAwB;eACnC,MAAM,YAAY;iCACA,aAAa,GAAG;oCACb,aAAa,GAAG;MAC9C;;KAED,EAAE,iBACH,cACA,GAAG;eACQ,MAAM,aAAa;MAC5B;;KAED,EAAE,gBACH,aACA,GAAG;oBACa,MAAM,uBAAuB;eAClC,MAAM,YAAY;MAC3B;;;yBAGmB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MAAM,SAAS,OAAO,OAAO,MAAM,MAAM,MAAM,IAAI,QAAQ;QAGxE,KAAK,MAAM,MAAM;QAClB,CAAC;AAEJ,mBAAY,MAAM;aACb;AAEL,WAAI,MAAM,MAAM,OAAO,QAAQ,MAAM,MAAM,SAAS,KAClD,OAAM,SAAS;QACb,OAAO;QACP,KAAK;QACN,CAAC;gBAGK,MAAM,MAAM,SAAS,KAAK,QAAQ,MAAM,MAAM,MAAM,GAAG,EAC9D,OAAM,SAAS;QACb,OAAO,MAAM,MAAM,MAAM,IAAI,QAAQ;QACrC,KAAK,MAAM,MAAM;QAClB,CAAC;WAEF,OAAM,SAAS;QAEb,OAAO,MAAM,MAAM;QAEnB,KAAK,MAAM,MAAM,OAAO,OAAO,OAAO,MAAM,MAAM,IAAI,IAAI,QAAQ;QACnE,CAAC;AAGJ,aAAM,QAAQ,MAAM;;;;IAI1B,SAAS,MAAM;IACf,SAAS,MAAM;IACf,CAAA,CACM;KACS"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.cjs","names":["useFormGroup","FormLabel","FormControl","HStack","Spacing","FormInputContainer","HelperText","WarningText","ErrorText","Input","TextArea","Select","RadioGroup","Checkbox","Toggle","SegmentedControl","Combobox","FormControlContext","Children","useFormGroup","IconButton","PlusIcon","DropdownMenu","MoreIcon","ListBox","useFormGroup","IconButton","PlusIcon","DropdownMenu","MoreIcon","Fragment","TableBox"],"sources":["../../../components/FormField/FormField.tsx","../../../components/FormField/inputFields.tsx","../../../components/FormField/CheckboxGroupField.tsx","../../../components/FormField/ListBoxField.tsx","../../../components/FormField/TableBoxField.tsx"],"sourcesContent":["import { type ComponentPropsWithRef, forwardRef, type ReactElement, type ReactNode } from 'react';\n\nimport { Spacing } from '@persona/design-tokens';\nimport useFormGroup from 'design-system/components/ConfigFormGroup/useFormGroup';\nimport FormControl, {\n ErrorText,\n type FormControlProps,\n FormInputContainer,\n FormLabel,\n HelperText,\n WarningText,\n} from 'design-system/components/FormControl';\nimport { HStack } from 'design-system/components/Stack';\n\nexport interface FormFieldBaseProps {\n /**\n * Renders `<Label>` above input\n */\n label?: ReactNode;\n\n /**\n * ID of the input element. Providing this will automatically link the label to the input.\n */\n inputId?: string;\n\n /**\n * Renders `<HelperText>` below input\n */\n helperText?: ReactNode;\n\n /**\n * Renders `<ErrorText>` below input and helper text.\n */\n errorText?: ReactNode;\n\n /**\n * Renders `<WarningText>` below input and helper text.\n */\n warningText?: ReactNode;\n\n /**\n * Should be an input of some sort\n */\n children?: ReactElement;\n\n labelProps?: ComponentPropsWithRef<typeof FormLabel>;\n helperProps?: ComponentPropsWithRef<typeof HelperText>;\n warningProps?: ComponentPropsWithRef<typeof WarningText>;\n errorProps?: ComponentPropsWithRef<typeof ErrorText>;\n\n /**\n * Whether to render the form field as a config field.\n * This will render the helper text as a tooltip.\n */\n configField?: boolean;\n\n /**\n * Override the width of the input area when `configField` is true.\n * Accepts any valid CSS width value (e.g. `'33%'`, `'66.67%'`).\n * Defaults to `'50%'`.\n */\n configFieldInputWidth?: string;\n\n /**\n * Renders actions to the right of the label.\n */\n rightActions?: ReactNode;\n}\n\nexport interface FormFieldProps extends Omit<FormControlProps, 'children'>, FormFieldBaseProps {}\n\n/**\n * > **Please do not use in production! This component is subject to API and style changes.**\n *\n * Helper components with preset slots for label, input, and helper texts.\n * Fully composed components with different form input types are available.\n * This is the recommended way to implement form elements.\n * You can use `<FormControl>` if you require more flexibility.\n *\n * ## Usage\n *\n * ```tsx\n * import FormField from 'design-system/components/FormField';\n * ```\n */\nexport const FormField = forwardRef<HTMLDivElement, FormFieldProps>(function FormField(\n {\n label,\n children,\n helperText,\n warningText,\n errorText,\n labelProps,\n helperProps,\n warningProps,\n errorProps,\n configField: configFieldProp,\n configFieldInputWidth,\n rightActions,\n ...props\n }: FormFieldProps,\n ref,\n) {\n const { configField: configFieldFormGroup } = useFormGroup();\n const configField = configFieldProp ?? configFieldFormGroup;\n\n const labelElement = label ? (\n <FormLabel tooltip={configField && helperText ? helperText : undefined} {...labelProps}>\n {label}\n </FormLabel>\n ) : null;\n\n return (\n <FormControl\n hasError={!!errorText}\n hasWarning={!!warningText}\n ref={ref}\n configField={configField}\n hasRightActions={!!rightActions}\n configFieldInputWidth={configFieldInputWidth}\n {...props}\n >\n {rightActions ? (\n <HStack justify='space-between' align='center'>\n {labelElement}\n <HStack spacing={Spacing[1]}>{rightActions}</HStack>\n </HStack>\n ) : (\n labelElement\n )}\n <FormInputContainer>{children}</FormInputContainer>\n {!configField && helperText && <HelperText {...helperProps}>{helperText}</HelperText>}\n {!configField && warningText && <WarningText {...warningProps}>{warningText}</WarningText>}\n {!configField && errorText && <ErrorText {...errorProps}>{errorText}</ErrorText>}\n </FormControl>\n );\n});\n\nexport default FormField;\n","import { uniqueId } from 'lodash/fp';\nimport { forwardRef, useMemo } from 'react';\n\nimport Checkbox, { type CheckboxProps } from 'design-system/components/Checkbox';\nimport Combobox from 'design-system/components/Combobox';\nimport type { ComboboxMultiSelectProps } from 'design-system/components/Combobox/ComboboxMultiSelect';\nimport type { ComboboxSingleSelectProps } from 'design-system/components/Combobox/ComboboxSingleSelect';\nimport FormField, { type FormFieldBaseProps } from 'design-system/components/FormField/FormField';\nimport Input, { type InputProps } from 'design-system/components/Input';\nimport RadioGroup, { type RadioGroupProps } from 'design-system/components/RadioGroup';\nimport SegmentedControl, {\n type SegmentedControlProps,\n} from 'design-system/components/SegmentedControl';\nimport Select, { type SelectProps } from 'design-system/components/Select';\nimport TextArea, { type TextAreaProps } from 'design-system/components/TextArea';\nimport Toggle, { type ToggleProps } from 'design-system/components/Toggle';\n\nexport type ImplementsFormField = Omit<FormFieldBaseProps, 'children'>;\n\ntype ExtractFormFieldProps<T extends ImplementsFormField> = Pick<\n T,\n | 'label'\n | 'inputId'\n | 'helperText'\n | 'errorText'\n | 'warningText'\n | 'labelProps'\n | 'helperProps'\n | 'warningProps'\n | 'errorProps'\n | 'configField'\n | 'configFieldInputWidth'\n | 'rightActions'\n>;\ntype OmitFormFieldProps<T extends ImplementsFormField> = Omit<T, keyof ExtractFormFieldProps<T>>;\n\n/**\n * Helper to split out props that are sent to the FormField component from props sent\n * to the underlying input component.\n */\nexport const splitOutFormFieldProps = <T extends ImplementsFormField>(\n props: T,\n): {\n formFieldProps: ExtractFormFieldProps<T>;\n inputProps: OmitFormFieldProps<T>;\n} => {\n const {\n label,\n inputId,\n helperText,\n errorText,\n warningText,\n labelProps,\n helperProps,\n warningProps,\n errorProps,\n configField,\n configFieldInputWidth,\n rightActions,\n ...inputProps\n } = props;\n\n return {\n formFieldProps: {\n label,\n inputId,\n helperText,\n errorText,\n warningText,\n labelProps,\n helperProps,\n warningProps,\n errorProps,\n configField,\n configFieldInputWidth,\n rightActions,\n },\n inputProps,\n };\n};\n\nexport interface TextFieldProps extends ImplementsFormField, InputProps {}\n\nexport const TextField = forwardRef<HTMLInputElement, TextFieldProps>(\n function TextField(props, ref) {\n const { formFieldProps, inputProps } = splitOutFormFieldProps(props);\n const { id, ...rest } = inputProps;\n\n return (\n <FormField\n {...formFieldProps}\n labelProps={{ size: props.size, ...formFieldProps.labelProps }}\n inputId={formFieldProps.inputId ?? id}\n >\n <Input {...rest} ref={ref} />\n </FormField>\n );\n },\n);\n\nexport interface TextAreaFieldProps extends ImplementsFormField, TextAreaProps {}\n\nexport const TextAreaField = forwardRef<HTMLTextAreaElement, TextAreaFieldProps>(\n function TextAreaField(\n { label, helperText, errorText, warningText, inputId, id, configField, ...props },\n ref,\n ) {\n return (\n <FormField\n inputId={inputId ?? id}\n label={label}\n labelProps={{ size: props.size }}\n helperText={helperText}\n warningText={warningText}\n errorText={errorText}\n configField={configField}\n >\n <TextArea {...props} ref={ref} />\n </FormField>\n );\n },\n);\n\nexport interface SelectFieldProps extends ImplementsFormField, SelectProps {}\n\nexport const SelectField = ({\n id,\n label,\n helperText,\n errorText,\n warningText,\n children,\n configField,\n labelProps,\n ...props\n}: SelectFieldProps) => {\n const linkedId = useMemo(() => id ?? uniqueId('pds-form-field-input-fields-select__'), [id]);\n\n return (\n <FormField\n label={label}\n labelProps={{ htmlFor: linkedId, size: props.size, ...labelProps }}\n helperText={helperText}\n warningText={warningText}\n errorText={errorText}\n configField={configField}\n >\n <Select {...props} id={linkedId}>\n {children}\n </Select>\n </FormField>\n );\n};\n\nexport interface RadioGroupFieldProps\n extends Omit<ImplementsFormField, 'configField'>, RadioGroupProps {}\n\nexport const RadioGroupField = ({\n label,\n helperText,\n errorText,\n warningText,\n children,\n ...props\n}: RadioGroupFieldProps) => {\n return (\n <FormField\n label={label}\n helperText={helperText}\n warningText={warningText}\n errorText={errorText}\n >\n <RadioGroup {...props}>{children}</RadioGroup>\n </FormField>\n );\n};\n\nexport interface CheckboxFieldProps extends ImplementsFormField, CheckboxProps {\n checkboxLabel?: CheckboxProps['label'];\n}\n\nexport const CheckboxField = ({\n label,\n helperText,\n errorText,\n warningText,\n checkboxLabel,\n configField,\n labelProps,\n ...props\n}: CheckboxFieldProps) => {\n return (\n <FormField\n label={label}\n helperText={helperText}\n warningText={warningText}\n errorText={errorText}\n configField={configField}\n labelProps={labelProps}\n >\n <Checkbox label={checkboxLabel} {...props} />\n </FormField>\n );\n};\n\nexport interface ToggleFieldProps extends ImplementsFormField, ToggleProps {}\n\nexport const ToggleField = forwardRef<HTMLDivElement, ToggleFieldProps>(function ToggleField(\n { label, helperText, errorText, warningText, configField, ...props },\n ref,\n) {\n return (\n <FormField\n label={label}\n labelProps={{ size: props.size }}\n helperText={helperText}\n warningText={warningText}\n errorText={errorText}\n configField={configField}\n >\n <Toggle {...props} ref={ref} />\n </FormField>\n );\n});\n\nexport interface SegmentedControlFieldProps\n extends ImplementsFormField, Omit<SegmentedControlProps, 'children'> {\n children?: SegmentedControlProps['children'];\n}\n\nexport const SegmentedControlField = forwardRef<HTMLDivElement, SegmentedControlFieldProps>(\n function SegmentedControlField(\n { label, helperText, errorText, warningText, configField, children, labelProps, ...props },\n ref,\n ) {\n return (\n <FormField\n label={label}\n helperText={helperText}\n warningText={warningText}\n errorText={errorText}\n configField={configField}\n labelProps={labelProps}\n >\n <SegmentedControl fullWidth {...props} ref={ref}>\n {children}\n </SegmentedControl>\n </FormField>\n );\n },\n);\n\nexport type ComboboxSingleSelectFieldProps<T = string> = ImplementsFormField &\n ComboboxSingleSelectProps<T>;\nexport type ComboboxMultiSelectFieldProps<T = string> = ImplementsFormField &\n ComboboxMultiSelectProps<T>;\n\nexport const ComboboxField = ({\n label,\n labelProps,\n helperText,\n errorText,\n warningText,\n configField,\n ...props\n}: ComboboxSingleSelectFieldProps | ComboboxMultiSelectFieldProps) => {\n return (\n <FormField\n label={label}\n labelProps={labelProps}\n helperText={helperText}\n warningText={warningText}\n errorText={errorText}\n configField={configField}\n >\n <Combobox {...props} />\n </FormField>\n );\n};\n","import {\n Children,\n cloneElement,\n type ComponentPropsWithRef,\n createContext,\n type ReactElement,\n type ReactNode,\n useContext,\n useRef,\n} from 'react';\nimport {\n type AriaCheckboxGroupProps,\n mergeProps,\n useCheckboxGroup,\n useCheckboxGroupItem,\n} from 'react-aria';\nimport innerText from 'react-innertext';\nimport { type CheckboxGroupState, useCheckboxGroupState } from 'react-stately';\n\nimport type { CheckboxProps } from 'design-system/components/Checkbox';\nimport type Checkbox from 'design-system/components/Checkbox';\nimport { FormControlContext } from 'design-system/components/FormControl/useFormField';\nimport FormField from 'design-system/components/FormField/FormField';\nimport type { ImplementsFormField } from 'design-system/components/FormField/inputFields';\n\n/* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\nconst CheckboxGroupContext = createContext<CheckboxGroupState>(null);\n\n/** Preserves the parent FormControl context (disabled, hasError, etc.) but clears\n * inputId so each Checkbox inside the group generates its own unique id. */\nconst ClearGroupInputId = ({ children }: { children: ReactNode }) => {\n const parentContext = useContext(FormControlContext);\n return (\n <FormControlContext.Provider value={{ ...parentContext, inputId: undefined }}>\n {children}\n </FormControlContext.Provider>\n );\n};\n\ninterface CheckboxGroupItemProps {\n children: ReactElement<ComponentPropsWithRef<typeof Checkbox>>;\n}\n\nconst CheckboxGroupItem = (props: CheckboxGroupItemProps) => {\n const { children } = props;\n const checkboxProps = children.props;\n\n const state = useContext(CheckboxGroupContext);\n const ref = useRef();\n const { inputProps } = useCheckboxGroupItem(\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n {\n ...checkboxProps,\n onChange: undefined,\n isDisabled: checkboxProps.disabled,\n isReadOnly: checkboxProps.readOnly,\n isRequired: checkboxProps.required,\n isIndeterminate: checkboxProps.indeterminate,\n value: String(children.props.value),\n 'aria-label': innerText(checkboxProps.label),\n },\n state,\n ref,\n );\n\n return cloneElement(\n children,\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n mergeProps(inputProps, {\n onChange: checkboxProps.onChange,\n disabled: state.isDisabled || checkboxProps.disabled,\n checked: state.isSelected(String(inputProps.value)),\n ref,\n } as ComponentPropsWithRef<typeof Checkbox>),\n );\n};\n\ninterface CheckboxGroupFieldProps\n extends\n Omit<ImplementsFormField, 'configField'>,\n Omit<\n AriaCheckboxGroupProps,\n 'description' | 'disabled' | 'isReadOnly' | 'isRequired' | 'errorMessage'\n > {\n children?: ReactElement<CheckboxProps>[];\n disabled?: boolean;\n readOnly?: boolean;\n required?: boolean;\n}\n\nconst CheckboxGroupField = ({\n children,\n name,\n onChange,\n disabled,\n readOnly,\n required,\n ...props\n}: CheckboxGroupFieldProps) => {\n const reactAriaProps = {\n ...props,\n description: props.helperText,\n errorMessage: props.errorText,\n onChange,\n name,\n isDisabled: disabled,\n isReadOnly: readOnly,\n isRequired: required,\n };\n const state = useCheckboxGroupState(reactAriaProps);\n const { groupProps, labelProps, descriptionProps, errorMessageProps } = useCheckboxGroup(\n reactAriaProps,\n state,\n );\n\n return (\n <FormField\n labelProps={labelProps}\n helperProps={descriptionProps}\n errorProps={errorMessageProps}\n disabled={disabled}\n {...groupProps}\n {...props}\n >\n <ClearGroupInputId>\n <CheckboxGroupContext.Provider value={state}>\n {Children.map(children, (checkbox) => (\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n <CheckboxGroupItem>{checkbox}</CheckboxGroupItem>\n ))}\n </CheckboxGroupContext.Provider>\n </ClearGroupInputId>\n </FormField>\n );\n};\n\nexport default CheckboxGroupField;\n","import { type ReactNode, useState } from 'react';\n\nimport { MoreIcon, PlusIcon } from '@persona/icons';\nimport { IconButton } from 'design-system/components/Button';\nimport useFormGroup from 'design-system/components/ConfigFormGroup/useFormGroup';\nimport DropdownMenu from 'design-system/components/DropdownMenu';\nimport FormField from 'design-system/components/FormField/FormField';\nimport type { ImplementsFormField } from 'design-system/components/FormField/inputFields';\nimport ListBox, { type ListBoxProps } from 'design-system/components/ListBox';\nimport type { MenuItemProps } from 'design-system/components/Menu';\n\ninterface ListBoxFieldAction extends Omit<MenuItemProps, 'children'> {\n label: string;\n onClick: (selectedKeys: ListBoxProps<any>['selectedKeys']) => void;\n}\n\ninterface AddDropdownConfig {\n options: ({ label: ReactNode; value: string } & Omit<MenuItemProps, 'children'>)[];\n onSelection: (value: string) => void;\n}\n\ninterface ListBoxFieldProps<T extends object> extends ImplementsFormField, ListBoxProps<T> {\n actions?: ListBoxFieldAction[];\n addDropdownConfig?: AddDropdownConfig;\n}\n\nconst ListBoxField = <T extends object>({\n label,\n helperText,\n errorText,\n warningText,\n labelProps,\n helperProps,\n errorProps,\n warningProps,\n inputId,\n onAdd,\n onDelete,\n deleteDisabled,\n configField: configFieldProp,\n size = 'md',\n actions = [],\n addDropdownConfig,\n selectedKeys: selectedKeysProp,\n onSelectionChange,\n defaultSelectedKeys,\n ...props\n}: ListBoxFieldProps<T>) => {\n const { configField } = useFormGroup({ configField: configFieldProp });\n const menuActions: ListBoxFieldAction[] = [...actions];\n const [selectedKeysState, setSelectedKeys] = useState(defaultSelectedKeys);\n const selectedKeys = selectedKeysProp ?? selectedKeysState;\n const effectiveSize = configField ? 'sm' : size;\n\n if (onDelete) {\n menuActions.unshift({\n label: 'Delete',\n onClick: () => onDelete(selectedKeys),\n disabled:\n deleteDisabled ||\n selectedKeys == null ||\n (typeof selectedKeys === 'object' && [...selectedKeys].length === 0),\n });\n }\n\n const addButton = (\n <IconButton size='sm' onClick={onAdd} aria-label='Add item to list'>\n <PlusIcon />\n </IconButton>\n );\n\n return (\n <FormField\n label={label}\n helperText={helperText}\n errorText={errorText}\n warningText={warningText}\n labelProps={labelProps}\n helperProps={helperProps}\n errorProps={errorProps}\n warningProps={warningProps}\n inputId={inputId}\n configField={configField}\n rightActions={\n configField && (\n <>\n {menuActions.length > 0 && (\n <DropdownMenu\n trigger={\n <IconButton aria-label='Actions' size='sm'>\n <MoreIcon />\n </IconButton>\n }\n portal\n >\n {menuActions.map((action) => (\n <DropdownMenu.Item\n key={action.label}\n {...action}\n onClick={() => action.onClick(selectedKeys)}\n size={effectiveSize}\n >\n {action.label}\n </DropdownMenu.Item>\n ))}\n </DropdownMenu>\n )}\n {onAdd && !addDropdownConfig && addButton}\n {addDropdownConfig && (\n <DropdownMenu trigger={addButton} align='start' portal>\n {addDropdownConfig.options.map((option) => (\n <DropdownMenu.Item\n key={option.value}\n {...option}\n onClick={() => addDropdownConfig.onSelection(option.value)}\n size={effectiveSize}\n >\n {option.label}\n </DropdownMenu.Item>\n ))}\n </DropdownMenu>\n )}\n </>\n )\n }\n >\n <ListBox\n id={inputId}\n fullWidth={configField}\n size={effectiveSize}\n deleteDisabled={deleteDisabled}\n // We have to control the keys so we can power the `rightActions`\n selectedKeys={selectedKeys}\n onSelectionChange={(keys) => {\n onSelectionChange?.(keys);\n setSelectedKeys(keys);\n }}\n {...props}\n />\n </FormField>\n );\n};\n\nexport default ListBoxField;\n","import { Fragment, type MouseEvent, type ReactNode, useState } from 'react';\n\nimport { IconButton } from '@persona/design-system/components/Button';\nimport { useFormGroup } from '@persona/design-system/components/ConfigFormGroup';\nimport DropdownMenu from '@persona/design-system/components/DropdownMenu';\nimport type { FormLabelProps } from '@persona/design-system/components/FormControl';\nimport type { MenuItemProps } from '@persona/design-system/components/Menu';\nimport TableBox, { type TableBoxProps } from '@persona/design-system/components/TableBox';\nimport { MoreIcon, PlusIcon } from '@persona/icons';\n\nimport FormField from './FormField';\nimport type { ImplementsFormField } from './inputFields';\n\nexport interface TableBoxFieldAction extends Omit<MenuItemProps, 'children'> {\n label: string;\n onClick: (selectedKey: TableBoxProps['selectedKey']) => void;\n}\n\nexport interface TableBoxFieldActionGroup {\n type: 'group';\n heading: string;\n actions: TableBoxFieldAction[];\n}\n\nexport type TableBoxFieldActionEntry = TableBoxFieldAction | TableBoxFieldActionGroup;\n\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='Add item to table'\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,aAAA,GAAA,MAAA,YAAuD,SAAS,UAC3E,EACE,OACA,UACA,YACA,aACA,WACA,YACA,aACA,cACA,YACA,aAAa,iBACb,uBACA,cACA,GAAG,SAEL,KACA;CACA,MAAM,EAAE,aAAa,yBAAyBA,qBAAAA,cAAc;CAC5D,MAAM,cAAc,mBAAmB;CAEvC,MAAM,eAAe,QACnB,iBAAA,GAAA,kBAAA,KAACC,oBAAAA,WAAD;EAAW,SAAS,eAAe,aAAa,aAAa,KAAA;EAAW,GAAI;YACzE;EACS,CAAA,GACV;AAEJ,QACE,iBAAA,GAAA,kBAAA,MAACC,oBAAAA,aAAD;EACE,UAAU,CAAC,CAAC;EACZ,YAAY,CAA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;AAIf,YACE,iBAAA,GAAA,kBAAA,MAACE,MAAAA,UAAD,EAAA,UAAA,CACG,iBAAiB,cAAc,cAAc,IAAI,iBAAA,GAAA,kBAAA,KAACF,qBAAAA,qBAAa,SAAd,EAAwB,CAAA,EAC1E,iBAAA,GAAA,kBAAA,KAACA,qBAAAA,qBAAa,MAAd;MACE,GAAI;MACJ,UAAU,YAAY,MAAM;MAC5B,eAAe,MAAM,QAAQ,YAAY;MACzC,MAAK;gBAEJ,MAAM;MACW,CAAA,CACX,EAAA,EAVI,GAAG,MAAM,MAAM,GAAG,aAUtB;MAEb;IACW,CAAA;IAEf,SAAS,iBAAiB,CAAC,qBAAqB;GACjD,qBACC,iBAAA,GAAA,kBAAA,KAACA,qBAAAA,sBAAD;IAAc,SAAS;IAAW,QAAA;cAC/B,kBAAkB,QAAQ,KAAK,WAC9B,iBAAA,GAAA,kBAAA,KAACA,qBAAAA,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,iBAAA,GAAA,kBAAA,KAACG,iBAAAA,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,MAAMA,iBAAAA,SAAS;AAC7B,cAAc,OAAOA,iBAAAA,SAAS"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","names":["Input","TextArea","DropdownMenu","DropdownMenu"],"sources":["../../../components/FormField/FormField.tsx","../../../components/FormField/inputFields.tsx","../../../components/FormField/CheckboxGroupField.tsx","../../../components/FormField/ListBoxField.tsx","../../../components/FormField/TableBoxField.tsx"],"sourcesContent":["import { type ComponentPropsWithRef, forwardRef, type ReactElement, type ReactNode } from 'react';\n\nimport { Spacing } from '@persona/design-tokens';\nimport useFormGroup from 'design-system/components/ConfigFormGroup/useFormGroup';\nimport FormControl, {\n ErrorText,\n type FormControlProps,\n FormInputContainer,\n FormLabel,\n HelperText,\n WarningText,\n} from 'design-system/components/FormControl';\nimport { HStack } from 'design-system/components/Stack';\n\nexport interface FormFieldBaseProps {\n /**\n * Renders `<Label>` above input\n */\n label?: ReactNode;\n\n /**\n * ID of the input element. Providing this will automatically link the label to the input.\n */\n inputId?: string;\n\n /**\n * Renders `<HelperText>` below input\n */\n helperText?: ReactNode;\n\n /**\n * Renders `<ErrorText>` below input and helper text.\n */\n errorText?: ReactNode;\n\n /**\n * Renders `<WarningText>` below input and helper text.\n */\n warningText?: ReactNode;\n\n /**\n * Should be an input of some sort\n */\n children?: ReactElement;\n\n labelProps?: ComponentPropsWithRef<typeof FormLabel>;\n helperProps?: ComponentPropsWithRef<typeof HelperText>;\n warningProps?: ComponentPropsWithRef<typeof WarningText>;\n errorProps?: ComponentPropsWithRef<typeof ErrorText>;\n\n /**\n * Whether to render the form field as a config field.\n * This will render the helper text as a tooltip.\n */\n configField?: boolean;\n\n /**\n * Override the width of the input area when `configField` is true.\n * Accepts any valid CSS width value (e.g. `'33%'`, `'66.67%'`).\n * Defaults to `'50%'`.\n */\n configFieldInputWidth?: string;\n\n /**\n * Renders actions to the right of the label.\n */\n rightActions?: ReactNode;\n}\n\nexport interface FormFieldProps extends Omit<FormControlProps, 'children'>, FormFieldBaseProps {}\n\n/**\n * > **Please do not use in production! This component is subject to API and style changes.**\n *\n * Helper components with preset slots for label, input, and helper texts.\n * Fully composed components with different form input types are available.\n * This is the recommended way to implement form elements.\n * You can use `<FormControl>` if you require more flexibility.\n *\n * ## Usage\n *\n * ```tsx\n * import FormField from 'design-system/components/FormField';\n * ```\n */\nexport const FormField = forwardRef<HTMLDivElement, FormFieldProps>(function FormField(\n {\n label,\n children,\n helperText,\n warningText,\n errorText,\n labelProps,\n helperProps,\n warningProps,\n errorProps,\n configField: configFieldProp,\n configFieldInputWidth,\n rightActions,\n ...props\n }: FormFieldProps,\n ref,\n) {\n const { configField: configFieldFormGroup } = useFormGroup();\n const configField = configFieldProp ?? configFieldFormGroup;\n\n const labelElement = label ? (\n <FormLabel tooltip={configField && helperText ? helperText : undefined} {...labelProps}>\n {label}\n </FormLabel>\n ) : null;\n\n return (\n <FormControl\n hasError={!!errorText}\n hasWarning={!!warningText}\n ref={ref}\n configField={configField}\n hasRightActions={!!rightActions}\n configFieldInputWidth={configFieldInputWidth}\n {...props}\n >\n {rightActions ? (\n <HStack justify='space-between' align='center'>\n {labelElement}\n <HStack spacing={Spacing[1]}>{rightActions}</HStack>\n </HStack>\n ) : (\n labelElement\n )}\n <FormInputContainer>{children}</FormInputContainer>\n {!configField && helperText && <HelperText {...helperProps}>{helperText}</HelperText>}\n {!configField && warningText && <WarningText {...warningProps}>{warningText}</WarningText>}\n {!configField && errorText && <ErrorText {...errorProps}>{errorText}</ErrorText>}\n </FormControl>\n );\n});\n\nexport default FormField;\n","import { uniqueId } from 'lodash/fp';\nimport { forwardRef, useMemo } from 'react';\n\nimport Checkbox, { type CheckboxProps } from 'design-system/components/Checkbox';\nimport Combobox from 'design-system/components/Combobox';\nimport type { ComboboxMultiSelectProps } from 'design-system/components/Combobox/ComboboxMultiSelect';\nimport type { ComboboxSingleSelectProps } from 'design-system/components/Combobox/ComboboxSingleSelect';\nimport FormField, { type FormFieldBaseProps } from 'design-system/components/FormField/FormField';\nimport Input, { type InputProps } from 'design-system/components/Input';\nimport RadioGroup, { type RadioGroupProps } from 'design-system/components/RadioGroup';\nimport SegmentedControl, {\n type SegmentedControlProps,\n} from 'design-system/components/SegmentedControl';\nimport Select, { type SelectProps } from 'design-system/components/Select';\nimport TextArea, { type TextAreaProps } from 'design-system/components/TextArea';\nimport Toggle, { type ToggleProps } from 'design-system/components/Toggle';\n\nexport type ImplementsFormField = Omit<FormFieldBaseProps, 'children'>;\n\ntype ExtractFormFieldProps<T extends ImplementsFormField> = Pick<\n T,\n | 'label'\n | 'inputId'\n | 'helperText'\n | 'errorText'\n | 'warningText'\n | 'labelProps'\n | 'helperProps'\n | 'warningProps'\n | 'errorProps'\n | 'configField'\n | 'configFieldInputWidth'\n | 'rightActions'\n>;\ntype OmitFormFieldProps<T extends ImplementsFormField> = Omit<T, keyof ExtractFormFieldProps<T>>;\n\n/**\n * Helper to split out props that are sent to the FormField component from props sent\n * to the underlying input component.\n */\nexport const splitOutFormFieldProps = <T extends ImplementsFormField>(\n props: T,\n): {\n formFieldProps: ExtractFormFieldProps<T>;\n inputProps: OmitFormFieldProps<T>;\n} => {\n const {\n label,\n inputId,\n helperText,\n errorText,\n warningText,\n labelProps,\n helperProps,\n warningProps,\n errorProps,\n configField,\n configFieldInputWidth,\n rightActions,\n ...inputProps\n } = props;\n\n return {\n formFieldProps: {\n label,\n inputId,\n helperText,\n errorText,\n warningText,\n labelProps,\n helperProps,\n warningProps,\n errorProps,\n configField,\n configFieldInputWidth,\n rightActions,\n },\n inputProps,\n };\n};\n\nexport interface TextFieldProps extends ImplementsFormField, InputProps {}\n\nexport const TextField = forwardRef<HTMLInputElement, TextFieldProps>(\n function TextField(props, ref) {\n const { formFieldProps, inputProps } = splitOutFormFieldProps(props);\n const { id, ...rest } = inputProps;\n\n return (\n <FormField\n {...formFieldProps}\n labelProps={{ size: props.size, ...formFieldProps.labelProps }}\n inputId={formFieldProps.inputId ?? id}\n >\n <Input {...rest} ref={ref} />\n </FormField>\n );\n },\n);\n\nexport interface TextAreaFieldProps extends ImplementsFormField, TextAreaProps {}\n\nexport const TextAreaField = forwardRef<HTMLTextAreaElement, TextAreaFieldProps>(\n function TextAreaField(\n { label, helperText, errorText, warningText, inputId, id, configField, ...props },\n ref,\n ) {\n return (\n <FormField\n inputId={inputId ?? id}\n label={label}\n labelProps={{ size: props.size }}\n helperText={helperText}\n warningText={warningText}\n errorText={errorText}\n configField={configField}\n >\n <TextArea {...props} ref={ref} />\n </FormField>\n );\n },\n);\n\nexport interface SelectFieldProps extends ImplementsFormField, SelectProps {}\n\nexport const SelectField = ({\n id,\n label,\n helperText,\n errorText,\n warningText,\n children,\n configField,\n labelProps,\n ...props\n}: SelectFieldProps) => {\n const linkedId = useMemo(() => id ?? uniqueId('pds-form-field-input-fields-select__'), [id]);\n\n return (\n <FormField\n label={label}\n labelProps={{ htmlFor: linkedId, size: props.size, ...labelProps }}\n helperText={helperText}\n warningText={warningText}\n errorText={errorText}\n configField={configField}\n >\n <Select {...props} id={linkedId}>\n {children}\n </Select>\n </FormField>\n );\n};\n\nexport interface RadioGroupFieldProps\n extends Omit<ImplementsFormField, 'configField'>, RadioGroupProps {}\n\nexport const RadioGroupField = ({\n label,\n helperText,\n errorText,\n warningText,\n children,\n ...props\n}: RadioGroupFieldProps) => {\n return (\n <FormField\n label={label}\n helperText={helperText}\n warningText={warningText}\n errorText={errorText}\n >\n <RadioGroup {...props}>{children}</RadioGroup>\n </FormField>\n );\n};\n\nexport interface CheckboxFieldProps extends ImplementsFormField, CheckboxProps {\n checkboxLabel?: CheckboxProps['label'];\n}\n\nexport const CheckboxField = ({\n label,\n helperText,\n errorText,\n warningText,\n checkboxLabel,\n configField,\n labelProps,\n ...props\n}: CheckboxFieldProps) => {\n return (\n <FormField\n label={label}\n helperText={helperText}\n warningText={warningText}\n errorText={errorText}\n configField={configField}\n labelProps={labelProps}\n >\n <Checkbox label={checkboxLabel} {...props} />\n </FormField>\n );\n};\n\nexport interface ToggleFieldProps extends ImplementsFormField, ToggleProps {}\n\nexport const ToggleField = forwardRef<HTMLDivElement, ToggleFieldProps>(function ToggleField(\n { label, helperText, errorText, warningText, configField, ...props },\n ref,\n) {\n return (\n <FormField\n label={label}\n labelProps={{ size: props.size }}\n helperText={helperText}\n warningText={warningText}\n errorText={errorText}\n configField={configField}\n >\n <Toggle {...props} ref={ref} />\n </FormField>\n );\n});\n\nexport interface SegmentedControlFieldProps\n extends ImplementsFormField, Omit<SegmentedControlProps, 'children'> {\n children?: SegmentedControlProps['children'];\n}\n\nexport const SegmentedControlField = forwardRef<HTMLDivElement, SegmentedControlFieldProps>(\n function SegmentedControlField(\n { label, helperText, errorText, warningText, configField, children, labelProps, ...props },\n ref,\n ) {\n return (\n <FormField\n label={label}\n helperText={helperText}\n warningText={warningText}\n errorText={errorText}\n configField={configField}\n labelProps={labelProps}\n >\n <SegmentedControl fullWidth {...props} ref={ref}>\n {children}\n </SegmentedControl>\n </FormField>\n );\n },\n);\n\nexport type ComboboxSingleSelectFieldProps<T = string> = ImplementsFormField &\n ComboboxSingleSelectProps<T>;\nexport type ComboboxMultiSelectFieldProps<T = string> = ImplementsFormField &\n ComboboxMultiSelectProps<T>;\n\nexport const ComboboxField = ({\n label,\n labelProps,\n helperText,\n errorText,\n warningText,\n configField,\n ...props\n}: ComboboxSingleSelectFieldProps | ComboboxMultiSelectFieldProps) => {\n return (\n <FormField\n label={label}\n labelProps={labelProps}\n helperText={helperText}\n warningText={warningText}\n errorText={errorText}\n configField={configField}\n >\n <Combobox {...props} />\n </FormField>\n );\n};\n","import {\n Children,\n cloneElement,\n type ComponentPropsWithRef,\n createContext,\n type ReactElement,\n type ReactNode,\n useContext,\n useRef,\n} from 'react';\nimport {\n type AriaCheckboxGroupProps,\n mergeProps,\n useCheckboxGroup,\n useCheckboxGroupItem,\n} from 'react-aria';\nimport innerText from 'react-innertext';\nimport { type CheckboxGroupState, useCheckboxGroupState } from 'react-stately';\n\nimport type { CheckboxProps } from 'design-system/components/Checkbox';\nimport type Checkbox from 'design-system/components/Checkbox';\nimport { FormControlContext } from 'design-system/components/FormControl/useFormField';\nimport FormField from 'design-system/components/FormField/FormField';\nimport type { ImplementsFormField } from 'design-system/components/FormField/inputFields';\n\n/* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\nconst CheckboxGroupContext = createContext<CheckboxGroupState>(null);\n\n/** Preserves the parent FormControl context (disabled, hasError, etc.) but clears\n * inputId so each Checkbox inside the group generates its own unique id. */\nconst ClearGroupInputId = ({ children }: { children: ReactNode }) => {\n const parentContext = useContext(FormControlContext);\n return (\n <FormControlContext.Provider value={{ ...parentContext, inputId: undefined }}>\n {children}\n </FormControlContext.Provider>\n );\n};\n\ninterface CheckboxGroupItemProps {\n children: ReactElement<ComponentPropsWithRef<typeof Checkbox>>;\n}\n\nconst CheckboxGroupItem = (props: CheckboxGroupItemProps) => {\n const { children } = props;\n const checkboxProps = children.props;\n\n const state = useContext(CheckboxGroupContext);\n const ref = useRef();\n const { inputProps } = useCheckboxGroupItem(\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n {\n ...checkboxProps,\n onChange: undefined,\n isDisabled: checkboxProps.disabled,\n isReadOnly: checkboxProps.readOnly,\n isRequired: checkboxProps.required,\n isIndeterminate: checkboxProps.indeterminate,\n value: String(children.props.value),\n 'aria-label': innerText(checkboxProps.label),\n },\n state,\n ref,\n );\n\n return cloneElement(\n children,\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n mergeProps(inputProps, {\n onChange: checkboxProps.onChange,\n disabled: state.isDisabled || checkboxProps.disabled,\n checked: state.isSelected(String(inputProps.value)),\n ref,\n } as ComponentPropsWithRef<typeof Checkbox>),\n );\n};\n\ninterface CheckboxGroupFieldProps\n extends\n Omit<ImplementsFormField, 'configField'>,\n Omit<\n AriaCheckboxGroupProps,\n 'description' | 'disabled' | 'isReadOnly' | 'isRequired' | 'errorMessage'\n > {\n children?: ReactElement<CheckboxProps>[];\n disabled?: boolean;\n readOnly?: boolean;\n required?: boolean;\n}\n\nconst CheckboxGroupField = ({\n children,\n name,\n onChange,\n disabled,\n readOnly,\n required,\n ...props\n}: CheckboxGroupFieldProps) => {\n const reactAriaProps = {\n ...props,\n description: props.helperText,\n errorMessage: props.errorText,\n onChange,\n name,\n isDisabled: disabled,\n isReadOnly: readOnly,\n isRequired: required,\n };\n const state = useCheckboxGroupState(reactAriaProps);\n const { groupProps, labelProps, descriptionProps, errorMessageProps } = useCheckboxGroup(\n reactAriaProps,\n state,\n );\n\n return (\n <FormField\n labelProps={labelProps}\n helperProps={descriptionProps}\n errorProps={errorMessageProps}\n disabled={disabled}\n {...groupProps}\n {...props}\n >\n <ClearGroupInputId>\n <CheckboxGroupContext.Provider value={state}>\n {Children.map(children, (checkbox) => (\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n <CheckboxGroupItem>{checkbox}</CheckboxGroupItem>\n ))}\n </CheckboxGroupContext.Provider>\n </ClearGroupInputId>\n </FormField>\n );\n};\n\nexport default CheckboxGroupField;\n","import { type ReactNode, useState } from 'react';\n\nimport { MoreIcon, PlusIcon } from '@persona/icons';\nimport { IconButton } from 'design-system/components/Button';\nimport useFormGroup from 'design-system/components/ConfigFormGroup/useFormGroup';\nimport DropdownMenu from 'design-system/components/DropdownMenu';\nimport FormField from 'design-system/components/FormField/FormField';\nimport type { ImplementsFormField } from 'design-system/components/FormField/inputFields';\nimport ListBox, { type ListBoxProps } from 'design-system/components/ListBox';\nimport type { MenuItemProps } from 'design-system/components/Menu';\n\ninterface ListBoxFieldAction extends Omit<MenuItemProps, 'children'> {\n label: string;\n onClick: (selectedKeys: ListBoxProps<any>['selectedKeys']) => void;\n}\n\ninterface AddDropdownConfig {\n options: ({ label: ReactNode; value: string } & Omit<MenuItemProps, 'children'>)[];\n onSelection: (value: string) => void;\n}\n\ninterface ListBoxFieldProps<T extends object> extends ImplementsFormField, ListBoxProps<T> {\n actions?: ListBoxFieldAction[];\n addDropdownConfig?: AddDropdownConfig;\n}\n\nconst ListBoxField = <T extends object>({\n label,\n helperText,\n errorText,\n warningText,\n labelProps,\n helperProps,\n errorProps,\n warningProps,\n inputId,\n onAdd,\n onDelete,\n deleteDisabled,\n configField: configFieldProp,\n size = 'md',\n actions = [],\n addDropdownConfig,\n selectedKeys: selectedKeysProp,\n onSelectionChange,\n defaultSelectedKeys,\n ...props\n}: ListBoxFieldProps<T>) => {\n const { configField } = useFormGroup({ configField: configFieldProp });\n const menuActions: ListBoxFieldAction[] = [...actions];\n const [selectedKeysState, setSelectedKeys] = useState(defaultSelectedKeys);\n const selectedKeys = selectedKeysProp ?? selectedKeysState;\n const effectiveSize = configField ? 'sm' : size;\n\n if (onDelete) {\n menuActions.unshift({\n label: 'Delete',\n onClick: () => onDelete(selectedKeys),\n disabled:\n deleteDisabled ||\n selectedKeys == null ||\n (typeof selectedKeys === 'object' && [...selectedKeys].length === 0),\n });\n }\n\n const addButton = (\n <IconButton size='sm' onClick={onAdd} aria-label='Add item to list'>\n <PlusIcon />\n </IconButton>\n );\n\n return (\n <FormField\n label={label}\n helperText={helperText}\n errorText={errorText}\n warningText={warningText}\n labelProps={labelProps}\n helperProps={helperProps}\n errorProps={errorProps}\n warningProps={warningProps}\n inputId={inputId}\n configField={configField}\n rightActions={\n configField && (\n <>\n {menuActions.length > 0 && (\n <DropdownMenu\n trigger={\n <IconButton aria-label='Actions' size='sm'>\n <MoreIcon />\n </IconButton>\n }\n portal\n >\n {menuActions.map((action) => (\n <DropdownMenu.Item\n key={action.label}\n {...action}\n onClick={() => action.onClick(selectedKeys)}\n size={effectiveSize}\n >\n {action.label}\n </DropdownMenu.Item>\n ))}\n </DropdownMenu>\n )}\n {onAdd && !addDropdownConfig && addButton}\n {addDropdownConfig && (\n <DropdownMenu trigger={addButton} align='start' portal>\n {addDropdownConfig.options.map((option) => (\n <DropdownMenu.Item\n key={option.value}\n {...option}\n onClick={() => addDropdownConfig.onSelection(option.value)}\n size={effectiveSize}\n >\n {option.label}\n </DropdownMenu.Item>\n ))}\n </DropdownMenu>\n )}\n </>\n )\n }\n >\n <ListBox\n id={inputId}\n fullWidth={configField}\n size={effectiveSize}\n deleteDisabled={deleteDisabled}\n // We have to control the keys so we can power the `rightActions`\n selectedKeys={selectedKeys}\n onSelectionChange={(keys) => {\n onSelectionChange?.(keys);\n setSelectedKeys(keys);\n }}\n {...props}\n />\n </FormField>\n );\n};\n\nexport default ListBoxField;\n","import { Fragment, type MouseEvent, type ReactNode, useState } from 'react';\n\nimport { IconButton } from '@persona/design-system/components/Button';\nimport { useFormGroup } from '@persona/design-system/components/ConfigFormGroup';\nimport DropdownMenu from '@persona/design-system/components/DropdownMenu';\nimport type { FormLabelProps } from '@persona/design-system/components/FormControl';\nimport type { MenuItemProps } from '@persona/design-system/components/Menu';\nimport TableBox, { type TableBoxProps } from '@persona/design-system/components/TableBox';\nimport { MoreIcon, PlusIcon } from '@persona/icons';\n\nimport FormField from './FormField';\nimport type { ImplementsFormField } from './inputFields';\n\nexport interface TableBoxFieldAction extends Omit<MenuItemProps, 'children'> {\n label: string;\n onClick: (selectedKey: TableBoxProps['selectedKey']) => void;\n}\n\nexport interface TableBoxFieldActionGroup {\n type: 'group';\n heading: string;\n actions: TableBoxFieldAction[];\n}\n\nexport type TableBoxFieldActionEntry = TableBoxFieldAction | TableBoxFieldActionGroup;\n\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='Add item to table'\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,W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,MAAd;MACE,GAAI;MACJ,UAAU,YAAY,MAAM;MAC5B,eAAe,MAAM,QAAQ,YAAY;MACzC,MAAK;gBAEJ,MAAM;MACW,CAAA,CACX,EAAA,EAVI,GAAG,MAAM,MAAM,GAAG,aAUtB;MAEb;IACW,CAAA;IAEf,SAAS,iBAAiB,CAAC,qBAAqB;GACjD,qBACC,oBAACA,sBAAD;IAAc,SAAS;IAAW,QAAA;cAC/B,kBAAkB,QAAQ,KAAK,WAC9B,oBAACA,qBAAa,MAAd;KAEE,GAAI;KACJ,eAAe,kBAAkB,YAAY,OAAO,MAAM;KAC1D,MAAK;eAEJ,OAAO;KACU,EANb,OAAO,MAMM,CACpB;IACW,CAAA;GAEhB,EAAA,CAAA;YAIP,oBAAC,UAAD;GACE,cAAY,GAAG,MAAM;GAER;GACb,oBAAoB,QAAQ;AAC1B,wBAAoB,IAAI;AACxB,mBAAe,IAAI;;GAEN;GACL;GACV,gBAAgB,eAAe,qBAAqB,KAAA;GACzC;GACD;GACV,GAAI;GAEH;GACQ,CAAA;EACD,CAAA;;AAKhB,cAAc,MAAM,SAAS;AAC7B,cAAc,OAAO,SAAS"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.cjs","names":["Spacing","Heading","Paragraph"],"sources":["../../../components/PageHeader/PageHeader.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport styled from 'styled-components';\n\nimport { Spacing } from '@persona/design-tokens';\nimport { Heading, Paragraph } from 'design-system/components/Text';\n\nexport const PageHeaderContainer = styled.header`\n display: flex;\n width: 100%;\n justify-content: space-between;\n align-items: center;\n padding: ${Spacing[3]} ${Spacing[5]};\n background-color: ${({ theme }) => theme.color.background.primary};\n border-bottom: 1px solid ${({ theme }) => theme.color.border.primary};\n box-sizing: border-box;\n min-height: 56px; /* Standardize height for most PageHeaders */\n`;\n\nconst TitleContainer = styled.div`\n display: flex;\n flex: 1;\n align-items: center;\n h1 {\n margin: 0;\n }\n p {\n margin: 0 0 0 ${Spacing[2]};\n }\n`;\n\nconst LeftContainer = styled.div`\n display: flex;\n align-items: center;\n`;\n\nconst RightContainer = styled.div`\n display: flex;\n gap: ${Spacing[2]};\n margin-left: ${Spacing[3]};\n`;\n\nexport interface PageHeaderProps {\n title: ReactNode;\n level?: 'product' | 'detail';\n subtitle?: ReactNode;\n prepend?: ReactNode;\n append?: ReactNode;\n children?: ReactNode;\n}\n\nconst PageHeader = ({\n title,\n subtitle,\n level = 'product',\n prepend,\n append,\n children,\n ...props\n}: PageHeaderProps) => (\n <PageHeaderContainer {...props}>\n <LeftContainer>\n {prepend && <div>{prepend}</div>}\n <TitleContainer>\n {level === 'product' && (\n <Heading as='h1' size='sm'>\n {title}\n </Heading>\n )}\n {level === 'detail' && (\n <Paragraph as='h1' size='lg' color='primary'>\n {title}\n </Paragraph>\n )}\n {subtitle && <Paragraph size='md'>{subtitle}</Paragraph>}\n </TitleContainer>\n {append && <div>{append}</div>}\n </LeftContainer>\n {children && <RightContainer>{children}</RightContainer>}\n </PageHeaderContainer>\n);\n\nexport default PageHeader;\n"],"mappings":";;;;;;;;;;;AAMA,MAAa,sBAAsB,kBAAA,QAAO,MAAM;;;;;aAKnCA,uBAAAA,QAAQ,GAAG,GAAGA,uBAAAA,QAAQ,GAAG;uBACf,EAAE,YAAY,MAAM,MAAM,WAAW,QAAQ;8BACtC,EAAE,YAAY,MAAM,MAAM,OAAO,QAAQ;;;;AAKvE,MAAM,iBAAiB,kBAAA,QAAO,GAAG;;;;;;;;oBAQbA,uBAAAA,QAAQ,GAAG;;;AAI/B,MAAM,gBAAgB,kBAAA,QAAO,GAAG;;;;AAKhC,MAAM,iBAAiB,kBAAA,QAAO,GAAG;;SAExBA,uBAAAA,QAAQ,GAAG;iBACHA,uBAAAA,QAAQ,GAAG;;AAY5B,MAAM,cAAc,EAClB,OACA,UACA,QAAQ,WACR,SACA,QACA,UACA,GAAG,YAEH,iBAAA,GAAA,kBAAA,MAAC,qBAAD;CAAqB,GAAI;WAAzB,CACE,iBAAA,GAAA,kBAAA,MAAC,eAAD,EAAA,UAAA;EACG,WAAW,iBAAA,GAAA,kBAAA,KAAC,OAAD,EAAA,UAAM,SAAc,CAAA;EAChC,iBAAA,GAAA,kBAAA,MAAC,gBAAD,EAAA,UAAA;GACG,UAAU,aACT,iBAAA,GAAA,kBAAA,KAACC,aAAAA,SAAD;IAAS,IAAG;IAAK,MAAK;cACnB;IACO,CAAA;GAEX,UAAU,YACT,iBAAA,GAAA,kBAAA,KAACC,aAAAA,WAAD;IAAW,IAAG;IAAK,MAAK;IAAK,OAAM;cAChC;IACS,CAAA;GAEb,YAAY,iBAAA,GAAA,kBAAA,KAACA,aAAAA,WAAD;IAAW,MAAK;cAAM;IAAqB,CAAA;GACzC,EAAA,CAAA;EAChB,UAAU,iBAAA,GAAA,kBAAA,KAAC,OAAD,EAAA,UAAM,QAAa,CAAA;EAChB,EAAA,CAAA,EACf,YAAY,iBAAA,GAAA,kBAAA,KAAC,gBAAD,EAAiB,UAA0B,CAAA,CACpC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../../../components/PageHeader/PageHeader.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport styled from 'styled-components';\n\nimport { Spacing } from '@persona/design-tokens';\nimport { Heading, Paragraph } from 'design-system/components/Text';\n\nexport const PageHeaderContainer = styled.header`\n display: flex;\n width: 100%;\n justify-content: space-between;\n align-items: center;\n padding: ${Spacing[3]} ${Spacing[5]};\n background-color: ${({ theme }) => theme.color.background.primary};\n border-bottom: 1px solid ${({ theme }) => theme.color.border.primary};\n box-sizing: border-box;\n min-height: 56px; /* Standardize height for most PageHeaders */\n`;\n\nconst TitleContainer = styled.div`\n display: flex;\n flex: 1;\n align-items: center;\n h1 {\n margin: 0;\n }\n p {\n margin: 0 0 0 ${Spacing[2]};\n }\n`;\n\nconst LeftContainer = styled.div`\n display: flex;\n align-items: center;\n`;\n\nconst RightContainer = styled.div`\n display: flex;\n gap: ${Spacing[2]};\n margin-left: ${Spacing[3]};\n`;\n\nexport interface PageHeaderProps {\n title: ReactNode;\n level?: 'product' | 'detail';\n subtitle?: ReactNode;\n prepend?: ReactNode;\n append?: ReactNode;\n children?: ReactNode;\n}\n\nconst PageHeader = ({\n title,\n subtitle,\n level = 'product',\n prepend,\n append,\n children,\n ...props\n}: PageHeaderProps) => (\n <PageHeaderContainer {...props}>\n <LeftContainer>\n {prepend && <div>{prepend}</div>}\n <TitleContainer>\n {level === 'product' && (\n <Heading as='h1' size='sm'>\n {title}\n </Heading>\n )}\n {level === 'detail' && (\n <Paragraph as='h1' size='lg' color='primary'>\n {title}\n </Paragraph>\n )}\n {subtitle && <Paragraph size='md'>{subtitle}</Paragraph>}\n </TitleContainer>\n {append && <div>{append}</div>}\n </LeftContainer>\n {children && <RightContainer>{children}</RightContainer>}\n </PageHeaderContainer>\n);\n\nexport default PageHeader;\n"],"mappings":";;;;;AAMA,MAAa,sBAAsB,OAAO,MAAM;;;;;aAKnC,QAAQ,GAAG,GAAG,QAAQ,GAAG;uBACf,EAAE,YAAY,MAAM,MAAM,WAAW,QAAQ;8BACtC,EAAE,YAAY,MAAM,MAAM,OAAO,QAAQ;;;;AAKvE,MAAM,iBAAiB,OAAO,GAAG;;;;;;;;oBAQb,QAAQ,GAAG;;;AAI/B,MAAM,gBAAgB,OAAO,GAAG;;;;AAKhC,MAAM,iBAAiB,OAAO,GAAG;;SAExB,QAAQ,GAAG;iBACH,QAAQ,GAAG;;AAY5B,MAAM,cAAc,EAClB,OACA,UACA,QAAQ,WACR,SACA,QACA,UACA,GAAG,YAEH,qBAAC,qBAAD;CAAqB,GAAI;WAAzB,CACE,qBAAC,eAAD,EAAA,UAAA;EACG,WAAW,oBAAC,OAAD,EAAA,UAAM,SAAc,CAAA;EAChC,qBAAC,gBAAD,EAAA,UAAA;GACG,UAAU,aACT,oBAAC,SAAD;IAAS,IAAG;IAAK,MAAK;cACnB;IACO,CAAA;GAEX,UAAU,YACT,oBAAC,WAAD;IAAW,IAAG;IAAK,MAAK;IAAK,OAAM;cAChC;IACS,CAAA;GAEb,YAAY,oBAAC,WAAD;IAAW,MAAK;cAAM;IAAqB,CAAA;GACzC,EAAA,CAAA;EAChB,UAAU,oBAAC,OAAD,EAAA,UAAM,QAAa,CAAA;EAChB,EAAA,CAAA,EACf,YAAY,oBAAC,gBAAD,EAAiB,UAA0B,CAAA,CACpC"}