@micromag/core 0.3.516 → 0.3.518

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/lib/components.js CHANGED
@@ -23,8 +23,6 @@ var get = require('lodash/get');
23
23
  var _createForOfIteratorHelper = require('@babel/runtime/helpers/createForOfIteratorHelper');
24
24
  var _typeof = require('@babel/runtime/helpers/typeof');
25
25
  var ReactDOM = require('react-dom');
26
- var isArray = require('lodash/isArray');
27
- var uppy = require('@panneau/uppy');
28
26
  var faAngleDown = require('@fortawesome/free-solid-svg-icons/faAngleDown');
29
27
  var faAngleUp = require('@fortawesome/free-solid-svg-icons/faAngleUp');
30
28
  var dayjs = require('dayjs');
@@ -32,6 +30,7 @@ var throttle = require('lodash/throttle');
32
30
  var isObject = require('lodash/isObject');
33
31
  var reactHelmet = require('react-helmet');
34
32
  var isString = require('lodash/isString');
33
+ var isArray = require('lodash/isArray');
35
34
  var faAd = require('@fortawesome/free-solid-svg-icons/faAd');
36
35
  var faImage = require('@fortawesome/free-solid-svg-icons/faImage');
37
36
  var faMusic = require('@fortawesome/free-solid-svg-icons/faMusic');
@@ -327,12 +326,12 @@ var Link$2 = React.forwardRef(function (props, ref) {
327
326
  });
328
327
 
329
328
  /* eslint-disable react/jsx-props-no-spreading */
330
- var propTypes$T = {
329
+ var propTypes$S = {
331
330
  children: core.PropTypes.label.isRequired,
332
331
  isHtml: PropTypes.bool,
333
332
  values: PropTypes.object // eslint-disable-line react/forbid-prop-types
334
333
  };
335
- var defaultProps$T = {
334
+ var defaultProps$S = {
336
335
  isHtml: false,
337
336
  values: {}
338
337
  };
@@ -345,14 +344,14 @@ var Label = function Label(_ref) {
345
344
  values: values
346
345
  }, children)) : children;
347
346
  };
348
- Label.propTypes = propTypes$T;
349
- Label.defaultProps = defaultProps$T;
347
+ Label.propTypes = propTypes$S;
348
+ Label.defaultProps = defaultProps$S;
350
349
  var Label$1 = Label;
351
350
 
352
351
  var styles$x = {"container":"micromag-core-buttons-button-container","asLink":"micromag-core-buttons-button-asLink","withoutStyle":"micromag-core-buttons-button-withoutStyle","icon":"micromag-core-buttons-button-icon","label":"micromag-core-buttons-button-label","withIcon":"micromag-core-buttons-button-withIcon","right":"micromag-core-buttons-button-right","withAnimations":"micromag-core-buttons-button-withAnimations","icon-right":"micromag-core-buttons-button-icon-right","withIconColumns":"micromag-core-buttons-button-withIconColumns","linkDisabled":"micromag-core-buttons-button-linkDisabled"};
353
352
 
354
353
  var _excluded$b = ["type", "theme", "size", "href", "external", "direct", "target", "label", "children", "focusable", "active", "icon", "iconPosition", "disabled", "loading", "disableOnLoading", "small", "big", "withShadow", "withoutStyle", "withoutBootstrapStyles", "withoutTheme", "asLink", "outline", "onClick", "className", "iconClassName", "labelClassName", "refButton"];
355
- var propTypes$S = {
354
+ var propTypes$R = {
356
355
  type: PropTypes.string,
357
356
  theme: core.PropTypes.buttonTheme,
358
357
  size: core.PropTypes.buttonSize,
@@ -385,7 +384,7 @@ var propTypes$S = {
385
384
  current: PropTypes.any // eslint-disable-line
386
385
  })])
387
386
  };
388
- var defaultProps$S = {
387
+ var defaultProps$R = {
389
388
  type: 'button',
390
389
  theme: null,
391
390
  size: null,
@@ -497,14 +496,14 @@ var Button$2 = function Button(_ref) {
497
496
  tabIndex: focusable ? '0' : '-1'
498
497
  }), content);
499
498
  };
500
- Button$2.propTypes = propTypes$S;
501
- Button$2.defaultProps = defaultProps$S;
499
+ Button$2.propTypes = propTypes$R;
500
+ Button$2.defaultProps = defaultProps$R;
502
501
  var Button$3 = Button$2;
503
502
 
504
503
  var styles$w = {};
505
504
 
506
505
  var _excluded$a = ["className", "onClick", "theme"];
507
- var propTypes$R = {
506
+ var propTypes$Q = {
508
507
  buttons: core.PropTypes.buttons,
509
508
  size: core.PropTypes.buttonSize,
510
509
  theme: core.PropTypes.buttonTheme,
@@ -513,7 +512,7 @@ var propTypes$R = {
513
512
  className: PropTypes.string,
514
513
  buttonClassName: PropTypes.string
515
514
  };
516
- var defaultProps$R = {
515
+ var defaultProps$Q = {
517
516
  buttons: [],
518
517
  size: null,
519
518
  theme: undefined,
@@ -557,15 +556,15 @@ var Buttons = function Buttons(_ref) {
557
556
  return renderButton !== null ? renderButton(button, index, fixedProps) : /*#__PURE__*/React.createElement(Button$3, Object.assign({}, fixedProps, buttonProps));
558
557
  }));
559
558
  };
560
- Buttons.propTypes = propTypes$R;
561
- Buttons.defaultProps = defaultProps$R;
559
+ Buttons.propTypes = propTypes$Q;
560
+ Buttons.defaultProps = defaultProps$Q;
562
561
  var Buttons$1 = Buttons;
563
562
 
564
563
  var _excluded$9 = ["className"];
565
- var propTypes$Q = {
564
+ var propTypes$P = {
566
565
  className: PropTypes.string
567
566
  };
568
- var defaultProps$Q = {
567
+ var defaultProps$P = {
569
568
  className: null
570
569
  };
571
570
  var BackButton = function BackButton(_ref) {
@@ -580,13 +579,13 @@ var BackButton = function BackButton(_ref) {
580
579
  })
581
580
  }, props));
582
581
  };
583
- BackButton.propTypes = propTypes$Q;
584
- BackButton.defaultProps = defaultProps$Q;
582
+ BackButton.propTypes = propTypes$P;
583
+ BackButton.defaultProps = defaultProps$P;
585
584
  var BackButton$1 = BackButton;
586
585
 
587
586
  var _excluded$8 = ["type"],
588
587
  _excluded2 = ["component", "id", "settings"];
589
- var propTypes$P = {
588
+ var propTypes$O = {
590
589
  name: PropTypes.string,
591
590
  // .isRequired,
592
591
  value: core.PropTypes.component,
@@ -599,7 +598,7 @@ var propTypes$P = {
599
598
  closeFieldForm: PropTypes.func.isRequired,
600
599
  fieldContext: PropTypes.any // eslint-disable-line react/forbid-prop-types
601
600
  };
602
- var defaultProps$P = {
601
+ var defaultProps$O = {
603
602
  name: null,
604
603
  form: null,
605
604
  formComponents: {},
@@ -676,13 +675,13 @@ var FieldForm = function FieldForm(_ref) {
676
675
  isForm: true
677
676
  }, formProps))) : null;
678
677
  };
679
- FieldForm.propTypes = propTypes$P;
680
- FieldForm.defaultProps = defaultProps$P;
678
+ FieldForm.propTypes = propTypes$O;
679
+ FieldForm.defaultProps = defaultProps$O;
681
680
  var FieldForm$1 = FieldForm;
682
681
 
683
682
  var styles$v = {"actions":"micromag-core-forms-form-actions","left":"micromag-core-forms-form-left","right":"micromag-core-forms-form-right"};
684
683
 
685
- var propTypes$O = {
684
+ var propTypes$N = {
686
685
  action: PropTypes.string.isRequired,
687
686
  method: PropTypes.string,
688
687
  fields: core.PropTypes.formFields,
@@ -711,7 +710,7 @@ var propTypes$O = {
711
710
  actionsClassName: PropTypes.string,
712
711
  cancelClassName: PropTypes.string
713
712
  };
714
- var defaultProps$O = {
713
+ var defaultProps$N = {
715
714
  method: 'POST',
716
715
  fields: [],
717
716
  initialValue: null,
@@ -914,14 +913,14 @@ var Form = function Form(_ref) {
914
913
  }]
915
914
  })) : null) : null);
916
915
  };
917
- Form.propTypes = propTypes$O;
918
- Form.defaultProps = defaultProps$O;
916
+ Form.propTypes = propTypes$N;
917
+ Form.defaultProps = defaultProps$N;
919
918
  var Form$1 = Form;
920
919
 
921
920
  var styles$u = {"withoutStyle":"micromag-core-partials-link-withoutStyle"};
922
921
 
923
922
  var _excluded$7 = ["href", "external", "children", "target", "rel", "className", "withoutStyle"];
924
- var propTypes$N = {
923
+ var propTypes$M = {
925
924
  href: PropTypes.string,
926
925
  external: PropTypes.bool,
927
926
  target: PropTypes.string,
@@ -930,7 +929,7 @@ var propTypes$N = {
930
929
  withoutStyle: PropTypes.bool,
931
930
  className: PropTypes.string
932
931
  };
933
- var defaultProps$N = {
932
+ var defaultProps$M = {
934
933
  href: '',
935
934
  external: false,
936
935
  target: '_blank',
@@ -958,12 +957,12 @@ var Link = function Link(_ref) {
958
957
  href: href
959
958
  }, props), /*#__PURE__*/React.createElement(Label$1, null, children));
960
959
  };
961
- Link.propTypes = propTypes$N;
962
- Link.defaultProps = defaultProps$N;
960
+ Link.propTypes = propTypes$M;
961
+ Link.defaultProps = defaultProps$M;
963
962
  var Link$1 = Link;
964
963
 
965
964
  var _excluded$6 = ["label", "className"];
966
- var propTypes$M = {
965
+ var propTypes$L = {
967
966
  href: PropTypes.string,
968
967
  header: PropTypes.node,
969
968
  image: PropTypes.node,
@@ -992,7 +991,7 @@ var propTypes$M = {
992
991
  onClickBody: PropTypes.func,
993
992
  onClickFooter: PropTypes.func
994
993
  };
995
- var defaultProps$M = {
994
+ var defaultProps$L = {
996
995
  href: null,
997
996
  header: null,
998
997
  image: null,
@@ -1105,19 +1104,19 @@ var Card = function Card(_ref) {
1105
1104
  className: cardClassName
1106
1105
  }, cardInner);
1107
1106
  };
1108
- Card.propTypes = propTypes$M;
1109
- Card.defaultProps = defaultProps$M;
1107
+ Card.propTypes = propTypes$L;
1108
+ Card.defaultProps = defaultProps$L;
1110
1109
  var Card$1 = Card;
1111
1110
 
1112
1111
  var styles$t = {"container":"micromag-core-partials-spinner-container","path":"micromag-core-partials-spinner-path","animated":"micromag-core-partials-spinner-animated","rotate":"micromag-core-partials-spinner-rotate","dash":"micromag-core-partials-spinner-dash"};
1113
1112
 
1114
- var propTypes$L = {
1113
+ var propTypes$K = {
1115
1114
  animated: PropTypes.bool,
1116
1115
  color: PropTypes.string,
1117
1116
  strokeWidth: PropTypes.number,
1118
1117
  className: PropTypes.string
1119
1118
  };
1120
- var defaultProps$L = {
1119
+ var defaultProps$K = {
1121
1120
  animated: true,
1122
1121
  color: 'currentColor',
1123
1122
  strokeWidth: 3,
@@ -1144,20 +1143,20 @@ var Spinner = function Spinner(_ref) {
1144
1143
  strokeWidth: strokeWidth
1145
1144
  }));
1146
1145
  };
1147
- Spinner.propTypes = propTypes$L;
1148
- Spinner.defaultProps = defaultProps$L;
1146
+ Spinner.propTypes = propTypes$K;
1147
+ Spinner.defaultProps = defaultProps$K;
1149
1148
  var Spinner$1 = Spinner;
1150
1149
 
1151
1150
  var styles$s = {};
1152
1151
 
1153
1152
  var _excluded$5 = ["description", "loading", "children", "className"];
1154
- var propTypes$K = {
1153
+ var propTypes$J = {
1155
1154
  description: PropTypes.node,
1156
1155
  loading: PropTypes.bool,
1157
1156
  children: PropTypes.node,
1158
1157
  className: PropTypes.string
1159
1158
  };
1160
- var defaultProps$K = {
1159
+ var defaultProps$J = {
1161
1160
  description: null,
1162
1161
  loading: false,
1163
1162
  children: null,
@@ -1173,15 +1172,15 @@ var FormPanel = function FormPanel(_ref) {
1173
1172
  className: classNames([styles$s.container, _defineProperty({}, className, className !== null)])
1174
1173
  }, props), description, loading ? /*#__PURE__*/React.createElement(Spinner$1, null) : children);
1175
1174
  };
1176
- FormPanel.propTypes = propTypes$K;
1177
- FormPanel.defaultProps = defaultProps$K;
1175
+ FormPanel.propTypes = propTypes$J;
1176
+ FormPanel.defaultProps = defaultProps$J;
1178
1177
  var FormPanel$1 = FormPanel;
1179
1178
 
1180
- var propTypes$J = {
1179
+ var propTypes$I = {
1181
1180
  className: PropTypes.string,
1182
1181
  color: PropTypes.string
1183
1182
  };
1184
- var defaultProps$J = {
1183
+ var defaultProps$I = {
1185
1184
  className: null,
1186
1185
  color: '#fff'
1187
1186
  };
@@ -1202,15 +1201,15 @@ var ArrowIcon = function ArrowIcon(_ref) {
1202
1201
  fill: color
1203
1202
  }));
1204
1203
  };
1205
- ArrowIcon.propTypes = propTypes$J;
1206
- ArrowIcon.defaultProps = defaultProps$J;
1204
+ ArrowIcon.propTypes = propTypes$I;
1205
+ ArrowIcon.defaultProps = defaultProps$I;
1207
1206
  var ArrowIcon$1 = ArrowIcon;
1208
1207
 
1209
- var propTypes$I = {
1208
+ var propTypes$H = {
1210
1209
  className: PropTypes.string,
1211
1210
  color: PropTypes.string
1212
1211
  };
1213
- var defaultProps$I = {
1212
+ var defaultProps$H = {
1214
1213
  className: null,
1215
1214
  color: '#fff'
1216
1215
  };
@@ -1236,15 +1235,15 @@ var CloseIcon = function CloseIcon(_ref) {
1236
1235
  strokeLinecap: "round"
1237
1236
  }));
1238
1237
  };
1239
- CloseIcon.propTypes = propTypes$I;
1240
- CloseIcon.defaultProps = defaultProps$I;
1238
+ CloseIcon.propTypes = propTypes$H;
1239
+ CloseIcon.defaultProps = defaultProps$H;
1241
1240
  var CloseIcon$1 = CloseIcon;
1242
1241
 
1243
- var propTypes$H = {
1242
+ var propTypes$G = {
1244
1243
  className: PropTypes.string,
1245
1244
  color: PropTypes.string
1246
1245
  };
1247
- var defaultProps$H = {
1246
+ var defaultProps$G = {
1248
1247
  className: null,
1249
1248
  color: '#fff'
1250
1249
  };
@@ -1263,15 +1262,15 @@ var FullscreenIcon = function FullscreenIcon(_ref) {
1263
1262
  fill: color
1264
1263
  }));
1265
1264
  };
1266
- FullscreenIcon.propTypes = propTypes$H;
1267
- FullscreenIcon.defaultProps = defaultProps$H;
1265
+ FullscreenIcon.propTypes = propTypes$G;
1266
+ FullscreenIcon.defaultProps = defaultProps$G;
1268
1267
  var FullscreenIcon$1 = FullscreenIcon;
1269
1268
 
1270
- var propTypes$G = {
1269
+ var propTypes$F = {
1271
1270
  className: PropTypes.string,
1272
1271
  color: PropTypes.string
1273
1272
  };
1274
- var defaultProps$G = {
1273
+ var defaultProps$F = {
1275
1274
  className: null,
1276
1275
  color: '#fff'
1277
1276
  };
@@ -1299,15 +1298,15 @@ var LinkIcon = function LinkIcon(_ref) {
1299
1298
  strokeLinejoin: "round"
1300
1299
  }));
1301
1300
  };
1302
- LinkIcon.propTypes = propTypes$G;
1303
- LinkIcon.defaultProps = defaultProps$G;
1301
+ LinkIcon.propTypes = propTypes$F;
1302
+ LinkIcon.defaultProps = defaultProps$F;
1304
1303
  var LinkIcon$1 = LinkIcon;
1305
1304
 
1306
- var propTypes$F = {
1305
+ var propTypes$E = {
1307
1306
  className: PropTypes.string,
1308
1307
  color: PropTypes.string
1309
1308
  };
1310
- var defaultProps$F = {
1309
+ var defaultProps$E = {
1311
1310
  className: null,
1312
1311
  color: '#fff'
1313
1312
  };
@@ -1332,15 +1331,15 @@ var MuteIcon = function MuteIcon(_ref) {
1332
1331
  stroke: color
1333
1332
  }));
1334
1333
  };
1335
- MuteIcon.propTypes = propTypes$F;
1336
- MuteIcon.defaultProps = defaultProps$F;
1334
+ MuteIcon.propTypes = propTypes$E;
1335
+ MuteIcon.defaultProps = defaultProps$E;
1337
1336
  var MuteIcon$1 = MuteIcon;
1338
1337
 
1339
- var propTypes$E = {
1338
+ var propTypes$D = {
1340
1339
  className: PropTypes.string,
1341
1340
  color: PropTypes.string
1342
1341
  };
1343
- var defaultProps$E = {
1342
+ var defaultProps$D = {
1344
1343
  className: null,
1345
1344
  color: '#fff'
1346
1345
  };
@@ -1367,15 +1366,15 @@ var PauseIcon = function PauseIcon(_ref) {
1367
1366
  fill: color
1368
1367
  }));
1369
1368
  };
1370
- PauseIcon.propTypes = propTypes$E;
1371
- PauseIcon.defaultProps = defaultProps$E;
1369
+ PauseIcon.propTypes = propTypes$D;
1370
+ PauseIcon.defaultProps = defaultProps$D;
1372
1371
  var PauseIcon$1 = PauseIcon;
1373
1372
 
1374
- var propTypes$D = {
1373
+ var propTypes$C = {
1375
1374
  className: PropTypes.string,
1376
1375
  color: PropTypes.string
1377
1376
  };
1378
- var defaultProps$D = {
1377
+ var defaultProps$C = {
1379
1378
  className: null,
1380
1379
  color: '#fff'
1381
1380
  };
@@ -1395,15 +1394,15 @@ var PlayIcon = function PlayIcon(_ref) {
1395
1394
  stroke: color
1396
1395
  }));
1397
1396
  };
1398
- PlayIcon.propTypes = propTypes$D;
1399
- PlayIcon.defaultProps = defaultProps$D;
1397
+ PlayIcon.propTypes = propTypes$C;
1398
+ PlayIcon.defaultProps = defaultProps$C;
1400
1399
  var PlayIcon$1 = PlayIcon;
1401
1400
 
1402
- var propTypes$C = {
1401
+ var propTypes$B = {
1403
1402
  className: PropTypes.string,
1404
1403
  color: PropTypes.string
1405
1404
  };
1406
- var defaultProps$C = {
1405
+ var defaultProps$B = {
1407
1406
  className: null,
1408
1407
  color: '#fff'
1409
1408
  };
@@ -1427,13 +1426,13 @@ var UnmuteIcon = function UnmuteIcon(_ref) {
1427
1426
  fill: color
1428
1427
  }));
1429
1428
  };
1430
- UnmuteIcon.propTypes = propTypes$C;
1431
- UnmuteIcon.defaultProps = defaultProps$C;
1429
+ UnmuteIcon.propTypes = propTypes$B;
1430
+ UnmuteIcon.defaultProps = defaultProps$B;
1432
1431
  var UnmuteIcon$1 = UnmuteIcon;
1433
1432
 
1434
1433
  var styles$r = {"container":"micromag-core-menus-breadcrumb-container","arrow":"micromag-core-menus-breadcrumb-arrow"};
1435
1434
 
1436
- var propTypes$B = {
1435
+ var propTypes$A = {
1437
1436
  items: core.PropTypes.menuItems,
1438
1437
  theme: core.PropTypes.bootstrapThemes,
1439
1438
  separator: PropTypes.oneOf([null, 'arrow']),
@@ -1441,7 +1440,7 @@ var propTypes$B = {
1441
1440
  noWrap: PropTypes.bool,
1442
1441
  className: PropTypes.string
1443
1442
  };
1444
- var defaultProps$B = {
1443
+ var defaultProps$A = {
1445
1444
  items: [],
1446
1445
  theme: null,
1447
1446
  separator: null,
@@ -1487,12 +1486,12 @@ var Breadcrumb = function Breadcrumb(_ref) {
1487
1486
  }, /*#__PURE__*/React.createElement(Label$1, null, label)) : null);
1488
1487
  })));
1489
1488
  };
1490
- Breadcrumb.propTypes = propTypes$B;
1491
- Breadcrumb.defaultProps = defaultProps$B;
1489
+ Breadcrumb.propTypes = propTypes$A;
1490
+ Breadcrumb.defaultProps = defaultProps$A;
1492
1491
  var Breadcrumb$1 = Breadcrumb;
1493
1492
 
1494
1493
  var _excluded$4 = ["type", "className", "label", "children", "onClick", "active"];
1495
- var propTypes$A = {
1494
+ var propTypes$z = {
1496
1495
  items: core.PropTypes.menuItems,
1497
1496
  children: PropTypes.node,
1498
1497
  visible: PropTypes.bool,
@@ -1502,7 +1501,7 @@ var propTypes$A = {
1502
1501
  onClickItem: PropTypes.func,
1503
1502
  onClickOutside: PropTypes.func
1504
1503
  };
1505
- var defaultProps$A = {
1504
+ var defaultProps$z = {
1506
1505
  items: [],
1507
1506
  children: null,
1508
1507
  visible: false,
@@ -1590,12 +1589,12 @@ var Dropdown = function Dropdown(_ref) {
1590
1589
  }, itemProps), label !== null ? /*#__PURE__*/React.createElement(Label$1, null, label) : itemChildren)) : null;
1591
1590
  }));
1592
1591
  };
1593
- Dropdown.propTypes = propTypes$A;
1594
- Dropdown.defaultProps = defaultProps$A;
1592
+ Dropdown.propTypes = propTypes$z;
1593
+ Dropdown.defaultProps = defaultProps$z;
1595
1594
  var Dropdown$1 = Dropdown;
1596
1595
 
1597
1596
  var _excluded$3 = ["id", "className", "linkClassName", "href", "label", "external", "items", "dropdown", "active", "onClick"];
1598
- var propTypes$z = {
1597
+ var propTypes$y = {
1599
1598
  items: core.PropTypes.menuItems,
1600
1599
  tagName: PropTypes.string,
1601
1600
  itemTagName: PropTypes.string,
@@ -1614,7 +1613,7 @@ var propTypes$z = {
1614
1613
  dropdownLinkClassName: PropTypes.string,
1615
1614
  dropdownAlign: core.PropTypes.dropdownAlign
1616
1615
  };
1617
- var defaultProps$z = {
1616
+ var defaultProps$y = {
1618
1617
  items: [],
1619
1618
  tagName: 'ul',
1620
1619
  itemTagName: 'li',
@@ -1730,13 +1729,13 @@ var Menu = function Menu(_ref) {
1730
1729
  }) : null);
1731
1730
  }));
1732
1731
  };
1733
- Menu.propTypes = propTypes$z;
1734
- Menu.defaultProps = defaultProps$z;
1732
+ Menu.propTypes = propTypes$y;
1733
+ Menu.defaultProps = defaultProps$y;
1735
1734
  var Menu$1 = Menu;
1736
1735
 
1737
1736
  var styles$q = {"collapse":"micromag-core-menus-navbar-collapse"};
1738
1737
 
1739
- var propTypes$y = {
1738
+ var propTypes$x = {
1740
1739
  brand: PropTypes.node,
1741
1740
  brandLink: PropTypes.string,
1742
1741
  breadcrumbs: PropTypes.node,
@@ -1752,7 +1751,7 @@ var propTypes$y = {
1752
1751
  breadCrumbsClassName: PropTypes.string,
1753
1752
  collapseClassName: PropTypes.string
1754
1753
  };
1755
- var defaultProps$y = {
1754
+ var defaultProps$x = {
1756
1755
  brand: null,
1757
1756
  brandLink: null,
1758
1757
  breadcrumbs: null,
@@ -1822,8 +1821,8 @@ var Navbar = function Navbar(_ref) {
1822
1821
  className: classNames(['navbar-collapse', 'collapse', styles$q.collapse, _defineProperty(_defineProperty({}, collapseClassName, collapseClassName !== null), "show", menuVisible)])
1823
1822
  }, children) : children));
1824
1823
  };
1825
- Navbar.propTypes = propTypes$y;
1826
- Navbar.defaultProps = defaultProps$y;
1824
+ Navbar.propTypes = propTypes$x;
1825
+ Navbar.defaultProps = defaultProps$x;
1827
1826
  var Navbar$1 = Navbar;
1828
1827
 
1829
1828
  var token = '%[a-f0-9]{2}';
@@ -2417,7 +2416,7 @@ var messages = reactIntl.defineMessages({
2417
2416
  }]
2418
2417
  }
2419
2418
  });
2420
- var propTypes$x = {
2419
+ var propTypes$w = {
2421
2420
  page: PropTypes.number,
2422
2421
  lastPage: PropTypes.number,
2423
2422
  maxPages: PropTypes.number,
@@ -2432,7 +2431,7 @@ var propTypes$x = {
2432
2431
  linkClassName: PropTypes.string,
2433
2432
  onClickPage: PropTypes.func
2434
2433
  };
2435
- var defaultProps$x = {
2434
+ var defaultProps$w = {
2436
2435
  page: 1,
2437
2436
  lastPage: 1,
2438
2437
  maxPages: 10,
@@ -2535,13 +2534,13 @@ var PaginationMenu = function PaginationMenu(_ref) {
2535
2534
  className: classNames(['page-link', _defineProperty({}, linkClassName, linkClassName !== null)])
2536
2535
  }, /*#__PURE__*/React.createElement(Label$1, null, messages.next))) : null));
2537
2536
  };
2538
- PaginationMenu.propTypes = propTypes$x;
2539
- PaginationMenu.defaultProps = defaultProps$x;
2537
+ PaginationMenu.propTypes = propTypes$w;
2538
+ PaginationMenu.defaultProps = defaultProps$w;
2540
2539
  var PaginationMenu$1 = PaginationMenu;
2541
2540
 
2542
2541
  var styles$o = {"container":"micromag-core-menus-tabs-container"};
2543
2542
 
2544
- var propTypes$w = {
2543
+ var propTypes$v = {
2545
2544
  items: core.PropTypes.menuItems,
2546
2545
  size: core.PropTypes.buttonSize,
2547
2546
  theme: core.PropTypes.buttonTheme,
@@ -2550,7 +2549,7 @@ var propTypes$w = {
2550
2549
  className: PropTypes.string,
2551
2550
  onClickItem: PropTypes.func
2552
2551
  };
2553
- var defaultProps$w = {
2552
+ var defaultProps$v = {
2554
2553
  items: [],
2555
2554
  size: null,
2556
2555
  theme: 'secondary',
@@ -2579,18 +2578,18 @@ var TabsMenu = function TabsMenu(_ref) {
2579
2578
  buttonClassName: classNames([styles$o.button, _defineProperty({}, buttonClassName, buttonClassName !== null)])
2580
2579
  }));
2581
2580
  };
2582
- TabsMenu.propTypes = propTypes$w;
2583
- TabsMenu.defaultProps = defaultProps$w;
2581
+ TabsMenu.propTypes = propTypes$v;
2582
+ TabsMenu.defaultProps = defaultProps$v;
2584
2583
  var TabsMenu$1 = TabsMenu;
2585
2584
 
2586
2585
  var styles$n = {"container":"micromag-core-modals-container","modals":"micromag-core-modals-modals","hasModals":"micromag-core-modals-hasModals"};
2587
2586
 
2588
- var propTypes$v = {
2587
+ var propTypes$u = {
2589
2588
  modals: core.PropTypes.modals.isRequired,
2590
2589
  setModalsContainer: PropTypes.func.isRequired,
2591
2590
  className: PropTypes.string
2592
2591
  };
2593
- var defaultProps$v = {
2592
+ var defaultProps$u = {
2594
2593
  className: null
2595
2594
  };
2596
2595
  var ModalsContainer = function ModalsContainer(_ref) {
@@ -2608,14 +2607,14 @@ var ModalsContainer = function ModalsContainer(_ref) {
2608
2607
  ref: containerRef
2609
2608
  }));
2610
2609
  };
2611
- ModalsContainer.propTypes = propTypes$v;
2612
- ModalsContainer.defaultProps = defaultProps$v;
2610
+ ModalsContainer.propTypes = propTypes$u;
2611
+ ModalsContainer.defaultProps = defaultProps$u;
2613
2612
  var Modals = contexts.withModals(ModalsContainer);
2614
2613
 
2615
2614
  var styles$m = {"container":"micromag-core-modals-modal-container","center":"micromag-core-modals-modal-center","inner":"micromag-core-modals-modal-inner","top":"micromag-core-modals-modal-top"};
2616
2615
 
2617
2616
  /* eslint-disable react/no-array-index-key, react/jsx-props-no-spreading */
2618
- var propTypes$u = {
2617
+ var propTypes$t = {
2619
2618
  id: PropTypes.string,
2620
2619
  data: PropTypes.object,
2621
2620
  // eslint-disable-line react/forbid-prop-types
@@ -2625,7 +2624,7 @@ var propTypes$u = {
2625
2624
  unregister: PropTypes.func,
2626
2625
  children: PropTypes.node
2627
2626
  };
2628
- var defaultProps$u = {
2627
+ var defaultProps$t = {
2629
2628
  id: null,
2630
2629
  data: null,
2631
2630
  container: null,
@@ -2655,18 +2654,18 @@ var ElementPortal = function ElementPortal(_ref) {
2655
2654
  }, [finalId, data]);
2656
2655
  return container !== null ? /*#__PURE__*/ReactDOM.createPortal(children, container) : null;
2657
2656
  };
2658
- ElementPortal.propTypes = propTypes$u;
2659
- ElementPortal.defaultProps = defaultProps$u;
2657
+ ElementPortal.propTypes = propTypes$t;
2658
+ ElementPortal.defaultProps = defaultProps$t;
2660
2659
  var ElementPortal$1 = ElementPortal;
2661
2660
 
2662
2661
  /* eslint-disable react/no-array-index-key, react/jsx-props-no-spreading */
2663
- var propTypes$t = {
2662
+ var propTypes$s = {
2664
2663
  id: PropTypes.string,
2665
2664
  data: PropTypes.object,
2666
2665
  // eslint-disable-line react/forbid-prop-types
2667
2666
  children: PropTypes.node
2668
2667
  };
2669
- var defaultProps$t = {
2668
+ var defaultProps$s = {
2670
2669
  id: null,
2671
2670
  data: null,
2672
2671
  children: null
@@ -2689,17 +2688,17 @@ var ModalPortal = function ModalPortal(_ref) {
2689
2688
  unregister: unregister
2690
2689
  }, children);
2691
2690
  };
2692
- ModalPortal.propTypes = propTypes$t;
2693
- ModalPortal.defaultProps = defaultProps$t;
2691
+ ModalPortal.propTypes = propTypes$s;
2692
+ ModalPortal.defaultProps = defaultProps$s;
2694
2693
  var Portal$1 = ModalPortal;
2695
2694
 
2696
- var propTypes$s = {
2695
+ var propTypes$r = {
2697
2696
  id: PropTypes.string,
2698
2697
  title: PropTypes.string,
2699
2698
  position: PropTypes.oneOf(['center', 'top']),
2700
2699
  children: PropTypes.node
2701
2700
  };
2702
- var defaultProps$s = {
2701
+ var defaultProps$r = {
2703
2702
  id: null,
2704
2703
  title: null,
2705
2704
  position: 'center',
@@ -2727,33 +2726,31 @@ var Modal = function Modal(_ref) {
2727
2726
  className: classNames([styles$m.inner, 'bg-dark'])
2728
2727
  }, children)));
2729
2728
  };
2730
- Modal.propTypes = propTypes$s;
2731
- Modal.defaultProps = defaultProps$s;
2729
+ Modal.propTypes = propTypes$r;
2730
+ Modal.defaultProps = defaultProps$r;
2732
2731
  var Modal$1 = Modal;
2733
2732
 
2734
2733
  var styles$l = {"container":"micromag-core-modals-dialog-container"};
2735
2734
 
2736
- var propTypes$r = {
2735
+ var propTypes$q = {
2737
2736
  title: core.PropTypes.label,
2738
2737
  header: PropTypes.node,
2739
2738
  children: PropTypes.node,
2740
2739
  footer: PropTypes.node,
2741
2740
  size: PropTypes.string,
2742
2741
  buttons: core.PropTypes.buttons,
2743
- // theme: PropTypes.oneOf([null, 'dark', 'light']),
2744
- onClickClose: PropTypes.func,
2742
+ onClose: PropTypes.func,
2745
2743
  className: PropTypes.string,
2746
2744
  bodyClassName: PropTypes.string
2747
2745
  };
2748
- var defaultProps$r = {
2746
+ var defaultProps$q = {
2749
2747
  title: null,
2750
2748
  header: null,
2751
2749
  children: null,
2752
2750
  footer: null,
2753
2751
  size: null,
2754
2752
  buttons: null,
2755
- // theme: 'dark',
2756
- onClickClose: null,
2753
+ onClose: null,
2757
2754
  className: null,
2758
2755
  bodyClassName: null
2759
2756
  };
@@ -2764,7 +2761,7 @@ var ModalDialog = function ModalDialog(_ref) {
2764
2761
  buttons = _ref.buttons,
2765
2762
  footer = _ref.footer,
2766
2763
  size = _ref.size,
2767
- onClickClose = _ref.onClickClose,
2764
+ onClose = _ref.onClose,
2768
2765
  className = _ref.className,
2769
2766
  bodyClassName = _ref.bodyClassName;
2770
2767
  return /*#__PURE__*/React.createElement("div", {
@@ -2773,100 +2770,27 @@ var ModalDialog = function ModalDialog(_ref) {
2773
2770
  }, /*#__PURE__*/React.createElement("div", {
2774
2771
  className: "modal-content"
2775
2772
  }, header || /*#__PURE__*/React.createElement("div", {
2776
- className: classNames(['modal-header', 'p-2', 'd-flex', 'justify-content-between', styles$l.header, {
2777
- // 'bg-dark': theme === 'dark',
2778
- // 'border-dark': theme === 'dark',
2779
- // 'text-light': theme === 'dark',
2780
- }])
2773
+ className: classNames(['modal-header', 'p-2', 'd-flex', 'justify-content-between', styles$l.header])
2781
2774
  }, /*#__PURE__*/React.createElement("h5", {
2782
2775
  className: "modal-title"
2783
2776
  }, /*#__PURE__*/React.createElement(Label$1, null, title)), /*#__PURE__*/React.createElement("button", {
2784
2777
  type: "button",
2785
2778
  className: "btn btn-close p-2",
2786
2779
  "aria-label": "Close",
2787
- onClick: onClickClose
2780
+ onClick: onClose
2788
2781
  })), /*#__PURE__*/React.createElement("div", {
2789
2782
  className: classNames(['modal-body', 'p-2', _defineProperty({}, bodyClassName, bodyClassName !== null)])
2790
2783
  }, children), footer !== null || buttons !== null ? /*#__PURE__*/React.createElement("div", {
2791
- className: classNames(['modal-footer', styles$l.footer])
2784
+ className: classNames(['modal-footer', 'p-2', styles$l.footer])
2792
2785
  }, footer, buttons !== null ? /*#__PURE__*/React.createElement(Buttons$1, {
2793
2786
  buttons: buttons,
2794
2787
  className: styles$l.buttons
2795
2788
  }) : null) : null));
2796
2789
  };
2797
- ModalDialog.propTypes = propTypes$r;
2798
- ModalDialog.defaultProps = defaultProps$r;
2790
+ ModalDialog.propTypes = propTypes$q;
2791
+ ModalDialog.defaultProps = defaultProps$q;
2799
2792
  var ModalDialog$1 = ModalDialog;
2800
2793
 
2801
- // import classNames from 'classnames';
2802
- // import { DashboardModal } from '@uppy/react';
2803
- var DashboardModal = /*#__PURE__*/React.lazy(function () {
2804
- return import('@uppy/react').then(function (_ref) {
2805
- var Component = _ref.DashboardModal;
2806
- return {
2807
- "default": Component
2808
- };
2809
- });
2810
- });
2811
- var propTypes$q = {
2812
- type: PropTypes.oneOfType([core.PropTypes.mediaTypes, PropTypes.array]),
2813
- opened: PropTypes.bool,
2814
- sources: PropTypes.arrayOf(PropTypes.string),
2815
- onUploaded: PropTypes.func,
2816
- onRequestClose: PropTypes.func
2817
- };
2818
- var defaultProps$q = {
2819
- type: null,
2820
- opened: false,
2821
- sources: ['webcam', 'facebook', 'instagram', 'dropbox', 'google-drive'],
2822
- onUploaded: null,
2823
- onRequestClose: null
2824
- };
2825
- var UploadModal = function UploadModal(_ref2) {
2826
- var type = _ref2.type,
2827
- opened = _ref2.opened,
2828
- sources = _ref2.sources,
2829
- onUploaded = _ref2.onUploaded,
2830
- onRequestClose = _ref2.onRequestClose;
2831
- var onUppyComplete = React.useCallback(function (response) {
2832
- if (onUploaded !== null) {
2833
- onUploaded(response);
2834
- }
2835
- }, [onUploaded]);
2836
- var fileTypes = React.useMemo(function () {
2837
- if (isArray(type)) {
2838
- return type.map(function (t) {
2839
- return ['image', 'video', 'audio'].indexOf(t) !== -1 ? "".concat(t, "/*") : null;
2840
- }).filter(function (t) {
2841
- return t !== null;
2842
- });
2843
- }
2844
- return ['image', 'video', 'audio'].indexOf(type) !== -1 ? ["".concat(type, "/*")] : null;
2845
- }, [type]);
2846
- var uppy$1 = uppy.useUppy({
2847
- onComplete: onUppyComplete,
2848
- sources: sources,
2849
- allowedFileTypes: fileTypes !== null && fileTypes.length > 0 ? fileTypes : null
2850
- });
2851
- React.useEffect(function () {
2852
- if (uppy$1 !== null && !opened) {
2853
- uppy$1.cancelAll();
2854
- }
2855
- }, [uppy$1, opened]);
2856
- return uppy$1 !== null ? /*#__PURE__*/React.createElement(React.Suspense, {
2857
- fallback: /*#__PURE__*/React.createElement("div", null)
2858
- }, /*#__PURE__*/React.createElement(DashboardModal, {
2859
- uppy: uppy$1,
2860
- open: opened,
2861
- closeAfterFinish: true,
2862
- onRequestClose: onRequestClose,
2863
- plugins: sources
2864
- })) : null;
2865
- };
2866
- UploadModal.propTypes = propTypes$q;
2867
- UploadModal.defaultProps = defaultProps$q;
2868
- var UploadModal$1 = UploadModal;
2869
-
2870
2794
  var styles$k = {"container":"micromag-core-panels-container"};
2871
2795
 
2872
2796
  var propTypes$p = {
@@ -5444,4 +5368,3 @@ exports.Tabs = TabsMenu$1;
5444
5368
  exports.Transitions = Transitions;
5445
5369
  exports.TransitionsStagger = TransitionsStagger$1;
5446
5370
  exports.UnmuteIcon = UnmuteIcon$1;
5447
- exports.UploadModal = UploadModal$1;