@hopper-ui/components 1.3.12 → 1.3.14
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 +37 -37
- package/dist/Avatar/src/AnonymousAvatar.js +2 -2
- package/dist/Avatar/src/Avatar.css +55 -55
- package/dist/Avatar/src/Avatar.js +3 -3
- package/dist/Avatar/src/DeletedAvatar.css +37 -37
- package/dist/Avatar/src/DeletedAvatar.js +2 -2
- package/dist/Avatar/src/RichIconAvatarImage.css +37 -37
- package/dist/Avatar/src/RichIconAvatarImage.js +1 -1
- package/dist/Avatar/src/index.css +55 -55
- package/dist/Avatar/src/index.js +5 -5
- package/dist/Badge/src/Badge.css +44 -44
- package/dist/Badge/src/Badge.js +2 -2
- package/dist/Badge/src/FloatingBadge.css +37 -37
- package/dist/Badge/src/FloatingBadge.js +1 -1
- package/dist/Badge/src/index.css +54 -54
- package/dist/Badge/src/index.js +3 -3
- package/dist/ComboBox/src/ComboBox.css +715 -715
- package/dist/ComboBox/src/ComboBox.d.ts +9 -0
- package/dist/ComboBox/src/ComboBox.js +50 -50
- package/dist/ComboBox/src/ComboBoxContext.d.ts +6 -1
- package/dist/ComboBox/src/index.css +715 -715
- package/dist/ComboBox/src/index.d.ts +6 -1
- package/dist/ComboBox/src/index.js +50 -50
- package/dist/Divider/src/Divider.css +29 -29
- package/dist/Divider/src/Divider.js +1 -1
- package/dist/Divider/src/index.css +29 -29
- package/dist/Divider/src/index.js +1 -1
- package/dist/ErrorMessage/src/ErrorMessage.css +29 -29
- package/dist/ErrorMessage/src/ErrorMessage.js +2 -2
- package/dist/ErrorMessage/src/index.css +29 -29
- package/dist/ErrorMessage/src/index.js +2 -2
- package/dist/Form/src/Form.css +715 -715
- package/dist/Form/src/Form.js +50 -50
- package/dist/Form/src/index.css +715 -715
- package/dist/Form/src/index.js +50 -50
- package/dist/HelperMessage/src/HelperMessage.css +29 -29
- package/dist/HelperMessage/src/HelperMessage.js +2 -2
- package/dist/HelperMessage/src/index.css +29 -29
- package/dist/HelperMessage/src/index.js +2 -2
- package/dist/IconList/src/IconList.css +28 -28
- package/dist/IconList/src/IconList.js +1 -1
- package/dist/IconList/src/index.css +28 -28
- package/dist/IconList/src/index.js +1 -1
- package/dist/Link/src/Link.css +49 -49
- package/dist/Link/src/Link.js +11 -2
- package/dist/Link/src/index.css +49 -49
- package/dist/Link/src/index.js +11 -2
- package/dist/ListBox/src/ListBox.css +276 -276
- package/dist/ListBox/src/ListBox.d.ts +11 -1
- package/dist/ListBox/src/ListBox.js +15 -7
- package/dist/ListBox/src/ListBoxContext.d.ts +6 -0
- package/dist/ListBox/src/ListBoxItem.css +264 -264
- package/dist/ListBox/src/ListBoxItem.d.ts +21 -5
- package/dist/ListBox/src/ListBoxItem.js +14 -5
- package/dist/ListBox/src/ListBoxItemContext.d.ts +6 -0
- package/dist/ListBox/src/ListBoxItemSkeleton.css +34 -34
- package/dist/ListBox/src/ListBoxItemSkeleton.js +1 -1
- package/dist/ListBox/src/index.css +276 -276
- package/dist/ListBox/src/index.d.ts +6 -0
- package/dist/ListBox/src/index.js +15 -7
- package/dist/Select/src/Select.css +715 -715
- package/dist/Select/src/Select.d.ts +9 -0
- package/dist/Select/src/Select.js +50 -50
- package/dist/Select/src/SelectContext.d.ts +6 -1
- package/dist/Select/src/SelectValue.css +61 -61
- package/dist/Select/src/SelectValue.d.ts +6 -1
- package/dist/Select/src/SelectValue.js +5 -5
- package/dist/Select/src/index.css +715 -715
- package/dist/Select/src/index.d.ts +6 -1
- package/dist/Select/src/index.js +50 -50
- package/dist/Spinner/src/Spinner.css +37 -37
- package/dist/Spinner/src/Spinner.js +2 -2
- package/dist/Spinner/src/index.css +37 -37
- package/dist/Spinner/src/index.js +2 -2
- package/dist/buttons/src/Button.css +112 -112
- package/dist/buttons/src/Button.d.ts +4 -0
- package/dist/buttons/src/Button.js +12 -4
- package/dist/buttons/src/ButtonContext.d.ts +2 -0
- package/dist/buttons/src/ButtonGroup.css +38 -38
- package/dist/buttons/src/ButtonGroup.js +1 -1
- package/dist/buttons/src/ClearButton.css +98 -98
- package/dist/buttons/src/ClearButton.js +2 -2
- package/dist/buttons/src/EmbeddedButton.css +98 -98
- package/dist/buttons/src/EmbeddedButton.js +1 -1
- package/dist/buttons/src/index.css +194 -194
- package/dist/buttons/src/index.d.ts +2 -0
- package/dist/buttons/src/index.js +15 -7
- package/dist/checkbox/src/Checkbox.css +46 -46
- package/dist/checkbox/src/Checkbox.js +11 -2
- package/dist/checkbox/src/CheckboxField.css +33 -33
- package/dist/checkbox/src/CheckboxField.js +1 -1
- package/dist/checkbox/src/CheckboxGroup.css +98 -98
- package/dist/checkbox/src/CheckboxGroup.js +2 -2
- package/dist/checkbox/src/DecorativeCheckbox.css +54 -54
- package/dist/checkbox/src/DecorativeCheckbox.js +11 -2
- package/dist/checkbox/src/index.css +98 -98
- package/dist/checkbox/src/index.js +14 -6
- package/dist/{chunk-O2QKRLQW.js → chunk-26L2JI5Z.js} +2 -2
- package/dist/{chunk-K2OUU76F.js → chunk-2D2QW2TN.js} +3 -3
- package/dist/{chunk-2GDRIOUE.js → chunk-4DLUFECD.js} +1 -1
- package/dist/{chunk-6ZAKQWYM.js → chunk-4W7GPP6I.js} +2 -2
- package/dist/{chunk-2T2P33DB.js → chunk-5C2HFY65.js} +21 -19
- package/dist/{chunk-IZ273MDI.js → chunk-5TL2U37O.js} +2 -2
- package/dist/{chunk-42W5GW3R.js → chunk-6DYXXDY4.js} +13 -5
- package/dist/{chunk-2FQE5VSB.js → chunk-6XBPJOFU.js} +1 -1
- package/dist/{chunk-2XTLP4NP.js → chunk-A265GCLA.js} +2 -2
- package/dist/{chunk-AG67ICXW.js → chunk-A4UHNZBX.js} +1 -1
- package/dist/{chunk-AZBXRRMZ.js → chunk-AA6XHAZJ.js} +13 -5
- package/dist/{chunk-3MA53PNO.js → chunk-BA265NQT.js} +17 -12
- package/dist/{chunk-RZR3PQB7.js → chunk-BWMRLYXD.js} +23 -10
- package/dist/{chunk-2Q7KTNJK.js → chunk-CUPCOAXZ.js} +1 -1
- package/dist/{chunk-P244CSQK.js → chunk-DFKPVOQ4.js} +1 -1
- package/dist/{chunk-FJL3ZS2H.js → chunk-DN63JAPT.js} +2 -2
- package/dist/{chunk-WYBSUDRI.js → chunk-DWVXSSVC.js} +3 -7
- package/dist/{chunk-6GEVQCBK.js → chunk-F6P4WIKS.js} +3 -7
- package/dist/{chunk-24KHRRRV.js → chunk-FRVE3N27.js} +1 -1
- package/dist/{chunk-LTCSPHF7.js → chunk-FXHZXIPR.js} +3 -7
- package/dist/{chunk-3H4QDM4L.js → chunk-GUHMGBDJ.js} +1 -1
- package/dist/{chunk-5NGAA35D.js → chunk-I3B3G6N4.js} +1 -1
- package/dist/{chunk-M5T2Y2RB.js → chunk-JB3N2PYV.js} +1 -1
- package/dist/{chunk-33FEE3VD.js → chunk-JHP7LA2B.js} +1 -1
- package/dist/{chunk-TVRQWVE2.js → chunk-JZAWRJFA.js} +1 -1
- package/dist/{chunk-RUASAI7F.js → chunk-K2DSUPKO.js} +1 -1
- package/dist/{chunk-LTN5Q7MF.js → chunk-KFXDFFLE.js} +2 -2
- package/dist/{chunk-F3Y5D5LH.js → chunk-LFFRDNDM.js} +3 -7
- package/dist/{chunk-PL5Q7GF2.js → chunk-MDIVABWE.js} +1 -1
- package/dist/{chunk-EY4ZTKS4.js → chunk-MLLUZ55T.js} +1 -1
- package/dist/{chunk-WH4BAEX4.js → chunk-P2OSN32C.js} +2 -2
- package/dist/{chunk-FM77LXOA.js → chunk-PCOOOVLE.js} +3 -7
- package/dist/{chunk-W5TXSSFB.js → chunk-PQR2DVBK.js} +1 -1
- package/dist/{chunk-6LJPMEHX.js → chunk-PWJCO32L.js} +1 -1
- package/dist/{chunk-CPRGKGB6.js → chunk-R2EN2OFJ.js} +2 -2
- package/dist/{chunk-BSEAFZPE.js → chunk-RUZ3J43X.js} +1 -1
- package/dist/{chunk-PHMYUFQP.js → chunk-RXMCGKWB.js} +10 -9
- package/dist/{chunk-JSDCGGLX.js → chunk-SG2POHLX.js} +25 -26
- package/dist/{chunk-OARY66QV.js → chunk-TH46DMKQ.js} +3 -7
- package/dist/{chunk-DIRREIZN.js → chunk-USP2ITRL.js} +1 -1
- package/dist/{chunk-TYCTG7I2.js → chunk-VVVDQWQ3.js} +12 -7
- package/dist/{chunk-EZTWUACB.js → chunk-X57PKGPX.js} +2 -2
- package/dist/{chunk-ZQARUJYZ.js → chunk-XGS34BBU.js} +17 -6
- package/dist/{chunk-2XOZMJQO.js → chunk-YYFZDZXJ.js} +1 -1
- package/dist/{chunk-DUDTPN7M.js → chunk-ZPLEEUPC.js} +21 -12
- package/dist/index.css +715 -715
- package/dist/index.js +50 -50
- package/dist/inputs/src/InputGroup.css +209 -209
- package/dist/inputs/src/InputGroup.js +1 -1
- package/dist/inputs/src/NumberField.css +231 -231
- package/dist/inputs/src/NumberField.d.ts +5 -0
- package/dist/inputs/src/NumberField.js +8 -7
- package/dist/inputs/src/NumberFieldContext.d.ts +1 -0
- package/dist/inputs/src/PasswordField.css +219 -219
- package/dist/inputs/src/PasswordField.d.ts +15 -1
- package/dist/inputs/src/PasswordField.js +7 -7
- package/dist/inputs/src/PasswordFieldContext.d.ts +2 -0
- package/dist/inputs/src/RemainingCharacterCount.css +30 -30
- package/dist/inputs/src/RemainingCharacterCount.js +5 -5
- package/dist/inputs/src/SearchField.css +225 -225
- package/dist/inputs/src/SearchField.d.ts +11 -0
- package/dist/inputs/src/SearchField.js +8 -8
- package/dist/inputs/src/SearchFieldContext.d.ts +3 -0
- package/dist/inputs/src/TextArea.css +226 -226
- package/dist/inputs/src/TextArea.d.ts +14 -4
- package/dist/inputs/src/TextArea.js +7 -7
- package/dist/inputs/src/TextAreaContext.d.ts +4 -0
- package/dist/inputs/src/TextField.css +223 -223
- package/dist/inputs/src/TextField.d.ts +14 -4
- package/dist/inputs/src/TextField.js +11 -10
- package/dist/inputs/src/TextFieldContext.d.ts +4 -0
- package/dist/inputs/src/index.css +269 -269
- package/dist/inputs/src/index.d.ts +2 -0
- package/dist/inputs/src/index.js +15 -14
- package/dist/overlays/Popover/src/Popover.css +715 -715
- package/dist/overlays/Popover/src/Popover.js +50 -50
- package/dist/overlays/Popover/src/index.css +715 -715
- package/dist/overlays/Popover/src/index.js +50 -50
- package/dist/radio/src/DecorativeRadio.css +54 -54
- package/dist/radio/src/DecorativeRadio.js +11 -2
- package/dist/radio/src/Radio.css +46 -46
- package/dist/radio/src/Radio.js +11 -2
- package/dist/radio/src/RadioField.css +33 -33
- package/dist/radio/src/RadioField.js +1 -1
- package/dist/radio/src/RadioGroup.css +98 -98
- package/dist/radio/src/RadioGroup.js +2 -2
- package/dist/radio/src/index.css +98 -98
- package/dist/radio/src/index.js +14 -6
- package/dist/switch/src/Switch.css +43 -43
- package/dist/switch/src/Switch.js +11 -2
- package/dist/switch/src/SwitchField.css +33 -33
- package/dist/switch/src/SwitchField.js +1 -1
- package/dist/switch/src/index.css +49 -49
- package/dist/switch/src/index.js +12 -3
- package/dist/tag/src/Tag.css +337 -337
- package/dist/tag/src/Tag.d.ts +13 -0
- package/dist/tag/src/Tag.js +14 -6
- package/dist/tag/src/TagContext.d.ts +5 -0
- package/dist/tag/src/TagGroup.css +37 -37
- package/dist/tag/src/TagGroup.js +1 -1
- package/dist/tag/src/TagList.css +27 -27
- package/dist/tag/src/index.css +347 -347
- package/dist/tag/src/index.d.ts +5 -0
- package/dist/tag/src/index.js +15 -8
- package/dist/typography/Heading/src/Heading.css +27 -27
- package/dist/typography/Heading/src/Heading.js +1 -1
- package/dist/typography/Heading/src/index.css +27 -27
- package/dist/typography/Heading/src/index.js +1 -1
- package/dist/typography/Label/src/Label.css +27 -27
- package/dist/typography/Label/src/Label.js +1 -1
- package/dist/typography/Label/src/index.css +27 -27
- package/dist/typography/Label/src/index.js +1 -1
- package/dist/typography/OverlineText/src/OverlineText.css +27 -27
- package/dist/typography/OverlineText/src/OverlineText.js +1 -1
- package/dist/typography/OverlineText/src/index.css +27 -27
- package/dist/typography/OverlineText/src/index.js +1 -1
- package/dist/typography/Text/src/Text.css +27 -27
- package/dist/typography/Text/src/Text.js +1 -1
- package/dist/typography/Text/src/index.css +27 -27
- package/dist/typography/Text/src/index.js +1 -1
- package/dist/utils/src/EnsureTextWrapper.css +27 -27
- package/dist/utils/src/EnsureTextWrapper.js +6 -6
- package/dist/utils/src/index.css +27 -27
- package/dist/utils/src/index.js +7 -7
- package/package.json +1 -1
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { _DecorativeRadio } from './chunk-
|
|
2
|
-
import { _DecorativeCheckbox } from './chunk-
|
|
1
|
+
import { _DecorativeRadio } from './chunk-FXHZXIPR.js';
|
|
2
|
+
import { _DecorativeCheckbox } from './chunk-LFFRDNDM.js';
|
|
3
3
|
import { ListBoxItemContext } from './chunk-Y2POLIXK.js';
|
|
4
|
-
import { _ListBoxItemSkeleton } from './chunk-
|
|
5
|
-
import {
|
|
4
|
+
import { _ListBoxItemSkeleton } from './chunk-K2DSUPKO.js';
|
|
5
|
+
import { EnsureTextWrapper } from './chunk-P2OSN32C.js';
|
|
6
6
|
import { IconListContext } from './chunk-DHVVYSLB.js';
|
|
7
7
|
import { BadgeContext } from './chunk-CQDLZ42T.js';
|
|
8
|
-
import { _Text } from './chunk-EY4ZTKS4.js';
|
|
9
8
|
import { TextContext } from './chunk-X6SER3TZ.js';
|
|
10
9
|
import { AvatarContext } from './chunk-AES7QBQE.js';
|
|
11
10
|
import { composeClassnameRenderProps } from './chunk-65JPI4FL.js';
|
|
@@ -13,12 +12,13 @@ import { SlotProvider } from './chunk-M36KANKC.js';
|
|
|
13
12
|
import { cssModule } from './chunk-KVDXQMWI.js';
|
|
14
13
|
import { CheckmarkIcon, IconContext } from '@hopper-ui/icons';
|
|
15
14
|
import { useStyledSystem, useResponsiveValue } from '@hopper-ui/styled-system';
|
|
15
|
+
import clsx from 'clsx';
|
|
16
16
|
import { forwardRef, useContext, useState } from 'react';
|
|
17
17
|
import { useContextProps, composeRenderProps, ListBoxItem as ListBoxItem$1, ListStateContext, DEFAULT_SLOT } from 'react-aria-components';
|
|
18
18
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
19
19
|
|
|
20
20
|
// css-module:./ListBoxItem.module.css#css-module
|
|
21
|
-
var ListBoxItem_module_default = { "hop-ListBoxItem": "ListBoxItem-module__hop-
|
|
21
|
+
var ListBoxItem_module_default = { "hop-ListBoxItem": "ListBoxItem-module__hop-ListBoxItem___BA-7R", "hop-ListBoxItem--xs": "ListBoxItem-module__hop-ListBoxItem--xs___C7Icn", "hop-ListBoxItem--sm": "ListBoxItem-module__hop-ListBoxItem--sm___TCnwR", "hop-ListBoxItem--md": "ListBoxItem-module__hop-ListBoxItem--md___R05Ea", "hop-ListBoxItem--lg": "ListBoxItem-module__hop-ListBoxItem--lg___c9-GC", "hop-ListBoxItem__inner": "ListBoxItem-module__hop-ListBoxItem__inner___uFWb9", "hop-ListBoxItem__checkmark": "ListBoxItem-module__hop-ListBoxItem__checkmark___-5xEw", "hop-ListBoxItem__description": "ListBoxItem-module__hop-ListBoxItem__description___a-dI7", "hop-ListBoxItem__radio": "ListBoxItem-module__hop-ListBoxItem__radio___omKcd", "hop-ListBoxItem__checkbox": "ListBoxItem-module__hop-ListBoxItem__checkbox___TO3I1", "hop-ListBoxItem__avatar": "ListBoxItem-module__hop-ListBoxItem__avatar___97rej", "hop-ListBoxItem__icon-list": "ListBoxItem-module__hop-ListBoxItem__icon-list___YAyJ7", "hop-ListBoxItem__icon": "ListBoxItem-module__hop-ListBoxItem__icon___yygp0", "hop-ListBoxItem__label": "ListBoxItem-module__hop-ListBoxItem__label___zpmIx", "hop-ListBoxItem__end-icon-list": "ListBoxItem-module__hop-ListBoxItem__end-icon-list___LQiWw", "hop-ListBoxItem__end-icon": "ListBoxItem-module__hop-ListBoxItem__end-icon___1LSWJ", "hop-ListBoxItem__badge": "ListBoxItem-module__hop-ListBoxItem__badge___pdbFt" };
|
|
22
22
|
var GlobalListBoxItemCssSelector = "hop-ListBoxItem";
|
|
23
23
|
var ListBoxItemToIconSizeAdapter = {
|
|
24
24
|
xs: "sm",
|
|
@@ -50,7 +50,9 @@ function ListBoxItemInner(props) {
|
|
|
50
50
|
selectionIndicator,
|
|
51
51
|
isInvalid,
|
|
52
52
|
size,
|
|
53
|
-
children
|
|
53
|
+
children,
|
|
54
|
+
radioProps,
|
|
55
|
+
checkboxProps
|
|
54
56
|
} = props;
|
|
55
57
|
const isRadio = selectionIndicator === "input" && selectionMode === "single";
|
|
56
58
|
const isCheckbox = selectionIndicator === "input" && selectionMode === "multiple";
|
|
@@ -62,6 +64,10 @@ function ListBoxItemInner(props) {
|
|
|
62
64
|
setIsListHasSelectionEnd((prev) => isListHasSelection && !prev);
|
|
63
65
|
}
|
|
64
66
|
};
|
|
67
|
+
const { className: radioClassName, ...otherRadioProps } = radioProps || {};
|
|
68
|
+
const radioClassNames = clsx(ListBoxItem_module_default["hop-ListBoxItem__radio"], radioClassName);
|
|
69
|
+
const { className: checkboxClassName, ...otherCheckboxProps } = checkboxProps || {};
|
|
70
|
+
const checkboxClassNames = clsx(ListBoxItem_module_default["hop-ListBoxItem__checkbox"], checkboxClassName);
|
|
65
71
|
return /* @__PURE__ */ jsxs(
|
|
66
72
|
"div",
|
|
67
73
|
{
|
|
@@ -73,14 +79,15 @@ function ListBoxItemInner(props) {
|
|
|
73
79
|
isRadio && /* @__PURE__ */ jsx(
|
|
74
80
|
_DecorativeRadio,
|
|
75
81
|
{
|
|
76
|
-
className:
|
|
82
|
+
className: radioClassNames,
|
|
77
83
|
value: "radio",
|
|
78
84
|
size: "sm",
|
|
79
85
|
isDisabled,
|
|
80
86
|
isHovered: isHovered || isFocusVisible,
|
|
81
87
|
isPressed,
|
|
82
88
|
isSelected,
|
|
83
|
-
isInvalid
|
|
89
|
+
isInvalid,
|
|
90
|
+
...otherRadioProps
|
|
84
91
|
}
|
|
85
92
|
),
|
|
86
93
|
isCheckbox && /* @__PURE__ */ jsx(
|
|
@@ -88,12 +95,13 @@ function ListBoxItemInner(props) {
|
|
|
88
95
|
{
|
|
89
96
|
size: "sm",
|
|
90
97
|
value: "checkbox",
|
|
91
|
-
className:
|
|
98
|
+
className: checkboxClassNames,
|
|
92
99
|
isDisabled,
|
|
93
100
|
isHovered: isHovered || isFocusVisible,
|
|
94
101
|
isPressed,
|
|
95
102
|
isSelected,
|
|
96
|
-
isInvalid
|
|
103
|
+
isInvalid,
|
|
104
|
+
...otherCheckboxProps
|
|
97
105
|
}
|
|
98
106
|
),
|
|
99
107
|
isCheck && /* @__PURE__ */ jsx(CheckmarkIcon, { className: ListBoxItem_module_default["hop-ListBoxItem__checkmark"], size: "sm" }),
|
|
@@ -198,10 +206,7 @@ function ListBoxItem(props, ref) {
|
|
|
198
206
|
};
|
|
199
207
|
});
|
|
200
208
|
const children = composeRenderProps(childrenProp, (prev) => {
|
|
201
|
-
|
|
202
|
-
return /* @__PURE__ */ jsx(_Text, { slot: "label", children: prev });
|
|
203
|
-
}
|
|
204
|
-
return prev;
|
|
209
|
+
return /* @__PURE__ */ jsx(EnsureTextWrapper, { children: prev });
|
|
205
210
|
});
|
|
206
211
|
return /* @__PURE__ */ jsx(
|
|
207
212
|
ListBoxItem$1,
|
|
@@ -218,19 +223,13 @@ function ListBoxItem(props, ref) {
|
|
|
218
223
|
"aria-live": isLoading ? "polite" : void 0,
|
|
219
224
|
children: (listBoxItemProps) => {
|
|
220
225
|
if (isLoading) {
|
|
221
|
-
return /* @__PURE__ */ jsx(
|
|
222
|
-
|
|
226
|
+
return /* @__PURE__ */ jsx("div", { className: ListBoxItem_module_default["hop-ListBoxItem__inner"], children: /* @__PURE__ */ jsx(
|
|
227
|
+
_ListBoxItemSkeleton,
|
|
223
228
|
{
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
_ListBoxItemSkeleton,
|
|
227
|
-
{
|
|
228
|
-
size,
|
|
229
|
-
slot: "label"
|
|
230
|
-
}
|
|
231
|
-
)
|
|
229
|
+
size,
|
|
230
|
+
slot: "label"
|
|
232
231
|
}
|
|
233
|
-
);
|
|
232
|
+
) });
|
|
234
233
|
}
|
|
235
234
|
return /* @__PURE__ */ jsx(
|
|
236
235
|
ListBoxItemInner,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EnsureTextWrapper } from './chunk-P2OSN32C.js';
|
|
2
2
|
import { IconListContext } from './chunk-DHVVYSLB.js';
|
|
3
3
|
import { LinkContext } from './chunk-4VVNSXIB.js';
|
|
4
|
-
import { _Text } from './chunk-EY4ZTKS4.js';
|
|
5
4
|
import { TextContext } from './chunk-X6SER3TZ.js';
|
|
6
5
|
import { composeClassnameRenderProps } from './chunk-65JPI4FL.js';
|
|
7
6
|
import { SlotProvider } from './chunk-M36KANKC.js';
|
|
@@ -13,7 +12,7 @@ import { useContextProps, composeRenderProps, DEFAULT_SLOT, Link as Link$1 } fro
|
|
|
13
12
|
import { jsx } from 'react/jsx-runtime';
|
|
14
13
|
|
|
15
14
|
// css-module:./Link.module.css#css-module
|
|
16
|
-
var Link_module_default = { "hop-Link": "Link-module__hop-
|
|
15
|
+
var Link_module_default = { "hop-Link": "Link-module__hop-Link___8cuBO", "hop-Link--quiet": "Link-module__hop-Link--quiet___O88Ej", "hop-Link--primary": "Link-module__hop-Link--primary___u37Nx", "hop-Link--secondary": "Link-module__hop-Link--secondary___IZGTp", "hop-Link__icon": "Link-module__hop-Link__icon___8wzYi", "hop-Link__icon-list": "Link-module__hop-Link__icon-list___-s6DD", "hop-Link__text": "Link-module__hop-Link__text___HheeC", "hop-Link__start-icon": "Link-module__hop-Link__start-icon___ocWgK", "hop-Link__start-icon-list": "Link-module__hop-Link__start-icon-list___pv0Pp" };
|
|
17
16
|
var GlobalLinkCssSelector = "hop-Link";
|
|
18
17
|
var LinkToIconSizeAdapter = {
|
|
19
18
|
inherit: void 0,
|
|
@@ -60,10 +59,7 @@ function Link(props, ref) {
|
|
|
60
59
|
};
|
|
61
60
|
});
|
|
62
61
|
const children = composeRenderProps(childrenProp, (prev) => {
|
|
63
|
-
|
|
64
|
-
return /* @__PURE__ */ jsx(_Text, { children: prev });
|
|
65
|
-
}
|
|
66
|
-
return prev;
|
|
62
|
+
return /* @__PURE__ */ jsx(EnsureTextWrapper, { children: prev });
|
|
67
63
|
});
|
|
68
64
|
const iconSize = LinkToIconSizeAdapter[size];
|
|
69
65
|
return /* @__PURE__ */ jsx(
|
|
@@ -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___Vdc-e" };
|
|
12
12
|
var GlobalIconListCssSelector = "hop-IconList";
|
|
13
13
|
function IconList(props, ref) {
|
|
14
14
|
[props, ref] = useContextProps(props, ref, IconListContext);
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { useScale } from './chunk-MTDFS4CZ.js';
|
|
2
2
|
import { NumberFieldContext } from './chunk-ZQ3AWYRR.js';
|
|
3
|
-
import { _InputGroup } from './chunk-
|
|
3
|
+
import { _InputGroup } from './chunk-FRVE3N27.js';
|
|
4
|
+
import { EnsureTextWrapper } from './chunk-P2OSN32C.js';
|
|
4
5
|
import { LabelContext } from './chunk-QCA3ZR56.js';
|
|
5
|
-
import { isTextOnlyChildren } from './chunk-ZWU6DRRZ.js';
|
|
6
6
|
import { HelperMessageContext } from './chunk-HZKFQ33E.js';
|
|
7
7
|
import { ErrorMessageContext } from './chunk-FAE27DLF.js';
|
|
8
|
-
import { _Text } from './chunk-EY4ZTKS4.js';
|
|
9
8
|
import { TextContext } from './chunk-X6SER3TZ.js';
|
|
10
9
|
import { ClearContainerSlots } from './chunk-HXI3MEEK.js';
|
|
11
10
|
import { composeClassnameRenderProps } from './chunk-65JPI4FL.js';
|
|
@@ -15,13 +14,14 @@ import { IconContext, AngleUpIcon, AngleDownIcon } from '@hopper-ui/icons';
|
|
|
15
14
|
import { useStyledSystem, useResponsiveValue } from '@hopper-ui/styled-system';
|
|
16
15
|
import { mergeRefs } from '@react-aria/utils';
|
|
17
16
|
import { useControlledState } from '@react-stately/utils';
|
|
17
|
+
import clsx from 'clsx';
|
|
18
18
|
import { forwardRef, useCallback } from 'react';
|
|
19
19
|
import { useObjectRef } from 'react-aria';
|
|
20
20
|
import { useContextProps, composeRenderProps, Input, NumberField as NumberField$1, Button } from 'react-aria-components';
|
|
21
21
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
22
22
|
|
|
23
23
|
// css-module:./NumberField.module.css#css-module
|
|
24
|
-
var NumberField_module_default = { "hop-NumberField": "NumberField-module__hop-
|
|
24
|
+
var NumberField_module_default = { "hop-NumberField": "NumberField-module__hop-NumberField___h7XZY", "hop-NumberField--fluid": "NumberField-module__hop-NumberField--fluid___hzOGG", "hop-NumberField--mobile": "NumberField-module__hop-NumberField--mobile___v4nuf", "hop-NumberField__Label": "NumberField-module__hop-NumberField__Label___o00hC", "hop-NumberField__prefix": "NumberField-module__hop-NumberField__prefix___5m892", "hop-NumberField__InputGroup": "NumberField-module__hop-NumberField__InputGroup___9R8qa", "hop-NumberField__ErrorMessage": "NumberField-module__hop-NumberField__ErrorMessage___K86WY", "hop-NumberField__HelperMessage": "NumberField-module__hop-NumberField__HelperMessage___OAC4w", "hop-NumberField__stepper-button": "NumberField-module__hop-NumberField__stepper-button___uddVc", "hop-NumberField__stepper-button--increment": "NumberField-module__hop-NumberField__stepper-button--increment___8jK-p", "hop-NumberField__stepper-button--decrement": "NumberField-module__hop-NumberField__stepper-button--decrement___xlqHw", "hop-NumberField__stepper-button--mobile": "NumberField-module__hop-NumberField__stepper-button--mobile___oi3V3", "hop-NumberField__stepper-button__icon": "NumberField-module__hop-NumberField__stepper-button__icon___nVzDO", "hop-NumberField__input": "NumberField-module__hop-NumberField__input___-z7Ws" };
|
|
25
25
|
var GlobalNumberFieldCssSelector = "hop-NumberField";
|
|
26
26
|
var StepperButton = ({ direction }) => {
|
|
27
27
|
const scale = useScale();
|
|
@@ -73,6 +73,7 @@ function NumberField(props, ref) {
|
|
|
73
73
|
isInvalid,
|
|
74
74
|
isRequired,
|
|
75
75
|
necessityIndicator,
|
|
76
|
+
inputGroupProps,
|
|
76
77
|
...otherProps
|
|
77
78
|
} = ownProps;
|
|
78
79
|
const inputRef = useObjectRef(mergeRefs(userProvidedInputRef, props.inputRef !== void 0 ? props.inputRef : null));
|
|
@@ -107,19 +108,23 @@ function NumberField(props, ref) {
|
|
|
107
108
|
[TextContext, { size, className: NumberField_module_default["hop-NumberField__prefix"] }],
|
|
108
109
|
[IconContext, { size, className: NumberField_module_default["hop-NumberField__prefix"] }]
|
|
109
110
|
],
|
|
110
|
-
children:
|
|
111
|
+
children: /* @__PURE__ */ jsx(EnsureTextWrapper, { children: prefix })
|
|
111
112
|
}
|
|
112
113
|
) : null;
|
|
114
|
+
const { className: inputGroupClassName, inputClassName: inputGroupInputClassName, ...otherInputGroupProps } = inputGroupProps || {};
|
|
115
|
+
const inputGroupClassNames = clsx(NumberField_module_default["hop-NumberField__InputGroup"], inputGroupClassName);
|
|
116
|
+
const inputGroupInputClassNames = clsx(NumberField_module_default["hop-NumberField__input"], inputGroupInputClassName);
|
|
113
117
|
const inputMarkup = /* @__PURE__ */ jsx(ClearContainerSlots, { children: /* @__PURE__ */ jsxs(
|
|
114
118
|
_InputGroup,
|
|
115
119
|
{
|
|
116
120
|
isFluid: true,
|
|
117
121
|
size,
|
|
118
|
-
className:
|
|
122
|
+
className: inputGroupClassNames,
|
|
119
123
|
isDisabled,
|
|
120
124
|
isInvalid,
|
|
121
|
-
inputClassName:
|
|
125
|
+
inputClassName: inputGroupInputClassNames,
|
|
122
126
|
inputType: "number",
|
|
127
|
+
...otherInputGroupProps,
|
|
123
128
|
children: [
|
|
124
129
|
prefixMarkup,
|
|
125
130
|
/* @__PURE__ */ jsx(Input, { ref: inputRef }),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HelperMessageContext } from './chunk-HZKFQ33E.js';
|
|
2
|
-
import { _Text } from './chunk-
|
|
2
|
+
import { _Text } from './chunk-MLLUZ55T.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___dhQPn", "hop-HelperMessage__icon": "HelperMessage-module__hop-HelperMessage__icon___4TTDQ" };
|
|
13
13
|
var GlobalHelperMessageCssSelector = "hop-HelperMessage";
|
|
14
14
|
function HelperMessage(props, ref) {
|
|
15
15
|
const validation = useContext(FieldErrorContext);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { isFunction } from './chunk-TIPN4VYD.js';
|
|
2
|
-
import { useLocalizedString } from './chunk-TFVDF4YH.js';
|
|
3
2
|
import { ListBoxContext } from './chunk-UIEP5BA5.js';
|
|
4
|
-
import { _ListBoxItem } from './chunk-
|
|
3
|
+
import { _ListBoxItem } from './chunk-SG2POHLX.js';
|
|
5
4
|
import { ListBoxItemContext } from './chunk-Y2POLIXK.js';
|
|
6
5
|
import { SectionContext } from './chunk-5H5AZJPQ.js';
|
|
6
|
+
import { useLocalizedString } from './chunk-TFVDF4YH.js';
|
|
7
7
|
import { HeaderContext } from './chunk-7JOGKC3W.js';
|
|
8
|
-
import { _Text } from './chunk-
|
|
8
|
+
import { _Text } from './chunk-MLLUZ55T.js';
|
|
9
9
|
import { composeClassnameRenderProps } from './chunk-65JPI4FL.js';
|
|
10
10
|
import { SlotProvider } from './chunk-M36KANKC.js';
|
|
11
11
|
import { cssModule } from './chunk-KVDXQMWI.js';
|
|
@@ -17,7 +17,7 @@ import { useContextProps, composeRenderProps, ListBox as ListBox$1, Collection }
|
|
|
17
17
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
18
18
|
|
|
19
19
|
// css-module:./ListBox.module.css#css-module
|
|
20
|
-
var ListBox_module_default = { "hop-ListBox": "ListBox-module__hop-
|
|
20
|
+
var ListBox_module_default = { "hop-ListBox": "ListBox-module__hop-ListBox___nZraA", "hop-ListBox--fluid": "ListBox-module__hop-ListBox--fluid___LxQtc", "hop-ListBox__section": "ListBox-module__hop-ListBox__section___8Vc-j", "hop-ListBox__item": "ListBox-module__hop-ListBox__item___27FHC", "hop-ListBox__section-header": "ListBox-module__hop-ListBox__section-header___WL9gs" };
|
|
21
21
|
var GlobalListBoxCssSelector = "hop-ListBox";
|
|
22
22
|
var GlobalListBoxEmptyItemCssSelector = "hop-ListBox__empty-item";
|
|
23
23
|
var ListBoxToTextSizeAdapter = {
|
|
@@ -43,6 +43,7 @@ function ListBox(props, ref) {
|
|
|
43
43
|
style: styleProp,
|
|
44
44
|
selectionIndicator = "check",
|
|
45
45
|
selectionMode,
|
|
46
|
+
loadingListBoxItemProps,
|
|
46
47
|
...otherProps
|
|
47
48
|
} = ownProps;
|
|
48
49
|
const size = (_a = useResponsiveValue(sizeProp)) != null ? _a : "sm";
|
|
@@ -111,7 +112,6 @@ function ListBox(props, ref) {
|
|
|
111
112
|
children: /* @__PURE__ */ jsxs(
|
|
112
113
|
ListBox$1,
|
|
113
114
|
{
|
|
114
|
-
...otherProps,
|
|
115
115
|
ref,
|
|
116
116
|
className: classNames,
|
|
117
117
|
disallowEmptySelection,
|
|
@@ -120,10 +120,21 @@ function ListBox(props, ref) {
|
|
|
120
120
|
style,
|
|
121
121
|
"data-loading": isLoading,
|
|
122
122
|
shouldSelectOnPressUp: true,
|
|
123
|
+
...otherProps,
|
|
123
124
|
children: [
|
|
124
125
|
renderChildren(),
|
|
125
126
|
isLoading && Array.from({ length: 5 }).map((_, index) => {
|
|
126
|
-
return /* @__PURE__ */ jsx(
|
|
127
|
+
return /* @__PURE__ */ jsx(
|
|
128
|
+
_ListBoxItem,
|
|
129
|
+
{
|
|
130
|
+
id: `loadingListItem_${index.toString()}`,
|
|
131
|
+
isLoading,
|
|
132
|
+
size,
|
|
133
|
+
textValue: stringFormatter.format("ListBoxItem.loadingTextValue"),
|
|
134
|
+
...loadingListBoxItemProps
|
|
135
|
+
},
|
|
136
|
+
`loadingListItem_${index.toString()}`
|
|
137
|
+
);
|
|
127
138
|
})
|
|
128
139
|
]
|
|
129
140
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AvatarContext } from './chunk-AES7QBQE.js';
|
|
2
|
-
import { _RichIconAvatarImage } from './chunk-
|
|
2
|
+
import { _RichIconAvatarImage } from './chunk-PQR2DVBK.js';
|
|
3
3
|
import { useRenderProps } from './chunk-NH3IVMXB.js';
|
|
4
4
|
import { composeClassnameRenderProps } from './chunk-65JPI4FL.js';
|
|
5
5
|
import { AnonymousRichIcon } from '@hopper-ui/icons';
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { TextFieldContext } from './chunk-O4XPUINW.js';
|
|
2
2
|
import { useTruncatedText } from './chunk-Z57VHYOF.js';
|
|
3
|
-
import { _RemainingCharacterCount } from './chunk-
|
|
4
|
-
import { _InputGroup } from './chunk-
|
|
5
|
-
import { _ClearButton } from './chunk-
|
|
3
|
+
import { _RemainingCharacterCount } from './chunk-A265GCLA.js';
|
|
4
|
+
import { _InputGroup } from './chunk-FRVE3N27.js';
|
|
5
|
+
import { _ClearButton } from './chunk-JHP7LA2B.js';
|
|
6
|
+
import { EnsureTextWrapper } from './chunk-P2OSN32C.js';
|
|
6
7
|
import { LabelContext } from './chunk-QCA3ZR56.js';
|
|
7
|
-
import { isTextOnlyChildren } from './chunk-ZWU6DRRZ.js';
|
|
8
8
|
import { HelperMessageContext } from './chunk-HZKFQ33E.js';
|
|
9
9
|
import { ErrorMessageContext } from './chunk-FAE27DLF.js';
|
|
10
|
-
import { _Text } from './chunk-EY4ZTKS4.js';
|
|
11
10
|
import { TextContext } from './chunk-X6SER3TZ.js';
|
|
12
11
|
import { ClearContainerSlots } from './chunk-HXI3MEEK.js';
|
|
13
12
|
import { composeClassnameRenderProps } from './chunk-65JPI4FL.js';
|
|
@@ -17,13 +16,14 @@ import { IconContext } from '@hopper-ui/icons';
|
|
|
17
16
|
import { useStyledSystem, useResponsiveValue, useIsomorphicLayoutEffect } from '@hopper-ui/styled-system';
|
|
18
17
|
import { mergeRefs } from '@react-aria/utils';
|
|
19
18
|
import { useControlledState } from '@react-stately/utils';
|
|
19
|
+
import clsx from 'clsx';
|
|
20
20
|
import { forwardRef, useState, useCallback } from 'react';
|
|
21
21
|
import { useObjectRef } from 'react-aria';
|
|
22
22
|
import { useContextProps, composeRenderProps, Input, TextField as TextField$1 } from 'react-aria-components';
|
|
23
23
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
24
24
|
|
|
25
25
|
// css-module:./TextField.module.css#css-module
|
|
26
|
-
var TextField_module_default = { "hop-TextField": "TextField-module__hop-
|
|
26
|
+
var TextField_module_default = { "hop-TextField": "TextField-module__hop-TextField___vL3q7", "hop-TextField--fluid": "TextField-module__hop-TextField--fluid___WCJxM", "hop-TextField__Label": "TextField-module__hop-TextField__Label___Mg6Yj", "hop-TextField__prefix": "TextField-module__hop-TextField__prefix___cCGFr", "hop-TextField__InputGroup": "TextField-module__hop-TextField__InputGroup___6LUxR", "hop-TextField__ErrorMessage": "TextField-module__hop-TextField__ErrorMessage___MLIq6", "hop-TextField__HelperMessage": "TextField-module__hop-TextField__HelperMessage___Eetu9" };
|
|
27
27
|
var GlobalTextFieldCssSelector = "hop-TextField";
|
|
28
28
|
function TextField(props, ref) {
|
|
29
29
|
var _a;
|
|
@@ -55,8 +55,10 @@ function TextField(props, ref) {
|
|
|
55
55
|
isDisabled,
|
|
56
56
|
isInvalid,
|
|
57
57
|
isRequired,
|
|
58
|
-
|
|
58
|
+
allowExceedingMaxLength,
|
|
59
59
|
necessityIndicator,
|
|
60
|
+
inputGroupProps,
|
|
61
|
+
remainingCharacterCountProps,
|
|
60
62
|
...otherProps
|
|
61
63
|
} = ownProps;
|
|
62
64
|
const inputRef = useObjectRef(mergeRefs(userProvidedInputRef, props.inputRef !== void 0 ? props.inputRef : null));
|
|
@@ -93,6 +95,9 @@ function TextField(props, ref) {
|
|
|
93
95
|
if (showCharacterCount && !maxLength) {
|
|
94
96
|
console.warn("If showCharacterCount is true, maxLength must be set to the maximum number of characters allowed in the TextField.");
|
|
95
97
|
}
|
|
98
|
+
if (allowExceedingMaxLength && !showCharacterCount) {
|
|
99
|
+
console.warn("If allowExceedingMaxLength is true, showCharacterCount must also be true.");
|
|
100
|
+
}
|
|
96
101
|
const prefixMarkup = prefix ? /* @__PURE__ */ jsx(
|
|
97
102
|
SlotProvider,
|
|
98
103
|
{
|
|
@@ -100,23 +105,26 @@ function TextField(props, ref) {
|
|
|
100
105
|
[TextContext, { size, className: TextField_module_default["hop-TextField__prefix"] }],
|
|
101
106
|
[IconContext, { size, className: TextField_module_default["hop-TextField__prefix"] }]
|
|
102
107
|
],
|
|
103
|
-
children:
|
|
108
|
+
children: /* @__PURE__ */ jsx(EnsureTextWrapper, { children: prefix })
|
|
104
109
|
}
|
|
105
110
|
) : null;
|
|
106
111
|
useIsomorphicLayoutEffect(() => {
|
|
107
|
-
if (
|
|
112
|
+
if (!allowExceedingMaxLength) {
|
|
108
113
|
const newValue = truncateText(value, maxLength);
|
|
109
114
|
onChange(newValue);
|
|
110
115
|
}
|
|
111
116
|
}, [value]);
|
|
117
|
+
const { className: inputGroupClassName, ...otherInputGroupProps } = inputGroupProps || {};
|
|
118
|
+
const inputGroupClassNames = clsx(TextField_module_default["hop-TextField__InputGroup"], inputGroupClassName);
|
|
112
119
|
const inputMarkup = /* @__PURE__ */ jsx(ClearContainerSlots, { children: /* @__PURE__ */ jsxs(
|
|
113
120
|
_InputGroup,
|
|
114
121
|
{
|
|
115
122
|
isFluid: true,
|
|
116
123
|
size,
|
|
117
|
-
className:
|
|
124
|
+
className: inputGroupClassNames,
|
|
118
125
|
isDisabled,
|
|
119
126
|
isInvalid,
|
|
127
|
+
...otherInputGroupProps,
|
|
120
128
|
children: [
|
|
121
129
|
prefixMarkup,
|
|
122
130
|
/* @__PURE__ */ jsx(Input, { ref: inputRef, placeholder }),
|
|
@@ -125,7 +133,8 @@ function TextField(props, ref) {
|
|
|
125
133
|
{
|
|
126
134
|
count: maxLength - characterCount,
|
|
127
135
|
isInvalid: overMaxLength,
|
|
128
|
-
isDisabled
|
|
136
|
+
isDisabled,
|
|
137
|
+
...remainingCharacterCountProps
|
|
129
138
|
}
|
|
130
139
|
),
|
|
131
140
|
showClearButton && /* @__PURE__ */ jsx(_ClearButton, { isDisabled, size: "lg", onPress: handleClear })
|
|
@@ -155,7 +164,7 @@ function TextField(props, ref) {
|
|
|
155
164
|
value,
|
|
156
165
|
style,
|
|
157
166
|
className: classNames,
|
|
158
|
-
maxLength:
|
|
167
|
+
maxLength: !allowExceedingMaxLength ? maxLength : void 0,
|
|
159
168
|
onChange,
|
|
160
169
|
isDisabled,
|
|
161
170
|
isInvalid,
|