design-angular-kit
design-angular-kit copied to clipboard
fix(components): add inputToBoolean transform to all pure-boolean inputs (#546)
Summary
Fixes #546
Applies the inputToBoolean transform (which wraps Angular's built-in booleanAttribute) to every @Input that accepts only boolean values but was missing the coercion. This allows idiomatic attribute-only syntax:
<it-chip showCloseButton="true" disabled="true">
<it-chip showCloseButton disabled>
Components updated
| Component | Inputs |
|---|---|
ItAutocompleteComponent |
required |
ItPasswordInputComponent |
required, useNumber, useCapitalCase, useSmallCase, useSpecialCharacters |
ItChipComponent |
showCloseButton (setter), disabled (setter) |
ItDimmerComponent |
active (setter) |
ItDimmerButtonsComponent |
hasOneButton (setter) |
Intentionally excluded
Union-type inputs that accept non-boolean string values are not modified:
readonly: boolean | 'plaintext'progress: number | booleanbackdrop: 'static' | booleanvalidationMode: boolean | 'only-valid' | 'only-invalid'
Testing
- New coercion tests for chip (
showCloseButton/disabledattribute-only + string coercion) - New coercion test for dimmer (
activeattribute-only) - All 113 tests passing (double gate). 0 lint errors.
⚠️ This reopens #652 which was accidentally closed due to fork deletion.
The latest updates on your projects. Learn more about Vercel for GitHub.
| Project | Deployment | Actions | Updated (UTC) |
|---|---|---|---|
| design-angular-kit | Preview | Mar 28, 2026 4:01pm |
@giulio-leone credo ci siano altri input che possono passare a booleanAttribute. Ne ricordo alcuni sulla <it-card>