@form-engine-ts/mui 3.1.0 → 3.2.0

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.cjs CHANGED
@@ -210,6 +210,7 @@ function createMuiCheckboxAdapter(options) {
210
210
  }) {
211
211
  const resolved = useResolvedMuiAdapterOptions(options);
212
212
  const checkboxSlotProps = resolved.muiSlotProps?.checkbox;
213
+ const checkboxInputProps = checkboxSlotProps?.inputProps;
213
214
  const helperId = id === void 0 ? void 0 : ariaDescribedBy?.split(/\s+/u)[0] ?? `${id}-helper-text`;
214
215
  const describedBy = ariaDescribedBy ?? (helperText === void 0 || helperText.length === 0 ? void 0 : helperId);
215
216
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_material2.FormControl, { className, error: Boolean(error), required, disabled: disabled || readOnly, children: [
@@ -228,9 +229,10 @@ function createMuiCheckboxAdapter(options) {
228
229
  required,
229
230
  disabled: disabled || readOnly,
230
231
  inputProps: {
231
- "aria-label": ariaLabel,
232
- "aria-describedby": describedBy,
233
- "aria-labelledby": ariaLabelledBy
232
+ ...checkboxInputProps,
233
+ ...ariaLabel === void 0 ? {} : { "aria-label": ariaLabel },
234
+ ...describedBy === void 0 ? {} : { "aria-describedby": describedBy },
235
+ ...ariaLabelledBy === void 0 ? {} : { "aria-labelledby": ariaLabelledBy }
234
236
  },
235
237
  onChange: (event) => onChange(event.target.checked)
236
238
  }
@@ -440,6 +442,7 @@ function createMuiSelectAdapter(options) {
440
442
  const normalizedOptions = normalizeOptions(selectOptions);
441
443
  const selectSlotProps = resolved.muiSlotProps?.select;
442
444
  const menuProps = { ...selectSlotProps?.MenuProps, ...resolved.muiSlotProps?.selectMenu };
445
+ const slotInputProps = selectSlotProps?.inputProps;
443
446
  const labelId = id === void 0 || label === void 0 ? void 0 : `${id}-label`;
444
447
  const helperId = id === void 0 ? void 0 : ariaDescribedBy?.split(/\s+/u)[0] ?? `${id}-helper-text`;
445
448
  const describedBy = ariaDescribedBy ?? (helperText === void 0 || helperText.length === 0 ? void 0 : helperId);
@@ -483,10 +486,10 @@ function createMuiSelectAdapter(options) {
483
486
  ] });
484
487
  },
485
488
  inputProps: {
486
- ...selectSlotProps?.inputProps,
487
- "aria-label": ariaLabel,
488
- "aria-describedby": describedBy,
489
- "aria-labelledby": ariaLabelledBy
489
+ ...slotInputProps,
490
+ ...ariaLabel === void 0 ? {} : { "aria-label": ariaLabel },
491
+ ...describedBy === void 0 ? {} : { "aria-describedby": describedBy },
492
+ ...ariaLabelledBy === void 0 ? {} : { "aria-labelledby": ariaLabelledBy }
490
493
  },
491
494
  children: normalizedOptions.map((option) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_material7.MenuItem, { value: option.value, disabled: option.disabled, children: renderOption === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
492
495
  option.icon === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_material7.ListItemIcon, { sx: { minWidth: 32 }, children: option.icon }),
package/dist/index.js CHANGED
@@ -145,6 +145,7 @@ function createMuiCheckboxAdapter(options) {
145
145
  }) {
146
146
  const resolved = useResolvedMuiAdapterOptions(options);
147
147
  const checkboxSlotProps = resolved.muiSlotProps?.checkbox;
148
+ const checkboxInputProps = checkboxSlotProps?.inputProps;
148
149
  const helperId = id === void 0 ? void 0 : ariaDescribedBy?.split(/\s+/u)[0] ?? `${id}-helper-text`;
149
150
  const describedBy = ariaDescribedBy ?? (helperText === void 0 || helperText.length === 0 ? void 0 : helperId);
150
151
  return /* @__PURE__ */ jsxs(FormControl, { className, error: Boolean(error), required, disabled: disabled || readOnly, children: [
@@ -163,9 +164,10 @@ function createMuiCheckboxAdapter(options) {
163
164
  required,
164
165
  disabled: disabled || readOnly,
165
166
  inputProps: {
166
- "aria-label": ariaLabel,
167
- "aria-describedby": describedBy,
168
- "aria-labelledby": ariaLabelledBy
167
+ ...checkboxInputProps,
168
+ ...ariaLabel === void 0 ? {} : { "aria-label": ariaLabel },
169
+ ...describedBy === void 0 ? {} : { "aria-describedby": describedBy },
170
+ ...ariaLabelledBy === void 0 ? {} : { "aria-labelledby": ariaLabelledBy }
169
171
  },
170
172
  onChange: (event) => onChange(event.target.checked)
171
173
  }
@@ -384,6 +386,7 @@ function createMuiSelectAdapter(options) {
384
386
  const normalizedOptions = normalizeOptions(selectOptions);
385
387
  const selectSlotProps = resolved.muiSlotProps?.select;
386
388
  const menuProps = { ...selectSlotProps?.MenuProps, ...resolved.muiSlotProps?.selectMenu };
389
+ const slotInputProps = selectSlotProps?.inputProps;
387
390
  const labelId = id === void 0 || label === void 0 ? void 0 : `${id}-label`;
388
391
  const helperId = id === void 0 ? void 0 : ariaDescribedBy?.split(/\s+/u)[0] ?? `${id}-helper-text`;
389
392
  const describedBy = ariaDescribedBy ?? (helperText === void 0 || helperText.length === 0 ? void 0 : helperId);
@@ -427,10 +430,10 @@ function createMuiSelectAdapter(options) {
427
430
  ] });
428
431
  },
429
432
  inputProps: {
430
- ...selectSlotProps?.inputProps,
431
- "aria-label": ariaLabel,
432
- "aria-describedby": describedBy,
433
- "aria-labelledby": ariaLabelledBy
433
+ ...slotInputProps,
434
+ ...ariaLabel === void 0 ? {} : { "aria-label": ariaLabel },
435
+ ...describedBy === void 0 ? {} : { "aria-describedby": describedBy },
436
+ ...ariaLabelledBy === void 0 ? {} : { "aria-labelledby": ariaLabelledBy }
434
437
  },
435
438
  children: normalizedOptions.map((option) => /* @__PURE__ */ jsx7(MenuItem, { value: option.value, disabled: option.disabled, children: renderOption === void 0 ? /* @__PURE__ */ jsxs4(Fragment, { children: [
436
439
  option.icon === void 0 ? null : /* @__PURE__ */ jsx7(ListItemIcon, { sx: { minWidth: 32 }, children: option.icon }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@form-engine-ts/mui",
3
- "version": "3.1.0",
3
+ "version": "3.2.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -46,8 +46,8 @@
46
46
  "@mui/material": "^6.0.0 || ^7.0.0",
47
47
  "react": "^18.0.0 || ^19.0.0",
48
48
  "react-dom": "^18.0.0 || ^19.0.0",
49
- "@form-engine-ts/core": "3.1.0",
50
- "@form-engine-ts/react": "3.1.0"
49
+ "@form-engine-ts/core": "3.2.0",
50
+ "@form-engine-ts/react": "3.2.0"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@emotion/react": "^11.14.0",
@@ -58,8 +58,8 @@
58
58
  "@types/react-dom": "^19.2.4",
59
59
  "react": "^19.2.8",
60
60
  "react-dom": "^19.2.8",
61
- "@form-engine-ts/react": "3.1.0",
62
- "@form-engine-ts/core": "3.1.0"
61
+ "@form-engine-ts/core": "3.2.0",
62
+ "@form-engine-ts/react": "3.2.0"
63
63
  },
64
64
  "scripts": {
65
65
  "build": "tsup src/index.ts --format esm,cjs --dts --clean --external @emotion/react --external @emotion/styled --external @form-engine-ts/core --external @form-engine-ts/react --external @mui/icons-material --external @mui/material --external react --external react-dom",