@uisatin/ui 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +67 -2
- package/chunk-2HKBZFIK.js +339 -0
- package/chunk-2HKBZFIK.js.map +1 -0
- package/chunk-2YEWSJD7.js +95 -0
- package/chunk-2YEWSJD7.js.map +1 -0
- package/chunk-3DINAQLL.js +153 -0
- package/chunk-3DINAQLL.js.map +1 -0
- package/chunk-3ERGAHKA.js +179 -0
- package/chunk-3ERGAHKA.js.map +1 -0
- package/chunk-6C7CGJX2.js +86 -0
- package/chunk-6C7CGJX2.js.map +1 -0
- package/chunk-6YXUBP27.js +474 -0
- package/chunk-6YXUBP27.js.map +1 -0
- package/chunk-72OCFAPT.js +175 -0
- package/chunk-72OCFAPT.js.map +1 -0
- package/chunk-7TXHCRAG.js +51 -0
- package/chunk-7TXHCRAG.js.map +1 -0
- package/chunk-A5XEM3GF.js +260 -0
- package/chunk-A5XEM3GF.js.map +1 -0
- package/chunk-AN2RNJLR.js +79 -0
- package/chunk-AN2RNJLR.js.map +1 -0
- package/chunk-B2K45IUR.js +36 -0
- package/chunk-B2K45IUR.js.map +1 -0
- package/chunk-B6V4VSGH.js +82 -0
- package/chunk-B6V4VSGH.js.map +1 -0
- package/chunk-BKZBWPUH.js +59 -0
- package/chunk-BKZBWPUH.js.map +1 -0
- package/chunk-BNTPPZCK.js +220 -0
- package/chunk-BNTPPZCK.js.map +1 -0
- package/chunk-BNZVTLHV.js +98 -0
- package/chunk-BNZVTLHV.js.map +1 -0
- package/chunk-CL2II6BX.js +89 -0
- package/chunk-CL2II6BX.js.map +1 -0
- package/chunk-DETGJAIC.js +147 -0
- package/chunk-DETGJAIC.js.map +1 -0
- package/chunk-DO3TBNSC.js +130 -0
- package/chunk-DO3TBNSC.js.map +1 -0
- package/chunk-ESC5JCVQ.js +90 -0
- package/chunk-ESC5JCVQ.js.map +1 -0
- package/chunk-FDKIX4DC.js +55 -0
- package/chunk-FDKIX4DC.js.map +1 -0
- package/chunk-GICKPMJU.js +239 -0
- package/chunk-GICKPMJU.js.map +1 -0
- package/chunk-GQA24FYG.js +57 -0
- package/chunk-GQA24FYG.js.map +1 -0
- package/chunk-H4NU7NPO.js +264 -0
- package/chunk-H4NU7NPO.js.map +1 -0
- package/chunk-H63FYCMY.js +11 -0
- package/chunk-H63FYCMY.js.map +1 -0
- package/chunk-HL42K2NH.js +76 -0
- package/chunk-HL42K2NH.js.map +1 -0
- package/chunk-HNQUX43Z.js +109 -0
- package/chunk-HNQUX43Z.js.map +1 -0
- package/chunk-HRKPV66B.js +32 -0
- package/chunk-HRKPV66B.js.map +1 -0
- package/chunk-J3NSDRVH.js +83 -0
- package/chunk-J3NSDRVH.js.map +1 -0
- package/chunk-JPNWHWAQ.js +151 -0
- package/chunk-JPNWHWAQ.js.map +1 -0
- package/chunk-KNUWZNFV.js +240 -0
- package/chunk-KNUWZNFV.js.map +1 -0
- package/chunk-L6NCCSIP.js +213 -0
- package/chunk-L6NCCSIP.js.map +1 -0
- package/chunk-LLHTVIM3.js +50 -0
- package/chunk-LLHTVIM3.js.map +1 -0
- package/chunk-LW3TRU5W.js +131 -0
- package/chunk-LW3TRU5W.js.map +1 -0
- package/chunk-LZMKSFCF.js +79 -0
- package/chunk-LZMKSFCF.js.map +1 -0
- package/chunk-MR3JDI7E.js +122 -0
- package/chunk-MR3JDI7E.js.map +1 -0
- package/chunk-NN6PKJWS.js +44 -0
- package/chunk-NN6PKJWS.js.map +1 -0
- package/chunk-NSRTTYQ4.js +252 -0
- package/chunk-NSRTTYQ4.js.map +1 -0
- package/chunk-O7F3CIDV.js +45 -0
- package/chunk-O7F3CIDV.js.map +1 -0
- package/chunk-P4O6TGDR.js +166 -0
- package/chunk-P4O6TGDR.js.map +1 -0
- package/chunk-PF3YBUKT.js +81 -0
- package/chunk-PF3YBUKT.js.map +1 -0
- package/chunk-PVOLDO4G.js +47 -0
- package/chunk-PVOLDO4G.js.map +1 -0
- package/chunk-QS4N4MNP.js +215 -0
- package/chunk-QS4N4MNP.js.map +1 -0
- package/chunk-QUF2IPOZ.js +98 -0
- package/chunk-QUF2IPOZ.js.map +1 -0
- package/chunk-RTJ76X5U.js +126 -0
- package/chunk-RTJ76X5U.js.map +1 -0
- package/chunk-SH6NG6VN.js +40 -0
- package/chunk-SH6NG6VN.js.map +1 -0
- package/chunk-SHDFUXYV.js +195 -0
- package/chunk-SHDFUXYV.js.map +1 -0
- package/chunk-TKO44NDI.js +84 -0
- package/chunk-TKO44NDI.js.map +1 -0
- package/chunk-TOMSU4S4.js +149 -0
- package/chunk-TOMSU4S4.js.map +1 -0
- package/chunk-TVLGZGYN.js +59 -0
- package/chunk-TVLGZGYN.js.map +1 -0
- package/chunk-TX3H3QMA.js +520 -0
- package/chunk-TX3H3QMA.js.map +1 -0
- package/chunk-UBNHSZSE.js +88 -0
- package/chunk-UBNHSZSE.js.map +1 -0
- package/chunk-UC3ZJWOD.js +73 -0
- package/chunk-UC3ZJWOD.js.map +1 -0
- package/chunk-UGRSWP6U.js +69 -0
- package/chunk-UGRSWP6U.js.map +1 -0
- package/chunk-VAGIAREV.js +214 -0
- package/chunk-VAGIAREV.js.map +1 -0
- package/chunk-WTMZT3IT.js +105 -0
- package/chunk-WTMZT3IT.js.map +1 -0
- package/chunk-WX6BP5ZP.js +39 -0
- package/chunk-WX6BP5ZP.js.map +1 -0
- package/chunk-X3PQANZO.js +255 -0
- package/chunk-X3PQANZO.js.map +1 -0
- package/chunk-XILQ7GXE.js +66 -0
- package/chunk-XILQ7GXE.js.map +1 -0
- package/chunk-XL75JRUA.js +130 -0
- package/chunk-XL75JRUA.js.map +1 -0
- package/chunk-XZNHT6MO.js +348 -0
- package/chunk-XZNHT6MO.js.map +1 -0
- package/chunk-Y5AYU7PK.js +44 -0
- package/chunk-Y5AYU7PK.js.map +1 -0
- package/chunk-YG7JOOLJ.js +28 -0
- package/chunk-YG7JOOLJ.js.map +1 -0
- package/chunk-YPJYW624.js +195 -0
- package/chunk-YPJYW624.js.map +1 -0
- package/chunk-YPNKBE5X.js +104 -0
- package/chunk-YPNKBE5X.js.map +1 -0
- package/components/accordion.d.ts +27 -0
- package/components/accordion.js +4 -0
- package/components/accordion.js.map +1 -0
- package/components/agent-loading.d.ts +65 -0
- package/components/agent-loading.js +4 -0
- package/components/agent-loading.js.map +1 -0
- package/components/agent-picker.d.ts +82 -0
- package/components/agent-picker.js +5 -0
- package/components/agent-picker.js.map +1 -0
- package/components/agent-suggestion.d.ts +69 -0
- package/components/agent-suggestion.js +6 -0
- package/components/agent-suggestion.js.map +1 -0
- package/components/announcement-bar.d.ts +39 -0
- package/components/announcement-bar.js +6 -0
- package/components/announcement-bar.js.map +1 -0
- package/components/attachment.d.ts +73 -0
- package/components/attachment.js +5 -0
- package/components/attachment.js.map +1 -0
- package/components/avatar.d.ts +34 -0
- package/components/avatar.js +6 -0
- package/components/avatar.js.map +1 -0
- package/components/badge.d.ts +19 -0
- package/components/badge.js +4 -0
- package/components/badge.js.map +1 -0
- package/components/banner.d.ts +54 -0
- package/components/banner.js +5 -0
- package/components/banner.js.map +1 -0
- package/components/bar-chart.d.ts +32 -0
- package/components/bar-chart.js +11 -0
- package/components/bar-chart.js.map +1 -0
- package/components/breadcrumb.d.ts +32 -0
- package/components/breadcrumb.js +6 -0
- package/components/breadcrumb.js.map +1 -0
- package/components/button.d.ts +32 -0
- package/components/button.js +4 -0
- package/components/button.js.map +1 -0
- package/components/card.d.ts +28 -0
- package/components/card.js +5 -0
- package/components/card.js.map +1 -0
- package/components/channel-chart.d.ts +14 -0
- package/components/channel-chart.js +11 -0
- package/components/channel-chart.js.map +1 -0
- package/components/chart.d.ts +88 -0
- package/components/chart.js +10 -0
- package/components/chart.js.map +1 -0
- package/components/checkbox.d.ts +17 -0
- package/components/checkbox.js +4 -0
- package/components/checkbox.js.map +1 -0
- package/components/chip.d.ts +54 -0
- package/components/chip.js +4 -0
- package/components/chip.js.map +1 -0
- package/components/citations.d.ts +37 -0
- package/components/citations.js +5 -0
- package/components/citations.js.map +1 -0
- package/components/code-block.d.ts +13 -0
- package/components/code-block.js +5 -0
- package/components/code-block.js.map +1 -0
- package/components/combobox.d.ts +58 -0
- package/components/combobox.js +10 -0
- package/components/combobox.js.map +1 -0
- package/components/command-menu.d.ts +54 -0
- package/components/command-menu.js +6 -0
- package/components/command-menu.js.map +1 -0
- package/components/context-menu.d.ts +46 -0
- package/components/context-menu.js +6 -0
- package/components/context-menu.js.map +1 -0
- package/components/cookie-consent.d.ts +26 -0
- package/components/cookie-consent.js +5 -0
- package/components/cookie-consent.js.map +1 -0
- package/components/date-picker.d.ts +112 -0
- package/components/date-picker.js +9 -0
- package/components/date-picker.js.map +1 -0
- package/components/decision-card.d.ts +65 -0
- package/components/decision-card.js +7 -0
- package/components/decision-card.js.map +1 -0
- package/components/dialog.d.ts +68 -0
- package/components/dialog.js +5 -0
- package/components/dialog.js.map +1 -0
- package/components/donut-chart.d.ts +20 -0
- package/components/donut-chart.js +11 -0
- package/components/donut-chart.js.map +1 -0
- package/components/dot.d.ts +21 -0
- package/components/dot.js +4 -0
- package/components/dot.js.map +1 -0
- package/components/dropdown.d.ts +74 -0
- package/components/dropdown.js +5 -0
- package/components/dropdown.js.map +1 -0
- package/components/empty-state.d.ts +25 -0
- package/components/empty-state.js +4 -0
- package/components/empty-state.js.map +1 -0
- package/components/file-upload.d.ts +78 -0
- package/components/file-upload.js +7 -0
- package/components/file-upload.js.map +1 -0
- package/components/floating.d.ts +30 -0
- package/components/floating.js +3 -0
- package/components/floating.js.map +1 -0
- package/components/form-field.d.ts +35 -0
- package/components/form-field.js +4 -0
- package/components/form-field.js.map +1 -0
- package/components/hover-card.d.ts +30 -0
- package/components/hover-card.js +4 -0
- package/components/hover-card.js.map +1 -0
- package/components/input-otp.d.ts +49 -0
- package/components/input-otp.js +8 -0
- package/components/input-otp.js.map +1 -0
- package/components/input.d.ts +28 -0
- package/components/input.js +5 -0
- package/components/input.js.map +1 -0
- package/components/kbd.d.ts +37 -0
- package/components/kbd.js +4 -0
- package/components/kbd.js.map +1 -0
- package/components/line-chart.d.ts +29 -0
- package/components/line-chart.js +12 -0
- package/components/line-chart.js.map +1 -0
- package/components/message-actions.d.ts +24 -0
- package/components/message-actions.js +5 -0
- package/components/message-actions.js.map +1 -0
- package/components/message.d.ts +40 -0
- package/components/message.js +8 -0
- package/components/message.js.map +1 -0
- package/components/number-input.d.ts +33 -0
- package/components/number-input.js +8 -0
- package/components/number-input.js.map +1 -0
- package/components/pagination.d.ts +45 -0
- package/components/pagination.js +6 -0
- package/components/pagination.js.map +1 -0
- package/components/popover.d.ts +44 -0
- package/components/popover.js +4 -0
- package/components/popover.js.map +1 -0
- package/components/progress.d.ts +24 -0
- package/components/progress.js +4 -0
- package/components/progress.js.map +1 -0
- package/components/prompt-bar.d.ts +63 -0
- package/components/prompt-bar.js +6 -0
- package/components/prompt-bar.js.map +1 -0
- package/components/radio.d.ts +27 -0
- package/components/radio.js +4 -0
- package/components/radio.js.map +1 -0
- package/components/search-bar.d.ts +20 -0
- package/components/search-bar.js +5 -0
- package/components/search-bar.js.map +1 -0
- package/components/segmented-control.d.ts +32 -0
- package/components/segmented-control.js +5 -0
- package/components/segmented-control.js.map +1 -0
- package/components/select.d.ts +97 -0
- package/components/select.js +7 -0
- package/components/select.js.map +1 -0
- package/components/sheet.d.ts +37 -0
- package/components/sheet.js +6 -0
- package/components/sheet.js.map +1 -0
- package/components/sidebar.d.ts +52 -0
- package/components/sidebar.js +4 -0
- package/components/sidebar.js.map +1 -0
- package/components/skeleton.d.ts +18 -0
- package/components/skeleton.js +4 -0
- package/components/skeleton.js.map +1 -0
- package/components/slider.d.ts +57 -0
- package/components/slider.js +8 -0
- package/components/slider.js.map +1 -0
- package/components/sliding-indicator.d.ts +23 -0
- package/components/sliding-indicator.js +3 -0
- package/components/sliding-indicator.js.map +1 -0
- package/components/streaming-text.d.ts +33 -0
- package/components/streaming-text.js +4 -0
- package/components/streaming-text.js.map +1 -0
- package/components/switch.d.ts +15 -0
- package/components/switch.js +4 -0
- package/components/switch.js.map +1 -0
- package/components/table.d.ts +57 -0
- package/components/table.js +5 -0
- package/components/table.js.map +1 -0
- package/components/tabs.d.ts +45 -0
- package/components/tabs.js +5 -0
- package/components/tabs.js.map +1 -0
- package/components/textarea.d.ts +30 -0
- package/components/textarea.js +5 -0
- package/components/textarea.js.map +1 -0
- package/components/thinking.d.ts +64 -0
- package/components/thinking.js +5 -0
- package/components/thinking.js.map +1 -0
- package/components/toast.d.ts +71 -0
- package/components/toast.js +5 -0
- package/components/toast.js.map +1 -0
- package/components/toggle.d.ts +30 -0
- package/components/toggle.js +4 -0
- package/components/toggle.js.map +1 -0
- package/components/tooltip.d.ts +35 -0
- package/components/tooltip.js +5 -0
- package/components/tooltip.js.map +1 -0
- package/index.d.ts +64 -0
- package/index.js +230 -0
- package/index.js.map +1 -0
- package/lib/utils.d.ts +3 -0
- package/lib/utils.js +3 -0
- package/lib/utils.js.map +1 -0
- package/package.json +54 -4
- package/styles.css +2 -0
- package/theme/create-theme.d.ts +44 -0
- package/theme/index.d.ts +1 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Collapsible } from 'radix-ui';
|
|
3
|
+
export interface SidebarProps extends React.ComponentProps<'nav'> {
|
|
4
|
+
}
|
|
5
|
+
/** The navigation landmark. Name it with `aria-label` when a page has more than one nav. */
|
|
6
|
+
export declare function Sidebar({ className, ...props }: SidebarProps): React.JSX.Element;
|
|
7
|
+
export interface SidebarItemProps extends Omit<React.ComponentProps<'a'>, 'children'> {
|
|
8
|
+
label: string;
|
|
9
|
+
icon?: React.ReactNode;
|
|
10
|
+
/** The current page. Sets `aria-current="page"`. */
|
|
11
|
+
active?: boolean;
|
|
12
|
+
/** Unread or pending work. Hidden at 0. */
|
|
13
|
+
count?: number;
|
|
14
|
+
/** The collapsed rail: icon only, label in a tooltip. */
|
|
15
|
+
iconOnly?: boolean;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
/** Render your router's link instead of `<a>`. */
|
|
18
|
+
asChild?: boolean;
|
|
19
|
+
children?: React.ReactNode;
|
|
20
|
+
}
|
|
21
|
+
export declare function SidebarItem({ className, label, icon, active, count, iconOnly, disabled, asChild, href, children, ...props }: SidebarItemProps): React.JSX.Element;
|
|
22
|
+
export interface SidebarGroupProps extends Omit<React.ComponentProps<typeof Collapsible.Root>, 'children'> {
|
|
23
|
+
label: string;
|
|
24
|
+
icon?: React.ReactNode;
|
|
25
|
+
/** How many items the group holds. */
|
|
26
|
+
count?: number;
|
|
27
|
+
children?: React.ReactNode;
|
|
28
|
+
/** Forwarded to the header button, e.g. `data-force="hover"` on a state sheet. */
|
|
29
|
+
triggerProps?: React.ComponentProps<'button'> & {
|
|
30
|
+
'data-force'?: string;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export declare function SidebarGroup({ className, label, icon, count, defaultOpen, open: openProp, onOpenChange, children, triggerProps, ...props }: SidebarGroupProps): React.JSX.Element;
|
|
34
|
+
export interface SidebarSubItemProps extends Omit<React.ComponentProps<'a'>, 'children'> {
|
|
35
|
+
label: string;
|
|
36
|
+
active?: boolean;
|
|
37
|
+
disabled?: boolean;
|
|
38
|
+
asChild?: boolean;
|
|
39
|
+
children?: React.ReactNode;
|
|
40
|
+
}
|
|
41
|
+
export declare function SidebarSubItem({ className, label, active, disabled, asChild, href, children, ...props }: SidebarSubItemProps): React.JSX.Element;
|
|
42
|
+
export interface SidebarSubGroupProps extends Omit<React.ComponentProps<'div'>, 'children'> {
|
|
43
|
+
label: string;
|
|
44
|
+
/** Its `SidebarSubItem`s; they sit 12px further in. */
|
|
45
|
+
children?: React.ReactNode;
|
|
46
|
+
/** One of its sub-items is the current page: opens it by default and marks the label. */
|
|
47
|
+
active?: boolean;
|
|
48
|
+
open?: boolean;
|
|
49
|
+
defaultOpen?: boolean;
|
|
50
|
+
onOpenChange?: (open: boolean) => void;
|
|
51
|
+
}
|
|
52
|
+
export declare function SidebarSubGroup({ className, label, children, active, open: openProp, defaultOpen, onOpenChange, ...props }: SidebarSubGroupProps): React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"sidebar.js"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Skeleton, 1:1 with the uiKit `Skeleton` set (4025:3862): a bg/muted placeholder in three
|
|
4
|
+
* shapes. text is a 12px line at radius-sm (240 wide by default), circle 32px round, rect
|
|
5
|
+
* 240 × 120 at radius-lg. Size it with `width` / `height` or classes.
|
|
6
|
+
*
|
|
7
|
+
* `animated` runs a soft band across the block (a 6% wash of text/default, so it lightens in
|
|
8
|
+
* Dark and darkens in Light), 1.6 s a pass on ease-in-out; with reduced motion it stays still.
|
|
9
|
+
*
|
|
10
|
+
* The blocks are aria-hidden: put `aria-busy` on the region that is loading.
|
|
11
|
+
*/
|
|
12
|
+
export interface SkeletonProps extends React.ComponentProps<'div'> {
|
|
13
|
+
shape?: 'text' | 'circle' | 'rect';
|
|
14
|
+
animated?: boolean;
|
|
15
|
+
width?: number | string;
|
|
16
|
+
height?: number | string;
|
|
17
|
+
}
|
|
18
|
+
export declare function Skeleton({ shape, animated, width, height, className, style, ...props }: SkeletonProps): React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"skeleton.js"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Slider, 1:1 with the uiKit `Slider` set (4025:3621): a 4px bg/muted track with the picked
|
|
4
|
+
* part in action/primary/bg, and 16px bg/popover thumbs with a border/strong ring and the
|
|
5
|
+
* shadow-sm drop (0 1 3). Hover turns the ring text/subtle, keyboard focus adds a 2px focus
|
|
6
|
+
* ring, disabled fades the whole slider to 50%. 20px tall, so the thumbs have room.
|
|
7
|
+
*
|
|
8
|
+
* One value or a range: pass a number or a `[from, to]` pair as `value` / `defaultValue`.
|
|
9
|
+
*
|
|
10
|
+
* Around it, all optional:
|
|
11
|
+
* - `label` on the left above the track and, on the same line at the right, the picked value
|
|
12
|
+
* (`showValue`, on by default, "40" or "20 – 80", through `formatValue`).
|
|
13
|
+
* - `inputs`: small number fields beside the track to type a value: the range's from on the
|
|
14
|
+
* left and to on the right, a single value on the right. They take the readout's place.
|
|
15
|
+
* A typed value is clamped, snapped to `step` and kept in order on Enter or blur; Escape
|
|
16
|
+
* puts the current value back.
|
|
17
|
+
* - `tooltip`: the value in a Tooltip bubble over the thumb while it is dragged or moved with
|
|
18
|
+
* the keys.
|
|
19
|
+
* - `orientation="vertical"`: the track runs bottom to top (160px unless styled), the inputs
|
|
20
|
+
* go above (to) and below (from or the single value).
|
|
21
|
+
*
|
|
22
|
+
* Built on the Radix Slider: arrow keys, Page Up/Down, Home/End, a native form value (`name`)
|
|
23
|
+
* and a `slider` role per thumb, with `formatValue` as its spoken value.
|
|
24
|
+
*/
|
|
25
|
+
export interface SliderProps {
|
|
26
|
+
/** A number, or a `[from, to]` pair for a range. */
|
|
27
|
+
value?: number | [number, number];
|
|
28
|
+
defaultValue?: number | [number, number];
|
|
29
|
+
/** Every change while it moves. Gets a number or a pair, as given. */
|
|
30
|
+
onValueChange?: (value: number | [number, number]) => void;
|
|
31
|
+
/** Once, when a drag ends or a key or a typed value changes it. */
|
|
32
|
+
onValueCommit?: (value: number | [number, number]) => void;
|
|
33
|
+
min?: number;
|
|
34
|
+
max?: number;
|
|
35
|
+
step?: number;
|
|
36
|
+
/** Smallest gap between the range's thumbs, in steps. */
|
|
37
|
+
minStepsBetweenThumbs?: number;
|
|
38
|
+
label?: React.ReactNode;
|
|
39
|
+
/** The picked value at the right of the label's line. Hidden while `inputs` are on. */
|
|
40
|
+
showValue?: boolean;
|
|
41
|
+
/** Small number fields beside the track to type the value. */
|
|
42
|
+
inputs?: boolean;
|
|
43
|
+
/** The value in a bubble over the thumb while it moves. */
|
|
44
|
+
tooltip?: boolean;
|
|
45
|
+
orientation?: 'horizontal' | 'vertical';
|
|
46
|
+
/** How a value reads in the readout, the bubble, the fields' neighbours and to screen readers. */
|
|
47
|
+
formatValue?: (value: number) => string;
|
|
48
|
+
disabled?: boolean;
|
|
49
|
+
/** Form field name, for a native form submit. */
|
|
50
|
+
name?: string;
|
|
51
|
+
id?: string;
|
|
52
|
+
/** Names the slider when there is no `label`. */
|
|
53
|
+
'aria-label'?: string;
|
|
54
|
+
/** Classes for the outer wrapper. */
|
|
55
|
+
className?: string;
|
|
56
|
+
}
|
|
57
|
+
export declare function Slider({ value: valueProp, defaultValue, onValueChange, onValueCommit, min, max, step, minStepsBetweenThumbs, label, showValue, inputs, tooltip, orientation, formatValue, disabled, name, id, 'aria-label': ariaLabel, className, }: SliderProps): React.JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
'use client';export { Slider } from '../chunk-L6NCCSIP.js';
|
|
2
|
+
import '../chunk-YPNKBE5X.js';
|
|
3
|
+
import '../chunk-B6V4VSGH.js';
|
|
4
|
+
import '../chunk-UBNHSZSE.js';
|
|
5
|
+
import '../chunk-BKZBWPUH.js';
|
|
6
|
+
import '../chunk-H63FYCMY.js';
|
|
7
|
+
//# sourceMappingURL=slider.js.map
|
|
8
|
+
//# sourceMappingURL=slider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"slider.js"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* The background (or underline) that slides under the selected item of Tabs, Segmented control
|
|
4
|
+
* and Pagination, all on one motion: 300 ms on the kit's ease-out, the leading edge (the one
|
|
5
|
+
* on the side it is heading to) moving straight away and the trailing edge 30 ms behind, so it
|
|
6
|
+
* stretches a little towards the new item and settles there. A change mid-move carries on from
|
|
7
|
+
* wherever it is. Only a change of selection animates; a resize just puts it in place. With
|
|
8
|
+
* reduced motion it moves at once.
|
|
9
|
+
*
|
|
10
|
+
* `listRef` is the positioned element the items sit in, `selector` finds the selected item in
|
|
11
|
+
* it, `selected` is whatever names the selection. Render the indicator absolutely at left 0 of
|
|
12
|
+
* the list with the returned `ref`; until it is placed (`ready`), let the selected item paint
|
|
13
|
+
* its own fill so the server render isn't bare.
|
|
14
|
+
*/
|
|
15
|
+
export declare const SLIDE_MS = 300;
|
|
16
|
+
export declare function useSlidingIndicator<T extends HTMLElement = HTMLSpanElement>(listRef: React.RefObject<HTMLElement | null>, selector: string, selected: unknown,
|
|
17
|
+
/** Off: it moves to the new item at once. */
|
|
18
|
+
{ animate: motionOn }?: {
|
|
19
|
+
animate?: boolean;
|
|
20
|
+
}): {
|
|
21
|
+
ref: React.RefObject<T | null>;
|
|
22
|
+
ready: boolean;
|
|
23
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"sliding-indicator.js"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Streaming text: an agent's answer writing itself out as it arrives, in the assistant
|
|
4
|
+
* Message's type (text/default 13/19.5).
|
|
5
|
+
*
|
|
6
|
+
* Give it the text received so far and keep it growing; `streaming` while more is coming. A
|
|
7
|
+
* model sends text in uneven chunks, so the component doesn't print them as they land: it
|
|
8
|
+
* writes at an even pace (`speed`, letters a second), stops briefly after a full stop or a
|
|
9
|
+
* comma, and speeds up when it falls behind, so a backlog never takes more than about a second
|
|
10
|
+
* to catch up. A caret (2px, action/primary/bg) sits at the end while it writes.
|
|
11
|
+
*
|
|
12
|
+
* `reveal` is how each piece comes in: `blur` (default) fades every letter in from a 2px blur
|
|
13
|
+
* over 220 ms, `fade` without the blur, `word` a word at a time, `none` prints letters as they
|
|
14
|
+
* come with no motion. Only the letters arriving animate; the rest carry no filter.
|
|
15
|
+
*
|
|
16
|
+
* The whole text received is in the DOM from the start (letters not yet written are only
|
|
17
|
+
* transparent), so screen readers get it at once; the box is aria-busy while it streams.
|
|
18
|
+
* With reduced motion it shows everything received straight away.
|
|
19
|
+
*/
|
|
20
|
+
export interface StreamingTextProps extends Omit<React.ComponentProps<'div'>, 'children'> {
|
|
21
|
+
/** Everything received so far. Grow it as chunks arrive. */
|
|
22
|
+
text: string;
|
|
23
|
+
/** More is coming: keeps the caret and the pace going. */
|
|
24
|
+
streaming?: boolean;
|
|
25
|
+
/** Letters written a second at the even pace. */
|
|
26
|
+
speed?: number;
|
|
27
|
+
reveal?: 'blur' | 'fade' | 'word' | 'none';
|
|
28
|
+
/** The caret at the end while it writes. */
|
|
29
|
+
caret?: boolean;
|
|
30
|
+
/** Called once everything received is written and `streaming` is off. */
|
|
31
|
+
onDone?: () => void;
|
|
32
|
+
}
|
|
33
|
+
export declare function StreamingText({ text, streaming, speed, reveal, caret, onDone, className, ...props }: StreamingTextProps): React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"streaming-text.js"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Switch as SwitchPrimitive } from 'radix-ui';
|
|
3
|
+
/**
|
|
4
|
+
* Switch, 1:1 with the uiKit `_switchBase` (3647:17617) and `Switch` (3647:17714) sets: a
|
|
5
|
+
* 32 × 18 track (border/input off, calm green on, each with its hover), a 14px white thumb,
|
|
6
|
+
* a 2px focus ring, 50% when disabled. Label medium 13/19.5, description muted, 10px from
|
|
7
|
+
* the track. Use it for settings that apply at once; use a checkbox inside a form.
|
|
8
|
+
* The look of every state lives in styles/components.css.
|
|
9
|
+
*/
|
|
10
|
+
export interface SwitchProps extends React.ComponentProps<typeof SwitchPrimitive.Root> {
|
|
11
|
+
label?: React.ReactNode;
|
|
12
|
+
description?: React.ReactNode;
|
|
13
|
+
placement?: 'left' | 'right';
|
|
14
|
+
}
|
|
15
|
+
export declare function Switch({ className, label, description, placement, id, ...props }: SwitchProps): React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"switch.js"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Table, 1:1 with the uiKit `Table` set (3411:21610) and its parts: table/header (3410:17835),
|
|
4
|
+
* table/row (3410:18040), table/cell (3409:17760), table/headerCell (3409:17734) and
|
|
5
|
+
* table/checkboxCell (3409:17703). A real `<table>`.
|
|
6
|
+
*
|
|
7
|
+
* - Frame: bg/card, 1px border-subtle, radius-xl, clipped.
|
|
8
|
+
* - Header row: component/table-header fill, 1px border-subtle under it. Header cells pad
|
|
9
|
+
* 4 / 8 / 4 / 4 around a label button (8px sides, 3px top and bottom, radius-md, medium
|
|
10
|
+
* 13/18, text-muted); hover tints the button bg-hover. Sortable headers cycle
|
|
11
|
+
* none → asc → desc with a 14px arrow 10px after the label, and set aria-sort.
|
|
12
|
+
* - Cells: 12 left, 10 right, 8 top and bottom, at least 40 high, regular 13/19.5, clipped
|
|
13
|
+
* with an ellipsis. Chips and other nodes sit in a row 4px apart.
|
|
14
|
+
* - Checkbox column: 8px left padding, no right padding; the header box selects all.
|
|
15
|
+
* - zebra: every second row on component/table-zebra.
|
|
16
|
+
* - Row hover lifts the row: bg-hover, 1px border-strong edge, radius-xl, shadow sm.
|
|
17
|
+
* - overflow="fit": columns are proportional (`width` is an fr weight). overflow="scroll":
|
|
18
|
+
* columns keep their pixel `width`, the first column stays in place, a 64px fade marks
|
|
19
|
+
* the clipped edge and a 6px scrollbar (bg-muted track, border-strong thumb) sits below.
|
|
20
|
+
*
|
|
21
|
+
* The row edge is drawn with inset shadows on the cells, since table rows can't take a
|
|
22
|
+
* border radius. `data-force="hover"` on a `<tr>` shows the hover state.
|
|
23
|
+
*/
|
|
24
|
+
export type Sort = {
|
|
25
|
+
key: string;
|
|
26
|
+
direction: 'asc' | 'desc';
|
|
27
|
+
} | null;
|
|
28
|
+
export type Row = {
|
|
29
|
+
id: string;
|
|
30
|
+
} & Record<string, unknown>;
|
|
31
|
+
export interface Column<R extends Row = Row> {
|
|
32
|
+
key: string;
|
|
33
|
+
header: React.ReactNode;
|
|
34
|
+
/** fr weight with overflow="fit" (default 1), pixels with overflow="scroll" (default 160). */
|
|
35
|
+
width?: number;
|
|
36
|
+
sortable?: boolean;
|
|
37
|
+
/** Renders the cell; defaults to the row's value at `key`. */
|
|
38
|
+
cell?: (row: R) => React.ReactNode;
|
|
39
|
+
align?: 'left' | 'right';
|
|
40
|
+
}
|
|
41
|
+
export interface TableProps<R extends Row = Row> extends Omit<React.ComponentProps<'div'>, 'children'> {
|
|
42
|
+
columns: Column<R>[];
|
|
43
|
+
rows: R[];
|
|
44
|
+
selectable?: boolean;
|
|
45
|
+
zebra?: boolean;
|
|
46
|
+
overflow?: 'fit' | 'scroll';
|
|
47
|
+
/** Called with the new sort; rows are sorted by value unless `manualSort` is set. */
|
|
48
|
+
onSortChange?: (sort: Sort) => void;
|
|
49
|
+
defaultSort?: Sort;
|
|
50
|
+
/** Leave rows in the order given (sort them yourself in onSortChange). */
|
|
51
|
+
manualSort?: boolean;
|
|
52
|
+
selected?: string[];
|
|
53
|
+
onSelectedChange?: (ids: string[]) => void;
|
|
54
|
+
/** Accessible name of the table. */
|
|
55
|
+
label?: string;
|
|
56
|
+
}
|
|
57
|
+
export declare function Table<R extends Row = Row>({ columns, rows, selectable, zebra, overflow, onSortChange, defaultSort, manualSort, selected: selectedProp, onSelectedChange, label, className, ...props }: TableProps<R>): React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"table.js"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Tabs as TabsPrimitive } from 'radix-ui';
|
|
3
|
+
/**
|
|
4
|
+
* Tabs, 1:1 with the uiKit `Tabs` (3635:18677) and `tabs/item` (3635:18591) sets.
|
|
5
|
+
*
|
|
6
|
+
* Underline: tabs 32px apart on a 1px border/default rule; md is 36px high with a 14px label,
|
|
7
|
+
* sm 32px with 13px. The selected tab has a 2px action/primary indicator sitting on the rule;
|
|
8
|
+
* hover shows it in border/strong. Focus draws a 1.5px border/focus ring around the label.
|
|
9
|
+
*
|
|
10
|
+
* Pill: tabs 4px apart, radius-full; md 32px high with 12px sides, sm 28px with 10px. Hover
|
|
11
|
+
* fills bg/muted, selected bg/selected, focus a 1px border/focus ring.
|
|
12
|
+
*
|
|
13
|
+
* The selected tab's indicator (the underline's 2px bar, the pill's bg/selected) is one element
|
|
14
|
+
* that slides from tab to tab under the labels, as in the Segmented control and Pagination
|
|
15
|
+
* (sliding-indicator.tsx): 300 ms, the leading edge first.
|
|
16
|
+
*
|
|
17
|
+
* Labels are text/muted, text/default on hover, focus and selected; disabled is 50%. Optional
|
|
18
|
+
* 16px leading icon, 6px from the label. Built on the Radix Tabs (arrow keys move between tabs).
|
|
19
|
+
* States answer to `data-force="hover" | "focus"` for state sheets.
|
|
20
|
+
*/
|
|
21
|
+
export type TabItem = string | {
|
|
22
|
+
value: string;
|
|
23
|
+
label: React.ReactNode;
|
|
24
|
+
/** 16px leading icon. */
|
|
25
|
+
icon?: React.ReactNode;
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
};
|
|
28
|
+
export interface TabsProps {
|
|
29
|
+
items: TabItem[];
|
|
30
|
+
value?: string;
|
|
31
|
+
defaultValue?: string;
|
|
32
|
+
onValueChange?: (value: string) => void;
|
|
33
|
+
variant?: 'underline' | 'pill';
|
|
34
|
+
size?: 'md' | 'sm';
|
|
35
|
+
/** Disable every tab. */
|
|
36
|
+
disabled?: boolean;
|
|
37
|
+
/** Accessible name for the tab list. */
|
|
38
|
+
'aria-label'?: string;
|
|
39
|
+
/** `TabsContent` panels, one per item value. */
|
|
40
|
+
children?: React.ReactNode;
|
|
41
|
+
className?: string;
|
|
42
|
+
}
|
|
43
|
+
export declare function Tabs({ items, value, defaultValue, onValueChange, variant, size, disabled, children, className, ...props }: TabsProps): React.JSX.Element;
|
|
44
|
+
/** The panel for one tab value. */
|
|
45
|
+
export declare function TabsContent({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Content>): React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"tabs.js"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Textarea, 1:1 with the uiKit `Textarea` set (3647:17812): the Input skin (surface fill,
|
|
4
|
+
* border/default, radius-lg, shadow xs; border/strong on hover, border/focus and the focus
|
|
5
|
+
* ring on focus, action/destructive/bg on error) at 96px tall with a resize grip. Above it a
|
|
6
|
+
* label (medium 13/18) with an optional "(Optional)" in muted 13; under it a hint row: the
|
|
7
|
+
* hint (muted) and, with `maxLength`, a counter (text/subtle) on the right. An error message
|
|
8
|
+
* replaces the hint and turns the whole row action/destructive/bg. Disabled is bg/muted with
|
|
9
|
+
* text/subtle and the whole field at 60%.
|
|
10
|
+
*
|
|
11
|
+
* `maxLength` drives the counter and is not enforced, so a pasted text can run over and show
|
|
12
|
+
* it (134/120); pair it with `error` to say what to fix. The look is styles/components/
|
|
13
|
+
* input.css (`.satin-field`) plus textarea.css.
|
|
14
|
+
*/
|
|
15
|
+
export interface TextareaProps extends Omit<React.ComponentProps<'textarea'>, 'onChange' | 'maxLength'> {
|
|
16
|
+
label?: React.ReactNode;
|
|
17
|
+
/** Adds a muted "(Optional)" after the label. */
|
|
18
|
+
optional?: boolean;
|
|
19
|
+
hint?: React.ReactNode;
|
|
20
|
+
/** An error message (replaces the hint), or `true` to mark the field invalid without one. */
|
|
21
|
+
error?: React.ReactNode | boolean;
|
|
22
|
+
/** Shows a `length/maxLength` counter. */
|
|
23
|
+
maxLength?: number;
|
|
24
|
+
onChange?: (value: string) => void;
|
|
25
|
+
/** Classes for the outer wrapper (label + field + hint row). `className` styles the field. */
|
|
26
|
+
wrapperClassName?: string;
|
|
27
|
+
/** Show a state without interacting, for state sheets. */
|
|
28
|
+
'data-force'?: 'hover' | 'focus';
|
|
29
|
+
}
|
|
30
|
+
export declare function Textarea({ label, optional, hint, error, maxLength, className, wrapperClassName, id, disabled, required, value, defaultValue, onChange, 'aria-describedby': ariaDescribedBy, 'data-force': force, ...props }: TextareaProps): React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"textarea.js"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type AgentLoadingIndicator } from './agent-loading';
|
|
3
|
+
/**
|
|
4
|
+
* Thinking, 1:1 with the uiKit `Thinking` set (3239:20908) and its parts thinking/header
|
|
5
|
+
* (3239:20766), thinking/step (3239:20791) and thinking/_mark (3239:20674).
|
|
6
|
+
*
|
|
7
|
+
* What an agent did, once it is done; while it works, AgentLoading (agent-loading.tsx) shows
|
|
8
|
+
* instead. collapsed: the mark at rest (the full tetris board, or the flappy bird), summary
|
|
9
|
+
* and a 14px chevron. expanded: the same header with the chevron turned up, then 8px down a body
|
|
10
|
+
* with 4px left inset: a 16px rail (1px line, rail-edge → rail-center → rail-edge) and, 12px
|
|
11
|
+
* on, the steps 8px apart.
|
|
12
|
+
*
|
|
13
|
+
* The header is a button (click, Enter, Space) that opens and folds the body with the
|
|
14
|
+
* Accordion's motion; the folded body stays mounted but leaves tab order and screen readers.
|
|
15
|
+
* `state` sets the starting state and follows later changes, `onToggle` reports them.
|
|
16
|
+
*/
|
|
17
|
+
export type ThinkingStep =
|
|
18
|
+
/** A finished action: green check, label, muted meta that truncates. */
|
|
19
|
+
{
|
|
20
|
+
type?: 'task';
|
|
21
|
+
label: React.ReactNode;
|
|
22
|
+
meta?: React.ReactNode;
|
|
23
|
+
}
|
|
24
|
+
/** A thought, wrapping in text/muted. */
|
|
25
|
+
| {
|
|
26
|
+
type: 'text';
|
|
27
|
+
text: React.ReactNode;
|
|
28
|
+
}
|
|
29
|
+
/** A page that was read: 16px favicon, title, muted meta. */
|
|
30
|
+
| {
|
|
31
|
+
type: 'source';
|
|
32
|
+
icon?: React.ReactNode;
|
|
33
|
+
label: React.ReactNode;
|
|
34
|
+
meta?: React.ReactNode;
|
|
35
|
+
}
|
|
36
|
+
/** A dev tool call: icon (pencil by default), name, mono target, +added −removed, meta. */
|
|
37
|
+
| {
|
|
38
|
+
type: 'tool';
|
|
39
|
+
icon?: React.ReactNode;
|
|
40
|
+
label: React.ReactNode;
|
|
41
|
+
target?: React.ReactNode;
|
|
42
|
+
added?: React.ReactNode;
|
|
43
|
+
removed?: React.ReactNode;
|
|
44
|
+
meta?: React.ReactNode;
|
|
45
|
+
}
|
|
46
|
+
/** The rest, folded: "+5 more". */
|
|
47
|
+
| {
|
|
48
|
+
type: 'more';
|
|
49
|
+
label: React.ReactNode;
|
|
50
|
+
};
|
|
51
|
+
export type ThinkingState = 'collapsed' | 'expanded';
|
|
52
|
+
/** The mark beside the summary, matching the AgentLoading that ran before it. */
|
|
53
|
+
export type ThinkingIndicator = AgentLoadingIndicator;
|
|
54
|
+
export interface ThinkingProps extends Omit<React.ComponentProps<'div'>, 'onToggle'> {
|
|
55
|
+
/** collapsed once the agent is done, expanded when people open it. */
|
|
56
|
+
state?: ThinkingState;
|
|
57
|
+
/** The summary, e.g. "Thought for 2m 45s". */
|
|
58
|
+
label?: React.ReactNode;
|
|
59
|
+
steps?: ThinkingStep[];
|
|
60
|
+
/** The mark beside the summary. */
|
|
61
|
+
indicator?: ThinkingIndicator;
|
|
62
|
+
onToggle?: (open: boolean) => void;
|
|
63
|
+
}
|
|
64
|
+
export declare function Thinking({ state, label, steps, indicator, onToggle, className, ...props }: ThinkingProps): React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"thinking.js"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Toast as ToastPrimitive } from 'radix-ui';
|
|
3
|
+
/**
|
|
4
|
+
* Toast, 1:1 with the uiKit `Toast` set (3650:17696): intent neutral, info, success, warning or
|
|
5
|
+
* error. A 397px popover surface, radius-xl, border/default, the shadcn `lg` shadow, padding
|
|
6
|
+
* 10 left / 8 right and 10 top and bottom (12 at the bottom on the four status intents, as in
|
|
7
|
+
* Figma). A 36px radius-md icon tile in the intent's status bg, a 13px medium title (20px line)
|
|
8
|
+
* over a 13px muted description (16px line), then an optional secondary action and a 24px close.
|
|
9
|
+
*
|
|
10
|
+
* Built on the Radix Toast. Render one `<Toaster />` near the root and call `toast()` anywhere:
|
|
11
|
+
* toast.success('Booking confirmed', { description: 'Table for 4…', action: { label: 'Undo' } })
|
|
12
|
+
*
|
|
13
|
+
* The Toaster stacks them bottom-right, newest in front. Behind it, the next ones peek 16px above,
|
|
14
|
+
* each 5% smaller, cut to the front one's height with their content faded out, so the stack is
|
|
15
|
+
* even; three show at most and the rest wait, parked in the last place. Hovering or focusing the
|
|
16
|
+
* stack unfolds it, one under another 8px apart at their own heights, every toast readable, and
|
|
17
|
+
* pauses their timers.
|
|
18
|
+
*
|
|
19
|
+
* Toasts move as whole cards and never fade on the way: a new one slides up from below the
|
|
20
|
+
* stack (150% of its height), a closed one slides back down the same way, and the rest move to
|
|
21
|
+
* their new places at the same time. Every move is one transform on one element, 500 ms on the
|
|
22
|
+
* kit's ease-out, so a toast added or closed mid-move just carries on from where it is. The
|
|
23
|
+
* cut to the front one's height eases over 150 ms, the content fade over 250 ms.
|
|
24
|
+
*/
|
|
25
|
+
export type ToastIntent = 'neutral' | 'info' | 'success' | 'warning' | 'error';
|
|
26
|
+
export interface ToastAction {
|
|
27
|
+
label: string;
|
|
28
|
+
onClick?: () => void;
|
|
29
|
+
}
|
|
30
|
+
export interface ToastOptions {
|
|
31
|
+
description?: React.ReactNode;
|
|
32
|
+
intent?: ToastIntent;
|
|
33
|
+
action?: ToastAction;
|
|
34
|
+
/** The small close button on the right. */
|
|
35
|
+
closeButton?: boolean;
|
|
36
|
+
/** The status icon tile on the left. */
|
|
37
|
+
icon?: boolean;
|
|
38
|
+
/** Milliseconds before it closes by itself. `Infinity` keeps it until dismissed. */
|
|
39
|
+
duration?: number;
|
|
40
|
+
id?: string;
|
|
41
|
+
}
|
|
42
|
+
type Shortcut = (title: React.ReactNode, options?: Omit<ToastOptions, 'intent'>) => string;
|
|
43
|
+
/** Show a toast. Returns its id, which `toast.dismiss(id)` takes. */
|
|
44
|
+
export declare const toast: ((title: React.ReactNode, options?: ToastOptions) => string) & {
|
|
45
|
+
info: Shortcut;
|
|
46
|
+
success: Shortcut;
|
|
47
|
+
warning: Shortcut;
|
|
48
|
+
error: Shortcut;
|
|
49
|
+
/** Close one toast, or all of them. */
|
|
50
|
+
dismiss: (id?: string) => void;
|
|
51
|
+
};
|
|
52
|
+
export interface ToastProps extends Omit<React.ComponentProps<typeof ToastPrimitive.Root>, 'title'> {
|
|
53
|
+
title: React.ReactNode;
|
|
54
|
+
description?: React.ReactNode;
|
|
55
|
+
intent?: ToastIntent;
|
|
56
|
+
action?: ToastAction;
|
|
57
|
+
closeButton?: boolean;
|
|
58
|
+
icon?: boolean;
|
|
59
|
+
}
|
|
60
|
+
/** A single toast on its own. Lives inside `<Toaster>` (it needs the Radix toast provider). */
|
|
61
|
+
export declare function Toast({ title, description, intent, action, closeButton, icon, duration, className, ...props }: ToastProps): React.JSX.Element;
|
|
62
|
+
export interface ToasterProps {
|
|
63
|
+
/** Classes for the viewport; `absolute` instead of `fixed` keeps it inside a positioned parent. */
|
|
64
|
+
className?: string;
|
|
65
|
+
/** Most toasts on screen at once; the rest wait behind. */
|
|
66
|
+
limit?: number;
|
|
67
|
+
/** Your own controlled `<Toast>`s, rendered alongside the ones from `toast()`. */
|
|
68
|
+
children?: React.ReactNode;
|
|
69
|
+
}
|
|
70
|
+
export declare function Toaster({ className, limit, children }: ToasterProps): React.JSX.Element;
|
|
71
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"toast.js"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Toggle as TogglePrimitive } from 'radix-ui';
|
|
3
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
4
|
+
/**
|
|
5
|
+
* Toggle, 1:1 with the uiKit `Toggle` set (852:21771): a button that stays pressed. Two
|
|
6
|
+
* variants, outline (bg/popover, border/default, radius-lg) and ghost (no fill, radius-md),
|
|
7
|
+
* two sizes, md 32 (14/21) and sm 28 (13/18), 10px side padding, a 16px icon 8px from the
|
|
8
|
+
* label, and a square icon-only form.
|
|
9
|
+
*
|
|
10
|
+
* At rest the label and icon are text/muted. Hover: bg/muted (outline adds border/strong).
|
|
11
|
+
* Focus: an action/primary border, plus the 2px focus ring on outline. Pressed:
|
|
12
|
+
* action/secondary/bg-pressed (outline with border/strong), text/default; pressed + focus
|
|
13
|
+
* adds the ring on both. Disabled: text/subtle, outline on bg/muted. Ghost rounds to radius-lg
|
|
14
|
+
* whenever it is hovered, focused or pressed, as in Figma.
|
|
15
|
+
*
|
|
16
|
+
* States use satin-hover / satin-focus (or data-force), pressed is Radix's data-state="on".
|
|
17
|
+
*/
|
|
18
|
+
declare const toggleVariants: (props?: ({
|
|
19
|
+
variant?: "ghost" | "outline" | null | undefined;
|
|
20
|
+
size?: "md" | "sm" | null | undefined;
|
|
21
|
+
iconOnly?: boolean | null | undefined;
|
|
22
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
23
|
+
export interface ToggleProps extends React.ComponentProps<typeof TogglePrimitive.Root>, VariantProps<typeof toggleVariants> {
|
|
24
|
+
/** A 16px icon before the label, or the only content when `iconOnly` (then pass an aria-label). */
|
|
25
|
+
icon?: React.ReactNode;
|
|
26
|
+
/** Show a state without interacting, for state sheets. */
|
|
27
|
+
'data-force'?: 'hover' | 'focus';
|
|
28
|
+
}
|
|
29
|
+
export declare function Toggle({ className, variant, size, iconOnly, icon, children, ...props }: ToggleProps): React.JSX.Element;
|
|
30
|
+
export { toggleVariants };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"toggle.js"}
|