@midas-ds/components 14.1.0 → 15.0.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.
Files changed (187) hide show
  1. package/{AccordionItem-CAi-XFOc.js → AccordionItem-DTbu3lqx.js} +2 -2
  2. package/{Button-CGe3Nyos.js → Button-BbfVT9Yl.js} +2 -2
  3. package/{Button-CF97piBl.js → Button-DdXFHfXw.js} +1 -1
  4. package/CHANGELOG.md +23 -0
  5. package/{Card-DJ8E5Rzd.js → Card-CdqGFff2.js} +1 -1
  6. package/{CheckboxGroup-B1b-6bKq.js → CheckboxGroup-CtJJqk_q.js} +3 -3
  7. package/{CheckboxGroup-BfZyy5yU.cjs → CheckboxGroup-thvsvOqD.cjs} +1 -1
  8. package/{ColorSchemeSwitch-BOooU0iy.cjs → ColorSchemeSwitch-Ckna0otR.cjs} +1 -1
  9. package/{ColorSchemeSwitch-KjnsdbDr.js → ColorSchemeSwitch-aF2UxI20.js} +1 -1
  10. package/{ComboBox-D1ZSZ6m-.js → ComboBox-BDX4BYWJ.js} +51 -44
  11. package/ComboBox-DFPrJUoV.cjs +1 -0
  12. package/{DateField-BogEOseq.cjs → DateField-B92Cqf9K.cjs} +1 -1
  13. package/{DateField-lsr_1fw4.js → DateField-BPRWrVcu.js} +3 -3
  14. package/{DateInputDivider-CYqm6PZP.cjs → DateInputDivider-CCrXjsUB.cjs} +1 -1
  15. package/{DateInputDivider-CRv3YuXd.js → DateInputDivider-DOHpVaNE.js} +5 -5
  16. package/{DateRangePicker-CgNXWOT6.cjs → DateRangePicker-COSTCOt8.cjs} +1 -1
  17. package/{DateRangePicker-5k1swaEt.js → DateRangePicker-Cmt9NC35.js} +8 -8
  18. package/{Dialog-B1N4Ndyx.js → Dialog-CPuJA2fm.js} +3 -3
  19. package/{Dialog-BUAp30Wc.js → Dialog-D4Py85wi.js} +4 -4
  20. package/{Dialog-BgSxz1JW.cjs → Dialog-DtOf0vWx.cjs} +1 -1
  21. package/{Dialog-PrnV8KTh.cjs → Dialog-DycTLpdr.cjs} +1 -1
  22. package/{Dropdown-DaARa89l.js → Dropdown-B4lwe0Hn.js} +2 -2
  23. package/{Dropdown-DBFLb8Tl.cjs → Dropdown-_g9l5k07.cjs} +1 -1
  24. package/{FieldError-l3xULRa0.js → FieldError-CIxlNQCM.js} +11 -11
  25. package/{FieldError-Cimgm8qD.cjs → FieldError-JWxR_EqN.cjs} +1 -1
  26. package/{FileUpload-DHmsupSe.cjs → FileUpload-C0TjNkuh.cjs} +2 -2
  27. package/{FileUpload-CN0HNJ_Y.js → FileUpload-DLBP3VPp.js} +260 -534
  28. package/{InfoBanner-BW3vy9mc.js → InfoBanner-D7Ta-7PI.js} +1 -1
  29. package/{Label-CNTODOFg.cjs → Label-DpY2SZdQ.cjs} +1 -1
  30. package/{Label-BGMXsSFb.js → Label-FfEnd4ai.js} +4 -4
  31. package/{Layout-JL9l-y7w.js → Layout-Hd1e_MEA.js} +1 -1
  32. package/{ListBox-mOCZvKD4.js → ListBox-5GK4ZRj1.js} +13 -13
  33. package/{ListBox-TGCxrXIJ.cjs → ListBox-FD30iELk.cjs} +1 -1
  34. package/{ListBoxSection-D_kTkvgG.js → ListBox-LJ3VgZMr.js} +209 -244
  35. package/ListBox-u6ZXp5Yi.cjs +1 -0
  36. package/{ListBoxLoadMoreItem-CLdTe6-z.js → ListBoxLoadMoreItem-B4GFbdYf.js} +2 -2
  37. package/ListBoxLoadMoreItem-DMUOzVtt.cjs +1 -0
  38. package/ListBoxSection-CBlpg0AG.cjs +1 -0
  39. package/ListBoxSection-DjGs1ndn.js +51 -0
  40. package/{ListKeyboardDelegate-CLRlDto7.cjs → ListKeyboardDelegate-8zuIfwQ7.cjs} +1 -1
  41. package/{ListKeyboardDelegate-BHnZMUhW.js → ListKeyboardDelegate-BBmpJ-2O.js} +1 -1
  42. package/Popover-CS8Yyfrq.js +39 -0
  43. package/Popover-DpB0XDBp.cjs +1 -0
  44. package/{ProgressBar-BGemuJIq.cjs → ProgressBar-BZqAQTV3.cjs} +1 -1
  45. package/{ProgressBar-DhRmckYM.js → ProgressBar-BpsvPCKk.js} +12 -12
  46. package/{Radio-D3RGVrEd.cjs → Radio-B3FBTn4F.cjs} +1 -1
  47. package/{Radio-Bp_31Z59.js → Radio-LevFYAg4.js} +5 -5
  48. package/{RangeCalendar-ChfmP_ql.cjs → RangeCalendar-CH0CyBui.cjs} +1 -1
  49. package/{RangeCalendar-9C96gMvy.js → RangeCalendar-DT_KVd80.js} +3 -3
  50. package/{SearchField-JaDXLq5W.cjs → SearchField-BX7P7BgV.cjs} +1 -1
  51. package/{SearchField-DrEdzWAy.js → SearchField-C-TFzcJF.js} +3 -3
  52. package/Select-C-ykeY_T.js +773 -0
  53. package/{Select-CpPE78Ke.js → Select-CiCng7ZP.js} +20 -18
  54. package/Select-D4wi-0Jw.cjs +1 -0
  55. package/Select-JIDW2mN8.cjs +1 -0
  56. package/{SelectionIndicator-ant6jeC1.js → SelectionIndicator-C2E23-zO.js} +83 -78
  57. package/SelectionIndicator-ClG0GpJu.cjs +1 -0
  58. package/{SelectionManager-uFYC4wpu.cjs → SelectionManager-CNJmHeCF.cjs} +1 -1
  59. package/{SelectionManager-C469yQeD.js → SelectionManager-DoNLJm8c.js} +1 -1
  60. package/{Separator-BWAnBMVN.js → Separator-CQfDz_zr.js} +8 -8
  61. package/{Separator-DbhmtwDa.cjs → Separator-CSyYDGNE.cjs} +1 -1
  62. package/{Separator-J0pLW4BN.cjs → Separator-DCi4bnBr.cjs} +1 -1
  63. package/{Separator-B6l5qSpR.js → Separator-DLr4kUJD.js} +2 -2
  64. package/{TabList-DmkxO7MM.js → TabList-BBmBumm6.js} +4 -4
  65. package/{TabList-C0tRVI6Q.cjs → TabList-DVzXuGXA.cjs} +1 -1
  66. package/{Table-BLqjyYKk.cjs → Table-B1nxmW14.cjs} +1 -1
  67. package/{Table-CyWZO9uf.js → Table-DxqKDp7N.js} +6 -6
  68. package/{Tag-FDHGu_WP.cjs → Tag-BL-_PONN.cjs} +1 -1
  69. package/{Tag-DJqYiBLR.js → Tag-DX1X_NZE.js} +52 -52
  70. package/{TextArea-CZxwvBcS.cjs → TextArea-Bjf8CBp0.cjs} +1 -1
  71. package/{TextArea-CrY7P18c.js → TextArea-CJPBvogq.js} +4 -4
  72. package/{TextField-DsN-kBfh.cjs → TextField-DtD9-arA.cjs} +1 -1
  73. package/{TextField-BWea-IT-.js → TextField-DyR61bjZ.js} +3 -3
  74. package/{Toast-Di3h8A14.js → Toast-B99bLWnh.js} +1 -1
  75. package/{ToggleButtonGroup-Bh4hP6Lk.js → ToggleButtonGroup-CFRutAZ4.js} +1 -1
  76. package/{ToggleButtonGroup-D7r34GCt.cjs → ToggleButtonGroup-dnvnzkaD.cjs} +1 -1
  77. package/accordion/index.js +1 -1
  78. package/assets/FieldError.css +1 -1
  79. package/assets/ListBox.css +1 -0
  80. package/assets/Popover.css +1 -1
  81. package/assets/Select.css +1 -1
  82. package/assets/Select2.css +1 -0
  83. package/assets/Tag.css +1 -1
  84. package/button/index.js +1 -1
  85. package/calendar/index.cjs +1 -1
  86. package/calendar/index.js +1 -1
  87. package/card/index.js +1 -1
  88. package/checkbox/index.cjs +1 -1
  89. package/checkbox/index.js +1 -1
  90. package/color-scheme-switch/index.cjs +1 -1
  91. package/color-scheme-switch/index.js +1 -1
  92. package/combobox/index.cjs +1 -1
  93. package/combobox/index.js +1 -1
  94. package/date-field/index.cjs +1 -1
  95. package/date-field/index.js +2 -2
  96. package/date-picker/index.cjs +1 -1
  97. package/date-picker/index.js +1 -1
  98. package/dropdown/index.cjs +1 -1
  99. package/dropdown/index.js +1 -1
  100. package/field-error/index.cjs +1 -1
  101. package/field-error/index.js +1 -1
  102. package/file-upload/index.cjs +1 -1
  103. package/file-upload/index.js +1 -1
  104. package/index.cjs +1 -1
  105. package/index.d.ts +1 -0
  106. package/index.js +95 -91
  107. package/info-banner/index.js +1 -1
  108. package/intlStrings-Cd44R5hT.js +278 -0
  109. package/intlStrings-ClBuC6xN.cjs +1 -0
  110. package/label/index.cjs +1 -1
  111. package/label/index.js +1 -1
  112. package/layout/index.js +1 -1
  113. package/legacy-select/Select.d.ts +8 -0
  114. package/legacy-select/SelectTrigger.d.ts +10 -0
  115. package/legacy-select/index.cjs +1 -0
  116. package/legacy-select/index.d.ts +2 -0
  117. package/legacy-select/index.js +4 -0
  118. package/legacy-select/intl/translations.json.d.ts +17 -0
  119. package/{select → legacy-select}/types.d.ts +1 -1
  120. package/{select → legacy-select}/useMultiSelect.d.ts +2 -1
  121. package/list-box/ListBox.d.ts +1 -2
  122. package/list-box/ListBoxHeader.d.ts +3 -0
  123. package/list-box/ListBoxItem.d.ts +9 -3
  124. package/list-box/ListBoxSection.d.ts +1 -1
  125. package/list-box/index.cjs +1 -1
  126. package/list-box/index.d.ts +1 -0
  127. package/list-box/index.js +9 -7
  128. package/menu/index.cjs +1 -1
  129. package/menu/index.js +2 -2
  130. package/modal/index.cjs +1 -1
  131. package/modal/index.js +2 -2
  132. package/package.json +1 -1
  133. package/popover/Popover.d.ts +2 -1
  134. package/popover/index.cjs +1 -1
  135. package/popover/index.js +1 -1
  136. package/progress-bar/index.cjs +1 -1
  137. package/progress-bar/index.js +1 -1
  138. package/radio/index.cjs +1 -1
  139. package/radio/index.js +1 -1
  140. package/search-field/index.cjs +1 -1
  141. package/search-field/index.js +1 -1
  142. package/select/Select.d.ts +33 -4
  143. package/select/SelectAll.d.ts +1 -0
  144. package/select/SelectTags.d.ts +4 -0
  145. package/select/SelectTrigger.d.ts +4 -8
  146. package/select/SelectValueTag.d.ts +5 -0
  147. package/select/index.cjs +1 -1
  148. package/select/index.d.ts +1 -2
  149. package/select/index.js +1 -1
  150. package/select/intl/translations.json.d.ts +2 -2
  151. package/table/index.cjs +1 -1
  152. package/table/index.js +1 -1
  153. package/tabs/index.cjs +1 -1
  154. package/tabs/index.js +1 -1
  155. package/tag/index.cjs +1 -1
  156. package/tag/index.js +1 -1
  157. package/textfield/index.cjs +1 -1
  158. package/textfield/index.js +1 -1
  159. package/toast/index.js +1 -1
  160. package/toggle-button/index.cjs +1 -1
  161. package/toggle-button/index.js +1 -1
  162. package/{useField-BhJ9dM2g.js → useField-Bx76iuoW.js} +1 -1
  163. package/{useFilter-BdUU-HQZ.js → useFilter-Dn4vTT3G.js} +1 -1
  164. package/{useFilter-R2IPvbS8.cjs → useFilter-eOgdlVLd.cjs} +1 -1
  165. package/{useHasTabbableChild-CIZGg_iG.cjs → useHasTabbableChild-BJ_VejL5.cjs} +1 -1
  166. package/{useHasTabbableChild-CnpSoDuJ.js → useHasTabbableChild-DpISgPsS.js} +1 -1
  167. package/{useHighlightSelectionDescription-DPiqOr_Z.js → useHighlightSelectionDescription-Zvo5KTxM.js} +1 -1
  168. package/{useListState-PZF3ahpk.js → useListState-CP7AKhOX.js} +1 -1
  169. package/{useListState-DBawAMhF.cjs → useListState-DZFWpD-x.cjs} +1 -1
  170. package/{useSingleSelectListState-BLRBEJC7.js → useSingleSelectListState-GSY0f4qW.js} +1 -1
  171. package/{useSingleSelectListState-CNETmoj5.cjs → useSingleSelectListState-JCvbhUVI.cjs} +1 -1
  172. package/{useTextField-B8pM0p6X.js → useTextField-I3QVGvyX.js} +1 -1
  173. package/ComboBox-Dztk_jtC.cjs +0 -1
  174. package/ListBoxLoadMoreItem-UX0jFQN4.cjs +0 -1
  175. package/ListBoxSection-BNBHosou.cjs +0 -1
  176. package/Popover-CZFi2YGz.js +0 -38
  177. package/Popover-uYTWBGHa.cjs +0 -1
  178. package/Select-BCUH-Z7q.cjs +0 -1
  179. package/SelectionIndicator-BiSN1toV.cjs +0 -1
  180. package/assets/ListBoxSection.css +0 -1
  181. /package/{select → legacy-select}/HiddenMultiSelect.d.ts +0 -0
  182. /package/{select → legacy-select}/MultiSelectValueTag.d.ts +0 -0
  183. /package/{select → legacy-select}/SelectFieldError.d.ts +0 -0
  184. /package/{select → legacy-select}/SelectListBox.d.ts +0 -0
  185. /package/{select → legacy-select}/useMultiSelectListState.d.ts +0 -0
  186. /package/{select → legacy-select}/useMultiSelectState.d.ts +0 -0
  187. /package/{select → legacy-select}/utils.d.ts +0 -0
@@ -1,17 +1,15 @@
1
- import { jsx as C, jsxs as le } from "react/jsx-runtime";
2
- import { a as oe, b as ne, c as se } from "./ListBox-mOCZvKD4.js";
3
- import { g as re, m as ae } from "./Collection-BkxwF21i.js";
4
- import m, { useState as S, useRef as _, useMemo as k, useCallback as L, useEffect as he, createContext as X, useContext as A } from "react";
5
- import { d as de, $ as P } from "./mergeProps-Ct8m5-xW.js";
6
- import { $ as F } from "./context-Dl_saGB6.js";
7
- import { flushSync as O } from "react-dom";
8
- import { g as ce } from "./OverlayArrow-CjGslX2c.js";
9
- import { $ as ue } from "./useEvent-smuTnX4G.js";
10
- import { c as B } from "./clsx-jbLnTBqA.js";
11
- import { f as Y } from "./SelectionManager-C469yQeD.js";
12
- import { b as fe } from "./Dialog-BUAp30Wc.js";
13
- import { e as ge } from "./Separator-BWAnBMVN.js";
14
- import './assets/ListBoxSection.css';class ye {
1
+ import { jsx as K } from "react/jsx-runtime";
2
+ import { e as te } from "./ListBox-5GK4ZRj1.js";
3
+ import { g as ie, m as le } from "./Collection-BkxwF21i.js";
4
+ import m, { useState as z, useRef as _, useMemo as C, useCallback as k, useEffect as oe, createContext as W, useContext as D } from "react";
5
+ import { d as ne, $ as M } from "./mergeProps-Ct8m5-xW.js";
6
+ import { $ as X } from "./context-Dl_saGB6.js";
7
+ import { flushSync as V } from "react-dom";
8
+ import { g as se } from "./OverlayArrow-CjGslX2c.js";
9
+ import { $ as re } from "./useEvent-smuTnX4G.js";
10
+ import { c as ae } from "./clsx-jbLnTBqA.js";
11
+ import { f as q } from "./SelectionManager-DoNLJm8c.js";
12
+ import './assets/ListBox.css';class he {
15
13
  /**
16
14
  * Returns whether the layout should invalidate in response to
17
15
  * visible rectangle changes. By default, it only invalidates
@@ -204,12 +202,12 @@ class f {
204
202
  this.x = e, this.y = t, this.width = i, this.height = l;
205
203
  }
206
204
  }
207
- class z {
205
+ class $ {
208
206
  /**
209
207
  * Returns a copy of this size.
210
208
  */
211
209
  copy() {
212
- return new z(this.width, this.height);
210
+ return new $(this.width, this.height);
213
211
  }
214
212
  /**
215
213
  * Returns whether this size is equal to another one.
@@ -227,8 +225,8 @@ class z {
227
225
  this.width = Math.max(e, 0), this.height = Math.max(t, 0);
228
226
  }
229
227
  }
230
- let ve = 0;
231
- class j {
228
+ let de = 0;
229
+ class A {
232
230
  /**
233
231
  * Prepares the view for reuse. Called just before the view is removed from the DOM.
234
232
  */
@@ -237,7 +235,7 @@ class j {
237
235
  }
238
236
  getReusableView(e) {
239
237
  let t = this.reusableViews.get(e);
240
- return t && t.length > 0 ? t.shift() : new me(this.virtualizer, this, e);
238
+ return t && t.length > 0 ? t.shift() : new ue(this.virtualizer, this, e);
241
239
  }
242
240
  reuseChild(e) {
243
241
  e.prepareForReuse();
@@ -245,27 +243,27 @@ class j {
245
243
  t || (t = [], this.reusableViews.set(e.viewType, t)), t.push(e);
246
244
  }
247
245
  constructor(e, t) {
248
- this.virtualizer = e, this.key = ++ve, this.viewType = t, this.children = /* @__PURE__ */ new Set(), this.reusableViews = /* @__PURE__ */ new Map(), this.layoutInfo = null, this.content = null, this.rendered = null;
246
+ this.virtualizer = e, this.key = ++de, this.viewType = t, this.children = /* @__PURE__ */ new Set(), this.reusableViews = /* @__PURE__ */ new Map(), this.layoutInfo = null, this.content = null, this.rendered = null;
249
247
  }
250
248
  }
251
- class pe extends j {
249
+ class ce extends A {
252
250
  constructor(e) {
253
251
  super(e, "root");
254
252
  }
255
253
  }
256
- class me extends j {
254
+ class ue extends A {
257
255
  constructor(e, t, i) {
258
256
  super(e, i), this.parent = t;
259
257
  }
260
258
  }
261
- function we(n, e) {
262
- if (n === e) return !0;
263
- if (n.size !== e.size) return !1;
264
- for (let t of n)
259
+ function fe(s, e) {
260
+ if (s === e) return !0;
261
+ if (s.size !== e.size) return !1;
262
+ for (let t of s)
265
263
  if (!e.has(t)) return !1;
266
264
  return !0;
267
265
  }
268
- class be {
266
+ class ge {
269
267
  setVisibleRect(e) {
270
268
  let t = performance.now() - this.startTime;
271
269
  t < 500 && (e.x !== this.visibleRect.x && t > 0 && (this.velocity.x = (e.x - this.visibleRect.x) / t), e.y !== this.visibleRect.y && t > 0 && (this.velocity.y = (e.y - this.visibleRect.y) / t)), this.startTime = performance.now(), this.visibleRect = e;
@@ -282,7 +280,7 @@ class be {
282
280
  this.startTime = 0, this.velocity = new x(0, 0), this.visibleRect = new f();
283
281
  }
284
282
  }
285
- class xe {
283
+ class ye {
286
284
  /** Returns whether the given key, or an ancestor, is persisted. */
287
285
  isPersistedKey(e) {
288
286
  if (this.persistedKeys.has(e)) return !0;
@@ -332,9 +330,9 @@ class xe {
332
330
  getVisibleLayoutInfos() {
333
331
  let e = process.env.NODE_ENV === "test" && !process.env.VIRT_ON, t = e && typeof HTMLElement < "u" && Object.getOwnPropertyNames(HTMLElement.prototype).includes("clientWidth"), i = e && typeof HTMLElement < "u" && Object.getOwnPropertyNames(HTMLElement.prototype).includes("clientHeight"), l;
334
332
  e && !(t && i) ? l = new f(0, 0, this.contentSize.width, this.contentSize.height) : l = this._overscanManager.getOverscannedRect();
335
- let o = this.layout.getVisibleLayoutInfos(l), s = /* @__PURE__ */ new Map();
336
- for (let a of o) s.set(a.key, a);
337
- return s;
333
+ let o = this.layout.getVisibleLayoutInfos(l), n = /* @__PURE__ */ new Map();
334
+ for (let a of o) n.set(a.key, a);
335
+ return n;
338
336
  }
339
337
  updateSubviews() {
340
338
  let e = this.getVisibleLayoutInfos(), t = /* @__PURE__ */ new Set();
@@ -348,8 +346,8 @@ class xe {
348
346
  o = this.getReusableView(l), o.parent.children.add(o), this._visibleViews.set(i, o), t.delete(o);
349
347
  else {
350
348
  o.layoutInfo = l;
351
- let s = this.collection.getItem(l.key);
352
- o.content !== s && (o.content != null && this._renderedContent.delete(o.content), this._renderView(o));
349
+ let n = this.collection.getItem(l.key);
350
+ o.content !== n && (o.content != null && this._renderedContent.delete(o.content), this._renderView(o));
353
351
  }
354
352
  }
355
353
  for (let i of t)
@@ -362,11 +360,11 @@ class xe {
362
360
  }
363
361
  /** Performs layout and updates visible views as needed. */
364
362
  render(e) {
365
- let t = this, i = !1, l = !1, o = !1, s = !1, a = !1, h = !1;
366
- return e.collection !== this.collection && (t.collection = e.collection, i = !0), (e.layout !== this.layout || this.layout.virtualizer !== this) && (this.layout && (this.layout.virtualizer = null), e.layout.virtualizer = this, t.layout = e.layout, i = !0), e.persistedKeys && !we(e.persistedKeys, this.persistedKeys) && (t.persistedKeys = e.persistedKeys, h = !0), this.visibleRect.equals(e.visibleRect) || (this._overscanManager.setVisibleRect(e.visibleRect), this.layout.shouldInvalidate(e.visibleRect, this.visibleRect) ? (l = !e.visibleRect.pointEquals(this.visibleRect), o = !e.visibleRect.sizeEquals(this.visibleRect), i = !0) : h = !0, t.visibleRect = e.visibleRect), e.invalidationContext !== this._invalidationContext && (e.invalidationContext && (o || (o = e.invalidationContext.sizeChanged || !1), l || (l = e.invalidationContext.offsetChanged || !1), s || (s = e.invalidationContext.itemSizeChanged || !1), a || (a = e.invalidationContext.layoutOptions != null && this._invalidationContext.layoutOptions != null && e.invalidationContext.layoutOptions !== this._invalidationContext.layoutOptions && this.layout.shouldInvalidateLayoutOptions(e.invalidationContext.layoutOptions, this._invalidationContext.layoutOptions)), i || (i = s || o || l || a)), this._invalidationContext = e.invalidationContext), e.isScrolling !== this._isScrolling && (this._isScrolling = e.isScrolling, e.isScrolling || (h = !0)), i ? this.relayout({
363
+ let t = this, i = !1, l = !1, o = !1, n = !1, a = !1, h = !1;
364
+ return e.collection !== this.collection && (t.collection = e.collection, i = !0), (e.layout !== this.layout || this.layout.virtualizer !== this) && (this.layout && (this.layout.virtualizer = null), e.layout.virtualizer = this, t.layout = e.layout, i = !0), e.persistedKeys && !fe(e.persistedKeys, this.persistedKeys) && (t.persistedKeys = e.persistedKeys, h = !0), this.visibleRect.equals(e.visibleRect) || (this._overscanManager.setVisibleRect(e.visibleRect), this.layout.shouldInvalidate(e.visibleRect, this.visibleRect) ? (l = !e.visibleRect.pointEquals(this.visibleRect), o = !e.visibleRect.sizeEquals(this.visibleRect), i = !0) : h = !0, t.visibleRect = e.visibleRect), e.invalidationContext !== this._invalidationContext && (e.invalidationContext && (o || (o = e.invalidationContext.sizeChanged || !1), l || (l = e.invalidationContext.offsetChanged || !1), n || (n = e.invalidationContext.itemSizeChanged || !1), a || (a = e.invalidationContext.layoutOptions != null && this._invalidationContext.layoutOptions != null && e.invalidationContext.layoutOptions !== this._invalidationContext.layoutOptions && this.layout.shouldInvalidateLayoutOptions(e.invalidationContext.layoutOptions, this._invalidationContext.layoutOptions)), i || (i = n || o || l || a)), this._invalidationContext = e.invalidationContext), e.isScrolling !== this._isScrolling && (this._isScrolling = e.isScrolling, e.isScrolling || (h = !0)), i ? this.relayout({
367
365
  offsetChanged: l,
368
366
  sizeChanged: o,
369
- itemSizeChanged: s,
367
+ itemSizeChanged: n,
370
368
  layoutOptionsChanged: a,
371
369
  layoutOptions: this._invalidationContext.layoutOptions
372
370
  }) : h && this.updateSubviews(), Array.from(this._rootView.children);
@@ -384,47 +382,47 @@ class xe {
384
382
  });
385
383
  }
386
384
  constructor(e) {
387
- this.delegate = e.delegate, this.collection = e.collection, this.layout = e.layout, this.contentSize = new z(), this.visibleRect = new f(), this.persistedKeys = /* @__PURE__ */ new Set(), this._visibleViews = /* @__PURE__ */ new Map(), this._renderedContent = /* @__PURE__ */ new WeakMap(), this._rootView = new pe(this), this._isScrolling = !1, this._invalidationContext = {}, this._overscanManager = new be();
385
+ this.delegate = e.delegate, this.collection = e.collection, this.layout = e.layout, this.contentSize = new $(), this.visibleRect = new f(), this.persistedKeys = /* @__PURE__ */ new Set(), this._visibleViews = /* @__PURE__ */ new Map(), this._renderedContent = /* @__PURE__ */ new WeakMap(), this._rootView = new ce(this), this._isScrolling = !1, this._invalidationContext = {}, this._overscanManager = new ge();
388
386
  }
389
387
  }
390
- const Ie = typeof document < "u" ? m.useLayoutEffect : () => {
388
+ const ve = typeof document < "u" ? m.useLayoutEffect : () => {
391
389
  };
392
- function Re(n) {
393
- let [e, t] = S(new f(0, 0, 0, 0)), [i, l] = S(!1), [o, s] = S({}), a = _(!1), [h] = S(() => new xe({
394
- collection: n.collection,
395
- layout: n.layout,
390
+ function pe(s) {
391
+ let [e, t] = z(new f(0, 0, 0, 0)), [i, l] = z(!1), [o, n] = z({}), a = _(!1), [h] = z(() => new ye({
392
+ collection: s.collection,
393
+ layout: s.layout,
396
394
  delegate: {
397
395
  setVisibleRect(v) {
398
396
  t(v), a.current = !0;
399
397
  },
400
398
  // TODO: should changing these invalidate the entire cache?
401
- renderView: n.renderView,
402
- invalidate: s
399
+ renderView: s.renderView,
400
+ invalidate: n
403
401
  }
404
402
  }));
405
- Ie(() => {
406
- a.current && (a.current = !1, n.onVisibleRectChange(e));
403
+ ve(() => {
404
+ a.current && (a.current = !1, s.onVisibleRectChange(e));
407
405
  });
408
- let r = k(() => n.layoutOptions != null ? {
406
+ let r = C(() => s.layoutOptions != null ? {
409
407
  ...o,
410
- layoutOptions: n.layoutOptions
408
+ layoutOptions: s.layoutOptions
411
409
  } : o, [
412
410
  o,
413
- n.layoutOptions
411
+ s.layoutOptions
414
412
  ]), d = h.render({
415
- layout: n.layout,
416
- collection: n.collection,
417
- persistedKeys: n.persistedKeys,
418
- layoutOptions: n.layoutOptions,
413
+ layout: s.layout,
414
+ collection: s.collection,
415
+ persistedKeys: s.persistedKeys,
416
+ layoutOptions: s.layoutOptions,
419
417
  visibleRect: e,
420
418
  invalidationContext: r,
421
419
  isScrolling: i
422
- }), c = h.contentSize, u = L(() => {
420
+ }), c = h.contentSize, u = k(() => {
423
421
  l(!0);
424
- }, []), y = L(() => {
422
+ }, []), y = k(() => {
425
423
  l(!1);
426
424
  }, []);
427
- return k(() => ({
425
+ return C(() => ({
428
426
  virtualizer: h,
429
427
  visibleViews: d,
430
428
  setVisibleRect: t,
@@ -443,7 +441,7 @@ function Re(n) {
443
441
  ]);
444
442
  }
445
443
  const R = 48;
446
- class $e extends ye {
444
+ class me extends he {
447
445
  // Backward compatibility for subclassing.
448
446
  get collection() {
449
447
  return this.virtualizer.collection;
@@ -455,12 +453,12 @@ class $e extends ye {
455
453
  getVisibleLayoutInfos(e) {
456
454
  if (e.height > 1) {
457
455
  var t, i;
458
- let s = ((i = (t = this.rowHeight) !== null && t !== void 0 ? t : this.estimatedRowHeight) !== null && i !== void 0 ? i : R) + this.gap;
459
- e.y = Math.floor(e.y / s) * s, e.height = Math.ceil(e.height / s) * s;
456
+ let n = ((i = (t = this.rowHeight) !== null && t !== void 0 ? t : this.estimatedRowHeight) !== null && i !== void 0 ? i : R) + this.gap;
457
+ e.y = Math.floor(e.y / n) * n, e.height = Math.ceil(e.height / n) * n;
460
458
  }
461
459
  this.layoutIfNeeded(e);
462
- let l = [], o = (s) => {
463
- for (let a of s) this.isVisible(a, e) && (l.push(a.layoutInfo), a.children && o(a.children));
460
+ let l = [], o = (n) => {
461
+ for (let a of n) this.isVisible(a, e) && (l.push(a.layoutInfo), a.children && o(a.children));
464
462
  };
465
463
  return o(this.rootNodes), l;
466
464
  }
@@ -479,8 +477,8 @@ class $e extends ye {
479
477
  }
480
478
  shouldInvalidateEverything(e) {
481
479
  let t = e.layoutOptions;
482
- var i, l, o, s, a;
483
- return e.sizeChanged || this.rowHeight !== ((i = t == null ? void 0 : t.rowHeight) !== null && i !== void 0 ? i : this.rowHeight) || this.headingHeight !== ((l = t == null ? void 0 : t.headingHeight) !== null && l !== void 0 ? l : this.headingHeight) || this.loaderHeight !== ((o = t == null ? void 0 : t.loaderHeight) !== null && o !== void 0 ? o : this.loaderHeight) || this.gap !== ((s = t == null ? void 0 : t.gap) !== null && s !== void 0 ? s : this.gap) || this.padding !== ((a = t == null ? void 0 : t.padding) !== null && a !== void 0 ? a : this.padding);
480
+ var i, l, o, n, a;
481
+ return e.sizeChanged || this.rowHeight !== ((i = t == null ? void 0 : t.rowHeight) !== null && i !== void 0 ? i : this.rowHeight) || this.headingHeight !== ((l = t == null ? void 0 : t.headingHeight) !== null && l !== void 0 ? l : this.headingHeight) || this.loaderHeight !== ((o = t == null ? void 0 : t.loaderHeight) !== null && o !== void 0 ? o : this.loaderHeight) || this.gap !== ((n = t == null ? void 0 : t.gap) !== null && n !== void 0 ? n : this.gap) || this.padding !== ((a = t == null ? void 0 : t.padding) !== null && a !== void 0 ? a : this.padding);
484
482
  }
485
483
  shouldInvalidateLayoutOptions(e, t) {
486
484
  return e.rowHeight !== t.rowHeight || e.estimatedRowHeight !== t.estimatedRowHeight || e.headingHeight !== t.headingHeight || e.estimatedHeadingHeight !== t.estimatedHeadingHeight || e.loaderHeight !== t.loaderHeight || e.dropIndicatorThickness !== t.dropIndicatorThickness || e.gap !== t.gap || e.padding !== t.padding;
@@ -493,8 +491,8 @@ class $e extends ye {
493
491
  this.rowHeight = (l = i == null ? void 0 : i.rowHeight) !== null && l !== void 0 ? l : this.rowHeight;
494
492
  var o;
495
493
  this.estimatedRowHeight = (o = i == null ? void 0 : i.estimatedRowHeight) !== null && o !== void 0 ? o : this.estimatedRowHeight;
496
- var s;
497
- this.headingHeight = (s = i == null ? void 0 : i.headingHeight) !== null && s !== void 0 ? s : this.headingHeight;
494
+ var n;
495
+ this.headingHeight = (n = i == null ? void 0 : i.headingHeight) !== null && n !== void 0 ? n : this.headingHeight;
498
496
  var a;
499
497
  this.estimatedHeadingHeight = (a = i == null ? void 0 : i.estimatedHeadingHeight) !== null && a !== void 0 ? a : this.estimatedHeadingHeight;
500
498
  var h;
@@ -511,8 +509,8 @@ class $e extends ye {
511
509
  buildCollection(e = this.padding) {
512
510
  let t = this.virtualizer.collection, i = [
513
511
  ...t
514
- ], l = i.filter((r) => r.type === "loader"), o = [], s = (t == null ? void 0 : t.size) === 0;
515
- s && (e = 0);
512
+ ], l = i.filter((r) => r.type === "loader"), o = [], n = (t == null ? void 0 : t.size) === 0;
513
+ n && (e = 0);
516
514
  for (let r of i) {
517
515
  var a, h;
518
516
  let d = ((h = (a = this.rowHeight) !== null && a !== void 0 ? a : this.estimatedRowHeight) !== null && h !== void 0 ? h : R) + this.gap;
@@ -537,7 +535,7 @@ class $e extends ye {
537
535
  break;
538
536
  }
539
537
  }
540
- return e -= this.gap, e += s ? 0 : this.padding, this.contentSize = new z(this.virtualizer.visibleRect.width, e), o;
538
+ return e -= this.gap, e += n ? 0 : this.padding, this.contentSize = new $(this.virtualizer.visibleRect.width, e), o;
541
539
  }
542
540
  isValid(e, t) {
543
541
  let i = this.layoutNodes.get(e.key);
@@ -567,15 +565,15 @@ class $e extends ye {
567
565
  buildLoader(e, t, i) {
568
566
  let l = new f(t, i, this.padding, 0), o = new b("loader", e.key, l);
569
567
  l.width = this.virtualizer.contentSize.width - this.padding - t;
570
- var s, a, h;
571
- return l.height = e.props.isLoading ? (h = (a = (s = this.loaderHeight) !== null && s !== void 0 ? s : this.rowHeight) !== null && a !== void 0 ? a : this.estimatedRowHeight) !== null && h !== void 0 ? h : R : 0, {
568
+ var n, a, h;
569
+ return l.height = e.props.isLoading ? (h = (a = (n = this.loaderHeight) !== null && n !== void 0 ? n : this.rowHeight) !== null && a !== void 0 ? a : this.estimatedRowHeight) !== null && h !== void 0 ? h : R : 0, {
572
570
  layoutInfo: o,
573
571
  validRect: l.intersection(this.requestedRect)
574
572
  };
575
573
  }
576
574
  buildSection(e, t, i) {
577
- let l = this.virtualizer.collection, o = this.virtualizer.visibleRect.width - this.padding, s = new f(t, i, o - t, 0), a = new b(e.type, e.key, s), h = i, r = 0, d = [];
578
- for (let y of Y(e, l)) {
575
+ let l = this.virtualizer.collection, o = this.virtualizer.visibleRect.width - this.padding, n = new f(t, i, o - t, 0), a = new b(e.type, e.key, n), h = i, r = 0, d = [];
576
+ for (let y of q(e, l)) {
579
577
  var c, u;
580
578
  let g = ((u = (c = this.rowHeight) !== null && c !== void 0 ? c : this.estimatedRowHeight) !== null && u !== void 0 ? u : R) + this.gap;
581
579
  if (i + g < this.requestedRect.y && !this.isValid(e, i)) {
@@ -585,12 +583,12 @@ class $e extends ye {
585
583
  let v = this.buildChild(y, t, i, a.key);
586
584
  if (i = v.layoutInfo.rect.maxY + this.gap, d.push(v), i > this.requestedRect.maxY) {
587
585
  i += ([
588
- ...Y(e, l)
586
+ ...q(e, l)
589
587
  ].length - (d.length + r)) * g;
590
588
  break;
591
589
  }
592
590
  }
593
- return i -= this.gap, s.height = i - h, {
591
+ return i -= this.gap, n.height = i - h, {
594
592
  layoutInfo: a,
595
593
  children: d,
596
594
  validRect: a.rect.intersection(this.requestedRect),
@@ -598,18 +596,18 @@ class $e extends ye {
598
596
  };
599
597
  }
600
598
  buildSectionHeader(e, t, i) {
601
- let l = this.virtualizer.visibleRect.width - this.padding, o = this.headingHeight, s = !1;
599
+ let l = this.virtualizer.visibleRect.width - this.padding, o = this.headingHeight, n = !1;
602
600
  if (o == null) {
603
601
  let r = this.layoutNodes.get(e.key), d = r == null ? void 0 : r.layoutInfo;
604
602
  if (d) {
605
603
  let c = this.virtualizer.collection.getItem(e.key), u = this.lastCollection ? this.lastCollection.getItem(e.key) : null;
606
- o = d.rect.height, s = l !== d.rect.width || c !== u || d.estimatedSize;
604
+ o = d.rect.height, n = l !== d.rect.width || c !== u || d.estimatedSize;
607
605
  } else
608
- o = e.rendered ? this.estimatedHeadingHeight : 0, s = !0;
606
+ o = e.rendered ? this.estimatedHeadingHeight : 0, n = !0;
609
607
  }
610
608
  o == null && (o = R);
611
609
  let a = new f(t, i, l - t, o), h = new b("header", e.key, a);
612
- return h.estimatedSize = s, {
610
+ return h.estimatedSize = n, {
613
611
  layoutInfo: h,
614
612
  children: [],
615
613
  validRect: h.rect.intersection(this.requestedRect),
@@ -617,14 +615,14 @@ class $e extends ye {
617
615
  };
618
616
  }
619
617
  buildItem(e, t, i) {
620
- let l = this.virtualizer.visibleRect.width - this.padding - t, o = this.rowHeight, s = !1;
618
+ let l = this.virtualizer.visibleRect.width - this.padding - t, o = this.rowHeight, n = !1;
621
619
  if (o == null) {
622
620
  let r = this.layoutNodes.get(e.key);
623
- r ? (o = r.layoutInfo.rect.height, s = l !== r.layoutInfo.rect.width || e !== r.node || r.layoutInfo.estimatedSize) : (o = this.estimatedRowHeight, s = !0);
621
+ r ? (o = r.layoutInfo.rect.height, n = l !== r.layoutInfo.rect.width || e !== r.node || r.layoutInfo.estimatedSize) : (o = this.estimatedRowHeight, n = !0);
624
622
  }
625
623
  o == null && (o = R);
626
624
  let a = new f(t, i, l, o), h = new b(e.type, e.key, a);
627
- return h.estimatedSize = s, {
625
+ return h.estimatedSize = n, {
628
626
  layoutInfo: h,
629
627
  children: [],
630
628
  validRect: h.rect,
@@ -636,11 +634,11 @@ class $e extends ye {
636
634
  if (!i) return !1;
637
635
  let l = this.virtualizer.collection, o = i.layoutInfo;
638
636
  if (o.estimatedSize = !1, o.rect.height !== t.height) {
639
- let s = o.copy();
640
- s.rect.height = t.height, i.layoutInfo = s, this.validRect.height = Math.min(this.validRect.height, o.rect.y - this.validRect.y), this.requestedRect.height += s.rect.height - o.rect.height, this.updateLayoutNode(e, o, s);
637
+ let n = o.copy();
638
+ n.rect.height = t.height, i.layoutInfo = n, this.validRect.height = Math.min(this.validRect.height, o.rect.y - this.validRect.y), this.requestedRect.height += n.rect.height - o.rect.height, this.updateLayoutNode(e, o, n);
641
639
  let a = o.parentKey != null ? l.getItem(o.parentKey) : null;
642
640
  for (; a; )
643
- this.updateLayoutNode(a.key, o, s), a = a.parentKey != null ? l.getItem(a.parentKey) : null;
641
+ this.updateLayoutNode(a.key, o, n), a = a.parentKey != null ? l.getItem(a.parentKey) : null;
644
642
  return !0;
645
643
  }
646
644
  return !1;
@@ -654,16 +652,16 @@ class $e extends ye {
654
652
  }
655
653
  getDropTargetFromPoint(e, t, i) {
656
654
  e += this.virtualizer.visibleRect.x, t += this.virtualizer.visibleRect.y;
657
- let l = new f(e, Math.max(0, t - this.gap), 1, Math.max(1, this.gap * 2)), o = this.getVisibleLayoutInfos(l), s = null, a = 1 / 0;
655
+ let l = new f(e, Math.max(0, t - this.gap), 1, Math.max(1, this.gap * 2)), o = this.getVisibleLayoutInfos(l), n = null, a = 1 / 0;
658
656
  for (let c of o) {
659
657
  if (!c.rect.intersects(l)) continue;
660
658
  let u = Math.abs(c.rect.y - t), y = Math.abs(c.rect.maxY - t), g = Math.min(u, y);
661
- g < a && (a = g, s = c.key);
659
+ g < a && (a = g, n = c.key);
662
660
  }
663
- if (s == null || this.virtualizer.collection.size === 0) return {
661
+ if (n == null || this.virtualizer.collection.size === 0) return {
664
662
  type: "root"
665
663
  };
666
- let h = this.getLayoutInfo(s);
664
+ let h = this.getLayoutInfo(n);
667
665
  if (!h) return null;
668
666
  let r = h.rect, d = {
669
667
  type: "item",
@@ -691,10 +689,10 @@ class $e extends ye {
691
689
  let o = this.collection.getItem(e.key);
692
690
  if (o) {
693
691
  var l;
694
- let s = (l = o.level) !== null && l !== void 0 ? l : 0, a = this.collection.getKeyAfter(e.key);
692
+ let n = (l = o.level) !== null && l !== void 0 ? l : 0, a = this.collection.getKeyAfter(e.key);
695
693
  for (; a != null; ) {
696
694
  let h = this.collection.getItem(a);
697
- if (!h || h.level <= s) break;
695
+ if (!h || h.level <= n) break;
698
696
  t = this.getLayoutInfo(a) || t, a = this.collection.getKeyAfter(a);
699
697
  }
700
698
  }
@@ -716,25 +714,25 @@ class $e extends ye {
716
714
  this.headingHeight = (l = e.headingHeight) !== null && l !== void 0 ? l : null;
717
715
  var o;
718
716
  this.estimatedHeadingHeight = (o = e.estimatedHeadingHeight) !== null && o !== void 0 ? o : null;
719
- var s;
720
- this.loaderHeight = (s = e.loaderHeight) !== null && s !== void 0 ? s : null, this.dropIndicatorThickness = e.dropIndicatorThickness || 2, this.gap = e.gap || 0, this.padding = e.padding || 0, this.layoutNodes = /* @__PURE__ */ new Map(), this.rootNodes = [], this.lastCollection = null, this.invalidateEverything = !1, this.validRect = new f(), this.requestedRect = new f(), this.contentSize = new z();
717
+ var n;
718
+ this.loaderHeight = (n = e.loaderHeight) !== null && n !== void 0 ? n : null, this.dropIndicatorThickness = e.dropIndicatorThickness || 2, this.gap = e.gap || 0, this.padding = e.padding || 0, this.layoutNodes = /* @__PURE__ */ new Map(), this.rootNodes = [], this.lastCollection = null, this.invalidateEverything = !1, this.validRect = new f(), this.requestedRect = new f(), this.contentSize = new $();
721
719
  }
722
720
  }
723
- let $ = null;
724
- function Se(n = !1) {
725
- if ($ === null || n) {
721
+ let S = null;
722
+ function we(s = !1) {
723
+ if (S === null || s) {
726
724
  const e = document.createElement("div"), t = e.style;
727
725
  t.width = "50px", t.height = "50px", t.overflow = "scroll", t.direction = "rtl";
728
726
  const i = document.createElement("div"), l = i.style;
729
- return l.width = "100px", l.height = "100px", e.appendChild(i), document.body.appendChild(e), e.scrollLeft > 0 ? $ = "positive-descending" : (e.scrollLeft = 1, e.scrollLeft === 0 ? $ = "negative" : $ = "positive-ascending"), document.body.removeChild(e), $;
727
+ return l.width = "100px", l.height = "100px", e.appendChild(i), document.body.appendChild(e), e.scrollLeft > 0 ? S = "positive-descending" : (e.scrollLeft = 1, e.scrollLeft === 0 ? S = "negative" : S = "positive-ascending"), document.body.removeChild(e), S;
730
728
  }
731
- return $;
729
+ return S;
732
730
  }
733
- function ze(n, e) {
734
- let { scrollLeft: t } = n;
731
+ function be(s, e) {
732
+ let { scrollLeft: t } = s;
735
733
  if (e === "rtl") {
736
- let { scrollWidth: i, clientWidth: l } = n;
737
- switch (Se()) {
734
+ let { scrollWidth: i, clientWidth: l } = s;
735
+ switch (we()) {
738
736
  case "negative":
739
737
  t = -t;
740
738
  break;
@@ -745,8 +743,8 @@ function ze(n, e) {
745
743
  }
746
744
  return t;
747
745
  }
748
- function He(n, e) {
749
- let { contentSize: t, onVisibleRectChange: i, innerStyle: l, onScrollStart: o, onScrollEnd: s, scrollDirection: a = "both", ...h } = n, r = _({
746
+ function xe(s, e) {
747
+ let { contentSize: t, onVisibleRectChange: i, innerStyle: l, onScrollStart: o, onScrollEnd: n, scrollDirection: a = "both", ...h } = s, r = _({
750
748
  scrollTop: 0,
751
749
  scrollLeft: 0,
752
750
  scrollEndTime: 0,
@@ -754,59 +752,59 @@ function He(n, e) {
754
752
  width: 0,
755
753
  height: 0,
756
754
  isScrolling: !1
757
- }).current, { direction: d } = F(), [c, u] = S(!1), y = L((p) => {
758
- p.target === p.currentTarget && (n.onScroll && n.onScroll(p), O(() => {
759
- let w = p.currentTarget.scrollTop, H = ze(p.currentTarget, d);
755
+ }).current, { direction: d } = X(), [c, u] = z(!1), y = k((p) => {
756
+ p.target === p.currentTarget && (s.onScroll && s.onScroll(p), V(() => {
757
+ let w = p.currentTarget.scrollTop, H = be(p.currentTarget, d);
760
758
  r.scrollTop = Math.max(0, Math.min(w, t.height - r.height)), r.scrollLeft = Math.max(0, Math.min(H, t.width - r.width)), i(new f(r.scrollLeft, r.scrollTop, r.width, r.height)), r.isScrolling || (r.isScrolling = !0, u(!0), window.dispatchEvent(new Event("tk.disconnect-observer")), o && o());
761
759
  let E = Date.now();
762
760
  r.scrollEndTime <= E + 50 && (r.scrollEndTime = E + 300, r.scrollTimeout != null && clearTimeout(r.scrollTimeout), r.scrollTimeout = setTimeout(() => {
763
- r.isScrolling = !1, u(!1), r.scrollTimeout = null, window.dispatchEvent(new Event("tk.connect-observer")), s && s();
761
+ r.isScrolling = !1, u(!1), r.scrollTimeout = null, window.dispatchEvent(new Event("tk.connect-observer")), n && n();
764
762
  }, 300));
765
763
  }));
766
764
  }, [
767
- n,
765
+ s,
768
766
  d,
769
767
  r,
770
768
  t,
771
769
  i,
772
770
  o,
773
- s
771
+ n
774
772
  ]);
775
- ue(e, "scroll", y), he(() => () => {
773
+ re(e, "scroll", y), oe(() => () => {
776
774
  r.scrollTimeout != null && clearTimeout(r.scrollTimeout), r.isScrolling && window.dispatchEvent(new Event("tk.connect-observer"));
777
775
  }, []);
778
- let g = _(!1), v = de((p) => {
776
+ let g = _(!1), v = ne((p) => {
779
777
  let w = e.current;
780
778
  if (!w || g.current) return;
781
779
  g.current = !0;
782
- let H = process.env.NODE_ENV === "test" && !process.env.VIRT_ON, E = Object.getOwnPropertyNames(window.HTMLElement.prototype).includes("clientWidth"), ie = Object.getOwnPropertyNames(window.HTMLElement.prototype).includes("clientHeight"), K = w.clientWidth, q = w.clientHeight, V = H && !E ? 1 / 0 : K, M = H && !ie ? 1 / 0 : q;
783
- (r.width !== V || r.height !== M) && (r.width = V, r.height = M, p(() => {
784
- i(new f(r.scrollLeft, r.scrollTop, V, M));
785
- }), (!H && K !== w.clientWidth || q !== w.clientHeight) && (r.width = w.clientWidth, r.height = w.clientHeight, p(() => {
780
+ let H = process.env.NODE_ENV === "test" && !process.env.VIRT_ON, E = Object.getOwnPropertyNames(window.HTMLElement.prototype).includes("clientWidth"), ee = Object.getOwnPropertyNames(window.HTMLElement.prototype).includes("clientHeight"), O = w.clientWidth, P = w.clientHeight, N = H && !E ? 1 / 0 : O, T = H && !ee ? 1 / 0 : P;
781
+ (r.width !== N || r.height !== T) && (r.width = N, r.height = T, p(() => {
782
+ i(new f(r.scrollLeft, r.scrollTop, N, T));
783
+ }), (!H && O !== w.clientWidth || P !== w.clientHeight) && (r.width = w.clientWidth, r.height = w.clientHeight, p(() => {
786
784
  i(new f(r.scrollLeft, r.scrollTop, r.width, r.height));
787
785
  }))), g.current = !1;
788
- }), N = _(null), [Z, ee] = S({});
789
- P(() => {
790
- if (!g.current && (N.current == null || !t.equals(N.current)))
786
+ }), L = _(null), [J, Q] = z({});
787
+ M(() => {
788
+ if (!g.current && (L.current == null || !t.equals(L.current)))
791
789
  if (typeof IS_REACT_ACT_ENVIRONMENT == "boolean" ? IS_REACT_ACT_ENVIRONMENT : typeof jest < "u") {
792
- ee({}), N.current = t;
790
+ Q({}), L.current = t;
793
791
  return;
794
- } else queueMicrotask(() => v(O));
795
- N.current = t;
796
- }), P(() => {
792
+ } else queueMicrotask(() => v(V));
793
+ L.current = t;
794
+ }), M(() => {
797
795
  v((p) => p());
798
796
  }, [
799
- Z
797
+ J
800
798
  ]);
801
- let te = L(() => {
802
- v(O);
799
+ let Z = k(() => {
800
+ v(V);
803
801
  }, [
804
802
  v
805
803
  ]);
806
- ce({
804
+ se({
807
805
  ref: e,
808
806
  box: "border-box",
809
- onResize: te
807
+ onResize: Z
810
808
  });
811
809
  let I = {
812
810
  // Reset padding so that relative positioning works correctly. Padding will be done in JS layout.
@@ -831,32 +829,32 @@ function He(n, e) {
831
829
  }
832
830
  };
833
831
  }
834
- function _e(n) {
835
- let { layoutInfo: e, virtualizer: t, ref: i } = n, l = e == null ? void 0 : e.key, o = L(() => {
832
+ function Ie(s) {
833
+ let { layoutInfo: e, virtualizer: t, ref: i } = s, l = e == null ? void 0 : e.key, o = k(() => {
836
834
  if (l != null && i.current) {
837
- let s = Ce(i.current);
838
- t.updateItemSize(l, s);
835
+ let n = Re(i.current);
836
+ t.updateItemSize(l, n);
839
837
  }
840
838
  }, [
841
839
  t,
842
840
  l,
843
841
  i
844
842
  ]);
845
- return P(() => {
843
+ return M(() => {
846
844
  e != null && e.estimatedSize && o();
847
845
  }), {
848
846
  updateSize: o
849
847
  };
850
848
  }
851
- function Ce(n) {
852
- let e = n.style.height;
853
- n.style.height = "";
854
- let t = new z(n.scrollWidth, n.scrollHeight);
855
- return n.style.height = e, t;
849
+ function Re(s) {
850
+ let e = s.style.height;
851
+ s.style.height = "";
852
+ let t = new $(s.scrollWidth, s.scrollHeight);
853
+ return s.style.height = e, t;
856
854
  }
857
- function U(n) {
858
- let { style: e, className: t, layoutInfo: i, virtualizer: l, parent: o, children: s } = n, { direction: a } = F(), h = _(null);
859
- return _e({
855
+ function F(s) {
856
+ let { style: e, className: t, layoutInfo: i, virtualizer: l, parent: o, children: n } = s, { direction: a } = X(), h = _(null);
857
+ return Ie({
860
858
  layoutInfo: i,
861
859
  virtualizer: l,
862
860
  ref: h
@@ -865,17 +863,17 @@ function U(n) {
865
863
  ref: h,
866
864
  className: t,
867
865
  style: {
868
- ...ke(i, a, o),
866
+ ...Se(i, a, o),
869
867
  ...e
870
868
  }
871
- }, s);
869
+ }, n);
872
870
  }
873
- let W = /* @__PURE__ */ new WeakMap();
874
- function ke(n, e, t) {
875
- let i = e === "rtl" ? "right" : "left", l = W.get(n);
871
+ let B = /* @__PURE__ */ new WeakMap();
872
+ function Se(s, e, t) {
873
+ let i = e === "rtl" ? "right" : "left", l = B.get(s);
876
874
  if (l && l[i] != null) {
877
875
  if (!t) return l;
878
- let h = n.rect.y - t.rect.y, r = n.rect.x - t.rect.x;
876
+ let h = s.rect.y - t.rect.y, r = s.rect.x - t.rect.x;
879
877
  if (l.top === h && l[i] === r) return l;
880
878
  }
881
879
  let o = {
@@ -883,55 +881,55 @@ function ke(n, e, t) {
883
881
  // which WON'T be the parent since the parent has overflow visible. This means we shouldn't offset the height by the parent's position
884
882
  // Not 100% about this change here since it is quite ambigious what the scrolling container maybe and how its top is positioned with respect to the
885
883
  // calculated layoutInfo.y here
886
- top: n.rect.y - (t && !(t.allowOverflow && n.isSticky) ? t.rect.y : 0),
887
- [i]: n.rect.x - (t && !(t.allowOverflow && n.isSticky) ? t.rect.x : 0),
888
- width: n.rect.width,
889
- height: n.rect.height
884
+ top: s.rect.y - (t && !(t.allowOverflow && s.isSticky) ? t.rect.y : 0),
885
+ [i]: s.rect.x - (t && !(t.allowOverflow && s.isSticky) ? t.rect.x : 0),
886
+ width: s.rect.width,
887
+ height: s.rect.height
890
888
  };
891
889
  Object.entries(o).forEach(([h, r]) => {
892
890
  Number.isFinite(r) || (o[h] = void 0);
893
891
  });
894
- var s;
892
+ var n;
895
893
  let a = {
896
- position: n.isSticky ? "sticky" : "absolute",
894
+ position: s.isSticky ? "sticky" : "absolute",
897
895
  // Sticky elements are positioned in normal document flow. Display inline-block so that they don't push other sticky columns onto the following rows.
898
- display: n.isSticky ? "inline-block" : void 0,
899
- overflow: n.allowOverflow ? "visible" : "hidden",
900
- opacity: n.opacity,
901
- zIndex: n.zIndex,
902
- transform: (s = n.transform) !== null && s !== void 0 ? s : void 0,
896
+ display: s.isSticky ? "inline-block" : void 0,
897
+ overflow: s.allowOverflow ? "visible" : "hidden",
898
+ opacity: s.opacity,
899
+ zIndex: s.zIndex,
900
+ transform: (n = s.transform) !== null && n !== void 0 ? n : void 0,
903
901
  contain: "size layout style",
904
902
  ...o
905
903
  };
906
- return W.set(n, a), a;
904
+ return B.set(s, a), a;
907
905
  }
908
- const G = /* @__PURE__ */ X(null), J = /* @__PURE__ */ X(null);
909
- function Le(n) {
910
- let { children: e, layout: t, layoutOptions: i } = n, l = k(() => typeof t == "function" ? new t() : t, [
906
+ const j = /* @__PURE__ */ W(null), U = /* @__PURE__ */ W(null);
907
+ function ze(s) {
908
+ let { children: e, layout: t, layoutOptions: i } = s, l = C(() => typeof t == "function" ? new t() : t, [
911
909
  t
912
- ]), o = k(() => ({
910
+ ]), o = C(() => ({
913
911
  isVirtualized: !0,
914
912
  layoutDelegate: l,
915
913
  dropTargetDelegate: l.getDropTargetFromPoint ? l : void 0,
916
- CollectionRoot: Ne,
917
- CollectionBranch: Ee
914
+ CollectionRoot: $e,
915
+ CollectionBranch: He
918
916
  }), [
919
917
  l
920
918
  ]);
921
- return /* @__PURE__ */ m.createElement(re.Provider, {
919
+ return /* @__PURE__ */ m.createElement(ie.Provider, {
922
920
  value: o
923
- }, /* @__PURE__ */ m.createElement(J.Provider, {
921
+ }, /* @__PURE__ */ m.createElement(U.Provider, {
924
922
  value: {
925
923
  layout: l,
926
924
  layoutOptions: i
927
925
  }
928
926
  }, e));
929
927
  }
930
- function Ne({ collection: n, persistedKeys: e, scrollRef: t, renderDropIndicator: i }) {
928
+ function $e({ collection: s, persistedKeys: e, scrollRef: t, renderDropIndicator: i }) {
931
929
  var l;
932
- let { layout: o, layoutOptions: s } = A(J), a = (l = o.useLayoutOptions) === null || l === void 0 ? void 0 : l.call(o), h = Re({
930
+ let { layout: o, layoutOptions: n } = D(U), a = (l = o.useLayoutOptions) === null || l === void 0 ? void 0 : l.call(o), h = pe({
933
931
  layout: o,
934
- collection: n,
932
+ collection: s,
935
933
  renderView: (d, c) => {
936
934
  var u;
937
935
  return c == null || (u = c.render) === null || u === void 0 ? void 0 : u.call(c, c);
@@ -941,58 +939,58 @@ function Ne({ collection: n, persistedKeys: e, scrollRef: t, renderDropIndicator
941
939
  c && (c.scrollLeft = d.x, c.scrollTop = d.y);
942
940
  },
943
941
  persistedKeys: e,
944
- layoutOptions: k(() => s && a ? {
945
- ...s,
942
+ layoutOptions: C(() => n && a ? {
943
+ ...n,
946
944
  ...a
947
- } : s || a, [
948
- s,
945
+ } : n || a, [
946
+ n,
949
947
  a
950
948
  ])
951
- }), { contentProps: r } = He({
949
+ }), { contentProps: r } = xe({
952
950
  onVisibleRectChange: h.setVisibleRect,
953
951
  contentSize: h.contentSize,
954
952
  onScrollStart: h.startScrolling,
955
953
  onScrollEnd: h.endScrolling
956
954
  }, t);
957
- return /* @__PURE__ */ m.createElement("div", r, /* @__PURE__ */ m.createElement(G.Provider, {
955
+ return /* @__PURE__ */ m.createElement("div", r, /* @__PURE__ */ m.createElement(j.Provider, {
958
956
  value: h
959
- }, Q(null, h.visibleViews, i)));
957
+ }, G(null, h.visibleViews, i)));
960
958
  }
961
- function Ee({ parent: n, renderDropIndicator: e }) {
962
- let i = A(G).virtualizer.getVisibleView(n.key);
963
- return Q(i, Array.from(i.children), e);
959
+ function He({ parent: s, renderDropIndicator: e }) {
960
+ let i = D(j).virtualizer.getVisibleView(s.key);
961
+ return G(i, Array.from(i.children), e);
964
962
  }
965
- function Q(n, e, t) {
966
- return e.map((i) => Te(n, i, t));
963
+ function G(s, e, t) {
964
+ return e.map((i) => _e(s, i, t));
967
965
  }
968
- function Te(n, e, t) {
969
- let i = /* @__PURE__ */ m.createElement(U, {
966
+ function _e(s, e, t) {
967
+ let i = /* @__PURE__ */ m.createElement(F, {
970
968
  key: e.key,
971
969
  layoutInfo: e.layoutInfo,
972
970
  virtualizer: e.virtualizer,
973
- parent: n == null ? void 0 : n.layoutInfo
974
- }, e.rendered), { collection: l, layout: o } = e.virtualizer, s = e.content;
975
- return (s == null ? void 0 : s.type) === "item" && t && o.getDropTargetLayoutInfo && (i = /* @__PURE__ */ m.createElement(m.Fragment, {
971
+ parent: s == null ? void 0 : s.layoutInfo
972
+ }, e.rendered), { collection: l, layout: o } = e.virtualizer, n = e.content;
973
+ return (n == null ? void 0 : n.type) === "item" && t && o.getDropTargetLayoutInfo && (i = /* @__PURE__ */ m.createElement(m.Fragment, {
976
974
  key: e.key
977
- }, D(n, e, {
975
+ }, Y(s, e, {
978
976
  type: "item",
979
977
  key: e.content.key,
980
978
  dropPosition: "before"
981
- }, t), i, ae(l, s, (a) => D(n, e, a, t)))), i;
979
+ }, t), i, le(l, n, (a) => Y(s, e, a, t)))), i;
982
980
  }
983
- function D(n, e, t, i) {
981
+ function Y(s, e, t, i) {
984
982
  let l = i(t);
985
983
  if (l) {
986
984
  let o = e.virtualizer.layout.getDropTargetLayoutInfo(t);
987
- l = /* @__PURE__ */ m.createElement(U, {
985
+ l = /* @__PURE__ */ m.createElement(F, {
988
986
  layoutInfo: o,
989
987
  virtualizer: e.virtualizer,
990
- parent: n == null ? void 0 : n.layoutInfo
988
+ parent: s == null ? void 0 : s.layoutInfo
991
989
  }, l);
992
990
  }
993
991
  return l;
994
992
  }
995
- class Ve extends $e {
993
+ class Ce extends me {
996
994
  /**
997
995
  * When using the ListLayout our scroll container height is not calculated properly when the content is partially sectioned.
998
996
  * ```ts
@@ -1017,68 +1015,35 @@ class Ve extends $e {
1017
1015
  }), this.contentSize;
1018
1016
  }
1019
1017
  }
1020
- const Me = "_listBox_ts7z5_4", Oe = "_listBoxPopover_ts7z5_16", Pe = "_listBoxSectionHeading_ts7z5_31", Be = "_listBoxButton_ts7z5_41", Ke = "_listBoxItem_ts7z5_53", qe = "_listBoxLoadMoreItem_ts7z5_99", T = {
1021
- listBox: Me,
1022
- listBoxPopover: Oe,
1023
- listBoxSectionHeading: Pe,
1024
- listBoxButton: Be,
1025
- listBoxItem: Ke,
1026
- listBoxLoadMoreItem: qe
1027
- }, tt = ({
1028
- className: n,
1018
+ const ke = "_listBox_13mbb_4", Le = "_listBoxPopover_13mbb_16", Ee = "_listBoxSectionHeading_13mbb_31", Ne = "_listBoxButton_13mbb_43", Te = "_listBoxItem_13mbb_55", Ve = "_listBoxLoadMoreItem_13mbb_165", Me = {
1019
+ listBox: ke,
1020
+ listBoxPopover: Le,
1021
+ listBoxSectionHeading: Ee,
1022
+ listBoxButton: Ne,
1023
+ listBoxItem: Te,
1024
+ listBoxLoadMoreItem: Ve
1025
+ }, je = ({
1026
+ className: s,
1029
1027
  children: e,
1030
1028
  ...t
1031
- }) => /* @__PURE__ */ C(
1032
- Le,
1029
+ }) => /* @__PURE__ */ K(
1030
+ ze,
1033
1031
  {
1034
- layout: Ve,
1032
+ layout: Ce,
1035
1033
  layoutOptions: {
1036
- headingHeight: 44
1034
+ headingHeight: 38
1037
1035
  },
1038
- children: /* @__PURE__ */ C(
1039
- oe,
1036
+ children: /* @__PURE__ */ K(
1037
+ te,
1040
1038
  {
1041
- className: B(T.listBox, n),
1039
+ className: ae(Me.listBox, s),
1042
1040
  ...t,
1043
1041
  children: e
1044
1042
  }
1045
1043
  )
1046
1044
  }
1047
- ), it = ({
1048
- children: n,
1049
- className: e,
1050
- ...t
1051
- }) => /* @__PURE__ */ C(
1052
- ne,
1053
- {
1054
- className: B(T.listBoxItem, e),
1055
- ...t,
1056
- children: n
1057
- }
1058
- ), lt = ({
1059
- className: n,
1060
- children: e,
1061
- ...t
1062
- }) => /* @__PURE__ */ C(
1063
- fe,
1064
- {
1065
- className: B(n, T.listBoxPopover),
1066
- offset: 0,
1067
- ...t,
1068
- children: e
1069
- }
1070
- ), ot = ({
1071
- children: n,
1072
- name: e,
1073
- ...t
1074
- }) => /* @__PURE__ */ le(se, { ...t, children: [
1075
- /* @__PURE__ */ C(ge, { className: T.listBoxSectionHeading, children: e }),
1076
- n
1077
- ] });
1045
+ );
1078
1046
  export {
1079
- tt as L,
1080
- it as a,
1081
- lt as b,
1082
- ot as c,
1083
- T as s
1047
+ je as L,
1048
+ Me as s
1084
1049
  };