@hopper-ui/components 1.2.1 → 1.3.1

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 (203) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/Avatar/src/AnonymousAvatar.css +10 -10
  3. package/dist/Avatar/src/AnonymousAvatar.js +2 -2
  4. package/dist/Avatar/src/Avatar.css +37 -37
  5. package/dist/Avatar/src/Avatar.js +4 -4
  6. package/dist/Avatar/src/DeletedAvatar.css +10 -10
  7. package/dist/Avatar/src/DeletedAvatar.js +2 -2
  8. package/dist/Avatar/src/RichIconAvatarImage.css +10 -10
  9. package/dist/Avatar/src/RichIconAvatarImage.js +1 -1
  10. package/dist/Avatar/src/index.css +37 -37
  11. package/dist/Avatar/src/index.js +6 -6
  12. package/dist/Badge/src/Badge.css +85 -13
  13. package/dist/Badge/src/Badge.d.ts +6 -2
  14. package/dist/Badge/src/Badge.js +2 -2
  15. package/dist/Badge/src/BadgeContext.d.ts +8 -3
  16. package/dist/Badge/src/FloatingBadge.css +96 -0
  17. package/dist/Badge/src/FloatingBadge.d.ts +33 -0
  18. package/dist/Badge/src/FloatingBadge.js +7 -0
  19. package/dist/Badge/src/FloatingBadgeContext.d.ts +10 -0
  20. package/dist/Badge/src/FloatingBadgeContext.js +2 -0
  21. package/dist/Badge/src/index.css +182 -13
  22. package/dist/Badge/src/index.d.ts +3 -1
  23. package/dist/Badge/src/index.js +5 -2
  24. package/dist/Divider/src/Divider.css +2 -2
  25. package/dist/Divider/src/Divider.js +1 -1
  26. package/dist/Divider/src/index.css +2 -2
  27. package/dist/Divider/src/index.js +1 -1
  28. package/dist/ErrorMessage/src/ErrorMessage.css +11 -11
  29. package/dist/ErrorMessage/src/ErrorMessage.js +2 -2
  30. package/dist/ErrorMessage/src/index.css +11 -11
  31. package/dist/ErrorMessage/src/index.js +2 -2
  32. package/dist/Form/src/Form.css +1034 -608
  33. package/dist/Form/src/Form.js +71 -67
  34. package/dist/Form/src/index.css +1034 -608
  35. package/dist/Form/src/index.js +71 -67
  36. package/dist/HelperMessage/src/HelperMessage.css +11 -11
  37. package/dist/HelperMessage/src/HelperMessage.js +2 -2
  38. package/dist/HelperMessage/src/index.css +11 -11
  39. package/dist/HelperMessage/src/index.js +2 -2
  40. package/dist/IconList/src/IconList.css +1 -1
  41. package/dist/IconList/src/IconList.js +1 -1
  42. package/dist/IconList/src/index.css +1 -1
  43. package/dist/IconList/src/index.js +1 -1
  44. package/dist/Link/src/Link.css +31 -31
  45. package/dist/Link/src/Link.js +2 -2
  46. package/dist/Link/src/index.css +31 -31
  47. package/dist/Link/src/index.js +2 -2
  48. package/dist/ListBox/src/ListBox.css +398 -201
  49. package/dist/ListBox/src/ListBox.js +15 -16
  50. package/dist/ListBox/src/ListBoxItem.css +380 -185
  51. package/dist/ListBox/src/ListBoxItem.js +14 -14
  52. package/dist/ListBox/src/ListBoxItemSkeleton.css +7 -7
  53. package/dist/ListBox/src/ListBoxItemSkeleton.js +1 -1
  54. package/dist/ListBox/src/index.css +398 -201
  55. package/dist/ListBox/src/index.js +15 -16
  56. package/dist/Select/src/Select.css +4537 -0
  57. package/dist/Select/src/Select.d.ts +93 -0
  58. package/dist/Select/src/Select.js +118 -0
  59. package/dist/Select/src/SelectContext.d.ts +16 -0
  60. package/dist/Select/src/SelectContext.js +2 -0
  61. package/dist/Select/src/SelectValue.css +443 -0
  62. package/dist/Select/src/SelectValue.d.ts +31 -0
  63. package/dist/Select/src/SelectValue.js +19 -0
  64. package/dist/Select/src/index.css +4537 -0
  65. package/dist/Select/src/index.d.ts +13 -0
  66. package/dist/Select/src/index.js +118 -0
  67. package/dist/Spinner/src/Spinner.css +19 -19
  68. package/dist/Spinner/src/Spinner.js +2 -2
  69. package/dist/Spinner/src/index.css +19 -19
  70. package/dist/Spinner/src/index.js +2 -2
  71. package/dist/buttons/src/Button.css +94 -94
  72. package/dist/buttons/src/Button.js +5 -5
  73. package/dist/buttons/src/ButtonGroup.css +11 -11
  74. package/dist/buttons/src/ButtonGroup.js +2 -2
  75. package/dist/buttons/src/ClearButton.css +70 -70
  76. package/dist/buttons/src/ClearButton.js +3 -3
  77. package/dist/buttons/src/EmbeddedButton.css +70 -70
  78. package/dist/buttons/src/EmbeddedButton.js +1 -1
  79. package/dist/buttons/src/index.css +175 -175
  80. package/dist/buttons/src/index.js +9 -9
  81. package/dist/checkbox/src/Checkbox.css +31 -31
  82. package/dist/checkbox/src/Checkbox.js +2 -2
  83. package/dist/checkbox/src/CheckboxField.css +15 -15
  84. package/dist/checkbox/src/CheckboxField.js +1 -1
  85. package/dist/checkbox/src/CheckboxGroup.css +60 -60
  86. package/dist/checkbox/src/CheckboxGroup.js +3 -3
  87. package/dist/checkbox/src/index.css +60 -60
  88. package/dist/checkbox/src/index.js +7 -7
  89. package/dist/{chunk-J7BXE7WN.js → chunk-2WWHL3EF.js} +4 -4
  90. package/dist/{chunk-6WKRP4MN.js → chunk-2ZOLM7VR.js} +11 -5
  91. package/dist/{chunk-F47GZGT7.js → chunk-47SFZCKK.js} +1 -1
  92. package/dist/{chunk-C7XRB2J6.js → chunk-52LHX4PE.js} +2 -2
  93. package/dist/{chunk-IUFABTFZ.js → chunk-5NMCOZOW.js} +1 -1
  94. package/dist/{chunk-J6YYPRGY.js → chunk-7QUXYE3E.js} +10 -7
  95. package/dist/{chunk-BN32T6QQ.js → chunk-A2S2Q73W.js} +2 -2
  96. package/dist/{chunk-YXD3IR3T.js → chunk-ANBOSYAL.js} +2 -2
  97. package/dist/chunk-ARD3LWL2.js +118 -0
  98. package/dist/{chunk-55AWCUQF.js → chunk-BF6YUKC2.js} +1 -1
  99. package/dist/{chunk-THUFFPGX.js → chunk-BO53NITW.js} +1 -1
  100. package/dist/{chunk-RLDQEH6F.js → chunk-BV7O26TY.js} +4 -4
  101. package/dist/chunk-CIGS4QGT.js +7 -0
  102. package/dist/{chunk-2DPE3H3G.js → chunk-D2GZKHYD.js} +1 -1
  103. package/dist/{chunk-T7QJEHL7.js → chunk-D7VVQIPM.js} +2 -2
  104. package/dist/chunk-EHXOXTDN.js +29 -0
  105. package/dist/{chunk-TM4R5NO7.js → chunk-EMD2K6B3.js} +2 -2
  106. package/dist/{chunk-MFFXNI66.js → chunk-ESWRMGHR.js} +4 -4
  107. package/dist/{chunk-CSE22YXO.js → chunk-EUELVL2L.js} +3 -3
  108. package/dist/{chunk-PUNJWQAN.js → chunk-GG6RHMJ7.js} +270 -45
  109. package/dist/{chunk-WYBQCRQB.js → chunk-HLXQ6C2E.js} +2 -2
  110. package/dist/{chunk-SPFANCCV.js → chunk-HXPTWMD5.js} +3 -3
  111. package/dist/{chunk-MX5BW5VE.js → chunk-JVDCU4PT.js} +1 -1
  112. package/dist/{chunk-XI3BX2TP.js → chunk-JVZRUDLP.js} +5 -5
  113. package/dist/{chunk-F4KQUFXI.js → chunk-L3Y67TUF.js} +3 -3
  114. package/dist/{chunk-QGC3OX7W.js → chunk-NEPRDVF7.js} +1 -1
  115. package/dist/{chunk-4APVXEPA.js → chunk-NJHNYL6X.js} +2 -2
  116. package/dist/{chunk-XUCH26RT.js → chunk-OLXX46IZ.js} +2 -2
  117. package/dist/{chunk-TFELIWJO.js → chunk-PUMWU6M4.js} +1 -1
  118. package/dist/{chunk-ZEXXNE5U.js → chunk-QAIK237T.js} +5 -5
  119. package/dist/{chunk-K7DU4YR4.js → chunk-QCTIAKM6.js} +1 -1
  120. package/dist/{chunk-CXWMHWSS.js → chunk-QSWSZUZM.js} +1 -1
  121. package/dist/{chunk-462UBJV3.js → chunk-SD6DBWYC.js} +1 -1
  122. package/dist/{chunk-ZPPQJKHC.js → chunk-SFZBLVJN.js} +2 -2
  123. package/dist/chunk-T24MBA34.js +7 -0
  124. package/dist/{chunk-F4H76S4H.js → chunk-TFVDF4YH.js} +4 -2
  125. package/dist/{chunk-DZKJZSTQ.js → chunk-TJMAMWRQ.js} +1 -1
  126. package/dist/{chunk-RYZNMKWB.js → chunk-UNSJTDXN.js} +1 -1
  127. package/dist/{chunk-AGRQ7UGN.js → chunk-USVXH6MO.js} +2 -2
  128. package/dist/{chunk-4H7PKEMJ.js → chunk-WDA6LWC4.js} +14 -13
  129. package/dist/chunk-X2T2UX2O.js +72 -0
  130. package/dist/{chunk-WQSVNGFJ.js → chunk-XF4SQ222.js} +1 -1
  131. package/dist/{chunk-YWIDJ55Q.js → chunk-XHQWDF7B.js} +2 -2
  132. package/dist/{chunk-VQC5F6I7.js → chunk-YD2TGFCB.js} +3 -3
  133. package/dist/{chunk-LXCCS4SA.js → chunk-ZG5E36S3.js} +7 -8
  134. package/dist/i18n/src/index.js +1 -1
  135. package/dist/i18n/src/useLocalizedString.js +1 -1
  136. package/dist/index.css +1034 -608
  137. package/dist/index.d.ts +9 -3
  138. package/dist/index.js +71 -67
  139. package/dist/inputs/src/InputGroup.css +14 -16
  140. package/dist/inputs/src/InputGroup.js +1 -1
  141. package/dist/inputs/src/NumberField.css +64 -65
  142. package/dist/inputs/src/NumberField.js +9 -9
  143. package/dist/inputs/src/PasswordField.css +218 -219
  144. package/dist/inputs/src/PasswordField.js +11 -11
  145. package/dist/inputs/src/SearchField.css +224 -225
  146. package/dist/inputs/src/SearchField.js +12 -12
  147. package/dist/inputs/src/TextArea.css +58 -59
  148. package/dist/inputs/src/TextArea.js +10 -10
  149. package/dist/inputs/src/TextField.css +219 -220
  150. package/dist/inputs/src/TextField.js +12 -12
  151. package/dist/inputs/src/index.css +271 -268
  152. package/dist/inputs/src/index.js +18 -18
  153. package/dist/overlays/Popover/src/Popover.css +1034 -608
  154. package/dist/overlays/Popover/src/Popover.d.ts +26 -3
  155. package/dist/overlays/Popover/src/Popover.js +71 -67
  156. package/dist/overlays/Popover/src/PopoverContext.d.ts +3 -0
  157. package/dist/overlays/Popover/src/index.css +1034 -608
  158. package/dist/overlays/Popover/src/index.d.ts +4 -1
  159. package/dist/overlays/Popover/src/index.js +71 -67
  160. package/dist/radio/src/Radio.css +31 -31
  161. package/dist/radio/src/Radio.js +2 -2
  162. package/dist/radio/src/RadioField.css +15 -15
  163. package/dist/radio/src/RadioField.js +1 -1
  164. package/dist/radio/src/RadioGroup.css +60 -60
  165. package/dist/radio/src/RadioGroup.js +3 -3
  166. package/dist/radio/src/index.css +60 -60
  167. package/dist/radio/src/index.js +7 -7
  168. package/dist/switch/src/Switch.css +25 -25
  169. package/dist/switch/src/Switch.js +2 -2
  170. package/dist/switch/src/SwitchField.css +15 -15
  171. package/dist/switch/src/SwitchField.js +1 -1
  172. package/dist/switch/src/index.css +31 -31
  173. package/dist/switch/src/index.js +3 -3
  174. package/dist/tag/src/Tag.css +473 -304
  175. package/dist/tag/src/Tag.js +6 -6
  176. package/dist/tag/src/TagGroup.css +22 -22
  177. package/dist/tag/src/TagGroup.js +2 -2
  178. package/dist/tag/src/index.css +486 -317
  179. package/dist/tag/src/index.js +9 -9
  180. package/dist/typography/Heading/src/Heading.css +9 -9
  181. package/dist/typography/Heading/src/Heading.js +1 -1
  182. package/dist/typography/Heading/src/index.css +9 -9
  183. package/dist/typography/Heading/src/index.js +1 -1
  184. package/dist/typography/Label/src/Label.css +3 -3
  185. package/dist/typography/Label/src/Label.js +2 -2
  186. package/dist/typography/Label/src/index.css +3 -3
  187. package/dist/typography/Label/src/index.js +2 -2
  188. package/dist/typography/OverlineText/src/OverlineText.css +6 -6
  189. package/dist/typography/OverlineText/src/OverlineText.js +1 -1
  190. package/dist/typography/OverlineText/src/index.css +6 -6
  191. package/dist/typography/OverlineText/src/index.js +1 -1
  192. package/dist/typography/Text/src/Text.css +9 -9
  193. package/dist/typography/Text/src/Text.js +1 -1
  194. package/dist/typography/Text/src/index.css +9 -9
  195. package/dist/typography/Text/src/index.js +1 -1
  196. package/dist/utils/src/index.d.ts +1 -0
  197. package/dist/utils/src/index.js +3 -2
  198. package/dist/utils/src/useIsOverflow.d.ts +5 -0
  199. package/dist/utils/src/useIsOverflow.js +2 -0
  200. package/package.json +6 -6
  201. package/dist/ListBox/src/useLoadOnScroll.d.ts +0 -16
  202. package/dist/ListBox/src/useLoadOnScroll.js +0 -2
  203. package/dist/chunk-JTNMFPM4.js +0 -41
@@ -1,24 +1,24 @@
1
- export { GlobalTagCssSelector, _Tag as Tag } from '../../chunk-J6YYPRGY.js';
2
- export { GlobalTagGroupCssSelector, _TagGroup as TagGroup } from '../../chunk-YWIDJ55Q.js';
3
- export { TagContext } from '../../chunk-EWMWQ2MC.js';
1
+ export { GlobalTagGroupCssSelector, _TagGroup as TagGroup } from '../../chunk-XHQWDF7B.js';
4
2
  export { TagGroupContext } from '../../chunk-LCAS3YQV.js';
5
3
  export { GlobalTagListCssSelector, _TagList as TagList } from '../../chunk-WWRB4K4M.js';
6
4
  export { TagListContext } from '../../chunk-XLKYXKWE.js';
7
- import '../../chunk-WYBQCRQB.js';
5
+ export { GlobalTagCssSelector, _Tag as Tag } from '../../chunk-7QUXYE3E.js';
6
+ export { TagContext } from '../../chunk-EWMWQ2MC.js';
7
+ import '../../chunk-HLXQ6C2E.js';
8
8
  import '../../chunk-DXVKHP4V.js';
9
- import '../../chunk-DZKJZSTQ.js';
9
+ import '../../chunk-TJMAMWRQ.js';
10
10
  import '../../chunk-O7IJYNVQ.js';
11
- import '../../chunk-AGRQ7UGN.js';
11
+ import '../../chunk-USVXH6MO.js';
12
12
  import '../../chunk-4ZYV2XLW.js';
13
13
  import '../../chunk-QCA3ZR56.js';
14
- import '../../chunk-F4H76S4H.js';
14
+ import '../../chunk-TFVDF4YH.js';
15
15
  import '../../chunk-ZWU6DRRZ.js';
16
16
  import '../../chunk-65JPI4FL.js';
17
17
  import '../../chunk-HZKFQ33E.js';
18
18
  import '../../chunk-DHVVYSLB.js';
19
- import '../../chunk-CQDLZ42T.js';
20
19
  import '../../chunk-FAE27DLF.js';
21
- import '../../chunk-K7DU4YR4.js';
20
+ import '../../chunk-CQDLZ42T.js';
21
+ import '../../chunk-QCTIAKM6.js';
22
22
  import '../../chunk-X6SER3TZ.js';
23
23
  import '../../chunk-HXI3MEEK.js';
24
24
  import '../../chunk-AES7QBQE.js';
@@ -1,5 +1,5 @@
1
1
  /* css-module:/home/runner/work/wl-hopper/wl-hopper/packages/components/src/typography/Heading/src/Heading.module.css/#css-module-data */
2
- .Heading-module__hop-Heading___uAJ5h {
2
+ .Heading-module__hop-Heading___bg7Vw {
3
3
  --hop-Heading-xs-font-size: var(--hop-heading-xs-font-size);
4
4
  --hop-Heading-xs-font-family: var(--hop-heading-xs-font-family);
5
5
  --hop-Heading-xs-font-weight: var(--hop-heading-xs-font-weight);
@@ -33,50 +33,50 @@
33
33
  --hop-Heading-inherit-size-font-weight: inherit;
34
34
  --hop-Heading-inherit-size-line-height: inherit;
35
35
  }
36
- :where(.Heading-module__hop-Heading___uAJ5h) {
36
+ :where(.Heading-module__hop-Heading___bg7Vw) {
37
37
  margin: 0;
38
38
  font-family: var(--font-family);
39
39
  font-size: var(--font-size);
40
40
  font-weight: var(--font-weight);
41
41
  line-height: var(--line-height);
42
42
  }
43
- :where(.Heading-module__hop-Heading--xs___GM0hn) {
43
+ :where(.Heading-module__hop-Heading--xs___cJICk) {
44
44
  --font-size: var(--hop-Heading-xs-font-size);
45
45
  --font-family: var(--hop-Heading-xs-font-family);
46
46
  --font-weight: var(--hop-Heading-xs-font-weight);
47
47
  --line-height: var(--hop-Heading-xs-line-height);
48
48
  }
49
- :where(.Heading-module__hop-Heading--sm___jvfjH) {
49
+ :where(.Heading-module__hop-Heading--sm___vU8hq) {
50
50
  --font-size: var(--hop-Heading-sm-font-size);
51
51
  --font-family: var(--hop-Heading-sm-font-family);
52
52
  --font-weight: var(--hop-Heading-sm-font-weight);
53
53
  --line-height: var(--hop-Heading-sm-line-height);
54
54
  }
55
- :where(.Heading-module__hop-Heading--md___8sUov) {
55
+ :where(.Heading-module__hop-Heading--md___z6GMX) {
56
56
  --font-size: var(--hop-Heading-md-font-size);
57
57
  --font-family: var(--hop-Heading-md-font-family);
58
58
  --font-weight: var(--hop-Heading-md-font-weight);
59
59
  --line-height: var(--hop-Heading-md-line-height);
60
60
  }
61
- :where(.Heading-module__hop-Heading--lg___AaXUx) {
61
+ :where(.Heading-module__hop-Heading--lg___jgsIb) {
62
62
  --font-size: var(--hop-Heading-lg-font-size);
63
63
  --font-family: var(--hop-Heading-lg-font-family);
64
64
  --font-weight: var(--hop-Heading-lg-font-weight);
65
65
  --line-height: var(--hop-Heading-lg-line-height);
66
66
  }
67
- :where(.Heading-module__hop-Heading--xl___V5Rgs) {
67
+ :where(.Heading-module__hop-Heading--xl___9EVlv) {
68
68
  --font-size: var(--hop-Heading-xl-font-size);
69
69
  --font-family: var(--hop-Heading-xl-font-family);
70
70
  --font-weight: var(--hop-Heading-xl-font-weight);
71
71
  --line-height: var(--hop-Heading-xl-line-height);
72
72
  }
73
- :where(.Heading-module__hop-Heading--2xl___21pHk) {
73
+ :where(.Heading-module__hop-Heading--2xl___kHIrr) {
74
74
  --font-size: var(--hop-Heading-2xl-font-size);
75
75
  --font-family: var(--hop-Heading-2xl-font-family);
76
76
  --font-weight: var(--hop-Heading-2xl-font-weight);
77
77
  --line-height: var(--hop-Heading-2xl-line-height);
78
78
  }
79
- :where(.Heading-module__hop-Heading--3xl___Z-RFz) {
79
+ :where(.Heading-module__hop-Heading--3xl___slkv6) {
80
80
  --font-size: var(--hop-Heading-3xl-font-size);
81
81
  --font-family: var(--hop-Heading-3xl-font-family);
82
82
  --font-weight: var(--hop-Heading-3xl-font-weight);
@@ -1,4 +1,4 @@
1
- export { GlobalHeadingCssSelector, H1, H2, H3, H4, H5, H6, _Heading as Heading } from '../../../chunk-F47GZGT7.js';
1
+ export { GlobalHeadingCssSelector, H1, H2, H3, H4, H5, H6, _Heading as Heading } from '../../../chunk-47SFZCKK.js';
2
2
  import '../../../chunk-TXZ6BMFR.js';
3
3
  import '../../../chunk-KVDXQMWI.js';
4
4
  import '../../../chunk-JSBRDJBE.js';
@@ -1,5 +1,5 @@
1
1
  /* css-module:/home/runner/work/wl-hopper/wl-hopper/packages/components/src/typography/Heading/src/Heading.module.css/#css-module-data */
2
- .Heading-module__hop-Heading___uAJ5h {
2
+ .Heading-module__hop-Heading___bg7Vw {
3
3
  --hop-Heading-xs-font-size: var(--hop-heading-xs-font-size);
4
4
  --hop-Heading-xs-font-family: var(--hop-heading-xs-font-family);
5
5
  --hop-Heading-xs-font-weight: var(--hop-heading-xs-font-weight);
@@ -33,50 +33,50 @@
33
33
  --hop-Heading-inherit-size-font-weight: inherit;
34
34
  --hop-Heading-inherit-size-line-height: inherit;
35
35
  }
36
- :where(.Heading-module__hop-Heading___uAJ5h) {
36
+ :where(.Heading-module__hop-Heading___bg7Vw) {
37
37
  margin: 0;
38
38
  font-family: var(--font-family);
39
39
  font-size: var(--font-size);
40
40
  font-weight: var(--font-weight);
41
41
  line-height: var(--line-height);
42
42
  }
43
- :where(.Heading-module__hop-Heading--xs___GM0hn) {
43
+ :where(.Heading-module__hop-Heading--xs___cJICk) {
44
44
  --font-size: var(--hop-Heading-xs-font-size);
45
45
  --font-family: var(--hop-Heading-xs-font-family);
46
46
  --font-weight: var(--hop-Heading-xs-font-weight);
47
47
  --line-height: var(--hop-Heading-xs-line-height);
48
48
  }
49
- :where(.Heading-module__hop-Heading--sm___jvfjH) {
49
+ :where(.Heading-module__hop-Heading--sm___vU8hq) {
50
50
  --font-size: var(--hop-Heading-sm-font-size);
51
51
  --font-family: var(--hop-Heading-sm-font-family);
52
52
  --font-weight: var(--hop-Heading-sm-font-weight);
53
53
  --line-height: var(--hop-Heading-sm-line-height);
54
54
  }
55
- :where(.Heading-module__hop-Heading--md___8sUov) {
55
+ :where(.Heading-module__hop-Heading--md___z6GMX) {
56
56
  --font-size: var(--hop-Heading-md-font-size);
57
57
  --font-family: var(--hop-Heading-md-font-family);
58
58
  --font-weight: var(--hop-Heading-md-font-weight);
59
59
  --line-height: var(--hop-Heading-md-line-height);
60
60
  }
61
- :where(.Heading-module__hop-Heading--lg___AaXUx) {
61
+ :where(.Heading-module__hop-Heading--lg___jgsIb) {
62
62
  --font-size: var(--hop-Heading-lg-font-size);
63
63
  --font-family: var(--hop-Heading-lg-font-family);
64
64
  --font-weight: var(--hop-Heading-lg-font-weight);
65
65
  --line-height: var(--hop-Heading-lg-line-height);
66
66
  }
67
- :where(.Heading-module__hop-Heading--xl___V5Rgs) {
67
+ :where(.Heading-module__hop-Heading--xl___9EVlv) {
68
68
  --font-size: var(--hop-Heading-xl-font-size);
69
69
  --font-family: var(--hop-Heading-xl-font-family);
70
70
  --font-weight: var(--hop-Heading-xl-font-weight);
71
71
  --line-height: var(--hop-Heading-xl-line-height);
72
72
  }
73
- :where(.Heading-module__hop-Heading--2xl___21pHk) {
73
+ :where(.Heading-module__hop-Heading--2xl___kHIrr) {
74
74
  --font-size: var(--hop-Heading-2xl-font-size);
75
75
  --font-family: var(--hop-Heading-2xl-font-family);
76
76
  --font-weight: var(--hop-Heading-2xl-font-weight);
77
77
  --line-height: var(--hop-Heading-2xl-line-height);
78
78
  }
79
- :where(.Heading-module__hop-Heading--3xl___Z-RFz) {
79
+ :where(.Heading-module__hop-Heading--3xl___slkv6) {
80
80
  --font-size: var(--hop-Heading-3xl-font-size);
81
81
  --font-family: var(--hop-Heading-3xl-font-family);
82
82
  --font-weight: var(--hop-Heading-3xl-font-weight);
@@ -1,4 +1,4 @@
1
- export { GlobalHeadingCssSelector, H1, H2, H3, H4, H5, H6, _Heading as Heading } from '../../../chunk-F47GZGT7.js';
1
+ export { GlobalHeadingCssSelector, H1, H2, H3, H4, H5, H6, _Heading as Heading } from '../../../chunk-47SFZCKK.js';
2
2
  export { HeadingContext } from '../../../chunk-TXZ6BMFR.js';
3
3
  import '../../../chunk-KVDXQMWI.js';
4
4
  import '../../../chunk-JSBRDJBE.js';
@@ -1,18 +1,18 @@
1
1
  /* css-module:/home/runner/work/wl-hopper/wl-hopper/packages/components/src/typography/Label/src/Label.module.css/#css-module-data */
2
- .Label-module__hop-Label___43PE1 {
2
+ .Label-module__hop-Label___xyX8G {
3
3
  --hop-Label-font-size: var(--hop-heading-xs-font-size);
4
4
  --hop-Label-font-family: var(--hop-heading-xs-font-family);
5
5
  --hop-Label-font-weight: var(--hop-heading-xs-font-weight);
6
6
  --hop-Label-line-height: var(--hop-heading-xs-line-height);
7
7
  --hop-Label-color: var(--hop-neutral-text-weak);
8
8
  }
9
- :where(.Label-module__hop-Label___43PE1) {
9
+ :where(.Label-module__hop-Label___xyX8G) {
10
10
  font-family: var(--hop-Label-font-family);
11
11
  font-size: var(--hop-Label-font-size);
12
12
  font-weight: var(--hop-Label-font-weight);
13
13
  line-height: var(--hop-Label-line-height);
14
14
  color: var(--hop-Label-color);
15
15
  }
16
- :where(.Label-module__hop-Label__indicator___PXvS0) {
16
+ :where(.Label-module__hop-Label__indicator___QJQXo) {
17
17
  padding-inline-start: var(--hop-space-20);
18
18
  }
@@ -1,5 +1,5 @@
1
- export { GlobalLabelCssSelector, _Label as Label } from '../../../chunk-XUCH26RT.js';
1
+ export { GlobalLabelCssSelector, _Label as Label } from '../../../chunk-OLXX46IZ.js';
2
2
  import '../../../chunk-QCA3ZR56.js';
3
- import '../../../chunk-F4H76S4H.js';
3
+ import '../../../chunk-TFVDF4YH.js';
4
4
  import '../../../chunk-KVDXQMWI.js';
5
5
  import '../../../chunk-JSBRDJBE.js';
@@ -1,18 +1,18 @@
1
1
  /* css-module:/home/runner/work/wl-hopper/wl-hopper/packages/components/src/typography/Label/src/Label.module.css/#css-module-data */
2
- .Label-module__hop-Label___43PE1 {
2
+ .Label-module__hop-Label___xyX8G {
3
3
  --hop-Label-font-size: var(--hop-heading-xs-font-size);
4
4
  --hop-Label-font-family: var(--hop-heading-xs-font-family);
5
5
  --hop-Label-font-weight: var(--hop-heading-xs-font-weight);
6
6
  --hop-Label-line-height: var(--hop-heading-xs-line-height);
7
7
  --hop-Label-color: var(--hop-neutral-text-weak);
8
8
  }
9
- :where(.Label-module__hop-Label___43PE1) {
9
+ :where(.Label-module__hop-Label___xyX8G) {
10
10
  font-family: var(--hop-Label-font-family);
11
11
  font-size: var(--hop-Label-font-size);
12
12
  font-weight: var(--hop-Label-font-weight);
13
13
  line-height: var(--hop-Label-line-height);
14
14
  color: var(--hop-Label-color);
15
15
  }
16
- :where(.Label-module__hop-Label__indicator___PXvS0) {
16
+ :where(.Label-module__hop-Label__indicator___QJQXo) {
17
17
  padding-inline-start: var(--hop-space-20);
18
18
  }
@@ -1,5 +1,5 @@
1
- export { GlobalLabelCssSelector, _Label as Label } from '../../../chunk-XUCH26RT.js';
1
+ export { GlobalLabelCssSelector, _Label as Label } from '../../../chunk-OLXX46IZ.js';
2
2
  export { LabelContext } from '../../../chunk-QCA3ZR56.js';
3
- import '../../../chunk-F4H76S4H.js';
3
+ import '../../../chunk-TFVDF4YH.js';
4
4
  import '../../../chunk-KVDXQMWI.js';
5
5
  import '../../../chunk-JSBRDJBE.js';
@@ -1,5 +1,5 @@
1
1
  /* css-module:/home/runner/work/wl-hopper/wl-hopper/packages/components/src/typography/OverlineText/src/OverlineText.module.css/#css-module-data */
2
- :where(.OverlineText-module__hop-OverlineText___N5J5g) {
2
+ :where(.OverlineText-module__hop-OverlineText___-AumH) {
3
3
  --hop-OverlineText-font-family: var(--hop-overline-font-family);
4
4
  --hop-OverlineText-font-size: var(--hop-overline-font-size);
5
5
  --hop-OverlineText-font-weight: var(--hop-overline-font-weight);
@@ -23,20 +23,20 @@
23
23
  text-transform: uppercase;
24
24
  letter-spacing: var(--letter-spacing);
25
25
  }
26
- .OverlineText-module__hop-OverlineText__text___EUFfb {
26
+ .OverlineText-module__hop-OverlineText__text___epYug {
27
27
  box-sizing: border-box;
28
28
  }
29
- .OverlineText-module__hop-OverlineText__text___EUFfb::before,
30
- .OverlineText-module__hop-OverlineText__text___EUFfb::after {
29
+ .OverlineText-module__hop-OverlineText__text___epYug::before,
30
+ .OverlineText-module__hop-OverlineText__text___epYug::after {
31
31
  content: "";
32
32
  display: block;
33
33
  box-sizing: border-box;
34
34
  inline-size: 0;
35
35
  block-size: 0;
36
36
  }
37
- .OverlineText-module__hop-OverlineText__text___EUFfb::before {
37
+ .OverlineText-module__hop-OverlineText__text___epYug::before {
38
38
  margin-block-end: var(--bottom-offset);
39
39
  }
40
- .OverlineText-module__hop-OverlineText__text___EUFfb::after {
40
+ .OverlineText-module__hop-OverlineText__text___epYug::after {
41
41
  margin-block-start: var(--top-offset);
42
42
  }
@@ -1,4 +1,4 @@
1
- export { GlobalOverlineTextCssSelector, _OverlineText as OverlineText } from '../../../chunk-MX5BW5VE.js';
1
+ export { GlobalOverlineTextCssSelector, _OverlineText as OverlineText } from '../../../chunk-JVDCU4PT.js';
2
2
  import '../../../chunk-WPNVVGFW.js';
3
3
  import '../../../chunk-KVDXQMWI.js';
4
4
  import '../../../chunk-JSBRDJBE.js';
@@ -1,5 +1,5 @@
1
1
  /* css-module:/home/runner/work/wl-hopper/wl-hopper/packages/components/src/typography/OverlineText/src/OverlineText.module.css/#css-module-data */
2
- :where(.OverlineText-module__hop-OverlineText___N5J5g) {
2
+ :where(.OverlineText-module__hop-OverlineText___-AumH) {
3
3
  --hop-OverlineText-font-family: var(--hop-overline-font-family);
4
4
  --hop-OverlineText-font-size: var(--hop-overline-font-size);
5
5
  --hop-OverlineText-font-weight: var(--hop-overline-font-weight);
@@ -23,20 +23,20 @@
23
23
  text-transform: uppercase;
24
24
  letter-spacing: var(--letter-spacing);
25
25
  }
26
- .OverlineText-module__hop-OverlineText__text___EUFfb {
26
+ .OverlineText-module__hop-OverlineText__text___epYug {
27
27
  box-sizing: border-box;
28
28
  }
29
- .OverlineText-module__hop-OverlineText__text___EUFfb::before,
30
- .OverlineText-module__hop-OverlineText__text___EUFfb::after {
29
+ .OverlineText-module__hop-OverlineText__text___epYug::before,
30
+ .OverlineText-module__hop-OverlineText__text___epYug::after {
31
31
  content: "";
32
32
  display: block;
33
33
  box-sizing: border-box;
34
34
  inline-size: 0;
35
35
  block-size: 0;
36
36
  }
37
- .OverlineText-module__hop-OverlineText__text___EUFfb::before {
37
+ .OverlineText-module__hop-OverlineText__text___epYug::before {
38
38
  margin-block-end: var(--bottom-offset);
39
39
  }
40
- .OverlineText-module__hop-OverlineText__text___EUFfb::after {
40
+ .OverlineText-module__hop-OverlineText__text___epYug::after {
41
41
  margin-block-start: var(--top-offset);
42
42
  }
@@ -1,4 +1,4 @@
1
- export { GlobalOverlineTextCssSelector, _OverlineText as OverlineText } from '../../../chunk-MX5BW5VE.js';
1
+ export { GlobalOverlineTextCssSelector, _OverlineText as OverlineText } from '../../../chunk-JVDCU4PT.js';
2
2
  export { OverlineTextContext } from '../../../chunk-WPNVVGFW.js';
3
3
  import '../../../chunk-KVDXQMWI.js';
4
4
  import '../../../chunk-JSBRDJBE.js';
@@ -1,5 +1,5 @@
1
1
  /* css-module:/home/runner/work/wl-hopper/wl-hopper/packages/components/src/typography/Text/src/Text.module.css/#css-module-data */
2
- .Text-module__hop-Text___Ww7PP {
2
+ .Text-module__hop-Text___D1rn4 {
3
3
  --hop-Text-xs-font-size: var(--hop-body-xs-font-size);
4
4
  --hop-Text-xs-font-family: var(--hop-body-xs-font-family);
5
5
  --hop-Text-xs-font-weight: var(--hop-body-xs-font-weight);
@@ -29,49 +29,49 @@
29
29
  --hop-Text-inherit-size-font-weight: inherit;
30
30
  --hop-Text-inherit-size-line-height: inherit;
31
31
  }
32
- :where(.Text-module__hop-Text___Ww7PP) {
32
+ :where(.Text-module__hop-Text___D1rn4) {
33
33
  font-family: var(--font-family);
34
34
  font-size: var(--font-size);
35
35
  font-weight: var(--font-weight);
36
36
  line-height: var(--line-height);
37
37
  }
38
- :where(.Text-module__hop-Text--xs___YsuwL) {
38
+ :where(.Text-module__hop-Text--xs___83nUB) {
39
39
  --font-size: var(--hop-Text-xs-font-size);
40
40
  --font-family: var(--hop-Text-xs-font-family);
41
41
  --font-weight: var(--hop-Text-xs-font-weight);
42
42
  --line-height: var(--hop-Text-xs-line-height);
43
43
  }
44
- :where(.Text-module__hop-Text--sm___9lTR-) {
44
+ :where(.Text-module__hop-Text--sm___J7Ynn) {
45
45
  --font-size: var(--hop-Text-sm-font-size);
46
46
  --font-family: var(--hop-Text-sm-font-family);
47
47
  --font-weight: var(--hop-Text-sm-font-weight);
48
48
  --line-height: var(--hop-Text-sm-line-height);
49
49
  }
50
- :where(.Text-module__hop-Text--md___to5eX) {
50
+ :where(.Text-module__hop-Text--md___vDq4E) {
51
51
  --font-size: var(--hop-Text-md-font-size);
52
52
  --font-family: var(--hop-Text-md-font-family);
53
53
  --font-weight: var(--hop-Text-md-font-weight);
54
54
  --line-height: var(--hop-Text-md-line-height);
55
55
  }
56
- :where(.Text-module__hop-Text--lg___Y-6Mo) {
56
+ :where(.Text-module__hop-Text--lg___d93YP) {
57
57
  --font-size: var(--hop-Text-lg-font-size);
58
58
  --font-family: var(--hop-Text-lg-font-family);
59
59
  --font-weight: var(--hop-Text-lg-font-weight);
60
60
  --line-height: var(--hop-Text-lg-line-height);
61
61
  }
62
- :where(.Text-module__hop-Text--xl___Qo9et) {
62
+ :where(.Text-module__hop-Text--xl___7Poiv) {
63
63
  --font-size: var(--hop-Text-xl-font-size);
64
64
  --font-family: var(--hop-Text-xl-font-family);
65
65
  --font-weight: var(--hop-Text-xl-font-weight);
66
66
  --line-height: var(--hop-Text-xl-line-height);
67
67
  }
68
- :where(.Text-module__hop-Text--2xl___dViKj) {
68
+ :where(.Text-module__hop-Text--2xl___owE8f) {
69
69
  --font-size: var(--hop-Text-2xl-font-size);
70
70
  --font-family: var(--hop-Text-2xl-font-family);
71
71
  --font-weight: var(--hop-Text-2xl-font-weight);
72
72
  --line-height: var(--hop-Text-2xl-line-height);
73
73
  }
74
- :where(.Text-module__hop-Text--inherit___uMHTH) {
74
+ :where(.Text-module__hop-Text--inherit___LGo4-) {
75
75
  --font-size: var(--hop-Text-inherit-size-font-size);
76
76
  --font-family: var(--hop-Text-inherit-size-font-family);
77
77
  --font-weight: var(--hop-Text-inherit-size-font-weight);
@@ -1,4 +1,4 @@
1
- export { GlobalTextCssSelector, _Text as Text } from '../../../chunk-K7DU4YR4.js';
1
+ export { GlobalTextCssSelector, _Text as Text } from '../../../chunk-QCTIAKM6.js';
2
2
  import '../../../chunk-X6SER3TZ.js';
3
3
  import '../../../chunk-HXI3MEEK.js';
4
4
  import '../../../chunk-M36KANKC.js';
@@ -1,5 +1,5 @@
1
1
  /* css-module:/home/runner/work/wl-hopper/wl-hopper/packages/components/src/typography/Text/src/Text.module.css/#css-module-data */
2
- .Text-module__hop-Text___Ww7PP {
2
+ .Text-module__hop-Text___D1rn4 {
3
3
  --hop-Text-xs-font-size: var(--hop-body-xs-font-size);
4
4
  --hop-Text-xs-font-family: var(--hop-body-xs-font-family);
5
5
  --hop-Text-xs-font-weight: var(--hop-body-xs-font-weight);
@@ -29,49 +29,49 @@
29
29
  --hop-Text-inherit-size-font-weight: inherit;
30
30
  --hop-Text-inherit-size-line-height: inherit;
31
31
  }
32
- :where(.Text-module__hop-Text___Ww7PP) {
32
+ :where(.Text-module__hop-Text___D1rn4) {
33
33
  font-family: var(--font-family);
34
34
  font-size: var(--font-size);
35
35
  font-weight: var(--font-weight);
36
36
  line-height: var(--line-height);
37
37
  }
38
- :where(.Text-module__hop-Text--xs___YsuwL) {
38
+ :where(.Text-module__hop-Text--xs___83nUB) {
39
39
  --font-size: var(--hop-Text-xs-font-size);
40
40
  --font-family: var(--hop-Text-xs-font-family);
41
41
  --font-weight: var(--hop-Text-xs-font-weight);
42
42
  --line-height: var(--hop-Text-xs-line-height);
43
43
  }
44
- :where(.Text-module__hop-Text--sm___9lTR-) {
44
+ :where(.Text-module__hop-Text--sm___J7Ynn) {
45
45
  --font-size: var(--hop-Text-sm-font-size);
46
46
  --font-family: var(--hop-Text-sm-font-family);
47
47
  --font-weight: var(--hop-Text-sm-font-weight);
48
48
  --line-height: var(--hop-Text-sm-line-height);
49
49
  }
50
- :where(.Text-module__hop-Text--md___to5eX) {
50
+ :where(.Text-module__hop-Text--md___vDq4E) {
51
51
  --font-size: var(--hop-Text-md-font-size);
52
52
  --font-family: var(--hop-Text-md-font-family);
53
53
  --font-weight: var(--hop-Text-md-font-weight);
54
54
  --line-height: var(--hop-Text-md-line-height);
55
55
  }
56
- :where(.Text-module__hop-Text--lg___Y-6Mo) {
56
+ :where(.Text-module__hop-Text--lg___d93YP) {
57
57
  --font-size: var(--hop-Text-lg-font-size);
58
58
  --font-family: var(--hop-Text-lg-font-family);
59
59
  --font-weight: var(--hop-Text-lg-font-weight);
60
60
  --line-height: var(--hop-Text-lg-line-height);
61
61
  }
62
- :where(.Text-module__hop-Text--xl___Qo9et) {
62
+ :where(.Text-module__hop-Text--xl___7Poiv) {
63
63
  --font-size: var(--hop-Text-xl-font-size);
64
64
  --font-family: var(--hop-Text-xl-font-family);
65
65
  --font-weight: var(--hop-Text-xl-font-weight);
66
66
  --line-height: var(--hop-Text-xl-line-height);
67
67
  }
68
- :where(.Text-module__hop-Text--2xl___dViKj) {
68
+ :where(.Text-module__hop-Text--2xl___owE8f) {
69
69
  --font-size: var(--hop-Text-2xl-font-size);
70
70
  --font-family: var(--hop-Text-2xl-font-family);
71
71
  --font-weight: var(--hop-Text-2xl-font-weight);
72
72
  --line-height: var(--hop-Text-2xl-line-height);
73
73
  }
74
- :where(.Text-module__hop-Text--inherit___uMHTH) {
74
+ :where(.Text-module__hop-Text--inherit___LGo4-) {
75
75
  --font-size: var(--hop-Text-inherit-size-font-size);
76
76
  --font-family: var(--hop-Text-inherit-size-font-family);
77
77
  --font-weight: var(--hop-Text-inherit-size-font-weight);
@@ -1,4 +1,4 @@
1
- export { GlobalTextCssSelector, _Text as Text } from '../../../chunk-K7DU4YR4.js';
1
+ export { GlobalTextCssSelector, _Text as Text } from '../../../chunk-QCTIAKM6.js';
2
2
  export { TextContext } from '../../../chunk-X6SER3TZ.js';
3
3
  import '../../../chunk-HXI3MEEK.js';
4
4
  import '../../../chunk-M36KANKC.js';
@@ -4,6 +4,7 @@ export { Size, SizeAdapter } from './sizeAdapter.js';
4
4
  export { BaseComponentProps, DOMProps, InteractionProps, RenderProps, RenderPropsHookOptions, StyleProps, StyleRenderProps } from './types.js';
5
5
  export { isTextOnlyChildren } from './isTextOnlyChildren.js';
6
6
  export { SlotProvider, SlotProviderProps } from './SlotProvider.js';
7
+ export { useIsOverflow } from './useIsOverflow.js';
7
8
  export { useFontFaceReady } from './useFontFaceReady.js';
8
9
  export { Scale, useScale } from './useScale.js';
9
10
  export { useSlot } from './useSlot.js';
@@ -1,8 +1,9 @@
1
- import '../../chunk-SNIF7MEM.js';
2
1
  import '../../chunk-LQICWONC.js';
3
- export { useFontFaceReady } from '../../chunk-IU6XMS2X.js';
2
+ import '../../chunk-SNIF7MEM.js';
4
3
  export { useTruncatedText } from '../../chunk-Z57VHYOF.js';
4
+ export { useFontFaceReady } from '../../chunk-IU6XMS2X.js';
5
5
  export { useScale } from '../../chunk-MTDFS4CZ.js';
6
+ export { useIsOverflow } from '../../chunk-EHXOXTDN.js';
6
7
  export { useSlot } from '../../chunk-H5YTU3U7.js';
7
8
  export { isArray, isDefined, isEmptyArray, isFunction, isNil, isNilOrEmpty, isNull, isNumber, isObject, isPlainObject, isPromise, isString, isUndefined } from '../../chunk-TIPN4VYD.js';
8
9
  export { isTextOnlyChildren } from '../../chunk-ZWU6DRRZ.js';
@@ -0,0 +1,5 @@
1
+ import { RefObject } from 'react';
2
+
3
+ declare const useIsOverflow: (ref?: RefObject<HTMLElement>, callback?: (isOverflow: boolean) => void) => boolean;
4
+
5
+ export { useIsOverflow };
@@ -0,0 +1,2 @@
1
+ export { useIsOverflow } from '../../chunk-EHXOXTDN.js';
2
+ import '../../chunk-JSBRDJBE.js';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hopper-ui/components",
3
3
  "author": "Workleap",
4
- "version": "1.2.1",
4
+ "version": "1.3.1",
5
5
  "description": "The components package.",
6
6
  "license": "Apache-2.0",
7
7
  "repository": {
@@ -36,14 +36,14 @@
36
36
  "peerDependencies": {
37
37
  "@hopper-ui/styled-system": "^2.1.0",
38
38
  "react": "^18",
39
- "react-aria": "^3.32",
40
- "react-aria-components": "^1.1.0",
39
+ "react-aria": "^3.34",
40
+ "react-aria-components": "^1.3.0",
41
41
  "react-dom": "^18"
42
42
  },
43
43
  "dependencies": {
44
- "@react-aria/utils": "^3.24.1",
45
- "@react-stately/utils": "^3.10.1",
46
- "@react-types/shared": "^3.23.1",
44
+ "@react-aria/utils": "^3.25.2",
45
+ "@react-stately/utils": "^3.10.3",
46
+ "@react-types/shared": "^3.24.1",
47
47
  "clsx": "^2.1.1",
48
48
  "@hopper-ui/icons": "2.8.0"
49
49
  },
@@ -1,16 +0,0 @@
1
- import { RefObject } from 'react';
2
-
3
- interface LoadOnScrollProps {
4
- /** Whether data is currently being loaded. */
5
- isLoading?: boolean;
6
- /** Handler that is called when more items should be loaded, e.g. while scrolling near the bottom. */
7
- onLoadMore?: () => void;
8
- /**
9
- * The amount of offset (in pixels) from the bottom of your scrollable region that should trigger load more.
10
- * @default 5
11
- */
12
- scrollOffset?: number;
13
- }
14
- declare function useLoadOnScroll(props: LoadOnScrollProps, ref: RefObject<HTMLElement | null>): () => void;
15
-
16
- export { type LoadOnScrollProps, useLoadOnScroll };
@@ -1,2 +0,0 @@
1
- export { useLoadOnScroll } from '../../chunk-JTNMFPM4.js';
2
- import '../../chunk-JSBRDJBE.js';
@@ -1,41 +0,0 @@
1
- import { useIsomorphicLayoutEffect } from '@hopper-ui/styled-system';
2
- import { useState, useRef, useCallback } from 'react';
3
-
4
- // src/ListBox/src/useLoadOnScroll.ts
5
- function useLoadOnScroll(props, ref) {
6
- const { isLoading, onLoadMore, scrollOffset = 5 } = props;
7
- const [hasLoaded, setHasLoaded] = useState(false);
8
- const isLoadingRef = useRef(isLoading);
9
- const prevProps = useRef(props);
10
- const onScroll = useCallback(() => {
11
- if (ref.current && !isLoadingRef.current && onLoadMore) {
12
- const shouldLoadMore = ref.current.scrollHeight - ref.current.scrollTop - ref.current.clientHeight < scrollOffset;
13
- if (shouldLoadMore) {
14
- isLoadingRef.current = true;
15
- onLoadMore();
16
- }
17
- }
18
- }, [onLoadMore, ref, scrollOffset]);
19
- const lastContentSize = useRef(0);
20
- useIsomorphicLayoutEffect(() => {
21
- var _a;
22
- const wasLoading = isLoadingRef.current;
23
- if (props !== prevProps.current) {
24
- isLoadingRef.current = isLoading;
25
- prevProps.current = props;
26
- }
27
- const shouldLoadMore = !hasLoaded && (ref == null ? void 0 : ref.current) && !isLoadingRef.current && onLoadMore && ref.current.clientHeight === ref.current.scrollHeight && (wasLoading || ref.current.scrollHeight !== lastContentSize.current);
28
- if (shouldLoadMore) {
29
- isLoadingRef.current = true;
30
- onLoadMore == null ? void 0 : onLoadMore();
31
- setHasLoaded(true);
32
- }
33
- lastContentSize.current = ((_a = ref.current) == null ? void 0 : _a.scrollHeight) || 0;
34
- return () => {
35
- setHasLoaded(false);
36
- };
37
- }, [isLoading, onLoadMore, props, ref]);
38
- return onScroll;
39
- }
40
-
41
- export { useLoadOnScroll };