@react-spectrum/image 3.3.5-nightly.3698 → 3.3.5-nightly.3709

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.
Files changed (2) hide show
  1. package/dist/import.mjs +80 -0
  2. package/package.json +12 -7
@@ -0,0 +1,80 @@
1
+ import "./main.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";
6
+
7
+ function $parcel$interopDefault(a) {
8
+ return a && a.__esModule ? a.default : a;
9
+ }
10
+ function $parcel$export(e, n, v, s) {
11
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
12
+ }
13
+ /*
14
+ * 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
+ */
35
+
36
+
37
+ var $cf2f2ea6e1c0495a$exports = {};
38
+
39
+ $parcel$export($cf2f2ea6e1c0495a$exports, "spectrum-Image-img", () => $cf2f2ea6e1c0495a$export$3238177972e11200, (v) => $cf2f2ea6e1c0495a$export$3238177972e11200 = v);
40
+ var $cf2f2ea6e1c0495a$export$3238177972e11200;
41
+ $cf2f2ea6e1c0495a$export$3238177972e11200 = "spectrum-Image-img_fdc794";
42
+
43
+
44
+
45
+ // incomplete component for show right now
46
+ function $77e0ac4d4aa3e5ef$var$Image(props, ref) {
47
+ /* Slots should be able to pass an alt for default behavior, but in Images, the child may know better. */ let userProvidedAlt = props.alt;
48
+ props = (0, $9XFMV$useSlotProps)(props, "image");
49
+ props = (0, $9XFMV$useProviderProps)(props);
50
+ let { objectFit: objectFit , src: src , alt: alt , ...otherProps } = 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),
56
+ ...styleProps,
57
+ className: (0, $9XFMV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($cf2f2ea6e1c0495a$exports))), styleProps.className),
58
+ style: {
59
+ ...styleProps.style,
60
+ overflow: "hidden"
61
+ },
62
+ ref: domRef
63
+ }, /*#__PURE__*/ (0, $9XFMV$react).createElement("img", {
64
+ src: src,
65
+ alt: userProvidedAlt || alt,
66
+ style: {
67
+ objectFit: objectFit
68
+ },
69
+ className: (0, $9XFMV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($cf2f2ea6e1c0495a$exports))), "spectrum-Image-img")
70
+ }));
71
+ }
72
+ /**
73
+ * Image is used to insert and display an image within a component.
74
+ */ const $77e0ac4d4aa3e5ef$export$3e431a229df88919 = /*#__PURE__*/ (0, $9XFMV$react).forwardRef($77e0ac4d4aa3e5ef$var$Image);
75
+
76
+
77
+
78
+
79
+ export {$77e0ac4d4aa3e5ef$export$3e431a229df88919 as Image};
80
+ //# sourceMappingURL=module.js.map
package/package.json CHANGED
@@ -1,10 +1,15 @@
1
1
  {
2
2
  "name": "@react-spectrum/image",
3
- "version": "3.3.5-nightly.3698+72ee92f6d",
3
+ "version": "3.3.5-nightly.3709+0f953cac8",
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
+ "exports": {
9
+ "types": "./dist/types.d.ts",
10
+ "import": "./dist/import.mjs",
11
+ "require": "./dist/main.js"
12
+ },
8
13
  "types": "dist/types.d.ts",
9
14
  "source": "src/index.ts",
10
15
  "files": [
@@ -31,14 +36,14 @@
31
36
  "url": "https://github.com/adobe/react-spectrum"
32
37
  },
33
38
  "dependencies": {
34
- "@react-aria/utils": "3.0.0-nightly.1998+72ee92f6d",
35
- "@react-spectrum/utils": "3.0.0-nightly.1998+72ee92f6d",
36
- "@react-types/image": "3.2.6-nightly.3698+72ee92f6d",
37
- "@react-types/shared": "3.0.0-nightly.1998+72ee92f6d",
39
+ "@react-aria/utils": "3.0.0-nightly.2009+0f953cac8",
40
+ "@react-spectrum/utils": "3.0.0-nightly.2009+0f953cac8",
41
+ "@react-types/image": "3.2.6-nightly.3709+0f953cac8",
42
+ "@react-types/shared": "3.0.0-nightly.2009+0f953cac8",
38
43
  "@swc/helpers": "^0.4.14"
39
44
  },
40
45
  "devDependencies": {
41
- "@adobe/spectrum-css-temp": "3.0.0-nightly.1998+72ee92f6d"
46
+ "@adobe/spectrum-css-temp": "3.0.0-nightly.2009+0f953cac8"
42
47
  },
43
48
  "peerDependencies": {
44
49
  "@react-spectrum/provider": "^3.0.0",
@@ -47,5 +52,5 @@
47
52
  "publishConfig": {
48
53
  "access": "public"
49
54
  },
50
- "gitHead": "72ee92f6d497163468a80642ccb96576f822f365"
55
+ "gitHead": "0f953cac84f98cdff29f2348c120ce541ebb6da8"
51
56
  }