← ClaudeAtlas

lonja-buttonslisted

Enforces the CatchLaw action ladder, buttons as printed stamps — one primary per screen and never two, LonjaButtonVariant primary a solid harbour 1B4D5E field at radius 0, secondary an ink outline, quiet a rule-grey outline, destructive oxblood 7A2320 behind a confirmation, link only in prose, zero elevation and NoSplash.splashFactory instead of shadows, a default, hover, focus, pressed, disabled and busy matrix resolved in WidgetStateProperty, 56dp regular and 46dp compact heights glove mode floors to 66dp, 44dp IconButton carrying a real semanticLabel, a busy latch so a double tap never writes two rows, and a verb label naming exactly what happens. Use when adding a button, styling ElevatedButton, FilledButton, TextButton, IconButton or SegmentedButton, editing lib/ui/core/lonja_button.dart, wiring onPressed to a Notifier, choosing between primary and quiet, adding a destructive affordance, or reviewing any tappable in a diff.
zakariaf/CatchLaw · ★ 0 · Code & Development · score 55
Install: claude install-skill zakariaf/CatchLaw
# Lonja Buttons A Lonja button is a **stamp pressed onto paper, never a pill floating above it** — no shadow, no ripple, no gradient, radius at most 2dp, its whole hierarchy carried by field, rule weight and label. This skill owns the action ladder and how many of each is earned, the six-state matrix, target sizes under glove mode, the icon and label slots, destructive confirmation, and label wording. It does not own token values, the tap-target floor, async guards, or the dialog a destructive action opens. Read the reference for the task at hand: - `references/variant-ladder-and-states.md` — the five variants, what earns each, the six-state matrix, paper/night/sunlight resolution, glove metrics, disabled and busy semantics. - `references/button-anatomy.md` — box metrics, icon and label slots, the label wording table, icon-only rules, button rows, the SegmentedButton boundary. Run `scripts/check_lonja_buttons.sh` before a PR. The 44dp tap-target floor and `Semantics(button: true)` are owned by `accessibility-as-code`; the dropped-`Future` hole in `onPressed: () => vm.record(fish)` is owned by `async-safety`; the confirmation dialog itself is owned by `lonja-dialogs-and-surfaces`; the hex behind every slot is owned by `lonja-design-tokens`. This skill governs the button that reads them. ## Non-negotiable rules 1. **ONE primary action per screen. Never two.** Exactly one `LonjaButtonVariant.primary` may be built per route; every other action steps down to `secondary`, `qu