@mw-kit/mw-ui 1.7.64 → 1.7.65

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.
@@ -18864,16 +18864,31 @@ var ProgressBar = function ProgressBar(props) {
18864
18864
  return React__default.createElement(Container$m, null, React__default.createElement(Progress, Object.assign({}, props), React__default.createElement("div", null)), React__default.createElement("span", null, " ", props.value || '0', "%"));
18865
18865
  };
18866
18866
 
18867
- var _templateObject$13, _templateObject2$P, _templateObject3$I, _templateObject4$v, _templateObject5$s, _templateObject6$q, _templateObject7$q;
18867
+ var _templateObject$13, _templateObject2$P, _templateObject3$I, _templateObject4$v, _templateObject5$s, _templateObject6$q, _templateObject7$q, _templateObject8$m;
18868
18868
  var Container$n = styled.div(_templateObject$13 || (_templateObject$13 = _taggedTemplateLiteralLoose(["\n display: block;\n"])));
18869
18869
  var delimiters = {
18870
18870
  blue: ['blue'],
18871
18871
  grey: ['warningGray']
18872
18872
  };
18873
- var Tabs = styled.ul(_templateObject2$P || (_templateObject2$P = _taggedTemplateLiteralLoose(["\n user-select: none;\n list-style: none;\n display: inline-flex;\n padding: 0;\n margin: 0;\n width: 100%;\n\n ", ";\n\n gap: ", ";\n"])), function (_ref) {
18874
- var theme = _ref.theme,
18875
- internal = _ref.$internal,
18876
- delimiter = _ref.$delimiter;
18873
+ var Tabs = styled.ul(_templateObject2$P || (_templateObject2$P = _taggedTemplateLiteralLoose(["\n user-select: none;\n list-style: none;\n display: inline-flex;\n width: 100%;\n\n ", "\n\n ", ";\n\n gap: ", ";\n"])), function (_ref) {
18874
+ var spacing = _ref.$spacing;
18875
+
18876
+ var _getSpacings$split = getSpacings(spacing || {}, {
18877
+ top: '0',
18878
+ right: '0',
18879
+ bottom: 's4',
18880
+ left: '0'
18881
+ }).split(' '),
18882
+ top = _getSpacings$split[0],
18883
+ right = _getSpacings$split[1],
18884
+ bottom = _getSpacings$split[2],
18885
+ left = _getSpacings$split[3];
18886
+
18887
+ return css(_templateObject3$I || (_templateObject3$I = _taggedTemplateLiteralLoose(["\n margin: ", " 0 ", " 0;\n padding: 0 ", " 0 ", ";\n "])), top, bottom, right, left);
18888
+ }, function (_ref2) {
18889
+ var theme = _ref2.theme,
18890
+ internal = _ref2.$internal,
18891
+ delimiter = _ref2.$delimiter;
18877
18892
 
18878
18893
  var border = function () {
18879
18894
  if (delimiter === 'none') {
@@ -18883,21 +18898,21 @@ var Tabs = styled.ul(_templateObject2$P || (_templateObject2$P = _taggedTemplate
18883
18898
  return internal ? "1px solid " + theme.getColor.apply(theme, delimiters[delimiter || 'grey']) : "2px solid " + theme.getColor.apply(theme, delimiters[delimiter || 'blue']);
18884
18899
  }();
18885
18900
 
18886
- return css(_templateObject3$I || (_templateObject3$I = _taggedTemplateLiteralLoose(["\n border-bottom: ", ";\n\n + div {\n border: 1px solid ", ";\n border-top-width: 0px;\n border-radius: 0px 0px 2px 2px;\n padding: ", ";\n }\n "])), border, theme.getColor.apply(theme, delimiters.grey), theme.spacings.s3);
18887
- }, function (_ref2) {
18888
- var theme = _ref2.theme,
18889
- internal = _ref2.$internal;
18890
- return internal ? theme.spacings.s6 : 0;
18891
- });
18892
- var Tab = styled.li(_templateObject4$v || (_templateObject4$v = _taggedTemplateLiteralLoose(["\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: space-between;\n\n ", "\n"])), function (_ref3) {
18901
+ return css(_templateObject4$v || (_templateObject4$v = _taggedTemplateLiteralLoose(["\n border-bottom: ", ";\n\n + div {\n border: 1px solid ", ";\n border-top-width: 0px;\n border-radius: 0px 0px 2px 2px;\n padding: ", ";\n }\n "])), border, theme.getColor.apply(theme, delimiters.grey), theme.spacings.s3);
18902
+ }, function (_ref3) {
18893
18903
  var theme = _ref3.theme,
18894
- active = _ref3.$active,
18895
18904
  internal = _ref3.$internal;
18896
- return css(_templateObject5$s || (_templateObject5$s = _taggedTemplateLiteralLoose(["\n background-color: ", ";\n padding: ", ";\n gap: ", ";\n\n ", "\n\n span {\n color: ", ";\n }\n "])), theme.colors[active ? 'blue' : 'white'], theme.spacings.s3, theme.spacings.s3, internal ? css(_templateObject6$q || (_templateObject6$q = _taggedTemplateLiteralLoose(["\n border-radius: 4px 4px 0 0;\n\n > span {\n ", "\n line-height: 17px;\n }\n "])), function (_ref4) {
18897
- var theme = _ref4.theme;
18898
- return theme.useTypography('h4');
18899
- }) : css(_templateObject7$q || (_templateObject7$q = _taggedTemplateLiteralLoose(["\n box-shadow: 0px 3px 6px ", ";\n\n > span {\n ", "\n line-height: 19px;\n }\n "])), theme.getColor('black', 15), function (_ref5) {
18905
+ return internal ? theme.spacings.s6 : 0;
18906
+ });
18907
+ var Tab = styled.li(_templateObject5$s || (_templateObject5$s = _taggedTemplateLiteralLoose(["\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: space-between;\n\n ", "\n"])), function (_ref4) {
18908
+ var theme = _ref4.theme,
18909
+ active = _ref4.$active,
18910
+ internal = _ref4.$internal;
18911
+ return css(_templateObject6$q || (_templateObject6$q = _taggedTemplateLiteralLoose(["\n background-color: ", ";\n padding: ", ";\n gap: ", ";\n\n ", "\n\n span {\n color: ", ";\n }\n "])), theme.colors[active ? 'blue' : 'white'], theme.spacings.s3, theme.spacings.s3, internal ? css(_templateObject7$q || (_templateObject7$q = _taggedTemplateLiteralLoose(["\n border-radius: 4px 4px 0 0;\n\n > span {\n ", "\n line-height: 17px;\n }\n "])), function (_ref5) {
18900
18912
  var theme = _ref5.theme;
18913
+ return theme.useTypography('h4');
18914
+ }) : css(_templateObject8$m || (_templateObject8$m = _taggedTemplateLiteralLoose(["\n box-shadow: 0px 3px 6px ", ";\n\n > span {\n ", "\n line-height: 19px;\n }\n "])), theme.getColor('black', 15), function (_ref6) {
18915
+ var theme = _ref6.theme;
18901
18916
  return theme.useTypography('h2');
18902
18917
  }), theme.colors[active ? 'white' : 'darkBlue']);
18903
18918
  });
@@ -18996,9 +19011,11 @@ var Tabs$1 = function Tabs$1(props) {
18996
19011
  });
18997
19012
  };
18998
19013
 
18999
- return React__default.createElement(Container$n, null, React__default.createElement(Tabs, {
19014
+ var divProps = filterObject(props, ['options', 'activeState', 'internal', 'maxTabs', 'onMaxTabsExceeded', 'alwaysOpen', 'delimiter', 'spacing']);
19015
+ return React__default.createElement(Container$n, Object.assign({}, divProps), React__default.createElement(Tabs, {
19000
19016
  "$internal": props.internal,
19001
- "$delimiter": props.delimiter
19017
+ "$delimiter": props.delimiter,
19018
+ "$spacing": props.spacing
19002
19019
  }, options.reduce(function (elements, tab, index) {
19003
19020
  if (status[index] === 'closed') return elements;
19004
19021
  return [].concat(elements, [React__default.createElement(Tab, {