@react-spectrum/avatar 3.0.0-nightly.3103 → 3.0.0-nightly.3121
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/main.js +27 -27
- package/dist/module.js +27 -27
- package/package.json +7 -7
package/dist/main.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
require("./main.css");
|
|
2
|
-
var $
|
|
3
|
-
var $
|
|
4
|
-
var $
|
|
5
|
-
var $
|
|
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");
|
|
6
6
|
|
|
7
7
|
function $parcel$exportWildcard(dest, source) {
|
|
8
8
|
Object.keys(source).forEach(function(key) {
|
|
@@ -26,40 +26,40 @@ function $parcel$interopDefault(a) {
|
|
|
26
26
|
function $parcel$export(e, n, v, s) {
|
|
27
27
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
28
28
|
}
|
|
29
|
-
var $
|
|
29
|
+
var $cc830936d47bae2b$exports = {};
|
|
30
30
|
|
|
31
|
-
$parcel$export($
|
|
31
|
+
$parcel$export($cc830936d47bae2b$exports, "Avatar", () => $cc830936d47bae2b$export$e2255cf6045e8d47);
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
|
|
35
|
-
var $
|
|
35
|
+
var $d22788318b5f79eb$exports = {};
|
|
36
36
|
|
|
37
|
-
$parcel$export($
|
|
38
|
-
$parcel$export($
|
|
39
|
-
var $
|
|
40
|
-
var $
|
|
41
|
-
$
|
|
42
|
-
$
|
|
37
|
+
$parcel$export($d22788318b5f79eb$exports, "spectrum-Avatar", () => $d22788318b5f79eb$export$2e049b8d031600fb, (v) => $d22788318b5f79eb$export$2e049b8d031600fb = v);
|
|
38
|
+
$parcel$export($d22788318b5f79eb$exports, "is-disabled", () => $d22788318b5f79eb$export$d35bc1e505d1ebbf, (v) => $d22788318b5f79eb$export$d35bc1e505d1ebbf = v);
|
|
39
|
+
var $d22788318b5f79eb$export$2e049b8d031600fb;
|
|
40
|
+
var $d22788318b5f79eb$export$d35bc1e505d1ebbf;
|
|
41
|
+
$d22788318b5f79eb$export$2e049b8d031600fb = "spectrum-Avatar_2ebb13";
|
|
42
|
+
$d22788318b5f79eb$export$d35bc1e505d1ebbf = "is-disabled_2ebb13";
|
|
43
43
|
|
|
44
44
|
|
|
45
45
|
|
|
46
|
-
const $
|
|
47
|
-
const $
|
|
48
|
-
function $
|
|
49
|
-
props = $
|
|
50
|
-
const { alt: alt = '' , isDisabled: isDisabled , size: size , src: src , ...otherProps } = $
|
|
51
|
-
const { styleProps: styleProps } = $
|
|
52
|
-
const domRef = $
|
|
53
|
-
const domProps = $
|
|
46
|
+
const $cc830936d47bae2b$var$DEFAULT_SIZE = 'avatar-size-100';
|
|
47
|
+
const $cc830936d47bae2b$var$SIZE_RE = /^size-\d+/;
|
|
48
|
+
function $cc830936d47bae2b$var$Avatar(props, ref) {
|
|
49
|
+
props = $hTGwy$reactspectrumutils.useSlotProps(props, 'avatar');
|
|
50
|
+
const { alt: alt = '' , isDisabled: isDisabled , size: size , src: src , ...otherProps } = $hTGwy$reactspectrumprovider.useProviderProps(props);
|
|
51
|
+
const { styleProps: styleProps } = $hTGwy$reactspectrumutils.useStyleProps(otherProps);
|
|
52
|
+
const domRef = $hTGwy$reactspectrumutils.useDOMRef(ref);
|
|
53
|
+
const domProps = $hTGwy$reactariautils.filterDOMProps(otherProps);
|
|
54
54
|
// Casting `size` as `any` since `isNaN` expects a `number`, but we want it
|
|
55
55
|
// to handle `string` numbers; e.g. '300' as opposed to 300
|
|
56
|
-
const sizeValue = typeof size !== 'number' && ($
|
|
57
|
-
: $
|
|
58
|
-
return(/*#__PURE__*/ ($parcel$interopDefault($
|
|
56
|
+
const sizeValue = typeof size !== 'number' && ($cc830936d47bae2b$var$SIZE_RE.test(size) || !isNaN(size)) ? $hTGwy$reactspectrumutils.dimensionValue($cc830936d47bae2b$var$DEFAULT_SIZE) // override disallowed size values
|
|
57
|
+
: $hTGwy$reactspectrumutils.dimensionValue(size || $cc830936d47bae2b$var$DEFAULT_SIZE);
|
|
58
|
+
return(/*#__PURE__*/ ($parcel$interopDefault($hTGwy$react)).createElement("img", {
|
|
59
59
|
...styleProps,
|
|
60
60
|
...domProps,
|
|
61
61
|
alt: alt,
|
|
62
|
-
className: $
|
|
62
|
+
className: $hTGwy$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($d22788318b5f79eb$exports)), 'spectrum-Avatar', {
|
|
63
63
|
'is-disabled': isDisabled
|
|
64
64
|
}, styleProps.className),
|
|
65
65
|
ref: domRef,
|
|
@@ -75,10 +75,10 @@ function $b2100e1779e6b01d$var$Avatar(props, ref) {
|
|
|
75
75
|
}
|
|
76
76
|
/**
|
|
77
77
|
* An avatar is a thumbnail representation of an entity, such as a user or an organization.
|
|
78
|
-
*/ const $
|
|
78
|
+
*/ const $cc830936d47bae2b$export$e2255cf6045e8d47 = /*#__PURE__*/ $hTGwy$react.forwardRef($cc830936d47bae2b$var$Avatar);
|
|
79
79
|
|
|
80
80
|
|
|
81
|
-
$parcel$exportWildcard(module.exports, $
|
|
81
|
+
$parcel$exportWildcard(module.exports, $cc830936d47bae2b$exports);
|
|
82
82
|
|
|
83
83
|
|
|
84
84
|
//# sourceMappingURL=main.js.map
|
package/dist/module.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "./main.css";
|
|
2
|
-
import {useSlotProps as $
|
|
3
|
-
import {filterDOMProps as $
|
|
4
|
-
import $
|
|
5
|
-
import {useProviderProps as $
|
|
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";
|
|
6
6
|
|
|
7
7
|
function $parcel$interopDefault(a) {
|
|
8
8
|
return a && a.__esModule ? a.default : a;
|
|
@@ -10,40 +10,40 @@ function $parcel$interopDefault(a) {
|
|
|
10
10
|
function $parcel$export(e, n, v, s) {
|
|
11
11
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
12
12
|
}
|
|
13
|
-
var $
|
|
13
|
+
var $ab0b7b2186c39312$exports = {};
|
|
14
14
|
|
|
15
|
-
$parcel$export($
|
|
15
|
+
$parcel$export($ab0b7b2186c39312$exports, "Avatar", () => $ab0b7b2186c39312$export$e2255cf6045e8d47);
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
var $
|
|
19
|
+
var $f81b9c4eea42ecfe$exports = {};
|
|
20
20
|
|
|
21
|
-
$parcel$export($
|
|
22
|
-
$parcel$export($
|
|
23
|
-
var $
|
|
24
|
-
var $
|
|
25
|
-
$
|
|
26
|
-
$
|
|
21
|
+
$parcel$export($f81b9c4eea42ecfe$exports, "spectrum-Avatar", () => $f81b9c4eea42ecfe$export$2e049b8d031600fb, (v) => $f81b9c4eea42ecfe$export$2e049b8d031600fb = v);
|
|
22
|
+
$parcel$export($f81b9c4eea42ecfe$exports, "is-disabled", () => $f81b9c4eea42ecfe$export$d35bc1e505d1ebbf, (v) => $f81b9c4eea42ecfe$export$d35bc1e505d1ebbf = v);
|
|
23
|
+
var $f81b9c4eea42ecfe$export$2e049b8d031600fb;
|
|
24
|
+
var $f81b9c4eea42ecfe$export$d35bc1e505d1ebbf;
|
|
25
|
+
$f81b9c4eea42ecfe$export$2e049b8d031600fb = "spectrum-Avatar_2ebb13";
|
|
26
|
+
$f81b9c4eea42ecfe$export$d35bc1e505d1ebbf = "is-disabled_2ebb13";
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
const $
|
|
31
|
-
const $
|
|
32
|
-
function $
|
|
33
|
-
props = $
|
|
34
|
-
const { alt: alt = '' , isDisabled: isDisabled , size: size , src: src , ...otherProps } = $
|
|
35
|
-
const { styleProps: styleProps } = $
|
|
36
|
-
const domRef = $
|
|
37
|
-
const domProps = $
|
|
30
|
+
const $ab0b7b2186c39312$var$DEFAULT_SIZE = 'avatar-size-100';
|
|
31
|
+
const $ab0b7b2186c39312$var$SIZE_RE = /^size-\d+/;
|
|
32
|
+
function $ab0b7b2186c39312$var$Avatar(props, ref) {
|
|
33
|
+
props = $85w8l$useSlotProps(props, 'avatar');
|
|
34
|
+
const { alt: alt = '' , isDisabled: isDisabled , size: size , src: src , ...otherProps } = $85w8l$useProviderProps(props);
|
|
35
|
+
const { styleProps: styleProps } = $85w8l$useStyleProps(otherProps);
|
|
36
|
+
const domRef = $85w8l$useDOMRef(ref);
|
|
37
|
+
const domProps = $85w8l$filterDOMProps(otherProps);
|
|
38
38
|
// Casting `size` as `any` since `isNaN` expects a `number`, but we want it
|
|
39
39
|
// to handle `string` numbers; e.g. '300' as opposed to 300
|
|
40
|
-
const sizeValue = typeof size !== 'number' && ($
|
|
41
|
-
: $
|
|
42
|
-
return(/*#__PURE__*/ $
|
|
40
|
+
const sizeValue = typeof size !== 'number' && ($ab0b7b2186c39312$var$SIZE_RE.test(size) || !isNaN(size)) ? $85w8l$dimensionValue($ab0b7b2186c39312$var$DEFAULT_SIZE) // override disallowed size values
|
|
41
|
+
: $85w8l$dimensionValue(size || $ab0b7b2186c39312$var$DEFAULT_SIZE);
|
|
42
|
+
return(/*#__PURE__*/ $85w8l$react.createElement("img", {
|
|
43
43
|
...styleProps,
|
|
44
44
|
...domProps,
|
|
45
45
|
alt: alt,
|
|
46
|
-
className: $
|
|
46
|
+
className: $85w8l$classNames((/*@__PURE__*/$parcel$interopDefault($f81b9c4eea42ecfe$exports)), 'spectrum-Avatar', {
|
|
47
47
|
'is-disabled': isDisabled
|
|
48
48
|
}, styleProps.className),
|
|
49
49
|
ref: domRef,
|
|
@@ -59,10 +59,10 @@ function $8849a664c31dd3e9$var$Avatar(props, ref) {
|
|
|
59
59
|
}
|
|
60
60
|
/**
|
|
61
61
|
* An avatar is a thumbnail representation of an entity, such as a user or an organization.
|
|
62
|
-
*/ const $
|
|
62
|
+
*/ const $ab0b7b2186c39312$export$e2255cf6045e8d47 = /*#__PURE__*/ $85w8l$forwardRef($ab0b7b2186c39312$var$Avatar);
|
|
63
63
|
|
|
64
64
|
|
|
65
65
|
|
|
66
66
|
|
|
67
|
-
export {$
|
|
67
|
+
export {$ab0b7b2186c39312$export$e2255cf6045e8d47 as Avatar};
|
|
68
68
|
//# sourceMappingURL=module.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-spectrum/avatar",
|
|
3
|
-
"version": "3.0.0-nightly.
|
|
3
|
+
"version": "3.0.0-nightly.3121+a936263b4",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -32,13 +32,13 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@babel/runtime": "^7.6.2",
|
|
35
|
-
"@react-aria/utils": "3.0.0-nightly.
|
|
36
|
-
"@react-spectrum/utils": "3.0.0-nightly.
|
|
37
|
-
"@react-types/avatar": "3.0.0-nightly.
|
|
38
|
-
"@react-types/shared": "3.0.0-nightly.
|
|
35
|
+
"@react-aria/utils": "3.0.0-nightly.1425+a936263b4",
|
|
36
|
+
"@react-spectrum/utils": "3.0.0-nightly.1425+a936263b4",
|
|
37
|
+
"@react-types/avatar": "3.0.0-nightly.3121+a936263b4",
|
|
38
|
+
"@react-types/shared": "3.0.0-nightly.1425+a936263b4"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@adobe/spectrum-css-temp": "3.0.0-nightly.
|
|
41
|
+
"@adobe/spectrum-css-temp": "3.0.0-nightly.1425+a936263b4"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"@react-spectrum/provider": "^3.2.1",
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"publishConfig": {
|
|
48
48
|
"access": "public"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "a936263b487f59451634a27c97ccfa90614656d5"
|
|
51
51
|
}
|