@mw-kit/mw-ui 1.7.92 → 1.7.94

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.
@@ -12226,7 +12226,7 @@ var EllipsisContainer$1 = function EllipsisContainer$1(props) {
12226
12226
  };
12227
12227
 
12228
12228
  var _templateObject$5, _templateObject2$5, _templateObject3$5, _templateObject4$3, _templateObject5$3, _templateObject6$2, _templateObject7$2, _templateObject8$1, _templateObject9$1, _templateObject10$1, _templateObject11$1, _templateObject12$1, _templateObject13$1, _templateObject14$1, _templateObject15$1, _templateObject16$1, _templateObject17$1, _templateObject18$1, _templateObject19$1, _templateObject20$1, _templateObject21$1, _templateObject22$1;
12229
- var IconContainer = styled.div(_templateObject$5 || (_templateObject$5 = _taggedTemplateLiteralLoose(["\n position: absolute;\n display: flex;\n justify-content: space-between;\n align-items: center;\n height: 17px;\n\n background-color: transparent;\n border: none;\n box-shadow: none;\n padding: 0;\n"])));
12229
+ var IconContainer = styled.div(_templateObject$5 || (_templateObject$5 = _taggedTemplateLiteralLoose(["\n position: absolute;\n display: flex;\n justify-content: space-between;\n align-items: center;\n height: 17px;\n\n background-color: transparent;\n border: none;\n box-shadow: none;\n padding: 0;\n\n cursor: auto;\n"])));
12230
12230
  var ChildrenContainer = styled(EllipsisContainer$1)(_templateObject2$5 || (_templateObject2$5 = _taggedTemplateLiteralLoose(["\n position: absolute;\n width: 100%;\n height: 100%;\n bottom: 0;\n left: 0;\n line-height: 19px;\n display: flex;\n gap: calc(", " / 2);\n"])), function (_ref) {
12231
12231
  var theme = _ref.theme;
12232
12232
  return theme.spacings.s1;
@@ -12919,8 +12919,8 @@ var ScrollContainer = React__default.forwardRef(function (props, ref) {
12919
12919
  });
12920
12920
  ScrollContainer.displayName = 'ScrollContainer';
12921
12921
 
12922
- var _templateObject$b, _templateObject2$9, _templateObject3$9, _templateObject4$6, _templateObject5$5, _templateObject6$4, _templateObject7$4, _templateObject8$3, _templateObject9$3, _templateObject10$3;
12923
- var Option = styled.div(_templateObject$b || (_templateObject$b = _taggedTemplateLiteralLoose(["\n ", ";\n line-height: ", ";\n color: ", ";\n display: flex;\n gap: ", ";\n\n > :nth-child(1) {\n display: flex;\n align-items: center;\n flex: 1;\n max-width: 100%;\n }\n\n ", ";\n\n ", ";\n\n :hover {\n background-color: ", ";\n }\n"])), function (_ref) {
12922
+ var _templateObject$b, _templateObject2$9, _templateObject3$9, _templateObject4$6, _templateObject5$5, _templateObject6$4, _templateObject7$4, _templateObject8$3, _templateObject9$3, _templateObject10$3, _templateObject11$3;
12923
+ var Option = styled.div(_templateObject$b || (_templateObject$b = _taggedTemplateLiteralLoose(["\n ", ";\n line-height: ", ";\n color: ", ";\n display: flex;\n gap: ", ";\n\n > :nth-child(1) {\n display: flex;\n align-items: center;\n flex: 1;\n max-width: 100%;\n }\n\n ", ";\n\n ", ";\n\n :hover {\n background-color: ", ";\n }\n\n ", "\n"])), function (_ref) {
12924
12924
  var theme = _ref.theme;
12925
12925
  return theme.useTypography('p');
12926
12926
  }, function (_ref2) {
@@ -12933,7 +12933,7 @@ var Option = styled.div(_templateObject$b || (_templateObject$b = _taggedTemplat
12933
12933
  var theme = _ref4.theme;
12934
12934
  return theme.spacings.s1;
12935
12935
  }, function (_ref5) {
12936
- var disabled = _ref5.disabled;
12936
+ var disabled = _ref5.$disabled;
12937
12937
 
12938
12938
  if (!disabled) {
12939
12939
  return css(_templateObject2$9 || (_templateObject2$9 = _taggedTemplateLiteralLoose(["\n cursor: pointer;\n "])));
@@ -12941,7 +12941,7 @@ var Option = styled.div(_templateObject$b || (_templateObject$b = _taggedTemplat
12941
12941
 
12942
12942
  return css(_templateObject3$9 || (_templateObject3$9 = _taggedTemplateLiteralLoose(["\n pointer-events: none;\n opacity: 0.3;\n "])));
12943
12943
  }, function (_ref6) {
12944
- var border = _ref6.border,
12944
+ var border = _ref6.$border,
12945
12945
  theme = _ref6.theme;
12946
12946
  if (!border) return;
12947
12947
  var config = getBorder(border);
@@ -12956,10 +12956,17 @@ var Option = styled.div(_templateObject$b || (_templateObject$b = _taggedTemplat
12956
12956
  });
12957
12957
  }, function (_ref7) {
12958
12958
  var theme = _ref7.theme;
12959
- return theme.colors.iceWhite;
12959
+ return theme.getColor('blue', 15);
12960
+ }, function (_ref8) {
12961
+ var highlighted = _ref8.$highlighted;
12962
+ if (!highlighted) return;
12963
+ return css(_templateObject5$5 || (_templateObject5$5 = _taggedTemplateLiteralLoose(["\n background-color: ", ";\n "])), function (_ref9) {
12964
+ var theme = _ref9.theme;
12965
+ return theme.getColor('blue', 15);
12966
+ });
12960
12967
  });
12961
- var Container$2 = styled(AbsoluteContainer)(_templateObject5$5 || (_templateObject5$5 = _taggedTemplateLiteralLoose(["\n display: flex;\n\n > div {\n display: flex;\n width: 100%;\n\n > div:nth-child(1) {\n background-color: ", ";\n border-radius: 4px;\n\n ", "\n }\n\n ", "\n\n ", "\n }\n"])), function (_ref8) {
12962
- var theme = _ref8.theme;
12968
+ var Container$2 = styled(AbsoluteContainer)(_templateObject6$4 || (_templateObject6$4 = _taggedTemplateLiteralLoose(["\n display: flex;\n\n > div {\n display: flex;\n width: 100%;\n\n > div:nth-child(1) {\n background-color: ", ";\n border-radius: 4px;\n\n ", "\n }\n\n ", "\n\n ", "\n }\n"])), function (_ref10) {
12969
+ var theme = _ref10.theme;
12963
12970
  return theme.colors.white;
12964
12971
  }, function (props) {
12965
12972
  if (!props.containerSpacing) return;
@@ -12967,46 +12974,74 @@ var Container$2 = styled(AbsoluteContainer)(_templateObject5$5 || (_templateObje
12967
12974
  var tmp = spacing.split(' ');
12968
12975
  tmp[1] = "calc(" + props.theme.spacings.s1 + " / 2)";
12969
12976
  spacing = tmp.join(' ');
12970
- return css(_templateObject6$4 || (_templateObject6$4 = _taggedTemplateLiteralLoose(["\n padding: ", ";\n "])), spacing);
12971
- }, function (_ref9) {
12972
- var bordered = _ref9.bordered;
12977
+ return css(_templateObject7$4 || (_templateObject7$4 = _taggedTemplateLiteralLoose(["\n padding: ", ";\n "])), spacing);
12978
+ }, function (_ref11) {
12979
+ var bordered = _ref11.bordered;
12973
12980
  if (!bordered) return;
12974
- return css(_templateObject7$4 || (_templateObject7$4 = _taggedTemplateLiteralLoose(["\n ", " {\n :not(:last-child) {\n border-bottom: 1px solid\n ", ";\n }\n }\n "])), Option, function (_ref10) {
12975
- var theme = _ref10.theme;
12981
+ return css(_templateObject8$3 || (_templateObject8$3 = _taggedTemplateLiteralLoose(["\n ", " {\n :not(:last-child) {\n border-bottom: 1px solid\n ", ";\n }\n }\n "])), Option, function (_ref12) {
12982
+ var theme = _ref12.theme;
12976
12983
  return theme.getColor('greyishBlue', 10);
12977
12984
  });
12978
12985
  }, function (props) {
12979
12986
  var theme = props.theme;
12980
12987
 
12981
12988
  if (!props.itemSpacing) {
12982
- return css(_templateObject8$3 || (_templateObject8$3 = _taggedTemplateLiteralLoose(["\n ", " {\n margin: ", " 0px ", "\n ", ";\n }\n "])), Delimiter, theme.spacings.s1, theme.spacings.s1, theme.spacings.s1);
12989
+ return css(_templateObject9$3 || (_templateObject9$3 = _taggedTemplateLiteralLoose(["\n ", " {\n margin: ", " 0px ", "\n ", ";\n }\n "])), Delimiter, theme.spacings.s1, theme.spacings.s1, theme.spacings.s1);
12983
12990
  }
12984
12991
 
12985
12992
  var spacing = getSpacings(props.itemSpacing, {
12986
12993
  right: '0'
12987
12994
  });
12988
- return css(_templateObject9$3 || (_templateObject9$3 = _taggedTemplateLiteralLoose(["\n ", " {\n padding: ", ";\n }\n ", " {\n margin: ", ";\n }\n "])), Option, spacing, Delimiter, spacing);
12995
+ return css(_templateObject10$3 || (_templateObject10$3 = _taggedTemplateLiteralLoose(["\n ", " {\n padding: ", ";\n }\n ", " {\n margin: ", ";\n }\n "])), Option, spacing, Delimiter, spacing);
12989
12996
  });
12990
- var Delimiter = styled.div(_templateObject10$3 || (_templateObject10$3 = _taggedTemplateLiteralLoose(["\n ", ";\n\n border-bottom: 1px solid ", ";\n margin: 14px;\n width: calc(100% - 28px);\n"])), function (_ref11) {
12991
- var theme = _ref11.theme;
12997
+ var Delimiter = styled.div(_templateObject11$3 || (_templateObject11$3 = _taggedTemplateLiteralLoose(["\n ", ";\n\n border-bottom: 1px solid ", ";\n margin: 14px;\n width: calc(100% - 28px);\n"])), function (_ref13) {
12998
+ var theme = _ref13.theme;
12992
12999
  return theme.useTypography('p');
12993
- }, function (_ref12) {
12994
- var theme = _ref12.theme;
13000
+ }, function (_ref14) {
13001
+ var theme = _ref14.theme;
12995
13002
  return theme.colors.greyishBlue;
12996
13003
  });
12997
13004
 
13005
+ var EmptyLabel = function EmptyLabel(_ref) {
13006
+ var label = _ref.label;
13007
+ return React__default.createElement(React__default.Fragment, {
13008
+ children: label
13009
+ });
13010
+ };
13011
+
13012
+ var isVisible = function isVisible(elem, bound) {
13013
+ var docViewTop = bound.scrollTop;
13014
+ var docViewBottom = docViewTop + bound.offsetHeight;
13015
+ var elemTop = elem.offsetTop;
13016
+ var elemBottom = elemTop + elem.offsetHeight;
13017
+ return elemBottom <= docViewBottom && elemTop >= docViewTop;
13018
+ };
13019
+
12998
13020
  var MenuComponent = function MenuComponent(props, ref) {
12999
13021
  var _props = _extends({}, props),
13000
13022
  close = _props.close,
13001
13023
  options = _props.options,
13002
- children = _props.children;
13024
+ children = _props.children,
13025
+ highlight = _props.highlight;
13003
13026
 
13004
- var absoluteContainerProps = filterObject(props, ['scrollSpacing', 'onScrollEnd', 'before', 'after', 'close', 'options', 'loading', 'children', 'emptyContent'], {
13027
+ var _useState = useState(null),
13028
+ scrollRef = _useState[0],
13029
+ setScrollRef = _useState[1];
13030
+
13031
+ useEffect(function () {
13032
+ if (!scrollRef || highlight === undefined) return;
13033
+ var element = scrollRef.children[highlight];
13034
+ if (!element) return;
13035
+ if (isVisible(element, scrollRef)) return;
13036
+ scrollRef.scrollTo(0, element.offsetTop);
13037
+ }, [highlight, scrollRef]);
13038
+ var absoluteContainerProps = filterObject(props, ['scrollSpacing', 'scrollTabIndex', 'label', 'rules', 'onClickOption', 'onScrollEnd', 'before', 'after', 'close', 'options', 'loading', 'children', 'emptyContent', 'highlight'], {
13005
13039
  itemSpacing: 's1'
13006
13040
  });
13007
13041
  return React__default.createElement(Container$2, Object.assign({}, absoluteContainerProps, {
13008
13042
  ref: ref
13009
13043
  }), React__default.createElement(React__default.Fragment, null, React__default.createElement(ScrollContainer, {
13044
+ ref: setScrollRef,
13010
13045
  onScrollEnd: props.onScrollEnd,
13011
13046
  before: props.before,
13012
13047
  after: props.after,
@@ -13015,7 +13050,8 @@ var MenuComponent = function MenuComponent(props, ref) {
13015
13050
  content: props.emptyContent
13016
13051
  } : undefined,
13017
13052
  spacing: props.scrollSpacing,
13018
- loading: props.loading
13053
+ loading: props.loading,
13054
+ tabIndex: props.scrollTabIndex
13019
13055
  }, options.map(function (option, index) {
13020
13056
  var _option = _extends({}, option),
13021
13057
  delimiter = _option.delimiter,
@@ -13027,23 +13063,23 @@ var MenuComponent = function MenuComponent(props, ref) {
13027
13063
  var onClick;
13028
13064
  var disabled = option.disabled;
13029
13065
 
13030
- var OptionContent = function OptionContent(_ref) {
13031
- var children = _ref.children;
13066
+ var OptionContent = function OptionContent(_ref2) {
13067
+ var children = _ref2.children;
13032
13068
  return children;
13033
13069
  };
13034
13070
 
13035
13071
  if (!disabled) {
13036
- var rule = (option.rules || []).map(function (rule) {
13072
+ var rule = (option.rules || props.rules || []).map(function (rule) {
13037
13073
  return rule(index, data);
13038
13074
  }).find(function (result) {
13039
13075
  return result !== true;
13040
13076
  });
13041
13077
 
13042
13078
  if (rule === true || rule === undefined) {
13043
- var _onClick = option.onClick || function () {};
13079
+ var _onClick = option.onClick || props.onClickOption || function () {};
13044
13080
 
13045
13081
  onClick = function onClick(e) {
13046
- _onClick(index, option, e);
13082
+ _onClick(index, option.data, e);
13047
13083
 
13048
13084
  closeMenu();
13049
13085
  };
@@ -13051,8 +13087,8 @@ var MenuComponent = function MenuComponent(props, ref) {
13051
13087
  disabled = true;
13052
13088
 
13053
13089
  if (rule !== false) {
13054
- OptionContent = function OptionContent(_ref2) {
13055
- var children = _ref2.children;
13090
+ OptionContent = function OptionContent(_ref3) {
13091
+ var children = _ref3.children;
13056
13092
  return React__default.createElement(Popup, Object.assign({
13057
13093
  on: 'click',
13058
13094
  position: 'left center',
@@ -13073,21 +13109,17 @@ var MenuComponent = function MenuComponent(props, ref) {
13073
13109
  }
13074
13110
 
13075
13111
  OptionContent.displayName = 'OptionContent';
13076
- var label = option.label;
13077
- var labelOptions = filterObject(option, ['onClick', 'label', 'rules']);
13078
- labelOptions.disabled = disabled;
13079
- var LabelComponent = typeof label === 'function' ? label : function () {
13080
- return React__default.createElement(React__default.Fragment, {
13081
- children: label
13082
- });
13083
- };
13112
+ var LabelComponent = option.labelComponent || props.label || EmptyLabel;
13084
13113
  return React__default.createElement(React__default.Fragment, {
13085
13114
  key: index
13086
13115
  }, React__default.createElement(OptionContent, null, React__default.createElement(Option, {
13087
13116
  onClick: onClick,
13088
- disabled: disabled,
13089
- border: option.border
13090
- }, React__default.createElement("div", null, React__default.createElement(LabelComponent, Object.assign({}, option))), caret ? React__default.createElement(Icon, {
13117
+ "$disabled": disabled,
13118
+ "$border": option.border,
13119
+ "$highlighted": index === highlight
13120
+ }, React__default.createElement("div", null, React__default.createElement(LabelComponent, Object.assign({}, option, {
13121
+ disabled: disabled
13122
+ }))), caret ? React__default.createElement(Icon, {
13091
13123
  type: 'semantic',
13092
13124
  icon: 'caret right',
13093
13125
  width: '14px'
@@ -13258,7 +13290,7 @@ var Indicator = function Indicator(props) {
13258
13290
  }, props)));
13259
13291
  };
13260
13292
 
13261
- var _templateObject$e, _templateObject2$c, _templateObject3$b, _templateObject4$8, _templateObject5$7, _templateObject6$6, _templateObject7$6, _templateObject8$5, _templateObject9$5, _templateObject10$5, _templateObject11$3;
13293
+ var _templateObject$e, _templateObject2$c, _templateObject3$b, _templateObject4$8, _templateObject5$7, _templateObject6$6, _templateObject7$6, _templateObject8$5, _templateObject9$5, _templateObject10$5, _templateObject11$4;
13262
13294
  var Footer = styled.div(_templateObject$e || (_templateObject$e = _taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n\n > button:last-child {\n margin-left: auto;\n }\n"])));
13263
13295
  var WeekContainer = styled.div(_templateObject2$c || (_templateObject2$c = _taggedTemplateLiteralLoose(["\n width: 100%;\n display: flex;\n\n :not(:first-child) {\n border-top: 1px solid ", ";\n }\n\n > * {\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n width: 32px;\n height: 32px;\n\n color: ", ";\n box-shadow: none;\n\n display: flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n\n border: 1px solid transparent;\n :not(:last-child) {\n border-right-color: ", ";\n }\n }\n"])), function (_ref) {
13264
13296
  var theme = _ref.theme;
@@ -13322,7 +13354,7 @@ var DayContainer = styled.button(_templateObject4$8 || (_templateObject4$8 = _ta
13322
13354
  });
13323
13355
  var DayIndicator = styled(Indicator).attrs({
13324
13356
  size: 'mini'
13325
- })(_templateObject11$3 || (_templateObject11$3 = _taggedTemplateLiteralLoose(["\n position: absolute;\n bottom: calc(", " - 1px);\n left: calc(50% - (", " / 2) + 1px);\n"])), sizes.mini, sizes.mini);
13357
+ })(_templateObject11$4 || (_templateObject11$4 = _taggedTemplateLiteralLoose(["\n position: absolute;\n bottom: calc(", " - 1px);\n left: calc(50% - (", " / 2) + 1px);\n"])), sizes.mini, sizes.mini);
13326
13358
 
13327
13359
  var getCalendar = function getCalendar(d) {
13328
13360
  var date = new Date(d.getTime());
@@ -14600,15 +14632,99 @@ var Date$1 = React__default.forwardRef(function (props, ref) {
14600
14632
  });
14601
14633
  Date$1.displayName = 'Date';
14602
14634
 
14635
+ var _templateObject$l, _templateObject2$f, _templateObject3$d, _templateObject4$a;
14636
+ var RelativeContainer$2 = styled.div(_templateObject$l || (_templateObject$l = _taggedTemplateLiteralLoose(["\n position: relative;\n ", ";\n"])), function (_ref) {
14637
+ var width = _ref.width;
14638
+ return !width ? null : css(_templateObject2$f || (_templateObject2$f = _taggedTemplateLiteralLoose(["\n width: ", ";\n "])), width);
14639
+ });
14640
+ var EmptyContentContainer = styled.div(_templateObject3$d || (_templateObject3$d = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: center;\n padding: ", ";\n"])), function (_ref2) {
14641
+ var theme = _ref2.theme;
14642
+ return theme.spacings.s3;
14643
+ });
14644
+ var HiddenInput = styled.input(_templateObject4$a || (_templateObject4$a = _taggedTemplateLiteralLoose(["\n width: 0;\n height: 0;\n border-width: 0;\n padding: 0;\n position: absolute;\n outline: none;\n"])));
14645
+
14646
+ var isAvailable = function isAvailable(index, option, rules) {
14647
+ return !option.disabled && !(rules || []).some(function (rule) {
14648
+ return rule(index, option) !== true;
14649
+ });
14650
+ };
14651
+
14652
+ var useNavigation = function useNavigation(props) {
14653
+ var _props$highlight = props.highlight,
14654
+ highlight = _props$highlight[0],
14655
+ setHighlight = _props$highlight[1],
14656
+ options = props.options,
14657
+ onSelectHighlight = props.onSelectHighlight,
14658
+ rules = props.rules;
14659
+ var onKeyDown = useCallback(function (e) {
14660
+ if (e.key === 'ArrowDown') {
14661
+ e.preventDefault();
14662
+
14663
+ var getNext = function getNext(index, current) {
14664
+ var option = options[index];
14665
+ if (!option) return current;
14666
+
14667
+ if (isAvailable(index, option, rules)) {
14668
+ return index;
14669
+ }
14670
+
14671
+ return getNext(index + 1, current);
14672
+ };
14673
+
14674
+ setHighlight(function (prev) {
14675
+ return getNext(prev + 1, prev);
14676
+ });
14677
+ } else if (e.key === 'ArrowUp') {
14678
+ e.preventDefault();
14679
+
14680
+ var getPrev = function getPrev(index, current) {
14681
+ var option = options[index];
14682
+ if (!option) return current;
14683
+
14684
+ if (isAvailable(index, option, rules)) {
14685
+ return index;
14686
+ }
14687
+
14688
+ return getPrev(index - 1, current);
14689
+ };
14690
+
14691
+ setHighlight(function (prev) {
14692
+ return getPrev(prev - 1, prev);
14693
+ });
14694
+ } else if (e.key === 'Enter') {
14695
+ e.preventDefault();
14696
+ var option = options[highlight];
14697
+
14698
+ if (option) {
14699
+ onSelectHighlight(highlight, option);
14700
+ }
14701
+ }
14702
+ }, [highlight, options, rules]);
14703
+
14704
+ var onFocus = function onFocus() {
14705
+ setHighlight(0);
14706
+ };
14707
+
14708
+ var onBlur = function onBlur() {
14709
+ setHighlight(-1);
14710
+ };
14711
+
14712
+ return {
14713
+ onKeyDown: onKeyDown,
14714
+ onFocus: onFocus,
14715
+ onBlur: onBlur
14716
+ };
14717
+ };
14718
+
14603
14719
  var Provider$1 = React__default.createContext({});
14604
14720
  var useContext$1 = function useContext() {
14605
14721
  return React__default.useContext(Provider$1);
14606
14722
  };
14607
14723
 
14608
- var _templateObject$l, _templateObject2$f;
14609
- var HeaderContainer = styled.div(_templateObject$l || (_templateObject$l = _taggedTemplateLiteralLoose(["\n ", "\n"])), function (_ref) {
14724
+ var _templateObject$m, _templateObject2$g;
14725
+ var HeaderContainer = styled.div(_templateObject$m || (_templateObject$m = _taggedTemplateLiteralLoose(["\n ", "\n"])), function (_ref) {
14610
14726
  var theme = _ref.theme;
14611
- return css(_templateObject2$f || (_templateObject2$f = _taggedTemplateLiteralLoose(["\n padding: ", " 0 ", " ", ";\n "])), theme.spacings.s3, theme.spacings.s1, theme.spacings.s3);
14727
+ return css(_templateObject2$g || (_templateObject2$g = _taggedTemplateLiteralLoose(["\n padding: ", " 0 ", " ", ";\n "])), theme.spacings.s3, theme.spacings.s1, theme.spacings.s3);
14612
14728
  });
14613
14729
 
14614
14730
  var Header$1 = function Header() {
@@ -14618,66 +14734,40 @@ var Header$1 = function Header() {
14618
14734
  return React__default.createElement(React__default.Fragment, null);
14619
14735
  }
14620
14736
 
14621
- var _context$search = context.search,
14622
- search = _context$search[0],
14623
- _context$searchInput = context.searchInput,
14737
+ var _context$searchInput = context.searchInput,
14624
14738
  searchInput = _context$searchInput[0],
14625
- setSearchInput = _context$searchInput[1],
14626
- onClearSearch = context.onClearSearch,
14627
- onSearch = context.onSearch,
14628
- loading = context.loading;
14739
+ setSearchInput = _context$searchInput[1];
14629
14740
  return React__default.createElement(HeaderContainer, null, React__default.createElement(Input$1, {
14630
14741
  type: 'search',
14631
14742
  placeholder: 'Pesquisa',
14632
14743
  setValue: setSearchInput,
14633
14744
  value: searchInput,
14634
- onPressEnter: onSearch,
14635
- clearable: searchInput !== '' && searchInput === search ? onClearSearch : undefined,
14636
14745
  icon: {
14637
14746
  icon: {
14638
14747
  type: 'feather',
14639
- icon: 'search',
14640
- onClick: onSearch
14748
+ icon: 'search'
14641
14749
  }
14642
- },
14643
- loading: loading
14750
+ }
14644
14751
  }));
14645
14752
  };
14646
14753
 
14647
- var getOptions = function getOptions(setValue, options, selected) {
14754
+ var getOptions = function getOptions(options, selected) {
14648
14755
  return options.map(function (option) {
14649
- var value = option.value,
14650
- onClick = option.onClick,
14651
- rules = option.rules,
14652
- disabled = option.disabled;
14653
14756
  var isSelected = option.value === (selected === null || selected === void 0 ? void 0 : selected.value);
14654
-
14655
- var data = _extends({}, option.data, {
14656
- selected: isSelected,
14657
- value: value
14658
- });
14659
-
14660
- var LabelComponent = option.label;
14757
+ var data = {
14758
+ data: option.data,
14759
+ value: option.value
14760
+ };
14661
14761
  var parsed = {
14662
- label: typeof LabelComponent !== 'function' ? LabelComponent : function (_ref) {
14663
- var disabled = _ref.disabled;
14664
- return React__default.createElement(LabelComponent, Object.assign({}, {
14665
- value: value,
14666
- data: data,
14667
- disabled: disabled
14668
- }));
14669
- },
14670
- onClick: onClick || function () {
14671
- setValue(isSelected ? '' : value, option.data);
14672
- },
14673
- disabled: disabled,
14674
- rules: rules,
14675
14762
  border: {
14676
14763
  left: {
14677
14764
  color: isSelected ? 'blue' : 'transparent'
14678
14765
  }
14679
14766
  },
14680
- data: data
14767
+ data: data,
14768
+ label: option.label,
14769
+ disabled: option.disabled,
14770
+ keepOpen: true
14681
14771
  };
14682
14772
  return parsed;
14683
14773
  });
@@ -14693,17 +14783,17 @@ var getSelected = function getSelected(value, options) {
14693
14783
  };
14694
14784
 
14695
14785
  var getInputContent = function getInputContent(props, selectedOption) {
14696
- if (typeof selectedOption.label !== 'function') return selectedOption.label;
14697
- var LabelComponent = selectedOption.label;
14698
- return React__default.createElement(LabelComponent, {
14699
- data: _extends({}, selectedOption.data),
14700
- value: selectedOption.value,
14786
+ if (!props.optionLabel) return selectedOption.label;
14787
+ var LabelComponent = props.optionLabel;
14788
+ return React__default.createElement(LabelComponent, Object.assign({}, selectedOption, {
14701
14789
  disabled: props.disabled || props.loading,
14702
14790
  mode: 'placeholder'
14703
- });
14791
+ }));
14704
14792
  };
14705
14793
 
14706
- var useSelect = function useSelect(props, _ref2) {
14794
+ var useSelect = function useSelect(props, _ref, _ref2, setOpen) {
14795
+ var highlight = _ref[0],
14796
+ setHighlight = _ref[1];
14707
14797
  var options = _ref2[0],
14708
14798
  setOptions = _ref2[1];
14709
14799
 
@@ -14711,11 +14801,22 @@ var useSelect = function useSelect(props, _ref2) {
14711
14801
  selectedOption = _ref3[0],
14712
14802
  value = _ref3[1];
14713
14803
 
14714
- var parsedOptions = getOptions(props.setValue, options, selectedOption);
14804
+ var parsedOptions = getOptions(options, selectedOption);
14715
14805
 
14716
14806
  var onReset = function onReset() {};
14717
14807
 
14718
14808
  var inputContent = selectedOption ? getInputContent(props, selectedOption) : props.value;
14809
+
14810
+ var onSelect = function onSelect(index, option) {
14811
+ if (!isAvailable(index, option, props.rules)) {
14812
+ return;
14813
+ }
14814
+
14815
+ var isSelected = option.value === (selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.value);
14816
+ props.setValue(isSelected ? '' : option.value, option.data);
14817
+ setOpen(false);
14818
+ };
14819
+
14719
14820
  var parsed = {
14720
14821
  parsedOptions: parsedOptions,
14721
14822
  options: [options, setOptions],
@@ -14723,8 +14824,16 @@ var useSelect = function useSelect(props, _ref2) {
14723
14824
  onReset: onReset,
14724
14825
  menu: {
14725
14826
  itemSpacing: 's3',
14726
- before: React__default.createElement(Header$1, null),
14727
- maxHeight: props.maxHeight || '180px'
14827
+ before: React__default.createElement(React__default.Fragment, null, React__default.createElement(Header$1, null), React__default.createElement(HiddenInput, Object.assign({}, useNavigation({
14828
+ highlight: [highlight, setHighlight],
14829
+ options: options,
14830
+ onSelectHighlight: onSelect,
14831
+ rules: props.rules
14832
+ })))),
14833
+ maxHeight: props.maxHeight || props.search ? '238px' : '180px',
14834
+ onClickOption: function onClickOption(index, option) {
14835
+ onSelect(index, option);
14836
+ }
14728
14837
  },
14729
14838
  getContext: function getContext(base, children) {
14730
14839
  return React__default.createElement(Provider$1.Provider, {
@@ -14791,13 +14900,13 @@ var Footer$1 = function Footer() {
14791
14900
  });
14792
14901
  };
14793
14902
 
14794
- var _templateObject$m, _templateObject2$g, _templateObject3$d, _templateObject4$a;
14795
- var Link = styled.div(_templateObject$m || (_templateObject$m = _taggedTemplateLiteralLoose(["\n ", "\n\n color: ", ";\n\n ", "\n"])), function (_ref) {
14903
+ var _templateObject$n, _templateObject2$h, _templateObject3$e, _templateObject4$b;
14904
+ var Link = styled.div(_templateObject$n || (_templateObject$n = _taggedTemplateLiteralLoose(["\n ", "\n\n color: ", ";\n\n ", "\n"])), function (_ref) {
14796
14905
  var size = _ref.size;
14797
14906
  var _sizes = sizes$1[size || 'small'],
14798
14907
  fontSize = _sizes.fontSize,
14799
14908
  lineHeight = _sizes.lineHeight;
14800
- return css(_templateObject2$g || (_templateObject2$g = _taggedTemplateLiteralLoose(["\n font-size: ", ";\n line-height: ", ";\n "])), fontSize, lineHeight);
14909
+ return css(_templateObject2$h || (_templateObject2$h = _taggedTemplateLiteralLoose(["\n font-size: ", ";\n line-height: ", ";\n "])), fontSize, lineHeight);
14801
14910
  }, function (_ref2) {
14802
14911
  var colorSetting = _ref2.colorSetting,
14803
14912
  theme = _ref2.theme;
@@ -14810,17 +14919,17 @@ var Link = styled.div(_templateObject$m || (_templateObject$m = _taggedTemplateL
14810
14919
  disabled = _ref3.disabled,
14811
14920
  theme = _ref3.theme,
14812
14921
  colorSetting = _ref3.colorSetting;
14813
- return disabled ? css(_templateObject3$d || (_templateObject3$d = _taggedTemplateLiteralLoose(["\n opacity: 0.5;\n "]))) : onClick ? css(_templateObject4$a || (_templateObject4$a = _taggedTemplateLiteralLoose(["\n cursor: pointer;\n :hover {\n color: ", ";\n }\n "])), theme.colors[_extends({
14922
+ return disabled ? css(_templateObject3$e || (_templateObject3$e = _taggedTemplateLiteralLoose(["\n opacity: 0.5;\n "]))) : onClick ? css(_templateObject4$b || (_templateObject4$b = _taggedTemplateLiteralLoose(["\n cursor: pointer;\n :hover {\n color: ", ";\n }\n "])), theme.colors[_extends({
14814
14923
  hover: 'blue'
14815
14924
  }, colorSetting && typeof colorSetting !== 'string' ? colorSetting : {}).hover]) : null;
14816
14925
  });
14817
14926
 
14818
- var _templateObject$n, _templateObject2$h, _templateObject3$e;
14819
- var HeaderContainer$1 = styled.div(_templateObject$n || (_templateObject$n = _taggedTemplateLiteralLoose(["\n ", "\n"])), function (_ref) {
14927
+ var _templateObject$o, _templateObject2$i, _templateObject3$f;
14928
+ var HeaderContainer$1 = styled.div(_templateObject$o || (_templateObject$o = _taggedTemplateLiteralLoose(["\n ", "\n"])), function (_ref) {
14820
14929
  var theme = _ref.theme;
14821
- return css(_templateObject2$h || (_templateObject2$h = _taggedTemplateLiteralLoose(["\n padding: ", " 0 ", " ", ";\n "])), theme.spacings.s3, theme.spacings.s1, theme.spacings.s3);
14930
+ return css(_templateObject2$i || (_templateObject2$i = _taggedTemplateLiteralLoose(["\n padding: ", " 0 ", " ", ";\n "])), theme.spacings.s3, theme.spacings.s1, theme.spacings.s3);
14822
14931
  });
14823
- var SelectAllContainer = styled.div(_templateObject3$e || (_templateObject3$e = _taggedTemplateLiteralLoose(["\n margin-bottom: ", ";\n display: flex;\n justify-content: space-between;\n"])), function (_ref2) {
14932
+ var SelectAllContainer = styled.div(_templateObject3$f || (_templateObject3$f = _taggedTemplateLiteralLoose(["\n margin-bottom: ", ";\n display: flex;\n justify-content: space-between;\n"])), function (_ref2) {
14824
14933
  var theme = _ref2.theme;
14825
14934
  return theme.spacings.s1;
14826
14935
  });
@@ -14835,14 +14944,9 @@ var Header$2 = function Header() {
14835
14944
  var _context$checked = context.checked,
14836
14945
  checked = _context$checked[0],
14837
14946
  setChecked = _context$checked[1],
14838
- _context$search = context.search,
14839
- search = _context$search[0],
14840
14947
  _context$searchInput = context.searchInput,
14841
14948
  searchInput = _context$searchInput[0],
14842
14949
  setSearchInput = _context$searchInput[1],
14843
- onSearch = context.onSearch,
14844
- onClearSearch = context.onClearSearch,
14845
- loading = context.loading,
14846
14950
  options = context.options;
14847
14951
 
14848
14952
  var onClick = function onClick() {
@@ -14864,16 +14968,12 @@ var Header$2 = function Header() {
14864
14968
  placeholder: 'Pesquisa',
14865
14969
  setValue: setSearchInput,
14866
14970
  value: searchInput,
14867
- onPressEnter: onSearch,
14868
- clearable: searchInput !== '' && searchInput === search ? onClearSearch : undefined,
14869
14971
  icon: {
14870
14972
  icon: {
14871
14973
  type: 'feather',
14872
- icon: 'search',
14873
- onClick: onSearch
14974
+ icon: 'search'
14874
14975
  }
14875
- },
14876
- loading: loading
14976
+ }
14877
14977
  }));
14878
14978
  };
14879
14979
 
@@ -14891,7 +14991,7 @@ var Label$2 = function Label(props) {
14891
14991
  checked: checked.findIndex(function (e) {
14892
14992
  return e.value === value;
14893
14993
  }) !== -1,
14894
- label: typeof LabelComponent !== 'function' ? LabelComponent : React__default.createElement(LabelComponent, Object.assign({}, props.option)),
14994
+ label: LabelComponent ? React__default.createElement(LabelComponent, Object.assign({}, props.option)) : props.option.label,
14895
14995
  disabled: disabled,
14896
14996
  onChange: function onChange(event) {
14897
14997
  var isChecked = event.target.checked;
@@ -14919,32 +15019,21 @@ var Label$2 = function Label(props) {
14919
15019
  right: 's3',
14920
15020
  bottom: 's3'
14921
15021
  },
14922
- width: '100%'
15022
+ width: '100%',
15023
+ tabIndex: -1
14923
15024
  });
14924
15025
  };
14925
15026
 
14926
- var getOptions$1 = function getOptions(options, value) {
15027
+ var getOptions$1 = function getOptions(options) {
14927
15028
  return options.map(function (option) {
14928
- var _label = option.label,
14929
- onClick = option.onClick;
14930
15029
  var data = {
14931
15030
  data: option.data,
14932
15031
  value: option.value
14933
15032
  };
14934
15033
  var parsed = {
14935
- label: function label(option) {
14936
- return React__default.createElement(Label$2, {
14937
- option: _extends({}, data, {
14938
- disabled: option.disabled
14939
- }),
14940
- label: _label,
14941
- value: value
14942
- });
14943
- },
14944
- onClick: onClick,
14945
15034
  data: data,
15035
+ label: option.label,
14946
15036
  disabled: option.disabled,
14947
- rules: option.rules,
14948
15037
  keepOpen: true
14949
15038
  };
14950
15039
  return parsed;
@@ -14966,22 +15055,47 @@ var parseValue = function parseValue(value) {
14966
15055
  return parsed;
14967
15056
  };
14968
15057
 
14969
- var useSelectMultiple = function useSelectMultiple(props, _ref) {
14970
- var options = _ref[0],
14971
- setOptions = _ref[1];
15058
+ var useSelectMultiple = function useSelectMultiple(props, _ref, _ref2) {
15059
+ var highlight = _ref[0],
15060
+ setHighlight = _ref[1];
15061
+ var options = _ref2[0],
15062
+ setOptions = _ref2[1];
14972
15063
  var initial = parseValue(props.value);
14973
15064
 
14974
15065
  var _useState = useState([].concat(initial)),
14975
15066
  checked = _useState[0],
14976
15067
  setChecked = _useState[1];
14977
15068
 
14978
- var parsedOptions = getOptions$1(options, initial);
15069
+ var parsedOptions = getOptions$1(options);
14979
15070
  var inputContent = getInputContent$1(props.value);
14980
15071
 
14981
15072
  var onReset = function onReset() {
14982
15073
  setChecked([].concat(initial));
14983
15074
  };
14984
15075
 
15076
+ var onSelectHighlight = function onSelectHighlight(index, option) {
15077
+ if (!isAvailable(index, option, props.rules)) {
15078
+ return;
15079
+ }
15080
+
15081
+ setChecked(function (prev) {
15082
+ var index = prev.findIndex(function (e) {
15083
+ return e.value === option.value;
15084
+ });
15085
+
15086
+ if (index < 0) {
15087
+ return [].concat(prev, [{
15088
+ data: option.data,
15089
+ value: option.value
15090
+ }]);
15091
+ }
15092
+
15093
+ var news = [].concat(prev);
15094
+ news.splice(index, 1);
15095
+ return news;
15096
+ });
15097
+ };
15098
+
14985
15099
  var returnData = {
14986
15100
  parsedOptions: parsedOptions,
14987
15101
  options: [options, setOptions],
@@ -14989,12 +15103,27 @@ var useSelectMultiple = function useSelectMultiple(props, _ref) {
14989
15103
  onReset: onReset,
14990
15104
  menu: {
14991
15105
  itemSpacing: undefined,
14992
- before: React__default.createElement(Header$2, null),
15106
+ before: React__default.createElement(React__default.Fragment, null, React__default.createElement(Header$2, null), React__default.createElement(HiddenInput, Object.assign({}, useNavigation({
15107
+ highlight: [highlight, setHighlight],
15108
+ options: options,
15109
+ onSelectHighlight: onSelectHighlight,
15110
+ rules: props.rules
15111
+ })))),
14993
15112
  after: {
14994
15113
  fluid: true,
14995
15114
  children: React__default.createElement(Footer$1, null)
14996
15115
  },
14997
- maxHeight: props.maxHeight || (props.selectAll ? '269px' : '224px')
15116
+ maxHeight: props.maxHeight || (props.selectAll ? '269px' : '224px'),
15117
+ label: function label(option) {
15118
+ return React__default.createElement(Label$2, {
15119
+ option: _extends({}, option, {
15120
+ value: option.data.value,
15121
+ data: option.data.data
15122
+ }),
15123
+ label: props.optionLabel,
15124
+ value: initial
15125
+ });
15126
+ }
14998
15127
  },
14999
15128
  getContext: function getContext(base, children) {
15000
15129
  return React__default.createElement(Provider$2.Provider, {
@@ -15037,16 +15166,6 @@ var useSelectMultiple = function useSelectMultiple(props, _ref) {
15037
15166
  return returnData;
15038
15167
  };
15039
15168
 
15040
- var _templateObject$o, _templateObject2$i, _templateObject3$f;
15041
- var RelativeContainer$2 = styled.div(_templateObject$o || (_templateObject$o = _taggedTemplateLiteralLoose(["\n position: relative;\n ", ";\n"])), function (_ref) {
15042
- var width = _ref.width;
15043
- return !width ? null : css(_templateObject2$i || (_templateObject2$i = _taggedTemplateLiteralLoose(["\n width: ", ";\n "])), width);
15044
- });
15045
- var EmptyContentContainer = styled.div(_templateObject3$f || (_templateObject3$f = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: center;\n padding: ", ";\n"])), function (_ref2) {
15046
- var theme = _ref2.theme;
15047
- return theme.spacings.s3;
15048
- });
15049
-
15050
15169
  var Select = React__default.forwardRef(function (props, ref) {
15051
15170
  var position = props.position,
15052
15171
  loader = props.loader,
@@ -15056,38 +15175,44 @@ var Select = React__default.forwardRef(function (props, ref) {
15056
15175
  options = _useState[0],
15057
15176
  setOptions = _useState[1];
15058
15177
 
15059
- var _ref = props.type === 'select-multiple' ? useSelectMultiple(props, [options, setOptions]) : useSelect(props, [options, setOptions]),
15060
- parsedOptions = _ref.parsedOptions,
15061
- inputContent = _ref.inputContent,
15062
- onReset = _ref.onReset,
15063
- menuProps = _ref.menu,
15064
- getContext = _ref.getContext,
15065
- onClear = _ref.onClear,
15066
- dirty = _ref.dirty;
15067
-
15068
- var _useState2 = useState(true),
15069
- _loading = _useState2[0],
15070
- setLoading = _useState2[1];
15178
+ var _useState2 = useState(-1),
15179
+ highlight = _useState2[0],
15180
+ setHighlight = _useState2[1];
15071
15181
 
15072
- var _useState3 = useState(''),
15073
- search = _useState3[0],
15074
- _setSearch = _useState3[1];
15182
+ var _useState3 = useState(false),
15183
+ open = _useState3[0],
15184
+ setOpen = _useState3[1];
15185
+
15186
+ var hook = props.type === 'select-multiple' ? useSelectMultiple : useSelect;
15187
+
15188
+ var _hook = hook(props, [highlight, setHighlight], [options, setOptions], setOpen),
15189
+ parsedOptions = _hook.parsedOptions,
15190
+ inputContent = _hook.inputContent,
15191
+ onReset = _hook.onReset,
15192
+ menuProps = _hook.menu,
15193
+ getContext = _hook.getContext,
15194
+ onClear = _hook.onClear,
15195
+ dirty = _hook.dirty;
15075
15196
 
15076
- var _useState4 = useState(''),
15077
- searchInput = _useState4[0],
15078
- setSearchInput = _useState4[1];
15197
+ var _useState4 = useState(true),
15198
+ _loading = _useState4[0],
15199
+ setLoading = _useState4[1];
15079
15200
 
15080
- var _useState5 = useState(1),
15081
- page = _useState5[0],
15082
- setPage = _useState5[1];
15201
+ var _useState5 = useState(''),
15202
+ search = _useState5[0],
15203
+ _setSearch = _useState5[1];
15083
15204
 
15084
- var _useState6 = useState(false),
15085
- lastPage = _useState6[0],
15086
- setLastPage = _useState6[1];
15205
+ var _useState6 = useState(''),
15206
+ searchInput = _useState6[0],
15207
+ setSearchInput = _useState6[1];
15087
15208
 
15088
- var _useState7 = useState(false),
15089
- open = _useState7[0],
15090
- setOpen = _useState7[1];
15209
+ var _useState7 = useState(1),
15210
+ page = _useState7[0],
15211
+ setPage = _useState7[1];
15212
+
15213
+ var _useState8 = useState(false),
15214
+ lastPage = _useState8[0],
15215
+ setLastPage = _useState8[1];
15091
15216
 
15092
15217
  var loading = props.loading || _loading;
15093
15218
 
@@ -15097,18 +15222,18 @@ var Select = React__default.forwardRef(function (props, ref) {
15097
15222
  setPage(1);
15098
15223
  };
15099
15224
 
15100
- var inputProps = filterObject(props, ['type', 'onScrollEnd', 'position', 'value', 'onClear', 'placeholder', 'initialLoader']);
15225
+ var inputProps = filterObject(props, ['type', 'onScrollEnd', 'position', 'value', 'onClear', 'placeholder', 'initialLoader', 'onClickOption', 'rules', 'onScrollEnd', 'position', 'center', 'maxHeight', 'emptyContent', 'optionLabel']);
15101
15226
 
15102
15227
  var _onScrollEnd = props.onScrollEnd || function () {};
15103
15228
 
15104
- var onScrollEnd = function onScrollEnd() {
15229
+ var onScrollEnd = function onScrollEnd(e) {
15105
15230
  if (!lastPage && !loading) {
15106
15231
  setPage(function (prev) {
15107
15232
  return prev + 1;
15108
15233
  });
15109
15234
  }
15110
15235
 
15111
- _onScrollEnd();
15236
+ _onScrollEnd(e);
15112
15237
  };
15113
15238
 
15114
15239
  var onSubmit = useCallback(function () {
@@ -15117,9 +15242,9 @@ var Select = React__default.forwardRef(function (props, ref) {
15117
15242
  return Promise.resolve(loader(search, page)).then(function (optionsResult) {
15118
15243
  if (optionsResult === null) return;
15119
15244
 
15120
- var _ref2 = Array.isArray(optionsResult) ? [optionsResult, true] : [optionsResult.options, optionsResult.lastPage],
15121
- options = _ref2[0],
15122
- lastPage = _ref2[1];
15245
+ var _ref = Array.isArray(optionsResult) ? [optionsResult, true] : [optionsResult.options, optionsResult.lastPage],
15246
+ options = _ref[0],
15247
+ lastPage = _ref[1];
15123
15248
 
15124
15249
  var initial = initialLoader ? initialLoader() : [];
15125
15250
  var filtered = initialLoader ? options.filter(function (x) {
@@ -15158,15 +15283,17 @@ var Select = React__default.forwardRef(function (props, ref) {
15158
15283
  useEffect(function () {
15159
15284
  setSearchInput(search);
15160
15285
  }, [search]);
15161
-
15162
- var onSearch = function onSearch() {
15163
- setSearch(searchInput);
15164
- };
15165
-
15166
- var onClearSearch = function onClearSearch() {
15167
- setSearchInput('');
15168
- setSearch('');
15169
- };
15286
+ useEffect(function () {
15287
+ if (page === 1) setHighlight(-1);
15288
+ }, [page]);
15289
+ useEffect(function () {
15290
+ var timeoutId = setTimeout(function () {
15291
+ return setSearch(searchInput);
15292
+ }, 1000);
15293
+ return function () {
15294
+ return clearTimeout(timeoutId);
15295
+ };
15296
+ }, [searchInput]);
15170
15297
 
15171
15298
  var onClick = function onClick() {
15172
15299
  setOpen(function (prev) {
@@ -15177,11 +15304,7 @@ var Select = React__default.forwardRef(function (props, ref) {
15177
15304
  var isEmpty = (typeof props.value === 'string' || Array.isArray(props.value)) && props.value.length === 0;
15178
15305
  return getContext({
15179
15306
  setOpen: setOpen,
15180
- search: [search, setSearch],
15181
- searchInput: [searchInput, setSearchInput],
15182
- onSearch: onSearch,
15183
- onClearSearch: onClearSearch,
15184
- loading: loading
15307
+ searchInput: [searchInput, setSearchInput]
15185
15308
  }, React__default.createElement(RelativeContainer$2, {
15186
15309
  ref: useOnClickOut(function () {
15187
15310
  return setOpen(false);
@@ -15192,6 +15315,17 @@ var Select = React__default.forwardRef(function (props, ref) {
15192
15315
  htmlReadOnly: true,
15193
15316
  onClick: onClick,
15194
15317
  loading: loading,
15318
+ onKeyDown: function onKeyDown(e) {
15319
+ if (e.key === ' ') {
15320
+ setOpen(function (prev) {
15321
+ return !prev;
15322
+ });
15323
+ } else if (['ArrowDown', 'ArrowUp'].includes(e.key)) {
15324
+ setOpen(true);
15325
+ }
15326
+
15327
+ if (props.onKeyDown) props.onKeyDown(e);
15328
+ },
15195
15329
  dirty: dirty,
15196
15330
  icon: {
15197
15331
  icon: {
@@ -15208,14 +15342,21 @@ var Select = React__default.forwardRef(function (props, ref) {
15208
15342
  } : {
15209
15343
  clearable: onClear
15210
15344
  }, {
15211
- children: loading ? '' : inputContent
15345
+ children: inputContent
15212
15346
  })), React__default.createElement(Menu, Object.assign({}, menuProps, {
15347
+ rules: (props.rules || []).map(function (rule) {
15348
+ return function (index, data) {
15349
+ return rule(index, data.data);
15350
+ };
15351
+ }),
15352
+ highlight: highlight,
15213
15353
  open: open,
15214
15354
  close: function close() {
15215
15355
  return setOpen(false);
15216
15356
  },
15217
15357
  options: parsedOptions,
15218
15358
  onScrollEnd: onScrollEnd,
15359
+ scrollTabIndex: -1,
15219
15360
  width: props.inputWidth || '100%',
15220
15361
  bordered: true,
15221
15362
  position: position,
@@ -15555,15 +15696,7 @@ var Component = React__default.forwardRef(function (props, ref) {
15555
15696
 
15556
15697
  var options = Object.keys(countries).map(function (iso) {
15557
15698
  return {
15558
- label: function label(option) {
15559
- var country = option.data;
15560
- return React__default.createElement(Label$3, null, React__default.createElement(Flag, {
15561
- iso: iso
15562
- }), country.name, React__default.createElement("span", null, "+", country.ddi));
15563
- },
15564
- onClick: function onClick() {
15565
- setCountry(countries[iso]);
15566
- },
15699
+ label: country.name,
15567
15700
  data: countries[iso]
15568
15701
  };
15569
15702
  });
@@ -15629,6 +15762,16 @@ var Component = React__default.forwardRef(function (props, ref) {
15629
15762
  return setOpen(false);
15630
15763
  },
15631
15764
  options: options,
15765
+ onClickOption: function onClickOption(_index, _ref) {
15766
+ var iso = _ref.iso;
15767
+ return setCountry(countries[iso]);
15768
+ },
15769
+ label: function label(option) {
15770
+ var country = option.data;
15771
+ return React__default.createElement(Label$3, null, React__default.createElement(Flag, {
15772
+ iso: country.iso
15773
+ }), country.name, React__default.createElement("span", null, "+", country.ddi));
15774
+ },
15632
15775
  width: '100%',
15633
15776
  maxHeight: '165px',
15634
15777
  bordered: true,
@@ -15648,7 +15791,7 @@ var Phone = Object.assign(Component, {
15648
15791
  getPhoneDetails: getPhoneDetails
15649
15792
  });
15650
15793
 
15651
- var _templateObject$r, _templateObject2$l, _templateObject3$h, _templateObject4$b, _templateObject5$9, _templateObject6$8, _templateObject7$8, _templateObject8$7, _templateObject9$7;
15794
+ var _templateObject$r, _templateObject2$l, _templateObject3$h, _templateObject4$c, _templateObject5$9, _templateObject6$8, _templateObject7$8, _templateObject8$7, _templateObject9$7;
15652
15795
  var RelativeContainer$4 = styled.div(_templateObject$r || (_templateObject$r = _taggedTemplateLiteralLoose(["\n position: relative;\n\n input {\n color: transparent;\n }\n"])));
15653
15796
  var LabelContainer$2 = styled.div(_templateObject2$l || (_templateObject2$l = _taggedTemplateLiteralLoose(["\n ", "\n line-height: ", ";\n"])), function (_ref) {
15654
15797
  var theme = _ref.theme;
@@ -15664,7 +15807,7 @@ var Container$5 = styled.div(_templateObject3$h || (_templateObject3$h = _tagged
15664
15807
  var borderwidth = 1;
15665
15808
 
15666
15809
  if (paddingless) {
15667
- return css(_templateObject4$b || (_templateObject4$b = _taggedTemplateLiteralLoose(["\n bottom: ", "px;\n left: ", "px;\n width: calc(100% - ", "px - ", ");\n height: calc(17px + ", "px);\n "])), borderwidth, borderwidth, borderwidth * 2, iconWidth, borderwidth * 2);
15810
+ return css(_templateObject4$c || (_templateObject4$c = _taggedTemplateLiteralLoose(["\n bottom: ", "px;\n left: ", "px;\n width: calc(100% - ", "px - ", ");\n height: calc(17px + ", "px);\n "])), borderwidth, borderwidth, borderwidth * 2, iconWidth, borderwidth * 2);
15668
15811
  }
15669
15812
 
15670
15813
  return css(_templateObject5$9 || (_templateObject5$9 = _taggedTemplateLiteralLoose(["\n bottom: ", "px;\n left: ", "px;\n width: calc(\n 100% - ", "px - ", " - ", "\n );\n height: calc(31px + ", "px);\n padding: ", " 0 ", " ", ";\n "])), borderwidth, borderwidth, borderwidth * 2, iconWidth, theme.spacings.s3, borderwidth * 2, theme.spacings.s2, theme.spacings.s2, theme.spacings.s3);
@@ -15798,7 +15941,7 @@ var DatePicker = React__default.forwardRef(function (props, ref) {
15798
15941
  });
15799
15942
  DatePicker.displayName = 'DatePicker';
15800
15943
 
15801
- var _templateObject$s, _templateObject2$m, _templateObject3$i, _templateObject4$c, _templateObject5$a, _templateObject6$9, _templateObject7$9, _templateObject8$8;
15944
+ var _templateObject$s, _templateObject2$m, _templateObject3$i, _templateObject4$d, _templateObject5$a, _templateObject6$9, _templateObject7$9, _templateObject8$8;
15802
15945
  var LabelContainer$3 = styled.div(_templateObject$s || (_templateObject$s = _taggedTemplateLiteralLoose(["\n ", "\n line-height: 14px;\n display: flex;\n align-items: center;\n\n ", "\n\n ", "\n"])), function (_ref) {
15803
15946
  var theme = _ref.theme;
15804
15947
  return theme.useTypography('p');
@@ -15813,7 +15956,7 @@ var LabelContainer$3 = styled.div(_templateObject$s || (_templateObject$s = _tag
15813
15956
  if (!keepSpace || children) return;
15814
15957
  return css(_templateObject3$i || (_templateObject3$i = _taggedTemplateLiteralLoose(["\n :before {\n content: '';\n white-space: pre;\n }\n "])));
15815
15958
  });
15816
- var Label$4 = styled.label(_templateObject4$c || (_templateObject4$c = _taggedTemplateLiteralLoose(["\n display: flex;\n gap: ", ";\n position: relative;\n align-items: center;\n\n ", "\n\n ", "\n\n > input {\n position: absolute;\n height: 0%;\n width: 0%;\n opacity: 0;\n }\n\n > span {\n position: relative;\n width: 50px;\n height: calc(", " + 1px);\n background-color: ", ";\n border-radius: 20px;\n transition-property: background-color;\n transition-duration: 0.4s;\n transition-timing-function: ease-in-out;\n box-sizing: content-box;\n :before {\n content: '';\n transition-property: left;\n transition-duration: 0.4s;\n transition-timing-function: ease-in-out;\n position: absolute;\n border-width: 1px;\n border-style: solid;\n border-radius: 100%;\n left: 0;\n box-shadow: 0px 1px 3px ", ";\n width: calc(", " - 1px);\n height: calc(", " - 1px);\n background-color: ", ";\n }\n }\n\n > input:checked + span {\n :before {\n left: calc(100% - ", " - 1px);\n }\n }\n"])), function (_ref4) {
15959
+ var Label$4 = styled.label(_templateObject4$d || (_templateObject4$d = _taggedTemplateLiteralLoose(["\n display: flex;\n gap: ", ";\n position: relative;\n align-items: center;\n\n ", "\n\n ", "\n\n > input {\n position: absolute;\n height: 0%;\n width: 0%;\n opacity: 0;\n }\n\n > span {\n position: relative;\n width: 50px;\n height: calc(", " + 1px);\n background-color: ", ";\n border-radius: 20px;\n transition-property: background-color;\n transition-duration: 0.4s;\n transition-timing-function: ease-in-out;\n box-sizing: content-box;\n :before {\n content: '';\n transition-property: left;\n transition-duration: 0.4s;\n transition-timing-function: ease-in-out;\n position: absolute;\n border-width: 1px;\n border-style: solid;\n border-radius: 100%;\n left: 0;\n box-shadow: 0px 1px 3px ", ";\n width: calc(", " - 1px);\n height: calc(", " - 1px);\n background-color: ", ";\n }\n }\n\n > input:checked + span {\n :before {\n left: calc(100% - ", " - 1px);\n }\n }\n"])), function (_ref4) {
15817
15960
  var theme = _ref4.theme;
15818
15961
  return theme.spacings.s1;
15819
15962
  }, function (_ref5) {
@@ -15972,7 +16115,7 @@ var NavBar = styled.div(_templateObject$x || (_templateObject$x = _taggedTemplat
15972
16115
  return theme.colors.blue;
15973
16116
  });
15974
16117
 
15975
- var _templateObject$y, _templateObject2$q, _templateObject3$l, _templateObject4$d, _templateObject5$b;
16118
+ var _templateObject$y, _templateObject2$q, _templateObject3$l, _templateObject4$e, _templateObject5$b;
15976
16119
  var Label$5 = styled.label(_templateObject$y || (_templateObject$y = _taggedTemplateLiteralLoose(["\n ", ";\n line-height: 17px;\n\n ", ";\n box-sizing: border-box;\n display: block;\n position: relative;\n\n ", "\n\n > ", " {\n ", "\n }\n\n :not(:hover) ", " {\n height: 0;\n }\n"])), function (_ref) {
15977
16120
  var theme = _ref.theme;
15978
16121
  return theme.useTypography('p');
@@ -15988,7 +16131,7 @@ var Label$5 = styled.label(_templateObject$y || (_templateObject$y = _taggedTemp
15988
16131
  }, function (_ref3) {
15989
16132
  var disabled = _ref3.$disabled;
15990
16133
  if (!disabled) return;
15991
- return css(_templateObject4$d || (_templateObject4$d = _taggedTemplateLiteralLoose(["\n opacity: 0.5;\n "])));
16134
+ return css(_templateObject4$e || (_templateObject4$e = _taggedTemplateLiteralLoose(["\n opacity: 0.5;\n "])));
15992
16135
  }, LabelContainer$4, function (_ref4) {
15993
16136
  var required = _ref4.$required,
15994
16137
  viewMode = _ref4.$viewMode;
@@ -16291,7 +16434,7 @@ var Range = React__default.forwardRef(function (props, ref) {
16291
16434
  });
16292
16435
  Range.displayName = 'input';
16293
16436
 
16294
- var _templateObject$E, _templateObject2$t, _templateObject3$n, _templateObject4$e, _templateObject5$c, _templateObject6$a, _templateObject7$a;
16437
+ var _templateObject$E, _templateObject2$t, _templateObject3$n, _templateObject4$f, _templateObject5$c, _templateObject6$a, _templateObject7$a;
16295
16438
  var LabelContainer$5 = styled.div(_templateObject$E || (_templateObject$E = _taggedTemplateLiteralLoose(["\n ", "\n display: flex;\n align-items: center;\n"])), function (_ref) {
16296
16439
  var theme = _ref.theme;
16297
16440
  return theme.useTypography('p');
@@ -16306,7 +16449,7 @@ var Label$6 = styled.label(_templateObject2$t || (_templateObject2$t = _taggedTe
16306
16449
  return css(_templateObject3$n || (_templateObject3$n = _taggedTemplateLiteralLoose(["\n > span {\n cursor: pointer;\n }\n "])));
16307
16450
  }
16308
16451
 
16309
- return css(_templateObject4$e || (_templateObject4$e = _taggedTemplateLiteralLoose(["\n opacity: 0.5;\n "])));
16452
+ return css(_templateObject4$f || (_templateObject4$f = _taggedTemplateLiteralLoose(["\n opacity: 0.5;\n "])));
16310
16453
  }, function (_ref4) {
16311
16454
  var required = _ref4.required;
16312
16455
  if (!required) return;
@@ -16540,7 +16683,7 @@ var parse = function parse(value) {
16540
16683
  });
16541
16684
  };
16542
16685
 
16543
- var _templateObject$F, _templateObject2$u, _templateObject3$o, _templateObject4$f, _templateObject5$d, _templateObject6$b, _templateObject7$b, _templateObject8$9, _templateObject9$8, _templateObject10$7, _templateObject11$4, _templateObject12$3;
16686
+ var _templateObject$F, _templateObject2$u, _templateObject3$o, _templateObject4$g, _templateObject5$d, _templateObject6$b, _templateObject7$b, _templateObject8$9, _templateObject9$8, _templateObject10$7, _templateObject11$5, _templateObject12$3;
16544
16687
  var RelativeContainer$5 = styled.div(_templateObject$F || (_templateObject$F = _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"])));
16545
16688
  var LabelContainer$6 = styled.div(_templateObject2$u || (_templateObject2$u = _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) {
16546
16689
  var theme = _ref.theme;
@@ -16555,7 +16698,7 @@ var LabelContainer$6 = styled.div(_templateObject2$u || (_templateObject2$u = _t
16555
16698
  }, function (_ref4) {
16556
16699
  var onClick = _ref4.onClick;
16557
16700
  if (!onClick) return;
16558
- return css(_templateObject4$f || (_templateObject4$f = _taggedTemplateLiteralLoose(["\n :not(:disabled) {\n cursor: pointer;\n }\n "])));
16701
+ return css(_templateObject4$g || (_templateObject4$g = _taggedTemplateLiteralLoose(["\n :not(:disabled) {\n cursor: pointer;\n }\n "])));
16559
16702
  });
16560
16703
  var Container$6 = styled.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) {
16561
16704
  var theme = _ref5.theme;
@@ -16590,7 +16733,7 @@ var Button$4 = styled.button(_templateObject9$8 || (_templateObject9$8 = _tagged
16590
16733
  if (!onClick) return;
16591
16734
  return css(_templateObject10$7 || (_templateObject10$7 = _taggedTemplateLiteralLoose(["\n :not(:disabled) {\n cursor: pointer;\n }\n "])));
16592
16735
  });
16593
- var LabelText$1 = styled.label(_templateObject11$4 || (_templateObject11$4 = _taggedTemplateLiteralLoose(["\n display: inline-block;\n margin-bottom: ", ";\n\n ", "\n"])), function (_ref12) {
16736
+ var LabelText$1 = styled.label(_templateObject11$5 || (_templateObject11$5 = _taggedTemplateLiteralLoose(["\n display: inline-block;\n margin-bottom: ", ";\n\n ", "\n"])), function (_ref12) {
16594
16737
  var theme = _ref12.theme;
16595
16738
  return theme.spacings.s1;
16596
16739
  }, function (_ref13) {
@@ -16701,6 +16844,29 @@ var Component$1 = React__default.forwardRef(function (props, ref) {
16701
16844
  ref: ref,
16702
16845
  readOnly: true
16703
16846
  }));
16847
+ var options = [{
16848
+ label: 'Hoje',
16849
+ data: {
16850
+ intervalType: 'day'
16851
+ }
16852
+ }, {
16853
+ label: 'Semana',
16854
+ data: {
16855
+ intervalType: 'week'
16856
+ }
16857
+ }, {
16858
+ label: 'Mês',
16859
+ data: {
16860
+ intervalType: 'month'
16861
+ }
16862
+ }, {
16863
+ label: 'Personalizado',
16864
+ data: {
16865
+ intervalType: 'custom'
16866
+ },
16867
+ keepOpen: true,
16868
+ caret: true
16869
+ }];
16704
16870
  return React__default.createElement(RelativeContainer$5, {
16705
16871
  ref: useOnClickOut(function () {
16706
16872
  return setOpen(null);
@@ -16761,33 +16927,16 @@ var Component$1 = React__default.forwardRef(function (props, ref) {
16761
16927
  references: {
16762
16928
  bottom: '35px'
16763
16929
  },
16764
- options: [{
16765
- label: 'Hoje',
16766
- onClick: function onClick() {
16767
- return setValue(intervalTypes.day.initial(props.min));
16768
- },
16769
- data: {}
16770
- }, {
16771
- label: 'Semana',
16772
- onClick: function onClick() {
16773
- return setValue(intervalTypes.week.initial(props.min));
16774
- },
16775
- data: {}
16776
- }, {
16777
- label: 'Mês',
16778
- onClick: function onClick() {
16779
- return setValue(intervalTypes.month.initial(props.min));
16780
- },
16781
- data: {}
16782
- }, {
16783
- label: 'Personalizado',
16784
- onClick: function onClick() {
16785
- return setOpen('calendar');
16786
- },
16787
- data: {},
16788
- keepOpen: true,
16789
- caret: true
16790
- }],
16930
+ options: options,
16931
+ onClickOption: function onClickOption(_index, _ref2) {
16932
+ var intervalType = _ref2.intervalType;
16933
+
16934
+ if (intervalType === 'custom') {
16935
+ setOpen('calendar');
16936
+ } else {
16937
+ setValue(intervalTypes[intervalType].initial(props.min));
16938
+ }
16939
+ },
16791
16940
  width: '165px',
16792
16941
  itemSpacing: 's3',
16793
16942
  bordered: true
@@ -16798,9 +16947,9 @@ var Component$1 = React__default.forwardRef(function (props, ref) {
16798
16947
  open: open === 'calendar',
16799
16948
  initialValue: value,
16800
16949
  onSubmit: {
16801
- onClick: function onClick(_ref2) {
16802
- var start = _ref2[0],
16803
- end = _ref2[1];
16950
+ onClick: function onClick(_ref3) {
16951
+ var start = _ref3[0],
16952
+ end = _ref3[1];
16804
16953
  if (start === null || end === null) return;
16805
16954
  setValue([start, end]);
16806
16955
  setOpen(null);
@@ -17437,7 +17586,7 @@ var Input$5 = Object.assign(Component$2, {
17437
17586
  getPhoneDetails: Phone.getPhoneDetails
17438
17587
  });
17439
17588
 
17440
- var _templateObject$L, _templateObject2$x, _templateObject3$q, _templateObject4$g;
17589
+ var _templateObject$L, _templateObject2$x, _templateObject3$q, _templateObject4$h;
17441
17590
  var Container$7 = styled(AbsoluteContainer)(_templateObject$L || (_templateObject$L = _taggedTemplateLiteralLoose(["\n background-color: ", ";\n\n > div {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n\n > div {\n padding: ", ";\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n }\n }\n"])), function (_ref) {
17442
17591
  var theme = _ref.theme;
17443
17592
  return theme.colors.white;
@@ -17461,7 +17610,7 @@ var Title = styled.div(_templateObject3$q || (_templateObject3$q = _taggedTempla
17461
17610
  var getColor = _ref6.theme.getColor;
17462
17611
  return getColor('greyishBlue', 50);
17463
17612
  });
17464
- var Item = styled.div(_templateObject4$g || (_templateObject4$g = _taggedTemplateLiteralLoose(["\n padding: ", ";\n display: flex;\n align-items: center;\n\n :not(:last-child) {\n border-bottom: 1px solid\n ", ";\n }\n\n > div:nth-child(1) {\n flex: 1;\n\n > div:nth-child(1) {\n ", "\n color: ", ";\n }\n > div:nth-child(2) {\n ", "\n }\n }\n > div:nth-child(2) {\n display: flex;\n align-items: center;\n cursor: pointer;\n }\n"])), function (_ref7) {
17613
+ var Item = styled.div(_templateObject4$h || (_templateObject4$h = _taggedTemplateLiteralLoose(["\n padding: ", ";\n display: flex;\n align-items: center;\n\n :not(:last-child) {\n border-bottom: 1px solid\n ", ";\n }\n\n > div:nth-child(1) {\n flex: 1;\n\n > div:nth-child(1) {\n ", "\n color: ", ";\n }\n > div:nth-child(2) {\n ", "\n }\n }\n > div:nth-child(2) {\n display: flex;\n align-items: center;\n cursor: pointer;\n }\n"])), function (_ref7) {
17465
17614
  var s1 = _ref7.theme.spacings.s1;
17466
17615
  return s1 + " " + s1 + " " + s1 + " 0";
17467
17616
  }, function (_ref8) {
@@ -17642,13 +17791,13 @@ var AppliedFilters = Object.assign(function (props) {
17642
17791
  Menu: AppliedFiltersMenu
17643
17792
  });
17644
17793
 
17645
- var _templateObject$N, _templateObject2$z, _templateObject3$s, _templateObject4$h, _templateObject5$e, _templateObject6$c, _templateObject7$c, _templateObject8$a, _templateObject9$9, _templateObject10$8;
17794
+ var _templateObject$N, _templateObject2$z, _templateObject3$s, _templateObject4$i, _templateObject5$e, _templateObject6$c, _templateObject7$c, _templateObject8$a, _templateObject9$9, _templateObject10$8;
17646
17795
  var Container$9 = styled.div(_templateObject$N || (_templateObject$N = _taggedTemplateLiteralLoose(["\n width: 100%;\n background: #fff;\n border: 1px solid #d4d4d5;\n border-radius: 4px;\n border-left-width: 5px;\n padding: 14px;\n ", "\n ", "\n ", "\n ", "\n\n ", "\n ", "\n ", "\n\n ", "\n ", "\n"])), function (props) {
17647
17796
  return props.size === 'mini' && css(_templateObject2$z || (_templateObject2$z = _taggedTemplateLiteralLoose(["\n width: 394px;\n height: 99px;\n "])));
17648
17797
  }, function (props) {
17649
17798
  return props.size === 'small' && css(_templateObject3$s || (_templateObject3$s = _taggedTemplateLiteralLoose(["\n width: 394px;\n height: 131px;\n "])));
17650
17799
  }, function (props) {
17651
- return props.size === 'medium' && css(_templateObject4$h || (_templateObject4$h = _taggedTemplateLiteralLoose(["\n width: 394px;\n "])));
17800
+ return props.size === 'medium' && css(_templateObject4$i || (_templateObject4$i = _taggedTemplateLiteralLoose(["\n width: 394px;\n "])));
17652
17801
  }, function (props) {
17653
17802
  return props.size === 'big' && css(_templateObject5$e || (_templateObject5$e = _taggedTemplateLiteralLoose(["\n width: 414px;\n height: 324px;\n "])));
17654
17803
  }, function (props) {
@@ -17778,8 +17927,7 @@ var getInstance = function getInstance(props) {
17778
17927
  var _getOptions = function _getOptions(value) {
17779
17928
  try {
17780
17929
  var options = intialOptions.filter(function (option) {
17781
- var label = isString(option.label) ? option.label : option.label.text;
17782
- return strCmp(label, value, {
17930
+ return strCmp(option.label, value, {
17783
17931
  contain: true
17784
17932
  });
17785
17933
  });
@@ -17944,9 +18092,8 @@ var Submenu = function Submenu(props) {
17944
18092
 
17945
18093
  var optionsParser = function optionsParser(option) {
17946
18094
  return {
17947
- label: typeof option.label === 'string' ? option.label : option.label.element,
17948
- onClick: onClickOption,
17949
- data: {}
18095
+ label: option.label,
18096
+ data: option
17950
18097
  };
17951
18098
  };
17952
18099
 
@@ -17964,6 +18111,8 @@ var Submenu = function Submenu(props) {
17964
18111
  close: close,
17965
18112
  width: isDynamic ? '275px' : '160px',
17966
18113
  height: '261px',
18114
+ onClickOption: onClickOption,
18115
+ label: props.optionLabel,
17967
18116
  containerSpacing: {
17968
18117
  top: 's3',
17969
18118
  left: 's1',
@@ -18008,16 +18157,11 @@ var FiltersMenu = function FiltersMenu(props) {
18008
18157
 
18009
18158
  var items = props.items.map(function (item) {
18010
18159
  return {
18011
- label: typeof item.label === 'string' ? item.label : item.label.element,
18160
+ label: item.label,
18012
18161
  delimiter: item.delimiter,
18013
18162
  keepOpen: true,
18014
18163
  caret: true,
18015
- onClick: function onClick(index) {
18016
- setActive(function (prev) {
18017
- return prev === index ? -1 : index;
18018
- });
18019
- },
18020
- data: {}
18164
+ data: item
18021
18165
  };
18022
18166
  });
18023
18167
  var selected = active >= 0 && active < props.items.length ? props.items[active] : undefined;
@@ -18031,6 +18175,12 @@ var FiltersMenu = function FiltersMenu(props) {
18031
18175
  close: close,
18032
18176
  width: '160px',
18033
18177
  maxHeight: '261px',
18178
+ onClickOption: function onClickOption(index) {
18179
+ setActive(function (prev) {
18180
+ return prev === index ? -1 : index;
18181
+ });
18182
+ },
18183
+ label: props.filterLabel,
18034
18184
  containerSpacing: {
18035
18185
  top: 's1',
18036
18186
  left: 's1',
@@ -18048,6 +18198,7 @@ var FiltersMenu = function FiltersMenu(props) {
18048
18198
  }
18049
18199
  }, props.containerProps || {}), React__default.createElement(Submenu, {
18050
18200
  item: selected,
18201
+ optionLabel: props.optionLabel && selected ? props.optionLabel[selected.name] : undefined,
18051
18202
  close: function close() {
18052
18203
  return setActive(-1);
18053
18204
  },
@@ -18062,7 +18213,7 @@ var Filters = Object.assign(function (props) {
18062
18213
  setAppliedFilters = props.setAppliedFilters,
18063
18214
  containerProps = props.containerProps,
18064
18215
  subContainerProps = props.subContainerProps;
18065
- var buttonProps = filterObject(props, ['items', 'setAppliedFilters']);
18216
+ var buttonProps = filterObject(props, ['items', 'setAppliedFilters', 'filterLabel', 'optionLabel']);
18066
18217
  return React__default.createElement(Button$5, Object.assign({}, buttonProps, {
18067
18218
  gap: 's4',
18068
18219
  getContent: function getContent(open, close) {
@@ -18072,7 +18223,9 @@ var Filters = Object.assign(function (props) {
18072
18223
  setAppliedFilters: setAppliedFilters,
18073
18224
  items: items,
18074
18225
  containerProps: containerProps,
18075
- subContainerProps: subContainerProps
18226
+ subContainerProps: subContainerProps,
18227
+ filterLabel: props.filterLabel,
18228
+ optionLabel: props.optionLabel
18076
18229
  }));
18077
18230
  }
18078
18231
  }), "Filtros");
@@ -18087,7 +18240,7 @@ var useContext$3 = function useContext() {
18087
18240
  return React__default.useContext(Provider$3);
18088
18241
  };
18089
18242
 
18090
- var _templateObject$Q, _templateObject2$A, _templateObject3$t, _templateObject4$i, _templateObject5$f, _templateObject6$d, _templateObject7$d, _templateObject8$b, _templateObject9$a, _templateObject10$9, _templateObject11$5, _templateObject12$4, _templateObject13$2, _templateObject14$2, _templateObject15$2;
18243
+ var _templateObject$Q, _templateObject2$A, _templateObject3$t, _templateObject4$j, _templateObject5$f, _templateObject6$d, _templateObject7$d, _templateObject8$b, _templateObject9$a, _templateObject10$9, _templateObject11$6, _templateObject12$4, _templateObject13$2, _templateObject14$2, _templateObject15$2;
18091
18244
  var aligns = {
18092
18245
  self: {
18093
18246
  horizontal: {
@@ -18126,7 +18279,7 @@ var Col = styled.div(_templateObject$Q || (_templateObject$Q = _taggedTemplateLi
18126
18279
  }
18127
18280
 
18128
18281
  var w = parseFloat(width) * 100 / 12;
18129
- return css(_templateObject4$i || (_templateObject4$i = _taggedTemplateLiteralLoose(["\n flex: 0 0 ", "%;\n max-width: ", "%;\n width: 100%;\n "])), w, w);
18282
+ return css(_templateObject4$j || (_templateObject4$j = _taggedTemplateLiteralLoose(["\n flex: 0 0 ", "%;\n max-width: ", "%;\n width: 100%;\n "])), w, w);
18130
18283
  }, function (_ref2) {
18131
18284
  var spacing = _ref2.spacing;
18132
18285
  var padding = getSpacings(spacing === undefined ? 's1' : spacing);
@@ -18178,7 +18331,7 @@ var Col = styled.div(_templateObject$Q || (_templateObject$Q = _taggedTemplateLi
18178
18331
  var bordered = _ref5.bordered,
18179
18332
  lightestGrey = _ref5.theme.colors.lightestGrey;
18180
18333
  if (!bordered) return;
18181
- return css(_templateObject11$5 || (_templateObject11$5 = _taggedTemplateLiteralLoose(["\n :not(:last-child) {\n border-right: 1px solid ", ";\n }\n "])), lightestGrey);
18334
+ return css(_templateObject11$6 || (_templateObject11$6 = _taggedTemplateLiteralLoose(["\n :not(:last-child) {\n border-right: 1px solid ", ";\n }\n "])), lightestGrey);
18182
18335
  }, function (_ref6) {
18183
18336
  var fontColor = _ref6.fontColor,
18184
18337
  theme = _ref6.theme;
@@ -18252,7 +18405,7 @@ var Grid$1 = React__default.forwardRef(function (props, ref) {
18252
18405
  });
18253
18406
  Grid$1.displayName = 'Grid';
18254
18407
 
18255
- var _templateObject$S, _templateObject2$C, _templateObject3$v, _templateObject4$j, _templateObject5$g, _templateObject6$e, _templateObject7$e, _templateObject8$c, _templateObject9$b, _templateObject10$a;
18408
+ var _templateObject$S, _templateObject2$C, _templateObject3$v, _templateObject4$k, _templateObject5$g, _templateObject6$e, _templateObject7$e, _templateObject8$c, _templateObject9$b, _templateObject10$a;
18256
18409
  var horizontalAligns = {
18257
18410
  around: 'space-around',
18258
18411
  between: 'space-between',
@@ -18277,7 +18430,7 @@ var Row = styled.div(_templateObject$S || (_templateObject$S = _taggedTemplateLi
18277
18430
  }, function (_ref3) {
18278
18431
  var horizontalAlign = _ref3.horizontalAlign;
18279
18432
  if (horizontalAlign === undefined) return;
18280
- return css(_templateObject4$j || (_templateObject4$j = _taggedTemplateLiteralLoose(["\n justify-content: ", ";\n "])), horizontalAligns[horizontalAlign]);
18433
+ return css(_templateObject4$k || (_templateObject4$k = _taggedTemplateLiteralLoose(["\n justify-content: ", ";\n "])), horizontalAligns[horizontalAlign]);
18281
18434
  }, function (_ref4) {
18282
18435
  var verticalAlign = _ref4.verticalAlign;
18283
18436
  if (verticalAlign === undefined) return;
@@ -18383,7 +18536,7 @@ var widths = {
18383
18536
  default: '642.5px'
18384
18537
  };
18385
18538
 
18386
- var _templateObject$T, _templateObject2$D, _templateObject3$w, _templateObject4$k, _templateObject5$h, _templateObject6$f, _templateObject7$f, _templateObject8$d, _templateObject9$c, _templateObject10$b;
18539
+ var _templateObject$T, _templateObject2$D, _templateObject3$w, _templateObject4$l, _templateObject5$h, _templateObject6$f, _templateObject7$f, _templateObject8$d, _templateObject9$c, _templateObject10$b;
18387
18540
  var Background = styled.div(_templateObject$T || (_templateObject$T = _taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: center;\n align-items: center;\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n backdrop-filter: blur(3px);\n background-color: ", ";\n"])), function (_ref) {
18388
18541
  var theme = _ref.theme;
18389
18542
  return theme.getColor('black', 25);
@@ -18394,7 +18547,7 @@ var Header$5 = styled.div(_templateObject3$w || (_templateObject3$w = _taggedTem
18394
18547
  colors = _ref2$theme.colors,
18395
18548
  spacings = _ref2$theme.spacings,
18396
18549
  useTypography = _ref2$theme.useTypography;
18397
- return css(_templateObject4$k || (_templateObject4$k = _taggedTemplateLiteralLoose(["\n border-bottom: 1px solid ", ";\n padding: ", ";\n\n ", "\n "])), colors.lightestGrey, spacings.s4, useTypography('h1'));
18550
+ return css(_templateObject4$l || (_templateObject4$l = _taggedTemplateLiteralLoose(["\n border-bottom: 1px solid ", ";\n padding: ", ";\n\n ", "\n "])), colors.lightestGrey, spacings.s4, useTypography('h1'));
18398
18551
  });
18399
18552
  var Footer$2 = styled.div(_templateObject5$h || (_templateObject5$h = _taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n\n ", "\n"])), function (_ref3) {
18400
18553
  var _ref3$theme = _ref3.theme,
@@ -18613,11 +18766,11 @@ var Modal$1 = Object.assign(Modal, {
18613
18766
  Audit: Audit
18614
18767
  });
18615
18768
 
18616
- var _templateObject$X, _templateObject2$E, _templateObject3$x, _templateObject4$l, _templateObject5$i, _templateObject6$g, _templateObject7$g, _templateObject8$e, _templateObject9$d, _templateObject10$c, _templateObject11$6;
18769
+ var _templateObject$X, _templateObject2$E, _templateObject3$x, _templateObject4$m, _templateObject5$i, _templateObject6$g, _templateObject7$g, _templateObject8$e, _templateObject9$d, _templateObject10$c, _templateObject11$7;
18617
18770
  var Container$c = styled.div(_templateObject$X || (_templateObject$X = _taggedTemplateLiteralLoose(["\n width: 100%;\n height: 300px;\n position: absolute;\n padding: 14px;\n"])));
18618
18771
  var Header$6 = styled.div(_templateObject2$E || (_templateObject2$E = _taggedTemplateLiteralLoose(["\n display: flex;\n"])));
18619
18772
  var HeaderImage = styled.div(_templateObject3$x || (_templateObject3$x = _taggedTemplateLiteralLoose(["\n width: 43px;\n height: 44px;\n background-color: #ebebeb;\n"])));
18620
- var HeaderContent = styled.div(_templateObject4$l || (_templateObject4$l = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n flex: 1;\n"])));
18773
+ var HeaderContent = styled.div(_templateObject4$m || (_templateObject4$m = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n flex: 1;\n"])));
18621
18774
  var MainContent = styled.div(_templateObject5$i || (_templateObject5$i = _taggedTemplateLiteralLoose(["\n margin-top: 8px;\n"])));
18622
18775
  var HeaderLine = styled.div(_templateObject6$g || (_templateObject6$g = _taggedTemplateLiteralLoose(["\n height: ", ";\n background-color: #ebebeb;\n margin-left: 7px;\n\n & + div {\n margin-top: 14px;\n }\n\n ", "\n ", "\n\n ", "\n\n ", "\n"])), function (props) {
18623
18776
  return props.height;
@@ -18630,7 +18783,7 @@ var HeaderLine = styled.div(_templateObject6$g || (_templateObject6$g = _taggedT
18630
18783
  }, function (props) {
18631
18784
  return props.size === 'large' && css(_templateObject10$c || (_templateObject10$c = _taggedTemplateLiteralLoose(["\n width: 75%;\n "])));
18632
18785
  });
18633
- var MainLine = styled(HeaderLine)(_templateObject11$6 || (_templateObject11$6 = _taggedTemplateLiteralLoose(["\n margin-bottom: 14px;\n margin-left: 0;\n"])));
18786
+ var MainLine = styled(HeaderLine)(_templateObject11$7 || (_templateObject11$7 = _taggedTemplateLiteralLoose(["\n margin-bottom: 14px;\n margin-left: 0;\n"])));
18634
18787
 
18635
18788
  var Template1 = function Template1(props) {
18636
18789
  if (!props.loading) return React__default.createElement(React__default.Fragment, null);
@@ -18665,7 +18818,7 @@ var Template1 = function Template1(props) {
18665
18818
  })));
18666
18819
  };
18667
18820
 
18668
- var _templateObject$Y, _templateObject2$F, _templateObject3$y, _templateObject4$m, _templateObject5$j;
18821
+ var _templateObject$Y, _templateObject2$F, _templateObject3$y, _templateObject4$n, _templateObject5$j;
18669
18822
  var HeaderLine$1 = styled.div(_templateObject$Y || (_templateObject$Y = _taggedTemplateLiteralLoose(["\n height: ", ";\n background-color: #ebebeb;\n margin-left: 7px;\n\n & + div {\n margin-top: 14px;\n }\n\n ", "\n ", "\n\n ", "\n\n ", "\n"])), function (props) {
18670
18823
  return props.height;
18671
18824
  }, function (props) {
@@ -18673,16 +18826,16 @@ var HeaderLine$1 = styled.div(_templateObject$Y || (_templateObject$Y = _taggedT
18673
18826
  }, function (props) {
18674
18827
  return props.size === 'small' && css(_templateObject3$y || (_templateObject3$y = _taggedTemplateLiteralLoose(["\n width: 25%;\n "])));
18675
18828
  }, function (props) {
18676
- return props.size === 'medium' && css(_templateObject4$m || (_templateObject4$m = _taggedTemplateLiteralLoose(["\n width: 45%;\n "])));
18829
+ return props.size === 'medium' && css(_templateObject4$n || (_templateObject4$n = _taggedTemplateLiteralLoose(["\n width: 45%;\n "])));
18677
18830
  }, function (props) {
18678
18831
  return props.size === 'large' && css(_templateObject5$j || (_templateObject5$j = _taggedTemplateLiteralLoose(["\n width: 75%;\n "])));
18679
18832
  });
18680
18833
 
18681
- var _templateObject$Z, _templateObject2$G, _templateObject3$z, _templateObject4$n, _templateObject5$k, _templateObject6$h, _templateObject7$h, _templateObject8$f;
18834
+ var _templateObject$Z, _templateObject2$G, _templateObject3$z, _templateObject4$o, _templateObject5$k, _templateObject6$h, _templateObject7$h, _templateObject8$f;
18682
18835
  var Container$d = styled.div(_templateObject$Z || (_templateObject$Z = _taggedTemplateLiteralLoose(["\n width: 100%;\n max-height: 100%;\n position: absolute;\n padding: 14px;\n"])));
18683
18836
  var Template2Container = styled(Container$d)(_templateObject2$G || (_templateObject2$G = _taggedTemplateLiteralLoose(["\n background: #fff;\n border: 2px solid #ebebeb;\n"])));
18684
18837
  var Header$7 = styled.div(_templateObject3$z || (_templateObject3$z = _taggedTemplateLiteralLoose(["\n display: flex;\n"])));
18685
- var HeaderImage$1 = styled.div(_templateObject4$n || (_templateObject4$n = _taggedTemplateLiteralLoose(["\n width: 43px;\n height: 44px;\n background-color: #ebebeb;\n"])));
18838
+ var HeaderImage$1 = styled.div(_templateObject4$o || (_templateObject4$o = _taggedTemplateLiteralLoose(["\n width: 43px;\n height: 44px;\n background-color: #ebebeb;\n"])));
18686
18839
  var HeaderContent$1 = styled.div(_templateObject5$k || (_templateObject5$k = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n flex: 1;\n"])));
18687
18840
  var MainContent$1 = styled.div(_templateObject6$h || (_templateObject6$h = _taggedTemplateLiteralLoose(["\n margin-top: 8px;\n"])));
18688
18841
  var MainLine$1 = styled(HeaderLine$1)(_templateObject7$h || (_templateObject7$h = _taggedTemplateLiteralLoose(["\n margin-bottom: 14px;\n margin-left: 0;\n"])));
@@ -18741,14 +18894,14 @@ var Template3 = function Template3(props) {
18741
18894
  }));
18742
18895
  };
18743
18896
 
18744
- var _templateObject$$, _templateObject2$I, _templateObject3$B, _templateObject4$o, _templateObject5$l, _templateObject6$i, _templateObject7$i, _templateObject8$g;
18897
+ var _templateObject$$, _templateObject2$I, _templateObject3$B, _templateObject4$p, _templateObject5$l, _templateObject6$i, _templateObject7$i, _templateObject8$g;
18745
18898
  var Container$f = styled.div(_templateObject$$ || (_templateObject$$ = _taggedTemplateLiteralLoose(["\n width: 100%;\n max-height: 100%;\n position: absolute;\n padding: 14px;\n"])));
18746
18899
  var HeaderLine$3 = styled.div(_templateObject2$I || (_templateObject2$I = _taggedTemplateLiteralLoose(["\n height: ", ";\n background-color: #ebebeb;\n margin-left: 7px;\n\n & + div {\n margin-top: 14px;\n }\n\n ", "\n ", "\n\n ", "\n\n ", "\n"])), function (props) {
18747
18900
  return props.height;
18748
18901
  }, function (props) {
18749
18902
  return props.size === 'mini' && css(_templateObject3$B || (_templateObject3$B = _taggedTemplateLiteralLoose(["\n width: 15%;\n "])));
18750
18903
  }, function (props) {
18751
- return props.size === 'small' && css(_templateObject4$o || (_templateObject4$o = _taggedTemplateLiteralLoose(["\n width: 25%;\n "])));
18904
+ return props.size === 'small' && css(_templateObject4$p || (_templateObject4$p = _taggedTemplateLiteralLoose(["\n width: 25%;\n "])));
18752
18905
  }, function (props) {
18753
18906
  return props.size === 'medium' && css(_templateObject5$l || (_templateObject5$l = _taggedTemplateLiteralLoose(["\n width: 45%;\n "])));
18754
18907
  }, function (props) {
@@ -18808,13 +18961,13 @@ var Template4 = function Template4(props) {
18808
18961
  }));
18809
18962
  };
18810
18963
 
18811
- var _templateObject$10, _templateObject2$J, _templateObject3$C, _templateObject4$p, _templateObject5$m, _templateObject6$j, _templateObject7$j, _templateObject8$h, _templateObject9$e;
18964
+ var _templateObject$10, _templateObject2$J, _templateObject3$C, _templateObject4$q, _templateObject5$m, _templateObject6$j, _templateObject7$j, _templateObject8$h, _templateObject9$e;
18812
18965
  var Container$g = styled.div(_templateObject$10 || (_templateObject$10 = _taggedTemplateLiteralLoose(["\n position: absolute;\n width: 746px;\n height: 169px;\n border: 1px solid #e6e6e7;\n border-radius: 4px;\n padding: 14px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n"])));
18813
18966
  var Circle = styled.div(_templateObject2$J || (_templateObject2$J = _taggedTemplateLiteralLoose(["\n width: 141px;\n height: 141px;\n background-color: #dddedf;\n border-radius: 50%;\n"])));
18814
18967
  var HeaderLine$4 = styled.div(_templateObject3$C || (_templateObject3$C = _taggedTemplateLiteralLoose(["\n height: ", ";\n background-color: #ebebeb;\n margin-left: 7px;\n\n & + div {\n margin-top: 14px;\n }\n\n ", "\n ", "\n\n ", "\n\n ", "\n"])), function (props) {
18815
18968
  return props.height;
18816
18969
  }, function (props) {
18817
- return props.size === 'mini' && css(_templateObject4$p || (_templateObject4$p = _taggedTemplateLiteralLoose(["\n width: 15%;\n "])));
18970
+ return props.size === 'mini' && css(_templateObject4$q || (_templateObject4$q = _taggedTemplateLiteralLoose(["\n width: 15%;\n "])));
18818
18971
  }, function (props) {
18819
18972
  return props.size === 'small' && css(_templateObject5$m || (_templateObject5$m = _taggedTemplateLiteralLoose(["\n width: 25%;\n "])));
18820
18973
  }, function (props) {
@@ -18856,11 +19009,11 @@ var Template5 = function Template5(props) {
18856
19009
  })));
18857
19010
  };
18858
19011
 
18859
- var _templateObject$11, _templateObject2$K, _templateObject3$D, _templateObject4$q, _templateObject5$n, _templateObject6$k, _templateObject7$k, _templateObject8$i, _templateObject9$f;
19012
+ var _templateObject$11, _templateObject2$K, _templateObject3$D, _templateObject4$r, _templateObject5$n, _templateObject6$k, _templateObject7$k, _templateObject8$i, _templateObject9$f;
18860
19013
  var Container$h = styled.div(_templateObject$11 || (_templateObject$11 = _taggedTemplateLiteralLoose(["\n width: 395px;\n\n display: flex;\n align-items: center;\n justify-content: space-between;\n background-color: #f5f5f5;\n"])));
18861
19014
  var Header$8 = styled.div(_templateObject2$K || (_templateObject2$K = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n padding: 14px;\n"])));
18862
19015
  var Footer$3 = styled.div(_templateObject3$D || (_templateObject3$D = _taggedTemplateLiteralLoose(["\n width: 100%;\n border-top: 1px solid #b1b1b3;\n height: 50px;\n"])));
18863
- var HeaderLine$5 = styled.div(_templateObject4$q || (_templateObject4$q = _taggedTemplateLiteralLoose(["\n height: ", ";\n background-color: #ebebeb;\n margin-left: 7px;\n\n & + div {\n margin-top: 14px;\n }\n\n ", "\n ", "\n\n ", "\n\n ", "\n"])), function (props) {
19016
+ var HeaderLine$5 = styled.div(_templateObject4$r || (_templateObject4$r = _taggedTemplateLiteralLoose(["\n height: ", ";\n background-color: #ebebeb;\n margin-left: 7px;\n\n & + div {\n margin-top: 14px;\n }\n\n ", "\n ", "\n\n ", "\n\n ", "\n"])), function (props) {
18864
19017
  return props.height;
18865
19018
  }, function (props) {
18866
19019
  return props.size === 'mini' && css(_templateObject5$n || (_templateObject5$n = _taggedTemplateLiteralLoose(["\n width: 15%;\n "])));
@@ -18899,13 +19052,13 @@ var Template6 = function Template6(props) {
18899
19052
  })));
18900
19053
  };
18901
19054
 
18902
- var _templateObject$12, _templateObject2$L, _templateObject3$E, _templateObject4$r, _templateObject5$o, _templateObject6$l, _templateObject7$l, _templateObject8$j, _templateObject9$g, _templateObject10$d;
19055
+ var _templateObject$12, _templateObject2$L, _templateObject3$E, _templateObject4$s, _templateObject5$o, _templateObject6$l, _templateObject7$l, _templateObject8$j, _templateObject9$g, _templateObject10$d;
18903
19056
  var Container$i = styled.div(_templateObject$12 || (_templateObject$12 = _taggedTemplateLiteralLoose(["\n width: 395px;\n height: 110px;\n display: flex;\n flex-direction: column;\n align-items: center;\n background: #f5f5f5 0% 0% no-repeat padding-box;\n"])));
18904
19057
  var Header$9 = styled.div(_templateObject2$L || (_templateObject2$L = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n padding: 14px;\n width: 100%;\n"])));
18905
19058
  var HeaderLine$6 = styled.div(_templateObject3$E || (_templateObject3$E = _taggedTemplateLiteralLoose(["\n height: ", ";\n background-color: #ebebeb;\n margin-left: 7px;\n\n & + div {\n margin-top: 14px;\n }\n\n ", "\n ", "\n\n ", "\n\n ", "\n"])), function (props) {
18906
19059
  return props.height;
18907
19060
  }, function (props) {
18908
- return props.size === 'mini' && css(_templateObject4$r || (_templateObject4$r = _taggedTemplateLiteralLoose(["\n width: 15%;\n "])));
19061
+ return props.size === 'mini' && css(_templateObject4$s || (_templateObject4$s = _taggedTemplateLiteralLoose(["\n width: 15%;\n "])));
18909
19062
  }, function (props) {
18910
19063
  return props.size === 'small' && css(_templateObject5$o || (_templateObject5$o = _taggedTemplateLiteralLoose(["\n width: 25%;\n "])));
18911
19064
  }, function (props) {
@@ -18933,13 +19086,13 @@ var Template7 = function Template7(props) {
18933
19086
  })), React__default.createElement(Main$2, null, React__default.createElement(Circle$1, null), React__default.createElement(Circle$1, null), React__default.createElement(Circle$1, null), React__default.createElement(Circle$1, null), React__default.createElement(Circle$1, null)));
18934
19087
  };
18935
19088
 
18936
- var _templateObject$13, _templateObject2$M, _templateObject3$F, _templateObject4$s, _templateObject5$p, _templateObject6$m, _templateObject7$m, _templateObject8$k, _templateObject9$h;
19089
+ var _templateObject$13, _templateObject2$M, _templateObject3$F, _templateObject4$t, _templateObject5$p, _templateObject6$m, _templateObject7$m, _templateObject8$k, _templateObject9$h;
18937
19090
  var Container$j = styled.div(_templateObject$13 || (_templateObject$13 = _taggedTemplateLiteralLoose(["\n width: 395px;\n height: 110px;\n display: flex;\n flex-direction: column;\n align-items: center;\n background: #f5f5f5 0% 0% no-repeat padding-box;\n"])));
18938
19091
  var Header$a = styled.div(_templateObject2$M || (_templateObject2$M = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n padding: 14px;\n width: 100%;\n"])));
18939
19092
  var HeaderLine$7 = styled.div(_templateObject3$F || (_templateObject3$F = _taggedTemplateLiteralLoose(["\n height: ", ";\n background-color: #ebebeb;\n margin-left: 7px;\n\n & + div {\n margin-top: 14px;\n }\n\n ", "\n ", "\n\n ", "\n\n ", "\n"])), function (props) {
18940
19093
  return props.height;
18941
19094
  }, function (props) {
18942
- return props.size === 'mini' && css(_templateObject4$s || (_templateObject4$s = _taggedTemplateLiteralLoose(["\n width: 15%;\n "])));
19095
+ return props.size === 'mini' && css(_templateObject4$t || (_templateObject4$t = _taggedTemplateLiteralLoose(["\n width: 15%;\n "])));
18943
19096
  }, function (props) {
18944
19097
  return props.size === 'small' && css(_templateObject5$p || (_templateObject5$p = _taggedTemplateLiteralLoose(["\n width: 25%;\n "])));
18945
19098
  }, function (props) {
@@ -18976,13 +19129,13 @@ var Template8 = function Template8(props) {
18976
19129
  })));
18977
19130
  };
18978
19131
 
18979
- var _templateObject$14, _templateObject2$N, _templateObject3$G, _templateObject4$t, _templateObject5$q, _templateObject6$n, _templateObject7$n, _templateObject8$l, _templateObject9$i, _templateObject10$e;
19132
+ var _templateObject$14, _templateObject2$N, _templateObject3$G, _templateObject4$u, _templateObject5$q, _templateObject6$n, _templateObject7$n, _templateObject8$l, _templateObject9$i, _templateObject10$e;
18980
19133
  var Container$k = styled.div(_templateObject$14 || (_templateObject$14 = _taggedTemplateLiteralLoose(["\n width: 395px;\n height: 245px;\n display: flex;\n flex-direction: column;\n align-items: center;\n background: #f5f5f5 0% 0% no-repeat padding-box;\n"])));
18981
19134
  var Header$b = styled.div(_templateObject2$N || (_templateObject2$N = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n padding: 14px;\n width: 100%;\n"])));
18982
19135
  var HeaderLine$8 = styled.div(_templateObject3$G || (_templateObject3$G = _taggedTemplateLiteralLoose(["\n height: ", ";\n background-color: #ebebeb;\n margin-left: 7px;\n\n & + div {\n margin-top: 7px;\n }\n\n ", "\n ", "\n\n ", "\n\n ", "\n"])), function (props) {
18983
19136
  return props.height;
18984
19137
  }, function (props) {
18985
- return props.size === 'mini' && css(_templateObject4$t || (_templateObject4$t = _taggedTemplateLiteralLoose(["\n width: 15%;\n "])));
19138
+ return props.size === 'mini' && css(_templateObject4$u || (_templateObject4$u = _taggedTemplateLiteralLoose(["\n width: 15%;\n "])));
18986
19139
  }, function (props) {
18987
19140
  return props.size === 'small' && css(_templateObject5$q || (_templateObject5$q = _taggedTemplateLiteralLoose(["\n width: 25%;\n "])));
18988
19141
  }, function (props) {
@@ -19015,13 +19168,13 @@ var Template8$1 = function Template8(props) {
19015
19168
  })), React__default.createElement(Main$4, null, React__default.createElement(Circle$2, null)));
19016
19169
  };
19017
19170
 
19018
- var _templateObject$15, _templateObject2$O, _templateObject3$H, _templateObject4$u, _templateObject5$r, _templateObject6$o, _templateObject7$o, _templateObject8$m, _templateObject9$j, _templateObject10$f, _templateObject11$7;
19171
+ var _templateObject$15, _templateObject2$O, _templateObject3$H, _templateObject4$v, _templateObject5$r, _templateObject6$o, _templateObject7$o, _templateObject8$m, _templateObject9$j, _templateObject10$f, _templateObject11$8;
19019
19172
  var Container$l = styled.div(_templateObject$15 || (_templateObject$15 = _taggedTemplateLiteralLoose(["\n width: 395px;\n height: 245px;\n display: flex;\n flex-direction: column;\n align-items: center;\n background: #f5f5f5 0% 0% no-repeat padding-box;\n"])));
19020
19173
  var Header$c = styled.div(_templateObject2$O || (_templateObject2$O = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n padding: 14px;\n width: 100%;\n"])));
19021
19174
  var HeaderLine$9 = styled.div(_templateObject3$H || (_templateObject3$H = _taggedTemplateLiteralLoose(["\n height: ", ";\n background-color: #ebebeb;\n margin-left: 7px;\n\n & + div {\n margin-top: 7px;\n }\n\n ", "\n ", "\n\n ", "\n\n ", "\n"])), function (props) {
19022
19175
  return props.height;
19023
19176
  }, function (props) {
19024
- return props.size === 'mini' && css(_templateObject4$u || (_templateObject4$u = _taggedTemplateLiteralLoose(["\n width: 15%;\n "])));
19177
+ return props.size === 'mini' && css(_templateObject4$v || (_templateObject4$v = _taggedTemplateLiteralLoose(["\n width: 15%;\n "])));
19025
19178
  }, function (props) {
19026
19179
  return props.size === 'small' && css(_templateObject5$r || (_templateObject5$r = _taggedTemplateLiteralLoose(["\n width: 25%;\n "])));
19027
19180
  }, function (props) {
@@ -19038,7 +19191,7 @@ var CustomLine$6 = styled(HeaderLine$9)(_templateObject8$m || (_templateObject8$
19038
19191
  });
19039
19192
  var GraphLine = styled(CustomLine$6)(_templateObject9$j || (_templateObject9$j = _taggedTemplateLiteralLoose(["\n margin: 0 7px;\n"])));
19040
19193
  var Main$5 = styled.div(_templateObject10$f || (_templateObject10$f = _taggedTemplateLiteralLoose(["\n flex: 1;\n padding: 0 7px 72px 7px;\n width: 100%;\n display: flex;\n flex-direction: row;\n align-items: flex-end;\n justify-content: center;\n"])));
19041
- var Circle$3 = styled.div(_templateObject11$7 || (_templateObject11$7 = _taggedTemplateLiteralLoose(["\n width: 128px;\n height: 128px;\n background-color: #ebebeb;\n border-radius: 50%;\n"])));
19194
+ var Circle$3 = styled.div(_templateObject11$8 || (_templateObject11$8 = _taggedTemplateLiteralLoose(["\n width: 128px;\n height: 128px;\n background-color: #ebebeb;\n border-radius: 50%;\n"])));
19042
19195
 
19043
19196
  var Template10 = function Template10(props) {
19044
19197
  if (!props.loading) return React__default.createElement(React__default.Fragment, null);
@@ -19159,7 +19312,7 @@ var Placeholder = function Placeholder(props) {
19159
19312
  }
19160
19313
  };
19161
19314
 
19162
- var _templateObject$16, _templateObject2$P, _templateObject3$I, _templateObject4$v, _templateObject5$s, _templateObject6$p, _templateObject7$p;
19315
+ var _templateObject$16, _templateObject2$P, _templateObject3$I, _templateObject4$w, _templateObject5$s, _templateObject6$p, _templateObject7$p;
19163
19316
  var Container$m = styled.div(_templateObject$16 || (_templateObject$16 = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: row;\n align-items: center;\n\n span {\n display: inline-block;\n margin-left: 7px;\n color: #000000cc;\n }\n"])));
19164
19317
  var Progress = styled.div(_templateObject2$P || (_templateObject2$P = _taggedTemplateLiteralLoose(["\n width: 64px;\n height: 12px;\n border: 1px solid #e4e4e4;\n div {\n width: ", ";\n max-width: 64px;\n height: 100%;\n ", "\n\n ", "\n ", "\n ", "\n ", "\n }\n"])), function (props) {
19165
19318
  return props.value + "%";
@@ -19169,7 +19322,7 @@ var Progress = styled.div(_templateObject2$P || (_templateObject2$P = _taggedTem
19169
19322
  return theme.colors.warningGray;
19170
19323
  });
19171
19324
  }, function (props) {
19172
- return props.type === 'info' && css(_templateObject4$v || (_templateObject4$v = _taggedTemplateLiteralLoose(["\n background-color: ", ";\n "])), function (_ref2) {
19325
+ return props.type === 'info' && css(_templateObject4$w || (_templateObject4$w = _taggedTemplateLiteralLoose(["\n background-color: ", ";\n "])), function (_ref2) {
19173
19326
  var theme = _ref2.theme;
19174
19327
  return theme.colors.blue;
19175
19328
  });
@@ -19194,7 +19347,7 @@ var ProgressBar = function ProgressBar(props) {
19194
19347
  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', "%"));
19195
19348
  };
19196
19349
 
19197
- var _templateObject$17, _templateObject2$Q, _templateObject3$J, _templateObject4$w, _templateObject5$t, _templateObject6$q, _templateObject7$q, _templateObject8$n, _templateObject9$k;
19350
+ var _templateObject$17, _templateObject2$Q, _templateObject3$J, _templateObject4$x, _templateObject5$t, _templateObject6$q, _templateObject7$q, _templateObject8$n, _templateObject9$k;
19198
19351
  var Container$n = styled.div(_templateObject$17 || (_templateObject$17 = _taggedTemplateLiteralLoose(["\n display: block;\n"])));
19199
19352
  var delimiters = {
19200
19353
  blue: ['blue'],
@@ -19228,7 +19381,7 @@ var Tabs = styled.ul(_templateObject2$Q || (_templateObject2$Q = _taggedTemplate
19228
19381
  return internal ? "1px solid " + theme.getColor.apply(theme, delimiters[delimiter || 'grey']) : "2px solid " + theme.getColor.apply(theme, delimiters[delimiter || 'blue']);
19229
19382
  }();
19230
19383
 
19231
- return css(_templateObject4$w || (_templateObject4$w = _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);
19384
+ return css(_templateObject4$x || (_templateObject4$x = _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);
19232
19385
  }, function (_ref3) {
19233
19386
  var theme = _ref3.theme,
19234
19387
  internal = _ref3.$internal;
@@ -19384,7 +19537,7 @@ var TextArea = function TextArea(props) {
19384
19537
  return React__default.createElement(Container$o, Object.assign({}, props));
19385
19538
  };
19386
19539
 
19387
- var _templateObject$1a, _templateObject2$R, _templateObject3$K, _templateObject4$x, _templateObject5$u, _templateObject6$r;
19540
+ var _templateObject$1a, _templateObject2$R, _templateObject3$K, _templateObject4$y, _templateObject5$u, _templateObject6$r;
19388
19541
  var Container$p = styled.div(_templateObject$1a || (_templateObject$1a = _taggedTemplateLiteralLoose(["\n border-radius: 4px;\n width: ", ";\n height: 88px;\n border: 1px solid transparent;\n position: relative;\n\n ", "\n\n ", "\n\n ", "\n\n svg {\n cursor: pointer;\n position: absolute;\n top: 14px;\n right: 14px;\n width: 13px;\n height: 13px;\n }\n"])), function (props) {
19389
19542
  return props.size === 'large' ? '837px' : '460px';
19390
19543
  }, function (props) {
@@ -19392,7 +19545,7 @@ var Container$p = styled.div(_templateObject$1a || (_templateObject$1a = _tagged
19392
19545
  }, function (props) {
19393
19546
  return props.color === 'error' && css(_templateObject3$K || (_templateObject3$K = _taggedTemplateLiteralLoose(["\n background-color: #fff6f6;\n opacity: 1;\n border-color: #973937;\n h4 {\n color: #973937;\n }\n p {\n color: #973937;\n }\n "])));
19394
19547
  }, function (props) {
19395
- return props.color === 'warning' && css(_templateObject4$x || (_templateObject4$x = _taggedTemplateLiteralLoose(["\n background-color: #fffaf3;\n opacity: 1;\n border-color: #ccbea0;\n h4 {\n color: #7a4d05;\n }\n p {\n color: #7a4d05cc;\n }\n "])));
19548
+ return props.color === 'warning' && css(_templateObject4$y || (_templateObject4$y = _taggedTemplateLiteralLoose(["\n background-color: #fffaf3;\n opacity: 1;\n border-color: #ccbea0;\n h4 {\n color: #7a4d05;\n }\n p {\n color: #7a4d05cc;\n }\n "])));
19396
19549
  });
19397
19550
  var IconContainer$2 = styled.div(_templateObject5$u || (_templateObject5$u = _taggedTemplateLiteralLoose(["\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n padding: 14px 14px 0 0;\n margin: 0;\n"])));
19398
19551
  var IconContent = styled.div(_templateObject6$r || (_templateObject6$r = _taggedTemplateLiteralLoose(["\n width: 100%;\n padding: 13px 0 21px 28px;\n display: flex;\n flex: 1;\n flex-direction: column;\n\n h4 {\n margin-bottom: 7px;\n font-size: 18p;\n }\n p {\n margin: 0;\n font-size: 14px;\n max-width: 380px;\n }\n"])));
@@ -19407,7 +19560,7 @@ var Toast = function Toast(props) {
19407
19560
  })), React__default.createElement(IconContent, null, React__default.createElement("h4", null, props.title), React__default.createElement("p", null, " ", props.description)));
19408
19561
  };
19409
19562
 
19410
- var _templateObject$1b, _templateObject2$S, _templateObject3$L, _templateObject4$y, _templateObject5$v;
19563
+ var _templateObject$1b, _templateObject2$S, _templateObject3$L, _templateObject4$z, _templateObject5$v;
19411
19564
  var Image = styled.img(_templateObject$1b || (_templateObject$1b = _taggedTemplateLiteralLoose(["\n max-width: 100%;\n max-height: 100%;\n"])));
19412
19565
  var Container$q = styled.div(_templateObject2$S || (_templateObject2$S = _taggedTemplateLiteralLoose(["\n position: relative;\n display: inline-flex;\n\n &,\n ", " {\n width: ", ";\n\n height: ", ";\n }\n"])), Image, function (_ref) {
19413
19566
  var width = _ref.width;
@@ -19440,7 +19593,7 @@ var Dimmer = styled.div(_templateObject3$L || (_templateObject3$L = _taggedTempl
19440
19593
  var theme = _ref3.theme;
19441
19594
  return theme.getColor('greyishBlue', 50);
19442
19595
  });
19443
- var Button$6 = styled(Button$1)(_templateObject4$y || (_templateObject4$y = _taggedTemplateLiteralLoose(["\n background-color: ", ";\n"])), function (_ref4) {
19596
+ var Button$6 = styled(Button$1)(_templateObject4$z || (_templateObject4$z = _taggedTemplateLiteralLoose(["\n background-color: ", ";\n"])), function (_ref4) {
19444
19597
  var theme = _ref4.theme;
19445
19598
  return theme.getColor('white', 50);
19446
19599
  });