@micromag/core 0.3.307 → 0.3.318

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
@@ -41,30 +41,28 @@ import { faTimes } from '@fortawesome/free-solid-svg-icons/faTimes';
41
41
  import { faCircle } from '@fortawesome/free-solid-svg-icons/faCircle';
42
42
  import { faPercent } from '@fortawesome/free-solid-svg-icons/faPercent';
43
43
  import { useSpring } from '@react-spring/core';
44
- import { animated } from '@react-spring/web';
44
+ import { config, animated } from '@react-spring/web';
45
45
 
46
46
  /* eslint-disable react/jsx-props-no-spreading */
47
47
  var propTypes$L = {
48
48
  children: PropTypes.label.isRequired,
49
49
  isHtml: PropTypes$1.bool,
50
50
  values: PropTypes$1.object // eslint-disable-line react/forbid-prop-types
51
-
52
51
  };
52
+
53
53
  var defaultProps$L = {
54
54
  isHtml: false,
55
55
  values: {}
56
56
  };
57
-
58
57
  var Label = function Label(_ref) {
59
58
  var children = _ref.children,
60
- isHtml = _ref.isHtml,
61
- values = _ref.values;
59
+ isHtml = _ref.isHtml,
60
+ values = _ref.values;
62
61
  var Message = isHtml ? FormattedMessage : FormattedMessage;
63
62
  return isMessage(children) ? /*#__PURE__*/React.createElement(Message, Object.assign({
64
63
  values: values
65
64
  }, children)) : children;
66
65
  };
67
-
68
66
  Label.propTypes = propTypes$L;
69
67
  Label.defaultProps = defaultProps$L;
70
68
 
@@ -102,9 +100,9 @@ var propTypes$K = {
102
100
  onClick: PropTypes$1.func,
103
101
  refButton: PropTypes$1.oneOfType([PropTypes$1.func, PropTypes$1.shape({
104
102
  current: PropTypes$1.any // eslint-disable-line
105
-
106
103
  })])
107
104
  };
105
+
108
106
  var defaultProps$K = {
109
107
  type: 'button',
110
108
  theme: null,
@@ -136,41 +134,38 @@ var defaultProps$K = {
136
134
  onClick: null,
137
135
  refButton: null
138
136
  };
139
-
140
137
  var Button$1 = function Button(_ref) {
141
138
  var _ref7, _ref8;
142
-
143
139
  var type = _ref.type,
144
- theme = _ref.theme,
145
- size = _ref.size,
146
- href = _ref.href,
147
- external = _ref.external,
148
- direct = _ref.direct,
149
- target = _ref.target,
150
- label = _ref.label,
151
- children = _ref.children,
152
- focusable = _ref.focusable,
153
- active = _ref.active,
154
- icon = _ref.icon,
155
- iconPosition = _ref.iconPosition,
156
- disabled = _ref.disabled,
157
- loading = _ref.loading,
158
- disableOnLoading = _ref.disableOnLoading,
159
- small = _ref.small,
160
- big = _ref.big,
161
- withShadow = _ref.withShadow,
162
- withoutStyle = _ref.withoutStyle,
163
- withoutBootstrapStyles = _ref.withoutBootstrapStyles,
164
- withoutTheme = _ref.withoutTheme,
165
- asLink = _ref.asLink,
166
- outline = _ref.outline,
167
- onClick = _ref.onClick,
168
- className = _ref.className,
169
- iconClassName = _ref.iconClassName,
170
- labelClassName = _ref.labelClassName,
171
- refButton = _ref.refButton,
172
- props = _objectWithoutProperties(_ref, _excluded$b);
173
-
140
+ theme = _ref.theme,
141
+ size = _ref.size,
142
+ href = _ref.href,
143
+ external = _ref.external,
144
+ direct = _ref.direct,
145
+ target = _ref.target,
146
+ label = _ref.label,
147
+ children = _ref.children,
148
+ focusable = _ref.focusable,
149
+ active = _ref.active,
150
+ icon = _ref.icon,
151
+ iconPosition = _ref.iconPosition,
152
+ disabled = _ref.disabled,
153
+ loading = _ref.loading,
154
+ disableOnLoading = _ref.disableOnLoading,
155
+ small = _ref.small,
156
+ big = _ref.big,
157
+ withShadow = _ref.withShadow,
158
+ withoutStyle = _ref.withoutStyle,
159
+ withoutBootstrapStyles = _ref.withoutBootstrapStyles,
160
+ withoutTheme = _ref.withoutTheme,
161
+ asLink = _ref.asLink,
162
+ outline = _ref.outline,
163
+ onClick = _ref.onClick,
164
+ className = _ref.className,
165
+ iconClassName = _ref.iconClassName,
166
+ labelClassName = _ref.labelClassName,
167
+ refButton = _ref.refButton,
168
+ props = _objectWithoutProperties(_ref, _excluded$b);
174
169
  var finalLabel = label || children;
175
170
  var text = finalLabel !== null ? /*#__PURE__*/React.createElement(Label, null, finalLabel) : null;
176
171
  var hasChildren = label !== null && children !== null;
@@ -192,7 +187,6 @@ var Button$1 = function Button(_ref) {
192
187
  var buttonClassNames = classNames([!withoutBootstrapStyles ? (_ref7 = {
193
188
  btn: withStyle
194
189
  }, _defineProperty(_ref7, "btn-".concat(outline ? 'outline-' : '').concat(theme), withStyle && theme !== null), _defineProperty(_ref7, "btn-".concat(size), withStyle && size !== null), _defineProperty(_ref7, "active", !withoutStyle && active), _ref7) : null, styles$w.container, (_ref8 = {}, _defineProperty(_ref8, styles$w.withoutStyle, withoutStyle), _defineProperty(_ref8, styles$w.withIcon, hasIcon), _defineProperty(_ref8, styles$w.withIconColumns, hasIconColumns), _defineProperty(_ref8, styles$w.withText, text !== null), _defineProperty(_ref8, styles$w.withShadow, withShadow), _defineProperty(_ref8, styles$w.isSmall, small), _defineProperty(_ref8, styles$w.isBig, big), _defineProperty(_ref8, styles$w.isLink, href !== null), _defineProperty(_ref8, styles$w.asLink, asLink), _defineProperty(_ref8, styles$w.isDisabled, disabled), _defineProperty(_ref8, styles$w.isLoading, loading), _defineProperty(_ref8, className, className !== null), _ref8)]);
195
-
196
190
  if (href !== null) {
197
191
  var linkClassNames = classNames([buttonClassNames, _defineProperty({
198
192
  disabled: disabled
@@ -212,7 +206,6 @@ var Button$1 = function Button(_ref) {
212
206
  tabIndex: focusable ? '' : '-1'
213
207
  }, content);
214
208
  }
215
-
216
209
  return /*#__PURE__*/React.createElement("button", Object.assign({}, props, {
217
210
  type: type,
218
211
  className: buttonClassNames,
@@ -222,7 +215,6 @@ var Button$1 = function Button(_ref) {
222
215
  tabIndex: focusable ? '0' : '-1'
223
216
  }), content);
224
217
  };
225
-
226
218
  Button$1.propTypes = propTypes$K;
227
219
  Button$1.defaultProps = defaultProps$K;
228
220
 
@@ -247,29 +239,26 @@ var defaultProps$J = {
247
239
  className: null,
248
240
  buttonClassName: null
249
241
  };
250
-
251
242
  var Buttons = function Buttons(_ref) {
252
243
  var buttons = _ref.buttons,
253
- size = _ref.size,
254
- theme = _ref.theme,
255
- renderButton = _ref.renderButton,
256
- onClickButton = _ref.onClickButton,
257
- buttonClassName = _ref.buttonClassName,
258
- className = _ref.className;
244
+ size = _ref.size,
245
+ theme = _ref.theme,
246
+ renderButton = _ref.renderButton,
247
+ onClickButton = _ref.onClickButton,
248
+ buttonClassName = _ref.buttonClassName,
249
+ className = _ref.className;
259
250
  return /*#__PURE__*/React.createElement("div", {
260
251
  className: classNames(['btn-group', _defineProperty({}, "btn-group-".concat(size), size !== null), styles$v.container, _defineProperty({}, className, className !== null)]),
261
252
  role: "group"
262
253
  }, buttons.map(function (button, index) {
263
254
  var _ref4;
264
-
265
255
  var _button$className = button.className,
266
- customClassName = _button$className === void 0 ? null : _button$className,
267
- _button$onClick = button.onClick,
268
- _onClick = _button$onClick === void 0 ? null : _button$onClick,
269
- _button$theme = button.theme,
270
- buttonTheme = _button$theme === void 0 ? null : _button$theme,
271
- buttonProps = _objectWithoutProperties(button, _excluded$a);
272
-
256
+ customClassName = _button$className === void 0 ? null : _button$className,
257
+ _button$onClick = button.onClick,
258
+ _onClick = _button$onClick === void 0 ? null : _button$onClick,
259
+ _button$theme = button.theme,
260
+ buttonTheme = _button$theme === void 0 ? null : _button$theme,
261
+ buttonProps = _objectWithoutProperties(button, _excluded$a);
273
262
  var fixedProps = {
274
263
  key: "button-".concat(index),
275
264
  className: classNames([styles$v.button, (_ref4 = {}, _defineProperty(_ref4, buttonClassName, buttonClassName !== null), _defineProperty(_ref4, customClassName, customClassName !== null), _ref4)]),
@@ -277,7 +266,6 @@ var Buttons = function Buttons(_ref) {
277
266
  if (_onClick !== null) {
278
267
  _onClick(e, button, index);
279
268
  }
280
-
281
269
  if (onClickButton !== null) {
282
270
  onClickButton(e, button, index);
283
271
  }
@@ -287,7 +275,6 @@ var Buttons = function Buttons(_ref) {
287
275
  return renderButton !== null ? renderButton(button, index, fixedProps) : /*#__PURE__*/React.createElement(Button$1, Object.assign({}, fixedProps, buttonProps));
288
276
  }));
289
277
  };
290
-
291
278
  Buttons.propTypes = propTypes$J;
292
279
  Buttons.defaultProps = defaultProps$J;
293
280
 
@@ -298,11 +285,9 @@ var propTypes$I = {
298
285
  var defaultProps$I = {
299
286
  className: null
300
287
  };
301
-
302
288
  var BackButton = function BackButton(_ref) {
303
289
  var className = _ref.className,
304
- props = _objectWithoutProperties(_ref, _excluded$9);
305
-
290
+ props = _objectWithoutProperties(_ref, _excluded$9);
306
291
  return /*#__PURE__*/React.createElement(Button$1, Object.assign({
307
292
  className: classNames(['px-2', _defineProperty({}, className, className)]),
308
293
  size: "sm",
@@ -312,14 +297,13 @@ var BackButton = function BackButton(_ref) {
312
297
  })
313
298
  }, props));
314
299
  };
315
-
316
300
  BackButton.propTypes = propTypes$I;
317
301
  BackButton.defaultProps = defaultProps$I;
318
302
 
319
303
  var styles$u = {"actions":"micromag-core-forms-form-actions","left":"micromag-core-forms-form-left","right":"micromag-core-forms-form-right"};
320
304
 
321
305
  var _excluded$8 = ["type"],
322
- _excluded2 = ["component", "id", "settings"];
306
+ _excluded2 = ["component", "id", "settings"];
323
307
  var propTypes$H = {
324
308
  name: PropTypes$1.string,
325
309
  // .isRequired,
@@ -332,8 +316,8 @@ var propTypes$H = {
332
316
  gotoFieldForm: PropTypes$1.func.isRequired,
333
317
  closeFieldForm: PropTypes$1.func.isRequired,
334
318
  fieldContext: PropTypes$1.any // eslint-disable-line react/forbid-prop-types
335
-
336
319
  };
320
+
337
321
  var defaultProps$H = {
338
322
  name: null,
339
323
  form: null,
@@ -344,51 +328,44 @@ var defaultProps$H = {
344
328
  onChange: null,
345
329
  fieldContext: null
346
330
  };
347
-
348
331
  var FieldForm = function FieldForm(_ref) {
349
332
  var name = _ref.name,
350
- value = _ref.value,
351
- form = _ref.form,
352
- formComponents = _ref.formComponents,
353
- fields = _ref.fields,
354
- className = _ref.className,
355
- onChange = _ref.onChange,
356
- gotoFieldForm = _ref.gotoFieldForm,
357
- closeFieldForm = _ref.closeFieldForm,
358
- fieldContext = _ref.fieldContext;
333
+ value = _ref.value,
334
+ form = _ref.form,
335
+ formComponents = _ref.formComponents,
336
+ fields = _ref.fields,
337
+ className = _ref.className,
338
+ onChange = _ref.onChange,
339
+ gotoFieldForm = _ref.gotoFieldForm,
340
+ closeFieldForm = _ref.closeFieldForm,
341
+ fieldContext = _ref.fieldContext;
359
342
  var fieldsManager = useFieldsManager();
360
343
  var field = getFieldFromPath(name.split('.'), fields, fieldsManager);
361
-
362
344
  var _ref2 = field || {},
363
- _ref2$type = _ref2.type,
364
- type = _ref2$type === void 0 ? null : _ref2$type,
365
- fieldProps = _objectWithoutProperties(_ref2, _excluded$8);
366
-
345
+ _ref2$type = _ref2.type,
346
+ type = _ref2$type === void 0 ? null : _ref2$type,
347
+ fieldProps = _objectWithoutProperties(_ref2, _excluded$8);
367
348
  var fieldDefinition = fieldsManager.getDefinition(type) || null;
368
-
369
349
  var fieldData = fieldDefinition || _objectSpread({}, field);
370
-
371
350
  var _ref3 = fieldData || {},
372
- _ref3$component = _ref3.component,
373
- fieldComponent = _ref3$component === void 0 ? null : _ref3$component;
374
- _ref3.id;
375
- _ref3.settings;
376
- var definitionProps = _objectWithoutProperties(_ref3, _excluded2);
377
-
351
+ _ref3$component = _ref3.component,
352
+ fieldComponent = _ref3$component === void 0 ? null : _ref3$component;
353
+ _ref3.id;
354
+ _ref3.settings;
355
+ var definitionProps = _objectWithoutProperties(_ref3, _excluded2);
378
356
  var FieldComponent = useFieldComponent(fieldComponent);
379
357
  var FormComponent = getComponentFromName(form, formComponents);
380
358
  var fieldValue = get(value, name, null);
381
-
382
359
  var onFieldChange = function onFieldChange(newFieldValue) {
383
360
  // const { name, fields: subFields = null } = field || {};
384
- var newValue = setFieldValue(value, name.split('.'), newFieldValue // field === null || subFields !== null ? newFieldValue : newFieldValue[name],
361
+ var newValue = setFieldValue(value, name.split('.'), newFieldValue
362
+ // field === null || subFields !== null ? newFieldValue : newFieldValue[name],
385
363
  );
386
364
 
387
365
  if (onChange !== null) {
388
366
  onChange(newValue);
389
367
  }
390
368
  };
391
-
392
369
  var closeForm = useCallback(function () {
393
370
  return closeFieldForm(name, form);
394
371
  }, [name, form, closeFieldForm]);
@@ -400,7 +377,6 @@ var FieldForm = function FieldForm(_ref) {
400
377
  closeFieldForm: closeFieldForm,
401
378
  closeForm: closeForm
402
379
  };
403
-
404
380
  if (form !== null) {
405
381
  return FormComponent !== null ? /*#__PURE__*/React.createElement(FieldContextProvider, {
406
382
  context: fieldContext
@@ -409,9 +385,9 @@ var FieldForm = function FieldForm(_ref) {
409
385
  }, formProps, {
410
386
  className: className
411
387
  }))) : null;
412
- } // Use field component with isForm props
413
-
388
+ }
414
389
 
390
+ // Use field component with isForm props
415
391
  return FieldComponent !== null ? /*#__PURE__*/React.createElement(FieldContextProvider, {
416
392
  context: fieldContext
417
393
  }, /*#__PURE__*/React.createElement(FieldComponent, Object.assign({
@@ -420,7 +396,6 @@ var FieldForm = function FieldForm(_ref) {
420
396
  isForm: true
421
397
  }, formProps))) : null;
422
398
  };
423
-
424
399
  FieldForm.propTypes = propTypes$H;
425
400
  FieldForm.defaultProps = defaultProps$H;
426
401
 
@@ -482,49 +457,43 @@ var defaultProps$G = {
482
457
  actionsClassName: null,
483
458
  cancelClassName: null
484
459
  };
485
-
486
460
  var Form = function Form(_ref) {
487
461
  var _ref4;
488
-
489
462
  var action = _ref.action,
490
- method = _ref.method,
491
- initialFields = _ref.fields,
492
- initialValue = _ref.initialValue,
493
- postForm = _ref.postForm,
494
- submitButtonLabel = _ref.submitButtonLabel,
495
- submitButtonLoadingLabel = _ref.submitButtonLoadingLabel,
496
- buttons = _ref.buttons,
497
- children = _ref.children,
498
- actionsAlign = _ref.actionsAlign,
499
- withoutActions = _ref.withoutActions,
500
- withoutComplete = _ref.withoutComplete,
501
- withoutBackButton = _ref.withoutBackButton,
502
- onComplete = _ref.onComplete,
503
- onResponse = _ref.onResponse,
504
- onMessage = _ref.onMessage,
505
- onCancel = _ref.onCancel,
506
- onCancelHref = _ref.onCancelHref,
507
- onOpenFieldForm = _ref.onOpenFieldForm,
508
- onCloseFieldForm = _ref.onCloseFieldForm,
509
- className = _ref.className,
510
- fieldsClassName = _ref.fieldsClassName,
511
- actionsClassName = _ref.actionsClassName,
512
- cancelClassName = _ref.cancelClassName;
513
-
463
+ method = _ref.method,
464
+ initialFields = _ref.fields,
465
+ initialValue = _ref.initialValue,
466
+ postForm = _ref.postForm,
467
+ submitButtonLabel = _ref.submitButtonLabel,
468
+ submitButtonLoadingLabel = _ref.submitButtonLoadingLabel,
469
+ buttons = _ref.buttons,
470
+ children = _ref.children,
471
+ actionsAlign = _ref.actionsAlign,
472
+ withoutActions = _ref.withoutActions,
473
+ withoutComplete = _ref.withoutComplete,
474
+ withoutBackButton = _ref.withoutBackButton,
475
+ onComplete = _ref.onComplete,
476
+ onResponse = _ref.onResponse,
477
+ onMessage = _ref.onMessage,
478
+ onCancel = _ref.onCancel,
479
+ onCancelHref = _ref.onCancelHref,
480
+ onOpenFieldForm = _ref.onOpenFieldForm,
481
+ onCloseFieldForm = _ref.onCloseFieldForm,
482
+ className = _ref.className,
483
+ fieldsClassName = _ref.fieldsClassName,
484
+ actionsClassName = _ref.actionsClassName,
485
+ cancelClassName = _ref.cancelClassName;
514
486
  var _useState = useState(false),
515
- _useState2 = _slicedToArray(_useState, 2),
516
- complete = _useState2[0],
517
- setComplete = _useState2[1];
518
-
487
+ _useState2 = _slicedToArray(_useState, 2),
488
+ complete = _useState2[0],
489
+ setComplete = _useState2[1];
519
490
  useEffect(function () {
520
491
  var id = null;
521
-
522
492
  if (complete) {
523
493
  id = setTimeout(function () {
524
494
  setComplete(false);
525
495
  }, 3000);
526
496
  }
527
-
528
497
  return function () {
529
498
  clearTimeout(id);
530
499
  };
@@ -533,68 +502,61 @@ var Form = function Form(_ref) {
533
502
  if (onComplete !== null) {
534
503
  onComplete(data);
535
504
  }
536
-
537
505
  if (!withoutComplete) {
538
506
  setComplete(true);
539
507
  }
540
508
  }, [onComplete, setComplete]);
541
-
542
509
  var _useForm = useForm({
543
- value: initialValue,
544
- action: action,
545
- fields: initialFields,
546
- postForm: postForm,
547
- onComplete: onCompleteForm
548
- }),
549
- onSubmit = _useForm.onSubmit,
550
- fields = _useForm.fields,
551
- status = _useForm.status,
552
- value = _useForm.value,
553
- setValue = _useForm.setValue,
554
- errors = _useForm.errors,
555
- response = _useForm.response,
556
- generalError = _useForm.generalError;
557
-
510
+ value: initialValue,
511
+ action: action,
512
+ fields: initialFields,
513
+ postForm: postForm,
514
+ onComplete: onCompleteForm
515
+ }),
516
+ onSubmit = _useForm.onSubmit,
517
+ fields = _useForm.fields,
518
+ status = _useForm.status,
519
+ value = _useForm.value,
520
+ setValue = _useForm.setValue,
521
+ errors = _useForm.errors,
522
+ response = _useForm.response,
523
+ generalError = _useForm.generalError;
558
524
  var FieldsComponent = useFieldComponent('fields');
559
-
560
525
  useEffect(function () {
561
526
  if (onResponse !== null) {
562
527
  onResponse(response);
563
-
564
528
  if (onMessage !== null && response && response.message) {
565
529
  onMessage(response.message);
566
530
  }
567
531
  }
568
532
  }, [response, onResponse, onMessage]);
569
533
  var canSave = validateFields(fields, value);
570
-
571
534
  var _useState3 = useState([]),
572
- _useState4 = _slicedToArray(_useState3, 2),
573
- fieldPaths = _useState4[0],
574
- setFieldPaths = _useState4[1];
575
-
535
+ _useState4 = _slicedToArray(_useState3, 2),
536
+ fieldPaths = _useState4[0],
537
+ setFieldPaths = _useState4[1];
576
538
  var gotoFieldForm = useCallback(function (field) {
577
539
  var formName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
578
540
  var fieldKey = "".concat(field).concat(formName !== null ? ":".concat(formName) : '');
579
541
  setFieldPaths([].concat(_toConsumableArray(fieldPaths), [fieldKey]));
580
-
581
542
  if (onOpenFieldForm !== null) {
582
543
  onOpenFieldForm();
583
544
  }
584
545
  }, [fieldPaths, setFieldPaths]);
585
546
  var closeFieldForm = useCallback(function () {
586
547
  var newFields = _toConsumableArray(fieldPaths);
587
-
588
548
  newFields.pop();
589
549
  setFieldPaths(_toConsumableArray(newFields));
590
-
591
550
  if (onCloseFieldForm !== null) {
592
551
  onCloseFieldForm();
593
552
  }
594
- }, [fieldPaths, setFieldPaths]); // The last path
553
+ }, [fieldPaths, setFieldPaths]);
595
554
 
555
+ // The last path
596
556
  var fieldParams = fieldPaths.length > 0 ? fieldPaths[fieldPaths.length - 1] : null;
597
- var fieldName = fieldParams !== null ? fieldParams.replace(/\//g, '.') : null; // Get transition value
557
+ var fieldName = fieldParams !== null ? fieldParams.replace(/\//g, '.') : null;
558
+
559
+ // Get transition value
598
560
  // const { name: transitionName, timeout: transitionTimeout } = useFormTransition(
599
561
  // fieldPaths,
600
562
  // styles,
@@ -664,7 +626,6 @@ var Form = function Form(_ref) {
664
626
  }]
665
627
  })) : null) : null);
666
628
  };
667
-
668
629
  Form.propTypes = propTypes$G;
669
630
  Form.defaultProps = defaultProps$G;
670
631
 
@@ -689,17 +650,15 @@ var defaultProps$F = {
689
650
  withoutStyle: false,
690
651
  className: null
691
652
  };
692
-
693
653
  var Link = function Link(_ref) {
694
654
  var href = _ref.href,
695
- external = _ref.external,
696
- children = _ref.children,
697
- target = _ref.target,
698
- rel = _ref.rel,
699
- className = _ref.className,
700
- withoutStyle = _ref.withoutStyle,
701
- props = _objectWithoutProperties(_ref, _excluded$7);
702
-
655
+ external = _ref.external,
656
+ children = _ref.children,
657
+ target = _ref.target,
658
+ rel = _ref.rel,
659
+ className = _ref.className,
660
+ withoutStyle = _ref.withoutStyle,
661
+ props = _objectWithoutProperties(_ref, _excluded$7);
703
662
  return external ? /*#__PURE__*/React.createElement("a", Object.assign({
704
663
  className: classNames([className, _defineProperty({}, styles$t.withoutStyle, withoutStyle)]),
705
664
  href: href,
@@ -710,7 +669,6 @@ var Link = function Link(_ref) {
710
669
  to: href
711
670
  }, props), /*#__PURE__*/React.createElement(Label, null, children));
712
671
  };
713
-
714
672
  Link.propTypes = propTypes$F;
715
673
  Link.defaultProps = defaultProps$F;
716
674
 
@@ -770,40 +728,37 @@ var defaultProps$E = {
770
728
  onClickBody: null,
771
729
  onClickFooter: null
772
730
  };
773
-
774
731
  var Card = function Card(_ref) {
775
732
  var _ref10;
776
-
777
733
  var href = _ref.href,
778
- header = _ref.header,
779
- image = _ref.image,
780
- imageAlt = _ref.imageAlt,
781
- imageOverlay = _ref.imageOverlay,
782
- beforeBody = _ref.beforeBody,
783
- title = _ref.title,
784
- subtitle = _ref.subtitle,
785
- children = _ref.children,
786
- afterBody = _ref.afterBody,
787
- links = _ref.links,
788
- linksInSameBody = _ref.linksInSameBody,
789
- footer = _ref.footer,
790
- theme = _ref.theme,
791
- className = _ref.className,
792
- imageClassName = _ref.imageClassName,
793
- headerClassName = _ref.headerClassName,
794
- titleClassName = _ref.titleClassName,
795
- subtitleClassName = _ref.subtitleClassName,
796
- bodyClassName = _ref.bodyClassName,
797
- footerClassName = _ref.footerClassName,
798
- onClick = _ref.onClick,
799
- onClickBody = _ref.onClickBody,
800
- onClickFooter = _ref.onClickFooter;
734
+ header = _ref.header,
735
+ image = _ref.image,
736
+ imageAlt = _ref.imageAlt,
737
+ imageOverlay = _ref.imageOverlay,
738
+ beforeBody = _ref.beforeBody,
739
+ title = _ref.title,
740
+ subtitle = _ref.subtitle,
741
+ children = _ref.children,
742
+ afterBody = _ref.afterBody,
743
+ links = _ref.links,
744
+ linksInSameBody = _ref.linksInSameBody,
745
+ footer = _ref.footer,
746
+ theme = _ref.theme,
747
+ className = _ref.className,
748
+ imageClassName = _ref.imageClassName,
749
+ headerClassName = _ref.headerClassName,
750
+ titleClassName = _ref.titleClassName,
751
+ subtitleClassName = _ref.subtitleClassName,
752
+ bodyClassName = _ref.bodyClassName,
753
+ footerClassName = _ref.footerClassName,
754
+ onClick = _ref.onClick,
755
+ onClickBody = _ref.onClickBody,
756
+ onClickFooter = _ref.onClickFooter;
801
757
  var linksElements = (links || []).map(function (_ref2, index) {
802
758
  var label = _ref2.label,
803
- _ref2$className = _ref2.className,
804
- linkClassName = _ref2$className === void 0 ? null : _ref2$className,
805
- linkProps = _objectWithoutProperties(_ref2, _excluded$6);
806
-
759
+ _ref2$className = _ref2.className,
760
+ linkClassName = _ref2$className === void 0 ? null : _ref2$className,
761
+ linkProps = _objectWithoutProperties(_ref2, _excluded$6);
807
762
  return /*#__PURE__*/React.createElement(Link, Object.assign({
808
763
  key: "link-".concat(label, "-").concat(index),
809
764
  className: classNames(['card-link', _defineProperty({}, linkClassName, linkClassName !== null)])
@@ -844,14 +799,12 @@ var Card = function Card(_ref) {
844
799
  className: classNames(['card-footer', _defineProperty({}, footerClassName, footerClassName !== null)])
845
800
  }, /*#__PURE__*/React.createElement(Label, null, footer)) : null);
846
801
  var cardClassName = classNames(['card', (_ref10 = {}, _defineProperty(_ref10, "bg-".concat(theme), !imageOverlay && theme !== 'dark'), _defineProperty(_ref10, 'bg-dark', imageOverlay || theme === 'dark'), _defineProperty(_ref10, 'text-dark', theme === 'light'), _defineProperty(_ref10, 'text-light', imageOverlay || theme === 'dark' || theme === 'primary'), _defineProperty(_ref10, className, className !== null), _ref10)]);
847
-
848
802
  if (href !== null) {
849
803
  return /*#__PURE__*/React.createElement(Link, {
850
804
  href: href,
851
805
  className: cardClassName
852
806
  }, cardInner);
853
807
  }
854
-
855
808
  if (onClick !== null) {
856
809
  return /*#__PURE__*/React.createElement("button", {
857
810
  type: "button",
@@ -859,12 +812,10 @@ var Card = function Card(_ref) {
859
812
  onClick: onClick
860
813
  }, cardInner);
861
814
  }
862
-
863
815
  return /*#__PURE__*/React.createElement("div", {
864
816
  className: cardClassName
865
817
  }, cardInner);
866
818
  };
867
-
868
819
  Card.propTypes = propTypes$E;
869
820
  Card.defaultProps = defaultProps$E;
870
821
 
@@ -878,11 +829,10 @@ var defaultProps$D = {
878
829
  color: 'currentColor',
879
830
  className: null
880
831
  };
881
-
882
832
  var Spinner = function Spinner(_ref) {
883
833
  var animated = _ref.animated,
884
- color = _ref.color,
885
- className = _ref.className;
834
+ color = _ref.color,
835
+ className = _ref.className;
886
836
  return /*#__PURE__*/React.createElement("svg", {
887
837
  className: classNames([_defineProperty({}, className, className !== null)]),
888
838
  width: "38",
@@ -937,7 +887,6 @@ var Spinner = function Spinner(_ref) {
937
887
  repeatCount: "indefinite"
938
888
  }) : null))));
939
889
  };
940
-
941
890
  Spinner.propTypes = propTypes$D;
942
891
  Spinner.defaultProps = defaultProps$D;
943
892
 
@@ -956,19 +905,16 @@ var defaultProps$C = {
956
905
  children: null,
957
906
  className: null
958
907
  };
959
-
960
908
  var FormPanel = function FormPanel(_ref) {
961
909
  var description = _ref.description,
962
- loading = _ref.loading,
963
- children = _ref.children,
964
- className = _ref.className,
965
- props = _objectWithoutProperties(_ref, _excluded$5);
966
-
910
+ loading = _ref.loading,
911
+ children = _ref.children,
912
+ className = _ref.className,
913
+ props = _objectWithoutProperties(_ref, _excluded$5);
967
914
  return /*#__PURE__*/React.createElement(Card, Object.assign({
968
915
  className: classNames([styles$s.container, _defineProperty({}, className, className !== null)])
969
916
  }, props), description, loading ? /*#__PURE__*/React.createElement(Spinner, null) : children);
970
917
  };
971
-
972
918
  FormPanel.propTypes = propTypes$C;
973
919
  FormPanel.defaultProps = defaultProps$C;
974
920
 
@@ -990,14 +936,13 @@ var defaultProps$B = {
990
936
  noWrap: false,
991
937
  className: null
992
938
  };
993
-
994
939
  var Breadcrumb = function Breadcrumb(_ref) {
995
940
  var items = _ref.items,
996
- theme = _ref.theme,
997
- separator = _ref.separator,
998
- withoutBar = _ref.withoutBar,
999
- noWrap = _ref.noWrap,
1000
- className = _ref.className;
941
+ theme = _ref.theme,
942
+ separator = _ref.separator,
943
+ withoutBar = _ref.withoutBar,
944
+ noWrap = _ref.noWrap,
945
+ className = _ref.className;
1001
946
  return /*#__PURE__*/React.createElement("nav", {
1002
947
  className: className
1003
948
  }, /*#__PURE__*/React.createElement("ol", {
@@ -1009,13 +954,12 @@ var Breadcrumb = function Breadcrumb(_ref) {
1009
954
  }])
1010
955
  }, items.map(function (_ref2, index) {
1011
956
  var _ref3;
1012
-
1013
957
  var url = _ref2.url,
1014
- label = _ref2.label,
1015
- _ref2$active = _ref2.active,
1016
- active = _ref2$active === void 0 ? false : _ref2$active,
1017
- _ref2$onClick = _ref2.onClick,
1018
- onClick = _ref2$onClick === void 0 ? null : _ref2$onClick;
958
+ label = _ref2.label,
959
+ _ref2$active = _ref2.active,
960
+ active = _ref2$active === void 0 ? false : _ref2$active,
961
+ _ref2$onClick = _ref2.onClick,
962
+ onClick = _ref2$onClick === void 0 ? null : _ref2$onClick;
1019
963
  return /*#__PURE__*/React.createElement("li", {
1020
964
  className: classNames(['breadcrumb-item', (_ref3 = {
1021
965
  active: active
@@ -1031,7 +975,6 @@ var Breadcrumb = function Breadcrumb(_ref) {
1031
975
  }, /*#__PURE__*/React.createElement(Label, null, label)) : null);
1032
976
  })));
1033
977
  };
1034
-
1035
978
  Breadcrumb.propTypes = propTypes$B;
1036
979
  Breadcrumb.defaultProps = defaultProps$B;
1037
980
 
@@ -1056,32 +999,29 @@ var defaultProps$A = {
1056
999
  onClickItem: null,
1057
1000
  onClickOutside: null
1058
1001
  };
1059
-
1060
1002
  var Dropdown = function Dropdown(_ref) {
1061
1003
  var _ref2;
1062
-
1063
1004
  var items = _ref.items,
1064
- children = _ref.children,
1065
- visible = _ref.visible,
1066
- align = _ref.align,
1067
- className = _ref.className,
1068
- itemClassName = _ref.itemClassName,
1069
- onClickItem = _ref.onClickItem,
1070
- onClickOutside = _ref.onClickOutside;
1005
+ children = _ref.children,
1006
+ visible = _ref.visible,
1007
+ align = _ref.align,
1008
+ className = _ref.className,
1009
+ itemClassName = _ref.itemClassName,
1010
+ onClickItem = _ref.onClickItem,
1011
+ onClickOutside = _ref.onClickOutside;
1071
1012
  var refContainer = useRef(null);
1072
-
1073
1013
  var _useState = useState(visible),
1074
- _useState2 = _slicedToArray(_useState, 2),
1075
- enabled = _useState2[0],
1076
- setEnabled = _useState2[1];
1077
-
1014
+ _useState2 = _slicedToArray(_useState, 2),
1015
+ enabled = _useState2[0],
1016
+ setEnabled = _useState2[1];
1078
1017
  var onDocumentClick = useCallback(function (e) {
1079
1018
  if (refContainer.current && !refContainer.current.contains(e.currentTarget) && onClickOutside !== null) {
1080
1019
  onClickOutside(e);
1081
1020
  }
1082
1021
  }, [refContainer.current, onClickOutside]);
1083
- useDocumentEvent('click', onDocumentClick, enabled); // Delay the outside click detection
1022
+ useDocumentEvent('click', onDocumentClick, enabled);
1084
1023
 
1024
+ // Delay the outside click detection
1085
1025
  useEffect(function () {
1086
1026
  var id = setTimeout(function () {
1087
1027
  setEnabled(visible);
@@ -1095,23 +1035,20 @@ var Dropdown = function Dropdown(_ref) {
1095
1035
  ref: refContainer
1096
1036
  }, children !== null ? children : items.map(function (it, index) {
1097
1037
  var _ref3;
1098
-
1099
1038
  var _it$type = it.type,
1100
- type = _it$type === void 0 ? 'link' : _it$type,
1101
- _it$className = it.className,
1102
- customClassName = _it$className === void 0 ? null : _it$className,
1103
- _it$label = it.label,
1104
- label = _it$label === void 0 ? null : _it$label,
1105
- _it$children = it.children,
1106
- itemChildren = _it$children === void 0 ? null : _it$children,
1107
- _it$onClick = it.onClick,
1108
- customOnClick = _it$onClick === void 0 ? null : _it$onClick,
1109
- _it$active = it.active,
1110
- active = _it$active === void 0 ? false : _it$active,
1111
- itemProps = _objectWithoutProperties(it, _excluded$4);
1112
-
1039
+ type = _it$type === void 0 ? 'link' : _it$type,
1040
+ _it$className = it.className,
1041
+ customClassName = _it$className === void 0 ? null : _it$className,
1042
+ _it$label = it.label,
1043
+ label = _it$label === void 0 ? null : _it$label,
1044
+ _it$children = it.children,
1045
+ itemChildren = _it$children === void 0 ? null : _it$children,
1046
+ _it$onClick = it.onClick,
1047
+ customOnClick = _it$onClick === void 0 ? null : _it$onClick,
1048
+ _it$active = it.active,
1049
+ active = _it$active === void 0 ? false : _it$active,
1050
+ itemProps = _objectWithoutProperties(it, _excluded$4);
1113
1051
  var ItemComponent = 'div';
1114
-
1115
1052
  if (type === 'link') {
1116
1053
  ItemComponent = Link;
1117
1054
  } else if (type === 'button') {
@@ -1121,12 +1058,10 @@ var Dropdown = function Dropdown(_ref) {
1121
1058
  } else if (type === 'divider') {
1122
1059
  ItemComponent = 'hr';
1123
1060
  }
1124
-
1125
1061
  var finalOnClickItem = customOnClick !== null || type === 'link' && onClickItem !== null ? function (e) {
1126
1062
  if (customOnClick !== null) {
1127
1063
  customOnClick(e);
1128
1064
  }
1129
-
1130
1065
  if (type === 'link' && onClickItem !== null) {
1131
1066
  onClickItem(e);
1132
1067
  }
@@ -1143,7 +1078,6 @@ var Dropdown = function Dropdown(_ref) {
1143
1078
  }, itemProps), label !== null ? /*#__PURE__*/React.createElement(Label, null, label) : itemChildren)) : null;
1144
1079
  }));
1145
1080
  };
1146
-
1147
1081
  Dropdown.propTypes = propTypes$A;
1148
1082
  Dropdown.defaultProps = defaultProps$A;
1149
1083
 
@@ -1186,63 +1120,57 @@ var defaultProps$z = {
1186
1120
  dropdownLinkClassName: null,
1187
1121
  dropdownAlign: null
1188
1122
  };
1189
-
1190
1123
  var Menu = function Menu(_ref) {
1191
1124
  var items = _ref.items,
1192
- tagName = _ref.tagName,
1193
- itemTagName = _ref.itemTagName,
1194
- children = _ref.children,
1195
- linkAsItem = _ref.linkAsItem,
1196
- className = _ref.className,
1197
- itemClassName = _ref.itemClassName,
1198
- linkClassName = _ref.linkClassName,
1199
- hasSubMenuClassName = _ref.hasSubMenuClassName,
1200
- subMenuClassName = _ref.subMenuClassName,
1201
- subMenuItemClassName = _ref.subMenuItemClassName,
1202
- subMenuLinkClassName = _ref.subMenuLinkClassName,
1203
- hasDropdownClassName = _ref.hasDropdownClassName,
1204
- dropdownClassName = _ref.dropdownClassName,
1205
- dropdownItemClassName = _ref.dropdownItemClassName,
1206
- dropdownLinkClassName = _ref.dropdownLinkClassName,
1207
- dropdownAlign = _ref.dropdownAlign;
1208
-
1125
+ tagName = _ref.tagName,
1126
+ itemTagName = _ref.itemTagName,
1127
+ children = _ref.children,
1128
+ linkAsItem = _ref.linkAsItem,
1129
+ className = _ref.className,
1130
+ itemClassName = _ref.itemClassName,
1131
+ linkClassName = _ref.linkClassName,
1132
+ hasSubMenuClassName = _ref.hasSubMenuClassName,
1133
+ subMenuClassName = _ref.subMenuClassName,
1134
+ subMenuItemClassName = _ref.subMenuItemClassName,
1135
+ subMenuLinkClassName = _ref.subMenuLinkClassName,
1136
+ hasDropdownClassName = _ref.hasDropdownClassName,
1137
+ dropdownClassName = _ref.dropdownClassName,
1138
+ dropdownItemClassName = _ref.dropdownItemClassName,
1139
+ dropdownLinkClassName = _ref.dropdownLinkClassName,
1140
+ dropdownAlign = _ref.dropdownAlign;
1209
1141
  var _useState = useState(items.map(function () {
1210
- return false;
1211
- })),
1212
- _useState2 = _slicedToArray(_useState, 2),
1213
- dropdownsVisible = _useState2[0],
1214
- setDropdownsVisible = _useState2[1];
1215
-
1142
+ return false;
1143
+ })),
1144
+ _useState2 = _slicedToArray(_useState, 2),
1145
+ dropdownsVisible = _useState2[0],
1146
+ setDropdownsVisible = _useState2[1];
1216
1147
  var ListComponent = linkAsItem ? 'div' : tagName;
1217
1148
  return /*#__PURE__*/React.createElement(ListComponent, {
1218
1149
  className: className
1219
1150
  }, children !== null ? children : items.map(function (it, index) {
1220
1151
  var _classNames, _classNames2, _classNames3, _classNames4, _classNames5, _classNames6, _classNames7, _classNames8;
1221
-
1222
1152
  var id = it.id,
1223
- _it$className = it.className,
1224
- customClassName = _it$className === void 0 ? null : _it$className,
1225
- _it$linkClassName = it.linkClassName,
1226
- customLinkClassName = _it$linkClassName === void 0 ? null : _it$linkClassName,
1227
- _it$href = it.href,
1228
- href = _it$href === void 0 ? null : _it$href,
1229
- label = it.label,
1230
- _it$external = it.external,
1231
- external = _it$external === void 0 ? false : _it$external,
1232
- _it$items = it.items,
1233
- subItems = _it$items === void 0 ? null : _it$items,
1234
- _it$dropdown = it.dropdown,
1235
- dropdown = _it$dropdown === void 0 ? null : _it$dropdown,
1236
- _it$active = it.active,
1237
- active = _it$active === void 0 ? false : _it$active,
1238
- _it$onClick = it.onClick,
1239
- customOnClick = _it$onClick === void 0 ? null : _it$onClick,
1240
- itemProps = _objectWithoutProperties(it, _excluded$3);
1241
-
1153
+ _it$className = it.className,
1154
+ customClassName = _it$className === void 0 ? null : _it$className,
1155
+ _it$linkClassName = it.linkClassName,
1156
+ customLinkClassName = _it$linkClassName === void 0 ? null : _it$linkClassName,
1157
+ _it$href = it.href,
1158
+ href = _it$href === void 0 ? null : _it$href,
1159
+ label = it.label,
1160
+ _it$external = it.external,
1161
+ external = _it$external === void 0 ? false : _it$external,
1162
+ _it$items = it.items,
1163
+ subItems = _it$items === void 0 ? null : _it$items,
1164
+ _it$dropdown = it.dropdown,
1165
+ dropdown = _it$dropdown === void 0 ? null : _it$dropdown,
1166
+ _it$active = it.active,
1167
+ active = _it$active === void 0 ? false : _it$active,
1168
+ _it$onClick = it.onClick,
1169
+ customOnClick = _it$onClick === void 0 ? null : _it$onClick,
1170
+ itemProps = _objectWithoutProperties(it, _excluded$3);
1242
1171
  var onClickItem = dropdown !== null ? function (e) {
1243
1172
  e.preventDefault();
1244
1173
  setDropdownsVisible([].concat(_toConsumableArray(dropdownsVisible.slice(0, index)), [!(dropdownsVisible[index] || false)], _toConsumableArray(dropdownsVisible.slice(index + 1))));
1245
-
1246
1174
  if (customOnClick !== null) {
1247
1175
  customOnClick(e);
1248
1176
  }
@@ -1290,7 +1218,6 @@ var Menu = function Menu(_ref) {
1290
1218
  }) : null);
1291
1219
  }));
1292
1220
  };
1293
-
1294
1221
  Menu.propTypes = propTypes$z;
1295
1222
  Menu.defaultProps = defaultProps$z;
1296
1223
 
@@ -1328,30 +1255,26 @@ var defaultProps$y = {
1328
1255
  breadCrumbsClassName: null,
1329
1256
  collapseClassName: null
1330
1257
  };
1331
-
1332
1258
  var Navbar = function Navbar(_ref) {
1333
1259
  var _ref2, _ref6;
1334
-
1335
1260
  var brand = _ref.brand,
1336
- brandLink = _ref.brandLink,
1337
- breadcrumbs = _ref.breadcrumbs,
1338
- theme = _ref.theme,
1339
- size = _ref.size,
1340
- compact = _ref.compact,
1341
- noWrap = _ref.noWrap,
1342
- withoutCollapse = _ref.withoutCollapse,
1343
- withoutCollapseToggle = _ref.withoutCollapseToggle,
1344
- children = _ref.children,
1345
- className = _ref.className,
1346
- brandClassName = _ref.brandClassName,
1347
- breadCrumbsClassName = _ref.breadCrumbsClassName,
1348
- collapseClassName = _ref.collapseClassName;
1349
-
1261
+ brandLink = _ref.brandLink,
1262
+ breadcrumbs = _ref.breadcrumbs,
1263
+ theme = _ref.theme,
1264
+ size = _ref.size,
1265
+ compact = _ref.compact,
1266
+ noWrap = _ref.noWrap,
1267
+ withoutCollapse = _ref.withoutCollapse,
1268
+ withoutCollapseToggle = _ref.withoutCollapseToggle,
1269
+ children = _ref.children,
1270
+ className = _ref.className,
1271
+ brandClassName = _ref.brandClassName,
1272
+ breadCrumbsClassName = _ref.breadCrumbsClassName,
1273
+ collapseClassName = _ref.collapseClassName;
1350
1274
  var _useState = useState(false),
1351
- _useState2 = _slicedToArray(_useState, 2),
1352
- menuVisible = _useState2[0],
1353
- setMenuVisible = _useState2[1];
1354
-
1275
+ _useState2 = _slicedToArray(_useState, 2),
1276
+ menuVisible = _useState2[0],
1277
+ setMenuVisible = _useState2[1];
1355
1278
  var onClickMenu = useCallback(function () {
1356
1279
  return setMenuVisible(!menuVisible);
1357
1280
  }, [setMenuVisible, menuVisible]);
@@ -1387,7 +1310,6 @@ var Navbar = function Navbar(_ref) {
1387
1310
  className: classNames(['navbar-collapse', 'collapse', styles$q.collapse, (_ref6 = {}, _defineProperty(_ref6, collapseClassName, collapseClassName !== null), _defineProperty(_ref6, "show", menuVisible), _ref6)])
1388
1311
  }, children) : children));
1389
1312
  };
1390
-
1391
1313
  Navbar.propTypes = propTypes$y;
1392
1314
  Navbar.defaultProps = defaultProps$y;
1393
1315
 
@@ -1431,25 +1353,22 @@ var defaultProps$x = {
1431
1353
  linkClassName: null,
1432
1354
  onClickPage: null
1433
1355
  };
1434
-
1435
1356
  var PaginationMenu = function PaginationMenu(_ref) {
1436
1357
  var page = _ref.page,
1437
- total = _ref.total,
1438
- url = _ref.url,
1439
- withPreviousNext = _ref.withPreviousNext,
1440
- className = _ref.className,
1441
- paginationClassName = _ref.paginationClassName,
1442
- itemClassName = _ref.itemClassName,
1443
- linkClassName = _ref.linkClassName,
1444
- onClickPage = _ref.onClickPage;
1358
+ total = _ref.total,
1359
+ url = _ref.url,
1360
+ withPreviousNext = _ref.withPreviousNext,
1361
+ className = _ref.className,
1362
+ paginationClassName = _ref.paginationClassName,
1363
+ itemClassName = _ref.itemClassName,
1364
+ linkClassName = _ref.linkClassName,
1365
+ onClickPage = _ref.onClickPage;
1445
1366
  var getUrl = useCallback(function (currentPage) {
1446
1367
  return url !== null ? "".concat(url).concat(url.indexOf('?') !== -1 ? "&page=".concat(currentPage) : "?page=".concat(currentPage)) : null;
1447
1368
  }, [url]);
1448
-
1449
1369
  var pages = _toConsumableArray(Array(total).keys()).map(function (it) {
1450
1370
  return it + 1;
1451
1371
  });
1452
-
1453
1372
  return /*#__PURE__*/React.createElement("nav", {
1454
1373
  className: classNames([styles$p.container, _defineProperty({}, className, className !== null)])
1455
1374
  }, /*#__PURE__*/React.createElement("ul", {
@@ -1493,7 +1412,6 @@ var PaginationMenu = function PaginationMenu(_ref) {
1493
1412
  className: classNames(['page-link', _defineProperty({}, linkClassName, linkClassName !== null)])
1494
1413
  }, /*#__PURE__*/React.createElement(Label, null, messages.next))) : null));
1495
1414
  };
1496
-
1497
1415
  PaginationMenu.propTypes = propTypes$x;
1498
1416
  PaginationMenu.defaultProps = defaultProps$x;
1499
1417
 
@@ -1517,15 +1435,14 @@ var defaultProps$w = {
1517
1435
  className: null,
1518
1436
  onClickItem: null
1519
1437
  };
1520
-
1521
1438
  var TabsMenu = function TabsMenu(_ref) {
1522
1439
  var items = _ref.items,
1523
- size = _ref.size,
1524
- theme = _ref.theme,
1525
- renderItemButton = _ref.renderItemButton,
1526
- buttonClassName = _ref.buttonClassName,
1527
- className = _ref.className,
1528
- onClickItem = _ref.onClickItem;
1440
+ size = _ref.size,
1441
+ theme = _ref.theme,
1442
+ renderItemButton = _ref.renderItemButton,
1443
+ buttonClassName = _ref.buttonClassName,
1444
+ className = _ref.className,
1445
+ onClickItem = _ref.onClickItem;
1529
1446
  return /*#__PURE__*/React.createElement("div", {
1530
1447
  className: classNames([styles$o.container, _defineProperty({}, className, className)])
1531
1448
  }, /*#__PURE__*/React.createElement(Buttons, {
@@ -1538,7 +1455,6 @@ var TabsMenu = function TabsMenu(_ref) {
1538
1455
  buttonClassName: classNames([styles$o.button, _defineProperty({}, buttonClassName, buttonClassName !== null)])
1539
1456
  }));
1540
1457
  };
1541
-
1542
1458
  TabsMenu.propTypes = propTypes$w;
1543
1459
  TabsMenu.defaultProps = defaultProps$w;
1544
1460
 
@@ -1552,11 +1468,10 @@ var propTypes$v = {
1552
1468
  var defaultProps$v = {
1553
1469
  className: null
1554
1470
  };
1555
-
1556
1471
  var ModalsContainer = function ModalsContainer(_ref) {
1557
1472
  var modals = _ref.modals,
1558
- setModalsContainer = _ref.setModalsContainer,
1559
- className = _ref.className;
1473
+ setModalsContainer = _ref.setModalsContainer,
1474
+ className = _ref.className;
1560
1475
  var containerRef = useRef(null);
1561
1476
  useEffect(function () {
1562
1477
  setModalsContainer(containerRef.current);
@@ -1568,7 +1483,6 @@ var ModalsContainer = function ModalsContainer(_ref) {
1568
1483
  ref: containerRef
1569
1484
  }));
1570
1485
  };
1571
-
1572
1486
  ModalsContainer.propTypes = propTypes$v;
1573
1487
  ModalsContainer.defaultProps = defaultProps$v;
1574
1488
  var Modals = withModals(ModalsContainer);
@@ -1594,14 +1508,13 @@ var defaultProps$u = {
1594
1508
  unregister: null,
1595
1509
  children: null
1596
1510
  };
1597
-
1598
1511
  var ElementPortal = function ElementPortal(_ref) {
1599
1512
  var id = _ref.id,
1600
- data = _ref.data,
1601
- children = _ref.children,
1602
- container = _ref.container,
1603
- register = _ref.register,
1604
- unregister = _ref.unregister;
1513
+ data = _ref.data,
1514
+ children = _ref.children,
1515
+ container = _ref.container,
1516
+ register = _ref.register,
1517
+ unregister = _ref.unregister;
1605
1518
  var finalId = useMemo(function () {
1606
1519
  return id || "element-".concat(new Date().getTime());
1607
1520
  }, [id]);
@@ -1609,7 +1522,6 @@ var ElementPortal = function ElementPortal(_ref) {
1609
1522
  if (register !== null) {
1610
1523
  register(finalId, data);
1611
1524
  }
1612
-
1613
1525
  return function () {
1614
1526
  if (unregister !== null) {
1615
1527
  unregister(finalId);
@@ -1618,7 +1530,6 @@ var ElementPortal = function ElementPortal(_ref) {
1618
1530
  }, [finalId, data]);
1619
1531
  return container !== null ? /*#__PURE__*/ReactDOM.createPortal(children, container) : null;
1620
1532
  };
1621
-
1622
1533
  ElementPortal.propTypes = propTypes$u;
1623
1534
  ElementPortal.defaultProps = defaultProps$u;
1624
1535
 
@@ -1634,19 +1545,16 @@ var defaultProps$t = {
1634
1545
  data: null,
1635
1546
  children: null
1636
1547
  };
1637
-
1638
1548
  var ModalPortal = function ModalPortal(_ref) {
1639
1549
  var id = _ref.id,
1640
- data = _ref.data,
1641
- children = _ref.children;
1642
-
1550
+ data = _ref.data,
1551
+ children = _ref.children;
1643
1552
  var _useModals = useModals(),
1644
- container = _useModals.container,
1645
- _useModals$register = _useModals.register,
1646
- register = _useModals$register === void 0 ? null : _useModals$register,
1647
- _useModals$unregister = _useModals.unregister,
1648
- unregister = _useModals$unregister === void 0 ? null : _useModals$unregister;
1649
-
1553
+ container = _useModals.container,
1554
+ _useModals$register = _useModals.register,
1555
+ register = _useModals$register === void 0 ? null : _useModals$register,
1556
+ _useModals$unregister = _useModals.unregister,
1557
+ unregister = _useModals$unregister === void 0 ? null : _useModals$unregister;
1650
1558
  return /*#__PURE__*/React.createElement(ElementPortal, {
1651
1559
  id: id,
1652
1560
  data: data,
@@ -1655,7 +1563,6 @@ var ModalPortal = function ModalPortal(_ref) {
1655
1563
  unregister: unregister
1656
1564
  }, children);
1657
1565
  };
1658
-
1659
1566
  ModalPortal.propTypes = propTypes$t;
1660
1567
  ModalPortal.defaultProps = defaultProps$t;
1661
1568
 
@@ -1671,12 +1578,11 @@ var defaultProps$s = {
1671
1578
  position: 'center',
1672
1579
  children: null
1673
1580
  };
1674
-
1675
1581
  var Modal = function Modal(_ref) {
1676
1582
  var id = _ref.id,
1677
- children = _ref.children,
1678
- position = _ref.position,
1679
- title = _ref.title;
1583
+ children = _ref.children,
1584
+ position = _ref.position,
1585
+ title = _ref.title;
1680
1586
  var finalId = useMemo(function () {
1681
1587
  return id || getDisplayName(children.type);
1682
1588
  }, [id, children.type]);
@@ -1694,7 +1600,6 @@ var Modal = function Modal(_ref) {
1694
1600
  className: classNames([styles$m.inner, 'bg-dark'])
1695
1601
  }, children)));
1696
1602
  };
1697
-
1698
1603
  Modal.propTypes = propTypes$s;
1699
1604
  Modal.defaultProps = defaultProps$s;
1700
1605
 
@@ -1720,22 +1625,22 @@ var defaultProps$r = {
1720
1625
  onClickClose: null,
1721
1626
  className: null
1722
1627
  };
1723
-
1724
1628
  var ModalDialog = function ModalDialog(_ref) {
1725
1629
  var title = _ref.title,
1726
- header = _ref.header,
1727
- children = _ref.children,
1728
- buttons = _ref.buttons,
1729
- footer = _ref.footer,
1730
- onClickClose = _ref.onClickClose,
1731
- className = _ref.className;
1630
+ header = _ref.header,
1631
+ children = _ref.children,
1632
+ buttons = _ref.buttons,
1633
+ footer = _ref.footer,
1634
+ onClickClose = _ref.onClickClose,
1635
+ className = _ref.className;
1732
1636
  return /*#__PURE__*/React.createElement("div", {
1733
1637
  className: classNames(['modal-dialog', styles$l.container, _defineProperty({}, className, className)]),
1734
1638
  role: "dialog"
1735
1639
  }, /*#__PURE__*/React.createElement("div", {
1736
1640
  className: "modal-content"
1737
1641
  }, header || /*#__PURE__*/React.createElement("div", {
1738
- className: classNames(['modal-header', 'p-2', styles$l.header, {// 'bg-dark': theme === 'dark',
1642
+ className: classNames(['modal-header', 'p-2', styles$l.header, {
1643
+ // 'bg-dark': theme === 'dark',
1739
1644
  // 'border-dark': theme === 'dark',
1740
1645
  // 'text-light': theme === 'dark',
1741
1646
  }])
@@ -1747,7 +1652,8 @@ var ModalDialog = function ModalDialog(_ref) {
1747
1652
  "aria-label": "Close",
1748
1653
  onClick: onClickClose
1749
1654
  })), /*#__PURE__*/React.createElement("div", {
1750
- className: classNames(['modal-body', 'p-2', styles$l.body, {// [`bg-${theme}`]: theme !== null,
1655
+ className: classNames(['modal-body', 'p-2', styles$l.body, {
1656
+ // [`bg-${theme}`]: theme !== null,
1751
1657
  // 'text-light': theme === 'dark',
1752
1658
  // 'bg-dark': theme === 'dark',
1753
1659
  }])
@@ -1758,7 +1664,6 @@ var ModalDialog = function ModalDialog(_ref) {
1758
1664
  className: styles$l.buttons
1759
1665
  }) : null) : null));
1760
1666
  };
1761
-
1762
1667
  ModalDialog.propTypes = propTypes$r;
1763
1668
  ModalDialog.defaultProps = defaultProps$r;
1764
1669
 
@@ -1785,13 +1690,12 @@ var defaultProps$q = {
1785
1690
  onUploaded: null,
1786
1691
  onRequestClose: null
1787
1692
  };
1788
-
1789
1693
  var UploadModal = function UploadModal(_ref2) {
1790
1694
  var type = _ref2.type,
1791
- opened = _ref2.opened,
1792
- sources = _ref2.sources,
1793
- onUploaded = _ref2.onUploaded,
1794
- onRequestClose = _ref2.onRequestClose;
1695
+ opened = _ref2.opened,
1696
+ sources = _ref2.sources,
1697
+ onUploaded = _ref2.onUploaded,
1698
+ onRequestClose = _ref2.onRequestClose;
1795
1699
  var onUppyComplete = useCallback(function (response) {
1796
1700
  if (onUploaded !== null) {
1797
1701
  onUploaded(response);
@@ -1805,7 +1709,6 @@ var UploadModal = function UploadModal(_ref2) {
1805
1709
  return t !== null;
1806
1710
  });
1807
1711
  }
1808
-
1809
1712
  return ['image', 'video', 'audio'].indexOf(type) !== -1 ? ["".concat(type, "/*")] : null;
1810
1713
  }, [type]);
1811
1714
  var uppy = useUppy({
@@ -1828,7 +1731,6 @@ var UploadModal = function UploadModal(_ref2) {
1828
1731
  plugins: sources
1829
1732
  })) : null;
1830
1733
  };
1831
-
1832
1734
  UploadModal.propTypes = propTypes$q;
1833
1735
  UploadModal.defaultProps = defaultProps$q;
1834
1736
 
@@ -1844,11 +1746,10 @@ var defaultProps$p = {
1844
1746
  setPanelsContainer: null,
1845
1747
  className: null
1846
1748
  };
1847
-
1848
1749
  var PanelsContainer = function PanelsContainer(_ref) {
1849
1750
  var panels = _ref.panels,
1850
- setPanelsContainer = _ref.setPanelsContainer,
1851
- className = _ref.className;
1751
+ setPanelsContainer = _ref.setPanelsContainer,
1752
+ className = _ref.className;
1852
1753
  var containerRef = useRef(null);
1853
1754
  useEffect(function () {
1854
1755
  setPanelsContainer(containerRef.current);
@@ -1860,7 +1761,6 @@ var PanelsContainer = function PanelsContainer(_ref) {
1860
1761
  ref: containerRef
1861
1762
  }));
1862
1763
  };
1863
-
1864
1764
  PanelsContainer.propTypes = propTypes$p;
1865
1765
  PanelsContainer.defaultProps = defaultProps$p;
1866
1766
  var Panels = withPanels(PanelsContainer);
@@ -1877,25 +1777,21 @@ var defaultProps$o = {
1877
1777
  data: null,
1878
1778
  children: null
1879
1779
  };
1880
-
1881
1780
  var PanelPortal = function PanelPortal(_ref) {
1882
1781
  var id = _ref.id,
1883
- data = _ref.data,
1884
- children = _ref.children;
1885
-
1782
+ data = _ref.data,
1783
+ children = _ref.children;
1886
1784
  var _usePanels = usePanels(),
1887
- _usePanels$panels = _usePanels.panels,
1888
- panels = _usePanels$panels === void 0 ? null : _usePanels$panels,
1889
- container = _usePanels.container,
1890
- _usePanels$register = _usePanels.register,
1891
- register = _usePanels$register === void 0 ? null : _usePanels$register,
1892
- _usePanels$unregister = _usePanels.unregister,
1893
- unregister = _usePanels$unregister === void 0 ? null : _usePanels$unregister;
1894
-
1785
+ _usePanels$panels = _usePanels.panels,
1786
+ panels = _usePanels$panels === void 0 ? null : _usePanels$panels,
1787
+ container = _usePanels.container,
1788
+ _usePanels$register = _usePanels.register,
1789
+ register = _usePanels$register === void 0 ? null : _usePanels$register,
1790
+ _usePanels$unregister = _usePanels.unregister,
1791
+ unregister = _usePanels$unregister === void 0 ? null : _usePanels$unregister;
1895
1792
  if (panels === null) {
1896
1793
  return children;
1897
1794
  }
1898
-
1899
1795
  return /*#__PURE__*/React.createElement(ElementPortal, {
1900
1796
  id: id,
1901
1797
  data: data,
@@ -1904,7 +1800,6 @@ var PanelPortal = function PanelPortal(_ref) {
1904
1800
  unregister: unregister
1905
1801
  }, children);
1906
1802
  };
1907
-
1908
1803
  PanelPortal.propTypes = propTypes$o;
1909
1804
  PanelPortal.defaultProps = defaultProps$o;
1910
1805
 
@@ -1921,11 +1816,10 @@ var defaultProps$n = {
1921
1816
  title: null,
1922
1817
  children: null
1923
1818
  };
1924
-
1925
1819
  var Panel = function Panel(_ref) {
1926
1820
  var id = _ref.id,
1927
- children = _ref.children,
1928
- title = _ref.title;
1821
+ children = _ref.children,
1822
+ title = _ref.title;
1929
1823
  var finalId = useMemo(function () {
1930
1824
  return id || getDisplayName(children.type);
1931
1825
  }, [id, children.type]);
@@ -1941,7 +1835,6 @@ var Panel = function Panel(_ref) {
1941
1835
  className: styles$j.container
1942
1836
  }, children));
1943
1837
  };
1944
-
1945
1838
  Panel.propTypes = propTypes$n;
1946
1839
  Panel.defaultProps = defaultProps$n;
1947
1840
 
@@ -1965,23 +1858,19 @@ var defaultProps$m = {
1965
1858
  openedClassName: null,
1966
1859
  buttonClassName: null
1967
1860
  };
1968
-
1969
1861
  var CollapsablePanel = function CollapsablePanel(_ref) {
1970
1862
  var _ref2;
1971
-
1972
1863
  var title = _ref.title,
1973
- children = _ref.children,
1974
- className = _ref.className,
1975
- topClassName = _ref.topClassName,
1976
- contentClassName = _ref.contentClassName,
1977
- openedClassName = _ref.openedClassName,
1978
- buttonClassName = _ref.buttonClassName;
1979
-
1864
+ children = _ref.children,
1865
+ className = _ref.className,
1866
+ topClassName = _ref.topClassName,
1867
+ contentClassName = _ref.contentClassName,
1868
+ openedClassName = _ref.openedClassName,
1869
+ buttonClassName = _ref.buttonClassName;
1980
1870
  var _useState = useState(false),
1981
- _useState2 = _slicedToArray(_useState, 2),
1982
- opened = _useState2[0],
1983
- setOpened = _useState2[1];
1984
-
1871
+ _useState2 = _slicedToArray(_useState, 2),
1872
+ opened = _useState2[0],
1873
+ setOpened = _useState2[1];
1985
1874
  var onClick = useCallback(function () {
1986
1875
  return setOpened(!opened);
1987
1876
  }, [opened, setOpened]);
@@ -2003,7 +1892,6 @@ var CollapsablePanel = function CollapsablePanel(_ref) {
2003
1892
  className: classNames([styles$i.content, _defineProperty({}, contentClassName, contentClassName !== null)])
2004
1893
  }, children));
2005
1894
  };
2006
-
2007
1895
  CollapsablePanel.propTypes = propTypes$m;
2008
1896
  CollapsablePanel.defaultProps = defaultProps$m;
2009
1897
 
@@ -2019,12 +1907,11 @@ var defaultProps$l = {
2019
1907
  fill: '#fff',
2020
1908
  className: null
2021
1909
  };
2022
-
2023
1910
  var Close = function Close(_ref) {
2024
1911
  var stroke = _ref.stroke,
2025
- border = _ref.border,
2026
- fill = _ref.fill,
2027
- className = _ref.className;
1912
+ border = _ref.border,
1913
+ fill = _ref.fill,
1914
+ className = _ref.className;
2028
1915
  return /*#__PURE__*/React.createElement("svg", {
2029
1916
  xmlns: "http://www.w3.org/2000/svg",
2030
1917
  width: "42.9",
@@ -2057,7 +1944,6 @@ var Close = function Close(_ref) {
2057
1944
  d: "M0.3,0l13.7,14.2"
2058
1945
  })))));
2059
1946
  };
2060
-
2061
1947
  Close.propTypes = propTypes$l;
2062
1948
  Close.defaultProps = defaultProps$l;
2063
1949
 
@@ -2072,11 +1958,10 @@ var defaultProps$k = {
2072
1958
  withTime: false,
2073
1959
  timeSeparator: ', '
2074
1960
  };
2075
-
2076
1961
  var Date$1 = function Date(_ref) {
2077
1962
  var date = _ref.date,
2078
- withTime = _ref.withTime,
2079
- timeSeparator = _ref.timeSeparator;
1963
+ withTime = _ref.withTime,
1964
+ timeSeparator = _ref.timeSeparator;
2080
1965
  var dateObject = useMemo(function () {
2081
1966
  return dayjs(date).toDate();
2082
1967
  }, [date]);
@@ -2089,7 +1974,6 @@ var Date$1 = function Date(_ref) {
2089
1974
  value: dateObject
2090
1975
  }) : null);
2091
1976
  };
2092
-
2093
1977
  Date$1.propTypes = propTypes$k;
2094
1978
  Date$1.defaultProps = defaultProps$k;
2095
1979
 
@@ -2114,47 +1998,39 @@ var defaultProps$j = {
2114
1998
  children: null,
2115
1999
  className: null
2116
2000
  };
2117
-
2118
2001
  var Detector = function Detector(_ref) {
2119
2002
  var throttleDelay = _ref.throttleDelay,
2120
- threshold = _ref.threshold,
2121
- onEnter = _ref.onEnter,
2122
- onLeave = _ref.onLeave,
2123
- onChange = _ref.onChange,
2124
- disabled = _ref.disabled,
2125
- children = _ref.children,
2126
- className = _ref.className;
2127
-
2003
+ threshold = _ref.threshold,
2004
+ onEnter = _ref.onEnter,
2005
+ onLeave = _ref.onLeave,
2006
+ onChange = _ref.onChange,
2007
+ disabled = _ref.disabled,
2008
+ children = _ref.children,
2009
+ className = _ref.className;
2128
2010
  var _useIntersectionObser = useIntersectionObserver({
2129
- threshold: threshold
2130
- }),
2131
- ref = _useIntersectionObser.ref,
2132
- isIntersecting = _useIntersectionObser.entry.isIntersecting;
2133
-
2011
+ threshold: threshold
2012
+ }),
2013
+ ref = _useIntersectionObser.ref,
2014
+ isIntersecting = _useIntersectionObser.entry.isIntersecting;
2134
2015
  var enteredRef = useRef(false);
2135
2016
  var triggerChange = useMemo(function () {
2136
2017
  var callback = function callback(intersecting) {
2137
2018
  var entered = enteredRef.current;
2138
-
2139
2019
  if (onEnter !== null && intersecting && !entered) {
2140
2020
  onEnter();
2141
2021
  }
2142
-
2143
2022
  if (onLeave !== null && !intersecting && entered) {
2144
2023
  onLeave();
2145
2024
  }
2146
-
2147
2025
  if (onChange !== null) {
2148
2026
  onChange(intersecting);
2149
2027
  }
2150
-
2151
2028
  if (intersecting && !entered) {
2152
2029
  enteredRef.current = true;
2153
2030
  } else if (!intersecting && entered) {
2154
2031
  enteredRef.current = false;
2155
2032
  }
2156
2033
  };
2157
-
2158
2034
  return throttleDelay !== null ? throttle(callback, throttleDelay, {
2159
2035
  trailing: true,
2160
2036
  leading: true
@@ -2164,7 +2040,6 @@ var Detector = function Detector(_ref) {
2164
2040
  if (disabled) {
2165
2041
  return function () {};
2166
2042
  }
2167
-
2168
2043
  triggerChange(isIntersecting);
2169
2044
  return function () {
2170
2045
  if (throttleDelay !== null) {
@@ -2177,7 +2052,6 @@ var Detector = function Detector(_ref) {
2177
2052
  ref: ref
2178
2053
  }, children);
2179
2054
  };
2180
-
2181
2055
  Detector.propTypes = propTypes$j;
2182
2056
  Detector.defaultProps = defaultProps$j;
2183
2057
 
@@ -2201,17 +2075,15 @@ var defaultProps$i = {
2201
2075
  children: null,
2202
2076
  withInvertedColors: true
2203
2077
  };
2204
-
2205
2078
  var PlaceholderBlock = function PlaceholderBlock(_ref) {
2206
2079
  var _ref2;
2207
-
2208
2080
  var width = _ref.width,
2209
- height = _ref.height,
2210
- outline = _ref.outline,
2211
- className = _ref.className,
2212
- boxClassName = _ref.boxClassName,
2213
- withInvertedColors = _ref.withInvertedColors,
2214
- children = _ref.children;
2081
+ height = _ref.height,
2082
+ outline = _ref.outline,
2083
+ className = _ref.className,
2084
+ boxClassName = _ref.boxClassName,
2085
+ withInvertedColors = _ref.withInvertedColors,
2086
+ children = _ref.children;
2215
2087
  return /*#__PURE__*/React.createElement("div", {
2216
2088
  className: classNames([styles$h.container, (_ref2 = {}, _defineProperty(_ref2, className, className !== null), _defineProperty(_ref2, styles$h.outline, outline), _defineProperty(_ref2, styles$h.withInvertedColors, withInvertedColors), _ref2)])
2217
2089
  }, /*#__PURE__*/React.createElement("div", {
@@ -2222,12 +2094,13 @@ var PlaceholderBlock = function PlaceholderBlock(_ref) {
2222
2094
  }
2223
2095
  }, children));
2224
2096
  };
2225
-
2226
2097
  PlaceholderBlock.propTypes = propTypes$i;
2227
2098
  PlaceholderBlock.defaultProps = defaultProps$i;
2228
2099
 
2229
2100
  /* eslint-disable react/jsx-props-no-spreading */
2230
2101
 
2102
+ // import { PropTypes as MicromagPropTypes } from '@micromag/core';
2103
+
2231
2104
  var propTypes$h = {
2232
2105
  name: PropTypes$1.string.isRequired,
2233
2106
  components: PropTypes$1.object.isRequired,
@@ -2237,44 +2110,37 @@ var propTypes$h = {
2237
2110
  isPlaceholder: PropTypes$1.bool,
2238
2111
  className: PropTypes$1.string,
2239
2112
  placeholderProps: PropTypes$1.object // eslint-disable-line
2240
-
2241
2113
  };
2114
+
2242
2115
  var defaultProps$h = {
2243
2116
  props: {},
2244
2117
  isPlaceholder: false,
2245
2118
  className: null,
2246
2119
  placeholderProps: null
2247
2120
  };
2248
-
2249
2121
  var ElementComponent = function ElementComponent(_ref) {
2250
2122
  var name = _ref.name,
2251
- components = _ref.components,
2252
- props = _ref.props,
2253
- isPlaceholder = _ref.isPlaceholder,
2254
- className = _ref.className,
2255
- placeholderProps = _ref.placeholderProps;
2256
-
2123
+ components = _ref.components,
2124
+ props = _ref.props,
2125
+ isPlaceholder = _ref.isPlaceholder,
2126
+ className = _ref.className,
2127
+ placeholderProps = _ref.placeholderProps;
2257
2128
  if (!name) {
2258
2129
  return 'Bad component name';
2259
2130
  }
2260
-
2261
2131
  if (isPlaceholder) {
2262
2132
  // TODO: figure out what this did
2263
2133
  // const PlaceholderComponent = Placeholders[pascalCase(name)];
2264
2134
  return /*#__PURE__*/React.createElement(PlaceholderBlock, placeholderProps);
2265
2135
  }
2266
-
2267
2136
  var RealComponent = components[pascalCase(name)];
2268
-
2269
2137
  if (!RealComponent) {
2270
2138
  return 'Bad component';
2271
2139
  }
2272
-
2273
2140
  return /*#__PURE__*/React.createElement(RealComponent, Object.assign({}, props, {
2274
2141
  className: className
2275
2142
  }));
2276
2143
  };
2277
-
2278
2144
  ElementComponent.propTypes = propTypes$h;
2279
2145
  ElementComponent.defaultProps = defaultProps$h;
2280
2146
 
@@ -2292,60 +2158,49 @@ var defaultProps$g = {
2292
2158
  light: false,
2293
2159
  className: null
2294
2160
  };
2295
-
2296
2161
  var Empty = function Empty(_ref) {
2297
2162
  var _ref2;
2298
-
2299
2163
  var children = _ref.children,
2300
- withoutBorder = _ref.withoutBorder,
2301
- light = _ref.light,
2302
- className = _ref.className;
2164
+ withoutBorder = _ref.withoutBorder,
2165
+ light = _ref.light,
2166
+ className = _ref.className;
2303
2167
  return /*#__PURE__*/React.createElement("div", {
2304
2168
  className: classNames([styles$g.container, (_ref2 = {}, _defineProperty(_ref2, styles$g.withoutBorder, withoutBorder), _defineProperty(_ref2, styles$g.light, light), _defineProperty(_ref2, className, className), _ref2)])
2305
2169
  }, /*#__PURE__*/React.createElement("div", {
2306
2170
  className: styles$g.middle
2307
2171
  }, /*#__PURE__*/React.createElement(Label, null, children)));
2308
2172
  };
2309
-
2310
2173
  Empty.propTypes = propTypes$g;
2311
2174
  Empty.defaultProps = defaultProps$g;
2312
2175
 
2313
2176
  var getUrlsFromMedia = function getUrlsFromMedia(media, formats) {
2314
2177
  var _ref = media || {},
2315
- _ref$files = _ref.files,
2316
- files = _ref$files === void 0 ? {} : _ref$files;
2317
-
2178
+ _ref$files = _ref.files,
2179
+ files = _ref$files === void 0 ? {} : _ref$files;
2318
2180
  var _ref2 = files || {},
2319
- _ref2$original = _ref2.original,
2320
- originalFile = _ref2$original === void 0 ? null : _ref2$original;
2321
-
2181
+ _ref2$original = _ref2.original,
2182
+ originalFile = _ref2$original === void 0 ? null : _ref2$original;
2322
2183
  var _ref3 = originalFile || {},
2323
- _ref3$name = _ref3.name,
2324
- originalName = _ref3$name === void 0 ? null : _ref3$name,
2325
- _ref3$mime = _ref3.mime,
2326
- originalMime = _ref3$mime === void 0 ? null : _ref3$mime;
2327
-
2184
+ _ref3$name = _ref3.name,
2185
+ originalName = _ref3$name === void 0 ? null : _ref3$name,
2186
+ _ref3$mime = _ref3.mime,
2187
+ originalMime = _ref3$mime === void 0 ? null : _ref3$mime;
2328
2188
  var urls = formats.reduce(function (currentUrls, format) {
2329
2189
  var finalFormat = isObject(format) ? format.format : format;
2330
2190
  var formatExtension = isObject(format) ? format.name : format;
2331
2191
  var file = files["webfonts.".concat(formatExtension)] || files[formatExtension] || null;
2332
-
2333
2192
  if (file !== null) {
2334
2193
  return [].concat(_toConsumableArray(currentUrls), ["url(\"".concat(file.url, "?\") format(\"").concat(finalFormat, "\")")]);
2335
2194
  }
2336
-
2337
2195
  var extensionRegExp = new RegExp(".".concat(formatExtension, "$"), 'i');
2338
2196
  var mimeRegExp = new RegExp("".concat(finalFormat), 'i');
2339
-
2340
2197
  if (originalName !== null && originalName.match(extensionRegExp) !== null || originalMime !== null && originalMime.match(mimeRegExp) !== null) {
2341
2198
  return [].concat(_toConsumableArray(currentUrls), ["url(\"".concat(originalFile.url, "?\") format(\"").concat(finalFormat, "\")")]);
2342
2199
  }
2343
-
2344
2200
  return currentUrls;
2345
2201
  }, []);
2346
2202
  return urls;
2347
2203
  };
2348
-
2349
2204
  var propTypes$f = {
2350
2205
  fonts: PropTypes.fonts,
2351
2206
  formats: PropTypes$1.arrayOf(PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.shape({
@@ -2363,35 +2218,30 @@ var defaultProps$f = {
2363
2218
  format: 'truetype'
2364
2219
  }, 'svg']
2365
2220
  };
2366
-
2367
2221
  var FontFaces = function FontFaces(_ref4) {
2368
2222
  var fonts = _ref4.fonts,
2369
- formats = _ref4.formats;
2223
+ formats = _ref4.formats;
2370
2224
  var fontFaces = (fonts || []).filter(function (it) {
2371
2225
  return isObject(it) && it.type === 'custom' && (it.media || null) !== null;
2372
2226
  }).reduce(function (fontFontFaces, _ref5) {
2373
2227
  var _ref5$name = _ref5.name,
2374
- name = _ref5$name === void 0 ? null : _ref5$name,
2375
- _ref5$media = _ref5.media,
2376
- media = _ref5$media === void 0 ? null : _ref5$media,
2377
- _ref5$variants = _ref5.variants,
2378
- variants = _ref5$variants === void 0 ? [] : _ref5$variants;
2379
-
2228
+ name = _ref5$name === void 0 ? null : _ref5$name,
2229
+ _ref5$media = _ref5.media,
2230
+ media = _ref5$media === void 0 ? null : _ref5$media,
2231
+ _ref5$variants = _ref5.variants,
2232
+ variants = _ref5$variants === void 0 ? [] : _ref5$variants;
2380
2233
  if (name === null) {
2381
2234
  return fontFontFaces;
2382
2235
  }
2383
-
2384
2236
  var urls = media !== null ? getUrlsFromMedia(media, formats) : null;
2385
2237
  return [].concat(_toConsumableArray(fontFontFaces), [urls !== null && urls.length > 0 ? "\n @font-face {\n font-family: \"".concat(name, "\";\n src: ").concat(urls.join(','), ";\n }\n ") : null], _toConsumableArray((variants || []).map(function (_ref6) {
2386
2238
  var weight = _ref6.weight,
2387
- style = _ref6.style,
2388
- _ref6$media = _ref6.media,
2389
- variantMedia = _ref6$media === void 0 ? null : _ref6$media;
2390
-
2239
+ style = _ref6.style,
2240
+ _ref6$media = _ref6.media,
2241
+ variantMedia = _ref6$media === void 0 ? null : _ref6$media;
2391
2242
  if (variantMedia == null) {
2392
2243
  return null;
2393
2244
  }
2394
-
2395
2245
  var variantUrls = getUrlsFromMedia(variantMedia, formats);
2396
2246
  return variantUrls !== null && variantUrls.length > 0 ? "\n @font-face {\n font-family: \"".concat(name, "\";\n ").concat(weight !== null ? "font-weight: ".concat(weight, ";") : '', "\n ").concat(style !== null ? "font-style: ".concat(style, ";") : '', "\n src: ").concat(variantUrls.join(','), ";\n }\n ") : null;
2397
2247
  })));
@@ -2402,7 +2252,6 @@ var FontFaces = function FontFaces(_ref4) {
2402
2252
  type: "text/css"
2403
2253
  }, fontFaces.join('\n')) : null;
2404
2254
  };
2405
-
2406
2255
  FontFaces.propTypes = propTypes$f;
2407
2256
  FontFaces.defaultProps = defaultProps$f;
2408
2257
 
@@ -2428,16 +2277,15 @@ var defaultProps$e = {
2428
2277
  bodyClassName: null,
2429
2278
  titleClassName: null
2430
2279
  };
2431
-
2432
2280
  var Media = function Media(_ref) {
2433
2281
  var thumbnail = _ref.thumbnail,
2434
- thumbnailAlign = _ref.thumbnailAlign,
2435
- children = _ref.children,
2436
- title = _ref.title,
2437
- className = _ref.className,
2438
- thumbnailClassName = _ref.thumbnailClassName,
2439
- bodyClassName = _ref.bodyClassName,
2440
- titleClassName = _ref.titleClassName;
2282
+ thumbnailAlign = _ref.thumbnailAlign,
2283
+ children = _ref.children,
2284
+ title = _ref.title,
2285
+ className = _ref.className,
2286
+ thumbnailClassName = _ref.thumbnailClassName,
2287
+ bodyClassName = _ref.bodyClassName,
2288
+ titleClassName = _ref.titleClassName;
2441
2289
  return /*#__PURE__*/React.createElement("div", {
2442
2290
  className: classNames(['card', styles$f.container, _defineProperty({}, className, className !== null)])
2443
2291
  }, typeof thumbnail === 'string' ? /*#__PURE__*/React.createElement("img", {
@@ -2454,14 +2302,12 @@ var Media = function Media(_ref) {
2454
2302
  className: classNames(['mt-0', 'text-truncate', styles$f.title, _defineProperty({}, titleClassName, titleClassName !== null)])
2455
2303
  }, /*#__PURE__*/React.createElement(Label, null, title)) : null, children) : null);
2456
2304
  };
2457
-
2458
2305
  Media.propTypes = propTypes$e;
2459
2306
  Media.defaultProps = defaultProps$e;
2460
2307
 
2461
2308
  /**
2462
2309
  * Core
2463
2310
  */
2464
-
2465
2311
  PropTypes$1.shape({
2466
2312
  listen: PropTypes$1.func.isRequired,
2467
2313
  push: PropTypes$1.func.isRequired
@@ -2489,7 +2335,6 @@ var label = PropTypes$1.oneOfType([message, PropTypes$1.node]);
2489
2335
  PropTypes$1.oneOf([401, 403, 404, 500]);
2490
2336
  PropTypes$1.oneOfType([PropTypes$1.shape({
2491
2337
  current: PropTypes$1.any // eslint-disable-line react/forbid-prop-types
2492
-
2493
2338
  }), PropTypes$1.func]);
2494
2339
  var target = PropTypes$1.oneOf(['_blank', '_self', '_parent']);
2495
2340
  var interaction = PropTypes$1.oneOf(['tap', 'swipe']);
@@ -2499,10 +2344,10 @@ PropTypes$1.shape({
2499
2344
  currentTime: PropTypes$1.number,
2500
2345
  duration: PropTypes$1.number
2501
2346
  });
2347
+
2502
2348
  /**
2503
2349
  * Site
2504
2350
  */
2505
-
2506
2351
  PropTypes$1.shape({
2507
2352
  id: PropTypes$1.number,
2508
2353
  firstname: PropTypes$1.string,
@@ -2549,10 +2394,10 @@ PropTypes$1.oneOf(['lg', 'sm', null]);
2549
2394
  PropTypes$1.oneOf(['start', 'end']);
2550
2395
  var component = PropTypes$1.oneOfType([PropTypes$1.object, PropTypes$1.func]);
2551
2396
  PropTypes$1.objectOf(component);
2397
+
2552
2398
  /**
2553
2399
  * Forms
2554
2400
  */
2555
-
2556
2401
  var errors = PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.arrayOf(PropTypes$1.string)]);
2557
2402
  PropTypes$1.objectOf(errors);
2558
2403
  var selectOption = PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.shape({
@@ -2566,10 +2411,10 @@ var formField = PropTypes$1.shape({
2566
2411
  component: component
2567
2412
  });
2568
2413
  PropTypes$1.arrayOf(formField);
2414
+
2569
2415
  /**
2570
2416
  * Medias
2571
2417
  */
2572
-
2573
2418
  var mediaMetadataShape = {
2574
2419
  filename: PropTypes$1.string,
2575
2420
  size: PropTypes$1.number,
@@ -2627,15 +2472,17 @@ PropTypes$1.arrayOf(audioMedia);
2627
2472
  var closedCaptionsMedia = PropTypes$1.shape(_objectSpread(_objectSpread({}, mediaShape), {}, {
2628
2473
  type: PropTypes$1.oneOf(['closed-captions'])
2629
2474
  }));
2475
+
2630
2476
  /**
2631
2477
  * Style
2632
2478
  */
2633
2479
 
2634
- var font = PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.shape({
2480
+ PropTypes$1.shape({
2635
2481
  type: PropTypes$1.oneOf(['system', 'google', 'custom']),
2636
2482
  name: PropTypes$1.string,
2637
2483
  media: fontMedia
2638
- })]);
2484
+ });
2485
+ var font = PropTypes$1.oneOfType([PropTypes$1.object, PropTypes$1.string]);
2639
2486
  PropTypes$1.arrayOf(font);
2640
2487
  var textAlign = PropTypes$1.oneOf(['left', 'right', 'center']);
2641
2488
  var color = PropTypes$1.shape({
@@ -2690,6 +2537,7 @@ PropTypes$1.shape({
2690
2537
  horizontalPosition: PropTypes$1.oneOf(['left', 'center', 'right']),
2691
2538
  verticalPosition: PropTypes$1.oneOf(['top', 'center', 'bottom'])
2692
2539
  });
2540
+
2693
2541
  /**
2694
2542
  * Elements
2695
2543
  */
@@ -2813,6 +2661,7 @@ PropTypes$1.shape({
2813
2661
  textStyle: textStyle,
2814
2662
  messages: conversationMessages
2815
2663
  });
2664
+
2816
2665
  /**
2817
2666
  * Definitions
2818
2667
  */
@@ -2842,10 +2691,10 @@ var fieldDefinition = PropTypes$1.shape({
2842
2691
  fields: fields
2843
2692
  });
2844
2693
  PropTypes$1.arrayOf(fieldDefinition);
2694
+
2845
2695
  /**
2846
2696
  * Components
2847
2697
  */
2848
-
2849
2698
  var storyComponentShape = {
2850
2699
  type: PropTypes$1.string.isRequired
2851
2700
  };
@@ -2857,7 +2706,6 @@ var screenComponents = PropTypes$1.arrayOf(screenComponent);
2857
2706
  /**
2858
2707
  * Theme
2859
2708
  */
2860
-
2861
2709
  var theme = PropTypes$1.shape({
2862
2710
  id: PropTypes$1.string,
2863
2711
  textStyles: PropTypes$1.objectOf(textStyle),
@@ -2869,9 +2717,11 @@ var theme = PropTypes$1.shape({
2869
2717
  PropTypes$1.shape(_objectSpread({
2870
2718
  logo: imageMedia
2871
2719
  }, theme));
2720
+
2872
2721
  /**
2873
2722
  * Branding
2874
2723
  */
2724
+
2875
2725
  // export const branding = PropTypes.shape({
2876
2726
  // logo: imageMedia,
2877
2727
  // primaryColor: color,
@@ -2883,27 +2733,26 @@ PropTypes$1.shape(_objectSpread({
2883
2733
  /**
2884
2734
  * Metadata
2885
2735
  */
2886
-
2887
2736
  var metadata = PropTypes$1.shape({
2888
2737
  description: PropTypes$1.string,
2889
2738
  shareUrl: PropTypes$1.string,
2890
2739
  shareImage: imageMedia,
2891
2740
  favIcon: imageMedia
2892
2741
  });
2742
+
2893
2743
  /**
2894
2744
  * Story
2895
2745
  */
2896
-
2897
2746
  PropTypes$1.shape({
2898
2747
  id: PropTypes$1.string,
2899
2748
  theme: theme,
2900
2749
  components: screenComponents,
2901
2750
  metadata: metadata
2902
2751
  });
2752
+
2903
2753
  /**
2904
2754
  * Render
2905
2755
  */
2906
-
2907
2756
  var deviceScreen = PropTypes$1.shape({
2908
2757
  name: PropTypes$1.string.isRequired,
2909
2758
  mediaQuery: PropTypes$1.string
@@ -2917,6 +2766,7 @@ PropTypes$1.shape({
2917
2766
  landscape: PropTypes$1.bool
2918
2767
  });
2919
2768
  PropTypes$1.oneOf(['view', 'placeholder', 'edit', 'preview', 'static', 'capture']);
2769
+
2920
2770
  /**
2921
2771
  * Screens
2922
2772
  */
@@ -2943,12 +2793,15 @@ var slide = PropTypes$1.shape({
2943
2793
  image: imageMedia,
2944
2794
  text: PropTypes$1.string
2945
2795
  });
2946
- PropTypes$1.arrayOf(slide); // export const imageStyle = PropTypes.shape({
2796
+ PropTypes$1.arrayOf(slide);
2797
+
2798
+ // export const imageStyle = PropTypes.shape({
2947
2799
  // alt: PropTypes.string,
2948
2800
  // fit: PropTypes.object,
2949
2801
  // });
2950
2802
 
2951
2803
  PropTypes$1.shape({});
2804
+
2952
2805
  /**
2953
2806
  * Transitions
2954
2807
  */
@@ -2965,6 +2818,7 @@ PropTypes$1.shape({
2965
2818
  "in": transition,
2966
2819
  out: transition
2967
2820
  });
2821
+
2968
2822
  /**
2969
2823
  * Search
2970
2824
  */
@@ -2974,6 +2828,7 @@ var searchFilter = PropTypes$1.shape({
2974
2828
  value: PropTypes$1.oneOf([PropTypes$1.string, PropTypes$1.number])
2975
2829
  });
2976
2830
  PropTypes$1.arrayOf(searchFilter);
2831
+
2977
2832
  /**
2978
2833
  * Payments
2979
2834
  */
@@ -2986,6 +2841,7 @@ var paymentItem = PropTypes$1.shape({
2986
2841
  amount: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.number])
2987
2842
  });
2988
2843
  PropTypes$1.arrayOf(paymentItem);
2844
+
2989
2845
  /**
2990
2846
  * Page Metadada
2991
2847
  */
@@ -3032,53 +2888,46 @@ var defaultProps$d = {
3032
2888
  suffix: 'Micromag',
3033
2889
  children: null
3034
2890
  };
3035
-
3036
2891
  var Meta = function Meta(_ref) {
3037
2892
  var title = _ref.title,
3038
- url = _ref.url,
3039
- metadata = _ref.metadata,
3040
- fullTitle = _ref.fullTitle,
3041
- suffix = _ref.suffix,
3042
- children = _ref.children;
3043
-
2893
+ url = _ref.url,
2894
+ metadata = _ref.metadata,
2895
+ fullTitle = _ref.fullTitle,
2896
+ suffix = _ref.suffix,
2897
+ children = _ref.children;
3044
2898
  var _ref2 = metadata || {},
3045
- _ref2$canonical = _ref2.canonical,
3046
- canonical = _ref2$canonical === void 0 ? null : _ref2$canonical,
3047
- _ref2$description = _ref2.description,
3048
- description = _ref2$description === void 0 ? null : _ref2$description,
3049
- _ref2$keywords = _ref2.keywords,
3050
- keywords = _ref2$keywords === void 0 ? null : _ref2$keywords,
3051
- _ref2$image = _ref2.image,
3052
- image = _ref2$image === void 0 ? null : _ref2$image,
3053
- _ref2$favicon = _ref2.favicon,
3054
- favicon = _ref2$favicon === void 0 ? null : _ref2$favicon,
3055
- _ref2$rssUrl = _ref2.rssUrl,
3056
- rssUrl = _ref2$rssUrl === void 0 ? null : _ref2$rssUrl,
3057
- _ref2$atomUrl = _ref2.atomUrl,
3058
- atomUrl = _ref2$atomUrl === void 0 ? null : _ref2$atomUrl,
3059
- _ref2$microformats = _ref2.microformats,
3060
- microformats = _ref2$microformats === void 0 ? [] : _ref2$microformats,
3061
- _ref2$language = _ref2.language,
3062
- language = _ref2$language === void 0 ? null : _ref2$language;
3063
-
2899
+ _ref2$canonical = _ref2.canonical,
2900
+ canonical = _ref2$canonical === void 0 ? null : _ref2$canonical,
2901
+ _ref2$description = _ref2.description,
2902
+ description = _ref2$description === void 0 ? null : _ref2$description,
2903
+ _ref2$keywords = _ref2.keywords,
2904
+ keywords = _ref2$keywords === void 0 ? null : _ref2$keywords,
2905
+ _ref2$image = _ref2.image,
2906
+ image = _ref2$image === void 0 ? null : _ref2$image,
2907
+ _ref2$favicon = _ref2.favicon,
2908
+ favicon = _ref2$favicon === void 0 ? null : _ref2$favicon,
2909
+ _ref2$rssUrl = _ref2.rssUrl,
2910
+ rssUrl = _ref2$rssUrl === void 0 ? null : _ref2$rssUrl,
2911
+ _ref2$atomUrl = _ref2.atomUrl,
2912
+ atomUrl = _ref2$atomUrl === void 0 ? null : _ref2$atomUrl,
2913
+ _ref2$microformats = _ref2.microformats,
2914
+ microformats = _ref2$microformats === void 0 ? [] : _ref2$microformats,
2915
+ _ref2$language = _ref2.language,
2916
+ language = _ref2$language === void 0 ? null : _ref2$language;
3064
2917
  var realTitle = title !== null ? "".concat(title, " | ").concat(suffix) : fullTitle;
3065
-
3066
2918
  var _ref3 = image || {},
3067
- _ref3$url = _ref3.url,
3068
- imageUrl = _ref3$url === void 0 ? null : _ref3$url,
3069
- _ref3$metadata = _ref3.metadata,
3070
- imageMetadata = _ref3$metadata === void 0 ? {} : _ref3$metadata;
3071
-
2919
+ _ref3$url = _ref3.url,
2920
+ imageUrl = _ref3$url === void 0 ? null : _ref3$url,
2921
+ _ref3$metadata = _ref3.metadata,
2922
+ imageMetadata = _ref3$metadata === void 0 ? {} : _ref3$metadata;
3072
2923
  var _ref4 = imageMetadata || {},
3073
- _ref4$width = _ref4.width,
3074
- imageWidth = _ref4$width === void 0 ? null : _ref4$width,
3075
- _ref4$height = _ref4.height,
3076
- imageHeight = _ref4$height === void 0 ? null : _ref4$height;
3077
-
2924
+ _ref4$width = _ref4.width,
2925
+ imageWidth = _ref4$width === void 0 ? null : _ref4$width,
2926
+ _ref4$height = _ref4.height,
2927
+ imageHeight = _ref4$height === void 0 ? null : _ref4$height;
3078
2928
  var _ref5 = favicon || {},
3079
- _ref5$url = _ref5.url,
3080
- faviconUrl = _ref5$url === void 0 ? null : _ref5$url;
3081
-
2929
+ _ref5$url = _ref5.url,
2930
+ faviconUrl = _ref5$url === void 0 ? null : _ref5$url;
3082
2931
  return /*#__PURE__*/React.createElement(Helmet, null, /*#__PURE__*/React.createElement("title", null, realTitle !== null && realTitle.length > 0 ? realTitle : 'Micromag'), description !== null ? /*#__PURE__*/React.createElement("meta", {
3083
2932
  name: "description",
3084
2933
  content: description
@@ -3147,11 +2996,10 @@ var Meta = function Meta(_ref) {
3147
2996
  }, JSON.stringify(it));
3148
2997
  }), children);
3149
2998
  };
3150
-
3151
2999
  Meta.propTypes = propTypes$d;
3152
3000
  Meta.defaultProps = defaultProps$d;
3153
3001
 
3154
- var styles$e = {"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"};
3002
+ var styles$e = {"container":"micromag-core-partials-slideshow-container","items":"micromag-core-partials-slideshow-items","item":"micromag-core-partials-slideshow-item","prev":"micromag-core-partials-slideshow-prev","current":"micromag-core-partials-slideshow-current","next":"micromag-core-partials-slideshow-next"};
3155
3003
 
3156
3004
  var propTypes$c = {
3157
3005
  items: PropTypes$1.arrayOf(PropTypes$1.node),
@@ -3171,24 +3019,20 @@ var defaultProps$c = {
3171
3019
  className: null,
3172
3020
  children: null
3173
3021
  };
3174
-
3175
3022
  var Slideshow = function Slideshow(_ref) {
3176
3023
  var items = _ref.items,
3177
- auto = _ref.auto,
3178
- delay = _ref.delay,
3179
- width = _ref.width,
3180
- height = _ref.height,
3181
- className = _ref.className,
3182
- children = _ref.children;
3183
-
3024
+ auto = _ref.auto,
3025
+ delay = _ref.delay,
3026
+ width = _ref.width,
3027
+ height = _ref.height,
3028
+ className = _ref.className,
3029
+ children = _ref.children;
3184
3030
  var _useState = useState(0),
3185
- _useState2 = _slicedToArray(_useState, 2),
3186
- index = _useState2[0],
3187
- setIndex = _useState2[1];
3188
-
3031
+ _useState2 = _slicedToArray(_useState, 2),
3032
+ index = _useState2[0],
3033
+ setIndex = _useState2[1];
3189
3034
  useEffect(function () {
3190
3035
  var id = null;
3191
-
3192
3036
  if (auto) {
3193
3037
  id = setTimeout(function () {
3194
3038
  if (index < items.length - 1) {
@@ -3200,7 +3044,6 @@ var Slideshow = function Slideshow(_ref) {
3200
3044
  }
3201
3045
  }, delay);
3202
3046
  }
3203
-
3204
3047
  return function () {
3205
3048
  clearTimeout(id);
3206
3049
  };
@@ -3216,14 +3059,12 @@ var Slideshow = function Slideshow(_ref) {
3216
3059
  className: styles$e.items
3217
3060
  }, items.map(function (it, i) {
3218
3061
  var _ref3;
3219
-
3220
3062
  return /*#__PURE__*/React.createElement("div", {
3221
3063
  key: "slide-".concat(i + 1),
3222
3064
  className: classNames([styles$e.item, (_ref3 = {}, _defineProperty(_ref3, styles$e.prev, i < index), _defineProperty(_ref3, styles$e.current, i === index), _defineProperty(_ref3, styles$e.next, i > index), _ref3)])
3223
3065
  }, it);
3224
3066
  })), children);
3225
3067
  };
3226
-
3227
3068
  Slideshow.propTypes = propTypes$c;
3228
3069
  Slideshow.defaultProps = defaultProps$c;
3229
3070
 
@@ -3232,8 +3073,8 @@ var styles$d = {"icon":"micromag-core-placeholders-icon"};
3232
3073
  /* eslint-disable react/prop-types */
3233
3074
  var AdFrame = function AdFrame(_ref) {
3234
3075
  var width = _ref.width,
3235
- height = _ref.height,
3236
- className = _ref.className;
3076
+ height = _ref.height,
3077
+ className = _ref.className;
3237
3078
  return /*#__PURE__*/React.createElement(PlaceholderBlock, {
3238
3079
  width: width,
3239
3080
  height: height,
@@ -3247,8 +3088,8 @@ var AdFrame = function AdFrame(_ref) {
3247
3088
  /* eslint-disable react/prop-types */
3248
3089
  var AdImage = function AdImage(_ref) {
3249
3090
  var width = _ref.width,
3250
- height = _ref.height,
3251
- className = _ref.className;
3091
+ height = _ref.height,
3092
+ className = _ref.className;
3252
3093
  return /*#__PURE__*/React.createElement(PlaceholderBlock, {
3253
3094
  width: width,
3254
3095
  height: height,
@@ -3262,10 +3103,10 @@ var AdImage = function AdImage(_ref) {
3262
3103
  /* eslint-disable react/destructuring-assignment, react/prop-types */
3263
3104
  var Audio = function Audio(_ref) {
3264
3105
  var _ref$width = _ref.width,
3265
- width = _ref$width === void 0 ? '100%' : _ref$width,
3266
- _ref$height = _ref.height,
3267
- height = _ref$height === void 0 ? '2em' : _ref$height,
3268
- className = _ref.className;
3106
+ width = _ref$width === void 0 ? '100%' : _ref$width,
3107
+ _ref$height = _ref.height,
3108
+ height = _ref$height === void 0 ? '2em' : _ref$height,
3109
+ className = _ref.className;
3269
3110
  return /*#__PURE__*/React.createElement(PlaceholderBlock, {
3270
3111
  width: width,
3271
3112
  height: height,
@@ -3296,17 +3137,15 @@ var defaultProps$b = {
3296
3137
  className: null,
3297
3138
  withInvertedColors: true
3298
3139
  };
3299
-
3300
3140
  var PlaceholderText = function PlaceholderText(_ref) {
3301
3141
  var _ref2;
3302
-
3303
3142
  var lines = _ref.lines,
3304
- lineMargin = _ref.lineMargin,
3305
- width = _ref.width,
3306
- height = _ref.height,
3307
- fontSize = _ref.fontSize,
3308
- className = _ref.className,
3309
- withInvertedColors = _ref.withInvertedColors;
3143
+ lineMargin = _ref.lineMargin,
3144
+ width = _ref.width,
3145
+ height = _ref.height,
3146
+ fontSize = _ref.fontSize,
3147
+ className = _ref.className,
3148
+ withInvertedColors = _ref.withInvertedColors;
3310
3149
  var lineHeight = height !== null && isNumber(height) ? "".concat(Math.round(height * fontSize), "px") : height;
3311
3150
  var oddWidth = isNumber(width) ? width * 0.9 : '80%';
3312
3151
  return /*#__PURE__*/React.createElement("div", {
@@ -3324,17 +3163,16 @@ var PlaceholderText = function PlaceholderText(_ref) {
3324
3163
  });
3325
3164
  }));
3326
3165
  };
3327
-
3328
3166
  PlaceholderText.propTypes = propTypes$b;
3329
3167
  PlaceholderText.defaultProps = defaultProps$b;
3330
3168
 
3331
3169
  /* eslint-disable react/destructuring-assignment, react/prop-types */
3332
3170
  var Button = function Button(_ref) {
3333
3171
  var _ref$width = _ref.width,
3334
- width = _ref$width === void 0 ? '75%' : _ref$width,
3335
- _ref$height = _ref.height,
3336
- height = _ref$height === void 0 ? '0.4em' : _ref$height,
3337
- className = _ref.className;
3172
+ width = _ref$width === void 0 ? '75%' : _ref$width,
3173
+ _ref$height = _ref.height,
3174
+ height = _ref$height === void 0 ? '0.4em' : _ref$height,
3175
+ className = _ref.className;
3338
3176
  return /*#__PURE__*/React.createElement(PlaceholderBlock, {
3339
3177
  outline: true,
3340
3178
  width: width,
@@ -3349,10 +3187,9 @@ var Button = function Button(_ref) {
3349
3187
  var _excluded$2 = ["width", "height", "className"];
3350
3188
  var Image = function Image(_ref) {
3351
3189
  var width = _ref.width,
3352
- height = _ref.height,
3353
- className = _ref.className,
3354
- props = _objectWithoutProperties(_ref, _excluded$2);
3355
-
3190
+ height = _ref.height,
3191
+ className = _ref.className,
3192
+ props = _objectWithoutProperties(_ref, _excluded$2);
3356
3193
  return /*#__PURE__*/React.createElement(PlaceholderBlock, Object.assign({}, props, {
3357
3194
  width: width,
3358
3195
  height: height,
@@ -3435,16 +3272,15 @@ var Subtitle = function Subtitle(props) {
3435
3272
  };
3436
3273
 
3437
3274
  /* eslint-disable react/jsx-props-no-spreading, react/destructuring-assignment, react/prop-types */
3438
-
3439
3275
  var TextPlaceholder = function TextPlaceholder(props) {
3440
3276
  var _props$className = props.className,
3441
- className = _props$className === void 0 ? null : _props$className,
3442
- _props$height = props.height,
3443
- height = _props$height === void 0 ? 0.2 : _props$height,
3444
- _props$lines = props.lines,
3445
- lines = _props$lines === void 0 ? 4 : _props$lines,
3446
- _props$lineMargin = props.lineMargin,
3447
- lineMargin = _props$lineMargin === void 0 ? 2 : _props$lineMargin;
3277
+ className = _props$className === void 0 ? null : _props$className,
3278
+ _props$height = props.height,
3279
+ height = _props$height === void 0 ? 0.2 : _props$height,
3280
+ _props$lines = props.lines,
3281
+ lines = _props$lines === void 0 ? 4 : _props$lines,
3282
+ _props$lineMargin = props.lineMargin,
3283
+ lineMargin = _props$lineMargin === void 0 ? 2 : _props$lineMargin;
3448
3284
  return /*#__PURE__*/React.createElement(PlaceholderText, Object.assign({}, props, {
3449
3285
  height: height,
3450
3286
  lines: lines,
@@ -3463,11 +3299,11 @@ var Timeline = function Timeline(props) {
3463
3299
  /* eslint-disable react/jsx-props-no-spreading, react/destructuring-assignment, react/prop-types */
3464
3300
  var Title$1 = function Title(props) {
3465
3301
  var _props$height = props.height,
3466
- height = _props$height === void 0 ? 0.5 : _props$height,
3467
- _props$lines = props.lines,
3468
- lines = _props$lines === void 0 ? 2 : _props$lines,
3469
- _props$lineMargin = props.lineMargin,
3470
- lineMargin = _props$lineMargin === void 0 ? 2 : _props$lineMargin;
3302
+ height = _props$height === void 0 ? 0.5 : _props$height,
3303
+ _props$lines = props.lines,
3304
+ lines = _props$lines === void 0 ? 2 : _props$lines,
3305
+ _props$lineMargin = props.lineMargin,
3306
+ lineMargin = _props$lineMargin === void 0 ? 2 : _props$lineMargin;
3471
3307
  return /*#__PURE__*/React.createElement(PlaceholderText, Object.assign({}, props, {
3472
3308
  className: classNames([props.className, styles$d.title]),
3473
3309
  height: height,
@@ -3479,8 +3315,8 @@ var Title$1 = function Title(props) {
3479
3315
  /* eslint-disable react/prop-types */
3480
3316
  var Video = function Video(_ref) {
3481
3317
  var width = _ref.width,
3482
- height = _ref.height,
3483
- className = _ref.className;
3318
+ height = _ref.height,
3319
+ className = _ref.className;
3484
3320
  return /*#__PURE__*/React.createElement(PlaceholderBlock, {
3485
3321
  width: width,
3486
3322
  height: height,
@@ -3495,8 +3331,8 @@ var styles$a = {"container":"micromag-core-placeholders-video-360-container","bo
3495
3331
 
3496
3332
  var Video360 = function Video360(_ref) {
3497
3333
  var width = _ref.width,
3498
- height = _ref.height,
3499
- className = _ref.className;
3334
+ height = _ref.height,
3335
+ className = _ref.className;
3500
3336
  return /*#__PURE__*/React.createElement(PlaceholderBlock, {
3501
3337
  width: width,
3502
3338
  height: height,
@@ -3513,8 +3349,8 @@ var Video360 = function Video360(_ref) {
3513
3349
  /* eslint-disable react/prop-types */
3514
3350
  var VideoLoop = function VideoLoop(_ref) {
3515
3351
  var width = _ref.width,
3516
- height = _ref.height,
3517
- className = _ref.className;
3352
+ height = _ref.height,
3353
+ className = _ref.className;
3518
3354
  return /*#__PURE__*/React.createElement(PlaceholderBlock, {
3519
3355
  width: width,
3520
3356
  height: height,
@@ -3548,72 +3384,62 @@ var defaultProps$a = {
3548
3384
  screenHeight: 480,
3549
3385
  className: null
3550
3386
  };
3551
-
3552
3387
  var ScreenSizer = function ScreenSizer(_ref) {
3553
3388
  var width = _ref.width,
3554
- height = _ref.height,
3555
- fit = _ref.fit,
3556
- screenWidth = _ref.screenWidth,
3557
- screenHeight = _ref.screenHeight,
3558
- className = _ref.className,
3559
- children = _ref.children;
3389
+ height = _ref.height,
3390
+ fit = _ref.fit,
3391
+ screenWidth = _ref.screenWidth,
3392
+ screenHeight = _ref.screenHeight,
3393
+ className = _ref.className,
3394
+ children = _ref.children;
3560
3395
  var hasSize = width !== null || height !== null;
3561
-
3562
3396
  var _useDimensionObserver = useDimensionObserver(),
3563
- refContainer = _useDimensionObserver.ref,
3564
- _useDimensionObserver2 = _useDimensionObserver.width,
3565
- calculatedWidth = _useDimensionObserver2 === void 0 ? 0 : _useDimensionObserver2,
3566
- _useDimensionObserver3 = _useDimensionObserver.height,
3567
- calculatedHeight = _useDimensionObserver3 === void 0 ? 0 : _useDimensionObserver3;
3568
-
3397
+ refContainer = _useDimensionObserver.ref,
3398
+ _useDimensionObserver2 = _useDimensionObserver.width,
3399
+ calculatedWidth = _useDimensionObserver2 === void 0 ? 0 : _useDimensionObserver2,
3400
+ _useDimensionObserver3 = _useDimensionObserver.height,
3401
+ calculatedHeight = _useDimensionObserver3 === void 0 ? 0 : _useDimensionObserver3;
3569
3402
  var _useMemo = useMemo(function () {
3570
- var containerWidth = width || calculatedWidth || null;
3571
- var containerHeight = height || calculatedHeight || null;
3572
-
3573
- if (containerWidth === null && containerHeight === null) {
3574
- return {};
3575
- }
3576
-
3577
- var screenRatio = screenWidth / screenHeight;
3578
- var finalContainerWidth = hasSize ? width || containerHeight * screenRatio : containerWidth;
3579
- var finalContainerHeight = hasSize ? height || containerWidth / screenRatio : containerWidth / screenRatio;
3580
-
3581
- if (fit === null) {
3582
- var _screenScale = finalContainerWidth / screenWidth;
3583
-
3403
+ var containerWidth = width || calculatedWidth || null;
3404
+ var containerHeight = height || calculatedHeight || null;
3405
+ if (containerWidth === null && containerHeight === null) {
3406
+ return {};
3407
+ }
3408
+ var screenRatio = screenWidth / screenHeight;
3409
+ var finalContainerWidth = hasSize ? width || containerHeight * screenRatio : containerWidth;
3410
+ var finalContainerHeight = hasSize ? height || containerWidth / screenRatio : containerWidth / screenRatio;
3411
+ if (fit === null) {
3412
+ var _screenScale = finalContainerWidth / screenWidth;
3413
+ return {
3414
+ width: finalContainerWidth,
3415
+ height: finalContainerHeight,
3416
+ scale: _screenScale,
3417
+ transform: "scale(".concat(_screenScale, ")")
3418
+ };
3419
+ }
3420
+ var _getSizeWithinBounds = getSizeWithinBounds(screenWidth, screenHeight, finalContainerWidth, finalContainerHeight, {
3421
+ cover: fit === 'cover'
3422
+ }),
3423
+ screenScaledWidth = _getSizeWithinBounds.width,
3424
+ screenScaledHeight = _getSizeWithinBounds.height,
3425
+ screenScale = _getSizeWithinBounds.scale;
3426
+ var x = (finalContainerWidth - screenScaledWidth) / 2;
3427
+ var y = (finalContainerHeight - screenScaledHeight) / 2;
3584
3428
  return {
3585
3429
  width: finalContainerWidth,
3586
3430
  height: finalContainerHeight,
3587
- scale: _screenScale,
3588
- transform: "scale(".concat(_screenScale, ")")
3431
+ scale: screenScale,
3432
+ transform: "scale(".concat(screenScale, ") translate(").concat(x, "px, ").concat(y, "px)")
3589
3433
  };
3590
- }
3591
-
3592
- var _getSizeWithinBounds = getSizeWithinBounds(screenWidth, screenHeight, finalContainerWidth, finalContainerHeight, {
3593
- cover: fit === 'cover'
3594
- }),
3595
- screenScaledWidth = _getSizeWithinBounds.width,
3596
- screenScaledHeight = _getSizeWithinBounds.height,
3597
- screenScale = _getSizeWithinBounds.scale;
3598
-
3599
- var x = (finalContainerWidth - screenScaledWidth) / 2;
3600
- var y = (finalContainerHeight - screenScaledHeight) / 2;
3601
- return {
3602
- width: finalContainerWidth,
3603
- height: finalContainerHeight,
3604
- scale: screenScale,
3605
- transform: "scale(".concat(screenScale, ") translate(").concat(x, "px, ").concat(y, "px)")
3606
- };
3607
- }, [screenWidth, screenHeight, width, height, fit, calculatedWidth, calculatedHeight, hasSize]),
3608
- _useMemo$width = _useMemo.width,
3609
- frameWidth = _useMemo$width === void 0 ? null : _useMemo$width,
3610
- _useMemo$height = _useMemo.height,
3611
- frameHeight = _useMemo$height === void 0 ? null : _useMemo$height,
3612
- _useMemo$scale = _useMemo.scale,
3613
- frameScale = _useMemo$scale === void 0 ? null : _useMemo$scale,
3614
- _useMemo$transform = _useMemo.transform,
3615
- screenTransform = _useMemo$transform === void 0 ? null : _useMemo$transform;
3616
-
3434
+ }, [screenWidth, screenHeight, width, height, fit, calculatedWidth, calculatedHeight, hasSize]),
3435
+ _useMemo$width = _useMemo.width,
3436
+ frameWidth = _useMemo$width === void 0 ? null : _useMemo$width,
3437
+ _useMemo$height = _useMemo.height,
3438
+ frameHeight = _useMemo$height === void 0 ? null : _useMemo$height,
3439
+ _useMemo$scale = _useMemo.scale,
3440
+ frameScale = _useMemo$scale === void 0 ? null : _useMemo$scale,
3441
+ _useMemo$transform = _useMemo.transform,
3442
+ screenTransform = _useMemo$transform === void 0 ? null : _useMemo$transform;
3617
3443
  var screenSize = useMemo(function () {
3618
3444
  return {
3619
3445
  screen: 'mobile',
@@ -3647,7 +3473,6 @@ var ScreenSizer = function ScreenSizer(_ref) {
3647
3473
  height: screenHeight
3648
3474
  })))) : null);
3649
3475
  };
3650
-
3651
3476
  ScreenSizer.propTypes = propTypes$a;
3652
3477
  ScreenSizer.defaultProps = defaultProps$a;
3653
3478
 
@@ -3676,26 +3501,25 @@ var defaultProps$9 = {
3676
3501
  className: null,
3677
3502
  mediaRef: null
3678
3503
  };
3679
-
3680
3504
  var Screen = function Screen(_ref) {
3681
3505
  var screen = _ref.screen,
3682
- renderContext = _ref.renderContext,
3683
- screenState = _ref.screenState,
3684
- index = _ref.index,
3685
- active = _ref.active,
3686
- current = _ref.current,
3687
- components = _ref.components,
3688
- component = _ref.component,
3689
- className = _ref.className,
3690
- mediaRef = _ref.mediaRef;
3691
-
3506
+ renderContext = _ref.renderContext,
3507
+ screenState = _ref.screenState,
3508
+ index = _ref.index,
3509
+ active = _ref.active,
3510
+ current = _ref.current,
3511
+ components = _ref.components,
3512
+ component = _ref.component,
3513
+ className = _ref.className,
3514
+ mediaRef = _ref.mediaRef;
3692
3515
  var _ref2 = screen || {},
3693
- _ref2$type = _ref2.type,
3694
- type = _ref2$type === void 0 ? null : _ref2$type;
3695
-
3516
+ _ref2$type = _ref2.type,
3517
+ type = _ref2$type === void 0 ? null : _ref2$type;
3696
3518
  var CustomScreenComponent = components !== null ? getComponentFromName(type, components) || null : null;
3697
3519
  var ContextScreenComponent = useScreenComponent(type);
3698
- var ScreenComponent = CustomScreenComponent || ContextScreenComponent; // Comment
3520
+ var ScreenComponent = CustomScreenComponent || ContextScreenComponent;
3521
+
3522
+ // Comment
3699
3523
 
3700
3524
  return /*#__PURE__*/React.createElement(ScreenProvider, {
3701
3525
  data: screen,
@@ -3712,7 +3536,6 @@ var Screen = function Screen(_ref) {
3712
3536
  className: className
3713
3537
  }, component));
3714
3538
  };
3715
-
3716
3539
  Screen.propTypes = propTypes$9;
3717
3540
  Screen.defaultProps = defaultProps$9;
3718
3541
  var Screen$1 = /*#__PURE__*/React.memo(Screen);
@@ -3737,17 +3560,15 @@ var defaultProps$8 = {
3737
3560
  withSize: false,
3738
3561
  className: null
3739
3562
  };
3740
-
3741
3563
  var ScreenPlaceholder = function ScreenPlaceholder(_ref) {
3742
3564
  var screen = _ref.screen,
3743
- layout = _ref.layout,
3744
- screenWidth = _ref.screenWidth,
3745
- screenHeight = _ref.screenHeight,
3746
- screenState = _ref.screenState,
3747
- withSize = _ref.withSize,
3748
- className = _ref.className,
3749
- props = _objectWithoutProperties(_ref, _excluded$1);
3750
-
3565
+ layout = _ref.layout,
3566
+ screenWidth = _ref.screenWidth,
3567
+ screenHeight = _ref.screenHeight,
3568
+ screenState = _ref.screenState,
3569
+ withSize = _ref.withSize,
3570
+ className = _ref.className,
3571
+ props = _objectWithoutProperties(_ref, _excluded$1);
3751
3572
  var screenElement = /*#__PURE__*/React.createElement(Screen$1, Object.assign({
3752
3573
  screen: screen,
3753
3574
  renderContext: "placeholder",
@@ -3761,7 +3582,6 @@ var ScreenPlaceholder = function ScreenPlaceholder(_ref) {
3761
3582
  screenHeight: screenHeight
3762
3583
  }, screenElement) : screenElement;
3763
3584
  };
3764
-
3765
3585
  ScreenPlaceholder.propTypes = propTypes$8;
3766
3586
  ScreenPlaceholder.defaultProps = defaultProps$8;
3767
3587
  var Placeholder = /*#__PURE__*/React.memo(ScreenPlaceholder);
@@ -3788,18 +3608,16 @@ var defaultProps$7 = {
3788
3608
  className: null,
3789
3609
  withSize: false
3790
3610
  };
3791
-
3792
3611
  var ScreenPreview = function ScreenPreview(_ref) {
3793
3612
  var screen = _ref.screen,
3794
- screenState = _ref.screenState,
3795
- width = _ref.width,
3796
- height = _ref.height,
3797
- screenWidth = _ref.screenWidth,
3798
- screenHeight = _ref.screenHeight,
3799
- className = _ref.className,
3800
- withSize = _ref.withSize,
3801
- props = _objectWithoutProperties(_ref, _excluded);
3802
-
3613
+ screenState = _ref.screenState,
3614
+ width = _ref.width,
3615
+ height = _ref.height,
3616
+ screenWidth = _ref.screenWidth,
3617
+ screenHeight = _ref.screenHeight,
3618
+ className = _ref.className,
3619
+ withSize = _ref.withSize,
3620
+ props = _objectWithoutProperties(_ref, _excluded);
3803
3621
  var screenElement = /*#__PURE__*/React.createElement(Screen$1, Object.assign({
3804
3622
  screen: screen,
3805
3623
  renderContext: "preview",
@@ -3817,7 +3635,6 @@ var ScreenPreview = function ScreenPreview(_ref) {
3817
3635
  }, screenElement) : screenElement;
3818
3636
  return screenWithSize;
3819
3637
  };
3820
-
3821
3638
  ScreenPreview.propTypes = propTypes$7;
3822
3639
  ScreenPreview.defaultProps = defaultProps$7;
3823
3640
  var Preview = /*#__PURE__*/React.memo(ScreenPreview);
@@ -3841,10 +3658,10 @@ var Conversation = function Conversation() {
3841
3658
  /* eslint-disable react/prop-types */
3842
3659
  var InputText = function InputText(_ref) {
3843
3660
  var _ref$width = _ref.width,
3844
- width = _ref$width === void 0 ? '75%' : _ref$width,
3845
- _ref$height = _ref.height,
3846
- height = _ref$height === void 0 ? '0.5em' : _ref$height,
3847
- className = _ref.className;
3661
+ width = _ref$width === void 0 ? '75%' : _ref$width,
3662
+ _ref$height = _ref.height,
3663
+ height = _ref$height === void 0 ? '0.5em' : _ref$height,
3664
+ className = _ref.className;
3848
3665
  return /*#__PURE__*/React.createElement(PlaceholderBlock, {
3849
3666
  outline: true,
3850
3667
  width: width,
@@ -3857,14 +3674,13 @@ var styles$4 = {"container":"micromag-core-placeholders-quiz-answer-container","
3857
3674
 
3858
3675
  var Answer$1 = function Answer(_ref) {
3859
3676
  var _ref2;
3860
-
3861
3677
  var _ref$width = _ref.width,
3862
- width = _ref$width === void 0 ? '75%' : _ref$width,
3863
- _ref$height = _ref.height,
3864
- height = _ref$height === void 0 ? '0.3em' : _ref$height,
3865
- className = _ref.className,
3866
- _ref$good = _ref.good,
3867
- good = _ref$good === void 0 ? true : _ref$good;
3678
+ width = _ref$width === void 0 ? '75%' : _ref$width,
3679
+ _ref$height = _ref.height,
3680
+ height = _ref$height === void 0 ? '0.3em' : _ref$height,
3681
+ className = _ref.className,
3682
+ _ref$good = _ref.good,
3683
+ good = _ref$good === void 0 ? true : _ref$good;
3868
3684
  return /*#__PURE__*/React.createElement("div", {
3869
3685
  className: classNames([styles$4.container, (_ref2 = {}, _defineProperty(_ref2, className, className !== null), _defineProperty(_ref2, styles$4.good, good), _ref2)])
3870
3686
  }, /*#__PURE__*/React.createElement("div", {
@@ -3913,10 +3729,10 @@ var styles$2 = {"container":"micromag-core-placeholders-survey-answer-container"
3913
3729
 
3914
3730
  var Answer = function Answer(_ref) {
3915
3731
  var _ref$width = _ref.width,
3916
- width = _ref$width === void 0 ? '75%' : _ref$width,
3917
- _ref$height = _ref.height,
3918
- height = _ref$height === void 0 ? '0.3em' : _ref$height,
3919
- className = _ref.className;
3732
+ width = _ref$width === void 0 ? '75%' : _ref$width,
3733
+ _ref$height = _ref.height,
3734
+ height = _ref$height === void 0 ? '0.3em' : _ref$height,
3735
+ className = _ref.className;
3920
3736
  return /*#__PURE__*/React.createElement("div", {
3921
3737
  className: classNames([styles$2.container, _defineProperty({}, className, className !== null)])
3922
3738
  }, /*#__PURE__*/React.createElement(PlaceholderBlock, {
@@ -3983,40 +3799,33 @@ var defaultProps$6 = {
3983
3799
  placeholderProps: null,
3984
3800
  emptyClassName: null
3985
3801
  };
3986
-
3987
3802
  var ScreenElement = function ScreenElement(_ref) {
3988
3803
  var children = _ref.children,
3989
- placeholder = _ref.placeholder,
3990
- empty = _ref.empty,
3991
- emptyLabel = _ref.emptyLabel,
3992
- preview = _ref.preview,
3993
- isEmpty = _ref.isEmpty,
3994
- placeholderProps = _ref.placeholderProps,
3995
- emptyClassName = _ref.emptyClassName;
3996
-
3804
+ placeholder = _ref.placeholder,
3805
+ empty = _ref.empty,
3806
+ emptyLabel = _ref.emptyLabel,
3807
+ preview = _ref.preview,
3808
+ isEmpty = _ref.isEmpty,
3809
+ placeholderProps = _ref.placeholderProps,
3810
+ emptyClassName = _ref.emptyClassName;
3997
3811
  var _useScreenRenderConte = useScreenRenderContext(),
3998
- isPlaceholder = _useScreenRenderConte.isPlaceholder,
3999
- isEdit = _useScreenRenderConte.isEdit,
4000
- isPreview = _useScreenRenderConte.isPreview;
4001
-
3812
+ isPlaceholder = _useScreenRenderConte.isPlaceholder,
3813
+ isEdit = _useScreenRenderConte.isEdit,
3814
+ isPreview = _useScreenRenderConte.isPreview;
4002
3815
  if (isPlaceholder) {
4003
3816
  var PlaceholderComponent = isString(placeholder) ? getComponentFromName(placeholder, Placeholders) : null;
4004
3817
  return PlaceholderComponent !== null ? /*#__PURE__*/React.createElement(PlaceholderComponent, placeholderProps) : placeholder;
4005
3818
  }
4006
-
4007
3819
  if (isEdit && isEmpty) {
4008
3820
  return empty !== null ? empty : /*#__PURE__*/React.createElement(Empty, {
4009
3821
  className: emptyClassName
4010
3822
  }, emptyLabel);
4011
3823
  }
4012
-
4013
3824
  if (isPreview && preview !== null) {
4014
3825
  return preview;
4015
3826
  }
4016
-
4017
3827
  return children;
4018
3828
  };
4019
-
4020
3829
  ScreenElement.propTypes = propTypes$6;
4021
3830
  ScreenElement.defaultProps = defaultProps$6;
4022
3831
 
@@ -4031,11 +3840,10 @@ var defaultProps$5 = {
4031
3840
  screen: null,
4032
3841
  className: null
4033
3842
  };
4034
-
4035
3843
  var Screens = function Screens(_ref) {
4036
3844
  var screens = _ref.screens,
4037
- screenId = _ref.screen,
4038
- className = _ref.className;
3845
+ screenId = _ref.screen,
3846
+ className = _ref.className;
4039
3847
  return /*#__PURE__*/React.createElement("div", {
4040
3848
  className: classNames([styles$1.container, _defineProperty({}, className, className)])
4041
3849
  }, screens.map(function (screen) {
@@ -4047,7 +3855,6 @@ var Screens = function Screens(_ref) {
4047
3855
  });
4048
3856
  }));
4049
3857
  };
4050
-
4051
3858
  Screens.propTypes = propTypes$5;
4052
3859
  Screens.defaultProps = defaultProps$5;
4053
3860
 
@@ -4056,12 +3863,20 @@ var styles = {"container":"micromag-core-transitions-transition-container","full
4056
3863
  var propTypes$4 = {
4057
3864
  fullscreen: PropTypes$1.bool,
4058
3865
  from: PropTypes$1.objectOf(PropTypes$1.any),
3866
+ // eslint-disable-line react/forbid-prop-types
4059
3867
  to: PropTypes$1.objectOf(PropTypes$1.any),
3868
+ // eslint-disable-line react/forbid-prop-types
4060
3869
  playing: PropTypes$1.bool,
4061
3870
  direction: PropTypes$1.oneOf(['in', 'out']),
4062
3871
  delay: PropTypes$1.number,
3872
+ reversible: PropTypes$1.bool,
4063
3873
  duration: PropTypes$1.number,
4064
3874
  easing: PropTypes$1.func,
3875
+ config: PropTypes$1.shape({
3876
+ mass: PropTypes$1.number,
3877
+ friction: PropTypes$1.number,
3878
+ tension: PropTypes$1.number
3879
+ }),
4065
3880
  children: PropTypes$1.node,
4066
3881
  className: PropTypes$1.string,
4067
3882
  onStart: PropTypes$1.func,
@@ -4074,84 +3889,71 @@ var defaultProps$4 = {
4074
3889
  playing: false,
4075
3890
  direction: null,
4076
3891
  delay: 0,
3892
+ reversible: true,
4077
3893
  duration: undefined,
4078
3894
  easing: undefined,
3895
+ config: null,
4079
3896
  children: null,
4080
3897
  className: null,
4081
3898
  onStart: null,
4082
3899
  onComplete: null
4083
3900
  };
4084
-
4085
3901
  function Transition(_ref) {
4086
3902
  var _ref2;
4087
-
4088
3903
  var fullscreen = _ref.fullscreen,
4089
- from = _ref.from,
4090
- to = _ref.to,
4091
- playing = _ref.playing,
4092
- direction = _ref.direction,
4093
- delay = _ref.delay,
4094
- duration = _ref.duration,
4095
- easing = _ref.easing,
4096
- children = _ref.children,
4097
- className = _ref.className,
4098
- onStart = _ref.onStart,
4099
- onComplete = _ref.onComplete;
4100
-
3904
+ from = _ref.from,
3905
+ to = _ref.to,
3906
+ playing = _ref.playing,
3907
+ direction = _ref.direction,
3908
+ delay = _ref.delay,
3909
+ reversible = _ref.reversible,
3910
+ duration = _ref.duration,
3911
+ easing = _ref.easing,
3912
+ config$1 = _ref.config,
3913
+ children = _ref.children,
3914
+ className = _ref.className,
3915
+ onStart = _ref.onStart,
3916
+ onComplete = _ref.onComplete;
4101
3917
  var _useSpring = useSpring(function () {
4102
- return {};
4103
- }),
4104
- _useSpring2 = _slicedToArray(_useSpring, 2),
4105
- springProps = _useSpring2[0],
4106
- setSpringProps = _useSpring2[1];
4107
-
3918
+ return {};
3919
+ }),
3920
+ _useSpring2 = _slicedToArray(_useSpring, 2),
3921
+ springProps = _useSpring2[0],
3922
+ setSpringProps = _useSpring2[1];
4108
3923
  useEffect(function () {
4109
3924
  var immediate = !playing && direction === 'in' || playing && direction === 'out';
4110
3925
  var finalPlaying = immediate || playing;
4111
- var reset = playing && !immediate;
3926
+ var reset = reversible && playing && !immediate;
4112
3927
  var finalDuration = duration !== null ? duration : undefined;
3928
+ var withDelay = delay > 0 && playing && direction !== 'out';
3929
+ var finalConfig = easing !== null && config[easing] ? config[easing] || null : config$1;
4113
3930
  var props = {
4114
- from: from,
3931
+ from: finalPlaying ? from : to,
4115
3932
  to: finalPlaying ? to : from,
3933
+ immediate: immediate,
3934
+ delay: withDelay ? delay : null,
4116
3935
  reset: reset,
4117
3936
  onStart: onStart,
4118
3937
  onRest: onComplete,
4119
- config: {
3938
+ config: finalConfig !== null ? finalConfig : {
4120
3939
  duration: immediate ? 0 : finalDuration
4121
3940
  }
4122
3941
  };
4123
- var withDelay = delay > 0 && playing && direction !== 'out';
4124
- var timeout = null;
4125
-
4126
- if (withDelay) {
4127
- setSpringProps.start({
4128
- to: from,
4129
- immediate: true
4130
- });
4131
- timeout = setTimeout(function () {
4132
- setSpringProps.start(props);
4133
- }, delay);
4134
- } else {
3942
+ // Reversible always toggles between from-to (playing) to-from (!playing)
3943
+ if (finalPlaying || reversible) {
4135
3944
  setSpringProps.start(props);
4136
3945
  }
4137
-
4138
- return function () {
4139
- if (timeout !== null) {
4140
- clearTimeout(timeout);
4141
- }
4142
- };
4143
- }, [playing, direction, delay, duration, easing, from, to, setSpringProps, onStart, onComplete]);
3946
+ // console.log('fx', { reset, finalPlaying, immediate, reversible });
3947
+ }, [playing, direction, delay, duration, reversible, easing, config$1, from, to, setSpringProps, onStart, onComplete]);
4144
3948
  return /*#__PURE__*/React.createElement(animated.div, {
4145
3949
  style: _objectSpread({}, springProps),
4146
3950
  className: classNames([styles.container, (_ref2 = {}, _defineProperty(_ref2, className, className !== null), _defineProperty(_ref2, styles.fullscreen, fullscreen), _ref2)])
4147
3951
  }, children);
4148
3952
  }
4149
-
4150
3953
  Transition.propTypes = propTypes$4;
4151
3954
  Transition.defaultProps = defaultProps$4;
4152
3955
 
4153
3956
  /* eslint-disable react/jsx-props-no-spreading */
4154
-
4155
3957
  function Fade(props) {
4156
3958
  var from = useMemo(function () {
4157
3959
  return {
@@ -4170,7 +3972,6 @@ function Fade(props) {
4170
3972
  }
4171
3973
 
4172
3974
  /* eslint-disable react/jsx-props-no-spreading */
4173
-
4174
3975
  function Scale(props) {
4175
3976
  var from = useMemo(function () {
4176
3977
  return {
@@ -4198,6 +3999,7 @@ var propTypes$3 = {
4198
3999
  playing: PropTypes$1.bool,
4199
4000
  delay: PropTypes$1.number,
4200
4001
  transitions: PropTypes.transitions,
4002
+ onComplete: PropTypes$1.func,
4201
4003
  disabled: PropTypes$1.bool,
4202
4004
  children: PropTypes$1.node
4203
4005
  };
@@ -4206,21 +4008,22 @@ var defaultProps$3 = {
4206
4008
  playing: false,
4207
4009
  delay: 0,
4208
4010
  transitions: null,
4011
+ onComplete: null,
4209
4012
  disabled: false,
4210
4013
  children: null
4211
4014
  };
4212
-
4213
4015
  function Transitions(_ref) {
4214
4016
  var fullscreen = _ref.fullscreen,
4215
- playing = _ref.playing,
4216
- delay = _ref.delay,
4217
- transitions = _ref.transitions,
4218
- disabled = _ref.disabled,
4219
- children = _ref.children;
4220
-
4017
+ playing = _ref.playing,
4018
+ delay = _ref.delay,
4019
+ transitions = _ref.transitions,
4020
+ onComplete = _ref.onComplete,
4021
+ disabled = _ref.disabled,
4022
+ children = _ref.children;
4221
4023
  var _useScreenSize = useScreenSize(),
4222
- _useScreenSize$landsc = _useScreenSize.landscape,
4223
- landscape = _useScreenSize$landsc === void 0 ? false : _useScreenSize$landsc;
4024
+ _useScreenSize$landsc = _useScreenSize.landscape,
4025
+ landscape = _useScreenSize$landsc === void 0 ? true : _useScreenSize$landsc;
4026
+ // console.log({ landscape });
4224
4027
 
4225
4028
  var finalPlaying = playing || landscape;
4226
4029
  var finalTransitions = {
@@ -4239,30 +4042,29 @@ function Transitions(_ref) {
4239
4042
  } : currentTransition;
4240
4043
  });
4241
4044
  var _finalTransitions$in = finalTransitions["in"],
4242
- transitionIn = _finalTransitions$in === void 0 ? null : _finalTransitions$in,
4243
- _finalTransitions$out = finalTransitions.out,
4244
- transitionOut = _finalTransitions$out === void 0 ? null : _finalTransitions$out;
4045
+ transitionIn = _finalTransitions$in === void 0 ? null : _finalTransitions$in,
4046
+ _finalTransitions$out = finalTransitions.out,
4047
+ transitionOut = _finalTransitions$out === void 0 ? null : _finalTransitions$out;
4245
4048
  var finalTransitionIn = transitionIn !== null ? transitionIn : transitionOut;
4246
4049
  var finalTransitionOut = transitionOut !== null ? transitionOut : transitionIn;
4247
-
4248
4050
  var _ref2 = finalTransitionIn || {},
4249
- _ref2$name = _ref2.name,
4250
- transitionInName = _ref2$name === void 0 ? null : _ref2$name;
4251
-
4051
+ _ref2$name = _ref2.name,
4052
+ transitionInName = _ref2$name === void 0 ? null : _ref2$name;
4252
4053
  var _ref3 = finalTransitionOut || {},
4253
- _ref3$name = _ref3.name,
4254
- transitionOutName = _ref3$name === void 0 ? null : _ref3$name;
4255
-
4054
+ _ref3$name = _ref3.name,
4055
+ transitionOutName = _ref3$name === void 0 ? null : _ref3$name;
4256
4056
  var sameTransitionInOut = transitionInName === transitionOutName;
4257
4057
  var TransitionIn = finalTransitionIn !== null ? getComponentFromName(transitionInName, TransitionComponents, null) : null;
4258
4058
  var TransitionOut = finalTransitionOut !== null && !sameTransitionInOut ? getComponentFromName(transitionOutName, TransitionComponents, null) : null;
4259
4059
  var transitionInProps = finalTransitionIn !== null ? _objectSpread(_objectSpread({}, finalTransitionIn), {}, {
4260
4060
  name: undefined,
4261
- delay: delay
4061
+ delay: delay,
4062
+ onComplete: onComplete
4262
4063
  }) : null;
4263
4064
  var transitionOutProps = finalTransitionOut !== null ? _objectSpread(_objectSpread({}, finalTransitionOut), {}, {
4264
4065
  name: undefined,
4265
- delay: delay
4066
+ delay: delay,
4067
+ onComplete: onComplete
4266
4068
  }) : null;
4267
4069
  var renderTransitionOut = TransitionOut !== null && !disabled ? /*#__PURE__*/React.createElement(TransitionOut, Object.assign({
4268
4070
  fullscreen: fullscreen,
@@ -4275,7 +4077,6 @@ function Transitions(_ref) {
4275
4077
  direction: !sameTransitionInOut ? 'in' : null
4276
4078
  }, transitionInProps), renderTransitionOut) : renderTransitionOut;
4277
4079
  }
4278
-
4279
4080
  Transitions.propTypes = propTypes$3;
4280
4081
  Transitions.defaultProps = defaultProps$3;
4281
4082
 
@@ -4297,32 +4098,27 @@ var defaultProps$2 = {
4297
4098
  fullscreen: false,
4298
4099
  children: null
4299
4100
  };
4300
-
4301
4101
  var TransitionsStagger = function TransitionsStagger(_ref) {
4302
4102
  var transitions = _ref.transitions,
4303
- stagger = _ref.stagger,
4304
- playing = _ref.playing,
4305
- disabled = _ref.disabled,
4306
- delay = _ref.delay,
4307
- fullscreen = _ref.fullscreen,
4308
- children = _ref.children;
4103
+ stagger = _ref.stagger,
4104
+ playing = _ref.playing,
4105
+ disabled = _ref.disabled,
4106
+ delay = _ref.delay,
4107
+ fullscreen = _ref.fullscreen,
4108
+ children = _ref.children;
4309
4109
  var validIndex = 0;
4310
4110
  var elements = React.Children.map(children, function (child) {
4311
4111
  if (!child) {
4312
4112
  return null;
4313
4113
  }
4314
-
4315
4114
  var _child$type = child.type,
4316
- type = _child$type === void 0 ? null : _child$type;
4317
-
4115
+ type = _child$type === void 0 ? null : _child$type;
4318
4116
  var _ref2 = type || {},
4319
- _ref2$withoutTransiti = _ref2.withoutTransitionsWrapper,
4320
- withoutTransitionsWrapper = _ref2$withoutTransiti === void 0 ? false : _ref2$withoutTransiti;
4321
-
4117
+ _ref2$withoutTransiti = _ref2.withoutTransitionsWrapper,
4118
+ withoutTransitionsWrapper = _ref2$withoutTransiti === void 0 ? false : _ref2$withoutTransiti;
4322
4119
  if (disabled || withoutTransitionsWrapper) {
4323
4120
  return child;
4324
4121
  }
4325
-
4326
4122
  var el = /*#__PURE__*/React.createElement(Transitions, {
4327
4123
  transitions: transitions,
4328
4124
  delay: delay + validIndex * stagger,
@@ -4334,7 +4130,6 @@ var TransitionsStagger = function TransitionsStagger(_ref) {
4334
4130
  });
4335
4131
  return elements;
4336
4132
  };
4337
-
4338
4133
  TransitionsStagger.propTypes = propTypes$2;
4339
4134
  TransitionsStagger.defaultProps = defaultProps$2;
4340
4135
 
@@ -4348,18 +4143,16 @@ var defaultProps$1 = {
4348
4143
  highlightSelector: 'mark',
4349
4144
  style: null
4350
4145
  };
4351
-
4352
4146
  var HighlightStyle = function HighlightStyle(_ref) {
4353
4147
  var selector = _ref.selector,
4354
- highlightSelector = _ref.highlightSelector,
4355
- style = _ref.style;
4148
+ highlightSelector = _ref.highlightSelector,
4149
+ style = _ref.style;
4356
4150
  return style !== null ? /*#__PURE__*/React.createElement("style", {
4357
4151
  type: "text/css"
4358
4152
  }, "".concat([selector, highlightSelector].filter(function (it) {
4359
4153
  return it !== null;
4360
4154
  }).join(' '), "{").concat(convertStyleToString(style), "}")) : null;
4361
4155
  };
4362
-
4363
4156
  HighlightStyle.propTypes = propTypes$1;
4364
4157
  HighlightStyle.defaultProps = defaultProps$1;
4365
4158
 
@@ -4373,18 +4166,16 @@ var defaultProps = {
4373
4166
  linkSelector: 'a',
4374
4167
  style: null
4375
4168
  };
4376
-
4377
4169
  var LinkStyle = function LinkStyle(_ref) {
4378
4170
  var selector = _ref.selector,
4379
- linkSelector = _ref.linkSelector,
4380
- style = _ref.style;
4171
+ linkSelector = _ref.linkSelector,
4172
+ style = _ref.style;
4381
4173
  return style !== null ? /*#__PURE__*/React.createElement("style", {
4382
4174
  type: "text/css"
4383
4175
  }, "".concat([selector, linkSelector].filter(function (it) {
4384
4176
  return it !== null;
4385
4177
  }).join(' '), "{").concat(convertStyleToString(style), "}")) : null;
4386
4178
  };
4387
-
4388
4179
  LinkStyle.propTypes = propTypes;
4389
4180
  LinkStyle.defaultProps = defaultProps;
4390
4181