@texaryn/react-mui 0.0.0 → 0.1.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/CHANGELOG.md +11 -0
- package/LICENSE +190 -0
- package/README.md +137 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/registry.d.ts +4 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +21 -0
- package/dist/registry.js.map +1 -0
- package/dist/widgets/MuiArrayControl.d.ts +9 -0
- package/dist/widgets/MuiArrayControl.d.ts.map +1 -0
- package/dist/widgets/MuiArrayControl.js +17 -0
- package/dist/widgets/MuiArrayControl.js.map +1 -0
- package/dist/widgets/MuiCheckbox.d.ts +9 -0
- package/dist/widgets/MuiCheckbox.d.ts.map +1 -0
- package/dist/widgets/MuiCheckbox.js +23 -0
- package/dist/widgets/MuiCheckbox.js.map +1 -0
- package/dist/widgets/MuiNumberInput.d.ts +9 -0
- package/dist/widgets/MuiNumberInput.d.ts.map +1 -0
- package/dist/widgets/MuiNumberInput.js +18 -0
- package/dist/widgets/MuiNumberInput.js.map +1 -0
- package/dist/widgets/MuiObjectLayout.d.ts +9 -0
- package/dist/widgets/MuiObjectLayout.d.ts.map +1 -0
- package/dist/widgets/MuiObjectLayout.js +17 -0
- package/dist/widgets/MuiObjectLayout.js.map +1 -0
- package/dist/widgets/MuiSelect.d.ts +9 -0
- package/dist/widgets/MuiSelect.d.ts.map +1 -0
- package/dist/widgets/MuiSelect.js +25 -0
- package/dist/widgets/MuiSelect.js.map +1 -0
- package/dist/widgets/MuiTextInput.d.ts +9 -0
- package/dist/widgets/MuiTextInput.d.ts.map +1 -0
- package/dist/widgets/MuiTextInput.js +18 -0
- package/dist/widgets/MuiTextInput.js.map +1 -0
- package/dist/widgets/MuiTextarea.d.ts +9 -0
- package/dist/widgets/MuiTextarea.d.ts.map +1 -0
- package/dist/widgets/MuiTextarea.js +18 -0
- package/dist/widgets/MuiTextarea.js.map +1 -0
- package/dist/widgets/index.d.ts +8 -0
- package/dist/widgets/index.d.ts.map +1 -0
- package/dist/widgets/index.js +8 -0
- package/dist/widgets/index.js.map +1 -0
- package/package.json +64 -4
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# @texaryn/react-mui
|
|
2
|
+
|
|
3
|
+
## 0.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 7778ff2: First release: Material UI v9 widgets for Texaryn. `createMuiRegistry()` renders MUI TextField, Checkbox, MenuItem, FormControl, Stack, and Button components on top of `@texaryn/react`. The package expects MUI v9 and its styling engine on the page and never loads them itself.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- eb1ae23: `MuiSelect` now sets `aria-required` on the element that exposes `role="combobox"`. It previously landed on MUI's native input, which carries `aria-hidden="true"` and `tabindex="-1"`, so assistive technology never saw the required state.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to the Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by the Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding any notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
Copyright 2024-2026 Hamza Hamidi
|
|
179
|
+
|
|
180
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
181
|
+
you may not use this file except in compliance with the License.
|
|
182
|
+
You may obtain a copy of the License at
|
|
183
|
+
|
|
184
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
185
|
+
|
|
186
|
+
Unless required by applicable law or agreed to in writing, software
|
|
187
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
188
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
189
|
+
See the License for the specific language governing permissions and
|
|
190
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
# @texaryn/react-mui
|
|
2
|
+
|
|
3
|
+
Material UI v9 widgets for Texaryn: MUI components on top of `@texaryn/react`.
|
|
4
|
+
|
|
5
|
+
> Status: pre-1.0. Public APIs may change before 1.0.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pnpm add @texaryn/core @texaryn/schema-json @texaryn/react @texaryn/react-mui @mui/material @emotion/react @emotion/styled react react-dom
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
`@mui/material` is a peer dependency (`^9.0.0`), and so are `@texaryn/react` and `react` (18 or newer). `@emotion/react` and `@emotion/styled` are MUI's default styling engine, not a Texaryn dependency: MUI needs them on the page to render its `sx` prop and its component styles, and this package never imports them itself.
|
|
14
|
+
|
|
15
|
+
## Quick start
|
|
16
|
+
|
|
17
|
+
Swap `createDefaultRegistry()` for `createMuiRegistry()`. Nothing else about the form changes:
|
|
18
|
+
|
|
19
|
+
```tsx
|
|
20
|
+
import { createJsonSchemaAdapter } from '@texaryn/schema-json'
|
|
21
|
+
import { FormProvider, FormRoot, ErrorSummary, useForm } from '@texaryn/react'
|
|
22
|
+
import { createMuiRegistry } from '@texaryn/react-mui'
|
|
23
|
+
|
|
24
|
+
// schema as in the @texaryn/react quick start
|
|
25
|
+
const adapter = await createJsonSchemaAdapter(schema)
|
|
26
|
+
const registry = createMuiRegistry()
|
|
27
|
+
|
|
28
|
+
function App() {
|
|
29
|
+
const form = useForm(adapter, { initialData: { name: '' } })
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<FormProvider value={form.runtime}>
|
|
33
|
+
<ErrorSummary />
|
|
34
|
+
<FormRoot registry={registry} />
|
|
35
|
+
</FormProvider>
|
|
36
|
+
)
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
This package is theme-neutral: it calls no `createTheme`, renders no `ThemeProvider` and imports no `CssBaseline`. A page that wants MUI's default look wraps its own tree in a `ThemeProvider`; a page with no `ThemeProvider` still gets MUI's baked-in default theme, because that is how `@mui/material` components behave without one.
|
|
41
|
+
|
|
42
|
+
```tsx
|
|
43
|
+
import { ThemeProvider, createTheme } from '@mui/material/styles'
|
|
44
|
+
import CssBaseline from '@mui/material/CssBaseline'
|
|
45
|
+
|
|
46
|
+
const theme = createTheme({ palette: { mode: 'dark' } })
|
|
47
|
+
|
|
48
|
+
function App() {
|
|
49
|
+
return (
|
|
50
|
+
<ThemeProvider theme={theme}>
|
|
51
|
+
<CssBaseline />
|
|
52
|
+
{/* FormProvider, FormRoot, etc. */}
|
|
53
|
+
</ThemeProvider>
|
|
54
|
+
)
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## What this package renders
|
|
59
|
+
|
|
60
|
+
`createMuiRegistry()` returns a `RendererRegistry<WidgetComponent>` with seven widgets, each built from a MUI component.
|
|
61
|
+
|
|
62
|
+
| Widget | Node it matches | MUI components |
|
|
63
|
+
| --- | --- | --- |
|
|
64
|
+
| `MuiTextInput` | string field with no enum | `TextField` |
|
|
65
|
+
| `MuiNumberInput` | number or integer field | `TextField` with `type="number"` |
|
|
66
|
+
| `MuiTextarea` | field with the `textarea` widget hint | `TextField` with `multiline` |
|
|
67
|
+
| `MuiSelect` | field with enum values | `TextField` with `select`, `MenuItem` per option |
|
|
68
|
+
| `MuiCheckbox` | boolean field | `FormControl`, `FormControlLabel`, `Checkbox`, `FormHelperText` |
|
|
69
|
+
| `MuiObjectLayout` | object container | `Stack` around the children |
|
|
70
|
+
| `MuiArrayControl` | array container | `Stack`, `Box` per item, `Button` to add or remove |
|
|
71
|
+
|
|
72
|
+
Enum outranks the primitive type, so a string field with an `enum` renders as a select, and the `textarea` hint outranks both.
|
|
73
|
+
|
|
74
|
+
### Error display: replace, not both
|
|
75
|
+
|
|
76
|
+
Where `@texaryn/react-bootstrap` and the default registry show the description and every visible error together, this package shows one line of helper text at a time: the description while the field is valid, and the first visible error in its place once the field is invalid. That is `TextField`'s own `helperText` model, one slot, so the widgets pass it `field.error ?? field.description` rather than rendering both. The error line carries `role="alert"` through `slotProps.formHelperText`.
|
|
77
|
+
|
|
78
|
+
### `aria-required`, not `required`
|
|
79
|
+
|
|
80
|
+
Widgets set `aria-required` on the underlying input when a field is required, but never the native HTML `required` attribute. Texaryn's own validation is authoritative: a native `required` would let the browser block submission or show its own validation UI before Texaryn's runtime ever sees the value, which would fight the runtime's validation-trigger and error-display policy instead of deferring to it.
|
|
81
|
+
|
|
82
|
+
## Composing your own registry
|
|
83
|
+
|
|
84
|
+
Every widget is exported, so a registry can mix these with your own. A widget is markup around [`useFieldBinding`](../react/README.md#custom-widgets), which supplies the label, description, display-gated errors and a DOM surface to spread: `domInputProps` for text, number, textarea and select controls, `domCheckboxProps` for checkboxes.
|
|
85
|
+
|
|
86
|
+
```tsx
|
|
87
|
+
import { createRendererRegistry } from '@texaryn/core'
|
|
88
|
+
import type { FieldNode, UINode } from '@texaryn/core'
|
|
89
|
+
import { useFieldBinding } from '@texaryn/react'
|
|
90
|
+
import type { WidgetComponent } from '@texaryn/react'
|
|
91
|
+
import TextField from '@mui/material/TextField'
|
|
92
|
+
import { MuiTextInput, MuiObjectLayout } from '@texaryn/react-mui'
|
|
93
|
+
|
|
94
|
+
function EmailInput({ node }: { node: UINode }) {
|
|
95
|
+
const field = useFieldBinding(node as FieldNode)
|
|
96
|
+
return (
|
|
97
|
+
<TextField
|
|
98
|
+
id={field.domInputProps.id}
|
|
99
|
+
name={field.domInputProps.name}
|
|
100
|
+
value={field.domInputProps.value}
|
|
101
|
+
onChange={field.domInputProps.onChange}
|
|
102
|
+
onBlur={field.domInputProps.onBlur}
|
|
103
|
+
type="email"
|
|
104
|
+
label={field.label}
|
|
105
|
+
error={field.invalid}
|
|
106
|
+
helperText={field.error ?? field.description}
|
|
107
|
+
fullWidth
|
|
108
|
+
/>
|
|
109
|
+
)
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
const registry = createRendererRegistry<WidgetComponent>()
|
|
113
|
+
registry.register({ test: (n) => n.type === 'container' && n.containerType === 'object', rank: 1 }, MuiObjectLayout)
|
|
114
|
+
registry.register({ test: (n) => n.type === 'field' && n.fieldType === 'string', rank: 1 }, MuiTextInput)
|
|
115
|
+
registry.register({ test: (n) => n.type === 'field' && n.format === 'email', rank: 10 }, EmailInput)
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## What this package does not do
|
|
119
|
+
|
|
120
|
+
- It does not depend on MUI X, `@mui/icons-material`, or Base UI. The seven widgets use only `@mui/material` components.
|
|
121
|
+
- It does not create a theme, render a `ThemeProvider`, or render `CssBaseline`. Theming is entirely the consuming page's decision.
|
|
122
|
+
- It does not depend on `@emotion/react` or `@emotion/styled` at runtime; they are declared only as dev dependencies for building and testing this package. The consuming page installs them for MUI's styling engine.
|
|
123
|
+
- It does not set native HTML `required`, `min`, `max`, or `pattern` attributes. Texaryn's runtime is the single source of validation; the widgets only reflect its state through ARIA attributes.
|
|
124
|
+
- It does not own form state. Values, validation, touched state and error display all come from the runtime through `@texaryn/react`.
|
|
125
|
+
|
|
126
|
+
## Related packages
|
|
127
|
+
|
|
128
|
+
- [`@texaryn/react`](../react/README.md), React bindings, hooks and default widgets
|
|
129
|
+
- [`@texaryn/react-bootstrap`](../react-bootstrap/README.md), Bootstrap 5 widgets
|
|
130
|
+
- [`@texaryn/core`](../core/README.md), runtime and renderer contracts
|
|
131
|
+
- [`@texaryn/schema-json`](../schema-json/README.md), JSON Schema adapter
|
|
132
|
+
|
|
133
|
+
See the [repository README](../../README.md) for the complete architecture.
|
|
134
|
+
|
|
135
|
+
## License
|
|
136
|
+
|
|
137
|
+
Apache-2.0
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AACjD,cAAc,oBAAoB,CAAA"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AACjD,cAAc,oBAAoB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAa,gBAAgB,EAAU,MAAM,eAAe,CAAA;AACxE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AASrD,wBAAgB,iBAAiB,IAAI,gBAAgB,CAAC,eAAe,CAAC,CAkCrE"}
|
package/dist/registry.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { createRendererRegistry } from '@texaryn/core';
|
|
2
|
+
import { MuiTextInput } from './widgets/MuiTextInput.js';
|
|
3
|
+
import { MuiNumberInput } from './widgets/MuiNumberInput.js';
|
|
4
|
+
import { MuiTextarea } from './widgets/MuiTextarea.js';
|
|
5
|
+
import { MuiSelect } from './widgets/MuiSelect.js';
|
|
6
|
+
import { MuiCheckbox } from './widgets/MuiCheckbox.js';
|
|
7
|
+
import { MuiObjectLayout } from './widgets/MuiObjectLayout.js';
|
|
8
|
+
import { MuiArrayControl } from './widgets/MuiArrayControl.js';
|
|
9
|
+
export function createMuiRegistry() {
|
|
10
|
+
const registry = createRendererRegistry();
|
|
11
|
+
const isField = (node) => node.type === 'field';
|
|
12
|
+
registry.register({ test: (n) => isField(n) && n.fieldType === 'string' && n.enumValues == null, rank: 1 }, MuiTextInput);
|
|
13
|
+
registry.register({ test: (n) => isField(n) && (n.fieldType === 'number' || n.fieldType === 'integer'), rank: 1 }, MuiNumberInput);
|
|
14
|
+
registry.register({ test: (n) => isField(n) && n.fieldType === 'boolean', rank: 1 }, MuiCheckbox);
|
|
15
|
+
registry.register({ test: (n) => isField(n) && n.enumValues != null && n.enumValues.length > 0, rank: 2 }, MuiSelect);
|
|
16
|
+
registry.register({ test: (n) => isField(n) && n.widget === 'textarea', rank: 5 }, MuiTextarea);
|
|
17
|
+
registry.register({ test: (n) => n.type === 'container' && n.containerType === 'object', rank: 1 }, MuiObjectLayout);
|
|
18
|
+
registry.register({ test: (n) => n.type === 'container' && n.containerType === 'array', rank: 1 }, MuiArrayControl);
|
|
19
|
+
return registry;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAA;AAGtD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA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I,CAAC,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,EACvF,SAAS,CACV,CAAA;IACD,QAAQ,CAAC,QAAQ,CACf,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,UAAU,EAAE,IAAI,EAAE,CAAC,EAAE,EAC/D,WAAW,CACZ,CAAA;IACD,QAAQ,CAAC,QAAQ,CACf,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,WAAW,IAAI,CAAC,CAAC,aAAa,KAAK,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE,EAChF,eAAe,CAChB,CAAA;IACD,QAAQ,CAAC,QAAQ,CACf,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,WAAW,IAAI,CAAC,CAAC,aAAa,KAAK,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,EAC/E,eAAe,CAChB,CAAA;IAED,OAAO,QAAQ,CAAA;AACjB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { UINode } from '@texaryn/core';
|
|
3
|
+
export interface WidgetProps {
|
|
4
|
+
node: UINode;
|
|
5
|
+
}
|
|
6
|
+
declare function MuiArrayControlImpl({ node }: WidgetProps): React.JSX.Element;
|
|
7
|
+
export declare const MuiArrayControl: React.MemoExoticComponent<typeof MuiArrayControlImpl>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=MuiArrayControl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MuiArrayControl.d.ts","sourceRoot":"","sources":["../../src/widgets/MuiArrayControl.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,OAAO,KAAK,EAAiB,MAAM,EAAE,MAAM,eAAe,CAAA;AAG1D,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAA;CACb;AAED,iBAAS,mBAAmB,CAAC,EAAE,IAAI,EAAE,EAAE,WAAW,qBAoCjD;AAED,eAAO,MAAM,eAAe,uDAAiF,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import Stack from '@mui/material/Stack';
|
|
4
|
+
import Button from '@mui/material/Button';
|
|
5
|
+
import Box from '@mui/material/Box';
|
|
6
|
+
import { NodeRenderer, useFieldArray, useRendererContext } from '@texaryn/react';
|
|
7
|
+
function MuiArrayControlImpl({ node }) {
|
|
8
|
+
const containerNode = node;
|
|
9
|
+
const fieldArray = useFieldArray(containerNode.id);
|
|
10
|
+
const { document, registry } = useRendererContext();
|
|
11
|
+
return (_jsxs(Stack, { spacing: 2, children: [fieldArray.items.map((item, index) => {
|
|
12
|
+
const childNode = item.nodeId ? document.nodes[item.nodeId] : undefined;
|
|
13
|
+
return (_jsxs(Box, { children: [childNode ? (_jsx(NodeRenderer, { node: childNode, document: document, registry: registry })) : null, fieldArray.canRemove ? (_jsx(Button, { variant: "outlined", color: "error", size: "small", onClick: () => fieldArray.remove(index), children: "Remove" })) : null] }, item.id));
|
|
14
|
+
}), fieldArray.canAdd ? (_jsx(Box, { children: _jsx(Button, { variant: "contained", onClick: () => fieldArray.add(), children: "Add" }) })) : null] }));
|
|
15
|
+
}
|
|
16
|
+
export const MuiArrayControl = React.memo(MuiArrayControlImpl, (prev, next) => prev.node.id === next.node.id);
|
|
17
|
+
//# sourceMappingURL=MuiArrayControl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MuiArrayControl.js","sourceRoot":"","sources":["../../src/widgets/MuiArrayControl.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAA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G,cACF,KAAC,MAAM,IAAC,OAAO,EAAC,WAAW,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,GAAG,EAAE,oBAElD,GACL,CACP,CAAC,CAAC,CAAC,IAAI,IACF,CACT,CAAA;AACH,CAAC;AAED,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,CAAC,IAAI,CAAC,mBAAmB,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { UINode } from '@texaryn/core';
|
|
3
|
+
export interface WidgetProps {
|
|
4
|
+
node: UINode;
|
|
5
|
+
}
|
|
6
|
+
declare function MuiCheckboxImpl({ node }: WidgetProps): React.JSX.Element;
|
|
7
|
+
export declare const MuiCheckbox: React.MemoExoticComponent<typeof MuiCheckboxImpl>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=MuiCheckbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MuiCheckbox.d.ts","sourceRoot":"","sources":["../../src/widgets/MuiCheckbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,OAAO,KAAK,EAAa,MAAM,EAAE,MAAM,eAAe,CAAA;AAGtD,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAA;CACb;AAED,iBAAS,eAAe,CAAC,EAAE,IAAI,EAAE,EAAE,WAAW,qBAiC7C;AAED,eAAO,MAAM,WAAW,mDAA6E,CAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import FormControl from '@mui/material/FormControl';
|
|
4
|
+
import FormControlLabel from '@mui/material/FormControlLabel';
|
|
5
|
+
import Checkbox from '@mui/material/Checkbox';
|
|
6
|
+
import FormHelperText from '@mui/material/FormHelperText';
|
|
7
|
+
import { useFieldBinding } from '@texaryn/react';
|
|
8
|
+
function MuiCheckboxImpl({ node }) {
|
|
9
|
+
const field = useFieldBinding(node);
|
|
10
|
+
const feedback = field.error ?? field.description;
|
|
11
|
+
const helperId = `${field.domCheckboxProps.id}-helper`;
|
|
12
|
+
return (_jsxs(FormControl, { error: field.invalid, disabled: field.disabled, children: [_jsx(FormControlLabel, { label: field.label, control: _jsx(Checkbox, { checked: field.domCheckboxProps.checked, onChange: field.domCheckboxProps.onChange, onBlur: field.domCheckboxProps.onBlur, slotProps: {
|
|
13
|
+
input: {
|
|
14
|
+
id: field.domCheckboxProps.id,
|
|
15
|
+
name: field.domCheckboxProps.name,
|
|
16
|
+
'aria-required': field.required || undefined,
|
|
17
|
+
'aria-invalid': field.invalid || undefined,
|
|
18
|
+
'aria-describedby': feedback ? helperId : undefined,
|
|
19
|
+
},
|
|
20
|
+
} }) }), feedback ? (_jsx(FormHelperText, { id: helperId, role: field.invalid ? 'alert' : undefined, children: feedback })) : null] }));
|
|
21
|
+
}
|
|
22
|
+
export const MuiCheckbox = React.memo(MuiCheckboxImpl, (prev, next) => prev.node.id === next.node.id);
|
|
23
|
+
//# sourceMappingURL=MuiCheckbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MuiCheckbox.js","sourceRoot":"","sources":["../../src/widgets/MuiCheckbox.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,WAAW,MAAM,2BAA2B,CAAA;AACnD,OAAO,gBAAgB,MAAM,gCAAgC,CAAA;AAC7D,OAAO,QAAQ,MAAM,wBAAwB,CAAA;AAC7C,OAAO,cAAc,MAAM,8BAA8B,CAAA;AAEzD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAMhD,SAAS,eAAe,C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AAE,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { UINode } from '@texaryn/core';
|
|
3
|
+
export interface WidgetProps {
|
|
4
|
+
node: UINode;
|
|
5
|
+
}
|
|
6
|
+
declare function MuiNumberInputImpl({ node }: WidgetProps): React.JSX.Element;
|
|
7
|
+
export declare const MuiNumberInput: React.MemoExoticComponent<typeof MuiNumberInputImpl>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=MuiNumberInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MuiNumberInput.d.ts","sourceRoot":"","sources":["../../src/widgets/MuiNumberInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAa,MAAM,EAAE,MAAM,eAAe,CAAA;AAGtD,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAA;CACb;AAED,iBAAS,kBAAkB,CAAC,EAAE,IAAI,EAAE,EAAE,WAAW,qBA4BhD;AAED,eAAO,MAAM,cAAc,sDAAgF,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import TextField from '@mui/material/TextField';
|
|
4
|
+
import { useFieldBinding } from '@texaryn/react';
|
|
5
|
+
function MuiNumberInputImpl({ node }) {
|
|
6
|
+
const field = useFieldBinding(node);
|
|
7
|
+
return (_jsx(TextField, { type: "number", id: field.domInputProps.id, name: field.domInputProps.name, value: field.domInputProps.value, onChange: field.domInputProps.onChange, onBlur: field.domInputProps.onBlur, disabled: field.disabled, placeholder: field.placeholder, label: field.label, error: field.invalid, helperText: field.error ?? field.description, fullWidth: true, slotProps: {
|
|
8
|
+
htmlInput: {
|
|
9
|
+
'aria-required': field.required || undefined,
|
|
10
|
+
'aria-invalid': field.invalid || undefined,
|
|
11
|
+
},
|
|
12
|
+
formHelperText: {
|
|
13
|
+
role: field.invalid ? 'alert' : undefined,
|
|
14
|
+
},
|
|
15
|
+
} }));
|
|
16
|
+
}
|
|
17
|
+
export const MuiNumberInput = React.memo(MuiNumberInputImpl, (prev, next) => prev.node.id === next.node.id);
|
|
18
|
+
//# sourceMappingURL=MuiNumberInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MuiNumberInput.js","sourceRoot":"","sources":["../../src/widgets/MuiNumberInput.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,SAAS,MAAM,yBAAyB,CAAA;AAE/C,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAMhD,SAAS,kBAAkB,CAAC,EAAE,IAAI,EAAe;IAC/C,MAAM,KAAK,GAAG,eAAe,CAAC,IAAiB,CAAC,CAAA;IAEhD,OAAO,CACL,KAAC,SAAS,IACR,IAAI,EAAC,QAAQ,EACb,EAAE,EAAE,KAAK,CAAC,aAAa,CAAC,EAAE,EAC1B,IAAI,EAAE,KAAK,CAAC,aAAa,CAAC,IAAI,EAC9B,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,KAAK,EAChC,QAAQ,EAAE,KAAK,CAAC,aAAa,CAAC,QAAQ,EACtC,MAAM,EAAE,KAAK,CAAC,aAAa,CAAC,MAAM,EAClC,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,KAAK,EAAE,KAAK,CAAC,OAAO,EACpB,UAAU,EAAE,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,WAAW,EAC5C,SAAS,QACT,SAAS,EAAE;YACT,SAAS,EAAE;gBACT,eAAe,EAAE,KAAK,CAAC,QAAQ,IAAI,SAAS;gBAC5C,cAAc,EAAE,KAAK,CAAC,OAAO,IAAI,SAAS;aAC3C;YACD,cAAc,EAAE;gBACd,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS;aAC1C;SACF,GACD,CACH,CAAA;AACH,CAAC;AAED,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,CAAC,IAAI,CAAC,kBAAkB,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { UINode } from '@texaryn/core';
|
|
3
|
+
export interface WidgetProps {
|
|
4
|
+
node: UINode;
|
|
5
|
+
}
|
|
6
|
+
declare function MuiObjectLayoutImpl({ node }: WidgetProps): React.JSX.Element;
|
|
7
|
+
export declare const MuiObjectLayout: React.MemoExoticComponent<typeof MuiObjectLayoutImpl>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=MuiObjectLayout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MuiObjectLayout.d.ts","sourceRoot":"","sources":["../../src/widgets/MuiObjectLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAiB,MAAM,EAAE,MAAM,eAAe,CAAA;AAG1D,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAA;CACb;AAED,iBAAS,mBAAmB,CAAC,EAAE,IAAI,EAAE,EAAE,WAAW,qBAejD;AAED,eAAO,MAAM,eAAe,uDAAiF,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import Stack from '@mui/material/Stack';
|
|
4
|
+
import { NodeRenderer, useRendererContext } from '@texaryn/react';
|
|
5
|
+
function MuiObjectLayoutImpl({ node }) {
|
|
6
|
+
const containerNode = node;
|
|
7
|
+
const { document, registry } = useRendererContext();
|
|
8
|
+
return (_jsx(Stack, { spacing: 2, children: containerNode.children.map((childId) => {
|
|
9
|
+
const child = document.nodes[childId];
|
|
10
|
+
if (!child) {
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
13
|
+
return _jsx(NodeRenderer, { node: child, document: document, registry: registry }, childId);
|
|
14
|
+
}) }));
|
|
15
|
+
}
|
|
16
|
+
export const MuiObjectLayout = React.memo(MuiObjectLayoutImpl, (prev, next) => prev.node.id === next.node.id);
|
|
17
|
+
//# sourceMappingURL=MuiObjectLayout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MuiObjectLayout.js","sourceRoot":"","sources":["../../src/widgets/MuiObjectLayout.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,MAAM,qBAAqB,CAAA;AAEvC,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AAMjE,SAAS,mBAAmB,CAAC,EAAE,IAAI,EAAe;IAChD,MAAM,aAAa,GAAG,IAAqB,CAAA;IAC3C,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,kBAAkB,EAAE,CAAA;IAEnD,OAAO,CACL,KAAC,KAAK,IAAC,OAAO,EAAE,CAAC,YACd,aAAa,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE;YACtC,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;YACrC,IAAI,CAAC,KAAK,EAAE,CAAC;gBACX,OAAO,IAAI,CAAA;YACb,CAAC;YACD,OAAO,KAAC,YAAY,IAAe,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,IAA5D,OAAO,CAAyD,CAAA;QAC5F,CAAC,CAAC,GACI,CACT,CAAA;AACH,CAAC;AAED,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,CAAC,IAAI,CAAC,mBAAmB,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { UINode } from '@texaryn/core';
|
|
3
|
+
export interface WidgetProps {
|
|
4
|
+
node: UINode;
|
|
5
|
+
}
|
|
6
|
+
declare function MuiSelectImpl({ node }: WidgetProps): React.JSX.Element;
|
|
7
|
+
export declare const MuiSelect: React.MemoExoticComponent<typeof MuiSelectImpl>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=MuiSelect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MuiSelect.d.ts","sourceRoot":"","sources":["../../src/widgets/MuiSelect.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,KAAK,EAAa,MAAM,EAAE,MAAM,eAAe,CAAA;AAGtD,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAA;CACb;AAED,iBAAS,aAAa,CAAC,EAAE,IAAI,EAAE,EAAE,WAAW,qBAuC3C;AAED,eAAO,MAAM,SAAS,iDAA2E,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import TextField from '@mui/material/TextField';
|
|
4
|
+
import MenuItem from '@mui/material/MenuItem';
|
|
5
|
+
import { useFieldBinding } from '@texaryn/react';
|
|
6
|
+
function MuiSelectImpl({ node }) {
|
|
7
|
+
const field = useFieldBinding(node);
|
|
8
|
+
const enumValues = node.enumValues ?? [];
|
|
9
|
+
return (_jsx(TextField, { select: true, id: field.domInputProps.id, name: field.domInputProps.name, value: field.domInputProps.value, onChange: field.domInputProps.onChange, onBlur: field.domInputProps.onBlur, disabled: field.disabled, label: field.label, error: field.invalid, helperText: field.error ?? field.description, fullWidth: true, slotProps: {
|
|
10
|
+
// Screen readers see the combobox div, not MUI's aria-hidden native input.
|
|
11
|
+
select: {
|
|
12
|
+
SelectDisplayProps: {
|
|
13
|
+
'aria-required': field.required || undefined,
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
htmlInput: {
|
|
17
|
+
'aria-invalid': field.invalid || undefined,
|
|
18
|
+
},
|
|
19
|
+
formHelperText: {
|
|
20
|
+
role: field.invalid ? 'alert' : undefined,
|
|
21
|
+
},
|
|
22
|
+
}, children: enumValues.map((option) => (_jsx(MenuItem, { value: String(option.value), children: option.title ?? String(option.value) }, String(option.value)))) }));
|
|
23
|
+
}
|
|
24
|
+
export const MuiSelect = React.memo(MuiSelectImpl, (prev, next) => prev.node.id === next.node.id);
|
|
25
|
+
//# sourceMappingURL=MuiSelect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MuiSelect.js","sourceRoot":"","sources":["../../src/widgets/MuiSelect.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,SAAS,MAAM,yBAAyB,CAAA;AAC/C,OAAO,QAAQ,MAAM,wBAAwB,CAAA;AAE7C,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAMhD,SAAS,aAAa,CAAC,EAAE,IAAI,EAAe;IAC1C,MAAM,KAAK,GAAG,eAAe,CAAC,IAAiB,CAAC,CAAA;IAChD,MAAM,UAAU,GAAI,IAAkB,CAAC,UAAU,IAAI,EAAE,CAAA;IAEvD,OAAO,CACL,KAAC,SAAS,IACR,MAAM,QACN,EAAE,EAAE,KAAK,CAAC,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|
1
|
+
import React from 'react';
|
|
2
|
+
import type { UINode } from '@texaryn/core';
|
|
3
|
+
export interface WidgetProps {
|
|
4
|
+
node: UINode;
|
|
5
|
+
}
|
|
6
|
+
declare function MuiTextInputImpl({ node }: WidgetProps): React.JSX.Element;
|
|
7
|
+
export declare const MuiTextInput: React.MemoExoticComponent<typeof MuiTextInputImpl>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=MuiTextInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MuiTextInput.d.ts","sourceRoot":"","sources":["../../src/widgets/MuiTextInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAa,MAAM,EAAE,MAAM,eAAe,CAAA;AAGtD,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAA;CACb;AAED,iBAAS,gBAAgB,CAAC,EAAE,IAAI,EAAE,EAAE,WAAW,qBA2B9C;AAED,eAAO,MAAM,YAAY,oDAA8E,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import TextField from '@mui/material/TextField';
|
|
4
|
+
import { useFieldBinding } from '@texaryn/react';
|
|
5
|
+
function MuiTextInputImpl({ node }) {
|
|
6
|
+
const field = useFieldBinding(node);
|
|
7
|
+
return (_jsx(TextField, { id: field.domInputProps.id, name: field.domInputProps.name, value: field.domInputProps.value, onChange: field.domInputProps.onChange, onBlur: field.domInputProps.onBlur, disabled: field.disabled, placeholder: field.placeholder, label: field.label, error: field.invalid, helperText: field.error ?? field.description, fullWidth: true, slotProps: {
|
|
8
|
+
htmlInput: {
|
|
9
|
+
'aria-required': field.required || undefined,
|
|
10
|
+
'aria-invalid': field.invalid || undefined,
|
|
11
|
+
},
|
|
12
|
+
formHelperText: {
|
|
13
|
+
role: field.invalid ? 'alert' : undefined,
|
|
14
|
+
},
|
|
15
|
+
} }));
|
|
16
|
+
}
|
|
17
|
+
export const MuiTextInput = React.memo(MuiTextInputImpl, (prev, next) => prev.node.id === next.node.id);
|
|
18
|
+
//# sourceMappingURL=MuiTextInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MuiTextInput.js","sourceRoot":"","sources":["../../src/widgets/MuiTextInput.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,SAAS,MAAM,yBAAyB,CAAA;AAE/C,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAMhD,SAAS,gBAAgB,CAAC,EAAE,IAAI,EAAe;IAC7C,MAAM,KAAK,GAAG,eAAe,CAAC,IAAiB,CAAC,CAAA;IAEhD,OAAO,CACL,KAAC,SAAS,IACR,EAAE,EAAE,KAAK,CAAC,aAAa,CAAC,EAAE,EAC1B,IAAI,EAAE,KAAK,CAAC,aAAa,CAAC,IAAI,EAC9B,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,KAAK,EAChC,QAAQ,EAAE,KAAK,CAAC,aAAa,CAAC,QAAQ,EACtC,MAAM,EAAE,KAAK,CAAC,aAAa,CAAC,MAAM,EAClC,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,KAAK,EAAE,KAAK,CAAC,OAAO,EACpB,UAAU,EAAE,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,WAAW,EAC5C,SAAS,QACT,SAAS,EAAE;YACT,SAAS,EAAE;gBACT,eAAe,EAAE,KAAK,CAAC,QAAQ,IAAI,SAAS;gBAC5C,cAAc,EAAE,KAAK,CAAC,OAAO,IAAI,SAAS;aAC3C;YACD,cAAc,EAAE;gBACd,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS;aAC1C;SACF,GACD,CACH,CAAA;AACH,CAAC;AAED,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { UINode } from '@texaryn/core';
|
|
3
|
+
export interface WidgetProps {
|
|
4
|
+
node: UINode;
|
|
5
|
+
}
|
|
6
|
+
declare function MuiTextareaImpl({ node }: WidgetProps): React.JSX.Element;
|
|
7
|
+
export declare const MuiTextarea: React.MemoExoticComponent<typeof MuiTextareaImpl>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=MuiTextarea.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MuiTextarea.d.ts","sourceRoot":"","sources":["../../src/widgets/MuiTextarea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAa,MAAM,EAAE,MAAM,eAAe,CAAA;AAGtD,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAA;CACb;AAED,iBAAS,eAAe,CAAC,EAAE,IAAI,EAAE,EAAE,WAAW,qBA6B7C;AAED,eAAO,MAAM,WAAW,mDAA6E,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import TextField from '@mui/material/TextField';
|
|
4
|
+
import { useFieldBinding } from '@texaryn/react';
|
|
5
|
+
function MuiTextareaImpl({ node }) {
|
|
6
|
+
const field = useFieldBinding(node);
|
|
7
|
+
return (_jsx(TextField, { multiline: true, minRows: 3, id: field.domInputProps.id, name: field.domInputProps.name, value: field.domInputProps.value, onChange: field.domInputProps.onChange, onBlur: field.domInputProps.onBlur, disabled: field.disabled, placeholder: field.placeholder, label: field.label, error: field.invalid, helperText: field.error ?? field.description, fullWidth: true, slotProps: {
|
|
8
|
+
htmlInput: {
|
|
9
|
+
'aria-required': field.required || undefined,
|
|
10
|
+
'aria-invalid': field.invalid || undefined,
|
|
11
|
+
},
|
|
12
|
+
formHelperText: {
|
|
13
|
+
role: field.invalid ? 'alert' : undefined,
|
|
14
|
+
},
|
|
15
|
+
} }));
|
|
16
|
+
}
|
|
17
|
+
export const MuiTextarea = React.memo(MuiTextareaImpl, (prev, next) => prev.node.id === next.node.id);
|
|
18
|
+
//# sourceMappingURL=MuiTextarea.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MuiTextarea.js","sourceRoot":"","sources":["../../src/widgets/MuiTextarea.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,SAAS,MAAM,yBAAyB,CAAA;AAE/C,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAMhD,SAAS,eAAe,CAAC,EAAE,IAAI,EAAe;IAC5C,MAAM,KAAK,GAAG,eAAe,CAAC,IAAiB,CAAC,CAAA;IAEhD,OAAO,CACL,KAAC,SAAS,IACR,SAAS,QACT,OAAO,EAAE,CAAC,EACV,EAAE,EAAE,KAAK,CAAC,aAAa,CAAC,EAAE,EAC1B,IAAI,EAAE,KAAK,CAAC,aAAa,CAAC,IAAI,EAC9B,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,KAAK,EAChC,QAAQ,EAAE,KAAK,CAAC,aAAa,CAAC,QAAQ,EACtC,MAAM,EAAE,KAAK,CAAC,aAAa,CAAC,MAAM,EAClC,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,KAAK,EAAE,KAAK,CAAC,OAAO,EACpB,UAAU,EAAE,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,WAAW,EAC5C,SAAS,QACT,SAAS,EAAE;YACT,SAAS,EAAE;gBACT,eAAe,EAAE,KAAK,CAAC,QAAQ,IAAI,SAAS;gBAC5C,cAAc,EAAE,KAAK,CAAC,OAAO,IAAI,SAAS;aAC3C;YACD,cAAc,EAAE;gBACd,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS;aAC1C;SACF,GACD,CACH,CAAA;AACH,CAAC;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,KAAK,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { MuiTextInput } from './MuiTextInput.js';
|
|
2
|
+
export { MuiNumberInput } from './MuiNumberInput.js';
|
|
3
|
+
export { MuiTextarea } from './MuiTextarea.js';
|
|
4
|
+
export { MuiSelect } from './MuiSelect.js';
|
|
5
|
+
export { MuiCheckbox } from './MuiCheckbox.js';
|
|
6
|
+
export { MuiObjectLayout } from './MuiObjectLayout.js';
|
|
7
|
+
export { MuiArrayControl } from './MuiArrayControl.js';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/widgets/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { MuiTextInput } from './MuiTextInput.js';
|
|
2
|
+
export { MuiNumberInput } from './MuiNumberInput.js';
|
|
3
|
+
export { MuiTextarea } from './MuiTextarea.js';
|
|
4
|
+
export { MuiSelect } from './MuiSelect.js';
|
|
5
|
+
export { MuiCheckbox } from './MuiCheckbox.js';
|
|
6
|
+
export { MuiObjectLayout } from './MuiObjectLayout.js';
|
|
7
|
+
export { MuiArrayControl } from './MuiArrayControl.js';
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/widgets/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,66 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@texaryn/react-mui",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Material UI v9 widgets for Texaryn: MUI components on top of @texaryn/react",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"react",
|
|
7
|
+
"material-ui",
|
|
8
|
+
"mui",
|
|
9
|
+
"json-schema",
|
|
10
|
+
"forms",
|
|
11
|
+
"texaryn"
|
|
12
|
+
],
|
|
13
|
+
"type": "module",
|
|
14
|
+
"license": "Apache-2.0",
|
|
15
|
+
"funding": {
|
|
16
|
+
"type": "github",
|
|
17
|
+
"url": "https://github.com/sponsors/hamzahamidi"
|
|
18
|
+
},
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "git+https://github.com/texaryn/texaryn.git",
|
|
22
|
+
"directory": "packages/react-mui"
|
|
23
|
+
},
|
|
24
|
+
"homepage": "https://github.com/texaryn/texaryn#readme",
|
|
25
|
+
"bugs": {
|
|
26
|
+
"url": "https://github.com/texaryn/texaryn/issues"
|
|
27
|
+
},
|
|
28
|
+
"publishConfig": {
|
|
29
|
+
"access": "public"
|
|
30
|
+
},
|
|
31
|
+
"main": "./dist/index.js",
|
|
32
|
+
"types": "./dist/index.d.ts",
|
|
33
|
+
"exports": {
|
|
34
|
+
".": {
|
|
35
|
+
"types": "./dist/index.d.ts",
|
|
36
|
+
"import": "./dist/index.js"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"files": [
|
|
40
|
+
"dist",
|
|
41
|
+
"CHANGELOG.md"
|
|
42
|
+
],
|
|
43
|
+
"dependencies": {
|
|
44
|
+
"@texaryn/core": "^0.2.0"
|
|
45
|
+
},
|
|
46
|
+
"peerDependencies": {
|
|
47
|
+
"@mui/material": "^9.0.0",
|
|
48
|
+
"react": ">=18.0.0",
|
|
49
|
+
"@texaryn/react": "^0.2.0"
|
|
50
|
+
},
|
|
51
|
+
"devDependencies": {
|
|
52
|
+
"@emotion/react": "^11.14.0",
|
|
53
|
+
"@emotion/styled": "^11.14.0",
|
|
54
|
+
"@mui/material": "^9.4.0",
|
|
55
|
+
"@testing-library/react": "^16.0.0",
|
|
56
|
+
"@types/react": "^19.0.0",
|
|
57
|
+
"jsdom": "^25.0.0",
|
|
58
|
+
"react": "^19.0.0",
|
|
59
|
+
"react-dom": "^19.0.0",
|
|
60
|
+
"@texaryn/react": "0.2.0",
|
|
61
|
+
"@texaryn/schema-json": "0.2.0"
|
|
62
|
+
},
|
|
63
|
+
"scripts": {
|
|
64
|
+
"build": "tsc --build"
|
|
65
|
+
}
|
|
66
|
+
}
|