@react-spectrum/view 3.1.0 → 3.1.4
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 +91 -90
- package/dist/main.js.map +1 -1
- package/dist/module.js +73 -68
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +10 -10
package/dist/main.js
CHANGED
@@ -1,122 +1,123 @@
|
|
1
|
-
var
|
2
|
-
|
3
|
-
var
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
var _babelRuntimeHelpersObjectWithoutPropertiesLoose = $parcel$interopDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
22
|
-
|
23
|
-
var _babelRuntimeHelpersExtends = $parcel$interopDefault(require("@babel/runtime/helpers/extends"));
|
24
|
-
|
1
|
+
var $cl2Jj$reactspectrumutils = require("@react-spectrum/utils");
|
2
|
+
var $cl2Jj$reactariautils = require("@react-aria/utils");
|
3
|
+
var $cl2Jj$react = require("react");
|
4
|
+
|
5
|
+
function $parcel$exportWildcard(dest, source) {
|
6
|
+
Object.keys(source).forEach(function(key) {
|
7
|
+
if (key === 'default' || key === '__esModule' || dest.hasOwnProperty(key)) {
|
8
|
+
return;
|
9
|
+
}
|
10
|
+
|
11
|
+
Object.defineProperty(dest, key, {
|
12
|
+
enumerable: true,
|
13
|
+
get: function get() {
|
14
|
+
return source[key];
|
15
|
+
}
|
16
|
+
});
|
17
|
+
});
|
18
|
+
|
19
|
+
return dest;
|
20
|
+
}
|
25
21
|
function $parcel$interopDefault(a) {
|
26
22
|
return a && a.__esModule ? a.default : a;
|
27
23
|
}
|
24
|
+
function $parcel$export(e, n, v, s) {
|
25
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
26
|
+
}
|
27
|
+
var $ab36d76788d8fff9$exports = {};
|
28
|
+
|
29
|
+
$parcel$export($ab36d76788d8fff9$exports, "View", () => $ab36d76788d8fff9$export$27a5bd065ad55220);
|
28
30
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
elementType: ElementType = 'div',
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
let domRef = useDOMRef(ref);
|
42
|
-
return /*#__PURE__*/_react.createElement(ElementType, _babelRuntimeHelpersExtends({}, filterDOMProps(otherProps), styleProps, {
|
43
|
-
ref: domRef
|
44
|
-
}), /*#__PURE__*/_react.createElement(ClearSlots, null, children));
|
31
|
+
|
32
|
+
|
33
|
+
function $ab36d76788d8fff9$var$View(props, ref) {
|
34
|
+
props = $cl2Jj$reactspectrumutils.useSlotProps(props);
|
35
|
+
let { elementType: ElementType = 'div' , children: children , ...otherProps } = props;
|
36
|
+
let { styleProps: styleProps } = $cl2Jj$reactspectrumutils.useStyleProps(props, $cl2Jj$reactspectrumutils.viewStyleProps);
|
37
|
+
let domRef = $cl2Jj$reactspectrumutils.useDOMRef(ref);
|
38
|
+
return(/*#__PURE__*/ ($parcel$interopDefault($cl2Jj$react)).createElement(ElementType, {
|
39
|
+
...$cl2Jj$reactariautils.filterDOMProps(otherProps),
|
40
|
+
...styleProps,
|
41
|
+
ref: domRef
|
42
|
+
}, /*#__PURE__*/ ($parcel$interopDefault($cl2Jj$react)).createElement($cl2Jj$reactspectrumutils.ClearSlots, null, children)));
|
45
43
|
}
|
46
44
|
/**
|
47
45
|
* View is a general purpose container with no specific semantics that can be used for custom styling purposes.
|
48
46
|
* It supports Spectrum style props to ensure consistency with other Spectrum components.
|
49
|
-
*/
|
47
|
+
*/ const $ab36d76788d8fff9$export$27a5bd065ad55220 = /*#__PURE__*/ $cl2Jj$react.forwardRef($ab36d76788d8fff9$var$View);
|
48
|
+
|
50
49
|
|
50
|
+
var $bce62cdedfe33abe$exports = {};
|
51
51
|
|
52
|
-
|
53
|
-
exports.View = View;
|
52
|
+
$parcel$export($bce62cdedfe33abe$exports, "Content", () => $bce62cdedfe33abe$export$7c6e2c02157bb7d2);
|
54
53
|
|
55
|
-
function $b1630a1ad5492629b7ba4ec7eeabf6d2$var$Content(props, ref) {
|
56
|
-
props = useSlotProps(props, 'content');
|
57
54
|
|
58
|
-
let {
|
59
|
-
children
|
60
|
-
} = props,
|
61
|
-
otherProps = _babelRuntimeHelpersObjectWithoutPropertiesLoose(props, ["children"]);
|
62
55
|
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
56
|
+
|
57
|
+
function $bce62cdedfe33abe$var$Content(props, ref) {
|
58
|
+
props = $cl2Jj$reactspectrumutils.useSlotProps(props, 'content');
|
59
|
+
let { children: children , ...otherProps } = props;
|
60
|
+
let { styleProps: styleProps } = $cl2Jj$reactspectrumutils.useStyleProps(otherProps);
|
61
|
+
let domRef = $cl2Jj$reactspectrumutils.useDOMRef(ref);
|
62
|
+
return(/*#__PURE__*/ ($parcel$interopDefault($cl2Jj$react)).createElement("section", {
|
63
|
+
...$cl2Jj$reactariautils.filterDOMProps(otherProps),
|
64
|
+
...styleProps,
|
65
|
+
ref: domRef
|
66
|
+
}, /*#__PURE__*/ ($parcel$interopDefault($cl2Jj$react)).createElement($cl2Jj$reactspectrumutils.ClearSlots, null, children)));
|
70
67
|
}
|
71
68
|
/**
|
72
69
|
* Content represents the primary content within a Spectrum container.
|
73
|
-
*/
|
70
|
+
*/ const $bce62cdedfe33abe$export$7c6e2c02157bb7d2 = /*#__PURE__*/ $cl2Jj$react.forwardRef($bce62cdedfe33abe$var$Content);
|
71
|
+
|
74
72
|
|
73
|
+
var $3cd4f80e64b0d112$exports = {};
|
75
74
|
|
76
|
-
|
77
|
-
exports.Content = Content;
|
75
|
+
$parcel$export($3cd4f80e64b0d112$exports, "Footer", () => $3cd4f80e64b0d112$export$a06f1c675e846f6f);
|
78
76
|
|
79
|
-
function $e94eeee6ece39151e8a4902927dc1d5c$var$Footer(props, ref) {
|
80
|
-
props = useSlotProps(props, 'footer');
|
81
77
|
|
82
|
-
let {
|
83
|
-
children
|
84
|
-
} = props,
|
85
|
-
otherProps = _babelRuntimeHelpersObjectWithoutPropertiesLoose(props, ["children"]);
|
86
78
|
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
79
|
+
function $3cd4f80e64b0d112$var$Footer(props, ref) {
|
80
|
+
props = $cl2Jj$reactspectrumutils.useSlotProps(props, 'footer');
|
81
|
+
let { children: children , ...otherProps } = props;
|
82
|
+
let { styleProps: styleProps } = $cl2Jj$reactspectrumutils.useStyleProps(otherProps);
|
83
|
+
let domRef = $cl2Jj$reactspectrumutils.useDOMRef(ref);
|
84
|
+
return(/*#__PURE__*/ ($parcel$interopDefault($cl2Jj$react)).createElement("footer", {
|
85
|
+
...$cl2Jj$reactariautils.filterDOMProps(otherProps),
|
86
|
+
...styleProps,
|
87
|
+
ref: domRef
|
88
|
+
}, /*#__PURE__*/ ($parcel$interopDefault($cl2Jj$react)).createElement($cl2Jj$reactspectrumutils.ClearSlots, null, children)));
|
94
89
|
}
|
95
90
|
/**
|
96
91
|
* Footer represents a footer within a Spectrum container.
|
97
|
-
*/
|
92
|
+
*/ const $3cd4f80e64b0d112$export$a06f1c675e846f6f = /*#__PURE__*/ $cl2Jj$react.forwardRef($3cd4f80e64b0d112$var$Footer);
|
98
93
|
|
99
94
|
|
100
|
-
|
101
|
-
exports.Footer = Footer;
|
95
|
+
var $9ca970ddb2d892ca$exports = {};
|
102
96
|
|
103
|
-
|
104
|
-
props = useSlotProps(props, 'header');
|
97
|
+
$parcel$export($9ca970ddb2d892ca$exports, "Header", () => $9ca970ddb2d892ca$export$8b251419efc915eb);
|
105
98
|
|
106
|
-
let {
|
107
|
-
children
|
108
|
-
} = props,
|
109
|
-
otherProps = _babelRuntimeHelpersObjectWithoutPropertiesLoose(props, ["children"]);
|
110
99
|
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
100
|
+
|
101
|
+
function $9ca970ddb2d892ca$var$Header(props, ref) {
|
102
|
+
props = $cl2Jj$reactspectrumutils.useSlotProps(props, 'header');
|
103
|
+
let { children: children , ...otherProps } = props;
|
104
|
+
let { styleProps: styleProps } = $cl2Jj$reactspectrumutils.useStyleProps(otherProps);
|
105
|
+
let domRef = $cl2Jj$reactspectrumutils.useDOMRef(ref);
|
106
|
+
return(/*#__PURE__*/ ($parcel$interopDefault($cl2Jj$react)).createElement("header", {
|
107
|
+
...$cl2Jj$reactariautils.filterDOMProps(otherProps),
|
108
|
+
...styleProps,
|
109
|
+
ref: domRef
|
110
|
+
}, /*#__PURE__*/ ($parcel$interopDefault($cl2Jj$react)).createElement($cl2Jj$reactspectrumutils.ClearSlots, null, children)));
|
118
111
|
}
|
112
|
+
/**
|
113
|
+
* Header represents a header within a Spectrum container.
|
114
|
+
*/ const $9ca970ddb2d892ca$export$8b251419efc915eb = /*#__PURE__*/ $cl2Jj$react.forwardRef($9ca970ddb2d892ca$var$Header);
|
115
|
+
|
116
|
+
|
117
|
+
$parcel$exportWildcard(module.exports, $ab36d76788d8fff9$exports);
|
118
|
+
$parcel$exportWildcard(module.exports, $bce62cdedfe33abe$exports);
|
119
|
+
$parcel$exportWildcard(module.exports, $3cd4f80e64b0d112$exports);
|
120
|
+
$parcel$exportWildcard(module.exports, $9ca970ddb2d892ca$exports);
|
121
|
+
|
119
122
|
|
120
|
-
const Header = forwardRef($fd6476b36977b4ef8b9643920fa5b3$var$Header);
|
121
|
-
exports.Header = Header;
|
122
123
|
//# sourceMappingURL=main.js.map
|
package/dist/main.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"mappings":"
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SCkBS,0BAAI,CA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IACT,GAAG,CAAC,CAAC,aAAA,UAAU,EAAA,CAAC,GAAG,uCAAa,CAAC,UAAU;IAC3C,GAAG,CAAC,MAAM,GAAG,mCAAS,CAAC,GAAG;IAE1B,MAAM,oEACH,CAAM;WAAK,oCAAc,CAAC,UAAU;WAAO,UAAU;QAAE,GAAG,EAAE,MAAM;0EAChE,oCAAU,QACR,QAAQ;AAIjB,CAAC;AAED,EAEG,AAFH;;CAEG,AAFH,EAEG,CACH,KAAK,CAAC,yCAAO,iBAAG,uBAAU,CAAC,4BAAM;;;;;;;;;SCrBxB,4BAAM,CAAC,KAAkB,EAAE,GAAW,EAAE,CAAC;IAChD,KAAK,GAAG,sCAAY,CAAC,KAAK,EAAE,CAAQ;IACpC,GAAG,CAAC,CAAC,WACH,QAAQ,MACL,UAAU,CACf,CAAC,GAAG,KAAK;IACT,GAAG,CAAC,CAAC,aAAA,UAAU,EAAA,CAAC,GAAG,uCAAa,CAAC,UAAU;IAC3C,GAAG,CAAC,MAAM,GAAG,mCAAS,CAAC,GAAG;IAE1B,MAAM,oEACH,CAAM;WAAK,oCAAc,CAAC,UAAU;WAAO,UAAU;QAAE,GAAG,EAAE,MAAM;0EAChE,oCAAU,QACR,QAAQ;AAIjB,CAAC;AAED,EAEG,AAFH;;CAEG,AAFH,EAEG,CACH,KAAK,CAAC,yCAAO,iBAAG,uBAAU,CAAC,4BAAM;;","sources":["packages/@react-spectrum/view/src/index.ts","packages/@react-spectrum/view/src/View.tsx","packages/@react-spectrum/view/src/Content.tsx","packages/@react-spectrum/view/src/Footer.tsx","packages/@react-spectrum/view/src/Header.tsx"],"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 * from './View';\nexport * from './Content';\nexport * from './Footer';\nexport * from './Header';\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 {ClearSlots, useDOMRef, useSlotProps, useStyleProps, viewStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport React, {forwardRef} from 'react';\nimport {ViewProps} from '@react-types/view';\n\nfunction View(props: ViewProps, ref: DOMRef) {\n props = useSlotProps(props);\n let {\n elementType: ElementType = 'div',\n children,\n ...otherProps\n } = props;\n let {styleProps} = useStyleProps(props, viewStyleProps);\n let domRef = useDOMRef(ref);\n\n return (\n <ElementType\n {...filterDOMProps(otherProps)}\n {...styleProps}\n ref={domRef}>\n <ClearSlots>\n {children}\n </ClearSlots>\n </ElementType>\n );\n}\n\n/**\n * View is a general purpose container with no specific semantics that can be used for custom styling purposes.\n * It supports Spectrum style props to ensure consistency with other Spectrum components.\n */\nconst _View = forwardRef(View);\nexport {_View as View};\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 {ClearSlots, useDOMRef, useSlotProps} from '@react-spectrum/utils';\nimport {ContentProps} from '@react-types/view';\nimport {DOMRef} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport React, {forwardRef} from 'react';\nimport {useStyleProps} from '@react-spectrum/utils';\n\nfunction Content(props: ContentProps, ref: DOMRef) {\n props = useSlotProps(props, 'content');\n let {\n children,\n ...otherProps\n } = props;\n let {styleProps} = useStyleProps(otherProps);\n let domRef = useDOMRef(ref);\n\n return (\n <section {...filterDOMProps(otherProps)} {...styleProps} ref={domRef}>\n <ClearSlots>\n {children}\n </ClearSlots>\n </section>\n );\n}\n\n/**\n * Content represents the primary content within a Spectrum container.\n */\nconst _Content = forwardRef(Content);\nexport {_Content as Content};\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 {ClearSlots, useDOMRef, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {FooterProps} from '@react-types/view';\nimport React, {forwardRef} from 'react';\n\nfunction Footer(props: FooterProps, ref: DOMRef) {\n props = useSlotProps(props, 'footer');\n let {\n children,\n ...otherProps\n } = props;\n let {styleProps} = useStyleProps(otherProps);\n let domRef = useDOMRef(ref);\n\n return (\n <footer {...filterDOMProps(otherProps)} {...styleProps} ref={domRef}>\n <ClearSlots>\n {children}\n </ClearSlots>\n </footer>\n );\n}\n\n/**\n * Footer represents a footer within a Spectrum container.\n */\nconst _Footer = forwardRef(Footer);\nexport {_Footer as Footer};\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 {ClearSlots, useDOMRef, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {HeaderProps} from '@react-types/view';\nimport React, {forwardRef} from 'react';\n\nfunction Header(props: HeaderProps, ref: DOMRef) {\n props = useSlotProps(props, 'header');\n let {\n children,\n ...otherProps\n } = props;\n let {styleProps} = useStyleProps(otherProps);\n let domRef = useDOMRef(ref);\n\n return (\n <header {...filterDOMProps(otherProps)} {...styleProps} ref={domRef}>\n <ClearSlots>\n {children}\n </ClearSlots>\n </header>\n );\n}\n\n/**\n * Header represents a header within a Spectrum container.\n */\nconst _Header = forwardRef(Header);\nexport {_Header as Header};\n"],"names":[],"version":3,"file":"main.js.map"}
|
package/dist/module.js
CHANGED
@@ -1,96 +1,101 @@
|
|
1
|
-
import
|
2
|
-
import { filterDOMProps
|
3
|
-
import
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
styleProps
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
1
|
+
import {useSlotProps as $9vLle$useSlotProps, useStyleProps as $9vLle$useStyleProps, viewStyleProps as $9vLle$viewStyleProps, useDOMRef as $9vLle$useDOMRef, ClearSlots as $9vLle$ClearSlots} from "@react-spectrum/utils";
|
2
|
+
import {filterDOMProps as $9vLle$filterDOMProps} from "@react-aria/utils";
|
3
|
+
import $9vLle$react, {forwardRef as $9vLle$forwardRef} from "react";
|
4
|
+
|
5
|
+
function $parcel$export(e, n, v, s) {
|
6
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
7
|
+
}
|
8
|
+
var $a930860c6a9bc567$exports = {};
|
9
|
+
|
10
|
+
$parcel$export($a930860c6a9bc567$exports, "View", () => $a930860c6a9bc567$export$27a5bd065ad55220);
|
11
|
+
|
12
|
+
|
13
|
+
|
14
|
+
function $a930860c6a9bc567$var$View(props, ref) {
|
15
|
+
props = $9vLle$useSlotProps(props);
|
16
|
+
let { elementType: ElementType = 'div' , children: children , ...otherProps } = props;
|
17
|
+
let { styleProps: styleProps } = $9vLle$useStyleProps(props, $9vLle$viewStyleProps);
|
18
|
+
let domRef = $9vLle$useDOMRef(ref);
|
19
|
+
return(/*#__PURE__*/ $9vLle$react.createElement(ElementType, {
|
20
|
+
...$9vLle$filterDOMProps(otherProps),
|
21
|
+
...styleProps,
|
22
|
+
ref: domRef
|
23
|
+
}, /*#__PURE__*/ $9vLle$react.createElement($9vLle$ClearSlots, null, children)));
|
23
24
|
}
|
24
25
|
/**
|
25
26
|
* View is a general purpose container with no specific semantics that can be used for custom styling purposes.
|
26
27
|
* It supports Spectrum style props to ensure consistency with other Spectrum components.
|
27
|
-
*/
|
28
|
+
*/ const $a930860c6a9bc567$export$27a5bd065ad55220 = /*#__PURE__*/ $9vLle$forwardRef($a930860c6a9bc567$var$View);
|
29
|
+
|
28
30
|
|
31
|
+
var $051be19a4a3e4b97$exports = {};
|
29
32
|
|
30
|
-
export
|
33
|
+
$parcel$export($051be19a4a3e4b97$exports, "Content", () => $051be19a4a3e4b97$export$7c6e2c02157bb7d2);
|
31
34
|
|
32
|
-
function $a359aafecbc772ff97d7c424d8abe$var$Content(props, ref) {
|
33
|
-
props = useSlotProps(props, 'content');
|
34
35
|
|
35
|
-
let {
|
36
|
-
children
|
37
|
-
} = props,
|
38
|
-
otherProps = _babelRuntimeHelpersEsmObjectWithoutPropertiesLoose(props, ["children"]);
|
39
36
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
37
|
+
|
38
|
+
function $051be19a4a3e4b97$var$Content(props, ref) {
|
39
|
+
props = $9vLle$useSlotProps(props, 'content');
|
40
|
+
let { children: children , ...otherProps } = props;
|
41
|
+
let { styleProps: styleProps } = $9vLle$useStyleProps(otherProps);
|
42
|
+
let domRef = $9vLle$useDOMRef(ref);
|
43
|
+
return(/*#__PURE__*/ $9vLle$react.createElement("section", {
|
44
|
+
...$9vLle$filterDOMProps(otherProps),
|
45
|
+
...styleProps,
|
46
|
+
ref: domRef
|
47
|
+
}, /*#__PURE__*/ $9vLle$react.createElement($9vLle$ClearSlots, null, children)));
|
47
48
|
}
|
48
49
|
/**
|
49
50
|
* Content represents the primary content within a Spectrum container.
|
50
|
-
*/
|
51
|
+
*/ const $051be19a4a3e4b97$export$7c6e2c02157bb7d2 = /*#__PURE__*/ $9vLle$forwardRef($051be19a4a3e4b97$var$Content);
|
52
|
+
|
51
53
|
|
54
|
+
var $1c383ab89c624d7e$exports = {};
|
52
55
|
|
53
|
-
export
|
56
|
+
$parcel$export($1c383ab89c624d7e$exports, "Footer", () => $1c383ab89c624d7e$export$a06f1c675e846f6f);
|
54
57
|
|
55
|
-
function $e81ef0fe4e9ce0b97df516761bb30903$var$Footer(props, ref) {
|
56
|
-
props = useSlotProps(props, 'footer');
|
57
58
|
|
58
|
-
let {
|
59
|
-
children
|
60
|
-
} = props,
|
61
|
-
otherProps = _babelRuntimeHelpersEsmObjectWithoutPropertiesLoose(props, ["children"]);
|
62
59
|
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
60
|
+
function $1c383ab89c624d7e$var$Footer(props, ref) {
|
61
|
+
props = $9vLle$useSlotProps(props, 'footer');
|
62
|
+
let { children: children , ...otherProps } = props;
|
63
|
+
let { styleProps: styleProps } = $9vLle$useStyleProps(otherProps);
|
64
|
+
let domRef = $9vLle$useDOMRef(ref);
|
65
|
+
return(/*#__PURE__*/ $9vLle$react.createElement("footer", {
|
66
|
+
...$9vLle$filterDOMProps(otherProps),
|
67
|
+
...styleProps,
|
68
|
+
ref: domRef
|
69
|
+
}, /*#__PURE__*/ $9vLle$react.createElement($9vLle$ClearSlots, null, children)));
|
70
70
|
}
|
71
71
|
/**
|
72
72
|
* Footer represents a footer within a Spectrum container.
|
73
|
-
*/
|
73
|
+
*/ const $1c383ab89c624d7e$export$a06f1c675e846f6f = /*#__PURE__*/ $9vLle$forwardRef($1c383ab89c624d7e$var$Footer);
|
74
74
|
|
75
75
|
|
76
|
-
|
76
|
+
var $b15c332bb01a1c35$exports = {};
|
77
77
|
|
78
|
-
|
79
|
-
props = useSlotProps(props, 'header');
|
78
|
+
$parcel$export($b15c332bb01a1c35$exports, "Header", () => $b15c332bb01a1c35$export$8b251419efc915eb);
|
80
79
|
|
81
|
-
let {
|
82
|
-
children
|
83
|
-
} = props,
|
84
|
-
otherProps = _babelRuntimeHelpersEsmObjectWithoutPropertiesLoose(props, ["children"]);
|
85
80
|
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
81
|
+
|
82
|
+
function $b15c332bb01a1c35$var$Header(props, ref) {
|
83
|
+
props = $9vLle$useSlotProps(props, 'header');
|
84
|
+
let { children: children , ...otherProps } = props;
|
85
|
+
let { styleProps: styleProps } = $9vLle$useStyleProps(otherProps);
|
86
|
+
let domRef = $9vLle$useDOMRef(ref);
|
87
|
+
return(/*#__PURE__*/ $9vLle$react.createElement("header", {
|
88
|
+
...$9vLle$filterDOMProps(otherProps),
|
89
|
+
...styleProps,
|
90
|
+
ref: domRef
|
91
|
+
}, /*#__PURE__*/ $9vLle$react.createElement($9vLle$ClearSlots, null, children)));
|
93
92
|
}
|
93
|
+
/**
|
94
|
+
* Header represents a header within a Spectrum container.
|
95
|
+
*/ const $b15c332bb01a1c35$export$8b251419efc915eb = /*#__PURE__*/ $9vLle$forwardRef($b15c332bb01a1c35$var$Header);
|
96
|
+
|
97
|
+
|
98
|
+
|
94
99
|
|
95
|
-
export
|
100
|
+
export {$a930860c6a9bc567$export$27a5bd065ad55220 as View, $051be19a4a3e4b97$export$7c6e2c02157bb7d2 as Content, $1c383ab89c624d7e$export$a06f1c675e846f6f as Footer, $b15c332bb01a1c35$export$8b251419efc915eb as Header};
|
96
101
|
//# sourceMappingURL=module.js.map
|
package/dist/module.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"mappings":"
|
1
|
+
{"mappings":";;;;;;;;;;;;;SCkBS,0BAAI,CAAC,KAAgB,EAAE,GAAW,EAAE,CAAC;IAC5C,KAAK,GAAG,mBAAY,CAAC,KAAK;IAC1B,GAAG,CAAC,CAAC,CACH,WAAW,EAAE,WAAW,GAAG,CAAK,iBAChC,QAAQ,MACL,UAAU,CACf,CAAC,GAAG,KAAK;IACT,GAAG,CAAC,CAAC,aAAA,UAAU,EAAA,CAAC,GAAG,oBAAa,CAAC,KAAK,EAAE,qBAAc;IACtD,GAAG,CAAC,MAAM,GAAG,gBAAS,CAAC,GAAG;IAE1B,MAAM,0CACH,WAAW;WACN,qBAAc,CAAC,UAAU;WACzB,UAAU;QACd,GAAG,EAAE,MAAM;gDACV,iBAAU,QACR,QAAQ;AAIjB,CAAC;AAED,EAGG,AAHH;;;CAGG,AAHH,EAGG,CACH,KAAK,CAAC,yCAAK,iBAAG,iBAAU,CAAC,0BAAI;;;;;;;;;;SCzBpB,6BAAO,CAAC,KAAmB,EAAE,GAAW,EAAE,CAAC;IAClD,KAAK,GAAG,mBAAY,CAAC,KAAK,EAAE,CAAS;IACrC,GAAG,CAAC,CAAC,WACH,QAAQ,MACL,UAAU,CACf,CAAC,GAAG,KAAK;IACT,GAAG,CAAC,CAAC,aAAA,UAAU,EAAA,CAAC,GAAG,oBAAa,CAAC,UAAU;IAC3C,GAAG,CAAC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EG,CACH,KAAK,CAAC,yCAAO,iBAAG,iBAAU,CAAC,4BAAM;;","sources":["packages/@react-spectrum/view/src/index.ts","packages/@react-spectrum/view/src/View.tsx","packages/@react-spectrum/view/src/Content.tsx","packages/@react-spectrum/view/src/Footer.tsx","packages/@react-spectrum/view/src/Header.tsx"],"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 * from './View';\nexport * from './Content';\nexport * from './Footer';\nexport * from './Header';\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 {ClearSlots, useDOMRef, useSlotProps, useStyleProps, viewStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport React, {forwardRef} from 'react';\nimport {ViewProps} from '@react-types/view';\n\nfunction View(props: ViewProps, ref: DOMRef) {\n props = useSlotProps(props);\n let {\n elementType: ElementType = 'div',\n children,\n ...otherProps\n } = props;\n let {styleProps} = useStyleProps(props, viewStyleProps);\n let domRef = useDOMRef(ref);\n\n return (\n <ElementType\n {...filterDOMProps(otherProps)}\n {...styleProps}\n ref={domRef}>\n <ClearSlots>\n {children}\n </ClearSlots>\n </ElementType>\n );\n}\n\n/**\n * View is a general purpose container with no specific semantics that can be used for custom styling purposes.\n * It supports Spectrum style props to ensure consistency with other Spectrum components.\n */\nconst _View = forwardRef(View);\nexport {_View as View};\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 {ClearSlots, useDOMRef, useSlotProps} from '@react-spectrum/utils';\nimport {ContentProps} from '@react-types/view';\nimport {DOMRef} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport React, {forwardRef} from 'react';\nimport {useStyleProps} from '@react-spectrum/utils';\n\nfunction Content(props: ContentProps, ref: DOMRef) {\n props = useSlotProps(props, 'content');\n let {\n children,\n ...otherProps\n } = props;\n let {styleProps} = useStyleProps(otherProps);\n let domRef = useDOMRef(ref);\n\n return (\n <section {...filterDOMProps(otherProps)} {...styleProps} ref={domRef}>\n <ClearSlots>\n {children}\n </ClearSlots>\n </section>\n );\n}\n\n/**\n * Content represents the primary content within a Spectrum container.\n */\nconst _Content = forwardRef(Content);\nexport {_Content as Content};\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 {ClearSlots, useDOMRef, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {FooterProps} from '@react-types/view';\nimport React, {forwardRef} from 'react';\n\nfunction Footer(props: FooterProps, ref: DOMRef) {\n props = useSlotProps(props, 'footer');\n let {\n children,\n ...otherProps\n } = props;\n let {styleProps} = useStyleProps(otherProps);\n let domRef = useDOMRef(ref);\n\n return (\n <footer {...filterDOMProps(otherProps)} {...styleProps} ref={domRef}>\n <ClearSlots>\n {children}\n </ClearSlots>\n </footer>\n );\n}\n\n/**\n * Footer represents a footer within a Spectrum container.\n */\nconst _Footer = forwardRef(Footer);\nexport {_Footer as Footer};\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 {ClearSlots, useDOMRef, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {HeaderProps} from '@react-types/view';\nimport React, {forwardRef} from 'react';\n\nfunction Header(props: HeaderProps, ref: DOMRef) {\n props = useSlotProps(props, 'header');\n let {\n children,\n ...otherProps\n } = props;\n let {styleProps} = useStyleProps(otherProps);\n let domRef = useDOMRef(ref);\n\n return (\n <header {...filterDOMProps(otherProps)} {...styleProps} ref={domRef}>\n <ClearSlots>\n {children}\n </ClearSlots>\n </header>\n );\n}\n\n/**\n * Header represents a header within a Spectrum container.\n */\nconst _Header = forwardRef(Header);\nexport {_Header as Header};\n"],"names":[],"version":3,"file":"module.js.map"}
|
package/dist/types.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"mappings":"
|
1
|
+
{"mappings":";;AAwCA;;;GAGG;AACH,OAAA,MAAM,8HAAwB,CAAC;ACP/B;;GAEG;AACH,OAAA,MAAM,oIAA8B,CAAC;ACJrC;;GAEG;AACH,OAAA,MAAM,kIAA4B,CAAC;ACHnC;;GAEG;AACH,OAAA,MAAM,kIAA4B,CAAC","sources":["packages/@react-spectrum/view/src/packages/@react-spectrum/view/src/View.tsx","packages/@react-spectrum/view/src/packages/@react-spectrum/view/src/Content.tsx","packages/@react-spectrum/view/src/packages/@react-spectrum/view/src/Footer.tsx","packages/@react-spectrum/view/src/packages/@react-spectrum/view/src/Header.tsx","packages/@react-spectrum/view/src/packages/@react-spectrum/view/src/index.ts","packages/@react-spectrum/view/src/index.ts"],"sourcesContent":[null,null,null,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 * from './View';\nexport * from './Content';\nexport * from './Footer';\nexport * from './Header';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@react-spectrum/view",
|
3
|
-
"version": "3.1.
|
3
|
+
"version": "3.1.4",
|
4
4
|
"description": "Spectrum UI components in React",
|
5
5
|
"license": "Apache-2.0",
|
6
6
|
"main": "dist/main.js",
|
@@ -32,21 +32,21 @@
|
|
32
32
|
},
|
33
33
|
"dependencies": {
|
34
34
|
"@babel/runtime": "^7.6.2",
|
35
|
-
"@react-aria/i18n": "^3.
|
36
|
-
"@react-aria/utils": "^3.1
|
37
|
-
"@react-spectrum/utils": "^3.
|
38
|
-
"@react-types/shared": "^3.
|
39
|
-
"@react-types/view": "^3.1.
|
35
|
+
"@react-aria/i18n": "^3.3.5",
|
36
|
+
"@react-aria/utils": "^3.11.1",
|
37
|
+
"@react-spectrum/utils": "^3.6.4",
|
38
|
+
"@react-types/shared": "^3.11.0",
|
39
|
+
"@react-types/view": "^3.1.3"
|
40
40
|
},
|
41
41
|
"devDependencies": {
|
42
|
-
"@adobe/spectrum-css-temp": "
|
42
|
+
"@adobe/spectrum-css-temp": "3.0.0-alpha.1"
|
43
43
|
},
|
44
44
|
"peerDependencies": {
|
45
|
-
"@react-spectrum/provider": "^3.0.0
|
46
|
-
"react": "^16.8.0"
|
45
|
+
"@react-spectrum/provider": "^3.0.0",
|
46
|
+
"react": "^16.8.0 || ^17.0.0-rc.1"
|
47
47
|
},
|
48
48
|
"publishConfig": {
|
49
49
|
"access": "public"
|
50
50
|
},
|
51
|
-
"gitHead": "
|
51
|
+
"gitHead": "54c2366c4f31bd4bf619126131cd583c12972acc"
|
52
52
|
}
|