@mw-kit/mw-ui 1.7.95 → 1.7.96

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\n cursor: auto;\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"])));
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;
@@ -13002,13 +13002,6 @@ var Delimiter = styled.div(_templateObject11$3 || (_templateObject11$3 = _tagged
13002
13002
  return theme.colors.greyishBlue;
13003
13003
  });
13004
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
13005
  var isVisible = function isVisible(elem, bound) {
13013
13006
  var docViewTop = bound.scrollTop;
13014
13007
  var docViewBottom = docViewTop + bound.offsetHeight;
@@ -13035,7 +13028,7 @@ var MenuComponent = function MenuComponent(props, ref) {
13035
13028
  if (isVisible(element, scrollRef)) return;
13036
13029
  scrollRef.scrollTo(0, element.offsetTop);
13037
13030
  }, [highlight, scrollRef]);
13038
- var absoluteContainerProps = filterObject(props, ['scrollSpacing', 'scrollTabIndex', 'label', 'rules', 'onClickOption', 'onScrollEnd', 'before', 'after', 'close', 'options', 'loading', 'children', 'emptyContent', 'highlight'], {
13031
+ var absoluteContainerProps = filterObject(props, ['scrollSpacing', 'scrollTabIndex', 'onScrollEnd', 'before', 'after', 'close', 'options', 'loading', 'children', 'emptyContent', 'highlight'], {
13039
13032
  itemSpacing: 's1'
13040
13033
  });
13041
13034
  return React__default.createElement(Container$2, Object.assign({}, absoluteContainerProps, {
@@ -13063,23 +13056,23 @@ var MenuComponent = function MenuComponent(props, ref) {
13063
13056
  var onClick;
13064
13057
  var disabled = option.disabled;
13065
13058
 
13066
- var OptionContent = function OptionContent(_ref2) {
13067
- var children = _ref2.children;
13059
+ var OptionContent = function OptionContent(_ref) {
13060
+ var children = _ref.children;
13068
13061
  return children;
13069
13062
  };
13070
13063
 
13071
13064
  if (!disabled) {
13072
- var rule = (option.rules || props.rules || []).map(function (rule) {
13065
+ var rule = (option.rules || []).map(function (rule) {
13073
13066
  return rule(index, data);
13074
13067
  }).find(function (result) {
13075
13068
  return result !== true;
13076
13069
  });
13077
13070
 
13078
13071
  if (rule === true || rule === undefined) {
13079
- var _onClick = option.onClick || props.onClickOption || function () {};
13072
+ var _onClick = option.onClick || function () {};
13080
13073
 
13081
13074
  onClick = function onClick(e) {
13082
- _onClick(index, option.data, e);
13075
+ _onClick(index, option, e);
13083
13076
 
13084
13077
  closeMenu();
13085
13078
  };
@@ -13087,8 +13080,8 @@ var MenuComponent = function MenuComponent(props, ref) {
13087
13080
  disabled = true;
13088
13081
 
13089
13082
  if (rule !== false) {
13090
- OptionContent = function OptionContent(_ref3) {
13091
- var children = _ref3.children;
13083
+ OptionContent = function OptionContent(_ref2) {
13084
+ var children = _ref2.children;
13092
13085
  return React__default.createElement(Popup, Object.assign({
13093
13086
  on: 'click',
13094
13087
  position: 'left center',
@@ -13109,7 +13102,14 @@ var MenuComponent = function MenuComponent(props, ref) {
13109
13102
  }
13110
13103
 
13111
13104
  OptionContent.displayName = 'OptionContent';
13112
- var LabelComponent = option.labelComponent || props.label || EmptyLabel;
13105
+ var label = option.label;
13106
+ var labelOptions = filterObject(option, ['onClick', 'label', 'rules']);
13107
+ labelOptions.disabled = disabled;
13108
+ var LabelComponent = typeof label === 'function' ? label : function () {
13109
+ return React__default.createElement(React__default.Fragment, {
13110
+ children: label
13111
+ });
13112
+ };
13113
13113
  return React__default.createElement(React__default.Fragment, {
13114
13114
  key: index
13115
13115
  }, React__default.createElement(OptionContent, null, React__default.createElement(Option, {
@@ -14643,8 +14643,8 @@ var EmptyContentContainer = styled.div(_templateObject3$d || (_templateObject3$d
14643
14643
  });
14644
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
14645
 
14646
- var isAvailable = function isAvailable(index, option, rules) {
14647
- return !option.disabled && !(rules || []).some(function (rule) {
14646
+ var isAvailable = function isAvailable(index, option) {
14647
+ return !option.disabled && !(option.rules || []).some(function (rule) {
14648
14648
  return rule(index, option) !== true;
14649
14649
  });
14650
14650
  };
@@ -14654,8 +14654,7 @@ var useNavigation = function useNavigation(props) {
14654
14654
  highlight = _props$highlight[0],
14655
14655
  setHighlight = _props$highlight[1],
14656
14656
  options = props.options,
14657
- onSelectHighlight = props.onSelectHighlight,
14658
- rules = props.rules;
14657
+ onSelectHighlight = props.onSelectHighlight;
14659
14658
  var onKeyDown = useCallback(function (e) {
14660
14659
  if (e.key === 'ArrowDown') {
14661
14660
  e.preventDefault();
@@ -14664,7 +14663,7 @@ var useNavigation = function useNavigation(props) {
14664
14663
  var option = options[index];
14665
14664
  if (!option) return current;
14666
14665
 
14667
- if (isAvailable(index, option, rules)) {
14666
+ if (isAvailable(index, option)) {
14668
14667
  return index;
14669
14668
  }
14670
14669
 
@@ -14681,7 +14680,7 @@ var useNavigation = function useNavigation(props) {
14681
14680
  var option = options[index];
14682
14681
  if (!option) return current;
14683
14682
 
14684
- if (isAvailable(index, option, rules)) {
14683
+ if (isAvailable(index, option)) {
14685
14684
  return index;
14686
14685
  }
14687
14686
 
@@ -14699,7 +14698,7 @@ var useNavigation = function useNavigation(props) {
14699
14698
  onSelectHighlight(highlight, option);
14700
14699
  }
14701
14700
  }
14702
- }, [highlight, options, rules]);
14701
+ }, [highlight, options]);
14703
14702
 
14704
14703
  var onFocus = function onFocus() {
14705
14704
  setHighlight(0);
@@ -14751,22 +14750,40 @@ var Header$1 = function Header() {
14751
14750
  }));
14752
14751
  };
14753
14752
 
14754
- var getOptions = function getOptions(options, selected) {
14755
- return options.map(function (option) {
14753
+ var getOptions = function getOptions(onSelect, options, selected) {
14754
+ return options.map(function (option, index) {
14755
+ var value = option.value,
14756
+ onClick = option.onClick,
14757
+ rules = option.rules,
14758
+ disabled = option.disabled;
14756
14759
  var isSelected = option.value === (selected === null || selected === void 0 ? void 0 : selected.value);
14757
- var data = {
14758
- data: option.data,
14759
- value: option.value
14760
- };
14760
+
14761
+ var data = _extends({}, option.data, {
14762
+ selected: isSelected,
14763
+ value: value
14764
+ });
14765
+
14766
+ var LabelComponent = option.label;
14761
14767
  var parsed = {
14768
+ label: typeof LabelComponent !== 'function' ? LabelComponent : function (_ref) {
14769
+ var disabled = _ref.disabled;
14770
+ return React__default.createElement(LabelComponent, Object.assign({}, {
14771
+ value: value,
14772
+ data: data,
14773
+ disabled: disabled
14774
+ }));
14775
+ },
14776
+ onClick: onClick || function () {
14777
+ onSelect(index, option);
14778
+ },
14779
+ disabled: disabled,
14780
+ rules: rules,
14762
14781
  border: {
14763
14782
  left: {
14764
14783
  color: isSelected ? 'blue' : 'transparent'
14765
14784
  }
14766
14785
  },
14767
14786
  data: data,
14768
- label: option.label,
14769
- disabled: option.disabled,
14770
14787
  keepOpen: true
14771
14788
  };
14772
14789
  return parsed;
@@ -14783,32 +14800,28 @@ var getSelected = function getSelected(value, options) {
14783
14800
  };
14784
14801
 
14785
14802
  var getInputContent = function getInputContent(props, selectedOption) {
14786
- if (!props.optionLabel) return selectedOption.label;
14787
- var LabelComponent = props.optionLabel;
14788
- return React__default.createElement(LabelComponent, Object.assign({}, selectedOption, {
14803
+ if (typeof selectedOption.label !== 'function') return selectedOption.label;
14804
+ var LabelComponent = selectedOption.label;
14805
+ return React__default.createElement(LabelComponent, {
14806
+ data: _extends({}, selectedOption.data),
14807
+ value: selectedOption.value,
14789
14808
  disabled: props.disabled || props.loading,
14790
14809
  mode: 'placeholder'
14791
- }));
14810
+ });
14792
14811
  };
14793
14812
 
14794
- var useSelect = function useSelect(props, _ref, _ref2, setOpen) {
14795
- var highlight = _ref[0],
14796
- setHighlight = _ref[1];
14797
- var options = _ref2[0],
14798
- setOptions = _ref2[1];
14799
-
14800
- var _ref3 = typeof props.value === 'string' ? [getSelected(props.value, options), props.value] : [props.value, props.value.value],
14801
- selectedOption = _ref3[0],
14802
- value = _ref3[1];
14803
-
14804
- var parsedOptions = getOptions(options, selectedOption);
14813
+ var useSelect = function useSelect(props, _ref2, _ref3, setOpen) {
14814
+ var highlight = _ref2[0],
14815
+ setHighlight = _ref2[1];
14816
+ var options = _ref3[0],
14817
+ setOptions = _ref3[1];
14805
14818
 
14806
- var onReset = function onReset() {};
14807
-
14808
- var inputContent = selectedOption ? getInputContent(props, selectedOption) : props.value;
14819
+ var _ref4 = typeof props.value === 'string' ? [getSelected(props.value, options), props.value] : [props.value, props.value.value],
14820
+ selectedOption = _ref4[0],
14821
+ value = _ref4[1];
14809
14822
 
14810
14823
  var onSelect = function onSelect(index, option) {
14811
- if (!isAvailable(index, option, props.rules)) {
14824
+ if (!isAvailable(index, option)) {
14812
14825
  return;
14813
14826
  }
14814
14827
 
@@ -14817,6 +14830,11 @@ var useSelect = function useSelect(props, _ref, _ref2, setOpen) {
14817
14830
  setOpen(false);
14818
14831
  };
14819
14832
 
14833
+ var parsedOptions = getOptions(onSelect, options, selectedOption);
14834
+
14835
+ var onReset = function onReset() {};
14836
+
14837
+ var inputContent = selectedOption ? getInputContent(props, selectedOption) : props.value;
14820
14838
  var parsed = {
14821
14839
  parsedOptions: parsedOptions,
14822
14840
  options: [options, setOptions],
@@ -14827,13 +14845,9 @@ var useSelect = function useSelect(props, _ref, _ref2, setOpen) {
14827
14845
  before: React__default.createElement(React__default.Fragment, null, React__default.createElement(Header$1, null), React__default.createElement(HiddenInput, Object.assign({}, useNavigation({
14828
14846
  highlight: [highlight, setHighlight],
14829
14847
  options: options,
14830
- onSelectHighlight: onSelect,
14831
- rules: props.rules
14848
+ onSelectHighlight: onSelect
14832
14849
  })))),
14833
- maxHeight: props.maxHeight || props.search ? '238px' : '180px',
14834
- onClickOption: function onClickOption(index, option) {
14835
- onSelect(index, option);
14836
- }
14850
+ maxHeight: props.maxHeight || props.search ? '238px' : '180px'
14837
14851
  },
14838
14852
  getContext: function getContext(base, children) {
14839
14853
  return React__default.createElement(Provider$1.Provider, {
@@ -14991,7 +15005,7 @@ var Label$2 = function Label(props) {
14991
15005
  checked: checked.findIndex(function (e) {
14992
15006
  return e.value === value;
14993
15007
  }) !== -1,
14994
- label: LabelComponent ? React__default.createElement(LabelComponent, Object.assign({}, props.option)) : props.option.label,
15008
+ label: typeof LabelComponent !== 'function' ? LabelComponent : React__default.createElement(LabelComponent, Object.assign({}, props.option)),
14995
15009
  disabled: disabled,
14996
15010
  onChange: function onChange(event) {
14997
15011
  var isChecked = event.target.checked;
@@ -15024,16 +15038,28 @@ var Label$2 = function Label(props) {
15024
15038
  });
15025
15039
  };
15026
15040
 
15027
- var getOptions$1 = function getOptions(options) {
15041
+ var getOptions$1 = function getOptions(options, value) {
15028
15042
  return options.map(function (option) {
15043
+ var _label = option.label,
15044
+ onClick = option.onClick;
15029
15045
  var data = {
15030
15046
  data: option.data,
15031
15047
  value: option.value
15032
15048
  };
15033
15049
  var parsed = {
15050
+ label: function label(option) {
15051
+ return React__default.createElement(Label$2, {
15052
+ option: _extends({}, data, {
15053
+ disabled: option.disabled
15054
+ }),
15055
+ label: _label,
15056
+ value: value
15057
+ });
15058
+ },
15059
+ onClick: onClick,
15034
15060
  data: data,
15035
- label: option.label,
15036
15061
  disabled: option.disabled,
15062
+ rules: option.rules,
15037
15063
  keepOpen: true
15038
15064
  };
15039
15065
  return parsed;
@@ -15066,7 +15092,7 @@ var useSelectMultiple = function useSelectMultiple(props, _ref, _ref2) {
15066
15092
  checked = _useState[0],
15067
15093
  setChecked = _useState[1];
15068
15094
 
15069
- var parsedOptions = getOptions$1(options);
15095
+ var parsedOptions = getOptions$1(options, initial);
15070
15096
  var inputContent = getInputContent$1(props.value);
15071
15097
 
15072
15098
  var onReset = function onReset() {
@@ -15074,7 +15100,7 @@ var useSelectMultiple = function useSelectMultiple(props, _ref, _ref2) {
15074
15100
  };
15075
15101
 
15076
15102
  var onSelectHighlight = function onSelectHighlight(index, option) {
15077
- if (!isAvailable(index, option, props.rules)) {
15103
+ if (!isAvailable(index, option)) {
15078
15104
  return;
15079
15105
  }
15080
15106
 
@@ -15106,24 +15132,13 @@ var useSelectMultiple = function useSelectMultiple(props, _ref, _ref2) {
15106
15132
  before: React__default.createElement(React__default.Fragment, null, React__default.createElement(Header$2, null), React__default.createElement(HiddenInput, Object.assign({}, useNavigation({
15107
15133
  highlight: [highlight, setHighlight],
15108
15134
  options: options,
15109
- onSelectHighlight: onSelectHighlight,
15110
- rules: props.rules
15135
+ onSelectHighlight: onSelectHighlight
15111
15136
  })))),
15112
15137
  after: {
15113
15138
  fluid: true,
15114
15139
  children: React__default.createElement(Footer$1, null)
15115
15140
  },
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
- }
15141
+ maxHeight: props.maxHeight || (props.selectAll ? '269px' : '224px')
15127
15142
  },
15128
15143
  getContext: function getContext(base, children) {
15129
15144
  return React__default.createElement(Provider$2.Provider, {
@@ -15222,7 +15237,7 @@ var Select = React__default.forwardRef(function (props, ref) {
15222
15237
  setPage(1);
15223
15238
  };
15224
15239
 
15225
- var inputProps = filterObject(props, ['type', 'onScrollEnd', 'position', 'value', 'onClear', 'placeholder', 'initialLoader', 'onClickOption', 'rules', 'onScrollEnd', 'position', 'center', 'maxHeight', 'emptyContent', 'optionLabel']);
15240
+ var inputProps = filterObject(props, ['type', 'onScrollEnd', 'position', 'value', 'onClear', 'placeholder', 'initialLoader', 'onScrollEnd', 'position', 'center', 'maxHeight', 'emptyContent']);
15226
15241
 
15227
15242
  var _onScrollEnd = props.onScrollEnd || function () {};
15228
15243
 
@@ -15344,11 +15359,6 @@ var Select = React__default.forwardRef(function (props, ref) {
15344
15359
  }, {
15345
15360
  children: inputContent
15346
15361
  })), 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
15362
  highlight: highlight,
15353
15363
  open: open,
15354
15364
  close: function close() {
@@ -15696,7 +15706,15 @@ var Component = React__default.forwardRef(function (props, ref) {
15696
15706
 
15697
15707
  var options = Object.keys(countries).map(function (iso) {
15698
15708
  return {
15699
- label: country.name,
15709
+ label: function label(option) {
15710
+ var country = option.data;
15711
+ return React__default.createElement(Label$3, null, React__default.createElement(Flag, {
15712
+ iso: iso
15713
+ }), country.name, React__default.createElement("span", null, "+", country.ddi));
15714
+ },
15715
+ onClick: function onClick() {
15716
+ setCountry(countries[iso]);
15717
+ },
15700
15718
  data: countries[iso]
15701
15719
  };
15702
15720
  });
@@ -15762,16 +15780,6 @@ var Component = React__default.forwardRef(function (props, ref) {
15762
15780
  return setOpen(false);
15763
15781
  },
15764
15782
  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
- },
15775
15783
  width: '100%',
15776
15784
  maxHeight: '165px',
15777
15785
  bordered: true,
@@ -16844,29 +16852,6 @@ var Component$1 = React__default.forwardRef(function (props, ref) {
16844
16852
  ref: ref,
16845
16853
  readOnly: true
16846
16854
  }));
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
- }];
16870
16855
  return React__default.createElement(RelativeContainer$5, {
16871
16856
  ref: useOnClickOut(function () {
16872
16857
  return setOpen(null);
@@ -16927,16 +16912,33 @@ var Component$1 = React__default.forwardRef(function (props, ref) {
16927
16912
  references: {
16928
16913
  bottom: '35px'
16929
16914
  },
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
- },
16915
+ options: [{
16916
+ label: 'Hoje',
16917
+ onClick: function onClick() {
16918
+ return setValue(intervalTypes.day.initial(props.min));
16919
+ },
16920
+ data: {}
16921
+ }, {
16922
+ label: 'Semana',
16923
+ onClick: function onClick() {
16924
+ return setValue(intervalTypes.week.initial(props.min));
16925
+ },
16926
+ data: {}
16927
+ }, {
16928
+ label: 'Mês',
16929
+ onClick: function onClick() {
16930
+ return setValue(intervalTypes.month.initial(props.min));
16931
+ },
16932
+ data: {}
16933
+ }, {
16934
+ label: 'Personalizado',
16935
+ onClick: function onClick() {
16936
+ return setOpen('calendar');
16937
+ },
16938
+ data: {},
16939
+ keepOpen: true,
16940
+ caret: true
16941
+ }],
16940
16942
  width: '165px',
16941
16943
  itemSpacing: 's3',
16942
16944
  bordered: true
@@ -16947,9 +16949,9 @@ var Component$1 = React__default.forwardRef(function (props, ref) {
16947
16949
  open: open === 'calendar',
16948
16950
  initialValue: value,
16949
16951
  onSubmit: {
16950
- onClick: function onClick(_ref3) {
16951
- var start = _ref3[0],
16952
- end = _ref3[1];
16952
+ onClick: function onClick(_ref2) {
16953
+ var start = _ref2[0],
16954
+ end = _ref2[1];
16953
16955
  if (start === null || end === null) return;
16954
16956
  setValue([start, end]);
16955
16957
  setOpen(null);
@@ -17927,7 +17929,8 @@ var getInstance = function getInstance(props) {
17927
17929
  var _getOptions = function _getOptions(value) {
17928
17930
  try {
17929
17931
  var options = intialOptions.filter(function (option) {
17930
- return strCmp(option.label, value, {
17932
+ var label = isString(option.label) ? option.label : option.label.text;
17933
+ return strCmp(label, value, {
17931
17934
  contain: true
17932
17935
  });
17933
17936
  });
@@ -18092,8 +18095,9 @@ var Submenu = function Submenu(props) {
18092
18095
 
18093
18096
  var optionsParser = function optionsParser(option) {
18094
18097
  return {
18095
- label: option.label,
18096
- data: option.data
18098
+ label: typeof option.label === 'string' ? option.label : option.label.element,
18099
+ onClick: onClickOption,
18100
+ data: {}
18097
18101
  };
18098
18102
  };
18099
18103
 
@@ -18111,8 +18115,6 @@ var Submenu = function Submenu(props) {
18111
18115
  close: close,
18112
18116
  width: isDynamic ? '275px' : '160px',
18113
18117
  height: '261px',
18114
- onClickOption: onClickOption,
18115
- label: props.optionLabel,
18116
18118
  containerSpacing: {
18117
18119
  top: 's3',
18118
18120
  left: 's1',
@@ -18157,11 +18159,16 @@ var FiltersMenu = function FiltersMenu(props) {
18157
18159
 
18158
18160
  var items = props.items.map(function (item) {
18159
18161
  return {
18160
- label: item.label,
18162
+ label: typeof item.label === 'string' ? item.label : item.label.element,
18161
18163
  delimiter: item.delimiter,
18162
18164
  keepOpen: true,
18163
18165
  caret: true,
18164
- data: item
18166
+ onClick: function onClick(index) {
18167
+ setActive(function (prev) {
18168
+ return prev === index ? -1 : index;
18169
+ });
18170
+ },
18171
+ data: {}
18165
18172
  };
18166
18173
  });
18167
18174
  var selected = active >= 0 && active < props.items.length ? props.items[active] : undefined;
@@ -18175,12 +18182,6 @@ var FiltersMenu = function FiltersMenu(props) {
18175
18182
  close: close,
18176
18183
  width: '160px',
18177
18184
  maxHeight: '261px',
18178
- onClickOption: function onClickOption(index) {
18179
- setActive(function (prev) {
18180
- return prev === index ? -1 : index;
18181
- });
18182
- },
18183
- label: props.filterLabel,
18184
18185
  containerSpacing: {
18185
18186
  top: 's1',
18186
18187
  left: 's1',
@@ -18198,7 +18199,6 @@ var FiltersMenu = function FiltersMenu(props) {
18198
18199
  }
18199
18200
  }, props.containerProps || {}), React__default.createElement(Submenu, {
18200
18201
  item: selected,
18201
- optionLabel: props.optionLabel && selected ? props.optionLabel[selected.name] : undefined,
18202
18202
  close: function close() {
18203
18203
  return setActive(-1);
18204
18204
  },
@@ -18213,7 +18213,7 @@ var Filters = Object.assign(function (props) {
18213
18213
  setAppliedFilters = props.setAppliedFilters,
18214
18214
  containerProps = props.containerProps,
18215
18215
  subContainerProps = props.subContainerProps;
18216
- var buttonProps = filterObject(props, ['items', 'setAppliedFilters', 'filterLabel', 'optionLabel']);
18216
+ var buttonProps = filterObject(props, ['items', 'setAppliedFilters']);
18217
18217
  return React__default.createElement(Button$5, Object.assign({}, buttonProps, {
18218
18218
  gap: 's4',
18219
18219
  getContent: function getContent(open, close) {
@@ -18223,9 +18223,7 @@ var Filters = Object.assign(function (props) {
18223
18223
  setAppliedFilters: setAppliedFilters,
18224
18224
  items: items,
18225
18225
  containerProps: containerProps,
18226
- subContainerProps: subContainerProps,
18227
- filterLabel: props.filterLabel,
18228
- optionLabel: props.optionLabel
18226
+ subContainerProps: subContainerProps
18229
18227
  }));
18230
18228
  }
18231
18229
  }), "Filtros");