feat(badge): support styles#1295
Conversation
Greptile SummaryThis PR refactors the Key changes:
Confidence Score: 5/5Safe to merge — clean architectural refactoring with no logic changes or regressions found All changes are a straightforward extraction of visual utilities from the TypeScript directive into per-theme CSS files. The directive retains its structural and accessibility classes unchanged. The template file is kept in sync with the source. The icon-selector migration from [&>svg]:size-3! to [&>ng-icon]:text-[--spacing(n)] is semantically equivalent for the ng-icon component model, and the mira-specific smaller spacing value is correct. No P0 or P1 issues were found across any of the 9 changed files. No files require special attention Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[hlmBadge Directive] -->|applies| B["spartan-badge\n(structural + a11y classes)"]
A -->|applies variant class| C{variant input}
C --> D[spartan-badge-variant-default]
C --> E[spartan-badge-variant-secondary]
C --> F[spartan-badge-variant-destructive]
C --> G[spartan-badge-variant-outline]
C --> H[spartan-badge-variant-ghost]
C --> I[spartan-badge-variant-link]
subgraph "Theme CSS Files (per theme)"
J[style-vega.css]
K[style-nova.css]
L[style-maia.css]
M[style-mira.css]
N[style-lyra.css]
end
D & E & F & G & H & I --> J
D & E & F & G & H & I --> K
D & E & F & G & H & I --> L
D & E & F & G & H & I --> M
D & E & F & G & H & I --> N
Reviews (1): Last reviewed commit: "chore: copy helm badge to cli" | Re-trigger Greptile |
PR Checklist
Please check if your PR fulfills the following requirements:
guidelines: https://github.com/spartan-ng/spartan/blob/main/CONTRIBUTING.md#-commit-message-guidelines
PR Type
What kind of change does this PR introduce?
Which package are you modifying?
Primitives
Others
What is the current behavior?
Closes #
What is the new behavior?
Does this PR introduce a breaking change?
Other information