@mw-kit/mw-ui 1.7.31 → 1.7.33
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/dist/index.js +52 -44
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +52 -44
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -15954,56 +15954,63 @@ var parse = function parse(value) {
|
|
|
15954
15954
|
});
|
|
15955
15955
|
};
|
|
15956
15956
|
|
|
15957
|
-
var _templateObject$s, _templateObject2$n, _templateObject3$j, _templateObject4$f, _templateObject5$d, _templateObject6$c, _templateObject7$c, _templateObject8$9, _templateObject9$9, _templateObject10$7, _templateObject11$5;
|
|
15957
|
+
var _templateObject$s, _templateObject2$n, _templateObject3$j, _templateObject4$f, _templateObject5$d, _templateObject6$c, _templateObject7$c, _templateObject8$9, _templateObject9$9, _templateObject10$7, _templateObject11$5, _templateObject12$4;
|
|
15958
15958
|
var RelativeContainer$5 = styled__default.div(_templateObject$s || (_templateObject$s = _taggedTemplateLiteralLoose(["\n position: relative;\n user-select: none;\n min-width: 220px;\n\n > input,\n > label > input {\n color: transparent;\n background-color: transparent;\n width: 1px;\n height: 1px;\n position: absolute;\n left: 0;\n bottom: 0;\n border: 0;\n padding: 0;\n overflow: hidden;\n outline: none;\n box-shadow: none;\n }\n"])));
|
|
15959
|
-
var LabelContainer$5 = styled__default.div(_templateObject2$n || (_templateObject2$n = _taggedTemplateLiteralLoose(["\n ", "\n line-height: 17px;\n flex: 1;\n text-align: center;\n\n ", ";\n"])), function (_ref) {
|
|
15959
|
+
var LabelContainer$5 = styled__default.div(_templateObject2$n || (_templateObject2$n = _taggedTemplateLiteralLoose(["\n ", "\n line-height: 17px;\n flex: 1;\n\n :first-child {\n text-align: left;\n }\n :not(:first-child) {\n text-align: center;\n }\n\n ", "\n\n ", ";\n"])), function (_ref) {
|
|
15960
15960
|
var theme = _ref.theme;
|
|
15961
15961
|
return theme.useTypography('p');
|
|
15962
15962
|
}, function (_ref2) {
|
|
15963
|
-
var
|
|
15963
|
+
var children = _ref2.children;
|
|
15964
|
+
if (children) return;
|
|
15965
|
+
return styled.css(_templateObject3$j || (_templateObject3$j = _taggedTemplateLiteralLoose(["\n :after {\n content: '--/--/-- (--:--) \xE0 --/--/-- (--:--)';\n color: ", ";\n }\n "])), function (_ref3) {
|
|
15966
|
+
var theme = _ref3.theme;
|
|
15967
|
+
return theme.colors.darkGrey;
|
|
15968
|
+
});
|
|
15969
|
+
}, function (_ref4) {
|
|
15970
|
+
var onClick = _ref4.onClick;
|
|
15964
15971
|
if (!onClick) return;
|
|
15965
|
-
return styled.css(
|
|
15972
|
+
return styled.css(_templateObject4$f || (_templateObject4$f = _taggedTemplateLiteralLoose(["\n :not(:disabled) {\n cursor: pointer;\n }\n "])));
|
|
15966
15973
|
});
|
|
15967
|
-
var Container$6 = styled__default.div(
|
|
15968
|
-
var theme =
|
|
15974
|
+
var Container$6 = styled__default.div(_templateObject5$d || (_templateObject5$d = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n border-radius: 4px;\n white-space: nowrap;\n gap: ", ";\n border-width: 1px;\n border-style: solid;\n border-color: ", ";\n\n width: 100%;\n\n ", ";\n\n ", "\n\n ", "\n"])), function (_ref5) {
|
|
15975
|
+
var theme = _ref5.theme;
|
|
15969
15976
|
return theme.spacings.s1;
|
|
15970
|
-
}, function (
|
|
15971
|
-
var theme =
|
|
15972
|
-
invalid =
|
|
15973
|
-
borderless =
|
|
15977
|
+
}, function (_ref6) {
|
|
15978
|
+
var theme = _ref6.theme,
|
|
15979
|
+
invalid = _ref6.invalid,
|
|
15980
|
+
borderless = _ref6.borderless;
|
|
15974
15981
|
if (borderless) return 'transparent';
|
|
15975
15982
|
return invalid ? theme.colors.warningRed : theme.colors.lightGrey;
|
|
15976
|
-
}, function (_ref5) {
|
|
15977
|
-
var theme = _ref5.theme,
|
|
15978
|
-
invalid = _ref5.invalid;
|
|
15979
|
-
|
|
15980
|
-
var _ref6 = invalid ? [theme.getColor('warningRed', 5), theme.colors.warningRed] : [theme.colors.white, theme.colors.darkBlue],
|
|
15981
|
-
bgColor = _ref6[0],
|
|
15982
|
-
color = _ref6[1];
|
|
15983
|
-
|
|
15984
|
-
return styled.css(_templateObject5$d || (_templateObject5$d = _taggedTemplateLiteralLoose(["\n color: ", ";\n background-color: ", ";\n /** google chrome blue background */\n -webkit-box-shadow: 0 0 0px 1000px ", " inset !important;\n "])), color, bgColor, bgColor);
|
|
15985
15983
|
}, function (_ref7) {
|
|
15986
15984
|
var theme = _ref7.theme,
|
|
15987
|
-
|
|
15985
|
+
invalid = _ref7.invalid;
|
|
15986
|
+
|
|
15987
|
+
var _ref8 = invalid ? [theme.getColor('warningRed', 5), theme.colors.warningRed] : [theme.colors.white, theme.colors.darkBlue],
|
|
15988
|
+
bgColor = _ref8[0],
|
|
15989
|
+
color = _ref8[1];
|
|
15990
|
+
|
|
15991
|
+
return styled.css(_templateObject6$c || (_templateObject6$c = _taggedTemplateLiteralLoose(["\n color: ", ";\n background-color: ", ";\n /** google chrome blue background */\n -webkit-box-shadow: 0 0 0px 1000px ", " inset !important;\n "])), color, bgColor, bgColor);
|
|
15992
|
+
}, function (_ref9) {
|
|
15993
|
+
var theme = _ref9.theme,
|
|
15994
|
+
paddingless = _ref9.paddingless;
|
|
15988
15995
|
if (paddingless) return;
|
|
15989
|
-
return styled.css(
|
|
15990
|
-
}, function (
|
|
15991
|
-
var disabled =
|
|
15996
|
+
return styled.css(_templateObject7$c || (_templateObject7$c = _taggedTemplateLiteralLoose(["\n padding: ", " ", " ", "\n ", ";\n "])), theme.spacings.s2, theme.spacings.s1, theme.spacings.s2, theme.spacings.s3);
|
|
15997
|
+
}, function (_ref10) {
|
|
15998
|
+
var disabled = _ref10.disabled;
|
|
15992
15999
|
if (!disabled) return;
|
|
15993
|
-
return styled.css(
|
|
16000
|
+
return styled.css(_templateObject8$9 || (_templateObject8$9 = _taggedTemplateLiteralLoose(["\n opacity: 0.5;\n "])));
|
|
15994
16001
|
});
|
|
15995
|
-
var Button$4 = styled__default.button(
|
|
15996
|
-
var onClick =
|
|
16002
|
+
var Button$4 = styled__default.button(_templateObject9$9 || (_templateObject9$9 = _taggedTemplateLiteralLoose(["\n display: flex;\n background-color: transparent;\n border: none;\n padding: 0;\n box-shadow: none;\n\n ", ";\n"])), function (_ref11) {
|
|
16003
|
+
var onClick = _ref11.onClick;
|
|
15997
16004
|
if (!onClick) return;
|
|
15998
|
-
return styled.css(
|
|
16005
|
+
return styled.css(_templateObject10$7 || (_templateObject10$7 = _taggedTemplateLiteralLoose(["\n :not(:disabled) {\n cursor: pointer;\n }\n "])));
|
|
15999
16006
|
});
|
|
16000
|
-
var LabelText$1 = styled__default.label(
|
|
16001
|
-
var theme =
|
|
16007
|
+
var LabelText$1 = styled__default.label(_templateObject11$5 || (_templateObject11$5 = _taggedTemplateLiteralLoose(["\n display: inline-block;\n margin-bottom: ", ";\n\n ", "\n"])), function (_ref12) {
|
|
16008
|
+
var theme = _ref12.theme;
|
|
16002
16009
|
return theme.spacings.s1;
|
|
16003
|
-
}, function (
|
|
16004
|
-
var required =
|
|
16010
|
+
}, function (_ref13) {
|
|
16011
|
+
var required = _ref13.required;
|
|
16005
16012
|
if (!required) return;
|
|
16006
|
-
return styled.css(
|
|
16013
|
+
return styled.css(_templateObject12$4 || (_templateObject12$4 = _taggedTemplateLiteralLoose(["\n :after {\n content: ' *';\n }\n "])));
|
|
16007
16014
|
});
|
|
16008
16015
|
|
|
16009
16016
|
var Component$1 = React__default.forwardRef(function (props, ref) {
|
|
@@ -16119,9 +16126,9 @@ var Component$1 = React__default.forwardRef(function (props, ref) {
|
|
|
16119
16126
|
}, function () {
|
|
16120
16127
|
var label = React__default.createElement(LabelContainer$5, {
|
|
16121
16128
|
onClick: onClick
|
|
16122
|
-
}, value.some(function (v) {
|
|
16129
|
+
}, !value.some(function (v) {
|
|
16123
16130
|
return !isDateInstance(v);
|
|
16124
|
-
})
|
|
16131
|
+
}) && config.label(value));
|
|
16125
16132
|
if (intervalType === 'custom') return label;
|
|
16126
16133
|
var incrementProps = getArrowProps('increment');
|
|
16127
16134
|
var decrementProps = getArrowProps('decrement');
|
|
@@ -16143,15 +16150,16 @@ var Component$1 = React__default.forwardRef(function (props, ref) {
|
|
|
16143
16150
|
icon: 'chevron_right',
|
|
16144
16151
|
color: props.invalid ? 'warningRed' : 'grey',
|
|
16145
16152
|
strokeWidth: '3px'
|
|
16146
|
-
})), React__default.createElement(Button$4, {
|
|
16147
|
-
onClick: onClick
|
|
16148
|
-
}, React__default.createElement(Icon, {
|
|
16149
|
-
type: 'feather',
|
|
16150
|
-
icon: 'calendar',
|
|
16151
|
-
color: props.invalid ? 'warningRed' : 'grey',
|
|
16152
|
-
width: '24px'
|
|
16153
16153
|
})));
|
|
16154
|
-
}()
|
|
16154
|
+
}(), React__default.createElement(Button$4, {
|
|
16155
|
+
type: 'button',
|
|
16156
|
+
onClick: onClick
|
|
16157
|
+
}, React__default.createElement(Icon, {
|
|
16158
|
+
type: 'feather',
|
|
16159
|
+
icon: 'calendar',
|
|
16160
|
+
color: props.invalid ? 'warningRed' : 'grey',
|
|
16161
|
+
width: '24px'
|
|
16162
|
+
}))), React__default.createElement(Menu, {
|
|
16155
16163
|
open: open === 'menu',
|
|
16156
16164
|
close: function close() {
|
|
16157
16165
|
return setOpen(null);
|
|
@@ -17467,7 +17475,7 @@ var useContext$2 = function useContext() {
|
|
|
17467
17475
|
return React__default.useContext(Provider$2);
|
|
17468
17476
|
};
|
|
17469
17477
|
|
|
17470
|
-
var _templateObject$D, _templateObject2$t, _templateObject3$o, _templateObject4$i, _templateObject5$f, _templateObject6$e, _templateObject7$e, _templateObject8$b, _templateObject9$b, _templateObject10$9, _templateObject11$6, _templateObject12$
|
|
17478
|
+
var _templateObject$D, _templateObject2$t, _templateObject3$o, _templateObject4$i, _templateObject5$f, _templateObject6$e, _templateObject7$e, _templateObject8$b, _templateObject9$b, _templateObject10$9, _templateObject11$6, _templateObject12$5, _templateObject13$3, _templateObject14$3, _templateObject15$2;
|
|
17471
17479
|
var aligns = {
|
|
17472
17480
|
self: {
|
|
17473
17481
|
horizontal: {
|
|
@@ -17564,7 +17572,7 @@ var Col = styled__default.div(_templateObject$D || (_templateObject$D = _taggedT
|
|
|
17564
17572
|
theme = _ref6.theme;
|
|
17565
17573
|
if (fontColor === undefined) return;
|
|
17566
17574
|
var c = Array.isArray(fontColor) ? theme.getColor.apply(theme, fontColor) : theme.colors[fontColor];
|
|
17567
|
-
return styled.css(_templateObject12$
|
|
17575
|
+
return styled.css(_templateObject12$5 || (_templateObject12$5 = _taggedTemplateLiteralLoose(["\n color: ", ";\n "])), c);
|
|
17568
17576
|
}, function (_ref7) {
|
|
17569
17577
|
var backgroundColor = _ref7.backgroundColor,
|
|
17570
17578
|
theme = _ref7.theme;
|