@persona/design-system 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (264) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/{Action-B25g4O9p.d.mts → Action-DnR0YTxO.d.mts} +2 -2
  3. package/dist/Action.d.mts +1 -1
  4. package/dist/Attribute.d.mts +3 -3
  5. package/dist/{Badge-Bd_k492g.mjs → Badge-DRn_r6is.mjs} +2 -2
  6. package/dist/{Badge-Bd_k492g.mjs.map → Badge-DRn_r6is.mjs.map} +1 -1
  7. package/dist/{Breadcrumbs-C9udlH48.mjs → Breadcrumbs-Byf2ye6H.mjs} +8 -8
  8. package/dist/{Breadcrumbs-C9udlH48.mjs.map → Breadcrumbs-Byf2ye6H.mjs.map} +1 -1
  9. package/dist/{Button-KCl4uRtU.d.mts → Button-DkjwN_Op.d.mts} +2 -2
  10. package/dist/Button.d.mts +1 -1
  11. package/dist/CalendarBase.d.mts +1 -1
  12. package/dist/{Card-8DuhHQIk.d.mts → Card-DxFajLnx.d.mts} +4 -4
  13. package/dist/Card.d.mts +1 -1
  14. package/dist/Card2.d.mts +2 -2
  15. package/dist/{CardV2-_GfXFd3d.mjs → CardV2-m9yOInMU.mjs} +10 -10
  16. package/dist/{CardV2-_GfXFd3d.mjs.map → CardV2-m9yOInMU.mjs.map} +1 -1
  17. package/dist/{Checkbox-D77Rg7La.mjs → Checkbox-CU27-Aa8.mjs} +6 -6
  18. package/dist/{Checkbox-D77Rg7La.mjs.map → Checkbox-CU27-Aa8.mjs.map} +1 -1
  19. package/dist/{Combobox-DVI8PoKx.d.mts → Combobox-BgKEHP9p.d.mts} +3 -3
  20. package/dist/{Combobox-BzqlrMK0.mjs → Combobox-DhTUY8JT.mjs} +10 -10
  21. package/dist/{Combobox-BzqlrMK0.mjs.map → Combobox-DhTUY8JT.mjs.map} +1 -1
  22. package/dist/Combobox.d.mts +2 -2
  23. package/dist/{ComboboxBase-B8evOZpf.d.mts → ComboboxBase-Dmzn8a53.d.mts} +6 -6
  24. package/dist/ComboboxBase.d.mts +1 -1
  25. package/dist/{ComboboxMultiSelect-KJarhRm4.d.mts → ComboboxMultiSelect-BLKUKNEW.d.mts} +2 -2
  26. package/dist/ComboboxMultiSelect.d.mts +1 -1
  27. package/dist/{ComboboxSingleSelect-CcIGaphR.d.mts → ComboboxSingleSelect-Kpl-iOok.d.mts} +3 -3
  28. package/dist/ComboboxSingleSelect.d.mts +1 -1
  29. package/dist/{CompactBar-DfP7Wu1l.d.mts → CompactBar-E9hPDRvI.d.mts} +2 -2
  30. package/dist/CompactBar.d.mts +1 -1
  31. package/dist/{ConfigFormGroup-D1Qma23p.mjs → ConfigFormGroup-GgzSDzgL.mjs} +3 -3
  32. package/dist/{ConfigFormGroup-D1Qma23p.mjs.map → ConfigFormGroup-GgzSDzgL.mjs.map} +1 -1
  33. package/dist/DataTable.d.mts +1 -1
  34. package/dist/{DatePicker-CK2D9jvG.mjs → DatePicker-DpGvo7Bd.mjs} +9 -9
  35. package/dist/{DatePicker-CK2D9jvG.mjs.map → DatePicker-DpGvo7Bd.mjs.map} +1 -1
  36. package/dist/{DropdownButton-CaM0itat.mjs → DropdownButton-DGgfGW_o.mjs} +3 -3
  37. package/dist/{DropdownButton-CaM0itat.mjs.map → DropdownButton-DGgfGW_o.mjs.map} +1 -1
  38. package/dist/DropdownButton.d.mts +2 -2
  39. package/dist/{DropdownMenu-Bgho2AsJ.d.mts → DropdownMenu-B2t3Bwky.d.mts} +3 -3
  40. package/dist/{DropdownMenu-B4f3LNoW.mjs → DropdownMenu-DZIFSJXD.mjs} +3 -3
  41. package/dist/{DropdownMenu-B4f3LNoW.mjs.map → DropdownMenu-DZIFSJXD.mjs.map} +1 -1
  42. package/dist/DropdownMenu.d.mts +1 -1
  43. package/dist/{FormControl-CFYlkv7E.mjs → FormControl-BIXJ-FPI.mjs} +5 -5
  44. package/dist/{FormControl-CFYlkv7E.mjs.map → FormControl-BIXJ-FPI.mjs.map} +1 -1
  45. package/dist/{FormControl-iPeOOlFb.d.mts → FormControl-CZFmub1N.d.mts} +2 -2
  46. package/dist/FormControl.d.mts +1 -1
  47. package/dist/FormControlLabel.d.mts +2 -2
  48. package/dist/{FormField-BruK7Des.d.mts → FormField-8rlT8pm0.d.mts} +2 -2
  49. package/dist/{FormField-Bol8gzNt.mjs → FormField-DcGQvgNW.mjs} +25 -24
  50. package/dist/FormField-DcGQvgNW.mjs.map +1 -0
  51. package/dist/FormField.d.mts +1 -1
  52. package/dist/{Header-BxTdWg0Q.d.mts → Header-OLZuv8fF.d.mts} +2 -2
  53. package/dist/Header.d.mts +1 -1
  54. package/dist/{HelperTooltip-Z5NdrLCT.d.mts → HelperTooltip-CJDG7Ugp.d.mts} +2 -2
  55. package/dist/HelperTooltip.d.mts +1 -1
  56. package/dist/{HoverCopyableField-C8AdtVrT.mjs → HoverCopyableField-BHdCaR-R.mjs} +4 -4
  57. package/dist/{HoverCopyableField-C8AdtVrT.mjs.map → HoverCopyableField-BHdCaR-R.mjs.map} +1 -1
  58. package/dist/{IconButton-Bi4kdsbV.mjs → IconButton-DC4rh6ow.mjs} +6 -6
  59. package/dist/{IconButton-Bi4kdsbV.mjs.map → IconButton-DC4rh6ow.mjs.map} +1 -1
  60. package/dist/{IconButton-BycIGS3p.d.mts → IconButton-Dc17jZPG.d.mts} +2 -2
  61. package/dist/IconButton.d.mts +1 -1
  62. package/dist/ImageTile.d.mts +1 -1
  63. package/dist/InlineCombobox.d.mts +1 -1
  64. package/dist/InlineInput.d.mts +1 -1
  65. package/dist/{Input-CEcoDtTu.d.mts → Input-DsS4J78T.d.mts} +4 -4
  66. package/dist/{Input-CSOxMzlt.mjs → Input-PWfwMSJ7.mjs} +5 -5
  67. package/dist/{Input-CSOxMzlt.mjs.map → Input-PWfwMSJ7.mjs.map} +1 -1
  68. package/dist/Input.d.mts +1 -1
  69. package/dist/{ListBox-CSMVAgHm.mjs → ListBox-BwD-q7wF.mjs} +11 -11
  70. package/dist/{ListBox-CSMVAgHm.mjs.map → ListBox-BwD-q7wF.mjs.map} +1 -1
  71. package/dist/{ListBox-CajNIX9P.d.mts → ListBox-Nl9aOBeh.d.mts} +3 -3
  72. package/dist/ListBox.d.mts +1 -1
  73. package/dist/ListBoxField.d.mts +2 -2
  74. package/dist/{LoadingShimmer-Dsc_RCCf.mjs → LoadingShimmer-BPYPtFE1.mjs} +1 -1
  75. package/dist/{LoadingShimmer-Dsc_RCCf.mjs.map → LoadingShimmer-BPYPtFE1.mjs.map} +1 -1
  76. package/dist/LoadingShimmer.d.mts +1 -1
  77. package/dist/{LogicRow-DK1NcP2a.d.mts → LogicRow-BAREMenx.d.mts} +2 -2
  78. package/dist/LogicRow.d.mts +1 -1
  79. package/dist/MaskedInput.d.mts +2 -2
  80. package/dist/MatchHighlight.d.mts +1 -1
  81. package/dist/{Menu-BLtjpLst.d.mts → Menu-DM9OoZ71.d.mts} +4 -4
  82. package/dist/{Menu-DDXR9uHy.mjs → Menu-DpM8o234.mjs} +5 -5
  83. package/dist/{Menu-DDXR9uHy.mjs.map → Menu-DpM8o234.mjs.map} +1 -1
  84. package/dist/Menu.d.mts +1 -1
  85. package/dist/{MiddleTruncatedText-DjsUk8HM.mjs → MiddleTruncatedText-Bzpg3zAU.mjs} +2 -2
  86. package/dist/{MiddleTruncatedText-DjsUk8HM.mjs.map → MiddleTruncatedText-Bzpg3zAU.mjs.map} +1 -1
  87. package/dist/Modal.d.mts +2 -2
  88. package/dist/{PageHeader-BI2gxol5.mjs → PageHeader-Dq-J3san.mjs} +2 -2
  89. package/dist/{PageHeader-BI2gxol5.mjs.map → PageHeader-Dq-J3san.mjs.map} +1 -1
  90. package/dist/PageHeader.d.mts +1 -1
  91. package/dist/PageLayout.d.mts +1 -1
  92. package/dist/{PageSelector-BDo3ge1E.d.mts → PageSelector-Ca4TcyxG.d.mts} +2 -2
  93. package/dist/PageSelector.d.mts +1 -1
  94. package/dist/{Pagination-DiaJX5Da.mjs → Pagination-GALyid4q.mjs} +5 -5
  95. package/dist/{Pagination-DiaJX5Da.mjs.map → Pagination-GALyid4q.mjs.map} +1 -1
  96. package/dist/{Pii-CSBV5Is7.mjs → Pii-BalLvfze.mjs} +2 -2
  97. package/dist/{Pii-CSBV5Is7.mjs.map → Pii-BalLvfze.mjs.map} +1 -1
  98. package/dist/{Popover-5y0p85Sw.mjs → Popover-BZ5Bs80y.mjs} +2 -2
  99. package/dist/{Popover-5y0p85Sw.mjs.map → Popover-BZ5Bs80y.mjs.map} +1 -1
  100. package/dist/{Radio-aMjdUp4K.mjs → Radio-CtPz3EzX.mjs} +4 -4
  101. package/dist/{Radio-aMjdUp4K.mjs.map → Radio-CtPz3EzX.mjs.map} +1 -1
  102. package/dist/{RadioGroup-BpoKyoi3.mjs → RadioGroup-sjBzFE_-.mjs} +3 -3
  103. package/dist/{RadioGroup-BpoKyoi3.mjs.map → RadioGroup-sjBzFE_-.mjs.map} +1 -1
  104. package/dist/Section.d.mts +1 -1
  105. package/dist/{SectionHeading-BxKNuU2m.d.mts → SectionHeading-DvP9NEgN.d.mts} +2 -2
  106. package/dist/SectionHeading.d.mts +1 -1
  107. package/dist/{SegmentedControl-Cgs6qlhN.mjs → SegmentedControl-BugnH-h2.mjs} +3 -3
  108. package/dist/{SegmentedControl-Cgs6qlhN.mjs.map → SegmentedControl-BugnH-h2.mjs.map} +1 -1
  109. package/dist/{Select-COT4bkPb.d.mts → Select-BmJ1OjXA.d.mts} +2 -2
  110. package/dist/{Select-CmJEiYXU.mjs → Select-DL-AjL0Q.mjs} +8 -8
  111. package/dist/{Select-CmJEiYXU.mjs.map → Select-DL-AjL0Q.mjs.map} +1 -1
  112. package/dist/Select.d.mts +1 -1
  113. package/dist/{Spinner-BXfYWjC_.mjs → Spinner-BgBCCHGo.mjs} +2 -2
  114. package/dist/{Spinner-BXfYWjC_.mjs.map → Spinner-BgBCCHGo.mjs.map} +1 -1
  115. package/dist/{Stack-DHaK1-dw.d.mts → Stack-CbcJykx9.d.mts} +2 -2
  116. package/dist/Stack.d.mts +1 -1
  117. package/dist/{Sticker-BOlAy2TE.mjs → Sticker-B0TbkV4o.mjs} +4 -4
  118. package/dist/{Sticker-BOlAy2TE.mjs.map → Sticker-B0TbkV4o.mjs.map} +1 -1
  119. package/dist/{Sticker-C8rvpu7M.d.mts → Sticker-BIVuastf.d.mts} +4 -4
  120. package/dist/Sticker.d.mts +1 -1
  121. package/dist/Tab.d.mts +2 -2
  122. package/dist/{TabBar-DX1Spi6D.mjs → TabBar-DLf4Hwa4.mjs} +6 -6
  123. package/dist/{TabBar-DX1Spi6D.mjs.map → TabBar-DLf4Hwa4.mjs.map} +1 -1
  124. package/dist/TabBarIconButton.d.mts +2 -2
  125. package/dist/{Table-BnYZVCLj.mjs → Table-C-mx8Uj0.mjs} +6 -6
  126. package/dist/{Table-BnYZVCLj.mjs.map → Table-C-mx8Uj0.mjs.map} +1 -1
  127. package/dist/{TableBox-BC5l3UMT.mjs → TableBox-DGjKVQFO.mjs} +13 -13
  128. package/dist/{TableBox-BC5l3UMT.mjs.map → TableBox-DGjKVQFO.mjs.map} +1 -1
  129. package/dist/TableBox.d.mts +1 -1
  130. package/dist/{TableBoxCell-CWh_riC8.d.mts → TableBoxCell-BmoPs1u1.d.mts} +6 -6
  131. package/dist/TableBoxCell.d.mts +1 -1
  132. package/dist/TableBoxField.d.mts +3 -3
  133. package/dist/{TableBoxRow-JnJXVqMr.d.mts → TableBoxRow-BAYvEDjT.d.mts} +2 -2
  134. package/dist/TableBoxRow.d.mts +1 -1
  135. package/dist/{TableBoxRowActions-CfEE1r4C.d.mts → TableBoxRowActions-DRs4MdK0.d.mts} +2 -2
  136. package/dist/TableBoxRowActions.d.mts +1 -1
  137. package/dist/TableCell.d.mts +1 -1
  138. package/dist/{TableControls-51NYgFvI.mjs → TableControls-BK8DCsqi.mjs} +28 -28
  139. package/dist/TableControls-BK8DCsqi.mjs.map +1 -0
  140. package/dist/TableTH.d.mts +1 -1
  141. package/dist/{TechnicalSticker-D7viw4H5.mjs → TechnicalSticker-BrvR0zhC.mjs} +5 -5
  142. package/dist/{TechnicalSticker-D7viw4H5.mjs.map → TechnicalSticker-BrvR0zhC.mjs.map} +1 -1
  143. package/dist/{Text-CEisq2at.d.mts → Text-CfIFUyHt.d.mts} +2 -2
  144. package/dist/Text.d.mts +1 -1
  145. package/dist/{TextArea-DjmlpCdJ.mjs → TextArea-BFsXUkuj.mjs} +3 -3
  146. package/dist/{TextArea-DjmlpCdJ.mjs.map → TextArea-BFsXUkuj.mjs.map} +1 -1
  147. package/dist/{TextUnderlineTooltip-BKE4peKI.d.mts → TextUnderlineTooltip-Bs6Jn5yr.d.mts} +3 -3
  148. package/dist/TextUnderlineTooltip.d.mts +1 -1
  149. package/dist/Tile.d.mts +1 -1
  150. package/dist/{Toggle-D1rEjYoN.mjs → Toggle-CC2FTAKS.mjs} +6 -6
  151. package/dist/{Toggle-D1rEjYoN.mjs.map → Toggle-CC2FTAKS.mjs.map} +1 -1
  152. package/dist/{Tooltip-DZVPqxai.d.mts → Tooltip-0iXDCV2O.d.mts} +3 -3
  153. package/dist/{Tooltip-B-DDlRMw.mjs → Tooltip-CDvOu1UN.mjs} +3 -3
  154. package/dist/{Tooltip-B-DDlRMw.mjs.map → Tooltip-CDvOu1UN.mjs.map} +1 -1
  155. package/dist/Tooltip.d.mts +1 -1
  156. package/dist/{TruncatedText-D2R7uy_y.d.mts → TruncatedText-CdeU19Ev.d.mts} +2 -2
  157. package/dist/components/Attribute/index.mjs +8 -8
  158. package/dist/components/Attribute/index.mjs.map +1 -1
  159. package/dist/components/Badge/index.mjs +1 -1
  160. package/dist/components/Banner/index.mjs +2 -2
  161. package/dist/components/Breadcrumbs/index.mjs +1 -1
  162. package/dist/components/Button/index.d.mts +2 -2
  163. package/dist/components/Button/index.mjs +1 -1
  164. package/dist/components/ButtonGroup/index.mjs +3 -3
  165. package/dist/components/Card/index.d.mts +2 -2
  166. package/dist/components/CardV2/index.d.mts +1 -1
  167. package/dist/components/CardV2/index.mjs +1 -1
  168. package/dist/components/Checkbox/index.mjs +1 -1
  169. package/dist/components/Combobox/index.d.mts +2 -2
  170. package/dist/components/Combobox/index.mjs +1 -1
  171. package/dist/components/ConfigFormGroup/index.mjs +2 -2
  172. package/dist/components/DataTable/TableControls/index.d.mts +1 -1
  173. package/dist/components/DataTable/TableControls/index.mjs +1 -1
  174. package/dist/components/DataTable/index.mjs +14 -14
  175. package/dist/components/DataTable/types.d.mts +2 -2
  176. package/dist/components/DatePicker/index.mjs +1 -1
  177. package/dist/components/DropdownButton/index.mjs +1 -1
  178. package/dist/components/DropdownMenu/index.d.mts +1 -1
  179. package/dist/components/DropdownMenu/index.mjs +1 -1
  180. package/dist/components/FormControl/index.d.mts +1 -1
  181. package/dist/components/FormControl/index.mjs +2 -2
  182. package/dist/components/FormField/index.d.mts +1 -1
  183. package/dist/components/FormField/index.mjs +1 -1
  184. package/dist/components/HoverCopyableField/index.mjs +1 -1
  185. package/dist/components/ImageTile/index.mjs +8 -8
  186. package/dist/components/Input/index.d.mts +1 -1
  187. package/dist/components/Input/index.mjs +1 -1
  188. package/dist/components/Link/index.mjs +2 -2
  189. package/dist/components/ListBox/index.d.mts +3 -3
  190. package/dist/components/ListBox/index.mjs +1 -1
  191. package/dist/components/LoadingShimmer/index.mjs +1 -1
  192. package/dist/components/MaskedInput/index.mjs +1 -1
  193. package/dist/components/Menu/index.d.mts +1 -1
  194. package/dist/components/Menu/index.mjs +1 -1
  195. package/dist/components/Modal/index.mjs +12 -4
  196. package/dist/components/Modal/index.mjs.map +1 -1
  197. package/dist/components/PageHeader/index.mjs +1 -1
  198. package/dist/components/Pagination/index.d.mts +1 -1
  199. package/dist/components/Pagination/index.mjs +1 -1
  200. package/dist/components/Pii/index.mjs +1 -1
  201. package/dist/components/Popover/index.mjs +1 -1
  202. package/dist/components/ProgressBar/index.mjs +1 -1
  203. package/dist/components/ProgressIndicator/index.mjs +1 -1
  204. package/dist/components/Radio/index.mjs +1 -1
  205. package/dist/components/RadioGroup/index.mjs +1 -1
  206. package/dist/components/SegmentedControl/index.mjs +1 -1
  207. package/dist/components/Select/index.d.mts +1 -1
  208. package/dist/components/Select/index.mjs +1 -1
  209. package/dist/components/Slider/index.mjs +3 -3
  210. package/dist/components/Spinner/index.mjs +1 -1
  211. package/dist/components/Stack/index.d.mts +1 -1
  212. package/dist/components/StatusIndicator/index.mjs +1 -1
  213. package/dist/components/Sticker/index.d.mts +1 -1
  214. package/dist/components/Sticker/index.mjs +1 -1
  215. package/dist/components/TabBar/index.mjs +1 -1
  216. package/dist/components/Table/index.d.mts +1 -1
  217. package/dist/components/Table/index.mjs +1 -1
  218. package/dist/components/TableBox/index.d.mts +1 -1
  219. package/dist/components/TableBox/index.mjs +1 -1
  220. package/dist/components/TechnicalSticker/index.mjs +1 -1
  221. package/dist/components/Text/index.d.mts +1 -1
  222. package/dist/components/TextArea/index.mjs +1 -1
  223. package/dist/components/Tile/index.mjs +2 -2
  224. package/dist/components/Toast/index.mjs +4 -4
  225. package/dist/components/Toggle/index.mjs +1 -1
  226. package/dist/components/Tooltip/index.d.mts +3 -3
  227. package/dist/components/Tooltip/index.mjs +1 -1
  228. package/dist/fieldPickerOptions.d.mts +1 -1
  229. package/dist/{index-DLV1eMsr.d.mts → index-CdaoOvFH.d.mts} +3 -3
  230. package/dist/{index-Doptc4HI.d.mts → index-DJn4AeE4.d.mts} +2 -2
  231. package/dist/index.d.mts +1 -1
  232. package/dist/inputFields.d.mts +5 -5
  233. package/dist/{intersperse-vOYvFOfF.mjs → intersperse-yd3oMrQl.mjs} +1 -1
  234. package/dist/{intersperse-vOYvFOfF.mjs.map → intersperse-yd3oMrQl.mjs.map} +1 -1
  235. package/dist/lib/MiddleTruncatedText.mjs +1 -1
  236. package/dist/lib/TruncatedText.d.mts +1 -1
  237. package/dist/lib/TruncatedText.mjs +1 -1
  238. package/dist/lib/TruncatedTextWithTooltip.d.mts +1 -1
  239. package/dist/lib/TruncatedTextWithTooltip.mjs +1 -1
  240. package/dist/lib/embeddedSurfaceProtocol.d.mts +29 -0
  241. package/dist/lib/embeddedSurfaceProtocol.mjs +74 -0
  242. package/dist/lib/embeddedSurfaceProtocol.mjs.map +1 -0
  243. package/dist/lib/embeddedSurfaceRegistry.d.mts +11 -0
  244. package/dist/lib/embeddedSurfaceRegistry.mjs +19 -0
  245. package/dist/lib/embeddedSurfaceRegistry.mjs.map +1 -0
  246. package/dist/lib/useEmbeddedSurface.d.mts +6 -0
  247. package/dist/lib/useEmbeddedSurface.mjs +135 -0
  248. package/dist/lib/useEmbeddedSurface.mjs.map +1 -0
  249. package/dist/lib/zindex.d.mts +2 -0
  250. package/dist/lib/zindex.mjs +2 -0
  251. package/dist/lib/zindex.mjs.map +1 -1
  252. package/dist/mixins/hoverable.mjs +1 -1
  253. package/dist/mixins/input.mjs +1 -1
  254. package/dist/patterns/LayoutLoadingShimmer/index.mjs +4 -4
  255. package/dist/useComboboxFooterAction.d.mts +1 -1
  256. package/dist/{useFormField-DhYd6bNn.mjs → useFormField-eftOPiXj.mjs} +2 -2
  257. package/dist/{useFormField-DhYd6bNn.mjs.map → useFormField-eftOPiXj.mjs.map} +1 -1
  258. package/dist/{useFormGroup-DWVW7A9f.mjs → useFormGroup-BMukAMAd.mjs} +1 -1
  259. package/dist/{useFormGroup-DWVW7A9f.mjs.map → useFormGroup-BMukAMAd.mjs.map} +1 -1
  260. package/dist/useTruncation.d.mts +1 -1
  261. package/package.json +7 -1
  262. package/skills/ui-authoring/SKILL.md +1 -1
  263. package/dist/FormField-Bol8gzNt.mjs.map +0 -1
  264. package/dist/TableControls-51NYgFvI.mjs.map +0 -1
@@ -1,3 +1,3 @@
1
- import { t as CaretButton } from "./ComboboxBase-B8evOZpf.mjs";
2
- import { n as ComboboxProps, t as Combobox } from "./Combobox-DVI8PoKx.mjs";
1
+ import { t as CaretButton } from "./ComboboxBase-Dmzn8a53.mjs";
2
+ import { n as ComboboxProps, t as Combobox } from "./Combobox-BgKEHP9p.mjs";
3
3
  export { CaretButton, Combobox, Combobox as default, ComboboxProps };
@@ -1,12 +1,12 @@
1
- import { r as ButtonProps } from "./Button-KCl4uRtU.mjs";
2
- import { c as ParagraphProps, u as SpanProps } from "./Text-CEisq2at.mjs";
1
+ import { r as ButtonProps } from "./Button-DkjwN_Op.mjs";
2
+ import { c as ParagraphProps, u as SpanProps } from "./Text-CfIFUyHt.mjs";
3
3
  import { n as InputSizes } from "./input-D3Qd6dI8.mjs";
4
- import { a as InputProps } from "./Input-CEcoDtTu.mjs";
5
- import { o as StickerProps } from "./Sticker-C8rvpu7M.mjs";
4
+ import { a as InputProps } from "./Input-DsS4J78T.mjs";
5
+ import { o as StickerProps } from "./Sticker-BIVuastf.mjs";
6
6
  import { Spacing } from "@persona/design-tokens";
7
+ import * as _$styled_components0 from "styled-components";
7
8
  import * as _$react from "react";
8
9
  import { CSSProperties, ReactNode } from "react";
9
- import * as _$styled_components0 from "styled-components";
10
10
  import * as _$react_jsx_runtime0 from "react/jsx-runtime";
11
11
  import { Virtualizer } from "@tanstack/react-virtual";
12
12
 
@@ -363,4 +363,4 @@ declare function DropdownPortalWrapper({
363
363
  }: DropdownPortalWrapperProps): _$react_jsx_runtime0.JSX.Element;
364
364
  //#endregion
365
365
  export { isNestedGroup as A, SearchInputContainer as C, flattenOptions as D, flattenLeafOptions as E, renderOptionsWithGroups as M, useDropdownPosition as N, getNavigableItemsAtLevel as O, useFilteredOptions as P, SearchInput as S, containsNestedGroup as T, LoadingContainer as _, ComboboxOptionGroup as a, OptionLabel as b, Description as c, DropdownPortalWrapperProps as d, EmptyState as f, LeafOptionEntry as g, InputContainer as h, ComboboxOption as i, isOptionGroup as j, getOptionsAtPath as k, DropdownContainer as l, FooterActionRow as m, ComboboxBaseProps as n, ComboboxOptionsOrGroups as o, FooterAction as p, ComboboxInput as r, Container as s, CaretButton as t, DropdownPortalWrapper as u, MAX_DROPDOWN_HEIGHT as v, buildVirtualRows as w, ScrollableMenuList as x, NavigableItem as y };
366
- //# sourceMappingURL=ComboboxBase-B8evOZpf.d.mts.map
366
+ //# sourceMappingURL=ComboboxBase-Dmzn8a53.d.mts.map
@@ -1,2 +1,2 @@
1
- import { A as isNestedGroup, C as SearchInputContainer, D as flattenOptions, E as flattenLeafOptions, M as renderOptionsWithGroups, N as useDropdownPosition, O as getNavigableItemsAtLevel, P as useFilteredOptions, S as SearchInput, T as containsNestedGroup, _ as LoadingContainer, a as ComboboxOptionGroup, b as OptionLabel, c as Description, d as DropdownPortalWrapperProps, f as EmptyState, g as LeafOptionEntry, h as InputContainer, i as ComboboxOption, j as isOptionGroup, k as getOptionsAtPath, l as DropdownContainer, m as FooterActionRow, n as ComboboxBaseProps, o as ComboboxOptionsOrGroups, p as FooterAction, r as ComboboxInput, s as Container, t as CaretButton, u as DropdownPortalWrapper, v as MAX_DROPDOWN_HEIGHT, w as buildVirtualRows, x as ScrollableMenuList, y as NavigableItem } from "./ComboboxBase-B8evOZpf.mjs";
1
+ import { A as isNestedGroup, C as SearchInputContainer, D as flattenOptions, E as flattenLeafOptions, M as renderOptionsWithGroups, N as useDropdownPosition, O as getNavigableItemsAtLevel, P as useFilteredOptions, S as SearchInput, T as containsNestedGroup, _ as LoadingContainer, a as ComboboxOptionGroup, b as OptionLabel, c as Description, d as DropdownPortalWrapperProps, f as EmptyState, g as LeafOptionEntry, h as InputContainer, i as ComboboxOption, j as isOptionGroup, k as getOptionsAtPath, l as DropdownContainer, m as FooterActionRow, n as ComboboxBaseProps, o as ComboboxOptionsOrGroups, p as FooterAction, r as ComboboxInput, s as Container, t as CaretButton, u as DropdownPortalWrapper, v as MAX_DROPDOWN_HEIGHT, w as buildVirtualRows, x as ScrollableMenuList, y as NavigableItem } from "./ComboboxBase-Dmzn8a53.mjs";
2
2
  export { CaretButton, ComboboxBaseProps, ComboboxInput, ComboboxOption, ComboboxOptionGroup, ComboboxOptionsOrGroups, Container, Description, DropdownContainer, DropdownPortalWrapper, DropdownPortalWrapperProps, EmptyState, FooterAction, FooterActionRow, InputContainer, LeafOptionEntry, LoadingContainer, MAX_DROPDOWN_HEIGHT, NavigableItem, OptionLabel, ScrollableMenuList, SearchInput, SearchInputContainer, buildVirtualRows, containsNestedGroup, flattenLeafOptions, flattenOptions, getNavigableItemsAtLevel, getOptionsAtPath, isNestedGroup, isOptionGroup, renderOptionsWithGroups, useDropdownPosition, useFilteredOptions };
@@ -1,4 +1,4 @@
1
- import { n as ComboboxBaseProps } from "./ComboboxBase-B8evOZpf.mjs";
1
+ import { n as ComboboxBaseProps } from "./ComboboxBase-Dmzn8a53.mjs";
2
2
 
3
3
  //#region components/Combobox/ComboboxMultiSelect.d.ts
4
4
  interface ComboboxMultiSelectProps<T = string> extends ComboboxBaseProps<T> {
@@ -44,4 +44,4 @@ declare const ComboboxMultiSelect: <T = string>(props: ComboboxMultiSelectProps<
44
44
  }) => React.ReactElement;
45
45
  //#endregion
46
46
  export { ComboboxMultiSelectProps as n, ComboboxMultiSelect as t };
47
- //# sourceMappingURL=ComboboxMultiSelect-KJarhRm4.d.mts.map
47
+ //# sourceMappingURL=ComboboxMultiSelect-BLKUKNEW.d.mts.map
@@ -1,2 +1,2 @@
1
- import { n as ComboboxMultiSelectProps, t as ComboboxMultiSelect } from "./ComboboxMultiSelect-KJarhRm4.mjs";
1
+ import { n as ComboboxMultiSelectProps, t as ComboboxMultiSelect } from "./ComboboxMultiSelect-BLKUKNEW.mjs";
2
2
  export { ComboboxMultiSelect, ComboboxMultiSelect as default, ComboboxMultiSelectProps };
@@ -1,6 +1,6 @@
1
1
  import { n as InputSizes } from "./input-D3Qd6dI8.mjs";
2
- import { n as ComboboxBaseProps } from "./ComboboxBase-B8evOZpf.mjs";
3
- import { u as MenuItemType } from "./Menu-BLtjpLst.mjs";
2
+ import { n as ComboboxBaseProps } from "./ComboboxBase-Dmzn8a53.mjs";
3
+ import { u as MenuItemType } from "./Menu-DM9OoZ71.mjs";
4
4
  import * as _$styled_components0 from "styled-components";
5
5
 
6
6
  //#region components/Combobox/ComboboxSingleSelect.d.ts
@@ -32,4 +32,4 @@ declare const ComboboxSingleSelect: <T = string>(props: ComboboxSingleSelectProp
32
32
  }) => React.ReactElement;
33
33
  //#endregion
34
34
  export { ComboboxSingleSelectProps as n, StyledMenuItem as r, ComboboxSingleSelect as t };
35
- //# sourceMappingURL=ComboboxSingleSelect-CcIGaphR.d.mts.map
35
+ //# sourceMappingURL=ComboboxSingleSelect-Kpl-iOok.d.mts.map
@@ -1,2 +1,2 @@
1
- import { n as ComboboxSingleSelectProps, r as StyledMenuItem, t as ComboboxSingleSelect } from "./ComboboxSingleSelect-CcIGaphR.mjs";
1
+ import { n as ComboboxSingleSelectProps, r as StyledMenuItem, t as ComboboxSingleSelect } from "./ComboboxSingleSelect-Kpl-iOok.mjs";
2
2
  export { ComboboxSingleSelect, ComboboxSingleSelect as default, ComboboxSingleSelectProps, StyledMenuItem };
@@ -1,4 +1,4 @@
1
- import { n as HStackProps } from "./Stack-DHaK1-dw.mjs";
1
+ import { n as HStackProps } from "./Stack-CbcJykx9.mjs";
2
2
  import { n as ControlBarProps } from "./ControlBar-DYrjBDzu.mjs";
3
3
  import * as _$styled_components0 from "styled-components";
4
4
  import * as _$react_jsx_runtime0 from "react/jsx-runtime";
@@ -18,4 +18,4 @@ type CompactBarProps = Pick<ControlBarProps, 'title' | 'searchProps' | 'showFilt
18
18
  declare const CompactBar: React.FC<CompactBarProps>;
19
19
  //#endregion
20
20
  export { DataTableCompactBar as n, CompactBar as t };
21
- //# sourceMappingURL=CompactBar-DfP7Wu1l.d.mts.map
21
+ //# sourceMappingURL=CompactBar-E9hPDRvI.d.mts.map
@@ -1,2 +1,2 @@
1
- import { n as DataTableCompactBar, t as CompactBar } from "./CompactBar-DfP7Wu1l.mjs";
1
+ import { n as DataTableCompactBar, t as CompactBar } from "./CompactBar-E9hPDRvI.mjs";
2
2
  export { DataTableCompactBar, CompactBar as default };
@@ -1,7 +1,7 @@
1
- import { t as FormGroupContext } from "./useFormGroup-DWVW7A9f.mjs";
1
+ import { t as FormGroupContext } from "./useFormGroup-BMukAMAd.mjs";
2
2
  import { Spacing } from "@persona/design-tokens";
3
- import { forwardRef } from "react";
4
3
  import styled from "styled-components";
4
+ import { forwardRef } from "react";
5
5
  import { jsx } from "react/jsx-runtime";
6
6
  //#region components/ConfigFormGroup/ConfigFormGroup.tsx
7
7
  /**
@@ -25,4 +25,4 @@ const ConfigFormGroup = forwardRef(function ConfigFormGroup(props, ref) {
25
25
  //#endregion
26
26
  export { ConfigFormGroup as t };
27
27
 
28
- //# sourceMappingURL=ConfigFormGroup-D1Qma23p.mjs.map
28
+ //# sourceMappingURL=ConfigFormGroup-GgzSDzgL.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ConfigFormGroup-D1Qma23p.mjs","names":[],"sources":["../components/ConfigFormGroup/ConfigFormGroup.tsx"],"sourcesContent":["import { type ComponentPropsWithoutRef, forwardRef } from 'react';\nimport styled from 'styled-components';\n\nimport { Spacing } from '@persona/design-tokens';\n\nimport { FormGroupContext } from './useFormGroup';\n\n/**\n * Use to wrap a group of config fields.\n * Provides consistent spacing between the fields.\n */\nconst FormGroup = styled.div`\n display: flex;\n flex-direction: column;\n gap: ${Spacing[5]};\n`;\n\nexport const ConfigFormGroup = forwardRef<HTMLDivElement, ComponentPropsWithoutRef<'div'>>(\n function ConfigFormGroup(props, ref) {\n return (\n <FormGroupContext.Provider value={{ configField: true }}>\n <FormGroup ref={ref} {...props} />\n </FormGroupContext.Provider>\n );\n },\n);\n\nexport default ConfigFormGroup;\n"],"mappings":";;;;;;;;;;AAWA,MAAM,YAAY,OAAO,GAAG;;;SAGnB,QAAQ,GAAG;;AAGpB,MAAa,kBAAkB,WAC7B,SAAS,gBAAgB,OAAO,KAAK;AACnC,QACE,oBAAC,iBAAiB,UAAlB;EAA2B,OAAO,EAAE,aAAa,MAAM;YACrD,oBAAC,WAAD;GAAgB;GAAK,GAAI;GAAS,CAAA;EACR,CAAA;EAGjC"}
1
+ {"version":3,"file":"ConfigFormGroup-GgzSDzgL.mjs","names":[],"sources":["../components/ConfigFormGroup/ConfigFormGroup.tsx"],"sourcesContent":["import { type ComponentPropsWithoutRef, forwardRef } from 'react';\nimport styled from 'styled-components';\n\nimport { Spacing } from '@persona/design-tokens';\n\nimport { FormGroupContext } from './useFormGroup';\n\n/**\n * Use to wrap a group of config fields.\n * Provides consistent spacing between the fields.\n */\nconst FormGroup = styled.div`\n display: flex;\n flex-direction: column;\n gap: ${Spacing[5]};\n`;\n\nexport const ConfigFormGroup = forwardRef<HTMLDivElement, ComponentPropsWithoutRef<'div'>>(\n function ConfigFormGroup(props, ref) {\n return (\n <FormGroupContext.Provider value={{ configField: true }}>\n <FormGroup ref={ref} {...props} />\n </FormGroupContext.Provider>\n );\n },\n);\n\nexport default ConfigFormGroup;\n"],"mappings":";;;;;;;;;;AAWA,MAAM,YAAY,OAAO,GAAG;;;SAGnB,QAAQ,GAAG;;AAGpB,MAAa,kBAAkB,WAC7B,SAAS,gBAAgB,OAAO,KAAK;AACnC,QACE,oBAAC,iBAAiB,UAAlB;EAA2B,OAAO,EAAE,aAAa,MAAM;YACrD,oBAAC,WAAD;GAAgB;GAAK,GAAI;GAAS,CAAA;EACR,CAAA;EAGjC"}
@@ -3,8 +3,8 @@ import { n as TableControlsProps, t as TableControls } from "./TableControls-Dsc
3
3
  import { t as Pagination } from "./Pagination-Dcmv7bVe.mjs";
4
4
  import { BulkAction, DataTableColumnFormat, DataTableColumns, RowAction, SortProps } from "./components/DataTable/types.mjs";
5
5
  import { RenderFormatFn } from "./useTableColumns.mjs";
6
- import { ComponentProps } from "react";
7
6
  import * as _$styled_components0 from "styled-components";
7
+ import { ComponentProps } from "react";
8
8
  import * as _$react_jsx_runtime0 from "react/jsx-runtime";
9
9
  import { ColumnFiltersState, RowData } from "@tanstack/react-table";
10
10
 
@@ -1,16 +1,16 @@
1
- import { t as Card_default } from "./Card-CLTkZLKr.mjs";
2
1
  import { isDisabled, isFocused, isFocusedVisible, isHovered, isNotDisabled } from "./lib/pseudoClass.mjs";
3
- import { Z_INDICES } from "./lib/zindex.mjs";
4
2
  import { focusWithinOutline } from "./mixins/focus.mjs";
5
3
  import inputMixin from "./mixins/input.mjs";
6
- import { t as IconButton } from "./IconButton-Bi4kdsbV.mjs";
7
- import { c as MenuList, s as MenuItem } from "./Menu-DDXR9uHy.mjs";
8
- import { t as ClearButton } from "./Input-CSOxMzlt.mjs";
9
- import { s as Popover_default } from "./Popover-5y0p85Sw.mjs";
10
- import { a as FormLabel } from "./FormControl-CFYlkv7E.mjs";
4
+ import { t as Card_default } from "./Card-CLTkZLKr.mjs";
5
+ import { Z_INDICES } from "./lib/zindex.mjs";
6
+ import { t as IconButton } from "./IconButton-DC4rh6ow.mjs";
7
+ import { t as ClearButton } from "./Input-PWfwMSJ7.mjs";
8
+ import { c as MenuList, s as MenuItem } from "./Menu-DpM8o234.mjs";
9
+ import { s as Popover_default } from "./Popover-BZ5Bs80y.mjs";
10
+ import { a as FormLabel } from "./FormControl-BIXJ-FPI.mjs";
11
11
  import { BorderRadius, Color, Spacing, Typography } from "@persona/design-tokens";
12
- import { forwardRef, memo, useCallback, useEffect, useRef, useState } from "react";
13
12
  import styled, { css } from "styled-components";
13
+ import { forwardRef, memo, useCallback, useEffect, useRef, useState } from "react";
14
14
  import { jsx, jsxs } from "react/jsx-runtime";
15
15
  import { ArrowLeftIcon, ArrowRightIcon, CircleXInverseIcon } from "@persona/icons";
16
16
  import { range } from "lodash/fp.js";
@@ -919,4 +919,4 @@ const DateRangePicker = ({ granularity = "day", hideTimeZone = true, className,
919
919
  //#endregion
920
920
  export { Calendar as i, DatePicker as n, DateField as r, DateRangePicker as t };
921
921
 
922
- //# sourceMappingURL=DatePicker-CK2D9jvG.mjs.map
922
+ //# sourceMappingURL=DatePicker-DpGvo7Bd.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"DatePicker-CK2D9jvG.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 } 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 // A ref, not state: the close sequence focuses the field before a state update would commit.\n const isClosingRef = useRef(false);\n\n const { focusWithinProps } = useFocusWithin({\n onFocusWithin: () => {\n if (!state.isOpen && !isClosingRef.current) {\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 isClosingRef.current = 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(() => {\n isClosingRef.current = false;\n });\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 visibleMonths?: 1 | 2;\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 visibleMonths = 2,\n setDateMode,\n setValue,\n granularity,\n ...props\n}: RangeCalendarProps) => {\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 visibleMonths?: 1 | 2;\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 // A ref, not state: focus can return to a field before a state update would commit.\n const isClosingRef = useRef(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 && !isClosingRef.current) {\n state.setOpen(true);\n }\n }, [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 isClosingRef.current = true;\n requestAnimationFrame(() => {\n isClosingRef.current = false;\n });\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 visibleMonths={props.visibleMonths}\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":";;;;;;;;;;;;;;;;;;;;;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M,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
+ {"version":3,"file":"DatePicker-DpGvo7Bd.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 } 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 // A ref, not state: the close sequence focuses the field before a state update would commit.\n const isClosingRef = useRef(false);\n\n const { focusWithinProps } = useFocusWithin({\n onFocusWithin: () => {\n if (!state.isOpen && !isClosingRef.current) {\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 isClosingRef.current = 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(() => {\n isClosingRef.current = false;\n });\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 visibleMonths?: 1 | 2;\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 visibleMonths = 2,\n setDateMode,\n setValue,\n granularity,\n ...props\n}: RangeCalendarProps) => {\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 visibleMonths?: 1 | 2;\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 // A ref, not state: focus can return to a field before a state update would commit.\n const isClosingRef = useRef(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 && !isClosingRef.current) {\n state.setOpen(true);\n }\n }, [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 isClosingRef.current = true;\n requestAnimationFrame(() => {\n isClosingRef.current = false;\n });\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 visibleMonths={props.visibleMonths}\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,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C;WAEF,OAAM,SAAS;QAEb,OAAO,MAAM,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,5 +1,5 @@
1
- import { n as Button } from "./IconButton-Bi4kdsbV.mjs";
2
- import { n as DropdownMenu_default } from "./DropdownMenu-B4f3LNoW.mjs";
1
+ import { n as Button } from "./IconButton-DC4rh6ow.mjs";
2
+ import { n as DropdownMenu_default } from "./DropdownMenu-DZIFSJXD.mjs";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  import { CaretDownIcon } from "@persona/icons";
5
5
  //#region components/DropdownButton/DropdownButton.tsx
@@ -23,4 +23,4 @@ const DropdownButton = ({ children, menuItems, menuProps, side, ...props }) => {
23
23
  //#endregion
24
24
  export { DropdownButton as t };
25
25
 
26
- //# sourceMappingURL=DropdownButton-CaM0itat.mjs.map
26
+ //# sourceMappingURL=DropdownButton-DGgfGW_o.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"DropdownButton-CaM0itat.mjs","names":["DropdownMenu"],"sources":["../components/DropdownButton/DropdownButton.tsx"],"sourcesContent":["import type { FC, ReactNode } from 'react';\n\nimport { CaretDownIcon } from '@persona/icons';\nimport Button, { type ButtonProps } from 'design-system/components/Button';\nimport DropdownMenu, {\n type DropdownMenuProps,\n} from 'design-system/components/DropdownMenu/DropdownMenu';\n\nexport interface DropdownButtonProps extends ButtonProps {\n /**\n * Use `DropdownMenu.Item` components to render the menu items.\n */\n menuItems: ReactNode;\n /**\n * Additional props will be spread to the inner `<DropdownMenu>` component.\n */\n menuProps?: Partial<Omit<DropdownMenuProps, 'trigger'>>;\n /**\n * The side of the dropdown menu.\n */\n side?: DropdownMenuProps['side'];\n}\n\n/**\n * A button that opens a dropdown menu.\n */\nexport const DropdownButton: FC<DropdownButtonProps> = ({\n children,\n menuItems,\n menuProps,\n side,\n ...props\n}) => {\n return (\n <DropdownMenu\n trigger={\n <Button variant='basic' width='auto' suffixIcon={<CaretDownIcon />} {...props}>\n {children}\n </Button>\n }\n side={side}\n {...menuProps}\n >\n {menuItems}\n </DropdownMenu>\n );\n};\n\nexport default DropdownButton;\n"],"mappings":";;;;;;;;AA0BA,MAAa,kBAA2C,EACtD,UACA,WACA,WACA,MACA,GAAG,YACC;AACJ,QACE,oBAACA,sBAAD;EACE,SACE,oBAAC,QAAD;GAAQ,SAAQ;GAAQ,OAAM;GAAO,YAAY,oBAAC,eAAD,EAAiB,CAAA;GAAE,GAAI;GACrE;GACM,CAAA;EAEL;EACN,GAAI;YAEH;EACY,CAAA"}
1
+ {"version":3,"file":"DropdownButton-DGgfGW_o.mjs","names":["DropdownMenu"],"sources":["../components/DropdownButton/DropdownButton.tsx"],"sourcesContent":["import type { FC, ReactNode } from 'react';\n\nimport { CaretDownIcon } from '@persona/icons';\nimport Button, { type ButtonProps } from 'design-system/components/Button';\nimport DropdownMenu, {\n type DropdownMenuProps,\n} from 'design-system/components/DropdownMenu/DropdownMenu';\n\nexport interface DropdownButtonProps extends ButtonProps {\n /**\n * Use `DropdownMenu.Item` components to render the menu items.\n */\n menuItems: ReactNode;\n /**\n * Additional props will be spread to the inner `<DropdownMenu>` component.\n */\n menuProps?: Partial<Omit<DropdownMenuProps, 'trigger'>>;\n /**\n * The side of the dropdown menu.\n */\n side?: DropdownMenuProps['side'];\n}\n\n/**\n * A button that opens a dropdown menu.\n */\nexport const DropdownButton: FC<DropdownButtonProps> = ({\n children,\n menuItems,\n menuProps,\n side,\n ...props\n}) => {\n return (\n <DropdownMenu\n trigger={\n <Button variant='basic' width='auto' suffixIcon={<CaretDownIcon />} {...props}>\n {children}\n </Button>\n }\n side={side}\n {...menuProps}\n >\n {menuItems}\n </DropdownMenu>\n );\n};\n\nexport default DropdownButton;\n"],"mappings":";;;;;;;;AA0BA,MAAa,kBAA2C,EACtD,UACA,WACA,WACA,MACA,GAAG,YACC;AACJ,QACE,oBAACA,sBAAD;EACE,SACE,oBAAC,QAAD;GAAQ,SAAQ;GAAQ,OAAM;GAAO,YAAY,oBAAC,eAAD,EAAiB,CAAA;GAAE,GAAI;GACrE;GACM,CAAA;EAEL;EACN,GAAI;YAEH;EACY,CAAA"}
@@ -1,5 +1,5 @@
1
- import { r as ButtonProps } from "./Button-KCl4uRtU.mjs";
2
- import { n as DropdownMenuProps } from "./DropdownMenu-Bgho2AsJ.mjs";
1
+ import { r as ButtonProps } from "./Button-DkjwN_Op.mjs";
2
+ import { n as DropdownMenuProps } from "./DropdownMenu-B2t3Bwky.mjs";
3
3
  import { FC, ReactNode } from "react";
4
4
 
5
5
  //#region components/DropdownButton/DropdownButton.d.ts
@@ -1,6 +1,6 @@
1
- import { l as MenuItemProps, s as MenuHeadingProps } from "./Menu-BLtjpLst.mjs";
2
- import { ComponentPropsWithRef, ComponentPropsWithoutRef, ElementType, FC, FunctionComponentElement } from "react";
1
+ import { l as MenuItemProps, s as MenuHeadingProps } from "./Menu-DM9OoZ71.mjs";
3
2
  import * as _$styled_components0 from "styled-components";
3
+ import { ComponentPropsWithRef, ComponentPropsWithoutRef, ElementType, FC, FunctionComponentElement } from "react";
4
4
  import * as _$react_jsx_runtime0 from "react/jsx-runtime";
5
5
  import * as Primitive from "@radix-ui/react-dropdown-menu";
6
6
  import { Property } from "csstype";
@@ -72,4 +72,4 @@ declare const _default: (({
72
72
  };
73
73
  //#endregion
74
74
  export { DropdownMenuProps as n, _default as r, DropdownMenu as t };
75
- //# sourceMappingURL=DropdownMenu-Bgho2AsJ.d.mts.map
75
+ //# sourceMappingURL=DropdownMenu-B2t3Bwky.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import "./variables/spacing.mjs";
2
2
  import { Z_INDICES } from "./lib/zindex.mjs";
3
- import { a as MenuDivider, i as Menu, o as MenuHeading, s as MenuItem } from "./Menu-DDXR9uHy.mjs";
4
- import { Children, forwardRef } from "react";
3
+ import { a as MenuDivider, i as Menu, o as MenuHeading, s as MenuItem } from "./Menu-DpM8o234.mjs";
5
4
  import styled from "styled-components";
5
+ import { Children, forwardRef } from "react";
6
6
  import { jsx, jsxs } from "react/jsx-runtime";
7
7
  import * as Primitive from "@radix-ui/react-dropdown-menu";
8
8
  //#region components/DropdownMenu/DropdownMenu.tsx
@@ -57,4 +57,4 @@ var DropdownMenu_default = Object.assign(DropdownMenu, {
57
57
  //#endregion
58
58
  export { DropdownMenu_default as n, DropdownMenu as t };
59
59
 
60
- //# sourceMappingURL=DropdownMenu-B4f3LNoW.mjs.map
60
+ //# sourceMappingURL=DropdownMenu-DZIFSJXD.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"DropdownMenu-B4f3LNoW.mjs","names":[],"sources":["../components/DropdownMenu/DropdownMenu.tsx"],"sourcesContent":["import * as Primitive from '@radix-ui/react-dropdown-menu';\nimport type { Property } from 'csstype';\nimport {\n Children,\n type ComponentPropsWithoutRef,\n type ComponentPropsWithRef,\n type ElementType,\n type FC,\n forwardRef,\n type FunctionComponentElement,\n type Ref,\n} from 'react';\nimport styled from 'styled-components';\n\nimport Menu, {\n MenuDivider,\n MenuHeading,\n MenuItem,\n type MenuItemProps,\n} from 'design-system/components/Menu/Menu';\nimport { Z_INDICES } from 'design-system/lib/zindex';\nimport { BASE } from 'design-system/variables/spacing';\n\nconst DropdownMenuContent = styled(Primitive.Content)<{ $zIndex?: Property.ZIndex }>`\n z-index: ${({ $zIndex }) => $zIndex || Z_INDICES.tooltip};\n`;\n\nexport interface DropdownMenuProps\n extends Primitive.DropdownMenuProps, Pick<Primitive.DropdownMenuContentProps, 'side' | 'align'> {\n id?: string;\n className?: string;\n\n trigger: FunctionComponentElement<any>;\n\n /**\n * Props passed to internal DropdownMenu.Content component.\n */\n contentProps?: Primitive.DropdownMenuContentProps;\n\n /**\n * Props passed to internal DropdownMenu.Trigger component.\n */\n triggerProps?: Primitive.DropdownMenuTriggerProps;\n\n /**\n * Props passed to internal DropdownMenu.Portal component.\n */\n portalProps?: Primitive.DropdownMenuPortalProps;\n\n /**\n * Whether or not to wrap menu with DropdownMenu.Portal component.\n */\n portal?: boolean;\n\n /**\n * Whether or not clicks render menu items.\n */\n disabled?: boolean;\n\n zIndex?: Property.ZIndex;\n}\n\nexport const DropdownMenu = ({\n trigger,\n children,\n side,\n align = 'end',\n contentProps,\n triggerProps,\n portalProps,\n className,\n portal = false, // Default to false for old behavior\n modal = false,\n disabled = false,\n zIndex,\n ...props\n}: DropdownMenuProps) => {\n if (Children.count(children) === 0) {\n return null;\n }\n\n const content = disabled ? null : (\n <DropdownMenuContent\n sideOffset={BASE}\n collisionPadding={BASE}\n align={align}\n side={side}\n $zIndex={zIndex}\n {...contentProps}\n >\n <Menu className={className} doNotSetRole>\n {children}\n </Menu>\n </DropdownMenuContent>\n );\n\n return (\n <Primitive.Root modal={modal} {...props}>\n <Primitive.Trigger asChild {...triggerProps}>\n {trigger}\n </Primitive.Trigger>\n\n {portal ? <Primitive.Portal {...portalProps}>{content}</Primitive.Portal> : content}\n </Primitive.Root>\n );\n};\n\ninterface DropdownMenuItemProps<T extends ElementType = 'div'>\n extends MenuItemProps<T>, Omit<Primitive.DropdownMenuItemProps, 'asChild' | 'children'> {}\n\ninterface DropdownMenuItemType<T extends ElementType = 'div'> extends FC<\n DropdownMenuItemProps<T> & ComponentPropsWithRef<T>\n> {\n <T extends ElementType = 'div'>(\n props: DropdownMenuItemProps<T> & ComponentPropsWithoutRef<T>,\n ): ReturnType<FC<DropdownMenuItemProps<T> & ComponentPropsWithoutRef<T>>>;\n}\n\n/* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\nconst DropdownMenuItem: DropdownMenuItemType = forwardRef(function DropdownMenuItem(\n { children, disabled, ...props },\n ref: Ref<HTMLDivElement>,\n) {\n return (\n <Primitive.Item asChild disabled={disabled} {...props}>\n <MenuItem disabled={disabled} ref={ref}>\n {children}\n </MenuItem>\n </Primitive.Item>\n );\n});\n\nexport default Object.assign(DropdownMenu, {\n Item: DropdownMenuItem,\n Heading: MenuHeading,\n Divider: MenuDivider,\n});\n"],"mappings":";;;;;;;;AAuBA,MAAM,sBAAsB,OAAO,UAAU,QAAQ;cACvC,EAAE,cAAc,WAAW,UAAU,QAAQ;;AAsC3D,MAAa,gBAAgB,EAC3B,SACA,UACA,MACA,QAAQ,OACR,cACA,cACA,aACA,WACA,SAAS,OACT,QAAQ,OACR,WAAW,OACX,QACA,GAAG,YACoB;AACvB,KAAI,SAAS,MAAM,SAAS,KAAK,EAC/B,QAAO;CAGT,MAAM,UAAU,WAAW,OACzB,oBAAC,qBAAD;EACE,YAAA;EACA,kBAAA;EACO;EACD;EACN,SAAS;EACT,GAAI;YAEJ,oBAAC,MAAD;GAAiB;GAAW,cAAA;GACzB;GACI,CAAA;EACa,CAAA;AAGxB,QACE,qBAAC,UAAU,MAAX;EAAuB;EAAO,GAAI;YAAlC,CACE,oBAAC,UAAU,SAAX;GAAmB,SAAA;GAAQ,GAAI;aAC5B;GACiB,CAAA,EAEnB,SAAS,oBAAC,UAAU,QAAX;GAAkB,GAAI;aAAc;GAA2B,CAAA,GAAG,QAC7D;;;AAgBrB,MAAM,mBAAyC,WAAW,SAAS,iBACjE,EAAE,UAAU,UAAU,GAAG,SACzB,KACA;AACA,QACE,oBAAC,UAAU,MAAX;EAAgB,SAAA;EAAkB;EAAU,GAAI;YAC9C,oBAAC,UAAD;GAAoB;GAAe;GAChC;GACQ,CAAA;EACI,CAAA;EAEnB;AAEF,IAAA,uBAAe,OAAO,OAAO,cAAc;CACzC,MAAM;CACN,SAAS;CACT,SAAS;CACV,CAAC"}
1
+ {"version":3,"file":"DropdownMenu-DZIFSJXD.mjs","names":[],"sources":["../components/DropdownMenu/DropdownMenu.tsx"],"sourcesContent":["import * as Primitive from '@radix-ui/react-dropdown-menu';\nimport type { Property } from 'csstype';\nimport {\n Children,\n type ComponentPropsWithoutRef,\n type ComponentPropsWithRef,\n type ElementType,\n type FC,\n forwardRef,\n type FunctionComponentElement,\n type Ref,\n} from 'react';\nimport styled from 'styled-components';\n\nimport Menu, {\n MenuDivider,\n MenuHeading,\n MenuItem,\n type MenuItemProps,\n} from 'design-system/components/Menu/Menu';\nimport { Z_INDICES } from 'design-system/lib/zindex';\nimport { BASE } from 'design-system/variables/spacing';\n\nconst DropdownMenuContent = styled(Primitive.Content)<{ $zIndex?: Property.ZIndex }>`\n z-index: ${({ $zIndex }) => $zIndex || Z_INDICES.tooltip};\n`;\n\nexport interface DropdownMenuProps\n extends Primitive.DropdownMenuProps, Pick<Primitive.DropdownMenuContentProps, 'side' | 'align'> {\n id?: string;\n className?: string;\n\n trigger: FunctionComponentElement<any>;\n\n /**\n * Props passed to internal DropdownMenu.Content component.\n */\n contentProps?: Primitive.DropdownMenuContentProps;\n\n /**\n * Props passed to internal DropdownMenu.Trigger component.\n */\n triggerProps?: Primitive.DropdownMenuTriggerProps;\n\n /**\n * Props passed to internal DropdownMenu.Portal component.\n */\n portalProps?: Primitive.DropdownMenuPortalProps;\n\n /**\n * Whether or not to wrap menu with DropdownMenu.Portal component.\n */\n portal?: boolean;\n\n /**\n * Whether or not clicks render menu items.\n */\n disabled?: boolean;\n\n zIndex?: Property.ZIndex;\n}\n\nexport const DropdownMenu = ({\n trigger,\n children,\n side,\n align = 'end',\n contentProps,\n triggerProps,\n portalProps,\n className,\n portal = false, // Default to false for old behavior\n modal = false,\n disabled = false,\n zIndex,\n ...props\n}: DropdownMenuProps) => {\n if (Children.count(children) === 0) {\n return null;\n }\n\n const content = disabled ? null : (\n <DropdownMenuContent\n sideOffset={BASE}\n collisionPadding={BASE}\n align={align}\n side={side}\n $zIndex={zIndex}\n {...contentProps}\n >\n <Menu className={className} doNotSetRole>\n {children}\n </Menu>\n </DropdownMenuContent>\n );\n\n return (\n <Primitive.Root modal={modal} {...props}>\n <Primitive.Trigger asChild {...triggerProps}>\n {trigger}\n </Primitive.Trigger>\n\n {portal ? <Primitive.Portal {...portalProps}>{content}</Primitive.Portal> : content}\n </Primitive.Root>\n );\n};\n\ninterface DropdownMenuItemProps<T extends ElementType = 'div'>\n extends MenuItemProps<T>, Omit<Primitive.DropdownMenuItemProps, 'asChild' | 'children'> {}\n\ninterface DropdownMenuItemType<T extends ElementType = 'div'> extends FC<\n DropdownMenuItemProps<T> & ComponentPropsWithRef<T>\n> {\n <T extends ElementType = 'div'>(\n props: DropdownMenuItemProps<T> & ComponentPropsWithoutRef<T>,\n ): ReturnType<FC<DropdownMenuItemProps<T> & ComponentPropsWithoutRef<T>>>;\n}\n\n/* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\nconst DropdownMenuItem: DropdownMenuItemType = forwardRef(function DropdownMenuItem(\n { children, disabled, ...props },\n ref: Ref<HTMLDivElement>,\n) {\n return (\n <Primitive.Item asChild disabled={disabled} {...props}>\n <MenuItem disabled={disabled} ref={ref}>\n {children}\n </MenuItem>\n </Primitive.Item>\n );\n});\n\nexport default Object.assign(DropdownMenu, {\n Item: DropdownMenuItem,\n Heading: MenuHeading,\n Divider: MenuDivider,\n});\n"],"mappings":";;;;;;;;AAuBA,MAAM,sBAAsB,OAAO,UAAU,QAAQ;cACvC,EAAE,cAAc,WAAW,UAAU,QAAQ;;AAsC3D,MAAa,gBAAgB,EAC3B,SACA,UACA,MACA,QAAQ,OACR,cACA,cACA,aACA,WACA,SAAS,OACT,QAAQ,OACR,WAAW,OACX,QACA,GAAG,YACoB;AACvB,KAAI,SAAS,MAAM,SAAS,KAAK,EAC/B,QAAO;CAGT,MAAM,UAAU,WAAW,OACzB,oBAAC,qBAAD;EACE,YAAA;EACA,kBAAA;EACO;EACD;EACN,SAAS;EACT,GAAI;YAEJ,oBAAC,MAAD;GAAiB;GAAW,cAAA;GACzB;GACI,CAAA;EACa,CAAA;AAGxB,QACE,qBAAC,UAAU,MAAX;EAAuB;EAAO,GAAI;YAAlC,CACE,oBAAC,UAAU,SAAX;GAAmB,SAAA;GAAQ,GAAI;aAC5B;GACiB,CAAA,EAEnB,SAAS,oBAAC,UAAU,QAAX;GAAkB,GAAI;aAAc;GAA2B,CAAA,GAAG,QAC7D;;;AAgBrB,MAAM,mBAAyC,WAAW,SAAS,iBACjE,EAAE,UAAU,UAAU,GAAG,SACzB,KACA;AACA,QACE,oBAAC,UAAU,MAAX;EAAgB,SAAA;EAAkB;EAAU,GAAI;YAC9C,oBAAC,UAAD;GAAoB;GAAe;GAChC;GACQ,CAAA;EACI,CAAA;EAEnB;AAEF,IAAA,uBAAe,OAAO,OAAO,cAAc;CACzC,MAAM;CACN,SAAS;CACT,SAAS;CACV,CAAC"}
@@ -1,2 +1,2 @@
1
- import { n as DropdownMenuProps, r as _default, t as DropdownMenu } from "./DropdownMenu-Bgho2AsJ.mjs";
1
+ import { n as DropdownMenuProps, r as _default, t as DropdownMenu } from "./DropdownMenu-B2t3Bwky.mjs";
2
2
  export { DropdownMenu, DropdownMenuProps, _default as default };