@react-spectrum/image 3.6.4 → 3.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/import.mjs +2 -2
- package/dist/main.js +2 -2
- package/dist/main.js.map +1 -1
- package/dist/module.js +2 -2
- package/dist/module.js.map +1 -1
- package/dist/types/src/index.d.ts +2 -0
- package/package.json +12 -28
- package/src/index.ts +3 -2
- package/dist/Image.main.js +0 -64
- package/dist/Image.main.js.map +0 -1
- package/dist/Image.mjs +0 -59
- package/dist/Image.module.js +0 -59
- package/dist/Image.module.js.map +0 -1
- package/dist/image.e67161ea.css +0 -7
- package/dist/image.e67161ea.css.map +0 -1
- package/dist/image_vars_css.main.js +0 -11
- package/dist/image_vars_css.main.js.map +0 -1
- package/dist/image_vars_css.mjs +0 -13
- package/dist/image_vars_css.module.js +0 -13
- package/dist/image_vars_css.module.js.map +0 -1
- package/dist/types.d.ts +0 -10
- package/dist/types.d.ts.map +0 -1
- package/src/Image.tsx +0 -68
package/dist/import.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {Image as $
|
|
1
|
+
import {Image as $77dccff87f4d39b2$re_export$Image} from "@adobe/react-spectrum/Image";
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
4
|
* Copyright 2020 Adobe. All rights reserved.
|
|
@@ -14,5 +14,5 @@ import {Image as $77e0ac4d4aa3e5ef$export$3e431a229df88919} from "./Image.mjs";
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
export {$
|
|
17
|
+
export {$77dccff87f4d39b2$re_export$Image as Image};
|
|
18
18
|
//# sourceMappingURL=module.js.map
|
package/dist/main.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
var $
|
|
1
|
+
var $fUXQa$adobereactspectrumImage = require("@adobe/react-spectrum/Image");
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
function $parcel$export(e, n, v, s) {
|
|
5
5
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
$parcel$export(module.exports, "Image", ()
|
|
8
|
+
$parcel$export(module.exports, "Image", function () { return $fUXQa$adobereactspectrumImage.Image; });
|
|
9
9
|
/*
|
|
10
10
|
* Copyright 2020 Adobe. All rights reserved.
|
|
11
11
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C","sources":["packages/@react-spectrum/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 '
|
|
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 '@adobe/react-spectrum/Image';\n\nexport type {ImageProps, SpectrumImageProps} from '@adobe/react-spectrum/Image';\n"],"names":[],"version":3,"file":"main.js.map"}
|
package/dist/module.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {Image as $
|
|
1
|
+
import {Image as $77dccff87f4d39b2$re_export$Image} from "@adobe/react-spectrum/Image";
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
4
|
* Copyright 2020 Adobe. All rights reserved.
|
|
@@ -14,5 +14,5 @@ import {Image as $77e0ac4d4aa3e5ef$export$3e431a229df88919} from "./Image.module
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
export {$
|
|
17
|
+
export {$77dccff87f4d39b2$re_export$Image as Image};
|
|
18
18
|
//# sourceMappingURL=module.js.map
|
package/dist/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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 '
|
|
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 '@adobe/react-spectrum/Image';\n\nexport type {ImageProps, SpectrumImageProps} from '@adobe/react-spectrum/Image';\n"],"names":[],"version":3,"file":"module.js.map"}
|
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-spectrum/image",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.7.0",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/main.js",
|
|
7
7
|
"module": "dist/module.js",
|
|
8
8
|
"exports": {
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
"./dist/types.d.ts",
|
|
12
|
-
"./
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"
|
|
9
|
+
".": {
|
|
10
|
+
"source": "./src/index.ts",
|
|
11
|
+
"types": "./dist/types/src/index.d.ts",
|
|
12
|
+
"import": "./dist/import.mjs",
|
|
13
|
+
"require": "./dist/main.js"
|
|
14
|
+
},
|
|
15
|
+
"./package.json": "./package.json"
|
|
16
16
|
},
|
|
17
|
-
"types": "dist/types.d.ts",
|
|
17
|
+
"types": "dist/types/src/index.d.ts",
|
|
18
18
|
"source": "src/index.ts",
|
|
19
19
|
"files": [
|
|
20
20
|
"dist",
|
|
@@ -24,38 +24,22 @@
|
|
|
24
24
|
"*.css"
|
|
25
25
|
],
|
|
26
26
|
"targets": {
|
|
27
|
-
"
|
|
28
|
-
"includeNodeModules": [
|
|
29
|
-
"@adobe/spectrum-css-temp"
|
|
30
|
-
]
|
|
31
|
-
},
|
|
32
|
-
"module": {
|
|
33
|
-
"includeNodeModules": [
|
|
34
|
-
"@adobe/spectrum-css-temp"
|
|
35
|
-
]
|
|
36
|
-
}
|
|
27
|
+
"types": false
|
|
37
28
|
},
|
|
38
29
|
"repository": {
|
|
39
30
|
"type": "git",
|
|
40
31
|
"url": "https://github.com/adobe/react-spectrum"
|
|
41
32
|
},
|
|
42
33
|
"dependencies": {
|
|
43
|
-
"@react-
|
|
44
|
-
"@react-spectrum/utils": "^3.12.11",
|
|
45
|
-
"@react-types/image": "^3.5.3",
|
|
46
|
-
"@react-types/shared": "^3.33.0",
|
|
34
|
+
"@adobe/react-spectrum": "3.47.0",
|
|
47
35
|
"@swc/helpers": "^0.5.0"
|
|
48
36
|
},
|
|
49
|
-
"devDependencies": {
|
|
50
|
-
"@adobe/spectrum-css-temp": "3.0.0-alpha.1"
|
|
51
|
-
},
|
|
52
37
|
"peerDependencies": {
|
|
53
|
-
"@react-spectrum/provider": "^3.0.0",
|
|
54
38
|
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1",
|
|
55
39
|
"react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
|
|
56
40
|
},
|
|
57
41
|
"publishConfig": {
|
|
58
42
|
"access": "public"
|
|
59
43
|
},
|
|
60
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "a6999bdf494a2e9c0381a5881908328bdd22ddae"
|
|
61
45
|
}
|
package/src/index.ts
CHANGED
|
@@ -12,5 +12,6 @@
|
|
|
12
12
|
|
|
13
13
|
/// <reference types="css-module-types" />
|
|
14
14
|
|
|
15
|
-
export {Image} from '
|
|
16
|
-
|
|
15
|
+
export {Image} from '@adobe/react-spectrum/Image';
|
|
16
|
+
|
|
17
|
+
export type {ImageProps, SpectrumImageProps} from '@adobe/react-spectrum/Image';
|
package/dist/Image.main.js
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
require("./image.e67161ea.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
|
-
const $bda2e7b47de3a920$export$3e431a229df88919 = /*#__PURE__*/ (0, ($parcel$interopDefault($lyGvT$react))).forwardRef(function Image(props, ref) {
|
|
34
|
-
/* Slots should be able to pass an alt for default behavior, but in Images, the child may know better. */ let userProvidedAlt = props.alt;
|
|
35
|
-
props = (0, $lyGvT$reactspectrumutils.useSlotProps)(props, 'image');
|
|
36
|
-
props = (0, $lyGvT$reactspectrumprovider.useProviderProps)(props);
|
|
37
|
-
let { objectFit: objectFit, src: src, alt: alt, ...otherProps } = props;
|
|
38
|
-
let { styleProps: styleProps } = (0, $lyGvT$reactspectrumutils.useStyleProps)(otherProps);
|
|
39
|
-
let domRef = (0, $lyGvT$reactspectrumutils.useDOMRef)(ref);
|
|
40
|
-
if (alt == null && process.env.NODE_ENV !== 'production') 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.');
|
|
41
|
-
return /*#__PURE__*/ (0, ($parcel$interopDefault($lyGvT$react))).createElement("div", {
|
|
42
|
-
...(0, $lyGvT$reactariautils.filterDOMProps)(props),
|
|
43
|
-
...styleProps,
|
|
44
|
-
className: (0, $lyGvT$reactspectrumutils.classNames)((0, ($parcel$interopDefault($ec6587ec6732a958$exports))), styleProps.className),
|
|
45
|
-
style: {
|
|
46
|
-
...styleProps.style,
|
|
47
|
-
overflow: 'hidden'
|
|
48
|
-
},
|
|
49
|
-
ref: domRef
|
|
50
|
-
}, /*#__PURE__*/ (0, ($parcel$interopDefault($lyGvT$react))).createElement("img", {
|
|
51
|
-
src: src,
|
|
52
|
-
alt: userProvidedAlt || alt,
|
|
53
|
-
style: {
|
|
54
|
-
objectFit: objectFit
|
|
55
|
-
},
|
|
56
|
-
className: (0, $lyGvT$reactspectrumutils.classNames)((0, ($parcel$interopDefault($ec6587ec6732a958$exports))), 'spectrum-Image-img'),
|
|
57
|
-
onError: props === null || props === void 0 ? void 0 : props.onError,
|
|
58
|
-
onLoad: props === null || props === void 0 ? void 0 : props.onLoad,
|
|
59
|
-
crossOrigin: props === null || props === void 0 ? void 0 : props.crossOrigin
|
|
60
|
-
}));
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
//# sourceMappingURL=Image.main.js.map
|
package/dist/Image.main.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAaM,MAAM,0DAAQ,CAAA,GAAA,sCAAI,EAAE,UAAU,CAErC,SAAS,MAAM,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,QAAQ,QAAQ,GAAG,CAAC,QAAQ,KAAK,cAC1C,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;QACrB,WAAW,EAAE,kBAAA,4BAAA,MAAO,WAAW;;AAGvC","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/**\n * Image is used to insert and display an image within a component.\n */\nexport const Image = React.forwardRef(// 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 && process.env.NODE_ENV !== 'production') {\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 crossOrigin={props?.crossOrigin} />\n </div>\n );\n});\n"],"names":[],"version":3,"file":"Image.main.js.map"}
|
package/dist/Image.mjs
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import "./image.e67161ea.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
|
-
const $77e0ac4d4aa3e5ef$export$3e431a229df88919 = /*#__PURE__*/ (0, $6cGum$react).forwardRef(function Image(props, ref) {
|
|
28
|
-
/* 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 = (0, $6cGum$useSlotProps)(props, 'image');
|
|
30
|
-
props = (0, $6cGum$useProviderProps)(props);
|
|
31
|
-
let { objectFit: objectFit, src: src, alt: alt, ...otherProps } = props;
|
|
32
|
-
let { styleProps: styleProps } = (0, $6cGum$useStyleProps)(otherProps);
|
|
33
|
-
let domRef = (0, $6cGum$useDOMRef)(ref);
|
|
34
|
-
if (alt == null && process.env.NODE_ENV !== 'production') 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__*/ (0, $6cGum$react).createElement("div", {
|
|
36
|
-
...(0, $6cGum$filterDOMProps)(props),
|
|
37
|
-
...styleProps,
|
|
38
|
-
className: (0, $6cGum$classNames)((0, ($parcel$interopDefault($6cGum$image_vars_cssmodulejs))), styleProps.className),
|
|
39
|
-
style: {
|
|
40
|
-
...styleProps.style,
|
|
41
|
-
overflow: 'hidden'
|
|
42
|
-
},
|
|
43
|
-
ref: domRef
|
|
44
|
-
}, /*#__PURE__*/ (0, $6cGum$react).createElement("img", {
|
|
45
|
-
src: src,
|
|
46
|
-
alt: userProvidedAlt || alt,
|
|
47
|
-
style: {
|
|
48
|
-
objectFit: objectFit
|
|
49
|
-
},
|
|
50
|
-
className: (0, $6cGum$classNames)((0, ($parcel$interopDefault($6cGum$image_vars_cssmodulejs))), 'spectrum-Image-img'),
|
|
51
|
-
onError: props === null || props === void 0 ? void 0 : props.onError,
|
|
52
|
-
onLoad: props === null || props === void 0 ? void 0 : props.onLoad,
|
|
53
|
-
crossOrigin: props === null || props === void 0 ? void 0 : props.crossOrigin
|
|
54
|
-
}));
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
export {$77e0ac4d4aa3e5ef$export$3e431a229df88919 as Image};
|
|
59
|
-
//# sourceMappingURL=Image.module.js.map
|
package/dist/Image.module.js
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import "./image.e67161ea.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
|
-
const $77e0ac4d4aa3e5ef$export$3e431a229df88919 = /*#__PURE__*/ (0, $6cGum$react).forwardRef(function Image(props, ref) {
|
|
28
|
-
/* 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 = (0, $6cGum$useSlotProps)(props, 'image');
|
|
30
|
-
props = (0, $6cGum$useProviderProps)(props);
|
|
31
|
-
let { objectFit: objectFit, src: src, alt: alt, ...otherProps } = props;
|
|
32
|
-
let { styleProps: styleProps } = (0, $6cGum$useStyleProps)(otherProps);
|
|
33
|
-
let domRef = (0, $6cGum$useDOMRef)(ref);
|
|
34
|
-
if (alt == null && process.env.NODE_ENV !== 'production') 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__*/ (0, $6cGum$react).createElement("div", {
|
|
36
|
-
...(0, $6cGum$filterDOMProps)(props),
|
|
37
|
-
...styleProps,
|
|
38
|
-
className: (0, $6cGum$classNames)((0, ($parcel$interopDefault($6cGum$image_vars_cssmodulejs))), styleProps.className),
|
|
39
|
-
style: {
|
|
40
|
-
...styleProps.style,
|
|
41
|
-
overflow: 'hidden'
|
|
42
|
-
},
|
|
43
|
-
ref: domRef
|
|
44
|
-
}, /*#__PURE__*/ (0, $6cGum$react).createElement("img", {
|
|
45
|
-
src: src,
|
|
46
|
-
alt: userProvidedAlt || alt,
|
|
47
|
-
style: {
|
|
48
|
-
objectFit: objectFit
|
|
49
|
-
},
|
|
50
|
-
className: (0, $6cGum$classNames)((0, ($parcel$interopDefault($6cGum$image_vars_cssmodulejs))), 'spectrum-Image-img'),
|
|
51
|
-
onError: props === null || props === void 0 ? void 0 : props.onError,
|
|
52
|
-
onLoad: props === null || props === void 0 ? void 0 : props.onLoad,
|
|
53
|
-
crossOrigin: props === null || props === void 0 ? void 0 : props.crossOrigin
|
|
54
|
-
}));
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
export {$77e0ac4d4aa3e5ef$export$3e431a229df88919 as Image};
|
|
59
|
-
//# sourceMappingURL=Image.module.js.map
|
package/dist/Image.module.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAaM,MAAM,0DAAQ,CAAA,GAAA,YAAI,EAAE,UAAU,CAErC,SAAS,MAAM,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,QAAQ,QAAQ,GAAG,CAAC,QAAQ,KAAK,cAC1C,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;QACrB,WAAW,EAAE,kBAAA,4BAAA,MAAO,WAAW;;AAGvC","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/**\n * Image is used to insert and display an image within a component.\n */\nexport const Image = React.forwardRef(// 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 && process.env.NODE_ENV !== 'production') {\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 crossOrigin={props?.crossOrigin} />\n </div>\n );\n});\n"],"names":[],"version":3,"file":"Image.module.js.map"}
|
package/dist/image.e67161ea.css
DELETED
|
@@ -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":"image.e67161ea.css.map"}
|
|
@@ -1,11 +0,0 @@
|
|
|
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 = `tX8u6G_spectrum-Image-img`;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
//# sourceMappingURL=image_vars_css.main.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
package/dist/image_vars_css.mjs
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
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 = `tX8u6G_spectrum-Image-img`;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export {$cf2f2ea6e1c0495a$exports as default};
|
|
13
|
-
//# sourceMappingURL=image_vars_css.module.js.map
|
|
@@ -1,13 +0,0 @@
|
|
|
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 = `tX8u6G_spectrum-Image-img`;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export {$cf2f2ea6e1c0495a$exports as default};
|
|
13
|
-
//# sourceMappingURL=image_vars_css.module.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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/types.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { SpectrumImageProps } from "@react-types/image";
|
|
3
|
-
import { DOMRefValue } from "@react-types/shared";
|
|
4
|
-
/**
|
|
5
|
-
* Image is used to insert and display an image within a component.
|
|
6
|
-
*/
|
|
7
|
-
export const Image: React.ForwardRefExoticComponent<SpectrumImageProps & React.RefAttributes<DOMRefValue<HTMLDivElement>>>;
|
|
8
|
-
export type { SpectrumImageProps } from '@react-types/image';
|
|
9
|
-
|
|
10
|
-
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";;;AAoBA;;GAEG;AACH,OAAO,MAAM,6GA4CX,CAAC;ACpDH,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"}
|
package/src/Image.tsx
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
3
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
-
*
|
|
7
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
-
* governing permissions and limitations under the License.
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
import {classNames, useDOMRef, useSlotProps, useStyleProps} from '@react-spectrum/utils';
|
|
14
|
-
import {DOMRef} from '@react-types/shared';
|
|
15
|
-
import {filterDOMProps} from '@react-aria/utils';
|
|
16
|
-
import React from 'react';
|
|
17
|
-
import {SpectrumImageProps} from '@react-types/image';
|
|
18
|
-
import styles from '@adobe/spectrum-css-temp/components/image/vars.css';
|
|
19
|
-
import {useProviderProps} from '@react-spectrum/provider';
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Image is used to insert and display an image within a component.
|
|
23
|
-
*/
|
|
24
|
-
export const Image = React.forwardRef(// incomplete component for show right now
|
|
25
|
-
|
|
26
|
-
function Image(props: SpectrumImageProps, ref: DOMRef<HTMLDivElement>) {
|
|
27
|
-
/* Slots should be able to pass an alt for default behavior, but in Images, the child may know better. */
|
|
28
|
-
let userProvidedAlt = props.alt;
|
|
29
|
-
props = useSlotProps(props, 'image');
|
|
30
|
-
props = useProviderProps(props);
|
|
31
|
-
let {
|
|
32
|
-
objectFit,
|
|
33
|
-
src,
|
|
34
|
-
alt,
|
|
35
|
-
...otherProps
|
|
36
|
-
} = props;
|
|
37
|
-
let {styleProps} = useStyleProps(otherProps);
|
|
38
|
-
let domRef = useDOMRef(ref);
|
|
39
|
-
|
|
40
|
-
if (alt == null && process.env.NODE_ENV !== 'production') {
|
|
41
|
-
console.warn(
|
|
42
|
-
'The `alt` prop was not provided to an image. ' +
|
|
43
|
-
'Add `alt` text for screen readers, or set `alt=""` prop to indicate that the image ' +
|
|
44
|
-
'is decorative or redundant with displayed text and should not be announced by screen readers.'
|
|
45
|
-
);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
return (
|
|
49
|
-
<div
|
|
50
|
-
{...filterDOMProps(props)}
|
|
51
|
-
{...styleProps}
|
|
52
|
-
className={classNames(styles, styleProps.className)}
|
|
53
|
-
style={{
|
|
54
|
-
...styleProps.style,
|
|
55
|
-
overflow: 'hidden'
|
|
56
|
-
}}
|
|
57
|
-
ref={domRef}>
|
|
58
|
-
<img
|
|
59
|
-
src={src}
|
|
60
|
-
alt={userProvidedAlt || alt}
|
|
61
|
-
style={{objectFit}}
|
|
62
|
-
className={classNames(styles, 'spectrum-Image-img')}
|
|
63
|
-
onError={props?.onError}
|
|
64
|
-
onLoad={props?.onLoad}
|
|
65
|
-
crossOrigin={props?.crossOrigin} />
|
|
66
|
-
</div>
|
|
67
|
-
);
|
|
68
|
-
});
|