{"mappings":";;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AAkCD,IAAI,gCAAU;IACZ,GAAG;IACH,GAAG;IACH,GAAG;AACL;AAMO,MAAM,0DAAU,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC,SAAS,QAAQ,KAA2B,EAAE,GAAW;IAC/F,QAAQ,CAAA,GAAA,yCAAW,EAAE,OAAO;IAC5B,IAAI,QAAC,OAAO,kBAAK,cAAc,cAAc,GAAG,YAAW,GAAG;IAC9D,IAAI,SAAS,CAAA,GAAA,yCAAQ,EAAE;IACvB,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,yCAAY,EAAE;IACjC,IAAI,SAAS,6BAAO,CAAC,KAAK;IAE1B,IAAI,UAAuB;IAC3B,IAAI,gBAAgB,YAClB,UAAU;IAGZ,IAAI,kBAAC,cAAc,EAAC,GAAG,CAAA,GAAA,mBAAW,EAAE;QAClC,GAAG,KAAK;QACR,aAAa;IACf;IAEA,qBACE,gCAAC;QACE,GAAG,UAAU;QACd,WAAW,CAAA,GAAA,yCAAS,EAClB,CAAA,GAAA,iDAAK,GACL,iBACA,CAAC,eAAe,EAAE,QAAQ,EAC1B;YACE,2BAA2B,gBAAgB;YAC3C,6BAA6B,gBAAgB;QAC/C,GACA,WAAW,SAAS;QAEtB,kEAAkE;QAClE,KAAK;QACJ,GAAG,cAAc;;AAGxB","sources":["packages/@adobe/react-spectrum/src/divider/Divider.tsx"],"sourcesContent":["/*\n * Copyright 2020 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, DOMRef, Orientation, StyleProps} from '@react-types/shared';\nimport {classNames} from '../utils/classNames';\nimport React, {ElementType} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/rule/vars.css';\nimport {useDOMRef} from '../utils/useDOMRef';\nimport {useSeparator} from 'react-aria/useSeparator';\nimport {useSlotProps} from '../utils/Slots';\nimport {useStyleProps} from '../utils/styleProps';\n\nexport interface SpectrumDividerProps extends DOMProps, AriaLabelingProps, StyleProps {\n  /**\n   * How thick the Divider should be.\n   *\n   * @default 'L'\n   */\n  size?: 'S' | 'M' | 'L';\n\n  /**\n   * The axis the Divider should align with.\n   *\n   * @default 'horizontal'\n   */\n  orientation?: Orientation;\n\n  /**\n   * A slot to place the divider in.\n   *\n   * @default 'divider'\n   */\n  slot?: string;\n}\n\nlet sizeMap = {\n  S: 'small',\n  M: 'medium',\n  L: 'large'\n};\n\n/**\n * Dividers bring clarity to a layout by grouping and dividing content in close proximity.\n * They can also be used to establish rhythm and hierarchy.\n */\nexport const Divider = React.forwardRef(function Divider(props: SpectrumDividerProps, ref: DOMRef) {\n  props = useSlotProps(props, 'divider');\n  let {size = 'L', orientation = 'horizontal', ...otherProps} = props;\n  let domRef = useDOMRef(ref);\n  let {styleProps} = useStyleProps(otherProps);\n  let weight = sizeMap[size];\n\n  let Element: ElementType = 'hr';\n  if (orientation === 'vertical') {\n    Element = 'div';\n  }\n\n  let {separatorProps} = useSeparator({\n    ...props,\n    elementType: Element\n  });\n\n  return (\n    <Element\n      {...styleProps}\n      className={classNames(\n        styles,\n        'spectrum-Rule',\n        `spectrum-Rule--${weight}`,\n        {\n          'spectrum-Rule--vertical': orientation === 'vertical',\n          'spectrum-Rule--horizontal': orientation === 'horizontal'\n        },\n        styleProps.className\n      )}\n      // @ts-ignore https://github.com/Microsoft/TypeScript/issues/28892\n      ref={domRef}\n      {...separatorProps}\n    />\n  );\n});\n"],"names":[],"version":3,"file":"Divider.mjs.map"}