{"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AAkCM,MAAM,0DAAc,CAAA,GAAA,uBAAS,EAAE,SAAS,YAAY,KAA+B,EAAE,GAA2B;IACrH,IAAI,WACF,OAAO,YACP,QAAQ,cACR,UAAU,QACV,IAAI,EACJ,GAAG,YACJ,GAAG,CAAA,GAAA,0CAAe,EAAE;IACrB,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IACvB,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,uCAAY,EAAE;IAEjC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,aAAa,IAAI,QAAQ,GAAG,CAAC,QAAQ,KAAK,cAChE,QAAQ,IAAI,CAAC;IAGf,IAAI,CAAC,QAAS,CAAA,KAAK,CAAC,aAAa,IAAI,KAAK,CAAC,kBAAkB,AAAD,KAAM,QAAQ,GAAG,CAAC,QAAQ,KAAK,cACzF,QAAQ,IAAI,CAAC;IAGf,qBACE,0DAAC;QACE,GAAG,CAAA,GAAA,6CAAa,EAAE,YAAY;YAAC,WAAW,CAAC,CAAC;QAAI,EAAE;QAClD,GAAG,UAAU;QACd,MAAM;QACN,WAAW,CAAA,GAAA,oCAAS,EAClB,CAAA,GAAA,mDAAK,GACL,wBACA,CAAC,sBAAsB,EAAE,SAAS,EAClC;YACE,eAAe;QACjB,GACA,WAAW,SAAS;QAEtB,KAAK;OACJ;AAGP","sources":["packages/@adobe/react-spectrum/src/statuslight/StatusLight.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, StyleProps} from '@react-types/shared';\nimport {classNames} from '../utils/classNames';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport React, {forwardRef, ReactNode} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/statuslight/vars.css';\nimport {useDOMRef} from '../utils/useDOMRef';\nimport {useProviderProps} from '../provider/Provider';\nimport {useStyleProps} from '../utils/styleProps';\n\n\nexport interface SpectrumStatusLightProps extends DOMProps, StyleProps, AriaLabelingProps {\n  /** The content to display as the label. */\n  children?: ReactNode,\n  /**\n   * The variant changes the color of the status light.\n   * When status lights have a semantic meaning, they should use the variant for semantic colors.\n   */\n  variant: 'positive' | 'negative' | 'notice' | 'info' | 'neutral' | 'celery' | 'chartreuse' | 'yellow' | 'magenta' | 'fuchsia' | 'purple' | 'indigo' | 'seafoam',\n  /** Whether the status light is disabled. */\n  isDisabled?: boolean,\n  /**\n   * An accessibility role for the status light. Should be set when the status\n   * can change at runtime, and no more than one status light will update simultaneously.\n   * For cases where multiple statuses can change at the same time, use a Toast instead.\n   */\n  role?: 'status'\n}\n\n/**\n * Status lights are used to color code categories and labels commonly found in data visualization.\n * When status lights have a semantic meaning, they should use semantic variant colors.\n */\nexport const StatusLight = forwardRef(function StatusLight(props: SpectrumStatusLightProps, ref: DOMRef<HTMLDivElement>) {\n  let {\n    variant,\n    children,\n    isDisabled,\n    role,\n    ...otherProps\n  } = useProviderProps(props);\n  let domRef = useDOMRef(ref);\n  let {styleProps} = useStyleProps(otherProps);\n\n  if (!children && !props['aria-label'] && process.env.NODE_ENV !== 'production') {\n    console.warn('If no children are provided, an aria-label must be specified');\n  }\n\n  if (!role && (props['aria-label'] || props['aria-labelledby']) && process.env.NODE_ENV !== 'production') {\n    console.warn('A labelled StatusLight must have a role.');\n  }\n\n  return (\n    <div\n      {...filterDOMProps(otherProps, {labelable: !!role})}\n      {...styleProps}\n      role={role}\n      className={classNames(\n        styles,\n        'spectrum-StatusLight',\n        `spectrum-StatusLight--${variant}`,\n        {\n          'is-disabled': isDisabled\n        },\n        styleProps.className\n      )}\n      ref={domRef}>\n      {children}\n    </div>\n  );\n});\n"],"names":[],"version":3,"file":"StatusLight.cjs.map"}