magneto365.ui 2.43.2 → 2.43.4

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.
package/dist/esm/index.js CHANGED
@@ -4377,8 +4377,8 @@ var Tags = function (_a) {
4377
4377
  var styles$z = {"magneto-ui-toggle-button":"mg_toggle_button_magneto-ui-toggle-button_nfgc1","toggle-button-selected":"mg_toggle_button_toggle-button-selected_nfgc1"};
4378
4378
 
4379
4379
  var Component$D = function (_a) {
4380
- var className = _a.className, color = _a.color, onChange = _a.onChange, id = _a.id, name = _a.name, currentSelect = _a.currentSelect;
4381
- var _b = useState(''), isSelected = _b[0], setIsSelected = _b[1];
4380
+ var className = _a.className, color = _a.color, onChange = _a.onChange, id = _a.id, name = _a.name, currentSelect = _a.currentSelect, _b = _a.baseColor, baseColor = _b === void 0 ? 'transparent' : _b;
4381
+ var _c = useState(''), isSelected = _c[0], setIsSelected = _c[1];
4382
4382
  var isColorDark = function (color) {
4383
4383
  var hex = color.replace('#', '');
4384
4384
  var r = parseInt(hex.substring(0, 2), 16);
@@ -4407,9 +4407,10 @@ var Component$D = function (_a) {
4407
4407
  };
4408
4408
  }
4409
4409
  return {
4410
- backgroundColor: 'transparent'
4410
+ backgroundColor: baseColor,
4411
+ color: textColor
4411
4412
  };
4412
- }, [color, currentSelect, isSelected]);
4413
+ }, [baseColor, color, currentSelect, isSelected]);
4413
4414
  return (React.createElement("button", { className: "".concat(styles$z["".concat(classMUI, "-toggle-button")], " ").concat(className || '', " ").concat(isSelected || currentSelect ? styles$z['toggle-button-selected'] : ''), style: __assign({}, selectStyles), onClick: function () { return handleClick({ id: id, name: name }); }, type: "button" }, name));
4414
4415
  };
4415
4416
  var ToggleButton = Component$D;
@@ -6203,7 +6204,7 @@ var Component$c = function (_a) {
6203
6204
  */
6204
6205
  var Select2Input = Component$c;
6205
6206
 
6206
- var styles$9 = {"magneto-ui-select2-list":"mg_select2_list_magneto-ui-select2-list_2hiux","magneto-ui-select2-list--desktop":"mg_select2_list_magneto-ui-select2-list--desktop_2hiux","magneto-ui-select2-list__item--is-selected":"mg_select2_list_magneto-ui-select2-list_item--is-selected_2hiux","magneto-ui-select2-list__item--not-selected":"mg_select2_list_magneto-ui-select2-list_item--not-selected_2hiux"};
6207
+ var styles$9 = {"magneto-ui-select2-list":"mg_select2_list_magneto-ui-select2-list_vqso0","magneto-ui-select2-list--desktop":"mg_select2_list_magneto-ui-select2-list--desktop_vqso0","magneto-ui-select2-list__item--is-selected":"mg_select2_list_magneto-ui-select2-list_item--is-selected_vqso0","magneto-ui-select2-list__item--not-selected":"mg_select2_list_magneto-ui-select2-list_item--not-selected_vqso0"};
6207
6208
 
6208
6209
  var Component$b = function (_a) {
6209
6210
  var disabledList = _a.disabledList, isMobile = _a.isMobile, list = _a.list, onSelected = _a.onSelected, selected = _a.selected, visible = _a.visible, render = _a.render;
@@ -6259,7 +6260,7 @@ var Component$a = function (_a) {
6259
6260
  setIsModalOpen(visible);
6260
6261
  }, []);
6261
6262
  return (React.createElement(React.Fragment, null,
6262
- React.createElement(Select2Input, { searchValue: searchValue, placeholder: placeholder, clickOut: false, disabled: disabled, handleSearch: handleSearch, setClickOut: function () { return handleVisible(true); }, disableList: disableList, isMultiple: isMultiple, icon: icon, valueSelected: valueSelected }),
6263
+ React.createElement(Select2Input, { searchValue: searchValue, placeholder: placeholder, clickOut: false, disabled: disabled, handleSearch: handleSearch, setClickOut: function () { return handleVisible(true); }, disableList: disableList, isMultiple: isMultiple, icon: icon, valueSelected: valueSelected, setTerm: setTerm }),
6263
6264
  React.createElement(Select2Tags, { onRemove: removeValue, tags: valueSelected, visible: haveTags }),
6264
6265
  React.createElement(MobileDrawer, { isOpen: isModalOpen && !disableList, onClose: function () { return handleVisible(false); }, className: CNM.get({ styles: styles$8, cls: ['select2-desktop', className] }) },
6265
6266
  React.createElement(Select2Input, { searchValue: searchValue, placeholder: placeholder, clickOut: true, disabled: disabled, handleSearch: handleSearch, setClickOut: setClickOut, disableList: disableList, icon: icon, valueSelected: valueSelected, name: "".concat(placeholder, "-mobile"), isMultiple: isMultiple, setTerm: setTerm }),