@gradeui/ui 3.2.0 → 4.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/components/ui/button.md +6 -4
- package/components/ui/color-picker.md +34 -0
- package/components/ui/fill-picker.md +7 -3
- package/components/ui/gradient-editor.md +30 -0
- package/components/ui/media-surface.md +1 -1
- package/components/ui/section.md +52 -0
- package/components/ui/swatch.md +5 -2
- package/components/ui/toggle-group.md +21 -4
- package/dist/composer.d.mts +262 -0
- package/dist/composer.d.ts +262 -0
- package/dist/composer.js +3 -0
- package/dist/composer.js.map +1 -0
- package/dist/composer.mjs +3 -0
- package/dist/composer.mjs.map +1 -0
- package/dist/contracts.js +6 -6
- package/dist/contracts.js.map +1 -1
- package/dist/contracts.mjs +6 -6
- package/dist/contracts.mjs.map +1 -1
- package/dist/index.d.mts +221 -331
- package/dist/index.d.ts +221 -331
- package/dist/index.js +82 -82
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +82 -82
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/types-DUwnWaxR.d.mts +43 -0
- package/dist/types-DUwnWaxR.d.ts +43 -0
- package/package.json +6 -1
- package/styles/globals.css +593 -15
package/dist/index.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
|
12
12
|
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
13
13
|
import * as SwitchPrimitives from '@radix-ui/react-switch';
|
|
14
14
|
import { Language } from 'prism-react-renderer';
|
|
15
|
-
import {
|
|
15
|
+
import { D as DEMO_SPEED_PRESETS, a as DemoSpeed, b as DemoTrigger } from './types-DUwnWaxR.js';
|
|
16
16
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
17
17
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
18
18
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
@@ -191,14 +191,14 @@ declare const MediaSurfaceContract: _gradeui_contracts.ComponentContract<{
|
|
|
191
191
|
description: z.ZodOptional<z.ZodString>;
|
|
192
192
|
}, "strip", z.ZodTypeAny, {
|
|
193
193
|
kind: "book";
|
|
194
|
-
title?: string | undefined;
|
|
195
194
|
description?: string | undefined;
|
|
195
|
+
title?: string | undefined;
|
|
196
196
|
author?: string | undefined;
|
|
197
197
|
isbn?: string | undefined;
|
|
198
198
|
}, {
|
|
199
199
|
kind: "book";
|
|
200
|
-
title?: string | undefined;
|
|
201
200
|
description?: string | undefined;
|
|
201
|
+
title?: string | undefined;
|
|
202
202
|
author?: string | undefined;
|
|
203
203
|
isbn?: string | undefined;
|
|
204
204
|
}>, z.ZodObject<{
|
|
@@ -548,7 +548,7 @@ declare function Badge({ className, variant, rounded, ...props }: BadgeProps): R
|
|
|
548
548
|
* The CSS classes referenced here live in packages/ui/styles/globals.css
|
|
549
549
|
* (and the apps/docs mirror) under the SURFACE CLASSES section.
|
|
550
550
|
*/
|
|
551
|
-
type Surface = "solid" | "translucent" | "glass" | "glass-strong";
|
|
551
|
+
type Surface = "solid" | "translucent" | "glass" | "glass-strong" | "frosted";
|
|
552
552
|
|
|
553
553
|
/**
|
|
554
554
|
* Banner — full-width horizontal strip surfacing system-level state or
|
|
@@ -585,7 +585,7 @@ type Surface = "solid" | "translucent" | "glass" | "glass-strong";
|
|
|
585
585
|
*/
|
|
586
586
|
declare const bannerVariants: (props?: ({
|
|
587
587
|
variant?: "default" | "destructive" | "success" | "warning" | "info" | "announcement" | null | undefined;
|
|
588
|
-
align?: "
|
|
588
|
+
align?: "between" | "start" | "center" | null | undefined;
|
|
589
589
|
sticky?: boolean | null | undefined;
|
|
590
590
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
591
591
|
interface BannerProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title">, VariantProps<typeof bannerVariants> {
|
|
@@ -628,21 +628,28 @@ declare const Banner: React.ForwardRefExoticComponent<BannerProps & React.RefAtt
|
|
|
628
628
|
* heights so a button placed next to a tab strip lines up without
|
|
629
629
|
* any per-call className overrides:
|
|
630
630
|
*
|
|
631
|
+
* 2xs: h-5 (20px) — densest tool-panel size; matches Figma Button size=2xs
|
|
632
|
+
* xs: h-6 (24px) — tool-panel density; matches Figma Button size=xs
|
|
631
633
|
* sm: h-7 (28px) — matches `<TabsList size="sm">` height
|
|
632
634
|
* md: h-8 (32px) — matches `<TabsList size="md">` height (default)
|
|
633
635
|
* lg: h-10 (40px) — matches `<TabsList size="lg">` height
|
|
634
|
-
* icon: h-8 w-8 — square variant, md height
|
|
635
636
|
*
|
|
636
637
|
* `default` is preserved as an alias for `md` so existing call sites
|
|
637
638
|
* keep working through the rename.
|
|
638
639
|
*
|
|
640
|
+
* `iconOnly` squares the button at WHATEVER `size` it has (2xs=20, sm=28,
|
|
641
|
+
* md=32, lg=40) by dropping horizontal padding and matching width to
|
|
642
|
+
* height. It's a boolean modifier on top of the height ramp — there is no
|
|
643
|
+
* separate icon size value — and the icon you pass as the child is centered.
|
|
644
|
+
*
|
|
639
645
|
* Type and icon sizes also follow the Tabs scale (text-xs + size-3.5
|
|
640
646
|
* at sm/md, text-sm + size-4 at lg) so the visual rhythm reads
|
|
641
647
|
* consistent across primitives.
|
|
642
648
|
*/
|
|
643
649
|
declare const buttonVariants: (props?: ({
|
|
644
|
-
variant?: "
|
|
645
|
-
size?: "
|
|
650
|
+
variant?: "default" | "secondary" | "destructive" | "outline" | "ghost" | "link" | "raised" | null | undefined;
|
|
651
|
+
size?: "2xs" | "xs" | "sm" | "md" | "lg" | "default" | null | undefined;
|
|
652
|
+
iconOnly?: boolean | null | undefined;
|
|
646
653
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
647
654
|
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
648
655
|
asChild?: boolean;
|
|
@@ -657,6 +664,54 @@ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, Var
|
|
|
657
664
|
}
|
|
658
665
|
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
659
666
|
|
|
667
|
+
/**
|
|
668
|
+
* Section + Container — the page scaffold (STUDIO-SECTIONS.md).
|
|
669
|
+
*
|
|
670
|
+
* A page is an ordered stack of Sections. `Section` is the FULL-WIDTH band: it
|
|
671
|
+
* owns a colour `scope` (subtheme) + vertical `pad` rhythm, and nothing else —
|
|
672
|
+
* it never constrains width. `Container` is the measure: a centred max-width +
|
|
673
|
+
* gutters you drop INSIDE a section to contain content; omit it for a full-bleed
|
|
674
|
+
* band. The content is FREE; Section never bakes a title/CTA (that's
|
|
675
|
+
* `SectionBlock`'s opinionated job). The known composable parts (Eyebrow /
|
|
676
|
+
* Title / Subtitle / Description / Actions / Media) give the common shape
|
|
677
|
+
* design intent without constraining it.
|
|
678
|
+
*/
|
|
679
|
+
type SectionScope = "default" | "inverse" | "brand" | "accent" | "muted" | "card";
|
|
680
|
+
type ContainerMaxW = "sm" | "md" | "lg" | "xl" | "prose" | "full";
|
|
681
|
+
declare const bandVariants: (props?: ({
|
|
682
|
+
pad?: "none" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
683
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
684
|
+
interface SectionProps extends React.HTMLAttributes<HTMLElement>, VariantProps<typeof bandVariants> {
|
|
685
|
+
/** Colour subtheme — applies the `scope-*` class (STUDIO-COLOR.md). Unset =
|
|
686
|
+
* the page surface (transparent). */
|
|
687
|
+
scope?: SectionScope;
|
|
688
|
+
/** Visual band background — image / video / gradient / shader (e.g.
|
|
689
|
+
* `<BackgroundFill>`). Renders BEHIND the content; Section owns the
|
|
690
|
+
* relative + overflow-hidden + z-layering. Works with `scope`, which
|
|
691
|
+
* re-tones the content tokens so text stays legible over the media. */
|
|
692
|
+
background?: React.ReactNode;
|
|
693
|
+
/** Semantic element. */
|
|
694
|
+
as?: "section" | "header" | "footer" | "div";
|
|
695
|
+
}
|
|
696
|
+
declare const Section: React.ForwardRefExoticComponent<SectionProps & React.RefAttributes<HTMLElement>>;
|
|
697
|
+
declare const containerVariants: (props?: ({
|
|
698
|
+
maxW?: "sm" | "md" | "lg" | "xl" | "full" | "prose" | null | undefined;
|
|
699
|
+
grid?: boolean | null | undefined;
|
|
700
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
701
|
+
interface ContainerProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof containerVariants> {
|
|
702
|
+
as?: "div" | "section";
|
|
703
|
+
}
|
|
704
|
+
declare const Container: React.ForwardRefExoticComponent<ContainerProps & React.RefAttributes<HTMLDivElement>>;
|
|
705
|
+
declare const SectionEyebrow: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
|
|
706
|
+
declare const SectionTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLHeadingElement>>;
|
|
707
|
+
declare const SectionSubtitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
708
|
+
declare const SectionDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
709
|
+
declare const SectionActions: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
710
|
+
/** SectionMedia — a SLOT. Holds any media: a single image (MediaSurface),
|
|
711
|
+
* a Carousel, a VideoPlayer, an embed, or a whole app UI. The section
|
|
712
|
+
* doesn't care what's inside; the media frames itself. */
|
|
713
|
+
declare const SectionMedia: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
714
|
+
|
|
660
715
|
declare function Calendar({ className, classNames, showOutsideDays, captionLayout, buttonVariant, formatters, components, ...props }: React.ComponentProps<typeof DayPicker> & {
|
|
661
716
|
buttonVariant?: React.ComponentProps<typeof Button>["variant"];
|
|
662
717
|
}): React.JSX.Element;
|
|
@@ -1281,48 +1336,6 @@ interface MessageProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title
|
|
|
1281
1336
|
}
|
|
1282
1337
|
declare const Message: React.ForwardRefExoticComponent<MessageProps & React.RefAttributes<HTMLDivElement>>;
|
|
1283
1338
|
|
|
1284
|
-
/**
|
|
1285
|
-
* Shared types + presets for scripted component demos.
|
|
1286
|
-
*
|
|
1287
|
-
* Lives at the bottom of the demo primitive stack so the hook, the
|
|
1288
|
-
* cursor, and any component that opts in (`<Code>`, `<Composer>`,
|
|
1289
|
-
* `<DemoStage>`) all read from one definition of "what slow / normal /
|
|
1290
|
-
* fast feels like" and one definition of "when do we start playing".
|
|
1291
|
-
*
|
|
1292
|
-
* If you ever want to retune the cadence of every demo on the marketing
|
|
1293
|
-
* site at once, this is the file to edit.
|
|
1294
|
-
*/
|
|
1295
|
-
/**
|
|
1296
|
-
* Animation feel. Maps onto a triple of timing values so authors can
|
|
1297
|
-
* pick a vibe (slow / normal / fast) instead of hand-tuning ms.
|
|
1298
|
-
* Components that need finer control can still override the resolved
|
|
1299
|
-
* values per-instance.
|
|
1300
|
-
*/
|
|
1301
|
-
type DemoSpeed = "slow" | "normal" | "fast";
|
|
1302
|
-
/**
|
|
1303
|
-
* What kicks the demo off:
|
|
1304
|
-
* - `mount` plays immediately on first paint
|
|
1305
|
-
* - `inView` waits for the container to cross the viewport threshold
|
|
1306
|
-
* - `manual` driven by the `play` prop or imperative ref
|
|
1307
|
-
*/
|
|
1308
|
-
type DemoTrigger = "mount" | "inView" | "manual";
|
|
1309
|
-
/**
|
|
1310
|
-
* Speed presets shared across every scripted-demo surface. Three
|
|
1311
|
-
* unambiguously distinct feels: `slow` is "I am being shown", `normal`
|
|
1312
|
-
* is "I am being told", `fast` is "I am being briefed".
|
|
1313
|
-
*
|
|
1314
|
-
* - `tokenStagger` per-character cadence for typing-style steps
|
|
1315
|
-
* - `lineStagger` per-line cadence for reveal-style demos
|
|
1316
|
-
* - `preDelay` pause after the trigger fires before the first tick
|
|
1317
|
-
* - `fadeMs` default enter-transition duration for revealed parts
|
|
1318
|
-
*/
|
|
1319
|
-
declare const DEMO_SPEED_PRESETS: Record<DemoSpeed, {
|
|
1320
|
-
tokenStagger: number;
|
|
1321
|
-
lineStagger: number;
|
|
1322
|
-
preDelay: number;
|
|
1323
|
-
fadeMs: number;
|
|
1324
|
-
}>;
|
|
1325
|
-
|
|
1326
1339
|
/**
|
|
1327
1340
|
* Cancellable sleep + type helpers for scripted demos.
|
|
1328
1341
|
*
|
|
@@ -1581,263 +1594,6 @@ interface RevealProps {
|
|
|
1581
1594
|
}
|
|
1582
1595
|
declare function Reveal({ id, animation, durationMs, hideOutsideStage, onReveal, onHide, className, children, }: RevealProps): React.JSX.Element;
|
|
1583
1596
|
|
|
1584
|
-
/**
|
|
1585
|
-
* Composer — the generic text composition surface for the design system.
|
|
1586
|
-
*
|
|
1587
|
-
* The answer wherever a user is composing a message: AI chat input,
|
|
1588
|
-
* comment thread reply, post-body editor, future copilot panels.
|
|
1589
|
-
* Replaces the textarea-with-buttons pattern that hosts kept rolling
|
|
1590
|
-
* by hand.
|
|
1591
|
-
*
|
|
1592
|
-
* Built on Lexical (Meta's React-first editor framework) so it can do:
|
|
1593
|
-
* - rich text formatting (B / I / U / S / code, headings, blockquote,
|
|
1594
|
-
* pullquote, lists)
|
|
1595
|
-
* - mentions and slash commands via lexical-beautiful-mentions, with
|
|
1596
|
-
* a typeahead popover and theme-able tokens
|
|
1597
|
-
* - image attachments (paperclip + clipboard paste) when opted in
|
|
1598
|
-
* - scripted demo playback for marketing surfaces (types text, opens
|
|
1599
|
-
* mention popovers, applies formatting, all via the same step
|
|
1600
|
-
* vocabulary as <Code>)
|
|
1601
|
-
*
|
|
1602
|
-
* Slot-based composition for the action row: hosts that need custom
|
|
1603
|
-
* affordances (template picker, voice button, attach-document) pass
|
|
1604
|
-
* `leftActions` / `rightActions`. Default Send / Stop / paperclip
|
|
1605
|
-
* render only when the host hasn't replaced the slot.
|
|
1606
|
-
*
|
|
1607
|
-
* Hosts that want the canned "chat composer with paperclip + send"
|
|
1608
|
-
* preset should reach for `<AIChatComposer>` instead, which configures
|
|
1609
|
-
* this Composer with the right slots wired up.
|
|
1610
|
-
*
|
|
1611
|
-
* Scripted demos: same `speed` / `trigger` / `play` / `loop` vocabulary
|
|
1612
|
-
* as `<Code>`, sharing the underlying `useScriptedDemo` hook from
|
|
1613
|
-
* `lib/demo/`. The Composer adds its own verbs (`mention`, `format`,
|
|
1614
|
-
* `select`, `submit`) on top of the universal `type` / `wait` / `clear`.
|
|
1615
|
-
*/
|
|
1616
|
-
type ComposerFormat = "bold" | "italic" | "underline" | "strikethrough" | "code" | "h1" | "h2" | "h3" | "blockquote" | "pullquote" | "ul" | "ol";
|
|
1617
|
-
interface ComposerMentionItem {
|
|
1618
|
-
id: string;
|
|
1619
|
-
/** Display value (without the trigger char). */
|
|
1620
|
-
value: string;
|
|
1621
|
-
/** Optional secondary label shown in the suggester. */
|
|
1622
|
-
label?: string;
|
|
1623
|
-
/** Avatar URL or initials for the suggester row. */
|
|
1624
|
-
avatar?: string;
|
|
1625
|
-
/** Arbitrary payload the host can attach to the mention. */
|
|
1626
|
-
data?: Record<string, unknown>;
|
|
1627
|
-
}
|
|
1628
|
-
interface ComposerTriggerConfig {
|
|
1629
|
-
/** The trigger character, eg. "@" or "/". */
|
|
1630
|
-
char: string;
|
|
1631
|
-
/**
|
|
1632
|
-
* Items to populate the suggester. Either a static array or a
|
|
1633
|
-
* resolver function (sync or async) that receives the typed query.
|
|
1634
|
-
* The plugin filters automatically when items is an array.
|
|
1635
|
-
*/
|
|
1636
|
-
items: ComposerMentionItem[] | ((query: string) => ComposerMentionItem[] | Promise<ComposerMentionItem[]>);
|
|
1637
|
-
/**
|
|
1638
|
-
* Whether to strip the trigger char on insert. Defaults: keep for
|
|
1639
|
-
* "@" (mentions read as "@alice"), strip for "/" (commands read as
|
|
1640
|
-
* "Insert image" not "/insert-image").
|
|
1641
|
-
*/
|
|
1642
|
-
stripTrigger?: boolean;
|
|
1643
|
-
}
|
|
1644
|
-
interface ComposerAttachmentConfig {
|
|
1645
|
-
/** Master enable. Set true on the prop to use defaults, or pass a config object. */
|
|
1646
|
-
enabled?: boolean;
|
|
1647
|
-
/** HTML accept attribute on the file input. Default "image/*". */
|
|
1648
|
-
accept?: string;
|
|
1649
|
-
/** Max number of attachments. Default 10. */
|
|
1650
|
-
maxItems?: number;
|
|
1651
|
-
/** Allow multiple selection in the file picker. Default true. */
|
|
1652
|
-
multiple?: boolean;
|
|
1653
|
-
}
|
|
1654
|
-
interface ComposerAttachment {
|
|
1655
|
-
id: string;
|
|
1656
|
-
file: File;
|
|
1657
|
-
/** Object URL owned by the composer. Hosts must NOT revoke it. */
|
|
1658
|
-
previewUrl: string;
|
|
1659
|
-
name: string;
|
|
1660
|
-
}
|
|
1661
|
-
interface ComposerContent {
|
|
1662
|
-
/** Plain text representation of the editor contents (whitespace preserved). */
|
|
1663
|
-
text: string;
|
|
1664
|
-
/** Lexical editor state serialised to JSON (for round-trip persistence). */
|
|
1665
|
-
json: string;
|
|
1666
|
-
/** Resolved mention tokens in document order. */
|
|
1667
|
-
mentions: Array<{
|
|
1668
|
-
trigger: string;
|
|
1669
|
-
value: string;
|
|
1670
|
-
data?: Record<string, unknown>;
|
|
1671
|
-
}>;
|
|
1672
|
-
}
|
|
1673
|
-
interface ComposerHandle {
|
|
1674
|
-
/** Run a demo script imperatively (vs. via `steps` + `trigger="manual"`). */
|
|
1675
|
-
play: (steps: ComposerStep[]) => void;
|
|
1676
|
-
/** Cancel an in-flight demo. Idempotent. */
|
|
1677
|
-
stop: () => void;
|
|
1678
|
-
/**
|
|
1679
|
-
* One-shot replay of the configured `steps`. Cancels any in-flight
|
|
1680
|
-
* run, clears the editor, replays from step 0. Pass a delay (ms) to
|
|
1681
|
-
* schedule the replay (useful for chaining demos). Requires `steps`
|
|
1682
|
-
* to be configured.
|
|
1683
|
-
*/
|
|
1684
|
-
restart: (delayMs?: number) => void;
|
|
1685
|
-
/** Move focus into the editor. */
|
|
1686
|
-
focus: () => void;
|
|
1687
|
-
/** Wipe the editor. */
|
|
1688
|
-
clear: () => void;
|
|
1689
|
-
/** Insert plain text at the current selection. */
|
|
1690
|
-
insert: (text: string) => void;
|
|
1691
|
-
/** Snapshot the current content + mentions. */
|
|
1692
|
-
getContent: () => ComposerContent;
|
|
1693
|
-
/** Direct access to the underlying Lexical editor (escape hatch). */
|
|
1694
|
-
getEditor: () => LexicalEditor | null;
|
|
1695
|
-
}
|
|
1696
|
-
/**
|
|
1697
|
-
* Demo step vocabulary for Composer scripts. Shares `type` / `wait` /
|
|
1698
|
-
* `clear` with the universal `lib/demo` verbs; adds composer-specific
|
|
1699
|
-
* `mention`, `format`, `select`, `newline`, `submit` on top.
|
|
1700
|
-
*/
|
|
1701
|
-
type ComposerStep = {
|
|
1702
|
-
type: "type";
|
|
1703
|
-
text: string;
|
|
1704
|
-
speed?: DemoSpeed;
|
|
1705
|
-
} | {
|
|
1706
|
-
type: "wait";
|
|
1707
|
-
ms: number;
|
|
1708
|
-
} | {
|
|
1709
|
-
type: "clear";
|
|
1710
|
-
} | {
|
|
1711
|
-
type: "newline";
|
|
1712
|
-
} | {
|
|
1713
|
-
type: "submit";
|
|
1714
|
-
} | {
|
|
1715
|
-
type: "mention";
|
|
1716
|
-
/** Trigger char (must match a registered ComposerTriggerConfig.char). */
|
|
1717
|
-
trigger: string;
|
|
1718
|
-
/** Value to insert (without the trigger). Looks up the matching item by `value`. */
|
|
1719
|
-
value: string;
|
|
1720
|
-
/** Optional pre-typed query — the demo types this after the trigger char before "selecting" the value, to show the typeahead in action. */
|
|
1721
|
-
query?: string;
|
|
1722
|
-
} | {
|
|
1723
|
-
type: "format";
|
|
1724
|
-
format: ComposerFormat;
|
|
1725
|
-
} | {
|
|
1726
|
-
type: "select";
|
|
1727
|
-
/** Substring to find and select. First match wins. */
|
|
1728
|
-
text: string;
|
|
1729
|
-
};
|
|
1730
|
-
interface ComposerProps {
|
|
1731
|
-
/** Placeholder copy shown when empty. */
|
|
1732
|
-
placeholder?: string;
|
|
1733
|
-
/** Initial plain text content. For richer initial state, use `initialJson`. */
|
|
1734
|
-
initialText?: string;
|
|
1735
|
-
/** Initial Lexical state JSON (from a previous `onSubmit` round-trip). */
|
|
1736
|
-
initialJson?: string;
|
|
1737
|
-
/**
|
|
1738
|
-
* Available formats. Pass false to disable rich text entirely
|
|
1739
|
-
* (plain text mode, half the bundle weight, no toolbar). Default
|
|
1740
|
-
* enables a sensible set for most chat / comment surfaces.
|
|
1741
|
-
*/
|
|
1742
|
-
formats?: ComposerFormat[] | false;
|
|
1743
|
-
/**
|
|
1744
|
-
* Render the formatting toolbar. Default false because most uses
|
|
1745
|
-
* are short-form. Set true (or "top") to show the toolbar above the
|
|
1746
|
-
* editor. "floating" is planned; not yet implemented.
|
|
1747
|
-
*/
|
|
1748
|
-
toolbar?: boolean | "top";
|
|
1749
|
-
/**
|
|
1750
|
-
* Mention / slash command configs. Each entry registers one trigger
|
|
1751
|
-
* char and its items. Pass `[{ char: "@", items: people }, { char: "/", items: commands }]`
|
|
1752
|
-
* for the common chat-app setup.
|
|
1753
|
-
*/
|
|
1754
|
-
triggers?: ComposerTriggerConfig[];
|
|
1755
|
-
/**
|
|
1756
|
-
* Image attachments (paperclip + clipboard paste). Pass true for
|
|
1757
|
-
* defaults, an object to customise, or omit/false to skip the
|
|
1758
|
-
* attachment plumbing entirely.
|
|
1759
|
-
*/
|
|
1760
|
-
attachments?: boolean | ComposerAttachmentConfig;
|
|
1761
|
-
/** Fires when the user submits (Enter, click Send, or scripted `submit` step). */
|
|
1762
|
-
onSubmit?: (content: ComposerContent, attachments?: ComposerAttachment[]) => void;
|
|
1763
|
-
/**
|
|
1764
|
-
* Fires on every editor change with the current plain text. Use for
|
|
1765
|
-
* length validation, controlled-value bridges (eg. AIChatComposer
|
|
1766
|
-
* forwarding to a host's `value`/`onChange` pair), or live preview
|
|
1767
|
-
* surfaces. Cheap, called frequently; debounce if you need the
|
|
1768
|
-
* Lexical state JSON (use `getContent()` via ref instead).
|
|
1769
|
-
*/
|
|
1770
|
-
onChange?: (text: string) => void;
|
|
1771
|
-
/**
|
|
1772
|
-
* Loading state — disables the editor + paperclip and swaps the
|
|
1773
|
-
* default Send button for Stop. Has no effect when `rightActions`
|
|
1774
|
-
* overrides the default Send.
|
|
1775
|
-
*/
|
|
1776
|
-
isLoading?: boolean;
|
|
1777
|
-
/** Stop handler — required for Stop to be active when loading. */
|
|
1778
|
-
onStop?: () => void;
|
|
1779
|
-
/** Hard character cap. */
|
|
1780
|
-
maxLength?: number;
|
|
1781
|
-
/** Auto-focus the editor on mount. Default false. */
|
|
1782
|
-
autoFocus?: boolean;
|
|
1783
|
-
/** Whether Enter submits. Default true (Shift-Enter still inserts a newline). */
|
|
1784
|
-
submitOnEnter?: boolean;
|
|
1785
|
-
/**
|
|
1786
|
-
* Custom content for the left action slot. Replaces the default
|
|
1787
|
-
* paperclip button when `attachments` is enabled.
|
|
1788
|
-
*/
|
|
1789
|
-
leftActions?: React.ReactNode;
|
|
1790
|
-
/**
|
|
1791
|
-
* Custom content for the right action slot. Replaces the default
|
|
1792
|
-
* Send / Stop button. Use the `useComposer()` hook inside to access
|
|
1793
|
-
* imperative methods.
|
|
1794
|
-
*/
|
|
1795
|
-
rightActions?: React.ReactNode;
|
|
1796
|
-
/** Hide the default Send button without replacing it. */
|
|
1797
|
-
hideSend?: boolean;
|
|
1798
|
-
/** Scripted demo steps. */
|
|
1799
|
-
steps?: ComposerStep[];
|
|
1800
|
-
/** What kicks the script off. Defaults to "mount". */
|
|
1801
|
-
trigger?: DemoTrigger;
|
|
1802
|
-
/** For trigger="manual" — flip true to play. */
|
|
1803
|
-
play?: boolean;
|
|
1804
|
-
/** Animation feel. */
|
|
1805
|
-
speed?: DemoSpeed;
|
|
1806
|
-
/** Loop the script forever. */
|
|
1807
|
-
loop?: boolean;
|
|
1808
|
-
/**
|
|
1809
|
-
* Pause between loop iterations (ms). Defaults to 2000. Marketing
|
|
1810
|
-
* heroes that want the demo to breathe between repeats bump this
|
|
1811
|
-
* higher; tight inline demos drop it.
|
|
1812
|
-
*/
|
|
1813
|
-
loopDelay?: number;
|
|
1814
|
-
/**
|
|
1815
|
-
* Fires once per loop cycle, AFTER the loopDelay pause and BEFORE
|
|
1816
|
-
* the script replays. Use to reset parent state that the script
|
|
1817
|
-
* mutated via onSubmit (e.g., wipe a messages list back to its
|
|
1818
|
-
* seed before the demo types into it again). The editor is cleared
|
|
1819
|
-
* automatically — you only need this hook if state outside the
|
|
1820
|
-
* Composer needs to reset too.
|
|
1821
|
-
*/
|
|
1822
|
-
onLoopReset?: () => void;
|
|
1823
|
-
/**
|
|
1824
|
-
* Bare mode — strip the card chrome (border / bg / rounding). Use
|
|
1825
|
-
* when embedding inside an existing card or column layout.
|
|
1826
|
-
*/
|
|
1827
|
-
bare?: boolean;
|
|
1828
|
-
/**
|
|
1829
|
-
* Read-only mode — disables editing AND focusability. Programmatic
|
|
1830
|
-
* updates (including scripted demo playback) still work. Use for
|
|
1831
|
-
* marketing surfaces that render a Composer purely for show, so the
|
|
1832
|
-
* scripted typing doesn't steal focus from other inputs on the page.
|
|
1833
|
-
* Hides the default Send / paperclip action row.
|
|
1834
|
-
*/
|
|
1835
|
-
readOnly?: boolean;
|
|
1836
|
-
className?: string;
|
|
1837
|
-
}
|
|
1838
|
-
declare const Composer: React.ForwardRefExoticComponent<ComposerProps & React.RefAttributes<ComposerHandle>>;
|
|
1839
|
-
declare const ComposerReply: React.ForwardRefExoticComponent<ComposerProps & React.RefAttributes<ComposerHandle>>;
|
|
1840
|
-
|
|
1841
1597
|
/**
|
|
1842
1598
|
* DatePicker + DateRangePicker
|
|
1843
1599
|
*
|
|
@@ -1997,7 +1753,7 @@ declare const DropdownMenuShortcut: {
|
|
|
1997
1753
|
* rationale.
|
|
1998
1754
|
*/
|
|
1999
1755
|
declare const inputVariants: (props?: ({
|
|
2000
|
-
size?: "
|
|
1756
|
+
size?: "2xs" | "xs" | "sm" | "default" | null | undefined;
|
|
2001
1757
|
variant?: "default" | "ghost" | null | undefined;
|
|
2002
1758
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
2003
1759
|
type InputSize = NonNullable<VariantProps<typeof inputVariants>["size"]>;
|
|
@@ -2018,7 +1774,7 @@ type InputProps = Omit<React.ComponentProps<"input">, "size"> & {
|
|
|
2018
1774
|
declare const Input: React.ForwardRefExoticComponent<Omit<InputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
2019
1775
|
|
|
2020
1776
|
declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: ({
|
|
2021
|
-
size?: "
|
|
1777
|
+
size?: "2xs" | "xs" | "sm" | "default" | null | undefined;
|
|
2022
1778
|
} & class_variance_authority_types.ClassProp) | undefined) => string> & React.RefAttributes<HTMLLabelElement>>;
|
|
2023
1779
|
|
|
2024
1780
|
declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
|
|
@@ -2386,7 +2142,7 @@ declare const RadioGroupItem: React.ForwardRefExoticComponent<Omit<RadioGroupPri
|
|
|
2386
2142
|
* </ResizablePanelGroup>
|
|
2387
2143
|
*/
|
|
2388
2144
|
declare const ResizablePanelGroup: ({ className, ...props }: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) => React.JSX.Element;
|
|
2389
|
-
declare const ResizablePanel: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<
|
|
2145
|
+
declare const ResizablePanel: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLDivElement | HTMLElement | HTMLObjectElement | HTMLSelectElement | HTMLTextAreaElement | HTMLMapElement | HTMLTitleElement | HTMLVideoElement | HTMLButtonElement | HTMLLinkElement | HTMLLabelElement | HTMLStyleElement | HTMLSourceElement | HTMLHtmlElement | HTMLDataElement | HTMLOptionElement | HTMLTableColElement | HTMLAudioElement | HTMLEmbedElement | HTMLProgressElement | HTMLHRElement | HTMLTableElement | HTMLAnchorElement | HTMLFormElement | HTMLHeadingElement | HTMLImageElement | HTMLInputElement | HTMLLIElement | HTMLOListElement | HTMLParagraphElement | HTMLSpanElement | HTMLUListElement | HTMLAreaElement | HTMLBaseElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLCanvasElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDialogElement | HTMLDListElement | HTMLFieldSetElement | HTMLHeadElement | HTMLIFrameElement | HTMLLegendElement | HTMLMetaElement | HTMLMeterElement | HTMLOptGroupElement | HTMLOutputElement | HTMLPreElement | HTMLSlotElement | HTMLScriptElement | HTMLTemplateElement | HTMLTableSectionElement | HTMLTableCellElement | HTMLTimeElement | HTMLTableRowElement | HTMLTrackElement | HTMLTableCaptionElement | HTMLMenuElement | HTMLPictureElement>, "id" | "onResize"> & {
|
|
2390
2146
|
className?: string | undefined;
|
|
2391
2147
|
collapsedSize?: number | undefined;
|
|
2392
2148
|
collapsible?: boolean | undefined;
|
|
@@ -2426,8 +2182,8 @@ declare const ResizableHandle: ({ withHandle, className, ...props }: React.Compo
|
|
|
2426
2182
|
*/
|
|
2427
2183
|
declare const rowVariants: (props?: ({
|
|
2428
2184
|
gap?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | null | undefined;
|
|
2429
|
-
align?: "
|
|
2430
|
-
justify?: "
|
|
2185
|
+
align?: "start" | "center" | "end" | "stretch" | "baseline" | null | undefined;
|
|
2186
|
+
justify?: "between" | "start" | "center" | "end" | "around" | "evenly" | null | undefined;
|
|
2431
2187
|
wrap?: boolean | null | undefined;
|
|
2432
2188
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
2433
2189
|
interface RowProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof rowVariants> {
|
|
@@ -2462,7 +2218,7 @@ declare const Row: React.ForwardRefExoticComponent<RowProps & React.RefAttribute
|
|
|
2462
2218
|
declare const gridVariants: (props?: ({
|
|
2463
2219
|
cols?: "1" | "2" | "3" | "4" | "5" | "6" | "12" | null | undefined;
|
|
2464
2220
|
gap?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | null | undefined;
|
|
2465
|
-
align?: "
|
|
2221
|
+
align?: "start" | "center" | "end" | "stretch" | null | undefined;
|
|
2466
2222
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
2467
2223
|
interface GridProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof gridVariants> {
|
|
2468
2224
|
/** When true, render as the single child element via Radix Slot — lets
|
|
@@ -2494,10 +2250,10 @@ declare const Grid: React.ForwardRefExoticComponent<GridProps & React.RefAttribu
|
|
|
2494
2250
|
* case. Flex is the escape hatch, not the default.
|
|
2495
2251
|
*/
|
|
2496
2252
|
declare const flexVariants: (props?: ({
|
|
2497
|
-
direction?: "
|
|
2253
|
+
direction?: "row" | "col" | "row-reverse" | "col-reverse" | null | undefined;
|
|
2498
2254
|
gap?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | null | undefined;
|
|
2499
|
-
align?: "
|
|
2500
|
-
justify?: "
|
|
2255
|
+
align?: "start" | "center" | "end" | "stretch" | "baseline" | null | undefined;
|
|
2256
|
+
justify?: "between" | "start" | "center" | "end" | "around" | "evenly" | null | undefined;
|
|
2501
2257
|
wrap?: "wrap" | "nowrap" | "wrap-reverse" | null | undefined;
|
|
2502
2258
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
2503
2259
|
interface FlexProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof flexVariants> {
|
|
@@ -2531,7 +2287,7 @@ type SelectMenuSize = "default" | "sm" | "xs" | "2xs";
|
|
|
2531
2287
|
* existing call site.
|
|
2532
2288
|
*/
|
|
2533
2289
|
declare const selectTriggerVariants: (props?: ({
|
|
2534
|
-
size?: "
|
|
2290
|
+
size?: "2xs" | "xs" | "sm" | "default" | null | undefined;
|
|
2535
2291
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
2536
2292
|
type SelectTriggerSize = NonNullable<VariantProps<typeof selectTriggerVariants>["size"]>;
|
|
2537
2293
|
declare const SelectTrigger: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & {
|
|
@@ -2590,12 +2346,12 @@ declare const Separator: React.ForwardRefExoticComponent<Omit<SeparatorPrimitive
|
|
|
2590
2346
|
* shared selection ring (`--selected`). Pass `label` to caption it (the
|
|
2591
2347
|
* caption also becomes the accessible name / tooltip).
|
|
2592
2348
|
*
|
|
2593
|
-
* Sizing is the t-shirt scale (
|
|
2349
|
+
* Sizing is the t-shirt scale (2xs → xl, 16px → 56px); reach for `size` over `h-*`/`w-*`
|
|
2594
2350
|
* utilities so the scale stays on tokens. Shape is square / rounded (rides
|
|
2595
2351
|
* `--radius`) / circle.
|
|
2596
2352
|
*/
|
|
2597
2353
|
declare const swatchVariants: (props?: ({
|
|
2598
|
-
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
2354
|
+
size?: "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
2599
2355
|
shape?: "rounded" | "square" | "circle" | null | undefined;
|
|
2600
2356
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
2601
2357
|
type SwatchSize = NonNullable<VariantProps<typeof swatchVariants>["size"]>;
|
|
@@ -2605,6 +2361,13 @@ interface SwatchProps extends Omit<React.HTMLAttributes<HTMLElement>, "color">,
|
|
|
2605
2361
|
color?: string;
|
|
2606
2362
|
/** A Grade colour token name (no `--`), resolved as `oklch(var(--<token>))`. */
|
|
2607
2363
|
token?: string;
|
|
2364
|
+
/** Fill kind. Defaults to "solid", or is inferred from `image` / `gradient`
|
|
2365
|
+
* when omitted. Drives what the chip renders in place. */
|
|
2366
|
+
type?: "solid" | "gradient" | "image";
|
|
2367
|
+
/** CSS gradient for `type="gradient"` — e.g. `"linear-gradient(135deg,#6366f1,#ec4899)"`. */
|
|
2368
|
+
gradient?: string;
|
|
2369
|
+
/** Image URL for `type="image"` — rendered cover-fit behind the chip. */
|
|
2370
|
+
image?: string;
|
|
2608
2371
|
/** Optional caption rendered beneath the chip; also the accessible name. */
|
|
2609
2372
|
label?: React.ReactNode;
|
|
2610
2373
|
/** Draws the shared selection ring (`--selected`). */
|
|
@@ -2636,7 +2399,7 @@ declare const SheetClose: React.ForwardRefExoticComponent<DialogPrimitive.Dialog
|
|
|
2636
2399
|
declare const SheetPortal: React.FC<DialogPrimitive.DialogPortalProps>;
|
|
2637
2400
|
declare const SheetOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
2638
2401
|
declare const sheetVariants: (props?: ({
|
|
2639
|
-
side?: "
|
|
2402
|
+
side?: "top" | "right" | "bottom" | "left" | null | undefined;
|
|
2640
2403
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
2641
2404
|
interface SheetContentProps extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>, VariantProps<typeof sheetVariants> {
|
|
2642
2405
|
/** Extra classes for the backdrop overlay. e.g. `bg-transparent`
|
|
@@ -2770,7 +2533,7 @@ interface SortableItemProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
2770
2533
|
declare const SortableItem: React.ForwardRefExoticComponent<SortableItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
2771
2534
|
interface SortableHandleProps extends React.HTMLAttributes<HTMLElement> {
|
|
2772
2535
|
/** Render as the child element via Slot — typical pattern is
|
|
2773
|
-
* `<Sortable.Handle asChild><Button variant="ghost"
|
|
2536
|
+
* `<Sortable.Handle asChild><Button variant="ghost" iconOnly>…</Button></Sortable.Handle>`. */
|
|
2774
2537
|
asChild?: boolean;
|
|
2775
2538
|
}
|
|
2776
2539
|
declare const SortableHandle: React.ForwardRefExoticComponent<SortableHandleProps & React.RefAttributes<HTMLElement>>;
|
|
@@ -2792,8 +2555,8 @@ declare const Sortable: SortableRootComponent;
|
|
|
2792
2555
|
*/
|
|
2793
2556
|
declare const stackVariants: (props?: ({
|
|
2794
2557
|
gap?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | null | undefined;
|
|
2795
|
-
align?: "
|
|
2796
|
-
justify?: "
|
|
2558
|
+
align?: "start" | "center" | "end" | "stretch" | null | undefined;
|
|
2559
|
+
justify?: "between" | "start" | "center" | "end" | "around" | "evenly" | null | undefined;
|
|
2797
2560
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
2798
2561
|
interface StackProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof stackVariants> {
|
|
2799
2562
|
/** When true, render as the single child element via Radix Slot — lets
|
|
@@ -2811,7 +2574,7 @@ declare const Stack: React.ForwardRefExoticComponent<StackProps & React.RefAttri
|
|
|
2811
2574
|
* dense tool-panel sizes (the Studio inspector).
|
|
2812
2575
|
*/
|
|
2813
2576
|
declare const switchTrackVariants: (props?: ({
|
|
2814
|
-
size?: "
|
|
2577
|
+
size?: "2xs" | "xs" | "sm" | "default" | null | undefined;
|
|
2815
2578
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
2816
2579
|
type SwitchSize = NonNullable<VariantProps<typeof switchTrackVariants>["size"]>;
|
|
2817
2580
|
declare const Switch: React.ForwardRefExoticComponent<Omit<Omit<SwitchPrimitives.SwitchProps & React.RefAttributes<HTMLButtonElement>, "ref">, "size"> & {
|
|
@@ -2999,7 +2762,7 @@ declare const ChartLegendContent: React.ForwardRefExoticComponent<Omit<React.Cla
|
|
|
2999
2762
|
* px-3 / text-sm; `sm` and `xs` are for dense tool panels.
|
|
3000
2763
|
*/
|
|
3001
2764
|
declare const textareaVariants: (props?: ({
|
|
3002
|
-
size?: "
|
|
2765
|
+
size?: "2xs" | "xs" | "sm" | "default" | null | undefined;
|
|
3003
2766
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
3004
2767
|
type TextareaSize = NonNullable<VariantProps<typeof textareaVariants>["size"]>;
|
|
3005
2768
|
type TextareaProps = Omit<React.ComponentProps<"textarea">, "size"> & {
|
|
@@ -3009,11 +2772,11 @@ declare const Textarea: React.ForwardRefExoticComponent<Omit<TextareaProps, "ref
|
|
|
3009
2772
|
|
|
3010
2773
|
declare const toggleVariants: (props?: ({
|
|
3011
2774
|
variant?: "default" | "outline" | "segmented" | null | undefined;
|
|
3012
|
-
size?: "
|
|
2775
|
+
size?: "2xs" | "xs" | "sm" | "lg" | "default" | null | undefined;
|
|
3013
2776
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
3014
2777
|
declare const Toggle: React.ForwardRefExoticComponent<Omit<TogglePrimitive.ToggleProps & React.RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
|
|
3015
2778
|
variant?: "default" | "outline" | "segmented" | null | undefined;
|
|
3016
|
-
size?: "
|
|
2779
|
+
size?: "2xs" | "xs" | "sm" | "lg" | "default" | null | undefined;
|
|
3017
2780
|
} & class_variance_authority_types.ClassProp) | undefined) => string> & React.RefAttributes<HTMLButtonElement>>;
|
|
3018
2781
|
|
|
3019
2782
|
declare const TooltipProvider: React.FC<TooltipPrimitive.TooltipProviderProps>;
|
|
@@ -3023,11 +2786,11 @@ declare const TooltipContent: React.ForwardRefExoticComponent<Omit<TooltipPrimit
|
|
|
3023
2786
|
|
|
3024
2787
|
declare const ToggleGroup: React.ForwardRefExoticComponent<((Omit<ToggleGroupPrimitive.ToggleGroupSingleProps & React.RefAttributes<HTMLDivElement>, "ref"> | Omit<ToggleGroupPrimitive.ToggleGroupMultipleProps & React.RefAttributes<HTMLDivElement>, "ref">) & VariantProps<(props?: ({
|
|
3025
2788
|
variant?: "default" | "outline" | "segmented" | null | undefined;
|
|
3026
|
-
size?: "
|
|
2789
|
+
size?: "2xs" | "xs" | "sm" | "lg" | "default" | null | undefined;
|
|
3027
2790
|
} & class_variance_authority_types.ClassProp) | undefined) => string>) & React.RefAttributes<HTMLDivElement>>;
|
|
3028
2791
|
declare const ToggleGroupItem: React.ForwardRefExoticComponent<Omit<ToggleGroupPrimitive.ToggleGroupItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
|
|
3029
2792
|
variant?: "default" | "outline" | "segmented" | null | undefined;
|
|
3030
|
-
size?: "
|
|
2793
|
+
size?: "2xs" | "xs" | "sm" | "lg" | "default" | null | undefined;
|
|
3031
2794
|
} & class_variance_authority_types.ClassProp) | undefined) => string> & {
|
|
3032
2795
|
tooltip?: React.ReactNode;
|
|
3033
2796
|
tooltipSide?: React.ComponentPropsWithoutRef<typeof TooltipContent>["side"];
|
|
@@ -3082,7 +2845,7 @@ declare const ToggleGroupItem: React.ForwardRefExoticComponent<Omit<ToggleGroupP
|
|
|
3082
2845
|
* persistent footer toolbars on mobile-style layouts.
|
|
3083
2846
|
*/
|
|
3084
2847
|
declare const toolbarVariants: (props?: ({
|
|
3085
|
-
position?: "
|
|
2848
|
+
position?: "top" | "inline" | "bottom" | null | undefined;
|
|
3086
2849
|
variant?: "default" | "transparent" | "subtle" | null | undefined;
|
|
3087
2850
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
3088
2851
|
sticky?: boolean | null | undefined;
|
|
@@ -4549,6 +4312,133 @@ declare function FillPicker({ value, onChange, className }: FillPickerProps): Re
|
|
|
4549
4312
|
declare namespace FillPicker {
|
|
4550
4313
|
var displayName: string;
|
|
4551
4314
|
}
|
|
4315
|
+
interface FillSectionProps {
|
|
4316
|
+
/** The ordered list of fills (top-most last, Figma-style — but the list
|
|
4317
|
+
* renders in array order; the consumer owns z-ordering semantics). */
|
|
4318
|
+
value: FillValue[];
|
|
4319
|
+
/** Fired with the next list on any add / edit / remove / reorder. */
|
|
4320
|
+
onChange: (value: FillValue[]) => void;
|
|
4321
|
+
/** Section heading. Default "Fills". */
|
|
4322
|
+
title?: string;
|
|
4323
|
+
className?: string;
|
|
4324
|
+
}
|
|
4325
|
+
declare function FillSection({ value, onChange, title, className, }: FillSectionProps): React.JSX.Element;
|
|
4326
|
+
declare namespace FillSection {
|
|
4327
|
+
var displayName: string;
|
|
4328
|
+
}
|
|
4329
|
+
|
|
4330
|
+
/**
|
|
4331
|
+
* ColorPicker — a token-led, grouped, searchable colour picker. The
|
|
4332
|
+
* single-select sibling of FillPicker's solid tab: where FillPicker is the
|
|
4333
|
+
* full Figma paint popover (solid / gradient / image / …), ColorPicker is
|
|
4334
|
+
* the focused "pick one colour token" control.
|
|
4335
|
+
*
|
|
4336
|
+
* Two exports:
|
|
4337
|
+
* - <ColorPickerPanel> — the popover BODY (header + search + grouped
|
|
4338
|
+
* list). Reusable: the inspector's colour fields host it inside their
|
|
4339
|
+
* own TokenField-chrome popover so every colour control shares ONE
|
|
4340
|
+
* panel. Matches the Figma "Color Picker" frame: a "Color" title with
|
|
4341
|
+
* a ghost close button, a search input, then DropdownMenuItem-style
|
|
4342
|
+
* rows (Swatch + token name + check) grouped by family.
|
|
4343
|
+
* - <ColorPicker> — panel + a self-contained trigger (swatch + name or,
|
|
4344
|
+
* with `triggerVariant="inline"`, just the swatch).
|
|
4345
|
+
*
|
|
4346
|
+
* Grade is token-led, so the value is a token NAME ("action/primary"), the
|
|
4347
|
+
* literal "transparent", or null. The Swatch resolves the live CSS variable,
|
|
4348
|
+
* so every chip re-voices when the theme changes.
|
|
4349
|
+
*/
|
|
4350
|
+
|
|
4351
|
+
/** A named family of colour tokens, rendered as one group in the list. */
|
|
4352
|
+
interface ColorTokenGroup {
|
|
4353
|
+
/** Group heading (e.g. "action"). */
|
|
4354
|
+
group: string;
|
|
4355
|
+
/** Token NAMES in this group (e.g. "action/primary"). */
|
|
4356
|
+
tokens: string[];
|
|
4357
|
+
}
|
|
4358
|
+
/** Default token groups — the Grade semantic colour families. */
|
|
4359
|
+
declare const DEFAULT_COLOR_TOKEN_GROUPS: ColorTokenGroup[];
|
|
4360
|
+
/** The literal value for "no fill". */
|
|
4361
|
+
declare const TRANSPARENT = "transparent";
|
|
4362
|
+
type ColorPickerTriggerVariant = "default" | "inline";
|
|
4363
|
+
interface ColorPickerProps {
|
|
4364
|
+
/** A Grade colour token NAME ("action/primary"), the literal "transparent",
|
|
4365
|
+
* or null when nothing is picked. */
|
|
4366
|
+
value?: string | null;
|
|
4367
|
+
/** Fired with the next value (token name, "transparent", or null). */
|
|
4368
|
+
onValueChange?: (value: string | null) => void;
|
|
4369
|
+
/** Token families offered in the list. Defaults to the Grade semantic set. */
|
|
4370
|
+
tokens?: ColorTokenGroup[];
|
|
4371
|
+
/** Show the search input. Default true. */
|
|
4372
|
+
searchable?: boolean;
|
|
4373
|
+
/** `default` (form-control surface, swatch + name) or `inline` (just a
|
|
4374
|
+
* clickable swatch — the inspector / fill-row affordance). */
|
|
4375
|
+
triggerVariant?: ColorPickerTriggerVariant;
|
|
4376
|
+
/** Trigger text when nothing is selected. */
|
|
4377
|
+
placeholder?: string;
|
|
4378
|
+
/** Search-input placeholder. */
|
|
4379
|
+
searchPlaceholder?: string;
|
|
4380
|
+
/** Message rendered when search returns no rows. */
|
|
4381
|
+
emptyMessage?: string;
|
|
4382
|
+
/** Include a "Transparent" option at the top. Default true. */
|
|
4383
|
+
allowTransparent?: boolean;
|
|
4384
|
+
/** Popover header title. Default "Color"; pass null to drop the header. */
|
|
4385
|
+
title?: string | null;
|
|
4386
|
+
/** PopoverContent alignment. Default "start". */
|
|
4387
|
+
align?: "start" | "center" | "end";
|
|
4388
|
+
/** Lock the control to a display of its current value. */
|
|
4389
|
+
disabled?: boolean;
|
|
4390
|
+
/** Extra classes on the trigger. */
|
|
4391
|
+
className?: string;
|
|
4392
|
+
/** Forwarded to the trigger for tests / Studio selection. */
|
|
4393
|
+
id?: string;
|
|
4394
|
+
"aria-label"?: string;
|
|
4395
|
+
}
|
|
4396
|
+
declare const ColorPicker: React.ForwardRefExoticComponent<ColorPickerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
4397
|
+
|
|
4398
|
+
/**
|
|
4399
|
+
* GradientEditor — edit a multi-stop CSS gradient with token-led stops.
|
|
4400
|
+
*
|
|
4401
|
+
* A type Select (Linear / Radial / Angular) with reverse + rotate actions, a
|
|
4402
|
+
* live full-width preview bar (a <Swatch type="gradient">), then a "Stops"
|
|
4403
|
+
* list: each stop is a position %, a colour (token via <ColorPicker>, or a
|
|
4404
|
+
* raw colour), an opacity %, and a remove button. An add button in the Stops
|
|
4405
|
+
* header appends a stop.
|
|
4406
|
+
*
|
|
4407
|
+
* The CSS gradient string is computed from type + angle + stops; token stops
|
|
4408
|
+
* resolve to `oklch(var(--<token>))` so the preview re-voices with the theme.
|
|
4409
|
+
* It emits the structured `GradientValue` (NOT a string) so the value stays
|
|
4410
|
+
* editable and serialisable — the caller renders the string via
|
|
4411
|
+
* `gradientToCss(value)` (exported alongside).
|
|
4412
|
+
*/
|
|
4413
|
+
|
|
4414
|
+
type GradientType = "linear" | "radial" | "angular";
|
|
4415
|
+
/** A single colour stop. `token` wins over `color`; `opacity` is 0–1. */
|
|
4416
|
+
interface GradientStop {
|
|
4417
|
+
/** Stable key for list rendering / edits. */
|
|
4418
|
+
id: string;
|
|
4419
|
+
/** Position along the gradient, 0–100 (%). */
|
|
4420
|
+
position: number;
|
|
4421
|
+
/** A Grade colour token NAME ("action/primary"). Takes precedence. */
|
|
4422
|
+
token?: string;
|
|
4423
|
+
/** A raw CSS colour, used when no `token`. */
|
|
4424
|
+
color?: string;
|
|
4425
|
+
/** Stop opacity, 0–1. */
|
|
4426
|
+
opacity: number;
|
|
4427
|
+
}
|
|
4428
|
+
interface GradientValue {
|
|
4429
|
+
type: GradientType;
|
|
4430
|
+
/** Angle in degrees for linear / angular gradients. */
|
|
4431
|
+
angle?: number;
|
|
4432
|
+
stops: GradientStop[];
|
|
4433
|
+
}
|
|
4434
|
+
/** Compute the CSS gradient string from a structured value. */
|
|
4435
|
+
declare function gradientToCss(value: GradientValue): string;
|
|
4436
|
+
interface GradientEditorProps {
|
|
4437
|
+
value: GradientValue;
|
|
4438
|
+
onChange: (value: GradientValue) => void;
|
|
4439
|
+
className?: string;
|
|
4440
|
+
}
|
|
4441
|
+
declare const GradientEditor: React.ForwardRefExoticComponent<GradientEditorProps & React.RefAttributes<HTMLDivElement>>;
|
|
4552
4442
|
|
|
4553
4443
|
/**
|
|
4554
4444
|
* ShaderPresetPreview — a thumbnail-sized preview of a shader preset.
|
|
@@ -5226,4 +5116,4 @@ declare function GradeModeSwitcher({ className, variant }: GradeModeSwitcherProp
|
|
|
5226
5116
|
*/
|
|
5227
5117
|
declare function ThemeToggle(): React.JSX.Element;
|
|
5228
5118
|
|
|
5229
|
-
export { ALL_MODES, Accordion, AccordionContent, AccordionItem, AccordionTrigger, AppShell, AppShellAside, type AppShellAsideProps, AppShellFooter, type AppShellFooterProps, AppShellHeader, type AppShellHeaderProps, AppShellMain, type AppShellMainProps, AppShellNav, type AppShellNavProps, type AppShellProps, Avatar, AvatarFallback, AvatarImage, type AvatarTone, BUILT_IN_INPUTS, BackgroundFill, type BackgroundFillFit, type BackgroundFillProps, type BackgroundFillType, Badge, Banner, type BannerProps, type BaseMediaProps, BlinkingCursor, type BlinkingCursorProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, type BreadcrumbMenuItem, BreadcrumbMenuTrigger, BreadcrumbPage, BreadcrumbSeparator, Button, type ButtonShape, COMPONENT_CONTRACTS, Calendar, CalendarDayButton, Callout, CalloutDescription, CalloutTitle, Card, CardContent, CardDescription, CardFooter, CardHeader, type CardStyle, CardTitle, Carousel, CarouselArrows, type CarouselArrowsProps, type AutoplayConfig as CarouselAutoplayConfig, CarouselDots, type CarouselDotsProps, type CarouselNavButtonProps, CarouselNext, CarouselPrev, type CarouselProps, CarouselSlide, type CarouselSlideProps, CarouselVideoSlide, type CarouselVideoSlideProps, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, type ChartPalette, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, CheckboxCard, type CheckboxCardProps, Code, type CodeDiff, type CodeLanguage, type CodeProps, type CodeReveal, type CodeTrigger, type ColorIntensity,
|
|
5119
|
+
export { ALL_MODES, Accordion, AccordionContent, AccordionItem, AccordionTrigger, AppShell, AppShellAside, type AppShellAsideProps, AppShellFooter, type AppShellFooterProps, AppShellHeader, type AppShellHeaderProps, AppShellMain, type AppShellMainProps, AppShellNav, type AppShellNavProps, type AppShellProps, Avatar, AvatarFallback, AvatarImage, type AvatarTone, BUILT_IN_INPUTS, BackgroundFill, type BackgroundFillFit, type BackgroundFillProps, type BackgroundFillType, Badge, Banner, type BannerProps, type BaseMediaProps, BlinkingCursor, type BlinkingCursorProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, type BreadcrumbMenuItem, BreadcrumbMenuTrigger, BreadcrumbPage, BreadcrumbSeparator, Button, type ButtonShape, TRANSPARENT as COLOR_PICKER_TRANSPARENT, COMPONENT_CONTRACTS, Calendar, CalendarDayButton, Callout, CalloutDescription, CalloutTitle, Card, CardContent, CardDescription, CardFooter, CardHeader, type CardStyle, CardTitle, Carousel, CarouselArrows, type CarouselArrowsProps, type AutoplayConfig as CarouselAutoplayConfig, CarouselDots, type CarouselDotsProps, type CarouselNavButtonProps, CarouselNext, CarouselPrev, type CarouselProps, CarouselSlide, type CarouselSlideProps, CarouselVideoSlide, type CarouselVideoSlideProps, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, type ChartPalette, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, CheckboxCard, type CheckboxCardProps, Code, type CodeDiff, type CodeLanguage, type CodeProps, type CodeReveal, type CodeTrigger, type ColorIntensity, ColorPicker, type ColorPickerProps, type ColorTokenGroup, Combobox, type ComboboxOption, type ComboboxProps, Container, type ContainerMaxW, type ContainerProps, DEFAULT_COLOR_TOKEN_GROUPS, DEMO_SPEED_PRESETS, DataView, type DataViewBadgeOption, type DataViewCellType, type DataViewColumn, DataViewColumns, type DataViewColumnsProps, type DataViewMode, type DataViewProps, type DataViewState, DataViewToggle, type DataViewToggleProps, DatePicker, type DatePickerProps, DateRangePicker, type DateRangePickerProps, DemoSpeed, DemoStage, type DemoStageProps, DemoTrigger, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, FILL_TOKENS, FRAGMENT_HEADER, Field, FieldDescription, FieldLabel, type FieldProps, FieldTrailing, FillPicker, type FillPickerProps, FillSection, type FillSectionProps, type FillValue, Flex, type FlexProps, type FontKey, GRADE_PRE_HYDRATION_SCRIPT, type GeneratedTheme, GradeLoader, type GradeLoaderProps, type GradeLoaderSize, GradeModeSwitcher, GradeThemeProvider, type GradeThemeProviderProps, GradeThemeSwitcher, GradientEditor, type GradientEditorProps, type GradientStop, type GradientType, type GradientValue, Grid, type GridProps, Input, type InputStyle, Label, LenisProvider, Logo, type LogoLockup, type LogoMode, type LogoProps, type LogoSize, type LogoSources, type LogoVariant, MOTION_ATTR, Map, MapHandle, MapMarker, MapMarkerProps, MapProps, type MediaAspect, type MediaRadius, MediaSurface, MediaSurfaceContract, type MediaSurfaceProps, Message, type MessageProps, type ModeName, Motion, MotionOverlay, type MotionOverlayProps, type MotionOverlayZone, type MotionProps, MotionScene, type MotionSceneProps, type MotionSceneRegistration, type MotionSceneTransition, MotionScreen, type MotionScreenAnimate, type MotionScreenProps, MotionText, type MotionTextProps, type MotionTextTemplate, MultiSelect, type MultiSelectOption, type MultiSelectProps, type OKLCHTriplet, type Palette, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, type PostPreset, Progress, PropertyList, type PropertyListProps, PropertyListRow, type PropertyListRowProps, RadioCard, type RadioCardProps, RadioGroup, RadioGroupItem, type RadiusStyle, type Ramp, ResizableHandle, ResizablePanel, ResizablePanelGroup, Reveal, type RevealAnimation, type RevealProps, type RevealStep, RivePlayer, type RivePlayerProps, Row, type RowProps, type SceneContext, type SceneFactory, type SceneHandle, ScreenAnimator, type ScreenAnimatorProps, type ScreenAnimatorShot, type ScriptedDemoContext, type ScriptedDemoState, ScrollArea, ScrollBar, Section, SectionActions, SectionDescription, SectionEyebrow, SectionMedia, type SectionProps, type SectionScope, SectionSubtitle, SectionTitle, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, ShaderCompileError, ShaderControls, type ShaderControlsProps, type ShaderPreset, ShaderPresetPicker, type ShaderPresetPickerProps, ShaderPresetPreview, type ShaderPresetPreviewProps, type ShadowIntensity, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, type SidebarContentProps, SidebarFooter, type SidebarFooterProps, SidebarHeader, type SidebarHeaderProps, SidebarItem, type SidebarItemProps, type SidebarProps, SidebarSection, type SidebarSectionProps, SidebarTreeItem, type SidebarTreeItemProps, Skeleton, Slider, Sortable, SortableGroup, type SortableGroupProps, SortableHandle, type SortableHandleProps, SortableItem, type SortableItemProps, type SortableProps, type SpacingDensity, Stack, type StackProps, Swatch, SwatchGroup, type SwatchGroupProps, type SwatchProps, Switch, SwitchCard, type SwitchCardProps, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type ThemeInput, ThemeToggle, ThreeScene, type ThreeSceneProps, Toggle, ToggleGroup, ToggleGroupItem, Toolbar, type ToolbarProps, ToolbarSlot, type ToolbarSlotProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type TypeScalePreset, type UseDataViewOptions, type UseScriptedDemoOptions, VideoPlayer, type VideoPlayerProps, asideVariants as appShellAsideVariants, footerVariants as appShellFooterVariants, headerVariants as appShellHeaderVariants, mainVariants as appShellMainVariants, navVariants as appShellNavVariants, applyThemeToRoot, badgeVariants, bannerVariants, buildFragmentShaderScene, builtInThemes, buttonVariants, calloutVariants, calmInput, cn, containerVariants, defaultPostPreset, defaultThemeId, deleteUserTheme, sleep as demoSleep, typeText as demoTypeText, duplicateTheme, energyInput, flexVariants, generateTheme, getComponentContract, getTheme, gradientToCss, gridVariants, listContractedComponents, listThemes, listUserThemes, loadUserThemeInput, postPresets, rowVariants, saveUserTheme, sceneRegistry, bandVariants as sectionBandVariants, setMotion, shaderPresetById, shaderPresets, shellVariants, stackVariants, swatchVariants, themeToCSSVars, toggleVariants, useCarouselApi, useDataView, useGradeTheme, useMaybeGradeTheme, useMotionScene, usePageActive, usePrefersReducedMotion, useReducedMotion, useScriptedDemo };
|