@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/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, ScreenSizeProvider, useScreenRenderContext, useScreenSize } from '@micromag/core/contexts';
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$J = {
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$J = {
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$J;
54
- Label.defaultProps = defaultProps$J;
54
+ Label.propTypes = propTypes$K;
55
+ Label.defaultProps = defaultProps$K;
55
56
 
56
57
  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"};
57
58
 
58
- var _excluded$8 = ["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"];
59
- var propTypes$I = {
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$I = {
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$8);
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;
@@ -205,13 +206,13 @@ var Button$1 = function Button(_ref) {
205
206
  }), content);
206
207
  };
207
208
 
208
- Button$1.propTypes = propTypes$I;
209
- Button$1.defaultProps = defaultProps$I;
209
+ Button$1.propTypes = propTypes$J;
210
+ Button$1.defaultProps = defaultProps$J;
210
211
 
211
212
  var styles$t = {};
212
213
 
213
- var _excluded$7 = ["className", "onClick", "theme"];
214
- var propTypes$H = {
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$H = {
224
+ var defaultProps$I = {
224
225
  buttons: [],
225
226
  size: null,
226
227
  theme: undefined,
@@ -250,7 +251,7 @@ 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$7);
254
+ buttonProps = _objectWithoutProperties(button, _excluded$9);
254
255
 
255
256
  var fixedProps = {
256
257
  key: "button-".concat(index),
@@ -270,20 +271,20 @@ var Buttons = function Buttons(_ref) {
270
271
  }));
271
272
  };
272
273
 
273
- Buttons.propTypes = propTypes$H;
274
- Buttons.defaultProps = defaultProps$H;
274
+ Buttons.propTypes = propTypes$I;
275
+ Buttons.defaultProps = defaultProps$I;
275
276
 
276
- var _excluded$6 = ["className"];
277
- var propTypes$G = {
277
+ var _excluded$8 = ["className"];
278
+ var propTypes$H = {
278
279
  className: PropTypes$1.string
279
280
  };
280
- var defaultProps$G = {
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$6);
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$G;
299
- BackButton.defaultProps = defaultProps$G;
299
+ BackButton.propTypes = propTypes$H;
300
+ BackButton.defaultProps = defaultProps$H;
300
301
 
301
- var _excluded$5 = ["type"],
302
+ var _excluded$7 = ["type"],
302
303
  _excluded2 = ["component", "id", "settings"];
303
- var propTypes$F = {
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$F = {
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$5);
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$F;
399
- FieldForm.defaultProps = defaultProps$F;
399
+ FieldForm.propTypes = propTypes$G;
400
+ FieldForm.defaultProps = defaultProps$G;
400
401
 
401
402
  var styles$s = {"actions":"micromag-core-forms-form-actions","left":"micromag-core-forms-form-left","right":"micromag-core-forms-form-right"};
402
403
 
403
- var propTypes$E = {
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$E = {
431
+ var defaultProps$F = {
431
432
  method: 'POST',
432
433
  fields: [],
433
434
  initialValue: null,
@@ -640,13 +641,13 @@ var Form = function Form(_ref) {
640
641
  })) : null) : null);
641
642
  };
642
643
 
643
- Form.propTypes = propTypes$E;
644
- Form.defaultProps = defaultProps$E;
644
+ Form.propTypes = propTypes$F;
645
+ Form.defaultProps = defaultProps$F;
645
646
 
646
647
  var styles$r = {"withoutStyle":"micromag-core-partials-link-withoutStyle"};
647
648
 
648
- var _excluded$4 = ["href", "external", "children", "target", "rel", "className", "withoutStyle"];
649
- var propTypes$D = {
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$D = {
659
+ var defaultProps$E = {
659
660
  href: '',
660
661
  external: false,
661
662
  target: '_blank',
@@ -673,7 +674,7 @@ 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$4);
677
+ props = _objectWithoutProperties(_ref, _excluded$6);
677
678
 
678
679
  return external ? /*#__PURE__*/React.createElement("a", Object.assign({
679
680
  className: classNames([className, _defineProperty({}, styles$r.withoutStyle, withoutStyle)]),
@@ -686,11 +687,11 @@ var Link = function Link(_ref) {
686
687
  }, props), /*#__PURE__*/React.createElement(Label, null, children));
687
688
  };
688
689
 
689
- Link.propTypes = propTypes$D;
690
- Link.defaultProps = defaultProps$D;
690
+ Link.propTypes = propTypes$E;
691
+ Link.defaultProps = defaultProps$E;
691
692
 
692
- var _excluded$3 = ["label", "className"];
693
- var propTypes$C = {
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$C = {
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$3);
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$C;
844
- Card.defaultProps = defaultProps$C;
844
+ Card.propTypes = propTypes$D;
845
+ Card.defaultProps = defaultProps$D;
845
846
 
846
- var propTypes$B = {
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$B = {
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$B;
917
- Spinner.defaultProps = defaultProps$B;
917
+ Spinner.propTypes = propTypes$C;
918
+ Spinner.defaultProps = defaultProps$C;
918
919
 
919
920
  var styles$q = {};
920
921
 
921
- var _excluded$2 = ["description", "loading", "children", "className"];
922
- var propTypes$A = {
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$A = {
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$2);
941
+ props = _objectWithoutProperties(_ref, _excluded$4);
941
942
 
942
943
  return /*#__PURE__*/React.createElement(Card, Object.assign({
943
944
  className: classNames([styles$q.container, _defineProperty({}, className, className !== null)])
944
945
  }, props), description, loading ? /*#__PURE__*/React.createElement(Spinner, null) : children);
945
946
  };
946
947
 
947
- FormPanel.propTypes = propTypes$A;
948
- FormPanel.defaultProps = defaultProps$A;
948
+ FormPanel.propTypes = propTypes$B;
949
+ FormPanel.defaultProps = defaultProps$B;
949
950
 
950
951
  var styles$p = {"container":"micromag-core-menus-breadcrumb-container","arrow":"micromag-core-menus-breadcrumb-arrow"};
951
952
 
952
- var propTypes$z = {
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$z = {
961
+ var defaultProps$A = {
961
962
  items: [],
962
963
  theme: null,
963
964
  separator: null,
@@ -1007,13 +1008,11 @@ var Breadcrumb = function Breadcrumb(_ref) {
1007
1008
  })));
1008
1009
  };
1009
1010
 
1010
- Breadcrumb.propTypes = propTypes$z;
1011
- Breadcrumb.defaultProps = defaultProps$z;
1011
+ Breadcrumb.propTypes = propTypes$A;
1012
+ Breadcrumb.defaultProps = defaultProps$A;
1012
1013
 
1013
- var styles$o = {"start":"micromag-core-menus-dropdown-start","end":"micromag-core-menus-dropdown-end"};
1014
-
1015
- var _excluded$1 = ["id", "type", "className", "label", "children", "onClick", "active"];
1016
- var propTypes$y = {
1014
+ var _excluded$3 = ["id", "type", "className", "label", "children", "onClick", "active"];
1015
+ var propTypes$z = {
1017
1016
  items: PropTypes.menuItems,
1018
1017
  children: PropTypes$1.node,
1019
1018
  visible: PropTypes$1.bool,
@@ -1023,7 +1022,7 @@ var propTypes$y = {
1023
1022
  onClickItem: PropTypes$1.func,
1024
1023
  onClickOutside: PropTypes$1.func
1025
1024
  };
1026
- var defaultProps$y = {
1025
+ var defaultProps$z = {
1027
1026
  items: [],
1028
1027
  children: null,
1029
1028
  visible: false,
@@ -1053,7 +1052,7 @@ var Dropdown = function Dropdown(_ref) {
1053
1052
  }, [refContainer.current, onClickOutside]);
1054
1053
  useDocumentEvent('click', onDocumentClick, visible);
1055
1054
  return /*#__PURE__*/React.createElement("div", {
1056
- className: classNames(['dropdown-menu', (_ref2 = {}, _defineProperty(_ref2, styles$o[align], align !== null), _defineProperty(_ref2, "show", visible), _defineProperty(_ref2, className, className !== null), _ref2)]),
1055
+ className: classNames(['dropdown-menu', (_ref2 = {}, _defineProperty(_ref2, "dropdown-menu-".concat(align), align !== null), _defineProperty(_ref2, "show", visible), _defineProperty(_ref2, className, className !== null), _ref2)]),
1057
1056
  ref: refContainer
1058
1057
  }, children !== null ? children : items.map(function (it, index) {
1059
1058
  var _ref3;
@@ -1071,7 +1070,7 @@ var Dropdown = function Dropdown(_ref) {
1071
1070
  customOnClick = _it$onClick === void 0 ? null : _it$onClick,
1072
1071
  _it$active = it.active,
1073
1072
  active = _it$active === void 0 ? false : _it$active,
1074
- itemProps = _objectWithoutProperties(it, _excluded$1);
1073
+ itemProps = _objectWithoutProperties(it, _excluded$3);
1075
1074
 
1076
1075
  var ItemComponent = 'div';
1077
1076
 
@@ -1107,11 +1106,11 @@ var Dropdown = function Dropdown(_ref) {
1107
1106
  }));
1108
1107
  };
1109
1108
 
1110
- Dropdown.propTypes = propTypes$y;
1111
- Dropdown.defaultProps = defaultProps$y;
1109
+ Dropdown.propTypes = propTypes$z;
1110
+ Dropdown.defaultProps = defaultProps$z;
1112
1111
 
1113
- var _excluded = ["id", "className", "linkClassName", "href", "label", "external", "items", "dropdown", "active", "onClick"];
1114
- var propTypes$x = {
1112
+ var _excluded$2 = ["id", "className", "linkClassName", "href", "label", "external", "items", "dropdown", "active", "onClick"];
1113
+ var propTypes$y = {
1115
1114
  items: PropTypes.menuItems,
1116
1115
  tagName: PropTypes$1.string,
1117
1116
  itemTagName: PropTypes$1.string,
@@ -1130,7 +1129,7 @@ var propTypes$x = {
1130
1129
  dropdownLinkClassName: PropTypes$1.string,
1131
1130
  dropdownAlign: PropTypes.dropdownAlign
1132
1131
  };
1133
- var defaultProps$x = {
1132
+ var defaultProps$y = {
1134
1133
  items: [],
1135
1134
  tagName: 'ul',
1136
1135
  itemTagName: 'li',
@@ -1200,7 +1199,7 @@ var Menu = function Menu(_ref) {
1200
1199
  active = _it$active === void 0 ? false : _it$active,
1201
1200
  _it$onClick = it.onClick,
1202
1201
  customOnClick = _it$onClick === void 0 ? null : _it$onClick,
1203
- itemProps = _objectWithoutProperties(it, _excluded);
1202
+ itemProps = _objectWithoutProperties(it, _excluded$2);
1204
1203
 
1205
1204
  var onClickItem = dropdown !== null ? function (e) {
1206
1205
  e.preventDefault();
@@ -1254,10 +1253,10 @@ var Menu = function Menu(_ref) {
1254
1253
  }));
1255
1254
  };
1256
1255
 
1257
- Menu.propTypes = propTypes$x;
1258
- Menu.defaultProps = defaultProps$x;
1256
+ Menu.propTypes = propTypes$y;
1257
+ Menu.defaultProps = defaultProps$y;
1259
1258
 
1260
- var propTypes$w = {
1259
+ var propTypes$x = {
1261
1260
  brand: PropTypes$1.node,
1262
1261
  brandLink: PropTypes$1.string,
1263
1262
  breadcrumbs: PropTypes$1.node,
@@ -1271,7 +1270,7 @@ var propTypes$w = {
1271
1270
  brandClassName: PropTypes$1.string,
1272
1271
  breadCrumbsClassName: PropTypes$1.string
1273
1272
  };
1274
- var defaultProps$w = {
1273
+ var defaultProps$x = {
1275
1274
  brand: null,
1276
1275
  brandLink: null,
1277
1276
  breadcrumbs: null,
@@ -1345,10 +1344,10 @@ var Navbar = function Navbar(_ref) {
1345
1344
  }, children) : children));
1346
1345
  };
1347
1346
 
1348
- Navbar.propTypes = propTypes$w;
1349
- Navbar.defaultProps = defaultProps$w;
1347
+ Navbar.propTypes = propTypes$x;
1348
+ Navbar.defaultProps = defaultProps$x;
1350
1349
 
1351
- var styles$n = {};
1350
+ var styles$o = {};
1352
1351
 
1353
1352
  var messages = defineMessages({
1354
1353
  previous: {
@@ -1366,7 +1365,7 @@ var messages = defineMessages({
1366
1365
  }]
1367
1366
  }
1368
1367
  });
1369
- var propTypes$v = {
1368
+ var propTypes$w = {
1370
1369
  page: PropTypes$1.number,
1371
1370
  total: PropTypes$1.number,
1372
1371
  url: PropTypes$1.string,
@@ -1377,7 +1376,7 @@ var propTypes$v = {
1377
1376
  linkClassName: PropTypes$1.string,
1378
1377
  onClickPage: PropTypes$1.func
1379
1378
  };
1380
- var defaultProps$v = {
1379
+ var defaultProps$w = {
1381
1380
  page: 1,
1382
1381
  total: 1,
1383
1382
  url: null,
@@ -1408,7 +1407,7 @@ var PaginationMenu = function PaginationMenu(_ref) {
1408
1407
  });
1409
1408
 
1410
1409
  return /*#__PURE__*/React.createElement("nav", {
1411
- className: classNames([styles$n.container, _defineProperty({}, className, className !== null)])
1410
+ className: classNames([styles$o.container, _defineProperty({}, className, className !== null)])
1412
1411
  }, /*#__PURE__*/React.createElement("ul", {
1413
1412
  className: classNames(['pagination', _defineProperty({}, paginationClassName, paginationClassName !== null)])
1414
1413
  }, withPreviousNext ? /*#__PURE__*/React.createElement("li", {
@@ -1451,12 +1450,12 @@ var PaginationMenu = function PaginationMenu(_ref) {
1451
1450
  }, /*#__PURE__*/React.createElement(Label, null, messages.next))) : null));
1452
1451
  };
1453
1452
 
1454
- PaginationMenu.propTypes = propTypes$v;
1455
- PaginationMenu.defaultProps = defaultProps$v;
1453
+ PaginationMenu.propTypes = propTypes$w;
1454
+ PaginationMenu.defaultProps = defaultProps$w;
1456
1455
 
1457
- var styles$m = {"container":"micromag-core-menus-tabs-container"};
1456
+ var styles$n = {"container":"micromag-core-menus-tabs-container"};
1458
1457
 
1459
- var propTypes$u = {
1458
+ var propTypes$v = {
1460
1459
  items: PropTypes.menuItems,
1461
1460
  size: PropTypes.buttonSize,
1462
1461
  theme: PropTypes.buttonTheme,
@@ -1465,7 +1464,7 @@ var propTypes$u = {
1465
1464
  className: PropTypes$1.string,
1466
1465
  onClickItem: PropTypes$1.func
1467
1466
  };
1468
- var defaultProps$u = {
1467
+ var defaultProps$v = {
1469
1468
  items: [],
1470
1469
  size: null,
1471
1470
  theme: 'secondary',
@@ -1484,29 +1483,29 @@ var TabsMenu = function TabsMenu(_ref) {
1484
1483
  className = _ref.className,
1485
1484
  onClickItem = _ref.onClickItem;
1486
1485
  return /*#__PURE__*/React.createElement("div", {
1487
- className: classNames([styles$m.container, _defineProperty({}, className, className)])
1486
+ className: classNames([styles$n.container, _defineProperty({}, className, className)])
1488
1487
  }, /*#__PURE__*/React.createElement(Buttons, {
1489
1488
  buttons: items,
1490
1489
  size: size,
1491
1490
  theme: theme,
1492
1491
  renderButton: renderItemButton,
1493
1492
  onClickButton: onClickItem,
1494
- className: styles$m.buttons,
1495
- buttonClassName: classNames([styles$m.button, _defineProperty({}, buttonClassName, buttonClassName !== null)])
1493
+ className: styles$n.buttons,
1494
+ buttonClassName: classNames([styles$n.button, _defineProperty({}, buttonClassName, buttonClassName !== null)])
1496
1495
  }));
1497
1496
  };
1498
1497
 
1499
- TabsMenu.propTypes = propTypes$u;
1500
- TabsMenu.defaultProps = defaultProps$u;
1498
+ TabsMenu.propTypes = propTypes$v;
1499
+ TabsMenu.defaultProps = defaultProps$v;
1501
1500
 
1502
- var styles$l = {"container":"micromag-core-modals-container","modals":"micromag-core-modals-modals","hasModals":"micromag-core-modals-hasModals"};
1501
+ var styles$m = {"container":"micromag-core-modals-container","modals":"micromag-core-modals-modals","hasModals":"micromag-core-modals-hasModals"};
1503
1502
 
1504
- var propTypes$t = {
1503
+ var propTypes$u = {
1505
1504
  modals: PropTypes.modals.isRequired,
1506
1505
  setModalsContainer: PropTypes$1.func.isRequired,
1507
1506
  className: PropTypes$1.string
1508
1507
  };
1509
- var defaultProps$t = {
1508
+ var defaultProps$u = {
1510
1509
  className: null
1511
1510
  };
1512
1511
 
@@ -1519,19 +1518,19 @@ var ModalsContainer = function ModalsContainer(_ref) {
1519
1518
  setModalsContainer(containerRef.current);
1520
1519
  }, []);
1521
1520
  return /*#__PURE__*/React.createElement("div", {
1522
- className: classNames([styles$l.container, _defineProperty({}, className, className)])
1521
+ className: classNames([styles$m.container, _defineProperty({}, className, className)])
1523
1522
  }, /*#__PURE__*/React.createElement("div", {
1524
- className: classNames([styles$l.modals, _defineProperty({}, styles$l.hasModals, modals.length > 0)]),
1523
+ className: classNames([styles$m.modals, _defineProperty({}, styles$m.hasModals, modals.length > 0)]),
1525
1524
  ref: containerRef
1526
1525
  }));
1527
1526
  };
1528
1527
 
1529
- ModalsContainer.propTypes = propTypes$t;
1530
- ModalsContainer.defaultProps = defaultProps$t;
1528
+ ModalsContainer.propTypes = propTypes$u;
1529
+ ModalsContainer.defaultProps = defaultProps$u;
1531
1530
  var Modals = withModals(ModalsContainer);
1532
1531
 
1533
1532
  /* eslint-disable react/no-array-index-key, react/jsx-props-no-spreading */
1534
- var propTypes$s = {
1533
+ var propTypes$t = {
1535
1534
  id: PropTypes$1.string,
1536
1535
  data: PropTypes$1.object,
1537
1536
  // eslint-disable-line react/forbid-prop-types
@@ -1541,7 +1540,7 @@ var propTypes$s = {
1541
1540
  unregister: PropTypes$1.func,
1542
1541
  children: PropTypes$1.node
1543
1542
  };
1544
- var defaultProps$s = {
1543
+ var defaultProps$t = {
1545
1544
  id: null,
1546
1545
  data: null,
1547
1546
  container: null,
@@ -1574,17 +1573,17 @@ var ElementPortal = function ElementPortal(_ref) {
1574
1573
  return container !== null ? /*#__PURE__*/ReactDOM.createPortal(children, container) : null;
1575
1574
  };
1576
1575
 
1577
- ElementPortal.propTypes = propTypes$s;
1578
- ElementPortal.defaultProps = defaultProps$s;
1576
+ ElementPortal.propTypes = propTypes$t;
1577
+ ElementPortal.defaultProps = defaultProps$t;
1579
1578
 
1580
1579
  /* eslint-disable react/no-array-index-key, react/jsx-props-no-spreading */
1581
- var propTypes$r = {
1580
+ var propTypes$s = {
1582
1581
  id: PropTypes$1.string,
1583
1582
  data: PropTypes$1.object,
1584
1583
  // eslint-disable-line react/forbid-prop-types
1585
1584
  children: PropTypes$1.node
1586
1585
  };
1587
- var defaultProps$r = {
1586
+ var defaultProps$s = {
1588
1587
  id: null,
1589
1588
  data: null,
1590
1589
  children: null
@@ -1611,18 +1610,18 @@ var ModalPortal = function ModalPortal(_ref) {
1611
1610
  }, children);
1612
1611
  };
1613
1612
 
1614
- ModalPortal.propTypes = propTypes$r;
1615
- ModalPortal.defaultProps = defaultProps$r;
1613
+ ModalPortal.propTypes = propTypes$s;
1614
+ ModalPortal.defaultProps = defaultProps$s;
1616
1615
 
1617
- var styles$k = {"container":"micromag-core-modals-modal-container","center":"micromag-core-modals-modal-center","inner":"micromag-core-modals-modal-inner","top":"micromag-core-modals-modal-top"};
1616
+ 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
1617
 
1619
- var propTypes$q = {
1618
+ var propTypes$r = {
1620
1619
  id: PropTypes$1.string,
1621
1620
  title: PropTypes$1.string,
1622
1621
  position: PropTypes$1.oneOf(['center', 'top']),
1623
1622
  children: PropTypes$1.node
1624
1623
  };
1625
- var defaultProps$q = {
1624
+ var defaultProps$r = {
1626
1625
  id: null,
1627
1626
  title: null,
1628
1627
  position: 'center',
@@ -1646,18 +1645,18 @@ var Modal = function Modal(_ref) {
1646
1645
  id: finalId,
1647
1646
  data: data
1648
1647
  }, /*#__PURE__*/React.createElement("div", {
1649
- className: classNames([styles$k.container, _defineProperty({}, styles$k[position], position !== null)])
1648
+ className: classNames([styles$l.container, _defineProperty({}, styles$l[position], position !== null)])
1650
1649
  }, /*#__PURE__*/React.createElement("div", {
1651
- className: styles$k.inner
1650
+ className: styles$l.inner
1652
1651
  }, children)));
1653
1652
  };
1654
1653
 
1655
- Modal.propTypes = propTypes$q;
1656
- Modal.defaultProps = defaultProps$q;
1654
+ Modal.propTypes = propTypes$r;
1655
+ Modal.defaultProps = defaultProps$r;
1657
1656
 
1658
- var styles$j = {"container":"micromag-core-modals-dialog-container"};
1657
+ var styles$k = {"container":"micromag-core-modals-dialog-container"};
1659
1658
 
1660
- var propTypes$p = {
1659
+ var propTypes$q = {
1661
1660
  title: PropTypes.label,
1662
1661
  header: PropTypes$1.node,
1663
1662
  children: PropTypes$1.node,
@@ -1667,7 +1666,7 @@ var propTypes$p = {
1667
1666
  onClickClose: PropTypes$1.func,
1668
1667
  className: PropTypes$1.string
1669
1668
  };
1670
- var defaultProps$p = {
1669
+ var defaultProps$q = {
1671
1670
  title: null,
1672
1671
  header: null,
1673
1672
  children: null,
@@ -1687,12 +1686,12 @@ var ModalDialog = function ModalDialog(_ref) {
1687
1686
  onClickClose = _ref.onClickClose,
1688
1687
  className = _ref.className;
1689
1688
  return /*#__PURE__*/React.createElement("div", {
1690
- className: classNames(['modal-dialog', styles$j.container, _defineProperty({}, className, className)]),
1689
+ className: classNames(['modal-dialog', styles$k.container, _defineProperty({}, className, className)]),
1691
1690
  role: "dialog"
1692
1691
  }, /*#__PURE__*/React.createElement("div", {
1693
1692
  className: "modal-content"
1694
1693
  }, header || /*#__PURE__*/React.createElement("div", {
1695
- className: classNames(['modal-header', styles$j.header, {// 'bg-dark': theme === 'dark',
1694
+ className: classNames(['modal-header', styles$k.header, {// 'bg-dark': theme === 'dark',
1696
1695
  // 'border-dark': theme === 'dark',
1697
1696
  // 'text-light': theme === 'dark',
1698
1697
  }])
@@ -1704,28 +1703,28 @@ var ModalDialog = function ModalDialog(_ref) {
1704
1703
  "aria-label": "Close",
1705
1704
  onClick: onClickClose
1706
1705
  })), /*#__PURE__*/React.createElement("div", {
1707
- className: classNames(['modal-body', styles$j.body, {// [`bg-${theme}`]: theme !== null,
1706
+ className: classNames(['modal-body', styles$k.body, {// [`bg-${theme}`]: theme !== null,
1708
1707
  // 'text-light': theme === 'dark',
1709
1708
  }])
1710
1709
  }, children), footer !== null || buttons !== null ? /*#__PURE__*/React.createElement("div", {
1711
- className: classNames(['modal-footer', styles$j.footer])
1710
+ className: classNames(['modal-footer', styles$k.footer])
1712
1711
  }, footer, buttons !== null ? /*#__PURE__*/React.createElement(Buttons, {
1713
1712
  buttons: buttons,
1714
- className: styles$j.buttons
1713
+ className: styles$k.buttons
1715
1714
  }) : null) : null));
1716
1715
  };
1717
1716
 
1718
- ModalDialog.propTypes = propTypes$p;
1719
- ModalDialog.defaultProps = defaultProps$p;
1717
+ ModalDialog.propTypes = propTypes$q;
1718
+ ModalDialog.defaultProps = defaultProps$q;
1720
1719
 
1721
- var propTypes$o = {
1720
+ var propTypes$p = {
1722
1721
  type: PropTypes$1.oneOfType([PropTypes.mediaTypes, PropTypes$1.array]),
1723
1722
  opened: PropTypes$1.bool,
1724
1723
  sources: PropTypes$1.arrayOf(PropTypes$1.string),
1725
1724
  onUploaded: PropTypes$1.func,
1726
1725
  onRequestClose: PropTypes$1.func
1727
1726
  };
1728
- var defaultProps$o = {
1727
+ var defaultProps$p = {
1729
1728
  type: null,
1730
1729
  opened: false,
1731
1730
  sources: ['webcam', 'facebook', 'instagram', 'dropbox', 'google-drive'],
@@ -1774,17 +1773,17 @@ var UploadModal = function UploadModal(_ref) {
1774
1773
  }) : null;
1775
1774
  };
1776
1775
 
1777
- UploadModal.propTypes = propTypes$o;
1778
- UploadModal.defaultProps = defaultProps$o;
1776
+ UploadModal.propTypes = propTypes$p;
1777
+ UploadModal.defaultProps = defaultProps$p;
1779
1778
 
1780
- var styles$i = {"container":"micromag-core-panels-container"};
1779
+ var styles$j = {"container":"micromag-core-panels-container"};
1781
1780
 
1782
- var propTypes$n = {
1781
+ var propTypes$o = {
1783
1782
  panels: PropTypes.panels,
1784
1783
  setPanelsContainer: PropTypes$1.func,
1785
1784
  className: PropTypes$1.string
1786
1785
  };
1787
- var defaultProps$n = {
1786
+ var defaultProps$o = {
1788
1787
  panels: [],
1789
1788
  setPanelsContainer: null,
1790
1789
  className: null
@@ -1799,25 +1798,25 @@ var PanelsContainer = function PanelsContainer(_ref) {
1799
1798
  setPanelsContainer(containerRef.current);
1800
1799
  }, []);
1801
1800
  return /*#__PURE__*/React.createElement("div", {
1802
- className: classNames([styles$i.container, _defineProperty({}, className, className)])
1801
+ className: classNames([styles$j.container, _defineProperty({}, className, className)])
1803
1802
  }, /*#__PURE__*/React.createElement("div", {
1804
- className: classNames([styles$i.panels, _defineProperty({}, styles$i.hasPanels, panels.length > 0)]),
1803
+ className: classNames([styles$j.panels, _defineProperty({}, styles$j.hasPanels, panels.length > 0)]),
1805
1804
  ref: containerRef
1806
1805
  }));
1807
1806
  };
1808
1807
 
1809
- PanelsContainer.propTypes = propTypes$n;
1810
- PanelsContainer.defaultProps = defaultProps$n;
1808
+ PanelsContainer.propTypes = propTypes$o;
1809
+ PanelsContainer.defaultProps = defaultProps$o;
1811
1810
  var Panels = withPanels(PanelsContainer);
1812
1811
 
1813
1812
  /* eslint-disable react/no-array-index-key, react/jsx-props-no-spreading */
1814
- var propTypes$m = {
1813
+ var propTypes$n = {
1815
1814
  id: PropTypes$1.string,
1816
1815
  data: PropTypes$1.object,
1817
1816
  // eslint-disable-line react/forbid-prop-types
1818
1817
  children: PropTypes$1.node
1819
1818
  };
1820
- var defaultProps$m = {
1819
+ var defaultProps$n = {
1821
1820
  id: null,
1822
1821
  data: null,
1823
1822
  children: null
@@ -1850,18 +1849,18 @@ var PanelPortal = function PanelPortal(_ref) {
1850
1849
  }, children);
1851
1850
  };
1852
1851
 
1853
- PanelPortal.propTypes = propTypes$m;
1854
- PanelPortal.defaultProps = defaultProps$m;
1852
+ PanelPortal.propTypes = propTypes$n;
1853
+ PanelPortal.defaultProps = defaultProps$n;
1855
1854
 
1856
- var styles$h = {"container":"micromag-core-panels-panel-container"};
1855
+ var styles$i = {"container":"micromag-core-panels-panel-container"};
1857
1856
 
1858
1857
  /* eslint-disable react/no-array-index-key, react/jsx-props-no-spreading */
1859
- var propTypes$l = {
1858
+ var propTypes$m = {
1860
1859
  id: PropTypes$1.string,
1861
1860
  title: PropTypes$1.string,
1862
1861
  children: PropTypes$1.node
1863
1862
  };
1864
- var defaultProps$l = {
1863
+ var defaultProps$m = {
1865
1864
  id: null,
1866
1865
  title: null,
1867
1866
  children: null
@@ -1883,16 +1882,16 @@ var Panel = function Panel(_ref) {
1883
1882
  id: finalId,
1884
1883
  data: data
1885
1884
  }, /*#__PURE__*/React.createElement("div", {
1886
- className: styles$h.container
1885
+ className: styles$i.container
1887
1886
  }, children));
1888
1887
  };
1889
1888
 
1890
- Panel.propTypes = propTypes$l;
1891
- Panel.defaultProps = defaultProps$l;
1889
+ Panel.propTypes = propTypes$m;
1890
+ Panel.defaultProps = defaultProps$m;
1892
1891
 
1893
- var styles$g = {"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"};
1892
+ 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
1893
 
1895
- var propTypes$k = {
1894
+ var propTypes$l = {
1896
1895
  title: PropTypes$1.node,
1897
1896
  children: PropTypes$1.node,
1898
1897
  className: PropTypes$1.string,
@@ -1901,7 +1900,7 @@ var propTypes$k = {
1901
1900
  openedClassName: PropTypes$1.string,
1902
1901
  buttonClassName: PropTypes$1.string
1903
1902
  };
1904
- var defaultProps$k = {
1903
+ var defaultProps$l = {
1905
1904
  title: null,
1906
1905
  children: null,
1907
1906
  className: null,
@@ -1931,34 +1930,34 @@ var CollapsablePanel = function CollapsablePanel(_ref) {
1931
1930
  return setOpened(!opened);
1932
1931
  }, [opened, setOpened]);
1933
1932
  return /*#__PURE__*/React.createElement("div", {
1934
- className: classNames([styles$g.container, (_ref2 = {}, _defineProperty(_ref2, styles$g.isOpened, opened), _defineProperty(_ref2, openedClassName, opened && openedClassName !== null), _defineProperty(_ref2, className, className !== null), _ref2)])
1933
+ 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
1934
  }, /*#__PURE__*/React.createElement("div", {
1936
- className: classNames([styles$g.top, _defineProperty({}, topClassName, topClassName !== null)])
1935
+ className: classNames([styles$h.top, _defineProperty({}, topClassName, topClassName !== null)])
1937
1936
  }, /*#__PURE__*/React.createElement(Button$1, {
1938
1937
  withoutStyle: true,
1939
- className: classNames([styles$g.button, _defineProperty({}, buttonClassName, buttonClassName !== null)]),
1938
+ className: classNames([styles$h.button, _defineProperty({}, buttonClassName, buttonClassName !== null)]),
1940
1939
  icon: /*#__PURE__*/React.createElement(FontAwesomeIcon, {
1941
1940
  icon: opened ? faAngleUp : faAngleDown,
1942
- className: styles$g.icon
1941
+ className: styles$h.icon
1943
1942
  }),
1944
1943
  iconPosition: "right",
1945
- labelClassName: styles$g.label,
1944
+ labelClassName: styles$h.label,
1946
1945
  onClick: onClick
1947
1946
  }, title)), /*#__PURE__*/React.createElement("div", {
1948
- className: classNames([styles$g.content, _defineProperty({}, contentClassName, contentClassName !== null)])
1947
+ className: classNames([styles$h.content, _defineProperty({}, contentClassName, contentClassName !== null)])
1949
1948
  }, children));
1950
1949
  };
1951
1950
 
1952
- CollapsablePanel.propTypes = propTypes$k;
1953
- CollapsablePanel.defaultProps = defaultProps$k;
1951
+ CollapsablePanel.propTypes = propTypes$l;
1952
+ CollapsablePanel.defaultProps = defaultProps$l;
1954
1953
 
1955
1954
  /* eslint-disable react/jsx-props-no-spreading */
1956
- var propTypes$j = {
1955
+ var propTypes$k = {
1957
1956
  date: PropTypes$1.string,
1958
1957
  withTime: PropTypes$1.bool,
1959
1958
  timeSeparator: PropTypes$1.node
1960
1959
  };
1961
- var defaultProps$j = {
1960
+ var defaultProps$k = {
1962
1961
  date: null,
1963
1962
  withTime: false,
1964
1963
  timeSeparator: ', '
@@ -1981,11 +1980,11 @@ var Date$1 = function Date(_ref) {
1981
1980
  }) : null);
1982
1981
  };
1983
1982
 
1984
- Date$1.propTypes = propTypes$j;
1985
- Date$1.defaultProps = defaultProps$j;
1983
+ Date$1.propTypes = propTypes$k;
1984
+ Date$1.defaultProps = defaultProps$k;
1986
1985
 
1987
1986
  /* eslint-disable react/no-danger */
1988
- var propTypes$i = {
1987
+ var propTypes$j = {
1989
1988
  throttleDelay: PropTypes$1.number,
1990
1989
  threshold: PropTypes$1.arrayOf(PropTypes$1.number),
1991
1990
  onEnter: PropTypes$1.func,
@@ -1995,7 +1994,7 @@ var propTypes$i = {
1995
1994
  children: PropTypes$1.node,
1996
1995
  className: PropTypes$1.string
1997
1996
  };
1998
- var defaultProps$i = {
1997
+ var defaultProps$j = {
1999
1998
  throttleDelay: null,
2000
1999
  threshold: undefined,
2001
2000
  onEnter: null,
@@ -2069,12 +2068,12 @@ var Detector = function Detector(_ref) {
2069
2068
  }, children);
2070
2069
  };
2071
2070
 
2072
- Detector.propTypes = propTypes$i;
2073
- Detector.defaultProps = defaultProps$i;
2071
+ Detector.propTypes = propTypes$j;
2072
+ Detector.defaultProps = defaultProps$j;
2074
2073
 
2075
- var styles$f = {"container":"micromag-core-partials-placeholder-block-container","box":"micromag-core-partials-placeholder-block-box","outline":"micromag-core-partials-placeholder-block-outline"};
2074
+ 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
2075
 
2077
- var propTypes$h = {
2076
+ var propTypes$i = {
2078
2077
  width: PropTypes$1.oneOfType([PropTypes$1.number, PropTypes$1.string]),
2079
2078
  height: PropTypes$1.oneOfType([PropTypes$1.number, PropTypes$1.string]),
2080
2079
  outline: PropTypes$1.bool,
@@ -2082,7 +2081,7 @@ var propTypes$h = {
2082
2081
  boxClassName: PropTypes$1.string,
2083
2082
  children: PropTypes$1.node
2084
2083
  };
2085
- var defaultProps$h = {
2084
+ var defaultProps$i = {
2086
2085
  width: '100%',
2087
2086
  height: '3em',
2088
2087
  outline: false,
@@ -2101,9 +2100,9 @@ var PlaceholderBlock = function PlaceholderBlock(_ref) {
2101
2100
  boxClassName = _ref.boxClassName,
2102
2101
  children = _ref.children;
2103
2102
  return /*#__PURE__*/React.createElement("div", {
2104
- className: classNames([styles$f.container, (_ref2 = {}, _defineProperty(_ref2, className, className !== null), _defineProperty(_ref2, styles$f.outline, outline), _ref2)])
2103
+ className: classNames([styles$g.container, (_ref2 = {}, _defineProperty(_ref2, className, className !== null), _defineProperty(_ref2, styles$g.outline, outline), _ref2)])
2105
2104
  }, /*#__PURE__*/React.createElement("div", {
2106
- className: classNames([styles$f.box, _defineProperty({}, boxClassName, boxClassName !== null)]),
2105
+ className: classNames([styles$g.box, _defineProperty({}, boxClassName, boxClassName !== null)]),
2107
2106
  style: {
2108
2107
  width: width,
2109
2108
  height: height
@@ -2111,12 +2110,12 @@ var PlaceholderBlock = function PlaceholderBlock(_ref) {
2111
2110
  }, children));
2112
2111
  };
2113
2112
 
2114
- PlaceholderBlock.propTypes = propTypes$h;
2115
- PlaceholderBlock.defaultProps = defaultProps$h;
2113
+ PlaceholderBlock.propTypes = propTypes$i;
2114
+ PlaceholderBlock.defaultProps = defaultProps$i;
2116
2115
 
2117
2116
  /* eslint-disable react/jsx-props-no-spreading */
2118
2117
 
2119
- var propTypes$g = {
2118
+ var propTypes$h = {
2120
2119
  name: PropTypes$1.string.isRequired,
2121
2120
  components: PropTypes$1.object.isRequired,
2122
2121
  // eslint-disable-line
@@ -2127,7 +2126,7 @@ var propTypes$g = {
2127
2126
  placeholderProps: PropTypes$1.object // eslint-disable-line
2128
2127
 
2129
2128
  };
2130
- var defaultProps$g = {
2129
+ var defaultProps$h = {
2131
2130
  props: {},
2132
2131
  isPlaceholder: false,
2133
2132
  className: null,
@@ -2163,18 +2162,18 @@ var ElementComponent = function ElementComponent(_ref) {
2163
2162
  }));
2164
2163
  };
2165
2164
 
2166
- ElementComponent.propTypes = propTypes$g;
2167
- ElementComponent.defaultProps = defaultProps$g;
2165
+ ElementComponent.propTypes = propTypes$h;
2166
+ ElementComponent.defaultProps = defaultProps$h;
2168
2167
 
2169
- var styles$e = {"container":"micromag-core-partials-empty-container","middle":"micromag-core-partials-empty-middle","withoutBorder":"micromag-core-partials-empty-withoutBorder","invertColor":"micromag-core-partials-empty-invertColor"};
2168
+ 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
2169
 
2171
- var propTypes$f = {
2170
+ var propTypes$g = {
2172
2171
  children: PropTypes$1.node,
2173
2172
  withoutBorder: PropTypes$1.bool,
2174
2173
  light: PropTypes$1.bool,
2175
2174
  className: PropTypes$1.string
2176
2175
  };
2177
- var defaultProps$f = {
2176
+ var defaultProps$g = {
2178
2177
  children: null,
2179
2178
  withoutBorder: false,
2180
2179
  light: false,
@@ -2189,23 +2188,23 @@ var Empty = function Empty(_ref) {
2189
2188
  light = _ref.light,
2190
2189
  className = _ref.className;
2191
2190
  return /*#__PURE__*/React.createElement("div", {
2192
- className: classNames([styles$e.container, (_ref2 = {}, _defineProperty(_ref2, styles$e.withoutBorder, withoutBorder), _defineProperty(_ref2, styles$e.light, light), _defineProperty(_ref2, className, className), _ref2)])
2191
+ className: classNames([styles$f.container, (_ref2 = {}, _defineProperty(_ref2, styles$f.withoutBorder, withoutBorder), _defineProperty(_ref2, styles$f.light, light), _defineProperty(_ref2, className, className), _ref2)])
2193
2192
  }, /*#__PURE__*/React.createElement("div", {
2194
- className: styles$e.middle
2193
+ className: styles$f.middle
2195
2194
  }, /*#__PURE__*/React.createElement(Label, null, children)));
2196
2195
  };
2197
2196
 
2198
- Empty.propTypes = propTypes$f;
2199
- Empty.defaultProps = defaultProps$f;
2197
+ Empty.propTypes = propTypes$g;
2198
+ Empty.defaultProps = defaultProps$g;
2200
2199
 
2201
- var propTypes$e = {
2200
+ var propTypes$f = {
2202
2201
  fonts: PropTypes.fonts,
2203
2202
  formats: PropTypes$1.arrayOf(PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.shape({
2204
2203
  name: PropTypes$1.string,
2205
2204
  format: PropTypes$1.string
2206
2205
  })]))
2207
2206
  };
2208
- var defaultProps$e = {
2207
+ var defaultProps$f = {
2209
2208
  fonts: [],
2210
2209
  formats: ['eot', 'woff2', 'woff', {
2211
2210
  name: 'otf',
@@ -2246,12 +2245,12 @@ var FontFaces = function FontFaces(_ref) {
2246
2245
  }, fontFaces.join('\n')) : null;
2247
2246
  };
2248
2247
 
2249
- FontFaces.propTypes = propTypes$e;
2250
- FontFaces.defaultProps = defaultProps$e;
2248
+ FontFaces.propTypes = propTypes$f;
2249
+ FontFaces.defaultProps = defaultProps$f;
2251
2250
 
2252
- var styles$d = {};
2251
+ var styles$e = {};
2253
2252
 
2254
- var propTypes$d = {
2253
+ var propTypes$e = {
2255
2254
  thumbnail: PropTypes$1.node,
2256
2255
  thumbnailAlign: PropTypes$1.oneOf(['top', 'center', 'bottom']),
2257
2256
  children: PropTypes$1.node,
@@ -2261,7 +2260,7 @@ var propTypes$d = {
2261
2260
  bodyClassName: PropTypes$1.string,
2262
2261
  titleClassName: PropTypes$1.string
2263
2262
  };
2264
- var defaultProps$d = {
2263
+ var defaultProps$e = {
2265
2264
  thumbnail: null,
2266
2265
  thumbnailAlign: 'top',
2267
2266
  children: null,
@@ -2282,24 +2281,24 @@ var Media = function Media(_ref) {
2282
2281
  bodyClassName = _ref.bodyClassName,
2283
2282
  titleClassName = _ref.titleClassName;
2284
2283
  return /*#__PURE__*/React.createElement("div", {
2285
- className: classNames(['card', styles$d.container, _defineProperty({}, className, className !== null)])
2284
+ className: classNames(['card', styles$e.container, _defineProperty({}, className, className !== null)])
2286
2285
  }, typeof thumbnail === 'string' ? /*#__PURE__*/React.createElement("img", {
2287
2286
  src: thumbnail,
2288
2287
  alt: title,
2289
- className: classNames(['me-3', styles$d.thumbnail, _defineProperty({
2288
+ className: classNames(['me-3', styles$e.thumbnail, _defineProperty({
2290
2289
  'align-self-start': thumbnailAlign === 'top',
2291
2290
  'align-self-center': thumbnailAlign === 'center',
2292
2291
  'align-self-end': thumbnailAlign === 'bottom'
2293
2292
  }, thumbnailClassName, thumbnailClassName !== null)])
2294
2293
  }) : thumbnail, /*#__PURE__*/React.createElement("div", {
2295
- className: classNames(['card-body', styles$d.body, _defineProperty({}, bodyClassName, bodyClassName !== null)])
2294
+ className: classNames(['card-body', styles$e.body, _defineProperty({}, bodyClassName, bodyClassName !== null)])
2296
2295
  }, title !== null ? /*#__PURE__*/React.createElement("h5", {
2297
- className: classNames(['mt-0', styles$d.title, _defineProperty({}, titleClassName, titleClassName !== null)])
2296
+ className: classNames(['mt-0', styles$e.title, _defineProperty({}, titleClassName, titleClassName !== null)])
2298
2297
  }, /*#__PURE__*/React.createElement(Label, null, title)) : null, children));
2299
2298
  };
2300
2299
 
2301
- Media.propTypes = propTypes$d;
2302
- Media.defaultProps = defaultProps$d;
2300
+ Media.propTypes = propTypes$e;
2301
+ Media.defaultProps = defaultProps$e;
2303
2302
 
2304
2303
  /**
2305
2304
  * Core
@@ -2833,7 +2832,7 @@ var pageMetadata = PropTypes$1.shape({
2833
2832
  });
2834
2833
 
2835
2834
  /* eslint-disable react/no-array-index-key */
2836
- var propTypes$c = {
2835
+ var propTypes$d = {
2837
2836
  title: PropTypes$1.string,
2838
2837
  url: PropTypes$1.string,
2839
2838
  metadata: pageMetadata,
@@ -2841,7 +2840,7 @@ var propTypes$c = {
2841
2840
  suffix: PropTypes$1.string,
2842
2841
  children: PropTypes$1.node
2843
2842
  };
2844
- var defaultProps$c = {
2843
+ var defaultProps$d = {
2845
2844
  title: null,
2846
2845
  url: null,
2847
2846
  metadata: null,
@@ -2965,12 +2964,12 @@ var Meta = function Meta(_ref) {
2965
2964
  }), children);
2966
2965
  };
2967
2966
 
2968
- Meta.propTypes = propTypes$c;
2969
- Meta.defaultProps = defaultProps$c;
2967
+ Meta.propTypes = propTypes$d;
2968
+ Meta.defaultProps = defaultProps$d;
2970
2969
 
2971
- var styles$c = {"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"};
2970
+ 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
2971
 
2973
- var propTypes$b = {
2972
+ var propTypes$c = {
2974
2973
  items: PropTypes$1.arrayOf(PropTypes$1.node),
2975
2974
  auto: PropTypes$1.bool,
2976
2975
  delay: PropTypes$1.number,
@@ -2979,7 +2978,7 @@ var propTypes$b = {
2979
2978
  className: PropTypes$1.string,
2980
2979
  children: PropTypes$1.node
2981
2980
  };
2982
- var defaultProps$b = {
2981
+ var defaultProps$c = {
2983
2982
  items: [],
2984
2983
  auto: true,
2985
2984
  delay: 5000,
@@ -3027,24 +3026,24 @@ var Slideshow = function Slideshow(_ref) {
3027
3026
  height: height
3028
3027
  };
3029
3028
  return /*#__PURE__*/React.createElement("div", {
3030
- className: classNames([styles$c.container, _defineProperty({}, className, className)]),
3029
+ className: classNames([styles$d.container, _defineProperty({}, className, className)]),
3031
3030
  style: style
3032
3031
  }, /*#__PURE__*/React.createElement("div", {
3033
- className: styles$c.items
3032
+ className: styles$d.items
3034
3033
  }, items.map(function (it, i) {
3035
3034
  var _ref3;
3036
3035
 
3037
3036
  return /*#__PURE__*/React.createElement("div", {
3038
3037
  key: "slide-".concat(i + 1),
3039
- className: classNames([styles$c.item, (_ref3 = {}, _defineProperty(_ref3, styles$c.prev, i < index), _defineProperty(_ref3, styles$c.current, i === index), _defineProperty(_ref3, styles$c.next, i > index), _ref3)])
3038
+ 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
3039
  }, it);
3041
3040
  })), children);
3042
3041
  };
3043
3042
 
3044
- Slideshow.propTypes = propTypes$b;
3045
- Slideshow.defaultProps = defaultProps$b;
3043
+ Slideshow.propTypes = propTypes$c;
3044
+ Slideshow.defaultProps = defaultProps$c;
3046
3045
 
3047
- var styles$b = {"icon":"micromag-core-placeholders-icon"};
3046
+ var styles$c = {"icon":"micromag-core-placeholders-icon"};
3048
3047
 
3049
3048
  /* eslint-disable react/prop-types */
3050
3049
  var AdFrame = function AdFrame(_ref) {
@@ -3057,7 +3056,7 @@ var AdFrame = function AdFrame(_ref) {
3057
3056
  className: className
3058
3057
  }, /*#__PURE__*/React.createElement(FontAwesomeIcon, {
3059
3058
  icon: faAd,
3060
- className: styles$b.icon
3059
+ className: styles$c.icon
3061
3060
  }));
3062
3061
  };
3063
3062
 
@@ -3072,7 +3071,7 @@ var AdImage = function AdImage(_ref) {
3072
3071
  className: className
3073
3072
  }, /*#__PURE__*/React.createElement(FontAwesomeIcon, {
3074
3073
  icon: faImage,
3075
- className: styles$b.icon
3074
+ className: styles$c.icon
3076
3075
  }));
3077
3076
  };
3078
3077
 
@@ -3089,13 +3088,13 @@ var Audio = function Audio(_ref) {
3089
3088
  className: className
3090
3089
  }, /*#__PURE__*/React.createElement(FontAwesomeIcon, {
3091
3090
  icon: faMusic,
3092
- className: styles$b.icon
3091
+ className: styles$c.icon
3093
3092
  }));
3094
3093
  };
3095
3094
 
3096
- var styles$a = {"container":"micromag-core-partials-placeholder-text-container","line":"micromag-core-partials-placeholder-text-line"};
3095
+ var styles$b = {"container":"micromag-core-partials-placeholder-text-container","line":"micromag-core-partials-placeholder-text-line"};
3097
3096
 
3098
- var propTypes$a = {
3097
+ var propTypes$b = {
3099
3098
  lines: PropTypes$1.number,
3100
3099
  lineMargin: PropTypes$1.oneOfType([PropTypes$1.number, PropTypes$1.string]),
3101
3100
  width: PropTypes$1.oneOfType([PropTypes$1.number, PropTypes$1.string]),
@@ -3103,7 +3102,7 @@ var propTypes$a = {
3103
3102
  fontSize: PropTypes$1.number,
3104
3103
  className: PropTypes$1.string
3105
3104
  };
3106
- var defaultProps$a = {
3105
+ var defaultProps$b = {
3107
3106
  lines: 1,
3108
3107
  lineMargin: 1,
3109
3108
  width: '100%',
@@ -3122,11 +3121,11 @@ var PlaceholderText = function PlaceholderText(_ref) {
3122
3121
  var lineHeight = height !== null && isNumber(height) ? "".concat(Math.round(height * fontSize), "px") : height;
3123
3122
  var oddWidth = isNumber(width) ? width * 0.9 : '90%';
3124
3123
  return /*#__PURE__*/React.createElement("div", {
3125
- className: classNames([styles$a.container, _defineProperty({}, className, className)])
3124
+ className: classNames([styles$b.container, _defineProperty({}, className, className)])
3126
3125
  }, _toConsumableArray(Array(lines)).map(function (e, index) {
3127
3126
  return /*#__PURE__*/React.createElement("div", {
3128
3127
  key: "line-".concat(index),
3129
- className: styles$a.line,
3128
+ className: styles$b.line,
3130
3129
  style: {
3131
3130
  width: index % 2 === 0 ? width : oddWidth,
3132
3131
  height: lineHeight,
@@ -3137,8 +3136,8 @@ var PlaceholderText = function PlaceholderText(_ref) {
3137
3136
  }));
3138
3137
  };
3139
3138
 
3140
- PlaceholderText.propTypes = propTypes$a;
3141
- PlaceholderText.defaultProps = defaultProps$a;
3139
+ PlaceholderText.propTypes = propTypes$b;
3140
+ PlaceholderText.defaultProps = defaultProps$b;
3142
3141
 
3143
3142
  /* eslint-disable react/destructuring-assignment, react/prop-types */
3144
3143
  var Button = function Button(_ref) {
@@ -3169,38 +3168,38 @@ var Image = function Image(_ref) {
3169
3168
  className: className
3170
3169
  }, /*#__PURE__*/React.createElement(FontAwesomeIcon, {
3171
3170
  icon: faImage,
3172
- className: styles$b.icon
3171
+ className: styles$c.icon
3173
3172
  }));
3174
3173
  };
3175
3174
 
3176
3175
  /* eslint-disable react/jsx-props-no-spreading, react/destructuring-assignment, react/prop-types */
3177
3176
  var Line = function Line(props) {
3178
3177
  return /*#__PURE__*/React.createElement(PlaceholderText, Object.assign({}, props, {
3179
- className: classNames([props.className, styles$b.shortText]),
3178
+ className: classNames([props.className, styles$c.shortText]),
3180
3179
  height: 0.2,
3181
3180
  lines: 1
3182
3181
  }));
3183
3182
  };
3184
3183
 
3185
- var styles$9 = {"container":"micromag-core-placeholders-map-container","icon":"micromag-core-placeholders-map-icon"};
3184
+ var styles$a = {"container":"micromag-core-placeholders-map-container","icon":"micromag-core-placeholders-map-icon"};
3186
3185
 
3187
3186
  var Map = function Map(props) {
3188
3187
  return /*#__PURE__*/React.createElement(PlaceholderBlock, Object.assign({}, props, {
3189
3188
  width: "100%",
3190
3189
  height: "100%",
3191
- className: classNames([styles$9.container, _defineProperty({}, props.className, props.className !== null)])
3190
+ className: classNames([styles$a.container, _defineProperty({}, props.className, props.className !== null)])
3192
3191
  }), /*#__PURE__*/React.createElement(FontAwesomeIcon, {
3193
3192
  icon: props.withImages ? faImage : faMapMarkerAlt,
3194
- className: styles$9.icon
3193
+ className: styles$a.icon
3195
3194
  }), /*#__PURE__*/React.createElement(FontAwesomeIcon, {
3196
3195
  icon: props.withImages ? faImage : faMapMarkerAlt,
3197
- className: styles$9.icon
3196
+ className: styles$a.icon
3198
3197
  }), /*#__PURE__*/React.createElement(FontAwesomeIcon, {
3199
3198
  icon: props.withImages ? faImage : faMapMarkerAlt,
3200
- className: styles$9.icon
3199
+ className: styles$a.icon
3201
3200
  }), /*#__PURE__*/React.createElement(FontAwesomeIcon, {
3202
3201
  icon: props.withImages ? faImage : faMapMarkerAlt,
3203
- className: styles$9.icon
3202
+ className: styles$a.icon
3204
3203
  }));
3205
3204
  };
3206
3205
 
@@ -3209,18 +3208,18 @@ var MapPath = function MapPath(props) {
3209
3208
  return /*#__PURE__*/React.createElement(PlaceholderBlock, Object.assign({}, props, {
3210
3209
  width: "100%",
3211
3210
  height: "70%",
3212
- className: classNames([props.className, styles$b.mapPath])
3211
+ className: classNames([props.className, styles$c.mapPath])
3213
3212
  }), /*#__PURE__*/React.createElement(FontAwesomeIcon, {
3214
3213
  icon: faMapMarkedAlt,
3215
3214
  size: "lg",
3216
- className: styles$b.icon
3215
+ className: styles$c.icon
3217
3216
  }));
3218
3217
  };
3219
3218
 
3220
3219
  /* eslint-disable react/jsx-props-no-spreading, react/destructuring-assignment, react/prop-types */
3221
3220
  var Quote = function Quote(props) {
3222
3221
  return /*#__PURE__*/React.createElement(PlaceholderText, Object.assign({}, props, {
3223
- className: classNames([props.className, styles$b.subtitle]),
3222
+ className: classNames([props.className, styles$c.subtitle]),
3224
3223
  height: 0.5,
3225
3224
  lines: 6
3226
3225
  }));
@@ -3229,7 +3228,7 @@ var Quote = function Quote(props) {
3229
3228
  /* eslint-disable react/jsx-props-no-spreading, react/destructuring-assignment, react/prop-types */
3230
3229
  var ShortText = function ShortText(props) {
3231
3230
  return /*#__PURE__*/React.createElement(PlaceholderText, Object.assign({}, props, {
3232
- className: classNames([props.className, styles$b.shortText]),
3231
+ className: classNames([props.className, styles$c.shortText]),
3233
3232
  height: 0.2,
3234
3233
  lines: 2
3235
3234
  }));
@@ -3238,7 +3237,7 @@ var ShortText = function ShortText(props) {
3238
3237
  /* eslint-disable react/jsx-props-no-spreading, react/destructuring-assignment, react/prop-types */
3239
3238
  var Subtitle = function Subtitle(props) {
3240
3239
  return /*#__PURE__*/React.createElement(PlaceholderText, Object.assign({}, props, {
3241
- className: classNames([props.className, styles$b.subtitle]),
3240
+ className: classNames([props.className, styles$c.subtitle]),
3242
3241
  height: 0.3,
3243
3242
  lines: 1
3244
3243
  }));
@@ -3257,21 +3256,21 @@ var TextPlaceholder = function TextPlaceholder(props) {
3257
3256
  height: height,
3258
3257
  lines: lines,
3259
3258
  lineMargin: lineMargin,
3260
- className: classNames([props.className, styles$b.text])
3259
+ className: classNames([props.className, styles$c.text])
3261
3260
  }));
3262
3261
  };
3263
3262
 
3264
3263
  /* eslint-disable react/jsx-props-no-spreading, react/destructuring-assignment, react/prop-types */
3265
3264
  var Timeline = function Timeline(props) {
3266
3265
  return /*#__PURE__*/React.createElement(PlaceholderText, Object.assign({}, props, {
3267
- className: classNames([props.className, styles$b.timeline])
3266
+ className: classNames([props.className, styles$c.timeline])
3268
3267
  }));
3269
3268
  };
3270
3269
 
3271
3270
  /* eslint-disable react/jsx-props-no-spreading, react/destructuring-assignment, react/prop-types */
3272
3271
  var Title = function Title(props) {
3273
3272
  return /*#__PURE__*/React.createElement(PlaceholderText, Object.assign({}, props, {
3274
- className: classNames([props.className, styles$b.title]),
3273
+ className: classNames([props.className, styles$c.title]),
3275
3274
  height: 0.5,
3276
3275
  lines: 2,
3277
3276
  lineMargin: 4
@@ -3289,11 +3288,11 @@ var Video = function Video(_ref) {
3289
3288
  className: className
3290
3289
  }, /*#__PURE__*/React.createElement(FontAwesomeIcon, {
3291
3290
  icon: faVideo,
3292
- className: styles$b.icon
3291
+ className: styles$c.icon
3293
3292
  }));
3294
3293
  };
3295
3294
 
3296
- var styles$8 = {"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"};
3295
+ 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
3296
 
3298
3297
  var Video360 = function Video360(_ref) {
3299
3298
  var width = _ref.width,
@@ -3302,13 +3301,13 @@ var Video360 = function Video360(_ref) {
3302
3301
  return /*#__PURE__*/React.createElement(PlaceholderBlock, {
3303
3302
  width: width,
3304
3303
  height: height,
3305
- className: classNames([styles$8.container, _defineProperty({}, className, className !== null)]),
3306
- boxClassName: styles$8.box
3304
+ className: classNames([styles$9.container, _defineProperty({}, className, className !== null)]),
3305
+ boxClassName: styles$9.box
3307
3306
  }, /*#__PURE__*/React.createElement(FontAwesomeIcon, {
3308
3307
  icon: faVideo,
3309
- className: styles$8.icon
3308
+ className: styles$9.icon
3310
3309
  }), /*#__PURE__*/React.createElement("div", {
3311
- className: styles$8.label
3310
+ className: styles$9.label
3312
3311
  }, "360"));
3313
3312
  };
3314
3313
 
@@ -3323,13 +3322,133 @@ var VideoLoop = function VideoLoop(_ref) {
3323
3322
  className: className
3324
3323
  }, /*#__PURE__*/React.createElement(FontAwesomeIcon, {
3325
3324
  icon: faPlay,
3326
- className: styles$b.icon
3325
+ className: styles$c.icon
3327
3326
  }), /*#__PURE__*/React.createElement(FontAwesomeIcon, {
3328
3327
  icon: faRedo,
3329
- className: styles$b.icon
3328
+ className: styles$c.icon
3330
3329
  }));
3331
3330
  };
3332
3331
 
3332
+ var styles$8 = {"container":"micromag-core-screens-screen-sizer-container","frame":"micromag-core-screens-screen-sizer-frame","screen":"micromag-core-screens-screen-sizer-screen"};
3333
+
3334
+ var propTypes$a = {
3335
+ width: PropTypes$1.number,
3336
+ height: PropTypes$1.number,
3337
+ fit: PropTypes$1.oneOf([null, 'cover', 'contain']),
3338
+ screenWidth: PropTypes$1.number,
3339
+ screenHeight: PropTypes$1.number,
3340
+ className: PropTypes$1.string,
3341
+ children: PropTypes$1.node.isRequired
3342
+ };
3343
+ var defaultProps$a = {
3344
+ width: null,
3345
+ height: null,
3346
+ fit: null,
3347
+ screenWidth: 320,
3348
+ screenHeight: 480,
3349
+ className: null
3350
+ };
3351
+
3352
+ var ScreenSizer = function ScreenSizer(_ref) {
3353
+ var width = _ref.width,
3354
+ height = _ref.height,
3355
+ fit = _ref.fit,
3356
+ screenWidth = _ref.screenWidth,
3357
+ screenHeight = _ref.screenHeight,
3358
+ className = _ref.className,
3359
+ children = _ref.children;
3360
+ var hasSize = width !== null || height !== null;
3361
+
3362
+ var _useResizeObserver = useResizeObserver(),
3363
+ refContainer = _useResizeObserver.ref,
3364
+ contentRect = _useResizeObserver.entry.contentRect;
3365
+
3366
+ var _ref2 = contentRect || {},
3367
+ _ref2$width = _ref2.width,
3368
+ calculatedWidth = _ref2$width === void 0 ? 0 : _ref2$width,
3369
+ _ref2$height = _ref2.height,
3370
+ calculatedHeight = _ref2$height === void 0 ? 0 : _ref2$height;
3371
+
3372
+ var _useMemo = useMemo(function () {
3373
+ var containerWidth = width || calculatedWidth || null;
3374
+ var containerHeight = height || calculatedHeight || null;
3375
+
3376
+ if (containerWidth === null && containerHeight === null) {
3377
+ return {};
3378
+ }
3379
+
3380
+ var screenRatio = screenWidth / screenHeight;
3381
+ var finalContainerWidth = hasSize ? width || containerHeight * screenRatio : containerWidth;
3382
+ var finalContainerHeight = hasSize ? height || containerWidth / screenRatio : containerWidth / screenRatio;
3383
+
3384
+ if (fit === null) {
3385
+ var _screenScale = finalContainerWidth / screenWidth;
3386
+
3387
+ return {
3388
+ width: finalContainerWidth,
3389
+ height: finalContainerHeight,
3390
+ transform: "scale(".concat(_screenScale, ")")
3391
+ };
3392
+ }
3393
+
3394
+ var _getSizeWithinBounds = getSizeWithinBounds(screenWidth, screenHeight, finalContainerWidth, finalContainerHeight, {
3395
+ cover: fit === 'cover'
3396
+ }),
3397
+ screenScaledWidth = _getSizeWithinBounds.width,
3398
+ screenScaledHeight = _getSizeWithinBounds.height,
3399
+ screenScale = _getSizeWithinBounds.scale;
3400
+
3401
+ var x = (finalContainerWidth - screenScaledWidth) / 2;
3402
+ var y = (finalContainerHeight - screenScaledHeight) / 2;
3403
+ return {
3404
+ width: finalContainerWidth,
3405
+ height: finalContainerHeight,
3406
+ transform: "scale(".concat(screenScale, ") translate(").concat(x, "px, ").concat(y, "px)")
3407
+ };
3408
+ }, [screenWidth, screenHeight, width, height, fit, calculatedWidth, calculatedHeight, hasSize]),
3409
+ _useMemo$width = _useMemo.width,
3410
+ frameWidth = _useMemo$width === void 0 ? null : _useMemo$width,
3411
+ _useMemo$height = _useMemo.height,
3412
+ frameHeight = _useMemo$height === void 0 ? null : _useMemo$height,
3413
+ _useMemo$transform = _useMemo.transform,
3414
+ screenTransform = _useMemo$transform === void 0 ? null : _useMemo$transform;
3415
+
3416
+ var screenSize = useMemo(function () {
3417
+ return {
3418
+ screen: 'mobile',
3419
+ screens: ['mobile'],
3420
+ width: screenWidth,
3421
+ height: screenHeight
3422
+ };
3423
+ }, [screenWidth, screenHeight]);
3424
+ var hasFrameSize = frameWidth !== null && frameHeight !== null;
3425
+ return /*#__PURE__*/React.createElement("div", {
3426
+ styles: classNames([styles$8.container, _defineProperty({}, className, className !== null)]),
3427
+ ref: !hasSize ? refContainer : null
3428
+ }, hasFrameSize ? /*#__PURE__*/React.createElement("div", {
3429
+ className: styles$8.frame,
3430
+ style: {
3431
+ width: frameWidth,
3432
+ height: frameHeight
3433
+ }
3434
+ }, /*#__PURE__*/React.createElement("div", {
3435
+ className: styles$8.screen,
3436
+ style: {
3437
+ width: screenWidth,
3438
+ height: screenHeight,
3439
+ transform: screenTransform
3440
+ }
3441
+ }, /*#__PURE__*/React.createElement(ScreenSizeProvider, {
3442
+ size: screenSize
3443
+ }, /*#__PURE__*/React.cloneElement(children, {
3444
+ width: screenWidth,
3445
+ height: screenHeight
3446
+ })))) : null);
3447
+ };
3448
+
3449
+ ScreenSizer.propTypes = propTypes$a;
3450
+ ScreenSizer.defaultProps = defaultProps$a;
3451
+
3333
3452
  var styles$7 = {"container":"micromag-core-screens-screen-container"};
3334
3453
 
3335
3454
  var propTypes$9 = {
@@ -3403,70 +3522,76 @@ Screen.propTypes = propTypes$9;
3403
3522
  Screen.defaultProps = defaultProps$9;
3404
3523
  var Screen$1 = /*#__PURE__*/React.memo(Screen);
3405
3524
 
3406
- var styles$6 = {"container":"micromag-core-screens-screen-placeholder-container"};
3525
+ var styles$6 = {"screen":"micromag-core-screens-screen-placeholder-screen"};
3407
3526
 
3527
+ var _excluded$1 = ["screen", "layout", "screenWidth", "screenHeight", "screenState", "withSize", "className"];
3408
3528
  var propTypes$8 = {
3409
3529
  screen: PropTypes.component.isRequired,
3410
3530
  layout: PropTypes$1.string,
3531
+ screenWidth: PropTypes$1.number,
3532
+ screenHeight: PropTypes$1.number,
3411
3533
  screenState: PropTypes$1.string,
3412
- width: PropTypes$1.number,
3413
- height: PropTypes$1.number,
3534
+ withSize: PropTypes$1.bool,
3414
3535
  className: PropTypes$1.string
3415
3536
  };
3416
3537
  var defaultProps$8 = {
3417
3538
  layout: undefined,
3418
3539
  screenState: null,
3419
- width: null,
3420
- height: null,
3540
+ screenWidth: 100,
3541
+ screenHeight: 150,
3542
+ withSize: false,
3421
3543
  className: null
3422
3544
  };
3423
3545
 
3424
3546
  var ScreenPlaceholder = function ScreenPlaceholder(_ref) {
3425
3547
  var screen = _ref.screen,
3426
3548
  layout = _ref.layout,
3427
- width = _ref.width,
3428
- height = _ref.height,
3549
+ screenWidth = _ref.screenWidth,
3550
+ screenHeight = _ref.screenHeight,
3429
3551
  screenState = _ref.screenState,
3430
- className = _ref.className;
3431
- var screenSize = useMemo(function () {
3432
- return {
3433
- screen: 'mobile',
3434
- screens: ['mobile'],
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, {
3552
+ withSize = _ref.withSize,
3553
+ className = _ref.className,
3554
+ props = _objectWithoutProperties(_ref, _excluded$1);
3555
+
3556
+ var screenElement = /*#__PURE__*/React.createElement(Screen$1, Object.assign({
3446
3557
  screen: screen,
3558
+ renderContext: "placeholder",
3559
+ screenState: screenState,
3447
3560
  layout: layout,
3448
- className: classNames([styles$6.container, _defineProperty({}, className, className !== null)])
3449
- })));
3561
+ className: classNames([styles$6.screen, _defineProperty({}, className, !withSize)])
3562
+ }, props));
3563
+ return withSize ? /*#__PURE__*/React.createElement(ScreenSizer, {
3564
+ className: className,
3565
+ screenWidth: screenWidth,
3566
+ screenHeight: screenHeight
3567
+ }, screenElement) : screenElement;
3450
3568
  };
3451
3569
 
3452
3570
  ScreenPlaceholder.propTypes = propTypes$8;
3453
3571
  ScreenPlaceholder.defaultProps = defaultProps$8;
3454
3572
  var Placeholder = /*#__PURE__*/React.memo(ScreenPlaceholder);
3455
3573
 
3456
- var styles$5 = {"container":"micromag-core-screens-preview-container"};
3574
+ var styles$5 = {"screen":"micromag-core-screens-preview-screen"};
3457
3575
 
3576
+ var _excluded = ["screen", "screenState", "width", "height", "screenWidth", "screenHeight", "className", "withSize"];
3458
3577
  var propTypes$7 = {
3459
3578
  screen: PropTypes.component.isRequired,
3460
3579
  screenState: PropTypes$1.string,
3461
3580
  width: PropTypes$1.number,
3462
3581
  height: PropTypes$1.number,
3463
- className: PropTypes$1.string
3582
+ screenWidth: PropTypes$1.number,
3583
+ screenHeight: PropTypes$1.number,
3584
+ className: PropTypes$1.string,
3585
+ withSize: PropTypes$1.bool
3464
3586
  };
3465
3587
  var defaultProps$7 = {
3466
3588
  screenState: null,
3467
- width: null,
3468
- height: null,
3469
- className: null
3589
+ width: undefined,
3590
+ height: undefined,
3591
+ screenWidth: undefined,
3592
+ screenHeight: undefined,
3593
+ className: null,
3594
+ withSize: false
3470
3595
  };
3471
3596
 
3472
3597
  var ScreenPreview = function ScreenPreview(_ref) {
@@ -3474,26 +3599,27 @@ var ScreenPreview = function ScreenPreview(_ref) {
3474
3599
  screenState = _ref.screenState,
3475
3600
  width = _ref.width,
3476
3601
  height = _ref.height,
3477
- className = _ref.className;
3478
- var screenSize = useMemo(function () {
3479
- return {
3480
- screen: 'mobile',
3481
- screens: ['mobile'],
3482
- width: width,
3483
- height: height
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, {
3602
+ screenWidth = _ref.screenWidth,
3603
+ screenHeight = _ref.screenHeight,
3604
+ className = _ref.className,
3605
+ withSize = _ref.withSize,
3606
+ props = _objectWithoutProperties(_ref, _excluded);
3607
+
3608
+ var screenElement = /*#__PURE__*/React.createElement(Screen$1, Object.assign({
3493
3609
  screen: screen,
3494
3610
  renderContext: "preview",
3495
- className: classNames([styles$5.container, _defineProperty({}, className, className !== null)])
3496
- })));
3611
+ screenState: screenState,
3612
+ width: !withSize ? width : undefined,
3613
+ height: !withSize ? height : undefined,
3614
+ className: classNames([styles$5.screen, _defineProperty({}, className, !withSize)])
3615
+ }, props));
3616
+ return withSize ? /*#__PURE__*/React.createElement(ScreenSizer, {
3617
+ className: className,
3618
+ screenWidth: screenWidth,
3619
+ screenHeight: screenHeight,
3620
+ width: width,
3621
+ height: height
3622
+ }, screenElement) : screenElement;
3497
3623
  };
3498
3624
 
3499
3625
  ScreenPreview.propTypes = propTypes$7;
@@ -4039,4 +4165,4 @@ var LinkStyle = function LinkStyle(_ref) {
4039
4165
  LinkStyle.propTypes = propTypes;
4040
4166
  LinkStyle.defaultProps = defaultProps;
4041
4167
 
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 };
4168
+ 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 };