@react-spectrum/text 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-spectrum/text
2
+
3
+ This package is part of [react-spectrum](https://github.com/adobe/react-spectrum). See the repo for more details.
@@ -0,0 +1,48 @@
1
+ var $eaZlr$reactariautils = require("@react-aria/utils");
2
+ var $eaZlr$reactariacomponents = require("react-aria-components");
3
+ var $eaZlr$react = require("react");
4
+ var $eaZlr$reactspectrumutils = require("@react-spectrum/utils");
5
+
6
+
7
+ function $parcel$interopDefault(a) {
8
+ return a && a.__esModule ? a.default : a;
9
+ }
10
+
11
+ function $parcel$export(e, n, v, s) {
12
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
13
+ }
14
+
15
+ $parcel$export(module.exports, "Heading", () => $c7c750c966e80a46$export$a8a3e93435678ff9);
16
+ /*
17
+ * Copyright 2020 Adobe. All rights reserved.
18
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
19
+ * you may not use this file except in compliance with the License. You may obtain a copy
20
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
21
+ *
22
+ * Unless required by applicable law or agreed to in writing, software distributed under
23
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
24
+ * OF ANY KIND, either express or implied. See the License for the specific language
25
+ * governing permissions and limitations under the License.
26
+ */
27
+
28
+
29
+
30
+ function $c7c750c966e80a46$var$Heading(props, ref) {
31
+ let domRef = (0, $eaZlr$reactspectrumutils.useDOMRef)(ref);
32
+ props = (0, $eaZlr$reactspectrumutils.useSlotProps)(props, 'heading');
33
+ [props, domRef] = (0, $eaZlr$reactariacomponents.useContextProps)(props, domRef, (0, $eaZlr$reactariacomponents.HeadingContext));
34
+ let { children: children, level: level = 3, ...otherProps } = props;
35
+ let { styleProps: styleProps } = (0, $eaZlr$reactspectrumutils.useStyleProps)(otherProps);
36
+ let HeadingTag = `h${level}`;
37
+ return /*#__PURE__*/ (0, ($parcel$interopDefault($eaZlr$react))).createElement(HeadingTag, {
38
+ ...(0, $eaZlr$reactariautils.filterDOMProps)(otherProps),
39
+ ...styleProps,
40
+ ref: domRef
41
+ }, children);
42
+ }
43
+ /**
44
+ * Heading is used to create various levels of typographic hierarchies.
45
+ */ const $c7c750c966e80a46$export$a8a3e93435678ff9 = /*#__PURE__*/ (0, $eaZlr$react.forwardRef)($c7c750c966e80a46$var$Heading);
46
+
47
+
48
+ //# sourceMappingURL=Heading.main.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;AASD,SAAS,8BAAQ,KAAmB,EAAE,GAA+B;IACnE,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IACvB,QAAQ,CAAA,GAAA,sCAAW,EAAE,OAAO;IAC5B,CAAC,OAAO,OAAO,GAAG,CAAA,GAAA,0CAAc,EAAE,OAAO,QAAQ,CAAA,GAAA,yCAAa;IAE9D,IAAI,YACF,QAAQ,SACR,QAAQ,GACR,GAAG,YACJ,GAAG;IACJ,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,uCAAY,EAAE;IACjC,IAAI,aAAa,CAAC,CAAC,EAAE,MAAM,CAAC;IAE5B,qBACE,0DAAC;QAAY,GAAG,CAAA,GAAA,oCAAa,EAAE,WAAW;QAAG,GAAG,UAAU;QAAE,KAAK;OAC9D;AAGP;AAEA;;CAEC,GACD,MAAM,0DAAW,CAAA,GAAA,uBAAS,EAAE","sources":["packages/@react-spectrum/text/src/Heading.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\nimport {DOMRef} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {HeadingContext, useContextProps} from 'react-aria-components';\nimport {HeadingProps} from '@react-types/text';\nimport React, {ElementType, forwardRef} from 'react';\nimport {useDOMRef, useSlotProps, useStyleProps} from '@react-spectrum/utils';\n\nfunction Heading(props: HeadingProps, ref: DOMRef<HTMLHeadingElement>) {\n let domRef = useDOMRef(ref);\n props = useSlotProps(props, 'heading');\n [props, domRef] = useContextProps(props, domRef, HeadingContext);\n\n let {\n children,\n level = 3,\n ...otherProps\n } = props;\n let {styleProps} = useStyleProps(otherProps);\n let HeadingTag = `h${level}` as ElementType;\n\n return (\n <HeadingTag {...filterDOMProps(otherProps)} {...styleProps} ref={domRef}>\n {children}\n </HeadingTag>\n );\n}\n\n/**\n * Heading is used to create various levels of typographic hierarchies.\n */\nconst _Heading = forwardRef(Heading);\nexport {_Heading as Heading};\n"],"names":[],"version":3,"file":"Heading.main.js.map"}
@@ -0,0 +1,39 @@
1
+ import {filterDOMProps as $loc5r$filterDOMProps} from "@react-aria/utils";
2
+ import {useContextProps as $loc5r$useContextProps, HeadingContext as $loc5r$HeadingContext} from "react-aria-components";
3
+ import $loc5r$react, {forwardRef as $loc5r$forwardRef} from "react";
4
+ import {useDOMRef as $loc5r$useDOMRef, useSlotProps as $loc5r$useSlotProps, useStyleProps as $loc5r$useStyleProps} from "@react-spectrum/utils";
5
+
6
+ /*
7
+ * Copyright 2020 Adobe. All rights reserved.
8
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
9
+ * you may not use this file except in compliance with the License. You may obtain a copy
10
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software distributed under
13
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
14
+ * OF ANY KIND, either express or implied. See the License for the specific language
15
+ * governing permissions and limitations under the License.
16
+ */
17
+
18
+
19
+
20
+ function $c382fceb69609a50$var$Heading(props, ref) {
21
+ let domRef = (0, $loc5r$useDOMRef)(ref);
22
+ props = (0, $loc5r$useSlotProps)(props, 'heading');
23
+ [props, domRef] = (0, $loc5r$useContextProps)(props, domRef, (0, $loc5r$HeadingContext));
24
+ let { children: children, level: level = 3, ...otherProps } = props;
25
+ let { styleProps: styleProps } = (0, $loc5r$useStyleProps)(otherProps);
26
+ let HeadingTag = `h${level}`;
27
+ return /*#__PURE__*/ (0, $loc5r$react).createElement(HeadingTag, {
28
+ ...(0, $loc5r$filterDOMProps)(otherProps),
29
+ ...styleProps,
30
+ ref: domRef
31
+ }, children);
32
+ }
33
+ /**
34
+ * Heading is used to create various levels of typographic hierarchies.
35
+ */ const $c382fceb69609a50$export$a8a3e93435678ff9 = /*#__PURE__*/ (0, $loc5r$forwardRef)($c382fceb69609a50$var$Heading);
36
+
37
+
38
+ export {$c382fceb69609a50$export$a8a3e93435678ff9 as Heading};
39
+ //# sourceMappingURL=Heading.module.js.map
@@ -0,0 +1,39 @@
1
+ import {filterDOMProps as $loc5r$filterDOMProps} from "@react-aria/utils";
2
+ import {useContextProps as $loc5r$useContextProps, HeadingContext as $loc5r$HeadingContext} from "react-aria-components";
3
+ import $loc5r$react, {forwardRef as $loc5r$forwardRef} from "react";
4
+ import {useDOMRef as $loc5r$useDOMRef, useSlotProps as $loc5r$useSlotProps, useStyleProps as $loc5r$useStyleProps} from "@react-spectrum/utils";
5
+
6
+ /*
7
+ * Copyright 2020 Adobe. All rights reserved.
8
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
9
+ * you may not use this file except in compliance with the License. You may obtain a copy
10
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software distributed under
13
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
14
+ * OF ANY KIND, either express or implied. See the License for the specific language
15
+ * governing permissions and limitations under the License.
16
+ */
17
+
18
+
19
+
20
+ function $c382fceb69609a50$var$Heading(props, ref) {
21
+ let domRef = (0, $loc5r$useDOMRef)(ref);
22
+ props = (0, $loc5r$useSlotProps)(props, 'heading');
23
+ [props, domRef] = (0, $loc5r$useContextProps)(props, domRef, (0, $loc5r$HeadingContext));
24
+ let { children: children, level: level = 3, ...otherProps } = props;
25
+ let { styleProps: styleProps } = (0, $loc5r$useStyleProps)(otherProps);
26
+ let HeadingTag = `h${level}`;
27
+ return /*#__PURE__*/ (0, $loc5r$react).createElement(HeadingTag, {
28
+ ...(0, $loc5r$filterDOMProps)(otherProps),
29
+ ...styleProps,
30
+ ref: domRef
31
+ }, children);
32
+ }
33
+ /**
34
+ * Heading is used to create various levels of typographic hierarchies.
35
+ */ const $c382fceb69609a50$export$a8a3e93435678ff9 = /*#__PURE__*/ (0, $loc5r$forwardRef)($c382fceb69609a50$var$Heading);
36
+
37
+
38
+ export {$c382fceb69609a50$export$a8a3e93435678ff9 as Heading};
39
+ //# sourceMappingURL=Heading.module.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;AAAA;;;;;;;;;;CAUC;;;;AASD,SAAS,8BAAQ,KAAmB,EAAE,GAA+B;IACnE,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IACvB,QAAQ,CAAA,GAAA,mBAAW,EAAE,OAAO;IAC5B,CAAC,OAAO,OAAO,GAAG,CAAA,GAAA,sBAAc,EAAE,OAAO,QAAQ,CAAA,GAAA,qBAAa;IAE9D,IAAI,YACF,QAAQ,SACR,QAAQ,GACR,GAAG,YACJ,GAAG;IACJ,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,oBAAY,EAAE;IACjC,IAAI,aAAa,CAAC,CAAC,EAAE,MAAM,CAAC;IAE5B,qBACE,gCAAC;QAAY,GAAG,CAAA,GAAA,qBAAa,EAAE,WAAW;QAAG,GAAG,UAAU;QAAE,KAAK;OAC9D;AAGP;AAEA;;CAEC,GACD,MAAM,0DAAW,CAAA,GAAA,iBAAS,EAAE","sources":["packages/@react-spectrum/text/src/Heading.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\nimport {DOMRef} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {HeadingContext, useContextProps} from 'react-aria-components';\nimport {HeadingProps} from '@react-types/text';\nimport React, {ElementType, forwardRef} from 'react';\nimport {useDOMRef, useSlotProps, useStyleProps} from '@react-spectrum/utils';\n\nfunction Heading(props: HeadingProps, ref: DOMRef<HTMLHeadingElement>) {\n let domRef = useDOMRef(ref);\n props = useSlotProps(props, 'heading');\n [props, domRef] = useContextProps(props, domRef, HeadingContext);\n\n let {\n children,\n level = 3,\n ...otherProps\n } = props;\n let {styleProps} = useStyleProps(otherProps);\n let HeadingTag = `h${level}` as ElementType;\n\n return (\n <HeadingTag {...filterDOMProps(otherProps)} {...styleProps} ref={domRef}>\n {children}\n </HeadingTag>\n );\n}\n\n/**\n * Heading is used to create various levels of typographic hierarchies.\n */\nconst _Heading = forwardRef(Heading);\nexport {_Heading as Heading};\n"],"names":[],"version":3,"file":"Heading.module.js.map"}
@@ -0,0 +1,44 @@
1
+ var $53QEO$reactariautils = require("@react-aria/utils");
2
+ var $53QEO$react = require("react");
3
+ var $53QEO$reactspectrumutils = require("@react-spectrum/utils");
4
+
5
+
6
+ function $parcel$interopDefault(a) {
7
+ return a && a.__esModule ? a.default : a;
8
+ }
9
+
10
+ function $parcel$export(e, n, v, s) {
11
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
12
+ }
13
+
14
+ $parcel$export(module.exports, "Keyboard", () => $961f7ef9e414f5f0$export$16e4d70cc375e707);
15
+ /*
16
+ * Copyright 2020 Adobe. All rights reserved.
17
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
18
+ * you may not use this file except in compliance with the License. You may obtain a copy
19
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
20
+ *
21
+ * Unless required by applicable law or agreed to in writing, software distributed under
22
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
23
+ * OF ANY KIND, either express or implied. See the License for the specific language
24
+ * governing permissions and limitations under the License.
25
+ */
26
+
27
+
28
+ function $961f7ef9e414f5f0$var$Keyboard(props, ref) {
29
+ props = (0, $53QEO$reactspectrumutils.useSlotProps)(props, 'keyboard');
30
+ let { children: children, ...otherProps } = props;
31
+ let { styleProps: styleProps } = (0, $53QEO$reactspectrumutils.useStyleProps)(otherProps);
32
+ let domRef = (0, $53QEO$reactspectrumutils.useDOMRef)(ref);
33
+ return /*#__PURE__*/ (0, ($parcel$interopDefault($53QEO$react))).createElement("kbd", {
34
+ ...(0, $53QEO$reactariautils.filterDOMProps)(otherProps),
35
+ ...styleProps,
36
+ ref: domRef
37
+ }, children);
38
+ }
39
+ /**
40
+ * Keyboard represents text that specifies a keyboard command.
41
+ */ const $961f7ef9e414f5f0$export$16e4d70cc375e707 = /*#__PURE__*/ (0, $53QEO$react.forwardRef)($961f7ef9e414f5f0$var$Keyboard);
42
+
43
+
44
+ //# sourceMappingURL=Keyboard.main.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;AAQD,SAAS,+BAAS,KAAoB,EAAE,GAAW;IACjD,QAAQ,CAAA,GAAA,sCAAW,EAAE,OAAO;IAC5B,IAAI,YACF,QAAQ,EACR,GAAG,YACJ,GAAG;IACJ,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,uCAAY,EAAE;IACjC,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IAEvB,qBACE,0DAAC;QAAK,GAAG,CAAA,GAAA,oCAAa,EAAE,WAAW;QAAG,GAAG,UAAU;QAAE,KAAK;OACvD;AAGP;AAEA;;CAEC,GACD,MAAM,0DAAY,CAAA,GAAA,uBAAS,EAAE","sources":["packages/@react-spectrum/text/src/Keyboard.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\nimport {DOMRef} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {KeyboardProps} from '@react-types/text';\nimport React, {forwardRef} from 'react';\nimport {useDOMRef, useSlotProps, useStyleProps} from '@react-spectrum/utils';\n\nfunction Keyboard(props: KeyboardProps, ref: DOMRef) {\n props = useSlotProps(props, 'keyboard');\n let {\n children,\n ...otherProps\n } = props;\n let {styleProps} = useStyleProps(otherProps);\n let domRef = useDOMRef(ref);\n\n return (\n <kbd {...filterDOMProps(otherProps)} {...styleProps} ref={domRef}>\n {children}\n </kbd>\n );\n}\n\n/**\n * Keyboard represents text that specifies a keyboard command.\n */\nconst _Keyboard = forwardRef(Keyboard);\nexport {_Keyboard as Keyboard};\n"],"names":[],"version":3,"file":"Keyboard.main.js.map"}
@@ -0,0 +1,35 @@
1
+ import {filterDOMProps as $3NMJ4$filterDOMProps} from "@react-aria/utils";
2
+ import $3NMJ4$react, {forwardRef as $3NMJ4$forwardRef} from "react";
3
+ import {useSlotProps as $3NMJ4$useSlotProps, useStyleProps as $3NMJ4$useStyleProps, useDOMRef as $3NMJ4$useDOMRef} from "@react-spectrum/utils";
4
+
5
+ /*
6
+ * Copyright 2020 Adobe. All rights reserved.
7
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License. You may obtain a copy
9
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software distributed under
12
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
13
+ * OF ANY KIND, either express or implied. See the License for the specific language
14
+ * governing permissions and limitations under the License.
15
+ */
16
+
17
+
18
+ function $a42b6b1607b36926$var$Keyboard(props, ref) {
19
+ props = (0, $3NMJ4$useSlotProps)(props, 'keyboard');
20
+ let { children: children, ...otherProps } = props;
21
+ let { styleProps: styleProps } = (0, $3NMJ4$useStyleProps)(otherProps);
22
+ let domRef = (0, $3NMJ4$useDOMRef)(ref);
23
+ return /*#__PURE__*/ (0, $3NMJ4$react).createElement("kbd", {
24
+ ...(0, $3NMJ4$filterDOMProps)(otherProps),
25
+ ...styleProps,
26
+ ref: domRef
27
+ }, children);
28
+ }
29
+ /**
30
+ * Keyboard represents text that specifies a keyboard command.
31
+ */ const $a42b6b1607b36926$export$16e4d70cc375e707 = /*#__PURE__*/ (0, $3NMJ4$forwardRef)($a42b6b1607b36926$var$Keyboard);
32
+
33
+
34
+ export {$a42b6b1607b36926$export$16e4d70cc375e707 as Keyboard};
35
+ //# sourceMappingURL=Keyboard.module.js.map
@@ -0,0 +1,35 @@
1
+ import {filterDOMProps as $3NMJ4$filterDOMProps} from "@react-aria/utils";
2
+ import $3NMJ4$react, {forwardRef as $3NMJ4$forwardRef} from "react";
3
+ import {useSlotProps as $3NMJ4$useSlotProps, useStyleProps as $3NMJ4$useStyleProps, useDOMRef as $3NMJ4$useDOMRef} from "@react-spectrum/utils";
4
+
5
+ /*
6
+ * Copyright 2020 Adobe. All rights reserved.
7
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License. You may obtain a copy
9
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software distributed under
12
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
13
+ * OF ANY KIND, either express or implied. See the License for the specific language
14
+ * governing permissions and limitations under the License.
15
+ */
16
+
17
+
18
+ function $a42b6b1607b36926$var$Keyboard(props, ref) {
19
+ props = (0, $3NMJ4$useSlotProps)(props, 'keyboard');
20
+ let { children: children, ...otherProps } = props;
21
+ let { styleProps: styleProps } = (0, $3NMJ4$useStyleProps)(otherProps);
22
+ let domRef = (0, $3NMJ4$useDOMRef)(ref);
23
+ return /*#__PURE__*/ (0, $3NMJ4$react).createElement("kbd", {
24
+ ...(0, $3NMJ4$filterDOMProps)(otherProps),
25
+ ...styleProps,
26
+ ref: domRef
27
+ }, children);
28
+ }
29
+ /**
30
+ * Keyboard represents text that specifies a keyboard command.
31
+ */ const $a42b6b1607b36926$export$16e4d70cc375e707 = /*#__PURE__*/ (0, $3NMJ4$forwardRef)($a42b6b1607b36926$var$Keyboard);
32
+
33
+
34
+ export {$a42b6b1607b36926$export$16e4d70cc375e707 as Keyboard};
35
+ //# sourceMappingURL=Keyboard.module.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;AAAA;;;;;;;;;;CAUC;;;AAQD,SAAS,+BAAS,KAAoB,EAAE,GAAW;IACjD,QAAQ,CAAA,GAAA,mBAAW,EAAE,OAAO;IAC5B,IAAI,YACF,QAAQ,EACR,GAAG,YACJ,GAAG;IACJ,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,oBAAY,EAAE;IACjC,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IAEvB,qBACE,gCAAC;QAAK,GAAG,CAAA,GAAA,qBAAa,EAAE,WAAW;QAAG,GAAG,UAAU;QAAE,KAAK;OACvD;AAGP;AAEA;;CAEC,GACD,MAAM,0DAAY,CAAA,GAAA,iBAAS,EAAE","sources":["packages/@react-spectrum/text/src/Keyboard.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\nimport {DOMRef} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {KeyboardProps} from '@react-types/text';\nimport React, {forwardRef} from 'react';\nimport {useDOMRef, useSlotProps, useStyleProps} from '@react-spectrum/utils';\n\nfunction Keyboard(props: KeyboardProps, ref: DOMRef) {\n props = useSlotProps(props, 'keyboard');\n let {\n children,\n ...otherProps\n } = props;\n let {styleProps} = useStyleProps(otherProps);\n let domRef = useDOMRef(ref);\n\n return (\n <kbd {...filterDOMProps(otherProps)} {...styleProps} ref={domRef}>\n {children}\n </kbd>\n );\n}\n\n/**\n * Keyboard represents text that specifies a keyboard command.\n */\nconst _Keyboard = forwardRef(Keyboard);\nexport {_Keyboard as Keyboard};\n"],"names":[],"version":3,"file":"Keyboard.module.js.map"}
@@ -0,0 +1,45 @@
1
+ var $h7ExA$reactariautils = require("@react-aria/utils");
2
+ var $h7ExA$react = require("react");
3
+ var $h7ExA$reactspectrumutils = require("@react-spectrum/utils");
4
+
5
+
6
+ function $parcel$interopDefault(a) {
7
+ return a && a.__esModule ? a.default : a;
8
+ }
9
+
10
+ function $parcel$export(e, n, v, s) {
11
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
12
+ }
13
+
14
+ $parcel$export(module.exports, "Text", () => $1efae25dd196d679$export$5f1af8db9871e1d6);
15
+ /*
16
+ * Copyright 2020 Adobe. All rights reserved.
17
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
18
+ * you may not use this file except in compliance with the License. You may obtain a copy
19
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
20
+ *
21
+ * Unless required by applicable law or agreed to in writing, software distributed under
22
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
23
+ * OF ANY KIND, either express or implied. See the License for the specific language
24
+ * governing permissions and limitations under the License.
25
+ */
26
+
27
+
28
+ function $1efae25dd196d679$var$Text(props, ref) {
29
+ props = (0, $h7ExA$reactspectrumutils.useSlotProps)(props, 'text');
30
+ let { children: children, ...otherProps } = props;
31
+ let { styleProps: styleProps } = (0, $h7ExA$reactspectrumutils.useStyleProps)(otherProps);
32
+ let domRef = (0, $h7ExA$reactspectrumutils.useDOMRef)(ref);
33
+ return /*#__PURE__*/ (0, ($parcel$interopDefault($h7ExA$react))).createElement("span", {
34
+ role: "none",
35
+ ...(0, $h7ExA$reactariautils.filterDOMProps)(otherProps),
36
+ ...styleProps,
37
+ ref: domRef
38
+ }, children);
39
+ }
40
+ /**
41
+ * Text represents text with no specific semantic meaning.
42
+ */ const $1efae25dd196d679$export$5f1af8db9871e1d6 = /*#__PURE__*/ (0, $h7ExA$react.forwardRef)($1efae25dd196d679$var$Text);
43
+
44
+
45
+ //# sourceMappingURL=Text.main.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;AAQD,SAAS,2BAAK,KAAgB,EAAE,GAAW;IACzC,QAAQ,CAAA,GAAA,sCAAW,EAAE,OAAO;IAC5B,IAAI,YACF,QAAQ,EACR,GAAG,YACJ,GAAG;IACJ,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,uCAAY,EAAE;IACjC,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IAEvB,qBACE,0DAAC;QAAK,MAAK;QAAQ,GAAG,CAAA,GAAA,oCAAa,EAAE,WAAW;QAAG,GAAG,UAAU;QAAE,KAAK;OACpE;AAGP;AAEA;;CAEC,GACD,MAAM,0DAAQ,CAAA,GAAA,uBAAS,EAAE","sources":["packages/@react-spectrum/text/src/Text.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\nimport {DOMRef} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport React, {forwardRef} from 'react';\nimport {TextProps} from '@react-types/text';\nimport {useDOMRef, useSlotProps, useStyleProps} from '@react-spectrum/utils';\n\nfunction Text(props: TextProps, ref: DOMRef) {\n props = useSlotProps(props, 'text');\n let {\n children,\n ...otherProps\n } = props;\n let {styleProps} = useStyleProps(otherProps);\n let domRef = useDOMRef(ref);\n\n return (\n <span role=\"none\" {...filterDOMProps(otherProps)} {...styleProps} ref={domRef}>\n {children}\n </span>\n );\n}\n\n/**\n * Text represents text with no specific semantic meaning.\n */\nconst _Text = forwardRef(Text);\nexport {_Text as Text};\n"],"names":[],"version":3,"file":"Text.main.js.map"}
package/dist/Text.mjs ADDED
@@ -0,0 +1,36 @@
1
+ import {filterDOMProps as $8fLFW$filterDOMProps} from "@react-aria/utils";
2
+ import $8fLFW$react, {forwardRef as $8fLFW$forwardRef} from "react";
3
+ import {useSlotProps as $8fLFW$useSlotProps, useStyleProps as $8fLFW$useStyleProps, useDOMRef as $8fLFW$useDOMRef} from "@react-spectrum/utils";
4
+
5
+ /*
6
+ * Copyright 2020 Adobe. All rights reserved.
7
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License. You may obtain a copy
9
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software distributed under
12
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
13
+ * OF ANY KIND, either express or implied. See the License for the specific language
14
+ * governing permissions and limitations under the License.
15
+ */
16
+
17
+
18
+ function $cd449e8defa988f0$var$Text(props, ref) {
19
+ props = (0, $8fLFW$useSlotProps)(props, 'text');
20
+ let { children: children, ...otherProps } = props;
21
+ let { styleProps: styleProps } = (0, $8fLFW$useStyleProps)(otherProps);
22
+ let domRef = (0, $8fLFW$useDOMRef)(ref);
23
+ return /*#__PURE__*/ (0, $8fLFW$react).createElement("span", {
24
+ role: "none",
25
+ ...(0, $8fLFW$filterDOMProps)(otherProps),
26
+ ...styleProps,
27
+ ref: domRef
28
+ }, children);
29
+ }
30
+ /**
31
+ * Text represents text with no specific semantic meaning.
32
+ */ const $cd449e8defa988f0$export$5f1af8db9871e1d6 = /*#__PURE__*/ (0, $8fLFW$forwardRef)($cd449e8defa988f0$var$Text);
33
+
34
+
35
+ export {$cd449e8defa988f0$export$5f1af8db9871e1d6 as Text};
36
+ //# sourceMappingURL=Text.module.js.map
@@ -0,0 +1,36 @@
1
+ import {filterDOMProps as $8fLFW$filterDOMProps} from "@react-aria/utils";
2
+ import $8fLFW$react, {forwardRef as $8fLFW$forwardRef} from "react";
3
+ import {useSlotProps as $8fLFW$useSlotProps, useStyleProps as $8fLFW$useStyleProps, useDOMRef as $8fLFW$useDOMRef} from "@react-spectrum/utils";
4
+
5
+ /*
6
+ * Copyright 2020 Adobe. All rights reserved.
7
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License. You may obtain a copy
9
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software distributed under
12
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
13
+ * OF ANY KIND, either express or implied. See the License for the specific language
14
+ * governing permissions and limitations under the License.
15
+ */
16
+
17
+
18
+ function $cd449e8defa988f0$var$Text(props, ref) {
19
+ props = (0, $8fLFW$useSlotProps)(props, 'text');
20
+ let { children: children, ...otherProps } = props;
21
+ let { styleProps: styleProps } = (0, $8fLFW$useStyleProps)(otherProps);
22
+ let domRef = (0, $8fLFW$useDOMRef)(ref);
23
+ return /*#__PURE__*/ (0, $8fLFW$react).createElement("span", {
24
+ role: "none",
25
+ ...(0, $8fLFW$filterDOMProps)(otherProps),
26
+ ...styleProps,
27
+ ref: domRef
28
+ }, children);
29
+ }
30
+ /**
31
+ * Text represents text with no specific semantic meaning.
32
+ */ const $cd449e8defa988f0$export$5f1af8db9871e1d6 = /*#__PURE__*/ (0, $8fLFW$forwardRef)($cd449e8defa988f0$var$Text);
33
+
34
+
35
+ export {$cd449e8defa988f0$export$5f1af8db9871e1d6 as Text};
36
+ //# sourceMappingURL=Text.module.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;AAAA;;;;;;;;;;CAUC;;;AAQD,SAAS,2BAAK,KAAgB,EAAE,GAAW;IACzC,QAAQ,CAAA,GAAA,mBAAW,EAAE,OAAO;IAC5B,IAAI,YACF,QAAQ,EACR,GAAG,YACJ,GAAG;IACJ,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,oBAAY,EAAE;IACjC,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IAEvB,qBACE,gCAAC;QAAK,MAAK;QAAQ,GAAG,CAAA,GAAA,qBAAa,EAAE,WAAW;QAAG,GAAG,UAAU;QAAE,KAAK;OACpE;AAGP;AAEA;;CAEC,GACD,MAAM,0DAAQ,CAAA,GAAA,iBAAS,EAAE","sources":["packages/@react-spectrum/text/src/Text.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\nimport {DOMRef} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport React, {forwardRef} from 'react';\nimport {TextProps} from '@react-types/text';\nimport {useDOMRef, useSlotProps, useStyleProps} from '@react-spectrum/utils';\n\nfunction Text(props: TextProps, ref: DOMRef) {\n props = useSlotProps(props, 'text');\n let {\n children,\n ...otherProps\n } = props;\n let {styleProps} = useStyleProps(otherProps);\n let domRef = useDOMRef(ref);\n\n return (\n <span role=\"none\" {...filterDOMProps(otherProps)} {...styleProps} ref={domRef}>\n {children}\n </span>\n );\n}\n\n/**\n * Text represents text with no specific semantic meaning.\n */\nconst _Text = forwardRef(Text);\nexport {_Text as Text};\n"],"names":[],"version":3,"file":"Text.module.js.map"}
@@ -0,0 +1,22 @@
1
+ import {Text as $cd449e8defa988f0$export$5f1af8db9871e1d6} from "./Text.mjs";
2
+ import {Heading as $c382fceb69609a50$export$a8a3e93435678ff9} from "./Heading.mjs";
3
+ import {Keyboard as $a42b6b1607b36926$export$16e4d70cc375e707} from "./Keyboard.mjs";
4
+
5
+ /*
6
+ * Copyright 2020 Adobe. All rights reserved.
7
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License. You may obtain a copy
9
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software distributed under
12
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
13
+ * OF ANY KIND, either express or implied. See the License for the specific language
14
+ * governing permissions and limitations under the License.
15
+ */ /// <reference types="css-module-types" />
16
+
17
+
18
+
19
+
20
+
21
+ export {$cd449e8defa988f0$export$5f1af8db9871e1d6 as Text, $c382fceb69609a50$export$a8a3e93435678ff9 as Heading, $a42b6b1607b36926$export$16e4d70cc375e707 as Keyboard};
22
+ //# sourceMappingURL=module.js.map
package/dist/main.js ADDED
@@ -0,0 +1,29 @@
1
+ var $1efae25dd196d679$exports = require("./Text.main.js");
2
+ var $c7c750c966e80a46$exports = require("./Heading.main.js");
3
+ var $961f7ef9e414f5f0$exports = require("./Keyboard.main.js");
4
+
5
+
6
+ function $parcel$export(e, n, v, s) {
7
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
8
+ }
9
+
10
+ $parcel$export(module.exports, "Text", () => $1efae25dd196d679$exports.Text);
11
+ $parcel$export(module.exports, "Heading", () => $c7c750c966e80a46$exports.Heading);
12
+ $parcel$export(module.exports, "Keyboard", () => $961f7ef9e414f5f0$exports.Keyboard);
13
+ /*
14
+ * Copyright 2020 Adobe. All rights reserved.
15
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
16
+ * you may not use this file except in compliance with the License. You may obtain a copy
17
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
18
+ *
19
+ * Unless required by applicable law or agreed to in writing, software distributed under
20
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
21
+ * OF ANY KIND, either express or implied. See the License for the specific language
22
+ * governing permissions and limitations under the License.
23
+ */ /// <reference types="css-module-types" />
24
+
25
+
26
+
27
+
28
+
29
+ //# sourceMappingURL=main.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C","sources":["packages/@react-spectrum/text/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 */\n\n/// <reference types=\"css-module-types\" />\n\nexport {Text} from './Text';\nexport {Heading} from './Heading';\nexport {Keyboard} from './Keyboard';\nexport type {HeadingProps, KeyboardProps, TextProps} from '@react-types/text';\n"],"names":[],"version":3,"file":"main.js.map"}
package/dist/module.js ADDED
@@ -0,0 +1,22 @@
1
+ import {Text as $cd449e8defa988f0$export$5f1af8db9871e1d6} from "./Text.module.js";
2
+ import {Heading as $c382fceb69609a50$export$a8a3e93435678ff9} from "./Heading.module.js";
3
+ import {Keyboard as $a42b6b1607b36926$export$16e4d70cc375e707} from "./Keyboard.module.js";
4
+
5
+ /*
6
+ * Copyright 2020 Adobe. All rights reserved.
7
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License. You may obtain a copy
9
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software distributed under
12
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
13
+ * OF ANY KIND, either express or implied. See the License for the specific language
14
+ * governing permissions and limitations under the License.
15
+ */ /// <reference types="css-module-types" />
16
+
17
+
18
+
19
+
20
+
21
+ export {$cd449e8defa988f0$export$5f1af8db9871e1d6 as Text, $c382fceb69609a50$export$a8a3e93435678ff9 as Heading, $a42b6b1607b36926$export$16e4d70cc375e707 as Keyboard};
22
+ //# sourceMappingURL=module.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C","sources":["packages/@react-spectrum/text/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 */\n\n/// <reference types=\"css-module-types\" />\n\nexport {Text} from './Text';\nexport {Heading} from './Heading';\nexport {Keyboard} from './Keyboard';\nexport type {HeadingProps, KeyboardProps, TextProps} from '@react-types/text';\n"],"names":[],"version":3,"file":"module.js.map"}
@@ -0,0 +1,18 @@
1
+ import React from "react";
2
+ import { TextProps, HeadingProps, KeyboardProps } from "@react-types/text";
3
+ import { DOMRefValue } from "@react-types/shared";
4
+ /**
5
+ * Text represents text with no specific semantic meaning.
6
+ */
7
+ export const Text: React.ForwardRefExoticComponent<TextProps & React.RefAttributes<DOMRefValue<HTMLElement>>>;
8
+ /**
9
+ * Heading is used to create various levels of typographic hierarchies.
10
+ */
11
+ export const Heading: React.ForwardRefExoticComponent<HeadingProps & React.RefAttributes<DOMRefValue<HTMLHeadingElement>>>;
12
+ /**
13
+ * Keyboard represents text that specifies a keyboard command.
14
+ */
15
+ export const Keyboard: React.ForwardRefExoticComponent<KeyboardProps & React.RefAttributes<DOMRefValue<HTMLElement>>>;
16
+ export type { HeadingProps, KeyboardProps, TextProps } from '@react-types/text';
17
+
18
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;AAkCA;;GAEG;AACH,OAAA,MAAM,gGAAwB,CAAC;ACE/B;;GAEG;AACH,OAAA,MAAM,6GAA8B,CAAC;ACRrC;;GAEG;AACH,OAAA,MAAM,wGAAgC,CAAC;ACpBvC,YAAY,EAAC,YAAY,EAAE,aAAa,EAAE,SAAS,EAAC,MAAM,mBAAmB,CAAC","sources":["packages/@react-spectrum/text/src/packages/@react-spectrum/text/src/Text.tsx","packages/@react-spectrum/text/src/packages/@react-spectrum/text/src/Heading.tsx","packages/@react-spectrum/text/src/packages/@react-spectrum/text/src/Keyboard.tsx","packages/@react-spectrum/text/src/packages/@react-spectrum/text/src/index.ts","packages/@react-spectrum/text/src/index.ts"],"sourcesContent":[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 {Text} from './Text';\nexport {Heading} from './Heading';\nexport {Keyboard} from './Keyboard';\nexport type {HeadingProps, KeyboardProps, TextProps} from '@react-types/text';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
package/package.json ADDED
@@ -0,0 +1,58 @@
1
+ {
2
+ "name": "@react-spectrum/text",
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": [
20
+ "*.css"
21
+ ],
22
+ "targets": {
23
+ "main": {
24
+ "includeNodeModules": [
25
+ "@adobe/spectrum-css-temp"
26
+ ]
27
+ },
28
+ "module": {
29
+ "includeNodeModules": [
30
+ "@adobe/spectrum-css-temp"
31
+ ]
32
+ }
33
+ },
34
+ "repository": {
35
+ "type": "git",
36
+ "url": "https://github.com/adobe/react-spectrum"
37
+ },
38
+ "dependencies": {
39
+ "@react-aria/utils": "^3.0.0-nightly-641446f65-240905",
40
+ "@react-spectrum/utils": "^3.0.0-nightly-641446f65-240905",
41
+ "@react-types/shared": "^3.0.0-nightly-641446f65-240905",
42
+ "@react-types/text": "^3.0.0-nightly-641446f65-240905",
43
+ "@swc/helpers": "^0.5.0",
44
+ "react-aria-components": "^3.0.0-nightly-641446f65-240905"
45
+ },
46
+ "devDependencies": {
47
+ "@adobe/spectrum-css-temp": "3.0.0-alpha.1",
48
+ "react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0"
49
+ },
50
+ "peerDependencies": {
51
+ "@react-spectrum/provider": "^3.0.0-nightly-641446f65-240905",
52
+ "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0"
53
+ },
54
+ "publishConfig": {
55
+ "access": "public"
56
+ },
57
+ "stableVersion": "3.5.7"
58
+ }
@@ -0,0 +1,44 @@
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 {DOMRef} from '@react-types/shared';
14
+ import {filterDOMProps} from '@react-aria/utils';
15
+ import {HeadingContext, useContextProps} from 'react-aria-components';
16
+ import {HeadingProps} from '@react-types/text';
17
+ import React, {ElementType, forwardRef} from 'react';
18
+ import {useDOMRef, useSlotProps, useStyleProps} from '@react-spectrum/utils';
19
+
20
+ function Heading(props: HeadingProps, ref: DOMRef<HTMLHeadingElement>) {
21
+ let domRef = useDOMRef(ref);
22
+ props = useSlotProps(props, 'heading');
23
+ [props, domRef] = useContextProps(props, domRef, HeadingContext);
24
+
25
+ let {
26
+ children,
27
+ level = 3,
28
+ ...otherProps
29
+ } = props;
30
+ let {styleProps} = useStyleProps(otherProps);
31
+ let HeadingTag = `h${level}` as ElementType;
32
+
33
+ return (
34
+ <HeadingTag {...filterDOMProps(otherProps)} {...styleProps} ref={domRef}>
35
+ {children}
36
+ </HeadingTag>
37
+ );
38
+ }
39
+
40
+ /**
41
+ * Heading is used to create various levels of typographic hierarchies.
42
+ */
43
+ const _Heading = forwardRef(Heading);
44
+ export {_Heading as Heading};
@@ -0,0 +1,39 @@
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 {DOMRef} from '@react-types/shared';
14
+ import {filterDOMProps} from '@react-aria/utils';
15
+ import {KeyboardProps} from '@react-types/text';
16
+ import React, {forwardRef} from 'react';
17
+ import {useDOMRef, useSlotProps, useStyleProps} from '@react-spectrum/utils';
18
+
19
+ function Keyboard(props: KeyboardProps, ref: DOMRef) {
20
+ props = useSlotProps(props, 'keyboard');
21
+ let {
22
+ children,
23
+ ...otherProps
24
+ } = props;
25
+ let {styleProps} = useStyleProps(otherProps);
26
+ let domRef = useDOMRef(ref);
27
+
28
+ return (
29
+ <kbd {...filterDOMProps(otherProps)} {...styleProps} ref={domRef}>
30
+ {children}
31
+ </kbd>
32
+ );
33
+ }
34
+
35
+ /**
36
+ * Keyboard represents text that specifies a keyboard command.
37
+ */
38
+ const _Keyboard = forwardRef(Keyboard);
39
+ export {_Keyboard as Keyboard};
package/src/Text.tsx ADDED
@@ -0,0 +1,39 @@
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 {DOMRef} from '@react-types/shared';
14
+ import {filterDOMProps} from '@react-aria/utils';
15
+ import React, {forwardRef} from 'react';
16
+ import {TextProps} from '@react-types/text';
17
+ import {useDOMRef, useSlotProps, useStyleProps} from '@react-spectrum/utils';
18
+
19
+ function Text(props: TextProps, ref: DOMRef) {
20
+ props = useSlotProps(props, 'text');
21
+ let {
22
+ children,
23
+ ...otherProps
24
+ } = props;
25
+ let {styleProps} = useStyleProps(otherProps);
26
+ let domRef = useDOMRef(ref);
27
+
28
+ return (
29
+ <span role="none" {...filterDOMProps(otherProps)} {...styleProps} ref={domRef}>
30
+ {children}
31
+ </span>
32
+ );
33
+ }
34
+
35
+ /**
36
+ * Text represents text with no specific semantic meaning.
37
+ */
38
+ const _Text = forwardRef(Text);
39
+ export {_Text as Text};
package/src/index.ts ADDED
@@ -0,0 +1,18 @@
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
+ /// <reference types="css-module-types" />
14
+
15
+ export {Text} from './Text';
16
+ export {Heading} from './Heading';
17
+ export {Keyboard} from './Keyboard';
18
+ export type {HeadingProps, KeyboardProps, TextProps} from '@react-types/text';