@ledgerhq/react-ui 0.4.0 → 0.5.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/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/Table/Columns.d.ts +60 -11
- package/components/Table/Columns.js +6 -16
- package/components/Table/index.d.ts +44 -12
- package/components/Table/index.js +36 -16
- package/components/Table/stories.helper.js +13 -12
- package/components/animations/GlitchText/index.d.ts +0 -1
- package/components/asorted/Divider/index.d.ts +0 -1
- package/components/asorted/Icon/BoxedIcon.d.ts +48 -0
- package/components/asorted/Icon/BoxedIcon.js +58 -0
- package/components/asorted/Icon/Icon.d.ts +0 -2
- package/components/asorted/Icon/Icon.js +0 -7
- package/components/asorted/Icon/index.d.ts +3 -1
- package/components/asorted/Icon/index.js +3 -1
- 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/Dropdown/index.d.ts +0 -1
- package/components/form/LegendInput/index.d.ts +26 -2
- package/components/form/LegendInput/index.js +3 -2
- package/components/form/NumberInput/index.d.ts +25 -3
- package/components/form/NumberInput/index.js +3 -2
- package/components/form/QrCodeInput/index.d.ts +25 -3
- package/components/form/QrCodeInput/index.js +3 -2
- package/components/form/QuantityInput/index.d.ts +26 -4
- package/components/form/QuantityInput/index.js +3 -2
- package/components/form/SearchInput/index.d.ts +24 -2
- package/components/form/SearchInput/index.js +3 -2
- package/components/form/SelectInput/Control.d.ts +2 -2
- package/components/form/SelectInput/Control.js +3 -7
- package/components/form/SelectInput/DropdownIndicator.d.ts +0 -1
- package/components/form/SelectInput/IndicatorsContainer.d.ts +0 -1
- package/components/form/SelectInput/MenuList.d.ts +0 -1
- package/components/form/SelectInput/index.js +1 -1
- package/components/layout/Box/index.d.ts +1 -4
- package/components/layout/Flex/index.d.ts +2 -5
- package/components/layout/Popin/index.d.ts +4 -10
- package/components/layout/Side/index.d.ts +0 -1
- package/components/loaders/ProgressLoader/index.d.ts +0 -1
- package/components/message/Alert/index.d.ts +22 -3
- package/components/message/Alert/index.js +31 -23
- package/components/message/Tip/index.d.ts +0 -1
- package/components/message/Tooltip/index.d.ts +0 -1
- package/components/navigation/Aside/index.d.ts +2 -5
- package/components/navigation/Breadcrumb/index.js +1 -1
- package/components/navigation/progress/ProgressBar/Onboarding.d.ts +0 -1
- package/components/navigation/sideBar/Item/Item.d.ts +0 -1
- package/components/navigation/sideBar/Logo/Logo.d.ts +0 -1
- package/components/navigation/sideBar/SideBar/SideBar.d.ts +0 -1
- package/components/navigation/sideBar/Toggle/Toggle.d.ts +0 -1
- package/components/styled.d.ts +8 -5
- package/components/styled.js +2 -2
- package/package.json +2 -2
- package/styles/theme.js +1 -1
|
@@ -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.
|
|
@@ -1,6 +1,30 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
2
|
import { InputProps } from "../BaseInput";
|
|
3
3
|
export declare type Props = InputProps & {
|
|
4
4
|
legend: string;
|
|
5
5
|
};
|
|
6
|
-
|
|
6
|
+
declare const _default: React.ForwardRefExoticComponent<Omit<import("../BaseInput").CommonProps, "onChange" | "value"> & {
|
|
7
|
+
value: string;
|
|
8
|
+
onChange?: ((value: string) => void) | undefined;
|
|
9
|
+
onChangeEvent?: React.ChangeEventHandler<HTMLInputElement> | undefined;
|
|
10
|
+
renderLeft?: React.ReactNode | ((props: InputProps<string>) => React.ReactNode);
|
|
11
|
+
renderRight?: React.ReactNode | ((props: InputProps<string>) => React.ReactNode);
|
|
12
|
+
unwrapped?: boolean | undefined;
|
|
13
|
+
containerProps?: (({
|
|
14
|
+
[x: string]: any;
|
|
15
|
+
[x: number]: any;
|
|
16
|
+
[x: symbol]: any;
|
|
17
|
+
} & {
|
|
18
|
+
theme?: import("styled-components").DefaultTheme | undefined;
|
|
19
|
+
} & ({} | {
|
|
20
|
+
children?: import("react").ReactNode;
|
|
21
|
+
})) & {
|
|
22
|
+
as?: string | import("react").ComponentType<any> | undefined;
|
|
23
|
+
forwardedAs?: string | import("react").ComponentType<any> | undefined;
|
|
24
|
+
}) | undefined;
|
|
25
|
+
serialize?: ((value: string) => string) | undefined;
|
|
26
|
+
deserialize?: ((value: string) => string) | undefined;
|
|
27
|
+
} & {
|
|
28
|
+
legend: string;
|
|
29
|
+
} & React.RefAttributes<HTMLInputElement>>;
|
|
30
|
+
export default _default;
|
|
@@ -20,8 +20,9 @@ const Legend = styled(Text) `
|
|
|
20
20
|
color: ${(props) => props.theme.colors.neutral.c50};
|
|
21
21
|
}
|
|
22
22
|
`;
|
|
23
|
-
|
|
23
|
+
function LegendInput(_a, ref) {
|
|
24
24
|
var { legend } = _a, inputProps = __rest(_a, ["legend"]);
|
|
25
|
-
return (React.createElement(Input, Object.assign({}, inputProps, { renderRight: React.createElement(InputRenderRightContainer, null,
|
|
25
|
+
return (React.createElement(Input, Object.assign({ ref: ref }, inputProps, { renderRight: React.createElement(InputRenderRightContainer, null,
|
|
26
26
|
React.createElement(Legend, { variant: "body", "data-disabled": inputProps.disabled }, legend)) })));
|
|
27
27
|
}
|
|
28
|
+
export default React.forwardRef(LegendInput);
|
|
@@ -1,5 +1,27 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
2
|
import { InputProps } from "../BaseInput";
|
|
3
|
-
|
|
3
|
+
declare const _default: React.ForwardRefExoticComponent<Omit<import("../BaseInput").CommonProps, "onChange" | "value"> & {
|
|
4
|
+
value: number | undefined;
|
|
5
|
+
onChange?: ((value: number | undefined) => void) | undefined;
|
|
6
|
+
onChangeEvent?: React.ChangeEventHandler<HTMLInputElement> | undefined;
|
|
7
|
+
renderLeft?: React.ReactNode | ((props: InputProps<number | undefined>) => React.ReactNode);
|
|
8
|
+
renderRight?: React.ReactNode | ((props: InputProps<number | undefined>) => React.ReactNode);
|
|
9
|
+
unwrapped?: boolean | undefined;
|
|
10
|
+
containerProps?: (({
|
|
11
|
+
[x: string]: any;
|
|
12
|
+
[x: number]: any;
|
|
13
|
+
[x: symbol]: any;
|
|
14
|
+
} & {
|
|
15
|
+
theme?: import("styled-components").DefaultTheme | undefined;
|
|
16
|
+
} & ({} | {
|
|
17
|
+
children?: import("react").ReactNode;
|
|
18
|
+
})) & {
|
|
19
|
+
as?: string | import("react").ComponentType<any> | undefined;
|
|
20
|
+
forwardedAs?: string | import("react").ComponentType<any> | undefined;
|
|
21
|
+
}) | undefined;
|
|
22
|
+
serialize?: ((value: number | undefined) => string) | undefined;
|
|
23
|
+
deserialize?: ((value: string) => number | undefined) | undefined;
|
|
24
|
+
} & {
|
|
4
25
|
onPercentClick: (percent: number) => void;
|
|
5
|
-
}
|
|
26
|
+
} & React.RefAttributes<HTMLInputElement>>;
|
|
27
|
+
export default _default;
|
|
@@ -42,10 +42,11 @@ function deserialize(value) {
|
|
|
42
42
|
return undefined;
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
-
|
|
45
|
+
function NumberInput(_a, ref) {
|
|
46
46
|
var { value, onPercentClick, max, disabled } = _a, inputProps = __rest(_a, ["value", "onPercentClick", "max", "disabled"]);
|
|
47
|
-
return (React.createElement(Input, Object.assign({ serialize: serialize, deserialize: deserialize }, inputProps, { type: "number", value: value, max: max, disabled: disabled, renderRight: React.createElement(FlexBox, { alignItems: "center", justifyContent: "center", py: "3px", mr: "8px" }, [0.25, 0.5, 0.75, 1].map((percent) => (React.createElement(MaxButton, { key: percent, onClick: () => onPercentClick(percent), active: !!value && !!max && Number(value) === percent * Number(max), disabled: disabled },
|
|
47
|
+
return (React.createElement(Input, Object.assign({ ref: ref, serialize: serialize, deserialize: deserialize }, inputProps, { type: "number", value: value, max: max, disabled: disabled, renderRight: React.createElement(FlexBox, { alignItems: "center", justifyContent: "center", py: "3px", mr: "8px" }, [0.25, 0.5, 0.75, 1].map((percent) => (React.createElement(MaxButton, { key: percent, onClick: () => onPercentClick(percent), active: !!value && !!max && Number(value) === percent * Number(max), disabled: disabled },
|
|
48
48
|
React.createElement(Text, { variant: "tiny", color: "inherit" },
|
|
49
49
|
percent * 100,
|
|
50
50
|
"%"))))) })));
|
|
51
51
|
}
|
|
52
|
+
export default React.forwardRef(NumberInput);
|
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { InputProps } from "../BaseInput";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
declare const _default: React.ForwardRefExoticComponent<Omit<import("../BaseInput").CommonProps, "onChange" | "value"> & {
|
|
4
|
+
value: string;
|
|
5
|
+
onChange?: ((value: string) => void) | undefined;
|
|
6
|
+
onChangeEvent?: React.ChangeEventHandler<HTMLInputElement> | undefined;
|
|
7
|
+
renderLeft?: React.ReactNode | ((props: InputProps<string>) => React.ReactNode);
|
|
8
|
+
renderRight?: React.ReactNode | ((props: InputProps<string>) => React.ReactNode);
|
|
9
|
+
unwrapped?: boolean | undefined;
|
|
10
|
+
containerProps?: (({
|
|
11
|
+
[x: string]: any;
|
|
12
|
+
[x: number]: any;
|
|
13
|
+
[x: symbol]: any;
|
|
14
|
+
} & {
|
|
15
|
+
theme?: import("styled-components").DefaultTheme | undefined;
|
|
16
|
+
} & ({} | {
|
|
17
|
+
children?: import("react").ReactNode;
|
|
18
|
+
})) & {
|
|
19
|
+
as?: string | import("react").ComponentType<any> | undefined;
|
|
20
|
+
forwardedAs?: string | import("react").ComponentType<any> | undefined;
|
|
21
|
+
}) | undefined;
|
|
22
|
+
serialize?: ((value: string) => string) | undefined;
|
|
23
|
+
deserialize?: ((value: string) => string) | undefined;
|
|
24
|
+
} & {
|
|
25
|
+
onQrCodeClick?: ((e: React.FormEvent<HTMLButtonElement>) => void) | undefined;
|
|
26
|
+
} & React.RefAttributes<HTMLInputElement>>;
|
|
27
|
+
export default _default;
|
|
@@ -32,9 +32,10 @@ const QrCodeButton = styled.button `
|
|
|
32
32
|
cursor: unset;
|
|
33
33
|
}
|
|
34
34
|
`;
|
|
35
|
-
|
|
35
|
+
function QrCodeInput(_a, ref) {
|
|
36
36
|
var { onQrCodeClick } = _a, inputProps = __rest(_a, ["onQrCodeClick"]);
|
|
37
|
-
return (React.createElement(Input, Object.assign({}, inputProps, { renderRight: React.createElement(FlexBox, { alignItems: "center", justifyContent: "center", pr: "8px" },
|
|
37
|
+
return (React.createElement(Input, Object.assign({ ref: ref }, inputProps, { renderRight: React.createElement(FlexBox, { alignItems: "center", justifyContent: "center", pr: "8px" },
|
|
38
38
|
React.createElement(QrCodeButton, { onClick: onQrCodeClick, disabled: inputProps.disabled },
|
|
39
39
|
React.createElement(QrCodeMedium, { size: "20px" }))) })));
|
|
40
40
|
}
|
|
41
|
+
export default React.forwardRef(QrCodeInput);
|
|
@@ -1,6 +1,28 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { InputProps } from "../BaseInput";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
declare const _default: React.ForwardRefExoticComponent<Omit<import("../BaseInput").CommonProps, "onChange" | "value"> & {
|
|
4
|
+
value: string;
|
|
5
|
+
onChange?: ((value: string) => void) | undefined;
|
|
6
|
+
onChangeEvent?: React.ChangeEventHandler<HTMLInputElement> | undefined;
|
|
7
|
+
renderLeft?: React.ReactNode | ((props: InputProps<string>) => React.ReactNode);
|
|
8
|
+
renderRight?: React.ReactNode | ((props: InputProps<string>) => React.ReactNode);
|
|
9
|
+
unwrapped?: boolean | undefined;
|
|
10
|
+
containerProps?: (({
|
|
11
|
+
[x: string]: any;
|
|
12
|
+
[x: number]: any;
|
|
13
|
+
[x: symbol]: any;
|
|
14
|
+
} & {
|
|
15
|
+
theme?: import("styled-components").DefaultTheme | undefined;
|
|
16
|
+
} & ({} | {
|
|
17
|
+
children?: import("react").ReactNode;
|
|
18
|
+
})) & {
|
|
19
|
+
as?: string | import("react").ComponentType<any> | undefined;
|
|
20
|
+
forwardedAs?: string | import("react").ComponentType<any> | undefined;
|
|
21
|
+
}) | undefined;
|
|
22
|
+
serialize?: ((value: string) => string) | undefined;
|
|
23
|
+
deserialize?: ((value: string) => string) | undefined;
|
|
24
|
+
} & {
|
|
25
|
+
onMaxClick?: ((e: React.FormEvent<HTMLButtonElement>) => void) | undefined;
|
|
26
|
+
price?: string | undefined;
|
|
27
|
+
} & React.RefAttributes<HTMLInputElement>>;
|
|
28
|
+
export default _default;
|
|
@@ -37,10 +37,11 @@ const Legend = styled(Text) `
|
|
|
37
37
|
color: ${(p) => p.theme.colors.neutral.c50};
|
|
38
38
|
}
|
|
39
39
|
`;
|
|
40
|
-
|
|
40
|
+
function QuantityInput(_a, ref) {
|
|
41
41
|
var { onMaxClick, price } = _a, inputProps = __rest(_a, ["onMaxClick", "price"]);
|
|
42
|
-
return (React.createElement(Input, Object.assign({}, inputProps, { type: "number", renderRight: React.createElement(FlexBox, { alignItems: "center", justifyContent: "center", pr: "3px", py: "3px" },
|
|
42
|
+
return (React.createElement(Input, Object.assign({ ref: ref }, inputProps, { type: "number", renderRight: React.createElement(FlexBox, { alignItems: "center", justifyContent: "center", pr: "3px", py: "3px" },
|
|
43
43
|
price && (React.createElement(Legend, { variant: "body", pr: "12px", "data-disabled": inputProps.disabled }, price)),
|
|
44
44
|
React.createElement(MaxButton, { onClick: onMaxClick, disabled: inputProps.disabled },
|
|
45
45
|
React.createElement(Text, { variant: "tiny", color: "currentColor" }, "Max"))) })));
|
|
46
46
|
}
|
|
47
|
+
export default React.forwardRef(QuantityInput);
|
|
@@ -1,3 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
2
|
import { InputProps } from "../BaseInput";
|
|
3
|
-
|
|
3
|
+
declare const _default: React.ForwardRefExoticComponent<Omit<import("../BaseInput").CommonProps, "onChange" | "value"> & {
|
|
4
|
+
value: string;
|
|
5
|
+
onChange?: ((value: string) => void) | undefined;
|
|
6
|
+
onChangeEvent?: React.ChangeEventHandler<HTMLInputElement> | undefined;
|
|
7
|
+
renderLeft?: React.ReactNode | ((props: InputProps<string>) => React.ReactNode);
|
|
8
|
+
renderRight?: React.ReactNode | ((props: InputProps<string>) => React.ReactNode);
|
|
9
|
+
unwrapped?: boolean | undefined;
|
|
10
|
+
containerProps?: (({
|
|
11
|
+
[x: string]: any;
|
|
12
|
+
[x: number]: any;
|
|
13
|
+
[x: symbol]: any;
|
|
14
|
+
} & {
|
|
15
|
+
theme?: import("styled-components").DefaultTheme | undefined;
|
|
16
|
+
} & ({} | {
|
|
17
|
+
children?: import("react").ReactNode;
|
|
18
|
+
})) & {
|
|
19
|
+
as?: string | import("react").ComponentType<any> | undefined;
|
|
20
|
+
forwardedAs?: string | import("react").ComponentType<any> | undefined;
|
|
21
|
+
}) | undefined;
|
|
22
|
+
serialize?: ((value: string) => string) | undefined;
|
|
23
|
+
deserialize?: ((value: string) => string) | undefined;
|
|
24
|
+
} & React.RefAttributes<HTMLInputElement>>;
|
|
25
|
+
export default _default;
|
|
@@ -2,8 +2,9 @@ import React from "react";
|
|
|
2
2
|
import { useTheme } from "styled-components";
|
|
3
3
|
import Input, { InputRenderLeftContainer } from "../BaseInput";
|
|
4
4
|
import SearchMedium from "@ledgerhq/icons-ui/react/SearchMedium";
|
|
5
|
-
|
|
5
|
+
function SearchInput(props, ref) {
|
|
6
6
|
const theme = useTheme();
|
|
7
|
-
return (React.createElement(Input, Object.assign({}, props, { renderLeft: React.createElement(InputRenderLeftContainer, null,
|
|
7
|
+
return (React.createElement(Input, Object.assign({ ref: ref }, props, { renderLeft: React.createElement(InputRenderLeftContainer, null,
|
|
8
8
|
React.createElement(SearchMedium, { color: props.disabled ? theme.colors.neutral.c50 : theme.colors.neutral.c70 })) })));
|
|
9
9
|
}
|
|
10
|
+
export default React.forwardRef(SearchInput);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { Styles, ControlProps, OptionTypeBase } from "react-select";
|
|
2
|
+
import { DefaultTheme } from "styled-components";
|
|
3
3
|
export declare function getStyles<T extends OptionTypeBase = {
|
|
4
4
|
label: string;
|
|
5
5
|
value: string;
|
|
6
|
-
}, M extends boolean = false>(): NonNullable<Styles<T, M>["control"]>;
|
|
6
|
+
}, M extends boolean = false>(theme: DefaultTheme): NonNullable<Styles<T, M>["control"]>;
|
|
7
7
|
export declare function Control<T extends OptionTypeBase = {
|
|
8
8
|
label: string;
|
|
9
9
|
value: string;
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { components } from "react-select";
|
|
3
|
-
import styled from "styled-components";
|
|
4
3
|
import { InputContainer } from "../BaseInput";
|
|
5
|
-
export function getStyles() {
|
|
6
|
-
return (provided) => (Object.assign(Object.assign({}, provided), { display: "flex", alignItems: "center", width: "100%", border: 0, boxShadow: "none", borderRadius: "inherit", background: "transparent" }));
|
|
4
|
+
export function getStyles(theme) {
|
|
5
|
+
return (provided) => (Object.assign(Object.assign({}, provided), { display: "flex", alignItems: "center", width: "100%", border: 0, padding: `0px ${theme.space[7]}px`, boxShadow: "none", borderRadius: "inherit", background: "transparent" }));
|
|
7
6
|
}
|
|
8
|
-
const Container = styled(InputContainer) `
|
|
9
|
-
padding: 0 ${(p) => p.theme.space[7]}px;
|
|
10
|
-
`;
|
|
11
7
|
export function Control(props) {
|
|
12
8
|
const { isFocused, selectProps: { isDisabled, error, renderLeft }, children, } = props;
|
|
13
|
-
return (React.createElement(
|
|
9
|
+
return (React.createElement(InputContainer, { disabled: isDisabled, error: error, focus: isFocused },
|
|
14
10
|
React.createElement(components.Control, Object.assign({}, props),
|
|
15
11
|
renderLeft ? renderLeft(props) : null,
|
|
16
12
|
children)));
|
|
@@ -20,7 +20,7 @@ import * as OptionModule from "./Option";
|
|
|
20
20
|
import { IndicatorsContainer } from "./IndicatorsContainer";
|
|
21
21
|
import { InputErrorContainer } from "../BaseInput";
|
|
22
22
|
const stylesFn = (theme) => ({
|
|
23
|
-
control: ControlModule.getStyles(),
|
|
23
|
+
control: ControlModule.getStyles(theme),
|
|
24
24
|
valueContainer: ValueContainerModule.getStyles(),
|
|
25
25
|
dropdownIndicator: DropdownIndicatorModule.getStyles(),
|
|
26
26
|
menuList: MenuListModule.getStyles(theme),
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { BaseStyledProps } from "../../styled";
|
|
2
2
|
export declare type BoxProps = BaseStyledProps;
|
|
3
|
-
declare const Box: 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>>> & {
|
|
3
|
+
declare const Box: 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>>> & {
|
|
4
4
|
columnGap?: string | number | undefined;
|
|
5
5
|
rowGap?: string | number | undefined;
|
|
6
6
|
color?: string | undefined;
|
|
7
|
-
display?: string | undefined;
|
|
8
|
-
position?: string | undefined;
|
|
9
|
-
maxHeight?: number | undefined;
|
|
10
7
|
}, never>;
|
|
11
8
|
export default Box;
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { BaseStyledProps } from "../../styled";
|
|
2
2
|
export declare type FlexBoxProps = BaseStyledProps;
|
|
3
|
-
declare const FlexBox: 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>>> & {
|
|
3
|
+
declare const FlexBox: 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>>> & {
|
|
4
4
|
columnGap?: string | number | undefined;
|
|
5
5
|
rowGap?: string | number | undefined;
|
|
6
6
|
color?: string | undefined;
|
|
7
|
-
|
|
8
|
-
position?: string | undefined;
|
|
9
|
-
maxHeight?: number | undefined;
|
|
10
|
-
}, "overflow" | "p" | "color" | "left" | "right" | "bottom" | "top" | "size" | "flex" | "padding" | "rowGap" | "alignContent" | "alignItems" | "alignSelf" | "backgroundColor" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "opacity" | "order" | "overflowX" | "overflowY" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "verticalAlign" | "width" | "zIndex" | "margin" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "bg">;
|
|
7
|
+
}, "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">;
|
|
11
8
|
export default FlexBox;
|
|
@@ -12,28 +12,22 @@ export declare type PopinHeaderProps = BaseStyledProps & {
|
|
|
12
12
|
declare const PopinWrapper: {
|
|
13
13
|
({ children, ...popinProps }: PopinProps): React.ReactElement;
|
|
14
14
|
Header: ({ children, onClose, onBack, ...props }: PopinHeaderProps) => JSX.Element;
|
|
15
|
-
Body: 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>>> & {
|
|
15
|
+
Body: 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>>> & {
|
|
16
16
|
columnGap?: string | number | undefined;
|
|
17
17
|
rowGap?: string | number | undefined;
|
|
18
18
|
color?: string | undefined;
|
|
19
|
-
display?: string | undefined;
|
|
20
|
-
position?: string | undefined;
|
|
21
|
-
maxHeight?: number | undefined;
|
|
22
19
|
} & {
|
|
23
20
|
as: string;
|
|
24
21
|
flexDirection: string;
|
|
25
22
|
flex: number;
|
|
26
23
|
overflow: string;
|
|
27
|
-
}, "overflow" | "p" | "color" | "
|
|
28
|
-
Footer: 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>>> & {
|
|
24
|
+
}, "overflow" | "p" | "color" | "as" | "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">;
|
|
25
|
+
Footer: 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>>> & {
|
|
29
26
|
columnGap?: string | number | undefined;
|
|
30
27
|
rowGap?: string | number | undefined;
|
|
31
28
|
color?: string | undefined;
|
|
32
|
-
display?: string | undefined;
|
|
33
|
-
position?: string | undefined;
|
|
34
|
-
maxHeight?: number | undefined;
|
|
35
29
|
} & {
|
|
36
30
|
as: string;
|
|
37
|
-
}, "overflow" | "p" | "color" | "
|
|
31
|
+
}, "overflow" | "p" | "color" | "as" | "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">;
|
|
38
32
|
};
|
|
39
33
|
export default PopinWrapper;
|
|
@@ -1,9 +1,28 @@
|
|
|
1
|
-
|
|
1
|
+
import { TextVariants } from "../../../styles/theme";
|
|
2
2
|
declare type AlertType = "info" | "warning" | "error";
|
|
3
3
|
export interface AlertProps {
|
|
4
|
+
/**
|
|
5
|
+
* Affects the colors of the background & text and what icon can be displayed
|
|
6
|
+
*/
|
|
4
7
|
type?: AlertType;
|
|
5
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Title of the Alert
|
|
10
|
+
*/
|
|
11
|
+
title?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Method for rendering additional content under the title `{ color: string; textProps: { variant?: TextVariants; fontWeight?: string } }` is passed as props to easily style text elements
|
|
14
|
+
*/
|
|
15
|
+
renderContent?: (props: {
|
|
16
|
+
color: string;
|
|
17
|
+
textProps: {
|
|
18
|
+
variant?: TextVariants;
|
|
19
|
+
fontWeight?: string;
|
|
20
|
+
};
|
|
21
|
+
}) => JSX.Element;
|
|
22
|
+
/**
|
|
23
|
+
* Whether or not to display an icon
|
|
24
|
+
*/
|
|
6
25
|
showIcon?: boolean;
|
|
7
26
|
}
|
|
8
|
-
export default function Alert({ type, title, showIcon }: AlertProps): JSX.Element;
|
|
27
|
+
export default function Alert({ type, title, showIcon, renderContent, }: AlertProps): JSX.Element;
|
|
9
28
|
export {};
|