@lumiastream/ui 0.5.4 → 0.5.5

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.
@@ -44,9 +44,6 @@ var LSInput = forwardRef(
44
44
  inputAfterText,
45
45
  maxWidth,
46
46
  className = "",
47
- InputProps: inputPropsProp,
48
- InputLabelProps: inputLabelPropsProp,
49
- inputProps: htmlInputPropsProp,
50
47
  slotProps: slotPropsProp,
51
48
  onChange,
52
49
  onChangeStart,
@@ -81,25 +78,11 @@ var LSInput = forwardRef(
81
78
  onChange?.(event, sanitizedValue);
82
79
  onChangeEnd?.(event, sanitizedValue);
83
80
  };
84
- const resolvedStartAdornment = inputPropsProp?.startAdornment ?? (startAdornment ? /* @__PURE__ */ jsx(InputAdornment, { position: "start", children: startAdornment }) : inputBeforeText ? /* @__PURE__ */ jsx(InputAdornment, { position: "start", children: /* @__PURE__ */ jsx("span", { className: "mui-ls-input-affix", children: inputBeforeText }) }) : void 0);
85
- const resolvedEndAdornment = inputPropsProp?.endAdornment ?? (endAdornment ? /* @__PURE__ */ jsx(InputAdornment, { position: "end", children: endAdornment }) : inputAfterText ? /* @__PURE__ */ jsx(InputAdornment, { position: "end", children: /* @__PURE__ */ jsx("span", { className: "mui-ls-input-affix", children: inputAfterText }) }) : void 0);
86
- const inputSlotProps = {
87
- ...inputPropsProp,
88
- startAdornment: resolvedStartAdornment,
89
- endAdornment: resolvedEndAdornment,
90
- readOnly: rest.readOnly ?? inputPropsProp?.readOnly,
91
- sx: {
92
- ...inputPropsProp?.sx ?? {},
93
- "& input, & textarea": {
94
- textAlign: centerText ? "center" : void 0,
95
- color: textColor ?? void 0
96
- }
97
- }
98
- };
99
- const inputLabelProps = {
100
- shrink: true,
101
- ...inputLabelPropsProp
102
- };
81
+ const callerInputSlot = slotPropsProp?.input ?? {};
82
+ const callerHtmlInputSlot = slotPropsProp?.htmlInput ?? {};
83
+ const callerInputLabelSlot = slotPropsProp?.inputLabel ?? {};
84
+ const resolvedStartAdornment = callerInputSlot.startAdornment ?? (startAdornment ? /* @__PURE__ */ jsx(InputAdornment, { position: "start", children: startAdornment }) : inputBeforeText ? /* @__PURE__ */ jsx(InputAdornment, { position: "start", children: /* @__PURE__ */ jsx("span", { className: "mui-ls-input-affix", children: inputBeforeText }) }) : void 0);
85
+ const resolvedEndAdornment = callerInputSlot.endAdornment ?? (endAdornment ? /* @__PURE__ */ jsx(InputAdornment, { position: "end", children: endAdornment }) : inputAfterText ? /* @__PURE__ */ jsx(InputAdornment, { position: "end", children: /* @__PURE__ */ jsx("span", { className: "mui-ls-input-affix", children: inputAfterText }) }) : void 0);
103
86
  const helperContent = helperText ?? (typeof error === "string" ? error : "");
104
87
  const hasError = typeof error === "string" ? true : Boolean(error);
105
88
  const resolvedMaxWidth = maxWidth ?? style?.maxWidth;
@@ -107,20 +90,24 @@ var LSInput = forwardRef(
107
90
  const slotProps = {
108
91
  ...slotPropsProp ?? {},
109
92
  input: {
110
- ...slotPropsProp?.input ?? {},
111
- ...inputSlotProps,
93
+ ...callerInputSlot,
94
+ startAdornment: resolvedStartAdornment,
95
+ endAdornment: resolvedEndAdornment,
96
+ readOnly: rest.readOnly ?? callerInputSlot.readOnly,
112
97
  sx: {
113
- ...slotPropsProp?.input?.sx ?? {},
114
- ...inputSlotProps.sx
98
+ ...callerInputSlot.sx ?? {},
99
+ "& input, & textarea": {
100
+ textAlign: centerText ? "center" : void 0,
101
+ color: textColor ?? void 0
102
+ }
115
103
  }
116
104
  },
117
105
  inputLabel: {
118
- ...slotPropsProp?.inputLabel ?? {},
119
- ...inputLabelProps
106
+ shrink: true,
107
+ ...callerInputLabelSlot
120
108
  },
121
109
  htmlInput: {
122
- ...slotPropsProp?.htmlInput ?? {},
123
- ...htmlInputPropsProp ?? {}
110
+ ...callerHtmlInputSlot
124
111
  }
125
112
  };
126
113
  const TextFieldComponent = TextField;
@@ -43,9 +43,6 @@ var LSInput = forwardRef(
43
43
  inputAfterText,
44
44
  maxWidth,
45
45
  className = "",
46
- InputProps: inputPropsProp,
47
- InputLabelProps: inputLabelPropsProp,
48
- inputProps: htmlInputPropsProp,
49
46
  slotProps: slotPropsProp,
50
47
  onChange,
51
48
  onChangeStart,
@@ -80,25 +77,11 @@ var LSInput = forwardRef(
80
77
  onChange?.(event, sanitizedValue);
81
78
  onChangeEnd?.(event, sanitizedValue);
82
79
  };
83
- const resolvedStartAdornment = inputPropsProp?.startAdornment ?? (startAdornment ? /* @__PURE__ */ jsx(InputAdornment, { position: "start", children: startAdornment }) : inputBeforeText ? /* @__PURE__ */ jsx(InputAdornment, { position: "start", children: /* @__PURE__ */ jsx("span", { className: "mui-ls-input-affix", children: inputBeforeText }) }) : void 0);
84
- const resolvedEndAdornment = inputPropsProp?.endAdornment ?? (endAdornment ? /* @__PURE__ */ jsx(InputAdornment, { position: "end", children: endAdornment }) : inputAfterText ? /* @__PURE__ */ jsx(InputAdornment, { position: "end", children: /* @__PURE__ */ jsx("span", { className: "mui-ls-input-affix", children: inputAfterText }) }) : void 0);
85
- const inputSlotProps = {
86
- ...inputPropsProp,
87
- startAdornment: resolvedStartAdornment,
88
- endAdornment: resolvedEndAdornment,
89
- readOnly: rest.readOnly ?? inputPropsProp?.readOnly,
90
- sx: {
91
- ...inputPropsProp?.sx ?? {},
92
- "& input, & textarea": {
93
- textAlign: centerText ? "center" : void 0,
94
- color: textColor ?? void 0
95
- }
96
- }
97
- };
98
- const inputLabelProps = {
99
- shrink: true,
100
- ...inputLabelPropsProp
101
- };
80
+ const callerInputSlot = slotPropsProp?.input ?? {};
81
+ const callerHtmlInputSlot = slotPropsProp?.htmlInput ?? {};
82
+ const callerInputLabelSlot = slotPropsProp?.inputLabel ?? {};
83
+ const resolvedStartAdornment = callerInputSlot.startAdornment ?? (startAdornment ? /* @__PURE__ */ jsx(InputAdornment, { position: "start", children: startAdornment }) : inputBeforeText ? /* @__PURE__ */ jsx(InputAdornment, { position: "start", children: /* @__PURE__ */ jsx("span", { className: "mui-ls-input-affix", children: inputBeforeText }) }) : void 0);
84
+ const resolvedEndAdornment = callerInputSlot.endAdornment ?? (endAdornment ? /* @__PURE__ */ jsx(InputAdornment, { position: "end", children: endAdornment }) : inputAfterText ? /* @__PURE__ */ jsx(InputAdornment, { position: "end", children: /* @__PURE__ */ jsx("span", { className: "mui-ls-input-affix", children: inputAfterText }) }) : void 0);
102
85
  const helperContent = helperText ?? (typeof error === "string" ? error : "");
103
86
  const hasError = typeof error === "string" ? true : Boolean(error);
104
87
  const resolvedMaxWidth = maxWidth ?? style?.maxWidth;
@@ -106,20 +89,24 @@ var LSInput = forwardRef(
106
89
  const slotProps = {
107
90
  ...slotPropsProp ?? {},
108
91
  input: {
109
- ...slotPropsProp?.input ?? {},
110
- ...inputSlotProps,
92
+ ...callerInputSlot,
93
+ startAdornment: resolvedStartAdornment,
94
+ endAdornment: resolvedEndAdornment,
95
+ readOnly: rest.readOnly ?? callerInputSlot.readOnly,
111
96
  sx: {
112
- ...slotPropsProp?.input?.sx ?? {},
113
- ...inputSlotProps.sx
97
+ ...callerInputSlot.sx ?? {},
98
+ "& input, & textarea": {
99
+ textAlign: centerText ? "center" : void 0,
100
+ color: textColor ?? void 0
101
+ }
114
102
  }
115
103
  },
116
104
  inputLabel: {
117
- ...slotPropsProp?.inputLabel ?? {},
118
- ...inputLabelProps
105
+ shrink: true,
106
+ ...callerInputLabelSlot
119
107
  },
120
108
  htmlInput: {
121
- ...slotPropsProp?.htmlInput ?? {},
122
- ...htmlInputPropsProp ?? {}
109
+ ...callerHtmlInputSlot
123
110
  }
124
111
  };
125
112
  const TextFieldComponent = TextField;
@@ -27,14 +27,7 @@ styleInject(".ls-color-picker,\n.ls-color-picker *,\n.mui-multi-select,\n.mui-mu
27
27
  import { KeyboardArrowDown } from "@mui/icons-material";
28
28
  import Autocomplete from "@mui/material/Autocomplete";
29
29
  import TextField from "@mui/material/TextField";
30
- import {
31
- memo,
32
- startTransition,
33
- useEffect,
34
- useMemo,
35
- useRef,
36
- useState
37
- } from "react";
30
+ import { memo, startTransition, useEffect, useMemo, useRef, useState } from "react";
38
31
  import { jsx } from "react/jsx-runtime";
39
32
  var LSFontPicker = memo(function LSFontPicker2({
40
33
  value,
@@ -92,9 +85,7 @@ var LSFontPicker = memo(function LSFontPicker2({
92
85
  popupIcon: /* @__PURE__ */ jsx(KeyboardArrowDown, {}),
93
86
  isOptionEqualToValue: (option, selectedValue) => option === selectedValue,
94
87
  onChange: (_event, newValue) => {
95
- handleValueChange(
96
- typeof newValue === "string" ? newValue : `${newValue ?? ""}`
97
- );
88
+ handleValueChange(typeof newValue === "string" ? newValue : `${newValue ?? ""}`);
98
89
  },
99
90
  onInputChange: (_event, newInputValue, reason) => {
100
91
  if (reason === "input" || reason === "clear") {
@@ -151,11 +142,7 @@ var LSFontPicker = memo(function LSFontPicker2({
151
142
  );
152
143
  },
153
144
  renderInput: (params) => {
154
- const {
155
- InputLabelProps: paramsInputLabelProps,
156
- InputProps: paramsInputProps,
157
- ...restParams
158
- } = params;
145
+ const { slotProps: paramsSlotProps = {}, ...restParams } = params;
159
146
  return /* @__PURE__ */ jsx(
160
147
  TextFieldComponent,
161
148
  {
@@ -172,12 +159,16 @@ var LSFontPicker = memo(function LSFontPicker2({
172
159
  }
173
160
  },
174
161
  slotProps: {
162
+ ...paramsSlotProps,
175
163
  inputLabel: {
176
- shrink: true,
177
- ...paramsInputLabelProps ?? {}
164
+ ...paramsSlotProps.inputLabel ?? {},
165
+ shrink: true
178
166
  },
179
167
  input: {
180
- ...paramsInputProps ?? {}
168
+ ...paramsSlotProps.input ?? {}
169
+ },
170
+ htmlInput: {
171
+ ...paramsSlotProps.htmlInput ?? {}
181
172
  }
182
173
  }
183
174
  }
package/dist/LSInput.d.ts CHANGED
@@ -5,14 +5,10 @@ interface LSInputPropsChild {
5
5
  id?: string;
6
6
  name?: string;
7
7
  label?: React.ReactNode;
8
- inputRef?: any;
9
8
  inputAfterText?: React.ReactNode;
10
9
  inputBeforeText?: React.ReactNode;
11
10
  startAdornment?: React.ReactNode;
12
11
  endAdornment?: React.ReactNode;
13
- InputProps?: any;
14
- InputLabelProps?: any;
15
- inputProps?: any;
16
12
  centerText?: boolean;
17
13
  maxWidth?: string;
18
14
  $maxWidth?: string;
package/dist/LSInput.js CHANGED
@@ -40,9 +40,6 @@ var LSInput = forwardRef(
40
40
  inputAfterText,
41
41
  maxWidth,
42
42
  className = "",
43
- InputProps: inputPropsProp,
44
- InputLabelProps: inputLabelPropsProp,
45
- inputProps: htmlInputPropsProp,
46
43
  slotProps: slotPropsProp,
47
44
  onChange,
48
45
  onChangeStart,
@@ -77,25 +74,11 @@ var LSInput = forwardRef(
77
74
  onChange?.(event, sanitizedValue);
78
75
  onChangeEnd?.(event, sanitizedValue);
79
76
  };
80
- const resolvedStartAdornment = inputPropsProp?.startAdornment ?? (startAdornment ? /* @__PURE__ */ jsx(InputAdornment, { position: "start", children: startAdornment }) : inputBeforeText ? /* @__PURE__ */ jsx(InputAdornment, { position: "start", children: /* @__PURE__ */ jsx("span", { className: "mui-ls-input-affix", children: inputBeforeText }) }) : void 0);
81
- const resolvedEndAdornment = inputPropsProp?.endAdornment ?? (endAdornment ? /* @__PURE__ */ jsx(InputAdornment, { position: "end", children: endAdornment }) : inputAfterText ? /* @__PURE__ */ jsx(InputAdornment, { position: "end", children: /* @__PURE__ */ jsx("span", { className: "mui-ls-input-affix", children: inputAfterText }) }) : void 0);
82
- const inputSlotProps = {
83
- ...inputPropsProp,
84
- startAdornment: resolvedStartAdornment,
85
- endAdornment: resolvedEndAdornment,
86
- readOnly: rest.readOnly ?? inputPropsProp?.readOnly,
87
- sx: {
88
- ...inputPropsProp?.sx ?? {},
89
- "& input, & textarea": {
90
- textAlign: centerText ? "center" : void 0,
91
- color: textColor ?? void 0
92
- }
93
- }
94
- };
95
- const inputLabelProps = {
96
- shrink: true,
97
- ...inputLabelPropsProp
98
- };
77
+ const callerInputSlot = slotPropsProp?.input ?? {};
78
+ const callerHtmlInputSlot = slotPropsProp?.htmlInput ?? {};
79
+ const callerInputLabelSlot = slotPropsProp?.inputLabel ?? {};
80
+ const resolvedStartAdornment = callerInputSlot.startAdornment ?? (startAdornment ? /* @__PURE__ */ jsx(InputAdornment, { position: "start", children: startAdornment }) : inputBeforeText ? /* @__PURE__ */ jsx(InputAdornment, { position: "start", children: /* @__PURE__ */ jsx("span", { className: "mui-ls-input-affix", children: inputBeforeText }) }) : void 0);
81
+ const resolvedEndAdornment = callerInputSlot.endAdornment ?? (endAdornment ? /* @__PURE__ */ jsx(InputAdornment, { position: "end", children: endAdornment }) : inputAfterText ? /* @__PURE__ */ jsx(InputAdornment, { position: "end", children: /* @__PURE__ */ jsx("span", { className: "mui-ls-input-affix", children: inputAfterText }) }) : void 0);
99
82
  const helperContent = helperText ?? (typeof error === "string" ? error : "");
100
83
  const hasError = typeof error === "string" ? true : Boolean(error);
101
84
  const resolvedMaxWidth = maxWidth ?? style?.maxWidth;
@@ -103,20 +86,24 @@ var LSInput = forwardRef(
103
86
  const slotProps = {
104
87
  ...slotPropsProp ?? {},
105
88
  input: {
106
- ...slotPropsProp?.input ?? {},
107
- ...inputSlotProps,
89
+ ...callerInputSlot,
90
+ startAdornment: resolvedStartAdornment,
91
+ endAdornment: resolvedEndAdornment,
92
+ readOnly: rest.readOnly ?? callerInputSlot.readOnly,
108
93
  sx: {
109
- ...slotPropsProp?.input?.sx ?? {},
110
- ...inputSlotProps.sx
94
+ ...callerInputSlot.sx ?? {},
95
+ "& input, & textarea": {
96
+ textAlign: centerText ? "center" : void 0,
97
+ color: textColor ?? void 0
98
+ }
111
99
  }
112
100
  },
113
101
  inputLabel: {
114
- ...slotPropsProp?.inputLabel ?? {},
115
- ...inputLabelProps
102
+ shrink: true,
103
+ ...callerInputLabelSlot
116
104
  },
117
105
  htmlInput: {
118
- ...slotPropsProp?.htmlInput ?? {},
119
- ...htmlInputPropsProp ?? {}
106
+ ...callerHtmlInputSlot
120
107
  }
121
108
  };
122
109
  const TextFieldComponent = TextField;
@@ -96,6 +96,16 @@ var LSSelect = ({
96
96
  border: "1px solid var(--neutralDark4)",
97
97
  borderRadius: "var(--radius, 1rem)",
98
98
  boxShadow: "0 16px 32px rgba(0, 0, 0, 0.32)",
99
+ "& .MuiList-root": {
100
+ backgroundColor: "var(--neutralDark2)"
101
+ },
102
+ "& .MuiListSubheader-root": {
103
+ backgroundColor: "var(--neutralDark1)",
104
+ color: "var(--neutralLight2)"
105
+ },
106
+ "& .MuiMenuItem-root": {
107
+ color: "var(--neutralLight1)"
108
+ },
99
109
  ...MenuProps?.slotProps?.paper?.sx
100
110
  }
101
111
  },
@@ -107,28 +117,6 @@ var LSSelect = ({
107
117
  ...MenuProps?.slotProps?.list?.sx
108
118
  }
109
119
  }
110
- },
111
- PaperProps: {
112
- ...MenuProps?.PaperProps ?? {},
113
- sx: {
114
- background: "var(--neutralDark2) !important",
115
- backgroundColor: "var(--neutralDark2)",
116
- color: "var(--neutralLight1)",
117
- border: "1px solid var(--neutralDark4)",
118
- borderRadius: "var(--radius, 1rem)",
119
- boxShadow: "0 16px 32px rgba(0, 0, 0, 0.32)",
120
- "& .MuiList-root": {
121
- backgroundColor: "var(--neutralDark2)"
122
- },
123
- "& .MuiListSubheader-root": {
124
- backgroundColor: "var(--neutralDark1)",
125
- color: "var(--neutralLight2)"
126
- },
127
- "& .MuiMenuItem-root": {
128
- color: "var(--neutralLight1)"
129
- },
130
- ...MenuProps?.PaperProps?.sx
131
- }
132
120
  }
133
121
  };
134
122
  return /* @__PURE__ */ jsxs(
@@ -199,6 +187,12 @@ var LSMultiSelect = ({
199
187
  /* @__PURE__ */ jsx3("div", { className: "ls-multi-select-value__count", children: `(${selected.length})` })
200
188
  ] }),
201
189
  MenuProps: {
190
+ // The previous version of this also set `PaperProps` here — that
191
+ // prop was removed from Menu in @mui/material v9 and React warns
192
+ // "does not recognize the `PaperProps` prop on a DOM element"
193
+ // when Menu spreads it through. Folded the one unique selector
194
+ // (`& .MuiList-root`) into `slotProps.paper.sx` below; everything
195
+ // else was already duplicated there.
202
196
  slotProps: {
203
197
  paper: {
204
198
  sx: {
@@ -210,7 +204,10 @@ var LSMultiSelect = ({
210
204
  boxShadow: "0 16px 32px rgba(0, 0, 0, 0.32)",
211
205
  backdropFilter: "none",
212
206
  opacity: 1,
213
- maxHeight: "280px !important"
207
+ maxHeight: "280px !important",
208
+ "& .MuiList-root": {
209
+ backgroundColor: "var(--neutralDark2)"
210
+ }
214
211
  }
215
212
  },
216
213
  list: {
@@ -219,21 +216,6 @@ var LSMultiSelect = ({
219
216
  color: "var(--neutralLight1)"
220
217
  }
221
218
  }
222
- },
223
- PaperProps: {
224
- sx: {
225
- background: "var(--neutralDark2) !important",
226
- backgroundColor: "var(--neutralDark2)",
227
- color: "var(--neutralLight1)",
228
- backdropFilter: "none",
229
- opacity: 1,
230
- maxHeight: "280px !important",
231
- border: "1px solid var(--neutralDark4)",
232
- borderRadius: "var(--radius, 1rem)",
233
- "& .MuiList-root": {
234
- backgroundColor: "var(--neutralDark2)"
235
- }
236
- }
237
219
  }
238
220
  },
239
221
  children: options.map((option) => /* @__PURE__ */ jsxs2(
package/dist/LSSelect.js CHANGED
@@ -65,6 +65,16 @@ var LSSelect = ({
65
65
  border: "1px solid var(--neutralDark4)",
66
66
  borderRadius: "var(--radius, 1rem)",
67
67
  boxShadow: "0 16px 32px rgba(0, 0, 0, 0.32)",
68
+ "& .MuiList-root": {
69
+ backgroundColor: "var(--neutralDark2)"
70
+ },
71
+ "& .MuiListSubheader-root": {
72
+ backgroundColor: "var(--neutralDark1)",
73
+ color: "var(--neutralLight2)"
74
+ },
75
+ "& .MuiMenuItem-root": {
76
+ color: "var(--neutralLight1)"
77
+ },
68
78
  ...MenuProps?.slotProps?.paper?.sx
69
79
  }
70
80
  },
@@ -76,28 +86,6 @@ var LSSelect = ({
76
86
  ...MenuProps?.slotProps?.list?.sx
77
87
  }
78
88
  }
79
- },
80
- PaperProps: {
81
- ...MenuProps?.PaperProps ?? {},
82
- sx: {
83
- background: "var(--neutralDark2) !important",
84
- backgroundColor: "var(--neutralDark2)",
85
- color: "var(--neutralLight1)",
86
- border: "1px solid var(--neutralDark4)",
87
- borderRadius: "var(--radius, 1rem)",
88
- boxShadow: "0 16px 32px rgba(0, 0, 0, 0.32)",
89
- "& .MuiList-root": {
90
- backgroundColor: "var(--neutralDark2)"
91
- },
92
- "& .MuiListSubheader-root": {
93
- backgroundColor: "var(--neutralDark1)",
94
- color: "var(--neutralLight2)"
95
- },
96
- "& .MuiMenuItem-root": {
97
- color: "var(--neutralLight1)"
98
- },
99
- ...MenuProps?.PaperProps?.sx
100
- }
101
89
  }
102
90
  };
103
91
  return /* @__PURE__ */ jsxs(
@@ -45,9 +45,6 @@ var LSInput = forwardRef(
45
45
  inputAfterText,
46
46
  maxWidth,
47
47
  className = "",
48
- InputProps: inputPropsProp,
49
- InputLabelProps: inputLabelPropsProp,
50
- inputProps: htmlInputPropsProp,
51
48
  slotProps: slotPropsProp,
52
49
  onChange,
53
50
  onChangeStart,
@@ -82,25 +79,11 @@ var LSInput = forwardRef(
82
79
  onChange?.(event, sanitizedValue);
83
80
  onChangeEnd?.(event, sanitizedValue);
84
81
  };
85
- const resolvedStartAdornment = inputPropsProp?.startAdornment ?? (startAdornment ? /* @__PURE__ */ jsx(InputAdornment, { position: "start", children: startAdornment }) : inputBeforeText ? /* @__PURE__ */ jsx(InputAdornment, { position: "start", children: /* @__PURE__ */ jsx("span", { className: "mui-ls-input-affix", children: inputBeforeText }) }) : void 0);
86
- const resolvedEndAdornment = inputPropsProp?.endAdornment ?? (endAdornment ? /* @__PURE__ */ jsx(InputAdornment, { position: "end", children: endAdornment }) : inputAfterText ? /* @__PURE__ */ jsx(InputAdornment, { position: "end", children: /* @__PURE__ */ jsx("span", { className: "mui-ls-input-affix", children: inputAfterText }) }) : void 0);
87
- const inputSlotProps = {
88
- ...inputPropsProp,
89
- startAdornment: resolvedStartAdornment,
90
- endAdornment: resolvedEndAdornment,
91
- readOnly: rest.readOnly ?? inputPropsProp?.readOnly,
92
- sx: {
93
- ...inputPropsProp?.sx ?? {},
94
- "& input, & textarea": {
95
- textAlign: centerText ? "center" : void 0,
96
- color: textColor ?? void 0
97
- }
98
- }
99
- };
100
- const inputLabelProps = {
101
- shrink: true,
102
- ...inputLabelPropsProp
103
- };
82
+ const callerInputSlot = slotPropsProp?.input ?? {};
83
+ const callerHtmlInputSlot = slotPropsProp?.htmlInput ?? {};
84
+ const callerInputLabelSlot = slotPropsProp?.inputLabel ?? {};
85
+ const resolvedStartAdornment = callerInputSlot.startAdornment ?? (startAdornment ? /* @__PURE__ */ jsx(InputAdornment, { position: "start", children: startAdornment }) : inputBeforeText ? /* @__PURE__ */ jsx(InputAdornment, { position: "start", children: /* @__PURE__ */ jsx("span", { className: "mui-ls-input-affix", children: inputBeforeText }) }) : void 0);
86
+ const resolvedEndAdornment = callerInputSlot.endAdornment ?? (endAdornment ? /* @__PURE__ */ jsx(InputAdornment, { position: "end", children: endAdornment }) : inputAfterText ? /* @__PURE__ */ jsx(InputAdornment, { position: "end", children: /* @__PURE__ */ jsx("span", { className: "mui-ls-input-affix", children: inputAfterText }) }) : void 0);
104
87
  const helperContent = helperText ?? (typeof error === "string" ? error : "");
105
88
  const hasError = typeof error === "string" ? true : Boolean(error);
106
89
  const resolvedMaxWidth = maxWidth ?? style?.maxWidth;
@@ -108,20 +91,24 @@ var LSInput = forwardRef(
108
91
  const slotProps = {
109
92
  ...slotPropsProp ?? {},
110
93
  input: {
111
- ...slotPropsProp?.input ?? {},
112
- ...inputSlotProps,
94
+ ...callerInputSlot,
95
+ startAdornment: resolvedStartAdornment,
96
+ endAdornment: resolvedEndAdornment,
97
+ readOnly: rest.readOnly ?? callerInputSlot.readOnly,
113
98
  sx: {
114
- ...slotPropsProp?.input?.sx ?? {},
115
- ...inputSlotProps.sx
99
+ ...callerInputSlot.sx ?? {},
100
+ "& input, & textarea": {
101
+ textAlign: centerText ? "center" : void 0,
102
+ color: textColor ?? void 0
103
+ }
116
104
  }
117
105
  },
118
106
  inputLabel: {
119
- ...slotPropsProp?.inputLabel ?? {},
120
- ...inputLabelProps
107
+ shrink: true,
108
+ ...callerInputLabelSlot
121
109
  },
122
110
  htmlInput: {
123
- ...slotPropsProp?.htmlInput ?? {},
124
- ...htmlInputPropsProp ?? {}
111
+ ...callerHtmlInputSlot
125
112
  }
126
113
  };
127
114
  const TextFieldComponent = TextField;
@@ -308,15 +295,15 @@ var LSSliderInput = ({
308
295
  onChange: (_event, nextValue) => handleInputChange({ target: { value: nextValue ?? "" } }),
309
296
  value: displayValue ?? "",
310
297
  inputAfterText,
311
- InputProps: {
312
- ...inputProps?.InputProps ?? {},
313
- name,
314
- type: "number",
315
- value: displayValue,
316
- min: displayMinimum,
317
- max: displayMaximum,
318
- step: displayStep,
319
- inputMode: stepPrecision > 0 ? "decimal" : "numeric"
298
+ slotProps: {
299
+ ...inputProps?.slotProps ?? {},
300
+ htmlInput: {
301
+ ...inputProps?.slotProps?.htmlInput ?? {},
302
+ min: displayMinimum,
303
+ max: displayMaximum,
304
+ step: displayStep,
305
+ inputMode: stepPrecision > 0 ? "decimal" : "numeric"
306
+ }
320
307
  },
321
308
  fullWidth: hideSlider ? fullWidth : false,
322
309
  $noMinHeight: false,
@@ -1,9 +1,8 @@
1
1
  import * as React from 'react';
2
+ import * as _mui_material from '@mui/material';
3
+ import { TextFieldProps } from '@mui/material/TextField';
2
4
 
3
- type LSTextFieldProps = Record<string, any> & {
4
- InputLabelProps?: Record<string, unknown>;
5
- InputProps?: Record<string, unknown>;
6
- };
7
- declare const LSTextField: React.ForwardRefExoticComponent<Omit<LSTextFieldProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
5
+ type LSTextFieldProps = TextFieldProps;
6
+ declare const LSTextField: React.ForwardRefExoticComponent<(Omit<_mui_material.OutlinedTextFieldProps, "ref"> | Omit<_mui_material.FilledTextFieldProps, "ref"> | Omit<_mui_material.StandardTextFieldProps, "ref">) & React.RefAttributes<HTMLDivElement>>;
8
7
 
9
8
  export { LSTextField, type LSTextFieldProps };
@@ -29,7 +29,8 @@ import { forwardRef } from "react";
29
29
  import { jsx } from "react/jsx-runtime";
30
30
  var LSTextField = forwardRef(
31
31
  (props, ref) => {
32
- const { InputLabelProps, InputProps, slotProps, ...rest } = props;
32
+ const { slotProps, ...rest } = props;
33
+ const paramsInputLabel = slotProps?.inputLabel ?? {};
33
34
  return /* @__PURE__ */ jsx(
34
35
  TextField,
35
36
  {
@@ -38,18 +39,9 @@ var LSTextField = forwardRef(
38
39
  className: "mui-ls-input",
39
40
  slotProps: {
40
41
  ...slotProps ?? {},
41
- input: {
42
- ...slotProps?.input ?? {},
43
- ...InputProps ?? {},
44
- sx: {
45
- ...slotProps?.input?.sx ?? {},
46
- ...InputProps?.sx ?? {}
47
- }
48
- },
49
42
  inputLabel: {
50
- ...slotProps?.inputLabel ?? {},
51
- shrink: true,
52
- ...InputLabelProps ?? {}
43
+ ...paramsInputLabel,
44
+ shrink: true
53
45
  }
54
46
  },
55
47
  ref