@hopper-ui/components 1.3.7 → 1.3.9
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 +13 -0
- package/dist/Avatar/src/AnonymousAvatar.css +237 -10
- package/dist/Avatar/src/AnonymousAvatar.js +2 -2
- package/dist/Avatar/src/Avatar.css +184 -37
- package/dist/Avatar/src/Avatar.js +3 -3
- package/dist/Avatar/src/DeletedAvatar.css +237 -10
- package/dist/Avatar/src/DeletedAvatar.js +2 -2
- package/dist/Avatar/src/RichIconAvatarImage.css +237 -10
- package/dist/Avatar/src/RichIconAvatarImage.js +1 -1
- package/dist/Avatar/src/index.css +184 -37
- package/dist/Avatar/src/index.js +5 -5
- package/dist/Badge/src/Badge.css +205 -21
- package/dist/Badge/src/Badge.js +2 -2
- package/dist/Badge/src/FloatingBadge.css +237 -10
- package/dist/Badge/src/FloatingBadge.js +1 -1
- package/dist/Badge/src/index.css +215 -31
- package/dist/Badge/src/index.js +3 -3
- package/dist/ComboBox/src/ComboBox.css +5135 -0
- package/dist/ComboBox/src/ComboBox.d.ts +90 -0
- package/dist/ComboBox/src/ComboBox.js +124 -0
- package/dist/ComboBox/src/ComboBoxContext.d.ts +16 -0
- package/dist/ComboBox/src/ComboBoxContext.js +2 -0
- package/dist/ComboBox/src/index.css +5135 -0
- package/dist/ComboBox/src/index.d.ts +12 -0
- package/dist/ComboBox/src/index.js +124 -0
- package/dist/Divider/src/Divider.css +229 -2
- package/dist/Divider/src/Divider.js +1 -1
- package/dist/Divider/src/index.css +229 -2
- package/dist/Divider/src/index.js +1 -1
- package/dist/ErrorMessage/src/ErrorMessage.css +158 -11
- package/dist/ErrorMessage/src/ErrorMessage.js +2 -2
- package/dist/ErrorMessage/src/index.css +158 -11
- package/dist/ErrorMessage/src/index.js +2 -2
- package/dist/Form/src/Form.css +896 -894
- package/dist/Form/src/Form.js +70 -68
- package/dist/Form/src/index.css +896 -894
- package/dist/Form/src/index.js +70 -68
- package/dist/HelperMessage/src/HelperMessage.css +158 -11
- package/dist/HelperMessage/src/HelperMessage.js +2 -2
- package/dist/HelperMessage/src/index.css +158 -11
- package/dist/HelperMessage/src/index.js +2 -2
- package/dist/IconList/src/IconList.css +228 -1
- package/dist/IconList/src/IconList.js +1 -1
- package/dist/IconList/src/index.css +228 -1
- package/dist/IconList/src/index.js +1 -1
- package/dist/Link/src/Link.css +184 -37
- package/dist/Link/src/Link.js +3 -3
- package/dist/Link/src/index.css +184 -37
- package/dist/Link/src/index.js +3 -3
- package/dist/ListBox/src/ListBox.css +398 -346
- package/dist/ListBox/src/ListBox.js +7 -8
- package/dist/ListBox/src/ListBoxItem.css +391 -306
- package/dist/ListBox/src/ListBoxItem.js +5 -5
- package/dist/ListBox/src/ListBoxItemSkeleton.css +234 -7
- package/dist/ListBox/src/ListBoxItemSkeleton.js +1 -1
- package/dist/ListBox/src/index.css +398 -346
- package/dist/ListBox/src/index.js +7 -8
- package/dist/Select/src/Select.css +961 -959
- package/dist/Select/src/Select.js +70 -68
- package/dist/Select/src/SelectValue.css +197 -191
- package/dist/Select/src/SelectValue.js +5 -5
- package/dist/Select/src/index.css +961 -959
- package/dist/Select/src/index.js +70 -68
- package/dist/Spinner/src/Spinner.css +166 -19
- package/dist/Spinner/src/Spinner.js +2 -2
- package/dist/Spinner/src/index.css +166 -19
- package/dist/Spinner/src/index.js +2 -2
- package/dist/buttons/src/Button.css +247 -100
- package/dist/buttons/src/Button.js +4 -4
- package/dist/buttons/src/ButtonGroup.css +238 -11
- package/dist/buttons/src/ButtonGroup.js +2 -2
- package/dist/buttons/src/ClearButton.css +298 -71
- package/dist/buttons/src/ClearButton.js +2 -2
- package/dist/buttons/src/EmbeddedButton.css +298 -71
- package/dist/buttons/src/EmbeddedButton.js +1 -1
- package/dist/buttons/src/index.css +329 -182
- package/dist/buttons/src/index.js +8 -8
- package/dist/checkbox/src/Checkbox.css +181 -34
- package/dist/checkbox/src/Checkbox.js +2 -2
- package/dist/checkbox/src/CheckboxField.css +162 -15
- package/dist/checkbox/src/CheckboxField.js +1 -1
- package/dist/checkbox/src/CheckboxGroup.css +233 -105
- package/dist/checkbox/src/CheckboxGroup.js +2 -2
- package/dist/checkbox/src/DecorativeCheckbox.css +189 -42
- package/dist/checkbox/src/DecorativeCheckbox.js +2 -2
- package/dist/checkbox/src/index.css +233 -105
- package/dist/checkbox/src/index.js +8 -8
- package/dist/{chunk-IZUZUN6Z.js → chunk-2GYC6ADT.js} +5 -5
- package/dist/{chunk-MJ24AAEX.js → chunk-2SF7BBJT.js} +1 -1
- package/dist/{chunk-ZVOVNXPJ.js → chunk-2WK465I4.js} +1 -1
- package/dist/chunk-2ZXF62AA.js +52 -0
- package/dist/{chunk-DSUR3NPA.js → chunk-3O74ORYF.js} +3 -3
- package/dist/{chunk-LULNSRRY.js → chunk-4EUVVRTY.js} +1 -1
- package/dist/{chunk-BZC3DOXC.js → chunk-4FVIH73F.js} +2 -2
- package/dist/{chunk-SRT6TJ7K.js → chunk-4PBFVO5S.js} +1 -1
- package/dist/chunk-4XHTP4GX.js +7 -0
- package/dist/{chunk-PGYHBNCP.js → chunk-54U727IV.js} +2 -2
- package/dist/{chunk-IA343FCT.js → chunk-5TH7VHRH.js} +3 -3
- package/dist/{chunk-FKFP4LFR.js → chunk-6KHTQTRF.js} +1 -1
- package/dist/{chunk-2LS24P2S.js → chunk-6U6JI3L3.js} +1 -1
- package/dist/{chunk-VZAUDQPW.js → chunk-7LTA4KPO.js} +3 -3
- package/dist/chunk-A3E76SDY.js +9 -0
- package/dist/{chunk-WD3GLWJA.js → chunk-ANO4F3LJ.js} +2 -2
- package/dist/{chunk-JZGG67JQ.js → chunk-B2O3ZCYC.js} +1 -1
- package/dist/{chunk-SZIBBFKI.js → chunk-BGOYDN4M.js} +2 -2
- package/dist/{chunk-MDI3RFZS.js → chunk-CZRCXQFS.js} +1 -1
- package/dist/{chunk-PVLUQZAG.js → chunk-E4JB7I3F.js} +2 -2
- package/dist/{chunk-4PCMNJTD.js → chunk-ENHK4K3U.js} +2 -2
- package/dist/{chunk-5LGDXMKZ.js → chunk-FBABNQTM.js} +3 -3
- package/dist/{chunk-BUI76FPU.js → chunk-GDVP2QEZ.js} +1 -1
- package/dist/{chunk-DNFIKL5N.js → chunk-GIMOHY5C.js} +2 -2
- package/dist/{chunk-FSRORCX7.js → chunk-HCJLAF2O.js} +4 -4
- package/dist/{chunk-T2DEFREG.js → chunk-HI2SHIGG.js} +1 -1
- package/dist/{chunk-PJLVJG4E.js → chunk-I55EPFTM.js} +2 -2
- package/dist/{chunk-JKE2GH2D.js → chunk-JX5YYFB3.js} +2 -2
- package/dist/{chunk-VMSIQERT.js → chunk-KOT3ULJY.js} +2 -2
- package/dist/{chunk-F4XYXAPX.js → chunk-KQQCELPA.js} +1 -1
- package/dist/chunk-KSKIQSYM.js +260 -0
- package/dist/{chunk-5CR5V44E.js → chunk-MLHAFFJQ.js} +1 -1
- package/dist/{chunk-DCTC6KDW.js → chunk-N66DZLL6.js} +2 -2
- package/dist/{chunk-HIF2U66B.js → chunk-NQD2OQEG.js} +1 -1
- package/dist/{chunk-MTQURD2G.js → chunk-PAW7CB3K.js} +2 -2
- package/dist/{chunk-CWP3RDUT.js → chunk-Q6SYCTJD.js} +2 -2
- package/dist/{chunk-BNBUTFBN.js → chunk-RDLI353P.js} +1 -1
- package/dist/{chunk-DMAM2GFN.js → chunk-S6AH3YTH.js} +14 -22
- package/dist/{chunk-C4W3WI5F.js → chunk-TMGUYWTR.js} +2 -2
- package/dist/{chunk-JGOXWGEG.js → chunk-TRDXTYZD.js} +3 -3
- package/dist/{chunk-LXWDXMVL.js → chunk-UJXKUNEW.js} +42 -33
- package/dist/{chunk-AWYN6573.js → chunk-UR3NK3LV.js} +1 -1
- package/dist/{chunk-AHMI7DHJ.js → chunk-VC3HSOGC.js} +3 -3
- package/dist/{chunk-Z63VLZM2.js → chunk-VQKJXEPU.js} +2 -2
- package/dist/{chunk-YFJWAPT5.js → chunk-XHW2Z6AX.js} +1 -1
- package/dist/{chunk-YUMDUDZX.js → chunk-XQFICAVB.js} +4 -8
- package/dist/{chunk-PQTB3F7K.js → chunk-YQDRT547.js} +12 -21
- package/dist/index.css +896 -894
- package/dist/index.d.ts +13 -11
- package/dist/index.js +70 -68
- package/dist/inputs/src/InputGroup.css +344 -197
- package/dist/inputs/src/InputGroup.js +1 -1
- package/dist/inputs/src/NumberField.css +336 -336
- package/dist/inputs/src/NumberField.js +6 -6
- package/dist/inputs/src/PasswordField.css +354 -354
- package/dist/inputs/src/PasswordField.js +7 -7
- package/dist/inputs/src/RemainingCharacterCount.css +241 -0
- package/dist/inputs/src/RemainingCharacterCount.d.ts +25 -0
- package/dist/inputs/src/RemainingCharacterCount.js +17 -0
- package/dist/inputs/src/SearchField.css +360 -360
- package/dist/inputs/src/SearchField.js +8 -8
- package/dist/inputs/src/TextArea.css +346 -342
- package/dist/inputs/src/TextArea.js +8 -6
- package/dist/inputs/src/TextField.css +370 -368
- package/dist/inputs/src/TextField.js +11 -9
- package/dist/inputs/src/index.css +464 -473
- package/dist/inputs/src/index.d.ts +8 -4
- package/dist/inputs/src/index.js +18 -16
- package/dist/overlays/Popover/src/Popover.css +896 -894
- package/dist/overlays/Popover/src/Popover.js +70 -68
- package/dist/overlays/Popover/src/index.css +896 -894
- package/dist/overlays/Popover/src/index.js +70 -68
- package/dist/radio/src/DecorativeRadio.css +189 -42
- package/dist/radio/src/DecorativeRadio.js +2 -2
- package/dist/radio/src/Radio.css +181 -34
- package/dist/radio/src/Radio.js +2 -2
- package/dist/radio/src/RadioField.css +162 -15
- package/dist/radio/src/RadioField.js +1 -1
- package/dist/radio/src/RadioGroup.css +227 -99
- package/dist/radio/src/RadioGroup.js +2 -2
- package/dist/radio/src/index.css +233 -105
- package/dist/radio/src/index.js +8 -8
- package/dist/switch/src/Switch.css +178 -31
- package/dist/switch/src/Switch.js +2 -2
- package/dist/switch/src/SwitchField.css +162 -15
- package/dist/switch/src/SwitchField.js +2 -2
- package/dist/switch/src/index.css +184 -37
- package/dist/switch/src/index.js +4 -4
- package/dist/tag/src/Tag.css +464 -360
- package/dist/tag/src/Tag.js +5 -5
- package/dist/tag/src/TagGroup.css +166 -38
- package/dist/tag/src/TagGroup.js +2 -2
- package/dist/tag/src/TagList.css +226 -0
- package/dist/tag/src/index.css +474 -389
- package/dist/tag/src/index.js +9 -9
- package/dist/typography/Heading/src/Heading.css +151 -9
- package/dist/typography/Heading/src/Heading.js +1 -1
- package/dist/typography/Heading/src/index.css +151 -9
- package/dist/typography/Heading/src/index.js +1 -1
- package/dist/typography/Label/src/Label.css +211 -3
- package/dist/typography/Label/src/Label.js +1 -1
- package/dist/typography/Label/src/index.css +211 -3
- package/dist/typography/Label/src/index.js +1 -1
- package/dist/typography/OverlineText/src/OverlineText.css +190 -6
- package/dist/typography/OverlineText/src/OverlineText.js +1 -1
- package/dist/typography/OverlineText/src/index.css +190 -6
- package/dist/typography/OverlineText/src/index.js +1 -1
- package/dist/typography/Text/src/Text.css +156 -9
- package/dist/typography/Text/src/Text.js +1 -1
- package/dist/typography/Text/src/index.css +156 -9
- package/dist/typography/Text/src/index.js +1 -1
- package/dist/utils/src/EnsureTextWrapper.css +226 -0
- package/dist/utils/src/EnsureTextWrapper.d.ts +9 -0
- package/dist/utils/src/EnsureTextWrapper.js +16 -0
- package/dist/utils/src/index.css +226 -0
- package/dist/utils/src/index.d.ts +11 -10
- package/dist/utils/src/index.js +13 -2
- package/package.json +2 -2
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
import { ComboBoxContext } from './chunk-4XHTP4GX.js';
|
|
2
|
+
import { _Popover } from './chunk-UJXKUNEW.js';
|
|
3
|
+
import { EnsureTextWrapper } from './chunk-A3E76SDY.js';
|
|
4
|
+
import { _Footer } from './chunk-AQITZWYM.js';
|
|
5
|
+
import { LabelContext } from './chunk-QCA3ZR56.js';
|
|
6
|
+
import { _ListBox } from './chunk-XQFICAVB.js';
|
|
7
|
+
import { _ListBoxItem } from './chunk-2GYC6ADT.js';
|
|
8
|
+
import { HelperMessageContext } from './chunk-HZKFQ33E.js';
|
|
9
|
+
import { ErrorMessageContext } from './chunk-FAE27DLF.js';
|
|
10
|
+
import { BadgeContext } from './chunk-CQDLZ42T.js';
|
|
11
|
+
import { TextContext } from './chunk-X6SER3TZ.js';
|
|
12
|
+
import { ClearContainerSlots, ClearProviders } from './chunk-HXI3MEEK.js';
|
|
13
|
+
import { composeClassnameRenderProps } from './chunk-65JPI4FL.js';
|
|
14
|
+
import { SlotProvider } from './chunk-M36KANKC.js';
|
|
15
|
+
import { cssModule } from './chunk-KVDXQMWI.js';
|
|
16
|
+
import { IconContext, AngleUpIcon, AngleDownIcon } from '@hopper-ui/icons';
|
|
17
|
+
import { useStyledSystem, useResponsiveValue } from '@hopper-ui/styled-system';
|
|
18
|
+
import { useObjectRef, mergeRefs, useResizeObserver } from '@react-aria/utils';
|
|
19
|
+
import { forwardRef, useRef, useState, useCallback } from 'react';
|
|
20
|
+
import { useContextProps, useSlottedContext, InputContext, composeRenderProps, TextContext as TextContext$1, ButtonContext, ComboBox as ComboBox$1, Group, Input, Button } from 'react-aria-components';
|
|
21
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
22
|
+
|
|
23
|
+
// css-module:./ComboBox.module.css#css-module
|
|
24
|
+
var ComboBox_module_default = { "hop-ComboBox": "ComboBox-module__hop-ComboBox___yka4p", "hop-ComboBox--fluid": "ComboBox-module__hop-ComboBox--fluid___wc-wK", "hop-ComboBox__label": "ComboBox-module__hop-ComboBox__label___JxClR", "hop-ComboBox__trigger": "ComboBox-module__hop-ComboBox__trigger___mwnmp", "hop-ComboBox__trigger--sm": "ComboBox-module__hop-ComboBox__trigger--sm___t-bwh", "hop-ComboBox__trigger--md": "ComboBox-module__hop-ComboBox__trigger--md___SwrW0", "hop-ComboBox__input": "ComboBox-module__hop-ComboBox__input___-iJvh", "hop-ComboBox__button": "ComboBox-module__hop-ComboBox__button___N4euJ", "hop-ComboBox__prefix": "ComboBox-module__hop-ComboBox__prefix___iz3ml", "hop-ComboBox__button-icon": "ComboBox-module__hop-ComboBox__button-icon___EtzJV", "hop-ComboBox__helper-message": "ComboBox-module__hop-ComboBox__helper-message___T5Iem", "hop-ComboBox__error-message": "ComboBox-module__hop-ComboBox__error-message___qYblw" };
|
|
25
|
+
var GlobalComboBoxCssSelector = "hop-ComboBox";
|
|
26
|
+
function ComboBox(props, ref) {
|
|
27
|
+
var _a, _b, _c;
|
|
28
|
+
const {
|
|
29
|
+
inputRef: userProvidedInputRef = null,
|
|
30
|
+
...propsWithoutRef
|
|
31
|
+
} = props;
|
|
32
|
+
[props, ref] = useContextProps(propsWithoutRef, ref, ComboBoxContext);
|
|
33
|
+
const { stylingProps, ...ownProps } = useStyledSystem(props);
|
|
34
|
+
const {
|
|
35
|
+
className,
|
|
36
|
+
children,
|
|
37
|
+
fieldChildren,
|
|
38
|
+
footer,
|
|
39
|
+
isAutoMenuWidth,
|
|
40
|
+
isFluid: isFluidProp,
|
|
41
|
+
isInvalid,
|
|
42
|
+
items,
|
|
43
|
+
menuTrigger = "focus",
|
|
44
|
+
listBoxProps,
|
|
45
|
+
placeholder,
|
|
46
|
+
popoverProps,
|
|
47
|
+
prefix,
|
|
48
|
+
size: sizeProp,
|
|
49
|
+
style: styleProp,
|
|
50
|
+
triggerProps,
|
|
51
|
+
...otherProps
|
|
52
|
+
} = ownProps;
|
|
53
|
+
const inputRef = useObjectRef(mergeRefs(userProvidedInputRef, (_a = props.inputRef) != null ? _a : null));
|
|
54
|
+
const inputContext = useSlottedContext(InputContext);
|
|
55
|
+
const mergedInputRefs = (inputContext == null ? void 0 : inputContext.ref) ? mergeRefs(inputRef, inputContext.ref) : inputRef;
|
|
56
|
+
const triggerRef = useRef(null);
|
|
57
|
+
const buttonRef = useRef(null);
|
|
58
|
+
const [triggerWidth, setTriggerWidth] = useState(null);
|
|
59
|
+
const onResize = useCallback(() => {
|
|
60
|
+
if (triggerRef.current) {
|
|
61
|
+
setTriggerWidth(triggerRef.current.offsetWidth + "px");
|
|
62
|
+
}
|
|
63
|
+
}, [triggerRef]);
|
|
64
|
+
useResizeObserver({
|
|
65
|
+
ref: triggerRef,
|
|
66
|
+
onResize
|
|
67
|
+
});
|
|
68
|
+
const { stylingProps: triggerStylingProps, ...triggerOwnProps } = useStyledSystem(triggerProps != null ? triggerProps : {});
|
|
69
|
+
const {
|
|
70
|
+
className: triggerClassName,
|
|
71
|
+
style: triggerStyleProp,
|
|
72
|
+
...otherTriggerProps
|
|
73
|
+
} = triggerOwnProps;
|
|
74
|
+
const { stylingProps: popoverStylingProps, ...popoverOwnProps } = useStyledSystem(popoverProps != null ? popoverProps : {});
|
|
75
|
+
const {
|
|
76
|
+
placement = "bottom start",
|
|
77
|
+
style: popoverStyleProp,
|
|
78
|
+
...otherPopoverProps
|
|
79
|
+
} = popoverOwnProps;
|
|
80
|
+
const size = (_b = useResponsiveValue(sizeProp)) != null ? _b : "sm";
|
|
81
|
+
const isFluid = (_c = useResponsiveValue(isFluidProp)) != null ? _c : false;
|
|
82
|
+
const classNames = composeClassnameRenderProps(
|
|
83
|
+
className,
|
|
84
|
+
GlobalComboBoxCssSelector,
|
|
85
|
+
cssModule(
|
|
86
|
+
ComboBox_module_default,
|
|
87
|
+
"hop-ComboBox",
|
|
88
|
+
isFluid && "fluid",
|
|
89
|
+
size
|
|
90
|
+
),
|
|
91
|
+
stylingProps.className
|
|
92
|
+
);
|
|
93
|
+
const triggerClassNames = composeClassnameRenderProps(
|
|
94
|
+
triggerClassName,
|
|
95
|
+
cssModule(
|
|
96
|
+
ComboBox_module_default,
|
|
97
|
+
"hop-ComboBox__trigger",
|
|
98
|
+
size
|
|
99
|
+
),
|
|
100
|
+
triggerStylingProps.className
|
|
101
|
+
);
|
|
102
|
+
const buttonClassNames = composeClassnameRenderProps(
|
|
103
|
+
cssModule(
|
|
104
|
+
ComboBox_module_default,
|
|
105
|
+
"hop-ComboBox__button"
|
|
106
|
+
)
|
|
107
|
+
);
|
|
108
|
+
const inputClassNames = composeClassnameRenderProps(
|
|
109
|
+
inputContext == null ? void 0 : inputContext.className,
|
|
110
|
+
ComboBox_module_default["hop-ComboBox__input"]
|
|
111
|
+
);
|
|
112
|
+
const style = composeRenderProps(styleProp, (prev) => {
|
|
113
|
+
return {
|
|
114
|
+
...stylingProps.style,
|
|
115
|
+
...prev
|
|
116
|
+
};
|
|
117
|
+
});
|
|
118
|
+
const triggerStyle = composeRenderProps(triggerStyleProp, (prev) => {
|
|
119
|
+
return {
|
|
120
|
+
...triggerStylingProps.style,
|
|
121
|
+
...prev
|
|
122
|
+
};
|
|
123
|
+
});
|
|
124
|
+
const popoverStyle = composeRenderProps(popoverStyleProp, (prev) => {
|
|
125
|
+
return {
|
|
126
|
+
...popoverStylingProps.style,
|
|
127
|
+
...prev,
|
|
128
|
+
"--custom-trigger-width": triggerWidth
|
|
129
|
+
};
|
|
130
|
+
});
|
|
131
|
+
const handleMouseDown = useCallback((e) => {
|
|
132
|
+
if (inputRef.current && e.target !== inputRef.current && buttonRef.current && e.target !== buttonRef.current) {
|
|
133
|
+
inputRef.current.focus();
|
|
134
|
+
e.preventDefault();
|
|
135
|
+
}
|
|
136
|
+
}, [inputRef]);
|
|
137
|
+
const prefixMarkup = prefix ? /* @__PURE__ */ jsx(
|
|
138
|
+
SlotProvider,
|
|
139
|
+
{
|
|
140
|
+
values: [
|
|
141
|
+
[TextContext, { size, className: ComboBox_module_default["hop-ComboBox__prefix"] }],
|
|
142
|
+
[IconContext, { size, className: ComboBox_module_default["hop-ComboBox__prefix"] }]
|
|
143
|
+
],
|
|
144
|
+
children: /* @__PURE__ */ jsx(ClearContainerSlots, { children: /* @__PURE__ */ jsx(EnsureTextWrapper, { children: prefix }) })
|
|
145
|
+
}
|
|
146
|
+
) : null;
|
|
147
|
+
const footerMarkup = footer ? /* @__PURE__ */ jsx(
|
|
148
|
+
SlotProvider,
|
|
149
|
+
{
|
|
150
|
+
values: [
|
|
151
|
+
[TextContext, { size, className: ComboBox_module_default["hop-ComboBox__footer-text"] }]
|
|
152
|
+
],
|
|
153
|
+
children: /* @__PURE__ */ jsx(
|
|
154
|
+
ClearProviders,
|
|
155
|
+
{
|
|
156
|
+
values: [
|
|
157
|
+
TextContext$1,
|
|
158
|
+
TextContext,
|
|
159
|
+
ButtonContext
|
|
160
|
+
],
|
|
161
|
+
children: /* @__PURE__ */ jsx(_Footer, { children: /* @__PURE__ */ jsx(EnsureTextWrapper, { children: footer }) })
|
|
162
|
+
}
|
|
163
|
+
)
|
|
164
|
+
}
|
|
165
|
+
) : null;
|
|
166
|
+
return /* @__PURE__ */ jsx(
|
|
167
|
+
ComboBox$1,
|
|
168
|
+
{
|
|
169
|
+
...otherProps,
|
|
170
|
+
ref,
|
|
171
|
+
className: classNames,
|
|
172
|
+
style,
|
|
173
|
+
isInvalid,
|
|
174
|
+
menuTrigger,
|
|
175
|
+
children: (comboBoxRenderProps) => {
|
|
176
|
+
const { isOpen } = comboBoxRenderProps;
|
|
177
|
+
const ButtonIcon = isOpen ? AngleUpIcon : AngleDownIcon;
|
|
178
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
179
|
+
/* @__PURE__ */ jsx(
|
|
180
|
+
SlotProvider,
|
|
181
|
+
{
|
|
182
|
+
values: [
|
|
183
|
+
[LabelContext, {
|
|
184
|
+
className: ComboBox_module_default["hop-ComboBox__label"]
|
|
185
|
+
}],
|
|
186
|
+
[HelperMessageContext, {
|
|
187
|
+
className: ComboBox_module_default["hop-ComboBox__helper-message"]
|
|
188
|
+
}],
|
|
189
|
+
[ErrorMessageContext, {
|
|
190
|
+
className: ComboBox_module_default["hop-ComboBox__error-message"]
|
|
191
|
+
}]
|
|
192
|
+
],
|
|
193
|
+
children: fieldChildren
|
|
194
|
+
}
|
|
195
|
+
),
|
|
196
|
+
/* @__PURE__ */ jsxs(
|
|
197
|
+
Group,
|
|
198
|
+
{
|
|
199
|
+
...otherTriggerProps,
|
|
200
|
+
ref: triggerRef,
|
|
201
|
+
className: triggerClassNames,
|
|
202
|
+
style: triggerStyle,
|
|
203
|
+
onMouseDown: handleMouseDown,
|
|
204
|
+
"data-selected": isOpen || void 0,
|
|
205
|
+
children: [
|
|
206
|
+
prefixMarkup,
|
|
207
|
+
/* @__PURE__ */ jsx(
|
|
208
|
+
Input,
|
|
209
|
+
{
|
|
210
|
+
ref: mergedInputRefs,
|
|
211
|
+
className: inputClassNames,
|
|
212
|
+
placeholder
|
|
213
|
+
}
|
|
214
|
+
),
|
|
215
|
+
/* @__PURE__ */ jsx(Button, { className: buttonClassNames, ref: buttonRef, children: /* @__PURE__ */ jsx(ButtonIcon, { size: "sm", className: ComboBox_module_default["hop-ComboBox__button-icon"] }) })
|
|
216
|
+
]
|
|
217
|
+
}
|
|
218
|
+
),
|
|
219
|
+
/* @__PURE__ */ jsxs(
|
|
220
|
+
_Popover,
|
|
221
|
+
{
|
|
222
|
+
...otherPopoverProps,
|
|
223
|
+
placement,
|
|
224
|
+
isNonDialog: true,
|
|
225
|
+
autoWidth: isAutoMenuWidth,
|
|
226
|
+
style: popoverStyle,
|
|
227
|
+
triggerRef,
|
|
228
|
+
children: [
|
|
229
|
+
/* @__PURE__ */ jsx(
|
|
230
|
+
SlotProvider,
|
|
231
|
+
{
|
|
232
|
+
values: [
|
|
233
|
+
[BadgeContext, {
|
|
234
|
+
variant: "secondary"
|
|
235
|
+
}]
|
|
236
|
+
],
|
|
237
|
+
children: /* @__PURE__ */ jsx(_ListBox, { ...listBoxProps, items, size, isInvalid, children })
|
|
238
|
+
}
|
|
239
|
+
),
|
|
240
|
+
footerMarkup
|
|
241
|
+
]
|
|
242
|
+
}
|
|
243
|
+
)
|
|
244
|
+
] });
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
);
|
|
248
|
+
}
|
|
249
|
+
var _ComboBox = forwardRef(ComboBox);
|
|
250
|
+
_ComboBox.displayName = "ComboBox";
|
|
251
|
+
var CompoundComboBox = Object.assign(_ComboBox, {
|
|
252
|
+
/**
|
|
253
|
+
* A combo box option is an item that is displayed in a combo box.
|
|
254
|
+
*
|
|
255
|
+
* [View Documentation](TODO)
|
|
256
|
+
*/
|
|
257
|
+
Option: _ListBoxItem
|
|
258
|
+
});
|
|
259
|
+
|
|
260
|
+
export { CompoundComboBox, GlobalComboBoxCssSelector };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AvatarContext } from './chunk-AES7QBQE.js';
|
|
2
|
-
import { _RichIconAvatarImage } from './chunk-
|
|
2
|
+
import { _RichIconAvatarImage } from './chunk-2WK465I4.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,6 +1,6 @@
|
|
|
1
|
+
import { TagListContext } from './chunk-XLKYXKWE.js';
|
|
1
2
|
import { TagContext } from './chunk-EWMWQ2MC.js';
|
|
2
3
|
import { TagGroupContext } from './chunk-LCAS3YQV.js';
|
|
3
|
-
import { TagListContext } from './chunk-XLKYXKWE.js';
|
|
4
4
|
import { LabelContext } from './chunk-QCA3ZR56.js';
|
|
5
5
|
import { HelperMessageContext } from './chunk-HZKFQ33E.js';
|
|
6
6
|
import { ErrorMessageContext } from './chunk-FAE27DLF.js';
|
|
@@ -13,7 +13,7 @@ import { useContextProps, FieldErrorContext, TagGroup as TagGroup$1 } from 'reac
|
|
|
13
13
|
import { jsx } from 'react/jsx-runtime';
|
|
14
14
|
|
|
15
15
|
// css-module:./TagGroup.module.css#css-module
|
|
16
|
-
var TagGroup_module_default = { "hop-TagGroup": "TagGroup-module__hop-
|
|
16
|
+
var TagGroup_module_default = { "hop-TagGroup": "TagGroup-module__hop-TagGroup___14xMC", "hop-TagGroup__label": "TagGroup-module__hop-TagGroup__label___l2bhv", "hop-TagGroup__list": "TagGroup-module__hop-TagGroup__list___neJyh", "hop-TagGroup__error-message": "TagGroup-module__hop-TagGroup__error-message___rWmWC", "hop-TagGroup__helper-message": "TagGroup-module__hop-TagGroup__helper-message___XikDk" };
|
|
17
17
|
var GlobalTagGroupCssSelector = "hop-TagGroup";
|
|
18
18
|
function TagGroup(props, ref) {
|
|
19
19
|
var _a;
|
|
@@ -8,7 +8,7 @@ import { useContextProps, Label as Label$1 } from 'react-aria-components';
|
|
|
8
8
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
9
9
|
|
|
10
10
|
// css-module:./Label.module.css#css-module
|
|
11
|
-
var Label_module_default = { "hop-Label": "Label-module__hop-
|
|
11
|
+
var Label_module_default = { "hop-Label": "Label-module__hop-Label___1zcVv", "hop-Label__indicator": "Label-module__hop-Label__indicator___ZX47s" };
|
|
12
12
|
var GlobalLabelCssSelector = "hop-Label";
|
|
13
13
|
function Label(props, ref) {
|
|
14
14
|
[props, ref] = useContextProps(props, ref, LabelContext);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CheckboxContext } from './chunk-2EAZPH3M.js';
|
|
2
2
|
import { isTextOnlyChildren } from './chunk-ZWU6DRRZ.js';
|
|
3
3
|
import { IconListContext } from './chunk-DHVVYSLB.js';
|
|
4
|
-
import { _Text } from './chunk-
|
|
4
|
+
import { _Text } from './chunk-KQQCELPA.js';
|
|
5
5
|
import { TextContext } from './chunk-X6SER3TZ.js';
|
|
6
6
|
import { ClearContainerSlots } from './chunk-HXI3MEEK.js';
|
|
7
7
|
import { useRenderProps } from './chunk-NH3IVMXB.js';
|
|
@@ -16,7 +16,7 @@ import { useContextProps, composeRenderProps } from 'react-aria-components';
|
|
|
16
16
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
17
17
|
|
|
18
18
|
// css-module:./DecorativeCheckbox.module.css#css-module
|
|
19
|
-
var DecorativeCheckbox_module_default = { "hop-DecorativeCheckbox": "DecorativeCheckbox-module__hop-
|
|
19
|
+
var DecorativeCheckbox_module_default = { "hop-DecorativeCheckbox": "DecorativeCheckbox-module__hop-DecorativeCheckbox___uojgy Checkbox-module__hop-Checkbox___ftNKr", "hop-DecorativeCheckbox--sm": "DecorativeCheckbox-module__hop-DecorativeCheckbox--sm___NCu0g Checkbox-module__hop-Checkbox--sm___aBalJ", "hop-DecorativeCheckbox--md": "DecorativeCheckbox-module__hop-DecorativeCheckbox--md___zZoAa Checkbox-module__hop-Checkbox--md___NRQ6W", "hop-DecorativeCheckbox__icon": "DecorativeCheckbox-module__hop-DecorativeCheckbox__icon___GdgJP Checkbox-module__hop-Checkbox__icon___9RX3t", "hop-DecorativeCheckbox__icon-list": "DecorativeCheckbox-module__hop-DecorativeCheckbox__icon-list___0hjQG Checkbox-module__hop-Checkbox__icon___9RX3t", "hop-DecorativeCheckbox__box": "DecorativeCheckbox-module__hop-DecorativeCheckbox__box___B1OKw Checkbox-module__hop-Checkbox__box___aUVd0", "hop-DecorativeCheckbox__check": "DecorativeCheckbox-module__hop-DecorativeCheckbox__check___uWACi Checkbox-module__hop-Checkbox__check___6akLc", "hop-DecorativeCheckbox__text": "DecorativeCheckbox-module__hop-DecorativeCheckbox__text___8K-I- Checkbox-module__hop-Checkbox__text___b92Eu" };
|
|
20
20
|
var GlobalDecorativeCheckboxCssSelector = "hop-DecorativeCheckbox";
|
|
21
21
|
function DecorativeCheckbox(props, ref) {
|
|
22
22
|
var _a;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { CheckboxListContext } from './chunk-WDUQUPTE.js';
|
|
1
2
|
import { CheckboxFieldContext } from './chunk-ZGNK4GWA.js';
|
|
2
3
|
import { CheckboxGroupContext } from './chunk-N7YDPVZL.js';
|
|
3
|
-
import { CheckboxListContext } from './chunk-WDUQUPTE.js';
|
|
4
4
|
import { LabelContext } from './chunk-QCA3ZR56.js';
|
|
5
5
|
import { CheckboxContext } from './chunk-2EAZPH3M.js';
|
|
6
6
|
import { HelperMessageContext } from './chunk-HZKFQ33E.js';
|
|
@@ -14,7 +14,7 @@ import { useContextProps, composeRenderProps, CheckboxGroup as CheckboxGroup$1 }
|
|
|
14
14
|
import { jsx } 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___YZl2f", "hop-CheckboxGroup--bordered": "CheckboxGroup-module__hop-CheckboxGroup--bordered___kuOiD", "hop-CheckboxGroup--sm": "CheckboxGroup-module__hop-CheckboxGroup--sm___pb3m6", "hop-CheckboxGroup--md": "CheckboxGroup-module__hop-CheckboxGroup--md___CLmD-", "hop-CheckboxGroup__label": "CheckboxGroup-module__hop-CheckboxGroup__label___Le2oD", "hop-CheckboxGroup__list": "CheckboxGroup-module__hop-CheckboxGroup__list___Izhrn", "hop-CheckboxGroup__checkbox": "CheckboxGroup-module__hop-CheckboxGroup__checkbox___s97d3", "hop-CheckboxGroup__error-message": "CheckboxGroup-module__hop-CheckboxGroup__error-message___EVE-z", "hop-CheckboxGroup__helper-message": "CheckboxGroup-module__hop-CheckboxGroup__helper-message___y8GQ-" };
|
|
18
18
|
var GlobalCheckboxGroupCssSelector = "hop-CheckboxGroup";
|
|
19
19
|
function CheckboxGroup(props, ref) {
|
|
20
20
|
var _a, _b;
|
|
@@ -7,7 +7,7 @@ import { useContextProps } from 'react-aria-components';
|
|
|
7
7
|
import { jsx } from 'react/jsx-runtime';
|
|
8
8
|
|
|
9
9
|
// css-module:./ListBoxItemSkeleton.module.css#css-module
|
|
10
|
-
var ListBoxItemSkeleton_module_default = { "hop-ListBoxItemSkeleton": "ListBoxItemSkeleton-module__hop-
|
|
10
|
+
var ListBoxItemSkeleton_module_default = { "hop-ListBoxItemSkeleton": "ListBoxItemSkeleton-module__hop-ListBoxItemSkeleton___lR0QJ", "placeholder-shimmer": "ListBoxItemSkeleton-module__placeholder-shimmer___3zK8z", "hop-ListBoxItemSkeleton--xs": "ListBoxItemSkeleton-module__hop-ListBoxItemSkeleton--xs___D0X6e", "hop-ListBoxItemSkeleton--sm": "ListBoxItemSkeleton-module__hop-ListBoxItemSkeleton--sm___hoJSr", "hop-ListBoxItemSkeleton--md": "ListBoxItemSkeleton-module__hop-ListBoxItemSkeleton--md___v24sl", "hop-ListBoxItemSkeleton--lg": "ListBoxItemSkeleton-module__hop-ListBoxItemSkeleton--lg___SPqjn" };
|
|
11
11
|
var GlobalListBoxItemSkeletonCssSelector = "hop-ListBoxItemSkeleton";
|
|
12
12
|
function ListBoxItemSkeleton(props, ref) {
|
|
13
13
|
var _a;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { useTruncatedText } from './chunk-Z57VHYOF.js';
|
|
2
1
|
import { TextFieldContext } from './chunk-O4XPUINW.js';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { useTruncatedText } from './chunk-Z57VHYOF.js';
|
|
3
|
+
import { _RemainingCharacterCount } from './chunk-2ZXF62AA.js';
|
|
4
|
+
import { _InputGroup } from './chunk-GDVP2QEZ.js';
|
|
5
|
+
import { _ClearButton } from './chunk-UR3NK3LV.js';
|
|
5
6
|
import { LabelContext } from './chunk-QCA3ZR56.js';
|
|
6
|
-
import { useLocalizedString } from './chunk-TFVDF4YH.js';
|
|
7
7
|
import { isTextOnlyChildren } from './chunk-ZWU6DRRZ.js';
|
|
8
8
|
import { HelperMessageContext } from './chunk-HZKFQ33E.js';
|
|
9
9
|
import { ErrorMessageContext } from './chunk-FAE27DLF.js';
|
|
10
|
-
import { _Text } from './chunk-
|
|
10
|
+
import { _Text } from './chunk-KQQCELPA.js';
|
|
11
11
|
import { TextContext } from './chunk-X6SER3TZ.js';
|
|
12
12
|
import { ClearContainerSlots } from './chunk-HXI3MEEK.js';
|
|
13
13
|
import { composeClassnameRenderProps } from './chunk-65JPI4FL.js';
|
|
@@ -23,7 +23,7 @@ import { useContextProps, composeRenderProps, Input, TextField as TextField$1 }
|
|
|
23
23
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
24
24
|
|
|
25
25
|
// css-module:./TextField.module.css#css-module
|
|
26
|
-
var TextField_module_default = { "hop-TextField": "TextField-module__hop-
|
|
26
|
+
var TextField_module_default = { "hop-TextField": "TextField-module__hop-TextField___1sv5-", "hop-TextField--fluid": "TextField-module__hop-TextField--fluid___12PF-", "hop-TextField__Label": "TextField-module__hop-TextField__Label___v5PNS", "hop-TextField__prefix": "TextField-module__hop-TextField__prefix___6Ykah", "hop-TextField__InputGroup": "TextField-module__hop-TextField__InputGroup___e0Vhr", "hop-TextField__ErrorMessage": "TextField-module__hop-TextField__ErrorMessage___9tUFi", "hop-TextField__HelperMessage": "TextField-module__hop-TextField__HelperMessage___b5vV2" };
|
|
27
27
|
var GlobalTextFieldCssSelector = "hop-TextField";
|
|
28
28
|
function TextField(props, ref) {
|
|
29
29
|
var _a;
|
|
@@ -119,7 +119,14 @@ function TextField(props, ref) {
|
|
|
119
119
|
children: [
|
|
120
120
|
prefixMarkup,
|
|
121
121
|
/* @__PURE__ */ jsx(Input, { ref: inputRef, placeholder }),
|
|
122
|
-
showCharacterCount && maxLength && /* @__PURE__ */ jsx(
|
|
122
|
+
showCharacterCount && maxLength && /* @__PURE__ */ jsx(
|
|
123
|
+
_RemainingCharacterCount,
|
|
124
|
+
{
|
|
125
|
+
count: maxLength - characterCount,
|
|
126
|
+
isInvalid: overMaxLength,
|
|
127
|
+
isDisabled
|
|
128
|
+
}
|
|
129
|
+
),
|
|
123
130
|
showClearButton && /* @__PURE__ */ jsx(_ClearButton, { isDisabled, size: "lg", onPress: handleClear })
|
|
124
131
|
]
|
|
125
132
|
}
|
|
@@ -152,26 +159,11 @@ function TextField(props, ref) {
|
|
|
152
159
|
isDisabled,
|
|
153
160
|
isInvalid,
|
|
154
161
|
isRequired,
|
|
155
|
-
"data-over-max-length": overMaxLength || void 0,
|
|
156
162
|
...otherProps,
|
|
157
163
|
children: childrenMarkup
|
|
158
164
|
}
|
|
159
165
|
);
|
|
160
166
|
}
|
|
161
|
-
function CharacterCount({ characterLeft }) {
|
|
162
|
-
const stringFormatter = useLocalizedString();
|
|
163
|
-
const accessibilityString = stringFormatter.format("Input.charactersLeft", { charLeft: characterLeft });
|
|
164
|
-
return /* @__PURE__ */ jsx(
|
|
165
|
-
_Text,
|
|
166
|
-
{
|
|
167
|
-
"aria-label": accessibilityString,
|
|
168
|
-
className: TextField_module_default["hop-TextField__char-count"],
|
|
169
|
-
role: "status",
|
|
170
|
-
size: "xs",
|
|
171
|
-
children: characterLeft
|
|
172
|
-
}
|
|
173
|
-
);
|
|
174
|
-
}
|
|
175
167
|
var _TextField = forwardRef(TextField);
|
|
176
168
|
_TextField.displayName = "TextField";
|
|
177
169
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HelperMessageContext } from './chunk-HZKFQ33E.js';
|
|
2
|
-
import { _Text } from './chunk-
|
|
2
|
+
import { _Text } from './chunk-KQQCELPA.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___baQv5", "hop-HelperMessage__icon": "HelperMessage-module__hop-HelperMessage__icon___85txW" };
|
|
13
13
|
var GlobalHelperMessageCssSelector = "hop-HelperMessage";
|
|
14
14
|
function HelperMessage(props, ref) {
|
|
15
15
|
const validation = useContext(FieldErrorContext);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { useSlot } from './chunk-H5YTU3U7.js';
|
|
2
|
-
import { _Spinner } from './chunk-PGYHBNCP.js';
|
|
3
2
|
import { ButtonContext } from './chunk-WMTWFKKP.js';
|
|
3
|
+
import { _Spinner } from './chunk-54U727IV.js';
|
|
4
4
|
import { useLocalizedString } from './chunk-TFVDF4YH.js';
|
|
5
5
|
import { isTextOnlyChildren } from './chunk-ZWU6DRRZ.js';
|
|
6
6
|
import { IconListContext } from './chunk-DHVVYSLB.js';
|
|
7
|
-
import { _Text } from './chunk-
|
|
7
|
+
import { _Text } from './chunk-KQQCELPA.js';
|
|
8
8
|
import { TextContext } from './chunk-X6SER3TZ.js';
|
|
9
9
|
import { useRenderProps } from './chunk-NH3IVMXB.js';
|
|
10
10
|
import { composeClassnameRenderProps } from './chunk-65JPI4FL.js';
|
|
@@ -19,7 +19,7 @@ import { useContextProps, ButtonContext as ButtonContext$1, composeRenderProps,
|
|
|
19
19
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
20
20
|
|
|
21
21
|
// css-module:./Button.module.css#css-module
|
|
22
|
-
var Button_module_default = { "hop-Button": "Button-module__hop-
|
|
22
|
+
var Button_module_default = { "hop-Button": "Button-module__hop-Button___hJrlG", "hop-Button--icon-only": "Button-module__hop-Button--icon-only___FjUDk", "hop-Button--fluid": "Button-module__hop-Button--fluid___zHyAn", "hop-Button--sm": "Button-module__hop-Button--sm___TjmEa", "hop-Button--primary": "Button-module__hop-Button--primary___x2k3w", "hop-Button--md": "Button-module__hop-Button--md___SSJmI", "hop-Button--secondary": "Button-module__hop-Button--secondary___ehb-w", "hop-Button--upsell": "Button-module__hop-Button--upsell___aWCox", "hop-Button--danger": "Button-module__hop-Button--danger___KtNGT", "hop-Button--ghost-danger": "Button-module__hop-Button--ghost-danger___DLGVS", "hop-Button--ghost-secondary": "Button-module__hop-Button--ghost-secondary___H0XJg", "hop-Button--ghost-primary": "Button-module__hop-Button--ghost-primary___SaGFj", "hop-Button__Spinner": "Button-module__hop-Button__Spinner___ItCTY", "hop-Button__icon": "Button-module__hop-Button__icon___EQqO8", "hop-Button__icon-list": "Button-module__hop-Button__icon-list___nrpu8", "hop-Button__text": "Button-module__hop-Button__text___TXP9n", "hop-Button__end-icon": "Button-module__hop-Button__end-icon___sFMht", "hop-Button__end-icon-list": "Button-module__hop-Button__end-icon-list___f9BkT" };
|
|
23
23
|
var GlobalButtonCssSelector = "hop-Button";
|
|
24
24
|
var additionalButtonHTMLAttributes = /* @__PURE__ */ new Set(["form", "formAction", "formEncType", "formMethod", "formNoValidate", "formTarget", "name", "value"]);
|
|
25
25
|
function useSimulatedRACButton(props, ref) {
|
|
@@ -1,34 +1,33 @@
|
|
|
1
1
|
import { PopoverContext } from './chunk-SC6ZK5ON.js';
|
|
2
|
+
import { EnsureTextWrapper } from './chunk-A3E76SDY.js';
|
|
2
3
|
import { RadioGroupContext } from './chunk-5MBJWRZD.js';
|
|
4
|
+
import { TextFieldContext } from './chunk-O4XPUINW.js';
|
|
3
5
|
import { ContentContext } from './chunk-IXB2WK56.js';
|
|
4
6
|
import { _Footer } from './chunk-AQITZWYM.js';
|
|
5
7
|
import { FooterContext } from './chunk-I67NHYK4.js';
|
|
6
|
-
import { SearchFieldContext } from './chunk-3NKF5TPD.js';
|
|
7
|
-
import { TextAreaContext } from './chunk-MHQZXLKW.js';
|
|
8
|
-
import { TextFieldContext } from './chunk-O4XPUINW.js';
|
|
9
8
|
import { NumberFieldContext } from './chunk-ZQ3AWYRR.js';
|
|
10
9
|
import { PasswordFieldContext } from './chunk-QW45G6K4.js';
|
|
10
|
+
import { SearchFieldContext } from './chunk-3NKF5TPD.js';
|
|
11
|
+
import { TextAreaContext } from './chunk-MHQZXLKW.js';
|
|
11
12
|
import { CheckboxFieldContext } from './chunk-ZGNK4GWA.js';
|
|
12
13
|
import { CheckboxGroupContext } from './chunk-N7YDPVZL.js';
|
|
14
|
+
import { ButtonContext } from './chunk-WMTWFKKP.js';
|
|
13
15
|
import { ButtonGroupContext } from './chunk-VJQ7M2BK.js';
|
|
14
16
|
import { SelectContext } from './chunk-T24MBA34.js';
|
|
15
|
-
import { _SelectValue } from './chunk-
|
|
17
|
+
import { _SelectValue } from './chunk-BGOYDN4M.js';
|
|
16
18
|
import { HeadingContext } from './chunk-TXZ6BMFR.js';
|
|
17
19
|
import { LabelContext } from './chunk-QCA3ZR56.js';
|
|
18
|
-
import {
|
|
19
|
-
import { LinkContext } from './chunk-4VVNSXIB.js';
|
|
20
|
-
import { _ListBox } from './chunk-YUMDUDZX.js';
|
|
20
|
+
import { _ListBox } from './chunk-XQFICAVB.js';
|
|
21
21
|
import { isFunction, isNil } from './chunk-TIPN4VYD.js';
|
|
22
22
|
import { ListBoxContext } from './chunk-UIEP5BA5.js';
|
|
23
|
-
import { _ListBoxItem } from './chunk-
|
|
23
|
+
import { _ListBoxItem } from './chunk-2GYC6ADT.js';
|
|
24
24
|
import { CheckboxContext } from './chunk-2EAZPH3M.js';
|
|
25
|
-
import { isTextOnlyChildren } from './chunk-ZWU6DRRZ.js';
|
|
26
|
-
import { HelperMessageContext } from './chunk-HZKFQ33E.js';
|
|
27
25
|
import { _HopperProvider } from './chunk-NMKBUGSO.js';
|
|
28
|
-
import {
|
|
26
|
+
import { LinkContext } from './chunk-4VVNSXIB.js';
|
|
29
27
|
import { FormContext } from './chunk-EURJK4ZT.js';
|
|
28
|
+
import { HelperMessageContext } from './chunk-HZKFQ33E.js';
|
|
29
|
+
import { ErrorMessageContext } from './chunk-FAE27DLF.js';
|
|
30
30
|
import { BadgeContext } from './chunk-CQDLZ42T.js';
|
|
31
|
-
import { _Text } from './chunk-F4XYXAPX.js';
|
|
32
31
|
import { TextContext } from './chunk-X6SER3TZ.js';
|
|
33
32
|
import { ClearContainerSlots, ClearProviders } from './chunk-HXI3MEEK.js';
|
|
34
33
|
import { composeClassnameRenderProps } from './chunk-65JPI4FL.js';
|
|
@@ -38,13 +37,13 @@ import { useStyledSystem, useResponsiveValue, useColorSchemeContext } from '@hop
|
|
|
38
37
|
export * from '@hopper-ui/styled-system';
|
|
39
38
|
import clsx from 'clsx';
|
|
40
39
|
import { forwardRef, useReducer, useRef, useEffect } from 'react';
|
|
41
|
-
import { useContextProps, composeRenderProps, Popover as Popover$1, Dialog,
|
|
40
|
+
import { useContextProps, composeRenderProps, Popover as Popover$1, Dialog, TextContext as TextContext$1, ButtonContext as ButtonContext$1, Select as Select$1, Button, Form as Form$1 } from 'react-aria-components';
|
|
42
41
|
export { Collection } from 'react-aria-components';
|
|
43
42
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
44
43
|
import { IconContext, AngleUpIcon, AngleDownIcon } from '@hopper-ui/icons';
|
|
45
44
|
|
|
46
45
|
// css-module:./Popover.module.css#css-module
|
|
47
|
-
var Popover_module_default = { "hop-Popover": "Popover-module__hop-
|
|
46
|
+
var Popover_module_default = { "hop-Popover": "Popover-module__hop-Popover___YqMrl", "fade": "Popover-module__fade___cM9Hu", "hop-Popover__wrapper": "Popover-module__hop-Popover__wrapper___bBvVC", "hop-Popover__dialog": "Popover-module__hop-Popover__dialog___-Qm8I", "hop-Popover__dropdown": "Popover-module__hop-Popover__dropdown___2Pes0", "hop-Popover__title": "Popover-module__hop-Popover__title___SZT2m", "hop-Popover__content": "Popover-module__hop-Popover__content___V6KMC", "hop-Popover__list-box": "Popover-module__hop-Popover__list-box___PnPGa", "hop-Popover__footer": "Popover-module__hop-Popover__footer___sJmo-", "hop-Popover__actions": "Popover-module__hop-Popover__actions___dlp9Q", "hop-Popover__action": "Popover-module__hop-Popover__action___hcQBI" };
|
|
48
47
|
var GlobalPopoverCssSelector = "hop-Popover";
|
|
49
48
|
function Popover(props, ref) {
|
|
50
49
|
var _a;
|
|
@@ -178,7 +177,7 @@ var _Popover = forwardRef(Popover);
|
|
|
178
177
|
_Popover.displayName = "Popover";
|
|
179
178
|
|
|
180
179
|
// css-module:./Select.module.css#css-module
|
|
181
|
-
var Select_module_default = { "hop-Select": "Select-module__hop-
|
|
180
|
+
var Select_module_default = { "hop-Select": "Select-module__hop-Select___9asPc", "hop-Select--fluid": "Select-module__hop-Select--fluid___kdYun", "hop-Select__label": "Select-module__hop-Select__label___lX0YF", "hop-Select__button": "Select-module__hop-Select__button___72TRN", "hop-Select__button--sm": "Select-module__hop-Select__button--sm___t6WUP", "hop-Select__button--md": "Select-module__hop-Select__button--md___GNNkD", "hop-Select__prefix": "Select-module__hop-Select__prefix___lRC4S", "hop-Select__button-icon": "Select-module__hop-Select__button-icon___t9tu4", "hop-Select__helper-message": "Select-module__hop-Select__helper-message___-E4RI", "hop-Select__error-message": "Select-module__hop-Select__error-message___cOkJl" };
|
|
182
181
|
var GlobalSelectCssSelector = "hop-Select";
|
|
183
182
|
function Select(props, ref) {
|
|
184
183
|
var _a, _b;
|
|
@@ -237,10 +236,12 @@ function Select(props, ref) {
|
|
|
237
236
|
...prev
|
|
238
237
|
};
|
|
239
238
|
});
|
|
240
|
-
const triggerStyle = {
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
239
|
+
const triggerStyle = composeRenderProps(triggerStyleProp, (prev) => {
|
|
240
|
+
return {
|
|
241
|
+
...triggerStylingProps.style,
|
|
242
|
+
...prev
|
|
243
|
+
};
|
|
244
|
+
});
|
|
244
245
|
const prefixMarkup = prefix ? /* @__PURE__ */ jsx(
|
|
245
246
|
SlotProvider,
|
|
246
247
|
{
|
|
@@ -248,10 +249,28 @@ function Select(props, ref) {
|
|
|
248
249
|
[TextContext, { size, className: Select_module_default["hop-Select__prefix"] }],
|
|
249
250
|
[IconContext, { size, className: Select_module_default["hop-Select__prefix"] }]
|
|
250
251
|
],
|
|
251
|
-
children: /* @__PURE__ */ jsx(ClearContainerSlots, { children:
|
|
252
|
+
children: /* @__PURE__ */ jsx(ClearContainerSlots, { children: /* @__PURE__ */ jsx(EnsureTextWrapper, { children: prefix }) })
|
|
253
|
+
}
|
|
254
|
+
) : null;
|
|
255
|
+
const footerMarkup = footer ? /* @__PURE__ */ jsx(
|
|
256
|
+
SlotProvider,
|
|
257
|
+
{
|
|
258
|
+
values: [
|
|
259
|
+
[TextContext, { size, className: Select_module_default["hop-Select__footer-text"] }]
|
|
260
|
+
],
|
|
261
|
+
children: /* @__PURE__ */ jsx(
|
|
262
|
+
ClearProviders,
|
|
263
|
+
{
|
|
264
|
+
values: [
|
|
265
|
+
TextContext$1,
|
|
266
|
+
TextContext,
|
|
267
|
+
ButtonContext$1
|
|
268
|
+
],
|
|
269
|
+
children: /* @__PURE__ */ jsx(_Footer, { children: /* @__PURE__ */ jsx(EnsureTextWrapper, { children: footer }) })
|
|
270
|
+
}
|
|
271
|
+
)
|
|
252
272
|
}
|
|
253
273
|
) : null;
|
|
254
|
-
const footerMarkup = footer ? /* @__PURE__ */ jsx(_Footer, { children: isTextOnlyChildren(footer) ? /* @__PURE__ */ jsx(_Text, { children: footer }) : footer }) : null;
|
|
255
274
|
return /* @__PURE__ */ jsx(
|
|
256
275
|
Select$1,
|
|
257
276
|
{
|
|
@@ -300,17 +319,7 @@ function Select(props, ref) {
|
|
|
300
319
|
children: /* @__PURE__ */ jsx(_ListBox, { ...listBoxProps, items, size, isInvalid, children })
|
|
301
320
|
}
|
|
302
321
|
),
|
|
303
|
-
|
|
304
|
-
ClearProviders,
|
|
305
|
-
{
|
|
306
|
-
values: [
|
|
307
|
-
TextContext$1,
|
|
308
|
-
TextContext,
|
|
309
|
-
ButtonContext$1
|
|
310
|
-
],
|
|
311
|
-
children: footerMarkup
|
|
312
|
-
}
|
|
313
|
-
)
|
|
322
|
+
footerMarkup
|
|
314
323
|
] })
|
|
315
324
|
] });
|
|
316
325
|
}
|
|
@@ -738,7 +747,7 @@ function $f86e6c1ec7da6ebb$export$bc3384a35de93d66(options) {
|
|
|
738
747
|
}
|
|
739
748
|
|
|
740
749
|
// css-module:./Form.module.css#css-module
|
|
741
|
-
var Form_module_default = { "hop-Form": "Form-module__hop-
|
|
750
|
+
var Form_module_default = { "hop-Form": "Form-module__hop-Form___jz9NZ" };
|
|
742
751
|
var GlobalFormCssSelector = "hop-Form";
|
|
743
752
|
function Form(props, ref) {
|
|
744
753
|
var _a;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ClearButtonContext } from './chunk-DXVKHP4V.js';
|
|
2
|
-
import { _EmbeddedButton } from './chunk-
|
|
2
|
+
import { _EmbeddedButton } from './chunk-4PBFVO5S.js';
|
|
3
3
|
import { useLocalizedString } from './chunk-TFVDF4YH.js';
|
|
4
4
|
import { DismissIcon } from '@hopper-ui/icons';
|
|
5
5
|
import { forwardRef } from 'react';
|