@coorpacademy/components 11.42.1 → 11.42.4
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/checkbox-with-title/index.d.ts +1 -0
- package/es/atom/checkbox-with-title/index.d.ts.map +1 -1
- package/es/atom/checkbox-with-title/index.js +6 -3
- package/es/atom/checkbox-with-title/index.js.map +1 -1
- package/es/atom/radio-group/style.css +3 -1
- package/es/atom/radio-with-title/index.d.ts +3 -0
- package/es/atom/radio-with-title/index.d.ts.map +1 -1
- package/es/atom/radio-with-title/index.js +23 -5
- package/es/atom/radio-with-title/index.js.map +1 -1
- package/es/atom/radio-with-title/style.css +27 -0
- package/es/atom/radio-with-title/types.d.ts +6 -0
- package/es/atom/radio-with-title/types.d.ts.map +1 -1
- package/es/atom/radio-with-title/types.js +3 -0
- package/es/atom/radio-with-title/types.js.map +1 -1
- package/es/index.d.ts +1 -0
- package/es/index.js +1 -0
- package/es/index.js.map +1 -1
- package/es/molecule/cm-popin/index.d.ts.map +1 -1
- package/es/molecule/cm-popin/index.js +20 -3
- package/es/molecule/cm-popin/index.js.map +1 -1
- package/es/molecule/cm-popin/style.css +17 -0
- package/es/molecule/cm-popin/types.d.ts +36 -0
- package/es/molecule/cm-popin/types.d.ts.map +1 -1
- package/es/molecule/cm-popin/types.js +3 -0
- package/es/molecule/cm-popin/types.js.map +1 -1
- package/es/molecule/draggable-list/index.d.ts +6 -0
- package/es/molecule/progress-bar/index.d.ts +16 -7
- package/es/molecule/progress-bar/index.d.ts.map +1 -1
- package/es/molecule/progress-bar/index.js +61 -4
- package/es/molecule/progress-bar/index.js.map +1 -1
- package/es/molecule/progress-bar/style.css +56 -0
- package/es/molecule/table/index.d.ts +8 -0
- package/es/molecule/table/index.d.ts.map +1 -1
- package/es/molecule/table/index.js +43 -5
- package/es/molecule/table/index.js.map +1 -1
- package/es/molecule/table/style.css +24 -0
- package/es/molecule/title-and-checkbox-wrapper/index.d.ts +1 -0
- package/es/molecule/title-radio-wrapper/index.d.ts +3 -0
- package/es/molecule/title-radio-wrapper/index.d.ts.map +1 -1
- package/es/molecule/title-radio-wrapper/types.d.ts +3 -0
- package/es/molecule/title-radio-wrapper/types.d.ts.map +1 -1
- package/es/molecule/wizard-summary/index.d.ts +3 -0
- package/es/molecule/wizard-summary/index.d.ts.map +1 -1
- package/es/molecule/wizard-summary/index.js +35 -3
- package/es/molecule/wizard-summary/index.js.map +1 -1
- package/es/molecule/wizard-summary/style.css +54 -1
- package/es/organism/brand-learning-priorities/index.d.ts +6 -0
- package/es/organism/brand-table/index.d.ts +8 -0
- package/es/organism/content-selection-list/index.d.ts +95 -0
- package/es/organism/content-selection-list/index.d.ts.map +1 -0
- package/es/organism/content-selection-list/index.js +175 -0
- package/es/organism/content-selection-list/index.js.map +1 -0
- package/es/organism/content-selection-list/style.css +8 -0
- package/es/organism/content-selection-list/types.d.ts +113 -0
- package/es/organism/content-selection-list/types.d.ts.map +1 -0
- package/es/organism/content-selection-list/types.js +58 -0
- package/es/organism/content-selection-list/types.js.map +1 -0
- package/es/organism/content-skill-modal/index.d.ts +7 -0
- package/es/organism/content-skill-modal/index.d.ts.map +1 -1
- package/es/organism/content-skill-modal/types.d.ts +7 -0
- package/es/organism/content-skill-modal/types.d.ts.map +1 -1
- package/es/organism/list-item/index.d.ts +9 -1
- package/es/organism/list-item/index.d.ts.map +1 -1
- package/es/organism/list-item/index.js +16 -3
- package/es/organism/list-item/index.js.map +1 -1
- package/es/organism/list-item/style.css +15 -0
- package/es/organism/list-items/index.d.ts +7 -0
- package/es/organism/rewards-form/index.d.ts +1 -0
- package/es/organism/select-opponents/index.d.ts +1 -0
- package/es/organism/select-opponents/index.d.ts.map +1 -1
- package/es/organism/select-opponents/types.d.ts +1 -0
- package/es/organism/select-opponents/types.d.ts.map +1 -1
- package/es/organism/skill-edition/index.d.ts +8 -3
- package/es/organism/skill-edition/index.d.ts.map +1 -1
- package/es/organism/skill-edition/index.js +3 -168
- package/es/organism/skill-edition/index.js.map +1 -1
- package/es/organism/skill-edition/styles.d.ts +10 -0
- package/es/organism/skill-edition/styles.d.ts.map +1 -0
- package/es/organism/skill-edition/styles.js +10 -0
- package/es/organism/skill-edition/styles.js.map +1 -0
- package/es/organism/skill-edition/types.d.ts +10 -54
- package/es/organism/skill-edition/types.d.ts.map +1 -1
- package/es/organism/skill-edition/types.js +3 -52
- package/es/organism/skill-edition/types.js.map +1 -1
- package/es/organism/title-and-input/index.d.ts +1 -0
- package/es/organism/title-and-input/index.d.ts.map +1 -1
- package/es/organism/title-and-input/types.d.ts +1 -0
- package/es/organism/title-and-input/types.d.ts.map +1 -1
- package/es/organism/wizard-contents/index.d.ts +4 -0
- package/es/template/app-player/loading/index.d.ts +33 -0
- package/es/template/app-player/player/index.d.ts +66 -0
- package/es/template/app-player/player/slides/index.d.ts +33 -0
- package/es/template/app-player/player/slides/index.d.ts.map +1 -1
- package/es/template/app-player/popin-correction/index.d.ts +33 -0
- package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/es/template/app-player/popin-end/index.d.ts +33 -0
- package/es/template/app-review/index.d.ts +33 -0
- package/es/template/app-review/index.d.ts.map +1 -1
- package/es/template/app-review/player/prop-types.d.ts +33 -0
- package/es/template/app-review/player/prop-types.d.ts.map +1 -1
- package/es/template/app-review/prop-types.d.ts +33 -0
- package/es/template/app-review/prop-types.d.ts.map +1 -1
- package/es/template/back-office/brand-update/index.d.ts +80 -3
- package/es/template/certification-detail/index.d.ts +33 -0
- package/es/template/common/dashboard/index.d.ts +66 -0
- package/es/template/common/search-page/index.d.ts +33 -0
- package/es/template/external-course/index.d.ts +33 -0
- package/es/template/playlist-detail/index.d.ts +33 -0
- package/lib/atom/checkbox-with-title/index.d.ts +1 -0
- package/lib/atom/checkbox-with-title/index.d.ts.map +1 -1
- package/lib/atom/checkbox-with-title/index.js +6 -3
- package/lib/atom/checkbox-with-title/index.js.map +1 -1
- package/lib/atom/radio-group/style.css +3 -1
- package/lib/atom/radio-with-title/index.d.ts +3 -0
- package/lib/atom/radio-with-title/index.d.ts.map +1 -1
- package/lib/atom/radio-with-title/index.js +23 -5
- package/lib/atom/radio-with-title/index.js.map +1 -1
- package/lib/atom/radio-with-title/style.css +27 -0
- package/lib/atom/radio-with-title/types.d.ts +6 -0
- package/lib/atom/radio-with-title/types.d.ts.map +1 -1
- package/lib/atom/radio-with-title/types.js +3 -0
- package/lib/atom/radio-with-title/types.js.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -0
- package/lib/index.js.map +1 -1
- package/lib/molecule/cm-popin/index.d.ts.map +1 -1
- package/lib/molecule/cm-popin/index.js +20 -3
- package/lib/molecule/cm-popin/index.js.map +1 -1
- package/lib/molecule/cm-popin/style.css +17 -0
- package/lib/molecule/cm-popin/types.d.ts +36 -0
- package/lib/molecule/cm-popin/types.d.ts.map +1 -1
- package/lib/molecule/cm-popin/types.js +3 -0
- package/lib/molecule/cm-popin/types.js.map +1 -1
- package/lib/molecule/draggable-list/index.d.ts +6 -0
- package/lib/molecule/progress-bar/index.d.ts +16 -7
- package/lib/molecule/progress-bar/index.d.ts.map +1 -1
- package/lib/molecule/progress-bar/index.js +61 -4
- package/lib/molecule/progress-bar/index.js.map +1 -1
- package/lib/molecule/progress-bar/style.css +56 -0
- package/lib/molecule/table/index.d.ts +8 -0
- package/lib/molecule/table/index.d.ts.map +1 -1
- package/lib/molecule/table/index.js +43 -5
- package/lib/molecule/table/index.js.map +1 -1
- package/lib/molecule/table/style.css +24 -0
- package/lib/molecule/title-and-checkbox-wrapper/index.d.ts +1 -0
- package/lib/molecule/title-radio-wrapper/index.d.ts +3 -0
- package/lib/molecule/title-radio-wrapper/index.d.ts.map +1 -1
- package/lib/molecule/title-radio-wrapper/types.d.ts +3 -0
- package/lib/molecule/title-radio-wrapper/types.d.ts.map +1 -1
- package/lib/molecule/wizard-summary/index.d.ts +3 -0
- package/lib/molecule/wizard-summary/index.d.ts.map +1 -1
- package/lib/molecule/wizard-summary/index.js +35 -3
- package/lib/molecule/wizard-summary/index.js.map +1 -1
- package/lib/molecule/wizard-summary/style.css +54 -1
- package/lib/organism/brand-learning-priorities/index.d.ts +6 -0
- package/lib/organism/brand-table/index.d.ts +8 -0
- package/lib/organism/content-selection-list/index.d.ts +95 -0
- package/lib/organism/content-selection-list/index.d.ts.map +1 -0
- package/lib/organism/content-selection-list/index.js +181 -0
- package/lib/organism/content-selection-list/index.js.map +1 -0
- package/lib/organism/content-selection-list/style.css +8 -0
- package/lib/organism/content-selection-list/types.d.ts +113 -0
- package/lib/organism/content-selection-list/types.d.ts.map +1 -0
- package/lib/organism/content-selection-list/types.js +63 -0
- package/lib/organism/content-selection-list/types.js.map +1 -0
- package/lib/organism/content-skill-modal/index.d.ts +7 -0
- package/lib/organism/content-skill-modal/index.d.ts.map +1 -1
- package/lib/organism/content-skill-modal/types.d.ts +7 -0
- package/lib/organism/content-skill-modal/types.d.ts.map +1 -1
- package/lib/organism/list-item/index.d.ts +9 -1
- package/lib/organism/list-item/index.d.ts.map +1 -1
- package/lib/organism/list-item/index.js +16 -3
- package/lib/organism/list-item/index.js.map +1 -1
- package/lib/organism/list-item/style.css +15 -0
- package/lib/organism/list-items/index.d.ts +7 -0
- package/lib/organism/rewards-form/index.d.ts +1 -0
- package/lib/organism/select-opponents/index.d.ts +1 -0
- package/lib/organism/select-opponents/index.d.ts.map +1 -1
- package/lib/organism/select-opponents/types.d.ts +1 -0
- package/lib/organism/select-opponents/types.d.ts.map +1 -1
- package/lib/organism/skill-edition/index.d.ts +8 -3
- package/lib/organism/skill-edition/index.d.ts.map +1 -1
- package/lib/organism/skill-edition/index.js +11 -174
- package/lib/organism/skill-edition/index.js.map +1 -1
- package/lib/organism/skill-edition/styles.d.ts +10 -0
- package/lib/organism/skill-edition/styles.d.ts.map +1 -0
- package/lib/organism/skill-edition/styles.js +15 -0
- package/lib/organism/skill-edition/styles.js.map +1 -0
- package/lib/organism/skill-edition/types.d.ts +10 -54
- package/lib/organism/skill-edition/types.d.ts.map +1 -1
- package/lib/organism/skill-edition/types.js +6 -53
- package/lib/organism/skill-edition/types.js.map +1 -1
- package/lib/organism/title-and-input/index.d.ts +1 -0
- package/lib/organism/title-and-input/index.d.ts.map +1 -1
- package/lib/organism/title-and-input/types.d.ts +1 -0
- package/lib/organism/title-and-input/types.d.ts.map +1 -1
- package/lib/organism/wizard-contents/index.d.ts +4 -0
- package/lib/template/app-player/loading/index.d.ts +33 -0
- package/lib/template/app-player/player/index.d.ts +66 -0
- package/lib/template/app-player/player/slides/index.d.ts +33 -0
- package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-correction/index.d.ts +33 -0
- package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-end/index.d.ts +33 -0
- package/lib/template/app-review/index.d.ts +33 -0
- package/lib/template/app-review/index.d.ts.map +1 -1
- package/lib/template/app-review/player/prop-types.d.ts +33 -0
- package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
- package/lib/template/app-review/prop-types.d.ts +33 -0
- package/lib/template/app-review/prop-types.d.ts.map +1 -1
- package/lib/template/back-office/brand-update/index.d.ts +80 -3
- package/lib/template/certification-detail/index.d.ts +33 -0
- package/lib/template/common/dashboard/index.d.ts +66 -0
- package/lib/template/common/search-page/index.d.ts +33 -0
- package/lib/template/external-course/index.d.ts +33 -0
- package/lib/template/playlist-detail/index.d.ts +33 -0
- package/package.json +2 -2
|
@@ -17,6 +17,7 @@ declare namespace CheckboxWithTitle {
|
|
|
17
17
|
customStyle: PropTypes.Requireable<{
|
|
18
18
|
[x: string]: NonNullable<string | number | null | undefined> | null | undefined;
|
|
19
19
|
}>;
|
|
20
|
+
className: PropTypes.Requireable<string>;
|
|
20
21
|
};
|
|
21
22
|
namespace contextTypes {
|
|
22
23
|
const skin: PropTypes.Requireable<PropTypes.InferProps<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/checkbox-with-title/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/checkbox-with-title/index.js"],"names":[],"mappings":";AAWA,0EAkEC"}
|
|
@@ -3,6 +3,7 @@ import _noop from "lodash/fp/noop";
|
|
|
3
3
|
import _getOr from "lodash/fp/getOr";
|
|
4
4
|
import React, { useMemo } from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
|
+
import classnames from 'classnames';
|
|
6
7
|
import FaIcon from '../icon';
|
|
7
8
|
import { COLORS } from '../../variables/colors';
|
|
8
9
|
import Provider from '../provider';
|
|
@@ -26,7 +27,8 @@ const CheckboxWithTitle = (props, context) => {
|
|
|
26
27
|
iconColor: 'white',
|
|
27
28
|
preset: 's'
|
|
28
29
|
},
|
|
29
|
-
customStyle = {}
|
|
30
|
+
customStyle = {},
|
|
31
|
+
className
|
|
30
32
|
} = props;
|
|
31
33
|
const {
|
|
32
34
|
skin
|
|
@@ -40,7 +42,7 @@ const CheckboxWithTitle = (props, context) => {
|
|
|
40
42
|
const idCheckbox = useMemo(() => _uniqueId('input-checkbox-'), []);
|
|
41
43
|
const handleChange = useMemo(() => e => onChange(e.target.checked), [onChange]);
|
|
42
44
|
return /*#__PURE__*/React.createElement("div", {
|
|
43
|
-
className: style.container,
|
|
45
|
+
className: classnames(style.container, className),
|
|
44
46
|
style: {
|
|
45
47
|
...customStyle
|
|
46
48
|
}
|
|
@@ -94,7 +96,8 @@ CheckboxWithTitle.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
94
96
|
iconColor: PropTypes.string,
|
|
95
97
|
preset: PropTypes.string
|
|
96
98
|
}),
|
|
97
|
-
customStyle: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number]))
|
|
99
|
+
customStyle: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])),
|
|
100
|
+
className: PropTypes.string
|
|
98
101
|
} : {};
|
|
99
102
|
CheckboxWithTitle.contextTypes = {
|
|
100
103
|
skin: Provider.childContextTypes.skin
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","useMemo","PropTypes","FaIcon","COLORS","Provider","style","DEFAULT_ICON_STYLE","padding","width","height","CheckboxWithTitle","props","context","value","title","name","checked","onChange","_noop","dataName","ariaLabel","icon","iconName","iconColor","preset","customStyle","skin","primaryColor","_getOr","cm_primary_blue","idCheckbox","_uniqueId","handleChange","e","target","createElement","
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useMemo","PropTypes","classnames","FaIcon","COLORS","Provider","style","DEFAULT_ICON_STYLE","padding","width","height","CheckboxWithTitle","props","context","value","title","name","checked","onChange","_noop","dataName","ariaLabel","icon","iconName","iconColor","preset","customStyle","className","skin","primaryColor","_getOr","cm_primary_blue","idCheckbox","_uniqueId","handleChange","e","target","createElement","container","htmlFor","type","id","checkbox","label","background","borderColor","dangerouslySetInnerHTML","__html","propTypes","process","env","NODE_ENV","string","bool","func","shape","objectOf","oneOfType","number","contextTypes","childContextTypes"],"sources":["../../../src/atom/checkbox-with-title/index.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {getOr, noop, uniqueId} from 'lodash/fp';\nimport FaIcon from '../icon';\nimport {COLORS} from '../../variables/colors';\nimport Provider from '../provider';\nimport style from './style.css';\n\nconst DEFAULT_ICON_STYLE = {padding: '0', width: '20px', height: '20px'};\n\nconst CheckboxWithTitle = (props, context) => {\n const {\n value,\n title,\n name,\n checked,\n onChange = noop,\n 'data-name': dataName,\n 'aria-label': ariaLabel,\n icon = {iconName: 'check', iconColor: 'white', preset: 's'},\n customStyle = {},\n className\n } = props;\n const {skin} = context;\n const primaryColor = getOr(COLORS.cm_primary_blue, 'common.primary', skin);\n const {iconName, iconColor, preset} = icon;\n const idCheckbox = useMemo(() => uniqueId('input-checkbox-'), []);\n const handleChange = useMemo(() => e => onChange(e.target.checked), [onChange]);\n\n return (\n <div className={classnames(style.container, className)} style={{...customStyle}}>\n {onChange !== noop ? (\n <label htmlFor={idCheckbox}>\n <input\n type=\"checkbox\"\n data-value={value}\n id={idCheckbox}\n name={name}\n onChange={handleChange}\n checked={checked}\n className={style.checkbox}\n data-name={dataName}\n aria-label={ariaLabel}\n />\n <div\n className={style.label}\n style={checked ? {background: primaryColor, borderColor: primaryColor} : null}\n >\n {checked ? (\n <FaIcon\n className={style.icon}\n iconName={iconName}\n iconColor={iconColor}\n preset={preset}\n customStyle={DEFAULT_ICON_STYLE}\n />\n ) : (\n <FaIcon\n className={style.icon}\n iconName={'square'}\n iconColor={'transparent'}\n preset=\"s\"\n customStyle={DEFAULT_ICON_STYLE}\n />\n )}\n </div>\n </label>\n ) : null}\n {title ? (\n <span\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n ) : null}\n </div>\n );\n};\n\nCheckboxWithTitle.propTypes = {\n value: PropTypes.string,\n title: PropTypes.string,\n name: PropTypes.string,\n checked: PropTypes.bool,\n onChange: PropTypes.func,\n 'aria-label': PropTypes.string,\n 'data-name': PropTypes.string,\n icon: PropTypes.shape({\n iconName: PropTypes.string,\n iconColor: PropTypes.string,\n preset: PropTypes.string\n }),\n customStyle: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])),\n className: PropTypes.string\n};\n\nCheckboxWithTitle.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\nexport default CheckboxWithTitle;\n"],"mappings":";;;AAAA,OAAOA,KAAK,IAAGC,OAAO,QAAO,OAAO;AACpC,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,UAAU,MAAM,YAAY;AAEnC,OAAOC,MAAM,MAAM,SAAS;AAC5B,SAAQC,MAAM,QAAO,wBAAwB;AAC7C,OAAOC,QAAQ,MAAM,aAAa;AAClC,OAAOC,KAAK,MAAM,aAAa;AAE/B,MAAMC,kBAAkB,GAAG;EAACC,OAAO,EAAE,GA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AM;EAC9B,WAAW,EAAEnD,SAAS,CAACmD,MAAM;EAC7B9B,IAAI,EAAErB,SAAS,CAACsD,KAAK,CAAC;IACpBhC,QAAQ,EAAEtB,SAAS,CAACmD,MAAM;IAC1B5B,SAAS,EAAEvB,SAAS,CAACmD,MAAM;IAC3B3B,MAAM,EAAExB,SAAS,CAACmD;EACpB,CAAC,CAAC;EACF1B,WAAW,EAAEzB,SAAS,CAACuD,QAAQ,CAACvD,SAAS,CAACwD,SAAS,CAAC,CAACxD,SAAS,CAACmD,MAAM,EAAEnD,SAAS,CAACyD,MAAM,CAAC,CAAC,CAAC;EAC1F/B,SAAS,EAAE1B,SAAS,CAACmD;AACvB,CAAC;AAEDzC,iBAAiB,CAACgD,YAAY,GAAG;EAC/B/B,IAAI,EAAEvB,QAAQ,CAACuD,iBAAiB,CAAChC;AACnC,CAAC;AACD,eAAejB,iBAAiB","ignoreList":[]}
|
|
@@ -83,6 +83,9 @@ declare const RadioWithTitle: {
|
|
|
83
83
|
}>>>;
|
|
84
84
|
name: import("prop-types").Requireable<string>;
|
|
85
85
|
checked: import("prop-types").Requireable<boolean>;
|
|
86
|
+
disabled: import("prop-types").Requireable<boolean>;
|
|
87
|
+
example: import("prop-types").Requireable<string>;
|
|
88
|
+
hint: import("prop-types").Requireable<string>;
|
|
86
89
|
onChange: import("prop-types").Validator<(...args: any[]) => any>;
|
|
87
90
|
'aria-label': import("prop-types").Requireable<string>;
|
|
88
91
|
'data-name': import("prop-types").Requireable<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/radio-with-title/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/radio-with-title/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAKzC,OAAO,EAAY,mBAAmB,EAAC,MAAM,SAAS,CAAC;AAEvD,QAAA,MAAM,cAAc;YAAW,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgDjD,CAAC;AAIF,eAAe,cAAc,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _uniqueId from "lodash/fp/uniqueId";
|
|
2
2
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
3
|
import React, { useCallback } from 'react';
|
|
4
|
+
import classnames from 'classnames';
|
|
4
5
|
import Title from '../title';
|
|
5
6
|
import style from './style.css';
|
|
6
7
|
import { propTypes } from './types';
|
|
@@ -9,14 +10,22 @@ const RadioWithTitle = props => {
|
|
|
9
10
|
title,
|
|
10
11
|
name,
|
|
11
12
|
checked,
|
|
13
|
+
disabled,
|
|
14
|
+
example,
|
|
15
|
+
hint,
|
|
12
16
|
onChange,
|
|
13
17
|
'data-name': dataName,
|
|
14
18
|
'aria-label': ariaLabel
|
|
15
19
|
} = props;
|
|
16
20
|
const idRadio = _uniqueId('input-radio-');
|
|
17
|
-
const
|
|
21
|
+
const hintId = hint ? `${idRadio}-hint` : undefined;
|
|
22
|
+
const handleChange = useCallback(e => {
|
|
23
|
+
if (!disabled) onChange(e.target.checked);
|
|
24
|
+
}, [disabled, onChange]);
|
|
18
25
|
return /*#__PURE__*/React.createElement("div", {
|
|
19
|
-
className: style.container
|
|
26
|
+
className: classnames(style.container, {
|
|
27
|
+
[style.withHint]: hint
|
|
28
|
+
})
|
|
20
29
|
}, /*#__PURE__*/React.createElement("label", {
|
|
21
30
|
htmlFor: idRadio
|
|
22
31
|
}, /*#__PURE__*/React.createElement("input", {
|
|
@@ -25,15 +34,24 @@ const RadioWithTitle = props => {
|
|
|
25
34
|
name: name,
|
|
26
35
|
onChange: handleChange,
|
|
27
36
|
checked: checked,
|
|
37
|
+
disabled: disabled,
|
|
28
38
|
className: style.radio,
|
|
29
39
|
"data-name": dataName,
|
|
30
|
-
"aria-label": ariaLabel
|
|
40
|
+
"aria-label": ariaLabel,
|
|
41
|
+
"aria-describedby": hintId
|
|
31
42
|
}), /*#__PURE__*/React.createElement("span", {
|
|
32
|
-
className: style.title
|
|
43
|
+
className: classnames(style.title, {
|
|
44
|
+
[style.withExample]: example
|
|
45
|
+
})
|
|
33
46
|
}, /*#__PURE__*/React.createElement(Title, _extends({}, title, {
|
|
34
47
|
titleSize: 'small',
|
|
35
48
|
subtitleSize: 'extra-small'
|
|
36
|
-
}))
|
|
49
|
+
})), example ? /*#__PURE__*/React.createElement("span", {
|
|
50
|
+
className: style.example
|
|
51
|
+
}, example) : null)), hint ? /*#__PURE__*/React.createElement("span", {
|
|
52
|
+
id: hintId,
|
|
53
|
+
className: style.hint
|
|
54
|
+
}, hint) : null);
|
|
37
55
|
};
|
|
38
56
|
RadioWithTitle.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {};
|
|
39
57
|
export default RadioWithTitle;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","useCallback","Title","style","propTypes","RadioWithTitle","props","title","name","checked","onChange","dataName","ariaLabel","idRadio","_uniqueId","handleChange","e","target","createElement","className","container","htmlFor","type","id","radio","_extends","titleSize","subtitleSize","process","env","NODE_ENV"],"sources":["../../../src/atom/radio-with-title/index.tsx"],"sourcesContent":["import React, {useCallback} from 'react';\nimport {uniqueId} from 'lodash/fp';\nimport Title from '../title';\nimport style from './style.css';\nimport {propTypes, RadioWithTitleProps} from './types';\n\nconst RadioWithTitle = (props: RadioWithTitleProps) => {\n const {title
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useCallback","classnames","Title","style","propTypes","RadioWithTitle","props","title","name","checked","disabled","example","hint","onChange","dataName","ariaLabel","idRadio","_uniqueId","hintId","undefined","handleChange","e","target","createElement","className","container","withHint","htmlFor","type","id","radio","withExample","_extends","titleSize","subtitleSize","process","env","NODE_ENV"],"sources":["../../../src/atom/radio-with-title/index.tsx"],"sourcesContent":["import React, {useCallback} from 'react';\nimport {uniqueId} from 'lodash/fp';\nimport classnames from 'classnames';\nimport Title from '../title';\nimport style from './style.css';\nimport {propTypes, RadioWithTitleProps} from './types';\n\nconst RadioWithTitle = (props: RadioWithTitleProps) => {\n const {\n title,\n name,\n checked,\n disabled,\n example,\n hint,\n onChange,\n 'data-name': dataName,\n 'aria-label': ariaLabel\n } = props;\n const idRadio = uniqueId('input-radio-');\n const hintId = hint ? `${idRadio}-hint` : undefined;\n const handleChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n if (!disabled) onChange(e.target.checked);\n },\n [disabled, onChange]\n );\n\n return (\n <div className={classnames(style.container, {[style.withHint]: hint})}>\n <label htmlFor={idRadio}>\n <input\n type=\"radio\"\n id={idRadio}\n name={name}\n onChange={handleChange}\n checked={checked}\n disabled={disabled}\n className={style.radio}\n data-name={dataName}\n aria-label={ariaLabel}\n aria-describedby={hintId}\n />\n <span className={classnames(style.title, {[style.withExample]: example})}>\n <Title {...title} titleSize={'small'} subtitleSize={'extra-small'} />\n {example ? <span className={style.example}>{example}</span> : null}\n </span>\n </label>\n {hint ? (\n <span id={hintId} className={style.hint}>\n {hint}\n </span>\n ) : null}\n </div>\n );\n};\n\nRadioWithTitle.propTypes = propTypes;\n\nexport default RadioWithTitle;\n"],"mappings":";;AAAA,OAAOA,KAAK,IAAGC,WAAW,QAAO,OAAO;AAExC,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,KAAK,MAAM,UAAU;AAC5B,OAAOC,KAAK,MAAM,aAAa;AAC/B,SAAQC,SAAS,QAA4B,SAAS;AAEtD,MAAMC,cAAc,GAAIC,KAA0B,IAAK;EACrD,MAAM;IACJC,KAAK;IACLC,IAAI;IACJC,OAAO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EACpEvB,OAAO,gBAAGZ,KAAA,CAAAwB,aAAA;IAAMC,SAAS,EAAErB,KAAK,CAACQ;EAAQ,GAAEA,OAAc,CAAC,GAAG,IAC1D,CACD,CAAC,EACPC,IAAI,gBACHb,KAAA,CAAAwB,aAAA;IAAMM,EAAE,EAAEX,MAAO;IAACM,SAAS,EAAErB,KAAK,CAACS;EAAK,GACrCA,IACG,CAAC,GACL,IACD,CAAC;AAEV,CAAC;AAEDP,cAAc,CAACD,SAAS,GAAA+B,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAGjC,SAAS;AAEpC,eAAeC,cAAc","ignoreList":[]}
|
|
@@ -34,6 +34,12 @@
|
|
|
34
34
|
transition: box-shadow 0.5s linear;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
+
.radio:disabled,
|
|
38
|
+
.radio:disabled + .title {
|
|
39
|
+
opacity: 0.4;
|
|
40
|
+
cursor: not-allowed;
|
|
41
|
+
}
|
|
42
|
+
|
|
37
43
|
.title {
|
|
38
44
|
font-family: "Gilroy";
|
|
39
45
|
font-weight: 700;
|
|
@@ -46,4 +52,25 @@
|
|
|
46
52
|
color: black;
|
|
47
53
|
}
|
|
48
54
|
|
|
55
|
+
.withExample {
|
|
56
|
+
flex-direction: column;
|
|
57
|
+
align-items: flex-start;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.example {
|
|
61
|
+
composes: extraSmallSubtitleFormGroup from "../title/style.css";
|
|
62
|
+
font-style: italic;
|
|
63
|
+
margin-top: 4px;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.withHint {
|
|
67
|
+
flex-direction: column;
|
|
68
|
+
align-items: flex-start;
|
|
69
|
+
}
|
|
49
70
|
|
|
71
|
+
.hint {
|
|
72
|
+
composes: extraSmallSubtitleFormGroup from "../title/style.css";
|
|
73
|
+
font-style: normal;
|
|
74
|
+
margin-top: 4px;
|
|
75
|
+
margin-left: 40px;
|
|
76
|
+
}
|
|
@@ -81,6 +81,9 @@ export declare const propTypes: {
|
|
|
81
81
|
}>>>;
|
|
82
82
|
name: PropTypes.Requireable<string>;
|
|
83
83
|
checked: PropTypes.Requireable<boolean>;
|
|
84
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
85
|
+
example: PropTypes.Requireable<string>;
|
|
86
|
+
hint: PropTypes.Requireable<string>;
|
|
84
87
|
onChange: PropTypes.Validator<(...args: any[]) => any>;
|
|
85
88
|
'aria-label': PropTypes.Requireable<string>;
|
|
86
89
|
'data-name': PropTypes.Requireable<string>;
|
|
@@ -95,6 +98,9 @@ export declare type RadioWithTitleProps = {
|
|
|
95
98
|
};
|
|
96
99
|
name?: string;
|
|
97
100
|
checked: boolean;
|
|
101
|
+
disabled?: boolean;
|
|
102
|
+
example?: string;
|
|
103
|
+
hint?: string;
|
|
98
104
|
onChange: (value: boolean) => void;
|
|
99
105
|
'aria-label': string;
|
|
100
106
|
'data-name'?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/atom/radio-with-title/types.ts"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAGnC,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/atom/radio-with-title/types.ts"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAGnC,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAUrB,CAAC;AAEF,oBAAY,mBAAmB,GAAG;IAChC,KAAK,EAAE;QACL,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,YAAY,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC"}
|
|
@@ -4,6 +4,9 @@ export const propTypes = {
|
|
|
4
4
|
title: PropTypes.shape(Title.propTypes).isRequired,
|
|
5
5
|
name: PropTypes.string,
|
|
6
6
|
checked: PropTypes.bool,
|
|
7
|
+
disabled: PropTypes.bool,
|
|
8
|
+
example: PropTypes.string,
|
|
9
|
+
hint: PropTypes.string,
|
|
7
10
|
onChange: PropTypes.func.isRequired,
|
|
8
11
|
'aria-label': PropTypes.string,
|
|
9
12
|
'data-name': PropTypes.string
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":["PropTypes","Title","propTypes","title","shape","isRequired","name","string","checked","bool","onChange","func"],"sources":["../../../src/atom/radio-with-title/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport Title from '../title';\n\nexport const propTypes = {\n title: PropTypes.shape(Title.propTypes).isRequired,\n name: PropTypes.string,\n checked: PropTypes.bool,\n onChange: PropTypes.func.isRequired,\n 'aria-label': PropTypes.string,\n 'data-name': PropTypes.string\n};\n\nexport type RadioWithTitleProps = {\n title: {\n title: string;\n subtitle: string;\n type: string;\n 'data-name': string;\n subtitleSize: string;\n };\n name?: string;\n checked: boolean;\n onChange: (value: boolean) => void;\n 'aria-label': string;\n 'data-name'?: string;\n};\n"],"mappings":"AAAA,OAAOA,SAAS,MAAM,YAAY;AAClC,OAAOC,KAAK,MAAM,UAAU;AAE5B,OAAO,MAAMC,SAAS,GAAG;EACvBC,KAAK,EAAEH,SAAS,CAACI,KAAK,CAACH,KAAK,CAACC,SAAS,CAAC,CAACG,UAAU;EAClDC,IAAI,EAAEN,SAAS,CAACO,MAAM;EACtBC,OAAO,EAAER,SAAS,CAACS,IAAI;EACvBC,QAAQ,EAAEV,SAAS,
|
|
1
|
+
{"version":3,"file":"types.js","names":["PropTypes","Title","propTypes","title","shape","isRequired","name","string","checked","bool","disabled","example","hint","onChange","func"],"sources":["../../../src/atom/radio-with-title/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport Title from '../title';\n\nexport const propTypes = {\n title: PropTypes.shape(Title.propTypes).isRequired,\n name: PropTypes.string,\n checked: PropTypes.bool,\n disabled: PropTypes.bool,\n example: PropTypes.string,\n hint: PropTypes.string,\n onChange: PropTypes.func.isRequired,\n 'aria-label': PropTypes.string,\n 'data-name': PropTypes.string\n};\n\nexport type RadioWithTitleProps = {\n title: {\n title: string;\n subtitle: string;\n type: string;\n 'data-name': string;\n subtitleSize: string;\n };\n name?: string;\n checked: boolean;\n disabled?: boolean;\n example?: string;\n hint?: string;\n onChange: (value: boolean) => void;\n 'aria-label': string;\n 'data-name'?: string;\n};\n"],"mappings":"AAAA,OAAOA,SAAS,MAAM,YAAY;AAClC,OAAOC,KAAK,MAAM,UAAU;AAE5B,OAAO,MAAMC,SAAS,GAAG;EACvBC,KAAK,EAAEH,SAAS,CAACI,KAAK,CAACH,KAAK,CAACC,SAAS,CAAC,CAACG,UAAU;EAClDC,IAAI,EAAEN,SAAS,CAACO,MAAM;EACtBC,OAAO,EAAER,SAAS,CAACS,IAAI;EACvBC,QAAQ,EAAEV,SAAS,CAACS,IAAI;EACxBE,OAAO,EAAEX,SAAS,CAACO,MAAM;EACzBK,IAAI,EAAEZ,SAAS,CAACO,MAAM;EACtBM,QAAQ,EAAEb,SAAS,CAACc,IAAI,CAACT,UAAU;EACnC,YAAY,EAAEL,SAAS,CAACO,MAAM;EAC9B,WAAW,EAAEP,SAAS,CAACO;AACzB,CAAC","ignoreList":[]}
|
package/es/index.d.ts
CHANGED
package/es/index.js
CHANGED
|
@@ -5,4 +5,5 @@ import Player from './template/app-player/player';
|
|
|
5
5
|
import Loading from './template/app-player/loading';
|
|
6
6
|
import PopinNoAccess from './template/app-player/popin-no-access';
|
|
7
7
|
export { Provider, PopinEnd, PopinCorrection, Loading, Player, PopinNoAccess };
|
|
8
|
+
export { default as ContentSelectionList } from './organism/content-selection-list';
|
|
8
9
|
//# sourceMappingURL=index.js.map
|
package/es/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["Provider","PopinEnd","PopinCorrection","Player","Loading","PopinNoAccess"],"sources":["../src/index.js"],"sourcesContent":["import Provider from './atom/provider';\nimport PopinEnd from './template/app-player/popin-end';\nimport PopinCorrection from './template/app-player/popin-correction';\nimport Player from './template/app-player/player';\nimport Loading from './template/app-player/loading';\nimport PopinNoAccess from './template/app-player/popin-no-access';\n\nexport {Provider, PopinEnd, PopinCorrection, Loading, Player, PopinNoAccess};\n"],"mappings":"AAAA,OAAOA,QAAQ,MAAM,iBAAiB;AACtC,OAAOC,QAAQ,MAAM,iCAAiC;AACtD,OAAOC,eAAe,MAAM,wCAAwC;AACpE,OAAOC,MAAM,MAAM,8BAA8B;AACjD,OAAOC,OAAO,MAAM,+BAA+B;AACnD,OAAOC,aAAa,MAAM,uCAAuC;AAEjE,SAAQL,QAAQ,EAAEC,QAAQ,EAAEC,eAAe,EAAEE,OAAO,EAAED,MAAM,EAAEE,aAAa","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.js","names":["Provider","PopinEnd","PopinCorrection","Player","Loading","PopinNoAccess","default","ContentSelectionList"],"sources":["../src/index.js"],"sourcesContent":["import Provider from './atom/provider';\nimport PopinEnd from './template/app-player/popin-end';\nimport PopinCorrection from './template/app-player/popin-correction';\nimport Player from './template/app-player/player';\nimport Loading from './template/app-player/loading';\nimport PopinNoAccess from './template/app-player/popin-no-access';\n\nexport {Provider, PopinEnd, PopinCorrection, Loading, Player, PopinNoAccess};\nexport {default as ContentSelectionList} from './organism/content-selection-list';\n"],"mappings":"AAAA,OAAOA,QAAQ,MAAM,iBAAiB;AACtC,OAAOC,QAAQ,MAAM,iCAAiC;AACtD,OAAOC,eAAe,MAAM,wCAAwC;AACpE,OAAOC,MAAM,MAAM,8BAA8B;AACjD,OAAOC,OAAO,MAAM,+BAA+B;AACnD,OAAOC,aAAa,MAAM,uCAAuC;AAEjE,SAAQL,QAAQ,EAAEC,QAAQ,EAAEC,eAAe,EAAEE,OAAO,EAAED,MAAM,EAAEE,aAAa;AAC3E,SAAQC,OAAO,IAAIC,oBAAoB,QAAO,mCAAmC","ignoreList":[]}
|
|
@@ -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":";AA8CA,kDAiTC"}
|
|
@@ -13,6 +13,8 @@ import CardsGrid from '../../organism/cards-grid';
|
|
|
13
13
|
import ListItems from '../../organism/list-items';
|
|
14
14
|
import Link from '../../atom/link';
|
|
15
15
|
import Icon from '../../atom/icon';
|
|
16
|
+
import WizardSummary from '../wizard-summary';
|
|
17
|
+
import Notification from '../../atom/notification';
|
|
16
18
|
import style from './style.css';
|
|
17
19
|
import propTypes from './types';
|
|
18
20
|
|
|
@@ -45,6 +47,8 @@ const CMPopin = props => {
|
|
|
45
47
|
icon,
|
|
46
48
|
backgroundImageUrl,
|
|
47
49
|
descriptionText,
|
|
50
|
+
sections,
|
|
51
|
+
warning,
|
|
48
52
|
thirdButton,
|
|
49
53
|
cookieTitle,
|
|
50
54
|
descriptionBtnTxt,
|
|
@@ -80,7 +84,8 @@ const CMPopin = props => {
|
|
|
80
84
|
};
|
|
81
85
|
}
|
|
82
86
|
}, [handleCloseButton, mode, onClose]);
|
|
83
|
-
const
|
|
87
|
+
const hasImpact = (mode === 'alert' || mode === 'information') && (!isEmpty(sections) || Boolean(warning));
|
|
88
|
+
const wrapperPopinStyle = classNames(style.popin, hasImpact && style.popinImpact, mode === 'cookie' && style.popinCookie, mode === 'list' && style.popinFilesList, mode === 'items' && style.popinItems);
|
|
84
89
|
const buildIcon = () => {
|
|
85
90
|
if (typeof icon === 'string') {
|
|
86
91
|
const LogoComponent = LOGO[icon];
|
|
@@ -248,14 +253,26 @@ const CMPopin = props => {
|
|
|
248
253
|
"data-name": `cm-popin-cta-${thirdButton.type}`
|
|
249
254
|
}))) : null);
|
|
250
255
|
};
|
|
256
|
+
const renderImpact = () => {
|
|
257
|
+
if (mode !== 'alert' && mode !== 'information') return null;
|
|
258
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, !isEmpty(sections) ? /*#__PURE__*/React.createElement(WizardSummary, {
|
|
259
|
+
sections: sections,
|
|
260
|
+
inline: true
|
|
261
|
+
}) : null, warning ? /*#__PURE__*/React.createElement("div", {
|
|
262
|
+
role: "alert"
|
|
263
|
+
}, /*#__PURE__*/React.createElement(Notification, {
|
|
264
|
+
type: "warning",
|
|
265
|
+
message: warning
|
|
266
|
+
})) : null);
|
|
267
|
+
};
|
|
251
268
|
return /*#__PURE__*/React.createElement("div", {
|
|
252
|
-
className: mode !== 'cookie' ? style.background : null,
|
|
269
|
+
className: mode !== 'cookie' ? classNames(style.background, hasImpact && style.impactBackground) : null,
|
|
253
270
|
style: backgroundImageStyle,
|
|
254
271
|
"data-name": 'cm-popin-container'
|
|
255
272
|
}, /*#__PURE__*/React.createElement("div", {
|
|
256
273
|
className: wrapperPopinStyle,
|
|
257
274
|
ref: nodeRef
|
|
258
|
-
}, renderHeader(), renderContent(), descriptionBtnTxt ? /*#__PURE__*/React.createElement("div", {
|
|
275
|
+
}, renderHeader(), renderContent(), renderImpact(), descriptionBtnTxt ? /*#__PURE__*/React.createElement("div", {
|
|
259
276
|
className: style.descriptionBtn
|
|
260
277
|
}, descriptionBtnTxt) : null, renderItems(), renderBtnSwitch(), renderButtons()));
|
|
261
278
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","useRef","useEffect","useMemo","NovaSolidInterfaceFeedbackInterfaceAlertDiamond","AlertDiamond","NovaSolidApplicationsWindowUpload3","WindowUpload","NovaLineSettingsCookie","Cookie","NovaSolidSpaceMoonRocket","MoonRocket","NovaCompositionCoorpacademyPadlock","LockIcon","NovaLineStatusCheckCircle1","CheckCircle1","NovaSolidFilesBasicFileLines","FileLinesIcon","NovaSolidInterfaceFeedbackInterfaceAlertRounded","AlertIcon","map","isEmpty","classNames","Provider","ButtonLink","ButtonLinkIcon","InputSwitch","Title","CardsGrid","ListItems","Link","Icon","style","propTypes","LOGO","IconType","lockedContent","createElement","className","lockIcon","fileZipped","filesListIconContainer","filesListIcon","CMPopin","props","content","mode","firstButton","secondButton","onClose","header","icon","backgroundImageUrl","descriptionText","thirdButton","cookieTitle","descriptionBtnTxt","listBtnSwicth","items","link","backgroundImageStyle","backgroundImage","backgroundSize","handleCloseButton","nodeRef","closePopin","e","current","contains","target","handleKeyDown","key","document","addEventListener","removeEventListener","wrapperPopinStyle","popin","popinCookie","popinFilesList","popinItems","buildIcon","LogoComponent","_extends","buildHeader","title","headerIcon","TopTitleIcon","Fragment","headerContent","headerBackground","src","cookieHeader","cookieIconContainer","cookieIcon","renderHeader","close","onCloseButton","onClick","size","popinHeader","getClassBtnSwitch","index","btnList","firstBtnSwitchContainer","length","lastBtnSwitchContainer","singleSwitchContainer","renderBtnSwitch","convert","cap","el","type","value","onChange","titlePosition","theme","details","requiredSelection","disabled","id","dataName","renderItems","list","itemsContainer","filesListContainer","renderContent","isCookieOrInformations","renderContentTitle","message","dangerouslySetInnerHTML","__html","cookieTitleContainer","titleContainer","contentSection","renderButtons","buttonContainer","largeButton","button","handleOnclick","background","ref","descriptionBtn","process","env","NODE_ENV","contextTypes","translate","childContextTypes"],"sources":["../../../src/molecule/cm-popin/index.js"],"sourcesContent":["import React, {useRef, useEffect, useMemo} from 'react';\nimport {\n NovaSolidInterfaceFeedbackInterfaceAlertDiamond as AlertDiamond,\n NovaSolidApplicationsWindowUpload3 as WindowUpload,\n NovaLineSettingsCookie as Cookie,\n NovaSolidSpaceMoonRocket as MoonRocket,\n NovaCompositionCoorpacademyPadlock as LockIcon,\n NovaLineStatusCheckCircle1 as CheckCircle1,\n NovaSolidFilesBasicFileLines as FileLinesIcon,\n NovaSolidInterfaceFeedbackInterfaceAlertRounded as AlertIcon\n} from '@coorpacademy/nova-icons';\nimport map from 'lodash/fp/map';\nimport isEmpty from 'lodash/fp/isEmpty';\nimport classNames from 'classnames';\nimport Provider from '../../atom/provider';\nimport ButtonLink from '../../atom/button-link';\nimport ButtonLinkIcon from '../../atom/button-link-icon';\nimport InputSwitch from '../../atom/input-switch';\nimport Title from '../../atom/title';\nimport CardsGrid from '../../organism/cards-grid';\nimport ListItems from '../../organism/list-items';\nimport Link from '../../atom/link';\nimport Icon from '../../atom/icon';\nimport style from './style.css';\nimport propTypes from './types';\n\n// DEPRECATED\nconst LOGO = {\n AlertDiamond,\n WindowUpload,\n MoonRocket,\n CheckCircle1,\n AlertIcon\n};\n\nconst IconType = {\n lockedContent: <LockIcon className={style.lockIcon} />,\n fileZipped: (\n <div className={style.filesListIconContainer}>\n <FileLinesIcon className={style.filesListIcon} />\n </div>\n )\n};\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 items,\n link\n } = props;\n\n const backgroundImageStyle = backgroundImageUrl\n ? {\n backgroundImage: `url(${backgroundImageUrl})`,\n backgroundSize: 'cover'\n }\n : null;\n const handleCloseButton = useMemo(() => () => onClose(), [onClose]);\n const nodeRef = useRef(null);\n useEffect(() => {\n if (mode === 'items') {\n const closePopin = e => {\n if (nodeRef && nodeRef.current && !nodeRef.current.contains(e.target)) {\n handleCloseButton();\n }\n };\n const handleKeyDown = e => {\n if (e?.key === 'Escape') {\n handleCloseButton();\n }\n };\n document.addEventListener('click', closePopin);\n document.addEventListener('touchstart', closePopin);\n document.addEventListener('keydown', handleKeyDown);\n return () => {\n document.removeEventListener('click', closePopin);\n document.removeEventListener('touchstart', closePopin);\n document.removeEventListener('keydown', handleKeyDown);\n };\n }\n }, [handleCloseButton, mode, onClose]);\n\n const wrapperPopinStyle = classNames(\n style.popin,\n mode === 'cookie' && style.popinCookie,\n mode === 'list' && style.popinFilesList,\n mode === 'items' && style.popinItems\n );\n\n const buildIcon = () => {\n if (typeof icon === 'string') {\n const LogoComponent = LOGO[icon];\n return LogoComponent ? <LogoComponent className={style.icon} /> : null;\n }\n\n return !isEmpty(icon) ? <Icon {...icon} className={style.icon} /> : null;\n };\n\n const buildHeader = () => {\n if (header) {\n const {title, headerIcon, backgroundImage} = header;\n const TopTitleIcon = IconType[headerIcon];\n\n return (\n <>\n {title ? (\n <div className={style.headerContent}>\n {TopTitleIcon}\n <Title {...title} />\n </div>\n ) : null}\n {backgroundImage ? (\n <img className={style.headerBackground} src={backgroundImage} />\n ) : null}\n </>\n );\n }\n\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 };\n\n const renderHeader = () => {\n const headerContent = buildHeader();\n const close = onClose ? (\n <div className={style.onCloseButton}>\n <ButtonLinkIcon\n onClick={handleCloseButton}\n data-name={'close-icon'}\n aria-label={'close-icon'}\n size=\"small\"\n icon=\"close\"\n />\n </div>\n ) : null;\n\n if (isEmpty(headerContent) && isEmpty(close)) return null;\n\n return (\n <header className={style.popinHeader}>\n {headerContent}\n {close}\n </header>\n );\n };\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\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\n const renderItems = () => {\n if (isEmpty(items)) return null;\n const {type, list} = items;\n\n if (type === 'content')\n return (\n <div className={style.itemsContainer} data-name={'cm-popin-cards'}>\n <CardsGrid {...list} />\n </div>\n );\n if (type === 'list')\n return (\n <div className={style.filesListContainer}>\n <ListItems {...list} />\n </div>\n );\n\n return null;\n };\n\n const renderContent = () => {\n if (mode === 'items' || mode === 'list') return;\n\n const isCookieOrInformations = mode === 'cookie' || mode === 'information';\n const renderContentTitle = () => {\n if (!content) return null;\n\n if (isCookieOrInformations)\n return (\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 );\n\n return (\n <div className={mode === 'alert' ? style.content : style.message}>\n <Title title={content} data-name={'cm-popin-content'} />\n </div>\n );\n };\n\n return (\n <div className={isCookieOrInformations ? style.cookieTitleContainer : style.titleContainer}>\n {buildIcon()}\n <div className={style.contentSection}>\n {renderContentTitle()}\n {descriptionText ? (\n <div\n className={style.descriptionText}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: descriptionText}}\n />\n ) : null}\n </div>\n {link ? <Link {...link} /> : null}\n </div>\n );\n };\n\n const renderButtons = () => {\n if (!firstButton && !secondButton && !thirdButton) return null;\n\n return (\n <div className={style.buttonContainer}>\n {firstButton ? (\n <div className={firstButton.largeButton ? style.largeButton : style.button}>\n <ButtonLink\n {...firstButton}\n onClick={firstButton.handleOnclick}\n data-name={'cm-popin-cta'}\n />\n </div>\n ) : null}\n {secondButton ? (\n <div className={secondButton.largeButton ? style.largeButton : style.button}>\n <ButtonLink\n {...secondButton}\n onClick={secondButton.handleOnclick}\n data-name={`cm-popin-cta-${secondButton.type}`}\n />\n </div>\n ) : null}\n {thirdButton ? (\n <div className={thirdButton.largeButton ? style.largeButton : style.button}>\n <ButtonLink\n {...thirdButton}\n onClick={thirdButton.handleOnclick}\n data-name={`cm-popin-cta-${thirdButton.type}`}\n />\n </div>\n ) : null}\n </div>\n );\n };\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={wrapperPopinStyle} ref={nodeRef}>\n {renderHeader()}\n {renderContent()}\n {descriptionBtnTxt ? <div className={style.descriptionBtn}>{descriptionBtnTxt}</div> : null}\n {renderItems()}\n {renderBtnSwitch()}\n {renderButtons()}\n </div>\n </div>\n );\n};\n\nCMPopin.propTypes = propTypes;\nCMPopin.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nexport default CMPopin;\n"],"mappings":";AAAA,OAAOA,KAAK,IAAGC,MAAM,EAAEC,SAAS,EAAEC,OAAO,QAAO,OAAO;AACvD,SACEC,+CAA+C,IAAIC,YAAY,EAC/DC,kCAAkC,IAAIC,YAAY,EAClDC,sBAAsB,IAAIC,MAAM,EAChCC,wBAAwB,IAAIC,UAAU,EACtCC,kCAAkC,IAAIC,QAAQ,EAC9CC,0BAA0B,IAAIC,YAAY,EAC1CC,4BAA4B,IAAIC,aAAa,EAC7CC,+CAA+C,IAAIC,SAAS,QACvD,0BAA0B;AACjC,OAAOC,GAAG,MAAM,eAAe;AAC/B,OAAOC,OAAO,MAAM,mBAAmB;AACvC,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,QAAQ,MAAM,qBAAqB;AAC1C,OAAOC,UAAU,MAAM,wBAAwB;AAC/C,OAAOC,cAAc,MAAM,6BAA6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CAAC,CAAC,EACd+B,aAAa,CAAC,CAAC,EACfrE,iBAAiB,gBAAGxD,KAAA,CAAAqC,aAAA;IAAKC,SAAS,EAAEN,KAAK,CAAC6G;EAAe,GAAErF,iBAAuB,CAAC,GAAG,IAAI,EAC1FiE,WAAW,CAAC,CAAC,EACbd,eAAe,CAAC,CAAC,EACjB2B,aAAa,CAAC,CACZ,CACF,CAAC;AAEV,CAAC;AAED3F,OAAO,CAACV,SAAS,GAAA6G,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAG/G,SAAS;AAC7BU,OAAO,CAACsG,YAAY,GAAG;EACrBC,SAAS,EAAE3H,QAAQ,CAAC4H,iBAAiB,CAACD;AACxC,CAAC;AAED,eAAevG,OAAO","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useRef","useEffect","useMemo","NovaSolidInterfaceFeedbackInterfaceAlertDiamond","AlertDiamond","NovaSolidApplicationsWindowUpload3","WindowUpload","NovaLineSettingsCookie","Cookie","NovaSolidSpaceMoonRocket","MoonRocket","NovaCompositionCoorpacademyPadlock","LockIcon","NovaLineStatusCheckCircle1","CheckCircle1","NovaSolidFilesBasicFileLines","FileLinesIcon","NovaSolidInterfaceFeedbackInterfaceAlertRounded","AlertIcon","map","isEmpty","classNames","Provider","ButtonLink","ButtonLinkIcon","InputSwitch","Title","CardsGrid","ListItems","Link","Icon","WizardSummary","Notification","style","propTypes","LOGO","IconType","lockedContent","createElement","className","lockIcon","fileZipped","filesListIconContainer","filesListIcon","CMPopin","props","content","mode","firstButton","secondButton","onClose","header","icon","backgroundImageUrl","descriptionText","sections","warning","thirdButton","cookieTitle","descriptionBtnTxt","listBtnSwicth","items","link","backgroundImageStyle","backgroundImage","backgroundSize","handleCloseButton","nodeRef","closePopin","e","current","contains","target","handleKeyDown","key","document","addEventListener","removeEventListener","hasImpact","Boolean","wrapperPopinStyle","popin","popinImpact","popinCookie","popinFilesList","popinItems","buildIcon","LogoComponent","_extends","buildHeader","title","headerIcon","TopTitleIcon","Fragment","headerContent","headerBackground","src","cookieHeader","cookieIconContainer","cookieIcon","renderHeader","close","onCloseButton","onClick","size","popinHeader","getClassBtnSwitch","index","btnList","firstBtnSwitchContainer","length","lastBtnSwitchContainer","singleSwitchContainer","renderBtnSwitch","convert","cap","el","type","value","onChange","titlePosition","theme","details","requiredSelection","disabled","id","dataName","renderItems","list","itemsContainer","filesListContainer","renderContent","isCookieOrInformations","renderContentTitle","message","dangerouslySetInnerHTML","__html","cookieTitleContainer","titleContainer","contentSection","renderButtons","buttonContainer","largeButton","button","handleOnclick","renderImpact","inline","role","background","impactBackground","ref","descriptionBtn","process","env","NODE_ENV","contextTypes","translate","childContextTypes"],"sources":["../../../src/molecule/cm-popin/index.js"],"sourcesContent":["import React, {useRef, useEffect, useMemo} from 'react';\nimport {\n NovaSolidInterfaceFeedbackInterfaceAlertDiamond as AlertDiamond,\n NovaSolidApplicationsWindowUpload3 as WindowUpload,\n NovaLineSettingsCookie as Cookie,\n NovaSolidSpaceMoonRocket as MoonRocket,\n NovaCompositionCoorpacademyPadlock as LockIcon,\n NovaLineStatusCheckCircle1 as CheckCircle1,\n NovaSolidFilesBasicFileLines as FileLinesIcon,\n NovaSolidInterfaceFeedbackInterfaceAlertRounded as AlertIcon\n} from '@coorpacademy/nova-icons';\nimport map from 'lodash/fp/map';\nimport isEmpty from 'lodash/fp/isEmpty';\nimport classNames from 'classnames';\nimport Provider from '../../atom/provider';\nimport ButtonLink from '../../atom/button-link';\nimport ButtonLinkIcon from '../../atom/button-link-icon';\nimport InputSwitch from '../../atom/input-switch';\nimport Title from '../../atom/title';\nimport CardsGrid from '../../organism/cards-grid';\nimport ListItems from '../../organism/list-items';\nimport Link from '../../atom/link';\nimport Icon from '../../atom/icon';\nimport WizardSummary from '../wizard-summary';\nimport Notification from '../../atom/notification';\nimport style from './style.css';\nimport propTypes from './types';\n\n// DEPRECATED\nconst LOGO = {\n AlertDiamond,\n WindowUpload,\n MoonRocket,\n CheckCircle1,\n AlertIcon\n};\n\nconst IconType = {\n lockedContent: <LockIcon className={style.lockIcon} />,\n fileZipped: (\n <div className={style.filesListIconContainer}>\n <FileLinesIcon className={style.filesListIcon} />\n </div>\n )\n};\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 sections,\n warning,\n thirdButton,\n cookieTitle,\n descriptionBtnTxt,\n listBtnSwicth,\n items,\n link\n } = props;\n\n const backgroundImageStyle = backgroundImageUrl\n ? {\n backgroundImage: `url(${backgroundImageUrl})`,\n backgroundSize: 'cover'\n }\n : null;\n const handleCloseButton = useMemo(() => () => onClose(), [onClose]);\n const nodeRef = useRef(null);\n useEffect(() => {\n if (mode === 'items') {\n const closePopin = e => {\n if (nodeRef && nodeRef.current && !nodeRef.current.contains(e.target)) {\n handleCloseButton();\n }\n };\n const handleKeyDown = e => {\n if (e?.key === 'Escape') {\n handleCloseButton();\n }\n };\n document.addEventListener('click', closePopin);\n document.addEventListener('touchstart', closePopin);\n document.addEventListener('keydown', handleKeyDown);\n return () => {\n document.removeEventListener('click', closePopin);\n document.removeEventListener('touchstart', closePopin);\n document.removeEventListener('keydown', handleKeyDown);\n };\n }\n }, [handleCloseButton, mode, onClose]);\n\n const hasImpact =\n (mode === 'alert' || mode === 'information') && (!isEmpty(sections) || Boolean(warning));\n const wrapperPopinStyle = classNames(\n style.popin,\n hasImpact && style.popinImpact,\n mode === 'cookie' && style.popinCookie,\n mode === 'list' && style.popinFilesList,\n mode === 'items' && style.popinItems\n );\n\n const buildIcon = () => {\n if (typeof icon === 'string') {\n const LogoComponent = LOGO[icon];\n return LogoComponent ? <LogoComponent className={style.icon} /> : null;\n }\n\n return !isEmpty(icon) ? <Icon {...icon} className={style.icon} /> : null;\n };\n\n const buildHeader = () => {\n if (header) {\n const {title, headerIcon, backgroundImage} = header;\n const TopTitleIcon = IconType[headerIcon];\n\n return (\n <>\n {title ? (\n <div className={style.headerContent}>\n {TopTitleIcon}\n <Title {...title} />\n </div>\n ) : null}\n {backgroundImage ? (\n <img className={style.headerBackground} src={backgroundImage} />\n ) : null}\n </>\n );\n }\n\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 };\n\n const renderHeader = () => {\n const headerContent = buildHeader();\n const close = onClose ? (\n <div className={style.onCloseButton}>\n <ButtonLinkIcon\n onClick={handleCloseButton}\n data-name={'close-icon'}\n aria-label={'close-icon'}\n size=\"small\"\n icon=\"close\"\n />\n </div>\n ) : null;\n\n if (isEmpty(headerContent) && isEmpty(close)) return null;\n\n return (\n <header className={style.popinHeader}>\n {headerContent}\n {close}\n </header>\n );\n };\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\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\n const renderItems = () => {\n if (isEmpty(items)) return null;\n const {type, list} = items;\n\n if (type === 'content')\n return (\n <div className={style.itemsContainer} data-name={'cm-popin-cards'}>\n <CardsGrid {...list} />\n </div>\n );\n if (type === 'list')\n return (\n <div className={style.filesListContainer}>\n <ListItems {...list} />\n </div>\n );\n\n return null;\n };\n\n const renderContent = () => {\n if (mode === 'items' || mode === 'list') return;\n\n const isCookieOrInformations = mode === 'cookie' || mode === 'information';\n const renderContentTitle = () => {\n if (!content) return null;\n\n if (isCookieOrInformations)\n return (\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 );\n\n return (\n <div className={mode === 'alert' ? style.content : style.message}>\n <Title title={content} data-name={'cm-popin-content'} />\n </div>\n );\n };\n\n return (\n <div className={isCookieOrInformations ? style.cookieTitleContainer : style.titleContainer}>\n {buildIcon()}\n <div className={style.contentSection}>\n {renderContentTitle()}\n {descriptionText ? (\n <div\n className={style.descriptionText}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: descriptionText}}\n />\n ) : null}\n </div>\n {link ? <Link {...link} /> : null}\n </div>\n );\n };\n\n const renderButtons = () => {\n if (!firstButton && !secondButton && !thirdButton) return null;\n\n return (\n <div className={style.buttonContainer}>\n {firstButton ? (\n <div className={firstButton.largeButton ? style.largeButton : style.button}>\n <ButtonLink\n {...firstButton}\n onClick={firstButton.handleOnclick}\n data-name={'cm-popin-cta'}\n />\n </div>\n ) : null}\n {secondButton ? (\n <div className={secondButton.largeButton ? style.largeButton : style.button}>\n <ButtonLink\n {...secondButton}\n onClick={secondButton.handleOnclick}\n data-name={`cm-popin-cta-${secondButton.type}`}\n />\n </div>\n ) : null}\n {thirdButton ? (\n <div className={thirdButton.largeButton ? style.largeButton : style.button}>\n <ButtonLink\n {...thirdButton}\n onClick={thirdButton.handleOnclick}\n data-name={`cm-popin-cta-${thirdButton.type}`}\n />\n </div>\n ) : null}\n </div>\n );\n };\n\n const renderImpact = () => {\n if (mode !== 'alert' && mode !== 'information') return null;\n return (\n <>\n {!isEmpty(sections) ? <WizardSummary sections={sections} inline /> : null}\n {warning ? (\n <div role=\"alert\">\n <Notification type=\"warning\" message={warning} />\n </div>\n ) : null}\n </>\n );\n };\n\n return (\n <div\n className={\n mode !== 'cookie' ? classNames(style.background, hasImpact && style.impactBackground) : null\n }\n style={backgroundImageStyle}\n data-name={'cm-popin-container'}\n >\n <div className={wrapperPopinStyle} ref={nodeRef}>\n {renderHeader()}\n {renderContent()}\n {renderImpact()}\n {descriptionBtnTxt ? <div className={style.descriptionBtn}>{descriptionBtnTxt}</div> : null}\n {renderItems()}\n {renderBtnSwitch()}\n {renderButtons()}\n </div>\n </div>\n );\n};\n\nCMPopin.propTypes = propTypes;\nCMPopin.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nexport default CMPopin;\n"],"mappings":";AAAA,OAAOA,KAAK,IAAGC,MAAM,EAAEC,SAAS,EAAEC,OAAO,QAAO,OAAO;AACvD,SACEC,+CAA+C,IAAIC,YAAY,EAC/DC,kCAAkC,IAAIC,YAAY,EAClDC,sBAAsB,IAAIC,MAAM,EAChCC,wBAAwB,IAAIC,UAAU,EACtCC,kCAAkC,IAAIC,QAAQ,EAC9CC,0BAA0B,IAAIC,YAAY,EAC1CC,4BAA4B,IAAIC,aAAa,EAC7CC,+CAA+C,IAAIC,SAAS,QACvD,0BAA0B;AACjC,OAAOC,GAAG,MAAM,eAAe;AAC/B,OAAOC,OAAO,MAAM,mBAAmB;AACvC,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,QAAQ,MAAM,qBAAqB;AAC1C,OAAOC,UAAU,MAAM,wBAAwB;AAC/C,OAAOC,cAAc,MAAM,6BAA6B;AACxD,OAAOC,WAAW,MAAM,yBAAyB;AACjD,OAAOC,KAAK,MAAM,kBAAkB;AACpC,OAAOC,SAAS,MAAM,2BAA2B;AACjD,OAAOC,SAAS,MAAM,2BAA2B;AACjD,OAAOC,IAAI,MAAM,iBAAiB;AAClC,OAAOC,IAAI,MAAM,iBAAiB;AAClC,OAAOC,aAAa,MAAM,mBAAmB;AAC7C,OAAOC,YAAY,MAAM,yBAAyB;AAClD,OAAOC,KAAK,MAAM,aAAa;AAC/B,OAAOC,SAAS,MAAM,SAAS;;AAE/B;AACA,MAAMC,IAAI,GAAG;EACX/B,YAAY;EACZE,Y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
|
|
78
|
+
max-height: calc(100vh - 32px);
|
|
79
|
+
overflow-y: auto;
|
|
80
|
+
margin: 0;
|
|
81
|
+
flex-shrink: 0;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.popinImpact > * {
|
|
85
|
+
flex-shrink: 0;
|
|
86
|
+
}
|
|
87
|
+
|
|
71
88
|
|
|
72
89
|
.message {
|
|
73
90
|
display: flex;
|
|
@@ -4,6 +4,7 @@ import Link from '../../atom/link';
|
|
|
4
4
|
import { TitleProps } from '../../atom/title/types';
|
|
5
5
|
import CardsGrid from '../../organism/cards-grid';
|
|
6
6
|
import ListItems from '../../organism/list-items';
|
|
7
|
+
import WizardSummary from '../wizard-summary';
|
|
7
8
|
import { propTypes as iconPropTypes } from '../../atom/icon';
|
|
8
9
|
declare const propTypes: {
|
|
9
10
|
content: PropTypes.Requireable<string>;
|
|
@@ -136,6 +137,32 @@ declare const propTypes: {
|
|
|
136
137
|
}> | null | undefined>>;
|
|
137
138
|
backgroundImageUrl: PropTypes.Requireable<string>;
|
|
138
139
|
descriptionText: PropTypes.Requireable<string>;
|
|
140
|
+
sections: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
141
|
+
title: PropTypes.Requireable<string>;
|
|
142
|
+
items: PropTypes.Requireable<(NonNullable<PropTypes.InferProps<{
|
|
143
|
+
type: PropTypes.Requireable<string>;
|
|
144
|
+
title: PropTypes.Requireable<string>;
|
|
145
|
+
value: PropTypes.Requireable<string>;
|
|
146
|
+
}> | PropTypes.InferProps<{
|
|
147
|
+
type: PropTypes.Requireable<string>;
|
|
148
|
+
text: PropTypes.Requireable<string>;
|
|
149
|
+
unsaved: PropTypes.Requireable<boolean>;
|
|
150
|
+
diff: PropTypes.Requireable<string>;
|
|
151
|
+
diffLabel: PropTypes.Requireable<string>;
|
|
152
|
+
}> | PropTypes.InferProps<{
|
|
153
|
+
type: PropTypes.Requireable<string>;
|
|
154
|
+
badgeList: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
155
|
+
category: PropTypes.Requireable<string>;
|
|
156
|
+
label: PropTypes.Requireable<string>;
|
|
157
|
+
}> | null | undefined)[]>;
|
|
158
|
+
badgeAriaLabel: PropTypes.Requireable<string>;
|
|
159
|
+
title: PropTypes.Requireable<string>;
|
|
160
|
+
author: PropTypes.Requireable<string>;
|
|
161
|
+
unsaved: PropTypes.Requireable<boolean>;
|
|
162
|
+
}> | null | undefined> | null | undefined)[]>;
|
|
163
|
+
counterText: PropTypes.Requireable<string>;
|
|
164
|
+
}> | null | undefined)[]>;
|
|
165
|
+
warning: PropTypes.Requireable<string>;
|
|
139
166
|
cookieTitle: PropTypes.Requireable<string>;
|
|
140
167
|
headerSubtitle: PropTypes.Requireable<string>;
|
|
141
168
|
descriptionBtnTxt: PropTypes.Requireable<string>;
|
|
@@ -312,6 +339,11 @@ declare const propTypes: {
|
|
|
312
339
|
size: PropTypes.Requireable<number>;
|
|
313
340
|
wrapperSize: PropTypes.Requireable<number>;
|
|
314
341
|
}>>;
|
|
342
|
+
imageOverlay: PropTypes.Requireable<string>;
|
|
343
|
+
contentBadge: PropTypes.Requireable<PropTypes.InferProps<{
|
|
344
|
+
category: PropTypes.Requireable<string>;
|
|
345
|
+
label: PropTypes.Requireable<string>;
|
|
346
|
+
}>>;
|
|
315
347
|
image: PropTypes.Requireable<string>;
|
|
316
348
|
checkbox: PropTypes.Requireable<PropTypes.InferProps<{
|
|
317
349
|
value: PropTypes.Requireable<string>;
|
|
@@ -329,6 +361,7 @@ declare const propTypes: {
|
|
|
329
361
|
customStyle: PropTypes.Requireable<{
|
|
330
362
|
[x: string]: NonNullable<string | number | null | undefined> | null | undefined;
|
|
331
363
|
}>;
|
|
364
|
+
className: PropTypes.Requireable<string>;
|
|
332
365
|
}>>;
|
|
333
366
|
}> | null | undefined)[]>;
|
|
334
367
|
type: PropTypes.Requireable<string>;
|
|
@@ -723,6 +756,7 @@ declare const propTypes: {
|
|
|
723
756
|
customStyle: PropTypes.Requireable<{
|
|
724
757
|
[x: string]: NonNullable<string | number | null | undefined> | null | undefined;
|
|
725
758
|
}>;
|
|
759
|
+
className: PropTypes.Requireable<string>;
|
|
726
760
|
}>>;
|
|
727
761
|
actionButtons: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
728
762
|
type: PropTypes.Requireable<string>;
|
|
@@ -905,6 +939,8 @@ export declare type CMPopinProps = {
|
|
|
905
939
|
onClose?: () => void;
|
|
906
940
|
popinHeader?: PopinHeaderProps;
|
|
907
941
|
descriptionText: string;
|
|
942
|
+
sections?: PropTypes.InferProps<typeof WizardSummary.propTypes>['sections'];
|
|
943
|
+
warning?: string;
|
|
908
944
|
firstButton?: QuitPopinButton;
|
|
909
945
|
secondButton?: QuitPopinButton;
|
|
910
946
|
items?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/molecule/cm-popin/types.ts"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAKnC,OAAO,IAAI,MAAM,iBAAiB,CAAC;AACnC,OAAO,EAAC,UAAU,EAAC,MAAM,wBAAwB,CAAC;AAClD,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAClD,OAAO,SAAS,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/molecule/cm-popin/types.ts"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAKnC,OAAO,IAAI,MAAM,iBAAiB,CAAC;AACnC,OAAO,EAAC,UAAU,EAAC,MAAM,wBAAwB,CAAC;AAClD,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAClD,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAClD,OAAO,aAAa,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAAC,SAAS,IAAI,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAE3D,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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