Skip to content

Conversation

@tenphi
Copy link
Member

@tenphi tenphi commented Nov 14, 2025

Note

Removes the Form-level isRequired prop, adds automatic required rule handling per field, and updates the required validator to respect rule.required.

  • Forms:
    • Remove isRequired from Form and DialogForm usage; context/provider no longer passes it.
    • useField now preprocesses rules, injecting { required: true } when isRequired is set and not already present, and prepends delayValidationRule when applicable.
  • Validation:
    • Update required validator to check rule.required before validating.
  • Types/Props:
    • Introduce FieldCoreProps; refactor field prop types so UseFieldProps extends it.
    • Move/centralize field-related props in src/shared/form.ts; shift isRequired to field-level, remove from FormBaseProps.
  • Tests:
    • Add tests ensuring required rule is auto-added and not duplicated.
  • Storybook:
    • Minor import consolidation in Field.stories.tsx.

Written by Cursor Bugbot for commit c600bf0. This will update automatically on new commits. Configure here.

@changeset-bot
Copy link

changeset-bot bot commented Nov 14, 2025

🦋 Changeset detected

Latest commit: c600bf0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@cube-dev/ui-kit Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Nov 14, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
cube-ui-kit Ready Ready Preview Comment Nov 14, 2025 3:44pm
cube-ui-kit-cursor Ready Ready Preview Comment Nov 14, 2025 3:44pm

@github-actions
Copy link
Contributor

github-actions bot commented Nov 14, 2025

📦 NPM canary release

Deployed canary version 0.0.0-canary-bc5b3b3.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 14, 2025

🏋️ Size limit report

Name Size Passed?
All 296.91 KB (+0.02% 🔺) Yes 🎉
Tree shaking (just a Button) 33.33 KB (0% 🟰) Yes 🎉
Tree shaking (just an Icon) 20.59 KB (0% 🟰) Yes 🎉

Click here if you want to find out what is changed in this build

@github-actions
Copy link
Contributor

github-actions bot commented Nov 14, 2025

🧪 Storybook is successfully deployed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants