@react-spectrum/icon 3.0.0-nightly-641446f65-240905

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/README.md ADDED
@@ -0,0 +1,43 @@
1
+ @react-spectrum/icons
2
+
3
+ # Icons
4
+ React Spectrum is a trusted distributor of A4U icons for easy use in your applications.
5
+ We provide 959 Workflow Icons and 45 Colored Workflow Icons. These are an open source set of icons and are the core set that Adobe uses.
6
+ To see a list of Icons, please go to the following [link](http://spectrum-css.corp.adobe.com/icons/). We may differ from [Spectrum's icon page](http://opensource.adobe.com/spectrum-css/2.13.0/icons/) in terms of icons we supply.
7
+ All Icons are available from the top level of this package.
8
+
9
+ All icons use default exports, so you are free to rename them as you see fit. Instead, we rely on the path to each icon module. There is a special React Inspector display name case, which is icons with names that start with a number. This is not allowed in React, so they have been prefixed with an underscore.
10
+
11
+ Both of these are valid:
12
+
13
+ `import Add from '@spectrum-icons/workflow/Add'`
14
+ `import IconAdd from '@spectrum-icons/workflow/Add'`
15
+
16
+ These will both display `<Add />` in the React Inspector
17
+
18
+ For a component starting with a numeral:
19
+
20
+ `import _123 from '@spectrum-icons/workflow/123'`
21
+ `import Icon123 from '@spectrum-icons/workflow/123'`
22
+
23
+ These will both display `<_123 />` in the React Inspector
24
+
25
+ ## How to include custom icons
26
+ #### Minimal setup
27
+ Because we can't include icons for specific projects or non-open source icons, we also support providing your own icons.
28
+ To do this, `import {Icon} from '@react-spectrum/icon';` and use it to wrap your own svg components. To take advantage of scale, our wrapper will pass the prop `scale` to your svg component from the React Spectrum Provider.
29
+ ```jsx
30
+ import CustomSVGComponent from '@a4u/product/custom-icons/CustomSVGComponent';
31
+
32
+ <Icon><CustomSVGComponent /></Icon>
33
+ ```
34
+ There are additional requirements that the custom icons must adhere to. They must match the size and viewbox of Workflow Icons. If you are an Adobe team, we recommend that you go through A4U to request a project specific set of icons, these can be packaged as an npm dependency for you and will be treated in the same way as the core Workflow Icons we redistribute. Their official site is [https://icons.corp.adobe.com](https://icons.corp.adobe.com) and there are links for creating requests.
35
+
36
+ #### React Spectrum integration
37
+ Note: only works with A4u packaged icons. No guarantees for ones you or your designer package yourselves.
38
+ See our [build tools](../../@spectrum-icons/build-tools) to help get your icons integrated into your project working with React Spectrum's [Provider](../provider).
39
+ ```jsx
40
+ import CustomSVGComponent from 'path/to/custom-icons/CustomSVGComponent';
41
+
42
+ <CustomSVGComponent />
43
+ ```
@@ -0,0 +1,65 @@
1
+ require("./vars.4163ca54.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$react = require("react");
6
+ var $hx3aW$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, "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 = (0, $hx3aW$reactspectrumprovider.useProvider)();
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, ($parcel$interopDefault($hx3aW$react))).cloneElement(children, {
54
+ ...(0, $hx3aW$reactariautils.filterDOMProps)(otherProps),
55
+ ...styleProps,
56
+ focusable: 'false',
57
+ 'aria-label': ariaLabel,
58
+ 'aria-hidden': ariaLabel ? ariaHidden || undefined : true,
59
+ role: 'img',
60
+ className: (0, $hx3aW$reactspectrumutils.classNames)((0, ($parcel$interopDefault($5ef39e0c80b682c7$exports))), children.props.className, 'spectrum-Icon', `spectrum-Icon--size${iconSize}`, styleProps.className)
61
+ });
62
+ }
63
+
64
+
65
+ //# sourceMappingURL=Icon.main.js.map
@@ -0,0 +1 @@
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,WAAW,CAAA,GAAA,wCAAU;IACzB,IAAI,QAAQ;IACZ,IAAI,aAAa,MACf,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,SAAS,CAAC,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 React, {ReactElement} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/icon/vars.css';\nimport {useProvider} from '@react-spectrum/provider';\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) {\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 = useProvider();\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 ADDED
@@ -0,0 +1,60 @@
1
+ import "./vars.4163ca54.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 $hJE0A$react from "react";
6
+ import {useProvider as $hJE0A$useProvider} from "@react-spectrum/provider";
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 = (0, $hJE0A$useProvider)();
42
+ let scale = 'M';
43
+ if (provider !== null) scale = provider.scale === 'large' ? 'L' : 'M';
44
+ if (!ariaHidden) ariaHidden = undefined;
45
+ // Use user specified size, falling back to provider scale if size is undef
46
+ let iconSize = size ? size : scale;
47
+ return /*#__PURE__*/ (0, $hJE0A$react).cloneElement(children, {
48
+ ...(0, $hJE0A$filterDOMProps)(otherProps),
49
+ ...styleProps,
50
+ focusable: 'false',
51
+ 'aria-label': ariaLabel,
52
+ 'aria-hidden': ariaLabel ? ariaHidden || undefined : true,
53
+ role: 'img',
54
+ className: (0, $hJE0A$classNames)((0, ($parcel$interopDefault($hJE0A$icon_vars_cssmodulejs))), children.props.className, 'spectrum-Icon', `spectrum-Icon--size${iconSize}`, styleProps.className)
55
+ });
56
+ }
57
+
58
+
59
+ export {$6bfb67578ee6effd$export$f04a61298a47a40f as Icon};
60
+ //# sourceMappingURL=Icon.module.js.map
@@ -0,0 +1,60 @@
1
+ import "./vars.4163ca54.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 $hJE0A$react from "react";
6
+ import {useProvider as $hJE0A$useProvider} from "@react-spectrum/provider";
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 = (0, $hJE0A$useProvider)();
42
+ let scale = 'M';
43
+ if (provider !== null) scale = provider.scale === 'large' ? 'L' : 'M';
44
+ if (!ariaHidden) ariaHidden = undefined;
45
+ // Use user specified size, falling back to provider scale if size is undef
46
+ let iconSize = size ? size : scale;
47
+ return /*#__PURE__*/ (0, $hJE0A$react).cloneElement(children, {
48
+ ...(0, $hJE0A$filterDOMProps)(otherProps),
49
+ ...styleProps,
50
+ focusable: 'false',
51
+ 'aria-label': ariaLabel,
52
+ 'aria-hidden': ariaLabel ? ariaHidden || undefined : true,
53
+ role: 'img',
54
+ className: (0, $hJE0A$classNames)((0, ($parcel$interopDefault($hJE0A$icon_vars_cssmodulejs))), children.props.className, 'spectrum-Icon', `spectrum-Icon--size${iconSize}`, styleProps.className)
55
+ });
56
+ }
57
+
58
+
59
+ export {$6bfb67578ee6effd$export$f04a61298a47a40f as Icon};
60
+ //# sourceMappingURL=Icon.module.js.map
@@ -0,0 +1 @@
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,WAAW,CAAA,GAAA,kBAAU;IACzB,IAAI,QAAQ;IACZ,IAAI,aAAa,MACf,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,SAAS,CAAC,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 React, {ReactElement} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/icon/vars.css';\nimport {useProvider} from '@react-spectrum/provider';\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) {\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 = useProvider();\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"}
@@ -0,0 +1,46 @@
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
@@ -0,0 +1 @@
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, {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) {\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"}
@@ -0,0 +1,37 @@
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
@@ -0,0 +1,37 @@
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
@@ -0,0 +1 @@
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, {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) {\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"}
@@ -0,0 +1,56 @@
1
+ require("./vars.4163ca54.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$react = require("react");
6
+ var $anCtz$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, "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 = (0, $anCtz$reactspectrumprovider.useProvider)();
38
+ let scale = 'M';
39
+ if (provider !== null) scale = provider.scale === 'large' ? 'L' : 'M';
40
+ if (!ariaHidden) ariaHidden = undefined;
41
+ return /*#__PURE__*/ (0, ($parcel$interopDefault($anCtz$react))).cloneElement(children, {
42
+ ...(0, $anCtz$reactariautils.filterDOMProps)(otherProps),
43
+ ...styleProps,
44
+ scale: scale,
45
+ focusable: 'false',
46
+ 'aria-label': ariaLabel,
47
+ 'aria-hidden': ariaLabel ? ariaHidden || undefined : true,
48
+ role: 'img',
49
+ className: (0, $anCtz$reactspectrumutils.classNames)((0, ($parcel$interopDefault($5ef39e0c80b682c7$exports))), children.props.className, 'spectrum-Icon', {
50
+ [`spectrum-UIIcon-${children.type['displayName']}`]: children.type['displayName']
51
+ }, styleProps.className)
52
+ });
53
+ }
54
+
55
+
56
+ //# sourceMappingURL=UIIcon.main.js.map
@@ -0,0 +1 @@
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,WAAW,CAAA,GAAA,wCAAU;IACzB,IAAI,QAAQ;IACZ,IAAI,aAAa,MACf,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,CAAC,CAAC,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 React, {ReactElement} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/icon/vars.css';\nimport {useProvider} from '@react-spectrum/provider';\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) {\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 = useProvider();\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"}
@@ -0,0 +1,51 @@
1
+ import "./vars.4163ca54.css";
2
+ import $g4kmm$icon_vars_cssmodulejs from "./icon_vars_css.mjs";
3
+ import {useSlotProps as $g4kmm$useSlotProps, useStyleProps as $g4kmm$useStyleProps, classNames as $g4kmm$classNames} from "@react-spectrum/utils";
4
+ import {filterDOMProps as $g4kmm$filterDOMProps} from "@react-aria/utils";
5
+ import $g4kmm$react from "react";
6
+ import {useProvider as $g4kmm$useProvider} from "@react-spectrum/provider";
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 $9ba43a63383852e3$export$906cc5990ff10700(props) {
28
+ props = (0, $g4kmm$useSlotProps)(props, 'icon');
29
+ let { children: children, 'aria-label': ariaLabel, 'aria-hidden': ariaHidden, ...otherProps } = props;
30
+ let { styleProps: styleProps } = (0, $g4kmm$useStyleProps)(otherProps);
31
+ let provider = (0, $g4kmm$useProvider)();
32
+ let scale = 'M';
33
+ if (provider !== null) scale = provider.scale === 'large' ? 'L' : 'M';
34
+ if (!ariaHidden) ariaHidden = undefined;
35
+ return /*#__PURE__*/ (0, $g4kmm$react).cloneElement(children, {
36
+ ...(0, $g4kmm$filterDOMProps)(otherProps),
37
+ ...styleProps,
38
+ scale: scale,
39
+ focusable: 'false',
40
+ 'aria-label': ariaLabel,
41
+ 'aria-hidden': ariaLabel ? ariaHidden || undefined : true,
42
+ role: 'img',
43
+ className: (0, $g4kmm$classNames)((0, ($parcel$interopDefault($g4kmm$icon_vars_cssmodulejs))), children.props.className, 'spectrum-Icon', {
44
+ [`spectrum-UIIcon-${children.type['displayName']}`]: children.type['displayName']
45
+ }, styleProps.className)
46
+ });
47
+ }
48
+
49
+
50
+ export {$9ba43a63383852e3$export$906cc5990ff10700 as UIIcon};
51
+ //# sourceMappingURL=UIIcon.module.js.map
@@ -0,0 +1,51 @@
1
+ import "./vars.4163ca54.css";
2
+ import $g4kmm$icon_vars_cssmodulejs from "./icon_vars_css.module.js";
3
+ import {useSlotProps as $g4kmm$useSlotProps, useStyleProps as $g4kmm$useStyleProps, classNames as $g4kmm$classNames} from "@react-spectrum/utils";
4
+ import {filterDOMProps as $g4kmm$filterDOMProps} from "@react-aria/utils";
5
+ import $g4kmm$react from "react";
6
+ import {useProvider as $g4kmm$useProvider} from "@react-spectrum/provider";
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 $9ba43a63383852e3$export$906cc5990ff10700(props) {
28
+ props = (0, $g4kmm$useSlotProps)(props, 'icon');
29
+ let { children: children, 'aria-label': ariaLabel, 'aria-hidden': ariaHidden, ...otherProps } = props;
30
+ let { styleProps: styleProps } = (0, $g4kmm$useStyleProps)(otherProps);
31
+ let provider = (0, $g4kmm$useProvider)();
32
+ let scale = 'M';
33
+ if (provider !== null) scale = provider.scale === 'large' ? 'L' : 'M';
34
+ if (!ariaHidden) ariaHidden = undefined;
35
+ return /*#__PURE__*/ (0, $g4kmm$react).cloneElement(children, {
36
+ ...(0, $g4kmm$filterDOMProps)(otherProps),
37
+ ...styleProps,
38
+ scale: scale,
39
+ focusable: 'false',
40
+ 'aria-label': ariaLabel,
41
+ 'aria-hidden': ariaLabel ? ariaHidden || undefined : true,
42
+ role: 'img',
43
+ className: (0, $g4kmm$classNames)((0, ($parcel$interopDefault($g4kmm$icon_vars_cssmodulejs))), children.props.className, 'spectrum-Icon', {
44
+ [`spectrum-UIIcon-${children.type['displayName']}`]: children.type['displayName']
45
+ }, styleProps.className)
46
+ });
47
+ }
48
+
49
+
50
+ export {$9ba43a63383852e3$export$906cc5990ff10700 as UIIcon};
51
+ //# sourceMappingURL=UIIcon.module.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAoBM,SAAS,0CAAO,KAAkB;IACvC,QAAQ,CAAA,GAAA,mBAAW,EAAE,OAAO;IAC5B,IAAI,YACF,QAAQ,EACR,cAAc,SAAS,EACvB,eAAe,UAAU,EACzB,GAAG,YACJ,GAAG;IAEJ,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,oBAAY,EAAE;IACjC,IAAI,WAAW,CAAA,GAAA,kBAAU;IACzB,IAAI,QAAQ;IACZ,IAAI,aAAa,MACf,QAAQ,SAAS,KAAK,KAAK,UAAU,MAAM;IAG7C,IAAI,CAAC,YACH,aAAa;IAGf,qBAAO,CAAA,GAAA,YAAI,EAAE,YAAY,CAAC,UAAU;QAClC,GAAG,CAAA,GAAA,qBAAa,EAAE,WAAW;QAC7B,GAAG,UAAU;eACb;QACA,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;YACE,CAAC,CAAC,gBAAgB,EAAE,SAAS,IAAI,CAAC,cAAc,CAAC,CAAC,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 React, {ReactElement} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/icon/vars.css';\nimport {useProvider} from '@react-spectrum/provider';\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) {\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 = useProvider();\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.module.js.map"}