@micromag/core 0.3.7 → 0.3.10
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 +3 -2
- package/es/components.js +444 -316
- package/lib/components.js +442 -313
- package/package.json +3 -2
package/es/components.js
CHANGED
|
@@ -11,8 +11,8 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
|
11
11
|
import { faAngleLeft, faAngleUp, faAngleDown, faAd, faImage, faMusic, faMapMarkerAlt, faMapMarkedAlt, faVideo, faPlay, faRedo, faCommentDots, faCheck, faTimes, faPercent } from '@fortawesome/free-solid-svg-icons';
|
|
12
12
|
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
13
13
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
14
|
-
import { useForm, useDocumentEvent, useIntersectionObserver } from '@micromag/core/hooks';
|
|
15
|
-
import { useFieldsManager, useFieldComponent, FieldContextProvider, withModals, useModals, useUppy, withPanels, usePanels, useScreenComponent, ScreenProvider,
|
|
14
|
+
import { useForm, useDocumentEvent, useIntersectionObserver, useResizeObserver } from '@micromag/core/hooks';
|
|
15
|
+
import { useFieldsManager, useFieldComponent, FieldContextProvider, withModals, useModals, useUppy, withPanels, usePanels, ScreenSizeProvider, useScreenComponent, ScreenProvider, useScreenRenderContext, useScreenSize } from '@micromag/core/contexts';
|
|
16
16
|
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
17
17
|
import get from 'lodash/get';
|
|
18
18
|
import ReactDOM from 'react-dom';
|
|
@@ -25,17 +25,18 @@ import { Helmet } from 'react-helmet';
|
|
|
25
25
|
import isString from 'lodash/isString';
|
|
26
26
|
import 'snake-case';
|
|
27
27
|
import isNumber from 'lodash/isNumber';
|
|
28
|
+
import { getSizeWithinBounds } from '@folklore/size';
|
|
28
29
|
import { useSpring } from '@react-spring/core';
|
|
29
30
|
import { animated } from '@react-spring/web';
|
|
30
31
|
|
|
31
32
|
/* eslint-disable react/jsx-props-no-spreading */
|
|
32
|
-
var propTypes$
|
|
33
|
+
var propTypes$K = {
|
|
33
34
|
children: PropTypes.label.isRequired,
|
|
34
35
|
isHtml: PropTypes$1.bool,
|
|
35
36
|
values: PropTypes$1.object // eslint-disable-line react/forbid-prop-types
|
|
36
37
|
|
|
37
38
|
};
|
|
38
|
-
var defaultProps$
|
|
39
|
+
var defaultProps$K = {
|
|
39
40
|
isHtml: false,
|
|
40
41
|
values: {}
|
|
41
42
|
};
|
|
@@ -50,13 +51,13 @@ var Label = function Label(_ref) {
|
|
|
50
51
|
}, children)) : children;
|
|
51
52
|
};
|
|
52
53
|
|
|
53
|
-
Label.propTypes = propTypes$
|
|
54
|
-
Label.defaultProps = defaultProps$
|
|
54
|
+
Label.propTypes = propTypes$K;
|
|
55
|
+
Label.defaultProps = defaultProps$K;
|
|
55
56
|
|
|
56
|
-
var styles$
|
|
57
|
+
var styles$v = {"container":"micromag-core-buttons-button-container","asLink":"micromag-core-buttons-button-asLink","withoutStyle":"micromag-core-buttons-button-withoutStyle","icon":"micromag-core-buttons-button-icon","withIcon":"micromag-core-buttons-button-withIcon","label":"micromag-core-buttons-button-label","right":"micromag-core-buttons-button-right","withIconColumns":"micromag-core-buttons-button-withIconColumns","linkDisabled":"micromag-core-buttons-button-linkDisabled"};
|
|
57
58
|
|
|
58
|
-
var _excluded$
|
|
59
|
-
var propTypes$
|
|
59
|
+
var _excluded$a = ["type", "theme", "size", "href", "external", "direct", "target", "label", "children", "focusable", "active", "icon", "iconPosition", "disabled", "loading", "disableOnLoading", "small", "big", "withShadow", "withoutStyle", "withoutTheme", "asLink", "outline", "onClick", "className", "iconClassName", "labelClassName", "refButton"];
|
|
60
|
+
var propTypes$J = {
|
|
60
61
|
type: PropTypes$1.string,
|
|
61
62
|
theme: PropTypes.buttonTheme,
|
|
62
63
|
size: PropTypes.buttonSize,
|
|
@@ -89,7 +90,7 @@ var propTypes$I = {
|
|
|
89
90
|
|
|
90
91
|
})])
|
|
91
92
|
};
|
|
92
|
-
var defaultProps$
|
|
93
|
+
var defaultProps$J = {
|
|
93
94
|
type: 'button',
|
|
94
95
|
theme: null,
|
|
95
96
|
size: null,
|
|
@@ -151,7 +152,7 @@ var Button$1 = function Button(_ref) {
|
|
|
151
152
|
iconClassName = _ref.iconClassName,
|
|
152
153
|
labelClassName = _ref.labelClassName,
|
|
153
154
|
refButton = _ref.refButton,
|
|
154
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
155
|
+
props = _objectWithoutProperties(_ref, _excluded$a);
|
|
155
156
|
|
|
156
157
|
var finalLabel = label || children;
|
|
157
158
|
var text = finalLabel !== null ? /*#__PURE__*/React.createElement(Label, null, finalLabel) : null;
|
|
@@ -160,25 +161,25 @@ var Button$1 = function Button(_ref) {
|
|
|
160
161
|
var hasInlineIcon = hasIcon && (iconPosition === 'inline' || text === null);
|
|
161
162
|
var hasIconColumns = hasIcon && !hasInlineIcon;
|
|
162
163
|
var content = /*#__PURE__*/React.createElement(React.Fragment, null, hasInlineIcon ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
163
|
-
className: classNames([styles$
|
|
164
|
+
className: classNames([styles$v.icon, _defineProperty({}, iconClassName, iconClassName !== null)])
|
|
164
165
|
}, icon), text !== null ? /*#__PURE__*/React.createElement("span", {
|
|
165
|
-
className: classNames([styles$
|
|
166
|
+
className: classNames([styles$v.label, _defineProperty({}, labelClassName, labelClassName !== null)])
|
|
166
167
|
}, text) : null) : null, hasIconColumns ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
167
|
-
className: classNames([styles$
|
|
168
|
+
className: classNames([styles$v.left, _defineProperty({}, iconClassName, iconClassName !== null && iconPosition === 'left')])
|
|
168
169
|
}, iconPosition === 'left' ? icon : null), /*#__PURE__*/React.createElement("span", {
|
|
169
|
-
className: classNames([styles$
|
|
170
|
+
className: classNames([styles$v.center, _defineProperty({}, labelClassName, labelClassName !== null)])
|
|
170
171
|
}, text), /*#__PURE__*/React.createElement("span", {
|
|
171
|
-
className: classNames([styles$
|
|
172
|
+
className: classNames([styles$v.right, _defineProperty({}, iconClassName, iconClassName !== null && iconPosition === 'right')])
|
|
172
173
|
}, iconPosition === 'right' ? icon : null), hasChildren ? children : null) : null, !hasIcon ? text : null, hasChildren ? children : null);
|
|
173
174
|
var withStyle = !withoutTheme && !withoutStyle && !asLink;
|
|
174
175
|
var buttonClassNames = classNames([(_ref7 = {
|
|
175
176
|
btn: withStyle
|
|
176
|
-
}, _defineProperty(_ref7, "btn-".concat(outline ? 'outline-' : '').concat(theme), withStyle && theme !== null), _defineProperty(_ref7, "btn-".concat(size), withStyle && size !== null), _defineProperty(_ref7, "active", !withoutStyle && active), _ref7), styles$
|
|
177
|
+
}, _defineProperty(_ref7, "btn-".concat(outline ? 'outline-' : '').concat(theme), withStyle && theme !== null), _defineProperty(_ref7, "btn-".concat(size), withStyle && size !== null), _defineProperty(_ref7, "active", !withoutStyle && active), _ref7), styles$v.container, (_ref8 = {}, _defineProperty(_ref8, styles$v.withoutStyle, withoutStyle), _defineProperty(_ref8, styles$v.withIcon, hasIcon), _defineProperty(_ref8, styles$v.withIconColumns, hasIconColumns), _defineProperty(_ref8, styles$v.withText, text !== null), _defineProperty(_ref8, styles$v.withShadow, withShadow), _defineProperty(_ref8, styles$v.isSmall, small), _defineProperty(_ref8, styles$v.isBig, big), _defineProperty(_ref8, styles$v.isLink, href !== null), _defineProperty(_ref8, styles$v.asLink, asLink), _defineProperty(_ref8, styles$v.isDisabled, disabled), _defineProperty(_ref8, styles$v.isLoading, loading), _defineProperty(_ref8, className, className !== null), _ref8)]);
|
|
177
178
|
|
|
178
179
|
if (href !== null) {
|
|
179
180
|
var linkClassNames = classNames([buttonClassNames, _defineProperty({
|
|
180
181
|
disabled: disabled
|
|
181
|
-
}, styles$
|
|
182
|
+
}, styles$v.linkDisabled, disabled)]);
|
|
182
183
|
return external || direct ? /*#__PURE__*/React.createElement("a", Object.assign({}, props, {
|
|
183
184
|
href: disabled ? null : href,
|
|
184
185
|
className: linkClassNames,
|
|
@@ -205,13 +206,13 @@ var Button$1 = function Button(_ref) {
|
|
|
205
206
|
}), content);
|
|
206
207
|
};
|
|
207
208
|
|
|
208
|
-
Button$1.propTypes = propTypes$
|
|
209
|
-
Button$1.defaultProps = defaultProps$
|
|
209
|
+
Button$1.propTypes = propTypes$J;
|
|
210
|
+
Button$1.defaultProps = defaultProps$J;
|
|
210
211
|
|
|
211
|
-
var styles$
|
|
212
|
+
var styles$u = {};
|
|
212
213
|
|
|
213
|
-
var _excluded$
|
|
214
|
-
var propTypes$
|
|
214
|
+
var _excluded$9 = ["className", "onClick", "theme"];
|
|
215
|
+
var propTypes$I = {
|
|
215
216
|
buttons: PropTypes.buttons,
|
|
216
217
|
size: PropTypes.buttonSize,
|
|
217
218
|
theme: PropTypes.buttonTheme,
|
|
@@ -220,7 +221,7 @@ var propTypes$H = {
|
|
|
220
221
|
className: PropTypes$1.string,
|
|
221
222
|
buttonClassName: PropTypes$1.string
|
|
222
223
|
};
|
|
223
|
-
var defaultProps$
|
|
224
|
+
var defaultProps$I = {
|
|
224
225
|
buttons: [],
|
|
225
226
|
size: null,
|
|
226
227
|
theme: undefined,
|
|
@@ -239,7 +240,7 @@ var Buttons = function Buttons(_ref) {
|
|
|
239
240
|
buttonClassName = _ref.buttonClassName,
|
|
240
241
|
className = _ref.className;
|
|
241
242
|
return /*#__PURE__*/React.createElement("div", {
|
|
242
|
-
className: classNames(['btn-group', _defineProperty({}, "btn-group-".concat(size), size !== null), styles$
|
|
243
|
+
className: classNames(['btn-group', _defineProperty({}, "btn-group-".concat(size), size !== null), styles$u.container, _defineProperty({}, className, className !== null)]),
|
|
243
244
|
role: "group"
|
|
244
245
|
}, buttons.map(function (button, index) {
|
|
245
246
|
var _ref4;
|
|
@@ -250,11 +251,11 @@ var Buttons = function Buttons(_ref) {
|
|
|
250
251
|
_onClick = _button$onClick === void 0 ? null : _button$onClick,
|
|
251
252
|
_button$theme = button.theme,
|
|
252
253
|
buttonTheme = _button$theme === void 0 ? null : _button$theme,
|
|
253
|
-
buttonProps = _objectWithoutProperties(button, _excluded$
|
|
254
|
+
buttonProps = _objectWithoutProperties(button, _excluded$9);
|
|
254
255
|
|
|
255
256
|
var fixedProps = {
|
|
256
257
|
key: "button-".concat(index),
|
|
257
|
-
className: classNames([styles$
|
|
258
|
+
className: classNames([styles$u.button, (_ref4 = {}, _defineProperty(_ref4, buttonClassName, buttonClassName !== null), _defineProperty(_ref4, customClassName, customClassName !== null), _ref4)]),
|
|
258
259
|
onClick: function onClick(e) {
|
|
259
260
|
if (_onClick !== null) {
|
|
260
261
|
_onClick(e, button, index);
|
|
@@ -270,20 +271,20 @@ var Buttons = function Buttons(_ref) {
|
|
|
270
271
|
}));
|
|
271
272
|
};
|
|
272
273
|
|
|
273
|
-
Buttons.propTypes = propTypes$
|
|
274
|
-
Buttons.defaultProps = defaultProps$
|
|
274
|
+
Buttons.propTypes = propTypes$I;
|
|
275
|
+
Buttons.defaultProps = defaultProps$I;
|
|
275
276
|
|
|
276
|
-
var _excluded$
|
|
277
|
-
var propTypes$
|
|
277
|
+
var _excluded$8 = ["className"];
|
|
278
|
+
var propTypes$H = {
|
|
278
279
|
className: PropTypes$1.string
|
|
279
280
|
};
|
|
280
|
-
var defaultProps$
|
|
281
|
+
var defaultProps$H = {
|
|
281
282
|
className: null
|
|
282
283
|
};
|
|
283
284
|
|
|
284
285
|
var BackButton = function BackButton(_ref) {
|
|
285
286
|
var className = _ref.className,
|
|
286
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
287
|
+
props = _objectWithoutProperties(_ref, _excluded$8);
|
|
287
288
|
|
|
288
289
|
return /*#__PURE__*/React.createElement(Button$1, Object.assign({
|
|
289
290
|
className: classNames(['px-2', _defineProperty({}, className, className)]),
|
|
@@ -295,12 +296,12 @@ var BackButton = function BackButton(_ref) {
|
|
|
295
296
|
}, props));
|
|
296
297
|
};
|
|
297
298
|
|
|
298
|
-
BackButton.propTypes = propTypes$
|
|
299
|
-
BackButton.defaultProps = defaultProps$
|
|
299
|
+
BackButton.propTypes = propTypes$H;
|
|
300
|
+
BackButton.defaultProps = defaultProps$H;
|
|
300
301
|
|
|
301
|
-
var _excluded$
|
|
302
|
+
var _excluded$7 = ["type"],
|
|
302
303
|
_excluded2 = ["component", "id", "settings"];
|
|
303
|
-
var propTypes$
|
|
304
|
+
var propTypes$G = {
|
|
304
305
|
name: PropTypes$1.string,
|
|
305
306
|
// .isRequired,
|
|
306
307
|
value: PropTypes.component,
|
|
@@ -314,7 +315,7 @@ var propTypes$F = {
|
|
|
314
315
|
fieldContext: PropTypes$1.any // eslint-disable-line react/forbid-prop-types
|
|
315
316
|
|
|
316
317
|
};
|
|
317
|
-
var defaultProps$
|
|
318
|
+
var defaultProps$G = {
|
|
318
319
|
name: null,
|
|
319
320
|
form: null,
|
|
320
321
|
formComponents: {},
|
|
@@ -342,7 +343,7 @@ var FieldForm = function FieldForm(_ref) {
|
|
|
342
343
|
var _ref2 = field || {},
|
|
343
344
|
_ref2$type = _ref2.type,
|
|
344
345
|
type = _ref2$type === void 0 ? null : _ref2$type,
|
|
345
|
-
fieldProps = _objectWithoutProperties(_ref2, _excluded$
|
|
346
|
+
fieldProps = _objectWithoutProperties(_ref2, _excluded$7);
|
|
346
347
|
|
|
347
348
|
var _ref3 = (type !== null ? fieldsManager.getDefinition(type) || null : null) || _objectSpread({}, field),
|
|
348
349
|
_ref3$component = _ref3.component,
|
|
@@ -395,12 +396,12 @@ var FieldForm = function FieldForm(_ref) {
|
|
|
395
396
|
}, formProps))) : null;
|
|
396
397
|
};
|
|
397
398
|
|
|
398
|
-
FieldForm.propTypes = propTypes$
|
|
399
|
-
FieldForm.defaultProps = defaultProps$
|
|
399
|
+
FieldForm.propTypes = propTypes$G;
|
|
400
|
+
FieldForm.defaultProps = defaultProps$G;
|
|
400
401
|
|
|
401
|
-
var styles$
|
|
402
|
+
var styles$t = {"actions":"micromag-core-forms-form-actions","left":"micromag-core-forms-form-left","right":"micromag-core-forms-form-right"};
|
|
402
403
|
|
|
403
|
-
var propTypes$
|
|
404
|
+
var propTypes$F = {
|
|
404
405
|
action: PropTypes$1.string.isRequired,
|
|
405
406
|
method: PropTypes$1.string,
|
|
406
407
|
fields: PropTypes.formFields,
|
|
@@ -427,7 +428,7 @@ var propTypes$E = {
|
|
|
427
428
|
actionsClassName: PropTypes$1.string,
|
|
428
429
|
cancelClassName: PropTypes$1.string
|
|
429
430
|
};
|
|
430
|
-
var defaultProps$
|
|
431
|
+
var defaultProps$F = {
|
|
431
432
|
method: 'POST',
|
|
432
433
|
fields: [],
|
|
433
434
|
initialValue: null,
|
|
@@ -577,7 +578,7 @@ var Form = function Form(_ref) {
|
|
|
577
578
|
|
|
578
579
|
return /*#__PURE__*/React.createElement("form", {
|
|
579
580
|
action: action,
|
|
580
|
-
className: classNames([styles$
|
|
581
|
+
className: classNames([styles$t.container, _defineProperty({}, className, className !== null)]),
|
|
581
582
|
method: method,
|
|
582
583
|
onSubmit: onSubmit
|
|
583
584
|
}, !withoutBackButton && fields !== null && fields.length > 0 && fieldParams !== null ? /*#__PURE__*/React.createElement("div", {
|
|
@@ -587,7 +588,7 @@ var Form = function Form(_ref) {
|
|
|
587
588
|
outline: true,
|
|
588
589
|
onClick: closeFieldForm
|
|
589
590
|
})) : null, fields && fields.length > 0 && fieldParams !== null ? /*#__PURE__*/React.createElement("div", {
|
|
590
|
-
className: classNames(['w-100', styles$
|
|
591
|
+
className: classNames(['w-100', styles$t.panel]),
|
|
591
592
|
key: "field"
|
|
592
593
|
}, /*#__PURE__*/React.createElement(FieldForm, {
|
|
593
594
|
name: fieldParams.replace(/\//g, '.'),
|
|
@@ -603,11 +604,11 @@ var Form = function Form(_ref) {
|
|
|
603
604
|
onChange: setValue,
|
|
604
605
|
gotoFieldForm: gotoFieldForm,
|
|
605
606
|
closeFieldForm: closeFieldForm,
|
|
606
|
-
className: classNames([styles$
|
|
607
|
+
className: classNames([styles$t.fields, _defineProperty({}, fieldsClassName, fieldsClassName !== null)])
|
|
607
608
|
}) : null, generalError ? /*#__PURE__*/React.createElement("p", {
|
|
608
609
|
className: "text-danger my-1"
|
|
609
610
|
}, generalError) : null, children, !withoutActions && fieldParams === null ? /*#__PURE__*/React.createElement("div", {
|
|
610
|
-
className: classNames([styles$
|
|
611
|
+
className: classNames([styles$t.actions, (_ref4 = {}, _defineProperty(_ref4, styles$t[actionsAlign], actionsAlign), _defineProperty(_ref4, actionsClassName, actionsClassName !== null), _ref4)])
|
|
611
612
|
}, onCancel !== null || onCancelHref !== null ? /*#__PURE__*/React.createElement(Button$1, {
|
|
612
613
|
type: "button",
|
|
613
614
|
onClick: onCancel,
|
|
@@ -624,7 +625,7 @@ var Form = function Form(_ref) {
|
|
|
624
625
|
}]
|
|
625
626
|
})) : null, buttons !== null ? /*#__PURE__*/React.createElement(Buttons, {
|
|
626
627
|
buttons: buttons,
|
|
627
|
-
className: styles$
|
|
628
|
+
className: styles$t.buttons
|
|
628
629
|
}) : /*#__PURE__*/React.createElement(Button$1, {
|
|
629
630
|
type: "submit",
|
|
630
631
|
theme: "primary",
|
|
@@ -640,13 +641,13 @@ var Form = function Form(_ref) {
|
|
|
640
641
|
})) : null) : null);
|
|
641
642
|
};
|
|
642
643
|
|
|
643
|
-
Form.propTypes = propTypes$
|
|
644
|
-
Form.defaultProps = defaultProps$
|
|
644
|
+
Form.propTypes = propTypes$F;
|
|
645
|
+
Form.defaultProps = defaultProps$F;
|
|
645
646
|
|
|
646
|
-
var styles$
|
|
647
|
+
var styles$s = {"withoutStyle":"micromag-core-partials-link-withoutStyle"};
|
|
647
648
|
|
|
648
|
-
var _excluded$
|
|
649
|
-
var propTypes$
|
|
649
|
+
var _excluded$6 = ["href", "external", "children", "target", "rel", "className", "withoutStyle"];
|
|
650
|
+
var propTypes$E = {
|
|
650
651
|
href: PropTypes$1.string,
|
|
651
652
|
external: PropTypes$1.bool,
|
|
652
653
|
target: PropTypes$1.string,
|
|
@@ -655,7 +656,7 @@ var propTypes$D = {
|
|
|
655
656
|
withoutStyle: PropTypes$1.bool,
|
|
656
657
|
className: PropTypes$1.string
|
|
657
658
|
};
|
|
658
|
-
var defaultProps$
|
|
659
|
+
var defaultProps$E = {
|
|
659
660
|
href: '',
|
|
660
661
|
external: false,
|
|
661
662
|
target: '_blank',
|
|
@@ -673,24 +674,24 @@ var Link = function Link(_ref) {
|
|
|
673
674
|
rel = _ref.rel,
|
|
674
675
|
className = _ref.className,
|
|
675
676
|
withoutStyle = _ref.withoutStyle,
|
|
676
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
677
|
+
props = _objectWithoutProperties(_ref, _excluded$6);
|
|
677
678
|
|
|
678
679
|
return external ? /*#__PURE__*/React.createElement("a", Object.assign({
|
|
679
|
-
className: classNames([className, _defineProperty({}, styles$
|
|
680
|
+
className: classNames([className, _defineProperty({}, styles$s.withoutStyle, withoutStyle)]),
|
|
680
681
|
href: href,
|
|
681
682
|
target: target,
|
|
682
683
|
rel: rel
|
|
683
684
|
}, props), /*#__PURE__*/React.createElement(Label, null, children)) : /*#__PURE__*/React.createElement(Link$1, Object.assign({
|
|
684
|
-
className: classNames([className, _defineProperty({}, styles$
|
|
685
|
+
className: classNames([className, _defineProperty({}, styles$s.withoutStyle, withoutStyle)]),
|
|
685
686
|
to: href
|
|
686
687
|
}, props), /*#__PURE__*/React.createElement(Label, null, children));
|
|
687
688
|
};
|
|
688
689
|
|
|
689
|
-
Link.propTypes = propTypes$
|
|
690
|
-
Link.defaultProps = defaultProps$
|
|
690
|
+
Link.propTypes = propTypes$E;
|
|
691
|
+
Link.defaultProps = defaultProps$E;
|
|
691
692
|
|
|
692
|
-
var _excluded$
|
|
693
|
-
var propTypes$
|
|
693
|
+
var _excluded$5 = ["label", "className"];
|
|
694
|
+
var propTypes$D = {
|
|
694
695
|
href: PropTypes$1.string,
|
|
695
696
|
header: PropTypes$1.node,
|
|
696
697
|
image: PropTypes$1.node,
|
|
@@ -719,7 +720,7 @@ var propTypes$C = {
|
|
|
719
720
|
onClickBody: PropTypes$1.func,
|
|
720
721
|
onClickFooter: PropTypes$1.func
|
|
721
722
|
};
|
|
722
|
-
var defaultProps$
|
|
723
|
+
var defaultProps$D = {
|
|
723
724
|
href: null,
|
|
724
725
|
header: null,
|
|
725
726
|
image: null,
|
|
@@ -777,7 +778,7 @@ var Card = function Card(_ref) {
|
|
|
777
778
|
var label = _ref2.label,
|
|
778
779
|
_ref2$className = _ref2.className,
|
|
779
780
|
linkClassName = _ref2$className === void 0 ? null : _ref2$className,
|
|
780
|
-
linkProps = _objectWithoutProperties(_ref2, _excluded$
|
|
781
|
+
linkProps = _objectWithoutProperties(_ref2, _excluded$5);
|
|
781
782
|
|
|
782
783
|
return /*#__PURE__*/React.createElement(Link, Object.assign({
|
|
783
784
|
key: "link-".concat(label, "-").concat(index),
|
|
@@ -840,15 +841,15 @@ var Card = function Card(_ref) {
|
|
|
840
841
|
}, cardInner);
|
|
841
842
|
};
|
|
842
843
|
|
|
843
|
-
Card.propTypes = propTypes$
|
|
844
|
-
Card.defaultProps = defaultProps$
|
|
844
|
+
Card.propTypes = propTypes$D;
|
|
845
|
+
Card.defaultProps = defaultProps$D;
|
|
845
846
|
|
|
846
|
-
var propTypes$
|
|
847
|
+
var propTypes$C = {
|
|
847
848
|
animated: PropTypes$1.bool,
|
|
848
849
|
color: PropTypes$1.string,
|
|
849
850
|
className: PropTypes$1.string
|
|
850
851
|
};
|
|
851
|
-
var defaultProps$
|
|
852
|
+
var defaultProps$C = {
|
|
852
853
|
animated: true,
|
|
853
854
|
color: 'currentColor',
|
|
854
855
|
className: null
|
|
@@ -913,19 +914,19 @@ var Spinner = function Spinner(_ref) {
|
|
|
913
914
|
}) : null))));
|
|
914
915
|
};
|
|
915
916
|
|
|
916
|
-
Spinner.propTypes = propTypes$
|
|
917
|
-
Spinner.defaultProps = defaultProps$
|
|
917
|
+
Spinner.propTypes = propTypes$C;
|
|
918
|
+
Spinner.defaultProps = defaultProps$C;
|
|
918
919
|
|
|
919
|
-
var styles$
|
|
920
|
+
var styles$r = {};
|
|
920
921
|
|
|
921
|
-
var _excluded$
|
|
922
|
-
var propTypes$
|
|
922
|
+
var _excluded$4 = ["description", "loading", "children", "className"];
|
|
923
|
+
var propTypes$B = {
|
|
923
924
|
description: PropTypes$1.node,
|
|
924
925
|
loading: PropTypes$1.bool,
|
|
925
926
|
children: PropTypes$1.node,
|
|
926
927
|
className: PropTypes$1.string
|
|
927
928
|
};
|
|
928
|
-
var defaultProps$
|
|
929
|
+
var defaultProps$B = {
|
|
929
930
|
description: null,
|
|
930
931
|
loading: false,
|
|
931
932
|
children: null,
|
|
@@ -937,19 +938,19 @@ var FormPanel = function FormPanel(_ref) {
|
|
|
937
938
|
loading = _ref.loading,
|
|
938
939
|
children = _ref.children,
|
|
939
940
|
className = _ref.className,
|
|
940
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
941
|
+
props = _objectWithoutProperties(_ref, _excluded$4);
|
|
941
942
|
|
|
942
943
|
return /*#__PURE__*/React.createElement(Card, Object.assign({
|
|
943
|
-
className: classNames([styles$
|
|
944
|
+
className: classNames([styles$r.container, _defineProperty({}, className, className !== null)])
|
|
944
945
|
}, props), description, loading ? /*#__PURE__*/React.createElement(Spinner, null) : children);
|
|
945
946
|
};
|
|
946
947
|
|
|
947
|
-
FormPanel.propTypes = propTypes$
|
|
948
|
-
FormPanel.defaultProps = defaultProps$
|
|
948
|
+
FormPanel.propTypes = propTypes$B;
|
|
949
|
+
FormPanel.defaultProps = defaultProps$B;
|
|
949
950
|
|
|
950
|
-
var styles$
|
|
951
|
+
var styles$q = {"container":"micromag-core-menus-breadcrumb-container","arrow":"micromag-core-menus-breadcrumb-arrow"};
|
|
951
952
|
|
|
952
|
-
var propTypes$
|
|
953
|
+
var propTypes$A = {
|
|
953
954
|
items: PropTypes.menuItems,
|
|
954
955
|
theme: PropTypes.bootstrapThemes,
|
|
955
956
|
separator: PropTypes$1.oneOf([null, 'arrow']),
|
|
@@ -957,7 +958,7 @@ var propTypes$z = {
|
|
|
957
958
|
noWrap: PropTypes$1.bool,
|
|
958
959
|
className: PropTypes$1.string
|
|
959
960
|
};
|
|
960
|
-
var defaultProps$
|
|
961
|
+
var defaultProps$A = {
|
|
961
962
|
items: [],
|
|
962
963
|
theme: null,
|
|
963
964
|
separator: null,
|
|
@@ -976,7 +977,7 @@ var Breadcrumb = function Breadcrumb(_ref) {
|
|
|
976
977
|
return /*#__PURE__*/React.createElement("nav", {
|
|
977
978
|
className: className
|
|
978
979
|
}, /*#__PURE__*/React.createElement("ol", {
|
|
979
|
-
className: classNames([styles$
|
|
980
|
+
className: classNames([styles$q.container, 'breadcrumb', 'mb-0', {
|
|
980
981
|
'p-0': withoutBar,
|
|
981
982
|
'bg-transparent': withoutBar,
|
|
982
983
|
'rounded-0': withoutBar,
|
|
@@ -994,7 +995,7 @@ var Breadcrumb = function Breadcrumb(_ref) {
|
|
|
994
995
|
return /*#__PURE__*/React.createElement("li", {
|
|
995
996
|
className: classNames(['breadcrumb-item', (_ref3 = {
|
|
996
997
|
active: active
|
|
997
|
-
}, _defineProperty(_ref3, styles$
|
|
998
|
+
}, _defineProperty(_ref3, styles$q.arrow, separator === 'arrow'), _defineProperty(_ref3, "text-".concat(theme), active && theme !== null), _ref3)]),
|
|
998
999
|
key: "item-".concat(index)
|
|
999
1000
|
}, active ? /*#__PURE__*/React.createElement(Label, null, label) : null, !active && url ? /*#__PURE__*/React.createElement(Link$1, {
|
|
1000
1001
|
to: url,
|
|
@@ -1007,13 +1008,13 @@ var Breadcrumb = function Breadcrumb(_ref) {
|
|
|
1007
1008
|
})));
|
|
1008
1009
|
};
|
|
1009
1010
|
|
|
1010
|
-
Breadcrumb.propTypes = propTypes$
|
|
1011
|
-
Breadcrumb.defaultProps = defaultProps$
|
|
1011
|
+
Breadcrumb.propTypes = propTypes$A;
|
|
1012
|
+
Breadcrumb.defaultProps = defaultProps$A;
|
|
1012
1013
|
|
|
1013
|
-
var styles$
|
|
1014
|
+
var styles$p = {"start":"micromag-core-menus-dropdown-start","end":"micromag-core-menus-dropdown-end"};
|
|
1014
1015
|
|
|
1015
|
-
var _excluded$
|
|
1016
|
-
var propTypes$
|
|
1016
|
+
var _excluded$3 = ["id", "type", "className", "label", "children", "onClick", "active"];
|
|
1017
|
+
var propTypes$z = {
|
|
1017
1018
|
items: PropTypes.menuItems,
|
|
1018
1019
|
children: PropTypes$1.node,
|
|
1019
1020
|
visible: PropTypes$1.bool,
|
|
@@ -1023,7 +1024,7 @@ var propTypes$y = {
|
|
|
1023
1024
|
onClickItem: PropTypes$1.func,
|
|
1024
1025
|
onClickOutside: PropTypes$1.func
|
|
1025
1026
|
};
|
|
1026
|
-
var defaultProps$
|
|
1027
|
+
var defaultProps$z = {
|
|
1027
1028
|
items: [],
|
|
1028
1029
|
children: null,
|
|
1029
1030
|
visible: false,
|
|
@@ -1053,7 +1054,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
1053
1054
|
}, [refContainer.current, onClickOutside]);
|
|
1054
1055
|
useDocumentEvent('click', onDocumentClick, visible);
|
|
1055
1056
|
return /*#__PURE__*/React.createElement("div", {
|
|
1056
|
-
className: classNames(['dropdown-menu', (_ref2 = {}, _defineProperty(_ref2, styles$
|
|
1057
|
+
className: classNames(['dropdown-menu', (_ref2 = {}, _defineProperty(_ref2, styles$p[align], align !== null), _defineProperty(_ref2, "show", visible), _defineProperty(_ref2, className, className !== null), _ref2)]),
|
|
1057
1058
|
ref: refContainer
|
|
1058
1059
|
}, children !== null ? children : items.map(function (it, index) {
|
|
1059
1060
|
var _ref3;
|
|
@@ -1071,7 +1072,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
1071
1072
|
customOnClick = _it$onClick === void 0 ? null : _it$onClick,
|
|
1072
1073
|
_it$active = it.active,
|
|
1073
1074
|
active = _it$active === void 0 ? false : _it$active,
|
|
1074
|
-
itemProps = _objectWithoutProperties(it, _excluded$
|
|
1075
|
+
itemProps = _objectWithoutProperties(it, _excluded$3);
|
|
1075
1076
|
|
|
1076
1077
|
var ItemComponent = 'div';
|
|
1077
1078
|
|
|
@@ -1107,11 +1108,11 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
1107
1108
|
}));
|
|
1108
1109
|
};
|
|
1109
1110
|
|
|
1110
|
-
Dropdown.propTypes = propTypes$
|
|
1111
|
-
Dropdown.defaultProps = defaultProps$
|
|
1111
|
+
Dropdown.propTypes = propTypes$z;
|
|
1112
|
+
Dropdown.defaultProps = defaultProps$z;
|
|
1112
1113
|
|
|
1113
|
-
var _excluded = ["id", "className", "linkClassName", "href", "label", "external", "items", "dropdown", "active", "onClick"];
|
|
1114
|
-
var propTypes$
|
|
1114
|
+
var _excluded$2 = ["id", "className", "linkClassName", "href", "label", "external", "items", "dropdown", "active", "onClick"];
|
|
1115
|
+
var propTypes$y = {
|
|
1115
1116
|
items: PropTypes.menuItems,
|
|
1116
1117
|
tagName: PropTypes$1.string,
|
|
1117
1118
|
itemTagName: PropTypes$1.string,
|
|
@@ -1130,7 +1131,7 @@ var propTypes$x = {
|
|
|
1130
1131
|
dropdownLinkClassName: PropTypes$1.string,
|
|
1131
1132
|
dropdownAlign: PropTypes.dropdownAlign
|
|
1132
1133
|
};
|
|
1133
|
-
var defaultProps$
|
|
1134
|
+
var defaultProps$y = {
|
|
1134
1135
|
items: [],
|
|
1135
1136
|
tagName: 'ul',
|
|
1136
1137
|
itemTagName: 'li',
|
|
@@ -1200,7 +1201,7 @@ var Menu = function Menu(_ref) {
|
|
|
1200
1201
|
active = _it$active === void 0 ? false : _it$active,
|
|
1201
1202
|
_it$onClick = it.onClick,
|
|
1202
1203
|
customOnClick = _it$onClick === void 0 ? null : _it$onClick,
|
|
1203
|
-
itemProps = _objectWithoutProperties(it, _excluded);
|
|
1204
|
+
itemProps = _objectWithoutProperties(it, _excluded$2);
|
|
1204
1205
|
|
|
1205
1206
|
var onClickItem = dropdown !== null ? function (e) {
|
|
1206
1207
|
e.preventDefault();
|
|
@@ -1254,10 +1255,10 @@ var Menu = function Menu(_ref) {
|
|
|
1254
1255
|
}));
|
|
1255
1256
|
};
|
|
1256
1257
|
|
|
1257
|
-
Menu.propTypes = propTypes$
|
|
1258
|
-
Menu.defaultProps = defaultProps$
|
|
1258
|
+
Menu.propTypes = propTypes$y;
|
|
1259
|
+
Menu.defaultProps = defaultProps$y;
|
|
1259
1260
|
|
|
1260
|
-
var propTypes$
|
|
1261
|
+
var propTypes$x = {
|
|
1261
1262
|
brand: PropTypes$1.node,
|
|
1262
1263
|
brandLink: PropTypes$1.string,
|
|
1263
1264
|
breadcrumbs: PropTypes$1.node,
|
|
@@ -1271,7 +1272,7 @@ var propTypes$w = {
|
|
|
1271
1272
|
brandClassName: PropTypes$1.string,
|
|
1272
1273
|
breadCrumbsClassName: PropTypes$1.string
|
|
1273
1274
|
};
|
|
1274
|
-
var defaultProps$
|
|
1275
|
+
var defaultProps$x = {
|
|
1275
1276
|
brand: null,
|
|
1276
1277
|
brandLink: null,
|
|
1277
1278
|
breadcrumbs: null,
|
|
@@ -1345,10 +1346,10 @@ var Navbar = function Navbar(_ref) {
|
|
|
1345
1346
|
}, children) : children));
|
|
1346
1347
|
};
|
|
1347
1348
|
|
|
1348
|
-
Navbar.propTypes = propTypes$
|
|
1349
|
-
Navbar.defaultProps = defaultProps$
|
|
1349
|
+
Navbar.propTypes = propTypes$x;
|
|
1350
|
+
Navbar.defaultProps = defaultProps$x;
|
|
1350
1351
|
|
|
1351
|
-
var styles$
|
|
1352
|
+
var styles$o = {};
|
|
1352
1353
|
|
|
1353
1354
|
var messages = defineMessages({
|
|
1354
1355
|
previous: {
|
|
@@ -1366,7 +1367,7 @@ var messages = defineMessages({
|
|
|
1366
1367
|
}]
|
|
1367
1368
|
}
|
|
1368
1369
|
});
|
|
1369
|
-
var propTypes$
|
|
1370
|
+
var propTypes$w = {
|
|
1370
1371
|
page: PropTypes$1.number,
|
|
1371
1372
|
total: PropTypes$1.number,
|
|
1372
1373
|
url: PropTypes$1.string,
|
|
@@ -1377,7 +1378,7 @@ var propTypes$v = {
|
|
|
1377
1378
|
linkClassName: PropTypes$1.string,
|
|
1378
1379
|
onClickPage: PropTypes$1.func
|
|
1379
1380
|
};
|
|
1380
|
-
var defaultProps$
|
|
1381
|
+
var defaultProps$w = {
|
|
1381
1382
|
page: 1,
|
|
1382
1383
|
total: 1,
|
|
1383
1384
|
url: null,
|
|
@@ -1408,7 +1409,7 @@ var PaginationMenu = function PaginationMenu(_ref) {
|
|
|
1408
1409
|
});
|
|
1409
1410
|
|
|
1410
1411
|
return /*#__PURE__*/React.createElement("nav", {
|
|
1411
|
-
className: classNames([styles$
|
|
1412
|
+
className: classNames([styles$o.container, _defineProperty({}, className, className !== null)])
|
|
1412
1413
|
}, /*#__PURE__*/React.createElement("ul", {
|
|
1413
1414
|
className: classNames(['pagination', _defineProperty({}, paginationClassName, paginationClassName !== null)])
|
|
1414
1415
|
}, withPreviousNext ? /*#__PURE__*/React.createElement("li", {
|
|
@@ -1451,12 +1452,12 @@ var PaginationMenu = function PaginationMenu(_ref) {
|
|
|
1451
1452
|
}, /*#__PURE__*/React.createElement(Label, null, messages.next))) : null));
|
|
1452
1453
|
};
|
|
1453
1454
|
|
|
1454
|
-
PaginationMenu.propTypes = propTypes$
|
|
1455
|
-
PaginationMenu.defaultProps = defaultProps$
|
|
1455
|
+
PaginationMenu.propTypes = propTypes$w;
|
|
1456
|
+
PaginationMenu.defaultProps = defaultProps$w;
|
|
1456
1457
|
|
|
1457
|
-
var styles$
|
|
1458
|
+
var styles$n = {"container":"micromag-core-menus-tabs-container"};
|
|
1458
1459
|
|
|
1459
|
-
var propTypes$
|
|
1460
|
+
var propTypes$v = {
|
|
1460
1461
|
items: PropTypes.menuItems,
|
|
1461
1462
|
size: PropTypes.buttonSize,
|
|
1462
1463
|
theme: PropTypes.buttonTheme,
|
|
@@ -1465,7 +1466,7 @@ var propTypes$u = {
|
|
|
1465
1466
|
className: PropTypes$1.string,
|
|
1466
1467
|
onClickItem: PropTypes$1.func
|
|
1467
1468
|
};
|
|
1468
|
-
var defaultProps$
|
|
1469
|
+
var defaultProps$v = {
|
|
1469
1470
|
items: [],
|
|
1470
1471
|
size: null,
|
|
1471
1472
|
theme: 'secondary',
|
|
@@ -1484,29 +1485,29 @@ var TabsMenu = function TabsMenu(_ref) {
|
|
|
1484
1485
|
className = _ref.className,
|
|
1485
1486
|
onClickItem = _ref.onClickItem;
|
|
1486
1487
|
return /*#__PURE__*/React.createElement("div", {
|
|
1487
|
-
className: classNames([styles$
|
|
1488
|
+
className: classNames([styles$n.container, _defineProperty({}, className, className)])
|
|
1488
1489
|
}, /*#__PURE__*/React.createElement(Buttons, {
|
|
1489
1490
|
buttons: items,
|
|
1490
1491
|
size: size,
|
|
1491
1492
|
theme: theme,
|
|
1492
1493
|
renderButton: renderItemButton,
|
|
1493
1494
|
onClickButton: onClickItem,
|
|
1494
|
-
className: styles$
|
|
1495
|
-
buttonClassName: classNames([styles$
|
|
1495
|
+
className: styles$n.buttons,
|
|
1496
|
+
buttonClassName: classNames([styles$n.button, _defineProperty({}, buttonClassName, buttonClassName !== null)])
|
|
1496
1497
|
}));
|
|
1497
1498
|
};
|
|
1498
1499
|
|
|
1499
|
-
TabsMenu.propTypes = propTypes$
|
|
1500
|
-
TabsMenu.defaultProps = defaultProps$
|
|
1500
|
+
TabsMenu.propTypes = propTypes$v;
|
|
1501
|
+
TabsMenu.defaultProps = defaultProps$v;
|
|
1501
1502
|
|
|
1502
|
-
var styles$
|
|
1503
|
+
var styles$m = {"container":"micromag-core-modals-container","modals":"micromag-core-modals-modals","hasModals":"micromag-core-modals-hasModals"};
|
|
1503
1504
|
|
|
1504
|
-
var propTypes$
|
|
1505
|
+
var propTypes$u = {
|
|
1505
1506
|
modals: PropTypes.modals.isRequired,
|
|
1506
1507
|
setModalsContainer: PropTypes$1.func.isRequired,
|
|
1507
1508
|
className: PropTypes$1.string
|
|
1508
1509
|
};
|
|
1509
|
-
var defaultProps$
|
|
1510
|
+
var defaultProps$u = {
|
|
1510
1511
|
className: null
|
|
1511
1512
|
};
|
|
1512
1513
|
|
|
@@ -1519,19 +1520,19 @@ var ModalsContainer = function ModalsContainer(_ref) {
|
|
|
1519
1520
|
setModalsContainer(containerRef.current);
|
|
1520
1521
|
}, []);
|
|
1521
1522
|
return /*#__PURE__*/React.createElement("div", {
|
|
1522
|
-
className: classNames([styles$
|
|
1523
|
+
className: classNames([styles$m.container, _defineProperty({}, className, className)])
|
|
1523
1524
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1524
|
-
className: classNames([styles$
|
|
1525
|
+
className: classNames([styles$m.modals, _defineProperty({}, styles$m.hasModals, modals.length > 0)]),
|
|
1525
1526
|
ref: containerRef
|
|
1526
1527
|
}));
|
|
1527
1528
|
};
|
|
1528
1529
|
|
|
1529
|
-
ModalsContainer.propTypes = propTypes$
|
|
1530
|
-
ModalsContainer.defaultProps = defaultProps$
|
|
1530
|
+
ModalsContainer.propTypes = propTypes$u;
|
|
1531
|
+
ModalsContainer.defaultProps = defaultProps$u;
|
|
1531
1532
|
var Modals = withModals(ModalsContainer);
|
|
1532
1533
|
|
|
1533
1534
|
/* eslint-disable react/no-array-index-key, react/jsx-props-no-spreading */
|
|
1534
|
-
var propTypes$
|
|
1535
|
+
var propTypes$t = {
|
|
1535
1536
|
id: PropTypes$1.string,
|
|
1536
1537
|
data: PropTypes$1.object,
|
|
1537
1538
|
// eslint-disable-line react/forbid-prop-types
|
|
@@ -1541,7 +1542,7 @@ var propTypes$s = {
|
|
|
1541
1542
|
unregister: PropTypes$1.func,
|
|
1542
1543
|
children: PropTypes$1.node
|
|
1543
1544
|
};
|
|
1544
|
-
var defaultProps$
|
|
1545
|
+
var defaultProps$t = {
|
|
1545
1546
|
id: null,
|
|
1546
1547
|
data: null,
|
|
1547
1548
|
container: null,
|
|
@@ -1574,17 +1575,17 @@ var ElementPortal = function ElementPortal(_ref) {
|
|
|
1574
1575
|
return container !== null ? /*#__PURE__*/ReactDOM.createPortal(children, container) : null;
|
|
1575
1576
|
};
|
|
1576
1577
|
|
|
1577
|
-
ElementPortal.propTypes = propTypes$
|
|
1578
|
-
ElementPortal.defaultProps = defaultProps$
|
|
1578
|
+
ElementPortal.propTypes = propTypes$t;
|
|
1579
|
+
ElementPortal.defaultProps = defaultProps$t;
|
|
1579
1580
|
|
|
1580
1581
|
/* eslint-disable react/no-array-index-key, react/jsx-props-no-spreading */
|
|
1581
|
-
var propTypes$
|
|
1582
|
+
var propTypes$s = {
|
|
1582
1583
|
id: PropTypes$1.string,
|
|
1583
1584
|
data: PropTypes$1.object,
|
|
1584
1585
|
// eslint-disable-line react/forbid-prop-types
|
|
1585
1586
|
children: PropTypes$1.node
|
|
1586
1587
|
};
|
|
1587
|
-
var defaultProps$
|
|
1588
|
+
var defaultProps$s = {
|
|
1588
1589
|
id: null,
|
|
1589
1590
|
data: null,
|
|
1590
1591
|
children: null
|
|
@@ -1611,18 +1612,18 @@ var ModalPortal = function ModalPortal(_ref) {
|
|
|
1611
1612
|
}, children);
|
|
1612
1613
|
};
|
|
1613
1614
|
|
|
1614
|
-
ModalPortal.propTypes = propTypes$
|
|
1615
|
-
ModalPortal.defaultProps = defaultProps$
|
|
1615
|
+
ModalPortal.propTypes = propTypes$s;
|
|
1616
|
+
ModalPortal.defaultProps = defaultProps$s;
|
|
1616
1617
|
|
|
1617
|
-
var styles$
|
|
1618
|
+
var styles$l = {"container":"micromag-core-modals-modal-container","center":"micromag-core-modals-modal-center","inner":"micromag-core-modals-modal-inner","top":"micromag-core-modals-modal-top"};
|
|
1618
1619
|
|
|
1619
|
-
var propTypes$
|
|
1620
|
+
var propTypes$r = {
|
|
1620
1621
|
id: PropTypes$1.string,
|
|
1621
1622
|
title: PropTypes$1.string,
|
|
1622
1623
|
position: PropTypes$1.oneOf(['center', 'top']),
|
|
1623
1624
|
children: PropTypes$1.node
|
|
1624
1625
|
};
|
|
1625
|
-
var defaultProps$
|
|
1626
|
+
var defaultProps$r = {
|
|
1626
1627
|
id: null,
|
|
1627
1628
|
title: null,
|
|
1628
1629
|
position: 'center',
|
|
@@ -1646,18 +1647,18 @@ var Modal = function Modal(_ref) {
|
|
|
1646
1647
|
id: finalId,
|
|
1647
1648
|
data: data
|
|
1648
1649
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1649
|
-
className: classNames([styles$
|
|
1650
|
+
className: classNames([styles$l.container, _defineProperty({}, styles$l[position], position !== null)])
|
|
1650
1651
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1651
|
-
className: styles$
|
|
1652
|
+
className: styles$l.inner
|
|
1652
1653
|
}, children)));
|
|
1653
1654
|
};
|
|
1654
1655
|
|
|
1655
|
-
Modal.propTypes = propTypes$
|
|
1656
|
-
Modal.defaultProps = defaultProps$
|
|
1656
|
+
Modal.propTypes = propTypes$r;
|
|
1657
|
+
Modal.defaultProps = defaultProps$r;
|
|
1657
1658
|
|
|
1658
|
-
var styles$
|
|
1659
|
+
var styles$k = {"container":"micromag-core-modals-dialog-container"};
|
|
1659
1660
|
|
|
1660
|
-
var propTypes$
|
|
1661
|
+
var propTypes$q = {
|
|
1661
1662
|
title: PropTypes.label,
|
|
1662
1663
|
header: PropTypes$1.node,
|
|
1663
1664
|
children: PropTypes$1.node,
|
|
@@ -1667,7 +1668,7 @@ var propTypes$p = {
|
|
|
1667
1668
|
onClickClose: PropTypes$1.func,
|
|
1668
1669
|
className: PropTypes$1.string
|
|
1669
1670
|
};
|
|
1670
|
-
var defaultProps$
|
|
1671
|
+
var defaultProps$q = {
|
|
1671
1672
|
title: null,
|
|
1672
1673
|
header: null,
|
|
1673
1674
|
children: null,
|
|
@@ -1687,12 +1688,12 @@ var ModalDialog = function ModalDialog(_ref) {
|
|
|
1687
1688
|
onClickClose = _ref.onClickClose,
|
|
1688
1689
|
className = _ref.className;
|
|
1689
1690
|
return /*#__PURE__*/React.createElement("div", {
|
|
1690
|
-
className: classNames(['modal-dialog', styles$
|
|
1691
|
+
className: classNames(['modal-dialog', styles$k.container, _defineProperty({}, className, className)]),
|
|
1691
1692
|
role: "dialog"
|
|
1692
1693
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1693
1694
|
className: "modal-content"
|
|
1694
1695
|
}, header || /*#__PURE__*/React.createElement("div", {
|
|
1695
|
-
className: classNames(['modal-header', styles$
|
|
1696
|
+
className: classNames(['modal-header', styles$k.header, {// 'bg-dark': theme === 'dark',
|
|
1696
1697
|
// 'border-dark': theme === 'dark',
|
|
1697
1698
|
// 'text-light': theme === 'dark',
|
|
1698
1699
|
}])
|
|
@@ -1704,28 +1705,28 @@ var ModalDialog = function ModalDialog(_ref) {
|
|
|
1704
1705
|
"aria-label": "Close",
|
|
1705
1706
|
onClick: onClickClose
|
|
1706
1707
|
})), /*#__PURE__*/React.createElement("div", {
|
|
1707
|
-
className: classNames(['modal-body', styles$
|
|
1708
|
+
className: classNames(['modal-body', styles$k.body, {// [`bg-${theme}`]: theme !== null,
|
|
1708
1709
|
// 'text-light': theme === 'dark',
|
|
1709
1710
|
}])
|
|
1710
1711
|
}, children), footer !== null || buttons !== null ? /*#__PURE__*/React.createElement("div", {
|
|
1711
|
-
className: classNames(['modal-footer', styles$
|
|
1712
|
+
className: classNames(['modal-footer', styles$k.footer])
|
|
1712
1713
|
}, footer, buttons !== null ? /*#__PURE__*/React.createElement(Buttons, {
|
|
1713
1714
|
buttons: buttons,
|
|
1714
|
-
className: styles$
|
|
1715
|
+
className: styles$k.buttons
|
|
1715
1716
|
}) : null) : null));
|
|
1716
1717
|
};
|
|
1717
1718
|
|
|
1718
|
-
ModalDialog.propTypes = propTypes$
|
|
1719
|
-
ModalDialog.defaultProps = defaultProps$
|
|
1719
|
+
ModalDialog.propTypes = propTypes$q;
|
|
1720
|
+
ModalDialog.defaultProps = defaultProps$q;
|
|
1720
1721
|
|
|
1721
|
-
var propTypes$
|
|
1722
|
+
var propTypes$p = {
|
|
1722
1723
|
type: PropTypes$1.oneOfType([PropTypes.mediaTypes, PropTypes$1.array]),
|
|
1723
1724
|
opened: PropTypes$1.bool,
|
|
1724
1725
|
sources: PropTypes$1.arrayOf(PropTypes$1.string),
|
|
1725
1726
|
onUploaded: PropTypes$1.func,
|
|
1726
1727
|
onRequestClose: PropTypes$1.func
|
|
1727
1728
|
};
|
|
1728
|
-
var defaultProps$
|
|
1729
|
+
var defaultProps$p = {
|
|
1729
1730
|
type: null,
|
|
1730
1731
|
opened: false,
|
|
1731
1732
|
sources: ['webcam', 'facebook', 'instagram', 'dropbox', 'google-drive'],
|
|
@@ -1774,17 +1775,17 @@ var UploadModal = function UploadModal(_ref) {
|
|
|
1774
1775
|
}) : null;
|
|
1775
1776
|
};
|
|
1776
1777
|
|
|
1777
|
-
UploadModal.propTypes = propTypes$
|
|
1778
|
-
UploadModal.defaultProps = defaultProps$
|
|
1778
|
+
UploadModal.propTypes = propTypes$p;
|
|
1779
|
+
UploadModal.defaultProps = defaultProps$p;
|
|
1779
1780
|
|
|
1780
|
-
var styles$
|
|
1781
|
+
var styles$j = {"container":"micromag-core-panels-container"};
|
|
1781
1782
|
|
|
1782
|
-
var propTypes$
|
|
1783
|
+
var propTypes$o = {
|
|
1783
1784
|
panels: PropTypes.panels,
|
|
1784
1785
|
setPanelsContainer: PropTypes$1.func,
|
|
1785
1786
|
className: PropTypes$1.string
|
|
1786
1787
|
};
|
|
1787
|
-
var defaultProps$
|
|
1788
|
+
var defaultProps$o = {
|
|
1788
1789
|
panels: [],
|
|
1789
1790
|
setPanelsContainer: null,
|
|
1790
1791
|
className: null
|
|
@@ -1799,25 +1800,25 @@ var PanelsContainer = function PanelsContainer(_ref) {
|
|
|
1799
1800
|
setPanelsContainer(containerRef.current);
|
|
1800
1801
|
}, []);
|
|
1801
1802
|
return /*#__PURE__*/React.createElement("div", {
|
|
1802
|
-
className: classNames([styles$
|
|
1803
|
+
className: classNames([styles$j.container, _defineProperty({}, className, className)])
|
|
1803
1804
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1804
|
-
className: classNames([styles$
|
|
1805
|
+
className: classNames([styles$j.panels, _defineProperty({}, styles$j.hasPanels, panels.length > 0)]),
|
|
1805
1806
|
ref: containerRef
|
|
1806
1807
|
}));
|
|
1807
1808
|
};
|
|
1808
1809
|
|
|
1809
|
-
PanelsContainer.propTypes = propTypes$
|
|
1810
|
-
PanelsContainer.defaultProps = defaultProps$
|
|
1810
|
+
PanelsContainer.propTypes = propTypes$o;
|
|
1811
|
+
PanelsContainer.defaultProps = defaultProps$o;
|
|
1811
1812
|
var Panels = withPanels(PanelsContainer);
|
|
1812
1813
|
|
|
1813
1814
|
/* eslint-disable react/no-array-index-key, react/jsx-props-no-spreading */
|
|
1814
|
-
var propTypes$
|
|
1815
|
+
var propTypes$n = {
|
|
1815
1816
|
id: PropTypes$1.string,
|
|
1816
1817
|
data: PropTypes$1.object,
|
|
1817
1818
|
// eslint-disable-line react/forbid-prop-types
|
|
1818
1819
|
children: PropTypes$1.node
|
|
1819
1820
|
};
|
|
1820
|
-
var defaultProps$
|
|
1821
|
+
var defaultProps$n = {
|
|
1821
1822
|
id: null,
|
|
1822
1823
|
data: null,
|
|
1823
1824
|
children: null
|
|
@@ -1850,18 +1851,18 @@ var PanelPortal = function PanelPortal(_ref) {
|
|
|
1850
1851
|
}, children);
|
|
1851
1852
|
};
|
|
1852
1853
|
|
|
1853
|
-
PanelPortal.propTypes = propTypes$
|
|
1854
|
-
PanelPortal.defaultProps = defaultProps$
|
|
1854
|
+
PanelPortal.propTypes = propTypes$n;
|
|
1855
|
+
PanelPortal.defaultProps = defaultProps$n;
|
|
1855
1856
|
|
|
1856
|
-
var styles$
|
|
1857
|
+
var styles$i = {"container":"micromag-core-panels-panel-container"};
|
|
1857
1858
|
|
|
1858
1859
|
/* eslint-disable react/no-array-index-key, react/jsx-props-no-spreading */
|
|
1859
|
-
var propTypes$
|
|
1860
|
+
var propTypes$m = {
|
|
1860
1861
|
id: PropTypes$1.string,
|
|
1861
1862
|
title: PropTypes$1.string,
|
|
1862
1863
|
children: PropTypes$1.node
|
|
1863
1864
|
};
|
|
1864
|
-
var defaultProps$
|
|
1865
|
+
var defaultProps$m = {
|
|
1865
1866
|
id: null,
|
|
1866
1867
|
title: null,
|
|
1867
1868
|
children: null
|
|
@@ -1883,16 +1884,16 @@ var Panel = function Panel(_ref) {
|
|
|
1883
1884
|
id: finalId,
|
|
1884
1885
|
data: data
|
|
1885
1886
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1886
|
-
className: styles$
|
|
1887
|
+
className: styles$i.container
|
|
1887
1888
|
}, children));
|
|
1888
1889
|
};
|
|
1889
1890
|
|
|
1890
|
-
Panel.propTypes = propTypes$
|
|
1891
|
-
Panel.defaultProps = defaultProps$
|
|
1891
|
+
Panel.propTypes = propTypes$m;
|
|
1892
|
+
Panel.defaultProps = defaultProps$m;
|
|
1892
1893
|
|
|
1893
|
-
var styles$
|
|
1894
|
+
var styles$h = {"container":"micromag-core-partials-collapsable-panel-container","top":"micromag-core-partials-collapsable-panel-top","button":"micromag-core-partials-collapsable-panel-button","label":"micromag-core-partials-collapsable-panel-label","content":"micromag-core-partials-collapsable-panel-content","isOpened":"micromag-core-partials-collapsable-panel-isOpened"};
|
|
1894
1895
|
|
|
1895
|
-
var propTypes$
|
|
1896
|
+
var propTypes$l = {
|
|
1896
1897
|
title: PropTypes$1.node,
|
|
1897
1898
|
children: PropTypes$1.node,
|
|
1898
1899
|
className: PropTypes$1.string,
|
|
@@ -1901,7 +1902,7 @@ var propTypes$k = {
|
|
|
1901
1902
|
openedClassName: PropTypes$1.string,
|
|
1902
1903
|
buttonClassName: PropTypes$1.string
|
|
1903
1904
|
};
|
|
1904
|
-
var defaultProps$
|
|
1905
|
+
var defaultProps$l = {
|
|
1905
1906
|
title: null,
|
|
1906
1907
|
children: null,
|
|
1907
1908
|
className: null,
|
|
@@ -1931,34 +1932,34 @@ var CollapsablePanel = function CollapsablePanel(_ref) {
|
|
|
1931
1932
|
return setOpened(!opened);
|
|
1932
1933
|
}, [opened, setOpened]);
|
|
1933
1934
|
return /*#__PURE__*/React.createElement("div", {
|
|
1934
|
-
className: classNames([styles$
|
|
1935
|
+
className: classNames([styles$h.container, (_ref2 = {}, _defineProperty(_ref2, styles$h.isOpened, opened), _defineProperty(_ref2, openedClassName, opened && openedClassName !== null), _defineProperty(_ref2, className, className !== null), _ref2)])
|
|
1935
1936
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1936
|
-
className: classNames([styles$
|
|
1937
|
+
className: classNames([styles$h.top, _defineProperty({}, topClassName, topClassName !== null)])
|
|
1937
1938
|
}, /*#__PURE__*/React.createElement(Button$1, {
|
|
1938
1939
|
withoutStyle: true,
|
|
1939
|
-
className: classNames([styles$
|
|
1940
|
+
className: classNames([styles$h.button, _defineProperty({}, buttonClassName, buttonClassName !== null)]),
|
|
1940
1941
|
icon: /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
|
1941
1942
|
icon: opened ? faAngleUp : faAngleDown,
|
|
1942
|
-
className: styles$
|
|
1943
|
+
className: styles$h.icon
|
|
1943
1944
|
}),
|
|
1944
1945
|
iconPosition: "right",
|
|
1945
|
-
labelClassName: styles$
|
|
1946
|
+
labelClassName: styles$h.label,
|
|
1946
1947
|
onClick: onClick
|
|
1947
1948
|
}, title)), /*#__PURE__*/React.createElement("div", {
|
|
1948
|
-
className: classNames([styles$
|
|
1949
|
+
className: classNames([styles$h.content, _defineProperty({}, contentClassName, contentClassName !== null)])
|
|
1949
1950
|
}, children));
|
|
1950
1951
|
};
|
|
1951
1952
|
|
|
1952
|
-
CollapsablePanel.propTypes = propTypes$
|
|
1953
|
-
CollapsablePanel.defaultProps = defaultProps$
|
|
1953
|
+
CollapsablePanel.propTypes = propTypes$l;
|
|
1954
|
+
CollapsablePanel.defaultProps = defaultProps$l;
|
|
1954
1955
|
|
|
1955
1956
|
/* eslint-disable react/jsx-props-no-spreading */
|
|
1956
|
-
var propTypes$
|
|
1957
|
+
var propTypes$k = {
|
|
1957
1958
|
date: PropTypes$1.string,
|
|
1958
1959
|
withTime: PropTypes$1.bool,
|
|
1959
1960
|
timeSeparator: PropTypes$1.node
|
|
1960
1961
|
};
|
|
1961
|
-
var defaultProps$
|
|
1962
|
+
var defaultProps$k = {
|
|
1962
1963
|
date: null,
|
|
1963
1964
|
withTime: false,
|
|
1964
1965
|
timeSeparator: ', '
|
|
@@ -1981,11 +1982,11 @@ var Date$1 = function Date(_ref) {
|
|
|
1981
1982
|
}) : null);
|
|
1982
1983
|
};
|
|
1983
1984
|
|
|
1984
|
-
Date$1.propTypes = propTypes$
|
|
1985
|
-
Date$1.defaultProps = defaultProps$
|
|
1985
|
+
Date$1.propTypes = propTypes$k;
|
|
1986
|
+
Date$1.defaultProps = defaultProps$k;
|
|
1986
1987
|
|
|
1987
1988
|
/* eslint-disable react/no-danger */
|
|
1988
|
-
var propTypes$
|
|
1989
|
+
var propTypes$j = {
|
|
1989
1990
|
throttleDelay: PropTypes$1.number,
|
|
1990
1991
|
threshold: PropTypes$1.arrayOf(PropTypes$1.number),
|
|
1991
1992
|
onEnter: PropTypes$1.func,
|
|
@@ -1995,7 +1996,7 @@ var propTypes$i = {
|
|
|
1995
1996
|
children: PropTypes$1.node,
|
|
1996
1997
|
className: PropTypes$1.string
|
|
1997
1998
|
};
|
|
1998
|
-
var defaultProps$
|
|
1999
|
+
var defaultProps$j = {
|
|
1999
2000
|
throttleDelay: null,
|
|
2000
2001
|
threshold: undefined,
|
|
2001
2002
|
onEnter: null,
|
|
@@ -2069,12 +2070,12 @@ var Detector = function Detector(_ref) {
|
|
|
2069
2070
|
}, children);
|
|
2070
2071
|
};
|
|
2071
2072
|
|
|
2072
|
-
Detector.propTypes = propTypes$
|
|
2073
|
-
Detector.defaultProps = defaultProps$
|
|
2073
|
+
Detector.propTypes = propTypes$j;
|
|
2074
|
+
Detector.defaultProps = defaultProps$j;
|
|
2074
2075
|
|
|
2075
|
-
var styles$
|
|
2076
|
+
var styles$g = {"container":"micromag-core-partials-placeholder-block-container","box":"micromag-core-partials-placeholder-block-box","outline":"micromag-core-partials-placeholder-block-outline"};
|
|
2076
2077
|
|
|
2077
|
-
var propTypes$
|
|
2078
|
+
var propTypes$i = {
|
|
2078
2079
|
width: PropTypes$1.oneOfType([PropTypes$1.number, PropTypes$1.string]),
|
|
2079
2080
|
height: PropTypes$1.oneOfType([PropTypes$1.number, PropTypes$1.string]),
|
|
2080
2081
|
outline: PropTypes$1.bool,
|
|
@@ -2082,7 +2083,7 @@ var propTypes$h = {
|
|
|
2082
2083
|
boxClassName: PropTypes$1.string,
|
|
2083
2084
|
children: PropTypes$1.node
|
|
2084
2085
|
};
|
|
2085
|
-
var defaultProps$
|
|
2086
|
+
var defaultProps$i = {
|
|
2086
2087
|
width: '100%',
|
|
2087
2088
|
height: '3em',
|
|
2088
2089
|
outline: false,
|
|
@@ -2101,9 +2102,9 @@ var PlaceholderBlock = function PlaceholderBlock(_ref) {
|
|
|
2101
2102
|
boxClassName = _ref.boxClassName,
|
|
2102
2103
|
children = _ref.children;
|
|
2103
2104
|
return /*#__PURE__*/React.createElement("div", {
|
|
2104
|
-
className: classNames([styles$
|
|
2105
|
+
className: classNames([styles$g.container, (_ref2 = {}, _defineProperty(_ref2, className, className !== null), _defineProperty(_ref2, styles$g.outline, outline), _ref2)])
|
|
2105
2106
|
}, /*#__PURE__*/React.createElement("div", {
|
|
2106
|
-
className: classNames([styles$
|
|
2107
|
+
className: classNames([styles$g.box, _defineProperty({}, boxClassName, boxClassName !== null)]),
|
|
2107
2108
|
style: {
|
|
2108
2109
|
width: width,
|
|
2109
2110
|
height: height
|
|
@@ -2111,12 +2112,12 @@ var PlaceholderBlock = function PlaceholderBlock(_ref) {
|
|
|
2111
2112
|
}, children));
|
|
2112
2113
|
};
|
|
2113
2114
|
|
|
2114
|
-
PlaceholderBlock.propTypes = propTypes$
|
|
2115
|
-
PlaceholderBlock.defaultProps = defaultProps$
|
|
2115
|
+
PlaceholderBlock.propTypes = propTypes$i;
|
|
2116
|
+
PlaceholderBlock.defaultProps = defaultProps$i;
|
|
2116
2117
|
|
|
2117
2118
|
/* eslint-disable react/jsx-props-no-spreading */
|
|
2118
2119
|
|
|
2119
|
-
var propTypes$
|
|
2120
|
+
var propTypes$h = {
|
|
2120
2121
|
name: PropTypes$1.string.isRequired,
|
|
2121
2122
|
components: PropTypes$1.object.isRequired,
|
|
2122
2123
|
// eslint-disable-line
|
|
@@ -2127,7 +2128,7 @@ var propTypes$g = {
|
|
|
2127
2128
|
placeholderProps: PropTypes$1.object // eslint-disable-line
|
|
2128
2129
|
|
|
2129
2130
|
};
|
|
2130
|
-
var defaultProps$
|
|
2131
|
+
var defaultProps$h = {
|
|
2131
2132
|
props: {},
|
|
2132
2133
|
isPlaceholder: false,
|
|
2133
2134
|
className: null,
|
|
@@ -2163,18 +2164,18 @@ var ElementComponent = function ElementComponent(_ref) {
|
|
|
2163
2164
|
}));
|
|
2164
2165
|
};
|
|
2165
2166
|
|
|
2166
|
-
ElementComponent.propTypes = propTypes$
|
|
2167
|
-
ElementComponent.defaultProps = defaultProps$
|
|
2167
|
+
ElementComponent.propTypes = propTypes$h;
|
|
2168
|
+
ElementComponent.defaultProps = defaultProps$h;
|
|
2168
2169
|
|
|
2169
|
-
var styles$
|
|
2170
|
+
var styles$f = {"container":"micromag-core-partials-empty-container","middle":"micromag-core-partials-empty-middle","withoutBorder":"micromag-core-partials-empty-withoutBorder","invertColor":"micromag-core-partials-empty-invertColor"};
|
|
2170
2171
|
|
|
2171
|
-
var propTypes$
|
|
2172
|
+
var propTypes$g = {
|
|
2172
2173
|
children: PropTypes$1.node,
|
|
2173
2174
|
withoutBorder: PropTypes$1.bool,
|
|
2174
2175
|
light: PropTypes$1.bool,
|
|
2175
2176
|
className: PropTypes$1.string
|
|
2176
2177
|
};
|
|
2177
|
-
var defaultProps$
|
|
2178
|
+
var defaultProps$g = {
|
|
2178
2179
|
children: null,
|
|
2179
2180
|
withoutBorder: false,
|
|
2180
2181
|
light: false,
|
|
@@ -2189,23 +2190,23 @@ var Empty = function Empty(_ref) {
|
|
|
2189
2190
|
light = _ref.light,
|
|
2190
2191
|
className = _ref.className;
|
|
2191
2192
|
return /*#__PURE__*/React.createElement("div", {
|
|
2192
|
-
className: classNames([styles$
|
|
2193
|
+
className: classNames([styles$f.container, (_ref2 = {}, _defineProperty(_ref2, styles$f.withoutBorder, withoutBorder), _defineProperty(_ref2, styles$f.light, light), _defineProperty(_ref2, className, className), _ref2)])
|
|
2193
2194
|
}, /*#__PURE__*/React.createElement("div", {
|
|
2194
|
-
className: styles$
|
|
2195
|
+
className: styles$f.middle
|
|
2195
2196
|
}, /*#__PURE__*/React.createElement(Label, null, children)));
|
|
2196
2197
|
};
|
|
2197
2198
|
|
|
2198
|
-
Empty.propTypes = propTypes$
|
|
2199
|
-
Empty.defaultProps = defaultProps$
|
|
2199
|
+
Empty.propTypes = propTypes$g;
|
|
2200
|
+
Empty.defaultProps = defaultProps$g;
|
|
2200
2201
|
|
|
2201
|
-
var propTypes$
|
|
2202
|
+
var propTypes$f = {
|
|
2202
2203
|
fonts: PropTypes.fonts,
|
|
2203
2204
|
formats: PropTypes$1.arrayOf(PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.shape({
|
|
2204
2205
|
name: PropTypes$1.string,
|
|
2205
2206
|
format: PropTypes$1.string
|
|
2206
2207
|
})]))
|
|
2207
2208
|
};
|
|
2208
|
-
var defaultProps$
|
|
2209
|
+
var defaultProps$f = {
|
|
2209
2210
|
fonts: [],
|
|
2210
2211
|
formats: ['eot', 'woff2', 'woff', {
|
|
2211
2212
|
name: 'otf',
|
|
@@ -2246,12 +2247,12 @@ var FontFaces = function FontFaces(_ref) {
|
|
|
2246
2247
|
}, fontFaces.join('\n')) : null;
|
|
2247
2248
|
};
|
|
2248
2249
|
|
|
2249
|
-
FontFaces.propTypes = propTypes$
|
|
2250
|
-
FontFaces.defaultProps = defaultProps$
|
|
2250
|
+
FontFaces.propTypes = propTypes$f;
|
|
2251
|
+
FontFaces.defaultProps = defaultProps$f;
|
|
2251
2252
|
|
|
2252
|
-
var styles$
|
|
2253
|
+
var styles$e = {};
|
|
2253
2254
|
|
|
2254
|
-
var propTypes$
|
|
2255
|
+
var propTypes$e = {
|
|
2255
2256
|
thumbnail: PropTypes$1.node,
|
|
2256
2257
|
thumbnailAlign: PropTypes$1.oneOf(['top', 'center', 'bottom']),
|
|
2257
2258
|
children: PropTypes$1.node,
|
|
@@ -2261,7 +2262,7 @@ var propTypes$d = {
|
|
|
2261
2262
|
bodyClassName: PropTypes$1.string,
|
|
2262
2263
|
titleClassName: PropTypes$1.string
|
|
2263
2264
|
};
|
|
2264
|
-
var defaultProps$
|
|
2265
|
+
var defaultProps$e = {
|
|
2265
2266
|
thumbnail: null,
|
|
2266
2267
|
thumbnailAlign: 'top',
|
|
2267
2268
|
children: null,
|
|
@@ -2282,24 +2283,24 @@ var Media = function Media(_ref) {
|
|
|
2282
2283
|
bodyClassName = _ref.bodyClassName,
|
|
2283
2284
|
titleClassName = _ref.titleClassName;
|
|
2284
2285
|
return /*#__PURE__*/React.createElement("div", {
|
|
2285
|
-
className: classNames(['card', styles$
|
|
2286
|
+
className: classNames(['card', styles$e.container, _defineProperty({}, className, className !== null)])
|
|
2286
2287
|
}, typeof thumbnail === 'string' ? /*#__PURE__*/React.createElement("img", {
|
|
2287
2288
|
src: thumbnail,
|
|
2288
2289
|
alt: title,
|
|
2289
|
-
className: classNames(['me-3', styles$
|
|
2290
|
+
className: classNames(['me-3', styles$e.thumbnail, _defineProperty({
|
|
2290
2291
|
'align-self-start': thumbnailAlign === 'top',
|
|
2291
2292
|
'align-self-center': thumbnailAlign === 'center',
|
|
2292
2293
|
'align-self-end': thumbnailAlign === 'bottom'
|
|
2293
2294
|
}, thumbnailClassName, thumbnailClassName !== null)])
|
|
2294
2295
|
}) : thumbnail, /*#__PURE__*/React.createElement("div", {
|
|
2295
|
-
className: classNames(['card-body', styles$
|
|
2296
|
+
className: classNames(['card-body', styles$e.body, _defineProperty({}, bodyClassName, bodyClassName !== null)])
|
|
2296
2297
|
}, title !== null ? /*#__PURE__*/React.createElement("h5", {
|
|
2297
|
-
className: classNames(['mt-0', styles$
|
|
2298
|
+
className: classNames(['mt-0', styles$e.title, _defineProperty({}, titleClassName, titleClassName !== null)])
|
|
2298
2299
|
}, /*#__PURE__*/React.createElement(Label, null, title)) : null, children));
|
|
2299
2300
|
};
|
|
2300
2301
|
|
|
2301
|
-
Media.propTypes = propTypes$
|
|
2302
|
-
Media.defaultProps = defaultProps$
|
|
2302
|
+
Media.propTypes = propTypes$e;
|
|
2303
|
+
Media.defaultProps = defaultProps$e;
|
|
2303
2304
|
|
|
2304
2305
|
/**
|
|
2305
2306
|
* Core
|
|
@@ -2833,7 +2834,7 @@ var pageMetadata = PropTypes$1.shape({
|
|
|
2833
2834
|
});
|
|
2834
2835
|
|
|
2835
2836
|
/* eslint-disable react/no-array-index-key */
|
|
2836
|
-
var propTypes$
|
|
2837
|
+
var propTypes$d = {
|
|
2837
2838
|
title: PropTypes$1.string,
|
|
2838
2839
|
url: PropTypes$1.string,
|
|
2839
2840
|
metadata: pageMetadata,
|
|
@@ -2841,7 +2842,7 @@ var propTypes$c = {
|
|
|
2841
2842
|
suffix: PropTypes$1.string,
|
|
2842
2843
|
children: PropTypes$1.node
|
|
2843
2844
|
};
|
|
2844
|
-
var defaultProps$
|
|
2845
|
+
var defaultProps$d = {
|
|
2845
2846
|
title: null,
|
|
2846
2847
|
url: null,
|
|
2847
2848
|
metadata: null,
|
|
@@ -2965,12 +2966,12 @@ var Meta = function Meta(_ref) {
|
|
|
2965
2966
|
}), children);
|
|
2966
2967
|
};
|
|
2967
2968
|
|
|
2968
|
-
Meta.propTypes = propTypes$
|
|
2969
|
-
Meta.defaultProps = defaultProps$
|
|
2969
|
+
Meta.propTypes = propTypes$d;
|
|
2970
|
+
Meta.defaultProps = defaultProps$d;
|
|
2970
2971
|
|
|
2971
|
-
var styles$
|
|
2972
|
+
var styles$d = {"container":"micromag-core-partials-slideshow-container","item":"micromag-core-partials-slideshow-item","items":"micromag-core-partials-slideshow-items","prev":"micromag-core-partials-slideshow-prev","current":"micromag-core-partials-slideshow-current","next":"micromag-core-partials-slideshow-next"};
|
|
2972
2973
|
|
|
2973
|
-
var propTypes$
|
|
2974
|
+
var propTypes$c = {
|
|
2974
2975
|
items: PropTypes$1.arrayOf(PropTypes$1.node),
|
|
2975
2976
|
auto: PropTypes$1.bool,
|
|
2976
2977
|
delay: PropTypes$1.number,
|
|
@@ -2979,7 +2980,7 @@ var propTypes$b = {
|
|
|
2979
2980
|
className: PropTypes$1.string,
|
|
2980
2981
|
children: PropTypes$1.node
|
|
2981
2982
|
};
|
|
2982
|
-
var defaultProps$
|
|
2983
|
+
var defaultProps$c = {
|
|
2983
2984
|
items: [],
|
|
2984
2985
|
auto: true,
|
|
2985
2986
|
delay: 5000,
|
|
@@ -3027,24 +3028,24 @@ var Slideshow = function Slideshow(_ref) {
|
|
|
3027
3028
|
height: height
|
|
3028
3029
|
};
|
|
3029
3030
|
return /*#__PURE__*/React.createElement("div", {
|
|
3030
|
-
className: classNames([styles$
|
|
3031
|
+
className: classNames([styles$d.container, _defineProperty({}, className, className)]),
|
|
3031
3032
|
style: style
|
|
3032
3033
|
}, /*#__PURE__*/React.createElement("div", {
|
|
3033
|
-
className: styles$
|
|
3034
|
+
className: styles$d.items
|
|
3034
3035
|
}, items.map(function (it, i) {
|
|
3035
3036
|
var _ref3;
|
|
3036
3037
|
|
|
3037
3038
|
return /*#__PURE__*/React.createElement("div", {
|
|
3038
3039
|
key: "slide-".concat(i + 1),
|
|
3039
|
-
className: classNames([styles$
|
|
3040
|
+
className: classNames([styles$d.item, (_ref3 = {}, _defineProperty(_ref3, styles$d.prev, i < index), _defineProperty(_ref3, styles$d.current, i === index), _defineProperty(_ref3, styles$d.next, i > index), _ref3)])
|
|
3040
3041
|
}, it);
|
|
3041
3042
|
})), children);
|
|
3042
3043
|
};
|
|
3043
3044
|
|
|
3044
|
-
Slideshow.propTypes = propTypes$
|
|
3045
|
-
Slideshow.defaultProps = defaultProps$
|
|
3045
|
+
Slideshow.propTypes = propTypes$c;
|
|
3046
|
+
Slideshow.defaultProps = defaultProps$c;
|
|
3046
3047
|
|
|
3047
|
-
var styles$
|
|
3048
|
+
var styles$c = {"icon":"micromag-core-placeholders-icon"};
|
|
3048
3049
|
|
|
3049
3050
|
/* eslint-disable react/prop-types */
|
|
3050
3051
|
var AdFrame = function AdFrame(_ref) {
|
|
@@ -3057,7 +3058,7 @@ var AdFrame = function AdFrame(_ref) {
|
|
|
3057
3058
|
className: className
|
|
3058
3059
|
}, /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
|
3059
3060
|
icon: faAd,
|
|
3060
|
-
className: styles$
|
|
3061
|
+
className: styles$c.icon
|
|
3061
3062
|
}));
|
|
3062
3063
|
};
|
|
3063
3064
|
|
|
@@ -3072,7 +3073,7 @@ var AdImage = function AdImage(_ref) {
|
|
|
3072
3073
|
className: className
|
|
3073
3074
|
}, /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
|
3074
3075
|
icon: faImage,
|
|
3075
|
-
className: styles$
|
|
3076
|
+
className: styles$c.icon
|
|
3076
3077
|
}));
|
|
3077
3078
|
};
|
|
3078
3079
|
|
|
@@ -3089,13 +3090,13 @@ var Audio = function Audio(_ref) {
|
|
|
3089
3090
|
className: className
|
|
3090
3091
|
}, /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
|
3091
3092
|
icon: faMusic,
|
|
3092
|
-
className: styles$
|
|
3093
|
+
className: styles$c.icon
|
|
3093
3094
|
}));
|
|
3094
3095
|
};
|
|
3095
3096
|
|
|
3096
|
-
var styles$
|
|
3097
|
+
var styles$b = {"container":"micromag-core-partials-placeholder-text-container","line":"micromag-core-partials-placeholder-text-line"};
|
|
3097
3098
|
|
|
3098
|
-
var propTypes$
|
|
3099
|
+
var propTypes$b = {
|
|
3099
3100
|
lines: PropTypes$1.number,
|
|
3100
3101
|
lineMargin: PropTypes$1.oneOfType([PropTypes$1.number, PropTypes$1.string]),
|
|
3101
3102
|
width: PropTypes$1.oneOfType([PropTypes$1.number, PropTypes$1.string]),
|
|
@@ -3103,7 +3104,7 @@ var propTypes$a = {
|
|
|
3103
3104
|
fontSize: PropTypes$1.number,
|
|
3104
3105
|
className: PropTypes$1.string
|
|
3105
3106
|
};
|
|
3106
|
-
var defaultProps$
|
|
3107
|
+
var defaultProps$b = {
|
|
3107
3108
|
lines: 1,
|
|
3108
3109
|
lineMargin: 1,
|
|
3109
3110
|
width: '100%',
|
|
@@ -3122,11 +3123,11 @@ var PlaceholderText = function PlaceholderText(_ref) {
|
|
|
3122
3123
|
var lineHeight = height !== null && isNumber(height) ? "".concat(Math.round(height * fontSize), "px") : height;
|
|
3123
3124
|
var oddWidth = isNumber(width) ? width * 0.9 : '90%';
|
|
3124
3125
|
return /*#__PURE__*/React.createElement("div", {
|
|
3125
|
-
className: classNames([styles$
|
|
3126
|
+
className: classNames([styles$b.container, _defineProperty({}, className, className)])
|
|
3126
3127
|
}, _toConsumableArray(Array(lines)).map(function (e, index) {
|
|
3127
3128
|
return /*#__PURE__*/React.createElement("div", {
|
|
3128
3129
|
key: "line-".concat(index),
|
|
3129
|
-
className: styles$
|
|
3130
|
+
className: styles$b.line,
|
|
3130
3131
|
style: {
|
|
3131
3132
|
width: index % 2 === 0 ? width : oddWidth,
|
|
3132
3133
|
height: lineHeight,
|
|
@@ -3137,8 +3138,8 @@ var PlaceholderText = function PlaceholderText(_ref) {
|
|
|
3137
3138
|
}));
|
|
3138
3139
|
};
|
|
3139
3140
|
|
|
3140
|
-
PlaceholderText.propTypes = propTypes$
|
|
3141
|
-
PlaceholderText.defaultProps = defaultProps$
|
|
3141
|
+
PlaceholderText.propTypes = propTypes$b;
|
|
3142
|
+
PlaceholderText.defaultProps = defaultProps$b;
|
|
3142
3143
|
|
|
3143
3144
|
/* eslint-disable react/destructuring-assignment, react/prop-types */
|
|
3144
3145
|
var Button = function Button(_ref) {
|
|
@@ -3169,38 +3170,38 @@ var Image = function Image(_ref) {
|
|
|
3169
3170
|
className: className
|
|
3170
3171
|
}, /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
|
3171
3172
|
icon: faImage,
|
|
3172
|
-
className: styles$
|
|
3173
|
+
className: styles$c.icon
|
|
3173
3174
|
}));
|
|
3174
3175
|
};
|
|
3175
3176
|
|
|
3176
3177
|
/* eslint-disable react/jsx-props-no-spreading, react/destructuring-assignment, react/prop-types */
|
|
3177
3178
|
var Line = function Line(props) {
|
|
3178
3179
|
return /*#__PURE__*/React.createElement(PlaceholderText, Object.assign({}, props, {
|
|
3179
|
-
className: classNames([props.className, styles$
|
|
3180
|
+
className: classNames([props.className, styles$c.shortText]),
|
|
3180
3181
|
height: 0.2,
|
|
3181
3182
|
lines: 1
|
|
3182
3183
|
}));
|
|
3183
3184
|
};
|
|
3184
3185
|
|
|
3185
|
-
var styles$
|
|
3186
|
+
var styles$a = {"container":"micromag-core-placeholders-map-container","icon":"micromag-core-placeholders-map-icon"};
|
|
3186
3187
|
|
|
3187
3188
|
var Map = function Map(props) {
|
|
3188
3189
|
return /*#__PURE__*/React.createElement(PlaceholderBlock, Object.assign({}, props, {
|
|
3189
3190
|
width: "100%",
|
|
3190
3191
|
height: "100%",
|
|
3191
|
-
className: classNames([styles$
|
|
3192
|
+
className: classNames([styles$a.container, _defineProperty({}, props.className, props.className !== null)])
|
|
3192
3193
|
}), /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
|
3193
3194
|
icon: props.withImages ? faImage : faMapMarkerAlt,
|
|
3194
|
-
className: styles$
|
|
3195
|
+
className: styles$a.icon
|
|
3195
3196
|
}), /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
|
3196
3197
|
icon: props.withImages ? faImage : faMapMarkerAlt,
|
|
3197
|
-
className: styles$
|
|
3198
|
+
className: styles$a.icon
|
|
3198
3199
|
}), /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
|
3199
3200
|
icon: props.withImages ? faImage : faMapMarkerAlt,
|
|
3200
|
-
className: styles$
|
|
3201
|
+
className: styles$a.icon
|
|
3201
3202
|
}), /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
|
3202
3203
|
icon: props.withImages ? faImage : faMapMarkerAlt,
|
|
3203
|
-
className: styles$
|
|
3204
|
+
className: styles$a.icon
|
|
3204
3205
|
}));
|
|
3205
3206
|
};
|
|
3206
3207
|
|
|
@@ -3209,18 +3210,18 @@ var MapPath = function MapPath(props) {
|
|
|
3209
3210
|
return /*#__PURE__*/React.createElement(PlaceholderBlock, Object.assign({}, props, {
|
|
3210
3211
|
width: "100%",
|
|
3211
3212
|
height: "70%",
|
|
3212
|
-
className: classNames([props.className, styles$
|
|
3213
|
+
className: classNames([props.className, styles$c.mapPath])
|
|
3213
3214
|
}), /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
|
3214
3215
|
icon: faMapMarkedAlt,
|
|
3215
3216
|
size: "lg",
|
|
3216
|
-
className: styles$
|
|
3217
|
+
className: styles$c.icon
|
|
3217
3218
|
}));
|
|
3218
3219
|
};
|
|
3219
3220
|
|
|
3220
3221
|
/* eslint-disable react/jsx-props-no-spreading, react/destructuring-assignment, react/prop-types */
|
|
3221
3222
|
var Quote = function Quote(props) {
|
|
3222
3223
|
return /*#__PURE__*/React.createElement(PlaceholderText, Object.assign({}, props, {
|
|
3223
|
-
className: classNames([props.className, styles$
|
|
3224
|
+
className: classNames([props.className, styles$c.subtitle]),
|
|
3224
3225
|
height: 0.5,
|
|
3225
3226
|
lines: 6
|
|
3226
3227
|
}));
|
|
@@ -3229,7 +3230,7 @@ var Quote = function Quote(props) {
|
|
|
3229
3230
|
/* eslint-disable react/jsx-props-no-spreading, react/destructuring-assignment, react/prop-types */
|
|
3230
3231
|
var ShortText = function ShortText(props) {
|
|
3231
3232
|
return /*#__PURE__*/React.createElement(PlaceholderText, Object.assign({}, props, {
|
|
3232
|
-
className: classNames([props.className, styles$
|
|
3233
|
+
className: classNames([props.className, styles$c.shortText]),
|
|
3233
3234
|
height: 0.2,
|
|
3234
3235
|
lines: 2
|
|
3235
3236
|
}));
|
|
@@ -3238,7 +3239,7 @@ var ShortText = function ShortText(props) {
|
|
|
3238
3239
|
/* eslint-disable react/jsx-props-no-spreading, react/destructuring-assignment, react/prop-types */
|
|
3239
3240
|
var Subtitle = function Subtitle(props) {
|
|
3240
3241
|
return /*#__PURE__*/React.createElement(PlaceholderText, Object.assign({}, props, {
|
|
3241
|
-
className: classNames([props.className, styles$
|
|
3242
|
+
className: classNames([props.className, styles$c.subtitle]),
|
|
3242
3243
|
height: 0.3,
|
|
3243
3244
|
lines: 1
|
|
3244
3245
|
}));
|
|
@@ -3257,21 +3258,21 @@ var TextPlaceholder = function TextPlaceholder(props) {
|
|
|
3257
3258
|
height: height,
|
|
3258
3259
|
lines: lines,
|
|
3259
3260
|
lineMargin: lineMargin,
|
|
3260
|
-
className: classNames([props.className, styles$
|
|
3261
|
+
className: classNames([props.className, styles$c.text])
|
|
3261
3262
|
}));
|
|
3262
3263
|
};
|
|
3263
3264
|
|
|
3264
3265
|
/* eslint-disable react/jsx-props-no-spreading, react/destructuring-assignment, react/prop-types */
|
|
3265
3266
|
var Timeline = function Timeline(props) {
|
|
3266
3267
|
return /*#__PURE__*/React.createElement(PlaceholderText, Object.assign({}, props, {
|
|
3267
|
-
className: classNames([props.className, styles$
|
|
3268
|
+
className: classNames([props.className, styles$c.timeline])
|
|
3268
3269
|
}));
|
|
3269
3270
|
};
|
|
3270
3271
|
|
|
3271
3272
|
/* eslint-disable react/jsx-props-no-spreading, react/destructuring-assignment, react/prop-types */
|
|
3272
3273
|
var Title = function Title(props) {
|
|
3273
3274
|
return /*#__PURE__*/React.createElement(PlaceholderText, Object.assign({}, props, {
|
|
3274
|
-
className: classNames([props.className, styles$
|
|
3275
|
+
className: classNames([props.className, styles$c.title]),
|
|
3275
3276
|
height: 0.5,
|
|
3276
3277
|
lines: 2,
|
|
3277
3278
|
lineMargin: 4
|
|
@@ -3289,11 +3290,11 @@ var Video = function Video(_ref) {
|
|
|
3289
3290
|
className: className
|
|
3290
3291
|
}, /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
|
3291
3292
|
icon: faVideo,
|
|
3292
|
-
className: styles$
|
|
3293
|
+
className: styles$c.icon
|
|
3293
3294
|
}));
|
|
3294
3295
|
};
|
|
3295
3296
|
|
|
3296
|
-
var styles$
|
|
3297
|
+
var styles$9 = {"container":"micromag-core-placeholders-video-360-container","box":"micromag-core-placeholders-video-360-box","icon":"micromag-core-placeholders-video-360-icon","label":"micromag-core-placeholders-video-360-label"};
|
|
3297
3298
|
|
|
3298
3299
|
var Video360 = function Video360(_ref) {
|
|
3299
3300
|
var width = _ref.width,
|
|
@@ -3302,13 +3303,13 @@ var Video360 = function Video360(_ref) {
|
|
|
3302
3303
|
return /*#__PURE__*/React.createElement(PlaceholderBlock, {
|
|
3303
3304
|
width: width,
|
|
3304
3305
|
height: height,
|
|
3305
|
-
className: classNames([styles$
|
|
3306
|
-
boxClassName: styles$
|
|
3306
|
+
className: classNames([styles$9.container, _defineProperty({}, className, className !== null)]),
|
|
3307
|
+
boxClassName: styles$9.box
|
|
3307
3308
|
}, /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
|
3308
3309
|
icon: faVideo,
|
|
3309
|
-
className: styles$
|
|
3310
|
+
className: styles$9.icon
|
|
3310
3311
|
}), /*#__PURE__*/React.createElement("div", {
|
|
3311
|
-
className: styles$
|
|
3312
|
+
className: styles$9.label
|
|
3312
3313
|
}, "360"));
|
|
3313
3314
|
};
|
|
3314
3315
|
|
|
@@ -3323,13 +3324,133 @@ var VideoLoop = function VideoLoop(_ref) {
|
|
|
3323
3324
|
className: className
|
|
3324
3325
|
}, /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
|
3325
3326
|
icon: faPlay,
|
|
3326
|
-
className: styles$
|
|
3327
|
+
className: styles$c.icon
|
|
3327
3328
|
}), /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
|
3328
3329
|
icon: faRedo,
|
|
3329
|
-
className: styles$
|
|
3330
|
+
className: styles$c.icon
|
|
3330
3331
|
}));
|
|
3331
3332
|
};
|
|
3332
3333
|
|
|
3334
|
+
var styles$8 = {"container":"micromag-core-screens-screen-sizer-container","frame":"micromag-core-screens-screen-sizer-frame","screen":"micromag-core-screens-screen-sizer-screen"};
|
|
3335
|
+
|
|
3336
|
+
var propTypes$a = {
|
|
3337
|
+
width: PropTypes$1.number,
|
|
3338
|
+
height: PropTypes$1.number,
|
|
3339
|
+
fit: PropTypes$1.oneOf([null, 'cover', 'contain']),
|
|
3340
|
+
screenWidth: PropTypes$1.number,
|
|
3341
|
+
screenHeight: PropTypes$1.number,
|
|
3342
|
+
className: PropTypes$1.string,
|
|
3343
|
+
children: PropTypes$1.node.isRequired
|
|
3344
|
+
};
|
|
3345
|
+
var defaultProps$a = {
|
|
3346
|
+
width: null,
|
|
3347
|
+
height: null,
|
|
3348
|
+
fit: null,
|
|
3349
|
+
screenWidth: 320,
|
|
3350
|
+
screenHeight: 480,
|
|
3351
|
+
className: null
|
|
3352
|
+
};
|
|
3353
|
+
|
|
3354
|
+
var ScreenSizer = function ScreenSizer(_ref) {
|
|
3355
|
+
var width = _ref.width,
|
|
3356
|
+
height = _ref.height,
|
|
3357
|
+
fit = _ref.fit,
|
|
3358
|
+
screenWidth = _ref.screenWidth,
|
|
3359
|
+
screenHeight = _ref.screenHeight,
|
|
3360
|
+
className = _ref.className,
|
|
3361
|
+
children = _ref.children;
|
|
3362
|
+
var hasSize = width !== null || height !== null;
|
|
3363
|
+
|
|
3364
|
+
var _useResizeObserver = useResizeObserver(),
|
|
3365
|
+
refContainer = _useResizeObserver.ref,
|
|
3366
|
+
contentRect = _useResizeObserver.entry.contentRect;
|
|
3367
|
+
|
|
3368
|
+
var _ref2 = contentRect || {},
|
|
3369
|
+
_ref2$width = _ref2.width,
|
|
3370
|
+
calculatedWidth = _ref2$width === void 0 ? 0 : _ref2$width,
|
|
3371
|
+
_ref2$height = _ref2.height,
|
|
3372
|
+
calculatedHeight = _ref2$height === void 0 ? 0 : _ref2$height;
|
|
3373
|
+
|
|
3374
|
+
var _useMemo = useMemo(function () {
|
|
3375
|
+
var containerWidth = width || calculatedWidth || null;
|
|
3376
|
+
var containerHeight = height || calculatedHeight || null;
|
|
3377
|
+
|
|
3378
|
+
if (containerWidth === null && containerHeight === null) {
|
|
3379
|
+
return {};
|
|
3380
|
+
}
|
|
3381
|
+
|
|
3382
|
+
var screenRatio = screenWidth / screenHeight;
|
|
3383
|
+
var finalContainerWidth = containerWidth || containerHeight * screenRatio;
|
|
3384
|
+
var finalContainerHeight = containerHeight || containerWidth / screenRatio;
|
|
3385
|
+
|
|
3386
|
+
if (fit === null) {
|
|
3387
|
+
var _screenScale = finalContainerWidth / screenWidth;
|
|
3388
|
+
|
|
3389
|
+
return {
|
|
3390
|
+
width: finalContainerWidth,
|
|
3391
|
+
height: finalContainerHeight,
|
|
3392
|
+
transform: "scale(".concat(_screenScale, ")")
|
|
3393
|
+
};
|
|
3394
|
+
}
|
|
3395
|
+
|
|
3396
|
+
var _getSizeWithinBounds = getSizeWithinBounds(screenWidth, screenHeight, finalContainerWidth, finalContainerHeight, {
|
|
3397
|
+
cover: fit === 'cover'
|
|
3398
|
+
}),
|
|
3399
|
+
screenScaledWidth = _getSizeWithinBounds.width,
|
|
3400
|
+
screenScaledHeight = _getSizeWithinBounds.height,
|
|
3401
|
+
screenScale = _getSizeWithinBounds.scale;
|
|
3402
|
+
|
|
3403
|
+
var x = (finalContainerWidth - screenScaledWidth) / 2;
|
|
3404
|
+
var y = (finalContainerHeight - screenScaledHeight) / 2;
|
|
3405
|
+
return {
|
|
3406
|
+
width: finalContainerWidth,
|
|
3407
|
+
height: finalContainerHeight,
|
|
3408
|
+
transform: "scale(".concat(screenScale, ") translate(").concat(x, "px, ").concat(y, "px)")
|
|
3409
|
+
};
|
|
3410
|
+
}, [screenWidth, screenHeight, width, height, fit, calculatedWidth, calculatedHeight]),
|
|
3411
|
+
_useMemo$width = _useMemo.width,
|
|
3412
|
+
frameWidth = _useMemo$width === void 0 ? null : _useMemo$width,
|
|
3413
|
+
_useMemo$height = _useMemo.height,
|
|
3414
|
+
frameHeight = _useMemo$height === void 0 ? null : _useMemo$height,
|
|
3415
|
+
_useMemo$transform = _useMemo.transform,
|
|
3416
|
+
screenTransform = _useMemo$transform === void 0 ? null : _useMemo$transform;
|
|
3417
|
+
|
|
3418
|
+
var screenSize = useMemo(function () {
|
|
3419
|
+
return {
|
|
3420
|
+
screen: 'mobile',
|
|
3421
|
+
screens: ['mobile'],
|
|
3422
|
+
width: screenWidth,
|
|
3423
|
+
height: screenHeight
|
|
3424
|
+
};
|
|
3425
|
+
}, [screenWidth, screenHeight]);
|
|
3426
|
+
var hasFrameSize = frameWidth !== null && frameHeight !== null;
|
|
3427
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
3428
|
+
styles: classNames([styles$8.container, _defineProperty({}, className, className !== null)]),
|
|
3429
|
+
ref: !hasSize ? refContainer : null
|
|
3430
|
+
}, hasFrameSize ? /*#__PURE__*/React.createElement("div", {
|
|
3431
|
+
className: styles$8.frame,
|
|
3432
|
+
style: {
|
|
3433
|
+
width: frameWidth,
|
|
3434
|
+
height: frameHeight
|
|
3435
|
+
}
|
|
3436
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
3437
|
+
className: styles$8.screen,
|
|
3438
|
+
style: {
|
|
3439
|
+
width: screenWidth,
|
|
3440
|
+
height: screenHeight,
|
|
3441
|
+
transform: screenTransform
|
|
3442
|
+
}
|
|
3443
|
+
}, /*#__PURE__*/React.createElement(ScreenSizeProvider, {
|
|
3444
|
+
size: screenSize
|
|
3445
|
+
}, /*#__PURE__*/React.cloneElement(children, {
|
|
3446
|
+
width: screenWidth,
|
|
3447
|
+
height: screenHeight
|
|
3448
|
+
})))) : null);
|
|
3449
|
+
};
|
|
3450
|
+
|
|
3451
|
+
ScreenSizer.propTypes = propTypes$a;
|
|
3452
|
+
ScreenSizer.defaultProps = defaultProps$a;
|
|
3453
|
+
|
|
3333
3454
|
var styles$7 = {"container":"micromag-core-screens-screen-container"};
|
|
3334
3455
|
|
|
3335
3456
|
var propTypes$9 = {
|
|
@@ -3403,70 +3524,76 @@ Screen.propTypes = propTypes$9;
|
|
|
3403
3524
|
Screen.defaultProps = defaultProps$9;
|
|
3404
3525
|
var Screen$1 = /*#__PURE__*/React.memo(Screen);
|
|
3405
3526
|
|
|
3406
|
-
var styles$6 = {"
|
|
3527
|
+
var styles$6 = {"screen":"micromag-core-screens-screen-placeholder-screen"};
|
|
3407
3528
|
|
|
3529
|
+
var _excluded$1 = ["screen", "layout", "screenWidth", "screenHeight", "screenState", "withSize", "className"];
|
|
3408
3530
|
var propTypes$8 = {
|
|
3409
3531
|
screen: PropTypes.component.isRequired,
|
|
3410
3532
|
layout: PropTypes$1.string,
|
|
3533
|
+
screenWidth: PropTypes$1.number,
|
|
3534
|
+
screenHeight: PropTypes$1.number,
|
|
3411
3535
|
screenState: PropTypes$1.string,
|
|
3412
|
-
|
|
3413
|
-
height: PropTypes$1.number,
|
|
3536
|
+
withSize: PropTypes$1.bool,
|
|
3414
3537
|
className: PropTypes$1.string
|
|
3415
3538
|
};
|
|
3416
3539
|
var defaultProps$8 = {
|
|
3417
3540
|
layout: undefined,
|
|
3418
3541
|
screenState: null,
|
|
3419
|
-
|
|
3420
|
-
|
|
3542
|
+
screenWidth: 100,
|
|
3543
|
+
screenHeight: 150,
|
|
3544
|
+
withSize: false,
|
|
3421
3545
|
className: null
|
|
3422
3546
|
};
|
|
3423
3547
|
|
|
3424
3548
|
var ScreenPlaceholder = function ScreenPlaceholder(_ref) {
|
|
3425
3549
|
var screen = _ref.screen,
|
|
3426
3550
|
layout = _ref.layout,
|
|
3427
|
-
|
|
3428
|
-
|
|
3551
|
+
screenWidth = _ref.screenWidth,
|
|
3552
|
+
screenHeight = _ref.screenHeight,
|
|
3429
3553
|
screenState = _ref.screenState,
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
width: width,
|
|
3436
|
-
height: height
|
|
3437
|
-
};
|
|
3438
|
-
}, [width, height]);
|
|
3439
|
-
return /*#__PURE__*/React.createElement(ScreenSizeProvider, {
|
|
3440
|
-
size: screenSize
|
|
3441
|
-
}, /*#__PURE__*/React.createElement(ScreenProvider, {
|
|
3442
|
-
data: screen,
|
|
3443
|
-
renderContext: "placeholder",
|
|
3444
|
-
screenState: screenState
|
|
3445
|
-
}, /*#__PURE__*/React.createElement(Screen$1, {
|
|
3554
|
+
withSize = _ref.withSize,
|
|
3555
|
+
className = _ref.className,
|
|
3556
|
+
props = _objectWithoutProperties(_ref, _excluded$1);
|
|
3557
|
+
|
|
3558
|
+
var screenElement = /*#__PURE__*/React.createElement(Screen$1, Object.assign({
|
|
3446
3559
|
screen: screen,
|
|
3560
|
+
renderContext: "placeholder",
|
|
3561
|
+
screenState: screenState,
|
|
3447
3562
|
layout: layout,
|
|
3448
|
-
className: classNames([styles$6.
|
|
3449
|
-
}))
|
|
3563
|
+
className: classNames([styles$6.screen, _defineProperty({}, className, !withSize)])
|
|
3564
|
+
}, props));
|
|
3565
|
+
return withSize ? /*#__PURE__*/React.createElement(ScreenSizer, {
|
|
3566
|
+
className: className,
|
|
3567
|
+
screenWidth: screenWidth,
|
|
3568
|
+
screenHeight: screenHeight
|
|
3569
|
+
}, screenElement) : screenElement;
|
|
3450
3570
|
};
|
|
3451
3571
|
|
|
3452
3572
|
ScreenPlaceholder.propTypes = propTypes$8;
|
|
3453
3573
|
ScreenPlaceholder.defaultProps = defaultProps$8;
|
|
3454
3574
|
var Placeholder = /*#__PURE__*/React.memo(ScreenPlaceholder);
|
|
3455
3575
|
|
|
3456
|
-
var styles$5 = {"
|
|
3576
|
+
var styles$5 = {"screen":"micromag-core-screens-preview-screen"};
|
|
3457
3577
|
|
|
3578
|
+
var _excluded = ["screen", "screenState", "width", "height", "screenWidth", "screenHeight", "className", "withSize"];
|
|
3458
3579
|
var propTypes$7 = {
|
|
3459
3580
|
screen: PropTypes.component.isRequired,
|
|
3460
3581
|
screenState: PropTypes$1.string,
|
|
3461
3582
|
width: PropTypes$1.number,
|
|
3462
3583
|
height: PropTypes$1.number,
|
|
3463
|
-
|
|
3584
|
+
screenWidth: PropTypes$1.number,
|
|
3585
|
+
screenHeight: PropTypes$1.number,
|
|
3586
|
+
className: PropTypes$1.string,
|
|
3587
|
+
withSize: PropTypes$1.bool
|
|
3464
3588
|
};
|
|
3465
3589
|
var defaultProps$7 = {
|
|
3466
3590
|
screenState: null,
|
|
3467
|
-
width:
|
|
3468
|
-
height:
|
|
3469
|
-
|
|
3591
|
+
width: undefined,
|
|
3592
|
+
height: undefined,
|
|
3593
|
+
screenWidth: undefined,
|
|
3594
|
+
screenHeight: undefined,
|
|
3595
|
+
className: null,
|
|
3596
|
+
withSize: false
|
|
3470
3597
|
};
|
|
3471
3598
|
|
|
3472
3599
|
var ScreenPreview = function ScreenPreview(_ref) {
|
|
@@ -3474,26 +3601,27 @@ var ScreenPreview = function ScreenPreview(_ref) {
|
|
|
3474
3601
|
screenState = _ref.screenState,
|
|
3475
3602
|
width = _ref.width,
|
|
3476
3603
|
height = _ref.height,
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
};
|
|
3485
|
-
}, [width, height]);
|
|
3486
|
-
return /*#__PURE__*/React.createElement(ScreenSizeProvider, {
|
|
3487
|
-
size: screenSize
|
|
3488
|
-
}, /*#__PURE__*/React.createElement(ScreenProvider, {
|
|
3489
|
-
data: screen,
|
|
3490
|
-
renderContext: "preview",
|
|
3491
|
-
screenState: screenState
|
|
3492
|
-
}, /*#__PURE__*/React.createElement(Screen$1, {
|
|
3604
|
+
screenWidth = _ref.screenWidth,
|
|
3605
|
+
screenHeight = _ref.screenHeight,
|
|
3606
|
+
className = _ref.className,
|
|
3607
|
+
withSize = _ref.withSize,
|
|
3608
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
3609
|
+
|
|
3610
|
+
var screenElement = /*#__PURE__*/React.createElement(Screen$1, Object.assign({
|
|
3493
3611
|
screen: screen,
|
|
3494
3612
|
renderContext: "preview",
|
|
3495
|
-
|
|
3496
|
-
|
|
3613
|
+
screenState: screenState,
|
|
3614
|
+
width: !withSize ? width : undefined,
|
|
3615
|
+
height: !withSize ? height : undefined,
|
|
3616
|
+
className: classNames([styles$5.screen, _defineProperty({}, className, !withSize)])
|
|
3617
|
+
}, props));
|
|
3618
|
+
return withSize ? /*#__PURE__*/React.createElement(ScreenSizer, {
|
|
3619
|
+
className: className,
|
|
3620
|
+
screenWidth: screenWidth,
|
|
3621
|
+
screenHeight: screenHeight,
|
|
3622
|
+
width: width,
|
|
3623
|
+
height: height
|
|
3624
|
+
}, screenElement) : screenElement;
|
|
3497
3625
|
};
|
|
3498
3626
|
|
|
3499
3627
|
ScreenPreview.propTypes = propTypes$7;
|
|
@@ -4039,4 +4167,4 @@ var LinkStyle = function LinkStyle(_ref) {
|
|
|
4039
4167
|
LinkStyle.propTypes = propTypes;
|
|
4040
4168
|
LinkStyle.defaultProps = defaultProps;
|
|
4041
4169
|
|
|
4042
|
-
export { BackButton, Breadcrumb, Button$1 as Button, Buttons, Card, CollapsablePanel, Date$1 as Date, Detector, Dropdown as DropdownMenu, ElementComponent as Element, Empty, FieldForm, FontFaces, Form, FormPanel, HighlightStyle, Label, Link, LinkStyle, Media, Menu, Meta, Modal, ModalDialog, ModalPortal, Modals, Navbar, PaginationMenu as Pagination, Panel, PanelPortal, Panels, AdFrame as PlaceholderAdFrame, AdImage as PlaceholderAdImage, Audio as PlaceholderAudio, Button as PlaceholderButton, Image as PlaceholderImage, Line as PlaceholderLine, Map as PlaceholderMap, MapPath as PlaceholderMapPath, Quote as PlaceholderQuote, ShortText as PlaceholderShortText, Subtitle as PlaceholderSubtitle, TextPlaceholder as PlaceholderText, Timeline as PlaceholderTimeline, Title as PlaceholderTitle, Video as PlaceholderVideo, Video360 as PlaceholderVideo360, VideoLoop as PlaceholderVideoLoop, Screen$1 as Screen, ScreenElement, Placeholder as ScreenPlaceholder, Preview as ScreenPreview, Screens, Slideshow, Spinner, TabsMenu as Tabs, Transitions, TransitionsStagger, UploadModal };
|
|
4170
|
+
export { BackButton, Breadcrumb, Button$1 as Button, Buttons, Card, CollapsablePanel, Date$1 as Date, Detector, Dropdown as DropdownMenu, ElementComponent as Element, Empty, FieldForm, FontFaces, Form, FormPanel, HighlightStyle, Label, Link, LinkStyle, Media, Menu, Meta, Modal, ModalDialog, ModalPortal, Modals, Navbar, PaginationMenu as Pagination, Panel, PanelPortal, Panels, AdFrame as PlaceholderAdFrame, AdImage as PlaceholderAdImage, Audio as PlaceholderAudio, Button as PlaceholderButton, Image as PlaceholderImage, Line as PlaceholderLine, Map as PlaceholderMap, MapPath as PlaceholderMapPath, Quote as PlaceholderQuote, ShortText as PlaceholderShortText, Subtitle as PlaceholderSubtitle, TextPlaceholder as PlaceholderText, Timeline as PlaceholderTimeline, Title as PlaceholderTitle, Video as PlaceholderVideo, Video360 as PlaceholderVideo360, VideoLoop as PlaceholderVideoLoop, Screen$1 as Screen, ScreenElement, Placeholder as ScreenPlaceholder, Preview as ScreenPreview, ScreenSizer, Screens, Slideshow, Spinner, TabsMenu as Tabs, Transitions, TransitionsStagger, UploadModal };
|