Skip to content

Releases: formwerkjs/formwerk

v0.8.3

03 Mar 21:30
Compare
Choose a tag to compare

   🚀 Features

   🐞 Bug Fixes

    View changes on GitHub

v0.8.2

23 Feb 14:44
Compare
Choose a tag to compare

   🚀 Features

   🐞 Bug Fixes

    View changes on GitHub

v0.8.1

21 Feb 17:32
Compare
Choose a tag to compare

   🐞 Bug Fixes

    View changes on GitHub

v0.8.0

20 Feb 19:43
Compare
Choose a tag to compare

This release marks a huge milestone as this was one of the critical fields needed in any UI library ✨

🆕 useCalendar

This new composable allows you to create custom calendar components with many features that your users expect available out of the box. Here are the higlights:

  • ⌨️ Comprehensive keyboard navigation and shortcuts support.
  • 🌐 Support for multiple locales and calendar systems.
  • ✅ Validation with standard schemas.
  • ♿️ First class a11y support.
  • 📅 Support for different views (days, months, years)

And more, check the 📚 docs and examples.

🆕 useDateTimeField

This new composable allows you to create a custom date time field to let users enter date and time values using date time segments. Here are the highlights:

  • ⌨️ Comprehensive keyboard navigation and shortcuts support.
  • 🤖 Auto focus management and detection of whent he user is done entering a segment.
  • 🌐 Support for multiple locales and calendar systems.
  • ✅ Validation with standard schemas.
  • ♿️ First class a11y support.

And more, check the 📚 docs and examples.

What's even cooler, you can combine both to build a date picker component that does both jobs!

🔗 Changelog | 📚 Documentation

v0.7.0

08 Feb 18:14
Compare
Choose a tag to compare

   🚀 Features

  • Expose getError, getValue, getErrors on form groups  -  by @logaretm (e873e)

   💣 Breaking Changes

  • Change form state isValid, isTouched, isDirty to be methods instead, these methods now accept a path to narrow down which path of the form to return the state for. by @genu #126
  • useForm's getErrors now return an array of strings rather than Issue collection objects by @genu #126
const { isTouched, setTouched, isDirty, isValid, getErrors, getError, setErrors } = useForm();

// Check if the form is touched
isTouched();

// Check if a field/path is touched
isTouched('field');
isTouched('address.city');

// Set the touched state of the form
setTouched(true);

// Set the touched state of a field/path
setTouched('field', true);
setTouched('address.city', true);

// Check if the form is dirty
isDirty();

// Check if a field/path is dirty
isDirty('field');
isDirty('address.city');

// Check if the form is valid
isValid();

// Check if a field/path is valid
isValid('field');
isValid('address.city');


// Get all the errors for the form
getErrors(); // string[]

// Get the errors for a field/path
getErrors('field'); // string[]
getErrors('address.city'); // string[]

// Set the errors for a field/path
setErrors('field', 'This is an error');
setErrors('address.city', 'This is another error');
setErrors('address.city', ['This is another error', 'This is another error 2']);

// Gets the first error for a field/path
getError('field'); // string
getError('address.city'); // string

   🐞 Bug Fixes

    View changes on GitHub

v0.6.6

02 Feb 23:10
Compare
Choose a tag to compare

   🐞 Bug Fixes

    View changes on GitHub

v0.6.5

02 Feb 10:36
Compare
Choose a tag to compare

   🐞 Bug Fixes

  • Enhance getErrors function to filter errors by path if provided  -  by @genu in #122 (d1e50)
    View changes on GitHub

v0.6.4

30 Jan 19:03
Compare
Choose a tag to compare

   🐞 Bug Fixes

  • Avoid aria-labelledby on input elements when using label element  -  by @logaretm in #118 (ba861)
    View changes on GitHub

v0.6.3

23 Jan 23:32
Compare
Choose a tag to compare

   🚀 Features

   🐞 Bug Fixes

    View changes on GitHub

v0.6.2

18 Jan 21:18
Compare
Choose a tag to compare

   🚀 Features

   🐞 Bug Fixes

    View changes on GitHub