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G,KAAK;QACR,kBAAkB;QAClB,QAAQ;uBACN;4BACA;YACA,6CAA6C;YAC7C,SAAS,CAAA,GAAA,iDAAS,EAAE,CAAC;wBACrB;uBACA;mBACA;QACF;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,6CAAa,EAAE,YAAY;QAAC,QAAQ;IAAI;IACvD,OAAO,SAAS,EAAE;IAElB,IAAI,WAAW,aACX,CAAA,GAAA,qCAAS,EAAE,UAAU,eAAe,YAAY,eAChD,CAAA,GAAA,qCAAS,EAAE,UAAU;IAEzB,qBACE,0DAAC,CAAA,GAAA,6BAAE,EAAE,GAAG;QACL,GAAG,QAAQ;QACZ,KAAK;QACL,gBAAc,aAAa;QAC3B,sBAAoB,kBAAkB;QACtC,aAAa;QACb,OAAO,CAAA,GAAA,iDAAS,EAAE,CAAC,cAAc,MAAM,KAAK;QAC5C,cAAY,CAAC,aAAa,SAAS;QACnC,iBAAe,cAAc;QAC7B,gBAAc,aAAa;qBAC3B,0DAAC,CAAA,GAAA,kCAAO;QACN,QAAQ;YACN;gBAAC;gBAAa;aAAK;YACnB;gBAAC;gBAAqB;aAAK;SAC5B;qBACD,0DAAC,CAAA,GAAA,mDAAwB,EAAE,QAAQ;QAAC,OAAO,CAAA,GAAA,mDAAwB;OAChE,YAAY,QAAQ;AAK/B","sources":["packages/react-aria-components/src/Tabs.tsx"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaLabelingProps, FocusEvents, forwardRefType, GlobalDOMAttributes, HoverEvents, Key, LinkDOMProps, PressEvents, RefObject} from '@react-types/shared';\nimport {AriaTabListProps, AriaTabPanelProps, useTab, useTabList, useTabPanel} from 'react-aria/useTabList';\nimport {ClassNameOrFunction, ContextValue, dom, DOMRenderProps, PossibleLinkDOMRenderProps, Provider, RenderProps, SlotProps, StyleProps, StyleRenderProps, useContextProps, useRenderProps, useSlottedContext} from './utils';\nimport {Collection} from 'react-aria/Collection';\nimport {CollectionBuilder, createLeafComponent} from 'react-aria/CollectionBuilder';\nimport {CollectionNode} from 'react-aria/private/collections/BaseCollection';\nimport {CollectionProps, CollectionRendererContext, DefaultCollectionRenderer, usePersistedKeys} from './Collection';\nimport {createHideableComponent} from 'react-aria/private/collections/Hidden';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {Collection as ICollection, Node} from '@react-types/shared';\nimport {inertValue} from 'react-aria/private/utils/inertValue';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport {Orientation} from '@react-types/shared';\nimport React, {createContext, ForwardedRef, forwardRef, JSX, useContext, useMemo, useRef, useState} from 'react';\nimport {SelectionIndicatorContext} from './SelectionIndicator';\nimport {SharedElementTransition} from './SharedElementTransition';\nimport {TabListState, useTabListState} from 'react-stately/useTabListState';\nimport {useEnterAnimation, useExitAnimation} from 'react-aria/private/utils/animation';\nimport {useFocusRing} from 'react-aria/useFocusRing';\nimport {useHover} from 'react-aria/useHover';\nimport {useLayoutEffect} from 'react-aria/private/utils/useLayoutEffect';\nimport {useObjectRef} from 'react-aria/useObjectRef';\n\nexport interface TabsProps extends Omit<AriaTabListProps<any>, 'items' | 'children'>, RenderProps<TabsRenderProps>, SlotProps, GlobalDOMAttributes<HTMLDivElement> {\n  /**\n   * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n   * @default 'react-aria-Tabs'\n   */\n  className?: ClassNameOrFunction<TabsRenderProps>\n}\n\nexport interface TabsRenderProps {\n  /**\n   * The orientation of the tabs.\n   * @selector [data-orientation=\"horizontal | vertical\"]\n   */\n  orientation: Orientation\n}\n\nexport interface TabListProps<T> extends StyleRenderProps<TabListRenderProps>, AriaLabelingProps, Omit<CollectionProps<T>, 'disabledKeys'>, GlobalDOMAttributes<HTMLDivElement> {\n  /**\n   * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n   * @default 'react-aria-TabList'\n   */\n  className?: ClassNameOrFunction<TabListRenderProps>\n}\n\nexport interface TabListRenderProps {\n  /**\n   * The orientation of the tab list.\n   * @selector [data-orientation=\"horizontal | vertical\"]\n   */\n  orientation: Orientation,\n  /**\n   * State of the tab list.\n   */\n  state: TabListState<unknown>\n}\n\nexport interface TabProps extends Omit<RenderProps<TabRenderProps>, 'render'>, PossibleLinkDOMRenderProps<'div', TabRenderProps>, AriaLabelingProps, LinkDOMProps, HoverEvents, FocusEvents, PressEvents, Omit<GlobalDOMAttributes<HTMLDivElement>, 'onClick'> {\n  /**\n   * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n   * @default 'react-aria-Tab'\n   */\n  className?: ClassNameOrFunction<TabRenderProps>,\n  /** The unique id of the tab. */\n  id?: Key,\n  /** Whether the tab is disabled. */\n  isDisabled?: boolean\n}\n\nexport interface TabRenderProps {\n  /**\n   * Whether the tab is currently hovered with a mouse.\n   * @selector [data-hovered]\n   */\n  isHovered: boolean,\n  /**\n   * Whether the tab is currently in a pressed state.\n   * @selector [data-pressed]\n   */\n  isPressed: boolean,\n  /**\n   * Whether the tab is currently selected.\n   * @selector [data-selected]\n   */\n  isSelected: boolean,\n  /**\n   * Whether the tab is currently focused.\n   * @selector [data-focused]\n   */\n  isFocused: boolean,\n  /**\n   * Whether the tab is currently keyboard focused.\n   * @selector [data-focus-visible]\n   */\n  isFocusVisible: boolean,\n  /**\n   * Whether the tab is disabled.\n   * @selector [data-disabled]\n   */\n  isDisabled: boolean\n}\n\nexport interface TabPanelProps extends AriaTabPanelProps, RenderProps<TabPanelRenderProps>, GlobalDOMAttributes<HTMLDivElement> {\n  /**\n   * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n   * @default 'react-aria-TabPanel'\n   */\n  className?: ClassNameOrFunction<TabPanelRenderProps>,\n  /**\n   * Whether to mount the tab panel in the DOM even when it is not currently selected.\n   * Inactive tab panels are inert and cannot be interacted with. They must be styled appropriately so this is clear to the user visually.\n   * @default false\n   */\n  shouldForceMount?: boolean\n}\n\nexport interface TabPanelRenderProps {\n  /**\n   * Whether the tab panel is currently focused.\n   * @selector [data-focused]\n   */\n  isFocused: boolean,\n  /**\n   * Whether the tab panel is currently keyboard focused.\n   * @selector [data-focus-visible]\n   */\n  isFocusVisible: boolean,\n  /**\n   * Whether the tab panel is currently non-interactive. This occurs when the\n   * `shouldForceMount` prop is true, and the corresponding tab is not selected.\n   * @selector [data-inert]\n   */\n  isInert: boolean,\n  /**\n   * Whether the tab panel is currently entering. Use this to apply animations.\n   * @selector [data-entering]\n   */\n  isEntering: boolean,\n  /**\n   * Whether the tab panel is currently exiting. Use this to apply animations.\n   * @selector [data-exiting]\n   */\n  isExiting: boolean,\n  /**\n   * State of the tab list.\n   */\n  state: TabListState<unknown>\n}\n\nexport const TabsContext = createContext<ContextValue<TabsProps, HTMLDivElement>>(null);\nexport const TabListStateContext = createContext<TabListState<object> | null>(null);\n\n/**\n * Tabs organize content into multiple sections and allow users to navigate between them.\n */\nexport const Tabs = /*#__PURE__*/ (forwardRef as forwardRefType)(function Tabs(props: TabsProps, ref: ForwardedRef<HTMLDivElement>) {\n  [props, ref] = useContextProps(props, ref, TabsContext);\n  let {children, orientation = 'horizontal'} = props;\n  children = useMemo(() => (\n    typeof children === 'function'\n      ? children({orientation, defaultChildren: null})\n      : children\n  ), [children, orientation]);\n\n  return (\n    <CollectionBuilder content={children}>\n      {collection => <TabsInner props={props} collection={collection} tabsRef={ref} />}\n    </CollectionBuilder>\n  );\n});\n\ninterface TabsInnerProps {\n  props: TabsProps,\n  collection: ICollection<Node<any>>,\n  tabsRef: RefObject<HTMLDivElement | null>\n}\n\nfunction TabsInner({props, tabsRef: ref, collection}: TabsInnerProps) {\n  let {orientation = 'horizontal'} = props;\n  let state = useTabListState({\n    ...props,\n    collection,\n    children: undefined\n  });\n  let {focusProps, isFocused, isFocusVisible} = useFocusRing({within: true});\n  let values = useMemo(() => ({\n    orientation,\n    isFocusWithin: isFocused,\n    isFocusVisible\n  }), [orientation, isFocused, isFocusVisible]);\n  let renderProps = useRenderProps({\n    ...props,\n    defaultClassName: 'react-aria-Tabs',\n    values\n  });\n\n  let DOMProps = filterDOMProps(props, {global: true});\n\n  return (\n    <dom.div\n      {...mergeProps(DOMProps, renderProps, focusProps)}\n      ref={ref}\n      slot={props.slot || undefined}\n      data-focused={isFocused || undefined}\n      data-orientation={orientation}\n      data-focus-visible={isFocusVisible || undefined}\n      data-disabled={state.isDisabled || undefined}>\n      <Provider\n        values={[\n          [TabsContext, props],\n          [TabListStateContext, state]\n        ]}>\n        {renderProps.children}\n      </Provider>\n    </dom.div>\n  );\n}\n\n/**\n * A TabList is used within Tabs to group tabs that a user can switch between.\n * The ids of the items within the <TabList> must match up with a corresponding item inside the <TabPanels>.\n */\nexport const TabList = /*#__PURE__*/ (forwardRef as forwardRefType)(function TabList<T extends object>(props: TabListProps<T>, ref: ForwardedRef<HTMLDivElement>): JSX.Element {\n  let state = useContext(TabListStateContext);\n  return state\n    ? <TabListInner props={props} forwardedRef={ref} />\n    : <Collection {...props} />;\n});\n\ninterface TabListInnerProps<T> {\n  props: TabListProps<T>,\n  forwardedRef: ForwardedRef<HTMLDivElement>\n}\n\nfunction TabListInner<T extends object>({props, forwardedRef: ref}: TabListInnerProps<T>) {\n  let state = useContext(TabListStateContext)!;\n  let {CollectionRoot} = useContext(CollectionRendererContext);\n  let {orientation = 'horizontal', keyboardActivation = 'automatic'} = useSlottedContext(TabsContext)!;\n  let objectRef = useObjectRef(ref);\n\n  let {tabListProps} = useTabList({\n    ...props,\n    orientation,\n    keyboardActivation\n  }, state, objectRef);\n\n  let renderProps = useRenderProps({\n    ...props,\n    children: null,\n    defaultClassName: 'react-aria-TabList',\n    values: {\n      orientation,\n      state\n    }\n  });\n\n  let DOMProps = filterDOMProps(props, {global: true});\n  delete DOMProps.id;\n\n  return (\n    <dom.div\n      {...mergeProps(DOMProps, renderProps, tabListProps)}\n      ref={objectRef}\n      data-orientation={orientation || undefined}>\n      <SharedElementTransition>\n        <CollectionRoot collection={state.collection} persistedKeys={usePersistedKeys(state.selectionManager.focusedKey)} />\n      </SharedElementTransition>\n    </dom.div>\n  );\n}\n\nclass TabItemNode extends CollectionNode<unknown> {\n  static readonly type = 'item';\n}\n\n/**\n * A Tab provides a title for an individual item within a TabList.\n */\nexport const Tab = /*#__PURE__*/ createLeafComponent(TabItemNode, (props: TabProps, forwardedRef: ForwardedRef<HTMLDivElement>, item: Node<unknown>) => {\n  let state = useContext(TabListStateContext)!;\n  let ref = useObjectRef<any>(forwardedRef);\n  let {tabProps, isSelected, isDisabled, isPressed} = useTab({key: item.key, ...props}, state, ref);\n  let {focusProps, isFocused, isFocusVisible} = useFocusRing();\n  let {hoverProps, isHovered} = useHover({\n    isDisabled,\n    onHoverStart: props.onHoverStart,\n    onHoverEnd: props.onHoverEnd,\n    onHoverChange: props.onHoverChange\n  });\n\n  let renderProps = useRenderProps<TabRenderProps, any>({\n    ...props,\n    id: undefined,\n    children: item.rendered,\n    defaultClassName: 'react-aria-Tab',\n    values: {\n      isSelected,\n      isDisabled,\n      isFocused,\n      isFocusVisible,\n      isPressed,\n      isHovered\n    }\n  });\n\n  let ElementType = item.props.href ? dom.a : dom.div;\n  let DOMProps = filterDOMProps(props as any, {global: true});\n  delete DOMProps.id;\n  delete DOMProps.onClick;\n\n  return (\n    <ElementType\n      {...mergeProps(DOMProps, renderProps, tabProps, focusProps, hoverProps)}\n      ref={ref}\n      data-selected={isSelected || undefined}\n      data-disabled={isDisabled || undefined}\n      data-focused={isFocused || undefined}\n      data-focus-visible={isFocusVisible || undefined}\n      data-pressed={isPressed || undefined}\n      data-hovered={isHovered || undefined}>\n      <SelectionIndicatorContext.Provider value={{isSelected}}>\n        {renderProps.children}\n      </SelectionIndicatorContext.Provider>\n    </ElementType>\n  );\n});\n\nexport interface TabPanelsProps<T> extends Omit<CollectionProps<T>, 'disabledKeys'>, StyleProps, DOMRenderProps<'div', undefined>, GlobalDOMAttributes<HTMLDivElement> {\n  /**\n   * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element.\n   * @default 'react-aria-TabPanels'\n   */\n  className?: string\n}\n\n/**\n * Groups multiple `<TabPanel>` elements, and provides CSS variables for animated transitions.\n */\nexport const TabPanels = /*#__PURE__*/ createHideableComponent(function TabPanels<T extends object>(props: TabPanelsProps<T>, forwardedRef: ForwardedRef<HTMLDivElement>) {\n  let state = useContext(TabListStateContext)!;\n  let ref = useObjectRef(forwardedRef);\n\n  let selectedKeyRef = useRef(state.selectedKey);\n  let prevSize = useRef<DOMRect | null>(null);\n  let hasTransition = useRef<boolean | null>(null);\n  useLayoutEffect(() => {\n    let el = ref.current;\n    if (!el) {\n      return;\n    }\n\n    if (hasTransition.current == null) {\n      hasTransition.current = /width|height|all/.test(window.getComputedStyle(el).transition);\n    }\n\n    if (hasTransition.current && selectedKeyRef.current != null && selectedKeyRef.current !== state.selectedKey) {\n      // Measure auto size.\n      el.style.setProperty('--tab-panel-width', 'auto');\n      el.style.setProperty('--tab-panel-height', 'auto');\n      let {width, height} = el.getBoundingClientRect();\n\n      if (prevSize.current && (prevSize.current.width !== width || prevSize.current.height !== height)) {\n        // Revert to previous size.\n        el.style.setProperty('--tab-panel-width', prevSize.current.width + 'px');\n        el.style.setProperty('--tab-panel-height', prevSize.current.height + 'px');\n\n        // Force style re-calculation to trigger animations.\n        window.getComputedStyle(el).height;\n\n        // Animate to current pixel size.\n        el.style.setProperty('--tab-panel-width', width + 'px');\n        el.style.setProperty('--tab-panel-height', height + 'px');\n\n        // When animations complete, revert back to auto size.\n        Promise.all(el.getAnimations().map(a => a.finished))\n          .then(() => {\n            el.style.setProperty('--tab-panel-width', 'auto');\n            el.style.setProperty('--tab-panel-height', 'auto');\n          })\n          .catch(() => {});\n      }\n    }\n\n    selectedKeyRef.current = state.selectedKey;\n  }, [ref, state.selectedKey]);\n\n  // Store previous size before DOM updates occur.\n  // This breaks the rules of hooks because there is no effect that runs _before_ DOM updates.\n  // eslint-disable-next-line rulesdir/pure-render\n  if (state.selectedKey != null && state.selectedKey !== selectedKeyRef.current && ref.current && hasTransition.current) {\n    // eslint-disable-next-line rulesdir/pure-render\n    prevSize.current = ref.current.getBoundingClientRect();\n  }\n\n  let DOMProps = filterDOMProps(props, {labelable: true, global: true});\n  delete DOMProps.id;\n\n  return (\n    <dom.div\n      render={props.render}\n      {...DOMProps}\n      ref={ref}\n      style={props.style}\n      className={props.className || 'react-aria-TabPanels'}>\n      <Collection {...props} />\n    </dom.div>\n  );\n});\n\n/**\n * A TabPanel provides the content for a tab.\n */\nexport const TabPanel = /*#__PURE__*/ createHideableComponent(function TabPanel(props: TabPanelProps, forwardedRef: ForwardedRef<HTMLDivElement>) {\n  const state = useContext(TabListStateContext)!;\n  let ref = useObjectRef<HTMLDivElement>(forwardedRef);\n\n  // Track if the tab panel was initially selected on mount (after extra render to populate the collection).\n  // In this case, we don't want to trigger animations.\n  let isSelected = state.selectedKey === props.id;\n  let [isInitiallySelected, setInitiallySelected] = useState<boolean | null>(state.selectedKey != null ? isSelected : null);\n  if (isInitiallySelected == null && state.selectedKey != null) {\n    setInitiallySelected(isSelected);\n  } else if (!isSelected && isInitiallySelected) {\n    setInitiallySelected(false);\n  }\n\n  let isExiting = useExitAnimation(ref, isSelected);\n  if (!isSelected && !props.shouldForceMount && !isExiting) {\n    return null;\n  }\n\n  return (\n    <TabPanelInner\n      {...props}\n      tabPanelRef={ref}\n      isInitiallySelected={isInitiallySelected || false}\n      isExiting={isExiting} />\n  );\n});\n\nfunction TabPanelInner(props: TabPanelProps & {tabPanelRef: RefObject<HTMLDivElement | null>, isInitiallySelected: boolean, isExiting: boolean}) {\n  let state = useContext(TabListStateContext)!;\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  let {id, tabPanelRef: ref, isInitiallySelected, isExiting, ...otherProps} = props;\n  let {tabPanelProps} = useTabPanel(props, state, ref);\n  let {focusProps, isFocused, isFocusVisible} = useFocusRing();\n\n  let isSelected = state.selectedKey === props.id;\n  let isEntering = useEnterAnimation(ref) && !isInitiallySelected;\n  let renderProps = useRenderProps({\n    ...props,\n    defaultClassName: 'react-aria-TabPanel',\n    values: {\n      isFocused,\n      isFocusVisible,\n      // @ts-ignore - compatibility with React < 19\n      isInert: inertValue(!isSelected),\n      isEntering,\n      isExiting,\n      state\n    }\n  });\n\n  let DOMProps = filterDOMProps(otherProps, {global: true});\n  delete DOMProps.id;\n\n  let domProps = isSelected\n    ? mergeProps(DOMProps, tabPanelProps, focusProps, renderProps)\n    : mergeProps(DOMProps, renderProps);\n\n  return (\n    <dom.div\n      {...domProps}\n      ref={ref}\n      data-focused={isFocused || undefined}\n      data-focus-visible={isFocusVisible || undefined}\n      // @ts-ignore\n      inert={inertValue(!isSelected || props.inert)}\n      data-inert={!isSelected ? 'true' : undefined}\n      data-entering={isEntering || undefined}\n      data-exiting={isExiting || undefined}>\n      <Provider\n        values={[\n          [TabsContext, null],\n          [TabListStateContext, null]\n        ]}>\n        <CollectionRendererContext.Provider value={DefaultCollectionRenderer}>\n          {renderProps.children}\n        </CollectionRendererContext.Provider>\n      </Provider>\n    </dom.div>\n  );\n}\n"],"names":[],"version":3,"file":"Tabs.cjs.map"}