@hopper-ui/components 1.0.6 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/Avatar/src/AnonymousAvatar.css +10 -10
- package/dist/Avatar/src/AnonymousAvatar.js +3 -3
- package/dist/Avatar/src/Avatar.css +37 -37
- package/dist/Avatar/src/Avatar.js +5 -5
- package/dist/Avatar/src/AvatarContext.js +1 -1
- package/dist/Avatar/src/DeletedAvatar.css +10 -10
- package/dist/Avatar/src/DeletedAvatar.js +3 -3
- package/dist/Avatar/src/RichIconAvatarImage.css +10 -10
- package/dist/Avatar/src/RichIconAvatarImage.js +2 -2
- package/dist/Avatar/src/RichIconAvatarImageContext.js +1 -1
- package/dist/Avatar/src/index.css +37 -37
- package/dist/Avatar/src/index.js +7 -7
- package/dist/Avatar/src/useImageFallback.js +1 -1
- package/dist/Badge/src/Badge.css +10 -10
- package/dist/Badge/src/Badge.js +3 -3
- package/dist/Badge/src/BadgeContext.js +1 -1
- package/dist/Badge/src/index.css +10 -10
- package/dist/Badge/src/index.js +3 -3
- package/dist/Chip/src/Chip.css +33 -33
- package/dist/Chip/src/Chip.js +3 -3
- package/dist/Chip/src/ChipContext.js +1 -1
- package/dist/Chip/src/index.css +33 -33
- package/dist/Chip/src/index.js +3 -3
- package/dist/Divider/src/Divider.css +2 -2
- package/dist/Divider/src/Divider.js +2 -2
- package/dist/Divider/src/DividerContext.js +1 -1
- package/dist/Divider/src/index.css +2 -2
- package/dist/Divider/src/index.js +2 -2
- package/dist/ErrorMessage/src/ErrorMessage.css +11 -11
- package/dist/ErrorMessage/src/ErrorMessage.js +3 -3
- package/dist/ErrorMessage/src/ErrorMessageContext.js +1 -1
- package/dist/ErrorMessage/src/index.css +11 -11
- package/dist/ErrorMessage/src/index.js +3 -3
- package/dist/Header/src/Header.js +1 -1
- package/dist/Header/src/HeaderContext.js +1 -1
- package/dist/Header/src/index.js +1 -1
- package/dist/HelperMessage/src/HelperMessage.css +11 -11
- package/dist/HelperMessage/src/HelperMessage.js +3 -3
- package/dist/HelperMessage/src/HelperMessageContext.js +1 -1
- package/dist/HelperMessage/src/index.css +11 -11
- package/dist/HelperMessage/src/index.js +3 -3
- package/dist/HopperProvider/src/HopperProvider.js +1 -1
- package/dist/HopperProvider/src/index.js +1 -1
- package/dist/IconList/src/IconList.css +1 -1
- package/dist/IconList/src/IconList.js +2 -2
- package/dist/IconList/src/IconListContext.js +1 -1
- package/dist/IconList/src/index.css +1 -1
- package/dist/IconList/src/index.js +2 -2
- package/dist/Link/src/Link.css +31 -31
- package/dist/Link/src/Link.js +3 -3
- package/dist/Link/src/LinkContext.js +1 -1
- package/dist/Link/src/index.css +31 -31
- package/dist/Link/src/index.js +3 -3
- package/dist/ListBox/src/ListBox.css +175 -175
- package/dist/ListBox/src/ListBox.js +11 -11
- package/dist/ListBox/src/ListBoxContext.js +1 -1
- package/dist/ListBox/src/ListBoxItem.css +160 -160
- package/dist/ListBox/src/ListBoxItem.js +10 -10
- package/dist/ListBox/src/ListBoxItemContext.js +1 -1
- package/dist/ListBox/src/ListBoxItemSkeleton.css +7 -7
- package/dist/ListBox/src/ListBoxItemSkeleton.js +2 -2
- package/dist/ListBox/src/ListBoxItemSkeletonContext.js +1 -1
- package/dist/ListBox/src/index.css +175 -175
- package/dist/ListBox/src/index.js +11 -11
- package/dist/ListBox/src/useLoadOnScroll.js +1 -1
- package/dist/Section/src/Section.js +1 -1
- package/dist/Section/src/SectionContext.js +1 -1
- package/dist/Section/src/index.js +1 -1
- package/dist/Spinner/src/Spinner.css +19 -19
- package/dist/Spinner/src/Spinner.js +3 -3
- package/dist/Spinner/src/SpinnerContext.js +1 -1
- package/dist/Spinner/src/index.css +19 -19
- package/dist/Spinner/src/index.js +3 -3
- package/dist/buttons/src/Button.css +103 -103
- package/dist/buttons/src/Button.js +6 -6
- package/dist/buttons/src/ButtonContext.js +1 -1
- package/dist/buttons/src/ButtonGroup.css +11 -11
- package/dist/buttons/src/ButtonGroup.js +2 -2
- package/dist/buttons/src/ButtonGroupContext.js +1 -1
- package/dist/buttons/src/ClearButton.css +12 -12
- package/dist/buttons/src/ClearButton.js +4 -4
- package/dist/buttons/src/ClearButtonContext.js +1 -1
- package/dist/buttons/src/EmbeddedButton.css +12 -12
- package/dist/buttons/src/EmbeddedButton.js +2 -2
- package/dist/buttons/src/EmbeddedButtonContext.js +1 -1
- package/dist/buttons/src/index.css +126 -126
- package/dist/buttons/src/index.js +9 -9
- package/dist/checkbox/src/Checkbox.css +31 -31
- package/dist/checkbox/src/Checkbox.js +3 -3
- package/dist/checkbox/src/CheckboxContext.js +1 -1
- package/dist/checkbox/src/CheckboxField.css +15 -15
- package/dist/checkbox/src/CheckboxField.js +2 -2
- package/dist/checkbox/src/CheckboxFieldContext.js +1 -1
- package/dist/checkbox/src/CheckboxGroup.css +66 -66
- package/dist/checkbox/src/CheckboxGroup.js +4 -4
- package/dist/checkbox/src/CheckboxGroupContext.js +1 -1
- package/dist/checkbox/src/CheckboxList.js +1 -1
- package/dist/checkbox/src/CheckboxListContext.js +1 -1
- package/dist/checkbox/src/index.css +66 -66
- package/dist/checkbox/src/index.js +8 -8
- package/dist/{chunk-53FHDOG7.js → chunk-2NJ3RDMJ.js} +2 -2
- package/dist/chunk-3LGP5T4C.js +625 -0
- package/dist/{chunk-JRDN364E.js → chunk-3WUDQLLR.js} +2 -2
- package/dist/{chunk-MED2BIDV.js → chunk-4TJUYXYN.js} +1 -1
- package/dist/{chunk-MVRI6GLQ.js → chunk-4V75RYJN.js} +2 -2
- package/dist/{chunk-QBCCF2C2.js → chunk-5CIADHZR.js} +2 -2
- package/dist/{chunk-6QMIRVLY.js → chunk-666H6UTL.js} +1 -1
- package/dist/{chunk-J53HGLCT.js → chunk-AE24HPDG.js} +1 -1
- package/dist/chunk-CK5HMGDC.js +156 -0
- package/dist/{chunk-HR25MLRP.js → chunk-COBPJHIY.js} +1 -1
- package/dist/{chunk-XRC7XE6B.js → chunk-CXIMLIUB.js} +2 -2
- package/dist/{chunk-RA7PM75O.js → chunk-DESANYPD.js} +5 -5
- package/dist/{chunk-RG4JKE4N.js → chunk-E7Y25WJE.js} +1 -1
- package/dist/{chunk-K4ZGI7DJ.js → chunk-EBXHYPDU.js} +1 -1
- package/dist/{chunk-BKC74M6Y.js → chunk-FMSIW5AX.js} +1 -1
- package/dist/{chunk-OHB5QR5P.js → chunk-HVUX7ZQ3.js} +2 -2
- package/dist/{chunk-37NW34QM.js → chunk-IUQNDY3E.js} +3 -3
- package/dist/{chunk-2P3A4VVY.js → chunk-JSBRDJBE.js} +1 -6
- package/dist/{chunk-J33IFG4U.js → chunk-LIUW56HE.js} +1 -1
- package/dist/chunk-LJXTJRSB.js +1 -0
- package/dist/{chunk-SOSHKMNI.js → chunk-LM4HMPSD.js} +2 -2
- package/dist/{chunk-2XUHTPCX.js → chunk-NQOLP5NY.js} +2 -2
- package/dist/{chunk-XGKPMLYD.js → chunk-OKAYIZ45.js} +4 -4
- package/dist/{chunk-ITQK6JTD.js → chunk-QACERXDV.js} +1 -1
- package/dist/{chunk-JUMJ6A3K.js → chunk-R2UVMOIP.js} +1 -1
- package/dist/{chunk-4TXFHYHL.js → chunk-RW4GDPRX.js} +1 -1
- package/dist/{chunk-E4WFKXW4.js → chunk-SHVSB6MD.js} +4 -4
- package/dist/{chunk-3LH2JHUO.js → chunk-SSCPXYN6.js} +3 -3
- package/dist/{chunk-E4ALW4MZ.js → chunk-SXPMPVDJ.js} +8 -8
- package/dist/chunk-U4NXU44C.js +118 -0
- package/dist/{chunk-F2URSFJA.js → chunk-UUUU6SUW.js} +2 -2
- package/dist/chunk-W2ZCHVKP.js +119 -0
- package/dist/{chunk-3A6TTZAA.js → chunk-WSNJNUUA.js} +1 -1
- package/dist/{chunk-P5CWOV3L.js → chunk-WXJ3U2DV.js} +2 -2
- package/dist/{chunk-RCX5B3S3.js → chunk-XC7OT325.js} +1 -1
- package/dist/{chunk-G242LPQE.js → chunk-XVKZ3Q3B.js} +2 -2
- package/dist/{chunk-ZOTVZM6F.js → chunk-YEYNRBMQ.js} +1 -1
- package/dist/{chunk-4JAV3FIH.js → chunk-YTPFSLHU.js} +2 -2
- package/dist/{chunk-V5GOY6TV.js → chunk-YZRL7TXT.js} +1 -1
- package/dist/chunk-ZMDHYGEP.js +57 -0
- package/dist/i18n/src/index.js +2 -2
- package/dist/i18n/src/useLocalizedString.js +2 -2
- package/dist/index.css +3297 -0
- package/dist/index.d.ts +113 -0
- package/dist/index.js +107 -0
- package/dist/inputs/src/InputGroup.css +12 -12
- package/dist/inputs/src/InputGroup.js +2 -2
- package/dist/inputs/src/InputGroupContext.js +1 -1
- package/dist/inputs/src/PasswordField.css +229 -2405
- package/dist/inputs/src/PasswordField.js +12 -91
- package/dist/inputs/src/PasswordFieldContext.js +1 -1
- package/dist/inputs/src/SearchField.css +235 -2390
- package/dist/inputs/src/SearchField.js +13 -90
- package/dist/inputs/src/SearchFieldContext.js +1 -1
- package/dist/inputs/src/TextField.css +230 -2402
- package/dist/inputs/src/TextField.js +13 -89
- package/dist/inputs/src/TextFieldContext.js +1 -1
- package/dist/inputs/src/index.css +219 -2302
- package/dist/inputs/src/index.js +16 -88
- package/dist/layout/src/Content.js +1 -1
- package/dist/layout/src/ContentContext.js +1 -1
- package/dist/layout/src/Flex.js +1 -1
- package/dist/layout/src/Footer.js +1 -1
- package/dist/layout/src/FooterContext.js +1 -1
- package/dist/layout/src/Grid.js +1 -1
- package/dist/layout/src/Inline.js +1 -1
- package/dist/layout/src/Stack.js +1 -1
- package/dist/layout/src/grid-helpers.js +1 -1
- package/dist/overlays/Popover/src/Popover.css +457 -457
- package/dist/overlays/Popover/src/Popover.js +52 -47
- package/dist/overlays/Popover/src/PopoverContext.js +1 -1
- package/dist/overlays/Popover/src/PopoverTrigger.js +1 -1
- package/dist/overlays/Popover/src/index.css +457 -457
- package/dist/overlays/Popover/src/index.js +52 -47
- package/dist/radio/src/Radio.css +31 -31
- package/dist/radio/src/Radio.js +3 -3
- package/dist/radio/src/RadioContext.js +1 -1
- package/dist/radio/src/RadioField.css +15 -15
- package/dist/radio/src/RadioField.js +2 -2
- package/dist/radio/src/RadioFieldContext.js +1 -1
- package/dist/radio/src/RadioGroup.css +66 -66
- package/dist/radio/src/RadioGroup.js +3 -3
- package/dist/radio/src/RadioGroupContext.js +1 -1
- package/dist/radio/src/RadioList.js +1 -1
- package/dist/radio/src/RadioListContext.js +1 -1
- package/dist/radio/src/index.css +66 -66
- package/dist/radio/src/index.js +6 -6
- package/dist/switch/src/Switch.css +25 -25
- package/dist/switch/src/Switch.js +3 -3
- package/dist/switch/src/SwitchContext.js +1 -1
- package/dist/switch/src/SwitchField.css +15 -15
- package/dist/switch/src/SwitchField.js +3 -3
- package/dist/switch/src/SwitchFieldContext.js +1 -1
- package/dist/switch/src/index.css +31 -31
- package/dist/switch/src/index.js +5 -5
- package/dist/tag/src/Tag.css +457 -457
- package/dist/tag/src/Tag.js +52 -47
- package/dist/tag/src/TagContext.js +1 -1
- package/dist/tag/src/TagGroup.css +28 -28
- package/dist/tag/src/TagGroup.js +4 -4
- package/dist/tag/src/TagGroupContext.js +1 -1
- package/dist/tag/src/TagList.js +1 -1
- package/dist/tag/src/TagListContext.js +1 -1
- package/dist/tag/src/index.css +457 -457
- package/dist/tag/src/index.js +52 -47
- package/dist/typography/Heading/src/Heading.css +9 -3222
- package/dist/typography/Heading/src/Heading.js +2 -100
- package/dist/typography/Heading/src/HeadingContext.js +1 -1
- package/dist/typography/Heading/src/index.css +9 -3222
- package/dist/typography/Heading/src/index.js +2 -100
- package/dist/typography/Label/src/Label.css +9 -9
- package/dist/typography/Label/src/Label.js +2 -2
- package/dist/typography/Label/src/LabelContext.js +1 -1
- package/dist/typography/Label/src/index.css +9 -9
- 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 +2 -2
- package/dist/typography/OverlineText/src/OverlineTextContext.js +1 -1
- package/dist/typography/OverlineText/src/index.css +6 -6
- package/dist/typography/OverlineText/src/index.js +2 -2
- package/dist/typography/Text/src/Text.css +9 -9
- package/dist/typography/Text/src/Text.js +2 -2
- package/dist/typography/Text/src/TextContext.js +1 -1
- package/dist/typography/Text/src/index.css +9 -9
- package/dist/typography/Text/src/index.js +2 -2
- package/dist/utils/src/ClearSlots.js +1 -1
- package/dist/utils/src/SlotProvider.js +1 -1
- package/dist/utils/src/assertion.js +1 -1
- package/dist/utils/src/composeClassnameRenderProps.js +1 -1
- package/dist/utils/src/cssModule.js +1 -1
- package/dist/utils/src/index.js +1 -1
- package/dist/utils/src/isTextOnlyChildren.js +1 -1
- package/dist/utils/src/useRenderProps.js +1 -1
- package/dist/utils/src/useSlot.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-BC5A7RHI.js +0 -1260
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { SearchFieldContext } from './chunk-3NKF5TPD.js';
|
|
2
|
+
import { _InputGroup } from './chunk-YZRL7TXT.js';
|
|
3
|
+
import { _ClearButton } from './chunk-HVUX7ZQ3.js';
|
|
4
|
+
import { LabelContext } from './chunk-QCA3ZR56.js';
|
|
5
|
+
import { composeClassnameRenderProps } from './chunk-65JPI4FL.js';
|
|
6
|
+
import { HelperMessageContext } from './chunk-HZKFQ33E.js';
|
|
7
|
+
import { ErrorMessageContext } from './chunk-FAE27DLF.js';
|
|
8
|
+
import { ClearContainerSlots } from './chunk-HXI3MEEK.js';
|
|
9
|
+
import { SlotProvider } from './chunk-M36KANKC.js';
|
|
10
|
+
import { cssModule } from './chunk-KVDXQMWI.js';
|
|
11
|
+
import { IconContext, SearchIcon } from '@hopper-ui/icons';
|
|
12
|
+
import { useStyledSystem, useResponsiveValue } from '@hopper-ui/styled-system';
|
|
13
|
+
import { mergeRefs } from '@react-aria/utils';
|
|
14
|
+
import { forwardRef } from 'react';
|
|
15
|
+
import { useObjectRef } from 'react-aria';
|
|
16
|
+
import { useContextProps, composeRenderProps, Input, SearchField as SearchField$1 } from 'react-aria-components';
|
|
17
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
18
|
+
|
|
19
|
+
// css-module:./SearchField.module.css#css-module
|
|
20
|
+
var SearchField_module_default = { "hop-SearchField": "SearchField-module__hop-SearchField___fjYpy", "hop-SearchField--fluid": "SearchField-module__hop-SearchField--fluid___4uRa7", "hop-SearchField__Label": "SearchField-module__hop-SearchField__Label___wLVDN", "hop-SearchField__prefix": "SearchField-module__hop-SearchField__prefix___fTYJ5", "hop-SearchField__InputGroup": "SearchField-module__hop-SearchField__InputGroup___d2Mc7", "hop-SearchField--clearable": "SearchField-module__hop-SearchField--clearable___v0yM-", "hop-SearchField__ErrorMessage": "SearchField-module__hop-SearchField__ErrorMessage___hjFPO", "hop-SearchField__HelperMessage": "SearchField-module__hop-SearchField__HelperMessage___-FCvM", "hop-SearchField__ClearButton": "SearchField-module__hop-SearchField__ClearButton___NTKEw" };
|
|
21
|
+
var GlobalSearchFieldCssSelector = "hop-SearchField";
|
|
22
|
+
function SearchField(props, ref) {
|
|
23
|
+
var _a;
|
|
24
|
+
const {
|
|
25
|
+
inputRef: userProvidedInputRef = null,
|
|
26
|
+
...propsWithoutRef
|
|
27
|
+
} = props;
|
|
28
|
+
[props, ref] = useContextProps(propsWithoutRef, ref, SearchFieldContext);
|
|
29
|
+
const { stylingProps, ...ownProps } = useStyledSystem(props);
|
|
30
|
+
const {
|
|
31
|
+
className,
|
|
32
|
+
style: styleProp,
|
|
33
|
+
size,
|
|
34
|
+
placeholder,
|
|
35
|
+
isClearable = true,
|
|
36
|
+
children,
|
|
37
|
+
isFluid: isFluidProp,
|
|
38
|
+
icon = /* @__PURE__ */ jsx(SearchIcon, {}),
|
|
39
|
+
isDisabled,
|
|
40
|
+
isInvalid,
|
|
41
|
+
...otherProps
|
|
42
|
+
} = ownProps;
|
|
43
|
+
const inputRef = useObjectRef(mergeRefs(userProvidedInputRef, props.inputRef !== void 0 ? props.inputRef : null));
|
|
44
|
+
const isFluid = (_a = useResponsiveValue(isFluidProp)) != null ? _a : false;
|
|
45
|
+
const classNames = composeClassnameRenderProps(
|
|
46
|
+
className,
|
|
47
|
+
GlobalSearchFieldCssSelector,
|
|
48
|
+
cssModule(
|
|
49
|
+
SearchField_module_default,
|
|
50
|
+
"hop-SearchField",
|
|
51
|
+
isFluid && "fluid"
|
|
52
|
+
),
|
|
53
|
+
stylingProps.className
|
|
54
|
+
);
|
|
55
|
+
const style = composeRenderProps(styleProp, (prev) => {
|
|
56
|
+
return {
|
|
57
|
+
...stylingProps.style,
|
|
58
|
+
...prev
|
|
59
|
+
};
|
|
60
|
+
});
|
|
61
|
+
const inputMarkup = /* @__PURE__ */ jsx(ClearContainerSlots, { children: /* @__PURE__ */ jsxs(
|
|
62
|
+
_InputGroup,
|
|
63
|
+
{
|
|
64
|
+
isDisabled,
|
|
65
|
+
isInvalid,
|
|
66
|
+
isFluid: true,
|
|
67
|
+
size,
|
|
68
|
+
className: SearchField_module_default["hop-SearchField__InputGroup"],
|
|
69
|
+
children: [
|
|
70
|
+
/* @__PURE__ */ jsx(
|
|
71
|
+
SlotProvider,
|
|
72
|
+
{
|
|
73
|
+
values: [
|
|
74
|
+
[IconContext, {
|
|
75
|
+
className: SearchField_module_default["hop-SearchField__prefix"]
|
|
76
|
+
}]
|
|
77
|
+
],
|
|
78
|
+
children: icon
|
|
79
|
+
}
|
|
80
|
+
),
|
|
81
|
+
/* @__PURE__ */ jsx(Input, { ref: inputRef, placeholder }),
|
|
82
|
+
isClearable && /* @__PURE__ */ jsx(_ClearButton, { size: "lg", isDisabled, className: SearchField_module_default["hop-SearchField__ClearButton"] })
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
) });
|
|
86
|
+
const childrenMarkup = composeRenderProps(children, (prev) => {
|
|
87
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
88
|
+
/* @__PURE__ */ jsx(
|
|
89
|
+
SlotProvider,
|
|
90
|
+
{
|
|
91
|
+
values: [
|
|
92
|
+
[LabelContext, { className: SearchField_module_default["hop-SearchField__Label"] }],
|
|
93
|
+
[HelperMessageContext, { className: SearchField_module_default["hop-SearchField__HelperMessage"] }],
|
|
94
|
+
[ErrorMessageContext, { className: SearchField_module_default["hop-SearchField__ErrorMessage"] }]
|
|
95
|
+
],
|
|
96
|
+
children: prev
|
|
97
|
+
}
|
|
98
|
+
),
|
|
99
|
+
inputMarkup
|
|
100
|
+
] });
|
|
101
|
+
});
|
|
102
|
+
return /* @__PURE__ */ jsx(
|
|
103
|
+
SearchField$1,
|
|
104
|
+
{
|
|
105
|
+
ref,
|
|
106
|
+
style,
|
|
107
|
+
className: classNames,
|
|
108
|
+
isDisabled,
|
|
109
|
+
isInvalid,
|
|
110
|
+
...otherProps,
|
|
111
|
+
children: childrenMarkup
|
|
112
|
+
}
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
var _SearchField = forwardRef(SearchField);
|
|
116
|
+
_SearchField.displayName = "SearchField";
|
|
117
|
+
|
|
118
|
+
export { GlobalSearchFieldCssSelector, _SearchField };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isTextOnlyChildren } from './chunk-ZWU6DRRZ.js';
|
|
2
2
|
import { IconListContext } from './chunk-DHVVYSLB.js';
|
|
3
3
|
import { ChipContext } from './chunk-632B5YBQ.js';
|
|
4
|
-
import { _Text } from './chunk-
|
|
4
|
+
import { _Text } from './chunk-E7Y25WJE.js';
|
|
5
5
|
import { TextContext } from './chunk-X6SER3TZ.js';
|
|
6
6
|
import { SlotProvider } from './chunk-M36KANKC.js';
|
|
7
7
|
import { cssModule } from './chunk-KVDXQMWI.js';
|
|
@@ -13,7 +13,7 @@ import { useContextProps, DEFAULT_SLOT } from 'react-aria-components';
|
|
|
13
13
|
import { jsx } from 'react/jsx-runtime';
|
|
14
14
|
|
|
15
15
|
// css-module:./Chip.module.css#css-module
|
|
16
|
-
var Chip_module_default = { "hop-Chip": "Chip-module__hop-
|
|
16
|
+
var Chip_module_default = { "hop-Chip": "Chip-module__hop-Chip___eH28d", "hop-Chip--xs": "Chip-module__hop-Chip--xs___my4zs", "hop-Chip--sm": "Chip-module__hop-Chip--sm___xi4J9", "hop-Chip--md": "Chip-module__hop-Chip--md___KWl-M", "hop-Chip--lg": "Chip-module__hop-Chip--lg___irUCs", "hop-Chip--neutral": "Chip-module__hop-Chip--neutral___jhS3M", "hop-Chip--progress": "Chip-module__hop-Chip--progress___6hJzP", "hop-Chip--positive": "Chip-module__hop-Chip--positive___BnnSY", "hop-Chip--caution": "Chip-module__hop-Chip--caution___tM9z3", "hop-Chip--negative": "Chip-module__hop-Chip--negative___RWQMh", "hop-Chip--option1": "Chip-module__hop-Chip--option1___ue6cW", "hop-Chip--option2": "Chip-module__hop-Chip--option2___LkCcg", "hop-Chip--option3": "Chip-module__hop-Chip--option3___iag-k", "hop-Chip--option4": "Chip-module__hop-Chip--option4___rvfE7", "hop-Chip--option5": "Chip-module__hop-Chip--option5___SjH-I", "hop-Chip--option6": "Chip-module__hop-Chip--option6___FswlN", "hop-Chip--inactive": "Chip-module__hop-Chip--inactive___-Ffkx", "hop-Chip--disabled": "Chip-module__hop-Chip--disabled___CaGLC", "hop-Chip__icon": "Chip-module__hop-Chip__icon___7bCB7", "hop-Chip__icon-list": "Chip-module__hop-Chip__icon-list___XiOd6", "hop-Chip__text": "Chip-module__hop-Chip__text___UdTwh", "hop-Chip__end-icon": "Chip-module__hop-Chip__end-icon___oOI3X", "hop-Chip__end-icon-list": "Chip-module__hop-Chip__end-icon-list___qTqq9" };
|
|
17
17
|
var GlobalChipCssSelector = "hop-Chip";
|
|
18
18
|
var ChipToTextSizeAdapter = {
|
|
19
19
|
xs: "xs",
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { PasswordFieldContext } from './chunk-QW45G6K4.js';
|
|
2
|
+
import { _InputGroup } from './chunk-YZRL7TXT.js';
|
|
3
|
+
import { _EmbeddedButton } from './chunk-4TJUYXYN.js';
|
|
4
|
+
import { useLocalizedString } from './chunk-YEYNRBMQ.js';
|
|
5
|
+
import { LabelContext } from './chunk-QCA3ZR56.js';
|
|
6
|
+
import { composeClassnameRenderProps } from './chunk-65JPI4FL.js';
|
|
7
|
+
import { HelperMessageContext } from './chunk-HZKFQ33E.js';
|
|
8
|
+
import { ErrorMessageContext } from './chunk-FAE27DLF.js';
|
|
9
|
+
import { ClearContainerSlots } from './chunk-HXI3MEEK.js';
|
|
10
|
+
import { SlotProvider } from './chunk-M36KANKC.js';
|
|
11
|
+
import { cssModule } from './chunk-KVDXQMWI.js';
|
|
12
|
+
import { EyeVisibleIcon, EyeHiddenIcon } from '@hopper-ui/icons';
|
|
13
|
+
import { useStyledSystem, useResponsiveValue } from '@hopper-ui/styled-system';
|
|
14
|
+
import { mergeRefs } from '@react-aria/utils';
|
|
15
|
+
import { forwardRef, useState } from 'react';
|
|
16
|
+
import { useObjectRef } from 'react-aria';
|
|
17
|
+
import { useContextProps, composeRenderProps, Input, TextField } from 'react-aria-components';
|
|
18
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
19
|
+
|
|
20
|
+
// css-module:./PasswordField.module.css#css-module
|
|
21
|
+
var PasswordField_module_default = { "hop-PasswordField": "PasswordField-module__hop-PasswordField___WQs-a", "hop-PasswordField--fluid": "PasswordField-module__hop-PasswordField--fluid___4feQC", "hop-PasswordField__Label": "PasswordField-module__hop-PasswordField__Label___SfgLw", "hop-PasswordField__InputGroup": "PasswordField-module__hop-PasswordField__InputGroup___W4E3o", "hop-PasswordField__ErrorMessage": "PasswordField-module__hop-PasswordField__ErrorMessage___l8hTY", "hop-PasswordField__HelperMessage": "PasswordField-module__hop-PasswordField__HelperMessage___xpGf3" };
|
|
22
|
+
var GlobalPasswordFieldCssSelector = "hop-PasswordField";
|
|
23
|
+
function PasswordField(props, ref) {
|
|
24
|
+
var _a;
|
|
25
|
+
const {
|
|
26
|
+
inputRef: userProvidedInputRef = null,
|
|
27
|
+
...propsWithoutRef
|
|
28
|
+
} = props;
|
|
29
|
+
[props, ref] = useContextProps(propsWithoutRef, ref, PasswordFieldContext);
|
|
30
|
+
const { stylingProps, ...ownProps } = useStyledSystem(props);
|
|
31
|
+
const [showPassword, setShowPassword] = useState(false);
|
|
32
|
+
const stringFormatter = useLocalizedString();
|
|
33
|
+
const {
|
|
34
|
+
className,
|
|
35
|
+
style: styleProp,
|
|
36
|
+
size,
|
|
37
|
+
placeholder,
|
|
38
|
+
children,
|
|
39
|
+
isFluid: isFluidProp,
|
|
40
|
+
isDisabled,
|
|
41
|
+
isInvalid,
|
|
42
|
+
...otherProps
|
|
43
|
+
} = ownProps;
|
|
44
|
+
const inputRef = useObjectRef(mergeRefs(userProvidedInputRef, props.inputRef !== void 0 ? props.inputRef : null));
|
|
45
|
+
const isFluid = (_a = useResponsiveValue(isFluidProp)) != null ? _a : false;
|
|
46
|
+
const classNames = composeClassnameRenderProps(
|
|
47
|
+
className,
|
|
48
|
+
GlobalPasswordFieldCssSelector,
|
|
49
|
+
cssModule(
|
|
50
|
+
PasswordField_module_default,
|
|
51
|
+
"hop-PasswordField",
|
|
52
|
+
isFluid && "fluid"
|
|
53
|
+
),
|
|
54
|
+
stylingProps.className
|
|
55
|
+
);
|
|
56
|
+
const style = composeRenderProps(styleProp, (prev) => {
|
|
57
|
+
return {
|
|
58
|
+
...stylingProps.style,
|
|
59
|
+
...prev
|
|
60
|
+
};
|
|
61
|
+
});
|
|
62
|
+
const inputMarkup = /* @__PURE__ */ jsx(ClearContainerSlots, { children: /* @__PURE__ */ jsxs(
|
|
63
|
+
_InputGroup,
|
|
64
|
+
{
|
|
65
|
+
isDisabled,
|
|
66
|
+
isInvalid,
|
|
67
|
+
isFluid: true,
|
|
68
|
+
size,
|
|
69
|
+
className: PasswordField_module_default["hop-PasswordField__InputGroup"],
|
|
70
|
+
children: [
|
|
71
|
+
/* @__PURE__ */ jsx(Input, { ref: inputRef, placeholder, type: showPassword ? "text" : "password" }),
|
|
72
|
+
/* @__PURE__ */ jsx(
|
|
73
|
+
_EmbeddedButton,
|
|
74
|
+
{
|
|
75
|
+
isDisabled,
|
|
76
|
+
"aria-label": stringFormatter.format("PasswordField.toggleVisibility"),
|
|
77
|
+
onPress: () => {
|
|
78
|
+
setShowPassword((x) => !x);
|
|
79
|
+
},
|
|
80
|
+
size: "lg",
|
|
81
|
+
children: showPassword ? /* @__PURE__ */ jsx(EyeVisibleIcon, {}) : /* @__PURE__ */ jsx(EyeHiddenIcon, {})
|
|
82
|
+
}
|
|
83
|
+
)
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
) });
|
|
87
|
+
const childrenMarkup = composeRenderProps(children, (prev) => {
|
|
88
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
89
|
+
/* @__PURE__ */ jsx(
|
|
90
|
+
SlotProvider,
|
|
91
|
+
{
|
|
92
|
+
values: [
|
|
93
|
+
[LabelContext, { className: PasswordField_module_default["hop-PasswordField__Label"] }],
|
|
94
|
+
[HelperMessageContext, { className: PasswordField_module_default["hop-PasswordField__HelperMessage"] }],
|
|
95
|
+
[ErrorMessageContext, { className: PasswordField_module_default["hop-PasswordField__ErrorMessage"] }]
|
|
96
|
+
],
|
|
97
|
+
children: prev
|
|
98
|
+
}
|
|
99
|
+
),
|
|
100
|
+
inputMarkup
|
|
101
|
+
] });
|
|
102
|
+
});
|
|
103
|
+
return /* @__PURE__ */ jsx(
|
|
104
|
+
TextField,
|
|
105
|
+
{
|
|
106
|
+
ref,
|
|
107
|
+
style,
|
|
108
|
+
className: classNames,
|
|
109
|
+
isDisabled,
|
|
110
|
+
isInvalid,
|
|
111
|
+
...otherProps,
|
|
112
|
+
children: childrenMarkup
|
|
113
|
+
}
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
var _PasswordField = forwardRef(PasswordField);
|
|
117
|
+
_PasswordField.displayName = "PasswordField";
|
|
118
|
+
|
|
119
|
+
export { GlobalPasswordFieldCssSelector, _PasswordField };
|
|
@@ -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___to9W2" };
|
|
12
12
|
var GlobalIconListCssSelector = "hop-IconList";
|
|
13
13
|
function IconList(props, ref) {
|
|
14
14
|
[props, ref] = useContextProps(props, ref, IconListContext);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HelperMessageContext } from './chunk-HZKFQ33E.js';
|
|
2
|
-
import { _Text } from './chunk-
|
|
2
|
+
import { _Text } from './chunk-E7Y25WJE.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___rjIiP", "hop-HelperMessage__icon": "HelperMessage-module__hop-HelperMessage__icon___kQ-oH" };
|
|
13
13
|
var GlobalHelperMessageCssSelector = "hop-HelperMessage";
|
|
14
14
|
function HelperMessage(props, ref) {
|
|
15
15
|
const validation = useContext(FieldErrorContext);
|
|
@@ -12,7 +12,7 @@ import { useContextProps } from 'react-aria-components';
|
|
|
12
12
|
import { jsx } from 'react/jsx-runtime';
|
|
13
13
|
|
|
14
14
|
// css-module:./RadioField.module.css#css-module
|
|
15
|
-
var RadioField_module_default = { "hop-RadioField": "RadioField-module__hop-
|
|
15
|
+
var RadioField_module_default = { "hop-RadioField": "RadioField-module__hop-RadioField___yJGpS", "hop-RadioField--sm": "RadioField-module__hop-RadioField--sm___Ebkgx", "hop-RadioField--md": "RadioField-module__hop-RadioField--md___-5LDz", "hop-RadioField__description": "RadioField-module__hop-RadioField__description___SLwmm", "hop-RadioField__radio": "RadioField-module__hop-RadioField__radio___W-PyW" };
|
|
16
16
|
var GlobalRadioFieldCssSelector = "hop-RadioField";
|
|
17
17
|
var RadioToDescriptionSizeAdapter = {
|
|
18
18
|
sm: "xs",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _Label } from './chunk-
|
|
1
|
+
import { _Label } from './chunk-COBPJHIY.js';
|
|
2
2
|
import { SpinnerContext } from './chunk-4ZYV2XLW.js';
|
|
3
3
|
import { composeClassnameRenderProps } from './chunk-65JPI4FL.js';
|
|
4
4
|
import { cssModule } from './chunk-KVDXQMWI.js';
|
|
@@ -8,7 +8,7 @@ import { useContextProps, ProgressBar } from 'react-aria-components';
|
|
|
8
8
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
9
9
|
|
|
10
10
|
// css-module:./Spinner.module.css#css-module
|
|
11
|
-
var Spinner_module_default = { "hop-Spinner": "Spinner-module__hop-
|
|
11
|
+
var Spinner_module_default = { "hop-Spinner": "Spinner-module__hop-Spinner___t2j7Q", "spin": "Spinner-module__spin___F4J93", "hop-Spinner--sm": "Spinner-module__hop-Spinner--sm___0huCq", "hop-Spinner--md": "Spinner-module__hop-Spinner--md___vhdek", "hop-Spinner--lg": "Spinner-module__hop-Spinner--lg___fQeir", "hop-Spinner__track": "Spinner-module__hop-Spinner__track___7mFcL", "hop-Spinner__fill": "Spinner-module__hop-Spinner__fill___ZyNaP", "hop-Spinner__label": "Spinner-module__hop-Spinner__label___a5K-1" };
|
|
12
12
|
var GlobalSpinnerCssSelector = "hop-Spinner";
|
|
13
13
|
var SpinnerToLabelSizeAdapter = {
|
|
14
14
|
sm: "xs",
|
|
@@ -2,7 +2,7 @@ import { SwitchContext } from './chunk-YHBJAXUY.js';
|
|
|
2
2
|
import { composeClassnameRenderProps } from './chunk-65JPI4FL.js';
|
|
3
3
|
import { isTextOnlyChildren } from './chunk-ZWU6DRRZ.js';
|
|
4
4
|
import { IconListContext } from './chunk-DHVVYSLB.js';
|
|
5
|
-
import { _Text } from './chunk-
|
|
5
|
+
import { _Text } from './chunk-E7Y25WJE.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, Switch as Switch$1 } from 'react-a
|
|
|
14
14
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
15
15
|
|
|
16
16
|
// css-module:./Switch.module.css#css-module
|
|
17
|
-
var Switch_module_default = { "hop-Switch": "Switch-module__hop-
|
|
17
|
+
var Switch_module_default = { "hop-Switch": "Switch-module__hop-Switch___SEquW", "hop-Switch--sm": "Switch-module__hop-Switch--sm___fHOlk", "hop-Switch--md": "Switch-module__hop-Switch--md___bpZdR", "hop-Switch__indicator": "Switch-module__hop-Switch__indicator___uUx3m", "hop-Switch__text": "Switch-module__hop-Switch__text___fdTPU", "hop-Switch__icon-list": "Switch-module__hop-Switch__icon-list___3MhtC", "hop-Switch__icon": "Switch-module__hop-Switch__icon___TY0dJ" };
|
|
18
18
|
var GlobalSwitchCssSelector = "hop-Switch";
|
|
19
19
|
function Switch(props, ref) {
|
|
20
20
|
var _a;
|
|
@@ -9,7 +9,7 @@ import { useContextProps, useSlottedContext, InputContext, composeRenderProps, G
|
|
|
9
9
|
import { jsx } from 'react/jsx-runtime';
|
|
10
10
|
|
|
11
11
|
// css-module:./InputGroup.module.css#css-module
|
|
12
|
-
var InputGroup_module_default = { "hop-InputGroup": "InputGroup-module__hop-
|
|
12
|
+
var InputGroup_module_default = { "hop-InputGroup": "InputGroup-module__hop-InputGroup___aX9Nc", "hop-InputGroup--fluid": "InputGroup-module__hop-InputGroup--fluid___VC53v", "hop-InputGroup--sm": "InputGroup-module__hop-InputGroup--sm___9NnAz", "hop-InputGroup__input": "InputGroup-module__hop-InputGroup__input___yyZz-" };
|
|
13
13
|
var GlobalInputGroupCssSelector = "hop-InputGroup";
|
|
14
14
|
function InputGroup(props, ref) {
|
|
15
15
|
var _a, _b;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { HeadingContext } from './chunk-TXZ6BMFR.js';
|
|
2
|
+
import { cssModule } from './chunk-KVDXQMWI.js';
|
|
3
|
+
import { useStyledSystem, useResponsiveValue } from '@hopper-ui/styled-system';
|
|
4
|
+
import clsx from 'clsx';
|
|
5
|
+
import { forwardRef } from 'react';
|
|
6
|
+
import { useContextProps, Heading as Heading$1 } from 'react-aria-components';
|
|
7
|
+
import { jsx } from 'react/jsx-runtime';
|
|
8
|
+
|
|
9
|
+
// css-module:./Heading.module.css#css-module
|
|
10
|
+
var Heading_module_default = { "hop-Heading": "Heading-module__hop-Heading___tWbtc", "hop-Heading--xs": "Heading-module__hop-Heading--xs___uee-Q", "hop-Heading--sm": "Heading-module__hop-Heading--sm___Vawt0", "hop-Heading--md": "Heading-module__hop-Heading--md___OHy3C", "hop-Heading--lg": "Heading-module__hop-Heading--lg___jyfMT", "hop-Heading--xl": "Heading-module__hop-Heading--xl___Z1Czd", "hop-Heading--2xl": "Heading-module__hop-Heading--2xl___1mNUt", "hop-Heading--3xl": "Heading-module__hop-Heading--3xl___lYJTo" };
|
|
11
|
+
var GlobalHeadingCssSelector = "hop-Heading";
|
|
12
|
+
function Heading(props, ref) {
|
|
13
|
+
[props, ref] = useContextProps(props, ref, HeadingContext);
|
|
14
|
+
const { stylingProps, ...ownProps } = useStyledSystem(props);
|
|
15
|
+
const { className, size: sizeProp, children, style, ...otherProps } = ownProps;
|
|
16
|
+
const size = useResponsiveValue(sizeProp != null ? sizeProp : "md");
|
|
17
|
+
const classNames = clsx(
|
|
18
|
+
GlobalHeadingCssSelector,
|
|
19
|
+
cssModule(
|
|
20
|
+
Heading_module_default,
|
|
21
|
+
"hop-Heading",
|
|
22
|
+
size
|
|
23
|
+
),
|
|
24
|
+
stylingProps.className,
|
|
25
|
+
className
|
|
26
|
+
);
|
|
27
|
+
const mergedStyles = {
|
|
28
|
+
...stylingProps.style,
|
|
29
|
+
...style
|
|
30
|
+
};
|
|
31
|
+
return /* @__PURE__ */ jsx(
|
|
32
|
+
Heading$1,
|
|
33
|
+
{
|
|
34
|
+
...otherProps,
|
|
35
|
+
ref,
|
|
36
|
+
className: classNames,
|
|
37
|
+
style: mergedStyles,
|
|
38
|
+
children
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
var _Heading = forwardRef(Heading);
|
|
43
|
+
_Heading.displayName = "Heading";
|
|
44
|
+
function createHeading(as) {
|
|
45
|
+
const level = parseInt(as[1]);
|
|
46
|
+
return forwardRef((props, ref) => {
|
|
47
|
+
return /* @__PURE__ */ jsx(_Heading, { ...props, ref, level });
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
var H1 = createHeading("h1");
|
|
51
|
+
var H2 = createHeading("h2");
|
|
52
|
+
var H3 = createHeading("h3");
|
|
53
|
+
var H4 = createHeading("h4");
|
|
54
|
+
var H5 = createHeading("h5");
|
|
55
|
+
var H6 = createHeading("h6");
|
|
56
|
+
|
|
57
|
+
export { GlobalHeadingCssSelector, H1, H2, H3, H4, H5, H6, _Heading };
|
package/dist/i18n/src/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { useLocalizedString } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
1
|
+
export { useLocalizedString } from '../../chunk-YEYNRBMQ.js';
|
|
2
|
+
import '../../chunk-JSBRDJBE.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { useLocalizedString } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
1
|
+
export { useLocalizedString } from '../../chunk-YEYNRBMQ.js';
|
|
2
|
+
import '../../chunk-JSBRDJBE.js';
|