@coorpacademy/components 10.13.2 → 10.13.3-alpha.6
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/drag-and-drop/index.js +40 -43
- package/es/atom/drag-and-drop/index.js.map +1 -1
- package/es/atom/drag-and-drop/style.css +108 -75
- package/es/atom/drag-and-drop/test/fixtures/default.js +3 -3
- package/es/atom/drag-and-drop/test/fixtures/default.js.map +1 -1
- package/es/atom/drag-and-drop/test/fixtures/loading.js +2 -1
- package/es/atom/drag-and-drop/test/fixtures/loading.js.map +1 -1
- package/es/atom/drag-and-drop/test/fixtures/with-children.js +1 -0
- package/es/atom/drag-and-drop/test/fixtures/with-children.js.map +1 -1
- package/es/atom/drag-and-drop/test/fixtures/with-image.js +2 -1
- package/es/atom/drag-and-drop/test/fixtures/with-image.js.map +1 -1
- package/es/atom/drag-and-drop/test/fixtures/with-video.js +3 -1
- package/es/atom/drag-and-drop/test/fixtures/with-video.js.map +1 -1
- package/es/atom/drag-and-drop/test/fixtures/withLongDescription.js +9 -0
- package/es/atom/drag-and-drop/test/fixtures/withLongDescription.js.map +1 -0
- package/es/atom/drag-and-drop/test/fixtures.js +2 -0
- package/es/atom/drag-and-drop/test/fixtures.js.map +1 -1
- package/es/atom/loader/style.css +7 -3
- package/es/atom/review-header-step-item/test/fixtures.js +19 -0
- package/es/atom/review-header-step-item/test/fixtures.js.map +1 -0
- package/es/molecule/course-sections/index.js +4 -1
- package/es/molecule/course-sections/index.js.map +1 -1
- package/es/molecule/course-sections/style.css +14 -1
- package/es/molecule/review-header-steps/test/fixtures.js +23 -0
- package/es/molecule/review-header-steps/test/fixtures.js.map +1 -0
- package/es/organism/course-selection/index.js +2 -1
- package/es/organism/course-selection/index.js.map +1 -1
- package/es/organism/course-selection/style.css +12 -3
- package/es/organism/course-selection/test/fixtures/loading.js +9 -0
- package/es/organism/course-selection/test/fixtures/loading.js.map +1 -0
- package/es/organism/course-selection/test/fixtures.js +2 -0
- package/es/organism/course-selection/test/fixtures.js.map +1 -1
- package/es/organism/search-and-chips-results/index.js +2 -1
- package/es/organism/search-and-chips-results/index.js.map +1 -1
- package/es/organism/search-and-chips-results/style.css +10 -3
- package/es/organism/search-and-chips-results/test/fixtures/loading.js +9 -0
- package/es/organism/search-and-chips-results/test/fixtures/loading.js.map +1 -0
- package/es/organism/search-and-chips-results/test/fixtures.js +2 -0
- package/es/organism/search-and-chips-results/test/fixtures.js.map +1 -1
- package/es/template/back-office/brand-update/index.js +5 -2
- package/es/template/back-office/brand-update/index.js.map +1 -1
- package/es/template/back-office/brand-update/style.css +10 -1
- package/es/util/button-icons.js +3 -2
- package/es/util/button-icons.js.map +1 -1
- package/lib/atom/drag-and-drop/index.js +41 -40
- package/lib/atom/drag-and-drop/index.js.map +1 -1
- package/lib/atom/drag-and-drop/style.css +108 -75
- package/lib/atom/drag-and-drop/test/fixtures/default.js +3 -3
- package/lib/atom/drag-and-drop/test/fixtures/default.js.map +1 -1
- package/lib/atom/drag-and-drop/test/fixtures/loading.js +2 -1
- package/lib/atom/drag-and-drop/test/fixtures/loading.js.map +1 -1
- package/lib/atom/drag-and-drop/test/fixtures/with-children.js +1 -0
- package/lib/atom/drag-and-drop/test/fixtures/with-children.js.map +1 -1
- package/lib/atom/drag-and-drop/test/fixtures/with-image.js +2 -1
- package/lib/atom/drag-and-drop/test/fixtures/with-image.js.map +1 -1
- package/lib/atom/drag-and-drop/test/fixtures/with-video.js +3 -1
- package/lib/atom/drag-and-drop/test/fixtures/with-video.js.map +1 -1
- package/lib/atom/drag-and-drop/test/fixtures/withLongDescription.js +18 -0
- package/lib/atom/drag-and-drop/test/fixtures/withLongDescription.js.map +1 -0
- package/lib/atom/drag-and-drop/test/fixtures.js +3 -0
- package/lib/atom/drag-and-drop/test/fixtures.js.map +1 -1
- package/lib/atom/loader/style.css +7 -3
- package/lib/atom/review-header-step-item/test/fixtures.js +31 -0
- package/lib/atom/review-header-step-item/test/fixtures.js.map +1 -0
- package/lib/molecule/course-sections/index.js +4 -1
- package/lib/molecule/course-sections/index.js.map +1 -1
- package/lib/molecule/course-sections/style.css +14 -1
- package/lib/molecule/review-header-steps/test/fixtures.js +37 -0
- package/lib/molecule/review-header-steps/test/fixtures.js.map +1 -0
- package/lib/organism/course-selection/index.js +2 -1
- package/lib/organism/course-selection/index.js.map +1 -1
- package/lib/organism/course-selection/style.css +12 -3
- package/lib/organism/course-selection/test/fixtures/loading.js +19 -0
- package/lib/organism/course-selection/test/fixtures/loading.js.map +1 -0
- package/lib/organism/course-selection/test/fixtures.js +3 -0
- package/lib/organism/course-selection/test/fixtures.js.map +1 -1
- package/lib/organism/search-and-chips-results/index.js +2 -1
- package/lib/organism/search-and-chips-results/index.js.map +1 -1
- package/lib/organism/search-and-chips-results/style.css +10 -3
- package/lib/organism/search-and-chips-results/test/fixtures/loading.js +19 -0
- package/lib/organism/search-and-chips-results/test/fixtures/loading.js.map +1 -0
- package/lib/organism/search-and-chips-results/test/fixtures.js +3 -0
- package/lib/organism/search-and-chips-results/test/fixtures.js.map +1 -1
- package/lib/template/back-office/brand-update/index.js +5 -2
- package/lib/template/back-office/brand-update/index.js.map +1 -1
- package/lib/template/back-office/brand-update/style.css +10 -1
- package/lib/util/button-icons.js +2 -1
- package/lib/util/button-icons.js.map +1 -1
- package/package.json +2 -2
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.default = void 0;
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _isEmpty2 = _interopRequireDefault(require("lodash/fp/isEmpty"));
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _constant2 = _interopRequireDefault(require("lodash/fp/constant"));
|
|
9
9
|
|
|
10
10
|
var _uniqueId2 = _interopRequireDefault(require("lodash/fp/uniqueId"));
|
|
11
11
|
|
|
@@ -21,11 +21,9 @@ var _loader = _interopRequireDefault(require("../loader"));
|
|
|
21
21
|
|
|
22
22
|
var _style = _interopRequireDefault(require("./style.css"));
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
function _extends() { _extends = Object.assign || 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); }
|
|
24
|
+
var _buttonLink = _interopRequireDefault(require("../button-link"));
|
|
27
25
|
|
|
28
|
-
function
|
|
26
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
29
27
|
|
|
30
28
|
const constantNull = (0, _constant2.default)(null);
|
|
31
29
|
|
|
@@ -52,10 +50,6 @@ class DragAndDrop extends _react.default.Component {
|
|
|
52
50
|
}
|
|
53
51
|
|
|
54
52
|
render() {
|
|
55
|
-
const {
|
|
56
|
-
skin
|
|
57
|
-
} = this.context;
|
|
58
|
-
const brandColor = (0, _get2.default)('common.brand', skin);
|
|
59
53
|
const idBox = (0, _uniqueId2.default)('drop-box-');
|
|
60
54
|
const {
|
|
61
55
|
children = constantNull,
|
|
@@ -75,25 +69,36 @@ class DragAndDrop extends _react.default.Component {
|
|
|
75
69
|
|
|
76
70
|
if (previewContent && previewContent.type === 'image') {
|
|
77
71
|
previewView = /*#__PURE__*/_react.default.createElement("div", {
|
|
78
|
-
className: _style.default.
|
|
72
|
+
className: _style.default.preview
|
|
79
73
|
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
80
74
|
src: previewContent.src
|
|
81
75
|
}));
|
|
82
76
|
} else if (previewContent && previewContent.type === 'video') {
|
|
83
77
|
previewView = /*#__PURE__*/_react.default.createElement("div", {
|
|
84
|
-
className:
|
|
85
|
-
width: '300px'
|
|
86
|
-
})
|
|
78
|
+
className: _style.default.preview
|
|
87
79
|
}, /*#__PURE__*/_react.default.createElement("video", {
|
|
88
|
-
width: "100%",
|
|
89
80
|
controls: true,
|
|
90
81
|
src: previewContent.src,
|
|
91
82
|
type: "video/*"
|
|
92
83
|
}));
|
|
93
84
|
} else if (loading) {
|
|
94
85
|
previewView = /*#__PURE__*/_react.default.createElement("div", {
|
|
95
|
-
className: _style.default.
|
|
96
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
86
|
+
className: _style.default.loaderWrapper
|
|
87
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
88
|
+
className: _style.default.loadingCancel
|
|
89
|
+
}, /*#__PURE__*/_react.default.createElement(_novaIcons.NovaLineStatusClose, {
|
|
90
|
+
"data-name": "reset-content-icon",
|
|
91
|
+
height: 16,
|
|
92
|
+
width: 16,
|
|
93
|
+
className: _style.default.closeIcon,
|
|
94
|
+
onClick: onReset
|
|
95
|
+
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
96
|
+
className: _style.default.loader
|
|
97
|
+
}, /*#__PURE__*/_react.default.createElement(_loader.default, {
|
|
98
|
+
theme: "coorpmanager"
|
|
99
|
+
})), /*#__PURE__*/_react.default.createElement("span", {
|
|
100
|
+
className: _style.default.loaderText
|
|
101
|
+
}, "Uploading"));
|
|
97
102
|
} else {
|
|
98
103
|
previewView = /*#__PURE__*/_react.default.createElement("span", null, previewLabel);
|
|
99
104
|
}
|
|
@@ -109,38 +114,34 @@ class DragAndDrop extends _react.default.Component {
|
|
|
109
114
|
className: _style.default.closeIcon,
|
|
110
115
|
onClick: onReset
|
|
111
116
|
})) : null;
|
|
117
|
+
const buttonProps = {
|
|
118
|
+
label: uploadLabel,
|
|
119
|
+
'aria-label': 'aria button',
|
|
120
|
+
'data-name': 'default-button',
|
|
121
|
+
icon: {
|
|
122
|
+
position: 'left',
|
|
123
|
+
type: 'folders'
|
|
124
|
+
}
|
|
125
|
+
};
|
|
112
126
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
113
127
|
className: _style.default.wrapper,
|
|
114
128
|
"data-name": "drag-and-drop-wrapper"
|
|
115
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
116
|
-
className: _style.default.
|
|
117
|
-
},
|
|
118
|
-
className: modified ? _style.default.modified : _style.default.previewWrapper
|
|
119
|
-
}, previewView), /*#__PURE__*/_react.default.createElement("div", {
|
|
129
|
+
}, !(0, _isEmpty2.default)(previewContent) || modified || loading ? /*#__PURE__*/_react.default.createElement("div", {
|
|
130
|
+
className: _style.default.modificationsContainer
|
|
131
|
+
}, previewView) : /*#__PURE__*/_react.default.createElement("div", {
|
|
120
132
|
className: dragging ? _style.default.dragging : _style.default.inputWrapper,
|
|
121
133
|
id: idBox
|
|
122
|
-
}, /*#__PURE__*/_react.default.createElement(_novaIcons.
|
|
123
|
-
className: _style.default.
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
/*#__PURE__*/
|
|
129
|
-
// eslint-disable-next-line react/no-danger
|
|
130
|
-
_react.default.createElement("div", {
|
|
131
|
-
className: _style.default.description,
|
|
132
|
-
dangerouslySetInnerHTML: {
|
|
133
|
-
__html: description
|
|
134
|
-
}
|
|
135
|
-
}) : null);
|
|
134
|
+
}, /*#__PURE__*/_react.default.createElement(_novaIcons.NovaSolidFilesBasicFileUpload2, {
|
|
135
|
+
className: _style.default.icon
|
|
136
|
+
}), description ? /*#__PURE__*/_react.default.createElement("div", {
|
|
137
|
+
className: _style.default.description
|
|
138
|
+
}, description) : null, /*#__PURE__*/_react.default.createElement("div", {
|
|
139
|
+
className: _style.default.title
|
|
140
|
+
}, title), dragging ? null : /*#__PURE__*/_react.default.createElement(_buttonLink.default, buttonProps), children(this.handleDragStart, this.handleDragStop)), resetContent);
|
|
136
141
|
}
|
|
137
142
|
|
|
138
143
|
}
|
|
139
144
|
|
|
140
|
-
_defineProperty(DragAndDrop, "contextTypes", {
|
|
141
|
-
skin: _provider.default.childContextTypes.skin
|
|
142
|
-
});
|
|
143
|
-
|
|
144
145
|
DragAndDrop.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
145
146
|
title: _propTypes.default.string,
|
|
146
147
|
description: _propTypes.default.string,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/atom/drag-and-drop/index.js"],"names":["constantNull","DragAndDrop","React","Component","constructor","props","state","dragging","handleDragStart","bind","handleDragStop","setState","render","
|
|
1
|
+
{"version":3,"sources":["../../../src/atom/drag-and-drop/index.js"],"names":["constantNull","DragAndDrop","React","Component","constructor","props","state","dragging","handleDragStart","bind","handleDragStop","setState","render","idBox","children","title","description","uploadLabel","previewLabel","previewContent","loading","modified","onReset","previewView","type","style","preview","src","loaderWrapper","loadingCancel","closeIcon","loader","loaderText","resetContent","resetUploadWrapper","resetSrcLabel","buttonProps","label","icon","position","wrapper","modificationsContainer","inputWrapper","propTypes","PropTypes","string","shape","bool","func"],"mappings":"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","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {uniqueId, get, constant, isEmpty} from 'lodash/fp';\nimport {\n NovaLineStatusClose as Close,\n NovaSolidFilesBasicFileUpload2 as FileUploadIcon\n} from '@coorpacademy/nova-icons';\nimport Provider from '../provider';\nimport Loader from '../loader';\nimport style from './style.css';\nimport Button from '../button-link';\n\nconst constantNull = constant(null);\n\nclass DragAndDrop extends React.Component {\n static propTypes = {\n title: PropTypes.string,\n description: PropTypes.string,\n uploadLabel: PropTypes.string,\n previewLabel: PropTypes.string,\n previewContent: PropTypes.shape({\n type: PropTypes.string,\n src: PropTypes.string\n }),\n loading: PropTypes.bool,\n modified: PropTypes.bool,\n children: PropTypes.func,\n onReset: PropTypes.func\n };\n\n constructor(props) {\n super(props);\n\n this.state = {\n dragging: false\n };\n\n this.handleDragStart = this.handleDragStart.bind(this);\n this.handleDragStop = this.handleDragStop.bind(this);\n }\n\n handleDragStart() {\n this.setState({\n dragging: true\n });\n }\n\n handleDragStop() {\n this.setState({\n dragging: false\n });\n }\n\n render() {\n const idBox = uniqueId('drop-box-');\n const {\n children = constantNull,\n title,\n description,\n uploadLabel,\n previewLabel = '',\n previewContent,\n loading = false,\n modified = false,\n onReset = null\n } = this.props;\n const {dragging} = this.state;\n\n let previewView = null;\n\n if (previewContent && previewContent.type === 'image') {\n previewView = (\n <div className={style.preview}>\n <img src={previewContent.src} />\n </div>\n );\n } else if (previewContent && previewContent.type === 'video') {\n previewView = (\n <div className={style.preview}>\n <video controls src={previewContent.src} type=\"video/*\" />\n </div>\n );\n } else if (loading) {\n previewView = (\n <div className={style.loaderWrapper}>\n <div className={style.loadingCancel}>\n <Close\n data-name=\"reset-content-icon\"\n height={16}\n width={16}\n className={style.closeIcon}\n onClick={onReset}\n />\n </div>\n <div className={style.loader}>\n <Loader theme='coorpmanager'/>\n </div>\n <span className={style.loaderText}>Uploading</span>\n </div>\n );\n } else {\n previewView = <span>{previewLabel}</span>;\n }\n\n const resetContent =\n previewContent && previewContent.src && onReset ? (\n <div className={style.resetUploadWrapper}>\n <div className={style.resetSrcLabel}>{previewContent.src}</div>\n <Close\n data-name=\"reset-content-icon\"\n height={16}\n width={16}\n className={style.closeIcon}\n onClick={onReset}\n />\n </div>\n ) : null;\n\n const buttonProps = {\n label: uploadLabel,\n 'aria-label': 'aria button',\n 'data-name': 'default-button',\n icon: {\n position: 'left',\n type: 'folders'\n },\n }\n\n return (\n <div className={style.wrapper} data-name=\"drag-and-drop-wrapper\">\n {!isEmpty(previewContent) || modified || loading ? \n <div className={style.modificationsContainer}>{previewView}</div> \n : \n <div className={dragging ? style.dragging : style.inputWrapper} id={idBox}>\n <FileUploadIcon className={style.icon} />\n {description ? (\n <div className={style.description}>{description}</div>\n ) : null}\n <div className={style.title}>{title}</div>\n {dragging ? null : <Button {...buttonProps} />}\n {children(this.handleDragStart, this.handleDragStop)}\n </div>\n }\n {resetContent}\n </div>\n );\n }\n}\n\nexport default DragAndDrop;\n"],"file":"index.js"}
|
|
@@ -6,145 +6,178 @@
|
|
|
6
6
|
@value battle from colors;
|
|
7
7
|
@value light from colors;
|
|
8
8
|
@value xtraLightGrey from colors;
|
|
9
|
+
@value cm_grey_300 from colors;
|
|
10
|
+
@value cm_grey_700 from colors;
|
|
11
|
+
@value cm_grey_50 from colors;
|
|
12
|
+
@value cm_grey_200 from colors;
|
|
13
|
+
@value cm_grey_100 from colors;
|
|
14
|
+
@value cm_grey_400 from colors;
|
|
9
15
|
|
|
10
16
|
.wrapper {
|
|
11
|
-
|
|
17
|
+
font-family: "Gilroy";
|
|
18
|
+
height: 133px;
|
|
19
|
+
width: 202px;
|
|
20
|
+
border-radius: 3px;
|
|
12
21
|
}
|
|
13
22
|
|
|
14
23
|
.title {
|
|
15
|
-
font-
|
|
16
|
-
font-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
margin-bottom: 20px;
|
|
24
|
+
font-size: 12px;
|
|
25
|
+
font-weight: 700;
|
|
26
|
+
color: cm_grey_700;
|
|
27
|
+
margin-bottom: 14px;
|
|
20
28
|
}
|
|
21
29
|
|
|
22
30
|
.description {
|
|
23
|
-
font-
|
|
24
|
-
font-size: 13px;
|
|
31
|
+
font-size: 10px;
|
|
25
32
|
font-weight: 400;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
text-align: justify;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.previewWrapper {
|
|
33
|
+
color: cm_grey_300;
|
|
34
|
+
margin-bottom: 8px;
|
|
35
|
+
text-align: center;
|
|
33
36
|
width: 100%;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
margin-bottom: 10px;
|
|
37
|
-
display: flex;
|
|
38
|
-
align-items: center;
|
|
39
|
-
justify-content: center;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.modified {
|
|
43
|
-
composes: previewWrapper;
|
|
44
|
-
border: 2px solid battle;
|
|
37
|
+
text-overflow: ellipsis;
|
|
38
|
+
overflow: hidden;
|
|
45
39
|
}
|
|
46
40
|
|
|
47
|
-
.
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
41
|
+
.modificationsContainer {
|
|
42
|
+
width: 100%;
|
|
43
|
+
height: 100%;
|
|
44
|
+
border: none;
|
|
45
|
+
border-radius: 3px;;
|
|
46
|
+
background: cm_grey_50;
|
|
53
47
|
}
|
|
54
48
|
|
|
55
|
-
.
|
|
56
|
-
padding:
|
|
49
|
+
.preview {
|
|
50
|
+
padding: 8px;
|
|
57
51
|
width: 100%;
|
|
58
|
-
height:
|
|
52
|
+
height: 100%;
|
|
59
53
|
box-sizing: border-box;
|
|
60
54
|
display: flex;
|
|
61
55
|
}
|
|
62
56
|
|
|
63
|
-
.
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
57
|
+
.preview img, video {
|
|
58
|
+
width: 100%;
|
|
59
|
+
height: 100%;
|
|
60
|
+
border: 1px cm_grey_100 solid;
|
|
67
61
|
}
|
|
68
62
|
|
|
69
63
|
.inputWrapper {
|
|
64
|
+
background: cm_grey_50;
|
|
70
65
|
width: 100%;
|
|
71
|
-
height:
|
|
66
|
+
height: 100%;
|
|
72
67
|
box-sizing: border-box;
|
|
73
|
-
border: 1px dashed
|
|
74
|
-
border-radius:
|
|
68
|
+
border: 1px dashed cm_grey_200;
|
|
69
|
+
border-radius: 7px;
|
|
75
70
|
position: relative;
|
|
76
71
|
display: flex;
|
|
72
|
+
flex-direction: column;
|
|
77
73
|
align-items: center;
|
|
78
74
|
justify-content: center;
|
|
75
|
+
padding: 14px 8px 8px 8px;
|
|
76
|
+
white-space: nowrap;
|
|
77
|
+
overflow: hidden;
|
|
78
|
+
text-overflow: ellipsis;
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
.resetUploadWrapper {
|
|
82
82
|
width: 100%;
|
|
83
|
-
height:
|
|
83
|
+
height: 20px;
|
|
84
84
|
box-sizing: border-box;
|
|
85
|
-
background-color:
|
|
86
|
-
border: solid 1px light;
|
|
85
|
+
background-color: cm_grey_50;
|
|
87
86
|
border-radius: 3px;
|
|
88
|
-
position: relative;
|
|
89
87
|
display: flex;
|
|
90
88
|
align-items: center;
|
|
91
89
|
justify-content: space-between;
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
font-size:
|
|
90
|
+
margin-top: 16px;
|
|
91
|
+
padding: 4px 8px;
|
|
92
|
+
font-size: 10px;
|
|
95
93
|
font-weight: 400;
|
|
96
|
-
margin-top: 15px;
|
|
97
94
|
}
|
|
98
95
|
|
|
99
96
|
.resetSrcLabel {
|
|
100
|
-
|
|
101
|
-
color: dark;
|
|
102
|
-
max-width: 220px;
|
|
97
|
+
color: cm_grey_700;
|
|
103
98
|
display: inline-block;
|
|
104
99
|
white-space: nowrap;
|
|
105
100
|
overflow: hidden;
|
|
106
101
|
text-overflow: ellipsis;
|
|
107
102
|
direction: rtl;
|
|
108
103
|
text-align: left;
|
|
109
|
-
margin-left: 9px;
|
|
110
104
|
}
|
|
111
105
|
|
|
112
106
|
.closeIcon {
|
|
113
|
-
margin-right: 9px;
|
|
114
107
|
cursor: pointer;
|
|
115
|
-
color:
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
.closeIcon:hover {
|
|
119
|
-
color: black;
|
|
108
|
+
color: cm_grey_400;
|
|
109
|
+
padding: 6px;
|
|
120
110
|
}
|
|
121
111
|
|
|
122
112
|
.dragging {
|
|
123
113
|
composes: inputWrapper;
|
|
124
|
-
border:
|
|
114
|
+
border: 1px solid cm_grey_200;
|
|
115
|
+
background: cm_grey_100;
|
|
125
116
|
}
|
|
126
117
|
|
|
127
|
-
.
|
|
128
|
-
|
|
129
|
-
height: 34px;
|
|
130
|
-
margin-right: 10px;
|
|
131
|
-
transition: all 0.2s cubic-bezier(0.47, 1.04, 0.46, 2.16);
|
|
118
|
+
.dragging .description .icon .title {
|
|
119
|
+
font-size: 8px;
|
|
132
120
|
}
|
|
133
121
|
|
|
134
|
-
.dragging .
|
|
135
|
-
|
|
122
|
+
.dragging .title {
|
|
123
|
+
font-size: 10px;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.dragging .icon {
|
|
127
|
+
transform: scale(0.85);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.icon {
|
|
131
|
+
width: 14px;
|
|
132
|
+
height: 14px;
|
|
133
|
+
transition: all 0.2s cubic-bezier(0.47, 1.04, 0.46, 2.16);
|
|
134
|
+
margin-bottom: 4px;
|
|
136
135
|
}
|
|
137
136
|
|
|
138
137
|
.uploadLabel {
|
|
139
|
-
font-
|
|
140
|
-
font-size: 18px;
|
|
141
|
-
text-transform: uppercase;
|
|
138
|
+
font-size: 14px;
|
|
142
139
|
font-weight: 700;
|
|
143
|
-
color:
|
|
140
|
+
color: cm_grey_700;
|
|
144
141
|
}
|
|
145
142
|
|
|
146
|
-
.
|
|
147
|
-
min-height: 100px;
|
|
148
|
-
border: none;
|
|
143
|
+
.loaderWrapper {
|
|
149
144
|
position: relative;
|
|
145
|
+
height: 100%;
|
|
146
|
+
width: 100%;
|
|
147
|
+
display: flex;
|
|
148
|
+
flex-direction: column;
|
|
149
|
+
justify-content: center;
|
|
150
|
+
align-items: center;
|
|
150
151
|
}
|
|
152
|
+
|
|
153
|
+
.loader {
|
|
154
|
+
margin-bottom: 8px;
|
|
155
|
+
height: 14px;
|
|
156
|
+
width: 14px;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.loaderText {
|
|
160
|
+
font-size: 10px;
|
|
161
|
+
font-weight: 400;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.loadingCancel {
|
|
165
|
+
display: none;
|
|
166
|
+
position: absolute;
|
|
167
|
+
top: 0;
|
|
168
|
+
right: 0;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.button {
|
|
172
|
+
display: flex;
|
|
173
|
+
justify-content: center;
|
|
174
|
+
align-items: center;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.folderIcon {
|
|
178
|
+
margin-right: 8px;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.wrapper:hover .loadingCancel {
|
|
182
|
+
display: block;
|
|
183
|
+
}
|
|
@@ -4,9 +4,9 @@ exports.__esModule = true;
|
|
|
4
4
|
exports.default = void 0;
|
|
5
5
|
var _default = {
|
|
6
6
|
props: {
|
|
7
|
-
title: 'Drag &
|
|
8
|
-
description: '
|
|
9
|
-
uploadLabel: '
|
|
7
|
+
title: 'Drag & drop here',
|
|
8
|
+
description: 'JPG or PNG, smaller than 5mb',
|
|
9
|
+
uploadLabel: 'Browse',
|
|
10
10
|
previewLabel: 'File Preview'
|
|
11
11
|
}
|
|
12
12
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/atom/drag-and-drop/test/fixtures/default.js"],"names":["props","title","description","uploadLabel","previewLabel"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,
|
|
1
|
+
{"version":3,"sources":["../../../../../src/atom/drag-and-drop/test/fixtures/default.js"],"names":["props","title","description","uploadLabel","previewLabel"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,kBADF;AAELC,IAAAA,WAAW,EAAE,8BAFR;AAGLC,IAAAA,WAAW,EAAE,QAHR;AAILC,IAAAA,YAAY,EAAE;AAJT;AADM,C","sourcesContent":["export default {\n props: {\n title: 'Drag & drop here',\n description: 'JPG or PNG, smaller than 5mb',\n uploadLabel: 'Browse',\n previewLabel: 'File Preview'\n }\n};\n"],"file":"default.js"}
|
|
@@ -11,7 +11,8 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
11
11
|
|
|
12
12
|
var _default = {
|
|
13
13
|
props: _extends(_extends({}, _default2.default.props), {}, {
|
|
14
|
-
loading: true
|
|
14
|
+
loading: true,
|
|
15
|
+
modified: false
|
|
15
16
|
})
|
|
16
17
|
};
|
|
17
18
|
exports.default = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/atom/drag-and-drop/test/fixtures/loading.js"],"names":["props","Default","loading"],"mappings":";;;;;AAAA;;;;;;eAEe;AACbA,EAAAA,KAAK,wBACAC,kBAAQD,KADR;AAEHE,IAAAA,OAAO,EAAE;
|
|
1
|
+
{"version":3,"sources":["../../../../../src/atom/drag-and-drop/test/fixtures/loading.js"],"names":["props","Default","loading","modified"],"mappings":";;;;;AAAA;;;;;;eAEe;AACbA,EAAAA,KAAK,wBACAC,kBAAQD,KADR;AAEHE,IAAAA,OAAO,EAAE,IAFN;AAGHC,IAAAA,QAAQ,EAAE;AAHP;AADQ,C","sourcesContent":["import Default from './default';\n\nexport default {\n props: {\n ...Default.props,\n loading: true,\n modified: false\n }\n};\n"],"file":"loading.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/atom/drag-and-drop/test/fixtures/with-children.js"],"names":["props","previewContent","type","src","title","displayName","uploadLabel","children","onDragStart","onDragStop","style","input"],"mappings":";;;;;AAAA;;AACA;;;;eAEe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,cAAc,EAAE;AACdC,MAAAA,IAAI,EAAE,OADQ;AAEdC,MAAAA,GAAG,EAAE;AAFS,
|
|
1
|
+
{"version":3,"sources":["../../../../../src/atom/drag-and-drop/test/fixtures/with-children.js"],"names":["props","modified","previewContent","type","src","title","displayName","uploadLabel","children","onDragStart","onDragStop","style","input"],"mappings":";;;;;AAAA;;AACA;;;;eAEe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,QAAQ,EAAE,IADL;AAELC,IAAAA,cAAc,EAAE;AACdC,MAAAA,IAAI,EAAE,OADQ;AAEdC,MAAAA,GAAG,EAAE;AAFS,KAFX;AAMLC,IAAAA,KAAK,EAAE,aANF;AAOLC,IAAAA,WAAW,EAAE,cAPR;AAQLC,IAAAA,WAAW,EAAE;AARR,GADM;AAWb;AACAC,EAAAA,QAAQ,EAAE,CAACC,WAAD,EAAcC,UAAd,kBACR;AACE,IAAA,SAAS,EAAEC,eAAMC,KADnB;AAEE,IAAA,GAAG,EAAC,GAFN;AAGE,IAAA,IAAI,EAAC,MAHP;AAIE,IAAA,MAAM,EAAC,SAJT;AAKE,IAAA,QAAQ,EAAE,MAAM,IALlB;AAME,IAAA,WAAW,EAAEH,WANf;AAOE,IAAA,MAAM,EAAEC,UAPV;AAQE,IAAA,WAAW,EAAEA;AARf;AAbW,C","sourcesContent":["import React from 'react';\nimport style from '../../../image-upload/style.css';\n\nexport default {\n props: {\n modified: true,\n previewContent: {\n type: 'image',\n src: 'https://static.coorpacademy.com/content/up/raw/logo_coorp-1491560495763.svg'\n },\n title: 'Desktop (*)',\n displayName: 'Upload image',\n uploadLabel: 'Upload'\n },\n // eslint-disable-next-line react/display-name\n children: (onDragStart, onDragStop) => (\n <input\n className={style.input}\n key=\"1\"\n type=\"file\"\n accept=\"image*/\"\n onChange={() => true}\n onDragEnter={onDragStart}\n onDrop={onDragStop}\n onDragLeave={onDragStop}\n />\n )\n};\n"],"file":"with-children.js"}
|
|
@@ -4,13 +4,14 @@ exports.__esModule = true;
|
|
|
4
4
|
exports.default = void 0;
|
|
5
5
|
var _default = {
|
|
6
6
|
props: {
|
|
7
|
+
modified: true,
|
|
7
8
|
title: 'Drag & Drop With Image',
|
|
8
9
|
description: 'Drag and drop component with an image',
|
|
9
10
|
uploadLabel: 'Upload Image(s)',
|
|
10
11
|
previewLabel: 'File Preview',
|
|
11
12
|
previewContent: {
|
|
12
13
|
type: 'image',
|
|
13
|
-
src: 'https://static.coorpacademy.com/content/up/raw/
|
|
14
|
+
src: 'https://static.coorpacademy.com/content/up/raw/logo_coorp-1491560495763.svg'
|
|
14
15
|
}
|
|
15
16
|
}
|
|
16
17
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/atom/drag-and-drop/test/fixtures/with-image.js"],"names":["props","title","description","uploadLabel","previewLabel","previewContent","type","src"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,
|
|
1
|
+
{"version":3,"sources":["../../../../../src/atom/drag-and-drop/test/fixtures/with-image.js"],"names":["props","modified","title","description","uploadLabel","previewLabel","previewContent","type","src"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,QAAQ,EAAE,IADL;AAELC,IAAAA,KAAK,EAAE,wBAFF;AAGLC,IAAAA,WAAW,EAAE,uCAHR;AAILC,IAAAA,WAAW,EAAE,iBAJR;AAKLC,IAAAA,YAAY,EAAE,cALT;AAMLC,IAAAA,cAAc,EAAE;AACdC,MAAAA,IAAI,EAAE,OADQ;AAEdC,MAAAA,GAAG,EAAE;AAFS;AANX;AADM,C","sourcesContent":["export default {\n props: {\n modified: true,\n title: 'Drag & Drop With Image',\n description: 'Drag and drop component with an image',\n uploadLabel: 'Upload Image(s)',\n previewLabel: 'File Preview',\n previewContent: {\n type: 'image',\n src: 'https://static.coorpacademy.com/content/up/raw/logo_coorp-1491560495763.svg'\n }\n }\n};\n"],"file":"with-image.js"}
|
|
@@ -4,6 +4,7 @@ exports.__esModule = true;
|
|
|
4
4
|
exports.default = void 0;
|
|
5
5
|
var _default = {
|
|
6
6
|
props: {
|
|
7
|
+
modified: true,
|
|
7
8
|
title: 'Drag & Drop',
|
|
8
9
|
description: 'Drag and drop component with a video',
|
|
9
10
|
uploadLabel: 'Upload',
|
|
@@ -11,7 +12,8 @@ var _default = {
|
|
|
11
12
|
previewContent: {
|
|
12
13
|
type: 'video',
|
|
13
14
|
src: 'https://www.w3schools.com/tags/movie.mp4'
|
|
14
|
-
}
|
|
15
|
+
},
|
|
16
|
+
onReset: () => console.log('reset')
|
|
15
17
|
}
|
|
16
18
|
};
|
|
17
19
|
exports.default = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/atom/drag-and-drop/test/fixtures/with-video.js"],"names":["props","title","description","uploadLabel","previewLabel","previewContent","type","src"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,
|
|
1
|
+
{"version":3,"sources":["../../../../../src/atom/drag-and-drop/test/fixtures/with-video.js"],"names":["props","modified","title","description","uploadLabel","previewLabel","previewContent","type","src","onReset","console","log"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,QAAQ,EAAE,IADL;AAELC,IAAAA,KAAK,EAAE,aAFF;AAGLC,IAAAA,WAAW,EAAE,sCAHR;AAILC,IAAAA,WAAW,EAAE,QAJR;AAKLC,IAAAA,YAAY,EAAE,cALT;AAMLC,IAAAA,cAAc,EAAE;AACdC,MAAAA,IAAI,EAAE,OADQ;AAEdC,MAAAA,GAAG,EAAE;AAFS,KANX;AAULC,IAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,OAAZ;AAVV;AADM,C","sourcesContent":["export default {\n props: {\n modified: true,\n title: 'Drag & Drop',\n description: 'Drag and drop component with a video',\n uploadLabel: 'Upload',\n previewLabel: 'File Preview',\n previewContent: {\n type: 'video',\n src: 'https://www.w3schools.com/tags/movie.mp4'\n },\n onReset: () => console.log('reset')\n }\n};\n"],"file":"with-video.js"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
|
|
6
|
+
var _default2 = _interopRequireDefault(require("./default"));
|
|
7
|
+
|
|
8
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
+
|
|
10
|
+
function _extends() { _extends = Object.assign || 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); }
|
|
11
|
+
|
|
12
|
+
var _default = {
|
|
13
|
+
props: _extends(_extends({}, _default2.default.props), {}, {
|
|
14
|
+
description: 'Max file size: 5MO. Recommended format: SVG (if your client uses a majority of IE, use PNG format instead). Recommended aspect ratio : horizontal 2:1 (e.g. 500px x 250px). Maximum recommended aspect ratio 1:1 (e.g. 500x500, which means that it should not be taller than its width).'
|
|
15
|
+
})
|
|
16
|
+
};
|
|
17
|
+
exports.default = _default;
|
|
18
|
+
//# sourceMappingURL=withLongDescription.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/atom/drag-and-drop/test/fixtures/withLongDescription.js"],"names":["props","description"],"mappings":";;;;;AACA;;;;;;eAEe;AACXA,EAAAA,KAAK,wBACEA,kBAAMA,KADR;AAEDC,IAAAA,WAAW,EAAE;AAFZ;AADM,C","sourcesContent":["\nimport props from './default';\n\nexport default {\n props: {\n ...props.props,\n description: 'Max file size: 5MO. Recommended format: SVG (if your client uses a majority of IE, use PNG format instead). Recommended aspect ratio : horizontal 2:1 (e.g. 500px x 250px). Maximum recommended aspect ratio 1:1 (e.g. 500x500, which means that it should not be taller than its width).'\n }\n}\n"],"file":"withLongDescription.js"}
|
|
@@ -20,6 +20,8 @@ var _withImage = _interopRequireDefault(require("./fixtures/with-image"));
|
|
|
20
20
|
|
|
21
21
|
var _withVideo = _interopRequireDefault(require("./fixtures/with-video"));
|
|
22
22
|
|
|
23
|
+
var _withLongDescription = _interopRequireDefault(require("./fixtures/withLongDescription"));
|
|
24
|
+
|
|
23
25
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
24
26
|
|
|
25
27
|
(0, _ava.default)('Atom › AtomDragAndDrop > should have valid propTypes', t => {
|
|
@@ -34,4 +36,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
34
36
|
(0, _ava.default)('Atom › AtomDragAndDrop › WithImageReset › should be rendered', _renderComponent.default, _.default, _withImageReset.default);
|
|
35
37
|
(0, _ava.default)('Atom › AtomDragAndDrop › WithImage › should be rendered', _renderComponent.default, _.default, _withImage.default);
|
|
36
38
|
(0, _ava.default)('Atom › AtomDragAndDrop › WithVideo › should be rendered', _renderComponent.default, _.default, _withVideo.default);
|
|
39
|
+
(0, _ava.default)('Atom › AtomDragAndDrop › WithLongDescription › should be rendered', _renderComponent.default, _.default, _withLongDescription.default);
|
|
37
40
|
//# sourceMappingURL=fixtures.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/atom/drag-and-drop/test/fixtures.js"],"names":["t","pass","AtomDragAndDrop","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDefault","fixtureLoading","fixtureWithChildren","fixtureWithImageReset","fixtureWithImage","fixtureWithVideo"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,sDAAL,EAA6DA,CAAC,IAAI;AAChEA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAgBC,SAAxB,EAAmC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACjDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,gDAA+CF,GAAI,mEAA5E;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,uDAAL,EAA8DG,wBAA9D,EAAoFN,SAApF,EAAqGO,gBAArG;AACA,kBAAK,uDAAL,EAA8DD,wBAA9D,EAAoFN,SAApF,EAAqGQ,gBAArG;AACA,kBAAK,4DAAL,EAAmEF,wBAAnE,EAAyFN,SAAzF,EAA0GS,qBAA1G;AACA,kBAAK,8DAAL,EAAqEH,wBAArE,EAA2FN,SAA3F,EAA4GU,uBAA5G;AACA,kBAAK,yDAAL,EAAgEJ,wBAAhE,EAAsFN,SAAtF,EAAuGW,kBAAvG;AACA,kBAAK,yDAAL,EAAgEL,wBAAhE,EAAsFN,SAAtF,EAAuGY,kBAAvG","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomDragAndDrop from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureLoading from './fixtures/loading';\nimport fixtureWithChildren from './fixtures/with-children';\nimport fixtureWithImageReset from './fixtures/with-image-reset';\nimport fixtureWithImage from './fixtures/with-image';\nimport fixtureWithVideo from './fixtures/with-video';\n\ntest('Atom › AtomDragAndDrop > should have valid propTypes', t => {\n t.pass();\n forEach(AtomDragAndDrop.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomDragAndDrop.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomDragAndDrop › Default › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureDefault);\ntest('Atom › AtomDragAndDrop › Loading › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureLoading);\ntest('Atom › AtomDragAndDrop › WithChildren › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureWithChildren);\ntest('Atom › AtomDragAndDrop › WithImageReset › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureWithImageReset);\ntest('Atom › AtomDragAndDrop › WithImage › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureWithImage);\ntest('Atom › AtomDragAndDrop › WithVideo › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureWithVideo);\n"],"file":"fixtures.js"}
|
|
1
|
+
{"version":3,"sources":["../../../../src/atom/drag-and-drop/test/fixtures.js"],"names":["t","pass","AtomDragAndDrop","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDefault","fixtureLoading","fixtureWithChildren","fixtureWithImageReset","fixtureWithImage","fixtureWithVideo","fixtureWithLongDescription"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,sDAAL,EAA6DA,CAAC,IAAI;AAChEA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAgBC,SAAxB,EAAmC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACjDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,gDAA+CF,GAAI,mEAA5E;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,uDAAL,EAA8DG,wBAA9D,EAAoFN,SAApF,EAAqGO,gBAArG;AACA,kBAAK,uDAAL,EAA8DD,wBAA9D,EAAoFN,SAApF,EAAqGQ,gBAArG;AACA,kBAAK,4DAAL,EAAmEF,wBAAnE,EAAyFN,SAAzF,EAA0GS,qBAA1G;AACA,kBAAK,8DAAL,EAAqEH,wBAArE,EAA2FN,SAA3F,EAA4GU,uBAA5G;AACA,kBAAK,yDAAL,EAAgEJ,wBAAhE,EAAsFN,SAAtF,EAAuGW,kBAAvG;AACA,kBAAK,yDAAL,EAAgEL,wBAAhE,EAAsFN,SAAtF,EAAuGY,kBAAvG;AACA,kBAAK,mEAAL,EAA0EN,wBAA1E,EAAgGN,SAAhG,EAAiHa,4BAAjH","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomDragAndDrop from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureLoading from './fixtures/loading';\nimport fixtureWithChildren from './fixtures/with-children';\nimport fixtureWithImageReset from './fixtures/with-image-reset';\nimport fixtureWithImage from './fixtures/with-image';\nimport fixtureWithVideo from './fixtures/with-video';\nimport fixtureWithLongDescription from './fixtures/withLongDescription';\n\ntest('Atom › AtomDragAndDrop > should have valid propTypes', t => {\n t.pass();\n forEach(AtomDragAndDrop.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomDragAndDrop.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomDragAndDrop › Default › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureDefault);\ntest('Atom › AtomDragAndDrop › Loading › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureLoading);\ntest('Atom › AtomDragAndDrop › WithChildren › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureWithChildren);\ntest('Atom › AtomDragAndDrop › WithImageReset › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureWithImageReset);\ntest('Atom › AtomDragAndDrop › WithImage › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureWithImage);\ntest('Atom › AtomDragAndDrop › WithVideo › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureWithVideo);\ntest('Atom › AtomDragAndDrop › WithLongDescription › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureWithLongDescription);\n"],"file":"fixtures.js"}
|
|
@@ -32,7 +32,11 @@
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
.cmLoaderContainer {
|
|
35
|
-
|
|
35
|
+
position: relative;
|
|
36
|
+
top: 0;
|
|
37
|
+
left: 0;
|
|
38
|
+
height: 100%;
|
|
39
|
+
width: 100%;
|
|
36
40
|
}
|
|
37
41
|
|
|
38
42
|
.dots {
|
|
@@ -73,8 +77,8 @@
|
|
|
73
77
|
}
|
|
74
78
|
|
|
75
79
|
.icon {
|
|
76
|
-
width:
|
|
77
|
-
height:
|
|
80
|
+
width: 100%;
|
|
81
|
+
height: 100%;
|
|
78
82
|
position: absolute;
|
|
79
83
|
}
|
|
80
84
|
|