@react-spectrum/avatar 3.0.5-nightly.4149 → 3.0.5-nightly.4157

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.
package/dist/import.mjs CHANGED
@@ -36,12 +36,12 @@ function $parcel$export(e, n, v, s) {
36
36
 
37
37
  var $f81b9c4eea42ecfe$exports = {};
38
38
 
39
- $parcel$export($f81b9c4eea42ecfe$exports, "spectrum-Avatar", () => $f81b9c4eea42ecfe$export$2e049b8d031600fb, (v) => $f81b9c4eea42ecfe$export$2e049b8d031600fb = v);
40
39
  $parcel$export($f81b9c4eea42ecfe$exports, "is-disabled", () => $f81b9c4eea42ecfe$export$d35bc1e505d1ebbf, (v) => $f81b9c4eea42ecfe$export$d35bc1e505d1ebbf = v);
41
- var $f81b9c4eea42ecfe$export$2e049b8d031600fb;
40
+ $parcel$export($f81b9c4eea42ecfe$exports, "spectrum-Avatar", () => $f81b9c4eea42ecfe$export$2e049b8d031600fb, (v) => $f81b9c4eea42ecfe$export$2e049b8d031600fb = v);
42
41
  var $f81b9c4eea42ecfe$export$d35bc1e505d1ebbf;
43
- $f81b9c4eea42ecfe$export$2e049b8d031600fb = "spectrum-Avatar_2ebb13";
44
- $f81b9c4eea42ecfe$export$d35bc1e505d1ebbf = "is-disabled_2ebb13";
42
+ var $f81b9c4eea42ecfe$export$2e049b8d031600fb;
43
+ $f81b9c4eea42ecfe$export$d35bc1e505d1ebbf = `IFaZJG_is-disabled`;
44
+ $f81b9c4eea42ecfe$export$2e049b8d031600fb = `IFaZJG_spectrum-Avatar`;
45
45
 
46
46
 
47
47
 
@@ -49,8 +49,8 @@ const $ab0b7b2186c39312$var$DEFAULT_SIZE = "avatar-size-100";
49
49
  const $ab0b7b2186c39312$var$SIZE_RE = /^size-\d+/;
50
50
  function $ab0b7b2186c39312$var$Avatar(props, ref) {
51
51
  props = (0, $85w8l$useSlotProps)(props, "avatar");
52
- const { alt: alt = "" , isDisabled: isDisabled , size: size = $ab0b7b2186c39312$var$DEFAULT_SIZE , src: src , ...otherProps } = (0, $85w8l$useProviderProps)(props);
53
- const { styleProps: styleProps } = (0, $85w8l$useStyleProps)(otherProps);
52
+ const { alt: alt = "", isDisabled: isDisabled, size: size = $ab0b7b2186c39312$var$DEFAULT_SIZE, src: src, ...otherProps } = (0, $85w8l$useProviderProps)(props);
53
+ const { styleProps: styleProps } = (0, $85w8l$useStyleProps)(otherProps);
54
54
  const domRef = (0, $85w8l$useDOMRef)(ref);
55
55
  const domProps = (0, $85w8l$filterDOMProps)(otherProps);
56
56
  // Casting `size` as `any` since `isNaN` expects a `number`, but we want it
package/dist/main.css CHANGED
@@ -1 +1 @@
1
- .spectrum-Avatar_2ebb13{width:var(--spectrum-avatar-small-width,var(--spectrum-global-dimension-size-200));height:var(--spectrum-avatar-small-height,var(--spectrum-global-dimension-size-200));border-radius:var(--spectrum-avatar-small-border-radius,50%);-webkit-user-drag:none;-webkit-user-select:none;user-select:none;opacity:var(--spectrum-avatar-small-opacity,1);transition:box-shadow var(--spectrum-global-animation-duration-100,.13s)ease-out;border-style:none;outline:none}.spectrum-Avatar_2ebb13.is-disabled_2ebb13{opacity:var(--spectrum-avatar-small-opacity-disabled,.3)}@media (forced-colors:active){.spectrum-Avatar_2ebb13.is-disabled_2ebb13{opacity:1;border:2px solid GrayText}}
1
+ .IFaZJG_spectrum-Avatar{width:var(--spectrum-avatar-small-width,var(--spectrum-global-dimension-size-200));height:var(--spectrum-avatar-small-height,var(--spectrum-global-dimension-size-200));border-radius:var(--spectrum-avatar-small-border-radius,50%);-webkit-user-drag:none;-webkit-user-select:none;user-select:none;opacity:var(--spectrum-avatar-small-opacity,1);transition:box-shadow var(--spectrum-global-animation-duration-100,.13s)ease-out;border-style:none;outline:none}.IFaZJG_spectrum-Avatar.IFaZJG_is-disabled{opacity:var(--spectrum-avatar-small-opacity-disabled,.3)}@media (forced-colors:active){.IFaZJG_spectrum-Avatar.IFaZJG_is-disabled{opacity:1;border:2px solid GrayText}}
package/dist/main.js CHANGED
@@ -38,12 +38,12 @@ $parcel$export(module.exports, "Avatar", () => $cc830936d47bae2b$export$e2255cf6
38
38
 
39
39
  var $d22788318b5f79eb$exports = {};
40
40
 
41
- $parcel$export($d22788318b5f79eb$exports, "spectrum-Avatar", () => $d22788318b5f79eb$export$2e049b8d031600fb, (v) => $d22788318b5f79eb$export$2e049b8d031600fb = v);
42
41
  $parcel$export($d22788318b5f79eb$exports, "is-disabled", () => $d22788318b5f79eb$export$d35bc1e505d1ebbf, (v) => $d22788318b5f79eb$export$d35bc1e505d1ebbf = v);
43
- var $d22788318b5f79eb$export$2e049b8d031600fb;
42
+ $parcel$export($d22788318b5f79eb$exports, "spectrum-Avatar", () => $d22788318b5f79eb$export$2e049b8d031600fb, (v) => $d22788318b5f79eb$export$2e049b8d031600fb = v);
44
43
  var $d22788318b5f79eb$export$d35bc1e505d1ebbf;
45
- $d22788318b5f79eb$export$2e049b8d031600fb = "spectrum-Avatar_2ebb13";
46
- $d22788318b5f79eb$export$d35bc1e505d1ebbf = "is-disabled_2ebb13";
44
+ var $d22788318b5f79eb$export$2e049b8d031600fb;
45
+ $d22788318b5f79eb$export$d35bc1e505d1ebbf = `IFaZJG_is-disabled`;
46
+ $d22788318b5f79eb$export$2e049b8d031600fb = `IFaZJG_spectrum-Avatar`;
47
47
 
48
48
 
49
49
 
@@ -51,8 +51,8 @@ const $cc830936d47bae2b$var$DEFAULT_SIZE = "avatar-size-100";
51
51
  const $cc830936d47bae2b$var$SIZE_RE = /^size-\d+/;
52
52
  function $cc830936d47bae2b$var$Avatar(props, ref) {
53
53
  props = (0, $hTGwy$reactspectrumutils.useSlotProps)(props, "avatar");
54
- const { alt: alt = "" , isDisabled: isDisabled , size: size = $cc830936d47bae2b$var$DEFAULT_SIZE , src: src , ...otherProps } = (0, $hTGwy$reactspectrumprovider.useProviderProps)(props);
55
- const { styleProps: styleProps } = (0, $hTGwy$reactspectrumutils.useStyleProps)(otherProps);
54
+ const { alt: alt = "", isDisabled: isDisabled, size: size = $cc830936d47bae2b$var$DEFAULT_SIZE, src: src, ...otherProps } = (0, $hTGwy$reactspectrumprovider.useProviderProps)(props);
55
+ const { styleProps: styleProps } = (0, $hTGwy$reactspectrumutils.useStyleProps)(otherProps);
56
56
  const domRef = (0, $hTGwy$reactspectrumutils.useDOMRef)(ref);
57
57
  const domProps = (0, $hTGwy$reactariautils.filterDOMProps)(otherProps);
58
58
  // Casting `size` as `any` since `isNaN` expects a `number`, but we want it
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC,GACD,0CAA0C;ACX1C;;;;;;;;;;CAUC;;;;;;;ACVD,IAAA;AACA,IAAA;AADA,4CAAoC;AACpC,4CAAgC;;;;ADmBhC,MAAM,qCAAe;AACrB,MAAM,gCAAU;AAEhB,SAAS,6BAAO,KAA0B,EAAE,GAA6B;IACvE,QAAQ,CAAA,GAAA,sCAAW,EAAE,OAAO;IAC5B,MAAM,OACJ,MAAM,iBACN,WAAU,QACV,OAAO,0CACP,IAAG,EACH,GAAG,YACJ,GAAG,CAAA,GAAA,6CAAe,EAAE;IAErB,MAAM,cAAC,WAAU,EAAC,GAAG,CAAA,GAAA,uCAAY,EAAE;IACnC,MAAM,SAAS,CAAA,GAAA,mCAAQ,EAAE;IAEzB,MAAM,WAAW,CAAA,GAAA,oCAAa,EAAE;IAEhC,2EAA2E;IAC3E,2DAA2D;IAC3D,MAAM,YAAY,OAAO,SAAS,YAAa,CAAA,8BAAQ,KAAK,SAAS,CAAC,MAAM,KAAW,IACnF,CAAA,GAAA,wCAAa,EAAE,oCAAc,kCAAkC;OAC/D,CAAA,GAAA,wCAAa,EAAE,QAAQ;IAE3B,qBACE,0DAAC;QACE,GAAG,UAAU;QACb,GAAG,QAAQ;QACZ,KAAK;QACL,WAAW,CAAA,GAAA,oCAAS,EAClB,CAAA,GAAA,gEAAK,GACL,mBACA;YACE,eAAe;QACjB,GACA,WAAW;QACb,KAAK;QACL,KAAK;QACL,OAAO;YACL,GAAG,WAAW,KAAK;YACnB,GAAI,aAAa;gBAAC,QAAQ;gBAAW,OAAO;YAAS,CAAC;QACxD;;AAEN;AAEA;;CAEC,GACD,MAAM,0DAAU,CAAA,GAAA,uBAAS,EAAE;","sources":["packages/@react-spectrum/avatar/src/index.ts","packages/@react-spectrum/avatar/src/Avatar.tsx","packages/@adobe/spectrum-css-temp/components/avatar/vars.css"],"sourcesContent":["/*\n * Copyright 2021 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/// <reference types=\"css-module-types\" />\nexport {Avatar} from './Avatar';\nexport type {SpectrumAvatarProps} from '@react-types/avatar';\n","/*\n * Copyright 2021 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, dimensionValue, useDOMRef, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport React, {forwardRef} from 'react';\nimport {SpectrumAvatarProps} from '@react-types/avatar';\nimport styles from '@adobe/spectrum-css-temp/components/avatar/vars.css';\nimport {useProviderProps} from '@react-spectrum/provider';\n\nconst DEFAULT_SIZE = 'avatar-size-100';\nconst SIZE_RE = /^size-\\d+/;\n\nfunction Avatar(props: SpectrumAvatarProps, ref: DOMRef<HTMLImageElement>) {\n props = useSlotProps(props, 'avatar');\n const {\n alt = '',\n isDisabled,\n size = DEFAULT_SIZE,\n src,\n ...otherProps\n } = useProviderProps(props);\n\n const {styleProps} = useStyleProps(otherProps);\n const domRef = useDOMRef(ref);\n\n const domProps = filterDOMProps(otherProps);\n\n // Casting `size` as `any` since `isNaN` expects a `number`, but we want it\n // to handle `string` numbers; e.g. '300' as opposed to 300\n const sizeValue = typeof size !== 'number' && (SIZE_RE.test(size) || !isNaN(size as any))\n ? dimensionValue(DEFAULT_SIZE) // override disallowed size values\n : dimensionValue(size || DEFAULT_SIZE);\n\n return (\n <img\n {...styleProps}\n {...domProps}\n alt={alt}\n className={classNames(\n styles,\n 'spectrum-Avatar',\n {\n 'is-disabled': isDisabled\n },\n styleProps.className)}\n ref={domRef}\n src={src}\n style={{\n ...styleProps.style,\n ...(sizeValue && {height: sizeValue, width: sizeValue})\n }} />\n );\n}\n\n/**\n * An avatar is a thumbnail representation of an entity, such as a user or an organization.\n */\nconst _Avatar = forwardRef(Avatar);\nexport {_Avatar as Avatar};\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"],"names":[],"version":3,"file":"main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC,GACD,0CAA0C;ACX1C;;;;;;;;;;CAUC;;;;;;;ACVD,IAAA;AACA,IAAA;AADA,4CAAgC,CAAC,kBAAkB,CAAC;AACpD,4CAAoC,CAAC,sBAAsB,CAAC;;;;ADmB5D,MAAM,qCAAe;AACrB,MAAM,gCAAU;AAEhB,SAAS,6BAAO,KAA0B,EAAE,GAA6B;IACvE,QAAQ,CAAA,GAAA,sCAAW,EAAE,OAAO;IAC5B,MAAM,OACJ,MAAM,gBACN,UAAU,QACV,OAAO,yCACP,GAAG,EACH,GAAG,YACJ,GAAG,CAAA,GAAA,6CAAe,EAAE;IAErB,MAAM,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,uCAAY,EAAE;IACnC,MAAM,SAAS,CAAA,GAAA,mCAAQ,EAAE;IAEzB,MAAM,WAAW,CAAA,GAAA,oCAAa,EAAE;IAEhC,2EAA2E;IAC3E,2DAA2D;IAC3D,MAAM,YAAY,OAAO,SAAS,YAAa,CAAA,8BAAQ,KAAK,SAAS,CAAC,MAAM,KAAW,IACnF,CAAA,GAAA,wCAAa,EAAE,oCAAc,kCAAkC;OAC/D,CAAA,GAAA,wCAAa,EAAE,QAAQ;IAE3B,qBACE,0DAAC;QACE,GAAG,UAAU;QACb,GAAG,QAAQ;QACZ,KAAK;QACL,WAAW,CAAA,GAAA,oCAAS,EAClB,CAAA,GAAA,gEAAK,GACL,mBACA;YACE,eAAe;QACjB,GACA,WAAW;QACb,KAAK;QACL,KAAK;QACL,OAAO;YACL,GAAG,WAAW,KAAK;YACnB,GAAI,aAAa;gBAAC,QAAQ;gBAAW,OAAO;YAAS,CAAC;QACxD;;AAEN;AAEA;;CAEC,GACD,MAAM,0DAAU,CAAA,GAAA,uBAAS,EAAE;","sources":["packages/@react-spectrum/avatar/src/index.ts","packages/@react-spectrum/avatar/src/Avatar.tsx","packages/@adobe/spectrum-css-temp/components/avatar/vars.css"],"sourcesContent":["/*\n * Copyright 2021 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/// <reference types=\"css-module-types\" />\nexport {Avatar} from './Avatar';\nexport type {SpectrumAvatarProps} from '@react-types/avatar';\n","/*\n * Copyright 2021 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, dimensionValue, useDOMRef, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport React, {forwardRef} from 'react';\nimport {SpectrumAvatarProps} from '@react-types/avatar';\nimport styles from '@adobe/spectrum-css-temp/components/avatar/vars.css';\nimport {useProviderProps} from '@react-spectrum/provider';\n\nconst DEFAULT_SIZE = 'avatar-size-100';\nconst SIZE_RE = /^size-\\d+/;\n\nfunction Avatar(props: SpectrumAvatarProps, ref: DOMRef<HTMLImageElement>) {\n props = useSlotProps(props, 'avatar');\n const {\n alt = '',\n isDisabled,\n size = DEFAULT_SIZE,\n src,\n ...otherProps\n } = useProviderProps(props);\n\n const {styleProps} = useStyleProps(otherProps);\n const domRef = useDOMRef(ref);\n\n const domProps = filterDOMProps(otherProps);\n\n // Casting `size` as `any` since `isNaN` expects a `number`, but we want it\n // to handle `string` numbers; e.g. '300' as opposed to 300\n const sizeValue = typeof size !== 'number' && (SIZE_RE.test(size) || !isNaN(size as any))\n ? dimensionValue(DEFAULT_SIZE) // override disallowed size values\n : dimensionValue(size || DEFAULT_SIZE);\n\n return (\n <img\n {...styleProps}\n {...domProps}\n alt={alt}\n className={classNames(\n styles,\n 'spectrum-Avatar',\n {\n 'is-disabled': isDisabled\n },\n styleProps.className)}\n ref={domRef}\n src={src}\n style={{\n ...styleProps.style,\n ...(sizeValue && {height: sizeValue, width: sizeValue})\n }} />\n );\n}\n\n/**\n * An avatar is a thumbnail representation of an entity, such as a user or an organization.\n */\nconst _Avatar = forwardRef(Avatar);\nexport {_Avatar as Avatar};\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"],"names":[],"version":3,"file":"main.js.map"}
package/dist/module.js CHANGED
@@ -36,12 +36,12 @@ function $parcel$export(e, n, v, s) {
36
36
 
37
37
  var $f81b9c4eea42ecfe$exports = {};
38
38
 
39
- $parcel$export($f81b9c4eea42ecfe$exports, "spectrum-Avatar", () => $f81b9c4eea42ecfe$export$2e049b8d031600fb, (v) => $f81b9c4eea42ecfe$export$2e049b8d031600fb = v);
40
39
  $parcel$export($f81b9c4eea42ecfe$exports, "is-disabled", () => $f81b9c4eea42ecfe$export$d35bc1e505d1ebbf, (v) => $f81b9c4eea42ecfe$export$d35bc1e505d1ebbf = v);
41
- var $f81b9c4eea42ecfe$export$2e049b8d031600fb;
40
+ $parcel$export($f81b9c4eea42ecfe$exports, "spectrum-Avatar", () => $f81b9c4eea42ecfe$export$2e049b8d031600fb, (v) => $f81b9c4eea42ecfe$export$2e049b8d031600fb = v);
42
41
  var $f81b9c4eea42ecfe$export$d35bc1e505d1ebbf;
43
- $f81b9c4eea42ecfe$export$2e049b8d031600fb = "spectrum-Avatar_2ebb13";
44
- $f81b9c4eea42ecfe$export$d35bc1e505d1ebbf = "is-disabled_2ebb13";
42
+ var $f81b9c4eea42ecfe$export$2e049b8d031600fb;
43
+ $f81b9c4eea42ecfe$export$d35bc1e505d1ebbf = `IFaZJG_is-disabled`;
44
+ $f81b9c4eea42ecfe$export$2e049b8d031600fb = `IFaZJG_spectrum-Avatar`;
45
45
 
46
46
 
47
47
 
@@ -49,8 +49,8 @@ const $ab0b7b2186c39312$var$DEFAULT_SIZE = "avatar-size-100";
49
49
  const $ab0b7b2186c39312$var$SIZE_RE = /^size-\d+/;
50
50
  function $ab0b7b2186c39312$var$Avatar(props, ref) {
51
51
  props = (0, $85w8l$useSlotProps)(props, "avatar");
52
- const { alt: alt = "" , isDisabled: isDisabled , size: size = $ab0b7b2186c39312$var$DEFAULT_SIZE , src: src , ...otherProps } = (0, $85w8l$useProviderProps)(props);
53
- const { styleProps: styleProps } = (0, $85w8l$useStyleProps)(otherProps);
52
+ const { alt: alt = "", isDisabled: isDisabled, size: size = $ab0b7b2186c39312$var$DEFAULT_SIZE, src: src, ...otherProps } = (0, $85w8l$useProviderProps)(props);
53
+ const { styleProps: styleProps } = (0, $85w8l$useStyleProps)(otherProps);
54
54
  const domRef = (0, $85w8l$useDOMRef)(ref);
55
55
  const domProps = (0, $85w8l$filterDOMProps)(otherProps);
56
56
  // Casting `size` as `any` since `isNaN` expects a `number`, but we want it
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;CAUC,GACD,0CAA0C;ACX1C;;;;;;;;;;CAUC;;;;;;;ACVD,IAAA;AACA,IAAA;AADA,4CAAoC;AACpC,4CAAgC;;;;ADmBhC,MAAM,qCAAe;AACrB,MAAM,gCAAU;AAEhB,SAAS,6BAAO,KAA0B,EAAE,GAA6B;IACvE,QAAQ,CAAA,GAAA,mBAAW,EAAE,OAAO;IAC5B,MAAM,OACJ,MAAM,iBACN,WAAU,QACV,OAAO,0CACP,IAAG,EACH,GAAG,YACJ,GAAG,CAAA,GAAA,uBAAe,EAAE;IAErB,MAAM,cAAC,WAAU,EAAC,GAAG,CAAA,GAAA,oBAAY,EAAE;IACnC,MAAM,SAAS,CAAA,GAAA,gBAAQ,EAAE;IAEzB,MAAM,WAAW,CAAA,GAAA,qBAAa,EAAE;IAEhC,2EAA2E;IAC3E,2DAA2D;IAC3D,MAAM,YAAY,OAAO,SAAS,YAAa,CAAA,8BAAQ,KAAK,SAAS,CAAC,MAAM,KAAW,IACnF,CAAA,GAAA,qBAAa,EAAE,oCAAc,kCAAkC;OAC/D,CAAA,GAAA,qBAAa,EAAE,QAAQ;IAE3B,qBACE,gCAAC;QACE,GAAG,UAAU;QACb,GAAG,QAAQ;QACZ,KAAK;QACL,WAAW,CAAA,GAAA,iBAAS,EAClB,CAAA,GAAA,gEAAK,GACL,mBACA;YACE,eAAe;QACjB,GACA,WAAW;QACb,KAAK;QACL,KAAK;QACL,OAAO;YACL,GAAG,WAAW,KAAK;YACnB,GAAI,aAAa;gBAAC,QAAQ;gBAAW,OAAO;YAAS,CAAC;QACxD;;AAEN;AAEA;;CAEC,GACD,MAAM,0DAAU,CAAA,GAAA,iBAAS,EAAE;","sources":["packages/@react-spectrum/avatar/src/index.ts","packages/@react-spectrum/avatar/src/Avatar.tsx","packages/@adobe/spectrum-css-temp/components/avatar/vars.css"],"sourcesContent":["/*\n * Copyright 2021 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/// <reference types=\"css-module-types\" />\nexport {Avatar} from './Avatar';\nexport type {SpectrumAvatarProps} from '@react-types/avatar';\n","/*\n * Copyright 2021 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, dimensionValue, useDOMRef, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport React, {forwardRef} from 'react';\nimport {SpectrumAvatarProps} from '@react-types/avatar';\nimport styles from '@adobe/spectrum-css-temp/components/avatar/vars.css';\nimport {useProviderProps} from '@react-spectrum/provider';\n\nconst DEFAULT_SIZE = 'avatar-size-100';\nconst SIZE_RE = /^size-\\d+/;\n\nfunction Avatar(props: SpectrumAvatarProps, ref: DOMRef<HTMLImageElement>) {\n props = useSlotProps(props, 'avatar');\n const {\n alt = '',\n isDisabled,\n size = DEFAULT_SIZE,\n src,\n ...otherProps\n } = useProviderProps(props);\n\n const {styleProps} = useStyleProps(otherProps);\n const domRef = useDOMRef(ref);\n\n const domProps = filterDOMProps(otherProps);\n\n // Casting `size` as `any` since `isNaN` expects a `number`, but we want it\n // to handle `string` numbers; e.g. '300' as opposed to 300\n const sizeValue = typeof size !== 'number' && (SIZE_RE.test(size) || !isNaN(size as any))\n ? dimensionValue(DEFAULT_SIZE) // override disallowed size values\n : dimensionValue(size || DEFAULT_SIZE);\n\n return (\n <img\n {...styleProps}\n {...domProps}\n alt={alt}\n className={classNames(\n styles,\n 'spectrum-Avatar',\n {\n 'is-disabled': isDisabled\n },\n styleProps.className)}\n ref={domRef}\n src={src}\n style={{\n ...styleProps.style,\n ...(sizeValue && {height: sizeValue, width: sizeValue})\n }} />\n );\n}\n\n/**\n * An avatar is a thumbnail representation of an entity, such as a user or an organization.\n */\nconst _Avatar = forwardRef(Avatar);\nexport {_Avatar as Avatar};\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"],"names":[],"version":3,"file":"module.js.map"}
1
+ {"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;CAUC,GACD,0CAA0C;ACX1C;;;;;;;;;;CAUC;;;;;;;ACVD,IAAA;AACA,IAAA;AADA,4CAAgC,CAAC,kBAAkB,CAAC;AACpD,4CAAoC,CAAC,sBAAsB,CAAC;;;;ADmB5D,MAAM,qCAAe;AACrB,MAAM,gCAAU;AAEhB,SAAS,6BAAO,KAA0B,EAAE,GAA6B;IACvE,QAAQ,CAAA,GAAA,mBAAW,EAAE,OAAO;IAC5B,MAAM,OACJ,MAAM,gBACN,UAAU,QACV,OAAO,yCACP,GAAG,EACH,GAAG,YACJ,GAAG,CAAA,GAAA,uBAAe,EAAE;IAErB,MAAM,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,oBAAY,EAAE;IACnC,MAAM,SAAS,CAAA,GAAA,gBAAQ,EAAE;IAEzB,MAAM,WAAW,CAAA,GAAA,qBAAa,EAAE;IAEhC,2EAA2E;IAC3E,2DAA2D;IAC3D,MAAM,YAAY,OAAO,SAAS,YAAa,CAAA,8BAAQ,KAAK,SAAS,CAAC,MAAM,KAAW,IACnF,CAAA,GAAA,qBAAa,EAAE,oCAAc,kCAAkC;OAC/D,CAAA,GAAA,qBAAa,EAAE,QAAQ;IAE3B,qBACE,gCAAC;QACE,GAAG,UAAU;QACb,GAAG,QAAQ;QACZ,KAAK;QACL,WAAW,CAAA,GAAA,iBAAS,EAClB,CAAA,GAAA,gEAAK,GACL,mBACA;YACE,eAAe;QACjB,GACA,WAAW;QACb,KAAK;QACL,KAAK;QACL,OAAO;YACL,GAAG,WAAW,KAAK;YACnB,GAAI,aAAa;gBAAC,QAAQ;gBAAW,OAAO;YAAS,CAAC;QACxD;;AAEN;AAEA;;CAEC,GACD,MAAM,0DAAU,CAAA,GAAA,iBAAS,EAAE;","sources":["packages/@react-spectrum/avatar/src/index.ts","packages/@react-spectrum/avatar/src/Avatar.tsx","packages/@adobe/spectrum-css-temp/components/avatar/vars.css"],"sourcesContent":["/*\n * Copyright 2021 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/// <reference types=\"css-module-types\" />\nexport {Avatar} from './Avatar';\nexport type {SpectrumAvatarProps} from '@react-types/avatar';\n","/*\n * Copyright 2021 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, dimensionValue, useDOMRef, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport React, {forwardRef} from 'react';\nimport {SpectrumAvatarProps} from '@react-types/avatar';\nimport styles from '@adobe/spectrum-css-temp/components/avatar/vars.css';\nimport {useProviderProps} from '@react-spectrum/provider';\n\nconst DEFAULT_SIZE = 'avatar-size-100';\nconst SIZE_RE = /^size-\\d+/;\n\nfunction Avatar(props: SpectrumAvatarProps, ref: DOMRef<HTMLImageElement>) {\n props = useSlotProps(props, 'avatar');\n const {\n alt = '',\n isDisabled,\n size = DEFAULT_SIZE,\n src,\n ...otherProps\n } = useProviderProps(props);\n\n const {styleProps} = useStyleProps(otherProps);\n const domRef = useDOMRef(ref);\n\n const domProps = filterDOMProps(otherProps);\n\n // Casting `size` as `any` since `isNaN` expects a `number`, but we want it\n // to handle `string` numbers; e.g. '300' as opposed to 300\n const sizeValue = typeof size !== 'number' && (SIZE_RE.test(size) || !isNaN(size as any))\n ? dimensionValue(DEFAULT_SIZE) // override disallowed size values\n : dimensionValue(size || DEFAULT_SIZE);\n\n return (\n <img\n {...styleProps}\n {...domProps}\n alt={alt}\n className={classNames(\n styles,\n 'spectrum-Avatar',\n {\n 'is-disabled': isDisabled\n },\n styleProps.className)}\n ref={domRef}\n src={src}\n style={{\n ...styleProps.style,\n ...(sizeValue && {height: sizeValue, width: sizeValue})\n }} />\n );\n}\n\n/**\n * An avatar is a thumbnail representation of an entity, such as a user or an organization.\n */\nconst _Avatar = forwardRef(Avatar);\nexport {_Avatar as Avatar};\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"],"names":[],"version":3,"file":"module.js.map"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-spectrum/avatar",
3
- "version": "3.0.5-nightly.4149+a399db1e3",
3
+ "version": "3.0.5-nightly.4157+633bb4fb6",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -36,14 +36,14 @@
36
36
  "url": "https://github.com/adobe/react-spectrum"
37
37
  },
38
38
  "dependencies": {
39
- "@react-aria/utils": "3.0.0-nightly.2440+a399db1e3",
40
- "@react-spectrum/utils": "3.0.0-nightly.2440+a399db1e3",
41
- "@react-types/avatar": "3.0.3-nightly.4149+a399db1e3",
42
- "@react-types/shared": "3.0.0-nightly.2440+a399db1e3",
39
+ "@react-aria/utils": "3.0.0-nightly.2448+633bb4fb6",
40
+ "@react-spectrum/utils": "3.0.0-nightly.2448+633bb4fb6",
41
+ "@react-types/avatar": "3.0.3-nightly.4157+633bb4fb6",
42
+ "@react-types/shared": "3.0.0-nightly.2448+633bb4fb6",
43
43
  "@swc/helpers": "^0.5.0"
44
44
  },
45
45
  "devDependencies": {
46
- "@adobe/spectrum-css-temp": "3.0.0-nightly.2440+a399db1e3"
46
+ "@adobe/spectrum-css-temp": "3.0.0-nightly.2448+633bb4fb6"
47
47
  },
48
48
  "peerDependencies": {
49
49
  "@react-spectrum/provider": "^3.2.1",
@@ -52,5 +52,5 @@
52
52
  "publishConfig": {
53
53
  "access": "public"
54
54
  },
55
- "gitHead": "a399db1e314243a023f7b5c95e319eba4496604c"
55
+ "gitHead": "633bb4fb6cc205b9911a21fb81a7a70c662ec0ce"
56
56
  }