@coorpacademy/components 11.33.16 → 11.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/atom/button-link/style.css +2 -1
- package/es/molecule/base-modal/index.d.ts +3 -0
- package/es/molecule/base-modal/index.d.ts.map +1 -1
- package/es/molecule/base-modal/index.js +19 -10
- package/es/molecule/base-modal/index.js.map +1 -1
- package/es/molecule/base-modal/style.css +6 -9
- package/es/organism/content-skill-modal/index.d.ts +660 -0
- package/es/organism/content-skill-modal/index.d.ts.map +1 -0
- package/es/organism/content-skill-modal/index.js +72 -0
- package/es/organism/content-skill-modal/index.js.map +1 -0
- package/es/organism/content-skill-modal/style.css +20 -0
- package/es/organism/content-skill-modal/types.d.ts +667 -0
- package/es/organism/content-skill-modal/types.d.ts.map +1 -0
- package/es/organism/content-skill-modal/types.js +16 -0
- package/es/organism/content-skill-modal/types.js.map +1 -0
- package/es/organism/filter-checkbox-and-search/index.d.ts.map +1 -1
- package/es/organism/filter-checkbox-and-search/index.js +21 -18
- package/es/organism/filter-checkbox-and-search/index.js.map +1 -1
- package/es/organism/filter-checkbox-and-search/style.css +16 -3
- package/es/variables/colors.d.ts +1 -0
- package/es/variables/colors.d.ts.map +1 -1
- package/es/variables/colors.js +1 -0
- package/es/variables/colors.js.map +1 -1
- package/lib/atom/button-link/style.css +2 -1
- package/lib/molecule/base-modal/index.d.ts +3 -0
- package/lib/molecule/base-modal/index.d.ts.map +1 -1
- package/lib/molecule/base-modal/index.js +19 -10
- package/lib/molecule/base-modal/index.js.map +1 -1
- package/lib/molecule/base-modal/style.css +6 -9
- package/lib/organism/content-skill-modal/index.d.ts +660 -0
- package/lib/organism/content-skill-modal/index.d.ts.map +1 -0
- package/lib/organism/content-skill-modal/index.js +79 -0
- package/lib/organism/content-skill-modal/index.js.map +1 -0
- package/lib/organism/content-skill-modal/style.css +20 -0
- package/lib/organism/content-skill-modal/types.d.ts +667 -0
- package/lib/organism/content-skill-modal/types.d.ts.map +1 -0
- package/lib/organism/content-skill-modal/types.js +21 -0
- package/lib/organism/content-skill-modal/types.js.map +1 -0
- package/lib/organism/filter-checkbox-and-search/index.d.ts.map +1 -1
- package/lib/organism/filter-checkbox-and-search/index.js +21 -18
- package/lib/organism/filter-checkbox-and-search/index.js.map +1 -1
- package/lib/organism/filter-checkbox-and-search/style.css +16 -3
- package/lib/variables/colors.d.ts +1 -0
- package/lib/variables/colors.d.ts.map +1 -1
- package/lib/variables/colors.js +1 -0
- package/lib/variables/colors.js.map +1 -1
- package/locales/.mtslconfig.json +1 -0
- package/package.json +2 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/content-skill-modal/index.tsx"],"names":[],"mappings":";AAOA,OAAkB,EAAC,sBAAsB,EAAC,MAAM,SAAS,CAAC;AAE1D,QAAA,MAAM,iBAAiB;YAAW,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4DvD,CAAC;AAQF,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import React, { useCallback, useMemo } from 'react';
|
|
2
|
+
import BaseModal from '../../molecule/base-modal';
|
|
3
|
+
import ListItems from '../list-items';
|
|
4
|
+
import MultiFilterPanel from '../../molecule/multi-filter-panel';
|
|
5
|
+
import Provider from '../../atom/provider';
|
|
6
|
+
import { COLORS } from '../../variables/colors';
|
|
7
|
+
import style from './style.css';
|
|
8
|
+
import propTypes from './types';
|
|
9
|
+
const ContentSkillModal = props => {
|
|
10
|
+
const {
|
|
11
|
+
contentList,
|
|
12
|
+
filters,
|
|
13
|
+
modal
|
|
14
|
+
} = props;
|
|
15
|
+
const {
|
|
16
|
+
isOpen,
|
|
17
|
+
onCancel,
|
|
18
|
+
onConfirm,
|
|
19
|
+
onClose
|
|
20
|
+
} = modal;
|
|
21
|
+
const handleCancel = useCallback(() => {
|
|
22
|
+
onCancel();
|
|
23
|
+
}, [onCancel]);
|
|
24
|
+
const handleClose = useCallback(() => {
|
|
25
|
+
onClose();
|
|
26
|
+
}, [onClose]);
|
|
27
|
+
const headerIcon = {
|
|
28
|
+
name: 'circle-plus',
|
|
29
|
+
color: COLORS.primary_600,
|
|
30
|
+
backgroundColor: COLORS.primary_100
|
|
31
|
+
};
|
|
32
|
+
const footer = useMemo(() => ({
|
|
33
|
+
cancelButton: {
|
|
34
|
+
onCancel: handleCancel,
|
|
35
|
+
label: 'Cancel'
|
|
36
|
+
},
|
|
37
|
+
confirmButton: {
|
|
38
|
+
onConfirm,
|
|
39
|
+
label: 'Add',
|
|
40
|
+
iconName: 'plus',
|
|
41
|
+
disabled: false,
|
|
42
|
+
color: COLORS.cm_primary_blue
|
|
43
|
+
}
|
|
44
|
+
}), [handleCancel, onConfirm]);
|
|
45
|
+
const baseModal = {
|
|
46
|
+
title: 'Add content',
|
|
47
|
+
description: 'Add courses, video, interactive and more to this skill',
|
|
48
|
+
headerIcon,
|
|
49
|
+
footer,
|
|
50
|
+
isOpen,
|
|
51
|
+
onClose: handleClose,
|
|
52
|
+
customStyle: {
|
|
53
|
+
padding: 0,
|
|
54
|
+
height: '60vh',
|
|
55
|
+
overflow: 'hidden'
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
if (!isOpen) return null;
|
|
59
|
+
return /*#__PURE__*/React.createElement(BaseModal, baseModal, /*#__PURE__*/React.createElement("div", {
|
|
60
|
+
className: style.container
|
|
61
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
62
|
+
className: style.containerList
|
|
63
|
+
}, /*#__PURE__*/React.createElement(ListItems, contentList)), /*#__PURE__*/React.createElement("div", {
|
|
64
|
+
className: style.filtersContainer
|
|
65
|
+
}, /*#__PURE__*/React.createElement(MultiFilterPanel, filters))));
|
|
66
|
+
};
|
|
67
|
+
ContentSkillModal.contextTypes = {
|
|
68
|
+
translate: Provider.childContextTypes.translate
|
|
69
|
+
};
|
|
70
|
+
ContentSkillModal.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {};
|
|
71
|
+
export default ContentSkillModal;
|
|
72
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useCallback","useMemo","BaseModal","ListItems","MultiFilterPanel","Provider","COLORS","style","propTypes","ContentSkillModal","props","contentList","filters","modal","isOpen","onCancel","onConfirm","onClose","handleCancel","handleClose","headerIcon","name","color","primary_600","backgroundColor","primary_100","footer","cancelButton","label","confirmButton","iconName","disabled","cm_primary_blue","baseModal","title","description","customStyle","padding","height","overflow","createElement","className","container","containerList","filtersContainer","contextTypes","translate","childContextTypes","process","env","NODE_ENV"],"sources":["../../../src/organism/content-skill-modal/index.tsx"],"sourcesContent":["import React, {useCallback, useMemo} from 'react';\nimport BaseModal from '../../molecule/base-modal';\nimport ListItems from '../list-items';\nimport MultiFilterPanel from '../../molecule/multi-filter-panel';\nimport Provider from '../../atom/provider';\nimport {COLORS} from '../../variables/colors';\nimport style from './style.css';\nimport propTypes, {ContentSkillModalProps} from './types';\n\nconst ContentSkillModal = (props: ContentSkillModalProps) => {\n const {contentList, filters, modal} = props;\n const {isOpen, onCancel, onConfirm, onClose} = modal;\n\n const handleCancel = useCallback(() => {\n onCancel();\n }, [onCancel]);\n const handleClose = useCallback(() => {\n onClose();\n }, [onClose]);\n\n const headerIcon = {\n name: 'circle-plus',\n color: COLORS.primary_600,\n backgroundColor: COLORS.primary_100\n };\n const footer = useMemo(\n () => ({\n cancelButton: {\n onCancel: handleCancel,\n label: 'Cancel'\n },\n confirmButton: {\n onConfirm,\n label: 'Add',\n iconName: 'plus',\n disabled: false,\n color: COLORS.cm_primary_blue\n }\n }),\n [handleCancel, onConfirm]\n );\n const baseModal = {\n title: 'Add content',\n description: 'Add courses, video, interactive and more to this skill',\n headerIcon,\n footer,\n isOpen,\n onClose: handleClose,\n customStyle: {\n padding: 0,\n height: '60vh',\n overflow: 'hidden'\n }\n };\n\n if (!isOpen) return null;\n\n return (\n <BaseModal {...baseModal}>\n <div className={style.container}>\n <div className={style.containerList}>\n <ListItems {...contentList} />\n </div>\n <div className={style.filtersContainer}>\n <MultiFilterPanel {...filters} />\n </div>\n </div>\n </BaseModal>\n );\n};\n\nContentSkillModal.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nContentSkillModal.propTypes = propTypes;\n\nexport default ContentSkillModal;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAGC,WAAW,EAAEC,OAAO,QAAO,OAAO;AACjD,OAAOC,SAAS,MAAM,2BAA2B;AACjD,OAAOC,SAAS,MAAM,eAAe;AACrC,OAAOC,gBAAgB,MAAM,mCAAmC;AAChE,OAAOC,QAAQ,MAAM,qBAAqB;AAC1C,SAAQC,MAAM,QAAO,w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B,MAAM,EAAE,OAAO,IAAI;EAExB,oBACEf,KAAA,CAAAyC,aAAA,CAACtC,SAAS,EAAK+B,SAAS,eACtBlC,KAAA,CAAAyC,aAAA;IAAKC,SAAS,EAAElC,KAAK,CAACmC;EAAU,gBAC9B3C,KAAA,CAAAyC,aAAA;IAAKC,SAAS,EAAElC,KAAK,CAACoC;EAAc,gBAClC5C,KAAA,CAAAyC,aAAA,CAACrC,SAAS,EAAKQ,WAAc,CAC1B,CAAC,eACNZ,KAAA,CAAAyC,aAAA;IAAKC,SAAS,EAAElC,KAAK,CAACqC;EAAiB,gBACrC7C,KAAA,CAAAyC,aAAA,CAACpC,gBAAgB,EAAKQ,OAAU,CAC7B,CACF,CACI,CAAC;AAEhB,CAAC;AAEDH,iBAAiB,CAACoC,YAAY,GAAG;EAC/BC,SAAS,EAAEzC,QAAQ,CAAC0C,iBAAiB,CAACD;AACxC,CAAC;AAEDrC,iBAAiB,CAACD,SAAS,GAAAwC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAG1C,SAAS;AAEvC,eAAeC,iBAAiB","ignoreList":[]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
@value colors: "../../variables/colors.css";
|
|
2
|
+
@value cm_grey_100 from colors;
|
|
3
|
+
|
|
4
|
+
.container {
|
|
5
|
+
display: flex;
|
|
6
|
+
height: 100%;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.containerList {
|
|
10
|
+
flex: 2;
|
|
11
|
+
border-right: 1px solid cm_grey_100;
|
|
12
|
+
overflow-y: auto;
|
|
13
|
+
padding: 24px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.filtersContainer {
|
|
17
|
+
flex: 1;
|
|
18
|
+
overflow-y: auto;
|
|
19
|
+
padding: 24px;
|
|
20
|
+
}
|