@coorpacademy/components 11.32.19 → 11.32.20-alpha.32
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-link/index.d.ts +2 -0
- package/es/atom/button-link/index.d.ts.map +1 -1
- package/es/atom/button-link/index.js +22 -8
- package/es/atom/button-link/index.js.map +1 -1
- package/es/atom/button-link/types.d.ts +4 -0
- package/es/atom/button-link/types.d.ts.map +1 -1
- package/es/atom/button-link/types.js +2 -0
- package/es/atom/button-link/types.js.map +1 -1
- 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/tag/index.d.ts +10 -1
- package/es/atom/tag/index.d.ts.map +1 -1
- package/es/atom/tag/index.js +19 -11
- package/es/atom/tag/index.js.map +1 -1
- package/es/atom/tag/style.css +38 -19
- package/es/molecule/base-modal/index.d.ts.map +1 -1
- package/es/molecule/base-modal/index.js +6 -10
- package/es/molecule/base-modal/index.js.map +1 -1
- package/es/molecule/cm-popin/types.d.ts +8 -0
- package/es/molecule/cm-popin/types.d.ts.map +1 -1
- package/es/molecule/draggable-list/index.d.ts +12 -0
- package/es/molecule/draggable-list/index.d.ts.map +1 -1
- package/es/molecule/draggable-list/index.js +4 -2
- package/es/molecule/draggable-list/index.js.map +1 -1
- package/es/molecule/expandible-actionable-table/index.d.ts +2 -0
- package/es/molecule/expandible-actionable-table/index.d.ts.map +1 -1
- package/es/molecule/expandible-actionable-table/types.d.ts +2 -0
- package/es/molecule/expandible-actionable-table/types.d.ts.map +1 -1
- package/es/molecule/learner-skill-card/index.d.ts.map +1 -1
- package/es/molecule/learner-skill-card/index.js +7 -10
- package/es/molecule/learner-skill-card/index.js.map +1 -1
- package/es/molecule/learning-priority-card/index.d.ts +40 -0
- package/es/molecule/learning-priority-card/index.d.ts.map +1 -0
- package/es/molecule/learning-priority-card/index.js +77 -0
- package/es/molecule/learning-priority-card/index.js.map +1 -0
- package/es/molecule/learning-priority-card/style.css +34 -0
- package/es/molecule/learning-priority-card/types.d.ts +18 -0
- package/es/molecule/learning-priority-card/types.d.ts.map +1 -0
- package/es/molecule/learning-priority-card/types.js +10 -0
- package/es/molecule/learning-priority-card/types.js.map +1 -0
- package/es/molecule/learning-priority-modal/index.d.ts +33 -0
- package/es/molecule/learning-priority-modal/index.d.ts.map +1 -0
- package/es/molecule/learning-priority-modal/index.js +231 -0
- package/es/molecule/learning-priority-modal/index.js.map +1 -0
- package/es/molecule/learning-priority-modal/style.css +68 -0
- package/es/molecule/learning-priority-setup-item/index.d.ts +18 -0
- package/es/molecule/learning-priority-setup-item/index.d.ts.map +1 -0
- package/es/molecule/learning-priority-setup-item/index.js +69 -0
- package/es/molecule/learning-priority-setup-item/index.js.map +1 -0
- package/es/molecule/learning-priority-setup-item/style.css +47 -0
- package/es/molecule/skill-card/index.d.ts.map +1 -1
- package/es/molecule/skill-card/index.js +5 -8
- package/es/molecule/skill-card/index.js.map +1 -1
- package/es/organism/brand-learning-priorities/index.d.ts +170 -0
- package/es/organism/brand-learning-priorities/index.d.ts.map +1 -0
- package/es/organism/brand-learning-priorities/index.js +99 -0
- package/es/organism/brand-learning-priorities/index.js.map +1 -0
- package/es/organism/brand-learning-priorities/style.css +35 -0
- package/es/organism/list-item/index.d.ts +34 -2
- package/es/organism/list-item/index.d.ts.map +1 -1
- package/es/organism/list-item/index.js +58 -14
- package/es/organism/list-item/index.js.map +1 -1
- package/es/organism/list-item/style.css +21 -1
- package/es/organism/list-items/index.d.ts +8 -0
- package/es/organism/setup-header/index.d.ts +8 -0
- package/es/organism/wizard-contents/index.d.ts +6 -0
- package/es/template/app-player/loading/index.d.ts +8 -0
- package/es/template/app-player/player/index.d.ts +16 -0
- package/es/template/app-player/player/slides/index.d.ts +8 -0
- package/es/template/app-player/player/slides/index.d.ts.map +1 -1
- package/es/template/app-player/popin-correction/index.d.ts +8 -0
- package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/es/template/app-player/popin-end/index.d.ts +8 -0
- package/es/template/app-review/index.d.ts +8 -0
- package/es/template/app-review/index.d.ts.map +1 -1
- package/es/template/app-review/player/prop-types.d.ts +8 -0
- package/es/template/app-review/player/prop-types.d.ts.map +1 -1
- package/es/template/app-review/prop-types.d.ts +8 -0
- package/es/template/app-review/prop-types.d.ts.map +1 -1
- package/es/template/back-office/brand-create/index.d.ts +8 -0
- package/es/template/back-office/brand-create/index.d.ts.map +1 -1
- package/es/template/back-office/brand-list/index.d.ts +8 -0
- package/es/template/back-office/brand-list/index.d.ts.map +1 -1
- package/es/template/back-office/brand-update/index.d.ts +171 -0
- package/es/template/back-office/brand-update/index.d.ts.map +1 -1
- package/es/template/back-office/brand-update/index.js +7 -0
- package/es/template/back-office/brand-update/index.js.map +1 -1
- package/es/template/back-office/dashboard-preview/index.d.ts +8 -0
- package/es/template/back-office/layout/index.d.ts +8 -0
- package/es/template/back-office/layout/index.d.ts.map +1 -1
- package/es/template/common/dashboard/index.d.ts +16 -0
- package/es/template/common/search-page/index.d.ts +8 -0
- package/es/template/external-course/index.d.ts +8 -0
- package/es/template/my-learning/index.d.ts.map +1 -1
- package/es/template/my-learning/index.js +10 -18
- package/es/template/my-learning/index.js.map +1 -1
- package/es/template/skill-detail/index.d.ts.map +1 -1
- package/es/template/skill-detail/index.js +4 -8
- package/es/template/skill-detail/index.js.map +1 -1
- package/lib/atom/button-link/index.d.ts +2 -0
- package/lib/atom/button-link/index.d.ts.map +1 -1
- package/lib/atom/button-link/index.js +21 -7
- package/lib/atom/button-link/index.js.map +1 -1
- package/lib/atom/button-link/types.d.ts +4 -0
- package/lib/atom/button-link/types.d.ts.map +1 -1
- package/lib/atom/button-link/types.js +2 -0
- package/lib/atom/button-link/types.js.map +1 -1
- package/lib/atom/circular-progress-bar/index.d.ts +15 -0
- package/lib/atom/circular-progress-bar/index.d.ts.map +1 -0
- package/lib/atom/circular-progress-bar/index.js +101 -0
- package/lib/atom/circular-progress-bar/index.js.map +1 -0
- package/lib/atom/circular-progress-bar/style.css +51 -0
- package/lib/atom/circular-progress-bar/types.d.ts +18 -0
- package/lib/atom/circular-progress-bar/types.d.ts.map +1 -0
- package/lib/atom/circular-progress-bar/types.js +19 -0
- package/lib/atom/circular-progress-bar/types.js.map +1 -0
- package/lib/atom/tag/index.d.ts +10 -1
- package/lib/atom/tag/index.d.ts.map +1 -1
- package/lib/atom/tag/index.js +20 -11
- package/lib/atom/tag/index.js.map +1 -1
- package/lib/atom/tag/style.css +38 -19
- package/lib/molecule/base-modal/index.d.ts.map +1 -1
- package/lib/molecule/base-modal/index.js +5 -9
- package/lib/molecule/base-modal/index.js.map +1 -1
- package/lib/molecule/cm-popin/types.d.ts +8 -0
- package/lib/molecule/cm-popin/types.d.ts.map +1 -1
- package/lib/molecule/draggable-list/index.d.ts +12 -0
- package/lib/molecule/draggable-list/index.d.ts.map +1 -1
- package/lib/molecule/draggable-list/index.js +5 -2
- package/lib/molecule/draggable-list/index.js.map +1 -1
- package/lib/molecule/expandible-actionable-table/index.d.ts +2 -0
- package/lib/molecule/expandible-actionable-table/index.d.ts.map +1 -1
- package/lib/molecule/expandible-actionable-table/types.d.ts +2 -0
- package/lib/molecule/expandible-actionable-table/types.d.ts.map +1 -1
- package/lib/molecule/learner-skill-card/index.d.ts.map +1 -1
- package/lib/molecule/learner-skill-card/index.js +6 -9
- package/lib/molecule/learner-skill-card/index.js.map +1 -1
- package/lib/molecule/learning-priority-card/index.d.ts +40 -0
- package/lib/molecule/learning-priority-card/index.d.ts.map +1 -0
- package/lib/molecule/learning-priority-card/index.js +95 -0
- package/lib/molecule/learning-priority-card/index.js.map +1 -0
- package/lib/molecule/learning-priority-card/style.css +34 -0
- package/lib/molecule/learning-priority-card/types.d.ts +18 -0
- package/lib/molecule/learning-priority-card/types.d.ts.map +1 -0
- package/lib/molecule/learning-priority-card/types.js +19 -0
- package/lib/molecule/learning-priority-card/types.js.map +1 -0
- package/lib/molecule/learning-priority-modal/index.d.ts +33 -0
- package/lib/molecule/learning-priority-modal/index.d.ts.map +1 -0
- package/lib/molecule/learning-priority-modal/index.js +254 -0
- package/lib/molecule/learning-priority-modal/index.js.map +1 -0
- package/lib/molecule/learning-priority-modal/style.css +68 -0
- package/lib/molecule/learning-priority-setup-item/index.d.ts +18 -0
- package/lib/molecule/learning-priority-setup-item/index.d.ts.map +1 -0
- package/lib/molecule/learning-priority-setup-item/index.js +86 -0
- package/lib/molecule/learning-priority-setup-item/index.js.map +1 -0
- package/lib/molecule/learning-priority-setup-item/style.css +47 -0
- package/lib/molecule/skill-card/index.d.ts.map +1 -1
- package/lib/molecule/skill-card/index.js +4 -7
- package/lib/molecule/skill-card/index.js.map +1 -1
- package/lib/organism/brand-learning-priorities/index.d.ts +170 -0
- package/lib/organism/brand-learning-priorities/index.d.ts.map +1 -0
- package/lib/organism/brand-learning-priorities/index.js +117 -0
- package/lib/organism/brand-learning-priorities/index.js.map +1 -0
- package/lib/organism/brand-learning-priorities/style.css +35 -0
- package/lib/organism/list-item/index.d.ts +34 -2
- package/lib/organism/list-item/index.d.ts.map +1 -1
- package/lib/organism/list-item/index.js +62 -16
- package/lib/organism/list-item/index.js.map +1 -1
- package/lib/organism/list-item/style.css +21 -1
- package/lib/organism/list-items/index.d.ts +8 -0
- package/lib/organism/setup-header/index.d.ts +8 -0
- package/lib/organism/wizard-contents/index.d.ts +6 -0
- package/lib/template/app-player/loading/index.d.ts +8 -0
- package/lib/template/app-player/player/index.d.ts +16 -0
- package/lib/template/app-player/player/slides/index.d.ts +8 -0
- package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-correction/index.d.ts +8 -0
- package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-end/index.d.ts +8 -0
- package/lib/template/app-review/index.d.ts +8 -0
- package/lib/template/app-review/index.d.ts.map +1 -1
- package/lib/template/app-review/player/prop-types.d.ts +8 -0
- package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
- package/lib/template/app-review/prop-types.d.ts +8 -0
- package/lib/template/app-review/prop-types.d.ts.map +1 -1
- package/lib/template/back-office/brand-create/index.d.ts +8 -0
- package/lib/template/back-office/brand-create/index.d.ts.map +1 -1
- package/lib/template/back-office/brand-list/index.d.ts +8 -0
- package/lib/template/back-office/brand-list/index.d.ts.map +1 -1
- package/lib/template/back-office/brand-update/index.d.ts +171 -0
- package/lib/template/back-office/brand-update/index.d.ts.map +1 -1
- package/lib/template/back-office/brand-update/index.js +8 -0
- package/lib/template/back-office/brand-update/index.js.map +1 -1
- package/lib/template/back-office/dashboard-preview/index.d.ts +8 -0
- package/lib/template/back-office/layout/index.d.ts +8 -0
- package/lib/template/back-office/layout/index.d.ts.map +1 -1
- package/lib/template/common/dashboard/index.d.ts +16 -0
- package/lib/template/common/search-page/index.d.ts +8 -0
- package/lib/template/external-course/index.d.ts +8 -0
- package/lib/template/my-learning/index.d.ts.map +1 -1
- package/lib/template/my-learning/index.js +10 -18
- package/lib/template/my-learning/index.js.map +1 -1
- package/lib/template/skill-detail/index.d.ts.map +1 -1
- package/lib/template/skill-detail/index.js +4 -8
- package/lib/template/skill-detail/index.js.map +1 -1
- package/locales/bs/global.json +1 -0
- package/locales/cs/global.json +1 -0
- package/locales/de/global.json +1 -0
- package/locales/en/global.json +12 -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
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
export default BrandLearningPriorities;
|
|
2
|
+
declare function BrandLearningPriorities(props: any, context: any): JSX.Element;
|
|
3
|
+
declare namespace BrandLearningPriorities {
|
|
4
|
+
namespace contextTypes {
|
|
5
|
+
const skin: PropTypes.Requireable<PropTypes.InferProps<{
|
|
6
|
+
common: PropTypes.Requireable<{
|
|
7
|
+
[x: string]: any;
|
|
8
|
+
}>;
|
|
9
|
+
images: PropTypes.Requireable<PropTypes.InferProps<{
|
|
10
|
+
'logo-mobile': PropTypes.Requireable<any>;
|
|
11
|
+
logo: PropTypes.Requireable<any>;
|
|
12
|
+
'logo-email': PropTypes.Requireable<any>;
|
|
13
|
+
login: PropTypes.Requireable<any>;
|
|
14
|
+
}>>;
|
|
15
|
+
icons: PropTypes.Requireable<{
|
|
16
|
+
[x: string]: any;
|
|
17
|
+
}>;
|
|
18
|
+
mod: PropTypes.Requireable<{
|
|
19
|
+
[x: string]: any;
|
|
20
|
+
}>;
|
|
21
|
+
courses: PropTypes.Requireable<any[]>;
|
|
22
|
+
texts: PropTypes.Requireable<{
|
|
23
|
+
[x: string]: any;
|
|
24
|
+
}>;
|
|
25
|
+
}>>;
|
|
26
|
+
const translate: PropTypes.Requireable<(...args: any[]) => any>;
|
|
27
|
+
}
|
|
28
|
+
namespace propTypes {
|
|
29
|
+
const content: PropTypes.Requireable<PropTypes.InferProps<{
|
|
30
|
+
items: PropTypes.Requireable<(NonNullable<PropTypes.InferProps<{
|
|
31
|
+
title: PropTypes.Validator<string>;
|
|
32
|
+
onUp: PropTypes.Requireable<(...args: any[]) => any>;
|
|
33
|
+
onDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
34
|
+
display: PropTypes.Requireable<PropTypes.InferProps<{
|
|
35
|
+
title: PropTypes.Requireable<string>;
|
|
36
|
+
name: PropTypes.Requireable<string>;
|
|
37
|
+
id: PropTypes.Requireable<string>;
|
|
38
|
+
value: PropTypes.Requireable<boolean>;
|
|
39
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
40
|
+
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
41
|
+
description: PropTypes.Requireable<string>;
|
|
42
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
43
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
44
|
+
modified: PropTypes.Requireable<boolean>;
|
|
45
|
+
titlePosition: PropTypes.Requireable<string>;
|
|
46
|
+
theme: PropTypes.Requireable<string>;
|
|
47
|
+
details: PropTypes.Requireable<string>;
|
|
48
|
+
'data-name': PropTypes.Requireable<string>;
|
|
49
|
+
requiredSelection: PropTypes.Requireable<boolean>;
|
|
50
|
+
}>>;
|
|
51
|
+
contentTypes: PropTypes.Requireable<PropTypes.InferProps<{
|
|
52
|
+
modified: PropTypes.Requireable<boolean>;
|
|
53
|
+
color: PropTypes.Requireable<string>;
|
|
54
|
+
theme: PropTypes.Requireable<string>;
|
|
55
|
+
className: PropTypes.Requireable<string>;
|
|
56
|
+
list: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
57
|
+
color: PropTypes.Requireable<string>;
|
|
58
|
+
value: PropTypes.Validator<string>;
|
|
59
|
+
name: PropTypes.Requireable<string>;
|
|
60
|
+
theme: PropTypes.Requireable<string>;
|
|
61
|
+
checked: PropTypes.Requireable<boolean>;
|
|
62
|
+
label: PropTypes.Requireable<string>;
|
|
63
|
+
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
64
|
+
}> | null | undefined)[]>;
|
|
65
|
+
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
66
|
+
}>>;
|
|
67
|
+
}> | PropTypes.InferProps<{
|
|
68
|
+
'aria-label': PropTypes.Requireable<PropTypes.InferProps<{
|
|
69
|
+
title: PropTypes.Requireable<string>;
|
|
70
|
+
author: PropTypes.Requireable<string>;
|
|
71
|
+
modules: PropTypes.Requireable<string>;
|
|
72
|
+
position: PropTypes.Requireable<string>;
|
|
73
|
+
}>>;
|
|
74
|
+
image: PropTypes.Requireable<string>;
|
|
75
|
+
badgeList: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
76
|
+
category: PropTypes.Requireable<string>;
|
|
77
|
+
label: PropTypes.Requireable<string>;
|
|
78
|
+
}> | null | undefined)[]>;
|
|
79
|
+
title: PropTypes.Requireable<string>;
|
|
80
|
+
author: PropTypes.Requireable<string>;
|
|
81
|
+
position: PropTypes.Requireable<number>;
|
|
82
|
+
id: PropTypes.Requireable<string>;
|
|
83
|
+
}> | PropTypes.InferProps<{
|
|
84
|
+
title: PropTypes.Validator<string>;
|
|
85
|
+
subtitle: PropTypes.Requireable<string>;
|
|
86
|
+
selected: PropTypes.Requireable<boolean>;
|
|
87
|
+
dataColumns: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
88
|
+
label: PropTypes.Requireable<string>;
|
|
89
|
+
type: PropTypes.Requireable<string>;
|
|
90
|
+
className: PropTypes.Requireable<string>;
|
|
91
|
+
}> | null | undefined)[]>;
|
|
92
|
+
buttonLink: PropTypes.Requireable<PropTypes.InferProps<{
|
|
93
|
+
type: PropTypes.Requireable<string>;
|
|
94
|
+
label: PropTypes.Requireable<string>;
|
|
95
|
+
ariaLabel: PropTypes.Requireable<string>;
|
|
96
|
+
dataName: PropTypes.Requireable<string>;
|
|
97
|
+
icon: PropTypes.Requireable<PropTypes.InferProps<{
|
|
98
|
+
position: PropTypes.Requireable<string>;
|
|
99
|
+
type: PropTypes.Requireable<string>;
|
|
100
|
+
}>>;
|
|
101
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
102
|
+
}>>;
|
|
103
|
+
secondButtonLink: PropTypes.Requireable<PropTypes.InferProps<{
|
|
104
|
+
type: PropTypes.Requireable<string>;
|
|
105
|
+
label: PropTypes.Requireable<string>;
|
|
106
|
+
ariaLabel: PropTypes.Requireable<string>;
|
|
107
|
+
dataName: PropTypes.Requireable<string>;
|
|
108
|
+
icon: PropTypes.Requireable<PropTypes.InferProps<{
|
|
109
|
+
position: PropTypes.Requireable<string>;
|
|
110
|
+
type: PropTypes.Requireable<string>;
|
|
111
|
+
}>>;
|
|
112
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
113
|
+
}>>;
|
|
114
|
+
bulletPointMenuButton: PropTypes.Requireable<PropTypes.InferProps<{
|
|
115
|
+
buttonAriaLabel: PropTypes.Requireable<string>;
|
|
116
|
+
menuAriaLabel: PropTypes.Requireable<string>;
|
|
117
|
+
buttons: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
118
|
+
'data-name': PropTypes.Requireable<string>;
|
|
119
|
+
label: PropTypes.Requireable<string>;
|
|
120
|
+
type: PropTypes.Requireable<string>;
|
|
121
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
122
|
+
}> | null | undefined)[]>;
|
|
123
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
124
|
+
}>>;
|
|
125
|
+
tags: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
126
|
+
label: PropTypes.Requireable<string>;
|
|
127
|
+
type: PropTypes.Requireable<string>;
|
|
128
|
+
}> | null | undefined)[]>;
|
|
129
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
130
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
131
|
+
isBulkStyle: PropTypes.Requireable<boolean>;
|
|
132
|
+
isOverflowHidden: PropTypes.Requireable<boolean>;
|
|
133
|
+
order: PropTypes.Requireable<number>;
|
|
134
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
135
|
+
contentType: PropTypes.Requireable<string>;
|
|
136
|
+
id: PropTypes.Requireable<string>;
|
|
137
|
+
}> | PropTypes.InferProps<{
|
|
138
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
139
|
+
id: PropTypes.Requireable<string>;
|
|
140
|
+
priorityRef: PropTypes.Requireable<string>;
|
|
141
|
+
title: PropTypes.Requireable<string>;
|
|
142
|
+
courses: PropTypes.Requireable<number>;
|
|
143
|
+
type: PropTypes.Requireable<string>;
|
|
144
|
+
onRemove: PropTypes.Requireable<(...args: any[]) => any>;
|
|
145
|
+
}> | null | undefined> | null | undefined)[]>;
|
|
146
|
+
onDrop: PropTypes.Requireable<(...args: any[]) => any>;
|
|
147
|
+
itemType: PropTypes.Requireable<string>;
|
|
148
|
+
}>>;
|
|
149
|
+
const priorities: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
150
|
+
ref: PropTypes.Requireable<string>;
|
|
151
|
+
title: PropTypes.Requireable<string>;
|
|
152
|
+
courses: PropTypes.Requireable<number>;
|
|
153
|
+
type: PropTypes.Requireable<string>;
|
|
154
|
+
}> | null | undefined)[]>;
|
|
155
|
+
const filters: PropTypes.Requireable<PropTypes.InferProps<{
|
|
156
|
+
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
157
|
+
options: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
158
|
+
count: PropTypes.Requireable<number>;
|
|
159
|
+
name: PropTypes.Validator<string>;
|
|
160
|
+
value: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
161
|
+
selected: PropTypes.Requireable<boolean>;
|
|
162
|
+
validOption: PropTypes.Requireable<boolean>;
|
|
163
|
+
}> | null | undefined)[]>;
|
|
164
|
+
}>>;
|
|
165
|
+
const isLoading: PropTypes.Requireable<boolean>;
|
|
166
|
+
const onAdd: PropTypes.Requireable<(...args: any[]) => any>;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
import PropTypes from "prop-types";
|
|
170
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/brand-learning-priorities/index.js"],"names":[],"mappings":";AAWA,gFAyDC"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import _get from "lodash/fp/get";
|
|
2
|
+
|
|
3
|
+
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); }
|
|
4
|
+
|
|
5
|
+
import React, { useState, useCallback, useMemo } from 'react';
|
|
6
|
+
import PropTypes from 'prop-types';
|
|
7
|
+
import { convert } from 'css-color-function';
|
|
8
|
+
import Provider from '../../atom/provider';
|
|
9
|
+
import { SelectOptionPropTypes } from '../../atom/select';
|
|
10
|
+
import DraggableList from '../../molecule/draggable-list';
|
|
11
|
+
import ButtonLink from '../../atom/button-link';
|
|
12
|
+
import LearningPriorityModal from '../../molecule/learning-priority-modal';
|
|
13
|
+
import style from './style.css';
|
|
14
|
+
|
|
15
|
+
const BrandLearningPriorities = (props, context) => {
|
|
16
|
+
const {
|
|
17
|
+
content,
|
|
18
|
+
priorities,
|
|
19
|
+
filters,
|
|
20
|
+
isLoading,
|
|
21
|
+
onAdd
|
|
22
|
+
} = props;
|
|
23
|
+
const [openModal, setOpenModal] = useState(false);
|
|
24
|
+
const {
|
|
25
|
+
skin,
|
|
26
|
+
translate
|
|
27
|
+
} = context;
|
|
28
|
+
|
|
29
|
+
const primarySkinColor = _get('common.primary', skin);
|
|
30
|
+
|
|
31
|
+
const selectedPriorities = useMemo(() => content.items.map(priority => priority.priorityRef), [content.items]);
|
|
32
|
+
const handleOpenModal = useCallback(() => setOpenModal(true), [setOpenModal]);
|
|
33
|
+
const handleCloseModal = useCallback(() => setOpenModal(false), [setOpenModal]);
|
|
34
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
35
|
+
className: style.container
|
|
36
|
+
}, /*#__PURE__*/React.createElement(LearningPriorityModal, {
|
|
37
|
+
isLoading: isLoading,
|
|
38
|
+
isOpen: openModal,
|
|
39
|
+
onCancel: handleCloseModal,
|
|
40
|
+
onClose: handleCloseModal,
|
|
41
|
+
onAdd: onAdd,
|
|
42
|
+
priorities: priorities,
|
|
43
|
+
filters: filters,
|
|
44
|
+
preselected: selectedPriorities
|
|
45
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
46
|
+
className: style.LPtitle
|
|
47
|
+
}, translate('learning_priorities')), /*#__PURE__*/React.createElement("div", {
|
|
48
|
+
className: style.LPdescription
|
|
49
|
+
}, translate('learning_priorities_brand_description')), /*#__PURE__*/React.createElement("div", {
|
|
50
|
+
className: style.ctaWrapper
|
|
51
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
52
|
+
className: style.priorityCount
|
|
53
|
+
}, `${content.items.length} ${translate('items')}`), /*#__PURE__*/React.createElement(ButtonLink, {
|
|
54
|
+
customStyle: {
|
|
55
|
+
backgroundColor: primarySkinColor,
|
|
56
|
+
color: '#FFFFFF',
|
|
57
|
+
transition: 'background-color 0.15s ease-in-out, color 0.15s ease-in-out',
|
|
58
|
+
width: 'fit-content'
|
|
59
|
+
},
|
|
60
|
+
hoverBackgroundColor: convert(`color(${primarySkinColor} a(0.07))`),
|
|
61
|
+
hoverColor: primarySkinColor,
|
|
62
|
+
onClick: handleOpenModal,
|
|
63
|
+
label: translate('add_learning_priority'),
|
|
64
|
+
"data-name": "add-learning-priority",
|
|
65
|
+
icon: {
|
|
66
|
+
position: 'left',
|
|
67
|
+
faIcon: {
|
|
68
|
+
name: 'plus',
|
|
69
|
+
backgroundColor: primarySkinColor,
|
|
70
|
+
color: '#FFFFFF',
|
|
71
|
+
size: 16
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
})), /*#__PURE__*/React.createElement(DraggableList, content));
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
BrandLearningPriorities.contextTypes = {
|
|
78
|
+
skin: Provider.childContextTypes.skin,
|
|
79
|
+
translate: Provider.childContextTypes.translate
|
|
80
|
+
};
|
|
81
|
+
BrandLearningPriorities.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
82
|
+
content: PropTypes.shape(DraggableList.propTypes),
|
|
83
|
+
priorities: PropTypes.arrayOf(PropTypes.shape({
|
|
84
|
+
ref: PropTypes.string,
|
|
85
|
+
title: PropTypes.string,
|
|
86
|
+
courses: PropTypes.number,
|
|
87
|
+
type: PropTypes.string
|
|
88
|
+
})),
|
|
89
|
+
filters: PropTypes.shape({
|
|
90
|
+
onChange: PropTypes.func,
|
|
91
|
+
options: PropTypes.arrayOf(PropTypes.shape(_extends({}, SelectOptionPropTypes, {
|
|
92
|
+
count: PropTypes.number
|
|
93
|
+
})))
|
|
94
|
+
}),
|
|
95
|
+
isLoading: PropTypes.bool,
|
|
96
|
+
onAdd: PropTypes.func
|
|
97
|
+
} : {};
|
|
98
|
+
export default BrandLearningPriorities;
|
|
99
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useState","useCallback","useMemo","PropTypes","convert","Provider","SelectOptionPropTypes","DraggableList","ButtonLink","LearningPriorityModal","style","BrandLearningPriorities","props","context","content","priorities","filters","isLoading","onAdd","openModal","setOpenModal","skin","translate","primarySkinColor","selectedPriorities","items","map","priority","priorityRef","handleOpenModal","handleCloseModal","container","LPtitle","LPdescription","ctaWrapper","priorityCount","length","backgroundColor","color","transition","width","position","faIcon","name","size","contextTypes","childContextTypes","propTypes","shape","arrayOf","ref","string","title","courses","number","type","onChange","func","options","count","bool"],"sources":["../../../src/organism/brand-learning-priorities/index.js"],"sourcesContent":["import React, {useState, useCallback, useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport {convert} from 'css-color-function';\nimport {get} from 'lodash/fp';\nimport Provider from '../../atom/provider';\nimport {SelectOptionPropTypes} from '../../atom/select';\nimport DraggableList from '../../molecule/draggable-list';\nimport ButtonLink from '../../atom/button-link';\nimport LearningPriorityModal from '../../molecule/learning-priority-modal';\nimport style from './style.css';\n\nconst BrandLearningPriorities = (props, context) => {\n const {content, priorities, filters, isLoading, onAdd} = props;\n const [openModal, setOpenModal] = useState(false);\n const {skin, translate} = context;\n const primarySkinColor = get('common.primary', skin);\n\n const selectedPriorities = useMemo(\n () => content.items.map(priority => priority.priorityRef),\n [content.items]\n );\n\n const handleOpenModal = useCallback(() => setOpenModal(true), [setOpenModal]);\n const handleCloseModal = useCallback(() => setOpenModal(false), [setOpenModal]);\n return (\n <div className={style.container}>\n <LearningPriorityModal\n isLoading={isLoading}\n isOpen={openModal}\n onCancel={handleCloseModal}\n onClose={handleCloseModal}\n onAdd={onAdd}\n priorities={priorities}\n filters={filters}\n preselected={selectedPriorities}\n />\n <div className={style.LPtitle}>{translate('learning_priorities')}</div>\n <div className={style.LPdescription}>\n {translate('learning_priorities_brand_description')}\n </div>\n <div className={style.ctaWrapper}>\n <div className={style.priorityCount}>{`${content.items.length} ${translate('items')}`}</div>\n <ButtonLink\n customStyle={{\n backgroundColor: primarySkinColor,\n color: '#FFFFFF',\n transition: 'background-color 0.15s ease-in-out, color 0.15s ease-in-out',\n width: 'fit-content'\n }}\n hoverBackgroundColor={convert(`color(${primarySkinColor} a(0.07))`)}\n hoverColor={primarySkinColor}\n onClick={handleOpenModal}\n label={translate('add_learning_priority')}\n data-name=\"add-learning-priority\"\n icon={{\n position: 'left',\n faIcon: {\n name: 'plus',\n backgroundColor: primarySkinColor,\n color: '#FFFFFF',\n size: 16\n }\n }}\n />\n </div>\n <DraggableList {...content} />\n </div>\n );\n};\n\nBrandLearningPriorities.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nBrandLearningPriorities.propTypes = {\n content: PropTypes.shape(DraggableList.propTypes),\n priorities: PropTypes.arrayOf(\n PropTypes.shape({\n ref: PropTypes.string,\n title: PropTypes.string,\n courses: PropTypes.number,\n type: PropTypes.string\n })\n ),\n filters: PropTypes.shape({\n onChange: PropTypes.func,\n options: PropTypes.arrayOf(\n PropTypes.shape({\n ...SelectOptionPropTypes,\n count: PropTypes.number\n })\n )\n }),\n isLoading: PropTypes.bool,\n onAdd: PropTypes.func\n};\n\nexport default BrandLearningPriorities;\n"],"mappings":";;;;AAAA,OAAOA,KAAP,IAAeC,QAAf,EAAyBC,WAAzB,EAAsCC,OAAtC,QAAoD,OAApD;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,SAAQC,OAAR,QAAsB,oBAAtB;AAEA,OAAOC,QAAP,MAAqB,qBAArB;AACA,SAAQC,qBAAR,QAAoC,mBAApC;AACA,OAAOC,aAAP,MAA0B,+BAA1B;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,qBAAP,MAAkC,wCAAlC;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,uBAAuB,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EAClD,MAAM;IAACC,OAAD;IAAUC,UAAV;IAAsBC,OAAtB;IAA+BC,SAA/B;IAA0CC;EAA1C,IAAmDN,KAAzD;EACA,MAAM,CAACO,SAAD,EAAYC,YAAZ,IAA4BpB,QAAQ,CAAC,KAAD,CAA1C;EACA,MAAM;IAACqB,IAAD;IAAOC;EAAP,IAAoBT,OAA1B;;EACA,MAAMU,gBAAgB,GAAG,KAAI,gBAAJ,EAAsBF,IAAtB,CAAzB;;EAEA,MAAMG,kBAAkB,GAAGtB,OAAO,CAChC,MAAMY,OAAO,CAACW,KAAR,CAAcC,GAAd,CAAkBC,QAAQ,IAAIA,QAAQ,CAACC,WAAvC,CAD0B,EAEhC,CAACd,OAAO,CAACW,KAAT,CAFgC,CAAlC;EAKA,MAAMI,eAAe,GAAG5B,WAAW,CAAC,MAAMmB,YAAY,CAAC,IAAD,CAAnB,EAA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,IAAI,EAAE;MAJA;IAFJ;EAZR,EAFF,CAfF,eAwCE,oBAAC,aAAD,EAAmB9B,OAAnB,CAxCF,CADF;AA4CD,CAzDD;;AA2DAH,uBAAuB,CAACkC,YAAxB,GAAuC;EACrCxB,IAAI,EAAEhB,QAAQ,CAACyC,iBAAT,CAA2BzB,IADI;EAErCC,SAAS,EAAEjB,QAAQ,CAACyC,iBAAT,CAA2BxB;AAFD,CAAvC;AAKAX,uBAAuB,CAACoC,SAAxB,2CAAoC;EAClCjC,OAAO,EAAEX,SAAS,CAAC6C,KAAV,CAAgBzC,aAAa,CAACwC,SAA9B,CADyB;EAElChC,UAAU,EAAEZ,SAAS,CAAC8C,OAAV,CACV9C,SAAS,CAAC6C,KAAV,CAAgB;IACdE,GAAG,EAAE/C,SAAS,CAACgD,MADD;IAEdC,KAAK,EAAEjD,SAAS,CAACgD,MAFH;IAGdE,OAAO,EAAElD,SAAS,CAACmD,MAHL;IAIdC,IAAI,EAAEpD,SAAS,CAACgD;EAJF,CAAhB,CADU,CAFsB;EAUlCnC,OAAO,EAAEb,SAAS,CAAC6C,KAAV,CAAgB;IACvBQ,QAAQ,EAAErD,SAAS,CAACsD,IADG;IAEvBC,OAAO,EAAEvD,SAAS,CAAC8C,OAAV,CACP9C,SAAS,CAAC6C,KAAV,cACK1C,qBADL;MAEEqD,KAAK,EAAExD,SAAS,CAACmD;IAFnB,GADO;EAFc,CAAhB,CAVyB;EAmBlCrC,SAAS,EAAEd,SAAS,CAACyD,IAnBa;EAoBlC1C,KAAK,EAAEf,SAAS,CAACsD;AApBiB,CAApC;AAuBA,eAAe9C,uBAAf"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
@value colors: "../../variables/colors.css";
|
|
2
|
+
@value cm_grey_500 from colors;
|
|
3
|
+
|
|
4
|
+
.container {
|
|
5
|
+
font-family: "Gilroy";
|
|
6
|
+
font-style: normal;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.LPtitle {
|
|
10
|
+
font-size: 18px;
|
|
11
|
+
font-weight: 700;
|
|
12
|
+
line-height: 24px;
|
|
13
|
+
margin-bottom: 8px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.LPdescription {
|
|
17
|
+
color: cm_grey_500;
|
|
18
|
+
font-size: 14px;
|
|
19
|
+
font-weight: 600;
|
|
20
|
+
line-height: 20px;
|
|
21
|
+
max-width: 620px;
|
|
22
|
+
margin-bottom: 32px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.ctaWrapper {
|
|
26
|
+
display: flex;
|
|
27
|
+
justify-content: space-between;
|
|
28
|
+
margin-bottom: 16px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.priorityCount {
|
|
32
|
+
font-size: 16px;
|
|
33
|
+
font-weight: 600;
|
|
34
|
+
line-height: 22px;
|
|
35
|
+
}
|
|
@@ -1,20 +1,50 @@
|
|
|
1
1
|
export default ListItem;
|
|
2
|
-
declare function ListItem({ buttonLink, secondButtonLink, bulletPointMenuButton, tags, title, dataColumns, order, "aria-label": ariaLabel, contentType, isBulkStyle, isOverflowHidden }: {
|
|
2
|
+
declare function ListItem({ buttonLink, secondButtonLink, bulletPointMenuButton, tags, title, selected, subtitle, dataColumns, order, "aria-label": ariaLabel, disabled, contentType, isBulkStyle, isOverflowHidden, onClick }: {
|
|
3
3
|
buttonLink: any;
|
|
4
4
|
secondButtonLink: any;
|
|
5
5
|
bulletPointMenuButton: any;
|
|
6
6
|
tags: any;
|
|
7
7
|
title: any;
|
|
8
|
+
selected: any;
|
|
9
|
+
subtitle: any;
|
|
8
10
|
dataColumns: any;
|
|
9
11
|
order: any;
|
|
10
12
|
"aria-label": any;
|
|
13
|
+
disabled?: boolean | undefined;
|
|
11
14
|
contentType: any;
|
|
12
15
|
isBulkStyle?: boolean | undefined;
|
|
13
16
|
isOverflowHidden?: boolean | undefined;
|
|
14
|
-
|
|
17
|
+
onClick?: import("lodash/fp").LodashNoop | undefined;
|
|
18
|
+
}, context: any): JSX.Element;
|
|
15
19
|
declare namespace ListItem {
|
|
20
|
+
namespace contextTypes {
|
|
21
|
+
const skin: PropTypes.Requireable<PropTypes.InferProps<{
|
|
22
|
+
common: PropTypes.Requireable<{
|
|
23
|
+
[x: string]: any;
|
|
24
|
+
}>;
|
|
25
|
+
images: PropTypes.Requireable<PropTypes.InferProps<{
|
|
26
|
+
'logo-mobile': PropTypes.Requireable<any>;
|
|
27
|
+
logo: PropTypes.Requireable<any>;
|
|
28
|
+
'logo-email': PropTypes.Requireable<any>;
|
|
29
|
+
login: PropTypes.Requireable<any>;
|
|
30
|
+
}>>;
|
|
31
|
+
icons: PropTypes.Requireable<{
|
|
32
|
+
[x: string]: any;
|
|
33
|
+
}>;
|
|
34
|
+
mod: PropTypes.Requireable<{
|
|
35
|
+
[x: string]: any;
|
|
36
|
+
}>;
|
|
37
|
+
courses: PropTypes.Requireable<any[]>;
|
|
38
|
+
texts: PropTypes.Requireable<{
|
|
39
|
+
[x: string]: any;
|
|
40
|
+
}>;
|
|
41
|
+
}>>;
|
|
42
|
+
const translate: PropTypes.Requireable<(...args: any[]) => any>;
|
|
43
|
+
}
|
|
16
44
|
const propTypes: {
|
|
17
45
|
title: PropTypes.Validator<string>;
|
|
46
|
+
subtitle: PropTypes.Requireable<string>;
|
|
47
|
+
selected: PropTypes.Requireable<boolean>;
|
|
18
48
|
dataColumns: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
19
49
|
label: PropTypes.Requireable<string>;
|
|
20
50
|
type: PropTypes.Requireable<string>;
|
|
@@ -57,6 +87,8 @@ declare namespace ListItem {
|
|
|
57
87
|
label: PropTypes.Requireable<string>;
|
|
58
88
|
type: PropTypes.Requireable<string>;
|
|
59
89
|
}> | null | undefined)[]>;
|
|
90
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
91
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
60
92
|
isBulkStyle: PropTypes.Requireable<boolean>;
|
|
61
93
|
isOverflowHidden: PropTypes.Requireable<boolean>;
|
|
62
94
|
order: PropTypes.Requireable<number>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/list-item/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/list-item/index.js"],"names":[],"mappings":";AAaA;;;;;;;;;;;;;;;;8BAsGC"}
|
|
@@ -1,9 +1,17 @@
|
|
|
1
|
+
import _get from "lodash/fp/get";
|
|
2
|
+
import _noop from "lodash/fp/noop";
|
|
1
3
|
import _map from "lodash/fp/map";
|
|
2
4
|
import _isEmpty from "lodash/fp/isEmpty";
|
|
5
|
+
|
|
6
|
+
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); }
|
|
7
|
+
|
|
3
8
|
import React from 'react';
|
|
4
9
|
import PropTypes from 'prop-types';
|
|
10
|
+
import { convert } from 'css-color-function';
|
|
5
11
|
import classnames from 'classnames';
|
|
12
|
+
import Provider from '../../atom/provider';
|
|
6
13
|
import Tag from '../../atom/tag';
|
|
14
|
+
import Icon from '../../atom/icon';
|
|
7
15
|
import ButtonLink from '../../atom/button-link';
|
|
8
16
|
import BulletPointMenuButton from '../../molecule/bullet-point-menu-button'; // eslint-disable-next-line css-modules/no-unused-class
|
|
9
17
|
|
|
@@ -15,52 +23,86 @@ const ListItem = ({
|
|
|
15
23
|
bulletPointMenuButton,
|
|
16
24
|
tags,
|
|
17
25
|
title,
|
|
26
|
+
selected,
|
|
27
|
+
subtitle,
|
|
18
28
|
dataColumns,
|
|
19
29
|
order,
|
|
20
30
|
'aria-label': ariaLabel,
|
|
31
|
+
disabled = false,
|
|
21
32
|
contentType,
|
|
22
33
|
isBulkStyle = false,
|
|
23
|
-
isOverflowHidden = false
|
|
24
|
-
|
|
25
|
-
|
|
34
|
+
isOverflowHidden = false,
|
|
35
|
+
onClick = _noop
|
|
36
|
+
}, context) => {
|
|
37
|
+
const {
|
|
38
|
+
skin
|
|
39
|
+
} = context;
|
|
26
40
|
|
|
27
|
-
const
|
|
41
|
+
const primarySkinColor = _get('common.primary', skin);
|
|
42
|
+
|
|
43
|
+
const mapUncapped = _map.convert({
|
|
28
44
|
cap: false
|
|
29
|
-
})
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
let isPublished = false;
|
|
48
|
+
const selectedStyle = selected ? {
|
|
49
|
+
backgroundColor: convert(`color(${primarySkinColor} a(0.07))`)
|
|
50
|
+
} : {};
|
|
51
|
+
const tagSelectedStyle = selected ? {
|
|
52
|
+
backgroundColor: convert(`color(${primarySkinColor} a(0.15))`),
|
|
53
|
+
color: primarySkinColor
|
|
54
|
+
} : {};
|
|
55
|
+
const tagsView = mapUncapped((tag, index) => {
|
|
30
56
|
isPublished = tag.type === 'success';
|
|
31
57
|
return /*#__PURE__*/React.createElement("div", {
|
|
32
58
|
key: index,
|
|
33
59
|
className: style.tag
|
|
34
|
-
}, /*#__PURE__*/React.createElement(Tag, tag
|
|
60
|
+
}, /*#__PURE__*/React.createElement(Tag, _extends({}, tag, {
|
|
61
|
+
customStyle: tagSelectedStyle
|
|
62
|
+
})));
|
|
35
63
|
})(tags);
|
|
36
|
-
|
|
37
|
-
const dataColumnsView = _map.convert({
|
|
38
|
-
cap: false
|
|
39
|
-
})((dataColumn, index) => {
|
|
64
|
+
const dataColumnsView = mapUncapped((dataColumn, index) => {
|
|
40
65
|
return /*#__PURE__*/React.createElement("div", {
|
|
41
66
|
key: index,
|
|
42
67
|
className: style[dataColumn.className]
|
|
43
68
|
}, dataColumn.type ? /*#__PURE__*/React.createElement(Tag, dataColumn) : dataColumn.label);
|
|
44
69
|
})(dataColumns);
|
|
45
|
-
|
|
46
70
|
const orderView = order !== null && order !== undefined ? /*#__PURE__*/React.createElement("div", {
|
|
47
71
|
className: style.order,
|
|
48
72
|
"aria-label": ariaLabel
|
|
49
73
|
}, order + 1) : null;
|
|
50
74
|
return /*#__PURE__*/React.createElement("div", {
|
|
51
|
-
className: classnames(style.wrapper, isBulkStyle && style.gridLayout)
|
|
75
|
+
className: classnames(style.wrapper, isBulkStyle && style.gridLayout, subtitle && style.withSubtitle, disabled && style.disabled),
|
|
76
|
+
onClick: !disabled ? onClick : undefined,
|
|
77
|
+
style: selectedStyle
|
|
52
78
|
}, /*#__PURE__*/React.createElement("div", {
|
|
53
79
|
className: classnames(style.dataColumnsWrapper, isOverflowHidden && style.hiddenOverflowX)
|
|
54
80
|
}, isPublished && contentType === 'certification' ? orderView : null, /*#__PURE__*/React.createElement("div", {
|
|
55
81
|
className: style.title,
|
|
56
82
|
title: title
|
|
57
|
-
}, title
|
|
83
|
+
}, title, /*#__PURE__*/React.createElement("div", {
|
|
84
|
+
className: style.subtitle
|
|
85
|
+
}, subtitle)), dataColumnsView), /*#__PURE__*/React.createElement("div", {
|
|
58
86
|
className: style.settings
|
|
59
|
-
}, tagsView,
|
|
87
|
+
}, tagsView, selected ? /*#__PURE__*/React.createElement(Icon, {
|
|
88
|
+
iconName: "circle-check",
|
|
89
|
+
iconColor: primarySkinColor,
|
|
90
|
+
backgroundColor: '#ffffff',
|
|
91
|
+
size: {
|
|
92
|
+
faSize: 16,
|
|
93
|
+
wrapperSize: 16
|
|
94
|
+
}
|
|
95
|
+
}) : null, buttonLink ? /*#__PURE__*/React.createElement(ButtonLink, buttonLink) : null, secondButtonLink ? /*#__PURE__*/React.createElement(ButtonLink, secondButtonLink) : null, !_isEmpty(bulletPointMenuButton) ? /*#__PURE__*/React.createElement(BulletPointMenuButton, bulletPointMenuButton) : null));
|
|
60
96
|
};
|
|
61
97
|
|
|
98
|
+
ListItem.contextTypes = {
|
|
99
|
+
skin: Provider.childContextTypes.skin,
|
|
100
|
+
translate: Provider.childContextTypes.translate
|
|
101
|
+
};
|
|
62
102
|
ListItem.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
63
103
|
title: PropTypes.string.isRequired,
|
|
104
|
+
subtitle: PropTypes.string,
|
|
105
|
+
selected: PropTypes.bool,
|
|
64
106
|
dataColumns: PropTypes.arrayOf(PropTypes.shape({
|
|
65
107
|
label: PropTypes.string,
|
|
66
108
|
type: PropTypes.oneOf(['success', 'failure', 'warning', 'progress', 'default']),
|
|
@@ -103,6 +145,8 @@ ListItem.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
103
145
|
label: PropTypes.string,
|
|
104
146
|
type: PropTypes.oneOf(['success', 'failure', 'warning', 'progress', 'default'])
|
|
105
147
|
})),
|
|
148
|
+
disabled: PropTypes.bool,
|
|
149
|
+
onClick: PropTypes.func,
|
|
106
150
|
isBulkStyle: PropTypes.bool,
|
|
107
151
|
isOverflowHidden: PropTypes.bool,
|
|
108
152
|
order: PropTypes.number,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","PropTypes","classnames","Tag","ButtonLink","BulletPointMenuButton","style","ListItem","buttonLink","secondButtonLink","bulletPointMenuButton","tags","title","dataColumns","order","ariaLabel","contentType","isBulkStyle","isOverflowHidden","isPublished","tagsView","convert","cap","tag","index","type","dataColumnsView","dataColumn","className","label","orderView","undefined","wrapper","gridLayout","dataColumnsWrapper","hiddenOverflowX","settings","propTypes","string","isRequired","arrayOf","shape","oneOf","dataName","icon","position","onClick","func","buttonAriaLabel","menuAriaLabel","buttons","bool","number","id"],"sources":["../../../src/organism/list-item/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {isEmpty, map} from 'lodash/fp';\nimport classnames from 'classnames';\nimport Tag from '../../atom/tag';\nimport ButtonLink from '../../atom/button-link';\nimport BulletPointMenuButton from '../../molecule/bullet-point-menu-button';\n// eslint-disable-next-line css-modules/no-unused-class\nimport style from './style.css';\n\nconst ListItem = ({\n buttonLink,\n secondButtonLink,\n bulletPointMenuButton,\n tags,\n title,\n dataColumns,\n order,\n 'aria-label': ariaLabel,\n contentType,\n isBulkStyle = false,\n isOverflowHidden = false\n}) => {\n let isPublished = false;\n\n const tagsView = map.convert({cap: false})((tag, index) => {\n isPublished = tag.type === 'success';\n return (\n <div key={index} className={style.tag}>\n <Tag {...tag} />\n </div>\n );\n })(tags);\n\n const dataColumnsView = map.convert({cap: false})((dataColumn, index) => {\n return (\n <div key={index} className={style[dataColumn.className]}>\n {dataColumn.type ? <Tag {...dataColumn} /> : dataColumn.label}\n </div>\n );\n })(dataColumns);\n\n const orderView =\n order !== null && order !== undefined ? (\n <div className={style.order} aria-label={ariaLabel}>\n {order + 1}\n </div>\n ) : null;\n\n return (\n <div className={classnames(style.wrapper, isBulkStyle && style.gridLayout)}>\n <div\n className={classnames(style.dataColumnsWrapper, isOverflowHidden && style.hiddenOverflowX)}\n >\n {isPublished && contentType === 'certification' ? orderView : null}\n <div className={style.title} title={title}>\n {title}\n </div>\n {dataColumnsView}\n </div>\n\n <div className={style.settings}>\n {tagsView}\n {buttonLink ? <ButtonLink {...buttonLink} /> : null}\n {secondButtonLink ? <ButtonLink {...secondButtonLink} /> : null}\n {!isEmpty(bulletPointMenuButton) ? (\n <BulletPointMenuButton {...bulletPointMenuButton} />\n ) : null}\n </div>\n </div>\n );\n};\n\nListItem.propTypes = {\n title: PropTypes.string.isRequired,\n dataColumns: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string,\n type: PropTypes.oneOf(['success', 'failure', 'warning', 'progress', 'default']),\n className: PropTypes.oneOf(['cell', 'title'])\n })\n ),\n buttonLink: PropTypes.shape({\n type: PropTypes.string,\n label: PropTypes.string,\n ariaLabel: PropTypes.string,\n dataName: PropTypes.string,\n icon: PropTypes.shape({\n position: PropTypes.string,\n type: PropTypes.string\n }),\n onClick: PropTypes.func\n }),\n secondButtonLink: PropTypes.shape({\n type: PropTypes.string,\n label: PropTypes.string,\n ariaLabel: PropTypes.string,\n dataName: PropTypes.string,\n icon: PropTypes.shape({\n position: PropTypes.string,\n type: PropTypes.string\n }),\n onClick: PropTypes.func\n }),\n bulletPointMenuButton: PropTypes.shape({\n buttonAriaLabel: PropTypes.string,\n menuAriaLabel: PropTypes.string,\n buttons: PropTypes.arrayOf(\n PropTypes.shape({\n 'data-name': PropTypes.string,\n label: PropTypes.string,\n type: PropTypes.string,\n onClick: PropTypes.func\n })\n ),\n onClick: PropTypes.func\n }),\n tags: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string,\n type: PropTypes.oneOf(['success', 'failure', 'warning', 'progress', 'default'])\n })\n ),\n isBulkStyle: PropTypes.bool,\n isOverflowHidden: PropTypes.bool,\n order: PropTypes.number,\n 'aria-label': PropTypes.string,\n contentType: PropTypes.string,\n id: PropTypes.string\n};\n\nexport default ListItem;\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,GAAP,MAAgB,gBAAhB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,qBAAP,MAAkC,yCAAlC,C,CACA;;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,QAAQ,GAAG,CAAC;EAChBC,UADgB;EAEhBC,gBAFgB;EAGhBC,qBAHgB;EAIhBC,IAJgB;EAKhBC,KALgB;EAMhBC,WANgB;EAOhBC,KAPgB;EAQhB,cAAcC,SARE;EAShBC,WATgB;EAUhBC,WAAW,GAAG,KAVE;EAWhBC,gBAAgB,GAAG;AAXH,CAAD,KAYX;EACJ,IAAIC,WAAW,GAAG,KAAlB;;EAEA,MAAMC,QAAQ,GAAG,KAAIC,OAAJ,CAAY;IAACC,GAAG,EAAE;EAAN,CAAZ,EAA0B,CAACC,GAAD,EAAMC,KAAN,KAAgB;IACzDL,WAAW,GAAGI,GAAG,CAACE,IAAJ,KAAa,SAA3B;IACA,oBACE;MAAK,GAAG,EAAED,KAAV;MAAiB,SAAS,EA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on","ButtonLink","BulletPointMenuButton","style","ListItem","buttonLink","secondButtonLink","bulletPointMenuButton","tags","title","selected","subtitle","dataColumns","order","ariaLabel","disabled","contentType","isBulkStyle","isOverflowHidden","onClick","context","skin","primarySkinColor","mapUncapped","cap","isPublished","selectedStyle","backgroundColor","tagSelectedStyle","color","tagsView","tag","index","type","dataColumnsView","dataColumn","className","label","orderView","undefined","wrapper","gridLayout","withSubtitle","dataColumnsWrapper","hiddenOverflowX","settings","faSize","wrapperSize","contextTypes","childContextTypes","translate","propTypes","string","isRequired","bool","arrayOf","shape","oneOf","dataName","icon","position","func","buttonAriaLabel","menuAriaLabel","buttons","number","id"],"sources":["../../../src/organism/list-item/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {isEmpty, map, noop, get} from 'lodash/fp';\nimport {convert} from 'css-color-function';\nimport classnames from 'classnames';\nimport Provider from '../../atom/provider';\nimport Tag from '../../atom/tag';\nimport Icon from '../../atom/icon';\nimport ButtonLink from '../../atom/button-link';\nimport BulletPointMenuButton from '../../molecule/bullet-point-menu-button';\n// eslint-disable-next-line css-modules/no-unused-class\nimport style from './style.css';\n\nconst ListItem = (\n {\n buttonLink,\n secondButtonLink,\n bulletPointMenuButton,\n tags,\n title,\n selected,\n subtitle,\n dataColumns,\n order,\n 'aria-label': ariaLabel,\n disabled = false,\n contentType,\n isBulkStyle = false,\n isOverflowHidden = false,\n onClick = noop\n },\n context\n) => {\n const {skin} = context;\n const primarySkinColor = get('common.primary', skin);\n const mapUncapped = map.convert({cap: false});\n let isPublished = false;\n\n const selectedStyle = selected\n ? {\n backgroundColor: convert(`color(${primarySkinColor} a(0.07))`)\n }\n : {};\n\n const tagSelectedStyle = selected\n ? {\n backgroundColor: convert(`color(${primarySkinColor} a(0.15))`),\n color: primarySkinColor\n }\n : {};\n\n const tagsView = mapUncapped((tag, index) => {\n isPublished = tag.type === 'success';\n return (\n <div key={index} className={style.tag}>\n <Tag {...tag} customStyle={tagSelectedStyle} />\n </div>\n );\n })(tags);\n\n const dataColumnsView = mapUncapped((dataColumn, index) => {\n return (\n <div key={index} className={style[dataColumn.className]}>\n {dataColumn.type ? <Tag {...dataColumn} /> : dataColumn.label}\n </div>\n );\n })(dataColumns);\n\n const orderView =\n order !== null && order !== undefined ? (\n <div className={style.order} aria-label={ariaLabel}>\n {order + 1}\n </div>\n ) : null;\n\n return (\n <div\n className={classnames(\n style.wrapper,\n isBulkStyle && style.gridLayout,\n subtitle && style.withSubtitle,\n disabled && style.disabled\n )}\n onClick={!disabled ? onClick : undefined}\n style={selectedStyle}\n >\n <div\n className={classnames(style.dataColumnsWrapper, isOverflowHidden && style.hiddenOverflowX)}\n >\n {isPublished && contentType === 'certification' ? orderView : null}\n <div className={style.title} title={title}>\n {title}\n <div className={style.subtitle}>{subtitle}</div>\n </div>\n {dataColumnsView}\n </div>\n\n <div className={style.settings}>\n {tagsView}\n {selected ? (\n <Icon\n iconName=\"circle-check\"\n iconColor={primarySkinColor}\n backgroundColor={'#ffffff'}\n size={{faSize: 16, wrapperSize: 16}}\n />\n ) : null}\n {buttonLink ? <ButtonLink {...buttonLink} /> : null}\n {secondButtonLink ? <ButtonLink {...secondButtonLink} /> : null}\n {!isEmpty(bulletPointMenuButton) ? (\n <BulletPointMenuButton {...bulletPointMenuButton} />\n ) : null}\n </div>\n </div>\n );\n};\n\nListItem.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nListItem.propTypes = {\n title: PropTypes.string.isRequired,\n subtitle: PropTypes.string,\n selected: PropTypes.bool,\n dataColumns: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string,\n type: PropTypes.oneOf(['success', 'failure', 'warning', 'progress', 'default']),\n className: PropTypes.oneOf(['cell', 'title'])\n })\n ),\n buttonLink: PropTypes.shape({\n type: PropTypes.string,\n label: PropTypes.string,\n ariaLabel: PropTypes.string,\n dataName: PropTypes.string,\n icon: PropTypes.shape({\n position: PropTypes.string,\n type: PropTypes.string\n }),\n onClick: PropTypes.func\n }),\n secondButtonLink: PropTypes.shape({\n type: PropTypes.string,\n label: PropTypes.string,\n ariaLabel: PropTypes.string,\n dataName: PropTypes.string,\n icon: PropTypes.shape({\n position: PropTypes.string,\n type: PropTypes.string\n }),\n onClick: PropTypes.func\n }),\n bulletPointMenuButton: PropTypes.shape({\n buttonAriaLabel: PropTypes.string,\n menuAriaLabel: PropTypes.string,\n buttons: PropTypes.arrayOf(\n PropTypes.shape({\n 'data-name': PropTypes.string,\n label: PropTypes.string,\n type: PropTypes.string,\n onClick: PropTypes.func\n })\n ),\n onClick: PropTypes.func\n }),\n tags: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string,\n type: PropTypes.oneOf(['success', 'failure', 'warning', 'progress', 'default'])\n })\n ),\n disabled: PropTypes.bool,\n onClick: PropTypes.func,\n isBulkStyle: PropTypes.bool,\n isOverflowHidden: PropTypes.bool,\n order: PropTypes.number,\n 'aria-label': PropTypes.string,\n contentType: PropTypes.string,\n id: PropTypes.string\n};\n\nexport default ListItem;\n"],"mappings":";;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,SAAQC,OAAR,QAAsB,oBAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,QAAP,MAAqB,qBAArB;AACA,OAAOC,GAAP,MAAgB,gBAAhB;AACA,OAAOC,IAAP,MAAiB,iBAAjB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,qBAAP,MAAkC,yCAAlC,C,CACA;;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,QAAQ,GAAG,CACf;EACEC,UADF;EAEEC,gBAFF;EAGEC,qBAHF;EAIEC,IAJF;EAKEC,KALF;EAMEC,QANF;EAOEC,QAPF;EAQEC,WARF;EASEC,KATF;EAUE,cAAcC,SAVhB;EAWEC,QAAQ,GAAG,KAXb;EAYEC,WAZF;EAa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A;EAsDnB5C,WAAW,EAAEtB,SAAS,CAAC2D,IAtDJ;EAuDnBpC,gBAAgB,EAAEvB,SAAS,CAAC2D,IAvDT;EAwDnBzC,KAAK,EAAElB,SAAS,CAACsE,MAxDE;EAyDnB,cAActE,SAAS,CAACyD,MAzDL;EA0DnBpC,WAAW,EAAErB,SAAS,CAACyD,MA1DJ;EA2DnBc,EAAE,EAAEvE,SAAS,CAACyD;AA3DK,CAArB;AA8DA,eAAehD,QAAf"}
|
|
@@ -24,11 +24,16 @@
|
|
|
24
24
|
grid-template-columns: 60% auto;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
.disabled {
|
|
28
|
+
opacity: 0.5;
|
|
29
|
+
}
|
|
30
|
+
|
|
27
31
|
.title {
|
|
28
32
|
color: cm_grey_900;
|
|
29
33
|
display: flex;
|
|
34
|
+
flex-direction: column;
|
|
30
35
|
height: 56px;
|
|
31
|
-
|
|
36
|
+
justify-content: center;
|
|
32
37
|
flex: 2 0 0;
|
|
33
38
|
font-family: Gilroy;
|
|
34
39
|
font-size: 16px;
|
|
@@ -42,6 +47,13 @@
|
|
|
42
47
|
white-space: nowrap;
|
|
43
48
|
}
|
|
44
49
|
|
|
50
|
+
.subtitle {
|
|
51
|
+
font-size: 14px;
|
|
52
|
+
font-weight: 500;
|
|
53
|
+
line-height: 20px;
|
|
54
|
+
color: cm_grey_400;
|
|
55
|
+
}
|
|
56
|
+
|
|
45
57
|
.settings {
|
|
46
58
|
align-items: center;
|
|
47
59
|
display: flex;
|
|
@@ -96,4 +108,12 @@
|
|
|
96
108
|
|
|
97
109
|
.hiddenOverflowX:hover {
|
|
98
110
|
overflow-x: auto;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.withSubtitle {
|
|
114
|
+
padding: 8px 16px;
|
|
115
|
+
|
|
116
|
+
.setting {
|
|
117
|
+
gap: 8px;
|
|
118
|
+
}
|
|
99
119
|
}
|
|
@@ -27,6 +27,8 @@ declare namespace ListItems {
|
|
|
27
27
|
download: PropTypes.Requireable<boolean>;
|
|
28
28
|
target: PropTypes.Requireable<string>;
|
|
29
29
|
}>>;
|
|
30
|
+
hoverBackgroundColor: PropTypes.Requireable<string>;
|
|
31
|
+
hoverColor: PropTypes.Requireable<string>;
|
|
30
32
|
disabled: PropTypes.Requireable<boolean>;
|
|
31
33
|
className: PropTypes.Requireable<string>;
|
|
32
34
|
customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
@@ -52,6 +54,8 @@ declare namespace ListItems {
|
|
|
52
54
|
content: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
|
|
53
55
|
items: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
54
56
|
title: PropTypes.Validator<string>;
|
|
57
|
+
subtitle: PropTypes.Requireable<string>;
|
|
58
|
+
selected: PropTypes.Requireable<boolean>;
|
|
55
59
|
dataColumns: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
56
60
|
label: PropTypes.Requireable<string>;
|
|
57
61
|
type: PropTypes.Requireable<string>;
|
|
@@ -94,6 +98,8 @@ declare namespace ListItems {
|
|
|
94
98
|
label: PropTypes.Requireable<string>;
|
|
95
99
|
type: PropTypes.Requireable<string>;
|
|
96
100
|
}> | null | undefined)[]>;
|
|
101
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
102
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
97
103
|
isBulkStyle: PropTypes.Requireable<boolean>;
|
|
98
104
|
isOverflowHidden: PropTypes.Requireable<boolean>;
|
|
99
105
|
order: PropTypes.Requireable<number>;
|
|
@@ -159,6 +165,8 @@ declare namespace ListItems {
|
|
|
159
165
|
download: PropTypes.Requireable<boolean>;
|
|
160
166
|
target: PropTypes.Requireable<string>;
|
|
161
167
|
}>>;
|
|
168
|
+
hoverBackgroundColor: PropTypes.Requireable<string>;
|
|
169
|
+
hoverColor: PropTypes.Requireable<string>;
|
|
162
170
|
disabled: PropTypes.Requireable<boolean>;
|
|
163
171
|
className: PropTypes.Requireable<string>;
|
|
164
172
|
customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|