@coorpacademy/components 11.32.19 → 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/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/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 +2 -1
- 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
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
@value tablet from breakpoints;
|
|
4
4
|
@value mobile from breakpoints;
|
|
5
5
|
@value white from colors;
|
|
6
|
+
@value cm_grey_50 from colors;
|
|
6
7
|
@value cm_grey_100 from colors;
|
|
7
8
|
@value cm_grey_500 from colors;
|
|
8
9
|
|
|
@@ -10,12 +11,11 @@
|
|
|
10
11
|
background-color: white;
|
|
11
12
|
min-height: 100%;
|
|
12
13
|
width: 100%;
|
|
14
|
+
font-family: "Gilroy";
|
|
15
|
+
font-style: normal;
|
|
13
16
|
}
|
|
14
17
|
|
|
15
18
|
.container {
|
|
16
|
-
background-color: white;
|
|
17
|
-
font-family: "Gilroy";
|
|
18
|
-
font-style: normal;
|
|
19
19
|
margin-top: 48px;
|
|
20
20
|
margin-bottom: 48px;
|
|
21
21
|
margin-left: auto;
|
|
@@ -28,10 +28,21 @@
|
|
|
28
28
|
max-width: calc(1080px + 32px);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
+
.cardsListContainer {
|
|
32
|
+
background-color: cm_grey_50;
|
|
33
|
+
padding: 48px 0;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/* to ecrase wrapper's style from CardsList component */
|
|
37
|
+
.cardsListContainer > :first-child {
|
|
38
|
+
padding: 0;
|
|
39
|
+
}
|
|
40
|
+
|
|
31
41
|
.skillFocusContainer {
|
|
32
42
|
border-radius: 16px;
|
|
33
43
|
border: 1px solid cm_grey_100;
|
|
34
44
|
overflow: hidden;
|
|
45
|
+
margin-top: 48px;
|
|
35
46
|
margin-bottom: 40px;
|
|
36
47
|
}
|
|
37
48
|
|
|
@@ -272,4 +283,8 @@
|
|
|
272
283
|
.skillFocusContent {
|
|
273
284
|
flex-direction: column;
|
|
274
285
|
}
|
|
286
|
+
|
|
287
|
+
.cardsListContainer {
|
|
288
|
+
padding: 24px 16px;
|
|
289
|
+
}
|
|
275
290
|
}
|
|
@@ -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,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
|
|
6
|
+
var _isNull2 = _interopRequireDefault(require("lodash/fp/isNull"));
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
|
|
10
|
+
var _types = require("./types");
|
|
11
|
+
|
|
12
|
+
var _style = _interopRequireDefault(require("./style.css"));
|
|
13
|
+
|
|
14
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
|
+
|
|
16
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
+
|
|
20
|
+
const ProgressionGradient = () => /*#__PURE__*/_react.default.createElement("defs", null, /*#__PURE__*/_react.default.createElement("linearGradient", {
|
|
21
|
+
id: "gradient-stroke-progression",
|
|
22
|
+
x1: "81",
|
|
23
|
+
y1: "0",
|
|
24
|
+
x2: "81",
|
|
25
|
+
y2: "162",
|
|
26
|
+
gradientUnits: "userSpaceOnUse"
|
|
27
|
+
}, /*#__PURE__*/_react.default.createElement("stop", {
|
|
28
|
+
stopColor: "#35CC7F"
|
|
29
|
+
}), /*#__PURE__*/_react.default.createElement("stop", {
|
|
30
|
+
offset: "1",
|
|
31
|
+
stopColor: "#55F2A7"
|
|
32
|
+
})));
|
|
33
|
+
|
|
34
|
+
const CircularProgressBar = ({
|
|
35
|
+
label,
|
|
36
|
+
progression,
|
|
37
|
+
size,
|
|
38
|
+
strokeWidth,
|
|
39
|
+
'aria-label': ariaLabel,
|
|
40
|
+
'data-name': dataName
|
|
41
|
+
}) => {
|
|
42
|
+
const [offset, setOffset] = (0, _react.useState)(null);
|
|
43
|
+
const {
|
|
44
|
+
center,
|
|
45
|
+
radius,
|
|
46
|
+
length
|
|
47
|
+
} = (0, _react.useMemo)(() => {
|
|
48
|
+
const center_ = size / 2;
|
|
49
|
+
const radius_ = center_ - strokeWidth;
|
|
50
|
+
const length_ = Math.ceil(2 * Math.PI * radius_);
|
|
51
|
+
return {
|
|
52
|
+
center: center_,
|
|
53
|
+
radius: radius_,
|
|
54
|
+
length: length_
|
|
55
|
+
};
|
|
56
|
+
}, [size, strokeWidth]);
|
|
57
|
+
(0, _react.useEffect)(() => setOffset(Math.ceil(length * ((100 - progression) / 100))), [length, progression]);
|
|
58
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
59
|
+
className: _style.default.container,
|
|
60
|
+
"aria-label": ariaLabel,
|
|
61
|
+
"data-name": dataName
|
|
62
|
+
}, /*#__PURE__*/_react.default.createElement("svg", {
|
|
63
|
+
className: _style.default.svg,
|
|
64
|
+
width: size,
|
|
65
|
+
height: size
|
|
66
|
+
}, /*#__PURE__*/_react.default.createElement(ProgressionGradient, null), /*#__PURE__*/_react.default.createElement("circle", {
|
|
67
|
+
className: _style.default.mainCircle,
|
|
68
|
+
cx: center,
|
|
69
|
+
cy: center,
|
|
70
|
+
r: radius,
|
|
71
|
+
strokeWidth: 3,
|
|
72
|
+
fill: "transparent"
|
|
73
|
+
}), /*#__PURE__*/_react.default.createElement("circle", {
|
|
74
|
+
cx: center,
|
|
75
|
+
cy: center,
|
|
76
|
+
r: radius - 10 / radius * 100,
|
|
77
|
+
fill: "#fafafa"
|
|
78
|
+
}), /*#__PURE__*/_react.default.createElement("circle", {
|
|
79
|
+
className: _style.default.progressionCircle,
|
|
80
|
+
cx: center,
|
|
81
|
+
cy: center,
|
|
82
|
+
r: radius,
|
|
83
|
+
stroke: `url(#gradient-stroke-progression)`,
|
|
84
|
+
strokeWidth: strokeWidth,
|
|
85
|
+
strokeDasharray: length,
|
|
86
|
+
strokeDashoffset: (0, _isNull2.default)(offset) ? length : offset,
|
|
87
|
+
fill: "transparent",
|
|
88
|
+
strokeLinecap: "round"
|
|
89
|
+
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
90
|
+
className: _style.default.infos
|
|
91
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
92
|
+
className: _style.default.progression
|
|
93
|
+
}, progression, "%"), /*#__PURE__*/_react.default.createElement("span", {
|
|
94
|
+
className: _style.default.label
|
|
95
|
+
}, label)));
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
CircularProgressBar.propTypes = process.env.NODE_ENV !== "production" ? _types.CircularProgressBarPropTypes : {};
|
|
99
|
+
var _default = CircularProgressBar;
|
|
100
|
+
exports.default = _default;
|
|
101
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["ProgressionGradient","CircularProgressBar","label","progression","size","strokeWidth","ariaLabel","dataName","offset","setOffset","useState","center","radius","length","useMemo","center_","radius_","length_","Math","ceil","PI","useEffect","style","container","svg","mainCircle","progressionCircle","infos","propTypes","CircularProgressBarPropTypes"],"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;;AAEA;;AACA;;;;;;;;AAEA,MAAMA,mBAAmB,GAAG,mBAC1B,wDACE;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,EAAC,GAAb;EAAiB,SAAS,EAAC;AAA3B,EATF,CADF,CADF;;AAgBA,MAAMC,mBAAmB,GAAG,CAAC;EAC3BC,KAD2B;EAE3BC,WAF2B;EAG3BC,IAH2B;EAI3BC,WAJ2B;EAK3B,cAAcC,SALa;EAM3B,aAAaC;AANc,CAAD,KAOS;EACnC,MAAM,CAACC,MAAD,EAASC,SAAT,IAAsB,IAAAC,eAAA,EAAwB,IAAxB,CAA5B;EAEA,MAAM;IAACC,MAAD;IAASC,MAAT;IAAiBC;EAAjB,IAA2B,IAAAC,cAAA,EAAQ,MAAM;IAC7C,MAAMC,OAAO,GAAGX,IAAI,GAAG,CAAvB;IACA,MAAMY,OAAO,GAAGD,OAAO,GAAGV,WAA1B;IACA,MAAMY,OAAO,GAAGC,IAAI,CAACC,IAAL,CAAU,IAAID,IAAI,CAACE,EAAT,GAAcJ,OAAxB,CAAhB;IAEA,OAAO;MAACL,MAAM,EAAEI,OAAT;MAAkBH,MAAM,EAAEI,OAA1B;MAAmCH,MAAM,EAAEI;IAA3C,CAAP;EACD,CANgC,EAM9B,CAACb,IAAD,EAAOC,WAAP,CAN8B,CAAjC;EAQA,IAAAgB,gBAAA,EACE,MAAMZ,SAAS,CAACS,IAAI,CAACC,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mCAAhC;eAEe5B,mB"}
|
|
@@ -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,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.CircularProgressBarPropTypes = void 0;
|
|
5
|
+
|
|
6
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
7
|
+
|
|
8
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
+
|
|
10
|
+
const CircularProgressBarPropTypes = {
|
|
11
|
+
label: _propTypes.default.string,
|
|
12
|
+
progression: _propTypes.default.number.isRequired,
|
|
13
|
+
size: _propTypes.default.number,
|
|
14
|
+
strokeWidth: _propTypes.default.number,
|
|
15
|
+
'aria-label': _propTypes.default.string,
|
|
16
|
+
'data-name': _propTypes.default.string
|
|
17
|
+
};
|
|
18
|
+
exports.CircularProgressBarPropTypes = CircularProgressBarPropTypes;
|
|
19
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","names":["CircularProgressBarPropTypes","label","PropTypes","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;;;;AAWO,MAAMA,4BAA4B,GAAG;EAC1CC,KAAK,EAAEC,kBAAA,CAAUC,MADyB;EAE1CC,WAAW,EAAEF,kBAAA,CAAUG,MAAV,CAAiBC,UAFY;EAG1CC,IAAI,EAAEL,kBAAA,CAAUG,MAH0B;EAI1CG,WAAW,EAAEN,kBAAA,CAAUG,MAJmB;EAK1C,cAAcH,kBAAA,CAAUC,MALkB;EAM1C,aAAaD,kBAAA,CAAUC;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/lib/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/lib/atom/tag/index.js
CHANGED
|
@@ -9,6 +9,8 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
|
|
12
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
|
|
12
14
|
var _style = _interopRequireDefault(require("./style.css"));
|
|
13
15
|
|
|
14
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -20,21 +22,25 @@ const TAG_STYLES = {
|
|
|
20
22
|
warning: _style.default.warning,
|
|
21
23
|
progress: _style.default.progress
|
|
22
24
|
};
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
type = 'default'
|
|
28
|
-
} = props;
|
|
29
|
-
return /*#__PURE__*/_react.default.createElement("span", {
|
|
30
|
-
className: TAG_STYLES[type],
|
|
31
|
-
"data-name": `content-tag-${label}`
|
|
32
|
-
}, label);
|
|
25
|
+
const TAG_SIZE = {
|
|
26
|
+
S: _style.default.small,
|
|
27
|
+
M: _style.default.medium,
|
|
28
|
+
L: _style.default.large
|
|
33
29
|
};
|
|
34
30
|
|
|
31
|
+
const Tag = ({
|
|
32
|
+
label,
|
|
33
|
+
type = 'default',
|
|
34
|
+
size = 'M'
|
|
35
|
+
}) => /*#__PURE__*/_react.default.createElement("span", {
|
|
36
|
+
className: (0, _classnames.default)(TAG_STYLES[type], TAG_SIZE[size]),
|
|
37
|
+
"data-name": `content-tag-${label}`
|
|
38
|
+
}, label);
|
|
39
|
+
|
|
35
40
|
Tag.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
36
41
|
label: _propTypes.default.string,
|
|
37
|
-
type: _propTypes.default.oneOf((0, _keys2.default)(TAG_STYLES))
|
|
42
|
+
type: _propTypes.default.oneOf((0, _keys2.default)(TAG_STYLES)),
|
|
43
|
+
size: _propTypes.default.oneOf(['S', 'M', 'L'])
|
|
38
44
|
} : {};
|
|
39
45
|
var _default = Tag;
|
|
40
46
|
exports.default = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["TAG_STYLES","default","style","success","failure","warning","progress","
|
|
1
|
+
{"version":3,"file":"index.js","names":["TAG_STYLES","default","style","success","failure","warning","progress","TAG_SIZE","S","small","M","medium","L","large","Tag","label","type","size","classnames","propTypes","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;;AACA;;AACA;;AAEA;;;;AAEA,MAAMA,UAAU,GAAG;EACjBC,OAAO,EAAEC,cAAA,CAAMD,OADE;EAEjBE,OAAO,EAAED,cAAA,CAAMC,OAFE;EAGjBC,OAAO,EAAEF,cAAA,CAAME,OAHE;EAIjBC,OAAO,EAAEH,cAAA,CAAMG,OAJE;EAKjBC,QAAQ,EAAEJ,cAAA,CAAMI;AALC,CAAnB;AAQA,MAAMC,QAAQ,GAAG;EACfC,CAAC,EAAEN,cAAA,CAAMO,KADM;EAEfC,CAAC,EAAER,cAAA,CAAMS,MAFM;EAGfC,CAAC,EAAEV,cAAA,CAAMW;AAHM,CAAjB;;AAMA,MAAMC,GAAG,GAAG,CAAC;EAACC,KAAD;EAAQC,IAAI,GAAG,SAAf;EAA0BC,IAAI,GAAG;AAAjC,CAAD,kBACV;EAAM,SAAS,EAAE,IAAAC,mBAAA,EAAWlB,UAAU,CAACgB,IAAD,CAArB,EAA6BT,QAAQ,CAACU,IAAD,CAArC,CAAjB;EAA+D,aAAY,eAAcF,KAAM;AAA/F,GACGA,KADH,CADF;;AAMAD,GAAG,CAACK,SAAJ,2CAAgB;EACdJ,KAAK,EAAEK,kBAAA,CAAUC,MADH;EAEdL,IAAI,EAAEI,kBAAA,CAAUE,KAAV,CAAgB,oBAAKtB,UAAL,CAAhB,CAFQ;EAGdiB,IAAI,EAAEG,kBAAA,CAAUE,KAAV,CAAgB,CAAC,GAAD,EAAM,GAAN,EAAW,GAAX,CAAhB;AAHQ,CAAhB;eAMeR,G"}
|
package/lib/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
|
+
}
|
|
@@ -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/lib/atom/title/index.js
CHANGED
|
@@ -7,10 +7,16 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
7
7
|
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
9
|
|
|
10
|
+
var _icon = _interopRequireDefault(require("../icon"));
|
|
11
|
+
|
|
12
|
+
var _tag = _interopRequireDefault(require("../tag"));
|
|
13
|
+
|
|
10
14
|
var _style = _interopRequireDefault(require("./style.css"));
|
|
11
15
|
|
|
12
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
17
|
|
|
18
|
+
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); }
|
|
19
|
+
|
|
14
20
|
const getTitleStyle = (type, size) => {
|
|
15
21
|
switch (type) {
|
|
16
22
|
case 'page':
|
|
@@ -61,17 +67,23 @@ const Title = props => {
|
|
|
61
67
|
type,
|
|
62
68
|
'data-name': dataName,
|
|
63
69
|
titleSize = 'standard',
|
|
64
|
-
subtitleSize = 'standard'
|
|
70
|
+
subtitleSize = 'standard',
|
|
71
|
+
icon,
|
|
72
|
+
tag
|
|
65
73
|
} = props;
|
|
66
74
|
const titleStyle = getTitleStyle(type, titleSize);
|
|
67
75
|
const subtitleStyle = getSubtitleStyle(type, subtitleSize);
|
|
68
76
|
const subtitleSection = subtitle ? /*#__PURE__*/_react.default.createElement("div", {
|
|
69
77
|
className: subtitleStyle
|
|
70
78
|
}, subtitle) : null;
|
|
71
|
-
return /*#__PURE__*/_react.default.createElement("div",
|
|
79
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
80
|
+
className: _style.default.container
|
|
81
|
+
}, icon ? /*#__PURE__*/_react.default.createElement(_icon.default, _extends({}, icon, {
|
|
82
|
+
className: _style.default.icon
|
|
83
|
+
})) : null, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", {
|
|
72
84
|
className: titleStyle,
|
|
73
85
|
"data-name": dataName
|
|
74
|
-
}, title), subtitleSection);
|
|
86
|
+
}, title, tag ? /*#__PURE__*/_react.default.createElement(_tag.default, tag) : null), subtitleSection));
|
|
75
87
|
};
|
|
76
88
|
|
|
77
89
|
Title.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
@@ -80,7 +92,9 @@ Title.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
80
92
|
type: _propTypes.default.oneOf(['page', 'form-group']),
|
|
81
93
|
'data-name': _propTypes.default.string,
|
|
82
94
|
titleSize: _propTypes.default.oneOf(['standard', 'medium', 'small']),
|
|
83
|
-
subtitleSize: _propTypes.default.oneOf(['standard', 'small', 'small-without-margin', 'extra-small'])
|
|
95
|
+
subtitleSize: _propTypes.default.oneOf(['standard', 'small', 'small-without-margin', 'extra-small']),
|
|
96
|
+
icon: _propTypes.default.shape(_icon.default.propTypes),
|
|
97
|
+
tag: _propTypes.default.shape(_tag.default.propTypes)
|
|
84
98
|
} : {};
|
|
85
99
|
var _default = Title;
|
|
86
100
|
exports.default = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["getTitleStyle","type","size","style","titlePage","titleFormGroup","mediumTitleFormGroup","smallTitleFormGroup","getSubtitleStyle","subtitlePage","subtitleFormGroup","smallSubtitleFormGroup","smallSubtitleFormGroupWithoutMargin","extraSmallSubtitleFormGroup","Title","props","title","subtitle","dataName","titleSize","subtitleSize","titleStyle","subtitleStyle","subtitleSection","propTypes","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":["getTitleStyle","type","size","style","titlePage","titleFormGroup","mediumTitleFormGroup","smallTitleFormGroup","getSubtitleStyle","subtitlePage","subtitleFormGroup","smallSubtitleFormGroup","smallSubtitleFormGroupWithoutMargin","extraSmallSubtitleFormGroup","Title","props","title","subtitle","dataName","titleSize","subtitleSize","icon","tag","titleStyle","subtitleStyle","subtitleSection","container","propTypes","PropTypes","string","oneOf","shape","Icon","Tag"],"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;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,aAAa,GAAG,CAACC,IAAD,EAAOC,IAAP,KAAgB;EACpC,QAAQD,IAAR;IACE,KAAK,MAAL;MACE,OAAOE,cAAA,CAAMC,SAAb;;IACF,KAAK,YAAL;MACE,QAAQF,IAAR;QACE,KAAK,UAAL;UACE,OAAOC,cAAA,CAAME,cAAb;;QACF,KAAK,QAAL;UACE,OAAOF,cAAA,CAAMG,oBAAb;;QACF,KAAK,OAAL;UACE,OAAOH,cAAA,CAAMI,mBAAb;MANJ;;EAJJ;AAaD,CAdD;;AAgBA,MAAMC,gBAAgB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Z,QAAQ,EAAEW,kBAAA,CAAUC,MAFJ;EAGhB5B,IAAI,EAAE2B,kBAAA,CAAUE,KAAV,CAAgB,CAAC,MAAD,EAAS,YAAT,CAAhB,CAHU;EAIhB,aAAaF,kBAAA,CAAUC,MAJP;EAKhBV,SAAS,EAAES,kBAAA,CAAUE,KAAV,CAAgB,CAAC,UAAD,EAAa,QAAb,EAAuB,OAAvB,CAAhB,CALK;EAMhBV,YAAY,EAAEQ,kBAAA,CAAUE,KAAV,CAAgB,CAAC,UAAD,EAAa,OAAb,EAAsB,sBAAtB,EAA8C,aAA9C,CAAhB,CANE;EAOhBT,IAAI,EAAEO,kBAAA,CAAUG,KAAV,CAAgBC,aAAA,CAAKL,SAArB,CAPU;EAQhBL,GAAG,EAAEM,kBAAA,CAAUG,KAAV,CAAgBE,YAAA,CAAIN,SAApB;AARW,CAAlB;eAUeb,K"}
|
package/lib/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,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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