@coorpacademy/components 11.12.3-alpha.11 → 11.12.3-alpha.3
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/molecule/course-section/style.css +4 -6
- package/es/molecule/draggable/style.css +9 -5
- package/es/molecule/draggable-list/index.d.ts +50 -2
- package/es/molecule/draggable-list/index.d.ts.map +1 -1
- package/es/molecule/draggable-list/index.js +4 -2
- package/es/molecule/draggable-list/index.js.map +1 -1
- package/es/molecule/hero/index.d.ts +0 -2
- package/es/molecule/hero/index.d.ts.map +1 -1
- package/es/molecule/hero/index.js +4 -14
- package/es/molecule/hero/index.js.map +1 -1
- package/es/molecule/hero/style.css +0 -42
- package/es/organism/list-item/index.d.ts +1 -0
- package/es/organism/list-item/index.js +2 -1
- package/es/organism/list-item/index.js.map +1 -1
- package/es/organism/list-item/style.css +6 -4
- package/es/organism/list-items/index.d.ts +4 -1
- package/es/organism/list-items/index.d.ts.map +1 -1
- package/es/organism/list-items/index.js +29 -13
- package/es/organism/list-items/index.js.map +1 -1
- package/es/template/back-office/brand-update/index.d.ts +2 -0
- package/lib/molecule/course-section/style.css +4 -6
- package/lib/molecule/draggable/style.css +9 -5
- package/lib/molecule/draggable-list/index.d.ts +50 -2
- package/lib/molecule/draggable-list/index.d.ts.map +1 -1
- package/lib/molecule/draggable-list/index.js +5 -2
- package/lib/molecule/draggable-list/index.js.map +1 -1
- package/lib/molecule/hero/index.d.ts +0 -2
- package/lib/molecule/hero/index.d.ts.map +1 -1
- package/lib/molecule/hero/index.js +4 -14
- package/lib/molecule/hero/index.js.map +1 -1
- package/lib/molecule/hero/style.css +0 -42
- package/lib/organism/list-item/index.d.ts +1 -0
- package/lib/organism/list-item/index.js +2 -1
- package/lib/organism/list-item/index.js.map +1 -1
- package/lib/organism/list-item/style.css +6 -4
- package/lib/organism/list-items/index.d.ts +4 -1
- package/lib/organism/list-items/index.d.ts.map +1 -1
- package/lib/organism/list-items/index.js +31 -13
- package/lib/organism/list-items/index.js.map +1 -1
- package/lib/template/back-office/brand-update/index.d.ts +2 -0
- package/package.json +2 -2
- package/es/molecule/expandable-item/index.d.ts +0 -26
- package/es/molecule/expandable-item/index.d.ts.map +0 -1
- package/es/molecule/expandable-item/index.js +0 -51
- package/es/molecule/expandable-item/index.js.map +0 -1
- package/es/molecule/expandable-item/style.css +0 -129
- package/es/molecule/expandable-list/index.d.ts +0 -16
- package/es/molecule/expandable-list/index.d.ts.map +0 -1
- package/es/molecule/expandable-list/index.js +0 -32
- package/es/molecule/expandable-list/index.js.map +0 -1
- package/es/molecule/expandable-list/style.css +0 -21
- package/es/molecule/menu-links/index.d.ts +0 -18
- package/es/molecule/menu-links/index.d.ts.map +0 -1
- package/es/molecule/menu-links/index.js +0 -43
- package/es/molecule/menu-links/index.js.map +0 -1
- package/es/molecule/menu-links/style.css +0 -87
- package/es/molecule/privacy-policy-contact/index.d.ts +0 -18
- package/es/molecule/privacy-policy-contact/index.d.ts.map +0 -1
- package/es/molecule/privacy-policy-contact/index.js +0 -31
- package/es/molecule/privacy-policy-contact/index.js.map +0 -1
- package/es/molecule/privacy-policy-contact/style.css +0 -37
- package/es/molecule/privacy-policy-download/index.d.ts +0 -30
- package/es/molecule/privacy-policy-download/index.d.ts.map +0 -1
- package/es/molecule/privacy-policy-download/index.js +0 -31
- package/es/molecule/privacy-policy-download/index.js.map +0 -1
- package/es/molecule/privacy-policy-download/style.css +0 -65
- package/es/template/common/privacy-policy-page/index.d.ts +0 -59
- package/es/template/common/privacy-policy-page/index.d.ts.map +0 -1
- package/es/template/common/privacy-policy-page/index.js +0 -47
- package/es/template/common/privacy-policy-page/index.js.map +0 -1
- package/es/template/common/privacy-policy-page/style.css +0 -78
- package/lib/molecule/expandable-item/index.d.ts +0 -26
- package/lib/molecule/expandable-item/index.d.ts.map +0 -1
- package/lib/molecule/expandable-item/index.js +0 -66
- package/lib/molecule/expandable-item/index.js.map +0 -1
- package/lib/molecule/expandable-item/style.css +0 -129
- package/lib/molecule/expandable-list/index.d.ts +0 -16
- package/lib/molecule/expandable-list/index.d.ts.map +0 -1
- package/lib/molecule/expandable-list/index.js +0 -46
- package/lib/molecule/expandable-list/index.js.map +0 -1
- package/lib/molecule/expandable-list/style.css +0 -21
- package/lib/molecule/menu-links/index.d.ts +0 -18
- package/lib/molecule/menu-links/index.d.ts.map +0 -1
- package/lib/molecule/menu-links/index.js +0 -54
- package/lib/molecule/menu-links/index.js.map +0 -1
- package/lib/molecule/menu-links/style.css +0 -87
- package/lib/molecule/privacy-policy-contact/index.d.ts +0 -18
- package/lib/molecule/privacy-policy-contact/index.d.ts.map +0 -1
- package/lib/molecule/privacy-policy-contact/index.js +0 -44
- package/lib/molecule/privacy-policy-contact/index.js.map +0 -1
- package/lib/molecule/privacy-policy-contact/style.css +0 -37
- package/lib/molecule/privacy-policy-download/index.d.ts +0 -30
- package/lib/molecule/privacy-policy-download/index.d.ts.map +0 -1
- package/lib/molecule/privacy-policy-download/index.js +0 -42
- package/lib/molecule/privacy-policy-download/index.js.map +0 -1
- package/lib/molecule/privacy-policy-download/style.css +0 -65
- package/lib/template/common/privacy-policy-page/index.d.ts +0 -59
- package/lib/template/common/privacy-policy-page/index.d.ts.map +0 -1
- package/lib/template/common/privacy-policy-page/index.js +0 -61
- package/lib/template/common/privacy-policy-page/index.js.map +0 -1
- package/lib/template/common/privacy-policy-page/style.css +0 -78
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
font-family: Gilroy;
|
|
34
34
|
font-size: 16px;
|
|
35
35
|
font-weight: bold;
|
|
36
|
-
overflow:hidden;
|
|
37
|
-
white-space:nowrap;
|
|
38
|
-
display:inline-block;
|
|
39
|
-
text-overflow:ellipsis;
|
|
36
|
+
overflow: hidden;
|
|
37
|
+
white-space: nowrap;
|
|
38
|
+
display: inline-block;
|
|
39
|
+
text-overflow: ellipsis;
|
|
40
40
|
width: 100%;
|
|
41
41
|
}
|
|
42
42
|
|
|
@@ -59,5 +59,3 @@
|
|
|
59
59
|
min-height: 56px;
|
|
60
60
|
min-width: 56px;
|
|
61
61
|
}
|
|
62
|
-
|
|
63
|
-
|
|
@@ -13,15 +13,18 @@
|
|
|
13
13
|
background: transparent;
|
|
14
14
|
margin: 8px 0;
|
|
15
15
|
border-radius: 7px;
|
|
16
|
-
transform:translate(0,0);
|
|
16
|
+
transform: translate(0, 0);
|
|
17
17
|
z-index: 0;
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
|
|
20
|
+
.draggable:hover {
|
|
20
21
|
background: rgba(0, 0, 0, 0.3);
|
|
21
22
|
}
|
|
22
|
-
|
|
23
|
+
|
|
24
|
+
.draggable:active {
|
|
23
25
|
background: transparent;
|
|
24
26
|
}
|
|
27
|
+
|
|
25
28
|
.draggable:before {
|
|
26
29
|
content: '.';
|
|
27
30
|
position: absolute;
|
|
@@ -32,9 +35,10 @@
|
|
|
32
35
|
font-size: 25px;
|
|
33
36
|
color: medium;
|
|
34
37
|
pointer-events: none;
|
|
35
|
-
text-shadow: 0 0 medium,
|
|
36
|
-
|
|
38
|
+
text-shadow: 0 0 medium, 0 5px medium, 0 10px medium, 0 15px medium,
|
|
39
|
+
5px 0 medium, 5px 5px medium, 5px 10px medium, 5px 15px medium;
|
|
37
40
|
}
|
|
41
|
+
|
|
38
42
|
.dragging {
|
|
39
43
|
background: rgba(0, 0, 0, 0.1);
|
|
40
44
|
}
|
|
@@ -6,7 +6,7 @@ declare function DraggableList({ items, onDrop, itemType }: {
|
|
|
6
6
|
}): JSX.Element;
|
|
7
7
|
declare namespace DraggableList {
|
|
8
8
|
namespace propTypes {
|
|
9
|
-
const items: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
9
|
+
const items: PropTypes.Requireable<(NonNullable<PropTypes.InferProps<{
|
|
10
10
|
title: PropTypes.Validator<string>;
|
|
11
11
|
onUp: PropTypes.Requireable<(...args: any[]) => any>;
|
|
12
12
|
onDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -43,7 +43,55 @@ declare namespace DraggableList {
|
|
|
43
43
|
}> | null | undefined)[]>;
|
|
44
44
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
45
45
|
}>>;
|
|
46
|
-
}> |
|
|
46
|
+
}> | PropTypes.InferProps<{
|
|
47
|
+
'aria-label': PropTypes.Requireable<PropTypes.InferProps<{
|
|
48
|
+
title: PropTypes.Requireable<string>;
|
|
49
|
+
author: PropTypes.Requireable<string>;
|
|
50
|
+
modules: PropTypes.Requireable<string>;
|
|
51
|
+
position: PropTypes.Requireable<string>;
|
|
52
|
+
}>>;
|
|
53
|
+
image: PropTypes.Requireable<string>;
|
|
54
|
+
badgeList: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
55
|
+
category: PropTypes.Requireable<string>;
|
|
56
|
+
label: PropTypes.Requireable<string>;
|
|
57
|
+
}> | null | undefined)[]>;
|
|
58
|
+
title: PropTypes.Requireable<string>;
|
|
59
|
+
author: PropTypes.Requireable<string>;
|
|
60
|
+
position: PropTypes.Requireable<number>;
|
|
61
|
+
id: PropTypes.Requireable<string>;
|
|
62
|
+
}> | PropTypes.InferProps<{
|
|
63
|
+
bulletPointMenuButton: PropTypes.Requireable<PropTypes.InferProps<{
|
|
64
|
+
buttonAriaLabel: PropTypes.Requireable<string>;
|
|
65
|
+
menuAriaLabel: PropTypes.Requireable<string>;
|
|
66
|
+
buttons: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
67
|
+
'data-name': PropTypes.Requireable<string>;
|
|
68
|
+
label: PropTypes.Requireable<string>;
|
|
69
|
+
type: PropTypes.Requireable<string>;
|
|
70
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
71
|
+
}> | null | undefined)[]>;
|
|
72
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
73
|
+
}>>;
|
|
74
|
+
buttonLink: PropTypes.Requireable<PropTypes.InferProps<{
|
|
75
|
+
type: PropTypes.Requireable<string>;
|
|
76
|
+
label: PropTypes.Requireable<string>;
|
|
77
|
+
ariaLabel: PropTypes.Requireable<string>;
|
|
78
|
+
dataName: PropTypes.Requireable<string>;
|
|
79
|
+
icon: PropTypes.Requireable<PropTypes.InferProps<{
|
|
80
|
+
position: PropTypes.Requireable<string>;
|
|
81
|
+
type: PropTypes.Requireable<string>;
|
|
82
|
+
}>>;
|
|
83
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
84
|
+
}>>;
|
|
85
|
+
tags: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
86
|
+
label: PropTypes.Requireable<string>;
|
|
87
|
+
type: PropTypes.Requireable<string>;
|
|
88
|
+
}> | null | undefined)[]>;
|
|
89
|
+
title: PropTypes.Validator<string>;
|
|
90
|
+
order: PropTypes.Requireable<number>;
|
|
91
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
92
|
+
contentType: PropTypes.Requireable<string>;
|
|
93
|
+
id: PropTypes.Requireable<string>;
|
|
94
|
+
}> | null | undefined> | null | undefined)[]>;
|
|
47
95
|
const onDrop: PropTypes.Requireable<(...args: any[]) => any>;
|
|
48
96
|
const itemType: PropTypes.Requireable<string>;
|
|
49
97
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/draggable-list/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/draggable-list/index.js"],"names":[],"mappings":";AAaA;;;;gBAmDC"}
|
|
@@ -5,9 +5,11 @@ import PropTypes from 'prop-types';
|
|
|
5
5
|
import Draggable from '../draggable';
|
|
6
6
|
import SetupSection from '../setup-section';
|
|
7
7
|
import CourseSection from '../course-section';
|
|
8
|
+
import ListItem from '../../organism/list-item';
|
|
8
9
|
const ITEMS = {
|
|
9
10
|
'setup-section': SetupSection,
|
|
10
|
-
'course-section': CourseSection
|
|
11
|
+
'course-section': CourseSection,
|
|
12
|
+
'list-item': ListItem
|
|
11
13
|
};
|
|
12
14
|
|
|
13
15
|
const DraggableList = ({
|
|
@@ -48,7 +50,7 @@ const DraggableList = ({
|
|
|
48
50
|
};
|
|
49
51
|
|
|
50
52
|
DraggableList.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
51
|
-
items: PropTypes.arrayOf(PropTypes.shape(SetupSection.propTypes)),
|
|
53
|
+
items: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.shape(SetupSection.propTypes), PropTypes.shape(CourseSection.propTypes), PropTypes.shape(ListItem.propTypes)])),
|
|
52
54
|
onDrop: PropTypes.func,
|
|
53
55
|
itemType: PropTypes.string
|
|
54
56
|
} : {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","useState","useCallback","PropTypes","Draggable","SetupSection","CourseSection","ITEMS","DraggableList","items","onDrop","itemType","dragTo","setDragTo","dragFrom","setDragFrom","dragStartHandler","id","dragOverHandler","dragLeaveHandler","dropHandler","Item","itemsView","map","item","propTypes","arrayOf","shape","func","string"],"sources":["../../../src/molecule/draggable-list/index.js"],"sourcesContent":["import React, {useState, useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport Draggable from '../draggable';\nimport SetupSection from '../setup-section';\nimport CourseSection from '../course-section';\n\nconst ITEMS = {'setup-section': SetupSection
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useState","useCallback","PropTypes","Draggable","SetupSection","CourseSection","ListItem","ITEMS","DraggableList","items","onDrop","itemType","dragTo","setDragTo","dragFrom","setDragFrom","dragStartHandler","id","dragOverHandler","dragLeaveHandler","dropHandler","Item","itemsView","map","item","propTypes","arrayOf","oneOfType","shape","func","string"],"sources":["../../../src/molecule/draggable-list/index.js"],"sourcesContent":["import React, {useState, useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport Draggable from '../draggable';\nimport SetupSection from '../setup-section';\nimport CourseSection from '../course-section';\nimport ListItem from '../../organism/list-item';\n\nconst ITEMS = {\n 'setup-section': SetupSection,\n 'course-section': CourseSection,\n 'list-item': ListItem\n};\n\nconst DraggableList = ({items, onDrop, itemType}) => {\n const [dragTo, setDragTo] = useState(null);\n const [dragFrom, setDragFrom] = useState(null);\n\n const dragStartHandler = useCallback(\n id => {\n setDragFrom(id);\n },\n [setDragFrom]\n );\n\n const dragOverHandler = useCallback(\n id => {\n if (dragTo === id) return;\n setDragTo(id);\n },\n [dragTo, setDragTo]\n );\n\n const dragLeaveHandler = useCallback(\n id => {\n setDragTo(null);\n },\n [setDragTo]\n );\n\n const dropHandler = useCallback(\n id => {\n if (onDrop && dragFrom) onDrop(dragFrom, id);\n\n setDragTo(null);\n setDragFrom(null);\n },\n [onDrop, setDragTo, setDragFrom, dragFrom]\n );\n\n const Item = ITEMS[itemType];\n const itemsView = items.map(item => (\n <Draggable\n key={item.id}\n id={item.id}\n dragging={dragTo === item.id}\n onDragStart={dragStartHandler}\n onDragOver={dragOverHandler}\n onDragLeave={dragLeaveHandler}\n onDrop={dropHandler}\n >\n <Item {...item} key={item.id} />\n </Draggable>\n ));\n return <div>{itemsView}</div>;\n};\n\nDraggableList.propTypes = {\n items: PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.shape(SetupSection.propTypes),\n PropTypes.shape(CourseSection.propTypes),\n PropTypes.shape(ListItem.propTypes)\n ])\n ),\n onDrop: PropTypes.func,\n itemType: PropTypes.string\n};\n\nexport default DraggableList;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,QAAf,EAAyBC,WAAzB,QAA2C,OAA3C;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,SAAP,MAAsB,cAAtB;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AACA,OAAOC,aAAP,MAA0B,mBAA1B;AACA,OAAOC,QAAP,MAAqB,0BAArB;AAEA,MAAMC,KAAK,GAAG;EACZ,iBAAiBH,YADL;EAEZ,kBAAkBC,aAFN;EAGZ,aAAaC;AAHD,CAAd;;AAMA,MAAME,aAAa,GAAG,CAAC;EAACC,KAAD;EAAQC,MAAR;EA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E,MAAM,EAAEC;EAPV,gBASE,oBAAC,IAAD,eAAUI,IAAV;IAAgB,GAAG,EAAEA,IAAI,CAACP;EAA1B,GATF,CADgB,CAAlB;EAaA,oBAAO,iCAAMK,SAAN,CAAP;AACD,CAnDD;;AAqDAd,aAAa,CAACiB,SAAd,2CAA0B;EACxBhB,KAAK,EAAEP,SAAS,CAACwB,OAAV,CACLxB,SAAS,CAACyB,SAAV,CAAoB,CAClBzB,SAAS,CAAC0B,KAAV,CAAgBxB,YAAY,CAACqB,SAA7B,CADkB,EAElBvB,SAAS,CAAC0B,KAAV,CAAgBvB,aAAa,CAACoB,SAA9B,CAFkB,EAGlBvB,SAAS,CAAC0B,KAAV,CAAgBtB,QAAQ,CAACmB,SAAzB,CAHkB,CAApB,CADK,CADiB;EAQxBf,MAAM,EAAER,SAAS,CAAC2B,IARM;EASxBlB,QAAQ,EAAET,SAAS,CAAC4B;AATI,CAA1B;AAYA,eAAetB,aAAf"}
|
|
@@ -26,8 +26,6 @@ declare namespace Hero {
|
|
|
26
26
|
}
|
|
27
27
|
namespace propTypes {
|
|
28
28
|
const image: PropTypes.Requireable<string>;
|
|
29
|
-
const mode: PropTypes.Requireable<string>;
|
|
30
|
-
const description: PropTypes.Requireable<string>;
|
|
31
29
|
const title: PropTypes.Requireable<string>;
|
|
32
30
|
const author: PropTypes.Requireable<string>;
|
|
33
31
|
const progress: PropTypes.Requireable<number>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/hero/index.js"],"names":[],"mappings":";AASA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/hero/index.js"],"names":[],"mappings":";AASA,6DAgCC"}
|
|
@@ -17,9 +17,7 @@ const Hero = (props, context) => {
|
|
|
17
17
|
author,
|
|
18
18
|
progress,
|
|
19
19
|
onClick,
|
|
20
|
-
submitValue
|
|
21
|
-
description,
|
|
22
|
-
mode = MODES.HERO
|
|
20
|
+
submitValue
|
|
23
21
|
} = props;
|
|
24
22
|
|
|
25
23
|
const primaryColor = _get('common.primary', skin);
|
|
@@ -37,18 +35,12 @@ const Hero = (props, context) => {
|
|
|
37
35
|
backgroundColor: primaryColor,
|
|
38
36
|
backgroundImage: image ? `url('${image}')` : 'none'
|
|
39
37
|
}
|
|
40
|
-
})),
|
|
38
|
+
})), /*#__PURE__*/React.createElement(CardContentInfo, {
|
|
41
39
|
mode: MODES.HERO,
|
|
42
40
|
author: author,
|
|
43
41
|
progress: progress,
|
|
44
42
|
title: title
|
|
45
|
-
})
|
|
46
|
-
className: style.infoWrapper
|
|
47
|
-
}, /*#__PURE__*/React.createElement("h1", {
|
|
48
|
-
className: style.title
|
|
49
|
-
}, title), /*#__PURE__*/React.createElement("p", {
|
|
50
|
-
className: style.description
|
|
51
|
-
}, description)), mode === MODES.HERO ? /*#__PURE__*/React.createElement("div", {
|
|
43
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
52
44
|
className: style.heroButtonWrapper
|
|
53
45
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
54
46
|
type: "link",
|
|
@@ -59,7 +51,7 @@ const Hero = (props, context) => {
|
|
|
59
51
|
style: {
|
|
60
52
|
backgroundColor: primaryColor
|
|
61
53
|
}
|
|
62
|
-
}))
|
|
54
|
+
})));
|
|
63
55
|
};
|
|
64
56
|
|
|
65
57
|
Hero.contextTypes = {
|
|
@@ -67,8 +59,6 @@ Hero.contextTypes = {
|
|
|
67
59
|
};
|
|
68
60
|
Hero.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
69
61
|
image: PropTypes.string,
|
|
70
|
-
mode: PropTypes.string,
|
|
71
|
-
description: PropTypes.string,
|
|
72
62
|
title: CardContentInfo.propTypes.title,
|
|
73
63
|
author: CardContentInfo.propTypes.author,
|
|
74
64
|
progress: CardContentInfo.propTypes.progress,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","PropTypes","classnames","Provider","Button","CardContentInfo","MODES","style","Hero","props","context","skin","image","title","author","progress","onClick","submitValue","
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","PropTypes","classnames","Provider","Button","CardContentInfo","MODES","style","Hero","props","context","skin","image","title","author","progress","onClick","submitValue","primaryColor","cardStyle","hero","lazy","imageWrapper","backgroundColor","backgroundImage","HERO","heroButtonWrapper","heroButton","contextTypes","childContextTypes","propTypes","string"],"sources":["../../../src/molecule/hero/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {get} from 'lodash/fp';\nimport Provider from '../../atom/provider';\nimport Button from '../../atom/button';\nimport CardContentInfo, {MODES} from '../card-content';\nimport style from './style.css';\n\nconst Hero = (props, context) => {\n const {skin} = context;\n const {image, title, author, progress, onClick, submitValue} = props;\n\n const primaryColor = get('common.primary', skin);\n const cardStyle = classnames(style.hero, title ? null : style.lazy);\n\n return (\n <div className={cardStyle} data-name=\"hero\">\n <div className={style.imageWrapper}>\n <div\n data-name=\"cover\"\n className={style.image}\n style={{\n backgroundColor: primaryColor,\n backgroundImage: image ? `url('${image}')` : 'none'\n }}\n />\n </div>\n <CardContentInfo mode={MODES.HERO} author={author} progress={progress} title={title} />\n <div className={style.heroButtonWrapper}>\n <Button\n type=\"link\"\n data-name=\"hero-button\"\n onClick={onClick}\n submitValue={submitValue}\n className={style.heroButton}\n style={{backgroundColor: primaryColor}}\n />\n </div>\n </div>\n );\n};\n\nHero.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nHero.propTypes = {\n image: PropTypes.string,\n title: CardContentInfo.propTypes.title,\n author: CardContentInfo.propTypes.author,\n progress: CardContentInfo.propTypes.progress,\n onClick: Button.propTypes.onClick,\n submitValue: Button.propTypes.submitValue\n};\n\nexport default Hero;\n"],"mappings":";AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AAEA,OA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yBD,CAhCD;;AAkCAV,IAAI,CAACoB,YAAL,GAAoB;EAClBjB,IAAI,EAAER,QAAQ,CAAC0B,iBAAT,CAA2BlB;AADf,CAApB;AAIAH,IAAI,CAACsB,SAAL,2CAAiB;EACflB,KAAK,EAAEX,SAAS,CAAC8B,MADF;EAEflB,KAAK,EAAER,eAAe,CAACyB,SAAhB,CAA0BjB,KAFlB;EAGfC,MAAM,EAAET,eAAe,CAACyB,SAAhB,CAA0BhB,MAHnB;EAIfC,QAAQ,EAAEV,eAAe,CAACyB,SAAhB,CAA0Bf,QAJrB;EAKfC,OAAO,EAAEZ,MAAM,CAAC0B,SAAP,CAAiBd,OALX;EAMfC,WAAW,EAAEb,MAAM,CAAC0B,SAAP,CAAiBb;AANf,CAAjB;AASA,eAAeT,IAAf"}
|
|
@@ -156,45 +156,3 @@
|
|
|
156
156
|
opacity: 0;
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
|
-
|
|
160
|
-
.infoWrapper {
|
|
161
|
-
display: flex;
|
|
162
|
-
flex-direction: column;
|
|
163
|
-
position: relative;
|
|
164
|
-
justify-content: center;
|
|
165
|
-
padding: 0 40px;
|
|
166
|
-
width: 100%;
|
|
167
|
-
box-sizing: border-box;
|
|
168
|
-
color: white;
|
|
169
|
-
align-self: center;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
.title {
|
|
173
|
-
font-family: Gilroy;
|
|
174
|
-
font-size: 40px;
|
|
175
|
-
font-weight: 600;
|
|
176
|
-
line-height: 48px;
|
|
177
|
-
letter-spacing: 0px;
|
|
178
|
-
text-align: center;
|
|
179
|
-
overflow: hidden;
|
|
180
|
-
user-select: none;
|
|
181
|
-
margin: 0;
|
|
182
|
-
align-self: center;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
.description {
|
|
186
|
-
text-align: center;
|
|
187
|
-
margin-top: 12px;
|
|
188
|
-
font-size: 17px;
|
|
189
|
-
font-family: Gilroy;
|
|
190
|
-
font-size: 16px;
|
|
191
|
-
font-weight: 400;
|
|
192
|
-
line-height: 24px;
|
|
193
|
-
letter-spacing: 0px;
|
|
194
|
-
overflow: hidden;
|
|
195
|
-
user-select: none;
|
|
196
|
-
max-width: 650px;
|
|
197
|
-
padding: 0;
|
|
198
|
-
margin: 0;
|
|
199
|
-
align-self: center;
|
|
200
|
-
}
|
|
@@ -78,7 +78,8 @@ ListItem.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
78
78
|
title: PropTypes.string.isRequired,
|
|
79
79
|
order: PropTypes.number,
|
|
80
80
|
'aria-label': PropTypes.string,
|
|
81
|
-
contentType: PropTypes.string
|
|
81
|
+
contentType: PropTypes.string,
|
|
82
|
+
id: PropTypes.string
|
|
82
83
|
} : {};
|
|
83
84
|
export default ListItem;
|
|
84
85
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","PropTypes","Tag","ButtonLink","BulletPointMenuButton","style","ListItem","props","isPublished","bulletPointMenuButton","buttonLink","tags","title","order","ariaLabel","contentType","tagsView","convert","cap","tag","index","type","wrapper","orderWrapper","settings","edit","propTypes","shape","buttonAriaLabel","string","menuAriaLabel","buttons","arrayOf","label","onClick","func","dataName","icon","position","oneOf","isRequired","number"],"sources":["../../../src/organism/list-item/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {map} from 'lodash/fp';\nimport Tag from '../../atom/tag';\nimport ButtonLink from '../../atom/button-link';\nimport BulletPointMenuButton from '../../molecule/bullet-point-menu-button';\nimport style from './style.css';\n\nconst ListItem = props => {\n let isPublished = false;\n const {\n bulletPointMenuButton,\n buttonLink,\n tags,\n title,\n order,\n 'aria-label': ariaLabel,\n contentType\n } = props;\n const tagsView = map.convert({cap: false})((tag, index) => {\n isPublished = tag.type === 'published';\n return (\n <div key={index} className={style.tag}>\n <Tag {...tag} />\n </div>\n );\n })(tags);\n return (\n <div className={style.wrapper}>\n {isPublished && contentType === 'certification' ? (\n <div className={style.orderWrapper}>\n <div className={style.order} aria-label={ariaLabel}>\n {order + 1}\n </div>\n <div className={style.title} title={title}>\n {title}\n </div>\n </div>\n ) : (\n <div className={style.title} title={title}>\n {title}\n </div>\n )}\n <div className={style.settings}>\n {tagsView}\n <div className={style.edit}>\n <ButtonLink {...buttonLink} />\n </div>\n <BulletPointMenuButton {...bulletPointMenuButton} />\n </div>\n </div>\n );\n};\n\nListItem.propTypes = {\n bulletPointMenuButton: PropTypes.shape({\n buttonAriaLabel: PropTypes.string,\n menuAriaLabel: PropTypes.string,\n buttons: PropTypes.arrayOf(\n PropTypes.shape({\n 'data-name': PropTypes.string,\n label: PropTypes.string,\n type: PropTypes.string,\n onClick: PropTypes.func\n })\n ),\n onClick: PropTypes.func\n }),\n buttonLink: PropTypes.shape({\n type: PropTypes.string,\n label: PropTypes.string,\n ariaLabel: PropTypes.string,\n dataName: PropTypes.string,\n icon: PropTypes.shape({\n position: PropTypes.string,\n type: PropTypes.string\n }),\n onClick: PropTypes.func\n }),\n tags: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string,\n type: PropTypes.oneOf(['published', 'draft', 'archived', 'revised', 'default'])\n })\n ),\n title: PropTypes.string.isRequired,\n order: PropTypes.number,\n 'aria-label': PropTypes.string,\n contentType: PropTypes.string\n};\n\nexport default ListItem;\n"],"mappings":";AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,GAAP,MAAgB,gBAAhB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,qBAAP,MAAkC,yCAAlC;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,QAAQ,GAAGC,KAAK,IAAI;EACxB,IAAIC,WAAW,GAAG,KAAlB;EACA,MAAM;IACJC,qBADI;IAEJC,UAFI;IAGJC,IAHI;IAIJC,KAJI;IAKJC,KALI;IAMJ,cAAcC,SANV;IAOJC;EAPI,IAQFR,KARJ;;EASA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dI,KAAK,EAAEhC,SAAS,CAAC4B,MAFH;MAGdR,IAAI,EAAEpB,SAAS,CAAC4B,MAHF;MAIdK,OAAO,EAAEjC,SAAS,CAACkC;IAJL,CAAhB,CADO,CAH4B;IAWrCD,OAAO,EAAEjC,SAAS,CAACkC;EAXkB,CAAhB,CADJ;EAcnBzB,UAAU,EAAET,SAAS,CAAC0B,KAAV,CAAgB;IAC1BN,IAAI,EAAEpB,SAAS,CAAC4B,MADU;IAE1BI,KAAK,EAAEhC,SAAS,CAAC4B,MAFS;IAG1Bf,SAAS,EAAEb,SAAS,CAAC4B,MAHK;IAI1BO,QAAQ,EAAEnC,SAAS,CAAC4B,MAJM;IAK1BQ,IAAI,EAAEpC,SAAS,CAAC0B,KAAV,CAAgB;MACpBW,QAAQ,EAAErC,SAAS,CAAC4B,MADA;MAEpBR,IAAI,EAAEpB,SAAS,CAAC4B;IAFI,CAAhB,CALoB;IAS1BK,OAAO,EAAEjC,SAAS,CAACkC;EATO,CAAhB,CAdO;EAyBnBxB,IAAI,EAAEV,SAAS,CAAC+B,OAAV,CACJ/B,SAAS,CAAC0B,KAAV,CAAgB;IACdM,KAAK,EAAEhC,SAAS,CAAC4B,MADH;IAEdR,IAAI,EAAEpB,SAAS,CAACsC,KAAV,CAAgB,CAAC,WAAD,EAAc,OAAd,EAAuB,UAAvB,EAAmC,SAAnC,EAA8C,SAA9C,CAAhB;EAFQ,CAAhB,CADI,CAzBa;EA+BnB3B,KAAK,EAAEX,SAAS,CAAC4B,MAAV,CAAiBW,UA/BL;EAgCnB3B,KAAK,EAAEZ,SAAS,CAACwC,MAhCE;EAiCnB,cAAcxC,SAAS,CAAC4B,MAjCL;EAkCnBd,WAAW,EAAEd,SAAS,CAAC4B;
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","PropTypes","Tag","ButtonLink","BulletPointMenuButton","style","ListItem","props","isPublished","bulletPointMenuButton","buttonLink","tags","title","order","ariaLabel","contentType","tagsView","convert","cap","tag","index","type","wrapper","orderWrapper","settings","edit","propTypes","shape","buttonAriaLabel","string","menuAriaLabel","buttons","arrayOf","label","onClick","func","dataName","icon","position","oneOf","isRequired","number","id"],"sources":["../../../src/organism/list-item/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {map} from 'lodash/fp';\nimport Tag from '../../atom/tag';\nimport ButtonLink from '../../atom/button-link';\nimport BulletPointMenuButton from '../../molecule/bullet-point-menu-button';\nimport style from './style.css';\n\nconst ListItem = props => {\n let isPublished = false;\n const {\n bulletPointMenuButton,\n buttonLink,\n tags,\n title,\n order,\n 'aria-label': ariaLabel,\n contentType\n } = props;\n const tagsView = map.convert({cap: false})((tag, index) => {\n isPublished = tag.type === 'published';\n return (\n <div key={index} className={style.tag}>\n <Tag {...tag} />\n </div>\n );\n })(tags);\n return (\n <div className={style.wrapper}>\n {isPublished && contentType === 'certification' ? (\n <div className={style.orderWrapper}>\n <div className={style.order} aria-label={ariaLabel}>\n {order + 1}\n </div>\n <div className={style.title} title={title}>\n {title}\n </div>\n </div>\n ) : (\n <div className={style.title} title={title}>\n {title}\n </div>\n )}\n <div className={style.settings}>\n {tagsView}\n <div className={style.edit}>\n <ButtonLink {...buttonLink} />\n </div>\n <BulletPointMenuButton {...bulletPointMenuButton} />\n </div>\n </div>\n );\n};\n\nListItem.propTypes = {\n bulletPointMenuButton: PropTypes.shape({\n buttonAriaLabel: PropTypes.string,\n menuAriaLabel: PropTypes.string,\n buttons: PropTypes.arrayOf(\n PropTypes.shape({\n 'data-name': PropTypes.string,\n label: PropTypes.string,\n type: PropTypes.string,\n onClick: PropTypes.func\n })\n ),\n onClick: PropTypes.func\n }),\n buttonLink: PropTypes.shape({\n type: PropTypes.string,\n label: PropTypes.string,\n ariaLabel: PropTypes.string,\n dataName: PropTypes.string,\n icon: PropTypes.shape({\n position: PropTypes.string,\n type: PropTypes.string\n }),\n onClick: PropTypes.func\n }),\n tags: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string,\n type: PropTypes.oneOf(['published', 'draft', 'archived', 'revised', 'default'])\n })\n ),\n title: PropTypes.string.isRequired,\n order: PropTypes.number,\n 'aria-label': PropTypes.string,\n contentType: PropTypes.string,\n id: PropTypes.string\n};\n\nexport default ListItem;\n"],"mappings":";AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,GAAP,MAAgB,gBAAhB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,qBAAP,MAAkC,yCAAlC;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,QAAQ,GAAGC,KAAK,IAAI;EACxB,IAAIC,WAAW,GAAG,KAAlB;EACA,MAAM;IACJC,qBADI;IAEJC,UAFI;IAGJC,IAHI;IAIJC,KAJI;IAKJC,KALI;IAMJ,cAAcC,SANV;IAOJC;EAPI,IAQFR,KARJ;;EASA,MAAMS,QAAQ,GAAG,KAAIC,OAAJ,CAAY;IAACC,GAAG,EAAE;EAAN,CAAZ,EAA0B,CAACC,GAAD,EAAMC,KAAN,KAAgB;IACzDZ,WAAW,GAAGW,GAAG,CAACE,IAAJ,KAAa,WAA3B;IACA,oBACE;MAAK,GAAG,EAAED,KAAV;MAAiB,SAAS,EAAEf,KAAK,CAACc;IAAlC,gBACE,oBAAC,GAAD,EAASA,GAAT,CADF,CADF;EAKD,CAPgB,EAOdR,IAPc,CAAjB;;EAQA,oBACE;IAAK,SAAS,EAAEN,KAAK,CAACiB;EAAtB,GACGd,WAAW,IAAIO,WAAW,KAAK,eAA/B,gBACC;IAAK,SAAS,EAAEV,KAAK,CAACkB;EAAtB,gBACE;IAAK,SAAS,EAAElB,KAAK,CAACQ,KAAtB;IAA6B,cAAYC;EAAzC,GACGD,KAAK,GAAG,CADX,CADF,eAIE;IAAK,SAAS,EAAER,KAAK,CAACO,KAAtB;IAA6B,KAAK,EAAEA;EAApC,GACGA,KADH,CAJF,CADD,gBAUC;IAAK,SAAS,EAAEP,K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CACJ/B,SAAS,CAAC0B,KAAV,CAAgB;IACdM,KAAK,EAAEhC,SAAS,CAAC4B,MADH;IAEdR,IAAI,EAAEpB,SAAS,CAACsC,KAAV,CAAgB,CAAC,WAAD,EAAc,OAAd,EAAuB,UAAvB,EAAmC,SAAnC,EAA8C,SAA9C,CAAhB;EAFQ,CAAhB,CADI,CAzBa;EA+BnB3B,KAAK,EAAEX,SAAS,CAAC4B,MAAV,CAAiBW,UA/BL;EAgCnB3B,KAAK,EAAEZ,SAAS,CAACwC,MAhCE;EAiCnB,cAAcxC,SAAS,CAAC4B,MAjCL;EAkCnBd,WAAW,EAAEd,SAAS,CAAC4B,MAlCJ;EAmCnBa,EAAE,EAAEzC,SAAS,CAAC4B;AAnCK,CAArB;AAsCA,eAAevB,QAAf"}
|
|
@@ -33,17 +33,17 @@
|
|
|
33
33
|
text-align: left;
|
|
34
34
|
text-overflow: ellipsis;
|
|
35
35
|
white-space: nowrap;
|
|
36
|
-
|
|
36
|
+
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
.settings {
|
|
40
40
|
align-items: center;
|
|
41
41
|
display: flex;
|
|
42
|
-
height: 100%;
|
|
42
|
+
height: 100%;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
.tag {
|
|
46
|
-
margin: 0 16px 0 0;
|
|
46
|
+
margin: 0 16px 0 0;
|
|
47
47
|
text-overflow: ellipsis;
|
|
48
48
|
white-space: nowrap;
|
|
49
49
|
}
|
|
@@ -64,8 +64,10 @@
|
|
|
64
64
|
color: cm_grey_400;
|
|
65
65
|
margin: 0 16px 0 0;
|
|
66
66
|
}
|
|
67
|
+
|
|
67
68
|
.orderWrapper {
|
|
68
69
|
align-items: center;
|
|
69
70
|
display: flex;
|
|
70
71
|
width: 100%;
|
|
71
|
-
|
|
72
|
+
margin-left: 24px;
|
|
73
|
+
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
export default ListItems;
|
|
2
|
-
declare function ListItems({ title, buttonLink, items, "aria-label": ariaLabel, contentType }: {
|
|
2
|
+
declare function ListItems({ title, buttonLink, items, "aria-label": ariaLabel, contentType, onDrop }: {
|
|
3
3
|
title: any;
|
|
4
4
|
buttonLink: any;
|
|
5
5
|
items: any;
|
|
6
6
|
"aria-label": any;
|
|
7
7
|
contentType: any;
|
|
8
|
+
onDrop: any;
|
|
8
9
|
}): JSX.Element;
|
|
9
10
|
declare namespace ListItems {
|
|
10
11
|
const propTypes: {
|
|
@@ -60,9 +61,11 @@ declare namespace ListItems {
|
|
|
60
61
|
order: PropTypes.Requireable<number>;
|
|
61
62
|
'aria-label': PropTypes.Requireable<string>;
|
|
62
63
|
contentType: PropTypes.Requireable<string>;
|
|
64
|
+
id: PropTypes.Requireable<string>;
|
|
63
65
|
}> | null | undefined)[]>;
|
|
64
66
|
title: PropTypes.Requireable<string>;
|
|
65
67
|
contentType: PropTypes.Requireable<string>;
|
|
68
|
+
onDrop: PropTypes.Requireable<(...args: any[]) => any>;
|
|
66
69
|
};
|
|
67
70
|
}
|
|
68
71
|
import PropTypes from "prop-types";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/list-items/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/list-items/index.js"],"names":[],"mappings":";AA4BA;;;;;;;gBAcC"}
|
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
2
|
|
|
3
3
|
import React from 'react';
|
|
4
|
+
import findIndex from 'lodash/fp/findIndex';
|
|
4
5
|
import PropTypes from 'prop-types';
|
|
5
6
|
import ListItem from '../list-item';
|
|
7
|
+
import DraggableList from '../../molecule/draggable-list';
|
|
6
8
|
import Title from '../../atom/title';
|
|
7
9
|
import ButtonLink from '../../atom/button-link';
|
|
8
10
|
import style from './style.css';
|
|
9
11
|
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
items
|
|
14
|
-
'
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
const buildItemsView = (items, contentType, onDrop, ariaLabel) => {
|
|
13
|
+
const isPublished = findIndex({
|
|
14
|
+
type: 'published'
|
|
15
|
+
}, items[0]?.tags) !== -1;
|
|
16
|
+
if (isPublished && contentType === 'certification') return /*#__PURE__*/React.createElement(DraggableList, {
|
|
17
|
+
items: items,
|
|
18
|
+
itemType: "list-item",
|
|
19
|
+
onDrop: onDrop
|
|
20
|
+
});
|
|
17
21
|
const itemsView = items.map((item, index) => /*#__PURE__*/React.createElement("li", {
|
|
18
22
|
key: item.id,
|
|
19
23
|
className: style.item,
|
|
@@ -22,6 +26,21 @@ const ListItems = ({
|
|
|
22
26
|
order: index,
|
|
23
27
|
contentType: contentType
|
|
24
28
|
}))));
|
|
29
|
+
return /*#__PURE__*/React.createElement("ul", {
|
|
30
|
+
className: style.list,
|
|
31
|
+
"aria-label": ariaLabel,
|
|
32
|
+
"data-name": 'content-list'
|
|
33
|
+
}, itemsView);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const ListItems = ({
|
|
37
|
+
title,
|
|
38
|
+
buttonLink,
|
|
39
|
+
items,
|
|
40
|
+
'aria-label': ariaLabel,
|
|
41
|
+
contentType,
|
|
42
|
+
onDrop
|
|
43
|
+
}) => {
|
|
25
44
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
26
45
|
className: style.header
|
|
27
46
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -32,11 +51,7 @@ const ListItems = ({
|
|
|
32
51
|
"data-name": 'list-title'
|
|
33
52
|
})), /*#__PURE__*/React.createElement("div", {
|
|
34
53
|
className: style.buttonCreate
|
|
35
|
-
}, /*#__PURE__*/React.createElement(ButtonLink, buttonLink))),
|
|
36
|
-
className: style.list,
|
|
37
|
-
"aria-label": ariaLabel,
|
|
38
|
-
"data-name": 'content-list'
|
|
39
|
-
}, itemsView));
|
|
54
|
+
}, /*#__PURE__*/React.createElement(ButtonLink, buttonLink))), buildItemsView(items, contentType, onDrop, ariaLabel));
|
|
40
55
|
};
|
|
41
56
|
|
|
42
57
|
ListItems.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
@@ -44,7 +59,8 @@ ListItems.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
44
59
|
buttonLink: PropTypes.shape(ButtonLink.propTypes),
|
|
45
60
|
items: PropTypes.arrayOf(PropTypes.shape(ListItem.propTypes)),
|
|
46
61
|
title: PropTypes.string,
|
|
47
|
-
contentType: PropTypes.string
|
|
62
|
+
contentType: PropTypes.string,
|
|
63
|
+
onDrop: PropTypes.func
|
|
48
64
|
} : {};
|
|
49
65
|
export default ListItems;
|
|
50
66
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","PropTypes","ListItem","Title","ButtonLink","style","
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","findIndex","PropTypes","ListItem","DraggableList","Title","ButtonLink","style","buildItemsView","items","contentType","onDrop","ariaLabel","isPublished","type","tags","itemsView","map","item","index","id","list","ListItems","title","buttonLink","header","buttonCreate","propTypes","string","shape","arrayOf","func"],"sources":["../../../src/organism/list-items/index.js"],"sourcesContent":["import React from 'react';\nimport findIndex from 'lodash/fp/findIndex';\nimport PropTypes from 'prop-types';\nimport ListItem from '../list-item';\nimport DraggableList from '../../molecule/draggable-list';\nimport Title from '../../atom/title';\nimport ButtonLink from '../../atom/button-link';\nimport style from './style.css';\n\nconst buildItemsView = (items, contentType, onDrop, ariaLabel) => {\n const isPublished = findIndex({type: 'published'}, items[0]?.tags) !== -1;\n\n if (isPublished && contentType === 'certification')\n return <DraggableList items={items} itemType=\"list-item\" onDrop={onDrop} />;\n\n const itemsView = items.map((item, index) => (\n <li key={item.id} className={style.item} data-name={`content-${index}`}>\n <ListItem {...item} order={index} contentType={contentType} />\n </li>\n ));\n\n return (\n <ul className={style.list} aria-label={ariaLabel} data-name={'content-list'}>\n {itemsView}\n </ul>\n );\n};\n\nconst ListItems = ({title, buttonLink, items, 'aria-label': ariaLabel, contentType, onDrop}) => {\n return (\n <div>\n <div className={style.header}>\n <div className={style.title}>\n <Title title={title} type={'form-group'} data-name={'list-title'} />\n </div>\n <div className={style.buttonCreate}>\n <ButtonLink {...buttonLink} />\n </div>\n </div>\n {buildItemsView(items, contentType, onDrop, ariaLabel)}\n </div>\n );\n};\n\nListItems.propTypes = {\n 'aria-label': PropTypes.string,\n buttonLink: PropTypes.shape(ButtonLink.propTypes),\n items: PropTypes.arrayOf(PropTypes.shape(ListItem.propTypes)),\n title: PropTypes.string,\n contentType: PropTypes.string,\n onDrop: PropTypes.func\n};\n\nexport default ListItems;\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,qBAAtB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,QAAP,MAAqB,cAArB;AACA,OAAOC,aAAP,MAA0B,+BAA1B;AACA,OAAOC,KAAP,MAAkB,kBAAlB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,cAAc,GAAG,CAACC,KAAD,EAAQC,WAAR,EAAqBC,MAArB,EAA6BC,SAA7B,KAA2C;EAChE,MAAMC,WAAW,GAAGZ,SAAS,CAAC;IAACa,IAAI,EAAE;EAAP,CAAD,EAAsBL,KAAK,CAAC,CAAD,CAAL,EAAUM,IAAhC,CAAT,KAAmD,CAAC,CAAxE;EAEA,IAAIF,WAAW,IAAIH,WAAW,KAAK,eAAnC,EACE,oBAAO,oBAAC,aAAD;IAAe,KAAK,EAAED,KAAtB;IAA6B,QAAQ,EAAC,WA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CAACwB,SAAzB,CAAlB,CAHa;EAIpBJ,KAAK,EAAErB,SAAS,CAAC0B,MAJG;EAKpBlB,WAAW,EAAER,SAAS,CAAC0B,MALH;EAMpBjB,MAAM,EAAET,SAAS,CAAC6B;AANE,CAAtB;AASA,eAAeT,SAAf"}
|
|
@@ -1522,8 +1522,10 @@ declare namespace BrandUpdate {
|
|
|
1522
1522
|
order: PropTypes.Requireable<number>;
|
|
1523
1523
|
'aria-label': PropTypes.Requireable<string>;
|
|
1524
1524
|
contentType: PropTypes.Requireable<string>;
|
|
1525
|
+
id: PropTypes.Requireable<string>;
|
|
1525
1526
|
}> | null | undefined)[]>;
|
|
1526
1527
|
title: PropTypes.Requireable<string>;
|
|
1528
|
+
onDrop: PropTypes.Requireable<(...args: any[]) => any>;
|
|
1527
1529
|
}> | PropTypes.InferProps<{
|
|
1528
1530
|
key: PropTypes.Requireable<string>;
|
|
1529
1531
|
type: PropTypes.Requireable<string>;
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
font-family: Gilroy;
|
|
34
34
|
font-size: 16px;
|
|
35
35
|
font-weight: bold;
|
|
36
|
-
overflow:hidden;
|
|
37
|
-
white-space:nowrap;
|
|
38
|
-
display:inline-block;
|
|
39
|
-
text-overflow:ellipsis;
|
|
36
|
+
overflow: hidden;
|
|
37
|
+
white-space: nowrap;
|
|
38
|
+
display: inline-block;
|
|
39
|
+
text-overflow: ellipsis;
|
|
40
40
|
width: 100%;
|
|
41
41
|
}
|
|
42
42
|
|
|
@@ -59,5 +59,3 @@
|
|
|
59
59
|
min-height: 56px;
|
|
60
60
|
min-width: 56px;
|
|
61
61
|
}
|
|
62
|
-
|
|
63
|
-
|
|
@@ -13,15 +13,18 @@
|
|
|
13
13
|
background: transparent;
|
|
14
14
|
margin: 8px 0;
|
|
15
15
|
border-radius: 7px;
|
|
16
|
-
transform:translate(0,0);
|
|
16
|
+
transform: translate(0, 0);
|
|
17
17
|
z-index: 0;
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
|
|
20
|
+
.draggable:hover {
|
|
20
21
|
background: rgba(0, 0, 0, 0.3);
|
|
21
22
|
}
|
|
22
|
-
|
|
23
|
+
|
|
24
|
+
.draggable:active {
|
|
23
25
|
background: transparent;
|
|
24
26
|
}
|
|
27
|
+
|
|
25
28
|
.draggable:before {
|
|
26
29
|
content: '.';
|
|
27
30
|
position: absolute;
|
|
@@ -32,9 +35,10 @@
|
|
|
32
35
|
font-size: 25px;
|
|
33
36
|
color: medium;
|
|
34
37
|
pointer-events: none;
|
|
35
|
-
text-shadow: 0 0 medium,
|
|
36
|
-
|
|
38
|
+
text-shadow: 0 0 medium, 0 5px medium, 0 10px medium, 0 15px medium,
|
|
39
|
+
5px 0 medium, 5px 5px medium, 5px 10px medium, 5px 15px medium;
|
|
37
40
|
}
|
|
41
|
+
|
|
38
42
|
.dragging {
|
|
39
43
|
background: rgba(0, 0, 0, 0.1);
|
|
40
44
|
}
|