@ledgerhq/react-ui 0.3.1 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/assets/logos/LedgerLiveAltRegular.d.ts +0 -1
- package/assets/logos/LedgerLiveRegular.d.ts +0 -1
- package/components/Chart/index.d.ts +0 -1
- package/components/Chart/index.js +1 -1
- package/components/Table/Columns.d.ts +60 -11
- package/components/Table/Columns.js +8 -18
- package/components/Table/index.d.ts +44 -12
- package/components/Table/index.js +36 -16
- package/components/Table/stories.helper.js +19 -18
- package/components/Tag/index.js +7 -7
- package/components/animations/GlitchText/index.d.ts +0 -1
- package/components/asorted/Divider/index.d.ts +0 -1
- package/components/asorted/Divider/index.js +2 -2
- package/components/asorted/Icon/BoxedIcon.d.ts +48 -0
- package/components/asorted/Icon/BoxedIcon.js +62 -0
- package/components/asorted/Icon/Icon.d.ts +0 -1
- package/components/asorted/Icon/index.d.ts +2 -0
- package/components/asorted/Icon/index.js +2 -0
- package/components/asorted/Text/index.d.ts +2 -0
- package/components/asorted/Text/index.js +2 -1
- package/components/asorted/index.d.ts +1 -1
- package/components/asorted/index.js +1 -1
- package/components/cards/Carousel/Slide.js +3 -3
- package/components/cards/Carousel/index.js +7 -7
- package/components/cta/Button/index.d.ts +12 -10
- package/components/cta/Button/index.js +52 -46
- package/components/cta/Link/index.d.ts +53 -4
- package/components/cta/Link/index.js +15 -11
- package/components/cta/Toggle/index.d.ts +0 -1
- package/components/form/BaseInput/index.d.ts +8 -14
- package/components/form/BaseInput/index.js +13 -13
- package/components/form/Checkbox/Checkbox.js +7 -7
- package/components/form/Dropdown/index.d.ts +3 -3
- package/components/form/Dropdown/index.js +4 -3
- package/components/form/LegendInput/index.d.ts +26 -2
- package/components/form/LegendInput/index.js +5 -4
- package/components/form/NumberInput/index.d.ts +25 -3
- package/components/form/NumberInput/index.js +7 -6
- package/components/form/QrCodeInput/index.d.ts +25 -3
- package/components/form/QrCodeInput/index.js +7 -6
- package/components/form/QuantityInput/index.d.ts +26 -4
- package/components/form/QuantityInput/index.js +9 -8
- package/components/form/Radio/RadioElement.d.ts +3 -2
- package/components/form/Radio/RadioElement.js +84 -15
- package/components/form/Radio/RadioListElement.js +7 -8
- package/components/form/Radio/index.d.ts +1 -1
- package/components/form/SearchInput/index.d.ts +24 -2
- package/components/form/SearchInput/index.js +4 -3
- package/components/form/SelectInput/Control.d.ts +4 -10
- package/components/form/SelectInput/Control.js +5 -8
- package/components/form/SelectInput/DropdownIndicator.d.ts +3 -10
- package/components/form/SelectInput/DropdownIndicator.js +1 -1
- package/components/form/SelectInput/IndicatorsContainer.d.ts +2 -6
- package/components/form/SelectInput/IndicatorsContainer.js +1 -1
- package/components/form/SelectInput/MenuList.d.ts +3 -10
- package/components/form/SelectInput/MenuList.js +1 -1
- package/components/form/SelectInput/Option.d.ts +6 -18
- package/components/form/SelectInput/Option.js +11 -11
- package/components/form/SelectInput/ValueContainer.d.ts +5 -14
- package/components/form/SelectInput/ValueContainer.js +2 -2
- package/components/form/SelectInput/VirtualMenuList.d.ts +2 -5
- package/components/form/SelectInput/VirtualMenuList.js +2 -1
- package/components/form/SelectInput/index.d.ts +7 -15
- package/components/form/SelectInput/index.js +14 -6
- package/components/form/SplitInput/index.js +5 -5
- package/components/form/Switch/Switch.js +8 -8
- package/components/helpers.d.ts +2 -2
- package/components/layout/Box/index.d.ts +1 -4
- package/components/layout/Drawer/index.d.ts +11 -3
- package/components/layout/Drawer/index.js +52 -27
- package/components/layout/Flex/index.d.ts +2 -5
- package/components/layout/Popin/index.d.ts +6 -11
- package/components/layout/Popin/index.js +14 -9
- package/components/layout/Side/index.d.ts +0 -1
- package/components/loaders/InfiniteLoader/index.d.ts +8 -7
- package/components/loaders/InfiniteLoader/index.js +35 -9
- package/components/loaders/ProgressLoader/index.d.ts +22 -2
- package/components/loaders/ProgressLoader/index.js +10 -12
- package/components/message/Alert/index.d.ts +31 -3
- package/components/message/Alert/index.js +30 -23
- package/components/message/Log/index.js +1 -1
- package/components/message/Notification/Badge.js +2 -2
- package/components/message/Notification/index.js +4 -6
- package/components/message/StatusNotification/index.d.ts +11 -0
- package/components/message/StatusNotification/index.js +33 -0
- package/components/message/Tip/index.d.ts +0 -1
- package/components/message/Tip/index.js +7 -7
- package/components/message/Tooltip/index.d.ts +0 -1
- package/components/message/Tooltip/index.js +1 -1
- package/components/message/Tooltip/styles.js +3 -3
- package/components/message/index.d.ts +2 -0
- package/components/message/index.js +2 -0
- package/components/navigation/Aside/index.d.ts +2 -5
- package/components/navigation/Breadcrumb/index.js +6 -6
- package/components/navigation/FlowStepper/index.d.ts +76 -0
- package/components/navigation/FlowStepper/index.js +35 -0
- package/components/navigation/index.d.ts +1 -0
- package/components/navigation/index.js +1 -0
- package/components/navigation/progress/ProgressBar/Onboarding.d.ts +0 -1
- package/components/navigation/progress/ProgressBar/Onboarding.js +6 -6
- package/components/navigation/progress/Stepper/index.d.ts +25 -9
- package/components/navigation/progress/Stepper/index.js +46 -27
- package/components/navigation/sideBar/Item/Item.d.ts +0 -1
- package/components/navigation/sideBar/Item/Item.js +10 -10
- package/components/navigation/sideBar/Logo/Logo.d.ts +0 -1
- package/components/navigation/sideBar/SideBar/SideBar.d.ts +0 -1
- package/components/navigation/sideBar/SideBar/SideBar.js +12 -10
- package/components/navigation/sideBar/Toggle/Toggle.d.ts +0 -1
- package/components/navigation/sideBar/Toggle/Toggle.js +2 -2
- package/components/styled.d.ts +8 -5
- package/components/styled.js +2 -2
- package/components/tabs/Bar/index.js +3 -3
- package/components/tabs/Chip/index.d.ts +13 -0
- package/components/tabs/Chip/index.js +21 -0
- package/components/tabs/Pill/index.js +6 -6
- package/components/tabs/Tabs/index.js +7 -7
- package/components/tabs/index.d.ts +1 -0
- package/components/tabs/index.js +1 -0
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/package.json +5 -6
- package/styles/InvertTheme.js +1 -1
- package/styles/StyleProvider.js +1 -1
- package/styles/global.js +15 -36
- package/styles/index.d.ts +1 -1
- package/styles/index.js +1 -1
- package/styles/theme.d.ts +5 -2
- package/styles/theme.js +13 -15
- package/components/loaders/InfiniteLoader/image.d.ts +0 -2
- package/components/loaders/InfiniteLoader/image.js +0 -1
- package/styles/reset.d.ts +0 -2
- package/styles/reset.js +0 -62
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BaseStyledProps } from "../../styled";
|
|
2
2
|
import { TextVariants } from "../../../styles/theme";
|
|
3
3
|
declare type FontFamilies = "Inter|ExtraLight" | "Inter|Light" | "Inter|Regular" | "Inter|Medium" | "Inter|SemiBold" | "Inter|Bold" | "Inter|ExtraBold" | "Alpha|Medium";
|
|
4
|
+
declare type WhiteSpace = "normal" | "nowrap" | "pre" | "pre-line" | "pre-wrap";
|
|
4
5
|
export interface TextProps extends BaseStyledProps {
|
|
5
6
|
fontFamily?: string;
|
|
6
7
|
ff?: FontFamilies;
|
|
@@ -12,6 +13,7 @@ export interface TextProps extends BaseStyledProps {
|
|
|
12
13
|
textTransform?: string;
|
|
13
14
|
textOverflow?: string;
|
|
14
15
|
uppercase?: boolean;
|
|
16
|
+
whiteSpace?: WhiteSpace;
|
|
15
17
|
}
|
|
16
18
|
declare const Text: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, TextProps, keyof TextProps>;
|
|
17
19
|
export default Text;
|
|
@@ -10,9 +10,10 @@ const uppercase = system({
|
|
|
10
10
|
});
|
|
11
11
|
const Text = baseStyled.span.attrs(({ variant = "body", fontSize, color }) => ({
|
|
12
12
|
fontSize: fontSize ? fontSize : variant,
|
|
13
|
-
color: color || "
|
|
13
|
+
color: color || "neutral.c100",
|
|
14
14
|
})) `
|
|
15
15
|
font-weight: 500;
|
|
16
|
+
white-space: ${(props) => { var _a; return (_a = props.whiteSpace) !== null && _a !== void 0 ? _a : "normal"; }};
|
|
16
17
|
${(p) => textVariantStyle[p.variant || "body"]}
|
|
17
18
|
${compose(uppercase, lineHeight, fontFamily, fontSize, textAlign, fontWeight, letterSpacing, system({
|
|
18
19
|
textOverflow: true,
|
|
@@ -10,13 +10,13 @@ const Wrapper = styled(Flex) `
|
|
|
10
10
|
padding: ${(p) => p.theme.space[8]}px ${(p) => p.theme.space[10]}px;
|
|
11
11
|
padding-right: 280px; // Nb gives air to not overlap the illustration
|
|
12
12
|
z-index: ${(p) => p.theme.zIndexes[8]};
|
|
13
|
-
background: url(${(p) => p.image}) no-repeat ${(p) => p.theme.colors.
|
|
13
|
+
background: url(${(p) => p.image}) no-repeat ${(p) => p.theme.colors.neutral.c100};
|
|
14
14
|
background-size: contain;
|
|
15
15
|
background-position: right 60px bottom;
|
|
16
16
|
`;
|
|
17
17
|
const Slide = ({ title, description, image, onClick }) => {
|
|
18
18
|
return (React.createElement(Wrapper, { key: "key", image: image, onClick: onClick },
|
|
19
|
-
React.createElement(Text, { variant: "tiny", color: "
|
|
20
|
-
React.createElement(Text, { variant: "h5", color: "
|
|
19
|
+
React.createElement(Text, { variant: "tiny", color: "neutral.c00", fontWeight: "regular" }, title),
|
|
20
|
+
React.createElement(Text, { variant: "h5", color: "neutral.c00", textTransform: "uppercase" }, description)));
|
|
21
21
|
};
|
|
22
22
|
export default Slide;
|
|
@@ -17,7 +17,7 @@ const CarouselWrapper = styled.div `
|
|
|
17
17
|
cursor: pointer;
|
|
18
18
|
position: relative;
|
|
19
19
|
flex: 1;
|
|
20
|
-
background: ${(p) => p.theme.colors.
|
|
20
|
+
background: ${(p) => p.theme.colors.neutral.c100};
|
|
21
21
|
`;
|
|
22
22
|
const Controllers = styled(Flex) `
|
|
23
23
|
position: absolute;
|
|
@@ -25,7 +25,7 @@ const Controllers = styled(Flex) `
|
|
|
25
25
|
right: ${(p) => p.theme.space[5]}px;
|
|
26
26
|
bottom: ${(p) => p.theme.space[4]}px;
|
|
27
27
|
column-gap: ${(p) => p.theme.space[4]}px;
|
|
28
|
-
color: ${(p) => p.theme.colors.
|
|
28
|
+
color: ${(p) => p.theme.colors.neutral.c00};
|
|
29
29
|
|
|
30
30
|
> div {
|
|
31
31
|
&:hover {
|
|
@@ -45,7 +45,7 @@ const Bullets = styled.div `
|
|
|
45
45
|
position: relative;
|
|
46
46
|
height: ${(p) => p.theme.space[1]}px;
|
|
47
47
|
width: ${(p) => p.theme.space[8]}px;
|
|
48
|
-
background: ${(p) => p.theme.colors.
|
|
48
|
+
background: ${(p) => p.theme.colors.neutral.c00};
|
|
49
49
|
opacity: 0.5;
|
|
50
50
|
&:hover {
|
|
51
51
|
opacity: 0.75;
|
|
@@ -71,7 +71,7 @@ const Close = styled.div `
|
|
|
71
71
|
position: absolute;
|
|
72
72
|
top: ${(p) => p.theme.space[7]}px;
|
|
73
73
|
right: ${(p) => p.theme.space[5]}px;
|
|
74
|
-
color: ${(p) => p.theme.colors.
|
|
74
|
+
color: ${(p) => p.theme.colors.neutral.c00};
|
|
75
75
|
&:hover {
|
|
76
76
|
opacity: 0.5;
|
|
77
77
|
}
|
|
@@ -124,10 +124,10 @@ const Carousel = ({ timeout = DEFAULT_TIMEOUT, queue, isDismissed, onDismiss, di
|
|
|
124
124
|
if (!(queue === null || queue === void 0 ? void 0 : queue.length) || isDismissed)
|
|
125
125
|
return null;
|
|
126
126
|
return (React.createElement(CarouselWrapper, { id: "carousel", onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave }, wantToDismiss ? (React.createElement(DismissWrapper, null,
|
|
127
|
-
React.createElement(Text, { color: "
|
|
127
|
+
React.createElement(Text, { color: "neutral.c00", fontWeight: "medium", variant: "paragraph" }, dismissText),
|
|
128
128
|
React.createElement(Flex, { columnGap: 5 },
|
|
129
|
-
React.createElement(Button, { color: "
|
|
130
|
-
React.createElement(Button, { outline: true, color: "
|
|
129
|
+
React.createElement(Button, { color: "neutral.c100", backgroundColor: "neutral.c00", onClick: onDismiss }, dismissConfirmText),
|
|
130
|
+
React.createElement(Button, { outline: true, color: "neutral.c00", backgroundColor: "neutral.c100", borderColor: "neutral.c00", onClick: onCancelDismiss }, dismissCancelText)))) : (React.createElement("div", null,
|
|
131
131
|
React.createElement(TransitionGroup, { component: null, childFactory: childFactory },
|
|
132
132
|
React.createElement(TransitionSlide, { key: index, direction: direction },
|
|
133
133
|
React.createElement(Slide, Object.assign({}, queue[index])))),
|
|
@@ -14,28 +14,30 @@ interface BaseProps extends BaseStyledProps, BordersProps {
|
|
|
14
14
|
iconButton?: boolean;
|
|
15
15
|
disabled?: boolean;
|
|
16
16
|
}
|
|
17
|
-
export interface ButtonProps extends BaseProps {
|
|
17
|
+
export interface ButtonProps extends BaseProps, React.RefAttributes<HTMLButtonElement> {
|
|
18
18
|
Icon?: React.ComponentType<{
|
|
19
19
|
size: number;
|
|
20
20
|
color?: string;
|
|
21
21
|
}>;
|
|
22
22
|
children?: React.ReactNode;
|
|
23
|
-
onClick
|
|
23
|
+
onClick?: (event: React.SyntheticEvent<HTMLButtonElement>) => void;
|
|
24
24
|
iconSize?: number;
|
|
25
25
|
style?: React.CSSProperties;
|
|
26
26
|
}
|
|
27
27
|
export declare const ButtonUnstyled: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {}, never>;
|
|
28
28
|
export declare const Base: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {
|
|
29
|
-
|
|
29
|
+
fontFamily: string;
|
|
30
30
|
fontSize: number;
|
|
31
|
-
} & BaseProps, "
|
|
32
|
-
declare const
|
|
33
|
-
({ Icon, iconPosition, iconSize, children, onClick, ...props }: ButtonProps): React.ReactElement;
|
|
31
|
+
} & BaseProps, "fontFamily" | "fontSize">;
|
|
32
|
+
declare const ButtonWithRef: {
|
|
33
|
+
({ Icon, iconPosition, iconSize, children, onClick, ...props }: ButtonProps, ref?: React.ForwardedRef<HTMLButtonElement> | undefined): React.ReactElement;
|
|
34
34
|
Unstyled: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {}, never>;
|
|
35
|
+
Expand: React.ForwardRefExoticComponent<Pick<ButtonProps & {
|
|
36
|
+
onToggle?: ((arg0: boolean) => void) | undefined;
|
|
37
|
+
}, "overflow" | "p" | "style" | "key" | "color" | "children" | "onClick" | "variant" | "size" | "rowGap" | "alignContent" | "alignItems" | "alignSelf" | "backgroundColor" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStyle" | "borderBottomWidth" | "borderLeftColor" | "borderLeftStyle" | "borderLeftWidth" | "borderRightColor" | "borderRightStyle" | "borderRightWidth" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStyle" | "borderTopWidth" | "bottom" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontSize" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "opacity" | "order" | "overflowX" | "overflowY" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "top" | "verticalAlign" | "width" | "zIndex" | "border" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderStyle" | "borderTop" | "borderWidth" | "flex" | "margin" | "outline" | "padding" | "disabled" | "onToggle" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "bg" | "borderX" | "borderY" | "Icon" | "iconSize" | "ff" | "iconPosition" | "iconButton"> & React.RefAttributes<HTMLButtonElement>>;
|
|
35
38
|
};
|
|
36
|
-
export declare type
|
|
39
|
+
export declare type ButtonExpandProps = React.PropsWithChildren<ButtonProps & {
|
|
37
40
|
onToggle?: (arg0: boolean) => void;
|
|
38
|
-
onClick?: (arg0: React.SyntheticEvent<HTMLButtonElement>) => void;
|
|
39
41
|
}>;
|
|
40
|
-
export declare
|
|
41
|
-
export default
|
|
42
|
+
export declare function ButtonExpand({ onToggle, onClick, ...props }: ButtonExpandProps, ref?: React.ForwardedRef<HTMLButtonElement>): React.ReactElement;
|
|
43
|
+
export default ButtonWithRef;
|
|
@@ -15,6 +15,7 @@ import baseStyled from "../../styled";
|
|
|
15
15
|
import { fontSize, border, compose } from "styled-system";
|
|
16
16
|
import fontFamily from "../../../styles/styled/fontFamily";
|
|
17
17
|
import { fontSizes } from "../../../styles/theme";
|
|
18
|
+
import { rgba } from "../../../styles/helpers";
|
|
18
19
|
import ChevronBottom from "@ledgerhq/icons-ui/react/ChevronBottomRegular";
|
|
19
20
|
const IconContainer = styled.div `
|
|
20
21
|
display: inline-block;
|
|
@@ -24,93 +25,93 @@ const IconContainer = styled.div `
|
|
|
24
25
|
const getVariantColors = (p) => ({
|
|
25
26
|
main: {
|
|
26
27
|
outline: `
|
|
27
|
-
border-color: ${p.theme.colors.
|
|
28
|
-
color: ${p.theme.colors.
|
|
29
|
-
background-color: ${p.theme.colors.
|
|
28
|
+
border-color: ${p.theme.colors.neutral.c100};
|
|
29
|
+
color: ${p.theme.colors.neutral.c100};
|
|
30
|
+
background-color: ${p.theme.colors.neutral.c00};
|
|
30
31
|
&:hover, &:focus {
|
|
31
|
-
background-color: ${p.theme.colors.
|
|
32
|
+
background-color: ${p.theme.colors.neutral.c20};
|
|
32
33
|
}
|
|
33
34
|
&:active {
|
|
34
|
-
background-color: ${p.theme.colors.
|
|
35
|
+
background-color: ${p.theme.colors.neutral.c30};
|
|
35
36
|
}
|
|
36
37
|
`,
|
|
37
38
|
filled: `
|
|
38
|
-
color: ${p.theme.colors.
|
|
39
|
-
background-color: ${p.theme.colors.
|
|
39
|
+
color: ${p.theme.colors.neutral.c00};
|
|
40
|
+
background-color: ${p.theme.colors.neutral.c100};
|
|
40
41
|
&:hover, &:focus {
|
|
41
|
-
background-color: ${p.theme.colors.
|
|
42
|
+
background-color: ${p.theme.colors.neutral.c90};
|
|
42
43
|
}
|
|
43
44
|
`,
|
|
44
45
|
},
|
|
45
46
|
shade: `
|
|
46
|
-
border-color: ${p.theme.colors.
|
|
47
|
-
color: ${p.theme.colors.
|
|
48
|
-
background-color: ${p.theme.colors.
|
|
47
|
+
border-color: ${p.theme.colors.neutral.c40};
|
|
48
|
+
color: ${p.theme.colors.neutral.c100};
|
|
49
|
+
background-color: ${p.theme.colors.neutral.c00};
|
|
49
50
|
&:focus {
|
|
50
|
-
border-color: ${p.theme.colors.
|
|
51
|
+
border-color: ${p.theme.colors.primary.c80};
|
|
51
52
|
}
|
|
52
53
|
|
|
53
54
|
&:hover, &:focus {
|
|
54
|
-
background-color: ${p.theme.colors.
|
|
55
|
+
background-color: ${p.theme.colors.neutral.c20};
|
|
55
56
|
}
|
|
56
57
|
|
|
57
58
|
&:active {
|
|
58
|
-
background-color: ${p.theme.colors.
|
|
59
|
+
background-color: ${p.theme.colors.neutral.c30};
|
|
59
60
|
}
|
|
60
61
|
`,
|
|
61
62
|
error: {
|
|
62
63
|
outline: `
|
|
63
|
-
border-color: ${p.theme.colors.
|
|
64
|
-
color: ${p.theme.colors.
|
|
65
|
-
background-color: ${p.theme.colors.
|
|
64
|
+
border-color: ${p.theme.colors.error.c100};
|
|
65
|
+
color: ${p.theme.colors.error.c100};
|
|
66
|
+
background-color: ${p.theme.colors.neutral.c00};
|
|
66
67
|
&:hover {
|
|
67
|
-
background-color: ${p.theme.colors.
|
|
68
|
+
background-color: ${p.theme.colors.error.c10};
|
|
68
69
|
}
|
|
69
70
|
&:active {
|
|
70
|
-
background-color: ${p.theme.colors.
|
|
71
|
+
background-color: ${p.theme.colors.error.c30};
|
|
71
72
|
}
|
|
72
73
|
`,
|
|
73
74
|
filled: `
|
|
74
|
-
color: ${p.theme.colors.
|
|
75
|
-
background-color: ${p.theme.colors.
|
|
75
|
+
color: ${p.theme.colors.neutral.c00};
|
|
76
|
+
background-color: ${p.theme.colors.error.c100};
|
|
76
77
|
&:hover {
|
|
77
|
-
background-color: ${p.theme.colors.
|
|
78
|
+
background-color: ${p.theme.colors.error.c80};
|
|
78
79
|
}
|
|
79
80
|
`,
|
|
80
81
|
},
|
|
81
82
|
color: {
|
|
82
83
|
outline: `
|
|
83
|
-
border-color: ${p.theme.colors.
|
|
84
|
-
color: ${p.theme.colors.
|
|
85
|
-
background-color: ${p.theme.colors.
|
|
84
|
+
border-color: ${p.theme.colors.primary.c80};
|
|
85
|
+
color: ${p.theme.colors.primary.c80};
|
|
86
|
+
background-color: ${p.theme.colors.neutral.c00};
|
|
86
87
|
&:hover {
|
|
87
|
-
background-color: ${p.theme.colors.
|
|
88
|
+
background-color: ${p.theme.colors.primary.c10};
|
|
88
89
|
}
|
|
89
90
|
&:active {
|
|
90
|
-
background-color: ${p.theme.colors.
|
|
91
|
+
background-color: ${p.theme.colors.primary.c20};
|
|
91
92
|
}
|
|
92
93
|
`,
|
|
93
94
|
filled: `
|
|
94
|
-
color: ${p.theme.colors.
|
|
95
|
-
background-color: ${p.theme.colors.
|
|
95
|
+
color: ${p.theme.colors.neutral.c00};
|
|
96
|
+
background-color: ${p.theme.colors.primary.c80};
|
|
96
97
|
&:hover {
|
|
97
|
-
background-color: ${p.theme.colors.
|
|
98
|
+
background-color: ${p.theme.colors.primary.c70};
|
|
98
99
|
}
|
|
99
100
|
`,
|
|
100
101
|
},
|
|
101
102
|
disabled: {
|
|
102
103
|
outline: `
|
|
103
|
-
border-color: ${p.theme.colors.
|
|
104
|
-
color: ${p.theme.colors.
|
|
105
|
-
background-color: ${p.theme.colors.
|
|
104
|
+
border-color: ${p.theme.colors.neutral.c50};
|
|
105
|
+
color: ${p.theme.colors.neutral.c50};
|
|
106
|
+
background-color: ${p.theme.colors.neutral.c00};
|
|
106
107
|
`,
|
|
107
108
|
filled: `
|
|
108
|
-
color: ${p.theme.colors.
|
|
109
|
-
background-color: ${p.theme.colors.
|
|
109
|
+
color: ${p.theme.colors.neutral.c50};
|
|
110
|
+
background-color: ${p.theme.colors.neutral.c30};
|
|
110
111
|
`,
|
|
111
112
|
},
|
|
112
113
|
default: `
|
|
113
|
-
color: ${p.theme.colors.
|
|
114
|
+
color: ${p.theme.colors.neutral.c100};
|
|
114
115
|
background-color: transparent;
|
|
115
116
|
&:hover {
|
|
116
117
|
text-decoration: underline;
|
|
@@ -128,7 +129,7 @@ export const ButtonUnstyled = styled.button `
|
|
|
128
129
|
export const Base = baseStyled.button.attrs((p) => {
|
|
129
130
|
var _a;
|
|
130
131
|
return ({
|
|
131
|
-
|
|
132
|
+
fontFamily: "Inter",
|
|
132
133
|
fontSize: (_a = p.fontSize) !== null && _a !== void 0 ? _a : 4,
|
|
133
134
|
});
|
|
134
135
|
}) `
|
|
@@ -137,6 +138,7 @@ export const Base = baseStyled.button.attrs((p) => {
|
|
|
137
138
|
border-radius: ${(p) => p.theme.space[13]}px;
|
|
138
139
|
border-style: solid;
|
|
139
140
|
border-width: ${(p) => (p.outline || p.variant === "shade" ? 1 : 0)}px;
|
|
141
|
+
font-weight: 600;
|
|
140
142
|
${compose(fontFamily, fontSize, border)};
|
|
141
143
|
height: ${(p) => p.theme.space[13]}px;
|
|
142
144
|
line-height: ${(p) => p.theme.fontSizes[p.fontSize]}px;
|
|
@@ -152,7 +154,7 @@ export const Base = baseStyled.button.attrs((p) => {
|
|
|
152
154
|
position: relative;
|
|
153
155
|
cursor: ${(p) => (p.disabled ? "default" : "pointer")};
|
|
154
156
|
&:active {
|
|
155
|
-
box-shadow: 0 0 0 4px ${(p) => p.theme.colors.
|
|
157
|
+
box-shadow: 0 0 0 4px ${(p) => rgba(p.theme.colors.primary.c60, 0.4)};
|
|
156
158
|
}
|
|
157
159
|
|
|
158
160
|
${(p) => {
|
|
@@ -187,19 +189,20 @@ export const Base = baseStyled.button.attrs((p) => {
|
|
|
187
189
|
}
|
|
188
190
|
`
|
|
189
191
|
: ""}
|
|
190
|
-
${(p) => p.theme.transition(["background-color", "color", "border-color"])}
|
|
192
|
+
${(p) => p.theme.transition(["background-color", "color", "border-color", "box-shadow"], "0.2s")}
|
|
191
193
|
`;
|
|
192
194
|
const ContentContainer = styled.div ``;
|
|
193
|
-
const Button = (_a) => {
|
|
195
|
+
const Button = (_a, ref) => {
|
|
194
196
|
var _b;
|
|
195
197
|
var { Icon, iconPosition = "right", iconSize = 16, children, onClick } = _a, props = __rest(_a, ["Icon", "iconPosition", "iconSize", "children", "onClick"]);
|
|
196
|
-
return (React.createElement(Base, Object.assign({}, props, { iconButton: !(Icon == null) && !children, onClick: onClick }),
|
|
198
|
+
return (React.createElement(Base, Object.assign({}, props, { ref: ref, iconButton: !(Icon == null) && !children, onClick: onClick }),
|
|
197
199
|
iconPosition === "right" ? React.createElement(ContentContainer, null, children) : null,
|
|
198
200
|
Icon != null ? (React.createElement(IconContainer, { iconPosition: iconPosition },
|
|
199
201
|
React.createElement(Icon, { size: iconSize || fontSizes[(_b = props.fontSize) !== null && _b !== void 0 ? _b : 4] }))) : null,
|
|
200
202
|
iconPosition === "left" ? React.createElement(ContentContainer, null, children) : null));
|
|
201
203
|
};
|
|
202
|
-
const
|
|
204
|
+
const ButtonWithRef = React.forwardRef(Button);
|
|
205
|
+
const StyledButtonExpand = styled(ButtonWithRef).attrs((props) => ({
|
|
203
206
|
Icon: props.Icon != null || ChevronBottom,
|
|
204
207
|
iconPosition: props.iconPosition || "right",
|
|
205
208
|
})) `
|
|
@@ -208,14 +211,17 @@ const StyledExpandButton = styled(Button).attrs((props) => ({
|
|
|
208
211
|
${(p) => (p.expanded ? "transform: rotate(180deg)" : "")}
|
|
209
212
|
}
|
|
210
213
|
`;
|
|
211
|
-
export
|
|
214
|
+
export function ButtonExpand(_a, ref) {
|
|
212
215
|
var { onToggle, onClick } = _a, props = __rest(_a, ["onToggle", "onClick"]);
|
|
213
216
|
const [expanded, setExpanded] = useState(false);
|
|
214
|
-
return (React.createElement(
|
|
217
|
+
return (React.createElement(StyledButtonExpand, Object.assign({}, props, { ref: ref, expanded: expanded, onClick: (event) => {
|
|
215
218
|
setExpanded((expanded) => !expanded);
|
|
216
219
|
onToggle != null && onToggle(!expanded);
|
|
217
220
|
onClick != null && onClick(event);
|
|
218
221
|
} })));
|
|
219
|
-
}
|
|
222
|
+
}
|
|
220
223
|
Button.Unstyled = ButtonUnstyled;
|
|
221
|
-
|
|
224
|
+
Button.Expand = React.forwardRef(ButtonExpand);
|
|
225
|
+
ButtonWithRef.Unstyled = Button.Unstyled;
|
|
226
|
+
ButtonWithRef.Expand = Button.Expand;
|
|
227
|
+
export default ButtonWithRef;
|
|
@@ -1,30 +1,79 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { TextProps } from "../../asorted/Text";
|
|
2
3
|
import { BaseStyledProps } from "../../styled";
|
|
3
4
|
export declare type LinkProps = React.AnchorHTMLAttributes<HTMLAnchorElement> & BaseStyledProps & {
|
|
5
|
+
/**
|
|
6
|
+
* Component that takes `{size: number; color?: string}` as props
|
|
7
|
+
*/
|
|
4
8
|
Icon?: React.ComponentType<{
|
|
5
9
|
size: number;
|
|
6
10
|
color?: string;
|
|
7
11
|
}>;
|
|
12
|
+
/**
|
|
13
|
+
* Affects the colors of the text, icon & underline, can be overriden by the `color` prop
|
|
14
|
+
*/
|
|
8
15
|
type?: "main" | "shade" | "color";
|
|
16
|
+
/**
|
|
17
|
+
* Affect the font variant & icon size
|
|
18
|
+
*/
|
|
9
19
|
size?: "small" | "medium" | "large";
|
|
20
|
+
/**
|
|
21
|
+
* Color of the link, overrides colors defined by the `type` prop
|
|
22
|
+
*/
|
|
23
|
+
color?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Props passed to the rendered text
|
|
26
|
+
*/
|
|
27
|
+
textProps?: TextProps;
|
|
28
|
+
/**
|
|
29
|
+
* If true text will always be underlined, else it will be underlined only on hover
|
|
30
|
+
*/
|
|
31
|
+
alwaysUnderline?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Position of the icon relative to the text
|
|
34
|
+
*/
|
|
10
35
|
iconPosition?: "right" | "left";
|
|
11
36
|
disabled?: boolean;
|
|
12
37
|
children?: React.ReactNode;
|
|
13
38
|
};
|
|
14
|
-
export declare const
|
|
39
|
+
export declare const DEFAULT_ICON_POSITION = "right";
|
|
40
|
+
export declare const DEFAULT_SIZE = "medium";
|
|
41
|
+
export declare const DEFAULT_TYPE = "main";
|
|
42
|
+
export declare const Base: import("styled-components").StyledComponent<"a", import("styled-components").DefaultTheme, React.AnchorHTMLAttributes<HTMLAnchorElement> & import("styled-system").SpaceProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol> & import("styled-system").FlexboxProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & import("styled-system").PositionProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & import("styled-system").ColorProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol> & import("styled-system").LayoutProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & import("styled-system").BorderProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, import("csstype").Property.Border<import("styled-system").TLengthStyledSystem>> & import("styled-system").OverflowProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & {
|
|
15
43
|
columnGap?: string | number | undefined;
|
|
16
44
|
rowGap?: string | number | undefined;
|
|
17
45
|
color?: string | undefined;
|
|
18
|
-
display?: string | undefined;
|
|
19
|
-
position?: string | undefined;
|
|
20
|
-
maxHeight?: number | undefined;
|
|
21
46
|
} & {
|
|
47
|
+
/**
|
|
48
|
+
* Component that takes `{size: number; color?: string}` as props
|
|
49
|
+
*/
|
|
22
50
|
Icon?: React.ComponentType<{
|
|
23
51
|
size: number;
|
|
24
52
|
color?: string | undefined;
|
|
25
53
|
}> | undefined;
|
|
54
|
+
/**
|
|
55
|
+
* Affects the colors of the text, icon & underline, can be overriden by the `color` prop
|
|
56
|
+
*/
|
|
26
57
|
type?: "main" | "color" | "shade" | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* Affect the font variant & icon size
|
|
60
|
+
*/
|
|
27
61
|
size?: "small" | "medium" | "large" | undefined;
|
|
62
|
+
/**
|
|
63
|
+
* Color of the link, overrides colors defined by the `type` prop
|
|
64
|
+
*/
|
|
65
|
+
color?: string | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* Props passed to the rendered text
|
|
68
|
+
*/
|
|
69
|
+
textProps?: TextProps | undefined;
|
|
70
|
+
/**
|
|
71
|
+
* If true text will always be underlined, else it will be underlined only on hover
|
|
72
|
+
*/
|
|
73
|
+
alwaysUnderline?: boolean | undefined;
|
|
74
|
+
/**
|
|
75
|
+
* Position of the icon relative to the text
|
|
76
|
+
*/
|
|
28
77
|
iconPosition?: "left" | "right" | undefined;
|
|
29
78
|
disabled?: boolean | undefined;
|
|
30
79
|
children?: React.ReactNode;
|
|
@@ -4,6 +4,9 @@ import { getLinkColors } from "./getLinkStyle";
|
|
|
4
4
|
import { ctaIconSize, ctaTextType } from "../getCtaStyle";
|
|
5
5
|
import { Text } from "../../asorted";
|
|
6
6
|
import baseStyled from "../../styled";
|
|
7
|
+
export const DEFAULT_ICON_POSITION = "right";
|
|
8
|
+
export const DEFAULT_SIZE = "medium";
|
|
9
|
+
export const DEFAULT_TYPE = "main";
|
|
7
10
|
const IconContainer = styled.div `
|
|
8
11
|
${(p) => p.iconLink ? "" : p.iconPosition === "left" ? `margin-right: 6px;` : `margin-left: 6px;`}
|
|
9
12
|
display: flex;
|
|
@@ -11,7 +14,7 @@ const IconContainer = styled.div `
|
|
|
11
14
|
justify-content: center;
|
|
12
15
|
`;
|
|
13
16
|
export const Base = baseStyled.a `
|
|
14
|
-
color: ${({ theme, disabled, type = "main" }) => getLinkColors(theme.colors)[disabled ? "disabled" : type]["default"]};
|
|
17
|
+
color: ${({ color, theme, disabled, type = "main" }) => color || getLinkColors(theme.colors)[disabled ? "disabled" : type]["default"]};
|
|
15
18
|
cursor: pointer;
|
|
16
19
|
display: inline-flex;
|
|
17
20
|
flex-direction: row;
|
|
@@ -19,27 +22,28 @@ export const Base = baseStyled.a `
|
|
|
19
22
|
align-items: center;
|
|
20
23
|
justify-content: center;
|
|
21
24
|
|
|
22
|
-
text-decoration: none;
|
|
23
|
-
|
|
24
25
|
:hover {
|
|
25
26
|
text-decoration: underline;
|
|
26
27
|
}
|
|
27
28
|
:active {
|
|
28
|
-
color: ${({ theme, type = "main" }) => getLinkColors(theme.colors)[type]["pressed"]};
|
|
29
|
+
color: ${({ color, theme, type = "main" }) => color || getLinkColors(theme.colors)[type]["pressed"]};
|
|
29
30
|
text-decoration: underline;
|
|
30
31
|
}
|
|
32
|
+
|
|
33
|
+
text-decoration: ${(p) => (p.alwaysUnderline ? "underline" : "none")};
|
|
34
|
+
|
|
31
35
|
`;
|
|
32
|
-
const LinkContainer = (
|
|
33
|
-
const {
|
|
36
|
+
const LinkContainer = ({ Icon, iconPosition = DEFAULT_ICON_POSITION, children, color, size = DEFAULT_SIZE, textProps, }) => {
|
|
37
|
+
const text = (React.createElement(Text, Object.assign({ variant: ctaTextType[size], fontWeight: "semiBold", color: color || "inherit" }, textProps), children));
|
|
34
38
|
return (React.createElement(React.Fragment, null,
|
|
35
|
-
iconPosition === "right" && children ?
|
|
39
|
+
iconPosition === "right" && children ? text : null,
|
|
36
40
|
Icon ? (React.createElement(IconContainer, { iconLink: !children, iconPosition: iconPosition },
|
|
37
|
-
React.createElement(Icon, { size: ctaIconSize[size], color: "currentcolor" }))) : null,
|
|
38
|
-
iconPosition === "left" && children ?
|
|
41
|
+
React.createElement(Icon, { size: ctaIconSize[size], color: color || "currentcolor" }))) : null,
|
|
42
|
+
iconPosition === "left" && children ? text : null));
|
|
39
43
|
};
|
|
40
44
|
const Link = (props) => {
|
|
41
|
-
const { type =
|
|
42
|
-
return (React.createElement(Base, Object.assign({}, props),
|
|
45
|
+
const { type = DEFAULT_TYPE, size = DEFAULT_SIZE, color } = props;
|
|
46
|
+
return (React.createElement(Base, Object.assign({ color: color }, props),
|
|
43
47
|
React.createElement(LinkContainer, Object.assign({}, props, { type: type, size: size }))));
|
|
44
48
|
};
|
|
45
49
|
export default Link;
|
|
@@ -40,29 +40,23 @@ export declare const BaseInput: import("styled-components").StyledComponent<"inp
|
|
|
40
40
|
} & TypographyProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>>, never>;
|
|
41
41
|
export declare const InputErrorContainer: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, import("../../asorted/Text").TextProps, keyof import("../../asorted/Text").TextProps>;
|
|
42
42
|
export declare const InputWarningContainer: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, import("../../asorted/Text").TextProps, keyof import("../../asorted/Text").TextProps>;
|
|
43
|
-
export declare const InputRenderLeftContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, import("styled-system").SpaceProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol> & import("styled-system").FlexboxProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & import("styled-system").PositionProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & import("styled-system").ColorProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol> & import("styled-system").LayoutProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & import("styled-system").OverflowProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & {
|
|
43
|
+
export declare const InputRenderLeftContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, import("styled-system").SpaceProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol> & import("styled-system").FlexboxProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & import("styled-system").PositionProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & import("styled-system").ColorProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol> & import("styled-system").LayoutProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & import("styled-system").BorderProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, import("csstype").Property.Border<import("styled-system").TLengthStyledSystem>> & import("styled-system").OverflowProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & {
|
|
44
44
|
columnGap?: string | number | undefined;
|
|
45
45
|
rowGap?: string | number | undefined;
|
|
46
46
|
color?: string | undefined;
|
|
47
|
-
display?: string | undefined;
|
|
48
|
-
position?: string | undefined;
|
|
49
|
-
maxHeight?: number | undefined;
|
|
50
47
|
} & {
|
|
51
48
|
alignItems: string;
|
|
52
49
|
pl: string;
|
|
53
|
-
}, "overflow" | "p" | "color" | "
|
|
54
|
-
export declare const InputRenderRightContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, import("styled-system").SpaceProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol> & import("styled-system").FlexboxProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & import("styled-system").PositionProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & import("styled-system").ColorProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol> & import("styled-system").LayoutProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & import("styled-system").OverflowProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & {
|
|
50
|
+
}, "overflow" | "p" | "color" | "size" | "rowGap" | "alignContent" | "alignItems" | "alignSelf" | "backgroundColor" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStyle" | "borderBottomWidth" | "borderLeftColor" | "borderLeftStyle" | "borderLeftWidth" | "borderRightColor" | "borderRightStyle" | "borderRightWidth" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStyle" | "borderTopWidth" | "bottom" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "opacity" | "order" | "overflowX" | "overflowY" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "top" | "verticalAlign" | "width" | "zIndex" | "border" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderStyle" | "borderTop" | "borderWidth" | "flex" | "margin" | "padding" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "bg" | "borderX" | "borderY">;
|
|
51
|
+
export declare const InputRenderRightContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, import("styled-system").SpaceProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol> & import("styled-system").FlexboxProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & import("styled-system").PositionProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & import("styled-system").ColorProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol> & import("styled-system").LayoutProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & import("styled-system").BorderProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, import("csstype").Property.Border<import("styled-system").TLengthStyledSystem>> & import("styled-system").OverflowProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & {
|
|
55
52
|
columnGap?: string | number | undefined;
|
|
56
53
|
rowGap?: string | number | undefined;
|
|
57
54
|
color?: string | undefined;
|
|
58
|
-
display?: string | undefined;
|
|
59
|
-
position?: string | undefined;
|
|
60
|
-
maxHeight?: number | undefined;
|
|
61
55
|
} & {
|
|
62
56
|
alignItems: string;
|
|
63
57
|
pr: string;
|
|
64
|
-
}, "overflow" | "p" | "color" | "
|
|
65
|
-
declare function Input<T = ValueType>(props: InputProps<T>, ref
|
|
58
|
+
}, "overflow" | "p" | "color" | "size" | "rowGap" | "alignContent" | "alignItems" | "alignSelf" | "backgroundColor" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStyle" | "borderBottomWidth" | "borderLeftColor" | "borderLeftStyle" | "borderLeftWidth" | "borderRightColor" | "borderRightStyle" | "borderRightWidth" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStyle" | "borderTopWidth" | "bottom" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "opacity" | "order" | "overflowX" | "overflowY" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "top" | "verticalAlign" | "width" | "zIndex" | "border" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderStyle" | "borderTop" | "borderWidth" | "flex" | "margin" | "padding" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "bg" | "borderX" | "borderY">;
|
|
59
|
+
declare function Input<T = ValueType>(props: InputProps<T>, ref?: React.ForwardedRef<HTMLInputElement>): JSX.Element;
|
|
66
60
|
declare const _default: <T>(props: Omit<CommonProps, "onChange" | "value"> & {
|
|
67
61
|
value: T;
|
|
68
62
|
onChange?: ((value: T) => void) | undefined;
|
|
@@ -77,10 +71,10 @@ declare const _default: <T>(props: Omit<CommonProps, "onChange" | "value"> & {
|
|
|
77
71
|
} & {
|
|
78
72
|
theme?: import("styled-components").DefaultTheme | undefined;
|
|
79
73
|
} & ({} | {
|
|
80
|
-
children?:
|
|
74
|
+
children?: import("react").ReactNode;
|
|
81
75
|
})) & {
|
|
82
|
-
as?: string |
|
|
83
|
-
forwardedAs?: string |
|
|
76
|
+
as?: string | import("react").ComponentType<any> | undefined;
|
|
77
|
+
forwardedAs?: string | import("react").ComponentType<any> | undefined;
|
|
84
78
|
}) | undefined;
|
|
85
79
|
/**
|
|
86
80
|
* A function can be provided to serialize a value of any type to a string.
|