@react-aria/separator 3.3.11 → 3.3.13

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 CHANGED
@@ -1,16 +1,6 @@
1
- import {filterDOMProps as $hvHz9$filterDOMProps} from "@react-aria/utils";
1
+ import {useSeparator as $f4b273590fab9f93$export$52210f68a14655d0} from "./useSeparator.mjs";
2
2
 
3
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
4
  * Copyright 2020 Adobe. All rights reserved.
15
5
  * This file is licensed to you under the Apache License, Version 2.0 (the "License");
16
6
  * you may not use this file except in compliance with the License. You may obtain a copy
@@ -21,28 +11,6 @@ import {filterDOMProps as $hvHz9$filterDOMProps} from "@react-aria/utils";
21
11
  * OF ANY KIND, either express or implied. See the License for the specific language
22
12
  * governing permissions and limitations under the License.
23
13
  */
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
14
 
47
15
 
48
16
  export {$f4b273590fab9f93$export$52210f68a14655d0 as useSeparator};
package/dist/main.js CHANGED
@@ -1,22 +1,12 @@
1
- var $dDFJl$reactariautils = require("@react-aria/utils");
1
+ var $8fe2a70229d5746b$exports = require("./useSeparator.main.js");
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, "useSeparator", () => $8fe2a70229d5746b$export$52210f68a14655d0);
8
+ $parcel$export(module.exports, "useSeparator", () => $8fe2a70229d5746b$exports.useSeparator);
9
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
10
  * Copyright 2020 Adobe. All rights reserved.
21
11
  * This file is licensed to you under the Apache License, Version 2.0 (the "License");
22
12
  * you may not use this file except in compliance with the License. You may obtain a copy
@@ -27,28 +17,6 @@ $parcel$export(module.exports, "useSeparator", () => $8fe2a70229d5746b$export$52
27
17
  * OF ANY KIND, either express or implied. See the License for the specific language
28
18
  * governing permissions and limitations under the License.
29
19
  */
30
- function $8fe2a70229d5746b$export$52210f68a14655d0(props) {
31
- let domProps = (0, $dDFJl$reactariautils.filterDOMProps)(props, {
32
- labelable: true
33
- });
34
- let ariaOrientation;
35
- // if orientation is horizontal, aria-orientation default is horizontal, so we leave it undefined
36
- // if it's vertical, we need to specify it
37
- if (props.orientation === "vertical") ariaOrientation = "vertical";
38
- // hr elements implicitly have role = separator and a horizontal orientation
39
- if (props.elementType !== "hr") return {
40
- separatorProps: {
41
- ...domProps,
42
- role: "separator",
43
- "aria-orientation": ariaOrientation
44
- }
45
- };
46
- return {
47
- separatorProps: domProps
48
- };
49
- }
50
-
51
-
52
20
 
53
21
 
54
22
  //# sourceMappingURL=main.js.map
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;AAAA;;;;;;;;;;ACAA;;;;;;;;;;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;;CD5CC","sources":["packages/@react-aria/separator/src/index.ts","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 */\nexport type {SeparatorProps, SeparatorAria} from './useSeparator';\nexport {useSeparator} from './useSeparator';\n","/*\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":"main.js.map"}
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 CHANGED
@@ -1,16 +1,6 @@
1
- import {filterDOMProps as $hvHz9$filterDOMProps} from "@react-aria/utils";
1
+ import {useSeparator as $f4b273590fab9f93$export$52210f68a14655d0} from "./useSeparator.module.js";
2
2
 
3
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
4
  * Copyright 2020 Adobe. All rights reserved.
15
5
  * This file is licensed to you under the Apache License, Version 2.0 (the "License");
16
6
  * you may not use this file except in compliance with the License. You may obtain a copy
@@ -21,28 +11,6 @@ import {filterDOMProps as $hvHz9$filterDOMProps} from "@react-aria/utils";
21
11
  * OF ANY KIND, either express or implied. See the License for the specific language
22
12
  * governing permissions and limitations under the License.
23
13
  */
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
14
 
47
15
 
48
16
  export {$f4b273590fab9f93$export$52210f68a14655d0 as useSeparator};
@@ -1 +1 @@
1
- {"mappings":";;AAAA;;;;;;;;;;ACAA;;;;;;;;;;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;;CD5CC","sources":["packages/@react-aria/separator/src/index.ts","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 */\nexport type {SeparatorProps, SeparatorAria} from './useSeparator';\nexport {useSeparator} from './useSeparator';\n","/*\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":"module.js.map"}
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,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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-aria/separator",
3
- "version": "3.3.11",
3
+ "version": "3.3.13",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -22,8 +22,8 @@
22
22
  "url": "https://github.com/adobe/react-spectrum"
23
23
  },
24
24
  "dependencies": {
25
- "@react-aria/utils": "^3.23.2",
26
- "@react-types/shared": "^3.22.1",
25
+ "@react-aria/utils": "^3.24.1",
26
+ "@react-types/shared": "^3.23.1",
27
27
  "@swc/helpers": "^0.5.0"
28
28
  },
29
29
  "peerDependencies": {
@@ -32,5 +32,5 @@
32
32
  "publishConfig": {
33
33
  "access": "public"
34
34
  },
35
- "gitHead": "de9f84a22583fc741c29b341d14cd35ef4cca161"
35
+ "gitHead": "b77d7d594dff4dcfb5359bffbcfd18142b146433"
36
36
  }