@luxfi/ui 7.4.14 → 8.0.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/LICENSE.md +21 -0
- package/dist/accordion.d.ts +10 -12
- package/dist/accordion.d.ts.map +1 -0
- package/dist/alert.cjs +7 -11
- package/dist/alert.d.ts +4 -5
- package/dist/alert.d.ts.map +1 -0
- package/dist/alert.js +1 -5
- package/dist/auth.d.ts +11 -13
- package/dist/auth.d.ts.map +1 -0
- package/dist/avatar.d.ts +5 -6
- package/dist/avatar.d.ts.map +1 -0
- package/dist/badge.cjs +7 -11
- package/dist/badge.d.ts +7 -8
- package/dist/badge.d.ts.map +1 -0
- package/dist/badge.js +1 -5
- package/dist/bank.d.ts +38 -43
- package/dist/bank.d.ts.map +1 -0
- package/dist/button.cjs +7 -23
- package/dist/button.d.ts +8 -13
- package/dist/button.d.ts.map +1 -0
- package/dist/button.js +2 -17
- package/dist/checkbox.d.ts +6 -7
- package/dist/checkbox.d.ts.map +1 -0
- package/dist/chrome.cjs +4 -8
- package/dist/chrome.d.ts +15 -19
- package/dist/chrome.d.ts.map +1 -0
- package/dist/chrome.js +1 -5
- package/dist/close-button.d.ts +3 -5
- package/dist/close-button.d.ts.map +1 -0
- package/dist/collapsible.cjs +19 -23
- package/dist/collapsible.d.ts +11 -13
- package/dist/collapsible.d.ts.map +1 -0
- package/dist/collapsible.js +1 -5
- package/dist/color-mode.d.ts +7 -9
- package/dist/color-mode.d.ts.map +1 -0
- package/dist/dialog.cjs +7 -11
- package/dist/dialog.d.ts +50 -54
- package/dist/dialog.d.ts.map +1 -0
- package/dist/dialog.js +1 -5
- package/dist/drawer.d.ts +33 -38
- package/dist/drawer.d.ts.map +1 -0
- package/dist/empty-state.d.ts +4 -6
- package/dist/empty-state.d.ts.map +1 -0
- package/dist/engine.d.ts +35 -0
- package/dist/engine.d.ts.map +1 -0
- package/dist/expiration-selector.d.ts +4 -6
- package/dist/expiration-selector.d.ts.map +1 -0
- package/dist/field.d.ts +5 -7
- package/dist/field.d.ts.map +1 -0
- package/dist/greeks-display.d.ts +3 -5
- package/dist/greeks-display.d.ts.map +1 -0
- package/dist/gui.d.ts +1 -1
- package/dist/gui.d.ts.map +1 -0
- package/dist/heading.cjs +12 -3
- package/dist/heading.d.ts +4 -6
- package/dist/heading.d.ts.map +1 -0
- package/dist/heading.js +12 -3
- package/dist/iam.d.ts +10 -12
- package/dist/iam.d.ts.map +1 -0
- package/dist/icon-button.cjs +7 -11
- package/dist/icon-button.d.ts +4 -5
- package/dist/icon-button.d.ts.map +1 -0
- package/dist/icon-button.js +1 -5
- package/dist/icons.d.ts +1 -0
- package/dist/icons.d.ts.map +1 -0
- package/dist/identity.d.ts +9 -11
- package/dist/identity.d.ts.map +1 -0
- package/dist/image.cjs +8 -12
- package/dist/image.d.ts +10 -11
- package/dist/image.d.ts.map +1 -0
- package/dist/image.js +1 -5
- package/dist/index.cjs +89 -91
- package/dist/index.d.ts +86 -60
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +30 -33
- package/dist/ink.d.ts +14 -0
- package/dist/ink.d.ts.map +1 -0
- package/dist/input-group.d.ts +4 -6
- package/dist/input-group.d.ts.map +1 -0
- package/dist/input.cjs +5 -5
- package/dist/input.d.ts +8 -9
- package/dist/input.d.ts.map +1 -0
- package/dist/input.js +5 -5
- package/dist/link.cjs +19 -23
- package/dist/link.d.ts +9 -11
- package/dist/link.d.ts.map +1 -0
- package/dist/link.js +1 -5
- package/dist/lux.config.cjs +2 -0
- package/dist/lux.config.d.ts +785 -240
- package/dist/lux.config.d.ts.map +1 -0
- package/dist/lux.config.js +2 -0
- package/dist/menu.d.ts +30 -31
- package/dist/menu.d.ts.map +1 -0
- package/dist/next.d.ts +5 -7
- package/dist/next.d.ts.map +1 -0
- package/dist/option-chain.d.ts +6 -8
- package/dist/option-chain.d.ts.map +1 -0
- package/dist/option-position.d.ts +4 -6
- package/dist/option-position.d.ts.map +1 -0
- package/dist/pin-input.cjs +1 -1
- package/dist/pin-input.d.ts +3 -5
- package/dist/pin-input.d.ts.map +1 -0
- package/dist/pin-input.js +1 -1
- package/dist/pnl-diagram.d.ts +5 -6
- package/dist/pnl-diagram.d.ts.map +1 -0
- package/dist/popover.cjs +9 -13
- package/dist/popover.d.ts +24 -25
- package/dist/popover.d.ts.map +1 -0
- package/dist/popover.js +1 -5
- package/dist/progress-circle.cjs +2 -6
- package/dist/progress-circle.d.ts +8 -9
- package/dist/progress-circle.d.ts.map +1 -0
- package/dist/progress-circle.js +1 -5
- package/dist/progress.d.ts +3 -4
- package/dist/progress.d.ts.map +1 -0
- package/dist/provider.cjs +2 -0
- package/dist/provider.d.ts +8 -10
- package/dist/provider.d.ts.map +1 -0
- package/dist/provider.js +2 -0
- package/dist/radio.d.ts +6 -7
- package/dist/radio.d.ts.map +1 -0
- package/dist/rating.d.ts +3 -5
- package/dist/rating.d.ts.map +1 -0
- package/dist/select.cjs +16 -20
- package/dist/select.d.ts +38 -41
- package/dist/select.d.ts.map +1 -0
- package/dist/select.js +1 -5
- package/dist/separator.d.ts +5 -6
- package/dist/separator.d.ts.map +1 -0
- package/dist/skeleton.cjs +7 -11
- package/dist/skeleton.d.ts +9 -12
- package/dist/skeleton.d.ts.map +1 -0
- package/dist/skeleton.js +1 -5
- package/dist/slider.cjs +1 -1
- package/dist/slider.d.ts +3 -5
- package/dist/slider.d.ts.map +1 -0
- package/dist/slider.js +1 -1
- package/dist/strategy-builder.d.ts +6 -8
- package/dist/strategy-builder.d.ts.map +1 -0
- package/dist/switch.cjs +1 -1
- package/dist/switch.d.ts +3 -5
- package/dist/switch.d.ts.map +1 -0
- package/dist/switch.js +1 -1
- package/dist/table.cjs +30 -34
- package/dist/table.d.ts +23 -25
- package/dist/table.d.ts.map +1 -0
- package/dist/table.js +1 -5
- package/dist/tabs.d.ts +12 -13
- package/dist/tabs.d.ts.map +1 -0
- package/dist/tag.cjs +7 -11
- package/dist/tag.d.ts +4 -5
- package/dist/tag.d.ts.map +1 -0
- package/dist/tag.js +1 -5
- package/dist/textarea.cjs +10 -10
- package/dist/textarea.d.ts +5 -6
- package/dist/textarea.d.ts.map +1 -0
- package/dist/textarea.js +10 -10
- package/dist/toaster.d.ts +4 -5
- package/dist/toaster.d.ts.map +1 -0
- package/dist/tooltip.d.ts +3 -5
- package/dist/tooltip.d.ts.map +1 -0
- package/dist/use-narrow.d.ts +6 -7
- package/dist/use-narrow.d.ts.map +1 -0
- package/dist/utils/cn.d.ts +2 -0
- package/dist/utils/cn.d.ts.map +1 -0
- package/dist/utils.cjs +6 -7
- package/dist/utils.d.ts +13 -5
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +1 -9
- package/dist/vite.d.ts +3 -3
- package/dist/vite.d.ts.map +1 -0
- package/dist/white-label.d.ts +12 -12
- package/dist/white-label.d.ts.map +1 -0
- package/package.json +32 -26
- package/src/button.tsx +0 -18
- package/src/heading.tsx +12 -3
- package/src/index.ts +0 -1
- package/src/input.tsx +6 -6
- package/src/lux.config.ts +19 -0
- package/src/pin-input.tsx +1 -1
- package/src/slider.tsx +1 -1
- package/src/switch.tsx +1 -1
- package/src/textarea.tsx +6 -6
- package/src/utils/cn.ts +3 -7
- package/src/utils.ts +12 -6
- package/tokens.css +11 -0
- package/dist/accordion.d.cts +0 -41
- package/dist/alert.d.cts +0 -30
- package/dist/auth.d.cts +0 -80
- package/dist/avatar.d.cts +0 -25
- package/dist/badge.d.cts +0 -19
- package/dist/bank.d.cts +0 -83
- package/dist/button.d.cts +0 -55
- package/dist/checkbox.d.cts +0 -32
- package/dist/chrome.d.cts +0 -93
- package/dist/close-button.d.cts +0 -9
- package/dist/collapsible.d.cts +0 -24
- package/dist/color-mode.d.cts +0 -25
- package/dist/dialog.d.cts +0 -118
- package/dist/drawer.d.cts +0 -69
- package/dist/empty-state.d.cts +0 -13
- package/dist/expiration-selector.d.cts +0 -16
- package/dist/field.d.cts +0 -23
- package/dist/greeks-display.d.cts +0 -14
- package/dist/gui.d.cts +0 -2
- package/dist/heading.d.cts +0 -8
- package/dist/iam.d.cts +0 -65
- package/dist/icon-button.d.cts +0 -37
- package/dist/icons.d.cts +0 -1
- package/dist/identity.d.cts +0 -64
- package/dist/image.d.cts +0 -57
- package/dist/index.d.cts +0 -60
- package/dist/input-group.d.cts +0 -17
- package/dist/input.d.cts +0 -37
- package/dist/link.d.cts +0 -37
- package/dist/lux.config.d.cts +0 -433
- package/dist/menu.d.cts +0 -68
- package/dist/next.d.cts +0 -32
- package/dist/option-chain.d.cts +0 -37
- package/dist/option-position.d.cts +0 -29
- package/dist/pin-input.d.cts +0 -25
- package/dist/pnl-diagram.d.cts +0 -11
- package/dist/popover.d.cts +0 -73
- package/dist/progress-circle.d.cts +0 -47
- package/dist/progress.d.cts +0 -28
- package/dist/provider.d.cts +0 -25
- package/dist/radio.d.cts +0 -53
- package/dist/rating.d.cts +0 -14
- package/dist/select.d.cts +0 -161
- package/dist/separator.d.cts +0 -13
- package/dist/skeleton.d.cts +0 -76
- package/dist/slider.d.cts +0 -24
- package/dist/strategy-builder.d.cts +0 -26
- package/dist/switch.d.cts +0 -27
- package/dist/table.d.cts +0 -107
- package/dist/tabs.d.cts +0 -34
- package/dist/tag.d.cts +0 -21
- package/dist/textarea.d.cts +0 -13
- package/dist/toaster.d.cts +0 -28
- package/dist/tooltip.d.cts +0 -38
- package/dist/use-narrow.d.cts +0 -12
- package/dist/utils.d.cts +0 -5
- package/dist/vite.d.cts +0 -29
- package/dist/white-label.d.cts +0 -59
package/dist/accordion.d.cts
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { Accordion } from '@hanzo/gui';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
|
|
4
|
-
interface AccordionRootProps extends Omit<React.ComponentProps<typeof Accordion>, 'type' | 'value' | 'defaultValue' | 'onValueChange' | 'size'> {
|
|
5
|
-
/** Controlled open items. */
|
|
6
|
-
readonly value?: Array<string>;
|
|
7
|
-
/** Uncontrolled initial open items. */
|
|
8
|
-
readonly defaultValue?: Array<string>;
|
|
9
|
-
/** Fires with the full set of open items. */
|
|
10
|
-
readonly onValueChange?: (details: {
|
|
11
|
-
value: Array<string>;
|
|
12
|
-
}) => void;
|
|
13
|
-
readonly variant?: 'outline' | 'faq';
|
|
14
|
-
readonly size?: 'sm' | 'md';
|
|
15
|
-
}
|
|
16
|
-
declare const AccordionRoot: ({ value, defaultValue, onValueChange, variant, size, children, ...rest }: AccordionRootProps) => React.ReactElement;
|
|
17
|
-
type AccordionItemProps = React.ComponentProps<typeof Accordion.Item>;
|
|
18
|
-
declare const AccordionItem: (props: AccordionItemProps) => React.ReactElement;
|
|
19
|
-
type AccordionItemTriggerProps = React.ComponentProps<typeof Accordion.Trigger> & {
|
|
20
|
-
readonly indicatorPlacement?: 'start' | 'end';
|
|
21
|
-
readonly noIndicator?: boolean;
|
|
22
|
-
readonly variant?: 'outline' | 'faq';
|
|
23
|
-
readonly headingLevel?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
24
|
-
/** The DOM button type — see (3) above. Defaults to `button`, not submit. */
|
|
25
|
-
readonly type?: 'button' | 'submit' | 'reset';
|
|
26
|
-
};
|
|
27
|
-
declare const AccordionItemTrigger: ({ children, indicatorPlacement: placementProp, variant: variantProp, noIndicator, headingLevel, ...rest }: AccordionItemTriggerProps) => React.ReactElement;
|
|
28
|
-
type AccordionItemContentProps = React.ComponentProps<typeof Accordion.Content>;
|
|
29
|
-
declare const AccordionItemContent: ({ children, ...rest }: AccordionItemContentProps) => React.ReactElement;
|
|
30
|
-
/** Open state for an accordion whose items are addressable by URL fragment. */
|
|
31
|
-
declare function useAccordion(items: Array<{
|
|
32
|
-
id: string;
|
|
33
|
-
}>): {
|
|
34
|
-
value: string[];
|
|
35
|
-
onValueChange: ({ value: next }: {
|
|
36
|
-
value: Array<string>;
|
|
37
|
-
}) => void;
|
|
38
|
-
scrollToItemFromUrl: () => void;
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
export { AccordionItem, AccordionItemContent, type AccordionItemContentProps, type AccordionItemProps, AccordionItemTrigger, type AccordionItemTriggerProps, AccordionRoot, type AccordionRootProps, useAccordion };
|
package/dist/alert.d.cts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
|
|
3
|
-
type AlertStatus = 'info' | 'warning' | 'warning_table' | 'success' | 'error';
|
|
4
|
-
interface AlertProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'title'> {
|
|
5
|
-
readonly status?: AlertStatus;
|
|
6
|
-
readonly size?: 'sm' | 'md';
|
|
7
|
-
readonly inline?: boolean;
|
|
8
|
-
readonly startElement?: React.ReactNode;
|
|
9
|
-
readonly endElement?: React.ReactNode;
|
|
10
|
-
readonly descriptionProps?: Omit<React.ComponentPropsWithoutRef<'div'>, 'ref'> & {
|
|
11
|
-
whiteSpace?: string;
|
|
12
|
-
alignItems?: string;
|
|
13
|
-
flexDir?: string;
|
|
14
|
-
flexWrap?: string;
|
|
15
|
-
rowGap?: number | string;
|
|
16
|
-
columnGap?: number | string;
|
|
17
|
-
};
|
|
18
|
-
readonly title?: React.ReactNode;
|
|
19
|
-
readonly icon?: React.ReactElement;
|
|
20
|
-
readonly closable?: boolean;
|
|
21
|
-
readonly onClose?: () => void;
|
|
22
|
-
readonly loading?: boolean;
|
|
23
|
-
readonly showIcon?: boolean;
|
|
24
|
-
readonly whiteSpace?: string;
|
|
25
|
-
readonly mb?: number | string;
|
|
26
|
-
readonly mt?: number | string;
|
|
27
|
-
}
|
|
28
|
-
declare const Alert: React.ForwardRefExoticComponent<AlertProps & React.RefAttributes<HTMLDivElement>>;
|
|
29
|
-
|
|
30
|
-
export { Alert, type AlertProps };
|
package/dist/auth.d.cts
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { WhiteLabel } from './white-label.cjs';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* The ONE callback route. Registered as `https://<host>/auth/callback` for
|
|
6
|
-
* every browser client in the fleet — never under `/api/`, never per app.
|
|
7
|
-
*/
|
|
8
|
-
declare const CALLBACK_PATH = "/auth/callback";
|
|
9
|
-
/** What `handleCallback` hands back. Structural, so the SDK's types stay its own. */
|
|
10
|
-
interface AuthResult {
|
|
11
|
-
readonly token: {
|
|
12
|
-
readonly accessToken: string;
|
|
13
|
-
};
|
|
14
|
-
readonly redirect: string;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Point `@hanzo/iam` at the issuer and client this HOST resolves to.
|
|
18
|
-
*
|
|
19
|
-
* Idempotent per config, browser-only, and safe to call from anywhere — which
|
|
20
|
-
* is the point: no ordering rule between a provider's effect and a child's.
|
|
21
|
-
*/
|
|
22
|
-
declare function configureAuth(wl: WhiteLabel): void;
|
|
23
|
-
interface Auth {
|
|
24
|
-
/** Start the PKCE login. `redirect` is where to land afterwards. */
|
|
25
|
-
readonly signIn: (redirect?: string) => void;
|
|
26
|
-
/** RP-initiated logout + local token clear. */
|
|
27
|
-
readonly signOut: () => void;
|
|
28
|
-
/** Finish the login on the callback route. */
|
|
29
|
-
readonly complete: () => Promise<AuthResult>;
|
|
30
|
-
/** The host-resolved brand, issuer and client these verbs are bound to. */
|
|
31
|
-
readonly whiteLabel: WhiteLabel;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* The three auth verbs, bound to the current host.
|
|
35
|
-
*
|
|
36
|
-
* Configuration happens during render, before any caller can use a verb, so a
|
|
37
|
-
* callback route works whether or not it sits under an `<AuthProvider>`.
|
|
38
|
-
*/
|
|
39
|
-
declare function useAuth(defaultRedirect?: string): Auth;
|
|
40
|
-
interface AuthProviderProps {
|
|
41
|
-
readonly children: React.ReactNode;
|
|
42
|
-
/** Where a successful sign-in lands. Default `/`. */
|
|
43
|
-
readonly redirect?: string;
|
|
44
|
-
/**
|
|
45
|
-
* Anything the surface must tear down alongside the IAM session — the mirror
|
|
46
|
-
* of {@link AuthCallbackProps.onSignedIn}. A surface that mints its own
|
|
47
|
-
* downstream credential from the IAM token drops it here; the IAM session
|
|
48
|
-
* itself is never the app's to manage.
|
|
49
|
-
*/
|
|
50
|
-
readonly onSignOut?: () => void;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* `IdentityProvider` with the credential half filled in.
|
|
54
|
-
*
|
|
55
|
-
* A surface's root becomes `<AppProvider><AuthProvider>…` and nothing else —
|
|
56
|
-
* no `configureIam`, no `startLogin`, no per-app token keys.
|
|
57
|
-
*/
|
|
58
|
-
declare const AuthProvider: ({ children, redirect, onSignOut }: AuthProviderProps) => React.ReactElement;
|
|
59
|
-
interface AuthCallbackProps {
|
|
60
|
-
/**
|
|
61
|
-
* Anything the surface must do with the fresh session before it navigates —
|
|
62
|
-
* e.g. the MPC dashboard mints its own API JWT from the IAM token. Throwing
|
|
63
|
-
* here does NOT fail the sign-in: the user is signed in, and a downstream
|
|
64
|
-
* service being unreachable is that service's problem to report.
|
|
65
|
-
*/
|
|
66
|
-
readonly onSignedIn?: (result: AuthResult) => void | Promise<void>;
|
|
67
|
-
/** Router hop. Defaults to a full replace, which needs no router. */
|
|
68
|
-
readonly navigate?: (to: string) => void;
|
|
69
|
-
/** Where to go when the callback carried no stashed redirect. */
|
|
70
|
-
readonly fallback?: string;
|
|
71
|
-
/** Sign-in entry point offered after a failure. */
|
|
72
|
-
readonly retryPath?: string;
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* The ONE callback page body: verify state, exchange the code, go where the
|
|
76
|
-
* user was headed. Mount it at {@link CALLBACK_PATH}.
|
|
77
|
-
*/
|
|
78
|
-
declare const AuthCallback: ({ onSignedIn, navigate, fallback, retryPath, }: AuthCallbackProps) => React.ReactElement;
|
|
79
|
-
|
|
80
|
-
export { type Auth, AuthCallback, type AuthCallbackProps, AuthProvider, type AuthProviderProps, type AuthResult, CALLBACK_PATH, configureAuth, useAuth };
|
package/dist/avatar.d.cts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
|
|
3
|
-
type ImageProps = React.ImgHTMLAttributes<HTMLImageElement>;
|
|
4
|
-
type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
5
|
-
type AvatarVariant = 'solid' | 'subtle' | 'outline';
|
|
6
|
-
interface AvatarProps extends React.ComponentPropsWithoutRef<'span'> {
|
|
7
|
-
name?: string;
|
|
8
|
-
src?: string;
|
|
9
|
-
srcSet?: string;
|
|
10
|
-
loading?: ImageProps['loading'];
|
|
11
|
-
icon?: React.ReactElement;
|
|
12
|
-
fallback?: React.ReactNode;
|
|
13
|
-
size?: AvatarSize;
|
|
14
|
-
variant?: AvatarVariant;
|
|
15
|
-
borderless?: boolean;
|
|
16
|
-
}
|
|
17
|
-
declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLSpanElement>>;
|
|
18
|
-
interface AvatarGroupProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
19
|
-
size?: AvatarSize;
|
|
20
|
-
variant?: AvatarVariant;
|
|
21
|
-
borderless?: boolean;
|
|
22
|
-
}
|
|
23
|
-
declare const AvatarGroup: React.ForwardRefExoticComponent<AvatarGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
24
|
-
|
|
25
|
-
export { Avatar, AvatarGroup, type AvatarProps };
|
package/dist/badge.d.cts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React__default from 'react';
|
|
2
|
-
|
|
3
|
-
type ColorPalette = 'gray' | 'green' | 'red' | 'purple' | 'orange' | 'blue' | 'yellow' | 'teal' | 'cyan' | 'pink' | 'purple_alt' | 'blue_alt' | 'bright_gray' | 'bright_green' | 'bright_red' | 'bright_blue' | 'bright_yellow' | 'bright_teal' | 'bright_cyan' | 'bright_orange' | 'bright_purple' | 'bright_pink';
|
|
4
|
-
interface BadgeProps extends Omit<React__default.HTMLAttributes<HTMLSpanElement>, 'color'> {
|
|
5
|
-
readonly loading?: boolean;
|
|
6
|
-
readonly startElement?: React__default.ReactNode;
|
|
7
|
-
readonly endElement?: React__default.ReactNode;
|
|
8
|
-
readonly truncated?: boolean;
|
|
9
|
-
readonly colorPalette?: ColorPalette;
|
|
10
|
-
readonly variant?: 'subtle' | 'solid';
|
|
11
|
-
readonly size?: 'sm' | 'md' | 'lg';
|
|
12
|
-
readonly flexShrink?: number;
|
|
13
|
-
readonly gap?: number | string;
|
|
14
|
-
readonly ml?: number | string | Record<string, number>;
|
|
15
|
-
readonly mr?: number | string;
|
|
16
|
-
}
|
|
17
|
-
declare const Badge: React__default.ForwardRefExoticComponent<BadgeProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
18
|
-
|
|
19
|
-
export { Badge, type BadgeProps };
|
package/dist/bank.d.cts
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import * as _hanzogui_core from '@hanzogui/core';
|
|
3
|
-
import * as _hanzogui_web from '@hanzogui/web';
|
|
4
|
-
import React__default from 'react';
|
|
5
|
-
import { GetProps } from '@hanzo/gui';
|
|
6
|
-
|
|
7
|
-
declare const bankColors: {
|
|
8
|
-
readonly bg: "#000000";
|
|
9
|
-
readonly card: "#111111";
|
|
10
|
-
readonly cardBorder: "#222222";
|
|
11
|
-
readonly input: "#1A1A1A";
|
|
12
|
-
readonly inputBorder: "#333333";
|
|
13
|
-
readonly inputFocus: "#555555";
|
|
14
|
-
readonly inputPlaceholder: "#666666";
|
|
15
|
-
readonly text: "#FFFFFF";
|
|
16
|
-
readonly textMuted: "#888888";
|
|
17
|
-
readonly textLabel: "#CCCCCC";
|
|
18
|
-
readonly accent: "#FFFFFF";
|
|
19
|
-
readonly accentPress: "#E0E0E0";
|
|
20
|
-
readonly accentHover: "#F0F0F0";
|
|
21
|
-
readonly error: "#FF4444";
|
|
22
|
-
readonly errorBg: "#1C0A0A";
|
|
23
|
-
readonly errorBorder: "#441111";
|
|
24
|
-
readonly success: "#44FF44";
|
|
25
|
-
readonly successBg: "#0A1C0A";
|
|
26
|
-
readonly successBorder: "#114411";
|
|
27
|
-
readonly divider: "#222222";
|
|
28
|
-
readonly disabled: "#444444";
|
|
29
|
-
};
|
|
30
|
-
declare const BankCard: _hanzogui_web.GuiComponent<_hanzogui_web.TamaDefer, _hanzogui_web.GuiElement, _hanzogui_core.RNViewNonStyleProps, _hanzogui_web.StackStyleBase, {
|
|
31
|
-
size?: "sm" | "md" | "lg" | undefined;
|
|
32
|
-
}, _hanzogui_web.StaticConfigPublic>;
|
|
33
|
-
type BankCardProps = GetProps<typeof BankCard>;
|
|
34
|
-
declare const BankInput: _hanzogui_web.GuiComponent<_hanzogui_web.TamaDefer, _hanzogui_web.GuiTextElement, _hanzogui_core.RNTextNonStyleProps, _hanzogui_web.TextStylePropsBase, {
|
|
35
|
-
size?: "sm" | "md" | "lg" | undefined;
|
|
36
|
-
unstyled?: boolean | undefined;
|
|
37
|
-
invalid?: boolean | undefined;
|
|
38
|
-
}, _hanzogui_web.StaticConfigPublic>;
|
|
39
|
-
type BankInputProps = GetProps<typeof BankInput> & {
|
|
40
|
-
placeholderTextColor?: string;
|
|
41
|
-
};
|
|
42
|
-
declare const BankButton: _hanzogui_web.GuiComponent<_hanzogui_web.TamaDefer, _hanzogui_web.GuiElement, _hanzogui_core.RNViewNonStyleProps, _hanzogui_web.StackStyleBase, {
|
|
43
|
-
disabled?: boolean | undefined;
|
|
44
|
-
variant?: "primary" | "secondary" | "ghost" | undefined;
|
|
45
|
-
}, _hanzogui_web.StaticConfigPublic>;
|
|
46
|
-
declare const BankButtonText: _hanzogui_web.GuiComponent<_hanzogui_web.TamaDefer, _hanzogui_web.GuiTextElement, _hanzogui_core.RNTextNonStyleProps, _hanzogui_web.TextStylePropsBase, {
|
|
47
|
-
unstyled?: boolean | undefined;
|
|
48
|
-
variant?: "primary" | "secondary" | "ghost" | undefined;
|
|
49
|
-
}, _hanzogui_web.StaticConfigPublic>;
|
|
50
|
-
type BankButtonProps = GetProps<typeof BankButton>;
|
|
51
|
-
declare const BankHeading: _hanzogui_web.GuiComponent<_hanzogui_web.TamaDefer, _hanzogui_web.GuiTextElement, _hanzogui_core.RNTextNonStyleProps, _hanzogui_web.TextStylePropsBase, {
|
|
52
|
-
size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
|
|
53
|
-
unstyled?: boolean | undefined;
|
|
54
|
-
}, _hanzogui_web.StaticConfigPublic>;
|
|
55
|
-
type BankHeadingProps = GetProps<typeof BankHeading>;
|
|
56
|
-
declare const BankText: _hanzogui_web.GuiComponent<_hanzogui_web.TamaDefer, _hanzogui_web.GuiTextElement, _hanzogui_core.RNTextNonStyleProps, _hanzogui_web.TextStylePropsBase, {
|
|
57
|
-
unstyled?: boolean | undefined;
|
|
58
|
-
variant?: "default" | "label" | "link" | "error" | "success" | "muted" | undefined;
|
|
59
|
-
}, _hanzogui_web.StaticConfigPublic>;
|
|
60
|
-
type BankTextProps = GetProps<typeof BankText>;
|
|
61
|
-
declare function BankField({ label, error, children, }: {
|
|
62
|
-
label?: string;
|
|
63
|
-
error?: string;
|
|
64
|
-
children: React__default.ReactNode;
|
|
65
|
-
}): react_jsx_runtime.JSX.Element;
|
|
66
|
-
declare const BankAlert: _hanzogui_web.GuiComponent<_hanzogui_web.TamaDefer, _hanzogui_web.GuiElement, _hanzogui_core.RNViewNonStyleProps, _hanzogui_web.StackStyleBase, {
|
|
67
|
-
status?: "error" | "success" | undefined;
|
|
68
|
-
}, _hanzogui_web.StaticConfigPublic>;
|
|
69
|
-
declare const BankAlertText: _hanzogui_web.GuiComponent<_hanzogui_web.TamaDefer, _hanzogui_web.GuiTextElement, _hanzogui_core.RNTextNonStyleProps, _hanzogui_web.TextStylePropsBase, {
|
|
70
|
-
status?: "error" | "success" | undefined;
|
|
71
|
-
unstyled?: boolean | undefined;
|
|
72
|
-
}, _hanzogui_web.StaticConfigPublic>;
|
|
73
|
-
type BankAlertProps = GetProps<typeof BankAlert>;
|
|
74
|
-
declare const BankPinBox: _hanzogui_web.GuiComponent<_hanzogui_web.TamaDefer, _hanzogui_web.GuiTextElement, _hanzogui_core.RNTextNonStyleProps, _hanzogui_web.TextStylePropsBase, {
|
|
75
|
-
unstyled?: boolean | undefined;
|
|
76
|
-
invalid?: boolean | undefined;
|
|
77
|
-
}, _hanzogui_web.StaticConfigPublic>;
|
|
78
|
-
type BankPinBoxProps = GetProps<typeof BankPinBox>;
|
|
79
|
-
declare const BankDivider: _hanzogui_web.GuiComponent<_hanzogui_web.TamaDefer, _hanzogui_web.GuiElement, _hanzogui_core.RNViewNonStyleProps, _hanzogui_web.StackStyleBase, {}, _hanzogui_web.StaticConfigPublic>;
|
|
80
|
-
declare const BankPage: _hanzogui_web.GuiComponent<_hanzogui_web.TamaDefer, _hanzogui_web.GuiElement, _hanzogui_core.RNViewNonStyleProps, _hanzogui_web.StackStyleBase, {}, _hanzogui_web.StaticConfigPublic>;
|
|
81
|
-
type BankPageProps = GetProps<typeof BankPage>;
|
|
82
|
-
|
|
83
|
-
export { BankAlert, type BankAlertProps, BankAlertText, BankButton, type BankButtonProps, BankButtonText, BankCard, type BankCardProps, BankDivider, BankField, BankHeading, type BankHeadingProps, BankInput, type BankInputProps, BankPage, type BankPageProps, BankPinBox, type BankPinBoxProps, BankText, type BankTextProps, bankColors };
|
package/dist/button.d.cts
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
|
|
3
|
-
declare const VARIANT_CLASSES: Record<string, string>;
|
|
4
|
-
type ButtonVariant = keyof typeof VARIANT_CLASSES;
|
|
5
|
-
type ButtonSize = '2xs' | 'xs' | 'sm' | 'md';
|
|
6
|
-
interface ButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'size'> {
|
|
7
|
-
readonly variant?: ButtonVariant;
|
|
8
|
-
readonly size?: ButtonSize;
|
|
9
|
-
readonly asChild?: boolean;
|
|
10
|
-
readonly loading?: boolean;
|
|
11
|
-
readonly loadingText?: React.ReactNode;
|
|
12
|
-
readonly loadingSkeleton?: boolean;
|
|
13
|
-
readonly expanded?: boolean;
|
|
14
|
-
readonly selected?: boolean;
|
|
15
|
-
readonly highlighted?: boolean;
|
|
16
|
-
readonly mt?: number | string;
|
|
17
|
-
readonly ml?: number | string;
|
|
18
|
-
readonly mr?: number | string;
|
|
19
|
-
readonly px?: number | string;
|
|
20
|
-
readonly py?: number | string;
|
|
21
|
-
readonly fontWeight?: number | string;
|
|
22
|
-
readonly gap?: number | string;
|
|
23
|
-
readonly flexShrink?: number;
|
|
24
|
-
readonly columnGap?: number | string;
|
|
25
|
-
readonly gridColumn?: number | string;
|
|
26
|
-
readonly gridRow?: string;
|
|
27
|
-
readonly justifySelf?: string;
|
|
28
|
-
readonly alignSelf?: string;
|
|
29
|
-
readonly textStyle?: string;
|
|
30
|
-
readonly h?: string;
|
|
31
|
-
readonly w?: string;
|
|
32
|
-
readonly display?: string;
|
|
33
|
-
readonly borderBottomRightRadius?: number | string;
|
|
34
|
-
readonly borderTopRightRadius?: number | string;
|
|
35
|
-
readonly 'data-call-strategy'?: string;
|
|
36
|
-
}
|
|
37
|
-
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
38
|
-
declare function buttonVariants(opts?: {
|
|
39
|
-
variant?: string;
|
|
40
|
-
size?: string;
|
|
41
|
-
}): string;
|
|
42
|
-
interface ButtonGroupProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
43
|
-
}
|
|
44
|
-
declare const ButtonGroup: React.ForwardRefExoticComponent<ButtonGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
45
|
-
interface ButtonGroupRadioProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children' | 'onChange'> {
|
|
46
|
-
children: Array<React.ReactElement<ButtonProps>>;
|
|
47
|
-
onChange?: (value: string) => void;
|
|
48
|
-
defaultValue?: string;
|
|
49
|
-
loading?: boolean;
|
|
50
|
-
equalWidth?: boolean;
|
|
51
|
-
variant?: ButtonProps['variant'];
|
|
52
|
-
}
|
|
53
|
-
declare const ButtonGroupRadio: React.ForwardRefExoticComponent<ButtonGroupRadioProps & React.RefAttributes<HTMLDivElement>>;
|
|
54
|
-
|
|
55
|
-
export { Button, ButtonGroup, type ButtonGroupProps, ButtonGroupRadio, type ButtonGroupRadioProps, type ButtonProps, buttonVariants };
|
package/dist/checkbox.d.cts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
|
|
3
|
-
/** Tri-state, as the Chakra/Radix contract consumers already code against. */
|
|
4
|
-
type CheckedState = boolean | 'indeterminate';
|
|
5
|
-
interface CheckboxGroupProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
6
|
-
value?: Array<string>;
|
|
7
|
-
defaultValue?: Array<string>;
|
|
8
|
-
onValueChange?: (value: Array<string>) => void;
|
|
9
|
-
orientation?: 'vertical' | 'horizontal';
|
|
10
|
-
name?: string;
|
|
11
|
-
disabled?: boolean;
|
|
12
|
-
readOnly?: boolean;
|
|
13
|
-
}
|
|
14
|
-
declare const CheckboxGroup: React.ForwardRefExoticComponent<CheckboxGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
15
|
-
interface CheckboxProps extends Omit<React.ComponentPropsWithoutRef<'label'>, 'onChange'> {
|
|
16
|
-
icon?: React.ReactNode;
|
|
17
|
-
inputProps?: React.InputHTMLAttributes<HTMLInputElement>;
|
|
18
|
-
rootRef?: React.Ref<HTMLLabelElement>;
|
|
19
|
-
checked?: boolean | 'indeterminate';
|
|
20
|
-
defaultChecked?: boolean;
|
|
21
|
-
onCheckedChange?: (checked: CheckedState) => void;
|
|
22
|
-
onChange?: React.FormEventHandler<HTMLLabelElement>;
|
|
23
|
-
disabled?: boolean;
|
|
24
|
-
readOnly?: boolean;
|
|
25
|
-
value?: string;
|
|
26
|
-
size?: 'sm' | 'md';
|
|
27
|
-
name?: string;
|
|
28
|
-
required?: boolean;
|
|
29
|
-
}
|
|
30
|
-
declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
|
|
31
|
-
|
|
32
|
-
export { Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps };
|
package/dist/chrome.d.cts
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { IdentityStatus } from './identity.cjs';
|
|
3
|
-
import './iam.cjs';
|
|
4
|
-
import './white-label.cjs';
|
|
5
|
-
|
|
6
|
-
/** One row in a switcher. */
|
|
7
|
-
interface ChromeItem {
|
|
8
|
-
readonly id: string;
|
|
9
|
-
readonly label: string;
|
|
10
|
-
/** Secondary text, right-aligned — a plan, a count, a shortcut. */
|
|
11
|
-
readonly hint?: string;
|
|
12
|
-
readonly icon?: React.ReactNode;
|
|
13
|
-
readonly selected?: boolean;
|
|
14
|
-
readonly danger?: boolean;
|
|
15
|
-
readonly href?: string;
|
|
16
|
-
readonly onSelect?: () => void;
|
|
17
|
-
}
|
|
18
|
-
/** 1–2 letter monogram — the honest fallback when there is no logo. */
|
|
19
|
-
declare function initials(label: string): string;
|
|
20
|
-
interface SwitcherProps {
|
|
21
|
-
/** Panel heading, drawer title and the trigger's accessible name. */
|
|
22
|
-
readonly title: string;
|
|
23
|
-
/** Trigger label. */
|
|
24
|
-
readonly label: string;
|
|
25
|
-
/** Trigger icon — usually a logo or monogram. */
|
|
26
|
-
readonly icon?: React.ReactNode;
|
|
27
|
-
readonly items: ReadonlyArray<ChromeItem>;
|
|
28
|
-
/** Rows below a separator — create, settings, sign out. */
|
|
29
|
-
readonly footer?: ReadonlyArray<ChromeItem>;
|
|
30
|
-
/** Drives the honest empty states. Defaults to 'ready'. */
|
|
31
|
-
readonly status?: IdentityStatus;
|
|
32
|
-
/** Shown when signed in and the list really is empty. */
|
|
33
|
-
readonly empty?: string;
|
|
34
|
-
/** Shown, as a sign-in action, when nobody is signed in. */
|
|
35
|
-
readonly onSignIn?: () => void;
|
|
36
|
-
readonly signInLabel?: string;
|
|
37
|
-
readonly error?: string | null;
|
|
38
|
-
readonly align?: 'start' | 'end';
|
|
39
|
-
readonly testId?: string;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* The ONE switcher. A trigger plus rows, presented as a phone sheet or an
|
|
43
|
-
* anchored menu depending on the viewport — never both, never hand-rolled.
|
|
44
|
-
*/
|
|
45
|
-
declare const Switcher: ({ title, label, icon, items, footer, status, empty, onSignIn, signInLabel, error, align, testId, }: SwitcherProps) => React.ReactElement;
|
|
46
|
-
/** Which organization is this surface acting as. */
|
|
47
|
-
declare const OrgSwitcher: () => React.ReactElement;
|
|
48
|
-
/** Which project inside that organization. */
|
|
49
|
-
declare const ProjectSwitcher: () => React.ReactElement | null;
|
|
50
|
-
interface UserMenuProps {
|
|
51
|
-
/** Extra rows above Sign out — Profile, API keys, whatever the surface has. */
|
|
52
|
-
readonly items?: ReadonlyArray<ChromeItem>;
|
|
53
|
-
}
|
|
54
|
-
/** Who is signed in, and how to stop being signed in. */
|
|
55
|
-
declare const UserMenu: ({ items }: UserMenuProps) => React.ReactElement;
|
|
56
|
-
interface SettingsMenuProps {
|
|
57
|
-
/** The surface's own settings rows. */
|
|
58
|
-
readonly items?: ReadonlyArray<ChromeItem>;
|
|
59
|
-
/** Where "All settings" goes. */
|
|
60
|
-
readonly href?: string;
|
|
61
|
-
}
|
|
62
|
-
/** The surface's settings, in the one place a user looks for them. */
|
|
63
|
-
declare const SettingsMenu: ({ items, href }: SettingsMenuProps) => React.ReactElement;
|
|
64
|
-
interface NavLink {
|
|
65
|
-
readonly href: string;
|
|
66
|
-
readonly label: string;
|
|
67
|
-
readonly active?: boolean;
|
|
68
|
-
}
|
|
69
|
-
interface AppNavProps {
|
|
70
|
-
/** Brand slot — defaults to the host-resolved org name. */
|
|
71
|
-
readonly brand?: React.ReactNode;
|
|
72
|
-
/** Where the brand links to. */
|
|
73
|
-
readonly home?: string;
|
|
74
|
-
readonly links?: ReadonlyArray<NavLink>;
|
|
75
|
-
/** Show the org switcher. Default true. */
|
|
76
|
-
readonly org?: boolean;
|
|
77
|
-
/** Show the project switcher. Default false — most surfaces have no projects. */
|
|
78
|
-
readonly project?: boolean;
|
|
79
|
-
/** Rows for the settings menu; omit the prop to hide the menu. */
|
|
80
|
-
readonly settings?: ReadonlyArray<ChromeItem>;
|
|
81
|
-
/** Extra rows in the user menu. */
|
|
82
|
-
readonly userItems?: ReadonlyArray<ChromeItem>;
|
|
83
|
-
/** Free slot between the links and the right-hand cluster. */
|
|
84
|
-
readonly children?: React.ReactNode;
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* The ONE nav. Brand, org, project, links, settings, user — in that order, at
|
|
88
|
-
* every surface. On a phone the links collapse into the same sheet the
|
|
89
|
-
* switchers use, so there is no second mobile menu to maintain.
|
|
90
|
-
*/
|
|
91
|
-
declare const AppNav: ({ brand, home, links, org, project, settings, userItems, children, }: AppNavProps) => React.ReactElement;
|
|
92
|
-
|
|
93
|
-
export { AppNav, type AppNavProps, type ChromeItem, type NavLink, OrgSwitcher, ProjectSwitcher, SettingsMenu, type SettingsMenuProps, Switcher, type SwitcherProps, UserMenu, type UserMenuProps, initials };
|
package/dist/close-button.d.cts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
|
|
3
|
-
interface CloseButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'size'> {
|
|
4
|
-
readonly variant?: 'plain';
|
|
5
|
-
readonly size?: 'md';
|
|
6
|
-
}
|
|
7
|
-
declare const CloseButton: React.ForwardRefExoticComponent<CloseButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
8
|
-
|
|
9
|
-
export { CloseButton, type CloseButtonProps };
|
package/dist/collapsible.d.cts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { YStack } from '@hanzo/gui';
|
|
3
|
-
import React__default from 'react';
|
|
4
|
-
import { LinkProps } from './link.cjs';
|
|
5
|
-
|
|
6
|
-
interface CollapsibleDetailsProps extends LinkProps {
|
|
7
|
-
children: React__default.ReactNode;
|
|
8
|
-
id?: string;
|
|
9
|
-
isExpanded?: boolean;
|
|
10
|
-
text?: [string, string];
|
|
11
|
-
noScroll?: boolean;
|
|
12
|
-
}
|
|
13
|
-
declare const CollapsibleDetails: (props: CollapsibleDetailsProps) => react_jsx_runtime.JSX.Element;
|
|
14
|
-
interface CollapsibleListProps<T> extends Omit<React__default.ComponentProps<typeof YStack>, 'children' | 'text' | 'items'> {
|
|
15
|
-
items: Array<T>;
|
|
16
|
-
renderItem: (item: T, index: number) => React__default.ReactNode;
|
|
17
|
-
triggerProps?: LinkProps;
|
|
18
|
-
cutLength?: number;
|
|
19
|
-
text?: [React__default.ReactNode, React__default.ReactNode];
|
|
20
|
-
defaultExpanded?: boolean;
|
|
21
|
-
}
|
|
22
|
-
declare const CollapsibleList: <T>(props: CollapsibleListProps<T>) => react_jsx_runtime.JSX.Element;
|
|
23
|
-
|
|
24
|
-
export { CollapsibleDetails, type CollapsibleDetailsProps, CollapsibleList };
|
package/dist/color-mode.d.cts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
|
|
4
|
-
type ColorMode = 'light' | 'dark';
|
|
5
|
-
interface ColorModeContextValue {
|
|
6
|
-
readonly colorMode: ColorMode;
|
|
7
|
-
readonly setColorMode: (mode: string) => void;
|
|
8
|
-
readonly toggleColorMode: () => void;
|
|
9
|
-
}
|
|
10
|
-
interface ColorModeProviderProps {
|
|
11
|
-
readonly children?: React.ReactNode;
|
|
12
|
-
/** Initial/default color mode. Defaults to 'light'. */
|
|
13
|
-
readonly defaultTheme?: string;
|
|
14
|
-
/** Controlled color mode value from an external theme provider. */
|
|
15
|
-
readonly value?: string;
|
|
16
|
-
/** Called when the color mode changes. */
|
|
17
|
-
readonly onValueChange?: (mode: string) => void;
|
|
18
|
-
/** Any extra props are accepted and ignored for compat with next-themes ThemeProviderProps. */
|
|
19
|
-
readonly [key: string]: unknown;
|
|
20
|
-
}
|
|
21
|
-
declare function ColorModeProvider(props: ColorModeProviderProps): react_jsx_runtime.JSX.Element;
|
|
22
|
-
declare function useColorMode(): ColorModeContextValue;
|
|
23
|
-
declare function useColorModeValue<T>(light: T, dark: T): T;
|
|
24
|
-
|
|
25
|
-
export { type ColorMode, ColorModeProvider, type ColorModeProviderProps, useColorMode, useColorModeValue };
|
package/dist/dialog.d.cts
DELETED
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import * as _hanzo_gui from '@hanzo/gui';
|
|
2
|
-
import * as _hanzogui_web from '@hanzogui/web';
|
|
3
|
-
import * as _hanzogui_core from '@hanzogui/core';
|
|
4
|
-
import * as React from 'react';
|
|
5
|
-
|
|
6
|
-
type DialogSize = 'sm' | 'md' | 'full' | 'cover';
|
|
7
|
-
/**
|
|
8
|
-
* Responsive size expressed as a plain value or a breakpoint map.
|
|
9
|
-
* Mirrors the Chakra `size={{ lgDown: 'full', lg: 'md' }}` pattern.
|
|
10
|
-
* Responsive behavior is implemented via Tailwind responsive variants at
|
|
11
|
-
* the CSS-class level (see `sizeClasses` helper below).
|
|
12
|
-
*/
|
|
13
|
-
type ResponsiveSize = DialogSize | {
|
|
14
|
-
base?: DialogSize;
|
|
15
|
-
lgDown?: DialogSize;
|
|
16
|
-
lg?: DialogSize;
|
|
17
|
-
};
|
|
18
|
-
interface DialogRootProps {
|
|
19
|
-
children?: React.ReactNode;
|
|
20
|
-
open?: boolean;
|
|
21
|
-
defaultOpen?: boolean;
|
|
22
|
-
onOpenChange?: (details: {
|
|
23
|
-
open: boolean;
|
|
24
|
-
}) => void;
|
|
25
|
-
size?: ResponsiveSize;
|
|
26
|
-
/** Accepted for API compat but not implemented -- animations are CSS-only. */
|
|
27
|
-
motionPreset?: string;
|
|
28
|
-
modal?: boolean;
|
|
29
|
-
}
|
|
30
|
-
declare const DialogRoot: React.FC<DialogRootProps>;
|
|
31
|
-
interface DialogContentProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
32
|
-
portalled?: boolean;
|
|
33
|
-
portalRef?: React.RefObject<HTMLElement>;
|
|
34
|
-
backdrop?: boolean;
|
|
35
|
-
paddingTop?: number | string;
|
|
36
|
-
}
|
|
37
|
-
declare const DialogContent: React.ForwardRefExoticComponent<DialogContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
38
|
-
interface DialogCloseTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
39
|
-
}
|
|
40
|
-
declare const DialogCloseTrigger: React.ForwardRefExoticComponent<DialogCloseTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
41
|
-
interface DialogHeaderProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
42
|
-
startElement?: React.ReactNode;
|
|
43
|
-
onBackToClick?: () => void;
|
|
44
|
-
}
|
|
45
|
-
declare const DialogHeader: React.ForwardRefExoticComponent<DialogHeaderProps & React.RefAttributes<HTMLDivElement>>;
|
|
46
|
-
interface DialogBodyProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
47
|
-
pt?: number | string;
|
|
48
|
-
display?: string;
|
|
49
|
-
flexDir?: string;
|
|
50
|
-
}
|
|
51
|
-
declare const DialogBody: React.ForwardRefExoticComponent<DialogBodyProps & React.RefAttributes<HTMLDivElement>>;
|
|
52
|
-
interface DialogFooterProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
53
|
-
}
|
|
54
|
-
declare const DialogFooter: React.ForwardRefExoticComponent<DialogFooterProps & React.RefAttributes<HTMLDivElement>>;
|
|
55
|
-
declare const DialogBackdrop: _hanzogui_web.GuiComponent<Omit<_hanzogui_web.GetFinalProps<_hanzogui_core.RNViewNonStyleProps, _hanzogui_web.StackStyleBase, {
|
|
56
|
-
open?: boolean | undefined;
|
|
57
|
-
unstyled?: boolean | undefined;
|
|
58
|
-
elevation?: number | _hanzogui_web.SizeTokens | undefined;
|
|
59
|
-
fullscreen?: boolean | undefined;
|
|
60
|
-
}>, "scope" | "forceMount"> & {
|
|
61
|
-
forceMount?: boolean;
|
|
62
|
-
} & {
|
|
63
|
-
scope?: _hanzo_gui.DialogScopes;
|
|
64
|
-
}, _hanzogui_web.GuiElement, _hanzogui_core.RNViewNonStyleProps & {
|
|
65
|
-
forceMount?: boolean;
|
|
66
|
-
} & {
|
|
67
|
-
scope?: _hanzo_gui.DialogScopes;
|
|
68
|
-
}, _hanzogui_web.StackStyleBase, {
|
|
69
|
-
open?: boolean | undefined;
|
|
70
|
-
unstyled?: boolean | undefined;
|
|
71
|
-
elevation?: number | _hanzogui_web.SizeTokens | undefined;
|
|
72
|
-
fullscreen?: boolean | undefined;
|
|
73
|
-
}, _hanzogui_web.StaticConfigPublic>;
|
|
74
|
-
declare const DialogTitle: _hanzogui_web.GuiComponent<Omit<_hanzogui_web.GetFinalProps<_hanzogui_web.TextNonStyleProps, _hanzogui_web.TextStylePropsBase, {
|
|
75
|
-
unstyled?: boolean | undefined;
|
|
76
|
-
size?: _hanzogui_web.FontSizeTokens | undefined;
|
|
77
|
-
}>, "scope"> & {
|
|
78
|
-
scope?: _hanzo_gui.DialogScopes;
|
|
79
|
-
}, _hanzogui_web.GuiTextElement, _hanzogui_web.TextNonStyleProps & {
|
|
80
|
-
scope?: _hanzo_gui.DialogScopes;
|
|
81
|
-
}, _hanzogui_web.TextStylePropsBase, {
|
|
82
|
-
unstyled?: boolean | undefined;
|
|
83
|
-
size?: _hanzogui_web.FontSizeTokens | undefined;
|
|
84
|
-
}, _hanzogui_web.StaticConfigPublic>;
|
|
85
|
-
declare const DialogDescription: _hanzogui_web.GuiComponent<Omit<_hanzogui_web.GetFinalProps<_hanzogui_web.TextNonStyleProps, _hanzogui_web.TextStylePropsBase, {
|
|
86
|
-
unstyled?: boolean | undefined;
|
|
87
|
-
size?: _hanzogui_web.FontSizeTokens | undefined;
|
|
88
|
-
}>, "scope"> & {
|
|
89
|
-
scope?: _hanzo_gui.DialogScopes;
|
|
90
|
-
}, _hanzogui_web.GuiTextElement, _hanzogui_web.TextNonStyleProps & {
|
|
91
|
-
scope?: _hanzo_gui.DialogScopes;
|
|
92
|
-
}, _hanzogui_web.TextStylePropsBase, {
|
|
93
|
-
unstyled?: boolean | undefined;
|
|
94
|
-
size?: _hanzogui_web.FontSizeTokens | undefined;
|
|
95
|
-
}, _hanzogui_web.StaticConfigPublic>;
|
|
96
|
-
interface DialogTriggerProps extends React.ComponentPropsWithoutRef<'button'> {
|
|
97
|
-
}
|
|
98
|
-
declare const DialogTrigger: _hanzogui_web.GuiComponent<Omit<_hanzogui_web.GetFinalProps<_hanzogui_core.RNViewNonStyleProps, _hanzogui_web.StackStyleBase, {}>, "scope"> & {
|
|
99
|
-
scope?: _hanzo_gui.DialogScopes;
|
|
100
|
-
}, _hanzogui_web.GuiElement, _hanzogui_core.RNViewNonStyleProps & {
|
|
101
|
-
scope?: _hanzo_gui.DialogScopes;
|
|
102
|
-
}, _hanzogui_web.StackStyleBase, {}, _hanzogui_web.StaticConfigPublic>;
|
|
103
|
-
/**
|
|
104
|
-
* `DialogActionTrigger` renders its child and closes the dialog on click.
|
|
105
|
-
* This mirrors the Chakra `Dialog.ActionTrigger` behavior which wraps
|
|
106
|
-
* children in a close action.
|
|
107
|
-
*/
|
|
108
|
-
declare const DialogActionTrigger: _hanzogui_web.GuiComponent<Omit<_hanzogui_web.GetFinalProps<_hanzogui_core.RNViewNonStyleProps, _hanzogui_web.StackStyleBase, {}>, "scope" | "displayWhenAdapted"> & {
|
|
109
|
-
displayWhenAdapted?: boolean;
|
|
110
|
-
} & {
|
|
111
|
-
scope?: _hanzo_gui.DialogScopes;
|
|
112
|
-
}, _hanzogui_web.GuiElement, _hanzogui_core.RNViewNonStyleProps & {
|
|
113
|
-
displayWhenAdapted?: boolean;
|
|
114
|
-
} & {
|
|
115
|
-
scope?: _hanzo_gui.DialogScopes;
|
|
116
|
-
}, _hanzogui_web.StackStyleBase, {}, _hanzogui_web.StaticConfigPublic>;
|
|
117
|
-
|
|
118
|
-
export { DialogActionTrigger, DialogBackdrop, DialogBody, type DialogBodyProps, DialogCloseTrigger, type DialogCloseTriggerProps, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, type DialogFooterProps, DialogHeader, type DialogHeaderProps, DialogRoot, type DialogRootProps, DialogTitle, DialogTrigger, type DialogTriggerProps };
|