@coorpacademy/components 11.18.7 → 11.18.8-alpha.12
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/button-menu/index.d.ts.map +1 -1
- package/es/atom/button-menu/index.js +1 -1
- package/es/atom/button-menu/index.js.map +1 -1
- package/es/atom/button-menu/style.css +10 -0
- package/es/atom/button-menu/types.d.ts +1 -1
- package/es/atom/button-menu/types.d.ts.map +1 -1
- package/es/atom/button-menu/types.js +1 -1
- package/es/atom/button-menu/types.js.map +1 -1
- package/es/atom/empty-search-result/index.d.ts +1 -0
- package/es/atom/empty-search-result/index.d.ts.map +1 -1
- package/es/atom/empty-search-result/index.js +6 -4
- package/es/atom/empty-search-result/index.js.map +1 -1
- package/es/atom/empty-search-result/style.css +16 -1
- package/es/atom/status-item/index.d.ts +1 -0
- package/es/atom/status-item/index.d.ts.map +1 -1
- package/es/atom/status-item/index.js +3 -2
- package/es/atom/status-item/index.js.map +1 -1
- package/es/atom/status-item/style.css +15 -17
- package/es/atom/status-item/types.d.ts +2 -0
- package/es/atom/status-item/types.d.ts.map +1 -1
- package/es/atom/status-item/types.js +1 -0
- package/es/atom/status-item/types.js.map +1 -1
- package/es/atom/tag/index.js +4 -4
- package/es/atom/tag/index.js.map +1 -1
- package/es/atom/tag/style.css +11 -8
- package/es/atom/title/types.d.ts +9 -0
- package/es/atom/title/types.d.ts.map +1 -0
- package/es/atom/title/types.js +2 -0
- package/es/atom/title/types.js.map +1 -0
- package/es/molecule/banner/style.css +4 -2
- package/es/molecule/brand-tabs/index.d.ts +1 -0
- package/es/molecule/brand-tabs/index.d.ts.map +1 -1
- package/es/molecule/brand-tabs/index.js +10 -1
- package/es/molecule/brand-tabs/index.js.map +1 -1
- package/es/molecule/brand-tabs/style.css +7 -4
- package/es/molecule/bulk-progress-bar/index.d.ts.map +1 -1
- package/es/molecule/bulk-progress-bar/index.js +4 -2
- package/es/molecule/bulk-progress-bar/index.js.map +1 -1
- package/es/molecule/bulk-progress-bar/style.css +5 -0
- package/es/molecule/card/index.d.ts +53 -0
- package/es/molecule/card/index.d.ts.map +1 -1
- package/es/molecule/card/index.js +14 -12
- package/es/molecule/card/index.js.map +1 -1
- package/es/molecule/card/style.css +47 -5
- package/es/molecule/cm-popin/index.d.ts.map +1 -1
- package/es/molecule/cm-popin/index.js +46 -9
- package/es/molecule/cm-popin/index.js.map +1 -1
- package/es/molecule/cm-popin/style.css +32 -0
- package/es/molecule/cm-popin/types.d.ts +31 -1
- package/es/molecule/cm-popin/types.d.ts.map +1 -1
- package/es/molecule/cm-popin/types.js +13 -3
- package/es/molecule/cm-popin/types.js.map +1 -1
- package/es/molecule/dashboard/cards-list/index.d.ts +57 -1
- package/es/molecule/dashboard/cards-list/index.d.ts.map +1 -1
- package/es/molecule/dashboard/cards-list/index.js +39 -5
- package/es/molecule/dashboard/cards-list/index.js.map +1 -1
- package/es/molecule/dashboard/cards-list/prop-types.d.ts +14 -0
- package/es/molecule/dashboard/cards-list/prop-types.d.ts.map +1 -0
- package/es/molecule/dashboard/cards-list/prop-types.js +2 -0
- package/es/molecule/dashboard/cards-list/prop-types.js.map +1 -0
- package/es/molecule/draggable-list/index.d.ts +32 -12
- package/es/molecule/expandible-actionable-table/index.d.ts +3 -0
- package/es/molecule/expandible-actionable-table/index.d.ts.map +1 -1
- package/es/molecule/expandible-actionable-table/index.js +15 -2
- package/es/molecule/expandible-actionable-table/index.js.map +1 -1
- package/es/molecule/expandible-actionable-table/style.css +5 -0
- package/es/molecule/expandible-actionable-table/types.d.ts +5 -0
- package/es/molecule/expandible-actionable-table/types.d.ts.map +1 -1
- package/es/molecule/expandible-actionable-table/types.js +3 -1
- package/es/molecule/expandible-actionable-table/types.js.map +1 -1
- package/es/molecule/review-header-steps/index.d.ts.map +1 -1
- package/es/molecule/review-header-steps/index.js +3 -4
- package/es/molecule/review-header-steps/index.js.map +1 -1
- package/es/molecule/review-header-steps/prop-types.d.ts +1 -0
- package/es/molecule/review-header-steps/prop-types.d.ts.map +1 -1
- package/es/molecule/review-header-steps/style.css +6 -1
- package/es/molecule/title-and-checkbox-wrapper/index.d.ts +45 -0
- package/es/molecule/title-and-checkbox-wrapper/index.d.ts.map +1 -1
- package/es/molecule/title-and-checkbox-wrapper/index.js +15 -3
- package/es/molecule/title-and-checkbox-wrapper/index.js.map +1 -1
- package/es/organism/list-item/index.d.ts +44 -13
- package/es/organism/list-item/index.d.ts.map +1 -1
- package/es/organism/list-item/index.js +72 -38
- package/es/organism/list-item/index.js.map +1 -1
- package/es/organism/list-item/style.css +28 -5
- package/es/organism/list-items/index.d.ts +36 -12
- package/es/organism/list-items/index.d.ts.map +1 -1
- package/es/organism/list-items/index.js +19 -4
- package/es/organism/list-items/index.js.map +1 -1
- package/es/organism/list-items/style.css +42 -0
- package/es/organism/mooc-header/index.d.ts.map +1 -1
- package/es/organism/mooc-header/index.js +1 -0
- package/es/organism/mooc-header/index.js.map +1 -1
- package/es/organism/review-header/types.d.ts +1 -0
- package/es/organism/review-header/types.d.ts.map +1 -1
- package/es/organism/rewards-form/index.d.ts +45 -0
- package/es/organism/select-opponents/index.d.ts +67 -12
- package/es/organism/select-opponents/index.d.ts.map +1 -1
- package/es/organism/select-opponents/index.js +3 -3
- package/es/organism/select-opponents/index.js.map +1 -1
- package/es/organism/select-opponents/style.css +6 -0
- package/es/organism/select-opponents/types.d.ts +75 -14
- package/es/organism/select-opponents/types.d.ts.map +1 -1
- package/es/organism/select-opponents/types.js +2 -2
- package/es/organism/select-opponents/types.js.map +1 -1
- package/es/organism/sidebar/index.d.ts +3 -1
- package/es/organism/sidebar/index.d.ts.map +1 -1
- package/es/organism/sidebar/index.js +9 -5
- package/es/organism/sidebar/index.js.map +1 -1
- package/es/organism/sidebar/style.css +14 -0
- package/es/organism/title-and-input/index.d.ts +84 -29
- package/es/organism/title-and-input/index.d.ts.map +1 -1
- package/es/organism/title-and-input/types.d.ts +84 -29
- package/es/organism/title-and-input/types.d.ts.map +1 -1
- package/es/organism/wizard-contents/index.d.ts +112 -0
- package/es/organism/wizard-contents/index.d.ts.map +1 -1
- package/es/organism/wizard-contents/index.js +37 -4
- package/es/organism/wizard-contents/index.js.map +1 -1
- package/es/organism/wizard-contents/style.css +22 -0
- package/es/template/app-player/loading/index.d.ts +19 -1
- package/es/template/app-player/player/index.d.ts +38 -2
- package/es/template/app-player/player/slides/index.d.ts +19 -1
- package/es/template/app-player/player/slides/index.d.ts.map +1 -1
- package/es/template/app-player/popin-correction/index.d.ts +19 -1
- package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/es/template/app-player/popin-end/index.d.ts +72 -2
- package/es/template/app-player/popin-end/summary.d.ts +53 -1
- package/es/template/app-review/index.d.ts +20 -1
- package/es/template/app-review/index.d.ts.map +1 -1
- package/es/template/app-review/player/prop-types.d.ts +20 -1
- package/es/template/app-review/player/prop-types.d.ts.map +1 -1
- package/es/template/app-review/prop-types.d.ts +20 -1
- package/es/template/app-review/prop-types.d.ts.map +1 -1
- package/es/template/back-office/brand-update/index.d.ts +122 -13
- package/es/template/back-office/brand-update/index.d.ts.map +1 -1
- package/es/template/back-office/brand-update/index.js +4 -2
- package/es/template/back-office/brand-update/index.js.map +1 -1
- package/es/template/back-office/brand-update/style.css +4 -4
- package/es/template/common/dashboard/index.d.ts +89 -1
- package/es/template/common/dashboard/index.d.ts.map +1 -1
- package/es/template/common/dashboard/index.js +6 -2
- package/es/template/common/dashboard/index.js.map +1 -1
- package/es/template/common/dashboard/style.css +5 -0
- package/es/template/common/search-page/index.d.ts +123 -1
- package/es/template/common/search-page/index.d.ts.map +1 -1
- package/es/template/common/search-page/index.js +8 -3
- package/es/template/common/search-page/index.js.map +1 -1
- package/es/template/common/search-page/style.css +5 -0
- package/es/template/external-course/index.d.ts +19 -1
- package/es/template/teams-dashboard/index.d.ts +53 -1
- package/es/variables/colors.css +3 -2
- package/lib/atom/button-menu/index.d.ts.map +1 -1
- package/lib/atom/button-menu/index.js +1 -1
- package/lib/atom/button-menu/index.js.map +1 -1
- package/lib/atom/button-menu/style.css +10 -0
- package/lib/atom/button-menu/types.d.ts +1 -1
- package/lib/atom/button-menu/types.d.ts.map +1 -1
- package/lib/atom/button-menu/types.js +1 -1
- package/lib/atom/button-menu/types.js.map +1 -1
- package/lib/atom/empty-search-result/index.d.ts +1 -0
- package/lib/atom/empty-search-result/index.d.ts.map +1 -1
- package/lib/atom/empty-search-result/index.js +6 -4
- package/lib/atom/empty-search-result/index.js.map +1 -1
- package/lib/atom/empty-search-result/style.css +16 -1
- package/lib/atom/status-item/index.d.ts +1 -0
- package/lib/atom/status-item/index.d.ts.map +1 -1
- package/lib/atom/status-item/index.js +3 -2
- package/lib/atom/status-item/index.js.map +1 -1
- package/lib/atom/status-item/style.css +15 -17
- package/lib/atom/status-item/types.d.ts +2 -0
- package/lib/atom/status-item/types.d.ts.map +1 -1
- package/lib/atom/status-item/types.js +1 -0
- package/lib/atom/status-item/types.js.map +1 -1
- package/lib/atom/tag/index.js +4 -4
- package/lib/atom/tag/index.js.map +1 -1
- package/lib/atom/tag/style.css +11 -8
- package/lib/atom/title/types.d.ts +9 -0
- package/lib/atom/title/types.d.ts.map +1 -0
- package/lib/atom/title/types.js +2 -0
- package/lib/atom/title/types.js.map +1 -0
- package/lib/molecule/banner/style.css +4 -2
- package/lib/molecule/brand-tabs/index.d.ts +1 -0
- package/lib/molecule/brand-tabs/index.d.ts.map +1 -1
- package/lib/molecule/brand-tabs/index.js +11 -1
- package/lib/molecule/brand-tabs/index.js.map +1 -1
- package/lib/molecule/brand-tabs/style.css +7 -4
- package/lib/molecule/bulk-progress-bar/index.d.ts.map +1 -1
- package/lib/molecule/bulk-progress-bar/index.js +4 -2
- package/lib/molecule/bulk-progress-bar/index.js.map +1 -1
- package/lib/molecule/bulk-progress-bar/style.css +5 -0
- package/lib/molecule/card/index.d.ts +53 -0
- package/lib/molecule/card/index.d.ts.map +1 -1
- package/lib/molecule/card/index.js +15 -11
- package/lib/molecule/card/index.js.map +1 -1
- package/lib/molecule/card/style.css +47 -5
- package/lib/molecule/cm-popin/index.d.ts.map +1 -1
- package/lib/molecule/cm-popin/index.js +48 -8
- package/lib/molecule/cm-popin/index.js.map +1 -1
- package/lib/molecule/cm-popin/style.css +32 -0
- package/lib/molecule/cm-popin/types.d.ts +31 -1
- package/lib/molecule/cm-popin/types.d.ts.map +1 -1
- package/lib/molecule/cm-popin/types.js +15 -3
- package/lib/molecule/cm-popin/types.js.map +1 -1
- package/lib/molecule/dashboard/cards-list/index.d.ts +57 -1
- package/lib/molecule/dashboard/cards-list/index.d.ts.map +1 -1
- package/lib/molecule/dashboard/cards-list/index.js +43 -5
- package/lib/molecule/dashboard/cards-list/index.js.map +1 -1
- package/lib/molecule/dashboard/cards-list/prop-types.d.ts +14 -0
- package/lib/molecule/dashboard/cards-list/prop-types.d.ts.map +1 -0
- package/lib/molecule/dashboard/cards-list/prop-types.js +2 -0
- package/lib/molecule/dashboard/cards-list/prop-types.js.map +1 -0
- package/lib/molecule/draggable-list/index.d.ts +32 -12
- package/lib/molecule/expandible-actionable-table/index.d.ts +3 -0
- package/lib/molecule/expandible-actionable-table/index.d.ts.map +1 -1
- package/lib/molecule/expandible-actionable-table/index.js +17 -2
- package/lib/molecule/expandible-actionable-table/index.js.map +1 -1
- package/lib/molecule/expandible-actionable-table/style.css +5 -0
- package/lib/molecule/expandible-actionable-table/types.d.ts +5 -0
- package/lib/molecule/expandible-actionable-table/types.d.ts.map +1 -1
- package/lib/molecule/expandible-actionable-table/types.js +3 -1
- package/lib/molecule/expandible-actionable-table/types.js.map +1 -1
- package/lib/molecule/review-header-steps/index.d.ts.map +1 -1
- package/lib/molecule/review-header-steps/index.js +3 -4
- package/lib/molecule/review-header-steps/index.js.map +1 -1
- package/lib/molecule/review-header-steps/prop-types.d.ts +1 -0
- package/lib/molecule/review-header-steps/prop-types.d.ts.map +1 -1
- package/lib/molecule/review-header-steps/style.css +6 -1
- package/lib/molecule/title-and-checkbox-wrapper/index.d.ts +45 -0
- package/lib/molecule/title-and-checkbox-wrapper/index.d.ts.map +1 -1
- package/lib/molecule/title-and-checkbox-wrapper/index.js +17 -3
- package/lib/molecule/title-and-checkbox-wrapper/index.js.map +1 -1
- package/lib/organism/list-item/index.d.ts +44 -13
- package/lib/organism/list-item/index.d.ts.map +1 -1
- package/lib/organism/list-item/index.js +73 -37
- package/lib/organism/list-item/index.js.map +1 -1
- package/lib/organism/list-item/style.css +28 -5
- package/lib/organism/list-items/index.d.ts +36 -12
- package/lib/organism/list-items/index.d.ts.map +1 -1
- package/lib/organism/list-items/index.js +21 -4
- package/lib/organism/list-items/index.js.map +1 -1
- package/lib/organism/list-items/style.css +42 -0
- package/lib/organism/mooc-header/index.d.ts.map +1 -1
- package/lib/organism/mooc-header/index.js +1 -0
- package/lib/organism/mooc-header/index.js.map +1 -1
- package/lib/organism/review-header/types.d.ts +1 -0
- package/lib/organism/review-header/types.d.ts.map +1 -1
- package/lib/organism/rewards-form/index.d.ts +45 -0
- package/lib/organism/select-opponents/index.d.ts +67 -12
- package/lib/organism/select-opponents/index.d.ts.map +1 -1
- package/lib/organism/select-opponents/index.js +3 -3
- package/lib/organism/select-opponents/index.js.map +1 -1
- package/lib/organism/select-opponents/style.css +6 -0
- package/lib/organism/select-opponents/types.d.ts +75 -14
- package/lib/organism/select-opponents/types.d.ts.map +1 -1
- package/lib/organism/select-opponents/types.js +2 -2
- package/lib/organism/select-opponents/types.js.map +1 -1
- package/lib/organism/sidebar/index.d.ts +3 -1
- package/lib/organism/sidebar/index.d.ts.map +1 -1
- package/lib/organism/sidebar/index.js +8 -4
- package/lib/organism/sidebar/index.js.map +1 -1
- package/lib/organism/sidebar/style.css +14 -0
- package/lib/organism/title-and-input/index.d.ts +84 -29
- package/lib/organism/title-and-input/index.d.ts.map +1 -1
- package/lib/organism/title-and-input/types.d.ts +84 -29
- package/lib/organism/title-and-input/types.d.ts.map +1 -1
- package/lib/organism/wizard-contents/index.d.ts +112 -0
- package/lib/organism/wizard-contents/index.d.ts.map +1 -1
- package/lib/organism/wizard-contents/index.js +39 -4
- package/lib/organism/wizard-contents/index.js.map +1 -1
- package/lib/organism/wizard-contents/style.css +22 -0
- package/lib/template/app-player/loading/index.d.ts +19 -1
- package/lib/template/app-player/player/index.d.ts +38 -2
- package/lib/template/app-player/player/slides/index.d.ts +19 -1
- package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-correction/index.d.ts +19 -1
- package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-end/index.d.ts +72 -2
- package/lib/template/app-player/popin-end/summary.d.ts +53 -1
- package/lib/template/app-review/index.d.ts +20 -1
- package/lib/template/app-review/index.d.ts.map +1 -1
- package/lib/template/app-review/player/prop-types.d.ts +20 -1
- package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
- package/lib/template/app-review/prop-types.d.ts +20 -1
- package/lib/template/app-review/prop-types.d.ts.map +1 -1
- package/lib/template/back-office/brand-update/index.d.ts +122 -13
- package/lib/template/back-office/brand-update/index.d.ts.map +1 -1
- package/lib/template/back-office/brand-update/index.js +4 -2
- package/lib/template/back-office/brand-update/index.js.map +1 -1
- package/lib/template/back-office/brand-update/style.css +4 -4
- package/lib/template/common/dashboard/index.d.ts +89 -1
- package/lib/template/common/dashboard/index.d.ts.map +1 -1
- package/lib/template/common/dashboard/index.js +6 -2
- package/lib/template/common/dashboard/index.js.map +1 -1
- package/lib/template/common/dashboard/style.css +5 -0
- package/lib/template/common/search-page/index.d.ts +123 -1
- package/lib/template/common/search-page/index.d.ts.map +1 -1
- package/lib/template/common/search-page/index.js +9 -3
- package/lib/template/common/search-page/index.js.map +1 -1
- package/lib/template/common/search-page/style.css +5 -0
- package/lib/template/external-course/index.d.ts +19 -1
- package/lib/template/teams-dashboard/index.d.ts +53 -1
- package/lib/variables/colors.css +3 -2
- package/locales/.mtslconfig.json +1 -0
- package/locales/et/global.json +3 -3
- package/package.json +3 -3
|
@@ -9,10 +9,11 @@
|
|
|
9
9
|
@value cm_green_secondary_200 from colors;
|
|
10
10
|
@value cm_green_secondary_100 from colors;
|
|
11
11
|
@value cm_pink_50 from colors;
|
|
12
|
+
@value cm_primary_blue from colors;
|
|
12
13
|
|
|
13
14
|
.default {
|
|
14
|
-
width:
|
|
15
|
-
height:
|
|
15
|
+
width: 100%;
|
|
16
|
+
height: 100%;
|
|
16
17
|
opacity: 0.5;
|
|
17
18
|
border-radius: 50%;
|
|
18
19
|
background-color: cm_grey_100;
|
|
@@ -44,12 +45,13 @@
|
|
|
44
45
|
|
|
45
46
|
.value {
|
|
46
47
|
display: flex;
|
|
48
|
+
align-items: center;
|
|
49
|
+
justify-content: center;
|
|
47
50
|
}
|
|
48
51
|
|
|
49
52
|
.rightIcon {
|
|
50
53
|
color: white;
|
|
51
|
-
width:
|
|
52
|
-
height: 10px;
|
|
54
|
+
width: 37.5%;
|
|
53
55
|
transition: transform 0.25s ease;
|
|
54
56
|
}
|
|
55
57
|
|
|
@@ -59,8 +61,7 @@
|
|
|
59
61
|
|
|
60
62
|
.wrongIcon {
|
|
61
63
|
color: white;
|
|
62
|
-
width:
|
|
63
|
-
height: 10px;
|
|
64
|
+
width: 31.25%;
|
|
64
65
|
transition: color 0.25s ease;
|
|
65
66
|
}
|
|
66
67
|
|
|
@@ -73,43 +74,40 @@
|
|
|
73
74
|
|
|
74
75
|
.valid {
|
|
75
76
|
opacity: 1;
|
|
76
|
-
width: 24px;
|
|
77
77
|
min-width: 24px;
|
|
78
|
-
height: 24px;
|
|
79
78
|
background-color: cm_green_secondary_100;
|
|
80
79
|
}
|
|
81
80
|
|
|
82
81
|
.validIcon {
|
|
83
82
|
color: cm_green_secondary_200;
|
|
84
|
-
width:
|
|
85
|
-
height: 10px;
|
|
83
|
+
width: 50%;
|
|
86
84
|
transition: transform 0.25s ease;
|
|
87
85
|
}
|
|
88
86
|
|
|
89
87
|
.invalid {
|
|
90
88
|
opacity: 1;
|
|
91
|
-
width: 24px;
|
|
92
89
|
min-width: 24px;
|
|
93
|
-
height: 24px;
|
|
94
90
|
background-color: cm_negative_50;
|
|
95
91
|
}
|
|
96
92
|
|
|
97
93
|
.invalidIcon {
|
|
98
94
|
color: cm_negative_100;
|
|
99
|
-
width:
|
|
100
|
-
height: 10px;
|
|
95
|
+
width: 41.67%;
|
|
101
96
|
transition: color 0.25s ease;
|
|
102
97
|
}
|
|
103
98
|
|
|
104
99
|
.errorsNumber {
|
|
105
100
|
opacity: 1;
|
|
106
|
-
width: 24px;
|
|
107
101
|
min-width: 24px;
|
|
108
|
-
height: 24px;
|
|
109
102
|
background-color: cm_pink_50;
|
|
110
103
|
color: cm_negative_100;
|
|
111
104
|
font-family: 'Gilroy';
|
|
112
105
|
font-style: normal;
|
|
113
106
|
font-weight: 600;
|
|
114
107
|
font-size: 14px;
|
|
115
|
-
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.selected {
|
|
111
|
+
background-color: #D6E6FF;
|
|
112
|
+
color: cm_primary_blue;
|
|
113
|
+
}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
declare const propTypes: {
|
|
3
3
|
current: PropTypes.Requireable<boolean>;
|
|
4
|
+
selected: PropTypes.Requireable<boolean>;
|
|
4
5
|
icon: PropTypes.Requireable<string>;
|
|
5
6
|
value: PropTypes.Requireable<string>;
|
|
6
7
|
};
|
|
7
8
|
export default propTypes;
|
|
8
9
|
export declare type StatusItemProps = {
|
|
9
10
|
current?: boolean;
|
|
11
|
+
selected?: boolean;
|
|
10
12
|
icon: 'no-answer' | 'right' | 'wrong' | 'valid' | 'invalid' | 'errors-number';
|
|
11
13
|
value?: string;
|
|
12
14
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/atom/status-item/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,QAAA,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/atom/status-item/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,QAAA,MAAM,SAAS;;;;;CAKd,CAAC;AAEF,eAAe,SAAS,CAAC;AAEzB,oBAAY,eAAe,GAAG;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,EAAE,WAAW,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,GAAG,eAAe,CAAC;IAC9E,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,oBAAY,OAAO,GAAG;IACpB,KAAK,EAAE,eAAe,CAAC;CACxB,CAAC"}
|
|
@@ -9,6 +9,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
9
9
|
|
|
10
10
|
const propTypes = {
|
|
11
11
|
current: _propTypes.default.bool,
|
|
12
|
+
selected: _propTypes.default.bool,
|
|
12
13
|
icon: _propTypes.default.oneOf(['no-answer', 'right', 'wrong', 'valid', 'invalid', 'errors-number']),
|
|
13
14
|
value: _propTypes.default.string
|
|
14
15
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":["propTypes","current","PropTypes","bool","icon","oneOf","value","string"],"sources":["../../../src/atom/status-item/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\n\nconst propTypes = {\n current: PropTypes.bool,\n icon: PropTypes.oneOf(['no-answer', 'right', 'wrong', 'valid', 'invalid', 'errors-number']),\n value: PropTypes.string\n};\n\nexport default propTypes;\n\nexport type StatusItemProps = {\n current?: boolean;\n icon: 'no-answer' | 'right' | 'wrong' | 'valid' | 'invalid' | 'errors-number';\n value?: string;\n};\n\nexport type Fixture = {\n props: StatusItemProps;\n};\n"],"mappings":";;;;;AAAA;;;;AAEA,MAAMA,SAAS,GAAG;EAChBC,OAAO,EAAEC,kBAAA,CAAUC,IADH;EAEhBC,
|
|
1
|
+
{"version":3,"file":"types.js","names":["propTypes","current","PropTypes","bool","selected","icon","oneOf","value","string"],"sources":["../../../src/atom/status-item/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\n\nconst propTypes = {\n current: PropTypes.bool,\n selected: PropTypes.bool,\n icon: PropTypes.oneOf(['no-answer', 'right', 'wrong', 'valid', 'invalid', 'errors-number']),\n value: PropTypes.string\n};\n\nexport default propTypes;\n\nexport type StatusItemProps = {\n current?: boolean;\n selected?: boolean;\n icon: 'no-answer' | 'right' | 'wrong' | 'valid' | 'invalid' | 'errors-number';\n value?: string;\n};\n\nexport type Fixture = {\n props: StatusItemProps;\n};\n"],"mappings":";;;;;AAAA;;;;AAEA,MAAMA,SAAS,GAAG;EAChBC,OAAO,EAAEC,kBAAA,CAAUC,IADH;EAEhBC,QAAQ,EAAEF,kBAAA,CAAUC,IAFJ;EAGhBE,IAAI,EAAEH,kBAAA,CAAUI,KAAV,CAAgB,CAAC,WAAD,EAAc,OAAd,EAAuB,OAAvB,EAAgC,OAAhC,EAAyC,SAAzC,EAAoD,eAApD,CAAhB,CAHU;EAIhBC,KAAK,EAAEL,kBAAA,CAAUM;AAJD,CAAlB;eAOeR,S"}
|
package/lib/atom/tag/index.js
CHANGED
|
@@ -15,10 +15,10 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
15
15
|
|
|
16
16
|
const TAG_STYLES = {
|
|
17
17
|
default: _style.default.default,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
success: _style.default.success,
|
|
19
|
+
failure: _style.default.failure,
|
|
20
|
+
warning: _style.default.warning,
|
|
21
|
+
progress: _style.default.progress
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
const Tag = props => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["TAG_STYLES","default","style","
|
|
1
|
+
{"version":3,"file":"index.js","names":["TAG_STYLES","default","style","success","failure","warning","progress","Tag","props","label","type","propTypes","PropTypes","string","oneOf"],"sources":["../../../src/atom/tag/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\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 = props => {\n const {label, type = 'default'} = props;\n\n return (\n <span className={TAG_STYLES[type]} data-name={`content-tag-${label}`}>\n {label}\n </span>\n );\n};\n\nTag.propTypes = {\n label: PropTypes.string,\n type: PropTypes.oneOf(keys(TAG_STYLES))\n};\n\nexport default Tag;\n"],"mappings":";;;;;;;AAAA;;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,GAAG,GAAGC,KAAK,IAAI;EACnB,MAAM;IAACC,KAAD;IAAQC,IAAI,GAAG;EAAf,IAA4BF,KAAlC;EAEA,oBACE;IAAM,SAAS,EAAER,UAAU,CAACU,IAAD,CAA3B;IAAmC,aAAY,eAAcD,KAAM;EAAnE,GACGA,KADH,CADF;AAKD,CARD;;AAUAF,GAAG,CAACI,SAAJ,2CAAgB;EACdF,KAAK,EAAEG,kBAAA,CAAUC,MADH;EAEdH,IAAI,EAAEE,kBAAA,CAAUE,KAAV,CAAgB,oBAAKd,UAAL,CAAhB;AAFQ,CAAhB;eAKeO,G"}
|
package/lib/atom/tag/style.css
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
@value white from colors;
|
|
3
3
|
@value cm_yellow_200 from colors;
|
|
4
4
|
@value cm_positive_100 from colors;
|
|
5
|
+
@value cm_negative_100 from colors;
|
|
5
6
|
@value cm_orange_700 from colors;
|
|
6
7
|
@value black from colors;
|
|
7
8
|
|
|
@@ -10,7 +11,7 @@
|
|
|
10
11
|
font-family: 'Gilroy';
|
|
11
12
|
font-size: 14px;
|
|
12
13
|
font-weight: bold;
|
|
13
|
-
|
|
14
|
+
text-align: center;
|
|
14
15
|
padding: 12px 16px;
|
|
15
16
|
}
|
|
16
17
|
|
|
@@ -19,23 +20,25 @@
|
|
|
19
20
|
color: black;
|
|
20
21
|
}
|
|
21
22
|
|
|
22
|
-
.
|
|
23
|
+
.progress {
|
|
23
24
|
composes: tag;
|
|
24
25
|
background-color: color(cm_yellow_200 a(15%));
|
|
25
26
|
color: cm_yellow_200;
|
|
26
27
|
}
|
|
27
28
|
|
|
28
|
-
.
|
|
29
|
-
composes: revised;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.published {
|
|
29
|
+
.success {
|
|
33
30
|
composes: tag;
|
|
34
31
|
background-color: color(cm_positive_100 a(15%));
|
|
35
32
|
color: cm_positive_100;
|
|
36
33
|
}
|
|
37
34
|
|
|
38
|
-
.
|
|
35
|
+
.failure {
|
|
36
|
+
composes: tag;
|
|
37
|
+
background-color: color(cm_negative_100 a(15%));
|
|
38
|
+
color: cm_negative_100;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.warning {
|
|
39
42
|
composes: tag;
|
|
40
43
|
background-color: color(cm_orange_700 a(15%));
|
|
41
44
|
color: cm_orange_700;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare type TitleProps = {
|
|
2
|
+
title: string;
|
|
3
|
+
subtitle: string;
|
|
4
|
+
type: 'page' | 'form-group';
|
|
5
|
+
'data-name'?: string;
|
|
6
|
+
titleSize: 'standard' | 'medium' | 'small';
|
|
7
|
+
subtitleSize: 'standard' | 'small' | 'small-without-margin' | 'extra-small';
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/atom/title/types.ts"],"names":[],"mappings":"AAAA,oBAAY,UAAU,GAAG;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,GAAG,YAAY,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,UAAU,GAAG,QAAQ,GAAG,OAAO,CAAC;IAC3C,YAAY,EAAE,UAAU,GAAG,OAAO,GAAG,sBAAsB,GAAG,aAAa,CAAC;CAC7E,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../../src/atom/title/types.ts"],"sourcesContent":["export type TitleProps = {\n title: string;\n subtitle: string;\n type: 'page' | 'form-group';\n 'data-name'?: string;\n titleSize: 'standard' | 'medium' | 'small';\n subtitleSize: 'standard' | 'small' | 'small-without-margin' | 'extra-small';\n};\n"],"mappings":""}
|
|
@@ -4,8 +4,10 @@
|
|
|
4
4
|
@value white from colors;
|
|
5
5
|
@value medium from colors;
|
|
6
6
|
@value cm_positive_100 from colors;
|
|
7
|
+
@value cm_positive_200 from colors;
|
|
7
8
|
@value cm_negative_50 from colors;
|
|
8
9
|
@value cm_negative_200 from colors;
|
|
10
|
+
@value cm_green_secondary_100 from colors;
|
|
9
11
|
@value cm_warning_50 from colors;
|
|
10
12
|
@value cm_yellow_100 from colors;
|
|
11
13
|
@value cm_yellow_200 from colors;
|
|
@@ -49,8 +51,8 @@
|
|
|
49
51
|
}
|
|
50
52
|
|
|
51
53
|
.banner.success {
|
|
52
|
-
background-color:
|
|
53
|
-
color:
|
|
54
|
+
background-color: cm_green_secondary_100;
|
|
55
|
+
color: cm_positive_200;
|
|
54
56
|
}
|
|
55
57
|
|
|
56
58
|
.temporaryBanner {
|
|
@@ -6,6 +6,7 @@ declare namespace BrandTabs {
|
|
|
6
6
|
tab: PropTypes.Requireable<PropTypes.InferProps<{
|
|
7
7
|
title: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
8
8
|
href: PropTypes.Requireable<string>;
|
|
9
|
+
status: PropTypes.Requireable<string>;
|
|
9
10
|
selected: PropTypes.Requireable<boolean>;
|
|
10
11
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
11
12
|
}>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/brand-tabs/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/brand-tabs/index.js"],"names":[],"mappings":";AAyCA,oDAMC"}
|
|
@@ -11,6 +11,8 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
11
11
|
|
|
12
12
|
var _link = _interopRequireDefault(require("../../atom/link"));
|
|
13
13
|
|
|
14
|
+
var _statusItem = _interopRequireDefault(require("../../atom/status-item"));
|
|
15
|
+
|
|
14
16
|
var _style = _interopRequireDefault(require("./style.css"));
|
|
15
17
|
|
|
16
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -23,6 +25,7 @@ const Tab = ({
|
|
|
23
25
|
const {
|
|
24
26
|
title,
|
|
25
27
|
href,
|
|
28
|
+
status,
|
|
26
29
|
selected,
|
|
27
30
|
onClick
|
|
28
31
|
} = tab;
|
|
@@ -36,13 +39,20 @@ const Tab = ({
|
|
|
36
39
|
onClick: onClick
|
|
37
40
|
}, /*#__PURE__*/_react.default.createElement(_link.default, {
|
|
38
41
|
href: href
|
|
39
|
-
}, title)
|
|
42
|
+
}, title), status ? /*#__PURE__*/_react.default.createElement("div", {
|
|
43
|
+
className: _style.default.statusItemWrapper
|
|
44
|
+
}, /*#__PURE__*/_react.default.createElement(_statusItem.default, {
|
|
45
|
+
icon: "no-answer",
|
|
46
|
+
value: status,
|
|
47
|
+
selected: selected
|
|
48
|
+
})) : null);
|
|
40
49
|
};
|
|
41
50
|
|
|
42
51
|
Tab.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
43
52
|
tab: _propTypes.default.shape({
|
|
44
53
|
title: _link.default.propTypes.children,
|
|
45
54
|
href: _link.default.propTypes.href,
|
|
55
|
+
status: _propTypes.default.string,
|
|
46
56
|
selected: _propTypes.default.bool,
|
|
47
57
|
onClick: _propTypes.default.func
|
|
48
58
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["Tab","tab","index","isLightTab","title","href","selected","onClick","selectedStyle","style","selectedlight","unselectedStyle","lighttab","className","propTypes","PropTypes","shape","Link","children","bool","func","number","BrandTabs","props","tabs","type","tabsList","map","lightwrapper","wrapper","arrayOf","oneOf"],"sources":["../../../src/molecule/brand-tabs/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {snakeCase} from 'lodash/fp';\nimport Link from '../../atom/link';\nimport style from './style.css';\n\nconst Tab = ({tab, index, isLightTab}) => {\n const {title, href, selected, onClick} = tab;\n const selectedStyle = isLightTab ? style.selectedlight : style.selected;\n const unselectedStyle = isLightTab ? style.lighttab : style.tab;\n const className = selected ? selectedStyle : unselectedStyle;\n\n return (\n <div\n data-name={`brand_tab_${snakeCase(title)}`}\n className={className}\n key={index}\n onClick={onClick}\n >\n <Link href={href}>{title}</Link>\n </div>\n );\n};\nTab.propTypes = {\n tab: PropTypes.shape({\n title: Link.propTypes.children,\n href: Link.propTypes.href,\n selected: PropTypes.bool,\n onClick: PropTypes.func\n }),\n index: PropTypes.number,\n isLightTab: PropTypes.bool\n};\n\nconst BrandTabs = props => {\n const {tabs, type = 'default'} = props;\n const isLightTab = type === 'light';\n const tabsList = tabs.map((tab, index) => Tab({tab, index, isLightTab}));\n\n return <div className={isLightTab ? style.lightwrapper : style.wrapper}>{tabsList}</div>;\n};\n\nBrandTabs.propTypes = {\n tabs: PropTypes.arrayOf(PropTypes.shape(Tab.propTypes)),\n type: PropTypes.oneOf(['default', 'light'])\n};\nexport default BrandTabs;\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;;;AAEA,MAAMA,GAAG,GAAG,CAAC;EAACC,GAAD;EAAMC,KAAN;EAAaC;AAAb,CAAD,KAA8B;EACxC,MAAM;IAACC,KAAD;IAAQC,IAAR;IAAcC,
|
|
1
|
+
{"version":3,"file":"index.js","names":["Tab","tab","index","isLightTab","title","href","status","selected","onClick","selectedStyle","style","selectedlight","unselectedStyle","lighttab","className","statusItemWrapper","propTypes","PropTypes","shape","Link","children","string","bool","func","number","BrandTabs","props","tabs","type","tabsList","map","lightwrapper","wrapper","arrayOf","oneOf"],"sources":["../../../src/molecule/brand-tabs/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {snakeCase} from 'lodash/fp';\nimport Link from '../../atom/link';\nimport StatusItem from '../../atom/status-item';\nimport style from './style.css';\n\nconst Tab = ({tab, index, isLightTab}) => {\n const {title, href, status, selected, onClick} = tab;\n const selectedStyle = isLightTab ? style.selectedlight : style.selected;\n const unselectedStyle = isLightTab ? style.lighttab : style.tab;\n const className = selected ? selectedStyle : unselectedStyle;\n\n return (\n <div\n data-name={`brand_tab_${snakeCase(title)}`}\n className={className}\n key={index}\n onClick={onClick}\n >\n <Link href={href}>{title}</Link>\n {status ? (\n <div className={style.statusItemWrapper}>\n <StatusItem icon=\"no-answer\" value={status} selected={selected} />\n </div>\n ) : null}\n </div>\n );\n};\nTab.propTypes = {\n tab: PropTypes.shape({\n title: Link.propTypes.children,\n href: Link.propTypes.href,\n status: PropTypes.string,\n selected: PropTypes.bool,\n onClick: PropTypes.func\n }),\n index: PropTypes.number,\n isLightTab: PropTypes.bool\n};\n\nconst BrandTabs = props => {\n const {tabs, type = 'default'} = props;\n const isLightTab = type === 'light';\n const tabsList = tabs.map((tab, index) => Tab({tab, index, isLightTab}));\n\n return <div className={isLightTab ? style.lightwrapper : style.wrapper}>{tabsList}</div>;\n};\n\nBrandTabs.propTypes = {\n tabs: PropTypes.arrayOf(PropTypes.shape(Tab.propTypes)),\n type: PropTypes.oneOf(['default', 'light'])\n};\nexport default BrandTabs;\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;;;AAEA,MAAMA,GAAG,GAAG,CAAC;EAACC,GAAD;EAAMC,KAAN;EAAaC;AAAb,CAAD,KAA8B;EACxC,MAAM;IAACC,KAAD;IAAQC,IAAR;IAAcC,MAAd;IAAsBC,QAAtB;IAAgCC;EAAhC,IAA2CP,GAAjD;EACA,MAAMQ,aAAa,GAAGN,UAAU,GAAGO,cAAA,CAAMC,aAAT,GAAyBD,cAAA,CAAMH,QAA/D;EACA,MAAMK,eAAe,GAAGT,UAAU,GAAGO,cAAA,CAAMG,QAAT,GAAoBH,cAAA,CAAMT,GAA5D;EACA,MAAMa,SAAS,GAAGP,QAAQ,GAAGE,aAAH,GAAmBG,eAA7C;EAEA,oBACE;IACE,aAAY,aAAY,yBAAUR,KAAV,CAAiB,EAD3C;IAEE,SAAS,EAAEU,SAFb;IAGE,GAAG,EAAEZ,KAHP;IAIE,OAAO,EAAEM;EAJX,gBAME,6BAAC,aAAD;IAAM,IAAI,EAAEH;EAAZ,GAAmBD,KAAnB,CANF,EAOGE,MAAM,gBACL;IAAK,SAAS,EAAEI,cAAA,CAAMK;EAAtB,gBACE,6BAAC,mBAAD;IAAY,IAAI,EAAC,WAAjB;IAA6B,KAAK,EAAET,MAApC;IAA4C,QAAQ,EAAEC;EAAtD,EADF,CADK,GAIH,IAXN,CADF;AAeD,CArBD;;AAsBAP,GAAG,CAACgB,SAAJ,2CAAgB;EACdf,GAAG,EAAEgB,kBAAA,CAAUC,KAAV,CAAgB;IACnBd,KAAK,EAAEe,aAAA,CAAKH,SAAL,CAAeI,QADH;IAEnBf,IAAI,EAAEc,aAAA,CAAKH,SAAL,CAAeX,IAFF;IAGnBC,MAAM,EAAEW,kBAAA,CAAUI,MAHC;IAInBd,QAAQ,EAAEU,kBAAA,CAAUK,IAJD;IAKnBd,OAAO,EAAES,kBAAA,CAAUM;EALA,CAAhB,CADS;EAQdrB,KAAK,EAAEe,kBAAA,CAAUO,MARH;EASdrB,UAAU,EAAEc,kBAAA,CAAUK;AATR,CAAhB;;AAYA,MAAMG,SAAS,GAAGC,KAAK,IAAI;EACzB,MAAM;IAACC,IAAD;IAAOC,IAAI,GAAG;EAAd,IAA2BF,KAAjC;EACA,MAAMvB,UAAU,GAAGyB,IAAI,KAAK,OAA5B;EACA,MAAMC,QAAQ,GAAGF,IAAI,CAACG,GAAL,CAAS,CAAC7B,GAAD,EAAMC,KAAN,KAAgBF,GAAG,CAAC;IAACC,GAAD;IAAMC,KAAN;IAAaC;EAAb,CAAD,CAA5B,CAAjB;EAEA,oBAAO;IAAK,SAAS,EAAEA,UAAU,GAAGO,cAAA,CAAMqB,YAAT,GAAwBrB,cAAA,CAAMsB;EAAxD,GAAkEH,QAAlE,CAAP;AACD,CAND;;AAQAJ,SAAS,CAACT,SAAV,2CAAsB;EACpBW,IAAI,EAAEV,kBAAA,CAAUgB,OAAV,CAAkBhB,kBAAA,CAAUC,KAAV,CAAgBlB,GAAG,CAACgB,SAApB,CAAlB,CADc;EAEpBY,IAAI,EAAEX,kBAAA,CAAUiB,KAAV,CAAgB,CAAC,SAAD,EAAY,OAAZ,CAAhB;AAFc,CAAtB;eAIeT,S"}
|
|
@@ -18,6 +18,12 @@
|
|
|
18
18
|
overflow-y: hidden;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
+
.statusItemWrapper {
|
|
22
|
+
margin-left: 8px;
|
|
23
|
+
width: 14px;
|
|
24
|
+
height: 16px;
|
|
25
|
+
}
|
|
26
|
+
|
|
21
27
|
.tab {
|
|
22
28
|
display: inline-block;
|
|
23
29
|
height: 100%;
|
|
@@ -29,13 +35,10 @@
|
|
|
29
35
|
}
|
|
30
36
|
|
|
31
37
|
.lighttab {
|
|
32
|
-
display: inline-block;
|
|
33
38
|
height: 36px;
|
|
34
|
-
width: auto;
|
|
35
39
|
display: flex;
|
|
36
|
-
flex-direction: column;
|
|
37
|
-
justify-content: center;
|
|
38
40
|
align-items: center;
|
|
41
|
+
justify-content: space-between;
|
|
39
42
|
padding: 8px 16px;
|
|
40
43
|
margin-right: 16px;
|
|
41
44
|
border-radius: 5px;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/bulk-progress-bar/index.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,KAAK,EAAoB,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/bulk-progress-bar/index.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,KAAK,EAAoB,MAAM,SAAS,CAAC;AAgCjD,QAAA,MAAM,eAAe;YAAW,KAAK;;;;;;CAepC,CAAC;AAIF,eAAe,eAAe,CAAC"}
|
|
@@ -28,9 +28,11 @@ const renderStatusIcon = (status, progress) => {
|
|
|
28
28
|
role: "status",
|
|
29
29
|
className: _style.default.progressText
|
|
30
30
|
}, `${progress} %`);
|
|
31
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
31
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
32
|
+
className: _style.default.statusItemWrapper
|
|
33
|
+
}, /*#__PURE__*/_react.default.createElement(_statusItem.default, {
|
|
32
34
|
icon: status === STATUS.fail ? 'invalid' : 'valid'
|
|
33
|
-
});
|
|
35
|
+
}));
|
|
34
36
|
};
|
|
35
37
|
|
|
36
38
|
const resolveProgressBarColor = status => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["cm_negative_100","cm_primary_blue","cm_positive_100","STATUS","inProgress","fail","renderStatusIcon","status","progress","style","progressText","resolveProgressBarColor","BulkProgressBar","props","dataName","container","progressBar","backgroundColor","borderRadius","propTypes"],"sources":["../../../src/molecule/bulk-progress-bar/index.tsx"],"sourcesContent":["import React from 'react';\nimport ProgressBar from '../progress-bar';\nimport StatusItem from '../../atom/status-item';\nimport style from './style.css';\nimport {Props, propTypes, Status} from './types';\n\nconst cm_negative_100 = '#ed3436';\nconst cm_primary_blue = '#0061FF';\nconst cm_positive_100 = '#35CC7F';\n\nconst STATUS = {\n inProgress: 'inProgress',\n fail: 'fail'\n};\n\nconst renderStatusIcon = (status: Status, progress: number) => {\n if (status === STATUS.inProgress)\n return <div role=\"status\" className={style.progressText}>{`${progress} %`}</div>;\n return <StatusItem icon={status === STATUS.fail ? 'invalid' : 'valid'}
|
|
1
|
+
{"version":3,"file":"index.js","names":["cm_negative_100","cm_primary_blue","cm_positive_100","STATUS","inProgress","fail","renderStatusIcon","status","progress","style","progressText","statusItemWrapper","resolveProgressBarColor","BulkProgressBar","props","dataName","container","progressBar","backgroundColor","borderRadius","propTypes"],"sources":["../../../src/molecule/bulk-progress-bar/index.tsx"],"sourcesContent":["import React from 'react';\nimport ProgressBar from '../progress-bar';\nimport StatusItem from '../../atom/status-item';\nimport style from './style.css';\nimport {Props, propTypes, Status} from './types';\n\nconst cm_negative_100 = '#ed3436';\nconst cm_primary_blue = '#0061FF';\nconst cm_positive_100 = '#35CC7F';\n\nconst STATUS = {\n inProgress: 'inProgress',\n fail: 'fail'\n};\n\nconst renderStatusIcon = (status: Status, progress: number) => {\n if (status === STATUS.inProgress)\n return <div role=\"status\" className={style.progressText}>{`${progress} %`}</div>;\n return (\n <div className={style.statusItemWrapper}>\n <StatusItem icon={status === STATUS.fail ? 'invalid' : 'valid'} />\n </div>\n );\n};\n\nconst resolveProgressBarColor = (status: Status) => {\n switch (status) {\n case STATUS.fail:\n return cm_negative_100;\n case STATUS.inProgress:\n return cm_primary_blue;\n default:\n return cm_positive_100;\n }\n};\n\nconst BulkProgressBar = (props: Props) => {\n const {'data-name': dataName, status, progress} = props;\n\n return (\n <div className={style.container} data-name={dataName}>\n <ProgressBar\n className={style.progressBar}\n value={progress}\n max={100}\n steps={0}\n style={{backgroundColor: resolveProgressBarColor(status), borderRadius: '10px'}}\n />\n {renderStatusIcon(status, progress)}\n </div>\n );\n};\n\nBulkProgressBar.propTypes = propTypes;\n\nexport default BulkProgressBar;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,MAAMA,eAAe,GAAG,SAAxB;AACA,MAAMC,eAAe,GAAG,SAAxB;AACA,MAAMC,eAAe,GAAG,SAAxB;AAEA,MAAMC,MAAM,GAAG;EACbC,UAAU,EAAE,YADC;EAEbC,IAAI,EAAE;AAFO,CAAf;;AAKA,MAAMC,gBAAgB,GAAG,CAACC,MAAD,EAAiBC,QAAjB,KAAsC;EAC7D,IAAID,MAAM,KAAKJ,MAAM,CAACC,UAAtB,EACE,oBAAO;IAAK,IAAI,EAAC,QAAV;IAAmB,SAAS,EAAEK,cAAA,CAAMC;EAApC,GAAoD,GAAEF,QAAS,IAA/D,CAAP;EACF,oBACE;IAAK,SAAS,EAAEC,cAAA,CAAME;EAAtB,gBACE,6BAAC,mBAAD;IAAY,IAAI,EAAEJ,MAAM,KAAKJ,MAAM,CAACE,IAAlB,GAAyB,SAAzB,GAAqC;EAAvD,EADF,CADF;AAKD,CARD;;AAUA,MAAMO,uBAAuB,GAAIL,MAAD,IAAoB;EAClD,QAAQA,MAAR;IACE,KAAKJ,MAAM,CAACE,IAAZ;MACE,OAAOL,eAAP;;IACF,KAAKG,MAAM,CAACC,UAAZ;MACE,OAAOH,eAAP;;IACF;MACE,OAAOC,eAAP;EANJ;AAQD,CATD;;AAWA,MAAMW,eAAe,GAAIC,KAAD,IAAkB;EACxC,MAAM;IAAC,aAAaC,QAAd;IAAwBR,MAAxB;IAAgCC;EAAhC,IAA4CM,KAAlD;EAEA,oBACE;IAAK,SAAS,EAAEL,cAAA,CAAMO,SAAtB;IAAiC,aAAWD;EAA5C,gBACE,6BAAC,oBAAD;IACE,SAAS,EAAEN,cAAA,CAAMQ,WADnB;IAEE,KAAK,EAAET,QAFT;IAGE,GAAG,EAAE,GAHP;IAIE,KAAK,EAAE,CAJT;IAKE,KAAK,EAAE;MAACU,eAAe,EAAEN,uBAAuB,CAACL,MAAD,CAAzC;MAAmDY,YAAY,EAAE;IAAjE;EALT,EADF,EAQGb,gBAAgB,CAACC,MAAD,EAASC,QAAT,CARnB,CADF;AAYD,CAfD;;AAiBAK,eAAe,CAACO,SAAhB,2CAA4BA,gBAA5B;eAEeP,e"}
|
|
@@ -3,7 +3,60 @@ export namespace THEMES {
|
|
|
3
3
|
export { _default as default };
|
|
4
4
|
export const coorpmanager: any;
|
|
5
5
|
}
|
|
6
|
+
export const cardPropTypes: {
|
|
7
|
+
badge: PropTypes.Requireable<string>;
|
|
8
|
+
image: PropTypes.Requireable<string>;
|
|
9
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
10
|
+
adaptiv: PropTypes.Requireable<boolean>;
|
|
11
|
+
type: PropTypes.Requireable<string>;
|
|
12
|
+
title: PropTypes.Requireable<string>;
|
|
13
|
+
author: PropTypes.Requireable<string>;
|
|
14
|
+
certifiedAuthor: PropTypes.Requireable<boolean>;
|
|
15
|
+
customer: PropTypes.Requireable<PropTypes.InferProps<{
|
|
16
|
+
theme: PropTypes.Requireable<string>;
|
|
17
|
+
type: PropTypes.Requireable<string>;
|
|
18
|
+
name: PropTypes.Requireable<string>;
|
|
19
|
+
coorpOriginal: PropTypes.Validator<boolean>;
|
|
20
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
21
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
22
|
+
}>>;
|
|
23
|
+
progress: PropTypes.Requireable<number>;
|
|
24
|
+
favorite: PropTypes.Requireable<boolean>;
|
|
25
|
+
addFavoriteToolTip: PropTypes.Requireable<string>;
|
|
26
|
+
removeFavoriteToolTip: PropTypes.Requireable<string>;
|
|
27
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
28
|
+
onFavoriteClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
29
|
+
isSelected: PropTypes.Requireable<boolean>;
|
|
30
|
+
notification: PropTypes.Requireable<PropTypes.InferProps<{
|
|
31
|
+
message: PropTypes.Validator<string>;
|
|
32
|
+
icon: PropTypes.Validator<string>;
|
|
33
|
+
}>>;
|
|
34
|
+
badgeCategory: PropTypes.Requireable<string>;
|
|
35
|
+
badgeLabel: PropTypes.Requireable<string>;
|
|
36
|
+
theme: PropTypes.Requireable<string>;
|
|
37
|
+
disabledContent: PropTypes.Requireable<string>;
|
|
38
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
39
|
+
'background-aria-label': PropTypes.Requireable<string>;
|
|
40
|
+
'favorite-aria-label': PropTypes.Requireable<PropTypes.InferProps<{
|
|
41
|
+
favorite: PropTypes.Requireable<string>;
|
|
42
|
+
addToFavorite: PropTypes.Requireable<string>;
|
|
43
|
+
removeFromFavorite: PropTypes.Requireable<string>;
|
|
44
|
+
}>>;
|
|
45
|
+
'selectable-aria-label': PropTypes.Requireable<PropTypes.InferProps<{
|
|
46
|
+
select: PropTypes.Requireable<string>;
|
|
47
|
+
unSelect: PropTypes.Requireable<string>;
|
|
48
|
+
}>>;
|
|
49
|
+
'customer-aria-label': PropTypes.Requireable<string>;
|
|
50
|
+
'badge-aria-label': PropTypes.Requireable<string>;
|
|
51
|
+
'disabled-aria-label': PropTypes.Requireable<string>;
|
|
52
|
+
'card-content-aria-label': PropTypes.Requireable<PropTypes.InferProps<{
|
|
53
|
+
author: PropTypes.Requireable<string>;
|
|
54
|
+
progression: PropTypes.Requireable<string>;
|
|
55
|
+
adaptive: PropTypes.Requireable<string>;
|
|
56
|
+
}>>;
|
|
57
|
+
};
|
|
6
58
|
export default Card;
|
|
59
|
+
import PropTypes from "prop-types";
|
|
7
60
|
declare const Card: React.NamedExoticComponent<object>;
|
|
8
61
|
import React from "react";
|
|
9
62
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/card/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/card/index.js"],"names":[],"mappings":";;;;;AAuPA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8BE;;;AA9JF,uDA0HG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
|
-
exports.default = exports.THEMES = void 0;
|
|
4
|
+
exports.default = exports.cardPropTypes = exports.THEMES = void 0;
|
|
5
5
|
|
|
6
6
|
var _keys2 = _interopRequireDefault(require("lodash/fp/keys"));
|
|
7
7
|
|
|
@@ -161,6 +161,7 @@ const Card = /*#__PURE__*/(0, _react.memo)(function Card(props, context) {
|
|
|
161
161
|
badgeCategory,
|
|
162
162
|
badgeLabel,
|
|
163
163
|
theme = 'default',
|
|
164
|
+
disabledContent,
|
|
164
165
|
'aria-label': cardArialabel,
|
|
165
166
|
'background-aria-label': backgroundAriaLabel,
|
|
166
167
|
'favorite-aria-label': favoriteAriaLabel,
|
|
@@ -172,17 +173,17 @@ const Card = /*#__PURE__*/(0, _react.memo)(function Card(props, context) {
|
|
|
172
173
|
} = props;
|
|
173
174
|
const empty = (0, _isEmpty2.default)((0, _pick2.default)(['title', 'type', 'author', 'image'], props));
|
|
174
175
|
const primaryColor = (0, _get2.default)('common.primary', skin);
|
|
175
|
-
const whiteColor = (0, _get2.default)('common.white', skin);
|
|
176
176
|
const cardStyle = (0, _classnames.default)(THEMES[theme], type === 'chapter' ? _style.default.chapter : _style.default.course, title ? null : _style.default.lazy, _style.default.grid, empty ? _style.default.empty : null);
|
|
177
177
|
const disabled = hidden && (!isSelected || (0, _isUndefined2.default)(isSelected));
|
|
178
|
-
const handleClick = (0, _react.useMemo)(() => e =>
|
|
179
|
-
const lock = disabled ? /*#__PURE__*/_react.default.createElement(
|
|
178
|
+
const handleClick = (0, _react.useMemo)(() => e => onClick(e), [onClick]);
|
|
179
|
+
const lock = disabled ? /*#__PURE__*/_react.default.createElement("div", {
|
|
180
|
+
className: _style.default.lockContent
|
|
181
|
+
}, /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionCoorpacademyPadlock, {
|
|
180
182
|
className: _style.default.lockIcon,
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
}) : null;
|
|
183
|
+
height: 48
|
|
184
|
+
}), /*#__PURE__*/_react.default.createElement("span", {
|
|
185
|
+
"aria-label": disabledArialabel
|
|
186
|
+
}, disabledContent)) : null;
|
|
186
187
|
const inlineBadgeStyle = {
|
|
187
188
|
color: primaryColor
|
|
188
189
|
};
|
|
@@ -256,7 +257,7 @@ const Card = /*#__PURE__*/(0, _react.memo)(function Card(props, context) {
|
|
|
256
257
|
Card.contextTypes = {
|
|
257
258
|
skin: _provider.default.childContextTypes.skin
|
|
258
259
|
};
|
|
259
|
-
|
|
260
|
+
const cardPropTypes = {
|
|
260
261
|
badge: _propTypes.default.string,
|
|
261
262
|
image: _propTypes.default.string,
|
|
262
263
|
disabled: _propTypes.default.bool,
|
|
@@ -277,6 +278,7 @@ Card.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
277
278
|
badgeCategory: _cardContent.default.propTypes.badgeCategory,
|
|
278
279
|
badgeLabel: _cardContent.default.propTypes.badgeLabel,
|
|
279
280
|
theme: _propTypes.default.oneOf((0, _keys2.default)(THEMES)),
|
|
281
|
+
disabledContent: _propTypes.default.string,
|
|
280
282
|
'aria-label': _propTypes.default.string,
|
|
281
283
|
'background-aria-label': _propTypes.default.string,
|
|
282
284
|
'favorite-aria-label': _favorite.default.propTypes['aria-label'],
|
|
@@ -285,7 +287,9 @@ Card.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
285
287
|
'badge-aria-label': _propTypes.default.string,
|
|
286
288
|
'disabled-aria-label': _propTypes.default.string,
|
|
287
289
|
'card-content-aria-label': _cardContent.default.propTypes['aria-label']
|
|
288
|
-
}
|
|
290
|
+
};
|
|
291
|
+
exports.cardPropTypes = cardPropTypes;
|
|
292
|
+
Card.propTypes = process.env.NODE_ENV !== "production" ? cardPropTypes : {};
|
|
289
293
|
var _default = Card;
|
|
290
294
|
exports.default = _default;
|
|
291
295
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["THEMES","default","coorpmanager","style","CardBackground","type","image","empty","ariaLabel","skin","externalContent","isExternalContent","primaryColor","whiteColor","EXTERNAL_CONTENT_ICONS","IconType","icon","iconColor","color","backgroundIcon","externalIconCircleWrapper","externalIcon","_backgroundIcon","classnames","externalIconCircleWithImageWrapper","backgroundColor","externalIconWithImage","imageWrapper","backgroundImage","externalContentHeader","externalBackground","emptyIcon","chapterImageWrapper","contextTypes","Provider","childContextTypes","propTypes","PropTypes","string","bool","Card","memo","props","context","badge","adaptiv","disabled","hidden","title","author","customer","certifiedAuthor","progress","favorite","addFavoriteToolTip","removeFavoriteToolTip","onClick","onFavoriteClick","isSelected","notification","badgeCategory","badgeLabel","theme","cardArialabel","backgroundAriaLabel","favoriteAriaLabel","selectableAriaLabel","customerAriaLabel","badgeAriaLabel","disabledArialabel","cardContentLabelAriaLabel","cardStyle","chapter","course","lazy","grid","handleClick","useMemo","e","lock","lockIcon","inlineBadgeStyle","getType","contentType","MODES","CARD","lockWrapper","shape","Customer","number","func","Notification","CardContentInfo","oneOf","Favorite","Selectable"],"sources":["../../../src/molecule/card/index.js"],"sourcesContent":["import React, {useMemo, memo} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {get, isEmpty, isUndefined, pick, keys} from 'lodash/fp';\nimport {\n NovaSolidLoginLocked as LockIcon,\n NovaCompositionCoorpacademyPictures as PicturesIcon\n} from '@coorpacademy/nova-icons';\nimport {isExternalContent, EXTERNAL_CONTENT_ICONS} from '../../util/external-content';\nimport Provider from '../../atom/provider';\nimport CardContentInfo, {MODES} from '../card-content';\nimport Customer from './customer';\nimport Favorite from './favorite';\nimport Selectable from './selectable';\nimport Notification from './notification';\nimport style from './style.css';\n\nexport const THEMES = {\n default: null,\n coorpmanager: style.coorpmanager\n};\n\nconst CardBackground = ({type, image, empty, 'aria-label': ariaLabel}, {skin}) => {\n const externalContent = isExternalContent(type);\n const primaryColor = get('common.primary', skin);\n const whiteColor = get('common.white', skin);\n\n if (externalContent && EXTERNAL_CONTENT_ICONS[type]) {\n const IconType = EXTERNAL_CONTENT_ICONS[type].icon;\n const iconColor = EXTERNAL_CONTENT_ICONS[type].color;\n const backgroundIcon = (\n <div className={style.externalIconCircleWrapper}>\n <IconType className={style.externalIcon} />\n </div>\n );\n\n if (image) {\n const _backgroundIcon = (\n <div\n className={classnames(\n style.externalIconCircleWrapper,\n style.externalIconCircleWithImageWrapper\n )}\n style={{\n backgroundColor: iconColor\n }}\n >\n <IconType className={style.externalIconWithImage} />\n </div>\n );\n\n return (\n <div className={style.imageWrapper}>\n <div\n data-name=\"cover\"\n aria-label={ariaLabel}\n style={{\n backgroundColor: iconColor,\n backgroundImage: `url('${image}')`\n }}\n className={classnames(style.externalContentHeader, style.externalBackground)}\n >\n {_backgroundIcon}\n </div>\n </div>\n );\n }\n return (\n <div className={style.imageWrapper}>\n <div\n data-name=\"cover\"\n aria-label={ariaLabel}\n style={{\n backgroundColor: iconColor\n }}\n className={style.externalContentHeader}\n >\n {backgroundIcon}\n </div>\n </div>\n );\n }\n\n const emptyIcon = empty ? (\n <PicturesIcon className={style.emptyIcon} style={{color: whiteColor}} />\n ) : null;\n return (\n <div\n className={classnames(\n style.imageWrapper,\n type === 'chapter' ? style.chapterImageWrapper : null\n )}\n >\n <div\n data-name=\"cover\"\n aria-label={ariaLabel}\n className={style.image}\n style={{\n backgroundColor: primaryColor,\n backgroundImage: image ? `url('${image}')` : 'none'\n }}\n >\n {emptyIcon}\n </div>\n </div>\n );\n};\n\nCardBackground.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nCardBackground.propTypes = {\n type: PropTypes.string,\n image: PropTypes.string,\n empty: PropTypes.bool,\n 'aria-label': PropTypes.string\n};\n\nconst Card = memo(function Card(props, context) {\n const {skin} = context;\n const {\n image,\n badge,\n adaptiv,\n disabled: hidden = false,\n type = 'course',\n title,\n author,\n customer,\n certifiedAuthor,\n progress,\n favorite,\n addFavoriteToolTip,\n removeFavoriteToolTip,\n onClick,\n onFavoriteClick,\n isSelected,\n notification,\n badgeCategory,\n badgeLabel,\n theme = 'default',\n 'aria-label': cardArialabel,\n 'background-aria-label': backgroundAriaLabel,\n 'favorite-aria-label': favoriteAriaLabel,\n 'selectable-aria-label': selectableAriaLabel,\n 'customer-aria-label': customerAriaLabel,\n 'badge-aria-label': badgeAriaLabel,\n 'disabled-aria-label': disabledArialabel,\n 'card-content-aria-label': cardContentLabelAriaLabel\n } = props;\n const empty = isEmpty(pick(['title', 'type', 'author', 'image'], props));\n const primaryColor = get('common.primary', skin);\n const whiteColor = get('common.white', skin);\n const cardStyle = classnames(\n THEMES[theme],\n type === 'chapter' ? style.chapter : style.course,\n title ? null : style.lazy,\n style.grid,\n empty ? style.empty : null\n );\n const disabled = hidden && (!isSelected || isUndefined(isSelected));\n const handleClick = useMemo(() => e => !disabled && onClick(e), [disabled, onClick]);\n const lock = disabled ? (\n <LockIcon className={style.lockIcon} style={{color: whiteColor}} height={40} />\n ) : null;\n const inlineBadgeStyle = {color: primaryColor};\n const getType = contentType => {\n switch (contentType) {\n case 'chapter':\n return 'microlearning';\n case 'course':\n return 'learner';\n default:\n return contentType;\n }\n };\n\n return (\n <div\n className={cardStyle}\n data-name=\"card\"\n data-lock={disabled}\n data-type={getType(type)}\n disabled={disabled}\n onClick={handleClick}\n aria-label={cardArialabel}\n >\n <CardBackground type={type} image={image} empty={empty} aria-label={backgroundAriaLabel} />\n {isUndefined(isSelected) && !isUndefined(favorite) ? (\n <Favorite\n className={style.favorite}\n favorite={favorite}\n disabled={disabled}\n onFavoriteClick={onFavoriteClick}\n addFavoriteToolTip={addFavoriteToolTip}\n removeFavoriteToolTip={removeFavoriteToolTip}\n aria-label={favoriteAriaLabel}\n />\n ) : null}\n <Selectable isSelected={isSelected} hidden={hidden} aria-label={selectableAriaLabel} />\n {notification ? <Notification {...notification} /> : null}\n {customer ? (\n <Customer\n {...customer}\n theme={theme}\n type={type}\n disabled={disabled}\n aria-label={customerAriaLabel}\n />\n ) : null}\n <CardContentInfo\n mode={MODES.CARD}\n adaptiv={adaptiv}\n author={author}\n certifiedAuthor={certifiedAuthor}\n disabled={disabled}\n empty={empty}\n progress={progress}\n title={title}\n type={type}\n badgeCategory={badgeCategory}\n badgeLabel={badgeLabel}\n theme={theme}\n aria-label={cardContentLabelAriaLabel}\n />\n {badge ? (\n <div className={style.badge} style={inlineBadgeStyle} aria-label={badgeAriaLabel}>\n {badge}\n </div>\n ) : null}\n {disabled ? (\n <div className={style.lockWrapper} aria-label={disabledArialabel}>\n {lock}\n </div>\n ) : null}\n </div>\n );\n});\n\nCard.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nCard.propTypes = {\n badge: PropTypes.string,\n image: PropTypes.string,\n disabled: PropTypes.bool,\n adaptiv: PropTypes.bool,\n type: PropTypes.string,\n title: PropTypes.string,\n author: PropTypes.string,\n certifiedAuthor: PropTypes.bool,\n customer: PropTypes.shape(Customer.propTypes),\n progress: PropTypes.number,\n favorite: PropTypes.bool,\n addFavoriteToolTip: PropTypes.string,\n removeFavoriteToolTip: PropTypes.string,\n onClick: PropTypes.func,\n onFavoriteClick: PropTypes.func,\n isSelected: PropTypes.bool,\n notification: PropTypes.shape(Notification.propTypes),\n badgeCategory: CardContentInfo.propTypes.badgeCategory,\n badgeLabel: CardContentInfo.propTypes.badgeLabel,\n theme: PropTypes.oneOf(keys(THEMES)),\n 'aria-label': PropTypes.string,\n 'background-aria-label': PropTypes.string,\n 'favorite-aria-label': Favorite.propTypes['aria-label'],\n 'selectable-aria-label': Selectable.propTypes['aria-label'],\n 'customer-aria-label': Customer.propTypes['aria-label'],\n 'badge-aria-label': PropTypes.string,\n 'disabled-aria-label': PropTypes.string,\n 'card-content-aria-label': CardContentInfo.propTypes['aria-label']\n};\nexport default Card;\n"],"mappings":";;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AAIA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEO,MAAMA,MAAM,GAAG;EACpBC,OAAO,EAAE,IADW;EAEpBC,YAAY,EAAEC,cAAA,CAAMD;AAFA,CAAf;;;AAKP,MAAME,cAAc,GAAG,CAAC;EAACC,IAAD;EAAOC,KAAP;EAAcC,KAAd;EAAqB,cAAcC;AAAnC,CAAD,EAAgD;EAACC;AAAD,CAAhD,KAA2D;EAChF,MAAMC,eAAe,GAAG,IAAAC,kCAAA,EAAkBN,IAAlB,CAAxB;EACA,MAAMO,YAAY,GAAG,mBAAI,gBAAJ,EAAsBH,IAAtB,CAArB;EACA,MAAMI,UAAU,GAAG,mBAAI,cAAJ,EAAoBJ,IAApB,CAAnB;;EAEA,IAAIC,eAAe,IAAII,uCAAA,CAAuBT,IAAvB,CAAvB,EAAqD;IACnD,MAAMU,QAAQ,GAAGD,uCAAA,CAAuBT,IAAvB,EAA6BW,IAA9C;IACA,MAAMC,SAAS,GAAGH,uCAAA,CAAuBT,IAAvB,EAA6Ba,KAA/C;;IACA,MAAMC,cAAc,gBAClB;MAAK,SAAS,EAAEhB,cAAA,CAAMiB;IAAtB,gBACE,6BAAC,QAAD;MAAU,SAAS,EAAEjB,cAAA,CAAMkB;IAA3B,EADF,CADF;;IAMA,IAAIf,KAAJ,EAAW;MACT,MAAMgB,eAAe,gBACnB;QACE,SAAS,EAAE,IAAAC,mBAAA,EACTpB,cAAA,CAAMiB,yBADG,EAETjB,cAAA,CAAMqB,kCAFG,CADb;QAKE,KAAK,EAAE;UACLC,eAAe,EAAER;QADZ;MALT,gBASE,6BAAC,QAAD;QAAU,SAAS,EAAEd,cAAA,C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,MArBT;EAsBf,yBAAyBD,kBAAA,CAAUC,MAtBpB;EAuBf,uBAAuBwD,iBAAA,CAAS1D,SAAT,CAAmB,YAAnB,CAvBR;EAwBf,yBAAyB2D,mBAAA,CAAW3D,SAAX,CAAqB,YAArB,CAxBV;EAyBf,uBAAuBoD,iBAAA,CAASpD,SAAT,CAAmB,YAAnB,CAzBR;EA0Bf,oBAAoBC,kBAAA,CAAUC,MA1Bf;EA2Bf,uBAAuBD,kBAAA,CAAUC,MA3BlB;EA4Bf,2BAA2BsD,oBAAA,CAAgBxD,SAAhB,CAA0B,YAA1B;AA5BZ,CAAjB;eA8BeI,I"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["THEMES","default","coorpmanager","style","CardBackground","type","image","empty","ariaLabel","skin","externalContent","isExternalContent","primaryColor","whiteColor","EXTERNAL_CONTENT_ICONS","IconType","icon","iconColor","color","backgroundIcon","externalIconCircleWrapper","externalIcon","_backgroundIcon","classnames","externalIconCircleWithImageWrapper","backgroundColor","externalIconWithImage","imageWrapper","backgroundImage","externalContentHeader","externalBackground","emptyIcon","chapterImageWrapper","contextTypes","Provider","childContextTypes","propTypes","PropTypes","string","bool","Card","memo","props","context","badge","adaptiv","disabled","hidden","title","author","customer","certifiedAuthor","progress","favorite","addFavoriteToolTip","removeFavoriteToolTip","onClick","onFavoriteClick","isSelected","notification","badgeCategory","badgeLabel","theme","disabledContent","cardArialabel","backgroundAriaLabel","favoriteAriaLabel","selectableAriaLabel","customerAriaLabel","badgeAriaLabel","disabledArialabel","cardContentLabelAriaLabel","cardStyle","chapter","course","lazy","grid","handleClick","useMemo","e","lock","lockContent","lockIcon","inlineBadgeStyle","getType","contentType","MODES","CARD","lockWrapper","cardPropTypes","shape","Customer","number","func","Notification","CardContentInfo","oneOf","Favorite","Selectable"],"sources":["../../../src/molecule/card/index.js"],"sourcesContent":["import React, {useMemo, memo} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {get, isEmpty, isUndefined, pick, keys} from 'lodash/fp';\nimport {\n NovaCompositionCoorpacademyPadlock as LockIcon,\n NovaCompositionCoorpacademyPictures as PicturesIcon\n} from '@coorpacademy/nova-icons';\nimport {isExternalContent, EXTERNAL_CONTENT_ICONS} from '../../util/external-content';\nimport Provider from '../../atom/provider';\nimport CardContentInfo, {MODES} from '../card-content';\nimport Customer from './customer';\nimport Favorite from './favorite';\nimport Selectable from './selectable';\nimport Notification from './notification';\nimport style from './style.css';\n\nexport const THEMES = {\n default: null,\n coorpmanager: style.coorpmanager\n};\n\nconst CardBackground = ({type, image, empty, 'aria-label': ariaLabel}, {skin}) => {\n const externalContent = isExternalContent(type);\n const primaryColor = get('common.primary', skin);\n const whiteColor = get('common.white', skin);\n\n if (externalContent && EXTERNAL_CONTENT_ICONS[type]) {\n const IconType = EXTERNAL_CONTENT_ICONS[type].icon;\n const iconColor = EXTERNAL_CONTENT_ICONS[type].color;\n const backgroundIcon = (\n <div className={style.externalIconCircleWrapper}>\n <IconType className={style.externalIcon} />\n </div>\n );\n\n if (image) {\n const _backgroundIcon = (\n <div\n className={classnames(\n style.externalIconCircleWrapper,\n style.externalIconCircleWithImageWrapper\n )}\n style={{\n backgroundColor: iconColor\n }}\n >\n <IconType className={style.externalIconWithImage} />\n </div>\n );\n\n return (\n <div className={style.imageWrapper}>\n <div\n data-name=\"cover\"\n aria-label={ariaLabel}\n style={{\n backgroundColor: iconColor,\n backgroundImage: `url('${image}')`\n }}\n className={classnames(style.externalContentHeader, style.externalBackground)}\n >\n {_backgroundIcon}\n </div>\n </div>\n );\n }\n return (\n <div className={style.imageWrapper}>\n <div\n data-name=\"cover\"\n aria-label={ariaLabel}\n style={{\n backgroundColor: iconColor\n }}\n className={style.externalContentHeader}\n >\n {backgroundIcon}\n </div>\n </div>\n );\n }\n\n const emptyIcon = empty ? (\n <PicturesIcon className={style.emptyIcon} style={{color: whiteColor}} />\n ) : null;\n return (\n <div\n className={classnames(\n style.imageWrapper,\n type === 'chapter' ? style.chapterImageWrapper : null\n )}\n >\n <div\n data-name=\"cover\"\n aria-label={ariaLabel}\n className={style.image}\n style={{\n backgroundColor: primaryColor,\n backgroundImage: image ? `url('${image}')` : 'none'\n }}\n >\n {emptyIcon}\n </div>\n </div>\n );\n};\n\nCardBackground.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nCardBackground.propTypes = {\n type: PropTypes.string,\n image: PropTypes.string,\n empty: PropTypes.bool,\n 'aria-label': PropTypes.string\n};\n\nconst Card = memo(function Card(props, context) {\n const {skin} = context;\n const {\n image,\n badge,\n adaptiv,\n disabled: hidden = false,\n type = 'course',\n title,\n author,\n customer,\n certifiedAuthor,\n progress,\n favorite,\n addFavoriteToolTip,\n removeFavoriteToolTip,\n onClick,\n onFavoriteClick,\n isSelected,\n notification,\n badgeCategory,\n badgeLabel,\n theme = 'default',\n disabledContent,\n 'aria-label': cardArialabel,\n 'background-aria-label': backgroundAriaLabel,\n 'favorite-aria-label': favoriteAriaLabel,\n 'selectable-aria-label': selectableAriaLabel,\n 'customer-aria-label': customerAriaLabel,\n 'badge-aria-label': badgeAriaLabel,\n 'disabled-aria-label': disabledArialabel,\n 'card-content-aria-label': cardContentLabelAriaLabel\n } = props;\n const empty = isEmpty(pick(['title', 'type', 'author', 'image'], props));\n const primaryColor = get('common.primary', skin);\n const cardStyle = classnames(\n THEMES[theme],\n type === 'chapter' ? style.chapter : style.course,\n title ? null : style.lazy,\n style.grid,\n empty ? style.empty : null\n );\n const disabled = hidden && (!isSelected || isUndefined(isSelected));\n const handleClick = useMemo(() => e => onClick(e), [onClick]);\n const lock = disabled ? (\n <div className={style.lockContent}>\n <LockIcon className={style.lockIcon} height={48} />\n <span aria-label={disabledArialabel}>{disabledContent}</span>\n </div>\n ) : null;\n const inlineBadgeStyle = {color: primaryColor};\n const getType = contentType => {\n switch (contentType) {\n case 'chapter':\n return 'microlearning';\n case 'course':\n return 'learner';\n default:\n return contentType;\n }\n };\n\n return (\n <div\n className={cardStyle}\n data-name=\"card\"\n data-lock={disabled}\n data-type={getType(type)}\n disabled={disabled}\n onClick={handleClick}\n aria-label={cardArialabel}\n >\n <CardBackground type={type} image={image} empty={empty} aria-label={backgroundAriaLabel} />\n {isUndefined(isSelected) && !isUndefined(favorite) ? (\n <Favorite\n className={style.favorite}\n favorite={favorite}\n disabled={disabled}\n onFavoriteClick={onFavoriteClick}\n addFavoriteToolTip={addFavoriteToolTip}\n removeFavoriteToolTip={removeFavoriteToolTip}\n aria-label={favoriteAriaLabel}\n />\n ) : null}\n <Selectable isSelected={isSelected} hidden={hidden} aria-label={selectableAriaLabel} />\n {notification ? <Notification {...notification} /> : null}\n {customer ? (\n <Customer\n {...customer}\n theme={theme}\n type={type}\n disabled={disabled}\n aria-label={customerAriaLabel}\n />\n ) : null}\n <CardContentInfo\n mode={MODES.CARD}\n adaptiv={adaptiv}\n author={author}\n certifiedAuthor={certifiedAuthor}\n disabled={disabled}\n empty={empty}\n progress={progress}\n title={title}\n type={type}\n badgeCategory={badgeCategory}\n badgeLabel={badgeLabel}\n theme={theme}\n aria-label={cardContentLabelAriaLabel}\n />\n {badge ? (\n <div className={style.badge} style={inlineBadgeStyle} aria-label={badgeAriaLabel}>\n {badge}\n </div>\n ) : null}\n {disabled ? (\n <div className={style.lockWrapper} aria-label={disabledArialabel}>\n {lock}\n </div>\n ) : null}\n </div>\n );\n});\n\nCard.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nexport const cardPropTypes = {\n badge: PropTypes.string,\n image: PropTypes.string,\n disabled: PropTypes.bool,\n adaptiv: PropTypes.bool,\n type: PropTypes.string,\n title: PropTypes.string,\n author: PropTypes.string,\n certifiedAuthor: PropTypes.bool,\n customer: PropTypes.shape(Customer.propTypes),\n progress: PropTypes.number,\n favorite: PropTypes.bool,\n addFavoriteToolTip: PropTypes.string,\n removeFavoriteToolTip: PropTypes.string,\n onClick: PropTypes.func,\n onFavoriteClick: PropTypes.func,\n isSelected: PropTypes.bool,\n notification: PropTypes.shape(Notification.propTypes),\n badgeCategory: CardContentInfo.propTypes.badgeCategory,\n badgeLabel: CardContentInfo.propTypes.badgeLabel,\n theme: PropTypes.oneOf(keys(THEMES)),\n disabledContent: PropTypes.string,\n 'aria-label': PropTypes.string,\n 'background-aria-label': PropTypes.string,\n 'favorite-aria-label': Favorite.propTypes['aria-label'],\n 'selectable-aria-label': Selectable.propTypes['aria-label'],\n 'customer-aria-label': Customer.propTypes['aria-label'],\n 'badge-aria-label': PropTypes.string,\n 'disabled-aria-label': PropTypes.string,\n 'card-content-aria-label': CardContentInfo.propTypes['aria-label']\n};\n\nCard.propTypes = cardPropTypes;\n\nexport default Card;\n"],"mappings":";;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AAIA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEO,MAAMA,MAAM,GAAG;EACpBC,OAAO,EAAE,IADW;EAEpBC,YAAY,EAAEC,cAAA,CAAMD;AAFA,CAAf;;;AAKP,MAAME,cAAc,GAAG,CAAC;EAACC,IAAD;EAAOC,KAAP;EAAcC,KAAd;EAAqB,cAAcC;AAAnC,CAAD,EAAgD;EAACC;AAAD,CAAhD,KAA2D;EAChF,MAAMC,eAAe,GAAG,IAAAC,kCAAA,EAAkBN,IAAlB,CAAxB;EACA,MAAMO,YAAY,GAAG,mBAAI,gBAAJ,EAAsBH,IAAtB,CAArB;EACA,MAAMI,UAAU,GAAG,mBAAI,cAAJ,EAAoBJ,IAApB,CAAnB;;EAEA,IAAIC,eAAe,IAAII,uCAAA,CAAuBT,IAAvB,CAAvB,EAAqD;IACnD,MAAMU,QAAQ,GAAGD,uCAAA,CAAuBT,IAAvB,EAA6BW,IAA9C;IACA,MAAMC,SAAS,GAAGH,uCAAA,CAAuBT,IAAvB,EAA6Ba,KAA/C;;IACA,MAAMC,cAAc,gBAClB;MAAK,SAAS,EAAEhB,cAAA,CAAMiB;IAAtB,gBACE,6BAAC,QAAD;MAAU,SAAS,EAAEjB,cAAA,CAAM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