@react-spectrum/image 3.4.12-nightly.4555 → 3.4.12-nightly.4558

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.
@@ -0,0 +1,67 @@
1
+ require("./vars.2746ca20.css");
2
+ var $ec6587ec6732a958$exports = require("./image_vars_css.main.js");
3
+ var $lyGvT$reactspectrumutils = require("@react-spectrum/utils");
4
+ var $lyGvT$reactariautils = require("@react-aria/utils");
5
+ var $lyGvT$react = require("react");
6
+ var $lyGvT$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, "Image", () => $bda2e7b47de3a920$export$3e431a229df88919);
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
+ // incomplete component for show right now
34
+ function $bda2e7b47de3a920$var$Image(props, ref) {
35
+ /* Slots should be able to pass an alt for default behavior, but in Images, the child may know better. */ let userProvidedAlt = props.alt;
36
+ props = (0, $lyGvT$reactspectrumutils.useSlotProps)(props, "image");
37
+ props = (0, $lyGvT$reactspectrumprovider.useProviderProps)(props);
38
+ let { objectFit: objectFit, src: src, alt: alt, ...otherProps } = props;
39
+ let { styleProps: styleProps } = (0, $lyGvT$reactspectrumutils.useStyleProps)(otherProps);
40
+ let domRef = (0, $lyGvT$reactspectrumutils.useDOMRef)(ref);
41
+ if (alt == null) console.warn('The `alt` prop was not provided to an image. Add `alt` text for screen readers, or set `alt=""` prop to indicate that the image is decorative or redundant with displayed text and should not be announced by screen readers.');
42
+ return /*#__PURE__*/ (0, ($parcel$interopDefault($lyGvT$react))).createElement("div", {
43
+ ...(0, $lyGvT$reactariautils.filterDOMProps)(props),
44
+ ...styleProps,
45
+ className: (0, $lyGvT$reactspectrumutils.classNames)((0, ($parcel$interopDefault($ec6587ec6732a958$exports))), styleProps.className),
46
+ style: {
47
+ ...styleProps.style,
48
+ overflow: "hidden"
49
+ },
50
+ ref: domRef
51
+ }, /*#__PURE__*/ (0, ($parcel$interopDefault($lyGvT$react))).createElement("img", {
52
+ src: src,
53
+ alt: userProvidedAlt || alt,
54
+ style: {
55
+ objectFit: objectFit
56
+ },
57
+ className: (0, $lyGvT$reactspectrumutils.classNames)((0, ($parcel$interopDefault($ec6587ec6732a958$exports))), "spectrum-Image-img"),
58
+ onError: props === null || props === void 0 ? void 0 : props.onError,
59
+ onLoad: props === null || props === void 0 ? void 0 : props.onLoad
60
+ }));
61
+ }
62
+ /**
63
+ * Image is used to insert and display an image within a component.
64
+ */ const $bda2e7b47de3a920$export$3e431a229df88919 = /*#__PURE__*/ (0, ($parcel$interopDefault($lyGvT$react))).forwardRef($bda2e7b47de3a920$var$Image);
65
+
66
+
67
+ //# sourceMappingURL=Image.main.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAUD,0CAA0C;AAE1C,SAAS,4BAAM,KAAyB,EAAE,GAA2B;IACnE,uGAAuG,GACvG,IAAI,kBAAkB,MAAM,GAAG;IAC/B,QAAQ,CAAA,GAAA,sCAAW,EAAE,OAAO;IAC5B,QAAQ,CAAA,GAAA,6CAAe,EAAE;IACzB,IAAI,aACF,SAAS,OACT,GAAG,OACH,GAAG,EACH,GAAG,YACJ,GAAG;IACJ,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,uCAAY,EAAE;IACjC,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IAEvB,IAAI,OAAO,MACT,QAAQ,IAAI,CACV;IAMJ,qBACE,0DAAC;QACE,GAAG,CAAA,GAAA,oCAAa,EAAE,MAAM;QACxB,GAAG,UAAU;QACd,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG,WAAW,SAAS;QAClD,OAAO;YACL,GAAG,WAAW,KAAK;YACnB,UAAU;QACZ;QACA,KAAK;qBACL,0DAAC;QACC,KAAK;QACL,KAAK,mBAAmB;QACxB,OAAO;uBAAC;QAAS;QACjB,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;QAC9B,OAAO,EAAE,kBAAA,4BAAA,MAAO,OAAO;QACvB,MAAM,EAAE,kBAAA,4BAAA,MAAO,MAAM;;AAG7B;AAEA;;CAEC,GACD,MAAM,0DAAS,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC","sources":["packages/@react-spectrum/image/src/Image.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 {classNames, useDOMRef, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport React from 'react';\nimport {SpectrumImageProps} from '@react-types/image';\nimport styles from '@adobe/spectrum-css-temp/components/image/vars.css';\nimport {useProviderProps} from '@react-spectrum/provider';\n\n// incomplete component for show right now\n\nfunction Image(props: SpectrumImageProps, ref: DOMRef<HTMLDivElement>) {\n /* Slots should be able to pass an alt for default behavior, but in Images, the child may know better. */\n let userProvidedAlt = props.alt;\n props = useSlotProps(props, 'image');\n props = useProviderProps(props);\n let {\n objectFit,\n src,\n alt,\n ...otherProps\n } = props;\n let {styleProps} = useStyleProps(otherProps);\n let domRef = useDOMRef(ref);\n\n if (alt == null) {\n console.warn(\n 'The `alt` prop was not provided to an image. ' +\n 'Add `alt` text for screen readers, or set `alt=\"\"` prop to indicate that the image ' +\n 'is decorative or redundant with displayed text and should not be announced by screen readers.'\n );\n }\n\n return (\n <div\n {...filterDOMProps(props)}\n {...styleProps}\n className={classNames(styles, styleProps.className)}\n style={{\n ...styleProps.style,\n overflow: 'hidden'\n }}\n ref={domRef}>\n <img\n src={src}\n alt={userProvidedAlt || alt}\n style={{objectFit}}\n className={classNames(styles, 'spectrum-Image-img')} \n onError={props?.onError}\n onLoad={props?.onLoad} />\n </div>\n );\n}\n\n/**\n * Image is used to insert and display an image within a component.\n */\nconst _Image = React.forwardRef(Image);\nexport {_Image as Image};\n"],"names":[],"version":3,"file":"Image.main.js.map"}
package/dist/Image.mjs ADDED
@@ -0,0 +1,62 @@
1
+ import "./vars.2746ca20.css";
2
+ import $6cGum$image_vars_cssmodulejs from "./image_vars_css.mjs";
3
+ import {useSlotProps as $6cGum$useSlotProps, useStyleProps as $6cGum$useStyleProps, useDOMRef as $6cGum$useDOMRef, classNames as $6cGum$classNames} from "@react-spectrum/utils";
4
+ import {filterDOMProps as $6cGum$filterDOMProps} from "@react-aria/utils";
5
+ import $6cGum$react from "react";
6
+ import {useProviderProps as $6cGum$useProviderProps} 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
+ // incomplete component for show right now
28
+ function $77e0ac4d4aa3e5ef$var$Image(props, ref) {
29
+ /* Slots should be able to pass an alt for default behavior, but in Images, the child may know better. */ let userProvidedAlt = props.alt;
30
+ props = (0, $6cGum$useSlotProps)(props, "image");
31
+ props = (0, $6cGum$useProviderProps)(props);
32
+ let { objectFit: objectFit, src: src, alt: alt, ...otherProps } = props;
33
+ let { styleProps: styleProps } = (0, $6cGum$useStyleProps)(otherProps);
34
+ let domRef = (0, $6cGum$useDOMRef)(ref);
35
+ if (alt == null) console.warn('The `alt` prop was not provided to an image. Add `alt` text for screen readers, or set `alt=""` prop to indicate that the image is decorative or redundant with displayed text and should not be announced by screen readers.');
36
+ return /*#__PURE__*/ (0, $6cGum$react).createElement("div", {
37
+ ...(0, $6cGum$filterDOMProps)(props),
38
+ ...styleProps,
39
+ className: (0, $6cGum$classNames)((0, ($parcel$interopDefault($6cGum$image_vars_cssmodulejs))), styleProps.className),
40
+ style: {
41
+ ...styleProps.style,
42
+ overflow: "hidden"
43
+ },
44
+ ref: domRef
45
+ }, /*#__PURE__*/ (0, $6cGum$react).createElement("img", {
46
+ src: src,
47
+ alt: userProvidedAlt || alt,
48
+ style: {
49
+ objectFit: objectFit
50
+ },
51
+ className: (0, $6cGum$classNames)((0, ($parcel$interopDefault($6cGum$image_vars_cssmodulejs))), "spectrum-Image-img"),
52
+ onError: props === null || props === void 0 ? void 0 : props.onError,
53
+ onLoad: props === null || props === void 0 ? void 0 : props.onLoad
54
+ }));
55
+ }
56
+ /**
57
+ * Image is used to insert and display an image within a component.
58
+ */ const $77e0ac4d4aa3e5ef$export$3e431a229df88919 = /*#__PURE__*/ (0, $6cGum$react).forwardRef($77e0ac4d4aa3e5ef$var$Image);
59
+
60
+
61
+ export {$77e0ac4d4aa3e5ef$export$3e431a229df88919 as Image};
62
+ //# sourceMappingURL=Image.mjs.map
@@ -0,0 +1,62 @@
1
+ import "./vars.2746ca20.css";
2
+ import $6cGum$image_vars_cssmodulejs from "./image_vars_css.module.js";
3
+ import {useSlotProps as $6cGum$useSlotProps, useStyleProps as $6cGum$useStyleProps, useDOMRef as $6cGum$useDOMRef, classNames as $6cGum$classNames} from "@react-spectrum/utils";
4
+ import {filterDOMProps as $6cGum$filterDOMProps} from "@react-aria/utils";
5
+ import $6cGum$react from "react";
6
+ import {useProviderProps as $6cGum$useProviderProps} 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
+ // incomplete component for show right now
28
+ function $77e0ac4d4aa3e5ef$var$Image(props, ref) {
29
+ /* Slots should be able to pass an alt for default behavior, but in Images, the child may know better. */ let userProvidedAlt = props.alt;
30
+ props = (0, $6cGum$useSlotProps)(props, "image");
31
+ props = (0, $6cGum$useProviderProps)(props);
32
+ let { objectFit: objectFit, src: src, alt: alt, ...otherProps } = props;
33
+ let { styleProps: styleProps } = (0, $6cGum$useStyleProps)(otherProps);
34
+ let domRef = (0, $6cGum$useDOMRef)(ref);
35
+ if (alt == null) console.warn('The `alt` prop was not provided to an image. Add `alt` text for screen readers, or set `alt=""` prop to indicate that the image is decorative or redundant with displayed text and should not be announced by screen readers.');
36
+ return /*#__PURE__*/ (0, $6cGum$react).createElement("div", {
37
+ ...(0, $6cGum$filterDOMProps)(props),
38
+ ...styleProps,
39
+ className: (0, $6cGum$classNames)((0, ($parcel$interopDefault($6cGum$image_vars_cssmodulejs))), styleProps.className),
40
+ style: {
41
+ ...styleProps.style,
42
+ overflow: "hidden"
43
+ },
44
+ ref: domRef
45
+ }, /*#__PURE__*/ (0, $6cGum$react).createElement("img", {
46
+ src: src,
47
+ alt: userProvidedAlt || alt,
48
+ style: {
49
+ objectFit: objectFit
50
+ },
51
+ className: (0, $6cGum$classNames)((0, ($parcel$interopDefault($6cGum$image_vars_cssmodulejs))), "spectrum-Image-img"),
52
+ onError: props === null || props === void 0 ? void 0 : props.onError,
53
+ onLoad: props === null || props === void 0 ? void 0 : props.onLoad
54
+ }));
55
+ }
56
+ /**
57
+ * Image is used to insert and display an image within a component.
58
+ */ const $77e0ac4d4aa3e5ef$export$3e431a229df88919 = /*#__PURE__*/ (0, $6cGum$react).forwardRef($77e0ac4d4aa3e5ef$var$Image);
59
+
60
+
61
+ export {$77e0ac4d4aa3e5ef$export$3e431a229df88919 as Image};
62
+ //# sourceMappingURL=Image.module.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAUD,0CAA0C;AAE1C,SAAS,4BAAM,KAAyB,EAAE,GAA2B;IACnE,uGAAuG,GACvG,IAAI,kBAAkB,MAAM,GAAG;IAC/B,QAAQ,CAAA,GAAA,mBAAW,EAAE,OAAO;IAC5B,QAAQ,CAAA,GAAA,uBAAe,EAAE;IACzB,IAAI,aACF,SAAS,OACT,GAAG,OACH,GAAG,EACH,GAAG,YACJ,GAAG;IACJ,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,oBAAY,EAAE;IACjC,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IAEvB,IAAI,OAAO,MACT,QAAQ,IAAI,CACV;IAMJ,qBACE,gCAAC;QACE,GAAG,CAAA,GAAA,qBAAa,EAAE,MAAM;QACxB,GAAG,UAAU;QACd,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,uDAAK,GAAG,WAAW,SAAS;QAClD,OAAO;YACL,GAAG,WAAW,KAAK;YACnB,UAAU;QACZ;QACA,KAAK;qBACL,gCAAC;QACC,KAAK;QACL,KAAK,mBAAmB;QACxB,OAAO;uBAAC;QAAS;QACjB,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,uDAAK,GAAG;QAC9B,OAAO,EAAE,kBAAA,4BAAA,MAAO,OAAO;QACvB,MAAM,EAAE,kBAAA,4BAAA,MAAO,MAAM;;AAG7B;AAEA;;CAEC,GACD,MAAM,0DAAS,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC","sources":["packages/@react-spectrum/image/src/Image.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 {classNames, useDOMRef, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport React from 'react';\nimport {SpectrumImageProps} from '@react-types/image';\nimport styles from '@adobe/spectrum-css-temp/components/image/vars.css';\nimport {useProviderProps} from '@react-spectrum/provider';\n\n// incomplete component for show right now\n\nfunction Image(props: SpectrumImageProps, ref: DOMRef<HTMLDivElement>) {\n /* Slots should be able to pass an alt for default behavior, but in Images, the child may know better. */\n let userProvidedAlt = props.alt;\n props = useSlotProps(props, 'image');\n props = useProviderProps(props);\n let {\n objectFit,\n src,\n alt,\n ...otherProps\n } = props;\n let {styleProps} = useStyleProps(otherProps);\n let domRef = useDOMRef(ref);\n\n if (alt == null) {\n console.warn(\n 'The `alt` prop was not provided to an image. ' +\n 'Add `alt` text for screen readers, or set `alt=\"\"` prop to indicate that the image ' +\n 'is decorative or redundant with displayed text and should not be announced by screen readers.'\n );\n }\n\n return (\n <div\n {...filterDOMProps(props)}\n {...styleProps}\n className={classNames(styles, styleProps.className)}\n style={{\n ...styleProps.style,\n overflow: 'hidden'\n }}\n ref={domRef}>\n <img\n src={src}\n alt={userProvidedAlt || alt}\n style={{objectFit}}\n className={classNames(styles, 'spectrum-Image-img')} \n onError={props?.onError}\n onLoad={props?.onLoad} />\n </div>\n );\n}\n\n/**\n * Image is used to insert and display an image within a component.\n */\nconst _Image = React.forwardRef(Image);\nexport {_Image as Image};\n"],"names":[],"version":3,"file":"Image.module.js.map"}
@@ -0,0 +1,11 @@
1
+
2
+ function $parcel$export(e, n, v, s) {
3
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
4
+ }
5
+
6
+ $parcel$export(module.exports, "spectrum-Image-img", () => $ec6587ec6732a958$export$3238177972e11200, (v) => $ec6587ec6732a958$export$3238177972e11200 = v);
7
+ var $ec6587ec6732a958$export$3238177972e11200;
8
+ $ec6587ec6732a958$export$3238177972e11200 = `Gv9sRq_spectrum-Image-img`;
9
+
10
+
11
+ //# sourceMappingURL=image_vars_css.main.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;AAAA,IAAA;AAAA,4CAAuC,CAAC,yBAAyB,CAAC","sources":["packages/@adobe/spectrum-css-temp/components/image/vars.css"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n"],"names":[],"version":3,"file":"image_vars_css.main.js.map"}
@@ -0,0 +1,13 @@
1
+
2
+ function $parcel$export(e, n, v, s) {
3
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
4
+ }
5
+ var $cf2f2ea6e1c0495a$exports = {};
6
+
7
+ $parcel$export($cf2f2ea6e1c0495a$exports, "spectrum-Image-img", () => $cf2f2ea6e1c0495a$export$3238177972e11200, (v) => $cf2f2ea6e1c0495a$export$3238177972e11200 = v);
8
+ var $cf2f2ea6e1c0495a$export$3238177972e11200;
9
+ $cf2f2ea6e1c0495a$export$3238177972e11200 = `Gv9sRq_spectrum-Image-img`;
10
+
11
+
12
+ export {$cf2f2ea6e1c0495a$exports as default};
13
+ //# sourceMappingURL=image_vars_css.mjs.map
@@ -0,0 +1,13 @@
1
+
2
+ function $parcel$export(e, n, v, s) {
3
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
4
+ }
5
+ var $cf2f2ea6e1c0495a$exports = {};
6
+
7
+ $parcel$export($cf2f2ea6e1c0495a$exports, "spectrum-Image-img", () => $cf2f2ea6e1c0495a$export$3238177972e11200, (v) => $cf2f2ea6e1c0495a$export$3238177972e11200 = v);
8
+ var $cf2f2ea6e1c0495a$export$3238177972e11200;
9
+ $cf2f2ea6e1c0495a$export$3238177972e11200 = `Gv9sRq_spectrum-Image-img`;
10
+
11
+
12
+ export {$cf2f2ea6e1c0495a$exports as default};
13
+ //# sourceMappingURL=image_vars_css.module.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;AAAA,IAAA;AAAA,4CAAuC,CAAC,yBAAyB,CAAC","sources":["packages/@adobe/spectrum-css-temp/components/image/vars.css"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n"],"names":[],"version":3,"file":"image_vars_css.module.js.map"}
package/dist/import.mjs CHANGED
@@ -1,17 +1,5 @@
1
- import "./module.css";
2
- import {useSlotProps as $9XFMV$useSlotProps, useStyleProps as $9XFMV$useStyleProps, useDOMRef as $9XFMV$useDOMRef, classNames as $9XFMV$classNames} from "@react-spectrum/utils";
3
- import {filterDOMProps as $9XFMV$filterDOMProps} from "@react-aria/utils";
4
- import $9XFMV$react from "react";
5
- import {useProviderProps as $9XFMV$useProviderProps} from "@react-spectrum/provider";
1
+ import {Image as $77e0ac4d4aa3e5ef$export$3e431a229df88919} from "./Image.mjs";
6
2
 
7
-
8
- function $parcel$interopDefault(a) {
9
- return a && a.__esModule ? a.default : a;
10
- }
11
-
12
- function $parcel$export(e, n, v, s) {
13
- Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
14
- }
15
3
  /*
16
4
  * Copyright 2020 Adobe. All rights reserved.
17
5
  * This file is licensed to you under the Apache License, Version 2.0 (the "License");
@@ -23,60 +11,6 @@ function $parcel$export(e, n, v, s) {
23
11
  * OF ANY KIND, either express or implied. See the License for the specific language
24
12
  * governing permissions and limitations under the License.
25
13
  */ /// <reference types="css-module-types" />
26
- /*
27
- * Copyright 2020 Adobe. All rights reserved.
28
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
29
- * you may not use this file except in compliance with the License. You may obtain a copy
30
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
31
- *
32
- * Unless required by applicable law or agreed to in writing, software distributed under
33
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
34
- * OF ANY KIND, either express or implied. See the License for the specific language
35
- * governing permissions and limitations under the License.
36
- */
37
-
38
-
39
- var $cf2f2ea6e1c0495a$exports = {};
40
-
41
- $parcel$export($cf2f2ea6e1c0495a$exports, "spectrum-Image-img", () => $cf2f2ea6e1c0495a$export$3238177972e11200, (v) => $cf2f2ea6e1c0495a$export$3238177972e11200 = v);
42
- var $cf2f2ea6e1c0495a$export$3238177972e11200;
43
- $cf2f2ea6e1c0495a$export$3238177972e11200 = `Gv9sRq_spectrum-Image-img`;
44
-
45
-
46
-
47
- // incomplete component for show right now
48
- function $77e0ac4d4aa3e5ef$var$Image(props, ref) {
49
- /* Slots should be able to pass an alt for default behavior, but in Images, the child may know better. */ let userProvidedAlt = props.alt;
50
- props = (0, $9XFMV$useSlotProps)(props, "image");
51
- props = (0, $9XFMV$useProviderProps)(props);
52
- let { objectFit: objectFit, src: src, alt: alt, ...otherProps } = props;
53
- let { styleProps: styleProps } = (0, $9XFMV$useStyleProps)(otherProps);
54
- let domRef = (0, $9XFMV$useDOMRef)(ref);
55
- if (alt == null) console.warn('The `alt` prop was not provided to an image. Add `alt` text for screen readers, or set `alt=""` prop to indicate that the image is decorative or redundant with displayed text and should not be announced by screen readers.');
56
- return /*#__PURE__*/ (0, $9XFMV$react).createElement("div", {
57
- ...(0, $9XFMV$filterDOMProps)(props),
58
- ...styleProps,
59
- className: (0, $9XFMV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($cf2f2ea6e1c0495a$exports))), styleProps.className),
60
- style: {
61
- ...styleProps.style,
62
- overflow: "hidden"
63
- },
64
- ref: domRef
65
- }, /*#__PURE__*/ (0, $9XFMV$react).createElement("img", {
66
- src: src,
67
- alt: userProvidedAlt || alt,
68
- style: {
69
- objectFit: objectFit
70
- },
71
- className: (0, $9XFMV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($cf2f2ea6e1c0495a$exports))), "spectrum-Image-img"),
72
- onError: props === null || props === void 0 ? void 0 : props.onError,
73
- onLoad: props === null || props === void 0 ? void 0 : props.onLoad
74
- }));
75
- }
76
- /**
77
- * Image is used to insert and display an image within a component.
78
- */ const $77e0ac4d4aa3e5ef$export$3e431a229df88919 = /*#__PURE__*/ (0, $9XFMV$react).forwardRef($77e0ac4d4aa3e5ef$var$Image);
79
-
80
14
 
81
15
 
82
16
 
package/dist/main.js CHANGED
@@ -1,19 +1,11 @@
1
- require("./main.css");
2
- var $je8mI$reactspectrumutils = require("@react-spectrum/utils");
3
- var $je8mI$reactariautils = require("@react-aria/utils");
4
- var $je8mI$react = require("react");
5
- var $je8mI$reactspectrumprovider = require("@react-spectrum/provider");
1
+ var $bda2e7b47de3a920$exports = require("./Image.main.js");
6
2
 
7
3
 
8
4
  function $parcel$export(e, n, v, s) {
9
5
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
10
6
  }
11
7
 
12
- function $parcel$interopDefault(a) {
13
- return a && a.__esModule ? a.default : a;
14
- }
15
-
16
- $parcel$export(module.exports, "Image", () => $bda2e7b47de3a920$export$3e431a229df88919);
8
+ $parcel$export(module.exports, "Image", () => $bda2e7b47de3a920$exports.Image);
17
9
  /*
18
10
  * Copyright 2020 Adobe. All rights reserved.
19
11
  * This file is licensed to you under the Apache License, Version 2.0 (the "License");
@@ -25,60 +17,6 @@ $parcel$export(module.exports, "Image", () => $bda2e7b47de3a920$export$3e431a229
25
17
  * OF ANY KIND, either express or implied. See the License for the specific language
26
18
  * governing permissions and limitations under the License.
27
19
  */ /// <reference types="css-module-types" />
28
- /*
29
- * Copyright 2020 Adobe. All rights reserved.
30
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
31
- * you may not use this file except in compliance with the License. You may obtain a copy
32
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
33
- *
34
- * Unless required by applicable law or agreed to in writing, software distributed under
35
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
36
- * OF ANY KIND, either express or implied. See the License for the specific language
37
- * governing permissions and limitations under the License.
38
- */
39
-
40
-
41
- var $ec6587ec6732a958$exports = {};
42
-
43
- $parcel$export($ec6587ec6732a958$exports, "spectrum-Image-img", () => $ec6587ec6732a958$export$3238177972e11200, (v) => $ec6587ec6732a958$export$3238177972e11200 = v);
44
- var $ec6587ec6732a958$export$3238177972e11200;
45
- $ec6587ec6732a958$export$3238177972e11200 = `Gv9sRq_spectrum-Image-img`;
46
-
47
-
48
-
49
- // incomplete component for show right now
50
- function $bda2e7b47de3a920$var$Image(props, ref) {
51
- /* Slots should be able to pass an alt for default behavior, but in Images, the child may know better. */ let userProvidedAlt = props.alt;
52
- props = (0, $je8mI$reactspectrumutils.useSlotProps)(props, "image");
53
- props = (0, $je8mI$reactspectrumprovider.useProviderProps)(props);
54
- let { objectFit: objectFit, src: src, alt: alt, ...otherProps } = props;
55
- let { styleProps: styleProps } = (0, $je8mI$reactspectrumutils.useStyleProps)(otherProps);
56
- let domRef = (0, $je8mI$reactspectrumutils.useDOMRef)(ref);
57
- if (alt == null) console.warn('The `alt` prop was not provided to an image. Add `alt` text for screen readers, or set `alt=""` prop to indicate that the image is decorative or redundant with displayed text and should not be announced by screen readers.');
58
- return /*#__PURE__*/ (0, ($parcel$interopDefault($je8mI$react))).createElement("div", {
59
- ...(0, $je8mI$reactariautils.filterDOMProps)(props),
60
- ...styleProps,
61
- className: (0, $je8mI$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($ec6587ec6732a958$exports))), styleProps.className),
62
- style: {
63
- ...styleProps.style,
64
- overflow: "hidden"
65
- },
66
- ref: domRef
67
- }, /*#__PURE__*/ (0, ($parcel$interopDefault($je8mI$react))).createElement("img", {
68
- src: src,
69
- alt: userProvidedAlt || alt,
70
- style: {
71
- objectFit: objectFit
72
- },
73
- className: (0, $je8mI$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($ec6587ec6732a958$exports))), "spectrum-Image-img"),
74
- onError: props === null || props === void 0 ? void 0 : props.onError,
75
- onLoad: props === null || props === void 0 ? void 0 : props.onLoad
76
- }));
77
- }
78
- /**
79
- * Image is used to insert and display an image within a component.
80
- */ const $bda2e7b47de3a920$export$3e431a229df88919 = /*#__PURE__*/ (0, ($parcel$interopDefault($je8mI$react))).forwardRef($bda2e7b47de3a920$var$Image);
81
-
82
20
 
83
21
 
84
22
 
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C;ACZ1C;;;;;;;;;;CAUC;;;;;;ACVD,IAAA;AAAA,4CAAuC,CAAC,yBAAyB,CAAC;;;;ADoBlE,0CAA0C;AAE1C,SAAS,4BAAM,KAAyB,EAAE,GAA2B;IACnE,uGAAuG,GACvG,IAAI,kBAAkB,MAAM,GAAG;IAC/B,QAAQ,CAAA,GAAA,sCAAW,EAAE,OAAO;IAC5B,QAAQ,CAAA,GAAA,6CAAe,EAAE;IACzB,IAAI,aACF,SAAS,OACT,GAAG,OACH,GAAG,EACH,GAAG,YACJ,GAAG;IACJ,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,uCAAY,EAAE;IACjC,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IAEvB,IAAI,OAAO,MACT,QAAQ,IAAI,CACV;IAMJ,qBACE,0DAAC;QACE,GAAG,CAAA,GAAA,oCAAa,EAAE,MAAM;QACxB,GAAG,UAAU;QACd,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,gEAAK,GAAG,WAAW,SAAS;QAClD,OAAO;YACL,GAAG,WAAW,KAAK;YACnB,UAAU;QACZ;QACA,KAAK;qBACL,0DAAC;QACC,KAAK;QACL,KAAK,mBAAmB;QACxB,OAAO;uBAAC;QAAS;QACjB,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,gEAAK,GAAG;QAC9B,OAAO,EAAE,kBAAA,4BAAA,MAAO,OAAO;QACvB,MAAM,EAAE,kBAAA,4BAAA,MAAO,MAAM;;AAG7B;AAEA;;CAEC,GACD,MAAM,0DAAS,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC;","sources":["packages/@react-spectrum/image/src/index.ts","packages/@react-spectrum/image/src/Image.tsx","packages/@adobe/spectrum-css-temp/components/image/vars.css"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport {Image} from './Image';\nexport type {SpectrumImageProps} from '@react-types/image';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {classNames, useDOMRef, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport React from 'react';\nimport {SpectrumImageProps} from '@react-types/image';\nimport styles from '@adobe/spectrum-css-temp/components/image/vars.css';\nimport {useProviderProps} from '@react-spectrum/provider';\n\n// incomplete component for show right now\n\nfunction Image(props: SpectrumImageProps, ref: DOMRef<HTMLDivElement>) {\n /* Slots should be able to pass an alt for default behavior, but in Images, the child may know better. */\n let userProvidedAlt = props.alt;\n props = useSlotProps(props, 'image');\n props = useProviderProps(props);\n let {\n objectFit,\n src,\n alt,\n ...otherProps\n } = props;\n let {styleProps} = useStyleProps(otherProps);\n let domRef = useDOMRef(ref);\n\n if (alt == null) {\n console.warn(\n 'The `alt` prop was not provided to an image. ' +\n 'Add `alt` text for screen readers, or set `alt=\"\"` prop to indicate that the image ' +\n 'is decorative or redundant with displayed text and should not be announced by screen readers.'\n );\n }\n\n return (\n <div\n {...filterDOMProps(props)}\n {...styleProps}\n className={classNames(styles, styleProps.className)}\n style={{\n ...styleProps.style,\n overflow: 'hidden'\n }}\n ref={domRef}>\n <img\n src={src}\n alt={userProvidedAlt || alt}\n style={{objectFit}}\n className={classNames(styles, 'spectrum-Image-img')} \n onError={props?.onError}\n onLoad={props?.onLoad} />\n </div>\n );\n}\n\n/**\n * Image is used to insert and display an image within a component.\n */\nconst _Image = React.forwardRef(Image);\nexport {_Image as Image};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n"],"names":[],"version":3,"file":"main.js.map"}
1
+ {"mappings":";;;;;;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C","sources":["packages/@react-spectrum/image/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 {Image} from './Image';\nexport type {SpectrumImageProps} from '@react-types/image';\n"],"names":[],"version":3,"file":"main.js.map"}
package/dist/module.js CHANGED
@@ -1,17 +1,5 @@
1
- import "./module.css";
2
- import {useSlotProps as $9XFMV$useSlotProps, useStyleProps as $9XFMV$useStyleProps, useDOMRef as $9XFMV$useDOMRef, classNames as $9XFMV$classNames} from "@react-spectrum/utils";
3
- import {filterDOMProps as $9XFMV$filterDOMProps} from "@react-aria/utils";
4
- import $9XFMV$react from "react";
5
- import {useProviderProps as $9XFMV$useProviderProps} from "@react-spectrum/provider";
1
+ import {Image as $77e0ac4d4aa3e5ef$export$3e431a229df88919} from "./Image.module.js";
6
2
 
7
-
8
- function $parcel$interopDefault(a) {
9
- return a && a.__esModule ? a.default : a;
10
- }
11
-
12
- function $parcel$export(e, n, v, s) {
13
- Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
14
- }
15
3
  /*
16
4
  * Copyright 2020 Adobe. All rights reserved.
17
5
  * This file is licensed to you under the Apache License, Version 2.0 (the "License");
@@ -23,60 +11,6 @@ function $parcel$export(e, n, v, s) {
23
11
  * OF ANY KIND, either express or implied. See the License for the specific language
24
12
  * governing permissions and limitations under the License.
25
13
  */ /// <reference types="css-module-types" />
26
- /*
27
- * Copyright 2020 Adobe. All rights reserved.
28
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
29
- * you may not use this file except in compliance with the License. You may obtain a copy
30
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
31
- *
32
- * Unless required by applicable law or agreed to in writing, software distributed under
33
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
34
- * OF ANY KIND, either express or implied. See the License for the specific language
35
- * governing permissions and limitations under the License.
36
- */
37
-
38
-
39
- var $cf2f2ea6e1c0495a$exports = {};
40
-
41
- $parcel$export($cf2f2ea6e1c0495a$exports, "spectrum-Image-img", () => $cf2f2ea6e1c0495a$export$3238177972e11200, (v) => $cf2f2ea6e1c0495a$export$3238177972e11200 = v);
42
- var $cf2f2ea6e1c0495a$export$3238177972e11200;
43
- $cf2f2ea6e1c0495a$export$3238177972e11200 = `Gv9sRq_spectrum-Image-img`;
44
-
45
-
46
-
47
- // incomplete component for show right now
48
- function $77e0ac4d4aa3e5ef$var$Image(props, ref) {
49
- /* Slots should be able to pass an alt for default behavior, but in Images, the child may know better. */ let userProvidedAlt = props.alt;
50
- props = (0, $9XFMV$useSlotProps)(props, "image");
51
- props = (0, $9XFMV$useProviderProps)(props);
52
- let { objectFit: objectFit, src: src, alt: alt, ...otherProps } = props;
53
- let { styleProps: styleProps } = (0, $9XFMV$useStyleProps)(otherProps);
54
- let domRef = (0, $9XFMV$useDOMRef)(ref);
55
- if (alt == null) console.warn('The `alt` prop was not provided to an image. Add `alt` text for screen readers, or set `alt=""` prop to indicate that the image is decorative or redundant with displayed text and should not be announced by screen readers.');
56
- return /*#__PURE__*/ (0, $9XFMV$react).createElement("div", {
57
- ...(0, $9XFMV$filterDOMProps)(props),
58
- ...styleProps,
59
- className: (0, $9XFMV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($cf2f2ea6e1c0495a$exports))), styleProps.className),
60
- style: {
61
- ...styleProps.style,
62
- overflow: "hidden"
63
- },
64
- ref: domRef
65
- }, /*#__PURE__*/ (0, $9XFMV$react).createElement("img", {
66
- src: src,
67
- alt: userProvidedAlt || alt,
68
- style: {
69
- objectFit: objectFit
70
- },
71
- className: (0, $9XFMV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($cf2f2ea6e1c0495a$exports))), "spectrum-Image-img"),
72
- onError: props === null || props === void 0 ? void 0 : props.onError,
73
- onLoad: props === null || props === void 0 ? void 0 : props.onLoad
74
- }));
75
- }
76
- /**
77
- * Image is used to insert and display an image within a component.
78
- */ const $77e0ac4d4aa3e5ef$export$3e431a229df88919 = /*#__PURE__*/ (0, $9XFMV$react).forwardRef($77e0ac4d4aa3e5ef$var$Image);
79
-
80
14
 
81
15
 
82
16
 
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C;ACZ1C;;;;;;;;;;CAUC;;;;;;ACVD,IAAA;AAAA,4CAAuC,CAAC,yBAAyB,CAAC;;;;ADoBlE,0CAA0C;AAE1C,SAAS,4BAAM,KAAyB,EAAE,GAA2B;IACnE,uGAAuG,GACvG,IAAI,kBAAkB,MAAM,GAAG;IAC/B,QAAQ,CAAA,GAAA,mBAAW,EAAE,OAAO;IAC5B,QAAQ,CAAA,GAAA,uBAAe,EAAE;IACzB,IAAI,aACF,SAAS,OACT,GAAG,OACH,GAAG,EACH,GAAG,YACJ,GAAG;IACJ,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,oBAAY,EAAE;IACjC,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IAEvB,IAAI,OAAO,MACT,QAAQ,IAAI,CACV;IAMJ,qBACE,gCAAC;QACE,GAAG,CAAA,GAAA,qBAAa,EAAE,MAAM;QACxB,GAAG,UAAU;QACd,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,gEAAK,GAAG,WAAW,SAAS;QAClD,OAAO;YACL,GAAG,WAAW,KAAK;YACnB,UAAU;QACZ;QACA,KAAK;qBACL,gCAAC;QACC,KAAK;QACL,KAAK,mBAAmB;QACxB,OAAO;uBAAC;QAAS;QACjB,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,gEAAK,GAAG;QAC9B,OAAO,EAAE,kBAAA,4BAAA,MAAO,OAAO;QACvB,MAAM,EAAE,kBAAA,4BAAA,MAAO,MAAM;;AAG7B;AAEA;;CAEC,GACD,MAAM,0DAAS,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC;","sources":["packages/@react-spectrum/image/src/index.ts","packages/@react-spectrum/image/src/Image.tsx","packages/@adobe/spectrum-css-temp/components/image/vars.css"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport {Image} from './Image';\nexport type {SpectrumImageProps} from '@react-types/image';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {classNames, useDOMRef, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport React from 'react';\nimport {SpectrumImageProps} from '@react-types/image';\nimport styles from '@adobe/spectrum-css-temp/components/image/vars.css';\nimport {useProviderProps} from '@react-spectrum/provider';\n\n// incomplete component for show right now\n\nfunction Image(props: SpectrumImageProps, ref: DOMRef<HTMLDivElement>) {\n /* Slots should be able to pass an alt for default behavior, but in Images, the child may know better. */\n let userProvidedAlt = props.alt;\n props = useSlotProps(props, 'image');\n props = useProviderProps(props);\n let {\n objectFit,\n src,\n alt,\n ...otherProps\n } = props;\n let {styleProps} = useStyleProps(otherProps);\n let domRef = useDOMRef(ref);\n\n if (alt == null) {\n console.warn(\n 'The `alt` prop was not provided to an image. ' +\n 'Add `alt` text for screen readers, or set `alt=\"\"` prop to indicate that the image ' +\n 'is decorative or redundant with displayed text and should not be announced by screen readers.'\n );\n }\n\n return (\n <div\n {...filterDOMProps(props)}\n {...styleProps}\n className={classNames(styles, styleProps.className)}\n style={{\n ...styleProps.style,\n overflow: 'hidden'\n }}\n ref={domRef}>\n <img\n src={src}\n alt={userProvidedAlt || alt}\n style={{objectFit}}\n className={classNames(styles, 'spectrum-Image-img')} \n onError={props?.onError}\n onLoad={props?.onLoad} />\n </div>\n );\n}\n\n/**\n * Image is used to insert and display an image within a component.\n */\nconst _Image = React.forwardRef(Image);\nexport {_Image as Image};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n"],"names":[],"version":3,"file":"module.js.map"}
1
+ {"mappings":";;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C","sources":["packages/@react-spectrum/image/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 {Image} from './Image';\nexport type {SpectrumImageProps} from '@react-types/image';\n"],"names":[],"version":3,"file":"module.js.map"}
package/dist/types.d.ts CHANGED
@@ -1,9 +1,10 @@
1
1
  import React from "react";
2
2
  import { SpectrumImageProps } from "@react-types/image";
3
+ import { DOMRefValue } from "@react-types/shared";
3
4
  /**
4
5
  * Image is used to insert and display an image within a component.
5
6
  */
6
- export const Image: React.ForwardRefExoticComponent<SpectrumImageProps & React.RefAttributes<import("@react-types/shared").DOMRefValue<HTMLDivElement>>>;
7
+ export const Image: React.ForwardRefExoticComponent<SpectrumImageProps & React.RefAttributes<DOMRefValue<HTMLDivElement>>>;
7
8
  export type { SpectrumImageProps } from '@react-types/image';
8
9
 
9
10
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"mappings":";;AAiEA;;GAEG;AACH,OAAA,MAAM,2IAAgC,CAAC;ACrDvC,YAAY,EAAC,kBAAkB,EAAC,MAAM,oBAAoB,CAAC","sources":["packages/@react-spectrum/image/src/packages/@react-spectrum/image/src/Image.tsx","packages/@react-spectrum/image/src/packages/@react-spectrum/image/src/index.ts","packages/@react-spectrum/image/src/index.ts"],"sourcesContent":[null,null,"/*\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 {Image} from './Image';\nexport type {SpectrumImageProps} from '@react-types/image';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
1
+ {"mappings":";;;AAiEA;;GAEG;AACH,OAAA,MAAM,6GAAgC,CAAC;ACrDvC,YAAY,EAAC,kBAAkB,EAAC,MAAM,oBAAoB,CAAC","sources":["packages/@react-spectrum/image/src/packages/@react-spectrum/image/src/Image.tsx","packages/@react-spectrum/image/src/packages/@react-spectrum/image/src/index.ts","packages/@react-spectrum/image/src/index.ts"],"sourcesContent":[null,null,"/*\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 {Image} from './Image';\nexport type {SpectrumImageProps} from '@react-types/image';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
@@ -4,4 +4,4 @@
4
4
  height: 100%;
5
5
  display: block;
6
6
  }
7
- /*# sourceMappingURL=main.css.map */
7
+ /*# sourceMappingURL=vars.2746ca20.css.map */
@@ -1 +1 @@
1
- {"mappings":"AA4BA","sources":["packages/@adobe/spectrum-css-temp/components/image/vars.css"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n"],"names":[],"version":3,"file":"main.css.map"}
1
+ {"mappings":"AA4BA","sources":["packages/@adobe/spectrum-css-temp/components/image/vars.css"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n"],"names":[],"version":3,"file":"vars.2746ca20.css.map"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-spectrum/image",
3
- "version": "3.4.12-nightly.4555+81162ea39",
3
+ "version": "3.4.12-nightly.4558+c5e4b3701",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -36,14 +36,14 @@
36
36
  "url": "https://github.com/adobe/react-spectrum"
37
37
  },
38
38
  "dependencies": {
39
- "@react-aria/utils": "3.0.0-nightly.2843+81162ea39",
40
- "@react-spectrum/utils": "3.0.0-nightly.2843+81162ea39",
41
- "@react-types/image": "3.3.8-nightly.4555+81162ea39",
42
- "@react-types/shared": "3.0.0-nightly.2843+81162ea39",
39
+ "@react-aria/utils": "3.0.0-nightly.2846+c5e4b3701",
40
+ "@react-spectrum/utils": "3.0.0-nightly.2846+c5e4b3701",
41
+ "@react-types/image": "3.3.8-nightly.4558+c5e4b3701",
42
+ "@react-types/shared": "3.0.0-nightly.2846+c5e4b3701",
43
43
  "@swc/helpers": "^0.5.0"
44
44
  },
45
45
  "devDependencies": {
46
- "@adobe/spectrum-css-temp": "3.0.0-nightly.2843+81162ea39"
46
+ "@adobe/spectrum-css-temp": "3.0.0-nightly.2846+c5e4b3701"
47
47
  },
48
48
  "peerDependencies": {
49
49
  "@react-spectrum/provider": "^3.0.0",
@@ -52,5 +52,5 @@
52
52
  "publishConfig": {
53
53
  "access": "public"
54
54
  },
55
- "gitHead": "81162ea392926d06ec3d25c228e6f9b6b5479d59"
55
+ "gitHead": "c5e4b3701fdb89eb551f1b3697ac253f06ef68fa"
56
56
  }
package/dist/module.css DELETED
@@ -1,7 +0,0 @@
1
- .Gv9sRq_spectrum-Image-img {
2
- width: 100%;
3
- max-width: 100%;
4
- height: 100%;
5
- display: block;
6
- }
7
- /*# sourceMappingURL=module.css.map */
@@ -1 +0,0 @@
1
- {"mappings":"AA4BA","sources":["packages/@adobe/spectrum-css-temp/components/image/vars.css"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n"],"names":[],"version":3,"file":"module.css.map"}