@react-spectrum/badge 3.1.18 → 3.1.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- require("./vars.53b5474c.css");
1
+ require("./vars.a9683aca.css");
2
2
  var $0f362c72c73357fc$exports = require("./badge_vars_css.main.js");
3
3
  var $3aISS$reactspectrumutils = require("@react-spectrum/utils");
4
4
  var $3aISS$reactariautils = require("@react-aria/utils");
@@ -32,7 +32,7 @@ $parcel$export(module.exports, "Badge", () => $f243611f87a6fe61$export$37acb3580
32
32
 
33
33
 
34
34
 
35
- function $f243611f87a6fe61$var$Badge(props, ref) {
35
+ const $f243611f87a6fe61$export$37acb3580601e69a = /*#__PURE__*/ (0, $3aISS$react.forwardRef)(function Badge(props, ref) {
36
36
  let { children: children, variant: variant, ...otherProps } = (0, $3aISS$reactspectrumprovider.useProviderProps)(props);
37
37
  let domRef = (0, $3aISS$reactspectrumutils.useDOMRef)(ref);
38
38
  let { styleProps: styleProps } = (0, $3aISS$reactspectrumutils.useStyleProps)(otherProps);
@@ -56,10 +56,7 @@ function $f243611f87a6fe61$var$Badge(props, ref) {
56
56
  }
57
57
  }
58
58
  }, typeof children === 'string' || isTextOnly ? /*#__PURE__*/ (0, ($parcel$interopDefault($3aISS$react))).createElement((0, $3aISS$reactspectrumtext.Text), null, children) : children));
59
- }
60
- /**
61
- * Badges are used for showing a small amount of color-categorized metadata, ideal for getting a user's attention.
62
- */ let $f243611f87a6fe61$export$37acb3580601e69a = /*#__PURE__*/ (0, $3aISS$react.forwardRef)($f243611f87a6fe61$var$Badge);
59
+ });
63
60
 
64
61
 
65
62
  //# sourceMappingURL=Badge.main.js.map
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;AAYD,SAAS,4BAAM,KAAyB,EAAE,GAA2B;IACnE,IAAI,YACF,QAAQ,WACR,OAAO,EACP,GAAG,YACJ,GAAG,CAAA,GAAA,6CAAe,EAAE;IACrB,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IACvB,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,uCAAY,EAAE;IACjC,IAAI,aAAa,CAAA,GAAA,sCAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,QAAQ,EAAE,KAAK,CAAC,CAAA,IAAK,eAAC,CAAA,GAAA,sCAAI,EAAE,cAAc,CAAC;IAEzF,qBACE,0DAAC;QACE,GAAG,CAAA,GAAA,oCAAa,EAAE,WAAW;QAC7B,GAAG,UAAU;QACd,MAAK;QACL,WAAW,CAAA,GAAA,oCAAS,EAClB,CAAA,GAAA,mDAAK,GACL,kBACA;YACE,CAAC,CAAC,gBAAgB,EAAE,SAAS,CAAC,EAAE;QAClC,GACA,WAAW,SAAS;QAEtB,KAAK;qBACL,0DAAC,CAAA,GAAA,sCAAW;QACV,OAAO;YACL,MAAM;gBACJ,MAAM;gBACN,kBAAkB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;YACvC;YACA,MAAM;gBACJ,kBAAkB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;YACvC;QACF;OAGE,OAAO,aAAa,YAAY,2BAC5B,0DAAC,CAAA,GAAA,6BAAG,SAAG,YACP;AAKd;AAEA;;CAEC,GACD,IAAI,0DAAS,CAAA,GAAA,uBAAS,EAAE","sources":["packages/@react-spectrum/badge/src/Badge.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 {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\nfunction 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\n/**\n * Badges are used for showing a small amount of color-categorized metadata, ideal for getting a user's attention.\n */\nlet _Badge = forwardRef(Badge);\nexport {_Badge as Badge};\n"],"names":[],"version":3,"file":"Badge.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;AAeM,MAAM,0DAAQ,CAAA,GAAA,uBAAS,EAAE,SAAS,MAAM,KAAyB,EAAE,GAA2B;IACnG,IAAI,YACF,QAAQ,WACR,OAAO,EACP,GAAG,YACJ,GAAG,CAAA,GAAA,6CAAe,EAAE;IACrB,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IACvB,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,uCAAY,EAAE;IACjC,IAAI,aAAa,CAAA,GAAA,sCAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,QAAQ,EAAE,KAAK,CAAC,CAAA,IAAK,eAAC,CAAA,GAAA,sCAAI,EAAE,cAAc,CAAC;IAEzF,qBACE,0DAAC;QACE,GAAG,CAAA,GAAA,oCAAa,EAAE,WAAW;QAC7B,GAAG,UAAU;QACd,MAAK;QACL,WAAW,CAAA,GAAA,oCAAS,EAClB,CAAA,GAAA,mDAAK,GACL,kBACA;YACE,CAAC,CAAC,gBAAgB,EAAE,SAAS,CAAC,EAAE;QAClC,GACA,WAAW,SAAS;QAEtB,KAAK;qBACL,0DAAC,CAAA,GAAA,sCAAW;QACV,OAAO;YACL,MAAM;gBACJ,MAAM;gBACN,kBAAkB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;YACvC;YACA,MAAM;gBACJ,kBAAkB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;YACvC;QACF;OAGE,OAAO,aAAa,YAAY,2BAC5B,0DAAC,CAAA,GAAA,6BAAG,SAAG,YACP;AAKd","sources":["packages/@react-spectrum/badge/src/Badge.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 {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"],"names":[],"version":3,"file":"Badge.main.js.map"}
package/dist/Badge.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import "./vars.53b5474c.css";
1
+ import "./vars.a9683aca.css";
2
2
  import $jtG7a$badge_vars_cssmodulejs from "./badge_vars_css.mjs";
3
3
  import {useDOMRef as $jtG7a$useDOMRef, useStyleProps as $jtG7a$useStyleProps, classNames as $jtG7a$classNames, SlotProvider as $jtG7a$SlotProvider} from "@react-spectrum/utils";
4
4
  import {filterDOMProps as $jtG7a$filterDOMProps} from "@react-aria/utils";
@@ -26,7 +26,7 @@ function $parcel$interopDefault(a) {
26
26
 
27
27
 
28
28
 
29
- function $c2a9f60d7159b63f$var$Badge(props, ref) {
29
+ const $c2a9f60d7159b63f$export$37acb3580601e69a = /*#__PURE__*/ (0, $jtG7a$forwardRef)(function Badge(props, ref) {
30
30
  let { children: children, variant: variant, ...otherProps } = (0, $jtG7a$useProviderProps)(props);
31
31
  let domRef = (0, $jtG7a$useDOMRef)(ref);
32
32
  let { styleProps: styleProps } = (0, $jtG7a$useStyleProps)(otherProps);
@@ -50,10 +50,7 @@ function $c2a9f60d7159b63f$var$Badge(props, ref) {
50
50
  }
51
51
  }
52
52
  }, typeof children === 'string' || isTextOnly ? /*#__PURE__*/ (0, $jtG7a$react).createElement((0, $jtG7a$Text), null, children) : children));
53
- }
54
- /**
55
- * Badges are used for showing a small amount of color-categorized metadata, ideal for getting a user's attention.
56
- */ let $c2a9f60d7159b63f$export$37acb3580601e69a = /*#__PURE__*/ (0, $jtG7a$forwardRef)($c2a9f60d7159b63f$var$Badge);
53
+ });
57
54
 
58
55
 
59
56
  export {$c2a9f60d7159b63f$export$37acb3580601e69a as Badge};
@@ -1,4 +1,4 @@
1
- import "./vars.53b5474c.css";
1
+ import "./vars.a9683aca.css";
2
2
  import $jtG7a$badge_vars_cssmodulejs from "./badge_vars_css.module.js";
3
3
  import {useDOMRef as $jtG7a$useDOMRef, useStyleProps as $jtG7a$useStyleProps, classNames as $jtG7a$classNames, SlotProvider as $jtG7a$SlotProvider} from "@react-spectrum/utils";
4
4
  import {filterDOMProps as $jtG7a$filterDOMProps} from "@react-aria/utils";
@@ -26,7 +26,7 @@ function $parcel$interopDefault(a) {
26
26
 
27
27
 
28
28
 
29
- function $c2a9f60d7159b63f$var$Badge(props, ref) {
29
+ const $c2a9f60d7159b63f$export$37acb3580601e69a = /*#__PURE__*/ (0, $jtG7a$forwardRef)(function Badge(props, ref) {
30
30
  let { children: children, variant: variant, ...otherProps } = (0, $jtG7a$useProviderProps)(props);
31
31
  let domRef = (0, $jtG7a$useDOMRef)(ref);
32
32
  let { styleProps: styleProps } = (0, $jtG7a$useStyleProps)(otherProps);
@@ -50,10 +50,7 @@ function $c2a9f60d7159b63f$var$Badge(props, ref) {
50
50
  }
51
51
  }
52
52
  }, typeof children === 'string' || isTextOnly ? /*#__PURE__*/ (0, $jtG7a$react).createElement((0, $jtG7a$Text), null, children) : children));
53
- }
54
- /**
55
- * Badges are used for showing a small amount of color-categorized metadata, ideal for getting a user's attention.
56
- */ let $c2a9f60d7159b63f$export$37acb3580601e69a = /*#__PURE__*/ (0, $jtG7a$forwardRef)($c2a9f60d7159b63f$var$Badge);
53
+ });
57
54
 
58
55
 
59
56
  export {$c2a9f60d7159b63f$export$37acb3580601e69a as Badge};
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;AAYD,SAAS,4BAAM,KAAyB,EAAE,GAA2B;IACnE,IAAI,YACF,QAAQ,WACR,OAAO,EACP,GAAG,YACJ,GAAG,CAAA,GAAA,uBAAe,EAAE;IACrB,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IACvB,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,oBAAY,EAAE;IACjC,IAAI,aAAa,CAAA,GAAA,YAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,QAAQ,EAAE,KAAK,CAAC,CAAA,IAAK,eAAC,CAAA,GAAA,YAAI,EAAE,cAAc,CAAC;IAEzF,qBACE,gCAAC;QACE,GAAG,CAAA,GAAA,qBAAa,EAAE,WAAW;QAC7B,GAAG,UAAU;QACd,MAAK;QACL,WAAW,CAAA,GAAA,iBAAS,EAClB,CAAA,GAAA,uDAAK,GACL,kBACA;YACE,CAAC,CAAC,gBAAgB,EAAE,SAAS,CAAC,EAAE;QAClC,GACA,WAAW,SAAS;QAEtB,KAAK;qBACL,gCAAC,CAAA,GAAA,mBAAW;QACV,OAAO;YACL,MAAM;gBACJ,MAAM;gBACN,kBAAkB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,uDAAK,GAAG;YACvC;YACA,MAAM;gBACJ,kBAAkB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,uDAAK,GAAG;YACvC;QACF;OAGE,OAAO,aAAa,YAAY,2BAC5B,gCAAC,CAAA,GAAA,WAAG,SAAG,YACP;AAKd;AAEA;;CAEC,GACD,IAAI,0DAAS,CAAA,GAAA,iBAAS,EAAE","sources":["packages/@react-spectrum/badge/src/Badge.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 {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\nfunction 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\n/**\n * Badges are used for showing a small amount of color-categorized metadata, ideal for getting a user's attention.\n */\nlet _Badge = forwardRef(Badge);\nexport {_Badge as Badge};\n"],"names":[],"version":3,"file":"Badge.module.js.map"}
1
+ {"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;AAeM,MAAM,0DAAQ,CAAA,GAAA,iBAAS,EAAE,SAAS,MAAM,KAAyB,EAAE,GAA2B;IACnG,IAAI,YACF,QAAQ,WACR,OAAO,EACP,GAAG,YACJ,GAAG,CAAA,GAAA,uBAAe,EAAE;IACrB,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IACvB,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,oBAAY,EAAE;IACjC,IAAI,aAAa,CAAA,GAAA,YAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,QAAQ,EAAE,KAAK,CAAC,CAAA,IAAK,eAAC,CAAA,GAAA,YAAI,EAAE,cAAc,CAAC;IAEzF,qBACE,gCAAC;QACE,GAAG,CAAA,GAAA,qBAAa,EAAE,WAAW;QAC7B,GAAG,UAAU;QACd,MAAK;QACL,WAAW,CAAA,GAAA,iBAAS,EAClB,CAAA,GAAA,uDAAK,GACL,kBACA;YACE,CAAC,CAAC,gBAAgB,EAAE,SAAS,CAAC,EAAE;QAClC,GACA,WAAW,SAAS;QAEtB,KAAK;qBACL,gCAAC,CAAA,GAAA,mBAAW;QACV,OAAO;YACL,MAAM;gBACJ,MAAM;gBACN,kBAAkB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,uDAAK,GAAG;YACvC;YACA,MAAM;gBACJ,kBAAkB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,uDAAK,GAAG;YACvC;QACF;OAGE,OAAO,aAAa,YAAY,2BAC5B,gCAAC,CAAA,GAAA,WAAG,SAAG,YACP;AAKd","sources":["packages/@react-spectrum/badge/src/Badge.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 {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"],"names":[],"version":3,"file":"Badge.module.js.map"}
package/dist/types.d.ts CHANGED
@@ -4,7 +4,7 @@ import { DOMRefValue } from "@react-types/shared";
4
4
  /**
5
5
  * Badges are used for showing a small amount of color-categorized metadata, ideal for getting a user's attention.
6
6
  */
7
- export let Badge: React.ForwardRefExoticComponent<SpectrumBadgeProps & React.RefAttributes<DOMRefValue<HTMLDivElement>>>;
7
+ export const Badge: React.ForwardRefExoticComponent<SpectrumBadgeProps & React.RefAttributes<DOMRefValue<HTMLDivElement>>>;
8
8
  export type { SpectrumBadgeProps } from '@react-types/badge';
9
9
 
10
10
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"mappings":";;;AAmEA;;GAEG;AACH,OAAA,IAAI,6GAA0B,CAAC;ACvD/B,YAAY,EAAC,kBAAkB,EAAC,MAAM,oBAAoB,CAAC","sources":["packages/@react-spectrum/badge/src/packages/@react-spectrum/badge/src/Badge.tsx","packages/@react-spectrum/badge/src/packages/@react-spectrum/badge/src/index.ts","packages/@react-spectrum/badge/src/index.ts"],"sourcesContent":[null,null,"/*\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\n/// <reference types=\"css-module-types\" />\n\nexport {Badge} from './Badge';\nexport type {SpectrumBadgeProps} from '@react-types/badge';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
1
+ {"mappings":";;;AAsBA;;GAEG;AACH,OAAO,MAAM,6GA2CX,CAAC;ACrDH,YAAY,EAAC,kBAAkB,EAAC,MAAM,oBAAoB,CAAC","sources":["packages/@react-spectrum/badge/src/packages/@react-spectrum/badge/src/Badge.tsx","packages/@react-spectrum/badge/src/packages/@react-spectrum/badge/src/index.ts","packages/@react-spectrum/badge/src/index.ts"],"sourcesContent":[null,null,"/*\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\n/// <reference types=\"css-module-types\" />\n\nexport {Badge} from './Badge';\nexport type {SpectrumBadgeProps} from '@react-types/badge';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
@@ -79,6 +79,7 @@
79
79
  }
80
80
 
81
81
  .ACj6ra_spectrum-Badge {
82
+ width: fit-content;
82
83
  padding: var(--spectrum-global-dimension-size-50) 0;
83
84
  border-radius: var(--spectrum-alias-border-radius-regular, var(--spectrum-global-dimension-size-50));
84
85
  font-size: var(--spectrum-global-dimension-size-150);
@@ -87,7 +88,6 @@
87
88
  -webkit-font-smoothing: subpixel-antialiased;
88
89
  -moz-osx-font-smoothing: auto;
89
90
  font-smoothing: subpixel-antialiased;
90
- width: fit-content;
91
91
  display: inline-flex;
92
92
  position: relative;
93
93
  }
@@ -179,4 +179,4 @@
179
179
  color: var(--spectrum-gray-50);
180
180
  background-color: var(--spectrum-purple-background-color-default);
181
181
  }
182
- /*# sourceMappingURL=vars.53b5474c.css.map */
182
+ /*# sourceMappingURL=vars.a9683aca.css.map */
@@ -1 +1 @@
1
- {"mappings":"AA4DA;;;;;AAIE;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAQA;;;;AAIA;;;;AAKF;;;;;;;;AAOE;;;;;;;;;;;AAqBE;;;;;AAQF;;;;AAKE;;;;;AAOJ;EACE;;;;EAIE;;;;;AAMJ;;;;;;;;;;;;;;AAoBE;;;;;AAKA;;;;;;AAMA;;;;AAIA;;;;AAKA;;;;AAKA;;;;;AAMF;;;;;AAKA;;;;;AAiBA;;;;AAIA;;;;AAIA;;;;AAIA;;;;;AAKA;;;;;AAKA;;;;AAIA;;;;AAIA;;;;;AAKA;;;;;AAKA;;;;;AAKA","sources":["packages/@adobe/spectrum-css-temp/components/badge/vars.css"],"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\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"vars.53b5474c.css.map"}
1
+ {"mappings":"AA4DA;;;;;AAIE;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAQA;;;;AAIA;;;;AAKF;;;;;;;;AAOE;;;;;;;;;;;AAqBE;;;;;AAQF;;;;AAKE;;;;;AAOJ;EACE;;;;EAIE;;;;;AAMJ;;;;;;;;;;;;;;AAoBE;;;;;AAKA;;;;;;AAMA;;;;AAIA;;;;AAKA;;;;AAKA;;;;;AAMF;;;;;AAKA;;;;;AAiBA;;;;AAIA;;;;AAIA;;;;AAIA;;;;;AAKA;;;;;AAKA;;;;AAIA;;;;AAIA;;;;;AAKA;;;;;AAKA;;;;;AAKA","sources":["packages/@adobe/spectrum-css-temp/components/badge/vars.css"],"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\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"vars.a9683aca.css.map"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-spectrum/badge",
3
- "version": "3.1.18",
3
+ "version": "3.1.19",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -36,11 +36,11 @@
36
36
  "url": "https://github.com/adobe/react-spectrum"
37
37
  },
38
38
  "dependencies": {
39
- "@react-aria/utils": "^3.26.0",
40
- "@react-spectrum/text": "^3.5.10",
41
- "@react-spectrum/utils": "^3.12.0",
42
- "@react-types/badge": "^3.1.13",
43
- "@react-types/shared": "^3.26.0",
39
+ "@react-aria/utils": "^3.27.0",
40
+ "@react-spectrum/text": "^3.5.11",
41
+ "@react-spectrum/utils": "^3.12.1",
42
+ "@react-types/badge": "^3.1.14",
43
+ "@react-types/shared": "^3.27.0",
44
44
  "@swc/helpers": "^0.5.0"
45
45
  },
46
46
  "devDependencies": {
@@ -48,10 +48,11 @@
48
48
  },
49
49
  "peerDependencies": {
50
50
  "@react-spectrum/provider": "^3.0.0",
51
- "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
51
+ "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1",
52
+ "react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
52
53
  },
53
54
  "publishConfig": {
54
55
  "access": "public"
55
56
  },
56
- "gitHead": "71f0ef23053f9e03ee7e97df736e8b083e006849"
57
+ "gitHead": "09e7f44bebdc9d89122926b2b439a0a38a2814ea"
57
58
  }
package/src/Badge.tsx CHANGED
@@ -20,7 +20,10 @@ import {Text} from '@react-spectrum/text';
20
20
  import {useProviderProps} from '@react-spectrum/provider';
21
21
 
22
22
 
23
- function Badge(props: SpectrumBadgeProps, ref: DOMRef<HTMLDivElement>) {
23
+ /**
24
+ * Badges are used for showing a small amount of color-categorized metadata, ideal for getting a user's attention.
25
+ */
26
+ export const Badge = forwardRef(function Badge(props: SpectrumBadgeProps, ref: DOMRef<HTMLDivElement>) {
24
27
  let {
25
28
  children,
26
29
  variant,
@@ -63,10 +66,4 @@ function Badge(props: SpectrumBadgeProps, ref: DOMRef<HTMLDivElement>) {
63
66
  </SlotProvider>
64
67
  </span>
65
68
  );
66
- }
67
-
68
- /**
69
- * Badges are used for showing a small amount of color-categorized metadata, ideal for getting a user's attention.
70
- */
71
- let _Badge = forwardRef(Badge);
72
- export {_Badge as Badge};
69
+ });