@micromag/core 0.3.360 → 0.3.362

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.
@@ -2,6 +2,7 @@
2
2
 
3
3
  .micromag-core-forms-form-actions{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;margin-top:2rem}.micromag-core-forms-form-actions.micromag-core-forms-form-left{-ms-flex-pack:start;justify-content:flex-start}.micromag-core-forms-form-actions.micromag-core-forms-form-right{-ms-flex-pack:end;justify-content:flex-end}
4
4
  .micromag-core-partials-link-withoutStyle{color:inherit;text-decoration:none}.micromag-core-partials-link-withoutStyle:hover{color:inherit;text-decoration:none}
5
+ @-webkit-keyframes micromag-core-partials-spinner-rotate{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes micromag-core-partials-spinner-rotate{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes micromag-core-partials-spinner-dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-35}to{stroke-dasharray:90,150;stroke-dashoffset:-124}}@keyframes micromag-core-partials-spinner-dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-35}to{stroke-dasharray:90,150;stroke-dashoffset:-124}}.micromag-core-partials-spinner-container{display:block;height:40px;width:40px}.micromag-core-partials-spinner-container .micromag-core-partials-spinner-path{stroke-linecap:round;color:currentColor}.micromag-core-partials-spinner-container.micromag-core-partials-spinner-animated{-webkit-animation:micromag-core-partials-spinner-rotate 2s linear infinite;animation:micromag-core-partials-spinner-rotate 2s linear infinite}.micromag-core-partials-spinner-container.micromag-core-partials-spinner-animated .micromag-core-partials-spinner-path{-webkit-animation:micromag-core-partials-spinner-dash 1.5s ease-in-out infinite;animation:micromag-core-partials-spinner-dash 1.5s ease-in-out infinite}
5
6
 
6
7
  .micromag-core-menus-breadcrumb-container .micromag-core-menus-breadcrumb-arrow+.micromag-core-menus-breadcrumb-arrow:before{content:">"}
7
8
  .micromag-core-menus-navbar-collapse{-ms-flex-preferred-size:initial;-ms-flex-positive:initial;flex-basis:auto;flex-grow:0}@media screen and (min-width:768px){.micromag-core-menus-navbar-collapse{-ms-flex-preferred-size:100%;-ms-flex-positive:1;flex-basis:100%;flex-grow:1}}
package/es/components.js CHANGED
@@ -66,7 +66,7 @@ var Label = function Label(_ref) {
66
66
  Label.propTypes = propTypes$S;
67
67
  Label.defaultProps = defaultProps$S;
68
68
 
69
- var styles$w = {"container":"micromag-core-buttons-button-container","asLink":"micromag-core-buttons-button-asLink","withoutStyle":"micromag-core-buttons-button-withoutStyle","icon":"micromag-core-buttons-button-icon","label":"micromag-core-buttons-button-label","withIcon":"micromag-core-buttons-button-withIcon","right":"micromag-core-buttons-button-right","withAnimations":"micromag-core-buttons-button-withAnimations","icon-right":"micromag-core-buttons-button-icon-right","withIconColumns":"micromag-core-buttons-button-withIconColumns","linkDisabled":"micromag-core-buttons-button-linkDisabled"};
69
+ var styles$x = {"container":"micromag-core-buttons-button-container","asLink":"micromag-core-buttons-button-asLink","withoutStyle":"micromag-core-buttons-button-withoutStyle","icon":"micromag-core-buttons-button-icon","label":"micromag-core-buttons-button-label","withIcon":"micromag-core-buttons-button-withIcon","right":"micromag-core-buttons-button-right","withAnimations":"micromag-core-buttons-button-withAnimations","icon-right":"micromag-core-buttons-button-icon-right","withIconColumns":"micromag-core-buttons-button-withIconColumns","linkDisabled":"micromag-core-buttons-button-linkDisabled"};
70
70
 
71
71
  var _excluded$b = ["type", "theme", "size", "href", "external", "direct", "target", "label", "children", "focusable", "active", "icon", "iconPosition", "disabled", "loading", "disableOnLoading", "small", "big", "withShadow", "withoutStyle", "withoutBootstrapStyles", "withoutTheme", "asLink", "outline", "onClick", "className", "iconClassName", "labelClassName", "refButton"];
72
72
  var propTypes$R = {
@@ -173,24 +173,24 @@ var Button$1 = function Button(_ref) {
173
173
  var hasInlineIcon = hasIcon && (iconPosition === 'inline' || text === null);
174
174
  var hasIconColumns = hasIcon && !hasInlineIcon;
175
175
  var content = /*#__PURE__*/React.createElement(React.Fragment, null, hasInlineIcon ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
176
- className: classNames([styles$w.icon, _defineProperty({}, iconClassName, iconClassName !== null)])
176
+ className: classNames([styles$x.icon, _defineProperty({}, iconClassName, iconClassName !== null)])
177
177
  }, icon), text !== null ? /*#__PURE__*/React.createElement("span", {
178
- className: classNames([styles$w.label, _defineProperty({}, labelClassName, labelClassName !== null)])
178
+ className: classNames([styles$x.label, _defineProperty({}, labelClassName, labelClassName !== null)])
179
179
  }, text) : null) : null, hasIconColumns ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
180
- className: classNames([styles$w.left, _defineProperty({}, iconClassName, iconClassName !== null && iconPosition === 'left')])
180
+ className: classNames([styles$x.left, _defineProperty({}, iconClassName, iconClassName !== null && iconPosition === 'left')])
181
181
  }, iconPosition === 'left' ? icon : null), /*#__PURE__*/React.createElement("span", {
182
- className: classNames([styles$w.center, _defineProperty({}, labelClassName, labelClassName !== null)])
182
+ className: classNames([styles$x.center, _defineProperty({}, labelClassName, labelClassName !== null)])
183
183
  }, text), /*#__PURE__*/React.createElement("span", {
184
- className: classNames([styles$w.right, _defineProperty({}, iconClassName, iconClassName !== null && iconPosition === 'right')])
184
+ className: classNames([styles$x.right, _defineProperty({}, iconClassName, iconClassName !== null && iconPosition === 'right')])
185
185
  }, iconPosition === 'right' ? icon : null), hasChildren ? children : null) : null, !hasIcon ? text : null, hasChildren ? children : null);
186
186
  var withStyle = !withoutTheme && !withoutStyle && !asLink;
187
187
  var buttonClassNames = classNames([!withoutBootstrapStyles ? (_ref7 = {
188
188
  btn: withStyle
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)]);
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$x.container, (_ref8 = {}, _defineProperty(_ref8, styles$x.withoutStyle, withoutStyle), _defineProperty(_ref8, styles$x.withIcon, hasIcon), _defineProperty(_ref8, styles$x.withIconColumns, hasIconColumns), _defineProperty(_ref8, styles$x.withText, text !== null), _defineProperty(_ref8, styles$x.withShadow, withShadow), _defineProperty(_ref8, styles$x.isSmall, small), _defineProperty(_ref8, styles$x.isBig, big), _defineProperty(_ref8, styles$x.isLink, href !== null), _defineProperty(_ref8, styles$x.asLink, asLink), _defineProperty(_ref8, styles$x.isDisabled, disabled), _defineProperty(_ref8, styles$x.isLoading, loading), _defineProperty(_ref8, className, className !== null), _ref8)]);
190
190
  if (href !== null) {
191
191
  var linkClassNames = classNames([buttonClassNames, _defineProperty({
192
192
  disabled: disabled
193
- }, styles$w.linkDisabled, disabled)]);
193
+ }, styles$x.linkDisabled, disabled)]);
194
194
  return external || direct ? /*#__PURE__*/React.createElement("a", Object.assign({}, props, {
195
195
  href: disabled ? null : href,
196
196
  className: linkClassNames,
@@ -218,7 +218,7 @@ var Button$1 = function Button(_ref) {
218
218
  Button$1.propTypes = propTypes$R;
219
219
  Button$1.defaultProps = defaultProps$R;
220
220
 
221
- var styles$v = {};
221
+ var styles$w = {};
222
222
 
223
223
  var _excluded$a = ["className", "onClick", "theme"];
224
224
  var propTypes$Q = {
@@ -248,7 +248,7 @@ var Buttons = function Buttons(_ref) {
248
248
  buttonClassName = _ref.buttonClassName,
249
249
  className = _ref.className;
250
250
  return /*#__PURE__*/React.createElement("div", {
251
- className: classNames(['btn-group', _defineProperty({}, "btn-group-".concat(size), size !== null), styles$v.container, _defineProperty({}, className, className !== null)]),
251
+ className: classNames(['btn-group', _defineProperty({}, "btn-group-".concat(size), size !== null), styles$w.container, _defineProperty({}, className, className !== null)]),
252
252
  role: "group"
253
253
  }, buttons.map(function (button, index) {
254
254
  var _ref4;
@@ -261,7 +261,7 @@ var Buttons = function Buttons(_ref) {
261
261
  buttonProps = _objectWithoutProperties(button, _excluded$a);
262
262
  var fixedProps = {
263
263
  key: "button-".concat(index),
264
- className: classNames([styles$v.button, (_ref4 = {}, _defineProperty(_ref4, buttonClassName, buttonClassName !== null), _defineProperty(_ref4, customClassName, customClassName !== null), _ref4)]),
264
+ className: classNames([styles$w.button, (_ref4 = {}, _defineProperty(_ref4, buttonClassName, buttonClassName !== null), _defineProperty(_ref4, customClassName, customClassName !== null), _ref4)]),
265
265
  onClick: function onClick(e) {
266
266
  if (_onClick !== null) {
267
267
  _onClick(e, button, index);
@@ -397,7 +397,7 @@ var FieldForm = function FieldForm(_ref) {
397
397
  FieldForm.propTypes = propTypes$O;
398
398
  FieldForm.defaultProps = defaultProps$O;
399
399
 
400
- var styles$u = {"actions":"micromag-core-forms-form-actions","left":"micromag-core-forms-form-left","right":"micromag-core-forms-form-right"};
400
+ var styles$v = {"actions":"micromag-core-forms-form-actions","left":"micromag-core-forms-form-left","right":"micromag-core-forms-form-right"};
401
401
 
402
402
  var propTypes$N = {
403
403
  action: PropTypes$1.string.isRequired,
@@ -570,7 +570,7 @@ var Form = function Form(_ref) {
570
570
 
571
571
  return /*#__PURE__*/React.createElement("form", {
572
572
  action: action,
573
- className: classNames([styles$u.container, _defineProperty({}, className, className !== null)]),
573
+ className: classNames([styles$v.container, _defineProperty({}, className, className !== null)]),
574
574
  method: method,
575
575
  onSubmit: onSubmit
576
576
  }, !withoutBackButton && fields !== null && fields.length > 0 && fieldParams !== null ? /*#__PURE__*/React.createElement("div", {
@@ -580,7 +580,7 @@ var Form = function Form(_ref) {
580
580
  outline: true,
581
581
  onClick: closeFieldForm
582
582
  })) : null, fields !== null && fields.length > 0 && fieldParams !== null ? /*#__PURE__*/React.createElement("div", {
583
- className: classNames(['w-100', styles$u.panel]),
583
+ className: classNames(['w-100', styles$v.panel]),
584
584
  key: "field"
585
585
  }, /*#__PURE__*/React.createElement(FieldForm, {
586
586
  name: fieldName,
@@ -596,11 +596,11 @@ var Form = function Form(_ref) {
596
596
  onChange: setValue,
597
597
  gotoFieldForm: gotoFieldForm,
598
598
  closeFieldForm: closeFieldForm,
599
- className: classNames([styles$u.fields, _defineProperty({}, fieldsClassName, fieldsClassName !== null)])
599
+ className: classNames([styles$v.fields, _defineProperty({}, fieldsClassName, fieldsClassName !== null)])
600
600
  }) : null, generalError ? /*#__PURE__*/React.createElement("p", {
601
601
  className: "text-danger my-1"
602
602
  }, generalError) : null, children, !withoutActions && fieldParams === null ? /*#__PURE__*/React.createElement("div", {
603
- className: classNames([styles$u.actions, (_ref4 = {}, _defineProperty(_ref4, styles$u[actionsAlign], actionsAlign), _defineProperty(_ref4, actionsClassName, actionsClassName !== null), _ref4)])
603
+ className: classNames([styles$v.actions, (_ref4 = {}, _defineProperty(_ref4, styles$v[actionsAlign], actionsAlign), _defineProperty(_ref4, actionsClassName, actionsClassName !== null), _ref4)])
604
604
  }, onCancel !== null || onCancelHref !== null ? /*#__PURE__*/React.createElement(Button$1, {
605
605
  type: "button",
606
606
  onClick: onCancel,
@@ -617,7 +617,7 @@ var Form = function Form(_ref) {
617
617
  }]
618
618
  })) : null, buttons !== null ? /*#__PURE__*/React.createElement(Buttons, {
619
619
  buttons: buttons,
620
- className: styles$u.buttons
620
+ className: styles$v.buttons
621
621
  }) : /*#__PURE__*/React.createElement(Button$1, {
622
622
  type: "submit",
623
623
  theme: submitButtonTheme || 'primary',
@@ -635,7 +635,7 @@ var Form = function Form(_ref) {
635
635
  Form.propTypes = propTypes$N;
636
636
  Form.defaultProps = defaultProps$N;
637
637
 
638
- var styles$t = {"withoutStyle":"micromag-core-partials-link-withoutStyle"};
638
+ var styles$u = {"withoutStyle":"micromag-core-partials-link-withoutStyle"};
639
639
 
640
640
  var _excluded$7 = ["href", "external", "children", "target", "rel", "className", "withoutStyle"];
641
641
  var propTypes$M = {
@@ -666,12 +666,12 @@ var Link = function Link(_ref) {
666
666
  withoutStyle = _ref.withoutStyle,
667
667
  props = _objectWithoutProperties(_ref, _excluded$7);
668
668
  return external ? /*#__PURE__*/React.createElement("a", Object.assign({
669
- className: classNames([className, _defineProperty({}, styles$t.withoutStyle, withoutStyle)]),
669
+ className: classNames([className, _defineProperty({}, styles$u.withoutStyle, withoutStyle)]),
670
670
  href: href,
671
671
  target: target,
672
672
  rel: rel
673
673
  }, props), /*#__PURE__*/React.createElement(Label, null, children)) : /*#__PURE__*/React.createElement(Link$1, Object.assign({
674
- className: classNames([className, _defineProperty({}, styles$t.withoutStyle, withoutStyle)]),
674
+ className: classNames([className, _defineProperty({}, styles$u.withoutStyle, withoutStyle)]),
675
675
  to: href
676
676
  }, props), /*#__PURE__*/React.createElement(Label, null, children));
677
677
  };
@@ -825,73 +825,41 @@ var Card = function Card(_ref) {
825
825
  Card.propTypes = propTypes$L;
826
826
  Card.defaultProps = defaultProps$L;
827
827
 
828
+ var styles$t = {"container":"micromag-core-partials-spinner-container","path":"micromag-core-partials-spinner-path","animated":"micromag-core-partials-spinner-animated","rotate":"micromag-core-partials-spinner-rotate","dash":"micromag-core-partials-spinner-dash"};
829
+
828
830
  var propTypes$K = {
829
831
  animated: PropTypes$1.bool,
830
832
  color: PropTypes$1.string,
833
+ strokeWidth: PropTypes$1.number,
831
834
  className: PropTypes$1.string
832
835
  };
833
836
  var defaultProps$K = {
834
837
  animated: true,
835
838
  color: 'currentColor',
839
+ strokeWidth: 3,
836
840
  className: null
837
841
  };
838
842
  var Spinner = function Spinner(_ref) {
843
+ var _ref2;
839
844
  var animated = _ref.animated,
840
845
  color = _ref.color,
846
+ strokeWidth = _ref.strokeWidth,
841
847
  className = _ref.className;
842
848
  return /*#__PURE__*/React.createElement("svg", {
843
- className: classNames([_defineProperty({}, className, className !== null)]),
844
- width: "38",
845
- height: "38",
846
- viewBox: "0 0 38 38",
849
+ className: classNames([styles$t.container, (_ref2 = {}, _defineProperty(_ref2, styles$t.animated, animated), _defineProperty(_ref2, className, className !== null), _ref2)]),
850
+ width: "40",
851
+ height: "40",
852
+ viewBox: "0 0 40 40",
847
853
  xmlns: "http://www.w3.org/2000/svg"
848
- }, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
849
- x1: "8.042%",
850
- y1: "0%",
851
- x2: "65.682%",
852
- y2: "23.865%",
853
- id: "a"
854
- }, /*#__PURE__*/React.createElement("stop", {
855
- stopColor: color,
856
- stopOpacity: "0",
857
- offset: "0%"
858
- }), /*#__PURE__*/React.createElement("stop", {
859
- stopColor: color,
860
- stopOpacity: ".631",
861
- offset: "63.146%"
862
- }), /*#__PURE__*/React.createElement("stop", {
863
- stopColor: color,
864
- offset: "100%"
865
- }))), /*#__PURE__*/React.createElement("g", {
854
+ }, /*#__PURE__*/React.createElement("circle", {
855
+ className: styles$t.path,
856
+ cx: "20",
857
+ cy: "20",
858
+ r: "12",
866
859
  fill: "none",
867
- fillRule: "evenodd"
868
- }, /*#__PURE__*/React.createElement("g", {
869
- transform: "translate(1 1)"
870
- }, /*#__PURE__*/React.createElement("path", {
871
- d: "M36 18c0-9.94-8.06-18-18-18",
872
- id: "Oval-2",
873
- stroke: "url(#a)",
874
- strokeWidth: "2"
875
- }, animated ? /*#__PURE__*/React.createElement("animateTransform", {
876
- attributeName: "transform",
877
- type: "rotate",
878
- from: "0 18 18",
879
- to: "360 18 18",
880
- dur: "0.9s",
881
- repeatCount: "indefinite"
882
- }) : null), /*#__PURE__*/React.createElement("circle", {
883
- fill: color,
884
- cx: "36",
885
- cy: "18",
886
- r: "1"
887
- }, animated ? /*#__PURE__*/React.createElement("animateTransform", {
888
- attributeName: "transform",
889
- type: "rotate",
890
- from: "0 18 18",
891
- to: "360 18 18",
892
- dur: "0.9s",
893
- repeatCount: "indefinite"
894
- }) : null))));
860
+ stroke: color,
861
+ strokeWidth: strokeWidth
862
+ }));
895
863
  };
896
864
  Spinner.propTypes = propTypes$K;
897
865
  Spinner.defaultProps = defaultProps$K;
@@ -2857,7 +2825,7 @@ var quizAnswer = PropTypes$1.shape(_objectSpread(_objectSpread({}, answerShape),
2857
2825
  PropTypes$1.arrayOf(answer);
2858
2826
  PropTypes$1.arrayOf(quizAnswer);
2859
2827
  var callToActionTypes = PropTypes$1.oneOf(['swipe-up', 'button']);
2860
- PropTypes$1.shape({
2828
+ var callToAction = PropTypes$1.shape({
2861
2829
  active: PropTypes$1.bool,
2862
2830
  type: callToActionTypes,
2863
2831
  url: PropTypes$1.string,
@@ -3102,10 +3070,16 @@ PropTypes$1.shape({
3102
3070
  id: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.number]),
3103
3071
  name: PropTypes$1.string
3104
3072
  });
3105
- PropTypes$1.shape({
3073
+ var badge = PropTypes$1.shape({
3106
3074
  label: textElement,
3107
3075
  buttonStyle: boxStyle
3108
3076
  });
3077
+ PropTypes$1.shape({
3078
+ badge: badge
3079
+ });
3080
+ PropTypes$1.shape({
3081
+ callToAction: callToAction
3082
+ });
3109
3083
 
3110
3084
  /* eslint-disable react/no-array-index-key */
3111
3085
  var propTypes$d = {
package/es/index.js CHANGED
@@ -609,6 +609,12 @@ var badge = PropTypes$1.shape({
609
609
  label: textElement,
610
610
  buttonStyle: boxStyle
611
611
  });
612
+ var header = PropTypes$1.shape({
613
+ badge: badge
614
+ });
615
+ var footer = PropTypes$1.shape({
616
+ callToAction: callToAction
617
+ });
612
618
 
613
619
  var PropTypes = /*#__PURE__*/Object.freeze({
614
620
  __proto__: null,
@@ -754,7 +760,9 @@ var PropTypes = /*#__PURE__*/Object.freeze({
754
760
  pageMetadata: pageMetadata,
755
761
  authorElement: authorElement,
756
762
  visitor: visitor,
757
- badge: badge
763
+ badge: badge,
764
+ header: header,
765
+ footer: footer
758
766
  });
759
767
 
760
768
  var sortedColors = function sortedColors(colors) {
package/lib/components.js CHANGED
@@ -107,7 +107,7 @@ var Label = function Label(_ref) {
107
107
  Label.propTypes = propTypes$S;
108
108
  Label.defaultProps = defaultProps$S;
109
109
 
110
- var styles$w = {"container":"micromag-core-buttons-button-container","asLink":"micromag-core-buttons-button-asLink","withoutStyle":"micromag-core-buttons-button-withoutStyle","icon":"micromag-core-buttons-button-icon","label":"micromag-core-buttons-button-label","withIcon":"micromag-core-buttons-button-withIcon","right":"micromag-core-buttons-button-right","withAnimations":"micromag-core-buttons-button-withAnimations","icon-right":"micromag-core-buttons-button-icon-right","withIconColumns":"micromag-core-buttons-button-withIconColumns","linkDisabled":"micromag-core-buttons-button-linkDisabled"};
110
+ var styles$x = {"container":"micromag-core-buttons-button-container","asLink":"micromag-core-buttons-button-asLink","withoutStyle":"micromag-core-buttons-button-withoutStyle","icon":"micromag-core-buttons-button-icon","label":"micromag-core-buttons-button-label","withIcon":"micromag-core-buttons-button-withIcon","right":"micromag-core-buttons-button-right","withAnimations":"micromag-core-buttons-button-withAnimations","icon-right":"micromag-core-buttons-button-icon-right","withIconColumns":"micromag-core-buttons-button-withIconColumns","linkDisabled":"micromag-core-buttons-button-linkDisabled"};
111
111
 
112
112
  var _excluded$b = ["type", "theme", "size", "href", "external", "direct", "target", "label", "children", "focusable", "active", "icon", "iconPosition", "disabled", "loading", "disableOnLoading", "small", "big", "withShadow", "withoutStyle", "withoutBootstrapStyles", "withoutTheme", "asLink", "outline", "onClick", "className", "iconClassName", "labelClassName", "refButton"];
113
113
  var propTypes$R = {
@@ -214,24 +214,24 @@ var Button$1 = function Button(_ref) {
214
214
  var hasInlineIcon = hasIcon && (iconPosition === 'inline' || text === null);
215
215
  var hasIconColumns = hasIcon && !hasInlineIcon;
216
216
  var content = /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, hasInlineIcon ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("span", {
217
- className: classNames__default["default"]([styles$w.icon, _defineProperty__default["default"]({}, iconClassName, iconClassName !== null)])
217
+ className: classNames__default["default"]([styles$x.icon, _defineProperty__default["default"]({}, iconClassName, iconClassName !== null)])
218
218
  }, icon), text !== null ? /*#__PURE__*/React__default["default"].createElement("span", {
219
- className: classNames__default["default"]([styles$w.label, _defineProperty__default["default"]({}, labelClassName, labelClassName !== null)])
219
+ className: classNames__default["default"]([styles$x.label, _defineProperty__default["default"]({}, labelClassName, labelClassName !== null)])
220
220
  }, text) : null) : null, hasIconColumns ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("span", {
221
- className: classNames__default["default"]([styles$w.left, _defineProperty__default["default"]({}, iconClassName, iconClassName !== null && iconPosition === 'left')])
221
+ className: classNames__default["default"]([styles$x.left, _defineProperty__default["default"]({}, iconClassName, iconClassName !== null && iconPosition === 'left')])
222
222
  }, iconPosition === 'left' ? icon : null), /*#__PURE__*/React__default["default"].createElement("span", {
223
- className: classNames__default["default"]([styles$w.center, _defineProperty__default["default"]({}, labelClassName, labelClassName !== null)])
223
+ className: classNames__default["default"]([styles$x.center, _defineProperty__default["default"]({}, labelClassName, labelClassName !== null)])
224
224
  }, text), /*#__PURE__*/React__default["default"].createElement("span", {
225
- className: classNames__default["default"]([styles$w.right, _defineProperty__default["default"]({}, iconClassName, iconClassName !== null && iconPosition === 'right')])
225
+ className: classNames__default["default"]([styles$x.right, _defineProperty__default["default"]({}, iconClassName, iconClassName !== null && iconPosition === 'right')])
226
226
  }, iconPosition === 'right' ? icon : null), hasChildren ? children : null) : null, !hasIcon ? text : null, hasChildren ? children : null);
227
227
  var withStyle = !withoutTheme && !withoutStyle && !asLink;
228
228
  var buttonClassNames = classNames__default["default"]([!withoutBootstrapStyles ? (_ref7 = {
229
229
  btn: withStyle
230
- }, _defineProperty__default["default"](_ref7, "btn-".concat(outline ? 'outline-' : '').concat(theme), withStyle && theme !== null), _defineProperty__default["default"](_ref7, "btn-".concat(size), withStyle && size !== null), _defineProperty__default["default"](_ref7, "active", !withoutStyle && active), _ref7) : null, styles$w.container, (_ref8 = {}, _defineProperty__default["default"](_ref8, styles$w.withoutStyle, withoutStyle), _defineProperty__default["default"](_ref8, styles$w.withIcon, hasIcon), _defineProperty__default["default"](_ref8, styles$w.withIconColumns, hasIconColumns), _defineProperty__default["default"](_ref8, styles$w.withText, text !== null), _defineProperty__default["default"](_ref8, styles$w.withShadow, withShadow), _defineProperty__default["default"](_ref8, styles$w.isSmall, small), _defineProperty__default["default"](_ref8, styles$w.isBig, big), _defineProperty__default["default"](_ref8, styles$w.isLink, href !== null), _defineProperty__default["default"](_ref8, styles$w.asLink, asLink), _defineProperty__default["default"](_ref8, styles$w.isDisabled, disabled), _defineProperty__default["default"](_ref8, styles$w.isLoading, loading), _defineProperty__default["default"](_ref8, className, className !== null), _ref8)]);
230
+ }, _defineProperty__default["default"](_ref7, "btn-".concat(outline ? 'outline-' : '').concat(theme), withStyle && theme !== null), _defineProperty__default["default"](_ref7, "btn-".concat(size), withStyle && size !== null), _defineProperty__default["default"](_ref7, "active", !withoutStyle && active), _ref7) : null, styles$x.container, (_ref8 = {}, _defineProperty__default["default"](_ref8, styles$x.withoutStyle, withoutStyle), _defineProperty__default["default"](_ref8, styles$x.withIcon, hasIcon), _defineProperty__default["default"](_ref8, styles$x.withIconColumns, hasIconColumns), _defineProperty__default["default"](_ref8, styles$x.withText, text !== null), _defineProperty__default["default"](_ref8, styles$x.withShadow, withShadow), _defineProperty__default["default"](_ref8, styles$x.isSmall, small), _defineProperty__default["default"](_ref8, styles$x.isBig, big), _defineProperty__default["default"](_ref8, styles$x.isLink, href !== null), _defineProperty__default["default"](_ref8, styles$x.asLink, asLink), _defineProperty__default["default"](_ref8, styles$x.isDisabled, disabled), _defineProperty__default["default"](_ref8, styles$x.isLoading, loading), _defineProperty__default["default"](_ref8, className, className !== null), _ref8)]);
231
231
  if (href !== null) {
232
232
  var linkClassNames = classNames__default["default"]([buttonClassNames, _defineProperty__default["default"]({
233
233
  disabled: disabled
234
- }, styles$w.linkDisabled, disabled)]);
234
+ }, styles$x.linkDisabled, disabled)]);
235
235
  return external || direct ? /*#__PURE__*/React__default["default"].createElement("a", Object.assign({}, props, {
236
236
  href: disabled ? null : href,
237
237
  className: linkClassNames,
@@ -259,7 +259,7 @@ var Button$1 = function Button(_ref) {
259
259
  Button$1.propTypes = propTypes$R;
260
260
  Button$1.defaultProps = defaultProps$R;
261
261
 
262
- var styles$v = {};
262
+ var styles$w = {};
263
263
 
264
264
  var _excluded$a = ["className", "onClick", "theme"];
265
265
  var propTypes$Q = {
@@ -289,7 +289,7 @@ var Buttons = function Buttons(_ref) {
289
289
  buttonClassName = _ref.buttonClassName,
290
290
  className = _ref.className;
291
291
  return /*#__PURE__*/React__default["default"].createElement("div", {
292
- className: classNames__default["default"](['btn-group', _defineProperty__default["default"]({}, "btn-group-".concat(size), size !== null), styles$v.container, _defineProperty__default["default"]({}, className, className !== null)]),
292
+ className: classNames__default["default"](['btn-group', _defineProperty__default["default"]({}, "btn-group-".concat(size), size !== null), styles$w.container, _defineProperty__default["default"]({}, className, className !== null)]),
293
293
  role: "group"
294
294
  }, buttons.map(function (button, index) {
295
295
  var _ref4;
@@ -302,7 +302,7 @@ var Buttons = function Buttons(_ref) {
302
302
  buttonProps = _objectWithoutProperties__default["default"](button, _excluded$a);
303
303
  var fixedProps = {
304
304
  key: "button-".concat(index),
305
- className: classNames__default["default"]([styles$v.button, (_ref4 = {}, _defineProperty__default["default"](_ref4, buttonClassName, buttonClassName !== null), _defineProperty__default["default"](_ref4, customClassName, customClassName !== null), _ref4)]),
305
+ className: classNames__default["default"]([styles$w.button, (_ref4 = {}, _defineProperty__default["default"](_ref4, buttonClassName, buttonClassName !== null), _defineProperty__default["default"](_ref4, customClassName, customClassName !== null), _ref4)]),
306
306
  onClick: function onClick(e) {
307
307
  if (_onClick !== null) {
308
308
  _onClick(e, button, index);
@@ -438,7 +438,7 @@ var FieldForm = function FieldForm(_ref) {
438
438
  FieldForm.propTypes = propTypes$O;
439
439
  FieldForm.defaultProps = defaultProps$O;
440
440
 
441
- var styles$u = {"actions":"micromag-core-forms-form-actions","left":"micromag-core-forms-form-left","right":"micromag-core-forms-form-right"};
441
+ var styles$v = {"actions":"micromag-core-forms-form-actions","left":"micromag-core-forms-form-left","right":"micromag-core-forms-form-right"};
442
442
 
443
443
  var propTypes$N = {
444
444
  action: PropTypes__default["default"].string.isRequired,
@@ -611,7 +611,7 @@ var Form = function Form(_ref) {
611
611
 
612
612
  return /*#__PURE__*/React__default["default"].createElement("form", {
613
613
  action: action,
614
- className: classNames__default["default"]([styles$u.container, _defineProperty__default["default"]({}, className, className !== null)]),
614
+ className: classNames__default["default"]([styles$v.container, _defineProperty__default["default"]({}, className, className !== null)]),
615
615
  method: method,
616
616
  onSubmit: onSubmit
617
617
  }, !withoutBackButton && fields !== null && fields.length > 0 && fieldParams !== null ? /*#__PURE__*/React__default["default"].createElement("div", {
@@ -621,7 +621,7 @@ var Form = function Form(_ref) {
621
621
  outline: true,
622
622
  onClick: closeFieldForm
623
623
  })) : null, fields !== null && fields.length > 0 && fieldParams !== null ? /*#__PURE__*/React__default["default"].createElement("div", {
624
- className: classNames__default["default"](['w-100', styles$u.panel]),
624
+ className: classNames__default["default"](['w-100', styles$v.panel]),
625
625
  key: "field"
626
626
  }, /*#__PURE__*/React__default["default"].createElement(FieldForm, {
627
627
  name: fieldName,
@@ -637,11 +637,11 @@ var Form = function Form(_ref) {
637
637
  onChange: setValue,
638
638
  gotoFieldForm: gotoFieldForm,
639
639
  closeFieldForm: closeFieldForm,
640
- className: classNames__default["default"]([styles$u.fields, _defineProperty__default["default"]({}, fieldsClassName, fieldsClassName !== null)])
640
+ className: classNames__default["default"]([styles$v.fields, _defineProperty__default["default"]({}, fieldsClassName, fieldsClassName !== null)])
641
641
  }) : null, generalError ? /*#__PURE__*/React__default["default"].createElement("p", {
642
642
  className: "text-danger my-1"
643
643
  }, generalError) : null, children, !withoutActions && fieldParams === null ? /*#__PURE__*/React__default["default"].createElement("div", {
644
- className: classNames__default["default"]([styles$u.actions, (_ref4 = {}, _defineProperty__default["default"](_ref4, styles$u[actionsAlign], actionsAlign), _defineProperty__default["default"](_ref4, actionsClassName, actionsClassName !== null), _ref4)])
644
+ className: classNames__default["default"]([styles$v.actions, (_ref4 = {}, _defineProperty__default["default"](_ref4, styles$v[actionsAlign], actionsAlign), _defineProperty__default["default"](_ref4, actionsClassName, actionsClassName !== null), _ref4)])
645
645
  }, onCancel !== null || onCancelHref !== null ? /*#__PURE__*/React__default["default"].createElement(Button$1, {
646
646
  type: "button",
647
647
  onClick: onCancel,
@@ -658,7 +658,7 @@ var Form = function Form(_ref) {
658
658
  }]
659
659
  })) : null, buttons !== null ? /*#__PURE__*/React__default["default"].createElement(Buttons, {
660
660
  buttons: buttons,
661
- className: styles$u.buttons
661
+ className: styles$v.buttons
662
662
  }) : /*#__PURE__*/React__default["default"].createElement(Button$1, {
663
663
  type: "submit",
664
664
  theme: submitButtonTheme || 'primary',
@@ -676,7 +676,7 @@ var Form = function Form(_ref) {
676
676
  Form.propTypes = propTypes$N;
677
677
  Form.defaultProps = defaultProps$N;
678
678
 
679
- var styles$t = {"withoutStyle":"micromag-core-partials-link-withoutStyle"};
679
+ var styles$u = {"withoutStyle":"micromag-core-partials-link-withoutStyle"};
680
680
 
681
681
  var _excluded$7 = ["href", "external", "children", "target", "rel", "className", "withoutStyle"];
682
682
  var propTypes$M = {
@@ -707,12 +707,12 @@ var Link = function Link(_ref) {
707
707
  withoutStyle = _ref.withoutStyle,
708
708
  props = _objectWithoutProperties__default["default"](_ref, _excluded$7);
709
709
  return external ? /*#__PURE__*/React__default["default"].createElement("a", Object.assign({
710
- className: classNames__default["default"]([className, _defineProperty__default["default"]({}, styles$t.withoutStyle, withoutStyle)]),
710
+ className: classNames__default["default"]([className, _defineProperty__default["default"]({}, styles$u.withoutStyle, withoutStyle)]),
711
711
  href: href,
712
712
  target: target,
713
713
  rel: rel
714
714
  }, props), /*#__PURE__*/React__default["default"].createElement(Label, null, children)) : /*#__PURE__*/React__default["default"].createElement(reactRouterDom.Link, Object.assign({
715
- className: classNames__default["default"]([className, _defineProperty__default["default"]({}, styles$t.withoutStyle, withoutStyle)]),
715
+ className: classNames__default["default"]([className, _defineProperty__default["default"]({}, styles$u.withoutStyle, withoutStyle)]),
716
716
  to: href
717
717
  }, props), /*#__PURE__*/React__default["default"].createElement(Label, null, children));
718
718
  };
@@ -866,73 +866,41 @@ var Card = function Card(_ref) {
866
866
  Card.propTypes = propTypes$L;
867
867
  Card.defaultProps = defaultProps$L;
868
868
 
869
+ var styles$t = {"container":"micromag-core-partials-spinner-container","path":"micromag-core-partials-spinner-path","animated":"micromag-core-partials-spinner-animated","rotate":"micromag-core-partials-spinner-rotate","dash":"micromag-core-partials-spinner-dash"};
870
+
869
871
  var propTypes$K = {
870
872
  animated: PropTypes__default["default"].bool,
871
873
  color: PropTypes__default["default"].string,
874
+ strokeWidth: PropTypes__default["default"].number,
872
875
  className: PropTypes__default["default"].string
873
876
  };
874
877
  var defaultProps$K = {
875
878
  animated: true,
876
879
  color: 'currentColor',
880
+ strokeWidth: 3,
877
881
  className: null
878
882
  };
879
883
  var Spinner = function Spinner(_ref) {
884
+ var _ref2;
880
885
  var animated = _ref.animated,
881
886
  color = _ref.color,
887
+ strokeWidth = _ref.strokeWidth,
882
888
  className = _ref.className;
883
889
  return /*#__PURE__*/React__default["default"].createElement("svg", {
884
- className: classNames__default["default"]([_defineProperty__default["default"]({}, className, className !== null)]),
885
- width: "38",
886
- height: "38",
887
- viewBox: "0 0 38 38",
890
+ className: classNames__default["default"]([styles$t.container, (_ref2 = {}, _defineProperty__default["default"](_ref2, styles$t.animated, animated), _defineProperty__default["default"](_ref2, className, className !== null), _ref2)]),
891
+ width: "40",
892
+ height: "40",
893
+ viewBox: "0 0 40 40",
888
894
  xmlns: "http://www.w3.org/2000/svg"
889
- }, /*#__PURE__*/React__default["default"].createElement("defs", null, /*#__PURE__*/React__default["default"].createElement("linearGradient", {
890
- x1: "8.042%",
891
- y1: "0%",
892
- x2: "65.682%",
893
- y2: "23.865%",
894
- id: "a"
895
- }, /*#__PURE__*/React__default["default"].createElement("stop", {
896
- stopColor: color,
897
- stopOpacity: "0",
898
- offset: "0%"
899
- }), /*#__PURE__*/React__default["default"].createElement("stop", {
900
- stopColor: color,
901
- stopOpacity: ".631",
902
- offset: "63.146%"
903
- }), /*#__PURE__*/React__default["default"].createElement("stop", {
904
- stopColor: color,
905
- offset: "100%"
906
- }))), /*#__PURE__*/React__default["default"].createElement("g", {
895
+ }, /*#__PURE__*/React__default["default"].createElement("circle", {
896
+ className: styles$t.path,
897
+ cx: "20",
898
+ cy: "20",
899
+ r: "12",
907
900
  fill: "none",
908
- fillRule: "evenodd"
909
- }, /*#__PURE__*/React__default["default"].createElement("g", {
910
- transform: "translate(1 1)"
911
- }, /*#__PURE__*/React__default["default"].createElement("path", {
912
- d: "M36 18c0-9.94-8.06-18-18-18",
913
- id: "Oval-2",
914
- stroke: "url(#a)",
915
- strokeWidth: "2"
916
- }, animated ? /*#__PURE__*/React__default["default"].createElement("animateTransform", {
917
- attributeName: "transform",
918
- type: "rotate",
919
- from: "0 18 18",
920
- to: "360 18 18",
921
- dur: "0.9s",
922
- repeatCount: "indefinite"
923
- }) : null), /*#__PURE__*/React__default["default"].createElement("circle", {
924
- fill: color,
925
- cx: "36",
926
- cy: "18",
927
- r: "1"
928
- }, animated ? /*#__PURE__*/React__default["default"].createElement("animateTransform", {
929
- attributeName: "transform",
930
- type: "rotate",
931
- from: "0 18 18",
932
- to: "360 18 18",
933
- dur: "0.9s",
934
- repeatCount: "indefinite"
935
- }) : null))));
901
+ stroke: color,
902
+ strokeWidth: strokeWidth
903
+ }));
936
904
  };
937
905
  Spinner.propTypes = propTypes$K;
938
906
  Spinner.defaultProps = defaultProps$K;
@@ -2898,7 +2866,7 @@ var quizAnswer = PropTypes__default["default"].shape(_objectSpread__default["def
2898
2866
  PropTypes__default["default"].arrayOf(answer);
2899
2867
  PropTypes__default["default"].arrayOf(quizAnswer);
2900
2868
  var callToActionTypes = PropTypes__default["default"].oneOf(['swipe-up', 'button']);
2901
- PropTypes__default["default"].shape({
2869
+ var callToAction = PropTypes__default["default"].shape({
2902
2870
  active: PropTypes__default["default"].bool,
2903
2871
  type: callToActionTypes,
2904
2872
  url: PropTypes__default["default"].string,
@@ -3143,10 +3111,16 @@ PropTypes__default["default"].shape({
3143
3111
  id: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string, PropTypes__default["default"].number]),
3144
3112
  name: PropTypes__default["default"].string
3145
3113
  });
3146
- PropTypes__default["default"].shape({
3114
+ var badge = PropTypes__default["default"].shape({
3147
3115
  label: textElement,
3148
3116
  buttonStyle: boxStyle
3149
3117
  });
3118
+ PropTypes__default["default"].shape({
3119
+ badge: badge
3120
+ });
3121
+ PropTypes__default["default"].shape({
3122
+ callToAction: callToAction
3123
+ });
3150
3124
 
3151
3125
  /* eslint-disable react/no-array-index-key */
3152
3126
  var propTypes$d = {
package/lib/index.js CHANGED
@@ -636,6 +636,12 @@ var badge = PropTypes__default["default"].shape({
636
636
  label: textElement,
637
637
  buttonStyle: boxStyle
638
638
  });
639
+ var header = PropTypes__default["default"].shape({
640
+ badge: badge
641
+ });
642
+ var footer = PropTypes__default["default"].shape({
643
+ callToAction: callToAction
644
+ });
639
645
 
640
646
  var PropTypes = /*#__PURE__*/Object.freeze({
641
647
  __proto__: null,
@@ -781,7 +787,9 @@ var PropTypes = /*#__PURE__*/Object.freeze({
781
787
  pageMetadata: pageMetadata,
782
788
  authorElement: authorElement,
783
789
  visitor: visitor,
784
- badge: badge
790
+ badge: badge,
791
+ header: header,
792
+ footer: footer
785
793
  });
786
794
 
787
795
  var sortedColors = function sortedColors(colors) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/core",
3
- "version": "0.3.360",
3
+ "version": "0.3.362",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "javascript"
@@ -133,5 +133,5 @@
133
133
  "publishConfig": {
134
134
  "access": "public"
135
135
  },
136
- "gitHead": "5531b1c55e0dd7e7a9c6eeee217ca28d985c7921"
136
+ "gitHead": "21619f51536d95517afabfdf316ef8fc345f6562"
137
137
  }