Skip to content

Conversation

@anxndsgn
Copy link
Contributor

@anxndsgn anxndsgn commented Dec 14, 2025

  • Add FieldItem components
  • Refactor radio group and checkbox group form example using FiledItem to align with base-ui doc.

Before:

<Form >
      <Field
        name="frameworks"
        render={(props) => <Fieldset {...props} />}
      >
        <FieldsetLegend >
          Frameworks
        </FieldsetLegend>
        <RadioGroup defaultValue="next">
          <FieldLabel>
            <Radio value="next" /> Next.js
          </FieldLabel>
        </RadioGroup>
      </Field>
 </Form>

click the label will not toggle the radio/checkbox in form
image

After:

<Form >
      <Field name="frameworks">
        <Fieldset render={ <CheckboxGroup defaultValue={["next"]}  /> } >
          <FieldsetLegend>
            Frameworks
          </FieldsetLegend>
          <FieldItem>
            <Checkbox value="next" />
            <FieldLabel>Next.js</FieldLabel>
          </FieldItem>
          {/** items... **/}
        </Fieldset>
      </Field>
</Form>

click the label will also toggle the radio/checkbox

@vercel
Copy link

vercel bot commented Dec 14, 2025

@anxndsgn is attempting to deploy a commit to the cal Team on Vercel.

A member of the Team first needs to authorize it.

@anxndsgn anxndsgn marked this pull request as ready for review December 14, 2025 16:58
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 11 files

Prompt for AI agents (all 2 issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="apps/ui/public/r/p-radio-group-5.json">

<violation number="1" location="apps/ui/public/r/p-radio-group-5.json:16">
P3: Inconsistent leading space in label text. The Next.js label has `&lt;FieldLabel&gt; Next.js&lt;/FieldLabel&gt;` with a space after the opening tag, while other labels like `&lt;FieldLabel&gt;Vite&lt;/FieldLabel&gt;` don&#39;t. This will render extra whitespace.</violation>
</file>

<file name="apps/ui/registry/default/particles/p-checkbox-group-5.tsx">

<violation number="1" location="apps/ui/registry/default/particles/p-checkbox-group-5.tsx:57">
P2: The submit `Button` is placed inside the `Field` component, which is inconsistent with the existing pattern in `p-radio-group-5.tsx` where the button is correctly placed outside/after the `Field`. The submit button should be a sibling to `Field`, not nested inside it.</violation>
</file>

Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR

@anxndsgn anxndsgn changed the title feat(Filed): add field item component feat(filed): add field item component Dec 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant