@coorpacademy/components 11.32.18 → 11.32.20-alpha.31
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/es/atom/circular-progress-bar/index.d.ts +15 -0
- package/es/atom/circular-progress-bar/index.d.ts.map +1 -0
- package/es/atom/circular-progress-bar/index.js +86 -0
- package/es/atom/circular-progress-bar/index.js.map +1 -0
- package/es/atom/circular-progress-bar/style.css +51 -0
- package/es/atom/circular-progress-bar/types.d.ts +18 -0
- package/es/atom/circular-progress-bar/types.d.ts.map +1 -0
- package/es/atom/circular-progress-bar/types.js +10 -0
- package/es/atom/circular-progress-bar/types.js.map +1 -0
- package/es/atom/radio-with-title/index.d.ts +6 -0
- package/es/atom/radio-with-title/index.d.ts.map +1 -1
- package/es/atom/radio-with-title/types.d.ts +6 -0
- package/es/atom/radio-with-title/types.d.ts.map +1 -1
- package/es/atom/tag/index.d.ts +6 -1
- package/es/atom/tag/index.d.ts.map +1 -1
- package/es/atom/tag/index.js +16 -11
- package/es/atom/tag/index.js.map +1 -1
- package/es/atom/tag/style.css +39 -19
- package/es/atom/title/index.d.ts +6 -0
- package/es/atom/title/index.d.ts.map +1 -1
- package/es/atom/title/index.js +16 -4
- package/es/atom/title/index.js.map +1 -1
- package/es/atom/title/style.css +13 -0
- package/es/molecule/cm-popin/types.d.ts +6 -0
- package/es/molecule/cm-popin/types.d.ts.map +1 -1
- package/es/molecule/dashboard/cards-list/index.d.ts.map +1 -1
- package/es/molecule/dashboard/cards-list/index.js +22 -25
- package/es/molecule/dashboard/cards-list/index.js.map +1 -1
- package/es/molecule/dashboard/cards-list/style.css +12 -29
- package/es/molecule/learning-priority-card/index.d.ts +41 -0
- package/es/molecule/learning-priority-card/index.d.ts.map +1 -0
- package/es/molecule/learning-priority-card/index.js +80 -0
- package/es/molecule/learning-priority-card/index.js.map +1 -0
- package/es/molecule/learning-priority-card/style.css +36 -0
- package/es/molecule/learning-priority-card/types.d.ts +20 -0
- package/es/molecule/learning-priority-card/types.d.ts.map +1 -0
- package/es/molecule/learning-priority-card/types.js +11 -0
- package/es/molecule/learning-priority-card/types.js.map +1 -0
- package/es/molecule/title-and-checkbox-wrapper/index.d.ts +6 -0
- package/es/molecule/title-radio-wrapper/index.d.ts +6 -0
- package/es/molecule/title-radio-wrapper/index.d.ts.map +1 -1
- package/es/molecule/title-radio-wrapper/types.d.ts +6 -0
- package/es/molecule/title-radio-wrapper/types.d.ts.map +1 -1
- package/es/organism/rewards-form/index.d.ts +6 -0
- package/es/organism/select-opponents/index.d.ts +6 -0
- package/es/organism/select-opponents/index.d.ts.map +1 -1
- package/es/organism/select-opponents/types.d.ts +6 -0
- package/es/organism/select-opponents/types.d.ts.map +1 -1
- package/es/organism/title-and-input/index.d.ts +12 -0
- package/es/organism/title-and-input/index.d.ts.map +1 -1
- package/es/organism/title-and-input/types.d.ts +12 -0
- package/es/organism/title-and-input/types.d.ts.map +1 -1
- package/es/organism/wizard-contents/index.d.ts +6 -0
- package/es/template/app-player/loading/index.d.ts +6 -0
- package/es/template/app-player/player/index.d.ts +12 -0
- package/es/template/app-player/player/slides/index.d.ts +6 -0
- package/es/template/app-player/player/slides/index.d.ts.map +1 -1
- package/es/template/app-player/popin-correction/index.d.ts +6 -0
- package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/es/template/app-player/popin-end/index.d.ts +6 -0
- package/es/template/app-review/index.d.ts +6 -0
- package/es/template/app-review/index.d.ts.map +1 -1
- package/es/template/app-review/player/prop-types.d.ts +6 -0
- package/es/template/app-review/player/prop-types.d.ts.map +1 -1
- package/es/template/app-review/prop-types.d.ts +6 -0
- package/es/template/app-review/prop-types.d.ts.map +1 -1
- package/es/template/back-office/brand-update/index.d.ts +6 -0
- package/es/template/common/dashboard/index.d.ts +12 -0
- package/es/template/common/search-page/index.d.ts +6 -0
- package/es/template/external-course/index.d.ts +6 -0
- package/es/template/my-learning/index.d.ts +68 -0
- package/es/template/my-learning/index.d.ts.map +1 -1
- package/es/template/my-learning/index.js +12 -2
- package/es/template/my-learning/index.js.map +1 -1
- package/es/template/my-learning/style.css +18 -3
- package/es/template/skill-detail/all-courses.css +6 -1
- package/es/template/skill-detail/continue-learning.d.ts.map +1 -1
- package/es/template/skill-detail/continue-learning.js +3 -1
- package/es/template/skill-detail/continue-learning.js.map +1 -1
- package/es/template/skill-detail/index.js +1 -1
- package/es/template/skill-detail/index.js.map +1 -1
- package/lib/atom/circular-progress-bar/index.d.ts +15 -0
- package/lib/atom/circular-progress-bar/index.d.ts.map +1 -0
- package/lib/atom/circular-progress-bar/index.js +101 -0
- package/lib/atom/circular-progress-bar/index.js.map +1 -0
- package/lib/atom/circular-progress-bar/style.css +51 -0
- package/lib/atom/circular-progress-bar/types.d.ts +18 -0
- package/lib/atom/circular-progress-bar/types.d.ts.map +1 -0
- package/lib/atom/circular-progress-bar/types.js +19 -0
- package/lib/atom/circular-progress-bar/types.js.map +1 -0
- package/lib/atom/radio-with-title/index.d.ts +6 -0
- package/lib/atom/radio-with-title/index.d.ts.map +1 -1
- package/lib/atom/radio-with-title/types.d.ts +6 -0
- package/lib/atom/radio-with-title/types.d.ts.map +1 -1
- package/lib/atom/tag/index.d.ts +6 -1
- package/lib/atom/tag/index.d.ts.map +1 -1
- package/lib/atom/tag/index.js +17 -11
- package/lib/atom/tag/index.js.map +1 -1
- package/lib/atom/tag/style.css +39 -19
- package/lib/atom/title/index.d.ts +6 -0
- package/lib/atom/title/index.d.ts.map +1 -1
- package/lib/atom/title/index.js +18 -4
- package/lib/atom/title/index.js.map +1 -1
- package/lib/atom/title/style.css +13 -0
- package/lib/molecule/cm-popin/types.d.ts +6 -0
- package/lib/molecule/cm-popin/types.d.ts.map +1 -1
- package/lib/molecule/dashboard/cards-list/index.d.ts.map +1 -1
- package/lib/molecule/dashboard/cards-list/index.js +23 -25
- package/lib/molecule/dashboard/cards-list/index.js.map +1 -1
- package/lib/molecule/dashboard/cards-list/style.css +12 -29
- package/lib/molecule/learning-priority-card/index.d.ts +41 -0
- package/lib/molecule/learning-priority-card/index.d.ts.map +1 -0
- package/lib/molecule/learning-priority-card/index.js +98 -0
- package/lib/molecule/learning-priority-card/index.js.map +1 -0
- package/lib/molecule/learning-priority-card/style.css +36 -0
- package/lib/molecule/learning-priority-card/types.d.ts +20 -0
- package/lib/molecule/learning-priority-card/types.d.ts.map +1 -0
- package/lib/molecule/learning-priority-card/types.js +20 -0
- package/lib/molecule/learning-priority-card/types.js.map +1 -0
- package/lib/molecule/title-and-checkbox-wrapper/index.d.ts +6 -0
- package/lib/molecule/title-radio-wrapper/index.d.ts +6 -0
- package/lib/molecule/title-radio-wrapper/index.d.ts.map +1 -1
- package/lib/molecule/title-radio-wrapper/types.d.ts +6 -0
- package/lib/molecule/title-radio-wrapper/types.d.ts.map +1 -1
- package/lib/organism/rewards-form/index.d.ts +6 -0
- package/lib/organism/select-opponents/index.d.ts +6 -0
- package/lib/organism/select-opponents/index.d.ts.map +1 -1
- package/lib/organism/select-opponents/types.d.ts +6 -0
- package/lib/organism/select-opponents/types.d.ts.map +1 -1
- package/lib/organism/title-and-input/index.d.ts +12 -0
- package/lib/organism/title-and-input/index.d.ts.map +1 -1
- package/lib/organism/title-and-input/types.d.ts +12 -0
- package/lib/organism/title-and-input/types.d.ts.map +1 -1
- package/lib/organism/wizard-contents/index.d.ts +6 -0
- package/lib/template/app-player/loading/index.d.ts +6 -0
- package/lib/template/app-player/player/index.d.ts +12 -0
- package/lib/template/app-player/player/slides/index.d.ts +6 -0
- package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-correction/index.d.ts +6 -0
- package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-end/index.d.ts +6 -0
- package/lib/template/app-review/index.d.ts +6 -0
- package/lib/template/app-review/index.d.ts.map +1 -1
- package/lib/template/app-review/player/prop-types.d.ts +6 -0
- package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
- package/lib/template/app-review/prop-types.d.ts +6 -0
- package/lib/template/app-review/prop-types.d.ts.map +1 -1
- package/lib/template/back-office/brand-update/index.d.ts +6 -0
- package/lib/template/common/dashboard/index.d.ts +12 -0
- package/lib/template/common/search-page/index.d.ts +6 -0
- package/lib/template/external-course/index.d.ts +6 -0
- package/lib/template/my-learning/index.d.ts +68 -0
- package/lib/template/my-learning/index.d.ts.map +1 -1
- package/lib/template/my-learning/index.js +12 -2
- package/lib/template/my-learning/index.js.map +1 -1
- package/lib/template/my-learning/style.css +18 -3
- package/lib/template/skill-detail/all-courses.css +6 -1
- package/lib/template/skill-detail/continue-learning.d.ts.map +1 -1
- package/lib/template/skill-detail/continue-learning.js +7 -3
- package/lib/template/skill-detail/continue-learning.js.map +1 -1
- package/lib/template/skill-detail/index.js +1 -1
- package/lib/template/skill-detail/index.js.map +1 -1
- package/locales/bs/global.json +1 -0
- package/locales/cs/global.json +1 -0
- package/locales/de/global.json +1 -0
- package/locales/en/global.json +1 -0
- package/locales/es/global.json +1 -0
- package/locales/et/global.json +1 -0
- package/locales/fi/global.json +1 -0
- package/locales/fr/global.json +1 -0
- package/locales/hr/global.json +1 -0
- package/locales/hu/global.json +1 -0
- package/locales/hy/global.json +1 -0
- package/locales/it/global.json +1 -0
- package/locales/ja/global.json +1 -0
- package/locales/ko/global.json +1 -0
- package/locales/nl/global.json +1 -0
- package/locales/pl/global.json +1 -0
- package/locales/pt/global.json +1 -0
- package/locales/ro/global.json +1 -0
- package/locales/ru/global.json +1 -0
- package/locales/sk/global.json +1 -0
- package/locales/sl/global.json +1 -0
- package/locales/sv/global.json +1 -0
- package/locales/tl/global.json +1 -0
- package/locales/tr/global.json +1 -0
- package/locales/uk/global.json +1 -0
- package/locales/vi/global.json +1 -0
- package/locales/zh/global.json +1 -0
- package/locales/zh_TW/global.json +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { LearningPriorityCardPropTypes } from './types';
|
|
3
|
+
declare const CircularProgressBar: {
|
|
4
|
+
({ label, progression, size, strokeWidth, "aria-label": ariaLabel, "data-name": dataName }: LearningPriorityCardPropTypes): JSX.Element;
|
|
5
|
+
propTypes: {
|
|
6
|
+
label: import("prop-types").Requireable<string>;
|
|
7
|
+
progression: import("prop-types").Validator<number>;
|
|
8
|
+
size: import("prop-types").Requireable<number>;
|
|
9
|
+
strokeWidth: import("prop-types").Requireable<number>;
|
|
10
|
+
'aria-label': import("prop-types").Requireable<string>;
|
|
11
|
+
'data-name': import("prop-types").Requireable<string>;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export default CircularProgressBar;
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/circular-progress-bar/index.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAC,6BAA6B,EAA+B,MAAM,SAAS,CAAC;AAmBpF,QAAA,MAAM,mBAAmB;gGAOtB,6BAA6B;;;;;;;;;CAgD/B,CAAC;AAIF,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import _isNull from "lodash/fp/isNull";
|
|
2
|
+
import React, { useMemo, useState, useEffect } from 'react';
|
|
3
|
+
import { CircularProgressBarPropTypes } from './types';
|
|
4
|
+
import style from './style.css';
|
|
5
|
+
|
|
6
|
+
const ProgressionGradient = () => /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
|
|
7
|
+
id: "gradient-stroke-progression",
|
|
8
|
+
x1: "81",
|
|
9
|
+
y1: "0",
|
|
10
|
+
x2: "81",
|
|
11
|
+
y2: "162",
|
|
12
|
+
gradientUnits: "userSpaceOnUse"
|
|
13
|
+
}, /*#__PURE__*/React.createElement("stop", {
|
|
14
|
+
stopColor: "#35CC7F"
|
|
15
|
+
}), /*#__PURE__*/React.createElement("stop", {
|
|
16
|
+
offset: "1",
|
|
17
|
+
stopColor: "#55F2A7"
|
|
18
|
+
})));
|
|
19
|
+
|
|
20
|
+
const CircularProgressBar = ({
|
|
21
|
+
label,
|
|
22
|
+
progression,
|
|
23
|
+
size,
|
|
24
|
+
strokeWidth,
|
|
25
|
+
'aria-label': ariaLabel,
|
|
26
|
+
'data-name': dataName
|
|
27
|
+
}) => {
|
|
28
|
+
const [offset, setOffset] = useState(null);
|
|
29
|
+
const {
|
|
30
|
+
center,
|
|
31
|
+
radius,
|
|
32
|
+
length
|
|
33
|
+
} = useMemo(() => {
|
|
34
|
+
const center_ = size / 2;
|
|
35
|
+
const radius_ = center_ - strokeWidth;
|
|
36
|
+
const length_ = Math.ceil(2 * Math.PI * radius_);
|
|
37
|
+
return {
|
|
38
|
+
center: center_,
|
|
39
|
+
radius: radius_,
|
|
40
|
+
length: length_
|
|
41
|
+
};
|
|
42
|
+
}, [size, strokeWidth]);
|
|
43
|
+
useEffect(() => setOffset(Math.ceil(length * ((100 - progression) / 100))), [length, progression]);
|
|
44
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
45
|
+
className: style.container,
|
|
46
|
+
"aria-label": ariaLabel,
|
|
47
|
+
"data-name": dataName
|
|
48
|
+
}, /*#__PURE__*/React.createElement("svg", {
|
|
49
|
+
className: style.svg,
|
|
50
|
+
width: size,
|
|
51
|
+
height: size
|
|
52
|
+
}, /*#__PURE__*/React.createElement(ProgressionGradient, null), /*#__PURE__*/React.createElement("circle", {
|
|
53
|
+
className: style.mainCircle,
|
|
54
|
+
cx: center,
|
|
55
|
+
cy: center,
|
|
56
|
+
r: radius,
|
|
57
|
+
strokeWidth: 3,
|
|
58
|
+
fill: "transparent"
|
|
59
|
+
}), /*#__PURE__*/React.createElement("circle", {
|
|
60
|
+
cx: center,
|
|
61
|
+
cy: center,
|
|
62
|
+
r: radius - 10 / radius * 100,
|
|
63
|
+
fill: "#fafafa"
|
|
64
|
+
}), /*#__PURE__*/React.createElement("circle", {
|
|
65
|
+
className: style.progressionCircle,
|
|
66
|
+
cx: center,
|
|
67
|
+
cy: center,
|
|
68
|
+
r: radius,
|
|
69
|
+
stroke: `url(#gradient-stroke-progression)`,
|
|
70
|
+
strokeWidth: strokeWidth,
|
|
71
|
+
strokeDasharray: length,
|
|
72
|
+
strokeDashoffset: _isNull(offset) ? length : offset,
|
|
73
|
+
fill: "transparent",
|
|
74
|
+
strokeLinecap: "round"
|
|
75
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
76
|
+
className: style.infos
|
|
77
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
78
|
+
className: style.progression
|
|
79
|
+
}, progression, "%"), /*#__PURE__*/React.createElement("span", {
|
|
80
|
+
className: style.label
|
|
81
|
+
}, label)));
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
CircularProgressBar.propTypes = process.env.NODE_ENV !== "production" ? CircularProgressBarPropTypes : {};
|
|
85
|
+
export default CircularProgressBar;
|
|
86
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useMemo","useState","useEffect","CircularProgressBarPropTypes","style","ProgressionGradient","CircularProgressBar","label","progression","size","strokeWidth","ariaLabel","dataName","offset","setOffset","center","radius","length","center_","radius_","length_","Math","ceil","PI","container","svg","mainCircle","progressionCircle","infos","propTypes"],"sources":["../../../src/atom/circular-progress-bar/index.tsx"],"sourcesContent":["import React, {useMemo, useState, useEffect} from 'react';\nimport {isNull} from 'lodash/fp';\nimport {LearningPriorityCardPropTypes, CircularProgressBarPropTypes} from './types';\nimport style from './style.css';\n\nconst ProgressionGradient = () => (\n <defs>\n <linearGradient\n id=\"gradient-stroke-progression\"\n x1=\"81\"\n y1=\"0\"\n x2=\"81\"\n y2=\"162\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop stopColor=\"#35CC7F\" />\n <stop offset=\"1\" stopColor=\"#55F2A7\" />\n </linearGradient>\n </defs>\n);\n\nconst CircularProgressBar = ({\n label,\n progression,\n size,\n strokeWidth,\n 'aria-label': ariaLabel,\n 'data-name': dataName\n}: LearningPriorityCardPropTypes) => {\n const [offset, setOffset] = useState<null | number>(null);\n\n const {center, radius, length} = useMemo(() => {\n const center_ = size / 2;\n const radius_ = center_ - strokeWidth;\n const length_ = Math.ceil(2 * Math.PI * radius_);\n\n return {center: center_, radius: radius_, length: length_};\n }, [size, strokeWidth]);\n\n useEffect(\n () => setOffset(Math.ceil(length * ((100 - progression) / 100))),\n [length, progression]\n );\n\n return (\n <div className={style.container} aria-label={ariaLabel} data-name={dataName}>\n <svg className={style.svg} width={size} height={size}>\n <ProgressionGradient />\n <circle\n className={style.mainCircle}\n cx={center}\n cy={center}\n r={radius}\n strokeWidth={3}\n fill=\"transparent\"\n />\n <circle cx={center} cy={center} r={radius - (10 / radius) * 100} fill=\"#fafafa\" />\n <circle\n className={style.progressionCircle}\n cx={center}\n cy={center}\n r={radius}\n stroke={`url(#gradient-stroke-progression)`}\n strokeWidth={strokeWidth}\n strokeDasharray={length}\n strokeDashoffset={isNull(offset) ? length : offset}\n fill=\"transparent\"\n strokeLinecap=\"round\"\n />\n </svg>\n <div className={style.infos}>\n <span className={style.progression}>{progression}%</span>\n <span className={style.label}>{label}</span>\n </div>\n </div>\n );\n};\n\nCircularProgressBar.propTypes = CircularProgressBarPropTypes;\n\nexport default CircularProgressBar;\n"],"mappings":";AAAA,OAAOA,KAAP,IAAeC,OAAf,EAAwBC,QAAxB,EAAkCC,SAAlC,QAAkD,OAAlD;AAEA,SAAuCC,4BAAvC,QAA0E,SAA1E;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,mBAAmB,GAAG,mBAC1B,+CACE;EACE,EAAE,EAAC,6BADL;EAEE,EAAE,EAAC,IAFL;EAGE,EAAE,EAAC,GAHL;EAIE,EAAE,EAAC,IAJL;EAKE,EAAE,EAAC,KALL;EAME,aAAa,EAAC;AANhB,gBAQE;EAAM,SAAS,EAAC;AAAhB,EARF,eASE;EAAM,MAAM,E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ALf;IAME,IAAI,EAAC;EANP,EAFF,eAUE;IAAQ,EAAE,EAAED,MAAZ;IAAoB,EAAE,EAAEA,MAAxB;IAAgC,CAAC,EAAEC,MAAM,GAAI,KAAKA,MAAN,GAAgB,GAA5D;IAAiE,IAAI,EAAC;EAAtE,EAVF,eAWE;IACE,SAAS,EAAEZ,KAAK,CAACuB,iBADnB;IAEE,EAAE,EAAEZ,MAFN;IAGE,EAAE,EAAEA,MAHN;IAIE,CAAC,EAAEC,MAJL;IAKE,MAAM,EAAG,mCALX;IAME,WAAW,EAAEN,WANf;IAOE,eAAe,EAAEO,MAPnB;IAQE,gBAAgB,EAAE,QAAOJ,MAAP,IAAiBI,MAAjB,GAA0BJ,MAR9C;IASE,IAAI,EAAC,aATP;IAUE,aAAa,EAAC;EAVhB,EAXF,CADF,eAyBE;IAAK,SAAS,EAAET,KAAK,CAACwB;EAAtB,gBACE;IAAM,SAAS,EAAExB,KAAK,CAACI;EAAvB,GAAqCA,WAArC,MADF,eAEE;IAAM,SAAS,EAAEJ,KAAK,CAACG;EAAvB,GAA+BA,KAA/B,CAFF,CAzBF,CADF;AAgCD,CAvDD;;AAyDAD,mBAAmB,CAACuB,SAApB,2CAAgC1B,4BAAhC;AAEA,eAAeG,mBAAf"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
@value colors: "../../variables/colors.css";
|
|
2
|
+
@value cm_grey_400 from colors;
|
|
3
|
+
@value cm_grey_50 from colors;
|
|
4
|
+
|
|
5
|
+
.container {
|
|
6
|
+
position: relative;
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
align-items: center;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.svg {
|
|
14
|
+
transform: rotate(-90deg);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.mainCircle {
|
|
18
|
+
stroke: cm_grey_50;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.progressionCircle {
|
|
22
|
+
transition: stroke-dashoffset 1.5s ease-in-out;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.infos {
|
|
26
|
+
font-family: Gilroy;
|
|
27
|
+
display: flex;
|
|
28
|
+
flex-direction: column;
|
|
29
|
+
justify-content: center;
|
|
30
|
+
align-items: center;
|
|
31
|
+
text-align: center;
|
|
32
|
+
position: absolute;
|
|
33
|
+
top: 50%;
|
|
34
|
+
left: 50%;
|
|
35
|
+
transform: translate(-50%, -50%);
|
|
36
|
+
text-align: center;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.label {
|
|
40
|
+
color: cm_grey_400;
|
|
41
|
+
font-size: 10px;
|
|
42
|
+
font-weight: 500;
|
|
43
|
+
line-height: 12px;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.progression {
|
|
47
|
+
color: #2caf6c;
|
|
48
|
+
font-size: 24px;
|
|
49
|
+
font-weight: 700;
|
|
50
|
+
line-height: 32px;
|
|
51
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
export declare type LearningPriorityCardPropTypes = {
|
|
3
|
+
label: string;
|
|
4
|
+
progression: number;
|
|
5
|
+
size: number;
|
|
6
|
+
strokeWidth: number;
|
|
7
|
+
'aria-label': string;
|
|
8
|
+
'data-name': string;
|
|
9
|
+
};
|
|
10
|
+
export declare const CircularProgressBarPropTypes: {
|
|
11
|
+
label: PropTypes.Requireable<string>;
|
|
12
|
+
progression: PropTypes.Validator<number>;
|
|
13
|
+
size: PropTypes.Requireable<number>;
|
|
14
|
+
strokeWidth: PropTypes.Requireable<number>;
|
|
15
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
16
|
+
'data-name': PropTypes.Requireable<string>;
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/atom/circular-progress-bar/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,oBAAY,6BAA6B,GAAG;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,4BAA4B;;;;;;;CAOxC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
export const CircularProgressBarPropTypes = {
|
|
3
|
+
label: PropTypes.string,
|
|
4
|
+
progression: PropTypes.number.isRequired,
|
|
5
|
+
size: PropTypes.number,
|
|
6
|
+
strokeWidth: PropTypes.number,
|
|
7
|
+
'aria-label': PropTypes.string,
|
|
8
|
+
'data-name': PropTypes.string
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","names":["PropTypes","CircularProgressBarPropTypes","label","string","progression","number","isRequired","size","strokeWidth"],"sources":["../../../src/atom/circular-progress-bar/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\n\nexport type LearningPriorityCardPropTypes = {\n label: string;\n progression: number;\n size: number;\n strokeWidth: number;\n 'aria-label': string;\n 'data-name': string;\n};\n\nexport const CircularProgressBarPropTypes = {\n label: PropTypes.string,\n progression: PropTypes.number.isRequired,\n size: PropTypes.number,\n strokeWidth: PropTypes.number,\n 'aria-label': PropTypes.string,\n 'data-name': PropTypes.string\n};\n"],"mappings":"AAAA,OAAOA,SAAP,MAAsB,YAAtB;AAWA,OAAO,MAAMC,4BAA4B,GAAG;EAC1CC,KAAK,EAAEF,SAAS,CAACG,MADyB;EAE1CC,WAAW,EAAEJ,SAAS,CAACK,MAAV,CAAiBC,UAFY;EAG1CC,IAAI,EAAEP,SAAS,CAACK,MAH0B;EAI1CG,WAAW,EAAER,SAAS,CAACK,MAJmB;EAK1C,cAAcL,SAAS,CAACG,MALkB;EAM1C,aAAaH,SAAS,CAACG;AANmB,CAArC"}
|
|
@@ -10,6 +10,12 @@ declare const RadioWithTitle: {
|
|
|
10
10
|
'data-name': import("prop-types").Requireable<string>;
|
|
11
11
|
titleSize: import("prop-types").Requireable<string>;
|
|
12
12
|
subtitleSize: import("prop-types").Requireable<string>;
|
|
13
|
+
icon: import("prop-types").Requireable<import("prop-types").InferProps<any>>;
|
|
14
|
+
tag: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
15
|
+
label: import("prop-types").Requireable<string>;
|
|
16
|
+
type: import("prop-types").Requireable<string>;
|
|
17
|
+
size: import("prop-types").Requireable<string>;
|
|
18
|
+
}>>;
|
|
13
19
|
}>>>;
|
|
14
20
|
name: import("prop-types").Requireable<string>;
|
|
15
21
|
checked: import("prop-types").Requireable<boolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/radio-with-title/index.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAY,mBAAmB,EAAC,MAAM,SAAS,CAAC;AAEvD,QAAA,MAAM,cAAc;YAAW,mBAAmB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/radio-with-title/index.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAY,mBAAmB,EAAC,MAAM,SAAS,CAAC;AAEvD,QAAA,MAAM,cAAc;YAAW,mBAAmB;;;;;;;;;;;;;;;;;;;;;;CAwBjD,CAAC;AAIF,eAAe,cAAc,CAAC"}
|
|
@@ -7,6 +7,12 @@ export declare const propTypes: {
|
|
|
7
7
|
'data-name': PropTypes.Requireable<string>;
|
|
8
8
|
titleSize: PropTypes.Requireable<string>;
|
|
9
9
|
subtitleSize: PropTypes.Requireable<string>;
|
|
10
|
+
icon: PropTypes.Requireable<PropTypes.InferProps<any>>;
|
|
11
|
+
tag: PropTypes.Requireable<PropTypes.InferProps<{
|
|
12
|
+
label: PropTypes.Requireable<string>;
|
|
13
|
+
type: PropTypes.Requireable<string>;
|
|
14
|
+
size: PropTypes.Requireable<string>;
|
|
15
|
+
}>>;
|
|
10
16
|
}>>>;
|
|
11
17
|
name: PropTypes.Requireable<string>;
|
|
12
18
|
checked: PropTypes.Requireable<boolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/atom/radio-with-title/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAGnC,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/atom/radio-with-title/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAGnC,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;CAOrB,CAAC;AAEF,oBAAY,mBAAmB,GAAG;IAChC,KAAK,EAAE;QACL,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,YAAY,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC"}
|
package/es/atom/tag/index.d.ts
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
export default Tag;
|
|
2
|
-
declare function Tag(
|
|
2
|
+
declare function Tag({ label, type, size }: {
|
|
3
|
+
label: any;
|
|
4
|
+
type?: string | undefined;
|
|
5
|
+
size?: string | undefined;
|
|
6
|
+
}): JSX.Element;
|
|
3
7
|
declare namespace Tag {
|
|
4
8
|
namespace propTypes {
|
|
5
9
|
const label: PropTypes.Requireable<string>;
|
|
6
10
|
const type: PropTypes.Requireable<string>;
|
|
11
|
+
const size: PropTypes.Requireable<string>;
|
|
7
12
|
}
|
|
8
13
|
}
|
|
9
14
|
import PropTypes from "prop-types";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/tag/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/tag/index.js"],"names":[],"mappings":";AAoBA;;;;gBAIC"}
|
package/es/atom/tag/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _keys from "lodash/fp/keys";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
+
import classnames from 'classnames';
|
|
4
5
|
import style from './style.css';
|
|
5
6
|
const TAG_STYLES = {
|
|
6
7
|
default: style.default,
|
|
@@ -9,21 +10,25 @@ const TAG_STYLES = {
|
|
|
9
10
|
warning: style.warning,
|
|
10
11
|
progress: style.progress
|
|
11
12
|
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
type = 'default'
|
|
17
|
-
} = props;
|
|
18
|
-
return /*#__PURE__*/React.createElement("span", {
|
|
19
|
-
className: TAG_STYLES[type],
|
|
20
|
-
"data-name": `content-tag-${label}`
|
|
21
|
-
}, label);
|
|
13
|
+
const TAG_SIZE = {
|
|
14
|
+
S: style.small,
|
|
15
|
+
M: style.medium,
|
|
16
|
+
L: style.large
|
|
22
17
|
};
|
|
23
18
|
|
|
19
|
+
const Tag = ({
|
|
20
|
+
label,
|
|
21
|
+
type = 'default',
|
|
22
|
+
size = 'M'
|
|
23
|
+
}) => /*#__PURE__*/React.createElement("span", {
|
|
24
|
+
className: classnames(TAG_STYLES[type], TAG_SIZE[size]),
|
|
25
|
+
"data-name": `content-tag-${label}`
|
|
26
|
+
}, label);
|
|
27
|
+
|
|
24
28
|
Tag.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
25
29
|
label: PropTypes.string,
|
|
26
|
-
type: PropTypes.oneOf(_keys(TAG_STYLES))
|
|
30
|
+
type: PropTypes.oneOf(_keys(TAG_STYLES)),
|
|
31
|
+
size: PropTypes.oneOf(['S', 'M', 'L'])
|
|
27
32
|
} : {};
|
|
28
33
|
export default Tag;
|
|
29
34
|
//# sourceMappingURL=index.js.map
|
package/es/atom/tag/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","PropTypes","style","TAG_STYLES","default","success","failure","warning","progress","
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","PropTypes","classnames","style","TAG_STYLES","default","success","failure","warning","progress","TAG_SIZE","S","small","M","medium","L","large","Tag","label","type","size","propTypes","string","oneOf"],"sources":["../../../src/atom/tag/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {keys} from 'lodash/fp';\nimport style from './style.css';\n\nconst TAG_STYLES = {\n default: style.default,\n success: style.success,\n failure: style.failure,\n warning: style.warning,\n progress: style.progress\n};\n\nconst TAG_SIZE = {\n S: style.small,\n M: style.medium,\n L: style.large\n};\n\nconst Tag = ({label, type = 'default', size = 'M'}) => (\n <span className={classnames(TAG_STYLES[type], TAG_SIZE[size])} data-name={`content-tag-${label}`}>\n {label}\n </span>\n);\n\nTag.propTypes = {\n label: PropTypes.string,\n type: PropTypes.oneOf(keys(TAG_STYLES)),\n size: PropTypes.oneOf(['S', 'M', 'L'])\n};\n\nexport default Tag;\n"],"mappings":";AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AAEA,OAAOC,KAAP,MAAkB,aAAlB;AAEA,MAAMC,UAAU,GAAG;EACjBC,OAAO,EAAEF,KAAK,CAACE,OADE;EAEjBC,OAAO,EAAEH,KAAK,CAACG,OAFE;EAGjBC,OAAO,EAAEJ,KAAK,CAACI,OAHE;EAIjBC,OAAO,EAAEL,KAAK,CAACK,OAJE;EAKjBC,QAAQ,EAAEN,KAAK,CAACM;AALC,CAAnB;AAQA,MAAMC,QAAQ,GAAG;EACfC,CAAC,EAAER,KAAK,CAACS,KADM;EAEfC,CAAC,EAAEV,KAAK,CAACW,MAFM;EAGfC,CAAC,EAAEZ,KAAK,CAACa;AAHM,CAAjB;;AAMA,MAAMC,GAAG,GAAG,CAAC;EAACC,KAAD;EAAQC,IAAI,GAAG,SAAf;EAA0BC,IAAI,GAAG;AAAjC,CAAD,kBACV;EAAM,SAAS,EAAElB,UAAU,CAACE,UAAU,CAACe,IAAD,CAAX,EAAmBT,QAAQ,CAACU,IAAD,CAA3B,CAA3B;EAA+D,aAAY,eAAcF,KAAM;AAA/F,GACGA,KADH,CADF;;AAMAD,GAAG,CAACI,SAAJ,2CAAgB;EACdH,KAAK,EAAEjB,SAAS,CAACqB,MADH;EAEdH,IAAI,EAAElB,SAAS,CAACsB,KAAV,CAAgB,MAAKnB,UAAL,CAAhB,CAFQ;EAGdgB,IAAI,EAAEnB,SAAS,CAACsB,KAAV,CAAgB,CAAC,GAAD,EAAM,GAAN,EAAW,GAAX,CAAhB;AAHQ,CAAhB;AAMA,eAAeN,GAAf"}
|
package/es/atom/tag/style.css
CHANGED
|
@@ -5,41 +5,61 @@
|
|
|
5
5
|
@value cm_negative_100 from colors;
|
|
6
6
|
@value cm_orange_700 from colors;
|
|
7
7
|
@value black from colors;
|
|
8
|
+
@value cm_grey_100 from colors;
|
|
9
|
+
@value cm_grey_500 from colors;
|
|
8
10
|
|
|
9
11
|
.tag {
|
|
10
12
|
border-radius: 24px;
|
|
11
|
-
font-family:
|
|
12
|
-
font-
|
|
13
|
-
font-weight: bold;
|
|
13
|
+
font-family: "Gilroy";
|
|
14
|
+
font-weight: 600;
|
|
14
15
|
text-align: center;
|
|
15
|
-
|
|
16
|
+
line-height: normal;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.small {
|
|
20
|
+
composes: tag;
|
|
21
|
+
font-size: 10px;
|
|
22
|
+
padding: 2px 5px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.medium {
|
|
26
|
+
composes: tag;
|
|
27
|
+
font-size: 12px;
|
|
28
|
+
padding: 4px 8px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.large {
|
|
32
|
+
composes: tag;
|
|
33
|
+
font-size: 14px;
|
|
34
|
+
padding: 8px 16px;
|
|
16
35
|
}
|
|
17
36
|
|
|
18
37
|
.default {
|
|
19
|
-
|
|
20
|
-
|
|
38
|
+
composes: tag;
|
|
39
|
+
background-color: cm_grey_100;
|
|
40
|
+
color: cm_grey_500;
|
|
21
41
|
}
|
|
22
42
|
|
|
23
43
|
.progress {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
44
|
+
composes: tag;
|
|
45
|
+
background-color: color(cm_yellow_200 a(15%));
|
|
46
|
+
color: cm_yellow_200;
|
|
27
47
|
}
|
|
28
48
|
|
|
29
49
|
.success {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
50
|
+
composes: tag;
|
|
51
|
+
background-color: color(cm_positive_100 a(15%));
|
|
52
|
+
color: cm_positive_100;
|
|
33
53
|
}
|
|
34
54
|
|
|
35
55
|
.failure {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
56
|
+
composes: tag;
|
|
57
|
+
background-color: color(cm_negative_100 a(15%));
|
|
58
|
+
color: cm_negative_100;
|
|
39
59
|
}
|
|
40
60
|
|
|
41
61
|
.warning {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
62
|
+
composes: tag;
|
|
63
|
+
background-color: color(cm_orange_700 a(15%));
|
|
64
|
+
color: cm_orange_700;
|
|
65
|
+
}
|
package/es/atom/title/index.d.ts
CHANGED
|
@@ -8,6 +8,12 @@ declare namespace Title {
|
|
|
8
8
|
'data-name': PropTypes.Requireable<string>;
|
|
9
9
|
titleSize: PropTypes.Requireable<string>;
|
|
10
10
|
subtitleSize: PropTypes.Requireable<string>;
|
|
11
|
+
icon: PropTypes.Requireable<PropTypes.InferProps<any>>;
|
|
12
|
+
tag: PropTypes.Requireable<PropTypes.InferProps<{
|
|
13
|
+
label: PropTypes.Requireable<string>;
|
|
14
|
+
type: PropTypes.Requireable<string>;
|
|
15
|
+
size: PropTypes.Requireable<string>;
|
|
16
|
+
}>>;
|
|
11
17
|
};
|
|
12
18
|
}
|
|
13
19
|
import PropTypes from "prop-types";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/title/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/title/index.js"],"names":[],"mappings":";AAwCA,gDA4BC"}
|
package/es/atom/title/index.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
|
|
1
3
|
import React from 'react';
|
|
2
4
|
import PropTypes from 'prop-types';
|
|
5
|
+
import Icon from '../icon';
|
|
6
|
+
import Tag from '../tag';
|
|
3
7
|
import style from './style.css';
|
|
4
8
|
|
|
5
9
|
const getTitleStyle = (type, size) => {
|
|
@@ -52,17 +56,23 @@ const Title = props => {
|
|
|
52
56
|
type,
|
|
53
57
|
'data-name': dataName,
|
|
54
58
|
titleSize = 'standard',
|
|
55
|
-
subtitleSize = 'standard'
|
|
59
|
+
subtitleSize = 'standard',
|
|
60
|
+
icon,
|
|
61
|
+
tag
|
|
56
62
|
} = props;
|
|
57
63
|
const titleStyle = getTitleStyle(type, titleSize);
|
|
58
64
|
const subtitleStyle = getSubtitleStyle(type, subtitleSize);
|
|
59
65
|
const subtitleSection = subtitle ? /*#__PURE__*/React.createElement("div", {
|
|
60
66
|
className: subtitleStyle
|
|
61
67
|
}, subtitle) : null;
|
|
62
|
-
return /*#__PURE__*/React.createElement("div",
|
|
68
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
69
|
+
className: style.container
|
|
70
|
+
}, icon ? /*#__PURE__*/React.createElement(Icon, _extends({}, icon, {
|
|
71
|
+
className: style.icon
|
|
72
|
+
})) : null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
63
73
|
className: titleStyle,
|
|
64
74
|
"data-name": dataName
|
|
65
|
-
}, title), subtitleSection);
|
|
75
|
+
}, title, tag ? /*#__PURE__*/React.createElement(Tag, tag) : null), subtitleSection));
|
|
66
76
|
};
|
|
67
77
|
|
|
68
78
|
Title.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
@@ -71,7 +81,9 @@ Title.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
71
81
|
type: PropTypes.oneOf(['page', 'form-group']),
|
|
72
82
|
'data-name': PropTypes.string,
|
|
73
83
|
titleSize: PropTypes.oneOf(['standard', 'medium', 'small']),
|
|
74
|
-
subtitleSize: PropTypes.oneOf(['standard', 'small', 'small-without-margin', 'extra-small'])
|
|
84
|
+
subtitleSize: PropTypes.oneOf(['standard', 'small', 'small-without-margin', 'extra-small']),
|
|
85
|
+
icon: PropTypes.shape(Icon.propTypes),
|
|
86
|
+
tag: PropTypes.shape(Tag.propTypes)
|
|
75
87
|
} : {};
|
|
76
88
|
export default Title;
|
|
77
89
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","PropTypes","style","getTitleStyle","type","size","titlePage","titleFormGroup","mediumTitleFormGroup","smallTitleFormGroup","getSubtitleStyle","subtitlePage","subtitleFormGroup","smallSubtitleFormGroup","smallSubtitleFormGroupWithoutMargin","extraSmallSubtitleFormGroup","Title","props","title","subtitle","dataName","titleSize","subtitleSize","titleStyle","subtitleStyle","subtitleSection","propTypes","string","oneOf"],"sources":["../../../src/atom/title/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport style from './style.css';\n\nconst getTitleStyle = (type, size) => {\n switch (type) {\n case 'page':\n return style.titlePage;\n case 'form-group':\n switch (size) {\n case 'standard':\n return style.titleFormGroup;\n case 'medium':\n return style.mediumTitleFormGroup;\n case 'small':\n return style.smallTitleFormGroup;\n }\n }\n};\n\nconst getSubtitleStyle = (type, size) => {\n switch (type) {\n case 'page':\n return style.subtitlePage;\n case 'form-group':\n switch (size) {\n case 'standard':\n return style.subtitleFormGroup;\n case 'small':\n return style.smallSubtitleFormGroup;\n case 'small-without-margin':\n return style.smallSubtitleFormGroupWithoutMargin;\n case 'extra-small':\n return style.extraSmallSubtitleFormGroup;\n }\n }\n};\n\nconst Title = props => {\n const {\n title,\n subtitle,\n type,\n 'data-name': dataName,\n titleSize = 'standard',\n subtitleSize = 'standard'\n } = props;\n const titleStyle = getTitleStyle(type, titleSize);\n const subtitleStyle = getSubtitleStyle(type, subtitleSize);\n\n const subtitleSection = subtitle ? <div className={subtitleStyle}>{subtitle}</div> : null;\n\n return (\n <div>\n <div className={titleStyle} data-name={dataName}>\n
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","PropTypes","Icon","Tag","style","getTitleStyle","type","size","titlePage","titleFormGroup","mediumTitleFormGroup","smallTitleFormGroup","getSubtitleStyle","subtitlePage","subtitleFormGroup","smallSubtitleFormGroup","smallSubtitleFormGroupWithoutMargin","extraSmallSubtitleFormGroup","Title","props","title","subtitle","dataName","titleSize","subtitleSize","icon","tag","titleStyle","subtitleStyle","subtitleSection","container","propTypes","string","oneOf","shape"],"sources":["../../../src/atom/title/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport Icon from '../icon';\nimport Tag from '../tag';\nimport style from './style.css';\n\nconst getTitleStyle = (type, size) => {\n switch (type) {\n case 'page':\n return style.titlePage;\n case 'form-group':\n switch (size) {\n case 'standard':\n return style.titleFormGroup;\n case 'medium':\n return style.mediumTitleFormGroup;\n case 'small':\n return style.smallTitleFormGroup;\n }\n }\n};\n\nconst getSubtitleStyle = (type, size) => {\n switch (type) {\n case 'page':\n return style.subtitlePage;\n case 'form-group':\n switch (size) {\n case 'standard':\n return style.subtitleFormGroup;\n case 'small':\n return style.smallSubtitleFormGroup;\n case 'small-without-margin':\n return style.smallSubtitleFormGroupWithoutMargin;\n case 'extra-small':\n return style.extraSmallSubtitleFormGroup;\n }\n }\n};\n\nconst Title = props => {\n const {\n title,\n subtitle,\n type,\n 'data-name': dataName,\n titleSize = 'standard',\n subtitleSize = 'standard',\n icon,\n tag\n } = props;\n const titleStyle = getTitleStyle(type, titleSize);\n const subtitleStyle = getSubtitleStyle(type, subtitleSize);\n\n const subtitleSection = subtitle ? <div className={subtitleStyle}>{subtitle}</div> : null;\n\n return (\n <div className={style.container}>\n {icon ? <Icon {...icon} className={style.icon} /> : null}\n <div>\n <div className={titleStyle} data-name={dataName}>\n {title}\n {tag ? <Tag {...tag} /> : null}\n </div>\n {subtitleSection}\n </div>\n </div>\n );\n};\n\nTitle.propTypes = {\n title: PropTypes.string,\n subtitle: PropTypes.string,\n type: PropTypes.oneOf(['page', 'form-group']),\n 'data-name': PropTypes.string,\n titleSize: PropTypes.oneOf(['standard', 'medium', 'small']),\n subtitleSize: PropTypes.oneOf(['standard', 'small', 'small-without-margin', 'extra-small']),\n icon: PropTypes.shape(Icon.propTypes),\n tag: PropTypes.shape(Tag.propTypes)\n};\nexport default Title;\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,IAAP,MAAiB,SAAjB;AACA,OAAOC,GAAP,MAAgB,QAAhB;AACA,OAAOC,K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GACGL,IAAI,gBAAG,oBAAC,IAAD,eAAUA,IAAV;IAAgB,SAAS,EAAErB,KAAK,CAACqB;EAAjC,GAAH,GAA+C,IADtD,eAEE,8CACE;IAAK,SAAS,EAAEE,UAAhB;IAA4B,aAAWL;EAAvC,GACGF,KADH,EAEGM,GAAG,gBAAG,oBAAC,GAAD,EAASA,GAAT,CAAH,GAAsB,IAF5B,CADF,EAKGG,eALH,CAFF,CADF;AAYD,CA5BD;;AA8BAX,KAAK,CAACa,SAAN,2CAAkB;EAChBX,KAAK,EAAEnB,SAAS,CAAC+B,MADD;EAEhBX,QAAQ,EAAEpB,SAAS,CAAC+B,MAFJ;EAGhB1B,IAAI,EAAEL,SAAS,CAACgC,KAAV,CAAgB,CAAC,MAAD,EAAS,YAAT,CAAhB,CAHU;EAIhB,aAAahC,SAAS,CAAC+B,MAJP;EAKhBT,SAAS,EAAEtB,SAAS,CAACgC,KAAV,CAAgB,CAAC,UAAD,EAAa,QAAb,EAAuB,OAAvB,CAAhB,CALK;EAMhBT,YAAY,EAAEvB,SAAS,CAACgC,KAAV,CAAgB,CAAC,UAAD,EAAa,OAAb,EAAsB,sBAAtB,EAA8C,aAA9C,CAAhB,CANE;EAOhBR,IAAI,EAAExB,SAAS,CAACiC,KAAV,CAAgBhC,IAAI,CAAC6B,SAArB,CAPU;EAQhBL,GAAG,EAAEzB,SAAS,CAACiC,KAAV,CAAgB/B,GAAG,CAAC4B,SAApB;AARW,CAAlB;AAUA,eAAeb,KAAf"}
|
package/es/atom/title/style.css
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
@value cm_grey_700 from colors;
|
|
3
3
|
@value cm_grey_400 from colors;
|
|
4
4
|
|
|
5
|
+
.container {
|
|
6
|
+
display: flex;
|
|
7
|
+
gap: 12px;
|
|
8
|
+
}
|
|
9
|
+
|
|
5
10
|
.title {
|
|
6
11
|
font-family: Gilroy;
|
|
7
12
|
font-style: normal;
|
|
@@ -18,6 +23,9 @@
|
|
|
18
23
|
.titleFormGroup {
|
|
19
24
|
composes: title;
|
|
20
25
|
font-size: 18px;
|
|
26
|
+
display: flex;
|
|
27
|
+
align-items: center;
|
|
28
|
+
gap: 4px;
|
|
21
29
|
}
|
|
22
30
|
|
|
23
31
|
.mediumTitleFormGroup {
|
|
@@ -74,3 +82,8 @@
|
|
|
74
82
|
font-weight: normal;
|
|
75
83
|
}
|
|
76
84
|
|
|
85
|
+
.icon {
|
|
86
|
+
height: 24px;
|
|
87
|
+
width: 24px;
|
|
88
|
+
}
|
|
89
|
+
|
|
@@ -14,6 +14,12 @@ declare const propTypes: {
|
|
|
14
14
|
'data-name': PropTypes.Requireable<string>;
|
|
15
15
|
titleSize: PropTypes.Requireable<string>;
|
|
16
16
|
subtitleSize: PropTypes.Requireable<string>;
|
|
17
|
+
icon: PropTypes.Requireable<PropTypes.InferProps<any>>;
|
|
18
|
+
tag: PropTypes.Requireable<PropTypes.InferProps<{
|
|
19
|
+
label: PropTypes.Requireable<string>;
|
|
20
|
+
type: PropTypes.Requireable<string>;
|
|
21
|
+
size: PropTypes.Requireable<string>;
|
|
22
|
+
}>>;
|
|
17
23
|
}>>;
|
|
18
24
|
headerIcon: PropTypes.Requireable<string>;
|
|
19
25
|
backgroundImage: PropTypes.Requireable<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/molecule/cm-popin/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAKnC,OAAO,IAAI,MAAM,iBAAiB,CAAC;AACnC,OAAO,EAAC,UAAU,EAAC,MAAM,wBAAwB,CAAC;AAClD,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAClD,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAGlD,QAAA,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/molecule/cm-popin/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM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;IACxB,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B,YAAY,CAAC,EAAE,eAAe,CAAC;IAC/B,KAAK,CAAC,EAAE;QACN,IAAI,EAAE,SAAS,GAAG,MAAM,CAAC;QACzB,IAAI,EACA,SAAS,CAAC,UAAU,CAAC,OAAO,SAAS,CAAC,SAAS,CAAC,GAChD,SAAS,CAAC,UAAU,CAAC,OAAO,SAAS,CAAC,SAAS,CAAC,CAAC;KACtD,CAAC;IACF,IAAI,CAAC,EAAE,SAAS,CAAC,UAAU,CAAC,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC;CACpD,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/molecule/dashboard/cards-list/index.js"],"names":[],"mappings":";AAuFA;IACE;;;OAGG;IACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAeE;IAEF;;;;;;;;;;;;;;;;;;;;;;;MAGE;IAEF,wBAkCC;IA/BC;;;;;;;;MAQC;IAED,0DAAgE;IAsHlE,qBAiBC;IAED,qBAGC;IAED,sBAGC;IAED,0BASC;IAvJC,uEAA6D;IAyJ/D,mCAIC;IA5DD,oCAMC;IAGD,sCAIC;IA5DD,qBAGC;IAnCD,0BAMC;IAED,2BAYC;IAED,6BAOC;IASD,wCAuCC;IAGC,kBAA2B;IA6D7B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/molecule/dashboard/cards-list/index.js"],"names":[],"mappings":";AAuFA;IACE;;;OAGG;IACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAeE;IAEF;;;;;;;;;;;;;;;;;;;;;;;MAGE;IAEF,wBAkCC;IA/BC;;;;;;;;MAQC;IAED,0DAAgE;IAsHlE,qBAiBC;IAED,qBAGC;IAED,sBAGC;IAED,0BASC;IAvJC,uEAA6D;IAyJ/D,mCAIC;IA5DD,oCAMC;IAGD,sCAIC;IA5DD,qBAGC;IAnCD,0BAMC;IAED,2BAYC;IAED,6BAOC;IASD,wCAuCC;IAGC,kBAA2B;IA6D7B,sBAsGC;CACF"}
|