@mw-kit/mw-ui 1.7.95 → 1.7.97

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,9 +14643,9 @@ 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) {
14648
- return rule(index, option) !== true;
14646
+ var isAvailable = function isAvailable(index, option) {
14647
+ return !option.disabled && !(option.rules || []).some(function (rule) {
14648
+ return rule(index, option.data) !== true;
14649
14649
  });
14650
14650
  };
14651
14651
 
@@ -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,10 +14698,12 @@ 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
- setHighlight(0);
14704
+ setHighlight(options.findIndex(function (e, i) {
14705
+ return isAvailable(i, e);
14706
+ }));
14706
14707
  };
14707
14708
 
14708
14709
  var onBlur = function onBlur() {
@@ -14751,22 +14752,40 @@ var Header$1 = function Header() {
14751
14752
  }));
14752
14753
  };
14753
14754
 
14754
- var getOptions = function getOptions(options, selected) {
14755
- return options.map(function (option) {
14755
+ var getOptions = function getOptions(onSelect, options, selected) {
14756
+ return options.map(function (option, index) {
14757
+ var value = option.value,
14758
+ onClick = option.onClick,
14759
+ rules = option.rules,
14760
+ disabled = option.disabled;
14756
14761
  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
- };
14762
+
14763
+ var data = _extends({}, option.data, {
14764
+ selected: isSelected,
14765
+ value: value
14766
+ });
14767
+
14768
+ var LabelComponent = option.label;
14761
14769
  var parsed = {
14770
+ label: typeof LabelComponent !== 'function' ? LabelComponent : function (_ref) {
14771
+ var disabled = _ref.disabled;
14772
+ return React__default.createElement(LabelComponent, Object.assign({}, {
14773
+ value: value,
14774
+ data: data,
14775
+ disabled: disabled
14776
+ }));
14777
+ },
14778
+ onClick: onClick || function () {
14779
+ onSelect(index, option);
14780
+ },
14781
+ disabled: disabled,
14782
+ rules: rules,
14762
14783
  border: {
14763
14784
  left: {
14764
14785
  color: isSelected ? 'blue' : 'transparent'
14765
14786
  }
14766
14787
  },
14767
14788
  data: data,
14768
- label: option.label,
14769
- disabled: option.disabled,
14770
14789
  keepOpen: true
14771
14790
  };
14772
14791
  return parsed;
@@ -14783,32 +14802,28 @@ var getSelected = function getSelected(value, options) {
14783
14802
  };
14784
14803
 
14785
14804
  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, {
14805
+ if (typeof selectedOption.label !== 'function') return selectedOption.label;
14806
+ var LabelComponent = selectedOption.label;
14807
+ return React__default.createElement(LabelComponent, {
14808
+ data: _extends({}, selectedOption.data),
14809
+ value: selectedOption.value,
14789
14810
  disabled: props.disabled || props.loading,
14790
14811
  mode: 'placeholder'
14791
- }));
14812
+ });
14792
14813
  };
14793
14814
 
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];
14815
+ var useSelect = function useSelect(props, _ref2, _ref3, setOpen) {
14816
+ var highlight = _ref2[0],
14817
+ setHighlight = _ref2[1];
14818
+ var options = _ref3[0],
14819
+ setOptions = _ref3[1];
14803
14820
 
14804
- var parsedOptions = getOptions(options, selectedOption);
14805
-
14806
- var onReset = function onReset() {};
14807
-
14808
- var inputContent = selectedOption ? getInputContent(props, selectedOption) : props.value;
14821
+ var _ref4 = typeof props.value === 'string' ? [getSelected(props.value, options), props.value] : [props.value, props.value.value],
14822
+ selectedOption = _ref4[0],
14823
+ value = _ref4[1];
14809
14824
 
14810
14825
  var onSelect = function onSelect(index, option) {
14811
- if (!isAvailable(index, option, props.rules)) {
14826
+ if (!isAvailable(index, option)) {
14812
14827
  return;
14813
14828
  }
14814
14829
 
@@ -14817,6 +14832,11 @@ var useSelect = function useSelect(props, _ref, _ref2, setOpen) {
14817
14832
  setOpen(false);
14818
14833
  };
14819
14834
 
14835
+ var parsedOptions = getOptions(onSelect, options, selectedOption);
14836
+
14837
+ var onReset = function onReset() {};
14838
+
14839
+ var inputContent = selectedOption ? getInputContent(props, selectedOption) : props.value;
14820
14840
  var parsed = {
14821
14841
  parsedOptions: parsedOptions,
14822
14842
  options: [options, setOptions],
@@ -14827,13 +14847,9 @@ var useSelect = function useSelect(props, _ref, _ref2, setOpen) {
14827
14847
  before: React__default.createElement(React__default.Fragment, null, React__default.createElement(Header$1, null), React__default.createElement(HiddenInput, Object.assign({}, useNavigation({
14828
14848
  highlight: [highlight, setHighlight],
14829
14849
  options: options,
14830
- onSelectHighlight: onSelect,
14831
- rules: props.rules
14850
+ onSelectHighlight: onSelect
14832
14851
  })))),
14833
- maxHeight: props.maxHeight || props.search ? '238px' : '180px',
14834
- onClickOption: function onClickOption(index, option) {
14835
- onSelect(index, option);
14836
- }
14852
+ maxHeight: props.maxHeight || props.search ? '238px' : '180px'
14837
14853
  },
14838
14854
  getContext: function getContext(base, children) {
14839
14855
  return React__default.createElement(Provider$1.Provider, {
@@ -14991,7 +15007,7 @@ var Label$2 = function Label(props) {
14991
15007
  checked: checked.findIndex(function (e) {
14992
15008
  return e.value === value;
14993
15009
  }) !== -1,
14994
- label: LabelComponent ? React__default.createElement(LabelComponent, Object.assign({}, props.option)) : props.option.label,
15010
+ label: typeof LabelComponent !== 'function' ? LabelComponent : React__default.createElement(LabelComponent, Object.assign({}, props.option)),
14995
15011
  disabled: disabled,
14996
15012
  onChange: function onChange(event) {
14997
15013
  var isChecked = event.target.checked;
@@ -15024,16 +15040,28 @@ var Label$2 = function Label(props) {
15024
15040
  });
15025
15041
  };
15026
15042
 
15027
- var getOptions$1 = function getOptions(options) {
15043
+ var getOptions$1 = function getOptions(options, value) {
15028
15044
  return options.map(function (option) {
15045
+ var _label = option.label,
15046
+ onClick = option.onClick;
15029
15047
  var data = {
15030
15048
  data: option.data,
15031
15049
  value: option.value
15032
15050
  };
15033
15051
  var parsed = {
15052
+ label: function label(option) {
15053
+ return React__default.createElement(Label$2, {
15054
+ option: _extends({}, data, {
15055
+ disabled: option.disabled
15056
+ }),
15057
+ label: _label,
15058
+ value: value
15059
+ });
15060
+ },
15061
+ onClick: onClick,
15034
15062
  data: data,
15035
- label: option.label,
15036
15063
  disabled: option.disabled,
15064
+ rules: option.rules,
15037
15065
  keepOpen: true
15038
15066
  };
15039
15067
  return parsed;
@@ -15066,7 +15094,7 @@ var useSelectMultiple = function useSelectMultiple(props, _ref, _ref2) {
15066
15094
  checked = _useState[0],
15067
15095
  setChecked = _useState[1];
15068
15096
 
15069
- var parsedOptions = getOptions$1(options);
15097
+ var parsedOptions = getOptions$1(options, initial);
15070
15098
  var inputContent = getInputContent$1(props.value);
15071
15099
 
15072
15100
  var onReset = function onReset() {
@@ -15074,7 +15102,7 @@ var useSelectMultiple = function useSelectMultiple(props, _ref, _ref2) {
15074
15102
  };
15075
15103
 
15076
15104
  var onSelectHighlight = function onSelectHighlight(index, option) {
15077
- if (!isAvailable(index, option, props.rules)) {
15105
+ if (!isAvailable(index, option)) {
15078
15106
  return;
15079
15107
  }
15080
15108
 
@@ -15106,24 +15134,13 @@ var useSelectMultiple = function useSelectMultiple(props, _ref, _ref2) {
15106
15134
  before: React__default.createElement(React__default.Fragment, null, React__default.createElement(Header$2, null), React__default.createElement(HiddenInput, Object.assign({}, useNavigation({
15107
15135
  highlight: [highlight, setHighlight],
15108
15136
  options: options,
15109
- onSelectHighlight: onSelectHighlight,
15110
- rules: props.rules
15137
+ onSelectHighlight: onSelectHighlight
15111
15138
  })))),
15112
15139
  after: {
15113
15140
  fluid: true,
15114
15141
  children: React__default.createElement(Footer$1, null)
15115
15142
  },
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
- }
15143
+ maxHeight: props.maxHeight || (props.selectAll ? '269px' : '224px')
15127
15144
  },
15128
15145
  getContext: function getContext(base, children) {
15129
15146
  return React__default.createElement(Provider$2.Provider, {
@@ -15222,7 +15239,7 @@ var Select = React__default.forwardRef(function (props, ref) {
15222
15239
  setPage(1);
15223
15240
  };
15224
15241
 
15225
- var inputProps = filterObject(props, ['type', 'onScrollEnd', 'position', 'value', 'onClear', 'placeholder', 'initialLoader', 'onClickOption', 'rules', 'onScrollEnd', 'position', 'center', 'maxHeight', 'emptyContent', 'optionLabel']);
15242
+ var inputProps = filterObject(props, ['type', 'onScrollEnd', 'position', 'value', 'onClear', 'placeholder', 'initialLoader', 'onScrollEnd', 'position', 'center', 'maxHeight', 'emptyContent']);
15226
15243
 
15227
15244
  var _onScrollEnd = props.onScrollEnd || function () {};
15228
15245
 
@@ -15344,11 +15361,6 @@ var Select = React__default.forwardRef(function (props, ref) {
15344
15361
  }, {
15345
15362
  children: inputContent
15346
15363
  })), 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
15364
  highlight: highlight,
15353
15365
  open: open,
15354
15366
  close: function close() {
@@ -15696,7 +15708,15 @@ var Component = React__default.forwardRef(function (props, ref) {
15696
15708
 
15697
15709
  var options = Object.keys(countries).map(function (iso) {
15698
15710
  return {
15699
- label: country.name,
15711
+ label: function label(option) {
15712
+ var country = option.data;
15713
+ return React__default.createElement(Label$3, null, React__default.createElement(Flag, {
15714
+ iso: iso
15715
+ }), country.name, React__default.createElement("span", null, "+", country.ddi));
15716
+ },
15717
+ onClick: function onClick() {
15718
+ setCountry(countries[iso]);
15719
+ },
15700
15720
  data: countries[iso]
15701
15721
  };
15702
15722
  });
@@ -15762,16 +15782,6 @@ var Component = React__default.forwardRef(function (props, ref) {
15762
15782
  return setOpen(false);
15763
15783
  },
15764
15784
  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
15785
  width: '100%',
15776
15786
  maxHeight: '165px',
15777
15787
  bordered: true,
@@ -16844,29 +16854,6 @@ var Component$1 = React__default.forwardRef(function (props, ref) {
16844
16854
  ref: ref,
16845
16855
  readOnly: true
16846
16856
  }));
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
16857
  return React__default.createElement(RelativeContainer$5, {
16871
16858
  ref: useOnClickOut(function () {
16872
16859
  return setOpen(null);
@@ -16927,16 +16914,33 @@ var Component$1 = React__default.forwardRef(function (props, ref) {
16927
16914
  references: {
16928
16915
  bottom: '35px'
16929
16916
  },
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
- },
16917
+ options: [{
16918
+ label: 'Hoje',
16919
+ onClick: function onClick() {
16920
+ return setValue(intervalTypes.day.initial(props.min));
16921
+ },
16922
+ data: {}
16923
+ }, {
16924
+ label: 'Semana',
16925
+ onClick: function onClick() {
16926
+ return setValue(intervalTypes.week.initial(props.min));
16927
+ },
16928
+ data: {}
16929
+ }, {
16930
+ label: 'Mês',
16931
+ onClick: function onClick() {
16932
+ return setValue(intervalTypes.month.initial(props.min));
16933
+ },
16934
+ data: {}
16935
+ }, {
16936
+ label: 'Personalizado',
16937
+ onClick: function onClick() {
16938
+ return setOpen('calendar');
16939
+ },
16940
+ data: {},
16941
+ keepOpen: true,
16942
+ caret: true
16943
+ }],
16940
16944
  width: '165px',
16941
16945
  itemSpacing: 's3',
16942
16946
  bordered: true
@@ -16947,9 +16951,9 @@ var Component$1 = React__default.forwardRef(function (props, ref) {
16947
16951
  open: open === 'calendar',
16948
16952
  initialValue: value,
16949
16953
  onSubmit: {
16950
- onClick: function onClick(_ref3) {
16951
- var start = _ref3[0],
16952
- end = _ref3[1];
16954
+ onClick: function onClick(_ref2) {
16955
+ var start = _ref2[0],
16956
+ end = _ref2[1];
16953
16957
  if (start === null || end === null) return;
16954
16958
  setValue([start, end]);
16955
16959
  setOpen(null);
@@ -17927,7 +17931,8 @@ var getInstance = function getInstance(props) {
17927
17931
  var _getOptions = function _getOptions(value) {
17928
17932
  try {
17929
17933
  var options = intialOptions.filter(function (option) {
17930
- return strCmp(option.label, value, {
17934
+ var label = isString(option.label) ? option.label : option.label.text;
17935
+ return strCmp(label, value, {
17931
17936
  contain: true
17932
17937
  });
17933
17938
  });
@@ -18092,8 +18097,9 @@ var Submenu = function Submenu(props) {
18092
18097
 
18093
18098
  var optionsParser = function optionsParser(option) {
18094
18099
  return {
18095
- label: option.label,
18096
- data: option.data
18100
+ label: typeof option.label === 'string' ? option.label : option.label.element,
18101
+ onClick: onClickOption,
18102
+ data: {}
18097
18103
  };
18098
18104
  };
18099
18105
 
@@ -18111,8 +18117,6 @@ var Submenu = function Submenu(props) {
18111
18117
  close: close,
18112
18118
  width: isDynamic ? '275px' : '160px',
18113
18119
  height: '261px',
18114
- onClickOption: onClickOption,
18115
- label: props.optionLabel,
18116
18120
  containerSpacing: {
18117
18121
  top: 's3',
18118
18122
  left: 's1',
@@ -18157,11 +18161,16 @@ var FiltersMenu = function FiltersMenu(props) {
18157
18161
 
18158
18162
  var items = props.items.map(function (item) {
18159
18163
  return {
18160
- label: item.label,
18164
+ label: typeof item.label === 'string' ? item.label : item.label.element,
18161
18165
  delimiter: item.delimiter,
18162
18166
  keepOpen: true,
18163
18167
  caret: true,
18164
- data: item
18168
+ onClick: function onClick(index) {
18169
+ setActive(function (prev) {
18170
+ return prev === index ? -1 : index;
18171
+ });
18172
+ },
18173
+ data: {}
18165
18174
  };
18166
18175
  });
18167
18176
  var selected = active >= 0 && active < props.items.length ? props.items[active] : undefined;
@@ -18175,12 +18184,6 @@ var FiltersMenu = function FiltersMenu(props) {
18175
18184
  close: close,
18176
18185
  width: '160px',
18177
18186
  maxHeight: '261px',
18178
- onClickOption: function onClickOption(index) {
18179
- setActive(function (prev) {
18180
- return prev === index ? -1 : index;
18181
- });
18182
- },
18183
- label: props.filterLabel,
18184
18187
  containerSpacing: {
18185
18188
  top: 's1',
18186
18189
  left: 's1',
@@ -18198,7 +18201,6 @@ var FiltersMenu = function FiltersMenu(props) {
18198
18201
  }
18199
18202
  }, props.containerProps || {}), React__default.createElement(Submenu, {
18200
18203
  item: selected,
18201
- optionLabel: props.optionLabel && selected ? props.optionLabel[selected.name] : undefined,
18202
18204
  close: function close() {
18203
18205
  return setActive(-1);
18204
18206
  },
@@ -18213,7 +18215,7 @@ var Filters = Object.assign(function (props) {
18213
18215
  setAppliedFilters = props.setAppliedFilters,
18214
18216
  containerProps = props.containerProps,
18215
18217
  subContainerProps = props.subContainerProps;
18216
- var buttonProps = filterObject(props, ['items', 'setAppliedFilters', 'filterLabel', 'optionLabel']);
18218
+ var buttonProps = filterObject(props, ['items', 'setAppliedFilters']);
18217
18219
  return React__default.createElement(Button$5, Object.assign({}, buttonProps, {
18218
18220
  gap: 's4',
18219
18221
  getContent: function getContent(open, close) {
@@ -18223,9 +18225,7 @@ var Filters = Object.assign(function (props) {
18223
18225
  setAppliedFilters: setAppliedFilters,
18224
18226
  items: items,
18225
18227
  containerProps: containerProps,
18226
- subContainerProps: subContainerProps,
18227
- filterLabel: props.filterLabel,
18228
- optionLabel: props.optionLabel
18228
+ subContainerProps: subContainerProps
18229
18229
  }));
18230
18230
  }
18231
18231
  }), "Filtros");