Minor Changes
- #3252
e8b99d2Thanks
@github-actions! - Addinertto the JSX element attribute types.
Patch Changes
-
#3252
6d57458Thanks
@github-actions! - Separate the props you pass touseMachinefrom the
props the machine sees after defaults are applied.- Fixed issue where omitting a required prop type-checked and then failed at runtime with
[zag-js] missing required props. Affectsasync-list,carousel,dnd,gridlist,listbox,pin-input,
select,splitter,toastandtoc, whose required props were reported as optional. - Fixed issue where a prop listed as having a default lost
nullfrom its public type, so props that acceptnull
rejected it.
Machine schemas now declare the public props type plus a
defaultPropKeyunion naming the props the machine fills in:export interface DialogSchema { props: DialogProps defaultPropKey: PropsWithDefault }
Schemas that do not declare
defaultPropKeykeep the previous behaviour, so custom machines continue to work
unchanged. - Fixed issue where omitting a required prop type-checked and then failed at runtime with