@gnwebsoft/ui 2.18.30 → 2.18.31

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.
@@ -40,7 +40,6 @@ var Component = function DatePickerElement(props) {
40
40
  } = useController({
41
41
  name,
42
42
  control,
43
- disabled,
44
43
  defaultValue: null
45
44
  });
46
45
  const { value, onChange } = useTransform({
@@ -60,6 +59,7 @@ var Component = function DatePickerElement(props) {
60
59
  ...field,
61
60
  value,
62
61
  label,
62
+ disabled,
63
63
  ...datePickerProps,
64
64
  inputRef: handleInputRef,
65
65
  onClose: (...args) => {
@@ -394,8 +394,7 @@ var Component4 = function TextFieldElement(props) {
394
394
  fieldState: { error }
395
395
  } = useController4({
396
396
  name,
397
- control,
398
- disabled
397
+ control
399
398
  });
400
399
  const { value, onChange } = useTransform({
401
400
  value: field.value,
@@ -594,8 +593,7 @@ var Component6 = function AsyncSelectElement(props) {
594
593
  fieldState: { error }
595
594
  } = useController6({
596
595
  name,
597
- control,
598
- disabled
596
+ control
599
597
  });
600
598
  const [loading, setLoading] = useState2(false);
601
599
  const [selectedOption, setSelectedOption] = useState2(null);
@@ -795,8 +793,7 @@ var Component7 = function AsyncSelectMultiElement(props) {
795
793
  fieldState: { error }
796
794
  } = useController7({
797
795
  name,
798
- control,
799
- disabled
796
+ control
800
797
  });
801
798
  const multiSelectRef = useRef2(null);
802
799
  const [selectedOptions, setSelectedOptions] = useState3([]);
@@ -967,6 +964,7 @@ import {
967
964
  import {
968
965
  useController as useController8
969
966
  } from "react-hook-form";
967
+ import { useEffect as useEffect4, useState as useState4 } from "react";
970
968
  import { jsx as jsx8 } from "react/jsx-runtime";
971
969
  var Component8 = function SelectElement(props) {
972
970
  const {
@@ -987,19 +985,22 @@ var Component8 = function SelectElement(props) {
987
985
  fieldState: { error }
988
986
  } = useController8({
989
987
  name,
990
- control,
991
- disabled
988
+ control
992
989
  });
993
- if (options.length === 1 && field.value == null) {
994
- field.onChange(options[0].value);
995
- }
990
+ const [hasAutoSelected, setHasAutoSelected] = useState4(false);
991
+ useEffect4(() => {
992
+ if (options.length === 1 && field.value == null && !hasAutoSelected) {
993
+ field.onChange(options[0].value);
994
+ setHasAutoSelected(true);
995
+ }
996
+ }, [options, field.value, field.onChange, hasAutoSelected]);
996
997
  return /* @__PURE__ */ jsx8(
997
998
  Autocomplete3,
998
999
  {
999
1000
  ...rest,
1000
1001
  value: field.value !== null ? options.find((option) => {
1001
1002
  return field.value === option.value;
1002
- }) ?? null : options.length === 1 ? options[0] : null,
1003
+ }) ?? null : null,
1003
1004
  size: "small",
1004
1005
  loading,
1005
1006
  options,
@@ -1008,10 +1009,14 @@ var Component8 = function SelectElement(props) {
1008
1009
  ref: field.ref,
1009
1010
  disabled: field.disabled,
1010
1011
  onChange: (event, newValue, reason) => {
1011
- field.onChange(newValue ? newValue.value : null);
1012
- if (onChange && typeof onChange === "function") {
1013
- onChange(event, newValue, reason);
1012
+ if (reason === "clear") {
1013
+ field.onChange(null);
1014
+ setHasAutoSelected(true);
1015
+ } else {
1016
+ field.onChange(newValue?.value ?? null);
1017
+ setHasAutoSelected(true);
1014
1018
  }
1019
+ onChange?.(event, newValue, reason);
1015
1020
  },
1016
1021
  onBlur: (event) => {
1017
1022
  field.onBlur();
@@ -1062,7 +1067,7 @@ import {
1062
1067
  import {
1063
1068
  useController as useController9
1064
1069
  } from "react-hook-form";
1065
- import { Fragment as Fragment3, useState as useState4 } from "react";
1070
+ import { Fragment as Fragment3, useState as useState5 } from "react";
1066
1071
  import { jsx as jsx9, jsxs as jsxs4 } from "react/jsx-runtime";
1067
1072
  var Component9 = function SelectMultiElement(props) {
1068
1073
  const {
@@ -1081,10 +1086,9 @@ var Component9 = function SelectMultiElement(props) {
1081
1086
  fieldState: { error }
1082
1087
  } = useController9({
1083
1088
  name,
1084
- control,
1085
- disabled
1089
+ control
1086
1090
  });
1087
- const [selectedOptions, setSelectedOptions] = useState4([]);
1091
+ const [selectedOptions, setSelectedOptions] = useState5([]);
1088
1092
  const handleChange = (_2, selectedOptions2, reason) => {
1089
1093
  if (reason === "clear") {
1090
1094
  setSelectedOptions([]);
@@ -1104,7 +1108,7 @@ var Component9 = function SelectMultiElement(props) {
1104
1108
  getOptionLabel: (c) => c.Label,
1105
1109
  filterSelectedOptions: true,
1106
1110
  ref: field.ref,
1107
- disabled: field.disabled,
1111
+ disabled,
1108
1112
  onChange: handleChange,
1109
1113
  onBlur: (event) => {
1110
1114
  field.onBlur();
@@ -1154,7 +1158,7 @@ import {
1154
1158
  Grid2 as Grid210,
1155
1159
  TextField as TextField7
1156
1160
  } from "@mui/material";
1157
- import { useEffect as useEffect4, useRef as useRef3 } from "react";
1161
+ import { useEffect as useEffect5, useRef as useRef3 } from "react";
1158
1162
  import {
1159
1163
  useController as useController10
1160
1164
  } from "react-hook-form";
@@ -1180,21 +1184,19 @@ var Component10 = function SelectCascadeElement(props) {
1180
1184
  fieldState: { error }
1181
1185
  } = useController10({
1182
1186
  name,
1183
- control,
1184
- disabled
1187
+ control
1185
1188
  });
1186
1189
  const { field: dependentField } = useController10({
1187
1190
  name: dependsOn,
1188
- control,
1189
- disabled
1191
+ control
1190
1192
  });
1191
1193
  const parentValueRef = useRef3(dependentField.value ?? null);
1192
- useEffect4(() => {
1194
+ useEffect5(() => {
1193
1195
  if (!!dependentField.value && parentValueRef?.current?.value !== dependentField.value || dependentField.value === null) {
1194
1196
  field.onChange(null);
1195
1197
  }
1196
1198
  }, [dependentField.value]);
1197
- useEffect4(() => {
1199
+ useEffect5(() => {
1198
1200
  if (initialValue) {
1199
1201
  field.onChange(initialValue);
1200
1202
  }
@@ -1212,7 +1214,7 @@ var Component10 = function SelectCascadeElement(props) {
1212
1214
  getOptionLabel: (c) => c.label,
1213
1215
  isOptionEqualToValue: (option, value) => option.value === value.value,
1214
1216
  ref: field.ref,
1215
- disabled: field.disabled,
1217
+ disabled,
1216
1218
  onChange: (event, newValue, reason) => {
1217
1219
  field.onChange(newValue ? newValue.value : null);
1218
1220
  if (onChange && typeof onChange === "function") {
@@ -1334,7 +1336,7 @@ import {
1334
1336
  FormHelperText as FormHelperText3,
1335
1337
  Grid2 as Grid212
1336
1338
  } from "@mui/material";
1337
- import { useEffect as useEffect5, useState as useState5 } from "react";
1339
+ import { useEffect as useEffect6, useState as useState6 } from "react";
1338
1340
  import {
1339
1341
  useController as useController12
1340
1342
  } from "react-hook-form";
@@ -1349,10 +1351,10 @@ var Component12 = function CheckboxGroup(props) {
1349
1351
  control,
1350
1352
  disabled: rest.disabled
1351
1353
  });
1352
- const [selectedValues, setSelectedValues] = useState5(
1354
+ const [selectedValues, setSelectedValues] = useState6(
1353
1355
  options.filter((c) => field.value?.includes(c.value)).map((c) => c.value) || []
1354
1356
  );
1355
- useEffect5(() => {
1357
+ useEffect6(() => {
1356
1358
  field.onChange(selectedValues ? [...selectedValues] : []);
1357
1359
  }, [selectedValues]);
1358
1360
  const handleChange = (event) => {
@@ -45,7 +45,6 @@ var Component = function DatePickerElement(props) {
45
45
  } = _reacthookform.useController.call(void 0, {
46
46
  name,
47
47
  control,
48
- disabled,
49
48
  defaultValue: null
50
49
  });
51
50
  const { value, onChange } = _chunk6JZ35VQJjs.useTransform.call(void 0, {
@@ -65,6 +64,7 @@ var Component = function DatePickerElement(props) {
65
64
  ...field,
66
65
  value,
67
66
  label,
67
+ disabled,
68
68
  ...datePickerProps,
69
69
  inputRef: handleInputRef,
70
70
  onClose: (...args) => {
@@ -367,6 +367,7 @@ var RadioButtonGroup_default = RadioButtonGroup2;
367
367
 
368
368
 
369
369
 
370
+
370
371
  var Component4 = function TextFieldElement(props) {
371
372
  const {
372
373
  rules = {},
@@ -397,9 +398,9 @@ var Component4 = function TextFieldElement(props) {
397
398
  fieldState: { error }
398
399
  } = _reacthookform.useController.call(void 0, {
399
400
  name,
400
- control,
401
- disabled
401
+ control
402
402
  });
403
+ const theme = _material.useTheme.call(void 0, );
403
404
  const { value, onChange } = _chunk6JZ35VQJjs.useTransform.call(void 0, {
404
405
  value: field.value,
405
406
  onChange: field.onChange,
@@ -458,7 +459,8 @@ var Component4 = function TextFieldElement(props) {
458
459
  "& .MuiInputLabel-asterisk": { color: "red" },
459
460
  "& .MuiInputBase-input": {
460
461
  cursor: disabled ? "not-allowed" : "default"
461
- }
462
+ },
463
+ bgcolor: disabled ? theme.palette.action.disabledBackground : "transparent"
462
464
  }
463
465
  }
464
466
  );
@@ -602,8 +604,7 @@ var Component6 = function AsyncSelectElement(props) {
602
604
  fieldState: { error }
603
605
  } = _reacthookform.useController.call(void 0, {
604
606
  name,
605
- control,
606
- disabled
607
+ control
607
608
  });
608
609
  const [loading, setLoading] = _react.useState.call(void 0, false);
609
610
  const [selectedOption, setSelectedOption] = _react.useState.call(void 0, null);
@@ -819,8 +820,7 @@ var Component7 = function AsyncSelectMultiElement(props) {
819
820
  fieldState: { error }
820
821
  } = _reacthookform.useController.call(void 0, {
821
822
  name,
822
- control,
823
- disabled
823
+ control
824
824
  });
825
825
  const multiSelectRef = _react.useRef.call(void 0, null);
826
826
  const [selectedOptions, setSelectedOptions] = _react.useState.call(void 0, []);
@@ -921,6 +921,7 @@ var Component7 = function AsyncSelectMultiElement(props) {
921
921
  isOptionEqualToValue: (option, val) => option.Value === val.Value,
922
922
  options,
923
923
  value: selectedOptions,
924
+ disabled,
924
925
  filterSelectedOptions: true,
925
926
  onChange: handleChange,
926
927
  onInputChange: (_2, newInputValue) => {
@@ -993,6 +994,8 @@ var AsyncMultiSelect_default = AsyncSelectMultiElement2;
993
994
 
994
995
 
995
996
 
997
+
998
+
996
999
  var Component8 = function SelectElement(props) {
997
1000
  const {
998
1001
  name,
@@ -1016,16 +1019,21 @@ var Component8 = function SelectElement(props) {
1016
1019
  name,
1017
1020
  control
1018
1021
  });
1019
- if (options.length === 1 && !field.value) {
1020
- field.onChange(options[0].Value);
1021
- }
1022
+ const theme = _material.useTheme.call(void 0, );
1023
+ const [hasAutoSelected, setHasAutoSelected] = _react.useState.call(void 0, false);
1024
+ _react.useEffect.call(void 0, () => {
1025
+ if (options.length === 1 && field.value == null && !hasAutoSelected) {
1026
+ field.onChange(options[0].Value);
1027
+ setHasAutoSelected(true);
1028
+ }
1029
+ }, [options, field.value, field.onChange, hasAutoSelected]);
1022
1030
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1023
1031
  _material.Autocomplete,
1024
1032
  {
1025
1033
  ...rest,
1026
1034
  value: field.value !== null ? _nullishCoalesce(options.find((option) => {
1027
1035
  return field.value === option.Value;
1028
- }), () => ( null)) : options.length === 1 ? options[0] : null,
1036
+ }), () => ( null)) : null,
1029
1037
  loading,
1030
1038
  options,
1031
1039
  getOptionLabel: (c) => c.Label,
@@ -1033,10 +1041,14 @@ var Component8 = function SelectElement(props) {
1033
1041
  ref: field.ref,
1034
1042
  disabled,
1035
1043
  onChange: (event, newValue, reason) => {
1036
- field.onChange(newValue ? newValue.Value : null);
1037
- if (onChange && typeof onChange === "function") {
1038
- onChange(event, newValue, reason);
1044
+ if (reason === "clear") {
1045
+ field.onChange(null);
1046
+ setHasAutoSelected(true);
1047
+ } else {
1048
+ field.onChange(_nullishCoalesce(_optionalChain([newValue, 'optionalAccess', _21 => _21.Value]), () => ( null)));
1049
+ setHasAutoSelected(true);
1039
1050
  }
1051
+ _optionalChain([onChange, 'optionalCall', _22 => _22(event, newValue, reason)]);
1040
1052
  },
1041
1053
  onBlur: (event) => {
1042
1054
  field.onBlur();
@@ -1059,7 +1071,8 @@ var Component8 = function SelectElement(props) {
1059
1071
  ...sx,
1060
1072
  "& .MuiInputBase-input": {
1061
1073
  cursor: disabled ? "not-allowed" : "default"
1062
- }
1074
+ },
1075
+ bgcolor: disabled ? theme.palette.action.disabledBackground : "transparent"
1063
1076
  }
1064
1077
  }
1065
1078
  )
@@ -1109,8 +1122,7 @@ var Component9 = function SelectMultiElement(props) {
1109
1122
  fieldState: { error }
1110
1123
  } = _reacthookform.useController.call(void 0, {
1111
1124
  name,
1112
- control,
1113
- disabled
1125
+ control
1114
1126
  });
1115
1127
  const [selectedOptions, setSelectedOptions] = _react.useState.call(void 0, []);
1116
1128
  const handleChange = (_2, selectedOptions2, reason) => {
@@ -1222,7 +1234,7 @@ var Component10 = function SelectCascadeElement(props) {
1222
1234
  });
1223
1235
  const parentValueRef = _react.useRef.call(void 0, _nullishCoalesce(dependentField.value, () => ( null)));
1224
1236
  _react.useEffect.call(void 0, () => {
1225
- if (!!dependentField.value && _optionalChain([parentValueRef, 'optionalAccess', _21 => _21.current, 'optionalAccess', _22 => _22.Value]) !== dependentField.value || dependentField.value === null) {
1237
+ if (!!dependentField.value && _optionalChain([parentValueRef, 'optionalAccess', _23 => _23.current, 'optionalAccess', _24 => _24.Value]) !== dependentField.value || dependentField.value === null) {
1226
1238
  field.onChange(null);
1227
1239
  }
1228
1240
  }, [dependentField.value]);
@@ -1383,7 +1395,7 @@ var Component12 = function CheckboxGroup(props) {
1383
1395
  disabled: rest.disabled
1384
1396
  });
1385
1397
  const [selectedValues, setSelectedValues] = _react.useState.call(void 0,
1386
- options.filter((c) => _optionalChain([field, 'access', _23 => _23.value, 'optionalAccess', _24 => _24.includes, 'call', _25 => _25(c.Value)])).map((c) => c.Value) || []
1398
+ options.filter((c) => _optionalChain([field, 'access', _25 => _25.value, 'optionalAccess', _26 => _26.includes, 'call', _27 => _27(c.Value)])).map((c) => c.Value) || []
1387
1399
  );
1388
1400
  _react.useEffect.call(void 0, () => {
1389
1401
  field.onChange(selectedValues ? [...selectedValues] : []);
@@ -1,8 +1,17 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }// src/components/ClearButton/ClearButton.tsx
2
2
  var _material = require('@mui/material');
3
3
  var _jsxruntime = require('react/jsx-runtime');
4
- var ClearButton = ({ isSubmitting, handleClear }) => {
5
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Button, { variant: "outlined", onClick: handleClear, disabled: isSubmitting, children: "Clear" });
4
+ var ClearButton = ({ isSubmitting, handleClear, sx }) => {
5
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
6
+ _material.Button,
7
+ {
8
+ variant: "outlined",
9
+ onClick: handleClear,
10
+ disabled: isSubmitting,
11
+ sx,
12
+ children: "Clear"
13
+ }
14
+ );
6
15
  };
7
16
  var ClearButton_default = ClearButton;
8
17
 
@@ -15,7 +24,8 @@ var FilterButton = ({
15
24
  isSubmitting,
16
25
  show,
17
26
  title,
18
- icon
27
+ icon,
28
+ sx
19
29
  }) => {
20
30
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
21
31
  _lab.LoadingButton,
@@ -26,7 +36,8 @@ var FilterButton = ({
26
36
  disabled: !show,
27
37
  disableRipple: true,
28
38
  sx: {
29
- bgcolor: "#3caed7 !important",
39
+ ...sx,
40
+ bgcolor: "primary",
30
41
  display: "flex",
31
42
  alignItems: "center"
32
43
  },
@@ -49,11 +60,18 @@ var FilterButton_default = FilterButton;
49
60
 
50
61
  var _ManageSearch = require('@mui/icons-material/ManageSearch'); var _ManageSearch2 = _interopRequireDefault(_ManageSearch);
51
62
 
52
- var FilterWrapper = ({ children, title }) => {
63
+ var FilterWrapper = ({
64
+ children,
65
+ title,
66
+ cardSx,
67
+ textSx,
68
+ icon
69
+ }) => {
53
70
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
54
71
  _material.Card,
55
72
  {
56
73
  sx: {
74
+ ...cardSx,
57
75
  position: "relative",
58
76
  borderRadius: "0px",
59
77
  mb: 2
@@ -73,12 +91,12 @@ var FilterWrapper = ({ children, title }) => {
73
91
  alignItems: "center"
74
92
  },
75
93
  title: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _material.Box, { sx: { display: "flex", alignItems: "center", gap: 0.5 }, children: [
76
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _ManageSearch2.default, { sx: { color: "#4db3a2", height: "2.5rem" } }),
94
+ icon ? icon : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _ManageSearch2.default, { sx: { color: "primary", height: "2.5rem" } }),
77
95
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
78
96
  _material.Typography,
79
97
  {
80
98
  variant: "h5",
81
- sx: { color: "#4db3a2", fontWeight: "bold" },
99
+ sx: { ...textSx, color: "primary", fontWeight: "bold" },
82
100
  children: title
83
101
  }
84
102
  )
@@ -103,12 +121,15 @@ var FilterWrapper_default = FilterWrapper;
103
121
 
104
122
 
105
123
 
124
+
106
125
  var FormWrapper = ({
107
126
  children,
108
127
  title,
109
128
  editMode,
110
129
  cardSx,
111
- textSx
130
+ textSx,
131
+ icon,
132
+ actionButton
112
133
  }) => {
113
134
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
114
135
  _material.Card,
@@ -131,7 +152,23 @@ var FormWrapper = ({
131
152
  alignSelf: "center"
132
153
  }
133
154
  },
134
- title: _nullishCoalesce(title, () => ( /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Typography, { color: "primary", sx: textSx, children: editMode ? `Edit ${title}` : `Create ${title}` })))
155
+ title: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
156
+ _material.Box,
157
+ {
158
+ sx: {
159
+ display: "flex",
160
+ alignItems: "center",
161
+ justifyContent: "space-between"
162
+ },
163
+ children: [
164
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _material.Box, { sx: { display: "flex", alignItems: "center", gap: 0.5 }, children: [
165
+ _nullishCoalesce(icon, () => ( icon)),
166
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Typography, { color: "primary", sx: textSx, children: editMode ? `Edit ${title}` : `Create ${title}` })
167
+ ] }),
168
+ actionButton
169
+ ]
170
+ }
171
+ )
135
172
  }
136
173
  ),
137
174
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Divider, { sx: { mt: 0 } }),
@@ -149,7 +186,9 @@ var LabelText = ({
149
186
  label,
150
187
  value,
151
188
  gridSize,
152
- containerSize
189
+ containerSize,
190
+ labelSx,
191
+ valueSx
153
192
  }) => {
154
193
  const defaultGridSize = {
155
194
  labelSize: { xs: 6, sm: 6, md: 6 },
@@ -173,6 +212,7 @@ var LabelText = ({
173
212
  {
174
213
  size: size.labelSize,
175
214
  sx: {
215
+ ...labelSx,
176
216
  padding: "5px",
177
217
  fontSize: "14px",
178
218
  textAlign: { xs: "left", sm: "right", md: "right" }
@@ -191,9 +231,9 @@ var LabelText = ({
191
231
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Tooltip, { title: value, arrow: true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
192
232
  _material.Typography,
193
233
  {
194
- color: "#3598dc",
195
- fontSize: "14px",
196
234
  sx: {
235
+ ...valueSx,
236
+ fontSize: "14px",
197
237
  wordBreak: "break-word",
198
238
  overflow: "hidden",
199
239
  display: "-webkit-box",
@@ -229,13 +269,18 @@ var ListWrapper = ({
229
269
  title,
230
270
  count,
231
271
  show = true,
232
- actionButton
272
+ actionButton,
273
+ cardSx,
274
+ textSx,
275
+ icon,
276
+ showCount = true
233
277
  }) => {
234
278
  if (!show) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, {});
235
279
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
236
280
  _material.Card,
237
281
  {
238
282
  sx: {
283
+ ...cardSx,
239
284
  position: "relative",
240
285
  borderRadius: "0px"
241
286
  },
@@ -263,13 +308,17 @@ var ListWrapper = ({
263
308
  },
264
309
  children: [
265
310
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _material.Box, { sx: { display: "flex", alignItems: "center", gap: 0.5 }, children: [
266
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _ManageSearch2.default, { sx: { color: "#4db3a2", height: "2.5rem" } }),
267
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
311
+ icon ? icon : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _ManageSearch2.default, { sx: { color: "primary", height: "2.5rem" } }),
312
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
268
313
  _material.Typography,
269
314
  {
270
315
  variant: "h5",
271
- sx: { color: "#4db3a2", fontWeight: "bold" },
272
- children: `${title} (${count ? count : 0})`
316
+ sx: { ...textSx, color: "primary", fontWeight: "bold" },
317
+ children: [
318
+ title,
319
+ " ",
320
+ showCount ? `$(${count ? count : 0})` : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, {})
321
+ ]
273
322
  }
274
323
  )
275
324
  ] }),
@@ -304,18 +353,13 @@ var SimpleToolbar = () => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _xdatagr
304
353
  sx: {
305
354
  "& .MuiInputBase-root": {
306
355
  borderRadius: "8px",
307
- padding: "6px 10px",
308
- backgroundColor: "#f6f7f8"
356
+ padding: "6px 10px"
309
357
  },
310
358
  "& input": {
311
359
  fontSize: "14px",
312
360
  color: "#333"
313
361
  },
314
- borderRadius: "8px",
315
- ".css-hzgntl-MuiOutlinedInput-notchedOutline": {
316
- borderRadius: "8px",
317
- border: "1px solid #efefef !important"
318
- }
362
+ borderRadius: "8px"
319
363
  }
320
364
  }
321
365
  ),