@hopper-ui/components 1.3.24 → 1.3.26
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 +14 -0
- package/dist/Avatar/src/AnonymousAvatar.css +37 -37
- package/dist/Avatar/src/AnonymousAvatar.js +3 -3
- package/dist/Avatar/src/Avatar.css +55 -55
- package/dist/Avatar/src/Avatar.js +5 -5
- package/dist/Avatar/src/DeletedAvatar.css +37 -37
- package/dist/Avatar/src/DeletedAvatar.js +3 -3
- package/dist/Avatar/src/RichIconAvatarImage.css +37 -37
- package/dist/Avatar/src/RichIconAvatarImage.js +2 -2
- package/dist/Avatar/src/index.css +55 -55
- package/dist/Avatar/src/index.js +7 -7
- package/dist/Badge/src/Badge.css +42 -42
- package/dist/Badge/src/Badge.js +3 -3
- package/dist/Badge/src/FloatingBadge.css +37 -37
- package/dist/Badge/src/FloatingBadge.js +2 -2
- package/dist/Badge/src/index.css +52 -52
- package/dist/Badge/src/index.js +6 -6
- package/dist/ComboBox/src/ComboBox.css +1251 -1251
- package/dist/ComboBox/src/ComboBox.d.ts +56 -8
- package/dist/ComboBox/src/ComboBox.js +105 -7
- package/dist/ComboBox/src/ComboBoxContext.d.ts +9 -1
- package/dist/ComboBox/src/index.css +1251 -1251
- package/dist/ComboBox/src/index.d.ts +5 -8
- package/dist/ComboBox/src/index.js +71 -79
- 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 +3 -3
- package/dist/ErrorMessage/src/index.css +29 -29
- package/dist/ErrorMessage/src/index.js +3 -3
- package/dist/Form/src/Form.css +900 -900
- package/dist/Form/src/Form.js +71 -79
- package/dist/Form/src/index.css +900 -900
- package/dist/Form/src/index.js +71 -79
- 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 +406 -406
- package/dist/ListBox/src/ListBox.d.ts +1 -1
- package/dist/ListBox/src/ListBox.js +16 -16
- package/dist/ListBox/src/ListBoxItem.css +394 -394
- 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 +406 -406
- package/dist/ListBox/src/index.js +16 -16
- package/dist/Select/src/Select.css +3863 -764
- package/dist/Select/src/Select.d.ts +55 -7
- package/dist/Select/src/Select.js +104 -9
- package/dist/Select/src/SelectContext.d.ts +8 -0
- package/dist/Select/src/SelectValue.css +61 -61
- package/dist/Select/src/SelectValue.js +6 -6
- package/dist/Select/src/index.css +1506 -1506
- package/dist/Select/src/index.d.ts +3 -6
- package/dist/Select/src/index.js +71 -79
- package/dist/Spinner/src/Spinner.css +37 -37
- package/dist/Spinner/src/Spinner.js +3 -3
- package/dist/Spinner/src/index.css +37 -37
- package/dist/Spinner/src/index.js +3 -3
- 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 +3 -3
- package/dist/buttons/src/EmbeddedButton.css +98 -98
- package/dist/buttons/src/EmbeddedButton.js +2 -2
- 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 +8 -8
- package/dist/checkbox/src/CheckboxField.css +33 -33
- package/dist/checkbox/src/CheckboxField.js +3 -3
- package/dist/checkbox/src/CheckboxGroup.css +98 -98
- package/dist/checkbox/src/CheckboxGroup.d.ts +7 -11
- package/dist/checkbox/src/CheckboxGroup.js +11 -4
- package/dist/checkbox/src/DecorativeCheckbox.css +54 -54
- package/dist/checkbox/src/DecorativeCheckbox.d.ts +1 -1
- package/dist/checkbox/src/DecorativeCheckbox.js +8 -8
- package/dist/checkbox/src/index.css +98 -98
- package/dist/checkbox/src/index.d.ts +1 -3
- package/dist/checkbox/src/index.js +14 -14
- package/dist/{chunk-UAWJCHI5.js → chunk-2EV3YY6O.js} +5 -5
- package/dist/{chunk-34OD6B77.js → chunk-34ER3Q3E.js} +3 -3
- package/dist/{chunk-4GUVWQIQ.js → chunk-3O7BL2KX.js} +3 -3
- package/dist/{chunk-AACT6TYJ.js → chunk-3UP24VEW.js} +7 -7
- package/dist/{chunk-VYR2FNOF.js → chunk-3W66UTRH.js} +4 -4
- package/dist/{chunk-GIUE6E7O.js → chunk-4T564HJ6.js} +2 -2
- package/dist/{chunk-ZNAUIA3P.js → chunk-5U74TYYM.js} +4 -4
- package/dist/{chunk-EY63OJGU.js → chunk-5VMRSEZJ.js} +2 -2
- package/dist/{chunk-FDA3Z2MW.js → chunk-7YCHVZAY.js} +2 -2
- package/dist/{chunk-A3DFIXR7.js → chunk-AN67K6WK.js} +1 -1
- package/dist/{chunk-DVFD3SO5.js → chunk-AQSTIWVL.js} +3 -3
- package/dist/{chunk-5HOGOWWF.js → chunk-BBBCM4UD.js} +4 -4
- package/dist/{chunk-23GSURJM.js → chunk-BCCHOOJ6.js} +6 -6
- package/dist/{chunk-DKU4ERF3.js → chunk-BX43IOO4.js} +2 -2
- package/dist/chunk-CPMQVH6E.js +133 -0
- package/dist/{chunk-ICG7GXKL.js → chunk-D356AG3Y.js} +6 -6
- package/dist/{chunk-RFDMUGAC.js → chunk-D423VDJZ.js} +2 -2
- package/dist/{chunk-JEJIGHGA.js → chunk-DTY2IJJ4.js} +4 -4
- package/dist/{chunk-P5CTWFXU.js → chunk-E5B2HDJG.js} +1 -1
- package/dist/{chunk-YZXA24RK.js → chunk-ESWWZ7W6.js} +4 -4
- package/dist/{chunk-6ZY5OMDT.js → chunk-EXL4IHCP.js} +3 -3
- package/dist/{chunk-YSSICOAX.js → chunk-GKELD2X2.js} +3 -3
- package/dist/{chunk-DQM72KTX.js → chunk-IFHFCK4B.js} +1 -1
- package/dist/{chunk-D2LTMEJM.js → chunk-KZQDYFSO.js} +5 -5
- package/dist/{chunk-GX67ZE24.js → chunk-O4UTOFYE.js} +3 -3
- package/dist/{chunk-TKHSOAVB.js → chunk-OH47EJDL.js} +2 -2
- package/dist/{chunk-2MA4Z3CM.js → chunk-ON7MQIOJ.js} +1 -1
- package/dist/{chunk-JDMEQ2PT.js → chunk-P46AXP47.js} +3 -3
- package/dist/{chunk-3MNBXLNA.js → chunk-PLJGFTQE.js} +1 -1
- package/dist/chunk-Q6YABMDY.js +133 -0
- package/dist/{chunk-ZYU53CSB.js → chunk-QHS7OPTX.js} +2 -2
- package/dist/{chunk-QEP5RLDI.js → chunk-QLFK4TDW.js} +1 -1
- package/dist/{chunk-I54ZVSE7.js → chunk-RH56CRXC.js} +2 -2
- package/dist/{chunk-XDS75LCS.js → chunk-SEMHS2HM.js} +7 -7
- package/dist/{chunk-DXJTN6KL.js → chunk-SHLXCNCB.js} +1 -1
- package/dist/{chunk-DPM63OEM.js → chunk-TUAAD5PI.js} +1 -1
- package/dist/{chunk-4QKGKTD5.js → chunk-UIVMBUPT.js} +2 -2
- package/dist/{chunk-3WWTLVIH.js → chunk-UNIVA5T3.js} +1 -1
- package/dist/{chunk-KYTJMKI3.js → chunk-UV3CWRCS.js} +2 -2
- package/dist/{chunk-FN2RCELD.js → chunk-VAAXBSBQ.js} +2 -2
- package/dist/{chunk-WU6G2EFE.js → chunk-X5UWK5RL.js} +1 -1
- package/dist/{chunk-FTU5D3IQ.js → chunk-XF3Q4TNE.js} +3 -3
- package/dist/{chunk-V2ME5CNG.js → chunk-Y4ZE6KY7.js} +369 -92
- package/dist/{chunk-QU5EBSOI.js → chunk-YO2QYRC2.js} +3 -3
- package/dist/{chunk-US7TSPOE.js → chunk-Z2LOHKRH.js} +1 -1
- package/dist/{chunk-7UIRCOSZ.js → chunk-ZZPW6TQD.js} +1 -1
- package/dist/index.css +900 -900
- package/dist/index.d.ts +6 -14
- package/dist/index.js +71 -79
- package/dist/inputs/src/InputGroup.css +264 -264
- package/dist/inputs/src/InputGroup.js +2 -2
- package/dist/inputs/src/NumberField.css +286 -286
- package/dist/inputs/src/NumberField.js +8 -8
- package/dist/inputs/src/PasswordField.css +274 -274
- package/dist/inputs/src/PasswordField.js +8 -8
- 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 +9 -9
- package/dist/inputs/src/TextArea.css +281 -281
- package/dist/inputs/src/TextArea.js +9 -9
- package/dist/inputs/src/TextField.css +278 -278
- package/dist/inputs/src/TextField.js +11 -11
- package/dist/inputs/src/index.css +324 -324
- package/dist/inputs/src/index.js +18 -18
- package/dist/overlays/Popover/src/Popover.css +900 -900
- package/dist/overlays/Popover/src/Popover.js +71 -79
- package/dist/overlays/Popover/src/index.css +900 -900
- package/dist/overlays/Popover/src/index.js +71 -79
- package/dist/radio/src/DecorativeRadio.css +54 -54
- package/dist/radio/src/DecorativeRadio.d.ts +1 -1
- 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 +3 -3
- package/dist/radio/src/RadioGroup.css +129 -129
- package/dist/radio/src/RadioGroup.d.ts +7 -11
- package/dist/radio/src/RadioGroup.js +11 -4
- package/dist/radio/src/index.css +264 -264
- package/dist/radio/src/index.d.ts +4 -6
- package/dist/radio/src/index.js +14 -14
- 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.js +2 -2
- 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 +12 -12
- package/dist/tag/src/TagGroup.css +37 -37
- package/dist/tag/src/TagGroup.js +1 -1
- package/dist/tag/src/TagList.css +27 -27
- package/dist/tag/src/index.css +400 -400
- package/dist/tag/src/index.js +13 -13
- 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 +5 -5
- package/dist/utils/src/index.css +27 -27
- package/dist/utils/src/index.d.ts +1 -1
- package/dist/utils/src/index.js +7 -7
- package/dist/utils/src/types.d.ts +28 -2
- package/dist/utils/src/useRenderProps.d.ts +1 -0
- package/package.json +1 -1
- package/dist/Avatar/src/AnonymousAvatar.temp.css +0 -296
- package/dist/Avatar/src/AnonymousAvatar.temp.d.ts +0 -31
- package/dist/Avatar/src/AnonymousAvatar.temp.js +0 -60
- package/dist/ComboBox/src/ComboBoxOptions.css +0 -5453
- package/dist/ComboBox/src/ComboBoxOptions.d.ts +0 -51
- package/dist/ComboBox/src/ComboBoxOptions.js +0 -129
- package/dist/ComboBox/src/ComboBoxOptionsContext.d.ts +0 -21
- package/dist/ComboBox/src/ComboBoxOptionsContext.js +0 -2
- package/dist/Select/src/SelectOptions.css +0 -5453
- package/dist/Select/src/SelectOptions.d.ts +0 -50
- package/dist/Select/src/SelectOptions.js +0 -129
- package/dist/Select/src/SelectOptionsContext.d.ts +0 -21
- package/dist/Select/src/SelectOptionsContext.js +0 -2
- package/dist/checkbox/src/CheckboxList.d.ts +0 -17
- package/dist/checkbox/src/CheckboxList.js +0 -3
- package/dist/checkbox/src/CheckboxListContext.d.ts +0 -10
- package/dist/checkbox/src/CheckboxListContext.js +0 -2
- package/dist/chunk-3LRBUQC2.js +0 -43
- package/dist/chunk-A7TZHALP.js +0 -7
- package/dist/chunk-BI5IK57A.js +0 -105
- package/dist/chunk-CQFXGAJK.js +0 -7
- package/dist/chunk-D7F5AAM5.js +0 -149
- package/dist/chunk-DTPOFTKE.js +0 -105
- package/dist/chunk-FAM5QSGP.js +0 -210
- package/dist/chunk-NKHMUPAP.js +0 -43
- package/dist/chunk-WDUQUPTE.js +0 -7
- package/dist/chunk-XGOJ7VOE.js +0 -7
- package/dist/radio/src/RadioList.d.ts +0 -17
- package/dist/radio/src/RadioList.js +0 -3
- package/dist/radio/src/RadioListContext.d.ts +0 -10
- package/dist/radio/src/RadioListContext.js +0 -2
package/dist/chunk-FAM5QSGP.js
DELETED
|
@@ -1,210 +0,0 @@
|
|
|
1
|
-
import { PopoverContext } from './chunk-SC6ZK5ON.js';
|
|
2
|
-
import { ListBoxContext } from './chunk-UIEP5BA5.js';
|
|
3
|
-
import { EnsureTextWrapper } from './chunk-7UIRCOSZ.js';
|
|
4
|
-
import { LabelContext } from './chunk-QCA3ZR56.js';
|
|
5
|
-
import { HelperMessageContext } from './chunk-HZKFQ33E.js';
|
|
6
|
-
import { ErrorMessageContext } from './chunk-FAE27DLF.js';
|
|
7
|
-
import { ComboBoxContext } from './chunk-4XHTP4GX.js';
|
|
8
|
-
import { TextContext } from './chunk-X6SER3TZ.js';
|
|
9
|
-
import { ClearContainerSlots } from './chunk-HXI3MEEK.js';
|
|
10
|
-
import { SlotProvider } from './chunk-M36KANKC.js';
|
|
11
|
-
import { composeClassnameRenderProps } from './chunk-65JPI4FL.js';
|
|
12
|
-
import { cssModule } from './chunk-KVDXQMWI.js';
|
|
13
|
-
import { IconContext, AngleUpIcon, AngleDownIcon } from '@hopper-ui/icons';
|
|
14
|
-
import { useStyledSystem, useResponsiveValue } from '@hopper-ui/styled-system';
|
|
15
|
-
import { useObjectRef, mergeRefs, useResizeObserver } from '@react-aria/utils';
|
|
16
|
-
import { forwardRef, useRef, useState, useCallback } from 'react';
|
|
17
|
-
import { useContextProps, useSlottedContext, InputContext, composeRenderProps, ComboBox as ComboBox$1, Group, Input, Button } from 'react-aria-components';
|
|
18
|
-
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
19
|
-
|
|
20
|
-
// css-module:./ComboBox.module.css#css-module
|
|
21
|
-
var ComboBox_module_default = { "hop-ComboBox": "ComboBox-module__hop-ComboBox___QvTxj", "hop-ComboBox--fluid": "ComboBox-module__hop-ComboBox--fluid___i9BEB", "hop-ComboBox__label": "ComboBox-module__hop-ComboBox__label___Rey-J", "hop-ComboBox__trigger": "ComboBox-module__hop-ComboBox__trigger___kGULP", "hop-ComboBox__trigger--sm": "ComboBox-module__hop-ComboBox__trigger--sm___5Rj--", "hop-ComboBox__trigger--md": "ComboBox-module__hop-ComboBox__trigger--md___BVlUI", "hop-ComboBox__input": "ComboBox-module__hop-ComboBox__input___4bjls", "hop-ComboBox__button": "ComboBox-module__hop-ComboBox__button___JAJ5n", "hop-ComboBox__prefix": "ComboBox-module__hop-ComboBox__prefix___QcH9U", "hop-ComboBox__button-icon": "ComboBox-module__hop-ComboBox__button-icon___fCjko", "hop-ComboBox__helper-message": "ComboBox-module__hop-ComboBox__helper-message___fgvp3", "hop-ComboBox__error-message": "ComboBox-module__hop-ComboBox__error-message___Kb04V" };
|
|
22
|
-
var GlobalComboBoxCssSelector = "hop-ComboBox";
|
|
23
|
-
function ComboBox(props, ref) {
|
|
24
|
-
var _a, _b, _c;
|
|
25
|
-
const {
|
|
26
|
-
inputRef: userProvidedInputRef = null,
|
|
27
|
-
...propsWithoutRef
|
|
28
|
-
} = props;
|
|
29
|
-
[props, ref] = useContextProps(propsWithoutRef, ref, ComboBoxContext);
|
|
30
|
-
const { stylingProps, ...ownProps } = useStyledSystem(props);
|
|
31
|
-
const {
|
|
32
|
-
className,
|
|
33
|
-
children: childrenProp,
|
|
34
|
-
isFluid: isFluidProp,
|
|
35
|
-
isInvalid,
|
|
36
|
-
isRequired,
|
|
37
|
-
items,
|
|
38
|
-
menuTrigger = "focus",
|
|
39
|
-
necessityIndicator,
|
|
40
|
-
placeholder,
|
|
41
|
-
prefix,
|
|
42
|
-
size: sizeProp,
|
|
43
|
-
style: styleProp,
|
|
44
|
-
triggerProps,
|
|
45
|
-
...otherProps
|
|
46
|
-
} = ownProps;
|
|
47
|
-
const inputRef = useObjectRef(mergeRefs(userProvidedInputRef, (_a = props.inputRef) != null ? _a : null));
|
|
48
|
-
const inputContext = useSlottedContext(InputContext);
|
|
49
|
-
const mergedInputRefs = (inputContext == null ? void 0 : inputContext.ref) ? mergeRefs(inputRef, inputContext.ref) : inputRef;
|
|
50
|
-
const triggerRef = useRef(null);
|
|
51
|
-
const buttonRef = useRef(null);
|
|
52
|
-
const [triggerWidth, setTriggerWidth] = useState(null);
|
|
53
|
-
const onResize = useCallback(() => {
|
|
54
|
-
if (triggerRef.current) {
|
|
55
|
-
setTriggerWidth(triggerRef.current.offsetWidth + "px");
|
|
56
|
-
}
|
|
57
|
-
}, [triggerRef]);
|
|
58
|
-
useResizeObserver({
|
|
59
|
-
ref: triggerRef,
|
|
60
|
-
onResize
|
|
61
|
-
});
|
|
62
|
-
const { stylingProps: triggerStylingProps, ...triggerOwnProps } = useStyledSystem(triggerProps != null ? triggerProps : {});
|
|
63
|
-
const {
|
|
64
|
-
className: triggerClassName,
|
|
65
|
-
style: triggerStyleProp,
|
|
66
|
-
...otherTriggerProps
|
|
67
|
-
} = triggerOwnProps;
|
|
68
|
-
const size = (_b = useResponsiveValue(sizeProp)) != null ? _b : "sm";
|
|
69
|
-
const isFluid = (_c = useResponsiveValue(isFluidProp)) != null ? _c : false;
|
|
70
|
-
const classNames = composeClassnameRenderProps(
|
|
71
|
-
className,
|
|
72
|
-
GlobalComboBoxCssSelector,
|
|
73
|
-
cssModule(
|
|
74
|
-
ComboBox_module_default,
|
|
75
|
-
"hop-ComboBox",
|
|
76
|
-
isFluid && "fluid",
|
|
77
|
-
size
|
|
78
|
-
),
|
|
79
|
-
stylingProps.className
|
|
80
|
-
);
|
|
81
|
-
const triggerClassNames = composeClassnameRenderProps(
|
|
82
|
-
triggerClassName,
|
|
83
|
-
cssModule(
|
|
84
|
-
ComboBox_module_default,
|
|
85
|
-
"hop-ComboBox__trigger",
|
|
86
|
-
size
|
|
87
|
-
),
|
|
88
|
-
triggerStylingProps.className
|
|
89
|
-
);
|
|
90
|
-
const buttonClassNames = composeClassnameRenderProps(
|
|
91
|
-
cssModule(
|
|
92
|
-
ComboBox_module_default,
|
|
93
|
-
"hop-ComboBox__button"
|
|
94
|
-
)
|
|
95
|
-
);
|
|
96
|
-
const inputClassNames = composeClassnameRenderProps(
|
|
97
|
-
inputContext == null ? void 0 : inputContext.className,
|
|
98
|
-
ComboBox_module_default["hop-ComboBox__input"]
|
|
99
|
-
);
|
|
100
|
-
const style = composeRenderProps(styleProp, (prev) => {
|
|
101
|
-
return {
|
|
102
|
-
...stylingProps.style,
|
|
103
|
-
...prev
|
|
104
|
-
};
|
|
105
|
-
});
|
|
106
|
-
const triggerStyle = composeRenderProps(triggerStyleProp, (prev) => {
|
|
107
|
-
return {
|
|
108
|
-
...triggerStylingProps.style,
|
|
109
|
-
...prev
|
|
110
|
-
};
|
|
111
|
-
});
|
|
112
|
-
const children = composeRenderProps(childrenProp, (prev) => {
|
|
113
|
-
return prev;
|
|
114
|
-
});
|
|
115
|
-
const handleMouseDown = useCallback((e) => {
|
|
116
|
-
if (inputRef.current && e.target !== inputRef.current && buttonRef.current && e.target !== buttonRef.current) {
|
|
117
|
-
inputRef.current.focus();
|
|
118
|
-
e.preventDefault();
|
|
119
|
-
}
|
|
120
|
-
}, [inputRef]);
|
|
121
|
-
const prefixMarkup = prefix ? /* @__PURE__ */ jsx(
|
|
122
|
-
SlotProvider,
|
|
123
|
-
{
|
|
124
|
-
values: [
|
|
125
|
-
[TextContext, { size, className: ComboBox_module_default["hop-ComboBox__prefix"] }],
|
|
126
|
-
[IconContext, { size, className: ComboBox_module_default["hop-ComboBox__prefix"] }]
|
|
127
|
-
],
|
|
128
|
-
children: /* @__PURE__ */ jsx(ClearContainerSlots, { children: /* @__PURE__ */ jsx(EnsureTextWrapper, { children: prefix }) })
|
|
129
|
-
}
|
|
130
|
-
) : null;
|
|
131
|
-
return /* @__PURE__ */ jsx(
|
|
132
|
-
ComboBox$1,
|
|
133
|
-
{
|
|
134
|
-
ref,
|
|
135
|
-
className: classNames,
|
|
136
|
-
style,
|
|
137
|
-
isInvalid,
|
|
138
|
-
isRequired,
|
|
139
|
-
items,
|
|
140
|
-
menuTrigger,
|
|
141
|
-
...otherProps,
|
|
142
|
-
children: (comboBoxRenderProps) => {
|
|
143
|
-
const { isOpen } = comboBoxRenderProps;
|
|
144
|
-
const ButtonIcon = isOpen ? AngleUpIcon : AngleDownIcon;
|
|
145
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
146
|
-
/* @__PURE__ */ jsx(
|
|
147
|
-
SlotProvider,
|
|
148
|
-
{
|
|
149
|
-
values: [
|
|
150
|
-
[LabelContext, {
|
|
151
|
-
className: ComboBox_module_default["hop-ComboBox__label"],
|
|
152
|
-
isRequired,
|
|
153
|
-
necessityIndicator
|
|
154
|
-
}],
|
|
155
|
-
[HelperMessageContext, {
|
|
156
|
-
className: ComboBox_module_default["hop-ComboBox__helper-message"]
|
|
157
|
-
}],
|
|
158
|
-
[ErrorMessageContext, {
|
|
159
|
-
className: ComboBox_module_default["hop-ComboBox__error-message"]
|
|
160
|
-
}],
|
|
161
|
-
[TextContext, {
|
|
162
|
-
size
|
|
163
|
-
}],
|
|
164
|
-
[ListBoxContext, {
|
|
165
|
-
size,
|
|
166
|
-
isInvalid,
|
|
167
|
-
items
|
|
168
|
-
}],
|
|
169
|
-
[PopoverContext, {
|
|
170
|
-
triggerRef,
|
|
171
|
-
style: {
|
|
172
|
-
"--custom-trigger-width": triggerWidth
|
|
173
|
-
}
|
|
174
|
-
}]
|
|
175
|
-
],
|
|
176
|
-
children: children(comboBoxRenderProps)
|
|
177
|
-
}
|
|
178
|
-
),
|
|
179
|
-
/* @__PURE__ */ jsxs(
|
|
180
|
-
Group,
|
|
181
|
-
{
|
|
182
|
-
ref: triggerRef,
|
|
183
|
-
className: triggerClassNames,
|
|
184
|
-
style: triggerStyle,
|
|
185
|
-
onMouseDown: handleMouseDown,
|
|
186
|
-
"data-selected": isOpen || void 0,
|
|
187
|
-
...otherTriggerProps,
|
|
188
|
-
children: [
|
|
189
|
-
prefixMarkup,
|
|
190
|
-
/* @__PURE__ */ jsx(
|
|
191
|
-
Input,
|
|
192
|
-
{
|
|
193
|
-
ref: mergedInputRefs,
|
|
194
|
-
className: inputClassNames,
|
|
195
|
-
placeholder
|
|
196
|
-
}
|
|
197
|
-
),
|
|
198
|
-
/* @__PURE__ */ jsx(Button, { className: buttonClassNames, ref: buttonRef, children: /* @__PURE__ */ jsx(ButtonIcon, { size: "sm", className: ComboBox_module_default["hop-ComboBox__button-icon"] }) })
|
|
199
|
-
]
|
|
200
|
-
}
|
|
201
|
-
)
|
|
202
|
-
] });
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
);
|
|
206
|
-
}
|
|
207
|
-
var _ComboBox = forwardRef(ComboBox);
|
|
208
|
-
_ComboBox.displayName = "ComboBox";
|
|
209
|
-
|
|
210
|
-
export { GlobalComboBoxCssSelector, _ComboBox };
|
package/dist/chunk-NKHMUPAP.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { RadioListContext } from './chunk-A7TZHALP.js';
|
|
2
|
-
import { useStyledSystem } from '@hopper-ui/styled-system';
|
|
3
|
-
import clsx from 'clsx';
|
|
4
|
-
import { forwardRef } from 'react';
|
|
5
|
-
import { useContextProps } from 'react-aria-components';
|
|
6
|
-
import { jsx } from 'react/jsx-runtime';
|
|
7
|
-
|
|
8
|
-
var GlobalRadioListCssSelector = "hop-RadioList";
|
|
9
|
-
function RadioList(props, ref) {
|
|
10
|
-
[props, ref] = useContextProps(props, ref, RadioListContext);
|
|
11
|
-
const { stylingProps, ...ownProps } = useStyledSystem(props);
|
|
12
|
-
const {
|
|
13
|
-
className,
|
|
14
|
-
children,
|
|
15
|
-
style,
|
|
16
|
-
slot,
|
|
17
|
-
...otherProps
|
|
18
|
-
} = ownProps;
|
|
19
|
-
const classNames = clsx(
|
|
20
|
-
className,
|
|
21
|
-
GlobalRadioListCssSelector,
|
|
22
|
-
stylingProps.className
|
|
23
|
-
);
|
|
24
|
-
const mergedStyles = {
|
|
25
|
-
...stylingProps.style,
|
|
26
|
-
...style
|
|
27
|
-
};
|
|
28
|
-
return /* @__PURE__ */ jsx(
|
|
29
|
-
"div",
|
|
30
|
-
{
|
|
31
|
-
...otherProps,
|
|
32
|
-
ref,
|
|
33
|
-
className: classNames,
|
|
34
|
-
style: mergedStyles,
|
|
35
|
-
slot: slot != null ? slot : void 0,
|
|
36
|
-
children
|
|
37
|
-
}
|
|
38
|
-
);
|
|
39
|
-
}
|
|
40
|
-
var _RadioList = forwardRef(RadioList);
|
|
41
|
-
_RadioList.displayName = "RadioList";
|
|
42
|
-
|
|
43
|
-
export { GlobalRadioListCssSelector, _RadioList };
|
package/dist/chunk-WDUQUPTE.js
DELETED
package/dist/chunk-XGOJ7VOE.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { StyledSystemProps } from '@hopper-ui/styled-system';
|
|
3
|
-
import { BaseComponentDOMProps } from '../../utils/src/types.js';
|
|
4
|
-
import '@react-types/shared';
|
|
5
|
-
import 'react-aria-components';
|
|
6
|
-
|
|
7
|
-
declare const GlobalRadioListCssSelector = "hop-RadioList";
|
|
8
|
-
interface RadioListProps extends StyledSystemProps, BaseComponentDOMProps {
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* The Radio List component is a container for a group of radioes.
|
|
12
|
-
*
|
|
13
|
-
* [View Documentation](TODO)
|
|
14
|
-
*/
|
|
15
|
-
declare const _RadioList: react.ForwardRefExoticComponent<RadioListProps & react.RefAttributes<HTMLDivElement>>;
|
|
16
|
-
|
|
17
|
-
export { GlobalRadioListCssSelector, _RadioList as RadioList, type RadioListProps };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { ContextValue } from 'react-aria-components';
|
|
3
|
-
import { RadioListProps } from './RadioList.js';
|
|
4
|
-
import '@hopper-ui/styled-system';
|
|
5
|
-
import '../../utils/src/types.js';
|
|
6
|
-
import '@react-types/shared';
|
|
7
|
-
|
|
8
|
-
declare const RadioListContext: react.Context<ContextValue<RadioListProps, HTMLDivElement>>;
|
|
9
|
-
|
|
10
|
-
export { RadioListContext };
|