formik-form-components 0.2.25 → 0.2.26

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/index.js CHANGED
@@ -92,14 +92,16 @@ var AppDatePicker = react.forwardRef(
92
92
  onChange: handleChange,
93
93
  format,
94
94
  disabled,
95
+ slots: {
96
+ openPickerIcon: CalendarMonthIcon__default.default
97
+ },
95
98
  slotProps: {
96
99
  textField: {
97
100
  variant: "outlined",
98
101
  fullWidth: true,
99
102
  error: isTouched && Boolean(fieldError),
100
103
  helperText: isTouched && fieldError ? fieldError : void 0,
101
- sx: textFieldSx,
102
- openPickerIcon: CalendarMonthIcon__default.default
104
+ sx: textFieldSx
103
105
  }
104
106
  },
105
107
  ...otherProps
@@ -11866,106 +11868,447 @@ var AppSearchableMultiSelector = react.forwardRef(
11866
11868
  );
11867
11869
  AppSearchableMultiSelector.displayName = "AppSearchableMultiSelector";
11868
11870
  var AppSearchableMultiSelector_default = AppSearchableMultiSelector;
11869
- function AppSearchableSelectInput({
11870
- name,
11871
- label,
11872
- options = [],
11873
- required = false,
11874
- variant = "outlined",
11875
- placeholder,
11876
- setSearchQuery,
11877
- isResetRequired,
11878
- ...otherProps
11879
- }) {
11880
- const { errors, touched, setFieldValue, values } = formik.useFormikContext();
11871
+ var AppSearchableMultiSelector2 = react.forwardRef((props, ref) => {
11872
+ const {
11873
+ name,
11874
+ label,
11875
+ multiple = true,
11876
+ options = [],
11877
+ setSearchQuery,
11878
+ required = false,
11879
+ variant = "outlined",
11880
+ disabled = false,
11881
+ readOnly = false,
11882
+ showHelperText = false,
11883
+ helperText,
11884
+ maxSelections,
11885
+ showSelectedCount = false,
11886
+ sx,
11887
+ formControlSx,
11888
+ labelSx,
11889
+ inputSx,
11890
+ textFieldSx,
11891
+ autocompleteSx,
11892
+ listboxSx,
11893
+ optionSx,
11894
+ chipSx,
11895
+ errorSx,
11896
+ helperTextSx,
11897
+ selectedCountSx,
11898
+ renderInput: externalRenderInput,
11899
+ renderOption: externalRenderOption,
11900
+ renderTags: externalRenderTags,
11901
+ renderGroup: externalRenderGroup,
11902
+ labelComponent: LabelComponent = material.InputLabel,
11903
+ inputComponent: InputComponent = "input",
11904
+ errorComponent: ErrorComponent = material.Typography,
11905
+ helperTextComponent: HelperTextComponent = material.FormHelperText,
11906
+ labelProps = {},
11907
+ inputProps = {},
11908
+ textFieldProps = {},
11909
+ autocompleteProps = {},
11910
+ checkboxProps = {},
11911
+ chipProps = {},
11912
+ errorProps = {},
11913
+ helperTextProps = {},
11914
+ className = "",
11915
+ formControlClassName = "",
11916
+ labelClassName = "",
11917
+ inputClassName = "",
11918
+ textFieldClassName = "",
11919
+ autocompleteClassName = "",
11920
+ listboxClassName = "",
11921
+ optionClassName = "",
11922
+ chipClassName = "",
11923
+ errorClassName = "",
11924
+ helperTextClassName = "",
11925
+ onInputChange: externalOnInputChange,
11926
+ onChange: externalOnChange,
11927
+ onOpen,
11928
+ onClose,
11929
+ onBlur: externalOnBlur,
11930
+ onFocus: externalOnFocus,
11931
+ onClear,
11932
+ onMaxSelectionsReached,
11933
+ onRemove,
11934
+ onAdd,
11935
+ ...otherProps
11936
+ } = props;
11937
+ material.useTheme();
11938
+ const { values, setFieldValue, errors, touched, setFieldTouched } = formik.useFormikContext();
11881
11939
  const fieldError = _19__default.default.get(errors, name);
11882
- const isTouched = _19__default.default.get(touched, name);
11940
+ const isTouched = Boolean(_19__default.default.get(touched, name));
11941
+ const hasError = Boolean(fieldError) && isTouched;
11883
11942
  const val = _19__default.default.get(values, name);
11884
- const selectedOption = options.find((option) => option.value === val) || null;
11885
- const handleChange = (event, newValue) => {
11886
- setFieldValue(name, newValue ? newValue.value : "");
11887
- };
11888
- const handleSearchChange = (event) => {
11889
- const { value } = event.target;
11890
- if (setSearchQuery) {
11891
- setSearchQuery(value);
11892
- }
11893
- };
11894
- return /* @__PURE__ */ jsxRuntime.jsx(
11895
- material.FormControl,
11896
- {
11897
- fullWidth: true,
11898
- variant,
11899
- error: isTouched && Boolean(fieldError),
11900
- sx: {
11901
- padding: "0px !important",
11902
- ".MuiAutocomplete-endAdornment": { right: "0 !important" },
11903
- ".MuiInputBase-root": {
11904
- padding: "0px !important",
11905
- pr: "39px !important",
11906
- pl: "10px !important"
11943
+ const selectedValues = Array.isArray(val) ? val : [];
11944
+ const selectedCount = selectedValues.length;
11945
+ const handleChange = react.useCallback(
11946
+ (event, value, reason, details) => {
11947
+ const normalizedValue = (() => {
11948
+ if (value === null)
11949
+ return [];
11950
+ const arr = Array.isArray(value) ? value : [value];
11951
+ return arr.map(
11952
+ (item) => typeof item === "string" ? { value: item, label: item } : item
11953
+ );
11954
+ })();
11955
+ if (maxSelections && normalizedValue.length > maxSelections) {
11956
+ onMaxSelectionsReached == null ? void 0 : onMaxSelectionsReached(maxSelections);
11957
+ return;
11958
+ }
11959
+ if (reason === "selectOption" || reason === "removeOption") {
11960
+ const added = normalizedValue.filter(
11961
+ (item) => !selectedValues.some((v) => v.value === item.value)
11962
+ );
11963
+ const removed = selectedValues.filter(
11964
+ (item) => !normalizedValue.some((v) => v.value === item.value)
11965
+ );
11966
+ added.forEach((item) => onAdd == null ? void 0 : onAdd(item));
11967
+ removed.forEach((item) => onRemove == null ? void 0 : onRemove(item));
11968
+ }
11969
+ setFieldValue(name, normalizedValue, true);
11970
+ externalOnChange == null ? void 0 : externalOnChange(event, normalizedValue, reason);
11971
+ },
11972
+ [
11973
+ maxSelections,
11974
+ selectedValues,
11975
+ setFieldValue,
11976
+ name,
11977
+ onMaxSelectionsReached,
11978
+ onAdd,
11979
+ onRemove,
11980
+ externalOnChange
11981
+ ]
11982
+ );
11983
+ const handleInputChange = react.useCallback(
11984
+ (event, value, reason) => {
11985
+ setSearchQuery == null ? void 0 : setSearchQuery(value);
11986
+ externalOnInputChange == null ? void 0 : externalOnInputChange(event, value, reason);
11987
+ },
11988
+ [setSearchQuery, externalOnInputChange]
11989
+ );
11990
+ const handleBlur = react.useCallback(
11991
+ (event) => {
11992
+ setFieldTouched(name, true, true);
11993
+ externalOnBlur == null ? void 0 : externalOnBlur(event);
11994
+ },
11995
+ [name, setFieldTouched, externalOnBlur]
11996
+ );
11997
+ const handleFocus = react.useCallback(
11998
+ (event) => {
11999
+ externalOnFocus == null ? void 0 : externalOnFocus(event);
12000
+ },
12001
+ [externalOnFocus]
12002
+ );
12003
+ const filterOptions = react.useCallback(
12004
+ (options2, { inputValue }) => {
12005
+ if (!inputValue)
12006
+ return options2;
12007
+ const inputValueLower = inputValue.toLowerCase();
12008
+ return options2.filter(
12009
+ (option) => {
12010
+ var _a, _b, _c, _d;
12011
+ return ((_a = option == null ? void 0 : option.label) == null ? void 0 : _a.toLowerCase().includes(inputValueLower)) || String(option.value).toLowerCase().includes(inputValueLower) || ((_b = option == null ? void 0 : option.searchAbleValue1) == null ? void 0 : _b.toLowerCase().includes(inputValueLower)) || ((_c = option == null ? void 0 : option.searchAbleValue2) == null ? void 0 : _c.toLowerCase().includes(inputValueLower)) || ((_d = option == null ? void 0 : option.searchAbleValue3) == null ? void 0 : _d.toLowerCase().includes(inputValueLower));
12012
+ }
12013
+ );
12014
+ },
12015
+ []
12016
+ );
12017
+ const defaultRenderInput = react.useCallback(
12018
+ (params) => /* @__PURE__ */ jsxRuntime.jsx(
12019
+ material.TextField,
12020
+ {
12021
+ ...params,
12022
+ variant,
12023
+ error: hasError,
12024
+ helperText: "",
12025
+ placeholder: "",
12026
+ inputRef: inputProps.ref,
12027
+ inputProps: {
12028
+ ...params.inputProps,
12029
+ ...inputProps,
12030
+ className: `${params.inputProps.className || ""} ${inputClassName}`.trim()
11907
12031
  },
11908
- ".MuiOutlinedInput-root": {
11909
- backgroundColor: (theme) => `${theme.palette.common.white} !important`
12032
+ InputProps: {
12033
+ ...params.InputProps,
12034
+ ...textFieldProps.InputProps,
12035
+ className: `${params.InputProps.className || ""} ${textFieldClassName}`.trim()
12036
+ },
12037
+ sx: [
12038
+ {
12039
+ "& .MuiOutlinedInput-root": {
12040
+ borderRadius: "8px",
12041
+ "& fieldset": {
12042
+ borderColor: hasError ? "error.main" : "divider"
12043
+ },
12044
+ "&:hover fieldset": {
12045
+ borderColor: hasError ? "error.main" : "text.primary"
12046
+ },
12047
+ "&.Mui-focused fieldset": {
12048
+ borderColor: hasError ? "error.main" : "primary.main"
12049
+ }
12050
+ }
12051
+ },
12052
+ ...Array.isArray(textFieldSx) ? textFieldSx : textFieldSx ? [textFieldSx] : []
12053
+ ],
12054
+ ...textFieldProps
12055
+ }
12056
+ ),
12057
+ [
12058
+ variant,
12059
+ hasError,
12060
+ inputProps,
12061
+ inputClassName,
12062
+ textFieldProps,
12063
+ textFieldClassName,
12064
+ textFieldSx
12065
+ ]
12066
+ );
12067
+ const defaultRenderOption = react.useCallback(
12068
+ (props2, option, { selected }) => /* @__PURE__ */ react.createElement(
12069
+ "li",
12070
+ {
12071
+ ...props2,
12072
+ key: option.value,
12073
+ className: `${props2.className || ""} ${optionClassName}`.trim(),
12074
+ style: {
12075
+ ...props2.style,
12076
+ opacity: option.disabled ? 0.5 : 1,
12077
+ pointerEvents: option.disabled ? "none" : "auto"
11910
12078
  }
11911
12079
  },
11912
- children: /* @__PURE__ */ jsxRuntime.jsx(
11913
- material.Autocomplete,
12080
+ /* @__PURE__ */ jsxRuntime.jsx(
12081
+ material.Checkbox,
11914
12082
  {
11915
- options,
11916
- getOptionLabel: (option) => option.label || String(option.value),
11917
- isOptionEqualToValue: (option, value) => option.value === value.value,
11918
- value: selectedOption,
11919
- onChange: handleChange,
11920
- filterOptions: (options2, { inputValue }) => {
11921
- return options2.filter(
11922
- (option) => {
11923
- var _a, _b, _c, _d;
11924
- return ((_a = option == null ? void 0 : option.label) == null ? void 0 : _a.toLowerCase().includes(inputValue.toLowerCase())) || String(option.value).toLowerCase().includes(inputValue.toLowerCase()) || ((_b = option == null ? void 0 : option.searchAbleValue1) == null ? void 0 : _b.toLowerCase().includes(inputValue.toLowerCase())) || ((_c = option == null ? void 0 : option.searchAbleValue2) == null ? void 0 : _c.toLowerCase().includes(inputValue.toLowerCase())) || ((_d = option == null ? void 0 : option.searchAbleValue3) == null ? void 0 : _d.toLowerCase().includes(inputValue.toLowerCase()));
11925
- }
11926
- );
12083
+ checked: selected,
12084
+ disabled: option.disabled,
12085
+ sx: {
12086
+ color: "text.secondary",
12087
+ "&.Mui-checked": {
12088
+ color: "primary.main"
12089
+ },
12090
+ "&.Mui-disabled": {
12091
+ color: "text.disabled"
12092
+ },
12093
+ mr: 1,
12094
+ ...checkboxProps.sx
11927
12095
  },
11928
- renderInput: (params) => /* @__PURE__ */ jsxRuntime.jsx(
11929
- material.TextField,
12096
+ ...checkboxProps
12097
+ }
12098
+ ),
12099
+ option.icon && /* @__PURE__ */ jsxRuntime.jsx(material.Box, { component: "span", sx: { mr: 1 }, children: option.icon }),
12100
+ /* @__PURE__ */ jsxRuntime.jsx(
12101
+ material.Typography,
12102
+ {
12103
+ variant: "body2",
12104
+ sx: [
11930
12105
  {
11931
- ...params,
11932
- onChange: handleSearchChange,
11933
- label: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
11934
- label,
11935
- required && /* @__PURE__ */ jsxRuntime.jsx(material.Typography, { sx: { color: "red" }, component: "span", children: " *" })
11936
- ] }),
11937
- variant,
11938
- placeholder,
11939
- error: Boolean(fieldError) && isTouched,
11940
- helperText: isTouched && fieldError ? fieldError : "",
11941
- FormHelperTextProps: {
11942
- sx: { color: "#FF5630" }
11943
- },
11944
- sx: {
11945
- "& .MuiInputLabel-root": {
11946
- color: "text.primary"
11947
- },
11948
- "& .MuiInputLabel-root.Mui-focused": {
12106
+ color: option.disabled ? "text.disabled" : "text.primary",
12107
+ ...option.textSx
12108
+ },
12109
+ ...Array.isArray(optionSx) ? optionSx : [optionSx]
12110
+ ],
12111
+ children: option.label
12112
+ }
12113
+ )
12114
+ ),
12115
+ [optionClassName, checkboxProps, optionSx]
12116
+ );
12117
+ const defaultRenderTags = react.useCallback(
12118
+ (value, getTagProps) => /* @__PURE__ */ jsxRuntime.jsx(material.Box, { sx: { display: "flex", flexWrap: "wrap", gap: 0.5, mt: 0.5 }, children: value.map((option, index) => {
12119
+ const { key, ...tagProps } = getTagProps({ index });
12120
+ return /* @__PURE__ */ react.createElement(
12121
+ material.Chip,
12122
+ {
12123
+ ...tagProps,
12124
+ key: option.value,
12125
+ label: option.label,
12126
+ disabled: disabled || option.disabled,
12127
+ sx: [
12128
+ {
12129
+ height: "24px",
12130
+ borderRadius: "4px",
12131
+ "& .MuiChip-deleteIcon": {
12132
+ color: "text.secondary",
12133
+ "&:hover": {
11949
12134
  color: "text.primary"
12135
+ }
12136
+ }
12137
+ },
12138
+ ...Array.isArray(chipSx) ? chipSx : [chipSx]
12139
+ ],
12140
+ className: `${chipClassName} ${option.disabled ? "Mui-disabled" : ""}`.trim(),
12141
+ ...chipProps
12142
+ }
12143
+ );
12144
+ }) }),
12145
+ [disabled, chipSx, chipClassName, chipProps]
12146
+ );
12147
+ const renderSelectedCount = react.useCallback(() => {
12148
+ if (!showSelectedCount || !multiple)
12149
+ return null;
12150
+ return /* @__PURE__ */ jsxRuntime.jsxs(
12151
+ material.Typography,
12152
+ {
12153
+ variant: "caption",
12154
+ sx: [
12155
+ {
12156
+ mt: 0.5,
12157
+ color: "text.secondary"
12158
+ },
12159
+ ...Array.isArray(selectedCountSx) ? selectedCountSx : [selectedCountSx]
12160
+ ],
12161
+ children: [
12162
+ `${selectedCount} selected`,
12163
+ maxSelections ? ` (max ${maxSelections})` : ""
12164
+ ]
12165
+ }
12166
+ );
12167
+ }, [
12168
+ showSelectedCount,
12169
+ multiple,
12170
+ selectedCount,
12171
+ maxSelections,
12172
+ selectedCountSx
12173
+ ]);
12174
+ return /* @__PURE__ */ jsxRuntime.jsx(
12175
+ material.Box,
12176
+ {
12177
+ ref,
12178
+ className: `app-searchable-multi-selector ${className}`.trim(),
12179
+ sx: [{ width: "100%" }, ...Array.isArray(sx) ? sx : sx ? [sx] : []],
12180
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
12181
+ material.FormControl,
12182
+ {
12183
+ fullWidth: true,
12184
+ error: hasError,
12185
+ disabled,
12186
+ className: `app-searchable-multi-selector-form-control ${formControlClassName}`.trim(),
12187
+ sx: [
12188
+ {
12189
+ "& .MuiAutocomplete-root": {
12190
+ "& .MuiOutlinedInput-root": {
12191
+ padding: "4px"
11950
12192
  },
11951
- "& .MuiOutlinedInput-input": {
11952
- color: "common.black"
11953
- },
11954
- "& .MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline": {
11955
- borderColor: "common.white"
11956
- },
11957
- "& .MuiSvgIcon-root": {
11958
- color: "common.black"
12193
+ "& .MuiAutocomplete-input": {
12194
+ padding: "8.5px 4px"
11959
12195
  }
11960
12196
  }
11961
- }
11962
- ),
11963
- ...otherProps
12197
+ },
12198
+ ...Array.isArray(formControlSx) ? formControlSx : formControlSx ? [formControlSx] : []
12199
+ ],
12200
+ children: [
12201
+ label && /* @__PURE__ */ jsxRuntime.jsxs(
12202
+ LabelComponent,
12203
+ {
12204
+ shrink: true,
12205
+ htmlFor: `autocomplete-${name}`,
12206
+ className: `app-searchable-multi-selector-label ${labelClassName}`.trim(),
12207
+ sx: [
12208
+ {
12209
+ mb: 1,
12210
+ color: hasError ? "error.main" : "text.primary",
12211
+ "&.Mui-focused": {
12212
+ color: hasError ? "error.main" : "primary.main"
12213
+ }
12214
+ },
12215
+ ...Array.isArray(labelSx) ? labelSx : [labelSx]
12216
+ ],
12217
+ ...labelProps,
12218
+ children: [
12219
+ label,
12220
+ required && /* @__PURE__ */ jsxRuntime.jsx(material.Box, { component: "span", sx: { color: "error.main", ml: 0.5 }, children: "*" })
12221
+ ]
12222
+ }
12223
+ ),
12224
+ /* @__PURE__ */ jsxRuntime.jsx(
12225
+ material.Autocomplete,
12226
+ {
12227
+ multiple,
12228
+ id: `autocomplete-${name}`,
12229
+ options,
12230
+ value: selectedValues,
12231
+ filterOptions,
12232
+ onInputChange: handleInputChange,
12233
+ onChange: handleChange,
12234
+ onOpen,
12235
+ onClose,
12236
+ onBlur: handleBlur,
12237
+ onFocus: handleFocus,
12238
+ disableCloseOnSelect: multiple,
12239
+ readOnly,
12240
+ disabled,
12241
+ isOptionEqualToValue: (option, value) => option.value === value.value,
12242
+ getOptionLabel: (option) => typeof option === "string" ? option : option.label,
12243
+ getOptionDisabled: (option) => !!option.disabled,
12244
+ renderInput: externalRenderInput || defaultRenderInput,
12245
+ renderOption: externalRenderOption || defaultRenderOption,
12246
+ renderTags: externalRenderTags || defaultRenderTags,
12247
+ renderGroup: externalRenderGroup,
12248
+ ListboxProps: {
12249
+ className: `app-searchable-multi-selector-listbox ${listboxClassName}`.trim(),
12250
+ sx: [
12251
+ {
12252
+ "& .MuiAutocomplete-option": {
12253
+ px: 2,
12254
+ py: 1,
12255
+ '&[aria-selected="true"]': {
12256
+ backgroundColor: "action.selected",
12257
+ "&.Mui-focused": {
12258
+ backgroundColor: "action.hover"
12259
+ }
12260
+ },
12261
+ "&.Mui-focused": {
12262
+ backgroundColor: "action.hover"
12263
+ }
12264
+ }
12265
+ },
12266
+ ...Array.isArray(optionSx) ? optionSx : optionSx ? [optionSx] : [],
12267
+ ...Array.isArray(listboxSx) ? listboxSx : listboxSx ? [listboxSx] : []
12268
+ ]
12269
+ },
12270
+ className: `app-searchable-multi-selector-autocomplete ${autocompleteClassName}`.trim(),
12271
+ sx: [
12272
+ {
12273
+ "& .MuiAutocomplete-tag": {
12274
+ margin: 0,
12275
+ height: "auto"
12276
+ },
12277
+ "& .MuiAutocomplete-endAdornment": {
12278
+ right: 8
12279
+ }
12280
+ },
12281
+ ...Array.isArray(autocompleteSx) ? autocompleteSx : autocompleteSx ? [autocompleteSx] : []
12282
+ ],
12283
+ ...autocompleteProps,
12284
+ ...otherProps
12285
+ }
12286
+ ),
12287
+ (showHelperText || hasError) && /* @__PURE__ */ jsxRuntime.jsx(
12288
+ HelperTextComponent,
12289
+ {
12290
+ error: hasError,
12291
+ sx: [
12292
+ {
12293
+ mx: 0,
12294
+ mt: 0.5,
12295
+ ...hasError ? { color: "error.main", ...errorSx } : { color: "text.secondary", ...helperTextSx }
12296
+ }
12297
+ ],
12298
+ className: `app-searchable-multi-selector-helper-text ${helperTextClassName} ${hasError ? "Mui-error" : ""}`.trim(),
12299
+ ...helperTextProps,
12300
+ children: hasError ? fieldError : helperText
12301
+ }
12302
+ ),
12303
+ renderSelectedCount()
12304
+ ]
11964
12305
  }
11965
12306
  )
11966
12307
  }
11967
12308
  );
11968
- }
12309
+ });
12310
+ AppSearchableMultiSelector2.displayName = "AppSearchableMultiSelector";
12311
+ var AppSearchableSelect_default = AppSearchableMultiSelector2;
11969
12312
  var AppSelectInput = react.forwardRef(
11970
12313
  ({
11971
12314
  name,
@@ -12076,16 +12419,9 @@ var AppSelectInput = react.forwardRef(
12076
12419
  className: "app-select-input",
12077
12420
  sx: [
12078
12421
  {
12079
- "& .MuiInputLabel-root": {
12080
- "&.Mui-focused": {
12081
- color: hasError ? "error.main" : "primary.main"
12082
- },
12083
- "&.Mui-disabled": {
12084
- color: "text.disabled"
12085
- }
12086
- }
12422
+ width: fullWidth ? "100%" : "auto"
12087
12423
  },
12088
- ...Array.isArray(formControlSx) ? formControlSx : [formControlSx].filter(Boolean)
12424
+ ...Array.isArray(sx) ? sx : [sx].filter(Boolean)
12089
12425
  ],
12090
12426
  children: /* @__PURE__ */ jsxRuntime.jsxs(
12091
12427
  material.FormControl,
@@ -12097,13 +12433,24 @@ var AppSelectInput = react.forwardRef(
12097
12433
  className: "app-select-form-control",
12098
12434
  sx: [
12099
12435
  {
12436
+ position: "relative",
12437
+ "& .MuiOutlinedInput-notchedOutline": {
12438
+ borderWidth: "1px"
12439
+ },
12100
12440
  "& .MuiInputLabel-root": {
12441
+ position: "relative",
12442
+ transform: "none",
12443
+ fontSize: "0.875rem",
12444
+ mb: 1,
12101
12445
  "&.Mui-focused": {
12102
12446
  color: hasError ? "error.main" : "primary.main"
12103
12447
  },
12104
12448
  "&.Mui-disabled": {
12105
12449
  color: "text.disabled"
12106
12450
  }
12451
+ },
12452
+ "& .MuiInputLabel-shrink": {
12453
+ transform: "none"
12107
12454
  }
12108
12455
  },
12109
12456
  ...Array.isArray(formControlSx) ? formControlSx : formControlSx ? [formControlSx] : []
@@ -12115,15 +12462,23 @@ var AppSelectInput = react.forwardRef(
12115
12462
  id: `select-${name}-label`,
12116
12463
  htmlFor: `select-${name}`,
12117
12464
  className: "app-select-label",
12465
+ shrink: false,
12118
12466
  sx: [
12119
12467
  {
12468
+ position: "relative",
12469
+ transform: "none",
12470
+ fontSize: "0.875rem",
12471
+ fontWeight: 500,
12120
12472
  color: hasError ? "error.main" : "text.secondary",
12473
+ mb: 1,
12121
12474
  "&.Mui-focused": {
12122
12475
  color: hasError ? "error.main" : "primary.main"
12123
12476
  },
12124
- mb: 1,
12125
- ...Array.isArray(labelSx) ? labelSx : [labelSx]
12126
- }
12477
+ "&.Mui-disabled": {
12478
+ color: "text.disabled"
12479
+ }
12480
+ },
12481
+ ...Array.isArray(labelSx) ? labelSx : [labelSx].filter(Boolean)
12127
12482
  ],
12128
12483
  children: [
12129
12484
  label,
@@ -12154,6 +12509,8 @@ var AppSelectInput = react.forwardRef(
12154
12509
  onOpen,
12155
12510
  onClose,
12156
12511
  renderValue,
12512
+ label: void 0,
12513
+ displayEmpty: true,
12157
12514
  inputProps: {
12158
12515
  readOnly,
12159
12516
  ...inputProps
@@ -12164,6 +12521,7 @@ var AppSelectInput = react.forwardRef(
12164
12521
  {
12165
12522
  mt: 1,
12166
12523
  boxShadow: theme.shadows[3],
12524
+ maxHeight: 300,
12167
12525
  "& .MuiMenuItem-root": {
12168
12526
  px: 2,
12169
12527
  py: 1,
@@ -12182,7 +12540,24 @@ var AppSelectInput = react.forwardRef(
12182
12540
  },
12183
12541
  sx: [
12184
12542
  {
12185
- // Your base styles here
12543
+ "& .MuiSelect-select": {
12544
+ minHeight: "1.4375em",
12545
+ padding: "16.5px 14px",
12546
+ "&.MuiInputBase-input": {
12547
+ padding: "16.5px 14px"
12548
+ }
12549
+ },
12550
+ "&.MuiOutlinedInput-root": {
12551
+ "& fieldset": {
12552
+ borderWidth: "1px"
12553
+ },
12554
+ "&:hover fieldset": {
12555
+ borderWidth: "1px"
12556
+ },
12557
+ "&.Mui-focused fieldset": {
12558
+ borderWidth: "2px"
12559
+ }
12560
+ },
12186
12561
  "&.Mui-disabled": {
12187
12562
  backgroundColor: "action.disabledBackground",
12188
12563
  "& .MuiOutlinedInput-notchedOutline": {
@@ -12212,6 +12587,7 @@ var AppSelectInput = react.forwardRef(
12212
12587
  {
12213
12588
  mx: 0,
12214
12589
  mt: 0.5,
12590
+ fontSize: "0.75rem",
12215
12591
  ...hasError ? {
12216
12592
  color: "error.main",
12217
12593
  ...errorSx
@@ -14006,7 +14382,7 @@ exports.AppRadioGroup = AppRadioGroup_default;
14006
14382
  exports.AppRating = AppRating_default;
14007
14383
  exports.AppRichTextEditor = AppRichTextEditor_default;
14008
14384
  exports.AppSearchableMultiSelector = AppSearchableMultiSelector_default;
14009
- exports.AppSearchableSelectInput = AppSearchableSelectInput;
14385
+ exports.AppSearchableSelectInput = AppSearchableSelect_default;
14010
14386
  exports.AppSelectInput = AppSelectInput_default;
14011
14387
  exports.AppSimpleUploadFile = AppSimpleUploadFile_default;
14012
14388
  exports.AppSwitch = AppSwitch;