{"version":3,"sources":["jsdelivr-header.js","/npm/@react-spectrum/badge@3.1.25/dist/packages/@adobe/spectrum-css-temp/components/badge/vars.css","/npm/@react-spectrum/badge@3.1.25/dist/packages/@react-spectrum/badge/src/Badge.tsx"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,82NCNA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,E,q8BAnBA,EAA+B,oBAC/B,EAAmC,wBACnC,EAAmC,wBACnC,EAA4C,iCAC5C,EAA2C,gCAC3C,EAAyC,8BACzC,EAA0C,+BAC1C,EAA4C,iCAC5C,EAA6C,kCAC7C,EAA4C,iCAC5C,EAA6C,kCAC7C,EAA2C,gCAC3C,EAA4C,iCAC5C,EAA0C,+BAC1C,EAA2C,gCAC3C,EAAwC,6BACxC,EAAyC,8BAEzC,EAAuC,6BADvC,EAA4C,mCAE5C,EAA8C,mCCMjC,MAAA,EAAQ,GAAW,SAAe,EAA2B,GACxE,IAAI,SACF,EAAQ,QACR,KACG,GACD,EAAiB,GACjB,EAAS,EAAU,IACnB,WAAC,GAAc,EAAc,GAC7B,EAAa,EAAM,SAAS,QAAQ,EAAM,UAAU,OAAM,IAAM,EAAM,eAAe,KAEzF,OACE,EAAC,cAAA,WACK,EAAe,MACf,EACJ,KAAK,eACL,UAAW,EACT,EAAA,GACA,iBACA,CACE,CAAC,mBAAmB,KAAY,GAElC,EAAW,WAEb,IAAK,GACL,EAAC,cAAA,EAAW,CACV,MAAO,CACL,KAAM,CACJ,KAAM,IACN,iBAAkB,EAAW,EAAA,GAAQ,wBAEvC,KAAM,CACJ,iBAAkB,EAAW,EAAA,GAAQ,2BAKnB,iBAAb,GAAyB,EAC5B,EAAA,cAAA,EAAI,KAAG,GACP,GAKd,W","file":"/npm/@react-spectrum/badge@3.1.25/dist/import.mjs/+esm","sourceRoot":"","sourcesContent":["/**\n * Bundled by jsDelivr using Rollup v2.79.2 and Terser v5.39.0.\n * Original file: /npm/@react-spectrum/badge@3.1.25/dist/import.mjs\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","/*\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\n@import './index.css';\n@import './skin.css';\n","/*\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 {classNames, SlotProvider, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport React, {forwardRef} from 'react';\nimport {SpectrumBadgeProps} from '@react-types/badge';\nimport styles from '@adobe/spectrum-css-temp/components/badge/vars.css';\nimport {Text} from '@react-spectrum/text';\nimport {useProviderProps} from '@react-spectrum/provider';\n\n\n/**\n * Badges are used for showing a small amount of color-categorized metadata, ideal for getting a user's attention.\n */\nexport const Badge = forwardRef(function Badge(props: SpectrumBadgeProps, ref: DOMRef<HTMLDivElement>) {\n  let {\n    children,\n    variant,\n    ...otherProps\n  } = useProviderProps(props);\n  let domRef = useDOMRef(ref);\n  let {styleProps} = useStyleProps(otherProps);\n  let isTextOnly = React.Children.toArray(props.children).every(c => !React.isValidElement(c));\n\n  return (\n    <span\n      {...filterDOMProps(otherProps)}\n      {...styleProps}\n      role=\"presentation\"\n      className={classNames(\n        styles,\n        'spectrum-Badge',\n        {\n          [`spectrum-Badge--${variant}`]: variant\n        },\n        styleProps.className\n      )}\n      ref={domRef}>\n      <SlotProvider\n        slots={{\n          icon: {\n            size: 'S',\n            UNSAFE_className: classNames(styles, 'spectrum-Badge-icon')\n          },\n          text: {\n            UNSAFE_className: classNames(styles, 'spectrum-Badge-label')\n          }\n        }}>\n\n        {\n          typeof children === 'string' || isTextOnly\n            ? <Text>{children}</Text>\n            : children\n        }\n      </SlotProvider>\n    </span>\n  );\n});\n"]}