@react-spectrum/text 3.1.4-nightly.3040 → 3.1.4-nightly.3064

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 CHANGED
@@ -1,101 +1,100 @@
1
- var {
2
- useDOMRef,
3
- useSlotProps,
4
- useStyleProps
5
- } = require("@react-spectrum/utils");
6
-
7
- var _react2 = require("react");
8
-
9
- var _react = $parcel$interopDefault(_react2);
10
-
11
- var {
12
- forwardRef
13
- } = _react2;
14
-
15
- var {
16
- filterDOMProps
17
- } = require("@react-aria/utils");
18
-
19
- var _babelRuntimeHelpersObjectWithoutPropertiesLoose = $parcel$interopDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
20
-
21
- var _babelRuntimeHelpersExtends = $parcel$interopDefault(require("@babel/runtime/helpers/extends"));
22
-
1
+ var $eyw3A$reactariautils = require("@react-aria/utils");
2
+ var $eyw3A$react = require("react");
3
+ var $eyw3A$reactspectrumutils = require("@react-spectrum/utils");
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
+ }
23
21
  function $parcel$interopDefault(a) {
24
22
  return a && a.__esModule ? a.default : a;
25
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 $71e31c006cfd0e07$exports = {};
28
+
29
+ $parcel$export($71e31c006cfd0e07$exports, "Text", () => $71e31c006cfd0e07$export$5f1af8db9871e1d6);
30
+
31
+
26
32
 
27
- function $fe1955053990ab873941970c7463$var$Text(props, ref) {
28
- props = useSlotProps(props, 'text');
29
-
30
- let {
31
- children
32
- } = props,
33
- otherProps = _babelRuntimeHelpersObjectWithoutPropertiesLoose(props, ["children"]);
34
-
35
- let {
36
- styleProps
37
- } = useStyleProps(otherProps);
38
- let domRef = useDOMRef(ref);
39
- return /*#__PURE__*/_react.createElement("span", _babelRuntimeHelpersExtends({}, filterDOMProps(otherProps), styleProps, {
40
- ref: domRef
41
- }), children);
33
+ function $71e31c006cfd0e07$var$Text(props, ref) {
34
+ props = $eyw3A$reactspectrumutils.useSlotProps(props, 'text');
35
+ let { children: children , ...otherProps } = props;
36
+ let { styleProps: styleProps } = $eyw3A$reactspectrumutils.useStyleProps(otherProps);
37
+ let domRef = $eyw3A$reactspectrumutils.useDOMRef(ref);
38
+ return(/*#__PURE__*/ ($parcel$interopDefault($eyw3A$react)).createElement("span", {
39
+ ...$eyw3A$reactariautils.filterDOMProps(otherProps),
40
+ ...styleProps,
41
+ ref: domRef
42
+ }, children));
42
43
  }
43
44
  /**
44
45
  * Text represents text with no specific semantic meaning.
45
- */
46
+ */ const $71e31c006cfd0e07$export$5f1af8db9871e1d6 = /*#__PURE__*/ $eyw3A$react.forwardRef($71e31c006cfd0e07$var$Text);
46
47
 
47
48
 
48
- const Text = /*#__PURE__*/forwardRef($fe1955053990ab873941970c7463$var$Text);
49
- exports.Text = Text;
49
+ var $20e9f3da512ae35f$exports = {};
50
50
 
51
- function $a76c0421a0242146b7d397a8ac50$var$Heading(props, ref) {
52
- props = useSlotProps(props, 'heading');
51
+ $parcel$export($20e9f3da512ae35f$exports, "Heading", () => $20e9f3da512ae35f$export$a8a3e93435678ff9);
53
52
 
54
- let {
55
- children,
56
- level = 3
57
- } = props,
58
- otherProps = _babelRuntimeHelpersObjectWithoutPropertiesLoose(props, ["children", "level"]);
59
53
 
60
- let {
61
- styleProps
62
- } = useStyleProps(otherProps);
63
- let domRef = useDOMRef(ref);
64
- let HeadingTag = "h" + level;
65
- return /*#__PURE__*/_react.createElement(HeadingTag, _babelRuntimeHelpersExtends({}, filterDOMProps(otherProps), styleProps, {
66
- ref: domRef
67
- }), children);
54
+
55
+ function $20e9f3da512ae35f$var$Heading(props, ref) {
56
+ props = $eyw3A$reactspectrumutils.useSlotProps(props, 'heading');
57
+ let { children: children , level: level = 3 , ...otherProps } = props;
58
+ let { styleProps: styleProps } = $eyw3A$reactspectrumutils.useStyleProps(otherProps);
59
+ let domRef = $eyw3A$reactspectrumutils.useDOMRef(ref);
60
+ let HeadingTag = `h${level}`;
61
+ return(/*#__PURE__*/ ($parcel$interopDefault($eyw3A$react)).createElement(HeadingTag, {
62
+ ...$eyw3A$reactariautils.filterDOMProps(otherProps),
63
+ ...styleProps,
64
+ ref: domRef
65
+ }, children));
68
66
  }
69
67
  /**
70
68
  * Heading is used to create various levels of typographic hierarchies.
71
- */
69
+ */ const $20e9f3da512ae35f$export$a8a3e93435678ff9 = /*#__PURE__*/ $eyw3A$react.forwardRef($20e9f3da512ae35f$var$Heading);
70
+
72
71
 
72
+ var $3ceb81f5878185c5$exports = {};
73
73
 
74
- const Heading = /*#__PURE__*/forwardRef($a76c0421a0242146b7d397a8ac50$var$Heading);
75
- exports.Heading = Heading;
74
+ $parcel$export($3ceb81f5878185c5$exports, "Keyboard", () => $3ceb81f5878185c5$export$16e4d70cc375e707);
76
75
 
77
- function $f53f3a6b6cb51dbfd2b9e4c867c$var$Keyboard(props, ref) {
78
- props = useSlotProps(props, 'keyboard');
79
76
 
80
- let {
81
- children
82
- } = props,
83
- otherProps = _babelRuntimeHelpersObjectWithoutPropertiesLoose(props, ["children"]);
84
77
 
85
- let {
86
- styleProps
87
- } = useStyleProps(otherProps);
88
- let domRef = useDOMRef(ref);
89
- return /*#__PURE__*/_react.createElement("kbd", _babelRuntimeHelpersExtends({}, filterDOMProps(otherProps), styleProps, {
90
- dir: "ltr",
91
- ref: domRef
92
- }), children);
78
+ function $3ceb81f5878185c5$var$Keyboard(props, ref) {
79
+ props = $eyw3A$reactspectrumutils.useSlotProps(props, 'keyboard');
80
+ let { children: children , ...otherProps } = props;
81
+ let { styleProps: styleProps } = $eyw3A$reactspectrumutils.useStyleProps(otherProps);
82
+ let domRef = $eyw3A$reactspectrumutils.useDOMRef(ref);
83
+ return(/*#__PURE__*/ ($parcel$interopDefault($eyw3A$react)).createElement("kbd", {
84
+ ...$eyw3A$reactariautils.filterDOMProps(otherProps),
85
+ ...styleProps,
86
+ dir: "ltr",
87
+ ref: domRef
88
+ }, children));
93
89
  }
94
90
  /**
95
91
  * Keyboard represents text that specifies a keyboard command.
96
- */
92
+ */ const $3ceb81f5878185c5$export$16e4d70cc375e707 = /*#__PURE__*/ $eyw3A$react.forwardRef($3ceb81f5878185c5$var$Keyboard);
93
+
94
+
95
+ $parcel$exportWildcard(module.exports, $71e31c006cfd0e07$exports);
96
+ $parcel$exportWildcard(module.exports, $20e9f3da512ae35f$exports);
97
+ $parcel$exportWildcard(module.exports, $3ceb81f5878185c5$exports);
97
98
 
98
99
 
99
- const Keyboard = /*#__PURE__*/forwardRef($f53f3a6b6cb51dbfd2b9e4c867c$var$Keyboard);
100
- exports.Keyboard = Keyboard;
101
100
  //# sourceMappingURL=main.js.map
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,SAASA,sBAAT,CAAgCC,CAAhC,EAAmC;AACjC,SAAOA,CAAC,IAAIA,CAAC,CAACC,UAAP,GAAoBD,CAAC,CAACE,OAAtB,GAAgCF,CAAvC;AACD;;ACgBD,SAASG,sCAAT,CAAcC,KAAd,EAAgCC,GAAhC,EAA6C;AAC3CD,EAAAA,KAAK,GAAGE,YAAY,CAACF,KAAD,EAAQ,MAAR,CAApB;;AACA,MAAI;AACFG,IAAAA;AADE,MAGAH,KAHJ;AAAA,MAEKI,UAFL,oDAGIJ,KAHJ;;AAIA,MAAI;AAACK,IAAAA;AAAD,MAAeC,aAAa,CAACF,UAAD,CAAhC;AACA,MAAIG,MAAM,GAAGC,SAAS,CAACP,GAAD,CAAtB;AAEA,sBACE,6DAAUQ,cAAc,CAACL,UAAD,CAAxB,EAA0CC,UAA1C;AAAsD,IAAA,GAAG,EAAEE;AAA3D,MACGJ,QADH,CADF;AAKD;AAED;;;;;AAGA,MAAMO,IAAK,gBAAGC,UAAU,CAACZ,sCAAD,CAAxB;;;ACnBA,SAASa,yCAAT,CAAiBZ,KAAjB,EAAsCC,GAAtC,EAAuE;AACrED,EAAAA,KAAK,GAAGE,YAAY,CAACF,KAAD,EAAQ,SAAR,CAApB;;AAEA,MAAI;AACFG,IAAAA,QADE;AAEFU,IAAAA,KAAK,GAAG;AAFN,MAIAb,KAJJ;AAAA,MAGKI,UAHL,oDAIIJ,KAJJ;;AAKA,MAAI;AAACK,IAAAA;AAAD,MAAeC,aAAa,CAACF,UAAD,CAAhC;AACA,MAAIG,MAAM,GAAGC,SAAS,CAACP,GAAD,CAAtB;AACA,MAAIa,UAAU,SAAOD,KAArB;AAEA,sBACE,qBAAC,UAAD,kCAAgBJ,cAAc,CAACL,UAAD,CAA9B,EAAgDC,UAAhD;AAA4D,IAAA,GAAG,EAAEE;AAAjE,MACGJ,QADH,CADF;AAKD;AAED;;;;;AAGA,MAAMY,OAAQ,gBAAGJ,UAAU,CAACC,yCAAD,CAA3B;;;ACtBA,SAASI,yCAAT,CAAkBhB,KAAlB,EAAwCC,GAAxC,EAAqD;AACnDD,EAAAA,KAAK,GAAGE,YAAY,CAACF,KAAD,EAAQ,UAAR,CAApB;;AACA,MAAI;AACFG,IAAAA;AADE,MAGAH,KAHJ;AAAA,MAEKI,UAFL,oDAGIJ,KAHJ;;AAIA,MAAI;AAACK,IAAAA;AAAD,MAAeC,aAAa,CAACF,UAAD,CAAhC;AACA,MAAIG,MAAM,GAAGC,SAAS,CAACP,GAAD,CAAtB;AAEA,sBACE,4DAASQ,cAAc,CAACL,UAAD,CAAvB,EAAyCC,UAAzC;AAAqD,IAAA,GAAG,EAAC,KAAzD;AAA+D,IAAA,GAAG,EAAEE;AAApE,MACGJ,QADH,CADF;AAKD;AAED;;;;;AAGA,MAAMc,QAAS,gBAAGN,UAAU,CAACK,yCAAD,CAA5B","sources":["./node_modules/@parcel/scope-hoisting/lib/helpers.js","./packages/@react-spectrum/text/src/Text.tsx","./packages/@react-spectrum/text/src/Heading.tsx","./packages/@react-spectrum/text/src/Keyboard.tsx"],"sourcesContent":["function $parcel$interopDefault(a) {\n return a && a.__esModule ? a.default : a;\n}\n\nfunction $parcel$defineInteropFlag(a) {\n Object.defineProperty(a, '__esModule', {value: true});\n}\n\nfunction $parcel$exportWildcard(dest, source) {\n Object.keys(source).forEach(function(key) {\n if (key === 'default' || key === '__esModule') {\n return;\n }\n\n Object.defineProperty(dest, key, {\n enumerable: true,\n get: function get() {\n return source[key];\n },\n });\n });\n\n return dest;\n}\n\nfunction $parcel$missingModule(name) {\n var err = new Error(\"Cannot find module '\" + name + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n}\n\nvar $parcel$global =\n typeof globalThis !== 'undefined'\n ? globalThis\n : typeof self !== 'undefined'\n ? self\n : typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined'\n ? global\n : {};\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 {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 {...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","/*\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 {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 props = useSlotProps(props, 'heading');\n\n let {\n children,\n level = 3,\n ...otherProps\n } = props;\n let {styleProps} = useStyleProps(otherProps);\n let domRef = useDOMRef(ref);\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","/*\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} dir=\"ltr\" 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":["$parcel$interopDefault","a","__esModule","default","Text","props","ref","useSlotProps","children","otherProps","styleProps","useStyleProps","domRef","useDOMRef","filterDOMProps","_Text","forwardRef","Heading","level","HeadingTag","_Heading","Keyboard","_Keyboard"],"version":3,"file":"main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SCkBS,0BAAI,CAAC,KAAgB,EAAE,GAAW,EAAE,CAAC;IAC5C,KAAK,GAAG,sCAAY,CAAC,KAAK,EAAE,CAAM;IAClC,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,CAAI;WAAK,oCAAc,CAAC,UAAU;WAAO,UAAU;QAAE,GAAG,EAAE,MAAM;OAC9D,QAAQ;AAGf,CAAC;AAED,EAEG,AAFH;;CAEG,AAFH,EAEG,CACH,KAAK,CAAC,yCAAK,iBAAG,uBAAU,CAAC,0BAAI;;;;;;;;;SCnBpB,6BAAO,CAAC,KAAmB,EAAE,GAA+B,EAAE,CAAC;IACtE,KAAK,GAAG,sCAAY,CAAC,KAAK,EAAE,CAAS;IAErC,GAAG,CAAC,CAAC,WACH,QAAQ,UACR,KAAK,GAAG,CAAC,MACN,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;IAC1B,GAAG,CAAC,UAAU,IAAI,CAAC,EAAE,KAAK;IAE1B,MAAM,oEACH,UAAU;WAAK,oCAAc,CAAC,UAAU;WAAO,UAAU;QAAE,GAAG,EAAE,MAAM;OACpE,QAAQ;AAGf,CAAC;AAED,EAEG,AAFH;;CAEG,AAFH,EAEG,CACH,KAAK,CAAC,yCAAQ,iBAAG,uBAAU,CAAC,6BAAO;;;;;;;;;SCtB1B,8BAAQ,CAAC,KAAoB,EAAE,GAAW,EAAE,CAAC;IACpD,KAAK,GAAG,sCAAY,CAAC,KAAK,EAAE,CAAU;IACtC,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,CAAG;WAAK,oCAAc,CAAC,UAAU;WAAO,UAAU;QAAE,GAAG,EAAC,CAAK;QAAC,GAAG,EAAE,MAAM;OACvE,QAAQ;AAGf,CAAC;AAED,EAEG,AAFH;;CAEG,AAFH,EAEG,CACH,KAAK,CAAC,yCAAS,iBAAG,uBAAU,CAAC,8BAAQ;","sources":["packages/@react-spectrum/text/src/index.ts","packages/@react-spectrum/text/src/Text.tsx","packages/@react-spectrum/text/src/Heading.tsx","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\n/// <reference types=\"css-module-types\" />\n\nexport * from './Text';\nexport * from './Heading';\nexport * from './Keyboard';\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 {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 {...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","/*\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 {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 props = useSlotProps(props, 'heading');\n\n let {\n children,\n level = 3,\n ...otherProps\n } = props;\n let {styleProps} = useStyleProps(otherProps);\n let domRef = useDOMRef(ref);\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","/*\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} dir=\"ltr\" 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":"main.js.map"}
package/dist/module.js CHANGED
@@ -1,78 +1,79 @@
1
- import { useDOMRef, useSlotProps, useStyleProps } from "@react-spectrum/utils";
2
- import _react, { forwardRef } from "react";
3
- import { filterDOMProps } from "@react-aria/utils";
4
- import _babelRuntimeHelpersEsmObjectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
5
- import _babelRuntimeHelpersEsmExtends from "@babel/runtime/helpers/esm/extends";
6
-
7
- function $cd1d826835b2023780490c06384f98f$var$Text(props, ref) {
8
- props = useSlotProps(props, 'text');
9
-
10
- let {
11
- children
12
- } = props,
13
- otherProps = _babelRuntimeHelpersEsmObjectWithoutPropertiesLoose(props, ["children"]);
14
-
15
- let {
16
- styleProps
17
- } = useStyleProps(otherProps);
18
- let domRef = useDOMRef(ref);
19
- return /*#__PURE__*/_react.createElement("span", _babelRuntimeHelpersEsmExtends({}, filterDOMProps(otherProps), styleProps, {
20
- ref: domRef
21
- }), children);
1
+ import {filterDOMProps as $kkZQx$filterDOMProps} from "@react-aria/utils";
2
+ import $kkZQx$react, {forwardRef as $kkZQx$forwardRef} from "react";
3
+ import {useSlotProps as $kkZQx$useSlotProps, useStyleProps as $kkZQx$useStyleProps, useDOMRef as $kkZQx$useDOMRef} from "@react-spectrum/utils";
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 $9409c0b2a8b9363e$exports = {};
9
+
10
+ $parcel$export($9409c0b2a8b9363e$exports, "Text", () => $9409c0b2a8b9363e$export$5f1af8db9871e1d6);
11
+
12
+
13
+
14
+ function $9409c0b2a8b9363e$var$Text(props, ref) {
15
+ props = $kkZQx$useSlotProps(props, 'text');
16
+ let { children: children , ...otherProps } = props;
17
+ let { styleProps: styleProps } = $kkZQx$useStyleProps(otherProps);
18
+ let domRef = $kkZQx$useDOMRef(ref);
19
+ return(/*#__PURE__*/ $kkZQx$react.createElement("span", {
20
+ ...$kkZQx$filterDOMProps(otherProps),
21
+ ...styleProps,
22
+ ref: domRef
23
+ }, children));
22
24
  }
23
25
  /**
24
26
  * Text represents text with no specific semantic meaning.
25
- */
27
+ */ const $9409c0b2a8b9363e$export$5f1af8db9871e1d6 = /*#__PURE__*/ $kkZQx$forwardRef($9409c0b2a8b9363e$var$Text);
28
+
26
29
 
30
+ var $813724bad1948052$exports = {};
27
31
 
28
- export const Text = /*#__PURE__*/forwardRef($cd1d826835b2023780490c06384f98f$var$Text);
32
+ $parcel$export($813724bad1948052$exports, "Heading", () => $813724bad1948052$export$a8a3e93435678ff9);
29
33
 
30
- function $aa77dc2a68508e850218bafe906e5ce7$var$Heading(props, ref) {
31
- props = useSlotProps(props, 'heading');
32
34
 
33
- let {
34
- children,
35
- level = 3
36
- } = props,
37
- otherProps = _babelRuntimeHelpersEsmObjectWithoutPropertiesLoose(props, ["children", "level"]);
38
35
 
39
- let {
40
- styleProps
41
- } = useStyleProps(otherProps);
42
- let domRef = useDOMRef(ref);
43
- let HeadingTag = "h" + level;
44
- return /*#__PURE__*/_react.createElement(HeadingTag, _babelRuntimeHelpersEsmExtends({}, filterDOMProps(otherProps), styleProps, {
45
- ref: domRef
46
- }), children);
36
+ function $813724bad1948052$var$Heading(props, ref) {
37
+ props = $kkZQx$useSlotProps(props, 'heading');
38
+ let { children: children , level: level = 3 , ...otherProps } = props;
39
+ let { styleProps: styleProps } = $kkZQx$useStyleProps(otherProps);
40
+ let domRef = $kkZQx$useDOMRef(ref);
41
+ let HeadingTag = `h${level}`;
42
+ return(/*#__PURE__*/ $kkZQx$react.createElement(HeadingTag, {
43
+ ...$kkZQx$filterDOMProps(otherProps),
44
+ ...styleProps,
45
+ ref: domRef
46
+ }, children));
47
47
  }
48
48
  /**
49
49
  * Heading is used to create various levels of typographic hierarchies.
50
- */
50
+ */ const $813724bad1948052$export$a8a3e93435678ff9 = /*#__PURE__*/ $kkZQx$forwardRef($813724bad1948052$var$Heading);
51
+
51
52
 
53
+ var $02f01c6532f6ba23$exports = {};
52
54
 
53
- export const Heading = /*#__PURE__*/forwardRef($aa77dc2a68508e850218bafe906e5ce7$var$Heading);
55
+ $parcel$export($02f01c6532f6ba23$exports, "Keyboard", () => $02f01c6532f6ba23$export$16e4d70cc375e707);
54
56
 
55
- function $a9fec89ba8c4f7df5ed750bd9c0c7e3$var$Keyboard(props, ref) {
56
- props = useSlotProps(props, 'keyboard');
57
57
 
58
- let {
59
- children
60
- } = props,
61
- otherProps = _babelRuntimeHelpersEsmObjectWithoutPropertiesLoose(props, ["children"]);
62
58
 
63
- let {
64
- styleProps
65
- } = useStyleProps(otherProps);
66
- let domRef = useDOMRef(ref);
67
- return /*#__PURE__*/_react.createElement("kbd", _babelRuntimeHelpersEsmExtends({}, filterDOMProps(otherProps), styleProps, {
68
- dir: "ltr",
69
- ref: domRef
70
- }), children);
59
+ function $02f01c6532f6ba23$var$Keyboard(props, ref) {
60
+ props = $kkZQx$useSlotProps(props, 'keyboard');
61
+ let { children: children , ...otherProps } = props;
62
+ let { styleProps: styleProps } = $kkZQx$useStyleProps(otherProps);
63
+ let domRef = $kkZQx$useDOMRef(ref);
64
+ return(/*#__PURE__*/ $kkZQx$react.createElement("kbd", {
65
+ ...$kkZQx$filterDOMProps(otherProps),
66
+ ...styleProps,
67
+ dir: "ltr",
68
+ ref: domRef
69
+ }, children));
71
70
  }
72
71
  /**
73
72
  * Keyboard represents text that specifies a keyboard command.
74
- */
73
+ */ const $02f01c6532f6ba23$export$16e4d70cc375e707 = /*#__PURE__*/ $kkZQx$forwardRef($02f01c6532f6ba23$var$Keyboard);
74
+
75
+
75
76
 
76
77
 
77
- export const Keyboard = /*#__PURE__*/forwardRef($a9fec89ba8c4f7df5ed750bd9c0c7e3$var$Keyboard);
78
+ export {$9409c0b2a8b9363e$export$5f1af8db9871e1d6 as Text, $813724bad1948052$export$a8a3e93435678ff9 as Heading, $02f01c6532f6ba23$export$16e4d70cc375e707 as Keyboard};
78
79
  //# sourceMappingURL=module.js.map
@@ -1 +1 @@
1
- {"mappings":";;;;;;AAkBA,SAASA,yCAAT,CAAcC,KAAd,EAAgCC,GAAhC,EAA6C;AAC3CD,EAAAA,KAAK,GAAGE,YAAY,CAACF,KAAD,EAAQ,MAAR,CAApB;;AACA,MAAI;AACFG,IAAAA;AADE,MAGAH,KAHJ;AAAA,MAEKI,UAFL,uDAGIJ,KAHJ;;AAIA,MAAI;AAACK,IAAAA;AAAD,MAAeC,aAAa,CAACF,UAAD,CAAhC;AACA,MAAIG,MAAM,GAAGC,SAAS,CAACP,GAAD,CAAtB;AAEA,sBACE,gEAAUQ,cAAc,CAACL,UAAD,CAAxB,EAA0CC,UAA1C;AAAsD,IAAA,GAAG,EAAEE;AAA3D,MACGJ,QADH,CADF;AAKD;AAED;;;;;OAGA,MAAMO,IAAK,gBAAGC,UAAU,CAACZ,yCAAD,CAAxB;;ACnBA,SAASa,6CAAT,CAAiBZ,KAAjB,EAAsCC,GAAtC,EAAuE;AACrED,EAAAA,KAAK,GAAGE,YAAY,CAACF,KAAD,EAAQ,SAAR,CAApB;;AAEA,MAAI;AACFG,IAAAA,QADE;AAEFU,IAAAA,KAAK,GAAG;AAFN,MAIAb,KAJJ;AAAA,MAGKI,UAHL,uDAIIJ,KAJJ;;AAKA,MAAI;AAACK,IAAAA;AAAD,MAAeC,aAAa,CAACF,UAAD,CAAhC;AACA,MAAIG,MAAM,GAAGC,SAAS,CAACP,GAAD,CAAtB;AACA,MAAIa,UAAU,SAAOD,KAArB;AAEA,sBACE,qBAAC,UAAD,qCAAgBJ,cAAc,CAACL,UAAD,CAA9B,EAAgDC,UAAhD;AAA4D,IAAA,GAAG,EAAEE;AAAjE,MACGJ,QADH,CADF;AAKD;AAED;;;;;OAGA,MAAMY,OAAQ,gBAAGJ,UAAU,CAACC,6CAAD,CAA3B;;ACtBA,SAASI,6CAAT,CAAkBhB,KAAlB,EAAwCC,GAAxC,EAAqD;AACnDD,EAAAA,KAAK,GAAGE,YAAY,CAACF,KAAD,EAAQ,UAAR,CAApB;;AACA,MAAI;AACFG,IAAAA;AADE,MAGAH,KAHJ;AAAA,MAEKI,UAFL,uDAGIJ,KAHJ;;AAIA,MAAI;AAACK,IAAAA;AAAD,MAAeC,aAAa,CAACF,UAAD,CAAhC;AACA,MAAIG,MAAM,GAAGC,SAAS,CAACP,GAAD,CAAtB;AAEA,sBACE,+DAASQ,cAAc,CAACL,UAAD,CAAvB,EAAyCC,UAAzC;AAAqD,IAAA,GAAG,EAAC,KAAzD;AAA+D,IAAA,GAAG,EAAEE;AAApE,MACGJ,QADH,CADF;AAKD;AAED;;;;;OAGA,MAAMc,QAAS,gBAAGN,UAAU,CAACK,6CAAD,CAA5B","sources":["./packages/@react-spectrum/text/src/Text.tsx","./packages/@react-spectrum/text/src/Heading.tsx","./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 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 {...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","/*\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 {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 props = useSlotProps(props, 'heading');\n\n let {\n children,\n level = 3,\n ...otherProps\n } = props;\n let {styleProps} = useStyleProps(otherProps);\n let domRef = useDOMRef(ref);\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","/*\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} dir=\"ltr\" 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":["Text","props","ref","useSlotProps","children","otherProps","styleProps","useStyleProps","domRef","useDOMRef","filterDOMProps","_Text","forwardRef","Heading","level","HeadingTag","_Heading","Keyboard","_Keyboard"],"version":3,"file":"module.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;SCkBS,0BAAI,CAAC,KAAgB,EAAE,GAAW,EAAE,CAAC;IAC5C,KAAK,GAAG,mBAAY,CAAC,KAAK,EAAE,CAAM;IAClC,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,MAAM,GAAG,gBAAS,CAAC,GAAG;IAE1B,MAAM,0CACH,CAAI;WAAK,qBAAc,CAAC,UAAU;WAAO,UAAU;QAAE,GAAG,EAAE,MAAM;OAC9D,QAAQ;AAGf,CAAC;AAED,EAEG,AAFH;;CAEG,AAFH,EAEG,CACH,KAAK,CAAC,yCAAK,iBAAG,iBAAU,CAAC,0BAAI;;;;;;;;;SCnBpB,6BAAO,CAAC,KAAmB,EAAE,GAA+B,EAAE,CAAC;IACtE,KAAK,GAAG,mBAAY,CAAC,KAAK,EAAE,CAAS;IAErC,GAAG,CAAC,CAAC,WACH,QAAQ,UACR,KAAK,GAAG,CAAC,MACN,UAAU,CACf,CAAC,GAAG,KAAK;IACT,GAAG,CAAC,CAAC,aAAA,UAAU,EAAA,CAAC,GAAG,oBAAa,CAAC,UAAU;IAC3C,GAAG,CAAC,MAAM,GAAG,gBAAS,CAAC,GAAG;IAC1B,GAAG,CAAC,UAAU,IAAI,CAAC,EAAE,KAAK;IAE1B,MAAM,0CACH,UAAU;WAAK,qBAAc,CAAC,UAAU;WAAO,UAAU;QAAE,GAAG,EAAE,MAAM;OACpE,QAAQ;AAGf,CAAC;AAED,EAEG,AAFH;;CAEG,AAFH,EAEG,CACH,KAAK,CAAC,yCAAQ,iBAAG,iBAAU,CAAC,6BAAO;;;;;;;;;SCtB1B,8BAAQ,CAAC,KAAoB,EAAE,GAAW,EAAE,CAAC;IACpD,KAAK,GAAG,mBAAY,CAAC,KAAK,EAAE,CAAU;IACtC,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,MAAM,GAAG,gBAAS,CAAC,GAAG;IAE1B,MAAM,0CACH,CAAG;WAAK,qBAAc,CAAC,UAAU;WAAO,UAAU;QAAE,GAAG,EAAC,CAAK;QAAC,GAAG,EAAE,MAAM;OACvE,QAAQ;AAGf,CAAC;AAED,EAEG,AAFH;;CAEG,AAFH,EAEG,CACH,KAAK,CAAC,yCAAS,iBAAG,iBAAU,CAAC,8BAAQ;","sources":["packages/@react-spectrum/text/src/index.ts","packages/@react-spectrum/text/src/Text.tsx","packages/@react-spectrum/text/src/Heading.tsx","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\n/// <reference types=\"css-module-types\" />\n\nexport * from './Text';\nexport * from './Heading';\nexport * from './Keyboard';\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 {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 {...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","/*\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 {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 props = useSlotProps(props, 'heading');\n\n let {\n children,\n level = 3,\n ...otherProps\n } = props;\n let {styleProps} = useStyleProps(otherProps);\n let domRef = useDOMRef(ref);\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","/*\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} dir=\"ltr\" 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":"module.js.map"}
@@ -1 +1 @@
1
- {"mappings":"A;A;AAkCA;A;GAEG;AACH,OAAA,MAAM,8HAAwB,CAAC;ACA/B;A;GAEG;AACH,OAAA,MAAM,2IAA8B,CAAC;ACNrC;A;GAEG;AACH,OAAA,MAAM,sIAAgC,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"],"sourcesContent":[null,null,null,null],"names":[],"version":3,"file":"types.d.ts.map"}
1
+ {"mappings":";;AAkCA;;GAEG;AACH,OAAA,MAAM,8HAAwB,CAAC;ACA/B;;GAEG;AACH,OAAA,MAAM,2IAA8B,CAAC;ACNrC;;GAEG;AACH,OAAA,MAAM,sIAAgC,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 * from './Text';\nexport * from './Heading';\nexport * from './Keyboard';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-spectrum/text",
3
- "version": "3.1.4-nightly.3040+e2b459ab9",
3
+ "version": "3.1.4-nightly.3064+5115b76b6",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -32,13 +32,13 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@babel/runtime": "^7.6.2",
35
- "@react-aria/utils": "3.0.0-nightly.1349+e2b459ab9",
36
- "@react-spectrum/utils": "3.0.0-nightly.1349+e2b459ab9",
37
- "@react-types/shared": "3.0.0-nightly.1349+e2b459ab9",
38
- "@react-types/text": "3.1.4-nightly.3040+e2b459ab9"
35
+ "@react-aria/utils": "3.0.0-nightly.1373+5115b76b6",
36
+ "@react-spectrum/utils": "3.0.0-nightly.1373+5115b76b6",
37
+ "@react-types/shared": "3.0.0-nightly.1373+5115b76b6",
38
+ "@react-types/text": "3.1.4-nightly.3064+5115b76b6"
39
39
  },
40
40
  "devDependencies": {
41
- "@adobe/spectrum-css-temp": "3.0.0-nightly.1349+e2b459ab9"
41
+ "@adobe/spectrum-css-temp": "3.0.0-nightly.1373+5115b76b6"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "@react-spectrum/provider": "^3.0.0",
@@ -47,5 +47,5 @@
47
47
  "publishConfig": {
48
48
  "access": "public"
49
49
  },
50
- "gitHead": "e2b459ab996abd06b0913942e9801b88493ed940"
50
+ "gitHead": "5115b76b63cba6843d5e7de2ef5ec3a41a1bff3c"
51
51
  }