@hopper-ui/components 1.0.4 → 1.0.6

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 (262) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +3 -0
  3. package/dist/Avatar/src/AnonymousAvatar.css +69 -0
  4. package/dist/Avatar/src/AnonymousAvatar.d.ts +29 -0
  5. package/dist/Avatar/src/AnonymousAvatar.js +7 -0
  6. package/dist/Avatar/src/Avatar.css +265 -0
  7. package/dist/Avatar/src/Avatar.d.ts +60 -0
  8. package/dist/Avatar/src/Avatar.js +11 -0
  9. package/dist/Avatar/src/AvatarContext.d.ts +12 -0
  10. package/dist/Avatar/src/AvatarContext.js +2 -0
  11. package/dist/Avatar/src/DeletedAvatar.css +69 -0
  12. package/dist/Avatar/src/DeletedAvatar.d.ts +29 -0
  13. package/dist/Avatar/src/DeletedAvatar.js +7 -0
  14. package/dist/Avatar/src/RichIconAvatarImage.css +69 -0
  15. package/dist/Avatar/src/RichIconAvatarImage.d.ts +32 -0
  16. package/dist/Avatar/src/RichIconAvatarImage.js +5 -0
  17. package/dist/Avatar/src/RichIconAvatarImageContext.d.ts +14 -0
  18. package/dist/Avatar/src/RichIconAvatarImageContext.js +2 -0
  19. package/dist/Avatar/src/index.css +265 -0
  20. package/dist/Avatar/src/index.d.ts +14 -0
  21. package/dist/Avatar/src/index.js +13 -0
  22. package/dist/Avatar/src/useImageFallback.d.ts +34 -0
  23. package/dist/Avatar/src/useImageFallback.js +2 -0
  24. package/dist/{badge → Badge}/src/Badge.css +11 -11
  25. package/dist/{badge → Badge}/src/Badge.d.ts +1 -1
  26. package/dist/{badge → Badge}/src/Badge.js +4 -3
  27. package/dist/Badge/src/BadgeContext.js +2 -0
  28. package/dist/{badge → Badge}/src/index.css +11 -11
  29. package/dist/{badge → Badge}/src/index.js +4 -3
  30. package/dist/{chip → Chip}/src/Chip.css +34 -34
  31. package/dist/{chip → Chip}/src/Chip.js +6 -6
  32. package/dist/Chip/src/ChipContext.js +2 -0
  33. package/dist/{chip → Chip}/src/index.css +34 -34
  34. package/dist/{chip → Chip}/src/index.js +6 -6
  35. package/dist/Divider/src/Divider.css +32 -0
  36. package/dist/Divider/src/Divider.d.ts +15 -0
  37. package/dist/Divider/src/Divider.js +4 -0
  38. package/dist/Divider/src/DividerContext.d.ts +8 -0
  39. package/dist/Divider/src/DividerContext.js +2 -0
  40. package/dist/Divider/src/index.css +32 -0
  41. package/dist/Divider/src/index.d.ts +5 -0
  42. package/dist/Divider/src/index.js +4 -0
  43. package/dist/{errorMessage → ErrorMessage}/src/ErrorMessage.css +12 -12
  44. package/dist/{errorMessage → ErrorMessage}/src/ErrorMessage.js +5 -5
  45. package/dist/ErrorMessage/src/ErrorMessageContext.js +2 -0
  46. package/dist/{errorMessage → ErrorMessage}/src/index.css +12 -12
  47. package/dist/{errorMessage → ErrorMessage}/src/index.js +5 -5
  48. package/dist/Header/src/Header.d.ts +17 -0
  49. package/dist/Header/src/Header.js +3 -0
  50. package/dist/Header/src/HeaderContext.d.ts +10 -0
  51. package/dist/Header/src/HeaderContext.js +2 -0
  52. package/dist/Header/src/index.d.ts +7 -0
  53. package/dist/Header/src/index.js +3 -0
  54. package/dist/{helperMessage → HelperMessage}/src/HelperMessage.css +12 -12
  55. package/dist/{helperMessage → HelperMessage}/src/HelperMessage.js +5 -5
  56. package/dist/HelperMessage/src/HelperMessageContext.js +2 -0
  57. package/dist/{helperMessage → HelperMessage}/src/index.css +12 -12
  58. package/dist/{helperMessage → HelperMessage}/src/index.js +5 -5
  59. package/dist/HopperProvider/src/HopperProvider.d.ts +1 -1
  60. package/dist/HopperProvider/src/HopperProvider.js +1 -1
  61. package/dist/HopperProvider/src/index.js +1 -1
  62. package/dist/IconList/src/IconList.css +1 -1
  63. package/dist/IconList/src/IconList.js +2 -2
  64. package/dist/IconList/src/index.css +1 -1
  65. package/dist/IconList/src/index.js +2 -2
  66. package/dist/Link/src/Link.css +31 -31
  67. package/dist/Link/src/Link.js +7 -7
  68. package/dist/Link/src/index.css +31 -31
  69. package/dist/Link/src/index.js +7 -7
  70. package/dist/ListBox/src/ListBox.css +1434 -0
  71. package/dist/ListBox/src/ListBox.d.ts +48 -0
  72. package/dist/ListBox/src/ListBox.js +34 -0
  73. package/dist/ListBox/src/ListBoxContext.d.ts +10 -0
  74. package/dist/ListBox/src/ListBoxContext.js +2 -0
  75. package/dist/ListBox/src/ListBoxItem.css +1297 -0
  76. package/dist/ListBox/src/ListBoxItem.d.ts +39 -0
  77. package/dist/ListBox/src/ListBoxItem.js +27 -0
  78. package/dist/ListBox/src/ListBoxItemContext.d.ts +9 -0
  79. package/dist/ListBox/src/ListBoxItemContext.js +2 -0
  80. package/dist/ListBox/src/ListBoxItemSkeleton.css +56 -0
  81. package/dist/ListBox/src/ListBoxItemSkeleton.d.ts +23 -0
  82. package/dist/ListBox/src/ListBoxItemSkeleton.js +4 -0
  83. package/dist/ListBox/src/ListBoxItemSkeletonContext.d.ts +10 -0
  84. package/dist/ListBox/src/ListBoxItemSkeletonContext.js +2 -0
  85. package/dist/ListBox/src/index.css +1434 -0
  86. package/dist/ListBox/src/index.d.ts +8 -0
  87. package/dist/ListBox/src/index.js +34 -0
  88. package/dist/ListBox/src/useLoadOnScroll.d.ts +16 -0
  89. package/dist/ListBox/src/useLoadOnScroll.js +2 -0
  90. package/dist/Section/src/Section.d.ts +19 -0
  91. package/dist/Section/src/Section.js +3 -0
  92. package/dist/Section/src/SectionContext.d.ts +9 -0
  93. package/dist/Section/src/SectionContext.js +2 -0
  94. package/dist/Section/src/index.d.ts +6 -0
  95. package/dist/Section/src/index.js +3 -0
  96. package/dist/Spinner/src/Spinner.css +19 -19
  97. package/dist/Spinner/src/Spinner.js +3 -3
  98. package/dist/Spinner/src/index.css +19 -19
  99. package/dist/Spinner/src/index.js +3 -3
  100. package/dist/buttons/src/Button.css +103 -103
  101. package/dist/buttons/src/Button.d.ts +2 -2
  102. package/dist/buttons/src/Button.js +12 -12
  103. package/dist/buttons/src/ButtonGroup.css +11 -11
  104. package/dist/buttons/src/ButtonGroup.js +3 -3
  105. package/dist/buttons/src/ClearButton.css +12 -12
  106. package/dist/buttons/src/ClearButton.js +4 -4
  107. package/dist/buttons/src/EmbeddedButton.css +12 -12
  108. package/dist/buttons/src/EmbeddedButton.js +2 -2
  109. package/dist/buttons/src/index.css +126 -126
  110. package/dist/buttons/src/index.js +16 -16
  111. package/dist/checkbox/src/Checkbox.css +81 -96
  112. package/dist/checkbox/src/Checkbox.d.ts +3 -1
  113. package/dist/checkbox/src/Checkbox.js +6 -6
  114. package/dist/checkbox/src/CheckboxContext.d.ts +2 -0
  115. package/dist/checkbox/src/CheckboxField.css +15 -15
  116. package/dist/checkbox/src/CheckboxField.js +2 -2
  117. package/dist/checkbox/src/CheckboxGroup.css +118 -133
  118. package/dist/checkbox/src/CheckboxGroup.js +4 -4
  119. package/dist/checkbox/src/index.css +118 -133
  120. package/dist/checkbox/src/index.js +10 -10
  121. package/dist/{chunk-BGESEKEN.js → chunk-2XUHTPCX.js} +13 -7
  122. package/dist/{chunk-FGDSWA7S.js → chunk-37NW34QM.js} +5 -5
  123. package/dist/{chunk-F7HR3VI4.js → chunk-3A6TTZAA.js} +2 -2
  124. package/dist/{chunk-LSVXKVG4.js → chunk-3LH2JHUO.js} +4 -4
  125. package/dist/{chunk-ZAJJD5FY.js → chunk-4JAV3FIH.js} +6 -6
  126. package/dist/chunk-4TXFHYHL.js +52 -0
  127. package/dist/{chunk-OMBQ3J4O.js → chunk-53FHDOG7.js} +13 -7
  128. package/dist/chunk-5H5AZJPQ.js +7 -0
  129. package/dist/{chunk-WTKIUAHI.js → chunk-632B5YBQ.js} +1 -1
  130. package/dist/{chunk-XSASR6CK.js → chunk-6QMIRVLY.js} +2 -2
  131. package/dist/chunk-7JOGKC3W.js +7 -0
  132. package/dist/chunk-AES7QBQE.js +7 -0
  133. package/dist/chunk-BC5A7RHI.js +1260 -0
  134. package/dist/{chunk-HDYG2F3D.js → chunk-BKC74M6Y.js} +3 -3
  135. package/dist/{chunk-ZSFJVMJN.js → chunk-CQDLZ42T.js} +1 -1
  136. package/dist/chunk-E4ALW4MZ.js +250 -0
  137. package/dist/chunk-E4WFKXW4.js +161 -0
  138. package/dist/{chunk-PEPKE5SW.js → chunk-F2URSFJA.js} +5 -5
  139. package/dist/{chunk-ACVMW6YD.js → chunk-FAE27DLF.js} +1 -1
  140. package/dist/chunk-FYIHMKHI.js +7 -0
  141. package/dist/{chunk-Y7XWWUMU.js → chunk-G242LPQE.js} +2 -2
  142. package/dist/chunk-GFHBDUJD.js +17 -0
  143. package/dist/{chunk-2CKDJG6R.js → chunk-HR25MLRP.js} +1 -1
  144. package/dist/{chunk-ESVVLTEN.js → chunk-HZKFQ33E.js} +1 -1
  145. package/dist/chunk-I4VPBQI7.js +7 -0
  146. package/dist/chunk-ITQK6JTD.js +81 -0
  147. package/dist/chunk-J33IFG4U.js +46 -0
  148. package/dist/chunk-J53HGLCT.js +49 -0
  149. package/dist/{chunk-PDYU6DNF.js → chunk-JRDN364E.js} +5 -5
  150. package/dist/chunk-JTNMFPM4.js +41 -0
  151. package/dist/chunk-JUMJ6A3K.js +46 -0
  152. package/dist/chunk-JWW56J7M.js +7 -0
  153. package/dist/{chunk-BCHUEONM.js → chunk-K4ZGI7DJ.js} +1 -1
  154. package/dist/chunk-L5A2UTQV.js +43 -0
  155. package/dist/{chunk-6MSYEF4W.js → chunk-MED2BIDV.js} +2 -2
  156. package/dist/{chunk-QJBQRYJS.js → chunk-MVRI6GLQ.js} +3 -3
  157. package/dist/{chunk-Z3ID4UEE.js → chunk-N77LTZ4U.js} +3 -15
  158. package/dist/{chunk-ANVMQBBG.js → chunk-NMKBUGSO.js} +12 -1
  159. package/dist/chunk-NS3XVOQ7.js +53 -0
  160. package/dist/chunk-O5PTD6IN.js +41 -0
  161. package/dist/{chunk-5GRWAXTT.js → chunk-OHB5QR5P.js} +2 -2
  162. package/dist/chunk-OKZYR4RF.js +7 -0
  163. package/dist/{chunk-GBABMUAI.js → chunk-P5CWOV3L.js} +3 -3
  164. package/dist/{chunk-RCFB4SN4.js → chunk-QBCCF2C2.js} +6 -6
  165. package/dist/chunk-RA7PM75O.js +142 -0
  166. package/dist/{chunk-TSXPLL55.js → chunk-RCX5B3S3.js} +4 -4
  167. package/dist/{chunk-WGDP4ECF.js → chunk-RG4JKE4N.js} +3 -3
  168. package/dist/{chunk-LRXYIR2A.js → chunk-SOSHKMNI.js} +6 -5
  169. package/dist/chunk-UIEP5BA5.js +7 -0
  170. package/dist/{chunk-DZTMUFVC.js → chunk-V5GOY6TV.js} +2 -2
  171. package/dist/{chunk-Y3L6TPP3.js → chunk-XGKPMLYD.js} +8 -8
  172. package/dist/{chunk-N745TDH5.js → chunk-XRC7XE6B.js} +2 -2
  173. package/dist/chunk-Y2POLIXK.js +7 -0
  174. package/dist/{chunk-H6CDFWVR.js → chunk-ZOTVZM6F.js} +6 -2
  175. package/dist/i18n/src/index.js +1 -1
  176. package/dist/i18n/src/useLocalizedString.js +1 -1
  177. package/dist/inputs/src/InputGroup.css +12 -12
  178. package/dist/inputs/src/InputGroup.js +2 -2
  179. package/dist/inputs/src/PasswordField.css +1340 -570
  180. package/dist/inputs/src/PasswordField.js +80 -164
  181. package/dist/inputs/src/SearchField.css +1325 -576
  182. package/dist/inputs/src/SearchField.d.ts +2 -2
  183. package/dist/inputs/src/SearchField.js +80 -164
  184. package/dist/inputs/src/TextField.css +1337 -571
  185. package/dist/inputs/src/TextField.js +79 -56
  186. package/dist/inputs/src/index.css +1237 -471
  187. package/dist/inputs/src/index.d.ts +4 -0
  188. package/dist/inputs/src/index.js +79 -56
  189. package/dist/layout/src/Grid.d.ts +2 -22
  190. package/dist/layout/src/Grid.js +1 -1
  191. package/dist/layout/src/grid-helpers.d.ts +24 -0
  192. package/dist/layout/src/grid-helpers.js +2 -0
  193. package/dist/overlays/Popover/src/Popover.css +1480 -639
  194. package/dist/overlays/Popover/src/Popover.d.ts +5 -6
  195. package/dist/overlays/Popover/src/Popover.js +80 -54
  196. package/dist/overlays/Popover/src/PopoverContext.d.ts +1 -2
  197. package/dist/overlays/Popover/src/PopoverTrigger.d.ts +8 -0
  198. package/dist/overlays/Popover/src/PopoverTrigger.js +2 -0
  199. package/dist/overlays/Popover/src/index.css +1480 -639
  200. package/dist/overlays/Popover/src/index.d.ts +3 -2
  201. package/dist/overlays/Popover/src/index.js +80 -54
  202. package/dist/radio/src/Radio.css +69 -81
  203. package/dist/radio/src/Radio.d.ts +3 -1
  204. package/dist/radio/src/Radio.js +6 -6
  205. package/dist/radio/src/RadioContext.d.ts +2 -0
  206. package/dist/radio/src/RadioField.css +15 -15
  207. package/dist/radio/src/RadioField.js +4 -4
  208. package/dist/radio/src/RadioGroup.css +106 -118
  209. package/dist/radio/src/RadioGroup.js +5 -5
  210. package/dist/radio/src/index.css +106 -118
  211. package/dist/radio/src/index.js +11 -11
  212. package/dist/switch/src/Switch.css +27 -28
  213. package/dist/switch/src/Switch.js +6 -6
  214. package/dist/switch/src/SwitchField.css +15 -15
  215. package/dist/switch/src/SwitchField.js +2 -2
  216. package/dist/switch/src/index.css +33 -34
  217. package/dist/switch/src/index.js +7 -7
  218. package/dist/tag/src/Tag.css +1550 -633
  219. package/dist/tag/src/Tag.js +80 -52
  220. package/dist/tag/src/TagGroup.css +30 -30
  221. package/dist/tag/src/TagGroup.js +5 -5
  222. package/dist/tag/src/index.css +1550 -633
  223. package/dist/tag/src/index.js +80 -52
  224. package/dist/typography/Heading/src/Heading.css +1439 -522
  225. package/dist/typography/Heading/src/Heading.js +80 -52
  226. package/dist/typography/Heading/src/index.css +1439 -522
  227. package/dist/typography/Heading/src/index.js +80 -52
  228. package/dist/typography/Label/src/Label.css +9 -9
  229. package/dist/typography/Label/src/Label.js +1 -1
  230. package/dist/typography/Label/src/index.css +9 -9
  231. package/dist/typography/Label/src/index.js +1 -1
  232. package/dist/typography/OverlineText/src/OverlineText.css +6 -6
  233. package/dist/typography/OverlineText/src/OverlineText.js +1 -1
  234. package/dist/typography/OverlineText/src/index.css +6 -6
  235. package/dist/typography/OverlineText/src/index.js +1 -1
  236. package/dist/typography/Text/src/Text.css +9 -9
  237. package/dist/typography/Text/src/Text.js +3 -3
  238. package/dist/typography/Text/src/index.css +9 -9
  239. package/dist/typography/Text/src/index.js +3 -3
  240. package/dist/utils/src/index.d.ts +1 -1
  241. package/dist/utils/src/index.js +3 -3
  242. package/dist/utils/src/types.d.ts +16 -1
  243. package/package.json +5 -4
  244. package/dist/badge/src/BadgeContext.js +0 -2
  245. package/dist/chip/src/ChipContext.js +0 -2
  246. package/dist/chunk-CPWTHZGJ.js +0 -156
  247. package/dist/chunk-LJXTJRSB.js +0 -1
  248. package/dist/chunk-SWMFTL46.js +0 -373
  249. package/dist/chunk-TR7YX3IZ.js +0 -96
  250. package/dist/errorMessage/src/ErrorMessageContext.js +0 -2
  251. package/dist/helperMessage/src/HelperMessageContext.js +0 -2
  252. /package/dist/{badge → Badge}/src/BadgeContext.d.ts +0 -0
  253. /package/dist/{badge → Badge}/src/index.d.ts +0 -0
  254. /package/dist/{chip → Chip}/src/Chip.d.ts +0 -0
  255. /package/dist/{chip → Chip}/src/ChipContext.d.ts +0 -0
  256. /package/dist/{chip → Chip}/src/index.d.ts +0 -0
  257. /package/dist/{errorMessage → ErrorMessage}/src/ErrorMessage.d.ts +0 -0
  258. /package/dist/{errorMessage → ErrorMessage}/src/ErrorMessageContext.d.ts +0 -0
  259. /package/dist/{errorMessage → ErrorMessage}/src/index.d.ts +0 -0
  260. /package/dist/{helperMessage → HelperMessage}/src/HelperMessage.d.ts +0 -0
  261. /package/dist/{helperMessage → HelperMessage}/src/HelperMessageContext.d.ts +0 -0
  262. /package/dist/{helperMessage → HelperMessage}/src/index.d.ts +0 -0
@@ -1,156 +0,0 @@
1
- import { TextFieldContext } from './chunk-O4XPUINW.js';
2
- import { _InputGroup } from './chunk-DZTMUFVC.js';
3
- import { ErrorMessageContext } from './chunk-ACVMW6YD.js';
4
- import { HelperMessageContext } from './chunk-ESVVLTEN.js';
5
- import { _ClearButton } from './chunk-5GRWAXTT.js';
6
- import { useLocalizedString } from './chunk-H6CDFWVR.js';
7
- import { LabelContext } from './chunk-QCA3ZR56.js';
8
- import { isTextOnlyChildren } from './chunk-ZWU6DRRZ.js';
9
- import { _Text } from './chunk-WGDP4ECF.js';
10
- import { ClearContainerSlots } from './chunk-HXI3MEEK.js';
11
- import { TextContext } from './chunk-X6SER3TZ.js';
12
- import { composeClassnameRenderProps } from './chunk-65JPI4FL.js';
13
- import { cssModule } from './chunk-KVDXQMWI.js';
14
- import { SlotProvider } from './chunk-M36KANKC.js';
15
- import { IconContext } from '@hopper-ui/icons';
16
- import { useStyledSystem, useResponsiveValue } from '@hopper-ui/styled-system';
17
- import { mergeRefs } from '@react-aria/utils';
18
- import { useControlledState } from '@react-stately/utils';
19
- import { forwardRef, useState, useCallback } from 'react';
20
- import { useObjectRef } from 'react-aria';
21
- import { useContextProps, composeRenderProps, Input, TextField as TextField$1 } from 'react-aria-components';
22
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
23
-
24
- // css-module:./TextField.module.css#css-module
25
- var TextField_module_default = { "hop-TextField": "TextField-module__hop-TextField___AlY6b", "hop-TextField--fluid": "TextField-module__hop-TextField--fluid___5qFaA", "hop-TextField__Label": "TextField-module__hop-TextField__Label___sT4Ln", "hop-TextField__prefix": "TextField-module__hop-TextField__prefix___BGZl9", "hop-TextField__InputGroup": "TextField-module__hop-TextField__InputGroup___fIBBH", "hop-TextField__ErrorMessage": "TextField-module__hop-TextField__ErrorMessage___PyjXp", "hop-TextField__HelperMessage": "TextField-module__hop-TextField__HelperMessage___h-59a" };
26
- var GlobalTextFieldCssSelector = "hop-TextField";
27
- function TextField(props, ref) {
28
- var _a;
29
- const {
30
- inputRef: userProvidedInputRef = null,
31
- ...propsWithoutRef
32
- } = props;
33
- [props, ref] = useContextProps(propsWithoutRef, ref, TextFieldContext);
34
- const { stylingProps, ...ownProps } = useStyledSystem(props);
35
- const [characterCount, setCharacterCount] = useState(() => {
36
- var _a2, _b, _c, _d;
37
- return (_d = (_c = (_a2 = props.value) == null ? void 0 : _a2.length) != null ? _c : (_b = props.defaultValue) == null ? void 0 : _b.length) != null ? _d : 0;
38
- });
39
- const {
40
- className,
41
- style: styleProp,
42
- size,
43
- prefix,
44
- showCharacterCount,
45
- maxLength,
46
- placeholder,
47
- isClearable,
48
- onChange: onChangeProp,
49
- children,
50
- onClear,
51
- defaultValue,
52
- value: valueProp,
53
- isFluid: isFluidProp,
54
- isDisabled,
55
- isInvalid,
56
- ...otherProps
57
- } = ownProps;
58
- const inputRef = useObjectRef(mergeRefs(userProvidedInputRef, props.inputRef !== void 0 ? props.inputRef : null));
59
- const isFluid = (_a = useResponsiveValue(isFluidProp)) != null ? _a : false;
60
- const classNames = composeClassnameRenderProps(
61
- className,
62
- GlobalTextFieldCssSelector,
63
- cssModule(
64
- TextField_module_default,
65
- "hop-TextField",
66
- isClearable && "clearable",
67
- isFluid && "fluid"
68
- ),
69
- stylingProps.className
70
- );
71
- const style = composeRenderProps(styleProp, (prev) => {
72
- return {
73
- ...stylingProps.style,
74
- ...prev
75
- };
76
- });
77
- const handleTextChanged = useCallback((value2) => {
78
- setCharacterCount(value2.length);
79
- onChangeProp == null ? void 0 : onChangeProp(value2);
80
- }, [onChangeProp]);
81
- const [value, onChange] = useControlledState(valueProp, defaultValue || "", handleTextChanged);
82
- const handleClear = useCallback(() => {
83
- onChange("");
84
- onClear == null ? void 0 : onClear();
85
- }, [onChange, onClear]);
86
- const showClearButton = isClearable && characterCount !== 0;
87
- if (showCharacterCount && !maxLength) {
88
- console.warn("If showCharacterCount is true, maxLength must be set to the maximum number of characters allowed in the TextField.");
89
- }
90
- const prefixMarkup = prefix ? /* @__PURE__ */ jsx(
91
- SlotProvider,
92
- {
93
- values: [
94
- [TextContext, { size, className: TextField_module_default["hop-TextField__prefix"] }],
95
- [IconContext, { size, className: TextField_module_default["hop-TextField__prefix"] }]
96
- ],
97
- children: isTextOnlyChildren(prefix) ? /* @__PURE__ */ jsx(_Text, { children: prefix }) : prefix
98
- }
99
- ) : null;
100
- const inputMarkup = /* @__PURE__ */ jsx(ClearContainerSlots, { children: /* @__PURE__ */ jsxs(
101
- _InputGroup,
102
- {
103
- isFluid,
104
- size,
105
- className: TextField_module_default["hop-TextField__InputGroup"],
106
- isDisabled,
107
- isInvalid,
108
- children: [
109
- prefixMarkup,
110
- /* @__PURE__ */ jsx(Input, { ref: inputRef, placeholder }),
111
- showCharacterCount && maxLength && /* @__PURE__ */ jsx(CharacterCount, { characterLeft: maxLength - characterCount }),
112
- showClearButton && /* @__PURE__ */ jsx(_ClearButton, { isDisabled, size: "lg", onPress: handleClear })
113
- ]
114
- }
115
- ) });
116
- const childrenMarkup = composeRenderProps(children, (prev) => {
117
- return /* @__PURE__ */ jsxs(Fragment, { children: [
118
- /* @__PURE__ */ jsx(
119
- SlotProvider,
120
- {
121
- values: [
122
- [LabelContext, { className: TextField_module_default["hop-TextField__Label"] }],
123
- [HelperMessageContext, { className: TextField_module_default["hop-TextField__HelperMessage"] }],
124
- [ErrorMessageContext, { className: TextField_module_default["hop-TextField__ErrorMessage"] }]
125
- ],
126
- children: prev
127
- }
128
- ),
129
- inputMarkup
130
- ] });
131
- });
132
- return /* @__PURE__ */ jsx(
133
- TextField$1,
134
- {
135
- ref,
136
- value,
137
- style,
138
- className: classNames,
139
- maxLength,
140
- onChange,
141
- isDisabled,
142
- isInvalid,
143
- ...otherProps,
144
- children: childrenMarkup
145
- }
146
- );
147
- }
148
- function CharacterCount({ characterLeft }) {
149
- const stringFormatter = useLocalizedString();
150
- const accessibilityString = stringFormatter.format("Input.charactersLeft", { charLeft: characterLeft });
151
- return /* @__PURE__ */ jsx(_Text, { "aria-label": accessibilityString, color: "neutral-weakest", size: "xs", children: characterLeft });
152
- }
153
- var _TextField = forwardRef(TextField);
154
- _TextField.displayName = "TextField";
155
-
156
- export { GlobalTextFieldCssSelector, _TextField };
@@ -1 +0,0 @@
1
-
@@ -1,373 +0,0 @@
1
- import { HeadingContext } from './chunk-TXZ6BMFR.js';
2
- import { isArray, isDefined, isEmptyArray, isFunction, isNil, isNilOrEmpty, isNull, isNumber, isObject, isPlainObject, isPromise, isString, isUndefined } from './chunk-TIPN4VYD.js';
3
- import { GlobalTagGroupCssSelector, _TagGroup } from './chunk-FGDSWA7S.js';
4
- import { TagContext } from './chunk-EWMWQ2MC.js';
5
- import { TagGroupContext } from './chunk-LCAS3YQV.js';
6
- import { GlobalTagListCssSelector, _TagList } from './chunk-WWRB4K4M.js';
7
- import { TagListContext } from './chunk-XLKYXKWE.js';
8
- import { GlobalRadioGroupCssSelector, _RadioGroup } from './chunk-PDYU6DNF.js';
9
- import { RadioGroupContext } from './chunk-5MBJWRZD.js';
10
- import { GlobalRadioListCssSelector, _RadioList } from './chunk-NKHMUPAP.js';
11
- import { RadioListContext } from './chunk-A7TZHALP.js';
12
- import { GlobalSwitchCssSelector, _Switch } from './chunk-ZAJJD5FY.js';
13
- import { GlobalSwitchFieldCssSelector, _SwitchField } from './chunk-N745TDH5.js';
14
- import { SwitchFieldContext } from './chunk-H7VJS4MX.js';
15
- import { SwitchContext } from './chunk-YHBJAXUY.js';
16
- import { _Grid, fitContent, minmax, repeat } from './chunk-Z3ID4UEE.js';
17
- import { _Inline } from './chunk-Y7HUXUHX.js';
18
- import { _Stack } from './chunk-D6UTDI2K.js';
19
- import { GlobalRadioCssSelector, _Radio } from './chunk-BGESEKEN.js';
20
- import { GlobalRadioFieldCssSelector, _RadioField } from './chunk-TSXPLL55.js';
21
- import { RadioContext } from './chunk-FU5CCPLP.js';
22
- import { RadioFieldContext } from './chunk-DGLAGYBD.js';
23
- import { _Content, GlobalContentCssSelector } from './chunk-GXBVNCVP.js';
24
- import { ContentContext } from './chunk-IXB2WK56.js';
25
- import { _Flex } from './chunk-TVFC2MJ4.js';
26
- import { _Footer, GlobalFooterCssSelector } from './chunk-AQITZWYM.js';
27
- import { FooterContext } from './chunk-I67NHYK4.js';
28
- import { _Chip, GlobalChipCssSelector } from './chunk-PEPKE5SW.js';
29
- import { ChipContext } from './chunk-WTKIUAHI.js';
30
- import { _ErrorMessage, GlobalErrorMessageCssSelector } from './chunk-QJBQRYJS.js';
31
- import { GlobalHelperMessageCssSelector, _HelperMessage } from './chunk-GBABMUAI.js';
32
- import { _CheckboxField, GlobalCheckboxFieldCssSelector } from './chunk-XSASR6CK.js';
33
- import { _CheckboxGroup, GlobalCheckboxGroupCssSelector } from './chunk-LSVXKVG4.js';
34
- import { ErrorMessageContext } from './chunk-ACVMW6YD.js';
35
- import { HelperMessageContext } from './chunk-ESVVLTEN.js';
36
- import { CheckboxFieldContext } from './chunk-ZGNK4GWA.js';
37
- import { CheckboxGroupContext } from './chunk-N7YDPVZL.js';
38
- import { _CheckboxList, GlobalCheckboxListCssSelector } from './chunk-3LRBUQC2.js';
39
- import { CheckboxListContext } from './chunk-WDUQUPTE.js';
40
- import { _ButtonGroup, GlobalButtonGroupCssSelector } from './chunk-HDYG2F3D.js';
41
- import { ButtonGroupContext } from './chunk-VJQ7M2BK.js';
42
- import { _ClearButton, GlobalClearButtonCssSelector } from './chunk-5GRWAXTT.js';
43
- import { ClearButtonContext } from './chunk-DXVKHP4V.js';
44
- import { _EmbeddedButton, GlobalEmbeddedButtonCssSelector } from './chunk-6MSYEF4W.js';
45
- import { EmbeddedButtonContext } from './chunk-O7IJYNVQ.js';
46
- import { _Checkbox, GlobalCheckboxCssSelector } from './chunk-OMBQ3J4O.js';
47
- import { CheckboxContext } from './chunk-2EAZPH3M.js';
48
- import { _Badge, GlobalBadgeCssSelector } from './chunk-LRXYIR2A.js';
49
- import { GlobalOverlineTextCssSelector, _OverlineText } from './chunk-BCHUEONM.js';
50
- import { OverlineTextContext } from './chunk-WPNVVGFW.js';
51
- import { BadgeContext } from './chunk-ZSFJVMJN.js';
52
- import { _Button, GlobalButtonCssSelector } from './chunk-Y3L6TPP3.js';
53
- import { useSlot } from './chunk-H5YTU3U7.js';
54
- import { useRenderProps } from './chunk-NH3IVMXB.js';
55
- import { useLocalizedString } from './chunk-H6CDFWVR.js';
56
- import { GlobalSpinnerCssSelector, _Spinner } from './chunk-Y7XWWUMU.js';
57
- import { GlobalLabelCssSelector, _Label } from './chunk-2CKDJG6R.js';
58
- import { LabelContext } from './chunk-QCA3ZR56.js';
59
- import { SpinnerContext } from './chunk-4ZYV2XLW.js';
60
- import { ButtonContext } from './chunk-WMTWFKKP.js';
61
- import { GlobalHopperProviderCssSelector, _HopperProvider } from './chunk-ANVMQBBG.js';
62
- import { GlobalIconListCssSelector, _IconList } from './chunk-F7HR3VI4.js';
63
- import { GlobalLinkCssSelector, _Link } from './chunk-RCFB4SN4.js';
64
- import { isTextOnlyChildren } from './chunk-ZWU6DRRZ.js';
65
- import { GlobalTextCssSelector, _Text } from './chunk-WGDP4ECF.js';
66
- import { ClearContainerSlots, ClearProviders } from './chunk-HXI3MEEK.js';
67
- import { TextContext } from './chunk-X6SER3TZ.js';
68
- import { composeClassnameRenderProps } from './chunk-65JPI4FL.js';
69
- import { cssModule } from './chunk-KVDXQMWI.js';
70
- import { SlotProvider } from './chunk-M36KANKC.js';
71
- import { IconListContext } from './chunk-DHVVYSLB.js';
72
- import { LinkContext } from './chunk-4VVNSXIB.js';
73
- import { __export, __reExport } from './chunk-2P3A4VVY.js';
74
- import * as styled_system_star from '@hopper-ui/styled-system';
75
- import { useStyledSystem, useResponsiveValue } from '@hopper-ui/styled-system';
76
- import clsx from 'clsx';
77
- import { forwardRef } from 'react';
78
- import { useContextProps, Heading as Heading$1, composeRenderProps, Tag as Tag$1 } from 'react-aria-components';
79
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
80
- import { IconContext } from '@hopper-ui/icons';
81
-
82
- // src/index.ts
83
- var src_exports = {};
84
- __export(src_exports, {
85
- Badge: () => _Badge,
86
- BadgeContext: () => BadgeContext,
87
- Button: () => _Button,
88
- ButtonContext: () => ButtonContext,
89
- ButtonGroup: () => _ButtonGroup,
90
- ButtonGroupContext: () => ButtonGroupContext,
91
- Checkbox: () => _Checkbox,
92
- CheckboxContext: () => CheckboxContext,
93
- CheckboxField: () => _CheckboxField,
94
- CheckboxFieldContext: () => CheckboxFieldContext,
95
- CheckboxGroup: () => _CheckboxGroup,
96
- CheckboxGroupContext: () => CheckboxGroupContext,
97
- CheckboxList: () => _CheckboxList,
98
- CheckboxListContext: () => CheckboxListContext,
99
- Chip: () => _Chip,
100
- ChipContext: () => ChipContext,
101
- ClearButton: () => _ClearButton,
102
- ClearButtonContext: () => ClearButtonContext,
103
- ClearContainerSlots: () => ClearContainerSlots,
104
- ClearProviders: () => ClearProviders,
105
- Content: () => _Content,
106
- ContentContext: () => ContentContext,
107
- EmbeddedButton: () => _EmbeddedButton,
108
- EmbeddedButtonContext: () => EmbeddedButtonContext,
109
- ErrorMessage: () => _ErrorMessage,
110
- ErrorMessageContext: () => ErrorMessageContext,
111
- Flex: () => _Flex,
112
- Footer: () => _Footer,
113
- FooterContext: () => FooterContext,
114
- GlobalBadgeCssSelector: () => GlobalBadgeCssSelector,
115
- GlobalButtonCssSelector: () => GlobalButtonCssSelector,
116
- GlobalButtonGroupCssSelector: () => GlobalButtonGroupCssSelector,
117
- GlobalCheckboxCssSelector: () => GlobalCheckboxCssSelector,
118
- GlobalCheckboxFieldCssSelector: () => GlobalCheckboxFieldCssSelector,
119
- GlobalCheckboxGroupCssSelector: () => GlobalCheckboxGroupCssSelector,
120
- GlobalCheckboxListCssSelector: () => GlobalCheckboxListCssSelector,
121
- GlobalChipCssSelector: () => GlobalChipCssSelector,
122
- GlobalClearButtonCssSelector: () => GlobalClearButtonCssSelector,
123
- GlobalContentCssSelector: () => GlobalContentCssSelector,
124
- GlobalEmbeddedButtonCssSelector: () => GlobalEmbeddedButtonCssSelector,
125
- GlobalErrorMessageCssSelector: () => GlobalErrorMessageCssSelector,
126
- GlobalFooterCssSelector: () => GlobalFooterCssSelector,
127
- GlobalHeadingCssSelector: () => GlobalHeadingCssSelector,
128
- GlobalHelperMessageCssSelector: () => GlobalHelperMessageCssSelector,
129
- GlobalHopperProviderCssSelector: () => GlobalHopperProviderCssSelector,
130
- GlobalIconListCssSelector: () => GlobalIconListCssSelector,
131
- GlobalLabelCssSelector: () => GlobalLabelCssSelector,
132
- GlobalLinkCssSelector: () => GlobalLinkCssSelector,
133
- GlobalOverlineTextCssSelector: () => GlobalOverlineTextCssSelector,
134
- GlobalRadioCssSelector: () => GlobalRadioCssSelector,
135
- GlobalRadioFieldCssSelector: () => GlobalRadioFieldCssSelector,
136
- GlobalRadioGroupCssSelector: () => GlobalRadioGroupCssSelector,
137
- GlobalRadioListCssSelector: () => GlobalRadioListCssSelector,
138
- GlobalSpinnerCssSelector: () => GlobalSpinnerCssSelector,
139
- GlobalSwitchCssSelector: () => GlobalSwitchCssSelector,
140
- GlobalSwitchFieldCssSelector: () => GlobalSwitchFieldCssSelector,
141
- GlobalTagCssSelector: () => GlobalTagCssSelector,
142
- GlobalTagGroupCssSelector: () => GlobalTagGroupCssSelector,
143
- GlobalTagListCssSelector: () => GlobalTagListCssSelector,
144
- GlobalTextCssSelector: () => GlobalTextCssSelector,
145
- Grid: () => _Grid,
146
- H1: () => H1,
147
- H2: () => H2,
148
- H3: () => H3,
149
- H4: () => H4,
150
- H5: () => H5,
151
- H6: () => H6,
152
- Heading: () => _Heading,
153
- HeadingContext: () => HeadingContext,
154
- HelperMessage: () => _HelperMessage,
155
- HelperMessageContext: () => HelperMessageContext,
156
- HopperProvider: () => _HopperProvider,
157
- IconList: () => _IconList,
158
- IconListContext: () => IconListContext,
159
- Inline: () => _Inline,
160
- Label: () => _Label,
161
- LabelContext: () => LabelContext,
162
- Link: () => _Link,
163
- LinkContext: () => LinkContext,
164
- OverlineText: () => _OverlineText,
165
- OverlineTextContext: () => OverlineTextContext,
166
- Radio: () => _Radio,
167
- RadioContext: () => RadioContext,
168
- RadioField: () => _RadioField,
169
- RadioFieldContext: () => RadioFieldContext,
170
- RadioGroup: () => _RadioGroup,
171
- RadioGroupContext: () => RadioGroupContext,
172
- RadioList: () => _RadioList,
173
- RadioListContext: () => RadioListContext,
174
- SlotProvider: () => SlotProvider,
175
- Spinner: () => _Spinner,
176
- SpinnerContext: () => SpinnerContext,
177
- Stack: () => _Stack,
178
- Switch: () => _Switch,
179
- SwitchContext: () => SwitchContext,
180
- SwitchField: () => _SwitchField,
181
- SwitchFieldContext: () => SwitchFieldContext,
182
- Tag: () => _Tag,
183
- TagContext: () => TagContext,
184
- TagGroup: () => _TagGroup,
185
- TagGroupContext: () => TagGroupContext,
186
- TagList: () => _TagList,
187
- TagListContext: () => TagListContext,
188
- Text: () => _Text,
189
- TextContext: () => TextContext,
190
- composeClassnameRenderProps: () => composeClassnameRenderProps,
191
- cssModule: () => cssModule,
192
- fitContent: () => fitContent,
193
- isArray: () => isArray,
194
- isDefined: () => isDefined,
195
- isEmptyArray: () => isEmptyArray,
196
- isFunction: () => isFunction,
197
- isNil: () => isNil,
198
- isNilOrEmpty: () => isNilOrEmpty,
199
- isNull: () => isNull,
200
- isNumber: () => isNumber,
201
- isObject: () => isObject,
202
- isPlainObject: () => isPlainObject,
203
- isPromise: () => isPromise,
204
- isString: () => isString,
205
- isTextOnlyChildren: () => isTextOnlyChildren,
206
- isUndefined: () => isUndefined,
207
- minmax: () => minmax,
208
- repeat: () => repeat,
209
- useRenderProps: () => useRenderProps,
210
- useSlot: () => useSlot
211
- });
212
-
213
- // css-module:./Heading.module.css#css-module
214
- var Heading_module_default = { "hop-Heading": "Heading-module__hop-Heading___Q3-KC", "hop-Heading--xs": "Heading-module__hop-Heading--xs___7idA2", "hop-Heading--sm": "Heading-module__hop-Heading--sm___tKfS2", "hop-Heading--md": "Heading-module__hop-Heading--md___EZDa1", "hop-Heading--lg": "Heading-module__hop-Heading--lg___wONbp", "hop-Heading--xl": "Heading-module__hop-Heading--xl___jZufr", "hop-Heading--2xl": "Heading-module__hop-Heading--2xl___UHXYW", "hop-Heading--3xl": "Heading-module__hop-Heading--3xl___f817X" };
215
- var GlobalHeadingCssSelector = "hop-Heading";
216
- function Heading(props, ref) {
217
- [props, ref] = useContextProps(props, ref, HeadingContext);
218
- const { stylingProps, ...ownProps } = useStyledSystem(props);
219
- const { className, size: sizeProp, children, style, ...otherProps } = ownProps;
220
- const size = (0, src_exports.useResponsiveValue)(sizeProp != null ? sizeProp : "md");
221
- const classNames = clsx(
222
- GlobalHeadingCssSelector,
223
- cssModule(
224
- Heading_module_default,
225
- "hop-Heading",
226
- size
227
- ),
228
- stylingProps.className,
229
- className
230
- );
231
- const mergedStyles = {
232
- ...stylingProps.style,
233
- ...style
234
- };
235
- return /* @__PURE__ */ jsx(
236
- Heading$1,
237
- {
238
- ...otherProps,
239
- ref,
240
- className: classNames,
241
- style: mergedStyles,
242
- children
243
- }
244
- );
245
- }
246
- var _Heading = forwardRef(Heading);
247
- _Heading.displayName = "Heading";
248
- function createHeading(as) {
249
- const level = parseInt(as[1]);
250
- return forwardRef((props, ref) => {
251
- return /* @__PURE__ */ jsx(_Heading, { ...props, ref, level });
252
- });
253
- }
254
- var H1 = createHeading("h1");
255
- var H2 = createHeading("h2");
256
- var H3 = createHeading("h3");
257
- var H4 = createHeading("h4");
258
- var H5 = createHeading("h5");
259
- var H6 = createHeading("h6");
260
-
261
- // src/index.ts
262
- __reExport(src_exports, styled_system_star);
263
-
264
- // css-module:./Tag.module.css#css-module
265
- var Tag_module_default = { "hop-Tag": "Tag-module__hop-Tag___7-wrs", "hop-Tag--md": "Tag-module__hop-Tag--md___WMt5B", "hop-Tag__icon": "Tag-module__hop-Tag__icon___5WFui", "hop-Tag__icon-list": "Tag-module__hop-Tag__icon-list___bWXWD", "hop-Tag__badge": "Tag-module__hop-Tag__badge___d16x6", "hop-Tag__remove-btn": "Tag-module__hop-Tag__remove-btn___UFMPy", "hop-Tag__Spinner": "Tag-module__hop-Tag__Spinner___MVzwl", "hop-Tag--lg": "Tag-module__hop-Tag--lg___8WdhU", "hop-Tag__text": "Tag-module__hop-Tag__text___kf8E-", "hop-Badge--secondary": "Tag-module__hop-Badge--secondary___nwORS" };
266
- var GlobalTagCssSelector = "hop-Tag";
267
- var TagToTextSizeAdapter = {
268
- md: "xs",
269
- lg: "sm"
270
- };
271
- function Tag(props, ref) {
272
- var _a;
273
- [props, ref] = useContextProps(props, ref, TagContext);
274
- const { stylingProps, ...ownProps } = useStyledSystem(props);
275
- const {
276
- className,
277
- children: childrenProp,
278
- isInvalid,
279
- isLoading,
280
- size: sizeProp = "md",
281
- style: styleProp,
282
- textValue: textValueProp,
283
- ...otherProps
284
- } = ownProps;
285
- const stringFormatter = useLocalizedString();
286
- const size = (_a = useResponsiveValue(sizeProp)) != null ? _a : "md";
287
- const textValue = textValueProp != null ? textValueProp : typeof childrenProp === "string" ? childrenProp : void 0;
288
- const classNames = composeClassnameRenderProps(
289
- className,
290
- GlobalTagCssSelector,
291
- cssModule(
292
- Tag_module_default,
293
- "hop-Tag",
294
- size
295
- ),
296
- stylingProps.className
297
- );
298
- const style = composeRenderProps(styleProp, (prev) => {
299
- return {
300
- ...stylingProps.style,
301
- ...prev
302
- };
303
- });
304
- const children = composeRenderProps(childrenProp, (prev) => {
305
- if (prev && isTextOnlyChildren(prev)) {
306
- return /* @__PURE__ */ jsx(_Text, { children: prev });
307
- }
308
- return prev;
309
- });
310
- return /* @__PURE__ */ jsx(
311
- Tag$1,
312
- {
313
- ...otherProps,
314
- ref,
315
- className: classNames,
316
- style,
317
- textValue,
318
- "data-invalid": isInvalid || void 0,
319
- "data-loading": isLoading || void 0,
320
- children: (tagProps) => {
321
- const { allowsRemoving, isDisabled } = tagProps;
322
- return /* @__PURE__ */ jsxs(Fragment, { children: [
323
- /* @__PURE__ */ jsx(ClearContainerSlots, { children: /* @__PURE__ */ jsx(
324
- SlotProvider,
325
- {
326
- values: [
327
- [TextContext, {
328
- className: Tag_module_default["hop-Tag__text"],
329
- size: TagToTextSizeAdapter[size]
330
- }],
331
- [IconListContext, {
332
- className: Tag_module_default["hop-Tag__icon-list"],
333
- size: "sm"
334
- }],
335
- [IconContext, {
336
- className: Tag_module_default["hop-Tag__icon"],
337
- size: "sm"
338
- }],
339
- [BadgeContext, {
340
- className: Tag_module_default["hop-Tag__badge"],
341
- isDisabled
342
- }]
343
- ],
344
- children: children(tagProps)
345
- }
346
- ) }),
347
- allowsRemoving && !isLoading && /* @__PURE__ */ jsx(
348
- _ClearButton,
349
- {
350
- slot: "remove",
351
- isDisabled,
352
- className: Tag_module_default["hop-Tag__remove-btn"],
353
- "aria-label": stringFormatter.format("Tag.removeAriaLabel"),
354
- size
355
- }
356
- ),
357
- isLoading && /* @__PURE__ */ jsx(
358
- _Spinner,
359
- {
360
- "aria-label": stringFormatter.format("Tag.spinnerAriaLabel"),
361
- size: "sm",
362
- className: Tag_module_default["hop-Tag__Spinner"]
363
- }
364
- )
365
- ] });
366
- }
367
- }
368
- );
369
- }
370
- var _Tag = forwardRef(Tag);
371
- _Tag.displayName = "Tag";
372
-
373
- export { GlobalHeadingCssSelector, GlobalTagCssSelector, H1, H2, H3, H4, H5, H6, _Heading, _Tag, src_exports };
@@ -1,96 +0,0 @@
1
- import { PopoverContext } from './chunk-SC6ZK5ON.js';
2
- import { src_exports } from './chunk-SWMFTL46.js';
3
- import { HeadingContext } from './chunk-TXZ6BMFR.js';
4
- import { isFunction, isNil } from './chunk-TIPN4VYD.js';
5
- import { ContentContext } from './chunk-IXB2WK56.js';
6
- import { FooterContext } from './chunk-I67NHYK4.js';
7
- import { ButtonGroupContext } from './chunk-VJQ7M2BK.js';
8
- import { ButtonContext } from './chunk-WMTWFKKP.js';
9
- import { _HopperProvider } from './chunk-ANVMQBBG.js';
10
- import { composeClassnameRenderProps } from './chunk-65JPI4FL.js';
11
- import { cssModule } from './chunk-KVDXQMWI.js';
12
- import { SlotProvider } from './chunk-M36KANKC.js';
13
- import { LinkContext } from './chunk-4VVNSXIB.js';
14
- import { useStyledSystem } from '@hopper-ui/styled-system';
15
- import clsx from 'clsx';
16
- import { forwardRef } from 'react';
17
- import { DialogTrigger, useContextProps, Popover as Popover$1, Dialog } from 'react-aria-components';
18
- import { jsx } from 'react/jsx-runtime';
19
-
20
- // css-module:./Popover.module.css#css-module
21
- var Popover_module_default = { "hop-Popover": "Popover-module__hop-Popover___zDpdV", "hop-Popover__dialog": "Popover-module__hop-Popover__dialog___hHqgn", "hop-Popover__title": "Popover-module__hop-Popover__title___z78aU", "hop-Popover__actions": "Popover-module__hop-Popover__actions___j-QCL", "hop-Popover__action": "Popover-module__hop-Popover__action___AXH59", "hop-Popover__content": "Popover-module__hop-Popover__content___4Mf8v", "hop-Popover__footer": "Popover-module__hop-Popover__footer___sSTVx" };
22
- var GlobalPopoverCssSelector = "hop-Popover";
23
- var PopoverTrigger = (props) => /* @__PURE__ */ jsx(DialogTrigger, { ...props, children: props.children });
24
- function Popover(props, ref) {
25
- [props, ref] = useContextProps(props, ref, PopoverContext);
26
- const { stylingProps, ...ownProps } = useStyledSystem(props);
27
- const {
28
- children,
29
- className,
30
- offset = 4,
31
- boundaryOffset,
32
- ...otherProps
33
- } = ownProps;
34
- const { colorScheme } = (0, src_exports.useColorSchemeContext)();
35
- const popoverClassNames = composeClassnameRenderProps(
36
- className,
37
- GlobalPopoverCssSelector,
38
- cssModule(
39
- Popover_module_default,
40
- "hop-Popover"
41
- )
42
- );
43
- return /* @__PURE__ */ jsx(
44
- Popover$1,
45
- {
46
- ...otherProps,
47
- offset,
48
- ref,
49
- className: popoverClassNames,
50
- arrowBoundaryOffset: boundaryOffset,
51
- children: (state) => /* @__PURE__ */ jsx(_HopperProvider, { colorScheme, children: /* @__PURE__ */ jsx(
52
- Dialog,
53
- {
54
- className: clsx(stylingProps.className, Popover_module_default["hop-Popover__dialog"]),
55
- style: stylingProps.style,
56
- children: /* @__PURE__ */ jsx(
57
- SlotProvider,
58
- {
59
- values: [
60
- [HeadingContext, {
61
- className: Popover_module_default["hop-Popover__title"],
62
- size: "xs"
63
- }],
64
- [ButtonContext, {
65
- size: "sm",
66
- className: Popover_module_default["hop-Popover__action"]
67
- }],
68
- [ButtonGroupContext, {
69
- size: "sm",
70
- align: "end",
71
- className: Popover_module_default["hop-Popover__actions"]
72
- }],
73
- [ContentContext, {
74
- className: Popover_module_default["hop-Popover__content"]
75
- }],
76
- [FooterContext, {
77
- className: Popover_module_default["hop-Popover__footer"]
78
- }],
79
- [LinkContext, {
80
- size: "sm",
81
- variant: "primary",
82
- isQuiet: true
83
- }]
84
- ],
85
- children: isFunction(children) && !isNil(children) ? children(state) : children
86
- }
87
- )
88
- }
89
- ) })
90
- }
91
- );
92
- }
93
- var _Popover = forwardRef(Popover);
94
- _Popover.displayName = "Popover";
95
-
96
- export { GlobalPopoverCssSelector, PopoverTrigger, _Popover };
@@ -1,2 +0,0 @@
1
- export { ErrorMessageContext } from '../../chunk-ACVMW6YD.js';
2
- import '../../chunk-2P3A4VVY.js';
@@ -1,2 +0,0 @@
1
- export { HelperMessageContext } from '../../chunk-ESVVLTEN.js';
2
- import '../../chunk-2P3A4VVY.js';
File without changes
File without changes
File without changes
File without changes
File without changes