Repository navigation
fix(theme): show the not-allowed cursor on disabled fields - #338
Merged
Merged
Conversation
The shared field surface set `pointer-events: none` on a disabled field, which also hid its own `not-allowed` cursor. Drop it, give the nested `.input-field` and `.textarea-field` a `:disabled` cursor, and keep a disabled textarea's resize handle off with `resize: none`. Update the Disabled passages on the Input, Input Date, OTP and Textarea pages to match, point the Textarea addon advice at `aria-describedby` instead of an `aria-label`, and set `aria-invalid` in the Storybook Textarea. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…ssages Credit the native `disabled` attribute with turning the resize handle off, since the rule keys on `:disabled`, and say in the changeset that the recipe no longer blocks clicks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
alexgrozav
marked this pull request as ready for review
October 19, 2026 07:12
This was referenced Oct 19, 2026
This branch was successfully deployed
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.
Description
The shared field surface set
pointer-events: noneon a disabled field. That also hid the field's ownnot-allowedcursor, so a disabled Input, Textarea, Input Date or OTP cell showed a plain arrow. This drops it fromfieldSurfaceCompoundVariants, which reachesuseInputRecipe,useTextareaRecipe,useInputDateRecipeanduseOtpCellRecipe.useFieldSelectorreset now gives a disabled.input-fieldand.textarea-fieldcursor: not-allowed, so the inner control shows it even without the sanitize preset.pointer-events: noneused to keep that promise, so the textarea setup now adds.textarea .textarea-field:disabled { resize: none }. It has the same specificity as the-resize-*selectors and comes after them, so it wins on every axis.aria-describedbyinstead of anaria-label, because anaria-labelreplaces the visible label as the field's name (WCAG 2.5.3).Textarea.vuesetsaria-invalid="true"wheninvalidis set, and no attribute otherwise, likeOtp.vue.A disabled field can now darken its border on hover, at 0.5 opacity. The per-color
:hoverrules are atomic classes, so the disabled state can't cancel them without a wider change.Related issue
None in this repository.
Type of change
Checklist
feat(theme): …)pnpm build:nodocs && pnpm lint && pnpm typecheck && pnpm testand everything passespnpm changeset) for changes to publishable packages, or this change only touches docs/storybook/app/playground/testsdist/,.styleframe/)mainand stays focused in scopeNotes / screenshots
What ran:
pnpm build:nodocs,pnpm --filter @styleframe/theme test(3358 passed),pnpm typecheck,oxlintandoxfmt --checkon the touched files, the Storybook build andvue-tsc -p tsconfig.app.json(18 errors, the same asmain),pnpm build:docsandpnpm --filter @styleframe/docs test:build. The fullpnpm lintandpnpm testdidn't run, so that box stays unticked.In the built Storybook, each disabled story (Textarea, Input, Input Date, OTP) computes
cursor: not-allowedat the field's centre, the wrappers computepointer-events: auto, and the disabled textarea computesresize: none. The Textarea Invalid story hasaria-invalid="true"and Default has none.🤖 Generated with Claude Code