@micromag/screen-contribution 0.3.425 → 0.3.429
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/assets/css/styles.css +1 -1
- package/es/index.js +2 -3
- package/lib/index.js +57 -76
- package/package.json +23 -15
package/assets/css/styles.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.micromag-screen-contribution-container .micromag-screen-contribution-background,.micromag-screen-contribution-container .micromag-screen-contribution-inner{height:100%;left:0;position:absolute;top:0;width:100%}.micromag-screen-contribution-container .micromag-screen-contribution-buttonSubmit:focus-visible{outline:3px solid #a13dff;outline-offset:4px}.micromag-screen-contribution-container{position:relative}.micromag-screen-contribution-container .micromag-screen-contribution-background{z-index:0}.micromag-screen-contribution-container .micromag-screen-contribution-content{z-index:1}.micromag-screen-contribution-container .micromag-screen-contribution-header{left:0;position:relative;top:0;width:100%}@-webkit-keyframes micromag-screen-contribution-rotate{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes micromag-screen-contribution-rotate{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.micromag-screen-contribution-container .micromag-screen-contribution-emptyInputMessage,.micromag-screen-contribution-container .micromag-screen-contribution-emptyInputName,.micromag-screen-contribution-container .micromag-screen-contribution-emptySubmit,.micromag-screen-contribution-container .micromag-screen-contribution-emptyTitle{margin-bottom:10px;padding:10px}.micromag-screen-contribution-container .micromag-screen-contribution-emptyInputMessage{height:100px}.micromag-screen-contribution-container .micromag-screen-contribution-title{padding-bottom:20px}.micromag-screen-contribution-container .micromag-screen-contribution-interactiveContainer{-webkit-transition-property:height
|
|
1
|
+
.micromag-screen-contribution-container .micromag-screen-contribution-background,.micromag-screen-contribution-container .micromag-screen-contribution-inner{height:100%;left:0;position:absolute;top:0;width:100%}.micromag-screen-contribution-container .micromag-screen-contribution-buttonSubmit.micromag-screen-contribution-focus-visible{outline:3px solid #a13dff;outline-offset:4px}.micromag-screen-contribution-container .micromag-screen-contribution-buttonSubmit:focus-visible{outline:3px solid #a13dff;outline-offset:4px}.micromag-screen-contribution-container{position:relative}.micromag-screen-contribution-container .micromag-screen-contribution-background{z-index:0}.micromag-screen-contribution-container .micromag-screen-contribution-content{z-index:1}.micromag-screen-contribution-container .micromag-screen-contribution-header{left:0;position:relative;top:0;width:100%}@-webkit-keyframes micromag-screen-contribution-rotate{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes micromag-screen-contribution-rotate{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.micromag-screen-contribution-container .micromag-screen-contribution-emptyInputMessage,.micromag-screen-contribution-container .micromag-screen-contribution-emptyInputName,.micromag-screen-contribution-container .micromag-screen-contribution-emptySubmit,.micromag-screen-contribution-container .micromag-screen-contribution-emptyTitle{margin-bottom:10px;padding:10px}.micromag-screen-contribution-container .micromag-screen-contribution-emptyInputMessage{height:100px}.micromag-screen-contribution-container .micromag-screen-contribution-title{padding-bottom:20px}.micromag-screen-contribution-container .micromag-screen-contribution-interactiveContainer{-webkit-transition-property:height;transition-property:height;-webkit-transition-timing-function:ease;transition-timing-function:ease}.micromag-screen-contribution-container .micromag-screen-contribution-form{position:relative}.micromag-screen-contribution-container .micromag-screen-contribution-buttonSubmit,.micromag-screen-contribution-container .micromag-screen-contribution-inputMessage,.micromag-screen-contribution-container .micromag-screen-contribution-inputName{display:block;padding:4px;width:100%}.micromag-screen-contribution-container .micromag-screen-contribution-inputMessage,.micromag-screen-contribution-container .micromag-screen-contribution-inputName{margin-bottom:10px}.micromag-screen-contribution-container .micromag-screen-contribution-inputMessage{height:100px}.micromag-screen-contribution-container .micromag-screen-contribution-buttonSubmit{border:0}.micromag-screen-contribution-container .micromag-screen-contribution-buttonSubmit:disabled{opacity:1}.micromag-screen-contribution-container .micromag-screen-contribution-formContent{-webkit-transition-property:opacity;transition-property:opacity;-webkit-transition-timing-function:ease;transition-timing-function:ease}.micromag-screen-contribution-container .micromag-screen-contribution-formLoading{-webkit-animation:micromag-screen-contribution-rotate 1s linear infinite;animation:micromag-screen-contribution-rotate 1s linear infinite;height:40px;left:50%;margin-left:-20px;margin-top:-20px;opacity:0;pointer-events:none;position:absolute;top:50%;-webkit-transition:opacity .25s ease;transition:opacity .25s ease;width:40px}.micromag-screen-contribution-container .micromag-screen-contribution-formLoading .micromag-screen-contribution-loadingIcon{display:block;height:100%;width:100%}.micromag-screen-contribution-container .micromag-screen-contribution-contributionsContainer{opacity:0;position:relative;-webkit-transition:opacity .25s ease;transition:opacity .25s ease}.micromag-screen-contribution-container .micromag-screen-contribution-contributionsContent{height:0;overflow:hidden;position:absolute;width:100%}.micromag-screen-contribution-container .micromag-screen-contribution-contributions{position:relative}.micromag-screen-contribution-container .micromag-screen-contribution-contribution{border-bottom:1px solid #fff;margin-bottom:20px;padding-bottom:20px}.micromag-screen-contribution-container .micromag-screen-contribution-contribution:first-child{border-top:1px solid #fff;padding-top:20px}.micromag-screen-contribution-container .micromag-screen-contribution-contribution:last-child{border-bottom:0;margin-bottom:0;padding-bottom:0}.micromag-screen-contribution-container .micromag-screen-contribution-footer{bottom:0;left:0;position:absolute;-webkit-transition:opacity .2s ease-out;transition:opacity .2s ease-out;width:100%}.micromag-screen-contribution-container .micromag-screen-contribution-footer.micromag-screen-contribution-disabled{opacity:0;pointer-events:none}.micromag-screen-contribution-container.micromag-screen-contribution-submitting .micromag-screen-contribution-form{pointer-events:none}.micromag-screen-contribution-container.micromag-screen-contribution-submitting .micromag-screen-contribution-formContent{opacity:.4}.micromag-screen-contribution-container.micromag-screen-contribution-submitting .micromag-screen-contribution-formLoading{opacity:1}.micromag-screen-contribution-container.micromag-screen-contribution-submitted .micromag-screen-contribution-formContent{opacity:0}.micromag-screen-contribution-container.micromag-screen-contribution-showContributions .micromag-screen-contribution-form{display:none}.micromag-screen-contribution-container.micromag-screen-contribution-showContributions .micromag-screen-contribution-contributionsContainer{opacity:1}.micromag-screen-contribution-container.micromag-screen-contribution-showContributions .micromag-screen-contribution-contributionsContent{height:auto;overflow:visible;position:relative}.micromag-screen-contribution-container.micromag-screen-contribution-isPlaceholder .micromag-screen-contribution-inner{padding:10px}
|
package/es/index.js
CHANGED
|
@@ -23,7 +23,7 @@ import Scroll from '@micromag/element-scroll';
|
|
|
23
23
|
import Text from '@micromag/element-text';
|
|
24
24
|
import TextInput from '@micromag/element-text-input';
|
|
25
25
|
|
|
26
|
-
var styles = {"container":"micromag-screen-contribution-container","inner":"micromag-screen-contribution-inner","background":"micromag-screen-contribution-background","buttonSubmit":"micromag-screen-contribution-buttonSubmit","content":"micromag-screen-contribution-content","header":"micromag-screen-contribution-header","emptyTitle":"micromag-screen-contribution-emptyTitle","emptyInputName":"micromag-screen-contribution-emptyInputName","emptyInputMessage":"micromag-screen-contribution-emptyInputMessage","emptySubmit":"micromag-screen-contribution-emptySubmit","title":"micromag-screen-contribution-title","interactiveContainer":"micromag-screen-contribution-interactiveContainer","form":"micromag-screen-contribution-form","inputName":"micromag-screen-contribution-inputName","inputMessage":"micromag-screen-contribution-inputMessage","formContent":"micromag-screen-contribution-formContent","formLoading":"micromag-screen-contribution-formLoading","rotate":"micromag-screen-contribution-rotate","loadingIcon":"micromag-screen-contribution-loadingIcon","contributionsContainer":"micromag-screen-contribution-contributionsContainer","contributionsContent":"micromag-screen-contribution-contributionsContent","contributions":"micromag-screen-contribution-contributions","contribution":"micromag-screen-contribution-contribution","footer":"micromag-screen-contribution-footer","disabled":"micromag-screen-contribution-disabled","submitting":"micromag-screen-contribution-submitting","submitted":"micromag-screen-contribution-submitted","showContributions":"micromag-screen-contribution-showContributions","isPlaceholder":"micromag-screen-contribution-isPlaceholder"};
|
|
26
|
+
var styles = {"container":"micromag-screen-contribution-container","inner":"micromag-screen-contribution-inner","background":"micromag-screen-contribution-background","buttonSubmit":"micromag-screen-contribution-buttonSubmit","focus-visible":"micromag-screen-contribution-focus-visible","content":"micromag-screen-contribution-content","header":"micromag-screen-contribution-header","emptyTitle":"micromag-screen-contribution-emptyTitle","emptyInputName":"micromag-screen-contribution-emptyInputName","emptyInputMessage":"micromag-screen-contribution-emptyInputMessage","emptySubmit":"micromag-screen-contribution-emptySubmit","title":"micromag-screen-contribution-title","interactiveContainer":"micromag-screen-contribution-interactiveContainer","form":"micromag-screen-contribution-form","inputName":"micromag-screen-contribution-inputName","inputMessage":"micromag-screen-contribution-inputMessage","formContent":"micromag-screen-contribution-formContent","formLoading":"micromag-screen-contribution-formLoading","rotate":"micromag-screen-contribution-rotate","loadingIcon":"micromag-screen-contribution-loadingIcon","contributionsContainer":"micromag-screen-contribution-contributionsContainer","contributionsContent":"micromag-screen-contribution-contributionsContent","contributions":"micromag-screen-contribution-contributions","contribution":"micromag-screen-contribution-contribution","footer":"micromag-screen-contribution-footer","disabled":"micromag-screen-contribution-disabled","submitting":"micromag-screen-contribution-submitting","submitted":"micromag-screen-contribution-submitted","showContributions":"micromag-screen-contribution-showContributions","isPlaceholder":"micromag-screen-contribution-isPlaceholder"};
|
|
27
27
|
|
|
28
28
|
var propTypes = {
|
|
29
29
|
id: PropTypes.string,
|
|
@@ -68,7 +68,6 @@ var defaultProps = {
|
|
|
68
68
|
className: null
|
|
69
69
|
};
|
|
70
70
|
var ContributionScreen = function ContributionScreen(_ref) {
|
|
71
|
-
var _ref3;
|
|
72
71
|
var id = _ref.id,
|
|
73
72
|
layout = _ref.layout,
|
|
74
73
|
title = _ref.title,
|
|
@@ -415,7 +414,7 @@ var ContributionScreen = function ContributionScreen(_ref) {
|
|
|
415
414
|
}, /*#__PURE__*/React.createElement(Header, header)) : null;
|
|
416
415
|
var headerInScroll = submitState >= 4;
|
|
417
416
|
return /*#__PURE__*/React.createElement("div", {
|
|
418
|
-
className: classNames([styles.container, (
|
|
417
|
+
className: classNames([styles.container, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, className, className !== null), styles.isPlaceholder, isPlaceholder), styles.submitting, submitState === 1), styles.submitted, submitState > 1), styles.showContributions, submitState === 4)]),
|
|
419
418
|
"data-screen-ready": true
|
|
420
419
|
}, /*#__PURE__*/React.createElement(Container, {
|
|
421
420
|
width: width,
|
package/lib/index.js
CHANGED
|
@@ -27,46 +27,28 @@ var Scroll = require('@micromag/element-scroll');
|
|
|
27
27
|
var Text = require('@micromag/element-text');
|
|
28
28
|
var TextInput = require('@micromag/element-text-input');
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
33
|
-
var _toConsumableArray__default = /*#__PURE__*/_interopDefaultLegacy(_toConsumableArray);
|
|
34
|
-
var _slicedToArray__default = /*#__PURE__*/_interopDefaultLegacy(_slicedToArray);
|
|
35
|
-
var classNames__default = /*#__PURE__*/_interopDefaultLegacy(classNames);
|
|
36
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
37
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
38
|
-
var Background__default = /*#__PURE__*/_interopDefaultLegacy(Background);
|
|
39
|
-
var Button__default = /*#__PURE__*/_interopDefaultLegacy(Button);
|
|
40
|
-
var Container__default = /*#__PURE__*/_interopDefaultLegacy(Container);
|
|
41
|
-
var Footer__default = /*#__PURE__*/_interopDefaultLegacy(Footer);
|
|
42
|
-
var Header__default = /*#__PURE__*/_interopDefaultLegacy(Header);
|
|
43
|
-
var Heading__default = /*#__PURE__*/_interopDefaultLegacy(Heading);
|
|
44
|
-
var Scroll__default = /*#__PURE__*/_interopDefaultLegacy(Scroll);
|
|
45
|
-
var Text__default = /*#__PURE__*/_interopDefaultLegacy(Text);
|
|
46
|
-
var TextInput__default = /*#__PURE__*/_interopDefaultLegacy(TextInput);
|
|
47
|
-
|
|
48
|
-
var styles = {"container":"micromag-screen-contribution-container","inner":"micromag-screen-contribution-inner","background":"micromag-screen-contribution-background","buttonSubmit":"micromag-screen-contribution-buttonSubmit","content":"micromag-screen-contribution-content","header":"micromag-screen-contribution-header","emptyTitle":"micromag-screen-contribution-emptyTitle","emptyInputName":"micromag-screen-contribution-emptyInputName","emptyInputMessage":"micromag-screen-contribution-emptyInputMessage","emptySubmit":"micromag-screen-contribution-emptySubmit","title":"micromag-screen-contribution-title","interactiveContainer":"micromag-screen-contribution-interactiveContainer","form":"micromag-screen-contribution-form","inputName":"micromag-screen-contribution-inputName","inputMessage":"micromag-screen-contribution-inputMessage","formContent":"micromag-screen-contribution-formContent","formLoading":"micromag-screen-contribution-formLoading","rotate":"micromag-screen-contribution-rotate","loadingIcon":"micromag-screen-contribution-loadingIcon","contributionsContainer":"micromag-screen-contribution-contributionsContainer","contributionsContent":"micromag-screen-contribution-contributionsContent","contributions":"micromag-screen-contribution-contributions","contribution":"micromag-screen-contribution-contribution","footer":"micromag-screen-contribution-footer","disabled":"micromag-screen-contribution-disabled","submitting":"micromag-screen-contribution-submitting","submitted":"micromag-screen-contribution-submitted","showContributions":"micromag-screen-contribution-showContributions","isPlaceholder":"micromag-screen-contribution-isPlaceholder"};
|
|
30
|
+
var styles = {"container":"micromag-screen-contribution-container","inner":"micromag-screen-contribution-inner","background":"micromag-screen-contribution-background","buttonSubmit":"micromag-screen-contribution-buttonSubmit","focus-visible":"micromag-screen-contribution-focus-visible","content":"micromag-screen-contribution-content","header":"micromag-screen-contribution-header","emptyTitle":"micromag-screen-contribution-emptyTitle","emptyInputName":"micromag-screen-contribution-emptyInputName","emptyInputMessage":"micromag-screen-contribution-emptyInputMessage","emptySubmit":"micromag-screen-contribution-emptySubmit","title":"micromag-screen-contribution-title","interactiveContainer":"micromag-screen-contribution-interactiveContainer","form":"micromag-screen-contribution-form","inputName":"micromag-screen-contribution-inputName","inputMessage":"micromag-screen-contribution-inputMessage","formContent":"micromag-screen-contribution-formContent","formLoading":"micromag-screen-contribution-formLoading","rotate":"micromag-screen-contribution-rotate","loadingIcon":"micromag-screen-contribution-loadingIcon","contributionsContainer":"micromag-screen-contribution-contributionsContainer","contributionsContent":"micromag-screen-contribution-contributionsContent","contributions":"micromag-screen-contribution-contributions","contribution":"micromag-screen-contribution-contribution","footer":"micromag-screen-contribution-footer","disabled":"micromag-screen-contribution-disabled","submitting":"micromag-screen-contribution-submitting","submitted":"micromag-screen-contribution-submitted","showContributions":"micromag-screen-contribution-showContributions","isPlaceholder":"micromag-screen-contribution-isPlaceholder"};
|
|
49
31
|
|
|
50
32
|
var propTypes = {
|
|
51
|
-
id:
|
|
52
|
-
layout:
|
|
33
|
+
id: PropTypes.string,
|
|
34
|
+
layout: PropTypes.oneOf(['top', 'middle', 'bottom']),
|
|
53
35
|
title: core.PropTypes.headingElement,
|
|
54
36
|
name: core.PropTypes.inputElement,
|
|
55
37
|
message: core.PropTypes.inputElement,
|
|
56
38
|
submit: core.PropTypes.textElement,
|
|
57
39
|
nameStyle: core.PropTypes.textStyle,
|
|
58
40
|
messageStyle: core.PropTypes.textStyle,
|
|
59
|
-
spacing:
|
|
41
|
+
spacing: PropTypes.number,
|
|
60
42
|
background: core.PropTypes.backgroundElement,
|
|
61
43
|
header: core.PropTypes.header,
|
|
62
44
|
footer: core.PropTypes.footer,
|
|
63
|
-
current:
|
|
64
|
-
active:
|
|
45
|
+
current: PropTypes.bool,
|
|
46
|
+
active: PropTypes.bool,
|
|
65
47
|
transitions: core.PropTypes.transitions,
|
|
66
|
-
transitionStagger:
|
|
67
|
-
resizeTransitionDuration:
|
|
68
|
-
type:
|
|
69
|
-
className:
|
|
48
|
+
transitionStagger: PropTypes.number,
|
|
49
|
+
resizeTransitionDuration: PropTypes.number,
|
|
50
|
+
type: PropTypes.string,
|
|
51
|
+
className: PropTypes.string
|
|
70
52
|
};
|
|
71
53
|
var defaultProps = {
|
|
72
54
|
id: null,
|
|
@@ -90,7 +72,6 @@ var defaultProps = {
|
|
|
90
72
|
className: null
|
|
91
73
|
};
|
|
92
74
|
var ContributionScreen = function ContributionScreen(_ref) {
|
|
93
|
-
var _ref3;
|
|
94
75
|
var id = _ref.id,
|
|
95
76
|
layout = _ref.layout,
|
|
96
77
|
title = _ref.title,
|
|
@@ -152,21 +133,21 @@ var ContributionScreen = function ContributionScreen(_ref) {
|
|
|
152
133
|
var contributionsRef = React.useRef(null);
|
|
153
134
|
var formRef = React.useRef(null);
|
|
154
135
|
var _useState = React.useState(null),
|
|
155
|
-
_useState2 =
|
|
136
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
156
137
|
interactiveContainerHeight = _useState2[0],
|
|
157
138
|
setInteractiveContainerHeight = _useState2[1];
|
|
158
139
|
var _useState3 = React.useState(''),
|
|
159
|
-
_useState4 =
|
|
140
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
160
141
|
userName = _useState4[0],
|
|
161
142
|
setUserName = _useState4[1];
|
|
162
143
|
var _useState5 = React.useState(''),
|
|
163
|
-
_useState6 =
|
|
144
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
164
145
|
userMessage = _useState6[0],
|
|
165
146
|
setUserMessage = _useState6[1];
|
|
166
147
|
|
|
167
148
|
// 0 = default, 1 = submitting, 2 = submitted, 3 = resizing, 4 = done
|
|
168
149
|
var _useState7 = React.useState(isStatic || isCapture ? 4 : 0),
|
|
169
|
-
_useState8 =
|
|
150
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
170
151
|
submitState = _useState8[0],
|
|
171
152
|
setSubmitState = _useState8[1];
|
|
172
153
|
var onContributionSubmitted = React.useCallback(function () {
|
|
@@ -213,7 +194,7 @@ var ContributionScreen = function ContributionScreen(_ref) {
|
|
|
213
194
|
|
|
214
195
|
// Call to Action
|
|
215
196
|
var _useState9 = React.useState(false),
|
|
216
|
-
_useState10 =
|
|
197
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
217
198
|
scrolledBottom = _useState10[0],
|
|
218
199
|
setScrolledBottom = _useState10[1];
|
|
219
200
|
var swipeUpLinkActive = scrolledBottom && submitState === 4;
|
|
@@ -263,13 +244,13 @@ var ContributionScreen = function ContributionScreen(_ref) {
|
|
|
263
244
|
|
|
264
245
|
// Title
|
|
265
246
|
|
|
266
|
-
var items = [/*#__PURE__*/
|
|
247
|
+
var items = [/*#__PURE__*/React.createElement(components.ScreenElement, {
|
|
267
248
|
key: "title",
|
|
268
249
|
placeholder: "title",
|
|
269
250
|
placeholderProps: {
|
|
270
251
|
height: '0.75em'
|
|
271
252
|
},
|
|
272
|
-
emptyLabel: /*#__PURE__*/
|
|
253
|
+
emptyLabel: /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
|
|
273
254
|
id: "2ZOPe+",
|
|
274
255
|
defaultMessage: [{
|
|
275
256
|
"type": 0,
|
|
@@ -278,39 +259,39 @@ var ContributionScreen = function ContributionScreen(_ref) {
|
|
|
278
259
|
}),
|
|
279
260
|
emptyClassName: styles.emptyTitle,
|
|
280
261
|
isEmpty: !hasTitle
|
|
281
|
-
}, hasTitle ? /*#__PURE__*/
|
|
262
|
+
}, hasTitle ? /*#__PURE__*/React.createElement(components.Transitions, {
|
|
282
263
|
transitions: transitions,
|
|
283
264
|
playing: transitionPlaying,
|
|
284
265
|
disabled: transitionDisabled
|
|
285
|
-
}, /*#__PURE__*/
|
|
266
|
+
}, /*#__PURE__*/React.createElement(Heading, Object.assign({}, title, {
|
|
286
267
|
className: styles.title
|
|
287
268
|
}))) : null)];
|
|
288
|
-
var allContributions = [].concat(
|
|
269
|
+
var allContributions = [].concat(_toConsumableArray(userName !== null && userMessage !== null ? [{
|
|
289
270
|
name: userName,
|
|
290
271
|
message: userMessage
|
|
291
|
-
}] : []),
|
|
272
|
+
}] : []), _toConsumableArray(contributions || []));
|
|
292
273
|
|
|
293
274
|
// Form
|
|
294
275
|
|
|
295
|
-
items.push( /*#__PURE__*/
|
|
276
|
+
items.push( /*#__PURE__*/React.createElement("div", {
|
|
296
277
|
key: "form",
|
|
297
278
|
className: styles.interactiveContainer,
|
|
298
279
|
style: {
|
|
299
280
|
height: submitState < 4 ? interactiveContainerHeight : null,
|
|
300
281
|
transitionDuration: "".concat(resizeTransitionDuration, "ms")
|
|
301
282
|
}
|
|
302
|
-
}, /*#__PURE__*/
|
|
283
|
+
}, /*#__PURE__*/React.createElement("form", {
|
|
303
284
|
className: styles.form,
|
|
304
285
|
onSubmit: onSubmit,
|
|
305
286
|
ref: formRef
|
|
306
|
-
}, /*#__PURE__*/
|
|
287
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
307
288
|
className: styles.formContent
|
|
308
|
-
}, /*#__PURE__*/
|
|
289
|
+
}, /*#__PURE__*/React.createElement(components.ScreenElement, {
|
|
309
290
|
placeholder: "inputText",
|
|
310
291
|
placeholderProps: {
|
|
311
292
|
height: '0.25em'
|
|
312
293
|
},
|
|
313
|
-
emptyLabel: /*#__PURE__*/
|
|
294
|
+
emptyLabel: /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
|
|
314
295
|
id: "G/ITGY",
|
|
315
296
|
defaultMessage: [{
|
|
316
297
|
"type": 0,
|
|
@@ -319,12 +300,12 @@ var ContributionScreen = function ContributionScreen(_ref) {
|
|
|
319
300
|
}),
|
|
320
301
|
emptyClassName: styles.emptyInputName,
|
|
321
302
|
isEmpty: !hasNameLabel
|
|
322
|
-
}, /*#__PURE__*/
|
|
303
|
+
}, /*#__PURE__*/React.createElement(components.Transitions, {
|
|
323
304
|
transitions: transitions,
|
|
324
305
|
playing: transitionPlaying,
|
|
325
306
|
delay: transitionStagger,
|
|
326
307
|
disabled: transitionDisabled
|
|
327
|
-
}, /*#__PURE__*/
|
|
308
|
+
}, /*#__PURE__*/React.createElement(TextInput, Object.assign({
|
|
328
309
|
className: styles.inputName
|
|
329
310
|
}, name, {
|
|
330
311
|
value: userName,
|
|
@@ -337,12 +318,12 @@ var ContributionScreen = function ContributionScreen(_ref) {
|
|
|
337
318
|
focusable: current && isView,
|
|
338
319
|
disabled: isPreview,
|
|
339
320
|
required: true
|
|
340
|
-
})))), /*#__PURE__*/
|
|
321
|
+
})))), /*#__PURE__*/React.createElement(components.ScreenElement, {
|
|
341
322
|
placeholder: "inputText",
|
|
342
323
|
placeholderProps: {
|
|
343
324
|
height: '0.75em'
|
|
344
325
|
},
|
|
345
|
-
emptyLabel: /*#__PURE__*/
|
|
326
|
+
emptyLabel: /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
|
|
346
327
|
id: "JAguka",
|
|
347
328
|
defaultMessage: [{
|
|
348
329
|
"type": 0,
|
|
@@ -351,12 +332,12 @@ var ContributionScreen = function ContributionScreen(_ref) {
|
|
|
351
332
|
}),
|
|
352
333
|
emptyClassName: styles.emptyInputMessage,
|
|
353
334
|
isEmpty: !hasMessageLabel
|
|
354
|
-
}, /*#__PURE__*/
|
|
335
|
+
}, /*#__PURE__*/React.createElement(components.Transitions, {
|
|
355
336
|
transitions: transitions,
|
|
356
337
|
playing: transitionPlaying,
|
|
357
338
|
delay: transitionStagger * 2,
|
|
358
339
|
disabled: transitionDisabled
|
|
359
|
-
}, /*#__PURE__*/
|
|
340
|
+
}, /*#__PURE__*/React.createElement(TextInput, Object.assign({
|
|
360
341
|
className: styles.inputMessage
|
|
361
342
|
}, message, {
|
|
362
343
|
value: userMessage,
|
|
@@ -370,9 +351,9 @@ var ContributionScreen = function ContributionScreen(_ref) {
|
|
|
370
351
|
focusable: current && isView,
|
|
371
352
|
multiline: true,
|
|
372
353
|
required: true
|
|
373
|
-
})))), /*#__PURE__*/
|
|
354
|
+
})))), /*#__PURE__*/React.createElement(components.ScreenElement, {
|
|
374
355
|
placeholder: "button",
|
|
375
|
-
emptyLabel: /*#__PURE__*/
|
|
356
|
+
emptyLabel: /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
|
|
376
357
|
id: "5uH4x7",
|
|
377
358
|
defaultMessage: [{
|
|
378
359
|
"type": 0,
|
|
@@ -381,69 +362,69 @@ var ContributionScreen = function ContributionScreen(_ref) {
|
|
|
381
362
|
}),
|
|
382
363
|
emptyClassName: styles.emptySubmit,
|
|
383
364
|
isEmpty: !hasSubmit
|
|
384
|
-
}, /*#__PURE__*/
|
|
365
|
+
}, /*#__PURE__*/React.createElement(components.Transitions, {
|
|
385
366
|
transitions: transitions,
|
|
386
367
|
playing: transitionPlaying,
|
|
387
368
|
delay: transitionStagger * 3,
|
|
388
369
|
disabled: transitionDisabled
|
|
389
|
-
}, /*#__PURE__*/
|
|
370
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
390
371
|
type: "submit",
|
|
391
372
|
className: styles.buttonSubmit,
|
|
392
373
|
disabled: isPreview,
|
|
393
374
|
buttonStyle: submit !== null ? submit.buttonStyle : null,
|
|
394
375
|
focusable: current && isView
|
|
395
|
-
}, /*#__PURE__*/
|
|
376
|
+
}, /*#__PURE__*/React.createElement(Text, Object.assign({}, submit, {
|
|
396
377
|
inline: true
|
|
397
|
-
})))))), /*#__PURE__*/
|
|
378
|
+
})))))), /*#__PURE__*/React.createElement("div", {
|
|
398
379
|
className: styles.formLoading
|
|
399
|
-
}, /*#__PURE__*/
|
|
380
|
+
}, /*#__PURE__*/React.createElement(reactFontawesome.FontAwesomeIcon, {
|
|
400
381
|
className: styles.loadingIcon,
|
|
401
382
|
icon: faSpinner.faSpinner
|
|
402
|
-
}))), /*#__PURE__*/
|
|
383
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
403
384
|
className: styles.contributionsContainer,
|
|
404
385
|
"aria-hidden": submitState === 4 ? null : 'true'
|
|
405
|
-
}, /*#__PURE__*/
|
|
386
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
406
387
|
className: styles.contributionsContent
|
|
407
|
-
}, /*#__PURE__*/
|
|
388
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
408
389
|
className: styles.contributions,
|
|
409
390
|
ref: contributionsRef
|
|
410
391
|
}, allContributions.map(function (contribution, contributionIndex) {
|
|
411
392
|
var nameInnerStyle = nameStyle !== null ? nameStyle.style || null : null;
|
|
412
393
|
var messageInnerStyle = messageStyle !== null ? messageStyle.style || null : null;
|
|
413
|
-
return /*#__PURE__*/
|
|
394
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
414
395
|
key: "contribution-".concat(contributionIndex),
|
|
415
396
|
className: styles.contribution,
|
|
416
397
|
style: nameInnerStyle !== null ? utils.getStyleFromColor(nameInnerStyle.color, 'borderColor') : null
|
|
417
|
-
}, /*#__PURE__*/
|
|
398
|
+
}, /*#__PURE__*/React.createElement(Heading, {
|
|
418
399
|
className: styles.contributionName,
|
|
419
400
|
body: contribution.name,
|
|
420
401
|
size: 2,
|
|
421
402
|
textStyle: nameInnerStyle
|
|
422
|
-
}), /*#__PURE__*/
|
|
403
|
+
}), /*#__PURE__*/React.createElement(Text, {
|
|
423
404
|
className: styles.contributionMessage,
|
|
424
405
|
body: contribution.message,
|
|
425
406
|
textStyle: messageInnerStyle
|
|
426
407
|
}));
|
|
427
|
-
})))), hasFooter ? /*#__PURE__*/
|
|
408
|
+
})))), hasFooter ? /*#__PURE__*/React.createElement("div", {
|
|
428
409
|
style: {
|
|
429
410
|
height: callToActionHeight
|
|
430
411
|
}
|
|
431
412
|
}) : null));
|
|
432
|
-
var headerElement = !isPlaceholder && hasHeader ? /*#__PURE__*/
|
|
413
|
+
var headerElement = !isPlaceholder && hasHeader ? /*#__PURE__*/React.createElement("div", {
|
|
433
414
|
className: styles.header,
|
|
434
415
|
style: {
|
|
435
416
|
paddingBottom: spacing
|
|
436
417
|
}
|
|
437
|
-
}, /*#__PURE__*/
|
|
418
|
+
}, /*#__PURE__*/React.createElement(Header, header)) : null;
|
|
438
419
|
var headerInScroll = submitState >= 4;
|
|
439
|
-
return /*#__PURE__*/
|
|
440
|
-
className:
|
|
420
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
421
|
+
className: classNames([styles.container, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, className, className !== null), styles.isPlaceholder, isPlaceholder), styles.submitting, submitState === 1), styles.submitted, submitState > 1), styles.showContributions, submitState === 4)]),
|
|
441
422
|
"data-screen-ready": true
|
|
442
|
-
}, /*#__PURE__*/
|
|
423
|
+
}, /*#__PURE__*/React.createElement(Container, {
|
|
443
424
|
width: width,
|
|
444
425
|
height: height,
|
|
445
426
|
className: styles.content
|
|
446
|
-
}, /*#__PURE__*/
|
|
427
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
447
428
|
className: styles.inner,
|
|
448
429
|
style: !isPlaceholder ? {
|
|
449
430
|
paddingLeft: spacing,
|
|
@@ -451,21 +432,21 @@ var ContributionScreen = function ContributionScreen(_ref) {
|
|
|
451
432
|
paddingTop: (!isPreview ? viewerTopHeight : 0) + (hasHeader ? spacing / 2 : spacing),
|
|
452
433
|
paddingBottom: (current && !isPreview ? viewerBottomHeight : 0) + spacing
|
|
453
434
|
} : null
|
|
454
|
-
}, !headerInScroll ? headerElement : null, /*#__PURE__*/
|
|
435
|
+
}, !headerInScroll ? headerElement : null, /*#__PURE__*/React.createElement(Scroll, {
|
|
455
436
|
verticalAlign: layout,
|
|
456
437
|
disabled: scrollingDisabled,
|
|
457
438
|
onScrolledBottom: onScrolledBottom,
|
|
458
439
|
onScrolledNotBottom: onScrolledNotBottom
|
|
459
|
-
}, headerInScroll ? headerElement : null, items), !isPlaceholder && hasFooter ? /*#__PURE__*/
|
|
440
|
+
}, headerInScroll ? headerElement : null, items), !isPlaceholder && hasFooter ? /*#__PURE__*/React.createElement("div", {
|
|
460
441
|
ref: footerRef,
|
|
461
|
-
className:
|
|
442
|
+
className: classNames([styles.footer, _defineProperty({}, styles.disabled, !swipeUpLinkActive)]),
|
|
462
443
|
style: {
|
|
463
444
|
paddingLeft: Math.max(viewerBottomSidesWidth, spacing / 2),
|
|
464
445
|
paddingRight: Math.max(viewerBottomSidesWidth, spacing / 2),
|
|
465
446
|
paddingTop: 0,
|
|
466
447
|
paddingBottom: (!isPreview ? viewerBottomHeight : 0) + spacing / 2
|
|
467
448
|
}
|
|
468
|
-
}, /*#__PURE__*/
|
|
449
|
+
}, /*#__PURE__*/React.createElement(Footer, footerProps)) : null)), !isPlaceholder ? /*#__PURE__*/React.createElement(Background, {
|
|
469
450
|
background: background,
|
|
470
451
|
width: width,
|
|
471
452
|
height: height,
|
|
@@ -646,4 +627,4 @@ var definition = {
|
|
|
646
627
|
};
|
|
647
628
|
|
|
648
629
|
exports.ContributionScreen = ContributionScreen;
|
|
649
|
-
exports
|
|
630
|
+
exports.default = definition;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/screen-contribution",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.429",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
@@ -32,6 +32,14 @@
|
|
|
32
32
|
"license": "ISC",
|
|
33
33
|
"main": "lib/index.js",
|
|
34
34
|
"module": "es/index.js",
|
|
35
|
+
"style": "assets/css/styles.css",
|
|
36
|
+
"exports": {
|
|
37
|
+
".": {
|
|
38
|
+
"require": "./lib/index.js",
|
|
39
|
+
"import": "./es/index.js"
|
|
40
|
+
},
|
|
41
|
+
"./assets/css/*.css": "./assets/css/*.css"
|
|
42
|
+
},
|
|
35
43
|
"files": [
|
|
36
44
|
"lib",
|
|
37
45
|
"es",
|
|
@@ -53,19 +61,19 @@
|
|
|
53
61
|
"@fortawesome/fontawesome-svg-core": "^1.2.32",
|
|
54
62
|
"@fortawesome/free-solid-svg-icons": "^5.15.1",
|
|
55
63
|
"@fortawesome/react-fontawesome": "^0.1.13",
|
|
56
|
-
"@micromag/core": "^0.3.
|
|
57
|
-
"@micromag/data": "^0.3.
|
|
58
|
-
"@micromag/element-background": "^0.3.
|
|
59
|
-
"@micromag/element-button": "^0.3.
|
|
60
|
-
"@micromag/element-container": "^0.3.
|
|
61
|
-
"@micromag/element-footer": "^0.3.
|
|
62
|
-
"@micromag/element-header": "^0.3.
|
|
63
|
-
"@micromag/element-heading": "^0.3.
|
|
64
|
-
"@micromag/element-scroll": "^0.3.
|
|
65
|
-
"@micromag/element-share-incentive": "^0.3.
|
|
66
|
-
"@micromag/element-text": "^0.3.
|
|
67
|
-
"@micromag/element-text-input": "^0.3.
|
|
68
|
-
"@micromag/transforms": "^0.3.
|
|
64
|
+
"@micromag/core": "^0.3.429",
|
|
65
|
+
"@micromag/data": "^0.3.429",
|
|
66
|
+
"@micromag/element-background": "^0.3.429",
|
|
67
|
+
"@micromag/element-button": "^0.3.429",
|
|
68
|
+
"@micromag/element-container": "^0.3.429",
|
|
69
|
+
"@micromag/element-footer": "^0.3.429",
|
|
70
|
+
"@micromag/element-header": "^0.3.429",
|
|
71
|
+
"@micromag/element-heading": "^0.3.429",
|
|
72
|
+
"@micromag/element-scroll": "^0.3.429",
|
|
73
|
+
"@micromag/element-share-incentive": "^0.3.429",
|
|
74
|
+
"@micromag/element-text": "^0.3.429",
|
|
75
|
+
"@micromag/element-text-input": "^0.3.429",
|
|
76
|
+
"@micromag/transforms": "^0.3.429",
|
|
69
77
|
"classnames": "^2.2.6",
|
|
70
78
|
"lodash": "^4.17.21",
|
|
71
79
|
"prop-types": "^15.7.2",
|
|
@@ -76,5 +84,5 @@
|
|
|
76
84
|
"access": "public",
|
|
77
85
|
"registry": "https://registry.npmjs.org/"
|
|
78
86
|
},
|
|
79
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "f15e72b88ecfda4c54b87626513149b58572c52b"
|
|
80
88
|
}
|