magneto365.ui 2.48.0 → 2.48.3

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.
Files changed (26) hide show
  1. package/dist/cjs/css/magneto.ui.lib.min.css +1 -1
  2. package/dist/cjs/index.js +90 -82
  3. package/dist/cjs/index.js.map +1 -1
  4. package/dist/cjs/types/components/UI/molecules/MobileDrawer/MobileDrawer.component.d.ts +2 -2
  5. package/dist/cjs/types/components/UI/molecules/MobileDrawer/MobileDrawer.interface.d.ts +1 -1
  6. package/dist/cjs/types/components/UI/molecules/SearchButton/SearchButton.component.d.ts +4 -1
  7. package/dist/cjs/types/components/UI/organism/MobileDrawer/MobileDrawerMenu.interface.d.ts +2 -2
  8. package/dist/cjs/types/components/UI/organism/Select/Select.component.d.ts +5 -4
  9. package/dist/cjs/types/components/UI/organism/Select/Select.interface.d.ts +2 -0
  10. package/dist/cjs/types/components/UI/organism/Select/children/SelectClickout/SelectClickout.component.d.ts +2 -1
  11. package/dist/cjs/types/components/UI/organism/Select/children/SelectInput/SelectInput.component.d.ts +1 -1
  12. package/dist/cjs/types/constants/stories/vacancies.constants.d.ts +1 -1
  13. package/dist/esm/css/magneto.ui.lib.min.css +1 -1
  14. package/dist/esm/index.js +90 -82
  15. package/dist/esm/index.js.map +1 -1
  16. package/dist/esm/types/components/UI/molecules/MobileDrawer/MobileDrawer.component.d.ts +2 -2
  17. package/dist/esm/types/components/UI/molecules/MobileDrawer/MobileDrawer.interface.d.ts +1 -1
  18. package/dist/esm/types/components/UI/molecules/SearchButton/SearchButton.component.d.ts +4 -1
  19. package/dist/esm/types/components/UI/organism/MobileDrawer/MobileDrawerMenu.interface.d.ts +2 -2
  20. package/dist/esm/types/components/UI/organism/Select/Select.component.d.ts +5 -4
  21. package/dist/esm/types/components/UI/organism/Select/Select.interface.d.ts +2 -0
  22. package/dist/esm/types/components/UI/organism/Select/children/SelectClickout/SelectClickout.component.d.ts +2 -1
  23. package/dist/esm/types/components/UI/organism/Select/children/SelectInput/SelectInput.component.d.ts +1 -1
  24. package/dist/esm/types/constants/stories/vacancies.constants.d.ts +1 -1
  25. package/dist/index.d.ts +15 -10
  26. package/package.json +1 -1
package/dist/esm/index.js CHANGED
@@ -796,8 +796,54 @@ var DrawerPortal = function (_a) {
796
796
  return mounted && portalNode.current ? ReactDOM.createPortal(children, portalNode.current) : null;
797
797
  };
798
798
 
799
- var style$U = {"magneto-ui-mobile-drawer":"mg_mobile_drawer_magneto-ui-mobile-drawer_kxkzo","magneto-ui-close-button":"mg_mobile_drawer_magneto-ui-close-button_kxkzo","magneto-ui-container":"mg_mobile_drawer_magneto-ui-container_kxkzo","background-drawer":"mg_mobile_drawer_background-drawer_kxkzo","fadeIn":"mg_mobile_drawer_fadeIn_kxkzo","show":"mg_mobile_drawer_show_kxkzo","hidden":"mg_mobile_drawer_hidden_kxkzo"};
799
+ var style$U = {"magneto-ui-mobile-drawer":"mg_mobile_drawer_magneto-ui-mobile-drawer_1e2s0","magneto-ui-close-button":"mg_mobile_drawer_magneto-ui-close-button_1e2s0","magneto-ui-container":"mg_mobile_drawer_magneto-ui-container_1e2s0","background-drawer":"mg_mobile_drawer_background-drawer_1e2s0","fadeIn":"mg_mobile_drawer_fadeIn_1e2s0","show":"mg_mobile_drawer_show_1e2s0","hidden":"mg_mobile_drawer_hidden_1e2s0"};
800
800
 
801
+ function formatNumber(num) {
802
+ if (typeof num !== 'number')
803
+ return num;
804
+ return new Intl.NumberFormat().format(num);
805
+ }
806
+ var notNumberRegex = new RegExp('\\D*', 'g');
807
+
808
+ var isDate = function (value) {
809
+ return value instanceof Date && !isNaN(value.valueOf());
810
+ };
811
+
812
+ var stubTrue = function () { return true; };
813
+ var stubUndefined = function () { return undefined; };
814
+
815
+ var classNames = {
816
+ bind: function (stylesObj) {
817
+ return function () {
818
+ var params = [];
819
+ for (var _i = 0; _i < arguments.length; _i++) {
820
+ params[_i] = arguments[_i];
821
+ }
822
+ return params
823
+ // avoid nullish
824
+ .filter(function (param) { return param != null; })
825
+ .map(function (cls) {
826
+ var _a;
827
+ if (typeof cls === 'string')
828
+ return (_a = stylesObj[cls]) !== null && _a !== void 0 ? _a : cls;
829
+ return Object.entries(cls)
830
+ .filter(function (_a) {
831
+ var value = _a[1];
832
+ return value;
833
+ })
834
+ .map(function (_a) {
835
+ var _b;
836
+ var key = _a[0];
837
+ return (_b = stylesObj[key]) !== null && _b !== void 0 ? _b : key;
838
+ })
839
+ .join(' ');
840
+ })
841
+ .join(' ');
842
+ };
843
+ }
844
+ };
845
+
846
+ var cx$6 = classNames.bind(style$U);
801
847
  var Component$1X = function (_a) {
802
848
  var onClose = _a.onClose, isOpen = _a.isOpen, children = _a.children, _b = _a.className, className = _b === void 0 ? '' : _b, _c = _a.blockBackgroundClose, blockBackgroundClose = _c === void 0 ? false : _c;
803
849
  var _d = useState(false), showContent = _d[0], setShowContent = _d[1];
@@ -824,12 +870,12 @@ var Component$1X = function (_a) {
824
870
  };
825
871
  }, [isOpen]);
826
872
  return (React.createElement(React.Fragment, null, renderPortal && (React.createElement(DrawerPortal, null,
827
- React.createElement("div", { className: "".concat(style$U['magneto-ui-mobile-drawer'], " ").concat(className) },
873
+ React.createElement("div", { className: cx$6('magneto-ui-mobile-drawer', className) },
828
874
  React.createElement("aside", { className: style$U[showMenu] },
829
- React.createElement("button", { title: "cerrar modal", className: style$U['magneto-ui-close-button'], onClick: onClose },
875
+ React.createElement("button", { title: "close-modal", className: cx$6('magneto-ui-close-button'), onClick: onClose },
830
876
  React.createElement(IconItem, { icon: Add, hover: false })),
831
- React.createElement("div", { className: style$U['magneto-ui-container'] }, children)),
832
- isOpen && (React.createElement("span", { className: "".concat(style$U['background-drawer']), onClick: blockBackgroundClose ? function () { return null; } : onClose })))))));
877
+ React.createElement("div", { className: cx$6('magneto-ui-container') }, children)),
878
+ isOpen && (React.createElement("span", { className: cx$6('background-drawer'), onClick: blockBackgroundClose ? function () { return null; } : onClose })))))));
833
879
  };
834
880
  /**
835
881
  * Molecule UI component for Mobile Drawer
@@ -1099,7 +1145,7 @@ var EXPANDABLE_INFO_ACTION_ICONS = {
1099
1145
  _c)
1100
1146
  };
1101
1147
 
1102
- var styles$1Q = {"magneto-ui-expandable-info-action__button":"mg_expandable_info_action_magneto-ui-expandable-info-action_button_11ax1","magneto-ui-expandable-info-action__button--dark-blue":"mg_expandable_info_action_magneto-ui-expandable-info-action_button--dark-blue_11ax1","magneto-ui-expandable-info-action__button--light-blue":"mg_expandable_info_action_magneto-ui-expandable-info-action_button--light-blue_11ax1","magneto-ui-expandable-info-action__button--white":"mg_expandable_info_action_magneto-ui-expandable-info-action_button--white_11ax1","magneto-ui-expandable-info-action__button--green":"mg_expandable_info_action_magneto-ui-expandable-info-action_button--green_11ax1","magneto-ui-expandable-info-action__title":"mg_expandable_info_action_magneto-ui-expandable-info-action_title_11ax1"};
1148
+ var styles$1Q = {"magneto-ui-expandable-info-action__button":"mg_expandable_info_action_magneto-ui-expandable-info-action_button_1ajzq","magneto-ui-expandable-info-action__button--dark-blue":"mg_expandable_info_action_magneto-ui-expandable-info-action_button--dark-blue_1ajzq","magneto-ui-expandable-info-action__button--light-blue":"mg_expandable_info_action_magneto-ui-expandable-info-action_button--light-blue_1ajzq","magneto-ui-expandable-info-action__button--white":"mg_expandable_info_action_magneto-ui-expandable-info-action_button--white_1ajzq","magneto-ui-expandable-info-action__button--green":"mg_expandable_info_action_magneto-ui-expandable-info-action_button--green_1ajzq","magneto-ui-expandable-info-action__title":"mg_expandable_info_action_magneto-ui-expandable-info-action_title_1ajzq"};
1103
1149
 
1104
1150
  var Component$1S = function (_a) {
1105
1151
  var className = _a.className, loading = _a.loading, onAction = _a.onAction, prefixIcon = _a.prefixIcon, suffixIcon = _a.suffixIcon, title = _a.title, _b = _a.variant, variant = _b === void 0 ? 'blue' : _b;
@@ -1132,16 +1178,16 @@ var Component$1S = function (_a) {
1132
1178
  return (React.createElement("div", { className: CNM.get({ styles: styles$1Q, cls: ['expandable-info-action', className] }) },
1133
1179
  React.createElement("div", { className: CNM.get({ styles: styles$1Q, cls: ['expandable-info-action__container'] }) },
1134
1180
  React.createElement(Component, __assign({}, componentProps),
1135
- (prefixIcon || loading) && React.createElement(IconItem, __assign({ size: 18 }, prefixIcon, { icon: icon(prefixIcon === null || prefixIcon === void 0 ? void 0 : prefixIcon.icon) })),
1181
+ (prefixIcon || loading) && React.createElement(IconItem, __assign({ size: 12 }, prefixIcon, { icon: icon(prefixIcon === null || prefixIcon === void 0 ? void 0 : prefixIcon.icon) })),
1136
1182
  React.createElement("span", { className: CNM.get({ styles: styles$1Q, cls: ['expandable-info-action__title'] }) }, title),
1137
- suffixIcon && React.createElement(IconItem, __assign({ size: 18 }, suffixIcon, { icon: icon(suffixIcon.icon) }))))));
1183
+ suffixIcon && React.createElement(IconItem, __assign({ size: 12 }, suffixIcon, { icon: icon(suffixIcon.icon) }))))));
1138
1184
  };
1139
1185
  /**
1140
1186
  * Molecule UI child component of expandable info
1141
1187
  */
1142
1188
  var ExpandableInfoAction = Component$1S;
1143
1189
 
1144
- var styles$1P = {"magneto-ui-expandable-info-details__container":"mg_expandable_info_details_magneto-ui-expandable-info-details_container_1l94q","magneto-ui-expandable-info-details__section":"mg_expandable_info_details_magneto-ui-expandable-info-details_section_1l94q","magneto-ui-expandable-info-details__section--multiple":"mg_expandable_info_details_magneto-ui-expandable-info-details_section--multiple_1l94q","magneto-ui-expandable-info-details__sub-section":"mg_expandable_info_details_magneto-ui-expandable-info-details_sub-section_1l94q","magneto-ui-expandable-info-details__sub-section--initial":"mg_expandable_info_details_magneto-ui-expandable-info-details_sub-section--initial_1l94q","magneto-ui-expandable-info-details__item":"mg_expandable_info_details_magneto-ui-expandable-info-details_item_1l94q","magneto-ui-expandable-info-details__item--first":"mg_expandable_info_details_magneto-ui-expandable-info-details_item--first_1l94q","magneto-ui-expandable-info-details__text":"mg_expandable_info_details_magneto-ui-expandable-info-details_text_1l94q","magneto-ui-expandable-info-details__text--bold":"mg_expandable_info_details_magneto-ui-expandable-info-details_text--bold_1l94q","magneto-ui-expandable-info-details__footer":"mg_expandable_info_details_magneto-ui-expandable-info-details_footer_1l94q","magneto-ui-expandable-info-details__action":"mg_expandable_info_details_magneto-ui-expandable-info-details_action_1l94q"};
1190
+ var styles$1P = {"magneto-ui-expandable-info-details__container":"mg_expandable_info_details_magneto-ui-expandable-info-details_container_1o8tr","magneto-ui-expandable-info-details__section":"mg_expandable_info_details_magneto-ui-expandable-info-details_section_1o8tr","magneto-ui-expandable-info-details__section--multiple":"mg_expandable_info_details_magneto-ui-expandable-info-details_section--multiple_1o8tr","magneto-ui-expandable-info-details__sub-section":"mg_expandable_info_details_magneto-ui-expandable-info-details_sub-section_1o8tr","magneto-ui-expandable-info-details__sub-section--initial":"mg_expandable_info_details_magneto-ui-expandable-info-details_sub-section--initial_1o8tr","magneto-ui-expandable-info-details__item":"mg_expandable_info_details_magneto-ui-expandable-info-details_item_1o8tr","magneto-ui-expandable-info-details__item--first":"mg_expandable_info_details_magneto-ui-expandable-info-details_item--first_1o8tr","magneto-ui-expandable-info-details__text":"mg_expandable_info_details_magneto-ui-expandable-info-details_text_1o8tr","magneto-ui-expandable-info-details__text--bold":"mg_expandable_info_details_magneto-ui-expandable-info-details_text--bold_1o8tr","magneto-ui-expandable-info-details__footer":"mg_expandable_info_details_magneto-ui-expandable-info-details_footer_1o8tr","magneto-ui-expandable-info-details__action":"mg_expandable_info_details_magneto-ui-expandable-info-details_action_1o8tr"};
1145
1191
 
1146
1192
  var Component$1R = function (_a) {
1147
1193
  var sections = _a.sections, footer = _a.footer;
@@ -1239,7 +1285,7 @@ var Component$1Q = function (_a) {
1239
1285
  */
1240
1286
  var ExpandableInfoMessage = Component$1Q;
1241
1287
 
1242
- var styles$1N = {"magneto-ui-expandable-info-modal":"mg_expandable_info_modal_magneto-ui-expandable-info-modal_mka0n"};
1288
+ var styles$1N = {"magneto-ui-expandable-info-modal":"mg_expandable_info_modal_magneto-ui-expandable-info-modal_56w98"};
1243
1289
 
1244
1290
  var Component$1P = function (_a) {
1245
1291
  var toggler = _a.toggler, details = _a.details;
@@ -1347,7 +1393,7 @@ var EXPANDABLE_INFO_TOGGLER_ICONS = {
1347
1393
  coin: CoinBlackOutline
1348
1394
  };
1349
1395
 
1350
- var styles$1I = {"magneto-ui-expandable-info-toggler__container":"mg_expandable_info_toggler_magneto-ui-expandable-info-toggler_container_uiv7v","magneto-ui-expandable-info-toggler__container--no-details":"mg_expandable_info_toggler_magneto-ui-expandable-info-toggler_container--no-details_uiv7v","magneto-ui-expandable-info-toggler__container--blue":"mg_expandable_info_toggler_magneto-ui-expandable-info-toggler_container--blue_uiv7v","magneto-ui-expandable-info-toggler__container--white":"mg_expandable_info_toggler_magneto-ui-expandable-info-toggler_container--white_uiv7v","magneto-ui-expandable-info-toggler__container--small":"mg_expandable_info_toggler_magneto-ui-expandable-info-toggler_container--small_uiv7v","magneto-ui-expandable-info-toggler__text":"mg_expandable_info_toggler_magneto-ui-expandable-info-toggler_text_uiv7v","magneto-ui-expandable-info-toggler__text--blue":"mg_expandable_info_toggler_magneto-ui-expandable-info-toggler_text--blue_uiv7v","magneto-ui-expandable-info-toggler__text--white":"mg_expandable_info_toggler_magneto-ui-expandable-info-toggler_text--white_uiv7v","magneto-ui-expandable-info-toggler__text--small":"mg_expandable_info_toggler_magneto-ui-expandable-info-toggler_text--small_uiv7v","magneto-ui-expandable-info-toggler__summary":"mg_expandable_info_toggler_magneto-ui-expandable-info-toggler_summary_uiv7v","magneto-ui-expandable-info-toggler__summary--small":"mg_expandable_info_toggler_magneto-ui-expandable-info-toggler_summary--small_uiv7v","magneto-ui-expandable-info-toggler__summary--large":"mg_expandable_info_toggler_magneto-ui-expandable-info-toggler_summary--large_uiv7v"};
1396
+ var styles$1I = {"magneto-ui-expandable-info-toggler__container":"mg_expandable_info_toggler_magneto-ui-expandable-info-toggler_container_x381d","magneto-ui-expandable-info-toggler__container--no-details":"mg_expandable_info_toggler_magneto-ui-expandable-info-toggler_container--no-details_x381d","magneto-ui-expandable-info-toggler__container--blue":"mg_expandable_info_toggler_magneto-ui-expandable-info-toggler_container--blue_x381d","magneto-ui-expandable-info-toggler__container--white":"mg_expandable_info_toggler_magneto-ui-expandable-info-toggler_container--white_x381d","magneto-ui-expandable-info-toggler__container--small":"mg_expandable_info_toggler_magneto-ui-expandable-info-toggler_container--small_x381d","magneto-ui-expandable-info-toggler__text":"mg_expandable_info_toggler_magneto-ui-expandable-info-toggler_text_x381d","magneto-ui-expandable-info-toggler__text--blue":"mg_expandable_info_toggler_magneto-ui-expandable-info-toggler_text--blue_x381d","magneto-ui-expandable-info-toggler__text--white":"mg_expandable_info_toggler_magneto-ui-expandable-info-toggler_text--white_x381d","magneto-ui-expandable-info-toggler__text--small":"mg_expandable_info_toggler_magneto-ui-expandable-info-toggler_text--small_x381d","magneto-ui-expandable-info-toggler__summary":"mg_expandable_info_toggler_magneto-ui-expandable-info-toggler_summary_x381d","magneto-ui-expandable-info-toggler__summary--small":"mg_expandable_info_toggler_magneto-ui-expandable-info-toggler_summary--small_x381d","magneto-ui-expandable-info-toggler__summary--large":"mg_expandable_info_toggler_magneto-ui-expandable-info-toggler_summary--large_x381d"};
1351
1397
 
1352
1398
  var Component$1N = function (_a) {
1353
1399
  var details = _a.details, onToggle = _a.onToggle, prefixIcon = _a.prefixIcon, size = _a.size, suffixIcon = _a.suffixIcon, summary = _a.summary, title = _a.title, _b = _a.variant, variant = _b === void 0 ? 'white' : _b;
@@ -1443,51 +1489,6 @@ var FilterContainerMenu = function (_a) {
1443
1489
  return React.createElement("div", { className: style$P["".concat(classMUI, "-filter-container")] }, children);
1444
1490
  };
1445
1491
 
1446
- function formatNumber(num) {
1447
- if (typeof num !== 'number')
1448
- return num;
1449
- return new Intl.NumberFormat().format(num);
1450
- }
1451
- var notNumberRegex = new RegExp('\\D*', 'g');
1452
-
1453
- var isDate = function (value) {
1454
- return value instanceof Date && !isNaN(value.valueOf());
1455
- };
1456
-
1457
- var stubTrue = function () { return true; };
1458
- var stubUndefined = function () { return undefined; };
1459
-
1460
- var classNames = {
1461
- bind: function (stylesObj) {
1462
- return function () {
1463
- var params = [];
1464
- for (var _i = 0; _i < arguments.length; _i++) {
1465
- params[_i] = arguments[_i];
1466
- }
1467
- return params
1468
- // avoid nullish
1469
- .filter(function (param) { return param != null; })
1470
- .map(function (cls) {
1471
- var _a;
1472
- if (typeof cls === 'string')
1473
- return (_a = stylesObj[cls]) !== null && _a !== void 0 ? _a : cls;
1474
- return Object.entries(cls)
1475
- .filter(function (_a) {
1476
- var value = _a[1];
1477
- return value;
1478
- })
1479
- .map(function (_a) {
1480
- var _b;
1481
- var key = _a[0];
1482
- return (_b = stylesObj[key]) !== null && _b !== void 0 ? _b : key;
1483
- })
1484
- .join(' ');
1485
- })
1486
- .join(' ');
1487
- };
1488
- }
1489
- };
1490
-
1491
1492
  var styles$1G = {"magneto-ui-filter-item":"mg_filter_menu_item_magneto-ui-filter-item_m5cdm","selected":"mg_filter_menu_item_selected_m5cdm","disabled":"mg_filter_menu_item_disabled_m5cdm","isSearched":"mg_filter_menu_item_isSearched_m5cdm","skeleton":"mg_filter_menu_item_skeleton_m5cdm","shimmer":"mg_filter_menu_item_shimmer_m5cdm"};
1492
1493
 
1493
1494
  var FilterMenuItem = function (_a) {
@@ -6793,14 +6794,14 @@ var SelectContext = React.createContext({
6793
6794
  });
6794
6795
  var useSelectContext = function () { return useContext(SelectContext); };
6795
6796
 
6796
- var styles$c = {"select-input":"mg_select_input_select-input_17ogp","select-input--no-placeholder":"mg_select_input_select-input--no-placeholder_17ogp","select-input--with-icon":"mg_select_input_select-input--with-icon_17ogp","select-button":"mg_select_input_select-button_17ogp","select-button__placeholder":"mg_select_input_select-button_placeholder_17ogp","select-button__placeholder--open":"mg_select_input_select-button_placeholder--open_17ogp","select-button__placeholder--selected":"mg_select_input_select-button_placeholder--selected_17ogp"};
6797
+ var styles$c = {"select-input":"mg_select_input_select-input_1mcnp","select-input--disabled":"mg_select_input_select-input--disabled_1mcnp","select-input--no-placeholder":"mg_select_input_select-input--no-placeholder_1mcnp","select-input--with-icon":"mg_select_input_select-input--with-icon_1mcnp","select-button":"mg_select_input_select-button_1mcnp","select-button--disabled":"mg_select_input_select-button--disabled_1mcnp","select-button__input":"mg_select_input_select-button_input_1mcnp","select-button__placeholder":"mg_select_input_select-button_placeholder_1mcnp","select-button__placeholder--open":"mg_select_input_select-button_placeholder--open_1mcnp","select-button__placeholder--selected":"mg_select_input_select-button_placeholder--selected_1mcnp","select-button__value":"mg_select_input_select-button_value_1mcnp"};
6797
6798
 
6798
6799
  var cx$5 = classNames.bind(styles$c);
6799
6800
  var getDefaulSelected = function (selected) {
6800
6801
  return selected.map(function (select) { return select.value; }).join(', ');
6801
6802
  };
6802
6803
  var Component$a = function (_a) {
6803
- var onChange = _a.onChange, value = _a.value, className = _a.className, onClick = _a.onClick, _b = _a.open, open = _b === void 0 ? false : _b, _c = _a.actionIcon, actionIcon = _c === void 0 ? ArrowDown2 : _c, selected = _a.selected, _d = _a.getLabel, getLabel = _d === void 0 ? getDefaulSelected : _d, readOnly = _a.readOnly, rest = __rest(_a, ["onChange", "value", "className", "onClick", "open", "actionIcon", "selected", "getLabel", "readOnly"]);
6804
+ var onChange = _a.onChange, value = _a.value, className = _a.className, onClick = _a.onClick, _b = _a.open, open = _b === void 0 ? false : _b, _c = _a.actionIcon, actionIcon = _c === void 0 ? ArrowDown2 : _c, selected = _a.selected, _d = _a.getLabel, getLabel = _d === void 0 ? getDefaulSelected : _d, readOnly = _a.readOnly, disabled = _a.disabled, rest = __rest(_a, ["onChange", "value", "className", "onClick", "open", "actionIcon", "selected", "getLabel", "readOnly", "disabled"]);
6804
6805
  var ref = useRef({ onChange: onChange, id: generateID() });
6805
6806
  useEffect(function () {
6806
6807
  ref.current.onChange = onChange;
@@ -6816,15 +6817,20 @@ var Component$a = function (_a) {
6816
6817
  if (!readOnly) {
6817
6818
  return (React.createElement("div", { className: cx$5('select-input', className, {
6818
6819
  'select-input--with-icon': actionIcon !== undefined,
6819
- 'select-input--no-placeholder': rest.placeholder.length === 0
6820
- }), onClick: onClick },
6821
- React.createElement(Input, __assign({ name: ref.current.id, value: open ? value : getLabel(selected), onChange: onChange, actionIcon: actionIcon }, rest))));
6820
+ 'select-input--no-placeholder': rest.placeholder.length === 0,
6821
+ 'select-input--disabled': disabled
6822
+ }), onClick: function () { return (disabled ? null : onClick()); }, "data-name": "select-input", "data-selected": selected.length > 0, "data-is-open": open },
6823
+ React.createElement(Input, __assign({ name: ref.current.id, disabled: disabled, value: open ? value : getLabel(selected), onChange: onChange, actionIcon: actionIcon }, rest))));
6822
6824
  }
6823
- return (React.createElement("button", { className: cx$5('select-button', className), onClick: onClick },
6824
- React.createElement("span", { className: cx$5('select-button__placeholder', {
6825
- 'select-button__placeholder--selected': selected.length > 0,
6826
- 'select-button__placeholder--open': open
6827
- }) }, open ? rest.placeholder : selected.length > 0 ? getLabel(selected) : rest.placeholder),
6825
+ return (React.createElement("button", { className: cx$5('select-button', { 'select-button--disabled': disabled }, className), disabled: disabled, onClick: onClick, "data-name": "select-button", "data-selected": selected.length > 0, "data-is-open": open },
6826
+ React.createElement("div", { className: cx$5('select-button__input') },
6827
+ rest.placeholder.length > 0 ? (React.createElement("span", { className: cx$5('select-button__placeholder', {
6828
+ 'select-button__placeholder--open': open,
6829
+ 'select-button__placeholder--selected': selected.length > 0
6830
+ }) }, rest.placeholder)) : null,
6831
+ selected.length > 0 ? (React.createElement("span", { className: cx$5('select-button__value', {
6832
+ 'select-button__placeholder--open': open
6833
+ }) }, getLabel(selected))) : null),
6828
6834
  actionIcon ? React.createElement(IconItem, { icon: actionIcon, size: 20 }) : null));
6829
6835
  };
6830
6836
  var SelectInput = Component$a;
@@ -6879,7 +6885,7 @@ var Component$9 = function (_a) {
6879
6885
  };
6880
6886
  var Checkbox = Component$9;
6881
6887
 
6882
- var styles$8 = {"select-list":"mg_select_list_check_select-list_1boet","select-list--visible":"mg_select_list_check_select-list--visible_1boet","select-list__item":"mg_select_list_check_select-list_item_1boet","select-list__checkbox":"mg_select_list_check_select-list_checkbox_1boet"};
6888
+ var styles$8 = {"select-list":"mg_select_list_check_select-list_g3qb1","select-list--visible":"mg_select_list_check_select-list--visible_g3qb1","select-list__item":"mg_select_list_check_select-list_item_g3qb1","select-list__checkbox":"mg_select_list_check_select-list_checkbox_g3qb1"};
6883
6889
 
6884
6890
  var cx$1 = classNames.bind(styles$8);
6885
6891
  var defaultRenderItem = function (option) { return React.createElement(React.Fragment, null, option.label); };
@@ -6917,24 +6923,26 @@ var defaultSelect = function (props) {
6917
6923
  return (React.createElement(Select.Input, __assign({ hideIcon: true, className: cx('select-input', { 'select-input--open': props.open }), actionIcon: ArrowDown2 }, props)));
6918
6924
  };
6919
6925
  var Component$7 = function (_a) {
6920
- var children = _a.children, _b = _a.renderSelect, renderSelect = _b === void 0 ? defaultSelect : _b, _c = _a.placeholder, placeholder = _c === void 0 ? '' : _c, options = _a.options, value = _a.value, _d = _a.onChange, onChange = _d === void 0 ? stubTrue : _d, _e = _a.inputReadonly, inputReadonly = _e === void 0 ? false : _e;
6926
+ var children = _a.children, _b = _a.renderSelect, renderSelect = _b === void 0 ? defaultSelect : _b, _c = _a.placeholder, placeholder = _c === void 0 ? '' : _c, options = _a.options, value = _a.value, _d = _a.onChange, onChange = _d === void 0 ? stubTrue : _d, _e = _a.inputReadonly, inputReadonly = _e === void 0 ? false : _e, className = _a.className, getLabel = _a.getLabel;
6921
6927
  var _f = useState(false), open = _f[0], setOpen = _f[1];
6922
6928
  var _g = useState(''), search = _g[0], setSearch = _g[1];
6923
6929
  return (React.createElement(SelectContext.Provider, { value: { options: options, value: value, onSwitch: setOpen, onChange: onChange, search: search, open: open, onSearch: setSearch } },
6924
- renderSelect({
6925
- placeholder: placeholder,
6926
- readOnly: inputReadonly,
6927
- onChange: function (_a) {
6928
- var target = _a.target;
6929
- return setSearch(target.value);
6930
- },
6931
- type: 'text',
6932
- value: search,
6933
- open: open,
6934
- onClick: function () { return setOpen(true); },
6935
- selected: value
6936
- }),
6937
- React.createElement("div", { className: cx('select__list-container'), "data-name": "select-list-container" }, children)));
6930
+ React.createElement("div", { className: className },
6931
+ renderSelect({
6932
+ placeholder: placeholder,
6933
+ readOnly: inputReadonly,
6934
+ onChange: function (_a) {
6935
+ var target = _a.target;
6936
+ return setSearch(target.value);
6937
+ },
6938
+ type: 'text',
6939
+ value: search,
6940
+ open: open,
6941
+ onClick: function () { return setOpen(true); },
6942
+ selected: value,
6943
+ getLabel: getLabel
6944
+ }),
6945
+ React.createElement("div", { className: cx('select__list-container'), "data-name": "select-list-container" }, children))));
6938
6946
  };
6939
6947
  /**
6940
6948
  * @experimental this component is early, so that the interface component and behavrior could change.