@mw-kit/mw-ui 1.6.8 → 1.6.11

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.
@@ -12597,7 +12597,7 @@ var getMask = function getMask(mask) {
12597
12597
  };
12598
12598
  };
12599
12599
 
12600
- var _templateObject$c, _templateObject2$a, _templateObject3$a, _templateObject4$9, _templateObject5$8, _templateObject6$6, _templateObject7$4, _templateObject8$3, _templateObject9$3, _templateObject10$2, _templateObject11$1, _templateObject12$1, _templateObject13$1;
12600
+ var _templateObject$c, _templateObject2$a, _templateObject3$a, _templateObject4$9, _templateObject5$8, _templateObject6$6, _templateObject7$4, _templateObject8$3, _templateObject9$3, _templateObject10$2, _templateObject11$1, _templateObject12$1, _templateObject13$1, _templateObject14$1;
12601
12601
  var IconContainer = styled.button(_templateObject$c || (_templateObject$c = _taggedTemplateLiteralLoose(["\n position: absolute;\n display: flex;\n justify-content: center;\n align-items: center;\n height: 17px;\n\n background-color: transparent;\n border: none;\n box-shadow: none;\n padding: 0;\n\n ", "\n"])), function (_ref) {
12602
12602
  var onClick = _ref.onClick,
12603
12603
  disabled = _ref.disabled;
@@ -12655,7 +12655,7 @@ var Input = styled.input(_templateObject3$a || (_templateObject3$a = _taggedTemp
12655
12655
  if (!readOnly) return;
12656
12656
  return css(_templateObject8$3 || (_templateObject8$3 = _taggedTemplateLiteralLoose(["\n cursor: ", ";\n "])), !onClick || disabled ? 'unset' : 'pointer');
12657
12657
  });
12658
- var Label = styled.label(_templateObject9$3 || (_templateObject9$3 = _taggedTemplateLiteralLoose(["\n ", ";\n\n color: ", ";\n\n width: ", ";\n box-sizing: border-box;\n position: relative;\n display: block;\n\n ", "\n\n > div:first-child {\n display: inline-block;\n margin-bottom: ", ";\n\n ", "\n }\n\n > ", " {\n bottom: ", ";\n }\n\n ", "\n"])), function (_ref13) {
12658
+ var Label = styled.label(_templateObject9$3 || (_templateObject9$3 = _taggedTemplateLiteralLoose(["\n ", ";\n\n color: ", ";\n\n width: ", ";\n box-sizing: border-box;\n position: relative;\n display: block;\n\n ", "\n\n > ", " {\n bottom: ", ";\n }\n\n ", "\n"])), function (_ref13) {
12659
12659
  var theme = _ref13.theme;
12660
12660
  return theme.useTypography('p');
12661
12661
  }, function (_ref14) {
@@ -12668,31 +12668,32 @@ var Label = styled.label(_templateObject9$3 || (_templateObject9$3 = _taggedTemp
12668
12668
  var disabled = _ref16.disabled;
12669
12669
  if (!disabled) return;
12670
12670
  return css(_templateObject10$2 || (_templateObject10$2 = _taggedTemplateLiteralLoose(["\n opacity: 0.5;\n "])));
12671
- }, function (_ref17) {
12672
- var theme = _ref17.theme;
12673
- return theme.spacings.s1;
12674
- }, function (_ref18) {
12675
- var required = _ref18.required;
12676
- if (!required) return;
12677
- return css(_templateObject11$1 || (_templateObject11$1 = _taggedTemplateLiteralLoose(["\n :after {\n content: ' *';\n }\n "])));
12678
- }, IconContainer, function (_ref19) {
12679
- var theme = _ref19.theme,
12680
- paddingless = _ref19.paddingless;
12671
+ }, IconContainer, function (_ref17) {
12672
+ var theme = _ref17.theme,
12673
+ paddingless = _ref17.paddingless;
12681
12674
  return paddingless ? '2px' : "calc(" + theme.spacings.s2 + " + 1px)";
12682
- }, function (_ref20) {
12683
- var theme = _ref20.theme,
12684
- icon = _ref20.icon,
12685
- paddingless = _ref20.paddingless;
12675
+ }, function (_ref18) {
12676
+ var theme = _ref18.theme,
12677
+ icon = _ref18.icon,
12678
+ paddingless = _ref18.paddingless;
12686
12679
  if (!icon) return;
12687
12680
  var width = icon.width,
12688
12681
  position = icon.position;
12689
12682
  var padding = paddingless ? '0px' : theme.spacings.s3;
12690
12683
 
12691
12684
  if (position === 'right') {
12692
- return css(_templateObject12$1 || (_templateObject12$1 = _taggedTemplateLiteralLoose(["\n > ", " {\n width: ", ";\n right: calc(", " / 2);\n }\n\n > ", " {\n padding-right: calc(", " + ", ");\n }\n "])), IconContainer, width, padding, Input, padding, width);
12685
+ return css(_templateObject11$1 || (_templateObject11$1 = _taggedTemplateLiteralLoose(["\n > ", " {\n width: ", ";\n right: calc(", " / 2);\n }\n\n > ", " {\n padding-right: calc(", " + ", ");\n }\n "])), IconContainer, width, padding, Input, padding, width);
12693
12686
  }
12694
12687
 
12695
- return css(_templateObject13$1 || (_templateObject13$1 = _taggedTemplateLiteralLoose(["\n > ", " {\n width: ", ";\n left: calc(", " / 2);\n }\n\n > ", " {\n padding-left: calc(", " + ", ");\n }\n "])), IconContainer, width, padding, Input, padding, width);
12688
+ return css(_templateObject12$1 || (_templateObject12$1 = _taggedTemplateLiteralLoose(["\n > ", " {\n width: ", ";\n left: calc(", " / 2);\n }\n\n > ", " {\n padding-left: calc(", " + ", ");\n }\n "])), IconContainer, width, padding, Input, padding, width);
12689
+ });
12690
+ var LabelText = styled.div(_templateObject13$1 || (_templateObject13$1 = _taggedTemplateLiteralLoose(["\n display: inline-block;\n margin-bottom: ", ";\n\n ", "\n"])), function (_ref19) {
12691
+ var theme = _ref19.theme;
12692
+ return theme.spacings.s1;
12693
+ }, function (_ref20) {
12694
+ var required = _ref20.required;
12695
+ if (!required) return;
12696
+ return css(_templateObject14$1 || (_templateObject14$1 = _taggedTemplateLiteralLoose(["\n :after {\n content: ' *';\n }\n "])));
12696
12697
  });
12697
12698
 
12698
12699
  var Input$1 = React__default.forwardRef(function (props, ref) {
@@ -12832,13 +12833,14 @@ var Input$1 = React__default.forwardRef(function (props, ref) {
12832
12833
  } : undefined;
12833
12834
  if (htmlDisabled) inputProps.disabled = true;
12834
12835
  return React__default.createElement(Label, {
12835
- required: intRequired,
12836
12836
  disabled: intDisabled,
12837
12837
  invalid: intInvalid,
12838
12838
  paddingless: intPaddingless,
12839
12839
  icon: iconProps,
12840
12840
  width: width
12841
- }, React__default.createElement("div", null, label), React__default.createElement(Input, Object.assign({}, inputProps, {
12841
+ }, label && React__default.createElement(LabelText, {
12842
+ required: intRequired
12843
+ }, label), React__default.createElement(Input, Object.assign({}, inputProps, {
12842
12844
  ref: ref
12843
12845
  })), icon && React__default.createElement(IconContainer, {
12844
12846
  type: iconSubmit ? 'submit' : 'button',
@@ -14675,7 +14677,7 @@ var Switch = function Switch(props) {
14675
14677
  })), React__default.createElement("span", null), label && React__default.createElement(LabelContainer$1, null, label));
14676
14678
  };
14677
14679
 
14678
- var _templateObject$n, _templateObject2$j, _templateObject3$h, _templateObject4$e, _templateObject5$d, _templateObject6$b, _templateObject7$9, _templateObject8$6, _templateObject9$6, _templateObject10$4, _templateObject11$3, _templateObject12$3, _templateObject13$3, _templateObject14$1, _templateObject15, _templateObject16;
14680
+ var _templateObject$n, _templateObject2$j, _templateObject3$h, _templateObject4$e, _templateObject5$d, _templateObject6$b, _templateObject7$9, _templateObject8$6, _templateObject9$6, _templateObject10$4, _templateObject11$3, _templateObject12$3, _templateObject13$3, _templateObject14$2, _templateObject15, _templateObject16;
14679
14681
  var bullet = css(_templateObject$n || (_templateObject$n = _taggedTemplateLiteralLoose(["\n appearance: none;\n width: ", ";\n height: ", ";\n border-radius: 100%;\n border-width: 1px;\n border-style: solid;\n background-color: ", ";\n box-shadow: 0px 1px 3px ", ";\n"])), function (_ref) {
14680
14682
  var theme = _ref.theme;
14681
14683
  return theme.spacings.s4;
@@ -14735,7 +14737,7 @@ var SelectedArea = styled.div(_templateObject13$3 || (_templateObject13$3 = _tag
14735
14737
  var percent = _ref13.percent;
14736
14738
  return percent;
14737
14739
  });
14738
- var MarkersContainer = styled.div(_templateObject14$1 || (_templateObject14$1 = _taggedTemplateLiteralLoose(["\n height: 17px;\n"])));
14740
+ var MarkersContainer = styled.div(_templateObject14$2 || (_templateObject14$2 = _taggedTemplateLiteralLoose(["\n height: 17px;\n"])));
14739
14741
  var Marker = styled.div(_templateObject15 || (_templateObject15 = _taggedTemplateLiteralLoose(["\n position: absolute;\n top: 0;\n width: 40px;\n text-align: center;\n left: ", ";\n z-index: 2;\n\n :first-child {\n left: 0;\n text-align: left;\n\n :after {\n left: 0;\n }\n }\n :last-child {\n right: 0;\n left: unset;\n text-align: right;\n\n :after {\n right: 0;\n left: unset;\n }\n }\n\n ", "\n"])), function (_ref14) {
14740
14742
  var left = _ref14.left;
14741
14743
  return left;
@@ -15249,41 +15251,45 @@ var parse = function parse(value) {
15249
15251
  };
15250
15252
 
15251
15253
  var _templateObject$q, _templateObject2$l, _templateObject3$j, _templateObject4$g, _templateObject5$f, _templateObject6$d, _templateObject7$b, _templateObject8$7, _templateObject9$7, _templateObject10$5;
15252
- var RelativeContainer$5 = styled.div(_templateObject$q || (_templateObject$q = _taggedTemplateLiteralLoose(["\n position: relative;\n\n > :nth-child(1) input {\n color: transparent;\n }\n"])));
15253
- var LabelContainer$3 = styled.div(_templateObject2$l || (_templateObject2$l = _taggedTemplateLiteralLoose(["\n ", "\n line-height: ", ";\n"])), function (_ref) {
15254
- var theme = _ref.theme;
15255
- return theme.useTypography('p');
15256
- }, function (_ref2) {
15254
+ var RelativeContainer$5 = styled.div(_templateObject$q || (_templateObject$q = _taggedTemplateLiteralLoose(["\n position: relative;\n user-select: none;\n min-width: 220px;\n border-width: 1px;\n border-style: solid;\n border-color: ", ";\n border-radius: 4px;\n\n > :nth-child(1) input {\n color: transparent;\n }\n"])), function (_ref) {
15255
+ var theme = _ref.theme,
15256
+ invalid = _ref.invalid;
15257
+ return invalid ? theme.colors.warningRed : theme.colors.lightGrey;
15258
+ });
15259
+ var LabelContainer$3 = styled.div(_templateObject2$l || (_templateObject2$l = _taggedTemplateLiteralLoose(["\n ", "\n line-height: ", ";\n"])), function (_ref2) {
15257
15260
  var theme = _ref2.theme;
15261
+ return theme.useTypography('p');
15262
+ }, function (_ref3) {
15263
+ var theme = _ref3.theme;
15258
15264
  return theme.spacings.s3;
15259
15265
  });
15260
- var Container$a = styled.div(_templateObject3$j || (_templateObject3$j = _taggedTemplateLiteralLoose(["\n position: absolute;\n bottom: 1px;\n left: 1px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n border-radius: 4px;\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n"])), function (_ref3) {
15261
- var theme = _ref3.theme,
15262
- iconWidth = _ref3.iconWidth,
15263
- paddingless = _ref3.paddingless;
15266
+ var Container$a = styled.div(_templateObject3$j || (_templateObject3$j = _taggedTemplateLiteralLoose(["\n position: absolute;\n bottom: 1px;\n left: 1px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n border-radius: 4px;\n white-space: nowrap;\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n"])), function (_ref4) {
15267
+ var theme = _ref4.theme,
15268
+ iconWidth = _ref4.iconWidth,
15269
+ paddingless = _ref4.paddingless;
15264
15270
 
15265
15271
  if (paddingless) {
15266
15272
  return css(_templateObject4$g || (_templateObject4$g = _taggedTemplateLiteralLoose(["\n width: calc(100% - 2px - ", ");\n height: 19px;\n "])), iconWidth);
15267
15273
  }
15268
15274
 
15269
15275
  return css(_templateObject5$f || (_templateObject5$f = _taggedTemplateLiteralLoose(["\n width: calc(100% - 2px - ", " - ", ");\n height: 33px;\n padding: ", " 0 ", " ", ";\n "])), iconWidth, theme.spacings.s3, theme.spacings.s2, theme.spacings.s2, theme.spacings.s3);
15270
- }, function (_ref4) {
15271
- var invalid = _ref4.invalid,
15272
- theme = _ref4.theme;
15273
- if (!invalid) return;
15274
- return css(_templateObject6$d || (_templateObject6$d = _taggedTemplateLiteralLoose(["\n color: ", ";\n "])), theme.colors.warningRed);
15275
15276
  }, function (_ref5) {
15276
15277
  var invalid = _ref5.invalid,
15277
15278
  theme = _ref5.theme;
15278
15279
  if (!invalid) return;
15279
- return css(_templateObject7$b || (_templateObject7$b = _taggedTemplateLiteralLoose(["\n color: ", ";\n "])), theme.colors.warningRed);
15280
+ return css(_templateObject6$d || (_templateObject6$d = _taggedTemplateLiteralLoose(["\n color: ", ";\n "])), theme.colors.warningRed);
15280
15281
  }, function (_ref6) {
15281
- var disabled = _ref6.disabled;
15282
+ var invalid = _ref6.invalid,
15283
+ theme = _ref6.theme;
15284
+ if (!invalid) return;
15285
+ return css(_templateObject7$b || (_templateObject7$b = _taggedTemplateLiteralLoose(["\n color: ", ";\n "])), theme.colors.warningRed);
15286
+ }, function (_ref7) {
15287
+ var disabled = _ref7.disabled;
15282
15288
  if (!disabled) return;
15283
15289
  return css(_templateObject8$7 || (_templateObject8$7 = _taggedTemplateLiteralLoose(["\n opacity: 0.5;\n "])));
15284
15290
  });
15285
- var Button$4 = styled.button(_templateObject9$7 || (_templateObject9$7 = _taggedTemplateLiteralLoose(["\n display: flex;\n background-color: transparent;\n border: none;\n padding: 0;\n box-shadow: none;\n\n ", ";\n"])), function (_ref7) {
15286
- var onClick = _ref7.onClick;
15291
+ var Button$4 = styled.button(_templateObject9$7 || (_templateObject9$7 = _taggedTemplateLiteralLoose(["\n display: flex;\n background-color: transparent;\n border: none;\n padding: 0;\n box-shadow: none;\n\n ", ";\n"])), function (_ref8) {
15292
+ var onClick = _ref8.onClick;
15287
15293
  if (!onClick) return;
15288
15294
  return css(_templateObject10$5 || (_templateObject10$5 = _taggedTemplateLiteralLoose(["\n :not(:disabled) {\n cursor: pointer;\n }\n "])));
15289
15295
  });
@@ -15369,8 +15375,12 @@ var Component$1 = React__default.forwardRef(function (props, ref) {
15369
15375
  return React__default.createElement(RelativeContainer$5, {
15370
15376
  ref: useOnClickOut(function () {
15371
15377
  return setOpen(null);
15372
- })
15378
+ }),
15379
+ invalid: invalid
15373
15380
  }, React__default.createElement(Input$1, Object.assign({}, inputProps, {
15381
+ style: {
15382
+ width: 0
15383
+ },
15374
15384
  type: 'text',
15375
15385
  ref: ref,
15376
15386
  icon: {
@@ -15386,7 +15396,7 @@ var Component$1 = React__default.forwardRef(function (props, ref) {
15386
15396
  });
15387
15397
  }
15388
15398
  },
15389
- invalid: invalid,
15399
+ borderless: true,
15390
15400
  htmlDisabled: true
15391
15401
  })), React__default.createElement(Container$a, {
15392
15402
  iconWidth: '24px',
@@ -17029,7 +17039,7 @@ var useContext$2 = function useContext() {
17029
17039
  return React__default.useContext(Provider$2);
17030
17040
  };
17031
17041
 
17032
- var _templateObject$M, _templateObject2$C, _templateObject3$A, _templateObject4$w, _templateObject5$u, _templateObject6$q, _templateObject7$n, _templateObject8$j, _templateObject9$h, _templateObject10$c, _templateObject11$6, _templateObject12$4, _templateObject13$4, _templateObject14$2, _templateObject15$1;
17042
+ var _templateObject$M, _templateObject2$C, _templateObject3$A, _templateObject4$w, _templateObject5$u, _templateObject6$q, _templateObject7$n, _templateObject8$j, _templateObject9$h, _templateObject10$c, _templateObject11$6, _templateObject12$4, _templateObject13$4, _templateObject14$3, _templateObject15$1;
17033
17043
  var aligns = {
17034
17044
  self: {
17035
17045
  horizontal: {
@@ -17139,7 +17149,7 @@ var Col = styled.div(_templateObject$M || (_templateObject$M = _taggedTemplateLi
17139
17149
  if (!hover) return;
17140
17150
  var h = hover === true ? ['lightGrey', 50] : hover;
17141
17151
  var c = Array.isArray(h) ? theme.getColor.apply(theme, h) : theme.colors[h];
17142
- return css(_templateObject14$2 || (_templateObject14$2 = _taggedTemplateLiteralLoose(["\n :hover {\n background-color: ", ";\n }\n "])), c);
17152
+ return css(_templateObject14$3 || (_templateObject14$3 = _taggedTemplateLiteralLoose(["\n :hover {\n background-color: ", ";\n }\n "])), c);
17143
17153
  }, function (_ref9) {
17144
17154
  var pointer = _ref9.pointer;
17145
17155
  if (!pointer) return;