@micromag/screen-contribution 0.3.832 → 0.4.4

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.
@@ -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-buttonSkip:focus-visible,.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-layout{position:relative}.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-emptySkip,.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-buttonSkip,.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-buttonSkip{border:0;margin-top:20px}.micromag-screen-contribution-container .micromag-screen-contribution-buttonSkip.micromag-screen-contribution-showBack{margin-bottom:20px;margin-top:0}.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}.micromag-screen-contribution-reset{background-color:transparent;border:0;padding:10px;position:absolute;right:0;top:0;-webkit-transform-origin:center;-ms-transform-origin:center;transform-origin:center;-webkit-transition:opacity .15s ease-out,-webkit-transform .15s ease-out;transition:opacity .15s ease-out,-webkit-transform .15s ease-out;transition:opacity .15s ease-out,transform .15s ease-out;transition:opacity .15s ease-out,transform .15s ease-out,-webkit-transform .15s ease-out;z-index:1000}.micromag-screen-contribution-reset:hover{border:0;opacity:.8}.micromag-screen-contribution-reset:hover:active{-webkit-transform:rotate(30deg);-ms-transform:rotate(30deg);transform:rotate(30deg)}
1
+ .container{position:relative}.container .background{height:100%;left:0;position:absolute;top:0;width:100%;z-index:0}.container .content{z-index:1}.container .inner{height:100%;left:0;position:absolute;top:0;width:100%}.container .layout{position:relative}.container .header{left:0;position:relative;top:0;width:100%}@-webkit-keyframes rotate{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes rotate{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.container .emptyInputMessage,.container .emptyInputName,.container .emptySkip,.container .emptySubmit,.container .emptyTitle{margin-bottom:10px;padding:10px}.container .emptyInputMessage{height:100px}.container .title{padding-bottom:20px}.container .interactiveContainer{-webkit-transition-property:height;transition-property:height;-webkit-transition-timing-function:ease;transition-timing-function:ease}.container .form{position:relative}.container .buttonSkip,.container .buttonSubmit,.container .inputMessage,.container .inputName{display:block;padding:4px;width:100%}.container .inputMessage,.container .inputName{margin-bottom:10px}.container .inputMessage{height:100px}.container .buttonSubmit:focus-visible{outline:3px solid var(--mm-purple);outline-offset:4px}.container .buttonSubmit{border:0}.container .buttonSubmit:disabled{opacity:1}.container .buttonSkip:focus-visible{outline:3px solid var(--mm-purple);outline-offset:4px}.container .buttonSkip{border:0;margin-top:20px}.container .buttonSkip.showBack{margin-bottom:20px;margin-top:0}.container .formContent{-webkit-transition-property:opacity;transition-property:opacity;-webkit-transition-timing-function:ease;transition-timing-function:ease}.container .formLoading{-webkit-animation:rotate 1s linear infinite;animation: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}.container .formLoading .loadingIcon{display:block;height:100%;width:100%}.container .contributionsContainer{opacity:0;position:relative;-webkit-transition:opacity .25s ease;transition:opacity .25s ease}.container .contributionsContent{height:0;overflow:hidden;position:absolute;width:100%}.container .contributions{position:relative}.container .contribution{border-bottom:1px solid var(--mm-white);margin-bottom:20px;padding-bottom:20px}.container .contribution:first-child{border-top:1px solid var(--mm-white);padding-top:20px}.container .contribution:last-child{border-bottom:0;margin-bottom:0;padding-bottom:0}.container .footer{bottom:0;left:0;position:absolute;-webkit-transition:opacity .2s ease-out;transition:opacity .2s ease-out;width:100%}.container .footer.disabled{opacity:0;pointer-events:none}.container.submitting .form{pointer-events:none}.container.submitting .formContent{opacity:.4}.container.submitting .formLoading{opacity:1}.container.submitted .formContent{opacity:0}.container.showContributions .form{display:none}.container.showContributions .contributionsContainer{opacity:1}.container.showContributions .contributionsContent{height:auto;overflow:visible;position:relative}.container.isPlaceholder .inner,.reset{padding:10px}.reset{background-color:transparent;border:0;position:absolute;right:0;top:0;-webkit-transform-origin:center;-ms-transform-origin:center;transform-origin:center;-webkit-transition:opacity .15s ease-out,-webkit-transform .15s ease-out;transition:opacity .15s ease-out,-webkit-transform .15s ease-out;transition:opacity .15s ease-out,transform .15s ease-out;transition:opacity .15s ease-out,transform .15s ease-out,-webkit-transform .15s ease-out;z-index:1000}.reset:hover{border:0;opacity:.8}.reset:hover:active{-webkit-transform:rotate(30deg);-ms-transform:rotate(30deg);transform:rotate(30deg)}
package/es/index.d.ts ADDED
@@ -0,0 +1,194 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { HeadingElement, InputElement, TextElement, TextStyle, ButtonElement, BackgroundElement, Header, Footer, Transitions } from '@micromag/core';
3
+
4
+ interface ContributionScreenProps {
5
+ id?: string | null;
6
+ layout?: 'top' | 'middle' | 'bottom';
7
+ title?: HeadingElement | null;
8
+ name?: InputElement | null;
9
+ message?: InputElement | null;
10
+ submit?: TextElement | null;
11
+ nameStyle?: TextStyle | null;
12
+ messageStyle?: TextStyle | null;
13
+ settings?: {
14
+ canViewAnswers?: boolean;
15
+ answerButton?: ButtonElement;
16
+ contributionButton?: ButtonElement;
17
+ } | null;
18
+ spacing?: number;
19
+ background?: BackgroundElement | null;
20
+ header?: Header | null;
21
+ footer?: Footer | null;
22
+ current?: boolean;
23
+ preload?: boolean;
24
+ transitions?: Transitions | null;
25
+ transitionStagger?: number;
26
+ resizeTransitionDuration?: number;
27
+ type?: string | null;
28
+ className?: string | null;
29
+ }
30
+ declare function ContributionScreen({ id, layout, title, name, message, submit, nameStyle, messageStyle, settings, spacing, background, header, footer, current, preload, transitions, transitionStagger, resizeTransitionDuration, type, className, }: ContributionScreenProps): react_jsx_runtime.JSX.Element;
31
+
32
+ declare const _default: {
33
+ id: string;
34
+ type: string;
35
+ group: {
36
+ label: {
37
+ defaultMessage: string;
38
+ description: string;
39
+ };
40
+ order: number;
41
+ };
42
+ title: {
43
+ defaultMessage: string;
44
+ description: string;
45
+ };
46
+ component: typeof ContributionScreen;
47
+ layouts: string[];
48
+ fields: ({
49
+ name: string;
50
+ type: string;
51
+ defaultValue: string;
52
+ label: {
53
+ defaultMessage: string;
54
+ description: string;
55
+ };
56
+ theme?: undefined;
57
+ component?: undefined;
58
+ toggleField?: undefined;
59
+ isList?: undefined;
60
+ fields?: undefined;
61
+ } | {
62
+ name: string;
63
+ type: string;
64
+ theme: {
65
+ textStyle: string;
66
+ style?: undefined;
67
+ badge?: undefined;
68
+ callToAction?: undefined;
69
+ };
70
+ label: {
71
+ defaultMessage: string;
72
+ description: string;
73
+ };
74
+ defaultValue?: undefined;
75
+ component?: undefined;
76
+ toggleField?: undefined;
77
+ isList?: undefined;
78
+ fields?: undefined;
79
+ } | {
80
+ name: string;
81
+ type: string;
82
+ theme: {
83
+ style: {
84
+ textStyle: string;
85
+ };
86
+ textStyle?: undefined;
87
+ badge?: undefined;
88
+ callToAction?: undefined;
89
+ };
90
+ label: {
91
+ defaultMessage: string;
92
+ description: string;
93
+ };
94
+ defaultValue?: undefined;
95
+ component?: undefined;
96
+ toggleField?: undefined;
97
+ isList?: undefined;
98
+ fields?: undefined;
99
+ } | {
100
+ name: string;
101
+ component: string;
102
+ toggleField: string;
103
+ isList: boolean;
104
+ label: {
105
+ defaultMessage: string;
106
+ description: string;
107
+ };
108
+ fields: ({
109
+ name: string;
110
+ type: string;
111
+ isHorizontal: boolean;
112
+ label: {
113
+ defaultMessage: string;
114
+ description: string;
115
+ };
116
+ theme?: undefined;
117
+ } | {
118
+ name: string;
119
+ type: string;
120
+ theme: {
121
+ textStyle: string;
122
+ };
123
+ label: {
124
+ defaultMessage: string;
125
+ description: string;
126
+ };
127
+ isHorizontal?: undefined;
128
+ })[];
129
+ type?: undefined;
130
+ defaultValue?: undefined;
131
+ theme?: undefined;
132
+ } | {
133
+ name: string;
134
+ type: string;
135
+ label: {
136
+ defaultMessage: string;
137
+ description: string;
138
+ };
139
+ defaultValue?: undefined;
140
+ theme?: undefined;
141
+ component?: undefined;
142
+ toggleField?: undefined;
143
+ isList?: undefined;
144
+ fields?: undefined;
145
+ } | {
146
+ name: string;
147
+ type: string;
148
+ label: {
149
+ defaultMessage: string;
150
+ description: string;
151
+ };
152
+ theme: {
153
+ badge: {
154
+ label: {
155
+ textStyle: string;
156
+ };
157
+ boxStyle: string;
158
+ };
159
+ textStyle?: undefined;
160
+ style?: undefined;
161
+ callToAction?: undefined;
162
+ };
163
+ defaultValue?: undefined;
164
+ component?: undefined;
165
+ toggleField?: undefined;
166
+ isList?: undefined;
167
+ fields?: undefined;
168
+ } | {
169
+ name: string;
170
+ type: string;
171
+ label: {
172
+ defaultMessage: string;
173
+ description: string;
174
+ };
175
+ theme: {
176
+ callToAction: {
177
+ label: {
178
+ textStyle: string;
179
+ };
180
+ boxStyle: string;
181
+ };
182
+ textStyle?: undefined;
183
+ style?: undefined;
184
+ badge?: undefined;
185
+ };
186
+ defaultValue?: undefined;
187
+ component?: undefined;
188
+ toggleField?: undefined;
189
+ isList?: undefined;
190
+ fields?: undefined;
191
+ })[];
192
+ };
193
+
194
+ export { ContributionScreen, _default as default };
package/es/index.js CHANGED
@@ -8,9 +8,7 @@ import { faSpinner } from '@fortawesome/free-solid-svg-icons/faSpinner';
8
8
  import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
9
9
  import classNames from 'classnames';
10
10
  import DOMPurify from 'dompurify';
11
- import PropTypes from 'prop-types';
12
11
  import React, { useRef, useState, useCallback, useEffect } from 'react';
13
- import { PropTypes as PropTypes$1 } from '@micromag/core';
14
12
  import { ScreenElement, Transitions } from '@micromag/core/components';
15
13
  import { useScreenSize, useViewerContext, useScreenRenderContext, useViewerWebView, usePlaybackContext, usePlaybackMediaRef } from '@micromag/core/contexts';
16
14
  import { useTrackScreenEvent, useDimensionObserver } from '@micromag/core/hooks';
@@ -27,77 +25,49 @@ import Scroll from '@micromag/element-scroll';
27
25
  import Text from '@micromag/element-text';
28
26
  import TextInput from '@micromag/element-text-input';
29
27
 
30
- var styles = {"container":"micromag-screen-contribution-container","inner":"micromag-screen-contribution-inner","background":"micromag-screen-contribution-background","buttonSkip":"micromag-screen-contribution-buttonSkip","buttonSubmit":"micromag-screen-contribution-buttonSubmit","content":"micromag-screen-contribution-content","layout":"micromag-screen-contribution-layout","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","emptySkip":"micromag-screen-contribution-emptySkip","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","showBack":"micromag-screen-contribution-showBack","formContent":"micromag-screen-contribution-formContent","formLoading":"micromag-screen-contribution-formLoading","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","reset":"micromag-screen-contribution-reset"};
28
+ var styles = {"container":"container","background":"background","content":"content","inner":"inner","layout":"layout","header":"header","emptyTitle":"emptyTitle","emptyInputName":"emptyInputName","emptyInputMessage":"emptyInputMessage","emptySubmit":"emptySubmit","emptySkip":"emptySkip","title":"title","interactiveContainer":"interactiveContainer","form":"form","inputName":"inputName","inputMessage":"inputMessage","buttonSubmit":"buttonSubmit","buttonSkip":"buttonSkip","showBack":"showBack","formContent":"formContent","formLoading":"formLoading","loadingIcon":"loadingIcon","contributionsContainer":"contributionsContainer","contributionsContent":"contributionsContent","contributions":"contributions","contribution":"contribution","footer":"footer","disabled":"disabled","submitting":"submitting","submitted":"submitted","showContributions":"showContributions","isPlaceholder":"isPlaceholder","reset":"reset"};
31
29
 
32
- var propTypes = {
33
- id: PropTypes.string,
34
- layout: PropTypes.oneOf(['top', 'middle', 'bottom']),
35
- title: PropTypes$1.headingElement,
36
- name: PropTypes$1.inputElement,
37
- message: PropTypes$1.inputElement,
38
- submit: PropTypes$1.textElement,
39
- nameStyle: PropTypes$1.textStyle,
40
- messageStyle: PropTypes$1.textStyle,
41
- settings: PropTypes.shape({
42
- canViewAnswers: PropTypes.bool,
43
- answerButton: PropTypes$1.buttonElement,
44
- contributionButton: PropTypes$1.buttonElement
45
- }),
46
- spacing: PropTypes.number,
47
- background: PropTypes$1.backgroundElement,
48
- header: PropTypes$1.header,
49
- footer: PropTypes$1.footer,
50
- current: PropTypes.bool,
51
- preload: PropTypes.bool,
52
- transitions: PropTypes$1.transitions,
53
- transitionStagger: PropTypes.number,
54
- resizeTransitionDuration: PropTypes.number,
55
- type: PropTypes.string,
56
- className: PropTypes.string
57
- };
58
- var defaultProps = {
59
- id: null,
60
- layout: 'middle',
61
- title: null,
62
- name: null,
63
- message: null,
64
- submit: null,
65
- nameStyle: null,
66
- messageStyle: null,
67
- settings: null,
68
- spacing: 20,
69
- background: null,
70
- header: null,
71
- footer: null,
72
- current: true,
73
- preload: true,
74
- transitions: null,
75
- transitionStagger: 100,
76
- resizeTransitionDuration: 750,
77
- type: null,
78
- className: null
79
- };
80
- var ContributionScreen = function ContributionScreen(_ref) {
81
- var id = _ref.id,
82
- layout = _ref.layout,
83
- title = _ref.title,
84
- name = _ref.name,
85
- message = _ref.message,
86
- submit = _ref.submit,
87
- nameStyle = _ref.nameStyle,
88
- messageStyle = _ref.messageStyle,
89
- settings = _ref.settings,
90
- spacing = _ref.spacing,
91
- background = _ref.background,
92
- header = _ref.header,
93
- footer = _ref.footer,
94
- current = _ref.current,
95
- preload = _ref.preload,
96
- transitions = _ref.transitions,
97
- transitionStagger = _ref.transitionStagger,
98
- resizeTransitionDuration = _ref.resizeTransitionDuration,
99
- type = _ref.type,
100
- className = _ref.className;
30
+ function ContributionScreen(_ref) {
31
+ var _ref$id = _ref.id,
32
+ id = _ref$id === void 0 ? null : _ref$id,
33
+ _ref$layout = _ref.layout,
34
+ layout = _ref$layout === void 0 ? 'middle' : _ref$layout,
35
+ _ref$title = _ref.title,
36
+ title = _ref$title === void 0 ? null : _ref$title,
37
+ _ref$name = _ref.name,
38
+ name = _ref$name === void 0 ? null : _ref$name,
39
+ _ref$message = _ref.message,
40
+ message = _ref$message === void 0 ? null : _ref$message,
41
+ _ref$submit = _ref.submit,
42
+ submit = _ref$submit === void 0 ? null : _ref$submit,
43
+ _ref$nameStyle = _ref.nameStyle,
44
+ nameStyle = _ref$nameStyle === void 0 ? null : _ref$nameStyle,
45
+ _ref$messageStyle = _ref.messageStyle,
46
+ messageStyle = _ref$messageStyle === void 0 ? null : _ref$messageStyle,
47
+ _ref$settings = _ref.settings,
48
+ settings = _ref$settings === void 0 ? null : _ref$settings,
49
+ _ref$spacing = _ref.spacing,
50
+ spacing = _ref$spacing === void 0 ? 20 : _ref$spacing,
51
+ _ref$background = _ref.background,
52
+ background = _ref$background === void 0 ? null : _ref$background,
53
+ _ref$header = _ref.header,
54
+ header = _ref$header === void 0 ? null : _ref$header,
55
+ _ref$footer = _ref.footer,
56
+ footer = _ref$footer === void 0 ? null : _ref$footer,
57
+ _ref$current = _ref.current,
58
+ current = _ref$current === void 0 ? true : _ref$current,
59
+ _ref$preload = _ref.preload,
60
+ preload = _ref$preload === void 0 ? true : _ref$preload,
61
+ _ref$transitions = _ref.transitions,
62
+ transitions = _ref$transitions === void 0 ? null : _ref$transitions,
63
+ _ref$transitionStagge = _ref.transitionStagger,
64
+ transitionStagger = _ref$transitionStagge === void 0 ? 100 : _ref$transitionStagge,
65
+ _ref$resizeTransition = _ref.resizeTransitionDuration,
66
+ resizeTransitionDuration = _ref$resizeTransition === void 0 ? 750 : _ref$resizeTransition,
67
+ _ref$type = _ref.type,
68
+ type = _ref$type === void 0 ? null : _ref$type,
69
+ _ref$className = _ref.className,
70
+ className = _ref$className === void 0 ? null : _ref$className;
101
71
  var intl = useIntl();
102
72
  var screenId = id || 'screen-id';
103
73
  var trackScreenEvent = useTrackScreenEvent(type);
@@ -560,9 +530,7 @@ var ContributionScreen = function ContributionScreen(_ref) {
560
530
  withoutVideo: isPreview,
561
531
  className: styles.background
562
532
  }) : null);
563
- };
564
- ContributionScreen.propTypes = propTypes;
565
- ContributionScreen.defaultProps = defaultProps;
533
+ }
566
534
 
567
535
  var definition = {
568
536
  id: 'contribution',
package/es/styles.css ADDED
@@ -0,0 +1 @@
1
+ .container{position:relative}.container .background{height:100%;left:0;position:absolute;top:0;width:100%;z-index:0}.container .content{z-index:1}.container .inner{height:100%;left:0;position:absolute;top:0;width:100%}.container .layout{position:relative}.container .header{left:0;position:relative;top:0;width:100%}@-webkit-keyframes rotate{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes rotate{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.container .emptyInputMessage,.container .emptyInputName,.container .emptySkip,.container .emptySubmit,.container .emptyTitle{margin-bottom:10px;padding:10px}.container .emptyInputMessage{height:100px}.container .title{padding-bottom:20px}.container .interactiveContainer{-webkit-transition-property:height;transition-property:height;-webkit-transition-timing-function:ease;transition-timing-function:ease}.container .form{position:relative}.container .buttonSkip,.container .buttonSubmit,.container .inputMessage,.container .inputName{display:block;padding:4px;width:100%}.container .inputMessage,.container .inputName{margin-bottom:10px}.container .inputMessage{height:100px}.container .buttonSubmit:focus-visible{outline:3px solid var(--mm-purple);outline-offset:4px}.container .buttonSubmit{border:0}.container .buttonSubmit:disabled{opacity:1}.container .buttonSkip:focus-visible{outline:3px solid var(--mm-purple);outline-offset:4px}.container .buttonSkip{border:0;margin-top:20px}.container .buttonSkip.showBack{margin-bottom:20px;margin-top:0}.container .formContent{-webkit-transition-property:opacity;transition-property:opacity;-webkit-transition-timing-function:ease;transition-timing-function:ease}.container .formLoading{-webkit-animation:rotate 1s linear infinite;animation: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}.container .formLoading .loadingIcon{display:block;height:100%;width:100%}.container .contributionsContainer{opacity:0;position:relative;-webkit-transition:opacity .25s ease;transition:opacity .25s ease}.container .contributionsContent{height:0;overflow:hidden;position:absolute;width:100%}.container .contributions{position:relative}.container .contribution{border-bottom:1px solid var(--mm-white);margin-bottom:20px;padding-bottom:20px}.container .contribution:first-child{border-top:1px solid var(--mm-white);padding-top:20px}.container .contribution:last-child{border-bottom:0;margin-bottom:0;padding-bottom:0}.container .footer{bottom:0;left:0;position:absolute;-webkit-transition:opacity .2s ease-out;transition:opacity .2s ease-out;width:100%}.container .footer.disabled{opacity:0;pointer-events:none}.container.submitting .form{pointer-events:none}.container.submitting .formContent{opacity:.4}.container.submitting .formLoading{opacity:1}.container.submitted .formContent{opacity:0}.container.showContributions .form{display:none}.container.showContributions .contributionsContainer{opacity:1}.container.showContributions .contributionsContent{height:auto;overflow:visible;position:relative}.container.isPlaceholder .inner,.reset{padding:10px}.reset{background-color:transparent;border:0;position:absolute;right:0;top:0;-webkit-transform-origin:center;-ms-transform-origin:center;transform-origin:center;-webkit-transition:opacity .15s ease-out,-webkit-transform .15s ease-out;transition:opacity .15s ease-out,-webkit-transform .15s ease-out;transition:opacity .15s ease-out,transform .15s ease-out;transition:opacity .15s ease-out,transform .15s ease-out,-webkit-transform .15s ease-out;z-index:1000}.reset:hover{border:0;opacity:.8}.reset:hover:active{-webkit-transform:rotate(30deg);-ms-transform:rotate(30deg);transform:rotate(30deg)}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/screen-contribution",
3
- "version": "0.3.832",
3
+ "version": "0.4.4",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [
@@ -35,6 +35,7 @@
35
35
  "style": "assets/css/styles.css",
36
36
  "exports": {
37
37
  ".": {
38
+ "types": "./es/index.d.ts",
38
39
  "import": "./es/index.js"
39
40
  },
40
41
  "./assets/css/styles": "./assets/css/styles.css",
@@ -48,45 +49,45 @@
48
49
  "scripts": {
49
50
  "clean": "rm -rf es && rm -rf lib && rm -rf assets",
50
51
  "prepublishOnly": "npm run build",
51
- "build": "../../scripts/prepare-package.sh"
52
+ "build": "../../scripts/prepare-package.sh --types"
52
53
  },
53
54
  "devDependencies": {
54
- "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
55
- "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
55
+ "react": "^19.2.0",
56
+ "react-dom": "^18.3.0 || ^19.0.0"
56
57
  },
57
58
  "peerDependencies": {
58
- "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
59
- "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
59
+ "react": "^19.2.0",
60
+ "react-dom": "^18.3.0 || ^19.0.0"
60
61
  },
61
62
  "dependencies": {
62
63
  "@babel/runtime": "^7.13.10",
63
64
  "@fortawesome/fontawesome-svg-core": "^6.5.2",
64
65
  "@fortawesome/free-solid-svg-icons": "^6.5.2",
65
66
  "@fortawesome/react-fontawesome": "^0.2.0",
66
- "@micromag/core": "^0.3.832",
67
- "@micromag/data": "^0.3.832",
68
- "@micromag/element-background": "^0.3.832",
69
- "@micromag/element-button": "^0.3.832",
70
- "@micromag/element-container": "^0.3.832",
71
- "@micromag/element-footer": "^0.3.832",
72
- "@micromag/element-header": "^0.3.832",
73
- "@micromag/element-heading": "^0.3.832",
74
- "@micromag/element-layout": "^0.3.832",
75
- "@micromag/element-scroll": "^0.3.832",
76
- "@micromag/element-share-incentive": "^0.3.832",
77
- "@micromag/element-text": "^0.3.832",
78
- "@micromag/element-text-input": "^0.3.832",
79
- "@micromag/transforms": "^0.3.832",
67
+ "@micromag/core": "^0.4.4",
68
+ "@micromag/data": "^0.4.4",
69
+ "@micromag/element-background": "^0.4.4",
70
+ "@micromag/element-button": "^0.4.4",
71
+ "@micromag/element-container": "^0.4.4",
72
+ "@micromag/element-footer": "^0.4.4",
73
+ "@micromag/element-header": "^0.4.4",
74
+ "@micromag/element-heading": "^0.4.4",
75
+ "@micromag/element-layout": "^0.4.4",
76
+ "@micromag/element-scroll": "^0.4.4",
77
+ "@micromag/element-share-incentive": "^0.4.4",
78
+ "@micromag/element-text": "^0.4.4",
79
+ "@micromag/element-text-input": "^0.4.4",
80
+ "@micromag/transforms": "^0.4.4",
80
81
  "classnames": "^2.2.6",
81
82
  "dompurify": "^3.2.6",
82
- "lodash": "^4.17.21",
83
- "prop-types": "^15.7.2",
84
- "react-intl": "^6.6.4",
83
+ "lodash": "^4.17.23",
84
+ "react-intl": "^8.1.3",
85
85
  "uuid": "^9.0.0"
86
86
  },
87
87
  "publishConfig": {
88
88
  "access": "public",
89
89
  "registry": "https://registry.npmjs.org/"
90
90
  },
91
- "gitHead": "4969d64e304334cfd47321e624e5914e0694c55f"
91
+ "gitHead": "04b8519c3a3ddace5a21497e22faa11865d57f6d",
92
+ "types": "es/index.d.ts"
92
93
  }