@micromag/core 0.3.344 → 0.3.347
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 +9 -3
- package/lib/components.js +9 -3
- package/package.json +2 -2
package/es/components.js
CHANGED
|
@@ -408,6 +408,8 @@ var propTypes$G = {
|
|
|
408
408
|
postForm: PropTypes$1.func,
|
|
409
409
|
submitButtonLabel: PropTypes.label,
|
|
410
410
|
submitButtonLoadingLabel: PropTypes.label,
|
|
411
|
+
submitButtonTheme: PropTypes$1.string,
|
|
412
|
+
cancelButtonTheme: PropTypes$1.string,
|
|
411
413
|
buttons: PropTypes.buttons,
|
|
412
414
|
children: PropTypes$1.node,
|
|
413
415
|
actionsAlign: PropTypes$1.oneOf(['left', 'right']),
|
|
@@ -439,6 +441,8 @@ var defaultProps$G = {
|
|
|
439
441
|
}]
|
|
440
442
|
}),
|
|
441
443
|
submitButtonLoadingLabel: null,
|
|
444
|
+
submitButtonTheme: null,
|
|
445
|
+
cancelButtonTheme: null,
|
|
442
446
|
buttons: null,
|
|
443
447
|
children: null,
|
|
444
448
|
actionsAlign: 'left',
|
|
@@ -466,6 +470,8 @@ var Form = function Form(_ref) {
|
|
|
466
470
|
postForm = _ref.postForm,
|
|
467
471
|
submitButtonLabel = _ref.submitButtonLabel,
|
|
468
472
|
submitButtonLoadingLabel = _ref.submitButtonLoadingLabel,
|
|
473
|
+
submitButtonTheme = _ref.submitButtonTheme,
|
|
474
|
+
cancelButtonTheme = _ref.cancelButtonTheme,
|
|
469
475
|
buttons = _ref.buttons,
|
|
470
476
|
children = _ref.children,
|
|
471
477
|
actionsAlign = _ref.actionsAlign,
|
|
@@ -599,7 +605,7 @@ var Form = function Form(_ref) {
|
|
|
599
605
|
type: "button",
|
|
600
606
|
onClick: onCancel,
|
|
601
607
|
href: onCancelHref,
|
|
602
|
-
theme:
|
|
608
|
+
theme: cancelButtonTheme || 'secondary',
|
|
603
609
|
outline: true,
|
|
604
610
|
disabled: status === 'loading',
|
|
605
611
|
className: classNames(['me-2', _defineProperty({}, cancelClassName, cancelClassName !== null)])
|
|
@@ -614,7 +620,7 @@ var Form = function Form(_ref) {
|
|
|
614
620
|
className: styles$u.buttons
|
|
615
621
|
}) : /*#__PURE__*/React.createElement(Button$1, {
|
|
616
622
|
type: "submit",
|
|
617
|
-
theme:
|
|
623
|
+
theme: submitButtonTheme || 'primary',
|
|
618
624
|
disabled: status === 'loading' || !canSave
|
|
619
625
|
}, status === 'loading' ? submitButtonLoadingLabel || submitButtonLabel : submitButtonLabel), complete ? /*#__PURE__*/React.createElement("p", {
|
|
620
626
|
className: "text-success mx-2 my-1"
|
|
@@ -1067,7 +1073,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
1067
1073
|
}
|
|
1068
1074
|
} : null;
|
|
1069
1075
|
return ItemComponent !== null ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(ItemComponent, Object.assign({
|
|
1070
|
-
key: "item-".concat(index, "-").concat(label),
|
|
1076
|
+
key: "item-".concat(index, "-").concat(label, "-").concat(type),
|
|
1071
1077
|
className: classNames([(_ref3 = {
|
|
1072
1078
|
'dropdown-item': type === 'link' || type === 'button',
|
|
1073
1079
|
'dropdown-divider': type === 'divider',
|
package/lib/components.js
CHANGED
|
@@ -449,6 +449,8 @@ var propTypes$G = {
|
|
|
449
449
|
postForm: PropTypes__default["default"].func,
|
|
450
450
|
submitButtonLabel: core.PropTypes.label,
|
|
451
451
|
submitButtonLoadingLabel: core.PropTypes.label,
|
|
452
|
+
submitButtonTheme: PropTypes__default["default"].string,
|
|
453
|
+
cancelButtonTheme: PropTypes__default["default"].string,
|
|
452
454
|
buttons: core.PropTypes.buttons,
|
|
453
455
|
children: PropTypes__default["default"].node,
|
|
454
456
|
actionsAlign: PropTypes__default["default"].oneOf(['left', 'right']),
|
|
@@ -480,6 +482,8 @@ var defaultProps$G = {
|
|
|
480
482
|
}]
|
|
481
483
|
}),
|
|
482
484
|
submitButtonLoadingLabel: null,
|
|
485
|
+
submitButtonTheme: null,
|
|
486
|
+
cancelButtonTheme: null,
|
|
483
487
|
buttons: null,
|
|
484
488
|
children: null,
|
|
485
489
|
actionsAlign: 'left',
|
|
@@ -507,6 +511,8 @@ var Form = function Form(_ref) {
|
|
|
507
511
|
postForm = _ref.postForm,
|
|
508
512
|
submitButtonLabel = _ref.submitButtonLabel,
|
|
509
513
|
submitButtonLoadingLabel = _ref.submitButtonLoadingLabel,
|
|
514
|
+
submitButtonTheme = _ref.submitButtonTheme,
|
|
515
|
+
cancelButtonTheme = _ref.cancelButtonTheme,
|
|
510
516
|
buttons = _ref.buttons,
|
|
511
517
|
children = _ref.children,
|
|
512
518
|
actionsAlign = _ref.actionsAlign,
|
|
@@ -640,7 +646,7 @@ var Form = function Form(_ref) {
|
|
|
640
646
|
type: "button",
|
|
641
647
|
onClick: onCancel,
|
|
642
648
|
href: onCancelHref,
|
|
643
|
-
theme:
|
|
649
|
+
theme: cancelButtonTheme || 'secondary',
|
|
644
650
|
outline: true,
|
|
645
651
|
disabled: status === 'loading',
|
|
646
652
|
className: classNames__default["default"](['me-2', _defineProperty__default["default"]({}, cancelClassName, cancelClassName !== null)])
|
|
@@ -655,7 +661,7 @@ var Form = function Form(_ref) {
|
|
|
655
661
|
className: styles$u.buttons
|
|
656
662
|
}) : /*#__PURE__*/React__default["default"].createElement(Button$1, {
|
|
657
663
|
type: "submit",
|
|
658
|
-
theme:
|
|
664
|
+
theme: submitButtonTheme || 'primary',
|
|
659
665
|
disabled: status === 'loading' || !canSave
|
|
660
666
|
}, status === 'loading' ? submitButtonLoadingLabel || submitButtonLabel : submitButtonLabel), complete ? /*#__PURE__*/React__default["default"].createElement("p", {
|
|
661
667
|
className: "text-success mx-2 my-1"
|
|
@@ -1108,7 +1114,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
1108
1114
|
}
|
|
1109
1115
|
} : null;
|
|
1110
1116
|
return ItemComponent !== null ? /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement(ItemComponent, Object.assign({
|
|
1111
|
-
key: "item-".concat(index, "-").concat(label),
|
|
1117
|
+
key: "item-".concat(index, "-").concat(label, "-").concat(type),
|
|
1112
1118
|
className: classNames__default["default"]([(_ref3 = {
|
|
1113
1119
|
'dropdown-item': type === 'link' || type === 'button',
|
|
1114
1120
|
'dropdown-divider': type === 'divider',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/core",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.347",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -133,5 +133,5 @@
|
|
|
133
133
|
"publishConfig": {
|
|
134
134
|
"access": "public"
|
|
135
135
|
},
|
|
136
|
-
"gitHead": "
|
|
136
|
+
"gitHead": "63a7e46763ae34c4143f0aa29a4c9467126e7734"
|
|
137
137
|
}
|