Repository navigation
@hanzo/ui 8.33.0: the sign-in card and its rules, shared with hanzo.ai's own sign-in - #320
Merged
Merged
Conversation
…i's own sign-in SignInCard (src/auth/look.tsx) carries the card and the stylesheet the panel drew, exported from @hanzo/ui/auth/panel and @hanzo/ui/auth with SIGNIN_STYLE. SignInPanel is drawn on it, and hanzo-inc/app's sign-in can be too. Inside the card the library's Input, InputGroup and Action take the 46px look without being marked.
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.
hanzo.ai/login and /signup (hanzo-inc/app) are where every Hanzo site's sign-in hands off to. They still draw the old stacked 56px pills, so they look different from the
SignInPanelthat sends people there and from hanzo.app's front page.This moves the panel's card and stylesheet into
SignInCard(src/auth/look.tsx), exported from@hanzo/ui/auth/paneland@hanzo/ui/authwithSIGNIN_STYLE. hanzo-inc/app's own sign-in can then be drawn by the same rules instead of keeping a copy.SignInPanelis drawn onSignInCard. What it renders is unchanged except the rules' scope: they now sit under[data-signin]instead of[data-slot="signin-panel"], and the card keepsdata-slot="signin-panel".SignInCardtakesbackground,borderColorandbareas before. It also takesslot(thedata-slota host finds it by) and any stack prop, such asrender="section",aria-label,refandgap.InputorInputGroupbecomes the 46px field with 14px corners. AnActionbecomes the 46px control, and a filled one becomes the solid control. A host's later steps (code, password, phone) follow without marking each control.:not(#_)weight so they outrank gui's per-theme atomic classes (a filled Action's light-theme shadow). The Action's corners are!importantbecause hanzo-inc/app holds every Action round with an!importantrule of its own.Checks
vitest run src/auth/: 24 passed. New cases check that the card is a host's region (its slot,section,aria-label), that every rule stays under[data-signin], and, in jsdom, that the selectors reach a lone Input, a password Input, an InputGroup's box (not the Input inside it) and a filled Action.tsc --noEmit: no errors insrc/auth/.