@react-spectrum/divider 3.4.2 → 3.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.css CHANGED
@@ -1 +1 @@
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))}
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:none;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
@@ -11,7 +11,28 @@ function $parcel$interopDefault(a) {
11
11
  }
12
12
 
13
13
  $parcel$export(module.exports, "Divider", () => $a75f934b8a5939c6$export$2e0a83ec2e27ecbb);
14
-
14
+ /*
15
+ * Copyright 2020 Adobe. All rights reserved.
16
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
17
+ * you may not use this file except in compliance with the License. You may obtain a copy
18
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
19
+ *
20
+ * Unless required by applicable law or agreed to in writing, software distributed under
21
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
22
+ * OF ANY KIND, either express or implied. See the License for the specific language
23
+ * governing permissions and limitations under the License.
24
+ */ /// <reference types="css-module-types" />
25
+ /*
26
+ * Copyright 2020 Adobe. All rights reserved.
27
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
28
+ * you may not use this file except in compliance with the License. You may obtain a copy
29
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
30
+ *
31
+ * Unless required by applicable law or agreed to in writing, software distributed under
32
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
33
+ * OF ANY KIND, either express or implied. See the License for the specific language
34
+ * governing permissions and limitations under the License.
35
+ */
15
36
 
16
37
  var $7fdcb1fd1927dca1$exports = {};
17
38
 
@@ -37,37 +58,37 @@ $7fdcb1fd1927dca1$export$76f93463a8fc15a8 = "spectrum-Rule--vertical_612bb8";
37
58
 
38
59
 
39
60
  let $a75f934b8a5939c6$var$sizeMap = {
40
- S: 'small',
41
- M: 'medium',
42
- L: 'large'
61
+ S: "small",
62
+ M: "medium",
63
+ L: "large"
43
64
  };
44
65
  function $a75f934b8a5939c6$var$Divider(props, ref) {
45
- props = $7uVzT$reactspectrumutils.useSlotProps(props, 'divider');
46
- let { size: size = 'L' , orientation: orientation = 'horizontal' , ...otherProps } = props;
47
- let domRef = $7uVzT$reactspectrumutils.useDOMRef(ref);
48
- let { styleProps: styleProps } = $7uVzT$reactspectrumutils.useStyleProps(otherProps);
66
+ props = (0, $7uVzT$reactspectrumutils.useSlotProps)(props, "divider");
67
+ let { size: size = "L" , orientation: orientation = "horizontal" , ...otherProps } = props;
68
+ let domRef = (0, $7uVzT$reactspectrumutils.useDOMRef)(ref);
69
+ let { styleProps: styleProps } = (0, $7uVzT$reactspectrumutils.useStyleProps)(otherProps);
49
70
  let weight = $a75f934b8a5939c6$var$sizeMap[size];
50
- let Element = 'hr';
51
- if (orientation === 'vertical') Element = 'div';
52
- let { separatorProps: separatorProps } = $7uVzT$reactariaseparator.useSeparator({
71
+ let Element = "hr";
72
+ if (orientation === "vertical") Element = "div";
73
+ let { separatorProps: separatorProps } = (0, $7uVzT$reactariaseparator.useSeparator)({
53
74
  ...props,
54
75
  elementType: Element
55
76
  });
56
- return(/*#__PURE__*/ ($parcel$interopDefault($7uVzT$react)).createElement(Element, {
77
+ return /*#__PURE__*/ (0, ($parcel$interopDefault($7uVzT$react))).createElement(Element, {
57
78
  ...styleProps,
58
- className: $7uVzT$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($7fdcb1fd1927dca1$exports)), 'spectrum-Rule', `spectrum-Rule--${weight}`, {
59
- 'spectrum-Rule--vertical': orientation === 'vertical',
60
- 'spectrum-Rule--horizontal': orientation === 'horizontal'
79
+ className: (0, $7uVzT$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($7fdcb1fd1927dca1$exports))), "spectrum-Rule", `spectrum-Rule--${weight}`, {
80
+ "spectrum-Rule--vertical": orientation === "vertical",
81
+ "spectrum-Rule--horizontal": orientation === "horizontal"
61
82
  }, styleProps.className),
62
83
  // @ts-ignore https://github.com/Microsoft/TypeScript/issues/28892
63
84
  ref: domRef,
64
85
  ...separatorProps
65
- }));
86
+ });
66
87
  }
67
88
  /**
68
89
  * Dividers bring clarity to a layout by grouping and dividing content in close proximity.
69
90
  * They can also be used to establish rhythm and hierarchy.
70
- */ let $a75f934b8a5939c6$export$2e0a83ec2e27ecbb = /*#__PURE__*/ ($parcel$interopDefault($7uVzT$react)).forwardRef($a75f934b8a5939c6$var$Divider);
91
+ */ let $a75f934b8a5939c6$export$2e0a83ec2e27ecbb = /*#__PURE__*/ (0, ($parcel$interopDefault($7uVzT$react))).forwardRef($a75f934b8a5939c6$var$Divider);
71
92
 
72
93
 
73
94
 
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;AEAA,GAA+B;AAC/B,GAAsC;AACtC,GAAuC;AACvC,GAAsC;AACtC,GAA2C;AAC3C,GAAyC;AALzC,yCAA+B,GAAG,CAAsB;AACxD,yCAAsC,GAAG,CAA6B;AACtE,yCAAuC,GAAG,CAA8B;AACxE,wCAAsC,GAAG,CAA6B;AACtE,yCAA2C,GAAG,CAAkC;AAChF,yCAAyC,GAAG,CAAgC;;;;ADc5E,GAAG,CAAC,6BAAO,GAAG,CAAC;IACb,CAAC,EAAE,CAAO;IACV,CAAC,EAAE,CAAQ;IACX,CAAC,EAAE,CAAO;AACZ,CAAC;SAEQ,6BAAO,CAAC,KAA2B,EAAE,GAAW,EAAE,CAAC;IAC1D,KAAK,GAAG,sCAAY,CAAC,KAAK,EAAE,CAAS;IACrC,GAAG,CAAC,CAAC,OACH,IAAI,GAAG,CAAG,kBACV,WAAW,GAAG,CAAY,iBACvB,UAAU,CACf,CAAC,GAAG,KAAK;IACT,GAAG,CAAC,MAAM,GAAG,mCAAS,CAAC,GAAG;IAC1B,GAAG,CAAC,CAAC,aAAA,UAAU,EAAA,CAAC,GAAG,uCAAa,CAAC,UAAU;IAC3C,GAAG,CAAC,MAAM,GAAG,6BAAO,CAAC,IAAI;IAEzB,GAAG,CAAC,OAAO,GAAgB,CAAI;IAC/B,EAAE,EAAE,WAAW,KAAK,CAAU,WAC5B,OAAO,GAAG,CAAK;IAGjB,GAAG,CAAC,CAAC,iBAAA,cAAc,EAAA,CAAC,GAAG,sCAAY,CAAC,CAAC;WAChC,KAAK;QACR,WAAW,EAAE,OAAO;IACtB,CAAC;IAED,MAAM,oEACH,OAAO;WACF,UAAU;QACd,SAAS,EACP,oCAAU,CACR,gEAAM,EACN,CAAe,iBACd,eAAe,EAAE,MAAM,IACxB,CAAC;YACC,CAAyB,0BAAE,WAAW,KAAK,CAAU;YACrD,CAA2B,4BAAE,WAAW,KAAK,CAAY;QAC3D,CAAC,EACD,UAAU,CAAC,SAAS;QAGxB,EAAkE,AAAlE,gEAAkE;QAClE,GAAG,EAAE,MAAM;WACP,cAAc;;AAExB,CAAC;AAED,EAGG,AAHH;;;CAGG,AAHH,EAGG,CACH,GAAG,CAAC,yCAAQ,iBAAG,sCAAK,CAAC,UAAU,CAAC,6BAAO","sources":["packages/@react-spectrum/divider/src/index.ts","packages/@react-spectrum/divider/src/Divider.tsx","packages/@adobe/spectrum-css-temp/components/rule/vars.css"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport {Divider} from './Divider';\nexport type {SpectrumDividerProps} from '@react-types/divider';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {classNames, useDOMRef, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport React, {ElementType} from 'react';\nimport {SpectrumDividerProps} from '@react-types/divider';\nimport styles from '@adobe/spectrum-css-temp/components/rule/vars.css';\nimport {useSeparator} from '@react-aria/separator';\n\nlet sizeMap = {\n S: 'small',\n M: 'medium',\n L: 'large'\n};\n\nfunction Divider(props: SpectrumDividerProps, ref: DOMRef) {\n props = useSlotProps(props, 'divider');\n let {\n size = 'L',\n orientation = 'horizontal',\n ...otherProps\n } = props;\n let domRef = useDOMRef(ref);\n let {styleProps} = useStyleProps(otherProps);\n let weight = sizeMap[size];\n\n let Element: ElementType = 'hr';\n if (orientation === 'vertical') {\n Element = 'div';\n }\n\n let {separatorProps} = useSeparator({\n ...props,\n elementType: Element\n });\n\n return (\n <Element\n {...styleProps}\n className={\n classNames(\n styles,\n 'spectrum-Rule',\n `spectrum-Rule--${weight}`,\n {\n 'spectrum-Rule--vertical': orientation === 'vertical',\n 'spectrum-Rule--horizontal': orientation === 'horizontal'\n },\n styleProps.className\n )\n }\n // @ts-ignore https://github.com/Microsoft/TypeScript/issues/28892\n ref={domRef}\n {...separatorProps} />\n );\n}\n\n/**\n * Dividers bring clarity to a layout by grouping and dividing content in close proximity.\n * They can also be used to establish rhythm and hierarchy.\n */\nlet _Divider = React.forwardRef(Divider);\nexport {_Divider as Divider};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C;ACZ1C;;;;;;;;;;CAUC,GAED;;;;;;;;;;ACZA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AALA,4CAAkC;AAClC,4CAAyC;AACzC,4CAA0C;AAC1C,2CAAyC;AACzC,4CAA8C;AAC9C,4CAA4C;;;;ADc5C,IAAI,gCAAU;IACZ,GAAG;IACH,GAAG;IACH,GAAG;AACL;AAEA,SAAS,8BAAQ,KAA2B,EAAE,GAAW,EAAE;IACzD,QAAQ,CAAA,GAAA,sCAAY,AAAD,EAAE,OAAO;IAC5B,IAAI,QACF,OAAO,mBACP,cAAc,eACd,GAAG,YACJ,GAAG;IACJ,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IACvB,IAAI,cAAC,WAAU,EAAC,GAAG,CAAA,GAAA,uCAAa,AAAD,EAAE;IACjC,IAAI,SAAS,6BAAO,CAAC,KAAK;IAE1B,IAAI,UAAuB;IAC3B,IAAI,gBAAgB,YAClB,UAAU;IAGZ,IAAI,kBAAC,eAAc,EAAC,GAAG,CAAA,GAAA,sCAAY,AAAD,EAAE;QAClC,GAAG,KAAK;QACR,aAAa;IACf;IAEA,qBACE,0DAAC;QACE,GAAG,UAAU;QACd,WACE,CAAA,GAAA,oCAAU,AAAD,EACP,CAAA,GAAA,gEAAM,AAAD,GACL,iBACA,CAAC,eAAe,EAAE,OAAO,CAAC,EAC1B;YACE,2BAA2B,gBAAgB;YAC3C,6BAA6B,gBAAgB;QAC/C,GACA,WAAW,SAAS;QAGxB,kEAAkE;QAClE,KAAK;QACJ,GAAG,cAAc;;AAExB;AAEA;;;CAGC,GACD,IAAI,0DAAW,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC;;ADzDhC","sources":["packages/@react-spectrum/divider/src/index.ts","packages/@react-spectrum/divider/src/Divider.tsx","packages/@adobe/spectrum-css-temp/components/rule/vars.css"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport {Divider} from './Divider';\nexport type {SpectrumDividerProps} from '@react-types/divider';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {classNames, useDOMRef, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport React, {ElementType} from 'react';\nimport {SpectrumDividerProps} from '@react-types/divider';\nimport styles from '@adobe/spectrum-css-temp/components/rule/vars.css';\nimport {useSeparator} from '@react-aria/separator';\n\nlet sizeMap = {\n S: 'small',\n M: 'medium',\n L: 'large'\n};\n\nfunction Divider(props: SpectrumDividerProps, ref: DOMRef) {\n props = useSlotProps(props, 'divider');\n let {\n size = 'L',\n orientation = 'horizontal',\n ...otherProps\n } = props;\n let domRef = useDOMRef(ref);\n let {styleProps} = useStyleProps(otherProps);\n let weight = sizeMap[size];\n\n let Element: ElementType = 'hr';\n if (orientation === 'vertical') {\n Element = 'div';\n }\n\n let {separatorProps} = useSeparator({\n ...props,\n elementType: Element\n });\n\n return (\n <Element\n {...styleProps}\n className={\n classNames(\n styles,\n 'spectrum-Rule',\n `spectrum-Rule--${weight}`,\n {\n 'spectrum-Rule--vertical': orientation === 'vertical',\n 'spectrum-Rule--horizontal': orientation === 'horizontal'\n },\n styleProps.className\n )\n }\n // @ts-ignore https://github.com/Microsoft/TypeScript/issues/28892\n ref={domRef}\n {...separatorProps} />\n );\n}\n\n/**\n * Dividers bring clarity to a layout by grouping and dividing content in close proximity.\n * They can also be used to establish rhythm and hierarchy.\n */\nlet _Divider = React.forwardRef(Divider);\nexport {_Divider as Divider};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"main.js.map"}
package/dist/module.js CHANGED
@@ -9,7 +9,28 @@ function $parcel$interopDefault(a) {
9
9
  function $parcel$export(e, n, v, s) {
10
10
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
11
11
  }
12
-
12
+ /*
13
+ * Copyright 2020 Adobe. All rights reserved.
14
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
15
+ * you may not use this file except in compliance with the License. You may obtain a copy
16
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
17
+ *
18
+ * Unless required by applicable law or agreed to in writing, software distributed under
19
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
20
+ * OF ANY KIND, either express or implied. See the License for the specific language
21
+ * governing permissions and limitations under the License.
22
+ */ /// <reference types="css-module-types" />
23
+ /*
24
+ * Copyright 2020 Adobe. All rights reserved.
25
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
26
+ * you may not use this file except in compliance with the License. You may obtain a copy
27
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
28
+ *
29
+ * Unless required by applicable law or agreed to in writing, software distributed under
30
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
31
+ * OF ANY KIND, either express or implied. See the License for the specific language
32
+ * governing permissions and limitations under the License.
33
+ */
13
34
 
14
35
  var $7a9eac509b76fa30$exports = {};
15
36
 
@@ -35,37 +56,37 @@ $7a9eac509b76fa30$export$76f93463a8fc15a8 = "spectrum-Rule--vertical_612bb8";
35
56
 
36
57
 
37
58
  let $269e81ee206e9515$var$sizeMap = {
38
- S: 'small',
39
- M: 'medium',
40
- L: 'large'
59
+ S: "small",
60
+ M: "medium",
61
+ L: "large"
41
62
  };
42
63
  function $269e81ee206e9515$var$Divider(props, ref) {
43
- props = $aBEni$useSlotProps(props, 'divider');
44
- let { size: size = 'L' , orientation: orientation = 'horizontal' , ...otherProps } = props;
45
- let domRef = $aBEni$useDOMRef(ref);
46
- let { styleProps: styleProps } = $aBEni$useStyleProps(otherProps);
64
+ props = (0, $aBEni$useSlotProps)(props, "divider");
65
+ let { size: size = "L" , orientation: orientation = "horizontal" , ...otherProps } = props;
66
+ let domRef = (0, $aBEni$useDOMRef)(ref);
67
+ let { styleProps: styleProps } = (0, $aBEni$useStyleProps)(otherProps);
47
68
  let weight = $269e81ee206e9515$var$sizeMap[size];
48
- let Element = 'hr';
49
- if (orientation === 'vertical') Element = 'div';
50
- let { separatorProps: separatorProps } = $aBEni$useSeparator({
69
+ let Element = "hr";
70
+ if (orientation === "vertical") Element = "div";
71
+ let { separatorProps: separatorProps } = (0, $aBEni$useSeparator)({
51
72
  ...props,
52
73
  elementType: Element
53
74
  });
54
- return(/*#__PURE__*/ $aBEni$react.createElement(Element, {
75
+ return /*#__PURE__*/ (0, $aBEni$react).createElement(Element, {
55
76
  ...styleProps,
56
- className: $aBEni$classNames((/*@__PURE__*/$parcel$interopDefault($7a9eac509b76fa30$exports)), 'spectrum-Rule', `spectrum-Rule--${weight}`, {
57
- 'spectrum-Rule--vertical': orientation === 'vertical',
58
- 'spectrum-Rule--horizontal': orientation === 'horizontal'
77
+ className: (0, $aBEni$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($7a9eac509b76fa30$exports))), "spectrum-Rule", `spectrum-Rule--${weight}`, {
78
+ "spectrum-Rule--vertical": orientation === "vertical",
79
+ "spectrum-Rule--horizontal": orientation === "horizontal"
59
80
  }, styleProps.className),
60
81
  // @ts-ignore https://github.com/Microsoft/TypeScript/issues/28892
61
82
  ref: domRef,
62
83
  ...separatorProps
63
- }));
84
+ });
64
85
  }
65
86
  /**
66
87
  * Dividers bring clarity to a layout by grouping and dividing content in close proximity.
67
88
  * They can also be used to establish rhythm and hierarchy.
68
- */ let $269e81ee206e9515$export$2e0a83ec2e27ecbb = /*#__PURE__*/ $aBEni$react.forwardRef($269e81ee206e9515$var$Divider);
89
+ */ let $269e81ee206e9515$export$2e0a83ec2e27ecbb = /*#__PURE__*/ (0, $aBEni$react).forwardRef($269e81ee206e9515$var$Divider);
69
90
 
70
91
 
71
92
 
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;AEAA,GAA+B;AAC/B,GAAsC;AACtC,GAAuC;AACvC,GAAsC;AACtC,GAA2C;AAC3C,GAAyC;AALzC,yCAA+B,GAAG,CAAsB;AACxD,yCAAsC,GAAG,CAA6B;AACtE,yCAAuC,GAAG,CAA8B;AACxE,wCAAsC,GAAG,CAA6B;AACtE,yCAA2C,GAAG,CAAkC;AAChF,yCAAyC,GAAG,CAAgC;;;;ADc5E,GAAG,CAAC,6BAAO,GAAG,CAAC;IACb,CAAC,EAAE,CAAO;IACV,CAAC,EAAE,CAAQ;IACX,CAAC,EAAE,CAAO;AACZ,CAAC;SAEQ,6BAAO,CAAC,KAA2B,EAAE,GAAW,EAAE,CAAC;IAC1D,KAAK,GAAG,mBAAY,CAAC,KAAK,EAAE,CAAS;IACrC,GAAG,CAAC,CAAC,OACH,IAAI,GAAG,CAAG,kBACV,WAAW,GAAG,CAAY,iBACvB,UAAU,CACf,CAAC,GAAG,KAAK;IACT,GAAG,CAAC,MAAM,GAAG,gBAAS,CAAC,GAAG;IAC1B,GAAG,CAAC,CAAC,aAAA,UAAU,EAAA,CAAC,GAAG,oBAAa,CAAC,UAAU;IAC3C,GAAG,CAAC,MAAM,GAAG,6BAAO,CAAC,IAAI;IAEzB,GAAG,CAAC,OAAO,GAAgB,CAAI;IAC/B,EAAE,EAAE,WAAW,KAAK,CAAU,WAC5B,OAAO,GAAG,CAAK;IAGjB,GAAG,CAAC,CAAC,iBAAA,cAAc,EAAA,CAAC,GAAG,mBAAY,CAAC,CAAC;WAChC,KAAK;QACR,WAAW,EAAE,OAAO;IACtB,CAAC;IAED,MAAM,0CACH,OAAO;WACF,UAAU;QACd,SAAS,EACP,iBAAU,CACR,gEAAM,EACN,CAAe,iBACd,eAAe,EAAE,MAAM,IACxB,CAAC;YACC,CAAyB,0BAAE,WAAW,KAAK,CAAU;YACrD,CAA2B,4BAAE,WAAW,KAAK,CAAY;QAC3D,CAAC,EACD,UAAU,CAAC,SAAS;QAGxB,EAAkE,AAAlE,gEAAkE;QAClE,GAAG,EAAE,MAAM;WACP,cAAc;;AAExB,CAAC;AAED,EAGG,AAHH;;;CAGG,AAHH,EAGG,CACH,GAAG,CAAC,yCAAQ,iBAAG,YAAK,CAAC,UAAU,CAAC,6BAAO","sources":["packages/@react-spectrum/divider/src/index.ts","packages/@react-spectrum/divider/src/Divider.tsx","packages/@adobe/spectrum-css-temp/components/rule/vars.css"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport {Divider} from './Divider';\nexport type {SpectrumDividerProps} from '@react-types/divider';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {classNames, useDOMRef, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport React, {ElementType} from 'react';\nimport {SpectrumDividerProps} from '@react-types/divider';\nimport styles from '@adobe/spectrum-css-temp/components/rule/vars.css';\nimport {useSeparator} from '@react-aria/separator';\n\nlet sizeMap = {\n S: 'small',\n M: 'medium',\n L: 'large'\n};\n\nfunction Divider(props: SpectrumDividerProps, ref: DOMRef) {\n props = useSlotProps(props, 'divider');\n let {\n size = 'L',\n orientation = 'horizontal',\n ...otherProps\n } = props;\n let domRef = useDOMRef(ref);\n let {styleProps} = useStyleProps(otherProps);\n let weight = sizeMap[size];\n\n let Element: ElementType = 'hr';\n if (orientation === 'vertical') {\n Element = 'div';\n }\n\n let {separatorProps} = useSeparator({\n ...props,\n elementType: Element\n });\n\n return (\n <Element\n {...styleProps}\n className={\n classNames(\n styles,\n 'spectrum-Rule',\n `spectrum-Rule--${weight}`,\n {\n 'spectrum-Rule--vertical': orientation === 'vertical',\n 'spectrum-Rule--horizontal': orientation === 'horizontal'\n },\n styleProps.className\n )\n }\n // @ts-ignore https://github.com/Microsoft/TypeScript/issues/28892\n ref={domRef}\n {...separatorProps} />\n );\n}\n\n/**\n * Dividers bring clarity to a layout by grouping and dividing content in close proximity.\n * They can also be used to establish rhythm and hierarchy.\n */\nlet _Divider = React.forwardRef(Divider);\nexport {_Divider as Divider};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"module.js.map"}
1
+ {"mappings":";;;;;;;;;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C;ACZ1C;;;;;;;;;;CAUC,GAED;;;;;;;;;;ACZA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AALA,4CAAkC;AAClC,4CAAyC;AACzC,4CAA0C;AAC1C,2CAAyC;AACzC,4CAA8C;AAC9C,4CAA4C;;;;ADc5C,IAAI,gCAAU;IACZ,GAAG;IACH,GAAG;IACH,GAAG;AACL;AAEA,SAAS,8BAAQ,KAA2B,EAAE,GAAW,EAAE;IACzD,QAAQ,CAAA,GAAA,mBAAY,AAAD,EAAE,OAAO;IAC5B,IAAI,QACF,OAAO,mBACP,cAAc,eACd,GAAG,YACJ,GAAG;IACJ,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IACvB,IAAI,cAAC,WAAU,EAAC,GAAG,CAAA,GAAA,oBAAa,AAAD,EAAE;IACjC,IAAI,SAAS,6BAAO,CAAC,KAAK;IAE1B,IAAI,UAAuB;IAC3B,IAAI,gBAAgB,YAClB,UAAU;IAGZ,IAAI,kBAAC,eAAc,EAAC,GAAG,CAAA,GAAA,mBAAY,AAAD,EAAE;QAClC,GAAG,KAAK;QACR,aAAa;IACf;IAEA,qBACE,gCAAC;QACE,GAAG,UAAU;QACd,WACE,CAAA,GAAA,iBAAU,AAAD,EACP,CAAA,GAAA,gEAAM,AAAD,GACL,iBACA,CAAC,eAAe,EAAE,OAAO,CAAC,EAC1B;YACE,2BAA2B,gBAAgB;YAC3C,6BAA6B,gBAAgB;QAC/C,GACA,WAAW,SAAS;QAGxB,kEAAkE;QAClE,KAAK;QACJ,GAAG,cAAc;;AAExB;AAEA;;;CAGC,GACD,IAAI,0DAAW,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC;;ADzDhC","sources":["packages/@react-spectrum/divider/src/index.ts","packages/@react-spectrum/divider/src/Divider.tsx","packages/@adobe/spectrum-css-temp/components/rule/vars.css"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport {Divider} from './Divider';\nexport type {SpectrumDividerProps} from '@react-types/divider';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {classNames, useDOMRef, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport React, {ElementType} from 'react';\nimport {SpectrumDividerProps} from '@react-types/divider';\nimport styles from '@adobe/spectrum-css-temp/components/rule/vars.css';\nimport {useSeparator} from '@react-aria/separator';\n\nlet sizeMap = {\n S: 'small',\n M: 'medium',\n L: 'large'\n};\n\nfunction Divider(props: SpectrumDividerProps, ref: DOMRef) {\n props = useSlotProps(props, 'divider');\n let {\n size = 'L',\n orientation = 'horizontal',\n ...otherProps\n } = props;\n let domRef = useDOMRef(ref);\n let {styleProps} = useStyleProps(otherProps);\n let weight = sizeMap[size];\n\n let Element: ElementType = 'hr';\n if (orientation === 'vertical') {\n Element = 'div';\n }\n\n let {separatorProps} = useSeparator({\n ...props,\n elementType: Element\n });\n\n return (\n <Element\n {...styleProps}\n className={\n classNames(\n styles,\n 'spectrum-Rule',\n `spectrum-Rule--${weight}`,\n {\n 'spectrum-Rule--vertical': orientation === 'vertical',\n 'spectrum-Rule--horizontal': orientation === 'horizontal'\n },\n styleProps.className\n )\n }\n // @ts-ignore https://github.com/Microsoft/TypeScript/issues/28892\n ref={domRef}\n {...separatorProps} />\n );\n}\n\n/**\n * Dividers bring clarity to a layout by grouping and dividing content in close proximity.\n * They can also be used to establish rhythm and hierarchy.\n */\nlet _Divider = React.forwardRef(Divider);\nexport {_Divider as Divider};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"module.js.map"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-spectrum/divider",
3
- "version": "3.4.2",
3
+ "version": "3.4.4",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -31,11 +31,11 @@
31
31
  "url": "https://github.com/adobe/react-spectrum"
32
32
  },
33
33
  "dependencies": {
34
- "@babel/runtime": "^7.6.2",
35
- "@react-aria/separator": "^3.2.4",
36
- "@react-spectrum/utils": "^3.7.4",
37
- "@react-types/divider": "^3.2.4",
38
- "@react-types/shared": "^3.15.0"
34
+ "@react-aria/separator": "^3.2.6",
35
+ "@react-spectrum/utils": "^3.8.1",
36
+ "@react-types/divider": "^3.2.5",
37
+ "@react-types/shared": "^3.16.0",
38
+ "@swc/helpers": "^0.4.14"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@adobe/spectrum-css-temp": "3.0.0-alpha.1"
@@ -46,5 +46,5 @@
46
46
  "publishConfig": {
47
47
  "access": "public"
48
48
  },
49
- "gitHead": "9202ef59e8c104dd06ffe33148445ef7932a5d1b"
49
+ "gitHead": "5480d76bd815e239366f92852c76b6831ad2a4fd"
50
50
  }