@hopper-ui/components 1.0.1 → 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 +14 -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 +6 -6
- package/dist/Link/src/LinkContext.js +1 -1
- package/dist/Link/src/index.css +32 -32
- package/dist/Link/src/index.js +6 -6
- 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 +10 -10
- package/dist/buttons/src/ButtonContext.d.ts +1 -1
- 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 +102 -0
- package/dist/buttons/src/ClearButton.d.ts +16 -0
- package/dist/buttons/src/ClearButton.js +9 -0
- package/dist/buttons/src/ClearButtonContext.d.ts +9 -0
- package/dist/buttons/src/ClearButtonContext.js +2 -0
- 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 +262 -120
- package/dist/buttons/src/index.d.ts +7 -0
- package/dist/buttons/src/index.js +16 -10
- package/dist/checkbox/src/Checkbox.css +39 -35
- package/dist/checkbox/src/Checkbox.js +5 -5
- package/dist/checkbox/src/CheckboxContext.js +1 -1
- package/dist/checkbox/src/CheckboxField.css +16 -16
- package/dist/checkbox/src/CheckboxField.js +3 -3
- package/dist/checkbox/src/CheckboxFieldContext.js +1 -1
- package/dist/checkbox/src/CheckboxGroup.css +79 -75
- package/dist/checkbox/src/CheckboxGroup.js +3 -3
- 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 +8 -8
- package/dist/chip/src/Chip.css +34 -34
- package/dist/chip/src/Chip.js +4 -4
- package/dist/chip/src/ChipContext.js +1 -1
- package/dist/chip/src/index.css +34 -34
- package/dist/chip/src/index.js +4 -4
- package/dist/{chunk-YSQDPG26.js → chunk-2P3A4VVY.js} +6 -1
- package/dist/{chunk-CJFCOPMQ.js → chunk-2VBOJKEP.js} +2 -2
- package/dist/{chunk-3KIUEBO3.js → chunk-3DWVMCIV.js} +2 -2
- package/dist/chunk-3NKF5TPD.js +7 -0
- package/dist/{chunk-H234F7HP.js → chunk-3XFTRBIC.js} +2 -2
- package/dist/{chunk-HUJ3PTM7.js → chunk-4RIAVSLK.js} +2 -2
- package/dist/chunk-5EPNXRCT.js +44 -0
- package/dist/chunk-6BFSSZCY.js +7 -0
- package/dist/{chunk-BIVAOAN2.js → chunk-7NT6M6KM.js} +3 -3
- package/dist/chunk-AQITZWYM.js +43 -0
- package/dist/chunk-BAKCRZAG.js +82 -0
- package/dist/{chunk-TRS7R4W3.js → chunk-CTK5YVBZ.js} +2 -2
- package/dist/chunk-CTOL6AVF.js +156 -0
- package/dist/chunk-D6UTDI2K.js +28 -0
- package/dist/{chunk-ZUMAL5WB.js → chunk-DJU2DUTQ.js} +4 -3
- package/dist/{chunk-EADFYPVX.js → chunk-DLTYFRKN.js} +4 -4
- package/dist/chunk-DXVKHP4V.js +7 -0
- package/dist/{chunk-VYNBJRJW.js → chunk-EE75ND6V.js} +2 -2
- package/dist/chunk-EWMWQ2MC.js +7 -0
- package/dist/chunk-GF2U6E4D.js +56 -0
- package/dist/chunk-GXBVNCVP.js +43 -0
- package/dist/{chunk-BPM4ETTB.js → chunk-H6CDFWVR.js} +11 -3
- package/dist/chunk-I67NHYK4.js +7 -0
- package/dist/{chunk-KKFX7YII.js → chunk-IOLNBXZM.js} +6 -5
- package/dist/chunk-IXB2WK56.js +7 -0
- package/dist/{chunk-CE3ABLD2.js → chunk-JLF7DSUY.js} +4 -4
- package/dist/{chunk-3FT5XSWV.js → chunk-JLFHTZUA.js} +4 -4
- 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-6EMOC7TA.js → chunk-OUN5KSHD.js} +2 -2
- 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-SC4G54ML.js → chunk-UY7WQ7TC.js} +8 -8
- package/dist/{chunk-G7RKLBFT.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-FD4HMY5A.js → chunk-XFKAXBB5.js} +4 -4
- package/dist/{chunk-YFTLWL74.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 +4 -4
- 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 +4 -4
- package/dist/helperMessage/src/HelperMessage.css +12 -12
- package/dist/helperMessage/src/HelperMessage.d.ts +1 -1
- package/dist/helperMessage/src/HelperMessage.js +4 -4
- 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 +4 -4
- 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 +5 -5
- 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 +4 -4
- 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 +9 -9
- package/dist/switch/src/Switch.css +26 -26
- package/dist/switch/src/Switch.js +5 -5
- package/dist/switch/src/SwitchContext.js +1 -1
- package/dist/switch/src/SwitchField.css +16 -16
- package/dist/switch/src/SwitchField.js +3 -3
- package/dist/switch/src/SwitchFieldContext.js +1 -1
- package/dist/switch/src/index.css +32 -32
- package/dist/switch/src/index.js +6 -6
- 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 +3 -2
- 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/{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
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { MutableRefObject } from 'react';
|
|
3
|
+
import { StyledComponentProps, ResponsiveProp } from '@hopper-ui/styled-system';
|
|
4
|
+
import { SearchFieldProps as SearchFieldProps$1 } from 'react-aria-components';
|
|
5
|
+
|
|
6
|
+
declare const GlobalSearchFieldCssSelector = "hop-SearchField";
|
|
7
|
+
interface SearchFieldProps extends StyledComponentProps<SearchFieldProps$1> {
|
|
8
|
+
/**
|
|
9
|
+
* Whether the SearchField is clearable.
|
|
10
|
+
* @default true
|
|
11
|
+
*/
|
|
12
|
+
isClearable?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* The placeholder text when the SearchField is empty.
|
|
15
|
+
*/
|
|
16
|
+
placeholder?: string;
|
|
17
|
+
/**
|
|
18
|
+
* The size of the SearchField.
|
|
19
|
+
* @default "md"
|
|
20
|
+
*/
|
|
21
|
+
size?: ResponsiveProp<"sm" | "md">;
|
|
22
|
+
/**
|
|
23
|
+
* If `true`, the SearchField will take all available width.
|
|
24
|
+
*/
|
|
25
|
+
isFluid?: ResponsiveProp<boolean>;
|
|
26
|
+
/**
|
|
27
|
+
* An icon to display at the start of the input.
|
|
28
|
+
*/
|
|
29
|
+
icon?: React.ReactNode | null;
|
|
30
|
+
/**
|
|
31
|
+
* A ref for the HTML input element.
|
|
32
|
+
*/
|
|
33
|
+
inputRef?: MutableRefObject<HTMLInputElement>;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* A specialized text input for [search input](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/search).
|
|
37
|
+
*
|
|
38
|
+
* [View Documentation](TODO)
|
|
39
|
+
*/
|
|
40
|
+
declare const _SearchField: react.ForwardRefExoticComponent<SearchFieldProps & react.RefAttributes<HTMLDivElement>>;
|
|
41
|
+
|
|
42
|
+
export { GlobalSearchFieldCssSelector, _SearchField as SearchField, type SearchFieldProps };
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import { SearchFieldContext } from '../../chunk-3NKF5TPD.js';
|
|
2
|
+
import '../../chunk-LJXTJRSB.js';
|
|
3
|
+
import '../../chunk-OQW6BT6B.js';
|
|
4
|
+
import '../../chunk-TXZ6BMFR.js';
|
|
5
|
+
import '../../chunk-TIPN4VYD.js';
|
|
6
|
+
import '../../chunk-OGMLQRES.js';
|
|
7
|
+
import '../../chunk-EWMWQ2MC.js';
|
|
8
|
+
import '../../chunk-LCAS3YQV.js';
|
|
9
|
+
import '../../chunk-WWRB4K4M.js';
|
|
10
|
+
import '../../chunk-XLKYXKWE.js';
|
|
11
|
+
import '../../chunk-7NT6M6KM.js';
|
|
12
|
+
import '../../chunk-5MBJWRZD.js';
|
|
13
|
+
import '../../chunk-NKHMUPAP.js';
|
|
14
|
+
import '../../chunk-A7TZHALP.js';
|
|
15
|
+
import '../../chunk-XFKAXBB5.js';
|
|
16
|
+
import '../../chunk-OUN5KSHD.js';
|
|
17
|
+
import '../../chunk-H7VJS4MX.js';
|
|
18
|
+
import '../../chunk-YHBJAXUY.js';
|
|
19
|
+
import '../../chunk-Z3ID4UEE.js';
|
|
20
|
+
import '../../chunk-Y7HUXUHX.js';
|
|
21
|
+
import '../../chunk-D6UTDI2K.js';
|
|
22
|
+
import '../../chunk-JLF7DSUY.js';
|
|
23
|
+
import '../../chunk-IOLNBXZM.js';
|
|
24
|
+
import '../../chunk-FU5CCPLP.js';
|
|
25
|
+
import '../../chunk-DGLAGYBD.js';
|
|
26
|
+
import '../../chunk-GXBVNCVP.js';
|
|
27
|
+
import '../../chunk-IXB2WK56.js';
|
|
28
|
+
import '../../chunk-TVFC2MJ4.js';
|
|
29
|
+
import '../../chunk-AQITZWYM.js';
|
|
30
|
+
import '../../chunk-I67NHYK4.js';
|
|
31
|
+
import { _InputGroup } from '../../chunk-RXBKOHT2.js';
|
|
32
|
+
import '../../chunk-6BFSSZCY.js';
|
|
33
|
+
import '../../chunk-DJU2DUTQ.js';
|
|
34
|
+
import '../../chunk-WTKIUAHI.js';
|
|
35
|
+
import '../../chunk-3DWVMCIV.js';
|
|
36
|
+
import '../../chunk-2VBOJKEP.js';
|
|
37
|
+
import '../../chunk-3XFTRBIC.js';
|
|
38
|
+
import '../../chunk-EE75ND6V.js';
|
|
39
|
+
import { ErrorMessageContext } from '../../chunk-ACVMW6YD.js';
|
|
40
|
+
import { HelperMessageContext } from '../../chunk-ESVVLTEN.js';
|
|
41
|
+
import '../../chunk-ZGNK4GWA.js';
|
|
42
|
+
import '../../chunk-N7YDPVZL.js';
|
|
43
|
+
import '../../chunk-3LRBUQC2.js';
|
|
44
|
+
import '../../chunk-WDUQUPTE.js';
|
|
45
|
+
import '../../chunk-BAKCRZAG.js';
|
|
46
|
+
import '../../chunk-VJQ7M2BK.js';
|
|
47
|
+
import { _ClearButton } from '../../chunk-UARL5M2W.js';
|
|
48
|
+
import '../../chunk-DXVKHP4V.js';
|
|
49
|
+
import '../../chunk-LYV2D5RZ.js';
|
|
50
|
+
import '../../chunk-O7IJYNVQ.js';
|
|
51
|
+
import '../../chunk-DLTYFRKN.js';
|
|
52
|
+
import '../../chunk-2EAZPH3M.js';
|
|
53
|
+
import '../../chunk-GF2U6E4D.js';
|
|
54
|
+
import '../../chunk-5EPNXRCT.js';
|
|
55
|
+
import '../../chunk-WPNVVGFW.js';
|
|
56
|
+
import '../../chunk-ZSFJVMJN.js';
|
|
57
|
+
import '../../chunk-UY7WQ7TC.js';
|
|
58
|
+
import '../../chunk-H5YTU3U7.js';
|
|
59
|
+
import '../../chunk-NH3IVMXB.js';
|
|
60
|
+
import '../../chunk-H6CDFWVR.js';
|
|
61
|
+
import '../../chunk-WLSLSMK7.js';
|
|
62
|
+
import '../../chunk-CTK5YVBZ.js';
|
|
63
|
+
import { LabelContext } from '../../chunk-QCA3ZR56.js';
|
|
64
|
+
import '../../chunk-4ZYV2XLW.js';
|
|
65
|
+
import '../../chunk-WMTWFKKP.js';
|
|
66
|
+
import '../../chunk-ANVMQBBG.js';
|
|
67
|
+
import '../../chunk-XIOIAME2.js';
|
|
68
|
+
import '../../chunk-JLFHTZUA.js';
|
|
69
|
+
import '../../chunk-ZWU6DRRZ.js';
|
|
70
|
+
import '../../chunk-4RIAVSLK.js';
|
|
71
|
+
import { ClearContainerSlots } from '../../chunk-HXI3MEEK.js';
|
|
72
|
+
import '../../chunk-X6SER3TZ.js';
|
|
73
|
+
import { composeClassnameRenderProps } from '../../chunk-65JPI4FL.js';
|
|
74
|
+
import { cssModule } from '../../chunk-KVDXQMWI.js';
|
|
75
|
+
import { SlotProvider } from '../../chunk-M36KANKC.js';
|
|
76
|
+
import '../../chunk-DHVVYSLB.js';
|
|
77
|
+
import '../../chunk-4VVNSXIB.js';
|
|
78
|
+
import '../../chunk-2P3A4VVY.js';
|
|
79
|
+
import { IconContext, SearchIcon } from '@hopper-ui/icons';
|
|
80
|
+
import { useStyledSystem, useResponsiveValue } from '@hopper-ui/styled-system';
|
|
81
|
+
import { mergeRefs } from '@react-aria/utils';
|
|
82
|
+
import { forwardRef } from 'react';
|
|
83
|
+
import { useObjectRef } from 'react-aria';
|
|
84
|
+
import { useContextProps, composeRenderProps, Input, SearchField as SearchField$1 } from 'react-aria-components';
|
|
85
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
86
|
+
|
|
87
|
+
// css-module:./SearchField.module.css#css-module
|
|
88
|
+
var SearchField_module_default = { "hop-SearchField": "SearchField-module__hop-SearchField___Ig9yj", "hop-SearchField--fluid": "SearchField-module__hop-SearchField--fluid___WPNQz", "hop-SearchField__Label": "SearchField-module__hop-SearchField__Label___YQzmR", "hop-SearchField__prefix": "SearchField-module__hop-SearchField__prefix___FG3Rt", "hop-SearchField__InputGroup": "SearchField-module__hop-SearchField__InputGroup___kyA1m", "hop-SearchField--clearable": "SearchField-module__hop-SearchField--clearable___RjeYV", "hop-SearchField__ErrorMessage": "SearchField-module__hop-SearchField__ErrorMessage___D519f", "hop-SearchField__HelperMessage": "SearchField-module__hop-SearchField__HelperMessage___hlceE", "hop-SearchField__ClearButton": "SearchField-module__hop-SearchField__ClearButton___cExII" };
|
|
89
|
+
var GlobalSearchFieldCssSelector = "hop-SearchField";
|
|
90
|
+
function SearchField(props, ref) {
|
|
91
|
+
var _a;
|
|
92
|
+
const {
|
|
93
|
+
inputRef: userProvidedInputRef = null,
|
|
94
|
+
...propsWithoutRef
|
|
95
|
+
} = props;
|
|
96
|
+
[props, ref] = useContextProps(propsWithoutRef, ref, SearchFieldContext);
|
|
97
|
+
const { stylingProps, ...ownProps } = useStyledSystem(props);
|
|
98
|
+
const {
|
|
99
|
+
className,
|
|
100
|
+
style: styleProp,
|
|
101
|
+
size,
|
|
102
|
+
placeholder,
|
|
103
|
+
isClearable = true,
|
|
104
|
+
children,
|
|
105
|
+
isFluid: isFluidProp,
|
|
106
|
+
icon = /* @__PURE__ */ jsx(SearchIcon, {}),
|
|
107
|
+
isDisabled,
|
|
108
|
+
isInvalid,
|
|
109
|
+
...otherProps
|
|
110
|
+
} = ownProps;
|
|
111
|
+
const inputRef = useObjectRef(mergeRefs(userProvidedInputRef, props.inputRef !== void 0 ? props.inputRef : null));
|
|
112
|
+
const isFluid = (_a = useResponsiveValue(isFluidProp)) != null ? _a : false;
|
|
113
|
+
const classNames = composeClassnameRenderProps(
|
|
114
|
+
className,
|
|
115
|
+
GlobalSearchFieldCssSelector,
|
|
116
|
+
cssModule(
|
|
117
|
+
SearchField_module_default,
|
|
118
|
+
"hop-SearchField",
|
|
119
|
+
isFluid && "fluid"
|
|
120
|
+
),
|
|
121
|
+
stylingProps.className
|
|
122
|
+
);
|
|
123
|
+
const style = composeRenderProps(styleProp, (prev) => {
|
|
124
|
+
return {
|
|
125
|
+
...stylingProps.style,
|
|
126
|
+
...prev
|
|
127
|
+
};
|
|
128
|
+
});
|
|
129
|
+
const inputMarkup = /* @__PURE__ */ jsx(ClearContainerSlots, { children: /* @__PURE__ */ jsxs(
|
|
130
|
+
_InputGroup,
|
|
131
|
+
{
|
|
132
|
+
isDisabled,
|
|
133
|
+
isInvalid,
|
|
134
|
+
isFluid,
|
|
135
|
+
size,
|
|
136
|
+
className: SearchField_module_default["hop-SearchField__InputGroup"],
|
|
137
|
+
children: [
|
|
138
|
+
/* @__PURE__ */ jsx(
|
|
139
|
+
SlotProvider,
|
|
140
|
+
{
|
|
141
|
+
values: [
|
|
142
|
+
[IconContext, {
|
|
143
|
+
className: SearchField_module_default["hop-SearchField__prefix"]
|
|
144
|
+
}]
|
|
145
|
+
],
|
|
146
|
+
children: icon
|
|
147
|
+
}
|
|
148
|
+
),
|
|
149
|
+
/* @__PURE__ */ jsx(Input, { ref: inputRef, placeholder }),
|
|
150
|
+
isClearable && /* @__PURE__ */ jsx(_ClearButton, { size: "lg", isDisabled, className: SearchField_module_default["hop-SearchField__ClearButton"] })
|
|
151
|
+
]
|
|
152
|
+
}
|
|
153
|
+
) });
|
|
154
|
+
const childrenMarkup = composeRenderProps(children, (prev) => {
|
|
155
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
156
|
+
/* @__PURE__ */ jsx(
|
|
157
|
+
SlotProvider,
|
|
158
|
+
{
|
|
159
|
+
values: [
|
|
160
|
+
[LabelContext, { className: SearchField_module_default["hop-SearchField__Label"] }],
|
|
161
|
+
[HelperMessageContext, { className: SearchField_module_default["hop-SearchField__HelperMessage"] }],
|
|
162
|
+
[ErrorMessageContext, { className: SearchField_module_default["hop-SearchField__ErrorMessage"] }]
|
|
163
|
+
],
|
|
164
|
+
children: prev
|
|
165
|
+
}
|
|
166
|
+
),
|
|
167
|
+
inputMarkup
|
|
168
|
+
] });
|
|
169
|
+
});
|
|
170
|
+
return /* @__PURE__ */ jsx(
|
|
171
|
+
SearchField$1,
|
|
172
|
+
{
|
|
173
|
+
ref,
|
|
174
|
+
style,
|
|
175
|
+
className: classNames,
|
|
176
|
+
isDisabled,
|
|
177
|
+
isInvalid,
|
|
178
|
+
...otherProps,
|
|
179
|
+
children: childrenMarkup
|
|
180
|
+
}
|
|
181
|
+
);
|
|
182
|
+
}
|
|
183
|
+
var _SearchField = forwardRef(SearchField);
|
|
184
|
+
_SearchField.displayName = "SearchField";
|
|
185
|
+
|
|
186
|
+
export { GlobalSearchFieldCssSelector, _SearchField as SearchField };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ContextValue } from 'react-aria-components';
|
|
3
|
+
import { SearchFieldProps } from './SearchField.js';
|
|
4
|
+
import '@hopper-ui/styled-system';
|
|
5
|
+
|
|
6
|
+
declare const SearchFieldContext: react.Context<ContextValue<SearchFieldProps, HTMLDivElement>>;
|
|
7
|
+
|
|
8
|
+
export { SearchFieldContext };
|