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react-aria-components/src/Group.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, DOMProps, forwardRefType} from '@react-types/shared';\nimport {\n  ClassNameOrFunction,\n  ContextValue,\n  dom,\n  RenderProps,\n  SlotProps,\n  useContextProps,\n  useRenderProps\n} from './utils';\nimport {HoverProps, useHover} from 'react-aria/useHover';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport React, {createContext, ForwardedRef, forwardRef, HTMLAttributes} from 'react';\nimport {useFocusRing} from 'react-aria/useFocusRing';\n\nexport interface GroupRenderProps {\n  /**\n   * Whether the group is currently hovered with a mouse.\n   * @selector [data-hovered]\n   */\n  isHovered: boolean,\n  /**\n   * Whether an element within the group is focused, either via a mouse or keyboard.\n   * @selector [data-focus-within]\n   */\n  isFocusWithin: boolean,\n  /**\n   * Whether an element within the group is keyboard focused.\n   * @selector [data-focus-visible]\n   */\n  isFocusVisible: boolean,\n  /**\n   * Whether the group is disabled.\n   * @selector [data-disabled]\n   */\n  isDisabled: boolean,\n  /**\n   * Whether the group is invalid.\n   * @selector [data-invalid]\n   */\n  isInvalid: boolean\n}\n\nexport interface GroupProps extends AriaLabelingProps, Omit<HTMLAttributes<HTMLElement>, 'children' | 'className' | 'style' | 'render' | 'role' | 'slot'>, DOMProps, HoverProps, RenderProps<GroupRenderProps>, SlotProps {\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-Group'\n  */\n className?: ClassNameOrFunction<GroupRenderProps>,\n /** Whether the group is disabled. */\n isDisabled?: boolean,\n /** Whether the group is invalid. */\n isInvalid?: boolean,\n /** Whether the group is read only. */\n isReadOnly?: boolean,\n /**\n  * An accessibility role for the group. By default, this is set to `'group'`.\n  * Use `'region'` when the contents of the group is important enough to be\n  * included in the page table of contents. Use `'presentation'` if the group\n  * is visual only and does not represent a semantic grouping of controls.\n  * @default 'group'\n  */\n role?: 'group' | 'region' | 'presentation'\n}\n\nexport const GroupContext = createContext<ContextValue<GroupProps, HTMLDivElement>>({});\n\n/**\n * A group represents a set of related UI controls, and supports interactive states for styling.\n */\nexport const Group = /*#__PURE__*/ (forwardRef as forwardRefType)(function Group(props: GroupProps, ref: ForwardedRef<HTMLDivElement>) {\n  [props, ref] = useContextProps(props, ref, GroupContext);\n  let {isDisabled, isInvalid, isReadOnly, onHoverStart, onHoverChange, onHoverEnd, ...otherProps} = props;\n  isDisabled ??= !!props['aria-disabled'] && props['aria-disabled'] !== 'false';\n  isInvalid ??= !!props['aria-invalid'] && props['aria-invalid'] !== 'false';\n\n  let {hoverProps, isHovered} = useHover({onHoverStart, onHoverChange, onHoverEnd, isDisabled});\n  let {isFocused, isFocusVisible, focusProps} = useFocusRing({\n    within: true\n  });\n\n  let renderProps = useRenderProps({\n    ...props,\n    values: {isHovered, isFocusWithin: isFocused, isFocusVisible, isDisabled, isInvalid},\n    defaultClassName: 'react-aria-Group'\n  });\n\n  return (\n    <dom.div\n      {...mergeProps(otherProps, focusProps, hoverProps)}\n      {...renderProps}\n      ref={ref}\n      role={props.role ?? 'group'}\n      slot={props.slot ?? undefined}\n      data-focus-within={isFocused || undefined}\n      data-hovered={isHovered || undefined}\n      data-focus-visible={isFocusVisible || undefined}\n      data-disabled={isDisabled || undefined}\n      data-invalid={isInvalid || undefined}\n      data-readonly={isReadOnly || undefined}>\n      {renderProps.children}\n    </dom.div>\n  );\n});\n"],"names":[],"version":3,"file":"Group.mjs.map"}