@form-engine-ts/mui 2.9.3 → 2.9.4
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/README.md +22 -2
- package/dist/index.cjs +286 -168
- package/dist/index.d.cts +43 -3
- package/dist/index.d.ts +43 -3
- package/dist/index.js +287 -170
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -9,7 +9,20 @@ import { MuiFormBuilder } from "@form-engine-ts/mui";
|
|
|
9
9
|
<MuiFormBuilder
|
|
10
10
|
schema={schema}
|
|
11
11
|
onChange={setSchema}
|
|
12
|
-
|
|
12
|
+
translator={translator}
|
|
13
|
+
translationAdapter={translationAdapter}
|
|
14
|
+
muiOptions={{
|
|
15
|
+
size: "small",
|
|
16
|
+
variant: "outlined",
|
|
17
|
+
dense: true,
|
|
18
|
+
getLocaleLabel: (locale) => localeNames[locale] ?? locale,
|
|
19
|
+
buttonVariants: { primary: "contained", secondary: "outlined", danger: "outlined" }
|
|
20
|
+
}}
|
|
21
|
+
layoutOptions={{
|
|
22
|
+
sectionOrder: ["basicSettings", "completionMessage", "questions", "addQuestion", "localization"]
|
|
23
|
+
}}
|
|
24
|
+
localizationOptions={{ collapsible: true, defaultExpanded: "when-configured" }}
|
|
25
|
+
muiSlotProps={{ card: { sx: { p: 2 } }, accordion: { elevation: 0 } }}
|
|
13
26
|
/>;
|
|
14
27
|
```
|
|
15
28
|
|
|
@@ -21,5 +34,12 @@ For low-level composition, `createMuiBuilderProps(options, overrides)` returns `
|
|
|
21
34
|
factories such as `createMuiTextInputAdapter`, `createMuiIconButtonAdapter`, `createMuiFieldEditorSlot`, and
|
|
22
35
|
`createMuiLocalizationSlot`.
|
|
23
36
|
|
|
37
|
+
All MUI builder slots use the `FormBuilder` translator for labels, actions, tooltips, and accessible names. Use
|
|
38
|
+
`getLocaleLabel` for application-specific locale names. The localization UI excludes `schema.defaultLocale` from its
|
|
39
|
+
translation tabs and follows `allowedLocales` and `maxLocales` from the builder policy.
|
|
40
|
+
|
|
24
41
|
`MuiAdapterOptions` defaults to `size: "medium"`, `variant: "outlined"`, `buttonVariant: "contained"`, and
|
|
25
|
-
`fullWidth: true`. Set `dense` to reduce section, editor, option, and toolbar spacing.
|
|
42
|
+
`fullWidth: true`. Set `dense` to reduce section, editor, option, and toolbar spacing. `buttonVariants` can override the
|
|
43
|
+
MUI variant for `primary`, `secondary`, and `danger` actions independently. `layoutOptions`, `localizationOptions`, and
|
|
44
|
+
`muiSlotProps` are also accepted in `muiOptions` for low-level factories such as `createMuiBuilderSlots`; the dedicated
|
|
45
|
+
`MuiFormBuilder` props take precedence.
|