@uisatin/ui 0.0.0-stage → 0.1.1
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-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-6QMSWITQ.js +140 -0
- package/chunk-6QMSWITQ.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-D7RZNTFC.js +95 -0
- package/chunk-D7RZNTFC.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-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/chunk-YX5VNRJX.js +24 -0
- package/chunk-YX5VNRJX.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 +7 -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-mesh.d.ts +11 -0
- package/components/banner-mesh.js +3 -0
- package/components/banner-mesh.js.map +1 -0
- package/components/banner.d.ts +50 -0
- package/components/banner.js +6 -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 +231 -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,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.js';
|
|
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"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Tooltip, 1:1 with the uiKit `tooltip/shortcut` set (3306:17555): an inverse pill
|
|
4
|
+
* (text/default fill, bg/canvas text, medium 13/19.5) with the action name and optional
|
|
5
|
+
* keys: a KbdGroup of sm keys in the inverse tone, so they read on the dark pill in Light and
|
|
6
|
+
* the light one in Dark. Padding 4 / 6 / 4 / 10, 8px between
|
|
7
|
+
* label and keys. Shape default is radius-lg; rounded is a pill. Shadow md (0 8 12 shadow-md, 0 1 1.5 shadow-ambient) and the
|
|
8
|
+
* 1px top highlight. Without a shortcut the right padding matches the left (10).
|
|
9
|
+
*
|
|
10
|
+
* Built on the Radix tooltip: it opens on hover after `delay` and at once on keyboard focus,
|
|
11
|
+
* waits `closeDelay` after the pointer leaves before closing, closes on Escape, and links itself to the trigger with aria-describedby. It sits 8px from
|
|
12
|
+
* the trigger and fades in from 4px towards it (`@starting-style`, ease-out, 150 ms).
|
|
13
|
+
*/
|
|
14
|
+
export interface TooltipProps {
|
|
15
|
+
/** The action, in one or two words. */
|
|
16
|
+
label: React.ReactNode;
|
|
17
|
+
/** Keys that run the action, e.g. "⌘K" or "⌃⇧V". */
|
|
18
|
+
shortcut?: string;
|
|
19
|
+
shape?: 'default' | 'rounded';
|
|
20
|
+
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
21
|
+
/** Hover delay in ms before it opens. */
|
|
22
|
+
delay?: number;
|
|
23
|
+
/** How long it stays after the pointer leaves, in ms, so a quick slip off the trigger doesn't flicker it. */
|
|
24
|
+
closeDelay?: number;
|
|
25
|
+
/** The trigger. It must be focusable (a button, a link). */
|
|
26
|
+
children: React.ReactNode;
|
|
27
|
+
open?: boolean;
|
|
28
|
+
defaultOpen?: boolean;
|
|
29
|
+
onOpenChange?: (open: boolean) => void;
|
|
30
|
+
/** Portal target. Defaults to `document.body`. */
|
|
31
|
+
container?: HTMLElement | null;
|
|
32
|
+
className?: string;
|
|
33
|
+
}
|
|
34
|
+
export declare function TooltipBubble({ label, shortcut, shape, className, ...props }: Pick<TooltipProps, 'label' | 'shortcut' | 'shape' | 'className'> & React.ComponentProps<'div'>): React.JSX.Element;
|
|
35
|
+
export declare function Tooltip({ label, shortcut, shape, side, delay, closeDelay, children, open: openProp, defaultOpen, onOpenChange, container, className, }: TooltipProps): React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"tooltip.js"}
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
export { cn } from './lib/utils.js';
|
|
2
|
+
export * from './theme/index.js';
|
|
3
|
+
export * from './components/accordion.js';
|
|
4
|
+
export * from './components/avatar.js';
|
|
5
|
+
export { Badge, badgeVariants, type BadgeProps, type BadgeTone } from './components/badge.js';
|
|
6
|
+
export * from './components/banner.js';
|
|
7
|
+
export { Breadcrumb, type BreadcrumbProps, type BreadcrumbItem } from './components/breadcrumb.js';
|
|
8
|
+
export { Button, buttonVariants, type ButtonProps } from './components/button.js';
|
|
9
|
+
export * from './components/card.js';
|
|
10
|
+
export { ChartCard, ChartTooltip, ChartLegendRow, ChartLegendPill, type ChartDatum, type ChartCardBaseProps } from './components/chart.js';
|
|
11
|
+
export { LineCard, AreaCard, type LineCardProps } from './components/line-chart.js';
|
|
12
|
+
export { DonutCard, type DonutCardProps } from './components/donut-chart.js';
|
|
13
|
+
export { BarCard, type BarCardProps } from './components/bar-chart.js';
|
|
14
|
+
export { ChannelCard, type ChannelCardProps } from './components/channel-chart.js';
|
|
15
|
+
export { Checkbox, type CheckboxProps } from './components/checkbox.js';
|
|
16
|
+
export { Chip, ChipAvatar, chipVariants, type ChipProps } from './components/chip.js';
|
|
17
|
+
export { Combobox, type ComboboxProps } from './components/combobox.js';
|
|
18
|
+
export { CommandMenu, type CommandMenuProps, type CommandItem, type CommandGroup } from './components/command-menu.js';
|
|
19
|
+
export { CodeBlock, type CodeBlockProps } from './components/code-block.js';
|
|
20
|
+
export { Dialog, DialogClose, DialogAlert, CloseIcon, type DialogProps, type DialogVariant, type DialogAlertProps, type DialogAlertIntent } from './components/dialog.js';
|
|
21
|
+
export * from './components/dot.js';
|
|
22
|
+
export { Floating, type FloatingProps, type FloatingSide } from './components/floating.js';
|
|
23
|
+
export { DropdownMenu, DropdownMenuGroup, DropdownMenuItem, MenuItemContent, menuItemClass, menuSurfaceClass, menuGroupClass, menuGroupLabelClass, type DropdownMenuProps, type DropdownMenuGroupProps, type DropdownMenuItemProps, type MenuItemContentProps } from './components/dropdown.js';
|
|
24
|
+
export { FormField, useFormField, type FormFieldProps, type FormFieldContextValue } from './components/form-field.js';
|
|
25
|
+
export { Input, type InputProps } from './components/input.js';
|
|
26
|
+
export * from './components/kbd.js';
|
|
27
|
+
export { Pagination, paginationRange, type PaginationProps } from './components/pagination.js';
|
|
28
|
+
export { Popover, PopoverClose, PopoverPanel, type PopoverProps } from './components/popover.js';
|
|
29
|
+
export { Progress, type ProgressProps } from './components/progress.js';
|
|
30
|
+
export { Radio, RadioGroup, type RadioProps, type RadioGroupProps } from './components/radio.js';
|
|
31
|
+
export { SearchBar, type SearchBarProps } from './components/search-bar.js';
|
|
32
|
+
export { Select, FieldChrome, useFieldChrome, SelectChevron, type SelectProps, type SelectOption, type SelectGroup } from './components/select.js';
|
|
33
|
+
export { SegmentedControl, type SegmentedControlItem, type SegmentedControlProps } from './components/segmented-control.js';
|
|
34
|
+
export { Sheet, SheetClose, type SheetProps } from './components/sheet.js';
|
|
35
|
+
export * from './components/sidebar.js';
|
|
36
|
+
export { Skeleton, type SkeletonProps } from './components/skeleton.js';
|
|
37
|
+
export { Slider, type SliderProps } from './components/slider.js';
|
|
38
|
+
export { Switch, type SwitchProps } from './components/switch.js';
|
|
39
|
+
export { Table, type TableProps, type Column, type Row, type Sort } from './components/table.js';
|
|
40
|
+
export { Tabs, TabsContent, type TabsProps, type TabItem } from './components/tabs.js';
|
|
41
|
+
export { Textarea, type TextareaProps } from './components/textarea.js';
|
|
42
|
+
export { Toast, Toaster, toast, type ToastProps, type ToasterProps, type ToastOptions, type ToastIntent, type ToastAction } from './components/toast.js';
|
|
43
|
+
export { Toggle, toggleVariants, type ToggleProps } from './components/toggle.js';
|
|
44
|
+
export { Tooltip, TooltipBubble, type TooltipProps } from './components/tooltip.js';
|
|
45
|
+
export * from './components/agent-picker.js';
|
|
46
|
+
export * from './components/attachment.js';
|
|
47
|
+
export * from './components/decision-card.js';
|
|
48
|
+
export * from './components/empty-state.js';
|
|
49
|
+
export { Message, type MessageProps, type MessageSource } from './components/message.js';
|
|
50
|
+
export { MessageActions, type MessageActionsProps, type MessageFeedback } from './components/message-actions.js';
|
|
51
|
+
export { PromptBar, defaultActions as promptBarDefaultActions, type PromptBarProps, type PromptBarModel, type PromptBarAction } from './components/prompt-bar.js';
|
|
52
|
+
export { StreamingText, type StreamingTextProps } from './components/streaming-text.js';
|
|
53
|
+
export { Thinking, type ThinkingProps, type ThinkingStep, type ThinkingState, type ThinkingIndicator } from './components/thinking.js';
|
|
54
|
+
export { AgentLoading, type AgentLoadingProps, type AgentLoadingIndicator, TetrisMark, TetrisLabel, TetrisStill, FlappySprite, ShimmerLabel, type Glimmer } from './components/agent-loading.js';
|
|
55
|
+
export { FileUpload, FileUploadItem, fileIconFor, formatBytes, type FileUploadProps, type FileUploadFile, type FileUploadRejection, type FileUploadStatus } from './components/file-upload.js';
|
|
56
|
+
export { InputOTP, type InputOTPProps } from './components/input-otp.js';
|
|
57
|
+
export { NumberInput, type NumberInputProps } from './components/number-input.js';
|
|
58
|
+
export { ContextMenu, ContextMenuItem, ContextMenuSub, ContextMenuSeparator, type ContextMenuProps, type ContextMenuItemProps, type ContextMenuSubProps } from './components/context-menu.js';
|
|
59
|
+
export { HoverCard, hoverCardClass, type HoverCardProps } from './components/hover-card.js';
|
|
60
|
+
export { Citation, Sources, type CitationProps, type CitationSource, type SourcesProps } from './components/citations.js';
|
|
61
|
+
export { Calendar, DatePicker, DatePickerPanel, DateRangePicker, DateRangePickerPanel, formatDate, formatRange, type CalendarProps, type DatePickerProps, type DatePickerPanelProps, type DateRangePickerPanelProps, type DateRangePickerProps, type DateRange } from './components/date-picker.js';
|
|
62
|
+
export { AgentSuggestion, AgentSuggestionQuote, AgentSuggestionMetric, AgentSuggestionDiff, AgentSuggestionChanges, type AgentSuggestionProps, type AgentSuggestionChange } from './components/agent-suggestion.js';
|
|
63
|
+
export { CookieConsent, type CookieConsentProps } from './components/cookie-consent.js';
|
|
64
|
+
export { AnnouncementBar, type AnnouncementBarProps } from './components/announcement-bar.js';
|
package/index.js
ADDED
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
'use client';export { Toggle, toggleVariants } from './chunk-UC3ZJWOD.js';
|
|
2
|
+
export { StreamingText } from './chunk-RTJ76X5U.js';
|
|
3
|
+
export { Switch } from './chunk-SH6NG6VN.js';
|
|
4
|
+
export { Table } from './chunk-X3PQANZO.js';
|
|
5
|
+
export { Tabs, TabsContent } from './chunk-DETGJAIC.js';
|
|
6
|
+
export { Textarea } from './chunk-QUF2IPOZ.js';
|
|
7
|
+
export { Toast, Toaster, toast } from './chunk-2HKBZFIK.js';
|
|
8
|
+
export { Radio, RadioGroup } from './chunk-LLHTVIM3.js';
|
|
9
|
+
export { SearchBar } from './chunk-UGRSWP6U.js';
|
|
10
|
+
export { SegmentedControl } from './chunk-WTMZT3IT.js';
|
|
11
|
+
export { Sheet, SheetClose } from './chunk-TKO44NDI.js';
|
|
12
|
+
export { Sidebar, SidebarGroup, SidebarItem, SidebarSubGroup, SidebarSubItem } from './chunk-BNTPPZCK.js';
|
|
13
|
+
export { Skeleton } from './chunk-YG7JOOLJ.js';
|
|
14
|
+
export { Slider } from './chunk-L6NCCSIP.js';
|
|
15
|
+
export { AreaCard, LineCard } from './chunk-SHDFUXYV.js';
|
|
16
|
+
export { Message } from './chunk-PVOLDO4G.js';
|
|
17
|
+
export { Thinking } from './chunk-ESC5JCVQ.js';
|
|
18
|
+
export { MessageActions } from './chunk-AN2RNJLR.js';
|
|
19
|
+
export { NumberInput } from './chunk-LW3TRU5W.js';
|
|
20
|
+
export { Pagination, paginationRange } from './chunk-QS4N4MNP.js';
|
|
21
|
+
export { Popover, PopoverClose, PopoverPanel } from './chunk-BNZVTLHV.js';
|
|
22
|
+
export { PromptBar, defaultActions as promptBarDefaultActions } from './chunk-6YXUBP27.js';
|
|
23
|
+
export { EmptyState, emptyStateVariants } from './chunk-WX6BP5ZP.js';
|
|
24
|
+
export { FileUpload, FileUploadItem, fileIconFor, formatBytes } from './chunk-GICKPMJU.js';
|
|
25
|
+
export { InputOTP } from './chunk-XL75JRUA.js';
|
|
26
|
+
export { Input } from './chunk-YPNKBE5X.js';
|
|
27
|
+
export { ContextMenu, ContextMenuItem, ContextMenuSeparator, ContextMenuSub } from './chunk-PF3YBUKT.js';
|
|
28
|
+
export { CookieConsent } from './chunk-NN6PKJWS.js';
|
|
29
|
+
export { Calendar, DatePicker, DatePickerPanel, DateRangePicker, DateRangePickerPanel, formatDate, formatRange } from './chunk-XZNHT6MO.js';
|
|
30
|
+
export { DecisionCard, DecisionItemPreview } from './chunk-TX3H3QMA.js';
|
|
31
|
+
import './chunk-J3NSDRVH.js';
|
|
32
|
+
export { CloseIcon, Dialog, DialogAlert, DialogClose } from './chunk-JPNWHWAQ.js';
|
|
33
|
+
export { DonutCard } from './chunk-CL2II6BX.js';
|
|
34
|
+
export { Dot, dotVariants } from './chunk-B2K45IUR.js';
|
|
35
|
+
export { ChannelCard } from './chunk-LZMKSFCF.js';
|
|
36
|
+
export { Checkbox } from './chunk-FDKIX4DC.js';
|
|
37
|
+
export { Citation, Sources } from './chunk-6C7CGJX2.js';
|
|
38
|
+
export { HoverCard, hoverCardClass } from './chunk-HRKPV66B.js';
|
|
39
|
+
export { CodeBlock } from './chunk-A5XEM3GF.js';
|
|
40
|
+
export { Combobox } from './chunk-NSRTTYQ4.js';
|
|
41
|
+
export { Chip, ChipAvatar, chipVariants } from './chunk-3ERGAHKA.js';
|
|
42
|
+
export { CommandMenu } from './chunk-P4O6TGDR.js';
|
|
43
|
+
export { AVATAR_TOOLTIP_DELAY, Avatar, avatarVariants } from './chunk-TVLGZGYN.js';
|
|
44
|
+
export { Tooltip, TooltipBubble } from './chunk-B6V4VSGH.js';
|
|
45
|
+
export { BarCard } from './chunk-DO3TBNSC.js';
|
|
46
|
+
export { ChartCard, ChartLegendPill, ChartLegendRow, ChartTooltip } from './chunk-YPJYW624.js';
|
|
47
|
+
export { Floating } from './chunk-Y5AYU7PK.js';
|
|
48
|
+
export { FieldChrome, Select, SelectChevron, useFieldChrome } from './chunk-72OCFAPT.js';
|
|
49
|
+
export { FormField, useFormField } from './chunk-UBNHSZSE.js';
|
|
50
|
+
export { Breadcrumb } from './chunk-HL42K2NH.js';
|
|
51
|
+
export { DropdownMenu, DropdownMenuGroup, DropdownMenuItem, MenuItemContent, menuGroupClass, menuGroupLabelClass, menuItemClass, menuSurfaceClass } from './chunk-3DINAQLL.js';
|
|
52
|
+
export { Kbd, KbdArrowDown, KbdArrowUp, KbdGroup, KbdHint, KbdReturn, keysOf } from './chunk-BKZBWPUH.js';
|
|
53
|
+
export { Card, cardVariants } from './chunk-XILQ7GXE.js';
|
|
54
|
+
export { Accordion, AccordionItem } from './chunk-GQA24FYG.js';
|
|
55
|
+
export { AgentLoading, FlappySprite, ShimmerLabel, TetrisLabel, TetrisMark, TetrisStill } from './chunk-KNUWZNFV.js';
|
|
56
|
+
export { AgentAvatar, AgentMenuItem, AgentPicker, AgentPickerRow } from './chunk-VAGIAREV.js';
|
|
57
|
+
export { AgentSuggestion, AgentSuggestionChanges, AgentSuggestionDiff, AgentSuggestionMetric, AgentSuggestionQuote } from './chunk-MR3JDI7E.js';
|
|
58
|
+
export { Progress } from './chunk-7TXHCRAG.js';
|
|
59
|
+
export { Badge, badgeVariants } from './chunk-O7F3CIDV.js';
|
|
60
|
+
export { AnnouncementBar } from './chunk-D7RZNTFC.js';
|
|
61
|
+
export { Banner, bannerVariants } from './chunk-6QMSWITQ.js';
|
|
62
|
+
export { bannerMesh } from './chunk-YX5VNRJX.js';
|
|
63
|
+
export { Attachment, AttachmentGroup, AttachmentPreview, AttachmentPreviewPager, AttachmentPreviewSheets, FileIcon } from './chunk-H4NU7NPO.js';
|
|
64
|
+
export { Button, buttonVariants } from './chunk-HNQUX43Z.js';
|
|
65
|
+
export { cn } from './chunk-H63FYCMY.js';
|
|
66
|
+
|
|
67
|
+
// src/theme/create-theme.ts
|
|
68
|
+
var defaultTheme = { brand: "#4633D7", radius: 1 };
|
|
69
|
+
var toLinear = (c) => c <= 0.04045 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;
|
|
70
|
+
var toGamma = (c) => c <= 31308e-7 ? 12.92 * c : 1.055 * c ** (1 / 2.4) - 0.055;
|
|
71
|
+
function hexToRgb(hex) {
|
|
72
|
+
const h = hex.replace("#", "");
|
|
73
|
+
const full = h.length === 3 ? [...h].map((c) => c + c).join("") : h.slice(0, 6);
|
|
74
|
+
return [0, 2, 4].map((i) => parseInt(full.slice(i, i + 2), 16) / 255);
|
|
75
|
+
}
|
|
76
|
+
function rgbToOklch([r, g, b]) {
|
|
77
|
+
const [lr, lg, lb] = [r, g, b].map(toLinear);
|
|
78
|
+
const l = Math.cbrt(0.4122214708 * lr + 0.5363325363 * lg + 0.0514459929 * lb);
|
|
79
|
+
const m = Math.cbrt(0.2119034982 * lr + 0.6806995451 * lg + 0.1073969566 * lb);
|
|
80
|
+
const s = Math.cbrt(0.0883024619 * lr + 0.2817188376 * lg + 0.6299787005 * lb);
|
|
81
|
+
const L = 0.2104542553 * l + 0.793617785 * m - 0.0040720468 * s;
|
|
82
|
+
const A = 1.9779984951 * l - 2.428592205 * m + 0.4505937099 * s;
|
|
83
|
+
const B = 0.0259040371 * l + 0.7827717662 * m - 0.808675766 * s;
|
|
84
|
+
return [L, Math.hypot(A, B), (Math.atan2(B, A) * 180 / Math.PI + 360) % 360];
|
|
85
|
+
}
|
|
86
|
+
function oklchToRgb([L, C, H]) {
|
|
87
|
+
const a = C * Math.cos(H * Math.PI / 180);
|
|
88
|
+
const b = C * Math.sin(H * Math.PI / 180);
|
|
89
|
+
const l = (L + 0.3963377774 * a + 0.2158037573 * b) ** 3;
|
|
90
|
+
const m = (L - 0.1055613458 * a - 0.0638541728 * b) ** 3;
|
|
91
|
+
const s = (L - 0.0894841775 * a - 1.291485548 * b) ** 3;
|
|
92
|
+
return [
|
|
93
|
+
4.0767416621 * l - 3.3077115913 * m + 0.2309699292 * s,
|
|
94
|
+
-1.2684380046 * l + 2.6097574011 * m - 0.3413193965 * s,
|
|
95
|
+
-0.0041960863 * l - 0.7034186147 * m + 1.707614701 * s
|
|
96
|
+
];
|
|
97
|
+
}
|
|
98
|
+
var inGamut = (rgb) => rgb.every((c) => c >= -5e-4 && c <= 1.0005);
|
|
99
|
+
function oklchToHex([L, C, H]) {
|
|
100
|
+
let c = C;
|
|
101
|
+
let rgb = oklchToRgb([L, c, H]);
|
|
102
|
+
while (!inGamut(rgb) && c > 0) {
|
|
103
|
+
c = Math.max(0, c - 5e-3);
|
|
104
|
+
rgb = oklchToRgb([L, c, H]);
|
|
105
|
+
}
|
|
106
|
+
return "#" + rgb.map((v) => Math.round(Math.min(1, Math.max(0, toGamma(v))) * 255).toString(16).padStart(2, "0")).join("").toUpperCase();
|
|
107
|
+
}
|
|
108
|
+
var luminance = (hex) => {
|
|
109
|
+
const [r, g, b] = hexToRgb(hex).map(toLinear);
|
|
110
|
+
return 0.2126 * r + 0.7152 * g + 0.0722 * b;
|
|
111
|
+
};
|
|
112
|
+
var contrast = (a, b) => {
|
|
113
|
+
const [x, y] = [luminance(a), luminance(b)].sort((p, q) => q - p);
|
|
114
|
+
return (x + 0.05) / (y + 0.05);
|
|
115
|
+
};
|
|
116
|
+
var RAMP = {
|
|
117
|
+
"blue-50": "#F2F4FF",
|
|
118
|
+
"blue-200": "#CFD6FF",
|
|
119
|
+
"blue-300": "#B1BBFE",
|
|
120
|
+
"blue-500": "#5146E9",
|
|
121
|
+
"blue-600": "#4633D7",
|
|
122
|
+
"blue-700": "#3923B9",
|
|
123
|
+
"blue-900": "#1D1168",
|
|
124
|
+
"blue-950": "#110A47",
|
|
125
|
+
"blue-soft-50": "#F3F5FF",
|
|
126
|
+
"blue-soft-200": "#D9DEFB",
|
|
127
|
+
"blue-soft-300": "#BEC7FC",
|
|
128
|
+
"blue-soft-700": "#5158A0",
|
|
129
|
+
"blue-soft-900": "#30344F",
|
|
130
|
+
"blue-soft-950": "#1F2132",
|
|
131
|
+
"primary-dark": "#493DD6",
|
|
132
|
+
"primary-hover-dark": "#554FE7",
|
|
133
|
+
"primary-pressed-dark": "#3E2AC5",
|
|
134
|
+
"primary-border-light": "#9085E7",
|
|
135
|
+
"primary-border-dark": "#928BE6"
|
|
136
|
+
};
|
|
137
|
+
var SOLID = /* @__PURE__ */ new Set(["blue-500", "blue-600", "blue-700", "primary-dark", "primary-hover-dark", "primary-pressed-dark"]);
|
|
138
|
+
function solidLightness(c, h, base, hoverStep) {
|
|
139
|
+
const passes = (L) => contrast(oklchToHex([L, c, h]), "#FFFFFF") >= 4.7 && contrast(oklchToHex([L + hoverStep, c, h]), "#FFFFFF") >= 4.7;
|
|
140
|
+
if (passes(base)) return base;
|
|
141
|
+
let lo = 0.2;
|
|
142
|
+
let hi = base;
|
|
143
|
+
for (let i = 0; i < 20; i++) {
|
|
144
|
+
const mid = (lo + hi) / 2;
|
|
145
|
+
if (passes(mid)) lo = mid;
|
|
146
|
+
else hi = mid;
|
|
147
|
+
}
|
|
148
|
+
return lo;
|
|
149
|
+
}
|
|
150
|
+
function brandVars(brand) {
|
|
151
|
+
const [bl, bc, bh] = rgbToOklch(hexToRgb(brand));
|
|
152
|
+
const lch = (step) => rgbToOklch(hexToRgb(RAMP[step]));
|
|
153
|
+
const [rl, rc, rh] = lch("blue-600");
|
|
154
|
+
const chroma = bc / rc;
|
|
155
|
+
const light = solidLightness(bc, bh, bl, lch("blue-500")[0] - rl);
|
|
156
|
+
const darkRest = lch("primary-dark")[0];
|
|
157
|
+
const dark = solidLightness(bc, bh, light + (darkRest - rl), lch("primary-hover-dark")[0] - darkRest);
|
|
158
|
+
const root = {};
|
|
159
|
+
for (const [step, hex] of Object.entries(RAMP)) {
|
|
160
|
+
const [l, c, h] = rgbToOklch(hexToRgb(hex));
|
|
161
|
+
const isDark = step.endsWith("-dark") && step !== "primary-border-dark";
|
|
162
|
+
const L = SOLID.has(step) ? isDark ? dark + (l - darkRest) : light + (l - rl) : l;
|
|
163
|
+
root[`--color-${step}`] = step === "blue-600" && light === bl ? brand.toUpperCase() : oklchToHex([Math.min(0.97, Math.max(0.15, L)), c * chroma, bh + (h - rh)]);
|
|
164
|
+
}
|
|
165
|
+
root["--color-blue-600-a20"] = `${root["--color-blue-600"]}33`;
|
|
166
|
+
root["--color-blue-500-a20"] = `${root["--color-blue-500"]}33`;
|
|
167
|
+
root["--color-primary-focus-dark"] = `${root["--color-primary-dark"]}33`;
|
|
168
|
+
return root;
|
|
169
|
+
}
|
|
170
|
+
var RADII = { xs: 4, sm: 6, md: 8, xl: 12, "2xl": 16, "3xl": 20 };
|
|
171
|
+
function radiusVars(scale) {
|
|
172
|
+
const v = {};
|
|
173
|
+
for (const [k, px] of Object.entries(RADII)) v[`--radius-${k}`] = `${Math.round(px * scale * 2) / 2}px`;
|
|
174
|
+
v["--radius"] = `${Math.round(10 * scale * 2) / 2}px`;
|
|
175
|
+
v["--radius-pill"] = scale >= 1 ? "9999px" : `${Math.round(16 * scale)}px`;
|
|
176
|
+
return v;
|
|
177
|
+
}
|
|
178
|
+
function themeVars(theme) {
|
|
179
|
+
return { root: { ...brandVars(theme.brand), ...radiusVars(theme.radius) }, dark: {} };
|
|
180
|
+
}
|
|
181
|
+
var SCOPED_LIGHT = {
|
|
182
|
+
"--border-focus": "var(--color-blue-600)",
|
|
183
|
+
"--action-primary-bg": "var(--color-blue-600)",
|
|
184
|
+
"--action-primary-bg-hover": "var(--color-blue-500)",
|
|
185
|
+
"--action-primary-bg-pressed": "var(--color-blue-700)",
|
|
186
|
+
"--action-primary-border": "var(--color-primary-border-light)",
|
|
187
|
+
"--action-focus-ring": "var(--color-blue-600-a20)",
|
|
188
|
+
"--status-brand-bg": "var(--color-blue-soft-50)",
|
|
189
|
+
"--status-brand-border": "var(--color-blue-soft-200)",
|
|
190
|
+
"--status-brand-fg": "var(--color-blue-soft-700)",
|
|
191
|
+
"--radius-lg": "var(--radius)"
|
|
192
|
+
};
|
|
193
|
+
var SCOPED_DARK = {
|
|
194
|
+
"--border-focus": "var(--color-primary-hover-dark)",
|
|
195
|
+
"--action-primary-bg": "var(--color-primary-dark)",
|
|
196
|
+
"--action-primary-bg-hover": "var(--color-primary-hover-dark)",
|
|
197
|
+
"--action-primary-bg-pressed": "var(--color-primary-pressed-dark)",
|
|
198
|
+
"--action-primary-border": "var(--color-primary-border-dark)",
|
|
199
|
+
"--action-focus-ring": "var(--color-primary-focus-dark)",
|
|
200
|
+
"--status-brand-bg": "var(--color-blue-soft-950)",
|
|
201
|
+
"--status-brand-border": "var(--color-blue-soft-900)",
|
|
202
|
+
"--status-brand-fg": "var(--color-blue-soft-300)"
|
|
203
|
+
};
|
|
204
|
+
function themeCss(theme, scope) {
|
|
205
|
+
const vars = themeVars(theme);
|
|
206
|
+
const root = scope ? { ...vars.root, ...SCOPED_LIGHT } : vars.root;
|
|
207
|
+
const dark = scope ? { ...vars.dark, ...SCOPED_DARK } : vars.dark;
|
|
208
|
+
const block = (sel, vars2) => `${sel} {
|
|
209
|
+
${Object.entries(vars2).map(([k, v]) => ` ${k}: ${v};`).join("\n")}
|
|
210
|
+
}`;
|
|
211
|
+
return [
|
|
212
|
+
`/* Satin theme: brand ${theme.brand.toUpperCase()}, radius ${theme.radius}. */`,
|
|
213
|
+
// :root:root outranks Satin's own :root, so the theme wins wherever the file is loaded.
|
|
214
|
+
block(scope ?? ":root:root", root),
|
|
215
|
+
...Object.keys(dark).length ? [block(scope ? `.dark ${scope}` : ":root.dark", dark)] : [],
|
|
216
|
+
""
|
|
217
|
+
].join("\n\n");
|
|
218
|
+
}
|
|
219
|
+
function randomTheme(current) {
|
|
220
|
+
const [, , currentHue] = current ? rgbToOklch(hexToRgb(current.brand)) : [0, 0, -360];
|
|
221
|
+
const hue = (currentHue + 60 + Math.random() * 240) % 360;
|
|
222
|
+
const l = 0.5 + Math.random() * 0.25;
|
|
223
|
+
const brand = oklchToHex([l, 0.12 + Math.random() * 0.08, hue]);
|
|
224
|
+
const radii = [0, 0.5, 1, 1.5].filter((r) => r !== current?.radius);
|
|
225
|
+
const radius = radii[Math.floor(Math.random() * radii.length)];
|
|
226
|
+
return { brand, radius };
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
export { contrast, defaultTheme, randomTheme, themeCss, themeVars };
|
|
230
|
+
//# sourceMappingURL=index.js.map
|
|
231
|
+
//# sourceMappingURL=index.js.map
|