@micromag/core 0.3.7 → 0.3.14
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 +4 -3
- package/assets/css/vendor.css +1 -1
- package/es/components.js +418 -292
- package/lib/components.js +416 -289
- package/package.json +3 -2
- package/scss/vendor.scss +8 -0
package/lib/components.js
CHANGED
|
@@ -29,6 +29,7 @@ var reactHelmet = require('react-helmet');
|
|
|
29
29
|
var isString = require('lodash/isString');
|
|
30
30
|
require('snake-case');
|
|
31
31
|
var isNumber = require('lodash/isNumber');
|
|
32
|
+
var size = require('@folklore/size');
|
|
32
33
|
var core$1 = require('@react-spring/core');
|
|
33
34
|
var web = require('@react-spring/web');
|
|
34
35
|
|
|
@@ -52,13 +53,13 @@ var isString__default = /*#__PURE__*/_interopDefaultLegacy(isString);
|
|
|
52
53
|
var isNumber__default = /*#__PURE__*/_interopDefaultLegacy(isNumber);
|
|
53
54
|
|
|
54
55
|
/* eslint-disable react/jsx-props-no-spreading */
|
|
55
|
-
var propTypes$
|
|
56
|
+
var propTypes$K = {
|
|
56
57
|
children: core.PropTypes.label.isRequired,
|
|
57
58
|
isHtml: PropTypes__default["default"].bool,
|
|
58
59
|
values: PropTypes__default["default"].object // eslint-disable-line react/forbid-prop-types
|
|
59
60
|
|
|
60
61
|
};
|
|
61
|
-
var defaultProps$
|
|
62
|
+
var defaultProps$K = {
|
|
62
63
|
isHtml: false,
|
|
63
64
|
values: {}
|
|
64
65
|
};
|
|
@@ -73,13 +74,13 @@ var Label = function Label(_ref) {
|
|
|
73
74
|
}, children)) : children;
|
|
74
75
|
};
|
|
75
76
|
|
|
76
|
-
Label.propTypes = propTypes$
|
|
77
|
-
Label.defaultProps = defaultProps$
|
|
77
|
+
Label.propTypes = propTypes$K;
|
|
78
|
+
Label.defaultProps = defaultProps$K;
|
|
78
79
|
|
|
79
80
|
var styles$u = {"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"};
|
|
80
81
|
|
|
81
|
-
var _excluded$
|
|
82
|
-
var propTypes$
|
|
82
|
+
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"];
|
|
83
|
+
var propTypes$J = {
|
|
83
84
|
type: PropTypes__default["default"].string,
|
|
84
85
|
theme: core.PropTypes.buttonTheme,
|
|
85
86
|
size: core.PropTypes.buttonSize,
|
|
@@ -112,7 +113,7 @@ var propTypes$I = {
|
|
|
112
113
|
|
|
113
114
|
})])
|
|
114
115
|
};
|
|
115
|
-
var defaultProps$
|
|
116
|
+
var defaultProps$J = {
|
|
116
117
|
type: 'button',
|
|
117
118
|
theme: null,
|
|
118
119
|
size: null,
|
|
@@ -174,7 +175,7 @@ var Button$1 = function Button(_ref) {
|
|
|
174
175
|
iconClassName = _ref.iconClassName,
|
|
175
176
|
labelClassName = _ref.labelClassName,
|
|
176
177
|
refButton = _ref.refButton,
|
|
177
|
-
props = _objectWithoutProperties__default["default"](_ref, _excluded$
|
|
178
|
+
props = _objectWithoutProperties__default["default"](_ref, _excluded$a);
|
|
178
179
|
|
|
179
180
|
var finalLabel = label || children;
|
|
180
181
|
var text = finalLabel !== null ? /*#__PURE__*/React__default["default"].createElement(Label, null, finalLabel) : null;
|
|
@@ -228,13 +229,13 @@ var Button$1 = function Button(_ref) {
|
|
|
228
229
|
}), content);
|
|
229
230
|
};
|
|
230
231
|
|
|
231
|
-
Button$1.propTypes = propTypes$
|
|
232
|
-
Button$1.defaultProps = defaultProps$
|
|
232
|
+
Button$1.propTypes = propTypes$J;
|
|
233
|
+
Button$1.defaultProps = defaultProps$J;
|
|
233
234
|
|
|
234
235
|
var styles$t = {};
|
|
235
236
|
|
|
236
|
-
var _excluded$
|
|
237
|
-
var propTypes$
|
|
237
|
+
var _excluded$9 = ["className", "onClick", "theme"];
|
|
238
|
+
var propTypes$I = {
|
|
238
239
|
buttons: core.PropTypes.buttons,
|
|
239
240
|
size: core.PropTypes.buttonSize,
|
|
240
241
|
theme: core.PropTypes.buttonTheme,
|
|
@@ -243,7 +244,7 @@ var propTypes$H = {
|
|
|
243
244
|
className: PropTypes__default["default"].string,
|
|
244
245
|
buttonClassName: PropTypes__default["default"].string
|
|
245
246
|
};
|
|
246
|
-
var defaultProps$
|
|
247
|
+
var defaultProps$I = {
|
|
247
248
|
buttons: [],
|
|
248
249
|
size: null,
|
|
249
250
|
theme: undefined,
|
|
@@ -273,7 +274,7 @@ var Buttons = function Buttons(_ref) {
|
|
|
273
274
|
_onClick = _button$onClick === void 0 ? null : _button$onClick,
|
|
274
275
|
_button$theme = button.theme,
|
|
275
276
|
buttonTheme = _button$theme === void 0 ? null : _button$theme,
|
|
276
|
-
buttonProps = _objectWithoutProperties__default["default"](button, _excluded$
|
|
277
|
+
buttonProps = _objectWithoutProperties__default["default"](button, _excluded$9);
|
|
277
278
|
|
|
278
279
|
var fixedProps = {
|
|
279
280
|
key: "button-".concat(index),
|
|
@@ -293,20 +294,20 @@ var Buttons = function Buttons(_ref) {
|
|
|
293
294
|
}));
|
|
294
295
|
};
|
|
295
296
|
|
|
296
|
-
Buttons.propTypes = propTypes$
|
|
297
|
-
Buttons.defaultProps = defaultProps$
|
|
297
|
+
Buttons.propTypes = propTypes$I;
|
|
298
|
+
Buttons.defaultProps = defaultProps$I;
|
|
298
299
|
|
|
299
|
-
var _excluded$
|
|
300
|
-
var propTypes$
|
|
300
|
+
var _excluded$8 = ["className"];
|
|
301
|
+
var propTypes$H = {
|
|
301
302
|
className: PropTypes__default["default"].string
|
|
302
303
|
};
|
|
303
|
-
var defaultProps$
|
|
304
|
+
var defaultProps$H = {
|
|
304
305
|
className: null
|
|
305
306
|
};
|
|
306
307
|
|
|
307
308
|
var BackButton = function BackButton(_ref) {
|
|
308
309
|
var className = _ref.className,
|
|
309
|
-
props = _objectWithoutProperties__default["default"](_ref, _excluded$
|
|
310
|
+
props = _objectWithoutProperties__default["default"](_ref, _excluded$8);
|
|
310
311
|
|
|
311
312
|
return /*#__PURE__*/React__default["default"].createElement(Button$1, Object.assign({
|
|
312
313
|
className: classNames__default["default"](['px-2', _defineProperty__default["default"]({}, className, className)]),
|
|
@@ -318,12 +319,12 @@ var BackButton = function BackButton(_ref) {
|
|
|
318
319
|
}, props));
|
|
319
320
|
};
|
|
320
321
|
|
|
321
|
-
BackButton.propTypes = propTypes$
|
|
322
|
-
BackButton.defaultProps = defaultProps$
|
|
322
|
+
BackButton.propTypes = propTypes$H;
|
|
323
|
+
BackButton.defaultProps = defaultProps$H;
|
|
323
324
|
|
|
324
|
-
var _excluded$
|
|
325
|
+
var _excluded$7 = ["type"],
|
|
325
326
|
_excluded2 = ["component", "id", "settings"];
|
|
326
|
-
var propTypes$
|
|
327
|
+
var propTypes$G = {
|
|
327
328
|
name: PropTypes__default["default"].string,
|
|
328
329
|
// .isRequired,
|
|
329
330
|
value: core.PropTypes.component,
|
|
@@ -337,7 +338,7 @@ var propTypes$F = {
|
|
|
337
338
|
fieldContext: PropTypes__default["default"].any // eslint-disable-line react/forbid-prop-types
|
|
338
339
|
|
|
339
340
|
};
|
|
340
|
-
var defaultProps$
|
|
341
|
+
var defaultProps$G = {
|
|
341
342
|
name: null,
|
|
342
343
|
form: null,
|
|
343
344
|
formComponents: {},
|
|
@@ -365,7 +366,7 @@ var FieldForm = function FieldForm(_ref) {
|
|
|
365
366
|
var _ref2 = field || {},
|
|
366
367
|
_ref2$type = _ref2.type,
|
|
367
368
|
type = _ref2$type === void 0 ? null : _ref2$type,
|
|
368
|
-
fieldProps = _objectWithoutProperties__default["default"](_ref2, _excluded$
|
|
369
|
+
fieldProps = _objectWithoutProperties__default["default"](_ref2, _excluded$7);
|
|
369
370
|
|
|
370
371
|
var _ref3 = (type !== null ? fieldsManager.getDefinition(type) || null : null) || _objectSpread__default["default"]({}, field),
|
|
371
372
|
_ref3$component = _ref3.component,
|
|
@@ -418,12 +419,12 @@ var FieldForm = function FieldForm(_ref) {
|
|
|
418
419
|
}, formProps))) : null;
|
|
419
420
|
};
|
|
420
421
|
|
|
421
|
-
FieldForm.propTypes = propTypes$
|
|
422
|
-
FieldForm.defaultProps = defaultProps$
|
|
422
|
+
FieldForm.propTypes = propTypes$G;
|
|
423
|
+
FieldForm.defaultProps = defaultProps$G;
|
|
423
424
|
|
|
424
425
|
var styles$s = {"actions":"micromag-core-forms-form-actions","left":"micromag-core-forms-form-left","right":"micromag-core-forms-form-right"};
|
|
425
426
|
|
|
426
|
-
var propTypes$
|
|
427
|
+
var propTypes$F = {
|
|
427
428
|
action: PropTypes__default["default"].string.isRequired,
|
|
428
429
|
method: PropTypes__default["default"].string,
|
|
429
430
|
fields: core.PropTypes.formFields,
|
|
@@ -450,7 +451,7 @@ var propTypes$E = {
|
|
|
450
451
|
actionsClassName: PropTypes__default["default"].string,
|
|
451
452
|
cancelClassName: PropTypes__default["default"].string
|
|
452
453
|
};
|
|
453
|
-
var defaultProps$
|
|
454
|
+
var defaultProps$F = {
|
|
454
455
|
method: 'POST',
|
|
455
456
|
fields: [],
|
|
456
457
|
initialValue: null,
|
|
@@ -663,13 +664,13 @@ var Form = function Form(_ref) {
|
|
|
663
664
|
})) : null) : null);
|
|
664
665
|
};
|
|
665
666
|
|
|
666
|
-
Form.propTypes = propTypes$
|
|
667
|
-
Form.defaultProps = defaultProps$
|
|
667
|
+
Form.propTypes = propTypes$F;
|
|
668
|
+
Form.defaultProps = defaultProps$F;
|
|
668
669
|
|
|
669
670
|
var styles$r = {"withoutStyle":"micromag-core-partials-link-withoutStyle"};
|
|
670
671
|
|
|
671
|
-
var _excluded$
|
|
672
|
-
var propTypes$
|
|
672
|
+
var _excluded$6 = ["href", "external", "children", "target", "rel", "className", "withoutStyle"];
|
|
673
|
+
var propTypes$E = {
|
|
673
674
|
href: PropTypes__default["default"].string,
|
|
674
675
|
external: PropTypes__default["default"].bool,
|
|
675
676
|
target: PropTypes__default["default"].string,
|
|
@@ -678,7 +679,7 @@ var propTypes$D = {
|
|
|
678
679
|
withoutStyle: PropTypes__default["default"].bool,
|
|
679
680
|
className: PropTypes__default["default"].string
|
|
680
681
|
};
|
|
681
|
-
var defaultProps$
|
|
682
|
+
var defaultProps$E = {
|
|
682
683
|
href: '',
|
|
683
684
|
external: false,
|
|
684
685
|
target: '_blank',
|
|
@@ -696,7 +697,7 @@ var Link = function Link(_ref) {
|
|
|
696
697
|
rel = _ref.rel,
|
|
697
698
|
className = _ref.className,
|
|
698
699
|
withoutStyle = _ref.withoutStyle,
|
|
699
|
-
props = _objectWithoutProperties__default["default"](_ref, _excluded$
|
|
700
|
+
props = _objectWithoutProperties__default["default"](_ref, _excluded$6);
|
|
700
701
|
|
|
701
702
|
return external ? /*#__PURE__*/React__default["default"].createElement("a", Object.assign({
|
|
702
703
|
className: classNames__default["default"]([className, _defineProperty__default["default"]({}, styles$r.withoutStyle, withoutStyle)]),
|
|
@@ -709,11 +710,11 @@ var Link = function Link(_ref) {
|
|
|
709
710
|
}, props), /*#__PURE__*/React__default["default"].createElement(Label, null, children));
|
|
710
711
|
};
|
|
711
712
|
|
|
712
|
-
Link.propTypes = propTypes$
|
|
713
|
-
Link.defaultProps = defaultProps$
|
|
713
|
+
Link.propTypes = propTypes$E;
|
|
714
|
+
Link.defaultProps = defaultProps$E;
|
|
714
715
|
|
|
715
|
-
var _excluded$
|
|
716
|
-
var propTypes$
|
|
716
|
+
var _excluded$5 = ["label", "className"];
|
|
717
|
+
var propTypes$D = {
|
|
717
718
|
href: PropTypes__default["default"].string,
|
|
718
719
|
header: PropTypes__default["default"].node,
|
|
719
720
|
image: PropTypes__default["default"].node,
|
|
@@ -742,7 +743,7 @@ var propTypes$C = {
|
|
|
742
743
|
onClickBody: PropTypes__default["default"].func,
|
|
743
744
|
onClickFooter: PropTypes__default["default"].func
|
|
744
745
|
};
|
|
745
|
-
var defaultProps$
|
|
746
|
+
var defaultProps$D = {
|
|
746
747
|
href: null,
|
|
747
748
|
header: null,
|
|
748
749
|
image: null,
|
|
@@ -800,7 +801,7 @@ var Card = function Card(_ref) {
|
|
|
800
801
|
var label = _ref2.label,
|
|
801
802
|
_ref2$className = _ref2.className,
|
|
802
803
|
linkClassName = _ref2$className === void 0 ? null : _ref2$className,
|
|
803
|
-
linkProps = _objectWithoutProperties__default["default"](_ref2, _excluded$
|
|
804
|
+
linkProps = _objectWithoutProperties__default["default"](_ref2, _excluded$5);
|
|
804
805
|
|
|
805
806
|
return /*#__PURE__*/React__default["default"].createElement(Link, Object.assign({
|
|
806
807
|
key: "link-".concat(label, "-").concat(index),
|
|
@@ -863,15 +864,15 @@ var Card = function Card(_ref) {
|
|
|
863
864
|
}, cardInner);
|
|
864
865
|
};
|
|
865
866
|
|
|
866
|
-
Card.propTypes = propTypes$
|
|
867
|
-
Card.defaultProps = defaultProps$
|
|
867
|
+
Card.propTypes = propTypes$D;
|
|
868
|
+
Card.defaultProps = defaultProps$D;
|
|
868
869
|
|
|
869
|
-
var propTypes$
|
|
870
|
+
var propTypes$C = {
|
|
870
871
|
animated: PropTypes__default["default"].bool,
|
|
871
872
|
color: PropTypes__default["default"].string,
|
|
872
873
|
className: PropTypes__default["default"].string
|
|
873
874
|
};
|
|
874
|
-
var defaultProps$
|
|
875
|
+
var defaultProps$C = {
|
|
875
876
|
animated: true,
|
|
876
877
|
color: 'currentColor',
|
|
877
878
|
className: null
|
|
@@ -936,19 +937,19 @@ var Spinner = function Spinner(_ref) {
|
|
|
936
937
|
}) : null))));
|
|
937
938
|
};
|
|
938
939
|
|
|
939
|
-
Spinner.propTypes = propTypes$
|
|
940
|
-
Spinner.defaultProps = defaultProps$
|
|
940
|
+
Spinner.propTypes = propTypes$C;
|
|
941
|
+
Spinner.defaultProps = defaultProps$C;
|
|
941
942
|
|
|
942
943
|
var styles$q = {};
|
|
943
944
|
|
|
944
|
-
var _excluded$
|
|
945
|
-
var propTypes$
|
|
945
|
+
var _excluded$4 = ["description", "loading", "children", "className"];
|
|
946
|
+
var propTypes$B = {
|
|
946
947
|
description: PropTypes__default["default"].node,
|
|
947
948
|
loading: PropTypes__default["default"].bool,
|
|
948
949
|
children: PropTypes__default["default"].node,
|
|
949
950
|
className: PropTypes__default["default"].string
|
|
950
951
|
};
|
|
951
|
-
var defaultProps$
|
|
952
|
+
var defaultProps$B = {
|
|
952
953
|
description: null,
|
|
953
954
|
loading: false,
|
|
954
955
|
children: null,
|
|
@@ -960,19 +961,19 @@ var FormPanel = function FormPanel(_ref) {
|
|
|
960
961
|
loading = _ref.loading,
|
|
961
962
|
children = _ref.children,
|
|
962
963
|
className = _ref.className,
|
|
963
|
-
props = _objectWithoutProperties__default["default"](_ref, _excluded$
|
|
964
|
+
props = _objectWithoutProperties__default["default"](_ref, _excluded$4);
|
|
964
965
|
|
|
965
966
|
return /*#__PURE__*/React__default["default"].createElement(Card, Object.assign({
|
|
966
967
|
className: classNames__default["default"]([styles$q.container, _defineProperty__default["default"]({}, className, className !== null)])
|
|
967
968
|
}, props), description, loading ? /*#__PURE__*/React__default["default"].createElement(Spinner, null) : children);
|
|
968
969
|
};
|
|
969
970
|
|
|
970
|
-
FormPanel.propTypes = propTypes$
|
|
971
|
-
FormPanel.defaultProps = defaultProps$
|
|
971
|
+
FormPanel.propTypes = propTypes$B;
|
|
972
|
+
FormPanel.defaultProps = defaultProps$B;
|
|
972
973
|
|
|
973
974
|
var styles$p = {"container":"micromag-core-menus-breadcrumb-container","arrow":"micromag-core-menus-breadcrumb-arrow"};
|
|
974
975
|
|
|
975
|
-
var propTypes$
|
|
976
|
+
var propTypes$A = {
|
|
976
977
|
items: core.PropTypes.menuItems,
|
|
977
978
|
theme: core.PropTypes.bootstrapThemes,
|
|
978
979
|
separator: PropTypes__default["default"].oneOf([null, 'arrow']),
|
|
@@ -980,7 +981,7 @@ var propTypes$z = {
|
|
|
980
981
|
noWrap: PropTypes__default["default"].bool,
|
|
981
982
|
className: PropTypes__default["default"].string
|
|
982
983
|
};
|
|
983
|
-
var defaultProps$
|
|
984
|
+
var defaultProps$A = {
|
|
984
985
|
items: [],
|
|
985
986
|
theme: null,
|
|
986
987
|
separator: null,
|
|
@@ -1030,13 +1031,11 @@ var Breadcrumb = function Breadcrumb(_ref) {
|
|
|
1030
1031
|
})));
|
|
1031
1032
|
};
|
|
1032
1033
|
|
|
1033
|
-
Breadcrumb.propTypes = propTypes$
|
|
1034
|
-
Breadcrumb.defaultProps = defaultProps$
|
|
1034
|
+
Breadcrumb.propTypes = propTypes$A;
|
|
1035
|
+
Breadcrumb.defaultProps = defaultProps$A;
|
|
1035
1036
|
|
|
1036
|
-
var
|
|
1037
|
-
|
|
1038
|
-
var _excluded$1 = ["id", "type", "className", "label", "children", "onClick", "active"];
|
|
1039
|
-
var propTypes$y = {
|
|
1037
|
+
var _excluded$3 = ["id", "type", "className", "label", "children", "onClick", "active"];
|
|
1038
|
+
var propTypes$z = {
|
|
1040
1039
|
items: core.PropTypes.menuItems,
|
|
1041
1040
|
children: PropTypes__default["default"].node,
|
|
1042
1041
|
visible: PropTypes__default["default"].bool,
|
|
@@ -1046,7 +1045,7 @@ var propTypes$y = {
|
|
|
1046
1045
|
onClickItem: PropTypes__default["default"].func,
|
|
1047
1046
|
onClickOutside: PropTypes__default["default"].func
|
|
1048
1047
|
};
|
|
1049
|
-
var defaultProps$
|
|
1048
|
+
var defaultProps$z = {
|
|
1050
1049
|
items: [],
|
|
1051
1050
|
children: null,
|
|
1052
1051
|
visible: false,
|
|
@@ -1076,7 +1075,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
1076
1075
|
}, [refContainer.current, onClickOutside]);
|
|
1077
1076
|
hooks.useDocumentEvent('click', onDocumentClick, visible);
|
|
1078
1077
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1079
|
-
className: classNames__default["default"](['dropdown-menu', (_ref2 = {}, _defineProperty__default["default"](_ref2,
|
|
1078
|
+
className: classNames__default["default"](['dropdown-menu', (_ref2 = {}, _defineProperty__default["default"](_ref2, "dropdown-menu-".concat(align), align !== null), _defineProperty__default["default"](_ref2, "show", visible), _defineProperty__default["default"](_ref2, className, className !== null), _ref2)]),
|
|
1080
1079
|
ref: refContainer
|
|
1081
1080
|
}, children !== null ? children : items.map(function (it, index) {
|
|
1082
1081
|
var _ref3;
|
|
@@ -1094,7 +1093,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
1094
1093
|
customOnClick = _it$onClick === void 0 ? null : _it$onClick,
|
|
1095
1094
|
_it$active = it.active,
|
|
1096
1095
|
active = _it$active === void 0 ? false : _it$active,
|
|
1097
|
-
itemProps = _objectWithoutProperties__default["default"](it, _excluded$
|
|
1096
|
+
itemProps = _objectWithoutProperties__default["default"](it, _excluded$3);
|
|
1098
1097
|
|
|
1099
1098
|
var ItemComponent = 'div';
|
|
1100
1099
|
|
|
@@ -1130,11 +1129,11 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
1130
1129
|
}));
|
|
1131
1130
|
};
|
|
1132
1131
|
|
|
1133
|
-
Dropdown.propTypes = propTypes$
|
|
1134
|
-
Dropdown.defaultProps = defaultProps$
|
|
1132
|
+
Dropdown.propTypes = propTypes$z;
|
|
1133
|
+
Dropdown.defaultProps = defaultProps$z;
|
|
1135
1134
|
|
|
1136
|
-
var _excluded = ["id", "className", "linkClassName", "href", "label", "external", "items", "dropdown", "active", "onClick"];
|
|
1137
|
-
var propTypes$
|
|
1135
|
+
var _excluded$2 = ["id", "className", "linkClassName", "href", "label", "external", "items", "dropdown", "active", "onClick"];
|
|
1136
|
+
var propTypes$y = {
|
|
1138
1137
|
items: core.PropTypes.menuItems,
|
|
1139
1138
|
tagName: PropTypes__default["default"].string,
|
|
1140
1139
|
itemTagName: PropTypes__default["default"].string,
|
|
@@ -1153,7 +1152,7 @@ var propTypes$x = {
|
|
|
1153
1152
|
dropdownLinkClassName: PropTypes__default["default"].string,
|
|
1154
1153
|
dropdownAlign: core.PropTypes.dropdownAlign
|
|
1155
1154
|
};
|
|
1156
|
-
var defaultProps$
|
|
1155
|
+
var defaultProps$y = {
|
|
1157
1156
|
items: [],
|
|
1158
1157
|
tagName: 'ul',
|
|
1159
1158
|
itemTagName: 'li',
|
|
@@ -1223,7 +1222,7 @@ var Menu = function Menu(_ref) {
|
|
|
1223
1222
|
active = _it$active === void 0 ? false : _it$active,
|
|
1224
1223
|
_it$onClick = it.onClick,
|
|
1225
1224
|
customOnClick = _it$onClick === void 0 ? null : _it$onClick,
|
|
1226
|
-
itemProps = _objectWithoutProperties__default["default"](it, _excluded);
|
|
1225
|
+
itemProps = _objectWithoutProperties__default["default"](it, _excluded$2);
|
|
1227
1226
|
|
|
1228
1227
|
var onClickItem = dropdown !== null ? function (e) {
|
|
1229
1228
|
e.preventDefault();
|
|
@@ -1277,10 +1276,10 @@ var Menu = function Menu(_ref) {
|
|
|
1277
1276
|
}));
|
|
1278
1277
|
};
|
|
1279
1278
|
|
|
1280
|
-
Menu.propTypes = propTypes$
|
|
1281
|
-
Menu.defaultProps = defaultProps$
|
|
1279
|
+
Menu.propTypes = propTypes$y;
|
|
1280
|
+
Menu.defaultProps = defaultProps$y;
|
|
1282
1281
|
|
|
1283
|
-
var propTypes$
|
|
1282
|
+
var propTypes$x = {
|
|
1284
1283
|
brand: PropTypes__default["default"].node,
|
|
1285
1284
|
brandLink: PropTypes__default["default"].string,
|
|
1286
1285
|
breadcrumbs: PropTypes__default["default"].node,
|
|
@@ -1294,7 +1293,7 @@ var propTypes$w = {
|
|
|
1294
1293
|
brandClassName: PropTypes__default["default"].string,
|
|
1295
1294
|
breadCrumbsClassName: PropTypes__default["default"].string
|
|
1296
1295
|
};
|
|
1297
|
-
var defaultProps$
|
|
1296
|
+
var defaultProps$x = {
|
|
1298
1297
|
brand: null,
|
|
1299
1298
|
brandLink: null,
|
|
1300
1299
|
breadcrumbs: null,
|
|
@@ -1368,10 +1367,10 @@ var Navbar = function Navbar(_ref) {
|
|
|
1368
1367
|
}, children) : children));
|
|
1369
1368
|
};
|
|
1370
1369
|
|
|
1371
|
-
Navbar.propTypes = propTypes$
|
|
1372
|
-
Navbar.defaultProps = defaultProps$
|
|
1370
|
+
Navbar.propTypes = propTypes$x;
|
|
1371
|
+
Navbar.defaultProps = defaultProps$x;
|
|
1373
1372
|
|
|
1374
|
-
var styles$
|
|
1373
|
+
var styles$o = {};
|
|
1375
1374
|
|
|
1376
1375
|
var messages = reactIntl.defineMessages({
|
|
1377
1376
|
previous: {
|
|
@@ -1389,7 +1388,7 @@ var messages = reactIntl.defineMessages({
|
|
|
1389
1388
|
}]
|
|
1390
1389
|
}
|
|
1391
1390
|
});
|
|
1392
|
-
var propTypes$
|
|
1391
|
+
var propTypes$w = {
|
|
1393
1392
|
page: PropTypes__default["default"].number,
|
|
1394
1393
|
total: PropTypes__default["default"].number,
|
|
1395
1394
|
url: PropTypes__default["default"].string,
|
|
@@ -1400,7 +1399,7 @@ var propTypes$v = {
|
|
|
1400
1399
|
linkClassName: PropTypes__default["default"].string,
|
|
1401
1400
|
onClickPage: PropTypes__default["default"].func
|
|
1402
1401
|
};
|
|
1403
|
-
var defaultProps$
|
|
1402
|
+
var defaultProps$w = {
|
|
1404
1403
|
page: 1,
|
|
1405
1404
|
total: 1,
|
|
1406
1405
|
url: null,
|
|
@@ -1431,7 +1430,7 @@ var PaginationMenu = function PaginationMenu(_ref) {
|
|
|
1431
1430
|
});
|
|
1432
1431
|
|
|
1433
1432
|
return /*#__PURE__*/React__default["default"].createElement("nav", {
|
|
1434
|
-
className: classNames__default["default"]([styles$
|
|
1433
|
+
className: classNames__default["default"]([styles$o.container, _defineProperty__default["default"]({}, className, className !== null)])
|
|
1435
1434
|
}, /*#__PURE__*/React__default["default"].createElement("ul", {
|
|
1436
1435
|
className: classNames__default["default"](['pagination', _defineProperty__default["default"]({}, paginationClassName, paginationClassName !== null)])
|
|
1437
1436
|
}, withPreviousNext ? /*#__PURE__*/React__default["default"].createElement("li", {
|
|
@@ -1474,12 +1473,12 @@ var PaginationMenu = function PaginationMenu(_ref) {
|
|
|
1474
1473
|
}, /*#__PURE__*/React__default["default"].createElement(Label, null, messages.next))) : null));
|
|
1475
1474
|
};
|
|
1476
1475
|
|
|
1477
|
-
PaginationMenu.propTypes = propTypes$
|
|
1478
|
-
PaginationMenu.defaultProps = defaultProps$
|
|
1476
|
+
PaginationMenu.propTypes = propTypes$w;
|
|
1477
|
+
PaginationMenu.defaultProps = defaultProps$w;
|
|
1479
1478
|
|
|
1480
|
-
var styles$
|
|
1479
|
+
var styles$n = {"container":"micromag-core-menus-tabs-container"};
|
|
1481
1480
|
|
|
1482
|
-
var propTypes$
|
|
1481
|
+
var propTypes$v = {
|
|
1483
1482
|
items: core.PropTypes.menuItems,
|
|
1484
1483
|
size: core.PropTypes.buttonSize,
|
|
1485
1484
|
theme: core.PropTypes.buttonTheme,
|
|
@@ -1488,7 +1487,7 @@ var propTypes$u = {
|
|
|
1488
1487
|
className: PropTypes__default["default"].string,
|
|
1489
1488
|
onClickItem: PropTypes__default["default"].func
|
|
1490
1489
|
};
|
|
1491
|
-
var defaultProps$
|
|
1490
|
+
var defaultProps$v = {
|
|
1492
1491
|
items: [],
|
|
1493
1492
|
size: null,
|
|
1494
1493
|
theme: 'secondary',
|
|
@@ -1507,29 +1506,29 @@ var TabsMenu = function TabsMenu(_ref) {
|
|
|
1507
1506
|
className = _ref.className,
|
|
1508
1507
|
onClickItem = _ref.onClickItem;
|
|
1509
1508
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1510
|
-
className: classNames__default["default"]([styles$
|
|
1509
|
+
className: classNames__default["default"]([styles$n.container, _defineProperty__default["default"]({}, className, className)])
|
|
1511
1510
|
}, /*#__PURE__*/React__default["default"].createElement(Buttons, {
|
|
1512
1511
|
buttons: items,
|
|
1513
1512
|
size: size,
|
|
1514
1513
|
theme: theme,
|
|
1515
1514
|
renderButton: renderItemButton,
|
|
1516
1515
|
onClickButton: onClickItem,
|
|
1517
|
-
className: styles$
|
|
1518
|
-
buttonClassName: classNames__default["default"]([styles$
|
|
1516
|
+
className: styles$n.buttons,
|
|
1517
|
+
buttonClassName: classNames__default["default"]([styles$n.button, _defineProperty__default["default"]({}, buttonClassName, buttonClassName !== null)])
|
|
1519
1518
|
}));
|
|
1520
1519
|
};
|
|
1521
1520
|
|
|
1522
|
-
TabsMenu.propTypes = propTypes$
|
|
1523
|
-
TabsMenu.defaultProps = defaultProps$
|
|
1521
|
+
TabsMenu.propTypes = propTypes$v;
|
|
1522
|
+
TabsMenu.defaultProps = defaultProps$v;
|
|
1524
1523
|
|
|
1525
|
-
var styles$
|
|
1524
|
+
var styles$m = {"container":"micromag-core-modals-container","modals":"micromag-core-modals-modals","hasModals":"micromag-core-modals-hasModals"};
|
|
1526
1525
|
|
|
1527
|
-
var propTypes$
|
|
1526
|
+
var propTypes$u = {
|
|
1528
1527
|
modals: core.PropTypes.modals.isRequired,
|
|
1529
1528
|
setModalsContainer: PropTypes__default["default"].func.isRequired,
|
|
1530
1529
|
className: PropTypes__default["default"].string
|
|
1531
1530
|
};
|
|
1532
|
-
var defaultProps$
|
|
1531
|
+
var defaultProps$u = {
|
|
1533
1532
|
className: null
|
|
1534
1533
|
};
|
|
1535
1534
|
|
|
@@ -1542,19 +1541,19 @@ var ModalsContainer = function ModalsContainer(_ref) {
|
|
|
1542
1541
|
setModalsContainer(containerRef.current);
|
|
1543
1542
|
}, []);
|
|
1544
1543
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1545
|
-
className: classNames__default["default"]([styles$
|
|
1544
|
+
className: classNames__default["default"]([styles$m.container, _defineProperty__default["default"]({}, className, className)])
|
|
1546
1545
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1547
|
-
className: classNames__default["default"]([styles$
|
|
1546
|
+
className: classNames__default["default"]([styles$m.modals, _defineProperty__default["default"]({}, styles$m.hasModals, modals.length > 0)]),
|
|
1548
1547
|
ref: containerRef
|
|
1549
1548
|
}));
|
|
1550
1549
|
};
|
|
1551
1550
|
|
|
1552
|
-
ModalsContainer.propTypes = propTypes$
|
|
1553
|
-
ModalsContainer.defaultProps = defaultProps$
|
|
1551
|
+
ModalsContainer.propTypes = propTypes$u;
|
|
1552
|
+
ModalsContainer.defaultProps = defaultProps$u;
|
|
1554
1553
|
var Modals = contexts.withModals(ModalsContainer);
|
|
1555
1554
|
|
|
1556
1555
|
/* eslint-disable react/no-array-index-key, react/jsx-props-no-spreading */
|
|
1557
|
-
var propTypes$
|
|
1556
|
+
var propTypes$t = {
|
|
1558
1557
|
id: PropTypes__default["default"].string,
|
|
1559
1558
|
data: PropTypes__default["default"].object,
|
|
1560
1559
|
// eslint-disable-line react/forbid-prop-types
|
|
@@ -1564,7 +1563,7 @@ var propTypes$s = {
|
|
|
1564
1563
|
unregister: PropTypes__default["default"].func,
|
|
1565
1564
|
children: PropTypes__default["default"].node
|
|
1566
1565
|
};
|
|
1567
|
-
var defaultProps$
|
|
1566
|
+
var defaultProps$t = {
|
|
1568
1567
|
id: null,
|
|
1569
1568
|
data: null,
|
|
1570
1569
|
container: null,
|
|
@@ -1597,17 +1596,17 @@ var ElementPortal = function ElementPortal(_ref) {
|
|
|
1597
1596
|
return container !== null ? /*#__PURE__*/ReactDOM__default["default"].createPortal(children, container) : null;
|
|
1598
1597
|
};
|
|
1599
1598
|
|
|
1600
|
-
ElementPortal.propTypes = propTypes$
|
|
1601
|
-
ElementPortal.defaultProps = defaultProps$
|
|
1599
|
+
ElementPortal.propTypes = propTypes$t;
|
|
1600
|
+
ElementPortal.defaultProps = defaultProps$t;
|
|
1602
1601
|
|
|
1603
1602
|
/* eslint-disable react/no-array-index-key, react/jsx-props-no-spreading */
|
|
1604
|
-
var propTypes$
|
|
1603
|
+
var propTypes$s = {
|
|
1605
1604
|
id: PropTypes__default["default"].string,
|
|
1606
1605
|
data: PropTypes__default["default"].object,
|
|
1607
1606
|
// eslint-disable-line react/forbid-prop-types
|
|
1608
1607
|
children: PropTypes__default["default"].node
|
|
1609
1608
|
};
|
|
1610
|
-
var defaultProps$
|
|
1609
|
+
var defaultProps$s = {
|
|
1611
1610
|
id: null,
|
|
1612
1611
|
data: null,
|
|
1613
1612
|
children: null
|
|
@@ -1634,18 +1633,18 @@ var ModalPortal = function ModalPortal(_ref) {
|
|
|
1634
1633
|
}, children);
|
|
1635
1634
|
};
|
|
1636
1635
|
|
|
1637
|
-
ModalPortal.propTypes = propTypes$
|
|
1638
|
-
ModalPortal.defaultProps = defaultProps$
|
|
1636
|
+
ModalPortal.propTypes = propTypes$s;
|
|
1637
|
+
ModalPortal.defaultProps = defaultProps$s;
|
|
1639
1638
|
|
|
1640
|
-
var styles$
|
|
1639
|
+
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"};
|
|
1641
1640
|
|
|
1642
|
-
var propTypes$
|
|
1641
|
+
var propTypes$r = {
|
|
1643
1642
|
id: PropTypes__default["default"].string,
|
|
1644
1643
|
title: PropTypes__default["default"].string,
|
|
1645
1644
|
position: PropTypes__default["default"].oneOf(['center', 'top']),
|
|
1646
1645
|
children: PropTypes__default["default"].node
|
|
1647
1646
|
};
|
|
1648
|
-
var defaultProps$
|
|
1647
|
+
var defaultProps$r = {
|
|
1649
1648
|
id: null,
|
|
1650
1649
|
title: null,
|
|
1651
1650
|
position: 'center',
|
|
@@ -1669,18 +1668,18 @@ var Modal = function Modal(_ref) {
|
|
|
1669
1668
|
id: finalId,
|
|
1670
1669
|
data: data
|
|
1671
1670
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1672
|
-
className: classNames__default["default"]([styles$
|
|
1671
|
+
className: classNames__default["default"]([styles$l.container, _defineProperty__default["default"]({}, styles$l[position], position !== null)])
|
|
1673
1672
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1674
|
-
className: styles$
|
|
1673
|
+
className: styles$l.inner
|
|
1675
1674
|
}, children)));
|
|
1676
1675
|
};
|
|
1677
1676
|
|
|
1678
|
-
Modal.propTypes = propTypes$
|
|
1679
|
-
Modal.defaultProps = defaultProps$
|
|
1677
|
+
Modal.propTypes = propTypes$r;
|
|
1678
|
+
Modal.defaultProps = defaultProps$r;
|
|
1680
1679
|
|
|
1681
|
-
var styles$
|
|
1680
|
+
var styles$k = {"container":"micromag-core-modals-dialog-container"};
|
|
1682
1681
|
|
|
1683
|
-
var propTypes$
|
|
1682
|
+
var propTypes$q = {
|
|
1684
1683
|
title: core.PropTypes.label,
|
|
1685
1684
|
header: PropTypes__default["default"].node,
|
|
1686
1685
|
children: PropTypes__default["default"].node,
|
|
@@ -1690,7 +1689,7 @@ var propTypes$p = {
|
|
|
1690
1689
|
onClickClose: PropTypes__default["default"].func,
|
|
1691
1690
|
className: PropTypes__default["default"].string
|
|
1692
1691
|
};
|
|
1693
|
-
var defaultProps$
|
|
1692
|
+
var defaultProps$q = {
|
|
1694
1693
|
title: null,
|
|
1695
1694
|
header: null,
|
|
1696
1695
|
children: null,
|
|
@@ -1710,12 +1709,12 @@ var ModalDialog = function ModalDialog(_ref) {
|
|
|
1710
1709
|
onClickClose = _ref.onClickClose,
|
|
1711
1710
|
className = _ref.className;
|
|
1712
1711
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1713
|
-
className: classNames__default["default"](['modal-dialog', styles$
|
|
1712
|
+
className: classNames__default["default"](['modal-dialog', styles$k.container, _defineProperty__default["default"]({}, className, className)]),
|
|
1714
1713
|
role: "dialog"
|
|
1715
1714
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1716
1715
|
className: "modal-content"
|
|
1717
1716
|
}, header || /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1718
|
-
className: classNames__default["default"](['modal-header', styles$
|
|
1717
|
+
className: classNames__default["default"](['modal-header', styles$k.header, {// 'bg-dark': theme === 'dark',
|
|
1719
1718
|
// 'border-dark': theme === 'dark',
|
|
1720
1719
|
// 'text-light': theme === 'dark',
|
|
1721
1720
|
}])
|
|
@@ -1727,28 +1726,28 @@ var ModalDialog = function ModalDialog(_ref) {
|
|
|
1727
1726
|
"aria-label": "Close",
|
|
1728
1727
|
onClick: onClickClose
|
|
1729
1728
|
})), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1730
|
-
className: classNames__default["default"](['modal-body', styles$
|
|
1729
|
+
className: classNames__default["default"](['modal-body', styles$k.body, {// [`bg-${theme}`]: theme !== null,
|
|
1731
1730
|
// 'text-light': theme === 'dark',
|
|
1732
1731
|
}])
|
|
1733
1732
|
}, children), footer !== null || buttons !== null ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1734
|
-
className: classNames__default["default"](['modal-footer', styles$
|
|
1733
|
+
className: classNames__default["default"](['modal-footer', styles$k.footer])
|
|
1735
1734
|
}, footer, buttons !== null ? /*#__PURE__*/React__default["default"].createElement(Buttons, {
|
|
1736
1735
|
buttons: buttons,
|
|
1737
|
-
className: styles$
|
|
1736
|
+
className: styles$k.buttons
|
|
1738
1737
|
}) : null) : null));
|
|
1739
1738
|
};
|
|
1740
1739
|
|
|
1741
|
-
ModalDialog.propTypes = propTypes$
|
|
1742
|
-
ModalDialog.defaultProps = defaultProps$
|
|
1740
|
+
ModalDialog.propTypes = propTypes$q;
|
|
1741
|
+
ModalDialog.defaultProps = defaultProps$q;
|
|
1743
1742
|
|
|
1744
|
-
var propTypes$
|
|
1743
|
+
var propTypes$p = {
|
|
1745
1744
|
type: PropTypes__default["default"].oneOfType([core.PropTypes.mediaTypes, PropTypes__default["default"].array]),
|
|
1746
1745
|
opened: PropTypes__default["default"].bool,
|
|
1747
1746
|
sources: PropTypes__default["default"].arrayOf(PropTypes__default["default"].string),
|
|
1748
1747
|
onUploaded: PropTypes__default["default"].func,
|
|
1749
1748
|
onRequestClose: PropTypes__default["default"].func
|
|
1750
1749
|
};
|
|
1751
|
-
var defaultProps$
|
|
1750
|
+
var defaultProps$p = {
|
|
1752
1751
|
type: null,
|
|
1753
1752
|
opened: false,
|
|
1754
1753
|
sources: ['webcam', 'facebook', 'instagram', 'dropbox', 'google-drive'],
|
|
@@ -1797,17 +1796,17 @@ var UploadModal = function UploadModal(_ref) {
|
|
|
1797
1796
|
}) : null;
|
|
1798
1797
|
};
|
|
1799
1798
|
|
|
1800
|
-
UploadModal.propTypes = propTypes$
|
|
1801
|
-
UploadModal.defaultProps = defaultProps$
|
|
1799
|
+
UploadModal.propTypes = propTypes$p;
|
|
1800
|
+
UploadModal.defaultProps = defaultProps$p;
|
|
1802
1801
|
|
|
1803
|
-
var styles$
|
|
1802
|
+
var styles$j = {"container":"micromag-core-panels-container"};
|
|
1804
1803
|
|
|
1805
|
-
var propTypes$
|
|
1804
|
+
var propTypes$o = {
|
|
1806
1805
|
panels: core.PropTypes.panels,
|
|
1807
1806
|
setPanelsContainer: PropTypes__default["default"].func,
|
|
1808
1807
|
className: PropTypes__default["default"].string
|
|
1809
1808
|
};
|
|
1810
|
-
var defaultProps$
|
|
1809
|
+
var defaultProps$o = {
|
|
1811
1810
|
panels: [],
|
|
1812
1811
|
setPanelsContainer: null,
|
|
1813
1812
|
className: null
|
|
@@ -1822,25 +1821,25 @@ var PanelsContainer = function PanelsContainer(_ref) {
|
|
|
1822
1821
|
setPanelsContainer(containerRef.current);
|
|
1823
1822
|
}, []);
|
|
1824
1823
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1825
|
-
className: classNames__default["default"]([styles$
|
|
1824
|
+
className: classNames__default["default"]([styles$j.container, _defineProperty__default["default"]({}, className, className)])
|
|
1826
1825
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1827
|
-
className: classNames__default["default"]([styles$
|
|
1826
|
+
className: classNames__default["default"]([styles$j.panels, _defineProperty__default["default"]({}, styles$j.hasPanels, panels.length > 0)]),
|
|
1828
1827
|
ref: containerRef
|
|
1829
1828
|
}));
|
|
1830
1829
|
};
|
|
1831
1830
|
|
|
1832
|
-
PanelsContainer.propTypes = propTypes$
|
|
1833
|
-
PanelsContainer.defaultProps = defaultProps$
|
|
1831
|
+
PanelsContainer.propTypes = propTypes$o;
|
|
1832
|
+
PanelsContainer.defaultProps = defaultProps$o;
|
|
1834
1833
|
var Panels = contexts.withPanels(PanelsContainer);
|
|
1835
1834
|
|
|
1836
1835
|
/* eslint-disable react/no-array-index-key, react/jsx-props-no-spreading */
|
|
1837
|
-
var propTypes$
|
|
1836
|
+
var propTypes$n = {
|
|
1838
1837
|
id: PropTypes__default["default"].string,
|
|
1839
1838
|
data: PropTypes__default["default"].object,
|
|
1840
1839
|
// eslint-disable-line react/forbid-prop-types
|
|
1841
1840
|
children: PropTypes__default["default"].node
|
|
1842
1841
|
};
|
|
1843
|
-
var defaultProps$
|
|
1842
|
+
var defaultProps$n = {
|
|
1844
1843
|
id: null,
|
|
1845
1844
|
data: null,
|
|
1846
1845
|
children: null
|
|
@@ -1873,18 +1872,18 @@ var PanelPortal = function PanelPortal(_ref) {
|
|
|
1873
1872
|
}, children);
|
|
1874
1873
|
};
|
|
1875
1874
|
|
|
1876
|
-
PanelPortal.propTypes = propTypes$
|
|
1877
|
-
PanelPortal.defaultProps = defaultProps$
|
|
1875
|
+
PanelPortal.propTypes = propTypes$n;
|
|
1876
|
+
PanelPortal.defaultProps = defaultProps$n;
|
|
1878
1877
|
|
|
1879
|
-
var styles$
|
|
1878
|
+
var styles$i = {"container":"micromag-core-panels-panel-container"};
|
|
1880
1879
|
|
|
1881
1880
|
/* eslint-disable react/no-array-index-key, react/jsx-props-no-spreading */
|
|
1882
|
-
var propTypes$
|
|
1881
|
+
var propTypes$m = {
|
|
1883
1882
|
id: PropTypes__default["default"].string,
|
|
1884
1883
|
title: PropTypes__default["default"].string,
|
|
1885
1884
|
children: PropTypes__default["default"].node
|
|
1886
1885
|
};
|
|
1887
|
-
var defaultProps$
|
|
1886
|
+
var defaultProps$m = {
|
|
1888
1887
|
id: null,
|
|
1889
1888
|
title: null,
|
|
1890
1889
|
children: null
|
|
@@ -1906,16 +1905,16 @@ var Panel = function Panel(_ref) {
|
|
|
1906
1905
|
id: finalId,
|
|
1907
1906
|
data: data
|
|
1908
1907
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1909
|
-
className: styles$
|
|
1908
|
+
className: styles$i.container
|
|
1910
1909
|
}, children));
|
|
1911
1910
|
};
|
|
1912
1911
|
|
|
1913
|
-
Panel.propTypes = propTypes$
|
|
1914
|
-
Panel.defaultProps = defaultProps$
|
|
1912
|
+
Panel.propTypes = propTypes$m;
|
|
1913
|
+
Panel.defaultProps = defaultProps$m;
|
|
1915
1914
|
|
|
1916
|
-
var styles$
|
|
1915
|
+
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"};
|
|
1917
1916
|
|
|
1918
|
-
var propTypes$
|
|
1917
|
+
var propTypes$l = {
|
|
1919
1918
|
title: PropTypes__default["default"].node,
|
|
1920
1919
|
children: PropTypes__default["default"].node,
|
|
1921
1920
|
className: PropTypes__default["default"].string,
|
|
@@ -1924,7 +1923,7 @@ var propTypes$k = {
|
|
|
1924
1923
|
openedClassName: PropTypes__default["default"].string,
|
|
1925
1924
|
buttonClassName: PropTypes__default["default"].string
|
|
1926
1925
|
};
|
|
1927
|
-
var defaultProps$
|
|
1926
|
+
var defaultProps$l = {
|
|
1928
1927
|
title: null,
|
|
1929
1928
|
children: null,
|
|
1930
1929
|
className: null,
|
|
@@ -1954,34 +1953,34 @@ var CollapsablePanel = function CollapsablePanel(_ref) {
|
|
|
1954
1953
|
return setOpened(!opened);
|
|
1955
1954
|
}, [opened, setOpened]);
|
|
1956
1955
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1957
|
-
className: classNames__default["default"]([styles$
|
|
1956
|
+
className: classNames__default["default"]([styles$h.container, (_ref2 = {}, _defineProperty__default["default"](_ref2, styles$h.isOpened, opened), _defineProperty__default["default"](_ref2, openedClassName, opened && openedClassName !== null), _defineProperty__default["default"](_ref2, className, className !== null), _ref2)])
|
|
1958
1957
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1959
|
-
className: classNames__default["default"]([styles$
|
|
1958
|
+
className: classNames__default["default"]([styles$h.top, _defineProperty__default["default"]({}, topClassName, topClassName !== null)])
|
|
1960
1959
|
}, /*#__PURE__*/React__default["default"].createElement(Button$1, {
|
|
1961
1960
|
withoutStyle: true,
|
|
1962
|
-
className: classNames__default["default"]([styles$
|
|
1961
|
+
className: classNames__default["default"]([styles$h.button, _defineProperty__default["default"]({}, buttonClassName, buttonClassName !== null)]),
|
|
1963
1962
|
icon: /*#__PURE__*/React__default["default"].createElement(reactFontawesome.FontAwesomeIcon, {
|
|
1964
1963
|
icon: opened ? freeSolidSvgIcons.faAngleUp : freeSolidSvgIcons.faAngleDown,
|
|
1965
|
-
className: styles$
|
|
1964
|
+
className: styles$h.icon
|
|
1966
1965
|
}),
|
|
1967
1966
|
iconPosition: "right",
|
|
1968
|
-
labelClassName: styles$
|
|
1967
|
+
labelClassName: styles$h.label,
|
|
1969
1968
|
onClick: onClick
|
|
1970
1969
|
}, title)), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1971
|
-
className: classNames__default["default"]([styles$
|
|
1970
|
+
className: classNames__default["default"]([styles$h.content, _defineProperty__default["default"]({}, contentClassName, contentClassName !== null)])
|
|
1972
1971
|
}, children));
|
|
1973
1972
|
};
|
|
1974
1973
|
|
|
1975
|
-
CollapsablePanel.propTypes = propTypes$
|
|
1976
|
-
CollapsablePanel.defaultProps = defaultProps$
|
|
1974
|
+
CollapsablePanel.propTypes = propTypes$l;
|
|
1975
|
+
CollapsablePanel.defaultProps = defaultProps$l;
|
|
1977
1976
|
|
|
1978
1977
|
/* eslint-disable react/jsx-props-no-spreading */
|
|
1979
|
-
var propTypes$
|
|
1978
|
+
var propTypes$k = {
|
|
1980
1979
|
date: PropTypes__default["default"].string,
|
|
1981
1980
|
withTime: PropTypes__default["default"].bool,
|
|
1982
1981
|
timeSeparator: PropTypes__default["default"].node
|
|
1983
1982
|
};
|
|
1984
|
-
var defaultProps$
|
|
1983
|
+
var defaultProps$k = {
|
|
1985
1984
|
date: null,
|
|
1986
1985
|
withTime: false,
|
|
1987
1986
|
timeSeparator: ', '
|
|
@@ -2004,11 +2003,11 @@ var Date$1 = function Date(_ref) {
|
|
|
2004
2003
|
}) : null);
|
|
2005
2004
|
};
|
|
2006
2005
|
|
|
2007
|
-
Date$1.propTypes = propTypes$
|
|
2008
|
-
Date$1.defaultProps = defaultProps$
|
|
2006
|
+
Date$1.propTypes = propTypes$k;
|
|
2007
|
+
Date$1.defaultProps = defaultProps$k;
|
|
2009
2008
|
|
|
2010
2009
|
/* eslint-disable react/no-danger */
|
|
2011
|
-
var propTypes$
|
|
2010
|
+
var propTypes$j = {
|
|
2012
2011
|
throttleDelay: PropTypes__default["default"].number,
|
|
2013
2012
|
threshold: PropTypes__default["default"].arrayOf(PropTypes__default["default"].number),
|
|
2014
2013
|
onEnter: PropTypes__default["default"].func,
|
|
@@ -2018,7 +2017,7 @@ var propTypes$i = {
|
|
|
2018
2017
|
children: PropTypes__default["default"].node,
|
|
2019
2018
|
className: PropTypes__default["default"].string
|
|
2020
2019
|
};
|
|
2021
|
-
var defaultProps$
|
|
2020
|
+
var defaultProps$j = {
|
|
2022
2021
|
throttleDelay: null,
|
|
2023
2022
|
threshold: undefined,
|
|
2024
2023
|
onEnter: null,
|
|
@@ -2092,12 +2091,12 @@ var Detector = function Detector(_ref) {
|
|
|
2092
2091
|
}, children);
|
|
2093
2092
|
};
|
|
2094
2093
|
|
|
2095
|
-
Detector.propTypes = propTypes$
|
|
2096
|
-
Detector.defaultProps = defaultProps$
|
|
2094
|
+
Detector.propTypes = propTypes$j;
|
|
2095
|
+
Detector.defaultProps = defaultProps$j;
|
|
2097
2096
|
|
|
2098
|
-
var styles$
|
|
2097
|
+
var styles$g = {"container":"micromag-core-partials-placeholder-block-container","box":"micromag-core-partials-placeholder-block-box","outline":"micromag-core-partials-placeholder-block-outline"};
|
|
2099
2098
|
|
|
2100
|
-
var propTypes$
|
|
2099
|
+
var propTypes$i = {
|
|
2101
2100
|
width: PropTypes__default["default"].oneOfType([PropTypes__default["default"].number, PropTypes__default["default"].string]),
|
|
2102
2101
|
height: PropTypes__default["default"].oneOfType([PropTypes__default["default"].number, PropTypes__default["default"].string]),
|
|
2103
2102
|
outline: PropTypes__default["default"].bool,
|
|
@@ -2105,7 +2104,7 @@ var propTypes$h = {
|
|
|
2105
2104
|
boxClassName: PropTypes__default["default"].string,
|
|
2106
2105
|
children: PropTypes__default["default"].node
|
|
2107
2106
|
};
|
|
2108
|
-
var defaultProps$
|
|
2107
|
+
var defaultProps$i = {
|
|
2109
2108
|
width: '100%',
|
|
2110
2109
|
height: '3em',
|
|
2111
2110
|
outline: false,
|
|
@@ -2124,9 +2123,9 @@ var PlaceholderBlock = function PlaceholderBlock(_ref) {
|
|
|
2124
2123
|
boxClassName = _ref.boxClassName,
|
|
2125
2124
|
children = _ref.children;
|
|
2126
2125
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2127
|
-
className: classNames__default["default"]([styles$
|
|
2126
|
+
className: classNames__default["default"]([styles$g.container, (_ref2 = {}, _defineProperty__default["default"](_ref2, className, className !== null), _defineProperty__default["default"](_ref2, styles$g.outline, outline), _ref2)])
|
|
2128
2127
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2129
|
-
className: classNames__default["default"]([styles$
|
|
2128
|
+
className: classNames__default["default"]([styles$g.box, _defineProperty__default["default"]({}, boxClassName, boxClassName !== null)]),
|
|
2130
2129
|
style: {
|
|
2131
2130
|
width: width,
|
|
2132
2131
|
height: height
|
|
@@ -2134,12 +2133,12 @@ var PlaceholderBlock = function PlaceholderBlock(_ref) {
|
|
|
2134
2133
|
}, children));
|
|
2135
2134
|
};
|
|
2136
2135
|
|
|
2137
|
-
PlaceholderBlock.propTypes = propTypes$
|
|
2138
|
-
PlaceholderBlock.defaultProps = defaultProps$
|
|
2136
|
+
PlaceholderBlock.propTypes = propTypes$i;
|
|
2137
|
+
PlaceholderBlock.defaultProps = defaultProps$i;
|
|
2139
2138
|
|
|
2140
2139
|
/* eslint-disable react/jsx-props-no-spreading */
|
|
2141
2140
|
|
|
2142
|
-
var propTypes$
|
|
2141
|
+
var propTypes$h = {
|
|
2143
2142
|
name: PropTypes__default["default"].string.isRequired,
|
|
2144
2143
|
components: PropTypes__default["default"].object.isRequired,
|
|
2145
2144
|
// eslint-disable-line
|
|
@@ -2150,7 +2149,7 @@ var propTypes$g = {
|
|
|
2150
2149
|
placeholderProps: PropTypes__default["default"].object // eslint-disable-line
|
|
2151
2150
|
|
|
2152
2151
|
};
|
|
2153
|
-
var defaultProps$
|
|
2152
|
+
var defaultProps$h = {
|
|
2154
2153
|
props: {},
|
|
2155
2154
|
isPlaceholder: false,
|
|
2156
2155
|
className: null,
|
|
@@ -2186,18 +2185,18 @@ var ElementComponent = function ElementComponent(_ref) {
|
|
|
2186
2185
|
}));
|
|
2187
2186
|
};
|
|
2188
2187
|
|
|
2189
|
-
ElementComponent.propTypes = propTypes$
|
|
2190
|
-
ElementComponent.defaultProps = defaultProps$
|
|
2188
|
+
ElementComponent.propTypes = propTypes$h;
|
|
2189
|
+
ElementComponent.defaultProps = defaultProps$h;
|
|
2191
2190
|
|
|
2192
|
-
var styles$
|
|
2191
|
+
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"};
|
|
2193
2192
|
|
|
2194
|
-
var propTypes$
|
|
2193
|
+
var propTypes$g = {
|
|
2195
2194
|
children: PropTypes__default["default"].node,
|
|
2196
2195
|
withoutBorder: PropTypes__default["default"].bool,
|
|
2197
2196
|
light: PropTypes__default["default"].bool,
|
|
2198
2197
|
className: PropTypes__default["default"].string
|
|
2199
2198
|
};
|
|
2200
|
-
var defaultProps$
|
|
2199
|
+
var defaultProps$g = {
|
|
2201
2200
|
children: null,
|
|
2202
2201
|
withoutBorder: false,
|
|
2203
2202
|
light: false,
|
|
@@ -2212,23 +2211,23 @@ var Empty = function Empty(_ref) {
|
|
|
2212
2211
|
light = _ref.light,
|
|
2213
2212
|
className = _ref.className;
|
|
2214
2213
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2215
|
-
className: classNames__default["default"]([styles$
|
|
2214
|
+
className: classNames__default["default"]([styles$f.container, (_ref2 = {}, _defineProperty__default["default"](_ref2, styles$f.withoutBorder, withoutBorder), _defineProperty__default["default"](_ref2, styles$f.light, light), _defineProperty__default["default"](_ref2, className, className), _ref2)])
|
|
2216
2215
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2217
|
-
className: styles$
|
|
2216
|
+
className: styles$f.middle
|
|
2218
2217
|
}, /*#__PURE__*/React__default["default"].createElement(Label, null, children)));
|
|
2219
2218
|
};
|
|
2220
2219
|
|
|
2221
|
-
Empty.propTypes = propTypes$
|
|
2222
|
-
Empty.defaultProps = defaultProps$
|
|
2220
|
+
Empty.propTypes = propTypes$g;
|
|
2221
|
+
Empty.defaultProps = defaultProps$g;
|
|
2223
2222
|
|
|
2224
|
-
var propTypes$
|
|
2223
|
+
var propTypes$f = {
|
|
2225
2224
|
fonts: core.PropTypes.fonts,
|
|
2226
2225
|
formats: PropTypes__default["default"].arrayOf(PropTypes__default["default"].oneOfType([PropTypes__default["default"].string, PropTypes__default["default"].shape({
|
|
2227
2226
|
name: PropTypes__default["default"].string,
|
|
2228
2227
|
format: PropTypes__default["default"].string
|
|
2229
2228
|
})]))
|
|
2230
2229
|
};
|
|
2231
|
-
var defaultProps$
|
|
2230
|
+
var defaultProps$f = {
|
|
2232
2231
|
fonts: [],
|
|
2233
2232
|
formats: ['eot', 'woff2', 'woff', {
|
|
2234
2233
|
name: 'otf',
|
|
@@ -2269,12 +2268,12 @@ var FontFaces = function FontFaces(_ref) {
|
|
|
2269
2268
|
}, fontFaces.join('\n')) : null;
|
|
2270
2269
|
};
|
|
2271
2270
|
|
|
2272
|
-
FontFaces.propTypes = propTypes$
|
|
2273
|
-
FontFaces.defaultProps = defaultProps$
|
|
2271
|
+
FontFaces.propTypes = propTypes$f;
|
|
2272
|
+
FontFaces.defaultProps = defaultProps$f;
|
|
2274
2273
|
|
|
2275
|
-
var styles$
|
|
2274
|
+
var styles$e = {};
|
|
2276
2275
|
|
|
2277
|
-
var propTypes$
|
|
2276
|
+
var propTypes$e = {
|
|
2278
2277
|
thumbnail: PropTypes__default["default"].node,
|
|
2279
2278
|
thumbnailAlign: PropTypes__default["default"].oneOf(['top', 'center', 'bottom']),
|
|
2280
2279
|
children: PropTypes__default["default"].node,
|
|
@@ -2284,7 +2283,7 @@ var propTypes$d = {
|
|
|
2284
2283
|
bodyClassName: PropTypes__default["default"].string,
|
|
2285
2284
|
titleClassName: PropTypes__default["default"].string
|
|
2286
2285
|
};
|
|
2287
|
-
var defaultProps$
|
|
2286
|
+
var defaultProps$e = {
|
|
2288
2287
|
thumbnail: null,
|
|
2289
2288
|
thumbnailAlign: 'top',
|
|
2290
2289
|
children: null,
|
|
@@ -2305,24 +2304,24 @@ var Media = function Media(_ref) {
|
|
|
2305
2304
|
bodyClassName = _ref.bodyClassName,
|
|
2306
2305
|
titleClassName = _ref.titleClassName;
|
|
2307
2306
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2308
|
-
className: classNames__default["default"](['card', styles$
|
|
2307
|
+
className: classNames__default["default"](['card', styles$e.container, _defineProperty__default["default"]({}, className, className !== null)])
|
|
2309
2308
|
}, typeof thumbnail === 'string' ? /*#__PURE__*/React__default["default"].createElement("img", {
|
|
2310
2309
|
src: thumbnail,
|
|
2311
2310
|
alt: title,
|
|
2312
|
-
className: classNames__default["default"](['me-3', styles$
|
|
2311
|
+
className: classNames__default["default"](['me-3', styles$e.thumbnail, _defineProperty__default["default"]({
|
|
2313
2312
|
'align-self-start': thumbnailAlign === 'top',
|
|
2314
2313
|
'align-self-center': thumbnailAlign === 'center',
|
|
2315
2314
|
'align-self-end': thumbnailAlign === 'bottom'
|
|
2316
2315
|
}, thumbnailClassName, thumbnailClassName !== null)])
|
|
2317
2316
|
}) : thumbnail, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2318
|
-
className: classNames__default["default"](['card-body', styles$
|
|
2317
|
+
className: classNames__default["default"](['card-body', styles$e.body, _defineProperty__default["default"]({}, bodyClassName, bodyClassName !== null)])
|
|
2319
2318
|
}, title !== null ? /*#__PURE__*/React__default["default"].createElement("h5", {
|
|
2320
|
-
className: classNames__default["default"](['mt-0', styles$
|
|
2319
|
+
className: classNames__default["default"](['mt-0', styles$e.title, _defineProperty__default["default"]({}, titleClassName, titleClassName !== null)])
|
|
2321
2320
|
}, /*#__PURE__*/React__default["default"].createElement(Label, null, title)) : null, children));
|
|
2322
2321
|
};
|
|
2323
2322
|
|
|
2324
|
-
Media.propTypes = propTypes$
|
|
2325
|
-
Media.defaultProps = defaultProps$
|
|
2323
|
+
Media.propTypes = propTypes$e;
|
|
2324
|
+
Media.defaultProps = defaultProps$e;
|
|
2326
2325
|
|
|
2327
2326
|
/**
|
|
2328
2327
|
* Core
|
|
@@ -2856,7 +2855,7 @@ var pageMetadata = PropTypes__default["default"].shape({
|
|
|
2856
2855
|
});
|
|
2857
2856
|
|
|
2858
2857
|
/* eslint-disable react/no-array-index-key */
|
|
2859
|
-
var propTypes$
|
|
2858
|
+
var propTypes$d = {
|
|
2860
2859
|
title: PropTypes__default["default"].string,
|
|
2861
2860
|
url: PropTypes__default["default"].string,
|
|
2862
2861
|
metadata: pageMetadata,
|
|
@@ -2864,7 +2863,7 @@ var propTypes$c = {
|
|
|
2864
2863
|
suffix: PropTypes__default["default"].string,
|
|
2865
2864
|
children: PropTypes__default["default"].node
|
|
2866
2865
|
};
|
|
2867
|
-
var defaultProps$
|
|
2866
|
+
var defaultProps$d = {
|
|
2868
2867
|
title: null,
|
|
2869
2868
|
url: null,
|
|
2870
2869
|
metadata: null,
|
|
@@ -2988,12 +2987,12 @@ var Meta = function Meta(_ref) {
|
|
|
2988
2987
|
}), children);
|
|
2989
2988
|
};
|
|
2990
2989
|
|
|
2991
|
-
Meta.propTypes = propTypes$
|
|
2992
|
-
Meta.defaultProps = defaultProps$
|
|
2990
|
+
Meta.propTypes = propTypes$d;
|
|
2991
|
+
Meta.defaultProps = defaultProps$d;
|
|
2993
2992
|
|
|
2994
|
-
var styles$
|
|
2993
|
+
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"};
|
|
2995
2994
|
|
|
2996
|
-
var propTypes$
|
|
2995
|
+
var propTypes$c = {
|
|
2997
2996
|
items: PropTypes__default["default"].arrayOf(PropTypes__default["default"].node),
|
|
2998
2997
|
auto: PropTypes__default["default"].bool,
|
|
2999
2998
|
delay: PropTypes__default["default"].number,
|
|
@@ -3002,7 +3001,7 @@ var propTypes$b = {
|
|
|
3002
3001
|
className: PropTypes__default["default"].string,
|
|
3003
3002
|
children: PropTypes__default["default"].node
|
|
3004
3003
|
};
|
|
3005
|
-
var defaultProps$
|
|
3004
|
+
var defaultProps$c = {
|
|
3006
3005
|
items: [],
|
|
3007
3006
|
auto: true,
|
|
3008
3007
|
delay: 5000,
|
|
@@ -3050,24 +3049,24 @@ var Slideshow = function Slideshow(_ref) {
|
|
|
3050
3049
|
height: height
|
|
3051
3050
|
};
|
|
3052
3051
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3053
|
-
className: classNames__default["default"]([styles$
|
|
3052
|
+
className: classNames__default["default"]([styles$d.container, _defineProperty__default["default"]({}, className, className)]),
|
|
3054
3053
|
style: style
|
|
3055
3054
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3056
|
-
className: styles$
|
|
3055
|
+
className: styles$d.items
|
|
3057
3056
|
}, items.map(function (it, i) {
|
|
3058
3057
|
var _ref3;
|
|
3059
3058
|
|
|
3060
3059
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3061
3060
|
key: "slide-".concat(i + 1),
|
|
3062
|
-
className: classNames__default["default"]([styles$
|
|
3061
|
+
className: classNames__default["default"]([styles$d.item, (_ref3 = {}, _defineProperty__default["default"](_ref3, styles$d.prev, i < index), _defineProperty__default["default"](_ref3, styles$d.current, i === index), _defineProperty__default["default"](_ref3, styles$d.next, i > index), _ref3)])
|
|
3063
3062
|
}, it);
|
|
3064
3063
|
})), children);
|
|
3065
3064
|
};
|
|
3066
3065
|
|
|
3067
|
-
Slideshow.propTypes = propTypes$
|
|
3068
|
-
Slideshow.defaultProps = defaultProps$
|
|
3066
|
+
Slideshow.propTypes = propTypes$c;
|
|
3067
|
+
Slideshow.defaultProps = defaultProps$c;
|
|
3069
3068
|
|
|
3070
|
-
var styles$
|
|
3069
|
+
var styles$c = {"icon":"micromag-core-placeholders-icon"};
|
|
3071
3070
|
|
|
3072
3071
|
/* eslint-disable react/prop-types */
|
|
3073
3072
|
var AdFrame = function AdFrame(_ref) {
|
|
@@ -3080,7 +3079,7 @@ var AdFrame = function AdFrame(_ref) {
|
|
|
3080
3079
|
className: className
|
|
3081
3080
|
}, /*#__PURE__*/React__default["default"].createElement(reactFontawesome.FontAwesomeIcon, {
|
|
3082
3081
|
icon: freeSolidSvgIcons.faAd,
|
|
3083
|
-
className: styles$
|
|
3082
|
+
className: styles$c.icon
|
|
3084
3083
|
}));
|
|
3085
3084
|
};
|
|
3086
3085
|
|
|
@@ -3095,7 +3094,7 @@ var AdImage = function AdImage(_ref) {
|
|
|
3095
3094
|
className: className
|
|
3096
3095
|
}, /*#__PURE__*/React__default["default"].createElement(reactFontawesome.FontAwesomeIcon, {
|
|
3097
3096
|
icon: freeSolidSvgIcons.faImage,
|
|
3098
|
-
className: styles$
|
|
3097
|
+
className: styles$c.icon
|
|
3099
3098
|
}));
|
|
3100
3099
|
};
|
|
3101
3100
|
|
|
@@ -3112,13 +3111,13 @@ var Audio = function Audio(_ref) {
|
|
|
3112
3111
|
className: className
|
|
3113
3112
|
}, /*#__PURE__*/React__default["default"].createElement(reactFontawesome.FontAwesomeIcon, {
|
|
3114
3113
|
icon: freeSolidSvgIcons.faMusic,
|
|
3115
|
-
className: styles$
|
|
3114
|
+
className: styles$c.icon
|
|
3116
3115
|
}));
|
|
3117
3116
|
};
|
|
3118
3117
|
|
|
3119
|
-
var styles$
|
|
3118
|
+
var styles$b = {"container":"micromag-core-partials-placeholder-text-container","line":"micromag-core-partials-placeholder-text-line"};
|
|
3120
3119
|
|
|
3121
|
-
var propTypes$
|
|
3120
|
+
var propTypes$b = {
|
|
3122
3121
|
lines: PropTypes__default["default"].number,
|
|
3123
3122
|
lineMargin: PropTypes__default["default"].oneOfType([PropTypes__default["default"].number, PropTypes__default["default"].string]),
|
|
3124
3123
|
width: PropTypes__default["default"].oneOfType([PropTypes__default["default"].number, PropTypes__default["default"].string]),
|
|
@@ -3126,7 +3125,7 @@ var propTypes$a = {
|
|
|
3126
3125
|
fontSize: PropTypes__default["default"].number,
|
|
3127
3126
|
className: PropTypes__default["default"].string
|
|
3128
3127
|
};
|
|
3129
|
-
var defaultProps$
|
|
3128
|
+
var defaultProps$b = {
|
|
3130
3129
|
lines: 1,
|
|
3131
3130
|
lineMargin: 1,
|
|
3132
3131
|
width: '100%',
|
|
@@ -3145,11 +3144,11 @@ var PlaceholderText = function PlaceholderText(_ref) {
|
|
|
3145
3144
|
var lineHeight = height !== null && isNumber__default["default"](height) ? "".concat(Math.round(height * fontSize), "px") : height;
|
|
3146
3145
|
var oddWidth = isNumber__default["default"](width) ? width * 0.9 : '90%';
|
|
3147
3146
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3148
|
-
className: classNames__default["default"]([styles$
|
|
3147
|
+
className: classNames__default["default"]([styles$b.container, _defineProperty__default["default"]({}, className, className)])
|
|
3149
3148
|
}, _toConsumableArray__default["default"](Array(lines)).map(function (e, index) {
|
|
3150
3149
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3151
3150
|
key: "line-".concat(index),
|
|
3152
|
-
className: styles$
|
|
3151
|
+
className: styles$b.line,
|
|
3153
3152
|
style: {
|
|
3154
3153
|
width: index % 2 === 0 ? width : oddWidth,
|
|
3155
3154
|
height: lineHeight,
|
|
@@ -3160,8 +3159,8 @@ var PlaceholderText = function PlaceholderText(_ref) {
|
|
|
3160
3159
|
}));
|
|
3161
3160
|
};
|
|
3162
3161
|
|
|
3163
|
-
PlaceholderText.propTypes = propTypes$
|
|
3164
|
-
PlaceholderText.defaultProps = defaultProps$
|
|
3162
|
+
PlaceholderText.propTypes = propTypes$b;
|
|
3163
|
+
PlaceholderText.defaultProps = defaultProps$b;
|
|
3165
3164
|
|
|
3166
3165
|
/* eslint-disable react/destructuring-assignment, react/prop-types */
|
|
3167
3166
|
var Button = function Button(_ref) {
|
|
@@ -3192,38 +3191,38 @@ var Image = function Image(_ref) {
|
|
|
3192
3191
|
className: className
|
|
3193
3192
|
}, /*#__PURE__*/React__default["default"].createElement(reactFontawesome.FontAwesomeIcon, {
|
|
3194
3193
|
icon: freeSolidSvgIcons.faImage,
|
|
3195
|
-
className: styles$
|
|
3194
|
+
className: styles$c.icon
|
|
3196
3195
|
}));
|
|
3197
3196
|
};
|
|
3198
3197
|
|
|
3199
3198
|
/* eslint-disable react/jsx-props-no-spreading, react/destructuring-assignment, react/prop-types */
|
|
3200
3199
|
var Line = function Line(props) {
|
|
3201
3200
|
return /*#__PURE__*/React__default["default"].createElement(PlaceholderText, Object.assign({}, props, {
|
|
3202
|
-
className: classNames__default["default"]([props.className, styles$
|
|
3201
|
+
className: classNames__default["default"]([props.className, styles$c.shortText]),
|
|
3203
3202
|
height: 0.2,
|
|
3204
3203
|
lines: 1
|
|
3205
3204
|
}));
|
|
3206
3205
|
};
|
|
3207
3206
|
|
|
3208
|
-
var styles$
|
|
3207
|
+
var styles$a = {"container":"micromag-core-placeholders-map-container","icon":"micromag-core-placeholders-map-icon"};
|
|
3209
3208
|
|
|
3210
3209
|
var Map = function Map(props) {
|
|
3211
3210
|
return /*#__PURE__*/React__default["default"].createElement(PlaceholderBlock, Object.assign({}, props, {
|
|
3212
3211
|
width: "100%",
|
|
3213
3212
|
height: "100%",
|
|
3214
|
-
className: classNames__default["default"]([styles$
|
|
3213
|
+
className: classNames__default["default"]([styles$a.container, _defineProperty__default["default"]({}, props.className, props.className !== null)])
|
|
3215
3214
|
}), /*#__PURE__*/React__default["default"].createElement(reactFontawesome.FontAwesomeIcon, {
|
|
3216
3215
|
icon: props.withImages ? freeSolidSvgIcons.faImage : freeSolidSvgIcons.faMapMarkerAlt,
|
|
3217
|
-
className: styles$
|
|
3216
|
+
className: styles$a.icon
|
|
3218
3217
|
}), /*#__PURE__*/React__default["default"].createElement(reactFontawesome.FontAwesomeIcon, {
|
|
3219
3218
|
icon: props.withImages ? freeSolidSvgIcons.faImage : freeSolidSvgIcons.faMapMarkerAlt,
|
|
3220
|
-
className: styles$
|
|
3219
|
+
className: styles$a.icon
|
|
3221
3220
|
}), /*#__PURE__*/React__default["default"].createElement(reactFontawesome.FontAwesomeIcon, {
|
|
3222
3221
|
icon: props.withImages ? freeSolidSvgIcons.faImage : freeSolidSvgIcons.faMapMarkerAlt,
|
|
3223
|
-
className: styles$
|
|
3222
|
+
className: styles$a.icon
|
|
3224
3223
|
}), /*#__PURE__*/React__default["default"].createElement(reactFontawesome.FontAwesomeIcon, {
|
|
3225
3224
|
icon: props.withImages ? freeSolidSvgIcons.faImage : freeSolidSvgIcons.faMapMarkerAlt,
|
|
3226
|
-
className: styles$
|
|
3225
|
+
className: styles$a.icon
|
|
3227
3226
|
}));
|
|
3228
3227
|
};
|
|
3229
3228
|
|
|
@@ -3232,18 +3231,18 @@ var MapPath = function MapPath(props) {
|
|
|
3232
3231
|
return /*#__PURE__*/React__default["default"].createElement(PlaceholderBlock, Object.assign({}, props, {
|
|
3233
3232
|
width: "100%",
|
|
3234
3233
|
height: "70%",
|
|
3235
|
-
className: classNames__default["default"]([props.className, styles$
|
|
3234
|
+
className: classNames__default["default"]([props.className, styles$c.mapPath])
|
|
3236
3235
|
}), /*#__PURE__*/React__default["default"].createElement(reactFontawesome.FontAwesomeIcon, {
|
|
3237
3236
|
icon: freeSolidSvgIcons.faMapMarkedAlt,
|
|
3238
3237
|
size: "lg",
|
|
3239
|
-
className: styles$
|
|
3238
|
+
className: styles$c.icon
|
|
3240
3239
|
}));
|
|
3241
3240
|
};
|
|
3242
3241
|
|
|
3243
3242
|
/* eslint-disable react/jsx-props-no-spreading, react/destructuring-assignment, react/prop-types */
|
|
3244
3243
|
var Quote = function Quote(props) {
|
|
3245
3244
|
return /*#__PURE__*/React__default["default"].createElement(PlaceholderText, Object.assign({}, props, {
|
|
3246
|
-
className: classNames__default["default"]([props.className, styles$
|
|
3245
|
+
className: classNames__default["default"]([props.className, styles$c.subtitle]),
|
|
3247
3246
|
height: 0.5,
|
|
3248
3247
|
lines: 6
|
|
3249
3248
|
}));
|
|
@@ -3252,7 +3251,7 @@ var Quote = function Quote(props) {
|
|
|
3252
3251
|
/* eslint-disable react/jsx-props-no-spreading, react/destructuring-assignment, react/prop-types */
|
|
3253
3252
|
var ShortText = function ShortText(props) {
|
|
3254
3253
|
return /*#__PURE__*/React__default["default"].createElement(PlaceholderText, Object.assign({}, props, {
|
|
3255
|
-
className: classNames__default["default"]([props.className, styles$
|
|
3254
|
+
className: classNames__default["default"]([props.className, styles$c.shortText]),
|
|
3256
3255
|
height: 0.2,
|
|
3257
3256
|
lines: 2
|
|
3258
3257
|
}));
|
|
@@ -3261,7 +3260,7 @@ var ShortText = function ShortText(props) {
|
|
|
3261
3260
|
/* eslint-disable react/jsx-props-no-spreading, react/destructuring-assignment, react/prop-types */
|
|
3262
3261
|
var Subtitle = function Subtitle(props) {
|
|
3263
3262
|
return /*#__PURE__*/React__default["default"].createElement(PlaceholderText, Object.assign({}, props, {
|
|
3264
|
-
className: classNames__default["default"]([props.className, styles$
|
|
3263
|
+
className: classNames__default["default"]([props.className, styles$c.subtitle]),
|
|
3265
3264
|
height: 0.3,
|
|
3266
3265
|
lines: 1
|
|
3267
3266
|
}));
|
|
@@ -3280,21 +3279,21 @@ var TextPlaceholder = function TextPlaceholder(props) {
|
|
|
3280
3279
|
height: height,
|
|
3281
3280
|
lines: lines,
|
|
3282
3281
|
lineMargin: lineMargin,
|
|
3283
|
-
className: classNames__default["default"]([props.className, styles$
|
|
3282
|
+
className: classNames__default["default"]([props.className, styles$c.text])
|
|
3284
3283
|
}));
|
|
3285
3284
|
};
|
|
3286
3285
|
|
|
3287
3286
|
/* eslint-disable react/jsx-props-no-spreading, react/destructuring-assignment, react/prop-types */
|
|
3288
3287
|
var Timeline = function Timeline(props) {
|
|
3289
3288
|
return /*#__PURE__*/React__default["default"].createElement(PlaceholderText, Object.assign({}, props, {
|
|
3290
|
-
className: classNames__default["default"]([props.className, styles$
|
|
3289
|
+
className: classNames__default["default"]([props.className, styles$c.timeline])
|
|
3291
3290
|
}));
|
|
3292
3291
|
};
|
|
3293
3292
|
|
|
3294
3293
|
/* eslint-disable react/jsx-props-no-spreading, react/destructuring-assignment, react/prop-types */
|
|
3295
3294
|
var Title = function Title(props) {
|
|
3296
3295
|
return /*#__PURE__*/React__default["default"].createElement(PlaceholderText, Object.assign({}, props, {
|
|
3297
|
-
className: classNames__default["default"]([props.className, styles$
|
|
3296
|
+
className: classNames__default["default"]([props.className, styles$c.title]),
|
|
3298
3297
|
height: 0.5,
|
|
3299
3298
|
lines: 2,
|
|
3300
3299
|
lineMargin: 4
|
|
@@ -3312,11 +3311,11 @@ var Video = function Video(_ref) {
|
|
|
3312
3311
|
className: className
|
|
3313
3312
|
}, /*#__PURE__*/React__default["default"].createElement(reactFontawesome.FontAwesomeIcon, {
|
|
3314
3313
|
icon: freeSolidSvgIcons.faVideo,
|
|
3315
|
-
className: styles$
|
|
3314
|
+
className: styles$c.icon
|
|
3316
3315
|
}));
|
|
3317
3316
|
};
|
|
3318
3317
|
|
|
3319
|
-
var styles$
|
|
3318
|
+
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"};
|
|
3320
3319
|
|
|
3321
3320
|
var Video360 = function Video360(_ref) {
|
|
3322
3321
|
var width = _ref.width,
|
|
@@ -3325,13 +3324,13 @@ var Video360 = function Video360(_ref) {
|
|
|
3325
3324
|
return /*#__PURE__*/React__default["default"].createElement(PlaceholderBlock, {
|
|
3326
3325
|
width: width,
|
|
3327
3326
|
height: height,
|
|
3328
|
-
className: classNames__default["default"]([styles$
|
|
3329
|
-
boxClassName: styles$
|
|
3327
|
+
className: classNames__default["default"]([styles$9.container, _defineProperty__default["default"]({}, className, className !== null)]),
|
|
3328
|
+
boxClassName: styles$9.box
|
|
3330
3329
|
}, /*#__PURE__*/React__default["default"].createElement(reactFontawesome.FontAwesomeIcon, {
|
|
3331
3330
|
icon: freeSolidSvgIcons.faVideo,
|
|
3332
|
-
className: styles$
|
|
3331
|
+
className: styles$9.icon
|
|
3333
3332
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3334
|
-
className: styles$
|
|
3333
|
+
className: styles$9.label
|
|
3335
3334
|
}, "360"));
|
|
3336
3335
|
};
|
|
3337
3336
|
|
|
@@ -3346,13 +3345,133 @@ var VideoLoop = function VideoLoop(_ref) {
|
|
|
3346
3345
|
className: className
|
|
3347
3346
|
}, /*#__PURE__*/React__default["default"].createElement(reactFontawesome.FontAwesomeIcon, {
|
|
3348
3347
|
icon: freeSolidSvgIcons.faPlay,
|
|
3349
|
-
className: styles$
|
|
3348
|
+
className: styles$c.icon
|
|
3350
3349
|
}), /*#__PURE__*/React__default["default"].createElement(reactFontawesome.FontAwesomeIcon, {
|
|
3351
3350
|
icon: freeSolidSvgIcons.faRedo,
|
|
3352
|
-
className: styles$
|
|
3351
|
+
className: styles$c.icon
|
|
3353
3352
|
}));
|
|
3354
3353
|
};
|
|
3355
3354
|
|
|
3355
|
+
var styles$8 = {"container":"micromag-core-screens-screen-sizer-container","frame":"micromag-core-screens-screen-sizer-frame","screen":"micromag-core-screens-screen-sizer-screen"};
|
|
3356
|
+
|
|
3357
|
+
var propTypes$a = {
|
|
3358
|
+
width: PropTypes__default["default"].number,
|
|
3359
|
+
height: PropTypes__default["default"].number,
|
|
3360
|
+
fit: PropTypes__default["default"].oneOf([null, 'cover', 'contain']),
|
|
3361
|
+
screenWidth: PropTypes__default["default"].number,
|
|
3362
|
+
screenHeight: PropTypes__default["default"].number,
|
|
3363
|
+
className: PropTypes__default["default"].string,
|
|
3364
|
+
children: PropTypes__default["default"].node.isRequired
|
|
3365
|
+
};
|
|
3366
|
+
var defaultProps$a = {
|
|
3367
|
+
width: null,
|
|
3368
|
+
height: null,
|
|
3369
|
+
fit: null,
|
|
3370
|
+
screenWidth: 320,
|
|
3371
|
+
screenHeight: 480,
|
|
3372
|
+
className: null
|
|
3373
|
+
};
|
|
3374
|
+
|
|
3375
|
+
var ScreenSizer = function ScreenSizer(_ref) {
|
|
3376
|
+
var width = _ref.width,
|
|
3377
|
+
height = _ref.height,
|
|
3378
|
+
fit = _ref.fit,
|
|
3379
|
+
screenWidth = _ref.screenWidth,
|
|
3380
|
+
screenHeight = _ref.screenHeight,
|
|
3381
|
+
className = _ref.className,
|
|
3382
|
+
children = _ref.children;
|
|
3383
|
+
var hasSize = width !== null || height !== null;
|
|
3384
|
+
|
|
3385
|
+
var _useResizeObserver = hooks.useResizeObserver(),
|
|
3386
|
+
refContainer = _useResizeObserver.ref,
|
|
3387
|
+
contentRect = _useResizeObserver.entry.contentRect;
|
|
3388
|
+
|
|
3389
|
+
var _ref2 = contentRect || {},
|
|
3390
|
+
_ref2$width = _ref2.width,
|
|
3391
|
+
calculatedWidth = _ref2$width === void 0 ? 0 : _ref2$width,
|
|
3392
|
+
_ref2$height = _ref2.height,
|
|
3393
|
+
calculatedHeight = _ref2$height === void 0 ? 0 : _ref2$height;
|
|
3394
|
+
|
|
3395
|
+
var _useMemo = React.useMemo(function () {
|
|
3396
|
+
var containerWidth = width || calculatedWidth || null;
|
|
3397
|
+
var containerHeight = height || calculatedHeight || null;
|
|
3398
|
+
|
|
3399
|
+
if (containerWidth === null && containerHeight === null) {
|
|
3400
|
+
return {};
|
|
3401
|
+
}
|
|
3402
|
+
|
|
3403
|
+
var screenRatio = screenWidth / screenHeight;
|
|
3404
|
+
var finalContainerWidth = hasSize ? width || containerHeight * screenRatio : containerWidth;
|
|
3405
|
+
var finalContainerHeight = hasSize ? height || containerWidth / screenRatio : containerWidth / screenRatio;
|
|
3406
|
+
|
|
3407
|
+
if (fit === null) {
|
|
3408
|
+
var _screenScale = finalContainerWidth / screenWidth;
|
|
3409
|
+
|
|
3410
|
+
return {
|
|
3411
|
+
width: finalContainerWidth,
|
|
3412
|
+
height: finalContainerHeight,
|
|
3413
|
+
transform: "scale(".concat(_screenScale, ")")
|
|
3414
|
+
};
|
|
3415
|
+
}
|
|
3416
|
+
|
|
3417
|
+
var _getSizeWithinBounds = size.getSizeWithinBounds(screenWidth, screenHeight, finalContainerWidth, finalContainerHeight, {
|
|
3418
|
+
cover: fit === 'cover'
|
|
3419
|
+
}),
|
|
3420
|
+
screenScaledWidth = _getSizeWithinBounds.width,
|
|
3421
|
+
screenScaledHeight = _getSizeWithinBounds.height,
|
|
3422
|
+
screenScale = _getSizeWithinBounds.scale;
|
|
3423
|
+
|
|
3424
|
+
var x = (finalContainerWidth - screenScaledWidth) / 2;
|
|
3425
|
+
var y = (finalContainerHeight - screenScaledHeight) / 2;
|
|
3426
|
+
return {
|
|
3427
|
+
width: finalContainerWidth,
|
|
3428
|
+
height: finalContainerHeight,
|
|
3429
|
+
transform: "scale(".concat(screenScale, ") translate(").concat(x, "px, ").concat(y, "px)")
|
|
3430
|
+
};
|
|
3431
|
+
}, [screenWidth, screenHeight, width, height, fit, calculatedWidth, calculatedHeight, hasSize]),
|
|
3432
|
+
_useMemo$width = _useMemo.width,
|
|
3433
|
+
frameWidth = _useMemo$width === void 0 ? null : _useMemo$width,
|
|
3434
|
+
_useMemo$height = _useMemo.height,
|
|
3435
|
+
frameHeight = _useMemo$height === void 0 ? null : _useMemo$height,
|
|
3436
|
+
_useMemo$transform = _useMemo.transform,
|
|
3437
|
+
screenTransform = _useMemo$transform === void 0 ? null : _useMemo$transform;
|
|
3438
|
+
|
|
3439
|
+
var screenSize = React.useMemo(function () {
|
|
3440
|
+
return {
|
|
3441
|
+
screen: 'mobile',
|
|
3442
|
+
screens: ['mobile'],
|
|
3443
|
+
width: screenWidth,
|
|
3444
|
+
height: screenHeight
|
|
3445
|
+
};
|
|
3446
|
+
}, [screenWidth, screenHeight]);
|
|
3447
|
+
var hasFrameSize = frameWidth !== null && frameHeight !== null;
|
|
3448
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3449
|
+
styles: classNames__default["default"]([styles$8.container, _defineProperty__default["default"]({}, className, className !== null)]),
|
|
3450
|
+
ref: !hasSize ? refContainer : null
|
|
3451
|
+
}, hasFrameSize ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3452
|
+
className: styles$8.frame,
|
|
3453
|
+
style: {
|
|
3454
|
+
width: frameWidth,
|
|
3455
|
+
height: frameHeight
|
|
3456
|
+
}
|
|
3457
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3458
|
+
className: styles$8.screen,
|
|
3459
|
+
style: {
|
|
3460
|
+
width: screenWidth,
|
|
3461
|
+
height: screenHeight,
|
|
3462
|
+
transform: screenTransform
|
|
3463
|
+
}
|
|
3464
|
+
}, /*#__PURE__*/React__default["default"].createElement(contexts.ScreenSizeProvider, {
|
|
3465
|
+
size: screenSize
|
|
3466
|
+
}, /*#__PURE__*/React__default["default"].cloneElement(children, {
|
|
3467
|
+
width: screenWidth,
|
|
3468
|
+
height: screenHeight
|
|
3469
|
+
})))) : null);
|
|
3470
|
+
};
|
|
3471
|
+
|
|
3472
|
+
ScreenSizer.propTypes = propTypes$a;
|
|
3473
|
+
ScreenSizer.defaultProps = defaultProps$a;
|
|
3474
|
+
|
|
3356
3475
|
var styles$7 = {"container":"micromag-core-screens-screen-container"};
|
|
3357
3476
|
|
|
3358
3477
|
var propTypes$9 = {
|
|
@@ -3426,70 +3545,76 @@ Screen.propTypes = propTypes$9;
|
|
|
3426
3545
|
Screen.defaultProps = defaultProps$9;
|
|
3427
3546
|
var Screen$1 = /*#__PURE__*/React__default["default"].memo(Screen);
|
|
3428
3547
|
|
|
3429
|
-
var styles$6 = {"
|
|
3548
|
+
var styles$6 = {"screen":"micromag-core-screens-screen-placeholder-screen"};
|
|
3430
3549
|
|
|
3550
|
+
var _excluded$1 = ["screen", "layout", "screenWidth", "screenHeight", "screenState", "withSize", "className"];
|
|
3431
3551
|
var propTypes$8 = {
|
|
3432
3552
|
screen: core.PropTypes.component.isRequired,
|
|
3433
3553
|
layout: PropTypes__default["default"].string,
|
|
3554
|
+
screenWidth: PropTypes__default["default"].number,
|
|
3555
|
+
screenHeight: PropTypes__default["default"].number,
|
|
3434
3556
|
screenState: PropTypes__default["default"].string,
|
|
3435
|
-
|
|
3436
|
-
height: PropTypes__default["default"].number,
|
|
3557
|
+
withSize: PropTypes__default["default"].bool,
|
|
3437
3558
|
className: PropTypes__default["default"].string
|
|
3438
3559
|
};
|
|
3439
3560
|
var defaultProps$8 = {
|
|
3440
3561
|
layout: undefined,
|
|
3441
3562
|
screenState: null,
|
|
3442
|
-
|
|
3443
|
-
|
|
3563
|
+
screenWidth: 100,
|
|
3564
|
+
screenHeight: 150,
|
|
3565
|
+
withSize: false,
|
|
3444
3566
|
className: null
|
|
3445
3567
|
};
|
|
3446
3568
|
|
|
3447
3569
|
var ScreenPlaceholder = function ScreenPlaceholder(_ref) {
|
|
3448
3570
|
var screen = _ref.screen,
|
|
3449
3571
|
layout = _ref.layout,
|
|
3450
|
-
|
|
3451
|
-
|
|
3572
|
+
screenWidth = _ref.screenWidth,
|
|
3573
|
+
screenHeight = _ref.screenHeight,
|
|
3452
3574
|
screenState = _ref.screenState,
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
width: width,
|
|
3459
|
-
height: height
|
|
3460
|
-
};
|
|
3461
|
-
}, [width, height]);
|
|
3462
|
-
return /*#__PURE__*/React__default["default"].createElement(contexts.ScreenSizeProvider, {
|
|
3463
|
-
size: screenSize
|
|
3464
|
-
}, /*#__PURE__*/React__default["default"].createElement(contexts.ScreenProvider, {
|
|
3465
|
-
data: screen,
|
|
3466
|
-
renderContext: "placeholder",
|
|
3467
|
-
screenState: screenState
|
|
3468
|
-
}, /*#__PURE__*/React__default["default"].createElement(Screen$1, {
|
|
3575
|
+
withSize = _ref.withSize,
|
|
3576
|
+
className = _ref.className,
|
|
3577
|
+
props = _objectWithoutProperties__default["default"](_ref, _excluded$1);
|
|
3578
|
+
|
|
3579
|
+
var screenElement = /*#__PURE__*/React__default["default"].createElement(Screen$1, Object.assign({
|
|
3469
3580
|
screen: screen,
|
|
3581
|
+
renderContext: "placeholder",
|
|
3582
|
+
screenState: screenState,
|
|
3470
3583
|
layout: layout,
|
|
3471
|
-
className: classNames__default["default"]([styles$6.
|
|
3472
|
-
}))
|
|
3584
|
+
className: classNames__default["default"]([styles$6.screen, _defineProperty__default["default"]({}, className, !withSize)])
|
|
3585
|
+
}, props));
|
|
3586
|
+
return withSize ? /*#__PURE__*/React__default["default"].createElement(ScreenSizer, {
|
|
3587
|
+
className: className,
|
|
3588
|
+
screenWidth: screenWidth,
|
|
3589
|
+
screenHeight: screenHeight
|
|
3590
|
+
}, screenElement) : screenElement;
|
|
3473
3591
|
};
|
|
3474
3592
|
|
|
3475
3593
|
ScreenPlaceholder.propTypes = propTypes$8;
|
|
3476
3594
|
ScreenPlaceholder.defaultProps = defaultProps$8;
|
|
3477
3595
|
var Placeholder = /*#__PURE__*/React__default["default"].memo(ScreenPlaceholder);
|
|
3478
3596
|
|
|
3479
|
-
var styles$5 = {"
|
|
3597
|
+
var styles$5 = {"screen":"micromag-core-screens-preview-screen"};
|
|
3480
3598
|
|
|
3599
|
+
var _excluded = ["screen", "screenState", "width", "height", "screenWidth", "screenHeight", "className", "withSize"];
|
|
3481
3600
|
var propTypes$7 = {
|
|
3482
3601
|
screen: core.PropTypes.component.isRequired,
|
|
3483
3602
|
screenState: PropTypes__default["default"].string,
|
|
3484
3603
|
width: PropTypes__default["default"].number,
|
|
3485
3604
|
height: PropTypes__default["default"].number,
|
|
3486
|
-
|
|
3605
|
+
screenWidth: PropTypes__default["default"].number,
|
|
3606
|
+
screenHeight: PropTypes__default["default"].number,
|
|
3607
|
+
className: PropTypes__default["default"].string,
|
|
3608
|
+
withSize: PropTypes__default["default"].bool
|
|
3487
3609
|
};
|
|
3488
3610
|
var defaultProps$7 = {
|
|
3489
3611
|
screenState: null,
|
|
3490
|
-
width:
|
|
3491
|
-
height:
|
|
3492
|
-
|
|
3612
|
+
width: undefined,
|
|
3613
|
+
height: undefined,
|
|
3614
|
+
screenWidth: undefined,
|
|
3615
|
+
screenHeight: undefined,
|
|
3616
|
+
className: null,
|
|
3617
|
+
withSize: false
|
|
3493
3618
|
};
|
|
3494
3619
|
|
|
3495
3620
|
var ScreenPreview = function ScreenPreview(_ref) {
|
|
@@ -3497,26 +3622,27 @@ var ScreenPreview = function ScreenPreview(_ref) {
|
|
|
3497
3622
|
screenState = _ref.screenState,
|
|
3498
3623
|
width = _ref.width,
|
|
3499
3624
|
height = _ref.height,
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
};
|
|
3508
|
-
}, [width, height]);
|
|
3509
|
-
return /*#__PURE__*/React__default["default"].createElement(contexts.ScreenSizeProvider, {
|
|
3510
|
-
size: screenSize
|
|
3511
|
-
}, /*#__PURE__*/React__default["default"].createElement(contexts.ScreenProvider, {
|
|
3512
|
-
data: screen,
|
|
3513
|
-
renderContext: "preview",
|
|
3514
|
-
screenState: screenState
|
|
3515
|
-
}, /*#__PURE__*/React__default["default"].createElement(Screen$1, {
|
|
3625
|
+
screenWidth = _ref.screenWidth,
|
|
3626
|
+
screenHeight = _ref.screenHeight,
|
|
3627
|
+
className = _ref.className,
|
|
3628
|
+
withSize = _ref.withSize,
|
|
3629
|
+
props = _objectWithoutProperties__default["default"](_ref, _excluded);
|
|
3630
|
+
|
|
3631
|
+
var screenElement = /*#__PURE__*/React__default["default"].createElement(Screen$1, Object.assign({
|
|
3516
3632
|
screen: screen,
|
|
3517
3633
|
renderContext: "preview",
|
|
3518
|
-
|
|
3519
|
-
|
|
3634
|
+
screenState: screenState,
|
|
3635
|
+
width: !withSize ? width : undefined,
|
|
3636
|
+
height: !withSize ? height : undefined,
|
|
3637
|
+
className: classNames__default["default"]([styles$5.screen, _defineProperty__default["default"]({}, className, !withSize)])
|
|
3638
|
+
}, props));
|
|
3639
|
+
return withSize ? /*#__PURE__*/React__default["default"].createElement(ScreenSizer, {
|
|
3640
|
+
className: className,
|
|
3641
|
+
screenWidth: screenWidth,
|
|
3642
|
+
screenHeight: screenHeight,
|
|
3643
|
+
width: width,
|
|
3644
|
+
height: height
|
|
3645
|
+
}, screenElement) : screenElement;
|
|
3520
3646
|
};
|
|
3521
3647
|
|
|
3522
3648
|
ScreenPreview.propTypes = propTypes$7;
|
|
@@ -4114,6 +4240,7 @@ exports.Screen = Screen$1;
|
|
|
4114
4240
|
exports.ScreenElement = ScreenElement;
|
|
4115
4241
|
exports.ScreenPlaceholder = Placeholder;
|
|
4116
4242
|
exports.ScreenPreview = Preview;
|
|
4243
|
+
exports.ScreenSizer = ScreenSizer;
|
|
4117
4244
|
exports.Screens = Screens;
|
|
4118
4245
|
exports.Slideshow = Slideshow;
|
|
4119
4246
|
exports.Spinner = Spinner;
|