@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,39 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* AnnouncementBar: one line of news across the top (or bottom) edge of the page, with a button
|
|
4
|
+
* to read more and an optional close.
|
|
5
|
+
*
|
|
6
|
+
* `tone` sets the fill: primary (action/primary/bg, the default), inverse (action/inverse/bg) or
|
|
7
|
+
* default (bg/card between two border/subtle rules). The bar is 44 high, the message centred in Body/lg with
|
|
8
|
+
* the action after it, 12px apart: a secondary xs Button with a 14px arrow. The close button,
|
|
9
|
+
* when `onDismiss` is passed, sits 12px from the right edge: a 28px square, the 16px cross at
|
|
10
|
+
* 70% that turns full on hover over action/primary/bg-hover.
|
|
11
|
+
*
|
|
12
|
+
* `background="mesh"` adds the Banner's glow over the primary; `shimmer` sends a soft band of
|
|
13
|
+
* light across now and then.
|
|
14
|
+
*
|
|
15
|
+
* `sticky` keeps it on the top or bottom edge of its scroll container as the page scrolls.
|
|
16
|
+
* Long messages wrap; the close keeps its corner.
|
|
17
|
+
*/
|
|
18
|
+
export interface AnnouncementBarProps extends React.ComponentProps<'div'> {
|
|
19
|
+
/** The button after the message; with `href` it renders as a link. */
|
|
20
|
+
action?: {
|
|
21
|
+
label: React.ReactNode;
|
|
22
|
+
href?: string;
|
|
23
|
+
onClick?: () => void;
|
|
24
|
+
};
|
|
25
|
+
onDismiss?: () => void;
|
|
26
|
+
dismissLabel?: string;
|
|
27
|
+
/** Sticks to the top or bottom edge of its scroll container. */
|
|
28
|
+
sticky?: 'top' | 'bottom';
|
|
29
|
+
/**
|
|
30
|
+
* `primary`: action/primary/bg (the default). `inverse`: action/inverse/bg, near-black in light
|
|
31
|
+
* and near-white in dark. `default`: bg/card with border/subtle rules above and below, like a Banner.
|
|
32
|
+
*/
|
|
33
|
+
tone?: 'primary' | 'inverse' | 'default';
|
|
34
|
+
/** `mesh` lays the Banner's glow over the bar: lighter on primary and inverse, coloured on default. */
|
|
35
|
+
background?: 'plain' | 'mesh';
|
|
36
|
+
/** Now and then a soft band of light crosses the bar (off under reduced motion). */
|
|
37
|
+
shimmer?: boolean;
|
|
38
|
+
}
|
|
39
|
+
export declare function AnnouncementBar({ action, onDismiss, dismissLabel, sticky, tone, background, shimmer, children, className, ...props }: AnnouncementBarProps): React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"announcement-bar.js"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Attachment, 1:1 with the uiKit `Attachment` set (3141:20409), plus `AttachmentGroup`
|
|
4
|
+
* (3144:21146) and `AttachmentPreview` (3142:20419).
|
|
5
|
+
*
|
|
6
|
+
* - size `sm`: a 28px chip — 16px file icon, medium 13 name (max 200, truncated), remove button.
|
|
7
|
+
* Radius-md, or full when `shape="rounded"`.
|
|
8
|
+
* - size `lg`: a 32px icon tile (bg/muted) + name + 12px text/muted meta line. Radius-xl with 6px
|
|
9
|
+
* vertical padding (52 high), or full with 4px (48 high).
|
|
10
|
+
* - States: default bg/popover, border/default, 0 1 1 shadow-xs. Hover border/strong (sm also
|
|
11
|
+
* turns bg/canvas). Pressed bg/muted, border/strong, and the lg tile turns bg/card. Focus keeps
|
|
12
|
+
* border/default and adds the 2px focus ring. All answer to `data-force` as well.
|
|
13
|
+
* - The remove button is the DS Button (tertiary, xs, icon only, rounded), as in Figma.
|
|
14
|
+
* - The whole chip opens the file (`onOpen`); `preview` shows an AttachmentPreview above it on hover.
|
|
15
|
+
*/
|
|
16
|
+
export interface AttachmentProps extends Omit<React.ComponentProps<'div'>, 'children'> {
|
|
17
|
+
name: string;
|
|
18
|
+
/** Type and size, e.g. "PDF · 2.4 MB". Shown on `lg` only. */
|
|
19
|
+
meta?: string;
|
|
20
|
+
/** File type icon. Defaults to the PDF icon. */
|
|
21
|
+
icon?: React.ReactNode;
|
|
22
|
+
size?: 'sm' | 'lg';
|
|
23
|
+
/** Rounded inside the composer and chat, Default inside cards and tables. */
|
|
24
|
+
shape?: 'default' | 'rounded';
|
|
25
|
+
/** Shows the remove button. Leave it out once the message is sent. */
|
|
26
|
+
onRemove?: () => void;
|
|
27
|
+
onOpen?: () => void;
|
|
28
|
+
/** Content for the hover preview, usually an `<AttachmentPreview>`. */
|
|
29
|
+
preview?: React.ReactNode;
|
|
30
|
+
'data-force'?: 'hover' | 'pressed' | 'focus';
|
|
31
|
+
}
|
|
32
|
+
export declare function Attachment({ className, name, meta, icon, size, shape, onRemove, onOpen, preview, ...props }: AttachmentProps): React.JSX.Element;
|
|
33
|
+
export interface AttachmentGroupProps extends React.ComponentProps<'div'> {
|
|
34
|
+
}
|
|
35
|
+
/** AttachmentGroup (3144:21146): files wrap onto new rows at 576px, 4px apart. */
|
|
36
|
+
export declare function AttachmentGroup({ className, ...props }: AttachmentGroupProps): React.JSX.Element;
|
|
37
|
+
export interface AttachmentPreviewProps extends Omit<React.ComponentProps<'div'>, 'children'> {
|
|
38
|
+
name: string;
|
|
39
|
+
icon?: React.ReactNode;
|
|
40
|
+
/** The first page or the first rows. Scrolls inside a fixed 176px viewport. */
|
|
41
|
+
children?: React.ReactNode;
|
|
42
|
+
/** Left side of the footer: an `AttachmentPreviewPager` or `AttachmentPreviewSheets`. */
|
|
43
|
+
navigation?: React.ReactNode;
|
|
44
|
+
onOpen?: () => void;
|
|
45
|
+
openLabel?: string;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* AttachmentPreview (3142:20419): 296 wide, bg/popover, border/default, radius-xl, shadcn md
|
|
49
|
+
* shadow. A header with the file, a 176px scrolling viewport with a fade at the bottom, a
|
|
50
|
+
* border/subtle divider and a footer that moves between pages or sheets and opens the file.
|
|
51
|
+
*/
|
|
52
|
+
export declare function AttachmentPreview({ className, name, icon, children, navigation, onOpen, openLabel, ...props }: AttachmentPreviewProps): React.JSX.Element;
|
|
53
|
+
/** Document footer: previous / next section and "Page 1 of 3". */
|
|
54
|
+
export declare function AttachmentPreviewPager({ page, total, onPrevious, onNext, }: {
|
|
55
|
+
page: number;
|
|
56
|
+
total: number;
|
|
57
|
+
onPrevious?: () => void;
|
|
58
|
+
onNext?: () => void;
|
|
59
|
+
}): React.JSX.Element;
|
|
60
|
+
/** Spreadsheet footer: one tab per sheet; the current one is filled bg/muted. */
|
|
61
|
+
export declare function AttachmentPreviewSheets({ sheets, value, onValueChange, }: {
|
|
62
|
+
sheets: string[];
|
|
63
|
+
value: string;
|
|
64
|
+
onValueChange?: (sheet: string) => void;
|
|
65
|
+
}): React.JSX.Element;
|
|
66
|
+
/**
|
|
67
|
+
* File type icons from uiKit `icon` (filePdf 3138:39947, fileXlsx 3138:39967). They keep their
|
|
68
|
+
* own colours (library primitives), so they don't follow currentColor.
|
|
69
|
+
*/
|
|
70
|
+
export declare function FileIcon({ type, className }: {
|
|
71
|
+
type: 'pdf' | 'xlsx';
|
|
72
|
+
className?: string;
|
|
73
|
+
}): React.JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
'use client';export { Attachment, AttachmentGroup, AttachmentPreview, AttachmentPreviewPager, AttachmentPreviewSheets, FileIcon } from '../chunk-H4NU7NPO.js';
|
|
2
|
+
import '../chunk-HNQUX43Z.js';
|
|
3
|
+
import '../chunk-H63FYCMY.js';
|
|
4
|
+
//# sourceMappingURL=attachment.js.map
|
|
5
|
+
//# sourceMappingURL=attachment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"attachment.js"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
export type AvatarTone = 'neutral' | 'brand' | 'sky' | 'green' | 'amber' | 'red' | 'fuchsia' | 'plum';
|
|
4
|
+
export type AvatarSize = 16 | 20 | 24 | 32 | 40 | 48;
|
|
5
|
+
/**
|
|
6
|
+
* Avatar, 1:1 with the uiKit `Avatar` set (992:20199): initials on a tone fill, the same eight
|
|
7
|
+
* hue pairs as Badge (`tone/bg` fill, `tone/fg` text, no border), six px sizes and a Circle or
|
|
8
|
+
* Rounded shape. Rounded steps the radius with the size: 4 / 4 / 6 / 8 / 10 / 12.
|
|
9
|
+
*
|
|
10
|
+
* Type per size, from Figma: 16 → SemiBold 7/8, 20 → SemiBold 9/10 (no kit token for either),
|
|
11
|
+
* 24 → text/2xs SemiBold, 32 → Label/sm 13/16, 40 → Label/lg 14/14, 48 → text/lg Medium.
|
|
12
|
+
* Groups (docs example 3889:7365) overlap with -8px and stack the first on top.
|
|
13
|
+
*
|
|
14
|
+
* With `name` the avatar says who it is: it becomes an image named after the person, takes
|
|
15
|
+
* keyboard focus, and shows the name in a Tooltip. On hover the tooltip waits 400 ms — the middle
|
|
16
|
+
* of the 0.3–0.5 s NN/g recommends, so a pointer passing over a row of faces doesn't flash names —
|
|
17
|
+
* and stays 150 ms after the pointer leaves. Keyboard focus shows it at once.
|
|
18
|
+
*/
|
|
19
|
+
declare const avatarVariants: (props?: ({
|
|
20
|
+
size?: 16 | 20 | 24 | 32 | 40 | 48 | null | undefined;
|
|
21
|
+
shape?: "circle" | "rounded" | null | undefined;
|
|
22
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
23
|
+
export interface AvatarProps extends Omit<React.ComponentProps<'span'>, 'children'>, Omit<VariantProps<typeof avatarVariants>, 'size'> {
|
|
24
|
+
/** One or two letters, or a count like "+3" at the end of a group. */
|
|
25
|
+
initials: string;
|
|
26
|
+
tone?: AvatarTone;
|
|
27
|
+
size?: AvatarSize;
|
|
28
|
+
/** The person's name: shown in a tooltip on hover and focus, and read by screen readers. */
|
|
29
|
+
name?: string;
|
|
30
|
+
}
|
|
31
|
+
/** NN/g: wait 0.3–0.5 s before showing hidden content on hover; we take the middle. */
|
|
32
|
+
export declare const AVATAR_TOOLTIP_DELAY = 400;
|
|
33
|
+
export declare function Avatar({ className, initials, tone, size, shape, name, ...props }: AvatarProps): React.JSX.Element;
|
|
34
|
+
export { avatarVariants };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
'use client';export { AVATAR_TOOLTIP_DELAY, Avatar, avatarVariants } from '../chunk-TVLGZGYN.js';
|
|
2
|
+
import '../chunk-B6V4VSGH.js';
|
|
3
|
+
import '../chunk-BKZBWPUH.js';
|
|
4
|
+
import '../chunk-H63FYCMY.js';
|
|
5
|
+
//# sourceMappingURL=avatar.js.map
|
|
6
|
+
//# sourceMappingURL=avatar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"avatar.js"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
export type BadgeTone = 'neutral' | 'brand' | 'sky' | 'green' | 'amber' | 'red' | 'fuchsia' | 'plum';
|
|
4
|
+
/**
|
|
5
|
+
* Badge, 1:1 with the uiKit `Badge` set (988:20203): eight tones, Large (8 × 4 padding, 24
|
|
6
|
+
* high) or Small (6 × 2, 20 high), Soft (tone fill), Plain (no fill) or Outline (bg/card with a border/default edge), radius-sm or full.
|
|
7
|
+
* Label medium 13/16, icon 14px in the tone colour, 4px apart. No border, no shadow.
|
|
8
|
+
* The tone comes from `data-tone`, which repoints the `tone/*` tokens.
|
|
9
|
+
*/
|
|
10
|
+
declare const badgeVariants: (props?: ({
|
|
11
|
+
size?: "lg" | "sm" | null | undefined;
|
|
12
|
+
variant?: "outline" | "plain" | "soft" | null | undefined;
|
|
13
|
+
shape?: "default" | "rounded" | null | undefined;
|
|
14
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
15
|
+
export interface BadgeProps extends React.ComponentProps<'span'>, VariantProps<typeof badgeVariants> {
|
|
16
|
+
tone?: BadgeTone;
|
|
17
|
+
}
|
|
18
|
+
export declare function Badge({ className, tone, size, variant, shape, ...props }: BadgeProps): React.JSX.Element;
|
|
19
|
+
export { badgeVariants };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"badge.js"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
/**
|
|
4
|
+
* Banner, 1:1 with the uiKit `Banner` set (3822:3475): a title, an optional description (one
|
|
5
|
+
* or two lines) and one action, on bg/card with a 1px border/default and the shadcn md shadow.
|
|
6
|
+
*
|
|
7
|
+
* - layout="horizontal": 450 wide, one row, 12 × 8 padding, 10 gap; the action and the close
|
|
8
|
+
* button sit on the right, 4px apart.
|
|
9
|
+
* - layout="sidebar": 222 wide (the navigation column's inner width), 12 padding, 12 gap; copy on
|
|
10
|
+
* top, the action stretched across the bottom, close pinned 3px from the top-right corner.
|
|
11
|
+
* - shape="rounded" is radius-xl (12). shape="pill" is fully round on a one-line horizontal
|
|
12
|
+
* banner and radius-3xl (20) wherever the banner is taller.
|
|
13
|
+
* - background="mesh" lays two pre-rendered glows over the card: a light one in Multiply (shows
|
|
14
|
+
* on white, gone on dark) and a dark one in Screen (glows on dark, gone on white), so it follows
|
|
15
|
+
* the theme without variables. Figma renders one pair per layout and line count; the PNGs live
|
|
16
|
+
* in satin-lab/public/figma and can be swapped with `mesh`.
|
|
17
|
+
*
|
|
18
|
+
* tone="primary" turns the card action/primary/bg (border action/primary/border) with
|
|
19
|
+
* action/primary/fg copy (description at 80%); its mesh is the dark glow alone, in Screen, so it
|
|
20
|
+
* lightens the primary. `shimmer` sends a soft band of light across now and then.
|
|
21
|
+
*
|
|
22
|
+
* Title is 14/18 medium, description Body/md in text/muted, 2px apart. The close
|
|
23
|
+
* button only renders when `onDismiss` is passed.
|
|
24
|
+
*/
|
|
25
|
+
declare const bannerVariants: (props?: ({
|
|
26
|
+
layout?: "horizontal" | "sidebar" | null | undefined;
|
|
27
|
+
shape?: "pill" | "rounded" | null | undefined;
|
|
28
|
+
lines?: "one" | "two" | null | undefined;
|
|
29
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
30
|
+
type Mesh = {
|
|
31
|
+
light: string;
|
|
32
|
+
dark: string;
|
|
33
|
+
};
|
|
34
|
+
/** Figma's pre-rendered mesh pairs, per layout and line count (served from satin-lab/public). */
|
|
35
|
+
export declare const bannerMesh: Record<'horizontal' | 'sidebar', Record<'one' | 'two', Mesh>>;
|
|
36
|
+
export interface BannerProps extends Omit<React.ComponentProps<'div'>, 'title'>, Omit<VariantProps<typeof bannerVariants>, 'lines'> {
|
|
37
|
+
title: React.ReactNode;
|
|
38
|
+
description?: React.ReactNode;
|
|
39
|
+
/** One action, usually `<Button variant="secondary">`. Stretches across a sidebar banner. */
|
|
40
|
+
action?: React.ReactNode;
|
|
41
|
+
background?: 'mesh' | 'plain';
|
|
42
|
+
/** `primary`: action/primary/bg with action/primary/fg text; its mesh glows lighter on top. */
|
|
43
|
+
tone?: 'default' | 'primary';
|
|
44
|
+
/** Now and then a soft band of light crosses the banner (off under reduced motion). */
|
|
45
|
+
shimmer?: boolean;
|
|
46
|
+
/** Shows the close button. */
|
|
47
|
+
onDismiss?: () => void;
|
|
48
|
+
/** Accessible name of the close button. */
|
|
49
|
+
dismissLabel?: string;
|
|
50
|
+
/** Replace the mesh images. */
|
|
51
|
+
mesh?: Mesh;
|
|
52
|
+
}
|
|
53
|
+
export declare function Banner({ className, title, description, action, layout, background, tone, shimmer, shape, onDismiss, dismissLabel, mesh, ...props }: BannerProps): React.JSX.Element;
|
|
54
|
+
export { bannerVariants };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"banner.js"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type ChartCardBaseProps } from './chart';
|
|
3
|
+
/**
|
|
4
|
+
* Bar chart, 1:1 with the uiKit `chart/barCard` (3607:18253) and its `chart/barColumn`
|
|
5
|
+
* (3602:17543), in the shared card frame (chart.tsx).
|
|
6
|
+
*
|
|
7
|
+
* BarCard: a 206px plot, 32px axis gutter, 4 dashed border-subtle gridlines at nice ticks,
|
|
8
|
+
* axis labels regular 12/18 text-muted, columns 8px apart with a 180px track, bars radius-md
|
|
9
|
+
* in chart/3 and day labels medium 13 text-muted 6px below. Hover (or `highlight`) keeps the
|
|
10
|
+
* hovered bar, outlines it 2px out in chart/3, shows its value above and bolds its day; the
|
|
11
|
+
* other bars dim to a 30% tint of chart/3 on bg/card, so they follow the bar, not the brand.
|
|
12
|
+
* The KPI above defaults to the sum, in full (formatValue is for the axis); an optional legend row can sit under the plot.
|
|
13
|
+
*
|
|
14
|
+
* When the data changes (a new period, say) the bars regrow from the baseline in 250 ms on
|
|
15
|
+
* ease-out, revealed by clip-path so their rounded tops stay whole, and the day labels and the
|
|
16
|
+
* axis fade in on the new scale. Not on the first paint; under reduced motion, or with
|
|
17
|
+
* `reducedMotion`, the bars swap at once.
|
|
18
|
+
*/
|
|
19
|
+
export declare function niceMax(max: number): number;
|
|
20
|
+
export interface BarCardProps extends ChartCardBaseProps {
|
|
21
|
+
/** The legend row under the plot. */
|
|
22
|
+
legend?: {
|
|
23
|
+
label: string;
|
|
24
|
+
value?: string;
|
|
25
|
+
note?: string;
|
|
26
|
+
};
|
|
27
|
+
/** Unit after the value in the tooltip ("covers"). */
|
|
28
|
+
unit?: string;
|
|
29
|
+
/** Swap the bars without motion when the data changes, as under prefers-reduced-motion. */
|
|
30
|
+
reducedMotion?: boolean;
|
|
31
|
+
}
|
|
32
|
+
export declare function BarCard({ data, formatValue, highlight, legend, unit, reducedMotion, total, ...props }: BarCardProps): React.JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use client';export { BarCard, niceMax } from '../chunk-DO3TBNSC.js';
|
|
2
|
+
import '../chunk-YPJYW624.js';
|
|
3
|
+
import '../chunk-Y5AYU7PK.js';
|
|
4
|
+
import '../chunk-72OCFAPT.js';
|
|
5
|
+
import '../chunk-UBNHSZSE.js';
|
|
6
|
+
import '../chunk-3DINAQLL.js';
|
|
7
|
+
import '../chunk-BKZBWPUH.js';
|
|
8
|
+
import '../chunk-O7F3CIDV.js';
|
|
9
|
+
import '../chunk-H63FYCMY.js';
|
|
10
|
+
//# sourceMappingURL=bar-chart.js.map
|
|
11
|
+
//# sourceMappingURL=bar-chart.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"bar-chart.js"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Breadcrumb, 1:1 with the uiKit `Breadcrumb` set (4025:3711): the path to the current page,
|
|
4
|
+
* items 4px apart with a 14px chevron (text/subtle) between them. An item is 13px text/muted
|
|
5
|
+
* in 2px × 4px of padding, radius 6; it turns text/default on hover. The last item is the
|
|
6
|
+
* current page: text/default, medium, not a link.
|
|
7
|
+
*
|
|
8
|
+
* An item can lead with a 14px `icon`, 8px before its label and centred on it; usually the first one (Home, the
|
|
9
|
+
* workspace). With `hideLabel` only the icon shows, and the label names it for screen readers.
|
|
10
|
+
*
|
|
11
|
+
* With more items than `maxItems`, the middle ones fold into a "…" button (24px) that lists
|
|
12
|
+
* them in a Dropdown; the first item and the last `maxItems - 1` stay.
|
|
13
|
+
*
|
|
14
|
+
* A `nav` named "Breadcrumb" around an ordered list; the current page has aria-current="page".
|
|
15
|
+
*/
|
|
16
|
+
export interface BreadcrumbItem {
|
|
17
|
+
label: string;
|
|
18
|
+
/** A 14px icon before the label, usually on the first item. */
|
|
19
|
+
icon?: React.ReactNode;
|
|
20
|
+
/** Show only the icon; the label still names the item for screen readers. */
|
|
21
|
+
hideLabel?: boolean;
|
|
22
|
+
/** Where it goes. Left out (or on the current page) it is plain text, or a button with `onSelect`. */
|
|
23
|
+
href?: string;
|
|
24
|
+
onSelect?: () => void;
|
|
25
|
+
}
|
|
26
|
+
export interface BreadcrumbProps extends Omit<React.ComponentProps<'nav'>, 'children'> {
|
|
27
|
+
/** From the top level down; the last one is the current page. */
|
|
28
|
+
items: BreadcrumbItem[];
|
|
29
|
+
/** Fold the middle into "…" when there are more items than this. */
|
|
30
|
+
maxItems?: number;
|
|
31
|
+
}
|
|
32
|
+
export declare function Breadcrumb({ items, maxItems, className, 'aria-label': ariaLabel, ...props }: BreadcrumbProps): React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"breadcrumb.js"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
/**
|
|
4
|
+
* Button, 1:1 with the uiKit `button` component set (10:1838): five styles, four sizes
|
|
5
|
+
* xs / md / lg / xl (24 / 28 / 32 / 36), Default or Rounded shape, and an icon-only form.
|
|
6
|
+
*
|
|
7
|
+
* Solid styles (primary, destructive, inverse) are a 1px border in the style's `border`
|
|
8
|
+
* token, a 1px outer ring in the current background and a 0 3 6 drop shadow (gone when
|
|
9
|
+
* pressed); no inner glow. Focus adds a 2px `action/focus-ring` spread; disabled
|
|
10
|
+
* is the default look at 50% opacity. Icons take the label colour on solid styles and
|
|
11
|
+
* text/muted on secondary and tertiary.
|
|
12
|
+
*
|
|
13
|
+
* Shadows are written as plain box-shadow, not Tailwind's shadow utilities: those compose
|
|
14
|
+
* five custom properties, and a browser that drops one of them drops the whole shadow.
|
|
15
|
+
*
|
|
16
|
+
* States use the satin-hover / satin-focus / satin-pressed variants (styles/index.css):
|
|
17
|
+
* the real pseudo-classes, or `data-force="hover" | "focus" | "pressed"` for state sheets.
|
|
18
|
+
* An open menu's trigger looks pressed, which hides the ring; with keyboard focus on it the
|
|
19
|
+
* `[aria-haspopup][aria-expanded=true]:focus-visible` rules bring the ring back.
|
|
20
|
+
*/
|
|
21
|
+
declare const buttonVariants: (props?: ({
|
|
22
|
+
variant?: "destructive" | "inverse" | "primary" | "secondary" | "tertiary" | null | undefined;
|
|
23
|
+
size?: "lg" | "md" | "xl" | "xs" | null | undefined;
|
|
24
|
+
shape?: "default" | "rounded" | null | undefined;
|
|
25
|
+
iconOnly?: boolean | null | undefined;
|
|
26
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
27
|
+
export interface ButtonProps extends React.ComponentProps<'button'>, VariantProps<typeof buttonVariants> {
|
|
28
|
+
/** Render the child element (a link, say) with the button's styles instead of a `<button>`. */
|
|
29
|
+
asChild?: boolean;
|
|
30
|
+
}
|
|
31
|
+
export declare function Button({ className, variant, size, shape, iconOnly, asChild, type, ...props }: ButtonProps): React.JSX.Element;
|
|
32
|
+
export { buttonVariants };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"button.js"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
/**
|
|
4
|
+
* Card, 1:1 with the uiKit `Card` set (1122:20156): bg/card, 1px border/default, radius-2xl (16),
|
|
5
|
+
* no shadow, 405 wide by default. Three stacked sections with no gap between them:
|
|
6
|
+
*
|
|
7
|
+
* - header: title in Label/lg (14/14 medium), description in text/sm muted, 2px apart.
|
|
8
|
+
* Padding 16 / 16 / 0 on md, 12 / 12 / 0 on sm (no bottom padding: the body's top padding
|
|
9
|
+
* is the space under it).
|
|
10
|
+
* - body (children): 16 padding on md, 12 on sm, children 8 apart.
|
|
11
|
+
* - footer: same padding as the body; its items sit in a row, 8 apart.
|
|
12
|
+
*
|
|
13
|
+
* `onClose` adds a tertiary 28px icon button 7px from the top-right corner.
|
|
14
|
+
*/
|
|
15
|
+
declare const cardVariants: (props?: ({
|
|
16
|
+
size?: "md" | "sm" | null | undefined;
|
|
17
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
18
|
+
export interface CardProps extends Omit<React.ComponentProps<'div'>, 'title'>, VariantProps<typeof cardVariants> {
|
|
19
|
+
title?: React.ReactNode;
|
|
20
|
+
description?: React.ReactNode;
|
|
21
|
+
footer?: React.ReactNode;
|
|
22
|
+
/** Shows the close button. */
|
|
23
|
+
onClose?: () => void;
|
|
24
|
+
/** Accessible name of the close button. */
|
|
25
|
+
closeLabel?: string;
|
|
26
|
+
}
|
|
27
|
+
export declare function Card({ className, size, title, description, footer, onClose, closeLabel, children, ...props }: CardProps): React.JSX.Element;
|
|
28
|
+
export { cardVariants };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"card.js"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type ChartCardBaseProps } from './chart';
|
|
3
|
+
/**
|
|
4
|
+
* Channel chart, 1:1 with the uiKit `chart/channelCard` (3608:18797), in the shared card
|
|
5
|
+
* frame (chart.tsx).
|
|
6
|
+
*
|
|
7
|
+
* ChannelCard: the KPI (the sum unless given) with its change badge, a 14px stacked bar of fr
|
|
8
|
+
* segments 2px apart in chart/1–5 (4px outer corners, 1.5px inner), and a legend row per
|
|
9
|
+
* channel (8px swatch, label, value, 32 high, 2px apart), in two columns from 560px. Hover (or `highlight`) fades the
|
|
10
|
+
* other segments to 15% and the other rows to 45%, and fills the row bg/muted.
|
|
11
|
+
*/
|
|
12
|
+
export interface ChannelCardProps extends ChartCardBaseProps {
|
|
13
|
+
}
|
|
14
|
+
export declare function ChannelCard({ data, formatValue, highlight, total, ...props }: ChannelCardProps): React.JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use client';export { ChannelCard } from '../chunk-LZMKSFCF.js';
|
|
2
|
+
import '../chunk-YPJYW624.js';
|
|
3
|
+
import '../chunk-Y5AYU7PK.js';
|
|
4
|
+
import '../chunk-72OCFAPT.js';
|
|
5
|
+
import '../chunk-UBNHSZSE.js';
|
|
6
|
+
import '../chunk-3DINAQLL.js';
|
|
7
|
+
import '../chunk-BKZBWPUH.js';
|
|
8
|
+
import '../chunk-O7F3CIDV.js';
|
|
9
|
+
import '../chunk-H63FYCMY.js';
|
|
10
|
+
//# sourceMappingURL=channel-chart.js.map
|
|
11
|
+
//# sourceMappingURL=channel-chart.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"channel-chart.js"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* The parts every chart card shares, 1:1 with the uiKit `chart/barCard` (3607:18253) and `chart/channelCard`
|
|
4
|
+
* (3608:18797) frames and the parts `chart/legendRow`
|
|
5
|
+
* (3602:17559) and `chart/tooltip` (3602:17522). Plain React and CSS, no chart library.
|
|
6
|
+
*
|
|
7
|
+
* Every card sits in ChartCard: the title and a period Select on one row, the KPI with its
|
|
8
|
+
* change and the range under it, then the chart.
|
|
9
|
+
*
|
|
10
|
+
* The tooltip is a text/default pill with bg/canvas text, medium label + value at 72%, 10×6
|
|
11
|
+
* padding, radius-md, a 12×6 pointer and a two-step sm shadow.
|
|
12
|
+
*/
|
|
13
|
+
export type ChartDatum = {
|
|
14
|
+
label: string;
|
|
15
|
+
value: number;
|
|
16
|
+
/** Tooltip title; defaults to the label. */
|
|
17
|
+
tooltipLabel?: string;
|
|
18
|
+
};
|
|
19
|
+
export type Periods = string[] | string[][];
|
|
20
|
+
export interface ChartCardBaseProps extends Omit<React.ComponentProps<'div'>, 'title'> {
|
|
21
|
+
title: string;
|
|
22
|
+
/** The dates the card covers, under the KPI, e.g. "Oct 26 – Nov 1, 2026 · vs previous 7 days". */
|
|
23
|
+
range: string;
|
|
24
|
+
data: ChartDatum[];
|
|
25
|
+
/** The KPI under the title, e.g. "€48,260". Cards that have one default it to the formatted sum. */
|
|
26
|
+
total?: string;
|
|
27
|
+
/** The change badge after the KPI, e.g. "+5.2%". A leading minus turns it red. */
|
|
28
|
+
change?: string;
|
|
29
|
+
/** Periods for the Select in the header. Nested arrays become titled-less groups split by a rule. */
|
|
30
|
+
periods?: Periods;
|
|
31
|
+
/** The selected period. */
|
|
32
|
+
value?: string;
|
|
33
|
+
onPeriodChange?: (period: string) => void;
|
|
34
|
+
/** Formats values in the tooltip, the legend and the axis. */
|
|
35
|
+
formatValue?: (value: number) => string;
|
|
36
|
+
/** Index of the datum shown as hovered (state sheets, docs). */
|
|
37
|
+
highlight?: number;
|
|
38
|
+
}
|
|
39
|
+
export declare const defaultFormat: (n: number) => string;
|
|
40
|
+
/**
|
|
41
|
+
* The card every chart sits in (uiKit "chart explorations" A, 4084:3591): bg/card, 1px
|
|
42
|
+
* border-default, radius-2xl, 16px in and 16 between rows. Row one: the title (16/24 medium,
|
|
43
|
+
* text/default) and, when there are `periods`, a small Select for the period at the right. Row
|
|
44
|
+
* two: the KPI (text/xl semibold) with its change badge, and the range under it in text/muted, 2px
|
|
45
|
+
* apart; without a KPI the range sits 4px under the title. Then the chart. The card is a size
|
|
46
|
+
* container, so a chart can lay itself out wider from 560px (`@min-[560px]:`).
|
|
47
|
+
*/
|
|
48
|
+
export declare function ChartCard({ title, range, total, change, periods, value, onPeriodChange, className, children, ...props }: Omit<ChartCardBaseProps, 'data' | 'formatValue' | 'highlight'>): React.JSX.Element;
|
|
49
|
+
/**
|
|
50
|
+
* chart/legendPill (4061:4182).
|
|
51
|
+
* - `outline`: an outline pill with no fill — 8px swatch, label, value 6 apart, 6 / 10 in. Active
|
|
52
|
+
* turns the ring border-strong.
|
|
53
|
+
* - `plain` (the Donut legend): no ring and no value, 6 / 8 in; active fills bg/hover, as plain
|
|
54
|
+
* controls do on hover.
|
|
55
|
+
* Dimmed fades the content to 45%, never the ground.
|
|
56
|
+
*/
|
|
57
|
+
export declare function ChartLegendPill({ color, label, value, variant, active, dimmed, className, ...props }: {
|
|
58
|
+
color: string;
|
|
59
|
+
label: React.ReactNode;
|
|
60
|
+
value?: React.ReactNode;
|
|
61
|
+
variant?: 'outline' | 'plain';
|
|
62
|
+
active?: boolean;
|
|
63
|
+
dimmed?: boolean;
|
|
64
|
+
} & React.ComponentProps<'div'>): React.JSX.Element;
|
|
65
|
+
/**
|
|
66
|
+
* The chart tooltip pill with its pointer. Exported for custom charts.
|
|
67
|
+
* With `anchor` it floats over the page (see Floating): it never gets cut off by the card,
|
|
68
|
+
* flips below when there's no room above, slides in from the screen edge, and its pointer
|
|
69
|
+
* keeps pointing at the anchor. Without it, it renders in place.
|
|
70
|
+
*/
|
|
71
|
+
export declare function ChartTooltip({ label, value, anchor, sideOffset, className, ...props }: {
|
|
72
|
+
label: React.ReactNode;
|
|
73
|
+
value: React.ReactNode;
|
|
74
|
+
/** The element it points at. */
|
|
75
|
+
anchor?: Element | null;
|
|
76
|
+
/** Gap between the anchor and the pointer's tip. */
|
|
77
|
+
sideOffset?: number;
|
|
78
|
+
} & React.ComponentProps<'div'>): React.JSX.Element;
|
|
79
|
+
/** One legend row: 8px swatch, label, value and an optional note. */
|
|
80
|
+
export declare function ChartLegendRow({ color, label, value, note, active, dimmed, className, ...props }: {
|
|
81
|
+
color: string;
|
|
82
|
+
label: React.ReactNode;
|
|
83
|
+
value: React.ReactNode;
|
|
84
|
+
note?: React.ReactNode;
|
|
85
|
+
active?: boolean;
|
|
86
|
+
dimmed?: boolean;
|
|
87
|
+
} & React.ComponentProps<'div'>): React.JSX.Element;
|
|
88
|
+
/** Rounds the top of the axis up to a nice number that splits into four steps. */
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use client';export { ChartCard, ChartLegendPill, ChartLegendRow, ChartTooltip, defaultFormat } from '../chunk-YPJYW624.js';
|
|
2
|
+
import '../chunk-Y5AYU7PK.js';
|
|
3
|
+
import '../chunk-72OCFAPT.js';
|
|
4
|
+
import '../chunk-UBNHSZSE.js';
|
|
5
|
+
import '../chunk-3DINAQLL.js';
|
|
6
|
+
import '../chunk-BKZBWPUH.js';
|
|
7
|
+
import '../chunk-O7F3CIDV.js';
|
|
8
|
+
import '../chunk-H63FYCMY.js';
|
|
9
|
+
//# sourceMappingURL=chart.js.map
|
|
10
|
+
//# sourceMappingURL=chart.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"chart.js"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Checkbox as CheckboxPrimitive } from 'radix-ui';
|
|
3
|
+
/**
|
|
4
|
+
* Checkbox, 1:1 with the uiKit `checkboxBase` (849:57531) and `checkbox` (849:57577) sets:
|
|
5
|
+
* a 16px box, radius-sm, with checked and indeterminate states and an optional label and
|
|
6
|
+
* description on either side, both 14px whatever the theme's body size (label medium,
|
|
7
|
+
* description regular). With a label or description the whole field is a `<label>`, so a
|
|
8
|
+
* click anywhere on it (box, label, description) toggles the box, and hovering it hovers the
|
|
9
|
+
* box; the label names the box, the description is wired up with `aria-describedby`. The look of every state lives in styles/components.css.
|
|
10
|
+
*/
|
|
11
|
+
export interface CheckboxProps extends React.ComponentProps<typeof CheckboxPrimitive.Root> {
|
|
12
|
+
label?: React.ReactNode;
|
|
13
|
+
description?: React.ReactNode;
|
|
14
|
+
/** Which side of the text the box sits on. */
|
|
15
|
+
placement?: 'left' | 'right';
|
|
16
|
+
}
|
|
17
|
+
export declare function Checkbox({ className, label, description, placement, id, ...props }: CheckboxProps): React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"checkbox.js"}
|