@hanzo/ui 8.32.3 → 8.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth/SignInPanel.cjs +10 -8
- package/dist/auth/SignInPanel.d.ts +17 -10
- package/dist/auth/SignInPanel.d.ts.map +1 -1
- package/dist/auth/SignInPanel.js +12 -10
- package/dist/auth/SignInPanel.js.map +1 -1
- package/dist/auth/index.cjs +4 -1
- package/dist/auth/index.d.ts +1 -0
- package/dist/auth/index.d.ts.map +1 -1
- package/dist/auth/index.js +1 -0
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/look.cjs +67 -0
- package/dist/auth/look.d.ts +59 -0
- package/dist/auth/look.d.ts.map +1 -0
- package/dist/auth/look.js +64 -0
- package/dist/auth/look.js.map +1 -0
- package/dist/auth/panel.cjs +6 -2
- package/dist/auth/panel.d.ts +3 -1
- package/dist/auth/panel.d.ts.map +1 -1
- package/dist/auth/panel.js +3 -1
- package/dist/auth/panel.js.map +1 -1
- package/dist/gallery.html +1 -1
- package/package.json +1 -1
|
@@ -7,11 +7,9 @@ const react_1 = require("react");
|
|
|
7
7
|
const react_2 = require("@hanzo/i18n/react");
|
|
8
8
|
const react_3 = require("@hanzo/iam/react");
|
|
9
9
|
const react_simple_icons_1 = require("@icons-pack/react-simple-icons");
|
|
10
|
-
const button_1 = require("../backends/gui/button.cjs");
|
|
11
|
-
const field_1 = require("../backends/gui/field.cjs");
|
|
12
|
-
const input_1 = require("../backends/gui/input.cjs");
|
|
13
10
|
const layout_1 = require("../backends/gui/layout.cjs");
|
|
14
11
|
const handoff_1 = require("./handoff.cjs");
|
|
12
|
+
const look_1 = require("./look.cjs");
|
|
15
13
|
const NAME = { google: 'Google', github: 'GitHub' };
|
|
16
14
|
function SignInPanel(props) {
|
|
17
15
|
return props.request ? (0, jsx_runtime_1.jsx)(Panel, { ...props, mint: props.request }) : (0, jsx_runtime_1.jsx)(UnderProvider, { ...props });
|
|
@@ -21,9 +19,10 @@ function UnderProvider(props) {
|
|
|
21
19
|
const { sdk } = (0, react_3.useIam)();
|
|
22
20
|
return (0, jsx_runtime_1.jsx)(Panel, { ...props, mint: (params) => sdk.getSigninUrl(params) });
|
|
23
21
|
}
|
|
24
|
-
function Panel({ title, line, providers = ['google', 'github'], signin = handoff_1.SIGNIN, signup =
|
|
22
|
+
function Panel({ title, line, providers = ['google', 'github'], signin = handoff_1.SIGNIN, signup = false, termsHref = 'https://hanzo.ai/terms', privacyHref = 'https://hanzo.ai/privacy', authorize = (u) => u, track, mint, background = '$background', borderColor = '$borderColor', bare = false, }) {
|
|
25
23
|
const { t } = (0, react_2.useI18n)();
|
|
26
24
|
const [email, setEmail] = (0, react_1.useState)('');
|
|
25
|
+
const [emailOpen, setEmailOpen] = (0, react_1.useState)(false);
|
|
27
26
|
const [busy, setBusy] = (0, react_1.useState)(null);
|
|
28
27
|
const [wrong, setWrong] = (0, react_1.useState)(null);
|
|
29
28
|
/** Mint this site's own request, then leave for where `way` goes. */
|
|
@@ -49,9 +48,12 @@ function Panel({ title, line, providers = ['google', 'github'], signin = handoff
|
|
|
49
48
|
}
|
|
50
49
|
void leave('email', { kind: 'email', email: typed }, typed);
|
|
51
50
|
}
|
|
52
|
-
const
|
|
53
|
-
return ((0, jsx_runtime_1.jsxs)(
|
|
54
|
-
|
|
55
|
-
|
|
51
|
+
const emailLabel = t(busy === 'email' ? 'One moment…' : 'Continue with email');
|
|
52
|
+
return ((0, jsx_runtime_1.jsxs)(look_1.SignInCard, { background: background, borderColor: borderColor, bare: bare, children: [title ? ((0, jsx_runtime_1.jsx)(layout_1.Heading, { render: "h1", size: "$8", fontWeight: "500", color: "$ink", m: 0, text: "center", children: title })) : null, line ? ((0, jsx_runtime_1.jsx)(layout_1.Paragraph, { size: "$3", color: "$quiet", m: 0, text: "center", maxW: 360, children: line })) : null, (0, jsx_runtime_1.jsxs)("div", { "data-signin-body": "", style: title || line ? { marginTop: 12 } : undefined, children: [providers.length ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { "data-signin-pair": "", children: providers.map((p) => ((0, jsx_runtime_1.jsxs)("button", { "data-signin-btn": "", type: "button", disabled: busy !== null, onClick: () => void leave(p, { kind: 'provider', provider: p }), children: [p === 'google' ? (0, jsx_runtime_1.jsx)(react_simple_icons_1.SiGoogle, { size: 17, "aria-hidden": true }) : (0, jsx_runtime_1.jsx)(react_simple_icons_1.SiGithub, { size: 17, "aria-hidden": true }), t('Continue with {provider}', { provider: NAME[p] })] }, p))) }), (0, jsx_runtime_1.jsx)("div", { "data-signin-or": "", children: t('or') })] })) : null, emailOpen ? ((0, jsx_runtime_1.jsxs)("form", { "data-signin-form": "", onSubmit: withEmail, noValidate: true, children: [(0, jsx_runtime_1.jsx)("input", { id: "hanzo-signin-email", "data-signin-field": "", type: "email", name: "email", autoComplete: "username", "aria-label": t('Email'), "aria-invalid": wrong ? true : undefined, value: email, onChange: (e) => setEmail(e.target.value), placeholder: "you@company.com", autoFocus: true }), wrong ? ((0, jsx_runtime_1.jsx)("p", { "data-signin-wrong": "", role: "alert", children: t(wrong) })) : null, (0, jsx_runtime_1.jsx)("button", { "data-signin-btn": "", "data-solid": "", type: "submit", disabled: busy !== null, children: emailLabel })] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [wrong ? ((0, jsx_runtime_1.jsx)("p", { "data-signin-wrong": "", role: "alert", children: t(wrong) })) : null, (0, jsx_runtime_1.jsx)("button", { "data-signin-btn": "", "data-solid": "", type: "button", disabled: busy !== null, onClick: () => {
|
|
53
|
+
setWrong(null);
|
|
54
|
+
setEmailOpen(true);
|
|
55
|
+
}, children: emailLabel })] }))] }), signup ? ((0, jsx_runtime_1.jsxs)("p", { "data-signin-quiet": "", children: [`${t('New to Hanzo?')} `, (0, jsx_runtime_1.jsx)("button", { type: "button", disabled: busy !== null, onClick: () => void leave('signup', { kind: 'signup' }), children: t('Create account') })] })) : null, (0, jsx_runtime_1.jsx)("p", { "data-signin-terms": "", children: t("By continuing, you agree to Hanzo's {terms} and {privacy}.", {
|
|
56
|
+
terms: (0, jsx_runtime_1.jsx)("a", { href: termsHref, children: t('Terms') }),
|
|
57
|
+
privacy: (0, jsx_runtime_1.jsx)("a", { href: privacyHref, children: t('Privacy Policy') }),
|
|
56
58
|
}) })] }));
|
|
57
59
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import { YStack } from '../backends/gui/layout.js';
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
3
2
|
import { type ProviderKind } from './handoff.js';
|
|
3
|
+
import { type SignInCardProps } from './look.js';
|
|
4
4
|
/**
|
|
5
5
|
* The sign-in a Hanzo site draws on its own front page (hanzo.app, hanzo.bot,
|
|
6
6
|
* hanzo.team), shared so every site asks the same way and leaves the same way.
|
|
@@ -13,15 +13,22 @@ import { type ProviderKind } from './handoff.js';
|
|
|
13
13
|
* hanzo.ai/signup. The session that answers is hanzo.ai's, so a person signed in
|
|
14
14
|
* on any Hanzo site is not asked again.
|
|
15
15
|
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
16
|
+
* It is drawn as hanzo.app's own front-page sign-in (hanzo-inc/app
|
|
17
|
+
* components/auth/steps.tsx `HERO_STYLE`), rule for rule, so the sites read as one
|
|
18
|
+
* product's: the providers side by side, then one solid Continue with email that
|
|
19
|
+
* opens the address field when pressed, and no sign-up line (hanzo.ai/login offers
|
|
20
|
+
* one). The card and its rules are ./look.tsx's `SignInCard`, which hanzo.ai's
|
|
21
|
+
* own sign-in (/login, /signup) is drawn on too, so the door and the page it
|
|
22
|
+
* opens onto read alike: the host mounts its GuiProvider and imports no sheet.
|
|
23
|
+
* Framework-free: a Next export and a Vite app draw it alike.
|
|
19
24
|
*
|
|
20
25
|
* It stands on its own card, a solid ground inside a hairline, since a front page
|
|
21
26
|
* draws it over a busy backdrop (hanzo.team's dot field showed through the
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
27
|
+
* buttons and the field). The card is the site's to colour (`background`,
|
|
28
|
+
* `borderColor`: a theme token or any CSS colour), and `bare` drops it for a host
|
|
29
|
+
* that sets the panel in a card of its own. Inside the card the controls keep
|
|
30
|
+
* hanzo.app's 400px measure, so the card is 464px wide; under 380px of room the
|
|
31
|
+
* providers stack.
|
|
25
32
|
*/
|
|
26
33
|
export interface SignInPanelProps {
|
|
27
34
|
/** The headline: `Sign in to Hanzo Team`. Omit to draw the panel alone under the host's own. */
|
|
@@ -32,7 +39,7 @@ export interface SignInPanelProps {
|
|
|
32
39
|
providers?: ProviderKind[];
|
|
33
40
|
/** The origin people sign in on. Default https://hanzo.ai. */
|
|
34
41
|
signin?: string;
|
|
35
|
-
/** Offer "Create account". Default
|
|
42
|
+
/** Offer "Create account" under the form. Default false: hanzo.app's sign-in has none, and hanzo.ai/login offers it. */
|
|
36
43
|
signup?: boolean;
|
|
37
44
|
termsHref?: string;
|
|
38
45
|
privacyHref?: string;
|
|
@@ -58,7 +65,7 @@ type Mint = (params?: {
|
|
|
58
65
|
additionalParams?: Record<string, string>;
|
|
59
66
|
}) => Promise<string>;
|
|
60
67
|
/** A colour the card takes, as the stack it is drawn on takes one. */
|
|
61
|
-
type Paint =
|
|
68
|
+
type Paint = SignInCardProps['background'];
|
|
62
69
|
export declare function SignInPanel(props: SignInPanelProps): import("react").JSX.Element;
|
|
63
70
|
export {};
|
|
64
71
|
//# sourceMappingURL=SignInPanel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignInPanel.d.ts","sourceRoot":"","sources":["../../src/auth/SignInPanel.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"SignInPanel.d.ts","sourceRoot":"","sources":["../../src/auth/SignInPanel.tsx"],"names":[],"mappings":"AAEA,OAAO,EAA4B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAKhE,OAAO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/SignInPanel.js
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useState } from 'react';
|
|
4
4
|
import { useI18n } from '@hanzo/i18n/react';
|
|
5
5
|
import { useIam } from '@hanzo/iam/react';
|
|
6
6
|
import { SiGithub, SiGoogle } from '@icons-pack/react-simple-icons';
|
|
7
|
-
import {
|
|
8
|
-
import { Field, FieldError, FieldSeparator } from '../backends/gui/field.js';
|
|
9
|
-
import { Input } from '../backends/gui/input.js';
|
|
10
|
-
import { Anchor, Heading, Paragraph, YStack } from '../backends/gui/layout.js';
|
|
7
|
+
import { Heading, Paragraph } from '../backends/gui/layout.js';
|
|
11
8
|
import { address, handoff, SIGNIN } from './handoff.js';
|
|
9
|
+
import { SignInCard } from './look.js';
|
|
12
10
|
const NAME = { google: 'Google', github: 'GitHub' };
|
|
13
11
|
export function SignInPanel(props) {
|
|
14
12
|
return props.request ? _jsx(Panel, { ...props, mint: props.request }) : _jsx(UnderProvider, { ...props });
|
|
@@ -18,9 +16,10 @@ function UnderProvider(props) {
|
|
|
18
16
|
const { sdk } = useIam();
|
|
19
17
|
return _jsx(Panel, { ...props, mint: (params) => sdk.getSigninUrl(params) });
|
|
20
18
|
}
|
|
21
|
-
function Panel({ title, line, providers = ['google', 'github'], signin = SIGNIN, signup =
|
|
19
|
+
function Panel({ title, line, providers = ['google', 'github'], signin = SIGNIN, signup = false, termsHref = 'https://hanzo.ai/terms', privacyHref = 'https://hanzo.ai/privacy', authorize = (u) => u, track, mint, background = '$background', borderColor = '$borderColor', bare = false, }) {
|
|
22
20
|
const { t } = useI18n();
|
|
23
21
|
const [email, setEmail] = useState('');
|
|
22
|
+
const [emailOpen, setEmailOpen] = useState(false);
|
|
24
23
|
const [busy, setBusy] = useState(null);
|
|
25
24
|
const [wrong, setWrong] = useState(null);
|
|
26
25
|
/** Mint this site's own request, then leave for where `way` goes. */
|
|
@@ -46,10 +45,13 @@ function Panel({ title, line, providers = ['google', 'github'], signin = SIGNIN,
|
|
|
46
45
|
}
|
|
47
46
|
void leave('email', { kind: 'email', email: typed }, typed);
|
|
48
47
|
}
|
|
49
|
-
const
|
|
50
|
-
return (_jsxs(
|
|
51
|
-
|
|
52
|
-
|
|
48
|
+
const emailLabel = t(busy === 'email' ? 'One moment…' : 'Continue with email');
|
|
49
|
+
return (_jsxs(SignInCard, { background: background, borderColor: borderColor, bare: bare, children: [title ? (_jsx(Heading, { render: "h1", size: "$8", fontWeight: "500", color: "$ink", m: 0, text: "center", children: title })) : null, line ? (_jsx(Paragraph, { size: "$3", color: "$quiet", m: 0, text: "center", maxW: 360, children: line })) : null, _jsxs("div", { "data-signin-body": "", style: title || line ? { marginTop: 12 } : undefined, children: [providers.length ? (_jsxs(_Fragment, { children: [_jsx("div", { "data-signin-pair": "", children: providers.map((p) => (_jsxs("button", { "data-signin-btn": "", type: "button", disabled: busy !== null, onClick: () => void leave(p, { kind: 'provider', provider: p }), children: [p === 'google' ? _jsx(SiGoogle, { size: 17, "aria-hidden": true }) : _jsx(SiGithub, { size: 17, "aria-hidden": true }), t('Continue with {provider}', { provider: NAME[p] })] }, p))) }), _jsx("div", { "data-signin-or": "", children: t('or') })] })) : null, emailOpen ? (_jsxs("form", { "data-signin-form": "", onSubmit: withEmail, noValidate: true, children: [_jsx("input", { id: "hanzo-signin-email", "data-signin-field": "", type: "email", name: "email", autoComplete: "username", "aria-label": t('Email'), "aria-invalid": wrong ? true : undefined, value: email, onChange: (e) => setEmail(e.target.value), placeholder: "you@company.com", autoFocus: true }), wrong ? (_jsx("p", { "data-signin-wrong": "", role: "alert", children: t(wrong) })) : null, _jsx("button", { "data-signin-btn": "", "data-solid": "", type: "submit", disabled: busy !== null, children: emailLabel })] })) : (_jsxs(_Fragment, { children: [wrong ? (_jsx("p", { "data-signin-wrong": "", role: "alert", children: t(wrong) })) : null, _jsx("button", { "data-signin-btn": "", "data-solid": "", type: "button", disabled: busy !== null, onClick: () => {
|
|
50
|
+
setWrong(null);
|
|
51
|
+
setEmailOpen(true);
|
|
52
|
+
}, children: emailLabel })] }))] }), signup ? (_jsxs("p", { "data-signin-quiet": "", children: [`${t('New to Hanzo?')} `, _jsx("button", { type: "button", disabled: busy !== null, onClick: () => void leave('signup', { kind: 'signup' }), children: t('Create account') })] })) : null, _jsx("p", { "data-signin-terms": "", children: t("By continuing, you agree to Hanzo's {terms} and {privacy}.", {
|
|
53
|
+
terms: _jsx("a", { href: termsHref, children: t('Terms') }),
|
|
54
|
+
privacy: _jsx("a", { href: privacyHref, children: t('Privacy Policy') }),
|
|
53
55
|
}) })] }));
|
|
54
56
|
}
|
|
55
57
|
//# sourceMappingURL=SignInPanel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignInPanel.js","sourceRoot":"","sources":["../../src/auth/SignInPanel.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"SignInPanel.js","sourceRoot":"","sources":["../../src/auth/SignInPanel.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,EAAE,QAAQ,EAAkC,MAAM,OAAO,CAAA;AAChE,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAA;AACnE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAC3D,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAA+B,MAAM,WAAW,CAAA;AACjF,OAAO,EAAE,UAAU,EAAwB,MAAM,QAAQ,CAAA;AAoEzD,MAAM,IAAI,GAAiC,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AAA;gCACpB,CAAC,YAEA,UAAU,GACJ,IACR,CACJ,IACG,EACL,MAAM,CAAC,CAAC,CAAC,CACR,kCAAqB,EAAE,aACpB,GAAG,CAAC,CAAC,eAAe,CAAC,GAAG,EACzB,iBAAQ,IAAI,EAAC,QAAQ,EAAC,QAAQ,EAAE,IAAI,KAAK,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,KAAK,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,YACnG,CAAC,CAAC,gBAAgB,CAAC,GACb,IACP,CACL,CAAC,CAAC,CAAC,IAAI,EACR,iCAAqB,EAAE,YACpB,CAAC,CAAC,4DAA4D,EAAE;oBAC/D,KAAK,EAAE,YAAG,IAAI,EAAE,SAAS,YAAG,CAAC,CAAC,OAAO,CAAC,GAAK;oBAC3C,OAAO,EAAE,YAAG,IAAI,EAAE,WAAW,YAAG,CAAC,CAAC,gBAAgB,CAAC,GAAK;iBACzD,CAAC,GACA,IACO,CACd,CAAA;AACH,CAAC"}
|
package/dist/auth/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.refresher = exports.live = exports.bearer = exports.useSignOut = exports.signOut = exports.SIGNIN = exports.handoff = exports.address = exports.SignInPanel = exports.SignIn = void 0;
|
|
3
|
+
exports.refresher = exports.live = exports.bearer = exports.useSignOut = exports.signOut = exports.SignInCard = exports.SIGNIN_STYLE = exports.SIGNIN = exports.handoff = exports.address = exports.SignInPanel = exports.SignIn = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Signing in, signing out, and the session, for every Hanzo site: IAM answers
|
|
6
6
|
* (/v1/iam), the site draws.
|
|
@@ -13,6 +13,9 @@ var handoff_1 = require("./handoff.cjs");
|
|
|
13
13
|
Object.defineProperty(exports, "address", { enumerable: true, get: function () { return handoff_1.address; } });
|
|
14
14
|
Object.defineProperty(exports, "handoff", { enumerable: true, get: function () { return handoff_1.handoff; } });
|
|
15
15
|
Object.defineProperty(exports, "SIGNIN", { enumerable: true, get: function () { return handoff_1.SIGNIN; } });
|
|
16
|
+
var look_1 = require("./look.cjs");
|
|
17
|
+
Object.defineProperty(exports, "SIGNIN_STYLE", { enumerable: true, get: function () { return look_1.SIGNIN_STYLE; } });
|
|
18
|
+
Object.defineProperty(exports, "SignInCard", { enumerable: true, get: function () { return look_1.SignInCard; } });
|
|
16
19
|
var signout_1 = require("./signout.cjs");
|
|
17
20
|
Object.defineProperty(exports, "signOut", { enumerable: true, get: function () { return signout_1.signOut; } });
|
|
18
21
|
Object.defineProperty(exports, "useSignOut", { enumerable: true, get: function () { return signout_1.useSignOut; } });
|
package/dist/auth/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
export { SignIn, type Mode, type Provider, type SignInProps } from './SignIn.js';
|
|
6
6
|
export { SignInPanel, type SignInPanelProps } from './SignInPanel.js';
|
|
7
7
|
export { address, handoff, SIGNIN, type ProviderKind, type Way } from './handoff.js';
|
|
8
|
+
export { SIGNIN_STYLE, SignInCard, type SignInCardProps } from './look.js';
|
|
8
9
|
export { signOut, useSignOut, type SignOutOptions } from './signout.js';
|
|
9
10
|
export { bearer, live, refresher } from './session.js';
|
|
10
11
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/auth/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,MAAM,EAAE,KAAK,IAAI,EAAE,KAAK,QAAQ,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAA;AAC7E,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAClE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,KAAK,GAAG,EAAE,MAAM,WAAW,CAAA;AACjF,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,cAAc,EAAE,MAAM,WAAW,CAAA;AACpE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,MAAM,EAAE,KAAK,IAAI,EAAE,KAAK,QAAQ,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAA;AAC7E,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAClE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,KAAK,GAAG,EAAE,MAAM,WAAW,CAAA;AACjF,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,QAAQ,CAAA;AACvE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,cAAc,EAAE,MAAM,WAAW,CAAA;AACpE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA"}
|
package/dist/auth/index.js
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
export { SignIn } from './SignIn.js';
|
|
6
6
|
export { SignInPanel } from './SignInPanel.js';
|
|
7
7
|
export { address, handoff, SIGNIN } from './handoff.js';
|
|
8
|
+
export { SIGNIN_STYLE, SignInCard } from './look.js';
|
|
8
9
|
export { signOut, useSignOut } from './signout.js';
|
|
9
10
|
export { bearer, live, refresher } from './session.js';
|
|
10
11
|
//# sourceMappingURL=index.js.map
|
package/dist/auth/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,MAAM,EAA8C,MAAM,UAAU,CAAA;AAC7E,OAAO,EAAE,WAAW,EAAyB,MAAM,eAAe,CAAA;AAClE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAA+B,MAAM,WAAW,CAAA;AACjF,OAAO,EAAE,OAAO,EAAE,UAAU,EAAuB,MAAM,WAAW,CAAA;AACpE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,MAAM,EAA8C,MAAM,UAAU,CAAA;AAC7E,OAAO,EAAE,WAAW,EAAyB,MAAM,eAAe,CAAA;AAClE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAA+B,MAAM,WAAW,CAAA;AACjF,OAAO,EAAE,YAAY,EAAE,UAAU,EAAwB,MAAM,QAAQ,CAAA;AACvE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAuB,MAAM,WAAW,CAAA;AACpE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
'use client';"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.SIGNIN_STYLE = void 0;
|
|
5
|
+
exports.SignInCard = SignInCard;
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const layout_1 = require("../backends/gui/layout.cjs");
|
|
8
|
+
const AT = '[data-signin]';
|
|
9
|
+
const FILL = 'var(--popover,var(--panel))';
|
|
10
|
+
const EDGE = 'var(--border,var(--edge))';
|
|
11
|
+
const STRONG = 'var(--border-strong,var(--bound))';
|
|
12
|
+
const INK = 'var(--foreground,var(--ink))';
|
|
13
|
+
const MUTE = 'var(--muted-foreground,var(--quiet))';
|
|
14
|
+
const FONT = 'var(--font-sans,Zen,system-ui,sans-serif)';
|
|
15
|
+
const LIFT = 'transform .2s cubic-bezier(.16,1,.3,1),border-color .2s,background-color .2s,opacity .2s';
|
|
16
|
+
/**
|
|
17
|
+
* Weight enough to outrank gui's atomic classes on this library's own controls,
|
|
18
|
+
* its per-theme ones included (`:root:root.t_light ._bxsh-…`, a filled Action's
|
|
19
|
+
* light shadow): an id's weight, matching every element (none is `#_`).
|
|
20
|
+
*/
|
|
21
|
+
const OVER = ':not(#_)';
|
|
22
|
+
/**
|
|
23
|
+
* This library's Action, wherever it is set in the card. Its corners are stated
|
|
24
|
+
* `!important` too: a host may hold every Action round with an `!important` rule
|
|
25
|
+
* of its own (hanzo-inc/app app/layout.tsx `[data-slot="action"]`), and inside
|
|
26
|
+
* the card this scoped, weightier rule is the one that stands.
|
|
27
|
+
*/
|
|
28
|
+
const ACTION = `:is(button,a)[data-slot="action"]${OVER}`;
|
|
29
|
+
/** This library's Input, alone; inside an InputGroup the group is the box. */
|
|
30
|
+
const INPUT = `input[data-slot="input"]:not([data-slot="input-group"] *)${OVER}`;
|
|
31
|
+
const GROUP = `[data-slot="input-group"]${OVER}`;
|
|
32
|
+
/** Every rule the sign-in's controls are drawn by, scoped to the card. */
|
|
33
|
+
exports.SIGNIN_STYLE = `${AT} [data-signin-body]{container-type:inline-size;display:flex;flex-direction:column;gap:10px;width:100%}` +
|
|
34
|
+
`${AT} [data-signin-pair]{display:grid;grid-template-columns:1fr 1fr;gap:10px;width:100%}` +
|
|
35
|
+
`${AT} [data-signin-pair]>:last-child:nth-child(odd){grid-column:1/-1}` +
|
|
36
|
+
`@container (max-width:379.98px){${AT} [data-signin-pair]{grid-template-columns:1fr}}` +
|
|
37
|
+
`${AT} [data-signin-btn]{box-sizing:border-box;display:flex;align-items:center;justify-content:center;gap:9px;width:100%;height:46px;margin:0;padding:0 14px;border-radius:14px;border:1px solid ${EDGE};background:${FILL};color:${INK};font-family:${FONT};font-size:14px;font-weight:500;line-height:1;white-space:nowrap;cursor:pointer;box-shadow:0 1px 2px rgba(0,0,0,.04);transition:${LIFT}}` +
|
|
38
|
+
`${AT} ${ACTION}{box-sizing:border-box;height:46px;min-height:46px;padding:0 14px;gap:9px;border-radius:14px!important;border:1px solid ${EDGE};background:${FILL};color:${INK};font-family:${FONT};font-size:14px;font-weight:500;line-height:1;box-shadow:0 1px 2px rgba(0,0,0,.04);backdrop-filter:none;-webkit-backdrop-filter:none;transition:${LIFT}}` +
|
|
39
|
+
`${AT} [data-signin-btn]:hover:not(:disabled),${AT} ${ACTION}:hover:not(:disabled){border-color:${STRONG};transform:translateY(-2px)}` +
|
|
40
|
+
`${AT} [data-signin-btn]:active:not(:disabled),${AT} ${ACTION}:active:not(:disabled){transform:scale(.98)}` +
|
|
41
|
+
`${AT} [data-signin-btn]:disabled,${AT} ${ACTION}:disabled{opacity:.55;cursor:not-allowed}` +
|
|
42
|
+
`${AT} [data-signin-btn][data-solid],${AT} ${ACTION}[data-fill]{background:${INK};color:var(--background);border-color:${INK}}` +
|
|
43
|
+
`${AT} [data-signin-btn][data-solid]:hover:not(:disabled),${AT} ${ACTION}[data-fill]:hover:not(:disabled){background:${INK};color:var(--background);border-color:${INK};opacity:.92;transform:none}` +
|
|
44
|
+
`${AT} [data-signin-btn] svg{flex-shrink:0}` +
|
|
45
|
+
`${AT} [data-signin-or]{display:flex;align-items:center;gap:12px;font-size:12.5px;color:${MUTE}}` +
|
|
46
|
+
`${AT} [data-signin-or]::before,${AT} [data-signin-or]::after{content:'';flex:1;height:1px;background:${EDGE}}` +
|
|
47
|
+
`${AT} [data-signin-form]{display:flex;flex-direction:column;gap:10px;margin:0}` +
|
|
48
|
+
`${AT} [data-signin-field]{box-sizing:border-box;width:100%;height:46px;margin:0;padding:0 16px;border-radius:14px;border:1px solid ${EDGE};background-color:${FILL};color:${INK};font-family:${FONT};font-size:14px;outline:none}` +
|
|
49
|
+
`${AT} ${INPUT}{height:46px;border-radius:14px;font-size:14px;background-color:${FILL}}` +
|
|
50
|
+
`${AT} ${INPUT}:not([aria-invalid="true"]){border-color:${EDGE}}` +
|
|
51
|
+
`${AT} ${GROUP}{border-radius:14px;background-color:${FILL}}` +
|
|
52
|
+
`${AT} ${GROUP}:not([data-focused]):not([data-invalid]){border-color:${EDGE}}` +
|
|
53
|
+
`${AT} [data-signin-field]::placeholder{color:${MUTE}}` +
|
|
54
|
+
`${AT} [data-signin-field]:focus-visible,${AT} ${INPUT}:not([aria-invalid="true"]):focus-visible{border-color:${STRONG};box-shadow:0 0 0 2px var(--ring,${STRONG})}` +
|
|
55
|
+
`${AT} ${GROUP}[data-focused]:not([data-invalid]){border-color:${STRONG}}` +
|
|
56
|
+
`${AT} [data-signin-wrong]{margin:0;font-size:13px;color:var(--destructive,#e5484d)}` +
|
|
57
|
+
`${AT} [data-signin-quiet]{margin:0;font-size:13px;color:${MUTE}}` +
|
|
58
|
+
`${AT} [data-signin-quiet] button{padding:0;border:0;background:none;color:${INK};font:inherit;cursor:pointer}` +
|
|
59
|
+
`${AT} [data-signin-quiet] button:hover:not(:disabled){text-decoration:underline}` +
|
|
60
|
+
`${AT} [data-signin-terms]{margin:0;max-width:400px;text-align:center;font-size:12px;line-height:18px;color:${MUTE}}` +
|
|
61
|
+
`${AT} [data-signin-terms] a{color:${INK};text-decoration:none}` +
|
|
62
|
+
`${AT} [data-signin-terms] a:hover{text-decoration:underline;text-underline-offset:2px}`;
|
|
63
|
+
/** The card a sign-in is drawn in, carrying the rules its controls are drawn by. */
|
|
64
|
+
function SignInCard({ background = '$background', borderColor = '$borderColor', bare = false, slot = 'signin-panel', children, ...rest }) {
|
|
65
|
+
const card = bare ? {} : { bg: background, borderWidth: 1, borderColor, rounded: '$6', p: '$6' };
|
|
66
|
+
return ((0, jsx_runtime_1.jsxs)(layout_1.YStack, { "data-signin": "", "data-slot": slot, "data-surface": bare ? 'bare' : 'card', width: "100%", maxW: bare ? 400 : 464, items: "center", gap: "$3", ...card, ...rest, children: [(0, jsx_runtime_1.jsx)("style", { dangerouslySetInnerHTML: { __html: exports.SIGNIN_STYLE } }), children] }));
|
|
67
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
import { YStack } from '../backends/gui/layout.js';
|
|
3
|
+
/**
|
|
4
|
+
* The look every Hanzo sign-in shares: the card and the rules its controls are
|
|
5
|
+
* drawn by. The shared panel (./SignInPanel.tsx) is drawn on it, and so is
|
|
6
|
+
* hanzo.ai's own sign-in (hanzo-inc/app components/auth/steps.tsx `Sheet`, which
|
|
7
|
+
* keeps its own steps: the code, the password, the phone, the second factor).
|
|
8
|
+
* Both read these rules, so a front page and the page it hands off to cannot
|
|
9
|
+
* drift apart.
|
|
10
|
+
*
|
|
11
|
+
* The rules are hanzo.app's front-page sign-in (hanzo-inc/app steps.tsx
|
|
12
|
+
* `HERO_STYLE`): 46px controls with 14px corners, the providers side by side,
|
|
13
|
+
* one solid control. They are carried as one stylesheet scoped to the card
|
|
14
|
+
* (`data-signin`), set raw, so the host imports none. They read design's custom
|
|
15
|
+
* properties (`--popover`, `--border`, `--border-strong`, `--foreground`,
|
|
16
|
+
* `--muted-foreground`) with gui's theme keys behind them, so a host without
|
|
17
|
+
* design's sheet still draws it.
|
|
18
|
+
*
|
|
19
|
+
* What a host draws inside reads them by attribute:
|
|
20
|
+
*
|
|
21
|
+
* [data-signin-body] the column the controls stand in
|
|
22
|
+
* [data-signin-pair] the providers, side by side (stacked under 380px of room)
|
|
23
|
+
* [data-signin-btn] a control; with [data-solid], the one solid control
|
|
24
|
+
* [data-signin-or] the word between the providers and the address
|
|
25
|
+
* [data-signin-form] a form in the column
|
|
26
|
+
* [data-signin-field] a plain address field
|
|
27
|
+
* [data-signin-wrong] what went wrong; [data-signin-quiet] a quiet line
|
|
28
|
+
* [data-signin-terms] the terms line
|
|
29
|
+
*
|
|
30
|
+
* and this library's own controls set in the card take the same box without
|
|
31
|
+
* being marked: an Input or an InputGroup is the field (its padding stays its
|
|
32
|
+
* own, so a password's eye keeps its well), and an Action is the control, the
|
|
33
|
+
* filled one the solid control.
|
|
34
|
+
*
|
|
35
|
+
* The card is a solid ground inside a hairline, since a front page draws it over
|
|
36
|
+
* a busy backdrop. It is the site's to colour (`background`, `borderColor`: a
|
|
37
|
+
* theme token or any CSS colour), and `bare` drops it for a host that sets the
|
|
38
|
+
* sign-in in a card of its own, or on a quiet page. Inside the card the controls
|
|
39
|
+
* keep a 400px measure, so the card is 464px wide.
|
|
40
|
+
*/
|
|
41
|
+
export interface SignInCardProps extends Omit<ComponentProps<typeof YStack>, 'bg' | 'background' | 'borderColor'> {
|
|
42
|
+
/** The card's ground: a theme token (`$panel`) or any CSS colour. Default `$background`, solid. */
|
|
43
|
+
background?: Paint;
|
|
44
|
+
/** The card's hairline: a theme token or any CSS colour. Default `$borderColor`. */
|
|
45
|
+
borderColor?: Paint;
|
|
46
|
+
/** No card: the controls alone, 400px wide at most. */
|
|
47
|
+
bare?: boolean;
|
|
48
|
+
/** The `data-slot` a host finds the card by. Default `signin-panel`. */
|
|
49
|
+
slot?: string;
|
|
50
|
+
children?: ReactNode;
|
|
51
|
+
}
|
|
52
|
+
/** A colour the card takes, as the stack it is drawn on takes one. */
|
|
53
|
+
type Paint = ComponentProps<typeof YStack>['bg'];
|
|
54
|
+
/** Every rule the sign-in's controls are drawn by, scoped to the card. */
|
|
55
|
+
export declare const SIGNIN_STYLE: string;
|
|
56
|
+
/** The card a sign-in is drawn in, carrying the rules its controls are drawn by. */
|
|
57
|
+
export declare function SignInCard({ background, borderColor, bare, slot, children, ...rest }: SignInCardProps): import("react").JSX.Element;
|
|
58
|
+
export {};
|
|
59
|
+
//# sourceMappingURL=look.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"look.d.ts","sourceRoot":"","sources":["../../src/auth/look.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAE/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,EAAE,IAAI,GAAG,YAAY,GAAG,aAAa,CAAC;IAC/G,mGAAmG;IACnG,UAAU,CAAC,EAAE,KAAK,CAAA;IAClB,oFAAoF;IACpF,WAAW,CAAC,EAAE,KAAK,CAAA;IACnB,uDAAuD;IACvD,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,wEAAwE;IACxE,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB;AAED,sEAAsE;AACtE,KAAK,KAAK,GAAG,cAAc,CAAC,OAAO,MAAM,CAAC,CAAC,IAAI,CAAC,CAAA;AA4BhD,0EAA0E;AAC1E,eAAO,MAAM,YAAY,QA8BiE,CAAA;AAE1F,oFAAoF;AACpF,wBAAgB,UAAU,CAAC,EAAE,UAA0B,EAAE,WAA4B,EAAE,IAAY,EAAE,IAAqB,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,eAAe,+BAS/J"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { YStack } from '../backends/gui/layout.js';
|
|
4
|
+
const AT = '[data-signin]';
|
|
5
|
+
const FILL = 'var(--popover,var(--panel))';
|
|
6
|
+
const EDGE = 'var(--border,var(--edge))';
|
|
7
|
+
const STRONG = 'var(--border-strong,var(--bound))';
|
|
8
|
+
const INK = 'var(--foreground,var(--ink))';
|
|
9
|
+
const MUTE = 'var(--muted-foreground,var(--quiet))';
|
|
10
|
+
const FONT = 'var(--font-sans,Zen,system-ui,sans-serif)';
|
|
11
|
+
const LIFT = 'transform .2s cubic-bezier(.16,1,.3,1),border-color .2s,background-color .2s,opacity .2s';
|
|
12
|
+
/**
|
|
13
|
+
* Weight enough to outrank gui's atomic classes on this library's own controls,
|
|
14
|
+
* its per-theme ones included (`:root:root.t_light ._bxsh-…`, a filled Action's
|
|
15
|
+
* light shadow): an id's weight, matching every element (none is `#_`).
|
|
16
|
+
*/
|
|
17
|
+
const OVER = ':not(#_)';
|
|
18
|
+
/**
|
|
19
|
+
* This library's Action, wherever it is set in the card. Its corners are stated
|
|
20
|
+
* `!important` too: a host may hold every Action round with an `!important` rule
|
|
21
|
+
* of its own (hanzo-inc/app app/layout.tsx `[data-slot="action"]`), and inside
|
|
22
|
+
* the card this scoped, weightier rule is the one that stands.
|
|
23
|
+
*/
|
|
24
|
+
const ACTION = `:is(button,a)[data-slot="action"]${OVER}`;
|
|
25
|
+
/** This library's Input, alone; inside an InputGroup the group is the box. */
|
|
26
|
+
const INPUT = `input[data-slot="input"]:not([data-slot="input-group"] *)${OVER}`;
|
|
27
|
+
const GROUP = `[data-slot="input-group"]${OVER}`;
|
|
28
|
+
/** Every rule the sign-in's controls are drawn by, scoped to the card. */
|
|
29
|
+
export const SIGNIN_STYLE = `${AT} [data-signin-body]{container-type:inline-size;display:flex;flex-direction:column;gap:10px;width:100%}` +
|
|
30
|
+
`${AT} [data-signin-pair]{display:grid;grid-template-columns:1fr 1fr;gap:10px;width:100%}` +
|
|
31
|
+
`${AT} [data-signin-pair]>:last-child:nth-child(odd){grid-column:1/-1}` +
|
|
32
|
+
`@container (max-width:379.98px){${AT} [data-signin-pair]{grid-template-columns:1fr}}` +
|
|
33
|
+
`${AT} [data-signin-btn]{box-sizing:border-box;display:flex;align-items:center;justify-content:center;gap:9px;width:100%;height:46px;margin:0;padding:0 14px;border-radius:14px;border:1px solid ${EDGE};background:${FILL};color:${INK};font-family:${FONT};font-size:14px;font-weight:500;line-height:1;white-space:nowrap;cursor:pointer;box-shadow:0 1px 2px rgba(0,0,0,.04);transition:${LIFT}}` +
|
|
34
|
+
`${AT} ${ACTION}{box-sizing:border-box;height:46px;min-height:46px;padding:0 14px;gap:9px;border-radius:14px!important;border:1px solid ${EDGE};background:${FILL};color:${INK};font-family:${FONT};font-size:14px;font-weight:500;line-height:1;box-shadow:0 1px 2px rgba(0,0,0,.04);backdrop-filter:none;-webkit-backdrop-filter:none;transition:${LIFT}}` +
|
|
35
|
+
`${AT} [data-signin-btn]:hover:not(:disabled),${AT} ${ACTION}:hover:not(:disabled){border-color:${STRONG};transform:translateY(-2px)}` +
|
|
36
|
+
`${AT} [data-signin-btn]:active:not(:disabled),${AT} ${ACTION}:active:not(:disabled){transform:scale(.98)}` +
|
|
37
|
+
`${AT} [data-signin-btn]:disabled,${AT} ${ACTION}:disabled{opacity:.55;cursor:not-allowed}` +
|
|
38
|
+
`${AT} [data-signin-btn][data-solid],${AT} ${ACTION}[data-fill]{background:${INK};color:var(--background);border-color:${INK}}` +
|
|
39
|
+
`${AT} [data-signin-btn][data-solid]:hover:not(:disabled),${AT} ${ACTION}[data-fill]:hover:not(:disabled){background:${INK};color:var(--background);border-color:${INK};opacity:.92;transform:none}` +
|
|
40
|
+
`${AT} [data-signin-btn] svg{flex-shrink:0}` +
|
|
41
|
+
`${AT} [data-signin-or]{display:flex;align-items:center;gap:12px;font-size:12.5px;color:${MUTE}}` +
|
|
42
|
+
`${AT} [data-signin-or]::before,${AT} [data-signin-or]::after{content:'';flex:1;height:1px;background:${EDGE}}` +
|
|
43
|
+
`${AT} [data-signin-form]{display:flex;flex-direction:column;gap:10px;margin:0}` +
|
|
44
|
+
`${AT} [data-signin-field]{box-sizing:border-box;width:100%;height:46px;margin:0;padding:0 16px;border-radius:14px;border:1px solid ${EDGE};background-color:${FILL};color:${INK};font-family:${FONT};font-size:14px;outline:none}` +
|
|
45
|
+
`${AT} ${INPUT}{height:46px;border-radius:14px;font-size:14px;background-color:${FILL}}` +
|
|
46
|
+
`${AT} ${INPUT}:not([aria-invalid="true"]){border-color:${EDGE}}` +
|
|
47
|
+
`${AT} ${GROUP}{border-radius:14px;background-color:${FILL}}` +
|
|
48
|
+
`${AT} ${GROUP}:not([data-focused]):not([data-invalid]){border-color:${EDGE}}` +
|
|
49
|
+
`${AT} [data-signin-field]::placeholder{color:${MUTE}}` +
|
|
50
|
+
`${AT} [data-signin-field]:focus-visible,${AT} ${INPUT}:not([aria-invalid="true"]):focus-visible{border-color:${STRONG};box-shadow:0 0 0 2px var(--ring,${STRONG})}` +
|
|
51
|
+
`${AT} ${GROUP}[data-focused]:not([data-invalid]){border-color:${STRONG}}` +
|
|
52
|
+
`${AT} [data-signin-wrong]{margin:0;font-size:13px;color:var(--destructive,#e5484d)}` +
|
|
53
|
+
`${AT} [data-signin-quiet]{margin:0;font-size:13px;color:${MUTE}}` +
|
|
54
|
+
`${AT} [data-signin-quiet] button{padding:0;border:0;background:none;color:${INK};font:inherit;cursor:pointer}` +
|
|
55
|
+
`${AT} [data-signin-quiet] button:hover:not(:disabled){text-decoration:underline}` +
|
|
56
|
+
`${AT} [data-signin-terms]{margin:0;max-width:400px;text-align:center;font-size:12px;line-height:18px;color:${MUTE}}` +
|
|
57
|
+
`${AT} [data-signin-terms] a{color:${INK};text-decoration:none}` +
|
|
58
|
+
`${AT} [data-signin-terms] a:hover{text-decoration:underline;text-underline-offset:2px}`;
|
|
59
|
+
/** The card a sign-in is drawn in, carrying the rules its controls are drawn by. */
|
|
60
|
+
export function SignInCard({ background = '$background', borderColor = '$borderColor', bare = false, slot = 'signin-panel', children, ...rest }) {
|
|
61
|
+
const card = bare ? {} : { bg: background, borderWidth: 1, borderColor, rounded: '$6', p: '$6' };
|
|
62
|
+
return (_jsxs(YStack, { "data-signin": "", "data-slot": slot, "data-surface": bare ? 'bare' : 'card', width: "100%", maxW: bare ? 400 : 464, items: "center", gap: "$3", ...card, ...rest, children: [_jsx("style", { dangerouslySetInnerHTML: { __html: SIGNIN_STYLE } }), children] }));
|
|
63
|
+
}
|
|
64
|
+
//# sourceMapping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AI,GAAG,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAE,EAAE,EAAE,EAAE,UAAU,EAAE,WAAW,EAAE,CAAC,EAAE,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAY,CAAA;IAC3G,OAAO,CACL,MAAC,MAAM,mBAAa,EAAE,eAAY,IAAI,kBAAgB,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,KAAK,EAAC,MAAM,EAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,EAAC,QAAQ,EAAC,GAAG,EAAC,IAAI,KAAK,IAAI,KAAM,IAAI,aAE3J,gBAAO,uBAAuB,EAAE,EAAE,MAAM,EAAE,YAAY,EAAE,GAAI,EAC3D,QAAQ,IACF,CACV,CAAA;AACH,CAAC"}
|
package/dist/auth/panel.cjs
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SIGNIN = exports.handoff = exports.address = exports.SignInPanel = void 0;
|
|
3
|
+
exports.SignInCard = exports.SIGNIN_STYLE = exports.SIGNIN = exports.handoff = exports.address = exports.SignInPanel = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* The shared sign-in panel and its hand-off, alone: what a Hanzo site draws on
|
|
6
|
-
* its front page (./SignInPanel.tsx)
|
|
6
|
+
* its front page (./SignInPanel.tsx), where each press goes (./handoff.ts), and
|
|
7
|
+
* the card and rules both it and hanzo.ai's own sign-in are drawn by (./look.tsx).
|
|
7
8
|
*
|
|
8
9
|
* Its own entry so importing the panel does not load the in-place sign-in form
|
|
9
10
|
* (./SignIn.tsx), which needs a newer @hanzo/iam (`SecondFactor`) and
|
|
@@ -17,3 +18,6 @@ var handoff_1 = require("./handoff.cjs");
|
|
|
17
18
|
Object.defineProperty(exports, "address", { enumerable: true, get: function () { return handoff_1.address; } });
|
|
18
19
|
Object.defineProperty(exports, "handoff", { enumerable: true, get: function () { return handoff_1.handoff; } });
|
|
19
20
|
Object.defineProperty(exports, "SIGNIN", { enumerable: true, get: function () { return handoff_1.SIGNIN; } });
|
|
21
|
+
var look_1 = require("./look.cjs");
|
|
22
|
+
Object.defineProperty(exports, "SIGNIN_STYLE", { enumerable: true, get: function () { return look_1.SIGNIN_STYLE; } });
|
|
23
|
+
Object.defineProperty(exports, "SignInCard", { enumerable: true, get: function () { return look_1.SignInCard; } });
|
package/dist/auth/panel.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The shared sign-in panel and its hand-off, alone: what a Hanzo site draws on
|
|
3
|
-
* its front page (./SignInPanel.tsx)
|
|
3
|
+
* its front page (./SignInPanel.tsx), where each press goes (./handoff.ts), and
|
|
4
|
+
* the card and rules both it and hanzo.ai's own sign-in are drawn by (./look.tsx).
|
|
4
5
|
*
|
|
5
6
|
* Its own entry so importing the panel does not load the in-place sign-in form
|
|
6
7
|
* (./SignIn.tsx), which needs a newer @hanzo/iam (`SecondFactor`) and
|
|
@@ -10,4 +11,5 @@
|
|
|
10
11
|
*/
|
|
11
12
|
export { SignInPanel, type SignInPanelProps } from './SignInPanel.js';
|
|
12
13
|
export { address, handoff, SIGNIN, type ProviderKind, type Way } from './handoff.js';
|
|
14
|
+
export { SIGNIN_STYLE, SignInCard, type SignInCardProps } from './look.js';
|
|
13
15
|
//# sourceMappingURL=panel.d.ts.map
|
package/dist/auth/panel.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panel.d.ts","sourceRoot":"","sources":["../../src/auth/panel.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"panel.d.ts","sourceRoot":"","sources":["../../src/auth/panel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAClE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,KAAK,GAAG,EAAE,MAAM,WAAW,CAAA;AACjF,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,QAAQ,CAAA"}
|
package/dist/auth/panel.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The shared sign-in panel and its hand-off, alone: what a Hanzo site draws on
|
|
3
|
-
* its front page (./SignInPanel.tsx)
|
|
3
|
+
* its front page (./SignInPanel.tsx), where each press goes (./handoff.ts), and
|
|
4
|
+
* the card and rules both it and hanzo.ai's own sign-in are drawn by (./look.tsx).
|
|
4
5
|
*
|
|
5
6
|
* Its own entry so importing the panel does not load the in-place sign-in form
|
|
6
7
|
* (./SignIn.tsx), which needs a newer @hanzo/iam (`SecondFactor`) and
|
|
@@ -10,4 +11,5 @@
|
|
|
10
11
|
*/
|
|
11
12
|
export { SignInPanel } from './SignInPanel.js';
|
|
12
13
|
export { address, handoff, SIGNIN } from './handoff.js';
|
|
14
|
+
export { SIGNIN_STYLE, SignInCard } from './look.js';
|
|
13
15
|
//# sourceMappingURL=panel.js.map
|
package/dist/auth/panel.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panel.js","sourceRoot":"","sources":["../../src/auth/panel.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"panel.js","sourceRoot":"","sources":["../../src/auth/panel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,WAAW,EAAyB,MAAM,eAAe,CAAA;AAClE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAA+B,MAAM,WAAW,CAAA;AACjF,OAAO,EAAE,YAAY,EAAE,UAAU,EAAwB,MAAM,QAAQ,CAAA"}
|
package/dist/gallery.html
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!doctype html><html lang="en" class="t_dark"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>@hanzo/ui 8.
|
|
1
|
+
<!doctype html><html lang="en" class="t_dark"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>@hanzo/ui 8.33.0</title><style>/* @hanzo/ui — generated by scripts/gen-css.mjs. Do not edit. */
|
|
2
2
|
:root { --hanzo-ui-styles: 1; }
|
|
3
3
|
/* Hanzo Design System — the entry point. Import THIS one file.
|
|
4
4
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanzo/ui",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.33.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Hanzo UI — the one canonical Hanzo component library, on @hanzo/gui + @hanzo/design. ONE substrate: every component renders through @hanzo/gui primitives, so the same import works on web, native (expo) and desktop (Tauri). Self-contained (theme.css), presentational, host-agnostic, clean-room.",
|
|
6
6
|
"exports": {
|