@hopper-ui/components 1.3.29 → 1.3.31

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 (220) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/Avatar/src/AnonymousAvatar.css +37 -37
  3. package/dist/Avatar/src/AnonymousAvatar.js +2 -2
  4. package/dist/Avatar/src/Avatar.css +55 -55
  5. package/dist/Avatar/src/Avatar.js +3 -3
  6. package/dist/Avatar/src/DeletedAvatar.css +37 -37
  7. package/dist/Avatar/src/DeletedAvatar.js +2 -2
  8. package/dist/Avatar/src/RichIconAvatarImage.css +37 -37
  9. package/dist/Avatar/src/RichIconAvatarImage.js +1 -1
  10. package/dist/Avatar/src/index.css +55 -55
  11. package/dist/Avatar/src/index.js +5 -5
  12. package/dist/Badge/src/Badge.css +42 -42
  13. package/dist/Badge/src/Badge.js +2 -2
  14. package/dist/Badge/src/FloatingBadge.css +37 -37
  15. package/dist/Badge/src/FloatingBadge.js +1 -1
  16. package/dist/Badge/src/index.css +52 -52
  17. package/dist/Badge/src/index.js +3 -3
  18. package/dist/ComboBox/src/ComboBox.css +562 -2120
  19. package/dist/ComboBox/src/ComboBox.js +27 -98
  20. package/dist/ComboBox/src/index.css +562 -2120
  21. package/dist/ComboBox/src/index.js +27 -98
  22. package/dist/Divider/src/Divider.css +29 -29
  23. package/dist/Divider/src/Divider.js +1 -1
  24. package/dist/Divider/src/index.css +29 -29
  25. package/dist/Divider/src/index.js +1 -1
  26. package/dist/ErrorMessage/src/ErrorMessage.css +29 -29
  27. package/dist/ErrorMessage/src/ErrorMessage.js +2 -2
  28. package/dist/ErrorMessage/src/index.css +29 -29
  29. package/dist/ErrorMessage/src/index.js +2 -2
  30. package/dist/Form/src/Form.css +1593 -1836
  31. package/dist/Form/src/Form.js +9 -100
  32. package/dist/Form/src/index.css +1593 -1836
  33. package/dist/Form/src/index.js +9 -100
  34. package/dist/Header/src/Header.js +1 -1
  35. package/dist/Header/src/index.js +1 -1
  36. package/dist/HelperMessage/src/HelperMessage.css +29 -29
  37. package/dist/HelperMessage/src/HelperMessage.js +2 -2
  38. package/dist/HelperMessage/src/index.css +29 -29
  39. package/dist/HelperMessage/src/index.js +2 -2
  40. package/dist/IconList/src/IconList.css +28 -28
  41. package/dist/IconList/src/IconList.js +1 -1
  42. package/dist/IconList/src/index.css +28 -28
  43. package/dist/IconList/src/index.js +1 -1
  44. package/dist/Link/src/Link.css +49 -49
  45. package/dist/Link/src/Link.js +9 -9
  46. package/dist/Link/src/index.css +49 -49
  47. package/dist/Link/src/index.js +9 -9
  48. package/dist/ListBox/src/ListBox.css +274 -274
  49. package/dist/ListBox/src/ListBox.js +15 -15
  50. package/dist/ListBox/src/ListBoxItem.css +262 -262
  51. package/dist/ListBox/src/ListBoxItem.js +12 -12
  52. package/dist/ListBox/src/ListBoxItemSkeleton.css +34 -34
  53. package/dist/ListBox/src/ListBoxItemSkeleton.js +1 -1
  54. package/dist/ListBox/src/index.css +274 -274
  55. package/dist/ListBox/src/index.js +15 -15
  56. package/dist/Section/src/Section.js +1 -1
  57. package/dist/Section/src/index.js +1 -1
  58. package/dist/Select/src/Select.css +597 -2154
  59. package/dist/Select/src/Select.js +29 -98
  60. package/dist/Select/src/SelectValue.css +61 -61
  61. package/dist/Select/src/SelectValue.js +6 -6
  62. package/dist/Select/src/index.css +566 -2123
  63. package/dist/Select/src/index.d.ts +1 -1
  64. package/dist/Select/src/index.js +29 -98
  65. package/dist/Spinner/src/Spinner.css +37 -37
  66. package/dist/Spinner/src/Spinner.js +2 -2
  67. package/dist/Spinner/src/index.css +37 -37
  68. package/dist/Spinner/src/index.js +2 -2
  69. package/dist/buttons/src/Button.css +93 -93
  70. package/dist/buttons/src/Button.js +10 -10
  71. package/dist/buttons/src/ButtonGroup.css +38 -38
  72. package/dist/buttons/src/ButtonGroup.js +2 -2
  73. package/dist/buttons/src/ClearButton.css +98 -98
  74. package/dist/buttons/src/ClearButton.js +2 -2
  75. package/dist/buttons/src/EmbeddedButton.css +98 -98
  76. package/dist/buttons/src/EmbeddedButton.js +1 -1
  77. package/dist/buttons/src/LinkButton.css +102 -102
  78. package/dist/buttons/src/LinkButton.js +9 -9
  79. package/dist/buttons/src/index.css +249 -249
  80. package/dist/buttons/src/index.js +16 -16
  81. package/dist/checkbox/src/Checkbox.css +46 -46
  82. package/dist/checkbox/src/Checkbox.js +9 -9
  83. package/dist/checkbox/src/CheckboxField.css +33 -33
  84. package/dist/checkbox/src/CheckboxField.js +2 -2
  85. package/dist/checkbox/src/CheckboxGroup.css +98 -98
  86. package/dist/checkbox/src/CheckboxGroup.js +7 -7
  87. package/dist/checkbox/src/DecorativeCheckbox.css +54 -54
  88. package/dist/checkbox/src/DecorativeCheckbox.js +9 -9
  89. package/dist/checkbox/src/index.css +98 -98
  90. package/dist/checkbox/src/index.js +16 -16
  91. package/dist/{chunk-WGUL4DLP.js → chunk-2BHWYRFT.js} +25 -16
  92. package/dist/{chunk-DDWHMWT4.js → chunk-3EAPRTHU.js} +3 -3
  93. package/dist/{chunk-ZGAVEQ6Z.js → chunk-3VKQHRO5.js} +1 -1
  94. package/dist/{chunk-HTVLKROB.js → chunk-54IRJS4J.js} +7 -7
  95. package/dist/{chunk-2JUAYCAW.js → chunk-5SVPP6YF.js} +2 -2
  96. package/dist/{chunk-A3FVUHZK.js → chunk-6JPZEUJU.js} +6 -6
  97. package/dist/{chunk-Y53KJZVH.js → chunk-A7B5XEGW.js} +2 -2
  98. package/dist/{chunk-C4DKKNFV.js → chunk-BOP2AQLT.js} +3 -3
  99. package/dist/{chunk-HGWUIHSZ.js → chunk-BWFO6U3N.js} +4 -4
  100. package/dist/{chunk-B3L5GVQQ.js → chunk-CMYS5I7X.js} +9 -9
  101. package/dist/{chunk-EZQXMQMG.js → chunk-D22VY376.js} +1 -1
  102. package/dist/{chunk-52Q76EYC.js → chunk-DOSDN7OK.js} +2 -2
  103. package/dist/{chunk-QHNS6W5L.js → chunk-EAJI2HCK.js} +5 -5
  104. package/dist/{chunk-JNUJ4XAF.js → chunk-EITAKLZD.js} +2 -2
  105. package/dist/{chunk-CTQTQCMW.js → chunk-EKVGUBEE.js} +7 -7
  106. package/dist/{chunk-V4J7N5T7.js → chunk-FSKZ7UXH.js} +3 -3
  107. package/dist/{chunk-SFPBA2LI.js → chunk-GKKKRGGI.js} +2 -2
  108. package/dist/{chunk-O7LE5ORE.js → chunk-HKX473KB.js} +2 -2
  109. package/dist/chunk-INOHCKSX.js +153 -0
  110. package/dist/{chunk-2D3WTT4F.js → chunk-J4LFCG4M.js} +2 -2
  111. package/dist/{chunk-OIOEDYKJ.js → chunk-L2M5I353.js} +5 -5
  112. package/dist/{chunk-4XH37NSN.js → chunk-L4IQU6BF.js} +3 -3
  113. package/dist/{chunk-IXHZNQQT.js → chunk-L4WMZWNS.js} +2 -2
  114. package/dist/{chunk-RXSNCXOG.js → chunk-NIDJ3QD5.js} +2 -2
  115. package/dist/chunk-NWEIQERE.js +205 -0
  116. package/dist/{chunk-HLOAIKAY.js → chunk-PGX7B5ZI.js} +6 -6
  117. package/dist/{chunk-2EDBKSMF.js → chunk-Q37IPST6.js} +4 -4
  118. package/dist/{chunk-6F5PD4QJ.js → chunk-QKCG7UMP.js} +3 -3
  119. package/dist/{chunk-AWNR3HP2.js → chunk-QODWUIKG.js} +5 -5
  120. package/dist/{chunk-WCATDV4V.js → chunk-QTWASRAE.js} +4 -4
  121. package/dist/{chunk-IPPTCHXV.js → chunk-QWGXDJ44.js} +4 -4
  122. package/dist/{chunk-QBWAS3LL.js → chunk-SP7QWHJU.js} +6 -6
  123. package/dist/{chunk-D7DYIGB6.js → chunk-TGWCRZOA.js} +2 -2
  124. package/dist/{chunk-JSSDXVT4.js → chunk-TTPSVCRY.js} +2 -2
  125. package/dist/{chunk-MKPL3BD2.js → chunk-UCJZEAB5.js} +2 -2
  126. package/dist/{chunk-MEI4QX7N.js → chunk-UFMEUTKK.js} +3 -3
  127. package/dist/{chunk-RGAY6AIY.js → chunk-UXDJGWHZ.js} +4 -4
  128. package/dist/{chunk-3PAK2K3N.js → chunk-UYEVWTDS.js} +1 -1
  129. package/dist/{chunk-2LQCFPLD.js → chunk-VMAP5OXR.js} +2 -2
  130. package/dist/{chunk-O2KXTY5Q.js → chunk-WRIA2DOV.js} +2 -2
  131. package/dist/{chunk-KXA4USPW.js → chunk-XGKMW4MG.js} +2 -2
  132. package/dist/{chunk-CP4LPO2K.js → chunk-Y2L7FXEE.js} +2 -2
  133. package/dist/{chunk-OUDP4L2B.js → chunk-YC5BBTPZ.js} +3 -3
  134. package/dist/chunk-YEN2Y62H.js +159 -0
  135. package/dist/{chunk-CL7I5YAI.js → chunk-YEZAILOI.js} +1 -1
  136. package/dist/{chunk-MCZAPH5T.js → chunk-YMDTCHEW.js} +2 -2
  137. package/dist/{chunk-I55KU3GU.js → chunk-Z75MF65T.js} +1 -1
  138. package/dist/{chunk-SWDZJM3I.js → chunk-ZM4AHBEK.js} +6 -6
  139. package/dist/chunk-ZUWVOUBT.js +270 -0
  140. package/dist/index.css +1001 -996
  141. package/dist/index.d.ts +2 -2
  142. package/dist/index.js +85 -79
  143. package/dist/inputs/src/InputGroup.css +264 -264
  144. package/dist/inputs/src/InputGroup.js +1 -1
  145. package/dist/inputs/src/NumberField.css +286 -286
  146. package/dist/inputs/src/NumberField.js +13 -13
  147. package/dist/inputs/src/PasswordField.css +274 -274
  148. package/dist/inputs/src/PasswordField.js +13 -13
  149. package/dist/inputs/src/RemainingCharacterCount.css +30 -30
  150. package/dist/inputs/src/RemainingCharacterCount.js +6 -6
  151. package/dist/inputs/src/SearchField.css +280 -280
  152. package/dist/inputs/src/SearchField.js +14 -14
  153. package/dist/inputs/src/TextArea.css +281 -281
  154. package/dist/inputs/src/TextArea.js +13 -13
  155. package/dist/inputs/src/TextField.css +278 -278
  156. package/dist/inputs/src/TextField.js +16 -16
  157. package/dist/inputs/src/index.css +324 -324
  158. package/dist/inputs/src/index.js +24 -24
  159. package/dist/layout/src/Content.js +1 -1
  160. package/dist/layout/src/Footer.js +1 -1
  161. package/dist/overlays/Popover/src/Popover.css +2150 -3870
  162. package/dist/overlays/Popover/src/Popover.d.ts +1 -1
  163. package/dist/overlays/Popover/src/Popover.js +10 -105
  164. package/dist/overlays/Popover/src/PopoverContext.d.ts +1 -1
  165. package/dist/overlays/Popover/src/index.css +2150 -3870
  166. package/dist/overlays/Popover/src/index.d.ts +1 -1
  167. package/dist/overlays/Popover/src/index.js +11 -105
  168. package/dist/radio/src/DecorativeRadio.css +54 -54
  169. package/dist/radio/src/DecorativeRadio.js +8 -8
  170. package/dist/radio/src/Radio.css +46 -46
  171. package/dist/radio/src/Radio.js +8 -8
  172. package/dist/radio/src/RadioField.css +33 -33
  173. package/dist/radio/src/RadioField.js +2 -2
  174. package/dist/radio/src/RadioGroup.css +98 -98
  175. package/dist/radio/src/RadioGroup.js +8 -8
  176. package/dist/radio/src/index.css +98 -98
  177. package/dist/radio/src/index.js +16 -16
  178. package/dist/switch/src/Switch.css +43 -43
  179. package/dist/switch/src/Switch.js +8 -8
  180. package/dist/switch/src/SwitchField.css +33 -33
  181. package/dist/switch/src/SwitchField.d.ts +8 -3
  182. package/dist/switch/src/SwitchField.js +3 -1
  183. package/dist/switch/src/index.css +49 -49
  184. package/dist/switch/src/index.js +9 -9
  185. package/dist/tag/src/Tag.css +390 -390
  186. package/dist/tag/src/Tag.js +11 -11
  187. package/dist/tag/src/TagGroup.css +37 -37
  188. package/dist/tag/src/TagGroup.js +3 -3
  189. package/dist/tag/src/TagList.css +27 -27
  190. package/dist/tag/src/TagList.js +1 -1
  191. package/dist/tag/src/index.css +400 -400
  192. package/dist/tag/src/index.js +16 -16
  193. package/dist/typography/Heading/src/Heading.css +27 -27
  194. package/dist/typography/Heading/src/Heading.js +1 -1
  195. package/dist/typography/Heading/src/index.css +27 -27
  196. package/dist/typography/Heading/src/index.js +1 -1
  197. package/dist/typography/Label/src/Label.css +27 -27
  198. package/dist/typography/Label/src/Label.js +1 -1
  199. package/dist/typography/Label/src/index.css +27 -27
  200. package/dist/typography/Label/src/index.js +1 -1
  201. package/dist/typography/OverlineText/src/OverlineText.css +27 -27
  202. package/dist/typography/OverlineText/src/OverlineText.js +1 -1
  203. package/dist/typography/OverlineText/src/index.css +27 -27
  204. package/dist/typography/OverlineText/src/index.js +1 -1
  205. package/dist/typography/Text/src/Text.css +27 -27
  206. package/dist/typography/Text/src/Text.js +1 -1
  207. package/dist/typography/Text/src/index.css +27 -27
  208. package/dist/typography/Text/src/index.js +1 -1
  209. package/dist/utils/src/EnsureTextWrapper.css +27 -27
  210. package/dist/utils/src/EnsureTextWrapper.js +6 -6
  211. package/dist/utils/src/index.css +27 -27
  212. package/dist/utils/src/index.js +6 -6
  213. package/package.json +2 -1
  214. package/dist/chunk-6IQRHHKW.js +0 -1155
  215. package/dist/{chunk-LJXTJRSB.js → chunk-DBIN32YS.js} +0 -0
  216. package/dist/{chunk-O5PTD6IN.js → chunk-NLZXVLBW.js} +1 -1
  217. package/dist/{chunk-WWRB4K4M.js → chunk-TPVDUGOO.js} +1 -1
  218. package/dist/{chunk-GTM56LGX.js → chunk-VOZN65OL.js} +1 -1
  219. package/dist/{chunk-N5UT7MST.js → chunk-WPJCS7L2.js} +1 -1
  220. package/dist/{chunk-DPC3Y6Y2.js → chunk-ZJKGATZR.js} +1 -1
@@ -0,0 +1,270 @@
1
+ import { _Popover } from './chunk-YEN2Y62H.js';
2
+ import { _Footer } from './chunk-VOZN65OL.js';
3
+ import { _ListBox } from './chunk-L2M5I353.js';
4
+ import { ensureTextWrapper } from './chunk-YEZAILOI.js';
5
+ import { _HelperMessage } from './chunk-YC5BBTPZ.js';
6
+ import { _ErrorMessage } from './chunk-WRIA2DOV.js';
7
+ import { _Label } from './chunk-NIDJ3QD5.js';
8
+ import { ComboBoxContext } from './chunk-4XHTP4GX.js';
9
+ import { BadgeContext } from './chunk-CQDLZ42T.js';
10
+ import { TextContext as TextContext$1 } from './chunk-X6SER3TZ.js';
11
+ import { ClearProviders, ClearContainerSlots } from './chunk-HXI3MEEK.js';
12
+ import { composeClassnameRenderProps } from './chunk-65JPI4FL.js';
13
+ import { SlotProvider } from './chunk-M36KANKC.js';
14
+ import { cssModule } from './chunk-KVDXQMWI.js';
15
+ import { IconContext, AngleUpIcon, AngleDownIcon } from '@hopper-ui/icons';
16
+ import { useStyledSystem, useResponsiveValue } from '@hopper-ui/styled-system';
17
+ import { useObjectRef, mergeRefs, useResizeObserver } from '@react-aria/utils';
18
+ import { forwardRef, useRef, useState, useCallback } from 'react';
19
+ import { useContextProps, useSlottedContext, InputContext, composeRenderProps, TextContext, ButtonContext, ComboBox as ComboBox$1, Group, Input, Button } from 'react-aria-components';
20
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
21
+
22
+ // css-module:./ComboBox.module.css#css-module
23
+ var ComboBox_module_default = { "hop-ComboBox": "ComboBox-module__hop-ComboBox___8-fb-", "hop-ComboBox--fluid": "ComboBox-module__hop-ComboBox--fluid___JYjFm", "hop-ComboBox__label": "ComboBox-module__hop-ComboBox__label___KQJhb", "hop-ComboBox__trigger": "ComboBox-module__hop-ComboBox__trigger___oCZ5q", "hop-ComboBox__trigger--sm": "ComboBox-module__hop-ComboBox__trigger--sm___t2VR-", "hop-ComboBox__trigger--md": "ComboBox-module__hop-ComboBox__trigger--md___gU1w7", "hop-ComboBox__input": "ComboBox-module__hop-ComboBox__input___qQcZl", "hop-ComboBox__button": "ComboBox-module__hop-ComboBox__button___wECrA", "hop-ComboBox__prefix": "ComboBox-module__hop-ComboBox__prefix___2WB24", "hop-ComboBox__button-icon": "ComboBox-module__hop-ComboBox__button-icon___YdUD5", "hop-ComboBox__helper-message": "ComboBox-module__hop-ComboBox__helper-message___zWmJz", "hop-ComboBox__error-message": "ComboBox-module__hop-ComboBox__error-message___hKR-z" };
24
+ var GlobalComboBoxCssSelector = "hop-ComboBox";
25
+ function ComboBox(props, ref) {
26
+ var _a, _b, _c, _d, _e;
27
+ const {
28
+ inputRef: userProvidedInputRef = null,
29
+ ...propsWithoutRef
30
+ } = props;
31
+ [props, ref] = useContextProps(propsWithoutRef, ref, ComboBoxContext);
32
+ const { stylingProps, ...ownProps } = useStyledSystem(props);
33
+ const {
34
+ align: alignProp,
35
+ className,
36
+ children,
37
+ description,
38
+ direction: directionProp,
39
+ errorMessage,
40
+ footer,
41
+ isAutoMenuWidth,
42
+ isFluid: isFluidProp,
43
+ isInvalid,
44
+ isLoading,
45
+ isRequired,
46
+ items,
47
+ label,
48
+ listBoxProps,
49
+ menuTrigger = "focus",
50
+ necessityIndicator,
51
+ onLoadMore,
52
+ popoverProps,
53
+ placeholder,
54
+ prefix,
55
+ selectionIndicator,
56
+ shouldFlip,
57
+ size: sizeProp,
58
+ style: styleProp,
59
+ triggerProps,
60
+ ...otherProps
61
+ } = ownProps;
62
+ const inputRef = useObjectRef(mergeRefs(userProvidedInputRef, (_a = props.inputRef) != null ? _a : null));
63
+ const inputContext = useSlottedContext(InputContext);
64
+ const mergedInputRefs = (inputContext == null ? void 0 : inputContext.ref) ? mergeRefs(inputRef, inputContext.ref) : inputRef;
65
+ const triggerRef = useRef(null);
66
+ const buttonRef = useRef(null);
67
+ const [triggerWidth, setTriggerWidth] = useState(null);
68
+ const onResize = useCallback(() => {
69
+ if (triggerRef.current) {
70
+ setTriggerWidth(triggerRef.current.offsetWidth + "px");
71
+ }
72
+ }, [triggerRef]);
73
+ useResizeObserver({
74
+ ref: triggerRef,
75
+ onResize
76
+ });
77
+ const { stylingProps: triggerStylingProps, ...triggerOwnProps } = useStyledSystem(triggerProps != null ? triggerProps : {});
78
+ const {
79
+ className: triggerClassName,
80
+ style: triggerStyleProp,
81
+ ...otherTriggerProps
82
+ } = triggerOwnProps;
83
+ const {
84
+ style: popoverStyleProp
85
+ } = popoverProps != null ? popoverProps : {};
86
+ const size = (_b = useResponsiveValue(sizeProp)) != null ? _b : "md";
87
+ const isFluid = (_c = useResponsiveValue(isFluidProp)) != null ? _c : false;
88
+ const align = (_d = useResponsiveValue(alignProp)) != null ? _d : "start";
89
+ const direction = (_e = useResponsiveValue(directionProp)) != null ? _e : "bottom";
90
+ const classNames = composeClassnameRenderProps(
91
+ className,
92
+ GlobalComboBoxCssSelector,
93
+ cssModule(
94
+ ComboBox_module_default,
95
+ "hop-ComboBox",
96
+ isFluid && "fluid",
97
+ size
98
+ ),
99
+ stylingProps.className
100
+ );
101
+ const triggerClassNames = composeClassnameRenderProps(
102
+ triggerClassName,
103
+ cssModule(
104
+ ComboBox_module_default,
105
+ "hop-ComboBox__trigger",
106
+ size
107
+ ),
108
+ triggerStylingProps.className
109
+ );
110
+ const buttonClassNames = composeClassnameRenderProps(
111
+ cssModule(
112
+ ComboBox_module_default,
113
+ "hop-ComboBox__button"
114
+ )
115
+ );
116
+ const inputClassNames = composeClassnameRenderProps(
117
+ inputContext == null ? void 0 : inputContext.className,
118
+ ComboBox_module_default["hop-ComboBox__input"]
119
+ );
120
+ const style = composeRenderProps(styleProp, (prev) => {
121
+ return {
122
+ ...stylingProps.style,
123
+ ...prev
124
+ };
125
+ });
126
+ const triggerStyle = composeRenderProps(triggerStyleProp, (prev) => {
127
+ return {
128
+ ...triggerStylingProps.style,
129
+ ...prev
130
+ };
131
+ });
132
+ const popoverStyle = composeRenderProps(popoverStyleProp, (prev) => {
133
+ return {
134
+ ...prev,
135
+ "--custom-trigger-width": triggerWidth
136
+ };
137
+ });
138
+ const footerMarkup = footer ? /* @__PURE__ */ jsx(
139
+ ClearProviders,
140
+ {
141
+ values: [
142
+ TextContext,
143
+ TextContext$1,
144
+ ButtonContext
145
+ ],
146
+ children: /* @__PURE__ */ jsx(
147
+ SlotProvider,
148
+ {
149
+ values: [
150
+ [TextContext$1, {
151
+ size
152
+ }]
153
+ ],
154
+ children: /* @__PURE__ */ jsx(_Footer, { children: ensureTextWrapper(footer) })
155
+ }
156
+ )
157
+ }
158
+ ) : null;
159
+ const handleMouseDown = useCallback((e) => {
160
+ if (inputRef.current && e.target !== inputRef.current && buttonRef.current && e.target !== buttonRef.current) {
161
+ inputRef.current.focus();
162
+ e.preventDefault();
163
+ }
164
+ }, [inputRef]);
165
+ const prefixMarkup = prefix ? /* @__PURE__ */ jsx(
166
+ SlotProvider,
167
+ {
168
+ values: [
169
+ [TextContext$1, { size, className: ComboBox_module_default["hop-ComboBox__prefix"] }],
170
+ [IconContext, { size, className: ComboBox_module_default["hop-ComboBox__prefix"] }]
171
+ ],
172
+ children: /* @__PURE__ */ jsx(ClearContainerSlots, { children: ensureTextWrapper(prefix) })
173
+ }
174
+ ) : null;
175
+ return /* @__PURE__ */ jsx(
176
+ ComboBox$1,
177
+ {
178
+ ref,
179
+ className: classNames,
180
+ style,
181
+ isInvalid,
182
+ isRequired,
183
+ items,
184
+ menuTrigger,
185
+ ...otherProps,
186
+ children: (comboBoxRenderProps) => {
187
+ const { isOpen } = comboBoxRenderProps;
188
+ const ButtonIcon = isOpen ? AngleUpIcon : AngleDownIcon;
189
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
190
+ label && /* @__PURE__ */ jsx(
191
+ _Label,
192
+ {
193
+ className: ComboBox_module_default["hop-ComboBox__label"],
194
+ isRequired,
195
+ necessityIndicator,
196
+ children: label
197
+ }
198
+ ),
199
+ /* @__PURE__ */ jsxs(
200
+ _Popover,
201
+ {
202
+ isAutoWidth: isAutoMenuWidth,
203
+ isNonDialog: true,
204
+ placement: `${direction} ${align}`,
205
+ shouldFlip,
206
+ style: popoverStyle,
207
+ triggerRef,
208
+ ...popoverProps,
209
+ children: [
210
+ /* @__PURE__ */ jsx(
211
+ SlotProvider,
212
+ {
213
+ values: [
214
+ [BadgeContext, {
215
+ variant: "secondary"
216
+ }]
217
+ ],
218
+ children: /* @__PURE__ */ jsx(
219
+ _ListBox,
220
+ {
221
+ size,
222
+ isInvalid,
223
+ items,
224
+ isLoading,
225
+ onLoadMore,
226
+ selectionIndicator,
227
+ ...listBoxProps,
228
+ children
229
+ }
230
+ )
231
+ }
232
+ ),
233
+ footerMarkup
234
+ ]
235
+ }
236
+ ),
237
+ /* @__PURE__ */ jsxs(
238
+ Group,
239
+ {
240
+ ref: triggerRef,
241
+ className: triggerClassNames,
242
+ style: triggerStyle,
243
+ onMouseDown: handleMouseDown,
244
+ "data-selected": isOpen || void 0,
245
+ ...otherTriggerProps,
246
+ children: [
247
+ prefixMarkup,
248
+ /* @__PURE__ */ jsx(
249
+ Input,
250
+ {
251
+ ref: mergedInputRefs,
252
+ className: inputClassNames,
253
+ placeholder
254
+ }
255
+ ),
256
+ /* @__PURE__ */ jsx(Button, { className: buttonClassNames, ref: buttonRef, children: /* @__PURE__ */ jsx(ButtonIcon, { size: "sm", className: ComboBox_module_default["hop-ComboBox__button-icon"] }) })
257
+ ]
258
+ }
259
+ ),
260
+ description && /* @__PURE__ */ jsx(_HelperMessage, { className: ComboBox_module_default["hop-ComboBox__helper-message"], children: description }),
261
+ /* @__PURE__ */ jsx(_ErrorMessage, { className: ComboBox_module_default["hop-ComboBox__error-message"], children: errorMessage })
262
+ ] });
263
+ }
264
+ }
265
+ );
266
+ }
267
+ var _ComboBox = forwardRef(ComboBox);
268
+ _ComboBox.displayName = "ComboBox";
269
+
270
+ export { GlobalComboBoxCssSelector, _ComboBox };