@react-spectrum/divider 3.2.4 → 3.4.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/main.js +3 -21
- package/dist/main.js.map +1 -1
- package/dist/module.js +0 -3
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +1 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +7 -7
- package/src/Divider.tsx +2 -2
- package/src/index.ts +2 -1
package/dist/main.js
CHANGED
|
@@ -3,31 +3,14 @@ var $7uVzT$reactspectrumutils = require("@react-spectrum/utils");
|
|
|
3
3
|
var $7uVzT$react = require("react");
|
|
4
4
|
var $7uVzT$reactariaseparator = require("@react-aria/separator");
|
|
5
5
|
|
|
6
|
-
function $parcel$
|
|
7
|
-
Object.
|
|
8
|
-
if (key === 'default' || key === '__esModule' || dest.hasOwnProperty(key)) {
|
|
9
|
-
return;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
Object.defineProperty(dest, key, {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function get() {
|
|
15
|
-
return source[key];
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
return dest;
|
|
6
|
+
function $parcel$export(e, n, v, s) {
|
|
7
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
21
8
|
}
|
|
22
9
|
function $parcel$interopDefault(a) {
|
|
23
10
|
return a && a.__esModule ? a.default : a;
|
|
24
11
|
}
|
|
25
|
-
function $parcel$export(e, n, v, s) {
|
|
26
|
-
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
27
|
-
}
|
|
28
|
-
var $a75f934b8a5939c6$exports = {};
|
|
29
12
|
|
|
30
|
-
$parcel$export(
|
|
13
|
+
$parcel$export(module.exports, "Divider", () => $a75f934b8a5939c6$export$2e0a83ec2e27ecbb);
|
|
31
14
|
|
|
32
15
|
|
|
33
16
|
var $7fdcb1fd1927dca1$exports = {};
|
|
@@ -87,7 +70,6 @@ function $a75f934b8a5939c6$var$Divider(props, ref) {
|
|
|
87
70
|
*/ let $a75f934b8a5939c6$export$2e0a83ec2e27ecbb = /*#__PURE__*/ ($parcel$interopDefault($7uVzT$react)).forwardRef($a75f934b8a5939c6$var$Divider);
|
|
88
71
|
|
|
89
72
|
|
|
90
|
-
$parcel$exportWildcard(module.exports, $a75f934b8a5939c6$exports);
|
|
91
73
|
|
|
92
74
|
|
|
93
75
|
//# sourceMappingURL=main.js.map
|
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;AEAA,GAA+B;AAC/B,GAAsC;AACtC,GAAuC;AACvC,GAAsC;AACtC,GAA2C;AAC3C,GAAyC;AALzC,yCAA+B,GAAG,CAAsB;AACxD,yCAAsC,GAAG,CAA6B;AACtE,yCAAuC,GAAG,CAA8B;AACxE,wCAAsC,GAAG,CAA6B;AACtE,yCAA2C,GAAG,CAAkC;AAChF,yCAAyC,GAAG,CAAgC;;;;ADc5E,GAAG,CAAC,6BAAO,GAAG,CAAC;IACb,CAAC,EAAE,CAAO;IACV,CAAC,EAAE,CAAQ;IACX,CAAC,EAAE,CAAO;AACZ,CAAC;SAEQ,6BAAO,CAAC,KAA2B,EAAE,GAAW,EAAE,CAAC;IAC1D,KAAK,GAAG,sCAAY,CAAC,KAAK,EAAE,CAAS;IACrC,GAAG,CAAC,CAAC,OACH,IAAI,GAAG,CAAG,kBACV,WAAW,GAAG,CAAY,iBACvB,UAAU,CACf,CAAC,GAAG,KAAK;IACT,GAAG,CAAC,MAAM,GAAG,mCAAS,CAAC,GAAG;IAC1B,GAAG,CAAC,CAAC,aAAA,UAAU,EAAA,CAAC,GAAG,uCAAa,CAAC,UAAU;IAC3C,GAAG,CAAC,MAAM,GAAG,6BAAO,CAAC,IAAI;IAEzB,GAAG,CAAC,OAAO,GAAgB,CAAI;IAC/B,EAAE,EAAE,WAAW,KAAK,CAAU,WAC5B,OAAO,GAAG,CAAK;IAGjB,GAAG,CAAC,CAAC,iBAAA,cAAc,EAAA,CAAC,GAAG,sCAAY,CAAC,CAAC;WAChC,KAAK;QACR,WAAW,EAAE,OAAO;IACtB,CAAC;IAED,MAAM,oEACH,OAAO;WACF,UAAU;QACd,SAAS,EACP,oCAAU,CACR,gEAAM,EACN,CAAe,iBACd,eAAe,EAAE,MAAM,IACxB,CAAC;YACC,CAAyB,0BAAE,WAAW,KAAK,CAAU;YACrD,CAA2B,4BAAE,WAAW,KAAK,CAAY;QAC3D,CAAC,EACD,UAAU,CAAC,SAAS;QAGxB,EAAkE,AAAlE,gEAAkE;QAClE,GAAG,EAAE,MAAM;WACP,cAAc;;AAExB,CAAC;AAED,EAGG,AAHH;;;CAGG,AAHH,EAGG,CACH,GAAG,CAAC,yCAAQ,iBAAG,sCAAK,CAAC,UAAU,CAAC,6BAAO","sources":["packages/@react-spectrum/divider/src/index.ts","packages/@react-spectrum/divider/src/Divider.tsx","packages/@adobe/spectrum-css-temp/components/rule/vars.css"],"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\n/// <reference types=\"css-module-types\" />\n\nexport {Divider} from './Divider';\nexport type {SpectrumDividerProps} from '@react-types/divider';\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 {classNames, useDOMRef, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport React, {ElementType} from 'react';\nimport {SpectrumDividerProps} from '@react-types/divider';\nimport styles from '@adobe/spectrum-css-temp/components/rule/vars.css';\nimport {useSeparator} from '@react-aria/separator';\n\nlet sizeMap = {\n S: 'small',\n M: 'medium',\n L: 'large'\n};\n\nfunction Divider(props: SpectrumDividerProps, ref: DOMRef) {\n props = useSlotProps(props, 'divider');\n let {\n size = 'L',\n orientation = 'horizontal',\n ...otherProps\n } = props;\n let domRef = useDOMRef(ref);\n let {styleProps} = useStyleProps(otherProps);\n let weight = sizeMap[size];\n\n let Element: ElementType = 'hr';\n if (orientation === 'vertical') {\n Element = 'div';\n }\n\n let {separatorProps} = useSeparator({\n ...props,\n elementType: Element\n });\n\n return (\n <Element\n {...styleProps}\n className={\n classNames(\n styles,\n 'spectrum-Rule',\n `spectrum-Rule--${weight}`,\n {\n 'spectrum-Rule--vertical': orientation === 'vertical',\n 'spectrum-Rule--horizontal': orientation === 'horizontal'\n },\n styleProps.className\n )\n }\n // @ts-ignore https://github.com/Microsoft/TypeScript/issues/28892\n ref={domRef}\n {...separatorProps} />\n );\n}\n\n/**\n * Dividers bring clarity to a layout by grouping and dividing content in close proximity.\n * They can also be used to establish rhythm and hierarchy.\n */\nlet _Divider = React.forwardRef(Divider);\nexport {_Divider as Divider};\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\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"main.js.map"}
|
package/dist/module.js
CHANGED
|
@@ -9,9 +9,6 @@ function $parcel$interopDefault(a) {
|
|
|
9
9
|
function $parcel$export(e, n, v, s) {
|
|
10
10
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
11
11
|
}
|
|
12
|
-
var $269e81ee206e9515$exports = {};
|
|
13
|
-
|
|
14
|
-
$parcel$export($269e81ee206e9515$exports, "Divider", () => $269e81ee206e9515$export$2e0a83ec2e27ecbb);
|
|
15
12
|
|
|
16
13
|
|
|
17
14
|
var $7a9eac509b76fa30$exports = {};
|
package/dist/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;AEAA,GAA+B;AAC/B,GAAsC;AACtC,GAAuC;AACvC,GAAsC;AACtC,GAA2C;AAC3C,GAAyC;AALzC,yCAA+B,GAAG,CAAsB;AACxD,yCAAsC,GAAG,CAA6B;AACtE,yCAAuC,GAAG,CAA8B;AACxE,wCAAsC,GAAG,CAA6B;AACtE,yCAA2C,GAAG,CAAkC;AAChF,yCAAyC,GAAG,CAAgC;;;;ADc5E,GAAG,CAAC,6BAAO,GAAG,CAAC;IACb,CAAC,EAAE,CAAO;IACV,CAAC,EAAE,CAAQ;IACX,CAAC,EAAE,CAAO;AACZ,CAAC;SAEQ,6BAAO,CAAC,KAA2B,EAAE,GAAW,EAAE,CAAC;IAC1D,KAAK,GAAG,mBAAY,CAAC,KAAK,EAAE,CAAS;IACrC,GAAG,CAAC,CAAC,OACH,IAAI,GAAG,CAAG,kBACV,WAAW,GAAG,CAAY,iBACvB,UAAU,CACf,CAAC,GAAG,KAAK;IACT,GAAG,CAAC,MAAM,GAAG,gBAAS,CAAC,GAAG;IAC1B,GAAG,CAAC,CAAC,aAAA,UAAU,EAAA,CAAC,GAAG,oBAAa,CAAC,UAAU;IAC3C,GAAG,CAAC,MAAM,GAAG,6BAAO,CAAC,IAAI;IAEzB,GAAG,CAAC,OAAO,GAAgB,CAAI;IAC/B,EAAE,EAAE,WAAW,KAAK,CAAU,WAC5B,OAAO,GAAG,CAAK;IAGjB,GAAG,CAAC,CAAC,iBAAA,cAAc,EAAA,CAAC,GAAG,mBAAY,CAAC,CAAC;WAChC,KAAK;QACR,WAAW,EAAE,OAAO;IACtB,CAAC;IAED,MAAM,0CACH,OAAO;WACF,UAAU;QACd,SAAS,EACP,iBAAU,CACR,gEAAM,EACN,CAAe,iBACd,eAAe,EAAE,MAAM,IACxB,CAAC;YACC,CAAyB,0BAAE,WAAW,KAAK,CAAU;YACrD,CAA2B,4BAAE,WAAW,KAAK,CAAY;QAC3D,CAAC,EACD,UAAU,CAAC,SAAS;QAGxB,EAAkE,AAAlE,gEAAkE;QAClE,GAAG,EAAE,MAAM;WACP,cAAc;;AAExB,CAAC;AAED,EAGG,AAHH;;;CAGG,AAHH,EAGG,CACH,GAAG,CAAC,yCAAQ,iBAAG,YAAK,CAAC,UAAU,CAAC,6BAAO","sources":["packages/@react-spectrum/divider/src/index.ts","packages/@react-spectrum/divider/src/Divider.tsx","packages/@adobe/spectrum-css-temp/components/rule/vars.css"],"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\n/// <reference types=\"css-module-types\" />\n\nexport {Divider} from './Divider';\nexport type {SpectrumDividerProps} from '@react-types/divider';\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 {classNames, useDOMRef, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport React, {ElementType} from 'react';\nimport {SpectrumDividerProps} from '@react-types/divider';\nimport styles from '@adobe/spectrum-css-temp/components/rule/vars.css';\nimport {useSeparator} from '@react-aria/separator';\n\nlet sizeMap = {\n S: 'small',\n M: 'medium',\n L: 'large'\n};\n\nfunction Divider(props: SpectrumDividerProps, ref: DOMRef) {\n props = useSlotProps(props, 'divider');\n let {\n size = 'L',\n orientation = 'horizontal',\n ...otherProps\n } = props;\n let domRef = useDOMRef(ref);\n let {styleProps} = useStyleProps(otherProps);\n let weight = sizeMap[size];\n\n let Element: ElementType = 'hr';\n if (orientation === 'vertical') {\n Element = 'div';\n }\n\n let {separatorProps} = useSeparator({\n ...props,\n elementType: Element\n });\n\n return (\n <Element\n {...styleProps}\n className={\n classNames(\n styles,\n 'spectrum-Rule',\n `spectrum-Rule--${weight}`,\n {\n 'spectrum-Rule--vertical': orientation === 'vertical',\n 'spectrum-Rule--horizontal': orientation === 'horizontal'\n },\n styleProps.className\n )\n }\n // @ts-ignore https://github.com/Microsoft/TypeScript/issues/28892\n ref={domRef}\n {...separatorProps} />\n );\n}\n\n/**\n * Dividers bring clarity to a layout by grouping and dividing content in close proximity.\n * They can also be used to establish rhythm and hierarchy.\n */\nlet _Divider = React.forwardRef(Divider);\nexport {_Divider as Divider};\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\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"module.js.map"}
|
package/dist/types.d.ts
CHANGED
|
@@ -5,5 +5,6 @@ import { SpectrumDividerProps } from "@react-types/divider";
|
|
|
5
5
|
* They can also be used to establish rhythm and hierarchy.
|
|
6
6
|
*/
|
|
7
7
|
export let Divider: React.ForwardRefExoticComponent<SpectrumDividerProps & React.RefAttributes<import("@react-types/shared").DOMRefValue<HTMLElement>>>;
|
|
8
|
+
export type { SpectrumDividerProps } from '@react-types/divider';
|
|
8
9
|
|
|
9
10
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;AAmEA;;;GAGG;AACH,OAAA,IAAI,4IAAoC,CAAC","sources":["packages/@react-spectrum/divider/src/packages/@react-spectrum/divider/src/Divider.tsx","packages/@react-spectrum/divider/src/packages/@react-spectrum/divider/src/index.ts","packages/@react-spectrum/divider/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 */\n\n/// <reference types=\"css-module-types\" />\n\nexport
|
|
1
|
+
{"mappings":";;AAmEA;;;GAGG;AACH,OAAA,IAAI,4IAAoC,CAAC;ACxDzC,YAAY,EAAC,oBAAoB,EAAC,MAAM,sBAAsB,CAAC","sources":["packages/@react-spectrum/divider/src/packages/@react-spectrum/divider/src/Divider.tsx","packages/@react-spectrum/divider/src/packages/@react-spectrum/divider/src/index.ts","packages/@react-spectrum/divider/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 */\n\n/// <reference types=\"css-module-types\" />\n\nexport {Divider} from './Divider';\nexport type {SpectrumDividerProps} from '@react-types/divider';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-spectrum/divider",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -32,19 +32,19 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@babel/runtime": "^7.6.2",
|
|
35
|
-
"@react-aria/separator": "^3.
|
|
36
|
-
"@react-spectrum/utils": "^3.
|
|
37
|
-
"@react-types/divider": "^3.
|
|
38
|
-
"@react-types/shared": "^3.
|
|
35
|
+
"@react-aria/separator": "^3.2.2",
|
|
36
|
+
"@react-spectrum/utils": "^3.7.2",
|
|
37
|
+
"@react-types/divider": "^3.2.2",
|
|
38
|
+
"@react-types/shared": "^3.14.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@adobe/spectrum-css-temp": "3.0.0-alpha.1"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"react": "^16.8.0 || ^17.0.0-rc.1"
|
|
44
|
+
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0"
|
|
45
45
|
},
|
|
46
46
|
"publishConfig": {
|
|
47
47
|
"access": "public"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "cd7c0ec917122c7612f653c22f8ed558f8b66ecd"
|
|
50
50
|
}
|
package/src/Divider.tsx
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
import {classNames, useDOMRef, useSlotProps, useStyleProps} from '@react-spectrum/utils';
|
|
14
14
|
import {DOMRef} from '@react-types/shared';
|
|
15
|
-
import React from 'react';
|
|
15
|
+
import React, {ElementType} from 'react';
|
|
16
16
|
import {SpectrumDividerProps} from '@react-types/divider';
|
|
17
17
|
import styles from '@adobe/spectrum-css-temp/components/rule/vars.css';
|
|
18
18
|
import {useSeparator} from '@react-aria/separator';
|
|
@@ -34,7 +34,7 @@ function Divider(props: SpectrumDividerProps, ref: DOMRef) {
|
|
|
34
34
|
let {styleProps} = useStyleProps(otherProps);
|
|
35
35
|
let weight = sizeMap[size];
|
|
36
36
|
|
|
37
|
-
let Element = 'hr';
|
|
37
|
+
let Element: ElementType = 'hr';
|
|
38
38
|
if (orientation === 'vertical') {
|
|
39
39
|
Element = 'div';
|
|
40
40
|
}
|
package/src/index.ts
CHANGED