@hopper-ui/components 1.0.6 → 1.0.8

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 (237) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/Avatar/src/AnonymousAvatar.css +10 -10
  3. package/dist/Avatar/src/AnonymousAvatar.js +3 -3
  4. package/dist/Avatar/src/Avatar.css +37 -37
  5. package/dist/Avatar/src/Avatar.js +5 -5
  6. package/dist/Avatar/src/AvatarContext.js +1 -1
  7. package/dist/Avatar/src/DeletedAvatar.css +10 -10
  8. package/dist/Avatar/src/DeletedAvatar.js +3 -3
  9. package/dist/Avatar/src/RichIconAvatarImage.css +10 -10
  10. package/dist/Avatar/src/RichIconAvatarImage.js +2 -2
  11. package/dist/Avatar/src/RichIconAvatarImageContext.js +1 -1
  12. package/dist/Avatar/src/index.css +37 -37
  13. package/dist/Avatar/src/index.js +7 -7
  14. package/dist/Avatar/src/useImageFallback.js +1 -1
  15. package/dist/Badge/src/Badge.css +10 -10
  16. package/dist/Badge/src/Badge.js +3 -3
  17. package/dist/Badge/src/BadgeContext.js +1 -1
  18. package/dist/Badge/src/index.css +10 -10
  19. package/dist/Badge/src/index.js +3 -3
  20. package/dist/Chip/src/Chip.css +33 -33
  21. package/dist/Chip/src/Chip.js +3 -3
  22. package/dist/Chip/src/ChipContext.js +1 -1
  23. package/dist/Chip/src/index.css +33 -33
  24. package/dist/Chip/src/index.js +3 -3
  25. package/dist/Divider/src/Divider.css +2 -2
  26. package/dist/Divider/src/Divider.js +2 -2
  27. package/dist/Divider/src/DividerContext.js +1 -1
  28. package/dist/Divider/src/index.css +2 -2
  29. package/dist/Divider/src/index.js +2 -2
  30. package/dist/ErrorMessage/src/ErrorMessage.css +11 -11
  31. package/dist/ErrorMessage/src/ErrorMessage.js +3 -3
  32. package/dist/ErrorMessage/src/ErrorMessageContext.js +1 -1
  33. package/dist/ErrorMessage/src/index.css +11 -11
  34. package/dist/ErrorMessage/src/index.js +3 -3
  35. package/dist/Header/src/Header.js +1 -1
  36. package/dist/Header/src/HeaderContext.js +1 -1
  37. package/dist/Header/src/index.js +1 -1
  38. package/dist/HelperMessage/src/HelperMessage.css +11 -11
  39. package/dist/HelperMessage/src/HelperMessage.js +3 -3
  40. package/dist/HelperMessage/src/HelperMessageContext.js +1 -1
  41. package/dist/HelperMessage/src/index.css +11 -11
  42. package/dist/HelperMessage/src/index.js +3 -3
  43. package/dist/HopperProvider/src/HopperProvider.js +1 -1
  44. package/dist/HopperProvider/src/index.js +1 -1
  45. package/dist/IconList/src/IconList.css +1 -1
  46. package/dist/IconList/src/IconList.js +2 -2
  47. package/dist/IconList/src/IconListContext.js +1 -1
  48. package/dist/IconList/src/index.css +1 -1
  49. package/dist/IconList/src/index.js +2 -2
  50. package/dist/Link/src/Link.css +31 -31
  51. package/dist/Link/src/Link.js +3 -3
  52. package/dist/Link/src/LinkContext.js +1 -1
  53. package/dist/Link/src/index.css +31 -31
  54. package/dist/Link/src/index.js +3 -3
  55. package/dist/ListBox/src/ListBox.css +175 -175
  56. package/dist/ListBox/src/ListBox.js +12 -12
  57. package/dist/ListBox/src/ListBoxContext.js +1 -1
  58. package/dist/ListBox/src/ListBoxItem.css +160 -160
  59. package/dist/ListBox/src/ListBoxItem.js +11 -11
  60. package/dist/ListBox/src/ListBoxItemContext.js +1 -1
  61. package/dist/ListBox/src/ListBoxItemSkeleton.css +7 -7
  62. package/dist/ListBox/src/ListBoxItemSkeleton.js +2 -2
  63. package/dist/ListBox/src/ListBoxItemSkeletonContext.js +1 -1
  64. package/dist/ListBox/src/index.css +175 -175
  65. package/dist/ListBox/src/index.js +12 -12
  66. package/dist/ListBox/src/useLoadOnScroll.js +1 -1
  67. package/dist/Section/src/Section.js +1 -1
  68. package/dist/Section/src/SectionContext.js +1 -1
  69. package/dist/Section/src/index.js +1 -1
  70. package/dist/Spinner/src/Spinner.css +19 -19
  71. package/dist/Spinner/src/Spinner.js +3 -3
  72. package/dist/Spinner/src/SpinnerContext.js +1 -1
  73. package/dist/Spinner/src/index.css +19 -19
  74. package/dist/Spinner/src/index.js +3 -3
  75. package/dist/buttons/src/Button.css +103 -103
  76. package/dist/buttons/src/Button.js +6 -6
  77. package/dist/buttons/src/ButtonContext.js +1 -1
  78. package/dist/buttons/src/ButtonGroup.css +11 -11
  79. package/dist/buttons/src/ButtonGroup.js +2 -2
  80. package/dist/buttons/src/ButtonGroupContext.js +1 -1
  81. package/dist/buttons/src/ClearButton.css +12 -12
  82. package/dist/buttons/src/ClearButton.js +4 -4
  83. package/dist/buttons/src/ClearButtonContext.js +1 -1
  84. package/dist/buttons/src/EmbeddedButton.css +12 -12
  85. package/dist/buttons/src/EmbeddedButton.js +2 -2
  86. package/dist/buttons/src/EmbeddedButtonContext.js +1 -1
  87. package/dist/buttons/src/index.css +126 -126
  88. package/dist/buttons/src/index.js +9 -9
  89. package/dist/checkbox/src/Checkbox.css +31 -31
  90. package/dist/checkbox/src/Checkbox.js +3 -3
  91. package/dist/checkbox/src/CheckboxContext.js +1 -1
  92. package/dist/checkbox/src/CheckboxField.css +15 -15
  93. package/dist/checkbox/src/CheckboxField.js +2 -2
  94. package/dist/checkbox/src/CheckboxFieldContext.js +1 -1
  95. package/dist/checkbox/src/CheckboxGroup.css +66 -66
  96. package/dist/checkbox/src/CheckboxGroup.js +4 -4
  97. package/dist/checkbox/src/CheckboxGroupContext.js +1 -1
  98. package/dist/checkbox/src/CheckboxList.js +1 -1
  99. package/dist/checkbox/src/CheckboxListContext.js +1 -1
  100. package/dist/checkbox/src/index.css +66 -66
  101. package/dist/checkbox/src/index.js +8 -8
  102. package/dist/{chunk-JUMJ6A3K.js → chunk-2O5GW4WZ.js} +1 -1
  103. package/dist/{chunk-BKC74M6Y.js → chunk-2PZTP7OD.js} +1 -1
  104. package/dist/{chunk-RG4JKE4N.js → chunk-375NGVSY.js} +1 -1
  105. package/dist/{chunk-SOSHKMNI.js → chunk-576NZEOZ.js} +2 -2
  106. package/dist/{chunk-E4WFKXW4.js → chunk-5YCINTI3.js} +4 -4
  107. package/dist/{chunk-J53HGLCT.js → chunk-6FJ6VT7L.js} +1 -1
  108. package/dist/{chunk-6QMIRVLY.js → chunk-7F63PQML.js} +1 -1
  109. package/dist/{chunk-E4ALW4MZ.js → chunk-B2NAEXNH.js} +9 -9
  110. package/dist/chunk-BHRRVORW.js +625 -0
  111. package/dist/{chunk-F2URSFJA.js → chunk-C5SNXNGO.js} +2 -2
  112. package/dist/{chunk-ITQK6JTD.js → chunk-DERV7IO4.js} +1 -1
  113. package/dist/{chunk-OHB5QR5P.js → chunk-FJYIXPAV.js} +2 -2
  114. package/dist/{chunk-RA7PM75O.js → chunk-FX7SCMAB.js} +5 -5
  115. package/dist/{chunk-XRC7XE6B.js → chunk-GEDAZSYP.js} +2 -2
  116. package/dist/{chunk-53FHDOG7.js → chunk-GVS7P3EP.js} +2 -2
  117. package/dist/{chunk-3LH2JHUO.js → chunk-HJGIOIZH.js} +3 -3
  118. package/dist/{chunk-4TXFHYHL.js → chunk-HK6NUAOU.js} +1 -1
  119. package/dist/{chunk-K4ZGI7DJ.js → chunk-IGDXWHDV.js} +1 -1
  120. package/dist/{chunk-QBCCF2C2.js → chunk-J3FFNHVC.js} +2 -2
  121. package/dist/{chunk-2P3A4VVY.js → chunk-JSBRDJBE.js} +1 -6
  122. package/dist/{chunk-MVRI6GLQ.js → chunk-JYS47NMI.js} +2 -2
  123. package/dist/{chunk-XGKPMLYD.js → chunk-KC5DWQN5.js} +4 -4
  124. package/dist/chunk-KUOVH2WS.js +57 -0
  125. package/dist/{chunk-P5CWOV3L.js → chunk-LAYIMWCS.js} +2 -2
  126. package/dist/{chunk-3A6TTZAA.js → chunk-LD4PHTV5.js} +1 -1
  127. package/dist/chunk-LJXTJRSB.js +1 -0
  128. package/dist/{chunk-HR25MLRP.js → chunk-LYGSWKBB.js} +1 -1
  129. package/dist/{chunk-2XUHTPCX.js → chunk-O3B5AAY5.js} +2 -2
  130. package/dist/{chunk-G242LPQE.js → chunk-PFQFQTAW.js} +2 -2
  131. package/dist/{chunk-V5GOY6TV.js → chunk-Q4P2MTYE.js} +1 -1
  132. package/dist/{chunk-37NW34QM.js → chunk-Q6XETWRV.js} +3 -3
  133. package/dist/chunk-QVK2N2AZ.js +119 -0
  134. package/dist/{chunk-MED2BIDV.js → chunk-RERJ4IWC.js} +1 -1
  135. package/dist/chunk-SVUAG4RI.js +156 -0
  136. package/dist/{chunk-RCX5B3S3.js → chunk-T3KA26BR.js} +1 -1
  137. package/dist/{chunk-4JAV3FIH.js → chunk-VILNMAVP.js} +2 -2
  138. package/dist/chunk-WWLAPWPS.js +118 -0
  139. package/dist/{chunk-JRDN364E.js → chunk-XGLY57N7.js} +2 -2
  140. package/dist/{chunk-ZOTVZM6F.js → chunk-YEYNRBMQ.js} +1 -1
  141. package/dist/{chunk-J33IFG4U.js → chunk-YORVWKUU.js} +1 -1
  142. package/dist/i18n/src/index.js +2 -2
  143. package/dist/i18n/src/useLocalizedString.js +2 -2
  144. package/dist/index.css +3297 -0
  145. package/dist/index.d.ts +113 -0
  146. package/dist/index.js +107 -0
  147. package/dist/inputs/src/InputGroup.css +12 -12
  148. package/dist/inputs/src/InputGroup.js +2 -2
  149. package/dist/inputs/src/InputGroupContext.js +1 -1
  150. package/dist/inputs/src/PasswordField.css +229 -2405
  151. package/dist/inputs/src/PasswordField.js +12 -91
  152. package/dist/inputs/src/PasswordFieldContext.js +1 -1
  153. package/dist/inputs/src/SearchField.css +235 -2390
  154. package/dist/inputs/src/SearchField.js +13 -90
  155. package/dist/inputs/src/SearchFieldContext.js +1 -1
  156. package/dist/inputs/src/TextField.css +230 -2402
  157. package/dist/inputs/src/TextField.js +14 -90
  158. package/dist/inputs/src/TextFieldContext.js +1 -1
  159. package/dist/inputs/src/index.css +219 -2302
  160. package/dist/inputs/src/index.js +17 -89
  161. package/dist/layout/src/Content.js +1 -1
  162. package/dist/layout/src/ContentContext.js +1 -1
  163. package/dist/layout/src/Flex.js +1 -1
  164. package/dist/layout/src/Footer.js +1 -1
  165. package/dist/layout/src/FooterContext.js +1 -1
  166. package/dist/layout/src/Grid.js +1 -1
  167. package/dist/layout/src/Inline.js +1 -1
  168. package/dist/layout/src/Stack.js +1 -1
  169. package/dist/layout/src/grid-helpers.js +1 -1
  170. package/dist/overlays/Popover/src/Popover.css +457 -457
  171. package/dist/overlays/Popover/src/Popover.js +54 -49
  172. package/dist/overlays/Popover/src/PopoverContext.js +1 -1
  173. package/dist/overlays/Popover/src/PopoverTrigger.js +1 -1
  174. package/dist/overlays/Popover/src/index.css +457 -457
  175. package/dist/overlays/Popover/src/index.js +54 -49
  176. package/dist/radio/src/Radio.css +31 -31
  177. package/dist/radio/src/Radio.js +3 -3
  178. package/dist/radio/src/RadioContext.js +1 -1
  179. package/dist/radio/src/RadioField.css +15 -15
  180. package/dist/radio/src/RadioField.js +2 -2
  181. package/dist/radio/src/RadioFieldContext.js +1 -1
  182. package/dist/radio/src/RadioGroup.css +66 -66
  183. package/dist/radio/src/RadioGroup.js +3 -3
  184. package/dist/radio/src/RadioGroupContext.js +1 -1
  185. package/dist/radio/src/RadioList.js +1 -1
  186. package/dist/radio/src/RadioListContext.js +1 -1
  187. package/dist/radio/src/index.css +66 -66
  188. package/dist/radio/src/index.js +6 -6
  189. package/dist/switch/src/Switch.css +25 -25
  190. package/dist/switch/src/Switch.js +3 -3
  191. package/dist/switch/src/SwitchContext.js +1 -1
  192. package/dist/switch/src/SwitchField.css +15 -15
  193. package/dist/switch/src/SwitchField.js +3 -3
  194. package/dist/switch/src/SwitchFieldContext.js +1 -1
  195. package/dist/switch/src/index.css +31 -31
  196. package/dist/switch/src/index.js +5 -5
  197. package/dist/tag/src/Tag.css +457 -457
  198. package/dist/tag/src/Tag.js +54 -49
  199. package/dist/tag/src/TagContext.js +1 -1
  200. package/dist/tag/src/TagGroup.css +28 -28
  201. package/dist/tag/src/TagGroup.js +4 -4
  202. package/dist/tag/src/TagGroupContext.js +1 -1
  203. package/dist/tag/src/TagList.js +1 -1
  204. package/dist/tag/src/TagListContext.js +1 -1
  205. package/dist/tag/src/index.css +457 -457
  206. package/dist/tag/src/index.js +54 -49
  207. package/dist/typography/Heading/src/Heading.css +9 -3222
  208. package/dist/typography/Heading/src/Heading.js +2 -100
  209. package/dist/typography/Heading/src/HeadingContext.js +1 -1
  210. package/dist/typography/Heading/src/index.css +9 -3222
  211. package/dist/typography/Heading/src/index.js +2 -100
  212. package/dist/typography/Label/src/Label.css +9 -9
  213. package/dist/typography/Label/src/Label.js +2 -2
  214. package/dist/typography/Label/src/LabelContext.js +1 -1
  215. package/dist/typography/Label/src/index.css +9 -9
  216. package/dist/typography/Label/src/index.js +2 -2
  217. package/dist/typography/OverlineText/src/OverlineText.css +6 -6
  218. package/dist/typography/OverlineText/src/OverlineText.js +2 -2
  219. package/dist/typography/OverlineText/src/OverlineTextContext.js +1 -1
  220. package/dist/typography/OverlineText/src/index.css +6 -6
  221. package/dist/typography/OverlineText/src/index.js +2 -2
  222. package/dist/typography/Text/src/Text.css +9 -9
  223. package/dist/typography/Text/src/Text.js +2 -2
  224. package/dist/typography/Text/src/TextContext.js +1 -1
  225. package/dist/typography/Text/src/index.css +9 -9
  226. package/dist/typography/Text/src/index.js +2 -2
  227. package/dist/utils/src/ClearSlots.js +1 -1
  228. package/dist/utils/src/SlotProvider.js +1 -1
  229. package/dist/utils/src/assertion.js +1 -1
  230. package/dist/utils/src/composeClassnameRenderProps.js +1 -1
  231. package/dist/utils/src/cssModule.js +1 -1
  232. package/dist/utils/src/index.js +1 -1
  233. package/dist/utils/src/isTextOnlyChildren.js +1 -1
  234. package/dist/utils/src/useRenderProps.js +1 -1
  235. package/dist/utils/src/useSlot.js +1 -1
  236. package/package.json +4 -2
  237. package/dist/chunk-BC5A7RHI.js +0 -1260
@@ -1,1260 +0,0 @@
1
- import { PopoverTrigger } from './chunk-I4VPBQI7.js';
2
- import { HeadingContext } from './chunk-TXZ6BMFR.js';
3
- import { PopoverContext } from './chunk-SC6ZK5ON.js';
4
- import { GlobalTagListCssSelector, _TagList } from './chunk-WWRB4K4M.js';
5
- import { GlobalSwitchFieldCssSelector, _SwitchField } from './chunk-XRC7XE6B.js';
6
- import { SwitchFieldContext } from './chunk-H7VJS4MX.js';
7
- import { GlobalTagGroupCssSelector, _TagGroup } from './chunk-37NW34QM.js';
8
- import { TagListContext } from './chunk-XLKYXKWE.js';
9
- import { TagContext } from './chunk-EWMWQ2MC.js';
10
- import { TagGroupContext } from './chunk-LCAS3YQV.js';
11
- import { GlobalRadioFieldCssSelector, _RadioField } from './chunk-RCX5B3S3.js';
12
- import { GlobalSwitchCssSelector, _Switch } from './chunk-4JAV3FIH.js';
13
- import { SwitchContext } from './chunk-YHBJAXUY.js';
14
- import { _Footer, GlobalFooterCssSelector } from './chunk-AQITZWYM.js';
15
- import { FooterContext } from './chunk-I67NHYK4.js';
16
- import { _Grid } from './chunk-N77LTZ4U.js';
17
- import { _Inline } from './chunk-Y7HUXUHX.js';
18
- import { _Stack } from './chunk-D6UTDI2K.js';
19
- import { fitContent, minmax, repeat } from './chunk-GFHBDUJD.js';
20
- import { SearchFieldContext } from './chunk-3NKF5TPD.js';
21
- import { TextFieldContext } from './chunk-O4XPUINW.js';
22
- import { _Content, GlobalContentCssSelector } from './chunk-GXBVNCVP.js';
23
- import { ContentContext } from './chunk-IXB2WK56.js';
24
- import { _Flex } from './chunk-TVFC2MJ4.js';
25
- import { GlobalInputGroupCssSelector, _InputGroup } from './chunk-V5GOY6TV.js';
26
- import { InputGroupContext } from './chunk-6BFSSZCY.js';
27
- import { PasswordFieldContext } from './chunk-QW45G6K4.js';
28
- import { _CheckboxField, GlobalCheckboxFieldCssSelector } from './chunk-6QMIRVLY.js';
29
- import { _CheckboxGroup, GlobalCheckboxGroupCssSelector } from './chunk-3LH2JHUO.js';
30
- import { CheckboxFieldContext } from './chunk-ZGNK4GWA.js';
31
- import { CheckboxGroupContext } from './chunk-N7YDPVZL.js';
32
- import { _CheckboxList, GlobalCheckboxListCssSelector } from './chunk-3LRBUQC2.js';
33
- import { CheckboxListContext } from './chunk-WDUQUPTE.js';
34
- import { _Button, GlobalButtonCssSelector } from './chunk-XGKPMLYD.js';
35
- import { useSlot } from './chunk-H5YTU3U7.js';
36
- import { _ButtonGroup, GlobalButtonGroupCssSelector } from './chunk-BKC74M6Y.js';
37
- import { ButtonContext } from './chunk-WMTWFKKP.js';
38
- import { ButtonGroupContext } from './chunk-VJQ7M2BK.js';
39
- import { _ClearButton, GlobalClearButtonCssSelector } from './chunk-OHB5QR5P.js';
40
- import { ClearButtonContext } from './chunk-DXVKHP4V.js';
41
- import { _EmbeddedButton, GlobalEmbeddedButtonCssSelector } from './chunk-MED2BIDV.js';
42
- import { EmbeddedButtonContext } from './chunk-O7IJYNVQ.js';
43
- import { GlobalSectionCssSelector, _Section } from './chunk-O5PTD6IN.js';
44
- import { GlobalSpinnerCssSelector, _Spinner } from './chunk-G242LPQE.js';
45
- import { GlobalLabelCssSelector, _Label } from './chunk-HR25MLRP.js';
46
- import { SpinnerContext } from './chunk-4ZYV2XLW.js';
47
- import { GlobalListBoxCssSelector, GlobalListBoxEmptyItemCssSelector, _ListBox } from './chunk-RA7PM75O.js';
48
- import { isArray, isDefined, isEmptyArray, isFunction, isNil, isNilOrEmpty, isNull, isNumber, isObject, isPlainObject, isPromise, isString, isUndefined } from './chunk-TIPN4VYD.js';
49
- import { SectionContext } from './chunk-5H5AZJPQ.js';
50
- import { ListBoxContext } from './chunk-UIEP5BA5.js';
51
- import { GlobalListBoxItemCssSelector, _ListBoxItem } from './chunk-E4ALW4MZ.js';
52
- import { GlobalRadioGroupCssSelector, _RadioGroup } from './chunk-JRDN364E.js';
53
- import { RadioFieldContext } from './chunk-DGLAGYBD.js';
54
- import { RadioGroupContext } from './chunk-5MBJWRZD.js';
55
- import { GlobalRadioListCssSelector, _RadioList } from './chunk-NKHMUPAP.js';
56
- import { RadioListContext } from './chunk-A7TZHALP.js';
57
- import { GlobalRadioCssSelector, _Radio } from './chunk-2XUHTPCX.js';
58
- import { RadioContext } from './chunk-FU5CCPLP.js';
59
- import { _Checkbox, GlobalCheckboxCssSelector } from './chunk-53FHDOG7.js';
60
- import { CheckboxContext } from './chunk-2EAZPH3M.js';
61
- import { useLocalizedString } from './chunk-ZOTVZM6F.js';
62
- import { LabelContext } from './chunk-QCA3ZR56.js';
63
- import { ListBoxItemContext } from './chunk-Y2POLIXK.js';
64
- import { GlobalHopperProviderCssSelector, _HopperProvider } from './chunk-NMKBUGSO.js';
65
- import { GlobalIconListCssSelector, _IconList } from './chunk-3A6TTZAA.js';
66
- import { GlobalLinkCssSelector, _Link } from './chunk-QBCCF2C2.js';
67
- import { LinkContext } from './chunk-4VVNSXIB.js';
68
- import { composeClassnameRenderProps } from './chunk-65JPI4FL.js';
69
- import { _ErrorMessage, GlobalErrorMessageCssSelector } from './chunk-MVRI6GLQ.js';
70
- import { useRenderProps } from './chunk-NH3IVMXB.js';
71
- import { ErrorMessageContext } from './chunk-FAE27DLF.js';
72
- import { GlobalHeaderCssSelector, _Header } from './chunk-L5A2UTQV.js';
73
- import { HeaderContext } from './chunk-7JOGKC3W.js';
74
- import { GlobalHelperMessageCssSelector, _HelperMessage } from './chunk-P5CWOV3L.js';
75
- import { HelperMessageContext } from './chunk-HZKFQ33E.js';
76
- import { _Badge, GlobalBadgeCssSelector } from './chunk-SOSHKMNI.js';
77
- import { GlobalOverlineTextCssSelector, _OverlineText } from './chunk-K4ZGI7DJ.js';
78
- import { OverlineTextContext } from './chunk-WPNVVGFW.js';
79
- import { BadgeContext } from './chunk-CQDLZ42T.js';
80
- import { _Chip, GlobalChipCssSelector } from './chunk-F2URSFJA.js';
81
- import { isTextOnlyChildren } from './chunk-ZWU6DRRZ.js';
82
- import { IconListContext } from './chunk-DHVVYSLB.js';
83
- import { ChipContext } from './chunk-632B5YBQ.js';
84
- import { _Divider, GlobalDividerCssSelector } from './chunk-J53HGLCT.js';
85
- import { DividerContext } from './chunk-FYIHMKHI.js';
86
- import { _AnonymousAvatar, GlobalAnonymousAvatarCssSelector } from './chunk-JUMJ6A3K.js';
87
- import { _Avatar, AvatarToTextSizeAdapter, GlobalAvatarCssSelector } from './chunk-E4WFKXW4.js';
88
- import { GlobalTextCssSelector, _Text } from './chunk-RG4JKE4N.js';
89
- import { TextContext } from './chunk-X6SER3TZ.js';
90
- import { ClearContainerSlots, ClearProviders } from './chunk-HXI3MEEK.js';
91
- import { _DeletedAvatar, GlobalDeletedAvatarCssSelector } from './chunk-J33IFG4U.js';
92
- import { AvatarContext } from './chunk-AES7QBQE.js';
93
- import { AvatarToIconSizeAdapter, GlobalRichIconAvatarImageCssSelector, _RichIconAvatarImage } from './chunk-ITQK6JTD.js';
94
- import { SlotProvider } from './chunk-M36KANKC.js';
95
- import { cssModule } from './chunk-KVDXQMWI.js';
96
- import { RichIconAvatarImageContext } from './chunk-JWW56J7M.js';
97
- import { __export, __reExport } from './chunk-2P3A4VVY.js';
98
- import { EyeVisibleIcon, EyeHiddenIcon, IconContext, SearchIcon } from '@hopper-ui/icons';
99
- import * as styled_system_star from '@hopper-ui/styled-system';
100
- import { useStyledSystem, useResponsiveValue } from '@hopper-ui/styled-system';
101
- import { mergeRefs } from '@react-aria/utils';
102
- import { useControlledState } from '@react-stately/utils';
103
- import { forwardRef, useReducer, useRef, useEffect, useState, useCallback } from 'react';
104
- import { useObjectRef } from 'react-aria';
105
- import { Collection, useContextProps, composeRenderProps, Input, TextField as TextField$1, SearchField as SearchField$1, Popover as Popover$1, Dialog, Tag as Tag$1, Heading as Heading$1 } from 'react-aria-components';
106
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
107
- import clsx from 'clsx';
108
-
109
- // src/index.ts
110
- var src_exports = {};
111
- __export(src_exports, {
112
- AnonymousAvatar: () => _AnonymousAvatar,
113
- Avatar: () => _Avatar,
114
- AvatarContext: () => AvatarContext,
115
- AvatarToIconSizeAdapter: () => AvatarToIconSizeAdapter,
116
- AvatarToTextSizeAdapter: () => AvatarToTextSizeAdapter,
117
- Badge: () => _Badge,
118
- BadgeContext: () => BadgeContext,
119
- Button: () => _Button,
120
- ButtonContext: () => ButtonContext,
121
- ButtonGroup: () => _ButtonGroup,
122
- ButtonGroupContext: () => ButtonGroupContext,
123
- Checkbox: () => _Checkbox,
124
- CheckboxContext: () => CheckboxContext,
125
- CheckboxField: () => _CheckboxField,
126
- CheckboxFieldContext: () => CheckboxFieldContext,
127
- CheckboxGroup: () => _CheckboxGroup,
128
- CheckboxGroupContext: () => CheckboxGroupContext,
129
- CheckboxList: () => _CheckboxList,
130
- CheckboxListContext: () => CheckboxListContext,
131
- Chip: () => _Chip,
132
- ChipContext: () => ChipContext,
133
- ClearButton: () => _ClearButton,
134
- ClearButtonContext: () => ClearButtonContext,
135
- ClearContainerSlots: () => ClearContainerSlots,
136
- ClearProviders: () => ClearProviders,
137
- Collection: () => Collection,
138
- Content: () => _Content,
139
- ContentContext: () => ContentContext,
140
- DeletedAvatar: () => _DeletedAvatar,
141
- Divider: () => _Divider,
142
- DividerContext: () => DividerContext,
143
- EmbeddedButton: () => _EmbeddedButton,
144
- EmbeddedButtonContext: () => EmbeddedButtonContext,
145
- ErrorMessage: () => _ErrorMessage,
146
- ErrorMessageContext: () => ErrorMessageContext,
147
- Flex: () => _Flex,
148
- Footer: () => _Footer,
149
- FooterContext: () => FooterContext,
150
- GlobalAnonymousAvatarCssSelector: () => GlobalAnonymousAvatarCssSelector,
151
- GlobalAvatarCssSelector: () => GlobalAvatarCssSelector,
152
- GlobalBadgeCssSelector: () => GlobalBadgeCssSelector,
153
- GlobalButtonCssSelector: () => GlobalButtonCssSelector,
154
- GlobalButtonGroupCssSelector: () => GlobalButtonGroupCssSelector,
155
- GlobalCheckboxCssSelector: () => GlobalCheckboxCssSelector,
156
- GlobalCheckboxFieldCssSelector: () => GlobalCheckboxFieldCssSelector,
157
- GlobalCheckboxGroupCssSelector: () => GlobalCheckboxGroupCssSelector,
158
- GlobalCheckboxListCssSelector: () => GlobalCheckboxListCssSelector,
159
- GlobalChipCssSelector: () => GlobalChipCssSelector,
160
- GlobalClearButtonCssSelector: () => GlobalClearButtonCssSelector,
161
- GlobalContentCssSelector: () => GlobalContentCssSelector,
162
- GlobalDeletedAvatarCssSelector: () => GlobalDeletedAvatarCssSelector,
163
- GlobalDividerCssSelector: () => GlobalDividerCssSelector,
164
- GlobalEmbeddedButtonCssSelector: () => GlobalEmbeddedButtonCssSelector,
165
- GlobalErrorMessageCssSelector: () => GlobalErrorMessageCssSelector,
166
- GlobalFooterCssSelector: () => GlobalFooterCssSelector,
167
- GlobalHeaderCssSelector: () => GlobalHeaderCssSelector,
168
- GlobalHeadingCssSelector: () => GlobalHeadingCssSelector,
169
- GlobalHelperMessageCssSelector: () => GlobalHelperMessageCssSelector,
170
- GlobalHopperProviderCssSelector: () => GlobalHopperProviderCssSelector,
171
- GlobalIconListCssSelector: () => GlobalIconListCssSelector,
172
- GlobalInputGroupCssSelector: () => GlobalInputGroupCssSelector,
173
- GlobalLabelCssSelector: () => GlobalLabelCssSelector,
174
- GlobalLinkCssSelector: () => GlobalLinkCssSelector,
175
- GlobalListBoxCssSelector: () => GlobalListBoxCssSelector,
176
- GlobalListBoxEmptyItemCssSelector: () => GlobalListBoxEmptyItemCssSelector,
177
- GlobalListBoxItemCssSelector: () => GlobalListBoxItemCssSelector,
178
- GlobalOverlineTextCssSelector: () => GlobalOverlineTextCssSelector,
179
- GlobalPasswordFieldCssSelector: () => GlobalPasswordFieldCssSelector,
180
- GlobalPopoverCssSelector: () => GlobalPopoverCssSelector,
181
- GlobalRadioCssSelector: () => GlobalRadioCssSelector,
182
- GlobalRadioFieldCssSelector: () => GlobalRadioFieldCssSelector,
183
- GlobalRadioGroupCssSelector: () => GlobalRadioGroupCssSelector,
184
- GlobalRadioListCssSelector: () => GlobalRadioListCssSelector,
185
- GlobalRichIconAvatarImageCssSelector: () => GlobalRichIconAvatarImageCssSelector,
186
- GlobalSearchFieldCssSelector: () => GlobalSearchFieldCssSelector,
187
- GlobalSectionCssSelector: () => GlobalSectionCssSelector,
188
- GlobalSpinnerCssSelector: () => GlobalSpinnerCssSelector,
189
- GlobalSwitchCssSelector: () => GlobalSwitchCssSelector,
190
- GlobalSwitchFieldCssSelector: () => GlobalSwitchFieldCssSelector,
191
- GlobalTagCssSelector: () => GlobalTagCssSelector,
192
- GlobalTagGroupCssSelector: () => GlobalTagGroupCssSelector,
193
- GlobalTagListCssSelector: () => GlobalTagListCssSelector,
194
- GlobalTextCssSelector: () => GlobalTextCssSelector,
195
- GlobalTextFieldCssSelector: () => GlobalTextFieldCssSelector,
196
- Grid: () => _Grid,
197
- H1: () => H1,
198
- H2: () => H2,
199
- H3: () => H3,
200
- H4: () => H4,
201
- H5: () => H5,
202
- H6: () => H6,
203
- Header: () => _Header,
204
- HeaderContext: () => HeaderContext,
205
- Heading: () => _Heading,
206
- HeadingContext: () => HeadingContext,
207
- HelperMessage: () => _HelperMessage,
208
- HelperMessageContext: () => HelperMessageContext,
209
- HopperProvider: () => _HopperProvider,
210
- IconList: () => _IconList,
211
- IconListContext: () => IconListContext,
212
- Inline: () => _Inline,
213
- InputGroup: () => _InputGroup,
214
- InputGroupContext: () => InputGroupContext,
215
- Label: () => _Label,
216
- LabelContext: () => LabelContext,
217
- Link: () => _Link,
218
- LinkContext: () => LinkContext,
219
- ListBox: () => _ListBox,
220
- ListBoxContext: () => ListBoxContext,
221
- ListBoxItem: () => _ListBoxItem,
222
- ListBoxItemContext: () => ListBoxItemContext,
223
- OverlineText: () => _OverlineText,
224
- OverlineTextContext: () => OverlineTextContext,
225
- PasswordField: () => _PasswordField,
226
- PasswordFieldContext: () => PasswordFieldContext,
227
- Popover: () => _Popover,
228
- PopoverContext: () => PopoverContext,
229
- PopoverTrigger: () => PopoverTrigger,
230
- Radio: () => _Radio,
231
- RadioContext: () => RadioContext,
232
- RadioField: () => _RadioField,
233
- RadioFieldContext: () => RadioFieldContext,
234
- RadioGroup: () => _RadioGroup,
235
- RadioGroupContext: () => RadioGroupContext,
236
- RadioList: () => _RadioList,
237
- RadioListContext: () => RadioListContext,
238
- RichIconAvatarImage: () => _RichIconAvatarImage,
239
- RichIconAvatarImageContext: () => RichIconAvatarImageContext,
240
- SearchField: () => _SearchField,
241
- SearchFieldContext: () => SearchFieldContext,
242
- Section: () => _Section,
243
- SectionContext: () => SectionContext,
244
- SlotProvider: () => SlotProvider,
245
- Spinner: () => _Spinner,
246
- SpinnerContext: () => SpinnerContext,
247
- Stack: () => _Stack,
248
- Switch: () => _Switch,
249
- SwitchContext: () => SwitchContext,
250
- SwitchField: () => _SwitchField,
251
- SwitchFieldContext: () => SwitchFieldContext,
252
- Tag: () => _Tag,
253
- TagContext: () => TagContext,
254
- TagGroup: () => _TagGroup,
255
- TagGroupContext: () => TagGroupContext,
256
- TagList: () => _TagList,
257
- TagListContext: () => TagListContext,
258
- Text: () => _Text,
259
- TextContext: () => TextContext,
260
- TextField: () => _TextField,
261
- TextFieldContext: () => TextFieldContext,
262
- composeClassnameRenderProps: () => composeClassnameRenderProps,
263
- cssModule: () => cssModule,
264
- fitContent: () => fitContent,
265
- isArray: () => isArray,
266
- isDefined: () => isDefined,
267
- isEmptyArray: () => isEmptyArray,
268
- isFunction: () => isFunction,
269
- isNil: () => isNil,
270
- isNilOrEmpty: () => isNilOrEmpty,
271
- isNull: () => isNull,
272
- isNumber: () => isNumber,
273
- isObject: () => isObject,
274
- isPlainObject: () => isPlainObject,
275
- isPromise: () => isPromise,
276
- isString: () => isString,
277
- isTextOnlyChildren: () => isTextOnlyChildren,
278
- isUndefined: () => isUndefined,
279
- minmax: () => minmax,
280
- repeat: () => repeat,
281
- useAsyncList: () => $f86e6c1ec7da6ebb$export$bc3384a35de93d66,
282
- useRenderProps: () => useRenderProps,
283
- useSlot: () => useSlot
284
- });
285
-
286
- // css-module:./PasswordField.module.css#css-module
287
- var PasswordField_module_default = { "hop-PasswordField": "PasswordField-module__hop-PasswordField___qT1M7", "hop-PasswordField--fluid": "PasswordField-module__hop-PasswordField--fluid___-BkfP", "hop-PasswordField__Label": "PasswordField-module__hop-PasswordField__Label___--1oo", "hop-PasswordField__InputGroup": "PasswordField-module__hop-PasswordField__InputGroup___-SsGj", "hop-PasswordField__ErrorMessage": "PasswordField-module__hop-PasswordField__ErrorMessage___KPTAA", "hop-PasswordField__HelperMessage": "PasswordField-module__hop-PasswordField__HelperMessage___EF3Zx" };
288
- var GlobalPasswordFieldCssSelector = "hop-PasswordField";
289
- function PasswordField(props, ref) {
290
- var _a;
291
- const {
292
- inputRef: userProvidedInputRef = null,
293
- ...propsWithoutRef
294
- } = props;
295
- [props, ref] = useContextProps(propsWithoutRef, ref, PasswordFieldContext);
296
- const { stylingProps, ...ownProps } = useStyledSystem(props);
297
- const [showPassword, setShowPassword] = useState(false);
298
- const stringFormatter = useLocalizedString();
299
- const {
300
- className,
301
- style: styleProp,
302
- size,
303
- placeholder,
304
- children,
305
- isFluid: isFluidProp,
306
- isDisabled,
307
- isInvalid,
308
- ...otherProps
309
- } = ownProps;
310
- const inputRef = useObjectRef(mergeRefs(userProvidedInputRef, props.inputRef !== void 0 ? props.inputRef : null));
311
- const isFluid = (_a = useResponsiveValue(isFluidProp)) != null ? _a : false;
312
- const classNames = composeClassnameRenderProps(
313
- className,
314
- GlobalPasswordFieldCssSelector,
315
- cssModule(
316
- PasswordField_module_default,
317
- "hop-PasswordField",
318
- isFluid && "fluid"
319
- ),
320
- stylingProps.className
321
- );
322
- const style = composeRenderProps(styleProp, (prev) => {
323
- return {
324
- ...stylingProps.style,
325
- ...prev
326
- };
327
- });
328
- const inputMarkup = /* @__PURE__ */ jsx(ClearContainerSlots, { children: /* @__PURE__ */ jsxs(
329
- _InputGroup,
330
- {
331
- isDisabled,
332
- isInvalid,
333
- isFluid: true,
334
- size,
335
- className: PasswordField_module_default["hop-PasswordField__InputGroup"],
336
- children: [
337
- /* @__PURE__ */ jsx(Input, { ref: inputRef, placeholder, type: showPassword ? "text" : "password" }),
338
- /* @__PURE__ */ jsx(
339
- _EmbeddedButton,
340
- {
341
- isDisabled,
342
- "aria-label": stringFormatter.format("PasswordField.toggleVisibility"),
343
- onPress: () => {
344
- setShowPassword((x) => !x);
345
- },
346
- size: "lg",
347
- children: showPassword ? /* @__PURE__ */ jsx(EyeVisibleIcon, {}) : /* @__PURE__ */ jsx(EyeHiddenIcon, {})
348
- }
349
- )
350
- ]
351
- }
352
- ) });
353
- const childrenMarkup = composeRenderProps(children, (prev) => {
354
- return /* @__PURE__ */ jsxs(Fragment, { children: [
355
- /* @__PURE__ */ jsx(
356
- SlotProvider,
357
- {
358
- values: [
359
- [LabelContext, { className: PasswordField_module_default["hop-PasswordField__Label"] }],
360
- [HelperMessageContext, { className: PasswordField_module_default["hop-PasswordField__HelperMessage"] }],
361
- [ErrorMessageContext, { className: PasswordField_module_default["hop-PasswordField__ErrorMessage"] }]
362
- ],
363
- children: prev
364
- }
365
- ),
366
- inputMarkup
367
- ] });
368
- });
369
- return /* @__PURE__ */ jsx(
370
- TextField$1,
371
- {
372
- ref,
373
- style,
374
- className: classNames,
375
- isDisabled,
376
- isInvalid,
377
- ...otherProps,
378
- children: childrenMarkup
379
- }
380
- );
381
- }
382
- var _PasswordField = forwardRef(PasswordField);
383
- _PasswordField.displayName = "PasswordField";
384
-
385
- // css-module:./SearchField.module.css#css-module
386
- var SearchField_module_default = { "hop-SearchField": "SearchField-module__hop-SearchField___XyPuD", "hop-SearchField--fluid": "SearchField-module__hop-SearchField--fluid___fuYKp", "hop-SearchField__Label": "SearchField-module__hop-SearchField__Label___JKz99", "hop-SearchField__prefix": "SearchField-module__hop-SearchField__prefix___mWvae", "hop-SearchField__InputGroup": "SearchField-module__hop-SearchField__InputGroup___NPE92", "hop-SearchField--clearable": "SearchField-module__hop-SearchField--clearable___HIr0R", "hop-SearchField__ErrorMessage": "SearchField-module__hop-SearchField__ErrorMessage___DIvi3", "hop-SearchField__HelperMessage": "SearchField-module__hop-SearchField__HelperMessage___E5AoO", "hop-SearchField__ClearButton": "SearchField-module__hop-SearchField__ClearButton___hyUlh" };
387
- var GlobalSearchFieldCssSelector = "hop-SearchField";
388
- function SearchField(props, ref) {
389
- var _a;
390
- const {
391
- inputRef: userProvidedInputRef = null,
392
- ...propsWithoutRef
393
- } = props;
394
- [props, ref] = useContextProps(propsWithoutRef, ref, SearchFieldContext);
395
- const { stylingProps, ...ownProps } = useStyledSystem(props);
396
- const {
397
- className,
398
- style: styleProp,
399
- size,
400
- placeholder,
401
- isClearable = true,
402
- children,
403
- isFluid: isFluidProp,
404
- icon = /* @__PURE__ */ jsx(SearchIcon, {}),
405
- isDisabled,
406
- isInvalid,
407
- ...otherProps
408
- } = ownProps;
409
- const inputRef = useObjectRef(mergeRefs(userProvidedInputRef, props.inputRef !== void 0 ? props.inputRef : null));
410
- const isFluid = (_a = useResponsiveValue(isFluidProp)) != null ? _a : false;
411
- const classNames = composeClassnameRenderProps(
412
- className,
413
- GlobalSearchFieldCssSelector,
414
- cssModule(
415
- SearchField_module_default,
416
- "hop-SearchField",
417
- isFluid && "fluid"
418
- ),
419
- stylingProps.className
420
- );
421
- const style = composeRenderProps(styleProp, (prev) => {
422
- return {
423
- ...stylingProps.style,
424
- ...prev
425
- };
426
- });
427
- const inputMarkup = /* @__PURE__ */ jsx(ClearContainerSlots, { children: /* @__PURE__ */ jsxs(
428
- _InputGroup,
429
- {
430
- isDisabled,
431
- isInvalid,
432
- isFluid: true,
433
- size,
434
- className: SearchField_module_default["hop-SearchField__InputGroup"],
435
- children: [
436
- /* @__PURE__ */ jsx(
437
- SlotProvider,
438
- {
439
- values: [
440
- [IconContext, {
441
- className: SearchField_module_default["hop-SearchField__prefix"]
442
- }]
443
- ],
444
- children: icon
445
- }
446
- ),
447
- /* @__PURE__ */ jsx(Input, { ref: inputRef, placeholder }),
448
- isClearable && /* @__PURE__ */ jsx(_ClearButton, { size: "lg", isDisabled, className: SearchField_module_default["hop-SearchField__ClearButton"] })
449
- ]
450
- }
451
- ) });
452
- const childrenMarkup = composeRenderProps(children, (prev) => {
453
- return /* @__PURE__ */ jsxs(Fragment, { children: [
454
- /* @__PURE__ */ jsx(
455
- SlotProvider,
456
- {
457
- values: [
458
- [LabelContext, { className: SearchField_module_default["hop-SearchField__Label"] }],
459
- [HelperMessageContext, { className: SearchField_module_default["hop-SearchField__HelperMessage"] }],
460
- [ErrorMessageContext, { className: SearchField_module_default["hop-SearchField__ErrorMessage"] }]
461
- ],
462
- children: prev
463
- }
464
- ),
465
- inputMarkup
466
- ] });
467
- });
468
- return /* @__PURE__ */ jsx(
469
- SearchField$1,
470
- {
471
- ref,
472
- style,
473
- className: classNames,
474
- isDisabled,
475
- isInvalid,
476
- ...otherProps,
477
- children: childrenMarkup
478
- }
479
- );
480
- }
481
- var _SearchField = forwardRef(SearchField);
482
- _SearchField.displayName = "SearchField";
483
-
484
- // css-module:./Popover.module.css#css-module
485
- var Popover_module_default = { "hop-Popover": "Popover-module__hop-Popover___ahosg", "hop-Popover__dialog": "Popover-module__hop-Popover__dialog___rwQSO", "hop-Popover__title": "Popover-module__hop-Popover__title___VkIXX", "hop-Popover__actions": "Popover-module__hop-Popover__actions___A24RL", "hop-Popover__action": "Popover-module__hop-Popover__action___i8Fan", "hop-Popover__content": "Popover-module__hop-Popover__content___kMgPZ", "hop-Popover__footer": "Popover-module__hop-Popover__footer___N7P2Q" };
486
- var GlobalPopoverCssSelector = "hop-Popover";
487
- function Popover(props, ref) {
488
- [props, ref] = useContextProps(props, ref, PopoverContext);
489
- const { stylingProps, ...ownProps } = useStyledSystem(props);
490
- const {
491
- children,
492
- className,
493
- offset = 4,
494
- boundaryOffset,
495
- ...otherProps
496
- } = ownProps;
497
- const { colorScheme } = (0, src_exports.useColorSchemeContext)();
498
- const popoverClassNames = composeClassnameRenderProps(
499
- className,
500
- GlobalPopoverCssSelector,
501
- cssModule(
502
- Popover_module_default,
503
- "hop-Popover"
504
- )
505
- );
506
- return /* @__PURE__ */ jsx(
507
- Popover$1,
508
- {
509
- ...otherProps,
510
- offset,
511
- ref,
512
- className: popoverClassNames,
513
- arrowBoundaryOffset: boundaryOffset,
514
- children: (state) => /* @__PURE__ */ jsx(_HopperProvider, { colorScheme, children: /* @__PURE__ */ jsx(
515
- Dialog,
516
- {
517
- className: clsx(stylingProps.className, Popover_module_default["hop-Popover__dialog"]),
518
- style: stylingProps.style,
519
- children: /* @__PURE__ */ jsx(
520
- SlotProvider,
521
- {
522
- values: [
523
- [HeadingContext, {
524
- className: Popover_module_default["hop-Popover__title"],
525
- size: "xs"
526
- }],
527
- [ButtonContext, {
528
- size: "sm",
529
- className: Popover_module_default["hop-Popover__action"]
530
- }],
531
- [ButtonGroupContext, {
532
- size: "sm",
533
- align: "end",
534
- className: Popover_module_default["hop-Popover__actions"]
535
- }],
536
- [ContentContext, {
537
- className: Popover_module_default["hop-Popover__content"]
538
- }],
539
- [FooterContext, {
540
- className: Popover_module_default["hop-Popover__footer"]
541
- }],
542
- [LinkContext, {
543
- size: "sm",
544
- variant: "primary",
545
- isQuiet: true
546
- }]
547
- ],
548
- children: isFunction(children) && !isNil(children) ? children(state) : children
549
- }
550
- )
551
- }
552
- ) })
553
- }
554
- );
555
- }
556
- var _Popover = forwardRef(Popover);
557
- _Popover.displayName = "Popover";
558
-
559
- // css-module:./Tag.module.css#css-module
560
- var Tag_module_default = { "hop-Tag": "Tag-module__hop-Tag___APxsb", "hop-Tag--md": "Tag-module__hop-Tag--md___PGGfP", "hop-Tag__icon": "Tag-module__hop-Tag__icon___oelf8", "hop-Tag__icon-list": "Tag-module__hop-Tag__icon-list___HNt-z", "hop-Tag__badge": "Tag-module__hop-Tag__badge___IZs0J", "hop-Tag__remove-btn": "Tag-module__hop-Tag__remove-btn___PINTP", "hop-Tag__Spinner": "Tag-module__hop-Tag__Spinner___lbIMQ", "hop-Tag--lg": "Tag-module__hop-Tag--lg___YTw5A", "hop-Tag__text": "Tag-module__hop-Tag__text___3hZ83", "hop-Badge--secondary": "Tag-module__hop-Badge--secondary___OeS9R" };
561
- var GlobalTagCssSelector = "hop-Tag";
562
- var TagToTextSizeAdapter = {
563
- md: "xs",
564
- lg: "sm"
565
- };
566
- function Tag(props, ref) {
567
- var _a;
568
- [props, ref] = useContextProps(props, ref, TagContext);
569
- const { stylingProps, ...ownProps } = useStyledSystem(props);
570
- const {
571
- className,
572
- children: childrenProp,
573
- isInvalid,
574
- isLoading,
575
- size: sizeProp = "md",
576
- style: styleProp,
577
- textValue: textValueProp,
578
- ...otherProps
579
- } = ownProps;
580
- const stringFormatter = useLocalizedString();
581
- const size = (_a = useResponsiveValue(sizeProp)) != null ? _a : "md";
582
- const textValue = textValueProp != null ? textValueProp : typeof childrenProp === "string" ? childrenProp : void 0;
583
- const classNames = composeClassnameRenderProps(
584
- className,
585
- GlobalTagCssSelector,
586
- cssModule(
587
- Tag_module_default,
588
- "hop-Tag",
589
- size
590
- ),
591
- stylingProps.className
592
- );
593
- const style = composeRenderProps(styleProp, (prev) => {
594
- return {
595
- ...stylingProps.style,
596
- ...prev
597
- };
598
- });
599
- const children = composeRenderProps(childrenProp, (prev) => {
600
- if (prev && isTextOnlyChildren(prev)) {
601
- return /* @__PURE__ */ jsx(_Text, { children: prev });
602
- }
603
- return prev;
604
- });
605
- return /* @__PURE__ */ jsx(
606
- Tag$1,
607
- {
608
- ...otherProps,
609
- ref,
610
- className: classNames,
611
- style,
612
- textValue,
613
- "data-invalid": isInvalid || void 0,
614
- "data-loading": isLoading || void 0,
615
- children: (tagProps) => {
616
- const { allowsRemoving, isDisabled } = tagProps;
617
- return /* @__PURE__ */ jsxs(Fragment, { children: [
618
- /* @__PURE__ */ jsx(ClearContainerSlots, { children: /* @__PURE__ */ jsx(
619
- SlotProvider,
620
- {
621
- values: [
622
- [TextContext, {
623
- className: Tag_module_default["hop-Tag__text"],
624
- size: TagToTextSizeAdapter[size]
625
- }],
626
- [IconListContext, {
627
- className: Tag_module_default["hop-Tag__icon-list"],
628
- size: "sm"
629
- }],
630
- [IconContext, {
631
- className: Tag_module_default["hop-Tag__icon"],
632
- size: "sm"
633
- }],
634
- [BadgeContext, {
635
- className: Tag_module_default["hop-Tag__badge"],
636
- isDisabled
637
- }]
638
- ],
639
- children: children(tagProps)
640
- }
641
- ) }),
642
- allowsRemoving && !isLoading && /* @__PURE__ */ jsx(
643
- _ClearButton,
644
- {
645
- slot: "remove",
646
- isDisabled,
647
- className: Tag_module_default["hop-Tag__remove-btn"],
648
- "aria-label": stringFormatter.format("Tag.removeAriaLabel"),
649
- size
650
- }
651
- ),
652
- isLoading && /* @__PURE__ */ jsx(
653
- _Spinner,
654
- {
655
- "aria-label": stringFormatter.format("Tag.spinnerAriaLabel"),
656
- size: "sm",
657
- className: Tag_module_default["hop-Tag__Spinner"]
658
- }
659
- )
660
- ] });
661
- }
662
- }
663
- );
664
- }
665
- var _Tag = forwardRef(Tag);
666
- _Tag.displayName = "Tag";
667
- function $0d86e9c8f07f9a7b$export$79c0c687a5963b0a(opts, dispatch) {
668
- let { cursor, getKey } = opts;
669
- return {
670
- setSelectedKeys(selectedKeys) {
671
- dispatch((state) => ({
672
- ...state,
673
- selectedKeys
674
- }));
675
- },
676
- setFilterText(filterText) {
677
- dispatch((state) => ({
678
- ...state,
679
- filterText
680
- }));
681
- },
682
- insert(index, ...values) {
683
- dispatch((state) => $0d86e9c8f07f9a7b$var$insert(state, index, ...values));
684
- },
685
- insertBefore(key, ...values) {
686
- dispatch((state) => {
687
- let index = state.items.findIndex((item) => getKey(item) === key);
688
- if (index === -1) {
689
- if (state.items.length === 0) index = 0;
690
- else return state;
691
- }
692
- return $0d86e9c8f07f9a7b$var$insert(state, index, ...values);
693
- });
694
- },
695
- insertAfter(key, ...values) {
696
- dispatch((state) => {
697
- let index = state.items.findIndex((item) => getKey(item) === key);
698
- if (index === -1) {
699
- if (state.items.length === 0) index = 0;
700
- else return state;
701
- }
702
- return $0d86e9c8f07f9a7b$var$insert(state, index + 1, ...values);
703
- });
704
- },
705
- prepend(...values) {
706
- dispatch((state) => $0d86e9c8f07f9a7b$var$insert(state, 0, ...values));
707
- },
708
- append(...values) {
709
- dispatch((state) => $0d86e9c8f07f9a7b$var$insert(state, state.items.length, ...values));
710
- },
711
- remove(...keys) {
712
- dispatch((state) => {
713
- let keySet = new Set(keys);
714
- let items = state.items.filter((item) => !keySet.has(getKey(item)));
715
- let selection = "all";
716
- if (state.selectedKeys !== "all") {
717
- selection = new Set(state.selectedKeys);
718
- for (let key of keys) selection.delete(key);
719
- }
720
- if (cursor == null && items.length === 0) selection = /* @__PURE__ */ new Set();
721
- return {
722
- ...state,
723
- items,
724
- selectedKeys: selection
725
- };
726
- });
727
- },
728
- removeSelectedItems() {
729
- dispatch((state) => {
730
- if (state.selectedKeys === "all") return {
731
- ...state,
732
- items: [],
733
- selectedKeys: /* @__PURE__ */ new Set()
734
- };
735
- let selectedKeys = state.selectedKeys;
736
- let items = state.items.filter((item) => !selectedKeys.has(getKey(item)));
737
- return {
738
- ...state,
739
- items,
740
- selectedKeys: /* @__PURE__ */ new Set()
741
- };
742
- });
743
- },
744
- move(key, toIndex) {
745
- dispatch((state) => {
746
- let index = state.items.findIndex((item2) => getKey(item2) === key);
747
- if (index === -1) return state;
748
- let copy = state.items.slice();
749
- let [item] = copy.splice(index, 1);
750
- copy.splice(toIndex, 0, item);
751
- return {
752
- ...state,
753
- items: copy
754
- };
755
- });
756
- },
757
- moveBefore(key, keys) {
758
- dispatch((state) => {
759
- let toIndex = state.items.findIndex((item) => getKey(item) === key);
760
- if (toIndex === -1) return state;
761
- let keyArray = Array.isArray(keys) ? keys : [
762
- ...keys
763
- ];
764
- let indices = keyArray.map((key2) => state.items.findIndex((item) => getKey(item) === key2)).sort((a, b) => a - b);
765
- return $0d86e9c8f07f9a7b$var$move(state, indices, toIndex);
766
- });
767
- },
768
- moveAfter(key, keys) {
769
- dispatch((state) => {
770
- let toIndex = state.items.findIndex((item) => getKey(item) === key);
771
- if (toIndex === -1) return state;
772
- let keyArray = Array.isArray(keys) ? keys : [
773
- ...keys
774
- ];
775
- let indices = keyArray.map((key2) => state.items.findIndex((item) => getKey(item) === key2)).sort((a, b) => a - b);
776
- return $0d86e9c8f07f9a7b$var$move(state, indices, toIndex + 1);
777
- });
778
- },
779
- update(key, newValue) {
780
- dispatch((state) => {
781
- let index = state.items.findIndex((item) => getKey(item) === key);
782
- if (index === -1) return state;
783
- return {
784
- ...state,
785
- items: [
786
- ...state.items.slice(0, index),
787
- newValue,
788
- ...state.items.slice(index + 1)
789
- ]
790
- };
791
- });
792
- }
793
- };
794
- }
795
- function $0d86e9c8f07f9a7b$var$insert(state, index, ...values) {
796
- return {
797
- ...state,
798
- items: [
799
- ...state.items.slice(0, index),
800
- ...values,
801
- ...state.items.slice(index)
802
- ]
803
- };
804
- }
805
- function $0d86e9c8f07f9a7b$var$move(state, indices, toIndex) {
806
- toIndex -= indices.filter((index) => index < toIndex).length;
807
- let moves = indices.map((from) => ({
808
- from,
809
- to: toIndex++
810
- }));
811
- for (let i = 0; i < moves.length; i++) {
812
- let a = moves[i].from;
813
- for (let j = i; j < moves.length; j++) {
814
- let b = moves[j].from;
815
- if (b > a) moves[j].from--;
816
- }
817
- }
818
- for (let i = 0; i < moves.length; i++) {
819
- let a = moves[i];
820
- for (let j = moves.length - 1; j > i; j--) {
821
- let b = moves[j];
822
- if (b.from < a.to) a.to++;
823
- else b.from++;
824
- }
825
- }
826
- let copy = state.items.slice();
827
- for (let move of moves) {
828
- let [item] = copy.splice(move.from, 1);
829
- copy.splice(move.to, 0, item);
830
- }
831
- return {
832
- ...state,
833
- items: copy
834
- };
835
- }
836
- function $f86e6c1ec7da6ebb$var$reducer(data, action) {
837
- let selectedKeys;
838
- switch (data.state) {
839
- case "idle":
840
- case "error":
841
- switch (action.type) {
842
- case "loading":
843
- case "loadingMore":
844
- case "sorting":
845
- case "filtering":
846
- var _action_filterText, _action_sortDescriptor;
847
- return {
848
- ...data,
849
- filterText: (_action_filterText = action.filterText) !== null && _action_filterText !== void 0 ? _action_filterText : data.filterText,
850
- state: action.type,
851
- // Reset items to an empty list if loading, but not when sorting.
852
- items: action.type === "loading" ? [] : data.items,
853
- sortDescriptor: (_action_sortDescriptor = action.sortDescriptor) !== null && _action_sortDescriptor !== void 0 ? _action_sortDescriptor : data.sortDescriptor,
854
- abortController: action.abortController
855
- };
856
- case "update":
857
- return {
858
- ...data,
859
- ...action.updater(data)
860
- };
861
- case "success":
862
- case "error":
863
- return data;
864
- default:
865
- throw new Error(`Invalid action "${action.type}" in state "${data.state}"`);
866
- }
867
- case "loading":
868
- case "sorting":
869
- case "filtering":
870
- switch (action.type) {
871
- case "success":
872
- if (action.abortController !== data.abortController) return data;
873
- var _action_selectedKeys;
874
- selectedKeys = (_action_selectedKeys = action.selectedKeys) !== null && _action_selectedKeys !== void 0 ? _action_selectedKeys : data.selectedKeys;
875
- var _action_filterText1, _action_sortDescriptor1;
876
- return {
877
- ...data,
878
- filterText: (_action_filterText1 = action.filterText) !== null && _action_filterText1 !== void 0 ? _action_filterText1 : data.filterText,
879
- state: "idle",
880
- items: [
881
- ...action.items
882
- ],
883
- selectedKeys: selectedKeys === "all" ? "all" : new Set(selectedKeys),
884
- sortDescriptor: (_action_sortDescriptor1 = action.sortDescriptor) !== null && _action_sortDescriptor1 !== void 0 ? _action_sortDescriptor1 : data.sortDescriptor,
885
- abortController: null,
886
- cursor: action.cursor
887
- };
888
- case "error":
889
- if (action.abortController !== data.abortController) return data;
890
- return {
891
- ...data,
892
- state: "error",
893
- error: action.error,
894
- abortController: null
895
- };
896
- case "loading":
897
- case "loadingMore":
898
- case "sorting":
899
- case "filtering":
900
- data.abortController.abort();
901
- var _action_filterText2;
902
- return {
903
- ...data,
904
- filterText: (_action_filterText2 = action.filterText) !== null && _action_filterText2 !== void 0 ? _action_filterText2 : data.filterText,
905
- state: action.type,
906
- // Reset items to an empty list if loading, but not when sorting.
907
- items: action.type === "loading" ? [] : data.items,
908
- abortController: action.abortController
909
- };
910
- case "update":
911
- return {
912
- ...data,
913
- ...action.updater(data)
914
- };
915
- default:
916
- throw new Error(`Invalid action "${action.type}" in state "${data.state}"`);
917
- }
918
- case "loadingMore":
919
- switch (action.type) {
920
- case "success":
921
- var _action_selectedKeys1;
922
- selectedKeys = data.selectedKeys === "all" || action.selectedKeys === "all" ? "all" : /* @__PURE__ */ new Set([
923
- ...data.selectedKeys,
924
- ...(_action_selectedKeys1 = action.selectedKeys) !== null && _action_selectedKeys1 !== void 0 ? _action_selectedKeys1 : []
925
- ]);
926
- var _action_sortDescriptor2;
927
- return {
928
- ...data,
929
- state: "idle",
930
- items: [
931
- ...data.items,
932
- ...action.items
933
- ],
934
- selectedKeys,
935
- sortDescriptor: (_action_sortDescriptor2 = action.sortDescriptor) !== null && _action_sortDescriptor2 !== void 0 ? _action_sortDescriptor2 : data.sortDescriptor,
936
- abortController: null,
937
- cursor: action.cursor
938
- };
939
- case "error":
940
- if (action.abortController !== data.abortController) return data;
941
- return {
942
- ...data,
943
- state: "error",
944
- error: action.error
945
- };
946
- case "loading":
947
- case "sorting":
948
- case "filtering":
949
- data.abortController.abort();
950
- var _action_filterText3;
951
- return {
952
- ...data,
953
- filterText: (_action_filterText3 = action.filterText) !== null && _action_filterText3 !== void 0 ? _action_filterText3 : data.filterText,
954
- state: action.type,
955
- // Reset items to an empty list if loading, but not when sorting.
956
- items: action.type === "loading" ? [] : data.items,
957
- abortController: action.abortController
958
- };
959
- case "loadingMore":
960
- action.abortController.abort();
961
- return data;
962
- case "update":
963
- return {
964
- ...data,
965
- ...action.updater(data)
966
- };
967
- default:
968
- throw new Error(`Invalid action "${action.type}" in state "${data.state}"`);
969
- }
970
- default:
971
- throw new Error(`Invalid state "${data.state}"`);
972
- }
973
- }
974
- function $f86e6c1ec7da6ebb$export$bc3384a35de93d66(options) {
975
- const { load, sort, initialSelectedKeys, initialSortDescriptor, getKey = (item) => item.id || item.key, initialFilterText = "" } = options;
976
- let [data, dispatch] = (useReducer)($f86e6c1ec7da6ebb$var$reducer, {
977
- state: "idle",
978
- error: null,
979
- items: [],
980
- selectedKeys: initialSelectedKeys === "all" ? "all" : new Set(initialSelectedKeys),
981
- sortDescriptor: initialSortDescriptor,
982
- filterText: initialFilterText
983
- });
984
- const dispatchFetch = async (action, fn) => {
985
- let abortController = new AbortController();
986
- try {
987
- dispatch({
988
- ...action,
989
- abortController
990
- });
991
- var _action_filterText;
992
- let previousFilterText = (_action_filterText = action.filterText) !== null && _action_filterText !== void 0 ? _action_filterText : data.filterText;
993
- var _action_sortDescriptor;
994
- let response = await fn({
995
- items: data.items.slice(),
996
- selectedKeys: data.selectedKeys,
997
- sortDescriptor: (_action_sortDescriptor = action.sortDescriptor) !== null && _action_sortDescriptor !== void 0 ? _action_sortDescriptor : data.sortDescriptor,
998
- signal: abortController.signal,
999
- cursor: action.type === "loadingMore" ? data.cursor : null,
1000
- filterText: previousFilterText
1001
- });
1002
- var _response_filterText;
1003
- let filterText = (_response_filterText = response.filterText) !== null && _response_filterText !== void 0 ? _response_filterText : previousFilterText;
1004
- dispatch({
1005
- type: "success",
1006
- ...response,
1007
- abortController
1008
- });
1009
- if (filterText && filterText !== previousFilterText && !abortController.signal.aborted) dispatchFetch({
1010
- type: "filtering",
1011
- filterText
1012
- }, load);
1013
- } catch (e) {
1014
- dispatch({
1015
- type: "error",
1016
- error: e,
1017
- abortController
1018
- });
1019
- }
1020
- };
1021
- let didDispatchInitialFetch = (useRef)(false);
1022
- (useEffect)(() => {
1023
- if (!didDispatchInitialFetch.current) {
1024
- dispatchFetch({
1025
- type: "loading"
1026
- }, load);
1027
- didDispatchInitialFetch.current = true;
1028
- }
1029
- }, []);
1030
- return {
1031
- items: data.items,
1032
- selectedKeys: data.selectedKeys,
1033
- sortDescriptor: data.sortDescriptor,
1034
- isLoading: data.state === "loading" || data.state === "loadingMore" || data.state === "sorting" || data.state === "filtering",
1035
- loadingState: data.state,
1036
- error: data.error,
1037
- filterText: data.filterText,
1038
- getItem(key) {
1039
- return data.items.find((item) => getKey(item) === key);
1040
- },
1041
- reload() {
1042
- dispatchFetch({
1043
- type: "loading"
1044
- }, load);
1045
- },
1046
- loadMore() {
1047
- if (data.state === "loadingMore" || data.state === "filtering" || data.cursor == null) return;
1048
- dispatchFetch({
1049
- type: "loadingMore"
1050
- }, load);
1051
- },
1052
- sort(sortDescriptor) {
1053
- dispatchFetch({
1054
- type: "sorting",
1055
- sortDescriptor
1056
- }, sort || load);
1057
- },
1058
- ...($0d86e9c8f07f9a7b$export$79c0c687a5963b0a)({
1059
- ...options,
1060
- getKey,
1061
- cursor: data.cursor
1062
- }, (fn) => {
1063
- dispatch({
1064
- type: "update",
1065
- updater: fn
1066
- });
1067
- }),
1068
- setFilterText(filterText) {
1069
- dispatchFetch({
1070
- type: "filtering",
1071
- filterText
1072
- }, load);
1073
- }
1074
- };
1075
- }
1076
-
1077
- // src/index.ts
1078
- __reExport(src_exports, styled_system_star);
1079
-
1080
- // css-module:./Heading.module.css#css-module
1081
- var Heading_module_default = { "hop-Heading": "Heading-module__hop-Heading___0-OVa", "hop-Heading--xs": "Heading-module__hop-Heading--xs___Gv8a-", "hop-Heading--sm": "Heading-module__hop-Heading--sm___Pp2Y3", "hop-Heading--md": "Heading-module__hop-Heading--md___WcfUF", "hop-Heading--lg": "Heading-module__hop-Heading--lg___bdnQF", "hop-Heading--xl": "Heading-module__hop-Heading--xl___Lt00B", "hop-Heading--2xl": "Heading-module__hop-Heading--2xl___yT4Le", "hop-Heading--3xl": "Heading-module__hop-Heading--3xl___z-3OX" };
1082
- var GlobalHeadingCssSelector = "hop-Heading";
1083
- function Heading(props, ref) {
1084
- [props, ref] = useContextProps(props, ref, HeadingContext);
1085
- const { stylingProps, ...ownProps } = useStyledSystem(props);
1086
- const { className, size: sizeProp, children, style, ...otherProps } = ownProps;
1087
- const size = (0, src_exports.useResponsiveValue)(sizeProp != null ? sizeProp : "md");
1088
- const classNames = clsx(
1089
- GlobalHeadingCssSelector,
1090
- cssModule(
1091
- Heading_module_default,
1092
- "hop-Heading",
1093
- size
1094
- ),
1095
- stylingProps.className,
1096
- className
1097
- );
1098
- const mergedStyles = {
1099
- ...stylingProps.style,
1100
- ...style
1101
- };
1102
- return /* @__PURE__ */ jsx(
1103
- Heading$1,
1104
- {
1105
- ...otherProps,
1106
- ref,
1107
- className: classNames,
1108
- style: mergedStyles,
1109
- children
1110
- }
1111
- );
1112
- }
1113
- var _Heading = forwardRef(Heading);
1114
- _Heading.displayName = "Heading";
1115
- function createHeading(as) {
1116
- const level = parseInt(as[1]);
1117
- return forwardRef((props, ref) => {
1118
- return /* @__PURE__ */ jsx(_Heading, { ...props, ref, level });
1119
- });
1120
- }
1121
- var H1 = createHeading("h1");
1122
- var H2 = createHeading("h2");
1123
- var H3 = createHeading("h3");
1124
- var H4 = createHeading("h4");
1125
- var H5 = createHeading("h5");
1126
- var H6 = createHeading("h6");
1127
-
1128
- // css-module:./TextField.module.css#css-module
1129
- var TextField_module_default = { "hop-TextField": "TextField-module__hop-TextField___Ueoup", "hop-TextField--fluid": "TextField-module__hop-TextField--fluid___4EfDT", "hop-TextField__Label": "TextField-module__hop-TextField__Label___evsNo", "hop-TextField__prefix": "TextField-module__hop-TextField__prefix___84A9c", "hop-TextField__InputGroup": "TextField-module__hop-TextField__InputGroup___nPfog", "hop-TextField__ErrorMessage": "TextField-module__hop-TextField__ErrorMessage___9o-kF", "hop-TextField__HelperMessage": "TextField-module__hop-TextField__HelperMessage___GWvWo" };
1130
- var GlobalTextFieldCssSelector = "hop-TextField";
1131
- function TextField(props, ref) {
1132
- var _a;
1133
- const {
1134
- inputRef: userProvidedInputRef = null,
1135
- ...propsWithoutRef
1136
- } = props;
1137
- [props, ref] = useContextProps(propsWithoutRef, ref, TextFieldContext);
1138
- const { stylingProps, ...ownProps } = useStyledSystem(props);
1139
- const [characterCount, setCharacterCount] = useState(() => {
1140
- var _a2, _b, _c, _d;
1141
- return (_d = (_c = (_a2 = props.value) == null ? void 0 : _a2.length) != null ? _c : (_b = props.defaultValue) == null ? void 0 : _b.length) != null ? _d : 0;
1142
- });
1143
- const {
1144
- className,
1145
- style: styleProp,
1146
- size,
1147
- prefix,
1148
- showCharacterCount,
1149
- maxLength,
1150
- placeholder,
1151
- isClearable,
1152
- onChange: onChangeProp,
1153
- children,
1154
- onClear,
1155
- defaultValue,
1156
- value: valueProp,
1157
- isFluid: isFluidProp,
1158
- isDisabled,
1159
- isInvalid,
1160
- ...otherProps
1161
- } = ownProps;
1162
- const inputRef = useObjectRef(mergeRefs(userProvidedInputRef, props.inputRef !== void 0 ? props.inputRef : null));
1163
- const isFluid = (_a = useResponsiveValue(isFluidProp)) != null ? _a : false;
1164
- const classNames = composeClassnameRenderProps(
1165
- className,
1166
- GlobalTextFieldCssSelector,
1167
- cssModule(
1168
- TextField_module_default,
1169
- "hop-TextField",
1170
- isClearable && "clearable",
1171
- isFluid && "fluid"
1172
- ),
1173
- stylingProps.className
1174
- );
1175
- const style = composeRenderProps(styleProp, (prev) => {
1176
- return {
1177
- ...stylingProps.style,
1178
- ...prev
1179
- };
1180
- });
1181
- const handleTextChanged = useCallback((value2) => {
1182
- setCharacterCount(value2.length);
1183
- onChangeProp == null ? void 0 : onChangeProp(value2);
1184
- }, [onChangeProp]);
1185
- const [value, onChange] = useControlledState(valueProp, defaultValue || "", handleTextChanged);
1186
- const handleClear = useCallback(() => {
1187
- onChange("");
1188
- onClear == null ? void 0 : onClear();
1189
- }, [onChange, onClear]);
1190
- const showClearButton = isClearable && characterCount !== 0;
1191
- if (showCharacterCount && !maxLength) {
1192
- console.warn("If showCharacterCount is true, maxLength must be set to the maximum number of characters allowed in the TextField.");
1193
- }
1194
- const prefixMarkup = prefix ? /* @__PURE__ */ jsx(
1195
- SlotProvider,
1196
- {
1197
- values: [
1198
- [TextContext, { size, className: TextField_module_default["hop-TextField__prefix"] }],
1199
- [IconContext, { size, className: TextField_module_default["hop-TextField__prefix"] }]
1200
- ],
1201
- children: isTextOnlyChildren(prefix) ? /* @__PURE__ */ jsx(_Text, { children: prefix }) : prefix
1202
- }
1203
- ) : null;
1204
- const inputMarkup = /* @__PURE__ */ jsx(ClearContainerSlots, { children: /* @__PURE__ */ jsxs(
1205
- _InputGroup,
1206
- {
1207
- isFluid: true,
1208
- size,
1209
- className: TextField_module_default["hop-TextField__InputGroup"],
1210
- isDisabled,
1211
- isInvalid,
1212
- children: [
1213
- prefixMarkup,
1214
- /* @__PURE__ */ jsx(Input, { ref: inputRef, placeholder }),
1215
- showCharacterCount && maxLength && /* @__PURE__ */ jsx(CharacterCount, { characterLeft: maxLength - characterCount }),
1216
- showClearButton && /* @__PURE__ */ jsx(_ClearButton, { isDisabled, size: "lg", onPress: handleClear })
1217
- ]
1218
- }
1219
- ) });
1220
- const childrenMarkup = composeRenderProps(children, (prev) => {
1221
- return /* @__PURE__ */ jsxs(Fragment, { children: [
1222
- /* @__PURE__ */ jsx(
1223
- SlotProvider,
1224
- {
1225
- values: [
1226
- [LabelContext, { className: TextField_module_default["hop-TextField__Label"] }],
1227
- [HelperMessageContext, { className: TextField_module_default["hop-TextField__HelperMessage"] }],
1228
- [ErrorMessageContext, { className: TextField_module_default["hop-TextField__ErrorMessage"] }]
1229
- ],
1230
- children: prev
1231
- }
1232
- ),
1233
- inputMarkup
1234
- ] });
1235
- });
1236
- return /* @__PURE__ */ jsx(
1237
- TextField$1,
1238
- {
1239
- ref,
1240
- value,
1241
- style,
1242
- className: classNames,
1243
- maxLength,
1244
- onChange,
1245
- isDisabled,
1246
- isInvalid,
1247
- ...otherProps,
1248
- children: childrenMarkup
1249
- }
1250
- );
1251
- }
1252
- function CharacterCount({ characterLeft }) {
1253
- const stringFormatter = useLocalizedString();
1254
- const accessibilityString = stringFormatter.format("Input.charactersLeft", { charLeft: characterLeft });
1255
- return /* @__PURE__ */ jsx(_Text, { "aria-label": accessibilityString, color: "neutral-weakest", size: "xs", children: characterLeft });
1256
- }
1257
- var _TextField = forwardRef(TextField);
1258
- _TextField.displayName = "TextField";
1259
-
1260
- export { GlobalHeadingCssSelector, GlobalPasswordFieldCssSelector, GlobalPopoverCssSelector, GlobalSearchFieldCssSelector, GlobalTagCssSelector, GlobalTextFieldCssSelector, H1, H2, H3, H4, H5, H6, _Heading, _PasswordField, _Popover, _SearchField, _Tag, _TextField };