@react-spectrum/image 3.3.4-nightly.3598 → 3.3.4-nightly.3600

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.js CHANGED
@@ -12,7 +12,28 @@ function $parcel$interopDefault(a) {
12
12
  }
13
13
 
14
14
  $parcel$export(module.exports, "Image", () => $bda2e7b47de3a920$export$3e431a229df88919);
15
-
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
+ */ /// <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
+ */
16
37
 
17
38
 
18
39
  var $ec6587ec6732a958$exports = {};
@@ -26,33 +47,33 @@ $ec6587ec6732a958$export$3238177972e11200 = "spectrum-Image-img_fdc794";
26
47
  // incomplete component for show right now
27
48
  function $bda2e7b47de3a920$var$Image(props, ref) {
28
49
  /* Slots should be able to pass an alt for default behavior, but in Images, the child may know better. */ let userProvidedAlt = props.alt;
29
- props = $je8mI$reactspectrumutils.useSlotProps(props, 'image');
30
- props = $je8mI$reactspectrumprovider.useProviderProps(props);
50
+ props = (0, $je8mI$reactspectrumutils.useSlotProps)(props, "image");
51
+ props = (0, $je8mI$reactspectrumprovider.useProviderProps)(props);
31
52
  let { objectFit: objectFit , src: src , alt: alt , ...otherProps } = props;
32
- let { styleProps: styleProps } = $je8mI$reactspectrumutils.useStyleProps(otherProps);
33
- let domRef = $je8mI$reactspectrumutils.useDOMRef(ref);
34
- 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.");
35
- return(/*#__PURE__*/ ($parcel$interopDefault($je8mI$react)).createElement("div", {
36
- ...$je8mI$reactariautils.filterDOMProps(props),
53
+ let { styleProps: styleProps } = (0, $je8mI$reactspectrumutils.useStyleProps)(otherProps);
54
+ let domRef = (0, $je8mI$reactspectrumutils.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, ($parcel$interopDefault($je8mI$react))).createElement("div", {
57
+ ...(0, $je8mI$reactariautils.filterDOMProps)(props),
37
58
  ...styleProps,
38
- className: $je8mI$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($ec6587ec6732a958$exports)), styleProps.className),
59
+ className: (0, $je8mI$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($ec6587ec6732a958$exports))), styleProps.className),
39
60
  style: {
40
61
  ...styleProps.style,
41
- overflow: 'hidden'
62
+ overflow: "hidden"
42
63
  },
43
64
  ref: domRef
44
- }, /*#__PURE__*/ ($parcel$interopDefault($je8mI$react)).createElement("img", {
65
+ }, /*#__PURE__*/ (0, ($parcel$interopDefault($je8mI$react))).createElement("img", {
45
66
  src: src,
46
67
  alt: userProvidedAlt || alt,
47
68
  style: {
48
69
  objectFit: objectFit
49
70
  },
50
- className: $je8mI$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($ec6587ec6732a958$exports)), 'spectrum-Image-img')
51
- })));
71
+ className: (0, $je8mI$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($ec6587ec6732a958$exports))), "spectrum-Image-img")
72
+ }));
52
73
  }
53
74
  /**
54
75
  * Image is used to insert and display an image within a component.
55
- */ const $bda2e7b47de3a920$export$3e431a229df88919 = /*#__PURE__*/ ($parcel$interopDefault($je8mI$react)).forwardRef($bda2e7b47de3a920$var$Image);
76
+ */ const $bda2e7b47de3a920$export$3e431a229df88919 = /*#__PURE__*/ (0, ($parcel$interopDefault($je8mI$react))).forwardRef($bda2e7b47de3a920$var$Image);
56
77
 
57
78
 
58
79
 
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;AEAA,GAAoC;AAApC,yCAAoC,GAAG,CAA2B;;;;ADoBlE,EAA0C,AAA1C,wCAA0C;SAEjC,2BAAK,CAAC,KAAyB,EAAE,GAA2B,EAAE,CAAC;IACtE,EAAyG,AAAzG,qGAAyG,AAAzG,EAAyG,CACzG,GAAG,CAAC,eAAe,GAAG,KAAK,CAAC,GAAG;IAC/B,KAAK,GAAG,sCAAY,CAAC,KAAK,EAAE,CAAO;IACnC,KAAK,GAAG,6CAAgB,CAAC,KAAK;IAC9B,GAAG,CAAC,CAAC,YACH,SAAS,QACT,GAAG,QACH,GAAG,MACA,UAAU,CACf,CAAC,GAAG,KAAK;IACT,GAAG,CAAC,CAAC,aAAA,UAAU,EAAA,CAAC,GAAG,uCAAa,CAAC,UAAU;IAC3C,GAAG,CAAC,MAAM,GAAG,mCAAS,CAAC,GAAG;IAE1B,EAAE,EAAE,GAAG,IAAI,IAAI,EACb,OAAO,CAAC,IAAI,CACV,CAE+F;IAInG,MAAM,oEACH,CAAG;WACE,oCAAc,CAAC,KAAK;WACpB,UAAU;QACd,SAAS,EAAE,oCAAU,CAAC,gEAAM,EAAE,UAAU,CAAC,SAAS;QAClD,KAAK,EAAE,CAAC;eACH,UAAU,CAAC,KAAK;YACnB,QAAQ,EAAE,CAAQ;QACpB,CAAC;QACD,GAAG,EAAE,MAAM;0EACV,CAAG;QACF,GAAG,EAAE,GAAG;QACR,GAAG,EAAE,eAAe,IAAI,GAAG;QAC3B,KAAK,EAAE,CAAC;uBAAA,SAAS;QAAA,CAAC;QAClB,SAAS,EAAE,oCAAU,CAAC,gEAAM,EAAE,CAAoB;;AAG1D,CAAC;AAED,EAEG,AAFH;;CAEG,AAFH,EAEG,CACH,KAAK,CAAC,yCAAM,iBAAG,sCAAK,CAAC,UAAU,CAAC,2BAAK","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 </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;ACZ1C;;;;;;;;;;CAUC,GAED;;;;;;ACZA,IAAA;AAAA,4CAAuC;;;;ADoBvC,0CAA0C;AAE1C,SAAS,4BAAM,KAAyB,EAAE,GAA2B,EAAE;IACrE,uGAAuG,GACvG,IAAI,kBAAkB,MAAM,GAAG;IAC/B,QAAQ,CAAA,GAAA,sCAAY,AAAD,EAAE,OAAO;IAC5B,QAAQ,CAAA,GAAA,6CAAe,EAAE;IACzB,IAAI,aACF,UAAS,OACT,IAAG,OACH,IAAG,EACH,GAAG,YACJ,GAAG;IACJ,IAAI,cAAC,WAAU,EAAC,GAAG,CAAA,GAAA,uCAAa,AAAD,EAAE;IACjC,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IAEvB,IAAI,OAAO,IAAI,EACb,QAAQ,IAAI,CACV;IAMJ,qBACE,0DAAC;QACE,GAAG,CAAA,GAAA,oCAAc,AAAD,EAAE,MAAM;QACxB,GAAG,UAAU;QACd,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,gEAAM,AAAD,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,gEAAM,AAAD,GAAG;;AAGtC;AAEA;;CAEC,GACD,MAAM,0DAAS,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC;;ADpDhC","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 </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"}
package/dist/module.mjs CHANGED
@@ -10,7 +10,28 @@ function $parcel$interopDefault(a) {
10
10
  function $parcel$export(e, n, v, s) {
11
11
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
12
12
  }
13
-
13
+ /*
14
+ * Copyright 2020 Adobe. All rights reserved.
15
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
16
+ * you may not use this file except in compliance with the License. You may obtain a copy
17
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
18
+ *
19
+ * Unless required by applicable law or agreed to in writing, software distributed under
20
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
21
+ * OF ANY KIND, either express or implied. See the License for the specific language
22
+ * governing permissions and limitations under the License.
23
+ */ /// <reference types="css-module-types" />
24
+ /*
25
+ * Copyright 2020 Adobe. All rights reserved.
26
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
27
+ * you may not use this file except in compliance with the License. You may obtain a copy
28
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
29
+ *
30
+ * Unless required by applicable law or agreed to in writing, software distributed under
31
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
32
+ * OF ANY KIND, either express or implied. See the License for the specific language
33
+ * governing permissions and limitations under the License.
34
+ */
14
35
 
15
36
 
16
37
  var $cf2f2ea6e1c0495a$exports = {};
@@ -24,33 +45,33 @@ $cf2f2ea6e1c0495a$export$3238177972e11200 = "spectrum-Image-img_fdc794";
24
45
  // incomplete component for show right now
25
46
  function $77e0ac4d4aa3e5ef$var$Image(props, ref) {
26
47
  /* Slots should be able to pass an alt for default behavior, but in Images, the child may know better. */ let userProvidedAlt = props.alt;
27
- props = $9XFMV$useSlotProps(props, 'image');
28
- props = $9XFMV$useProviderProps(props);
48
+ props = (0, $9XFMV$useSlotProps)(props, "image");
49
+ props = (0, $9XFMV$useProviderProps)(props);
29
50
  let { objectFit: objectFit , src: src , alt: alt , ...otherProps } = props;
30
- let { styleProps: styleProps } = $9XFMV$useStyleProps(otherProps);
31
- let domRef = $9XFMV$useDOMRef(ref);
32
- 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.");
33
- return(/*#__PURE__*/ $9XFMV$react.createElement("div", {
34
- ...$9XFMV$filterDOMProps(props),
51
+ let { styleProps: styleProps } = (0, $9XFMV$useStyleProps)(otherProps);
52
+ let domRef = (0, $9XFMV$useDOMRef)(ref);
53
+ 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.');
54
+ return /*#__PURE__*/ (0, $9XFMV$react).createElement("div", {
55
+ ...(0, $9XFMV$filterDOMProps)(props),
35
56
  ...styleProps,
36
- className: $9XFMV$classNames((/*@__PURE__*/$parcel$interopDefault($cf2f2ea6e1c0495a$exports)), styleProps.className),
57
+ className: (0, $9XFMV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($cf2f2ea6e1c0495a$exports))), styleProps.className),
37
58
  style: {
38
59
  ...styleProps.style,
39
- overflow: 'hidden'
60
+ overflow: "hidden"
40
61
  },
41
62
  ref: domRef
42
- }, /*#__PURE__*/ $9XFMV$react.createElement("img", {
63
+ }, /*#__PURE__*/ (0, $9XFMV$react).createElement("img", {
43
64
  src: src,
44
65
  alt: userProvidedAlt || alt,
45
66
  style: {
46
67
  objectFit: objectFit
47
68
  },
48
- className: $9XFMV$classNames((/*@__PURE__*/$parcel$interopDefault($cf2f2ea6e1c0495a$exports)), 'spectrum-Image-img')
49
- })));
69
+ className: (0, $9XFMV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($cf2f2ea6e1c0495a$exports))), "spectrum-Image-img")
70
+ }));
50
71
  }
51
72
  /**
52
73
  * Image is used to insert and display an image within a component.
53
- */ const $77e0ac4d4aa3e5ef$export$3e431a229df88919 = /*#__PURE__*/ $9XFMV$react.forwardRef($77e0ac4d4aa3e5ef$var$Image);
74
+ */ const $77e0ac4d4aa3e5ef$export$3e431a229df88919 = /*#__PURE__*/ (0, $9XFMV$react).forwardRef($77e0ac4d4aa3e5ef$var$Image);
54
75
 
55
76
 
56
77
 
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;AEAA,GAAoC;AAApC,yCAAoC,GAAG,CAA2B;;;;ADoBlE,EAA0C,AAA1C,wCAA0C;SAEjC,2BAAK,CAAC,KAAyB,EAAE,GAA2B,EAAE,CAAC;IACtE,EAAyG,AAAzG,qGAAyG,AAAzG,EAAyG,CACzG,GAAG,CAAC,eAAe,GAAG,KAAK,CAAC,GAAG;IAC/B,KAAK,GAAG,mBAAY,CAAC,KAAK,EAAE,CAAO;IACnC,KAAK,GAAG,uBAAgB,CAAC,KAAK;IAC9B,GAAG,CAAC,CAAC,YACH,SAAS,QACT,GAAG,QACH,GAAG,MACA,UAAU,CACf,CAAC,GAAG,KAAK;IACT,GAAG,CAAC,CAAC,aAAA,UAAU,EAAA,CAAC,GAAG,oBAAa,CAAC,UAAU;IAC3C,GAAG,CAAC,MAAM,GAAG,gBAAS,CAAC,GAAG;IAE1B,EAAE,EAAE,GAAG,IAAI,IAAI,EACb,OAAO,CAAC,IAAI,CACV,CAE+F;IAInG,MAAM,0CACH,CAAG;WACE,qBAAc,CAAC,KAAK;WACpB,UAAU;QACd,SAAS,EAAE,iBAAU,CAAC,gEAAM,EAAE,UAAU,CAAC,SAAS;QAClD,KAAK,EAAE,CAAC;eACH,UAAU,CAAC,KAAK;YACnB,QAAQ,EAAE,CAAQ;QACpB,CAAC;QACD,GAAG,EAAE,MAAM;gDACV,CAAG;QACF,GAAG,EAAE,GAAG;QACR,GAAG,EAAE,eAAe,IAAI,GAAG;QAC3B,KAAK,EAAE,CAAC;uBAAA,SAAS;QAAA,CAAC;QAClB,SAAS,EAAE,iBAAU,CAAC,gEAAM,EAAE,CAAoB;;AAG1D,CAAC;AAED,EAEG,AAFH;;CAEG,AAFH,EAEG,CACH,KAAK,CAAC,yCAAM,iBAAG,YAAK,CAAC,UAAU,CAAC,2BAAK","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 </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.mjs.map"}
1
+ {"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C;ACZ1C;;;;;;;;;;CAUC,GAED;;;;;;ACZA,IAAA;AAAA,4CAAuC;;;;ADoBvC,0CAA0C;AAE1C,SAAS,4BAAM,KAAyB,EAAE,GAA2B,EAAE;IACrE,uGAAuG,GACvG,IAAI,kBAAkB,MAAM,GAAG;IAC/B,QAAQ,CAAA,GAAA,mBAAY,AAAD,EAAE,OAAO;IAC5B,QAAQ,CAAA,GAAA,uBAAe,EAAE;IACzB,IAAI,aACF,UAAS,OACT,IAAG,OACH,IAAG,EACH,GAAG,YACJ,GAAG;IACJ,IAAI,cAAC,WAAU,EAAC,GAAG,CAAA,GAAA,oBAAa,AAAD,EAAE;IACjC,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IAEvB,IAAI,OAAO,IAAI,EACb,QAAQ,IAAI,CACV;IAMJ,qBACE,gCAAC;QACE,GAAG,CAAA,GAAA,qBAAc,AAAD,EAAE,MAAM;QACxB,GAAG,UAAU;QACd,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,gEAAM,AAAD,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,gEAAM,AAAD,GAAG;;AAGtC;AAEA;;CAEC,GACD,MAAM,0DAAS,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC;;ADpDhC","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 </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.mjs.map"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-spectrum/image",
3
- "version": "3.3.4-nightly.3598+810579b67",
3
+ "version": "3.3.4-nightly.3600+bfce84fee",
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
- "@babel/runtime": "^7.6.2",
40
- "@react-aria/utils": "3.0.0-nightly.1898+810579b67",
41
- "@react-spectrum/utils": "3.0.0-nightly.1898+810579b67",
42
- "@react-types/image": "3.2.6-nightly.3598+810579b67",
43
- "@react-types/shared": "3.0.0-nightly.1898+810579b67"
39
+ "@react-aria/utils": "3.0.0-nightly.1900+bfce84fee",
40
+ "@react-spectrum/utils": "3.0.0-nightly.1900+bfce84fee",
41
+ "@react-types/image": "3.2.6-nightly.3600+bfce84fee",
42
+ "@react-types/shared": "3.0.0-nightly.1900+bfce84fee",
43
+ "@swc/helpers": "^0.4.14"
44
44
  },
45
45
  "devDependencies": {
46
- "@adobe/spectrum-css-temp": "3.0.0-nightly.1898+810579b67"
46
+ "@adobe/spectrum-css-temp": "3.0.0-nightly.1900+bfce84fee"
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": "810579b671791f1593108f62cdc1893de3a220e3"
55
+ "gitHead": "bfce84fee12a027d9cbc38b43e1747e3e4b4b169"
56
56
  }