@ledgerhq/react-ui 0.15.0 → 0.15.1-next.1
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/lib/cjs/components/layout/List/NumberedList/NumberedList.stories.js +129 -0
- package/lib/cjs/components/layout/List/NumberedList/NumberedList.stories.js.map +7 -0
- package/lib/cjs/components/layout/List/NumberedList/index.js +69 -0
- package/lib/cjs/components/layout/List/NumberedList/index.js.map +7 -0
- package/lib/cjs/components/layout/index.js +2 -0
- package/lib/cjs/components/layout/index.js.map +2 -2
- package/lib/components/layout/List/NumberedList/index.d.ts +11 -0
- package/lib/components/layout/List/NumberedList/index.js +27 -0
- package/lib/components/layout/List/NumberedList/index.js.map +1 -0
- package/lib/components/layout/index.d.ts +1 -0
- package/lib/components/layout/index.js +1 -0
- package/lib/components/layout/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var NumberedList_stories_exports = {};
|
|
30
|
+
__export(NumberedList_stories_exports, {
|
|
31
|
+
Default: () => Default,
|
|
32
|
+
default: () => NumberedList_stories_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(NumberedList_stories_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_Flex = __toESM(require("../../Flex"));
|
|
37
|
+
var import_asorted = require("../../../asorted");
|
|
38
|
+
var import__ = __toESM(require("."));
|
|
39
|
+
var import_styled_components = require("styled-components");
|
|
40
|
+
const description = `
|
|
41
|
+
### A NumberedList List
|
|
42
|
+
|
|
43
|
+
This components accepts an Array of object like this:
|
|
44
|
+
## Usage
|
|
45
|
+
|
|
46
|
+
\`\`\`js
|
|
47
|
+
|
|
48
|
+
const steps = [
|
|
49
|
+
{
|
|
50
|
+
/**
|
|
51
|
+
* title is the title of the step
|
|
52
|
+
*/
|
|
53
|
+
title: string;
|
|
54
|
+
},
|
|
55
|
+
];
|
|
56
|
+
|
|
57
|
+
<NumberedList steps={steps} />
|
|
58
|
+
\`\`\`
|
|
59
|
+
`;
|
|
60
|
+
var NumberedList_stories_default = {
|
|
61
|
+
title: "Layout/List/NumberedList",
|
|
62
|
+
argTypes: {
|
|
63
|
+
steps: {
|
|
64
|
+
control: "disabled"
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
parameters: {
|
|
68
|
+
docs: {
|
|
69
|
+
description: {
|
|
70
|
+
component: description
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
const defaultItems = [
|
|
76
|
+
{
|
|
77
|
+
element: "General information"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
element: /* @__PURE__ */ import_react.default.createElement(import_asorted.Text, { fontSize: 14, variant: "body", color: "error.c40", ml: "12px", fontWeight: "500" }, "General information")
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
element: "General information"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
element: /* @__PURE__ */ import_react.default.createElement(import_asorted.Text, { fontSize: 14, variant: "body", color: "primary.c80", ml: "12px", fontWeight: "500" }, "General information")
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
element: "General information"
|
|
90
|
+
}
|
|
91
|
+
];
|
|
92
|
+
const defaultItemsWithNothing = [
|
|
93
|
+
{
|
|
94
|
+
element: "General information"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
element: "General information"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
element: /* @__PURE__ */ import_react.default.createElement(import_asorted.Text, { fontSize: 14, variant: "body", color: "error.c50", ml: "12px", fontWeight: "500" }, "General information")
|
|
101
|
+
}
|
|
102
|
+
];
|
|
103
|
+
const Template = () => {
|
|
104
|
+
const { colors } = (0, import_styled_components.useTheme)();
|
|
105
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
106
|
+
import_Flex.default,
|
|
107
|
+
{
|
|
108
|
+
flexDirection: "column",
|
|
109
|
+
height: 500,
|
|
110
|
+
rowGap: "40px",
|
|
111
|
+
alignItems: "center",
|
|
112
|
+
justifyContent: "center",
|
|
113
|
+
bg: "neutral.c30"
|
|
114
|
+
},
|
|
115
|
+
/* @__PURE__ */ import_react.default.createElement(import__.default, { steps: defaultItems }),
|
|
116
|
+
/* @__PURE__ */ import_react.default.createElement(import_asorted.Divider, { my: 1, text: "Customized List" }),
|
|
117
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
118
|
+
import__.default,
|
|
119
|
+
{
|
|
120
|
+
steps: defaultItemsWithNothing,
|
|
121
|
+
bgIndexColor: colors.success.c60,
|
|
122
|
+
indexColor: colors.constant.black,
|
|
123
|
+
textColor: "primary.c60"
|
|
124
|
+
}
|
|
125
|
+
)
|
|
126
|
+
);
|
|
127
|
+
};
|
|
128
|
+
const Default = Template.bind({});
|
|
129
|
+
//# sourceMappingURL=NumberedList.stories.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../src/components/layout/List/NumberedList/NumberedList.stories.tsx"],
|
|
4
|
+
"sourcesContent": ["import React from \"react\";\nimport Flex from \"../../Flex\";\nimport { Text, Divider } from \"../../../asorted\";\nimport type { Item } from \".\";\nimport NumberedList from \".\";\nimport { useTheme } from \"styled-components\";\nconst description = `\n### A NumberedList List\n\nThis components accepts an Array of object like this:\n## Usage\n\n\\`\\`\\`js\n\nconst steps = [\n {\n /**\n * title is the title of the step\n */\n title: string;\n },\n ];\n\n<NumberedList steps={steps} />\n\\`\\`\\`\n`;\n\nexport default {\n title: \"Layout/List/NumberedList\",\n argTypes: {\n steps: {\n control: \"disabled\",\n },\n },\n parameters: {\n docs: {\n description: {\n component: description,\n },\n },\n },\n};\n\nconst defaultItems: Item[] = [\n {\n element: \"General information\",\n },\n {\n element: (\n <Text fontSize={14} variant=\"body\" color={\"error.c40\"} ml=\"12px\" fontWeight=\"500\">\n {\"General information\"}\n </Text>\n ),\n },\n {\n element: \"General information\",\n },\n {\n element: (\n <Text fontSize={14} variant=\"body\" color={\"primary.c80\"} ml=\"12px\" fontWeight=\"500\">\n {\"General information\"}\n </Text>\n ),\n },\n {\n element: \"General information\",\n },\n];\n\nconst defaultItemsWithNothing: Item[] = [\n {\n element: \"General information\",\n },\n {\n element: \"General information\",\n },\n {\n element: (\n <Text fontSize={14} variant=\"body\" color={\"error.c50\"} ml=\"12px\" fontWeight=\"500\">\n {\"General information\"}\n </Text>\n ),\n },\n];\n\nconst Template = () => {\n const { colors } = useTheme();\n return (\n <Flex\n flexDirection=\"column\"\n height={500}\n rowGap=\"40px\"\n alignItems=\"center\"\n justifyContent=\"center\"\n bg=\"neutral.c30\"\n >\n <NumberedList steps={defaultItems} />\n <Divider my={1} text=\"Customized List\" />\n <NumberedList\n steps={defaultItemsWithNothing}\n bgIndexColor={colors.success.c60}\n indexColor={colors.constant.black}\n textColor={\"primary.c60\"}\n />\n </Flex>\n );\n};\n\nexport const Default = Template.bind({});\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AACjB,qBAA8B;AAE9B,eAAyB;AACzB,+BAAyB;AACzB,MAAM,cAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAqBpB,IAAO,+BAAQ;AAAA,EACb,OAAO;AAAA,EACP,UAAU;AAAA,IACR,OAAO;AAAA,MACL,SAAS;AAAA,IACX;AAAA,EACF;AAAA,EACA,YAAY;AAAA,IACV,MAAM;AAAA,MACJ,aAAa;AAAA,QACX,WAAW;AAAA,MACb;AAAA,IACF;AAAA,EACF;AACF;AAEA,MAAM,eAAuB;AAAA,EAC3B;AAAA,IACE,SAAS;AAAA,EACX;AAAA,EACA;AAAA,IACE,SACE,6BAAAA,QAAA,cAAC,uBAAK,UAAU,IAAI,SAAQ,QAAO,OAAO,aAAa,IAAG,QAAO,YAAW,SACzE,qBACH;AAAA,EAEJ;AAAA,EACA;AAAA,IACE,SAAS;AAAA,EACX;AAAA,EACA;AAAA,IACE,SACE,6BAAAA,QAAA,cAAC,uBAAK,UAAU,IAAI,SAAQ,QAAO,OAAO,eAAe,IAAG,QAAO,YAAW,SAC3E,qBACH;AAAA,EAEJ;AAAA,EACA;AAAA,IACE,SAAS;AAAA,EACX;AACF;AAEA,MAAM,0BAAkC;AAAA,EACtC;AAAA,IACE,SAAS;AAAA,EACX;AAAA,EACA;AAAA,IACE,SAAS;AAAA,EACX;AAAA,EACA;AAAA,IACE,SACE,6BAAAA,QAAA,cAAC,uBAAK,UAAU,IAAI,SAAQ,QAAO,OAAO,aAAa,IAAG,QAAO,YAAW,SACzE,qBACH;AAAA,EAEJ;AACF;AAEA,MAAM,WAAW,MAAM;AACrB,QAAM,EAAE,OAAO,QAAI,mCAAS;AAC5B,SACE,6BAAAA,QAAA;AAAA,IAAC,YAAAC;AAAA,IAAA;AAAA,MACC,eAAc;AAAA,MACd,QAAQ;AAAA,MACR,QAAO;AAAA,MACP,YAAW;AAAA,MACX,gBAAe;AAAA,MACf,IAAG;AAAA;AAAA,IAEH,6BAAAD,QAAA,cAAC,SAAAE,SAAA,EAAa,OAAO,cAAc;AAAA,IACnC,6BAAAF,QAAA,cAAC,0BAAQ,IAAI,GAAG,MAAK,mBAAkB;AAAA,IACvC,6BAAAA,QAAA;AAAA,MAAC,SAAAE;AAAA,MAAA;AAAA,QACC,OAAO;AAAA,QACP,cAAc,OAAO,QAAQ;AAAA,QAC7B,YAAY,OAAO,SAAS;AAAA,QAC5B,WAAW;AAAA;AAAA,IACb;AAAA,EACF;AAEJ;AAEO,MAAM,UAAU,SAAS,KAAK,CAAC,CAAC;",
|
|
6
|
+
"names": ["React", "Flex", "NumberedList"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var NumberedList_exports = {};
|
|
30
|
+
__export(NumberedList_exports, {
|
|
31
|
+
default: () => NumberedList
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(NumberedList_exports);
|
|
34
|
+
var import_react = __toESM(require("react"));
|
|
35
|
+
var import_styled_components = __toESM(require("styled-components"));
|
|
36
|
+
var import_Flex = __toESM(require("../../Flex"));
|
|
37
|
+
var import_Text = __toESM(require("../../../asorted/Text"));
|
|
38
|
+
var import_helpers = require("../../../../styles/helpers");
|
|
39
|
+
function NumberedList({ steps, bgIndexColor, indexColor, textColor }) {
|
|
40
|
+
const { colors } = (0, import_styled_components.useTheme)();
|
|
41
|
+
const backgroundIndexColor = bgIndexColor ?? colors.primary.c80;
|
|
42
|
+
const indexTextColor = indexColor ?? colors.neutral.c00;
|
|
43
|
+
const mainTextColor = textColor ?? (0, import_helpers.rgba)(colors.neutral.c100, 0.7);
|
|
44
|
+
return /* @__PURE__ */ import_react.default.createElement(import_Flex.default, { flexDirection: "column", rowGap: "14px" }, steps == null ? void 0 : steps.map((step, index) => /* @__PURE__ */ import_react.default.createElement(import_Flex.default, { key: index, flexDirection: "row", alignItems: "center" }, NumberItem(index + 1, backgroundIndexColor, indexTextColor), typeof step.element === "string" ? /* @__PURE__ */ import_react.default.createElement(
|
|
45
|
+
import_Text.default,
|
|
46
|
+
{
|
|
47
|
+
key: index,
|
|
48
|
+
fontSize: 14,
|
|
49
|
+
variant: "body",
|
|
50
|
+
color: mainTextColor,
|
|
51
|
+
ml: "12px",
|
|
52
|
+
fontWeight: "500",
|
|
53
|
+
flex: 1
|
|
54
|
+
},
|
|
55
|
+
step.element
|
|
56
|
+
) : step.element)));
|
|
57
|
+
}
|
|
58
|
+
const NumberItem = (index, bgColor, color) => {
|
|
59
|
+
return /* @__PURE__ */ import_react.default.createElement(StyledNumberItem, { bgColor }, /* @__PURE__ */ import_react.default.createElement(import_Text.default, { color, fontWeight: "900", fontSize: "11px" }, index));
|
|
60
|
+
};
|
|
61
|
+
const StyledNumberItem = (0, import_styled_components.default)(import_Flex.default)`
|
|
62
|
+
border-radius: 50%;
|
|
63
|
+
background-color: ${(p) => p.bgColor};
|
|
64
|
+
align-items: center;
|
|
65
|
+
justify-content: center;
|
|
66
|
+
height: 16px;
|
|
67
|
+
width: 16px;
|
|
68
|
+
`;
|
|
69
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../src/components/layout/List/NumberedList/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import React from \"react\";\nimport styled, { useTheme } from \"styled-components\";\nimport Flex from \"../../Flex\";\nimport Text from \"../../../asorted/Text\";\nimport { rgba } from \"../../../../styles/helpers\";\n\nexport type Item = {\n element: React.ReactNode | string;\n};\n\nexport type Props = {\n steps: Item[];\n bgIndexColor?: string;\n indexColor?: string;\n textColor?: string;\n};\n\nexport default function NumberedList({ steps, bgIndexColor, indexColor, textColor }: Props) {\n const { colors } = useTheme();\n const backgroundIndexColor = bgIndexColor ?? colors.primary.c80;\n const indexTextColor = indexColor ?? colors.neutral.c00;\n const mainTextColor = textColor ?? rgba(colors.neutral.c100, 0.7);\n return (\n <Flex flexDirection=\"column\" rowGap={\"14px\"}>\n {steps?.map((step, index) => (\n <Flex key={index} flexDirection=\"row\" alignItems=\"center\">\n {NumberItem(index + 1, backgroundIndexColor, indexTextColor)}\n\n {typeof step.element === \"string\" ? (\n <Text\n key={index}\n fontSize={14}\n variant=\"body\"\n color={mainTextColor}\n ml=\"12px\"\n fontWeight=\"500\"\n flex={1}\n >\n {step.element}\n </Text>\n ) : (\n step.element\n )}\n </Flex>\n ))}\n </Flex>\n );\n}\n\nconst NumberItem = (index: number, bgColor: string, color: string) => {\n return (\n <StyledNumberItem bgColor={bgColor}>\n <Text color={color} fontWeight=\"900\" fontSize={\"11px\"}>\n {index}\n </Text>\n </StyledNumberItem>\n );\n};\n\nconst StyledNumberItem = styled(Flex)<{ bgColor: string }>`\n border-radius: 50%;\n background-color: ${p => p.bgColor};\n align-items: center;\n justify-content: center;\n height: 16px;\n width: 16px;\n`;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,+BAAiC;AACjC,kBAAiB;AACjB,kBAAiB;AACjB,qBAAqB;AAaN,SAAR,aAA8B,EAAE,OAAO,cAAc,YAAY,UAAU,GAAU;AAC1F,QAAM,EAAE,OAAO,QAAI,mCAAS;AAC5B,QAAM,uBAAuB,gBAAgB,OAAO,QAAQ;AAC5D,QAAM,iBAAiB,cAAc,OAAO,QAAQ;AACpD,QAAM,gBAAgB,iBAAa,qBAAK,OAAO,QAAQ,MAAM,GAAG;AAChE,SACE,6BAAAA,QAAA,cAAC,YAAAC,SAAA,EAAK,eAAc,UAAS,QAAQ,UAClC,+BAAO,IAAI,CAAC,MAAM,UACjB,6BAAAD,QAAA,cAAC,YAAAC,SAAA,EAAK,KAAK,OAAO,eAAc,OAAM,YAAW,YAC9C,WAAW,QAAQ,GAAG,sBAAsB,cAAc,GAE1D,OAAO,KAAK,YAAY,WACvB,6BAAAD,QAAA;AAAA,IAAC,YAAAE;AAAA,IAAA;AAAA,MACC,KAAK;AAAA,MACL,UAAU;AAAA,MACV,SAAQ;AAAA,MACR,OAAO;AAAA,MACP,IAAG;AAAA,MACH,YAAW;AAAA,MACX,MAAM;AAAA;AAAA,IAEL,KAAK;AAAA,EACR,IAEA,KAAK,OAET,EAEJ;AAEJ;AAEA,MAAM,aAAa,CAAC,OAAe,SAAiB,UAAkB;AACpE,SACE,6BAAAF,QAAA,cAAC,oBAAiB,WAChB,6BAAAA,QAAA,cAAC,YAAAE,SAAA,EAAK,OAAc,YAAW,OAAM,UAAU,UAC5C,KACH,CACF;AAEJ;AAEA,MAAM,uBAAmB,yBAAAC,SAAO,YAAAF,OAAI;AAAA;AAAA,sBAEd,OAAK,EAAE,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;",
|
|
6
|
+
"names": ["React", "Flex", "Text", "styled"]
|
|
7
|
+
}
|
|
@@ -33,6 +33,7 @@ __export(layout_exports, {
|
|
|
33
33
|
Drawer: () => import_Drawer.default,
|
|
34
34
|
Flex: () => import_Flex.default,
|
|
35
35
|
Grid: () => import_Grid.default,
|
|
36
|
+
NumberedList: () => import_NumberedList.default,
|
|
36
37
|
Popin: () => import_Popin.default,
|
|
37
38
|
Side: () => import_Side.default,
|
|
38
39
|
VerticalTimeline: () => import_VerticalTimeline.default
|
|
@@ -46,4 +47,5 @@ var import_Side = __toESM(require("./Side"));
|
|
|
46
47
|
var import_Drawer = __toESM(require("./Drawer"));
|
|
47
48
|
var import_Carousel = __toESM(require("./Carousel"));
|
|
48
49
|
var import_VerticalTimeline = __toESM(require("./List/VerticalTimeline"));
|
|
50
|
+
var import_NumberedList = __toESM(require("./List/NumberedList"));
|
|
49
51
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/components/layout/index.ts"],
|
|
4
|
-
"sourcesContent": ["export { default as Flex } from \"./Flex\";\nexport { default as Box } from \"./Box\";\nexport { default as Grid } from \"./Grid\";\nexport { default as Popin } from \"./Popin\";\nexport { default as Side } from \"./Side\";\nexport { default as Drawer } from \"./Drawer\";\nexport { default as Carousel } from \"./Carousel\";\nexport { default as VerticalTimeline } from \"./List/VerticalTimeline\";\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAgC;AAChC,iBAA+B;AAC/B,kBAAgC;AAChC,mBAAiC;AACjC,kBAAgC;AAChC,oBAAkC;AAClC,sBAAoC;AACpC,8BAA4C;",
|
|
4
|
+
"sourcesContent": ["export { default as Flex } from \"./Flex\";\nexport { default as Box } from \"./Box\";\nexport { default as Grid } from \"./Grid\";\nexport { default as Popin } from \"./Popin\";\nexport { default as Side } from \"./Side\";\nexport { default as Drawer } from \"./Drawer\";\nexport { default as Carousel } from \"./Carousel\";\nexport { default as VerticalTimeline } from \"./List/VerticalTimeline\";\nexport { default as NumberedList } from \"./List/NumberedList\";\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAgC;AAChC,iBAA+B;AAC/B,kBAAgC;AAChC,mBAAiC;AACjC,kBAAgC;AAChC,oBAAkC;AAClC,sBAAoC;AACpC,8BAA4C;AAC5C,0BAAwC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type Item = {
|
|
3
|
+
element: React.ReactNode | string;
|
|
4
|
+
};
|
|
5
|
+
export type Props = {
|
|
6
|
+
steps: Item[];
|
|
7
|
+
bgIndexColor?: string;
|
|
8
|
+
indexColor?: string;
|
|
9
|
+
textColor?: string;
|
|
10
|
+
};
|
|
11
|
+
export default function NumberedList({ steps, bgIndexColor, indexColor, textColor }: Props): React.JSX.Element;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import styled, { useTheme } from "styled-components";
|
|
3
|
+
import Flex from "../../Flex";
|
|
4
|
+
import Text from "../../../asorted/Text";
|
|
5
|
+
import { rgba } from "../../../../styles/helpers";
|
|
6
|
+
export default function NumberedList({ steps, bgIndexColor, indexColor, textColor }) {
|
|
7
|
+
const { colors } = useTheme();
|
|
8
|
+
const backgroundIndexColor = bgIndexColor !== null && bgIndexColor !== void 0 ? bgIndexColor : colors.primary.c80;
|
|
9
|
+
const indexTextColor = indexColor !== null && indexColor !== void 0 ? indexColor : colors.neutral.c00;
|
|
10
|
+
const mainTextColor = textColor !== null && textColor !== void 0 ? textColor : rgba(colors.neutral.c100, 0.7);
|
|
11
|
+
return (React.createElement(Flex, { flexDirection: "column", rowGap: "14px" }, steps === null || steps === void 0 ? void 0 : steps.map((step, index) => (React.createElement(Flex, { key: index, flexDirection: "row", alignItems: "center" },
|
|
12
|
+
NumberItem(index + 1, backgroundIndexColor, indexTextColor),
|
|
13
|
+
typeof step.element === "string" ? (React.createElement(Text, { key: index, fontSize: 14, variant: "body", color: mainTextColor, ml: "12px", fontWeight: "500", flex: 1 }, step.element)) : (step.element))))));
|
|
14
|
+
}
|
|
15
|
+
const NumberItem = (index, bgColor, color) => {
|
|
16
|
+
return (React.createElement(StyledNumberItem, { bgColor: bgColor },
|
|
17
|
+
React.createElement(Text, { color: color, fontWeight: "900", fontSize: "11px" }, index)));
|
|
18
|
+
};
|
|
19
|
+
const StyledNumberItem = styled(Flex) `
|
|
20
|
+
border-radius: 50%;
|
|
21
|
+
background-color: ${p => p.bgColor};
|
|
22
|
+
align-items: center;
|
|
23
|
+
justify-content: center;
|
|
24
|
+
height: 16px;
|
|
25
|
+
width: 16px;
|
|
26
|
+
`;
|
|
27
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/layout/List/NumberedList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,EAAE,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,IAAI,MAAM,YAAY,CAAC;AAC9B,OAAO,IAAI,MAAM,uBAAuB,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAalD,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,SAAS,EAAS;IACxF,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAC;IAC9B,MAAM,oBAAoB,GAAG,YAAY,aAAZ,YAAY,cAAZ,YAAY,GAAI,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC;IAChE,MAAM,cAAc,GAAG,UAAU,aAAV,UAAU,cAAV,UAAU,GAAI,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC;IACxD,MAAM,aAAa,GAAG,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAClE,OAAO,CACL,oBAAC,IAAI,IAAC,aAAa,EAAC,QAAQ,EAAC,MAAM,EAAE,MAAM,IACxC,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAC3B,oBAAC,IAAI,IAAC,GAAG,EAAE,KAAK,EAAE,aAAa,EAAC,KAAK,EAAC,UAAU,EAAC,QAAQ;QACtD,UAAU,CAAC,KAAK,GAAG,CAAC,EAAE,oBAAoB,EAAE,cAAc,CAAC;QAE3D,OAAO,IAAI,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,CAClC,oBAAC,IAAI,IACH,GAAG,EAAE,KAAK,EACV,QAAQ,EAAE,EAAE,EACZ,OAAO,EAAC,MAAM,EACd,KAAK,EAAE,aAAa,EACpB,EAAE,EAAC,MAAM,EACT,UAAU,EAAC,KAAK,EAChB,IAAI,EAAE,CAAC,IAEN,IAAI,CAAC,OAAO,CACR,CACR,CAAC,CAAC,CAAC,CACF,IAAI,CAAC,OAAO,CACb,CACI,CACR,CAAC,CACG,CACR,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,GAAG,CAAC,KAAa,EAAE,OAAe,EAAE,KAAa,EAAE,EAAE;IACnE,OAAO,CACL,oBAAC,gBAAgB,IAAC,OAAO,EAAE,OAAO;QAChC,oBAAC,IAAI,IAAC,KAAK,EAAE,KAAK,EAAE,UAAU,EAAC,KAAK,EAAC,QAAQ,EAAE,MAAM,IAClD,KAAK,CACD,CACU,CACpB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,gBAAgB,GAAG,MAAM,CAAC,IAAI,CAAC,CAAqB;;sBAEpC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO;;;;;CAKnC,CAAC"}
|
|
@@ -6,3 +6,4 @@ export { default as Side } from "./Side";
|
|
|
6
6
|
export { default as Drawer } from "./Drawer";
|
|
7
7
|
export { default as Carousel } from "./Carousel";
|
|
8
8
|
export { default as VerticalTimeline } from "./List/VerticalTimeline";
|
|
9
|
+
export { default as NumberedList } from "./List/NumberedList";
|
|
@@ -6,4 +6,5 @@ export { default as Side } from "./Side";
|
|
|
6
6
|
export { default as Drawer } from "./Drawer";
|
|
7
7
|
export { default as Carousel } from "./Carousel";
|
|
8
8
|
export { default as VerticalTimeline } from "./List/VerticalTimeline";
|
|
9
|
+
export { default as NumberedList } from "./List/NumberedList";
|
|
9
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/layout/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,yBAAyB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/layout/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,qBAAqB,CAAC"}
|