@servicetitan/anvil2 2.0.1 → 2.0.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 (47) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/{Combobox-Bb79Jl9I.js → Combobox-OUK7p5gp.js} +2 -2
  3. package/dist/{Combobox-Bb79Jl9I.js.map → Combobox-OUK7p5gp.js.map} +1 -1
  4. package/dist/Combobox.js +1 -1
  5. package/dist/{DataTable-CLr0j95O.js → DataTable-BPJeSvOx.js} +8 -8
  6. package/dist/DataTable-BPJeSvOx.js.map +1 -0
  7. package/dist/{DateFieldRange-BlpxUPPk.js → DateFieldRange-CanMYRgZ.js} +2 -2
  8. package/dist/{DateFieldRange-BlpxUPPk.js.map → DateFieldRange-CanMYRgZ.js.map} +1 -1
  9. package/dist/DateFieldRange.js +1 -1
  10. package/dist/{DateFieldSingle-DanvgyeQ.js → DateFieldSingle-CShe2aHZ.js} +2 -2
  11. package/dist/{DateFieldSingle-DanvgyeQ.js.map → DateFieldSingle-CShe2aHZ.js.map} +1 -1
  12. package/dist/DateFieldSingle.js +1 -1
  13. package/dist/{DateFieldYearless-rUMXjN0L.js → DateFieldYearless-MBQ233Xa.js} +2 -2
  14. package/dist/{DateFieldYearless-rUMXjN0L.js.map → DateFieldYearless-MBQ233Xa.js.map} +1 -1
  15. package/dist/DateFieldYearless.js +1 -1
  16. package/dist/{DateFieldYearlessRange-Cw71mA-Q.js → DateFieldYearlessRange-BBtaFzsE.js} +2 -2
  17. package/dist/{DateFieldYearlessRange-Cw71mA-Q.js.map → DateFieldYearlessRange-BBtaFzsE.js.map} +1 -1
  18. package/dist/DateFieldYearlessRange.js +1 -1
  19. package/dist/{ListView-CBmaHOY-.js → ListView-CRDUPrbQ.js} +11 -9
  20. package/dist/ListView-CRDUPrbQ.js.map +1 -0
  21. package/dist/ListView.js +1 -1
  22. package/dist/{Page-CjuKnpSO.js → Page-C5nExhiH.js} +2 -2
  23. package/dist/{Page-CjuKnpSO.js.map → Page-C5nExhiH.js.map} +1 -1
  24. package/dist/Page.js +1 -1
  25. package/dist/{Popover-U2Eu7v1Q.js → Popover-CJLSDpgR.js} +9 -8
  26. package/dist/Popover-CJLSDpgR.js.map +1 -0
  27. package/dist/Popover.js +1 -1
  28. package/dist/Table.js +1 -1
  29. package/dist/{TimeField-063-mjFa.js → TimeField-BeaCSkdZ.js} +2 -2
  30. package/dist/{TimeField-063-mjFa.js.map → TimeField-BeaCSkdZ.js.map} +1 -1
  31. package/dist/TimeField.js +1 -1
  32. package/dist/{Toolbar-DWeZEpeV.js → Toolbar-Cjo7eAhI.js} +6 -6
  33. package/dist/{Toolbar-DWeZEpeV.js.map → Toolbar-Cjo7eAhI.js.map} +1 -1
  34. package/dist/Toolbar.js +1 -1
  35. package/dist/{YearlessDateInputWithPicker-D6HHhE_H.js → YearlessDateInputWithPicker-BVRZlf9Y.js} +2 -2
  36. package/dist/{YearlessDateInputWithPicker-D6HHhE_H.js.map → YearlessDateInputWithPicker-BVRZlf9Y.js.map} +1 -1
  37. package/dist/beta/components/Table/formatters/dateFormatter.d.ts +1 -1
  38. package/dist/beta/components/Table/formatters/dateTimeFormatter.d.ts +1 -1
  39. package/dist/beta/components/Table/formatters/yearlessDateFormatter.d.ts +2 -2
  40. package/dist/beta.js +2 -2
  41. package/dist/components/Popover/internal/PopoverContext.d.ts +0 -1
  42. package/dist/components/Popover/internal/usePopoverContext.d.ts +0 -1
  43. package/dist/index.js +9 -9
  44. package/package.json +1 -1
  45. package/dist/DataTable-CLr0j95O.js.map +0 -1
  46. package/dist/ListView-CBmaHOY-.js.map +0 -1
  47. package/dist/Popover-U2Eu7v1Q.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"ListView-CBmaHOY-.js","sources":["../src/internal/functions/mapOrder.ts","../src/components/ListView/internal/ListViewContext.ts","../src/components/ListView/ListViewOption.tsx","../src/components/ListView/ListViewOptionCell.tsx","../src/components/ListView/internal/utils.ts","../src/components/ListView/ListView.tsx"],"sourcesContent":["// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function mapOrder(array: any[], order: any[], key: string) {\n array.sort(function (a, b) {\n const A = a[key],\n B = b[key];\n\n if (order.indexOf(A) > order.indexOf(B)) {\n return 1;\n } else {\n return -1;\n }\n });\n\n return array;\n}\n","import { Dispatch, SetStateAction, createContext, useContext } from \"react\";\nimport { Option } from \"./types\";\n\n/**\n * Context properties for the ListView component\n */\nexport type ListViewContextProps = {\n /** Array of option objects for focus management */\n options?: Option[];\n /** Callback when selection changes */\n onSelectionChange?: (value: unknown[]) => void;\n /** Currently selected items */\n selectedItems: unknown[];\n /** Currently indeterminate items */\n indeterminateItems: unknown[];\n /** Array of items if using items prop */\n items?: unknown[];\n /** Function to set the selected items */\n setSelectedItems: Dispatch<\n SetStateAction<ListViewContextProps[\"selectedItems\"]>\n >;\n /** Whether the component is controlled */\n controlled?: boolean;\n};\n\nexport const ListViewContext = createContext<ListViewContextProps | null>(null);\n\n/**\n * Hook to access the listview context\n * @returns The listview context\n * @throws Error if used outside of a ListView component\n */\nexport function useListView() {\n const context = useContext(ListViewContext);\n\n if (context == null) {\n throw new Error(\"useListView must be wrapped in <ListView />\");\n }\n\n return context;\n}\n","import {\n ChangeEvent,\n ComponentPropsWithoutRef,\n forwardRef,\n useEffect,\n useId,\n useMemo,\n useRef,\n} from \"react\";\nimport { Checkbox, CheckboxProps } from \"../Checkbox\";\nimport { useMergeRefs, useTrackingId } from \"../../hooks\";\n\nimport cx from \"classnames\";\nimport styles from \"./ListView.module.scss\";\nimport { CheckboxState } from \"../Checkbox/types\";\nimport { useListView } from \"./internal/ListViewContext\";\nimport { DataTrackingId } from \"../../types\";\n\ntype ItemType = {\n label: string;\n disabled?: boolean;\n [key: string]: unknown;\n};\n\n/**\n * Props for the ListViewOption component\n * @extends ComponentPropsWithoutRef<\"div\">\n */\nexport type ListViewOptionProps = Omit<\n ComponentPropsWithoutRef<\"div\">,\n \"onChange\"\n> & {\n /** Whether the option is disabled */\n disabled?: boolean;\n /** Callback when the option changes */\n onChange?: (e: ChangeEvent<HTMLInputElement>, state?: CheckboxState) => void;\n} & (\n | {\n /** The item object when using items prop */\n item: ItemType;\n }\n | {\n /** The display label for the option */\n label: string;\n }\n ) &\n DataTrackingId;\n\n/**\n * ListViewOption component for individual selectable items within a listview.\n *\n * Features:\n * - Displays selectable options with proper ARIA attributes\n * - Supports disabled state for non-selectable options\n * - Keyboard navigation support\n * - Accessible with screen reader support\n *\n * @example\n * <ListView.Option item={{ label: \"Option 1\" }} />\n */\nexport const ListViewOption = forwardRef<HTMLDivElement, ListViewOptionProps>(\n (props, ref) => {\n const {\n className,\n children,\n onChange,\n style,\n disabled: disabledProp,\n ...remainingProps\n } = props;\n\n const optionRef = useRef<HTMLDivElement>(null);\n const mergedRef = useMergeRefs([ref, optionRef]);\n\n const cellRef = useRef<HTMLDivElement>(null);\n const rowId = useId();\n const {\n selectedItems,\n setSelectedItems,\n indeterminateItems,\n controlled,\n onSelectionChange,\n } = useListView();\n const disabled =\n \"item\" in remainingProps\n ? disabledProp || remainingProps.item.disabled\n : disabledProp;\n\n useEffect(() => {\n const focusables = optionRef.current?.querySelectorAll(\n \"button:not(:disabled):not([aria-disabled='true']), input:not(:disabled):not([aria-disabled='true']), [tabindex='0']:not(:disabled):not([aria-disabled='true'])\",\n );\n focusables?.forEach((item, i) => {\n item.setAttribute(\"tabindex\", \"-1\");\n if (item.hasAttribute(\"id\")) return;\n item.setAttribute(\"id\", `${rowId}-${i}`);\n });\n }, [rowId]);\n\n const label =\n \"item\" in remainingProps\n ? remainingProps.item.label\n : remainingProps.label;\n\n const isSelected = useMemo(\n () => matchInArray(label, selectedItems),\n [selectedItems, label],\n );\n\n const isIndeterminate = useMemo(\n () => matchInArray(label, indeterminateItems),\n [indeterminateItems, label],\n );\n\n const onChangeHandler: CheckboxProps[\"onChange\"] = (e) => {\n onChange?.(e, { checked: isSelected });\n };\n\n const onClickHandler: CheckboxProps[\"onClick\"] = () => {\n updateSelectedItems();\n };\n\n const removeItemFromSelectedItems = (itemLabelToRemove: string) => {\n return (selectedItems as (ItemType | string)[]).filter(\n (potentialRemove) => {\n if (typeof potentialRemove === \"string\") {\n return potentialRemove !== itemLabelToRemove;\n }\n return potentialRemove.label !== itemLabelToRemove;\n },\n );\n };\n\n const addItemFromSelectedItems = (itemToAdd: ItemType | string) => {\n return [...selectedItems, itemToAdd];\n };\n\n function updateSelectedItems() {\n const isPartOfSelectedItems = matchInArray(label, selectedItems);\n const callback = controlled ? onSelectionChange : setSelectedItems;\n if (isPartOfSelectedItems) {\n callback?.(removeItemFromSelectedItems(label));\n } else {\n callback?.(\n addItemFromSelectedItems(\n \"item\" in remainingProps\n ? remainingProps.item\n : remainingProps.label,\n ),\n );\n }\n }\n\n const data = {\n label: \"item\" in props ? props.item?.label : props.label,\n };\n\n const trackingId = useTrackingId({\n name: \"ListViewOption\",\n data,\n hasOverride: !!props[\"data-tracking-id\"],\n });\n\n const {\n item: _item,\n label: _label,\n ...forwardedProps\n } = remainingProps as {\n // This is to satisfy the type checker and allow us to destructure the item and label props which \"could\" exist.\n // We're destructuring them because we don't want to forward them to the div element.\n item: ItemType;\n label: string;\n };\n\n return (\n <div\n data-tracking-id={trackingId}\n className={cx([styles[\"listview-option\"]], className)}\n data-anv=\"listview-option\"\n style={style}\n ref={mergedRef}\n aria-disabled={disabled}\n aria-selected={isSelected}\n aria-label={label ?? \"Select\"}\n role=\"row\"\n {...forwardedProps}\n >\n <div className={styles[\"cell\"]} ref={cellRef} role=\"gridcell\">\n <Checkbox\n disabled={disabled}\n checked={isIndeterminate ? undefined : isSelected}\n indeterminate={isIndeterminate}\n aria-label={label ?? \"Select\"}\n onChange={onChangeHandler}\n onClick={onClickHandler}\n />\n </div>\n {children}\n </div>\n );\n },\n);\n\nListViewOption.displayName = \"ListViewOption\";\n\n/**\n * Helper function to check if a list view option item is in an array (e.g. selected items or indeterminate items)\n * @param itemLabel - The label of the item to check if it is in the array\n * @param array - The array to check if the item is in\n * @returns True if the item is in the array, false otherwise\n */\nfunction matchInArray(\n itemLabel: string,\n array: (ItemType | unknown)[],\n): boolean {\n return array.some(\n (i) => itemLabel === i || itemLabel === (i as ItemType).label,\n );\n}\n","import { ComponentPropsWithoutRef, forwardRef } from \"react\";\n\n/**\n * ListViewOptionCell component for rendering a cell within a listview option.\n *\n * Features:\n * - Renders a grid cell for option content\n * - Supports custom content and layout\n * - Accessible with proper ARIA attributes\n *\n * @example\n * <ListView.OptionCell>Custom cell content</ListView.OptionCell>\n */\nexport const ListViewOptionCell = forwardRef<\n HTMLDivElement,\n ComponentPropsWithoutRef<\"div\">\n>((props, ref) => {\n const { ...rest } = props;\n return (\n <div role=\"gridcell\" data-anv=\"listview-option-cell\" {...rest} ref={ref} />\n );\n});\n\nListViewOptionCell.displayName = \"ListViewOptionCell\";\n","import { Dispatch, KeyboardEvent, SetStateAction } from \"react\";\nimport { FocusedItem, Option } from \"./types\";\nimport { getActiveElement } from \"../../../internal/functions\";\n\nexport const listViewKeyboardNavigation = (\n e: KeyboardEvent<HTMLDivElement>,\n options: Option[],\n focusedItem: FocusedItem,\n setFocusedItem: Dispatch<SetStateAction<FocusedItem>>,\n parent: HTMLDivElement | null,\n currentFocusId: (id: string) => void,\n) => {\n if (!options) return;\n let activeElement: HTMLElement | null;\n switch (e.code) {\n case \"Enter\":\n case \"Space\":\n (\n options[focusedItem.row].focusables[focusedItem.col] as HTMLElement\n ).click();\n activeElement = getActiveElement(document);\n if (!activeElement) break;\n activeElement.click();\n e.preventDefault();\n break;\n case \"ArrowDown\":\n parent?.focus();\n options[focusedItem.row].focusables[focusedItem.col].removeAttribute(\n \"data-interactive\",\n );\n if (focusedItem.row === options.length - 1) {\n options[0].focusables[focusedItem.col].setAttribute(\n \"data-interactive\",\n \"focus-visible\",\n );\n currentFocusId(options[0].focusables[focusedItem.col].id);\n setFocusedItem((prev) => {\n return { ...prev, row: 0 };\n });\n break;\n }\n\n options[focusedItem.row + 1].focusables[focusedItem.col].setAttribute(\n \"data-interactive\",\n \"focus-visible\",\n );\n currentFocusId(\n options[focusedItem.row + 1].focusables[focusedItem.col].id,\n );\n setFocusedItem((prev) => {\n return { ...prev, row: focusedItem.row + 1 };\n });\n break;\n case \"ArrowUp\":\n parent?.focus();\n options[focusedItem.row].focusables[focusedItem.col].removeAttribute(\n \"data-interactive\",\n );\n if (focusedItem.row === 0) {\n options[options.length - 1].focusables[focusedItem.col].setAttribute(\n \"data-interactive\",\n \"focus-visible\",\n );\n currentFocusId(\n options[options.length - 1].focusables[focusedItem.col].id,\n );\n setFocusedItem((prev) => {\n return { ...prev, row: options.length - 1 };\n });\n break;\n }\n\n options[focusedItem.row - 1].focusables[focusedItem.col].setAttribute(\n \"data-interactive\",\n \"focus-visible\",\n );\n currentFocusId(\n options[focusedItem.row - 1].focusables[focusedItem.col].id,\n );\n setFocusedItem((prev) => {\n return { ...prev, row: focusedItem.row - 1 };\n });\n break;\n case \"ArrowRight\":\n parent?.focus();\n options[focusedItem.row].focusables[focusedItem.col].removeAttribute(\n \"data-interactive\",\n );\n if (focusedItem.col === options[focusedItem.row].focusables.length - 1) {\n options[focusedItem.row].focusables[0].setAttribute(\n \"data-interactive\",\n \"focus-visible\",\n );\n currentFocusId(options[focusedItem.row].focusables[0].id);\n setFocusedItem((prev) => {\n return {\n ...prev,\n col: 0,\n };\n });\n break;\n }\n\n options[focusedItem.row].focusables[focusedItem.col + 1].setAttribute(\n \"data-interactive\",\n \"focus-visible\",\n );\n currentFocusId(\n options[focusedItem.row].focusables[focusedItem.col + 1].id,\n );\n setFocusedItem((prev) => {\n return { ...prev, col: focusedItem.col + 1 };\n });\n break;\n case \"ArrowLeft\":\n parent?.focus();\n options[focusedItem.row].focusables[focusedItem.col].removeAttribute(\n \"data-interactive\",\n );\n if (focusedItem.col === 0) {\n options[focusedItem.row].focusables[\n options[focusedItem.row].focusables.length - 1\n ].setAttribute(\"data-interactive\", \"focus-visible\");\n currentFocusId(\n options[focusedItem.row].focusables[\n options[focusedItem.row].focusables.length - 1\n ].id,\n );\n setFocusedItem((prev) => {\n return {\n ...prev,\n col: options[focusedItem.row].focusables.length - 1,\n };\n });\n break;\n }\n\n options[focusedItem.row].focusables[focusedItem.col - 1].setAttribute(\n \"data-interactive\",\n \"focus-visible\",\n );\n currentFocusId(\n options[focusedItem.row].focusables[focusedItem.col - 1].id,\n );\n setFocusedItem((prev) => {\n return { ...prev, col: focusedItem.col - 1 };\n });\n break;\n\n default:\n break;\n }\n};\n\nexport const getFocusables = (el: Element) => {\n return el.querySelectorAll(\n \"button:not(:disabled):not([aria-disabled='true']), input:not(:disabled):not([aria-disabled='true']), [tabindex='0']:not(:disabled):not([aria-disabled='true'])\",\n );\n};\n","import {\n KeyboardEvent,\n MouseEvent,\n ReactNode,\n Ref,\n forwardRef,\n useEffect,\n useRef,\n useState,\n} from \"react\";\nimport { LayoutUtilProps } from \"../../types\";\nimport {\n FocusedItem,\n ItemType,\n ListViewWithItems,\n ListViewWithOutItems,\n Option,\n} from \"./internal/types\";\nimport { ListViewOption } from \"./ListViewOption\";\nimport { ListViewOptionCell } from \"./ListViewOptionCell\";\nimport { useLayoutPropsUtil } from \"../../internal/hooks\";\nimport { useMergeRefs } from \"../../hooks\";\nimport { getFocusables, listViewKeyboardNavigation } from \"./internal/utils\";\nimport { mapOrder } from \"../../internal/functions\";\nimport { ListViewContext } from \"./internal/ListViewContext\";\n\nimport cx from \"classnames\";\nimport styles from \"./ListView.module.scss\";\n\n/**\n * Props for the ListView component\n * @template T - The type of additional properties for items\n * @extends LayoutUtilProps\n */\nexport type ListViewProps<T> = LayoutUtilProps &\n (ListViewWithItems<T> | ListViewWithOutItems);\n\nconst ListViewElement = function <T>(\n props: ListViewProps<T>,\n ref: Ref<HTMLDivElement>,\n) {\n const { layoutStyles, componentProps } = useLayoutPropsUtil(props);\n const {\n indeterminate,\n onSelectionChange,\n className,\n selected,\n defaultSelected,\n style,\n onKeyDown,\n ...remainingProps\n } = componentProps;\n\n const ListViewRef = useRef<HTMLDivElement>(null);\n const isFocusVisible = useRef(true);\n const combinedRef = useMergeRefs([ref, ListViewRef]);\n const [options, setOptions] = useState<Option[]>();\n const [currentActive, setCurrentActive] = useState<string>();\n const [selectedItems, setSelectedItems] = useState<unknown[]>(\n selected ?? defaultSelected ?? [],\n );\n const [focusedItem, setFocusedItem] = useState<FocusedItem>({\n row: 0,\n col: 0,\n });\n\n const styleCombined = {\n ...style,\n ...layoutStyles,\n };\n\n const onFocusHandler = () => {\n if (!isFocusVisible.current) return;\n if (!options) return;\n options[focusedItem.row].focusables[focusedItem.col].setAttribute(\n \"data-interactive\",\n \"focus-visible\",\n );\n return;\n };\n const onBlurHandler = () => {\n if (!options) return;\n options[focusedItem.row].focusables[focusedItem.col]?.removeAttribute(\n \"data-interactive\",\n );\n return;\n };\n\n const onKeyDownHandler = (e: KeyboardEvent<HTMLDivElement>) => {\n onKeyDown?.(e);\n if (!options) return;\n isFocusVisible.current = true;\n listViewKeyboardNavigation(\n e,\n options,\n focusedItem,\n setFocusedItem,\n ListViewRef.current,\n (id) => setCurrentActive(id),\n );\n };\n\n const onMouseDownHandler = (e: MouseEvent<HTMLDivElement>) => {\n isFocusVisible.current = false;\n if (options && ListViewRef.current) {\n options[focusedItem.row].focusables[focusedItem.col]?.removeAttribute(\n \"data-interactive\",\n );\n\n const closestFocusable = (e.target as HTMLElement).closest(\n \"button:not(:disabled):not([aria-disabled='true']), input:not(:disabled):not([aria-disabled='true']), [data-anv='checkbox']\",\n );\n\n const optionRow = (e.target as HTMLElement).closest(\n '[data-anv=\"listview-option\"]',\n );\n if (!optionRow || optionRow.ariaDisabled) return;\n const row = options.findIndex((option) => option.node === optionRow);\n if (!closestFocusable) {\n (options[row].focusables[0] as HTMLElement).click();\n return;\n }\n const col = Array.prototype.indexOf.call(\n options[row].focusables,\n closestFocusable?.getAttribute(\"data-anv\") === \"checkbox\"\n ? closestFocusable.children[0]\n : closestFocusable,\n );\n setFocusedItem({ row, col });\n }\n };\n\n useEffect(() => {\n if (!ListViewRef.current) return;\n const optionArr = ListViewRef.current.querySelectorAll<HTMLDivElement>(\n \"div[data-anv='listview-option']:not([aria-disabled='true'])\",\n );\n const makeTree = Array.from(optionArr).map((option) => {\n const childFocusables = getFocusables(option);\n return {\n node: option,\n focusables: childFocusables,\n };\n });\n setOptions(makeTree);\n }, [props.children]);\n\n const prevSelectedItems = useRef<unknown[]>(\n selected ?? defaultSelected ?? [],\n );\n useEffect(() => {\n if (!options) return;\n const compareArr = options.map((option) => option.node.ariaLabel);\n const orderedSelectedItems = mapOrder(selectedItems, compareArr, \"label\");\n if (\n JSON.stringify(prevSelectedItems.current) ===\n JSON.stringify(orderedSelectedItems)\n )\n return;\n\n onSelectionChange?.(orderedSelectedItems);\n prevSelectedItems.current = orderedSelectedItems;\n }, [onSelectionChange, options, selectedItems]);\n\n useEffect(() => {\n if (!selected) return;\n\n // Helper to extract label from either string or ItemType\n const getLabel = (item: unknown): string =>\n typeof item === \"string\" ? item : (item as ItemType<T>).label;\n\n const filterDuplicates = (selected as unknown[]).reduce<unknown[]>(\n (acc, current) => {\n const currentLabel = getLabel(current);\n const isDup = acc.find((item) => getLabel(item) === currentLabel);\n if (!isDup) {\n return [...acc, current];\n } else {\n return acc;\n }\n },\n [],\n );\n\n if (!options) return;\n const compareArr = options.map((option) => option.node.ariaLabel);\n const orderedSelected = mapOrder(filterDuplicates, compareArr, \"label\");\n if (\n JSON.stringify(prevSelectedItems.current) ===\n JSON.stringify(orderedSelected)\n )\n return;\n setSelectedItems(orderedSelected);\n prevSelectedItems.current = orderedSelected;\n }, [onSelectionChange, options, selected]);\n\n const ListViewClassNames = cx([styles[\"listview\"]], className);\n\n if (remainingProps.items !== undefined) {\n const { children, items, ...rest } = remainingProps as Omit<\n ListViewWithItems<T>,\n keyof LayoutUtilProps\n >;\n const renderChildren = children as\n | (({ items }: { items: ItemType<T>[] }) => ReactNode)\n | undefined;\n return (\n <ListViewContext.Provider\n value={{\n options,\n onSelectionChange: onSelectionChange as\n | ((value: unknown[]) => void)\n | undefined,\n indeterminateItems: indeterminate ?? [],\n selectedItems,\n setSelectedItems,\n items,\n controlled: !!selected,\n }}\n >\n <div\n ref={combinedRef}\n className={ListViewClassNames}\n style={styleCombined}\n data-anv=\"listview\"\n role=\"grid\"\n aria-multiselectable=\"true\"\n onFocus={onFocusHandler}\n onBlur={onBlurHandler}\n onKeyDown={onKeyDownHandler}\n onMouseDown={onMouseDownHandler}\n aria-activedescendant={currentActive}\n tabIndex={0}\n {...rest}\n >\n {renderChildren?.({\n items: items.map((item: ItemType<T>) => {\n return item;\n }),\n })}\n </div>\n </ListViewContext.Provider>\n );\n }\n\n const { children, ...rest } = remainingProps;\n return (\n <ListViewContext.Provider\n value={{\n options,\n onSelectionChange: onSelectionChange as\n | ((value: unknown[]) => void)\n | undefined,\n selectedItems,\n indeterminateItems: indeterminate ?? [],\n setSelectedItems,\n controlled: !!selected || !!indeterminate,\n }}\n >\n <div\n ref={combinedRef}\n className={ListViewClassNames}\n style={styleCombined}\n data-anv=\"listview\"\n role=\"grid\"\n onFocus={onFocusHandler}\n onBlur={onBlurHandler}\n onKeyDown={onKeyDownHandler}\n onMouseDown={onMouseDownHandler}\n aria-activedescendant={currentActive}\n tabIndex={0}\n {...rest}\n >\n {children}\n </div>\n </ListViewContext.Provider>\n );\n};\n\nListViewElement.displayName = \"ListView\";\n\n/**\n * ListView component for displaying a list of selectable items in a grid layout.\n *\n * Features:\n * - Supports single and multiple selection modes\n * - Keyboard navigation with arrow keys\n * - Customizable item rendering\n * - Controlled and uncontrolled modes\n * - Accessible with proper ARIA attributes\n * - Focus management for interactive elements\n * - Layout utilities for positioning and spacing\n * - Automatic tracking ID generation for analytics\n *\n * @example\n * <ListView items={[{ label: \"Item 1\" }, { label: \"Item 2\" }]} onSelectionChange={handleSelection}>\n * {({ items }) => items.map(item => (\n * <ListView.Option key={item.label} item={item} />\n * ))}\n * </ListView>\n */\nexport const ListView = Object.assign(\n forwardRef(ListViewElement) as <T>(\n props: ListViewProps<T> & { ref?: React.ForwardedRef<HTMLUListElement> },\n ) => ReturnType<typeof ListViewElement>,\n {\n /**\n * ListViewOption component for individual selectable items within a listview.\n *\n * Features:\n * - Displays selectable options with proper ARIA attributes\n * - Supports disabled state for non-selectable options\n * - Keyboard navigation support\n * - Accessible with screen reader support\n * - Automatic tracking ID generation for analytics\n *\n * @example\n * <ListView.Option item={{ label: \"Option 1\" }} />\n */\n Option: ListViewOption,\n /**\n * ListViewOptionCell component for rendering a cell within a listview option.\n *\n * Features:\n * - Renders a grid cell for option content\n * - Supports custom content and layout\n * - Accessible with proper ARIA attributes\n *\n * @example\n * <ListView.OptionCell>Custom cell content</ListView.OptionCell>\n */\n OptionCell: ListViewOptionCell,\n },\n);\n"],"names":["styles","children","rest"],"mappings":";;;;;;;;;;AACO,SAAS,QAAA,CAAS,KAAA,EAAc,KAAA,EAAc,GAAA,EAAa;AAChE,EAAA,KAAA,CAAM,IAAA,CAAK,SAAU,CAAA,EAAG,CAAA,EAAG;AACzB,IAAA,MAAM,IAAI,CAAA,CAAE,GAAG,CAAA,EACb,CAAA,GAAI,EAAE,GAAG,CAAA;AAEX,IAAA,IAAI,MAAM,OAAA,CAAQ,CAAC,IAAI,KAAA,CAAM,OAAA,CAAQ,CAAC,CAAA,EAAG;AACvC,MAAA,OAAO,CAAA;AAAA,IACT,CAAA,MAAO;AACL,MAAA,OAAO,EAAA;AAAA,IACT;AAAA,EACF,CAAC,CAAA;AAED,EAAA,OAAO,KAAA;AACT;;ACWO,MAAM,eAAA,GAAkB,cAA2C,IAAI,CAAA;AAOvE,SAAS,WAAA,GAAc;AAC5B,EAAA,MAAM,OAAA,GAAU,WAAW,eAAe,CAAA;AAE1C,EAAA,IAAI,WAAW,IAAA,EAAM;AACnB,IAAA,MAAM,IAAI,MAAM,6CAA6C,CAAA;AAAA,EAC/D;AAEA,EAAA,OAAO,OAAA;AACT;;ACoBO,MAAM,cAAA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SAAA,EAAW,kBAAA;AAAA,UACX,KAAA,EAAO,aAAA;AAAA,UACP,UAAA,EAAS,UAAA;AAAA,UACT,IAAA,EAAK,MAAA;AAAA,UACL,OAAA,EAAS,cAAA;AAAA,UACT,MAAA,EAAQ,aAAA;AAAA,UACR,SAAA,EAAW,gBAAA;AAAA,UACX,WAAA,EAAa,kBAAA;AAAA,UACb,uBAAA,EAAuB,aAAA;AAAA,UACvB,QAAA,EAAU,CAAA;AAAA,UACT,GAAG,IAAA;AAAA,UAEH;AAAA;AAAA;AACH;AAAA,GACF;AAEJ,CAAA;AAEA,eAAA,CAAgB,WAAA,GAAc,UAAA;AAsBvB,MAAM,WAAW,MAAA,CAAO,MAAA;AAAA,EAC7B,WAAW,eAAe,CAAA;AAAA,EAG1B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAcE,MAAA,EAAQ,cAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAYR,UAAA,EAAY;AAAA;AAEhB;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Popover-U2Eu7v1Q.js","sources":["../src/internal/hooks/usePopoverTransitionStates/usePopoverTransitionStates.ts","../src/components/Popover/internal/PopoverContext.ts","../src/components/Popover/internal/usePopoverContext.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 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 disableTriggerFocus: context.disableTriggerFocus,\n triggerHovered: context.triggerHovered,\n setTriggerHovered: context.setTriggerHovered,\n contentHovered: context.contentHovered,\n setContentHovered: context.setContentHovered,\n };\n}\n","import { forwardRef } from \"react\";\n\nimport { Button, ButtonProps } from \"../Button\";\nimport { usePopoverContext } from \"./internal/usePopoverContext\";\nimport { childrenToString } from \"../../internal/functions\";\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 * - 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 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 { 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 * - 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 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 { 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 * - 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 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 { usePopoverContext } from \"./internal/usePopoverContext\";\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\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 * - 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 (!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 { safeHidePopover, safeShowPopover } from \"../../internal/functions\";\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} [onClickOutside] - 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 * 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 * 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} & 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 disableTriggerFocus,\n modal,\n noPadding,\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 }, [popover, rootNode, popoverId, 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\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 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 },\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 disableTriggerFocus,\n disableCloseOnEscape,\n noPadding,\n controlled: isControlled,\n modal: modal,\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 disableTriggerFocus,\n disableCloseOnEscape,\n noPadding,\n isControlled,\n modal,\n rootNode,\n delay,\n triggerHovered,\n setTriggerHovered,\n contentHovered,\n setContentHovered,\n ]);\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 * - 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 * - 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 * - 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 * - 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 * - 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":["PopoverClose","PopoverButton","PopoverContent","arrow","placement","x","y"],"mappings":";;;;;;;;;;;;;;AA6BO,MAAM,6BAA6B,CACxC,OAAA,EACA,QAAA,EACA,OAAA,GAA2C,EAAC,KACzC;AACH,EAAA,MAAM,EAAE,oBA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