@usetheo/ui 0.7.0-next.0 → 0.9.0-next.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/CHANGELOG.md +170 -0
- package/README.md +20 -19
- package/dist/components.css +1 -1
- package/dist/index.d.ts +354 -8
- package/dist/index.js +925 -9
- package/dist/index.js.map +1 -1
- package/llms.txt +269 -0
- package/package.json +91 -48
- package/registry/index.json +61 -1
- package/registry/r/account-menu.json +1 -1
- package/registry/r/alert.json +22 -0
- package/registry/r/code-block.json +21 -0
- package/registry/r/confirm-dialog.json +25 -0
- package/registry/r/copy-button.json +22 -0
- package/registry/r/danger-zone.json +20 -0
- package/registry/r/pagination.json +22 -0
- package/registry/r/stat-tile.json +22 -0
- package/registry/r/status-dot.json +20 -0
- package/registry/r/table.json +22 -0
- package/registry/r/timestamp.json +20 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ClassValue } from 'clsx';
|
|
2
2
|
import * as react from 'react';
|
|
3
|
-
import { ReactNode, JSX as JSX$1, ComponentPropsWithoutRef, ComponentProps, ButtonHTMLAttributes, HTMLAttributes, InputHTMLAttributes, ComponentType, SVGProps, TextareaHTMLAttributes, ElementType, ReactElement, OutputHTMLAttributes } from 'react';
|
|
3
|
+
import { ReactNode, JSX as JSX$1, ComponentPropsWithoutRef, ComponentProps, ButtonHTMLAttributes, HTMLAttributes, InputHTMLAttributes, ComponentType, SVGProps, TextareaHTMLAttributes, ElementType, ReactElement, OutputHTMLAttributes, TdHTMLAttributes, ThHTMLAttributes, TimeHTMLAttributes } from 'react';
|
|
4
4
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
5
5
|
import * as ToastPrimitive from '@radix-ui/react-toast';
|
|
6
6
|
import { VariantProps } from 'class-variance-authority';
|
|
@@ -941,7 +941,7 @@ declare const Tabs: react.ForwardRefExoticComponent<TabsPrimitive.TabsProps & re
|
|
|
941
941
|
* Wrap your app in <Tooltip.Provider> once (or use the default delayDuration here).
|
|
942
942
|
*/
|
|
943
943
|
declare const Provider: react.FC<TooltipPrimitive.TooltipProviderProps>;
|
|
944
|
-
declare const Root: react.FC<TooltipPrimitive.TooltipProps>;
|
|
944
|
+
declare const Root$2: react.FC<TooltipPrimitive.TooltipProps>;
|
|
945
945
|
declare const Trigger: react.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & react.RefAttributes<HTMLButtonElement>>;
|
|
946
946
|
declare const Content$1: react.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
947
947
|
interface TooltipProps extends ComponentPropsWithoutRef<typeof TooltipPrimitive.Root> {
|
|
@@ -958,7 +958,7 @@ interface TooltipProps extends ComponentPropsWithoutRef<typeof TooltipPrimitive.
|
|
|
958
958
|
declare const Tooltip: ({ label, side, align, delayDuration, children, ...rootProps }: TooltipProps) => ReturnType<typeof Provider>;
|
|
959
959
|
declare const TooltipWithStatics: typeof Tooltip & {
|
|
960
960
|
Provider: typeof Provider;
|
|
961
|
-
Root: typeof Root;
|
|
961
|
+
Root: typeof Root$2;
|
|
962
962
|
Trigger: typeof Trigger;
|
|
963
963
|
Content: typeof Content$1;
|
|
964
964
|
};
|
|
@@ -2112,11 +2112,11 @@ interface ContentProps extends ComponentPropsWithoutRef<typeof DialogPrimitive.C
|
|
|
2112
2112
|
hideCloseButton?: boolean;
|
|
2113
2113
|
}
|
|
2114
2114
|
declare const Content: react.ForwardRefExoticComponent<ContentProps & react.RefAttributes<HTMLDivElement>>;
|
|
2115
|
-
declare const Header: {
|
|
2115
|
+
declare const Header$1: {
|
|
2116
2116
|
({ className, ...props }: HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
2117
2117
|
displayName: string;
|
|
2118
2118
|
};
|
|
2119
|
-
declare const Body: {
|
|
2119
|
+
declare const Body$1: {
|
|
2120
2120
|
({ className, ...props }: HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
2121
2121
|
displayName: string;
|
|
2122
2122
|
};
|
|
@@ -2131,8 +2131,8 @@ declare const Sheet: typeof DialogPrimitive.Root & {
|
|
|
2131
2131
|
Close: typeof DialogPrimitive.Close;
|
|
2132
2132
|
Content: typeof Content;
|
|
2133
2133
|
Overlay: typeof Overlay;
|
|
2134
|
-
Header: typeof Header;
|
|
2135
|
-
Body: typeof Body;
|
|
2134
|
+
Header: typeof Header$1;
|
|
2135
|
+
Body: typeof Body$1;
|
|
2136
2136
|
Footer: typeof Footer;
|
|
2137
2137
|
Title: typeof Title;
|
|
2138
2138
|
Description: typeof Description;
|
|
@@ -2777,6 +2777,352 @@ interface AccountMenuProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>,
|
|
|
2777
2777
|
}
|
|
2778
2778
|
declare const AccountMenu: react.ForwardRefExoticComponent<AccountMenuProps & react.RefAttributes<HTMLElement>>;
|
|
2779
2779
|
|
|
2780
|
+
/**
|
|
2781
|
+
* Table — semantic data table primitive with sub-components.
|
|
2782
|
+
*
|
|
2783
|
+
* Composition:
|
|
2784
|
+
* <Table density="default">
|
|
2785
|
+
* <Table.Header>
|
|
2786
|
+
* <Table.Row>
|
|
2787
|
+
* <Table.HeaderCell>Date</Table.HeaderCell>
|
|
2788
|
+
* <Table.HeaderCell align="right">Amount</Table.HeaderCell>
|
|
2789
|
+
* </Table.Row>
|
|
2790
|
+
* </Table.Header>
|
|
2791
|
+
* <Table.Body>
|
|
2792
|
+
* <Table.Row>
|
|
2793
|
+
* <Table.Cell>2026-05-23</Table.Cell>
|
|
2794
|
+
* <Table.Cell align="right" numeric>$ 42.00</Table.Cell>
|
|
2795
|
+
* </Table.Row>
|
|
2796
|
+
* </Table.Body>
|
|
2797
|
+
* </Table>
|
|
2798
|
+
*
|
|
2799
|
+
* density propagates via Context so Cells pick up vertical padding without
|
|
2800
|
+
* prop drilling. Sub-components are attached as static properties on the
|
|
2801
|
+
* root (`Table.Header`, etc.) — single import surface.
|
|
2802
|
+
*
|
|
2803
|
+
* Sortable header: pass `onSort` + `sortDirection`. The HeaderCell renders
|
|
2804
|
+
* the sort affordance (ChevronUp/ChevronDown) and triggers the consumer
|
|
2805
|
+
* callback. `sortDirection` without `onSort` is a no-op (header stays
|
|
2806
|
+
* static); `sortDirection="none"` with `onSort` shows a dimmed affordance.
|
|
2807
|
+
*/
|
|
2808
|
+
type TableDensity = "default" | "compact";
|
|
2809
|
+
type AlignKind = "left" | "center" | "right";
|
|
2810
|
+
type SortDirection = "asc" | "desc" | "none";
|
|
2811
|
+
interface TableProps extends HTMLAttributes<HTMLTableElement> {
|
|
2812
|
+
density?: TableDensity;
|
|
2813
|
+
}
|
|
2814
|
+
declare const Root$1: react.ForwardRefExoticComponent<TableProps & react.RefAttributes<HTMLTableElement>>;
|
|
2815
|
+
declare const Header: react.ForwardRefExoticComponent<HTMLAttributes<HTMLTableSectionElement> & react.RefAttributes<HTMLTableSectionElement>>;
|
|
2816
|
+
declare const Body: react.ForwardRefExoticComponent<HTMLAttributes<HTMLTableSectionElement> & react.RefAttributes<HTMLTableSectionElement>>;
|
|
2817
|
+
declare const Row: react.ForwardRefExoticComponent<HTMLAttributes<HTMLTableRowElement> & react.RefAttributes<HTMLTableRowElement>>;
|
|
2818
|
+
interface TableCellProps extends TdHTMLAttributes<HTMLTableCellElement> {
|
|
2819
|
+
align?: AlignKind;
|
|
2820
|
+
numeric?: boolean;
|
|
2821
|
+
}
|
|
2822
|
+
declare const Cell: react.ForwardRefExoticComponent<TableCellProps & react.RefAttributes<HTMLTableCellElement>>;
|
|
2823
|
+
interface TableHeaderCellProps extends ThHTMLAttributes<HTMLTableCellElement> {
|
|
2824
|
+
align?: AlignKind;
|
|
2825
|
+
/** When provided, header becomes a sort trigger. */
|
|
2826
|
+
onSort?: () => void;
|
|
2827
|
+
/** Current sort state for this column. */
|
|
2828
|
+
sortDirection?: SortDirection;
|
|
2829
|
+
}
|
|
2830
|
+
declare const HeaderCell: react.ForwardRefExoticComponent<TableHeaderCellProps & react.RefAttributes<HTMLTableCellElement>>;
|
|
2831
|
+
type TableRoot = typeof Root$1 & {
|
|
2832
|
+
Header: typeof Header;
|
|
2833
|
+
Body: typeof Body;
|
|
2834
|
+
Row: typeof Row;
|
|
2835
|
+
Cell: typeof Cell;
|
|
2836
|
+
HeaderCell: typeof HeaderCell;
|
|
2837
|
+
};
|
|
2838
|
+
declare const Table: TableRoot;
|
|
2839
|
+
|
|
2840
|
+
/**
|
|
2841
|
+
* StatusDot — semantic status indicator (colored circle + optional label).
|
|
2842
|
+
*
|
|
2843
|
+
* Five status kinds:
|
|
2844
|
+
* - `live` — deployed / verified / healthy (success)
|
|
2845
|
+
* - `building` — in-progress / queued (warning, auto-pulses)
|
|
2846
|
+
* - `failed` — error / down / rejected (destructive)
|
|
2847
|
+
* - `idle` — pending / offline (muted)
|
|
2848
|
+
* - `warning` — degraded but functional (warning, static)
|
|
2849
|
+
*
|
|
2850
|
+
* Three sizes (xs 6px, sm 8px default, md 10px). `pulse` defaults to
|
|
2851
|
+
* `true` for `building` and `false` otherwise; passing `pulse` explicitly
|
|
2852
|
+
* overrides the auto behavior. When no visible `label` AND no `aria-label`
|
|
2853
|
+
* are provided, the component auto-applies `aria-label={status}` and
|
|
2854
|
+
* emits a dev-mode warning (a status communicated only by color is
|
|
2855
|
+
* invisible to screen readers).
|
|
2856
|
+
*
|
|
2857
|
+
* @example
|
|
2858
|
+
* <StatusDot status="live" label="Production" />
|
|
2859
|
+
* <StatusDot status="building" /> // auto-pulses + auto-aria-label
|
|
2860
|
+
*/
|
|
2861
|
+
type StatusKind = "live" | "building" | "failed" | "idle" | "warning";
|
|
2862
|
+
interface StatusDotProps extends Omit<HTMLAttributes<HTMLSpanElement>, "children"> {
|
|
2863
|
+
status: StatusKind;
|
|
2864
|
+
label?: ReactNode;
|
|
2865
|
+
size?: "xs" | "sm" | "md";
|
|
2866
|
+
pulse?: boolean;
|
|
2867
|
+
}
|
|
2868
|
+
declare const StatusDot: react.ForwardRefExoticComponent<StatusDotProps & react.RefAttributes<HTMLSpanElement>>;
|
|
2869
|
+
|
|
2870
|
+
interface CopyButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "type" | "onClick" | "children"> {
|
|
2871
|
+
/** String to copy when clicked. */
|
|
2872
|
+
value: string;
|
|
2873
|
+
/** Optional button label. Default: just the icon. */
|
|
2874
|
+
label?: ReactNode;
|
|
2875
|
+
/** Visual style. */
|
|
2876
|
+
variant?: "ghost" | "outline";
|
|
2877
|
+
/** Size. */
|
|
2878
|
+
size?: "sm" | "md";
|
|
2879
|
+
/** Callback after successful copy (e.g. analytics). */
|
|
2880
|
+
onCopied?: (value: string) => void;
|
|
2881
|
+
/** Duration of the feedback state in ms. Default 1500. */
|
|
2882
|
+
feedbackDuration?: number;
|
|
2883
|
+
}
|
|
2884
|
+
declare const CopyButton: react.ForwardRefExoticComponent<CopyButtonProps & react.RefAttributes<HTMLButtonElement>>;
|
|
2885
|
+
|
|
2886
|
+
/**
|
|
2887
|
+
* Timestamp — accessible relative/absolute time primitive.
|
|
2888
|
+
*
|
|
2889
|
+
* Renders a semantic `<time datetime>` element. Format modes:
|
|
2890
|
+
* - `relative` (default) — "just now", "5 minutes ago", "2 hours ago",
|
|
2891
|
+
* "Dec 5" (>7d), "Dec 5, 2024" (different year)
|
|
2892
|
+
* - `absolute` — full localized date+time
|
|
2893
|
+
* - `both` — "Dec 5, 2026 (2 hours ago)"
|
|
2894
|
+
*
|
|
2895
|
+
* Uses zero-dep `Intl.RelativeTimeFormat`. The tooltip on hover is the
|
|
2896
|
+
* HTML `title` attribute (not the `<Tooltip>` component) — keeps this
|
|
2897
|
+
* file a true primitive without sibling-primitive imports.
|
|
2898
|
+
*
|
|
2899
|
+
* Auto-refreshes via `setInterval` (default 60_000ms); pass
|
|
2900
|
+
* `refreshInterval={0}` to disable. `aria-label` always carries the
|
|
2901
|
+
* absolute time so screen readers read "May 23, 2026 14:32 — posted
|
|
2902
|
+
* 2 hours ago".
|
|
2903
|
+
*
|
|
2904
|
+
* @param value Source date — ISO string, Date object, or **Unix ms**
|
|
2905
|
+
* (NOT seconds). Passing seconds renders ~1970.
|
|
2906
|
+
*/
|
|
2907
|
+
interface TimestampProps extends Omit<TimeHTMLAttributes<HTMLTimeElement>, "children"> {
|
|
2908
|
+
value: string | Date | number;
|
|
2909
|
+
format?: "relative" | "absolute" | "both";
|
|
2910
|
+
/** Auto-refresh interval when format=relative. Default 60000. 0 disables. */
|
|
2911
|
+
refreshInterval?: number;
|
|
2912
|
+
/** Locale for absolute formatting + Intl.RelativeTimeFormat. Default browser locale. */
|
|
2913
|
+
locale?: string;
|
|
2914
|
+
/** When true, omit the `title` tooltip. */
|
|
2915
|
+
noTooltip?: boolean;
|
|
2916
|
+
}
|
|
2917
|
+
declare const Timestamp: react.ForwardRefExoticComponent<TimestampProps & react.RefAttributes<HTMLTimeElement>>;
|
|
2918
|
+
|
|
2919
|
+
/**
|
|
2920
|
+
* StatTile — big number + label + optional delta + optional icon.
|
|
2921
|
+
*
|
|
2922
|
+
* Dual mode based on `onClick`:
|
|
2923
|
+
* - With onClick → renders as `<button>` with hover state + trailing
|
|
2924
|
+
* ArrowUpRight chevron (navigation affordance).
|
|
2925
|
+
* - Without onClick → renders as static `<div>`.
|
|
2926
|
+
*
|
|
2927
|
+
* Delta trend drives icon + color: up=success/TrendingUp, down=destructive/
|
|
2928
|
+
* TrendingDown, flat=muted/Minus. Big value uses font-display + tabular-nums.
|
|
2929
|
+
*
|
|
2930
|
+
* @example
|
|
2931
|
+
* <StatTile value="42" label="Projects" />
|
|
2932
|
+
* <StatTile value="$1,234" label="MRR" icon={DollarSign}
|
|
2933
|
+
* delta={{ value: "+12%", trend: "up" }} onClick={openBilling} />
|
|
2934
|
+
*/
|
|
2935
|
+
interface StatTileProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "type" | "value"> {
|
|
2936
|
+
value: ReactNode;
|
|
2937
|
+
label: ReactNode;
|
|
2938
|
+
icon?: ElementType;
|
|
2939
|
+
delta?: {
|
|
2940
|
+
value: ReactNode;
|
|
2941
|
+
trend: "up" | "down" | "flat";
|
|
2942
|
+
};
|
|
2943
|
+
}
|
|
2944
|
+
declare const StatTile: react.ForwardRefExoticComponent<StatTileProps & react.RefAttributes<HTMLElement>>;
|
|
2945
|
+
|
|
2946
|
+
/**
|
|
2947
|
+
* DangerZone — destructive-actions section primitive.
|
|
2948
|
+
*
|
|
2949
|
+
* Red-bordered container with a title bar and `DangerZone.Action` rows.
|
|
2950
|
+
* Each Action is laid out as title + description on the left, with a
|
|
2951
|
+
* consumer-provided action slot (typically a destructive Button) on
|
|
2952
|
+
* the right. Rows are separated by hairline dividers; the last row
|
|
2953
|
+
* has no bottom border via `last:border-b-0`.
|
|
2954
|
+
*
|
|
2955
|
+
* The consumer supplies the destructive button — this primitive never
|
|
2956
|
+
* imports `<Button>`, keeping it free of internal `@usetheo/ui` deps
|
|
2957
|
+
* (true primitive).
|
|
2958
|
+
*
|
|
2959
|
+
* @example
|
|
2960
|
+
* <DangerZone>
|
|
2961
|
+
* <DangerZone.Action
|
|
2962
|
+
* title="Delete project"
|
|
2963
|
+
* description="Permanently delete this project."
|
|
2964
|
+
* action={<Button variant="destructive">Delete</Button>}
|
|
2965
|
+
* />
|
|
2966
|
+
* </DangerZone>
|
|
2967
|
+
*/
|
|
2968
|
+
interface DangerZoneProps extends Omit<HTMLAttributes<HTMLElement>, "title"> {
|
|
2969
|
+
/** Section title. Default "Danger Zone". */
|
|
2970
|
+
title?: ReactNode;
|
|
2971
|
+
}
|
|
2972
|
+
declare const Root: react.ForwardRefExoticComponent<DangerZoneProps & react.RefAttributes<HTMLElement>>;
|
|
2973
|
+
interface DangerZoneActionProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
|
|
2974
|
+
title: ReactNode;
|
|
2975
|
+
description: ReactNode;
|
|
2976
|
+
/** Consumer-provided destructive button (or any ReactNode). */
|
|
2977
|
+
action: ReactNode;
|
|
2978
|
+
}
|
|
2979
|
+
declare const Action: react.ForwardRefExoticComponent<DangerZoneActionProps & react.RefAttributes<HTMLDivElement>>;
|
|
2980
|
+
type DangerZoneRoot = typeof Root & {
|
|
2981
|
+
Action: typeof Action;
|
|
2982
|
+
};
|
|
2983
|
+
declare const DangerZone: DangerZoneRoot;
|
|
2984
|
+
|
|
2985
|
+
/**
|
|
2986
|
+
* ConfirmDialog — controlled confirmation modal built on `Dialog`.
|
|
2987
|
+
*
|
|
2988
|
+
* Focuses Cancel on open (deliberate — NOT the destructive button).
|
|
2989
|
+
* `intent="destructive"` styles the confirm button with the destructive
|
|
2990
|
+
* variant. `confirmationPhrase` enables typed-confirmation guard:
|
|
2991
|
+
* the confirm button is disabled until the input value matches the
|
|
2992
|
+
* phrase exactly (case-sensitive). An empty string phrase is treated
|
|
2993
|
+
* as "no phrase required" (`!!confirmationPhrase`). Pressing Enter in
|
|
2994
|
+
* the input triggers confirm when `canConfirm` is true.
|
|
2995
|
+
*
|
|
2996
|
+
* `onConfirm` can be async. While the returned promise is pending,
|
|
2997
|
+
* both buttons are disabled and a `Loader2` spinner appears. On
|
|
2998
|
+
* resolve, the dialog closes via `onOpenChange(false)`. On reject,
|
|
2999
|
+
* the dialog stays open so the consumer can show their own error.
|
|
3000
|
+
*
|
|
3001
|
+
* @example
|
|
3002
|
+
* <ConfirmDialog
|
|
3003
|
+
* open={open} onOpenChange={setOpen}
|
|
3004
|
+
* title="Delete project"
|
|
3005
|
+
* description="This cannot be undone."
|
|
3006
|
+
* intent="destructive"
|
|
3007
|
+
* confirmationPhrase="my-project"
|
|
3008
|
+
* onConfirm={async () => api.deleteProject(id)}
|
|
3009
|
+
* />
|
|
3010
|
+
*/
|
|
3011
|
+
interface ConfirmDialogProps {
|
|
3012
|
+
open: boolean;
|
|
3013
|
+
onOpenChange: (open: boolean) => void;
|
|
3014
|
+
title: ReactNode;
|
|
3015
|
+
description: ReactNode;
|
|
3016
|
+
confirmLabel?: ReactNode;
|
|
3017
|
+
cancelLabel?: ReactNode;
|
|
3018
|
+
intent?: "default" | "destructive";
|
|
3019
|
+
confirmationPhrase?: string;
|
|
3020
|
+
onConfirm: () => void | Promise<void>;
|
|
3021
|
+
loading?: boolean;
|
|
3022
|
+
}
|
|
3023
|
+
declare const ConfirmDialog: react.ForwardRefExoticComponent<ConfirmDialogProps & react.RefAttributes<HTMLDivElement>>;
|
|
3024
|
+
|
|
3025
|
+
/**
|
|
3026
|
+
* CodeBlock — terminal command / code snippet surface.
|
|
3027
|
+
*
|
|
3028
|
+
* Pre-rendered code block with optional terminal "$ " prefix per line,
|
|
3029
|
+
* optional caption (file name), and optional CopyButton positioned top-right.
|
|
3030
|
+
* The CopyButton receives the RAW `code` (without the visual "$ " prefix),
|
|
3031
|
+
* so consumers paste only the executable command.
|
|
3032
|
+
*
|
|
3033
|
+
* @example
|
|
3034
|
+
* <CodeBlock code="theo deploy" terminal copyable />
|
|
3035
|
+
* <CodeBlock code={dotenv} caption=".env.local" copyable />
|
|
3036
|
+
*
|
|
3037
|
+
* `language` is reserved for future syntax highlighting (v1: ignored).
|
|
3038
|
+
*/
|
|
3039
|
+
interface CodeBlockProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
|
|
3040
|
+
/** Code content. Can be multiline. */
|
|
3041
|
+
code: string;
|
|
3042
|
+
/** Language hint (forward-compat; v1 ignored). */
|
|
3043
|
+
language?: string;
|
|
3044
|
+
/** When true, prefix each line with "$ " for shell commands. */
|
|
3045
|
+
terminal?: boolean;
|
|
3046
|
+
/** Show inline CopyButton in top-right. */
|
|
3047
|
+
copyable?: boolean;
|
|
3048
|
+
/** Optional caption above block (e.g. ".env.local"). */
|
|
3049
|
+
caption?: ReactNode;
|
|
3050
|
+
}
|
|
3051
|
+
declare const CodeBlock: react.ForwardRefExoticComponent<CodeBlockProps & react.RefAttributes<HTMLDivElement>>;
|
|
3052
|
+
|
|
3053
|
+
/**
|
|
3054
|
+
* Alert — persistent inline notice. Distinct from `Toast` (transient,
|
|
3055
|
+
* corner-positioned, multiple stackable) and `EmptyState` (centered card
|
|
3056
|
+
* for no-data affordances). Full-width-of-section banner that stays
|
|
3057
|
+
* visible until the user acts.
|
|
3058
|
+
*
|
|
3059
|
+
* `intent` drives icon + color tokens. `destructive` intent renders
|
|
3060
|
+
* `role="alert"` for assertive screen-reader announcement; the other
|
|
3061
|
+
* three intents render `role="status"` (polite). `onDismiss`, when
|
|
3062
|
+
* provided, renders a trailing `X` button. `action` slot accepts any
|
|
3063
|
+
* ReactNode (typically a `<Button>` or anchor).
|
|
3064
|
+
*
|
|
3065
|
+
* @example
|
|
3066
|
+
* <Alert
|
|
3067
|
+
* intent="warning"
|
|
3068
|
+
* title="Verify your email"
|
|
3069
|
+
* description="We sent a link to your email."
|
|
3070
|
+
* action={<Button size="sm" onClick={resend}>Resend</Button>}
|
|
3071
|
+
* />
|
|
3072
|
+
*/
|
|
3073
|
+
type AlertIntent = "info" | "success" | "warning" | "destructive";
|
|
3074
|
+
interface AlertProps extends Omit<HTMLAttributes<HTMLDivElement>, "title" | "role"> {
|
|
3075
|
+
intent?: AlertIntent;
|
|
3076
|
+
title?: ReactNode;
|
|
3077
|
+
description?: ReactNode;
|
|
3078
|
+
action?: ReactNode;
|
|
3079
|
+
onDismiss?: () => void;
|
|
3080
|
+
}
|
|
3081
|
+
declare const Alert: react.ForwardRefExoticComponent<AlertProps & react.RefAttributes<HTMLDivElement>>;
|
|
3082
|
+
|
|
3083
|
+
/**
|
|
3084
|
+
* Pagination — accessible page-number navigation primitive.
|
|
3085
|
+
*
|
|
3086
|
+
* Renders a `<nav aria-label="Pagination">` containing a button group:
|
|
3087
|
+
* `[<<] [<] 1 ... 5 6 [7] 8 9 ... 42 [>] [>>]`. The active page carries
|
|
3088
|
+
* `aria-current="page"`. Keyboard navigation (ArrowLeft / ArrowRight /
|
|
3089
|
+
* Home / End) is wired on the nav. Ellipses are rendered as
|
|
3090
|
+
* non-interactive `<span>` elements with `aria-hidden`.
|
|
3091
|
+
*
|
|
3092
|
+
* Renders nothing when `totalPages <= 1` (the page is the whole list).
|
|
3093
|
+
*
|
|
3094
|
+
* `siblingCount` controls how many neighbors of the current page are
|
|
3095
|
+
* always visible (default 1 → "5 6 [7] 8 9"). `showJumpButtons`
|
|
3096
|
+
* toggles the first/last `<<` / `>>` buttons.
|
|
3097
|
+
*
|
|
3098
|
+
* Consumers control state (`currentPage`) and are responsible for any
|
|
3099
|
+
* URL routing — the buttons are `<button>`, not `<a>`.
|
|
3100
|
+
*
|
|
3101
|
+
* @example
|
|
3102
|
+
* <Pagination
|
|
3103
|
+
* currentPage={page}
|
|
3104
|
+
* totalPages={42}
|
|
3105
|
+
* onPageChange={setPage}
|
|
3106
|
+
* />
|
|
3107
|
+
*/
|
|
3108
|
+
interface PaginationProps extends Omit<HTMLAttributes<HTMLElement>, "onChange"> {
|
|
3109
|
+
currentPage: number;
|
|
3110
|
+
totalPages: number;
|
|
3111
|
+
onPageChange: (page: number) => void;
|
|
3112
|
+
/** Neighbors of current page that stay visible. Default 1. */
|
|
3113
|
+
siblingCount?: number;
|
|
3114
|
+
/** Render `<<` / `>>` first/last buttons. Default true. */
|
|
3115
|
+
showJumpButtons?: boolean;
|
|
3116
|
+
/** Size variant. Default md. */
|
|
3117
|
+
size?: "sm" | "md";
|
|
3118
|
+
}
|
|
3119
|
+
/**
|
|
3120
|
+
* Pure helper: compute the visible page-range with ellipses.
|
|
3121
|
+
* Exported for unit testing — most pagination bugs live here.
|
|
3122
|
+
*/
|
|
3123
|
+
declare function computePageRange(currentPage: number, totalPages: number, siblingCount?: number): Array<number | "ellipsis-start" | "ellipsis-end">;
|
|
3124
|
+
declare const Pagination: react.ForwardRefExoticComponent<PaginationProps & react.RefAttributes<HTMLElement>>;
|
|
3125
|
+
|
|
2780
3126
|
interface ProgressChecklistProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
|
|
2781
3127
|
title?: ReactNode;
|
|
2782
3128
|
steps: TaskStep[];
|
|
@@ -3843,4 +4189,4 @@ interface CommandPaletteProps {
|
|
|
3843
4189
|
*/
|
|
3844
4190
|
declare function CommandPalette({ open, onOpenChange, items, onSelect, placeholder, emptyMessage, filter, }: CommandPaletteProps): react_jsx_runtime.JSX.Element;
|
|
3845
4191
|
|
|
3846
|
-
export { ALL_MODES, AccountMenu, type AccountMenuProps, AgentComposer, type AgentDraft, AgentEditor, AgentErrorCard, type AgentErrorKind, AgentEvent, type AgentEvent$1 as AgentEventModel, type AgentEventStatus, type AgentEventType, AgentHandoff, AgentProfile, type AgentProfileDescriptor, AgentStartingState, AgentStream, type AgentStreamItem, AgentStreaming, AgentTimeline, ApprovalCard, type ApprovalSeverity, ArtifactPreview, type Attachment, AttachmentChip, type AuditActorKind, type AuditEntry, AuditLogEntry, type AuditSeverity, AutoCompactNotice, Avatar, BadgeWithDot as Badge, type BadgeProps, BrowserControls, BuildLogStream, Button, type ButtonProps, type Capability, CapabilityIndicator, type CapabilityState, Card, ChatComposer, ChatMessage, ChatMessageAction, type ChatMessageActionProps, ChatMessageActions, type ChatMessageActionsProps, ChatMessageBranch, ChatMessageBranchContent, type ChatMessageBranchContentProps, ChatMessageBranchNext, type ChatMessageBranchNextProps, ChatMessageBranchPage, type ChatMessageBranchPageProps, ChatMessageBranchPrevious, type ChatMessageBranchPreviousProps, type ChatMessageBranchProps, ChatMessageBranchSelector, type ChatMessageBranchSelectorProps, ChatMessageContent, type ChatMessageContentProps, type ChatMessageContentVariant, type ChatMessageProps, ChatMessageResponse, type ChatMessageResponseProps, ChatMessageRoot, type ChatMessageRootProps, ChatMessageToolbar, type ChatMessageToolbarProps, ChatThread, Checkbox, type ColorScale, type CommandItem, CommandPalette, type ComposerMode, ContextCard, ContextWindowBar, CostMeter, type CreatedFile, CreatedFilesCard, type CronJob, CronJobCard, type CronJobStatus, CronJobsList, type CustomContentUIPart, DataPart, type DataPartProps, type DataRenderer, type DataRendererMap, type DataUIPart, type DefineThemeInput, type Density, type DensityContextValue, type Deployment, DeploymentRow, type DeploymentStatus, Dialog, type DiffHunk, type DiffLine, type DiffLineKind, DiffViewer, type Domain, DomainConfig, type DomainStatus, EmptyState, type EnvScope, type EnvVar, EnvVarEditor, FilePart, type FilePartProps, type FileUIPart, FolderContextCard, type FolderEntry, FolderSelector, FormField, HOOK_EVENTS, type HandoffParty, HookConfig, type HookEntry, type HookEvent, type HookEventEntry, HookEventLog, type HookEventResult, Input, type InputProps, type IntentOption, IntentSelector, Label, type Lane, LaneBoard, type LaneCard, type LaneState, type LogLevel, type LogLine, LoginSplit, type MCPServer, MCPServerCard, MCPServerList, type MCPServerStatus, MODE_LABEL, MemoryEditor, type MemoryLayer, type MemoryScope, type MentionItem, MentionMenu, type MentionTrigger, type MessageRole, type Metric, MetricsPanel, type Mode, type ModelCapabilityFlag, ModelCard, type ModelInfo, type ModelOption, ModelSelector, type PartRendererMap, type PermissionDecision, type PermissionDecisionKind, PermissionMatrix, PermissionModal, type PermissionOperation, type PermissionRequest, type PermissionRule, PlanBadge, type PlanBadgeProps, type PlanNode, type PlanNodeStatus, type PlanTier, type PreviewEnv, PreviewEnvCard, PreviewPanel, type PreviewService, Progress, ProgressChecklist, type ProgressProps, type Project, ProjectCard, type ProjectStatus, ProjectSwitcher, type ProviderMetadata, type QuickAction, QuickActionChips, RadioGroup, type RailStep, type ReasoningFileUIPart, ReasoningPart, type ReasoningPartProps, type ReasoningUIPart, type RecentFolder, RecentFoldersList, type RenderPartOptions, type RollbackTarget, RollbackUI, type Rule, RuleCard, RuleEditor, type RuleScope, type RuleState, RunStats, type RunningTaskItem, type RunningTaskStatus, RunningTasksPanel, ScrollArea, Select, SessionListItem, type SessionMode, type SessionRunStatus, type SessionStatus, type SessionSummary, SessionTimeline, Sheet, Sidebar, Skeleton, type Skill, SkillCard, SkillEditor, type SkillSource, type SkillState, SkillsList, SocialAuthRow, type SocialProvider, SourceDocumentPart, type SourceDocumentPartProps, type SourceDocumentUIPart, SourceUrlPart, type SourceUrlPartProps, type SourceUrlUIPart, type StepStartUIPart, StepsRail, SubAgentDispatch, type SubAgentRun, type SubAgentState, Switch, SystemPromptEditor, Tabs, TaskHeader, TaskNode, TaskPlan, type TaskSource, type TaskStatus, type TaskStep, type TaskStepStatus, type TerminalLine, TerminalPanel, TextPart, type TextPartProps, type TextUIPart, Textarea, type TextareaProps, type Theme, type ThemeFonts, type ThemeMode, ThemeProvider, ThemeScript, ThemeSwitcher, TheoUIProvider, type TheoUIProviderProps, Toast, type ToastVariant, Toaster, TokenUsageChart, type TokenUsagePoint, ToolCall, ToolCallCard, ToolCallPart, type ToolCallPartProps, type ToolCallStatus, type ToolEnablement, type ToolEntry, type ToolInvocationState, ToolResult, type ToolUIPart, ToolsList, TooltipWithStatics as Tooltip, TopNav, type UIMessage, type UIMessagePart, UsageMeter, type UsageMeterProps, type UsageMetric, anthropicStyle, auroraTerminal, avatarVariants, badgeVariants, builtinThemes, buttonVariants, capabilityPresets, classicPaper, cn, defineTheme, dracula, githubDark, hex, isCustomContentUIPart, isDataUIPart, isFileUIPart, isReasoningFileUIPart, isReasoningUIPart, isSourceDocumentUIPart, isSourceUrlUIPart, isStepStartUIPart, isTextUIPart, isToolUIPart, linearGlass, modelCapabilityPresets, oneDark, openaiStyle, renderPart, rgb, sheetVariants, useDensity, useTheme, useToast, vercelMono, violetForge };
|
|
4192
|
+
export { ALL_MODES, AccountMenu, type AccountMenuProps, AgentComposer, type AgentDraft, AgentEditor, AgentErrorCard, type AgentErrorKind, AgentEvent, type AgentEvent$1 as AgentEventModel, type AgentEventStatus, type AgentEventType, AgentHandoff, AgentProfile, type AgentProfileDescriptor, AgentStartingState, AgentStream, type AgentStreamItem, AgentStreaming, AgentTimeline, Alert, type AlertIntent, type AlertProps, ApprovalCard, type ApprovalSeverity, ArtifactPreview, type Attachment, AttachmentChip, type AuditActorKind, type AuditEntry, AuditLogEntry, type AuditSeverity, AutoCompactNotice, Avatar, BadgeWithDot as Badge, type BadgeProps, BrowserControls, BuildLogStream, Button, type ButtonProps, type Capability, CapabilityIndicator, type CapabilityState, Card, ChatComposer, ChatMessage, ChatMessageAction, type ChatMessageActionProps, ChatMessageActions, type ChatMessageActionsProps, ChatMessageBranch, ChatMessageBranchContent, type ChatMessageBranchContentProps, ChatMessageBranchNext, type ChatMessageBranchNextProps, ChatMessageBranchPage, type ChatMessageBranchPageProps, ChatMessageBranchPrevious, type ChatMessageBranchPreviousProps, type ChatMessageBranchProps, ChatMessageBranchSelector, type ChatMessageBranchSelectorProps, ChatMessageContent, type ChatMessageContentProps, type ChatMessageContentVariant, type ChatMessageProps, ChatMessageResponse, type ChatMessageResponseProps, ChatMessageRoot, type ChatMessageRootProps, ChatMessageToolbar, type ChatMessageToolbarProps, ChatThread, Checkbox, CodeBlock, type CodeBlockProps, type ColorScale, type CommandItem, CommandPalette, type ComposerMode, ConfirmDialog, type ConfirmDialogProps, ContextCard, ContextWindowBar, CopyButton, type CopyButtonProps, CostMeter, type CreatedFile, CreatedFilesCard, type CronJob, CronJobCard, type CronJobStatus, CronJobsList, type CustomContentUIPart, DangerZone, type DangerZoneActionProps, type DangerZoneProps, DataPart, type DataPartProps, type DataRenderer, type DataRendererMap, type DataUIPart, type DefineThemeInput, type Density, type DensityContextValue, type Deployment, DeploymentRow, type DeploymentStatus, Dialog, type DiffHunk, type DiffLine, type DiffLineKind, DiffViewer, type Domain, DomainConfig, type DomainStatus, EmptyState, type EnvScope, type EnvVar, EnvVarEditor, FilePart, type FilePartProps, type FileUIPart, FolderContextCard, type FolderEntry, FolderSelector, FormField, HOOK_EVENTS, type HandoffParty, HookConfig, type HookEntry, type HookEvent, type HookEventEntry, HookEventLog, type HookEventResult, Input, type InputProps, type IntentOption, IntentSelector, Label, type Lane, LaneBoard, type LaneCard, type LaneState, type LogLevel, type LogLine, LoginSplit, type MCPServer, MCPServerCard, MCPServerList, type MCPServerStatus, MODE_LABEL, MemoryEditor, type MemoryLayer, type MemoryScope, type MentionItem, MentionMenu, type MentionTrigger, type MessageRole, type Metric, MetricsPanel, type Mode, type ModelCapabilityFlag, ModelCard, type ModelInfo, type ModelOption, ModelSelector, Pagination, type PaginationProps, type PartRendererMap, type PermissionDecision, type PermissionDecisionKind, PermissionMatrix, PermissionModal, type PermissionOperation, type PermissionRequest, type PermissionRule, PlanBadge, type PlanBadgeProps, type PlanNode, type PlanNodeStatus, type PlanTier, type PreviewEnv, PreviewEnvCard, PreviewPanel, type PreviewService, Progress, ProgressChecklist, type ProgressProps, type Project, ProjectCard, type ProjectStatus, ProjectSwitcher, type ProviderMetadata, type QuickAction, QuickActionChips, RadioGroup, type RailStep, type ReasoningFileUIPart, ReasoningPart, type ReasoningPartProps, type ReasoningUIPart, type RecentFolder, RecentFoldersList, type RenderPartOptions, type RollbackTarget, RollbackUI, type Rule, RuleCard, RuleEditor, type RuleScope, type RuleState, RunStats, type RunningTaskItem, type RunningTaskStatus, RunningTasksPanel, ScrollArea, Select, SessionListItem, type SessionMode, type SessionRunStatus, type SessionStatus, type SessionSummary, SessionTimeline, Sheet, Sidebar, Skeleton, type Skill, SkillCard, SkillEditor, type SkillSource, type SkillState, SkillsList, SocialAuthRow, type SocialProvider, SourceDocumentPart, type SourceDocumentPartProps, type SourceDocumentUIPart, SourceUrlPart, type SourceUrlPartProps, type SourceUrlUIPart, StatTile, type StatTileProps, StatusDot, type StatusDotProps, type StatusKind, type StepStartUIPart, StepsRail, SubAgentDispatch, type SubAgentRun, type SubAgentState, Switch, SystemPromptEditor, Table, type TableCellProps, type TableHeaderCellProps, type TableProps, Tabs, TaskHeader, TaskNode, TaskPlan, type TaskSource, type TaskStatus, type TaskStep, type TaskStepStatus, type TerminalLine, TerminalPanel, TextPart, type TextPartProps, type TextUIPart, Textarea, type TextareaProps, type Theme, type ThemeFonts, type ThemeMode, ThemeProvider, ThemeScript, ThemeSwitcher, TheoUIProvider, type TheoUIProviderProps, Timestamp, type TimestampProps, Toast, type ToastVariant, Toaster, TokenUsageChart, type TokenUsagePoint, ToolCall, ToolCallCard, ToolCallPart, type ToolCallPartProps, type ToolCallStatus, type ToolEnablement, type ToolEntry, type ToolInvocationState, ToolResult, type ToolUIPart, ToolsList, TooltipWithStatics as Tooltip, TopNav, type UIMessage, type UIMessagePart, UsageMeter, type UsageMeterProps, type UsageMetric, anthropicStyle, auroraTerminal, avatarVariants, badgeVariants, builtinThemes, buttonVariants, capabilityPresets, classicPaper, cn, computePageRange, defineTheme, dracula, githubDark, hex, isCustomContentUIPart, isDataUIPart, isFileUIPart, isReasoningFileUIPart, isReasoningUIPart, isSourceDocumentUIPart, isSourceUrlUIPart, isStepStartUIPart, isTextUIPart, isToolUIPart, linearGlass, modelCapabilityPresets, oneDark, openaiStyle, renderPart, rgb, sheetVariants, useDensity, useTheme, useToast, vercelMono, violetForge };
|