@exegia/corpora-ui 0.5.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/README.md +21 -0
- package/dist-lib/components/blocks/auth/auth-shell.d.ts +56 -0
- package/dist-lib/components/blocks/auth/code-auth-block.d.ts +22 -0
- package/dist-lib/components/blocks/auth/forgot-password-block.d.ts +15 -0
- package/dist-lib/components/blocks/auth/login-block.d.ts +25 -0
- package/dist-lib/components/blocks/auth/signup-block.d.ts +26 -0
- package/dist-lib/components/composed/password-input.d.ts +30 -0
- package/dist-lib/components/composed/social-providers.d.ts +22 -0
- package/dist-lib/components/docs/code-block.d.ts +4 -0
- package/dist-lib/components/docs/component-preview.d.ts +10 -0
- package/dist-lib/components/docs/demo-controls.d.ts +28 -0
- package/dist-lib/components/docs/props-table.d.ts +4 -0
- package/dist-lib/components/theme-provider.d.ts +15 -0
- package/dist-lib/components/ui/button.d.ts +28 -0
- package/dist-lib/components/ui/card.d.ts +16 -0
- package/dist-lib/components/ui/checkbox.d.ts +7 -0
- package/dist-lib/components/ui/field.d.ts +10 -0
- package/dist-lib/components/ui/frame.d.ts +7 -0
- package/dist-lib/components/ui/glasscn/glass-button.d.ts +6 -0
- package/dist-lib/components/ui/glasscn/liquid-glass.d.ts +31 -0
- package/dist-lib/components/ui/input-group.d.ts +13 -0
- package/dist-lib/components/ui/input.d.ts +9 -0
- package/dist-lib/components/ui/label.d.ts +11 -0
- package/dist-lib/components/ui/otp-field.d.ts +11 -0
- package/dist-lib/components/ui/separator.d.ts +4 -0
- package/dist-lib/components/ui/spinner.d.ts +3 -0
- package/dist-lib/components/ui/textarea.d.ts +8 -0
- package/dist-lib/index.d.ts +29 -0
- package/dist-lib/index.js +1617 -0
- package/dist-lib/index.js.map +1 -0
- package/dist-lib/lib/auth-accent.d.ts +33 -0
- package/dist-lib/lib/glass-variants.d.ts +6 -0
- package/dist-lib/lib/sound.d.ts +13 -0
- package/dist-lib/lib/utils.d.ts +2 -0
- package/dist-lib/lib/utils.test.d.ts +1 -0
- package/package.json +80 -0
- package/src/components/blocks/.gitkeep +0 -0
- package/src/components/blocks/auth/auth-shell.tsx +266 -0
- package/src/components/blocks/auth/code-auth-block.tsx +190 -0
- package/src/components/blocks/auth/forgot-password-block.tsx +123 -0
- package/src/components/blocks/auth/login-block.tsx +239 -0
- package/src/components/blocks/auth/signup-block.tsx +260 -0
- package/src/components/composed/.gitkeep +0 -0
- package/src/components/composed/password-input.tsx +179 -0
- package/src/components/composed/social-providers.tsx +89 -0
- package/src/components/docs/code-block.tsx +8 -0
- package/src/components/docs/component-preview.tsx +28 -0
- package/src/components/docs/demo-controls.tsx +118 -0
- package/src/components/docs/props-table.tsx +35 -0
- package/src/components/theme-provider.tsx +230 -0
- package/src/components/ui/button.tsx +199 -0
- package/src/components/ui/card.tsx +253 -0
- package/src/components/ui/checkbox.tsx +83 -0
- package/src/components/ui/field.tsx +89 -0
- package/src/components/ui/frame.tsx +87 -0
- package/src/components/ui/glasscn/glass-button.tsx +25 -0
- package/src/components/ui/glasscn/liquid-glass.tsx +276 -0
- package/src/components/ui/input-group.tsx +105 -0
- package/src/components/ui/input.tsx +70 -0
- package/src/components/ui/label.tsx +36 -0
- package/src/components/ui/otp-field.tsx +88 -0
- package/src/components/ui/separator.tsx +23 -0
- package/src/components/ui/spinner.tsx +17 -0
- package/src/components/ui/textarea.tsx +58 -0
- package/src/index.css +171 -0
- package/src/index.ts +37 -0
- package/src/lib/auth-accent.ts +49 -0
- package/src/lib/glass-variants.ts +57 -0
- package/src/lib/sound.ts +39 -0
- package/src/lib/utils.test.ts +22 -0
- package/src/lib/utils.ts +6 -0
package/README.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# React + TypeScript + Vite + shadcn/ui
|
|
2
|
+
|
|
3
|
+
This is a template for a new Vite project with React, TypeScript, and shadcn/ui.
|
|
4
|
+
|
|
5
|
+
## Adding components
|
|
6
|
+
|
|
7
|
+
To add components to your app, run the following command:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npx shadcn@latest add button
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
This will place the ui components in the `src/components` directory.
|
|
14
|
+
|
|
15
|
+
## Using components
|
|
16
|
+
|
|
17
|
+
To use the components in your app, import them as follows:
|
|
18
|
+
|
|
19
|
+
```tsx
|
|
20
|
+
import { Button } from "@/components/ui/button"
|
|
21
|
+
```
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { AuthAccent } from '../../../lib/auth-accent';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
/** transitions.dev motion scale, shared by all auth blocks. */
|
|
4
|
+
export declare const EASE: readonly [0.22, 1, 0.36, 1];
|
|
5
|
+
export type AuthStatus = "idle" | "loading" | "success" | "error";
|
|
6
|
+
/**
|
|
7
|
+
* Frame shell shared by the auth blocks (coss particle p-card-8): a raised
|
|
8
|
+
* Card inside a muted Frame, with the footer in the frame strip below the
|
|
9
|
+
* card. Wraps content in a MotionConfig that honors prefers-reduced-motion
|
|
10
|
+
* and layout-animates height changes so step swaps morph instead of jumping.
|
|
11
|
+
*/
|
|
12
|
+
export declare function AuthCard({ title, description, children, footer, className, logo, accent, }: {
|
|
13
|
+
title: React.ReactNode;
|
|
14
|
+
description?: React.ReactNode;
|
|
15
|
+
children: React.ReactNode;
|
|
16
|
+
footer?: React.ReactNode;
|
|
17
|
+
className?: string;
|
|
18
|
+
/** Brand mark rendered above the title. Omit for no logo row at all. */
|
|
19
|
+
logo?: React.ReactNode;
|
|
20
|
+
/** Brand accent for the card's primary action. Omit to keep `bg-primary`. */
|
|
21
|
+
accent?: AuthAccent;
|
|
22
|
+
}): React.JSX.Element;
|
|
23
|
+
/** Cross-morphs between steps (form → success, …) keyed by `step`. */
|
|
24
|
+
export declare function MorphStep({ step, children, className, }: {
|
|
25
|
+
step: string;
|
|
26
|
+
children: React.ReactNode;
|
|
27
|
+
className?: string;
|
|
28
|
+
}): React.JSX.Element;
|
|
29
|
+
/**
|
|
30
|
+
* Progressive-disclosure wrapper: collapses/expands a step as `show` flips.
|
|
31
|
+
*
|
|
32
|
+
* `overflow-hidden` is only worn while the height is in flight — leaving it on
|
|
33
|
+
* would clip the focus ring of any full-width control inside (the ring sits
|
|
34
|
+
* 3px outside the input's border box, so the left/right edges would be cut).
|
|
35
|
+
*/
|
|
36
|
+
export declare function Reveal({ show, children, className, }: {
|
|
37
|
+
show: boolean;
|
|
38
|
+
children: React.ReactNode;
|
|
39
|
+
className?: string;
|
|
40
|
+
}): React.JSX.Element;
|
|
41
|
+
/** Inline error message that shakes each time `message` changes. */
|
|
42
|
+
export declare function AuthError({ message }: {
|
|
43
|
+
message: string | null;
|
|
44
|
+
}): React.JSX.Element;
|
|
45
|
+
/** Success panel with a stroke-drawn check. */
|
|
46
|
+
export declare function AuthSuccess({ title, description, children, }: {
|
|
47
|
+
title: React.ReactNode;
|
|
48
|
+
description?: React.ReactNode;
|
|
49
|
+
children?: React.ReactNode;
|
|
50
|
+
}): React.JSX.Element;
|
|
51
|
+
/** "Or continue with" style divider. */
|
|
52
|
+
export declare function AuthSeparator({ label }: {
|
|
53
|
+
label?: string;
|
|
54
|
+
}): React.JSX.Element;
|
|
55
|
+
/** Countdown for resend links; restarts when `restartKey` changes. */
|
|
56
|
+
export declare function useCountdown(seconds: number, restartKey: number): number;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { AuthAccent } from '../../../lib/auth-accent';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
export interface CodeAuthBlockProps {
|
|
4
|
+
/** Brand mark rendered above the title. Omit for no logo row at all. */
|
|
5
|
+
logo?: React.ReactNode;
|
|
6
|
+
/** Brand accent for the primary action. Omit to keep the default primary. */
|
|
7
|
+
accent?: AuthAccent;
|
|
8
|
+
/** Where the code was sent; drives copy and icon. */
|
|
9
|
+
channel?: "email" | "sms";
|
|
10
|
+
/** Masked destination shown in the description, e.g. "y•••@example.com". */
|
|
11
|
+
destination?: string;
|
|
12
|
+
length?: number;
|
|
13
|
+
/** Submit automatically once all digits are entered. */
|
|
14
|
+
autoSubmit?: boolean;
|
|
15
|
+
/** Seconds before "Resend code" becomes available. 0 disables the wait. */
|
|
16
|
+
resendSeconds?: number;
|
|
17
|
+
/** Reject (or throw) to show the error shake and clear the code. */
|
|
18
|
+
onVerify?: (code: string) => Promise<void> | void;
|
|
19
|
+
onResend?: () => Promise<void> | void;
|
|
20
|
+
onBack?: () => void;
|
|
21
|
+
}
|
|
22
|
+
export declare function CodeAuthBlock({ channel, logo, accent, destination, length, autoSubmit, resendSeconds, onVerify, onResend, onBack, }: CodeAuthBlockProps): React.JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AuthAccent } from '../../../lib/auth-accent';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
export interface ForgotPasswordBlockProps {
|
|
4
|
+
title?: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
/** Brand mark rendered above the title. Omit for no logo row at all. */
|
|
7
|
+
logo?: React.ReactNode;
|
|
8
|
+
/** Brand accent for the primary action. Omit to keep the default primary. */
|
|
9
|
+
accent?: AuthAccent;
|
|
10
|
+
onSubmit?: (data: {
|
|
11
|
+
email: string;
|
|
12
|
+
}) => Promise<void> | void;
|
|
13
|
+
onBackToLogin?: () => void;
|
|
14
|
+
}
|
|
15
|
+
export declare function ForgotPasswordBlock({ title, logo, accent, description, onSubmit, onBackToLogin, }: ForgotPasswordBlockProps): React.JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { SocialProvider } from '../../composed/social-providers';
|
|
2
|
+
import { AuthAccent } from '../../../lib/auth-accent';
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
export interface LoginBlockProps {
|
|
5
|
+
title?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
/** Brand mark rendered above the title. Omit for no logo row at all. */
|
|
8
|
+
logo?: React.ReactNode;
|
|
9
|
+
/** Brand accent for the primary action. Omit to keep the default primary. */
|
|
10
|
+
accent?: AuthAccent;
|
|
11
|
+
/** Social providers to offer; empty array hides the social section. */
|
|
12
|
+
providers?: SocialProvider[];
|
|
13
|
+
showRememberMe?: boolean;
|
|
14
|
+
showForgotPassword?: boolean;
|
|
15
|
+
/** Reject (or throw) to show the error state with the error's message. */
|
|
16
|
+
onSubmit?: (data: {
|
|
17
|
+
email: string;
|
|
18
|
+
password: string;
|
|
19
|
+
remember: boolean;
|
|
20
|
+
}) => Promise<void> | void;
|
|
21
|
+
onProviderSelect?: (provider: SocialProvider) => Promise<void> | void;
|
|
22
|
+
onForgotPassword?: () => void;
|
|
23
|
+
onSignup?: () => void;
|
|
24
|
+
}
|
|
25
|
+
export declare function LoginBlock({ title, description, logo, accent, providers, showRememberMe, showForgotPassword, onSubmit, onProviderSelect, onForgotPassword, onSignup, }: LoginBlockProps): React.JSX.Element;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { SocialProvider } from '../../composed/social-providers';
|
|
2
|
+
import { AuthAccent } from '../../../lib/auth-accent';
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
export interface SignupBlockProps {
|
|
5
|
+
title?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
/** Brand mark rendered above the title. Omit for no logo row at all. */
|
|
8
|
+
logo?: React.ReactNode;
|
|
9
|
+
/** Brand accent for the primary action. Omit to keep the default primary. */
|
|
10
|
+
accent?: AuthAccent;
|
|
11
|
+
providers?: SocialProvider[];
|
|
12
|
+
showNameField?: boolean;
|
|
13
|
+
/** Require the terms checkbox before submitting. */
|
|
14
|
+
showTerms?: boolean;
|
|
15
|
+
/** Block submission until every password requirement is met. */
|
|
16
|
+
enforceStrongPassword?: boolean;
|
|
17
|
+
onSubmit?: (data: {
|
|
18
|
+
name: string;
|
|
19
|
+
email: string;
|
|
20
|
+
password: string;
|
|
21
|
+
}) => Promise<void> | void;
|
|
22
|
+
onProviderSelect?: (provider: SocialProvider) => Promise<void> | void;
|
|
23
|
+
onLogin?: () => void;
|
|
24
|
+
onTerms?: () => void;
|
|
25
|
+
}
|
|
26
|
+
export declare function SignupBlock({ title, description, logo, accent, providers, showNameField, showTerms, enforceStrongPassword, onSubmit, onProviderSelect, onLogin, onTerms, }: SignupBlockProps): React.JSX.Element;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { InputGroupInput } from '../ui/input-group';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
export declare const passwordRequirements: readonly [{
|
|
4
|
+
readonly regex: RegExp;
|
|
5
|
+
readonly text: "At least 8 characters";
|
|
6
|
+
}, {
|
|
7
|
+
readonly regex: RegExp;
|
|
8
|
+
readonly text: "At least 1 number";
|
|
9
|
+
}, {
|
|
10
|
+
readonly regex: RegExp;
|
|
11
|
+
readonly text: "At least 1 lowercase letter";
|
|
12
|
+
}, {
|
|
13
|
+
readonly regex: RegExp;
|
|
14
|
+
readonly text: "At least 1 uppercase letter";
|
|
15
|
+
}];
|
|
16
|
+
export declare function getPasswordStrength(password: string): number;
|
|
17
|
+
export interface PasswordInputProps extends Omit<React.ComponentProps<typeof InputGroupInput>, "type" | "size"> {
|
|
18
|
+
/** Render the eye toggle button. */
|
|
19
|
+
visibilityToggle?: boolean;
|
|
20
|
+
/** Render the animated strength meter and requirement checklist. */
|
|
21
|
+
showStrength?: boolean;
|
|
22
|
+
/** Play reveal/hide cues on the visibility toggle. Inert until bindSounds(). */
|
|
23
|
+
sound?: boolean;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Password field with visibility toggle and optional strength meter.
|
|
27
|
+
* Composition of InputGroup + Button (coss particles p-input-9 and
|
|
28
|
+
* p-input-group-26).
|
|
29
|
+
*/
|
|
30
|
+
export declare function PasswordInput({ visibilityToggle, showStrength, sound, className, value: valueProp, defaultValue, onChange, ...props }: PasswordInputProps): React.JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
export type SocialProvider = "google" | "apple" | "github" | "x";
|
|
3
|
+
declare const ACTION_LABELS: {
|
|
4
|
+
readonly login: "Login with";
|
|
5
|
+
readonly signup: "Sign up with";
|
|
6
|
+
readonly continue: "Continue with";
|
|
7
|
+
};
|
|
8
|
+
export interface SocialProvidersProps {
|
|
9
|
+
providers?: SocialProvider[];
|
|
10
|
+
/** Verb used in the stacked layout labels. */
|
|
11
|
+
action?: keyof typeof ACTION_LABELS;
|
|
12
|
+
/** "stack" = full-width labeled buttons; "row" = icon-only buttons. */
|
|
13
|
+
layout?: "stack" | "row";
|
|
14
|
+
/** Shows the matching button in its loading state and disables the rest. */
|
|
15
|
+
loadingProvider?: SocialProvider | null;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
onSelect?: (provider: SocialProvider) => void;
|
|
18
|
+
className?: string;
|
|
19
|
+
}
|
|
20
|
+
/** Social auth buttons (coss particle p-button-38). UI only — wire onSelect. */
|
|
21
|
+
export declare function SocialProviders({ providers, action, layout, loadingProvider, disabled, onSelect, className, }: SocialProvidersProps): React.JSX.Element;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { RegistryEntry } from '../../registry';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
/**
|
|
4
|
+
* Renders an entry's lazy demo (created at registry module scope) inside a
|
|
5
|
+
* bordered canvas. Falls back to a placeholder while the demo is not
|
|
6
|
+
* implemented yet.
|
|
7
|
+
*/
|
|
8
|
+
export declare function ComponentPreview({ entry }: {
|
|
9
|
+
entry: RegistryEntry;
|
|
10
|
+
}): React.JSX.Element;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Lightweight playground controls for registry demos. Plain native elements
|
|
4
|
+
* on purpose — docs-only, never part of the published library.
|
|
5
|
+
*/
|
|
6
|
+
export declare function DemoSelect<T extends string>({ label, value, options, onChange, }: {
|
|
7
|
+
label: string;
|
|
8
|
+
value: T;
|
|
9
|
+
options: readonly T[];
|
|
10
|
+
onChange: (value: T) => void;
|
|
11
|
+
}): React.JSX.Element;
|
|
12
|
+
/**
|
|
13
|
+
* Stand-in brand mark for demos of the auth blocks' `logo` slot. Deliberately
|
|
14
|
+
* unbranded — it exists to show the slot's spacing and default sizing, not to
|
|
15
|
+
* represent a real product.
|
|
16
|
+
*/
|
|
17
|
+
export declare function DemoBrandMark(): React.JSX.Element;
|
|
18
|
+
export declare function DemoToggle({ label, checked, onChange, }: {
|
|
19
|
+
label: string;
|
|
20
|
+
checked: boolean;
|
|
21
|
+
onChange: (checked: boolean) => void;
|
|
22
|
+
}): React.JSX.Element;
|
|
23
|
+
/** Standard layout: centered preview canvas above a wrapping controls row. */
|
|
24
|
+
export declare function DemoStage({ controls, children, canvasClassName, }: {
|
|
25
|
+
controls: React.ReactNode;
|
|
26
|
+
children: React.ReactNode;
|
|
27
|
+
canvasClassName?: string;
|
|
28
|
+
}): React.JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
type Theme = "dark" | "light" | "system";
|
|
3
|
+
type ThemeProviderProps = {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
defaultTheme?: Theme;
|
|
6
|
+
storageKey?: string;
|
|
7
|
+
disableTransitionOnChange?: boolean;
|
|
8
|
+
};
|
|
9
|
+
type ThemeProviderState = {
|
|
10
|
+
theme: Theme;
|
|
11
|
+
setTheme: (theme: Theme) => void;
|
|
12
|
+
};
|
|
13
|
+
export declare function ThemeProvider({ children, defaultTheme, storageKey, disableTransitionOnChange, ...props }: ThemeProviderProps): React.JSX.Element;
|
|
14
|
+
export declare const useTheme: () => ThemeProviderState;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
import { FrostGlassVariant } from '../../lib/glass-variants';
|
|
4
|
+
import type * as React from "react";
|
|
5
|
+
export declare const buttonVariants: (props?: ({
|
|
6
|
+
size?: "default" | "icon" | "xs" | "sm" | "lg" | "xl" | "icon-lg" | "icon-sm" | "icon-xl" | "icon-xs" | null | undefined;
|
|
7
|
+
variant?: "link" | "default" | "destructive" | "destructive-outline" | "ghost" | "glass" | "outline" | "secondary" | null | undefined;
|
|
8
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
9
|
+
type ButtonVariant = VariantProps<typeof buttonVariants>["variant"];
|
|
10
|
+
interface ButtonBaseProps extends useRender.ComponentProps<"button"> {
|
|
11
|
+
size?: VariantProps<typeof buttonVariants>["size"];
|
|
12
|
+
loading?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Emit cuelume press/release attributes. Inert unless the app opts into
|
|
15
|
+
* interaction sound by calling `bindSounds()` once.
|
|
16
|
+
*/
|
|
17
|
+
sound?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export type ButtonProps = ButtonBaseProps & ({
|
|
20
|
+
variant: "glass";
|
|
21
|
+
/** Glass finish. Only available when `variant` is "glass". */
|
|
22
|
+
glassVariant?: FrostGlassVariant;
|
|
23
|
+
} | {
|
|
24
|
+
variant?: Exclude<ButtonVariant, "glass">;
|
|
25
|
+
glassVariant?: never;
|
|
26
|
+
});
|
|
27
|
+
export declare function Button({ className, variant, size, render, children, loading, disabled: disabledProp, glassVariant, sound, ...props }: ButtonProps): React.ReactElement;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
export declare function Card({ className, render, ...props }: useRender.ComponentProps<"div">): React.ReactElement;
|
|
4
|
+
export declare function CardFrame({ className, render, ...props }: useRender.ComponentProps<"div">): React.ReactElement;
|
|
5
|
+
export declare function CardFrameHeader({ className, render, ...props }: useRender.ComponentProps<"div">): React.ReactElement;
|
|
6
|
+
export declare function CardFrameTitle({ className, render, ...props }: useRender.ComponentProps<"div">): React.ReactElement;
|
|
7
|
+
export declare function CardFrameDescription({ className, render, ...props }: useRender.ComponentProps<"div">): React.ReactElement;
|
|
8
|
+
export declare function CardFrameAction({ className, render, ...props }: useRender.ComponentProps<"div">): React.ReactElement;
|
|
9
|
+
export declare function CardFrameFooter({ className, render, ...props }: useRender.ComponentProps<"div">): React.ReactElement;
|
|
10
|
+
export declare function CardHeader({ className, render, ...props }: useRender.ComponentProps<"div">): React.ReactElement;
|
|
11
|
+
export declare function CardTitle({ className, render, ...props }: useRender.ComponentProps<"div">): React.ReactElement;
|
|
12
|
+
export declare function CardDescription({ className, render, ...props }: useRender.ComponentProps<"div">): React.ReactElement;
|
|
13
|
+
export declare function CardAction({ className, render, ...props }: useRender.ComponentProps<"div">): React.ReactElement;
|
|
14
|
+
export declare function CardPanel({ className, render, ...props }: useRender.ComponentProps<"div">): React.ReactElement;
|
|
15
|
+
export declare function CardFooter({ className, render, ...props }: useRender.ComponentProps<"div">): React.ReactElement;
|
|
16
|
+
export { CardPanel as CardContent };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Checkbox as CheckboxPrimitive } from '@base-ui/react/checkbox';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
export declare function Checkbox({ className, sound, onCheckedChange, ...props }: CheckboxPrimitive.Root.Props & {
|
|
4
|
+
/** Play the cuelume toggle cue on check/uncheck. Silent until bindSounds(). */
|
|
5
|
+
sound?: boolean;
|
|
6
|
+
}): React.ReactElement;
|
|
7
|
+
export { CheckboxPrimitive };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Field as FieldPrimitive } from '@base-ui/react/field';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
export declare function Field({ className, ...props }: FieldPrimitive.Root.Props): React.ReactElement;
|
|
4
|
+
export declare function FieldLabel({ className, ...props }: FieldPrimitive.Label.Props): React.ReactElement;
|
|
5
|
+
export declare function FieldItem({ className, ...props }: FieldPrimitive.Item.Props): React.ReactElement;
|
|
6
|
+
export declare function FieldDescription({ className, ...props }: FieldPrimitive.Description.Props): React.ReactElement;
|
|
7
|
+
export declare function FieldError({ className, ...props }: FieldPrimitive.Error.Props): React.ReactElement;
|
|
8
|
+
export declare const FieldControl: typeof FieldPrimitive.Control;
|
|
9
|
+
export declare const FieldValidity: typeof FieldPrimitive.Validity;
|
|
10
|
+
export { FieldPrimitive };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
export declare function Frame({ className, ...props }: React.ComponentProps<"div">): React.ReactElement;
|
|
3
|
+
export declare function FramePanel({ className, ...props }: React.ComponentProps<"div">): React.ReactElement;
|
|
4
|
+
export declare function FrameHeader({ className, ...props }: React.ComponentProps<"header">): React.ReactElement;
|
|
5
|
+
export declare function FrameTitle({ className, ...props }: React.ComponentProps<"div">): React.ReactElement;
|
|
6
|
+
export declare function FrameDescription({ className, ...props }: React.ComponentProps<"div">): React.ReactElement;
|
|
7
|
+
export declare function FrameFooter({ className, ...props }: React.ComponentProps<"footer">): React.ReactElement;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { FrostGlassVariantProp } from '../../../lib/glass-variants';
|
|
2
|
+
import { ButtonProps } from '../button';
|
|
3
|
+
type GlassButtonProps = Omit<ButtonProps, "variant" | "glassVariant"> & FrostGlassVariantProp;
|
|
4
|
+
/** @deprecated Use `<Button variant="glass" glassVariant="…">` instead. */
|
|
5
|
+
declare function GlassButton({ glassVariant, ...props }: GlassButtonProps): import("react").JSX.Element;
|
|
6
|
+
export { GlassButton };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
export type LiquidGlassProps = HTMLAttributes<HTMLDivElement> & {
|
|
3
|
+
/** Extra blur mixed into the backdrop-filter after the SVG refraction. */
|
|
4
|
+
blur?: number;
|
|
5
|
+
/** SVG displacement strength. Higher values bend the sampled backdrop more. */
|
|
6
|
+
refraction?: number;
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated Texture size now derives from element size. Accepted for
|
|
9
|
+
* backwards-compatibility but has no effect.
|
|
10
|
+
*/
|
|
11
|
+
mapSize?: number;
|
|
12
|
+
/** Fraction of the radius used as the curved edge where most refraction happens. */
|
|
13
|
+
bezel?: number;
|
|
14
|
+
/** Backdrop saturation. */
|
|
15
|
+
saturation?: number;
|
|
16
|
+
};
|
|
17
|
+
export declare const LiquidGlass: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
|
|
18
|
+
/** Extra blur mixed into the backdrop-filter after the SVG refraction. */
|
|
19
|
+
blur?: number;
|
|
20
|
+
/** SVG displacement strength. Higher values bend the sampled backdrop more. */
|
|
21
|
+
refraction?: number;
|
|
22
|
+
/**
|
|
23
|
+
* @deprecated Texture size now derives from element size. Accepted for
|
|
24
|
+
* backwards-compatibility but has no effect.
|
|
25
|
+
*/
|
|
26
|
+
mapSize?: number;
|
|
27
|
+
/** Fraction of the radius used as the curved edge where most refraction happens. */
|
|
28
|
+
bezel?: number;
|
|
29
|
+
/** Backdrop saturation. */
|
|
30
|
+
saturation?: number;
|
|
31
|
+
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { InputProps } from './input';
|
|
3
|
+
import { TextareaProps } from './textarea';
|
|
4
|
+
import type * as React from "react";
|
|
5
|
+
declare const inputGroupAddonVariants: (props?: ({
|
|
6
|
+
align?: "inline-end" | "inline-start" | "block-end" | "block-start" | null | undefined;
|
|
7
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
|
+
export declare function InputGroup({ className, ...props }: React.ComponentProps<"div">): React.ReactElement;
|
|
9
|
+
export declare function InputGroupAddon({ className, align, ...props }: React.ComponentProps<"div"> & VariantProps<typeof inputGroupAddonVariants>): React.ReactElement;
|
|
10
|
+
export declare function InputGroupText({ className, ...props }: React.ComponentProps<"span">): React.ReactElement;
|
|
11
|
+
export declare function InputGroupInput({ className, ...props }: InputProps): React.ReactElement;
|
|
12
|
+
export declare function InputGroupTextarea({ className, ...props }: TextareaProps): React.ReactElement;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Input as InputPrimitive } from '@base-ui/react/input';
|
|
2
|
+
import type * as React from "react";
|
|
3
|
+
export type InputProps = Omit<InputPrimitive.Props & React.RefAttributes<HTMLInputElement>, "size"> & {
|
|
4
|
+
size?: "sm" | "default" | "lg" | number;
|
|
5
|
+
unstyled?: boolean;
|
|
6
|
+
nativeInput?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare function Input({ className, size, unstyled, nativeInput, style, ...props }: InputProps): React.ReactElement;
|
|
9
|
+
export { InputPrimitive };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
export declare function Label({ className, render, sound, ...props }: useRender.ComponentProps<"label"> & {
|
|
4
|
+
/**
|
|
5
|
+
* Emit the cuelume hover tick. Opt-in: a label is a click target for its
|
|
6
|
+
* control, and that control already owns the interaction cue (Checkbox
|
|
7
|
+
* plays `toggle` on check/uncheck), so hover-ticking here double-sounds.
|
|
8
|
+
* Inert until the app calls bindSounds().
|
|
9
|
+
*/
|
|
10
|
+
sound?: boolean;
|
|
11
|
+
}): React.ReactElement;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { OTPField as OTPFieldPrimitive } from '@base-ui/react/otp-field';
|
|
2
|
+
import { Separator } from './separator';
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
export declare function OTPField({ className, size, sound, onValueChange, ...props }: React.ComponentProps<typeof OTPFieldPrimitive.Root> & {
|
|
5
|
+
size?: "default" | "lg";
|
|
6
|
+
/** Play a tick cue per entered character. Inert until bindSounds(). */
|
|
7
|
+
sound?: boolean;
|
|
8
|
+
}): React.ReactElement;
|
|
9
|
+
export declare function OTPFieldInput({ className, ...props }: React.ComponentProps<typeof OTPFieldPrimitive.Input>): React.ReactElement;
|
|
10
|
+
export declare function OTPFieldSeparator({ className, ...props }: React.ComponentProps<typeof Separator>): React.ReactElement;
|
|
11
|
+
export { OTPFieldPrimitive };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Field as FieldPrimitive } from '@base-ui/react/field';
|
|
2
|
+
import type * as React from "react";
|
|
3
|
+
export type TextareaProps = React.ComponentPropsWithoutRef<"textarea"> & React.RefAttributes<HTMLTextAreaElement> & {
|
|
4
|
+
size?: "sm" | "default" | "lg" | number;
|
|
5
|
+
unstyled?: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare function Textarea({ className, size, unstyled, ref, ...props }: TextareaProps): React.ReactElement;
|
|
8
|
+
export { FieldPrimitive };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* npm library entry point (`@corpora/ui`).
|
|
3
|
+
*
|
|
4
|
+
* Export every published component here — atoms from `components/ui`,
|
|
5
|
+
* compositions from `components/composed`, blocks from `components/blocks`.
|
|
6
|
+
* The docs site (main.tsx + routes.tsx + pages/) is NOT part of the package.
|
|
7
|
+
*/
|
|
8
|
+
export * from './components/ui/button';
|
|
9
|
+
export * from './components/ui/card';
|
|
10
|
+
export * from './components/ui/checkbox';
|
|
11
|
+
export * from './components/ui/field';
|
|
12
|
+
export * from './components/ui/frame';
|
|
13
|
+
export * from './components/ui/input';
|
|
14
|
+
export * from './components/ui/input-group';
|
|
15
|
+
export * from './components/ui/label';
|
|
16
|
+
export * from './components/ui/otp-field';
|
|
17
|
+
export * from './components/ui/separator';
|
|
18
|
+
export * from './components/ui/spinner';
|
|
19
|
+
export * from './components/ui/textarea';
|
|
20
|
+
export * from './components/composed/password-input';
|
|
21
|
+
export * from './components/composed/social-providers';
|
|
22
|
+
export * from './components/blocks/auth/auth-shell';
|
|
23
|
+
export * from './components/blocks/auth/code-auth-block';
|
|
24
|
+
export * from './components/blocks/auth/forgot-password-block';
|
|
25
|
+
export * from './components/blocks/auth/login-block';
|
|
26
|
+
export * from './components/blocks/auth/signup-block';
|
|
27
|
+
export * from './lib/auth-accent';
|
|
28
|
+
export * from './lib/sound';
|
|
29
|
+
export * from './lib/utils';
|