@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
|
@@ -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;
|
|
@@ -13,19 +13,19 @@ const StyledIconContainer = styled.div `
|
|
|
13
13
|
switch (p.type) {
|
|
14
14
|
case "warning":
|
|
15
15
|
return css `
|
|
16
|
-
background: ${p.theme.colors.
|
|
17
|
-
color: ${p.theme.colors.
|
|
16
|
+
background: ${p.theme.colors.warning.c10};
|
|
17
|
+
color: ${p.theme.colors.warning.c100};
|
|
18
18
|
`;
|
|
19
19
|
case "error":
|
|
20
20
|
return css `
|
|
21
|
-
background: ${p.theme.colors.
|
|
22
|
-
color: ${p.theme.colors.
|
|
21
|
+
background: ${p.theme.colors.error.c10};
|
|
22
|
+
color: ${p.theme.colors.error.c100};
|
|
23
23
|
`;
|
|
24
24
|
case "success":
|
|
25
25
|
default:
|
|
26
26
|
return css `
|
|
27
|
-
background: ${p.theme.colors.
|
|
28
|
-
color: ${p.theme.colors.
|
|
27
|
+
background: ${p.theme.colors.success.c30};
|
|
28
|
+
color: ${p.theme.colors.success.c100};
|
|
29
29
|
`;
|
|
30
30
|
}
|
|
31
31
|
}}
|
|
@@ -39,5 +39,5 @@ const StyledIconContainer = styled.div `
|
|
|
39
39
|
export default function Tip({ type, label }) {
|
|
40
40
|
return (React.createElement(Flex, { alignItems: "center" },
|
|
41
41
|
type && React.createElement(StyledIconContainer, { type: type }, icons[type]),
|
|
42
|
-
React.createElement(Text, { variant: "paragraph", fontWeight: "medium", color: "
|
|
42
|
+
React.createElement(Text, { variant: "paragraph", fontWeight: "medium", color: "neutral.c100", flexShrink: 1 }, label)));
|
|
43
43
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
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
3
|
export interface Props extends TippyProps {
|
|
@@ -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,5 +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";
|
|
5
6
|
export { default as Tip } from "./Tip";
|
|
7
|
+
export { default as StatusNotification } from "./StatusNotification";
|
|
@@ -1,5 +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";
|
|
5
6
|
export { default as Tip } from "./Tip";
|
|
7
|
+
export { default as StatusNotification } from "./StatusNotification";
|
|
@@ -6,13 +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("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").OverflowProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & {
|
|
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
10
|
columnGap?: string | number | undefined;
|
|
11
11
|
rowGap?: string | number | undefined;
|
|
12
12
|
color?: string | undefined;
|
|
13
|
-
|
|
14
|
-
position?: string | undefined;
|
|
15
|
-
maxHeight?: number | undefined;
|
|
16
|
-
} & ExtraWrapperProps, "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">;
|
|
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">;
|
|
17
14
|
export default function Aside({ header, footer, children, ...props }: Props): JSX.Element;
|
|
18
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))));
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { FlexBoxProps as FlexProps } from "../../layout/Flex";
|
|
3
|
+
export declare type StepProps = {
|
|
4
|
+
/**
|
|
5
|
+
* The label of the step.
|
|
6
|
+
*/
|
|
7
|
+
label: string;
|
|
8
|
+
/**
|
|
9
|
+
* A specific index, can be used to explicitely order steps.
|
|
10
|
+
*/
|
|
11
|
+
index?: number;
|
|
12
|
+
/**
|
|
13
|
+
* Hides the step from the progress stepper.
|
|
14
|
+
*/
|
|
15
|
+
hidden?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* The step contents.
|
|
18
|
+
*/
|
|
19
|
+
children: React.ReactNode;
|
|
20
|
+
};
|
|
21
|
+
interface InnerProps {
|
|
22
|
+
/**
|
|
23
|
+
* The active index.
|
|
24
|
+
*/
|
|
25
|
+
activeIndex: number;
|
|
26
|
+
/**
|
|
27
|
+
* The total number of steps.
|
|
28
|
+
*/
|
|
29
|
+
stepsLength: number;
|
|
30
|
+
}
|
|
31
|
+
export interface Props<ExtraProps> {
|
|
32
|
+
/**
|
|
33
|
+
* The index of the active step.
|
|
34
|
+
*/
|
|
35
|
+
activeIndex: number;
|
|
36
|
+
/**
|
|
37
|
+
* An optional header displayed above the stepper.
|
|
38
|
+
*/
|
|
39
|
+
header?: (props: InnerProps & ExtraProps) => React.ReactNode;
|
|
40
|
+
/**
|
|
41
|
+
* An optional footer displayed below the body.
|
|
42
|
+
*/
|
|
43
|
+
footer?: (props: InnerProps & ExtraProps) => React.ReactNode;
|
|
44
|
+
/**
|
|
45
|
+
* Extra props that are passed to the header and footer render functions.
|
|
46
|
+
*/
|
|
47
|
+
extraProps?: ExtraProps;
|
|
48
|
+
/**
|
|
49
|
+
* Extra props that are passed to the container `Flex` element.
|
|
50
|
+
*/
|
|
51
|
+
extraContainerProps?: FlexProps;
|
|
52
|
+
/**
|
|
53
|
+
* Extra props that are passed to the stepper component.
|
|
54
|
+
*/
|
|
55
|
+
extraStepperProps?: FlexProps;
|
|
56
|
+
/**
|
|
57
|
+
* Extra props that are passed to the stepper `Flex` wrapper.
|
|
58
|
+
*/
|
|
59
|
+
extraStepperContainerProps?: FlexProps;
|
|
60
|
+
/**
|
|
61
|
+
* Custom rendering function to wrap children.
|
|
62
|
+
*/
|
|
63
|
+
renderChildren?: (args: {
|
|
64
|
+
children: React.ReactNode;
|
|
65
|
+
}) => React.ReactNode;
|
|
66
|
+
/**
|
|
67
|
+
/**
|
|
68
|
+
* A list of children representing each step of the flow.
|
|
69
|
+
*/
|
|
70
|
+
children: React.ReactElement<StepProps> | React.ReactElement<StepProps>[];
|
|
71
|
+
}
|
|
72
|
+
declare function FlowStepper<ExtraProps>({ activeIndex, header, footer, extraProps, extraContainerProps, extraStepperProps, extraStepperContainerProps, renderChildren, children, }: Props<ExtraProps>): JSX.Element;
|
|
73
|
+
declare namespace FlowStepper {
|
|
74
|
+
var Step: ({ children }: StepProps) => JSX.Element;
|
|
75
|
+
}
|
|
76
|
+
export default FlowStepper;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { isElement } from "react-is";
|
|
3
|
+
import Flex from "../../layout/Flex";
|
|
4
|
+
import { Stepper } from "..";
|
|
5
|
+
function FlowStepper({ activeIndex, header, footer, extraProps, extraContainerProps, extraStepperProps, extraStepperContainerProps, renderChildren, children, }) {
|
|
6
|
+
const { steps, innerContents } = React.Children.toArray(children).reduce((acc, child, idx) => {
|
|
7
|
+
var _a;
|
|
8
|
+
const index = (_a = (isElement(child) && child.props.index)) !== null && _a !== void 0 ? _a : idx;
|
|
9
|
+
const label = isElement(child) && child.props.label;
|
|
10
|
+
const hidden = isElement(child) && child.props.hidden;
|
|
11
|
+
if (label && !hidden) {
|
|
12
|
+
acc.steps[index] = label;
|
|
13
|
+
}
|
|
14
|
+
if (index === activeIndex) {
|
|
15
|
+
acc.innerContents = child;
|
|
16
|
+
}
|
|
17
|
+
return acc;
|
|
18
|
+
}, {
|
|
19
|
+
steps: [],
|
|
20
|
+
innerContents: null,
|
|
21
|
+
});
|
|
22
|
+
return (React.createElement(Flex, Object.assign({ flex: 1, flexDirection: "column" }, extraContainerProps),
|
|
23
|
+
header &&
|
|
24
|
+
header(Object.assign(Object.assign({}, extraProps), { activeIndex, stepsLength: steps.length })),
|
|
25
|
+
React.createElement(Flex, Object.assign({ my: 8, justifyContent: "center" }, extraStepperContainerProps),
|
|
26
|
+
React.createElement(Stepper, Object.assign({ activeIndex: activeIndex, steps: steps, flex: 1 }, extraStepperProps))),
|
|
27
|
+
React.createElement(Flex, { flex: 1, flexDirection: "column", position: "relative" }, renderChildren ? renderChildren({ children: innerContents }) : innerContents),
|
|
28
|
+
footer &&
|
|
29
|
+
footer(Object.assign(Object.assign({}, extraProps), { activeIndex, stepsLength: steps.length }))));
|
|
30
|
+
}
|
|
31
|
+
function Step({ children }) {
|
|
32
|
+
return React.createElement(React.Fragment, null, children);
|
|
33
|
+
}
|
|
34
|
+
FlowStepper.Step = Step;
|
|
35
|
+
export default FlowStepper;
|
|
@@ -15,12 +15,12 @@ const Bar = styled.div `
|
|
|
15
15
|
border-top-${(p) => (p.on ? "right" : "left")}-radius: 0;
|
|
16
16
|
border-bottom-${(p) => (p.on ? "right" : "left")}-radius: 0;
|
|
17
17
|
flex: ${(p) => p.fill};
|
|
18
|
-
background: ${(p) => p.on ? p.theme.colors.
|
|
18
|
+
background: ${(p) => (p.on ? p.theme.colors.neutral.c100 : p.theme.colors.neutral.c40)};
|
|
19
19
|
`;
|
|
20
20
|
const Handler = styled.div `
|
|
21
21
|
transition: all 600ms linear;
|
|
22
22
|
padding: 4px;
|
|
23
|
-
background: ${(p) => p.theme.colors.
|
|
23
|
+
background: ${(p) => p.theme.colors.neutral.c100};
|
|
24
24
|
border-radius: ${(p) => `${p.theme.radii[1]}px`};
|
|
25
25
|
|
|
26
26
|
display: flex;
|
|
@@ -35,8 +35,8 @@ const Handler = styled.div `
|
|
|
35
35
|
width: 16px;
|
|
36
36
|
justify-content: center;
|
|
37
37
|
align-items: center;
|
|
38
|
-
color: ${(p) => p.theme.colors.
|
|
39
|
-
background: ${(p) => p.theme.colors.
|
|
38
|
+
color: ${(p) => p.theme.colors.neutral.c100};
|
|
39
|
+
background: ${(p) => p.theme.colors.neutral.c00};
|
|
40
40
|
}
|
|
41
41
|
`;
|
|
42
42
|
const Onboarding = ({ steps, currentIndex }) => {
|
|
@@ -45,8 +45,8 @@ const Onboarding = ({ steps, currentIndex }) => {
|
|
|
45
45
|
return (React.createElement(Container, null,
|
|
46
46
|
React.createElement(Bar, { on: true, fill: fill }),
|
|
47
47
|
React.createElement(Handler, { key: currentStep.key },
|
|
48
|
-
React.createElement(Text, { className: "index", color: "
|
|
49
|
-
React.createElement(Text, { color: "
|
|
48
|
+
React.createElement(Text, { className: "index", color: "neutral.c00", fontWeight: "medium", variant: "micro" }, currentIndex + 1),
|
|
49
|
+
React.createElement(Text, { color: "neutral.c00", fontWeight: "medium", textTransform: "uppercase", variant: "micro" }, currentStep.label)),
|
|
50
50
|
React.createElement(Bar, { fill: 100 - Number(fill) })));
|
|
51
51
|
};
|
|
52
52
|
export default Onboarding;
|
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { BorderProps, ColorProps, SpaceProps } from "styled-system";
|
|
3
|
+
/**
|
|
4
|
+
* The state of a progress bar step.
|
|
5
|
+
*/
|
|
6
|
+
export declare type StepState = "pending" | "current" | "completed" | "errored" | "disabled";
|
|
7
|
+
declare type LabelType = string | React.ComponentType<{
|
|
8
|
+
state: StepState;
|
|
9
|
+
}>;
|
|
3
10
|
export interface Props {
|
|
4
11
|
/**
|
|
5
12
|
* An array of labels that will determine the progress bar steps.
|
|
13
|
+
* A label is either a string or a component that will be rendered with the
|
|
14
|
+
* prop `state: "pending" | "current" | "completed" | "errored"`.
|
|
15
|
+
* A styled StepText component is exported to allow easy styling of such a custom label.
|
|
6
16
|
*/
|
|
7
|
-
steps:
|
|
17
|
+
steps: LabelType[];
|
|
8
18
|
/**
|
|
9
19
|
* Index of the active step, starting at zero and defaulting to 0 if omitted.
|
|
10
20
|
*/
|
|
@@ -13,20 +23,22 @@ export interface Props {
|
|
|
13
23
|
* If true the current step is considered as a failure.
|
|
14
24
|
*/
|
|
15
25
|
errored?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Steps with indexes contained inside the array will be shown as disabled.
|
|
28
|
+
*/
|
|
29
|
+
disabledIndexes?: number[];
|
|
16
30
|
}
|
|
17
|
-
/**
|
|
18
|
-
* The state of a progress bar step.
|
|
19
|
-
*/
|
|
20
|
-
declare type StepState = "pending" | "current" | "completed" | "errored";
|
|
21
31
|
export declare type StepProps = {
|
|
22
32
|
/**
|
|
23
33
|
* State of the step.
|
|
24
34
|
*/
|
|
25
35
|
state: StepState;
|
|
26
36
|
/**
|
|
27
|
-
* The label to display.
|
|
37
|
+
* The label to display. To display more than text, this can be a component that will be rendered with the
|
|
38
|
+
* prop `state: "pending" | "current" | "completed" | "errored" | "disabled"`.
|
|
39
|
+
* A styled StepText component is exported to allow easy styling of such a custom Label
|
|
28
40
|
*/
|
|
29
|
-
label:
|
|
41
|
+
label: LabelType;
|
|
30
42
|
/**
|
|
31
43
|
* If true, hides the left "separator" bar that bridges the gap between the wider separator and the item.
|
|
32
44
|
*/
|
|
@@ -48,9 +60,13 @@ export declare const Item: {
|
|
|
48
60
|
backgroundColor: string;
|
|
49
61
|
} & ColorProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol>, "backgroundColor">;
|
|
50
62
|
Completed: () => JSX.Element;
|
|
63
|
+
Disabled: () => JSX.Element;
|
|
51
64
|
Errored: () => JSX.Element;
|
|
52
65
|
};
|
|
66
|
+
export declare const StepText: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, import("../../../asorted/Text").TextProps & {
|
|
67
|
+
state: StepState;
|
|
68
|
+
}, keyof import("../../../asorted/Text").TextProps>;
|
|
53
69
|
export declare const Step: React.NamedExoticComponent<StepProps>;
|
|
54
|
-
declare function
|
|
55
|
-
declare const _default: React.MemoExoticComponent<typeof
|
|
70
|
+
declare function Stepper({ steps, activeIndex, errored, disabledIndexes, ...extraProps }: Props): JSX.Element;
|
|
71
|
+
declare const _default: React.MemoExoticComponent<typeof Stepper>;
|
|
56
72
|
export default _default;
|
|
@@ -1,8 +1,18 @@
|
|
|
1
|
-
|
|
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, { memo, Fragment } from "react";
|
|
2
13
|
import styled from "styled-components";
|
|
3
14
|
import { border, color, space } from "styled-system";
|
|
4
|
-
import
|
|
5
|
-
import CloseMedium from "@ledgerhq/icons-ui/react/CloseMedium";
|
|
15
|
+
import { Icons } from "../../../../index";
|
|
6
16
|
import Text from "../../../asorted/Text";
|
|
7
17
|
import Flex from "../../../layout/Flex";
|
|
8
18
|
export const Item = {
|
|
@@ -24,7 +34,7 @@ export const Item = {
|
|
|
24
34
|
${space}
|
|
25
35
|
`,
|
|
26
36
|
Current: styled.div.attrs({
|
|
27
|
-
backgroundColor: "
|
|
37
|
+
backgroundColor: "primary.c90",
|
|
28
38
|
}) `
|
|
29
39
|
width: 6px;
|
|
30
40
|
height: 6px;
|
|
@@ -32,32 +42,36 @@ export const Item = {
|
|
|
32
42
|
${color}
|
|
33
43
|
`,
|
|
34
44
|
Pending: styled.div.attrs({
|
|
35
|
-
backgroundColor: "
|
|
45
|
+
backgroundColor: "neutral.c70",
|
|
36
46
|
}) `
|
|
37
47
|
width: ${(p) => p.theme.space[2]}px;
|
|
38
48
|
height: ${(p) => p.theme.space[2]}px;
|
|
39
49
|
border-radius: ${(p) => p.theme.space[2]}px;
|
|
40
50
|
${color}
|
|
41
51
|
`,
|
|
42
|
-
Completed: () => React.createElement(
|
|
43
|
-
|
|
52
|
+
Completed: () => React.createElement(Icons.CheckAloneMedium, { size: 16 }),
|
|
53
|
+
Disabled: () => React.createElement(Icons.CloseMedium, { size: 16 }),
|
|
54
|
+
Errored: () => React.createElement(Icons.CloseMedium, { size: 16 }),
|
|
44
55
|
};
|
|
45
|
-
const StepText = styled(Text) `
|
|
56
|
+
export const StepText = styled(Text) `
|
|
46
57
|
color: ${(p) => {
|
|
47
|
-
if (p.errored) {
|
|
48
|
-
return p.theme.colors.
|
|
58
|
+
if (p.state === "errored") {
|
|
59
|
+
return p.theme.colors.error.c100;
|
|
60
|
+
}
|
|
61
|
+
if (p.state === "disabled") {
|
|
62
|
+
return p.theme.colors.neutral.c50;
|
|
49
63
|
}
|
|
50
|
-
if (p.
|
|
51
|
-
return p.theme.colors.
|
|
64
|
+
if (p.state === "pending") {
|
|
65
|
+
return p.theme.colors.neutral.c70;
|
|
52
66
|
}
|
|
53
|
-
return p.theme.colors.
|
|
67
|
+
return p.theme.colors.neutral.c100;
|
|
54
68
|
}};
|
|
55
69
|
`;
|
|
56
70
|
const BaseSeparator = styled.div `
|
|
57
71
|
flex: 1;
|
|
58
72
|
position: relative;
|
|
59
73
|
overflow-x: hidden;
|
|
60
|
-
background-color: ${(p) => p.theme.colors.
|
|
74
|
+
background-color: ${(p) => p.theme.colors.neutral.c40};
|
|
61
75
|
height: 1px;
|
|
62
76
|
top: ${(p) => p.theme.space[5]}px;
|
|
63
77
|
`;
|
|
@@ -68,25 +82,29 @@ const Separator = {
|
|
|
68
82
|
const stepContentsByState = {
|
|
69
83
|
pending: (React.createElement(Item.Container, null,
|
|
70
84
|
React.createElement(Item.Pending, null))),
|
|
71
|
-
current: (React.createElement(Item.Container, { backgroundColor: "
|
|
85
|
+
current: (React.createElement(Item.Container, { backgroundColor: "primary.c20", borderRadius: "8px" },
|
|
72
86
|
React.createElement(Item.Current, null))),
|
|
73
|
-
completed: (React.createElement(Item.Container, { color: "
|
|
87
|
+
completed: (React.createElement(Item.Container, { color: "primary.c90", backgroundColor: "primary.c20", borderRadius: "8px" },
|
|
74
88
|
React.createElement(Item.Completed, null))),
|
|
75
|
-
errored: (React.createElement(Item.Container, { color: "
|
|
89
|
+
errored: (React.createElement(Item.Container, { color: "error.c100", backgroundColor: "warning.c30", borderRadius: "8px" },
|
|
76
90
|
React.createElement(Item.Errored, null))),
|
|
91
|
+
disabled: (React.createElement(Item.Container, { color: "neutral.c50" },
|
|
92
|
+
React.createElement(Item.Disabled, null))),
|
|
77
93
|
};
|
|
78
|
-
export const Step = memo(function Step({ state, label, hideLeftSeparator, nextState, }) {
|
|
94
|
+
export const Step = memo(function Step({ state, label: Label, hideLeftSeparator, nextState, }) {
|
|
79
95
|
const inactive = state === "pending";
|
|
80
|
-
const nextInactive =
|
|
81
|
-
const errored = state === "errored";
|
|
96
|
+
const nextInactive = state === "pending";
|
|
82
97
|
return (React.createElement(Flex, { flexDirection: "column", alignItems: "center" },
|
|
83
98
|
React.createElement(Item.Spacer, { mb: 5 },
|
|
84
99
|
(!hideLeftSeparator && React.createElement(Separator.Item, { inactive: inactive, position: "left" })) || (React.createElement(Flex, { flex: "1" })),
|
|
85
100
|
stepContentsByState[state],
|
|
86
101
|
(nextState && React.createElement(Separator.Item, { inactive: nextInactive, position: "right" })) || (React.createElement(Flex, { flex: "1" }))),
|
|
87
|
-
React.createElement(StepText, {
|
|
102
|
+
typeof Label === "string" ? (React.createElement(StepText, { state: state, variant: "small" }, Label)) : (React.createElement(Label, { state: state }))));
|
|
88
103
|
});
|
|
89
|
-
function getState(activeIndex, index, errored) {
|
|
104
|
+
function getState(activeIndex, index, errored, disabled) {
|
|
105
|
+
if (disabled) {
|
|
106
|
+
return "disabled";
|
|
107
|
+
}
|
|
90
108
|
if (activeIndex < index) {
|
|
91
109
|
return "pending";
|
|
92
110
|
}
|
|
@@ -95,13 +113,14 @@ function getState(activeIndex, index, errored) {
|
|
|
95
113
|
}
|
|
96
114
|
return "completed";
|
|
97
115
|
}
|
|
98
|
-
function
|
|
99
|
-
|
|
100
|
-
|
|
116
|
+
function Stepper(_a) {
|
|
117
|
+
var { steps, activeIndex = 0, errored, disabledIndexes } = _a, extraProps = __rest(_a, ["steps", "activeIndex", "errored", "disabledIndexes"]);
|
|
118
|
+
return (React.createElement(Flex, Object.assign({ flexWrap: "nowrap", justifyContent: "space-between" }, extraProps), steps.map((step, idx) => {
|
|
119
|
+
const state = getState(activeIndex, idx, errored, disabledIndexes === null || disabledIndexes === void 0 ? void 0 : disabledIndexes.includes(idx));
|
|
101
120
|
const nextState = idx < steps.length - 1 ? getState(activeIndex, idx + 1) : undefined;
|
|
102
|
-
return (React.createElement(
|
|
121
|
+
return (React.createElement(Fragment, { key: idx },
|
|
103
122
|
idx > 0 && React.createElement(Separator.Step, { inactive: state === "pending" }),
|
|
104
123
|
React.createElement(Step, { label: step, state: state, nextState: nextState, hideLeftSeparator: idx === 0 })));
|
|
105
124
|
})));
|
|
106
125
|
}
|
|
107
|
-
export default memo(
|
|
126
|
+
export default memo(Stepper);
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export declare const ItemLabel: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, import("../../../asorted/Text").TextProps, keyof import("../../../asorted/Text").TextProps>;
|
|
3
2
|
export declare type ItemType = {
|
|
4
3
|
label: string;
|
|
@@ -6,8 +6,8 @@ import TransitionInOut from "../../../transitions/TransitionInOut";
|
|
|
6
6
|
import Flex from "../../../layout/Flex";
|
|
7
7
|
const ItemWrapper = styled.li `
|
|
8
8
|
/** DEFAULT VARIANT **/
|
|
9
|
-
--ll-sidebar-item-label-color: ${(props) => props.theme.colors.
|
|
10
|
-
--ll-sidebar-item-icon-color: ${(props) => props.theme.colors.
|
|
9
|
+
--ll-sidebar-item-label-color: ${(props) => props.theme.colors.neutral.c80};
|
|
10
|
+
--ll-sidebar-item-icon-color: ${(props) => props.theme.colors.neutral.c80};
|
|
11
11
|
--ll-sidebar-item-background-color: unset;
|
|
12
12
|
|
|
13
13
|
display: flex;
|
|
@@ -26,8 +26,8 @@ const ItemWrapper = styled.li `
|
|
|
26
26
|
|
|
27
27
|
/** HOVER VARIANT **/
|
|
28
28
|
&:hover {
|
|
29
|
-
--ll-sidebar-item-label-color: ${(props) => props.theme.colors.
|
|
30
|
-
--ll-sidebar-item-icon-color: ${(props) => props.theme.colors.
|
|
29
|
+
--ll-sidebar-item-label-color: ${(props) => props.theme.colors.neutral.c100};
|
|
30
|
+
--ll-sidebar-item-icon-color: ${(props) => props.theme.colors.primary.c80};
|
|
31
31
|
--ll-sidebar-item-background-color: unset;
|
|
32
32
|
}
|
|
33
33
|
|
|
@@ -39,15 +39,15 @@ const ItemWrapper = styled.li `
|
|
|
39
39
|
|
|
40
40
|
/** ACTIVE VARIANT **/
|
|
41
41
|
&[data-active="true"] {
|
|
42
|
-
--ll-sidebar-item-label-color: ${(props) => props.theme.colors.
|
|
43
|
-
--ll-sidebar-item-icon-color: ${(props) => props.theme.colors.
|
|
44
|
-
--ll-sidebar-item-background-color: ${(props) => props.theme.colors.
|
|
42
|
+
--ll-sidebar-item-label-color: ${(props) => props.theme.colors.neutral.c100};
|
|
43
|
+
--ll-sidebar-item-icon-color: ${(props) => props.theme.colors.primary.c80};
|
|
44
|
+
--ll-sidebar-item-background-color: ${(props) => props.theme.colors.primary.c20};
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
/** DISABLE VARIANT **/
|
|
48
48
|
&[data-disable="true"] {
|
|
49
|
-
--ll-sidebar-item-label-color: ${(props) => props.theme.colors.
|
|
50
|
-
--ll-sidebar-item-icon-color: ${(props) => props.theme.colors.
|
|
49
|
+
--ll-sidebar-item-label-color: ${(props) => props.theme.colors.neutral.c80};
|
|
50
|
+
--ll-sidebar-item-icon-color: ${(props) => props.theme.colors.neutral.c80};
|
|
51
51
|
--ll-sidebar-item-background-color: unset;
|
|
52
52
|
opacity: 0.3;
|
|
53
53
|
cursor: unset;
|
|
@@ -63,7 +63,7 @@ const DefaultBadge = styled.div `
|
|
|
63
63
|
height: ${(p) => p.theme.space[4]}px;
|
|
64
64
|
width: ${(p) => p.theme.space[4]}px;
|
|
65
65
|
border-radius: ${(p) => p.theme.radii[2]}px;
|
|
66
|
-
background-color: ${(p) => p.theme.colors.
|
|
66
|
+
background-color: ${(p) => p.theme.colors.primary.c80};
|
|
67
67
|
`;
|
|
68
68
|
export const ItemLabel = styled(Text) `
|
|
69
69
|
display: inline-block;
|