@react-spectrum/listbox 3.12.8-nightly.4552 → 3.12.8-nightly.4558

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.
Files changed (79) hide show
  1. package/dist/ListBox.main.js +48 -0
  2. package/dist/ListBox.main.js.map +1 -0
  3. package/dist/ListBox.mjs +39 -0
  4. package/dist/ListBox.module.js +39 -0
  5. package/dist/ListBox.module.js.map +1 -0
  6. package/dist/ListBoxBase.main.js +168 -0
  7. package/dist/ListBoxBase.main.js.map +1 -0
  8. package/dist/ListBoxBase.mjs +162 -0
  9. package/dist/ListBoxBase.module.js +162 -0
  10. package/dist/ListBoxBase.module.js.map +1 -0
  11. package/dist/ListBoxContext.main.js +27 -0
  12. package/dist/ListBoxContext.main.js.map +1 -0
  13. package/dist/ListBoxContext.mjs +18 -0
  14. package/dist/ListBoxContext.module.js +18 -0
  15. package/dist/ListBoxContext.module.js.map +1 -0
  16. package/dist/ListBoxOption.main.js +108 -0
  17. package/dist/ListBoxOption.main.js.map +1 -0
  18. package/dist/ListBoxOption.mjs +103 -0
  19. package/dist/ListBoxOption.module.js +103 -0
  20. package/dist/ListBoxOption.module.js.map +1 -0
  21. package/dist/ListBoxSection.main.js +69 -0
  22. package/dist/ListBoxSection.main.js.map +1 -0
  23. package/dist/ListBoxSection.mjs +64 -0
  24. package/dist/ListBoxSection.module.js +64 -0
  25. package/dist/ListBoxSection.module.js.map +1 -0
  26. package/dist/ar-AE.mjs +1 -1
  27. package/dist/bg-BG.mjs +1 -1
  28. package/dist/cs-CZ.mjs +1 -1
  29. package/dist/da-DK.mjs +1 -1
  30. package/dist/de-DE.mjs +1 -1
  31. package/dist/el-GR.mjs +1 -1
  32. package/dist/en-US.mjs +1 -1
  33. package/dist/es-ES.mjs +1 -1
  34. package/dist/et-EE.mjs +1 -1
  35. package/dist/fi-FI.mjs +1 -1
  36. package/dist/fr-FR.mjs +1 -1
  37. package/dist/he-IL.mjs +1 -1
  38. package/dist/hr-HR.mjs +1 -1
  39. package/dist/hu-HU.mjs +1 -1
  40. package/dist/import.mjs +2 -615
  41. package/dist/intlStrings.main.js +108 -0
  42. package/dist/intlStrings.main.js.map +1 -0
  43. package/dist/intlStrings.mjs +110 -0
  44. package/dist/intlStrings.module.js +110 -0
  45. package/dist/intlStrings.module.js.map +1 -0
  46. package/dist/it-IT.mjs +1 -1
  47. package/dist/ja-JP.mjs +1 -1
  48. package/dist/ko-KR.mjs +1 -1
  49. package/dist/lt-LT.mjs +1 -1
  50. package/dist/lv-LV.mjs +1 -1
  51. package/dist/main.js +5 -614
  52. package/dist/main.js.map +1 -1
  53. package/dist/menu_vars_css.main.js +177 -0
  54. package/dist/menu_vars_css.main.js.map +1 -0
  55. package/dist/menu_vars_css.mjs +179 -0
  56. package/dist/menu_vars_css.module.js +179 -0
  57. package/dist/menu_vars_css.module.js.map +1 -0
  58. package/dist/module.js +2 -615
  59. package/dist/module.js.map +1 -1
  60. package/dist/nb-NO.mjs +1 -1
  61. package/dist/nl-NL.mjs +1 -1
  62. package/dist/pl-PL.mjs +1 -1
  63. package/dist/pt-BR.mjs +1 -1
  64. package/dist/pt-PT.mjs +1 -1
  65. package/dist/ro-RO.mjs +1 -1
  66. package/dist/ru-RU.mjs +1 -1
  67. package/dist/sk-SK.mjs +1 -1
  68. package/dist/sl-SI.mjs +1 -1
  69. package/dist/sr-SP.mjs +1 -1
  70. package/dist/sv-SE.mjs +1 -1
  71. package/dist/tr-TR.mjs +1 -1
  72. package/dist/uk-UA.mjs +1 -1
  73. package/dist/{main.css → vars.5bf8960a.css} +1 -1
  74. package/dist/{main.css.map → vars.5bf8960a.css.map} +1 -1
  75. package/dist/zh-CN.mjs +1 -1
  76. package/dist/zh-TW.mjs +1 -1
  77. package/package.json +20 -20
  78. package/dist/module.css +0 -563
  79. package/dist/module.css.map +0 -1
@@ -0,0 +1,69 @@
1
+ var $611e93c7b7c0413c$exports = require("./ListBoxContext.main.js");
2
+ require("./vars.5bf8960a.css");
3
+ var $3deee0fd2b46e64f$exports = require("./menu_vars_css.main.js");
4
+ var $cCu2p$reactspectrumutils = require("@react-spectrum/utils");
5
+ var $cCu2p$reactariavirtualizer = require("@react-aria/virtualizer");
6
+ var $cCu2p$react = require("react");
7
+ var $cCu2p$reactarialistbox = require("@react-aria/listbox");
8
+ var $cCu2p$reactariai18n = require("@react-aria/i18n");
9
+
10
+
11
+ function $parcel$interopDefault(a) {
12
+ return a && a.__esModule ? a.default : a;
13
+ }
14
+
15
+ function $parcel$export(e, n, v, s) {
16
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
17
+ }
18
+
19
+ $parcel$export(module.exports, "ListBoxSection", () => $0f5fd8483f48ef09$export$dca12b0bb56e4fc);
20
+ /*
21
+ * Copyright 2020 Adobe. All rights reserved.
22
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
23
+ * you may not use this file except in compliance with the License. You may obtain a copy
24
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
25
+ *
26
+ * Unless required by applicable law or agreed to in writing, software distributed under
27
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
28
+ * OF ANY KIND, either express or implied. See the License for the specific language
29
+ * governing permissions and limitations under the License.
30
+ */
31
+
32
+
33
+
34
+
35
+
36
+
37
+ function $0f5fd8483f48ef09$export$dca12b0bb56e4fc(props) {
38
+ let { children: children, layoutInfo: layoutInfo, headerLayoutInfo: headerLayoutInfo, virtualizer: virtualizer, item: item } = props;
39
+ let { headingProps: headingProps, groupProps: groupProps } = (0, $cCu2p$reactarialistbox.useListBoxSection)({
40
+ heading: item.rendered,
41
+ "aria-label": item["aria-label"]
42
+ });
43
+ let headerRef = (0, $cCu2p$react.useRef)();
44
+ (0, $cCu2p$reactariavirtualizer.useVirtualizerItem)({
45
+ layoutInfo: headerLayoutInfo,
46
+ virtualizer: virtualizer,
47
+ ref: headerRef
48
+ });
49
+ let { direction: direction } = (0, $cCu2p$reactariai18n.useLocale)();
50
+ let state = (0, $cCu2p$react.useContext)((0, $611e93c7b7c0413c$exports.ListBoxContext));
51
+ return /*#__PURE__*/ (0, ($parcel$interopDefault($cCu2p$react))).createElement((0, $cCu2p$react.Fragment), null, /*#__PURE__*/ (0, ($parcel$interopDefault($cCu2p$react))).createElement("div", {
52
+ role: "presentation",
53
+ ref: headerRef,
54
+ style: (0, $cCu2p$reactariavirtualizer.layoutInfoToStyle)(headerLayoutInfo, direction)
55
+ }, item.key !== state.collection.getFirstKey() && /*#__PURE__*/ (0, ($parcel$interopDefault($cCu2p$react))).createElement("div", {
56
+ role: "presentation",
57
+ className: (0, $cCu2p$reactspectrumutils.classNames)((0, ($parcel$interopDefault($3deee0fd2b46e64f$exports))), "spectrum-Menu-divider")
58
+ }), item.rendered && /*#__PURE__*/ (0, ($parcel$interopDefault($cCu2p$react))).createElement("div", {
59
+ ...headingProps,
60
+ className: (0, $cCu2p$reactspectrumutils.classNames)((0, ($parcel$interopDefault($3deee0fd2b46e64f$exports))), "spectrum-Menu-sectionHeading")
61
+ }, item.rendered)), /*#__PURE__*/ (0, ($parcel$interopDefault($cCu2p$react))).createElement("div", {
62
+ ...groupProps,
63
+ style: (0, $cCu2p$reactariavirtualizer.layoutInfoToStyle)(layoutInfo, direction),
64
+ className: (0, $cCu2p$reactspectrumutils.classNames)((0, ($parcel$interopDefault($3deee0fd2b46e64f$exports))), "spectrum-Menu")
65
+ }, children));
66
+ }
67
+
68
+
69
+ //# sourceMappingURL=ListBoxSection.main.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AAmBM,SAAS,yCAAkB,KAA6B;IAC7D,IAAI,YAAC,QAAQ,cAAE,UAAU,oBAAE,gBAAgB,eAAE,WAAW,QAAE,IAAI,EAAC,GAAG;IAClE,IAAI,gBAAC,YAAY,cAAE,UAAU,EAAC,GAAG,CAAA,GAAA,yCAAgB,EAAE;QACjD,SAAS,KAAK,QAAQ;QACtB,cAAc,IAAI,CAAC,aAAa;IAClC;IAEA,IAAI,YAAY,CAAA,GAAA,mBAAK;IACrB,CAAA,GAAA,8CAAiB,EAAE;QACjB,YAAY;qBACZ;QACA,KAAK;IACP;IAEA,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,8BAAQ;IAC1B,IAAI,QAAQ,CAAA,GAAA,uBAAS,EAAE,CAAA,GAAA,wCAAa;IAEpC,qBACE,0DAAC,CAAA,GAAA,qBAAO,uBACN,0DAAC;QAAI,MAAK;QAAe,KAAK;QAAW,OAAO,CAAA,GAAA,6CAAgB,EAAE,kBAAkB;OACjF,KAAK,GAAG,KAAK,MAAM,UAAU,CAAC,WAAW,oBACxC,0DAAC;QACC,MAAK;QACL,WAAW,CAAA,GAAA,oCAAS,EAClB,CAAA,GAAA,mDAAK,GACL;QAGL,KAAK,QAAQ,kBACZ,0DAAC;QACE,GAAG,YAAY;QAChB,WACE,CAAA,GAAA,oCAAS,EACP,CAAA,GAAA,mDAAK,GACL;OAGH,KAAK,QAAQ,kBAIpB,0DAAC;QACE,GAAG,UAAU;QACd,OAAO,CAAA,GAAA,6CAAgB,EAAE,YAAY;QACrC,WACE,CAAA,GAAA,oCAAS,EACP,CAAA,GAAA,mDAAK,GACL;OAGH;AAIT","sources":["packages/@react-spectrum/listbox/src/ListBoxSection.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 {classNames} from '@react-spectrum/utils';\nimport {LayoutInfo} from '@react-stately/virtualizer';\nimport {layoutInfoToStyle, useVirtualizerItem, VirtualizerItemOptions} from '@react-aria/virtualizer';\nimport {ListBoxContext} from './ListBoxContext';\nimport {Node} from '@react-types/shared';\nimport React, {Fragment, ReactNode, useContext, useRef} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/menu/vars.css';\nimport {useListBoxSection} from '@react-aria/listbox';\nimport {useLocale} from '@react-aria/i18n';\n\ninterface ListBoxSectionProps<T> extends Omit<VirtualizerItemOptions, 'ref'> {\n headerLayoutInfo: LayoutInfo,\n item: Node<T>,\n children?: ReactNode\n}\n\n/** @private */\nexport function ListBoxSection<T>(props: ListBoxSectionProps<T>) {\n let {children, layoutInfo, headerLayoutInfo, virtualizer, item} = props;\n let {headingProps, groupProps} = useListBoxSection({\n heading: item.rendered,\n 'aria-label': item['aria-label']\n });\n\n let headerRef = useRef();\n useVirtualizerItem({\n layoutInfo: headerLayoutInfo,\n virtualizer,\n ref: headerRef\n });\n\n let {direction} = useLocale();\n let state = useContext(ListBoxContext);\n\n return (\n <Fragment>\n <div role=\"presentation\" ref={headerRef} style={layoutInfoToStyle(headerLayoutInfo, direction)}>\n {item.key !== state.collection.getFirstKey() &&\n <div\n role=\"presentation\"\n className={classNames(\n styles,\n 'spectrum-Menu-divider'\n )} />\n }\n {item.rendered &&\n <div\n {...headingProps}\n className={\n classNames(\n styles,\n 'spectrum-Menu-sectionHeading'\n )\n }>\n {item.rendered}\n </div>\n }\n </div>\n <div\n {...groupProps}\n style={layoutInfoToStyle(layoutInfo, direction)}\n className={\n classNames(\n styles,\n 'spectrum-Menu'\n )\n }>\n {children}\n </div>\n </Fragment>\n );\n}\n"],"names":[],"version":3,"file":"ListBoxSection.main.js.map"}
@@ -0,0 +1,64 @@
1
+ import {ListBoxContext as $0c6f792811e33483$export$7ff8f37d2d81a48d} from "./ListBoxContext.mjs";
2
+ import "./vars.5bf8960a.css";
3
+ import $dzUX8$menu_vars_cssmodulejs from "./menu_vars_css.mjs";
4
+ import {classNames as $dzUX8$classNames} from "@react-spectrum/utils";
5
+ import {useVirtualizerItem as $dzUX8$useVirtualizerItem, layoutInfoToStyle as $dzUX8$layoutInfoToStyle} from "@react-aria/virtualizer";
6
+ import $dzUX8$react, {useRef as $dzUX8$useRef, useContext as $dzUX8$useContext, Fragment as $dzUX8$Fragment} from "react";
7
+ import {useListBoxSection as $dzUX8$useListBoxSection} from "@react-aria/listbox";
8
+ import {useLocale as $dzUX8$useLocale} from "@react-aria/i18n";
9
+
10
+
11
+ function $parcel$interopDefault(a) {
12
+ return a && a.__esModule ? a.default : a;
13
+ }
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
+ */
25
+
26
+
27
+
28
+
29
+
30
+
31
+ function $92d678ed88836094$export$dca12b0bb56e4fc(props) {
32
+ let { children: children, layoutInfo: layoutInfo, headerLayoutInfo: headerLayoutInfo, virtualizer: virtualizer, item: item } = props;
33
+ let { headingProps: headingProps, groupProps: groupProps } = (0, $dzUX8$useListBoxSection)({
34
+ heading: item.rendered,
35
+ "aria-label": item["aria-label"]
36
+ });
37
+ let headerRef = (0, $dzUX8$useRef)();
38
+ (0, $dzUX8$useVirtualizerItem)({
39
+ layoutInfo: headerLayoutInfo,
40
+ virtualizer: virtualizer,
41
+ ref: headerRef
42
+ });
43
+ let { direction: direction } = (0, $dzUX8$useLocale)();
44
+ let state = (0, $dzUX8$useContext)((0, $0c6f792811e33483$export$7ff8f37d2d81a48d));
45
+ return /*#__PURE__*/ (0, $dzUX8$react).createElement((0, $dzUX8$Fragment), null, /*#__PURE__*/ (0, $dzUX8$react).createElement("div", {
46
+ role: "presentation",
47
+ ref: headerRef,
48
+ style: (0, $dzUX8$layoutInfoToStyle)(headerLayoutInfo, direction)
49
+ }, item.key !== state.collection.getFirstKey() && /*#__PURE__*/ (0, $dzUX8$react).createElement("div", {
50
+ role: "presentation",
51
+ className: (0, $dzUX8$classNames)((0, ($parcel$interopDefault($dzUX8$menu_vars_cssmodulejs))), "spectrum-Menu-divider")
52
+ }), item.rendered && /*#__PURE__*/ (0, $dzUX8$react).createElement("div", {
53
+ ...headingProps,
54
+ className: (0, $dzUX8$classNames)((0, ($parcel$interopDefault($dzUX8$menu_vars_cssmodulejs))), "spectrum-Menu-sectionHeading")
55
+ }, item.rendered)), /*#__PURE__*/ (0, $dzUX8$react).createElement("div", {
56
+ ...groupProps,
57
+ style: (0, $dzUX8$layoutInfoToStyle)(layoutInfo, direction),
58
+ className: (0, $dzUX8$classNames)((0, ($parcel$interopDefault($dzUX8$menu_vars_cssmodulejs))), "spectrum-Menu")
59
+ }, children));
60
+ }
61
+
62
+
63
+ export {$92d678ed88836094$export$dca12b0bb56e4fc as ListBoxSection};
64
+ //# sourceMappingURL=ListBoxSection.mjs.map
@@ -0,0 +1,64 @@
1
+ import {ListBoxContext as $0c6f792811e33483$export$7ff8f37d2d81a48d} from "./ListBoxContext.module.js";
2
+ import "./vars.5bf8960a.css";
3
+ import $dzUX8$menu_vars_cssmodulejs from "./menu_vars_css.module.js";
4
+ import {classNames as $dzUX8$classNames} from "@react-spectrum/utils";
5
+ import {useVirtualizerItem as $dzUX8$useVirtualizerItem, layoutInfoToStyle as $dzUX8$layoutInfoToStyle} from "@react-aria/virtualizer";
6
+ import $dzUX8$react, {useRef as $dzUX8$useRef, useContext as $dzUX8$useContext, Fragment as $dzUX8$Fragment} from "react";
7
+ import {useListBoxSection as $dzUX8$useListBoxSection} from "@react-aria/listbox";
8
+ import {useLocale as $dzUX8$useLocale} from "@react-aria/i18n";
9
+
10
+
11
+ function $parcel$interopDefault(a) {
12
+ return a && a.__esModule ? a.default : a;
13
+ }
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
+ */
25
+
26
+
27
+
28
+
29
+
30
+
31
+ function $92d678ed88836094$export$dca12b0bb56e4fc(props) {
32
+ let { children: children, layoutInfo: layoutInfo, headerLayoutInfo: headerLayoutInfo, virtualizer: virtualizer, item: item } = props;
33
+ let { headingProps: headingProps, groupProps: groupProps } = (0, $dzUX8$useListBoxSection)({
34
+ heading: item.rendered,
35
+ "aria-label": item["aria-label"]
36
+ });
37
+ let headerRef = (0, $dzUX8$useRef)();
38
+ (0, $dzUX8$useVirtualizerItem)({
39
+ layoutInfo: headerLayoutInfo,
40
+ virtualizer: virtualizer,
41
+ ref: headerRef
42
+ });
43
+ let { direction: direction } = (0, $dzUX8$useLocale)();
44
+ let state = (0, $dzUX8$useContext)((0, $0c6f792811e33483$export$7ff8f37d2d81a48d));
45
+ return /*#__PURE__*/ (0, $dzUX8$react).createElement((0, $dzUX8$Fragment), null, /*#__PURE__*/ (0, $dzUX8$react).createElement("div", {
46
+ role: "presentation",
47
+ ref: headerRef,
48
+ style: (0, $dzUX8$layoutInfoToStyle)(headerLayoutInfo, direction)
49
+ }, item.key !== state.collection.getFirstKey() && /*#__PURE__*/ (0, $dzUX8$react).createElement("div", {
50
+ role: "presentation",
51
+ className: (0, $dzUX8$classNames)((0, ($parcel$interopDefault($dzUX8$menu_vars_cssmodulejs))), "spectrum-Menu-divider")
52
+ }), item.rendered && /*#__PURE__*/ (0, $dzUX8$react).createElement("div", {
53
+ ...headingProps,
54
+ className: (0, $dzUX8$classNames)((0, ($parcel$interopDefault($dzUX8$menu_vars_cssmodulejs))), "spectrum-Menu-sectionHeading")
55
+ }, item.rendered)), /*#__PURE__*/ (0, $dzUX8$react).createElement("div", {
56
+ ...groupProps,
57
+ style: (0, $dzUX8$layoutInfoToStyle)(layoutInfo, direction),
58
+ className: (0, $dzUX8$classNames)((0, ($parcel$interopDefault($dzUX8$menu_vars_cssmodulejs))), "spectrum-Menu")
59
+ }, children));
60
+ }
61
+
62
+
63
+ export {$92d678ed88836094$export$dca12b0bb56e4fc as ListBoxSection};
64
+ //# sourceMappingURL=ListBoxSection.module.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AAmBM,SAAS,yCAAkB,KAA6B;IAC7D,IAAI,YAAC,QAAQ,cAAE,UAAU,oBAAE,gBAAgB,eAAE,WAAW,QAAE,IAAI,EAAC,GAAG;IAClE,IAAI,gBAAC,YAAY,cAAE,UAAU,EAAC,GAAG,CAAA,GAAA,wBAAgB,EAAE;QACjD,SAAS,KAAK,QAAQ;QACtB,cAAc,IAAI,CAAC,aAAa;IAClC;IAEA,IAAI,YAAY,CAAA,GAAA,aAAK;IACrB,CAAA,GAAA,yBAAiB,EAAE;QACjB,YAAY;qBACZ;QACA,KAAK;IACP;IAEA,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,gBAAQ;IAC1B,IAAI,QAAQ,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,yCAAa;IAEpC,qBACE,gCAAC,CAAA,GAAA,eAAO,uBACN,gCAAC;QAAI,MAAK;QAAe,KAAK;QAAW,OAAO,CAAA,GAAA,wBAAgB,EAAE,kBAAkB;OACjF,KAAK,GAAG,KAAK,MAAM,UAAU,CAAC,WAAW,oBACxC,gCAAC;QACC,MAAK;QACL,WAAW,CAAA,GAAA,iBAAS,EAClB,CAAA,GAAA,sDAAK,GACL;QAGL,KAAK,QAAQ,kBACZ,gCAAC;QACE,GAAG,YAAY;QAChB,WACE,CAAA,GAAA,iBAAS,EACP,CAAA,GAAA,sDAAK,GACL;OAGH,KAAK,QAAQ,kBAIpB,gCAAC;QACE,GAAG,UAAU;QACd,OAAO,CAAA,GAAA,wBAAgB,EAAE,YAAY;QACrC,WACE,CAAA,GAAA,iBAAS,EACP,CAAA,GAAA,sDAAK,GACL;OAGH;AAIT","sources":["packages/@react-spectrum/listbox/src/ListBoxSection.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 {classNames} from '@react-spectrum/utils';\nimport {LayoutInfo} from '@react-stately/virtualizer';\nimport {layoutInfoToStyle, useVirtualizerItem, VirtualizerItemOptions} from '@react-aria/virtualizer';\nimport {ListBoxContext} from './ListBoxContext';\nimport {Node} from '@react-types/shared';\nimport React, {Fragment, ReactNode, useContext, useRef} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/menu/vars.css';\nimport {useListBoxSection} from '@react-aria/listbox';\nimport {useLocale} from '@react-aria/i18n';\n\ninterface ListBoxSectionProps<T> extends Omit<VirtualizerItemOptions, 'ref'> {\n headerLayoutInfo: LayoutInfo,\n item: Node<T>,\n children?: ReactNode\n}\n\n/** @private */\nexport function ListBoxSection<T>(props: ListBoxSectionProps<T>) {\n let {children, layoutInfo, headerLayoutInfo, virtualizer, item} = props;\n let {headingProps, groupProps} = useListBoxSection({\n heading: item.rendered,\n 'aria-label': item['aria-label']\n });\n\n let headerRef = useRef();\n useVirtualizerItem({\n layoutInfo: headerLayoutInfo,\n virtualizer,\n ref: headerRef\n });\n\n let {direction} = useLocale();\n let state = useContext(ListBoxContext);\n\n return (\n <Fragment>\n <div role=\"presentation\" ref={headerRef} style={layoutInfoToStyle(headerLayoutInfo, direction)}>\n {item.key !== state.collection.getFirstKey() &&\n <div\n role=\"presentation\"\n className={classNames(\n styles,\n 'spectrum-Menu-divider'\n )} />\n }\n {item.rendered &&\n <div\n {...headingProps}\n className={\n classNames(\n styles,\n 'spectrum-Menu-sectionHeading'\n )\n }>\n {item.rendered}\n </div>\n }\n </div>\n <div\n {...groupProps}\n style={layoutInfoToStyle(layoutInfo, direction)}\n className={\n classNames(\n styles,\n 'spectrum-Menu'\n )\n }>\n {children}\n </div>\n </Fragment>\n );\n}\n"],"names":[],"version":3,"file":"ListBoxSection.module.js.map"}
package/dist/ar-AE.mjs CHANGED
@@ -6,4 +6,4 @@ $067dbd0c037ad155$exports = {
6
6
 
7
7
 
8
8
  export {$067dbd0c037ad155$exports as default};
9
- //# sourceMappingURL=ar-AE.module.js.map
9
+ //# sourceMappingURL=ar-AE.mjs.map
package/dist/bg-BG.mjs CHANGED
@@ -6,4 +6,4 @@ $6ee4da2747de1e02$exports = {
6
6
 
7
7
 
8
8
  export {$6ee4da2747de1e02$exports as default};
9
- //# sourceMappingURL=bg-BG.module.js.map
9
+ //# sourceMappingURL=bg-BG.mjs.map
package/dist/cs-CZ.mjs CHANGED
@@ -6,4 +6,4 @@ $b58a7d965b7aa1b3$exports = {
6
6
 
7
7
 
8
8
  export {$b58a7d965b7aa1b3$exports as default};
9
- //# sourceMappingURL=cs-CZ.module.js.map
9
+ //# sourceMappingURL=cs-CZ.mjs.map
package/dist/da-DK.mjs CHANGED
@@ -6,4 +6,4 @@ $ecaca51f024191b0$exports = {
6
6
 
7
7
 
8
8
  export {$ecaca51f024191b0$exports as default};
9
- //# sourceMappingURL=da-DK.module.js.map
9
+ //# sourceMappingURL=da-DK.mjs.map
package/dist/de-DE.mjs CHANGED
@@ -6,4 +6,4 @@ $6e434aa373f128b4$exports = {
6
6
 
7
7
 
8
8
  export {$6e434aa373f128b4$exports as default};
9
- //# sourceMappingURL=de-DE.module.js.map
9
+ //# sourceMappingURL=de-DE.mjs.map
package/dist/el-GR.mjs CHANGED
@@ -6,4 +6,4 @@ $ddbe45fb199df913$exports = {
6
6
 
7
7
 
8
8
  export {$ddbe45fb199df913$exports as default};
9
- //# sourceMappingURL=el-GR.module.js.map
9
+ //# sourceMappingURL=el-GR.mjs.map
package/dist/en-US.mjs CHANGED
@@ -6,4 +6,4 @@ $2083b83b84266bb4$exports = {
6
6
 
7
7
 
8
8
  export {$2083b83b84266bb4$exports as default};
9
- //# sourceMappingURL=en-US.module.js.map
9
+ //# sourceMappingURL=en-US.mjs.map
package/dist/es-ES.mjs CHANGED
@@ -6,4 +6,4 @@ $a41434a97f5222d7$exports = {
6
6
 
7
7
 
8
8
  export {$a41434a97f5222d7$exports as default};
9
- //# sourceMappingURL=es-ES.module.js.map
9
+ //# sourceMappingURL=es-ES.mjs.map
package/dist/et-EE.mjs CHANGED
@@ -6,4 +6,4 @@ $0a1b42c97638052f$exports = {
6
6
 
7
7
 
8
8
  export {$0a1b42c97638052f$exports as default};
9
- //# sourceMappingURL=et-EE.module.js.map
9
+ //# sourceMappingURL=et-EE.mjs.map
package/dist/fi-FI.mjs CHANGED
@@ -6,4 +6,4 @@ $177331a39d162ddc$exports = {
6
6
 
7
7
 
8
8
  export {$177331a39d162ddc$exports as default};
9
- //# sourceMappingURL=fi-FI.module.js.map
9
+ //# sourceMappingURL=fi-FI.mjs.map
package/dist/fr-FR.mjs CHANGED
@@ -6,4 +6,4 @@ $273b1d5ecf07fe52$exports = {
6
6
 
7
7
 
8
8
  export {$273b1d5ecf07fe52$exports as default};
9
- //# sourceMappingURL=fr-FR.module.js.map
9
+ //# sourceMappingURL=fr-FR.mjs.map
package/dist/he-IL.mjs CHANGED
@@ -6,4 +6,4 @@ $459441d19cfa90a8$exports = {
6
6
 
7
7
 
8
8
  export {$459441d19cfa90a8$exports as default};
9
- //# sourceMappingURL=he-IL.module.js.map
9
+ //# sourceMappingURL=he-IL.mjs.map
package/dist/hr-HR.mjs CHANGED
@@ -6,4 +6,4 @@ $c30474fbd65b2878$exports = {
6
6
 
7
7
 
8
8
  export {$c30474fbd65b2878$exports as default};
9
- //# sourceMappingURL=hr-HR.module.js.map
9
+ //# sourceMappingURL=hr-HR.mjs.map
package/dist/hu-HU.mjs CHANGED
@@ -6,4 +6,4 @@ $fd19cc1d41a750e5$exports = {
6
6
 
7
7
 
8
8
  export {$fd19cc1d41a750e5$exports as default};
9
- //# sourceMappingURL=hu-HU.module.js.map
9
+ //# sourceMappingURL=hu-HU.mjs.map