@hopper-ui/components 1.3.9 → 1.3.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/Avatar/src/AnonymousAvatar.css +37 -37
- package/dist/Avatar/src/AnonymousAvatar.js +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 +42 -42
- 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 +52 -52
- package/dist/Badge/src/index.js +3 -3
- package/dist/ComboBox/src/ComboBox.css +713 -713
- package/dist/ComboBox/src/ComboBox.d.ts +4 -0
- package/dist/ComboBox/src/ComboBox.js +49 -50
- package/dist/ComboBox/src/index.css +713 -713
- package/dist/ComboBox/src/index.js +49 -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 +1833 -1671
- package/dist/Form/src/Form.d.ts +4 -0
- package/dist/Form/src/Form.js +49 -48
- package/dist/Form/src/index.css +1833 -1671
- package/dist/Form/src/index.js +49 -48
- package/dist/Header/src/Header.js +1 -1
- package/dist/Header/src/index.js +1 -1
- 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 +2 -2
- package/dist/Link/src/index.css +49 -49
- package/dist/Link/src/index.js +2 -2
- package/dist/ListBox/src/ListBox.css +274 -274
- package/dist/ListBox/src/ListBox.js +6 -6
- package/dist/ListBox/src/ListBoxItem.css +262 -262
- package/dist/ListBox/src/ListBoxItem.js +5 -5
- package/dist/ListBox/src/ListBoxItemSkeleton.css +34 -34
- package/dist/ListBox/src/ListBoxItemSkeleton.js +1 -1
- package/dist/ListBox/src/index.css +274 -274
- package/dist/ListBox/src/index.js +6 -6
- package/dist/Select/src/Select.css +857 -695
- package/dist/Select/src/Select.d.ts +4 -0
- package/dist/Select/src/Select.js +49 -48
- package/dist/Select/src/SelectValue.css +61 -61
- package/dist/Select/src/SelectValue.js +5 -5
- package/dist/Select/src/index.css +857 -695
- package/dist/Select/src/index.js +49 -48
- 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.js +3 -3
- 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.js +6 -6
- package/dist/checkbox/src/Checkbox.css +46 -46
- package/dist/checkbox/src/Checkbox.js +2 -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.d.ts +4 -0
- package/dist/checkbox/src/CheckboxGroup.js +1 -1
- package/dist/checkbox/src/DecorativeCheckbox.css +54 -54
- package/dist/checkbox/src/DecorativeCheckbox.js +2 -2
- package/dist/checkbox/src/index.css +98 -98
- package/dist/checkbox/src/index.js +5 -5
- package/dist/{chunk-B2O3ZCYC.js → chunk-47AZN77D.js} +1 -1
- package/dist/{chunk-5TH7VHRH.js → chunk-4D5OKVKB.js} +5 -5
- package/dist/{chunk-54U727IV.js → chunk-4PLO6M5P.js} +2 -2
- package/dist/{chunk-BGOYDN4M.js → chunk-4ZCY2KEA.js} +2 -2
- package/dist/{chunk-ANO4F3LJ.js → chunk-4ZUCHCV2.js} +7 -2
- package/dist/{chunk-UR3NK3LV.js → chunk-5ORMXIMY.js} +1 -1
- package/dist/{chunk-4FVIH73F.js → chunk-5RQ3FMMG.js} +2 -2
- package/dist/{chunk-GDVP2QEZ.js → chunk-64O3N7JE.js} +1 -1
- package/dist/{chunk-JX5YYFB3.js → chunk-6HV7YSW5.js} +7 -5
- package/dist/{chunk-7LTA4KPO.js → chunk-6NS4AQDI.js} +5 -4
- package/dist/{chunk-4EUVVRTY.js → chunk-7B6XUT4A.js} +3 -3
- package/dist/{chunk-HCJLAF2O.js → chunk-BJNIT3X3.js} +6 -6
- package/dist/{chunk-TRDXTYZD.js → chunk-BPFYQL3X.js} +3 -3
- package/dist/{chunk-2SF7BBJT.js → chunk-BUP6LEQX.js} +1 -1
- package/dist/{chunk-2WK465I4.js → chunk-BXBMRBPB.js} +3 -3
- package/dist/{chunk-KOT3ULJY.js → chunk-D7WXRB6L.js} +2 -2
- package/dist/{chunk-GXBVNCVP.js → chunk-DPC3Y6Y2.js} +2 -2
- package/dist/{chunk-UJXKUNEW.js → chunk-F2BSC3KH.js} +478 -194
- package/dist/{chunk-AQITZWYM.js → chunk-GTM56LGX.js} +2 -2
- package/dist/{chunk-ENHK4K3U.js → chunk-GTNBBI2S.js} +2 -2
- package/dist/{chunk-TMGUYWTR.js → chunk-HPPNJVV6.js} +2 -2
- package/dist/{chunk-CZRCXQFS.js → chunk-I7C4D6SO.js} +1 -1
- package/dist/{chunk-HI2SHIGG.js → chunk-JOIYDL4E.js} +1 -1
- package/dist/{chunk-6U6JI3L3.js → chunk-KKCIN6AH.js} +1 -1
- package/dist/{chunk-VQKJXEPU.js → chunk-KS255M2B.js} +2 -2
- package/dist/{chunk-E4JB7I3F.js → chunk-L3DEPUAF.js} +1 -1
- package/dist/{chunk-A3E76SDY.js → chunk-M64YZ3V3.js} +1 -1
- package/dist/{chunk-S6AH3YTH.js → chunk-MOEKGI3Q.js} +7 -6
- package/dist/{chunk-NQD2OQEG.js → chunk-MZTFEGDM.js} +4 -4
- package/dist/{chunk-L5A2UTQV.js → chunk-N5UT7MST.js} +2 -2
- package/dist/{chunk-2GYC6ADT.js → chunk-NTFJHBUN.js} +5 -5
- package/dist/{chunk-VC3HSOGC.js → chunk-O6I523D7.js} +5 -4
- package/dist/{chunk-3O74ORYF.js → chunk-P7OXW6SX.js} +2 -2
- package/dist/{chunk-PAW7CB3K.js → chunk-QAUIUFHM.js} +2 -2
- package/dist/{chunk-N66DZLL6.js → chunk-QEVF4GU6.js} +4 -2
- package/dist/{chunk-KQQCELPA.js → chunk-R5YV23ZF.js} +3 -3
- package/dist/{chunk-4PBFVO5S.js → chunk-S4JSEGNU.js} +3 -3
- package/dist/{chunk-I55EPFTM.js → chunk-SCDADO4Y.js} +3 -3
- package/dist/{chunk-6KHTQTRF.js → chunk-TELARNV2.js} +1 -1
- package/dist/{chunk-Q6SYCTJD.js → chunk-TQLIL4FK.js} +7 -2
- package/dist/{chunk-FBABNQTM.js → chunk-UXI6MVF4.js} +5 -4
- package/dist/{chunk-MLHAFFJQ.js → chunk-VFI4XPBU.js} +1 -1
- package/dist/{chunk-RDLI353P.js → chunk-VJWTYDCA.js} +1 -1
- package/dist/{chunk-GIMOHY5C.js → chunk-W6DTEUHF.js} +2 -2
- package/dist/{chunk-2ZXF62AA.js → chunk-WSHJXUF4.js} +9 -4
- package/dist/{chunk-XQFICAVB.js → chunk-Y4V25PX4.js} +3 -3
- package/dist/{chunk-XHW2Z6AX.js → chunk-YV4BUYJN.js} +3 -3
- package/dist/{chunk-YQDRT547.js → chunk-ZJKTV2QB.js} +7 -4
- package/dist/index.css +1839 -1677
- package/dist/index.d.ts +3 -1
- package/dist/index.js +49 -48
- 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 +4 -0
- package/dist/inputs/src/NumberField.js +6 -6
- package/dist/inputs/src/PasswordField.css +219 -219
- package/dist/inputs/src/PasswordField.d.ts +4 -0
- package/dist/inputs/src/PasswordField.js +7 -7
- package/dist/inputs/src/RemainingCharacterCount.css +30 -30
- package/dist/inputs/src/RemainingCharacterCount.d.ts +2 -1
- package/dist/inputs/src/RemainingCharacterCount.js +5 -5
- package/dist/inputs/src/SearchField.css +225 -225
- package/dist/inputs/src/SearchField.d.ts +4 -0
- package/dist/inputs/src/SearchField.js +8 -8
- package/dist/inputs/src/TextArea.css +226 -226
- package/dist/inputs/src/TextArea.d.ts +4 -0
- package/dist/inputs/src/TextArea.js +7 -7
- package/dist/inputs/src/TextField.css +223 -223
- package/dist/inputs/src/TextField.d.ts +4 -0
- package/dist/inputs/src/TextField.js +9 -9
- package/dist/inputs/src/index.css +269 -269
- package/dist/inputs/src/index.d.ts +1 -1
- package/dist/inputs/src/index.js +13 -13
- package/dist/layout/src/Content.js +1 -1
- package/dist/layout/src/Footer.js +1 -1
- package/dist/overlays/Popover/src/Popover.css +1975 -1813
- package/dist/overlays/Popover/src/Popover.js +49 -48
- package/dist/overlays/Popover/src/index.css +1975 -1813
- package/dist/overlays/Popover/src/index.js +49 -48
- package/dist/radio/src/DecorativeRadio.css +54 -54
- package/dist/radio/src/DecorativeRadio.js +2 -2
- package/dist/radio/src/Radio.css +46 -46
- package/dist/radio/src/Radio.js +2 -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.d.ts +4 -0
- package/dist/radio/src/RadioGroup.js +1 -1
- package/dist/radio/src/index.css +98 -98
- package/dist/radio/src/index.js +5 -5
- package/dist/switch/src/Switch.css +43 -43
- package/dist/switch/src/Switch.js +2 -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 +3 -3
- package/dist/tag/src/Tag.css +335 -335
- package/dist/tag/src/Tag.js +5 -5
- package/dist/tag/src/TagGroup.css +37 -37
- package/dist/tag/src/TagGroup.d.ts +4 -0
- package/dist/tag/src/TagGroup.js +1 -1
- package/dist/tag/src/TagList.css +27 -27
- package/dist/tag/src/index.css +345 -345
- package/dist/tag/src/index.js +6 -6
- 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.d.ts +2 -2
- package/dist/typography/Label/src/Label.js +1 -1
- package/dist/typography/Label/src/index.css +27 -27
- package/dist/typography/Label/src/index.js +1 -1
- package/dist/typography/OverlineText/src/OverlineText.css +27 -27
- package/dist/typography/OverlineText/src/OverlineText.js +1 -1
- package/dist/typography/OverlineText/src/index.css +27 -27
- package/dist/typography/OverlineText/src/index.js +1 -1
- package/dist/typography/Text/src/Text.css +27 -27
- package/dist/typography/Text/src/Text.js +1 -1
- package/dist/typography/Text/src/index.css +27 -27
- package/dist/typography/Text/src/index.js +1 -1
- package/dist/utils/src/EnsureTextWrapper.css +27 -27
- package/dist/utils/src/EnsureTextWrapper.js +5 -5
- package/dist/utils/src/index.css +27 -27
- package/dist/utils/src/index.js +5 -5
- package/package.json +3 -3
- package/dist/chunk-KSKIQSYM.js +0 -260
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { PopoverContext } from './chunk-SC6ZK5ON.js';
|
|
2
|
-
import { EnsureTextWrapper } from './chunk-
|
|
2
|
+
import { EnsureTextWrapper } from './chunk-M64YZ3V3.js';
|
|
3
|
+
import { TagGroupContext } from './chunk-LCAS3YQV.js';
|
|
3
4
|
import { RadioGroupContext } from './chunk-5MBJWRZD.js';
|
|
4
5
|
import { TextFieldContext } from './chunk-O4XPUINW.js';
|
|
5
6
|
import { ContentContext } from './chunk-IXB2WK56.js';
|
|
6
|
-
import { _Footer } from './chunk-
|
|
7
|
+
import { _Footer } from './chunk-GTM56LGX.js';
|
|
7
8
|
import { FooterContext } from './chunk-I67NHYK4.js';
|
|
8
9
|
import { NumberFieldContext } from './chunk-ZQ3AWYRR.js';
|
|
9
10
|
import { PasswordFieldContext } from './chunk-QW45G6K4.js';
|
|
@@ -11,173 +12,410 @@ import { SearchFieldContext } from './chunk-3NKF5TPD.js';
|
|
|
11
12
|
import { TextAreaContext } from './chunk-MHQZXLKW.js';
|
|
12
13
|
import { CheckboxFieldContext } from './chunk-ZGNK4GWA.js';
|
|
13
14
|
import { CheckboxGroupContext } from './chunk-N7YDPVZL.js';
|
|
14
|
-
import { ButtonContext } from './chunk-WMTWFKKP.js';
|
|
15
|
+
import { ButtonContext as ButtonContext$1 } from './chunk-WMTWFKKP.js';
|
|
15
16
|
import { ButtonGroupContext } from './chunk-VJQ7M2BK.js';
|
|
16
17
|
import { SelectContext } from './chunk-T24MBA34.js';
|
|
17
|
-
import { _SelectValue } from './chunk-
|
|
18
|
+
import { _SelectValue } from './chunk-4ZCY2KEA.js';
|
|
18
19
|
import { HeadingContext } from './chunk-TXZ6BMFR.js';
|
|
19
20
|
import { LabelContext } from './chunk-QCA3ZR56.js';
|
|
20
|
-
import { _ListBox } from './chunk-
|
|
21
|
+
import { _ListBox } from './chunk-Y4V25PX4.js';
|
|
21
22
|
import { isFunction, isNil } from './chunk-TIPN4VYD.js';
|
|
22
23
|
import { ListBoxContext } from './chunk-UIEP5BA5.js';
|
|
23
|
-
import { _ListBoxItem } from './chunk-
|
|
24
|
+
import { _ListBoxItem } from './chunk-NTFJHBUN.js';
|
|
24
25
|
import { CheckboxContext } from './chunk-2EAZPH3M.js';
|
|
25
26
|
import { _HopperProvider } from './chunk-NMKBUGSO.js';
|
|
26
27
|
import { LinkContext } from './chunk-4VVNSXIB.js';
|
|
27
28
|
import { FormContext } from './chunk-EURJK4ZT.js';
|
|
28
29
|
import { HelperMessageContext } from './chunk-HZKFQ33E.js';
|
|
29
30
|
import { ErrorMessageContext } from './chunk-FAE27DLF.js';
|
|
31
|
+
import { ComboBoxContext } from './chunk-4XHTP4GX.js';
|
|
30
32
|
import { BadgeContext } from './chunk-CQDLZ42T.js';
|
|
31
33
|
import { TextContext } from './chunk-X6SER3TZ.js';
|
|
32
34
|
import { ClearContainerSlots, ClearProviders } from './chunk-HXI3MEEK.js';
|
|
33
35
|
import { composeClassnameRenderProps } from './chunk-65JPI4FL.js';
|
|
34
36
|
import { SlotProvider } from './chunk-M36KANKC.js';
|
|
35
37
|
import { cssModule } from './chunk-KVDXQMWI.js';
|
|
38
|
+
import { IconContext, AngleUpIcon, AngleDownIcon } from '@hopper-ui/icons';
|
|
36
39
|
import { useStyledSystem, useResponsiveValue, useColorSchemeContext } from '@hopper-ui/styled-system';
|
|
37
40
|
export * from '@hopper-ui/styled-system';
|
|
38
|
-
import
|
|
39
|
-
import { forwardRef,
|
|
40
|
-
import { useContextProps, composeRenderProps,
|
|
41
|
+
import { useObjectRef, mergeRefs, useResizeObserver } from '@react-aria/utils';
|
|
42
|
+
import { forwardRef, useRef, useState, useCallback, useReducer, useEffect } from 'react';
|
|
43
|
+
import { useContextProps, useSlottedContext, InputContext, composeRenderProps, TextContext as TextContext$1, ButtonContext, ComboBox as ComboBox$1, Group, Input, Button, Form as Form$1, Select as Select$1, Popover as Popover$1, Dialog } from 'react-aria-components';
|
|
41
44
|
export { Collection } from 'react-aria-components';
|
|
42
45
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
43
|
-
import
|
|
46
|
+
import clsx2 from 'clsx';
|
|
44
47
|
|
|
45
|
-
// css-module:./
|
|
46
|
-
var
|
|
47
|
-
var
|
|
48
|
-
function
|
|
49
|
-
var _a;
|
|
50
|
-
|
|
48
|
+
// css-module:./ComboBox.module.css#css-module
|
|
49
|
+
var ComboBox_module_default = { "hop-ComboBox": "ComboBox-module__hop-ComboBox___Xt8NL", "hop-ComboBox--fluid": "ComboBox-module__hop-ComboBox--fluid___toNjK", "hop-ComboBox__label": "ComboBox-module__hop-ComboBox__label___42uq-", "hop-ComboBox__trigger": "ComboBox-module__hop-ComboBox__trigger___qJqf1", "hop-ComboBox__trigger--sm": "ComboBox-module__hop-ComboBox__trigger--sm___1aLVd", "hop-ComboBox__trigger--md": "ComboBox-module__hop-ComboBox__trigger--md___IafIJ", "hop-ComboBox__input": "ComboBox-module__hop-ComboBox__input___9sKPh", "hop-ComboBox__button": "ComboBox-module__hop-ComboBox__button___gfYuq", "hop-ComboBox__prefix": "ComboBox-module__hop-ComboBox__prefix___2Xa9x", "hop-ComboBox__button-icon": "ComboBox-module__hop-ComboBox__button-icon___bbTW5", "hop-ComboBox__helper-message": "ComboBox-module__hop-ComboBox__helper-message___fufg3", "hop-ComboBox__error-message": "ComboBox-module__hop-ComboBox__error-message___Mk9Vp" };
|
|
50
|
+
var GlobalComboBoxCssSelector = "hop-ComboBox";
|
|
51
|
+
function ComboBox(props, ref) {
|
|
52
|
+
var _a, _b, _c;
|
|
53
|
+
const {
|
|
54
|
+
inputRef: userProvidedInputRef = null,
|
|
55
|
+
...propsWithoutRef
|
|
56
|
+
} = props;
|
|
57
|
+
[props, ref] = useContextProps(propsWithoutRef, ref, ComboBoxContext);
|
|
51
58
|
const { stylingProps, ...ownProps } = useStyledSystem(props);
|
|
52
59
|
const {
|
|
53
|
-
autoWidth,
|
|
54
|
-
children,
|
|
55
60
|
className,
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
61
|
+
children,
|
|
62
|
+
fieldChildren,
|
|
63
|
+
footer,
|
|
64
|
+
isAutoMenuWidth,
|
|
65
|
+
isFluid: isFluidProp,
|
|
66
|
+
isInvalid,
|
|
67
|
+
isRequired,
|
|
68
|
+
items,
|
|
69
|
+
menuTrigger = "focus",
|
|
70
|
+
listBoxProps,
|
|
71
|
+
necessityIndicator,
|
|
72
|
+
placeholder,
|
|
73
|
+
popoverProps,
|
|
74
|
+
prefix,
|
|
75
|
+
size: sizeProp,
|
|
62
76
|
style: styleProp,
|
|
77
|
+
triggerProps,
|
|
63
78
|
...otherProps
|
|
64
79
|
} = ownProps;
|
|
65
|
-
const
|
|
66
|
-
const
|
|
80
|
+
const inputRef = useObjectRef(mergeRefs(userProvidedInputRef, (_a = props.inputRef) != null ? _a : null));
|
|
81
|
+
const inputContext = useSlottedContext(InputContext);
|
|
82
|
+
const mergedInputRefs = (inputContext == null ? void 0 : inputContext.ref) ? mergeRefs(inputRef, inputContext.ref) : inputRef;
|
|
83
|
+
const triggerRef = useRef(null);
|
|
84
|
+
const buttonRef = useRef(null);
|
|
85
|
+
const [triggerWidth, setTriggerWidth] = useState(null);
|
|
86
|
+
const onResize = useCallback(() => {
|
|
87
|
+
if (triggerRef.current) {
|
|
88
|
+
setTriggerWidth(triggerRef.current.offsetWidth + "px");
|
|
89
|
+
}
|
|
90
|
+
}, [triggerRef]);
|
|
91
|
+
useResizeObserver({
|
|
92
|
+
ref: triggerRef,
|
|
93
|
+
onResize
|
|
94
|
+
});
|
|
95
|
+
const { stylingProps: triggerStylingProps, ...triggerOwnProps } = useStyledSystem(triggerProps != null ? triggerProps : {});
|
|
67
96
|
const {
|
|
68
|
-
className:
|
|
69
|
-
style:
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
} =
|
|
73
|
-
const {
|
|
74
|
-
|
|
97
|
+
className: triggerClassName,
|
|
98
|
+
style: triggerStyleProp,
|
|
99
|
+
...otherTriggerProps
|
|
100
|
+
} = triggerOwnProps;
|
|
101
|
+
const { stylingProps: popoverStylingProps, ...popoverOwnProps } = useStyledSystem(popoverProps != null ? popoverProps : {});
|
|
102
|
+
const {
|
|
103
|
+
placement = "bottom start",
|
|
104
|
+
style: popoverStyleProp,
|
|
105
|
+
...otherPopoverProps
|
|
106
|
+
} = popoverOwnProps;
|
|
107
|
+
const size = (_b = useResponsiveValue(sizeProp)) != null ? _b : "sm";
|
|
108
|
+
const isFluid = (_c = useResponsiveValue(isFluidProp)) != null ? _c : false;
|
|
109
|
+
const classNames = composeClassnameRenderProps(
|
|
75
110
|
className,
|
|
76
|
-
|
|
111
|
+
GlobalComboBoxCssSelector,
|
|
77
112
|
cssModule(
|
|
78
|
-
|
|
79
|
-
"hop-
|
|
80
|
-
|
|
113
|
+
ComboBox_module_default,
|
|
114
|
+
"hop-ComboBox",
|
|
115
|
+
isFluid && "fluid",
|
|
116
|
+
size
|
|
81
117
|
),
|
|
82
118
|
stylingProps.className
|
|
83
119
|
);
|
|
84
|
-
const
|
|
120
|
+
const triggerClassNames = composeClassnameRenderProps(
|
|
121
|
+
triggerClassName,
|
|
122
|
+
cssModule(
|
|
123
|
+
ComboBox_module_default,
|
|
124
|
+
"hop-ComboBox__trigger",
|
|
125
|
+
size
|
|
126
|
+
),
|
|
127
|
+
triggerStylingProps.className
|
|
128
|
+
);
|
|
129
|
+
const buttonClassNames = composeClassnameRenderProps(
|
|
130
|
+
cssModule(
|
|
131
|
+
ComboBox_module_default,
|
|
132
|
+
"hop-ComboBox__button"
|
|
133
|
+
)
|
|
134
|
+
);
|
|
135
|
+
const inputClassNames = composeClassnameRenderProps(
|
|
136
|
+
inputContext == null ? void 0 : inputContext.className,
|
|
137
|
+
ComboBox_module_default["hop-ComboBox__input"]
|
|
138
|
+
);
|
|
85
139
|
const style = composeRenderProps(styleProp, (prev) => {
|
|
86
140
|
return {
|
|
87
141
|
...stylingProps.style,
|
|
88
|
-
"--container-padding": `${containerPadding}px`,
|
|
89
142
|
...prev
|
|
90
143
|
};
|
|
91
144
|
});
|
|
92
|
-
const
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
145
|
+
const triggerStyle = composeRenderProps(triggerStyleProp, (prev) => {
|
|
146
|
+
return {
|
|
147
|
+
...triggerStylingProps.style,
|
|
148
|
+
...prev
|
|
149
|
+
};
|
|
150
|
+
});
|
|
151
|
+
const popoverStyle = composeRenderProps(popoverStyleProp, (prev) => {
|
|
152
|
+
return {
|
|
153
|
+
...popoverStylingProps.style,
|
|
154
|
+
...prev,
|
|
155
|
+
"--custom-trigger-width": triggerWidth
|
|
156
|
+
};
|
|
157
|
+
});
|
|
158
|
+
const handleMouseDown = useCallback((e) => {
|
|
159
|
+
if (inputRef.current && e.target !== inputRef.current && buttonRef.current && e.target !== buttonRef.current) {
|
|
160
|
+
inputRef.current.focus();
|
|
161
|
+
e.preventDefault();
|
|
162
|
+
}
|
|
163
|
+
}, [inputRef]);
|
|
164
|
+
const prefixMarkup = prefix ? /* @__PURE__ */ jsx(
|
|
165
|
+
SlotProvider,
|
|
166
|
+
{
|
|
167
|
+
values: [
|
|
168
|
+
[TextContext, { size, className: ComboBox_module_default["hop-ComboBox__prefix"] }],
|
|
169
|
+
[IconContext, { size, className: ComboBox_module_default["hop-ComboBox__prefix"] }]
|
|
170
|
+
],
|
|
171
|
+
children: /* @__PURE__ */ jsx(ClearContainerSlots, { children: /* @__PURE__ */ jsx(EnsureTextWrapper, { children: prefix }) })
|
|
172
|
+
}
|
|
173
|
+
) : null;
|
|
174
|
+
const footerMarkup = footer ? /* @__PURE__ */ jsx(
|
|
175
|
+
SlotProvider,
|
|
176
|
+
{
|
|
177
|
+
values: [
|
|
178
|
+
[TextContext, { size, className: ComboBox_module_default["hop-ComboBox__footer-text"] }]
|
|
179
|
+
],
|
|
180
|
+
children: /* @__PURE__ */ jsx(
|
|
181
|
+
ClearProviders,
|
|
182
|
+
{
|
|
183
|
+
values: [
|
|
184
|
+
TextContext$1,
|
|
185
|
+
TextContext,
|
|
186
|
+
ButtonContext
|
|
187
|
+
],
|
|
188
|
+
children: /* @__PURE__ */ jsx(_Footer, { children: /* @__PURE__ */ jsx(EnsureTextWrapper, { children: footer }) })
|
|
189
|
+
}
|
|
190
|
+
)
|
|
191
|
+
}
|
|
192
|
+
) : null;
|
|
96
193
|
return /* @__PURE__ */ jsx(
|
|
97
|
-
|
|
194
|
+
ComboBox$1,
|
|
98
195
|
{
|
|
99
196
|
...otherProps,
|
|
100
|
-
offset,
|
|
101
197
|
ref,
|
|
102
|
-
className:
|
|
103
|
-
arrowBoundaryOffset: boundaryOffset,
|
|
104
|
-
"data-auto-width": autoWidth || void 0,
|
|
105
|
-
containerPadding,
|
|
198
|
+
className: classNames,
|
|
106
199
|
style,
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
200
|
+
isInvalid,
|
|
201
|
+
isRequired,
|
|
202
|
+
menuTrigger,
|
|
203
|
+
children: (comboBoxRenderProps) => {
|
|
204
|
+
const { isOpen } = comboBoxRenderProps;
|
|
205
|
+
const ButtonIcon = isOpen ? AngleUpIcon : AngleDownIcon;
|
|
206
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
207
|
+
/* @__PURE__ */ jsx(
|
|
208
|
+
SlotProvider,
|
|
113
209
|
{
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
{
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
[LinkContext, {
|
|
129
|
-
size: "sm",
|
|
130
|
-
variant: "primary",
|
|
131
|
-
isQuiet: true
|
|
132
|
-
}]
|
|
133
|
-
],
|
|
134
|
-
children: content
|
|
135
|
-
}
|
|
136
|
-
)
|
|
210
|
+
values: [
|
|
211
|
+
[LabelContext, {
|
|
212
|
+
className: ComboBox_module_default["hop-ComboBox__label"],
|
|
213
|
+
isRequired,
|
|
214
|
+
necessityIndicator
|
|
215
|
+
}],
|
|
216
|
+
[HelperMessageContext, {
|
|
217
|
+
className: ComboBox_module_default["hop-ComboBox__helper-message"]
|
|
218
|
+
}],
|
|
219
|
+
[ErrorMessageContext, {
|
|
220
|
+
className: ComboBox_module_default["hop-ComboBox__error-message"]
|
|
221
|
+
}]
|
|
222
|
+
],
|
|
223
|
+
children: fieldChildren
|
|
137
224
|
}
|
|
138
|
-
)
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
[
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
className:
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
225
|
+
),
|
|
226
|
+
/* @__PURE__ */ jsxs(
|
|
227
|
+
Group,
|
|
228
|
+
{
|
|
229
|
+
...otherTriggerProps,
|
|
230
|
+
ref: triggerRef,
|
|
231
|
+
className: triggerClassNames,
|
|
232
|
+
style: triggerStyle,
|
|
233
|
+
onMouseDown: handleMouseDown,
|
|
234
|
+
"data-selected": isOpen || void 0,
|
|
235
|
+
children: [
|
|
236
|
+
prefixMarkup,
|
|
237
|
+
/* @__PURE__ */ jsx(
|
|
238
|
+
Input,
|
|
239
|
+
{
|
|
240
|
+
ref: mergedInputRefs,
|
|
241
|
+
className: inputClassNames,
|
|
242
|
+
placeholder
|
|
243
|
+
}
|
|
244
|
+
),
|
|
245
|
+
/* @__PURE__ */ jsx(Button, { className: buttonClassNames, ref: buttonRef, children: /* @__PURE__ */ jsx(ButtonIcon, { size: "sm", className: ComboBox_module_default["hop-ComboBox__button-icon"] }) })
|
|
246
|
+
]
|
|
247
|
+
}
|
|
248
|
+
),
|
|
249
|
+
/* @__PURE__ */ jsxs(
|
|
250
|
+
_Popover,
|
|
251
|
+
{
|
|
252
|
+
...otherPopoverProps,
|
|
253
|
+
placement,
|
|
254
|
+
isNonDialog: true,
|
|
255
|
+
autoWidth: isAutoMenuWidth,
|
|
256
|
+
style: popoverStyle,
|
|
257
|
+
triggerRef,
|
|
258
|
+
children: [
|
|
259
|
+
/* @__PURE__ */ jsx(
|
|
260
|
+
SlotProvider,
|
|
261
|
+
{
|
|
262
|
+
values: [
|
|
263
|
+
[BadgeContext, {
|
|
264
|
+
variant: "secondary"
|
|
265
|
+
}]
|
|
266
|
+
],
|
|
267
|
+
children: /* @__PURE__ */ jsx(_ListBox, { ...listBoxProps, items, size, isInvalid, children })
|
|
268
|
+
}
|
|
269
|
+
),
|
|
270
|
+
footerMarkup
|
|
271
|
+
]
|
|
272
|
+
}
|
|
273
|
+
)
|
|
274
|
+
] });
|
|
172
275
|
}
|
|
173
276
|
}
|
|
174
277
|
);
|
|
175
278
|
}
|
|
176
|
-
var
|
|
177
|
-
|
|
279
|
+
var _ComboBox = forwardRef(ComboBox);
|
|
280
|
+
_ComboBox.displayName = "ComboBox";
|
|
281
|
+
var CompoundComboBox = Object.assign(_ComboBox, {
|
|
282
|
+
/**
|
|
283
|
+
* A combo box option is an item that is displayed in a combo box.
|
|
284
|
+
*
|
|
285
|
+
* [View Documentation](TODO)
|
|
286
|
+
*/
|
|
287
|
+
Option: _ListBoxItem
|
|
288
|
+
});
|
|
289
|
+
|
|
290
|
+
// css-module:./Form.module.css#css-module
|
|
291
|
+
var Form_module_default = { "hop-Form": "Form-module__hop-Form___Rl7Xh" };
|
|
292
|
+
var GlobalFormCssSelector = "hop-Form";
|
|
293
|
+
function Form(props, ref) {
|
|
294
|
+
var _a;
|
|
295
|
+
[props, ref] = useContextProps(props, ref, FormContext);
|
|
296
|
+
const { stylingProps, ...ownProps } = useStyledSystem(props);
|
|
297
|
+
const {
|
|
298
|
+
className,
|
|
299
|
+
children,
|
|
300
|
+
style,
|
|
301
|
+
isFluid,
|
|
302
|
+
isDisabled,
|
|
303
|
+
necessityIndicator,
|
|
304
|
+
size: sizeProp,
|
|
305
|
+
...otherProps
|
|
306
|
+
} = ownProps;
|
|
307
|
+
const size = (_a = useResponsiveValue(sizeProp)) != null ? _a : "md";
|
|
308
|
+
const classNames = clsx2(
|
|
309
|
+
GlobalFormCssSelector,
|
|
310
|
+
cssModule(
|
|
311
|
+
Form_module_default,
|
|
312
|
+
"hop-Form"
|
|
313
|
+
),
|
|
314
|
+
stylingProps.className,
|
|
315
|
+
className
|
|
316
|
+
);
|
|
317
|
+
const mergedStyles = {
|
|
318
|
+
...stylingProps.style,
|
|
319
|
+
...style
|
|
320
|
+
};
|
|
321
|
+
return /* @__PURE__ */ jsx(
|
|
322
|
+
SlotProvider,
|
|
323
|
+
{
|
|
324
|
+
values: [
|
|
325
|
+
[LabelContext, {
|
|
326
|
+
necessityIndicator
|
|
327
|
+
}],
|
|
328
|
+
[TextFieldContext, {
|
|
329
|
+
isDisabled,
|
|
330
|
+
isFluid,
|
|
331
|
+
necessityIndicator,
|
|
332
|
+
size
|
|
333
|
+
}],
|
|
334
|
+
[PasswordFieldContext, {
|
|
335
|
+
isDisabled,
|
|
336
|
+
isFluid,
|
|
337
|
+
necessityIndicator,
|
|
338
|
+
size
|
|
339
|
+
}],
|
|
340
|
+
[SearchFieldContext, {
|
|
341
|
+
isDisabled,
|
|
342
|
+
isFluid,
|
|
343
|
+
necessityIndicator,
|
|
344
|
+
size
|
|
345
|
+
}],
|
|
346
|
+
[NumberFieldContext, {
|
|
347
|
+
isDisabled,
|
|
348
|
+
necessityIndicator,
|
|
349
|
+
size,
|
|
350
|
+
isFluid
|
|
351
|
+
}],
|
|
352
|
+
[TextAreaContext, {
|
|
353
|
+
isDisabled,
|
|
354
|
+
necessityIndicator,
|
|
355
|
+
size,
|
|
356
|
+
isFluid
|
|
357
|
+
}],
|
|
358
|
+
[RadioGroupContext, {
|
|
359
|
+
isDisabled,
|
|
360
|
+
necessityIndicator,
|
|
361
|
+
size
|
|
362
|
+
}],
|
|
363
|
+
[CheckboxContext, {
|
|
364
|
+
isDisabled,
|
|
365
|
+
size
|
|
366
|
+
}],
|
|
367
|
+
[CheckboxFieldContext, {
|
|
368
|
+
isDisabled,
|
|
369
|
+
size
|
|
370
|
+
}],
|
|
371
|
+
[CheckboxGroupContext, {
|
|
372
|
+
isDisabled,
|
|
373
|
+
necessityIndicator,
|
|
374
|
+
size
|
|
375
|
+
}],
|
|
376
|
+
[ButtonContext$1, { isDisabled, size }]
|
|
377
|
+
],
|
|
378
|
+
children: /* @__PURE__ */ jsx(
|
|
379
|
+
SlotProvider,
|
|
380
|
+
{
|
|
381
|
+
values: [
|
|
382
|
+
[SelectContext, {
|
|
383
|
+
isDisabled,
|
|
384
|
+
isFluid,
|
|
385
|
+
necessityIndicator,
|
|
386
|
+
size
|
|
387
|
+
}],
|
|
388
|
+
[ComboBoxContext, {
|
|
389
|
+
isDisabled,
|
|
390
|
+
isFluid,
|
|
391
|
+
necessityIndicator,
|
|
392
|
+
size
|
|
393
|
+
}],
|
|
394
|
+
[TagGroupContext, {
|
|
395
|
+
necessityIndicator,
|
|
396
|
+
size
|
|
397
|
+
}]
|
|
398
|
+
],
|
|
399
|
+
children: /* @__PURE__ */ jsx(
|
|
400
|
+
Form$1,
|
|
401
|
+
{
|
|
402
|
+
...otherProps,
|
|
403
|
+
ref,
|
|
404
|
+
className: classNames,
|
|
405
|
+
style: mergedStyles,
|
|
406
|
+
children
|
|
407
|
+
}
|
|
408
|
+
)
|
|
409
|
+
}
|
|
410
|
+
)
|
|
411
|
+
}
|
|
412
|
+
);
|
|
413
|
+
}
|
|
414
|
+
var _Form = forwardRef(Form);
|
|
415
|
+
_Form.displayName = "Form";
|
|
178
416
|
|
|
179
417
|
// css-module:./Select.module.css#css-module
|
|
180
|
-
var Select_module_default = { "hop-Select": "Select-module__hop-
|
|
418
|
+
var Select_module_default = { "hop-Select": "Select-module__hop-Select___AMNli", "hop-Select--fluid": "Select-module__hop-Select--fluid___jUF7o", "hop-Select__label": "Select-module__hop-Select__label___aVTIZ", "hop-Select__button": "Select-module__hop-Select__button___IBqk7", "hop-Select__button--sm": "Select-module__hop-Select__button--sm___4EgDS", "hop-Select__button--md": "Select-module__hop-Select__button--md___RbAAS", "hop-Select__prefix": "Select-module__hop-Select__prefix___B-SAK", "hop-Select__button-icon": "Select-module__hop-Select__button-icon___K2aVv", "hop-Select__helper-message": "Select-module__hop-Select__helper-message___Io94e", "hop-Select__error-message": "Select-module__hop-Select__error-message___EyV6Y" };
|
|
181
419
|
var GlobalSelectCssSelector = "hop-Select";
|
|
182
420
|
function Select(props, ref) {
|
|
183
421
|
var _a, _b;
|
|
@@ -191,8 +429,10 @@ function Select(props, ref) {
|
|
|
191
429
|
isAutoMenuWidth,
|
|
192
430
|
isFluid: isFluidProp,
|
|
193
431
|
isInvalid,
|
|
432
|
+
isRequired,
|
|
194
433
|
items,
|
|
195
434
|
listBoxProps,
|
|
435
|
+
necessityIndicator,
|
|
196
436
|
popoverProps,
|
|
197
437
|
prefix,
|
|
198
438
|
renderValue,
|
|
@@ -264,7 +504,7 @@ function Select(props, ref) {
|
|
|
264
504
|
values: [
|
|
265
505
|
TextContext$1,
|
|
266
506
|
TextContext,
|
|
267
|
-
ButtonContext
|
|
507
|
+
ButtonContext
|
|
268
508
|
],
|
|
269
509
|
children: /* @__PURE__ */ jsx(_Footer, { children: /* @__PURE__ */ jsx(EnsureTextWrapper, { children: footer }) })
|
|
270
510
|
}
|
|
@@ -279,6 +519,7 @@ function Select(props, ref) {
|
|
|
279
519
|
className: classNames,
|
|
280
520
|
style,
|
|
281
521
|
isInvalid,
|
|
522
|
+
isRequired,
|
|
282
523
|
children: (selectRenderProps) => {
|
|
283
524
|
const { isOpen } = selectRenderProps;
|
|
284
525
|
const ButtonIcon = isOpen ? AngleUpIcon : AngleDownIcon;
|
|
@@ -288,7 +529,9 @@ function Select(props, ref) {
|
|
|
288
529
|
{
|
|
289
530
|
values: [
|
|
290
531
|
[LabelContext, {
|
|
291
|
-
className: Select_module_default["hop-Select__label"]
|
|
532
|
+
className: Select_module_default["hop-Select__label"],
|
|
533
|
+
isRequired,
|
|
534
|
+
necessityIndicator
|
|
292
535
|
}],
|
|
293
536
|
[HelperMessageContext, {
|
|
294
537
|
className: Select_module_default["hop-Select__helper-message"]
|
|
@@ -746,97 +989,138 @@ function $f86e6c1ec7da6ebb$export$bc3384a35de93d66(options) {
|
|
|
746
989
|
};
|
|
747
990
|
}
|
|
748
991
|
|
|
749
|
-
// css-module:./
|
|
750
|
-
var
|
|
751
|
-
var
|
|
752
|
-
function
|
|
992
|
+
// css-module:./Popover.module.css#css-module
|
|
993
|
+
var Popover_module_default = { "hop-Popover": "Popover-module__hop-Popover___TOPh7", "fade": "Popover-module__fade___p9ae1", "hop-Popover__wrapper": "Popover-module__hop-Popover__wrapper___XkYRn", "hop-Popover__dialog": "Popover-module__hop-Popover__dialog___GeK8F", "hop-Popover__dropdown": "Popover-module__hop-Popover__dropdown___94G4Y", "hop-Popover__title": "Popover-module__hop-Popover__title___mjfD0", "hop-Popover__content": "Popover-module__hop-Popover__content___8Umes", "hop-Popover__list-box": "Popover-module__hop-Popover__list-box___72zOL", "hop-Popover__footer": "Popover-module__hop-Popover__footer___tnRWy", "hop-Popover__actions": "Popover-module__hop-Popover__actions___fPIhT", "hop-Popover__action": "Popover-module__hop-Popover__action___i6-dH" };
|
|
994
|
+
var GlobalPopoverCssSelector = "hop-Popover";
|
|
995
|
+
function Popover(props, ref) {
|
|
753
996
|
var _a;
|
|
754
|
-
[props, ref] = useContextProps(props, ref,
|
|
997
|
+
[props, ref] = useContextProps(props, ref, PopoverContext);
|
|
755
998
|
const { stylingProps, ...ownProps } = useStyledSystem(props);
|
|
756
999
|
const {
|
|
757
|
-
|
|
1000
|
+
autoWidth,
|
|
758
1001
|
children,
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
1002
|
+
className,
|
|
1003
|
+
offset = 4,
|
|
1004
|
+
boundaryOffset,
|
|
1005
|
+
isNonDialog,
|
|
1006
|
+
containerPadding = 16,
|
|
1007
|
+
containerProps,
|
|
1008
|
+
placement: placementProp,
|
|
1009
|
+
style: styleProp,
|
|
763
1010
|
...otherProps
|
|
764
1011
|
} = ownProps;
|
|
765
|
-
const
|
|
766
|
-
const
|
|
767
|
-
|
|
1012
|
+
const placement = (_a = useResponsiveValue(placementProp)) != null ? _a : "bottom";
|
|
1013
|
+
const { stylingProps: containerStylingProps, ...containerOwnProps } = useStyledSystem(containerProps != null ? containerProps : {});
|
|
1014
|
+
const {
|
|
1015
|
+
className: containerClassName,
|
|
1016
|
+
style: containerStyleProp,
|
|
1017
|
+
slot,
|
|
1018
|
+
...containerOtherProps
|
|
1019
|
+
} = containerOwnProps;
|
|
1020
|
+
const { colorScheme } = useColorSchemeContext();
|
|
1021
|
+
const popoverClassNames = composeClassnameRenderProps(
|
|
1022
|
+
className,
|
|
1023
|
+
GlobalPopoverCssSelector,
|
|
768
1024
|
cssModule(
|
|
769
|
-
|
|
770
|
-
"hop-
|
|
1025
|
+
Popover_module_default,
|
|
1026
|
+
"hop-Popover",
|
|
1027
|
+
isNonDialog && "non-dialog"
|
|
771
1028
|
),
|
|
772
|
-
stylingProps.className
|
|
773
|
-
className
|
|
1029
|
+
stylingProps.className
|
|
774
1030
|
);
|
|
775
|
-
const
|
|
776
|
-
|
|
777
|
-
|
|
1031
|
+
const containerClassNames = isNonDialog ? clsx2(containerClassName, Popover_module_default["hop-Popover__dropdown"], containerStylingProps.className) : clsx2(containerClassName, Popover_module_default["hop-Popover__dialog"], containerStylingProps.className);
|
|
1032
|
+
const style = composeRenderProps(styleProp, (prev) => {
|
|
1033
|
+
return {
|
|
1034
|
+
...stylingProps.style,
|
|
1035
|
+
"--container-padding": `${containerPadding}px`,
|
|
1036
|
+
...prev
|
|
1037
|
+
};
|
|
1038
|
+
});
|
|
1039
|
+
const containerStyle = {
|
|
1040
|
+
...containerStylingProps.style,
|
|
1041
|
+
...containerStyleProp
|
|
778
1042
|
};
|
|
779
1043
|
return /* @__PURE__ */ jsx(
|
|
780
|
-
|
|
1044
|
+
Popover$1,
|
|
781
1045
|
{
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
size
|
|
823
|
-
}],
|
|
824
|
-
[ButtonContext, { isDisabled, size }]
|
|
825
|
-
],
|
|
826
|
-
children: /* @__PURE__ */ jsx(
|
|
827
|
-
Form$1,
|
|
828
|
-
{
|
|
829
|
-
...otherProps,
|
|
830
|
-
ref,
|
|
831
|
-
className: classNames,
|
|
832
|
-
style: mergedStyles,
|
|
833
|
-
children
|
|
1046
|
+
...otherProps,
|
|
1047
|
+
offset,
|
|
1048
|
+
ref,
|
|
1049
|
+
className: popoverClassNames,
|
|
1050
|
+
arrowBoundaryOffset: boundaryOffset,
|
|
1051
|
+
"data-auto-width": autoWidth || void 0,
|
|
1052
|
+
containerPadding,
|
|
1053
|
+
style,
|
|
1054
|
+
placement,
|
|
1055
|
+
children: (state) => {
|
|
1056
|
+
const content = isFunction(children) && !isNil(children) ? children(state) : children;
|
|
1057
|
+
if (isNonDialog) {
|
|
1058
|
+
return /* @__PURE__ */ jsx(_HopperProvider, { colorScheme, className: Popover_module_default["hop-Popover__wrapper"], children: /* @__PURE__ */ jsx(
|
|
1059
|
+
"div",
|
|
1060
|
+
{
|
|
1061
|
+
...containerOtherProps,
|
|
1062
|
+
className: containerClassNames,
|
|
1063
|
+
style: containerStyle,
|
|
1064
|
+
slot: slot || void 0,
|
|
1065
|
+
children: /* @__PURE__ */ jsx(
|
|
1066
|
+
SlotProvider,
|
|
1067
|
+
{
|
|
1068
|
+
values: [
|
|
1069
|
+
[ListBoxContext, {
|
|
1070
|
+
className: Popover_module_default["hop-Popover__list-box"]
|
|
1071
|
+
}],
|
|
1072
|
+
[FooterContext, {
|
|
1073
|
+
className: Popover_module_default["hop-Popover__footer"]
|
|
1074
|
+
}],
|
|
1075
|
+
[LinkContext, {
|
|
1076
|
+
size: "sm",
|
|
1077
|
+
variant: "primary",
|
|
1078
|
+
isQuiet: true
|
|
1079
|
+
}]
|
|
1080
|
+
],
|
|
1081
|
+
children: content
|
|
1082
|
+
}
|
|
1083
|
+
)
|
|
1084
|
+
}
|
|
1085
|
+
) });
|
|
834
1086
|
}
|
|
835
|
-
|
|
1087
|
+
return /* @__PURE__ */ jsx(_HopperProvider, { colorScheme, children: /* @__PURE__ */ jsx(Dialog, { ...containerOtherProps, className: containerClassNames, style: containerStyle, children: /* @__PURE__ */ jsx(
|
|
1088
|
+
SlotProvider,
|
|
1089
|
+
{
|
|
1090
|
+
values: [
|
|
1091
|
+
[HeadingContext, {
|
|
1092
|
+
className: Popover_module_default["hop-Popover__title"],
|
|
1093
|
+
size: "xs"
|
|
1094
|
+
}],
|
|
1095
|
+
[ButtonContext$1, {
|
|
1096
|
+
size: "sm",
|
|
1097
|
+
className: Popover_module_default["hop-Popover__action"]
|
|
1098
|
+
}],
|
|
1099
|
+
[ButtonGroupContext, {
|
|
1100
|
+
size: "sm",
|
|
1101
|
+
align: "end",
|
|
1102
|
+
className: Popover_module_default["hop-Popover__actions"]
|
|
1103
|
+
}],
|
|
1104
|
+
[ContentContext, {
|
|
1105
|
+
className: Popover_module_default["hop-Popover__content"]
|
|
1106
|
+
}],
|
|
1107
|
+
[FooterContext, {
|
|
1108
|
+
className: Popover_module_default["hop-Popover__footer"]
|
|
1109
|
+
}],
|
|
1110
|
+
[LinkContext, {
|
|
1111
|
+
size: "sm",
|
|
1112
|
+
variant: "primary",
|
|
1113
|
+
isQuiet: true
|
|
1114
|
+
}]
|
|
1115
|
+
],
|
|
1116
|
+
children: content
|
|
1117
|
+
}
|
|
1118
|
+
) }) });
|
|
1119
|
+
}
|
|
836
1120
|
}
|
|
837
1121
|
);
|
|
838
1122
|
}
|
|
839
|
-
var
|
|
840
|
-
|
|
1123
|
+
var _Popover = forwardRef(Popover);
|
|
1124
|
+
_Popover.displayName = "Popover";
|
|
841
1125
|
|
|
842
|
-
export { $f86e6c1ec7da6ebb$export$bc3384a35de93d66, CompoundSelect, GlobalFormCssSelector, GlobalPopoverCssSelector, GlobalSelectCssSelector, _Form, _Popover };
|
|
1126
|
+
export { $f86e6c1ec7da6ebb$export$bc3384a35de93d66, CompoundComboBox, CompoundSelect, GlobalComboBoxCssSelector, GlobalFormCssSelector, GlobalPopoverCssSelector, GlobalSelectCssSelector, _Form, _Popover };
|