Repository navigation
feat!: 0.5.0 one css override API and cleanup - #84
Merged
Merged
Conversation
…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
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
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
cva/svanext to each component (theconfig-recipe approach from the first commit was reverted). Panda
warnings drop from 50 to 14.
cssprop (CssMap); it replacesclassRoot/classIcon/classContent/classClose, classes, classWrapper,
classCarousel and classTrigger. CardRoot borderColor is removed.
Overrides must be static (
css.rawliterals) so Panda can extract them.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
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.
click while hover-open). Carousel wheel capture is opt-in.
fixed; required mark is aria-hidden.
Fixes and cleanup
vue/* require resolves .cjs; style.css is icons only again.
replaces seven copies of control wiring; typed CarouselContextKey.
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.