@coorpacademy/components 11.33.3 → 11.33.5-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/atom/autocomplete/index.js +2 -2
- package/es/atom/autocomplete/index.js.map +1 -1
- package/es/atom/autocomplete/style.css +4 -4
- package/es/atom/battle-opponent/index.js +1 -1
- package/es/atom/battle-opponent/index.js.map +1 -1
- package/es/atom/battle-opponent/style.css +7 -7
- package/es/atom/button-link-icon/index.js +1 -1
- package/es/atom/button-link-icon/index.js.map +1 -1
- package/es/atom/button-link-icon/style.css +2 -2
- package/es/atom/button-menu/index.js +1 -1
- package/es/atom/button-menu/index.js.map +1 -1
- package/es/atom/button-menu/style.css +4 -4
- package/es/atom/input-checkbox/index.d.ts.map +1 -1
- package/es/atom/input-checkbox/index.js +1 -1
- package/es/atom/input-checkbox/index.js.map +1 -1
- package/es/atom/input-checkbox/style.css +12 -12
- package/es/atom/input-color/index.js +1 -1
- package/es/atom/input-color/index.js.map +1 -1
- package/es/atom/input-color/style.css +3 -3
- package/es/atom/input-html/index.js +1 -1
- package/es/atom/input-html/index.js.map +1 -1
- package/es/atom/input-html/style.css +3 -3
- package/es/atom/input-switch/index.js +1 -1
- package/es/atom/input-switch/index.js.map +1 -1
- package/es/atom/input-switch/style.css +6 -6
- package/es/atom/input-text/index.js +2 -2
- package/es/atom/input-text/index.js.map +1 -1
- package/es/atom/input-text/style.css +4 -4
- package/es/atom/input-textarea/index.js +2 -2
- package/es/atom/input-textarea/index.js.map +1 -1
- package/es/atom/input-textarea/style.css +5 -5
- package/es/atom/label/index.js +1 -1
- package/es/atom/label/index.js.map +1 -1
- package/es/atom/label/style.css +1 -1
- package/es/atom/life/index.js +1 -1
- package/es/atom/life/index.js.map +1 -1
- package/es/atom/life/style.css +1 -1
- package/es/atom/picture-background/index.js +1 -1
- package/es/atom/picture-background/index.js.map +1 -1
- package/es/atom/picture-background/style.css +1 -1
- package/es/atom/range/handle.css +1 -1
- package/es/atom/range/handle.js +1 -1
- package/es/atom/range/handle.js.map +1 -1
- package/es/atom/select/index.js +1 -1
- package/es/atom/select/index.js.map +1 -1
- package/es/atom/select/style.css +13 -13
- package/es/atom/select-icon/index.js +1 -1
- package/es/atom/select-icon/index.js.map +1 -1
- package/es/atom/select-icon/style.css +1 -1
- package/es/atom/status-item/index.js +1 -1
- package/es/atom/status-item/index.js.map +1 -1
- package/es/atom/status-item/style.css +1 -1
- package/es/atom/tag/index.js +1 -1
- package/es/atom/tag/index.js.map +1 -1
- package/es/atom/tag/style.css +1 -1
- package/es/molecule/brand-create-form/index.js +1 -1
- package/es/molecule/brand-create-form/index.js.map +1 -1
- package/es/molecule/brand-create-form/style.css +4 -4
- package/es/molecule/brand-upload-box/index.js +1 -1
- package/es/molecule/brand-upload-box/index.js.map +1 -1
- package/es/molecule/brand-upload-box/style.css +3 -3
- package/es/molecule/card/customer.css +2 -2
- package/es/molecule/card/customer.d.ts +1 -1
- package/es/molecule/card/customer.js +1 -1
- package/es/molecule/card/customer.js.map +1 -1
- package/es/molecule/card/index.d.ts +1 -1
- package/es/molecule/card/index.js +1 -1
- package/es/molecule/card/index.js.map +1 -1
- package/es/molecule/card/style.css +19 -19
- package/es/molecule/filters/index.js +1 -1
- package/es/molecule/filters/index.js.map +1 -1
- package/es/molecule/filters/style.css +4 -4
- package/es/molecule/hero/index.js +1 -1
- package/es/molecule/hero/index.js.map +1 -1
- package/es/molecule/hero/style.css +10 -10
- package/es/molecule/module-card/index.js +1 -1
- package/es/molecule/module-card/index.js.map +1 -1
- package/es/molecule/module-card/style.css +3 -3
- package/es/molecule/select-multiple/index.js +2 -2
- package/es/molecule/select-multiple/index.js.map +1 -1
- package/es/molecule/select-multiple/style.css +5 -5
- package/es/molecule/theme-image/index.js +1 -1
- package/es/molecule/theme-image/index.js.map +1 -1
- package/es/molecule/theme-image/style.css +4 -4
- package/es/molecule/titled-checkbox/index.js +1 -1
- package/es/molecule/titled-checkbox/index.js.map +1 -1
- package/es/molecule/titled-checkbox/style.css +1 -1
- package/es/organism/brand-analytics/analytics-popin.css +1 -1
- package/es/organism/brand-analytics/analytics-popin.js +1 -1
- package/es/organism/brand-analytics/analytics-popin.js.map +1 -1
- package/es/organism/cards-grid/index.js +1 -1
- package/es/organism/cards-grid/index.js.map +1 -1
- package/es/organism/cards-grid/style.css +1 -1
- package/es/organism/popin/index.js +1 -1
- package/es/organism/popin/index.js.map +1 -1
- package/es/organism/popin/style.css +1 -1
- package/es/organism/resource-browser/index.js +1 -1
- package/es/organism/resource-browser/index.js.map +1 -1
- package/es/organism/resource-browser/style.css +2 -2
- package/es/template/activity/index.js +1 -1
- package/es/template/activity/index.js.map +1 -1
- package/es/template/activity/style.css +2 -2
- package/es/template/back-office/dashboard-preview/dashboard-popin.css +1 -1
- package/es/template/back-office/dashboard-preview/dashboard-popin.js +1 -1
- package/es/template/back-office/dashboard-preview/dashboard-popin.js.map +1 -1
- package/es/template/external-course/index.js +2 -2
- package/es/template/external-course/index.js.map +1 -1
- package/es/template/external-course/style.css +2 -2
- package/lib/atom/autocomplete/index.js +2 -2
- package/lib/atom/autocomplete/index.js.map +1 -1
- package/lib/atom/autocomplete/style.css +4 -4
- package/lib/atom/battle-opponent/index.js +1 -1
- package/lib/atom/battle-opponent/index.js.map +1 -1
- package/lib/atom/battle-opponent/style.css +7 -7
- package/lib/atom/button-link-icon/index.js +1 -1
- package/lib/atom/button-link-icon/index.js.map +1 -1
- package/lib/atom/button-link-icon/style.css +2 -2
- package/lib/atom/button-menu/index.js +1 -1
- package/lib/atom/button-menu/index.js.map +1 -1
- package/lib/atom/button-menu/style.css +4 -4
- package/lib/atom/input-checkbox/index.d.ts.map +1 -1
- package/lib/atom/input-checkbox/index.js +1 -1
- package/lib/atom/input-checkbox/index.js.map +1 -1
- package/lib/atom/input-checkbox/style.css +12 -12
- package/lib/atom/input-color/index.js +1 -1
- package/lib/atom/input-color/index.js.map +1 -1
- package/lib/atom/input-color/style.css +3 -3
- package/lib/atom/input-html/index.js +1 -1
- package/lib/atom/input-html/index.js.map +1 -1
- package/lib/atom/input-html/style.css +3 -3
- package/lib/atom/input-switch/index.js +1 -1
- package/lib/atom/input-switch/index.js.map +1 -1
- package/lib/atom/input-switch/style.css +6 -6
- package/lib/atom/input-text/index.js +2 -2
- package/lib/atom/input-text/index.js.map +1 -1
- package/lib/atom/input-text/style.css +4 -4
- package/lib/atom/input-textarea/index.js +2 -2
- package/lib/atom/input-textarea/index.js.map +1 -1
- package/lib/atom/input-textarea/style.css +5 -5
- package/lib/atom/label/index.js +1 -1
- package/lib/atom/label/index.js.map +1 -1
- package/lib/atom/label/style.css +1 -1
- package/lib/atom/life/index.js +1 -1
- package/lib/atom/life/index.js.map +1 -1
- package/lib/atom/life/style.css +1 -1
- package/lib/atom/picture-background/index.js +1 -1
- package/lib/atom/picture-background/index.js.map +1 -1
- package/lib/atom/picture-background/style.css +1 -1
- package/lib/atom/range/handle.css +1 -1
- package/lib/atom/range/handle.js +1 -1
- package/lib/atom/range/handle.js.map +1 -1
- package/lib/atom/select/index.js +1 -1
- package/lib/atom/select/index.js.map +1 -1
- package/lib/atom/select/style.css +13 -13
- package/lib/atom/select-icon/index.js +1 -1
- package/lib/atom/select-icon/index.js.map +1 -1
- package/lib/atom/select-icon/style.css +1 -1
- package/lib/atom/status-item/index.js +1 -1
- package/lib/atom/status-item/index.js.map +1 -1
- package/lib/atom/status-item/style.css +1 -1
- package/lib/atom/tag/index.js +1 -1
- package/lib/atom/tag/index.js.map +1 -1
- package/lib/atom/tag/style.css +1 -1
- package/lib/molecule/brand-create-form/index.js +1 -1
- package/lib/molecule/brand-create-form/index.js.map +1 -1
- package/lib/molecule/brand-create-form/style.css +4 -4
- package/lib/molecule/brand-upload-box/index.js +1 -1
- package/lib/molecule/brand-upload-box/index.js.map +1 -1
- package/lib/molecule/brand-upload-box/style.css +3 -3
- package/lib/molecule/card/customer.css +2 -2
- package/lib/molecule/card/customer.d.ts +1 -1
- package/lib/molecule/card/customer.js +1 -1
- package/lib/molecule/card/customer.js.map +1 -1
- package/lib/molecule/card/index.d.ts +1 -1
- package/lib/molecule/card/index.js +1 -1
- package/lib/molecule/card/index.js.map +1 -1
- package/lib/molecule/card/style.css +19 -19
- package/lib/molecule/filters/index.js +1 -1
- package/lib/molecule/filters/index.js.map +1 -1
- package/lib/molecule/filters/style.css +4 -4
- package/lib/molecule/hero/index.js +1 -1
- package/lib/molecule/hero/index.js.map +1 -1
- package/lib/molecule/hero/style.css +10 -10
- package/lib/molecule/module-card/index.js +1 -1
- package/lib/molecule/module-card/index.js.map +1 -1
- package/lib/molecule/module-card/style.css +3 -3
- package/lib/molecule/select-multiple/index.js +2 -2
- package/lib/molecule/select-multiple/index.js.map +1 -1
- package/lib/molecule/select-multiple/style.css +5 -5
- package/lib/molecule/theme-image/index.js +1 -1
- package/lib/molecule/theme-image/index.js.map +1 -1
- package/lib/molecule/theme-image/style.css +4 -4
- package/lib/molecule/titled-checkbox/index.js +1 -1
- package/lib/molecule/titled-checkbox/index.js.map +1 -1
- package/lib/molecule/titled-checkbox/style.css +1 -1
- package/lib/organism/brand-analytics/analytics-popin.css +1 -1
- package/lib/organism/brand-analytics/analytics-popin.js +1 -1
- package/lib/organism/brand-analytics/analytics-popin.js.map +1 -1
- package/lib/organism/cards-grid/index.js +1 -1
- package/lib/organism/cards-grid/index.js.map +1 -1
- package/lib/organism/cards-grid/style.css +1 -1
- package/lib/organism/popin/index.js +1 -1
- package/lib/organism/popin/index.js.map +1 -1
- package/lib/organism/popin/style.css +1 -1
- package/lib/organism/resource-browser/index.js +1 -1
- package/lib/organism/resource-browser/index.js.map +1 -1
- package/lib/organism/resource-browser/style.css +2 -2
- package/lib/template/activity/index.js +1 -1
- package/lib/template/activity/index.js.map +1 -1
- package/lib/template/activity/style.css +2 -2
- package/lib/template/back-office/dashboard-preview/dashboard-popin.css +1 -1
- package/lib/template/back-office/dashboard-preview/dashboard-popin.js +1 -1
- package/lib/template/back-office/dashboard-preview/dashboard-popin.js.map +1 -1
- package/lib/template/external-course/index.js +2 -2
- package/lib/template/external-course/index.js.map +1 -1
- package/lib/template/external-course/style.css +2 -2
- package/package.json +2 -2
|
@@ -4,15 +4,15 @@
|
|
|
4
4
|
@value light from colors;
|
|
5
5
|
@value negative from colors;
|
|
6
6
|
|
|
7
|
-
.
|
|
7
|
+
.defaultStyle {
|
|
8
8
|
display: flex;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
.error {
|
|
12
|
-
composes:
|
|
12
|
+
composes: defaultStyle;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
.
|
|
15
|
+
.defaultStyle label {
|
|
16
16
|
display: flex;
|
|
17
17
|
align-items: center;
|
|
18
18
|
position: relative;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","useMemo","PropTypes","getClassState","style","InputSwitch","props","title","name","id","value","disabled","onChange","_noop","description","modified","theme","titlePosition","details","requiredSelection","dataName","ariaLabelledBy","ariaLabel","idSwitch","_uniqueId","isDisabled","handleChange","e","target","checked","titleView","createElement","className","descriptionView","getClass","defaultClass","coorpmanager","modifiedClass","coorpmanagerModified","partielUncheck","
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useMemo","PropTypes","getClassState","style","InputSwitch","props","title","name","id","value","disabled","onChange","_noop","description","modified","theme","titlePosition","details","requiredSelection","dataName","ariaLabelledBy","ariaLabel","idSwitch","_uniqueId","isDisabled","handleChange","e","target","checked","titleView","createElement","className","descriptionView","getClass","defaultClass","coorpmanager","modifiedClass","coorpmanagerModified","partielUncheck","defaultStyle","btnSwitchContainer","_extends","type","checkbox","htmlFor","tabIndex","alignedTextContainer","detailsTxt","propTypes","process","env","NODE_ENV","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 'aria-labelledby': ariaLabelledBy,\n 'aria-label': ariaLabel\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 ? (\n <span id={`title-view-${dataName}`} className={style.title}>\n {`${title} `}{' '}\n </span>\n ) : 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.defaultStyle, 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' ? titleView : null}\n <div className={requiredSelection ? style.requiredSelection : null}>\n <div className={style.btnSwitchContainer}>\n <input\n {...(ariaLabelledBy ? {'aria-labelledby': ariaLabelledBy} : {})}\n {...(title ? {'aria-labelledby': `title-view-${dataName}`} : {})}\n {...(ariaLabel && !ariaLabelledBy && !title ? {'aria-label': ariaLabel} : {})}\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={ariaLabelledBy}\n />\n <label\n htmlFor={idSwitch}\n data-name=\"input-switch-label\"\n tabIndex={0}\n aria-label={ariaLabel}\n title={ariaLabel}\n />\n </div>\n </div>\n <div className={!details ? style.alignedTextContainer : null}>\n {titlePosition === 'right' ? titleView : 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 'aria-labelledby': PropTypes.string,\n 'aria-label': 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,OAAOA,KAAK,IAAGC,OAAO,QAAO,OAAO;AACpC,OAAOC,SAAS,MAAM,YAAY;AAElC,OAAOC,aAAa,MAAM,4BAA4B;AACtD,OAAOC,KAAK,MAAM,aAAa;AAE/B,MAAMC,WAAW,GAAGC,KAAK,IAAI;EAC3B,MAAM;IACJC,KAAK;IACLC,IAAI;IACJC,EAAE;IACFC,KAAK;IACLC,QAAQ;IACRC,QAAQ,GAAAC,KAAO;IACfC,WAAW;IACXC,QAAQ,GAAG,KAAK;IAChBC,KAAK,GAAG,SAAS;IACjBC,aAAa,GAAG,MAAM;IACtBC,OAAO,GAAG,EAAE;IACZC,iBAAiB,GAAG,KAAK;IACzB,WAAW,EAAEC,QAAQ;IACrB,iBAAiB,EAAEC,cAAc;IACjC,YAAY,EAAEC;EAChB,CAAC,GAAGhB,KAAK;EAET,MAAMiB,QAAQ,GAAGd,EAAE,IAAIe,SAAA,CAAS,eAAe,CAAC;EAChD,MAAMC,UAAU,GAAGd,QAAQ,GAAG,UAAU,GAAG,EAAE;EAC7C,MAAMe,YAAY,GAAGzB,OAAO,CAAC,MAAM0B,CAAC,IAAIf,QAAQ,CAACe,CAAC,CAACC,MAAM,CAACC,OAAO,CAAC,EAAE,CAACjB,QAAQ,CAAC,CAAC;EAE/E,MAAMkB,SAAS,GAAGvB,KAAK,gBACrBP,KAAA,CAA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,SAAS,CAACoD,IAAI;EACxB1C,QAAQ,EAAEV,SAAS,CAACqD,IAAI;EACxBzC,WAAW,EAAEZ,SAAS,CAACmD,MAAM;EAC7B,iBAAiB,EAAEnD,SAAS,CAACmD,MAAM;EACnC,YAAY,EAAEnD,SAAS,CAACmD,MAAM;EAC9BtC,QAAQ,EAAEb,SAAS,CAACoD,IAAI;EACxBrC,aAAa,EAAEf,SAAS,CAACsD,KAAK,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;EACjDxC,KAAK,EAAEd,SAAS,CAACsD,KAAK,CAAC,CAAC,SAAS,EAAE,cAAc,EAAE,MAAM,CAAC,CAAC;EAC3DtC,OAAO,EAAEhB,SAAS,CAACmD,MAAM;EACzB,WAAW,EAAEnD,SAAS,CAACmD,MAAM;EAC7BlC,iBAAiB,EAAEjB,SAAS,CAACoD;AAC/B,CAAC;AACD,eAAejD,WAAW","ignoreList":[]}
|
|
@@ -10,16 +10,16 @@
|
|
|
10
10
|
@value cm_primary_blue from colors;
|
|
11
11
|
@value light_blue from colors;
|
|
12
12
|
|
|
13
|
-
.
|
|
13
|
+
.defaultStyle {
|
|
14
14
|
display: flex;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
.modified {
|
|
18
|
-
composes:
|
|
18
|
+
composes: defaultStyle;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
.coorpmanager {
|
|
22
|
-
composes:
|
|
22
|
+
composes: defaultStyle;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
.coorpmanagerModified {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
composes: coorpmanager;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
.
|
|
33
|
+
.defaultStyle label {
|
|
34
34
|
height: 24px;
|
|
35
35
|
position: relative;
|
|
36
36
|
flex-grow: 0;
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
transition: all 0.3s ease;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
.
|
|
45
|
+
.defaultStyle label::after {
|
|
46
46
|
position: absolute;
|
|
47
47
|
left: 2px;
|
|
48
48
|
top: 2px;
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
background: positive;
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
.
|
|
85
|
+
.defaultStyle input:checked ~ label::after {
|
|
86
86
|
left: 30px;
|
|
87
87
|
}
|
|
88
88
|
|
|
@@ -12,7 +12,7 @@ const themeStyle = {
|
|
|
12
12
|
setup: style.setup,
|
|
13
13
|
coorpmanager: style.coorpmanager,
|
|
14
14
|
cockpit: style.cockpit,
|
|
15
|
-
default: style.
|
|
15
|
+
default: style.defaultStyle
|
|
16
16
|
};
|
|
17
17
|
const InputText = props => {
|
|
18
18
|
const {
|
|
@@ -36,7 +36,7 @@ const InputText = props => {
|
|
|
36
36
|
const isCMTheme = theme === 'coorpmanager';
|
|
37
37
|
const handleChange = useMemo(() => e => onChange(e.target.value), [onChange]);
|
|
38
38
|
const mainClass = themeStyle[theme];
|
|
39
|
-
const className = getClassState(style.
|
|
39
|
+
const className = getClassState(style.defaultStyle, style.modified, style.error, modified, error);
|
|
40
40
|
const descriptionView = description && theme !== 'coorpmanager' ? /*#__PURE__*/React.createElement("div", {
|
|
41
41
|
className: style.description
|
|
42
42
|
}, description) : null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","useMemo","PropTypes","NovaSolidStatusCheckCircle2","CheckIcon","NovaSolidStatusClose","ErrorIcon","NovaCompositionCoorpacademyInformationIcon","InfoIcon","classnames","getClassState","style","themeStyle","setup","coorpmanager","cockpit","default","InputText","props","autoFocus","placeholder","value","type","hint","defaultValue","onChange","_noop","error","valid","theme","description","disabled","modified","title","propsTitle","dataName","ariaLabel","isCMTheme","handleChange","e","target","mainClass","className","descriptionView","createElement","toolTipView","infoIconWrapper","infoIcon","descriptionLabel","hintView","dangerouslySetInnerHTML","__html","errorIconView","leftIcon","validIconView","_isNil","isNoTitle","_isEmpty","noValue","name","input","autoComplete","onInput","propTypes","process","env","NODE_ENV","bool","string","oneOf","_keys","func"],"sources":["../../../src/atom/input-text/index.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport {noop, isNil, keys, isEmpty} from 'lodash/fp';\nimport {\n NovaSolidStatusCheckCircle2 as CheckIcon,\n NovaSolidStatusClose as ErrorIcon,\n NovaCompositionCoorpacademyInformationIcon as InfoIcon\n} from '@coorpacademy/nova-icons';\nimport classnames from 'classnames';\nimport getClassState from '../../util/get-class-state';\nimport style from './style.css';\n\nconst themeStyle = {\n setup: style.setup,\n coorpmanager: style.coorpmanager,\n cockpit: style.cockpit,\n default: style.
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useMemo","PropTypes","NovaSolidStatusCheckCircle2","CheckIcon","NovaSolidStatusClose","ErrorIcon","NovaCompositionCoorpacademyInformationIcon","InfoIcon","classnames","getClassState","style","themeStyle","setup","coorpmanager","cockpit","default","defaultStyle","InputText","props","autoFocus","placeholder","value","type","hint","defaultValue","onChange","_noop","error","valid","theme","description","disabled","modified","title","propsTitle","dataName","ariaLabel","isCMTheme","handleChange","e","target","mainClass","className","descriptionView","createElement","toolTipView","infoIconWrapper","infoIcon","descriptionLabel","hintView","dangerouslySetInnerHTML","__html","errorIconView","leftIcon","validIconView","_isNil","isNoTitle","_isEmpty","noValue","name","input","autoComplete","onInput","propTypes","process","env","NODE_ENV","bool","string","oneOf","_keys","func"],"sources":["../../../src/atom/input-text/index.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport {noop, isNil, keys, isEmpty} from 'lodash/fp';\nimport {\n NovaSolidStatusCheckCircle2 as CheckIcon,\n NovaSolidStatusClose as ErrorIcon,\n NovaCompositionCoorpacademyInformationIcon as InfoIcon\n} from '@coorpacademy/nova-icons';\nimport classnames from 'classnames';\nimport getClassState from '../../util/get-class-state';\nimport style from './style.css';\n\nconst themeStyle = {\n setup: style.setup,\n coorpmanager: style.coorpmanager,\n cockpit: style.cockpit,\n default: style.defaultStyle\n};\nconst InputText = props => {\n const {\n autoFocus = false,\n placeholder = '',\n value,\n type = 'text',\n hint,\n defaultValue,\n onChange = noop,\n error,\n valid,\n theme = 'default',\n description,\n disabled,\n modified = false,\n title: propsTitle,\n 'data-name': dataName = 'input-text',\n 'aria-label': ariaLabel = 'Input Text'\n } = props;\n\n const isCMTheme = theme === 'coorpmanager';\n const handleChange = useMemo(() => e => onChange(e.target.value), [onChange]);\n const mainClass = themeStyle[theme];\n const className = getClassState(style.defaultStyle, style.modified, style.error, modified, error);\n const descriptionView =\n description && theme !== 'coorpmanager' ? (\n <div className={style.description}>{description}</div>\n ) : null;\n const toolTipView =\n description && theme === 'coorpmanager' ? (\n <div className={style.infoIconWrapper}>\n <InfoIcon className={style.infoIcon} />\n <div className={style.descriptionLabel}>{description}</div>\n </div>\n ) : null;\n const hintView =\n theme === 'coorpmanager' ? (\n <div\n className={style.hint}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: error || hint}}\n />\n ) : null;\n const errorIconView = isCMTheme && error ? <ErrorIcon className={style.leftIcon} /> : null;\n const validIconView = isCMTheme && valid ? <CheckIcon className={style.leftIcon} /> : null;\n\n return (\n <div\n className={classnames(\n mainClass,\n className,\n disabled && style.disabled,\n isNil(propsTitle) && style.isNoTitle\n )}\n >\n <label>\n <span className={classnames(style.title, isEmpty(value) && style.noValue)}>\n {propsTitle}\n {toolTipView}\n </span>\n\n <input\n autoFocus={autoFocus}\n type={type}\n name={propsTitle}\n className={style.input}\n placeholder={placeholder}\n defaultValue={defaultValue}\n autoComplete={'off'}\n value={value}\n onInput={handleChange}\n disabled={disabled}\n onChange={noop}\n data-name={dataName}\n aria-label={ariaLabel}\n />\n {errorIconView}\n {validIconView}\n {hintView}\n </label>\n {descriptionView}\n </div>\n );\n};\n\nInputText.propTypes = {\n autoFocus: PropTypes.bool,\n title: PropTypes.string,\n placeholder: PropTypes.string,\n defaultValue: PropTypes.string,\n theme: PropTypes.oneOf(keys(themeStyle)),\n disabled: PropTypes.bool,\n value: PropTypes.string,\n hint: PropTypes.string,\n error: PropTypes.string,\n onChange: PropTypes.func,\n description: PropTypes.string,\n modified: PropTypes.bool,\n type: PropTypes.string,\n valid: PropTypes.bool,\n 'aria-label': PropTypes.string,\n 'data-name': PropTypes.string\n};\nexport default InputText;\n"],"mappings":";;;;AAAA,OAAOA,KAAK,IAAGC,OAAO,QAAO,OAAO;AACpC,OAAOC,SAAS,MAAM,YAAY;AAElC,SACEC,2BAA2B,IAAIC,SAAS,EACxCC,oBAAoB,IAAIC,SAAS,EACjCC,0CAA0C,IAAIC,QAAQ,QACjD,0BAA0B;AACjC,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,aAAa,MAAM,4BAA4B;AACtD,OAAOC,KAAK,MAAM,aAAa;AAE/B,MAAMC,UAAU,GAAG;EACjBC,KAAK,EAAEF,KAAK,CAACE,KAAK;EAClBC,YAAY,EAAEH,KAAK,CAACG,YAAY;EAChCC,OAAO,EAAEJ,KAAK,CAACI,OAAO;EACtBC,OAAO,EAAEL,KAAK,CAACM;AACjB,CAAC;AACD,MAAMC,SAAS,GAAGC,KAAK,IAAI;EACzB,MAAM;IACJC,SAAS,GAAG,KAAK;IACjBC,WAAW,GAAG,EAAE;IAChBC,KAAK;IACLC,IAAI,GAAG,MAAM;IACbC,IAAI;IACJC,YAAY;IACZC,QAAQ,GAAAC,KAAO;IACfC,KAAK;IACLC,KAAK;IACLC,KAAK,GAAG,SAAS;IACjBC,WAAW;IACXC,QAAQ;IACRC,QAAQ,GAAG,KAAK;IAChBC,KAAK,EAAEC,UAAU;IACjB,WAAW,EAAEC,QAAQ,GAAG,YAAY;IACpC,YAAY,EAAEC,SAAS,GAAG;EAC5B,CAAC,GAAGlB,KAAK;EAET,MAAMmB,SAAS,GAAGR,KAAK,KAAK,cAAc;EAC1C,MAAMS,YAAY,GAAGtC,OAAO,CAAC,MAAMuC,CAA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AK,CAACC,KAAA,CAAK3D,UAAU,CAAC,CAAC;EACxCoB,QAAQ,EAAE9B,SAAS,CAACkE,IAAI;EACxB9C,KAAK,EAAEpB,SAAS,CAACmE,MAAM;EACvB7C,IAAI,EAAEtB,SAAS,CAACmE,MAAM;EACtBzC,KAAK,EAAE1B,SAAS,CAACmE,MAAM;EACvB3C,QAAQ,EAAExB,SAAS,CAACsE,IAAI;EACxBzC,WAAW,EAAE7B,SAAS,CAACmE,MAAM;EAC7BpC,QAAQ,EAAE/B,SAAS,CAACkE,IAAI;EACxB7C,IAAI,EAAErB,SAAS,CAACmE,MAAM;EACtBxC,KAAK,EAAE3B,SAAS,CAACkE,IAAI;EACrB,YAAY,EAAElE,SAAS,CAACmE,MAAM;EAC9B,WAAW,EAAEnE,SAAS,CAACmE;AACzB,CAAC;AACD,eAAenD,SAAS","ignoreList":[]}
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
@value cm_grey_500 from colors;
|
|
16
16
|
@value cm_grey_700 from colors;
|
|
17
17
|
|
|
18
|
-
.
|
|
18
|
+
.defaultStyle {
|
|
19
19
|
display: flex;
|
|
20
20
|
flex-wrap: nowrap;
|
|
21
21
|
align-items: center;
|
|
@@ -23,11 +23,11 @@
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
.error {
|
|
26
|
-
composes:
|
|
26
|
+
composes: defaultStyle;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
.modified {
|
|
30
|
-
composes:
|
|
30
|
+
composes: defaultStyle;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
.setup {
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
align-self: flex-start;
|
|
121
121
|
padding-left: 13px;
|
|
122
122
|
}
|
|
123
|
-
.
|
|
123
|
+
.defaultStyle label {
|
|
124
124
|
display: flex;
|
|
125
125
|
align-items: center;
|
|
126
126
|
height: 50px;
|
|
@@ -11,7 +11,7 @@ const themeStyle = {
|
|
|
11
11
|
setup: style.setup,
|
|
12
12
|
coorpmanager: style.coorpmanager,
|
|
13
13
|
cockpit: style.cockpit,
|
|
14
|
-
default: style.
|
|
14
|
+
default: style.defaultStyle
|
|
15
15
|
};
|
|
16
16
|
const InputTextarea = props => {
|
|
17
17
|
const {
|
|
@@ -29,7 +29,7 @@ const InputTextarea = props => {
|
|
|
29
29
|
modified = false
|
|
30
30
|
} = props;
|
|
31
31
|
const mainClass = themeStyle[theme];
|
|
32
|
-
const className = getClassState(style.
|
|
32
|
+
const className = getClassState(style.defaultStyle, style.modified, style.error, modified, error);
|
|
33
33
|
const handleChange = useMemo(() => e => onChange(e.target.value), [onChange]);
|
|
34
34
|
const descriptionView = description && theme !== 'coorpmanager' ? /*#__PURE__*/React.createElement("div", {
|
|
35
35
|
className: style.description
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","useMemo","PropTypes","classnames","NovaSolidStatusCheckCircle2","CheckIcon","NovaSolidStatusClose","ErrorIcon","NovaCompositionCoorpacademyInformationIcon","InfoIcon","getClassState","style","themeStyle","setup","coorpmanager","cockpit","default","InputTextarea","props","title","propsTitle","name","placeholder","value","hint","theme","onChange","_noop","error","valid","description","disabled","modified","mainClass","className","handleChange","e","target","descriptionView","createElement","toolTipView","infoIconWrapper","infoIcon","descriptionLabel","hintView","dangerouslySetInnerHTML","__html","errorIconView","leftIcon","validIconView","_isEmpty","noValue","propTypes","process","env","NODE_ENV","string","oneOf","_keys","bool","func"],"sources":["../../../src/atom/input-textarea/index.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport {noop, keys, isEmpty} from 'lodash/fp';\nimport classnames from 'classnames';\nimport {\n NovaSolidStatusCheckCircle2 as CheckIcon,\n NovaSolidStatusClose as ErrorIcon,\n NovaCompositionCoorpacademyInformationIcon as InfoIcon\n} from '@coorpacademy/nova-icons';\nimport getClassState from '../../util/get-class-state';\nimport style from './style.css';\n\nconst themeStyle = {\n setup: style.setup,\n coorpmanager: style.coorpmanager,\n cockpit: style.cockpit,\n default: style.
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useMemo","PropTypes","classnames","NovaSolidStatusCheckCircle2","CheckIcon","NovaSolidStatusClose","ErrorIcon","NovaCompositionCoorpacademyInformationIcon","InfoIcon","getClassState","style","themeStyle","setup","coorpmanager","cockpit","default","defaultStyle","InputTextarea","props","title","propsTitle","name","placeholder","value","hint","theme","onChange","_noop","error","valid","description","disabled","modified","mainClass","className","handleChange","e","target","descriptionView","createElement","toolTipView","infoIconWrapper","infoIcon","descriptionLabel","hintView","dangerouslySetInnerHTML","__html","errorIconView","leftIcon","validIconView","_isEmpty","noValue","propTypes","process","env","NODE_ENV","string","oneOf","_keys","bool","func"],"sources":["../../../src/atom/input-textarea/index.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport {noop, keys, isEmpty} from 'lodash/fp';\nimport classnames from 'classnames';\nimport {\n NovaSolidStatusCheckCircle2 as CheckIcon,\n NovaSolidStatusClose as ErrorIcon,\n NovaCompositionCoorpacademyInformationIcon as InfoIcon\n} from '@coorpacademy/nova-icons';\nimport getClassState from '../../util/get-class-state';\nimport style from './style.css';\n\nconst themeStyle = {\n setup: style.setup,\n coorpmanager: style.coorpmanager,\n cockpit: style.cockpit,\n default: style.defaultStyle\n};\nconst InputTextarea = props => {\n const {\n title: propsTitle,\n name,\n placeholder,\n value,\n hint,\n theme = 'default',\n onChange = noop,\n error,\n valid,\n description,\n disabled,\n modified = false\n } = props;\n\n const mainClass = themeStyle[theme];\n const className = getClassState(style.defaultStyle, style.modified, style.error, modified, error);\n const handleChange = useMemo(() => e => onChange(e.target.value), [onChange]);\n\n const descriptionView =\n description && theme !== 'coorpmanager' ? (\n <div className={style.description}>{description}</div>\n ) : null;\n const toolTipView =\n description && theme === 'coorpmanager' ? (\n <div className={style.infoIconWrapper}>\n <InfoIcon className={style.infoIcon} />\n <div className={style.descriptionLabel}>{description}</div>\n </div>\n ) : null;\n const hintView =\n theme === 'coorpmanager' ? (\n <div\n className={style.hint}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: error || hint}}\n />\n ) : null;\n const errorIconView = error ? <ErrorIcon className={style.leftIcon} /> : null;\n const validIconView = valid ? <CheckIcon className={style.leftIcon} /> : null;\n\n return (\n <div className={classnames(mainClass, className, disabled && style.disabled)}>\n <label>\n <span className={classnames(style.title, isEmpty(value) && style.noValue)}>\n {propsTitle}\n {toolTipView}\n </span>\n <textarea\n name={name}\n value={value}\n placeholder={placeholder}\n onChange={handleChange}\n disabled={disabled}\n data-testid={name}\n />\n {errorIconView}\n {validIconView}\n {hintView}\n </label>\n {descriptionView}\n </div>\n );\n};\n\nInputTextarea.propTypes = {\n placeholder: PropTypes.string,\n title: PropTypes.string,\n name: PropTypes.string,\n theme: PropTypes.oneOf(keys(themeStyle)),\n disabled: PropTypes.bool,\n value: PropTypes.string,\n hint: PropTypes.string,\n error: PropTypes.string,\n onChange: PropTypes.func,\n description: PropTypes.string,\n modified: PropTypes.bool,\n valid: PropTypes.bool\n};\nexport default InputTextarea;\n"],"mappings":";;;AAAA,OAAOA,KAAK,IAAGC,OAAO,QAAO,OAAO;AACpC,OAAOC,SAAS,MAAM,YAAY;AAElC,OAAOC,UAAU,MAAM,YAAY;AACnC,SACEC,2BAA2B,IAAIC,SAAS,EACxCC,oBAAoB,IAAIC,SAAS,EACjCC,0CAA0C,IAAIC,QAAQ,QACjD,0BAA0B;AACjC,OAAOC,aAAa,MAAM,4BAA4B;AACtD,OAAOC,KAAK,MAAM,aAAa;AAE/B,MAAMC,UAAU,GAAG;EACjBC,KAAK,EAAEF,KAAK,CAACE,KAAK;EAClBC,YAAY,EAAEH,KAAK,CAACG,YAAY;EAChCC,OAAO,EAAEJ,KAAK,CAACI,OAAO;EACtBC,OAAO,EAAEL,KAAK,CAACM;AACjB,CAAC;AACD,MAAMC,aAAa,GAAGC,KAAK,IAAI;EAC7B,MAAM;IACJC,KAAK,EAAEC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AI;EACxBpC,KAAK,EAAEtB,SAAS,CAACuD,MAAM;EACvBhC,IAAI,EAAEvB,SAAS,CAACuD,MAAM;EACtB5B,KAAK,EAAE3B,SAAS,CAACuD,MAAM;EACvB9B,QAAQ,EAAEzB,SAAS,CAAC2D,IAAI;EACxB9B,WAAW,EAAE7B,SAAS,CAACuD,MAAM;EAC7BxB,QAAQ,EAAE/B,SAAS,CAAC0D,IAAI;EACxB9B,KAAK,EAAE5B,SAAS,CAAC0D;AACnB,CAAC;AACD,eAAe1C,aAAa","ignoreList":[]}
|
|
@@ -13,19 +13,19 @@
|
|
|
13
13
|
@value cm_grey_500 from colors;
|
|
14
14
|
@value cm_grey_700 from colors;
|
|
15
15
|
|
|
16
|
-
.
|
|
16
|
+
.defaultStyle {
|
|
17
17
|
display: flex;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
.error {
|
|
21
|
-
composes:
|
|
21
|
+
composes: defaultStyle;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
.modified {
|
|
25
|
-
composes:
|
|
25
|
+
composes: defaultStyle;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
.
|
|
28
|
+
.defaultStyle label {
|
|
29
29
|
display: flex;
|
|
30
30
|
align-items: center;
|
|
31
31
|
height: 130px;
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
width: 180px;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
.
|
|
45
|
+
.defaultStyle textarea {
|
|
46
46
|
font-family: "Gilroy";
|
|
47
47
|
text-transform: none;
|
|
48
48
|
padding: 10px 15px;
|
package/es/atom/label/index.js
CHANGED
|
@@ -7,7 +7,7 @@ const Label = ({
|
|
|
7
7
|
innerHtml = false
|
|
8
8
|
}) => {
|
|
9
9
|
return /*#__PURE__*/React.createElement("span", {
|
|
10
|
-
className: classnames(style.
|
|
10
|
+
className: classnames(style.defaultStyle, innerHtml ? style.innerHTML : null)
|
|
11
11
|
}, children);
|
|
12
12
|
};
|
|
13
13
|
Label.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","PropTypes","classnames","style","Label","children","innerHtml","createElement","className","
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","PropTypes","classnames","style","Label","children","innerHtml","createElement","className","defaultStyle","innerHTML","propTypes","process","env","NODE_ENV","node","bool"],"sources":["../../../src/atom/label/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport classnames from 'classnames';\nimport style from './style.css';\n\nconst Label = ({children, innerHtml = false}) => {\n return (\n <span className={classnames(style.defaultStyle, innerHtml ? style.innerHTML : null)}>\n {children}\n </span>\n );\n};\n\nLabel.propTypes = {\n children: PropTypes.node,\n innerHtml: PropTypes.bool\n};\n\nexport default Label;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAElC,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,KAAK,MAAM,aAAa;AAE/B,MAAMC,KAAK,GAAGA,CAAC;EAACC,QAAQ;EAAEC,SAAS,GAAG;AAAK,CAAC,KAAK;EAC/C,oBACEN,KAAA,CAAAO,aAAA;IAAMC,SAAS,EAAEN,UAAU,CAACC,KAAK,CAACM,YAAY,EAAEH,SAAS,GAAGH,KAAK,CAACO,SAAS,GAAG,IAAI;EAAE,GACjFL,QACG,CAAC;AAEX,CAAC;AAEDD,KAAK,CAACO,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAG;EAChBT,QAAQ,EAAEJ,SAAS,CAACc,IAAI;EACxBT,SAAS,EAAEL,SAAS,CAACe;AACvB,CAAC;AAED,eAAeZ,KAAK","ignoreList":[]}
|
package/es/atom/label/style.css
CHANGED
package/es/atom/life/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { NovaSolidVoteRewardsVoteHeart as HeartIcon, NovaCompositionCoorpacademy
|
|
|
7
7
|
import Provider from '../provider';
|
|
8
8
|
import cssStyle from './style.css';
|
|
9
9
|
const MODES = {
|
|
10
|
-
default: cssStyle.
|
|
10
|
+
default: cssStyle.defaultStyle,
|
|
11
11
|
small: cssStyle.small
|
|
12
12
|
};
|
|
13
13
|
const BOUNCES = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","PropTypes","classnames","NovaSolidVoteRewardsVoteHeart","HeartIcon","NovaCompositionCoorpacademyBrokenHeart","HeartBrokenIcon","NovaCompositionCoorpacademyVoteHeartOutline","HeartIconOutline","Provider","cssStyle","MODES","default","small","BOUNCES","bounce","bounceTwice","bounceAndPause","Life","props","context","skin","heartOnRight","animated","count","failed","mode","operator","revival","className","style","customStyle","negativeColor","_get","white","pickStyle","successStyle","failedStyle","animatedFailedStyle","revivalStyle","heartWrapper","heartWrapperFailed","heartWrapperDefault","bounceClass","type","heartCustomStyle","animationDelay","delay","animationDuration","duration","left","countStyle","livesCounterFailed","livesCounterDefault","createElement","livesCounterWrapper","previousLivesCounterDefault","previousLivesCounterFailed","previousLivesRevival","operatorWrapper","heartOutline","color","heartNormalDefault","heartNormalFailed","heartNormalAnimatedFailed","heartNormalRevival","heartBrokenDefault","heartBrokenFailed","heartBrokenAnimatedFailed","heartBrokenRevival","contextTypes","childContextTypes","propTypes","process","env","NODE_ENV","bool","shape","oneOf","string","_keys","number"],"sources":["../../../src/atom/life/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {get, keys} from 'lodash/fp';\nimport {\n NovaSolidVoteRewardsVoteHeart as HeartIcon,\n NovaCompositionCoorpacademyBrokenHeart as HeartBrokenIcon,\n NovaCompositionCoorpacademyVoteHeartOutline as HeartIconOutline\n} from '@coorpacademy/nova-icons';\nimport Provider from '../provider';\nimport cssStyle from './style.css';\n\nconst MODES = {\n default: cssStyle.
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","PropTypes","classnames","NovaSolidVoteRewardsVoteHeart","HeartIcon","NovaCompositionCoorpacademyBrokenHeart","HeartBrokenIcon","NovaCompositionCoorpacademyVoteHeartOutline","HeartIconOutline","Provider","cssStyle","MODES","default","defaultStyle","small","BOUNCES","bounce","bounceTwice","bounceAndPause","Life","props","context","skin","heartOnRight","animated","count","failed","mode","operator","revival","className","style","customStyle","negativeColor","_get","white","pickStyle","successStyle","failedStyle","animatedFailedStyle","revivalStyle","heartWrapper","heartWrapperFailed","heartWrapperDefault","bounceClass","type","heartCustomStyle","animationDelay","delay","animationDuration","duration","left","countStyle","livesCounterFailed","livesCounterDefault","createElement","livesCounterWrapper","previousLivesCounterDefault","previousLivesCounterFailed","previousLivesRevival","operatorWrapper","heartOutline","color","heartNormalDefault","heartNormalFailed","heartNormalAnimatedFailed","heartNormalRevival","heartBrokenDefault","heartBrokenFailed","heartBrokenAnimatedFailed","heartBrokenRevival","contextTypes","childContextTypes","propTypes","process","env","NODE_ENV","bool","shape","oneOf","string","_keys","number"],"sources":["../../../src/atom/life/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {get, keys} from 'lodash/fp';\nimport {\n NovaSolidVoteRewardsVoteHeart as HeartIcon,\n NovaCompositionCoorpacademyBrokenHeart as HeartBrokenIcon,\n NovaCompositionCoorpacademyVoteHeartOutline as HeartIconOutline\n} from '@coorpacademy/nova-icons';\nimport Provider from '../provider';\nimport cssStyle from './style.css';\n\nconst MODES = {\n default: cssStyle.defaultStyle,\n small: cssStyle.small\n};\n\nconst BOUNCES = {\n bounce: cssStyle.bounce,\n bounceTwice: cssStyle.bounceTwice,\n bounceAndPause: cssStyle.bounceAndPause\n};\n\nconst Life = (props, context) => {\n const {skin} = context;\n const {\n bounce = null,\n heartOnRight = false,\n animated = false,\n count = 3,\n failed = false,\n mode = 'default',\n operator = 'x',\n revival,\n className,\n style: customStyle\n } = props;\n const negativeColor = get('common.negative', skin);\n const white = get('common.white', skin);\n\n if (count === null) {\n return null;\n }\n\n const pickStyle = (successStyle, failedStyle, animatedFailedStyle, revivalStyle) => {\n if (revival) return revivalStyle;\n if (failed && animated) return animatedFailedStyle;\n if (failed) return failedStyle;\n return successStyle;\n };\n\n const heartWrapper =\n failed && animated ? cssStyle.heartWrapperFailed : cssStyle.heartWrapperDefault;\n const bounceClass = bounce ? BOUNCES[bounce.type] : null;\n const heartCustomStyle = {\n animationDelay: bounce && bounce.delay,\n animationDuration: bounce && bounce.duration,\n left: heartOnRight && '70px'\n };\n\n const countStyle = failed ? cssStyle.livesCounterFailed : cssStyle.livesCounterDefault;\n\n return (\n <div data-name=\"life\" className={classnames(MODES[mode], className)} style={customStyle}>\n <div className={cssStyle.livesCounterWrapper}>\n <div\n className={pickStyle(\n cssStyle.previousLivesCounterDefault,\n cssStyle.previousLivesCounterDefault,\n cssStyle.previousLivesCounterFailed,\n cssStyle.previousLivesRevival\n )}\n >\n {count + 1}\n </div>\n <div data-name=\"counter\" className={countStyle}>\n {count}\n </div>\n </div>\n <div className={cssStyle.operatorWrapper}>\n <span className={cssStyle.operator}>{operator}</span>\n </div>\n <div className={classnames(heartWrapper, bounceClass)} style={heartCustomStyle}>\n <HeartIconOutline className={cssStyle.heartOutline} style={{color: white}} />\n <HeartIcon\n className={pickStyle(\n cssStyle.heartNormalDefault,\n cssStyle.heartNormalFailed,\n cssStyle.heartNormalAnimatedFailed,\n cssStyle.heartNormalRevival\n )}\n style={{color: negativeColor}}\n />\n <HeartBrokenIcon\n className={pickStyle(\n cssStyle.heartBrokenDefault,\n cssStyle.heartBrokenFailed,\n cssStyle.heartBrokenAnimatedFailed,\n cssStyle.heartBrokenRevival\n )}\n style={{color: negativeColor}}\n />\n </div>\n </div>\n );\n};\n\nLife.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nLife.propTypes = {\n revival: PropTypes.bool,\n animated: PropTypes.bool,\n bounce: PropTypes.shape({\n type: PropTypes.oneOf(['bounce', 'bounceTwice', 'bounceAndPause']),\n delay: PropTypes.string\n }),\n heartOnRight: PropTypes.bool,\n mode: PropTypes.oneOf(keys(MODES)),\n count: PropTypes.number,\n failed: PropTypes.bool,\n className: PropTypes.string,\n operator: PropTypes.string,\n style: PropTypes.shape({})\n};\n\nexport default Life;\n"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,UAAU,MAAM,YAAY;AAEnC,SACEC,6BAA6B,IAAIC,SAAS,EAC1CC,sCAAsC,IAAIC,eAAe,EACzDC,2CAA2C,IAAIC,gBAAgB,QAC1D,0BAA0B;AACjC,OAAOC,QAAQ,MAAM,aAAa;AAClC,OAAOC,QAAQ,MAAM,aAAa;AAElC,MAAMC,KAAK,GAAG;EACZC,OAAO,EAAEF,QAAQ,CAACG,YAAY;EAC9BC,KAAK,EAAEJ,QAAQ,CAACI;AAClB,CAAC;AAED,MAAMC,OAAO,GAAG;EACdC,MAAM,EAAEN,QAAQ,CAACM,MAAM;EACvBC,WAAW,EAAEP,QAAQ,CAACO,WAAW;EACjCC,cAAc,EAAER,QAAQ,CAACQ;AAC3B,CAAC;AAED,MAAMC,IAAI,GAAGA,CAACC,KAAK,EAAEC,OAAO,KAAK;EAC/B,MAAM;IAACC;EAAI,CAAC,GAAGD,OAAO;EACtB,MAAM;IACJL,MAAM,GAAG,IAAI;IACbO,YAAY,GAAG,KAAK;IACpBC,QAAQ,GAAG,KAAK;IAChBC,KAAK,GAAG,CAAC;IACTC,MAAM,GAAG,KAAK;IACdC,IAAI,GAAG,SAAS;IAChBC,QAAQ,GAAG,GAAG;IACdC,OAAO;IACPC,SAAS;IACTC,KAAK,EAAEC;EACT,CAAC,GAAGZ,KAAK;EACT,MAAMa,aAAa,GAAGC,IAAA,CAAI,iBAAiB,EAAEZ,IAAI,CAAC;EAClD,MAAMa,KAAK,GAAGD,IAAA,CAAI,cAAc,EAAEZ,IAAI,CAAC;EAEvC,IAAIG,KAAK,KAAK,IAAI,EAAE;IAClB,OAAO,IAAI;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EACf/C,OAAO,EAAE5B,SAAS,CAAC4E,IAAI;EACvBrD,QAAQ,EAAEvB,SAAS,CAAC4E,IAAI;EACxB7D,MAAM,EAAEf,SAAS,CAAC6E,KAAK,CAAC;IACtBjC,IAAI,EAAE5C,SAAS,CAAC8E,KAAK,CAAC,CAAC,QAAQ,EAAE,aAAa,EAAE,gBAAgB,CAAC,CAAC;IAClE/B,KAAK,EAAE/C,SAAS,CAAC+E;EACnB,CAAC,CAAC;EACFzD,YAAY,EAAEtB,SAAS,CAAC4E,IAAI;EAC5BlD,IAAI,EAAE1B,SAAS,CAAC8E,KAAK,CAACE,KAAA,CAAKtE,KAAK,CAAC,CAAC;EAClCc,KAAK,EAAExB,SAAS,CAACiF,MAAM;EACvBxD,MAAM,EAAEzB,SAAS,CAAC4E,IAAI;EACtB/C,SAAS,EAAE7B,SAAS,CAAC+E,MAAM;EAC3BpD,QAAQ,EAAE3B,SAAS,CAAC+E,MAAM;EAC1BjD,KAAK,EAAE9B,SAAS,CAAC6E,KAAK,CAAC,CAAC,CAAC;AAC3B,CAAC;AAED,eAAe3D,IAAI","ignoreList":[]}
|
package/es/atom/life/style.css
CHANGED
|
@@ -33,7 +33,7 @@ const PictureBackground = props => {
|
|
|
33
33
|
src: desktop,
|
|
34
34
|
alt: alt
|
|
35
35
|
}))) : /*#__PURE__*/React.createElement("img", {
|
|
36
|
-
className: classnames(cssStyle.
|
|
36
|
+
className: classnames(cssStyle.defaultStyle, bgStyle),
|
|
37
37
|
src: src,
|
|
38
38
|
alt: alt
|
|
39
39
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","PropTypes","classnames","cssStyle","viewStyle","cover","contain","PictureBackground","props","src","view","style","alt","mobile","desktop","bgStyle","pictureView","_isObject","createElement","className","deviceView","mobileContainer","picture","desktopContainer","
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","PropTypes","classnames","cssStyle","viewStyle","cover","contain","PictureBackground","props","src","view","style","alt","mobile","desktop","bgStyle","pictureView","_isObject","createElement","className","deviceView","mobileContainer","picture","desktopContainer","defaultStyle","wrapper","propTypes","process","env","NODE_ENV","oneOf","_keys","oneOfType","objectOf","string","isRequired","number"],"sources":["../../../src/atom/picture-background/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {isObject, keys} from 'lodash/fp';\nimport cssStyle from './style.css';\n\nconst viewStyle = {\n cover: cssStyle.cover,\n contain: cssStyle.contain\n};\n\nconst PictureBackground = props => {\n const {src, view, style, alt = ''} = props;\n const mobile = src.mobile;\n const desktop = src.desktop;\n const bgStyle = viewStyle[view];\n\n const pictureView = isObject(src) ? (\n <div className={cssStyle.deviceView}>\n <div className={cssStyle.mobileContainer}>\n <img className={classnames(cssStyle.picture, bgStyle)} src={mobile} alt={alt} />\n </div>\n <div className={cssStyle.desktopContainer}>\n <img className={classnames(cssStyle.picture, bgStyle)} src={desktop} alt={alt} />\n </div>\n </div>\n ) : (\n <img className={classnames(cssStyle.defaultStyle, bgStyle)} src={src} alt={alt} />\n );\n\n return (\n <div className={cssStyle.wrapper} style={style}>\n {pictureView}\n </div>\n );\n};\n\nPictureBackground.propTypes = {\n view: PropTypes.oneOf(keys(viewStyle)),\n src: PropTypes.oneOfType([PropTypes.objectOf(PropTypes.string), PropTypes.string.isRequired]),\n style: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])),\n alt: PropTypes.string\n};\n\nexport default PictureBackground;\n"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,UAAU,MAAM,YAAY;AAEnC,OAAOC,QAAQ,MAAM,aAAa;AAElC,MAAMC,SAAS,GAAG;EAChBC,KAAK,EAAEF,QAAQ,CAACE,KAAK;EACrBC,OAAO,EAAEH,QAAQ,CAACG;AACpB,CAAC;AAED,MAAMC,iBAAiB,GAAGC,KAAK,IAAI;EACjC,MAAM;IAACC,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AAET,SAAS,CAAC6B,KAAK,CAACC,KAAA,CAAK3B,SAAS,CAAC,CAAC;EACtCK,GAAG,EAAER,SAAS,CAAC+B,SAAS,CAAC,CAAC/B,SAAS,CAACgC,QAAQ,CAAChC,SAAS,CAACiC,MAAM,CAAC,EAAEjC,SAAS,CAACiC,MAAM,CAACC,UAAU,CAAC,CAAC;EAC7FxB,KAAK,EAAEV,SAAS,CAACgC,QAAQ,CAAChC,SAAS,CAAC+B,SAAS,CAAC,CAAC/B,SAAS,CAACiC,MAAM,EAAEjC,SAAS,CAACmC,MAAM,CAAC,CAAC,CAAC;EACpFxB,GAAG,EAAEX,SAAS,CAACiC;AACjB,CAAC;AAED,eAAe3B,iBAAiB","ignoreList":[]}
|
package/es/atom/range/handle.css
CHANGED
package/es/atom/range/handle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handle.js","names":["React","useEffect","useMemo","useRef","PropTypes","Provider","GetSkinFromContext","getShadowBoxColorFromPrimary","style","NoopHammer","constructor","on","stop","destroy","Hammer","window","require","Handle","props","legacyContext","skin","primaryColor","_getOr","backgroundColor","onPanStart","_noop","onPanEnd","onPan","HammerForTesting","handle","hammer","current","createElement","className","wrapper","boxShadow","
|
|
1
|
+
{"version":3,"file":"handle.js","names":["React","useEffect","useMemo","useRef","PropTypes","Provider","GetSkinFromContext","getShadowBoxColorFromPrimary","style","NoopHammer","constructor","on","stop","destroy","Hammer","window","require","Handle","props","legacyContext","skin","primaryColor","_getOr","backgroundColor","onPanStart","_noop","onPanEnd","onPan","HammerForTesting","handle","hammer","current","createElement","className","wrapper","boxShadow","defaultStyle","ref","propTypes","process","env","NODE_ENV","func","shape","contextTypes","childContextTypes"],"sources":["../../../src/atom/range/handle.js"],"sourcesContent":["import {noop, getOr} from 'lodash/fp';\nimport React, {useEffect, useMemo, useRef} from 'react';\nimport PropTypes from 'prop-types';\nimport Provider, {GetSkinFromContext} from '../provider';\nimport {getShadowBoxColorFromPrimary} from '../../util/get-shadow-box-color-from-primary';\nimport style from './handle.css';\n\nclass NoopHammer {\n constructor() {}\n\n // eslint-disable-next-line class-methods-use-this\n on() {\n return;\n }\n\n // eslint-disable-next-line class-methods-use-this\n stop() {\n return;\n }\n\n // eslint-disable-next-line class-methods-use-this\n destroy() {\n return;\n }\n}\n\nconst Hammer = // eslint-disable-next-line no-undef\n typeof window !== 'undefined' ? /* istanbul ignore next */ require('hammerjs') : NoopHammer;\n\nconst Handle = (props, legacyContext) => {\n const skin = GetSkinFromContext(legacyContext);\n const primaryColor = getOr('#00B0FF', 'common.primary', skin);\n const backgroundColor = primaryColor;\n const {onPanStart = noop, onPanEnd = noop, onPan = noop, HammerForTesting} = props;\n\n const handle = useRef();\n\n const hammer = useMemo(() => {\n return HammerForTesting || (handle.current && new Hammer(handle.current));\n // (we need to mount Hammer when handle.current is rendered and ready)\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [handle.current, HammerForTesting]);\n\n useEffect(() => {\n if (!hammer) return;\n hammer.on('panstart', onPanStart);\n hammer.on('panend', onPanEnd);\n\n hammer.on('panleft panright', onPan);\n\n return () => {\n hammer.stop();\n hammer.destroy();\n };\n }, [hammer, onPanStart, onPanEnd, onPan]);\n\n return (\n <div className={style.wrapper} data-testid=\"handle-wrapper\">\n <div\n style={{\n backgroundColor,\n boxShadow: `0px 0px 20px ${getShadowBoxColorFromPrimary(primaryColor)}`\n }}\n className={style.defaultStyle}\n ref={handle}\n data-name={'handle'}\n />\n </div>\n );\n};\n\nHandle.propTypes = {\n onPan: PropTypes.func,\n onPanStart: PropTypes.func,\n onPanEnd: PropTypes.func,\n HammerForTesting: PropTypes.shape({\n on: PropTypes.func,\n destroy: PropTypes.func,\n stop: PropTypes.func\n })\n};\n\nHandle.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nexport default Handle;\n"],"mappings":";;AACA,OAAOA,KAAK,IAAGC,SAAS,EAAEC,OAAO,EAAEC,MAAM,QAAO,OAAO;AACvD,OAAOC,SAA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I,MAAM,CAACnB,EAAE,CAAC,kBAAkB,EAAEgB,KAAK,CAAC;IAEpC,OAAO,MAAM;MACXG,MAAM,CAAClB,IAAI,CAAC,CAAC;MACbkB,MAAM,CAACjB,OAAO,CAAC,CAAC;IAClB,CAAC;EACH,CAAC,EAAE,CAACiB,MAAM,EAAEN,UAAU,EAAEE,QAAQ,EAAEC,KAAK,CAAC,CAAC;EAEzC,oBACE3B,KAAA,CAAAgC,aAAA;IAAKC,SAAS,EAAEzB,KAAK,CAAC0B,OAAQ;IAAC,eAAY;EAAgB,gBACzDlC,KAAA,CAAAgC,aAAA;IACExB,KAAK,EAAE;MACLe,eAAe;MACfY,SAAS,EAAE,gBAAgB5B,4BAA4B,CAACc,YAAY,CAAC;IACvE,CAAE;IACFY,SAAS,EAAEzB,KAAK,CAAC4B,YAAa;IAC9BC,GAAG,EAAER,MAAO;IACZ,aAAW;EAAS,CACrB,CACE,CAAC;AAEV,CAAC;AAEDZ,MAAM,CAACqB,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAG;EACjBd,KAAK,EAAEvB,SAAS,CAACsC,IAAI;EACrBlB,UAAU,EAAEpB,SAAS,CAACsC,IAAI;EAC1BhB,QAAQ,EAAEtB,SAAS,CAACsC,IAAI;EACxBd,gBAAgB,EAAExB,SAAS,CAACuC,KAAK,CAAC;IAChChC,EAAE,EAAEP,SAAS,CAACsC,IAAI;IAClB7B,OAAO,EAAET,SAAS,CAACsC,IAAI;IACvB9B,IAAI,EAAER,SAAS,CAACsC;EAClB,CAAC;AACH,CAAC;AAEDzB,MAAM,CAAC2B,YAAY,GAAG;EACpBxB,IAAI,EAAEf,QAAQ,CAACwC,iBAAiB,CAACzB;AACnC,CAAC;AAED,eAAeH,MAAM","ignoreList":[]}
|
package/es/atom/select/index.js
CHANGED
|
@@ -117,7 +117,7 @@ const Select = (props, legacyContext) => {
|
|
|
117
117
|
const isThemeOneOfQuestionTemplateOrPlayer = useMemo(() => includes(theme, ['question', 'template', 'player']), [theme]);
|
|
118
118
|
const shouldUseSkinFontColor = useMemo(() => !isSelectedInValidOption && selected && isThemeOneOfQuestionTemplateOrPlayer, [isSelectedInValidOption, selected, isThemeOneOfQuestionTemplateOrPlayer]);
|
|
119
119
|
const arrowColor = selected ? color : undefined;
|
|
120
|
-
const behaviorClassName = useMemo(() => getClassState(style.
|
|
120
|
+
const behaviorClassName = useMemo(() => getClassState(style.defaultStyle, style.modified, style.error, modified, error), [error, modified]);
|
|
121
121
|
const composedClassName = useMemo(() => classnames(theme && theme !== 'coorpmanager' ? themeStyle[theme] : behaviorClassName, selected ? style.selected : style.unselected, className), [behaviorClassName, className, selected, theme]);
|
|
122
122
|
const labelSize = useMemo(() => size(selectedLabel), [selectedLabel]);
|
|
123
123
|
const isLongLabel = useMemo(() => labelSize >= 65, [labelSize]);
|