@micromag/core 0.3.11 → 0.3.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/css/styles.css +1 -1
- package/assets/css/vendor.css +1 -1
- package/es/components.js +26 -28
- package/lib/components.js +26 -28
- package/package.json +2 -2
- package/scss/vendor.scss +8 -0
package/es/components.js
CHANGED
|
@@ -54,7 +54,7 @@ var Label = function Label(_ref) {
|
|
|
54
54
|
Label.propTypes = propTypes$K;
|
|
55
55
|
Label.defaultProps = defaultProps$K;
|
|
56
56
|
|
|
57
|
-
var styles$
|
|
57
|
+
var styles$u = {"container":"micromag-core-buttons-button-container","asLink":"micromag-core-buttons-button-asLink","withoutStyle":"micromag-core-buttons-button-withoutStyle","icon":"micromag-core-buttons-button-icon","withIcon":"micromag-core-buttons-button-withIcon","label":"micromag-core-buttons-button-label","right":"micromag-core-buttons-button-right","withIconColumns":"micromag-core-buttons-button-withIconColumns","linkDisabled":"micromag-core-buttons-button-linkDisabled"};
|
|
58
58
|
|
|
59
59
|
var _excluded$a = ["type", "theme", "size", "href", "external", "direct", "target", "label", "children", "focusable", "active", "icon", "iconPosition", "disabled", "loading", "disableOnLoading", "small", "big", "withShadow", "withoutStyle", "withoutTheme", "asLink", "outline", "onClick", "className", "iconClassName", "labelClassName", "refButton"];
|
|
60
60
|
var propTypes$J = {
|
|
@@ -161,25 +161,25 @@ var Button$1 = function Button(_ref) {
|
|
|
161
161
|
var hasInlineIcon = hasIcon && (iconPosition === 'inline' || text === null);
|
|
162
162
|
var hasIconColumns = hasIcon && !hasInlineIcon;
|
|
163
163
|
var content = /*#__PURE__*/React.createElement(React.Fragment, null, hasInlineIcon ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
164
|
-
className: classNames([styles$
|
|
164
|
+
className: classNames([styles$u.icon, _defineProperty({}, iconClassName, iconClassName !== null)])
|
|
165
165
|
}, icon), text !== null ? /*#__PURE__*/React.createElement("span", {
|
|
166
|
-
className: classNames([styles$
|
|
166
|
+
className: classNames([styles$u.label, _defineProperty({}, labelClassName, labelClassName !== null)])
|
|
167
167
|
}, text) : null) : null, hasIconColumns ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
168
|
-
className: classNames([styles$
|
|
168
|
+
className: classNames([styles$u.left, _defineProperty({}, iconClassName, iconClassName !== null && iconPosition === 'left')])
|
|
169
169
|
}, iconPosition === 'left' ? icon : null), /*#__PURE__*/React.createElement("span", {
|
|
170
|
-
className: classNames([styles$
|
|
170
|
+
className: classNames([styles$u.center, _defineProperty({}, labelClassName, labelClassName !== null)])
|
|
171
171
|
}, text), /*#__PURE__*/React.createElement("span", {
|
|
172
|
-
className: classNames([styles$
|
|
172
|
+
className: classNames([styles$u.right, _defineProperty({}, iconClassName, iconClassName !== null && iconPosition === 'right')])
|
|
173
173
|
}, iconPosition === 'right' ? icon : null), hasChildren ? children : null) : null, !hasIcon ? text : null, hasChildren ? children : null);
|
|
174
174
|
var withStyle = !withoutTheme && !withoutStyle && !asLink;
|
|
175
175
|
var buttonClassNames = classNames([(_ref7 = {
|
|
176
176
|
btn: withStyle
|
|
177
|
-
}, _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), styles$
|
|
177
|
+
}, _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), styles$u.container, (_ref8 = {}, _defineProperty(_ref8, styles$u.withoutStyle, withoutStyle), _defineProperty(_ref8, styles$u.withIcon, hasIcon), _defineProperty(_ref8, styles$u.withIconColumns, hasIconColumns), _defineProperty(_ref8, styles$u.withText, text !== null), _defineProperty(_ref8, styles$u.withShadow, withShadow), _defineProperty(_ref8, styles$u.isSmall, small), _defineProperty(_ref8, styles$u.isBig, big), _defineProperty(_ref8, styles$u.isLink, href !== null), _defineProperty(_ref8, styles$u.asLink, asLink), _defineProperty(_ref8, styles$u.isDisabled, disabled), _defineProperty(_ref8, styles$u.isLoading, loading), _defineProperty(_ref8, className, className !== null), _ref8)]);
|
|
178
178
|
|
|
179
179
|
if (href !== null) {
|
|
180
180
|
var linkClassNames = classNames([buttonClassNames, _defineProperty({
|
|
181
181
|
disabled: disabled
|
|
182
|
-
}, styles$
|
|
182
|
+
}, styles$u.linkDisabled, disabled)]);
|
|
183
183
|
return external || direct ? /*#__PURE__*/React.createElement("a", Object.assign({}, props, {
|
|
184
184
|
href: disabled ? null : href,
|
|
185
185
|
className: linkClassNames,
|
|
@@ -209,7 +209,7 @@ var Button$1 = function Button(_ref) {
|
|
|
209
209
|
Button$1.propTypes = propTypes$J;
|
|
210
210
|
Button$1.defaultProps = defaultProps$J;
|
|
211
211
|
|
|
212
|
-
var styles$
|
|
212
|
+
var styles$t = {};
|
|
213
213
|
|
|
214
214
|
var _excluded$9 = ["className", "onClick", "theme"];
|
|
215
215
|
var propTypes$I = {
|
|
@@ -240,7 +240,7 @@ var Buttons = function Buttons(_ref) {
|
|
|
240
240
|
buttonClassName = _ref.buttonClassName,
|
|
241
241
|
className = _ref.className;
|
|
242
242
|
return /*#__PURE__*/React.createElement("div", {
|
|
243
|
-
className: classNames(['btn-group', _defineProperty({}, "btn-group-".concat(size), size !== null), styles$
|
|
243
|
+
className: classNames(['btn-group', _defineProperty({}, "btn-group-".concat(size), size !== null), styles$t.container, _defineProperty({}, className, className !== null)]),
|
|
244
244
|
role: "group"
|
|
245
245
|
}, buttons.map(function (button, index) {
|
|
246
246
|
var _ref4;
|
|
@@ -255,7 +255,7 @@ var Buttons = function Buttons(_ref) {
|
|
|
255
255
|
|
|
256
256
|
var fixedProps = {
|
|
257
257
|
key: "button-".concat(index),
|
|
258
|
-
className: classNames([styles$
|
|
258
|
+
className: classNames([styles$t.button, (_ref4 = {}, _defineProperty(_ref4, buttonClassName, buttonClassName !== null), _defineProperty(_ref4, customClassName, customClassName !== null), _ref4)]),
|
|
259
259
|
onClick: function onClick(e) {
|
|
260
260
|
if (_onClick !== null) {
|
|
261
261
|
_onClick(e, button, index);
|
|
@@ -399,7 +399,7 @@ var FieldForm = function FieldForm(_ref) {
|
|
|
399
399
|
FieldForm.propTypes = propTypes$G;
|
|
400
400
|
FieldForm.defaultProps = defaultProps$G;
|
|
401
401
|
|
|
402
|
-
var styles$
|
|
402
|
+
var styles$s = {"actions":"micromag-core-forms-form-actions","left":"micromag-core-forms-form-left","right":"micromag-core-forms-form-right"};
|
|
403
403
|
|
|
404
404
|
var propTypes$F = {
|
|
405
405
|
action: PropTypes$1.string.isRequired,
|
|
@@ -578,7 +578,7 @@ var Form = function Form(_ref) {
|
|
|
578
578
|
|
|
579
579
|
return /*#__PURE__*/React.createElement("form", {
|
|
580
580
|
action: action,
|
|
581
|
-
className: classNames([styles$
|
|
581
|
+
className: classNames([styles$s.container, _defineProperty({}, className, className !== null)]),
|
|
582
582
|
method: method,
|
|
583
583
|
onSubmit: onSubmit
|
|
584
584
|
}, !withoutBackButton && fields !== null && fields.length > 0 && fieldParams !== null ? /*#__PURE__*/React.createElement("div", {
|
|
@@ -588,7 +588,7 @@ var Form = function Form(_ref) {
|
|
|
588
588
|
outline: true,
|
|
589
589
|
onClick: closeFieldForm
|
|
590
590
|
})) : null, fields && fields.length > 0 && fieldParams !== null ? /*#__PURE__*/React.createElement("div", {
|
|
591
|
-
className: classNames(['w-100', styles$
|
|
591
|
+
className: classNames(['w-100', styles$s.panel]),
|
|
592
592
|
key: "field"
|
|
593
593
|
}, /*#__PURE__*/React.createElement(FieldForm, {
|
|
594
594
|
name: fieldParams.replace(/\//g, '.'),
|
|
@@ -604,11 +604,11 @@ var Form = function Form(_ref) {
|
|
|
604
604
|
onChange: setValue,
|
|
605
605
|
gotoFieldForm: gotoFieldForm,
|
|
606
606
|
closeFieldForm: closeFieldForm,
|
|
607
|
-
className: classNames([styles$
|
|
607
|
+
className: classNames([styles$s.fields, _defineProperty({}, fieldsClassName, fieldsClassName !== null)])
|
|
608
608
|
}) : null, generalError ? /*#__PURE__*/React.createElement("p", {
|
|
609
609
|
className: "text-danger my-1"
|
|
610
610
|
}, generalError) : null, children, !withoutActions && fieldParams === null ? /*#__PURE__*/React.createElement("div", {
|
|
611
|
-
className: classNames([styles$
|
|
611
|
+
className: classNames([styles$s.actions, (_ref4 = {}, _defineProperty(_ref4, styles$s[actionsAlign], actionsAlign), _defineProperty(_ref4, actionsClassName, actionsClassName !== null), _ref4)])
|
|
612
612
|
}, onCancel !== null || onCancelHref !== null ? /*#__PURE__*/React.createElement(Button$1, {
|
|
613
613
|
type: "button",
|
|
614
614
|
onClick: onCancel,
|
|
@@ -625,7 +625,7 @@ var Form = function Form(_ref) {
|
|
|
625
625
|
}]
|
|
626
626
|
})) : null, buttons !== null ? /*#__PURE__*/React.createElement(Buttons, {
|
|
627
627
|
buttons: buttons,
|
|
628
|
-
className: styles$
|
|
628
|
+
className: styles$s.buttons
|
|
629
629
|
}) : /*#__PURE__*/React.createElement(Button$1, {
|
|
630
630
|
type: "submit",
|
|
631
631
|
theme: "primary",
|
|
@@ -644,7 +644,7 @@ var Form = function Form(_ref) {
|
|
|
644
644
|
Form.propTypes = propTypes$F;
|
|
645
645
|
Form.defaultProps = defaultProps$F;
|
|
646
646
|
|
|
647
|
-
var styles$
|
|
647
|
+
var styles$r = {"withoutStyle":"micromag-core-partials-link-withoutStyle"};
|
|
648
648
|
|
|
649
649
|
var _excluded$6 = ["href", "external", "children", "target", "rel", "className", "withoutStyle"];
|
|
650
650
|
var propTypes$E = {
|
|
@@ -677,12 +677,12 @@ var Link = function Link(_ref) {
|
|
|
677
677
|
props = _objectWithoutProperties(_ref, _excluded$6);
|
|
678
678
|
|
|
679
679
|
return external ? /*#__PURE__*/React.createElement("a", Object.assign({
|
|
680
|
-
className: classNames([className, _defineProperty({}, styles$
|
|
680
|
+
className: classNames([className, _defineProperty({}, styles$r.withoutStyle, withoutStyle)]),
|
|
681
681
|
href: href,
|
|
682
682
|
target: target,
|
|
683
683
|
rel: rel
|
|
684
684
|
}, props), /*#__PURE__*/React.createElement(Label, null, children)) : /*#__PURE__*/React.createElement(Link$1, Object.assign({
|
|
685
|
-
className: classNames([className, _defineProperty({}, styles$
|
|
685
|
+
className: classNames([className, _defineProperty({}, styles$r.withoutStyle, withoutStyle)]),
|
|
686
686
|
to: href
|
|
687
687
|
}, props), /*#__PURE__*/React.createElement(Label, null, children));
|
|
688
688
|
};
|
|
@@ -917,7 +917,7 @@ var Spinner = function Spinner(_ref) {
|
|
|
917
917
|
Spinner.propTypes = propTypes$C;
|
|
918
918
|
Spinner.defaultProps = defaultProps$C;
|
|
919
919
|
|
|
920
|
-
var styles$
|
|
920
|
+
var styles$q = {};
|
|
921
921
|
|
|
922
922
|
var _excluded$4 = ["description", "loading", "children", "className"];
|
|
923
923
|
var propTypes$B = {
|
|
@@ -941,14 +941,14 @@ var FormPanel = function FormPanel(_ref) {
|
|
|
941
941
|
props = _objectWithoutProperties(_ref, _excluded$4);
|
|
942
942
|
|
|
943
943
|
return /*#__PURE__*/React.createElement(Card, Object.assign({
|
|
944
|
-
className: classNames([styles$
|
|
944
|
+
className: classNames([styles$q.container, _defineProperty({}, className, className !== null)])
|
|
945
945
|
}, props), description, loading ? /*#__PURE__*/React.createElement(Spinner, null) : children);
|
|
946
946
|
};
|
|
947
947
|
|
|
948
948
|
FormPanel.propTypes = propTypes$B;
|
|
949
949
|
FormPanel.defaultProps = defaultProps$B;
|
|
950
950
|
|
|
951
|
-
var styles$
|
|
951
|
+
var styles$p = {"container":"micromag-core-menus-breadcrumb-container","arrow":"micromag-core-menus-breadcrumb-arrow"};
|
|
952
952
|
|
|
953
953
|
var propTypes$A = {
|
|
954
954
|
items: PropTypes.menuItems,
|
|
@@ -977,7 +977,7 @@ var Breadcrumb = function Breadcrumb(_ref) {
|
|
|
977
977
|
return /*#__PURE__*/React.createElement("nav", {
|
|
978
978
|
className: className
|
|
979
979
|
}, /*#__PURE__*/React.createElement("ol", {
|
|
980
|
-
className: classNames([styles$
|
|
980
|
+
className: classNames([styles$p.container, 'breadcrumb', 'mb-0', {
|
|
981
981
|
'p-0': withoutBar,
|
|
982
982
|
'bg-transparent': withoutBar,
|
|
983
983
|
'rounded-0': withoutBar,
|
|
@@ -995,7 +995,7 @@ var Breadcrumb = function Breadcrumb(_ref) {
|
|
|
995
995
|
return /*#__PURE__*/React.createElement("li", {
|
|
996
996
|
className: classNames(['breadcrumb-item', (_ref3 = {
|
|
997
997
|
active: active
|
|
998
|
-
}, _defineProperty(_ref3, styles$
|
|
998
|
+
}, _defineProperty(_ref3, styles$p.arrow, separator === 'arrow'), _defineProperty(_ref3, "text-".concat(theme), active && theme !== null), _ref3)]),
|
|
999
999
|
key: "item-".concat(index)
|
|
1000
1000
|
}, active ? /*#__PURE__*/React.createElement(Label, null, label) : null, !active && url ? /*#__PURE__*/React.createElement(Link$1, {
|
|
1001
1001
|
to: url,
|
|
@@ -1011,8 +1011,6 @@ var Breadcrumb = function Breadcrumb(_ref) {
|
|
|
1011
1011
|
Breadcrumb.propTypes = propTypes$A;
|
|
1012
1012
|
Breadcrumb.defaultProps = defaultProps$A;
|
|
1013
1013
|
|
|
1014
|
-
var styles$p = {"start":"micromag-core-menus-dropdown-start","end":"micromag-core-menus-dropdown-end"};
|
|
1015
|
-
|
|
1016
1014
|
var _excluded$3 = ["id", "type", "className", "label", "children", "onClick", "active"];
|
|
1017
1015
|
var propTypes$z = {
|
|
1018
1016
|
items: PropTypes.menuItems,
|
|
@@ -1054,7 +1052,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
1054
1052
|
}, [refContainer.current, onClickOutside]);
|
|
1055
1053
|
useDocumentEvent('click', onDocumentClick, visible);
|
|
1056
1054
|
return /*#__PURE__*/React.createElement("div", {
|
|
1057
|
-
className: classNames(['dropdown-menu', (_ref2 = {}, _defineProperty(_ref2,
|
|
1055
|
+
className: classNames(['dropdown-menu', (_ref2 = {}, _defineProperty(_ref2, "dropdown-menu-".concat(align), align !== null), _defineProperty(_ref2, "show", visible), _defineProperty(_ref2, className, className !== null), _ref2)]),
|
|
1058
1056
|
ref: refContainer
|
|
1059
1057
|
}, children !== null ? children : items.map(function (it, index) {
|
|
1060
1058
|
var _ref3;
|
package/lib/components.js
CHANGED
|
@@ -77,7 +77,7 @@ var Label = function Label(_ref) {
|
|
|
77
77
|
Label.propTypes = propTypes$K;
|
|
78
78
|
Label.defaultProps = defaultProps$K;
|
|
79
79
|
|
|
80
|
-
var styles$
|
|
80
|
+
var styles$u = {"container":"micromag-core-buttons-button-container","asLink":"micromag-core-buttons-button-asLink","withoutStyle":"micromag-core-buttons-button-withoutStyle","icon":"micromag-core-buttons-button-icon","withIcon":"micromag-core-buttons-button-withIcon","label":"micromag-core-buttons-button-label","right":"micromag-core-buttons-button-right","withIconColumns":"micromag-core-buttons-button-withIconColumns","linkDisabled":"micromag-core-buttons-button-linkDisabled"};
|
|
81
81
|
|
|
82
82
|
var _excluded$a = ["type", "theme", "size", "href", "external", "direct", "target", "label", "children", "focusable", "active", "icon", "iconPosition", "disabled", "loading", "disableOnLoading", "small", "big", "withShadow", "withoutStyle", "withoutTheme", "asLink", "outline", "onClick", "className", "iconClassName", "labelClassName", "refButton"];
|
|
83
83
|
var propTypes$J = {
|
|
@@ -184,25 +184,25 @@ var Button$1 = function Button(_ref) {
|
|
|
184
184
|
var hasInlineIcon = hasIcon && (iconPosition === 'inline' || text === null);
|
|
185
185
|
var hasIconColumns = hasIcon && !hasInlineIcon;
|
|
186
186
|
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", {
|
|
187
|
-
className: classNames__default["default"]([styles$
|
|
187
|
+
className: classNames__default["default"]([styles$u.icon, _defineProperty__default["default"]({}, iconClassName, iconClassName !== null)])
|
|
188
188
|
}, icon), text !== null ? /*#__PURE__*/React__default["default"].createElement("span", {
|
|
189
|
-
className: classNames__default["default"]([styles$
|
|
189
|
+
className: classNames__default["default"]([styles$u.label, _defineProperty__default["default"]({}, labelClassName, labelClassName !== null)])
|
|
190
190
|
}, text) : null) : null, hasIconColumns ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
191
|
-
className: classNames__default["default"]([styles$
|
|
191
|
+
className: classNames__default["default"]([styles$u.left, _defineProperty__default["default"]({}, iconClassName, iconClassName !== null && iconPosition === 'left')])
|
|
192
192
|
}, iconPosition === 'left' ? icon : null), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
193
|
-
className: classNames__default["default"]([styles$
|
|
193
|
+
className: classNames__default["default"]([styles$u.center, _defineProperty__default["default"]({}, labelClassName, labelClassName !== null)])
|
|
194
194
|
}, text), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
195
|
-
className: classNames__default["default"]([styles$
|
|
195
|
+
className: classNames__default["default"]([styles$u.right, _defineProperty__default["default"]({}, iconClassName, iconClassName !== null && iconPosition === 'right')])
|
|
196
196
|
}, iconPosition === 'right' ? icon : null), hasChildren ? children : null) : null, !hasIcon ? text : null, hasChildren ? children : null);
|
|
197
197
|
var withStyle = !withoutTheme && !withoutStyle && !asLink;
|
|
198
198
|
var buttonClassNames = classNames__default["default"]([(_ref7 = {
|
|
199
199
|
btn: withStyle
|
|
200
|
-
}, _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), styles$
|
|
200
|
+
}, _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), styles$u.container, (_ref8 = {}, _defineProperty__default["default"](_ref8, styles$u.withoutStyle, withoutStyle), _defineProperty__default["default"](_ref8, styles$u.withIcon, hasIcon), _defineProperty__default["default"](_ref8, styles$u.withIconColumns, hasIconColumns), _defineProperty__default["default"](_ref8, styles$u.withText, text !== null), _defineProperty__default["default"](_ref8, styles$u.withShadow, withShadow), _defineProperty__default["default"](_ref8, styles$u.isSmall, small), _defineProperty__default["default"](_ref8, styles$u.isBig, big), _defineProperty__default["default"](_ref8, styles$u.isLink, href !== null), _defineProperty__default["default"](_ref8, styles$u.asLink, asLink), _defineProperty__default["default"](_ref8, styles$u.isDisabled, disabled), _defineProperty__default["default"](_ref8, styles$u.isLoading, loading), _defineProperty__default["default"](_ref8, className, className !== null), _ref8)]);
|
|
201
201
|
|
|
202
202
|
if (href !== null) {
|
|
203
203
|
var linkClassNames = classNames__default["default"]([buttonClassNames, _defineProperty__default["default"]({
|
|
204
204
|
disabled: disabled
|
|
205
|
-
}, styles$
|
|
205
|
+
}, styles$u.linkDisabled, disabled)]);
|
|
206
206
|
return external || direct ? /*#__PURE__*/React__default["default"].createElement("a", Object.assign({}, props, {
|
|
207
207
|
href: disabled ? null : href,
|
|
208
208
|
className: linkClassNames,
|
|
@@ -232,7 +232,7 @@ var Button$1 = function Button(_ref) {
|
|
|
232
232
|
Button$1.propTypes = propTypes$J;
|
|
233
233
|
Button$1.defaultProps = defaultProps$J;
|
|
234
234
|
|
|
235
|
-
var styles$
|
|
235
|
+
var styles$t = {};
|
|
236
236
|
|
|
237
237
|
var _excluded$9 = ["className", "onClick", "theme"];
|
|
238
238
|
var propTypes$I = {
|
|
@@ -263,7 +263,7 @@ var Buttons = function Buttons(_ref) {
|
|
|
263
263
|
buttonClassName = _ref.buttonClassName,
|
|
264
264
|
className = _ref.className;
|
|
265
265
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
266
|
-
className: classNames__default["default"](['btn-group', _defineProperty__default["default"]({}, "btn-group-".concat(size), size !== null), styles$
|
|
266
|
+
className: classNames__default["default"](['btn-group', _defineProperty__default["default"]({}, "btn-group-".concat(size), size !== null), styles$t.container, _defineProperty__default["default"]({}, className, className !== null)]),
|
|
267
267
|
role: "group"
|
|
268
268
|
}, buttons.map(function (button, index) {
|
|
269
269
|
var _ref4;
|
|
@@ -278,7 +278,7 @@ var Buttons = function Buttons(_ref) {
|
|
|
278
278
|
|
|
279
279
|
var fixedProps = {
|
|
280
280
|
key: "button-".concat(index),
|
|
281
|
-
className: classNames__default["default"]([styles$
|
|
281
|
+
className: classNames__default["default"]([styles$t.button, (_ref4 = {}, _defineProperty__default["default"](_ref4, buttonClassName, buttonClassName !== null), _defineProperty__default["default"](_ref4, customClassName, customClassName !== null), _ref4)]),
|
|
282
282
|
onClick: function onClick(e) {
|
|
283
283
|
if (_onClick !== null) {
|
|
284
284
|
_onClick(e, button, index);
|
|
@@ -422,7 +422,7 @@ var FieldForm = function FieldForm(_ref) {
|
|
|
422
422
|
FieldForm.propTypes = propTypes$G;
|
|
423
423
|
FieldForm.defaultProps = defaultProps$G;
|
|
424
424
|
|
|
425
|
-
var styles$
|
|
425
|
+
var styles$s = {"actions":"micromag-core-forms-form-actions","left":"micromag-core-forms-form-left","right":"micromag-core-forms-form-right"};
|
|
426
426
|
|
|
427
427
|
var propTypes$F = {
|
|
428
428
|
action: PropTypes__default["default"].string.isRequired,
|
|
@@ -601,7 +601,7 @@ var Form = function Form(_ref) {
|
|
|
601
601
|
|
|
602
602
|
return /*#__PURE__*/React__default["default"].createElement("form", {
|
|
603
603
|
action: action,
|
|
604
|
-
className: classNames__default["default"]([styles$
|
|
604
|
+
className: classNames__default["default"]([styles$s.container, _defineProperty__default["default"]({}, className, className !== null)]),
|
|
605
605
|
method: method,
|
|
606
606
|
onSubmit: onSubmit
|
|
607
607
|
}, !withoutBackButton && fields !== null && fields.length > 0 && fieldParams !== null ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -611,7 +611,7 @@ var Form = function Form(_ref) {
|
|
|
611
611
|
outline: true,
|
|
612
612
|
onClick: closeFieldForm
|
|
613
613
|
})) : null, fields && fields.length > 0 && fieldParams !== null ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
614
|
-
className: classNames__default["default"](['w-100', styles$
|
|
614
|
+
className: classNames__default["default"](['w-100', styles$s.panel]),
|
|
615
615
|
key: "field"
|
|
616
616
|
}, /*#__PURE__*/React__default["default"].createElement(FieldForm, {
|
|
617
617
|
name: fieldParams.replace(/\//g, '.'),
|
|
@@ -627,11 +627,11 @@ var Form = function Form(_ref) {
|
|
|
627
627
|
onChange: setValue,
|
|
628
628
|
gotoFieldForm: gotoFieldForm,
|
|
629
629
|
closeFieldForm: closeFieldForm,
|
|
630
|
-
className: classNames__default["default"]([styles$
|
|
630
|
+
className: classNames__default["default"]([styles$s.fields, _defineProperty__default["default"]({}, fieldsClassName, fieldsClassName !== null)])
|
|
631
631
|
}) : null, generalError ? /*#__PURE__*/React__default["default"].createElement("p", {
|
|
632
632
|
className: "text-danger my-1"
|
|
633
633
|
}, generalError) : null, children, !withoutActions && fieldParams === null ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
634
|
-
className: classNames__default["default"]([styles$
|
|
634
|
+
className: classNames__default["default"]([styles$s.actions, (_ref4 = {}, _defineProperty__default["default"](_ref4, styles$s[actionsAlign], actionsAlign), _defineProperty__default["default"](_ref4, actionsClassName, actionsClassName !== null), _ref4)])
|
|
635
635
|
}, onCancel !== null || onCancelHref !== null ? /*#__PURE__*/React__default["default"].createElement(Button$1, {
|
|
636
636
|
type: "button",
|
|
637
637
|
onClick: onCancel,
|
|
@@ -648,7 +648,7 @@ var Form = function Form(_ref) {
|
|
|
648
648
|
}]
|
|
649
649
|
})) : null, buttons !== null ? /*#__PURE__*/React__default["default"].createElement(Buttons, {
|
|
650
650
|
buttons: buttons,
|
|
651
|
-
className: styles$
|
|
651
|
+
className: styles$s.buttons
|
|
652
652
|
}) : /*#__PURE__*/React__default["default"].createElement(Button$1, {
|
|
653
653
|
type: "submit",
|
|
654
654
|
theme: "primary",
|
|
@@ -667,7 +667,7 @@ var Form = function Form(_ref) {
|
|
|
667
667
|
Form.propTypes = propTypes$F;
|
|
668
668
|
Form.defaultProps = defaultProps$F;
|
|
669
669
|
|
|
670
|
-
var styles$
|
|
670
|
+
var styles$r = {"withoutStyle":"micromag-core-partials-link-withoutStyle"};
|
|
671
671
|
|
|
672
672
|
var _excluded$6 = ["href", "external", "children", "target", "rel", "className", "withoutStyle"];
|
|
673
673
|
var propTypes$E = {
|
|
@@ -700,12 +700,12 @@ var Link = function Link(_ref) {
|
|
|
700
700
|
props = _objectWithoutProperties__default["default"](_ref, _excluded$6);
|
|
701
701
|
|
|
702
702
|
return external ? /*#__PURE__*/React__default["default"].createElement("a", Object.assign({
|
|
703
|
-
className: classNames__default["default"]([className, _defineProperty__default["default"]({}, styles$
|
|
703
|
+
className: classNames__default["default"]([className, _defineProperty__default["default"]({}, styles$r.withoutStyle, withoutStyle)]),
|
|
704
704
|
href: href,
|
|
705
705
|
target: target,
|
|
706
706
|
rel: rel
|
|
707
707
|
}, props), /*#__PURE__*/React__default["default"].createElement(Label, null, children)) : /*#__PURE__*/React__default["default"].createElement(reactRouterDom.Link, Object.assign({
|
|
708
|
-
className: classNames__default["default"]([className, _defineProperty__default["default"]({}, styles$
|
|
708
|
+
className: classNames__default["default"]([className, _defineProperty__default["default"]({}, styles$r.withoutStyle, withoutStyle)]),
|
|
709
709
|
to: href
|
|
710
710
|
}, props), /*#__PURE__*/React__default["default"].createElement(Label, null, children));
|
|
711
711
|
};
|
|
@@ -940,7 +940,7 @@ var Spinner = function Spinner(_ref) {
|
|
|
940
940
|
Spinner.propTypes = propTypes$C;
|
|
941
941
|
Spinner.defaultProps = defaultProps$C;
|
|
942
942
|
|
|
943
|
-
var styles$
|
|
943
|
+
var styles$q = {};
|
|
944
944
|
|
|
945
945
|
var _excluded$4 = ["description", "loading", "children", "className"];
|
|
946
946
|
var propTypes$B = {
|
|
@@ -964,14 +964,14 @@ var FormPanel = function FormPanel(_ref) {
|
|
|
964
964
|
props = _objectWithoutProperties__default["default"](_ref, _excluded$4);
|
|
965
965
|
|
|
966
966
|
return /*#__PURE__*/React__default["default"].createElement(Card, Object.assign({
|
|
967
|
-
className: classNames__default["default"]([styles$
|
|
967
|
+
className: classNames__default["default"]([styles$q.container, _defineProperty__default["default"]({}, className, className !== null)])
|
|
968
968
|
}, props), description, loading ? /*#__PURE__*/React__default["default"].createElement(Spinner, null) : children);
|
|
969
969
|
};
|
|
970
970
|
|
|
971
971
|
FormPanel.propTypes = propTypes$B;
|
|
972
972
|
FormPanel.defaultProps = defaultProps$B;
|
|
973
973
|
|
|
974
|
-
var styles$
|
|
974
|
+
var styles$p = {"container":"micromag-core-menus-breadcrumb-container","arrow":"micromag-core-menus-breadcrumb-arrow"};
|
|
975
975
|
|
|
976
976
|
var propTypes$A = {
|
|
977
977
|
items: core.PropTypes.menuItems,
|
|
@@ -1000,7 +1000,7 @@ var Breadcrumb = function Breadcrumb(_ref) {
|
|
|
1000
1000
|
return /*#__PURE__*/React__default["default"].createElement("nav", {
|
|
1001
1001
|
className: className
|
|
1002
1002
|
}, /*#__PURE__*/React__default["default"].createElement("ol", {
|
|
1003
|
-
className: classNames__default["default"]([styles$
|
|
1003
|
+
className: classNames__default["default"]([styles$p.container, 'breadcrumb', 'mb-0', {
|
|
1004
1004
|
'p-0': withoutBar,
|
|
1005
1005
|
'bg-transparent': withoutBar,
|
|
1006
1006
|
'rounded-0': withoutBar,
|
|
@@ -1018,7 +1018,7 @@ var Breadcrumb = function Breadcrumb(_ref) {
|
|
|
1018
1018
|
return /*#__PURE__*/React__default["default"].createElement("li", {
|
|
1019
1019
|
className: classNames__default["default"](['breadcrumb-item', (_ref3 = {
|
|
1020
1020
|
active: active
|
|
1021
|
-
}, _defineProperty__default["default"](_ref3, styles$
|
|
1021
|
+
}, _defineProperty__default["default"](_ref3, styles$p.arrow, separator === 'arrow'), _defineProperty__default["default"](_ref3, "text-".concat(theme), active && theme !== null), _ref3)]),
|
|
1022
1022
|
key: "item-".concat(index)
|
|
1023
1023
|
}, active ? /*#__PURE__*/React__default["default"].createElement(Label, null, label) : null, !active && url ? /*#__PURE__*/React__default["default"].createElement(reactRouterDom.Link, {
|
|
1024
1024
|
to: url,
|
|
@@ -1034,8 +1034,6 @@ var Breadcrumb = function Breadcrumb(_ref) {
|
|
|
1034
1034
|
Breadcrumb.propTypes = propTypes$A;
|
|
1035
1035
|
Breadcrumb.defaultProps = defaultProps$A;
|
|
1036
1036
|
|
|
1037
|
-
var styles$p = {"start":"micromag-core-menus-dropdown-start","end":"micromag-core-menus-dropdown-end"};
|
|
1038
|
-
|
|
1039
1037
|
var _excluded$3 = ["id", "type", "className", "label", "children", "onClick", "active"];
|
|
1040
1038
|
var propTypes$z = {
|
|
1041
1039
|
items: core.PropTypes.menuItems,
|
|
@@ -1077,7 +1075,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
1077
1075
|
}, [refContainer.current, onClickOutside]);
|
|
1078
1076
|
hooks.useDocumentEvent('click', onDocumentClick, visible);
|
|
1079
1077
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1080
|
-
className: classNames__default["default"](['dropdown-menu', (_ref2 = {}, _defineProperty__default["default"](_ref2,
|
|
1078
|
+
className: classNames__default["default"](['dropdown-menu', (_ref2 = {}, _defineProperty__default["default"](_ref2, "dropdown-menu-".concat(align), align !== null), _defineProperty__default["default"](_ref2, "show", visible), _defineProperty__default["default"](_ref2, className, className !== null), _ref2)]),
|
|
1081
1079
|
ref: refContainer
|
|
1082
1080
|
}, children !== null ? children : items.map(function (it, index) {
|
|
1083
1081
|
var _ref3;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/core",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.14",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -132,5 +132,5 @@
|
|
|
132
132
|
"publishConfig": {
|
|
133
133
|
"access": "public"
|
|
134
134
|
},
|
|
135
|
-
"gitHead": "
|
|
135
|
+
"gitHead": "1e4c6648b86abe2f1e81f597450489cdb2258eb0"
|
|
136
136
|
}
|