@react-spectrum/divider 3.4.4 → 3.5.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.
Files changed (2) hide show
  1. package/dist/import.mjs +95 -0
  2. package/package.json +11 -6
@@ -0,0 +1,95 @@
1
+ import "./main.css";
2
+ import {useSlotProps as $aBEni$useSlotProps, useDOMRef as $aBEni$useDOMRef, useStyleProps as $aBEni$useStyleProps, classNames as $aBEni$classNames} from "@react-spectrum/utils";
3
+ import $aBEni$react from "react";
4
+ import {useSeparator as $aBEni$useSeparator} from "@react-aria/separator";
5
+
6
+ function $parcel$interopDefault(a) {
7
+ return a && a.__esModule ? a.default : a;
8
+ }
9
+ function $parcel$export(e, n, v, s) {
10
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
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
+ */ /// <reference types="css-module-types" />
23
+ /*
24
+ * Copyright 2020 Adobe. All rights reserved.
25
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
26
+ * you may not use this file except in compliance with the License. You may obtain a copy
27
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
28
+ *
29
+ * Unless required by applicable law or agreed to in writing, software distributed under
30
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
31
+ * OF ANY KIND, either express or implied. See the License for the specific language
32
+ * governing permissions and limitations under the License.
33
+ */
34
+
35
+ var $7a9eac509b76fa30$exports = {};
36
+
37
+ $parcel$export($7a9eac509b76fa30$exports, "spectrum-Rule", () => $7a9eac509b76fa30$export$9ebf9cdaed6878bc, (v) => $7a9eac509b76fa30$export$9ebf9cdaed6878bc = v);
38
+ $parcel$export($7a9eac509b76fa30$exports, "spectrum-Rule--large", () => $7a9eac509b76fa30$export$243baa0ec4ab58cc, (v) => $7a9eac509b76fa30$export$243baa0ec4ab58cc = v);
39
+ $parcel$export($7a9eac509b76fa30$exports, "spectrum-Rule--medium", () => $7a9eac509b76fa30$export$a8d73b58ca350eb9, (v) => $7a9eac509b76fa30$export$a8d73b58ca350eb9 = v);
40
+ $parcel$export($7a9eac509b76fa30$exports, "spectrum-Rule--small", () => $7a9eac509b76fa30$export$b4b727880cfe37d, (v) => $7a9eac509b76fa30$export$b4b727880cfe37d = v);
41
+ $parcel$export($7a9eac509b76fa30$exports, "spectrum-Rule--horizontal", () => $7a9eac509b76fa30$export$563c1b24466c05b8, (v) => $7a9eac509b76fa30$export$563c1b24466c05b8 = v);
42
+ $parcel$export($7a9eac509b76fa30$exports, "spectrum-Rule--vertical", () => $7a9eac509b76fa30$export$76f93463a8fc15a8, (v) => $7a9eac509b76fa30$export$76f93463a8fc15a8 = v);
43
+ var $7a9eac509b76fa30$export$9ebf9cdaed6878bc;
44
+ var $7a9eac509b76fa30$export$243baa0ec4ab58cc;
45
+ var $7a9eac509b76fa30$export$a8d73b58ca350eb9;
46
+ var $7a9eac509b76fa30$export$b4b727880cfe37d;
47
+ var $7a9eac509b76fa30$export$563c1b24466c05b8;
48
+ var $7a9eac509b76fa30$export$76f93463a8fc15a8;
49
+ $7a9eac509b76fa30$export$9ebf9cdaed6878bc = "spectrum-Rule_612bb8";
50
+ $7a9eac509b76fa30$export$243baa0ec4ab58cc = "spectrum-Rule--large_612bb8";
51
+ $7a9eac509b76fa30$export$a8d73b58ca350eb9 = "spectrum-Rule--medium_612bb8";
52
+ $7a9eac509b76fa30$export$b4b727880cfe37d = "spectrum-Rule--small_612bb8";
53
+ $7a9eac509b76fa30$export$563c1b24466c05b8 = "spectrum-Rule--horizontal_612bb8";
54
+ $7a9eac509b76fa30$export$76f93463a8fc15a8 = "spectrum-Rule--vertical_612bb8";
55
+
56
+
57
+
58
+ let $269e81ee206e9515$var$sizeMap = {
59
+ S: "small",
60
+ M: "medium",
61
+ L: "large"
62
+ };
63
+ function $269e81ee206e9515$var$Divider(props, ref) {
64
+ props = (0, $aBEni$useSlotProps)(props, "divider");
65
+ let { size: size = "L" , orientation: orientation = "horizontal" , ...otherProps } = props;
66
+ let domRef = (0, $aBEni$useDOMRef)(ref);
67
+ let { styleProps: styleProps } = (0, $aBEni$useStyleProps)(otherProps);
68
+ let weight = $269e81ee206e9515$var$sizeMap[size];
69
+ let Element = "hr";
70
+ if (orientation === "vertical") Element = "div";
71
+ let { separatorProps: separatorProps } = (0, $aBEni$useSeparator)({
72
+ ...props,
73
+ elementType: Element
74
+ });
75
+ return /*#__PURE__*/ (0, $aBEni$react).createElement(Element, {
76
+ ...styleProps,
77
+ className: (0, $aBEni$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($7a9eac509b76fa30$exports))), "spectrum-Rule", `spectrum-Rule--${weight}`, {
78
+ "spectrum-Rule--vertical": orientation === "vertical",
79
+ "spectrum-Rule--horizontal": orientation === "horizontal"
80
+ }, styleProps.className),
81
+ // @ts-ignore https://github.com/Microsoft/TypeScript/issues/28892
82
+ ref: domRef,
83
+ ...separatorProps
84
+ });
85
+ }
86
+ /**
87
+ * Dividers bring clarity to a layout by grouping and dividing content in close proximity.
88
+ * They can also be used to establish rhythm and hierarchy.
89
+ */ let $269e81ee206e9515$export$2e0a83ec2e27ecbb = /*#__PURE__*/ (0, $aBEni$react).forwardRef($269e81ee206e9515$var$Divider);
90
+
91
+
92
+
93
+
94
+ export {$269e81ee206e9515$export$2e0a83ec2e27ecbb as Divider};
95
+ //# sourceMappingURL=module.js.map
package/package.json CHANGED
@@ -1,10 +1,15 @@
1
1
  {
2
2
  "name": "@react-spectrum/divider",
3
- "version": "3.4.4",
3
+ "version": "3.5.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
+ "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,10 +36,10 @@
31
36
  "url": "https://github.com/adobe/react-spectrum"
32
37
  },
33
38
  "dependencies": {
34
- "@react-aria/separator": "^3.2.6",
35
- "@react-spectrum/utils": "^3.8.1",
36
- "@react-types/divider": "^3.2.5",
37
- "@react-types/shared": "^3.16.0",
39
+ "@react-aria/separator": "^3.3.0",
40
+ "@react-spectrum/utils": "^3.9.0",
41
+ "@react-types/divider": "^3.3.0",
42
+ "@react-types/shared": "^3.17.0",
38
43
  "@swc/helpers": "^0.4.14"
39
44
  },
40
45
  "devDependencies": {
@@ -46,5 +51,5 @@
46
51
  "publishConfig": {
47
52
  "access": "public"
48
53
  },
49
- "gitHead": "5480d76bd815e239366f92852c76b6831ad2a4fd"
54
+ "gitHead": "a0efee84aa178cb1a202951dfd6d8de02b292307"
50
55
  }