@lumiastream/ui 0.5.4 → 0.5.6
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/LSColorPicker.js +17 -30
- package/dist/LSDatePicker.js +17 -30
- package/dist/LSFontPicker.js +10 -19
- package/dist/LSInput.d.ts +0 -4
- package/dist/LSInput.js +17 -30
- package/dist/LSMultiSelect.js +20 -38
- package/dist/LSSelect.js +10 -22
- package/dist/LSSliderInput.js +26 -39
- package/dist/LSTextField.d.ts +4 -5
- package/dist/LSTextField.js +4 -12
- package/dist/LSVariableInputField.js +46 -73
- package/dist/components.d.ts +1 -0
- package/dist/components.js +85 -139
- package/dist/index.d.ts +1 -0
- package/dist/index.js +134 -166
- package/dist/se-import.js +124 -150
- package/package.json +1 -1
|
@@ -61,9 +61,6 @@ var LSInput = forwardRef(
|
|
|
61
61
|
inputAfterText,
|
|
62
62
|
maxWidth,
|
|
63
63
|
className = "",
|
|
64
|
-
InputProps: inputPropsProp,
|
|
65
|
-
InputLabelProps: inputLabelPropsProp,
|
|
66
|
-
inputProps: htmlInputPropsProp,
|
|
67
64
|
slotProps: slotPropsProp,
|
|
68
65
|
onChange,
|
|
69
66
|
onChangeStart,
|
|
@@ -98,25 +95,11 @@ var LSInput = forwardRef(
|
|
|
98
95
|
onChange?.(event, sanitizedValue);
|
|
99
96
|
onChangeEnd?.(event, sanitizedValue);
|
|
100
97
|
};
|
|
101
|
-
const
|
|
102
|
-
const
|
|
103
|
-
const
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
endAdornment: resolvedEndAdornment,
|
|
107
|
-
readOnly: rest.readOnly ?? inputPropsProp?.readOnly,
|
|
108
|
-
sx: {
|
|
109
|
-
...inputPropsProp?.sx ?? {},
|
|
110
|
-
"& input, & textarea": {
|
|
111
|
-
textAlign: centerText ? "center" : void 0,
|
|
112
|
-
color: textColor ?? void 0
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
};
|
|
116
|
-
const inputLabelProps = {
|
|
117
|
-
shrink: true,
|
|
118
|
-
...inputLabelPropsProp
|
|
119
|
-
};
|
|
98
|
+
const callerInputSlot = slotPropsProp?.input ?? {};
|
|
99
|
+
const callerHtmlInputSlot = slotPropsProp?.htmlInput ?? {};
|
|
100
|
+
const callerInputLabelSlot = slotPropsProp?.inputLabel ?? {};
|
|
101
|
+
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);
|
|
102
|
+
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);
|
|
120
103
|
const helperContent = helperText ?? (typeof error === "string" ? error : "");
|
|
121
104
|
const hasError = typeof error === "string" ? true : Boolean(error);
|
|
122
105
|
const resolvedMaxWidth = maxWidth ?? style?.maxWidth;
|
|
@@ -124,20 +107,24 @@ var LSInput = forwardRef(
|
|
|
124
107
|
const slotProps = {
|
|
125
108
|
...slotPropsProp ?? {},
|
|
126
109
|
input: {
|
|
127
|
-
...
|
|
128
|
-
|
|
110
|
+
...callerInputSlot,
|
|
111
|
+
startAdornment: resolvedStartAdornment,
|
|
112
|
+
endAdornment: resolvedEndAdornment,
|
|
113
|
+
readOnly: rest.readOnly ?? callerInputSlot.readOnly,
|
|
129
114
|
sx: {
|
|
130
|
-
...
|
|
131
|
-
|
|
115
|
+
...callerInputSlot.sx ?? {},
|
|
116
|
+
"& input, & textarea": {
|
|
117
|
+
textAlign: centerText ? "center" : void 0,
|
|
118
|
+
color: textColor ?? void 0
|
|
119
|
+
}
|
|
132
120
|
}
|
|
133
121
|
},
|
|
134
122
|
inputLabel: {
|
|
135
|
-
|
|
136
|
-
...
|
|
123
|
+
shrink: true,
|
|
124
|
+
...callerInputLabelSlot
|
|
137
125
|
},
|
|
138
126
|
htmlInput: {
|
|
139
|
-
...
|
|
140
|
-
...htmlInputPropsProp ?? {}
|
|
127
|
+
...callerHtmlInputSlot
|
|
141
128
|
}
|
|
142
129
|
};
|
|
143
130
|
const TextFieldComponent = TextField;
|
|
@@ -182,7 +169,8 @@ import { forwardRef as forwardRef2 } from "react";
|
|
|
182
169
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
183
170
|
var LSTextField = forwardRef2(
|
|
184
171
|
(props, ref) => {
|
|
185
|
-
const {
|
|
172
|
+
const { slotProps, ...rest } = props;
|
|
173
|
+
const paramsInputLabel = slotProps?.inputLabel ?? {};
|
|
186
174
|
return /* @__PURE__ */ jsx2(
|
|
187
175
|
TextField2,
|
|
188
176
|
{
|
|
@@ -191,18 +179,9 @@ var LSTextField = forwardRef2(
|
|
|
191
179
|
className: "mui-ls-input",
|
|
192
180
|
slotProps: {
|
|
193
181
|
...slotProps ?? {},
|
|
194
|
-
input: {
|
|
195
|
-
...slotProps?.input ?? {},
|
|
196
|
-
...InputProps ?? {},
|
|
197
|
-
sx: {
|
|
198
|
-
...slotProps?.input?.sx ?? {},
|
|
199
|
-
...InputProps?.sx ?? {}
|
|
200
|
-
}
|
|
201
|
-
},
|
|
202
182
|
inputLabel: {
|
|
203
|
-
...
|
|
204
|
-
shrink: true
|
|
205
|
-
...InputLabelProps ?? {}
|
|
183
|
+
...paramsInputLabel,
|
|
184
|
+
shrink: true
|
|
206
185
|
}
|
|
207
186
|
},
|
|
208
187
|
ref
|
|
@@ -1342,14 +1321,12 @@ var VariableInputTextField = forwardRef3(
|
|
|
1342
1321
|
containerRef,
|
|
1343
1322
|
showVariableIcon
|
|
1344
1323
|
}, ref) => {
|
|
1345
|
-
const
|
|
1346
|
-
const
|
|
1347
|
-
const inputPropsSlotInputProps = inputProps?.slotProps?.input ?? {};
|
|
1348
|
-
const paramsSlotInputProps = params?.slotProps?.input ?? {};
|
|
1324
|
+
const inputPropsSlotInput = inputProps?.slotProps?.input ?? {};
|
|
1325
|
+
const paramsSlotInput = params?.slotProps?.input ?? {};
|
|
1349
1326
|
const explicitStartAdornment = inputProps?.startAdornment;
|
|
1350
1327
|
const resolvedExplicitStartAdornment = explicitStartAdornment ? /* @__PURE__ */ jsx3(InputAdornment2, { position: "start", children: explicitStartAdornment }) : void 0;
|
|
1351
|
-
const startAdornment =
|
|
1352
|
-
const endAdornment =
|
|
1328
|
+
const startAdornment = paramsSlotInput.startAdornment ?? inputPropsSlotInput.startAdornment ?? resolvedExplicitStartAdornment;
|
|
1329
|
+
const endAdornment = paramsSlotInput.endAdornment ?? inputPropsSlotInput.endAdornment;
|
|
1353
1330
|
return /* @__PURE__ */ jsx3(
|
|
1354
1331
|
LSTextField,
|
|
1355
1332
|
{
|
|
@@ -1371,31 +1348,27 @@ var VariableInputTextField = forwardRef3(
|
|
|
1371
1348
|
onChange: onChange ? (e) => onChange(e.target.value) : void 0,
|
|
1372
1349
|
...inputProps,
|
|
1373
1350
|
...params,
|
|
1374
|
-
|
|
1375
|
-
...
|
|
1376
|
-
...
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
endAdornment
|
|
1382
|
-
|
|
1383
|
-
Tooltip,
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
)
|
|
1396
|
-
}
|
|
1397
|
-
) : null
|
|
1398
|
-
] })
|
|
1351
|
+
slotProps: {
|
|
1352
|
+
...inputProps?.slotProps ?? {},
|
|
1353
|
+
...params?.slotProps ?? {},
|
|
1354
|
+
input: {
|
|
1355
|
+
...inputPropsSlotInput,
|
|
1356
|
+
...paramsSlotInput,
|
|
1357
|
+
startAdornment,
|
|
1358
|
+
endAdornment: /* @__PURE__ */ jsxs(Fragment2, { children: [
|
|
1359
|
+
endAdornment ?? null,
|
|
1360
|
+
showVariableIcon ? /* @__PURE__ */ jsx3(Tooltip, { title: t("chatbot.allowed-variables", "Allowed Variables"), children: /* @__PURE__ */ jsx3(
|
|
1361
|
+
InputAdornment2,
|
|
1362
|
+
{
|
|
1363
|
+
position: "end",
|
|
1364
|
+
onClick: clickedVariableIcon,
|
|
1365
|
+
ref: containerRef,
|
|
1366
|
+
className: "ls-variable-input-adornment",
|
|
1367
|
+
children: "{}"
|
|
1368
|
+
}
|
|
1369
|
+
) }) : null
|
|
1370
|
+
] })
|
|
1371
|
+
}
|
|
1399
1372
|
},
|
|
1400
1373
|
inputRef: ref
|
|
1401
1374
|
}
|
package/dist/components.d.ts
CHANGED
package/dist/components.js
CHANGED
|
@@ -93,9 +93,6 @@ var LSInput = forwardRef(
|
|
|
93
93
|
inputAfterText,
|
|
94
94
|
maxWidth,
|
|
95
95
|
className = "",
|
|
96
|
-
InputProps: inputPropsProp,
|
|
97
|
-
InputLabelProps: inputLabelPropsProp,
|
|
98
|
-
inputProps: htmlInputPropsProp,
|
|
99
96
|
slotProps: slotPropsProp,
|
|
100
97
|
onChange,
|
|
101
98
|
onChangeStart,
|
|
@@ -130,25 +127,11 @@ var LSInput = forwardRef(
|
|
|
130
127
|
onChange?.(event, sanitizedValue);
|
|
131
128
|
onChangeEnd?.(event, sanitizedValue);
|
|
132
129
|
};
|
|
133
|
-
const
|
|
134
|
-
const
|
|
135
|
-
const
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
endAdornment: resolvedEndAdornment,
|
|
139
|
-
readOnly: rest.readOnly ?? inputPropsProp?.readOnly,
|
|
140
|
-
sx: {
|
|
141
|
-
...inputPropsProp?.sx ?? {},
|
|
142
|
-
"& input, & textarea": {
|
|
143
|
-
textAlign: centerText ? "center" : void 0,
|
|
144
|
-
color: textColor ?? void 0
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
};
|
|
148
|
-
const inputLabelProps = {
|
|
149
|
-
shrink: true,
|
|
150
|
-
...inputLabelPropsProp
|
|
151
|
-
};
|
|
130
|
+
const callerInputSlot = slotPropsProp?.input ?? {};
|
|
131
|
+
const callerHtmlInputSlot = slotPropsProp?.htmlInput ?? {};
|
|
132
|
+
const callerInputLabelSlot = slotPropsProp?.inputLabel ?? {};
|
|
133
|
+
const resolvedStartAdornment = callerInputSlot.startAdornment ?? (startAdornment ? /* @__PURE__ */ jsx2(InputAdornment, { position: "start", children: startAdornment }) : inputBeforeText ? /* @__PURE__ */ jsx2(InputAdornment, { position: "start", children: /* @__PURE__ */ jsx2("span", { className: "mui-ls-input-affix", children: inputBeforeText }) }) : void 0);
|
|
134
|
+
const resolvedEndAdornment = callerInputSlot.endAdornment ?? (endAdornment ? /* @__PURE__ */ jsx2(InputAdornment, { position: "end", children: endAdornment }) : inputAfterText ? /* @__PURE__ */ jsx2(InputAdornment, { position: "end", children: /* @__PURE__ */ jsx2("span", { className: "mui-ls-input-affix", children: inputAfterText }) }) : void 0);
|
|
152
135
|
const helperContent = helperText ?? (typeof error === "string" ? error : "");
|
|
153
136
|
const hasError = typeof error === "string" ? true : Boolean(error);
|
|
154
137
|
const resolvedMaxWidth = maxWidth ?? style?.maxWidth;
|
|
@@ -156,20 +139,24 @@ var LSInput = forwardRef(
|
|
|
156
139
|
const slotProps = {
|
|
157
140
|
...slotPropsProp ?? {},
|
|
158
141
|
input: {
|
|
159
|
-
...
|
|
160
|
-
|
|
142
|
+
...callerInputSlot,
|
|
143
|
+
startAdornment: resolvedStartAdornment,
|
|
144
|
+
endAdornment: resolvedEndAdornment,
|
|
145
|
+
readOnly: rest.readOnly ?? callerInputSlot.readOnly,
|
|
161
146
|
sx: {
|
|
162
|
-
...
|
|
163
|
-
|
|
147
|
+
...callerInputSlot.sx ?? {},
|
|
148
|
+
"& input, & textarea": {
|
|
149
|
+
textAlign: centerText ? "center" : void 0,
|
|
150
|
+
color: textColor ?? void 0
|
|
151
|
+
}
|
|
164
152
|
}
|
|
165
153
|
},
|
|
166
154
|
inputLabel: {
|
|
167
|
-
|
|
168
|
-
...
|
|
155
|
+
shrink: true,
|
|
156
|
+
...callerInputLabelSlot
|
|
169
157
|
},
|
|
170
158
|
htmlInput: {
|
|
171
|
-
...
|
|
172
|
-
...htmlInputPropsProp ?? {}
|
|
159
|
+
...callerHtmlInputSlot
|
|
173
160
|
}
|
|
174
161
|
};
|
|
175
162
|
const TextFieldComponent = TextField;
|
|
@@ -359,15 +346,15 @@ var LSSliderInput = ({
|
|
|
359
346
|
onChange: (_event, nextValue) => handleInputChange({ target: { value: nextValue ?? "" } }),
|
|
360
347
|
value: displayValue ?? "",
|
|
361
348
|
inputAfterText,
|
|
362
|
-
|
|
363
|
-
...inputProps?.
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
349
|
+
slotProps: {
|
|
350
|
+
...inputProps?.slotProps ?? {},
|
|
351
|
+
htmlInput: {
|
|
352
|
+
...inputProps?.slotProps?.htmlInput ?? {},
|
|
353
|
+
min: displayMinimum,
|
|
354
|
+
max: displayMaximum,
|
|
355
|
+
step: displayStep,
|
|
356
|
+
inputMode: stepPrecision > 0 ? "decimal" : "numeric"
|
|
357
|
+
}
|
|
371
358
|
},
|
|
372
359
|
fullWidth: hideSlider ? fullWidth : false,
|
|
373
360
|
$noMinHeight: false,
|
|
@@ -431,6 +418,16 @@ var LSSelect = ({
|
|
|
431
418
|
border: "1px solid var(--neutralDark4)",
|
|
432
419
|
borderRadius: "var(--radius, 1rem)",
|
|
433
420
|
boxShadow: "0 16px 32px rgba(0, 0, 0, 0.32)",
|
|
421
|
+
"& .MuiList-root": {
|
|
422
|
+
backgroundColor: "var(--neutralDark2)"
|
|
423
|
+
},
|
|
424
|
+
"& .MuiListSubheader-root": {
|
|
425
|
+
backgroundColor: "var(--neutralDark1)",
|
|
426
|
+
color: "var(--neutralLight2)"
|
|
427
|
+
},
|
|
428
|
+
"& .MuiMenuItem-root": {
|
|
429
|
+
color: "var(--neutralLight1)"
|
|
430
|
+
},
|
|
434
431
|
...MenuProps?.slotProps?.paper?.sx
|
|
435
432
|
}
|
|
436
433
|
},
|
|
@@ -442,28 +439,6 @@ var LSSelect = ({
|
|
|
442
439
|
...MenuProps?.slotProps?.list?.sx
|
|
443
440
|
}
|
|
444
441
|
}
|
|
445
|
-
},
|
|
446
|
-
PaperProps: {
|
|
447
|
-
...MenuProps?.PaperProps ?? {},
|
|
448
|
-
sx: {
|
|
449
|
-
background: "var(--neutralDark2) !important",
|
|
450
|
-
backgroundColor: "var(--neutralDark2)",
|
|
451
|
-
color: "var(--neutralLight1)",
|
|
452
|
-
border: "1px solid var(--neutralDark4)",
|
|
453
|
-
borderRadius: "var(--radius, 1rem)",
|
|
454
|
-
boxShadow: "0 16px 32px rgba(0, 0, 0, 0.32)",
|
|
455
|
-
"& .MuiList-root": {
|
|
456
|
-
backgroundColor: "var(--neutralDark2)"
|
|
457
|
-
},
|
|
458
|
-
"& .MuiListSubheader-root": {
|
|
459
|
-
backgroundColor: "var(--neutralDark1)",
|
|
460
|
-
color: "var(--neutralLight2)"
|
|
461
|
-
},
|
|
462
|
-
"& .MuiMenuItem-root": {
|
|
463
|
-
color: "var(--neutralLight1)"
|
|
464
|
-
},
|
|
465
|
-
...MenuProps?.PaperProps?.sx
|
|
466
|
-
}
|
|
467
442
|
}
|
|
468
443
|
};
|
|
469
444
|
return /* @__PURE__ */ jsxs2(
|
|
@@ -783,14 +758,7 @@ LSDatePicker.displayName = "LSDatePicker";
|
|
|
783
758
|
import { KeyboardArrowDown } from "@mui/icons-material";
|
|
784
759
|
import Autocomplete from "@mui/material/Autocomplete";
|
|
785
760
|
import TextField2 from "@mui/material/TextField";
|
|
786
|
-
import {
|
|
787
|
-
memo,
|
|
788
|
-
startTransition,
|
|
789
|
-
useEffect as useEffect3,
|
|
790
|
-
useMemo as useMemo2,
|
|
791
|
-
useRef as useRef2,
|
|
792
|
-
useState as useState3
|
|
793
|
-
} from "react";
|
|
761
|
+
import { memo, startTransition, useEffect as useEffect3, useMemo as useMemo2, useRef as useRef2, useState as useState3 } from "react";
|
|
794
762
|
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
795
763
|
var LSFontPicker = memo(function LSFontPicker2({
|
|
796
764
|
value,
|
|
@@ -848,9 +816,7 @@ var LSFontPicker = memo(function LSFontPicker2({
|
|
|
848
816
|
popupIcon: /* @__PURE__ */ jsx8(KeyboardArrowDown, {}),
|
|
849
817
|
isOptionEqualToValue: (option, selectedValue) => option === selectedValue,
|
|
850
818
|
onChange: (_event, newValue) => {
|
|
851
|
-
handleValueChange(
|
|
852
|
-
typeof newValue === "string" ? newValue : `${newValue ?? ""}`
|
|
853
|
-
);
|
|
819
|
+
handleValueChange(typeof newValue === "string" ? newValue : `${newValue ?? ""}`);
|
|
854
820
|
},
|
|
855
821
|
onInputChange: (_event, newInputValue, reason) => {
|
|
856
822
|
if (reason === "input" || reason === "clear") {
|
|
@@ -907,11 +873,7 @@ var LSFontPicker = memo(function LSFontPicker2({
|
|
|
907
873
|
);
|
|
908
874
|
},
|
|
909
875
|
renderInput: (params) => {
|
|
910
|
-
const {
|
|
911
|
-
InputLabelProps: paramsInputLabelProps,
|
|
912
|
-
InputProps: paramsInputProps,
|
|
913
|
-
...restParams
|
|
914
|
-
} = params;
|
|
876
|
+
const { slotProps: paramsSlotProps = {}, ...restParams } = params;
|
|
915
877
|
return /* @__PURE__ */ jsx8(
|
|
916
878
|
TextFieldComponent,
|
|
917
879
|
{
|
|
@@ -928,12 +890,16 @@ var LSFontPicker = memo(function LSFontPicker2({
|
|
|
928
890
|
}
|
|
929
891
|
},
|
|
930
892
|
slotProps: {
|
|
893
|
+
...paramsSlotProps,
|
|
931
894
|
inputLabel: {
|
|
932
|
-
|
|
933
|
-
|
|
895
|
+
...paramsSlotProps.inputLabel ?? {},
|
|
896
|
+
shrink: true
|
|
934
897
|
},
|
|
935
898
|
input: {
|
|
936
|
-
...
|
|
899
|
+
...paramsSlotProps.input ?? {}
|
|
900
|
+
},
|
|
901
|
+
htmlInput: {
|
|
902
|
+
...paramsSlotProps.htmlInput ?? {}
|
|
937
903
|
}
|
|
938
904
|
}
|
|
939
905
|
}
|
|
@@ -976,6 +942,12 @@ var LSMultiSelect = ({
|
|
|
976
942
|
/* @__PURE__ */ jsx9("div", { className: "ls-multi-select-value__count", children: `(${selected.length})` })
|
|
977
943
|
] }),
|
|
978
944
|
MenuProps: {
|
|
945
|
+
// The previous version of this also set `PaperProps` here — that
|
|
946
|
+
// prop was removed from Menu in @mui/material v9 and React warns
|
|
947
|
+
// "does not recognize the `PaperProps` prop on a DOM element"
|
|
948
|
+
// when Menu spreads it through. Folded the one unique selector
|
|
949
|
+
// (`& .MuiList-root`) into `slotProps.paper.sx` below; everything
|
|
950
|
+
// else was already duplicated there.
|
|
979
951
|
slotProps: {
|
|
980
952
|
paper: {
|
|
981
953
|
sx: {
|
|
@@ -987,7 +959,10 @@ var LSMultiSelect = ({
|
|
|
987
959
|
boxShadow: "0 16px 32px rgba(0, 0, 0, 0.32)",
|
|
988
960
|
backdropFilter: "none",
|
|
989
961
|
opacity: 1,
|
|
990
|
-
maxHeight: "280px !important"
|
|
962
|
+
maxHeight: "280px !important",
|
|
963
|
+
"& .MuiList-root": {
|
|
964
|
+
backgroundColor: "var(--neutralDark2)"
|
|
965
|
+
}
|
|
991
966
|
}
|
|
992
967
|
},
|
|
993
968
|
list: {
|
|
@@ -996,21 +971,6 @@ var LSMultiSelect = ({
|
|
|
996
971
|
color: "var(--neutralLight1)"
|
|
997
972
|
}
|
|
998
973
|
}
|
|
999
|
-
},
|
|
1000
|
-
PaperProps: {
|
|
1001
|
-
sx: {
|
|
1002
|
-
background: "var(--neutralDark2) !important",
|
|
1003
|
-
backgroundColor: "var(--neutralDark2)",
|
|
1004
|
-
color: "var(--neutralLight1)",
|
|
1005
|
-
backdropFilter: "none",
|
|
1006
|
-
opacity: 1,
|
|
1007
|
-
maxHeight: "280px !important",
|
|
1008
|
-
border: "1px solid var(--neutralDark4)",
|
|
1009
|
-
borderRadius: "var(--radius, 1rem)",
|
|
1010
|
-
"& .MuiList-root": {
|
|
1011
|
-
backgroundColor: "var(--neutralDark2)"
|
|
1012
|
-
}
|
|
1013
|
-
}
|
|
1014
974
|
}
|
|
1015
975
|
},
|
|
1016
976
|
children: options.map((option) => /* @__PURE__ */ jsxs4(
|
|
@@ -1077,7 +1037,8 @@ import { forwardRef as forwardRef4 } from "react";
|
|
|
1077
1037
|
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
1078
1038
|
var LSTextField = forwardRef4(
|
|
1079
1039
|
(props, ref) => {
|
|
1080
|
-
const {
|
|
1040
|
+
const { slotProps, ...rest } = props;
|
|
1041
|
+
const paramsInputLabel = slotProps?.inputLabel ?? {};
|
|
1081
1042
|
return /* @__PURE__ */ jsx11(
|
|
1082
1043
|
TextField3,
|
|
1083
1044
|
{
|
|
@@ -1086,18 +1047,9 @@ var LSTextField = forwardRef4(
|
|
|
1086
1047
|
className: "mui-ls-input",
|
|
1087
1048
|
slotProps: {
|
|
1088
1049
|
...slotProps ?? {},
|
|
1089
|
-
input: {
|
|
1090
|
-
...slotProps?.input ?? {},
|
|
1091
|
-
...InputProps ?? {},
|
|
1092
|
-
sx: {
|
|
1093
|
-
...slotProps?.input?.sx ?? {},
|
|
1094
|
-
...InputProps?.sx ?? {}
|
|
1095
|
-
}
|
|
1096
|
-
},
|
|
1097
1050
|
inputLabel: {
|
|
1098
|
-
...
|
|
1099
|
-
shrink: true
|
|
1100
|
-
...InputLabelProps ?? {}
|
|
1051
|
+
...paramsInputLabel,
|
|
1052
|
+
shrink: true
|
|
1101
1053
|
}
|
|
1102
1054
|
},
|
|
1103
1055
|
ref
|
|
@@ -2256,14 +2208,12 @@ var VariableInputTextField = forwardRef5(
|
|
|
2256
2208
|
containerRef,
|
|
2257
2209
|
showVariableIcon
|
|
2258
2210
|
}, ref) => {
|
|
2259
|
-
const
|
|
2260
|
-
const
|
|
2261
|
-
const inputPropsSlotInputProps = inputProps?.slotProps?.input ?? {};
|
|
2262
|
-
const paramsSlotInputProps = params?.slotProps?.input ?? {};
|
|
2211
|
+
const inputPropsSlotInput = inputProps?.slotProps?.input ?? {};
|
|
2212
|
+
const paramsSlotInput = params?.slotProps?.input ?? {};
|
|
2263
2213
|
const explicitStartAdornment = inputProps?.startAdornment;
|
|
2264
2214
|
const resolvedExplicitStartAdornment = explicitStartAdornment ? /* @__PURE__ */ jsx12(InputAdornment2, { position: "start", children: explicitStartAdornment }) : void 0;
|
|
2265
|
-
const startAdornment =
|
|
2266
|
-
const endAdornment =
|
|
2215
|
+
const startAdornment = paramsSlotInput.startAdornment ?? inputPropsSlotInput.startAdornment ?? resolvedExplicitStartAdornment;
|
|
2216
|
+
const endAdornment = paramsSlotInput.endAdornment ?? inputPropsSlotInput.endAdornment;
|
|
2267
2217
|
return /* @__PURE__ */ jsx12(
|
|
2268
2218
|
LSTextField,
|
|
2269
2219
|
{
|
|
@@ -2285,31 +2235,27 @@ var VariableInputTextField = forwardRef5(
|
|
|
2285
2235
|
onChange: onChange ? (e) => onChange(e.target.value) : void 0,
|
|
2286
2236
|
...inputProps,
|
|
2287
2237
|
...params,
|
|
2288
|
-
|
|
2289
|
-
...
|
|
2290
|
-
...
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
endAdornment
|
|
2296
|
-
|
|
2297
|
-
Tooltip,
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
)
|
|
2310
|
-
}
|
|
2311
|
-
) : null
|
|
2312
|
-
] })
|
|
2238
|
+
slotProps: {
|
|
2239
|
+
...inputProps?.slotProps ?? {},
|
|
2240
|
+
...params?.slotProps ?? {},
|
|
2241
|
+
input: {
|
|
2242
|
+
...inputPropsSlotInput,
|
|
2243
|
+
...paramsSlotInput,
|
|
2244
|
+
startAdornment,
|
|
2245
|
+
endAdornment: /* @__PURE__ */ jsxs5(Fragment3, { children: [
|
|
2246
|
+
endAdornment ?? null,
|
|
2247
|
+
showVariableIcon ? /* @__PURE__ */ jsx12(Tooltip, { title: t("chatbot.allowed-variables", "Allowed Variables"), children: /* @__PURE__ */ jsx12(
|
|
2248
|
+
InputAdornment2,
|
|
2249
|
+
{
|
|
2250
|
+
position: "end",
|
|
2251
|
+
onClick: clickedVariableIcon,
|
|
2252
|
+
ref: containerRef,
|
|
2253
|
+
className: "ls-variable-input-adornment",
|
|
2254
|
+
children: "{}"
|
|
2255
|
+
}
|
|
2256
|
+
) }) : null
|
|
2257
|
+
] })
|
|
2258
|
+
}
|
|
2313
2259
|
},
|
|
2314
2260
|
inputRef: ref
|
|
2315
2261
|
}
|
package/dist/index.d.ts
CHANGED