@mailstep/design-system 0.8.0 → 0.8.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mailstep/design-system",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
4
4
  "license": "ISC",
5
5
  "type": "module",
6
6
  "main": "./ui/index.js",
@@ -20,6 +20,6 @@ var getFlagOptions = function () { return [
20
20
  ]; };
21
21
  var SelectFilter = function (props) {
22
22
  var options = useMemo(function () { return getFlagOptions(); }, []);
23
- return _jsx(GridSelect, __assign({ options: options }, props));
23
+ return _jsx(GridSelect, __assign({ options: options }, props, { isClearable: false }));
24
24
  };
25
25
  export default SelectFilter;
@@ -10,6 +10,7 @@ type Props = {
10
10
  value?: string | string[] | Option[];
11
11
  checkAllButton?: boolean;
12
12
  asyncLoadKey?: string;
13
+ isClearable?: boolean;
13
14
  };
14
15
  declare const SelectFilter: FC<Props>;
15
16
  export default SelectFilter;
@@ -52,8 +52,8 @@ import isArray from 'lodash/isArray';
52
52
  import uniqBy from 'lodash/uniqBy';
53
53
  import { isOptionArray } from './guards';
54
54
  var SelectFilter = function (_a) {
55
- var onChange = _a.onChange, isMulti = _a.isMulti, value = _a.value, options = _a.options, checkAllButton = _a.checkAllButton, asyncLoadKey = _a.asyncLoadKey, onAsyncLoadFilterOptions = _a.onAsyncLoadFilterOptions;
56
- var _b = useState([]), loadedOptions = _b[0], setLoadedOptions = _b[1];
55
+ var onChange = _a.onChange, _b = _a.isClearable, isClearable = _b === void 0 ? true : _b, isMulti = _a.isMulti, value = _a.value, options = _a.options, checkAllButton = _a.checkAllButton, asyncLoadKey = _a.asyncLoadKey, onAsyncLoadFilterOptions = _a.onAsyncLoadFilterOptions;
56
+ var _c = useState([]), loadedOptions = _c[0], setLoadedOptions = _c[1];
57
57
  var handleOnMultiChange = useCallback(function (options) {
58
58
  onChange === null || onChange === void 0 ? void 0 : onChange(!isArray(options) || !(options === null || options === void 0 ? void 0 : options.length) ? null : options);
59
59
  }, [onChange]);
@@ -79,6 +79,6 @@ var SelectFilter = function (_a) {
79
79
  if (isMulti) {
80
80
  return (_jsx(Select, { maxMenuHeight: 250, onChange: handleOnMultiChange, value: isOptionArray(value) ? value.map(function (option) { return String(option.value); }) : value, options: defaultOptions || options, showSelectAllButton: checkAllButton, style: "gridFilter", loadOptions: isAsync ? handleLoadOptions : undefined, defaultOptions: defaultOptions, placeholder: isAsync ? i18n._({ id: 'dataGrid.filterCell', message: 'Type to filter' }) : undefined, noOptionsMessage: function () { return null; }, containerVariant: isAsync ? 'search' : undefined, optionVariant: "checkbox", multiLabelVariant: "count", isMulti: true }));
81
81
  }
82
- return (_jsx(SingleSelect, { maxMenuHeight: 250, onChange: onChange, value: value, options: options, style: "gridFilter", loadOptions: isAsync ? handleLoadOptions : undefined, placeholder: isAsync ? i18n._({ id: 'dataGrid.filterCell', message: 'Type to filter' }) : undefined, isClearable: true }));
82
+ return (_jsx(SingleSelect, { maxMenuHeight: 250, onChange: onChange, value: value, options: options, style: "gridFilter", loadOptions: isAsync ? handleLoadOptions : undefined, placeholder: isAsync ? i18n._({ id: 'dataGrid.filterCell', message: 'Type to filter' }) : undefined, isClearable: isClearable }));
83
83
  };
84
84
  export default SelectFilter;
@@ -140,7 +140,7 @@ export var TooltipWrap = styled.div(templateObject_16 || (templateObject_16 = __
140
140
  return ($lightMode ? th.color('red20') : th.color('blue2'));
141
141
  });
142
142
  export var OverflowWithEllipsis = styled.span(templateObject_17 || (templateObject_17 = __makeTemplateObject(["\n max-width: 140px;\n overflow: hidden;\n text-overflow: ellipsis;\n"], ["\n max-width: 140px;\n overflow: hidden;\n text-overflow: ellipsis;\n"])));
143
- export var TopLevelWrap = styled.div(templateObject_18 || (templateObject_18 = __makeTemplateObject(["\n background-color: ", ";\n border-right: 1px solid ", ";\n height: -webkit-fill-available;\n transition: width 0.5s ease;\n width: ", ";\n\n z-index: 7;\n position: absolute;\n top: ", ";\n height: ", ";\n\n display: flex;\n flex-direction: column;\n\n @media (min-width: 1024px) {\n top: inherit;\n z-index: 2;\n }\n"], ["\n background-color: ", ";\n border-right: 1px solid ", ";\n height: -webkit-fill-available;\n transition: width 0.5s ease;\n width: ", ";\n\n z-index: 7;\n position: absolute;\n top: ", ";\n height: ", ";\n\n display: flex;\n flex-direction: column;\n\n @media (min-width: 1024px) {\n top: inherit;\n z-index: 2;\n }\n"])), function (_a) {
143
+ export var TopLevelWrap = styled.div(templateObject_18 || (templateObject_18 = __makeTemplateObject(["\n background-color: ", ";\n border-right: 1px solid ", ";\n height: -webkit-fill-available;\n transition: width 0.5s ease;\n width: ", ";\n\n z-index: 5;\n position: absolute;\n top: ", ";\n height: ", ";\n\n display: flex;\n flex-direction: column;\n\n @media (min-width: 1024px) {\n top: inherit;\n z-index: 2;\n }\n"], ["\n background-color: ", ";\n border-right: 1px solid ", ";\n height: -webkit-fill-available;\n transition: width 0.5s ease;\n width: ", ";\n\n z-index: 5;\n position: absolute;\n top: ", ";\n height: ", ";\n\n display: flex;\n flex-direction: column;\n\n @media (min-width: 1024px) {\n top: inherit;\n z-index: 2;\n }\n"])), function (_a) {
144
144
  var lightMode = _a.lightMode;
145
145
  return (lightMode ? 'white' : th('colors.blue3'));
146
146
  }, th('colors.lightGray6'), function (_a) {
@@ -158,5 +158,5 @@ export var BodyWrap = styled.div(templateObject_20 || (templateObject_20 = __mak
158
158
  var isCompact = _a.isCompact;
159
159
  return (isCompact ? '24px 9px' : '24px 22px');
160
160
  });
161
- export var Overlay = styled.div(templateObject_21 || (templateObject_21 = __makeTemplateObject(["\n position: fixed;\n top: 0;\n z-index: 6;\n height: 100%;\n width: 100%;\n background-color: ", ";\n @media (min-width: 1024px) {\n display: none;\n }\n"], ["\n position: fixed;\n top: 0;\n z-index: 6;\n height: 100%;\n width: 100%;\n background-color: ", ";\n @media (min-width: 1024px) {\n display: none;\n }\n"])), createRgba('blue2', 0.6));
161
+ export var Overlay = styled.div(templateObject_21 || (templateObject_21 = __makeTemplateObject(["\n position: fixed;\n top: 0;\n z-index: 4;\n height: 100%;\n width: 100%;\n background-color: ", ";\n @media (min-width: 1024px) {\n display: none;\n }\n"], ["\n position: fixed;\n top: 0;\n z-index: 4;\n height: 100%;\n width: 100%;\n background-color: ", ";\n @media (min-width: 1024px) {\n display: none;\n }\n"])), createRgba('blue2', 0.6));
162
162
  var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13, templateObject_14, templateObject_15, templateObject_16, templateObject_17, templateObject_18, templateObject_19, templateObject_20, templateObject_21;
@@ -78,8 +78,3 @@ export { MachinePackingForbidden } from './MachinePackingForbidden';
78
78
  export { Valuable } from './Valuable';
79
79
  export { MobilePhone } from './MobilePhone';
80
80
  export { Reload } from './Reload';
81
- export { Sun } from './Sun';
82
- export { Moon } from './Moon';
83
- export { CircleHalfStroke } from './CircleHalfStroke';
84
- export { ShieldUser } from './ShieldUser';
85
- export { UserCowboy } from './UserCowboy';
@@ -78,8 +78,3 @@ export { MachinePackingForbidden } from './MachinePackingForbidden';
78
78
  export { Valuable } from './Valuable';
79
79
  export { MobilePhone } from './MobilePhone';
80
80
  export { Reload } from './Reload';
81
- export { Sun } from './Sun';
82
- export { Moon } from './Moon';
83
- export { CircleHalfStroke } from './CircleHalfStroke';
84
- export { ShieldUser } from './ShieldUser';
85
- export { UserCowboy } from './UserCowboy';