@hopper-ui/components 1.3.30 → 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.
- package/CHANGELOG.md +6 -0
- package/dist/Avatar/src/AnonymousAvatar.css +37 -37
- package/dist/Avatar/src/AnonymousAvatar.js +2 -2
- package/dist/Avatar/src/Avatar.css +55 -55
- package/dist/Avatar/src/Avatar.js +3 -3
- package/dist/Avatar/src/DeletedAvatar.css +37 -37
- package/dist/Avatar/src/DeletedAvatar.js +2 -2
- package/dist/Avatar/src/RichIconAvatarImage.css +37 -37
- package/dist/Avatar/src/RichIconAvatarImage.js +1 -1
- package/dist/Avatar/src/index.css +55 -55
- package/dist/Avatar/src/index.js +5 -5
- package/dist/Badge/src/Badge.css +42 -42
- package/dist/Badge/src/Badge.js +2 -2
- package/dist/Badge/src/FloatingBadge.css +37 -37
- package/dist/Badge/src/FloatingBadge.js +1 -1
- package/dist/Badge/src/index.css +52 -52
- package/dist/Badge/src/index.js +3 -3
- package/dist/ComboBox/src/ComboBox.css +562 -2120
- package/dist/ComboBox/src/ComboBox.js +24 -95
- package/dist/ComboBox/src/index.css +562 -2120
- package/dist/ComboBox/src/index.js +24 -95
- package/dist/Divider/src/Divider.css +29 -29
- package/dist/Divider/src/Divider.js +1 -1
- package/dist/Divider/src/index.css +29 -29
- package/dist/Divider/src/index.js +1 -1
- package/dist/ErrorMessage/src/ErrorMessage.css +29 -29
- package/dist/ErrorMessage/src/ErrorMessage.js +2 -2
- package/dist/ErrorMessage/src/index.css +29 -29
- package/dist/ErrorMessage/src/index.js +2 -2
- package/dist/Form/src/Form.css +1593 -1836
- package/dist/Form/src/Form.js +8 -99
- package/dist/Form/src/index.css +1593 -1836
- package/dist/Form/src/index.js +8 -99
- package/dist/HelperMessage/src/HelperMessage.css +29 -29
- package/dist/HelperMessage/src/HelperMessage.js +2 -2
- package/dist/HelperMessage/src/index.css +29 -29
- package/dist/HelperMessage/src/index.js +2 -2
- package/dist/IconList/src/IconList.css +28 -28
- package/dist/IconList/src/IconList.js +1 -1
- package/dist/IconList/src/index.css +28 -28
- package/dist/IconList/src/index.js +1 -1
- package/dist/Link/src/Link.css +49 -49
- package/dist/Link/src/Link.js +9 -9
- package/dist/Link/src/index.css +49 -49
- package/dist/Link/src/index.js +9 -9
- package/dist/ListBox/src/ListBox.css +274 -274
- package/dist/ListBox/src/ListBox.js +15 -15
- package/dist/ListBox/src/ListBoxItem.css +262 -262
- package/dist/ListBox/src/ListBoxItem.js +12 -12
- package/dist/ListBox/src/ListBoxItemSkeleton.css +34 -34
- package/dist/ListBox/src/ListBoxItemSkeleton.js +1 -1
- package/dist/ListBox/src/index.css +274 -274
- package/dist/ListBox/src/index.js +15 -15
- package/dist/Select/src/Select.css +597 -2154
- package/dist/Select/src/Select.js +27 -96
- package/dist/Select/src/SelectValue.css +61 -61
- package/dist/Select/src/SelectValue.js +6 -6
- package/dist/Select/src/index.css +566 -2123
- package/dist/Select/src/index.d.ts +1 -1
- package/dist/Select/src/index.js +27 -96
- package/dist/Spinner/src/Spinner.css +37 -37
- package/dist/Spinner/src/Spinner.js +2 -2
- package/dist/Spinner/src/index.css +37 -37
- package/dist/Spinner/src/index.js +2 -2
- package/dist/buttons/src/Button.css +93 -93
- package/dist/buttons/src/Button.js +10 -10
- package/dist/buttons/src/ButtonGroup.css +38 -38
- package/dist/buttons/src/ButtonGroup.js +2 -2
- package/dist/buttons/src/ClearButton.css +98 -98
- package/dist/buttons/src/ClearButton.js +2 -2
- package/dist/buttons/src/EmbeddedButton.css +98 -98
- package/dist/buttons/src/EmbeddedButton.js +1 -1
- package/dist/buttons/src/LinkButton.css +102 -102
- package/dist/buttons/src/LinkButton.js +9 -9
- package/dist/buttons/src/index.css +249 -249
- package/dist/buttons/src/index.js +16 -16
- package/dist/checkbox/src/Checkbox.css +46 -46
- package/dist/checkbox/src/Checkbox.js +9 -9
- package/dist/checkbox/src/CheckboxField.css +33 -33
- package/dist/checkbox/src/CheckboxField.js +2 -2
- package/dist/checkbox/src/CheckboxGroup.css +98 -98
- package/dist/checkbox/src/CheckboxGroup.js +7 -7
- package/dist/checkbox/src/DecorativeCheckbox.css +54 -54
- package/dist/checkbox/src/DecorativeCheckbox.js +9 -9
- package/dist/checkbox/src/index.css +98 -98
- package/dist/checkbox/src/index.js +16 -16
- package/dist/{chunk-PHGFB7Z7.js → chunk-2BHWYRFT.js} +22 -13
- package/dist/{chunk-2MYELF25.js → chunk-3EAPRTHU.js} +1 -1
- package/dist/{chunk-DOKGX5N4.js → chunk-3VKQHRO5.js} +1 -1
- package/dist/{chunk-FVH4W7VW.js → chunk-54IRJS4J.js} +7 -7
- package/dist/{chunk-T62GNS7A.js → chunk-5SVPP6YF.js} +2 -2
- package/dist/{chunk-KUEXWJCI.js → chunk-6JPZEUJU.js} +6 -6
- package/dist/{chunk-J2GXT52N.js → chunk-A7B5XEGW.js} +2 -2
- package/dist/{chunk-7Q6MXAW6.js → chunk-BOP2AQLT.js} +2 -2
- package/dist/{chunk-SJTPZSVU.js → chunk-BWFO6U3N.js} +3 -3
- package/dist/{chunk-CY7GW4SB.js → chunk-CMYS5I7X.js} +9 -9
- package/dist/{chunk-S5NKOTEO.js → chunk-D22VY376.js} +1 -1
- package/dist/{chunk-2SXSYPWT.js → chunk-DOSDN7OK.js} +2 -2
- package/dist/{chunk-6S4ZOYNF.js → chunk-EAJI2HCK.js} +4 -4
- package/dist/{chunk-VAKUV6QI.js → chunk-EITAKLZD.js} +2 -2
- package/dist/{chunk-4YZZWHBM.js → chunk-EKVGUBEE.js} +6 -6
- package/dist/{chunk-5TIGRW6E.js → chunk-FSKZ7UXH.js} +1 -1
- package/dist/{chunk-64EU3M5O.js → chunk-GKKKRGGI.js} +2 -2
- package/dist/{chunk-SFMVHFVH.js → chunk-HKX473KB.js} +2 -2
- package/dist/chunk-INOHCKSX.js +153 -0
- package/dist/{chunk-QXOFUM6L.js → chunk-J4LFCG4M.js} +1 -1
- package/dist/{chunk-3SNUQFBZ.js → chunk-L2M5I353.js} +5 -5
- package/dist/{chunk-DZHNBZQQ.js → chunk-L4IQU6BF.js} +2 -2
- package/dist/{chunk-VLVEXVWZ.js → chunk-L4WMZWNS.js} +1 -1
- package/dist/{chunk-J4ZUH2ZP.js → chunk-NIDJ3QD5.js} +1 -1
- package/dist/chunk-NWEIQERE.js +205 -0
- package/dist/{chunk-WR3P4XWE.js → chunk-PGX7B5ZI.js} +6 -6
- package/dist/{chunk-6RCOGX6X.js → chunk-Q37IPST6.js} +3 -3
- package/dist/{chunk-MBX35AGZ.js → chunk-QKCG7UMP.js} +3 -3
- package/dist/{chunk-L5FDVVDI.js → chunk-QODWUIKG.js} +5 -5
- package/dist/{chunk-ZZVFZ7I7.js → chunk-QTWASRAE.js} +3 -3
- package/dist/{chunk-47FKFZ4S.js → chunk-QWGXDJ44.js} +3 -3
- package/dist/{chunk-5MYQ7W33.js → chunk-SP7QWHJU.js} +5 -5
- package/dist/{chunk-CVMHGZQE.js → chunk-TGWCRZOA.js} +1 -1
- package/dist/{chunk-LFCEYG5R.js → chunk-TTPSVCRY.js} +1 -1
- package/dist/{chunk-44XBQWFL.js → chunk-UCJZEAB5.js} +1 -1
- package/dist/{chunk-LXWLN4DS.js → chunk-UFMEUTKK.js} +3 -3
- package/dist/{chunk-UO5QJHXD.js → chunk-UXDJGWHZ.js} +4 -4
- package/dist/{chunk-YWNQJ4FB.js → chunk-UYEVWTDS.js} +1 -1
- package/dist/{chunk-TMVKRT2P.js → chunk-VMAP5OXR.js} +1 -1
- package/dist/{chunk-NE3BRLPL.js → chunk-WRIA2DOV.js} +2 -2
- package/dist/{chunk-NPJBY3QK.js → chunk-XGKMW4MG.js} +1 -1
- package/dist/{chunk-2JMXBZHI.js → chunk-Y2L7FXEE.js} +2 -2
- package/dist/{chunk-4I7NFPPR.js → chunk-YC5BBTPZ.js} +2 -2
- package/dist/chunk-YEN2Y62H.js +159 -0
- package/dist/{chunk-HQPE2NHR.js → chunk-YEZAILOI.js} +1 -1
- package/dist/{chunk-GRQTYLL6.js → chunk-YMDTCHEW.js} +2 -2
- package/dist/{chunk-FWIQZGWG.js → chunk-Z75MF65T.js} +1 -1
- package/dist/{chunk-WUZ4LSNY.js → chunk-ZM4AHBEK.js} +6 -6
- package/dist/chunk-ZUWVOUBT.js +270 -0
- package/dist/index.css +1001 -996
- package/dist/index.d.ts +2 -2
- package/dist/index.js +80 -74
- package/dist/inputs/src/InputGroup.css +264 -264
- package/dist/inputs/src/InputGroup.js +1 -1
- package/dist/inputs/src/NumberField.css +286 -286
- package/dist/inputs/src/NumberField.js +13 -13
- package/dist/inputs/src/PasswordField.css +274 -274
- package/dist/inputs/src/PasswordField.js +13 -13
- package/dist/inputs/src/RemainingCharacterCount.css +30 -30
- package/dist/inputs/src/RemainingCharacterCount.js +6 -6
- package/dist/inputs/src/SearchField.css +280 -280
- package/dist/inputs/src/SearchField.js +14 -14
- package/dist/inputs/src/TextArea.css +281 -281
- package/dist/inputs/src/TextArea.js +13 -13
- package/dist/inputs/src/TextField.css +278 -278
- package/dist/inputs/src/TextField.js +16 -16
- package/dist/inputs/src/index.css +324 -324
- package/dist/inputs/src/index.js +24 -24
- package/dist/overlays/Popover/src/Popover.css +2150 -3870
- package/dist/overlays/Popover/src/Popover.d.ts +1 -1
- package/dist/overlays/Popover/src/Popover.js +10 -105
- package/dist/overlays/Popover/src/PopoverContext.d.ts +1 -1
- package/dist/overlays/Popover/src/index.css +2150 -3870
- package/dist/overlays/Popover/src/index.d.ts +1 -1
- package/dist/overlays/Popover/src/index.js +11 -105
- package/dist/radio/src/DecorativeRadio.css +54 -54
- package/dist/radio/src/DecorativeRadio.js +8 -8
- package/dist/radio/src/Radio.css +46 -46
- package/dist/radio/src/Radio.js +8 -8
- package/dist/radio/src/RadioField.css +33 -33
- package/dist/radio/src/RadioField.js +2 -2
- package/dist/radio/src/RadioGroup.css +98 -98
- package/dist/radio/src/RadioGroup.js +8 -8
- package/dist/radio/src/index.css +98 -98
- package/dist/radio/src/index.js +16 -16
- package/dist/switch/src/Switch.css +43 -43
- package/dist/switch/src/Switch.js +8 -8
- package/dist/switch/src/SwitchField.css +33 -33
- package/dist/switch/src/SwitchField.d.ts +8 -3
- package/dist/switch/src/SwitchField.js +3 -1
- package/dist/switch/src/index.css +49 -49
- package/dist/switch/src/index.js +9 -9
- package/dist/tag/src/Tag.css +390 -390
- package/dist/tag/src/Tag.js +11 -11
- package/dist/tag/src/TagGroup.css +37 -37
- package/dist/tag/src/TagGroup.js +3 -3
- package/dist/tag/src/TagList.css +27 -27
- package/dist/tag/src/index.css +400 -400
- package/dist/tag/src/index.js +15 -15
- package/dist/typography/Heading/src/Heading.css +27 -27
- package/dist/typography/Heading/src/Heading.js +1 -1
- package/dist/typography/Heading/src/index.css +27 -27
- package/dist/typography/Heading/src/index.js +1 -1
- package/dist/typography/Label/src/Label.css +27 -27
- package/dist/typography/Label/src/Label.js +1 -1
- package/dist/typography/Label/src/index.css +27 -27
- package/dist/typography/Label/src/index.js +1 -1
- package/dist/typography/OverlineText/src/OverlineText.css +27 -27
- package/dist/typography/OverlineText/src/OverlineText.js +1 -1
- package/dist/typography/OverlineText/src/index.css +27 -27
- package/dist/typography/OverlineText/src/index.js +1 -1
- package/dist/typography/Text/src/Text.css +27 -27
- package/dist/typography/Text/src/Text.js +1 -1
- package/dist/typography/Text/src/index.css +27 -27
- package/dist/typography/Text/src/index.js +1 -1
- package/dist/utils/src/EnsureTextWrapper.css +27 -27
- package/dist/utils/src/EnsureTextWrapper.js +6 -6
- package/dist/utils/src/index.css +27 -27
- package/dist/utils/src/index.js +6 -6
- package/package.json +2 -1
- package/dist/chunk-UCAG6OQL.js +0 -1155
- /package/dist/{chunk-LJXTJRSB.js → chunk-DBIN32YS.js} +0 -0
|
@@ -10,7 +10,7 @@ import { useContextProps } from 'react-aria-components';
|
|
|
10
10
|
import { jsx } from 'react/jsx-runtime';
|
|
11
11
|
|
|
12
12
|
// css-module:./FloatingBadge.module.css#css-module
|
|
13
|
-
var FloatingBadge_module_default = { "hop-FloatingBadge": "FloatingBadge-module__hop-
|
|
13
|
+
var FloatingBadge_module_default = { "hop-FloatingBadge": "FloatingBadge-module__hop-FloatingBadge___TZbt0", "hop-FloatingBadge__badge": "FloatingBadge-module__hop-FloatingBadge__badge___0vqYu" };
|
|
14
14
|
var GlobalFloatingBadgeCssSelector = "hop-FloatingBadge";
|
|
15
15
|
function FloatingBadge(props, ref) {
|
|
16
16
|
[props, ref] = useContextProps(props, ref, FloatingBadgeContext);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ensureTextWrapper } from './chunk-HQPE2NHR.js';
|
|
1
|
+
import { ensureTextWrapper } from './chunk-YEZAILOI.js';
|
|
3
2
|
import { IconListContext } from './chunk-DHVVYSLB.js';
|
|
3
|
+
import { CheckboxContext } from './chunk-2EAZPH3M.js';
|
|
4
4
|
import { TextContext } from './chunk-X6SER3TZ.js';
|
|
5
5
|
import { ClearContainerSlots } from './chunk-HXI3MEEK.js';
|
|
6
6
|
import { composeClassnameRenderProps } from './chunk-65JPI4FL.js';
|
|
@@ -13,7 +13,7 @@ import { useContextProps, composeRenderProps, Checkbox as Checkbox$1 } from 'rea
|
|
|
13
13
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
14
14
|
|
|
15
15
|
// css-module:./Checkbox.module.css#css-module
|
|
16
|
-
var Checkbox_module_default = { "hop-Checkbox": "Checkbox-module__hop-
|
|
16
|
+
var Checkbox_module_default = { "hop-Checkbox": "Checkbox-module__hop-Checkbox___J32Yn", "hop-Checkbox--sm": "Checkbox-module__hop-Checkbox--sm___7Lq9Q", "hop-Checkbox--md": "Checkbox-module__hop-Checkbox--md___bD05V", "hop-Checkbox__icon": "Checkbox-module__hop-Checkbox__icon___8893o", "hop-Checkbox__icon-list": "Checkbox-module__hop-Checkbox__icon-list___9fLOv", "hop-Checkbox__box": "Checkbox-module__hop-Checkbox__box___syekA", "hop-Checkbox__check": "Checkbox-module__hop-Checkbox__check___ymFxT", "hop-Checkbox__text": "Checkbox-module__hop-Checkbox__text___-iCGJ" };
|
|
17
17
|
var GlobalCheckboxCssSelector = "hop-Checkbox";
|
|
18
18
|
function Checkbox(props, ref) {
|
|
19
19
|
var _a;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { _HelperMessage } from './chunk-YC5BBTPZ.js';
|
|
2
|
+
import { _ErrorMessage } from './chunk-WRIA2DOV.js';
|
|
1
3
|
import { CheckboxGroupContext } from './chunk-N7YDPVZL.js';
|
|
2
4
|
import { CheckboxFieldContext } from './chunk-ZGNK4GWA.js';
|
|
3
5
|
import { CheckboxContext } from './chunk-2EAZPH3M.js';
|
|
4
|
-
import { _Label } from './chunk-
|
|
5
|
-
import { _HelperMessage } from './chunk-4I7NFPPR.js';
|
|
6
|
-
import { _ErrorMessage } from './chunk-NE3BRLPL.js';
|
|
6
|
+
import { _Label } from './chunk-NIDJ3QD5.js';
|
|
7
7
|
import { composeClassnameRenderProps } from './chunk-65JPI4FL.js';
|
|
8
8
|
import { SlotProvider } from './chunk-M36KANKC.js';
|
|
9
9
|
import { cssModule } from './chunk-KVDXQMWI.js';
|
|
@@ -14,7 +14,7 @@ import { useContextProps, composeRenderProps, CheckboxGroup as CheckboxGroup$1 }
|
|
|
14
14
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
15
15
|
|
|
16
16
|
// css-module:./CheckboxGroup.module.css#css-module
|
|
17
|
-
var CheckboxGroup_module_default = { "hop-CheckboxGroup": "CheckboxGroup-module__hop-
|
|
17
|
+
var CheckboxGroup_module_default = { "hop-CheckboxGroup": "CheckboxGroup-module__hop-CheckboxGroup___cu2Nu", "hop-CheckboxGroup--bordered": "CheckboxGroup-module__hop-CheckboxGroup--bordered___-b8-z", "hop-CheckboxGroup--sm": "CheckboxGroup-module__hop-CheckboxGroup--sm___GZ22v", "hop-CheckboxGroup--md": "CheckboxGroup-module__hop-CheckboxGroup--md___fTLKV", "hop-CheckboxGroup__label": "CheckboxGroup-module__hop-CheckboxGroup__label___MYbFM", "hop-CheckboxGroup__list": "CheckboxGroup-module__hop-CheckboxGroup__list___Ov9pe", "hop-CheckboxGroup__checkbox": "CheckboxGroup-module__hop-CheckboxGroup__checkbox___T6fO8", "hop-CheckboxGroup__error-message": "CheckboxGroup-module__hop-CheckboxGroup__error-message___AVu--", "hop-CheckboxGroup__helper-message": "CheckboxGroup-module__hop-CheckboxGroup__helper-message___wGDxE" };
|
|
18
18
|
var GlobalCheckboxGroupCssSelector = "hop-CheckboxGroup";
|
|
19
19
|
function CheckboxGroup(props, ref) {
|
|
20
20
|
var _a, _b, _c;
|
|
@@ -11,7 +11,7 @@ import { useContextProps, composeRenderProps } from 'react-aria-components';
|
|
|
11
11
|
import { jsx } from 'react/jsx-runtime';
|
|
12
12
|
|
|
13
13
|
// css-module:./RichIconAvatarImage.module.css#css-module
|
|
14
|
-
var RichIconAvatarImage_module_default = { "hop-RichIconAvatarImage": "RichIconAvatarImage-module__hop-
|
|
14
|
+
var RichIconAvatarImage_module_default = { "hop-RichIconAvatarImage": "RichIconAvatarImage-module__hop-RichIconAvatarImage___j7TWO", "hop-RichIconAvatarImage--xs": "RichIconAvatarImage-module__hop-RichIconAvatarImage--xs___M2mbk", "hop-RichIconAvatarImage--sm": "RichIconAvatarImage-module__hop-RichIconAvatarImage--sm___uV3oA", "hop-RichIconAvatarImage--md": "RichIconAvatarImage-module__hop-RichIconAvatarImage--md___XrmGp", "hop-RichIconAvatarImage--lg": "RichIconAvatarImage-module__hop-RichIconAvatarImage--lg___IUn-m", "hop-RichIconAvatarImage--xl": "RichIconAvatarImage-module__hop-RichIconAvatarImage--xl___JMARD", "hop-RichIconAvatarImage--2xl": "RichIconAvatarImage-module__hop-RichIconAvatarImage--2xl___l6vUo", "hop-RichIconAvatarImage__icon": "RichIconAvatarImage-module__hop-RichIconAvatarImage__icon___YCJVR" };
|
|
15
15
|
var GlobalRichIconAvatarImageCssSelector = "hop-RichIconAvatarImage";
|
|
16
16
|
var AvatarToIconSizeAdapter = {
|
|
17
17
|
xs: "md",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AvatarContext } from './chunk-AES7QBQE.js';
|
|
2
|
-
import { _RichIconAvatarImage } from './chunk-
|
|
2
|
+
import { _RichIconAvatarImage } from './chunk-UYEVWTDS.js';
|
|
3
3
|
import { useRenderProps } from './chunk-NH3IVMXB.js';
|
|
4
4
|
import { composeClassnameRenderProps } from './chunk-65JPI4FL.js';
|
|
5
5
|
import { DeletedUserRichIcon } from '@hopper-ui/icons';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ErrorMessageContext } from './chunk-FAE27DLF.js';
|
|
2
|
-
import { _Text } from './chunk-
|
|
2
|
+
import { _Text } from './chunk-J4LFCG4M.js';
|
|
3
3
|
import { useRenderProps } from './chunk-NH3IVMXB.js';
|
|
4
4
|
import { composeClassnameRenderProps } from './chunk-65JPI4FL.js';
|
|
5
5
|
import { cssModule } from './chunk-KVDXQMWI.js';
|
|
@@ -10,7 +10,7 @@ import { FieldErrorContext, useContextProps, composeRenderProps } from 'react-ar
|
|
|
10
10
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
11
11
|
|
|
12
12
|
// css-module:./ErrorMessage.module.css#css-module
|
|
13
|
-
var ErrorMessage_module_default = { "hop-ErrorMessage": "ErrorMessage-module__hop-
|
|
13
|
+
var ErrorMessage_module_default = { "hop-ErrorMessage": "ErrorMessage-module__hop-ErrorMessage___Wg1Fu", "hop-ErrorMessage__icon": "ErrorMessage-module__hop-ErrorMessage__icon___cKatz" };
|
|
14
14
|
var GlobalErrorMessageCssSelector = "hop-ErrorMessage";
|
|
15
15
|
function ErrorMessage(props, ref) {
|
|
16
16
|
const validation = useContext(FieldErrorContext);
|
|
@@ -8,7 +8,7 @@ import { useContextProps } from 'react-aria-components';
|
|
|
8
8
|
import { jsx } from 'react/jsx-runtime';
|
|
9
9
|
|
|
10
10
|
// css-module:./IconList.module.css#css-module
|
|
11
|
-
var IconList_module_default = { "hop-IconList": "IconList-module__hop-
|
|
11
|
+
var IconList_module_default = { "hop-IconList": "IconList-module__hop-IconList___VlXPC" };
|
|
12
12
|
var GlobalIconListCssSelector = "hop-IconList";
|
|
13
13
|
function IconList(props, ref) {
|
|
14
14
|
[props, ref] = useContextProps(props, ref, IconListContext);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SpinnerContext } from './chunk-4ZYV2XLW.js';
|
|
2
|
-
import { _Text } from './chunk-
|
|
2
|
+
import { _Text } from './chunk-J4LFCG4M.js';
|
|
3
3
|
import { composeClassnameRenderProps } from './chunk-65JPI4FL.js';
|
|
4
4
|
import { cssModule } from './chunk-KVDXQMWI.js';
|
|
5
5
|
import { useStyledSystem, useResponsiveValue } from '@hopper-ui/styled-system';
|
|
@@ -9,7 +9,7 @@ import { useContextProps, ProgressBar } from 'react-aria-components';
|
|
|
9
9
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
10
10
|
|
|
11
11
|
// css-module:./Spinner.module.css#css-module
|
|
12
|
-
var Spinner_module_default = { "hop-Spinner": "Spinner-module__hop-
|
|
12
|
+
var Spinner_module_default = { "hop-Spinner": "Spinner-module__hop-Spinner___MuP7e", "spin": "Spinner-module__spin___HpFM-", "hop-Spinner--sm": "Spinner-module__hop-Spinner--sm___ktQme", "hop-Spinner--md": "Spinner-module__hop-Spinner--md___50yOv", "hop-Spinner--lg": "Spinner-module__hop-Spinner--lg___ZCBl1", "hop-Spinner__track": "Spinner-module__hop-Spinner__track___4G0TW", "hop-Spinner__fill": "Spinner-module__hop-Spinner__fill___yT12b", "hop-Spinner__label": "Spinner-module__hop-Spinner__label___SoTKE" };
|
|
13
13
|
var GlobalSpinnerCssSelector = "hop-Spinner";
|
|
14
14
|
var SpinnerToTextSizeAdapter = {
|
|
15
15
|
sm: "xs",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HelperMessageContext } from './chunk-HZKFQ33E.js';
|
|
2
|
-
import { _Text } from './chunk-
|
|
2
|
+
import { _Text } from './chunk-J4LFCG4M.js';
|
|
3
3
|
import { cssModule } from './chunk-KVDXQMWI.js';
|
|
4
4
|
import { InfoIcon } from '@hopper-ui/icons';
|
|
5
5
|
import { useStyledSystem } from '@hopper-ui/styled-system';
|
|
@@ -9,7 +9,7 @@ import { useContextProps, FieldErrorContext } from 'react-aria-components';
|
|
|
9
9
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
10
10
|
|
|
11
11
|
// css-module:./HelperMessage.module.css#css-module
|
|
12
|
-
var HelperMessage_module_default = { "hop-HelperMessage": "HelperMessage-module__hop-
|
|
12
|
+
var HelperMessage_module_default = { "hop-HelperMessage": "HelperMessage-module__hop-HelperMessage___zKfpK", "hop-HelperMessage__icon": "HelperMessage-module__hop-HelperMessage__icon___D7ReP" };
|
|
13
13
|
var GlobalHelperMessageCssSelector = "hop-HelperMessage";
|
|
14
14
|
function HelperMessage(props, ref) {
|
|
15
15
|
const validation = useContext(FieldErrorContext);
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { PopoverContext } from './chunk-SC6ZK5ON.js';
|
|
2
|
+
import { ContentContext } from './chunk-IXB2WK56.js';
|
|
3
|
+
import { FooterContext } from './chunk-I67NHYK4.js';
|
|
4
|
+
import { ButtonGroupContext } from './chunk-VJQ7M2BK.js';
|
|
5
|
+
import { isFunction, isNil } from './chunk-TIPN4VYD.js';
|
|
6
|
+
import { ListBoxContext } from './chunk-UIEP5BA5.js';
|
|
7
|
+
import { _HopperProvider } from './chunk-NMKBUGSO.js';
|
|
8
|
+
import { LinkContext } from './chunk-4VVNSXIB.js';
|
|
9
|
+
import { LinkButtonContext } from './chunk-3UQFC2NQ.js';
|
|
10
|
+
import { ButtonContext } from './chunk-WMTWFKKP.js';
|
|
11
|
+
import { HeadingContext } from './chunk-TXZ6BMFR.js';
|
|
12
|
+
import { composeClassnameRenderProps } from './chunk-65JPI4FL.js';
|
|
13
|
+
import { SlotProvider } from './chunk-M36KANKC.js';
|
|
14
|
+
import { cssModule } from './chunk-KVDXQMWI.js';
|
|
15
|
+
import { useStyledSystem, useResponsiveValue, useColorSchemeContext } from '@hopper-ui/styled-system';
|
|
16
|
+
import clsx from 'clsx';
|
|
17
|
+
import { forwardRef } from 'react';
|
|
18
|
+
import { useContextProps, composeRenderProps, Popover as Popover$1, Dialog } from 'react-aria-components';
|
|
19
|
+
import { jsx } from 'react/jsx-runtime';
|
|
20
|
+
|
|
21
|
+
// css-module:./Popover.module.css#css-module
|
|
22
|
+
var Popover_module_default = { "hop-Popover": "Popover-module__hop-Popover___-qM3A", "fade": "Popover-module__fade___AKK2S", "hop-Popover__wrapper": "Popover-module__hop-Popover__wrapper___sD-Ru", "hop-Popover__dialog": "Popover-module__hop-Popover__dialog___RWObX", "hop-Popover__dropdown": "Popover-module__hop-Popover__dropdown___RsokU", "hop-Popover__title": "Popover-module__hop-Popover__title___Opa1B", "hop-Popover__content": "Popover-module__hop-Popover__content___hc8Km", "hop-Popover__list-box": "Popover-module__hop-Popover__list-box___SYqN4", "hop-Popover__footer": "Popover-module__hop-Popover__footer___dFu5l", "hop-Popover__actions": "Popover-module__hop-Popover__actions___KQPEZ", "hop-Popover__action": "Popover-module__hop-Popover__action___AdBQB" };
|
|
23
|
+
var GlobalPopoverCssSelector = "hop-Popover";
|
|
24
|
+
function Popover(props, ref) {
|
|
25
|
+
var _a;
|
|
26
|
+
[props, ref] = useContextProps(props, ref, PopoverContext);
|
|
27
|
+
const { stylingProps, ...ownProps } = useStyledSystem(props);
|
|
28
|
+
const {
|
|
29
|
+
isAutoWidth,
|
|
30
|
+
children,
|
|
31
|
+
className,
|
|
32
|
+
offset = 4,
|
|
33
|
+
boundaryOffset,
|
|
34
|
+
isNonDialog,
|
|
35
|
+
containerPadding = 16,
|
|
36
|
+
containerProps,
|
|
37
|
+
placement: placementProp,
|
|
38
|
+
style: styleProp,
|
|
39
|
+
...otherProps
|
|
40
|
+
} = ownProps;
|
|
41
|
+
const placement = (_a = useResponsiveValue(placementProp)) != null ? _a : "bottom";
|
|
42
|
+
const { stylingProps: containerStylingProps, ...containerOwnProps } = useStyledSystem(containerProps != null ? containerProps : {});
|
|
43
|
+
const {
|
|
44
|
+
className: containerClassName,
|
|
45
|
+
style: containerStyleProp,
|
|
46
|
+
slot,
|
|
47
|
+
...containerOtherProps
|
|
48
|
+
} = containerOwnProps;
|
|
49
|
+
const { colorScheme } = useColorSchemeContext();
|
|
50
|
+
const popoverClassNames = composeClassnameRenderProps(
|
|
51
|
+
className,
|
|
52
|
+
GlobalPopoverCssSelector,
|
|
53
|
+
cssModule(
|
|
54
|
+
Popover_module_default,
|
|
55
|
+
"hop-Popover",
|
|
56
|
+
isNonDialog && "non-dialog"
|
|
57
|
+
),
|
|
58
|
+
stylingProps.className
|
|
59
|
+
);
|
|
60
|
+
const containerClassNames = isNonDialog ? clsx(containerClassName, Popover_module_default["hop-Popover__dropdown"], containerStylingProps.className) : clsx(containerClassName, Popover_module_default["hop-Popover__dialog"], containerStylingProps.className);
|
|
61
|
+
const style = composeRenderProps(styleProp, (prev) => {
|
|
62
|
+
return {
|
|
63
|
+
...stylingProps.style,
|
|
64
|
+
"--container-padding": `${containerPadding}px`,
|
|
65
|
+
...prev
|
|
66
|
+
};
|
|
67
|
+
});
|
|
68
|
+
const containerStyle = {
|
|
69
|
+
...containerStylingProps.style,
|
|
70
|
+
...containerStyleProp
|
|
71
|
+
};
|
|
72
|
+
return /* @__PURE__ */ jsx(
|
|
73
|
+
Popover$1,
|
|
74
|
+
{
|
|
75
|
+
offset,
|
|
76
|
+
ref,
|
|
77
|
+
className: popoverClassNames,
|
|
78
|
+
arrowBoundaryOffset: boundaryOffset,
|
|
79
|
+
"data-auto-width": isAutoWidth || void 0,
|
|
80
|
+
containerPadding,
|
|
81
|
+
style,
|
|
82
|
+
placement,
|
|
83
|
+
...otherProps,
|
|
84
|
+
children: (state) => {
|
|
85
|
+
const content = isFunction(children) && !isNil(children) ? children(state) : children;
|
|
86
|
+
if (isNonDialog) {
|
|
87
|
+
return /* @__PURE__ */ jsx(_HopperProvider, { colorScheme, className: Popover_module_default["hop-Popover__wrapper"], children: /* @__PURE__ */ jsx(
|
|
88
|
+
"div",
|
|
89
|
+
{
|
|
90
|
+
...containerOtherProps,
|
|
91
|
+
className: containerClassNames,
|
|
92
|
+
style: containerStyle,
|
|
93
|
+
slot: slot || void 0,
|
|
94
|
+
children: /* @__PURE__ */ jsx(
|
|
95
|
+
SlotProvider,
|
|
96
|
+
{
|
|
97
|
+
values: [
|
|
98
|
+
[ListBoxContext, {
|
|
99
|
+
className: Popover_module_default["hop-Popover__list-box"]
|
|
100
|
+
}],
|
|
101
|
+
[FooterContext, {
|
|
102
|
+
className: Popover_module_default["hop-Popover__footer"]
|
|
103
|
+
}],
|
|
104
|
+
[LinkContext, {
|
|
105
|
+
size: "sm",
|
|
106
|
+
variant: "primary",
|
|
107
|
+
isQuiet: true
|
|
108
|
+
}]
|
|
109
|
+
],
|
|
110
|
+
children: content
|
|
111
|
+
}
|
|
112
|
+
)
|
|
113
|
+
}
|
|
114
|
+
) });
|
|
115
|
+
}
|
|
116
|
+
return /* @__PURE__ */ jsx(_HopperProvider, { colorScheme, children: /* @__PURE__ */ jsx(Dialog, { ...containerOtherProps, className: containerClassNames, style: containerStyle, children: /* @__PURE__ */ jsx(
|
|
117
|
+
SlotProvider,
|
|
118
|
+
{
|
|
119
|
+
values: [
|
|
120
|
+
[HeadingContext, {
|
|
121
|
+
className: Popover_module_default["hop-Popover__title"],
|
|
122
|
+
size: "xs"
|
|
123
|
+
}],
|
|
124
|
+
[ButtonContext, {
|
|
125
|
+
size: "sm",
|
|
126
|
+
className: Popover_module_default["hop-Popover__action"]
|
|
127
|
+
}],
|
|
128
|
+
[LinkButtonContext, {
|
|
129
|
+
size: "sm",
|
|
130
|
+
className: Popover_module_default["hop-Popover__action"]
|
|
131
|
+
}],
|
|
132
|
+
[ButtonGroupContext, {
|
|
133
|
+
size: "sm",
|
|
134
|
+
align: "end",
|
|
135
|
+
className: Popover_module_default["hop-Popover__actions"]
|
|
136
|
+
}],
|
|
137
|
+
[ContentContext, {
|
|
138
|
+
className: Popover_module_default["hop-Popover__content"]
|
|
139
|
+
}],
|
|
140
|
+
[FooterContext, {
|
|
141
|
+
className: Popover_module_default["hop-Popover__footer"]
|
|
142
|
+
}],
|
|
143
|
+
[LinkContext, {
|
|
144
|
+
size: "sm",
|
|
145
|
+
variant: "primary",
|
|
146
|
+
isQuiet: true
|
|
147
|
+
}]
|
|
148
|
+
],
|
|
149
|
+
children: content
|
|
150
|
+
}
|
|
151
|
+
) }) });
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
);
|
|
155
|
+
}
|
|
156
|
+
var _Popover = forwardRef(Popover);
|
|
157
|
+
_Popover.displayName = "Popover";
|
|
158
|
+
|
|
159
|
+
export { GlobalPopoverCssSelector, _Popover };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { ButtonGroupContext } from './chunk-VJQ7M2BK.js';
|
|
1
2
|
import { LinkButtonContext } from './chunk-3UQFC2NQ.js';
|
|
2
3
|
import { ButtonContext } from './chunk-WMTWFKKP.js';
|
|
3
|
-
import { ButtonGroupContext } from './chunk-VJQ7M2BK.js';
|
|
4
4
|
import { SlotProvider } from './chunk-M36KANKC.js';
|
|
5
5
|
import { cssModule } from './chunk-KVDXQMWI.js';
|
|
6
6
|
import { slot, useStyledSystem, useResponsiveValue } from '@hopper-ui/styled-system';
|
|
@@ -11,7 +11,7 @@ import { useContextProps } from 'react-aria-components';
|
|
|
11
11
|
import { jsx } from 'react/jsx-runtime';
|
|
12
12
|
|
|
13
13
|
// css-module:./ButtonGroup.module.css#css-module
|
|
14
|
-
var ButtonGroup_module_default = { "hop-ButtonGroup": "ButtonGroup-module__hop-
|
|
14
|
+
var ButtonGroup_module_default = { "hop-ButtonGroup": "ButtonGroup-module__hop-ButtonGroup___gaNSj", "hop-ButtonGroup--horizontal": "ButtonGroup-module__hop-ButtonGroup--horizontal___Hh-nA", "hop-ButtonGroup--vertical": "ButtonGroup-module__hop-ButtonGroup--vertical___FbVpY", "hop-ButtonGroup--start": "ButtonGroup-module__hop-ButtonGroup--start___jFCxJ", "hop-ButtonGroup--center": "ButtonGroup-module__hop-ButtonGroup--center___dcupx", "hop-ButtonGroup--end": "ButtonGroup-module__hop-ButtonGroup--end___JZRp-", "hop-ButtonGroup--wrap": "ButtonGroup-module__hop-ButtonGroup--wrap___6YTyV", "hop-ButtonGroup--fluid": "ButtonGroup-module__hop-ButtonGroup--fluid___FMgwv" };
|
|
15
15
|
var GlobalButtonGroupCssSelector = "hop-ButtonGroup";
|
|
16
16
|
function ButtonGroup(props, ref) {
|
|
17
17
|
var _a, _b, _c, _d;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AvatarContext } from './chunk-AES7QBQE.js';
|
|
2
|
-
import { _RichIconAvatarImage } from './chunk-
|
|
2
|
+
import { _RichIconAvatarImage } from './chunk-UYEVWTDS.js';
|
|
3
3
|
import { useRenderProps } from './chunk-NH3IVMXB.js';
|
|
4
4
|
import { composeClassnameRenderProps } from './chunk-65JPI4FL.js';
|
|
5
5
|
import { AnonymousRichIcon } from '@hopper-ui/icons';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { _InputGroup } from './chunk-TTPSVCRY.js';
|
|
2
|
+
import { _ClearButton } from './chunk-3VKQHRO5.js';
|
|
3
|
+
import { _HelperMessage } from './chunk-YC5BBTPZ.js';
|
|
4
|
+
import { _ErrorMessage } from './chunk-WRIA2DOV.js';
|
|
1
5
|
import { SearchFieldContext } from './chunk-3NKF5TPD.js';
|
|
2
|
-
import {
|
|
3
|
-
import { _ClearButton } from './chunk-DOKGX5N4.js';
|
|
4
|
-
import { _Label } from './chunk-J4ZUH2ZP.js';
|
|
5
|
-
import { _HelperMessage } from './chunk-4I7NFPPR.js';
|
|
6
|
-
import { _ErrorMessage } from './chunk-NE3BRLPL.js';
|
|
6
|
+
import { _Label } from './chunk-NIDJ3QD5.js';
|
|
7
7
|
import { ClearContainerSlots } from './chunk-HXI3MEEK.js';
|
|
8
8
|
import { composeClassnameRenderProps } from './chunk-65JPI4FL.js';
|
|
9
9
|
import { SlotProvider } from './chunk-M36KANKC.js';
|
|
@@ -18,7 +18,7 @@ import { useContextProps, composeRenderProps, Input, SearchField as SearchField$
|
|
|
18
18
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
19
19
|
|
|
20
20
|
// css-module:./SearchField.module.css#css-module
|
|
21
|
-
var SearchField_module_default = { "hop-SearchField": "SearchField-module__hop-
|
|
21
|
+
var SearchField_module_default = { "hop-SearchField": "SearchField-module__hop-SearchField___Miw6i", "hop-SearchField--fluid": "SearchField-module__hop-SearchField--fluid___CDuqL", "hop-SearchField__Label": "SearchField-module__hop-SearchField__Label___8eoeE", "hop-SearchField__prefix": "SearchField-module__hop-SearchField__prefix___pOoGp", "hop-SearchField__InputGroup": "SearchField-module__hop-SearchField__InputGroup___zvpJY", "hop-SearchField--clearable": "SearchField-module__hop-SearchField--clearable___3RlGA", "hop-SearchField__ErrorMessage": "SearchField-module__hop-SearchField__ErrorMessage___ejFd4", "hop-SearchField__HelperMessage": "SearchField-module__hop-SearchField__HelperMessage___qsTYS", "hop-SearchField__ClearButton": "SearchField-module__hop-SearchField__ClearButton___Ruhcd" };
|
|
22
22
|
var GlobalSearchFieldCssSelector = "hop-SearchField";
|
|
23
23
|
function SearchField(props, ref) {
|
|
24
24
|
var _a;
|
|
@@ -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 };
|