@servicetitan/anvil2 1.48.1 → 1.49.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 (258) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/{Alert-Cz_w_cw0.js → Alert-aGBkujwE.js} +4 -4
  3. package/dist/{Alert-Cz_w_cw0.js.map → Alert-aGBkujwE.js.map} +1 -1
  4. package/dist/Alert.js +1 -1
  5. package/dist/{Announcement-C1xSJkl0.js → Announcement-BPwFNhYe.js} +4 -4
  6. package/dist/{Announcement-C1xSJkl0.js.map → Announcement-BPwFNhYe.js.map} +1 -1
  7. package/dist/Announcement.js +1 -1
  8. package/dist/{AnvilProvider-DDo8ZcIA.js → AnvilProvider-DBYMPYAO.js} +3 -3
  9. package/dist/{AnvilProvider-DDo8ZcIA.js.map → AnvilProvider-DBYMPYAO.js.map} +1 -1
  10. package/dist/AnvilProvider.js +1 -1
  11. package/dist/{Avatar-VQrimv28.js → Avatar-DeEV-v-b.js} +2 -2
  12. package/dist/{Avatar-VQrimv28.js.map → Avatar-DeEV-v-b.js.map} +1 -1
  13. package/dist/{Avatar-Bbwk2MCy.js → Avatar-gtxslf5v.js} +2 -2
  14. package/dist/{Avatar-Bbwk2MCy.js.map → Avatar-gtxslf5v.js.map} +1 -1
  15. package/dist/Avatar.js +2 -2
  16. package/dist/{Badge-DOnID5l5.js → Badge-DY5xJkqi.js} +2 -2
  17. package/dist/{Badge-DOnID5l5.js.map → Badge-DY5xJkqi.js.map} +1 -1
  18. package/dist/Badge.js +1 -1
  19. package/dist/{Breadcrumbs-DKqd8VRz.js → Breadcrumbs-DjR-2OEH.js} +5 -5
  20. package/dist/{Breadcrumbs-DKqd8VRz.js.map → Breadcrumbs-DjR-2OEH.js.map} +1 -1
  21. package/dist/Breadcrumbs.js +1 -1
  22. package/dist/{Button-DzcOa6iJ.js → Button-92_FKAyV.js} +3 -3
  23. package/dist/{Button-DzcOa6iJ.js.map → Button-92_FKAyV.js.map} +1 -1
  24. package/dist/Button.js +1 -1
  25. package/dist/{ButtonCompound-Dvr3Fres.js → ButtonCompound-COdSELhh.js} +2 -2
  26. package/dist/{ButtonCompound-Dvr3Fres.js.map → ButtonCompound-COdSELhh.js.map} +1 -1
  27. package/dist/ButtonCompound.js +1 -1
  28. package/dist/{ButtonLink-DGIRpyK6.js → ButtonLink-C0zR7Wnb.js} +3 -3
  29. package/dist/{ButtonLink-DGIRpyK6.js.map → ButtonLink-C0zR7Wnb.js.map} +1 -1
  30. package/dist/ButtonLink.js +1 -1
  31. package/dist/{ButtonToggle-Dv6VAm4W.js → ButtonToggle--sKvhBoA.js} +3 -3
  32. package/dist/{ButtonToggle-Dv6VAm4W.js.map → ButtonToggle--sKvhBoA.js.map} +1 -1
  33. package/dist/ButtonToggle.js +1 -1
  34. package/dist/{Calendar-NDOcurOz.js → Calendar-BkJs1qTF.js} +59 -69
  35. package/dist/Calendar-BkJs1qTF.js.map +1 -0
  36. package/dist/{Calendar-8bP4LsQV.js → Calendar-WHERvu2Y.js} +2 -2
  37. package/dist/{Calendar-8bP4LsQV.js.map → Calendar-WHERvu2Y.js.map} +1 -1
  38. package/dist/Calendar.css +52 -51
  39. package/dist/Calendar.js +2 -2
  40. package/dist/{Card-Cyoz-LaD.js → Card-Ch3sMUo5.js} +2 -2
  41. package/dist/{Card-Cyoz-LaD.js.map → Card-Ch3sMUo5.js.map} +1 -1
  42. package/dist/Card.js +1 -1
  43. package/dist/{Checkbox-Bsa1FgoI.js → Checkbox-Bhjj-jM4.js} +5 -5
  44. package/dist/{Checkbox-Bsa1FgoI.js.map → Checkbox-Bhjj-jM4.js.map} +1 -1
  45. package/dist/{Checkbox-BJnt8TFk.js → Checkbox-C5Qjq_tU.js} +2 -2
  46. package/dist/{Checkbox-BJnt8TFk.js.map → Checkbox-C5Qjq_tU.js.map} +1 -1
  47. package/dist/Checkbox.js +2 -2
  48. package/dist/{Chip-BGa1Inb8.js → Chip-X2EwdZ97.js} +4 -4
  49. package/dist/{Chip-BGa1Inb8.js.map → Chip-X2EwdZ97.js.map} +1 -1
  50. package/dist/Chip.js +1 -1
  51. package/dist/{Combobox-BfqKpX1v.js → Combobox-C4COM7BZ.js} +13 -13
  52. package/dist/{Combobox-BfqKpX1v.js.map → Combobox-C4COM7BZ.js.map} +1 -1
  53. package/dist/Combobox.js +1 -1
  54. package/dist/{DataTable-xUON92DR.js → DataTable-BkNCMaVu.js} +93 -89
  55. package/dist/DataTable-BkNCMaVu.js.map +1 -0
  56. package/dist/{DateField-Cm0FIG3Y.js → DateField-BNleIuS8.js} +6 -6
  57. package/dist/{DateField-Cm0FIG3Y.js.map → DateField-BNleIuS8.js.map} +1 -1
  58. package/dist/DateField.js +1 -1
  59. package/dist/{DateFieldRange-CGGqW_cg.js → DateFieldRange-BBgvno-_.js} +11 -8
  60. package/dist/{DateFieldRange-CGGqW_cg.js.map → DateFieldRange-BBgvno-_.js.map} +1 -1
  61. package/dist/DateFieldRange.js +1 -1
  62. package/dist/{DateFieldSingle-BYWuJ3IL.js → DateFieldSingle-Bcwkxogy.js} +11 -8
  63. package/dist/{DateFieldSingle-BYWuJ3IL.js.map → DateFieldSingle-Bcwkxogy.js.map} +1 -1
  64. package/dist/DateFieldSingle.js +1 -1
  65. package/dist/DateFieldYearless-DnVJaBBq.js +133 -0
  66. package/dist/DateFieldYearless-DnVJaBBq.js.map +1 -0
  67. package/dist/DateFieldYearless.js +1 -1
  68. package/dist/DateFieldYearlessRange-BivGidsU.js +178 -0
  69. package/dist/DateFieldYearlessRange-BivGidsU.js.map +1 -0
  70. package/dist/DateFieldYearlessRange.css +36 -0
  71. package/dist/DateFieldYearlessRange.d.ts +2 -0
  72. package/dist/DateFieldYearlessRange.js +2 -0
  73. package/dist/DateFieldYearlessRange.js.map +1 -0
  74. package/dist/{DaysOfTheWeek-BIi9dyJP.js → DaysOfTheWeek-Dn6zHxpt.js} +6 -6
  75. package/dist/{DaysOfTheWeek-BIi9dyJP.js.map → DaysOfTheWeek-Dn6zHxpt.js.map} +1 -1
  76. package/dist/DaysOfTheWeek.js +1 -1
  77. package/dist/{Details-Bg7QzlOm.js → Details-CkaKTRvc.js} +3 -3
  78. package/dist/{Details-Bg7QzlOm.js.map → Details-CkaKTRvc.js.map} +1 -1
  79. package/dist/Details.js +1 -1
  80. package/dist/{Dialog-fJClGTI6.js → Dialog-CxH4Vnbb.js} +4 -4
  81. package/dist/{Dialog-fJClGTI6.js.map → Dialog-CxH4Vnbb.js.map} +1 -1
  82. package/dist/Dialog.js +1 -1
  83. package/dist/{Divider-DYZFKug1.js → Divider-Olv8yWXD.js} +2 -2
  84. package/dist/{Divider-DYZFKug1.js.map → Divider-Olv8yWXD.js.map} +1 -1
  85. package/dist/Divider.js +1 -1
  86. package/dist/Dnd.js +1 -1
  87. package/dist/DndSort.js +7 -6
  88. package/dist/DndSort.js.map +1 -1
  89. package/dist/{Drawer-DyHDRTR-.js → Drawer-BLfDJU-e.js} +4 -4
  90. package/dist/{Drawer-DyHDRTR-.js.map → Drawer-BLfDJU-e.js.map} +1 -1
  91. package/dist/Drawer.js +1 -1
  92. package/dist/{EditCard-LdyduHqX.js → EditCard-Ds1UXJIS.js} +6 -6
  93. package/dist/{EditCard-LdyduHqX.js.map → EditCard-Ds1UXJIS.js.map} +1 -1
  94. package/dist/EditCard.js +1 -1
  95. package/dist/{FieldLabel-DIlzcPIQ.js → FieldLabel-CHMCV9wX.js} +38 -19
  96. package/dist/FieldLabel-CHMCV9wX.js.map +1 -0
  97. package/dist/FieldLabel.css +22 -7
  98. package/dist/FieldLabel.js +1 -1
  99. package/dist/{FieldMessage-BbARBii0.js → FieldMessage-DWONT3dr.js} +2 -2
  100. package/dist/{FieldMessage-BbARBii0.js.map → FieldMessage-DWONT3dr.js.map} +1 -1
  101. package/dist/FieldMessage.js +1 -1
  102. package/dist/{Flex-GLF5XRJg.js → Flex-CjPHUTeq.js} +2 -2
  103. package/dist/{Flex-GLF5XRJg.js.map → Flex-CjPHUTeq.js.map} +1 -1
  104. package/dist/Flex.js +1 -1
  105. package/dist/{Grid-BpAt2zA7.js → Grid-DW2cAuHi.js} +2 -2
  106. package/dist/{Grid-BpAt2zA7.js.map → Grid-DW2cAuHi.js.map} +1 -1
  107. package/dist/Grid.js +1 -1
  108. package/dist/{Helper-DHoKHqxV.js → Helper-DjWotFtO.js} +2 -2
  109. package/dist/{Helper-DHoKHqxV.js.map → Helper-DjWotFtO.js.map} +1 -1
  110. package/dist/{Icon-TcJbUdTz.js → Icon-BSuTVNaa.js} +2 -2
  111. package/dist/{Icon-TcJbUdTz.js.map → Icon-BSuTVNaa.js.map} +1 -1
  112. package/dist/Icon.js +1 -1
  113. package/dist/{InputMask-B6oJlChY.js → InputMask-Cd01c3Tj.js} +2 -2
  114. package/dist/{InputMask-B6oJlChY.js.map → InputMask-Cd01c3Tj.js.map} +1 -1
  115. package/dist/InputMask.js +1 -1
  116. package/dist/{Link-Br_AJ7Af.js → Link-DuYh7Xl2.js} +3 -3
  117. package/dist/{Link-Br_AJ7Af.js.map → Link-DuYh7Xl2.js.map} +1 -1
  118. package/dist/Link.js +1 -1
  119. package/dist/{LinkButton-CwiVzaro.js → LinkButton-pIUNATNE.js} +2 -2
  120. package/dist/{LinkButton-CwiVzaro.js.map → LinkButton-pIUNATNE.js.map} +1 -1
  121. package/dist/LinkButton.js +1 -1
  122. package/dist/{ListView-fBFSagWO.js → ListView-CZ5T8bR1.js} +3 -3
  123. package/dist/{ListView-fBFSagWO.js.map → ListView-CZ5T8bR1.js.map} +1 -1
  124. package/dist/ListView.js +1 -1
  125. package/dist/{Listbox-gtZ2Ao_I.js → Listbox-C-n4IVVj.js} +5 -5
  126. package/dist/{Listbox-gtZ2Ao_I.js.map → Listbox-C-n4IVVj.js.map} +1 -1
  127. package/dist/Listbox.js +1 -1
  128. package/dist/{LocalizationProvider-Cqattc3O.js → LocalizationProvider-u6xdKCBi.js} +2 -2
  129. package/dist/{LocalizationProvider-Cqattc3O.js.map → LocalizationProvider-u6xdKCBi.js.map} +1 -1
  130. package/dist/LocalizationProvider.js +1 -1
  131. package/dist/{Menu-CBbUK_sX.js → Menu-DUAfSImY.js} +4 -4
  132. package/dist/{Menu-CBbUK_sX.js.map → Menu-DUAfSImY.js.map} +1 -1
  133. package/dist/Menu.js +1 -1
  134. package/dist/{NumberField-CNskrtsN.js → NumberField-C62E56_v.js} +7 -7
  135. package/dist/{NumberField-CNskrtsN.js.map → NumberField-C62E56_v.js.map} +1 -1
  136. package/dist/NumberField.js +1 -1
  137. package/dist/Overflow.js +2 -3
  138. package/dist/Overflow.js.map +1 -1
  139. package/dist/{Page-4VdFrCjy.js → Page-CGZQ-nsg.js} +15 -15
  140. package/dist/Page-CGZQ-nsg.js.map +1 -0
  141. package/dist/Page.js +1 -1
  142. package/dist/{Pagination-CQjNN1yN.js → Pagination-BHEEnNas.js} +6 -6
  143. package/dist/{Pagination-CQjNN1yN.js.map → Pagination-BHEEnNas.js.map} +1 -1
  144. package/dist/Pagination.js +1 -1
  145. package/dist/{Popover--c9PXAVi.js → Popover-CIPg_ZgX.js} +5 -4
  146. package/dist/Popover-CIPg_ZgX.js.map +1 -0
  147. package/dist/Popover.js +1 -1
  148. package/dist/{ProgressBar-CXMuhBQV.js → ProgressBar-CUpF9fFW.js} +6 -6
  149. package/dist/{ProgressBar-CXMuhBQV.js.map → ProgressBar-CUpF9fFW.js.map} +1 -1
  150. package/dist/ProgressBar.js +1 -1
  151. package/dist/{Radio-CTYs8JpI.js → Radio-CyCFna1X.js} +2 -2
  152. package/dist/{Radio-CTYs8JpI.js.map → Radio-CyCFna1X.js.map} +1 -1
  153. package/dist/Radio.js +2 -2
  154. package/dist/{RadioGroup-BVGnsTuG.js → RadioGroup-DRS2EjVH.js} +5 -5
  155. package/dist/{RadioGroup-BVGnsTuG.js.map → RadioGroup-DRS2EjVH.js.map} +1 -1
  156. package/dist/{SearchField-DLqva3o3.js → SearchField-DrgNbG3I.js} +3 -3
  157. package/dist/{SearchField-DLqva3o3.js.map → SearchField-DrgNbG3I.js.map} +1 -1
  158. package/dist/SearchField.js +1 -1
  159. package/dist/{SegmentedControl-1OzOQmCp.js → SegmentedControl-DK1cwC7A.js} +12 -3
  160. package/dist/SegmentedControl-DK1cwC7A.js.map +1 -0
  161. package/dist/SegmentedControl.js +1 -1
  162. package/dist/{SelectCard-Dw7zW0UN.js → SelectCard-lBcnP5j5.js} +4 -4
  163. package/dist/{SelectCard-Dw7zW0UN.js.map → SelectCard-lBcnP5j5.js.map} +1 -1
  164. package/dist/SelectCard.js +1 -1
  165. package/dist/{SelectTrigger-BQNqyG3M.js → SelectTrigger-qvoGCkb1.js} +5 -5
  166. package/dist/{SelectTrigger-BQNqyG3M.js.map → SelectTrigger-qvoGCkb1.js.map} +1 -1
  167. package/dist/SelectTrigger.js +1 -1
  168. package/dist/{SelectTriggerBase-B-fxog4U.js → SelectTriggerBase-C4gebtca.js} +6 -6
  169. package/dist/{SelectTriggerBase-B-fxog4U.js.map → SelectTriggerBase-C4gebtca.js.map} +1 -1
  170. package/dist/{SideNav-COiPAIph.js → SideNav-B1sH17Uc.js} +3 -3
  171. package/dist/{SideNav-COiPAIph.js.map → SideNav-B1sH17Uc.js.map} +1 -1
  172. package/dist/SideNav.js +1 -1
  173. package/dist/Skeleton.js +1 -1
  174. package/dist/{Stepper-xcgOQzru.js → Stepper-BZr9ytpD.js} +7 -4
  175. package/dist/Stepper-BZr9ytpD.js.map +1 -0
  176. package/dist/Stepper.js +1 -1
  177. package/dist/{Switch-mhyHJeex.js → Switch-BXDPs2mD.js} +8 -6
  178. package/dist/Switch-BXDPs2mD.js.map +1 -0
  179. package/dist/Switch.js +1 -1
  180. package/dist/{Tab-BISlFW_i.js → Tab-6UavokJJ.js} +3 -3
  181. package/dist/{Tab-BISlFW_i.js.map → Tab-6UavokJJ.js.map} +1 -1
  182. package/dist/Tab.js +1 -1
  183. package/dist/Table.js +1 -1
  184. package/dist/{Text-CDzLZl1O.js → Text-kPA-VzsB.js} +2 -2
  185. package/dist/{Text-CDzLZl1O.js.map → Text-kPA-VzsB.js.map} +1 -1
  186. package/dist/Text.js +1 -1
  187. package/dist/{TextField-CUrYEZR4.js → TextField-CpVkZxMT.js} +2 -2
  188. package/dist/{TextField-CUrYEZR4.js.map → TextField-CpVkZxMT.js.map} +1 -1
  189. package/dist/{TextField-DPTJjF8V.js → TextField-CygbgVVt.js} +6 -5
  190. package/dist/TextField-CygbgVVt.js.map +1 -0
  191. package/dist/TextField.js +1 -1
  192. package/dist/{Textarea-f0jAKcvn.js → Textarea-DacevzmW.js} +4 -4
  193. package/dist/{Textarea-f0jAKcvn.js.map → Textarea-DacevzmW.js.map} +1 -1
  194. package/dist/Textarea.js +1 -1
  195. package/dist/{ThemeProvider-CUiXHn4p.js → ThemeProvider-Bmsz__5N.js} +2 -2
  196. package/dist/{ThemeProvider-CUiXHn4p.js.map → ThemeProvider-Bmsz__5N.js.map} +1 -1
  197. package/dist/ThemeProvider.js +1 -1
  198. package/dist/{TimeField-CGSwrpl0.js → TimeField-BkOB5ESa.js} +8 -7
  199. package/dist/{TimeField-CGSwrpl0.js.map → TimeField-BkOB5ESa.js.map} +1 -1
  200. package/dist/TimeField.js +1 -1
  201. package/dist/Toast.js +2 -2
  202. package/dist/{Toaster-C6iB4h0P.js → Toaster-BxbR-XcR.js} +2 -2
  203. package/dist/{Toaster-C6iB4h0P.js.map → Toaster-BxbR-XcR.js.map} +1 -1
  204. package/dist/{Toaster-D72xHdfH.js → Toaster-Dg7M4W4U.js} +4 -4
  205. package/dist/{Toaster-D72xHdfH.js.map → Toaster-Dg7M4W4U.js.map} +1 -1
  206. package/dist/{Toolbar-CcJa_YpH.js → Toolbar-XcfHQftc.js} +20 -20
  207. package/dist/{Toolbar-CcJa_YpH.js.map → Toolbar-XcfHQftc.js.map} +1 -1
  208. package/dist/Toolbar.js +1 -1
  209. package/dist/{Tooltip-BOfdwyTv.js → Tooltip-CZsoFe6C.js} +2 -2
  210. package/dist/{Tooltip-BOfdwyTv.js.map → Tooltip-CZsoFe6C.js.map} +1 -1
  211. package/dist/Tooltip.js +1 -1
  212. package/dist/YearlessDateInputWithPicker-MHLlAdrH.js +949 -0
  213. package/dist/YearlessDateInputWithPicker-MHLlAdrH.js.map +1 -0
  214. package/dist/YearlessDateInputWithPicker.css +199 -0
  215. package/dist/beta/components/Table/DataTable/DataTable.d.ts +4 -4
  216. package/dist/beta/components/Table/DataTable/internal/useAsyncData.d.ts +5 -0
  217. package/dist/beta.js +4 -4
  218. package/dist/components/DateFieldYearless/DateFieldYearless.d.ts +57 -3
  219. package/dist/components/DateFieldYearless/internal/PickerList.d.ts +61 -0
  220. package/dist/components/DateFieldYearless/internal/PickerListOption.d.ts +61 -0
  221. package/dist/components/DateFieldYearless/internal/YearlessDateInput.d.ts +51 -0
  222. package/dist/components/DateFieldYearless/internal/YearlessDateInputWithPicker.d.ts +134 -0
  223. package/dist/components/DateFieldYearless/internal/YearlessDateSelectionPopover.d.ts +27 -0
  224. package/dist/components/DateFieldYearless/internal/maskito/yearlessDatePlaceholderMask.d.ts +3 -1
  225. package/dist/components/DateFieldYearless/internal/maskito/yearlessDateSegmentsStepping.d.ts +12 -0
  226. package/dist/components/DateFieldYearless/internal/utils.d.ts +50 -1
  227. package/dist/components/DateFieldYearlessRange/DateFieldYearlessRange.d.ts +59 -0
  228. package/dist/components/DateFieldYearlessRange/index.d.ts +1 -0
  229. package/dist/components/Dnd/DndHandleButton.d.ts +2 -1
  230. package/dist/components/FieldLabel/FieldLabel.d.ts +9 -48
  231. package/dist/components/FieldLabel/internal/FieldLabelMoreInfoIcon.d.ts +3 -1
  232. package/dist/components/Popover/Popover.d.ts +1 -0
  233. package/dist/components/Popover/PopoverContent.d.ts +8 -0
  234. package/dist/components/index.d.ts +1 -0
  235. package/dist/{index-CUVkL0hr.js → index-ByS9WvPk.js} +4 -3
  236. package/dist/index-ByS9WvPk.js.map +1 -0
  237. package/dist/{index.esm-BwMVvxTV.js → index.esm-C2ZhC_8d.js} +2 -2
  238. package/dist/{index.esm-BwMVvxTV.js.map → index.esm-C2ZhC_8d.js.map} +1 -1
  239. package/dist/index.js +68 -67
  240. package/dist/index.js.map +1 -1
  241. package/dist/{useLayoutPropsUtil-C7FVYB8F.js → useLayoutPropsUtil-BlIWftBb.js} +2 -2
  242. package/dist/{useLayoutPropsUtil-C7FVYB8F.js.map → useLayoutPropsUtil-BlIWftBb.js.map} +1 -1
  243. package/dist/{utils-CyPyKUVh.js → utils-aSAOVHjX.js} +2 -2
  244. package/dist/{utils-CyPyKUVh.js.map → utils-aSAOVHjX.js.map} +1 -1
  245. package/package.json +2 -1
  246. package/dist/Calendar-NDOcurOz.js.map +0 -1
  247. package/dist/DataTable-xUON92DR.js.map +0 -1
  248. package/dist/DateFieldYearless-BXRgNWzy.js +0 -266
  249. package/dist/DateFieldYearless-BXRgNWzy.js.map +0 -1
  250. package/dist/FieldLabel-DIlzcPIQ.js.map +0 -1
  251. package/dist/Page-4VdFrCjy.js.map +0 -1
  252. package/dist/Popover--c9PXAVi.js.map +0 -1
  253. package/dist/SegmentedControl-1OzOQmCp.js.map +0 -1
  254. package/dist/Stepper-xcgOQzru.js.map +0 -1
  255. package/dist/Switch-mhyHJeex.js.map +0 -1
  256. package/dist/TextField-DPTJjF8V.js.map +0 -1
  257. package/dist/components/DateFieldYearless/internal/MaskedYearlessDateInput.d.ts +0 -35
  258. package/dist/index-CUVkL0hr.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"Popover--c9PXAVi.js","sources":["../src/internal/hooks/usePopoverTransitionStates/usePopoverTransitionStates.ts","../src/components/Popover/internal/PopoverContext.ts","../src/components/Popover/internal/usePopoverContext.tsx","../src/components/Popover/internal/PopoverLegacy/usePopoverLegacy.tsx","../src/components/Popover/internal/PopoverLegacy/usePopoverLegacyContext.tsx","../src/components/Popover/internal/PopoverLegacy/PopoverLegacyTrigger.tsx","../src/components/Popover/internal/PopoverLegacy/PopoverLegacyContent.tsx","../src/components/Popover/internal/PopoverLegacy/PopoverLegacyClose.tsx","../src/components/Popover/internal/PopoverLegacy/PopoverLegacyButton.tsx","../src/components/Popover/internal/PopoverLegacy/PopoverLegacy.tsx","../src/components/Popover/PopoverClose.tsx","../src/components/Popover/PopoverButton.tsx","../src/components/Popover/PopoverContent.tsx","../src/components/Popover/PopoverTrigger.tsx","../src/components/Popover/Popover.tsx"],"sourcesContent":["import {\n useOpenCloseTransitionStates,\n type OpenCloseTransitionStateEffects,\n} from \"../useOpenCloseTransitionStates\";\n\n/**\n * Effects configuration for dialog transition states\n * @property {() => void} [onOpenAnimationStart] - Callback when opening animation starts\n * @property {() => void} [onCloseAnimationStart] - Callback when closing animation starts\n * @property {() => void} [onOpenAnimationComplete] - Callback when opening animation completes\n * @property {() => void} [onCloseAnimationComplete] - Callback when closing animation completes\n */\n\n/**\n * Custom hook for managing popover transition states and animations.\n *\n * Features:\n * - Manages popover open/close transition states\n * - Handles animation timing based on CSS animation duration\n * - Provides callbacks for animation lifecycle events\n * - Supports controlled popover state management\n * - Automatically handles showPopover() and closePopover() calls\n * - Provides utility flags for open/closed states\n *\n * @param popover - The popover element\n * @param openProp - The open prop controlling popover visibility\n * @param options - Additional, optional options including callbacks for animation start, complete, and initialization\n * @returns Object containing popover state, control functions, and utility flags\n */\nexport const usePopoverTransitionStates = (\n popover: HTMLElement | undefined,\n openProp: boolean | undefined,\n options: OpenCloseTransitionStateEffects = {},\n) => {\n const { onOpenAnimationStart, onCloseAnimationComplete } = options;\n return useOpenCloseTransitionStates(openProp, {\n ...options,\n onOpenAnimationStart: () => {\n if (!popover) return;\n onOpenAnimationStart?.();\n },\n onCloseAnimationComplete: () => {\n if (!popover) return;\n onCloseAnimationComplete?.();\n },\n durationMs: () => {\n if (!popover || !window) return 0;\n const duration = window.getComputedStyle(popover).animationDuration;\n return parseFloat(duration) * 1000;\n },\n });\n};\n","import {\n createContext,\n CSSProperties,\n Dispatch,\n RefObject,\n SetStateAction,\n} from \"react\";\nimport { PopoverProps } from \"../Popover\";\nimport { Placement } from \"@floating-ui/react-dom\";\n\nexport type PopoverContextProps = {\n popoverId: string;\n invoker?: HTMLElement;\n setInvoker?: Dispatch<SetStateAction<HTMLElement | undefined>>;\n popover?: HTMLElement;\n setPopover?: Dispatch<SetStateAction<HTMLElement | undefined>>;\n rootNode?: Node;\n setRootNode?: Dispatch<SetStateAction<Node | undefined>>;\n arrowElement?: HTMLSpanElement;\n setArrowElement?: Dispatch<SetStateAction<HTMLSpanElement | undefined>>;\n openState: boolean;\n popoverStyle?: CSSProperties;\n placement?: Placement;\n openPopover: () => void;\n closePopover: (replacementFn?: () => void) => void;\n onClose?: PopoverProps[\"onClose\"];\n openOnHover: PopoverProps[\"openOnHover\"];\n controlled: boolean;\n disableCloseOnClickOutside?: PopoverProps[\"disableCloseOnClickOutside\"];\n disableCloseOnEscape?: PopoverProps[\"disableCloseOnEscape\"];\n modal?: PopoverProps[\"modal\"];\n noPadding?: PopoverProps[\"noPadding\"];\n fillAvailableHeight: PopoverProps[\"fillAvailableHeight\"];\n maxHeight: PopoverProps[\"maxHeight\"];\n matchReferenceWidth: PopoverProps[\"matchReferenceWidth\"];\n fixedWidth: PopoverProps[\"fixedWidth\"];\n disableCaret: PopoverProps[\"disableCaret\"];\n disableFlipFallback: PopoverProps[\"disableFlipFallback\"];\n disableFocusLock: PopoverProps[\"disableFocusLock\"];\n disableTriggerFocus: PopoverProps[\"disableTriggerFocus\"];\n arrowRef: RefObject<HTMLSpanElement>;\n resetKey: number;\n delay: PopoverProps[\"delay\"];\n triggerHovered: boolean;\n setTriggerHovered: Dispatch<SetStateAction<boolean>>;\n contentHovered: boolean;\n setContentHovered: Dispatch<SetStateAction<boolean>>;\n};\n\nexport const PopoverContext = createContext<PopoverContextProps | null>(null);\n","import {\n useRef,\n useContext,\n useLayoutEffect,\n KeyboardEvent,\n useEffect,\n} from \"react\";\nimport { PopoverContext } from \"./PopoverContext\";\nimport { tabbable } from \"tabbable\";\n\nexport type dataStateType = \"open\" | \"closed\";\n\nexport function usePopoverContext() {\n const context = useContext(PopoverContext);\n const invokerRef = useRef<HTMLButtonElement>(null);\n const popoverRef = useRef<HTMLDivElement>(null);\n const arrowRef = useRef<HTMLSpanElement>(null);\n const { triggerHovered, setTriggerHovered, contentHovered } = context || {};\n\n useLayoutEffect(() => {\n if (!invokerRef.current) return;\n context?.setInvoker?.(invokerRef.current);\n }, [context, invokerRef]);\n\n useLayoutEffect(() => {\n if (!popoverRef.current) return;\n context?.setPopover?.(popoverRef.current);\n context?.setRootNode?.(popoverRef.current.getRootNode());\n if (!arrowRef.current) return;\n context?.setArrowElement?.(arrowRef.current);\n }, [context, popoverRef]);\n\n useEffect(() => {\n if (!context?.openOnHover) return;\n // If the popover was previously opened by hover, and is now unhovered, close the popover after 100ms\n if (!triggerHovered && !contentHovered) {\n const closeTimeout: NodeJS.Timeout = setTimeout(() => {\n context?.closePopover();\n }, 100);\n return () => {\n clearTimeout(closeTimeout);\n };\n }\n // If the popover was unopened by hover, and is now hovered, open the popover after the defined delay\n if (triggerHovered && !contentHovered) {\n if (context?.delay) {\n const openTimeout = setTimeout(() => {\n context?.openPopover();\n }, context.delay);\n return () => {\n clearTimeout(openTimeout);\n };\n } else {\n context?.openPopover();\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [context?.delay, context?.openOnHover, triggerHovered, contentHovered]);\n\n const onMouseEnterHandler = () => {\n if (!context?.openOnHover) return;\n setTriggerHovered?.(true);\n };\n const onMouseLeaveHandler = () => {\n if (!context?.openOnHover) return;\n setTriggerHovered?.(false);\n };\n\n const onFocusHandler = (_e: React.FocusEvent) => {\n if (context?.openOnHover) {\n context?.openPopover();\n }\n };\n\n const onBlurHandler = (e: React.FocusEvent) => {\n if (context?.popover?.contains(e.relatedTarget as Node)) return; // If the focus is within the popover, don't close it\n if (context?.modal && context.openState) {\n e.preventDefault();\n requestAnimationFrame(() => {\n context?.invoker?.focus();\n const focusables = tabbable(context?.popover as Element);\n if (focusables.length > 0) {\n focusables[focusables.length - 1].focus();\n }\n });\n return;\n }\n if (!context?.disableCloseOnClickOutside) {\n context?.closePopover();\n }\n };\n\n const onKeyDownHandler = (e: KeyboardEvent) => {\n if (!context?.openState) return;\n if (\n e.code === \"Escape\" &&\n !context?.disableCloseOnEscape &&\n !context?.controlled\n ) {\n context?.closePopover();\n return;\n }\n };\n\n const onClickHandler = () => {\n context?.invoker?.focus();\n if (context?.openOnHover) return;\n if (context?.controlled === false) {\n if (context?.openState) {\n context?.closePopover();\n } else {\n context?.openPopover();\n }\n return;\n }\n };\n\n if (!context || !invokerRef || !popoverRef) return;\n return {\n invoker: {\n ref: invokerRef,\n element: context.invoker,\n onMouseEnter: onMouseEnterHandler,\n onMouseLeave: onMouseLeaveHandler,\n onKeyDown: onKeyDownHandler,\n onClick: onClickHandler,\n onFocus: onFocusHandler,\n onBlur: onBlurHandler,\n \"aria-haspopup\": true,\n \"aria-expanded\": context.openState,\n \"aria-details\": context.popoverId,\n \"data-state\": context.openState ? \"open\" : (\"closed\" as dataStateType),\n },\n popover: {\n ref: popoverRef,\n element: context.popover,\n id: context.popoverId,\n onClose: context.onClose,\n show: context.openPopover,\n close: context.closePopover,\n noPadding: context.noPadding,\n style: context.popoverStyle,\n arrowRef: arrowRef,\n key: context.resetKey,\n },\n rootNode: context.rootNode,\n onClose: context.onClose,\n open: context.openState,\n openOnHover: context.openOnHover,\n controlled: context.controlled,\n disableCloseOnClickOutside: context.disableCloseOnClickOutside,\n disableCloseOnEscape: context.disableCloseOnEscape,\n modal: context.modal,\n placement: context.placement,\n disableCaret: context.disableCaret,\n noPadding: context.noPadding,\n fillAvailableHeight: context.fillAvailableHeight,\n maxHeight: context.maxHeight,\n matchReferenceWidth: context.matchReferenceWidth,\n fixedWidth: context.fixedWidth,\n disableFlipFallback: context.disableFlipFallback,\n disableFocusLock: context.modal,\n disableTriggerFocus: context.disableTriggerFocus,\n triggerHovered: context.triggerHovered,\n setTriggerHovered: context.setTriggerHovered,\n contentHovered: context.contentHovered,\n setContentHovered: context.setContentHovered,\n };\n}\n","import { useState, useMemo, useRef, ReactNode } from \"react\";\nimport {\n useFloating,\n autoUpdate,\n offset,\n flip,\n shift,\n useClick,\n useDismiss,\n useRole,\n useInteractions,\n Placement,\n useHover,\n arrow,\n size,\n safePolygon,\n limitShift,\n type UseFloatingOptions,\n type UseDismissProps,\n} from \"@floating-ui/react\";\nimport { DisableCloseOnEscapeOrClickProps } from \"../../../../types\";\n\nexport type PopoverLegacyProps = DisableCloseOnEscapeOrClickProps & {\n children?: ReactNode;\n /**\n * Traps focus inside the floating element and outside content cannot be accessed\n */\n modal?: boolean;\n /**\n * Disables the shift of floating element\n * @internal\n */\n disableShift?: boolean;\n /**\n * Disables the flip of floating element\n * @internal\n */\n disableFlip?: boolean;\n /**\n * Disables the flip cross-axis fallback of floating element\n * @internal\n */\n disableFlipFallback?: boolean;\n /**\n * Changes interaction to use hover\n */\n openOnHover?: boolean;\n /**\n * Changes height and positioning for select/combobox\n */\n fillAvailableHeight?: boolean;\n maxHeight?: number | string;\n fitScreen?: boolean;\n minHeight?: number | string;\n matchReferenceWidth?: boolean;\n fixedWidth?: boolean;\n placement?: Placement;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: UseFloatingOptions[\"onOpenChange\"];\n onOutsidePress?: Exclude<UseDismissProps[\"outsidePress\"], boolean>;\n /** This doesn't do anything for older browser */\n delay?: number;\n /**\n * Fires when the floating element is requests to be closed\n * Note: this does not fire when asTooltip is true and mouseleaves to close\n * eg. on clickoutside, [esc] to close, or by <Popover.Close>\n */\n onClose?: () => void;\n disableCaret?: boolean;\n noPadding?: boolean;\n disableAutoUpdate?: boolean;\n disableFocusLock?: boolean;\n disableTriggerFocus?: boolean;\n root?: HTMLElement | React.MutableRefObject<HTMLElement | null> | null;\n};\n\nexport function usePopoverLegacy({\n defaultOpen,\n placement = \"bottom\",\n modal,\n open: controlledOpen,\n onOpenChange: setControlledOpen,\n onOutsidePress,\n onClose,\n disableCloseOnClickOutside,\n disableCloseOnEscape,\n openOnHover,\n fillAvailableHeight,\n fitScreen,\n maxHeight,\n minHeight = \"2.875rem\",\n matchReferenceWidth,\n fixedWidth,\n disableCaret,\n noPadding,\n disableShift,\n disableFlip,\n disableFlipFallback,\n disableAutoUpdate,\n disableFocusLock,\n disableTriggerFocus,\n root,\n}: PopoverLegacyProps = {}) {\n const [uncontrolledOpen, setUncontrolledOpen] = useState(defaultOpen);\n const [labelId, setLabelId] = useState<string | undefined>();\n const [descriptionId, setDescriptionId] = useState<string | undefined>();\n\n const open = controlledOpen ?? uncontrolledOpen;\n const setOpen = setControlledOpen ?? setUncontrolledOpen;\n\n const arrowRef = useRef(null);\n\n const processMinHeight =\n typeof minHeight === \"string\" ? minHeight : `${minHeight}px`;\n\n const data = useFloating({\n placement,\n open,\n onOpenChange: setOpen,\n whileElementsMounted: !disableAutoUpdate ? autoUpdate : undefined,\n middleware: [\n offset(8),\n size({\n padding: 5,\n apply({ rects, availableHeight, elements }) {\n Object.assign(elements.floating.style, {\n ...(matchReferenceWidth\n ? { width: `${rects.reference.width}px` }\n : fixedWidth\n ? { width: \"40dvw\" }\n : {}),\n ...(fillAvailableHeight\n ? {\n height: `${availableHeight - 20}px`,\n minHeight: processMinHeight,\n }\n : {}),\n ...(maxHeight\n ? {\n minHeight: processMinHeight,\n height: fitScreen\n ? typeof maxHeight === \"string\"\n ? maxHeight\n : `${maxHeight}px`\n : undefined,\n maxHeight: fitScreen\n ? `${availableHeight - 20}px`\n : typeof maxHeight === \"string\"\n ? maxHeight\n : `${maxHeight}px`,\n }\n : {}),\n ...(fitScreen && !maxHeight\n ? {\n minHeight: processMinHeight,\n maxHeight: `${availableHeight - 20}px`,\n }\n : {}),\n zIndex: 1,\n });\n },\n }),\n flip({\n mainAxis: !disableFlip,\n crossAxis: false,\n fallbackAxisSideDirection: disableFlipFallback ? \"none\" : \"end\",\n padding: 5,\n }),\n shift({\n padding: 5,\n mainAxis: !disableShift,\n crossAxis: false,\n limiter: limitShift({\n mainAxis: !disableShift,\n }),\n }),\n arrow({ element: !disableCaret ? arrowRef : null, padding: 5 }),\n ],\n });\n\n const context = data.context;\n\n const click = useClick(context, {\n enabled: controlledOpen == null && !openOnHover,\n });\n\n const hover = useHover(context, {\n enabled: controlledOpen == null && !!openOnHover,\n handleClose: safePolygon(),\n });\n\n const dismiss = useDismiss(context, {\n escapeKey: !disableCloseOnEscape,\n outsidePress: (event) => {\n if (disableCloseOnClickOutside) {\n return false;\n }\n\n // if onOutsidePress exists and calling it returns falsy, then skip\n // calling onClose and setOpen and return the falsy value to outsidePress\n const result =\n typeof onOutsidePress === \"function\" ? onOutsidePress?.(event) : true;\n\n if (!result) {\n return result;\n } else {\n onClose?.();\n setOpen(false);\n return result;\n }\n },\n });\n\n const role = useRole(context);\n\n const interactions = useInteractions([click, hover, dismiss, role]);\n\n return useMemo(\n () => ({\n open,\n setOpen,\n onClose,\n ...interactions,\n ...data,\n modal,\n labelId,\n descriptionId,\n setLabelId,\n setDescriptionId,\n arrowRef,\n disableCaret,\n noPadding,\n fillAvailableHeight,\n maxHeight,\n matchReferenceWidth,\n fixedWidth,\n disableFlipFallback,\n disableAutoUpdate,\n disableFocusLock,\n disableTriggerFocus,\n root,\n }),\n [\n open,\n setOpen,\n onClose,\n interactions,\n data,\n modal,\n labelId,\n descriptionId,\n disableCaret,\n noPadding,\n fillAvailableHeight,\n maxHeight,\n matchReferenceWidth,\n fixedWidth,\n disableFlipFallback,\n disableAutoUpdate,\n disableFocusLock,\n disableTriggerFocus,\n root,\n ],\n );\n}\n","import { SetStateAction, Dispatch, createContext, useContext } from \"react\";\n\nimport { usePopoverLegacy } from \"./usePopoverLegacy\";\nimport { ThemeProviderContextProps } from \"../../../../providers\";\n\nexport type PopoverLegacyContextType =\n | (ReturnType<typeof usePopoverLegacy> & {\n setLabelId: Dispatch<SetStateAction<string | undefined>>;\n setDescriptionId: Dispatch<SetStateAction<string | undefined>>;\n theme?: ThemeProviderContextProps[\"theme\"];\n mode?: ThemeProviderContextProps[\"mode\"];\n })\n | null;\n\nexport const PopoverLegacyContext =\n createContext<PopoverLegacyContextType>(null);\n\nexport const usePopoverLegacyContext = () => {\n const context = useContext(PopoverLegacyContext);\n\n if (context == null) {\n throw new Error(\"Popover components must be wrapped in <Popover />\");\n }\n\n return context;\n};\n","import {\n ReactElement,\n useRef,\n ComponentPropsWithRef,\n ElementType,\n} from \"react\";\nimport { usePopoverLegacyContext } from \"./usePopoverLegacyContext\";\nimport { useMergeRefs } from \"../../../../hooks\";\n\ntype PopoverLegacyTriggerDataType = {\n \"data-state\": \"open\" | \"closed\";\n} & ComponentPropsWithRef<ElementType>;\n\nexport type PopoverLegacyTriggerProps = {\n children: (data: PopoverLegacyTriggerDataType) => ReactElement;\n};\n\nexport const PopoverLegacyTrigger = function PopoverLegacyTrigger(\n props: PopoverLegacyTriggerProps,\n) {\n const { children } = props;\n const context = usePopoverLegacyContext();\n const ref = useRef(null);\n const mergedRef = useMergeRefs([context.refs.setReference, ref]);\n\n return children({\n \"data-state\": context.open ? \"open\" : \"closed\",\n \"data-anv\": \"popover-trigger\",\n ...context.getReferenceProps({ ref: mergedRef }),\n });\n};\n","import { forwardRef, HTMLProps, KeyboardEvent, useContext } from \"react\";\nimport {\n FloatingPortal,\n FloatingFocusManager,\n FloatingArrow,\n} from \"@floating-ui/react\";\nimport { usePopoverLegacyContext } from \"./usePopoverLegacyContext\";\nimport styles from \"./PopoverLegacy.module.scss\";\nimport cx from \"classnames\";\nimport { useMergeRefs } from \"../../../../hooks\";\nimport { ThemeProvider } from \"../../../../providers\";\nimport { PortalProviderContext } from \"../../../../providers/PortalProvider\";\nimport { DialogContext } from \"../../../Dialog/internal/DialogContext\";\nimport { DrawerContext } from \"../../../Drawer/internal/DrawerContext\";\n\nexport type PopoverLegacyContentProps = Omit<HTMLProps<HTMLDivElement>, \"ref\">;\n\nexport const PopoverLegacyContent = forwardRef<\n HTMLDivElement,\n PopoverLegacyContentProps\n>(function PopoverContent({ className, style, ...props }, propRef) {\n const {\n context: floatingContext,\n theme,\n mode,\n disableCaret,\n noPadding,\n onClose,\n disableFocusLock,\n disableTriggerFocus,\n root,\n ...context\n } = usePopoverLegacyContext();\n const dialogContext = useContext(DialogContext);\n const drawerContext = useContext(DrawerContext);\n const { root: portalRoot } = useContext(PortalProviderContext);\n\n const ref = useMergeRefs([context.refs.setFloating, propRef]);\n\n if (!floatingContext.open) return null;\n if (dialogContext && !dialogContext?.ref?.current) return null;\n\n const popoverClassNames = cx(className, styles[\"content-legacy\"], {\n [styles[\"no-padding\"]]: noPadding,\n });\n\n const onKeyDownHandler = (e: KeyboardEvent<HTMLDivElement>) => {\n if (e.code === \"Escape\") {\n onClose?.();\n }\n };\n\n return (\n <FloatingPortal\n root={\n root ??\n dialogContext?.ref?.current ??\n drawerContext?.ref?.current ??\n portalRoot\n }\n >\n <FloatingFocusManager\n context={floatingContext}\n modal={context.modal}\n order={disableTriggerFocus ? [\"content\"] : [\"reference\", \"content\"]}\n disabled={disableFocusLock}\n >\n <ThemeProvider theme={theme} mode={mode}>\n <div\n ref={ref}\n data-anv=\"popover-content\"\n style={{ ...context.floatingStyles, ...style }}\n aria-labelledby={context.labelId}\n aria-describedby={context.descriptionId}\n className={popoverClassNames}\n {...context.getFloatingProps(props)}\n onKeyDown={onKeyDownHandler}\n role=\"presentation\"\n >\n <div className={styles[\"scroller-legacy\"]}>{props.children}</div>\n {!disableCaret && (\n <FloatingArrow\n ref={context.arrowRef}\n context={floatingContext}\n className={styles[\"arrow-legacy\"]}\n />\n )}\n </div>\n </ThemeProvider>\n </FloatingFocusManager>\n </FloatingPortal>\n );\n});\n","import { forwardRef } from \"react\";\n\nimport { usePopoverLegacyContext } from \"./usePopoverLegacyContext\";\nimport { Button, ButtonProps } from \"../../../Button\";\n\nexport type PopoverLegacyCloseProps = ButtonProps;\nexport const PopoverLegacyClose = forwardRef<\n HTMLButtonElement,\n PopoverLegacyCloseProps\n>(function PopoverClose(props, ref) {\n const { setOpen, onClose } = usePopoverLegacyContext();\n return (\n <Button\n ref={ref}\n data-anv=\"popover-close\"\n {...props}\n onClick={(event) => {\n props.onClick?.(event);\n onClose?.();\n setOpen(false);\n }}\n />\n );\n});\n","import { Ref, forwardRef } from \"react\";\nimport { usePopoverLegacyContext } from \"./usePopoverLegacyContext\";\nimport { Button, ButtonProps } from \"../../../Button\";\nimport { useMergeRefs } from \"../../../../hooks\";\n\nexport type PopoverLegacyButtonProps = ButtonProps;\n\nexport const PopoverLegacyButton = forwardRef<\n HTMLButtonElement,\n PopoverLegacyButtonProps\n>(function PopoverButton(props, ref) {\n const { children, size, ...rest } = props;\n const context = usePopoverLegacyContext();\n const childrenRef = (children as { ref?: Ref<unknown> })?.ref;\n const mergedRef = useMergeRefs([context.refs.setReference, ref, childrenRef]);\n\n return (\n <Button\n ref={mergedRef}\n size={size}\n data-state={context.open ? \"open\" : \"closed\"}\n data-anv=\"popover-button\"\n {...context.getReferenceProps(rest)}\n >\n {children}\n </Button>\n );\n});\n","import { useContext, useMemo } from \"react\";\nimport { usePopoverLegacy, PopoverLegacyProps } from \"./usePopoverLegacy\";\nimport { PopoverLegacyContext } from \"./usePopoverLegacyContext\";\nimport { PopoverLegacyTrigger } from \"./PopoverLegacyTrigger\";\nimport { PopoverLegacyContent } from \"./PopoverLegacyContent\";\nimport { PopoverLegacyClose } from \"./PopoverLegacyClose\";\nimport { PopoverLegacyButton } from \"./PopoverLegacyButton\";\nimport { ThemeProviderContext } from \"../../../../providers/ThemeProvider/internal/ThemeProviderContext\";\n\nexport function PopoverLegacyElement({\n children,\n modal,\n ...restOptions\n}: PopoverLegacyProps) {\n const popover = usePopoverLegacy({ modal, ...restOptions });\n const { theme, mode = \"light\" } = useContext(ThemeProviderContext);\n const value = useMemo(\n () => ({ ...popover, theme, mode }),\n [mode, popover, theme],\n );\n return (\n <PopoverLegacyContext.Provider value={value}>\n {children}\n </PopoverLegacyContext.Provider>\n );\n}\n\nexport const PopoverLegacy = Object.assign(PopoverLegacyElement, {\n Trigger: PopoverLegacyTrigger,\n Close: PopoverLegacyClose,\n Content: PopoverLegacyContent,\n Button: PopoverLegacyButton,\n});\n","import { forwardRef } from \"react\";\n\nimport { Button, ButtonProps } from \"../Button\";\nimport { usePopoverContext } from \"./internal/usePopoverContext\";\nimport { supportsPopover, childrenToString } from \"../../internal/functions\";\nimport {\n PopoverLegacyClose,\n PopoverLegacyCloseProps,\n} from \"./internal/PopoverLegacy\";\nimport { DataTrackingId } from \"../../types\";\nimport { useTrackingId } from \"../../hooks\";\n\n/**\n * Props for the PopoverClose component\n * @extends ButtonProps\n */\nexport type PopoverCloseProps = ButtonProps & DataTrackingId;\n\n/**\n * PopoverClose component for closing the popover.\n *\n * Features:\n * - Automatic popover closing on click\n * - Supports all Button component props and styling\n * - Controlled and uncontrolled mode support\n * - Legacy popover support with fallback\n * - Context integration with parent popover\n * - Accessibility support with proper button semantics\n * - Delayed closing for controlled mode\n *\n * @example\n * <Popover.Close>Close</Popover.Close>\n *\n * @example\n * <Popover.Close appearance=\"secondary\" size=\"small\">\n * Cancel\n * </Popover.Close>\n *\n * @example\n * <Popover.Close onClick={() => console.log('Custom close handler')}>\n * Close with custom handler\n * </Popover.Close>\n */\nexport const PopoverClose = forwardRef<HTMLButtonElement, PopoverCloseProps>(\n function PopoverClose(props, ref) {\n const { onClick, ...rest } = props;\n const context = usePopoverContext();\n\n const data = {\n children: childrenToString(props.children),\n };\n\n const trackingId = useTrackingId({\n name: \"PopoverClose\",\n data,\n hasOverride: !!props[\"data-tracking-id\"],\n });\n\n if (!supportsPopover())\n return (\n <PopoverLegacyClose {...(props as PopoverLegacyCloseProps)} ref={ref} />\n );\n return (\n <Button\n ref={ref}\n data-tracking-id={trackingId}\n data-anv=\"popover-close\"\n {...rest}\n onClick={(event) => {\n context?.popover.close();\n context?.onClose?.();\n onClick?.(event);\n }}\n />\n );\n },\n);\n\nPopoverClose.displayName = \"PopoverClose\";\n","import { forwardRef, MouseEvent, FocusEvent, KeyboardEvent } from \"react\";\nimport { Button, ButtonProps } from \"../Button\";\nimport { useMergeRefs, useTrackingId } from \"../../hooks\";\nimport { usePopoverContext } from \"./internal/usePopoverContext\";\nimport {\n PopoverLegacyButton,\n PopoverLegacyButtonProps,\n} from \"./internal/PopoverLegacy\";\nimport { supportsPopover, childrenToString } from \"../../internal/functions\";\nimport { DataTrackingId } from \"../../types\";\n\n/**\n * Props for the PopoverButton component\n * @extends ButtonProps\n */\nexport type PopoverButtonProps = ButtonProps & DataTrackingId;\n\n/**\n * PopoverButton component for creating button-style triggers.\n *\n * Features:\n * - Button styling and behavior with all Button props\n * - Automatic popover opening on click\n * - Hover interaction support for tooltip mode\n * - Focus management and keyboard navigation\n * - Accessibility attributes (aria-haspopup, aria-expanded, aria-details)\n * - Legacy popover support with fallback\n * - Context integration with parent popover\n * - Event handling for mouse, keyboard, and focus events\n *\n * @example\n * <Popover.Button>Click to open</Popover.Button>\n *\n * @example\n * <Popover.Button appearance=\"primary\" size=\"large\" icon={InfoIcon}>\n * Information\n * </Popover.Button>\n *\n * @example\n * <Popover.Button onClick={() => console.log('Custom click handler')}>\n * Custom handler\n * </Popover.Button>\n */\nexport const PopoverButton = forwardRef<HTMLButtonElement, PopoverButtonProps>(\n function PopoverButton(props, ref) {\n const {\n children,\n size,\n onMouseEnter,\n onMouseLeave,\n onClick,\n onKeyDown,\n onFocus,\n onBlur,\n ...rest\n } = props;\n const context = usePopoverContext();\n\n const data = {\n children: childrenToString(props.children),\n appearance: props.appearance,\n icon: props.icon,\n size: props.size,\n type: props.type,\n };\n\n const trackingId = useTrackingId({\n name: \"PopoverButton\",\n data,\n hasOverride: !!props[\"data-tracking-id\"],\n });\n\n const onMouseEnterHandler = (e: MouseEvent<HTMLButtonElement>) => {\n onMouseEnter?.(e);\n context?.invoker.onMouseEnter();\n };\n const onMouseLeaveHandler = (e: MouseEvent<HTMLButtonElement>) => {\n onMouseLeave?.(e);\n context?.invoker.onMouseLeave();\n };\n const onFocusHandler = (e: FocusEvent<HTMLButtonElement>) => {\n onFocus?.(e);\n context?.invoker.onFocus(e);\n };\n const onBlurHandler = (e: FocusEvent<HTMLButtonElement>) => {\n onBlur?.(e);\n context?.invoker.onBlur(e);\n };\n const onKeyDownHandler = (e: KeyboardEvent<HTMLButtonElement>) => {\n onKeyDown?.(e);\n context?.invoker.onKeyDown(e);\n };\n\n const onClickHandler = (e: MouseEvent<HTMLButtonElement>) => {\n onClick?.(e);\n context?.invoker.onClick();\n };\n\n const buttonRef = useMergeRefs([context?.invoker.ref, ref]);\n\n if (!supportsPopover())\n return (\n <PopoverLegacyButton\n {...(props as PopoverLegacyButtonProps)}\n ref={ref}\n />\n );\n\n return (\n <Button\n ref={buttonRef}\n size={size}\n onClick={onClickHandler}\n onKeyDown={onKeyDownHandler}\n onMouseEnter={onMouseEnterHandler}\n onMouseLeave={onMouseLeaveHandler}\n onFocus={onFocusHandler}\n onBlur={onBlurHandler}\n data-anv=\"popover-button\"\n data-tracking-id={trackingId}\n aria-haspopup={context?.invoker[\"aria-haspopup\"]}\n aria-expanded={context?.invoker[\"aria-expanded\"]}\n aria-details={context?.invoker[\"aria-details\"]}\n data-state={context?.invoker[\"data-state\"]}\n {...rest}\n >\n {children}\n </Button>\n );\n },\n);\n\nPopoverButton.displayName = \"PopoverButton\";\n","import {\n ComponentPropsWithoutRef,\n forwardRef,\n MouseEvent,\n useRef,\n FocusEvent,\n RefObject,\n} from \"react\";\nimport styles from \"./Popover.module.scss\";\nimport cx from \"classnames\";\nimport { useMergeRefs } from \"../../hooks\";\nimport { usePopoverContext } from \"./internal/usePopoverContext\";\nimport { supportsPopover } from \"../../internal/functions\";\nimport {\n PopoverLegacyContent,\n PopoverLegacyContentProps,\n} from \"./internal/PopoverLegacy\";\nimport { useFocusWithin } from \"../../internal/hooks\";\n\n/**\n * Props for the PopoverContent component\n * @extends ComponentPropsWithoutRef<\"div\">\n */\nexport type PopoverContentProps = Omit<\n ComponentPropsWithoutRef<\"div\">,\n \"popover\"\n> & {\n /**\n * Reference to the scrollable content area\n */\n scrollerRef?: RefObject<HTMLDivElement>;\n};\n\n/**\n * PopoverContent component for the main popover content area.\n *\n * Features:\n * - Automatic positioning and sizing based on trigger\n * - Screen boundary detection and fitting\n * - Scroll handling with custom scroller reference\n * - Focus management and keyboard navigation\n * - Hover interaction support for tooltip mode\n * - Escape key handling for closing\n * - Tab key trapping for modal popovers\n * - Arrow/caret indicator with automatic positioning\n * - Legacy popover support with fallback\n * - Context integration with parent popover\n * - Accessibility support with proper ARIA roles\n *\n * @example\n * <Popover.Content>\n * <p>This is the popover content</p>\n * <Popover.Close>Close</Popover.Close>\n * </Popover.Content>\n *\n * @example\n * <Popover.Content scrollerRef={scrollRef}>\n * <div style={{ height: '200px', overflow: 'auto' }}>\n * {longContent}\n * </div>\n * </Popover.Content>\n */\nexport const PopoverContent = forwardRef<HTMLDivElement, PopoverContentProps>(\n function PopoverContent(props, ref) {\n const {\n children,\n className,\n style,\n onMouseEnter,\n onMouseLeave,\n onKeyDown,\n onFocus,\n onBlur,\n onScroll,\n onScrollCapture,\n scrollerRef,\n ...rest\n } = props;\n const context = usePopoverContext();\n const popoverClassNames = cx(className, styles[\"content\"], {\n [styles[\"no-padding\"]]: context?.noPadding,\n });\n const childrenRef = useRef<HTMLDivElement>(null);\n const combinedStyles = {\n ...style,\n ...context?.popover.style,\n };\n\n const { props: wrapperProps } = useFocusWithin({\n otherRelatedElements: context?.invoker.element\n ? [context?.invoker.element]\n : [],\n onBlur: (e) => {\n if (context?.modal) {\n e.preventDefault();\n requestAnimationFrame(() => {\n context?.invoker.element?.focus();\n });\n return;\n }\n onBlur?.(e as FocusEvent<HTMLDivElement>);\n context?.popover.close();\n },\n onFocus: (e) => {\n onFocus?.(e as FocusEvent<HTMLDivElement>);\n context?.popover.show();\n },\n });\n\n const onMouseEnterHandler = (e: MouseEvent<HTMLDivElement>) => {\n onMouseEnter?.(e);\n if (!context?.openOnHover) return;\n context.setContentHovered(true);\n };\n const onMouseLeaveHandler = (e: MouseEvent<HTMLDivElement>) => {\n onMouseLeave?.(e);\n if (!context?.openOnHover) return;\n context.setContentHovered(false);\n };\n\n const onKeyDownHandler = (e: React.KeyboardEvent<HTMLDivElement>) => {\n onKeyDown?.(e);\n if (e.code === \"Escape\" && !context?.disableCloseOnEscape) {\n context?.popover.close();\n }\n };\n\n const popoverContentRef = useMergeRefs([context?.popover.ref, ref]);\n const popoverScrollerRef = useMergeRefs([childrenRef, scrollerRef]);\n\n if (!supportsPopover())\n return (\n <PopoverLegacyContent\n {...(props as PopoverLegacyContentProps)}\n ref={ref}\n />\n );\n\n return (\n <div\n popover={\"manual\"}\n id={context?.popover.id}\n data-anv=\"popover-content\"\n className={popoverClassNames}\n ref={popoverContentRef}\n style={combinedStyles}\n onMouseEnter={onMouseEnterHandler}\n onMouseLeave={onMouseLeaveHandler}\n role=\"region\"\n {...rest}\n onFocus={wrapperProps.onFocus}\n onBlur={wrapperProps.onBlur}\n >\n <div\n className={styles.scroller}\n role=\"presentation\"\n tabIndex={-1}\n ref={popoverScrollerRef}\n key={context?.popover.key}\n onKeyDown={onKeyDownHandler}\n onScroll={onScroll}\n onScrollCapture={onScrollCapture}\n >\n {children}\n </div>\n {!context?.disableCaret && (\n <span className={styles[\"arrow\"]} ref={context?.popover.arrowRef}>\n <svg aria-hidden=\"true\" width=\"14\" height=\"14\" viewBox=\"0 0 14 14\">\n <path stroke=\"none\" d=\"M0,0 H14 L7,7 Q7,7 7,7 Z\"></path>\n <clipPath id=\":r9:\">\n <rect x=\"0\" y=\"0\" width=\"14\" height=\"14\"></rect>\n </clipPath>\n </svg>\n </span>\n )}\n </div>\n );\n },\n);\n\nPopoverContent.displayName = \"PopoverContent\";\n","import {\n ReactElement,\n MouseEvent,\n KeyboardEvent,\n FocusEvent,\n RefObject,\n} from \"react\";\nimport { dataStateType, usePopoverContext } from \"./internal/usePopoverContext\";\nimport { supportsPopover } from \"../../internal/functions\";\nimport {\n PopoverLegacyTrigger,\n PopoverLegacyTriggerProps,\n} from \"./internal/PopoverLegacy\";\n\ntype PopoverTriggerChildrenReturnType = {\n ref: RefObject<HTMLButtonElement>;\n onMouseEnter: (e: MouseEvent) => void;\n onMouseLeave: (e: MouseEvent) => void;\n onClick: (e: MouseEvent) => void;\n onKeyDown: (e: KeyboardEvent) => void;\n onBlur: (e: FocusEvent) => void;\n onFocus: (e: FocusEvent) => void;\n \"aria-haspopup\": boolean;\n \"aria-expanded\": boolean;\n \"aria-details\": HTMLElement[\"id\"];\n /**\n * @deprecated to be removed on next major\n * Use aria-expanded instead\n */\n \"data-state\": dataStateType;\n};\n\n/**\n * Props for the PopoverTrigger component\n */\nexport type PopoverTriggerProps = {\n /**\n * Render function that receives trigger props and returns a React element\n */\n children: (data: PopoverTriggerChildrenReturnType) => ReactElement;\n};\n\n/**\n * PopoverTrigger component for creating custom trigger elements.\n *\n * Features:\n * - Supports custom trigger elements via render prop pattern\n * - Automatic focus management and keyboard interaction\n * - Hover and click event handling\n * - Accessibility attributes (aria-haspopup, aria-expanded, aria-details)\n * - Legacy popover support with fallback\n * - Context integration with parent popover\n *\n * @example\n * <Popover.Trigger>\n * {(props) => (\n * <button {...props}>\n * Click to open popover\n * </button>\n * )}\n * </Popover.Trigger>\n *\n * @example\n * <Popover.Trigger>\n * {(props) => (\n * <div {...props} role=\"button\" tabIndex={0}>\n * Custom trigger element\n * </div>\n * )}\n * </Popover.Trigger>\n */\nexport function PopoverTrigger(props: PopoverTriggerProps) {\n const { children } = props;\n const context = usePopoverContext();\n\n if (!supportsPopover())\n return <PopoverLegacyTrigger {...(props as PopoverLegacyTriggerProps)} />;\n\n if (!context) return;\n const { element, ...rest } = context.invoker;\n\n return children(rest);\n}\n\nPopoverTrigger.displayName = \"PopoverTrigger\";\n","import { PopoverClose } from \"./PopoverClose\";\nimport { PopoverButton } from \"./PopoverButton\";\nimport { PopoverContent } from \"./PopoverContent\";\nimport { PopoverTrigger } from \"./PopoverTrigger\";\nimport {\n ComponentPropsWithoutRef,\n forwardRef,\n useCallback,\n useContext,\n useEffect,\n useId,\n useImperativeHandle,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport { PopoverContext, PopoverContextProps } from \"./internal/PopoverContext\";\nimport {\n arrow,\n autoUpdate,\n computePosition,\n flip,\n limitShift,\n offset,\n Placement,\n shift,\n size,\n} from \"@floating-ui/react\";\nimport {\n safeHidePopover,\n safeShowPopover,\n supportsPopover,\n} from \"../../internal/functions\";\nimport { PopoverLegacyElement } from \"./internal/PopoverLegacy/PopoverLegacy\";\nimport { PopoverLegacyProps } from \"./internal/PopoverLegacy\";\nimport { DisableCloseOnEscapeOrClickProps } from \"../../types\";\nimport {\n OpenCloseTransitionStateEffects,\n useOnClickOutside,\n useOptionallyControlledState,\n usePopoverTransitionStates,\n} from \"../../internal/hooks\";\nimport { DialogContext } from \"../Dialog/internal/DialogContext\";\n\n/**\n * Props for the Popover component\n * @property {ReactNode} [children] - The content to be rendered inside the popover\n * @property {string} [id] - Unique identifier for the popover\n * @property {boolean} [modal] - Whether the popover should be modal (traps focus)\n * @property {boolean} [openOnHover] - Changes interaction to use hover instead of click\n * @property {boolean} [fillAvailableHeight] - Changes height and positioning for select/combobox\n * @property {number | string} [maxHeight] - Maximum height of the popover content\n * @property {boolean} [fitScreen] - Whether the popover should fit within the screen bounds\n * @property {number | string} [minHeight] - Minimum height of the popover content\n * @property {boolean} [matchReferenceWidth] - Whether the popover width should match the trigger element\n * @property {boolean} [fixedWidth] - Whether the popover should have a fixed width\n * @property {string} [placement] - Placement of the popover relative to the trigger\n * @property {boolean} [open] - Controlled open state\n * @property {boolean} [defaultOpen] - Default open state for uncontrolled mode\n * @property {Function} [onOpenChange] - Callback when open state changes\n * @property {Function} [onOutsidePress] - Callback when clicking outside the popover\n * @property {Function} [onClose] - Fires when the floating element is requested to be closed\n * @property {boolean} [disableCaret] - Whether to disable the caret/arrow indicator\n * @property {boolean} [noPadding] - Whether to remove default padding from content\n * @property {boolean} [disableAutoUpdate] - Whether to disable automatic position updates\n * @property {boolean} [disableTriggerFocus] - Whether to disable focus on the trigger element\n * @property {number} [delay] - Delay before opening the popover (for hover mode)\n * @property {boolean} [disableCloseOnClickOutside] - Whether to disable closing on outside click\n * @property {boolean} [disableCloseOnEscape] - Whether to disable closing on escape key\n */\n\n/**\n * Props for the Popover component\n * @extends ComponentPropsWithoutRef<\"div\">\n * @extends DisableCloseOnEscapeOrClickProps\n */\nexport type PopoverProps = {\n /**\n * The content to be rendered inside the popover\n */\n children?: ComponentPropsWithoutRef<\"div\">[\"children\"];\n /**\n * Unique identifier for the popover\n */\n id?: ComponentPropsWithoutRef<\"div\">[\"id\"];\n /**\n * Whether the popover should be modal (traps focus)\n * @default false\n */\n modal?: boolean;\n /**\n * Disables the shift of floating element\n * @internal\n */\n disableShift?: boolean;\n /**\n * Disables the flip of floating element\n * @internal\n */\n disableFlip?: boolean;\n /**\n * Disables the flip cross-axis fallback of floating element\n * @internal\n */\n disableFlipFallback?: boolean;\n /**\n * Changes interaction to use hover instead of click\n * @default false\n */\n openOnHover?: boolean;\n /**\n * Changes height and positioning for select/combobox\n * @default false\n */\n fillAvailableHeight?: boolean;\n /**\n * Maximum height of the popover content\n */\n maxHeight?: number | string;\n /**\n * Whether the popover should fit within the screen bounds\n * @default false\n */\n fitScreen?: boolean;\n /**\n * Minimum height of the popover content\n * @default \"2.875rem\"\n */\n minHeight?: number | string;\n /**\n * Whether the popover width should match the trigger element\n * @default false\n */\n matchReferenceWidth?: boolean;\n /**\n * Whether the popover should have a fixed width\n * @default false\n */\n fixedWidth?: boolean;\n /**\n * Placement of the popover relative to the trigger\n * @default \"bottom\"\n */\n placement?: Placement;\n /**\n * Controlled open state\n */\n open?: boolean;\n /**\n * Default open state for uncontrolled mode\n * @default false\n */\n defaultOpen?: boolean;\n /**\n * @deprecated to be removed in next major\n * use onOpenAnimationStart, onOpenAnimationComplete, onCloseAnimationStart, onCloseAnimationComplete instead\n * Callback when open state changes\n */\n onOpenChange?: (open: boolean) => void;\n /**\n * @deprecated to be removed in next major\n * use onClickOutside instead\n * Callback when clicking outside the popover\n */\n onOutsidePress?: (e: globalThis.MouseEvent) => void;\n /**\n * Callback when clicking outside the popover\n */\n onClickOutside?: (e: globalThis.MouseEvent) => void;\n /**\n * Fires when the floating element is requested to be closed\n * Note: this does not fire when openOnHover is true and mouse leaves to close\n * eg. on click outside, [esc] to close, or by <Popover.Close>\n */\n onClose?: () => void;\n /**\n * Whether to disable the caret/arrow indicator\n * @default false\n */\n disableCaret?: boolean;\n /**\n * Whether to remove default padding from content\n * @default false\n */\n noPadding?: boolean;\n /**\n * Whether to disable automatic position updates\n * @default false\n */\n disableAutoUpdate?: boolean;\n /**\n * @deprecated to be removed on next major\n * use modal instead\n */\n disableFocusLock?: boolean;\n /**\n * Whether to disable focus on the trigger element\n * @default false\n */\n disableTriggerFocus?: boolean;\n /**\n * Delay before opening the popover (for hover mode)\n * @default 100\n */\n delay?: number;\n /**\n * @deprecated to be removed on next major\n * This is not needed anymore as the Popover API is used.\n * Popover API uses top-layer for its popover content.\n */\n root?: HTMLElement | React.MutableRefObject<HTMLElement | null> | null;\n} & DisableCloseOnEscapeOrClickProps &\n OpenCloseTransitionStateEffects;\n\nconst PopoverElement = forwardRef((props: PopoverProps, ref) => {\n const {\n children,\n openOnHover = false,\n delay = 100,\n placement = \"bottom\",\n minHeight = \"2.875rem\",\n open,\n defaultOpen = false,\n disableShift,\n disableFlip,\n disableFlipFallback,\n matchReferenceWidth,\n id,\n disableCaret,\n fixedWidth,\n fillAvailableHeight,\n maxHeight,\n disableCloseOnClickOutside,\n disableCloseOnEscape,\n fitScreen,\n disableFocusLock,\n disableTriggerFocus,\n modal,\n noPadding,\n onOpenChange,\n onOutsidePress,\n onClickOutside,\n onClose,\n onOpenAnimationStart,\n onOpenAnimationComplete,\n onCloseAnimationStart,\n onCloseAnimationComplete,\n } = props;\n const uid = useId();\n const [invoker, setInvoker] =\n useState<PopoverContextProps[\"invoker\"]>(undefined);\n const [popover, setPopover] =\n useState<PopoverContextProps[\"popover\"]>(undefined);\n const [rootNode, setRootNode] = useState<PopoverContextProps[\"rootNode\"]>();\n const [arrowElement, setArrowElement] =\n useState<PopoverContextProps[\"arrowElement\"]>(undefined);\n const [openState, setOpenState] = useOptionallyControlledState<\n PopoverContextProps[\"openState\"]\n >({\n controlledValue: open,\n defaultValue: defaultOpen,\n });\n const arrowRef = useRef<HTMLSpanElement>(null);\n const dialogContext = useContext(DialogContext);\n const [triggerHovered, setTriggerHovered] = useState(false);\n const [contentHovered, setContentHovered] = useState(false);\n\n // TODO: Find a way to test these properly!\n // Stryker disable all : Currently relying on Chromatic test for all visuals\n const processMinHeight =\n typeof minHeight === \"string\" ? minHeight : `${minHeight}px`;\n\n usePopoverTransitionStates(popover, openState, {\n onOpenAnimationStart: useCallback(() => {\n onOpenAnimationStart?.();\n }, [onOpenAnimationStart]),\n onOpenAnimationComplete: useCallback(() => {\n onOpenAnimationComplete?.();\n }, [onOpenAnimationComplete]),\n onCloseAnimationStart: useCallback(() => {\n onCloseAnimationStart?.();\n }, [onCloseAnimationStart]),\n onCloseAnimationComplete: useCallback(() => {\n onCloseAnimationComplete?.();\n }, [onCloseAnimationComplete]),\n });\n\n /* istanbul ignore next */\n const updatePosition = useCallback(() => {\n if (!invoker || !popover) return;\n // disable position update when closing\n if (!openState) return;\n computePosition(invoker, popover, {\n placement: placement,\n middleware: [\n offset(8),\n size({\n padding: 5,\n apply({ rects, availableHeight, elements }) {\n Object.assign(elements.floating.style, {\n ...(matchReferenceWidth\n ? { width: `${rects.reference.width}px` }\n : fixedWidth\n ? { width: \"40dvw\" }\n : {}),\n ...(fillAvailableHeight\n ? {\n height: `${availableHeight - 20}px`,\n minHeight: processMinHeight,\n }\n : {}),\n ...(maxHeight\n ? {\n minHeight: processMinHeight,\n height: fitScreen\n ? typeof maxHeight === \"string\"\n ? maxHeight\n : `${maxHeight}px`\n : undefined,\n maxHeight: fitScreen\n ? `${availableHeight - 20}px`\n : typeof maxHeight === \"string\"\n ? maxHeight\n : `${maxHeight}px`,\n }\n : {}),\n ...(fitScreen && !maxHeight\n ? {\n minHeight: processMinHeight,\n maxHeight: `${availableHeight - 20}px`,\n }\n : {}),\n zIndex: 1,\n });\n },\n }),\n flip({\n mainAxis: !disableFlip,\n crossAxis: false,\n fallbackAxisSideDirection: disableFlipFallback ? \"none\" : \"end\",\n padding: 5,\n }),\n shift({\n padding: 5,\n mainAxis: !disableShift,\n crossAxis: false,\n limiter: limitShift({\n mainAxis: !disableShift,\n }),\n }),\n arrow({\n element: !disableCaret && arrowElement ? arrowElement : null,\n padding: 5,\n }),\n ],\n }).then(({ x, y, placement, middlewareData }) => {\n const side = placement.split(\"-\")[0];\n\n const staticSide = {\n top: \"bottom\",\n right: \"left\",\n bottom: \"top\",\n left: \"right\",\n }[side as \"top\" | \"right\" | \"bottom\" | \"left\"];\n\n const arrowDeg = () => {\n if (staticSide === \"top\") return 180;\n if (staticSide === \"bottom\") return 0;\n if (staticSide === \"left\") return 90;\n return 270;\n };\n\n Object.assign(popover.style, {\n left: `${x}px`,\n top: `${y}px`,\n });\n if (middlewareData.arrow && arrowElement) {\n const { x, y } = middlewareData.arrow;\n Object.assign(arrowElement.style, {\n left: x != null ? `${x}px` : \"\",\n top: y != null ? `${y}px` : \"\",\n right: \"\",\n bottom: \"\",\n [staticSide as string]: `${-arrowElement.offsetWidth + 2}px`,\n transform: `rotate(${arrowDeg()}deg)`,\n });\n }\n });\n }, [\n arrowElement,\n disableCaret,\n disableFlip,\n disableFlipFallback,\n disableShift,\n fillAvailableHeight,\n fitScreen,\n fixedWidth,\n invoker,\n matchReferenceWidth,\n maxHeight,\n openState,\n placement,\n popover,\n processMinHeight,\n ]);\n\n const resetKey = useRef(0);\n // Effect to add autoUpdate to eventListener\n // while the popover is opened\n useLayoutEffect(() => {\n if (!popover || !invoker) return;\n if (!openState) {\n resetKey.current += 1;\n return;\n }\n\n let requestID: number | null = null;\n const cleanup = autoUpdate(invoker, popover, () => {\n requestID = requestAnimationFrame(updatePosition);\n });\n\n return () => {\n if (requestID) cancelAnimationFrame(requestID);\n cleanup();\n };\n }, [invoker, popover, updatePosition, openState]);\n // Stryker restore all\n\n popover?.getRootNode();\n\n const popoverId = id ?? `popover-${uid.replace(/:/g, \"\")}`;\n const isControlled = typeof open !== \"undefined\";\n\n // Main function to open popover\n const openPopover = useCallback(() => {\n if (\n !popover ||\n !(rootNode as ShadowRoot | Document)?.querySelector(`#${popoverId}`)\n )\n return;\n setOpenState(true);\n onOpenChange?.(true);\n }, [popover, rootNode, popoverId, onOpenChange, setOpenState]);\n\n // Main function to close popover\n const closePopover = useCallback(\n (fn?: () => void) => {\n if (!popover || !openState) return;\n if (!openOnHover) onClose?.();\n setOpenState(false);\n onOpenChange?.(false);\n fn?.();\n },\n [popover, openState, openOnHover, onClose, setOpenState, onOpenChange],\n );\n\n useImperativeHandle(\n ref,\n () => ({\n openPopover,\n closePopover,\n }),\n [openPopover, closePopover],\n );\n\n // Updating openness for controlled\n useEffect(() => {\n if (typeof openState === \"undefined\") return;\n if (openState) {\n if (dialogContext) {\n if (dialogContext?.ref?.current?.open) {\n safeShowPopover(popover);\n dialogContext?.setHasOpenPopover?.(true);\n }\n return;\n }\n safeShowPopover(popover);\n } else {\n safeHidePopover(popover);\n dialogContext?.setHasOpenPopover?.(false);\n }\n }, [openState, openPopover, closePopover, dialogContext, popover]);\n\n useOnClickOutside({\n disable: disableCloseOnClickOutside || !openState,\n onOutsidePress: (e) => {\n if (!openState) return;\n onClickOutside?.(e);\n onOutsidePress?.(e);\n },\n targets: [invoker, popover],\n onClose: () => {\n if (openOnHover || isControlled) return;\n closePopover();\n },\n });\n\n const value = useMemo(() => {\n return {\n popoverId,\n invoker,\n setInvoker,\n popover,\n setPopover,\n arrowElement,\n setArrowElement,\n openPopover,\n closePopover,\n placement,\n onClose,\n openOnHover,\n openState,\n setOpenState,\n disableCloseOnClickOutside,\n fillAvailableHeight,\n maxHeight,\n matchReferenceWidth,\n fixedWidth,\n disableCaret,\n disableFlipFallback,\n disableFocusLock,\n disableTriggerFocus,\n disableCloseOnEscape,\n noPadding,\n controlled: isControlled,\n modal: modal ?? disableFocusLock,\n arrowRef,\n resetKey: resetKey.current,\n rootNode,\n setRootNode,\n delay,\n triggerHovered,\n setTriggerHovered,\n contentHovered,\n setContentHovered,\n };\n }, [\n popoverId,\n invoker,\n popover,\n arrowElement,\n openPopover,\n closePopover,\n placement,\n onClose,\n openOnHover,\n openState,\n setOpenState,\n disableCloseOnClickOutside,\n fillAvailableHeight,\n maxHeight,\n matchReferenceWidth,\n fixedWidth,\n disableCaret,\n disableFlipFallback,\n disableFocusLock,\n disableTriggerFocus,\n disableCloseOnEscape,\n noPadding,\n isControlled,\n modal,\n rootNode,\n delay,\n triggerHovered,\n setTriggerHovered,\n contentHovered,\n setContentHovered,\n ]);\n\n if (!supportsPopover())\n return <PopoverLegacyElement {...(props as PopoverLegacyProps)} />;\n\n return (\n <PopoverContext.Provider value={value}>{children}</PopoverContext.Provider>\n );\n});\n\nPopoverElement.displayName = \"Popover\";\n\n/**\n * Popover component for displaying floating content relative to a trigger element.\n *\n * Features:\n * - Supports both controlled and uncontrolled modes\n * - Automatic positioning with fallback strategies\n * - Hover and click interaction modes\n * - Modal and non-modal variants\n * - Custom trigger elements\n * - Automatic height and width management\n * - Screen boundary detection and fitting\n * - Keyboard navigation and accessibility\n * - Popover API support with legacy fallback\n * - Outside click detection and handling\n * - Focus management and trapping\n * - Arrow/caret indicators\n * - Delay support for hover interactions\n * - Automatic tracking ID generation for analytics\n *\n * @example\n * <Popover>\n * <Popover.Button>Click to open</Popover.Button>\n * <Popover.Content>\n * <p>This is the popover content</p>\n * <Popover.Close>Close</Popover.Close>\n * </Popover.Content>\n * </Popover>\n *\n * @example\n * <Popover openOnHover delay={1000}>\n * <Popover.Button>Hover to open</Popover.Button>\n * <Popover.Content>Tooltip content</Popover.Content>\n * </Popover>\n *\n * @example\n * <Popover modal>\n * <Popover.Trigger>\n * {(props) => <button {...props}>Custom trigger</button>}\n * </Popover.Trigger>\n * <Popover.Content>\n * <TextField label=\"Form field\" />\n * <Popover.Close>Done</Popover.Close>\n * </Popover.Content>\n * </Popover>\n */\nexport const Popover = Object.assign(PopoverElement, {\n /**\n * PopoverTrigger component for creating custom trigger elements.\n *\n * Features:\n * - Supports custom trigger elements via render prop pattern\n * - Automatic focus management and keyboard interaction\n * - Hover and click event handling\n * - Accessibility attributes (aria-haspopup, aria-expanded, aria-details)\n * - Legacy popover support with fallback\n * - Context integration with parent popover\n * - Automatic tracking ID generation for analytics\n *\n * @example\n * <Popover.Trigger>\n * {(props) => (\n * <button {...props}>\n * Click to open popover\n * </button>\n * )}\n * </Popover.Trigger>\n */\n Trigger: PopoverTrigger,\n /**\n * PopoverContent component for the main popover content area.\n *\n * Features:\n * - Automatic positioning and sizing based on trigger\n * - Screen boundary detection and fitting\n * - Scroll handling with custom scroller reference\n * - Focus management and keyboard navigation\n * - Hover interaction support for tooltip mode\n * - Escape key handling for closing\n * - Tab key trapping for modal popovers\n * - Arrow/caret indicator with automatic positioning\n * - Legacy popover support with fallback\n * - Context integration with parent popover\n * - Accessibility support with proper ARIA roles\n *\n * @example\n * <Popover.Content>\n * <p>This is the popover content</p>\n * <Popover.Close>Close</Popover.Close>\n * </Popover.Content>\n */\n Content: PopoverContent,\n /**\n * PopoverClose component for closing the popover.\n *\n * Features:\n * - Automatic popover closing on click\n * - Supports all Button component props and styling\n * - Controlled and uncontrolled mode support\n * - Legacy popover support with fallback\n * - Context integration with parent popover\n * - Accessibility support with proper button semantics\n * - Delayed closing for controlled mode\n * - Automatic tracking ID generation for analytics\n *\n * @example\n * <Popover.Close>Close</Popover.Close>\n */\n Close: PopoverClose,\n /**\n * PopoverButton component for creating button-style triggers.\n *\n * Features:\n * - Button styling and behavior with all Button props\n * - Automatic popover opening on click\n * - Hover interaction support for tooltip mode\n * - Focus management and keyboard navigation\n * - Accessibility attributes (aria-haspopup, aria-expanded, aria-details)\n * - Legacy popover support with fallback\n * - Context integration with parent popover\n * - Event handling for mouse, keyboard, and focus events\n * - Automatic tracking ID generation for analytics\n *\n * @example\n * <Popover.Button>Click to open</Popover.Button>\n */\n Button: PopoverButton,\n});\n"],"names":["arrow","PopoverLegacyTrigger","styles","PopoverClose","PopoverButton","PopoverContent","placement","x","y"],"mappings":";;;;;;;;;;;;;;;AA6BO,MAAM,6BAA6B,CACxC,OAAA,EACA,QAAA,EACA,OAAA,GAA2C,EAAC,KACzC;AACH,EAAA,MAAM,EAAE,oBAAA,EAAsB,wBAAA,EAAyB,GAAI,OAAA;AAC3D,EAAA,OAAO,6BAA6B,QAAA,EAAU;AAAA,IAC5C,GAAG,OAAA;AAAA,IACH,sBAAsB,MAAM;AAC1B,MAAA,IAAI,CAAC,OAAA,EAAS;AACd,MAAA,oBAAA,IAAuB;AAAA,IACzB,CAAA;AAAA,IACA,0BAA0B,MAAM;AAC9B,MAAA,IAAI,CAAC,OAAA,EAAS;AACd,MAAA,wBAAA,IAA2B;AAAA,IAC7B,CAAA;AAAA,IACA,YAAY,MAAM;AAChB,MAAA,IAAI,CAAC,OAAA,IAAW,CAAC,MAAA,EAAQ,OAAO,CAAA;AAChC,MAAA,MAAM,QAAA,GAAW,MAAA,CAAO,gBAAA,CAAiB,OAAO,CAAA,CAAE,iBAAA;AAClD,MAAA,OAAO,UAAA,CAAW,QAAQ,CAAA,GAAI,GAAA;AAAA,IAChC;AAAA,GACD,CAAA;AACH,CAAA;;ACFO,MAAM,cAAA,GAAiB,cAA0C,IAAI,CAAA;;ACrCrE,SAAS,iBAAA,GAAoB;AAClC,EAAA,MAAM,OAAA,GAAU,WAAW,cAAc,CAAA;AACzC,EAAA,MAAM,UAAA,GAAa,OAA0B,IAAI,CAAA;AACjD,EAAA,MAAM,UAAA,GAAa,OAAuB,IAAI,CAAA;AAC9C,EAAA,MAAM,QAAA,GAAW,OAAwB,IAAI,CAAA;AAC7C,EAAA,MAAM,EAAE,cAAA,EAAgB,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A;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAuBT,OAAA,EAAS,cAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAiBT,KAAA,EAAO,YAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAkBP,MAAA,EAAQ;AACV,CAAC;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"SegmentedControl-1OzOQmCp.js","sources":["../src/components/SegmentedControl/internal/SegmentedControlContext.ts","../src/components/SegmentedControl/SegmentedControlSegment.tsx","../src/components/SegmentedControl/SegmentedControl.tsx"],"sourcesContent":["import { createContext } from \"react\";\n\nimport { SegmentedControlSegmentProps } from \"../SegmentedControlSegment\";\nimport { SegmentedControlProps } from \"../SegmentedControl\";\n\n/**\n * Context props for SegmentedControl internal state management\n */\nexport type SegmentedControlContextProps = {\n /**\n * Currently selected segment value\n */\n current?: SegmentedControlSegmentProps[\"value\"];\n /**\n * Function to set the current segment\n */\n setCurrent?: (value: SegmentedControlSegmentProps[\"value\"]) => void;\n /**\n * Change handler for the segmented control\n */\n onChange?: SegmentedControlProps[\"onChange\"];\n /**\n * Name attribute for radio inputs\n */\n name?: string;\n};\n\nexport const SegmentedControlContext =\n createContext<SegmentedControlContextProps>({});\n","import {\n useContext,\n useRef,\n forwardRef,\n ComponentPropsWithoutRef,\n} from \"react\";\nimport cx from \"classnames\";\nimport { core } from \"@servicetitan/hammer-token\";\n\nimport { DataTrackingId } from \"../../types\";\nimport { Icon, IconProps } from \"../Icon\";\nimport { motion, useReducedMotion } from \"motion/react\";\nimport { useMergeRefs, useTrackingId } from \"../../hooks\";\n\nimport { SegmentedControlContext } from \"./internal/SegmentedControlContext\";\n\nimport styles from \"./SegmentedControl.module.scss\";\n\n/**\n * State object returned by segment interactions\n */\nexport type SegmentState = {\n /**\n * Whether the segment is checked\n */\n checked: boolean;\n /**\n * The value of the segment\n */\n value?: SegmentedControlSegmentProps[\"value\"];\n};\n\n/**\n * Props for the SegmentedControlSegment component\n * @extends ComponentPropsWithoutRef<\"label\">\n */\nexport type SegmentedControlSegmentProps = ComponentPropsWithoutRef<\"label\"> & {\n /**\n * Optional icon to display in the segment\n */\n icon?: IconProps[\"svg\"];\n /**\n * Value of the segment\n */\n value: string;\n /**\n * The content to display in the segment\n */\n children?: React.ReactNode;\n} & DataTrackingId;\n\n/**\n * SegmentedControlSegment component for individual segments within a segmented control.\n *\n * Features:\n * - Individual segment with radio input\n * - Optional icon support\n * - Animated selection indicator\n * - Accessibility support with proper ARIA attributes\n * - Context integration with parent SegmentedControl\n * - Motion animations with reduced motion support\n * - Icon-only mode when no children provided\n * - Data tracking id support\n *\n * @example\n * <SegmentedControl.Segment value=\"option1\" icon={Icon1}>\n * Option 1\n * </SegmentedControl.Segment>\n *\n * @example\n * <SegmentedControl.Segment value=\"icon-only\" icon={IconOnly} />\n */\nexport const SegmentedControlSegment = forwardRef<\n HTMLLabelElement,\n SegmentedControlSegmentProps\n>((props, ref) => {\n const { icon, value, children, className, ...rest } = props;\n const shouldReduceMotion = useReducedMotion();\n const { current, setCurrent, name } = useContext(SegmentedControlContext);\n const labelRef = useRef<HTMLSpanElement>(null);\n\n const classNames = cx(styles.segment, className, {\n [styles[\"icon-only\"]]: icon && !children,\n });\n\n const data = {\n value: props.value,\n };\n\n const trackingId = useTrackingId({\n name: \"SegmentedControlSegment\",\n data,\n hasOverride: !!props[\"data-tracking-id\"],\n });\n\n return (\n <>\n <label\n className={classNames}\n ref={useMergeRefs([labelRef, ref])}\n data-tracking-id={trackingId}\n data-anv=\"segmented-control-segment\"\n {...rest}\n >\n <input\n type=\"radio\"\n name={name}\n value={value}\n onChange={() => setCurrent?.(value)}\n checked={current === value}\n aria-checked={current === value}\n />\n {icon ? <Icon svg={icon} aria-hidden /> : null}\n {children}\n {current === value && (\n <motion.span\n layoutId={name}\n className={styles[\"select-indicator\"]}\n transition={{\n duration: shouldReduceMotion\n ? 0\n : +core.primitive.Duration.value.replace(\"ms\", \"\") / 1000,\n }}\n />\n )}\n </label>\n </>\n );\n});\n\nSegmentedControlSegment.displayName = \"SegmentedControlSegment\";\n","import { forwardRef, useId, ComponentPropsWithoutRef, useRef } from \"react\";\nimport cx from \"classnames\";\nimport { motion } from \"motion/react\";\n\nimport { DataTrackingId, LayoutUtilProps, Size } from \"../../types\";\nimport { useMergeRefs, useTrackingId } from \"../../hooks\";\nimport { useOptionallyControlledState } from \"../../internal/hooks\";\n\nimport { SegmentedControlContext } from \"./internal/SegmentedControlContext\";\nimport {\n SegmentedControlSegment,\n SegmentedControlSegmentProps,\n} from \"./SegmentedControlSegment\";\n\nimport styles from \"./SegmentedControl.module.scss\";\n\n/**\n * Base props for SegmentedControl component\n * @extends Omit<ComponentPropsWithoutRef<\"div\">, \"onAnimationStart\" | \"onDragStart\" | \"onDragEnd\" | \"onDrag\" | \"onChange\">\n * @extends LayoutUtilProps\n */\ntype BaseSegmentedControlProps = Omit<\n ComponentPropsWithoutRef<\"div\">,\n \"onAnimationStart\" | \"onDragStart\" | \"onDragEnd\" | \"onDrag\" | \"onChange\"\n> &\n LayoutUtilProps &\n DataTrackingId & {\n /**\n * Callback when segment is changed\n */\n onChange?: (value: SegmentedControlSegmentProps[\"value\"]) => void;\n\n /**\n * Size of the segment\n * @default \"medium\"\n */\n size?: Extract<Size, \"small\" | \"medium\">;\n\n /**\n * Whether to fill available width\n * @default false\n */\n fill?: boolean;\n\n /**\n * Name attribute for radio inputs\n * @remarks If empty, it will auto generate one using useId()\n */\n name?: string;\n\n /**\n * The segments to render within the segmented control\n */\n children?: React.ReactNode;\n };\n\n/**\n * Props for controlled SegmentedControl\n */\ntype ControlledSegmentedControlProps = BaseSegmentedControlProps & {\n /**\n * Selected segment (controlled mode)\n */\n selected: SegmentedControlSegmentProps[\"value\"];\n defaultSelected?: never;\n};\n\n/**\n * Props for uncontrolled SegmentedControl\n */\ntype UncontrolledSegmentedControlProps = BaseSegmentedControlProps & {\n /**\n * Initial selection (uncontrolled mode)\n */\n defaultSelected: SegmentedControlSegmentProps[\"value\"];\n selected?: never;\n};\n\n/**\n * Props for the SegmentedControl component\n */\nexport type SegmentedControlProps =\n | ControlledSegmentedControlProps\n | UncontrolledSegmentedControlProps;\n\nconst SegmentedControlElement = forwardRef<\n HTMLDivElement,\n SegmentedControlProps\n>((props, ref) => {\n const {\n className,\n onClick,\n onChange,\n children,\n size = \"medium\",\n defaultSelected,\n selected,\n name,\n fill,\n ...rest\n } = props;\n\n const [current, setCurrent] = useOptionallyControlledState({\n controlledValue: selected,\n defaultValue: defaultSelected,\n onChange,\n });\n\n const segmentedControlRef = useRef<HTMLDivElement>(null);\n\n const SegmentedControlClassNames = cx(\n styles[\"segmented-control\"],\n styles[size],\n className,\n {\n [styles.fill]: fill,\n },\n );\n\n const uid = useId();\n\n const data = {\n name: props.name,\n };\n\n const trackingId = useTrackingId({\n name: \"SegmentedControl\",\n data,\n hasOverride: !!props[\"data-tracking-id\"],\n });\n\n return (\n <motion.div\n transition={{ duration: 0 }}\n layout\n role=\"radiogroup\"\n className={SegmentedControlClassNames}\n data-anv=\"segmented-control\"\n data-tracking-id={trackingId}\n ref={useMergeRefs([segmentedControlRef, ref])}\n {...rest}\n >\n <SegmentedControlContext.Provider\n value={{ current, setCurrent, name: name ?? uid }}\n >\n {children}\n </SegmentedControlContext.Provider>\n </motion.div>\n );\n});\n\nSegmentedControlElement.displayName = \"SegmentedControl\";\n\n/**\n * SegmentedControl component for selecting one option from a group of related choices.\n *\n * Features:\n * - Supports both controlled and uncontrolled modes\n * - Multiple size variants (small, medium)\n * - Optional fill width mode\n * - Smooth animations with motion\n * - Accessibility support with proper radio group semantics\n * - Layout utility props for positioning and spacing\n * - Context-based state management\n * - Auto-generated or custom name attributes\n * - Segment support via SegmentedControl.Segment\n * - Data tracking id support\n *\n * @example\n * <SegmentedControl\n * selected={selectedValue}\n * onChange={setSelectedValue}\n * size=\"medium\"\n * >\n * <SegmentedControl.Segment value=\"option1\">Option 1</SegmentedControl.Segment>\n * <SegmentedControl.Segment value=\"option2\">Option 2</SegmentedControl.Segment>\n * <SegmentedControl.Segment value=\"option3\">Option 3</SegmentedControl.Segment>\n * </SegmentedControl>\n *\n * @example\n * <SegmentedControl\n * defaultSelected=\"small\"\n * size=\"small\"\n * fill\n * >\n * <SegmentedControl.Segment value=\"small\" icon={SmallIcon}>Small</SegmentedControl.Segment>\n * <SegmentedControl.Segment value=\"large\" icon={LargeIcon}>Large</SegmentedControl.Segment>\n * </SegmentedControl>\n */\nexport const SegmentedControl = Object.assign(SegmentedControlElement, {\n /**\n * SegmentedControlSegment component for individual segments within a segmented control.\n *\n * Features:\n * - Individual segment with radio input\n * - Optional icon support\n * - Animated selection indicator\n * - Accessibility support with proper ARIA attributes\n * - Context integration with parent SegmentedControl\n * - Motion animations with reduced motion support\n *\n * @example\n * <SegmentedControl.Segment value=\"option1\" icon={Icon1}>\n * Option 1\n * </SegmentedControl.Segment>\n */\n Segment: SegmentedControlSegment,\n});\n\nexport default SegmentedControl;\n"],"names":["core.primitive.Duration"],"mappings":";;;;;;;;;;;AA2BO,MAAM,uBAAA,GACX,aAAA,CAA4C,EAAE,CAAA;;;;;;;;;;;;;;;;;;;;AC4CzC,MAAM,uBAAA,GAA0B,UAAA,CAGrC,CAAC,KAAA,EAAO,GAAA,KAAQ;AAChB,EAAA,MAAM,EAAE,IAAA,EAAM,KAAA,EAAO,UAAU,SAAA,EAAW,GAAG,MAAK,GAAI,KAAA;AACtD,EAAA,MAAM,qBAAqB,gBAAA,EAAiB;AAC5C,EAAA,MAAM,EAAE,OAAA,EAAS,UAAA,EAAY,IAAA,EAAK,GAAI,WAAW,uBAAuB,CAAA;AACxE,EAAA,MAAM,QAAA,GAAW,OAAwB,I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AAC,MAAA,CAAO,GAAA;AAAA,IAAP;AAAA,MACC,UAAA,EAAY,EAAE,QAAA,EAAU,CAAA,EAAE;AAAA,MAC1B,MAAA,EAAM,IAAA;AAAA,MACN,IAAA,EAAK,YAAA;AAAA,MACL,SAAA,EAAW,0BAAA;AAAA,MACX,UAAA,EAAS,mBAAA;AAAA,MACT,kBAAA,EAAkB,UAAA;AAAA,MAClB,GAAA,EAAK,YAAA,CAAa,CAAC,mBAAA,EAAqB,GAAG,CAAC,CAAA;AAAA,MAC3C,GAAG,IAAA;AAAA,MAEJ,QAAA,kBAAA,GAAA;AAAA,QAAC,uBAAA,CAAwB,QAAA;AAAA,QAAxB;AAAA,UACC,OAAO,EAAE,OAAA,EAAS,UAAA,EAAY,IAAA,EAAM,QAAQ,GAAA,EAAI;AAAA,UAE/C;AAAA;AAAA;AACH;AAAA,GACF;AAEJ,CAAC,CAAA;AAED,uBAAA,CAAwB,WAAA,GAAc,kBAAA;AAsC/B,MAAM,gBAAA,GAAmB,MAAA,CAAO,MAAA,CAAO,uBAAA,EAAyB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAiBrE,OAAA,EAAS;AACX,CAAC;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Stepper-xcgOQzru.js","sources":["../src/components/Stepper/internal/StepperContext.ts","../src/components/Stepper/StepperList.tsx","../src/components/Stepper/StepperStep.tsx","../src/components/Stepper/StepperPanel.tsx","../src/components/Stepper/StepperFinalPanel.tsx","../src/components/Stepper/StepperNextButton.tsx","../src/components/Stepper/StepperPrevButton.tsx","../src/components/Stepper/Stepper.tsx"],"sourcesContent":["import { Dispatch, SetStateAction, createContext } from \"react\";\n\nexport type StepperContextProps = {\n current: number;\n setCurrent: Dispatch<SetStateAction<number>>;\n currentId: string;\n setCurrentId: Dispatch<SetStateAction<string>>;\n focus: number;\n setFocus: Dispatch<SetStateAction<number>>;\n onComplete?: () => void;\n items?: NodeListOf<HTMLElement>;\n allCompleted?: boolean;\n setAllCompleted?: Dispatch<SetStateAction<boolean>>;\n allowNavigateToPrevStep?: boolean;\n};\n\nexport const StepperContext = createContext<StepperContextProps>({\n current: 0,\n currentId: \"\",\n focus: 0,\n setFocus: () => undefined,\n setCurrent: () => undefined,\n setCurrentId: () => undefined,\n});\n","import { ComponentPropsWithoutRef, forwardRef, useContext } from \"react\";\nimport cx from \"classnames\";\n\nimport { StepperContext } from \"./internal/StepperContext\";\n\nimport styles from \"./StepperList.module.scss\";\n\n/**\n * Props for the StepperList component\n * @extends ComponentPropsWithoutRef<\"div\">\n */\nexport type StepperListProps = ComponentPropsWithoutRef<\"div\">;\n\n/**\n * Container component for organizing and displaying stepper steps.\n *\n * Features:\n * - Groups multiple stepper steps together\n * - Displays current step label\n * - Responsive design with mobile-friendly layout\n * - Accessible with proper ARIA roles\n * - Automatic step organization\n * - Visual step indicators\n * - Context-based current step display\n * - Flexible layout with CSS Grid/Flexbox\n * - Container queries for responsive behavior\n *\n * @example\n * <Stepper.List>\n * <Stepper.Step controls=\"step1\">Step 1</Stepper.Step>\n * <Stepper.Step controls=\"step2\">Step 2</Stepper.Step>\n * <Stepper.Step controls=\"step3\">Step 3</Stepper.Step>\n * </Stepper.List>\n */\nexport const StepperList = forwardRef<HTMLDivElement, StepperListProps>(\n (props, ref) => {\n const { className, children, onKeyDown, ...rest } = props;\n const { current, items } = useContext(StepperContext);\n\n const tabListClassNames = cx(styles[\"stepper-list\"], className);\n const currentLabel =\n items?.[current].querySelectorAll(\"span\")[1].textContent;\n\n return (\n <div\n {...rest}\n className={tabListClassNames}\n data-anv=\"stepper-list\"\n ref={ref}\n role=\"tablist\"\n >\n <div className={styles[\"stepper-steps\"]}>{children}</div>\n <span className={styles.label}>{currentLabel}</span>\n </div>\n );\n },\n);\n\nStepperList.displayName = \"StepperList\";\n","import {\n forwardRef,\n useContext,\n MouseEvent,\n useRef,\n ComponentPropsWithoutRef,\n useEffect,\n useState,\n KeyboardEvent,\n} from \"react\";\nimport cx from \"classnames\";\nimport Check from \"@servicetitan/hammer-icon/mdi/round/check.svg\";\n\nimport { Icon } from \"../Icon\";\nimport { StepperContext } from \"./internal/StepperContext\";\nimport { useMergeRefs } from \"../../hooks\";\n\nimport styles from \"./StepperStep.module.scss\";\n\n/**\n * Props for the StepperStep component\n * @extends ComponentPropsWithoutRef<\"button\">\n */\nexport type StepperStepProps = Omit<\n ComponentPropsWithoutRef<\"button\">,\n \"onClick\" | \"disabled\"\n> & {\n /**\n * ID of the panel that this step is controlling.\n * Must match the id prop of the corresponding Stepper.Panel.\n */\n controls: string;\n\n /**\n * Called when the step is clicked.\n * @param e Mouse event object\n * @param index Index of the step in the stepper\n */\n onClick?: (e: MouseEvent<HTMLButtonElement>, index?: number) => void;\n};\n\n/**\n * Individual step component for the Stepper.\n *\n * Features:\n * - Visual progress indicator with animated bar\n * - Check icon for completed steps\n * - Keyboard navigation support\n * - Accessible with proper ARIA attributes\n * - Click handling for step navigation\n * - Visual states for current, completed, and future steps\n * - Responsive design with mobile-friendly layout\n * - Focus management for keyboard users\n * - Custom styling support\n *\n * @example\n * <Stepper.Step controls=\"step1\">\n * Personal Information\n * </Stepper.Step>\n *\n * @example\n * <Stepper.Step\n * controls=\"step2\"\n * onClick={(e, index) => console.log(`Clicked step ${index}`)}\n * >\n * Contact Details\n * </Stepper.Step>\n */\nexport const StepperStep = forwardRef<HTMLButtonElement, StepperStepProps>(\n (props, ref) => {\n const stepRef = useRef<HTMLButtonElement>(null);\n const {\n current,\n items,\n setCurrent,\n focus,\n setFocus,\n allCompleted,\n allowNavigateToPrevStep,\n } = useContext(StepperContext);\n const {\n onClick,\n children,\n onFocus,\n onKeyDown,\n controls,\n className,\n ...rest\n } = props;\n\n const index = useRef<number>();\n const [selected, setSelected] = useState(false);\n const [completed, setCompleted] = useState(\n // Below is to be used for custom overriding\n // completed state for a step\n // Check Stepper.stories.tsx#103 for the use case\n stepRef.current?.getAttribute(\"data-completed\") === \"true\"\n ? true\n : undefined,\n );\n\n useEffect(() => {\n if (!items) return;\n index.current = Array.prototype.indexOf.call(items, stepRef.current);\n\n setCompleted(index.current < current);\n setSelected(index.current === current);\n }, [current, items]);\n\n const stepClassNames = cx(styles[\"stepper-step\"], className, {\n [styles[\"can-navigate\"]]: allowNavigateToPrevStep,\n [styles[\"all-completed\"]]: allCompleted,\n });\n\n const onClickHandler = (e: MouseEvent<HTMLButtonElement>) => {\n onClick?.(e, index.current);\n if (\n !allowNavigateToPrevStep ||\n selected ||\n index.current === undefined ||\n !items ||\n index.current > current\n ) {\n return;\n }\n setCurrent(index.current ?? 0);\n setFocus(index.current);\n items[index.current].focus();\n };\n\n const onKeyDownHandler = (e: KeyboardEvent<HTMLButtonElement>) => {\n onKeyDown?.(e);\n const focusableItems = Array.prototype.filter.call(\n items,\n (item) =>\n item.getAttribute(\"data-completed\") === \"true\" ||\n item.getAttribute(\"aria-selected\") === \"true\",\n );\n const prevFocus = focus - 1;\n const nextFocus = focus + 1;\n switch (e.code) {\n case \"Enter\":\n case \"Space\":\n e.preventDefault();\n setCurrent(focus);\n break;\n case \"ArrowRight\":\n e.preventDefault();\n if (nextFocus === focusableItems.length) {\n setFocus(0);\n focusableItems[0].focus();\n focusableItems[0].setAttribute(\"tabindex\", \"0\");\n stepRef.current?.setAttribute(\"tabindex\", \"-1\");\n return;\n }\n stepRef.current?.setAttribute(\"tabindex\", \"-1\");\n setFocus(nextFocus);\n focusableItems[nextFocus].focus();\n focusableItems[nextFocus].setAttribute(\"tabindex\", \"0\");\n break;\n case \"ArrowLeft\":\n e.preventDefault();\n if (focus === 0) {\n const lastItemIndex = focusableItems.length - 1;\n setFocus(lastItemIndex);\n focusableItems[lastItemIndex].focus();\n focusableItems[lastItemIndex].setAttribute(\"tabindex\", \"0\");\n stepRef.current?.setAttribute(\"tabindex\", \"-1\");\n return;\n }\n stepRef.current?.setAttribute(\"tabindex\", \"-1\");\n setFocus(prevFocus);\n focusableItems[prevFocus].focus();\n focusableItems[prevFocus].setAttribute(\"tabindex\", \"0\");\n break;\n }\n };\n\n return (\n <button\n type=\"button\"\n role=\"tab\"\n data-anv=\"stepper-step\"\n className={stepClassNames}\n aria-selected={selected}\n aria-controls={controls}\n tabIndex={allowNavigateToPrevStep && selected ? 0 : -1}\n data-completed={completed}\n onClick={onClickHandler}\n onKeyDown={allowNavigateToPrevStep ? onKeyDownHandler : onKeyDown}\n {...rest}\n ref={useMergeRefs([stepRef, ref])}\n >\n <span className={styles.bar} />\n <span className={styles.label}>\n <span className={styles.circle}>\n <Icon svg={Check} inherit aria-hidden />\n </span>\n\n {children}\n </span>\n </button>\n );\n },\n);\n\nStepperStep.displayName = \"StepperStep\";\n","import {\n ComponentPropsWithoutRef,\n forwardRef,\n useContext,\n useEffect,\n} from \"react\";\nimport cx from \"classnames\";\nimport { core } from \"@servicetitan/hammer-token\";\nimport { motion } from \"motion/react\";\n\nimport { LayoutUtilProps } from \"../../types\";\nimport { useLayoutPropsUtil } from \"../../internal/hooks\";\nimport { Overflow } from \"../Overflow\";\nimport { StepperContext } from \"./internal/StepperContext\";\n\nimport styles from \"./StepperPanel.module.scss\";\n\n/**\n * Props for the StepperPanel component\n * @extends ComponentPropsWithoutRef<\"div\">\n * @extends LayoutUtilProps\n */\nexport type StepperPanelProps = Omit<\n ComponentPropsWithoutRef<\"div\">,\n \"onAnimationStart\" | \"onDragStart\" | \"onDragEnd\" | \"onDrag\"\n> &\n LayoutUtilProps & {\n /**\n * Unique identifier for the panel.\n * Must match the controls prop of the corresponding Stepper.Step.\n */\n id: string;\n };\n\n/**\n * Content panel component for displaying step content in the Stepper.\n *\n * Features:\n * - Displays content for the current step only\n * - Smooth fade-in/fade-out animations\n * - Automatic overflow handling with scroll support\n * - Accessible with proper ARIA roles\n * - Layout utilities for positioning and spacing\n * - Motion animations for smooth transitions\n * - Focus management for keyboard navigation\n * - Responsive design with flexible layout\n * - Context-based visibility control\n *\n * @example\n * <Stepper.Panel id=\"step1\">\n * <h2>Personal Information</h2>\n * <form>\n * <label htmlFor=\"name\">Name:</label>\n * <input id=\"name\" type=\"text\" />\n * </form>\n * </Stepper.Panel>\n *\n * @example\n * <Stepper.Panel id=\"step2\" className=\"custom-panel\">\n * <div className=\"step-content\">\n * <h2>Contact Details</h2>\n * <p>Please provide your contact information.</p>\n * </div>\n * </Stepper.Panel>\n */\nexport const StepperPanel = forwardRef<HTMLDivElement, StepperPanelProps>(\n (props, ref) => {\n const { layoutStyles, componentProps } = useLayoutPropsUtil(props);\n const { id, className, style, children, ...rest } = componentProps;\n const { current, items, allCompleted, setCurrentId } =\n useContext(StepperContext);\n\n const currentId = items?.[current].getAttribute(\"aria-controls\");\n const isCurrent = currentId === id;\n\n useEffect(() => {\n if (isCurrent && !allCompleted) {\n setCurrentId(currentId ?? \"\");\n }\n }, [allCompleted, isCurrent, currentId, setCurrentId]);\n\n const tabPanelClassNames = cx(styles[\"stepper-panel\"], className);\n const styleCombined = {\n ...style,\n ...layoutStyles,\n };\n\n if (isCurrent && !allCompleted) {\n return (\n <motion.div\n style={styleCombined}\n className={tabPanelClassNames}\n transition={{\n opacity: {\n duration:\n +core.primitive.DurationSlow.value.replace(\"ms\", \"\") / 1000,\n },\n }}\n initial={{ opacity: 0 }}\n animate={{ opacity: 1 }}\n exit={{ opacity: 0 }}\n layout\n {...rest}\n role=\"tabpanel\"\n data-anv=\"stepper-panel\"\n id={id}\n ref={ref}\n >\n <Overflow flexGrow={1}>{children}</Overflow>\n </motion.div>\n );\n }\n return <></>;\n },\n);\n\nStepperPanel.displayName = \"StepperPanel\";\n","import {\n ComponentPropsWithoutRef,\n forwardRef,\n useContext,\n useEffect,\n} from \"react\";\nimport cx from \"classnames\";\nimport { core } from \"@servicetitan/hammer-token\";\nimport { motion } from \"motion/react\";\n\nimport { LayoutUtilProps } from \"../../types\";\nimport { Overflow } from \"../Overflow\";\nimport { StepperContext } from \"./internal/StepperContext\";\nimport { useLayoutPropsUtil } from \"../../internal/hooks\";\n\nimport styles from \"./StepperPanel.module.scss\";\n\n/**\n * Props for the StepperFinalPanel component\n * @extends ComponentPropsWithoutRef<\"div\">\n * @extends LayoutUtilProps\n */\nexport type StepperFinalPanelProps = Omit<\n ComponentPropsWithoutRef<\"div\">,\n \"onAnimationStart\" | \"onDragStart\" | \"onDragEnd\" | \"onDrag\"\n> &\n LayoutUtilProps;\n\n/**\n * Final panel component displayed when all stepper steps are completed.\n *\n * Features:\n * - Displays only when all steps are completed\n * - Smooth fade-in animation on completion\n * - Automatic overflow handling with scroll support\n * - Accessible with proper ARIA roles\n * - Layout utilities for positioning and spacing\n * - Motion animations for smooth transitions\n * - Focus management for keyboard navigation\n * - Responsive design with flexible layout\n * - Context-based visibility control\n *\n * @example\n * <Stepper.FinalPanel>\n * <h2>Congratulations!</h2>\n * <p>You have successfully completed all steps.</p>\n * <Button onClick={handleSubmit}>Submit</Button>\n * </Stepper.FinalPanel>\n */\nexport const StepperFinalPanel = forwardRef<\n HTMLDivElement,\n StepperFinalPanelProps\n>((props, ref) => {\n const { layoutStyles, componentProps } = useLayoutPropsUtil(props);\n const { id, className, style, children, ...rest } = componentProps;\n const { allCompleted, setCurrentId } = useContext(StepperContext);\n\n useEffect(() => {\n if (allCompleted) {\n setCurrentId(\"final-panel\");\n }\n }, [allCompleted, setCurrentId]);\n\n const tabPanelClassNames = cx(styles[\"stepper-panel\"], className);\n const styleCombined = {\n ...style,\n ...layoutStyles,\n };\n\n if (allCompleted) {\n return (\n <motion.div\n style={styleCombined}\n className={tabPanelClassNames}\n transition={{\n opacity: {\n duration:\n +core.primitive.DurationSlow.value.replace(\"ms\", \"\") / 1000,\n },\n }}\n initial={{ opacity: 0 }}\n animate={{ opacity: 1 }}\n exit={{ opacity: 0 }}\n layout\n {...rest}\n role=\"tabpanel\"\n data-anv=\"stepper-final-panel\"\n tabIndex={0}\n ref={ref}\n >\n <Overflow>{children}</Overflow>\n </motion.div>\n );\n }\n return null;\n});\n\nStepperFinalPanel.displayName = \"StepperFinalPanel\";\n","import { forwardRef, useContext, MouseEvent } from \"react\";\n\nimport { Button, ButtonProps } from \"../Button\";\nimport { DataTrackingId } from \"../../types\";\nimport { useTrackingId } from \"../../hooks\";\n\nimport { StepperContext } from \"./internal/StepperContext\";\n\n/**\n * Props for the StepperNextButton component\n * @extends ButtonProps\n */\nexport type StepperNextButtonProps = Omit<ButtonProps, \"children\"> & {\n /**\n * Label for the next button.\n * @default \"Next\"\n */\n nextLabel?: string;\n\n /**\n * Label for the complete button (shown on the last step).\n * @default \"Complete\"\n */\n completeLabel?: string;\n\n /**\n * Called when the \"Next\" button is clicked.\n * @param e MouseEvent<HTMLButtonElement>\n * @returns If the function returns `false`, or a Promise that resolves to `false`, the next step will not be executed.\n */\n onClick?: (\n e: MouseEvent<HTMLButtonElement>,\n ) => void | boolean | Promise<boolean>;\n} & DataTrackingId;\n\n/**\n * Next button component for navigating to the next step in the Stepper.\n *\n * Features:\n * - Automatically advances to the next step\n * - Changes label to \"Complete\" on the final step\n * - Supports async validation with Promise return\n * - Prevents navigation when validation fails\n * - Hides when all steps are completed\n * - Accessible with proper button semantics\n * - Customizable appearance and styling\n * - Integration with stepper context\n * - Automatic completion handling\n * - Automatic tracking ID generation for analytics\n *\n * @example\n * <Stepper.NextButton\n * nextLabel=\"Continue\"\n * completeLabel=\"Finish\"\n * />\n *\n * @example\n * <Stepper.NextButton\n * onClick={async (e) => {\n * const isValid = await validateForm();\n * return isValid;\n * }}\n * appearance=\"primary\"\n * />\n */\nexport const StepperNextButton = forwardRef<\n HTMLButtonElement,\n StepperNextButtonProps\n>((props, ref) => {\n const {\n setAllCompleted,\n onComplete,\n setCurrent,\n setFocus,\n items,\n current,\n allCompleted,\n } = useContext(StepperContext);\n const {\n onClick,\n onFocus,\n nextLabel = \"Next\",\n completeLabel = \"Complete\",\n appearance = \"primary\",\n ...rest\n } = props;\n\n const proceedToNextStep = () => {\n if (items && current === items.length - 1) {\n items.forEach((item) => item.setAttribute(\"tabindex\", \"-1\"));\n setAllCompleted?.(true);\n onComplete?.();\n return;\n }\n setCurrent(current + 1);\n setFocus(current + 1);\n };\n\n const onClickHandler = (e: MouseEvent<HTMLButtonElement>) => {\n const onClickResult = onClick?.(e);\n\n // check if onClick returns a Promise\n if (\n onClickResult !== undefined &&\n !!onClickResult &&\n (onClickResult as unknown) instanceof Promise\n ) {\n (onClickResult as unknown as Promise<boolean>).then((result) => {\n if (result === false) return;\n proceedToNextStep();\n });\n\n // otherwise, onClick returns a boolean or void\n } else {\n if ((onClickResult as void | boolean) === false) return;\n proceedToNextStep();\n }\n };\n\n const data = {\n nextLabel: props.nextLabel,\n completeLabel: props.completeLabel,\n };\n\n const trackingId = useTrackingId({\n name: \"StepperNextButton\",\n data,\n hasOverride: !!props[\"data-tracking-id\"],\n });\n\n return allCompleted ? null : (\n <Button\n data-anv=\"stepper-next-button\"\n data-tracking-id={trackingId}\n onClick={onClickHandler}\n appearance={appearance}\n ref={ref}\n {...rest}\n >\n {items && current === items.length - 1 ? completeLabel : nextLabel}\n </Button>\n );\n});\n\nStepperNextButton.displayName = \"StepperNextButton\";\n","import { forwardRef, useContext, MouseEvent } from \"react\";\n\nimport { DataTrackingId } from \"../../types\";\nimport { Button, ButtonProps } from \"../Button\";\nimport { useTrackingId } from \"../../hooks\";\n\nimport { StepperContext } from \"./internal/StepperContext\";\n\n/**\n * Props for the StepperPrevButton component\n * @extends ButtonProps\n */\nexport type StepperPrevButtonProps = Omit<ButtonProps, \"children\"> & {\n /**\n * Label for the previous button.\n * @default \"Previous\"\n */\n label?: string;\n} & DataTrackingId;\n\n/**\n * Previous button component for navigating to the previous step in the Stepper.\n *\n * Features:\n * - Navigates to the previous step when available\n * - Hides when on the first step\n * - Restores navigation when returning from completion\n * - Accessible with proper button semantics\n * - Customizable label and styling\n * - Integration with stepper context\n * - Automatic focus management\n * - Support for completion state handling\n * - Automatic tracking ID generation for analytics\n *\n * @example\n * <Stepper.PrevButton label=\"Go Back\" />\n *\n * @example\n * <Stepper.PrevButton\n * label=\"Previous Step\"\n * appearance=\"secondary\"\n * onClick={(e) => console.log('Going back')}\n * />\n */\nexport const StepperPrevButton = forwardRef<\n HTMLButtonElement,\n StepperPrevButtonProps\n>((props, ref) => {\n const {\n setCurrent,\n setFocus,\n allCompleted,\n setAllCompleted,\n items,\n current,\n allowNavigateToPrevStep,\n } = useContext(StepperContext);\n const { onClick, label = \"Previous\", onFocus, ...rest } = props;\n\n const onClickHandler = (e: MouseEvent<HTMLButtonElement>) => {\n if (allCompleted) {\n setAllCompleted?.(false);\n if (allowNavigateToPrevStep) {\n items?.[current].setAttribute(\"tabindex\", \"0\");\n }\n } else {\n setCurrent(current - 1);\n setFocus(current - 1);\n }\n\n onClick?.(e);\n };\n\n const data = {\n label: props.label,\n };\n\n const trackingId = useTrackingId({\n name: \"StepperPrevButton\",\n data,\n hasOverride: !!props[\"data-tracking-id\"],\n });\n\n return current === 0 ? null : (\n <Button\n data-anv=\"stepper-prev-button\"\n data-tracking-id={trackingId}\n onClick={onClickHandler}\n ref={ref}\n {...rest}\n >\n {label}\n </Button>\n );\n});\n\nStepperPrevButton.displayName = \"StepperPrevButton\";\n","import {\n ComponentPropsWithoutRef,\n forwardRef,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport cx from \"classnames\";\nimport { motion } from \"motion/react\";\n\nimport { useMergeRefs } from \"../../hooks\";\nimport { LayoutUtilProps } from \"../../types\";\nimport { useLayoutPropsUtil } from \"../../internal/hooks\";\n\nimport { StepperList } from \"./StepperList\";\nimport { StepperStep } from \"./StepperStep\";\nimport { StepperPanel } from \"./StepperPanel\";\nimport { StepperFinalPanel } from \"./StepperFinalPanel\";\nimport { StepperNextButton } from \"./StepperNextButton\";\nimport { StepperPrevButton } from \"./StepperPrevButton\";\nimport { StepperContext } from \"./internal/StepperContext\";\n\nimport styles from \"./Stepper.module.scss\";\n\n/**\n * Props for the Stepper component\n * @extends ComponentPropsWithoutRef<\"div\">\n * @extends LayoutUtilProps\n */\nexport type StepperProps = Omit<\n ComponentPropsWithoutRef<\"div\">,\n \"onAnimationStart\" | \"onDragStart\" | \"onDragEnd\" | \"onDrag\" | \"onChange\"\n> &\n LayoutUtilProps & {\n /**\n * Default step to start on.\n * @default undefined\n */\n defaultIndex?: number;\n\n /**\n * Allows users to navigate to previous steps.\n * @default undefined\n */\n allowNavigateToPrevStep?: boolean;\n\n /**\n * Returns current step data when step changes.\n * @param data Object containing currentStepId and currentStepIndex\n * @param data.currentStepId ID given to Stepper.Panel, or \"final-panel\"\n * @param data.currentStepIndex Index of current step, or undefined on final panel\n */\n onChange?: (data: {\n currentStepId: string | \"final-panel\";\n currentStepIndex?: number;\n }) => void;\n\n /**\n * Called when all steps are completed.\n */\n onComplete?: () => void;\n };\n\nconst StepperElement = forwardRef<HTMLDivElement, StepperProps>(\n (props, ref) => {\n const { layoutStyles, componentProps } = useLayoutPropsUtil(props);\n const {\n defaultIndex,\n className,\n allowNavigateToPrevStep,\n children,\n onChange,\n onComplete,\n style,\n ...rest\n } = componentProps;\n const tabRef = useRef<HTMLDivElement>(null);\n const [items, setItems] = useState<NodeListOf<HTMLElement>>();\n const [allCompleted, setAllCompleted] = useState(false);\n const [current, setCurrent] = useState<number>(defaultIndex ?? 0);\n const [currentId, setCurrentId] = useState<string>(\"\");\n const [focus, setFocus] = useState<number>(defaultIndex ?? 0);\n const stepperClassNames = cx(styles[\"stepper\"], className);\n\n useEffect(() => {\n setItems(tabRef.current?.querySelectorAll(\"[role=tab]:not([disabled])\"));\n }, []);\n\n useEffect(() => {\n onChange?.({\n currentStepId: currentId,\n currentStepIndex: allCompleted ? undefined : current,\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [allCompleted, currentId, onChange]);\n\n const styleCombined = { ...style, ...layoutStyles };\n\n const value = useMemo(\n () => ({\n current,\n setCurrent,\n currentId,\n setCurrentId,\n focus,\n setFocus,\n onComplete,\n items,\n allCompleted,\n setAllCompleted,\n allowNavigateToPrevStep,\n }),\n [\n current,\n currentId,\n focus,\n onComplete,\n items,\n allCompleted,\n setAllCompleted,\n allowNavigateToPrevStep,\n ],\n );\n\n return (\n <StepperContext.Provider value={value}>\n <motion.div\n transition={{ duration: 0 }}\n layout\n className={stepperClassNames}\n data-anv=\"stepper\"\n style={styleCombined}\n {...rest}\n ref={useMergeRefs([tabRef, ref])}\n >\n {children}\n </motion.div>\n </StepperContext.Provider>\n );\n },\n);\n\nStepperElement.displayName = \"Stepper\";\n\n/**\n * Stepper component for creating multi-step workflows and forms.\n *\n * Features:\n * - Multi-step navigation with visual progress indicators\n * - Keyboard navigation support with arrow keys\n * - Optional navigation to previous steps\n * - Smooth animations and transitions\n * - Accessible with proper ARIA roles and attributes\n * - Customizable step labels and content\n * - Completion state handling\n * - Layout utilities for positioning and spacing\n * - Motion animations for step transitions\n * - Context-based state management\n *\n * @example\n * <Stepper defaultIndex={0} allowNavigateToPrevStep>\n * <Stepper.List>\n * <Stepper.Step controls=\"step1\">Step 1</Stepper.Step>\n * <Stepper.Step controls=\"step2\">Step 2</Stepper.Step>\n * <Stepper.Step controls=\"step3\">Step 3</Stepper.Step>\n * </Stepper.List>\n *\n * <Stepper.Panel id=\"step1\">\n * <h2>Step 1 Content</h2>\n * <p>This is the first step content.</p>\n * </Stepper.Panel>\n *\n * <Stepper.Panel id=\"step2\">\n * <h2>Step 2 Content</h2>\n * <p>This is the second step content.</p>\n * </Stepper.Panel>\n *\n * <Stepper.Panel id=\"step3\">\n * <h2>Step 3 Content</h2>\n * <p>This is the final step content.</p>\n * </Stepper.Panel>\n *\n * <Stepper.FinalPanel>\n * <h2>Completed!</h2>\n * <p>All steps have been completed successfully.</p>\n * </Stepper.FinalPanel>\n *\n * <Stepper.PrevButton />\n * <Stepper.NextButton />\n * </Stepper>\n */\nexport const Stepper = Object.assign(StepperElement, {\n /**\n * Individual step component for the Stepper.\n *\n * Features:\n * - Visual progress indicator with animated bar\n * - Check icon for completed steps\n * - Keyboard navigation support\n * - Accessible with proper ARIA attributes\n * - Click handling for step navigation\n * - Visual states for current, completed, and future steps\n * - Responsive design with mobile-friendly layout\n * - Focus management for keyboard users\n * - Custom styling support\n *\n * @example\n * <Stepper.Step controls=\"step1\">\n * Personal Information\n * </Stepper.Step>\n *\n * @example\n * <Stepper.Step\n * controls=\"step2\"\n * onClick={(e, index) => console.log(`Clicked step ${index}`)}\n * >\n * Contact Details\n * </Stepper.Step>\n */\n Step: StepperStep,\n\n /**\n * Container component for organizing and displaying stepper steps.\n *\n * Features:\n * - Groups multiple stepper steps together\n * - Displays current step label\n * - Responsive design with mobile-friendly layout\n * - Accessible with proper ARIA roles\n * - Automatic step organization\n * - Visual step indicators\n * - Context-based current step display\n * - Flexible layout with CSS Grid/Flexbox\n * - Container queries for responsive behavior\n *\n * @example\n * <Stepper.List>\n * <Stepper.Step controls=\"step1\">Step 1</Stepper.Step>\n * <Stepper.Step controls=\"step2\">Step 2</Stepper.Step>\n * <Stepper.Step controls=\"step3\">Step 3</Stepper.Step>\n * </Stepper.List>\n */\n List: StepperList,\n\n /**\n * Content panel component for displaying step content in the Stepper.\n *\n * Features:\n * - Displays content for the current step only\n * - Smooth fade-in/fade-out animations\n * - Automatic overflow handling with scroll support\n * - Accessible with proper ARIA roles\n * - Layout utilities for positioning and spacing\n * - Motion animations for smooth transitions\n * - Focus management for keyboard navigation\n * - Responsive design with flexible layout\n * - Context-based visibility control\n *\n * @example\n * <Stepper.Panel id=\"step1\">\n * <h2>Personal Information</h2>\n * <form>\n * <label htmlFor=\"name\">Name:</label>\n * <input id=\"name\" type=\"text\" />\n * </form>\n * </Stepper.Panel>\n */\n Panel: StepperPanel,\n\n /**\n * Next button component for navigating to the next step in the Stepper.\n *\n * Features:\n * - Automatically advances to the next step\n * - Changes label to \"Complete\" on the final step\n * - Supports async validation with Promise return\n * - Prevents navigation when validation fails\n * - Hides when all steps are completed\n * - Accessible with proper button semantics\n * - Customizable appearance and styling\n * - Integration with stepper context\n * - Automatic completion handling\n *\n * @example\n * <Stepper.NextButton\n * nextLabel=\"Continue\"\n * completeLabel=\"Finish\"\n * />\n *\n * @example\n * <Stepper.NextButton\n * onClick={async (e) => {\n * const isValid = await validateForm();\n * return isValid;\n * }}\n * appearance=\"primary\"\n * />\n */\n NextButton: StepperNextButton,\n\n /**\n * Previous button component for navigating to the previous step in the Stepper.\n *\n * Features:\n * - Navigates to the previous step when available\n * - Hides when on the first step\n * - Restores navigation when returning from completion\n * - Accessible with proper button semantics\n * - Customizable label and styling\n * - Integration with stepper context\n * - Automatic focus management\n * - Support for completion state handling\n *\n * @example\n * <Stepper.PrevButton label=\"Go Back\" />\n *\n * @example\n * <Stepper.PrevButton\n * label=\"Previous Step\"\n * appearance=\"secondary\"\n * onClick={(e) => console.log('Going back')}\n * />\n */\n PrevButton: StepperPrevButton,\n\n /**\n * Final panel component displayed when all stepper steps are completed.\n *\n * Features:\n * - Displays only when all steps are completed\n * - Smooth fade-in animation on completion\n * - Automatic overflow handling with scroll support\n * - Accessible with proper ARIA roles\n * - Layout utilities for positioning and spacing\n * - Motion animations for smooth transitions\n * - Focus management for keyboard navigation\n * - Responsive design with flexible layout\n * - Context-based visibility control\n *\n * @example\n * <Stepper.FinalPanel>\n * <h2>Congratulations!</h2>\n * <p>You have successfully completed all steps.</p>\n * <Button onClick={handleSubmit}>Submit</Button>\n * </Stepper.FinalPanel>\n */\n FinalPanel: StepperFinalPanel,\n});\n"],"names":["styles","Check","core.primitive.DurationSlow"],"mappings":";;;;;;;;;;;;;AAgBO,MAAM,iBAAiB,aAAA,CAAmC;AAAA,EAC/D,OAAA,EAAS,CAAA;AAAA,EACT,SAAA,EAAW,EAAA;AAAA,EACX,KAAA,EAAO,CAAA;AAAA,EACP,UAAU,MAAM,MAAA;AAAA,EAChB,YAAY,MAAM,MAAA;AAAA,EAClB,cAAc,MAAM;AACtB,CAAC,CAAA;;;;;;;;;ACWM,MAAM,WAAA,GAAc,UAAA;AAAA,EACzB,CAAC,OAAO,GAAA,KAA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A;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAyBZ,UAAA,EAAY,iBAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAuBZ,UAAA,EAAY;AACd,CAAC;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Switch-mhyHJeex.js","sources":["../src/components/Switch/Switch.tsx"],"sourcesContent":["import {\n ChangeEvent,\n ComponentPropsWithoutRef,\n ReactElement,\n Ref,\n forwardRef,\n useId,\n} from \"react\";\nimport { useTrackingId } from \"../../hooks\";\nimport { DataTrackingId, LayoutUtilProps } from \"../../types\";\nimport { childrenToString } from \"../../internal/functions\";\nimport { useLayoutPropsUtil } from \"../../internal/hooks\";\nimport Check from \"@servicetitan/hammer-icon/mdi/round/check.svg\";\nimport Icon from \"../Icon\";\nimport Flex from \"../Flex\";\nimport { Helper } from \"../../internal/components\";\n\nimport cx from \"classnames\";\nimport styles from \"./Switch.module.scss\";\n\n/**\n * State object returned by the Switch onChange callback\n */\nexport type SwitchState = {\n /**\n * Whether the switch is currently checked\n */\n checked: boolean;\n /**\n * The value of the switch input\n */\n value?: string | number | readonly string[];\n};\n\n/**\n * Props for the Switch component\n * @extends ComponentPropsWithoutRef<\"input\">\n * @extends LayoutUtilProps\n */\nexport type SwitchProps = Omit<ComponentPropsWithoutRef<\"input\">, \"onChange\"> &\n LayoutUtilProps & {\n /**\n * Callback when switch is changed.\n * @param e Change event object\n * @param state Current switch state with checked status and value\n */\n onChange?: (e: ChangeEvent<HTMLInputElement>, state: SwitchState) => void;\n\n /**\n * Label for the switch.\n * @remarks This should either be a string or have text content inside for accessibility\n */\n label?: ReactElement | string;\n\n /**\n * Description text to display below the label\n */\n description?: string;\n } & DataTrackingId;\n\n/**\n * Switch component for toggling between on/off states.\n *\n * Features:\n * - Toggle switch with smooth animations\n * - Check icon indicator when active\n * - Accessible with proper ARIA roles and attributes\n * - Keyboard navigation support (Space/Enter)\n * - Controlled and uncontrolled state management\n * - Customizable label and styling\n * - Layout utilities for positioning and spacing\n * - Focus management with visible focus indicators\n * - Hover states and visual feedback\n * - Disabled state support\n * - Automatic tracking ID generation for analytics\n *\n * @example\n * <Switch\n * label=\"Enable notifications\"\n * onChange={(e, state) => console.log('Switch toggled:', state.checked)}\n * />\n */\nexport const Switch = forwardRef(\n (props: SwitchProps, ref: Ref<HTMLInputElement>) => {\n const { layoutStyles, componentProps } = useLayoutPropsUtil(props);\n const {\n label,\n description,\n className,\n onChange,\n checked,\n defaultChecked,\n value,\n style,\n ...rest\n } = componentProps;\n\n const helperUid = useId();\n\n const onChangeHandler = (e: ChangeEvent<HTMLInputElement>) => {\n onChange?.(e, { value, checked: e.target.checked });\n };\n\n const data = {\n label: childrenToString(label),\n ariaLabel: rest[\"aria-label\"],\n ariaLabelledBy: rest[\"aria-labelledby\"],\n value,\n };\n\n const trackingId = useTrackingId({\n name: \"Switch\",\n data,\n hasOverride: !!rest[\"data-tracking-id\"],\n });\n\n const switchClassNames = cx(styles[\"switch\"], className);\n\n const styleCombined = {\n ...style,\n ...layoutStyles,\n alignItems: description ? \"flex-start\" : \"center\",\n };\n\n return (\n <label className={switchClassNames} style={styleCombined}>\n <input\n data-tracking-id={trackingId}\n data-anv=\"switch\"\n ref={ref}\n type=\"checkbox\"\n role=\"switch\"\n value={value}\n aria-checked={checked ?? defaultChecked}\n checked={checked}\n defaultChecked={defaultChecked}\n onChange={onChangeHandler}\n {...rest}\n />\n <span aria-hidden className={styles[\"toggle\"]}>\n <span className={styles[\"indicator\"]}>\n <Icon svg={Check} className={styles[\"check\"]} />\n </span>\n </span>\n {label || description ? (\n <Flex direction=\"column\" gap={1}>\n {label && label}\n {description && <Helper id={helperUid} description={description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AAA,EAAA,EAAM,SAAA,EAAW,gBAAA,EAAkB,OAAO,aAAA,EACzC,QAAA,EAAA;AAAA,sBAAA,GAAA;AAAA,QAAC,OAAA;AAAA,QAAA;AAAA,UACC,kBAAA,EAAkB,UAAA;AAAA,UAClB,UAAA,EAAS,QAAA;AAAA,UACT,GAAA;AAAA,UACA,IAAA,EAAK,UAAA;AAAA,UACL,IAAA,EAAK,QAAA;AAAA,UACL,KAAA;AAAA,UACA,gBAAc,OAAA,IAAW,cAAA;AAAA,UACzB,OAAA;AAAA,UACA,cAAA;AAAA,UACA,QAAA,EAAU,eAAA;AAAA,UACT,GAAG;AAAA;AAAA,OACN;AAAA,sBACA,GAAA,CAAC,UAAK,aAAA,EAAW,IAAA,EAAC,WAAW,MAAA,CAAO,QAAQ,CAAA,EAC1C,QAAA,kBAAA,GAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAW,OAAO,WAAW,CAAA,EACjC,QAAA,kBAAA,GAAA,CAAC,IAAA,EAAA,EAAK,GAAA,EAAKA,QAAA,EAAO,WAAW,MAAA,CAAO,OAAO,CAAA,EAAG,CAAA,EAChD,CAAA,EACF,CAAA;AAAA,MACC,SAAS,WAAA,mBACR,IAAA,CAAC,QAAK,SAAA,EAAU,QAAA,EAAS,KAAK,CAAA,EAC3B,QAAA,EAAA;AAAA,QAAA,KAAA,IAAS,KAAA;AAAA,QACT,WAAA,oBAAe,GAAA,CAAC,MAAA,EAAA,EAAO,EAAA,EAAI,WAAW,WAAA,EAA0B;AAAA,OAAA,EACnE,CAAA,GACE;AAAA,KAAA,EACN,CAAA;AAAA,EAEJ;AACF;AAEA,MAAA,CAAO,WAAA,GAAc,QAAA;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"TextField-DPTJjF8V.js","sources":["../src/components/TextField/internal/TextField.tsx"],"sourcesContent":["import {\n ChangeEventHandler,\n ComponentPropsWithoutRef,\n FocusEventHandler,\n ReactElement,\n ReactNode,\n Ref,\n forwardRef,\n useId,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport { useTrackingId, useMergeRefs } from \"../../../hooks\";\nimport {\n DataTrackingId,\n LayoutUtilProps,\n Size,\n MaxLengthCounterProps,\n} from \"../../../types\";\nimport {\n useLayoutPropsUtil,\n useOptionallyControlledState,\n} from \"../../../internal/hooks\";\nimport { Helper, HelperProps } from \"../../../internal/components\";\nimport { Spinner } from \"../../Spinner\";\nimport styles from \"../TextField.module.scss\";\nimport cx from \"classnames\";\nimport { FieldLabel, FieldLabelProps } from \"../../FieldLabel\";\nimport { childrenToString } from \"../../../internal/functions\";\n\nexport type TextFieldProps = Omit<\n ComponentPropsWithoutRef<\"input\">,\n \"size\" | \"prefix\"\n> &\n LayoutUtilProps & {\n error?: ReactElement | string | boolean;\n label?: FieldLabelProps[\"children\"];\n prefix?: string | ReactElement;\n suffix?: string | ReactElement;\n size?: Extract<Size, \"small\" | \"medium\" | \"large\">;\n type?: \"text\" | \"email\" | \"tel\" | \"url\" | \"password\" | \"number\";\n description?: HelperProps[\"description\"];\n errorAriaLive?: HelperProps[\"errorAriaLive\"];\n hint?: HelperProps[\"hint\"];\n loading?: boolean;\n disabled?: boolean;\n labelProps?: FieldLabelProps;\n moreInfo?: ReactNode;\n } & MaxLengthCounterProps &\n DataTrackingId;\n\nexport const TextField = forwardRef(\n (props: TextFieldProps, ref: Ref<HTMLInputElement>) => {\n const data = {\n label: childrenToString(props.label),\n labelProps: props.labelProps,\n prefix: childrenToString(props.prefix),\n hint: childrenToString(props.hint),\n description: childrenToString(props.description),\n size: props.size,\n type: props.type,\n };\n\n const trackingId = useTrackingId({\n name: \"TextField\",\n data,\n hasOverride: !!props[\"data-tracking-id\"],\n });\n\n const { layoutStyles, componentProps } = useLayoutPropsUtil(props);\n const {\n className,\n error,\n errorAriaLive: errorAriaLiveProp = \"assertive\",\n defaultValue: defaultValueProp,\n value: valueProp,\n label,\n moreInfo,\n prefix,\n suffix,\n size,\n type = \"text\",\n required,\n onChange,\n onFocus,\n onBlur,\n id: idProp,\n description,\n hint,\n showCounter,\n maxLength,\n loading,\n disabled,\n labelProps,\n style,\n placeholder,\n ...rest\n } = componentProps;\n\n const inputRef = useRef<HTMLInputElement>(null);\n const [isTyping, setIsTyping] = useState(false);\n const [openInfo, setOpenInfo] = useState(false);\n const [errorAriaLive, setErrorAriaLive] =\n useState<HelperProps[\"errorAriaLive\"]>(\"off\");\n\n // Use the optionally controlled state for value\n const [value, setValue] = useOptionallyControlledState<typeof valueProp>({\n controlledValue: valueProp,\n defaultValue: defaultValueProp,\n });\n\n const length = useMemo(() => {\n if (\n typeof value === \"string\" ||\n typeof value === \"number\" ||\n Array.isArray(value)\n ) {\n return String(value).length;\n }\n return 0;\n }, [value]);\n\n const onChangeHandler: ChangeEventHandler<HTMLInputElement> = (e) => {\n setValue(e.target.value);\n onChange?.(e);\n if (!isTyping) {\n setIsTyping(true);\n }\n };\n\n const focusHandler: FocusEventHandler<HTMLInputElement> = (e) => {\n onFocus?.(e);\n setOpenInfo(true);\n setErrorAriaLive(errorAriaLiveProp);\n };\n\n const blurHandler: FocusEventHandler<HTMLInputElement> = (e) => {\n onBlur?.(e);\n setOpenInfo(false);\n setErrorAriaLive(\"off\");\n if (isTyping) {\n setIsTyping(false);\n }\n };\n\n const labelUid = useId();\n const id = idProp ?? labelUid;\n\n const prefixUid = useId();\n const suffixUid = useId();\n\n const helperUid = useId();\n\n const errorMessage = typeof error !== \"boolean\" ? error : undefined;\n\n const styleCombined = { ...style, ...layoutStyles };\n\n const hasHelperText = hint || showCounter || errorMessage || description;\n\n return (\n <div\n className={cx(styles[\"textfield\"], className)}\n data-anv=\"textfield\"\n style={styleCombined}\n >\n {label && (\n <FieldLabel\n moreInfo={moreInfo}\n openMoreInfo={openInfo}\n required={required}\n htmlFor={id}\n {...labelProps}\n >\n {label}\n </FieldLabel>\n )}\n <div\n className={cx(styles[\"input-wrapper\"], {\n [styles[\"small\"]]: size === \"small\",\n [styles[\"large\"]]: size === \"large\",\n })}\n role=\"presentation\"\n onClick={() => inputRef.current?.focus()}\n >\n {prefix ? (\n <div\n aria-hidden\n className={styles[\"prefix\"]}\n id={`prefix${prefixUid}`}\n >\n {prefix}\n </div>\n ) : null}\n <input\n id={id}\n className={cx(styles[\"input\"], {\n [styles[\"error\"]]: error,\n })}\n onChange={onChangeHandler}\n onFocus={focusHandler}\n onBlur={blurHandler}\n ref={useMergeRefs([ref, inputRef])}\n required={required}\n maxLength={maxLength}\n placeholder={placeholder}\n type={type}\n disabled={disabled}\n value={value ?? \"\"}\n data-tracking-id={trackingId}\n {...rest}\n aria-label={label ? undefined : placeholder}\n aria-describedby={hasHelperText ? helperUid : undefined}\n aria-invalid={error ? !!error : undefined}\n />\n {loading ? (\n <div className={styles[\"loading-spinner-wrapper\"]}>\n <Spinner size=\"small\" />\n </div>\n ) : null}\n {suffix ? (\n <div\n className={styles[\"suffix\"]}\n aria-hidden\n id={`suffix${suffixUid}`}\n >\n {suffix}\n </div>\n ) : null}\n </div>\n {hasHelperText ? (\n <Helper\n id={helperUid}\n hint={hint}\n maxLength={maxLength}\n inputLength={length}\n isTyping={isTyping}\n showCounter={showCounter}\n errorMessage={errorMessage}\n errorAriaLive={errorAriaLive}\n description={description}\n />\n ) : null}\n </div>\n );\n },\n);\nTextField.displayName = \"InternalTextField\";\n"],"names":["styles"],"mappings":";;;;;;;;;;;;;AAoDO,MAAM,SAAA,GAAY,UAAA;AAAA,EACvB,CAAC,OAAuB,GAAA,KAA+B;AACrD,IAAA,MAAM,IAAA,GAAO;AAAA,MACX,KAAA,EAAO,gBAAA,CAAiB,KAAA,CAAM,KAAK,CAAA;AAAA,MACnC,YAAY,KAAA,CAAM,UAAA;AAAA,MAClB,MAAA,EAAQ,gBAAA,CAAiB,KAAA,CAAM,MAAM,CAAA;AAAA,MACrC,IAAA,EAAM,gBAAA,CAAiB,KAAA,CAAM,IAAI,CAAA;AAAA,MACjC,WAAA,EAAa,gBAAA,CAAiB,KAAA,CAAM,WAAW,CAAA;AAAA,M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mBACC,GAAA;AAAA,YAAC,MAAA;AAAA,YAAA;AAAA,cACC,EAAA,EAAI,SAAA;AAAA,cACJ,IAAA;AAAA,cACA,SAAA;AAAA,cACA,WAAA,EAAa,MAAA;AAAA,cACb,QAAA;AAAA,cACA,WAAA;AAAA,cACA,YAAA;AAAA,cACA,aAAA;AAAA,cACA;AAAA;AAAA,WACF,GACE;AAAA;AAAA;AAAA,KACN;AAAA,EAEJ;AACF;AACA,SAAA,CAAU,WAAA,GAAc,mBAAA;;;;"}
@@ -1,35 +0,0 @@
1
- import { TextFieldProps } from '../../TextField';
2
- import { YearlessDateMode, YearlessDate } from '../types';
3
- export type MaskedYearlessDateInputChange = {
4
- event: React.ChangeEvent<HTMLInputElement>;
5
- value: YearlessDate | null;
6
- isInputValid: boolean;
7
- isInputEmpty: boolean;
8
- };
9
- export type MaskedYearlessDateInputChangeHandler = (change: MaskedYearlessDateInputChange) => void;
10
- export type MaskedYearlessDateInputProps = Omit<TextFieldProps, "onChange" | "value" | "ref" | "showCounter" | "hint"> & {
11
- onChange: MaskedYearlessDateInputChangeHandler;
12
- mode?: YearlessDateMode;
13
- value?: YearlessDate | null;
14
- disableHint?: boolean;
15
- };
16
- export type MaskedYearlessDateInput = HTMLInputElement & {
17
- setValue: (value: YearlessDate | null) => void;
18
- };
19
- /**
20
- * A masked date input component that allows for the input of a date in a specific format.
21
- *
22
- * Provides a `setDate` method that can be used to set the date from outside the component (e.g from a calendar).
23
- *
24
- * @internal This component is not intended to be used directly in consumer code.
25
- *
26
- * @param props - The props for the MaskedDateInput component.
27
- * @param props.onChange - The function to call when the date changes.
28
- * @param props.mode - The mode of the date input.
29
- */
30
- export declare const MaskedYearlessDateInput: import('react').ForwardRefExoticComponent<Omit<TextFieldProps, "ref" | "value" | "onChange" | "hint" | "showCounter"> & {
31
- onChange: MaskedYearlessDateInputChangeHandler;
32
- mode?: YearlessDateMode;
33
- value?: YearlessDate | null;
34
- disableHint?: boolean;
35
- } & import('react').RefAttributes<MaskedYearlessDateInput>>;
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-CUVkL0hr.js","sources":["../../hammer-icon/mdi/round/drag_indicator.svg","../src/components/Dnd/DndHandle.tsx","../src/components/Dnd/DndHandleButton.tsx","../src/components/Dnd/DndSortLine.tsx","../src/components/Dnd/DndZone.tsx","../src/components/Dnd/index.ts"],"sourcesContent":["import * as React from \"react\";\nconst SvgDragIndicator = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: \"1em\", height: \"1em\", viewBox: \"0 0 24 24\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z\" }));\nexport default SvgDragIndicator;\n","import { Icon } from \"../Icon\";\nimport DragIndicator from \"@servicetitan/hammer-icon/mdi/round/drag_indicator.svg\";\nimport styles from \"./DndHandle.module.scss\";\nimport cx from \"classnames\";\n\n/**\n * Props for the DndHandle component\n */\nexport type DndHandleProps = {\n /**\n * Additional CSS class names to apply to the drag handle.\n */\n className?: string;\n};\n\n/**\n * A reusable drag handle icon component for drag and drop interactions.\n *\n * Features:\n * - Standardized drag indicator icon\n * - Accessible with proper ARIA attributes\n * - Customizable styling through className prop\n * - Consistent visual appearance across applications\n * - Lightweight and performant\n * - Supports all standard HTML element props\n *\n * @example\n * <DndHandle className=\"custom-drag-handle\" />\n */\nexport function DndHandle({ className }: { className?: string }) {\n const handleClasses = cx(styles.handle, className);\n return (\n <Icon svg={DragIndicator} className={handleClasses} role=\"presentation\" />\n );\n}\n","import { ButtonCompound } from \"../ButtonCompound\";\nimport handleStyles from \"./DndHandle.module.scss\";\nimport cx from \"classnames\";\nimport { forwardRef } from \"react\";\nimport { DndHandle } from \"./DndHandle\";\n\n/**\n * Props for the DndHandleButton component\n * @extends React.ComponentPropsWithoutRef<typeof ButtonCompound>\n */\nexport interface DndHandleButtonProps\n extends React.ComponentPropsWithoutRef<typeof ButtonCompound> {\n /**\n * Indicates whether the handle is currently being dragged.\n * @default false\n */\n isActive?: boolean;\n}\n\n/**\n * A reusable drag handle button component for drag and drop functionality.\n *\n * Features:\n * - Interactive button with drag handle icon\n * - Visual feedback for active drag state\n * - Accessible with proper ARIA attributes\n * - Extends ButtonCompound functionality\n * - Customizable styling through className prop\n * - Supports all standard button props\n * - Consistent visual appearance across applications\n *\n * @example\n * <DndHandleButton\n * isActive={isDragging}\n * className=\"custom-handle-button\"\n * onClick={handleClick}\n * />\n */\nexport const DndHandleButton = forwardRef<\n HTMLButtonElement,\n DndHandleButtonProps\n>(({ isActive = false, className, ...props }, ref) => {\n const handleButtonClasses = cx(className, handleStyles[\"handle-button\"], {\n [handleStyles[\"active\"]]: isActive,\n });\n\n return (\n <ButtonCompound\n ref={ref}\n className={handleButtonClasses}\n type=\"button\"\n shape=\"rounded\"\n {...props}\n >\n <DndHandle />\n </ButtonCompound>\n );\n});\n\nDndHandleButton.displayName = \"DndHandleButton\";\n","import cx from \"classnames\";\n\nimport styles from \"./Dnd.module.scss\";\nimport { CSSProperties } from \"react\";\n\n/**\n * Props for the DndSortLine component\n * @extends React.ComponentPropsWithoutRef<\"div\">\n */\nexport type SortLineProps = React.ComponentPropsWithoutRef<\"div\"> & {\n /**\n * The offset of the line from the item. This is a CSS value, typically negative.\n */\n offset: string;\n /**\n * The orientation of the sort - Note this may be counterintuitive, as the line is rendered perpendicular to the sort.\n */\n orientation: \"horizontal\" | \"vertical\";\n /**\n * The position of the line relative to a target item.\n */\n position: \"before\" | \"after\";\n};\n\n/**\n * A visual indicator line that shows where an item will be dropped during drag and drop operations.\n *\n * Features:\n * - Visual feedback for drop positioning\n * - Configurable orientation (horizontal/vertical)\n * - Adjustable positioning (before/after)\n * - Customizable offset for precise placement\n * - Accessible with proper ARIA attributes\n * - Automatic CSS class management\n * - Supports all standard HTML div props\n *\n * @example\n * <DndSortLine\n * offset=\"-10px\"\n * orientation=\"vertical\"\n * position=\"after\"\n * className=\"custom-drop-line\"\n * />\n */\nexport const DndSortLine = ({\n offset,\n orientation,\n position,\n ...rest\n}: SortLineProps) => {\n const classes = cx(\n styles[\"drop-line\"],\n styles[`orientation-${orientation}`],\n styles[`position-${position}`],\n );\n\n return (\n <div\n aria-hidden\n className={classes}\n style={{ \"--drop-line-offset\": offset } as CSSProperties}\n {...rest}\n />\n );\n};\n","import { ElementType, forwardRef, ReactNode } from \"react\";\nimport cx from \"classnames\";\n\nimport styles from \"./Dnd.module.scss\";\n\n/**\n * Props for the DndZone component\n * @extends Omit<React.ComponentPropsWithoutRef<T>, \"el\" | \"ref\">\n */\nexport type DndZoneProps<T extends ElementType = \"div\"> = {\n /**\n * The HTML element type to render. Can be any valid HTML element or React component.\n * @default \"div\"\n */\n el?: T;\n /**\n * The content to be rendered inside the drop zone.\n */\n children?: ReactNode;\n /**\n * Additional CSS class names to apply to the drop zone.\n */\n className?: string;\n /**\n * Indicates whether a draggable item is currently over this drop zone.\n */\n isOver: boolean;\n /**\n * Indicates whether the current drag operation is valid for this drop zone.\n */\n isValid: boolean;\n /**\n * Indicates whether any item is currently being dragged.\n */\n isDragging: boolean;\n} & Omit<React.ComponentPropsWithoutRef<T>, \"el\" | \"ref\">;\n\n/**\n * Base styling component for drop zones that handles visual states and styling.\n *\n * Features:\n * - Configurable HTML element rendering with the 'el' prop\n * - Visual feedback for drag states (over, valid, dragging)\n * - Automatic CSS class management based on drag state\n * - Supports all standard HTML element props\n * - Accessible with proper ARIA attributes\n * - Flexible styling through className prop\n * - Responsive design that adapts to container\n *\n * @example\n * <DndZone\n * isOver={isOver}\n * isValid={isValid}\n * isDragging={isDragging}\n * className=\"custom-drop-zone\"\n * >\n * Drop items here\n * </DndZone>\n */\nexport const DndZone = forwardRef<HTMLDivElement, DndZoneProps<ElementType>>(\n (\n {\n el: Component = \"div\" as ElementType,\n children,\n className,\n isDragging,\n isOver,\n isValid,\n ...rest\n },\n ref,\n ) => {\n const classes = cx(className, {\n [styles[\"drop-zone\"]]: true,\n [styles[\"over-valid\"]]: isDragging && isOver && isValid,\n [styles[\"over-invalid\"]]: isDragging && isOver && !isValid,\n [styles[\"active-not-over\"]]: isDragging && !isOver,\n });\n\n return (\n <Component ref={ref} className={classes} {...rest}>\n {children}\n </Component>\n );\n },\n);\n\nDndZone.displayName = \"DndZoneBase\";\n","import { DndHandle } from \"./DndHandle\";\nimport { DndHandleButton } from \"./DndHandleButton\";\nimport { DndSortLine } from \"./DndSortLine\";\nimport { DndZone } from \"./DndZone\";\n\nexport const Dnd = {\n Handle: DndHandle,\n HandleButton: DndHandleButton,\n SortLine: DndSortLine,\n Zone: DndZone,\n};\n"],"names":["styles","DragIndicator"],"mappings":";;;;;;;AACA,MAAM,gBAAgB,GAAG,CAAC,KAAK,qBAAqB,KAAK,CAAC,aAAa,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,4BAA4B,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG,KAAK,EAAE,kBAAkB,KAAK,CAAC,aAAa,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,qSAAqS,EAAE,CAAC,CAAC;;;;;;;;;;AC4BxgB,SAAS,SAAA,CAAU,EAAE,SAAA,EAAU,EAA2B;AAC/D,EAAA,MAAM,aAAA,GAAgB,EAAA,CAAGA,YAAA,CAAO,MAAA,EAAQ,SAAS,CAAA;AACjD,EAAA,2BACG,IAAA,EAAA,EAAK,GAAA,EAAKC,kBAAe,SAAA,EAAW,aAAA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