@ledgerhq/react-ui 0.2.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/README.md +47 -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 +62 -13
- package/components/Table/Columns.js +8 -18
- package/components/Table/index.d.ts +47 -14
- package/components/Table/index.js +37 -20
- package/components/Table/stories.helper.js +19 -18
- package/components/Tag/index.d.ts +18 -5
- package/components/Tag/index.js +54 -21
- package/components/animations/GlitchText/index.d.ts +6 -0
- package/components/animations/GlitchText/index.js +35 -0
- 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 +58 -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 +6 -22
- package/components/asorted/Text/index.js +7 -16
- package/components/asorted/Text/styles.d.ts +2 -1
- package/components/asorted/Text/styles.js +21 -9
- 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 +8 -8
- package/components/cta/Button/index.d.ts +16 -8
- package/components/cta/Button/index.js +76 -65
- package/components/cta/Link/index.d.ts +59 -2
- package/components/cta/Link/index.js +17 -12
- package/components/cta/Toggle/index.d.ts +0 -1
- package/components/cta/Toggle/index.js +1 -1
- package/components/form/BaseInput/index.d.ts +81 -11
- package/components/form/BaseInput/index.js +42 -19
- package/components/form/Checkbox/Checkbox.js +12 -9
- package/components/form/Dropdown/index.d.ts +0 -1
- package/components/form/Dropdown/index.js +2 -2
- 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 +19 -7
- 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 +5 -2
- package/components/form/Radio/RadioElement.js +15 -13
- package/components/form/Radio/RadioListElement.d.ts +22 -0
- package/components/form/Radio/RadioListElement.js +63 -0
- package/components/form/Radio/index.d.ts +8 -1
- package/components/form/Radio/index.js +2 -0
- package/components/form/SearchInput/index.d.ts +24 -2
- package/components/form/SearchInput/index.js +4 -3
- 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/DropdownIndicator.js +1 -1
- package/components/form/SelectInput/IndicatorsContainer.d.ts +0 -1
- package/components/form/SelectInput/MenuList.d.ts +0 -1
- package/components/form/SelectInput/MenuList.js +1 -1
- package/components/form/SelectInput/Option.js +11 -11
- package/components/form/SelectInput/ValueContainer.js +1 -1
- package/components/form/SelectInput/index.d.ts +3 -2
- package/components/form/SelectInput/index.js +5 -5
- 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 +8 -0
- package/components/layout/Box/index.js +3 -0
- package/components/layout/Drawer/index.d.ts +13 -0
- package/components/layout/{Side/Side.js → Drawer/index.js} +12 -12
- package/components/layout/Flex/index.d.ts +7 -7
- package/components/layout/Flex/index.js +2 -11
- package/components/layout/Grid/index.d.ts +3 -2
- package/components/layout/Grid/index.js +3 -6
- package/components/layout/Popin/index.d.ts +27 -6
- package/components/layout/Popin/index.js +65 -41
- package/components/layout/Side/index.d.ts +0 -1
- package/components/layout/Side/index.js +2 -2
- package/components/layout/index.d.ts +2 -0
- package/components/layout/index.js +2 -0
- package/components/loaders/ProgressLoader/index.d.ts +0 -1
- package/components/loaders/ProgressLoader/index.js +3 -3
- package/components/message/Alert/index.d.ts +22 -3
- package/components/message/Alert/index.js +31 -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 +7 -0
- package/components/message/Tip/index.js +43 -0
- package/components/message/Tooltip/index.d.ts +3 -3
- package/components/message/Tooltip/index.js +1 -1
- package/components/message/Tooltip/styles.js +3 -3
- package/components/message/index.d.ts +3 -0
- package/components/message/index.js +3 -0
- package/components/navigation/Aside/index.d.ts +5 -1
- package/components/navigation/Breadcrumb/index.js +6 -6
- package/components/navigation/Header/index.d.ts +3 -3
- 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.js +9 -9
- package/components/navigation/sideBar/Item/Item.d.ts +4 -3
- package/components/navigation/sideBar/Item/Item.js +34 -16
- package/components/navigation/sideBar/Logo/Logo.d.ts +0 -1
- package/components/navigation/sideBar/SideBar/SideBar.d.ts +1 -2
- package/components/navigation/sideBar/SideBar/SideBar.js +14 -6
- package/components/navigation/sideBar/Toggle/Toggle.d.ts +0 -1
- package/components/navigation/sideBar/Toggle/Toggle.js +2 -2
- package/components/styled.d.ts +16 -0
- package/components/styled.js +13 -0
- package/components/tabs/Bar/index.js +4 -4
- package/components/tabs/Chip/index.d.ts +13 -0
- package/components/tabs/Chip/index.js +21 -0
- package/components/tabs/Pill/index.js +7 -7
- package/components/tabs/Tabs/index.js +8 -7
- package/components/tabs/index.d.ts +2 -0
- package/components/tabs/index.js +2 -0
- package/package.json +4 -4
- package/styles/InvertTheme.d.ts +1 -8
- package/styles/StyleProvider.d.ts +3 -3
- package/styles/StyleProvider.js +3 -3
- package/styles/global.d.ts +1 -0
- package/styles/global.js +15 -36
- package/styles/index.d.ts +0 -1
- package/styles/index.js +0 -1
- package/styles/theme.d.ts +5 -2
- package/styles/theme.js +7 -8
- package/components/layout/Side/Side.d.ts +0 -13
- package/styles/reset.d.ts +0 -2
- package/styles/reset.js +0 -62
|
@@ -1,12 +1,33 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
height?: number;
|
|
5
|
-
}
|
|
6
|
-
export declare type PopinProps = WrapperProps & {
|
|
2
|
+
import { BaseStyledProps } from "../../styled";
|
|
3
|
+
export interface PopinProps extends BaseStyledProps {
|
|
7
4
|
isOpen: boolean;
|
|
8
5
|
children: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export declare type PopinHeaderProps = BaseStyledProps & {
|
|
9
8
|
onClose?: () => void;
|
|
9
|
+
onBack?: () => void;
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
};
|
|
12
|
+
declare const PopinWrapper: {
|
|
13
|
+
({ children, ...popinProps }: PopinProps): React.ReactElement;
|
|
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").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
|
+
columnGap?: string | number | undefined;
|
|
17
|
+
rowGap?: string | number | undefined;
|
|
18
|
+
color?: string | undefined;
|
|
19
|
+
} & {
|
|
20
|
+
as: string;
|
|
21
|
+
flexDirection: string;
|
|
22
|
+
flex: number;
|
|
23
|
+
overflow: string;
|
|
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>>> & {
|
|
26
|
+
columnGap?: string | number | undefined;
|
|
27
|
+
rowGap?: string | number | undefined;
|
|
28
|
+
color?: string | undefined;
|
|
29
|
+
} & {
|
|
30
|
+
as: string;
|
|
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">;
|
|
10
32
|
};
|
|
11
|
-
declare const PopinWrapper: ({ children, ...popinProps }: PopinProps) => React.ReactElement;
|
|
12
33
|
export default PopinWrapper;
|
|
@@ -12,54 +12,75 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
12
12
|
import React from "react";
|
|
13
13
|
import ReactDOM from "react-dom";
|
|
14
14
|
import styled from "styled-components";
|
|
15
|
+
import CloseIcon from "@ledgerhq/icons-ui/react/CloseRegular";
|
|
16
|
+
import ArrowLeftIcon from "@ledgerhq/icons-ui/react/ArrowLeftRegular";
|
|
17
|
+
import baseStyled from "../../styled";
|
|
18
|
+
import Flex from "../../layout/Flex";
|
|
15
19
|
import Button from "../../cta/Button";
|
|
16
|
-
import Close from "@ledgerhq/icons-ui/react/CloseRegular";
|
|
17
20
|
import TransitionInOut from "../../transitions/TransitionInOut";
|
|
18
21
|
import TransitionScale from "../../transitions/TransitionScale";
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
const ICON_SIZE = 20;
|
|
23
|
+
const Wrapper = styled(Flex).attrs((p) => ({
|
|
24
|
+
flexDirection: "column",
|
|
25
|
+
alignItems: "stretch",
|
|
26
|
+
justifyContent: "space-between",
|
|
27
|
+
height: p.height || `${p.theme.sizes.drawer.popin.max.height}px`,
|
|
28
|
+
width: p.width || `${p.theme.sizes.drawer.popin.max.width}px`,
|
|
29
|
+
minHeight: `${p.theme.sizes.drawer.popin.min.height}px`,
|
|
30
|
+
minWidth: `${p.theme.sizes.drawer.popin.min.width}px`,
|
|
31
|
+
maxHeight: `${p.theme.sizes.drawer.popin.max.height}px`,
|
|
32
|
+
maxWidth: `${p.theme.sizes.drawer.popin.max.width}px`,
|
|
33
|
+
zIndex: p.theme.zIndexes[8],
|
|
34
|
+
p: p.p !== undefined ? p.p : p.theme.space[10],
|
|
35
|
+
rowGap: 6,
|
|
36
|
+
backgroundColor: p.theme.colors.neutral.c00,
|
|
37
|
+
})) ``;
|
|
38
|
+
const Overlay = styled(Flex).attrs((p) => ({
|
|
39
|
+
justifyContent: "center",
|
|
40
|
+
alignItems: "center",
|
|
41
|
+
width: "100vw",
|
|
42
|
+
height: "100vh",
|
|
43
|
+
zIndex: p.theme.zIndexes[8],
|
|
44
|
+
position: "fixed",
|
|
45
|
+
top: 0,
|
|
46
|
+
left: 0,
|
|
47
|
+
backgroundColor: p.theme.colors.neutral.c100a07,
|
|
48
|
+
})) ``;
|
|
49
|
+
const Header = baseStyled.section `
|
|
50
|
+
display: grid;
|
|
51
|
+
grid-template-columns: [icon] ${ICON_SIZE}px [title] 1fr [icon] ${ICON_SIZE}px;
|
|
52
|
+
column-gap: 12px;
|
|
25
53
|
`;
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
54
|
+
const HeaderTitleContainer = styled(Flex).attrs(() => ({
|
|
55
|
+
justifyContent: "center",
|
|
56
|
+
})) ``;
|
|
57
|
+
const PopinBody = baseStyled(Flex).attrs({
|
|
58
|
+
as: "section",
|
|
59
|
+
flexDirection: "column",
|
|
60
|
+
flex: 1,
|
|
61
|
+
overflow: "auto",
|
|
62
|
+
}) ``;
|
|
63
|
+
const PopinFooter = baseStyled(Flex).attrs({ as: "section" }) ``;
|
|
64
|
+
const IconContainer = styled(Button.Unstyled) `
|
|
33
65
|
display: flex;
|
|
34
|
-
flex-direction: column;
|
|
35
|
-
align-items: stretch;
|
|
36
|
-
justify-content: space-between;
|
|
37
|
-
z-index: ${(p) => p.theme.zIndexes[8]};
|
|
38
|
-
`;
|
|
39
|
-
const Overlay = styled.div `
|
|
40
|
-
position: fixed;
|
|
41
|
-
display: flex;
|
|
42
|
-
justify-content: center;
|
|
43
66
|
align-items: center;
|
|
44
|
-
top: 0;
|
|
45
|
-
left: 0;
|
|
46
|
-
width: 100vw;
|
|
47
|
-
height: 100vh;
|
|
48
|
-
z-index: 999;
|
|
49
|
-
background-color: ${(p) => p.theme.colors.palette.neutral.c100a07};
|
|
50
|
-
`;
|
|
51
|
-
const CloseButton = styled(Button) `
|
|
52
|
-
position: absolute;
|
|
53
|
-
top: ${(p) => p.theme.space[6]}px;
|
|
54
|
-
right: ${(p) => p.theme.space[6]}px;
|
|
55
67
|
`;
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
68
|
+
const PopinHeader = (_a) => {
|
|
69
|
+
var { children, onClose, onBack } = _a, props = __rest(_a, ["children", "onClose", "onBack"]);
|
|
70
|
+
return (React.createElement(Header, Object.assign({}, props),
|
|
71
|
+
React.createElement(Flex, null, onBack ? (React.createElement(IconContainer, { onClick: onBack },
|
|
72
|
+
React.createElement(ArrowLeftIcon, { size: ICON_SIZE, color: "neutral.c100" }))) : null),
|
|
73
|
+
React.createElement(HeaderTitleContainer, null, children),
|
|
74
|
+
React.createElement(Flex, null, onClose ? (React.createElement(IconContainer, { onClick: onClose },
|
|
75
|
+
React.createElement(CloseIcon, { size: ICON_SIZE, color: "neutral.c100" }))) : null)));
|
|
76
|
+
};
|
|
77
|
+
const Popin = (_a) => {
|
|
78
|
+
var { isOpen, children, width, height } = _a, props = __rest(_a, ["isOpen", "children", "width", "height"]);
|
|
79
|
+
return (React.createElement(TransitionInOut, { in: isOpen, appear: true, mountOnEnter: true, unmountOnExit: true },
|
|
80
|
+
React.createElement(Overlay, null,
|
|
81
|
+
React.createElement(TransitionScale, { in: isOpen, appear: true },
|
|
82
|
+
React.createElement(Wrapper, Object.assign({ width: width, height: height }, props), children)))));
|
|
83
|
+
};
|
|
63
84
|
const PopinWrapper = (_a) => {
|
|
64
85
|
var { children } = _a, popinProps = __rest(_a, ["children"]);
|
|
65
86
|
const $root = React.useMemo(() => document.querySelector("#ll-popin-root"), []);
|
|
@@ -67,4 +88,7 @@ const PopinWrapper = (_a) => {
|
|
|
67
88
|
throw new Error("popin root cannot be found");
|
|
68
89
|
return ReactDOM.createPortal(React.createElement(Popin, Object.assign({}, popinProps), children), $root);
|
|
69
90
|
};
|
|
91
|
+
PopinWrapper.Header = PopinHeader;
|
|
92
|
+
PopinWrapper.Body = PopinBody;
|
|
93
|
+
PopinWrapper.Footer = PopinFooter;
|
|
70
94
|
export default PopinWrapper;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useRef, useCallback, useEffect, useState } from "react";
|
|
2
2
|
import { TransitionGroup } from "react-transition-group";
|
|
3
|
-
import
|
|
3
|
+
import Drawer from "../Drawer";
|
|
4
4
|
import TransitionSlide from "../../transitions/TransitionSlide";
|
|
5
5
|
import { useSide } from "./Provider";
|
|
6
6
|
export const SideWrapper = (props) => {
|
|
@@ -39,7 +39,7 @@ export const SideWrapper = (props) => {
|
|
|
39
39
|
const onBack = (_a = state === null || state === void 0 ? void 0 : state.props) === null || _a === void 0 ? void 0 : _a.onBack;
|
|
40
40
|
onBack && onBack();
|
|
41
41
|
}, [state === null || state === void 0 ? void 0 : state.props]);
|
|
42
|
-
return (React.createElement(
|
|
42
|
+
return (React.createElement(Drawer, Object.assign({}, props, { isOpen: !!state.open, onClose: onClose, onBack: ((_a = state === null || state === void 0 ? void 0 : state.props) === null || _a === void 0 ? void 0 : _a.onBack) ? wrappedOnBack : undefined, setTransitionsEnabled: setTransitionsEnabled, hideNavigation: false }),
|
|
43
43
|
React.createElement(TransitionGroup, { enter: transitionsEnabled, exit: transitionsEnabled, component: null }, queue.map(({ Component, props, key }) => (React.createElement(TransitionSlide, { key: key, direction: direction }, Component && React.createElement(Component, Object.assign({}, props))))))));
|
|
44
44
|
};
|
|
45
45
|
export default SideWrapper;
|
|
@@ -11,13 +11,13 @@ const StyledCircle = styled.circle.attrs({
|
|
|
11
11
|
transform-origin: 50% 50%;
|
|
12
12
|
`;
|
|
13
13
|
const StyledCircleBackground = styled(StyledCircle).attrs((props) => ({
|
|
14
|
-
stroke: props.theme.colors.
|
|
14
|
+
stroke: props.theme.colors.primary.c20,
|
|
15
15
|
})) ``;
|
|
16
16
|
const StyledCircleFront = styled(StyledCircle).attrs((props) => ({
|
|
17
|
-
stroke: props.theme.colors.
|
|
17
|
+
stroke: props.theme.colors.primary.c60,
|
|
18
18
|
})) ``;
|
|
19
19
|
const StyledCenteredText = styled(Text).attrs({
|
|
20
|
-
color: "
|
|
20
|
+
color: "primary.c80",
|
|
21
21
|
}) `
|
|
22
22
|
position: absolute;
|
|
23
23
|
top: 50%;
|
|
@@ -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 {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import styled, {
|
|
2
|
+
import styled, { useTheme } from "styled-components";
|
|
3
3
|
import Text from "../../asorted/Text";
|
|
4
|
+
import Flex from "../../layout/Flex";
|
|
4
5
|
import ShieldSecurityMedium from "@ledgerhq/icons-ui/react/ShieldSecurityMedium";
|
|
5
6
|
import CircledCrossMedium from "@ledgerhq/icons-ui/react/CircledCrossMedium";
|
|
6
7
|
import CircledAlertMedium from "@ledgerhq/icons-ui/react/CircledAlertMedium";
|
|
@@ -14,35 +15,42 @@ const icons = {
|
|
|
14
15
|
warning: React.createElement(CircledAlertMedium, { size: 20 }),
|
|
15
16
|
error: React.createElement(CircledCrossMedium, { size: 20 }),
|
|
16
17
|
};
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
switch (p.type) {
|
|
18
|
+
const getColors = ({ theme, type }) => {
|
|
19
|
+
switch (type) {
|
|
20
20
|
case "warning":
|
|
21
|
-
return
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
return {
|
|
22
|
+
background: theme.colors.warning.c30,
|
|
23
|
+
color: theme.colors.warning.c100,
|
|
24
|
+
};
|
|
25
25
|
case "error":
|
|
26
|
-
return
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
return {
|
|
27
|
+
background: theme.colors.error.c30,
|
|
28
|
+
color: theme.colors.error.c100,
|
|
29
|
+
};
|
|
30
30
|
case "info":
|
|
31
31
|
default:
|
|
32
|
-
return
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
return {
|
|
33
|
+
background: theme.colors.primary.c20,
|
|
34
|
+
color: theme.colors.primary.c90,
|
|
35
|
+
};
|
|
36
36
|
}
|
|
37
|
-
}
|
|
38
|
-
|
|
37
|
+
};
|
|
38
|
+
const StyledAlertContainer = styled(Flex).attrs(() => ({
|
|
39
|
+
padding: 6,
|
|
40
|
+
})) `
|
|
39
41
|
border-radius: ${(p) => `${p.theme.radii[1]}px`};
|
|
40
|
-
padding: 16px;
|
|
41
|
-
display: flex;
|
|
42
42
|
align-items: center;
|
|
43
43
|
`;
|
|
44
|
-
export default function Alert({ type = "info", title, showIcon = true }) {
|
|
45
|
-
|
|
44
|
+
export default function Alert({ type = "info", title, showIcon = true, renderContent, }) {
|
|
45
|
+
const theme = useTheme();
|
|
46
|
+
const { color, background } = getColors({ theme, type });
|
|
47
|
+
const textProps = {
|
|
48
|
+
variant: "paragraph",
|
|
49
|
+
fontWeight: "medium",
|
|
50
|
+
};
|
|
51
|
+
return (React.createElement(StyledAlertContainer, { color: color, backgroundColor: background },
|
|
46
52
|
showIcon && !!icons[type] && React.createElement(StyledIconContainer, null, icons[type]),
|
|
47
|
-
React.createElement(
|
|
53
|
+
React.createElement(Flex, { flexDirection: "column", alignItems: "flex-start", rowGap: "6px" },
|
|
54
|
+
title && (React.createElement(Text, Object.assign({}, textProps, { color: "inherit" }), title)),
|
|
55
|
+
renderContent && renderContent({ color, textProps }))));
|
|
48
56
|
}
|
|
@@ -19,7 +19,7 @@ const Container = styled(FlexBox) `
|
|
|
19
19
|
flex-wrap: wrap;
|
|
20
20
|
align-items: stretch;
|
|
21
21
|
min-height: ${(p) => p.theme.space[12]}px;
|
|
22
|
-
color: ${(p) => p.theme.colors.
|
|
22
|
+
color: ${(p) => p.theme.colors.neutral.c100};
|
|
23
23
|
`;
|
|
24
24
|
const TextContainer = styled(FlexBox).attrs(() => ({
|
|
25
25
|
flex: "1",
|
|
@@ -20,14 +20,14 @@ const ActiveCircle = styled.div `
|
|
|
20
20
|
width: 10px;
|
|
21
21
|
border-radius: 9999px;
|
|
22
22
|
box-sizing: content-box;
|
|
23
|
-
background-color: ${(p) => p.theme.colors.
|
|
23
|
+
background-color: ${(p) => p.theme.colors.error.c100};
|
|
24
24
|
|
|
25
25
|
border: 2px solid
|
|
26
26
|
var(
|
|
27
27
|
--notification-badge-border,
|
|
28
28
|
${(p) => {
|
|
29
29
|
/* The CSS variable is dynamically set by the Notification component */
|
|
30
|
-
return p.theme.colors.
|
|
30
|
+
return p.theme.colors.background.main;
|
|
31
31
|
}}
|
|
32
32
|
);
|
|
33
33
|
`;
|
|
@@ -23,11 +23,9 @@ const Container = styled(FlexBox).attrs({
|
|
|
23
23
|
}) `
|
|
24
24
|
--notification-badge-border: ${(p) => {
|
|
25
25
|
/* Set a CSS variable that will be consumed by the Badge component */
|
|
26
|
-
return p.hasBackground
|
|
27
|
-
? p.theme.colors.palette.neutral.c30
|
|
28
|
-
: p.theme.colors.palette.background.main;
|
|
26
|
+
return p.hasBackground ? p.theme.colors.neutral.c30 : p.theme.colors.background.main;
|
|
29
27
|
}};
|
|
30
|
-
background-color: ${(p) => p.hasBackground ? p.theme.colors.
|
|
28
|
+
background-color: ${(p) => (p.hasBackground ? p.theme.colors.neutral.c30 : "transparent")};
|
|
31
29
|
|
|
32
30
|
border-radius: 8px;
|
|
33
31
|
`;
|
|
@@ -36,8 +34,8 @@ function Notification(_a) {
|
|
|
36
34
|
return (React.createElement(Container, Object.assign({ hasBackground: hasBackground }, containerProps),
|
|
37
35
|
badge,
|
|
38
36
|
React.createElement(FlexBox, { flexDirection: "column", rowGap: 3, flex: "auto" },
|
|
39
|
-
React.createElement(Text, { variant: "large", fontWeight: "medium", color: "
|
|
40
|
-
description && (React.createElement(Text, { variant: "paragraph", fontWeight: "medium", color: "
|
|
37
|
+
React.createElement(Text, { variant: "large", fontWeight: "medium", color: "neutral.c100" }, title),
|
|
38
|
+
description && (React.createElement(Text, { variant: "paragraph", fontWeight: "medium", color: "neutral.c80", whiteSpace: "pre-wrap" }, description)),
|
|
41
39
|
link && (React.createElement(FlexBox, { justifyContent: "flex-start" },
|
|
42
40
|
React.createElement(Link, { onClick: (event) => onLinkClick && onLinkClick(event), Icon: ExternalLinkMedium }, link))))));
|
|
43
41
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { FlexBoxProps } from "../../layout/Flex";
|
|
3
|
+
interface ContainerProps extends FlexBoxProps {
|
|
4
|
+
hasBorder?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface Props extends ContainerProps {
|
|
7
|
+
text: string;
|
|
8
|
+
badge: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
declare function StatusNotification({ text, badge, hasBorder, ...containerProps }: Props): JSX.Element;
|
|
11
|
+
export default StatusNotification;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import React from "react";
|
|
13
|
+
import styled from "styled-components";
|
|
14
|
+
import FlexBox from "../../layout/Flex";
|
|
15
|
+
import Log from "../Log/";
|
|
16
|
+
const Container = styled(FlexBox).attrs({
|
|
17
|
+
p: 8,
|
|
18
|
+
rowGap: 9,
|
|
19
|
+
alignItems: "center",
|
|
20
|
+
flexDirection: "column",
|
|
21
|
+
}) `
|
|
22
|
+
border-width: 1px;
|
|
23
|
+
border-style: ${(p) => (p.hasBorder ? "solid" : "none")};
|
|
24
|
+
border-radius: 8px;
|
|
25
|
+
border-color: ${(p) => p.theme.colors.neutral.c40};
|
|
26
|
+
`;
|
|
27
|
+
function StatusNotification(_a) {
|
|
28
|
+
var { text, badge, hasBorder = false } = _a, containerProps = __rest(_a, ["text", "badge", "hasBorder"]);
|
|
29
|
+
return (React.createElement(Container, Object.assign({ hasBorder: hasBorder }, containerProps),
|
|
30
|
+
badge,
|
|
31
|
+
React.createElement(Log, null, text)));
|
|
32
|
+
}
|
|
33
|
+
export default StatusNotification;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import styled, { css } from "styled-components";
|
|
3
|
+
import Text from "../../asorted/Text";
|
|
4
|
+
import { CheckAloneMedium, CloseMedium, CircledAlertMedium } from "@ledgerhq/icons-ui/react";
|
|
5
|
+
import { Flex } from "../../layout";
|
|
6
|
+
const icons = {
|
|
7
|
+
success: React.createElement(CheckAloneMedium, { size: 16 }),
|
|
8
|
+
warning: React.createElement(CircledAlertMedium, { size: 16 }),
|
|
9
|
+
error: React.createElement(CloseMedium, { size: 16 }),
|
|
10
|
+
};
|
|
11
|
+
const StyledIconContainer = styled.div `
|
|
12
|
+
${(p) => {
|
|
13
|
+
switch (p.type) {
|
|
14
|
+
case "warning":
|
|
15
|
+
return css `
|
|
16
|
+
background: ${p.theme.colors.warning.c10};
|
|
17
|
+
color: ${p.theme.colors.warning.c100};
|
|
18
|
+
`;
|
|
19
|
+
case "error":
|
|
20
|
+
return css `
|
|
21
|
+
background: ${p.theme.colors.error.c10};
|
|
22
|
+
color: ${p.theme.colors.error.c100};
|
|
23
|
+
`;
|
|
24
|
+
case "success":
|
|
25
|
+
default:
|
|
26
|
+
return css `
|
|
27
|
+
background: ${p.theme.colors.success.c30};
|
|
28
|
+
color: ${p.theme.colors.success.c100};
|
|
29
|
+
`;
|
|
30
|
+
}
|
|
31
|
+
}}
|
|
32
|
+
|
|
33
|
+
border-radius: ${(p) => `${p.theme.radii[1]}px`};
|
|
34
|
+
margin-right ${(p) => `${p.theme.space[6]}px`};
|
|
35
|
+
padding: 6px;
|
|
36
|
+
display: flex;
|
|
37
|
+
align-items: center;
|
|
38
|
+
`;
|
|
39
|
+
export default function Tip({ type, label }) {
|
|
40
|
+
return (React.createElement(Flex, { alignItems: "center" },
|
|
41
|
+
type && React.createElement(StyledIconContainer, { type: type }, icons[type]),
|
|
42
|
+
React.createElement(Text, { variant: "paragraph", fontWeight: "medium", color: "neutral.c100", flexShrink: 1 }, label)));
|
|
43
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { TippyProps } from "@tippyjs/react";
|
|
3
2
|
declare type Placement = "top" | "top-start" | "top-end" | "right" | "right-start" | "right-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "auto" | "auto-start" | "auto-end";
|
|
4
|
-
export
|
|
3
|
+
export interface Props extends TippyProps {
|
|
4
|
+
/** The preferred placement of the tippy. */
|
|
5
5
|
placement?: Placement;
|
|
6
|
-
}
|
|
6
|
+
}
|
|
7
7
|
export default function Tooltip(props: Props): JSX.Element | null;
|
|
8
8
|
export {};
|
|
@@ -36,6 +36,6 @@ const Wrapper = forwardRef((props, ref) => {
|
|
|
36
36
|
});
|
|
37
37
|
export default function Tooltip(props) {
|
|
38
38
|
const { content, placement = "auto", children } = props, rest = __rest(props, ["content", "placement", "children"]);
|
|
39
|
-
return (React.createElement(Tippy, Object.assign({}, rest, { placement: placement, content: React.createElement(Text, { fontWeight: "medium", variant: "paragraph", color: "
|
|
39
|
+
return (React.createElement(Tippy, Object.assign({}, rest, { placement: placement, content: React.createElement(Text, { fontWeight: "medium", variant: "paragraph", color: "neutral.c00" }, content) }),
|
|
40
40
|
React.createElement(Wrapper, { children: children })));
|
|
41
41
|
}
|
|
@@ -10,8 +10,8 @@ export default css `
|
|
|
10
10
|
|
|
11
11
|
.tippy-box {
|
|
12
12
|
position: relative;
|
|
13
|
-
background-color: ${(p) => p.theme.colors.
|
|
14
|
-
color: ${(p) => p.theme.colors.
|
|
13
|
+
background-color: ${(p) => p.theme.colors.neutral.c100};
|
|
14
|
+
color: ${(p) => p.theme.colors.neutral.c00};
|
|
15
15
|
border-radius: 4px;
|
|
16
16
|
font-size: 14px;
|
|
17
17
|
line-height: 1.4;
|
|
@@ -72,7 +72,7 @@ export default css `
|
|
|
72
72
|
.tippy-arrow {
|
|
73
73
|
width: 16px;
|
|
74
74
|
height: 16px;
|
|
75
|
-
color: ${(p) => p.theme.colors.
|
|
75
|
+
color: ${(p) => p.theme.colors.neutral.c100};
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
.tippy-arrow:before {
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
export { default as Alert } from "./Alert";
|
|
2
2
|
export { default as Log } from "./Log";
|
|
3
3
|
export { default as Notification } from "./Notification";
|
|
4
|
+
export { default as Badge } from "./Notification/Badge";
|
|
4
5
|
export { default as Tooltip } from "./Tooltip";
|
|
6
|
+
export { default as Tip } from "./Tip";
|
|
7
|
+
export { default as StatusNotification } from "./StatusNotification";
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
export { default as Alert } from "./Alert";
|
|
2
2
|
export { default as Log } from "./Log";
|
|
3
3
|
export { default as Notification } from "./Notification";
|
|
4
|
+
export { default as Badge } from "./Notification/Badge";
|
|
4
5
|
export { default as Tooltip } from "./Tooltip";
|
|
6
|
+
export { default as Tip } from "./Tip";
|
|
7
|
+
export { default as StatusNotification } from "./StatusNotification";
|
|
@@ -6,6 +6,10 @@ export declare type Props = React.PropsWithChildren<{
|
|
|
6
6
|
}> & React.ComponentProps<typeof Wrapper>;
|
|
7
7
|
interface ExtraWrapperProps extends ColorProps, LayoutProps, TypographyProps {
|
|
8
8
|
}
|
|
9
|
-
declare const Wrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, import("
|
|
9
|
+
declare const Wrapper: 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>>> & ColorProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol> & 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>>> & {
|
|
10
|
+
columnGap?: string | number | undefined;
|
|
11
|
+
rowGap?: string | number | undefined;
|
|
12
|
+
color?: string | undefined;
|
|
13
|
+
} & ExtraWrapperProps, "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">;
|
|
10
14
|
export default function Aside({ header, footer, children, ...props }: Props): JSX.Element;
|
|
11
15
|
export {};
|
|
@@ -7,14 +7,14 @@ import * as ControlModule from "../../form/SelectInput/Control";
|
|
|
7
7
|
const Link = styled(Text).attrs({
|
|
8
8
|
ff: "Inter|SemiBold",
|
|
9
9
|
fontSize: 3,
|
|
10
|
-
color: "
|
|
10
|
+
color: "neutral.c80",
|
|
11
11
|
tabIndex: 0,
|
|
12
12
|
}) `
|
|
13
13
|
cursor: pointer;
|
|
14
14
|
:hover,
|
|
15
15
|
:active,
|
|
16
16
|
:focus {
|
|
17
|
-
color: ${(p) => p.theme.colors.
|
|
17
|
+
color: ${(p) => p.theme.colors.neutral.c100};
|
|
18
18
|
text-decoration: underline;
|
|
19
19
|
}
|
|
20
20
|
`;
|
|
@@ -26,11 +26,11 @@ export default memo(function Breadcrumb({ segments, onChange }) {
|
|
|
26
26
|
const [contents] = segments.reduce(([renderArray, valuesArray], segment, index) => {
|
|
27
27
|
const values = [...valuesArray];
|
|
28
28
|
renderArray.push(React.createElement(React.Fragment, null,
|
|
29
|
-
index > 0 ? (React.createElement(Text, { fontWeight: "semiBold", color: "
|
|
29
|
+
index > 0 ? (React.createElement(Text, { fontWeight: "semiBold", color: "neutral.c40", variant: "paragraph" }, "/")) : null,
|
|
30
30
|
isMultiSegment(segment) ? (React.createElement(Dropdown, { label: "", options: segment.options, value: segment.value, onChange: (elt) => elt && onChange([...values, elt.value]), styles: {
|
|
31
|
-
control: (provided, state) => (Object.assign(Object.assign({}, ControlModule.getStyles()(provided, state)), { cursor: "pointer" })),
|
|
32
|
-
singleValue: (provided) => (Object.assign(Object.assign({}, provided), { margin: 0, top: undefined, position: undefined, overflow: undefined, maxWidth: undefined, transform: undefined, color: theme.colors.
|
|
33
|
-
color: theme.colors.
|
|
31
|
+
control: (provided, state) => (Object.assign(Object.assign({}, ControlModule.getStyles(theme)(provided, state)), { cursor: "pointer" })),
|
|
32
|
+
singleValue: (provided) => (Object.assign(Object.assign({}, provided), { margin: 0, top: undefined, position: undefined, overflow: undefined, maxWidth: undefined, transform: undefined, color: theme.colors.neutral.c80, ":hover": {
|
|
33
|
+
color: theme.colors.neutral.c100,
|
|
34
34
|
textDecoration: "underline",
|
|
35
35
|
} })),
|
|
36
36
|
} })) : (React.createElement(Link, { onKeyDown: (event) => ["Enter", " "].includes(event.key) && onChange([...values, segment.value]), onClick: () => onChange([...values, segment.value]) }, segment.label))));
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import FlexBox from "../../layout/Flex";
|
|
3
3
|
export declare type Props = {
|
|
4
|
-
left
|
|
5
|
-
right
|
|
6
|
-
children
|
|
4
|
+
left?: React.ReactNode;
|
|
5
|
+
right?: React.ReactNode;
|
|
6
|
+
children?: React.ReactNode;
|
|
7
7
|
} & React.ComponentProps<typeof FlexBox>;
|
|
8
8
|
export default function ({ left, right, children, ...rest }: Props): JSX.Element;
|