@react-spectrum/icon 3.8.11 → 3.9.0
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 +4 -4
- package/dist/main.js +6 -6
- package/dist/main.js.map +1 -1
- package/dist/module.js +4 -4
- package/dist/module.js.map +1 -1
- package/dist/types/src/index.d.ts +7 -0
- package/package.json +12 -27
- package/src/index.ts +7 -6
- package/dist/Icon.main.js +0 -71
- package/dist/Icon.main.js.map +0 -1
- package/dist/Icon.mjs +0 -66
- package/dist/Icon.module.js +0 -66
- package/dist/Icon.module.js.map +0 -1
- package/dist/Illustration.main.js +0 -46
- package/dist/Illustration.main.js.map +0 -1
- package/dist/Illustration.mjs +0 -37
- package/dist/Illustration.module.js +0 -37
- package/dist/Illustration.module.js.map +0 -1
- package/dist/UIIcon.main.js +0 -62
- package/dist/UIIcon.main.js.map +0 -1
- package/dist/UIIcon.mjs +0 -57
- package/dist/UIIcon.module.js +0 -57
- package/dist/UIIcon.module.js.map +0 -1
- package/dist/icon.248b9ee8.css +0 -264
- package/dist/icon.248b9ee8.css.map +0 -1
- package/dist/icon_vars_css.main.js +0 -152
- package/dist/icon_vars_css.main.js.map +0 -1
- package/dist/icon_vars_css.mjs +0 -154
- package/dist/icon_vars_css.module.js +0 -154
- package/dist/icon_vars_css.module.js.map +0 -1
- package/dist/types.d.ts +0 -70
- package/dist/types.d.ts.map +0 -1
- package/src/Icon.tsx +0 -105
- package/src/Illustration.tsx +0 -69
- package/src/UIIcon.tsx +0 -74
package/dist/import.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {Icon as $
|
|
2
|
-
import {UIIcon as $
|
|
3
|
-
import {Illustration as $
|
|
1
|
+
import {Icon as $9c2cd5f25a417161$re_export$Icon} from "@adobe/react-spectrum/Icon";
|
|
2
|
+
import {UIIcon as $9c2cd5f25a417161$re_export$UIIcon} from "@adobe/react-spectrum/private/icon/UIIcon";
|
|
3
|
+
import {Illustration as $9c2cd5f25a417161$re_export$Illustration} from "@adobe/react-spectrum/private/icon/Illustration";
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
6
|
* Copyright 2020 Adobe. All rights reserved.
|
|
@@ -18,5 +18,5 @@ import {Illustration as $88bb85359d3a4aed$export$d43c2e2ca9b2c105} from "./Illus
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
export {$
|
|
21
|
+
export {$9c2cd5f25a417161$re_export$Icon as Icon, $9c2cd5f25a417161$re_export$UIIcon as UIIcon, $9c2cd5f25a417161$re_export$Illustration as Illustration};
|
|
22
22
|
//# sourceMappingURL=module.js.map
|
package/dist/main.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
var $
|
|
2
|
-
var $
|
|
3
|
-
var $
|
|
1
|
+
var $2mtlH$adobereactspectrumIcon = require("@adobe/react-spectrum/Icon");
|
|
2
|
+
var $2mtlH$adobereactspectrumprivateiconUIIcon = require("@adobe/react-spectrum/private/icon/UIIcon");
|
|
3
|
+
var $2mtlH$adobereactspectrumprivateiconIllustration = require("@adobe/react-spectrum/private/icon/Illustration");
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
function $parcel$export(e, n, v, s) {
|
|
7
7
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
$parcel$export(module.exports, "Icon", ()
|
|
11
|
-
$parcel$export(module.exports, "UIIcon", ()
|
|
12
|
-
$parcel$export(module.exports, "Illustration", ()
|
|
10
|
+
$parcel$export(module.exports, "Icon", function () { return $2mtlH$adobereactspectrumIcon.Icon; });
|
|
11
|
+
$parcel$export(module.exports, "UIIcon", function () { return $2mtlH$adobereactspectrumprivateiconUIIcon.UIIcon; });
|
|
12
|
+
$parcel$export(module.exports, "Illustration", function () { return $2mtlH$adobereactspectrumprivateiconIllustration.Illustration; });
|
|
13
13
|
/*
|
|
14
14
|
* Copyright 2020 Adobe. All rights reserved.
|
|
15
15
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C","sources":["packages/@react-spectrum/icon/src/index.ts"],"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/// <reference types=\"css-module-types\" />\n\nexport {Icon} from '
|
|
1
|
+
{"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C","sources":["packages/@react-spectrum/icon/src/index.ts"],"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/// <reference types=\"css-module-types\" />\n\nexport {Icon} from '@adobe/react-spectrum/Icon';\n\nexport {UIIcon} from '@adobe/react-spectrum/private/icon/UIIcon';\nexport {Illustration} from '@adobe/react-spectrum/private/icon/Illustration';\nexport type {IconProps} from '@adobe/react-spectrum/Icon';\nexport type {IconPropsWithoutChildren} from '@adobe/react-spectrum/private/icon/Icon';\nexport type {IllustrationProps, IllustrationPropsWithoutChildren} from '@adobe/react-spectrum/private/icon/Illustration';\nexport type {UIIconProps, UIIconPropsWithoutChildren} from '@adobe/react-spectrum/private/icon/UIIcon';\n"],"names":[],"version":3,"file":"main.js.map"}
|
package/dist/module.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {Icon as $
|
|
2
|
-
import {UIIcon as $
|
|
3
|
-
import {Illustration as $
|
|
1
|
+
import {Icon as $9c2cd5f25a417161$re_export$Icon} from "@adobe/react-spectrum/Icon";
|
|
2
|
+
import {UIIcon as $9c2cd5f25a417161$re_export$UIIcon} from "@adobe/react-spectrum/private/icon/UIIcon";
|
|
3
|
+
import {Illustration as $9c2cd5f25a417161$re_export$Illustration} from "@adobe/react-spectrum/private/icon/Illustration";
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
6
|
* Copyright 2020 Adobe. All rights reserved.
|
|
@@ -18,5 +18,5 @@ import {Illustration as $88bb85359d3a4aed$export$d43c2e2ca9b2c105} from "./Illus
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
export {$
|
|
21
|
+
export {$9c2cd5f25a417161$re_export$Icon as Icon, $9c2cd5f25a417161$re_export$UIIcon as UIIcon, $9c2cd5f25a417161$re_export$Illustration as Illustration};
|
|
22
22
|
//# sourceMappingURL=module.js.map
|
package/dist/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C","sources":["packages/@react-spectrum/icon/src/index.ts"],"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/// <reference types=\"css-module-types\" />\n\nexport {Icon} from '
|
|
1
|
+
{"mappings":";;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C","sources":["packages/@react-spectrum/icon/src/index.ts"],"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/// <reference types=\"css-module-types\" />\n\nexport {Icon} from '@adobe/react-spectrum/Icon';\n\nexport {UIIcon} from '@adobe/react-spectrum/private/icon/UIIcon';\nexport {Illustration} from '@adobe/react-spectrum/private/icon/Illustration';\nexport type {IconProps} from '@adobe/react-spectrum/Icon';\nexport type {IconPropsWithoutChildren} from '@adobe/react-spectrum/private/icon/Icon';\nexport type {IllustrationProps, IllustrationPropsWithoutChildren} from '@adobe/react-spectrum/private/icon/Illustration';\nexport type {UIIconProps, UIIconPropsWithoutChildren} from '@adobe/react-spectrum/private/icon/UIIcon';\n"],"names":[],"version":3,"file":"module.js.map"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { Icon } from '@adobe/react-spectrum/Icon';
|
|
2
|
+
export { UIIcon } from '@adobe/react-spectrum/private/icon/UIIcon';
|
|
3
|
+
export { Illustration } from '@adobe/react-spectrum/private/icon/Illustration';
|
|
4
|
+
export type { IconProps } from '@adobe/react-spectrum/Icon';
|
|
5
|
+
export type { IconPropsWithoutChildren } from '@adobe/react-spectrum/private/icon/Icon';
|
|
6
|
+
export type { IllustrationProps, IllustrationPropsWithoutChildren } from '@adobe/react-spectrum/private/icon/Illustration';
|
|
7
|
+
export type { UIIconProps, UIIconPropsWithoutChildren } from '@adobe/react-spectrum/private/icon/UIIcon';
|
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-spectrum/icon",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.9.0",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/main.js",
|
|
7
7
|
"module": "dist/module.js",
|
|
8
8
|
"exports": {
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
"./dist/types.d.ts",
|
|
12
|
-
"./
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"
|
|
9
|
+
".": {
|
|
10
|
+
"source": "./src/index.ts",
|
|
11
|
+
"types": "./dist/types/src/index.d.ts",
|
|
12
|
+
"import": "./dist/import.mjs",
|
|
13
|
+
"require": "./dist/main.js"
|
|
14
|
+
},
|
|
15
|
+
"./package.json": "./package.json"
|
|
16
16
|
},
|
|
17
|
-
"types": "dist/types.d.ts",
|
|
17
|
+
"types": "dist/types/src/index.d.ts",
|
|
18
18
|
"source": "src/index.ts",
|
|
19
19
|
"files": [
|
|
20
20
|
"dist",
|
|
@@ -24,37 +24,22 @@
|
|
|
24
24
|
"*.css"
|
|
25
25
|
],
|
|
26
26
|
"targets": {
|
|
27
|
-
"
|
|
28
|
-
"includeNodeModules": [
|
|
29
|
-
"@adobe/spectrum-css-temp"
|
|
30
|
-
]
|
|
31
|
-
},
|
|
32
|
-
"module": {
|
|
33
|
-
"includeNodeModules": [
|
|
34
|
-
"@adobe/spectrum-css-temp"
|
|
35
|
-
]
|
|
36
|
-
}
|
|
27
|
+
"types": false
|
|
37
28
|
},
|
|
38
29
|
"repository": {
|
|
39
30
|
"type": "git",
|
|
40
31
|
"url": "https://github.com/adobe/react-spectrum"
|
|
41
32
|
},
|
|
42
33
|
"dependencies": {
|
|
43
|
-
"@react-
|
|
44
|
-
"@react-spectrum/utils": "^3.12.11",
|
|
45
|
-
"@react-types/shared": "^3.33.0",
|
|
34
|
+
"@adobe/react-spectrum": "3.47.0",
|
|
46
35
|
"@swc/helpers": "^0.5.0"
|
|
47
36
|
},
|
|
48
|
-
"devDependencies": {
|
|
49
|
-
"@adobe/spectrum-css-temp": "3.0.0-alpha.1"
|
|
50
|
-
},
|
|
51
37
|
"peerDependencies": {
|
|
52
|
-
"@react-spectrum/provider": "^3.0.0",
|
|
53
38
|
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1",
|
|
54
39
|
"react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
|
|
55
40
|
},
|
|
56
41
|
"publishConfig": {
|
|
57
42
|
"access": "public"
|
|
58
43
|
},
|
|
59
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "a6999bdf494a2e9c0381a5881908328bdd22ddae"
|
|
60
45
|
}
|
package/src/index.ts
CHANGED
|
@@ -12,10 +12,11 @@
|
|
|
12
12
|
|
|
13
13
|
/// <reference types="css-module-types" />
|
|
14
14
|
|
|
15
|
-
export {Icon} from '
|
|
16
|
-
export {UIIcon} from './UIIcon';
|
|
17
|
-
export {Illustration} from './Illustration';
|
|
15
|
+
export {Icon} from '@adobe/react-spectrum/Icon';
|
|
18
16
|
|
|
19
|
-
export
|
|
20
|
-
export
|
|
21
|
-
export type {
|
|
17
|
+
export {UIIcon} from '@adobe/react-spectrum/private/icon/UIIcon';
|
|
18
|
+
export {Illustration} from '@adobe/react-spectrum/private/icon/Illustration';
|
|
19
|
+
export type {IconProps} from '@adobe/react-spectrum/Icon';
|
|
20
|
+
export type {IconPropsWithoutChildren} from '@adobe/react-spectrum/private/icon/Icon';
|
|
21
|
+
export type {IllustrationProps, IllustrationPropsWithoutChildren} from '@adobe/react-spectrum/private/icon/Illustration';
|
|
22
|
+
export type {UIIconProps, UIIconPropsWithoutChildren} from '@adobe/react-spectrum/private/icon/UIIcon';
|
package/dist/Icon.main.js
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
require("./icon.248b9ee8.css");
|
|
2
|
-
var $5ef39e0c80b682c7$exports = require("./icon_vars_css.main.js");
|
|
3
|
-
var $hx3aW$reactspectrumutils = require("@react-spectrum/utils");
|
|
4
|
-
var $hx3aW$reactariautils = require("@react-aria/utils");
|
|
5
|
-
var $hx3aW$reactspectrumprovider = require("@react-spectrum/provider");
|
|
6
|
-
var $hx3aW$react = require("react");
|
|
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, "Icon", () => $2f297c87d3047269$export$f04a61298a47a40f);
|
|
18
|
-
/*
|
|
19
|
-
* Copyright 2020 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
|
-
function $2f297c87d3047269$var$iconColorValue(value) {
|
|
34
|
-
return `var(--spectrum-semantic-${value}-color-icon)`;
|
|
35
|
-
}
|
|
36
|
-
const $2f297c87d3047269$var$iconStyleProps = {
|
|
37
|
-
...(0, $hx3aW$reactspectrumutils.baseStyleProps),
|
|
38
|
-
color: [
|
|
39
|
-
'color',
|
|
40
|
-
$2f297c87d3047269$var$iconColorValue
|
|
41
|
-
]
|
|
42
|
-
};
|
|
43
|
-
function $2f297c87d3047269$export$f04a61298a47a40f(props) {
|
|
44
|
-
props = (0, $hx3aW$reactspectrumutils.useSlotProps)(props, 'icon');
|
|
45
|
-
let { children: children, size: size, 'aria-label': ariaLabel, 'aria-hidden': ariaHidden, ...otherProps } = props;
|
|
46
|
-
let { styleProps: styleProps } = (0, $hx3aW$reactspectrumutils.useStyleProps)(otherProps, $2f297c87d3047269$var$iconStyleProps);
|
|
47
|
-
let provider;
|
|
48
|
-
try {
|
|
49
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
50
|
-
provider = (0, $hx3aW$reactspectrumprovider.useProvider)();
|
|
51
|
-
} catch {
|
|
52
|
-
// ignore
|
|
53
|
-
}
|
|
54
|
-
let scale = 'M';
|
|
55
|
-
if (provider != null) scale = provider.scale === 'large' ? 'L' : 'M';
|
|
56
|
-
if (!ariaHidden) ariaHidden = undefined;
|
|
57
|
-
// Use user specified size, falling back to provider scale if size is undef
|
|
58
|
-
let iconSize = size ? size : scale;
|
|
59
|
-
return /*#__PURE__*/ (0, ($parcel$interopDefault($hx3aW$react))).cloneElement(children, {
|
|
60
|
-
...(0, $hx3aW$reactariautils.filterDOMProps)(otherProps),
|
|
61
|
-
...styleProps,
|
|
62
|
-
focusable: 'false',
|
|
63
|
-
'aria-label': ariaLabel,
|
|
64
|
-
'aria-hidden': ariaLabel ? ariaHidden || undefined : true,
|
|
65
|
-
role: 'img',
|
|
66
|
-
className: (0, $hx3aW$reactspectrumutils.classNames)((0, ($parcel$interopDefault($5ef39e0c80b682c7$exports))), children.props.className, 'spectrum-Icon', `spectrum-Icon--size${iconSize}`, styleProps.className)
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
//# sourceMappingURL=Icon.main.js.map
|
package/dist/Icon.main.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAuCD,SAAS,qCAAe,KAAqB;IAC3C,OAAO,CAAC,wBAAwB,EAAE,MAAM,YAAY,CAAC;AACvD;AAEA,MAAM,uCAAgC;IACpC,GAAG,CAAA,GAAA,wCAAa,CAAC;IACjB,OAAO;QAAC;QAAS;KAAe;AAClC;AAKO,SAAS,0CAAK,KAAgB;IACnC,QAAQ,CAAA,GAAA,sCAAW,EAAE,OAAO;IAC5B,IAAI,YACF,QAAQ,QACR,IAAI,EACJ,cAAc,SAAS,EACvB,eAAe,UAAU,EACzB,GAAG,YACJ,GAAG;IACJ,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,uCAAY,EAAE,YAAY;IAE7C,IAAI;IACJ,IAAI;QACF,sDAAsD;QACtD,WAAW,CAAA,GAAA,wCAAU;IACvB,EAAE,OAAM;IACN,SAAS;IACX;IACA,IAAI,QAAQ;IACZ,IAAI,YAAY,MACd,QAAQ,SAAS,KAAK,KAAK,UAAU,MAAM;IAE7C,IAAI,CAAC,YACH,aAAa;IAGf,2EAA2E;IAC3E,IAAI,WAAW,OAAO,OAAO;IAE7B,qBAAO,CAAA,GAAA,sCAAI,EAAE,YAAY,CAAC,UAAU;QAClC,GAAG,CAAA,GAAA,oCAAa,EAAE,WAAW;QAC7B,GAAG,UAAU;QACb,WAAW;QACX,cAAc;QACd,eAAgB,YAAa,cAAc,YAAa;QACxD,MAAM;QACN,WAAW,CAAA,GAAA,oCAAS,EAClB,CAAA,GAAA,mDAAK,GACL,SAAS,KAAK,CAAC,SAAS,EACxB,iBACA,CAAC,mBAAmB,EAAE,UAAU,EAChC,WAAW,SAAS;IACxB;AACF","sources":["packages/@react-spectrum/icon/src/Icon.tsx"],"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\nimport {AriaLabelingProps, DOMProps, IconColorValue, StyleProps} from '@react-types/shared';\nimport {baseStyleProps, classNames, StyleHandlers, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {ProviderContext, useProvider} from '@react-spectrum/provider';\nimport React, {JSX, ReactElement} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/icon/vars.css';\n\nexport interface IconProps extends DOMProps, AriaLabelingProps, StyleProps {\n /**\n * A screen reader only label for the Icon.\n */\n 'aria-label'?: string,\n /**\n * The content to display. Should be an SVG.\n */\n children: ReactElement<any>,\n /**\n * Size of Icon (changes based on scale).\n */\n size?: 'XXS' | 'XS' | 'S' | 'M' | 'L' |'XL' | 'XXL',\n /**\n * A slot to place the icon in.\n * @default 'icon'\n */\n slot?: string,\n /**\n * Indicates whether the element is exposed to an accessibility API.\n */\n 'aria-hidden'?: boolean | 'false' | 'true',\n /**\n * Color of the Icon.\n */\n color?: IconColorValue\n}\n\nexport type IconPropsWithoutChildren = Omit<IconProps, 'children'>;\n\nfunction iconColorValue(value: IconColorValue) {\n return `var(--spectrum-semantic-${value}-color-icon)`;\n}\n\nconst iconStyleProps: StyleHandlers = {\n ...baseStyleProps,\n color: ['color', iconColorValue]\n};\n\n/**\n * Spectrum icons are clear, minimal, and consistent across platforms. They follow the focused and rational principles of the design system in both metaphor and style.\n */\nexport function Icon(props: IconProps): JSX.Element {\n props = useSlotProps(props, 'icon');\n let {\n children,\n size,\n 'aria-label': ariaLabel,\n 'aria-hidden': ariaHidden,\n ...otherProps\n } = props;\n let {styleProps} = useStyleProps(otherProps, iconStyleProps);\n\n let provider: undefined | ProviderContext;\n try {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n provider = useProvider();\n } catch {\n // ignore\n }\n let scale = 'M';\n if (provider != null) {\n scale = provider.scale === 'large' ? 'L' : 'M';\n }\n if (!ariaHidden) {\n ariaHidden = undefined;\n }\n\n // Use user specified size, falling back to provider scale if size is undef\n let iconSize = size ? size : scale;\n\n return React.cloneElement(children, {\n ...filterDOMProps(otherProps),\n ...styleProps,\n focusable: 'false',\n 'aria-label': ariaLabel,\n 'aria-hidden': (ariaLabel ? (ariaHidden || undefined) : true),\n role: 'img',\n className: classNames(\n styles,\n children.props.className,\n 'spectrum-Icon',\n `spectrum-Icon--size${iconSize}`,\n styleProps.className)\n });\n}\n"],"names":[],"version":3,"file":"Icon.main.js.map"}
|
package/dist/Icon.mjs
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import "./icon.248b9ee8.css";
|
|
2
|
-
import $hJE0A$icon_vars_cssmodulejs from "./icon_vars_css.mjs";
|
|
3
|
-
import {baseStyleProps as $hJE0A$baseStyleProps, useSlotProps as $hJE0A$useSlotProps, useStyleProps as $hJE0A$useStyleProps, classNames as $hJE0A$classNames} from "@react-spectrum/utils";
|
|
4
|
-
import {filterDOMProps as $hJE0A$filterDOMProps} from "@react-aria/utils";
|
|
5
|
-
import {useProvider as $hJE0A$useProvider} from "@react-spectrum/provider";
|
|
6
|
-
import $hJE0A$react from "react";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
function $parcel$interopDefault(a) {
|
|
10
|
-
return a && a.__esModule ? a.default : a;
|
|
11
|
-
}
|
|
12
|
-
/*
|
|
13
|
-
* Copyright 2020 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
|
-
function $6bfb67578ee6effd$var$iconColorValue(value) {
|
|
28
|
-
return `var(--spectrum-semantic-${value}-color-icon)`;
|
|
29
|
-
}
|
|
30
|
-
const $6bfb67578ee6effd$var$iconStyleProps = {
|
|
31
|
-
...(0, $hJE0A$baseStyleProps),
|
|
32
|
-
color: [
|
|
33
|
-
'color',
|
|
34
|
-
$6bfb67578ee6effd$var$iconColorValue
|
|
35
|
-
]
|
|
36
|
-
};
|
|
37
|
-
function $6bfb67578ee6effd$export$f04a61298a47a40f(props) {
|
|
38
|
-
props = (0, $hJE0A$useSlotProps)(props, 'icon');
|
|
39
|
-
let { children: children, size: size, 'aria-label': ariaLabel, 'aria-hidden': ariaHidden, ...otherProps } = props;
|
|
40
|
-
let { styleProps: styleProps } = (0, $hJE0A$useStyleProps)(otherProps, $6bfb67578ee6effd$var$iconStyleProps);
|
|
41
|
-
let provider;
|
|
42
|
-
try {
|
|
43
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
44
|
-
provider = (0, $hJE0A$useProvider)();
|
|
45
|
-
} catch {
|
|
46
|
-
// ignore
|
|
47
|
-
}
|
|
48
|
-
let scale = 'M';
|
|
49
|
-
if (provider != null) scale = provider.scale === 'large' ? 'L' : 'M';
|
|
50
|
-
if (!ariaHidden) ariaHidden = undefined;
|
|
51
|
-
// Use user specified size, falling back to provider scale if size is undef
|
|
52
|
-
let iconSize = size ? size : scale;
|
|
53
|
-
return /*#__PURE__*/ (0, $hJE0A$react).cloneElement(children, {
|
|
54
|
-
...(0, $hJE0A$filterDOMProps)(otherProps),
|
|
55
|
-
...styleProps,
|
|
56
|
-
focusable: 'false',
|
|
57
|
-
'aria-label': ariaLabel,
|
|
58
|
-
'aria-hidden': ariaLabel ? ariaHidden || undefined : true,
|
|
59
|
-
role: 'img',
|
|
60
|
-
className: (0, $hJE0A$classNames)((0, ($parcel$interopDefault($hJE0A$icon_vars_cssmodulejs))), children.props.className, 'spectrum-Icon', `spectrum-Icon--size${iconSize}`, styleProps.className)
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
export {$6bfb67578ee6effd$export$f04a61298a47a40f as Icon};
|
|
66
|
-
//# sourceMappingURL=Icon.module.js.map
|
package/dist/Icon.module.js
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import "./icon.248b9ee8.css";
|
|
2
|
-
import $hJE0A$icon_vars_cssmodulejs from "./icon_vars_css.module.js";
|
|
3
|
-
import {baseStyleProps as $hJE0A$baseStyleProps, useSlotProps as $hJE0A$useSlotProps, useStyleProps as $hJE0A$useStyleProps, classNames as $hJE0A$classNames} from "@react-spectrum/utils";
|
|
4
|
-
import {filterDOMProps as $hJE0A$filterDOMProps} from "@react-aria/utils";
|
|
5
|
-
import {useProvider as $hJE0A$useProvider} from "@react-spectrum/provider";
|
|
6
|
-
import $hJE0A$react from "react";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
function $parcel$interopDefault(a) {
|
|
10
|
-
return a && a.__esModule ? a.default : a;
|
|
11
|
-
}
|
|
12
|
-
/*
|
|
13
|
-
* Copyright 2020 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
|
-
function $6bfb67578ee6effd$var$iconColorValue(value) {
|
|
28
|
-
return `var(--spectrum-semantic-${value}-color-icon)`;
|
|
29
|
-
}
|
|
30
|
-
const $6bfb67578ee6effd$var$iconStyleProps = {
|
|
31
|
-
...(0, $hJE0A$baseStyleProps),
|
|
32
|
-
color: [
|
|
33
|
-
'color',
|
|
34
|
-
$6bfb67578ee6effd$var$iconColorValue
|
|
35
|
-
]
|
|
36
|
-
};
|
|
37
|
-
function $6bfb67578ee6effd$export$f04a61298a47a40f(props) {
|
|
38
|
-
props = (0, $hJE0A$useSlotProps)(props, 'icon');
|
|
39
|
-
let { children: children, size: size, 'aria-label': ariaLabel, 'aria-hidden': ariaHidden, ...otherProps } = props;
|
|
40
|
-
let { styleProps: styleProps } = (0, $hJE0A$useStyleProps)(otherProps, $6bfb67578ee6effd$var$iconStyleProps);
|
|
41
|
-
let provider;
|
|
42
|
-
try {
|
|
43
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
44
|
-
provider = (0, $hJE0A$useProvider)();
|
|
45
|
-
} catch {
|
|
46
|
-
// ignore
|
|
47
|
-
}
|
|
48
|
-
let scale = 'M';
|
|
49
|
-
if (provider != null) scale = provider.scale === 'large' ? 'L' : 'M';
|
|
50
|
-
if (!ariaHidden) ariaHidden = undefined;
|
|
51
|
-
// Use user specified size, falling back to provider scale if size is undef
|
|
52
|
-
let iconSize = size ? size : scale;
|
|
53
|
-
return /*#__PURE__*/ (0, $hJE0A$react).cloneElement(children, {
|
|
54
|
-
...(0, $hJE0A$filterDOMProps)(otherProps),
|
|
55
|
-
...styleProps,
|
|
56
|
-
focusable: 'false',
|
|
57
|
-
'aria-label': ariaLabel,
|
|
58
|
-
'aria-hidden': ariaLabel ? ariaHidden || undefined : true,
|
|
59
|
-
role: 'img',
|
|
60
|
-
className: (0, $hJE0A$classNames)((0, ($parcel$interopDefault($hJE0A$icon_vars_cssmodulejs))), children.props.className, 'spectrum-Icon', `spectrum-Icon--size${iconSize}`, styleProps.className)
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
export {$6bfb67578ee6effd$export$f04a61298a47a40f as Icon};
|
|
66
|
-
//# sourceMappingURL=Icon.module.js.map
|
package/dist/Icon.module.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAuCD,SAAS,qCAAe,KAAqB;IAC3C,OAAO,CAAC,wBAAwB,EAAE,MAAM,YAAY,CAAC;AACvD;AAEA,MAAM,uCAAgC;IACpC,GAAG,CAAA,GAAA,qBAAa,CAAC;IACjB,OAAO;QAAC;QAAS;KAAe;AAClC;AAKO,SAAS,0CAAK,KAAgB;IACnC,QAAQ,CAAA,GAAA,mBAAW,EAAE,OAAO;IAC5B,IAAI,YACF,QAAQ,QACR,IAAI,EACJ,cAAc,SAAS,EACvB,eAAe,UAAU,EACzB,GAAG,YACJ,GAAG;IACJ,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,oBAAY,EAAE,YAAY;IAE7C,IAAI;IACJ,IAAI;QACF,sDAAsD;QACtD,WAAW,CAAA,GAAA,kBAAU;IACvB,EAAE,OAAM;IACN,SAAS;IACX;IACA,IAAI,QAAQ;IACZ,IAAI,YAAY,MACd,QAAQ,SAAS,KAAK,KAAK,UAAU,MAAM;IAE7C,IAAI,CAAC,YACH,aAAa;IAGf,2EAA2E;IAC3E,IAAI,WAAW,OAAO,OAAO;IAE7B,qBAAO,CAAA,GAAA,YAAI,EAAE,YAAY,CAAC,UAAU;QAClC,GAAG,CAAA,GAAA,qBAAa,EAAE,WAAW;QAC7B,GAAG,UAAU;QACb,WAAW;QACX,cAAc;QACd,eAAgB,YAAa,cAAc,YAAa;QACxD,MAAM;QACN,WAAW,CAAA,GAAA,iBAAS,EAClB,CAAA,GAAA,sDAAK,GACL,SAAS,KAAK,CAAC,SAAS,EACxB,iBACA,CAAC,mBAAmB,EAAE,UAAU,EAChC,WAAW,SAAS;IACxB;AACF","sources":["packages/@react-spectrum/icon/src/Icon.tsx"],"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\nimport {AriaLabelingProps, DOMProps, IconColorValue, StyleProps} from '@react-types/shared';\nimport {baseStyleProps, classNames, StyleHandlers, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {ProviderContext, useProvider} from '@react-spectrum/provider';\nimport React, {JSX, ReactElement} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/icon/vars.css';\n\nexport interface IconProps extends DOMProps, AriaLabelingProps, StyleProps {\n /**\n * A screen reader only label for the Icon.\n */\n 'aria-label'?: string,\n /**\n * The content to display. Should be an SVG.\n */\n children: ReactElement<any>,\n /**\n * Size of Icon (changes based on scale).\n */\n size?: 'XXS' | 'XS' | 'S' | 'M' | 'L' |'XL' | 'XXL',\n /**\n * A slot to place the icon in.\n * @default 'icon'\n */\n slot?: string,\n /**\n * Indicates whether the element is exposed to an accessibility API.\n */\n 'aria-hidden'?: boolean | 'false' | 'true',\n /**\n * Color of the Icon.\n */\n color?: IconColorValue\n}\n\nexport type IconPropsWithoutChildren = Omit<IconProps, 'children'>;\n\nfunction iconColorValue(value: IconColorValue) {\n return `var(--spectrum-semantic-${value}-color-icon)`;\n}\n\nconst iconStyleProps: StyleHandlers = {\n ...baseStyleProps,\n color: ['color', iconColorValue]\n};\n\n/**\n * Spectrum icons are clear, minimal, and consistent across platforms. They follow the focused and rational principles of the design system in both metaphor and style.\n */\nexport function Icon(props: IconProps): JSX.Element {\n props = useSlotProps(props, 'icon');\n let {\n children,\n size,\n 'aria-label': ariaLabel,\n 'aria-hidden': ariaHidden,\n ...otherProps\n } = props;\n let {styleProps} = useStyleProps(otherProps, iconStyleProps);\n\n let provider: undefined | ProviderContext;\n try {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n provider = useProvider();\n } catch {\n // ignore\n }\n let scale = 'M';\n if (provider != null) {\n scale = provider.scale === 'large' ? 'L' : 'M';\n }\n if (!ariaHidden) {\n ariaHidden = undefined;\n }\n\n // Use user specified size, falling back to provider scale if size is undef\n let iconSize = size ? size : scale;\n\n return React.cloneElement(children, {\n ...filterDOMProps(otherProps),\n ...styleProps,\n focusable: 'false',\n 'aria-label': ariaLabel,\n 'aria-hidden': (ariaLabel ? (ariaHidden || undefined) : true),\n role: 'img',\n className: classNames(\n styles,\n children.props.className,\n 'spectrum-Icon',\n `spectrum-Icon--size${iconSize}`,\n styleProps.className)\n });\n}\n"],"names":[],"version":3,"file":"Icon.module.js.map"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
var $fIMBi$reactariautils = require("@react-aria/utils");
|
|
2
|
-
var $fIMBi$react = require("react");
|
|
3
|
-
var $fIMBi$reactspectrumutils = require("@react-spectrum/utils");
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
function $parcel$interopDefault(a) {
|
|
7
|
-
return a && a.__esModule ? a.default : a;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
function $parcel$export(e, n, v, s) {
|
|
11
|
-
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
$parcel$export(module.exports, "Illustration", () => $ebfd4d66f1999633$export$d43c2e2ca9b2c105);
|
|
15
|
-
/*
|
|
16
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
17
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
18
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
19
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
20
|
-
*
|
|
21
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
22
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
23
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
24
|
-
* governing permissions and limitations under the License.
|
|
25
|
-
*/
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
function $ebfd4d66f1999633$export$d43c2e2ca9b2c105(props) {
|
|
29
|
-
props = (0, $fIMBi$reactspectrumutils.useSlotProps)(props, 'illustration');
|
|
30
|
-
let { children: children, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, 'aria-hidden': ariaHidden, ...otherProps } = props;
|
|
31
|
-
let { styleProps: styleProps } = (0, $fIMBi$reactspectrumutils.useStyleProps)(otherProps);
|
|
32
|
-
let hasLabel = ariaLabel || ariaLabelledby;
|
|
33
|
-
if (!ariaHidden) ariaHidden = undefined;
|
|
34
|
-
return /*#__PURE__*/ (0, ($parcel$interopDefault($fIMBi$react))).cloneElement(children, {
|
|
35
|
-
...(0, $fIMBi$reactariautils.filterDOMProps)(otherProps),
|
|
36
|
-
...styleProps,
|
|
37
|
-
focusable: 'false',
|
|
38
|
-
'aria-label': ariaLabel,
|
|
39
|
-
'aria-labelledby': ariaLabelledby,
|
|
40
|
-
'aria-hidden': ariaHidden,
|
|
41
|
-
role: hasLabel ? 'img' : undefined
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
//# sourceMappingURL=Illustration.main.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;AAgCM,SAAS,0CAAa,KAAwB;IACnD,QAAQ,CAAA,GAAA,sCAAW,EAAE,OAAO;IAC5B,IAAI,YACF,QAAQ,EACR,cAAc,SAAS,EACvB,mBAAmB,cAAc,EACjC,eAAe,UAAU,EACzB,GAAG,YACJ,GAAG;IACJ,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,uCAAY,EAAE;IAEjC,IAAI,WAAW,aAAa;IAE5B,IAAI,CAAC,YACH,aAAa;IAGf,qBAAO,CAAA,GAAA,sCAAI,EAAE,YAAY,CAAC,UAAU;QAClC,GAAG,CAAA,GAAA,oCAAa,EAAE,WAAW;QAC7B,GAAG,UAAU;QACb,WAAW;QACX,cAAc;QACd,mBAAmB;QACnB,eAAe;QACf,MAAM,WAAW,QAAQ;IAC3B;AACF","sources":["packages/@react-spectrum/icon/src/Illustration.tsx"],"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\nimport {AriaLabelingProps, DOMProps, StyleProps} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport React, {JSX, ReactElement} from 'react';\nimport {useSlotProps, useStyleProps} from '@react-spectrum/utils';\n\nexport interface IllustrationProps extends DOMProps, AriaLabelingProps, StyleProps {\n /**\n * A screen reader only label for the Illustration.\n */\n 'aria-label'?: string,\n /**\n * The content to display. Should be an SVG.\n */\n children: ReactElement<any>,\n /**\n * A slot to place the illustration in.\n * @default 'illustration'\n */\n slot?: string,\n /**\n * Indicates whether the element is exposed to an accessibility API.\n */\n 'aria-hidden'?: boolean | 'false' | 'true'\n}\n\nexport type IllustrationPropsWithoutChildren = Omit<IllustrationProps, 'children'>;\n\n/**\n * Wrapper component for illustrations. Use this to wrap your svg element for a custom illustration.\n */\nexport function Illustration(props: IllustrationProps): JSX.Element {\n props = useSlotProps(props, 'illustration');\n let {\n children,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n 'aria-hidden': ariaHidden,\n ...otherProps\n } = props;\n let {styleProps} = useStyleProps(otherProps);\n\n let hasLabel = ariaLabel || ariaLabelledby;\n\n if (!ariaHidden) {\n ariaHidden = undefined;\n }\n\n return React.cloneElement(children, {\n ...filterDOMProps(otherProps),\n ...styleProps,\n focusable: 'false',\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n 'aria-hidden': ariaHidden,\n role: hasLabel ? 'img' : undefined\n });\n}\n"],"names":[],"version":3,"file":"Illustration.main.js.map"}
|
package/dist/Illustration.mjs
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import {filterDOMProps as $2nyUy$filterDOMProps} from "@react-aria/utils";
|
|
2
|
-
import $2nyUy$react from "react";
|
|
3
|
-
import {useSlotProps as $2nyUy$useSlotProps, useStyleProps as $2nyUy$useStyleProps} from "@react-spectrum/utils";
|
|
4
|
-
|
|
5
|
-
/*
|
|
6
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
7
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
8
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
9
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
12
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
13
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
14
|
-
* governing permissions and limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
function $88bb85359d3a4aed$export$d43c2e2ca9b2c105(props) {
|
|
19
|
-
props = (0, $2nyUy$useSlotProps)(props, 'illustration');
|
|
20
|
-
let { children: children, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, 'aria-hidden': ariaHidden, ...otherProps } = props;
|
|
21
|
-
let { styleProps: styleProps } = (0, $2nyUy$useStyleProps)(otherProps);
|
|
22
|
-
let hasLabel = ariaLabel || ariaLabelledby;
|
|
23
|
-
if (!ariaHidden) ariaHidden = undefined;
|
|
24
|
-
return /*#__PURE__*/ (0, $2nyUy$react).cloneElement(children, {
|
|
25
|
-
...(0, $2nyUy$filterDOMProps)(otherProps),
|
|
26
|
-
...styleProps,
|
|
27
|
-
focusable: 'false',
|
|
28
|
-
'aria-label': ariaLabel,
|
|
29
|
-
'aria-labelledby': ariaLabelledby,
|
|
30
|
-
'aria-hidden': ariaHidden,
|
|
31
|
-
role: hasLabel ? 'img' : undefined
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
export {$88bb85359d3a4aed$export$d43c2e2ca9b2c105 as Illustration};
|
|
37
|
-
//# sourceMappingURL=Illustration.module.js.map
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import {filterDOMProps as $2nyUy$filterDOMProps} from "@react-aria/utils";
|
|
2
|
-
import $2nyUy$react from "react";
|
|
3
|
-
import {useSlotProps as $2nyUy$useSlotProps, useStyleProps as $2nyUy$useStyleProps} from "@react-spectrum/utils";
|
|
4
|
-
|
|
5
|
-
/*
|
|
6
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
7
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
8
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
9
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
12
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
13
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
14
|
-
* governing permissions and limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
function $88bb85359d3a4aed$export$d43c2e2ca9b2c105(props) {
|
|
19
|
-
props = (0, $2nyUy$useSlotProps)(props, 'illustration');
|
|
20
|
-
let { children: children, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, 'aria-hidden': ariaHidden, ...otherProps } = props;
|
|
21
|
-
let { styleProps: styleProps } = (0, $2nyUy$useStyleProps)(otherProps);
|
|
22
|
-
let hasLabel = ariaLabel || ariaLabelledby;
|
|
23
|
-
if (!ariaHidden) ariaHidden = undefined;
|
|
24
|
-
return /*#__PURE__*/ (0, $2nyUy$react).cloneElement(children, {
|
|
25
|
-
...(0, $2nyUy$filterDOMProps)(otherProps),
|
|
26
|
-
...styleProps,
|
|
27
|
-
focusable: 'false',
|
|
28
|
-
'aria-label': ariaLabel,
|
|
29
|
-
'aria-labelledby': ariaLabelledby,
|
|
30
|
-
'aria-hidden': ariaHidden,
|
|
31
|
-
role: hasLabel ? 'img' : undefined
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
export {$88bb85359d3a4aed$export$d43c2e2ca9b2c105 as Illustration};
|
|
37
|
-
//# sourceMappingURL=Illustration.module.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";;;;AAAA;;;;;;;;;;CAUC;;;AAgCM,SAAS,0CAAa,KAAwB;IACnD,QAAQ,CAAA,GAAA,mBAAW,EAAE,OAAO;IAC5B,IAAI,YACF,QAAQ,EACR,cAAc,SAAS,EACvB,mBAAmB,cAAc,EACjC,eAAe,UAAU,EACzB,GAAG,YACJ,GAAG;IACJ,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,oBAAY,EAAE;IAEjC,IAAI,WAAW,aAAa;IAE5B,IAAI,CAAC,YACH,aAAa;IAGf,qBAAO,CAAA,GAAA,YAAI,EAAE,YAAY,CAAC,UAAU;QAClC,GAAG,CAAA,GAAA,qBAAa,EAAE,WAAW;QAC7B,GAAG,UAAU;QACb,WAAW;QACX,cAAc;QACd,mBAAmB;QACnB,eAAe;QACf,MAAM,WAAW,QAAQ;IAC3B;AACF","sources":["packages/@react-spectrum/icon/src/Illustration.tsx"],"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\nimport {AriaLabelingProps, DOMProps, StyleProps} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport React, {JSX, ReactElement} from 'react';\nimport {useSlotProps, useStyleProps} from '@react-spectrum/utils';\n\nexport interface IllustrationProps extends DOMProps, AriaLabelingProps, StyleProps {\n /**\n * A screen reader only label for the Illustration.\n */\n 'aria-label'?: string,\n /**\n * The content to display. Should be an SVG.\n */\n children: ReactElement<any>,\n /**\n * A slot to place the illustration in.\n * @default 'illustration'\n */\n slot?: string,\n /**\n * Indicates whether the element is exposed to an accessibility API.\n */\n 'aria-hidden'?: boolean | 'false' | 'true'\n}\n\nexport type IllustrationPropsWithoutChildren = Omit<IllustrationProps, 'children'>;\n\n/**\n * Wrapper component for illustrations. Use this to wrap your svg element for a custom illustration.\n */\nexport function Illustration(props: IllustrationProps): JSX.Element {\n props = useSlotProps(props, 'illustration');\n let {\n children,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n 'aria-hidden': ariaHidden,\n ...otherProps\n } = props;\n let {styleProps} = useStyleProps(otherProps);\n\n let hasLabel = ariaLabel || ariaLabelledby;\n\n if (!ariaHidden) {\n ariaHidden = undefined;\n }\n\n return React.cloneElement(children, {\n ...filterDOMProps(otherProps),\n ...styleProps,\n focusable: 'false',\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n 'aria-hidden': ariaHidden,\n role: hasLabel ? 'img' : undefined\n });\n}\n"],"names":[],"version":3,"file":"Illustration.module.js.map"}
|
package/dist/UIIcon.main.js
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
require("./icon.248b9ee8.css");
|
|
2
|
-
var $5ef39e0c80b682c7$exports = require("./icon_vars_css.main.js");
|
|
3
|
-
var $anCtz$reactspectrumutils = require("@react-spectrum/utils");
|
|
4
|
-
var $anCtz$reactariautils = require("@react-aria/utils");
|
|
5
|
-
var $anCtz$reactspectrumprovider = require("@react-spectrum/provider");
|
|
6
|
-
var $anCtz$react = require("react");
|
|
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, "UIIcon", () => $722df481e3c1f593$export$906cc5990ff10700);
|
|
18
|
-
/*
|
|
19
|
-
* Copyright 2020 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
|
-
function $722df481e3c1f593$export$906cc5990ff10700(props) {
|
|
34
|
-
props = (0, $anCtz$reactspectrumutils.useSlotProps)(props, 'icon');
|
|
35
|
-
let { children: children, 'aria-label': ariaLabel, 'aria-hidden': ariaHidden, ...otherProps } = props;
|
|
36
|
-
let { styleProps: styleProps } = (0, $anCtz$reactspectrumutils.useStyleProps)(otherProps);
|
|
37
|
-
let provider;
|
|
38
|
-
try {
|
|
39
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
40
|
-
provider = (0, $anCtz$reactspectrumprovider.useProvider)();
|
|
41
|
-
} catch {
|
|
42
|
-
// ignore
|
|
43
|
-
}
|
|
44
|
-
let scale = 'M';
|
|
45
|
-
if (provider != null) scale = provider.scale === 'large' ? 'L' : 'M';
|
|
46
|
-
if (!ariaHidden) ariaHidden = undefined;
|
|
47
|
-
return /*#__PURE__*/ (0, ($parcel$interopDefault($anCtz$react))).cloneElement(children, {
|
|
48
|
-
...(0, $anCtz$reactariautils.filterDOMProps)(otherProps),
|
|
49
|
-
...styleProps,
|
|
50
|
-
scale: scale,
|
|
51
|
-
focusable: 'false',
|
|
52
|
-
'aria-label': ariaLabel,
|
|
53
|
-
'aria-hidden': ariaLabel ? ariaHidden || undefined : true,
|
|
54
|
-
role: 'img',
|
|
55
|
-
className: (0, $anCtz$reactspectrumutils.classNames)((0, ($parcel$interopDefault($5ef39e0c80b682c7$exports))), children.props.className, 'spectrum-Icon', {
|
|
56
|
-
[`spectrum-UIIcon-${children.type['displayName']}`]: children.type['displayName']
|
|
57
|
-
}, styleProps.className)
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
//# sourceMappingURL=UIIcon.main.js.map
|
package/dist/UIIcon.main.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAoBM,SAAS,0CAAO,KAAkB;IACvC,QAAQ,CAAA,GAAA,sCAAW,EAAE,OAAO;IAC5B,IAAI,YACF,QAAQ,EACR,cAAc,SAAS,EACvB,eAAe,UAAU,EACzB,GAAG,YACJ,GAAG;IAEJ,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,uCAAY,EAAE;IACjC,IAAI;IACJ,IAAI;QACF,sDAAsD;QACtD,WAAW,CAAA,GAAA,wCAAU;IACvB,EAAE,OAAM;IACN,SAAS;IACX;IACA,IAAI,QAAQ;IACZ,IAAI,YAAY,MACd,QAAQ,SAAS,KAAK,KAAK,UAAU,MAAM;IAG7C,IAAI,CAAC,YACH,aAAa;IAGf,qBAAO,CAAA,GAAA,sCAAI,EAAE,YAAY,CAAC,UAAU;QAClC,GAAG,CAAA,GAAA,oCAAa,EAAE,WAAW;QAC7B,GAAG,UAAU;eACb;QACA,WAAW;QACX,cAAc;QACd,eAAgB,YAAa,cAAc,YAAa;QACxD,MAAM;QACN,WAAW,CAAA,GAAA,oCAAS,EAClB,CAAA,GAAA,mDAAK,GACL,SAAS,KAAK,CAAC,SAAS,EACxB,iBACA;YACE,CAAC,CAAC,gBAAgB,EAAE,SAAS,IAAI,CAAC,cAAc,EAAE,CAAC,EAAE,SAAS,IAAI,CAAC,cAAc;QACnF,GACA,WAAW,SAAS;IACxB;AACF","sources":["packages/@react-spectrum/icon/src/UIIcon.tsx"],"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\nimport {AriaLabelingProps, DOMProps, StyleProps} from '@react-types/shared';\nimport {classNames, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {ProviderContext, useProvider} from '@react-spectrum/provider';\nimport React, {JSX, ReactElement} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/icon/vars.css';\n\nexport interface UIIconProps extends DOMProps, AriaLabelingProps, StyleProps {\n children: ReactElement<any>,\n slot?: string,\n /**\n * Indicates whether the element is exposed to an accessibility API.\n */\n 'aria-hidden'?: boolean | 'false' | 'true'\n}\n\nexport type UIIconPropsWithoutChildren = Omit<UIIconProps, 'children'>;\n\nexport function UIIcon(props: UIIconProps): JSX.Element {\n props = useSlotProps(props, 'icon');\n let {\n children,\n 'aria-label': ariaLabel,\n 'aria-hidden': ariaHidden,\n ...otherProps\n } = props;\n\n let {styleProps} = useStyleProps(otherProps);\n let provider: undefined | ProviderContext;\n try {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n provider = useProvider();\n } catch {\n // ignore\n }\n let scale = 'M';\n if (provider != null) {\n scale = provider.scale === 'large' ? 'L' : 'M';\n }\n\n if (!ariaHidden) {\n ariaHidden = undefined;\n }\n\n return React.cloneElement(children, {\n ...filterDOMProps(otherProps),\n ...styleProps,\n scale,\n focusable: 'false',\n 'aria-label': ariaLabel,\n 'aria-hidden': (ariaLabel ? (ariaHidden || undefined) : true),\n role: 'img',\n className: classNames(\n styles,\n children.props.className,\n 'spectrum-Icon',\n {\n [`spectrum-UIIcon-${children.type['displayName']}`]: children.type['displayName']\n },\n styleProps.className)\n });\n}\n"],"names":[],"version":3,"file":"UIIcon.main.js.map"}
|