@uniform-ts/core 0.0.5 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -64,19 +64,19 @@ UniForm introspects the schema, renders appropriate inputs, validates with Zod,
64
64
 
65
65
  ## Core Props
66
66
 
67
- | Prop | Type | Description |
68
- | --------------- | ---------------------------------------- | ---------------------------------------------------------------------- |
69
- | `form` | `UniForm<TSchema>` | Schema + onChange handlers from `createForm()` |
70
- | `onSubmit` | `(values) => void \| Promise<void>` | Called with typed values after successful validation |
71
- | `defaultValues` | `Partial<...>` or `() => Promise<...>` | Initial values; async function shows `loadingFallback` |
72
- | `components` | `ComponentRegistry` | Map Zod types to your input components |
73
- | `fields` | `Record<string, FieldOverride>` | Per-field label, description, order, section, condition |
74
- | `fieldWrapper` | `React.ComponentType<FieldWrapperProps>` | Custom wrapper around every scalar field |
75
- | `layout` | `LayoutSlots` | Replace form/section/object/array wrappers, submit button, array rows |
76
- | `classNames` | `FormClassNames` | CSS classes for form, fields, labels, errors, fieldset/legend wrappers |
77
- | `ref` | `React.Ref<AutoFormHandle>` | Imperative `reset`, `submit`, `setValues`, `getValues` |
78
- | `persistKey` | `string` | Auto-save form state to `localStorage` under this key |
79
- | `labels` | `FormLabels` | Override built-in UI strings for i18n |
67
+ | Prop | Type | Description |
68
+ | --------------- | ---------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
69
+ | `form` | `UniForm<TSchema>` | Schema + onChange handlers from `createForm()` |
70
+ | `onSubmit` | `(values) => void \| Promise<void>` | Called with typed values after successful validation |
71
+ | `defaultValues` | `Partial<...>` or `() => Promise<...>` | Initial values; async function shows `loadingFallback` |
72
+ | `components` | `ComponentRegistry` | Map Zod types to your input components |
73
+ | `fields` | `Record<string, FieldOverride>` | Per-field label, description, order, section, condition |
74
+ | `fieldWrapper` | `React.ComponentType<FieldWrapperProps>` | Custom wrapper around every scalar field |
75
+ | `layout` | `LayoutSlots` | Replace form/section/object/array wrappers, submit button, array rows |
76
+ | `classNames` | `FormClassNames` | CSS classes for form, fields, labels, errors, fieldset/legend wrappers |
77
+ | `ref` | `React.Ref<AutoFormHandle>` | Imperative `reset`, `submit`, `setValues`, `getValues` |
78
+ | `persistKey` | `string` | Auto-save form state to `localStorage` under this key |
79
+ | `labels` | `FormLabels` | Override built-in UI strings for i18n; import a ready-made locale pack from `@uniform-ts/core/locales/{en,he,es}` |
80
80
 
81
81
  ## Features
82
82
 
@@ -88,7 +88,7 @@ UniForm introspects the schema, renders appropriate inputs, validates with Zod,
88
88
  - **Programmatic control** — `reset()`, `submit()`, `setValues()`, `getValues()`, `setErrors()`, `focus()` via ref
89
89
  - **Form persistence** — auto-save to `localStorage` (or custom storage) with configurable debounce
90
90
  - **Pluggable coercion** — automatic `string → number`, `string → Date` with customizable coercion map
91
- - **i18n** — override every hard-coded UI string via `labels` prop
91
+ - **i18n** — override every hard-coded UI string (including aria labels) via `labels` prop; import a ready-made locale pack and optionally spread-override individual keys
92
92
  - **Tree-shakeable** — ESM + CJS builds via tsup
93
93
 
94
94
  ## Documentation