@react-aria/separator 3.0.0-nightly-641446f65-240905

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/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # @react-aria/separator
2
+
3
+ This package is part of [react-spectrum](https://github.com/adobe/react-spectrum). See the repo for more details.
@@ -0,0 +1,17 @@
1
+ import {useSeparator as $f4b273590fab9f93$export$52210f68a14655d0} from "./useSeparator.mjs";
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
+
15
+
16
+ export {$f4b273590fab9f93$export$52210f68a14655d0 as useSeparator};
17
+ //# sourceMappingURL=module.js.map
package/dist/main.js ADDED
@@ -0,0 +1,22 @@
1
+ var $8fe2a70229d5746b$exports = require("./useSeparator.main.js");
2
+
3
+
4
+ function $parcel$export(e, n, v, s) {
5
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
6
+ }
7
+
8
+ $parcel$export(module.exports, "useSeparator", () => $8fe2a70229d5746b$exports.useSeparator);
9
+ /*
10
+ * Copyright 2020 Adobe. All rights reserved.
11
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
12
+ * you may not use this file except in compliance with the License. You may obtain a copy
13
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
14
+ *
15
+ * Unless required by applicable law or agreed to in writing, software distributed under
16
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
17
+ * OF ANY KIND, either express or implied. See the License for the specific language
18
+ * governing permissions and limitations under the License.
19
+ */
20
+
21
+
22
+ //# sourceMappingURL=main.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;;AAAA;;;;;;;;;;CAUC","sources":["packages/@react-aria/separator/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 */\nexport type {SeparatorProps, SeparatorAria} from './useSeparator';\nexport {useSeparator} from './useSeparator';\n"],"names":[],"version":3,"file":"main.js.map"}
package/dist/module.js ADDED
@@ -0,0 +1,17 @@
1
+ import {useSeparator as $f4b273590fab9f93$export$52210f68a14655d0} from "./useSeparator.module.js";
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
+
15
+
16
+ export {$f4b273590fab9f93$export$52210f68a14655d0 as useSeparator};
17
+ //# sourceMappingURL=module.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;AAAA;;;;;;;;;;CAUC","sources":["packages/@react-aria/separator/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 */\nexport type {SeparatorProps, SeparatorAria} from './useSeparator';\nexport {useSeparator} from './useSeparator';\n"],"names":[],"version":3,"file":"module.js.map"}
@@ -0,0 +1,22 @@
1
+ import { AriaLabelingProps, DOMAttributes, DOMProps, Orientation } from "@react-types/shared";
2
+ export interface SeparatorProps extends DOMProps, AriaLabelingProps {
3
+ /**
4
+ * The orientation of the separator.
5
+ * @default 'horizontal'
6
+ */
7
+ orientation?: Orientation;
8
+ /** The HTML element type that will be used to render the separator. */
9
+ elementType?: string;
10
+ }
11
+ export interface SeparatorAria {
12
+ /** Props for the separator element. */
13
+ separatorProps: DOMAttributes;
14
+ }
15
+ /**
16
+ * Provides the accessibility implementation for a separator.
17
+ * A separator is a visual divider between two groups of content,
18
+ * e.g. groups of menu items or sections of a page.
19
+ */
20
+ export function useSeparator(props: SeparatorProps): SeparatorAria;
21
+
22
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"mappings":";AAeA,+BAAgC,SAAQ,QAAQ,EAAE,iBAAiB;IACjE;;;OAGG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,uEAAuE;IACvE,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED;IACE,uCAAuC;IACvC,cAAc,EAAE,aAAa,CAAA;CAC9B;AAED;;;;GAIG;AACH,6BAA6B,KAAK,EAAE,cAAc,GAAG,aAAa,CAmBjE","sources":["packages/@react-aria/separator/src/packages/@react-aria/separator/src/useSeparator.ts","packages/@react-aria/separator/src/packages/@react-aria/separator/src/index.ts","packages/@react-aria/separator/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 */\nexport type {SeparatorProps, SeparatorAria} from './useSeparator';\nexport {useSeparator} from './useSeparator';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
@@ -0,0 +1,42 @@
1
+ var $hN9Dd$reactariautils = require("@react-aria/utils");
2
+
3
+
4
+ function $parcel$export(e, n, v, s) {
5
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
6
+ }
7
+
8
+ $parcel$export(module.exports, "useSeparator", () => $8fe2a70229d5746b$export$52210f68a14655d0);
9
+ /*
10
+ * Copyright 2020 Adobe. All rights reserved.
11
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
12
+ * you may not use this file except in compliance with the License. You may obtain a copy
13
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
14
+ *
15
+ * Unless required by applicable law or agreed to in writing, software distributed under
16
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
17
+ * OF ANY KIND, either express or implied. See the License for the specific language
18
+ * governing permissions and limitations under the License.
19
+ */
20
+ function $8fe2a70229d5746b$export$52210f68a14655d0(props) {
21
+ let domProps = (0, $hN9Dd$reactariautils.filterDOMProps)(props, {
22
+ labelable: true
23
+ });
24
+ let ariaOrientation;
25
+ // if orientation is horizontal, aria-orientation default is horizontal, so we leave it undefined
26
+ // if it's vertical, we need to specify it
27
+ if (props.orientation === 'vertical') ariaOrientation = 'vertical';
28
+ // hr elements implicitly have role = separator and a horizontal orientation
29
+ if (props.elementType !== 'hr') return {
30
+ separatorProps: {
31
+ ...domProps,
32
+ role: 'separator',
33
+ 'aria-orientation': ariaOrientation
34
+ }
35
+ };
36
+ return {
37
+ separatorProps: domProps
38
+ };
39
+ }
40
+
41
+
42
+ //# sourceMappingURL=useSeparator.main.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;;AAAA;;;;;;;;;;CAUC;AAyBM,SAAS,0CAAa,KAAqB;IAChD,IAAI,WAAW,CAAA,GAAA,oCAAa,EAAE,OAAO;QAAC,WAAW;IAAI;IACrD,IAAI;IACJ,iGAAiG;IACjG,0CAA0C;IAC1C,IAAI,MAAM,WAAW,KAAK,YACxB,kBAAkB;IAEpB,4EAA4E;IAC5E,IAAI,MAAM,WAAW,KAAK,MACxB,OAAO;QACL,gBAAgB;YACd,GAAG,QAAQ;YACX,MAAM;YACN,oBAAoB;QACtB;IACF;IAEF,OAAO;QAAC,gBAAgB;IAAQ;AAClC","sources":["packages/@react-aria/separator/src/useSeparator.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\nimport {AriaLabelingProps, DOMAttributes, DOMProps, Orientation} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\n\nexport interface SeparatorProps extends DOMProps, AriaLabelingProps {\n /**\n * The orientation of the separator.\n * @default 'horizontal'\n */\n orientation?: Orientation,\n /** The HTML element type that will be used to render the separator. */\n elementType?: string\n}\n\nexport interface SeparatorAria {\n /** Props for the separator element. */\n separatorProps: DOMAttributes\n}\n\n/**\n * Provides the accessibility implementation for a separator.\n * A separator is a visual divider between two groups of content,\n * e.g. groups of menu items or sections of a page.\n */\nexport function useSeparator(props: SeparatorProps): SeparatorAria {\n let domProps = filterDOMProps(props, {labelable: true});\n let ariaOrientation;\n // if orientation is horizontal, aria-orientation default is horizontal, so we leave it undefined\n // if it's vertical, we need to specify it\n if (props.orientation === 'vertical') {\n ariaOrientation = 'vertical';\n }\n // hr elements implicitly have role = separator and a horizontal orientation\n if (props.elementType !== 'hr') {\n return {\n separatorProps: {\n ...domProps,\n role: 'separator',\n 'aria-orientation': ariaOrientation\n }\n };\n }\n return {separatorProps: domProps};\n}\n"],"names":[],"version":3,"file":"useSeparator.main.js.map"}
@@ -0,0 +1,37 @@
1
+ import {filterDOMProps as $1vbRD$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
+ function $f4b273590fab9f93$export$52210f68a14655d0(props) {
15
+ let domProps = (0, $1vbRD$filterDOMProps)(props, {
16
+ labelable: true
17
+ });
18
+ let ariaOrientation;
19
+ // if orientation is horizontal, aria-orientation default is horizontal, so we leave it undefined
20
+ // if it's vertical, we need to specify it
21
+ if (props.orientation === 'vertical') ariaOrientation = 'vertical';
22
+ // hr elements implicitly have role = separator and a horizontal orientation
23
+ if (props.elementType !== 'hr') return {
24
+ separatorProps: {
25
+ ...domProps,
26
+ role: 'separator',
27
+ 'aria-orientation': ariaOrientation
28
+ }
29
+ };
30
+ return {
31
+ separatorProps: domProps
32
+ };
33
+ }
34
+
35
+
36
+ export {$f4b273590fab9f93$export$52210f68a14655d0 as useSeparator};
37
+ //# sourceMappingURL=useSeparator.module.js.map
@@ -0,0 +1,37 @@
1
+ import {filterDOMProps as $1vbRD$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
+ function $f4b273590fab9f93$export$52210f68a14655d0(props) {
15
+ let domProps = (0, $1vbRD$filterDOMProps)(props, {
16
+ labelable: true
17
+ });
18
+ let ariaOrientation;
19
+ // if orientation is horizontal, aria-orientation default is horizontal, so we leave it undefined
20
+ // if it's vertical, we need to specify it
21
+ if (props.orientation === 'vertical') ariaOrientation = 'vertical';
22
+ // hr elements implicitly have role = separator and a horizontal orientation
23
+ if (props.elementType !== 'hr') return {
24
+ separatorProps: {
25
+ ...domProps,
26
+ role: 'separator',
27
+ 'aria-orientation': ariaOrientation
28
+ }
29
+ };
30
+ return {
31
+ separatorProps: domProps
32
+ };
33
+ }
34
+
35
+
36
+ export {$f4b273590fab9f93$export$52210f68a14655d0 as useSeparator};
37
+ //# sourceMappingURL=useSeparator.module.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;AAAA;;;;;;;;;;CAUC;AAyBM,SAAS,0CAAa,KAAqB;IAChD,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE,OAAO;QAAC,WAAW;IAAI;IACrD,IAAI;IACJ,iGAAiG;IACjG,0CAA0C;IAC1C,IAAI,MAAM,WAAW,KAAK,YACxB,kBAAkB;IAEpB,4EAA4E;IAC5E,IAAI,MAAM,WAAW,KAAK,MACxB,OAAO;QACL,gBAAgB;YACd,GAAG,QAAQ;YACX,MAAM;YACN,oBAAoB;QACtB;IACF;IAEF,OAAO;QAAC,gBAAgB;IAAQ;AAClC","sources":["packages/@react-aria/separator/src/useSeparator.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\nimport {AriaLabelingProps, DOMAttributes, DOMProps, Orientation} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\n\nexport interface SeparatorProps extends DOMProps, AriaLabelingProps {\n /**\n * The orientation of the separator.\n * @default 'horizontal'\n */\n orientation?: Orientation,\n /** The HTML element type that will be used to render the separator. */\n elementType?: string\n}\n\nexport interface SeparatorAria {\n /** Props for the separator element. */\n separatorProps: DOMAttributes\n}\n\n/**\n * Provides the accessibility implementation for a separator.\n * A separator is a visual divider between two groups of content,\n * e.g. groups of menu items or sections of a page.\n */\nexport function useSeparator(props: SeparatorProps): SeparatorAria {\n let domProps = filterDOMProps(props, {labelable: true});\n let ariaOrientation;\n // if orientation is horizontal, aria-orientation default is horizontal, so we leave it undefined\n // if it's vertical, we need to specify it\n if (props.orientation === 'vertical') {\n ariaOrientation = 'vertical';\n }\n // hr elements implicitly have role = separator and a horizontal orientation\n if (props.elementType !== 'hr') {\n return {\n separatorProps: {\n ...domProps,\n role: 'separator',\n 'aria-orientation': ariaOrientation\n }\n };\n }\n return {separatorProps: domProps};\n}\n"],"names":[],"version":3,"file":"useSeparator.module.js.map"}
package/package.json ADDED
@@ -0,0 +1,36 @@
1
+ {
2
+ "name": "@react-aria/separator",
3
+ "version": "3.0.0-nightly-641446f65-240905",
4
+ "description": "Spectrum UI components in React",
5
+ "license": "Apache-2.0",
6
+ "main": "dist/main.js",
7
+ "module": "dist/module.js",
8
+ "exports": {
9
+ "types": "./dist/types.d.ts",
10
+ "import": "./dist/import.mjs",
11
+ "require": "./dist/main.js"
12
+ },
13
+ "types": "dist/types.d.ts",
14
+ "source": "src/index.ts",
15
+ "files": [
16
+ "dist",
17
+ "src"
18
+ ],
19
+ "sideEffects": false,
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "https://github.com/adobe/react-spectrum"
23
+ },
24
+ "dependencies": {
25
+ "@react-aria/utils": "^3.0.0-nightly-641446f65-240905",
26
+ "@react-types/shared": "^3.0.0-nightly-641446f65-240905",
27
+ "@swc/helpers": "^0.5.0"
28
+ },
29
+ "peerDependencies": {
30
+ "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0"
31
+ },
32
+ "publishConfig": {
33
+ "access": "public"
34
+ },
35
+ "stableVersion": "3.4.2"
36
+ }
package/src/index.ts ADDED
@@ -0,0 +1,13 @@
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
+ export type {SeparatorProps, SeparatorAria} from './useSeparator';
13
+ export {useSeparator} from './useSeparator';
@@ -0,0 +1,55 @@
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 {AriaLabelingProps, DOMAttributes, DOMProps, Orientation} from '@react-types/shared';
14
+ import {filterDOMProps} from '@react-aria/utils';
15
+
16
+ export interface SeparatorProps extends DOMProps, AriaLabelingProps {
17
+ /**
18
+ * The orientation of the separator.
19
+ * @default 'horizontal'
20
+ */
21
+ orientation?: Orientation,
22
+ /** The HTML element type that will be used to render the separator. */
23
+ elementType?: string
24
+ }
25
+
26
+ export interface SeparatorAria {
27
+ /** Props for the separator element. */
28
+ separatorProps: DOMAttributes
29
+ }
30
+
31
+ /**
32
+ * Provides the accessibility implementation for a separator.
33
+ * A separator is a visual divider between two groups of content,
34
+ * e.g. groups of menu items or sections of a page.
35
+ */
36
+ export function useSeparator(props: SeparatorProps): SeparatorAria {
37
+ let domProps = filterDOMProps(props, {labelable: true});
38
+ let ariaOrientation;
39
+ // if orientation is horizontal, aria-orientation default is horizontal, so we leave it undefined
40
+ // if it's vertical, we need to specify it
41
+ if (props.orientation === 'vertical') {
42
+ ariaOrientation = 'vertical';
43
+ }
44
+ // hr elements implicitly have role = separator and a horizontal orientation
45
+ if (props.elementType !== 'hr') {
46
+ return {
47
+ separatorProps: {
48
+ ...domProps,
49
+ role: 'separator',
50
+ 'aria-orientation': ariaOrientation
51
+ }
52
+ };
53
+ }
54
+ return {separatorProps: domProps};
55
+ }