@react-spectrum/avatar 3.0.11-nightly.4555 → 3.0.11-nightly.4560
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/Avatar.main.js +68 -0
- package/dist/Avatar.main.js.map +1 -0
- package/dist/Avatar.mjs +63 -0
- package/dist/Avatar.module.js +63 -0
- package/dist/Avatar.module.js.map +1 -0
- package/dist/avatar_vars_css.main.js +14 -0
- package/dist/avatar_vars_css.main.js.map +1 -0
- package/dist/avatar_vars_css.mjs +16 -0
- package/dist/avatar_vars_css.module.js +16 -0
- package/dist/avatar_vars_css.module.js.map +1 -0
- package/dist/import.mjs +1 -71
- package/dist/main.js +2 -68
- package/dist/main.js.map +1 -1
- package/dist/module.js +1 -71
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +2 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/{main.css → vars.02b12081.css} +1 -1
- package/dist/{main.css.map → vars.02b12081.css.map} +1 -1
- package/package.json +7 -7
- package/dist/module.css +0 -24
- package/dist/module.css.map +0 -1
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
require("./vars.02b12081.css");
|
|
2
|
+
var $d22788318b5f79eb$exports = require("./avatar_vars_css.main.js");
|
|
3
|
+
var $3FJGB$reactspectrumutils = require("@react-spectrum/utils");
|
|
4
|
+
var $3FJGB$reactariautils = require("@react-aria/utils");
|
|
5
|
+
var $3FJGB$react = require("react");
|
|
6
|
+
var $3FJGB$reactspectrumprovider = require("@react-spectrum/provider");
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
function $parcel$interopDefault(a) {
|
|
10
|
+
return a && a.__esModule ? a.default : a;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function $parcel$export(e, n, v, s) {
|
|
14
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
$parcel$export(module.exports, "Avatar", () => $cc830936d47bae2b$export$e2255cf6045e8d47);
|
|
18
|
+
/*
|
|
19
|
+
* Copyright 2021 Adobe. All rights reserved.
|
|
20
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
21
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
22
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
23
|
+
*
|
|
24
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
25
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
26
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
27
|
+
* governing permissions and limitations under the License.
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
const $cc830936d47bae2b$var$DEFAULT_SIZE = "avatar-size-100";
|
|
34
|
+
const $cc830936d47bae2b$var$SIZE_RE = /^size-\d+/;
|
|
35
|
+
function $cc830936d47bae2b$var$Avatar(props, ref) {
|
|
36
|
+
props = (0, $3FJGB$reactspectrumutils.useSlotProps)(props, "avatar");
|
|
37
|
+
const { alt: alt = "", isDisabled: isDisabled, size: size = $cc830936d47bae2b$var$DEFAULT_SIZE, src: src, ...otherProps } = (0, $3FJGB$reactspectrumprovider.useProviderProps)(props);
|
|
38
|
+
const { styleProps: styleProps } = (0, $3FJGB$reactspectrumutils.useStyleProps)(otherProps);
|
|
39
|
+
const domRef = (0, $3FJGB$reactspectrumutils.useDOMRef)(ref);
|
|
40
|
+
const domProps = (0, $3FJGB$reactariautils.filterDOMProps)(otherProps);
|
|
41
|
+
// Casting `size` as `any` since `isNaN` expects a `number`, but we want it
|
|
42
|
+
// to handle `string` numbers; e.g. '300' as opposed to 300
|
|
43
|
+
const sizeValue = typeof size !== "number" && ($cc830936d47bae2b$var$SIZE_RE.test(size) || !isNaN(size)) ? (0, $3FJGB$reactspectrumutils.dimensionValue)($cc830936d47bae2b$var$DEFAULT_SIZE) // override disallowed size values
|
|
44
|
+
: (0, $3FJGB$reactspectrumutils.dimensionValue)(size || $cc830936d47bae2b$var$DEFAULT_SIZE);
|
|
45
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($3FJGB$react))).createElement("img", {
|
|
46
|
+
...styleProps,
|
|
47
|
+
...domProps,
|
|
48
|
+
alt: alt,
|
|
49
|
+
className: (0, $3FJGB$reactspectrumutils.classNames)((0, ($parcel$interopDefault($d22788318b5f79eb$exports))), "spectrum-Avatar", {
|
|
50
|
+
"is-disabled": isDisabled
|
|
51
|
+
}, styleProps.className),
|
|
52
|
+
ref: domRef,
|
|
53
|
+
src: src,
|
|
54
|
+
style: {
|
|
55
|
+
...styleProps.style,
|
|
56
|
+
...sizeValue && {
|
|
57
|
+
height: sizeValue,
|
|
58
|
+
width: sizeValue
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* An avatar is a thumbnail representation of an entity, such as a user or an organization.
|
|
65
|
+
*/ const $cc830936d47bae2b$export$e2255cf6045e8d47 = /*#__PURE__*/ (0, $3FJGB$react.forwardRef)($cc830936d47bae2b$var$Avatar);
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
//# sourceMappingURL=Avatar.main.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAUD,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,mDAAK,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/Avatar.tsx"],"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\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"],"names":[],"version":3,"file":"Avatar.main.js.map"}
|
package/dist/Avatar.mjs
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import "./vars.02b12081.css";
|
|
2
|
+
import $73onX$avatar_vars_cssmodulejs from "./avatar_vars_css.mjs";
|
|
3
|
+
import {useSlotProps as $73onX$useSlotProps, useStyleProps as $73onX$useStyleProps, useDOMRef as $73onX$useDOMRef, dimensionValue as $73onX$dimensionValue, classNames as $73onX$classNames} from "@react-spectrum/utils";
|
|
4
|
+
import {filterDOMProps as $73onX$filterDOMProps} from "@react-aria/utils";
|
|
5
|
+
import $73onX$react, {forwardRef as $73onX$forwardRef} from "react";
|
|
6
|
+
import {useProviderProps as $73onX$useProviderProps} from "@react-spectrum/provider";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
function $parcel$interopDefault(a) {
|
|
10
|
+
return a && a.__esModule ? a.default : a;
|
|
11
|
+
}
|
|
12
|
+
/*
|
|
13
|
+
* Copyright 2021 Adobe. All rights reserved.
|
|
14
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
15
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
16
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
17
|
+
*
|
|
18
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
19
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
20
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
21
|
+
* governing permissions and limitations under the License.
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
const $ab0b7b2186c39312$var$DEFAULT_SIZE = "avatar-size-100";
|
|
28
|
+
const $ab0b7b2186c39312$var$SIZE_RE = /^size-\d+/;
|
|
29
|
+
function $ab0b7b2186c39312$var$Avatar(props, ref) {
|
|
30
|
+
props = (0, $73onX$useSlotProps)(props, "avatar");
|
|
31
|
+
const { alt: alt = "", isDisabled: isDisabled, size: size = $ab0b7b2186c39312$var$DEFAULT_SIZE, src: src, ...otherProps } = (0, $73onX$useProviderProps)(props);
|
|
32
|
+
const { styleProps: styleProps } = (0, $73onX$useStyleProps)(otherProps);
|
|
33
|
+
const domRef = (0, $73onX$useDOMRef)(ref);
|
|
34
|
+
const domProps = (0, $73onX$filterDOMProps)(otherProps);
|
|
35
|
+
// Casting `size` as `any` since `isNaN` expects a `number`, but we want it
|
|
36
|
+
// to handle `string` numbers; e.g. '300' as opposed to 300
|
|
37
|
+
const sizeValue = typeof size !== "number" && ($ab0b7b2186c39312$var$SIZE_RE.test(size) || !isNaN(size)) ? (0, $73onX$dimensionValue)($ab0b7b2186c39312$var$DEFAULT_SIZE) // override disallowed size values
|
|
38
|
+
: (0, $73onX$dimensionValue)(size || $ab0b7b2186c39312$var$DEFAULT_SIZE);
|
|
39
|
+
return /*#__PURE__*/ (0, $73onX$react).createElement("img", {
|
|
40
|
+
...styleProps,
|
|
41
|
+
...domProps,
|
|
42
|
+
alt: alt,
|
|
43
|
+
className: (0, $73onX$classNames)((0, ($parcel$interopDefault($73onX$avatar_vars_cssmodulejs))), "spectrum-Avatar", {
|
|
44
|
+
"is-disabled": isDisabled
|
|
45
|
+
}, styleProps.className),
|
|
46
|
+
ref: domRef,
|
|
47
|
+
src: src,
|
|
48
|
+
style: {
|
|
49
|
+
...styleProps.style,
|
|
50
|
+
...sizeValue && {
|
|
51
|
+
height: sizeValue,
|
|
52
|
+
width: sizeValue
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* An avatar is a thumbnail representation of an entity, such as a user or an organization.
|
|
59
|
+
*/ const $ab0b7b2186c39312$export$e2255cf6045e8d47 = /*#__PURE__*/ (0, $73onX$forwardRef)($ab0b7b2186c39312$var$Avatar);
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
export {$ab0b7b2186c39312$export$e2255cf6045e8d47 as Avatar};
|
|
63
|
+
//# sourceMappingURL=Avatar.mjs.map
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import "./vars.02b12081.css";
|
|
2
|
+
import $73onX$avatar_vars_cssmodulejs from "./avatar_vars_css.module.js";
|
|
3
|
+
import {useSlotProps as $73onX$useSlotProps, useStyleProps as $73onX$useStyleProps, useDOMRef as $73onX$useDOMRef, dimensionValue as $73onX$dimensionValue, classNames as $73onX$classNames} from "@react-spectrum/utils";
|
|
4
|
+
import {filterDOMProps as $73onX$filterDOMProps} from "@react-aria/utils";
|
|
5
|
+
import $73onX$react, {forwardRef as $73onX$forwardRef} from "react";
|
|
6
|
+
import {useProviderProps as $73onX$useProviderProps} from "@react-spectrum/provider";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
function $parcel$interopDefault(a) {
|
|
10
|
+
return a && a.__esModule ? a.default : a;
|
|
11
|
+
}
|
|
12
|
+
/*
|
|
13
|
+
* Copyright 2021 Adobe. All rights reserved.
|
|
14
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
15
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
16
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
17
|
+
*
|
|
18
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
19
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
20
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
21
|
+
* governing permissions and limitations under the License.
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
const $ab0b7b2186c39312$var$DEFAULT_SIZE = "avatar-size-100";
|
|
28
|
+
const $ab0b7b2186c39312$var$SIZE_RE = /^size-\d+/;
|
|
29
|
+
function $ab0b7b2186c39312$var$Avatar(props, ref) {
|
|
30
|
+
props = (0, $73onX$useSlotProps)(props, "avatar");
|
|
31
|
+
const { alt: alt = "", isDisabled: isDisabled, size: size = $ab0b7b2186c39312$var$DEFAULT_SIZE, src: src, ...otherProps } = (0, $73onX$useProviderProps)(props);
|
|
32
|
+
const { styleProps: styleProps } = (0, $73onX$useStyleProps)(otherProps);
|
|
33
|
+
const domRef = (0, $73onX$useDOMRef)(ref);
|
|
34
|
+
const domProps = (0, $73onX$filterDOMProps)(otherProps);
|
|
35
|
+
// Casting `size` as `any` since `isNaN` expects a `number`, but we want it
|
|
36
|
+
// to handle `string` numbers; e.g. '300' as opposed to 300
|
|
37
|
+
const sizeValue = typeof size !== "number" && ($ab0b7b2186c39312$var$SIZE_RE.test(size) || !isNaN(size)) ? (0, $73onX$dimensionValue)($ab0b7b2186c39312$var$DEFAULT_SIZE) // override disallowed size values
|
|
38
|
+
: (0, $73onX$dimensionValue)(size || $ab0b7b2186c39312$var$DEFAULT_SIZE);
|
|
39
|
+
return /*#__PURE__*/ (0, $73onX$react).createElement("img", {
|
|
40
|
+
...styleProps,
|
|
41
|
+
...domProps,
|
|
42
|
+
alt: alt,
|
|
43
|
+
className: (0, $73onX$classNames)((0, ($parcel$interopDefault($73onX$avatar_vars_cssmodulejs))), "spectrum-Avatar", {
|
|
44
|
+
"is-disabled": isDisabled
|
|
45
|
+
}, styleProps.className),
|
|
46
|
+
ref: domRef,
|
|
47
|
+
src: src,
|
|
48
|
+
style: {
|
|
49
|
+
...styleProps.style,
|
|
50
|
+
...sizeValue && {
|
|
51
|
+
height: sizeValue,
|
|
52
|
+
width: sizeValue
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* An avatar is a thumbnail representation of an entity, such as a user or an organization.
|
|
59
|
+
*/ const $ab0b7b2186c39312$export$e2255cf6045e8d47 = /*#__PURE__*/ (0, $73onX$forwardRef)($ab0b7b2186c39312$var$Avatar);
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
export {$ab0b7b2186c39312$export$e2255cf6045e8d47 as Avatar};
|
|
63
|
+
//# sourceMappingURL=Avatar.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAUD,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,wDAAK,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/Avatar.tsx"],"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\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"],"names":[],"version":3,"file":"Avatar.module.js.map"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
|
|
2
|
+
function $parcel$export(e, n, v, s) {
|
|
3
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
$parcel$export(module.exports, "is-disabled", () => $d22788318b5f79eb$export$d35bc1e505d1ebbf, (v) => $d22788318b5f79eb$export$d35bc1e505d1ebbf = v);
|
|
7
|
+
$parcel$export(module.exports, "spectrum-Avatar", () => $d22788318b5f79eb$export$2e049b8d031600fb, (v) => $d22788318b5f79eb$export$2e049b8d031600fb = v);
|
|
8
|
+
var $d22788318b5f79eb$export$d35bc1e505d1ebbf;
|
|
9
|
+
var $d22788318b5f79eb$export$2e049b8d031600fb;
|
|
10
|
+
$d22788318b5f79eb$export$d35bc1e505d1ebbf = `IFaZJG_is-disabled`;
|
|
11
|
+
$d22788318b5f79eb$export$2e049b8d031600fb = `IFaZJG_spectrum-Avatar`;
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=avatar_vars_css.main.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;;;;;AAAA,IAAA;AACA,IAAA;AADA,4CAAgC,CAAC,kBAAkB,CAAC;AACpD,4CAAoC,CAAC,sBAAsB,CAAC","sources":["packages/@adobe/spectrum-css-temp/components/avatar/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":"avatar_vars_css.main.js.map"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
|
|
2
|
+
function $parcel$export(e, n, v, s) {
|
|
3
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
4
|
+
}
|
|
5
|
+
var $f81b9c4eea42ecfe$exports = {};
|
|
6
|
+
|
|
7
|
+
$parcel$export($f81b9c4eea42ecfe$exports, "is-disabled", () => $f81b9c4eea42ecfe$export$d35bc1e505d1ebbf, (v) => $f81b9c4eea42ecfe$export$d35bc1e505d1ebbf = v);
|
|
8
|
+
$parcel$export($f81b9c4eea42ecfe$exports, "spectrum-Avatar", () => $f81b9c4eea42ecfe$export$2e049b8d031600fb, (v) => $f81b9c4eea42ecfe$export$2e049b8d031600fb = v);
|
|
9
|
+
var $f81b9c4eea42ecfe$export$d35bc1e505d1ebbf;
|
|
10
|
+
var $f81b9c4eea42ecfe$export$2e049b8d031600fb;
|
|
11
|
+
$f81b9c4eea42ecfe$export$d35bc1e505d1ebbf = `IFaZJG_is-disabled`;
|
|
12
|
+
$f81b9c4eea42ecfe$export$2e049b8d031600fb = `IFaZJG_spectrum-Avatar`;
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
export {$f81b9c4eea42ecfe$exports as default};
|
|
16
|
+
//# sourceMappingURL=avatar_vars_css.mjs.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
|
|
2
|
+
function $parcel$export(e, n, v, s) {
|
|
3
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
4
|
+
}
|
|
5
|
+
var $f81b9c4eea42ecfe$exports = {};
|
|
6
|
+
|
|
7
|
+
$parcel$export($f81b9c4eea42ecfe$exports, "is-disabled", () => $f81b9c4eea42ecfe$export$d35bc1e505d1ebbf, (v) => $f81b9c4eea42ecfe$export$d35bc1e505d1ebbf = v);
|
|
8
|
+
$parcel$export($f81b9c4eea42ecfe$exports, "spectrum-Avatar", () => $f81b9c4eea42ecfe$export$2e049b8d031600fb, (v) => $f81b9c4eea42ecfe$export$2e049b8d031600fb = v);
|
|
9
|
+
var $f81b9c4eea42ecfe$export$d35bc1e505d1ebbf;
|
|
10
|
+
var $f81b9c4eea42ecfe$export$2e049b8d031600fb;
|
|
11
|
+
$f81b9c4eea42ecfe$export$d35bc1e505d1ebbf = `IFaZJG_is-disabled`;
|
|
12
|
+
$f81b9c4eea42ecfe$export$2e049b8d031600fb = `IFaZJG_spectrum-Avatar`;
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
export {$f81b9c4eea42ecfe$exports as default};
|
|
16
|
+
//# sourceMappingURL=avatar_vars_css.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;;;;;;AAAA,IAAA;AACA,IAAA;AADA,4CAAgC,CAAC,kBAAkB,CAAC;AACpD,4CAAoC,CAAC,sBAAsB,CAAC","sources":["packages/@adobe/spectrum-css-temp/components/avatar/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":"avatar_vars_css.module.js.map"}
|
package/dist/import.mjs
CHANGED
|
@@ -1,17 +1,5 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import {useSlotProps as $85w8l$useSlotProps, useStyleProps as $85w8l$useStyleProps, useDOMRef as $85w8l$useDOMRef, dimensionValue as $85w8l$dimensionValue, classNames as $85w8l$classNames} from "@react-spectrum/utils";
|
|
3
|
-
import {filterDOMProps as $85w8l$filterDOMProps} from "@react-aria/utils";
|
|
4
|
-
import $85w8l$react, {forwardRef as $85w8l$forwardRef} from "react";
|
|
5
|
-
import {useProviderProps as $85w8l$useProviderProps} from "@react-spectrum/provider";
|
|
1
|
+
import {Avatar as $ab0b7b2186c39312$export$e2255cf6045e8d47} from "./Avatar.mjs";
|
|
6
2
|
|
|
7
|
-
|
|
8
|
-
function $parcel$interopDefault(a) {
|
|
9
|
-
return a && a.__esModule ? a.default : a;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
function $parcel$export(e, n, v, s) {
|
|
13
|
-
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
14
|
-
}
|
|
15
3
|
/*
|
|
16
4
|
* Copyright 2021 Adobe. All rights reserved.
|
|
17
5
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -23,64 +11,6 @@ function $parcel$export(e, n, v, s) {
|
|
|
23
11
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
24
12
|
* governing permissions and limitations under the License.
|
|
25
13
|
*/ /// <reference types="css-module-types" />
|
|
26
|
-
/*
|
|
27
|
-
* Copyright 2021 Adobe. All rights reserved.
|
|
28
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
29
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
30
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
31
|
-
*
|
|
32
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
33
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
34
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
35
|
-
* governing permissions and limitations under the License.
|
|
36
|
-
*/
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
var $f81b9c4eea42ecfe$exports = {};
|
|
40
|
-
|
|
41
|
-
$parcel$export($f81b9c4eea42ecfe$exports, "is-disabled", () => $f81b9c4eea42ecfe$export$d35bc1e505d1ebbf, (v) => $f81b9c4eea42ecfe$export$d35bc1e505d1ebbf = v);
|
|
42
|
-
$parcel$export($f81b9c4eea42ecfe$exports, "spectrum-Avatar", () => $f81b9c4eea42ecfe$export$2e049b8d031600fb, (v) => $f81b9c4eea42ecfe$export$2e049b8d031600fb = v);
|
|
43
|
-
var $f81b9c4eea42ecfe$export$d35bc1e505d1ebbf;
|
|
44
|
-
var $f81b9c4eea42ecfe$export$2e049b8d031600fb;
|
|
45
|
-
$f81b9c4eea42ecfe$export$d35bc1e505d1ebbf = `IFaZJG_is-disabled`;
|
|
46
|
-
$f81b9c4eea42ecfe$export$2e049b8d031600fb = `IFaZJG_spectrum-Avatar`;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
const $ab0b7b2186c39312$var$DEFAULT_SIZE = "avatar-size-100";
|
|
51
|
-
const $ab0b7b2186c39312$var$SIZE_RE = /^size-\d+/;
|
|
52
|
-
function $ab0b7b2186c39312$var$Avatar(props, ref) {
|
|
53
|
-
props = (0, $85w8l$useSlotProps)(props, "avatar");
|
|
54
|
-
const { alt: alt = "", isDisabled: isDisabled, size: size = $ab0b7b2186c39312$var$DEFAULT_SIZE, src: src, ...otherProps } = (0, $85w8l$useProviderProps)(props);
|
|
55
|
-
const { styleProps: styleProps } = (0, $85w8l$useStyleProps)(otherProps);
|
|
56
|
-
const domRef = (0, $85w8l$useDOMRef)(ref);
|
|
57
|
-
const domProps = (0, $85w8l$filterDOMProps)(otherProps);
|
|
58
|
-
// Casting `size` as `any` since `isNaN` expects a `number`, but we want it
|
|
59
|
-
// to handle `string` numbers; e.g. '300' as opposed to 300
|
|
60
|
-
const sizeValue = typeof size !== "number" && ($ab0b7b2186c39312$var$SIZE_RE.test(size) || !isNaN(size)) ? (0, $85w8l$dimensionValue)($ab0b7b2186c39312$var$DEFAULT_SIZE) // override disallowed size values
|
|
61
|
-
: (0, $85w8l$dimensionValue)(size || $ab0b7b2186c39312$var$DEFAULT_SIZE);
|
|
62
|
-
return /*#__PURE__*/ (0, $85w8l$react).createElement("img", {
|
|
63
|
-
...styleProps,
|
|
64
|
-
...domProps,
|
|
65
|
-
alt: alt,
|
|
66
|
-
className: (0, $85w8l$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($f81b9c4eea42ecfe$exports))), "spectrum-Avatar", {
|
|
67
|
-
"is-disabled": isDisabled
|
|
68
|
-
}, styleProps.className),
|
|
69
|
-
ref: domRef,
|
|
70
|
-
src: src,
|
|
71
|
-
style: {
|
|
72
|
-
...styleProps.style,
|
|
73
|
-
...sizeValue && {
|
|
74
|
-
height: sizeValue,
|
|
75
|
-
width: sizeValue
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* An avatar is a thumbnail representation of an entity, such as a user or an organization.
|
|
82
|
-
*/ const $ab0b7b2186c39312$export$e2255cf6045e8d47 = /*#__PURE__*/ (0, $85w8l$forwardRef)($ab0b7b2186c39312$var$Avatar);
|
|
83
|
-
|
|
84
14
|
|
|
85
15
|
|
|
86
16
|
|
package/dist/main.js
CHANGED
|
@@ -1,19 +1,11 @@
|
|
|
1
|
-
require("./main.
|
|
2
|
-
var $hTGwy$reactspectrumutils = require("@react-spectrum/utils");
|
|
3
|
-
var $hTGwy$reactariautils = require("@react-aria/utils");
|
|
4
|
-
var $hTGwy$react = require("react");
|
|
5
|
-
var $hTGwy$reactspectrumprovider = require("@react-spectrum/provider");
|
|
1
|
+
var $cc830936d47bae2b$exports = require("./Avatar.main.js");
|
|
6
2
|
|
|
7
3
|
|
|
8
4
|
function $parcel$export(e, n, v, s) {
|
|
9
5
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
10
6
|
}
|
|
11
7
|
|
|
12
|
-
|
|
13
|
-
return a && a.__esModule ? a.default : a;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
$parcel$export(module.exports, "Avatar", () => $cc830936d47bae2b$export$e2255cf6045e8d47);
|
|
8
|
+
$parcel$export(module.exports, "Avatar", () => $cc830936d47bae2b$exports.Avatar);
|
|
17
9
|
/*
|
|
18
10
|
* Copyright 2021 Adobe. All rights reserved.
|
|
19
11
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -25,64 +17,6 @@ $parcel$export(module.exports, "Avatar", () => $cc830936d47bae2b$export$e2255cf6
|
|
|
25
17
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
26
18
|
* governing permissions and limitations under the License.
|
|
27
19
|
*/ /// <reference types="css-module-types" />
|
|
28
|
-
/*
|
|
29
|
-
* Copyright 2021 Adobe. All rights reserved.
|
|
30
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
31
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
32
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
33
|
-
*
|
|
34
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
35
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
36
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
37
|
-
* governing permissions and limitations under the License.
|
|
38
|
-
*/
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
var $d22788318b5f79eb$exports = {};
|
|
42
|
-
|
|
43
|
-
$parcel$export($d22788318b5f79eb$exports, "is-disabled", () => $d22788318b5f79eb$export$d35bc1e505d1ebbf, (v) => $d22788318b5f79eb$export$d35bc1e505d1ebbf = v);
|
|
44
|
-
$parcel$export($d22788318b5f79eb$exports, "spectrum-Avatar", () => $d22788318b5f79eb$export$2e049b8d031600fb, (v) => $d22788318b5f79eb$export$2e049b8d031600fb = v);
|
|
45
|
-
var $d22788318b5f79eb$export$d35bc1e505d1ebbf;
|
|
46
|
-
var $d22788318b5f79eb$export$2e049b8d031600fb;
|
|
47
|
-
$d22788318b5f79eb$export$d35bc1e505d1ebbf = `IFaZJG_is-disabled`;
|
|
48
|
-
$d22788318b5f79eb$export$2e049b8d031600fb = `IFaZJG_spectrum-Avatar`;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
const $cc830936d47bae2b$var$DEFAULT_SIZE = "avatar-size-100";
|
|
53
|
-
const $cc830936d47bae2b$var$SIZE_RE = /^size-\d+/;
|
|
54
|
-
function $cc830936d47bae2b$var$Avatar(props, ref) {
|
|
55
|
-
props = (0, $hTGwy$reactspectrumutils.useSlotProps)(props, "avatar");
|
|
56
|
-
const { alt: alt = "", isDisabled: isDisabled, size: size = $cc830936d47bae2b$var$DEFAULT_SIZE, src: src, ...otherProps } = (0, $hTGwy$reactspectrumprovider.useProviderProps)(props);
|
|
57
|
-
const { styleProps: styleProps } = (0, $hTGwy$reactspectrumutils.useStyleProps)(otherProps);
|
|
58
|
-
const domRef = (0, $hTGwy$reactspectrumutils.useDOMRef)(ref);
|
|
59
|
-
const domProps = (0, $hTGwy$reactariautils.filterDOMProps)(otherProps);
|
|
60
|
-
// Casting `size` as `any` since `isNaN` expects a `number`, but we want it
|
|
61
|
-
// to handle `string` numbers; e.g. '300' as opposed to 300
|
|
62
|
-
const sizeValue = typeof size !== "number" && ($cc830936d47bae2b$var$SIZE_RE.test(size) || !isNaN(size)) ? (0, $hTGwy$reactspectrumutils.dimensionValue)($cc830936d47bae2b$var$DEFAULT_SIZE) // override disallowed size values
|
|
63
|
-
: (0, $hTGwy$reactspectrumutils.dimensionValue)(size || $cc830936d47bae2b$var$DEFAULT_SIZE);
|
|
64
|
-
return /*#__PURE__*/ (0, ($parcel$interopDefault($hTGwy$react))).createElement("img", {
|
|
65
|
-
...styleProps,
|
|
66
|
-
...domProps,
|
|
67
|
-
alt: alt,
|
|
68
|
-
className: (0, $hTGwy$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($d22788318b5f79eb$exports))), "spectrum-Avatar", {
|
|
69
|
-
"is-disabled": isDisabled
|
|
70
|
-
}, styleProps.className),
|
|
71
|
-
ref: domRef,
|
|
72
|
-
src: src,
|
|
73
|
-
style: {
|
|
74
|
-
...styleProps.style,
|
|
75
|
-
...sizeValue && {
|
|
76
|
-
height: sizeValue,
|
|
77
|
-
width: sizeValue
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* An avatar is a thumbnail representation of an entity, such as a user or an organization.
|
|
84
|
-
*/ const $cc830936d47bae2b$export$e2255cf6045e8d47 = /*#__PURE__*/ (0, $hTGwy$react.forwardRef)($cc830936d47bae2b$var$Avatar);
|
|
85
|
-
|
|
86
20
|
|
|
87
21
|
|
|
88
22
|
|
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"
|
|
1
|
+
{"mappings":";;;;;;;;AAAA;;;;;;;;;;CAUC,GACD,0CAA0C","sources":["packages/@react-spectrum/avatar/src/index.ts"],"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"],"names":[],"version":3,"file":"main.js.map"}
|
package/dist/module.js
CHANGED
|
@@ -1,17 +1,5 @@
|
|
|
1
|
-
import "./module.
|
|
2
|
-
import {useSlotProps as $85w8l$useSlotProps, useStyleProps as $85w8l$useStyleProps, useDOMRef as $85w8l$useDOMRef, dimensionValue as $85w8l$dimensionValue, classNames as $85w8l$classNames} from "@react-spectrum/utils";
|
|
3
|
-
import {filterDOMProps as $85w8l$filterDOMProps} from "@react-aria/utils";
|
|
4
|
-
import $85w8l$react, {forwardRef as $85w8l$forwardRef} from "react";
|
|
5
|
-
import {useProviderProps as $85w8l$useProviderProps} from "@react-spectrum/provider";
|
|
1
|
+
import {Avatar as $ab0b7b2186c39312$export$e2255cf6045e8d47} from "./Avatar.module.js";
|
|
6
2
|
|
|
7
|
-
|
|
8
|
-
function $parcel$interopDefault(a) {
|
|
9
|
-
return a && a.__esModule ? a.default : a;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
function $parcel$export(e, n, v, s) {
|
|
13
|
-
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
14
|
-
}
|
|
15
3
|
/*
|
|
16
4
|
* Copyright 2021 Adobe. All rights reserved.
|
|
17
5
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -23,64 +11,6 @@ function $parcel$export(e, n, v, s) {
|
|
|
23
11
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
24
12
|
* governing permissions and limitations under the License.
|
|
25
13
|
*/ /// <reference types="css-module-types" />
|
|
26
|
-
/*
|
|
27
|
-
* Copyright 2021 Adobe. All rights reserved.
|
|
28
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
29
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
30
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
31
|
-
*
|
|
32
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
33
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
34
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
35
|
-
* governing permissions and limitations under the License.
|
|
36
|
-
*/
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
var $f81b9c4eea42ecfe$exports = {};
|
|
40
|
-
|
|
41
|
-
$parcel$export($f81b9c4eea42ecfe$exports, "is-disabled", () => $f81b9c4eea42ecfe$export$d35bc1e505d1ebbf, (v) => $f81b9c4eea42ecfe$export$d35bc1e505d1ebbf = v);
|
|
42
|
-
$parcel$export($f81b9c4eea42ecfe$exports, "spectrum-Avatar", () => $f81b9c4eea42ecfe$export$2e049b8d031600fb, (v) => $f81b9c4eea42ecfe$export$2e049b8d031600fb = v);
|
|
43
|
-
var $f81b9c4eea42ecfe$export$d35bc1e505d1ebbf;
|
|
44
|
-
var $f81b9c4eea42ecfe$export$2e049b8d031600fb;
|
|
45
|
-
$f81b9c4eea42ecfe$export$d35bc1e505d1ebbf = `IFaZJG_is-disabled`;
|
|
46
|
-
$f81b9c4eea42ecfe$export$2e049b8d031600fb = `IFaZJG_spectrum-Avatar`;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
const $ab0b7b2186c39312$var$DEFAULT_SIZE = "avatar-size-100";
|
|
51
|
-
const $ab0b7b2186c39312$var$SIZE_RE = /^size-\d+/;
|
|
52
|
-
function $ab0b7b2186c39312$var$Avatar(props, ref) {
|
|
53
|
-
props = (0, $85w8l$useSlotProps)(props, "avatar");
|
|
54
|
-
const { alt: alt = "", isDisabled: isDisabled, size: size = $ab0b7b2186c39312$var$DEFAULT_SIZE, src: src, ...otherProps } = (0, $85w8l$useProviderProps)(props);
|
|
55
|
-
const { styleProps: styleProps } = (0, $85w8l$useStyleProps)(otherProps);
|
|
56
|
-
const domRef = (0, $85w8l$useDOMRef)(ref);
|
|
57
|
-
const domProps = (0, $85w8l$filterDOMProps)(otherProps);
|
|
58
|
-
// Casting `size` as `any` since `isNaN` expects a `number`, but we want it
|
|
59
|
-
// to handle `string` numbers; e.g. '300' as opposed to 300
|
|
60
|
-
const sizeValue = typeof size !== "number" && ($ab0b7b2186c39312$var$SIZE_RE.test(size) || !isNaN(size)) ? (0, $85w8l$dimensionValue)($ab0b7b2186c39312$var$DEFAULT_SIZE) // override disallowed size values
|
|
61
|
-
: (0, $85w8l$dimensionValue)(size || $ab0b7b2186c39312$var$DEFAULT_SIZE);
|
|
62
|
-
return /*#__PURE__*/ (0, $85w8l$react).createElement("img", {
|
|
63
|
-
...styleProps,
|
|
64
|
-
...domProps,
|
|
65
|
-
alt: alt,
|
|
66
|
-
className: (0, $85w8l$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($f81b9c4eea42ecfe$exports))), "spectrum-Avatar", {
|
|
67
|
-
"is-disabled": isDisabled
|
|
68
|
-
}, styleProps.className),
|
|
69
|
-
ref: domRef,
|
|
70
|
-
src: src,
|
|
71
|
-
style: {
|
|
72
|
-
...styleProps.style,
|
|
73
|
-
...sizeValue && {
|
|
74
|
-
height: sizeValue,
|
|
75
|
-
width: sizeValue
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* An avatar is a thumbnail representation of an entity, such as a user or an organization.
|
|
82
|
-
*/ const $ab0b7b2186c39312$export$e2255cf6045e8d47 = /*#__PURE__*/ (0, $85w8l$forwardRef)($ab0b7b2186c39312$var$Avatar);
|
|
83
|
-
|
|
84
14
|
|
|
85
15
|
|
|
86
16
|
|
package/dist/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"
|
|
1
|
+
{"mappings":";;AAAA;;;;;;;;;;CAUC,GACD,0CAA0C","sources":["packages/@react-spectrum/avatar/src/index.ts"],"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"],"names":[],"version":3,"file":"module.js.map"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { SpectrumAvatarProps } from "@react-types/avatar";
|
|
3
|
+
import { DOMRefValue } from "@react-types/shared";
|
|
3
4
|
/**
|
|
4
5
|
* An avatar is a thumbnail representation of an entity, such as a user or an organization.
|
|
5
6
|
*/
|
|
6
|
-
export const Avatar: React.ForwardRefExoticComponent<SpectrumAvatarProps & React.RefAttributes<
|
|
7
|
+
export const Avatar: React.ForwardRefExoticComponent<SpectrumAvatarProps & React.RefAttributes<DOMRefValue<HTMLImageElement>>>;
|
|
7
8
|
export type { SpectrumAvatarProps } from '@react-types/avatar';
|
|
8
9
|
|
|
9
10
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"
|
|
1
|
+
{"mappings":";;;AAiEA;;GAEG;AACH,OAAA,MAAM,iHAA4B,CAAC;ACvDnC,YAAY,EAAC,mBAAmB,EAAC,MAAM,qBAAqB,CAAC","sources":["packages/@react-spectrum/avatar/src/packages/@react-spectrum/avatar/src/Avatar.tsx","packages/@react-spectrum/avatar/src/packages/@react-spectrum/avatar/src/index.ts","packages/@react-spectrum/avatar/src/index.ts"],"sourcesContent":[null,null,"/*\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"],"names":[],"version":3,"file":"types.d.ts.map"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAwBA;;;;;;;;;;;;;AA4BE;;;;AAKF;EAEI","sources":["packages/@adobe/spectrum-css-temp/components/avatar/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":"
|
|
1
|
+
{"mappings":"AAwBA;;;;;;;;;;;;;AA4BE;;;;AAKF;EAEI","sources":["packages/@adobe/spectrum-css-temp/components/avatar/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.02b12081.css.map"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-spectrum/avatar",
|
|
3
|
-
"version": "3.0.11-nightly.
|
|
3
|
+
"version": "3.0.11-nightly.4560+72775d272",
|
|
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.6-nightly.
|
|
42
|
-
"@react-types/shared": "3.0.0-nightly.
|
|
39
|
+
"@react-aria/utils": "3.0.0-nightly.2848+72775d272",
|
|
40
|
+
"@react-spectrum/utils": "3.0.0-nightly.2848+72775d272",
|
|
41
|
+
"@react-types/avatar": "3.0.6-nightly.4560+72775d272",
|
|
42
|
+
"@react-types/shared": "3.0.0-nightly.2848+72775d272",
|
|
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.2848+72775d272"
|
|
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": "72775d272be04cfa32d26ec821bc68513d92a72b"
|
|
56
56
|
}
|
package/dist/module.css
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
.IFaZJG_spectrum-Avatar {
|
|
2
|
-
width: var(--spectrum-avatar-small-width, var(--spectrum-global-dimension-size-200));
|
|
3
|
-
height: var(--spectrum-avatar-small-height, var(--spectrum-global-dimension-size-200));
|
|
4
|
-
border-radius: var(--spectrum-avatar-small-border-radius, 50%);
|
|
5
|
-
-webkit-user-drag: none;
|
|
6
|
-
-webkit-user-select: none;
|
|
7
|
-
user-select: none;
|
|
8
|
-
opacity: var(--spectrum-avatar-small-opacity, 1);
|
|
9
|
-
transition: box-shadow var(--spectrum-global-animation-duration-100, .13s) ease-out;
|
|
10
|
-
border-style: none;
|
|
11
|
-
outline: none;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.IFaZJG_spectrum-Avatar.IFaZJG_is-disabled {
|
|
15
|
-
opacity: var(--spectrum-avatar-small-opacity-disabled, .3);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
@media (forced-colors: active) {
|
|
19
|
-
.IFaZJG_spectrum-Avatar.IFaZJG_is-disabled {
|
|
20
|
-
opacity: 1;
|
|
21
|
-
border: 2px solid graytext;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
/*# sourceMappingURL=module.css.map */
|
package/dist/module.css.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":"AAwBA;;;;;;;;;;;;;AA4BE;;;;AAKF;EAEI","sources":["packages/@adobe/spectrum-css-temp/components/avatar/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":"module.css.map"}
|