@hopper-ui/components 1.2.1 → 1.3.1
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 +12 -0
- package/dist/Avatar/src/AnonymousAvatar.css +10 -10
- package/dist/Avatar/src/AnonymousAvatar.js +2 -2
- package/dist/Avatar/src/Avatar.css +37 -37
- package/dist/Avatar/src/Avatar.js +4 -4
- package/dist/Avatar/src/DeletedAvatar.css +10 -10
- package/dist/Avatar/src/DeletedAvatar.js +2 -2
- package/dist/Avatar/src/RichIconAvatarImage.css +10 -10
- package/dist/Avatar/src/RichIconAvatarImage.js +1 -1
- package/dist/Avatar/src/index.css +37 -37
- package/dist/Avatar/src/index.js +6 -6
- package/dist/Badge/src/Badge.css +85 -13
- package/dist/Badge/src/Badge.d.ts +6 -2
- package/dist/Badge/src/Badge.js +2 -2
- package/dist/Badge/src/BadgeContext.d.ts +8 -3
- package/dist/Badge/src/FloatingBadge.css +96 -0
- package/dist/Badge/src/FloatingBadge.d.ts +33 -0
- package/dist/Badge/src/FloatingBadge.js +7 -0
- package/dist/Badge/src/FloatingBadgeContext.d.ts +10 -0
- package/dist/Badge/src/FloatingBadgeContext.js +2 -0
- package/dist/Badge/src/index.css +182 -13
- package/dist/Badge/src/index.d.ts +3 -1
- package/dist/Badge/src/index.js +5 -2
- package/dist/Divider/src/Divider.css +2 -2
- package/dist/Divider/src/Divider.js +1 -1
- package/dist/Divider/src/index.css +2 -2
- package/dist/Divider/src/index.js +1 -1
- package/dist/ErrorMessage/src/ErrorMessage.css +11 -11
- package/dist/ErrorMessage/src/ErrorMessage.js +2 -2
- package/dist/ErrorMessage/src/index.css +11 -11
- package/dist/ErrorMessage/src/index.js +2 -2
- package/dist/Form/src/Form.css +1034 -608
- package/dist/Form/src/Form.js +71 -67
- package/dist/Form/src/index.css +1034 -608
- package/dist/Form/src/index.js +71 -67
- package/dist/HelperMessage/src/HelperMessage.css +11 -11
- package/dist/HelperMessage/src/HelperMessage.js +2 -2
- package/dist/HelperMessage/src/index.css +11 -11
- package/dist/HelperMessage/src/index.js +2 -2
- package/dist/IconList/src/IconList.css +1 -1
- package/dist/IconList/src/IconList.js +1 -1
- package/dist/IconList/src/index.css +1 -1
- package/dist/IconList/src/index.js +1 -1
- package/dist/Link/src/Link.css +31 -31
- package/dist/Link/src/Link.js +2 -2
- package/dist/Link/src/index.css +31 -31
- package/dist/Link/src/index.js +2 -2
- package/dist/ListBox/src/ListBox.css +398 -201
- package/dist/ListBox/src/ListBox.js +15 -16
- package/dist/ListBox/src/ListBoxItem.css +380 -185
- package/dist/ListBox/src/ListBoxItem.js +14 -14
- package/dist/ListBox/src/ListBoxItemSkeleton.css +7 -7
- package/dist/ListBox/src/ListBoxItemSkeleton.js +1 -1
- package/dist/ListBox/src/index.css +398 -201
- package/dist/ListBox/src/index.js +15 -16
- package/dist/Select/src/Select.css +4537 -0
- package/dist/Select/src/Select.d.ts +93 -0
- package/dist/Select/src/Select.js +118 -0
- package/dist/Select/src/SelectContext.d.ts +16 -0
- package/dist/Select/src/SelectContext.js +2 -0
- package/dist/Select/src/SelectValue.css +443 -0
- package/dist/Select/src/SelectValue.d.ts +31 -0
- package/dist/Select/src/SelectValue.js +19 -0
- package/dist/Select/src/index.css +4537 -0
- package/dist/Select/src/index.d.ts +13 -0
- package/dist/Select/src/index.js +118 -0
- package/dist/Spinner/src/Spinner.css +19 -19
- package/dist/Spinner/src/Spinner.js +2 -2
- package/dist/Spinner/src/index.css +19 -19
- package/dist/Spinner/src/index.js +2 -2
- package/dist/buttons/src/Button.css +94 -94
- package/dist/buttons/src/Button.js +5 -5
- package/dist/buttons/src/ButtonGroup.css +11 -11
- package/dist/buttons/src/ButtonGroup.js +2 -2
- package/dist/buttons/src/ClearButton.css +70 -70
- package/dist/buttons/src/ClearButton.js +3 -3
- package/dist/buttons/src/EmbeddedButton.css +70 -70
- package/dist/buttons/src/EmbeddedButton.js +1 -1
- package/dist/buttons/src/index.css +175 -175
- package/dist/buttons/src/index.js +9 -9
- package/dist/checkbox/src/Checkbox.css +31 -31
- package/dist/checkbox/src/Checkbox.js +2 -2
- package/dist/checkbox/src/CheckboxField.css +15 -15
- package/dist/checkbox/src/CheckboxField.js +1 -1
- package/dist/checkbox/src/CheckboxGroup.css +60 -60
- package/dist/checkbox/src/CheckboxGroup.js +3 -3
- package/dist/checkbox/src/index.css +60 -60
- package/dist/checkbox/src/index.js +7 -7
- package/dist/{chunk-J7BXE7WN.js → chunk-2WWHL3EF.js} +4 -4
- package/dist/{chunk-6WKRP4MN.js → chunk-2ZOLM7VR.js} +11 -5
- package/dist/{chunk-F47GZGT7.js → chunk-47SFZCKK.js} +1 -1
- package/dist/{chunk-C7XRB2J6.js → chunk-52LHX4PE.js} +2 -2
- package/dist/{chunk-IUFABTFZ.js → chunk-5NMCOZOW.js} +1 -1
- package/dist/{chunk-J6YYPRGY.js → chunk-7QUXYE3E.js} +10 -7
- package/dist/{chunk-BN32T6QQ.js → chunk-A2S2Q73W.js} +2 -2
- package/dist/{chunk-YXD3IR3T.js → chunk-ANBOSYAL.js} +2 -2
- package/dist/chunk-ARD3LWL2.js +118 -0
- package/dist/{chunk-55AWCUQF.js → chunk-BF6YUKC2.js} +1 -1
- package/dist/{chunk-THUFFPGX.js → chunk-BO53NITW.js} +1 -1
- package/dist/{chunk-RLDQEH6F.js → chunk-BV7O26TY.js} +4 -4
- package/dist/chunk-CIGS4QGT.js +7 -0
- package/dist/{chunk-2DPE3H3G.js → chunk-D2GZKHYD.js} +1 -1
- package/dist/{chunk-T7QJEHL7.js → chunk-D7VVQIPM.js} +2 -2
- package/dist/chunk-EHXOXTDN.js +29 -0
- package/dist/{chunk-TM4R5NO7.js → chunk-EMD2K6B3.js} +2 -2
- package/dist/{chunk-MFFXNI66.js → chunk-ESWRMGHR.js} +4 -4
- package/dist/{chunk-CSE22YXO.js → chunk-EUELVL2L.js} +3 -3
- package/dist/{chunk-PUNJWQAN.js → chunk-GG6RHMJ7.js} +270 -45
- package/dist/{chunk-WYBQCRQB.js → chunk-HLXQ6C2E.js} +2 -2
- package/dist/{chunk-SPFANCCV.js → chunk-HXPTWMD5.js} +3 -3
- package/dist/{chunk-MX5BW5VE.js → chunk-JVDCU4PT.js} +1 -1
- package/dist/{chunk-XI3BX2TP.js → chunk-JVZRUDLP.js} +5 -5
- package/dist/{chunk-F4KQUFXI.js → chunk-L3Y67TUF.js} +3 -3
- package/dist/{chunk-QGC3OX7W.js → chunk-NEPRDVF7.js} +1 -1
- package/dist/{chunk-4APVXEPA.js → chunk-NJHNYL6X.js} +2 -2
- package/dist/{chunk-XUCH26RT.js → chunk-OLXX46IZ.js} +2 -2
- package/dist/{chunk-TFELIWJO.js → chunk-PUMWU6M4.js} +1 -1
- package/dist/{chunk-ZEXXNE5U.js → chunk-QAIK237T.js} +5 -5
- package/dist/{chunk-K7DU4YR4.js → chunk-QCTIAKM6.js} +1 -1
- package/dist/{chunk-CXWMHWSS.js → chunk-QSWSZUZM.js} +1 -1
- package/dist/{chunk-462UBJV3.js → chunk-SD6DBWYC.js} +1 -1
- package/dist/{chunk-ZPPQJKHC.js → chunk-SFZBLVJN.js} +2 -2
- package/dist/chunk-T24MBA34.js +7 -0
- package/dist/{chunk-F4H76S4H.js → chunk-TFVDF4YH.js} +4 -2
- package/dist/{chunk-DZKJZSTQ.js → chunk-TJMAMWRQ.js} +1 -1
- package/dist/{chunk-RYZNMKWB.js → chunk-UNSJTDXN.js} +1 -1
- package/dist/{chunk-AGRQ7UGN.js → chunk-USVXH6MO.js} +2 -2
- package/dist/{chunk-4H7PKEMJ.js → chunk-WDA6LWC4.js} +14 -13
- package/dist/chunk-X2T2UX2O.js +72 -0
- package/dist/{chunk-WQSVNGFJ.js → chunk-XF4SQ222.js} +1 -1
- package/dist/{chunk-YWIDJ55Q.js → chunk-XHQWDF7B.js} +2 -2
- package/dist/{chunk-VQC5F6I7.js → chunk-YD2TGFCB.js} +3 -3
- package/dist/{chunk-LXCCS4SA.js → chunk-ZG5E36S3.js} +7 -8
- package/dist/i18n/src/index.js +1 -1
- package/dist/i18n/src/useLocalizedString.js +1 -1
- package/dist/index.css +1034 -608
- package/dist/index.d.ts +9 -3
- package/dist/index.js +71 -67
- package/dist/inputs/src/InputGroup.css +14 -16
- package/dist/inputs/src/InputGroup.js +1 -1
- package/dist/inputs/src/NumberField.css +64 -65
- package/dist/inputs/src/NumberField.js +9 -9
- package/dist/inputs/src/PasswordField.css +218 -219
- package/dist/inputs/src/PasswordField.js +11 -11
- package/dist/inputs/src/SearchField.css +224 -225
- package/dist/inputs/src/SearchField.js +12 -12
- package/dist/inputs/src/TextArea.css +58 -59
- package/dist/inputs/src/TextArea.js +10 -10
- package/dist/inputs/src/TextField.css +219 -220
- package/dist/inputs/src/TextField.js +12 -12
- package/dist/inputs/src/index.css +271 -268
- package/dist/inputs/src/index.js +18 -18
- package/dist/overlays/Popover/src/Popover.css +1034 -608
- package/dist/overlays/Popover/src/Popover.d.ts +26 -3
- package/dist/overlays/Popover/src/Popover.js +71 -67
- package/dist/overlays/Popover/src/PopoverContext.d.ts +3 -0
- package/dist/overlays/Popover/src/index.css +1034 -608
- package/dist/overlays/Popover/src/index.d.ts +4 -1
- package/dist/overlays/Popover/src/index.js +71 -67
- package/dist/radio/src/Radio.css +31 -31
- package/dist/radio/src/Radio.js +2 -2
- package/dist/radio/src/RadioField.css +15 -15
- package/dist/radio/src/RadioField.js +1 -1
- package/dist/radio/src/RadioGroup.css +60 -60
- package/dist/radio/src/RadioGroup.js +3 -3
- package/dist/radio/src/index.css +60 -60
- package/dist/radio/src/index.js +7 -7
- package/dist/switch/src/Switch.css +25 -25
- package/dist/switch/src/Switch.js +2 -2
- package/dist/switch/src/SwitchField.css +15 -15
- package/dist/switch/src/SwitchField.js +1 -1
- package/dist/switch/src/index.css +31 -31
- package/dist/switch/src/index.js +3 -3
- package/dist/tag/src/Tag.css +473 -304
- package/dist/tag/src/Tag.js +6 -6
- package/dist/tag/src/TagGroup.css +22 -22
- package/dist/tag/src/TagGroup.js +2 -2
- package/dist/tag/src/index.css +486 -317
- package/dist/tag/src/index.js +9 -9
- package/dist/typography/Heading/src/Heading.css +9 -9
- package/dist/typography/Heading/src/Heading.js +1 -1
- package/dist/typography/Heading/src/index.css +9 -9
- package/dist/typography/Heading/src/index.js +1 -1
- package/dist/typography/Label/src/Label.css +3 -3
- package/dist/typography/Label/src/Label.js +2 -2
- package/dist/typography/Label/src/index.css +3 -3
- package/dist/typography/Label/src/index.js +2 -2
- package/dist/typography/OverlineText/src/OverlineText.css +6 -6
- package/dist/typography/OverlineText/src/OverlineText.js +1 -1
- package/dist/typography/OverlineText/src/index.css +6 -6
- package/dist/typography/OverlineText/src/index.js +1 -1
- package/dist/typography/Text/src/Text.css +9 -9
- package/dist/typography/Text/src/Text.js +1 -1
- package/dist/typography/Text/src/index.css +9 -9
- package/dist/typography/Text/src/index.js +1 -1
- package/dist/utils/src/index.d.ts +1 -0
- package/dist/utils/src/index.js +3 -2
- package/dist/utils/src/useIsOverflow.d.ts +5 -0
- package/dist/utils/src/useIsOverflow.js +2 -0
- package/package.json +6 -6
- package/dist/ListBox/src/useLoadOnScroll.d.ts +0 -16
- package/dist/ListBox/src/useLoadOnScroll.js +0 -2
- package/dist/chunk-JTNMFPM4.js +0 -41
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ButtonContext } from './chunk-WMTWFKKP.js';
|
|
2
1
|
import { ButtonGroupContext } from './chunk-VJQ7M2BK.js';
|
|
2
|
+
import { ButtonContext } from './chunk-WMTWFKKP.js';
|
|
3
3
|
import { SlotProvider } from './chunk-M36KANKC.js';
|
|
4
4
|
import { cssModule } from './chunk-KVDXQMWI.js';
|
|
5
5
|
import { useStyledSystem, useResponsiveValue } from '@hopper-ui/styled-system';
|
|
@@ -10,7 +10,7 @@ import { useContextProps } from 'react-aria-components';
|
|
|
10
10
|
import { jsx } from 'react/jsx-runtime';
|
|
11
11
|
|
|
12
12
|
// css-module:./ButtonGroup.module.css#css-module
|
|
13
|
-
var ButtonGroup_module_default = { "hop-ButtonGroup": "ButtonGroup-module__hop-
|
|
13
|
+
var ButtonGroup_module_default = { "hop-ButtonGroup": "ButtonGroup-module__hop-ButtonGroup___-0tKw", "hop-ButtonGroup--horizontal": "ButtonGroup-module__hop-ButtonGroup--horizontal___Ep68N", "hop-ButtonGroup--vertical": "ButtonGroup-module__hop-ButtonGroup--vertical___jJszJ", "hop-ButtonGroup--start": "ButtonGroup-module__hop-ButtonGroup--start___2KX1h", "hop-ButtonGroup--center": "ButtonGroup-module__hop-ButtonGroup--center___Pky9c", "hop-ButtonGroup--end": "ButtonGroup-module__hop-ButtonGroup--end___ZX-GX", "hop-ButtonGroup--wrap": "ButtonGroup-module__hop-ButtonGroup--wrap___mxDuP", "hop-ButtonGroup--fluid": "ButtonGroup-module__hop-ButtonGroup--fluid___FadqF" };
|
|
14
14
|
var GlobalButtonGroupCssSelector = "hop-ButtonGroup";
|
|
15
15
|
function ButtonGroup(props, ref) {
|
|
16
16
|
var _a, _b, _c, _d, _e;
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { useIsOverflow } from './chunk-EHXOXTDN.js';
|
|
2
|
+
import { useLocalizedString } from './chunk-TFVDF4YH.js';
|
|
3
|
+
import { composeClassnameRenderProps } from './chunk-65JPI4FL.js';
|
|
4
|
+
import { useRenderProps } from './chunk-NH3IVMXB.js';
|
|
5
|
+
import { _Text } from './chunk-QCTIAKM6.js';
|
|
6
|
+
import { TextContext } from './chunk-X6SER3TZ.js';
|
|
7
|
+
import { ClearContainerSlots } from './chunk-HXI3MEEK.js';
|
|
8
|
+
import { AvatarContext } from './chunk-AES7QBQE.js';
|
|
9
|
+
import { SlotProvider } from './chunk-M36KANKC.js';
|
|
10
|
+
import { cssModule } from './chunk-KVDXQMWI.js';
|
|
11
|
+
import { IconContext } from '@hopper-ui/icons';
|
|
12
|
+
import { useStyledSystem, useResponsiveValue } from '@hopper-ui/styled-system';
|
|
13
|
+
import { filterDOMProps } from '@react-aria/utils';
|
|
14
|
+
import { forwardRef, useRef, useContext } from 'react';
|
|
15
|
+
import { useContextProps, SelectValueContext, SelectStateContext, useSlottedContext, SelectContext, composeRenderProps, DEFAULT_SLOT } from 'react-aria-components';
|
|
16
|
+
import { jsx } from 'react/jsx-runtime';
|
|
17
|
+
|
|
18
|
+
// css-module:./SelectValue.module.css#css-module
|
|
19
|
+
var SelectValue_module_default = { "hop-SelectValue": "SelectValue-module__hop-SelectValue___fyhi8", "hop-SelectValue__avatar": "SelectValue-module__hop-SelectValue__avatar___MMiVH", "hop-SelectValue__icon": "SelectValue-module__hop-SelectValue__icon___r-eu7", "hop-SelectValue__text": "SelectValue-module__hop-SelectValue__text___f3iUY", "hop-SelectValue__end-icon": "SelectValue-module__hop-SelectValue__end-icon___ECGgT" };
|
|
20
|
+
var GlobalSelectValueCssSelector = "hop-SelectValue";
|
|
21
|
+
var SelectValueToAvatarSizeAdapter = {
|
|
22
|
+
sm: "xs",
|
|
23
|
+
md: "md"
|
|
24
|
+
};
|
|
25
|
+
function SelectValue(props, ref) {
|
|
26
|
+
var _a, _b, _c, _d;
|
|
27
|
+
[props, ref] = useContextProps(props, ref, SelectValueContext);
|
|
28
|
+
const { stylingProps, ...ownProps } = useStyledSystem(props);
|
|
29
|
+
const {
|
|
30
|
+
className,
|
|
31
|
+
size: sizeProp,
|
|
32
|
+
style: styleProp,
|
|
33
|
+
...otherProps
|
|
34
|
+
} = ownProps;
|
|
35
|
+
const size = (_a = useResponsiveValue(sizeProp)) != null ? _a : "sm";
|
|
36
|
+
const textRef = useRef(null);
|
|
37
|
+
const refForOverflowCheck = textRef.current ? textRef : ref;
|
|
38
|
+
const isOverflow = useIsOverflow(refForOverflowCheck);
|
|
39
|
+
const state = useContext(SelectStateContext);
|
|
40
|
+
const { placeholder } = useSlottedContext(SelectContext);
|
|
41
|
+
const selectedItem = (state == null ? void 0 : state.selectedKey) != null ? state.collection.getItem(state.selectedKey) : null;
|
|
42
|
+
const stringFormatter = useLocalizedString();
|
|
43
|
+
const textValue = (_b = state == null ? void 0 : state.selectedItem) == null ? void 0 : _b.textValue;
|
|
44
|
+
const classNames = composeClassnameRenderProps(
|
|
45
|
+
className,
|
|
46
|
+
GlobalSelectValueCssSelector,
|
|
47
|
+
cssModule(
|
|
48
|
+
SelectValue_module_default,
|
|
49
|
+
"hop-SelectValue"
|
|
50
|
+
),
|
|
51
|
+
stylingProps.className
|
|
52
|
+
);
|
|
53
|
+
const style = composeRenderProps(styleProp, (prev) => {
|
|
54
|
+
return {
|
|
55
|
+
...stylingProps.style,
|
|
56
|
+
...prev
|
|
57
|
+
};
|
|
58
|
+
});
|
|
59
|
+
const renderProps = useRenderProps({
|
|
60
|
+
...otherProps,
|
|
61
|
+
className: classNames,
|
|
62
|
+
defaultChildren: textValue || placeholder || stringFormatter.format("Select.placeholder"),
|
|
63
|
+
style,
|
|
64
|
+
values: {
|
|
65
|
+
selectedItem: (_d = (_c = state == null ? void 0 : state.selectedItem) == null ? void 0 : _c.value) != null ? _d : null,
|
|
66
|
+
selectedText: textValue != null ? textValue : null,
|
|
67
|
+
isPlaceholder: !selectedItem
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
const DOMProps = filterDOMProps(ownProps);
|
|
71
|
+
return /* @__PURE__ */ jsx(ClearContainerSlots, { children: /* @__PURE__ */ jsx(
|
|
72
|
+
_Text,
|
|
73
|
+
{
|
|
74
|
+
ref,
|
|
75
|
+
...DOMProps,
|
|
76
|
+
...renderProps,
|
|
77
|
+
size,
|
|
78
|
+
title: isOverflow ? textValue : void 0,
|
|
79
|
+
"data-placeholder": !selectedItem || void 0,
|
|
80
|
+
children: /* @__PURE__ */ jsx(
|
|
81
|
+
SlotProvider,
|
|
82
|
+
{
|
|
83
|
+
values: [
|
|
84
|
+
[AvatarContext, {
|
|
85
|
+
className: SelectValue_module_default["hop-SelectValue__avatar"],
|
|
86
|
+
size: SelectValueToAvatarSizeAdapter[size]
|
|
87
|
+
}],
|
|
88
|
+
[TextContext, {
|
|
89
|
+
slots: {
|
|
90
|
+
"label": {
|
|
91
|
+
className: SelectValue_module_default["hop-SelectValue__text"],
|
|
92
|
+
ref: textRef
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}],
|
|
96
|
+
[IconContext, {
|
|
97
|
+
slots: {
|
|
98
|
+
[DEFAULT_SLOT]: {
|
|
99
|
+
className: SelectValue_module_default["hop-SelectValue__icon"],
|
|
100
|
+
size
|
|
101
|
+
},
|
|
102
|
+
"end-icon": {
|
|
103
|
+
className: SelectValue_module_default["hop-SelectValue__end-icon"],
|
|
104
|
+
size
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}]
|
|
108
|
+
],
|
|
109
|
+
children: renderProps.children
|
|
110
|
+
}
|
|
111
|
+
)
|
|
112
|
+
}
|
|
113
|
+
) });
|
|
114
|
+
}
|
|
115
|
+
var _SelectValue = forwardRef(SelectValue);
|
|
116
|
+
_SelectValue.displayName = "SelectValue";
|
|
117
|
+
|
|
118
|
+
export { GlobalSelectValueCssSelector, _SelectValue };
|
|
@@ -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___ocsPJ" };
|
|
12
12
|
var GlobalIconListCssSelector = "hop-IconList";
|
|
13
13
|
function IconList(props, ref) {
|
|
14
14
|
[props, ref] = useContextProps(props, ref, IconListContext);
|
|
@@ -9,7 +9,7 @@ import { useContextProps } from 'react-aria-components';
|
|
|
9
9
|
import { jsx } from 'react/jsx-runtime';
|
|
10
10
|
|
|
11
11
|
// css-module:./RichIconAvatarImage.module.css#css-module
|
|
12
|
-
var RichIconAvatarImage_module_default = { "hop-RichIconAvatarImage": "RichIconAvatarImage-module__hop-
|
|
12
|
+
var RichIconAvatarImage_module_default = { "hop-RichIconAvatarImage": "RichIconAvatarImage-module__hop-RichIconAvatarImage___0SfZJ", "hop-RichIconAvatarImage--xs": "RichIconAvatarImage-module__hop-RichIconAvatarImage--xs___7c8Uq", "hop-RichIconAvatarImage--sm": "RichIconAvatarImage-module__hop-RichIconAvatarImage--sm___CMqPA", "hop-RichIconAvatarImage--md": "RichIconAvatarImage-module__hop-RichIconAvatarImage--md___qR-0W", "hop-RichIconAvatarImage--lg": "RichIconAvatarImage-module__hop-RichIconAvatarImage--lg___yBdoM", "hop-RichIconAvatarImage--xl": "RichIconAvatarImage-module__hop-RichIconAvatarImage--xl___tBzp5", "hop-RichIconAvatarImage--2xl": "RichIconAvatarImage-module__hop-RichIconAvatarImage--2xl___--GFe", "hop-RichIconAvatarImage__icon": "RichIconAvatarImage-module__hop-RichIconAvatarImage__icon___tDykK" };
|
|
13
13
|
var GlobalRichIconAvatarImageCssSelector = "hop-RichIconAvatarImage";
|
|
14
14
|
var AvatarToIconSizeAdapter = {
|
|
15
15
|
xs: "md",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { _InputGroup } from './chunk-PUMWU6M4.js';
|
|
1
2
|
import { PasswordFieldContext } from './chunk-QW45G6K4.js';
|
|
2
|
-
import {
|
|
3
|
-
import { _EmbeddedButton } from './chunk-DZKJZSTQ.js';
|
|
3
|
+
import { _EmbeddedButton } from './chunk-TJMAMWRQ.js';
|
|
4
4
|
import { LabelContext } from './chunk-QCA3ZR56.js';
|
|
5
|
-
import { useLocalizedString } from './chunk-
|
|
5
|
+
import { useLocalizedString } from './chunk-TFVDF4YH.js';
|
|
6
6
|
import { composeClassnameRenderProps } from './chunk-65JPI4FL.js';
|
|
7
7
|
import { HelperMessageContext } from './chunk-HZKFQ33E.js';
|
|
8
8
|
import { ErrorMessageContext } from './chunk-FAE27DLF.js';
|
|
@@ -18,7 +18,7 @@ import { useContextProps, composeRenderProps, Input, TextField } from 'react-ari
|
|
|
18
18
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
19
19
|
|
|
20
20
|
// css-module:./PasswordField.module.css#css-module
|
|
21
|
-
var PasswordField_module_default = { "hop-PasswordField": "PasswordField-module__hop-
|
|
21
|
+
var PasswordField_module_default = { "hop-PasswordField": "PasswordField-module__hop-PasswordField___iUTLE", "hop-PasswordField--fluid": "PasswordField-module__hop-PasswordField--fluid___4AIxY", "hop-PasswordField__Label": "PasswordField-module__hop-PasswordField__Label___THz7n", "hop-PasswordField__InputGroup": "PasswordField-module__hop-PasswordField__InputGroup___1tlfh", "hop-PasswordField__ErrorMessage": "PasswordField-module__hop-PasswordField__ErrorMessage___L0DbW", "hop-PasswordField__HelperMessage": "PasswordField-module__hop-PasswordField__HelperMessage___Hi6Xf" };
|
|
22
22
|
var GlobalPasswordFieldCssSelector = "hop-PasswordField";
|
|
23
23
|
function PasswordField(props, ref) {
|
|
24
24
|
var _a;
|
|
@@ -11,7 +11,7 @@ import { useContextProps } from 'react-aria-components';
|
|
|
11
11
|
import { jsx } from 'react/jsx-runtime';
|
|
12
12
|
|
|
13
13
|
// css-module:./CheckboxField.module.css#css-module
|
|
14
|
-
var CheckboxField_module_default = { "hop-CheckboxField": "CheckboxField-module__hop-
|
|
14
|
+
var CheckboxField_module_default = { "hop-CheckboxField": "CheckboxField-module__hop-CheckboxField___6GAZe", "hop-CheckboxField--sm": "CheckboxField-module__hop-CheckboxField--sm___k1Kp1", "hop-CheckboxField--md": "CheckboxField-module__hop-CheckboxField--md___M0M51", "hop-CheckboxField__description": "CheckboxField-module__hop-CheckboxField__description___q1ry4", "hop-CheckboxField__checkbox": "CheckboxField-module__hop-CheckboxField__checkbox___ey6D-" };
|
|
15
15
|
var GlobalCheckboxFieldCssSelector = "hop-CheckboxField";
|
|
16
16
|
var CheckboxToDescriptionSizeAdapter = {
|
|
17
17
|
sm: "xs",
|
|
@@ -2,7 +2,7 @@ import { CheckboxContext } from './chunk-2EAZPH3M.js';
|
|
|
2
2
|
import { isTextOnlyChildren } from './chunk-ZWU6DRRZ.js';
|
|
3
3
|
import { composeClassnameRenderProps } from './chunk-65JPI4FL.js';
|
|
4
4
|
import { IconListContext } from './chunk-DHVVYSLB.js';
|
|
5
|
-
import { _Text } from './chunk-
|
|
5
|
+
import { _Text } from './chunk-QCTIAKM6.js';
|
|
6
6
|
import { TextContext } from './chunk-X6SER3TZ.js';
|
|
7
7
|
import { ClearContainerSlots } from './chunk-HXI3MEEK.js';
|
|
8
8
|
import { SlotProvider } from './chunk-M36KANKC.js';
|
|
@@ -14,7 +14,7 @@ import { useContextProps, composeRenderProps, Checkbox as Checkbox$1 } from 'rea
|
|
|
14
14
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
15
15
|
|
|
16
16
|
// css-module:./Checkbox.module.css#css-module
|
|
17
|
-
var Checkbox_module_default = { "hop-Checkbox": "Checkbox-module__hop-
|
|
17
|
+
var Checkbox_module_default = { "hop-Checkbox": "Checkbox-module__hop-Checkbox___oOX03", "hop-Checkbox--focused": "Checkbox-module__hop-Checkbox--focused___4PAm6", "hop-Checkbox--hovered": "Checkbox-module__hop-Checkbox--hovered___0yG6J", "hop-Checkbox--pressed": "Checkbox-module__hop-Checkbox--pressed___04mxl", "hop-Checkbox--sm": "Checkbox-module__hop-Checkbox--sm___KSwrs", "hop-Checkbox--md": "Checkbox-module__hop-Checkbox--md___x2EJP", "hop-Checkbox__icon": "Checkbox-module__hop-Checkbox__icon___ABzh9", "hop-Checkbox__icon-list": "Checkbox-module__hop-Checkbox__icon-list___eUQ93", "hop-Checkbox__box": "Checkbox-module__hop-Checkbox__box___e4-5W", "hop-Checkbox__check": "Checkbox-module__hop-Checkbox__check___QjfqB", "hop-Checkbox__text": "Checkbox-module__hop-Checkbox__text___Us3om" };
|
|
18
18
|
var GlobalCheckboxCssSelector = "hop-Checkbox";
|
|
19
19
|
function Checkbox(props, ref) {
|
|
20
20
|
var _a;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { useIsomorphicLayoutEffect } from '@hopper-ui/styled-system';
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
|
|
4
|
+
// src/utils/src/useIsOverflow.ts
|
|
5
|
+
var useIsOverflow = (ref, callback) => {
|
|
6
|
+
const [isOverflow, setIsOverflow] = useState(false);
|
|
7
|
+
useIsomorphicLayoutEffect(() => {
|
|
8
|
+
if (!ref || !(ref == null ? void 0 : ref.current)) {
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
const { current } = ref;
|
|
12
|
+
const trigger = () => {
|
|
13
|
+
const hasOverflow = current.scrollHeight > current.clientHeight || current.scrollWidth > current.clientWidth;
|
|
14
|
+
setIsOverflow(hasOverflow);
|
|
15
|
+
if (callback) {
|
|
16
|
+
callback(hasOverflow);
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
if (current) {
|
|
20
|
+
if ("ResizeObserver" in window) {
|
|
21
|
+
new ResizeObserver(trigger).observe(current);
|
|
22
|
+
}
|
|
23
|
+
trigger();
|
|
24
|
+
}
|
|
25
|
+
}, [callback, ref, ref == null ? void 0 : ref.current]);
|
|
26
|
+
return isOverflow;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export { useIsOverflow };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HelperMessageContext } from './chunk-HZKFQ33E.js';
|
|
2
|
-
import { _Text } from './chunk-
|
|
2
|
+
import { _Text } from './chunk-QCTIAKM6.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___B-h4I", "hop-HelperMessage__icon": "HelperMessage-module__hop-HelperMessage__icon___Bv8wG" };
|
|
13
13
|
var GlobalHelperMessageCssSelector = "hop-HelperMessage";
|
|
14
14
|
function HelperMessage(props, ref) {
|
|
15
15
|
const validation = useContext(FieldErrorContext);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { useSlot } from './chunk-H5YTU3U7.js';
|
|
2
|
+
import { _Spinner } from './chunk-USVXH6MO.js';
|
|
2
3
|
import { ButtonContext } from './chunk-WMTWFKKP.js';
|
|
3
|
-
import {
|
|
4
|
-
import { useLocalizedString } from './chunk-F4H76S4H.js';
|
|
4
|
+
import { useLocalizedString } from './chunk-TFVDF4YH.js';
|
|
5
5
|
import { isTextOnlyChildren } from './chunk-ZWU6DRRZ.js';
|
|
6
6
|
import { composeClassnameRenderProps } from './chunk-65JPI4FL.js';
|
|
7
7
|
import { IconListContext } from './chunk-DHVVYSLB.js';
|
|
8
8
|
import { useRenderProps } from './chunk-NH3IVMXB.js';
|
|
9
|
-
import { _Text } from './chunk-
|
|
9
|
+
import { _Text } from './chunk-QCTIAKM6.js';
|
|
10
10
|
import { TextContext } from './chunk-X6SER3TZ.js';
|
|
11
11
|
import { SlotProvider } from './chunk-M36KANKC.js';
|
|
12
12
|
import { cssModule } from './chunk-KVDXQMWI.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___ufqF7", "hop-Button--icon-only": "Button-module__hop-Button--icon-only___6nkzA", "hop-Button--fluid": "Button-module__hop-Button--fluid___LYhcV", "hop-Button--sm": "Button-module__hop-Button--sm___rqKIE", "hop-Button--primary": "Button-module__hop-Button--primary___pOCG7", "hop-Button--md": "Button-module__hop-Button--md___bGFaw", "hop-Button--secondary": "Button-module__hop-Button--secondary___ixxaS", "hop-Button--upsell": "Button-module__hop-Button--upsell___fKGBb", "hop-Button--danger": "Button-module__hop-Button--danger___IDbG4", "hop-Button--ghost-danger": "Button-module__hop-Button--ghost-danger___1zhrR", "hop-Button--ghost-secondary": "Button-module__hop-Button--ghost-secondary___cwxat", "hop-Button--ghost-primary": "Button-module__hop-Button--ghost-primary___Yqrhr", "hop-Button__Spinner": "Button-module__hop-Button__Spinner___hQZHn", "hop-Button__icon": "Button-module__hop-Button__icon___-HWSV", "hop-Button__icon-list": "Button-module__hop-Button__icon-list___E7GUi", "hop-Button__text": "Button-module__hop-Button__text___2dU0i", "hop-Button__end-icon": "Button-module__hop-Button__end-icon___5Jtro", "hop-Button__end-icon-list": "Button-module__hop-Button__end-icon-list___CC5Vx" };
|
|
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,8 +1,8 @@
|
|
|
1
|
-
import { CheckboxListContext } from './chunk-WDUQUPTE.js';
|
|
2
1
|
import { CheckboxFieldContext } from './chunk-ZGNK4GWA.js';
|
|
3
2
|
import { CheckboxGroupContext } from './chunk-N7YDPVZL.js';
|
|
4
|
-
import {
|
|
3
|
+
import { CheckboxListContext } from './chunk-WDUQUPTE.js';
|
|
5
4
|
import { CheckboxContext } from './chunk-2EAZPH3M.js';
|
|
5
|
+
import { LabelContext } from './chunk-QCA3ZR56.js';
|
|
6
6
|
import { composeClassnameRenderProps } from './chunk-65JPI4FL.js';
|
|
7
7
|
import { HelperMessageContext } from './chunk-HZKFQ33E.js';
|
|
8
8
|
import { ErrorMessageContext } from './chunk-FAE27DLF.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___pLr29", "hop-CheckboxGroup--bordered": "CheckboxGroup-module__hop-CheckboxGroup--bordered___GgHTk", "hop-CheckboxGroup--sm": "CheckboxGroup-module__hop-CheckboxGroup--sm___4dHH0", "hop-CheckboxGroup--md": "CheckboxGroup-module__hop-CheckboxGroup--md___fic5z", "hop-CheckboxGroup__label": "CheckboxGroup-module__hop-CheckboxGroup__label___iEGgv", "hop-CheckboxGroup__list": "CheckboxGroup-module__hop-CheckboxGroup__list___P4B-x", "hop-CheckboxGroup__checkbox": "CheckboxGroup-module__hop-CheckboxGroup__checkbox___aUkXe", "hop-CheckboxGroup__error-message": "CheckboxGroup-module__hop-CheckboxGroup__error-message___KOis2", "hop-CheckboxGroup__helper-message": "CheckboxGroup-module__hop-CheckboxGroup__helper-message___Gj7lq" };
|
|
18
18
|
var GlobalCheckboxGroupCssSelector = "hop-CheckboxGroup";
|
|
19
19
|
function CheckboxGroup(props, ref) {
|
|
20
20
|
var _a, _b;
|