@mw-kit/mw-ui 1.7.63 → 1.7.64

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,56 +18864,42 @@ 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 _path$4n;
18868
-
18869
- function _extends$4w() {
18870
- _extends$4w = Object.assign ? Object.assign.bind() : function (target) {
18871
- for (var i = 1; i < arguments.length; i++) {
18872
- var source = arguments[i];
18867
+ var _templateObject$13, _templateObject2$P, _templateObject3$I, _templateObject4$v, _templateObject5$s, _templateObject6$q, _templateObject7$q;
18868
+ var Container$n = styled.div(_templateObject$13 || (_templateObject$13 = _taggedTemplateLiteralLoose(["\n display: block;\n"])));
18869
+ var delimiters = {
18870
+ blue: ['blue'],
18871
+ grey: ['warningGray']
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
18877
 
18874
- for (var key in source) {
18875
- if (Object.prototype.hasOwnProperty.call(source, key)) {
18876
- target[key] = source[key];
18877
- }
18878
- }
18878
+ var border = function () {
18879
+ if (delimiter === 'none') {
18880
+ return 'none';
18879
18881
  }
18880
18882
 
18881
- return target;
18882
- };
18883
- return _extends$4w.apply(this, arguments);
18884
- }
18885
-
18886
- function SvgClose(props) {
18887
- return /*#__PURE__*/createElement("svg", _extends$4w({
18888
- xmlns: "http://www.w3.org/2000/svg",
18889
- width: 24,
18890
- height: 24,
18891
- fill: "none",
18892
- stroke: "currentColor",
18893
- strokeWidth: 2,
18894
- strokeLinecap: "round",
18895
- strokeLinejoin: "round",
18896
- className: "close_svg__feather close_svg__feather-x"
18897
- }, props), _path$4n || (_path$4n = /*#__PURE__*/createElement("path", {
18898
- d: "M18 6L6 18M6 6l12 12"
18899
- })));
18900
- }
18883
+ return internal ? "1px solid " + theme.getColor.apply(theme, delimiters[delimiter || 'grey']) : "2px solid " + theme.getColor.apply(theme, delimiters[delimiter || 'blue']);
18884
+ }();
18901
18885
 
18902
- var _templateObject$13, _templateObject2$P, _templateObject3$I, _templateObject4$v, _templateObject5$s, _templateObject6$q;
18903
- var Container$n = styled.div(_templateObject$13 || (_templateObject$13 = _taggedTemplateLiteralLoose(["\n display: block;\n border-bottom-style: solid;\n\n ", "\n"])), function (_ref) {
18904
- var theme = _ref.theme,
18905
- internal = _ref.internal;
18906
- return css(_templateObject2$P || (_templateObject2$P = _taggedTemplateLiteralLoose(["\n margin-bottom: ", ";\n border-bottom-width: ", ";\n border-bottom-color: ", ";\n "])), theme.spacings.s2, internal ? '1px' : '2px', internal ? theme.getColor('lightestGrey', 50) : theme.colors.blue);
18907
- });
18908
- var Tabs = styled.ul(_templateObject3$I || (_templateObject3$I = _taggedTemplateLiteralLoose(["\n user-select: none;\n list-style: none;\n display: inline-flex;\n gap: 1px;\n padding: 0;\n margin: 0;\n\n ", "\n"])), function (_ref2) {
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) {
18909
18888
  var theme = _ref2.theme,
18910
- internal = _ref2.internal;
18911
- return css(_templateObject4$v || (_templateObject4$v = _taggedTemplateLiteralLoose(["\n height: ", ";\n box-shadow: 0 0 10px 0 ", ";\n "])), internal ? '41px' : '49px', theme.getColor('black', 10));
18889
+ internal = _ref2.$internal;
18890
+ return internal ? theme.spacings.s6 : 0;
18912
18891
  });
18913
- 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 border-radius: 4px 4px 0 0;\n\n svg {\n transform: scale(calc(18 / 24));\n stroke-width: 2px;\n }\n\n ", "\n"])), function (_ref3) {
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) {
18914
18893
  var theme = _ref3.theme,
18915
- active = _ref3.active;
18916
- return css(_templateObject6$q || (_templateObject6$q = _taggedTemplateLiteralLoose(["\n background-color: ", ";\n padding: 0 ", ";\n gap: ", ";\n\n span {\n font-family: ", ";\n font-size: ", ";\n font-weight: ", ";\n\n color: ", ";\n }\n\n svg {\n stroke: ", ";\n\n &:hover {\n stroke: ", ";\n }\n }\n "])), theme.colors[active ? 'blue' : 'white'], theme.spacings.s2, theme.spacings.s2, theme.typographies.h2.fontFamily, theme.typographies.h2.fontSize, theme.typographies.h2.fontWeight, theme.colors[active ? 'white' : 'darkBlue'], theme.colors[active ? 'white' : 'darkBlue'], theme.colors.red);
18894
+ active = _ref3.$active,
18895
+ 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) {
18900
+ var theme = _ref5.theme;
18901
+ return theme.useTypography('h2');
18902
+ }), theme.colors[active ? 'white' : 'darkBlue']);
18917
18903
  });
18918
18904
 
18919
18905
  var initialStatus = function initialStatus(active, length) {
@@ -18924,8 +18910,7 @@ var initialStatus = function initialStatus(active, length) {
18924
18910
 
18925
18911
  var Tabs$1 = function Tabs$1(props) {
18926
18912
  var options = props.options,
18927
- activeState = props.activeState,
18928
- internal = props.internal;
18913
+ activeState = props.activeState;
18929
18914
  var active = activeState[0],
18930
18915
  setActive = activeState[1];
18931
18916
 
@@ -19011,25 +18996,32 @@ var Tabs$1 = function Tabs$1(props) {
19011
18996
  });
19012
18997
  };
19013
18998
 
19014
- var Close = props.alwaysOpen ? function () {
19015
- return null;
19016
- } : SvgClose;
19017
18999
  return React__default.createElement(Container$n, null, React__default.createElement(Tabs, {
19018
- internal: +(internal || false)
19000
+ "$internal": props.internal,
19001
+ "$delimiter": props.delimiter
19019
19002
  }, options.reduce(function (elements, tab, index) {
19020
19003
  if (status[index] === 'closed') return elements;
19021
19004
  return [].concat(elements, [React__default.createElement(Tab, {
19022
19005
  key: index,
19023
- active: +(status[index] === 'active'),
19006
+ "$active": status[index] === 'active',
19007
+ "$internal": props.internal,
19024
19008
  onClick: function onClick(event) {
19025
19009
  return onClickActivate(index, event);
19026
19010
  }
19027
- }, React__default.createElement("span", null, tab.label), React__default.createElement(Close, {
19011
+ }, React__default.createElement("span", null, tab.label), !props.alwaysOpen && React__default.createElement(Icon, {
19012
+ type: 'feather',
19013
+ icon: 'x',
19028
19014
  onClick: function onClick() {
19029
19015
  return onClickClose(index);
19030
- }
19016
+ },
19017
+ width: '14px',
19018
+ height: '14px',
19019
+ strokeWidth: '3px',
19020
+ color: status[index] === 'active' ? 'white' : 'darkBlue'
19031
19021
  }))]);
19032
- }, [])));
19022
+ }, [])), props.children && React__default.createElement("div", {
19023
+ children: props.children
19024
+ }));
19033
19025
  };
19034
19026
 
19035
19027
  var _templateObject$14;