@hopper-ui/components 1.1.0 → 1.2.0
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 +11 -0
- package/README.md +1 -1
- 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 +3 -3
- package/dist/Avatar/src/AvatarContext.d.ts +1 -1
- 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 +5 -5
- package/dist/Badge/src/Badge.css +10 -10
- package/dist/Badge/src/Badge.js +2 -2
- package/dist/Badge/src/index.css +10 -10
- package/dist/Badge/src/index.js +2 -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 +4111 -0
- package/dist/Form/src/Form.d.ts +28 -0
- package/dist/Form/src/Form.js +114 -0
- package/dist/Form/src/FormContext.d.ts +8 -0
- package/dist/Form/src/FormContext.js +2 -0
- package/dist/Form/src/index.css +4111 -0
- package/dist/Form/src/index.d.ts +5 -0
- package/dist/Form/src/index.js +114 -0
- 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 +3 -3
- package/dist/Link/src/index.css +31 -31
- package/dist/Link/src/index.js +3 -3
- package/dist/ListBox/src/ListBox.css +369 -169
- package/dist/ListBox/src/ListBox.js +12 -11
- package/dist/ListBox/src/ListBoxItem.css +425 -225
- package/dist/ListBox/src/ListBoxItem.js +10 -9
- package/dist/ListBox/src/ListBoxItemSkeleton.css +7 -7
- package/dist/ListBox/src/ListBoxItemSkeleton.js +1 -1
- package/dist/ListBox/src/index.css +369 -169
- package/dist/ListBox/src/index.js +12 -11
- 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 +6 -6
- package/dist/buttons/src/ButtonGroup.css +11 -11
- package/dist/buttons/src/ButtonGroup.js +1 -1
- package/dist/buttons/src/ClearButton.css +375 -28
- package/dist/buttons/src/ClearButton.js +3 -3
- package/dist/buttons/src/EmbeddedButton.css +375 -28
- package/dist/buttons/src/EmbeddedButton.d.ts +9 -0
- package/dist/buttons/src/EmbeddedButton.js +1 -1
- package/dist/buttons/src/index.css +480 -133
- 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/CheckboxField.css +15 -15
- package/dist/checkbox/src/CheckboxField.js +1 -1
- package/dist/checkbox/src/CheckboxGroup.css +62 -59
- package/dist/checkbox/src/CheckboxGroup.js +1 -1
- package/dist/checkbox/src/index.css +62 -59
- package/dist/checkbox/src/index.js +6 -6
- package/dist/{chunk-SR3GAXY5.js → chunk-2XO5CZBO.js} +2 -2
- package/dist/{chunk-VFYGHX3N.js → chunk-354H4FNA.js} +1 -1
- package/dist/{chunk-TGXZJJJA.js → chunk-5IB23E3O.js} +6 -2
- package/dist/{chunk-UMD6RDUS.js → chunk-BKCMCC7V.js} +1 -1
- package/dist/{chunk-YE7RARJB.js → chunk-CEUQHDEQ.js} +1 -1
- package/dist/{chunk-WAUGFWZA.js → chunk-CKKLDA5J.js} +2 -2
- package/dist/{chunk-PQV24MM4.js → chunk-COIGQP33.js} +3 -3
- package/dist/{chunk-VVY3ONWS.js → chunk-EJUIYBAC.js} +1 -1
- package/dist/chunk-EURJK4ZT.js +7 -0
- package/dist/{chunk-YEYNRBMQ.js → chunk-F4H76S4H.js} +6 -2
- package/dist/{chunk-A7HLXFSP.js → chunk-FA4IXLWZ.js} +9 -7
- package/dist/chunk-FOD7XUSJ.js +150 -0
- package/dist/{chunk-ZNGSZW7M.js → chunk-FOKTHCFK.js} +3 -3
- package/dist/{chunk-XGI4LDIF.js → chunk-HCRWIU7V.js} +4 -4
- package/dist/{chunk-BGRKDTCG.js → chunk-IUOLKHYQ.js} +1 -1
- package/dist/{chunk-FQO2QRSC.js → chunk-IXWYHDGU.js} +1 -1
- package/dist/{chunk-TMWNNF4J.js → chunk-J44DIB5J.js} +3 -3
- package/dist/{chunk-TVV4RMFR.js → chunk-JJ4EFTES.js} +1 -1
- package/dist/{chunk-P7UUQGGF.js → chunk-L5KI4ZCL.js} +2 -2
- package/dist/{chunk-6PH4IIEW.js → chunk-M3K4IYX6.js} +1 -1
- package/dist/{chunk-TKB5Q2WX.js → chunk-MJHMFANK.js} +1 -1
- package/dist/{chunk-BLQ72S4U.js → chunk-PFABSIDM.js} +1 -1
- package/dist/{chunk-GXFFLWNF.js → chunk-PQXVL3YJ.js} +1 -1
- package/dist/{chunk-YRUBXLBX.js → chunk-Q63YLWI6.js} +6 -3
- package/dist/{chunk-BQZQTNI6.js → chunk-RQKU3XDG.js} +1 -1
- package/dist/chunk-RWAVMW7T.js +70 -0
- package/dist/{chunk-6K6W32Q7.js → chunk-S5CK32KM.js} +6 -4
- package/dist/{chunk-I6OII2RA.js → chunk-SZSQZ4C7.js} +3 -3
- package/dist/{chunk-Q52NUBN7.js → chunk-T6MAOVLH.js} +2 -2
- package/dist/{chunk-BXPZ6HPC.js → chunk-TCOZUCPD.js} +142 -159
- package/dist/{chunk-GCJT5PQ4.js → chunk-TG623HPA.js} +7 -5
- package/dist/{chunk-6CDXS774.js → chunk-U56LEEEA.js} +6 -6
- package/dist/{chunk-AT7ZY6GA.js → chunk-UT4CSUUM.js} +1 -1
- package/dist/{chunk-CXCOSGTO.js → chunk-V5Q245NH.js} +4 -2
- package/dist/chunk-VISBUD2K.js +172 -0
- package/dist/{chunk-KA6KVIVV.js → chunk-VYKPDMP3.js} +3 -3
- package/dist/{chunk-XHZ4R2MB.js → chunk-W2BQZEW6.js} +4 -4
- package/dist/{chunk-RD6VCI72.js → chunk-W474WFOP.js} +20 -8
- package/dist/{chunk-QY6U3R3W.js → chunk-X253QCYD.js} +3 -2
- package/dist/{chunk-6MSRPPI6.js → chunk-XT2MZWEV.js} +1 -1
- package/dist/{chunk-ICDMJUNE.js → chunk-XUJNQNB3.js} +1 -1
- package/dist/i18n/src/index.js +1 -1
- package/dist/i18n/src/useLocalizedString.js +1 -1
- package/dist/index.css +1521 -694
- package/dist/index.d.ts +5 -3
- package/dist/index.js +46 -44
- package/dist/inputs/src/InputGroup.css +14 -14
- package/dist/inputs/src/InputGroup.d.ts +2 -1
- package/dist/inputs/src/InputGroup.js +1 -1
- package/dist/inputs/src/NumberField.css +65 -62
- package/dist/inputs/src/NumberField.d.ts +1 -0
- package/dist/inputs/src/NumberField.js +18 -173
- package/dist/inputs/src/PasswordField.css +524 -174
- package/dist/inputs/src/PasswordField.d.ts +1 -0
- package/dist/inputs/src/PasswordField.js +9 -9
- package/dist/inputs/src/SearchField.css +530 -180
- package/dist/inputs/src/SearchField.d.ts +1 -0
- package/dist/inputs/src/SearchField.js +10 -10
- package/dist/inputs/src/TextArea.css +59 -56
- package/dist/inputs/src/TextArea.js +8 -8
- package/dist/inputs/src/TextField.css +525 -175
- package/dist/inputs/src/TextField.d.ts +2 -0
- package/dist/inputs/src/TextField.js +11 -11
- package/dist/inputs/src/index.css +694 -205
- package/dist/inputs/src/index.d.ts +2 -0
- package/dist/inputs/src/index.js +17 -14
- package/dist/overlays/Popover/src/Popover.css +1521 -694
- package/dist/overlays/Popover/src/Popover.js +46 -44
- package/dist/overlays/Popover/src/index.css +1521 -694
- package/dist/overlays/Popover/src/index.js +46 -44
- package/dist/radio/src/Radio.css +31 -31
- package/dist/radio/src/Radio.js +3 -3
- package/dist/radio/src/RadioField.css +15 -15
- package/dist/radio/src/RadioField.js +1 -1
- package/dist/radio/src/RadioGroup.css +62 -59
- package/dist/radio/src/RadioGroup.js +1 -1
- package/dist/radio/src/index.css +62 -59
- 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/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 +4 -4
- package/dist/tag/src/Tag.css +1041 -2332
- package/dist/tag/src/Tag.d.ts +6 -1
- package/dist/tag/src/Tag.js +7 -99
- package/dist/tag/src/TagGroup.css +24 -21
- package/dist/tag/src/TagGroup.d.ts +7 -2
- package/dist/tag/src/TagGroup.js +1 -1
- package/dist/tag/src/index.css +1104 -2296
- package/dist/tag/src/index.js +9 -94
- 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 +5 -2
- package/dist/typography/Label/src/Label.d.ts +8 -0
- package/dist/typography/Label/src/Label.js +2 -1
- package/dist/typography/Label/src/index.css +5 -2
- package/dist/typography/Label/src/index.js +2 -1
- 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.js +1 -1
- package/package.json +3 -3
- package/dist/Chip/src/Chip.css +0 -261
- package/dist/Chip/src/Chip.d.ts +0 -27
- package/dist/Chip/src/Chip.js +0 -10
- package/dist/Chip/src/ChipContext.d.ts +0 -10
- package/dist/Chip/src/ChipContext.js +0 -2
- package/dist/Chip/src/index.css +0 -261
- package/dist/Chip/src/index.d.ts +0 -7
- package/dist/Chip/src/index.js +0 -10
- package/dist/chunk-632B5YBQ.js +0 -7
- package/dist/chunk-7VS566A2.js +0 -43
- package/dist/chunk-OETAIO6N.js +0 -105
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { TextFieldContext } from './chunk-O4XPUINW.js';
|
|
2
|
-
import { _InputGroup } from './chunk-
|
|
3
|
-
import { _ClearButton } from './chunk-
|
|
2
|
+
import { _InputGroup } from './chunk-Q63YLWI6.js';
|
|
3
|
+
import { _ClearButton } from './chunk-2XO5CZBO.js';
|
|
4
4
|
import { LabelContext } from './chunk-QCA3ZR56.js';
|
|
5
|
-
import { useLocalizedString } from './chunk-
|
|
5
|
+
import { useLocalizedString } from './chunk-F4H76S4H.js';
|
|
6
|
+
import { isTextOnlyChildren } from './chunk-ZWU6DRRZ.js';
|
|
6
7
|
import { composeClassnameRenderProps } from './chunk-65JPI4FL.js';
|
|
7
8
|
import { HelperMessageContext } from './chunk-HZKFQ33E.js';
|
|
8
9
|
import { ErrorMessageContext } from './chunk-FAE27DLF.js';
|
|
9
|
-
import {
|
|
10
|
-
import { _Text } from './chunk-6MSRPPI6.js';
|
|
10
|
+
import { _Text } from './chunk-XT2MZWEV.js';
|
|
11
11
|
import { TextContext } from './chunk-X6SER3TZ.js';
|
|
12
12
|
import { ClearContainerSlots } from './chunk-HXI3MEEK.js';
|
|
13
13
|
import { SlotProvider } from './chunk-M36KANKC.js';
|
|
@@ -22,7 +22,7 @@ import { useContextProps, composeRenderProps, Input, TextField as TextField$1 }
|
|
|
22
22
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
23
23
|
|
|
24
24
|
// css-module:./TextField.module.css#css-module
|
|
25
|
-
var TextField_module_default = { "hop-TextField": "TextField-module__hop-
|
|
25
|
+
var TextField_module_default = { "hop-TextField": "TextField-module__hop-TextField___p1zZl", "hop-TextField--fluid": "TextField-module__hop-TextField--fluid___upyKv", "hop-TextField__Label": "TextField-module__hop-TextField__Label___KP7AK", "hop-TextField__prefix": "TextField-module__hop-TextField__prefix___o3YUl", "hop-TextField__InputGroup": "TextField-module__hop-TextField__InputGroup___b7EQq", "hop-TextField__ErrorMessage": "TextField-module__hop-TextField__ErrorMessage___oXqwU", "hop-TextField__HelperMessage": "TextField-module__hop-TextField__HelperMessage___WN1xO" };
|
|
26
26
|
var GlobalTextFieldCssSelector = "hop-TextField";
|
|
27
27
|
function TextField(props, ref) {
|
|
28
28
|
var _a;
|
|
@@ -53,6 +53,7 @@ function TextField(props, ref) {
|
|
|
53
53
|
isFluid: isFluidProp,
|
|
54
54
|
isDisabled,
|
|
55
55
|
isInvalid,
|
|
56
|
+
isRequired,
|
|
56
57
|
...otherProps
|
|
57
58
|
} = ownProps;
|
|
58
59
|
const inputRef = useObjectRef(mergeRefs(userProvidedInputRef, props.inputRef !== void 0 ? props.inputRef : null));
|
|
@@ -119,7 +120,7 @@ function TextField(props, ref) {
|
|
|
119
120
|
SlotProvider,
|
|
120
121
|
{
|
|
121
122
|
values: [
|
|
122
|
-
[LabelContext, { className: TextField_module_default["hop-TextField__Label"] }],
|
|
123
|
+
[LabelContext, { className: TextField_module_default["hop-TextField__Label"], isRequired }],
|
|
123
124
|
[HelperMessageContext, { className: TextField_module_default["hop-TextField__HelperMessage"] }],
|
|
124
125
|
[ErrorMessageContext, { className: TextField_module_default["hop-TextField__ErrorMessage"] }]
|
|
125
126
|
],
|
|
@@ -140,6 +141,7 @@ function TextField(props, ref) {
|
|
|
140
141
|
onChange,
|
|
141
142
|
isDisabled,
|
|
142
143
|
isInvalid,
|
|
144
|
+
isRequired,
|
|
143
145
|
...otherProps,
|
|
144
146
|
children: childrenMarkup
|
|
145
147
|
}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { TagContext } from './chunk-EWMWQ2MC.js';
|
|
2
|
+
import { _ClearButton } from './chunk-2XO5CZBO.js';
|
|
3
|
+
import { _Spinner } from './chunk-CKKLDA5J.js';
|
|
4
|
+
import { useLocalizedString } from './chunk-F4H76S4H.js';
|
|
5
|
+
import { isTextOnlyChildren } from './chunk-ZWU6DRRZ.js';
|
|
6
|
+
import { composeClassnameRenderProps } from './chunk-65JPI4FL.js';
|
|
7
|
+
import { IconListContext } from './chunk-DHVVYSLB.js';
|
|
8
|
+
import { BadgeContext } from './chunk-CQDLZ42T.js';
|
|
9
|
+
import { _Text } from './chunk-XT2MZWEV.js';
|
|
10
|
+
import { TextContext } from './chunk-X6SER3TZ.js';
|
|
11
|
+
import { ClearContainerSlots } from './chunk-HXI3MEEK.js';
|
|
12
|
+
import { AvatarContext } from './chunk-AES7QBQE.js';
|
|
13
|
+
import { SlotProvider } from './chunk-M36KANKC.js';
|
|
14
|
+
import { cssModule } from './chunk-KVDXQMWI.js';
|
|
15
|
+
import { IconContext } from '@hopper-ui/icons';
|
|
16
|
+
import { useStyledSystem, useResponsiveValue } from '@hopper-ui/styled-system';
|
|
17
|
+
import { forwardRef } from 'react';
|
|
18
|
+
import { useContextProps, composeRenderProps, Tag as Tag$1 } from 'react-aria-components';
|
|
19
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
20
|
+
|
|
21
|
+
// css-module:./Tag.module.css#css-module
|
|
22
|
+
var Tag_module_default = { "hop-Tag": "Tag-module__hop-Tag___RskTT", "hop-Tag--sm": "Tag-module__hop-Tag--sm___dT9Zg", "hop-Tag__remove-btn": "Tag-module__hop-Tag__remove-btn___gqTvd", "hop-Tag__Spinner": "Tag-module__hop-Tag__Spinner___itlq9", "hop-Tag__avatar": "Tag-module__hop-Tag__avatar___k-w6U", "hop-Tag--md": "Tag-module__hop-Tag--md___EFXGm", "hop-Tag--lg": "Tag-module__hop-Tag--lg___-7S-k", "hop-Tag--neutral": "Tag-module__hop-Tag--neutral___ziL-o", "hop-Tag--subdued": "Tag-module__hop-Tag--subdued___bYJN1", "hop-Tag--progress": "Tag-module__hop-Tag--progress___Scd9q", "hop-Tag--positive": "Tag-module__hop-Tag--positive___GJ1Wb", "hop-Tag--caution": "Tag-module__hop-Tag--caution___de6ZF", "hop-Tag--negative": "Tag-module__hop-Tag--negative___Dz8WI", "hop-Tag--option1": "Tag-module__hop-Tag--option1___Va6Mb", "hop-Tag--option2": "Tag-module__hop-Tag--option2___eck-O", "hop-Tag--option3": "Tag-module__hop-Tag--option3___ZlmMR", "hop-Tag--option4": "Tag-module__hop-Tag--option4___L3EmX", "hop-Tag--option5": "Tag-module__hop-Tag--option5___B7Tp-", "hop-Tag--option6": "Tag-module__hop-Tag--option6___GvCgh", "hop-Tag__icon": "Tag-module__hop-Tag__icon___nUqBw", "hop-Tag__icon-list": "Tag-module__hop-Tag__icon-list___ybqv1", "hop-Tag__text": "Tag-module__hop-Tag__text___TYNqw", "hop-Tag__badge": "Tag-module__hop-Tag__badge___oUeLt" };
|
|
23
|
+
var GlobalTagCssSelector = "hop-Tag";
|
|
24
|
+
var TagToTextSizeAdapter = {
|
|
25
|
+
sm: "xs",
|
|
26
|
+
md: "xs",
|
|
27
|
+
lg: "sm"
|
|
28
|
+
};
|
|
29
|
+
var TagToAvatarSizeAdapter = {
|
|
30
|
+
sm: "xs",
|
|
31
|
+
md: "xs",
|
|
32
|
+
lg: "sm"
|
|
33
|
+
};
|
|
34
|
+
var TagToButtonSizeAdapter = {
|
|
35
|
+
sm: "md",
|
|
36
|
+
md: "md",
|
|
37
|
+
lg: "lg"
|
|
38
|
+
};
|
|
39
|
+
function Tag(props, ref) {
|
|
40
|
+
var _a;
|
|
41
|
+
[props, ref] = useContextProps(props, ref, TagContext);
|
|
42
|
+
const { stylingProps, ...ownProps } = useStyledSystem(props);
|
|
43
|
+
const {
|
|
44
|
+
className,
|
|
45
|
+
children: childrenProp,
|
|
46
|
+
isInvalid,
|
|
47
|
+
isLoading,
|
|
48
|
+
size: sizeProp,
|
|
49
|
+
style: styleProp,
|
|
50
|
+
textValue: textValueProp,
|
|
51
|
+
variant = "neutral",
|
|
52
|
+
...otherProps
|
|
53
|
+
} = ownProps;
|
|
54
|
+
const stringFormatter = useLocalizedString();
|
|
55
|
+
const size = (_a = useResponsiveValue(sizeProp)) != null ? _a : "md";
|
|
56
|
+
const textValue = textValueProp != null ? textValueProp : typeof childrenProp === "string" ? childrenProp : void 0;
|
|
57
|
+
const classNames = composeClassnameRenderProps(
|
|
58
|
+
className,
|
|
59
|
+
GlobalTagCssSelector,
|
|
60
|
+
cssModule(
|
|
61
|
+
Tag_module_default,
|
|
62
|
+
"hop-Tag",
|
|
63
|
+
size,
|
|
64
|
+
variant
|
|
65
|
+
),
|
|
66
|
+
stylingProps.className
|
|
67
|
+
);
|
|
68
|
+
const style = composeRenderProps(styleProp, (prev) => {
|
|
69
|
+
return {
|
|
70
|
+
...stylingProps.style,
|
|
71
|
+
...prev
|
|
72
|
+
};
|
|
73
|
+
});
|
|
74
|
+
const children = composeRenderProps(childrenProp, (prev) => {
|
|
75
|
+
if (prev && isTextOnlyChildren(prev)) {
|
|
76
|
+
return /* @__PURE__ */ jsx(_Text, { children: prev });
|
|
77
|
+
}
|
|
78
|
+
return prev;
|
|
79
|
+
});
|
|
80
|
+
return /* @__PURE__ */ jsx(
|
|
81
|
+
Tag$1,
|
|
82
|
+
{
|
|
83
|
+
...otherProps,
|
|
84
|
+
ref,
|
|
85
|
+
className: classNames,
|
|
86
|
+
style,
|
|
87
|
+
textValue,
|
|
88
|
+
"data-invalid": isInvalid || void 0,
|
|
89
|
+
"data-loading": isLoading || void 0,
|
|
90
|
+
children: (tagProps) => {
|
|
91
|
+
const { allowsRemoving, isDisabled, isSelected } = tagProps;
|
|
92
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
93
|
+
/* @__PURE__ */ jsx(ClearContainerSlots, { children: /* @__PURE__ */ jsx(
|
|
94
|
+
SlotProvider,
|
|
95
|
+
{
|
|
96
|
+
values: [
|
|
97
|
+
[TextContext, {
|
|
98
|
+
className: Tag_module_default["hop-Tag__text"],
|
|
99
|
+
size: TagToTextSizeAdapter[size]
|
|
100
|
+
}],
|
|
101
|
+
[IconListContext, {
|
|
102
|
+
className: Tag_module_default["hop-Tag__icon-list"],
|
|
103
|
+
size: "sm"
|
|
104
|
+
}],
|
|
105
|
+
[IconContext, {
|
|
106
|
+
className: Tag_module_default["hop-Tag__icon"],
|
|
107
|
+
size: "sm"
|
|
108
|
+
}],
|
|
109
|
+
[BadgeContext, {
|
|
110
|
+
className: Tag_module_default["hop-Tag__badge"],
|
|
111
|
+
isDisabled
|
|
112
|
+
}],
|
|
113
|
+
[AvatarContext, {
|
|
114
|
+
className: Tag_module_default["hop-Tag__avatar"],
|
|
115
|
+
isDisabled,
|
|
116
|
+
size: TagToAvatarSizeAdapter[size]
|
|
117
|
+
}]
|
|
118
|
+
],
|
|
119
|
+
children: children(tagProps)
|
|
120
|
+
}
|
|
121
|
+
) }),
|
|
122
|
+
allowsRemoving && !isLoading && /* @__PURE__ */ jsx(
|
|
123
|
+
_ClearButton,
|
|
124
|
+
{
|
|
125
|
+
slot: "remove",
|
|
126
|
+
isDisabled,
|
|
127
|
+
className: Tag_module_default["hop-Tag__remove-btn"],
|
|
128
|
+
"aria-label": stringFormatter.format("Tag.removeAriaLabel"),
|
|
129
|
+
size: TagToButtonSizeAdapter[size],
|
|
130
|
+
variant,
|
|
131
|
+
isSelected
|
|
132
|
+
}
|
|
133
|
+
),
|
|
134
|
+
isLoading && /* @__PURE__ */ jsx(
|
|
135
|
+
_Spinner,
|
|
136
|
+
{
|
|
137
|
+
"aria-label": stringFormatter.format("Tag.spinnerAriaLabel"),
|
|
138
|
+
size: "sm",
|
|
139
|
+
className: Tag_module_default["hop-Tag__Spinner"]
|
|
140
|
+
}
|
|
141
|
+
)
|
|
142
|
+
] });
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
var _Tag = forwardRef(Tag);
|
|
148
|
+
_Tag.displayName = "Tag";
|
|
149
|
+
|
|
150
|
+
export { GlobalTagCssSelector, _Tag };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { CheckboxContext } from './chunk-2EAZPH3M.js';
|
|
2
|
-
import { composeClassnameRenderProps } from './chunk-65JPI4FL.js';
|
|
3
2
|
import { isTextOnlyChildren } from './chunk-ZWU6DRRZ.js';
|
|
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-XT2MZWEV.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___OTh5S", "hop-Checkbox--focused": "Checkbox-module__hop-Checkbox--focused___urS3p", "hop-Checkbox--hovered": "Checkbox-module__hop-Checkbox--hovered___Wwpsr", "hop-Checkbox--pressed": "Checkbox-module__hop-Checkbox--pressed___tG3Hj", "hop-Checkbox--sm": "Checkbox-module__hop-Checkbox--sm___gKd-M", "hop-Checkbox--md": "Checkbox-module__hop-Checkbox--md___WAPyo", "hop-Checkbox__icon": "Checkbox-module__hop-Checkbox__icon___SzESn", "hop-Checkbox__icon-list": "Checkbox-module__hop-Checkbox__icon-list___lWkgH", "hop-Checkbox__box": "Checkbox-module__hop-Checkbox__box___UxA4d", "hop-Checkbox__check": "Checkbox-module__hop-Checkbox__check___iNG2Y", "hop-Checkbox__text": "Checkbox-module__hop-Checkbox__text___-kuqp" };
|
|
18
18
|
var GlobalCheckboxCssSelector = "hop-Checkbox";
|
|
19
19
|
function Checkbox(props, ref) {
|
|
20
20
|
var _a;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { useFontFaceReady } from './chunk-IU6XMS2X.js';
|
|
2
2
|
import { useTruncatedText } from './chunk-Z57VHYOF.js';
|
|
3
3
|
import { TextAreaContext } from './chunk-MHQZXLKW.js';
|
|
4
|
-
import { _InputGroup } from './chunk-
|
|
4
|
+
import { _InputGroup } from './chunk-Q63YLWI6.js';
|
|
5
5
|
import { LabelContext } from './chunk-QCA3ZR56.js';
|
|
6
|
-
import { useLocalizedString } from './chunk-
|
|
6
|
+
import { useLocalizedString } from './chunk-F4H76S4H.js';
|
|
7
7
|
import { composeClassnameRenderProps } from './chunk-65JPI4FL.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-XT2MZWEV.js';
|
|
11
11
|
import { ClearContainerSlots } from './chunk-HXI3MEEK.js';
|
|
12
12
|
import { SlotProvider } from './chunk-M36KANKC.js';
|
|
13
13
|
import { cssModule } from './chunk-KVDXQMWI.js';
|
|
@@ -79,7 +79,7 @@ function $b5e257d569688ac6$export$535bd6ca7f90a273() {
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
// css-module:./TextArea.module.css#css-module
|
|
82
|
-
var TextArea_module_default = { "hop-TextArea": "TextArea-module__hop-
|
|
82
|
+
var TextArea_module_default = { "hop-TextArea": "TextArea-module__hop-TextArea___Oqrhm", "hop-TextArea--fluid": "TextArea-module__hop-TextArea--fluid___2QsEG", "hop-TextArea__Label": "TextArea-module__hop-TextArea__Label___6uZvZ", "hop-TextArea__prefix": "TextArea-module__hop-TextArea__prefix___UGSsJ", "hop-TextArea__InputGroup": "TextArea-module__hop-TextArea__InputGroup___m2oHv", "hop-TextArea__textarea": "TextArea-module__hop-TextArea__textarea___-aEby", "hop-TextArea__char-count": "TextArea-module__hop-TextArea__char-count___-TDoe", "hop-TextArea__ErrorMessage": "TextArea-module__hop-TextArea__ErrorMessage___Gj-AJ", "hop-TextArea__HelperMessage": "TextArea-module__hop-TextArea__HelperMessage___FVgxx" };
|
|
83
83
|
var GlobalTextAreaCssSelector = "hop-TextArea";
|
|
84
84
|
var DefaultMinimumTextAreaRows = 3;
|
|
85
85
|
var pxToInt = (value) => {
|
|
@@ -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___-mdbp" };
|
|
12
12
|
var GlobalIconListCssSelector = "hop-IconList";
|
|
13
13
|
function IconList(props, ref) {
|
|
14
14
|
[props, ref] = useContextProps(props, ref, IconListContext);
|
|
@@ -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___ElEYk", "hop-CheckboxGroup--bordered": "CheckboxGroup-module__hop-CheckboxGroup--bordered___oEe87", "hop-CheckboxGroup--sm": "CheckboxGroup-module__hop-CheckboxGroup--sm___ETF-H", "hop-CheckboxGroup--md": "CheckboxGroup-module__hop-CheckboxGroup--md___5bM6E", "hop-CheckboxGroup__label": "CheckboxGroup-module__hop-CheckboxGroup__label___zvdEY", "hop-CheckboxGroup__list": "CheckboxGroup-module__hop-CheckboxGroup__list___-cq2A", "hop-CheckboxGroup__checkbox": "CheckboxGroup-module__hop-CheckboxGroup__checkbox___GhnAo", "hop-CheckboxGroup__error-message": "CheckboxGroup-module__hop-CheckboxGroup__error-message___wZAUv", "hop-CheckboxGroup__helper-message": "CheckboxGroup-module__hop-CheckboxGroup__helper-message___qN21A" };
|
|
18
18
|
var GlobalCheckboxGroupCssSelector = "hop-CheckboxGroup";
|
|
19
19
|
function CheckboxGroup(props, ref) {
|
|
20
20
|
var _a, _b;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { RadioContext } from './chunk-FU5CCPLP.js';
|
|
2
|
-
import { composeClassnameRenderProps } from './chunk-65JPI4FL.js';
|
|
3
2
|
import { isTextOnlyChildren } from './chunk-ZWU6DRRZ.js';
|
|
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-XT2MZWEV.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, Radio as Radio$1 } from 'react-ari
|
|
|
14
14
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
15
15
|
|
|
16
16
|
// css-module:./Radio.module.css#css-module
|
|
17
|
-
var Radio_module_default = { "hop-Radio": "Radio-module__hop-
|
|
17
|
+
var Radio_module_default = { "hop-Radio": "Radio-module__hop-Radio___2E1Ba", "hop-Radio--focused": "Radio-module__hop-Radio--focused___uZjvZ", "hop-Radio--hovered": "Radio-module__hop-Radio--hovered___I3nXi", "hop-Radio--pressed": "Radio-module__hop-Radio--pressed___g-XN4", "hop-Radio--sm": "Radio-module__hop-Radio--sm___fb-Zv", "hop-Radio--md": "Radio-module__hop-Radio--md___WvIhk", "hop-Radio__icon": "Radio-module__hop-Radio__icon___f49M7", "hop-Radio__icon-list": "Radio-module__hop-Radio__icon-list___65C4k", "hop-Radio__box": "Radio-module__hop-Radio__box___HLxF3", "hop-Radio__bullet": "Radio-module__hop-Radio__bullet___SgKK1", "hop-Radio__text": "Radio-module__hop-Radio__text___uZHkI" };
|
|
18
18
|
var GlobalRadioCssSelector = "hop-Radio";
|
|
19
19
|
function Radio(props, ref) {
|
|
20
20
|
var _a;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AvatarContext } from './chunk-AES7QBQE.js';
|
|
2
|
-
import { _RichIconAvatarImage } from './chunk-
|
|
2
|
+
import { _RichIconAvatarImage } from './chunk-M3K4IYX6.js';
|
|
3
3
|
import { AnonymousRichIcon } from '@hopper-ui/icons';
|
|
4
4
|
import { useStyledSystem, useResponsiveValue } from '@hopper-ui/styled-system';
|
|
5
5
|
import clsx from 'clsx';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HelperMessageContext } from './chunk-HZKFQ33E.js';
|
|
2
|
-
import { _Text } from './chunk-
|
|
2
|
+
import { _Text } from './chunk-XT2MZWEV.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___KQaJ4", "hop-HelperMessage__icon": "HelperMessage-module__hop-HelperMessage__icon___1a1jj" };
|
|
13
13
|
var GlobalHelperMessageCssSelector = "hop-HelperMessage";
|
|
14
14
|
function HelperMessage(props, ref) {
|
|
15
15
|
const validation = useContext(FieldErrorContext);
|
|
@@ -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___sG-Yd", "hop-RichIconAvatarImage--xs": "RichIconAvatarImage-module__hop-RichIconAvatarImage--xs___h-WpU", "hop-RichIconAvatarImage--sm": "RichIconAvatarImage-module__hop-RichIconAvatarImage--sm___QasW-", "hop-RichIconAvatarImage--md": "RichIconAvatarImage-module__hop-RichIconAvatarImage--md___QjQ3I", "hop-RichIconAvatarImage--lg": "RichIconAvatarImage-module__hop-RichIconAvatarImage--lg___PrX57", "hop-RichIconAvatarImage--xl": "RichIconAvatarImage-module__hop-RichIconAvatarImage--xl___fZOdF", "hop-RichIconAvatarImage--2xl": "RichIconAvatarImage-module__hop-RichIconAvatarImage--2xl___E-1I9", "hop-RichIconAvatarImage__icon": "RichIconAvatarImage-module__hop-RichIconAvatarImage__icon___JDA4Q" };
|
|
13
13
|
var GlobalRichIconAvatarImageCssSelector = "hop-RichIconAvatarImage";
|
|
14
14
|
var AvatarToIconSizeAdapter = {
|
|
15
15
|
xs: "md",
|
|
@@ -11,7 +11,7 @@ import { useContextProps } from 'react-aria-components';
|
|
|
11
11
|
import { jsx } from 'react/jsx-runtime';
|
|
12
12
|
|
|
13
13
|
// css-module:./SwitchField.module.css#css-module
|
|
14
|
-
var SwitchField_module_default = { "hop-SwitchField": "SwitchField-module__hop-
|
|
14
|
+
var SwitchField_module_default = { "hop-SwitchField": "SwitchField-module__hop-SwitchField___7GWRP", "hop-SwitchField--sm": "SwitchField-module__hop-SwitchField--sm___kZQJI", "hop-SwitchField--md": "SwitchField-module__hop-SwitchField--md___M0ask", "hop-SwitchField__description": "SwitchField-module__hop-SwitchField__description___7fE6W", "hop-SwitchField__switch": "SwitchField-module__hop-SwitchField__switch___5McYm" };
|
|
15
15
|
var GlobalSwitchFieldCssSelector = "hop-SwitchField";
|
|
16
16
|
var SwitchToDescriptionSizeAdapter = {
|
|
17
17
|
sm: "xs",
|
|
@@ -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___uuirX", "hop-RadioField--sm": "RadioField-module__hop-RadioField--sm___1lfkD", "hop-RadioField--md": "RadioField-module__hop-RadioField--md___ytruf", "hop-RadioField__description": "RadioField-module__hop-RadioField__description___waqNk", "hop-RadioField__radio": "RadioField-module__hop-RadioField__radio___ySRK1" };
|
|
16
16
|
var GlobalRadioFieldCssSelector = "hop-RadioField";
|
|
17
17
|
var RadioToDescriptionSizeAdapter = {
|
|
18
18
|
sm: "xs",
|
|
@@ -7,7 +7,7 @@ import { useContextProps, Heading as Heading$1 } from 'react-aria-components';
|
|
|
7
7
|
import { jsx } from 'react/jsx-runtime';
|
|
8
8
|
|
|
9
9
|
// css-module:./Heading.module.css#css-module
|
|
10
|
-
var Heading_module_default = { "hop-Heading": "Heading-module__hop-
|
|
10
|
+
var Heading_module_default = { "hop-Heading": "Heading-module__hop-Heading___FVhfN", "hop-Heading--xs": "Heading-module__hop-Heading--xs___t30s-", "hop-Heading--sm": "Heading-module__hop-Heading--sm___R6y6i", "hop-Heading--md": "Heading-module__hop-Heading--md___d6d9m", "hop-Heading--lg": "Heading-module__hop-Heading--lg___yqjzy", "hop-Heading--xl": "Heading-module__hop-Heading--xl___U0Gfz", "hop-Heading--2xl": "Heading-module__hop-Heading--2xl___B7lym", "hop-Heading--3xl": "Heading-module__hop-Heading--3xl___P65x-" };
|
|
11
11
|
var GlobalHeadingCssSelector = "hop-Heading";
|
|
12
12
|
function Heading(props, ref) {
|
|
13
13
|
[props, ref] = useContextProps(props, ref, HeadingContext);
|
|
@@ -4,12 +4,12 @@ import { SlotProvider } from './chunk-M36KANKC.js';
|
|
|
4
4
|
import { cssModule } from './chunk-KVDXQMWI.js';
|
|
5
5
|
import { useStyledSystem, useResponsiveValue } from '@hopper-ui/styled-system';
|
|
6
6
|
import { mergeRefs } from '@react-aria/utils';
|
|
7
|
-
import { forwardRef, useRef, useCallback } from 'react';
|
|
8
|
-
import { useContextProps, useSlottedContext, InputContext, TextAreaContext, composeRenderProps, Group } from 'react-aria-components';
|
|
7
|
+
import { forwardRef, useRef, useContext, useCallback } from 'react';
|
|
8
|
+
import { useContextProps, useSlottedContext, InputContext, TextAreaContext, FieldErrorContext, composeRenderProps, Group } from 'react-aria-components';
|
|
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___PiLz0", "hop-InputGroup--fluid": "InputGroup-module__hop-InputGroup--fluid___Cp15-", "hop-InputGroup--sm": "InputGroup-module__hop-InputGroup--sm___ZeMr9", "hop-InputGroup__input": "InputGroup-module__hop-InputGroup__input___xLgn9", "hop-InputGroup__textarea": "InputGroup-module__hop-InputGroup__textarea___6Go7N" };
|
|
13
13
|
var GlobalInputGroupCssSelector = "hop-InputGroup";
|
|
14
14
|
function InputGroup(props, ref) {
|
|
15
15
|
var _a, _b;
|
|
@@ -27,6 +27,7 @@ function InputGroup(props, ref) {
|
|
|
27
27
|
children,
|
|
28
28
|
size: sizeProp,
|
|
29
29
|
isFluid: isFluidProp,
|
|
30
|
+
isInvalid,
|
|
30
31
|
inputClassName,
|
|
31
32
|
inputType = "text",
|
|
32
33
|
onMouseDown,
|
|
@@ -45,6 +46,7 @@ function InputGroup(props, ref) {
|
|
|
45
46
|
),
|
|
46
47
|
stylingProps.className
|
|
47
48
|
);
|
|
49
|
+
const validation = useContext(FieldErrorContext);
|
|
48
50
|
const style = composeRenderProps(styleProp, (prev) => {
|
|
49
51
|
return {
|
|
50
52
|
...stylingProps.style,
|
|
@@ -77,6 +79,7 @@ function InputGroup(props, ref) {
|
|
|
77
79
|
Group,
|
|
78
80
|
{
|
|
79
81
|
...otherProps,
|
|
82
|
+
isInvalid: (validation == null ? void 0 : validation.isInvalid) || isInvalid,
|
|
80
83
|
onMouseDown: handleMouseDown,
|
|
81
84
|
ref,
|
|
82
85
|
className: classNames,
|
|
@@ -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___pg9lD", "hop-ButtonGroup--horizontal": "ButtonGroup-module__hop-ButtonGroup--horizontal___IeYfB", "hop-ButtonGroup--vertical": "ButtonGroup-module__hop-ButtonGroup--vertical___20OwE", "hop-ButtonGroup--start": "ButtonGroup-module__hop-ButtonGroup--start___8cAOO", "hop-ButtonGroup--center": "ButtonGroup-module__hop-ButtonGroup--center___bXsRU", "hop-ButtonGroup--end": "ButtonGroup-module__hop-ButtonGroup--end___QRAcI", "hop-ButtonGroup--wrap": "ButtonGroup-module__hop-ButtonGroup--wrap___72Z7i", "hop-ButtonGroup--fluid": "ButtonGroup-module__hop-ButtonGroup--fluid___cVwde" };
|
|
14
14
|
var GlobalButtonGroupCssSelector = "hop-ButtonGroup";
|
|
15
15
|
function ButtonGroup(props, ref) {
|
|
16
16
|
var _a, _b, _c, _d, _e;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { LabelContext } from './chunk-QCA3ZR56.js';
|
|
2
|
+
import { useLocalizedString } from './chunk-F4H76S4H.js';
|
|
3
|
+
import { cssModule } from './chunk-KVDXQMWI.js';
|
|
4
|
+
import { useStyledSystem } from '@hopper-ui/styled-system';
|
|
5
|
+
import clsx from 'clsx';
|
|
6
|
+
import { forwardRef } from 'react';
|
|
7
|
+
import { useContextProps, Label as Label$1 } from 'react-aria-components';
|
|
8
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
9
|
+
|
|
10
|
+
// css-module:./Label.module.css#css-module
|
|
11
|
+
var Label_module_default = { "hop-Label": "Label-module__hop-Label___L4zrw", "hop-Label__indicator": "Label-module__hop-Label__indicator___mWy1n" };
|
|
12
|
+
var GlobalLabelCssSelector = "hop-Label";
|
|
13
|
+
function Label(props, ref) {
|
|
14
|
+
[props, ref] = useContextProps(props, ref, LabelContext);
|
|
15
|
+
const { stylingProps, ...ownProps } = useStyledSystem(props);
|
|
16
|
+
const {
|
|
17
|
+
className,
|
|
18
|
+
children,
|
|
19
|
+
style,
|
|
20
|
+
isRequired,
|
|
21
|
+
necessityIndicator = isRequired != null ? "icon" : null,
|
|
22
|
+
...otherProps
|
|
23
|
+
} = ownProps;
|
|
24
|
+
const stringFormatter = useLocalizedString();
|
|
25
|
+
const classNames = clsx(
|
|
26
|
+
className,
|
|
27
|
+
GlobalLabelCssSelector,
|
|
28
|
+
cssModule(
|
|
29
|
+
Label_module_default,
|
|
30
|
+
"hop-Label"
|
|
31
|
+
),
|
|
32
|
+
stylingProps.className
|
|
33
|
+
);
|
|
34
|
+
const mergedStyles = {
|
|
35
|
+
...stylingProps.style,
|
|
36
|
+
...style
|
|
37
|
+
};
|
|
38
|
+
const necessityLabel = isRequired ? stringFormatter.format("Label.necessityLabel.required") : stringFormatter.format("Label.necessityLabel.optional");
|
|
39
|
+
const requiredIndicator = /* @__PURE__ */ jsx(
|
|
40
|
+
"span",
|
|
41
|
+
{
|
|
42
|
+
"aria-hidden": "true",
|
|
43
|
+
"aria-label": necessityLabel,
|
|
44
|
+
className: Label_module_default["hop-Label__indicator"],
|
|
45
|
+
children: "*"
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
return /* @__PURE__ */ jsxs(
|
|
49
|
+
Label$1,
|
|
50
|
+
{
|
|
51
|
+
...otherProps,
|
|
52
|
+
ref,
|
|
53
|
+
className: classNames,
|
|
54
|
+
style: mergedStyles,
|
|
55
|
+
children: [
|
|
56
|
+
children,
|
|
57
|
+
necessityIndicator === "label" && /* @__PURE__ */ jsxs("span", { children: [
|
|
58
|
+
" (",
|
|
59
|
+
necessityLabel,
|
|
60
|
+
")"
|
|
61
|
+
] }),
|
|
62
|
+
necessityIndicator === "icon" && isRequired && requiredIndicator
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
var _Label = forwardRef(Label);
|
|
68
|
+
_Label.displayName = "Label";
|
|
69
|
+
|
|
70
|
+
export { GlobalLabelCssSelector, _Label };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SearchFieldContext } from './chunk-3NKF5TPD.js';
|
|
2
|
-
import { _InputGroup } from './chunk-
|
|
3
|
-
import { _ClearButton } from './chunk-
|
|
2
|
+
import { _InputGroup } from './chunk-Q63YLWI6.js';
|
|
3
|
+
import { _ClearButton } from './chunk-2XO5CZBO.js';
|
|
4
4
|
import { LabelContext } from './chunk-QCA3ZR56.js';
|
|
5
5
|
import { composeClassnameRenderProps } from './chunk-65JPI4FL.js';
|
|
6
6
|
import { HelperMessageContext } from './chunk-HZKFQ33E.js';
|
|
@@ -17,7 +17,7 @@ import { useContextProps, composeRenderProps, Input, SearchField as SearchField$
|
|
|
17
17
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
18
18
|
|
|
19
19
|
// css-module:./SearchField.module.css#css-module
|
|
20
|
-
var SearchField_module_default = { "hop-SearchField": "SearchField-module__hop-
|
|
20
|
+
var SearchField_module_default = { "hop-SearchField": "SearchField-module__hop-SearchField___eeVrI", "hop-SearchField--fluid": "SearchField-module__hop-SearchField--fluid___tJI3Z", "hop-SearchField__Label": "SearchField-module__hop-SearchField__Label___FHalK", "hop-SearchField__prefix": "SearchField-module__hop-SearchField__prefix___051pF", "hop-SearchField__InputGroup": "SearchField-module__hop-SearchField__InputGroup___4Vkaq", "hop-SearchField--clearable": "SearchField-module__hop-SearchField--clearable___yge5P", "hop-SearchField__ErrorMessage": "SearchField-module__hop-SearchField__ErrorMessage___TgcwI", "hop-SearchField__HelperMessage": "SearchField-module__hop-SearchField__HelperMessage___ACElD", "hop-SearchField__ClearButton": "SearchField-module__hop-SearchField__ClearButton___zKqjG" };
|
|
21
21
|
var GlobalSearchFieldCssSelector = "hop-SearchField";
|
|
22
22
|
function SearchField(props, ref) {
|
|
23
23
|
var _a;
|
|
@@ -38,6 +38,7 @@ function SearchField(props, ref) {
|
|
|
38
38
|
icon = /* @__PURE__ */ jsx(SearchIcon, {}),
|
|
39
39
|
isDisabled,
|
|
40
40
|
isInvalid,
|
|
41
|
+
isRequired,
|
|
41
42
|
...otherProps
|
|
42
43
|
} = ownProps;
|
|
43
44
|
const inputRef = useObjectRef(mergeRefs(userProvidedInputRef, props.inputRef !== void 0 ? props.inputRef : null));
|
|
@@ -89,7 +90,7 @@ function SearchField(props, ref) {
|
|
|
89
90
|
SlotProvider,
|
|
90
91
|
{
|
|
91
92
|
values: [
|
|
92
|
-
[LabelContext, { className: SearchField_module_default["hop-SearchField__Label"] }],
|
|
93
|
+
[LabelContext, { className: SearchField_module_default["hop-SearchField__Label"], isRequired }],
|
|
93
94
|
[HelperMessageContext, { className: SearchField_module_default["hop-SearchField__HelperMessage"] }],
|
|
94
95
|
[ErrorMessageContext, { className: SearchField_module_default["hop-SearchField__ErrorMessage"] }]
|
|
95
96
|
],
|
|
@@ -107,6 +108,7 @@ function SearchField(props, ref) {
|
|
|
107
108
|
className: classNames,
|
|
108
109
|
isDisabled,
|
|
109
110
|
isInvalid,
|
|
111
|
+
isRequired,
|
|
110
112
|
...otherProps,
|
|
111
113
|
children: childrenMarkup
|
|
112
114
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { LinkContext } from './chunk-4VVNSXIB.js';
|
|
2
|
-
import { composeClassnameRenderProps } from './chunk-65JPI4FL.js';
|
|
3
2
|
import { isTextOnlyChildren } from './chunk-ZWU6DRRZ.js';
|
|
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-XT2MZWEV.js';
|
|
6
6
|
import { TextContext } from './chunk-X6SER3TZ.js';
|
|
7
7
|
import { SlotProvider } from './chunk-M36KANKC.js';
|
|
8
8
|
import { cssModule } from './chunk-KVDXQMWI.js';
|
|
@@ -13,7 +13,7 @@ import { useContextProps, composeRenderProps, DEFAULT_SLOT, Link as Link$1 } fro
|
|
|
13
13
|
import { jsx } from 'react/jsx-runtime';
|
|
14
14
|
|
|
15
15
|
// css-module:./Link.module.css#css-module
|
|
16
|
-
var Link_module_default = { "hop-Link": "Link-module__hop-
|
|
16
|
+
var Link_module_default = { "hop-Link": "Link-module__hop-Link___7j4hs", "hop-Link--quiet": "Link-module__hop-Link--quiet___qnop0", "hop-Link--primary": "Link-module__hop-Link--primary___rpo9E", "hop-Link--secondary": "Link-module__hop-Link--secondary___SMBNe", "hop-Link__icon": "Link-module__hop-Link__icon___vyHs-", "hop-Link__icon-list": "Link-module__hop-Link__icon-list___6SUHC", "hop-Link__text": "Link-module__hop-Link__text___y7rFF", "hop-Link__start-icon": "Link-module__hop-Link__start-icon___tiWhC", "hop-Link__start-icon-list": "Link-module__hop-Link__start-icon-list___kbqc7" };
|
|
17
17
|
var GlobalLinkCssSelector = "hop-Link";
|
|
18
18
|
var LinkToIconSizeAdapter = {
|
|
19
19
|
inherit: void 0,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useRenderProps } from './chunk-NH3IVMXB.js';
|
|
2
2
|
import { ErrorMessageContext } from './chunk-FAE27DLF.js';
|
|
3
|
-
import { _Text } from './chunk-
|
|
3
|
+
import { _Text } from './chunk-XT2MZWEV.js';
|
|
4
4
|
import { cssModule } from './chunk-KVDXQMWI.js';
|
|
5
5
|
import { WarningIcon } from '@hopper-ui/icons';
|
|
6
6
|
import { useStyledSystem } from '@hopper-ui/styled-system';
|
|
@@ -10,7 +10,7 @@ import { FieldErrorContext, useContextProps } from 'react-aria-components';
|
|
|
10
10
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
11
11
|
|
|
12
12
|
// css-module:./ErrorMessage.module.css#css-module
|
|
13
|
-
var ErrorMessage_module_default = { "hop-ErrorMessage": "ErrorMessage-module__hop-
|
|
13
|
+
var ErrorMessage_module_default = { "hop-ErrorMessage": "ErrorMessage-module__hop-ErrorMessage___6qmlS", "hop-ErrorMessage__icon": "ErrorMessage-module__hop-ErrorMessage__icon___m4Mae" };
|
|
14
14
|
var GlobalErrorMessageCssSelector = "hop-ErrorMessage";
|
|
15
15
|
function ErrorMessage(props, ref) {
|
|
16
16
|
const validation = useContext(FieldErrorContext);
|