@etsoo/materialui 1.5.96 → 1.5.98

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.
@@ -124,7 +124,7 @@ function ComboBox(props) {
124
124
  };
125
125
  }, []);
126
126
  // Layout
127
- return ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsx)("input", { ref: inputRef, "data-reset": inputReset ?? true, type: idIsString ? "text" : "number", style: { display: "none" }, name: name, value: getValue(stateValue), readOnly: true, onChange: inputOnChange }), (0, jsx_runtime_1.jsxs)(Stack_1.default, { gap: 0.5, direction: "row", width: "100%", children: [(0, jsx_runtime_1.jsx)(Autocomplete_1.default, { value: stateValue, disableCloseOnSelect: disableCloseOnSelect, getOptionLabel: getOptionLabel, isOptionEqualToValue: (option, value) => option[idField] === value[idField], onChange: (event, value, reason, details) => {
127
+ return ((0, jsx_runtime_1.jsxs)("div", { style: { flex: 2 }, children: [(0, jsx_runtime_1.jsx)("input", { ref: inputRef, "data-reset": inputReset ?? true, type: idIsString ? "text" : "number", style: { display: "none" }, name: name, value: getValue(stateValue), readOnly: true, onChange: inputOnChange }), (0, jsx_runtime_1.jsxs)(Stack_1.default, { gap: 0.5, direction: "row", width: "100%", children: [(0, jsx_runtime_1.jsx)(Autocomplete_1.default, { value: stateValue, disableCloseOnSelect: disableCloseOnSelect, getOptionLabel: getOptionLabel, isOptionEqualToValue: (option, value) => option[idField] === value[idField], onChange: (event, value, reason, details) => {
128
128
  // Set value
129
129
  setInputValue(value);
130
130
  // Custom
@@ -121,7 +121,7 @@ function ComboBoxMultiple(props) {
121
121
  };
122
122
  }, []);
123
123
  // Layout
124
- return ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsx)("input", { ref: inputRef, "data-reset": inputReset ?? true, type: "text", style: { display: "none" }, name: name, value: getValue(stateValue), readOnly: true, onChange: inputOnChange }), (0, jsx_runtime_1.jsx)(Autocomplete_1.default, { value: stateValue == null
124
+ return ((0, jsx_runtime_1.jsxs)("div", { style: { flex: 2 }, children: [(0, jsx_runtime_1.jsx)("input", { ref: inputRef, "data-reset": inputReset ?? true, type: "text", style: { display: "none" }, name: name, value: getValue(stateValue), readOnly: true, onChange: inputOnChange }), (0, jsx_runtime_1.jsx)(Autocomplete_1.default, { value: stateValue == null
125
125
  ? []
126
126
  : Array.isArray(stateValue)
127
127
  ? stateValue
@@ -152,11 +152,6 @@ function SearchBar(props) {
152
152
  let newIndex = others;
153
153
  for (let c = 0; c < others; c++) {
154
154
  const child = children[c];
155
- // Ignore it when it's input and hidden or display none
156
- if (child instanceof HTMLInputElement &&
157
- (child.type === "hidden" || child.offsetParent == null)) {
158
- continue;
159
- }
160
155
  const cachedWidth = child.getAttribute(cachedWidthName);
161
156
  let childWidth;
162
157
  if (cachedWidth) {
@@ -172,7 +172,7 @@ function Tiplist(props) {
172
172
  };
173
173
  }, []);
174
174
  // Layout
175
- return ((0, jsx_runtime_1.jsxs)(react_2.default.Fragment, { children: [(0, jsx_runtime_1.jsx)("input", { ref: inputRef, "data-reset": inputReset ?? true, type: idIsString ? "text" : "number", style: { display: "none" }, name: name, value: `${inputValue ?? (state.current.idSet ? "" : localIdValue ?? "")}`, readOnly: true, onChange: inputOnChange }), (0, jsx_runtime_1.jsx)(Autocomplete_1.default, { filterOptions: (options, _state) => options, value: states.value, options: states.options, onChange: (event, value, reason, details) => {
175
+ return ((0, jsx_runtime_1.jsxs)("div", { style: { flex: 2 }, children: [(0, jsx_runtime_1.jsx)("input", { ref: inputRef, "data-reset": inputReset ?? true, type: idIsString ? "text" : "number", style: { display: "none" }, name: name, value: `${inputValue ?? (state.current.idSet ? "" : localIdValue ?? "")}`, readOnly: true, onChange: inputOnChange }), (0, jsx_runtime_1.jsx)(Autocomplete_1.default, { filterOptions: (options, _state) => options, value: states.value, options: states.options, onChange: (event, value, reason, details) => {
176
176
  // Set value
177
177
  setInputValue(value);
178
178
  // Custom
@@ -158,7 +158,7 @@ function TiplistPro(props) {
158
158
  };
159
159
  }, []);
160
160
  // Layout
161
- return ((0, jsx_runtime_1.jsxs)(react_2.default.Fragment, { children: [(0, jsx_runtime_1.jsx)("input", { ref: inputRef, "data-reset": inputReset ?? true, type: idIsString ? "text" : "number", style: { display: "none" }, name: name, value: inputValue ?? (state.current.idSet ? "" : localIdValue ?? ""), readOnly: true, onChange: inputOnChange }), (0, jsx_runtime_1.jsx)(Autocomplete_1.default, { filterOptions: (options, _state) => options, value: states.value, options: states.options, freeSolo: true, clearOnBlur: false, onChange: (event, value, reason, details) => {
161
+ return ((0, jsx_runtime_1.jsxs)("div", { style: { flex: 2 }, children: [(0, jsx_runtime_1.jsx)("input", { ref: inputRef, "data-reset": inputReset ?? true, type: idIsString ? "text" : "number", style: { display: "none" }, name: name, value: inputValue ?? (state.current.idSet ? "" : localIdValue ?? ""), readOnly: true, onChange: inputOnChange }), (0, jsx_runtime_1.jsx)(Autocomplete_1.default, { filterOptions: (options, _state) => options, value: states.value, options: states.options, freeSolo: true, clearOnBlur: false, onChange: (event, value, reason, details) => {
162
162
  if (typeof value === "object") {
163
163
  // Set value
164
164
  setInputValue(value);
@@ -118,7 +118,7 @@ export function ComboBox(props) {
118
118
  };
119
119
  }, []);
120
120
  // Layout
121
- return (_jsxs(React.Fragment, { children: [_jsx("input", { ref: inputRef, "data-reset": inputReset ?? true, type: idIsString ? "text" : "number", style: { display: "none" }, name: name, value: getValue(stateValue), readOnly: true, onChange: inputOnChange }), _jsxs(Stack, { gap: 0.5, direction: "row", width: "100%", children: [_jsx(Autocomplete, { value: stateValue, disableCloseOnSelect: disableCloseOnSelect, getOptionLabel: getOptionLabel, isOptionEqualToValue: (option, value) => option[idField] === value[idField], onChange: (event, value, reason, details) => {
121
+ return (_jsxs("div", { style: { flex: 2 }, children: [_jsx("input", { ref: inputRef, "data-reset": inputReset ?? true, type: idIsString ? "text" : "number", style: { display: "none" }, name: name, value: getValue(stateValue), readOnly: true, onChange: inputOnChange }), _jsxs(Stack, { gap: 0.5, direction: "row", width: "100%", children: [_jsx(Autocomplete, { value: stateValue, disableCloseOnSelect: disableCloseOnSelect, getOptionLabel: getOptionLabel, isOptionEqualToValue: (option, value) => option[idField] === value[idField], onChange: (event, value, reason, details) => {
122
122
  // Set value
123
123
  setInputValue(value);
124
124
  // Custom
@@ -115,7 +115,7 @@ export function ComboBoxMultiple(props) {
115
115
  };
116
116
  }, []);
117
117
  // Layout
118
- return (_jsxs(React.Fragment, { children: [_jsx("input", { ref: inputRef, "data-reset": inputReset ?? true, type: "text", style: { display: "none" }, name: name, value: getValue(stateValue), readOnly: true, onChange: inputOnChange }), _jsx(Autocomplete, { value: stateValue == null
118
+ return (_jsxs("div", { style: { flex: 2 }, children: [_jsx("input", { ref: inputRef, "data-reset": inputReset ?? true, type: "text", style: { display: "none" }, name: name, value: getValue(stateValue), readOnly: true, onChange: inputOnChange }), _jsx(Autocomplete, { value: stateValue == null
119
119
  ? []
120
120
  : Array.isArray(stateValue)
121
121
  ? stateValue
@@ -146,11 +146,6 @@ export function SearchBar(props) {
146
146
  let newIndex = others;
147
147
  for (let c = 0; c < others; c++) {
148
148
  const child = children[c];
149
- // Ignore it when it's input and hidden or display none
150
- if (child instanceof HTMLInputElement &&
151
- (child.type === "hidden" || child.offsetParent == null)) {
152
- continue;
153
- }
154
149
  const cachedWidth = child.getAttribute(cachedWidthName);
155
150
  let childWidth;
156
151
  if (cachedWidth) {
@@ -166,7 +166,7 @@ export function Tiplist(props) {
166
166
  };
167
167
  }, []);
168
168
  // Layout
169
- return (_jsxs(React.Fragment, { children: [_jsx("input", { ref: inputRef, "data-reset": inputReset ?? true, type: idIsString ? "text" : "number", style: { display: "none" }, name: name, value: `${inputValue ?? (state.current.idSet ? "" : localIdValue ?? "")}`, readOnly: true, onChange: inputOnChange }), _jsx(Autocomplete, { filterOptions: (options, _state) => options, value: states.value, options: states.options, onChange: (event, value, reason, details) => {
169
+ return (_jsxs("div", { style: { flex: 2 }, children: [_jsx("input", { ref: inputRef, "data-reset": inputReset ?? true, type: idIsString ? "text" : "number", style: { display: "none" }, name: name, value: `${inputValue ?? (state.current.idSet ? "" : localIdValue ?? "")}`, readOnly: true, onChange: inputOnChange }), _jsx(Autocomplete, { filterOptions: (options, _state) => options, value: states.value, options: states.options, onChange: (event, value, reason, details) => {
170
170
  // Set value
171
171
  setInputValue(value);
172
172
  // Custom
@@ -152,7 +152,7 @@ export function TiplistPro(props) {
152
152
  };
153
153
  }, []);
154
154
  // Layout
155
- return (_jsxs(React.Fragment, { children: [_jsx("input", { ref: inputRef, "data-reset": inputReset ?? true, type: idIsString ? "text" : "number", style: { display: "none" }, name: name, value: inputValue ?? (state.current.idSet ? "" : localIdValue ?? ""), readOnly: true, onChange: inputOnChange }), _jsx(Autocomplete, { filterOptions: (options, _state) => options, value: states.value, options: states.options, freeSolo: true, clearOnBlur: false, onChange: (event, value, reason, details) => {
155
+ return (_jsxs("div", { style: { flex: 2 }, children: [_jsx("input", { ref: inputRef, "data-reset": inputReset ?? true, type: idIsString ? "text" : "number", style: { display: "none" }, name: name, value: inputValue ?? (state.current.idSet ? "" : localIdValue ?? ""), readOnly: true, onChange: inputOnChange }), _jsx(Autocomplete, { filterOptions: (options, _state) => options, value: states.value, options: states.options, freeSolo: true, clearOnBlur: false, onChange: (event, value, reason, details) => {
156
156
  if (typeof value === "object") {
157
157
  // Set value
158
158
  setInputValue(value);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/materialui",
3
- "version": "1.5.96",
3
+ "version": "1.5.98",
4
4
  "description": "TypeScript Material-UI Implementation",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/mjs/index.js",
package/src/ComboBox.tsx CHANGED
@@ -236,7 +236,7 @@ export function ComboBox<
236
236
 
237
237
  // Layout
238
238
  return (
239
- <React.Fragment>
239
+ <div style={{ flex: 2 }}>
240
240
  <input
241
241
  ref={inputRef}
242
242
  data-reset={inputReset ?? true}
@@ -311,6 +311,6 @@ export function ComboBox<
311
311
  </IconButton>
312
312
  )}
313
313
  </Stack>
314
- </React.Fragment>
314
+ </div>
315
315
  );
316
316
  }
@@ -239,7 +239,7 @@ export function ComboBoxMultiple<
239
239
 
240
240
  // Layout
241
241
  return (
242
- <React.Fragment>
242
+ <div style={{ flex: 2 }}>
243
243
  <input
244
244
  ref={inputRef}
245
245
  data-reset={inputReset ?? true}
@@ -306,6 +306,6 @@ export function ComboBoxMultiple<
306
306
  loadingText={loadingText}
307
307
  {...rest}
308
308
  />
309
- </React.Fragment>
309
+ </div>
310
310
  );
311
311
  }
package/src/SearchBar.tsx CHANGED
@@ -233,15 +233,6 @@ export function SearchBar(props: SearchBarProps) {
233
233
  let newIndex: number = others;
234
234
  for (let c: number = 0; c < others; c++) {
235
235
  const child = children[c];
236
-
237
- // Ignore it when it's input and hidden or display none
238
- if (
239
- child instanceof HTMLInputElement &&
240
- (child.type === "hidden" || child.offsetParent == null)
241
- ) {
242
- continue;
243
- }
244
-
245
236
  const cachedWidth = child.getAttribute(cachedWidthName);
246
237
  let childWidth: number;
247
238
  if (cachedWidth) {
package/src/Tiplist.tsx CHANGED
@@ -285,7 +285,7 @@ export function Tiplist<
285
285
 
286
286
  // Layout
287
287
  return (
288
- <React.Fragment>
288
+ <div style={{ flex: 2 }}>
289
289
  <input
290
290
  ref={inputRef}
291
291
  data-reset={inputReset ?? true}
@@ -393,6 +393,6 @@ export function Tiplist<
393
393
  getOptionKey={getOptionKey}
394
394
  {...rest}
395
395
  />
396
- </React.Fragment>
396
+ </div>
397
397
  );
398
398
  }
@@ -299,7 +299,7 @@ export function TiplistPro<T extends ListType2 = ListType2>(
299
299
 
300
300
  // Layout
301
301
  return (
302
- <React.Fragment>
302
+ <div style={{ flex: 2 }}>
303
303
  <input
304
304
  ref={inputRef}
305
305
  data-reset={inputReset ?? true}
@@ -394,6 +394,6 @@ export function TiplistPro<T extends ListType2 = ListType2>(
394
394
  }}
395
395
  {...rest}
396
396
  />
397
- </React.Fragment>
397
+ </div>
398
398
  );
399
399
  }