@coorpacademy/components 11.13.7-alpha.9 → 11.14.1-alpha.2
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/index.d.ts.map +1 -1
- package/es/atom/button/index.js +18 -13
- package/es/atom/button/index.js.map +1 -1
- package/es/molecule/cm-popin/index.d.ts.map +1 -1
- package/es/molecule/cm-popin/index.js +5 -4
- package/es/molecule/cm-popin/index.js.map +1 -1
- package/es/molecule/cm-popin/style.css +61 -40
- package/es/molecule/discipline-header/index.d.ts +1 -0
- package/es/molecule/discipline-header/index.d.ts.map +1 -1
- package/es/molecule/discipline-header/index.js +24 -9
- package/es/molecule/discipline-header/index.js.map +1 -1
- package/es/molecule/discipline-header/style.css +34 -7
- package/es/template/common/discipline/index.d.ts.map +1 -1
- package/es/template/common/discipline/index.js +4 -2
- package/es/template/common/discipline/index.js.map +1 -1
- package/es/template/external-course/index.d.ts +69 -21
- package/es/template/external-course/index.d.ts.map +1 -1
- package/es/template/external-course/index.js +73 -56
- package/es/template/external-course/index.js.map +1 -1
- package/es/template/external-course/style.css +1 -1
- package/es/template/mobile-login/welcome/index.native.d.ts +18 -0
- package/es/template/mobile-login/welcome/index.native.d.ts.map +1 -0
- package/es/template/mobile-login/welcome/index.native.js +195 -0
- package/es/template/mobile-login/welcome/index.native.js.map +1 -0
- package/lib/atom/button/index.d.ts.map +1 -1
- package/lib/atom/button/index.js +18 -13
- package/lib/atom/button/index.js.map +1 -1
- package/lib/molecule/cm-popin/index.d.ts.map +1 -1
- package/lib/molecule/cm-popin/index.js +4 -3
- package/lib/molecule/cm-popin/index.js.map +1 -1
- package/lib/molecule/cm-popin/style.css +61 -40
- package/lib/molecule/discipline-header/index.d.ts +1 -0
- package/lib/molecule/discipline-header/index.d.ts.map +1 -1
- package/lib/molecule/discipline-header/index.js +25 -9
- package/lib/molecule/discipline-header/index.js.map +1 -1
- package/lib/molecule/discipline-header/style.css +34 -7
- package/lib/template/common/discipline/index.d.ts.map +1 -1
- package/lib/template/common/discipline/index.js +4 -2
- package/lib/template/common/discipline/index.js.map +1 -1
- package/lib/template/external-course/index.d.ts +69 -21
- package/lib/template/external-course/index.d.ts.map +1 -1
- package/lib/template/external-course/index.js +76 -54
- package/lib/template/external-course/index.js.map +1 -1
- package/lib/template/external-course/style.css +1 -1
- package/lib/template/mobile-login/welcome/index.native.d.ts +18 -0
- package/lib/template/mobile-login/welcome/index.native.d.ts.map +1 -0
- package/lib/template/mobile-login/welcome/index.native.js +212 -0
- package/lib/template/mobile-login/welcome/index.native.js.map +1 -0
- package/package.json +3 -3
- package/es/atom/form-text-input/index.d.ts +0 -27
- package/es/atom/form-text-input/index.d.ts.map +0 -1
- package/es/atom/form-text-input/index.js +0 -96
- package/es/atom/form-text-input/index.js.map +0 -1
- package/es/atom/form-text-input/prop-types.d.ts +0 -56
- package/es/atom/form-text-input/prop-types.d.ts.map +0 -1
- package/es/atom/form-text-input/prop-types.js +0 -35
- package/es/atom/form-text-input/prop-types.js.map +0 -1
- package/es/atom/form-text-input/style.css +0 -53
- package/lib/atom/form-text-input/index.d.ts +0 -27
- package/lib/atom/form-text-input/index.d.ts.map +0 -1
- package/lib/atom/form-text-input/index.js +0 -114
- package/lib/atom/form-text-input/index.js.map +0 -1
- package/lib/atom/form-text-input/prop-types.d.ts +0 -56
- package/lib/atom/form-text-input/prop-types.d.ts.map +0 -1
- package/lib/atom/form-text-input/prop-types.js +0 -46
- package/lib/atom/form-text-input/prop-types.js.map +0 -1
- package/lib/atom/form-text-input/style.css +0 -53
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
2
|
+
import { StyleSheet, Text, View } from 'react-native';
|
|
3
|
+
import LinearGradient from 'react-native-linear-gradient';
|
|
4
|
+
import { NovaCompositionCoorpacademyLogoCoorp as LogoCoorp, NovaCompositionCoorpacademyQrCode as QrCodeIcon, NovaCompositionCoorpacademyEmail as MailIcon } from '@coorpacademy/nova-icons';
|
|
5
|
+
import Touchable from '../../../hoc/touchable/index.native';
|
|
6
|
+
import { useTemplateContext } from '../../app-review/template-context';
|
|
7
|
+
|
|
8
|
+
const createStyleSheet = theme => StyleSheet.create({
|
|
9
|
+
wrapper: {
|
|
10
|
+
top: 0,
|
|
11
|
+
bottom: 0,
|
|
12
|
+
left: 0,
|
|
13
|
+
right: 0,
|
|
14
|
+
flex: 1,
|
|
15
|
+
justifyContent: 'space-around',
|
|
16
|
+
alignItems: 'center',
|
|
17
|
+
paddingHorizontal: 24
|
|
18
|
+
},
|
|
19
|
+
content: {
|
|
20
|
+
width: '100%',
|
|
21
|
+
alignItems: 'flex-start'
|
|
22
|
+
},
|
|
23
|
+
gradient: {
|
|
24
|
+
position: 'absolute',
|
|
25
|
+
top: -100,
|
|
26
|
+
bottom: 0,
|
|
27
|
+
left: -180,
|
|
28
|
+
right: 0,
|
|
29
|
+
opacity: 1,
|
|
30
|
+
transform: [{
|
|
31
|
+
rotate: '35deg'
|
|
32
|
+
}]
|
|
33
|
+
},
|
|
34
|
+
gradient2: {
|
|
35
|
+
position: 'absolute',
|
|
36
|
+
top: -80,
|
|
37
|
+
bottom: 0,
|
|
38
|
+
left: 0,
|
|
39
|
+
right: -200,
|
|
40
|
+
opacity: 0.5,
|
|
41
|
+
transform: [{
|
|
42
|
+
rotate: '-35deg'
|
|
43
|
+
}]
|
|
44
|
+
},
|
|
45
|
+
logo: {
|
|
46
|
+
padding: 100
|
|
47
|
+
},
|
|
48
|
+
title: {
|
|
49
|
+
fontWeight: '600',
|
|
50
|
+
fontSize: 28,
|
|
51
|
+
lineHeight: 36,
|
|
52
|
+
paddingVertical: 8
|
|
53
|
+
},
|
|
54
|
+
description: {
|
|
55
|
+
fontSize: 18,
|
|
56
|
+
lineHeight: 24,
|
|
57
|
+
paddingVertical: 8
|
|
58
|
+
},
|
|
59
|
+
actions: {
|
|
60
|
+
width: '100%'
|
|
61
|
+
},
|
|
62
|
+
buttons: {
|
|
63
|
+
paddingVertical: 20,
|
|
64
|
+
alignItems: 'center'
|
|
65
|
+
},
|
|
66
|
+
button: {
|
|
67
|
+
paddingVertical: 12,
|
|
68
|
+
marginVertical: 4,
|
|
69
|
+
width: '100%',
|
|
70
|
+
flexDirection: 'row',
|
|
71
|
+
justifyContent: 'center',
|
|
72
|
+
borderRadius: 12,
|
|
73
|
+
alignItems: 'center',
|
|
74
|
+
overflow: 'hidden'
|
|
75
|
+
},
|
|
76
|
+
ctaQRCode: {
|
|
77
|
+
backgroundColor: theme.colors.cta
|
|
78
|
+
},
|
|
79
|
+
ctaQRCodeText: {
|
|
80
|
+
marginLeft: 8,
|
|
81
|
+
color: '#fff',
|
|
82
|
+
fontWeight: '700',
|
|
83
|
+
fontSize: 14,
|
|
84
|
+
lineHeight: 24
|
|
85
|
+
},
|
|
86
|
+
qrCodeIcon: {
|
|
87
|
+
fill: '#fff',
|
|
88
|
+
height: 14,
|
|
89
|
+
width: 14
|
|
90
|
+
},
|
|
91
|
+
ctaReceiveMail: {
|
|
92
|
+
backgroundColor: '#eaeaeb'
|
|
93
|
+
},
|
|
94
|
+
ctaReceiveMailText: {
|
|
95
|
+
marginLeft: 8,
|
|
96
|
+
color: '#1D1D2B',
|
|
97
|
+
fontWeight: '700',
|
|
98
|
+
fontSize: 14,
|
|
99
|
+
lineHeight: 24
|
|
100
|
+
},
|
|
101
|
+
mailIcon: {
|
|
102
|
+
fill: '#1D1D2B',
|
|
103
|
+
height: 12,
|
|
104
|
+
width: 16
|
|
105
|
+
},
|
|
106
|
+
help: {
|
|
107
|
+
flexDirection: 'row',
|
|
108
|
+
justifyContent: 'center'
|
|
109
|
+
},
|
|
110
|
+
titleHelp: {
|
|
111
|
+
color: '#9999A8'
|
|
112
|
+
},
|
|
113
|
+
ctaHelp: {
|
|
114
|
+
marginLeft: 5,
|
|
115
|
+
textDecorationLine: 'underline',
|
|
116
|
+
color: '#9999A8'
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
const Welcome = props => {
|
|
121
|
+
const {
|
|
122
|
+
locales,
|
|
123
|
+
onDemoPress,
|
|
124
|
+
onDesktopButtonPress,
|
|
125
|
+
onHelpPress,
|
|
126
|
+
onMobileButtonPress
|
|
127
|
+
} = props;
|
|
128
|
+
const {
|
|
129
|
+
theme
|
|
130
|
+
} = useTemplateContext();
|
|
131
|
+
const [styleSheet, setStylesheet] = useState(null);
|
|
132
|
+
useEffect(() => {
|
|
133
|
+
const _stylesheet = createStyleSheet(theme);
|
|
134
|
+
|
|
135
|
+
setStylesheet(_stylesheet);
|
|
136
|
+
}, [theme]);
|
|
137
|
+
|
|
138
|
+
if (!styleSheet) {
|
|
139
|
+
return null;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
143
|
+
style: styleSheet.wrapper,
|
|
144
|
+
testID: "welcome"
|
|
145
|
+
}, /*#__PURE__*/React.createElement(LinearGradient, {
|
|
146
|
+
colors: ['#0061FF', '#fff'],
|
|
147
|
+
locations: [0, 0.3],
|
|
148
|
+
style: styleSheet.gradient
|
|
149
|
+
}), /*#__PURE__*/React.createElement(LinearGradient, {
|
|
150
|
+
colors: ['#2199AB', '#fff'],
|
|
151
|
+
locations: [0, 0.3],
|
|
152
|
+
style: styleSheet.gradient2
|
|
153
|
+
}), /*#__PURE__*/React.createElement(Touchable, {
|
|
154
|
+
onLongPress: onDemoPress,
|
|
155
|
+
style: styleSheet.logo
|
|
156
|
+
}, /*#__PURE__*/React.createElement(LogoCoorp, {
|
|
157
|
+
fill: theme.colors.cta,
|
|
158
|
+
width: 77,
|
|
159
|
+
height: 75
|
|
160
|
+
})), /*#__PURE__*/React.createElement(View, {
|
|
161
|
+
style: styleSheet.content
|
|
162
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
163
|
+
style: styleSheet.title
|
|
164
|
+
}, locales.title), /*#__PURE__*/React.createElement(Text, {
|
|
165
|
+
style: styleSheet.description
|
|
166
|
+
}, locales.description), /*#__PURE__*/React.createElement(View, {
|
|
167
|
+
style: styleSheet.actions
|
|
168
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
169
|
+
style: styleSheet.buttons
|
|
170
|
+
}, /*#__PURE__*/React.createElement(Touchable, {
|
|
171
|
+
style: [styleSheet.button, styleSheet.ctaQRCode],
|
|
172
|
+
onPress: onDesktopButtonPress
|
|
173
|
+
}, /*#__PURE__*/React.createElement(QrCodeIcon, {
|
|
174
|
+
style: styleSheet.qrCodeIcon
|
|
175
|
+
}), /*#__PURE__*/React.createElement(Text, {
|
|
176
|
+
style: styleSheet.ctaQRCodeText
|
|
177
|
+
}, locales.ctaQRCode)), /*#__PURE__*/React.createElement(Touchable, {
|
|
178
|
+
style: [styleSheet.button, styleSheet.ctaReceiveMail],
|
|
179
|
+
onPress: onMobileButtonPress
|
|
180
|
+
}, /*#__PURE__*/React.createElement(MailIcon, {
|
|
181
|
+
style: styleSheet.mailIcon
|
|
182
|
+
}), /*#__PURE__*/React.createElement(Text, {
|
|
183
|
+
style: styleSheet.ctaReceiveMailText
|
|
184
|
+
}, locales.ctaReceiveMail))), /*#__PURE__*/React.createElement(Touchable, {
|
|
185
|
+
onPress: onHelpPress,
|
|
186
|
+
style: styleSheet.help
|
|
187
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
188
|
+
style: styleSheet.titleHelp
|
|
189
|
+
}, locales.titleHelp), /*#__PURE__*/React.createElement(Text, {
|
|
190
|
+
style: styleSheet.ctaHelp
|
|
191
|
+
}, locales.ctaHelp)))));
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
export default Welcome;
|
|
195
|
+
//# sourceMappingURL=index.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.native.js","names":["React","useEffect","useState","StyleSheet","Text","View","LinearGradient","NovaCompositionCoorpacademyLogoCoorp","LogoCoorp","NovaCompositionCoorpacademyQrCode","QrCodeIcon","NovaCompositionCoorpacademyEmail","MailIcon","Touchable","useTemplateContext","createStyleSheet","theme","create","wrapper","top","bottom","left","right","flex","justifyContent","alignItems","paddingHorizontal","content","width","gradient","position","opacity","transform","rotate","gradient2","logo","padding","title","fontWeight","fontSize","lineHeight","paddingVertical","description","actions","buttons","button","marginVertical","flexDirection","borderRadius","overflow","ctaQRCode","backgroundColor","colors","cta","ctaQRCodeText","marginLeft","color","qrCodeIcon","fill","height","ctaReceiveMail","ctaReceiveMailText","mailIcon","help","titleHelp","ctaHelp","textDecorationLine","Welcome","props","locales","onDemoPress","onDesktopButtonPress","onHelpPress","onMobileButtonPress","styleSheet","setStylesheet","_stylesheet"],"sources":["../../../../src/template/mobile-login/welcome/index.native.tsx"],"sourcesContent":["import React, {useEffect, useState} from 'react';\nimport {StyleSheet, Text, TextStyle, View, ViewStyle} from 'react-native';\nimport LinearGradient from 'react-native-linear-gradient';\nimport {\n NovaCompositionCoorpacademyLogoCoorp as LogoCoorp,\n NovaCompositionCoorpacademyQrCode as QrCodeIcon,\n NovaCompositionCoorpacademyEmail as MailIcon\n} from '@coorpacademy/nova-icons';\nimport Touchable from '../../../hoc/touchable/index.native';\nimport {useTemplateContext} from '../../app-review/template-context';\nimport {Theme} from '../../../variables/theme.native';\n\ntype StyleSheetType = {\n wrapper: ViewStyle;\n logo: ViewStyle;\n content: ViewStyle;\n gradient: ViewStyle;\n gradient2: ViewStyle;\n title: TextStyle;\n description: TextStyle;\n actions: ViewStyle;\n buttons: ViewStyle;\n button: ViewStyle;\n qrCodeIcon: ViewStyle;\n mailIcon: ViewStyle;\n ctaQRCode: ViewStyle;\n ctaQRCodeText: TextStyle;\n ctaReceiveMail: ViewStyle;\n ctaReceiveMailText: TextStyle;\n help: ViewStyle;\n titleHelp: TextStyle;\n ctaHelp: ViewStyle;\n};\n\nconst createStyleSheet = (theme: Theme): StyleSheetType =>\n StyleSheet.create({\n wrapper: {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n flex: 1,\n justifyContent: 'space-around',\n alignItems: 'center',\n paddingHorizontal: 24\n },\n content: {\n width: '100%',\n alignItems: 'flex-start'\n },\n gradient: {\n position: 'absolute',\n top: -100,\n bottom: 0,\n left: -180,\n right: 0,\n opacity: 1,\n transform: [{rotate: '35deg'}]\n },\n gradient2: {\n position: 'absolute',\n top: -80,\n bottom: 0,\n left: 0,\n right: -200,\n opacity: 0.5,\n transform: [{rotate: '-35deg'}]\n },\n logo: {\n padding: 100\n },\n title: {\n fontWeight: '600',\n fontSize: 28,\n lineHeight: 36,\n paddingVertical: 8\n },\n description: {\n fontSize: 18,\n lineHeight: 24,\n paddingVertical: 8\n },\n actions: {\n width: '100%'\n },\n buttons: {\n paddingVertical: 20,\n alignItems: 'center'\n },\n button: {\n paddingVertical: 12,\n marginVertical: 4,\n width: '100%',\n flexDirection: 'row',\n justifyContent: 'center',\n borderRadius: 12,\n alignItems: 'center',\n overflow: 'hidden'\n },\n ctaQRCode: {\n backgroundColor: theme.colors.cta\n },\n ctaQRCodeText: {\n marginLeft: 8,\n color: '#fff',\n fontWeight: '700',\n fontSize: 14,\n lineHeight: 24\n },\n qrCodeIcon: {\n fill: '#fff',\n height: 14,\n width: 14\n },\n ctaReceiveMail: {\n backgroundColor: '#eaeaeb'\n },\n ctaReceiveMailText: {\n marginLeft: 8,\n color: '#1D1D2B',\n fontWeight: '700',\n fontSize: 14,\n lineHeight: 24\n },\n mailIcon: {\n fill: '#1D1D2B',\n height: 12,\n width: 16\n },\n help: {\n flexDirection: 'row',\n justifyContent: 'center'\n },\n titleHelp: {\n color: '#9999A8'\n },\n ctaHelp: {\n marginLeft: 5,\n textDecorationLine: 'underline',\n color: '#9999A8'\n }\n });\n\nexport type Props = {\n onDemoPress: () => void;\n onDesktopButtonPress: () => void;\n onHelpPress: () => void;\n onMobileButtonPress: () => void;\n locales: {\n title: string;\n description: string;\n ctaQRCode: string;\n ctaReceiveMail: string;\n titleHelp: string;\n ctaHelp: string;\n };\n};\n\nconst Welcome = (props: Props) => {\n const {locales, onDemoPress, onDesktopButtonPress, onHelpPress, onMobileButtonPress} = props;\n const {theme} = useTemplateContext();\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(theme);\n setStylesheet(_stylesheet);\n }, [theme]);\n\n if (!styleSheet) {\n return null;\n }\n\n return (\n <View style={styleSheet.wrapper} testID=\"welcome\">\n <LinearGradient\n colors={['#0061FF', '#fff']}\n locations={[0, 0.3]}\n style={styleSheet.gradient}\n />\n <LinearGradient\n colors={['#2199AB', '#fff']}\n locations={[0, 0.3]}\n style={styleSheet.gradient2}\n />\n <Touchable onLongPress={onDemoPress} style={styleSheet.logo}>\n <LogoCoorp fill={theme.colors.cta} width={77} height={75} />\n </Touchable>\n <View style={styleSheet.content}>\n <Text style={styleSheet.title}>{locales.title}</Text>\n <Text style={styleSheet.description}>{locales.description}</Text>\n\n <View style={styleSheet.actions}>\n <View style={styleSheet.buttons}>\n <Touchable\n style={[styleSheet.button, styleSheet.ctaQRCode]}\n onPress={onDesktopButtonPress}\n >\n <QrCodeIcon style={styleSheet.qrCodeIcon} />\n <Text style={styleSheet.ctaQRCodeText}>{locales.ctaQRCode}</Text>\n </Touchable>\n <Touchable\n style={[styleSheet.button, styleSheet.ctaReceiveMail]}\n onPress={onMobileButtonPress}\n >\n <MailIcon style={styleSheet.mailIcon} />\n <Text style={styleSheet.ctaReceiveMailText}>{locales.ctaReceiveMail}</Text>\n </Touchable>\n </View>\n <Touchable onPress={onHelpPress} style={styleSheet.help}>\n <Text style={styleSheet.titleHelp}>{locales.titleHelp}</Text>\n <Text style={styleSheet.ctaHelp}>{locales.ctaHelp}</Text>\n </Touchable>\n </View>\n </View>\n </View>\n );\n};\n\nexport default Welcome;\n"],"mappings":"AAAA,OAAOA,KAAP,IAAeC,SAAf,EAA0BC,QAA1B,QAAyC,OAAzC;AACA,SAAQC,UAAR,EAAoBC,IAApB,EAAqCC,IAArC,QAA2D,cAA3D;AACA,OAAOC,cAAP,MAA2B,8BAA3B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,OAA1C,CAFF,CAjBF,CAJF,CAdF,CADF;AA4CD,CA1DD;;AA4DA,eAAeE,OAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/button/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/button/index.js"],"names":[],"mappings":";AA8IA,iDAgCC"}
|
package/lib/atom/button/index.js
CHANGED
|
@@ -65,7 +65,8 @@ const ButtonContent = props => {
|
|
|
65
65
|
target: target,
|
|
66
66
|
className: anchorClassName,
|
|
67
67
|
style: style,
|
|
68
|
-
"aria-label": ariaLabel
|
|
68
|
+
"aria-label": ariaLabel,
|
|
69
|
+
"data-testid": dataTestid
|
|
69
70
|
}, submitValue || children || 'submit');
|
|
70
71
|
|
|
71
72
|
case 'a':
|
|
@@ -75,7 +76,8 @@ const ButtonContent = props => {
|
|
|
75
76
|
target: target,
|
|
76
77
|
className: anchorClassName,
|
|
77
78
|
onClick: anchorOnClick,
|
|
78
|
-
style: style
|
|
79
|
+
style: style,
|
|
80
|
+
"data-testid": dataTestid
|
|
79
81
|
}, submitValue || children);
|
|
80
82
|
|
|
81
83
|
case 'button':
|
|
@@ -99,17 +101,20 @@ const ButtonContent = props => {
|
|
|
99
101
|
// falls through in case type is button BUT no button tag is needed, for retro-compatibility
|
|
100
102
|
|
|
101
103
|
default:
|
|
102
|
-
|
|
103
|
-
"
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
104
|
+
{
|
|
105
|
+
return /*#__PURE__*/_react.default.createElement("input", {
|
|
106
|
+
"data-name": dataName,
|
|
107
|
+
type: type,
|
|
108
|
+
value: submitValue,
|
|
109
|
+
disabled: disabled,
|
|
110
|
+
onClick: onClick,
|
|
111
|
+
className: inputClassName,
|
|
112
|
+
"data-testid": dataTestid,
|
|
113
|
+
style: _extends({
|
|
114
|
+
color
|
|
115
|
+
}, style)
|
|
116
|
+
});
|
|
117
|
+
}
|
|
113
118
|
}
|
|
114
119
|
};
|
|
115
120
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["ButtonContent","props","color","submitValue","disabled","download","href","target","onClick","className","children","type","style","dataName","ariaLabel","dataTestid","useButtonTag","buttonRef","dataFor","dataTooltipPlace","dataTip","onKeyDown","noop","onMouseLeave","onMouseOver","anchorClassName","cssStyle","disabledAnchor","anchorOnClick","anchorHref","inputClassName","buttonDisabled","favorite","propTypes","ColorPropType","PropTypes","string","bool","oneOf","node","shape","func","Button","buttonContentClassName","isLinkDisabled","useWrapper","buttonWrapperClassNames","useMemo","classnames","button","contentClassName","buttonContent"],"sources":["../../../src/atom/button/index.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport noop from 'lodash/fp/noop';\nimport {ColorPropType} from '../../util/proptypes';\nimport Link from '../link';\nimport cssStyle from './style.css';\n\nconst ButtonContent = props => {\n const {\n color,\n submitValue,\n disabled,\n download,\n href,\n target,\n onClick,\n className,\n children,\n type,\n style,\n 'data-name': dataName,\n 'aria-label': ariaLabel,\n 'data-testid': dataTestid,\n useButtonTag,\n buttonRef,\n 'data-for': dataFor,\n 'data-tooltip-place': dataTooltipPlace,\n 'data-tip': dataTip,\n onKeyDown = noop,\n onMouseLeave = noop,\n onMouseOver = noop\n } = props;\n const anchorClassName = (disabled && `${className} ${cssStyle.disabledAnchor}`) || className;\n const anchorOnClick = (disabled && null) || onClick;\n const anchorHref = (disabled && null) || href;\n const inputClassName = (disabled && `${className} ${cssStyle.buttonDisabled}`) || className;\n\n switch (type) {\n case 'link':\n return (\n <Link\n data-name={dataName}\n href={anchorHref}\n download={download}\n onClick={anchorOnClick}\n target={target}\n className={anchorClassName}\n style={style}\n aria-label={ariaLabel}\n >\n {submitValue || children || 'submit'}\n </Link>\n );\n\n case 'a':\n return (\n <a\n data-name={dataName}\n href={anchorHref}\n target={target}\n className={anchorClassName}\n onClick={anchorOnClick}\n style={style}\n >\n {submitValue || children}\n </a>\n );\n\n case 'button':\n if (useButtonTag)\n return (\n <button\n ref={buttonRef}\n type=\"button\"\n data-for={dataFor}\n data-tooltip-place={dataTooltipPlace}\n data-tip={dataTip}\n data-name={dataName}\n data-testid={dataTestid}\n aria-label={ariaLabel.favorite}\n className={className}\n onClick={onClick}\n style={style}\n onKeyDown={onKeyDown}\n onMouseLeave={onMouseLeave}\n onMouseOver={onMouseOver}\n tabIndex={0}\n >\n {children}\n </button>\n );\n // falls through in case type is button BUT no button tag is needed, for retro-compatibility\n default
|
|
1
|
+
{"version":3,"file":"index.js","names":["ButtonContent","props","color","submitValue","disabled","download","href","target","onClick","className","children","type","style","dataName","ariaLabel","dataTestid","useButtonTag","buttonRef","dataFor","dataTooltipPlace","dataTip","onKeyDown","noop","onMouseLeave","onMouseOver","anchorClassName","cssStyle","disabledAnchor","anchorOnClick","anchorHref","inputClassName","buttonDisabled","favorite","propTypes","ColorPropType","PropTypes","string","bool","oneOf","node","shape","func","Button","buttonContentClassName","isLinkDisabled","useWrapper","buttonWrapperClassNames","useMemo","classnames","button","contentClassName","buttonContent"],"sources":["../../../src/atom/button/index.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport noop from 'lodash/fp/noop';\nimport {ColorPropType} from '../../util/proptypes';\nimport Link from '../link';\nimport cssStyle from './style.css';\n\nconst ButtonContent = props => {\n const {\n color,\n submitValue,\n disabled,\n download,\n href,\n target,\n onClick,\n className,\n children,\n type,\n style,\n 'data-name': dataName,\n 'aria-label': ariaLabel,\n 'data-testid': dataTestid,\n useButtonTag,\n buttonRef,\n 'data-for': dataFor,\n 'data-tooltip-place': dataTooltipPlace,\n 'data-tip': dataTip,\n onKeyDown = noop,\n onMouseLeave = noop,\n onMouseOver = noop\n } = props;\n const anchorClassName = (disabled && `${className} ${cssStyle.disabledAnchor}`) || className;\n const anchorOnClick = (disabled && null) || onClick;\n const anchorHref = (disabled && null) || href;\n const inputClassName = (disabled && `${className} ${cssStyle.buttonDisabled}`) || className;\n\n switch (type) {\n case 'link':\n return (\n <Link\n data-name={dataName}\n href={anchorHref}\n download={download}\n onClick={anchorOnClick}\n target={target}\n className={anchorClassName}\n style={style}\n aria-label={ariaLabel}\n data-testid={dataTestid}\n >\n {submitValue || children || 'submit'}\n </Link>\n );\n\n case 'a':\n return (\n <a\n data-name={dataName}\n href={anchorHref}\n target={target}\n className={anchorClassName}\n onClick={anchorOnClick}\n style={style}\n data-testid={dataTestid}\n >\n {submitValue || children}\n </a>\n );\n\n case 'button':\n if (useButtonTag)\n return (\n <button\n ref={buttonRef}\n type=\"button\"\n data-for={dataFor}\n data-tooltip-place={dataTooltipPlace}\n data-tip={dataTip}\n data-name={dataName}\n data-testid={dataTestid}\n aria-label={ariaLabel.favorite}\n className={className}\n onClick={onClick}\n style={style}\n onKeyDown={onKeyDown}\n onMouseLeave={onMouseLeave}\n onMouseOver={onMouseOver}\n tabIndex={0}\n >\n {children}\n </button>\n );\n // falls through in case type is button BUT no button tag is needed, for retro-compatibility\n default: {\n return (\n <input\n data-name={dataName}\n type={type}\n value={submitValue}\n disabled={disabled}\n onClick={onClick}\n className={inputClassName}\n data-testid={dataTestid}\n style={{\n color,\n ...style\n }}\n />\n );\n }\n }\n};\n\nButtonContent.propTypes = {\n color: ColorPropType,\n submitValue: PropTypes.string,\n disabled: PropTypes.bool,\n href: PropTypes.string,\n download: PropTypes.bool,\n target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top']),\n type: PropTypes.string,\n children: PropTypes.node,\n className: PropTypes.string,\n style: PropTypes.shape({}),\n 'data-name': PropTypes.string,\n 'aria-label': PropTypes.string,\n 'data-testid': PropTypes.string,\n useButtonTag: PropTypes.bool,\n // event handlers\n onClick: PropTypes.func,\n onKeyDown: PropTypes.func,\n onMouseLeave: PropTypes.func,\n onMouseOver: PropTypes.func,\n // for ReactTooltip handling\n buttonRef: PropTypes.shape({}),\n 'data-for': PropTypes.string,\n 'data-tooltip-place': PropTypes.string,\n 'data-tip': PropTypes.bool\n};\n\nconst Button = props => {\n const {\n className,\n buttonContentClassName,\n isLinkDisabled,\n type = 'submit',\n children,\n useWrapper = true\n } = props;\n const buttonWrapperClassNames = useMemo(\n () =>\n (isLinkDisabled && classnames([cssStyle.disabledAnchor, className])) ||\n classnames([cssStyle.button, className]),\n [className, isLinkDisabled]\n );\n\n const contentClassName = useMemo(\n () => (buttonContentClassName ? buttonContentClassName : cssStyle.buttonContent),\n [buttonContentClassName]\n );\n\n return useWrapper ? (\n <div className={buttonWrapperClassNames}>\n <ButtonContent {...props} type={type} className={contentClassName}>\n {children}\n </ButtonContent>\n </div>\n ) : (\n <ButtonContent {...props} type={type} className={contentClassName}>\n {children}\n </ButtonContent>\n );\n};\n\nButton.propTypes = {\n isLinkDisabled: PropTypes.bool,\n useWrapper: PropTypes.bool,\n buttonContentClassName: PropTypes.string,\n ...ButtonContent.propTypes\n};\n\nexport default Button;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,aAAa,GAAGC,KAAK,IAAI;EAC7B,MAAM;IACJC,KADI;IAEJC,WAFI;IAGJC,QAHI;IAIJC,QAJI;IAKJC,IALI;IAMJC,MANI;IAOJC,OAPI;IAQJC,SARI;IASJC,QATI;IAUJC,IAVI;IAWJC,KAXI;IAYJ,aAAaC,QAZT;IAaJ,cAAcC,SAbV;IAcJ,eAAeC,UAdX;IAeJC,YAfI;IAgBJC,SAhBI;IAiBJ,YAAYC,OAjBR;IAkBJ,sBAAsBC,gBAlBlB;IAmBJ,YAAYC,OAnBR;IAoBJC,SAAS,GAAGC,aApBR;IAqBJC,YAAY,GAAGD,aArBX;IAsBJE,WAAW,GAAGF;EAtBV,IAuBFrB,KAvBJ;EAwBA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,aAAa,CAACiC,SAJnB;eAOeS,M"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/cm-popin/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/cm-popin/index.js"],"names":[],"mappings":";AAeA,kDAoLC"}
|
|
@@ -40,7 +40,8 @@ const CMPopin = props => {
|
|
|
40
40
|
const logo = {
|
|
41
41
|
AlertDiamond: _novaIcons.NovaSolidInterfaceFeedbackInterfaceAlertDiamond,
|
|
42
42
|
WindowUpload: _novaIcons.NovaSolidApplicationsWindowUpload3,
|
|
43
|
-
MoonRocket: _novaIcons.NovaSolidSpaceMoonRocket
|
|
43
|
+
MoonRocket: _novaIcons.NovaSolidSpaceMoonRocket,
|
|
44
|
+
CheckCircle1: _novaIcons.NovaLineStatusCheckCircle1
|
|
44
45
|
};
|
|
45
46
|
const LogoComponent = logo[icon];
|
|
46
47
|
const backgroundImageStyle = backgroundImageUrl ? {
|
|
@@ -149,7 +150,7 @@ const CMPopin = props => {
|
|
|
149
150
|
}
|
|
150
151
|
}) : null), descriptionBtnTxt ? /*#__PURE__*/_react.default.createElement("div", {
|
|
151
152
|
className: _style.default.descriptionBtn
|
|
152
|
-
}, descriptionBtnTxt) : null, renderBtnSwitch(), /*#__PURE__*/_react.default.createElement("div", {
|
|
153
|
+
}, descriptionBtnTxt) : null, renderBtnSwitch(), firstButton || secondButton || thirdButton ? /*#__PURE__*/_react.default.createElement("div", {
|
|
153
154
|
className: _style.default.buttonContainer
|
|
154
155
|
}, firstButton ? /*#__PURE__*/_react.default.createElement("div", {
|
|
155
156
|
className: firstButton.largeButton ? _style.default.largeButton : _style.default.button
|
|
@@ -178,7 +179,7 @@ const CMPopin = props => {
|
|
|
178
179
|
"aria-label": thirdButton['aria-label'],
|
|
179
180
|
type: thirdButton.type,
|
|
180
181
|
customStyle: thirdButton.customStyle
|
|
181
|
-
})) : null)));
|
|
182
|
+
})) : null) : null));
|
|
182
183
|
};
|
|
183
184
|
|
|
184
185
|
CMPopin.propTypes = process.env.NODE_ENV !== "production" ? _types.default : {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["CMPopin","props","content","mode","firstButton","secondButton","onClose","header","icon","backgroundImageUrl","descriptionText","thirdButton","cookieTitle","descriptionBtnTxt","listBtnSwicth","logo","AlertDiamond","WindowUpload","MoonRocket","LogoComponent","backgroundImageStyle","backgroundImage","backgroundSize","renderHeader","style","headerBackground","cookieHeader","cookieIconContainer","cookieIcon","getClassBtnSwitch","index","btnList","firstBtnSwitchContainer","length","lastBtnSwitchContainer","singleSwitchContainer","renderBtnSwitch","map","convert","cap","el","type","title","value","onChange","titlePosition","theme","details","requiredSelection","disabled","id","dataName","background","popinCookie","popin","popinHeader","cookieTitleContainer","titleContainer","contentSection","message","__html","descriptionBtn","buttonContainer","largeButton","button","label","handleOnclick","customStyle","propTypes"],"sources":["../../../src/molecule/cm-popin/index.js"],"sourcesContent":["import React from 'react';\nimport {\n NovaSolidInterfaceFeedbackInterfaceAlertDiamond as AlertDiamond,\n NovaSolidApplicationsWindowUpload3 as WindowUpload,\n NovaLineSettingsCookie as Cookie,\n NovaSolidSpaceMoonRocket as MoonRocket\n} from '@coorpacademy/nova-icons';\nimport map from 'lodash/fp/map';\nimport Cta from '../../atom/button-link';\nimport ButtonLinkIconOnly from '../../atom/button-link-icon-only';\nimport InputSwitch from '../../atom/input-switch';\nimport style from './style.css';\nimport propTypes from './types';\n\nconst CMPopin = props => {\n const {\n content,\n mode = 'alert',\n firstButton,\n secondButton,\n onClose,\n header,\n icon,\n backgroundImageUrl,\n descriptionText,\n thirdButton,\n cookieTitle,\n descriptionBtnTxt,\n listBtnSwicth\n } = props;\n\n const logo = {\n AlertDiamond,\n WindowUpload,\n MoonRocket\n };\n const LogoComponent = logo[icon];\n\n const backgroundImageStyle = backgroundImageUrl\n ? {\n backgroundImage: `url(${backgroundImageUrl})`,\n backgroundSize: 'cover'\n }\n : null;\n const renderHeader = () => {\n if (header) return <img className={style.headerBackground} src={header} />;\n if (mode === 'cookie')\n return (\n <div className={style.cookieHeader}>\n <div className={style.cookieIconContainer}>\n <Cookie className={style.cookieIcon} />\n </div>\n <div className={style.cookieTitle}>{cookieTitle}</div>\n </div>\n );\n return null;\n };\n const getClassBtnSwitch = (index, btnList) => {\n switch (index) {\n case 0:\n return style.firstBtnSwitchContainer;\n case btnList.length - 1:\n return style.lastBtnSwitchContainer;\n default:\n return style.singleSwitchContainer;\n }\n };\n const renderBtnSwitch = () => {\n return map.convert({cap: false})((el, index) => {\n const {\n type,\n title,\n value,\n onChange,\n titlePosition,\n theme,\n details,\n requiredSelection,\n disabled,\n id,\n 'data-name': dataName\n } = el;\n return (\n <div key={index} className={getClassBtnSwitch(index, listBtnSwicth)}>\n <InputSwitch\n {...{\n type,\n title,\n value,\n onChange,\n titlePosition,\n theme,\n details,\n requiredSelection,\n disabled,\n id,\n 'data-name': dataName\n }}\n />\n </div>\n );\n })(listBtnSwicth);\n };\n return (\n <div\n className={mode !== 'cookie' ? style.background : null}\n style={backgroundImageStyle}\n data-name={'cm-popin-container'}\n >\n <div className={mode === 'cookie' ? style.popinCookie : style.popin}>\n <header className={style.popinHeader}>\n {renderHeader()}\n {onClose ? (\n <ButtonLinkIconOnly\n onClick={onClose}\n data-name={'close-icon'}\n aria-label={'close-icon'}\n size=\"small\"\n icon=\"close\"\n />\n ) : null}\n </header>\n <div\n className={\n mode === 'cookie' || mode === 'information'\n ? style.cookieTitleContainer\n : style.titleContainer\n }\n >\n <div className={style.contentSection}>\n {LogoComponent ? <LogoComponent className={style.icon} /> : null}\n {content ? (\n <p\n className={mode === 'alert' ? style.content : style.message}\n data-name={'cm-popin-content'}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: content}}\n />\n ) : null}\n </div>\n {descriptionText ? (\n <p\n className={style.descriptionText}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: descriptionText}}\n />\n ) : null}\n </div>\n {descriptionBtnTxt ? <div className={style.descriptionBtn}>{descriptionBtnTxt}</div> : null}\n {renderBtnSwitch()}\n <div className={style.buttonContainer}>\n {firstButton ? (\n <div className={firstButton.largeButton ? style.largeButton : style.button}>\n <Cta\n label={firstButton.label}\n onClick={firstButton.handleOnclick}\n data-name={'cm-popin-cta'}\n aria-label={firstButton['aria-label']}\n type={firstButton.type}\n customStyle={firstButton.customStyle}\n />\n </div>\n ) : null}\n {secondButton ? (\n <div className={secondButton.largeButton ? style.largeButton : style.button}>\n <Cta\n label={secondButton.label}\n onClick={secondButton.handleOnclick}\n data-name={`cm-popin-cta-${secondButton.type}`}\n aria-label={secondButton['aria-label']}\n type={secondButton.type}\n customStyle={secondButton.customStyle}\n />\n </div>\n ) : null}\n {thirdButton ? (\n <div className={thirdButton.largeButton ? style.largeButton : style.button}>\n <Cta\n label={thirdButton.label}\n onClick={thirdButton.handleOnclick}\n data-name={`cm-popin-cta-${thirdButton.type}`}\n aria-label={thirdButton['aria-label']}\n type={thirdButton.type}\n customStyle={thirdButton.customStyle}\n />\n </div>\n ) : null}\n </div>\n </div>\n </div>\n );\n};\n\nCMPopin.propTypes = propTypes;\n\nexport default CMPopin;\n"],"mappings":";;;;;AAAA;;AACA;;AAMA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,MAAMA,OAAO,GAAGC,KAAK,IAAI;EACvB,MAAM;IACJC,OADI;IAEJC,IAAI,GAAG,OAFH;IAGJC,WAHI;IAIJC,YAJI;IAKJC,OALI;IAMJC,MANI;IAOJC,IAPI;IAQJC,kBARI;IASJC,eATI;IAUJC,WAVI;IAWJC,WAXI;IAYJC,iBAZI;IAaJC;EAbI,IAcFb,KAdJ;EAgBA,MAAMc,IAAI,GAAG;IACXC,YAAY,EAAZA,0DADW;IAEXC,YAAY,EAAZA,6CAFW;IAGXC,UAAU,EAAVA;EAHW,CAAb;EAKA,MA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oD,WAAZ,GAA0BvC,cAAA,CAAMuC,WAAhC,GAA8CvC,cAAA,CAAMwC;EAApE,gBACE,6BAAC,mBAAD;IACE,KAAK,EAAErD,WAAW,CAACsD,KADrB;IAEE,OAAO,EAAEtD,WAAW,CAACuD,aAFvB;IAGE,aAAY,gBAAevD,WAAW,CAAC8B,IAAK,EAH9C;IAIE,cAAY9B,WAAW,CAAC,YAAD,CAJzB;IAKE,IAAI,EAAEA,WAAW,CAAC8B,IALpB;IAME,WAAW,EAAE9B,WAAW,CAACwD;EAN3B,EADF,CADU,GAWR,IApCN,CAzCF,CALF,CADF;AAwFD,CAjLD;;AAmLAnE,OAAO,CAACoE,SAAR,2CAAoBA,cAApB;eAEepE,O"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["CMPopin","props","content","mode","firstButton","secondButton","onClose","header","icon","backgroundImageUrl","descriptionText","thirdButton","cookieTitle","descriptionBtnTxt","listBtnSwicth","logo","AlertDiamond","WindowUpload","MoonRocket","CheckCircle1","LogoComponent","backgroundImageStyle","backgroundImage","backgroundSize","renderHeader","style","headerBackground","cookieHeader","cookieIconContainer","cookieIcon","getClassBtnSwitch","index","btnList","firstBtnSwitchContainer","length","lastBtnSwitchContainer","singleSwitchContainer","renderBtnSwitch","map","convert","cap","el","type","title","value","onChange","titlePosition","theme","details","requiredSelection","disabled","id","dataName","background","popinCookie","popin","popinHeader","cookieTitleContainer","titleContainer","contentSection","message","__html","descriptionBtn","buttonContainer","largeButton","button","label","handleOnclick","customStyle","propTypes"],"sources":["../../../src/molecule/cm-popin/index.js"],"sourcesContent":["import React from 'react';\nimport {\n NovaSolidInterfaceFeedbackInterfaceAlertDiamond as AlertDiamond,\n NovaSolidApplicationsWindowUpload3 as WindowUpload,\n NovaLineSettingsCookie as Cookie,\n NovaSolidSpaceMoonRocket as MoonRocket,\n NovaLineStatusCheckCircle1 as CheckCircle1\n} from '@coorpacademy/nova-icons';\nimport map from 'lodash/fp/map';\nimport Cta from '../../atom/button-link';\nimport ButtonLinkIconOnly from '../../atom/button-link-icon-only';\nimport InputSwitch from '../../atom/input-switch';\nimport style from './style.css';\nimport propTypes from './types';\n\nconst CMPopin = props => {\n const {\n content,\n mode = 'alert',\n firstButton,\n secondButton,\n onClose,\n header,\n icon,\n backgroundImageUrl,\n descriptionText,\n thirdButton,\n cookieTitle,\n descriptionBtnTxt,\n listBtnSwicth\n } = props;\n\n const logo = {\n AlertDiamond,\n WindowUpload,\n MoonRocket,\n CheckCircle1\n };\n const LogoComponent = logo[icon];\n\n const backgroundImageStyle = backgroundImageUrl\n ? {\n backgroundImage: `url(${backgroundImageUrl})`,\n backgroundSize: 'cover'\n }\n : null;\n const renderHeader = () => {\n if (header) return <img className={style.headerBackground} src={header} />;\n if (mode === 'cookie')\n return (\n <div className={style.cookieHeader}>\n <div className={style.cookieIconContainer}>\n <Cookie className={style.cookieIcon} />\n </div>\n <div className={style.cookieTitle}>{cookieTitle}</div>\n </div>\n );\n return null;\n };\n const getClassBtnSwitch = (index, btnList) => {\n switch (index) {\n case 0:\n return style.firstBtnSwitchContainer;\n case btnList.length - 1:\n return style.lastBtnSwitchContainer;\n default:\n return style.singleSwitchContainer;\n }\n };\n const renderBtnSwitch = () => {\n return map.convert({cap: false})((el, index) => {\n const {\n type,\n title,\n value,\n onChange,\n titlePosition,\n theme,\n details,\n requiredSelection,\n disabled,\n id,\n 'data-name': dataName\n } = el;\n return (\n <div key={index} className={getClassBtnSwitch(index, listBtnSwicth)}>\n <InputSwitch\n {...{\n type,\n title,\n value,\n onChange,\n titlePosition,\n theme,\n details,\n requiredSelection,\n disabled,\n id,\n 'data-name': dataName\n }}\n />\n </div>\n );\n })(listBtnSwicth);\n };\n return (\n <div\n className={mode !== 'cookie' ? style.background : null}\n style={backgroundImageStyle}\n data-name={'cm-popin-container'}\n >\n <div className={mode === 'cookie' ? style.popinCookie : style.popin}>\n <header className={style.popinHeader}>\n {renderHeader()}\n {onClose ? (\n <ButtonLinkIconOnly\n onClick={onClose}\n data-name={'close-icon'}\n aria-label={'close-icon'}\n size=\"small\"\n icon=\"close\"\n />\n ) : null}\n </header>\n <div\n className={\n mode === 'cookie' || mode === 'information'\n ? style.cookieTitleContainer\n : style.titleContainer\n }\n >\n <div className={style.contentSection}>\n {LogoComponent ? <LogoComponent className={style.icon} /> : null}\n {content ? (\n <p\n className={mode === 'alert' ? style.content : style.message}\n data-name={'cm-popin-content'}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: content}}\n />\n ) : null}\n </div>\n {descriptionText ? (\n <p\n className={style.descriptionText}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: descriptionText}}\n />\n ) : null}\n </div>\n {descriptionBtnTxt ? <div className={style.descriptionBtn}>{descriptionBtnTxt}</div> : null}\n {renderBtnSwitch()}\n {firstButton || secondButton || thirdButton ? (\n <div className={style.buttonContainer}>\n {firstButton ? (\n <div className={firstButton.largeButton ? style.largeButton : style.button}>\n <Cta\n label={firstButton.label}\n onClick={firstButton.handleOnclick}\n data-name={'cm-popin-cta'}\n aria-label={firstButton['aria-label']}\n type={firstButton.type}\n customStyle={firstButton.customStyle}\n />\n </div>\n ) : null}\n {secondButton ? (\n <div className={secondButton.largeButton ? style.largeButton : style.button}>\n <Cta\n label={secondButton.label}\n onClick={secondButton.handleOnclick}\n data-name={`cm-popin-cta-${secondButton.type}`}\n aria-label={secondButton['aria-label']}\n type={secondButton.type}\n customStyle={secondButton.customStyle}\n />\n </div>\n ) : null}\n {thirdButton ? (\n <div className={thirdButton.largeButton ? style.largeButton : style.button}>\n <Cta\n label={thirdButton.label}\n onClick={thirdButton.handleOnclick}\n data-name={`cm-popin-cta-${thirdButton.type}`}\n aria-label={thirdButton['aria-label']}\n type={thirdButton.type}\n customStyle={thirdButton.customStyle}\n />\n </div>\n ) : null}\n </div>\n ) : null}\n </div>\n </div>\n );\n};\n\nCMPopin.propTypes = propTypes;\n\nexport default CMPopin;\n"],"mappings":";;;;;AAAA;;AACA;;AAOA;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,EAaG/D,YAAY,gBACX;IAAK,SAAS,EAAEA,YAAY,CAAC2D,WAAb,GAA2BvC,cAAA,CAAMuC,WAAjC,GAA+CvC,cAAA,CAAMwC;EAArE,gBACE,6BAAC,mBAAD;IACE,KAAK,EAAE5D,YAAY,CAAC6D,KADtB;IAEE,OAAO,EAAE7D,YAAY,CAAC8D,aAFxB;IAGE,aAAY,gBAAe9D,YAAY,CAACqC,IAAK,EAH/C;IAIE,cAAYrC,YAAY,CAAC,YAAD,CAJ1B;IAKE,IAAI,EAAEA,YAAY,CAACqC,IALrB;IAME,WAAW,EAAErC,YAAY,CAAC+D;EAN5B,EADF,CADW,GAWT,IAxBN,EAyBGzD,WAAW,gBACV;IAAK,SAAS,EAAEA,WAAW,CAACqD,WAAZ,GAA0BvC,cAAA,CAAMuC,WAAhC,GAA8CvC,cAAA,CAAMwC;EAApE,gBACE,6BAAC,mBAAD;IACE,KAAK,EAAEtD,WAAW,CAACuD,KADrB;IAEE,OAAO,EAAEvD,WAAW,CAACwD,aAFvB;IAGE,aAAY,gBAAexD,WAAW,CAAC+B,IAAK,EAH9C;IAIE,cAAY/B,WAAW,CAAC,YAAD,CAJzB;IAKE,IAAI,EAAEA,WAAW,CAAC+B,IALpB;IAME,WAAW,EAAE/B,WAAW,CAACyD;EAN3B,EADF,CADU,GAWR,IApCN,CADD,GAuCG,IAhFN,CALF,CADF;AA0FD,CApLD;;AAsLApE,OAAO,CAACqE,SAAR,2CAAoBA,cAApB;eAEerE,O"}
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
|
|
48
48
|
.popin {
|
|
49
49
|
overflow: auto;
|
|
50
|
-
width:
|
|
50
|
+
width: 434px;
|
|
51
51
|
flex-grow: 0;
|
|
52
52
|
margin: 16px;
|
|
53
53
|
padding: 16px 16px 20px 16px;
|
|
@@ -114,12 +114,12 @@
|
|
|
114
114
|
|
|
115
115
|
.button {
|
|
116
116
|
min-width: max-content;
|
|
117
|
-
width:
|
|
117
|
+
width: 161px;
|
|
118
118
|
padding: 8px;
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
.largeButton {
|
|
122
|
-
width:
|
|
122
|
+
width: 75%;
|
|
123
123
|
padding: 8px;
|
|
124
124
|
}
|
|
125
125
|
|
|
@@ -147,7 +147,11 @@
|
|
|
147
147
|
color: cm_grey_500;
|
|
148
148
|
font-style: normal;
|
|
149
149
|
white-space: pre-line;
|
|
150
|
-
margin
|
|
150
|
+
margin: 0px 32px;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.content {
|
|
154
|
+
margin: 20px 32px;
|
|
151
155
|
}
|
|
152
156
|
|
|
153
157
|
.cookieTitleContainer {
|
|
@@ -278,29 +282,21 @@ a {
|
|
|
278
282
|
}
|
|
279
283
|
|
|
280
284
|
@media tablet {
|
|
281
|
-
.popin {
|
|
282
|
-
position: fixed;
|
|
283
|
-
}
|
|
284
|
-
|
|
285
285
|
.popin {
|
|
286
286
|
width: 80%;
|
|
287
|
+
overflow: hidden;
|
|
287
288
|
}
|
|
288
289
|
|
|
289
290
|
.buttonContainer {
|
|
290
291
|
display: flex;
|
|
291
292
|
flex-wrap: wrap-reverse;
|
|
292
|
-
margin:
|
|
293
|
-
width: 85%;
|
|
293
|
+
margin: 12px 24px 32px 24px;
|
|
294
294
|
}
|
|
295
295
|
|
|
296
|
-
.button {
|
|
296
|
+
.largeButton, .button , .titleContainer {
|
|
297
297
|
width: 100%;
|
|
298
298
|
}
|
|
299
299
|
|
|
300
|
-
.titleContainer {
|
|
301
|
-
width: 85%;
|
|
302
|
-
}
|
|
303
|
-
|
|
304
300
|
.popinCookie {
|
|
305
301
|
position: fixed;
|
|
306
302
|
bottom: 10px;
|
|
@@ -310,40 +306,66 @@ a {
|
|
|
310
306
|
overflow-x: hidden;
|
|
311
307
|
overflow-y: auto;
|
|
312
308
|
}
|
|
313
|
-
.popinCookie .button{
|
|
309
|
+
.popinCookie .button {
|
|
314
310
|
width: 100%;
|
|
315
311
|
padding: 0px 0px 8px 0px
|
|
316
312
|
}
|
|
317
313
|
|
|
318
314
|
.popinCookie .largeButton {
|
|
319
|
-
padding: 8px 0px 0px 0px
|
|
315
|
+
padding: 8px 0px 0px 0px;
|
|
320
316
|
}
|
|
321
317
|
.popinCookie .message {
|
|
322
318
|
padding: 24px 24px 0px 24px
|
|
323
319
|
}
|
|
320
|
+
.descriptionText {
|
|
321
|
+
margin: 0px 16px;
|
|
322
|
+
}
|
|
323
|
+
.content {
|
|
324
|
+
margin: 20px 16px;
|
|
325
|
+
}
|
|
326
|
+
.message {
|
|
327
|
+
padding: 40px 16px 0px;
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
@media mobile {
|
|
332
|
+
.background {
|
|
333
|
+
padding: 0;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
.popin {
|
|
337
|
+
width: 80%;
|
|
338
|
+
overflow: hidden;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
.buttonContainer {
|
|
342
|
+
display: flex;
|
|
343
|
+
margin: 12px 16px 32px 16px;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
.button {
|
|
347
|
+
width: 100%;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
.titleContainer {
|
|
351
|
+
width: 100%;
|
|
352
|
+
margin: 0px 16px;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
.descriptionText {
|
|
356
|
+
margin: 0px 16px;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
.content {
|
|
360
|
+
margin: 16px 32px;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
.largeButton {
|
|
364
|
+
margin: 0px 32px;
|
|
365
|
+
}
|
|
324
366
|
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
position: fixed;
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
.popin {
|
|
331
|
-
width: 80%;
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
.buttonContainer {
|
|
335
|
-
display: flex;
|
|
336
|
-
margin: 48px 24px 32px 24px;
|
|
337
|
-
width: 85%;
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
.button {
|
|
341
|
-
width: 100%;
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
.titleContainer {
|
|
345
|
-
width: 85%;
|
|
346
|
-
}
|
|
367
|
+
.message {
|
|
368
|
+
padding: 40px 16px 0px;
|
|
347
369
|
}
|
|
348
370
|
}
|
|
349
371
|
|
|
@@ -355,7 +377,6 @@ button {
|
|
|
355
377
|
}
|
|
356
378
|
|
|
357
379
|
_:-ms-fullscreen,
|
|
358
|
-
.descriptionText,
|
|
359
380
|
.buttonContainer {
|
|
360
381
|
width: 85%;
|
|
361
382
|
}
|
|
@@ -39,6 +39,7 @@ declare class DisciplineHeader extends React.Component<any, any, any> {
|
|
|
39
39
|
}>>;
|
|
40
40
|
mimeType: PropTypes.Validator<string>;
|
|
41
41
|
}>>;
|
|
42
|
+
lastUpdated: PropTypes.Requireable<string>;
|
|
42
43
|
};
|
|
43
44
|
static contextTypes: {
|
|
44
45
|
translate: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/discipline-header/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/discipline-header/index.js"],"names":[],"mappings":";AA4BA;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAME;IAEF;;MAEE;IAEF,wBAQC;IANC;;;MAGC;IAKH,4BAIC;IAED,yBAEC;IAED,sBAqDC;CACF"}
|