@react-spectrum/avatar 3.0.7-nightly.4230 → 3.0.7-nightly.4245
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 +2 -0
- package/dist/main.js +2 -0
- package/dist/main.js.map +1 -1
- package/dist/module.js +2 -0
- package/dist/module.js.map +1 -1
- package/package.json +7 -7
package/dist/import.mjs
CHANGED
|
@@ -4,9 +4,11 @@ import {filterDOMProps as $85w8l$filterDOMProps} from "@react-aria/utils";
|
|
|
4
4
|
import $85w8l$react, {forwardRef as $85w8l$forwardRef} from "react";
|
|
5
5
|
import {useProviderProps as $85w8l$useProviderProps} from "@react-spectrum/provider";
|
|
6
6
|
|
|
7
|
+
|
|
7
8
|
function $parcel$interopDefault(a) {
|
|
8
9
|
return a && a.__esModule ? a.default : a;
|
|
9
10
|
}
|
|
11
|
+
|
|
10
12
|
function $parcel$export(e, n, v, s) {
|
|
11
13
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
12
14
|
}
|
package/dist/main.js
CHANGED
|
@@ -4,9 +4,11 @@ var $hTGwy$reactariautils = require("@react-aria/utils");
|
|
|
4
4
|
var $hTGwy$react = require("react");
|
|
5
5
|
var $hTGwy$reactspectrumprovider = require("@react-spectrum/provider");
|
|
6
6
|
|
|
7
|
+
|
|
7
8
|
function $parcel$export(e, n, v, s) {
|
|
8
9
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
9
10
|
}
|
|
11
|
+
|
|
10
12
|
function $parcel$interopDefault(a) {
|
|
11
13
|
return a && a.__esModule ? a.default : a;
|
|
12
14
|
}
|
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"
|
|
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,IAAI,CAAC,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,SAAS;QACtB,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
|
@@ -4,9 +4,11 @@ import {filterDOMProps as $85w8l$filterDOMProps} from "@react-aria/utils";
|
|
|
4
4
|
import $85w8l$react, {forwardRef as $85w8l$forwardRef} from "react";
|
|
5
5
|
import {useProviderProps as $85w8l$useProviderProps} from "@react-spectrum/provider";
|
|
6
6
|
|
|
7
|
+
|
|
7
8
|
function $parcel$interopDefault(a) {
|
|
8
9
|
return a && a.__esModule ? a.default : a;
|
|
9
10
|
}
|
|
11
|
+
|
|
10
12
|
function $parcel$export(e, n, v, s) {
|
|
11
13
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
12
14
|
}
|
package/dist/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"
|
|
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,IAAI,CAAC,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,SAAS;QACtB,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.7-nightly.
|
|
3
|
+
"version": "3.0.7-nightly.4245+403ec27bf",
|
|
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.
|
|
40
|
-
"@react-spectrum/utils": "3.0.0-nightly.
|
|
41
|
-
"@react-types/avatar": "3.0.4-nightly.
|
|
42
|
-
"@react-types/shared": "3.0.0-nightly.
|
|
39
|
+
"@react-aria/utils": "3.0.0-nightly.2534+403ec27bf",
|
|
40
|
+
"@react-spectrum/utils": "3.0.0-nightly.2534+403ec27bf",
|
|
41
|
+
"@react-types/avatar": "3.0.4-nightly.4245+403ec27bf",
|
|
42
|
+
"@react-types/shared": "3.0.0-nightly.2534+403ec27bf",
|
|
43
43
|
"@swc/helpers": "^0.5.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@adobe/spectrum-css-temp": "3.0.0-nightly.
|
|
46
|
+
"@adobe/spectrum-css-temp": "3.0.0-nightly.2534+403ec27bf"
|
|
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": "
|
|
55
|
+
"gitHead": "403ec27bf8f5af6e19529b78782526f680c171ca"
|
|
56
56
|
}
|