@servicetitan/anvil2 1.50.1 → 1.50.2

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 (181) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/{Calendar-CAYitkfM.js → Calendar-BeFARXwq.js} +2 -2
  3. package/dist/{Calendar-CAYitkfM.js.map → Calendar-BeFARXwq.js.map} +1 -1
  4. package/dist/{Calendar-C9oxHTGG.js → Calendar-M9v994mm.js} +2 -2
  5. package/dist/{Calendar-C9oxHTGG.js.map → Calendar-M9v994mm.js.map} +1 -1
  6. package/dist/Calendar.js +2 -2
  7. package/dist/{Checkbox-DbBeuNdW.js → Checkbox-BwFY38z1.js} +3 -2
  8. package/dist/Checkbox-BwFY38z1.js.map +1 -0
  9. package/dist/{Checkbox-zAKOGEBl.js → Checkbox-Chck2V5C.js} +2 -2
  10. package/dist/{Checkbox-zAKOGEBl.js.map → Checkbox-Chck2V5C.js.map} +1 -1
  11. package/dist/Checkbox.js +2 -2
  12. package/dist/{Combobox-DGAa9vgU.js → Combobox-BTTWNSW1.js} +285 -175
  13. package/dist/Combobox-BTTWNSW1.js.map +1 -0
  14. package/dist/Combobox.js +1 -1
  15. package/dist/{DataTable-DQ9FFuV8.js → DataTable-hXWouflx.js} +6 -6
  16. package/dist/{DataTable-DQ9FFuV8.js.map → DataTable-hXWouflx.js.map} +1 -1
  17. package/dist/{DateField-BT9jJRp5.js → DateField-B8JdMu94.js} +6 -6
  18. package/dist/{DateField-BT9jJRp5.js.map → DateField-B8JdMu94.js.map} +1 -1
  19. package/dist/DateField.js +1 -1
  20. package/dist/{DateFieldRange-ZAic_9mt.js → DateFieldRange-DWAgi_T9.js} +7 -7
  21. package/dist/{DateFieldRange-ZAic_9mt.js.map → DateFieldRange-DWAgi_T9.js.map} +1 -1
  22. package/dist/DateFieldRange.js +1 -1
  23. package/dist/{DateFieldSingle-DAtR8ImE.js → DateFieldSingle-CQ6X-bVX.js} +7 -7
  24. package/dist/{DateFieldSingle-DAtR8ImE.js.map → DateFieldSingle-CQ6X-bVX.js.map} +1 -1
  25. package/dist/DateFieldSingle.js +1 -1
  26. package/dist/{DateFieldYearless-DXO_MPwA.js → DateFieldYearless-D6-NfIHu.js} +4 -4
  27. package/dist/{DateFieldYearless-DXO_MPwA.js.map → DateFieldYearless-D6-NfIHu.js.map} +1 -1
  28. package/dist/DateFieldYearless.js +1 -1
  29. package/dist/{DateFieldYearlessRange-Cg6bbPIi.js → DateFieldYearlessRange-CQM0vibm.js} +4 -4
  30. package/dist/{DateFieldYearlessRange-Cg6bbPIi.js.map → DateFieldYearlessRange-CQM0vibm.js.map} +1 -1
  31. package/dist/DateFieldYearlessRange.js +1 -1
  32. package/dist/{DaysOfTheWeek-9B9d7-hF.js → DaysOfTheWeek-BR-mg77X.js} +3 -3
  33. package/dist/{DaysOfTheWeek-9B9d7-hF.js.map → DaysOfTheWeek-BR-mg77X.js.map} +1 -1
  34. package/dist/DaysOfTheWeek.js +1 -1
  35. package/dist/{Dialog-BwabBKoZ.js → Dialog-Ba2oIATn.js} +8 -8
  36. package/dist/Dialog-Ba2oIATn.js.map +1 -0
  37. package/dist/Dialog.js +2 -2
  38. package/dist/{DialogCancelButton-sTEfx5kf.js → DialogCancelButton-CBHyI0CI.js} +2 -2
  39. package/dist/{DialogCancelButton-sTEfx5kf.js.map → DialogCancelButton-CBHyI0CI.js.map} +1 -1
  40. package/dist/{Drawer-GXeoK-r9.js → Drawer-CWogbC68.js} +7 -7
  41. package/dist/{Drawer-GXeoK-r9.js.map → Drawer-CWogbC68.js.map} +1 -1
  42. package/dist/Drawer.js +1 -1
  43. package/dist/{DrawerContext-Cs3k160L.js → DrawerContext-rJvgnn3O.js} +2 -2
  44. package/dist/{DrawerContext-Cs3k160L.js.map → DrawerContext-rJvgnn3O.js.map} +1 -1
  45. package/dist/FieldDialog-BHgkQOhh.js +519 -0
  46. package/dist/FieldDialog-BHgkQOhh.js.map +1 -0
  47. package/dist/{FieldLabel-jqlQ1Ldh.js → FieldLabel-BWOIFXgt.js} +7 -4
  48. package/dist/FieldLabel-BWOIFXgt.js.map +1 -0
  49. package/dist/FieldLabel.js +1 -1
  50. package/dist/{InputMask-CJC9xZHG.js → InputMask-BzY1DJoV.js} +3 -3
  51. package/dist/{InputMask-CJC9xZHG.js.map → InputMask-BzY1DJoV.js.map} +1 -1
  52. package/dist/InputMask.js +1 -1
  53. package/dist/{ListView-D8mfK8Lu.js → ListView-C5OBwbHe.js} +6 -4
  54. package/dist/ListView-C5OBwbHe.js.map +1 -0
  55. package/dist/ListView.js +1 -1
  56. package/dist/{Menu-Cn2JJe1Y.js → Menu-69JwGxYh.js} +2 -2
  57. package/dist/{Menu-Cn2JJe1Y.js.map → Menu-69JwGxYh.js.map} +1 -1
  58. package/dist/Menu.js +1 -1
  59. package/dist/MultiSelectField.d.ts +2 -0
  60. package/dist/MultiSelectField.js +2 -0
  61. package/dist/MultiSelectField.js.map +1 -0
  62. package/dist/MultiSelectFieldSync-B3HNQf7R.js +873 -0
  63. package/dist/MultiSelectFieldSync-B3HNQf7R.js.map +1 -0
  64. package/dist/MultiSelectFieldSync.css +259 -0
  65. package/dist/{NumberField-CjWLnD9X.js → NumberField-CcH25bnO.js} +3 -3
  66. package/dist/{NumberField-CjWLnD9X.js.map → NumberField-CcH25bnO.js.map} +1 -1
  67. package/dist/NumberField.js +1 -1
  68. package/dist/{Page-DEbpjQw0.js → Page-B5HZSjSl.js} +5 -5
  69. package/dist/{Page-DEbpjQw0.js.map → Page-B5HZSjSl.js.map} +1 -1
  70. package/dist/Page.js +1 -1
  71. package/dist/{Pagination-BR8MiRaA.js → Pagination-CkdBaQx6.js} +2 -2
  72. package/dist/{Pagination-BR8MiRaA.js.map → Pagination-CkdBaQx6.js.map} +1 -1
  73. package/dist/Pagination.js +1 -1
  74. package/dist/{Popover-CCXrzBul.js → Popover-D9SmGQTh.js} +6 -5
  75. package/dist/{Popover-CCXrzBul.js.map → Popover-D9SmGQTh.js.map} +1 -1
  76. package/dist/Popover.js +1 -1
  77. package/dist/{ProgressBar-BpKEr6cO.js → ProgressBar-BABkqVmW.js} +2 -2
  78. package/dist/{ProgressBar-BpKEr6cO.js.map → ProgressBar-BABkqVmW.js.map} +1 -1
  79. package/dist/ProgressBar.js +1 -1
  80. package/dist/{Radio-jj0-1dOg.js → Radio-Cds2laHA.js} +2 -2
  81. package/dist/{Radio-jj0-1dOg.js.map → Radio-Cds2laHA.js.map} +1 -1
  82. package/dist/Radio.js +2 -2
  83. package/dist/{RadioGroup-Bxy415eu.js → RadioGroup-COVlUmwy.js} +3 -3
  84. package/dist/{RadioGroup-Bxy415eu.js.map → RadioGroup-COVlUmwy.js.map} +1 -1
  85. package/dist/{SelectCard-CjbsPKZ4.js → SelectCard-C-Kjk5eS.js} +3 -3
  86. package/dist/{SelectCard-CjbsPKZ4.js.map → SelectCard-C-Kjk5eS.js.map} +1 -1
  87. package/dist/SelectCard.js +1 -1
  88. package/dist/SelectField.js +1 -1
  89. package/dist/SelectFieldSync-0CL0RTpg.js +679 -0
  90. package/dist/SelectFieldSync-0CL0RTpg.js.map +1 -0
  91. package/dist/{SelectTrigger-D4AjiMKp.js → SelectTrigger-C1U-PlLz.js} +6 -3
  92. package/dist/SelectTrigger-C1U-PlLz.js.map +1 -0
  93. package/dist/SelectTrigger.js +1 -1
  94. package/dist/{SelectTriggerBase-D9GuxPxR.js → SelectTriggerBase-RHD4FTQE.js} +3 -3
  95. package/dist/{SelectTriggerBase-D9GuxPxR.js.map → SelectTriggerBase-RHD4FTQE.js.map} +1 -1
  96. package/dist/SelectTriggerBase.css +65 -59
  97. package/dist/SelectTriggerBase.module-B0NFRlQP.js +36 -0
  98. package/dist/SelectTriggerBase.module-B0NFRlQP.js.map +1 -0
  99. package/dist/Table.js +1 -1
  100. package/dist/{TextField-Qv6OqiKQ.js → TextField-BYGSTwkL.js} +2 -2
  101. package/dist/{TextField-Qv6OqiKQ.js.map → TextField-BYGSTwkL.js.map} +1 -1
  102. package/dist/{TextField-DNuEXKyN.js → TextField-BZ3h2mqU.js} +3 -3
  103. package/dist/{TextField-DNuEXKyN.js.map → TextField-BZ3h2mqU.js.map} +1 -1
  104. package/dist/TextField.js +1 -1
  105. package/dist/{Textarea-DdLD4imO.js → Textarea-Cb0Qs2FH.js} +8 -3
  106. package/dist/Textarea-Cb0Qs2FH.js.map +1 -0
  107. package/dist/Textarea.js +1 -1
  108. package/dist/{TimeField-C39hYluo.js → TimeField-DBtJYC7t.js} +4 -4
  109. package/dist/{TimeField-C39hYluo.js.map → TimeField-DBtJYC7t.js.map} +1 -1
  110. package/dist/TimeField.js +1 -1
  111. package/dist/Toast.js +2 -2
  112. package/dist/{Toaster-DJ4tNy-0.js → Toaster-Cerf91qp.js} +2 -2
  113. package/dist/{Toaster-DJ4tNy-0.js.map → Toaster-Cerf91qp.js.map} +1 -1
  114. package/dist/{Toaster-DyDVYq4x.js → Toaster-DDrGllhh.js} +3 -3
  115. package/dist/{Toaster-DyDVYq4x.js.map → Toaster-DDrGllhh.js.map} +1 -1
  116. package/dist/{Toolbar-Vw9V1RHr.js → Toolbar-K9UFfyvX.js} +127 -41
  117. package/dist/Toolbar-K9UFfyvX.js.map +1 -0
  118. package/dist/Toolbar.js +1 -1
  119. package/dist/{Tooltip-CBy7srE2.js → Tooltip-CkfkiQPz.js} +2 -2
  120. package/dist/{Tooltip-CBy7srE2.js.map → Tooltip-CkfkiQPz.js.map} +1 -1
  121. package/dist/Tooltip.js +1 -1
  122. package/dist/{YearlessDateInputWithPicker-DMGx3gE2.js → YearlessDateInputWithPicker-BIkxKxPi.js} +4 -4
  123. package/dist/{YearlessDateInputWithPicker-DMGx3gE2.js.map → YearlessDateInputWithPicker-BIkxKxPi.js.map} +1 -1
  124. package/dist/beta/components/MultiSelectField/MultiSelectField.d.ts +27 -0
  125. package/dist/beta/components/MultiSelectField/MultiSelectFieldSync.d.ts +63 -0
  126. package/dist/beta/components/MultiSelectField/index.d.ts +3 -0
  127. package/dist/beta/components/MultiSelectField/internal/MultiSelectFieldInput.d.ts +79 -0
  128. package/dist/beta/components/MultiSelectField/internal/MultiSelectFieldList.d.ts +26 -0
  129. package/dist/beta/components/MultiSelectField/internal/useComboMultiple.d.ts +44 -0
  130. package/dist/beta/components/MultiSelectField/stories/MultiSelectField.stories.data.d.ts +19 -0
  131. package/dist/beta/components/MultiSelectField/types.d.ts +311 -0
  132. package/dist/beta/components/SelectField/internal/FieldDialog/FieldDialog.d.ts +3 -1
  133. package/dist/beta/components/SelectField/internal/FieldPopover/FieldPopover.d.ts +1 -0
  134. package/dist/beta/components/SelectField/internal/SelectFieldInput.d.ts +3 -1
  135. package/dist/beta/components/SelectField/internal/SelectFieldLabel.d.ts +11 -3
  136. package/dist/beta/components/SelectField/internal/SelectFieldListItem.d.ts +2 -1
  137. package/dist/beta/components/SelectField/types.d.ts +19 -1
  138. package/dist/beta/components/index.d.ts +1 -0
  139. package/dist/beta.js +7 -5
  140. package/dist/beta.js.map +1 -1
  141. package/dist/components/Button/Button.figma.d.ts +1 -0
  142. package/dist/components/Combobox/ComboboxTypes.d.ts +1 -1
  143. package/dist/components/Combobox/internal/ComboboxLegacy/ComboboxLegacyTrigger.d.ts +2 -2
  144. package/dist/components/FieldLabel/FieldLabel.d.ts +5 -1
  145. package/dist/components/FieldLabel/internal/FieldLabelMoreInfoIcon.d.ts +3 -1
  146. package/dist/components/Icon/Icons.figma.d.ts +11 -0
  147. package/dist/components/ListView/ListView.d.ts +2 -9
  148. package/dist/components/ListView/internal/types.d.ts +12 -0
  149. package/dist/components/SelectTrigger/SelectTrigger.d.ts +1 -1
  150. package/dist/components/Switch/Switch.figma.d.ts +1 -0
  151. package/dist/components/Textarea/Textarea.d.ts +1 -1
  152. package/dist/index.js +34 -34
  153. package/dist/internal/components/Label/Label.d.ts +13 -3
  154. package/dist/internal/hooks/useOnClickOutside/useOnClickOutside.d.ts +8 -7
  155. package/dist/types/props.d.ts +5 -0
  156. package/dist/{useInitialFocus-BpmW7pDB.js → useInitialFocus-D_ESGka7.js} +3 -3
  157. package/dist/{useInitialFocus-BpmW7pDB.js.map → useInitialFocus-D_ESGka7.js.map} +1 -1
  158. package/dist/useOnClickOutside-Zw5vzxSq.js +71 -0
  159. package/dist/useOnClickOutside-Zw5vzxSq.js.map +1 -0
  160. package/dist/useOpenCloseTransitionStates-CiTYrLGi.js +68 -0
  161. package/dist/useOpenCloseTransitionStates-CiTYrLGi.js.map +1 -0
  162. package/dist/{usePopoverSupport-CCSCHnit.js → usePopoverSupport-CldZmxFl.js} +2 -2
  163. package/dist/{usePopoverSupport-CCSCHnit.js.map → usePopoverSupport-CldZmxFl.js.map} +1 -1
  164. package/dist/{utils-Bkbn9cyk.js → utils-u8cyv323.js} +2 -2
  165. package/dist/{utils-Bkbn9cyk.js.map → utils-u8cyv323.js.map} +1 -1
  166. package/package.json +4 -3
  167. package/dist/Checkbox-DbBeuNdW.js.map +0 -1
  168. package/dist/Combobox-DGAa9vgU.js.map +0 -1
  169. package/dist/Dialog-BwabBKoZ.js.map +0 -1
  170. package/dist/FieldLabel-jqlQ1Ldh.js.map +0 -1
  171. package/dist/ListView-D8mfK8Lu.js.map +0 -1
  172. package/dist/SelectFieldSync-D4VdOXoY.js +0 -1134
  173. package/dist/SelectFieldSync-D4VdOXoY.js.map +0 -1
  174. package/dist/SelectTrigger-D4AjiMKp.js.map +0 -1
  175. package/dist/SelectTriggerBase.module-Ce49lamD.js +0 -35
  176. package/dist/SelectTriggerBase.module-Ce49lamD.js.map +0 -1
  177. package/dist/Textarea-DdLD4imO.js.map +0 -1
  178. package/dist/Toolbar-Vw9V1RHr.js.map +0 -1
  179. package/dist/useOnClickOutside-BDzuUjmY.js +0 -147
  180. package/dist/useOnClickOutside-BDzuUjmY.js.map +0 -1
  181. /package/dist/{SelectFieldSync.css → FieldDialog.css} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"Popover-CCXrzBul.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 actualPlacement?: 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 actualPlacement: context.actualPlacement,\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 * Whether to remove the content from the DOM while the popover is closed\n */\n hideWhileClosed?: boolean;\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 hideWhileClosed = false,\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 if (!context?.open) return; // Don't set hover state if popover is closed\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 // Extract base side from actual placement for hover bridge positioning\n const bridgeSide =\n context?.openOnHover && context?.actualPlacement\n ? (context.actualPlacement.split(\"-\")[0] as\n | \"top\"\n | \"bottom\"\n | \"left\"\n | \"right\")\n : undefined;\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 data-position={bridgeSide}\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 {hideWhileClosed ? (context?.open ? children : null) : 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 // Track the actual computed placement after flip/shift middleware runs\n // (may differ from the placement prop if Floating UI adjusts it)\n const [actualPlacement, setActualPlacement] = useState<Placement | undefined>(\n placement,\n );\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 setActualPlacement(placement);\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\n // Reset hover states to prevent stuck state when closed programmatically\n // while mouse is still inside the popover content\n setTriggerHovered(false);\n setContentHovered(false);\n\n fn?.();\n },\n [\n popover,\n openState,\n openOnHover,\n onClose,\n setOpenState,\n onOpenChange,\n setTriggerHovered,\n setContentHovered,\n ],\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 actualPlacement,\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 actualPlacement,\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;AA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;AAED,cAAA,CAAe,WAAA,GAAc,SAAA;AA+CtB,MAAM,OAAA,GAAU,MAAA,CAAO,MAAA,CAAO,cAAA,EAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAsBnD,OAAA,EAAS,cAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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
+ {"version":3,"file":"Popover-D9SmGQTh.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 actualPlacement?: 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 actualPlacement: context.actualPlacement,\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 * Whether to remove the content from the DOM while the popover is closed\n */\n hideWhileClosed?: boolean;\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 hideWhileClosed = false,\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 if (!context?.open) return; // Don't set hover state if popover is closed\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 // Extract base side from actual placement for hover bridge positioning\n const bridgeSide =\n context?.openOnHover && context?.actualPlacement\n ? (context.actualPlacement.split(\"-\")[0] as\n | \"top\"\n | \"bottom\"\n | \"left\"\n | \"right\")\n : undefined;\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 data-position={bridgeSide}\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 {hideWhileClosed ? (context?.open ? children : null) : 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 // Track the actual computed placement after flip/shift middleware runs\n // (may differ from the placement prop if Floating UI adjusts it)\n const [actualPlacement, setActualPlacement] = useState<Placement | undefined>(\n placement,\n );\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 setActualPlacement(placement);\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\n // Reset hover states to prevent stuck state when closed programmatically\n // while mouse is still inside the popover content\n setTriggerHovered(false);\n setContentHovered(false);\n\n fn?.();\n },\n [\n popover,\n openState,\n openOnHover,\n onClose,\n setOpenState,\n onOpenChange,\n setTriggerHovered,\n setContentHovered,\n ],\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 onClickOutsideBegin: (e) => {\n if (!openState) return;\n onClickOutside?.(e);\n onOutsidePress?.(e);\n },\n targets: [invoker, popover],\n onClickOutside: () => {\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 actualPlacement,\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 actualPlacement,\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,MA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A;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;;;;"}
package/dist/Popover.js CHANGED
@@ -1,2 +1,2 @@
1
- export { P as Popover, a as PopoverButton, b as PopoverClose, c as PopoverContent, d as PopoverTrigger, P as default } from './Popover-CCXrzBul.js';
1
+ export { P as Popover, a as PopoverButton, b as PopoverClose, c as PopoverContent, d as PopoverTrigger, P as default } from './Popover-D9SmGQTh.js';
2
2
  //# sourceMappingURL=Popover.js.map
@@ -3,7 +3,7 @@ import { forwardRef, useId } from 'react';
3
3
  import { c as cx } from './index-tZvMCc77.js';
4
4
  import { S as SvgCheckCircle } from './check_circle-CM0ukqXv.js';
5
5
  import { S as SvgError } from './error-DR_wWdYY.js';
6
- import { F as FieldLabel } from './FieldLabel-jqlQ1Ldh.js';
6
+ import { F as FieldLabel } from './FieldLabel-BWOIFXgt.js';
7
7
  import { F as Flex } from './Flex-CjPHUTeq.js';
8
8
  import { I as Icon } from './Icon-BSuTVNaa.js';
9
9
  import { u as useLayoutPropsUtil } from './useLayoutPropsUtil-BlIWftBb.js';
@@ -128,4 +128,4 @@ const ProgressBar = forwardRef(
128
128
  ProgressBar.displayName = "ProgressBar";
129
129
 
130
130
  export { ProgressBar as P };
131
- //# sourceMappingURL=ProgressBar-BpKEr6cO.js.map
131
+ //# sourceMappingURL=ProgressBar-BABkqVmW.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ProgressBar-BpKEr6cO.js","sources":["../src/components/ProgressBar/ProgressBar.tsx"],"sourcesContent":["import {\n forwardRef,\n ComponentPropsWithoutRef,\n useId,\n AriaAttributes,\n ReactElement,\n} from \"react\";\nimport cx from \"classnames\";\nimport Check from \"@servicetitan/hammer-icon/mdi/round/check_circle.svg\";\nimport Error from \"@servicetitan/hammer-icon/mdi/round/error.svg\";\n\nimport { FieldLabel, FieldLabelProps } from \"../FieldLabel\";\nimport { Flex } from \"../Flex\";\nimport { Helper, HelperProps } from \"../../internal/components\";\nimport { Icon } from \"../Icon\";\nimport { LayoutUtilProps } from \"../../types\";\nimport { useLayoutPropsUtil } from \"../../internal/hooks\";\n\nimport styles from \"./ProgressBar.module.scss\";\n\n/**\n * Props for the ProgressBar component\n * @extends Omit<ComponentPropsWithoutRef<\"progress\">, \"value\">\n * @extends LayoutUtilProps\n */\nexport type ProgressBarProps = Omit<\n ComponentPropsWithoutRef<\"progress\">,\n \"value\"\n> &\n LayoutUtilProps & {\n /**\n * Error state or error message to display\n * @default false\n */\n error?: ReactElement | string | boolean;\n /**\n * ARIA live region setting for error announcements\n */\n errorAriaLive?: HelperProps[\"errorAriaLive\"];\n /**\n * Description text to display below the progress bar\n */\n description?: HelperProps[\"description\"];\n } & (\n | {\n /**\n * Label text for the progress bar\n */\n label: FieldLabelProps[\"children\"];\n /**\n * Additional props for the label component\n */\n labelProps?: Omit<FieldLabelProps, \"children\" | \"id\" | \"required\">;\n }\n | {\n label?: never;\n labelProps?: never;\n /**\n * Accessible label for the progress bar (alternative to label)\n */\n [\"aria-label\"]: Exclude<AriaAttributes[\"aria-label\"], undefined>;\n }\n | {\n label?: never;\n labelProps?: never;\n /**\n * ID of element that labels the progress bar (alternative to label)\n */\n [\"aria-labelledby\"]: Exclude<\n AriaAttributes[\"aria-labelledby\"],\n undefined\n >;\n }\n ) &\n (\n | {\n /**\n * Current progress value (0-100 or 0-max)\n */\n value: `${number}` | number;\n /**\n * Whether the progress bar is in indeterminate state\n * @default false\n */\n indeterminate?: false;\n }\n | {\n value?: never;\n /**\n * Whether the progress bar is in indeterminate state\n */\n indeterminate: true;\n }\n );\n\n/**\n * ProgressBar component for displaying progress indicators.\n *\n * Features:\n * - Supports both determinate and indeterminate progress states\n * - Optional label with customizable label props\n * - Error state with error message display\n * - Success state with check icon when value equals max\n * - Description text support\n * - Accessibility support with proper ARIA attributes\n * - Layout utility props for positioning and spacing\n * - Flexible labeling options (label, aria-label, aria-labelledby)\n * - Error and success visual indicators\n *\n * @example\n * <ProgressBar\n * label=\"Upload Progress\"\n * value={75}\n * max={100}\n * description=\"Uploading files...\"\n * />\n *\n * @example\n * <ProgressBar\n * label=\"Processing\"\n * indeterminate\n * description=\"Please wait...\"\n * />\n *\n * @example\n * <ProgressBar\n * aria-label=\"Download progress\"\n * value={50}\n * error=\"Download failed\"\n * />\n */\nexport const ProgressBar = forwardRef<HTMLDivElement, ProgressBarProps>(\n (props, ref) => {\n const { layoutStyles, componentProps } = useLayoutPropsUtil(props);\n const {\n className,\n style,\n value,\n children,\n indeterminate,\n errorAriaLive,\n description,\n error = false,\n max = 100,\n ...mainProps\n } = componentProps;\n const styleCombined = {\n ...style,\n ...layoutStyles,\n };\n\n const errorMessage = typeof error !== \"boolean\" ? error : undefined;\n const labelUid = useId();\n const isSuccess = typeof value !== \"undefined\" && +value >= +max;\n\n if (\"label\" in props && !!props.label) {\n const { label, labelProps, ...rest } = mainProps;\n\n const ProgressBarClassNames = cx(\n [styles[\"progress-bar\"]],\n\n className,\n {\n [styles[`error`]]: error,\n [styles[`success`]]: isSuccess,\n },\n );\n\n return (\n <div\n className={ProgressBarClassNames}\n data-anv=\"progress-bar\"\n style={styleCombined}\n ref={ref}\n >\n <Flex justifyContent=\"space-between\" alignItems=\"center\">\n <FieldLabel id={labelUid} {...labelProps}>\n {label}\n </FieldLabel>\n {isSuccess && !error ? (\n <Icon className={styles[\"check-icon\"]} svg={Check} />\n ) : null}\n {error ? (\n <Icon className={styles[\"error-icon\"]} svg={Error} />\n ) : null}\n </Flex>\n <div className={styles[\"bar-container\"]}>\n <progress\n aria-labelledby={labelUid}\n className={styles[\"bar\"]}\n value={value}\n max={max}\n {...rest}\n />\n </div>\n {errorMessage || description ? (\n <Helper\n errorMessage={errorMessage}\n errorAriaLive={errorAriaLive}\n description={description}\n />\n ) : null}\n </div>\n );\n }\n\n const ProgressBarClassNames = cx([styles[\"progress-bar\"]], className, {\n [styles[`error`]]: error,\n [styles[`success`]]: isSuccess,\n });\n\n return (\n <div\n className={ProgressBarClassNames}\n data-anv=\"progress-bar\"\n style={styleCombined}\n ref={ref}\n >\n <div className={styles[\"bar-container\"]}>\n <progress\n className={styles[\"bar\"]}\n max={max}\n value={value}\n {...mainProps}\n />\n </div>\n {errorMessage || description ? (\n <Helper\n errorMessage={errorMessage}\n errorAriaLive={errorAriaLive}\n description={description}\n />\n ) : null}\n </div>\n );\n },\n);\n\nProgressBar.displayName = \"ProgressBar\";\n"],"names":["ProgressBarClassNames","Check","Error"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAmIO,MAAM,WAAA,GAAc,UAAA;AAAA,EACzB,CAAC,OAAO,GAAA,KAAQ;AACd,IAAA,MAAM,EAAE,YAAA,EAAc,cAAA,EAAe,GAAI,mBAAmB,KAAK,CAAA;AACjE,IAAA,MAAM;AAAA,MACJ,SAAA;AAAA,MACA,KAAA;AAAA,MACA,KAAA;AAAA,MACA,QAAA;AAAA,MACA,aAAA;AAAA,MACA,aAAA;AAAA,MACA,WAAA;AAAA,MACA,KAAA,GAAQ,KAAA;AAAA,MACR,GAAA,GAAM,GAAA;AAAA,MACN,GAAG;AAAA,KACL,GAAI,cAAA;AACJ,IAAA,MAAM,aAAA,GAAgB;AAAA,MACpB,GAAG,KAAA;AAAA,MACH,GAAG;AAAA,KACL;AAEA,IAAA,MAAM,YAAA,GAAe,OAAO,KAAA,KAAU,SAAA,GAAY,KAAA,GAAQ,MAAA;AAC1D,IAAA,MAAM,WAAW,KAAA,EAAM;AACvB,IAAA,MAAM,YAAY,OAAO,KAAA,KAAU,WAAA,IAAe,CAAC,SAAS,CAAC,GAAA;AAE7D,IAAA,IAAI,OAAA,IAAW,KAAA,IAAS,CAAC,CAAC,MAAM,KAAA,EAAO;AACrC,MAAA,M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gBACvB,KAAA;AAAA,gBACA,GAAA;AAAA,gBACC,GAAG;AAAA;AAAA,aACN,EACF,CAAA;AAAA,YACC,gBAAgB,WAAA,mBACf,GAAA;AAAA,cAAC,MAAA;AAAA,cAAA;AAAA,gBACC,YAAA;AAAA,gBACA,aAAA;AAAA,gBACA;AAAA;AAAA,aACF,GACE;AAAA;AAAA;AAAA,OACN;AAAA,IAEJ;AAEA,IAAA,MAAM,wBAAwB,EAAA,CAAG,CAAC,OAAO,cAAc,CAAC,GAAG,SAAA,EAAW;AAAA,MACpE,CAAC,MAAA,CAAO,CAAA,KAAA,CAAO,CAAC,GAAG,KAAA;AAAA,MACnB,CAAC,MAAA,CAAO,CAAA,OAAA,CAAS,CAAC,GAAG;AAAA,KACtB,CAAA;AAED,IAAA,uBACE,IAAA;AAAA,MAAC,KAAA;AAAA,MAAA;AAAA,QACC,SAAA,EAAW,qBAAA;AAAA,QACX,UAAA,EAAS,cAAA;AAAA,QACT,KAAA,EAAO,aAAA;AAAA,QACP,GAAA;AAAA,QAEA,QAAA,EAAA;AAAA,0BAAA,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,MAAA,CAAO,eAAe,CAAA,EACpC,QAAA,kBAAA,GAAA;AAAA,YAAC,UAAA;AAAA,YAAA;AAAA,cACC,SAAA,EAAW,OAAO,KAAK,CAAA;AAAA,cACvB,GAAA;AAAA,cACA,KAAA;AAAA,cACC,GAAG;AAAA;AAAA,WACN,EACF,CAAA;AAAA,UACC,gBAAgB,WAAA,mBACf,GAAA;AAAA,YAAC,MAAA;AAAA,YAAA;AAAA,cACC,YAAA;AAAA,cACA,aAAA;AAAA,cACA;AAAA;AAAA,WACF,GACE;AAAA;AAAA;AAAA,KACN;AAAA,EAEJ;AACF;AAEA,WAAA,CAAY,WAAA,GAAc,aAAA;;;;"}
1
+ {"version":3,"file":"ProgressBar-BABkqVmW.js","sources":["../src/components/ProgressBar/ProgressBar.tsx"],"sourcesContent":["import {\n forwardRef,\n ComponentPropsWithoutRef,\n useId,\n AriaAttributes,\n ReactElement,\n} from \"react\";\nimport cx from \"classnames\";\nimport Check from \"@servicetitan/hammer-icon/mdi/round/check_circle.svg\";\nimport Error from \"@servicetitan/hammer-icon/mdi/round/error.svg\";\n\nimport { FieldLabel, FieldLabelProps } from \"../FieldLabel\";\nimport { Flex } from \"../Flex\";\nimport { Helper, HelperProps } from \"../../internal/components\";\nimport { Icon } from \"../Icon\";\nimport { LayoutUtilProps } from \"../../types\";\nimport { useLayoutPropsUtil } from \"../../internal/hooks\";\n\nimport styles from \"./ProgressBar.module.scss\";\n\n/**\n * Props for the ProgressBar component\n * @extends Omit<ComponentPropsWithoutRef<\"progress\">, \"value\">\n * @extends LayoutUtilProps\n */\nexport type ProgressBarProps = Omit<\n ComponentPropsWithoutRef<\"progress\">,\n \"value\"\n> &\n LayoutUtilProps & {\n /**\n * Error state or error message to display\n * @default false\n */\n error?: ReactElement | string | boolean;\n /**\n * ARIA live region setting for error announcements\n */\n errorAriaLive?: HelperProps[\"errorAriaLive\"];\n /**\n * Description text to display below the progress bar\n */\n description?: HelperProps[\"description\"];\n } & (\n | {\n /**\n * Label text for the progress bar\n */\n label: FieldLabelProps[\"children\"];\n /**\n * Additional props for the label component\n */\n labelProps?: Omit<FieldLabelProps, \"children\" | \"id\" | \"required\">;\n }\n | {\n label?: never;\n labelProps?: never;\n /**\n * Accessible label for the progress bar (alternative to label)\n */\n [\"aria-label\"]: Exclude<AriaAttributes[\"aria-label\"], undefined>;\n }\n | {\n label?: never;\n labelProps?: never;\n /**\n * ID of element that labels the progress bar (alternative to label)\n */\n [\"aria-labelledby\"]: Exclude<\n AriaAttributes[\"aria-labelledby\"],\n undefined\n >;\n }\n ) &\n (\n | {\n /**\n * Current progress value (0-100 or 0-max)\n */\n value: `${number}` | number;\n /**\n * Whether the progress bar is in indeterminate state\n * @default false\n */\n indeterminate?: false;\n }\n | {\n value?: never;\n /**\n * Whether the progress bar is in indeterminate state\n */\n indeterminate: true;\n }\n );\n\n/**\n * ProgressBar component for displaying progress indicators.\n *\n * Features:\n * - Supports both determinate and indeterminate progress states\n * - Optional label with customizable label props\n * - Error state with error message display\n * - Success state with check icon when value equals max\n * - Description text support\n * - Accessibility support with proper ARIA attributes\n * - Layout utility props for positioning and spacing\n * - Flexible labeling options (label, aria-label, aria-labelledby)\n * - Error and success visual indicators\n *\n * @example\n * <ProgressBar\n * label=\"Upload Progress\"\n * value={75}\n * max={100}\n * description=\"Uploading files...\"\n * />\n *\n * @example\n * <ProgressBar\n * label=\"Processing\"\n * indeterminate\n * description=\"Please wait...\"\n * />\n *\n * @example\n * <ProgressBar\n * aria-label=\"Download progress\"\n * value={50}\n * error=\"Download failed\"\n * />\n */\nexport const ProgressBar = forwardRef<HTMLDivElement, ProgressBarProps>(\n (props, ref) => {\n const { layoutStyles, componentProps } = useLayoutPropsUtil(props);\n const {\n className,\n style,\n value,\n children,\n indeterminate,\n errorAriaLive,\n description,\n error = false,\n max = 100,\n ...mainProps\n } = componentProps;\n const styleCombined = {\n ...style,\n ...layoutStyles,\n };\n\n const errorMessage = typeof error !== \"boolean\" ? error : undefined;\n const labelUid = useId();\n const isSuccess = typeof value !== \"undefined\" && +value >= +max;\n\n if (\"label\" in props && !!props.label) {\n const { label, labelProps, ...rest } = mainProps;\n\n const ProgressBarClassNames = cx(\n [styles[\"progress-bar\"]],\n\n className,\n {\n [styles[`error`]]: error,\n [styles[`success`]]: isSuccess,\n },\n );\n\n return (\n <div\n className={ProgressBarClassNames}\n data-anv=\"progress-bar\"\n style={styleCombined}\n ref={ref}\n >\n <Flex justifyContent=\"space-between\" alignItems=\"center\">\n <FieldLabel id={labelUid} {...labelProps}>\n {label}\n </FieldLabel>\n {isSuccess && !error ? (\n <Icon className={styles[\"check-icon\"]} svg={Check} />\n ) : null}\n {error ? (\n <Icon className={styles[\"error-icon\"]} svg={Error} />\n ) : null}\n </Flex>\n <div className={styles[\"bar-container\"]}>\n <progress\n aria-labelledby={labelUid}\n className={styles[\"bar\"]}\n value={value}\n max={max}\n {...rest}\n />\n </div>\n {errorMessage || description ? (\n <Helper\n errorMessage={errorMessage}\n errorAriaLive={errorAriaLive}\n description={description}\n />\n ) : null}\n </div>\n );\n }\n\n const ProgressBarClassNames = cx([styles[\"progress-bar\"]], className, {\n [styles[`error`]]: error,\n [styles[`success`]]: isSuccess,\n });\n\n return (\n <div\n className={ProgressBarClassNames}\n data-anv=\"progress-bar\"\n style={styleCombined}\n ref={ref}\n >\n <div className={styles[\"bar-container\"]}>\n <progress\n className={styles[\"bar\"]}\n max={max}\n value={value}\n {...mainProps}\n />\n </div>\n {errorMessage || description ? (\n <Helper\n errorMessage={errorMessage}\n errorAriaLive={errorAriaLive}\n description={description}\n />\n ) : null}\n </div>\n );\n },\n);\n\nProgressBar.displayName = \"ProgressBar\";\n"],"names":["ProgressBarClassNames","Check","Error"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAmIO,MAAM,WAAA,GAAc,UAAA;AAAA,EACzB,CAAC,OAAO,GAAA,KAAQ;AACd,IAAA,MAAM,EAAE,YAAA,EAAc,cAAA,EAAe,GAAI,mBAAmB,KAAK,CAAA;AACjE,IAAA,MAAM;AAAA,MACJ,SAAA;AAAA,MACA,KAAA;AAAA,MACA,KAAA;AAAA,MACA,QAAA;AAAA,MACA,aAAA;AAAA,MACA,aAAA;AAAA,MACA,WAAA;AAAA,MACA,KAAA,GAAQ,KAAA;AAAA,MACR,GAAA,GAAM,GAAA;AAAA,MACN,GAAG;AAAA,KACL,GAAI,cAAA;AACJ,IAAA,MAAM,aAAA,GAAgB;AAAA,MACpB,GAAG,KAAA;AAAA,MACH,GAAG;AAAA,KACL;AAEA,IAAA,MAAM,YAAA,GAAe,OAAO,KAAA,KAAU,SAAA,GAAY,KAAA,GAAQ,MAAA;AAC1D,IAAA,MAAM,WAAW,KAAA,EAAM;AACvB,IAAA,MAAM,YAAY,OAAO,KAAA,KAAU,WAAA,IAAe,CAAC,SAAS,CAAC,GAAA;AAE7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
- export { P as ProgressBar, P as default } from './ProgressBar-BpKEr6cO.js';
1
+ export { P as ProgressBar, P as default } from './ProgressBar-BABkqVmW.js';
2
2
  //# sourceMappingURL=ProgressBar.js.map
@@ -1,6 +1,6 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import { forwardRef } from 'react';
3
- import { R as RadioGroup, a as Radio$1 } from './RadioGroup-Bxy415eu.js';
3
+ import { R as RadioGroup, a as Radio$1 } from './RadioGroup-COVlUmwy.js';
4
4
  import { c as childrenToString } from './childrenToString-Bz9MqbHb.js';
5
5
  import { useTrackingId } from './useTrackingId.js';
6
6
 
@@ -57,4 +57,4 @@ const Radio = Object.assign(RadioElement, {
57
57
  });
58
58
 
59
59
  export { Radio as R };
60
- //# sourceMappingURL=Radio-jj0-1dOg.js.map
60
+ //# sourceMappingURL=Radio-Cds2laHA.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Radio-jj0-1dOg.js","sources":["../src/components/Radio/Radio.tsx"],"sourcesContent":["import { Ref, forwardRef } from \"react\";\nimport {\n RadioProps as CoreRadioProps,\n Radio as CoreRadio,\n} from \"./internal/Radio\";\nimport { RadioGroup } from \"./RadioGroup\";\nimport { useTrackingId } from \"../../hooks\";\nimport { DataTrackingId } from \"../../types\";\nimport { childrenToString } from \"../../internal/functions\";\n\n/**\n * Props for the Radio component\n * @property {boolean} [checked] - Controlled state\n * @property {boolean} [defaultChecked] - Uncontrolled state\n * @property {Function} [onChange] - Callback when radio is changed\n * @property {ReactElement | string} [label] - Label for Radio\n * @property {boolean} [error] - Error state for the radio\n * @property {object} [icons] - Icon overrides for checked and unchecked states\n * @property {string} [description] - Description text to display below the radio\n * @property {string} [aria-label] - Accessible label for the radio\n * @property {string} [aria-labelledby] - ID of element that labels the radio\n * @property {string} [name] - Name attribute for the radio\n * @property {string} [data-tracking-id] - Custom tracking ID for analytics\n * @extends DataTrackingId\n */\nexport type RadioProps = Omit<CoreRadioProps, \"hideRadio\"> & DataTrackingId;\n\nconst RadioElement = forwardRef(\n (props: RadioProps, ref: Ref<HTMLInputElement>) => {\n const data = {\n label: childrenToString(props.label),\n ariaLabel: props[\"aria-label\"],\n ariaLabelledBy: props[\"aria-labelledby\"],\n name: props.name,\n value: props.value,\n };\n\n const trackingId = useTrackingId({\n name: \"Radio\",\n data,\n hasOverride: !!props[\"data-tracking-id\"],\n });\n return <CoreRadio ref={ref} data-tracking-id={trackingId} {...props} />;\n },\n);\n\nRadioElement.displayName = CoreRadio.displayName;\n\n/**\n * Radio component for single selection from a group of options.\n *\n * Features:\n * - Supports both controlled and uncontrolled modes\n * - Customizable icons for checked and unchecked states\n * - Error state with visual indicators\n * - Description text support\n * - Accessibility support with proper ARIA attributes\n * - Layout utility props for positioning and spacing\n * - Flexible labeling options\n * - Group support via Radio.Group\n * - Automatic tracking ID generation for analytics\n *\n * @example\n * <Radio\n * label=\"Option 1\"\n * value=\"option1\"\n * checked={selectedValue === \"option1\"}\n * onChange={(e, state) => setSelectedValue(state?.value)}\n * />\n *\n * @example\n * <Radio\n * label=\"Custom styled option\"\n * value=\"custom\"\n * icons={{\n * checked: CustomCheckedIcon,\n * unchecked: CustomUncheckedIcon\n * }}\n * description=\"This option has custom styling\"\n * />\n *\n * @example\n * <Radio.Group legend=\"Choose your preference\" required>\n * <Radio label=\"Option A\" value=\"a\" />\n * <Radio label=\"Option B\" value=\"b\" />\n * <Radio label=\"Option C\" value=\"c\" />\n * </Radio.Group>\n */\nexport const Radio = Object.assign(RadioElement, {\n /**\n * RadioGroup component for grouping related radio options.\n *\n * Features:\n * - Groups multiple radio options together\n * - Legend support for group labeling\n * - Required field indication\n * - Accessibility support with proper fieldset semantics\n * - Layout utility props for positioning and spacing\n * - Focus and blur event handling\n * - More info support for additional context\n * - Automatic alignment based on flex direction\n *\n * @example\n * <RadioGroup legend=\"Choose your preference\" required>\n * <Radio label=\"Option A\" value=\"a\" />\n * <Radio label=\"Option B\" value=\"b\" />\n * <Radio label=\"Option C\" value=\"c\" />\n * </RadioGroup>\n *\n * @example\n * <RadioGroup\n * legend=\"Horizontal layout\"\n * flexDirection=\"row\"\n * gap=\"4\"\n * >\n * <Radio label=\"Yes\" value=\"yes\" />\n * <Radio label=\"No\" value=\"no\" />\n * </RadioGroup>\n */\n Group: RadioGroup,\n});\n"],"names":["CoreRadio"],"mappings":";;;;;;AA2BA,MAAM,YAAA,GAAe,UAAA;AAAA,EACnB,CAAC,OAAmB,GAAA,KAA+B;AACjD,IAAA,MAAM,IAAA,GAAO;AAAA,MACX,KAAA,EAAO,gBAAA,CAAiB,KAAA,CAAM,KAAK,CAAA;AAAA,MACnC,SAAA,EAAW,MAAM,YAAY,CAAA;AAAA,MAC7B,cAAA,EAAgB,MAAM,iBAAiB,CAAA;AAAA,MACvC,MAAM,KAAA,CAAM,IAAA;AAAA,MACZ,OAAO,KAAA,CAAM;AAAA,KACf;AAEA,IAAA,MAAM,aAAa,aAAA,CAAc;AAAA,MAC/B,IAAA,EAAM,OAAA;AAAA,MACN,IAAA;AAAA,MACA,WAAA,EAAa,CAAC,CAAC,KAAA,CAAM,kBAAkB;AAAA,KACxC,CAAA;AACD,IAAA,2BAAQA,OAAA,EAAA,EAAU,GAAA,EAAU,kBAAA,EAAkB,UAAA,EAAa,GAAG,KAAA,EAAO,CAAA;AAAA,EACvE;AACF,CAAA;AAEA,YAAA,CAAa,cAAcA,OAAA,CAAU,WAAA;AA0C9B,MAAM,KAAA,GAAQ,MAAA,CAAO,MAAA,CAAO,YAAA,EAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA+B/C,KAAA,EAAO;AACT,CAAC;;;;"}
1
+ {"version":3,"file":"Radio-Cds2laHA.js","sources":["../src/components/Radio/Radio.tsx"],"sourcesContent":["import { Ref, forwardRef } from \"react\";\nimport {\n RadioProps as CoreRadioProps,\n Radio as CoreRadio,\n} from \"./internal/Radio\";\nimport { RadioGroup } from \"./RadioGroup\";\nimport { useTrackingId } from \"../../hooks\";\nimport { DataTrackingId } from \"../../types\";\nimport { childrenToString } from \"../../internal/functions\";\n\n/**\n * Props for the Radio component\n * @property {boolean} [checked] - Controlled state\n * @property {boolean} [defaultChecked] - Uncontrolled state\n * @property {Function} [onChange] - Callback when radio is changed\n * @property {ReactElement | string} [label] - Label for Radio\n * @property {boolean} [error] - Error state for the radio\n * @property {object} [icons] - Icon overrides for checked and unchecked states\n * @property {string} [description] - Description text to display below the radio\n * @property {string} [aria-label] - Accessible label for the radio\n * @property {string} [aria-labelledby] - ID of element that labels the radio\n * @property {string} [name] - Name attribute for the radio\n * @property {string} [data-tracking-id] - Custom tracking ID for analytics\n * @extends DataTrackingId\n */\nexport type RadioProps = Omit<CoreRadioProps, \"hideRadio\"> & DataTrackingId;\n\nconst RadioElement = forwardRef(\n (props: RadioProps, ref: Ref<HTMLInputElement>) => {\n const data = {\n label: childrenToString(props.label),\n ariaLabel: props[\"aria-label\"],\n ariaLabelledBy: props[\"aria-labelledby\"],\n name: props.name,\n value: props.value,\n };\n\n const trackingId = useTrackingId({\n name: \"Radio\",\n data,\n hasOverride: !!props[\"data-tracking-id\"],\n });\n return <CoreRadio ref={ref} data-tracking-id={trackingId} {...props} />;\n },\n);\n\nRadioElement.displayName = CoreRadio.displayName;\n\n/**\n * Radio component for single selection from a group of options.\n *\n * Features:\n * - Supports both controlled and uncontrolled modes\n * - Customizable icons for checked and unchecked states\n * - Error state with visual indicators\n * - Description text support\n * - Accessibility support with proper ARIA attributes\n * - Layout utility props for positioning and spacing\n * - Flexible labeling options\n * - Group support via Radio.Group\n * - Automatic tracking ID generation for analytics\n *\n * @example\n * <Radio\n * label=\"Option 1\"\n * value=\"option1\"\n * checked={selectedValue === \"option1\"}\n * onChange={(e, state) => setSelectedValue(state?.value)}\n * />\n *\n * @example\n * <Radio\n * label=\"Custom styled option\"\n * value=\"custom\"\n * icons={{\n * checked: CustomCheckedIcon,\n * unchecked: CustomUncheckedIcon\n * }}\n * description=\"This option has custom styling\"\n * />\n *\n * @example\n * <Radio.Group legend=\"Choose your preference\" required>\n * <Radio label=\"Option A\" value=\"a\" />\n * <Radio label=\"Option B\" value=\"b\" />\n * <Radio label=\"Option C\" value=\"c\" />\n * </Radio.Group>\n */\nexport const Radio = Object.assign(RadioElement, {\n /**\n * RadioGroup component for grouping related radio options.\n *\n * Features:\n * - Groups multiple radio options together\n * - Legend support for group labeling\n * - Required field indication\n * - Accessibility support with proper fieldset semantics\n * - Layout utility props for positioning and spacing\n * - Focus and blur event handling\n * - More info support for additional context\n * - Automatic alignment based on flex direction\n *\n * @example\n * <RadioGroup legend=\"Choose your preference\" required>\n * <Radio label=\"Option A\" value=\"a\" />\n * <Radio label=\"Option B\" value=\"b\" />\n * <Radio label=\"Option C\" value=\"c\" />\n * </RadioGroup>\n *\n * @example\n * <RadioGroup\n * legend=\"Horizontal layout\"\n * flexDirection=\"row\"\n * gap=\"4\"\n * >\n * <Radio label=\"Yes\" value=\"yes\" />\n * <Radio label=\"No\" value=\"no\" />\n * </RadioGroup>\n */\n Group: RadioGroup,\n});\n"],"names":["CoreRadio"],"mappings":";;;;;;AA2BA,MAAM,YAAA,GAAe,UAAA;AAAA,EACnB,CAAC,OAAmB,GAAA,KAA+B;AACjD,IAAA,MAAM,IAAA,GAAO;AAAA,MACX,KAAA,EAAO,gBAAA,CAAiB,KAAA,CAAM,KAAK,CAAA;AAAA,MACnC,SAAA,EAAW,MAAM,YAAY,CAAA;AAAA,MAC7B,cAAA,EAAgB,MAAM,iBAAiB,CAAA;AAAA,MACvC,MAAM,KAAA,CAAM,IAAA;AAAA,MACZ,OAAO,KAAA,CAAM;AAAA,KACf;AAEA,IAAA,MAAM,aAAa,aAAA,CAAc;AAAA,MAC/B,IAAA,EAAM,OAAA;AAAA,MACN,IAAA;AAAA,MACA,WAAA,EAAa,CAAC,CAAC,KAAA,CAAM,kBAAkB;AAAA,KACxC,CAAA;AACD,IAAA,2BAAQA,OAAA,EAAA,EAAU,GAAA,EAAU,kBAAA,EAAkB,UAAA,EAAa,GAAG,KAAA,EAAO,CAAA;AAAA,EACvE;AACF,CAAA;AAEA,YAAA,CAAa,cAAcA,OAAA,CAAU,WAAA;AA0C9B,MAAM,KAAA,GAAQ,MAAA,CAAO,MAAA,CAAO,YAAA,EAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA+B/C,KAAA,EAAO;AACT,CAAC;;;;"}
package/dist/Radio.js CHANGED
@@ -1,3 +1,3 @@
1
- export { R as Radio, R as default } from './Radio-jj0-1dOg.js';
2
- export { R as RadioGroup } from './RadioGroup-Bxy415eu.js';
1
+ export { R as Radio, R as default } from './Radio-Cds2laHA.js';
2
+ export { R as RadioGroup } from './RadioGroup-COVlUmwy.js';
3
3
  //# sourceMappingURL=Radio.js.map