Skip to content

feat!: 0.5.0 one css override API and cleanup - #84

Merged
ROBJkE merged 4 commits into
masterfrom
ccr-51512907-w98cka
Oct 31, 2026
Merged

ROBJkE merged 4 commits into
masterfrom
ccr-51512907-w98cka

Conversation

@ROBJkE

@ROBJkE ROBJkE commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Acts on the code-quality and architecture review of 0.4.1. Breaking for
consuming apps; migrate with .agents/skills/fyrst-ui-0.5-migration.

Styling

  • Component styles stay as cva/sva next to each component (the
    config-recipe approach from the first commit was reverted). Panda
    warnings drop from 50 to 14.
  • Every component takes a slot-keyed css prop (CssMap); it replaces
    classRoot/classIcon/classContent/classClose, classes, classWrapper,
    classCarousel and classTrigger. CardRoot borderColor is removed.
    Overrides must be static (css.raw literals) so Panda can extract them.
  • New tokens (additions only, existing tokens unchanged): semantic colors
    surface, surface.raised, border, border.hover, border.subtle and
    text.muted replace most _light blocks; brand.50/200 replace hex
    literals in Button. Light mode: helper text grey.600 (was grey.500),
    checkbox/radio hover border grey.300 (was grey.400).

Safety and a11y

  • Content props still render as HTML (v-html), as in 0.4.x. The
    text-by-default change from the first commit was reverted; the README
    now documents which props render HTML and that apps must sanitize
    untrusted strings (or use the escaping slots). Button's title
    attribute strips tags from the label.
  • Flyout rebuilt on Reka Popover (Escape, outside click, focus, pin on
    click while hover-open). Carousel wheel capture is opt-in.
  • Disabled link buttons drop href; FieldError role/aria-live conflict
    fixed; required mark is aria-hidden.

Fixes and cleanup

  • Published package loads in plain Node (forceImportExtension);
    vue/* require resolves .cjs; style.css is icons only again.
  • useFormData reads on demand and accepts refs; useFieldControl
    replaces seven copies of control wiring; typed CarouselContextKey.
  • Test codegen runs once in globalSetup; lint covers tests and build
    scripts; typecheck runs in CI; peer floors stay at the tested versions; dead files and
    scripts removed.

Verified: lint, typecheck, build, 74 component + 28 Nuxt/consumer
tests, playground build.

…e API

Acts on the code-quality and architecture review of 0.4.1. Breaking for
consuming apps; migrate with .agents/skills/fyrst-ui-0.5-migration.

Styling
- Component styles are Panda config recipes (fy*) in
  packages/preset/src/recipes, registered by a library-only
  componentsPreset with staticCss. The token-only design-preset is
  unchanged. Panda warnings drop from 50 to 2.
- Every component takes a slot-keyed `css` prop (CssMap); it replaces
  classRoot/classIcon/classContent/classClose, classes, classWrapper,
  classCarousel and classTrigger. CardRoot borderColor is removed.
- Semantic colors surface, border and text.muted replace most _light
  blocks; brand.50/200 replace hex literals in Button.
- Guard test for Panda's recipe base sub-layer: no !important in base,
  and reviewed base/variant overlaps only (caught a focused invalid
  field showing the primary border, and 0px indeterminate progress).

Safety and a11y
- Content props render as text; `html` opts in through one RichText
  component. vue/no-v-html is on again.
- Flyout rebuilt on Reka Popover (Escape, outside click, focus, pin on
  click while hover-open). Carousel wheel capture is opt-in.
- Disabled link buttons drop href; FieldError role/aria-live conflict
  fixed; required mark is aria-hidden.

Fixes and cleanup
- Published package loads in plain Node (forceImportExtension);
  vue/* require resolves .cjs; style.css is icons only again.
- useFormData reads on demand and accepts refs; useFieldControl
  replaces seven copies of control wiring; typed CarouselContextKey.
- Test codegen runs once in globalSetup; lint covers tests and build
  scripts; typecheck runs in CI; peer ranges widened; dead files and
  scripts removed.

Verified: lint, typecheck, build, 75 component + 28 Nuxt/consumer
tests, playground build, and a computed-style diff against 0.4.1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R1C6tazHHpKbPFLceHczXa
Reverts the move to Panda config recipes from the previous commit before
0.5.0 is released. Config recipes renamed every component class
(fy-button--size_md), which breaks app snapshots, selectors, and CSS
that target the library's atomic classes, and Panda's lower base
sub-layer for recipes caused two regressions during verification.

- Component styles are static cva/sva definitions again, next to each
  component (and in internal/controls for the bare controls). They keep
  the 0.5.0 token cleanup and the styles that used to be inline css()
  ternaries. componentsPreset, staticCss and the ./recipes exports are
  gone; the token-only preset is unchanged.
- The css prop stays on every component. withCss now merges the
  component's style object with the override (css(style, override)), so
  an overridden property gets one class and the override wins. A test
  fails if overrides are appended instead of merged.
- Consumer tests check atomic CSS again and keep the css.raw() vs bare
  object extraction check.
- README, AGENTS.md, CHANGELOG, the 0.5.0 changelog note (renamed) and
  the migration skill describe the cva/sva model.

Verified: lint, typecheck, build, 74 component + 28 Nuxt/consumer
tests, playground build, and a computed-style diff against 0.4.1 with
the same result as before (field focus/hover states identical).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R1C6tazHHpKbPFLceHczXa
@ROBJkE ROBJkE changed the title feat!: 0.5.0 config recipes, text-by-default content, one css override API feat!: 0.5.0 text-by-default content, one css override API Oct 31, 2026
Content props go back to v-html, as in 0.4.x: Button label, CardHeader
title/subtitle, HeroLead headline/description, list items and
PricingCard features, accordion items, tab labels, FlyoutRoot label,
and field message/error. Sanitizing untrusted strings is the consuming
app's responsibility, not the library's.

- Remove internal/RichText.vue and every `html` prop, including the
  Field context flag and the TabItemData / PricingCardData fields.
- ESLint vue/no-v-html is off again, with the reason documented.
- Keep one improvement: Button's title attribute strips tags from the
  label instead of showing raw markup.
- README documents which props render HTML, that apps must sanitize
  them, and which ones have an escaping slot alternative. AGENTS.md,
  CHANGELOG, the 0.5.0 changelog note (renamed) and the migration skill
  no longer describe a text-by-default change.
- Tests assert HTML rendering; playground drops the html attributes.

Verified: lint, typecheck, build, 74 component + 28 Nuxt/consumer
tests, playground build, SSR output renders the markup.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R1C6tazHHpKbPFLceHczXa
@ROBJkE ROBJkE changed the title feat!: 0.5.0 text-by-default content, one css override API feat!: 0.5.0 one css override API and cleanup Oct 31, 2026
Revert the widened peer ranges to the versions the library is tested
against (vue ^3.5.44, reka-ui ^2.11.0, nuxt/@nuxt/kit ^4.6.3,
typescript ^5.9.3), as in 0.4.x. Update CHANGELOG and the 0.5 migration
skill accordingly.
@ROBJkE
ROBJkE merged commit a895222 into master Oct 31, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants