@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.
Files changed (48) hide show
  1. package/es/atom/button-link/style.css +2 -1
  2. package/es/molecule/base-modal/index.d.ts +3 -0
  3. package/es/molecule/base-modal/index.d.ts.map +1 -1
  4. package/es/molecule/base-modal/index.js +19 -10
  5. package/es/molecule/base-modal/index.js.map +1 -1
  6. package/es/molecule/base-modal/style.css +6 -9
  7. package/es/organism/content-skill-modal/index.d.ts +660 -0
  8. package/es/organism/content-skill-modal/index.d.ts.map +1 -0
  9. package/es/organism/content-skill-modal/index.js +72 -0
  10. package/es/organism/content-skill-modal/index.js.map +1 -0
  11. package/es/organism/content-skill-modal/style.css +20 -0
  12. package/es/organism/content-skill-modal/types.d.ts +667 -0
  13. package/es/organism/content-skill-modal/types.d.ts.map +1 -0
  14. package/es/organism/content-skill-modal/types.js +16 -0
  15. package/es/organism/content-skill-modal/types.js.map +1 -0
  16. package/es/organism/filter-checkbox-and-search/index.d.ts.map +1 -1
  17. package/es/organism/filter-checkbox-and-search/index.js +21 -18
  18. package/es/organism/filter-checkbox-and-search/index.js.map +1 -1
  19. package/es/organism/filter-checkbox-and-search/style.css +16 -3
  20. package/es/variables/colors.d.ts +1 -0
  21. package/es/variables/colors.d.ts.map +1 -1
  22. package/es/variables/colors.js +1 -0
  23. package/es/variables/colors.js.map +1 -1
  24. package/lib/atom/button-link/style.css +2 -1
  25. package/lib/molecule/base-modal/index.d.ts +3 -0
  26. package/lib/molecule/base-modal/index.d.ts.map +1 -1
  27. package/lib/molecule/base-modal/index.js +19 -10
  28. package/lib/molecule/base-modal/index.js.map +1 -1
  29. package/lib/molecule/base-modal/style.css +6 -9
  30. package/lib/organism/content-skill-modal/index.d.ts +660 -0
  31. package/lib/organism/content-skill-modal/index.d.ts.map +1 -0
  32. package/lib/organism/content-skill-modal/index.js +79 -0
  33. package/lib/organism/content-skill-modal/index.js.map +1 -0
  34. package/lib/organism/content-skill-modal/style.css +20 -0
  35. package/lib/organism/content-skill-modal/types.d.ts +667 -0
  36. package/lib/organism/content-skill-modal/types.d.ts.map +1 -0
  37. package/lib/organism/content-skill-modal/types.js +21 -0
  38. package/lib/organism/content-skill-modal/types.js.map +1 -0
  39. package/lib/organism/filter-checkbox-and-search/index.d.ts.map +1 -1
  40. package/lib/organism/filter-checkbox-and-search/index.js +21 -18
  41. package/lib/organism/filter-checkbox-and-search/index.js.map +1 -1
  42. package/lib/organism/filter-checkbox-and-search/style.css +16 -3
  43. package/lib/variables/colors.d.ts +1 -0
  44. package/lib/variables/colors.d.ts.map +1 -1
  45. package/lib/variables/colors.js +1 -0
  46. package/lib/variables/colors.js.map +1 -1
  47. package/locales/.mtslconfig.json +1 -0
  48. 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,79 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.default = void 0;
5
+ var _react = _interopRequireWildcard(require("react"));
6
+ var _baseModal = _interopRequireDefault(require("../../molecule/base-modal"));
7
+ var _listItems = _interopRequireDefault(require("../list-items"));
8
+ var _multiFilterPanel = _interopRequireDefault(require("../../molecule/multi-filter-panel"));
9
+ var _provider = _interopRequireDefault(require("../../atom/provider"));
10
+ var _colors = require("../../variables/colors");
11
+ var _style = _interopRequireDefault(require("./style.css"));
12
+ var _types = _interopRequireDefault(require("./types"));
13
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
15
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
16
+ const ContentSkillModal = props => {
17
+ const {
18
+ contentList,
19
+ filters,
20
+ modal
21
+ } = props;
22
+ const {
23
+ isOpen,
24
+ onCancel,
25
+ onConfirm,
26
+ onClose
27
+ } = modal;
28
+ const handleCancel = (0, _react.useCallback)(() => {
29
+ onCancel();
30
+ }, [onCancel]);
31
+ const handleClose = (0, _react.useCallback)(() => {
32
+ onClose();
33
+ }, [onClose]);
34
+ const headerIcon = {
35
+ name: 'circle-plus',
36
+ color: _colors.COLORS.primary_600,
37
+ backgroundColor: _colors.COLORS.primary_100
38
+ };
39
+ const footer = (0, _react.useMemo)(() => ({
40
+ cancelButton: {
41
+ onCancel: handleCancel,
42
+ label: 'Cancel'
43
+ },
44
+ confirmButton: {
45
+ onConfirm,
46
+ label: 'Add',
47
+ iconName: 'plus',
48
+ disabled: false,
49
+ color: _colors.COLORS.cm_primary_blue
50
+ }
51
+ }), [handleCancel, onConfirm]);
52
+ const baseModal = {
53
+ title: 'Add content',
54
+ description: 'Add courses, video, interactive and more to this skill',
55
+ headerIcon,
56
+ footer,
57
+ isOpen,
58
+ onClose: handleClose,
59
+ customStyle: {
60
+ padding: 0,
61
+ height: '60vh',
62
+ overflow: 'hidden'
63
+ }
64
+ };
65
+ if (!isOpen) return null;
66
+ return /*#__PURE__*/_react.default.createElement(_baseModal.default, baseModal, /*#__PURE__*/_react.default.createElement("div", {
67
+ className: _style.default.container
68
+ }, /*#__PURE__*/_react.default.createElement("div", {
69
+ className: _style.default.containerList
70
+ }, /*#__PURE__*/_react.default.createElement(_listItems.default, contentList)), /*#__PURE__*/_react.default.createElement("div", {
71
+ className: _style.default.filtersContainer
72
+ }, /*#__PURE__*/_react.default.createElement(_multiFilterPanel.default, filters))));
73
+ };
74
+ ContentSkillModal.contextTypes = {
75
+ translate: _provider.default.childContextTypes.translate
76
+ };
77
+ ContentSkillModal.propTypes = process.env.NODE_ENV !== "production" ? _types.default : {};
78
+ var _default = exports.default = ContentSkillModal;
79
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["_react","_interopRequireWildcard","require","_baseModal","_interopRequireDefault","_listItems","_multiFilterPanel","_provider","_colors","_style","_types","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ContentSkillModal","props","contentList","filters","modal","isOpen","onCancel","onConfirm","onClose","handleCancel","useCallback","handleClose","headerIcon","name","color","COLORS","primary_600","backgroundColor","primary_100","footer","useMemo","cancelButton","label","confirmButton","iconName","disabled","cm_primary_blue","baseModal","title","description","customStyle","padding","height","overflow","createElement","className","style","container","containerList","filtersContainer","contextTypes","translate","Provider","childContextTypes","propTypes","process","env","NODE_ENV","_default","exports"],"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,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,UAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,iBAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,SAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAL,sBAAA,CAAAF,OAAA;AACA,IAAAQ,MAAA,GAAAN,sBAAA,CAAAF,OAAA;AAA0D,SAAAE,uBAAAO,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,yBAAAH,CAAA,6BAAAI,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAD,wBAAA,YAAAA,CAAAH,CAAA,WAAAA,CAAA,GAAAM,CAAA,GAAAD,CAAA,KAAAL,CAAA;AAAA,SAAAV,wBAAAU,CAAA,EAAAK,CAAA,SAAAA,CAAA,IAAAL,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAE,OAAA,EAAAF,CAAA,QAAAM,CAAA,GAAAH,wBAAA,CAAAE,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAC,GAAA,CAAAP,CAAA,UAAAM,CAAA,CAAAE,GAAA,CAAAR,CAAA,OAAAS,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA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AC,IAAAI,QAAA,GAAAC,OAAA,CAAAnE,OAAA,GAEzBkB,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
+ }