@coorpacademy/components 11.10.3 → 11.10.4-alpha.1
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/input-switch/index.js +2 -1
- package/es/atom/input-switch/index.js.map +1 -1
- package/es/atom/link/index.d.ts +7 -15
- package/es/atom/link/index.d.ts.map +1 -1
- package/es/atom/link/index.js +71 -97
- package/es/atom/link/index.js.map +1 -1
- package/es/atom/tooltip/index.d.ts +7 -1
- package/es/atom/tooltip/index.d.ts.map +1 -1
- package/es/atom/tooltip/index.js +39 -14
- package/es/atom/tooltip/index.js.map +1 -1
- package/es/atom/tooltip/style.css +9 -0
- package/es/organism/user-preferences/index.d.ts.map +1 -1
- package/es/organism/user-preferences/index.js +20 -19
- package/es/organism/user-preferences/index.js.map +1 -1
- package/es/organism/user-preferences/style.css +5 -56
- package/es/organism/wizard-contents/index.d.ts +2 -2
- package/es/organism/wizard-contents/index.d.ts.map +1 -1
- package/es/organism/wizard-contents/index.js +32 -13
- package/es/organism/wizard-contents/index.js.map +1 -1
- package/es/organism/wizard-contents/style.css +46 -6
- package/es/template/activity/progression-item.d.ts +1 -1
- package/es/template/activity/progression-item.d.ts.map +1 -1
- package/es/template/activity/progression-item.js +3 -5
- package/es/template/activity/progression-item.js.map +1 -1
- package/es/template/back-office/brand-update/index.d.ts +2 -2
- package/lib/atom/input-switch/index.js +2 -1
- package/lib/atom/input-switch/index.js.map +1 -1
- package/lib/atom/link/index.d.ts +7 -15
- package/lib/atom/link/index.d.ts.map +1 -1
- package/lib/atom/link/index.js +75 -97
- package/lib/atom/link/index.js.map +1 -1
- package/lib/atom/tooltip/index.d.ts +7 -1
- package/lib/atom/tooltip/index.d.ts.map +1 -1
- package/lib/atom/tooltip/index.js +41 -14
- package/lib/atom/tooltip/index.js.map +1 -1
- package/lib/atom/tooltip/style.css +9 -0
- package/lib/organism/user-preferences/index.d.ts.map +1 -1
- package/lib/organism/user-preferences/index.js +23 -21
- package/lib/organism/user-preferences/index.js.map +1 -1
- package/lib/organism/user-preferences/style.css +5 -56
- package/lib/organism/wizard-contents/index.d.ts +2 -2
- package/lib/organism/wizard-contents/index.d.ts.map +1 -1
- package/lib/organism/wizard-contents/index.js +34 -13
- package/lib/organism/wizard-contents/index.js.map +1 -1
- package/lib/organism/wizard-contents/style.css +46 -6
- package/lib/template/activity/progression-item.d.ts +1 -1
- package/lib/template/activity/progression-item.d.ts.map +1 -1
- package/lib/template/activity/progression-item.js +3 -5
- package/lib/template/activity/progression-item.js.map +1 -1
- package/lib/template/back-office/brand-update/index.d.ts +2 -2
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","PropTypes","
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","PropTypes","isEmpty","map","GetTranslateFromContext","ToolTip","InputSwitch","style","Settings","props","translate","label","description","moreInfoAriaLabel","settings","infoIconTooltip","propTypes","string","isRequired","UserPreferences","preferences","groupAriaLabel","arrayOf","shape"],"sources":["../../../src/organism/user-preferences/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport isEmpty from 'lodash/fp/isEmpty';\nimport map from 'lodash/fp/map';\nimport {GetTranslateFromContext} from '../../atom/provider';\nimport ToolTip from '../../atom/tooltip';\nimport InputSwitch from '../../atom/input-switch';\nimport style from './style.css';\n\nconst Settings = props => {\n const translate = GetTranslateFromContext();\n const {label, description, moreInfoAriaLabel, ...settings} = props;\n return (\n <div className={style.settings}>\n <InputSwitch {...settings} />\n <span className={style.label} tabIndex={0}>\n {label}\n </span>\n {isEmpty(description) ? null : (\n <ToolTip\n TooltipContent={description}\n closeToolTipInformationTextAriaLabel={translate(\n 'Press the escape key to close the information text'\n )}\n data-testid=\"user-preferences-tooltip\"\n aria-label={moreInfoAriaLabel}\n iconContainerClassName={style.infoIconTooltip}\n fontSize={12}\n />\n )}\n </div>\n );\n};\n\nSettings.propTypes = {\n ...InputSwitch.propTypes,\n label: PropTypes.string.isRequired,\n description: PropTypes.string\n};\n\nconst UserPreferences = props => {\n const {preferences, moreInfoAriaLabel, groupAriaLabel} = props;\n\n return (\n <form>\n <div className={style.preferences} role=\"group\" aria-label={groupAriaLabel} tabIndex={0}>\n {map(\n settings => (\n <Settings {...settings} key={settings.label} moreInfoAriaLabel={moreInfoAriaLabel} />\n ),\n preferences\n )}\n </div>\n </form>\n );\n};\n\nUserPreferences.propTypes = {\n preferences: PropTypes.arrayOf(PropTypes.shape(Settings.propTypes)),\n moreInfoAriaLabel: PropTypes.string,\n groupAriaLabel: PropTypes.string\n};\n\nexport default UserPreferences;\n"],"mappings":";;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,eAAhB;AACA,SAAQC,uBAAR,QAAsC,qBAAtC;AACA,OAAOC,OAAP,MAAoB,oBAApB;AACA,OAAOC,WAAP,MAAwB,yBAAxB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,QAAQ,GAAGC,KAAK,IAAI;EACxB,MAAMC,SAAS,GAAGN,uBAAuB,EAAzC;;EACA,MAAM;IAACO,KAAD;IAAQC,WAAR;IAAqBC;EAArB,IAAuDJ,KAA7D;EAAA,MAAiDK,QAAjD,iCAA6DL,KAA7D;;EACA,oBACE;IAAK,SAAS,EAAEF,KAAK,CAACO;EAAtB,gBACE,oBAAC,WAAD,EAAiBA,QAAjB,CADF,eAEE;IAAM,SAAS,EAAEP,KAAK,CAACI,KAAvB;IAA8B,QAAQ,EAAE;EAAxC,GACGA,KADH,CAFF,EAKGT,OAAO,CAACU,WAAD,CAAP,GAAuB,IAAvB,gBACC,oBAAC,OAAD;IACE,cAAc,EAAEA,WADlB;IAEE,oCAAoC,EAAEF,SAAS,CAC7C,oDAD6C,CAFjD;IAKE,eAAY,0BALd;IAME,cAAYG,iBANd;IAOE,sBAAsB,EAAEN,KAAK,CAACQ,eAPhC;IAQE,QAAQ,EAAE;EARZ,EANJ,CADF;AAoBD,CAvBD;;AAyBAP,QAAQ,CAACQ,SAAT,wDACKV,WAAW,CAACU,SADjB;EAEEL,KAAK,EAAEV,SAAS,CAACgB,MAAV,CAAiBC,UAF1B;EAGEN,WAAW,EAAEX,SAAS,CAACgB;AAHzB;;AAMA,MAAME,eAAe,GAAGV,KAAK,IAAI;EAC/B,MAAM;IAACW,WAAD;IAAcP,iBAAd;IAAiCQ;EAAjC,IAAmDZ,KAAzD;EAEA,oBACE,+CACE;IAAK,SAAS,EAAEF,KAAK,CAACa,WAAtB;IAAmC,IAAI,EAAC,OAAxC;IAAgD,cAAYC,cAA5D;IAA4E,QAAQ,EAAE;EAAtF,GACGlB,GAAG,CACFW,QAAQ,iBACN,oBAAC,QAAD,eAAcA,QAAd;IAAwB,GAAG,EAAEA,QAAQ,CAACH,KAAtC;IAA6C,iBAAiB,EAAEE;EAAhE,GAFA,EAIFO,WAJE,CADN,CADF,CADF;AAYD,CAfD;;AAiBAD,eAAe,CAACH,SAAhB,2CAA4B;EAC1BI,WAAW,EAAEnB,SAAS,CAACqB,OAAV,CAAkBrB,SAAS,CAACsB,KAAV,CAAgBf,QAAQ,CAACQ,SAAzB,CAAlB,CADa;EAE1BH,iBAAiB,EAAEZ,SAAS,CAACgB,MAFH;EAG1BI,cAAc,EAAEpB,SAAS,CAACgB;AAHA,CAA5B;AAMA,eAAeE,eAAf"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
@value colors: "../../variables/colors.css";
|
|
2
2
|
@value dark from colors;
|
|
3
3
|
@value light from colors;
|
|
4
|
+
@value transparent from colors;
|
|
4
5
|
|
|
5
6
|
.preferences {
|
|
6
7
|
display: flex;
|
|
@@ -25,64 +26,12 @@
|
|
|
25
26
|
|
|
26
27
|
.label {
|
|
27
28
|
composes: fontBase;
|
|
29
|
+
position: relative;
|
|
30
|
+
top: 1px;
|
|
28
31
|
margin-left: 15px;
|
|
29
32
|
min-height: 18px;
|
|
30
33
|
}
|
|
31
34
|
|
|
32
|
-
.
|
|
33
|
-
|
|
34
|
-
align-items: center;
|
|
35
|
-
overflow: visible;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.showToolTip {
|
|
39
|
-
margin-top: 5px;
|
|
40
|
-
text-align: center;
|
|
41
|
-
visibility: hidden;
|
|
42
|
-
opacity: 0;
|
|
43
|
-
transition: opacity 0.8s;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.infoIcon {
|
|
47
|
-
cursor: pointer;
|
|
48
|
-
padding-left: 10px;
|
|
49
|
-
padding-right: 4px;
|
|
50
|
-
color: dark;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.showToolTip::before {
|
|
54
|
-
content: '';
|
|
55
|
-
display: inline-block;
|
|
56
|
-
visibility: hidden;
|
|
57
|
-
opacity: 0;
|
|
58
|
-
width: 7px;
|
|
59
|
-
height: 8px;
|
|
60
|
-
margin: 7.5px -4px 7.5px 0;
|
|
61
|
-
transform: rotate(-45deg);
|
|
62
|
-
transition: opacity 0.8s;
|
|
63
|
-
background-color: light;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.infoIcon:hover ~ .showToolTip {
|
|
67
|
-
visibility: visible;
|
|
68
|
-
opacity: 1;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.infoIcon:hover ~ .showToolTip::before {
|
|
72
|
-
visibility: visible;
|
|
73
|
-
opacity: 1;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.descriptionLabel {
|
|
77
|
-
composes: fontBase;
|
|
78
|
-
display: inline-block;
|
|
79
|
-
background-color: light;
|
|
80
|
-
padding: 4px 8px;
|
|
81
|
-
border-radius: 3px;
|
|
82
|
-
word-wrap: break-word;
|
|
83
|
-
color: dark;
|
|
84
|
-
max-width: 220px;
|
|
85
|
-
overflow: hidden;
|
|
86
|
-
text-align: left;
|
|
87
|
-
position: absolute;
|
|
35
|
+
.infoIconTooltip {
|
|
36
|
+
background: transparent;
|
|
88
37
|
}
|
|
@@ -12,7 +12,7 @@ declare namespace WizardContents {
|
|
|
12
12
|
done: PropTypes.Requireable<boolean>;
|
|
13
13
|
current: PropTypes.Requireable<boolean>;
|
|
14
14
|
}> | null | undefined)[]>;
|
|
15
|
-
const summary: PropTypes.
|
|
15
|
+
const summary: PropTypes.Requireable<PropTypes.InferProps<{
|
|
16
16
|
title: PropTypes.Requireable<string>;
|
|
17
17
|
side: PropTypes.Requireable<string>;
|
|
18
18
|
sections: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
@@ -45,7 +45,7 @@ declare namespace WizardContents {
|
|
|
45
45
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
46
46
|
'aria-label': PropTypes.Requireable<string>;
|
|
47
47
|
}>>;
|
|
48
|
-
}
|
|
48
|
+
}>>;
|
|
49
49
|
const content: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
|
|
50
50
|
type: PropTypes.Requireable<string>;
|
|
51
51
|
groups: PropTypes.Validator<(PropTypes.InferProps<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/wizard-contents/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/wizard-contents/index.js"],"names":[],"mappings":";AAmHA,yDAoCC"}
|
|
@@ -106,6 +106,23 @@ const buildActionZone = (previousStep, nextStep, side) => {
|
|
|
106
106
|
}, nextButton));
|
|
107
107
|
};
|
|
108
108
|
|
|
109
|
+
const THEMES = {
|
|
110
|
+
'no-summary': {
|
|
111
|
+
container: style.containerWithoutSummary,
|
|
112
|
+
footer: style.footerWithoutSummary,
|
|
113
|
+
actionFooter: style.actionFooterWithoutSummary,
|
|
114
|
+
leftSection: style.leftSectionWithoutSummary
|
|
115
|
+
},
|
|
116
|
+
summary: {
|
|
117
|
+
container: style.container,
|
|
118
|
+
footer: style.footer,
|
|
119
|
+
actionFooter: style.actionFooter,
|
|
120
|
+
leftSection: style.leftSection
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
const getTheme = summary => summary ? 'summary' : 'no-summary';
|
|
125
|
+
|
|
109
126
|
const WizardContents = props => {
|
|
110
127
|
const {
|
|
111
128
|
isLoading,
|
|
@@ -122,14 +139,8 @@ const WizardContents = props => {
|
|
|
122
139
|
}));
|
|
123
140
|
const rightActionView = buildActionZone(previousStep, nextStep, 'right');
|
|
124
141
|
const footerActionView = buildActionZone(previousStep, nextStep, 'footer');
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
"data-name": "content-summary"
|
|
128
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
129
|
-
className: style.leftSection
|
|
130
|
-
}, headerView, /*#__PURE__*/React.createElement("div", {
|
|
131
|
-
className: style.form
|
|
132
|
-
}, formView)), /*#__PURE__*/React.createElement("div", {
|
|
142
|
+
const currentStyle = THEMES[getTheme(summary)];
|
|
143
|
+
const summaryWrapper = /*#__PURE__*/React.createElement("div", {
|
|
133
144
|
className: style.rightSection,
|
|
134
145
|
"data-name": "summary-right-section"
|
|
135
146
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -139,14 +150,22 @@ const WizardContents = props => {
|
|
|
139
150
|
"data-name": "summary-zone"
|
|
140
151
|
}, /*#__PURE__*/React.createElement(WizardSummary, _extends({}, summary, {
|
|
141
152
|
side: 'right'
|
|
142
|
-
}))), rightActionView))
|
|
143
|
-
|
|
144
|
-
|
|
153
|
+
}))), rightActionView));
|
|
154
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
155
|
+
className: currentStyle.container,
|
|
156
|
+
"data-name": "content-summary"
|
|
145
157
|
}, /*#__PURE__*/React.createElement("div", {
|
|
158
|
+
className: currentStyle.leftSection
|
|
159
|
+
}, headerView, /*#__PURE__*/React.createElement("div", {
|
|
160
|
+
className: style.form
|
|
161
|
+
}, formView)), summary ? summaryWrapper : null, /*#__PURE__*/React.createElement("div", {
|
|
162
|
+
className: currentStyle.footer,
|
|
163
|
+
"data-name": "footer-section"
|
|
164
|
+
}, summary ? /*#__PURE__*/React.createElement("div", {
|
|
146
165
|
className: style.summaryFooter
|
|
147
166
|
}, /*#__PURE__*/React.createElement(WizardSummary, _extends({}, summary, {
|
|
148
167
|
side: 'footer'
|
|
149
|
-
}))), /*#__PURE__*/React.createElement("div", {
|
|
168
|
+
}))) : null, /*#__PURE__*/React.createElement("div", {
|
|
150
169
|
className: style.actionFooter
|
|
151
170
|
}, footerActionView)));
|
|
152
171
|
};
|
|
@@ -158,7 +177,7 @@ WizardContents.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
158
177
|
onClick: PropTypes.func
|
|
159
178
|
}).isRequired,
|
|
160
179
|
steps: WizardSteps.propTypes.steps,
|
|
161
|
-
summary: PropTypes.shape(_extends({}, WizardSummary.propTypes))
|
|
180
|
+
summary: PropTypes.shape(_extends({}, WizardSummary.propTypes)),
|
|
162
181
|
content: PropTypes.oneOfType([PropTypes.shape(_extends({}, BrandForm.propTypes, {
|
|
163
182
|
type: PropTypes.oneOf(['form'])
|
|
164
183
|
})), PropTypes.shape(_extends({}, ContentTranslate.propTypes, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","getOr","PropTypes","ButtonLink","ButtonLinkIconOnly","WizardSteps","WizardSummary","BrandForm","ContentTranslate","OrganismSearchAndChipsResults","CourseSelection","CourseSections","RewardsForm","style","buildHeader","wizardHeader","steps","title","onClick","buttonCloseIcon","size","icon","header","headerTitle","buildForm","content","type","buildButton","step","side","ICONS","previous","position","next","publish","label","buttonProps","buildActionZone","previousStep","nextStep","previousButton","nextStepType","nextButton","actionZone","button","WizardContents","props","isLoading","summary","headerView","formView","rightActionView","footerActionView","container","leftSection","form","rightSection","stickySection","summaryZone","footer","summaryFooter","actionFooter","propTypes","bool","shape","string","func","isRequired","oneOfType","oneOf"],"sources":["../../../src/organism/wizard-contents/index.js"],"sourcesContent":["import React from 'react';\nimport getOr from 'lodash/fp/getOr';\nimport PropTypes from 'prop-types';\nimport ButtonLink from '../../atom/button-link';\nimport ButtonLinkIconOnly from '../../atom/button-link-icon-only';\nimport WizardSteps from '../../atom/wizard-steps';\nimport WizardSummary from '../../molecule/wizard-summary';\nimport BrandForm from '../brand-form';\nimport ContentTranslate from '../content-translation';\nimport OrganismSearchAndChipsResults from '../search-and-chips-results';\nimport CourseSelection from '../course-selection';\nimport CourseSections from '../../molecule/course-sections';\nimport RewardsForm from '../rewards-form';\nimport style from './style.css';\n\nconst buildHeader = (wizardHeader, steps) => {\n const {title, onClick} = wizardHeader;\n\n const buttonCloseIcon = {\n size: 'small',\n 'data-name': 'close-button',\n 'aria-label': 'close button',\n icon: 'close',\n onClick\n };\n\n return (\n <div>\n <div className={style.header}>\n <ButtonLinkIconOnly {...buttonCloseIcon} />\n <div className={style.headerTitle} data-name={'content-title'}>\n {title}\n </div>\n </div>\n <WizardSteps steps={steps} />\n </div>\n );\n};\n\nconst buildForm = content => {\n const {type} = content;\n switch (type) {\n case 'form':\n return <BrandForm {...content} />;\n case 'translate':\n return <ContentTranslate {...content} />;\n case 'populations':\n return <OrganismSearchAndChipsResults {...content} />;\n case 'courses':\n return <CourseSelection {...content} />;\n case 'organize-courses':\n return <CourseSections {...content} />;\n case 'rewards':\n return <RewardsForm {...content} />;\n }\n};\n\nconst buildButton = (type, step, side) => {\n const ICONS = {\n previous: {\n position: 'left',\n type: 'chevron-left'\n },\n next: {\n position: 'right',\n type: 'chevron-right'\n },\n publish: {\n position: 'left',\n type: 'publish'\n }\n };\n\n const {label, onClick} = step;\n const buttonProps = {\n type: type === 'previous' ? 'secondary' : 'primary',\n 'aria-label': `${type} step button`,\n 'data-name': `${type}-step-button-${side}`,\n icon: ICONS[type],\n label,\n onClick\n };\n\n return <ButtonLink {...buttonProps} />;\n};\n\nconst buildActionZone = (previousStep, nextStep, side) => {\n const previousButton = previousStep ? buildButton('previous', previousStep, side) : null;\n const nextStepType = getOr('next', 'type', nextStep);\n const nextButton = nextStep ? buildButton(nextStepType, nextStep, side) : null;\n return (\n <div className={style.actionZone}>\n <div className={style.button}>{previousButton}</div>\n <div className={style.button}>{nextButton}</div>\n </div>\n );\n};\n\nconst WizardContents = props => {\n const {isLoading, wizardHeader, steps, summary, content, nextStep, previousStep} = props;\n const headerView = buildHeader(wizardHeader, steps);\n const formView = buildForm({...content, isLoading});\n const rightActionView = buildActionZone(previousStep, nextStep, 'right');\n const footerActionView = buildActionZone(previousStep, nextStep, 'footer');\n\n return (\n <div className={style.container} data-name=\"content-summary\">\n <div className={style.leftSection}>\n {headerView}\n <div className={style.form}>{formView}</div>\n </div>\n <div className={style.rightSection} data-name=\"summary-right-section\">\n <div className={style.stickySection}>\n <div className={style.summaryZone} data-name=\"summary-zone\">\n <WizardSummary {...summary} side={'right'} />\n </div>\n {rightActionView}\n </div>\n </div>\n <div className={style.footer} data-name=\"summary-footer-section\">\n <div className={style.summaryFooter}>\n <WizardSummary {...summary} side={'footer'} />\n </div>\n <div className={style.actionFooter}>{footerActionView}</div>\n </div>\n </div>\n );\n};\n\nWizardContents.propTypes = {\n isLoading: PropTypes.bool,\n wizardHeader: PropTypes.shape({\n title: PropTypes.string,\n onClick: PropTypes.func\n }).isRequired,\n steps: WizardSteps.propTypes.steps,\n summary: PropTypes.shape({\n ...WizardSummary.propTypes\n }).isRequired,\n content: PropTypes.oneOfType([\n PropTypes.shape({\n ...BrandForm.propTypes,\n type: PropTypes.oneOf(['form'])\n }),\n PropTypes.shape({\n ...ContentTranslate.propTypes,\n type: PropTypes.oneOf(['translate'])\n }),\n PropTypes.shape({\n ...OrganismSearchAndChipsResults.propTypes,\n type: PropTypes.oneOf(['populations'])\n }),\n PropTypes.shape({\n ...CourseSelection.propTypes,\n type: PropTypes.oneOf(['courses'])\n }),\n PropTypes.shape({\n ...CourseSections.propTypes,\n type: PropTypes.oneOf(['organize-courses'])\n }),\n PropTypes.shape({\n ...RewardsForm.propTypes,\n type: PropTypes.oneOf(['rewards'])\n })\n ]),\n previousStep: PropTypes.shape({\n label: PropTypes.string,\n onClick: PropTypes.func\n }),\n nextStep: PropTypes.shape({\n type: PropTypes.oneOf(['next', 'publish']),\n label: PropTypes.string,\n onClick: PropTypes.func\n })\n};\n\nexport default WizardContents;\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,KAAP,MAAkB,iBAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,kBAAP,MAA+B,kCAA/B;AACA,OAAOC,WAAP,MAAwB,yBAAxB;AACA,OAAOC,aAAP,MAA0B,+BAA1B;AACA,OAAOC,SAAP,MAAsB,eAAtB;AACA,OAAOC,gBAAP,MAA6B,wBAA7B;AACA,OAAOC,6BAAP,MAA0C,6BAA1C;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AACA,OAAOC,cAAP,MAA2B,gCAA3B;AACA,OAAOC,WAAP,MAAwB,iBAAxB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,WAAW,GAAG,CAACC,YAAD,EAAeC,KAAf,KAAyB;EAC3C,MAAM;IAACC,KAAD;IAAQC;EAAR,IAAmBH,YAAzB;EAEA,MAAMI,eAAe,GAAG;IACtBC,IAAI,EAAE,OADgB;IAEtB,aAAa,cAFS;IAGtB,cAAc,cAHQ;IAItBC,IAAI,EAAE,OAJgB;IAKtBH;EALsB,CAAxB;EAQA,oBACE,8CACE;IAAK,SAAS,EAAEL,KAAK,CAACS;EAAtB,gBACE,oBAAC,kBAAD,EAAwBH,eAAxB,CADF,eAEE;IAAK,SAAS,EAAEN,KAAK,CAACU,WAAtB;IAAmC,aAAW;EAA9C,GACGN,KADH,CAFF,CADF,eAOE,oBAAC,WAAD;IAAa,KAAK,EAAED;EAApB,EAPF,CADF;AAWD,CAtBD;;AAwBA,MAAMQ,SAAS,GAAGC,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SAAS,CAAC8D,KAAV,cACKvD,6BAA6B,CAACqD,SADnC;IAEEpC,IAAI,EAAExB,SAAS,CAACmE,KAAV,CAAgB,CAAC,aAAD,CAAhB;EAFR,GAT2B,EAa3BnE,SAAS,CAAC8D,KAAV,cACKtD,eAAe,CAACoD,SADrB;IAEEpC,IAAI,EAAExB,SAAS,CAACmE,KAAV,CAAgB,CAAC,SAAD,CAAhB;EAFR,GAb2B,EAiB3BnE,SAAS,CAAC8D,KAAV,cACKrD,cAAc,CAACmD,SADpB;IAEEpC,IAAI,EAAExB,SAAS,CAACmE,KAAV,CAAgB,CAAC,kBAAD,CAAhB;EAFR,GAjB2B,EAqB3BnE,SAAS,CAAC8D,KAAV,cACKpD,WAAW,CAACkD,SADjB;IAEEpC,IAAI,EAAExB,SAAS,CAACmE,KAAV,CAAgB,CAAC,SAAD,CAAhB;EAFR,GArB2B,CAApB,CAVgB;EAoCzB/B,YAAY,EAAEpC,SAAS,CAAC8D,KAAV,CAAgB;IAC5B7B,KAAK,EAAEjC,SAAS,CAAC+D,MADW;IAE5B/C,OAAO,EAAEhB,SAAS,CAACgE;EAFS,CAAhB,CApCW;EAwCzB3B,QAAQ,EAAErC,SAAS,CAAC8D,KAAV,CAAgB;IACxBtC,IAAI,EAAExB,SAAS,CAACmE,KAAV,CAAgB,CAAC,MAAD,EAAS,SAAT,CAAhB,CADkB;IAExBlC,KAAK,EAAEjC,SAAS,CAAC+D,MAFO;IAGxB/C,OAAO,EAAEhB,SAAS,CAACgE;EAHK,CAAhB;AAxCe,CAA3B;AA+CA,eAAerB,cAAf"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","getOr","PropTypes","ButtonLink","ButtonLinkIconOnly","WizardSteps","WizardSummary","BrandForm","ContentTranslate","OrganismSearchAndChipsResults","CourseSelection","CourseSections","RewardsForm","style","buildHeader","wizardHeader","steps","title","onClick","buttonCloseIcon","size","icon","header","headerTitle","buildForm","content","type","buildButton","step","side","ICONS","previous","position","next","publish","label","buttonProps","buildActionZone","previousStep","nextStep","previousButton","nextStepType","nextButton","actionZone","button","THEMES","container","containerWithoutSummary","footer","footerWithoutSummary","actionFooter","actionFooterWithoutSummary","leftSection","leftSectionWithoutSummary","summary","getTheme","WizardContents","props","isLoading","headerView","formView","rightActionView","footerActionView","currentStyle","summaryWrapper","rightSection","stickySection","summaryZone","form","summaryFooter","propTypes","bool","shape","string","func","isRequired","oneOfType","oneOf"],"sources":["../../../src/organism/wizard-contents/index.js"],"sourcesContent":["import React from 'react';\nimport getOr from 'lodash/fp/getOr';\nimport PropTypes from 'prop-types';\nimport ButtonLink from '../../atom/button-link';\nimport ButtonLinkIconOnly from '../../atom/button-link-icon-only';\nimport WizardSteps from '../../atom/wizard-steps';\nimport WizardSummary from '../../molecule/wizard-summary';\nimport BrandForm from '../brand-form';\nimport ContentTranslate from '../content-translation';\nimport OrganismSearchAndChipsResults from '../search-and-chips-results';\nimport CourseSelection from '../course-selection';\nimport CourseSections from '../../molecule/course-sections';\nimport RewardsForm from '../rewards-form';\nimport style from './style.css';\n\nconst buildHeader = (wizardHeader, steps) => {\n const {title, onClick} = wizardHeader;\n\n const buttonCloseIcon = {\n size: 'small',\n 'data-name': 'close-button',\n 'aria-label': 'close button',\n icon: 'close',\n onClick\n };\n\n return (\n <div>\n <div className={style.header}>\n <ButtonLinkIconOnly {...buttonCloseIcon} />\n <div className={style.headerTitle} data-name={'content-title'}>\n {title}\n </div>\n </div>\n <WizardSteps steps={steps} />\n </div>\n );\n};\n\nconst buildForm = content => {\n const {type} = content;\n switch (type) {\n case 'form':\n return <BrandForm {...content} />;\n case 'translate':\n return <ContentTranslate {...content} />;\n case 'populations':\n return <OrganismSearchAndChipsResults {...content} />;\n case 'courses':\n return <CourseSelection {...content} />;\n case 'organize-courses':\n return <CourseSections {...content} />;\n case 'rewards':\n return <RewardsForm {...content} />;\n }\n};\n\nconst buildButton = (type, step, side) => {\n const ICONS = {\n previous: {\n position: 'left',\n type: 'chevron-left'\n },\n next: {\n position: 'right',\n type: 'chevron-right'\n },\n publish: {\n position: 'left',\n type: 'publish'\n }\n };\n\n const {label, onClick} = step;\n const buttonProps = {\n type: type === 'previous' ? 'secondary' : 'primary',\n 'aria-label': `${type} step button`,\n 'data-name': `${type}-step-button-${side}`,\n icon: ICONS[type],\n label,\n onClick\n };\n\n return <ButtonLink {...buttonProps} />;\n};\n\nconst buildActionZone = (previousStep, nextStep, side) => {\n const previousButton = previousStep ? buildButton('previous', previousStep, side) : null;\n const nextStepType = getOr('next', 'type', nextStep);\n const nextButton = nextStep ? buildButton(nextStepType, nextStep, side) : null;\n return (\n <div className={style.actionZone}>\n <div className={style.button}>{previousButton}</div>\n <div className={style.button}>{nextButton}</div>\n </div>\n );\n};\n\nconst THEMES = {\n 'no-summary': {\n container: style.containerWithoutSummary,\n footer: style.footerWithoutSummary,\n actionFooter: style.actionFooterWithoutSummary,\n leftSection: style.leftSectionWithoutSummary\n },\n summary: {\n container: style.container,\n footer: style.footer,\n actionFooter: style.actionFooter,\n leftSection: style.leftSection\n }\n};\n\nconst getTheme = summary => (summary ? 'summary' : 'no-summary');\n\nconst WizardContents = props => {\n const {isLoading, wizardHeader, steps, summary, content, nextStep, previousStep} = props;\n const headerView = buildHeader(wizardHeader, steps);\n const formView = buildForm({...content, isLoading});\n const rightActionView = buildActionZone(previousStep, nextStep, 'right');\n const footerActionView = buildActionZone(previousStep, nextStep, 'footer');\n const currentStyle = THEMES[getTheme(summary)];\n\n const summaryWrapper = (\n <div className={style.rightSection} data-name=\"summary-right-section\">\n <div className={style.stickySection}>\n <div className={style.summaryZone} data-name=\"summary-zone\">\n <WizardSummary {...summary} side={'right'} />\n </div>\n {rightActionView}\n </div>\n </div>\n );\n\n return (\n <div className={currentStyle.container} data-name=\"content-summary\">\n <div className={currentStyle.leftSection}>\n {headerView}\n <div className={style.form}>{formView}</div>\n </div>\n {summary ? summaryWrapper : null}\n <div className={currentStyle.footer} data-name=\"footer-section\">\n {summary ? (\n <div className={style.summaryFooter}>\n <WizardSummary {...summary} side={'footer'} />\n </div>\n ) : null}\n <div className={style.actionFooter}>{footerActionView}</div>\n </div>\n </div>\n );\n};\n\nWizardContents.propTypes = {\n isLoading: PropTypes.bool,\n wizardHeader: PropTypes.shape({\n title: PropTypes.string,\n onClick: PropTypes.func\n }).isRequired,\n steps: WizardSteps.propTypes.steps,\n summary: PropTypes.shape({\n ...WizardSummary.propTypes\n }),\n content: PropTypes.oneOfType([\n PropTypes.shape({\n ...BrandForm.propTypes,\n type: PropTypes.oneOf(['form'])\n }),\n PropTypes.shape({\n ...ContentTranslate.propTypes,\n type: PropTypes.oneOf(['translate'])\n }),\n PropTypes.shape({\n ...OrganismSearchAndChipsResults.propTypes,\n type: PropTypes.oneOf(['populations'])\n }),\n PropTypes.shape({\n ...CourseSelection.propTypes,\n type: PropTypes.oneOf(['courses'])\n }),\n PropTypes.shape({\n ...CourseSections.propTypes,\n type: PropTypes.oneOf(['organize-courses'])\n }),\n PropTypes.shape({\n ...RewardsForm.propTypes,\n type: PropTypes.oneOf(['rewards'])\n })\n ]),\n previousStep: PropTypes.shape({\n label: PropTypes.string,\n onClick: PropTypes.func\n }),\n nextStep: PropTypes.shape({\n type: PropTypes.oneOf(['next', 'publish']),\n label: PropTypes.string,\n onClick: PropTypes.func\n })\n};\n\nexport default WizardContents;\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,KAAP,MAAkB,iBAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,kBAAP,MAA+B,kCAA/B;AACA,OAAOC,WAAP,MAAwB,yBAAxB;AACA,OAAOC,aAAP,MAA0B,+BAA1B;AACA,OAAOC,SAAP,MAAsB,eAAtB;AACA,OAAOC,gBAAP,MAA6B,wBAA7B;AACA,OAAOC,6BAAP,MAA0C,6BAA1C;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AACA,OAAOC,cAAP,MAA2B,gCAA3B;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B,CAAC6D,SADnC;IAEE5C,IAAI,EAAExB,SAAS,CAAC2E,KAAV,CAAgB,CAAC,aAAD,CAAhB;EAFR,GAT2B,EAa3B3E,SAAS,CAACsE,KAAV,cACK9D,eAAe,CAAC4D,SADrB;IAEE5C,IAAI,EAAExB,SAAS,CAAC2E,KAAV,CAAgB,CAAC,SAAD,CAAhB;EAFR,GAb2B,EAiB3B3E,SAAS,CAACsE,KAAV,cACK7D,cAAc,CAAC2D,SADpB;IAEE5C,IAAI,EAAExB,SAAS,CAAC2E,KAAV,CAAgB,CAAC,kBAAD,CAAhB;EAFR,GAjB2B,EAqB3B3E,SAAS,CAACsE,KAAV,cACK5D,WAAW,CAAC0D,SADjB;IAEE5C,IAAI,EAAExB,SAAS,CAAC2E,KAAV,CAAgB,CAAC,SAAD,CAAhB;EAFR,GArB2B,CAApB,CAVgB;EAoCzBvC,YAAY,EAAEpC,SAAS,CAACsE,KAAV,CAAgB;IAC5BrC,KAAK,EAAEjC,SAAS,CAACuE,MADW;IAE5BvD,OAAO,EAAEhB,SAAS,CAACwE;EAFS,CAAhB,CApCW;EAwCzBnC,QAAQ,EAAErC,SAAS,CAACsE,KAAV,CAAgB;IACxB9C,IAAI,EAAExB,SAAS,CAAC2E,KAAV,CAAgB,CAAC,MAAD,EAAS,SAAT,CAAhB,CADkB;IAExB1C,KAAK,EAAEjC,SAAS,CAACuE,MAFO;IAGxBvD,OAAO,EAAEhB,SAAS,CAACwE;EAHK,CAAhB;AAxCe,CAA3B;AA+CA,eAAelB,cAAf"}
|
|
@@ -7,17 +7,31 @@
|
|
|
7
7
|
display: flex;
|
|
8
8
|
align-items: stretch;
|
|
9
9
|
justify-content: flex-start;
|
|
10
|
-
flex-wrap: wrap;
|
|
11
10
|
overflow: auto;
|
|
12
11
|
height: calc(100vh - 124px);
|
|
13
12
|
width: 100%;
|
|
14
13
|
}
|
|
15
14
|
|
|
15
|
+
.containerWithoutSummary {
|
|
16
|
+
composes: container;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
}
|
|
19
|
+
|
|
16
20
|
.leftSection {
|
|
17
|
-
display:
|
|
21
|
+
display: flex;
|
|
22
|
+
flex-direction: column;
|
|
18
23
|
overflow: auto;
|
|
19
24
|
box-sizing: border-box;
|
|
20
25
|
width: calc(100% - 320px);
|
|
26
|
+
position: relative;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.leftSectionWithoutSummary {
|
|
30
|
+
display: flex;
|
|
31
|
+
flex-direction: column;
|
|
32
|
+
overflow: auto;
|
|
33
|
+
box-sizing: border-box;
|
|
34
|
+
width: 100%;
|
|
21
35
|
height: 100%;
|
|
22
36
|
position: relative;
|
|
23
37
|
}
|
|
@@ -69,12 +83,23 @@
|
|
|
69
83
|
.actionZone {
|
|
70
84
|
width: 100%;
|
|
71
85
|
display: flex;
|
|
72
|
-
|
|
86
|
+
flex-direction: row;
|
|
87
|
+
justify-content: flex-end;
|
|
73
88
|
margin: 16px 0;
|
|
74
89
|
}
|
|
75
90
|
|
|
76
91
|
.button {
|
|
77
|
-
width:
|
|
92
|
+
width: 100%;
|
|
93
|
+
max-width: 184px;
|
|
94
|
+
margin: 10px;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.footerWithoutSummary {
|
|
98
|
+
width: 100%;
|
|
99
|
+
bottom: 0px;
|
|
100
|
+
position: inherit;
|
|
101
|
+
display: flex;
|
|
102
|
+
justify-content: flex-end;
|
|
78
103
|
}
|
|
79
104
|
|
|
80
105
|
.footer {
|
|
@@ -84,23 +109,37 @@
|
|
|
84
109
|
position: inherit;
|
|
85
110
|
}
|
|
86
111
|
|
|
112
|
+
.actionFooterWithoutSummary {
|
|
113
|
+
width: 100%;
|
|
114
|
+
display: flex;
|
|
115
|
+
right: 0;
|
|
116
|
+
bottom: -10px;
|
|
117
|
+
position: sticky;
|
|
118
|
+
}
|
|
119
|
+
|
|
87
120
|
@media desktop, tablet {
|
|
88
121
|
.leftSection {
|
|
89
122
|
width: 100%;
|
|
90
123
|
min-height: 500px;
|
|
91
124
|
}
|
|
92
125
|
|
|
126
|
+
.container {
|
|
127
|
+
display: flex;
|
|
128
|
+
flex-direction: column;
|
|
129
|
+
}
|
|
130
|
+
|
|
93
131
|
.rightSection {
|
|
94
132
|
display: none;
|
|
95
133
|
}
|
|
96
134
|
|
|
97
|
-
.footer
|
|
135
|
+
.footer {
|
|
98
136
|
display: flex;
|
|
99
137
|
align-items: flex-end;
|
|
100
138
|
bottom: 10px;
|
|
101
139
|
position: sticky;
|
|
102
140
|
z-index: 1;
|
|
103
141
|
}
|
|
142
|
+
|
|
104
143
|
.footer::before {
|
|
105
144
|
content: '';
|
|
106
145
|
background: linear-gradient(to top,white 64px, #ffffff00 );
|
|
@@ -118,8 +157,9 @@
|
|
|
118
157
|
}
|
|
119
158
|
|
|
120
159
|
.actionFooter {
|
|
121
|
-
width:
|
|
160
|
+
width: 100%;
|
|
122
161
|
}
|
|
162
|
+
|
|
123
163
|
.actionZone {
|
|
124
164
|
margin: 0;
|
|
125
165
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default ProgressionItem;
|
|
2
|
-
declare function ProgressionItem(props: any,
|
|
2
|
+
declare function ProgressionItem(props: any, legacyContext: any): JSX.Element;
|
|
3
3
|
declare namespace ProgressionItem {
|
|
4
4
|
namespace propTypes {
|
|
5
5
|
const completion: PropTypes.Validator<number>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progression-item.d.ts","sourceRoot":"","sources":["../../../src/template/activity/progression-item.js"],"names":[],"mappings":";AAmCA,
|
|
1
|
+
{"version":3,"file":"progression-item.d.ts","sourceRoot":"","sources":["../../../src/template/activity/progression-item.js"],"names":[],"mappings":";AAmCA,8EAyFC"}
|
|
@@ -4,7 +4,7 @@ import React, { useMemo } from 'react';
|
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import classnames from 'classnames';
|
|
6
6
|
import { NovaCompositionNavigationArrowRight as ArrowRightIcon, NovaCompositionCoorpacademyStar as StarIcon, NovaCompositionCoorpacademyTimer as TimerIcon, NovaCompositionCoorpacademyBolt as BoltIcon, NovaSolidSchoolScienceGraduationHat as CertificationIcon, NovaCompositionCoorpacademyAdaptive as AdaptiveIcon, NovaSolidContentContentBook1 as LearnerIcon, NovaCompositionCoorpacademyScorm as ScormIcon, NovaCompositionCoorpacademyArticle as ArticleIcon, NovaCompositionCoorpacademyVideo as VideoIcon, NovaCompositionCoorpacademyMicrophone as PodcastIcon, NovaCompositionCoorpacademyRevision as RevisionIcon } from '@coorpacademy/nova-icons';
|
|
7
|
-
import Provider from '../../atom/provider';
|
|
7
|
+
import Provider, { GetSkinFromContext } from '../../atom/provider';
|
|
8
8
|
import ProgressBar from '../../molecule/progress-bar';
|
|
9
9
|
import Link from '../../atom/link';
|
|
10
10
|
import style from './progression-item.css';
|
|
@@ -20,10 +20,8 @@ const ICONS = {
|
|
|
20
20
|
review: RevisionIcon
|
|
21
21
|
};
|
|
22
22
|
|
|
23
|
-
const ProgressionItem = (props,
|
|
24
|
-
const
|
|
25
|
-
skin
|
|
26
|
-
} = context;
|
|
23
|
+
const ProgressionItem = (props, legacyContext) => {
|
|
24
|
+
const skin = GetSkinFromContext(legacyContext);
|
|
27
25
|
const {
|
|
28
26
|
disabled = false,
|
|
29
27
|
adaptive,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progression-item.js","names":["React","useMemo","PropTypes","classnames","NovaCompositionNavigationArrowRight","ArrowRightIcon","NovaCompositionCoorpacademyStar","StarIcon","NovaCompositionCoorpacademyTimer","TimerIcon","NovaCompositionCoorpacademyBolt","BoltIcon","NovaSolidSchoolScienceGraduationHat","CertificationIcon","NovaCompositionCoorpacademyAdaptive","AdaptiveIcon","NovaSolidContentContentBook1","LearnerIcon","NovaCompositionCoorpacademyScorm","ScormIcon","NovaCompositionCoorpacademyArticle","ArticleIcon","NovaCompositionCoorpacademyVideo","VideoIcon","NovaCompositionCoorpacademyMicrophone","PodcastIcon","NovaCompositionCoorpacademyRevision","RevisionIcon","Provider","ProgressBar","Link","style","ICONS","chapter","course","battle","certification","article","scorm","video","podcast","review","ProgressionItem","props","
|
|
1
|
+
{"version":3,"file":"progression-item.js","names":["React","useMemo","PropTypes","classnames","NovaCompositionNavigationArrowRight","ArrowRightIcon","NovaCompositionCoorpacademyStar","StarIcon","NovaCompositionCoorpacademyTimer","TimerIcon","NovaCompositionCoorpacademyBolt","BoltIcon","NovaSolidSchoolScienceGraduationHat","CertificationIcon","NovaCompositionCoorpacademyAdaptive","AdaptiveIcon","NovaSolidContentContentBook1","LearnerIcon","NovaCompositionCoorpacademyScorm","ScormIcon","NovaCompositionCoorpacademyArticle","ArticleIcon","NovaCompositionCoorpacademyVideo","VideoIcon","NovaCompositionCoorpacademyMicrophone","PodcastIcon","NovaCompositionCoorpacademyRevision","RevisionIcon","Provider","GetSkinFromContext","ProgressBar","Link","style","ICONS","chapter","course","battle","certification","article","scorm","video","podcast","review","ProgressionItem","props","legacyContext","skin","disabled","adaptive","completion","label","level","onClick","stars","maxStars","state","type","steps","adaptiveAriaLabel","dark","primary","white","IconType","adaptiveIcon","backgroundColor","color","handleCTAClick","e","stopPropagation","preventDefault","link","cta","progressionItem","wrapperTitle","iconType","innerHTML","__html","smallStars","iconStar","borderRadius","propTypes","number","isRequired","bool","string","func","contextTypes","childContextTypes"],"sources":["../../../src/template/activity/progression-item.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {get, noop} from 'lodash/fp';\nimport {\n NovaCompositionNavigationArrowRight as ArrowRightIcon,\n NovaCompositionCoorpacademyStar as StarIcon,\n NovaCompositionCoorpacademyTimer as TimerIcon,\n NovaCompositionCoorpacademyBolt as BoltIcon,\n NovaSolidSchoolScienceGraduationHat as CertificationIcon,\n NovaCompositionCoorpacademyAdaptive as AdaptiveIcon,\n NovaSolidContentContentBook1 as LearnerIcon,\n NovaCompositionCoorpacademyScorm as ScormIcon,\n NovaCompositionCoorpacademyArticle as ArticleIcon,\n NovaCompositionCoorpacademyVideo as VideoIcon,\n NovaCompositionCoorpacademyMicrophone as PodcastIcon,\n NovaCompositionCoorpacademyRevision as RevisionIcon\n} from '@coorpacademy/nova-icons';\nimport Provider, {GetSkinFromContext} from '../../atom/provider';\nimport ProgressBar from '../../molecule/progress-bar';\nimport Link from '../../atom/link';\nimport style from './progression-item.css';\n\nconst ICONS = {\n chapter: TimerIcon,\n course: LearnerIcon,\n battle: BoltIcon,\n certification: CertificationIcon,\n article: ArticleIcon,\n scorm: ScormIcon,\n video: VideoIcon,\n podcast: PodcastIcon,\n review: RevisionIcon\n};\n\nconst ProgressionItem = (props, legacyContext) => {\n const skin = GetSkinFromContext(legacyContext);\n const {\n disabled = false,\n adaptive,\n completion,\n label,\n level,\n onClick = noop,\n stars,\n maxStars,\n state,\n type,\n steps = 0,\n adaptiveAriaLabel\n } = props;\n\n const dark = get('common.dark', skin);\n const primary = get('common.primary', skin);\n const white = get('common.white', skin);\n const IconType = ICONS[type];\n\n const adaptiveIcon = adaptive ? (\n <div\n className={style.adaptiveIcon}\n style={{\n backgroundColor: primary\n }}\n >\n <AdaptiveIcon style={{color: white}} height={14} aria-label={adaptiveAriaLabel} />\n </div>\n ) : null;\n\n const handleCTAClick = useMemo(\n () => e => {\n e.stopPropagation();\n e.preventDefault();\n onClick(e);\n },\n [onClick]\n );\n\n const link = disabled ? null : (\n <Link style={{color: primary}} onClick={handleCTAClick} data-progression-state={state}>\n <span className={style.cta}>\n {state} <ArrowRightIcon style={{color: primary}} height={12} width={20} />\n </span>\n </Link>\n );\n\n return (\n <div className={classnames(style.progressionItem, disabled ? style.disabled : '')}>\n <div className={style.wrapperTitle}>\n <IconType className={style.iconType} style={{color: dark}} />\n <div data-name=\"activityLabel\" className={style.label} title={label}>\n <div\n className={style.innerHTML}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: label}}\n />\n {adaptiveIcon}\n </div>\n\n <div\n data-name=\"activityStars\"\n className={style.stars}\n style={{\n color: primary\n }}\n >\n {stars}\n {maxStars ? ' /' : null}\n {maxStars ? <span className={style.smallStars}>{maxStars}</span> : null}{' '}\n <StarIcon className={style.iconStar} style={{color: primary}} />\n </div>\n </div>\n <ProgressBar\n className={style.completion}\n value={completion * 100}\n max={100}\n steps={steps}\n style={{backgroundColor: primary, borderRadius: 0}}\n />\n <div className={style.state}>\n {link}\n <span className={style.level}>{level}</span>\n </div>\n </div>\n );\n};\n\nProgressionItem.propTypes = {\n completion: PropTypes.number.isRequired,\n stars: PropTypes.number.isRequired,\n maxStars: PropTypes.number,\n steps: PropTypes.number,\n disabled: PropTypes.bool,\n label: PropTypes.string.isRequired,\n level: PropTypes.string.isRequired,\n state: PropTypes.string.isRequired,\n adaptiveAriaLabel: PropTypes.string,\n type: PropTypes.string.isRequired,\n adaptive: PropTypes.bool.isRequired,\n onClick: PropTypes.func\n};\n\nProgressionItem.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nexport default ProgressionItem;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,OAAf,QAA6B,OAA7B;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AAEA,SACEC,mCAAmC,IAAIC,cADzC,EAEEC,+BAA+B,IAAIC,QAFrC,EAGEC,gCAAgC,IAAIC,SAHtC,EAIEC,+BAA+B,IAAIC,QAJrC,EAKEC,mCAAmC,IAAIC,iBALzC,EAMEC,mCAAmC,IAAIC,YANzC,EAOEC,4BAA4B,IAAIC,WAPlC,EAQEC,gCAAgC,IAAIC,SARtC,EASEC,kCAAkC,IAAIC,WATxC,EAUEC,gCAAgC,IAAIC,SAVtC,EAWEC,qCAAqC,IAAIC,WAX3C,EAYEC,mCAAmC,IAAIC,YAZzC,QAaO,0BAbP;AAcA,OAAOC,QAAP,IAAkBC,kBAAlB,QAA2C,qBAA3C;AACA,OAAOC,WAAP,MAAwB,6BAAxB;AACA,OAAOC,I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;AAZO,CAA5B;AAeA1C,eAAe,CAAC2C,YAAhB,GAA+B;EAC7BxC,IAAI,EAAElB,QAAQ,CAAC2D,iBAAT,CAA2BzC;AADJ,CAA/B;AAIA,eAAeH,eAAf"}
|
|
@@ -743,7 +743,7 @@ declare namespace BrandUpdate {
|
|
|
743
743
|
done: PropTypes.Requireable<boolean>;
|
|
744
744
|
current: PropTypes.Requireable<boolean>;
|
|
745
745
|
}> | null | undefined)[]>;
|
|
746
|
-
summary: PropTypes.
|
|
746
|
+
summary: PropTypes.Requireable<PropTypes.InferProps<{
|
|
747
747
|
title: PropTypes.Requireable<string>;
|
|
748
748
|
side: PropTypes.Requireable<string>;
|
|
749
749
|
sections: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
@@ -776,7 +776,7 @@ declare namespace BrandUpdate {
|
|
|
776
776
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
777
777
|
'aria-label': PropTypes.Requireable<string>;
|
|
778
778
|
}>>;
|
|
779
|
-
}
|
|
779
|
+
}>>;
|
|
780
780
|
content: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
|
|
781
781
|
type: PropTypes.Requireable<string>;
|
|
782
782
|
groups: PropTypes.Validator<(PropTypes.InferProps<{
|
|
@@ -94,7 +94,8 @@ const InputSwitch = props => {
|
|
|
94
94
|
"aria-labelledby": `title-view-${dataName}`
|
|
95
95
|
}), /*#__PURE__*/_react.default.createElement("label", {
|
|
96
96
|
htmlFor: idSwitch,
|
|
97
|
-
"data-name": "input-switch-label"
|
|
97
|
+
"data-name": "input-switch-label",
|
|
98
|
+
tabIndex: 0
|
|
98
99
|
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
99
100
|
className: !details ? _style.default.alignedTextContainer : null
|
|
100
101
|
}, titlePosition === 'right' ? /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["InputSwitch","props","title","name","id","value","disabled","onChange","description","modified","theme","titlePosition","details","requiredSelection","dataName","idSwitch","isDisabled","handleChange","useMemo","e","target","checked","titleView","style","descriptionView","getClass","defaultClass","coorpmanager","modifiedClass","coorpmanagerModified","partielUncheck","default","className","getClassState","btnSwitchContainer","checkbox","alignedTextContainer","detailsTxt","propTypes","PropTypes","string","bool","func","oneOf"],"sources":["../../../src/atom/input-switch/index.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport {noop, uniqueId} from 'lodash/fp';\nimport getClassState from '../../util/get-class-state';\nimport style from './style.css';\n\nconst InputSwitch = props => {\n const {\n title,\n name,\n id,\n value,\n disabled,\n onChange = noop,\n description,\n modified = false,\n theme = 'default',\n titlePosition = 'left',\n details = '',\n requiredSelection = false,\n 'data-name': dataName\n } = props;\n\n const idSwitch = id || uniqueId('input-switch-');\n const isDisabled = disabled ? 'disabled' : '';\n const handleChange = useMemo(() => e => onChange(e.target.checked), [onChange]);\n\n const titleView = title ? <span className={style.title}>{`${title} `}</span> : null;\n\n const descriptionView = description ? (\n <div className={style.description}>{description}</div>\n ) : null;\n\n const getClass = () => {\n switch (theme) {\n case 'coorpmanager':\n return {\n defaultClass: style.coorpmanager,\n modifiedClass: style.coorpmanagerModified\n };\n case 'mooc':\n return {\n defaultClass: style.partielUncheck,\n modifiedClass: style.coorpmanagerModified\n };\n default:\n return {defaultClass: style.default, modifiedClass: style.modified};\n }\n };\n const {defaultClass, modifiedClass} = getClass();\n const className = getClassState(defaultClass, modifiedClass, null, modified);\n\n return (\n <div className={className} data-name={`switch-input-${theme}${dataName}`}>\n {titlePosition === 'left' ? <div id={`title-view-${dataName}`}>{titleView} </div> : null}\n <div className={requiredSelection ? style.requiredSelection : null}>\n <div className={style.btnSwitchContainer}>\n <input\n type=\"checkbox\"\n id={idSwitch}\n name={name}\n onChange={handleChange}\n checked={value}\n disabled={isDisabled}\n className={style.checkbox}\n aria-labelledby={`title-view-${dataName}`}\n />\n <label htmlFor={idSwitch} data-name=\"input-switch-label\" />\n </div>\n </div>\n <div className={!details ? style.alignedTextContainer : null}>\n {titlePosition === 'right' ? <div id={`title-view-${dataName}`}>{titleView} </div> : null}\n {details ? <div className={style.detailsTxt}>{details}</div> : null}\n </div>\n {descriptionView}\n </div>\n );\n};\n\nInputSwitch.propTypes = {\n title: PropTypes.string,\n name: PropTypes.string,\n id: PropTypes.string,\n value: PropTypes.bool,\n disabled: PropTypes.bool,\n onChange: PropTypes.func,\n description: PropTypes.string,\n modified: PropTypes.bool,\n titlePosition: PropTypes.oneOf(['right', 'left']),\n theme: PropTypes.oneOf(['default', 'coorpmanager', 'mooc']),\n details: PropTypes.string,\n 'data-name': PropTypes.string,\n requiredSelection: PropTypes.bool\n};\nexport default InputSwitch;\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;;;;;;;AAEA,MAAMA,WAAW,GAAGC,KAAK,IAAI;EAC3B,MAAM;IACJC,KADI;IAEJC,IAFI;IAGJC,EAHI;IAIJC,KAJI;IAKJC,QALI;IAMJC,QAAQ,iBANJ;IAOJC,WAPI;IAQJC,QAAQ,GAAG,KARP;IASJC,KAAK,GAAG,SATJ;IAUJC,aAAa,GAAG,MAVZ;IAWJC,OAAO,GAAG,EAXN;IAYJC,iBAAiB,GAAG,KAZhB;IAaJ,aAAaC;EAbT,IAcFb,KAdJ;EAgBA,MAAMc,QAAQ,GAAGX,EAAE,IAAI,wBAAS,eAAT,CAAvB;EACA,MAAMY,UAAU,GAAGV,QAAQ,GAAG,UAAH,GAAgB,EAA3C;EACA,MAAMW,YAAY,GAAG,IAAAC,cAAA,EAAQ,MAAMC,CAAC,IAAIZ,QAAQ,CAACY,CAAC,CAACC,MAAF,CAASC,OAAV,CAA3B,EAA+C,CAACd,QAAD,CAA/C,CAArB;EAEA,MAAMe,SAAS,GAAGpB,KAAK,gBAAG;IAAM,SAAS,EAAEqB,cAAA,CAAMrB;EAAvB,GAAgC,GAAEA,KAAM,GAAxC,CAAH,GAAwD,IAA/E;EAEA,MAAMsB,e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WE;IAAO,OAAO,EAAEC,QAAhB;IAA0B,aAAU;
|
|
1
|
+
{"version":3,"file":"index.js","names":["InputSwitch","props","title","name","id","value","disabled","onChange","description","modified","theme","titlePosition","details","requiredSelection","dataName","idSwitch","isDisabled","handleChange","useMemo","e","target","checked","titleView","style","descriptionView","getClass","defaultClass","coorpmanager","modifiedClass","coorpmanagerModified","partielUncheck","default","className","getClassState","btnSwitchContainer","checkbox","alignedTextContainer","detailsTxt","propTypes","PropTypes","string","bool","func","oneOf"],"sources":["../../../src/atom/input-switch/index.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport {noop, uniqueId} from 'lodash/fp';\nimport getClassState from '../../util/get-class-state';\nimport style from './style.css';\n\nconst InputSwitch = props => {\n const {\n title,\n name,\n id,\n value,\n disabled,\n onChange = noop,\n description,\n modified = false,\n theme = 'default',\n titlePosition = 'left',\n details = '',\n requiredSelection = false,\n 'data-name': dataName\n } = props;\n\n const idSwitch = id || uniqueId('input-switch-');\n const isDisabled = disabled ? 'disabled' : '';\n const handleChange = useMemo(() => e => onChange(e.target.checked), [onChange]);\n\n const titleView = title ? <span className={style.title}>{`${title} `}</span> : null;\n\n const descriptionView = description ? (\n <div className={style.description}>{description}</div>\n ) : null;\n\n const getClass = () => {\n switch (theme) {\n case 'coorpmanager':\n return {\n defaultClass: style.coorpmanager,\n modifiedClass: style.coorpmanagerModified\n };\n case 'mooc':\n return {\n defaultClass: style.partielUncheck,\n modifiedClass: style.coorpmanagerModified\n };\n default:\n return {defaultClass: style.default, modifiedClass: style.modified};\n }\n };\n const {defaultClass, modifiedClass} = getClass();\n const className = getClassState(defaultClass, modifiedClass, null, modified);\n\n return (\n <div className={className} data-name={`switch-input-${theme}${dataName}`}>\n {titlePosition === 'left' ? <div id={`title-view-${dataName}`}>{titleView} </div> : null}\n <div className={requiredSelection ? style.requiredSelection : null}>\n <div className={style.btnSwitchContainer}>\n <input\n type=\"checkbox\"\n id={idSwitch}\n name={name}\n onChange={handleChange}\n checked={value}\n disabled={isDisabled}\n className={style.checkbox}\n aria-labelledby={`title-view-${dataName}`}\n />\n <label htmlFor={idSwitch} data-name=\"input-switch-label\" tabIndex={0} />\n </div>\n </div>\n <div className={!details ? style.alignedTextContainer : null}>\n {titlePosition === 'right' ? <div id={`title-view-${dataName}`}>{titleView} </div> : null}\n {details ? <div className={style.detailsTxt}>{details}</div> : null}\n </div>\n {descriptionView}\n </div>\n );\n};\n\nInputSwitch.propTypes = {\n title: PropTypes.string,\n name: PropTypes.string,\n id: PropTypes.string,\n value: PropTypes.bool,\n disabled: PropTypes.bool,\n onChange: PropTypes.func,\n description: PropTypes.string,\n modified: PropTypes.bool,\n titlePosition: PropTypes.oneOf(['right', 'left']),\n theme: PropTypes.oneOf(['default', 'coorpmanager', 'mooc']),\n details: PropTypes.string,\n 'data-name': PropTypes.string,\n requiredSelection: PropTypes.bool\n};\nexport default InputSwitch;\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;;;;;;;AAEA,MAAMA,WAAW,GAAGC,KAAK,IAAI;EAC3B,MAAM;IACJC,KADI;IAEJC,IAFI;IAGJC,EAHI;IAIJC,KAJI;IAKJC,QALI;IAMJC,QAAQ,iBANJ;IAOJC,WAPI;IAQJC,QAAQ,GAAG,KARP;IASJC,KAAK,GAAG,SATJ;IAUJC,aAAa,GAAG,MAVZ;IAWJC,OAAO,GAAG,EAXN;IAYJC,iBAAiB,GAAG,KAZhB;IAaJ,aAAaC;EAbT,IAcFb,KAdJ;EAgBA,MAAMc,QAAQ,GAAGX,EAAE,IAAI,wBAAS,eAAT,CAAvB;EACA,MAAMY,UAAU,GAAGV,QAAQ,GAAG,UAAH,GAAgB,EAA3C;EACA,MAAMW,YAAY,GAAG,IAAAC,cAAA,EAAQ,MAAMC,CAAC,IAAIZ,QAAQ,CAACY,CAAC,CAACC,MAAF,CAASC,OAAV,CAA3B,EAA+C,CAACd,QAAD,CAA/C,CAArB;EAEA,MAAMe,SAA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,EAAE0B,kBAAA,CAAUE;AAbP,CAAxB;eAeezC,W"}
|
package/lib/atom/link/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export default Link;
|
|
2
|
-
declare
|
|
3
|
-
|
|
2
|
+
declare function Link(props: any, legacyContext: any): JSX.Element;
|
|
3
|
+
declare namespace Link {
|
|
4
|
+
const propTypes: {
|
|
4
5
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
5
6
|
className: PropTypes.Requireable<string>;
|
|
6
7
|
href: PropTypes.Requireable<string>;
|
|
@@ -15,8 +16,8 @@ declare class Link extends React.Component<any, any, any> {
|
|
|
15
16
|
onMouseLeave: PropTypes.Requireable<(...args: any[]) => any>;
|
|
16
17
|
style: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
17
18
|
};
|
|
18
|
-
|
|
19
|
-
skin: PropTypes.Requireable<PropTypes.InferProps<{
|
|
19
|
+
namespace contextTypes {
|
|
20
|
+
const skin: PropTypes.Requireable<PropTypes.InferProps<{
|
|
20
21
|
common: PropTypes.Requireable<{
|
|
21
22
|
[x: string]: any;
|
|
22
23
|
}>;
|
|
@@ -37,20 +38,11 @@ declare class Link extends React.Component<any, any, any> {
|
|
|
37
38
|
[x: string]: any;
|
|
38
39
|
}>;
|
|
39
40
|
}>>;
|
|
40
|
-
history: PropTypes.Requireable<PropTypes.InferProps<{
|
|
41
|
+
const history: PropTypes.Requireable<PropTypes.InferProps<{
|
|
41
42
|
createHref: PropTypes.Requireable<(...args: any[]) => any>;
|
|
42
43
|
push: PropTypes.Requireable<(...args: any[]) => any>;
|
|
43
44
|
}>>;
|
|
44
|
-
}
|
|
45
|
-
constructor(props: any);
|
|
46
|
-
state: {
|
|
47
|
-
hovered: boolean;
|
|
48
|
-
};
|
|
49
|
-
handleMouseEnter: () => void;
|
|
50
|
-
handleMouseLeave: () => void;
|
|
51
|
-
handleOnClick: (e: any) => void;
|
|
52
|
-
render(): JSX.Element;
|
|
45
|
+
}
|
|
53
46
|
}
|
|
54
|
-
import React from "react";
|
|
55
47
|
import PropTypes from "prop-types";
|
|
56
48
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/link/index.js"],"names":[],"mappings":";AAMA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/link/index.js"],"names":[],"mappings":";AAMA,mEA+EC"}
|