@texaryn/react 0.1.2 → 0.2.1
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 +18 -0
- package/README.md +30 -0
- package/dist/components/FieldErrors.d.ts +1 -1
- package/dist/components/FieldErrors.d.ts.map +1 -1
- package/dist/hooks/use-field-binding.d.ts +57 -0
- package/dist/hooks/use-field-binding.d.ts.map +1 -0
- package/dist/hooks/use-field-binding.js +79 -0
- package/dist/hooks/use-field-binding.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/props/field-props.js +1 -1
- package/dist/props/field-props.js.map +1 -1
- package/dist/widgets/Checkbox.d.ts.map +1 -1
- package/dist/widgets/Checkbox.js +3 -12
- package/dist/widgets/Checkbox.js.map +1 -1
- package/dist/widgets/NumberInput.d.ts.map +1 -1
- package/dist/widgets/NumberInput.js +3 -13
- package/dist/widgets/NumberInput.js.map +1 -1
- package/dist/widgets/Select.d.ts.map +1 -1
- package/dist/widgets/Select.js +4 -14
- package/dist/widgets/Select.js.map +1 -1
- package/dist/widgets/TextInput.d.ts.map +1 -1
- package/dist/widgets/TextInput.js +3 -9
- package/dist/widgets/TextInput.js.map +1 -1
- package/dist/widgets/Textarea.d.ts.map +1 -1
- package/dist/widgets/Textarea.js +3 -9
- package/dist/widgets/Textarea.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @texaryn/react
|
|
2
2
|
|
|
3
|
+
## 0.2.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 01f6065: Depend on `@texaryn/core` through a caret range rather than an exact version. The previous exact pin made each release usable only against the single `@texaryn/core` build it shipped beside, which forced all three packages to move together. They now version independently, so a version describes that package's own public contract.
|
|
8
|
+
|
|
9
|
+
## 0.2.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 6c4fee1: Add `useFieldBinding(node)`, the composition layer for custom widgets: semantic value and `setValue`, label, description, placeholder, display-gated errors, ARIA prop getters, and two event-shaped DOM adapters, `domInputProps` for text, number, textarea and select controls and `domCheckboxProps` for checkboxes, which own display value and coercion. The default field widgets are rebuilt on it with unchanged behaviour.
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- f223cf9: Apply the `helpText` UI hint. The compiler carries it onto the field node and the default widgets render it as the field description, taking precedence over the schema `description`, with `aria-describedby` linking the input to it. `colSpan` is marked deprecated: it has never been applied and will be removed or replaced once Texaryn has a layout contract. `hidden` is documented as not applied yet.
|
|
18
|
+
- Updated dependencies [f223cf9]
|
|
19
|
+
- @texaryn/core@0.2.0
|
|
20
|
+
|
|
3
21
|
## 0.1.2
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -183,6 +183,30 @@ All default widgets already render `FieldErrors` internally, so most application
|
|
|
183
183
|
|
|
184
184
|
React does not own the submission lifecycle. It only observes the `submission` store that `@texaryn/core` computes; see the [`@texaryn/core` README](../core/README.md#submission-lifecycle) for the full snapshot semantics.
|
|
185
185
|
|
|
186
|
+
## Custom widgets
|
|
187
|
+
|
|
188
|
+
`useFieldBinding(node)` composes everything a field widget needs: the value and `setValue`, the label, description and placeholder, display-gated `errors` with a first `error` and an `invalid` flag, the ARIA prop getters, and two event-shaped adapters ready to spread onto a native control, `domInputProps` for value controls and `domCheckboxProps` for checkboxes. They own the display value and the coercion for text, number, checkbox and select controls, so a widget is markup around one hook:
|
|
189
|
+
|
|
190
|
+
```tsx
|
|
191
|
+
import { useFieldBinding } from '@texaryn/react'
|
|
192
|
+
import type { FieldNode, UINode } from '@texaryn/core'
|
|
193
|
+
|
|
194
|
+
function BootstrapTextInput({ node }: { node: UINode }) {
|
|
195
|
+
const field = useFieldBinding(node as FieldNode)
|
|
196
|
+
return (
|
|
197
|
+
<div className="mb-3">
|
|
198
|
+
<label {...field.labelProps} className="form-label">{field.label}</label>
|
|
199
|
+
<input {...field.domInputProps} type="text" className={field.invalid ? 'form-control is-invalid' : 'form-control'} />
|
|
200
|
+
{field.description ? <div {...field.descriptionProps} className="form-text">{field.description}</div> : null}
|
|
201
|
+
</div>
|
|
202
|
+
)
|
|
203
|
+
}
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
`setValue(value)` is the fundamental operation; the `onChange` on the DOM surfaces is a convenience that coerces the DOM event and calls it. A component that deals in values directly uses `field.value` and `field.setValue` instead. Checkboxes spread `domCheckboxProps` (`checked`); text, number, textarea and select controls spread `domInputProps` (`value`). The lower-level `getInputProps`, `getLabelProps`, `getErrorProps` and `getDescriptionProps` remain available and unchanged.
|
|
207
|
+
|
|
208
|
+
A renderer that shows either the error or the description, not both, owns `aria-describedby` for what it renders; the binding's props reference both elements because the default widgets render both.
|
|
209
|
+
|
|
186
210
|
## Default widgets
|
|
187
211
|
|
|
188
212
|
`createDefaultRegistry()` registers the built-in React widgets:
|
|
@@ -232,6 +256,11 @@ The schema adapter interprets data semantics. The core compiles and runs the for
|
|
|
232
256
|
- `UseFieldReturn`
|
|
233
257
|
- `useFieldArray`
|
|
234
258
|
- `UseFieldArrayReturn`
|
|
259
|
+
- `useFieldBinding`
|
|
260
|
+
- `FieldBinding`
|
|
261
|
+
- `DomValueInputProps`
|
|
262
|
+
- `DomCheckedInputProps`
|
|
263
|
+
- `DomInputBaseProps`
|
|
235
264
|
- `useFormContext`
|
|
236
265
|
|
|
237
266
|
### Context and rendering
|
|
@@ -279,6 +308,7 @@ The schema adapter interprets data semantics. The core compiles and runs the for
|
|
|
279
308
|
|
|
280
309
|
- [`@texaryn/core`](../core/README.md), runtime and renderer contracts
|
|
281
310
|
- [`@texaryn/schema-json`](../schema-json/README.md), JSON Schema adapter
|
|
311
|
+
- [`@texaryn/react-bootstrap`](../react-bootstrap/README.md), Bootstrap 5 widget registry
|
|
282
312
|
- [`@texaryn/demo`](../demo/README.md), repository demo application
|
|
283
313
|
|
|
284
314
|
See the [repository README](../../README.md) for the complete architecture.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { FieldNode, ValidationError } from '@texaryn/core';
|
|
2
2
|
export interface FieldErrorsProps {
|
|
3
3
|
node: FieldNode;
|
|
4
|
-
errors: ValidationError[];
|
|
4
|
+
errors: readonly ValidationError[];
|
|
5
5
|
showErrors: boolean;
|
|
6
6
|
}
|
|
7
7
|
export declare function FieldErrors({ node, errors, showErrors }: FieldErrorsProps): import("react").JSX.Element | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldErrors.d.ts","sourceRoot":"","sources":["../../src/components/FieldErrors.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAG/D,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,SAAS,CAAA;IACf,MAAM,EAAE,eAAe,EAAE,CAAA;
|
|
1
|
+
{"version":3,"file":"FieldErrors.d.ts","sourceRoot":"","sources":["../../src/components/FieldErrors.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAG/D,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,SAAS,CAAA;IACf,MAAM,EAAE,SAAS,eAAe,EAAE,CAAA;IAClC,UAAU,EAAE,OAAO,CAAA;CACpB;AAED,wBAAgB,WAAW,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,gBAAgB,sCAczE"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { FieldNode, ValidationError } from '@texaryn/core';
|
|
2
|
+
import type { LabelProps, ErrorProps, DescriptionProps } from '../props/field-props.js';
|
|
3
|
+
export interface DomInputBaseProps {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
disabled: boolean;
|
|
7
|
+
'aria-required': boolean;
|
|
8
|
+
'aria-invalid'?: boolean;
|
|
9
|
+
'aria-describedby'?: string;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
onBlur(): void;
|
|
12
|
+
}
|
|
13
|
+
/** Value-shaped surface for text, number, textarea and select controls. */
|
|
14
|
+
export interface DomValueInputProps extends DomInputBaseProps {
|
|
15
|
+
value: string | number;
|
|
16
|
+
onChange(event: {
|
|
17
|
+
target: {
|
|
18
|
+
value: string;
|
|
19
|
+
};
|
|
20
|
+
}): void;
|
|
21
|
+
}
|
|
22
|
+
/** Checked-shaped surface for checkbox controls. */
|
|
23
|
+
export interface DomCheckedInputProps extends DomInputBaseProps {
|
|
24
|
+
checked: boolean;
|
|
25
|
+
onChange(event: {
|
|
26
|
+
target: {
|
|
27
|
+
checked: boolean;
|
|
28
|
+
};
|
|
29
|
+
}): void;
|
|
30
|
+
}
|
|
31
|
+
export interface FieldBinding {
|
|
32
|
+
node: FieldNode;
|
|
33
|
+
value: unknown;
|
|
34
|
+
setValue(value: unknown): void;
|
|
35
|
+
onBlur(): void;
|
|
36
|
+
touched: boolean;
|
|
37
|
+
dirty: boolean;
|
|
38
|
+
disabled: boolean;
|
|
39
|
+
visible: boolean;
|
|
40
|
+
/** Derived from the node for adapters. `aria-required` stays owned by getInputProps. */
|
|
41
|
+
required: boolean;
|
|
42
|
+
label: string;
|
|
43
|
+
description: string | undefined;
|
|
44
|
+
placeholder: string | undefined;
|
|
45
|
+
/** Visible errors only: empty until the field is touched and invalid. */
|
|
46
|
+
errors: readonly ValidationError[];
|
|
47
|
+
/** First visible error as `message ?? keyword`. */
|
|
48
|
+
error: string | undefined;
|
|
49
|
+
invalid: boolean;
|
|
50
|
+
labelProps: LabelProps;
|
|
51
|
+
descriptionProps: DescriptionProps;
|
|
52
|
+
errorProps: ErrorProps;
|
|
53
|
+
domInputProps: DomValueInputProps;
|
|
54
|
+
domCheckboxProps: DomCheckedInputProps;
|
|
55
|
+
}
|
|
56
|
+
export declare function useFieldBinding(node: FieldNode): FieldBinding;
|
|
57
|
+
//# sourceMappingURL=use-field-binding.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-field-binding.d.ts","sourceRoot":"","sources":["../../src/hooks/use-field-binding.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAQ/D,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAEvF,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,OAAO,CAAA;IACjB,eAAe,EAAE,OAAO,CAAA;IACxB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,MAAM,IAAI,IAAI,CAAA;CACf;AAED,2EAA2E;AAC3E,MAAM,WAAW,kBAAmB,SAAQ,iBAAiB;IAC3D,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;IACtB,QAAQ,CAAC,KAAK,EAAE;QAAE,MAAM,EAAE;YAAE,KAAK,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,GAAG,IAAI,CAAA;CACrD;AAED,oDAAoD;AACpD,MAAM,WAAW,oBAAqB,SAAQ,iBAAiB;IAC7D,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,CAAC,KAAK,EAAE;QAAE,MAAM,EAAE;YAAE,OAAO,EAAE,OAAO,CAAA;SAAE,CAAA;KAAE,GAAG,IAAI,CAAA;CACxD;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,SAAS,CAAA;IAEf,KAAK,EAAE,OAAO,CAAA;IACd,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAAA;IAC9B,MAAM,IAAI,IAAI,CAAA;IAEd,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,EAAE,OAAO,CAAA;IACd,QAAQ,EAAE,OAAO,CAAA;IACjB,OAAO,EAAE,OAAO,CAAA;IAChB,wFAAwF;IACxF,QAAQ,EAAE,OAAO,CAAA;IAEjB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,GAAG,SAAS,CAAA;IAC/B,WAAW,EAAE,MAAM,GAAG,SAAS,CAAA;IAE/B,yEAAyE;IACzE,MAAM,EAAE,SAAS,eAAe,EAAE,CAAA;IAClC,mDAAmD;IACnD,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,OAAO,EAAE,OAAO,CAAA;IAEhB,UAAU,EAAE,UAAU,CAAA;IACtB,gBAAgB,EAAE,gBAAgB,CAAA;IAClC,UAAU,EAAE,UAAU,CAAA;IACtB,aAAa,EAAE,kBAAkB,CAAA;IACjC,gBAAgB,EAAE,oBAAoB,CAAA;CACvC;AA6BD,wBAAgB,eAAe,CAAC,IAAI,EAAE,SAAS,GAAG,YAAY,CAuD7D"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { useField } from './use-field.js';
|
|
2
|
+
import { getInputProps, getLabelProps, getErrorProps, getDescriptionProps, } from '../props/field-props.js';
|
|
3
|
+
const NO_ERRORS = Object.freeze([]);
|
|
4
|
+
// Mirrors createDefaultRegistry: enum outranks the primitive kind.
|
|
5
|
+
function fieldKind(node) {
|
|
6
|
+
if (node.enumValues != null && node.enumValues.length > 0)
|
|
7
|
+
return 'enum';
|
|
8
|
+
if (node.fieldType === 'boolean')
|
|
9
|
+
return 'boolean';
|
|
10
|
+
if (node.fieldType === 'number' || node.fieldType === 'integer')
|
|
11
|
+
return 'number';
|
|
12
|
+
return 'string';
|
|
13
|
+
}
|
|
14
|
+
function displayValue(kind, value) {
|
|
15
|
+
if (kind === 'number' && typeof value === 'number')
|
|
16
|
+
return value;
|
|
17
|
+
if (kind === 'string' && typeof value === 'string')
|
|
18
|
+
return value;
|
|
19
|
+
return value == null ? '' : String(value);
|
|
20
|
+
}
|
|
21
|
+
function coerce(kind, node, raw) {
|
|
22
|
+
if (kind === 'number')
|
|
23
|
+
return raw === '' ? undefined : Number(raw);
|
|
24
|
+
if (kind === 'enum') {
|
|
25
|
+
const option = (node.enumValues ?? []).find((o) => String(o.value) === raw);
|
|
26
|
+
return option ? option.value : raw;
|
|
27
|
+
}
|
|
28
|
+
return raw;
|
|
29
|
+
}
|
|
30
|
+
export function useFieldBinding(node) {
|
|
31
|
+
const field = useField(node.id);
|
|
32
|
+
const input = getInputProps(node, field);
|
|
33
|
+
const kind = fieldKind(node);
|
|
34
|
+
const base = {
|
|
35
|
+
id: input.id,
|
|
36
|
+
name: input.name,
|
|
37
|
+
disabled: input.disabled,
|
|
38
|
+
'aria-required': input['aria-required'],
|
|
39
|
+
'aria-invalid': input['aria-invalid'],
|
|
40
|
+
'aria-describedby': input['aria-describedby'],
|
|
41
|
+
placeholder: input.placeholder,
|
|
42
|
+
onBlur: input.onBlur,
|
|
43
|
+
};
|
|
44
|
+
const domInputProps = {
|
|
45
|
+
...base,
|
|
46
|
+
value: displayValue(kind, field.value),
|
|
47
|
+
onChange: (event) => field.onChange(coerce(kind, node, event.target.value)),
|
|
48
|
+
};
|
|
49
|
+
const domCheckboxProps = {
|
|
50
|
+
...base,
|
|
51
|
+
checked: Boolean(field.value),
|
|
52
|
+
onChange: (event) => field.onChange(event.target.checked),
|
|
53
|
+
};
|
|
54
|
+
const errors = field.showErrors ? field.errors : NO_ERRORS;
|
|
55
|
+
const first = errors[0];
|
|
56
|
+
return {
|
|
57
|
+
node,
|
|
58
|
+
value: field.value,
|
|
59
|
+
setValue: field.onChange,
|
|
60
|
+
onBlur: field.onBlur,
|
|
61
|
+
touched: field.touched,
|
|
62
|
+
dirty: field.dirty,
|
|
63
|
+
disabled: field.disabled,
|
|
64
|
+
visible: field.visible,
|
|
65
|
+
required: Boolean(node.constraints.required),
|
|
66
|
+
label: node.annotations.title ?? node.dataPointer ?? node.id,
|
|
67
|
+
description: node.helpText ?? node.annotations.description,
|
|
68
|
+
placeholder: node.placeholder,
|
|
69
|
+
errors,
|
|
70
|
+
error: first ? first.message ?? first.keyword : undefined,
|
|
71
|
+
invalid: errors.length > 0,
|
|
72
|
+
labelProps: getLabelProps(node),
|
|
73
|
+
descriptionProps: getDescriptionProps(node),
|
|
74
|
+
errorProps: getErrorProps(node),
|
|
75
|
+
domInputProps,
|
|
76
|
+
domCheckboxProps,
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=use-field-binding.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-field-binding.js","sourceRoot":"","sources":["../../src/hooks/use-field-binding.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EACL,aAAa,EACb,aAAa,EACb,aAAa,EACb,mBAAmB,GACpB,MAAM,yBAAyB,CAAA;AAyDhC,MAAM,SAAS,GAA+B,MAAM,CAAC,MAAM,CAAoB,EAAE,CAAC,CAAA;AAIlF,mEAAmE;AACnE,SAAS,SAAS,CAAC,IAAe;IAChC,IAAI,IAAI,CAAC,UAAU,IAAI,IAAI,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,MAAM,CAAA;IACxE,IAAI,IAAI,CAAC,SAAS,KAAK,SAAS;QAAE,OAAO,SAAS,CAAA;IAClD,IAAI,IAAI,CAAC,SAAS,KAAK,QAAQ,IAAI,IAAI,CAAC,SAAS,KAAK,SAAS;QAAE,OAAO,QAAQ,CAAA;IAChF,OAAO,QAAQ,CAAA;AACjB,CAAC;AAED,SAAS,YAAY,CAAC,IAAe,EAAE,KAAc;IACnD,IAAI,IAAI,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAA;IAChE,IAAI,IAA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AC,WAAW,CAAC,WAAW;QAC1D,WAAW,EAAE,IAAI,CAAC,WAAW;QAC7B,MAAM;QACN,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS;QACzD,OAAO,EAAE,MAAM,CAAC,MAAM,GAAG,CAAC;QAC1B,UAAU,EAAE,aAAa,CAAC,IAAI,CAAC;QAC/B,gBAAgB,EAAE,mBAAmB,CAAC,IAAI,CAAC;QAC3C,UAAU,EAAE,aAAa,CAAC,IAAI,CAAC;QAC/B,aAAa;QACb,gBAAgB;KACjB,CAAA;AACH,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,8 @@ export { useField } from './hooks/use-field.js';
|
|
|
5
5
|
export type { UseFieldReturn } from './hooks/use-field.js';
|
|
6
6
|
export { useFieldArray } from './hooks/use-field-array.js';
|
|
7
7
|
export type { UseFieldArrayReturn } from './hooks/use-field-array.js';
|
|
8
|
+
export { useFieldBinding } from './hooks/use-field-binding.js';
|
|
9
|
+
export type { FieldBinding, DomValueInputProps, DomCheckedInputProps, DomInputBaseProps, } from './hooks/use-field-binding.js';
|
|
8
10
|
export { FormContext, FormProvider, useFormContext } from './context.js';
|
|
9
11
|
export { getInputProps, getLabelProps, getErrorProps, getDescriptionProps } from './props/index.js';
|
|
10
12
|
export type { InputProps, LabelProps, ErrorProps, DescriptionProps, FieldState } from './props/index.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAC7C,YAAY,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;A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qB,GACtB,MAAM,oBAAoB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -2,6 +2,7 @@ export { useStore } from './hooks/use-store.js';
|
|
|
2
2
|
export { useForm } from './hooks/use-form.js';
|
|
3
3
|
export { useField } from './hooks/use-field.js';
|
|
4
4
|
export { useFieldArray } from './hooks/use-field-array.js';
|
|
5
|
+
export { useFieldBinding } from './hooks/use-field-binding.js';
|
|
5
6
|
export { FormContext, FormProvider, useFormContext } from './context.js';
|
|
6
7
|
export { getInputProps, getLabelProps, getErrorProps, getDescriptionProps } from './props/index.js';
|
|
7
8
|
export { FormRoot } from './components/FormRoot.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAE7C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAE/C,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAE1D,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AACxE,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AAEnG,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AAEnD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAE3D,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AAEzD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAA;AAErE,OAAO,EACL,SAAS,EACT,WAAW,EACX,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,YAAY,EACZ,YAAY,EACZ,qBAAqB,GACtB,MAAM,oBAAoB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAE7C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAE/C,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAE1D,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAA;AAO9D,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AACxE,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AAEnG,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AAEnD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAE3D,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AAEzD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAA;AAErE,OAAO,EACL,SAAS,EACT,WAAW,EACX,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,YAAY,EACZ,YAAY,EACZ,qBAAqB,GACtB,MAAM,oBAAoB,CAAA"}
|
|
@@ -7,7 +7,7 @@ export function makeId(nodeId, suffix) {
|
|
|
7
7
|
*/
|
|
8
8
|
export function getInputProps(node, fieldState) {
|
|
9
9
|
const id = makeId(node.id, 'input');
|
|
10
|
-
const hasDescription = Boolean(node.annotations?.description);
|
|
10
|
+
const hasDescription = Boolean(node.helpText ?? node.annotations?.description);
|
|
11
11
|
// Build aria-describedby from description and error IDs, in that order
|
|
12
12
|
const describedByIds = [];
|
|
13
13
|
if (hasDescription) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field-props.js","sourceRoot":"","sources":["../../src/props/field-props.ts"],"names":[],"mappings":"AAwDA,MAAM,UAAU,MAAM,CAAC,MAAc,EAAE,MAAc;IACnD,OAAO,WAAW,MAAM,IAAI,MAAM,EAAE,CAAA;AACtC,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,IAAe,EAAE,UAAsB;IACnE,MAAM,EAAE,GAAG,MAAM,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,CAAC,CAAA;IACnC,MAAM,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,WAAW,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"field-props.js","sourceRoot":"","sources":["../../src/props/field-props.ts"],"names":[],"mappings":"AAwDA,MAAM,UAAU,MAAM,CAAC,MAAc,EAAE,MAAc;IACnD,OAAO,WAAW,MAAM,IAAI,MAAM,EAAE,CAAA;AACtC,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,IAAe,EAAE,UAAsB;IACnE,MAAM,EAAE,GAAG,MAAM,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,CAAC,CAAA;IACnC,MAAM,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,WAAW,EAAE,WAAW,CAAC,CAAA;IAE9E,uEAAuE;IACvE,MAAM,cAAc,GAAa,EAAE,CAAA;IACnC,IAAI,cAAc,EAAE,CAAC;QACnB,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,EAAE,aAAa,CAAC,CAAC,CAAA;IACrD,CAAC;IACD,IAAI,UAAU,CAAC,UAAU,IAAI,UAAU,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC1D,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAA;IAC/C,CAAC;IAED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C,IAAI,CAAC,EAAE,EAAE,aAAa,CAAC;KACnC,CAAA;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../src/widgets/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAa,MAAM,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../src/widgets/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAa,MAAM,EAAE,MAAM,eAAe,CAAA;AAItD,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAA;CACb;AAED,iBAAS,YAAY,CAAC,EAAE,IAAI,EAAE,EAAE,WAAW,qBAW1C;AAED,eAAO,MAAM,QAAQ,gDAGpB,CAAA"}
|
package/dist/widgets/Checkbox.js
CHANGED
|
@@ -1,19 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import {
|
|
4
|
-
import { getInputProps, getLabelProps, getDescriptionProps } from '../props/index.js';
|
|
3
|
+
import { useFieldBinding } from '../hooks/use-field-binding.js';
|
|
5
4
|
import { FieldErrors } from '../components/FieldErrors.js';
|
|
6
5
|
function CheckboxImpl({ node }) {
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
const { value, onChange, ...inputProps } = getInputProps(fieldNode, field);
|
|
10
|
-
const labelProps = getLabelProps(fieldNode);
|
|
11
|
-
const descriptionProps = getDescriptionProps(fieldNode);
|
|
12
|
-
const label = fieldNode.annotations.title ?? fieldNode.dataPointer ?? fieldNode.id;
|
|
13
|
-
const handleChange = (event) => {
|
|
14
|
-
onChange(event.target.checked);
|
|
15
|
-
};
|
|
16
|
-
return (_jsxs("div", { children: [_jsx("input", { ...inputProps, type: "checkbox", checked: Boolean(value), onChange: handleChange }), _jsx("label", { ...labelProps, children: label }), fieldNode.annotations.description ? (_jsx("div", { ...descriptionProps, children: fieldNode.annotations.description })) : null, _jsx(FieldErrors, { node: fieldNode, errors: field.errors, showErrors: field.showErrors })] }));
|
|
6
|
+
const field = useFieldBinding(node);
|
|
7
|
+
return (_jsxs("div", { children: [_jsx("input", { ...field.domCheckboxProps, type: "checkbox" }), _jsx("label", { ...field.labelProps, children: field.label }), field.description ? _jsx("div", { ...field.descriptionProps, children: field.description }) : null, _jsx(FieldErrors, { node: field.node, errors: field.errors, showErrors: field.invalid })] }));
|
|
17
8
|
}
|
|
18
9
|
export const Checkbox = React.memo(CheckboxImpl, (prev, next) => prev.node.id === next.node.id);
|
|
19
10
|
//# sourceMappingURL=Checkbox.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["../../src/widgets/Checkbox.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["../../src/widgets/Checkbox.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAM1D,SAAS,YAAY,CAAC,EAAE,IAAI,EAAe;IACzC,MAAM,KAAK,GAAG,eAAe,CAAC,IAAiB,CAAC,CAAA;IAEhD,OAAO,CACL,0BACE,mBAAW,KAAK,CAAC,gBAAgB,EAAE,IAAI,EAAC,UAAU,GAAG,EACrD,mBAAW,KAAK,CAAC,UAAU,YAAG,KAAK,CAAC,KAAK,GAAS,EACjD,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,iBAAS,KAAK,CAAC,gBAAgB,YAAG,KAAK,CAAC,WAAW,GAAO,CAAC,CAAC,CAAC,IAAI,EACtF,KAAC,WAAW,IAAC,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,CAAC,OAAO,GAAI,IAC9E,CACP,CAAA;AACH,CAAC;AAED,MAAM,CAAC,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI,CAChC,YAAY,EACZ,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,CAC9C,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NumberInput.d.ts","sourceRoot":"","sources":["../../src/widgets/NumberInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAa,MAAM,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"NumberInput.d.ts","sourceRoot":"","sources":["../../src/widgets/NumberInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAa,MAAM,EAAE,MAAM,eAAe,CAAA;AAItD,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAA;CACb;AAED,iBAAS,eAAe,CAAC,EAAE,IAAI,EAAE,EAAE,WAAW,qBAW7C;AAED,eAAO,MAAM,WAAW,mDAGvB,CAAA"}
|
|
@@ -1,20 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import {
|
|
4
|
-
import { getInputProps, getLabelProps, getDescriptionProps } from '../props/index.js';
|
|
3
|
+
import { useFieldBinding } from '../hooks/use-field-binding.js';
|
|
5
4
|
import { FieldErrors } from '../components/FieldErrors.js';
|
|
6
5
|
function NumberInputImpl({ node }) {
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
const { value, onChange, ...inputProps } = getInputProps(fieldNode, field);
|
|
10
|
-
const labelProps = getLabelProps(fieldNode);
|
|
11
|
-
const descriptionProps = getDescriptionProps(fieldNode);
|
|
12
|
-
const label = fieldNode.annotations.title ?? fieldNode.dataPointer ?? fieldNode.id;
|
|
13
|
-
const handleChange = (event) => {
|
|
14
|
-
const raw = event.target.value;
|
|
15
|
-
onChange(raw === '' ? undefined : Number(raw));
|
|
16
|
-
};
|
|
17
|
-
return (_jsxs("div", { children: [_jsx("label", { ...labelProps, children: label }), _jsx("input", { ...inputProps, type: "number", value: typeof value === 'number' ? value : value == null ? '' : String(value), onChange: handleChange }), fieldNode.annotations.description ? (_jsx("div", { ...descriptionProps, children: fieldNode.annotations.description })) : null, _jsx(FieldErrors, { node: fieldNode, errors: field.errors, showErrors: field.showErrors })] }));
|
|
6
|
+
const field = useFieldBinding(node);
|
|
7
|
+
return (_jsxs("div", { children: [_jsx("label", { ...field.labelProps, children: field.label }), _jsx("input", { ...field.domInputProps, type: "number" }), field.description ? _jsx("div", { ...field.descriptionProps, children: field.description }) : null, _jsx(FieldErrors, { node: field.node, errors: field.errors, showErrors: field.invalid })] }));
|
|
18
8
|
}
|
|
19
9
|
export const NumberInput = React.memo(NumberInputImpl, (prev, next) => prev.node.id === next.node.id);
|
|
20
10
|
//# sourceMappingURL=NumberInput.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NumberInput.js","sourceRoot":"","sources":["../../src/widgets/NumberInput.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"NumberInput.js","sourceRoot":"","sources":["../../src/widgets/NumberInput.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAM1D,SAAS,eAAe,CAAC,EAAE,IAAI,EAAe;IAC5C,MAAM,KAAK,GAAG,eAAe,CAAC,IAAiB,CAAC,CAAA;IAEhD,OAAO,CACL,0BACE,mBAAW,KAAK,CAAC,UAAU,YAAG,KAAK,CAAC,KAAK,GAAS,EAClD,mBAAW,KAAK,CAAC,aAAa,EAAE,IAAI,EAAC,QAAQ,GAAG,EAC/C,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,iBAAS,KAAK,CAAC,gBAAgB,YAAG,KAAK,CAAC,WAAW,GAAO,CAAC,CAAC,CAAC,IAAI,EACtF,KAAC,WAAW,IAAC,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,CAAC,OAAO,GAAI,IAC9E,CACP,CAAA;AACH,CAAC;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,KAAK,CAAC,IAAI,CACnC,eAAe,EACf,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,CAC9C,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../src/widgets/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAa,MAAM,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../src/widgets/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAa,MAAM,EAAE,MAAM,eAAe,CAAA;AAItD,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAA;CACb;AAED,iBAAS,UAAU,CAAC,EAAE,IAAI,EAAE,EAAE,WAAW,qBAkBxC;AAED,eAAO,MAAM,MAAM,8CAGlB,CAAA"}
|
package/dist/widgets/Select.js
CHANGED
|
@@ -1,21 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import {
|
|
4
|
-
import { getInputProps, getLabelProps, getDescriptionProps } from '../props/index.js';
|
|
3
|
+
import { useFieldBinding } from '../hooks/use-field-binding.js';
|
|
5
4
|
import { FieldErrors } from '../components/FieldErrors.js';
|
|
6
5
|
function SelectImpl({ node }) {
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
const labelProps = getLabelProps(fieldNode);
|
|
11
|
-
const descriptionProps = getDescriptionProps(fieldNode);
|
|
12
|
-
const label = fieldNode.annotations.title ?? fieldNode.dataPointer ?? fieldNode.id;
|
|
13
|
-
const enumValues = fieldNode.enumValues ?? [];
|
|
14
|
-
const handleChange = (event) => {
|
|
15
|
-
const selected = enumValues.find((option) => String(option.value) === event.target.value);
|
|
16
|
-
onChange(selected ? selected.value : event.target.value);
|
|
17
|
-
};
|
|
18
|
-
return (_jsxs("div", { children: [_jsx("label", { ...labelProps, children: label }), _jsx("select", { ...inputProps, value: value == null ? '' : String(value), onChange: handleChange, children: enumValues.map((option) => (_jsx("option", { value: String(option.value), children: option.title ?? String(option.value) }, String(option.value)))) }), fieldNode.annotations.description ? (_jsx("div", { ...descriptionProps, children: fieldNode.annotations.description })) : null, _jsx(FieldErrors, { node: fieldNode, errors: field.errors, showErrors: field.showErrors })] }));
|
|
6
|
+
const field = useFieldBinding(node);
|
|
7
|
+
const enumValues = field.node.enumValues ?? [];
|
|
8
|
+
return (_jsxs("div", { children: [_jsx("label", { ...field.labelProps, children: field.label }), _jsx("select", { ...field.domInputProps, children: enumValues.map((option) => (_jsx("option", { value: String(option.value), children: option.title ?? String(option.value) }, String(option.value)))) }), field.description ? _jsx("div", { ...field.descriptionProps, children: field.description }) : null, _jsx(FieldErrors, { node: field.node, errors: field.errors, showErrors: field.invalid })] }));
|
|
19
9
|
}
|
|
20
10
|
export const Select = React.memo(SelectImpl, (prev, next) => prev.node.id === next.node.id);
|
|
21
11
|
//# sourceMappingURL=Select.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.js","sourceRoot":"","sources":["../../src/widgets/Select.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"Select.js","sourceRoot":"","sources":["../../src/widgets/Select.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAM1D,SAAS,UAAU,CAAC,EAAE,IAAI,EAAe;IACvC,MAAM,KAAK,GAAG,eAAe,CAAC,IAAiB,CAAC,CAAA;IAChD,MAAM,UAAU,GAAG,KAAK,CAAC,IAAI,CAAC,UAAU,IAAI,EAAE,CAAA;IAE9C,OAAO,CACL,0BACE,mBAAW,KAAK,CAAC,UAAU,YAAG,KAAK,CAAC,KAAK,GAAS,EAClD,oBAAY,KAAK,CAAC,aAAa,YAC5B,UAAU,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAC1B,iBAAmC,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,YAC3D,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,IAD1B,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAExB,CACV,CAAC,GACK,EACR,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,iBAAS,KAAK,CAAC,gBAAgB,YAAG,KAAK,CAAC,WAAW,GAAO,CAAC,CAAC,CAAC,IAAI,EACtF,KAAC,WAAW,IAAC,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,CAAC,OAAO,GAAI,IAC9E,CACP,CAAA;AACH,CAAC;AAED,MAAM,CAAC,MAAM,MAAM,GAAG,KAAK,CAAC,IAAI,CAC9B,UAAU,EACV,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,CAC9C,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../src/widgets/TextInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAa,MAAM,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../src/widgets/TextInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAa,MAAM,EAAE,MAAM,eAAe,CAAA;AAItD,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAA;CACb;AAED,iBAAS,aAAa,CAAC,EAAE,IAAI,EAAE,EAAE,WAAW,qBAW3C;AAED,eAAO,MAAM,SAAS,iDAGrB,CAAA"}
|
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import {
|
|
4
|
-
import { getInputProps, getLabelProps, getDescriptionProps } from '../props/index.js';
|
|
3
|
+
import { useFieldBinding } from '../hooks/use-field-binding.js';
|
|
5
4
|
import { FieldErrors } from '../components/FieldErrors.js';
|
|
6
5
|
function TextInputImpl({ node }) {
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
const { value, onChange, ...inputProps } = getInputProps(fieldNode, field);
|
|
10
|
-
const labelProps = getLabelProps(fieldNode);
|
|
11
|
-
const descriptionProps = getDescriptionProps(fieldNode);
|
|
12
|
-
const label = fieldNode.annotations.title ?? fieldNode.dataPointer ?? fieldNode.id;
|
|
13
|
-
return (_jsxs("div", { children: [_jsx("label", { ...labelProps, children: label }), _jsx("input", { ...inputProps, type: "text", value: typeof value === 'string' ? value : value == null ? '' : String(value), onChange: (event) => onChange(event.target.value) }), fieldNode.annotations.description ? (_jsx("div", { ...descriptionProps, children: fieldNode.annotations.description })) : null, _jsx(FieldErrors, { node: fieldNode, errors: field.errors, showErrors: field.showErrors })] }));
|
|
6
|
+
const field = useFieldBinding(node);
|
|
7
|
+
return (_jsxs("div", { children: [_jsx("label", { ...field.labelProps, children: field.label }), _jsx("input", { ...field.domInputProps, type: "text" }), field.description ? _jsx("div", { ...field.descriptionProps, children: field.description }) : null, _jsx(FieldErrors, { node: field.node, errors: field.errors, showErrors: field.invalid })] }));
|
|
14
8
|
}
|
|
15
9
|
export const TextInput = React.memo(TextInputImpl, (prev, next) => prev.node.id === next.node.id);
|
|
16
10
|
//# sourceMappingURL=TextInput.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInput.js","sourceRoot":"","sources":["../../src/widgets/TextInput.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"TextInput.js","sourceRoot":"","sources":["../../src/widgets/TextInput.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAM1D,SAAS,aAAa,CAAC,EAAE,IAAI,EAAe;IAC1C,MAAM,KAAK,GAAG,eAAe,CAAC,IAAiB,CAAC,CAAA;IAEhD,OAAO,CACL,0BACE,mBAAW,KAAK,CAAC,UAAU,YAAG,KAAK,CAAC,KAAK,GAAS,EAClD,mBAAW,KAAK,CAAC,aAAa,EAAE,IAAI,EAAC,MAAM,GAAG,EAC7C,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,iBAAS,KAAK,CAAC,gBAAgB,YAAG,KAAK,CAAC,WAAW,GAAO,CAAC,CAAC,CAAC,IAAI,EACtF,KAAC,WAAW,IAAC,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,CAAC,OAAO,GAAI,IAC9E,CACP,CAAA;AACH,CAAC;AAED,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,CAAC,IAAI,CACjC,aAAa,EACb,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,CAC9C,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../src/widgets/Textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAa,MAAM,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../src/widgets/Textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAa,MAAM,EAAE,MAAM,eAAe,CAAA;AAItD,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAA;CACb;AAED,iBAAS,YAAY,CAAC,EAAE,IAAI,EAAE,EAAE,WAAW,qBAW1C;AAED,eAAO,MAAM,QAAQ,gDAGpB,CAAA"}
|
package/dist/widgets/Textarea.js
CHANGED
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import {
|
|
4
|
-
import { getInputProps, getLabelProps, getDescriptionProps } from '../props/index.js';
|
|
3
|
+
import { useFieldBinding } from '../hooks/use-field-binding.js';
|
|
5
4
|
import { FieldErrors } from '../components/FieldErrors.js';
|
|
6
5
|
function TextareaImpl({ node }) {
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
const { value, onChange, ...inputProps } = getInputProps(fieldNode, field);
|
|
10
|
-
const labelProps = getLabelProps(fieldNode);
|
|
11
|
-
const descriptionProps = getDescriptionProps(fieldNode);
|
|
12
|
-
const label = fieldNode.annotations.title ?? fieldNode.dataPointer ?? fieldNode.id;
|
|
13
|
-
return (_jsxs("div", { children: [_jsx("label", { ...labelProps, children: label }), _jsx("textarea", { ...inputProps, value: typeof value === 'string' ? value : value == null ? '' : String(value), onChange: (event) => onChange(event.target.value) }), fieldNode.annotations.description ? (_jsx("div", { ...descriptionProps, children: fieldNode.annotations.description })) : null, _jsx(FieldErrors, { node: fieldNode, errors: field.errors, showErrors: field.showErrors })] }));
|
|
6
|
+
const field = useFieldBinding(node);
|
|
7
|
+
return (_jsxs("div", { children: [_jsx("label", { ...field.labelProps, children: field.label }), _jsx("textarea", { ...field.domInputProps }), field.description ? _jsx("div", { ...field.descriptionProps, children: field.description }) : null, _jsx(FieldErrors, { node: field.node, errors: field.errors, showErrors: field.invalid })] }));
|
|
14
8
|
}
|
|
15
9
|
export const Textarea = React.memo(TextareaImpl, (prev, next) => prev.node.id === next.node.id);
|
|
16
10
|
//# sourceMappingURL=Textarea.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Textarea.js","sourceRoot":"","sources":["../../src/widgets/Textarea.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"Textarea.js","sourceRoot":"","sources":["../../src/widgets/Textarea.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAM1D,SAAS,YAAY,CAAC,EAAE,IAAI,EAAe;IACzC,MAAM,KAAK,GAAG,eAAe,CAAC,IAAiB,CAAC,CAAA;IAEhD,OAAO,CACL,0BACE,mBAAW,KAAK,CAAC,UAAU,YAAG,KAAK,CAAC,KAAK,GAAS,EAClD,sBAAc,KAAK,CAAC,aAAa,GAAI,EACpC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,iBAAS,KAAK,CAAC,gBAAgB,YAAG,KAAK,CAAC,WAAW,GAAO,CAAC,CAAC,CAAC,IAAI,EACtF,KAAC,WAAW,IAAC,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,CAAC,OAAO,GAAI,IAC9E,CACP,CAAA;AACH,CAAC;AAED,MAAM,CAAC,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI,CAChC,YAAY,EACZ,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,CAC9C,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@texaryn/react",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "React bindings, hooks, prop getters, and default widgets for Texaryn",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"CHANGELOG.md"
|
|
45
45
|
],
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@texaryn/core": "0.
|
|
47
|
+
"@texaryn/core": "^0.2.0"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"react": ">=18.0.0"
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"jsdom": "^25.0.0",
|
|
56
56
|
"react": "^19.0.0",
|
|
57
57
|
"react-dom": "^19.0.0",
|
|
58
|
-
"@texaryn/schema-json": "0.1
|
|
58
|
+
"@texaryn/schema-json": "0.2.1"
|
|
59
59
|
},
|
|
60
60
|
"scripts": {
|
|
61
61
|
"build": "tsc --build"
|