{"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AA+BD,IAAI,gCAAU;IACZ,GAAG;IACH,GAAG;IACH,GAAG;AACL;AAMO,MAAM,0DAAU,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC,SAAS,QAAQ,KAA2B,EAAE,GAAW;IAC/F,QAAQ,CAAA,GAAA,sCAAW,EAAE,OAAO;IAC5B,IAAI,QACF,OAAO,kBACP,cAAc,cACd,GAAG,YACJ,GAAG;IACJ,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IACvB,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,uCAAY,EAAE;IACjC,IAAI,SAAS,6BAAO,CAAC,KAAK;IAE1B,IAAI,UAAuB;IAC3B,IAAI,gBAAgB,YAClB,UAAU;IAGZ,IAAI,kBAAC,cAAc,EAAC,GAAG,CAAA,GAAA,yCAAW,EAAE;QAClC,GAAG,KAAK;QACR,aAAa;IACf;IAEA,qBACE,0DAAC;QACE,GAAG,UAAU;QACd,WACE,CAAA,GAAA,oCAAS,EACP,CAAA,GAAA,mDAAK,GACL,iBACA,CAAC,eAAe,EAAE,QAAQ,EAC1B;YACE,2BAA2B,gBAAgB;YAC3C,6BAA6B,gBAAgB;QAC/C,GACA,WAAW,SAAS;QAGxB,kEAAkE;QAClE,KAAK;QACJ,GAAG,cAAc;;AAExB","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   * @default 'L'\n   */\n  size?: 'S' | 'M' | 'L',\n\n  /**\n   * The axis the Divider should align with.\n   * @default 'horizontal'\n   */\n  orientation?: Orientation,\n\n  /**\n   * A slot to place the divider in.\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 {\n    size = 'L',\n    orientation = 'horizontal',\n    ...otherProps\n  } = 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={\n        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      }\n      // @ts-ignore https://github.com/Microsoft/TypeScript/issues/28892\n      ref={domRef}\n      {...separatorProps} />\n  );\n});\n"],"names":[],"version":3,"file":"Divider.cjs.map"}