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ACN;4BACA;YACA,6CAA6C;YAC7C,SAAS,CAAA,GAAA,iBAAS,EAAE,CAAC;wBACrB;uBACA;mBACA;QACF;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE,YAAY;QAAC,QAAQ;IAAI;IACvD,OAAO,SAAS,EAAE;IAElB,IAAI,WAAW,aACX,CAAA,GAAA,iBAAS,EAAE,UAAU,eAAe,YAAY,eAChD,CAAA,GAAA,iBAAS,EAAE,UAAU;IAEzB,qBACE,gCAAC,CAAA,GAAA,yCAAE,EAAE,GAAG;QACL,GAAG,QAAQ;QACZ,KAAK;QACL,gBAAc,aAAa;QAC3B,sBAAoB,kBAAkB;QACtC,aAAa;QACb,OAAO,CAAA,GAAA,iBAAS,EAAE,CAAC,cAAc,MAAM,KAAK;QAC5C,cAAY,CAAC,aAAa,SAAS;QACnC,iBAAe,cAAc;QAC7B,gBAAc,aAAa;qBAC3B,gCAAC,CAAA,GAAA,yCAAO;QACN,QAAQ;YACN;gBAAC;gBAAa;aAAK;YACnB;gBAAC;gBAAqB;aAAK;SAC5B;qBACD,gCAAC,CAAA,GAAA,yCAAwB,EAAE,QAAQ;QAAC,OAAO,CAAA,GAAA,yCAAwB;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 {\n  AriaLabelingProps,\n  FocusEvents,\n  forwardRefType,\n  GlobalDOMAttributes,\n  HoverEvents,\n  Key,\n  LinkDOMProps,\n  PressEvents,\n  RefObject\n} from '@react-types/shared';\nimport {\n  AriaTabListProps,\n  AriaTabPanelProps,\n  useTab,\n  useTabList,\n  useTabPanel\n} from 'react-aria/useTabList';\nimport {\n  ClassNameOrFunction,\n  ContextValue,\n  dom,\n  DOMRenderProps,\n  PossibleLinkDOMRenderProps,\n  Provider,\n  RenderProps,\n  SlotProps,\n  StyleProps,\n  StyleRenderProps,\n  useContextProps,\n  useRenderProps,\n  useSlottedContext\n} from './utils';\nimport {Collection} from 'react-aria/Collection';\nimport {CollectionBuilder, createLeafComponent} from 'react-aria/CollectionBuilder';\nimport {CollectionNode} from 'react-aria/private/collections/BaseCollection';\nimport {\n  CollectionProps,\n  CollectionRendererContext,\n  DefaultCollectionRenderer,\n  usePersistedKeys\n} 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, {\n  createContext,\n  ForwardedRef,\n  forwardRef,\n  JSX,\n  useContext,\n  useMemo,\n  useRef,\n  useState\n} 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\n  extends\n    Omit<AriaTabListProps<any>, 'items' | 'children'>,\n    RenderProps<TabsRenderProps>,\n    SlotProps,\n    GlobalDOMAttributes<HTMLDivElement> {\n  /**\n   * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n   * element. A function may be provided to compute the class based on component state.\n   *\n   * @default 'react-aria-Tabs'\n   */\n  className?: ClassNameOrFunction<TabsRenderProps>;\n}\n\nexport interface TabsRenderProps {\n  /**\n   * The orientation of the tabs.\n   *\n   * @selector [data-orientation=\"horizontal | vertical\"]\n   */\n  orientation: Orientation;\n}\n\nexport interface TabListProps<T>\n  extends\n    StyleRenderProps<TabListRenderProps>,\n    AriaLabelingProps,\n    Omit<CollectionProps<T>, 'disabledKeys'>,\n    GlobalDOMAttributes<HTMLDivElement> {\n  /**\n   * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n   * element. A function may be provided to compute the class based on component state.\n   *\n   * @default 'react-aria-TabList'\n   */\n  className?: ClassNameOrFunction<TabListRenderProps>;\n}\n\nexport interface TabListRenderProps {\n  /**\n   * The orientation of the tab list.\n   *\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\n  extends\n    Omit<RenderProps<TabRenderProps>, 'render'>,\n    PossibleLinkDOMRenderProps<'div', TabRenderProps>,\n    AriaLabelingProps,\n    LinkDOMProps,\n    HoverEvents,\n    FocusEvents,\n    PressEvents,\n    Omit<GlobalDOMAttributes<HTMLDivElement>, 'onClick'> {\n  /**\n   * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n   * element. A function may be provided to compute the class based on component state.\n   *\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   *\n   * @selector [data-hovered]\n   */\n  isHovered: boolean;\n  /**\n   * Whether the tab is currently in a pressed state.\n   *\n   * @selector [data-pressed]\n   */\n  isPressed: boolean;\n  /**\n   * Whether the tab is currently selected.\n   *\n   * @selector [data-selected]\n   */\n  isSelected: boolean;\n  /**\n   * Whether the tab is currently focused.\n   *\n   * @selector [data-focused]\n   */\n  isFocused: boolean;\n  /**\n   * Whether the tab is currently keyboard focused.\n   *\n   * @selector [data-focus-visible]\n   */\n  isFocusVisible: boolean;\n  /**\n   * Whether the tab is disabled.\n   *\n   * @selector [data-disabled]\n   */\n  isDisabled: boolean;\n}\n\nexport interface TabPanelProps\n  extends AriaTabPanelProps, RenderProps<TabPanelRenderProps>, GlobalDOMAttributes<HTMLDivElement> {\n  /**\n   * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n   * element. A function may be provided to compute the class based on component state.\n   *\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. Inactive tab\n   * panels are inert and cannot be interacted with. They must be styled appropriately so this is\n   * clear to the user visually.\n   *\n   * @default false\n   */\n  shouldForceMount?: boolean;\n}\n\nexport interface TabPanelRenderProps {\n  /**\n   * Whether the tab panel is currently focused.\n   *\n   * @selector [data-focused]\n   */\n  isFocused: boolean;\n  /**\n   * Whether the tab panel is currently keyboard focused.\n   *\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   *\n   * @selector [data-inert]\n   */\n  isInert: boolean;\n  /**\n   * Whether the tab panel is currently entering. Use this to apply animations.\n   *\n   * @selector [data-entering]\n   */\n  isEntering: boolean;\n  /**\n   * Whether the tab panel is currently exiting. Use this to apply animations.\n   *\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<any> | 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(\n  props: TabsProps,\n  ref: ForwardedRef<HTMLDivElement>\n) {\n  [props, ref] = useContextProps(props, ref, TabsContext);\n  let {children, orientation = 'horizontal'} = props;\n  children = useMemo(\n    () =>\n      typeof children === 'function' ? children({orientation, defaultChildren: null}) : children,\n    [children, orientation]\n  );\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    () => ({\n      orientation,\n      isFocusWithin: isFocused,\n      isFocusVisible\n    }),\n    [orientation, isFocused, isFocusVisible]\n  );\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. The ids of the items\n * within the <TabList> must match up with a corresponding item inside the <TabPanels>.\n */\nexport const TabList = /*#__PURE__*/ (forwardRef as forwardRefType)(function TabList<T>(\n  props: TabListProps<T>,\n  ref: ForwardedRef<HTMLDivElement>\n): JSX.Element {\n  let state = useContext(TabListStateContext);\n  return state ? <TabListInner props={props} forwardedRef={ref} /> : <Collection {...props} />;\n});\n\ninterface TabListInnerProps<T> {\n  props: TabListProps<T>;\n  forwardedRef: ForwardedRef<HTMLDivElement>;\n}\n\nfunction TabListInner<T>({props, forwardedRef: ref}: TabListInnerProps<T>) {\n  let state = useContext(TabListStateContext)!;\n  let {CollectionRoot} = useContext(CollectionRendererContext);\n  let {orientation = 'horizontal', keyboardActivation = 'automatic'} =\n    useSlottedContext(TabsContext)!;\n  let objectRef = useObjectRef(ref);\n\n  let {tabListProps} = useTabList(\n    {\n      ...props,\n      orientation,\n      keyboardActivation\n    },\n    state,\n    objectRef\n  );\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\n          collection={state.collection}\n          persistedKeys={usePersistedKeys(state.selectionManager.focusedKey)}\n        />\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(\n  TabItemNode,\n  (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(\n      {key: item.key, ...props},\n      state,\n      ref\n    );\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);\n\nexport interface TabPanelsProps<T>\n  extends\n    Omit<CollectionProps<T>, 'disabledKeys'>,\n    StyleProps,\n    DOMRenderProps<'div', undefined>,\n    GlobalDOMAttributes<HTMLDivElement> {\n  /**\n   * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n   * element.\n   *\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>(\n  props: TabPanelsProps<T>,\n  forwardedRef: ForwardedRef<HTMLDivElement>\n) {\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|block-size|inline-size|all/.test(\n        window.getComputedStyle(el).transition\n      );\n    }\n\n    if (\n      hasTransition.current &&\n      selectedKeyRef.current != null &&\n      selectedKeyRef.current !== state.selectedKey\n    ) {\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 (\n        prevSize.current &&\n        (prevSize.current.width !== width || prevSize.current.height !== height)\n      ) {\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  if (\n    state.selectedKey != null &&\n    // eslint-disable-next-line rsp-rules/pure-render\n    state.selectedKey !== selectedKeyRef.current &&\n    ref.current &&\n    // eslint-disable-next-line rsp-rules/pure-render\n    hasTransition.current\n  ) {\n    // eslint-disable-next-line rsp-rules/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(\n  props: TabPanelProps,\n  forwardedRef: ForwardedRef<HTMLDivElement>\n) {\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>(\n    state.selectedKey != null ? isSelected : null\n  );\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});\n\nfunction TabPanelInner(\n  props: TabPanelProps & {\n    tabPanelRef: RefObject<HTMLDivElement | null>;\n    isInitiallySelected: boolean;\n    isExiting: boolean;\n  }\n) {\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.mjs.map"}