@react-aria/separator 3.2.6 → 3.3.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 +49 -0
- package/package.json +9 -4
package/dist/import.mjs
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import {filterDOMProps as $hvHz9$filterDOMProps} from "@react-aria/utils";
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
5
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
7
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
*
|
|
9
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
10
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
11
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
12
|
+
* governing permissions and limitations under the License.
|
|
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
|
+
*/
|
|
24
|
+
function $f4b273590fab9f93$export$52210f68a14655d0(props) {
|
|
25
|
+
let domProps = (0, $hvHz9$filterDOMProps)(props, {
|
|
26
|
+
labelable: true
|
|
27
|
+
});
|
|
28
|
+
let ariaOrientation;
|
|
29
|
+
// if orientation is horizontal, aria-orientation default is horizontal, so we leave it undefined
|
|
30
|
+
// if it's vertical, we need to specify it
|
|
31
|
+
if (props.orientation === "vertical") ariaOrientation = "vertical";
|
|
32
|
+
// hr elements implicitly have role = separator and a horizontal orientation
|
|
33
|
+
if (props.elementType !== "hr") return {
|
|
34
|
+
separatorProps: {
|
|
35
|
+
...domProps,
|
|
36
|
+
role: "separator",
|
|
37
|
+
"aria-orientation": ariaOrientation
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
return {
|
|
41
|
+
separatorProps: domProps
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
export {$f4b273590fab9f93$export$52210f68a14655d0 as useSeparator};
|
|
49
|
+
//# sourceMappingURL=module.js.map
|
package/package.json
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-aria/separator",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.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": [
|
|
@@ -17,8 +22,8 @@
|
|
|
17
22
|
"url": "https://github.com/adobe/react-spectrum"
|
|
18
23
|
},
|
|
19
24
|
"dependencies": {
|
|
20
|
-
"@react-aria/utils": "^3.
|
|
21
|
-
"@react-types/shared": "^3.
|
|
25
|
+
"@react-aria/utils": "^3.15.0",
|
|
26
|
+
"@react-types/shared": "^3.17.0",
|
|
22
27
|
"@swc/helpers": "^0.4.14"
|
|
23
28
|
},
|
|
24
29
|
"peerDependencies": {
|
|
@@ -27,5 +32,5 @@
|
|
|
27
32
|
"publishConfig": {
|
|
28
33
|
"access": "public"
|
|
29
34
|
},
|
|
30
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "a0efee84aa178cb1a202951dfd6d8de02b292307"
|
|
31
36
|
}
|