@react-spectrum/divider 3.1.0 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.css CHANGED
@@ -1,2 +1 @@
1
- [dir=ltr] ._spectrum-Rule_3c70b{margin-left:0}[dir=ltr] ._spectrum-Rule_3c70b,[dir=rtl] ._spectrum-Rule_3c70b{margin-right:0}[dir=rtl] ._spectrum-Rule_3c70b{margin-left:0}._spectrum-Rule_3c70b{overflow:visible;border:none;border-width:var(--spectrum-global-dimension-static-size-25,2px);border-radius:var(--spectrum-global-dimension-static-size-25,2px);margin:0;-ms-flex-item-align:stretch;-ms-grid-row-align:stretch;align-self:stretch}._spectrum-Rule--large_3c70b{border-radius:var(--spectrum-global-dimension-static-size-25,2px)}._spectrum-Rule--medium_3c70b,._spectrum-Rule--small_3c70b{border-radius:var(--spectrum-global-dimension-static-size-10,1px)}._spectrum-Rule--horizontal_3c70b._spectrum-Rule--large_3c70b{height:var(--spectrum-global-dimension-static-size-50,4px)}._spectrum-Rule--horizontal_3c70b._spectrum-Rule--medium_3c70b{height:var(--spectrum-global-dimension-static-size-25,2px)}._spectrum-Rule--horizontal_3c70b._spectrum-Rule--small_3c70b{height:var(--spectrum-global-dimension-static-size-10,1px)}._spectrum-Rule--vertical_3c70b{height:auto}._spectrum-Rule--vertical_3c70b._spectrum-Rule--large_3c70b{width:var(--spectrum-global-dimension-static-size-50,4px)}._spectrum-Rule--vertical_3c70b._spectrum-Rule--medium_3c70b{width:var(--spectrum-global-dimension-static-size-25,2px)}._spectrum-Rule--vertical_3c70b._spectrum-Rule--small_3c70b{width:var(--spectrum-global-dimension-static-size-10,1px)}._spectrum-Rule--large_3c70b{background-color:var(--spectrum-global-color-gray-800)}._spectrum-Rule--medium_3c70b,._spectrum-Rule--small_3c70b{background-color:var(--spectrum-global-color-gray-300)}
2
- /*# sourceMappingURL=main.css.map */
1
+ [dir=ltr] .spectrum-Rule_612bb8{margin-left:0}[dir=rtl] .spectrum-Rule_612bb8,[dir=ltr] .spectrum-Rule_612bb8{margin-right:0}[dir=rtl] .spectrum-Rule_612bb8{margin-left:0}.spectrum-Rule_612bb8{border:0;border-width:var(--spectrum-rule-medium-height,var(--spectrum-global-dimension-static-size-25));border-radius:var(--spectrum-rule-medium-height,var(--spectrum-global-dimension-static-size-25));-ms-grid-row-align:stretch;align-self:stretch;margin:0;overflow:visible}.spectrum-Rule--large_612bb8{border-radius:var(--spectrum-rule-large-border-radius,var(--spectrum-global-dimension-static-size-25))}.spectrum-Rule--medium_612bb8{border-radius:var(--spectrum-rule-medium-border-radius,var(--spectrum-global-dimension-static-size-10))}.spectrum-Rule--small_612bb8{border-radius:var(--spectrum-rule-small-border-radius,var(--spectrum-global-dimension-static-size-10))}.spectrum-Rule--horizontal_612bb8.spectrum-Rule--large_612bb8{height:var(--spectrum-rule-large-height,var(--spectrum-global-dimension-static-size-50))}.spectrum-Rule--horizontal_612bb8.spectrum-Rule--medium_612bb8{height:var(--spectrum-rule-medium-height,var(--spectrum-global-dimension-static-size-25))}.spectrum-Rule--horizontal_612bb8.spectrum-Rule--small_612bb8{height:var(--spectrum-rule-small-height,var(--spectrum-global-dimension-static-size-10))}.spectrum-Rule--vertical_612bb8{height:auto}.spectrum-Rule--vertical_612bb8.spectrum-Rule--large_612bb8{width:var(--spectrum-rule-large-height,var(--spectrum-global-dimension-static-size-50))}.spectrum-Rule--vertical_612bb8.spectrum-Rule--medium_612bb8{width:var(--spectrum-rule-medium-height,var(--spectrum-global-dimension-static-size-25))}.spectrum-Rule--vertical_612bb8.spectrum-Rule--small_612bb8{width:var(--spectrum-rule-small-height,var(--spectrum-global-dimension-static-size-10))}.spectrum-Rule--large_612bb8{background-color:var(--spectrum-rule-large-background-color,var(--spectrum-global-color-gray-800))}.spectrum-Rule--medium_612bb8{background-color:var(--spectrum-rule-medium-background-color,var(--spectrum-global-color-gray-300))}.spectrum-Rule--small_612bb8{background-color:var(--spectrum-rule-small-background-color,var(--spectrum-global-color-gray-300))}
package/dist/main.js CHANGED
@@ -1,84 +1,93 @@
1
- var {
2
- useSeparator
3
- } = require("@react-aria/separator");
4
-
5
- var _react = $parcel$interopDefault(require("react"));
6
-
7
- var {
8
- classNames,
9
- useDOMRef,
10
- useSlotProps,
11
- useStyleProps
12
- } = require("@react-spectrum/utils");
13
-
14
- var _babelRuntimeHelpersObjectWithoutPropertiesLoose = $parcel$interopDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
1
+ require("./main.css");
2
+ var $fUPKU$reactspectrumutils = require("@react-spectrum/utils");
3
+ var $fUPKU$react = require("react");
4
+ var $fUPKU$reactariaseparator = require("@react-aria/separator");
15
5
 
16
- var _babelRuntimeHelpersExtends = $parcel$interopDefault(require("@babel/runtime/helpers/extends"));
6
+ function $parcel$exportWildcard(dest, source) {
7
+ Object.keys(source).forEach(function(key) {
8
+ if (key === 'default' || key === '__esModule' || dest.hasOwnProperty(key)) {
9
+ return;
10
+ }
17
11
 
18
- require("./main.css");
12
+ Object.defineProperty(dest, key, {
13
+ enumerable: true,
14
+ get: function get() {
15
+ return source[key];
16
+ }
17
+ });
18
+ });
19
19
 
20
+ return dest;
21
+ }
20
22
  function $parcel$interopDefault(a) {
21
23
  return a && a.__esModule ? a.default : a;
22
24
  }
25
+ function $parcel$export(e, n, v, s) {
26
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
27
+ }
28
+ var $06b727a78576616b$exports = {};
23
29
 
24
- // ASSET: /Users/govett/dev/react-spectrum-v3/node_modules/@adobe/spectrum-css-temp/components/rule/vars.css
25
- var $f071c3a3bba6252cdbc96ffd809c9e$exports = {};
26
- $f071c3a3bba6252cdbc96ffd809c9e$exports = {
27
- "spectrum-Rule": "_spectrum-Rule_3c70b",
28
- "spectrum-Rule--large": "_spectrum-Rule--large_3c70b",
29
- "spectrum-Rule--medium": "_spectrum-Rule--medium_3c70b",
30
- "spectrum-Rule--small": "_spectrum-Rule--small_3c70b",
31
- "spectrum-Rule--horizontal": "_spectrum-Rule--horizontal_3c70b",
32
- "spectrum-Rule--vertical": "_spectrum-Rule--vertical_3c70b"
33
- };
34
- let $e4a3649e5820982ed2d66266f2$var$sizeMap = {
35
- S: 'small',
36
- M: 'medium',
37
- L: 'large'
38
- };
39
- var $f071c3a3bba6252cdbc96ffd809c9e$$interop$default = $parcel$interopDefault($f071c3a3bba6252cdbc96ffd809c9e$exports);
30
+ $parcel$export($06b727a78576616b$exports, "Divider", () => $06b727a78576616b$export$2e0a83ec2e27ecbb);
40
31
 
41
- function $e4a3649e5820982ed2d66266f2$var$Divider(props, ref) {
42
- props = useSlotProps(props, 'divider');
43
32
 
44
- let {
45
- size = 'L',
46
- orientation = 'horizontal'
47
- } = props,
48
- otherProps = _babelRuntimeHelpersObjectWithoutPropertiesLoose(props, ["size", "orientation"]);
33
+ var $85d6bab8d0ec4e8e$exports = {};
49
34
 
50
- let domRef = useDOMRef(ref);
51
- let {
52
- styleProps
53
- } = useStyleProps(otherProps);
54
- let weight = $e4a3649e5820982ed2d66266f2$var$sizeMap[size];
55
- let Element = 'hr';
35
+ $parcel$export($85d6bab8d0ec4e8e$exports, "spectrum-Rule", () => $85d6bab8d0ec4e8e$export$9ebf9cdaed6878bc, (v) => $85d6bab8d0ec4e8e$export$9ebf9cdaed6878bc = v);
36
+ $parcel$export($85d6bab8d0ec4e8e$exports, "spectrum-Rule--large", () => $85d6bab8d0ec4e8e$export$243baa0ec4ab58cc, (v) => $85d6bab8d0ec4e8e$export$243baa0ec4ab58cc = v);
37
+ $parcel$export($85d6bab8d0ec4e8e$exports, "spectrum-Rule--medium", () => $85d6bab8d0ec4e8e$export$a8d73b58ca350eb9, (v) => $85d6bab8d0ec4e8e$export$a8d73b58ca350eb9 = v);
38
+ $parcel$export($85d6bab8d0ec4e8e$exports, "spectrum-Rule--small", () => $85d6bab8d0ec4e8e$export$b4b727880cfe37d, (v) => $85d6bab8d0ec4e8e$export$b4b727880cfe37d = v);
39
+ $parcel$export($85d6bab8d0ec4e8e$exports, "spectrum-Rule--horizontal", () => $85d6bab8d0ec4e8e$export$563c1b24466c05b8, (v) => $85d6bab8d0ec4e8e$export$563c1b24466c05b8 = v);
40
+ $parcel$export($85d6bab8d0ec4e8e$exports, "spectrum-Rule--vertical", () => $85d6bab8d0ec4e8e$export$76f93463a8fc15a8, (v) => $85d6bab8d0ec4e8e$export$76f93463a8fc15a8 = v);
41
+ var $85d6bab8d0ec4e8e$export$9ebf9cdaed6878bc;
42
+ var $85d6bab8d0ec4e8e$export$243baa0ec4ab58cc;
43
+ var $85d6bab8d0ec4e8e$export$a8d73b58ca350eb9;
44
+ var $85d6bab8d0ec4e8e$export$b4b727880cfe37d;
45
+ var $85d6bab8d0ec4e8e$export$563c1b24466c05b8;
46
+ var $85d6bab8d0ec4e8e$export$76f93463a8fc15a8;
47
+ $85d6bab8d0ec4e8e$export$9ebf9cdaed6878bc = "spectrum-Rule_612bb8";
48
+ $85d6bab8d0ec4e8e$export$243baa0ec4ab58cc = "spectrum-Rule--large_612bb8";
49
+ $85d6bab8d0ec4e8e$export$a8d73b58ca350eb9 = "spectrum-Rule--medium_612bb8";
50
+ $85d6bab8d0ec4e8e$export$b4b727880cfe37d = "spectrum-Rule--small_612bb8";
51
+ $85d6bab8d0ec4e8e$export$563c1b24466c05b8 = "spectrum-Rule--horizontal_612bb8";
52
+ $85d6bab8d0ec4e8e$export$76f93463a8fc15a8 = "spectrum-Rule--vertical_612bb8";
56
53
 
57
- if (orientation === 'vertical') {
58
- Element = 'div';
59
- }
60
54
 
61
- let {
62
- separatorProps
63
- } = useSeparator(_babelRuntimeHelpersExtends({}, props, {
64
- elementType: Element
65
- }));
66
- return /*#__PURE__*/_react.createElement(Element, _babelRuntimeHelpersExtends({}, styleProps, {
67
- className: classNames($f071c3a3bba6252cdbc96ffd809c9e$$interop$default, 'spectrum-Rule', "spectrum-Rule--" + weight, {
68
- 'spectrum-Rule--vertical': orientation === 'vertical',
69
- 'spectrum-Rule--horizontal': orientation === 'horizontal'
70
- }, styleProps.className) // @ts-ignore https://github.com/Microsoft/TypeScript/issues/28892
71
- ,
72
- ref: domRef
73
- }, separatorProps));
55
+
56
+ let $06b727a78576616b$var$sizeMap = {
57
+ S: 'small',
58
+ M: 'medium',
59
+ L: 'large'
60
+ };
61
+ function $06b727a78576616b$var$Divider(props, ref) {
62
+ props = $fUPKU$reactspectrumutils.useSlotProps(props, 'divider');
63
+ let { size: size = 'L' , orientation: orientation = 'horizontal' , ...otherProps } = props;
64
+ let domRef = $fUPKU$reactspectrumutils.useDOMRef(ref);
65
+ let { styleProps: styleProps } = $fUPKU$reactspectrumutils.useStyleProps(otherProps);
66
+ let weight = $06b727a78576616b$var$sizeMap[size];
67
+ let Element = 'hr';
68
+ if (orientation === 'vertical') Element = 'div';
69
+ let { separatorProps: separatorProps } = $fUPKU$reactariaseparator.useSeparator({
70
+ ...props,
71
+ elementType: Element
72
+ });
73
+ return(/*#__PURE__*/ ($parcel$interopDefault($fUPKU$react)).createElement(Element, {
74
+ ...styleProps,
75
+ className: $fUPKU$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($85d6bab8d0ec4e8e$exports)), 'spectrum-Rule', `spectrum-Rule--${weight}`, {
76
+ 'spectrum-Rule--vertical': orientation === 'vertical',
77
+ 'spectrum-Rule--horizontal': orientation === 'horizontal'
78
+ }, styleProps.className),
79
+ // @ts-ignore https://github.com/Microsoft/TypeScript/issues/28892
80
+ ref: domRef,
81
+ ...separatorProps
82
+ }));
74
83
  }
75
84
  /**
76
85
  * Dividers bring clarity to a layout by grouping and dividing content in close proximity.
77
86
  * They can also be used to establish rhythm and hierarchy.
78
- */
87
+ */ let $06b727a78576616b$export$2e0a83ec2e27ecbb = /*#__PURE__*/ ($parcel$interopDefault($fUPKU$react)).forwardRef($06b727a78576616b$var$Divider);
88
+
79
89
 
90
+ $parcel$exportWildcard(module.exports, $06b727a78576616b$exports);
80
91
 
81
- let Divider = _react.forwardRef($e4a3649e5820982ed2d66266f2$var$Divider);
82
92
 
83
- exports.Divider = Divider;
84
93
  //# 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;;;;ACFD,0CAAiB;AACf,mBAAiB,sBADF;AAEf,0BAAwB,6BAFT;AAGf,2BAAyB,8BAHV;AAIf,0BAAwB,6BAJT;AAKf,+BAA6B,kCALd;AAMf,6BAA2B;AANZ,CAAjB;ACmBA,IAAIG,uCAAO,GAAG;AACZC,EAAAA,CAAC,EAAE,OADS;AAEZC,EAAAA,CAAC,EAAE,QAFS;AAGZC,EAAAA,CAAC,EAAE;AAHS,CAAd;;;AAMA,SAASC,uCAAT,CAAiBC,KAAjB,EAA8CC,GAA9C,EAA2D;AACzDD,EAAAA,KAAK,GAAGE,YAAY,CAACF,KAAD,EAAQ,SAAR,CAApB;;AACA,MAAI;AACFG,IAAAA,IAAI,GAAG,GADL;AAEFC,IAAAA,WAAW,GAAG;AAFZ,MAIAJ,KAJJ;AAAA,MAGKK,UAHL,oDAIIL,KAJJ;;AAKA,MAAIM,MAAM,GAAGC,SAAS,CAACN,GAAD,CAAtB;AACA,MAAI;AAACO,IAAAA;AAAD,MAAeC,aAAa,CAACJ,UAAD,CAAhC;AACA,MAAIK,MAAM,GAAGf,uCAAO,CAACQ,IAAD,CAApB;AAEA,MAAIQ,OAAO,GAAG,IAAd;;AACA,MAAIP,WAAW,KAAK,UAApB,EAAgC;AAC9BO,IAAAA,OAAO,GAAG,KAAV;AACD;;AAED,MAAI;AAACC,IAAAA;AAAD,MAAmBC,YAAY,iCAC9Bb,KAD8B;AAEjCc,IAAAA,WAAW,EAAEH;AAFoB,KAAnC;AAKA,sBACE,qBAAC,OAAD,kCACMH,UADN;AAEE,IAAA,SAAS,EACPO,UAAU,mDAER,eAFQ,sBAGUL,MAHV,EAIR;AACE,iCAA2BN,WAAW,KAAK,UAD7C;AAEE,mCAA6BA,WAAW,KAAK;AAF/C,KAJQ,EAQRI,UAAU,CAACQ,SARH,CAHd,CAcE;AAdF;AAeE,IAAA,GAAG,EAAEV;AAfP,KAgBMM,cAhBN,EADF;AAmBD;AAED;;;;;;AAIA,IAAIK,OAAQ,GAAGC,MAAK,CAACC,UAAN,CAAiBpB,uCAAjB,CAAf","sources":["./node_modules/@parcel/scope-hoisting/lib/helpers.js","./node_modules/@adobe/spectrum-css-temp/components/rule/vars.css","./packages/@react-spectrum/divider/src/Divider.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\n@import './index.css';\n@import './skin.css';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {classNames, useDOMRef, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport React from 'react';\nimport {SpectrumDividerProps} from '@react-types/divider';\nimport styles from '@adobe/spectrum-css-temp/components/rule/vars.css';\nimport {useSeparator} from '@react-aria/separator';\n\nlet sizeMap = {\n S: 'small',\n M: 'medium',\n L: 'large'\n};\n\nfunction Divider(props: SpectrumDividerProps, ref: DOMRef) {\n props = useSlotProps(props, 'divider');\n let {\n size = 'L',\n orientation = 'horizontal',\n ...otherProps\n } = props;\n let domRef = useDOMRef(ref);\n let {styleProps} = useStyleProps(otherProps);\n let weight = sizeMap[size];\n\n let Element = 'hr';\n if (orientation === 'vertical') {\n Element = 'div';\n }\n\n let {separatorProps} = useSeparator({\n ...props,\n elementType: Element\n });\n\n return (\n <Element\n {...styleProps}\n className={\n classNames(\n styles,\n 'spectrum-Rule',\n `spectrum-Rule--${weight}`,\n {\n 'spectrum-Rule--vertical': orientation === 'vertical',\n 'spectrum-Rule--horizontal': orientation === 'horizontal'\n },\n styleProps.className\n )\n }\n // @ts-ignore https://github.com/Microsoft/TypeScript/issues/28892\n ref={domRef}\n {...separatorProps} />\n );\n}\n\n/**\n * Dividers bring clarity to a layout by grouping and dividing content in close proximity.\n * They can also be used to establish rhythm and hierarchy.\n */\nlet _Divider = React.forwardRef(Divider);\nexport {_Divider as Divider};\n"],"names":["$parcel$interopDefault","a","__esModule","default","sizeMap","S","M","L","Divider","props","ref","useSlotProps","size","orientation","otherProps","domRef","useDOMRef","styleProps","useStyleProps","weight","Element","separatorProps","useSeparator","elementType","classNames","className","_Divider","React","forwardRef"],"version":3,"file":"main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AEAA,GAA+B;AAC/B,GAAsC;AACtC,GAAuC;AACvC,GAAsC;AACtC,GAA2C;AAC3C,GAAyC;AALzC,yCAA+B,GAAG,CAAsB;AACxD,yCAAsC,GAAG,CAA6B;AACtE,yCAAuC,GAAG,CAA8B;AACxE,wCAAsC,GAAG,CAA6B;AACtE,yCAA2C,GAAG,CAAkC;AAChF,yCAAyC,GAAG,CAAgC;;;;ADc5E,GAAG,CAAC,6BAAO,GAAG,CAAC;IACb,CAAC,EAAE,CAAO;IACV,CAAC,EAAE,CAAQ;IACX,CAAC,EAAE,CAAO;AACZ,CAAC;SAEQ,6BAAO,CAAC,KAA2B,EAAE,GAAW,EAAE,CAAC;IAC1D,KAAK,GAAG,sCAAY,CAAC,KAAK,EAAE,CAAS;IACrC,GAAG,CAAC,CAAC,OACH,IAAI,GAAG,CAAG,kBACV,WAAW,GAAG,CAAY,iBACvB,UAAU,CACf,CAAC,GAAG,KAAK;IACT,GAAG,CAAC,MAAM,GAAG,mCAAS,CAAC,GAAG;IAC1B,GAAG,CAAC,CAAC,aAAA,UAAU,EAAA,CAAC,GAAG,uCAAa,CAAC,UAAU;IAC3C,GAAG,CAAC,MAAM,GAAG,6BAAO,CAAC,IAAI;IAEzB,GAAG,CAAC,OAAO,GAAG,CAAI;IAClB,EAAE,EAAE,WAAW,KAAK,CAAU,WAC5B,OAAO,GAAG,CAAK;IAGjB,GAAG,CAAC,CAAC,iBAAA,cAAc,EAAA,CAAC,GAAG,sCAAY,CAAC,CAAC;WAChC,KAAK;QACR,WAAW,EAAE,OAAO;IACtB,CAAC;IAED,MAAM,oEACH,OAAO;WACF,UAAU;QACd,SAAS,EACP,oCAAU,CACR,gEAAM,EACN,CAAe,iBACd,eAAe,EAAE,MAAM,IACxB,CAAC;YACC,CAAyB,0BAAE,WAAW,KAAK,CAAU;YACrD,CAA2B,4BAAE,WAAW,KAAK,CAAY;QAC3D,CAAC,EACD,UAAU,CAAC,SAAS;QAGxB,EAAkE,AAAlE,gEAAkE;QAClE,GAAG,EAAE,MAAM;WACP,cAAc;;AAExB,CAAC;AAED,EAGG,AAHH;;;CAGG,AAHH,EAGG,CACH,GAAG,CAAC,yCAAQ,iBAAG,sCAAK,CAAC,UAAU,CAAC,6BAAO","sources":["packages/@react-spectrum/divider/src/index.ts","packages/@react-spectrum/divider/src/Divider.tsx","packages/@adobe/spectrum-css-temp/components/rule/vars.css"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport * from './Divider';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {classNames, useDOMRef, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport React from 'react';\nimport {SpectrumDividerProps} from '@react-types/divider';\nimport styles from '@adobe/spectrum-css-temp/components/rule/vars.css';\nimport {useSeparator} from '@react-aria/separator';\n\nlet sizeMap = {\n S: 'small',\n M: 'medium',\n L: 'large'\n};\n\nfunction Divider(props: SpectrumDividerProps, ref: DOMRef) {\n props = useSlotProps(props, 'divider');\n let {\n size = 'L',\n orientation = 'horizontal',\n ...otherProps\n } = props;\n let domRef = useDOMRef(ref);\n let {styleProps} = useStyleProps(otherProps);\n let weight = sizeMap[size];\n\n let Element = 'hr';\n if (orientation === 'vertical') {\n Element = 'div';\n }\n\n let {separatorProps} = useSeparator({\n ...props,\n elementType: Element\n });\n\n return (\n <Element\n {...styleProps}\n className={\n classNames(\n styles,\n 'spectrum-Rule',\n `spectrum-Rule--${weight}`,\n {\n 'spectrum-Rule--vertical': orientation === 'vertical',\n 'spectrum-Rule--horizontal': orientation === 'horizontal'\n },\n styleProps.className\n )\n }\n // @ts-ignore https://github.com/Microsoft/TypeScript/issues/28892\n ref={domRef}\n {...separatorProps} />\n );\n}\n\n/**\n * Dividers bring clarity to a layout by grouping and dividing content in close proximity.\n * They can also be used to establish rhythm and hierarchy.\n */\nlet _Divider = React.forwardRef(Divider);\nexport {_Divider as Divider};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"main.js.map"}
package/dist/module.js CHANGED
@@ -1,70 +1,77 @@
1
- import { useSeparator } from "@react-aria/separator";
2
- import _react from "react";
3
- import { classNames, useDOMRef, useSlotProps, useStyleProps } from "@react-spectrum/utils";
4
- import _babelRuntimeHelpersEsmObjectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
5
- import _babelRuntimeHelpersEsmExtends from "@babel/runtime/helpers/esm/extends";
6
1
  import "./main.css";
2
+ import {useSlotProps as $eTrI9$useSlotProps, useDOMRef as $eTrI9$useDOMRef, useStyleProps as $eTrI9$useStyleProps, classNames as $eTrI9$classNames} from "@react-spectrum/utils";
3
+ import $eTrI9$react from "react";
4
+ import {useSeparator as $eTrI9$useSeparator} from "@react-aria/separator";
7
5
 
8
6
  function $parcel$interopDefault(a) {
9
7
  return a && a.__esModule ? a.default : a;
10
8
  }
9
+ function $parcel$export(e, n, v, s) {
10
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
11
+ }
12
+ var $af991ac23f3745a4$exports = {};
13
+
14
+ $parcel$export($af991ac23f3745a4$exports, "Divider", () => $af991ac23f3745a4$export$2e0a83ec2e27ecbb);
11
15
 
12
- // ASSET: /Users/govett/dev/react-spectrum-v3/node_modules/@adobe/spectrum-css-temp/components/rule/vars.css
13
- var $c73a71f7d88c6b33532476ecc5c$exports = {};
14
- $c73a71f7d88c6b33532476ecc5c$exports = {
15
- "spectrum-Rule": "_spectrum-Rule_3c70b",
16
- "spectrum-Rule--large": "_spectrum-Rule--large_3c70b",
17
- "spectrum-Rule--medium": "_spectrum-Rule--medium_3c70b",
18
- "spectrum-Rule--small": "_spectrum-Rule--small_3c70b",
19
- "spectrum-Rule--horizontal": "_spectrum-Rule--horizontal_3c70b",
20
- "spectrum-Rule--vertical": "_spectrum-Rule--vertical_3c70b"
21
- };
22
- let $ea27f9ba945db758ff2bd45520b5b1$var$sizeMap = {
23
- S: 'small',
24
- M: 'medium',
25
- L: 'large'
26
- };
27
- var $c73a71f7d88c6b33532476ecc5c$$interop$default = $parcel$interopDefault($c73a71f7d88c6b33532476ecc5c$exports);
28
16
 
29
- function $ea27f9ba945db758ff2bd45520b5b1$var$Divider(props, ref) {
30
- props = useSlotProps(props, 'divider');
17
+ var $c4cb5f69e2107147$exports = {};
31
18
 
32
- let {
33
- size = 'L',
34
- orientation = 'horizontal'
35
- } = props,
36
- otherProps = _babelRuntimeHelpersEsmObjectWithoutPropertiesLoose(props, ["size", "orientation"]);
19
+ $parcel$export($c4cb5f69e2107147$exports, "spectrum-Rule", () => $c4cb5f69e2107147$export$9ebf9cdaed6878bc, (v) => $c4cb5f69e2107147$export$9ebf9cdaed6878bc = v);
20
+ $parcel$export($c4cb5f69e2107147$exports, "spectrum-Rule--large", () => $c4cb5f69e2107147$export$243baa0ec4ab58cc, (v) => $c4cb5f69e2107147$export$243baa0ec4ab58cc = v);
21
+ $parcel$export($c4cb5f69e2107147$exports, "spectrum-Rule--medium", () => $c4cb5f69e2107147$export$a8d73b58ca350eb9, (v) => $c4cb5f69e2107147$export$a8d73b58ca350eb9 = v);
22
+ $parcel$export($c4cb5f69e2107147$exports, "spectrum-Rule--small", () => $c4cb5f69e2107147$export$b4b727880cfe37d, (v) => $c4cb5f69e2107147$export$b4b727880cfe37d = v);
23
+ $parcel$export($c4cb5f69e2107147$exports, "spectrum-Rule--horizontal", () => $c4cb5f69e2107147$export$563c1b24466c05b8, (v) => $c4cb5f69e2107147$export$563c1b24466c05b8 = v);
24
+ $parcel$export($c4cb5f69e2107147$exports, "spectrum-Rule--vertical", () => $c4cb5f69e2107147$export$76f93463a8fc15a8, (v) => $c4cb5f69e2107147$export$76f93463a8fc15a8 = v);
25
+ var $c4cb5f69e2107147$export$9ebf9cdaed6878bc;
26
+ var $c4cb5f69e2107147$export$243baa0ec4ab58cc;
27
+ var $c4cb5f69e2107147$export$a8d73b58ca350eb9;
28
+ var $c4cb5f69e2107147$export$b4b727880cfe37d;
29
+ var $c4cb5f69e2107147$export$563c1b24466c05b8;
30
+ var $c4cb5f69e2107147$export$76f93463a8fc15a8;
31
+ $c4cb5f69e2107147$export$9ebf9cdaed6878bc = "spectrum-Rule_612bb8";
32
+ $c4cb5f69e2107147$export$243baa0ec4ab58cc = "spectrum-Rule--large_612bb8";
33
+ $c4cb5f69e2107147$export$a8d73b58ca350eb9 = "spectrum-Rule--medium_612bb8";
34
+ $c4cb5f69e2107147$export$b4b727880cfe37d = "spectrum-Rule--small_612bb8";
35
+ $c4cb5f69e2107147$export$563c1b24466c05b8 = "spectrum-Rule--horizontal_612bb8";
36
+ $c4cb5f69e2107147$export$76f93463a8fc15a8 = "spectrum-Rule--vertical_612bb8";
37
37
 
38
- let domRef = useDOMRef(ref);
39
- let {
40
- styleProps
41
- } = useStyleProps(otherProps);
42
- let weight = $ea27f9ba945db758ff2bd45520b5b1$var$sizeMap[size];
43
- let Element = 'hr';
44
38
 
45
- if (orientation === 'vertical') {
46
- Element = 'div';
47
- }
48
39
 
49
- let {
50
- separatorProps
51
- } = useSeparator(_babelRuntimeHelpersEsmExtends({}, props, {
52
- elementType: Element
53
- }));
54
- return /*#__PURE__*/_react.createElement(Element, _babelRuntimeHelpersEsmExtends({}, styleProps, {
55
- className: classNames($c73a71f7d88c6b33532476ecc5c$$interop$default, 'spectrum-Rule', "spectrum-Rule--" + weight, {
56
- 'spectrum-Rule--vertical': orientation === 'vertical',
57
- 'spectrum-Rule--horizontal': orientation === 'horizontal'
58
- }, styleProps.className) // @ts-ignore https://github.com/Microsoft/TypeScript/issues/28892
59
- ,
60
- ref: domRef
61
- }, separatorProps));
40
+ let $af991ac23f3745a4$var$sizeMap = {
41
+ S: 'small',
42
+ M: 'medium',
43
+ L: 'large'
44
+ };
45
+ function $af991ac23f3745a4$var$Divider(props, ref) {
46
+ props = $eTrI9$useSlotProps(props, 'divider');
47
+ let { size: size = 'L' , orientation: orientation = 'horizontal' , ...otherProps } = props;
48
+ let domRef = $eTrI9$useDOMRef(ref);
49
+ let { styleProps: styleProps } = $eTrI9$useStyleProps(otherProps);
50
+ let weight = $af991ac23f3745a4$var$sizeMap[size];
51
+ let Element = 'hr';
52
+ if (orientation === 'vertical') Element = 'div';
53
+ let { separatorProps: separatorProps } = $eTrI9$useSeparator({
54
+ ...props,
55
+ elementType: Element
56
+ });
57
+ return(/*#__PURE__*/ $eTrI9$react.createElement(Element, {
58
+ ...styleProps,
59
+ className: $eTrI9$classNames((/*@__PURE__*/$parcel$interopDefault($c4cb5f69e2107147$exports)), 'spectrum-Rule', `spectrum-Rule--${weight}`, {
60
+ 'spectrum-Rule--vertical': orientation === 'vertical',
61
+ 'spectrum-Rule--horizontal': orientation === 'horizontal'
62
+ }, styleProps.className),
63
+ // @ts-ignore https://github.com/Microsoft/TypeScript/issues/28892
64
+ ref: domRef,
65
+ ...separatorProps
66
+ }));
62
67
  }
63
68
  /**
64
69
  * Dividers bring clarity to a layout by grouping and dividing content in close proximity.
65
70
  * They can also be used to establish rhythm and hierarchy.
66
- */
71
+ */ let $af991ac23f3745a4$export$2e0a83ec2e27ecbb = /*#__PURE__*/ $eTrI9$react.forwardRef($af991ac23f3745a4$var$Divider);
72
+
73
+
67
74
 
68
75
 
69
- export let Divider = _react.forwardRef($ea27f9ba945db758ff2bd45520b5b1$var$Divider);
76
+ export {$af991ac23f3745a4$export$2e0a83ec2e27ecbb as Divider};
70
77
  //# sourceMappingURL=module.js.map
@@ -1 +1 @@
1
- {"mappings":";;;;;;;AAAA,SAASA,sBAAT,CAAgCC,CAAhC,EAAmC;AACjC,SAAOA,CAAC,IAAIA,CAAC,CAACC,UAAP,GAAoBD,CAAC,CAACE,OAAtB,GAAgCF,CAAvC;AACD;;;;ACFD,uCAAiB;AACf,mBAAiB,sBADF;AAEf,0BAAwB,6BAFT;AAGf,2BAAyB,8BAHV;AAIf,0BAAwB,6BAJT;AAKf,+BAA6B,kCALd;AAMf,6BAA2B;AANZ,CAAjB;ACmBA,IAAIG,2CAAO,GAAG;AACZC,EAAAA,CAAC,EAAE,OADS;AAEZC,EAAAA,CAAC,EAAE,QAFS;AAGZC,EAAAA,CAAC,EAAE;AAHS,CAAd;;;AAMA,SAASC,2CAAT,CAAiBC,KAAjB,EAA8CC,GAA9C,EAA2D;AACzDD,EAAAA,KAAK,GAAGE,YAAY,CAACF,KAAD,EAAQ,SAAR,CAApB;;AACA,MAAI;AACFG,IAAAA,IAAI,GAAG,GADL;AAEFC,IAAAA,WAAW,GAAG;AAFZ,MAIAJ,KAJJ;AAAA,MAGKK,UAHL,uDAIIL,KAJJ;;AAKA,MAAIM,MAAM,GAAGC,SAAS,CAACN,GAAD,CAAtB;AACA,MAAI;AAACO,IAAAA;AAAD,MAAeC,aAAa,CAACJ,UAAD,CAAhC;AACA,MAAIK,MAAM,GAAGf,2CAAO,CAACQ,IAAD,CAApB;AAEA,MAAIQ,OAAO,GAAG,IAAd;;AACA,MAAIP,WAAW,KAAK,UAApB,EAAgC;AAC9BO,IAAAA,OAAO,GAAG,KAAV;AACD;;AAED,MAAI;AAACC,IAAAA;AAAD,MAAmBC,YAAY,oCAC9Bb,KAD8B;AAEjCc,IAAAA,WAAW,EAAEH;AAFoB,KAAnC;AAKA,sBACE,qBAAC,OAAD,qCACMH,UADN;AAEE,IAAA,SAAS,EACPO,UAAU,gDAER,eAFQ,sBAGUL,MAHV,EAIR;AACE,iCAA2BN,WAAW,KAAK,UAD7C;AAEE,mCAA6BA,WAAW,KAAK;AAF/C,KAJQ,EAQRI,UAAU,CAACQ,SARH,CAHd,CAcE;AAdF;AAeE,IAAA,GAAG,EAAEV;AAfP,KAgBMM,cAhBN,EADF;AAmBD;AAED;;;;;;OAIA,IAAIK,OAAQ,GAAGC,MAAK,CAACC,UAAN,CAAiBpB,2CAAjB,CAAf","sources":["./node_modules/@parcel/scope-hoisting/lib/helpers.js","./node_modules/@adobe/spectrum-css-temp/components/rule/vars.css","./packages/@react-spectrum/divider/src/Divider.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\n@import './index.css';\n@import './skin.css';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {classNames, useDOMRef, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport React from 'react';\nimport {SpectrumDividerProps} from '@react-types/divider';\nimport styles from '@adobe/spectrum-css-temp/components/rule/vars.css';\nimport {useSeparator} from '@react-aria/separator';\n\nlet sizeMap = {\n S: 'small',\n M: 'medium',\n L: 'large'\n};\n\nfunction Divider(props: SpectrumDividerProps, ref: DOMRef) {\n props = useSlotProps(props, 'divider');\n let {\n size = 'L',\n orientation = 'horizontal',\n ...otherProps\n } = props;\n let domRef = useDOMRef(ref);\n let {styleProps} = useStyleProps(otherProps);\n let weight = sizeMap[size];\n\n let Element = 'hr';\n if (orientation === 'vertical') {\n Element = 'div';\n }\n\n let {separatorProps} = useSeparator({\n ...props,\n elementType: Element\n });\n\n return (\n <Element\n {...styleProps}\n className={\n classNames(\n styles,\n 'spectrum-Rule',\n `spectrum-Rule--${weight}`,\n {\n 'spectrum-Rule--vertical': orientation === 'vertical',\n 'spectrum-Rule--horizontal': orientation === 'horizontal'\n },\n styleProps.className\n )\n }\n // @ts-ignore https://github.com/Microsoft/TypeScript/issues/28892\n ref={domRef}\n {...separatorProps} />\n );\n}\n\n/**\n * Dividers bring clarity to a layout by grouping and dividing content in close proximity.\n * They can also be used to establish rhythm and hierarchy.\n */\nlet _Divider = React.forwardRef(Divider);\nexport {_Divider as Divider};\n"],"names":["$parcel$interopDefault","a","__esModule","default","sizeMap","S","M","L","Divider","props","ref","useSlotProps","size","orientation","otherProps","domRef","useDOMRef","styleProps","useStyleProps","weight","Element","separatorProps","useSeparator","elementType","classNames","className","_Divider","React","forwardRef"],"version":3,"file":"module.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AEAA,GAA+B;AAC/B,GAAsC;AACtC,GAAuC;AACvC,GAAsC;AACtC,GAA2C;AAC3C,GAAyC;AALzC,yCAA+B,GAAG,CAAsB;AACxD,yCAAsC,GAAG,CAA6B;AACtE,yCAAuC,GAAG,CAA8B;AACxE,wCAAsC,GAAG,CAA6B;AACtE,yCAA2C,GAAG,CAAkC;AAChF,yCAAyC,GAAG,CAAgC;;;;ADc5E,GAAG,CAAC,6BAAO,GAAG,CAAC;IACb,CAAC,EAAE,CAAO;IACV,CAAC,EAAE,CAAQ;IACX,CAAC,EAAE,CAAO;AACZ,CAAC;SAEQ,6BAAO,CAAC,KAA2B,EAAE,GAAW,EAAE,CAAC;IAC1D,KAAK,GAAG,mBAAY,CAAC,KAAK,EAAE,CAAS;IACrC,GAAG,CAAC,CAAC,OACH,IAAI,GAAG,CAAG,kBACV,WAAW,GAAG,CAAY,iBACvB,UAAU,CACf,CAAC,GAAG,KAAK;IACT,GAAG,CAAC,MAAM,GAAG,gBAAS,CAAC,GAAG;IAC1B,GAAG,CAAC,CAAC,aAAA,UAAU,EAAA,CAAC,GAAG,oBAAa,CAAC,UAAU;IAC3C,GAAG,CAAC,MAAM,GAAG,6BAAO,CAAC,IAAI;IAEzB,GAAG,CAAC,OAAO,GAAG,CAAI;IAClB,EAAE,EAAE,WAAW,KAAK,CAAU,WAC5B,OAAO,GAAG,CAAK;IAGjB,GAAG,CAAC,CAAC,iBAAA,cAAc,EAAA,CAAC,GAAG,mBAAY,CAAC,CAAC;WAChC,KAAK;QACR,WAAW,EAAE,OAAO;IACtB,CAAC;IAED,MAAM,0CACH,OAAO;WACF,UAAU;QACd,SAAS,EACP,iBAAU,CACR,gEAAM,EACN,CAAe,iBACd,eAAe,EAAE,MAAM,IACxB,CAAC;YACC,CAAyB,0BAAE,WAAW,KAAK,CAAU;YACrD,CAA2B,4BAAE,WAAW,KAAK,CAAY;QAC3D,CAAC,EACD,UAAU,CAAC,SAAS;QAGxB,EAAkE,AAAlE,gEAAkE;QAClE,GAAG,EAAE,MAAM;WACP,cAAc;;AAExB,CAAC;AAED,EAGG,AAHH;;;CAGG,AAHH,EAGG,CACH,GAAG,CAAC,yCAAQ,iBAAG,YAAK,CAAC,UAAU,CAAC,6BAAO","sources":["packages/@react-spectrum/divider/src/index.ts","packages/@react-spectrum/divider/src/Divider.tsx","packages/@adobe/spectrum-css-temp/components/rule/vars.css"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport * from './Divider';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {classNames, useDOMRef, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport React from 'react';\nimport {SpectrumDividerProps} from '@react-types/divider';\nimport styles from '@adobe/spectrum-css-temp/components/rule/vars.css';\nimport {useSeparator} from '@react-aria/separator';\n\nlet sizeMap = {\n S: 'small',\n M: 'medium',\n L: 'large'\n};\n\nfunction Divider(props: SpectrumDividerProps, ref: DOMRef) {\n props = useSlotProps(props, 'divider');\n let {\n size = 'L',\n orientation = 'horizontal',\n ...otherProps\n } = props;\n let domRef = useDOMRef(ref);\n let {styleProps} = useStyleProps(otherProps);\n let weight = sizeMap[size];\n\n let Element = 'hr';\n if (orientation === 'vertical') {\n Element = 'div';\n }\n\n let {separatorProps} = useSeparator({\n ...props,\n elementType: Element\n });\n\n return (\n <Element\n {...styleProps}\n className={\n classNames(\n styles,\n 'spectrum-Rule',\n `spectrum-Rule--${weight}`,\n {\n 'spectrum-Rule--vertical': orientation === 'vertical',\n 'spectrum-Rule--horizontal': orientation === 'horizontal'\n },\n styleProps.className\n )\n }\n // @ts-ignore https://github.com/Microsoft/TypeScript/issues/28892\n ref={domRef}\n {...separatorProps} />\n );\n}\n\n/**\n * Dividers bring clarity to a layout by grouping and dividing content in close proximity.\n * They can also be used to establish rhythm and hierarchy.\n */\nlet _Divider = React.forwardRef(Divider);\nexport {_Divider as Divider};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"module.js.map"}
@@ -1 +1 @@
1
- {"mappings":"A;A;AAmEA;A;A;GAGG;AACH,OAAA,IAAI,4IAAoC,CAAC","sources":["./packages/@react-spectrum/divider/src/packages/@react-spectrum/divider/src/Divider.tsx","./packages/@react-spectrum/divider/src/packages/@react-spectrum/divider/src/index.ts"],"sourcesContent":[null,null],"names":[],"version":3,"file":"types.d.ts.map"}
1
+ {"mappings":";;AAmEA;;;GAGG;AACH,OAAA,IAAI,4IAAoC,CAAC","sources":["packages/@react-spectrum/divider/src/packages/@react-spectrum/divider/src/Divider.tsx","packages/@react-spectrum/divider/src/packages/@react-spectrum/divider/src/index.ts","packages/@react-spectrum/divider/src/index.ts"],"sourcesContent":[null,null,"/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport * from './Divider';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-spectrum/divider",
3
- "version": "3.1.0",
3
+ "version": "3.2.0",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -32,19 +32,19 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@babel/runtime": "^7.6.2",
35
- "@react-aria/separator": "^3.1.0",
36
- "@react-spectrum/utils": "^3.1.0",
37
- "@react-types/divider": "^3.1.0",
38
- "@react-types/shared": "^3.1.0"
35
+ "@react-aria/separator": "^3.1.4",
36
+ "@react-spectrum/utils": "^3.6.4",
37
+ "@react-types/divider": "^3.1.3",
38
+ "@react-types/shared": "^3.11.0"
39
39
  },
40
40
  "devDependencies": {
41
- "@adobe/spectrum-css-temp": "^3.0.0-alpha.1"
41
+ "@adobe/spectrum-css-temp": "3.0.0-alpha.1"
42
42
  },
43
43
  "peerDependencies": {
44
- "react": "^16.8.0"
44
+ "react": "^16.8.0 || ^17.0.0-rc.1"
45
45
  },
46
46
  "publishConfig": {
47
47
  "access": "public"
48
48
  },
49
- "gitHead": "211099972fe75ee581892efd01a7f89dfb9cdf69"
49
+ "gitHead": "54c2366c4f31bd4bf619126131cd583c12972acc"
50
50
  }
package/dist/main.css.map DELETED
@@ -1 +0,0 @@
1
- {"mappings":"AAcA,gCAUE,aAGF,CAbA,gEAWE,cAEF,CAbA,gCAWE,aAEF,CAbA,sBAEE,gBAAiB,CAGjB,WAAgD,CAAhD,gEAAgD,CAChD,iEAAiD,CAGjD,QAAW,CAGX,2BAAmB,CAAnB,0BAAmB,CAAnB,kBACF,CAEA,6BACE,iEACF,CAMA,2DACE,iEACF,CAGE,8DACE,0DACF,CAEA,+DACE,0DACF,CAEA,8DACE,0DACF,CAGF,gCACE,WAeF,CAXE,4DACE,yDACF,CAEA,6DACE,yDACF,CAEA,4DACE,yDACF,CC1DF,6BACE,sDACF,CAMA,2DACE,sDACF","sources":["./node_modules/@adobe/spectrum-css-temp/components/rule/index.css","./node_modules/@adobe/spectrum-css-temp/components/rule/skin.css"],"sourcesContent":["/*\nCopyright 2019 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\n@import '../commons/index.css';\n\n.spectrum-Rule {\n /* Show the overflow for hr in Edge and IE. */\n overflow: visible;\n\n border: none;\n border-width: var(--spectrum-rule-medium-height);\n border-radius: var(--spectrum-rule-medium-height);\n\n /* hr elements are given a default margin, reset it so that flex can work */\n margin: 0px;\n margin-inline-start: 0px;\n margin-inline-end: 0px;\n align-self: stretch;\n}\n\n.spectrum-Rule--large {\n border-radius: var(--spectrum-rule-large-border-radius);\n}\n\n.spectrum-Rule--medium {\n border-radius: var(--spectrum-rule-medium-border-radius);\n}\n\n.spectrum-Rule--small {\n border-radius: var(--spectrum-rule-small-border-radius);\n}\n\n.spectrum-Rule--horizontal {\n &.spectrum-Rule--large {\n block-size: var(--spectrum-rule-large-height);\n }\n\n &.spectrum-Rule--medium {\n block-size: var(--spectrum-rule-medium-height);\n }\n\n &.spectrum-Rule--small {\n block-size: var(--spectrum-rule-small-height);\n }\n}\n\n.spectrum-Rule--vertical {\n height: auto;\n /* expected usage, people need to set height 100% if they aren't using flex on the container\n * if they *ARE* using flex, then they need to either have align-items stretch OR align-self stretch\n */\n &.spectrum-Rule--large {\n inline-size: var(--spectrum-rule-large-height);\n }\n\n &.spectrum-Rule--medium {\n inline-size: var(--spectrum-rule-medium-height);\n }\n\n &.spectrum-Rule--small {\n inline-size: var(--spectrum-rule-small-height);\n }\n}\n","/*\nCopyright 2019 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\n.spectrum-Rule--large {\n background-color: var(--spectrum-rule-large-background-color);\n}\n\n.spectrum-Rule--medium {\n background-color: var(--spectrum-rule-medium-background-color);\n}\n\n.spectrum-Rule--small {\n background-color: var(--spectrum-rule-small-background-color);\n}\n"],"names":[],"version":3,"file":"main.css.map"}