@hopper-ui/components 1.0.2 → 1.0.3
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 +7 -0
- package/dist/HopperProvider/src/HopperProvider.js +1 -1
- package/dist/HopperProvider/src/index.js +1 -1
- package/dist/IconList/src/IconList.css +1 -1
- package/dist/IconList/src/IconList.js +2 -2
- package/dist/IconList/src/IconListContext.js +1 -1
- package/dist/IconList/src/index.css +1 -1
- package/dist/IconList/src/index.js +2 -2
- package/dist/Link/src/Link.css +32 -32
- package/dist/Link/src/Link.js +7 -7
- package/dist/Link/src/LinkContext.js +1 -1
- package/dist/Link/src/index.css +32 -32
- package/dist/Link/src/index.js +7 -7
- package/dist/Spinner/src/Spinner.css +29 -29
- package/dist/Spinner/src/Spinner.js +5 -5
- package/dist/Spinner/src/SpinnerContext.js +1 -1
- package/dist/Spinner/src/index.css +29 -29
- package/dist/Spinner/src/index.js +5 -5
- package/dist/badge/src/Badge.css +80 -0
- package/dist/badge/src/Badge.d.ts +26 -0
- package/dist/badge/src/Badge.js +6 -0
- package/dist/badge/src/BadgeContext.d.ts +10 -0
- package/dist/badge/src/BadgeContext.js +2 -0
- package/dist/badge/src/index.css +80 -0
- package/dist/badge/src/index.d.ts +7 -0
- package/dist/badge/src/index.js +6 -0
- package/dist/buttons/src/Button.css +120 -120
- package/dist/buttons/src/Button.d.ts +1 -1
- package/dist/buttons/src/Button.js +11 -11
- package/dist/buttons/src/ButtonContext.js +1 -1
- package/dist/buttons/src/ButtonGroup.css +11 -11
- package/dist/buttons/src/ButtonGroup.d.ts +1 -1
- package/dist/buttons/src/ButtonGroup.js +6 -83
- package/dist/buttons/src/ButtonGroupContext.js +1 -1
- package/dist/buttons/src/ClearButton.css +76 -40
- package/dist/buttons/src/ClearButton.d.ts +4 -3
- package/dist/buttons/src/ClearButton.js +6 -3
- package/dist/buttons/src/ClearButtonContext.d.ts +1 -0
- package/dist/buttons/src/ClearButtonContext.js +1 -1
- package/dist/buttons/src/EmbeddedButton.css +102 -0
- package/dist/buttons/src/EmbeddedButton.d.ts +20 -0
- package/dist/buttons/src/EmbeddedButton.js +6 -0
- package/dist/buttons/src/EmbeddedButtonContext.d.ts +8 -0
- package/dist/buttons/src/EmbeddedButtonContext.js +2 -0
- package/dist/buttons/src/index.css +236 -161
- package/dist/buttons/src/index.d.ts +5 -0
- package/dist/buttons/src/index.js +17 -13
- package/dist/checkbox/src/Checkbox.css +39 -35
- package/dist/checkbox/src/Checkbox.js +6 -6
- package/dist/checkbox/src/CheckboxContext.js +1 -1
- package/dist/checkbox/src/CheckboxField.css +16 -16
- package/dist/checkbox/src/CheckboxField.js +5 -5
- package/dist/checkbox/src/CheckboxFieldContext.js +1 -1
- package/dist/checkbox/src/CheckboxGroup.css +79 -75
- package/dist/checkbox/src/CheckboxGroup.js +5 -5
- package/dist/checkbox/src/CheckboxGroupContext.js +1 -1
- package/dist/checkbox/src/CheckboxList.js +1 -1
- package/dist/checkbox/src/CheckboxListContext.js +1 -1
- package/dist/checkbox/src/index.css +79 -75
- package/dist/checkbox/src/index.js +10 -10
- package/dist/chip/src/Chip.css +34 -34
- package/dist/chip/src/Chip.js +5 -5
- package/dist/chip/src/ChipContext.js +1 -1
- package/dist/chip/src/index.css +34 -34
- package/dist/chip/src/index.js +5 -5
- package/dist/{chunk-YSQDPG26.js → chunk-2P3A4VVY.js} +6 -1
- package/dist/{chunk-FJ4WILCG.js → chunk-2VBOJKEP.js} +2 -2
- package/dist/{chunk-N2QZWPQF.js → chunk-3DWVMCIV.js} +2 -2
- package/dist/chunk-3NKF5TPD.js +7 -0
- package/dist/{chunk-IYQZFIWZ.js → chunk-3XFTRBIC.js} +4 -4
- package/dist/{chunk-2NABNL6G.js → chunk-4RIAVSLK.js} +3 -3
- package/dist/chunk-5EPNXRCT.js +44 -0
- package/dist/chunk-6BFSSZCY.js +7 -0
- package/dist/{chunk-LKE4VXIP.js → chunk-7NT6M6KM.js} +5 -5
- package/dist/chunk-AQITZWYM.js +43 -0
- package/dist/chunk-BAKCRZAG.js +82 -0
- package/dist/{chunk-NUUG5PFN.js → chunk-CTK5YVBZ.js} +2 -2
- package/dist/chunk-CTOL6AVF.js +156 -0
- package/dist/chunk-D6UTDI2K.js +28 -0
- package/dist/{chunk-GYK77A5U.js → chunk-DJU2DUTQ.js} +5 -4
- package/dist/{chunk-S67EVV3J.js → chunk-DLTYFRKN.js} +5 -5
- package/dist/{chunk-6JSCWDLJ.js → chunk-EE75ND6V.js} +4 -4
- package/dist/chunk-EWMWQ2MC.js +7 -0
- package/dist/chunk-GF2U6E4D.js +56 -0
- package/dist/chunk-GXBVNCVP.js +43 -0
- package/dist/{chunk-LL2FMAAO.js → chunk-H6CDFWVR.js} +9 -3
- package/dist/chunk-I67NHYK4.js +7 -0
- package/dist/{chunk-FAXZNX63.js → chunk-IOLNBXZM.js} +6 -5
- package/dist/chunk-IXB2WK56.js +7 -0
- package/dist/{chunk-TOCGJB3X.js → chunk-JLF7DSUY.js} +5 -5
- package/dist/{chunk-XTRE6FPK.js → chunk-JLFHTZUA.js} +5 -5
- package/dist/chunk-LCAS3YQV.js +7 -0
- package/dist/chunk-LJXTJRSB.js +1 -0
- package/dist/chunk-LYV2D5RZ.js +69 -0
- package/dist/chunk-O4XPUINW.js +7 -0
- package/dist/chunk-O7IJYNVQ.js +7 -0
- package/dist/chunk-OGMLQRES.js +91 -0
- package/dist/chunk-OQW6BT6B.js +373 -0
- package/dist/{chunk-O2WSE3EM.js → chunk-OUN5KSHD.js} +4 -4
- package/dist/{chunk-HVKOIMMW.js → chunk-QCA3ZR56.js} +1 -1
- package/dist/chunk-QW45G6K4.js +7 -0
- package/dist/chunk-RXBKOHT2.js +83 -0
- package/dist/chunk-SC6ZK5ON.js +7 -0
- package/dist/chunk-TIPN4VYD.js +46 -0
- package/dist/chunk-TXZ6BMFR.js +7 -0
- package/dist/chunk-UARL5M2W.js +32 -0
- package/dist/{chunk-M67A5LAA.js → chunk-UY7WQ7TC.js} +9 -9
- package/dist/{chunk-RLIG2IHH.js → chunk-WLSLSMK7.js} +3 -3
- package/dist/chunk-WPNVVGFW.js +7 -0
- package/dist/chunk-WWRB4K4M.js +44 -0
- package/dist/{chunk-OE5BLFZI.js → chunk-X6SER3TZ.js} +1 -1
- package/dist/{chunk-CK42RJLK.js → chunk-XFKAXBB5.js} +5 -5
- package/dist/{chunk-MICIYADH.js → chunk-XIOIAME2.js} +1 -1
- package/dist/chunk-XLKYXKWE.js +7 -0
- package/dist/chunk-Y7HUXUHX.js +30 -0
- package/dist/chunk-YQHNOQ3N.js +96 -0
- package/dist/chunk-Z3ID4UEE.js +55 -0
- package/dist/chunk-ZSFJVMJN.js +7 -0
- package/dist/errorMessage/src/ErrorMessage.css +12 -12
- package/dist/errorMessage/src/ErrorMessage.d.ts +1 -1
- package/dist/errorMessage/src/ErrorMessage.js +5 -5
- package/dist/errorMessage/src/ErrorMessageContext.d.ts +1 -1
- package/dist/errorMessage/src/ErrorMessageContext.js +1 -1
- package/dist/errorMessage/src/index.css +12 -12
- package/dist/errorMessage/src/index.d.ts +1 -1
- package/dist/errorMessage/src/index.js +5 -5
- package/dist/helperMessage/src/HelperMessage.css +12 -12
- package/dist/helperMessage/src/HelperMessage.d.ts +1 -1
- package/dist/helperMessage/src/HelperMessage.js +5 -5
- package/dist/helperMessage/src/HelperMessageContext.d.ts +1 -1
- package/dist/helperMessage/src/HelperMessageContext.js +1 -1
- package/dist/helperMessage/src/index.css +12 -12
- package/dist/helperMessage/src/index.d.ts +1 -1
- package/dist/helperMessage/src/index.js +5 -5
- package/dist/i18n/src/index.js +2 -2
- package/dist/i18n/src/useLocalizedString.js +2 -2
- package/dist/inputs/src/InputGroup.css +111 -0
- package/dist/inputs/src/InputGroup.d.ts +24 -0
- package/dist/inputs/src/InputGroup.js +6 -0
- package/dist/inputs/src/InputGroupContext.d.ts +8 -0
- package/dist/inputs/src/InputGroupContext.js +2 -0
- package/dist/inputs/src/PasswordField.css +2527 -0
- package/dist/inputs/src/PasswordField.d.ts +33 -0
- package/dist/inputs/src/PasswordField.js +186 -0
- package/dist/inputs/src/PasswordFieldContext.d.ts +8 -0
- package/dist/inputs/src/PasswordFieldContext.js +2 -0
- package/dist/inputs/src/SearchField.css +2548 -0
- package/dist/inputs/src/SearchField.d.ts +42 -0
- package/dist/inputs/src/SearchField.js +186 -0
- package/dist/inputs/src/SearchFieldContext.d.ts +8 -0
- package/dist/inputs/src/SearchFieldContext.js +2 -0
- package/dist/inputs/src/TextField.css +2531 -0
- package/dist/inputs/src/TextField.d.ts +49 -0
- package/dist/inputs/src/TextField.js +79 -0
- package/dist/inputs/src/TextFieldContext.d.ts +8 -0
- package/dist/inputs/src/TextFieldContext.js +2 -0
- package/dist/inputs/src/index.css +2531 -0
- package/dist/inputs/src/index.d.ts +7 -0
- package/dist/inputs/src/index.js +79 -0
- package/dist/layout/src/Content.d.ts +17 -0
- package/dist/layout/src/Content.js +3 -0
- package/dist/layout/src/ContentContext.d.ts +10 -0
- package/dist/layout/src/ContentContext.js +2 -0
- package/dist/layout/src/Flex.js +1 -1
- package/dist/layout/src/Footer.d.ts +17 -0
- package/dist/layout/src/Footer.js +3 -0
- package/dist/layout/src/FooterContext.d.ts +10 -0
- package/dist/layout/src/FooterContext.js +2 -0
- package/dist/layout/src/Grid.js +2 -55
- package/dist/layout/src/Inline.js +3 -31
- package/dist/layout/src/Stack.js +3 -29
- package/dist/overlays/Popover/src/Popover.css +2456 -0
- package/dist/overlays/Popover/src/Popover.d.ts +20 -0
- package/dist/overlays/Popover/src/Popover.js +76 -0
- package/dist/overlays/Popover/src/PopoverContext.d.ts +9 -0
- package/dist/overlays/Popover/src/PopoverContext.js +2 -0
- package/dist/overlays/Popover/src/index.css +2456 -0
- package/dist/overlays/Popover/src/index.d.ts +6 -0
- package/dist/overlays/Popover/src/index.js +76 -0
- package/dist/radio/src/Radio.css +31 -31
- package/dist/radio/src/Radio.js +6 -6
- package/dist/radio/src/RadioContext.js +1 -1
- package/dist/radio/src/RadioField.css +16 -16
- package/dist/radio/src/RadioField.js +5 -4
- package/dist/radio/src/RadioFieldContext.js +1 -1
- package/dist/radio/src/RadioGroup.css +137 -137
- package/dist/radio/src/RadioGroup.js +6 -6
- package/dist/radio/src/RadioGroupContext.js +1 -1
- package/dist/radio/src/RadioList.js +1 -1
- package/dist/radio/src/RadioListContext.js +1 -1
- package/dist/radio/src/index.css +71 -71
- package/dist/radio/src/index.js +11 -11
- package/dist/switch/src/Switch.css +26 -26
- package/dist/switch/src/Switch.js +6 -6
- package/dist/switch/src/SwitchContext.js +1 -1
- package/dist/switch/src/SwitchField.css +16 -16
- package/dist/switch/src/SwitchField.js +5 -5
- package/dist/switch/src/SwitchFieldContext.js +1 -1
- package/dist/switch/src/index.css +32 -32
- package/dist/switch/src/index.js +8 -8
- package/dist/tag/src/Tag.css +2380 -0
- package/dist/tag/src/Tag.d.ts +28 -0
- package/dist/tag/src/Tag.js +74 -0
- package/dist/tag/src/TagContext.d.ts +8 -0
- package/dist/tag/src/TagContext.js +2 -0
- package/dist/tag/src/TagGroup.css +239 -0
- package/dist/tag/src/TagGroup.d.ts +24 -0
- package/dist/tag/src/TagGroup.js +10 -0
- package/dist/tag/src/TagGroupContext.d.ts +8 -0
- package/dist/tag/src/TagGroupContext.js +2 -0
- package/dist/tag/src/TagList.d.ts +15 -0
- package/dist/tag/src/TagList.js +4 -0
- package/dist/tag/src/TagListContext.d.ts +8 -0
- package/dist/tag/src/TagListContext.js +2 -0
- package/dist/tag/src/index.css +2380 -0
- package/dist/tag/src/index.d.ts +9 -0
- package/dist/tag/src/index.js +74 -0
- package/dist/typography/Heading/src/Heading.css +2380 -0
- package/dist/typography/Heading/src/Heading.d.ts +57 -0
- package/dist/typography/Heading/src/Heading.js +74 -0
- package/dist/typography/Heading/src/HeadingContext.d.ts +8 -0
- package/dist/typography/Heading/src/HeadingContext.js +2 -0
- package/dist/typography/Heading/src/index.css +2380 -0
- package/dist/typography/Heading/src/index.d.ts +5 -0
- package/dist/typography/Heading/src/index.js +74 -0
- package/dist/{Label → typography/Label}/src/Label.css +14 -14
- package/dist/{Label → typography/Label}/src/Label.d.ts +2 -3
- package/dist/typography/Label/src/Label.js +4 -0
- package/dist/typography/Label/src/LabelContext.js +2 -0
- package/dist/{Label → typography/Label}/src/index.css +14 -14
- package/dist/{Label → typography/Label}/src/index.d.ts +1 -1
- package/dist/typography/Label/src/index.js +4 -0
- package/dist/typography/OverlineText/src/OverlineText.css +42 -0
- package/dist/typography/OverlineText/src/OverlineText.d.ts +15 -0
- package/dist/typography/OverlineText/src/OverlineText.js +4 -0
- package/dist/typography/OverlineText/src/OverlineTextContext.d.ts +8 -0
- package/dist/typography/OverlineText/src/OverlineTextContext.js +2 -0
- package/dist/typography/OverlineText/src/index.css +42 -0
- package/dist/typography/OverlineText/src/index.d.ts +5 -0
- package/dist/typography/OverlineText/src/index.js +4 -0
- package/dist/{Text → typography/Text}/src/Text.css +10 -10
- package/dist/typography/Text/src/Text.js +6 -0
- package/dist/typography/Text/src/TextContext.js +2 -0
- package/dist/{Text → typography/Text}/src/index.css +10 -10
- package/dist/typography/Text/src/index.js +6 -0
- package/dist/utils/src/ClearSlots.js +1 -1
- package/dist/utils/src/SlotProvider.js +1 -1
- package/dist/utils/src/assertion.d.ts +15 -0
- package/dist/utils/src/assertion.js +2 -0
- package/dist/utils/src/composeClassnameRenderProps.js +1 -1
- package/dist/utils/src/cssModule.js +1 -1
- package/dist/utils/src/index.d.ts +1 -0
- package/dist/utils/src/index.js +4 -3
- package/dist/utils/src/isTextOnlyChildren.js +1 -1
- package/dist/utils/src/useRenderProps.js +1 -1
- package/dist/utils/src/useSlot.js +1 -1
- package/package.json +13 -12
- package/dist/Label/src/Label.js +0 -4
- package/dist/Label/src/LabelContext.js +0 -2
- package/dist/Label/src/index.js +0 -4
- package/dist/Text/src/Text.js +0 -6
- package/dist/Text/src/TextContext.js +0 -2
- package/dist/Text/src/index.js +0 -6
- package/dist/chunk-DBTHMTO4.js +0 -56
- /package/dist/{Label → typography/Label}/src/LabelContext.d.ts +0 -0
- /package/dist/{Text → typography/Text}/src/Text.d.ts +0 -0
- /package/dist/{Text → typography/Text}/src/TextContext.d.ts +0 -0
- /package/dist/{Text → typography/Text}/src/index.d.ts +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { isTextOnlyChildren } from './chunk-ZWU6DRRZ.js';
|
|
2
|
-
import {
|
|
2
|
+
import { _Text } from './chunk-4RIAVSLK.js';
|
|
3
|
+
import { TextContext } from './chunk-X6SER3TZ.js';
|
|
3
4
|
import { composeClassnameRenderProps } from './chunk-65JPI4FL.js';
|
|
4
|
-
import {
|
|
5
|
-
import { TextContext } from './chunk-OE5BLFZI.js';
|
|
5
|
+
import { cssModule } from './chunk-KVDXQMWI.js';
|
|
6
6
|
import { SlotProvider } from './chunk-M36KANKC.js';
|
|
7
7
|
import { IconListContext } from './chunk-DHVVYSLB.js';
|
|
8
|
-
import {
|
|
8
|
+
import { LinkContext } from './chunk-4VVNSXIB.js';
|
|
9
9
|
import { IconContext } from '@hopper-ui/icons';
|
|
10
10
|
import { useStyledSystem, useResponsiveValue } from '@hopper-ui/styled-system';
|
|
11
11
|
import { forwardRef } from 'react';
|
|
@@ -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___vkXwU", "hop-Link--quiet": "Link-module__hop-Link--quiet___FEyKa", "hop-Link--primary": "Link-module__hop-Link--primary___KRkww", "hop-Link--secondary": "Link-module__hop-Link--secondary___OU7bb", "hop-Link__icon": "Link-module__hop-Link__icon___zgn-r", "hop-Link__icon-list": "Link-module__hop-Link__icon-list___tYGCE", "hop-Link__text": "Link-module__hop-Link__text___fxC1y", "hop-Link__start-icon": "Link-module__hop-Link__start-icon___jTw3J", "hop-Link__start-icon-list": "Link-module__hop-Link__start-icon-list___6uk1L" };
|
|
17
17
|
var GlobalLinkCssSelector = "hop-Link";
|
|
18
18
|
var LinkToIconSizeAdapter = {
|
|
19
19
|
inherit: void 0,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { EmbeddedButtonContext } from './chunk-O7IJYNVQ.js';
|
|
2
|
+
import { composeClassnameRenderProps } from './chunk-65JPI4FL.js';
|
|
3
|
+
import { cssModule } from './chunk-KVDXQMWI.js';
|
|
4
|
+
import { SlotProvider } from './chunk-M36KANKC.js';
|
|
5
|
+
import { IconContext } from '@hopper-ui/icons';
|
|
6
|
+
import { useStyledSystem, useResponsiveValue } from '@hopper-ui/styled-system';
|
|
7
|
+
import { forwardRef } from 'react';
|
|
8
|
+
import { useContextProps, composeRenderProps, Button } from 'react-aria-components';
|
|
9
|
+
import { jsx } from 'react/jsx-runtime';
|
|
10
|
+
|
|
11
|
+
// css-module:./EmbeddedButton.module.css#css-module
|
|
12
|
+
var EmbeddedButton_module_default = { "hop-EmbeddedButton": "EmbeddedButton-module__hop-EmbeddedButton___1uONR", "hop-EmbeddedButton--md": "EmbeddedButton-module__hop-EmbeddedButton--md___uix0V", "hop-EmbeddedButton--lg": "EmbeddedButton-module__hop-EmbeddedButton--lg___8U58d", "hop-EmbeddedButton__icon": "EmbeddedButton-module__hop-EmbeddedButton__icon___pPbur" };
|
|
13
|
+
var GlobalEmbeddedButtonCssSelector = "hop-EmbeddedButton";
|
|
14
|
+
function EmbeddedButton(props, ref) {
|
|
15
|
+
var _a;
|
|
16
|
+
[props, ref] = useContextProps(props, ref, EmbeddedButtonContext);
|
|
17
|
+
const { stylingProps, ...ownProps } = useStyledSystem(props);
|
|
18
|
+
const {
|
|
19
|
+
className,
|
|
20
|
+
size: sizeProp,
|
|
21
|
+
isDisabled,
|
|
22
|
+
style: styleProp,
|
|
23
|
+
children,
|
|
24
|
+
...otherProps
|
|
25
|
+
} = ownProps;
|
|
26
|
+
const size = (_a = useResponsiveValue(sizeProp)) != null ? _a : "md";
|
|
27
|
+
const classNames = composeClassnameRenderProps(
|
|
28
|
+
className,
|
|
29
|
+
GlobalEmbeddedButtonCssSelector,
|
|
30
|
+
cssModule(
|
|
31
|
+
EmbeddedButton_module_default,
|
|
32
|
+
"hop-EmbeddedButton",
|
|
33
|
+
size
|
|
34
|
+
),
|
|
35
|
+
stylingProps.className
|
|
36
|
+
);
|
|
37
|
+
const style = composeRenderProps(styleProp, (prev) => {
|
|
38
|
+
return {
|
|
39
|
+
...stylingProps.style,
|
|
40
|
+
...prev
|
|
41
|
+
};
|
|
42
|
+
});
|
|
43
|
+
return /* @__PURE__ */ jsx(
|
|
44
|
+
SlotProvider,
|
|
45
|
+
{
|
|
46
|
+
values: [
|
|
47
|
+
[IconContext, {
|
|
48
|
+
className: EmbeddedButton_module_default["hop-EmbeddedButton__icon"],
|
|
49
|
+
size: "sm"
|
|
50
|
+
}]
|
|
51
|
+
],
|
|
52
|
+
children: /* @__PURE__ */ jsx(
|
|
53
|
+
Button,
|
|
54
|
+
{
|
|
55
|
+
ref,
|
|
56
|
+
className: classNames,
|
|
57
|
+
style,
|
|
58
|
+
isDisabled,
|
|
59
|
+
...otherProps,
|
|
60
|
+
children
|
|
61
|
+
}
|
|
62
|
+
)
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
var _EmbeddedButton = forwardRef(EmbeddedButton);
|
|
67
|
+
_EmbeddedButton.displayName = "EmbeddedButton";
|
|
68
|
+
|
|
69
|
+
export { GlobalEmbeddedButtonCssSelector, _EmbeddedButton };
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { TagContext } from './chunk-EWMWQ2MC.js';
|
|
2
|
+
import { TagGroupContext } from './chunk-LCAS3YQV.js';
|
|
3
|
+
import { TagListContext } from './chunk-XLKYXKWE.js';
|
|
4
|
+
import { ErrorMessageContext } from './chunk-ACVMW6YD.js';
|
|
5
|
+
import { HelperMessageContext } from './chunk-ESVVLTEN.js';
|
|
6
|
+
import { LabelContext } from './chunk-QCA3ZR56.js';
|
|
7
|
+
import { cssModule } from './chunk-KVDXQMWI.js';
|
|
8
|
+
import { SlotProvider } from './chunk-M36KANKC.js';
|
|
9
|
+
import { useStyledSystem, useResponsiveValue } from '@hopper-ui/styled-system';
|
|
10
|
+
import clsx from 'clsx';
|
|
11
|
+
import { forwardRef } from 'react';
|
|
12
|
+
import { useContextProps, FieldErrorContext, TagGroup as TagGroup$1 } from 'react-aria-components';
|
|
13
|
+
import { jsx } from 'react/jsx-runtime';
|
|
14
|
+
|
|
15
|
+
// css-module:./TagGroup.module.css#css-module
|
|
16
|
+
var TagGroup_module_default = { "hop-TagGroup": "TagGroup-module__hop-TagGroup___-9K4-", "hop-TagGroup__label": "TagGroup-module__hop-TagGroup__label___HliMe", "hop-TagGroup__list": "TagGroup-module__hop-TagGroup__list___wzY6r", "hop-TagGroup__error-message": "TagGroup-module__hop-TagGroup__error-message___KGiI-", "hop-TagGroup__helper-message": "TagGroup-module__hop-TagGroup__helper-message___B4nYY" };
|
|
17
|
+
var GlobalTagGroupCssSelector = "hop-TagGroup";
|
|
18
|
+
function TagGroup(props, ref) {
|
|
19
|
+
var _a;
|
|
20
|
+
[props, ref] = useContextProps(props, ref, TagGroupContext);
|
|
21
|
+
const { stylingProps, ...ownProps } = useStyledSystem(props);
|
|
22
|
+
const {
|
|
23
|
+
className,
|
|
24
|
+
children,
|
|
25
|
+
isInvalid = false,
|
|
26
|
+
style: styleProp,
|
|
27
|
+
size: sizeProp,
|
|
28
|
+
...otherProps
|
|
29
|
+
} = ownProps;
|
|
30
|
+
const size = (_a = useResponsiveValue(sizeProp)) != null ? _a : "md";
|
|
31
|
+
const classNames = clsx(
|
|
32
|
+
className,
|
|
33
|
+
GlobalTagGroupCssSelector,
|
|
34
|
+
stylingProps.className,
|
|
35
|
+
cssModule(
|
|
36
|
+
TagGroup_module_default,
|
|
37
|
+
"hop-TagGroup",
|
|
38
|
+
size
|
|
39
|
+
)
|
|
40
|
+
);
|
|
41
|
+
const style = {
|
|
42
|
+
...stylingProps.style,
|
|
43
|
+
...styleProp
|
|
44
|
+
};
|
|
45
|
+
return /* @__PURE__ */ jsx(
|
|
46
|
+
SlotProvider,
|
|
47
|
+
{
|
|
48
|
+
values: [
|
|
49
|
+
[LabelContext, {
|
|
50
|
+
className: TagGroup_module_default["hop-TagGroup__label"],
|
|
51
|
+
size
|
|
52
|
+
}],
|
|
53
|
+
[TagListContext, {
|
|
54
|
+
className: TagGroup_module_default["hop-TagGroup__list"]
|
|
55
|
+
}],
|
|
56
|
+
[TagContext, {
|
|
57
|
+
className: TagGroup_module_default["hop-TagGroup__tag"],
|
|
58
|
+
isInvalid,
|
|
59
|
+
size
|
|
60
|
+
}],
|
|
61
|
+
[ErrorMessageContext, {
|
|
62
|
+
className: TagGroup_module_default["hop-TagGroup__error-message"],
|
|
63
|
+
hideIcon: true
|
|
64
|
+
}],
|
|
65
|
+
[HelperMessageContext, {
|
|
66
|
+
className: TagGroup_module_default["hop-TagGroup__helper-message"],
|
|
67
|
+
hideIcon: true
|
|
68
|
+
}],
|
|
69
|
+
[FieldErrorContext, {
|
|
70
|
+
isInvalid,
|
|
71
|
+
validationErrors: [],
|
|
72
|
+
validationDetails: {}
|
|
73
|
+
}]
|
|
74
|
+
],
|
|
75
|
+
children: /* @__PURE__ */ jsx(
|
|
76
|
+
TagGroup$1,
|
|
77
|
+
{
|
|
78
|
+
...otherProps,
|
|
79
|
+
ref,
|
|
80
|
+
className: classNames,
|
|
81
|
+
style,
|
|
82
|
+
children
|
|
83
|
+
}
|
|
84
|
+
)
|
|
85
|
+
}
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
var _TagGroup = forwardRef(TagGroup);
|
|
89
|
+
_TagGroup.displayName = "TagGroup";
|
|
90
|
+
|
|
91
|
+
export { GlobalTagGroupCssSelector, _TagGroup };
|
|
@@ -0,0 +1,373 @@
|
|
|
1
|
+
import { HeadingContext } from './chunk-TXZ6BMFR.js';
|
|
2
|
+
import { isArray, isDefined, isEmptyArray, isFunction, isNil, isNilOrEmpty, isNull, isNumber, isObject, isPlainObject, isPromise, isString, isUndefined } from './chunk-TIPN4VYD.js';
|
|
3
|
+
import { GlobalTagGroupCssSelector, _TagGroup } from './chunk-OGMLQRES.js';
|
|
4
|
+
import { TagContext } from './chunk-EWMWQ2MC.js';
|
|
5
|
+
import { TagGroupContext } from './chunk-LCAS3YQV.js';
|
|
6
|
+
import { GlobalTagListCssSelector, _TagList } from './chunk-WWRB4K4M.js';
|
|
7
|
+
import { TagListContext } from './chunk-XLKYXKWE.js';
|
|
8
|
+
import { GlobalRadioGroupCssSelector, _RadioGroup } from './chunk-7NT6M6KM.js';
|
|
9
|
+
import { RadioGroupContext } from './chunk-5MBJWRZD.js';
|
|
10
|
+
import { GlobalRadioListCssSelector, _RadioList } from './chunk-NKHMUPAP.js';
|
|
11
|
+
import { RadioListContext } from './chunk-A7TZHALP.js';
|
|
12
|
+
import { GlobalSwitchCssSelector, _Switch } from './chunk-XFKAXBB5.js';
|
|
13
|
+
import { GlobalSwitchFieldCssSelector, _SwitchField } from './chunk-OUN5KSHD.js';
|
|
14
|
+
import { SwitchFieldContext } from './chunk-H7VJS4MX.js';
|
|
15
|
+
import { SwitchContext } from './chunk-YHBJAXUY.js';
|
|
16
|
+
import { _Grid, fitContent, minmax, repeat } from './chunk-Z3ID4UEE.js';
|
|
17
|
+
import { _Inline } from './chunk-Y7HUXUHX.js';
|
|
18
|
+
import { _Stack } from './chunk-D6UTDI2K.js';
|
|
19
|
+
import { GlobalRadioCssSelector, _Radio } from './chunk-JLF7DSUY.js';
|
|
20
|
+
import { GlobalRadioFieldCssSelector, _RadioField } from './chunk-IOLNBXZM.js';
|
|
21
|
+
import { RadioContext } from './chunk-FU5CCPLP.js';
|
|
22
|
+
import { RadioFieldContext } from './chunk-DGLAGYBD.js';
|
|
23
|
+
import { _Content, GlobalContentCssSelector } from './chunk-GXBVNCVP.js';
|
|
24
|
+
import { ContentContext } from './chunk-IXB2WK56.js';
|
|
25
|
+
import { _Flex } from './chunk-TVFC2MJ4.js';
|
|
26
|
+
import { _Footer, GlobalFooterCssSelector } from './chunk-AQITZWYM.js';
|
|
27
|
+
import { FooterContext } from './chunk-I67NHYK4.js';
|
|
28
|
+
import { _Chip, GlobalChipCssSelector } from './chunk-DJU2DUTQ.js';
|
|
29
|
+
import { ChipContext } from './chunk-WTKIUAHI.js';
|
|
30
|
+
import { _ErrorMessage, GlobalErrorMessageCssSelector } from './chunk-3DWVMCIV.js';
|
|
31
|
+
import { GlobalHelperMessageCssSelector, _HelperMessage } from './chunk-2VBOJKEP.js';
|
|
32
|
+
import { _CheckboxField, GlobalCheckboxFieldCssSelector } from './chunk-3XFTRBIC.js';
|
|
33
|
+
import { _CheckboxGroup, GlobalCheckboxGroupCssSelector } from './chunk-EE75ND6V.js';
|
|
34
|
+
import { ErrorMessageContext } from './chunk-ACVMW6YD.js';
|
|
35
|
+
import { HelperMessageContext } from './chunk-ESVVLTEN.js';
|
|
36
|
+
import { CheckboxFieldContext } from './chunk-ZGNK4GWA.js';
|
|
37
|
+
import { CheckboxGroupContext } from './chunk-N7YDPVZL.js';
|
|
38
|
+
import { _CheckboxList, GlobalCheckboxListCssSelector } from './chunk-3LRBUQC2.js';
|
|
39
|
+
import { CheckboxListContext } from './chunk-WDUQUPTE.js';
|
|
40
|
+
import { _ButtonGroup, GlobalButtonGroupCssSelector } from './chunk-BAKCRZAG.js';
|
|
41
|
+
import { ButtonGroupContext } from './chunk-VJQ7M2BK.js';
|
|
42
|
+
import { _ClearButton, GlobalClearButtonCssSelector } from './chunk-UARL5M2W.js';
|
|
43
|
+
import { ClearButtonContext } from './chunk-DXVKHP4V.js';
|
|
44
|
+
import { _EmbeddedButton, GlobalEmbeddedButtonCssSelector } from './chunk-LYV2D5RZ.js';
|
|
45
|
+
import { EmbeddedButtonContext } from './chunk-O7IJYNVQ.js';
|
|
46
|
+
import { _Checkbox, GlobalCheckboxCssSelector } from './chunk-DLTYFRKN.js';
|
|
47
|
+
import { CheckboxContext } from './chunk-2EAZPH3M.js';
|
|
48
|
+
import { _Badge, GlobalBadgeCssSelector } from './chunk-GF2U6E4D.js';
|
|
49
|
+
import { GlobalOverlineTextCssSelector, _OverlineText } from './chunk-5EPNXRCT.js';
|
|
50
|
+
import { OverlineTextContext } from './chunk-WPNVVGFW.js';
|
|
51
|
+
import { BadgeContext } from './chunk-ZSFJVMJN.js';
|
|
52
|
+
import { _Button, GlobalButtonCssSelector } from './chunk-UY7WQ7TC.js';
|
|
53
|
+
import { useSlot } from './chunk-H5YTU3U7.js';
|
|
54
|
+
import { useRenderProps } from './chunk-NH3IVMXB.js';
|
|
55
|
+
import { useLocalizedString } from './chunk-H6CDFWVR.js';
|
|
56
|
+
import { GlobalSpinnerCssSelector, _Spinner } from './chunk-WLSLSMK7.js';
|
|
57
|
+
import { GlobalLabelCssSelector, _Label } from './chunk-CTK5YVBZ.js';
|
|
58
|
+
import { LabelContext } from './chunk-QCA3ZR56.js';
|
|
59
|
+
import { SpinnerContext } from './chunk-4ZYV2XLW.js';
|
|
60
|
+
import { ButtonContext } from './chunk-WMTWFKKP.js';
|
|
61
|
+
import { GlobalHopperProviderCssSelector, _HopperProvider } from './chunk-ANVMQBBG.js';
|
|
62
|
+
import { GlobalIconListCssSelector, _IconList } from './chunk-XIOIAME2.js';
|
|
63
|
+
import { GlobalLinkCssSelector, _Link } from './chunk-JLFHTZUA.js';
|
|
64
|
+
import { isTextOnlyChildren } from './chunk-ZWU6DRRZ.js';
|
|
65
|
+
import { GlobalTextCssSelector, _Text } from './chunk-4RIAVSLK.js';
|
|
66
|
+
import { ClearContainerSlots, ClearProviders } from './chunk-HXI3MEEK.js';
|
|
67
|
+
import { TextContext } from './chunk-X6SER3TZ.js';
|
|
68
|
+
import { composeClassnameRenderProps } from './chunk-65JPI4FL.js';
|
|
69
|
+
import { cssModule } from './chunk-KVDXQMWI.js';
|
|
70
|
+
import { SlotProvider } from './chunk-M36KANKC.js';
|
|
71
|
+
import { IconListContext } from './chunk-DHVVYSLB.js';
|
|
72
|
+
import { LinkContext } from './chunk-4VVNSXIB.js';
|
|
73
|
+
import { __export, __reExport } from './chunk-2P3A4VVY.js';
|
|
74
|
+
import * as styled_system_star from '@hopper-ui/styled-system';
|
|
75
|
+
import { useStyledSystem, useResponsiveValue } from '@hopper-ui/styled-system';
|
|
76
|
+
import clsx from 'clsx';
|
|
77
|
+
import { forwardRef } from 'react';
|
|
78
|
+
import { useContextProps, Heading as Heading$1, composeRenderProps, Tag as Tag$1 } from 'react-aria-components';
|
|
79
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
80
|
+
import { IconContext } from '@hopper-ui/icons';
|
|
81
|
+
|
|
82
|
+
// src/index.ts
|
|
83
|
+
var src_exports = {};
|
|
84
|
+
__export(src_exports, {
|
|
85
|
+
Badge: () => _Badge,
|
|
86
|
+
BadgeContext: () => BadgeContext,
|
|
87
|
+
Button: () => _Button,
|
|
88
|
+
ButtonContext: () => ButtonContext,
|
|
89
|
+
ButtonGroup: () => _ButtonGroup,
|
|
90
|
+
ButtonGroupContext: () => ButtonGroupContext,
|
|
91
|
+
Checkbox: () => _Checkbox,
|
|
92
|
+
CheckboxContext: () => CheckboxContext,
|
|
93
|
+
CheckboxField: () => _CheckboxField,
|
|
94
|
+
CheckboxFieldContext: () => CheckboxFieldContext,
|
|
95
|
+
CheckboxGroup: () => _CheckboxGroup,
|
|
96
|
+
CheckboxGroupContext: () => CheckboxGroupContext,
|
|
97
|
+
CheckboxList: () => _CheckboxList,
|
|
98
|
+
CheckboxListContext: () => CheckboxListContext,
|
|
99
|
+
Chip: () => _Chip,
|
|
100
|
+
ChipContext: () => ChipContext,
|
|
101
|
+
ClearButton: () => _ClearButton,
|
|
102
|
+
ClearButtonContext: () => ClearButtonContext,
|
|
103
|
+
ClearContainerSlots: () => ClearContainerSlots,
|
|
104
|
+
ClearProviders: () => ClearProviders,
|
|
105
|
+
Content: () => _Content,
|
|
106
|
+
ContentContext: () => ContentContext,
|
|
107
|
+
EmbeddedButton: () => _EmbeddedButton,
|
|
108
|
+
EmbeddedButtonContext: () => EmbeddedButtonContext,
|
|
109
|
+
ErrorMessage: () => _ErrorMessage,
|
|
110
|
+
ErrorMessageContext: () => ErrorMessageContext,
|
|
111
|
+
Flex: () => _Flex,
|
|
112
|
+
Footer: () => _Footer,
|
|
113
|
+
FooterContext: () => FooterContext,
|
|
114
|
+
GlobalBadgeCssSelector: () => GlobalBadgeCssSelector,
|
|
115
|
+
GlobalButtonCssSelector: () => GlobalButtonCssSelector,
|
|
116
|
+
GlobalButtonGroupCssSelector: () => GlobalButtonGroupCssSelector,
|
|
117
|
+
GlobalCheckboxCssSelector: () => GlobalCheckboxCssSelector,
|
|
118
|
+
GlobalCheckboxFieldCssSelector: () => GlobalCheckboxFieldCssSelector,
|
|
119
|
+
GlobalCheckboxGroupCssSelector: () => GlobalCheckboxGroupCssSelector,
|
|
120
|
+
GlobalCheckboxListCssSelector: () => GlobalCheckboxListCssSelector,
|
|
121
|
+
GlobalChipCssSelector: () => GlobalChipCssSelector,
|
|
122
|
+
GlobalClearButtonCssSelector: () => GlobalClearButtonCssSelector,
|
|
123
|
+
GlobalContentCssSelector: () => GlobalContentCssSelector,
|
|
124
|
+
GlobalEmbeddedButtonCssSelector: () => GlobalEmbeddedButtonCssSelector,
|
|
125
|
+
GlobalErrorMessageCssSelector: () => GlobalErrorMessageCssSelector,
|
|
126
|
+
GlobalFooterCssSelector: () => GlobalFooterCssSelector,
|
|
127
|
+
GlobalHeadingCssSelector: () => GlobalHeadingCssSelector,
|
|
128
|
+
GlobalHelperMessageCssSelector: () => GlobalHelperMessageCssSelector,
|
|
129
|
+
GlobalHopperProviderCssSelector: () => GlobalHopperProviderCssSelector,
|
|
130
|
+
GlobalIconListCssSelector: () => GlobalIconListCssSelector,
|
|
131
|
+
GlobalLabelCssSelector: () => GlobalLabelCssSelector,
|
|
132
|
+
GlobalLinkCssSelector: () => GlobalLinkCssSelector,
|
|
133
|
+
GlobalOverlineTextCssSelector: () => GlobalOverlineTextCssSelector,
|
|
134
|
+
GlobalRadioCssSelector: () => GlobalRadioCssSelector,
|
|
135
|
+
GlobalRadioFieldCssSelector: () => GlobalRadioFieldCssSelector,
|
|
136
|
+
GlobalRadioGroupCssSelector: () => GlobalRadioGroupCssSelector,
|
|
137
|
+
GlobalRadioListCssSelector: () => GlobalRadioListCssSelector,
|
|
138
|
+
GlobalSpinnerCssSelector: () => GlobalSpinnerCssSelector,
|
|
139
|
+
GlobalSwitchCssSelector: () => GlobalSwitchCssSelector,
|
|
140
|
+
GlobalSwitchFieldCssSelector: () => GlobalSwitchFieldCssSelector,
|
|
141
|
+
GlobalTagCssSelector: () => GlobalTagCssSelector,
|
|
142
|
+
GlobalTagGroupCssSelector: () => GlobalTagGroupCssSelector,
|
|
143
|
+
GlobalTagListCssSelector: () => GlobalTagListCssSelector,
|
|
144
|
+
GlobalTextCssSelector: () => GlobalTextCssSelector,
|
|
145
|
+
Grid: () => _Grid,
|
|
146
|
+
H1: () => H1,
|
|
147
|
+
H2: () => H2,
|
|
148
|
+
H3: () => H3,
|
|
149
|
+
H4: () => H4,
|
|
150
|
+
H5: () => H5,
|
|
151
|
+
H6: () => H6,
|
|
152
|
+
Heading: () => _Heading,
|
|
153
|
+
HeadingContext: () => HeadingContext,
|
|
154
|
+
HelperMessage: () => _HelperMessage,
|
|
155
|
+
HelperMessageContext: () => HelperMessageContext,
|
|
156
|
+
HopperProvider: () => _HopperProvider,
|
|
157
|
+
IconList: () => _IconList,
|
|
158
|
+
IconListContext: () => IconListContext,
|
|
159
|
+
Inline: () => _Inline,
|
|
160
|
+
Label: () => _Label,
|
|
161
|
+
LabelContext: () => LabelContext,
|
|
162
|
+
Link: () => _Link,
|
|
163
|
+
LinkContext: () => LinkContext,
|
|
164
|
+
OverlineText: () => _OverlineText,
|
|
165
|
+
OverlineTextContext: () => OverlineTextContext,
|
|
166
|
+
Radio: () => _Radio,
|
|
167
|
+
RadioContext: () => RadioContext,
|
|
168
|
+
RadioField: () => _RadioField,
|
|
169
|
+
RadioFieldContext: () => RadioFieldContext,
|
|
170
|
+
RadioGroup: () => _RadioGroup,
|
|
171
|
+
RadioGroupContext: () => RadioGroupContext,
|
|
172
|
+
RadioList: () => _RadioList,
|
|
173
|
+
RadioListContext: () => RadioListContext,
|
|
174
|
+
SlotProvider: () => SlotProvider,
|
|
175
|
+
Spinner: () => _Spinner,
|
|
176
|
+
SpinnerContext: () => SpinnerContext,
|
|
177
|
+
Stack: () => _Stack,
|
|
178
|
+
Switch: () => _Switch,
|
|
179
|
+
SwitchContext: () => SwitchContext,
|
|
180
|
+
SwitchField: () => _SwitchField,
|
|
181
|
+
SwitchFieldContext: () => SwitchFieldContext,
|
|
182
|
+
Tag: () => _Tag,
|
|
183
|
+
TagContext: () => TagContext,
|
|
184
|
+
TagGroup: () => _TagGroup,
|
|
185
|
+
TagGroupContext: () => TagGroupContext,
|
|
186
|
+
TagList: () => _TagList,
|
|
187
|
+
TagListContext: () => TagListContext,
|
|
188
|
+
Text: () => _Text,
|
|
189
|
+
TextContext: () => TextContext,
|
|
190
|
+
composeClassnameRenderProps: () => composeClassnameRenderProps,
|
|
191
|
+
cssModule: () => cssModule,
|
|
192
|
+
fitContent: () => fitContent,
|
|
193
|
+
isArray: () => isArray,
|
|
194
|
+
isDefined: () => isDefined,
|
|
195
|
+
isEmptyArray: () => isEmptyArray,
|
|
196
|
+
isFunction: () => isFunction,
|
|
197
|
+
isNil: () => isNil,
|
|
198
|
+
isNilOrEmpty: () => isNilOrEmpty,
|
|
199
|
+
isNull: () => isNull,
|
|
200
|
+
isNumber: () => isNumber,
|
|
201
|
+
isObject: () => isObject,
|
|
202
|
+
isPlainObject: () => isPlainObject,
|
|
203
|
+
isPromise: () => isPromise,
|
|
204
|
+
isString: () => isString,
|
|
205
|
+
isTextOnlyChildren: () => isTextOnlyChildren,
|
|
206
|
+
isUndefined: () => isUndefined,
|
|
207
|
+
minmax: () => minmax,
|
|
208
|
+
repeat: () => repeat,
|
|
209
|
+
useRenderProps: () => useRenderProps,
|
|
210
|
+
useSlot: () => useSlot
|
|
211
|
+
});
|
|
212
|
+
|
|
213
|
+
// css-module:./Heading.module.css#css-module
|
|
214
|
+
var Heading_module_default = { "hop-Heading": "Heading-module__hop-Heading___XEMpo", "hop-Heading--xs": "Heading-module__hop-Heading--xs___QP1iF", "hop-Heading--sm": "Heading-module__hop-Heading--sm___q3RaI", "hop-Heading--md": "Heading-module__hop-Heading--md___wAHF9", "hop-Heading--lg": "Heading-module__hop-Heading--lg___1yXCu", "hop-Heading--xl": "Heading-module__hop-Heading--xl___N5H9A", "hop-Heading--2xl": "Heading-module__hop-Heading--2xl___9j09H", "hop-Heading--3xl": "Heading-module__hop-Heading--3xl___LGn-R" };
|
|
215
|
+
var GlobalHeadingCssSelector = "hop-Heading";
|
|
216
|
+
function Heading(props, ref) {
|
|
217
|
+
[props, ref] = useContextProps(props, ref, HeadingContext);
|
|
218
|
+
const { stylingProps, ...ownProps } = useStyledSystem(props);
|
|
219
|
+
const { className, size: sizeProp, children, style, ...otherProps } = ownProps;
|
|
220
|
+
const size = (0, src_exports.useResponsiveValue)(sizeProp != null ? sizeProp : "md");
|
|
221
|
+
const classNames = clsx(
|
|
222
|
+
GlobalHeadingCssSelector,
|
|
223
|
+
cssModule(
|
|
224
|
+
Heading_module_default,
|
|
225
|
+
"hop-Heading",
|
|
226
|
+
size
|
|
227
|
+
),
|
|
228
|
+
stylingProps.className,
|
|
229
|
+
className
|
|
230
|
+
);
|
|
231
|
+
const mergedStyles = {
|
|
232
|
+
...stylingProps.style,
|
|
233
|
+
...style
|
|
234
|
+
};
|
|
235
|
+
return /* @__PURE__ */ jsx(
|
|
236
|
+
Heading$1,
|
|
237
|
+
{
|
|
238
|
+
...otherProps,
|
|
239
|
+
ref,
|
|
240
|
+
className: classNames,
|
|
241
|
+
style: mergedStyles,
|
|
242
|
+
children
|
|
243
|
+
}
|
|
244
|
+
);
|
|
245
|
+
}
|
|
246
|
+
var _Heading = forwardRef(Heading);
|
|
247
|
+
_Heading.displayName = "Heading";
|
|
248
|
+
function createHeading(as) {
|
|
249
|
+
const level = parseInt(as[1]);
|
|
250
|
+
return forwardRef((props, ref) => {
|
|
251
|
+
return /* @__PURE__ */ jsx(_Heading, { ...props, ref, level });
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
var H1 = createHeading("h1");
|
|
255
|
+
var H2 = createHeading("h2");
|
|
256
|
+
var H3 = createHeading("h3");
|
|
257
|
+
var H4 = createHeading("h4");
|
|
258
|
+
var H5 = createHeading("h5");
|
|
259
|
+
var H6 = createHeading("h6");
|
|
260
|
+
|
|
261
|
+
// src/index.ts
|
|
262
|
+
__reExport(src_exports, styled_system_star);
|
|
263
|
+
|
|
264
|
+
// css-module:./Tag.module.css#css-module
|
|
265
|
+
var Tag_module_default = { "hop-Tag": "Tag-module__hop-Tag___Arrz-", "hop-Tag--md": "Tag-module__hop-Tag--md___Ig1m0", "hop-Tag__icon": "Tag-module__hop-Tag__icon___Q2RKs", "hop-Tag__icon-list": "Tag-module__hop-Tag__icon-list___p4FYl", "hop-Tag__badge": "Tag-module__hop-Tag__badge___aFb39", "hop-Tag__remove-btn": "Tag-module__hop-Tag__remove-btn___5kLUr", "hop-Tag__Spinner": "Tag-module__hop-Tag__Spinner___QMS-T", "hop-Tag--lg": "Tag-module__hop-Tag--lg___J1-GI", "hop-Tag__text": "Tag-module__hop-Tag__text___2zDrG", "hop-Badge--secondary": "Tag-module__hop-Badge--secondary___guKe6" };
|
|
266
|
+
var GlobalTagCssSelector = "hop-Tag";
|
|
267
|
+
var TagToTextSizeAdapter = {
|
|
268
|
+
md: "xs",
|
|
269
|
+
lg: "sm"
|
|
270
|
+
};
|
|
271
|
+
function Tag(props, ref) {
|
|
272
|
+
var _a;
|
|
273
|
+
[props, ref] = useContextProps(props, ref, TagContext);
|
|
274
|
+
const { stylingProps, ...ownProps } = useStyledSystem(props);
|
|
275
|
+
const {
|
|
276
|
+
className,
|
|
277
|
+
children: childrenProp,
|
|
278
|
+
isInvalid,
|
|
279
|
+
isLoading,
|
|
280
|
+
size: sizeProp = "md",
|
|
281
|
+
style: styleProp,
|
|
282
|
+
textValue: textValueProp,
|
|
283
|
+
...otherProps
|
|
284
|
+
} = ownProps;
|
|
285
|
+
const stringFormatter = useLocalizedString();
|
|
286
|
+
const size = (_a = useResponsiveValue(sizeProp)) != null ? _a : "md";
|
|
287
|
+
const textValue = textValueProp != null ? textValueProp : typeof childrenProp === "string" ? childrenProp : void 0;
|
|
288
|
+
const classNames = composeClassnameRenderProps(
|
|
289
|
+
className,
|
|
290
|
+
GlobalTagCssSelector,
|
|
291
|
+
cssModule(
|
|
292
|
+
Tag_module_default,
|
|
293
|
+
"hop-Tag",
|
|
294
|
+
size
|
|
295
|
+
),
|
|
296
|
+
stylingProps.className
|
|
297
|
+
);
|
|
298
|
+
const style = composeRenderProps(styleProp, (prev) => {
|
|
299
|
+
return {
|
|
300
|
+
...stylingProps.style,
|
|
301
|
+
...prev
|
|
302
|
+
};
|
|
303
|
+
});
|
|
304
|
+
const children = composeRenderProps(childrenProp, (prev) => {
|
|
305
|
+
if (prev && isTextOnlyChildren(prev)) {
|
|
306
|
+
return /* @__PURE__ */ jsx(_Text, { children: prev });
|
|
307
|
+
}
|
|
308
|
+
return prev;
|
|
309
|
+
});
|
|
310
|
+
return /* @__PURE__ */ jsx(
|
|
311
|
+
Tag$1,
|
|
312
|
+
{
|
|
313
|
+
...otherProps,
|
|
314
|
+
ref,
|
|
315
|
+
className: classNames,
|
|
316
|
+
style,
|
|
317
|
+
textValue,
|
|
318
|
+
"data-invalid": isInvalid || void 0,
|
|
319
|
+
"data-loading": isLoading || void 0,
|
|
320
|
+
children: (tagProps) => {
|
|
321
|
+
const { allowsRemoving, isDisabled } = tagProps;
|
|
322
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
323
|
+
/* @__PURE__ */ jsx(ClearContainerSlots, { children: /* @__PURE__ */ jsx(
|
|
324
|
+
SlotProvider,
|
|
325
|
+
{
|
|
326
|
+
values: [
|
|
327
|
+
[TextContext, {
|
|
328
|
+
className: Tag_module_default["hop-Tag__text"],
|
|
329
|
+
size: TagToTextSizeAdapter[size]
|
|
330
|
+
}],
|
|
331
|
+
[IconListContext, {
|
|
332
|
+
className: Tag_module_default["hop-Tag__icon-list"],
|
|
333
|
+
size: "sm"
|
|
334
|
+
}],
|
|
335
|
+
[IconContext, {
|
|
336
|
+
className: Tag_module_default["hop-Tag__icon"],
|
|
337
|
+
size: "sm"
|
|
338
|
+
}],
|
|
339
|
+
[BadgeContext, {
|
|
340
|
+
className: Tag_module_default["hop-Tag__badge"],
|
|
341
|
+
isDisabled
|
|
342
|
+
}]
|
|
343
|
+
],
|
|
344
|
+
children: children(tagProps)
|
|
345
|
+
}
|
|
346
|
+
) }),
|
|
347
|
+
allowsRemoving && !isLoading && /* @__PURE__ */ jsx(
|
|
348
|
+
_ClearButton,
|
|
349
|
+
{
|
|
350
|
+
slot: "remove",
|
|
351
|
+
isDisabled,
|
|
352
|
+
className: Tag_module_default["hop-Tag__remove-btn"],
|
|
353
|
+
"aria-label": stringFormatter.format("Tag.removeAriaLabel"),
|
|
354
|
+
size
|
|
355
|
+
}
|
|
356
|
+
),
|
|
357
|
+
isLoading && /* @__PURE__ */ jsx(
|
|
358
|
+
_Spinner,
|
|
359
|
+
{
|
|
360
|
+
"aria-label": stringFormatter.format("Tag.spinnerAriaLabel"),
|
|
361
|
+
size: "sm",
|
|
362
|
+
className: Tag_module_default["hop-Tag__Spinner"]
|
|
363
|
+
}
|
|
364
|
+
)
|
|
365
|
+
] });
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
);
|
|
369
|
+
}
|
|
370
|
+
var _Tag = forwardRef(Tag);
|
|
371
|
+
_Tag.displayName = "Tag";
|
|
372
|
+
|
|
373
|
+
export { GlobalHeadingCssSelector, GlobalTagCssSelector, H1, H2, H3, H4, H5, H6, _Heading, _Tag, src_exports };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { SwitchContext } from './chunk-YHBJAXUY.js';
|
|
2
1
|
import { SwitchFieldContext } from './chunk-H7VJS4MX.js';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { SwitchContext } from './chunk-YHBJAXUY.js';
|
|
3
|
+
import { TextContext } from './chunk-X6SER3TZ.js';
|
|
5
4
|
import { cssModule } from './chunk-KVDXQMWI.js';
|
|
5
|
+
import { SlotProvider } from './chunk-M36KANKC.js';
|
|
6
6
|
import { useStyledSystem, useResponsiveValue } from '@hopper-ui/styled-system';
|
|
7
7
|
import clsx from 'clsx';
|
|
8
8
|
import { forwardRef } from 'react';
|
|
@@ -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___OlYHx", "hop-SwitchField--sm": "SwitchField-module__hop-SwitchField--sm___7s7Ty", "hop-SwitchField--md": "SwitchField-module__hop-SwitchField--md___gIbMI", "hop-SwitchField__description": "SwitchField-module__hop-SwitchField__description___Jj-gO", "hop-SwitchField__switch": "SwitchField-module__hop-SwitchField__switch___OZkSD" };
|
|
15
15
|
var GlobalSwitchFieldCssSelector = "hop-SwitchField";
|
|
16
16
|
var SwitchToDescriptionSizeAdapter = {
|
|
17
17
|
sm: "xs",
|