feat(v2/ui): add ZardCheckboxComponent#57
Conversation
…ate states, CVA, accessible Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
📝 WalkthroughWalkthroughAdds a new Angular checkbox component with ControlValueAccessor support, indeterminate and disabled state handling, checkbox style variants, and package re-exports through the checkbox and UI entrypoints. ChangesCheckbox component and exports
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review --dir v2/ui/checkbox |
|
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@v2/ui/checkbox/checkbox.component.ts`:
- Around line 51-54: Add standalone: true to ZardCheckboxComponent’s `@Component`
metadata so the imports array is valid. Update the component decorator where
NgIcon and ZardIdDirective are declared to make ZardCheckboxComponent a
standalone component, keeping the existing imports unchanged.
- Around line 23-35: The Checkbox component is defining a redundant
zCheckedChange output alongside zChecked = model(false), which already generates
the matching change event. Remove the explicit output<boolean>() and any manual
.emit() usage, and rely on the model-generated binding contract in
checkbox.component.ts so zChecked remains the single source of truth.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 4a9b5757-3837-4e90-873a-7dd000af904c
📒 Files selected for processing (4)
v2/ui/checkbox/checkbox.component.tsv2/ui/checkbox/checkbox.variants.tsv2/ui/checkbox/index.tsv2/ui/index.ts
… remove duplicate output, null-safe event.target, de-duplicate icon markup, fix CVA empty callbacks
…uted — SonarCloud S3358
|
@coderabbitai review --dir v2/ui/checkbox |
|
✅ Action performedReview finished.
|
abcff6f
into
PSMRI:angular-zard-migration
|



What
Adds the Checkbox component to v2/ui — the shared ZardUI component library used across AMRIT apps (104, 1097, MMU).
What's included
ZardCheckboxComponent— standalone, OnPush, signal-based, ControlValueAccessor<ng-content>, paired viaZardIdDirective<input type="checkbox">, Space toggles natively, aria-checked, aria-disabledType of Change
CodeRabbit
All findings resolved:
SonarCloud
Quality Gate passed — 0 new issues, 0 duplication, 0 security hotspots.