@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 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"dialog.js"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type ChartCardBaseProps } from './chart';
|
|
3
|
+
/**
|
|
4
|
+
* Donut chart, 1:1 with the uiKit `chart/donutCard` (4067:7096), in the shared ChartCard
|
|
5
|
+
* (chart.tsx).
|
|
6
|
+
*
|
|
7
|
+
* A 184px ring (20px thick) of chart/1–5 segments starting at 12 o'clock, a 2px gap between
|
|
8
|
+
* them, with the sum in the middle (text/xl semibold) over `centerLabel` in text/muted. The sum
|
|
9
|
+
* lives in the ring, so the card's summary shows only the range. Under the ring a legend of
|
|
10
|
+
* plain pills (swatch and label, the value is in the ring on hover) in two columns, 16 × 8 apart.
|
|
11
|
+
* From 560px the legend moves to the right of the ring as one column.
|
|
12
|
+
*
|
|
13
|
+
* Hover a segment or its pill (or set `highlight`): the other segments fade to 15%, the other
|
|
14
|
+
* pills' content to 45% (the hovered one fills bg/hover), and the middle shows the hovered value over "Label · 20%".
|
|
15
|
+
*/
|
|
16
|
+
export interface DonutCardProps extends Omit<ChartCardBaseProps, 'total' | 'change'> {
|
|
17
|
+
/** Under the sum in the middle. */
|
|
18
|
+
centerLabel?: string;
|
|
19
|
+
}
|
|
20
|
+
export declare function DonutCard({ data, formatValue, highlight, centerLabel, ...props }: DonutCardProps): React.JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use client';export { DonutCard } from '../chunk-CL2II6BX.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=donut-chart.js.map
|
|
11
|
+
//# sourceMappingURL=donut-chart.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"donut-chart.js"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
export type DotTone = 'fuchsia' | 'sky' | 'plum' | 'green';
|
|
4
|
+
/**
|
|
5
|
+
* Dot, 1:1 with the uiKit `Dot` set (369:6759, page dotIndicator): a 16px box with an 8px
|
|
6
|
+
* indicator in the middle, in the tone's `tone/fg` colour. Solid is a filled circle; outline
|
|
7
|
+
* is the same 8px circle drawn with a 1px stroke inside it, nothing in the middle.
|
|
8
|
+
*
|
|
9
|
+
* With a `label` the dot is an image with that name; without one it is decorative and hidden
|
|
10
|
+
* from assistive tech (pair it with visible text, as the docs ask).
|
|
11
|
+
*/
|
|
12
|
+
declare const dotVariants: (props?: ({
|
|
13
|
+
variant?: "outline" | "solid" | null | undefined;
|
|
14
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
15
|
+
export interface DotProps extends Omit<React.ComponentProps<'span'>, 'children'>, VariantProps<typeof dotVariants> {
|
|
16
|
+
tone?: DotTone;
|
|
17
|
+
/** Accessible name, e.g. "Running". Leave it out when visible text already says it. */
|
|
18
|
+
label?: string;
|
|
19
|
+
}
|
|
20
|
+
export declare function Dot({ className, tone, variant, label, ...props }: DotProps): React.JSX.Element;
|
|
21
|
+
export { dotVariants };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"dot.js"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { DropdownMenu as DropdownPrimitive } from 'radix-ui';
|
|
3
|
+
/**
|
|
4
|
+
* DropdownMenu, 1:1 with the uiKit `DropdownMenu` (654:19150) and `DropdownMenu/Item`
|
|
5
|
+
* (653:19165) sets. A 255px popover surface (max 520), 4px padding, radius-xl,
|
|
6
|
+
* border/subtle, the shadcn `sm` shadow. Items are at least 32px high, 12px in, 6px top and
|
|
7
|
+
* bottom, radius-lg, with an 8px gap between a 16px leading icon (text/muted), the content and
|
|
8
|
+
* a trailing check (status green) when selected. An optional `shortcut` shows its keys (Kbd sm)
|
|
9
|
+
* before the check. Hover, keyboard highlight and selected fill
|
|
10
|
+
* bg/selected.
|
|
11
|
+
*
|
|
12
|
+
* Groups: `DropdownMenuGroup`. Content: a 14px medium label (20px line). `stacked` puts the
|
|
13
|
+
* description under it, 2px apart, at 13px / 18px in text/muted; `inline` puts it on the same
|
|
14
|
+
* baseline 12px after the label, at 13px, truncated. Groups have a 24px header in 12px
|
|
15
|
+
* text/subtle and are 4px apart with a 1px bg/muted rule between them. Items are 4px apart.
|
|
16
|
+
*
|
|
17
|
+
* Built on the Radix DropdownMenu: arrow keys, typeahead, Escape, focus return.
|
|
18
|
+
*/
|
|
19
|
+
/** The popover surface menus share: radius-xl, border/subtle, bg/popover, the shadcn `sm` shadow. */
|
|
20
|
+
export declare const menuSurfaceClass: string;
|
|
21
|
+
/** A group of rows, with a 1px bg/muted rule under every group but the last. */
|
|
22
|
+
export declare const menuGroupClass = "flex flex-col gap-1 not-last:after:block not-last:after:h-px not-last:after:bg-bg-muted";
|
|
23
|
+
/** The 24px group header in 12px text/subtle. */
|
|
24
|
+
export declare const menuGroupLabelClass = "flex h-6 items-center px-3 text-xs leading-3 tracking-normal text-text-subtle";
|
|
25
|
+
export interface DropdownMenuProps {
|
|
26
|
+
/** The element that opens the menu. Rendered with `asChild`, so pass a Button. */
|
|
27
|
+
trigger: React.ReactNode;
|
|
28
|
+
/** `DropdownMenuItem`s, optionally inside `DropdownMenuGroup`s. */
|
|
29
|
+
children: React.ReactNode;
|
|
30
|
+
open?: boolean;
|
|
31
|
+
defaultOpen?: boolean;
|
|
32
|
+
onOpenChange?: (open: boolean) => void;
|
|
33
|
+
/** Modal menus block the rest of the page while open. */
|
|
34
|
+
modal?: boolean;
|
|
35
|
+
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
36
|
+
align?: 'start' | 'center' | 'end';
|
|
37
|
+
sideOffset?: number;
|
|
38
|
+
/** Portal target. Defaults to `document.body`. */
|
|
39
|
+
container?: HTMLElement | null;
|
|
40
|
+
/** Accessible name for the menu, when the trigger's text doesn't say enough. */
|
|
41
|
+
'aria-label'?: string;
|
|
42
|
+
/** Focus moved outside a non-modal menu; call `preventDefault()` to keep it open. */
|
|
43
|
+
onFocusOutside?: (event: Event) => void;
|
|
44
|
+
className?: string;
|
|
45
|
+
}
|
|
46
|
+
export declare function DropdownMenu({ trigger, children, open, defaultOpen, onOpenChange, modal, side, align, sideOffset, container, onFocusOutside, className, ...props }: DropdownMenuProps): React.JSX.Element;
|
|
47
|
+
export interface DropdownMenuGroupProps extends React.ComponentProps<typeof DropdownPrimitive.Group> {
|
|
48
|
+
/** The 24px group header. */
|
|
49
|
+
label?: React.ReactNode;
|
|
50
|
+
}
|
|
51
|
+
/** A titled group of items (Figma `_dropdown/group`). Groups get a rule between them. */
|
|
52
|
+
export declare function DropdownMenuGroup({ label, children, className, ...props }: DropdownMenuGroupProps): React.JSX.Element;
|
|
53
|
+
/** The row skin every menu shares: Dropdown, Select, Combobox and the Command menu. */
|
|
54
|
+
export declare const menuItemClass: string;
|
|
55
|
+
export interface MenuItemContentProps {
|
|
56
|
+
label: React.ReactNode;
|
|
57
|
+
description?: React.ReactNode;
|
|
58
|
+
/** Leading icon. 16px by default; stacked two-line items may use 20px (`iconSize={20}`). */
|
|
59
|
+
icon?: React.ReactNode;
|
|
60
|
+
iconSize?: 16 | 20;
|
|
61
|
+
/** Marks the current value: a trailing check. */
|
|
62
|
+
selected?: boolean;
|
|
63
|
+
layout?: 'stacked' | 'inline';
|
|
64
|
+
/** Keys that run the item, e.g. "⌘N", shown on the right (Figma's `showShortcut`). */
|
|
65
|
+
shortcut?: string;
|
|
66
|
+
/** Wraps the label, e.g. in Radix Select's `ItemText`. */
|
|
67
|
+
renderLabel?: (label: React.ReactNode) => React.ReactNode;
|
|
68
|
+
}
|
|
69
|
+
/** What sits inside a menu row: icon, label and description, then shortcut and check. */
|
|
70
|
+
export declare function MenuItemContent({ label, description, icon, iconSize, selected, layout, shortcut, renderLabel, }: MenuItemContentProps): React.JSX.Element;
|
|
71
|
+
export interface DropdownMenuItemProps extends Omit<React.ComponentProps<typeof DropdownPrimitive.Item>, 'children'>, Omit<MenuItemContentProps, 'label' | 'renderLabel'> {
|
|
72
|
+
label: string;
|
|
73
|
+
}
|
|
74
|
+
export declare function DropdownMenuItem({ label, description, icon, iconSize, selected, layout, shortcut, className, ...props }: DropdownMenuItemProps): React.JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
'use client';export { DropdownMenu, DropdownMenuGroup, DropdownMenuItem, MenuItemContent, menuGroupClass, menuGroupLabelClass, menuItemClass, menuSurfaceClass } from '../chunk-3DINAQLL.js';
|
|
2
|
+
import '../chunk-BKZBWPUH.js';
|
|
3
|
+
import '../chunk-H63FYCMY.js';
|
|
4
|
+
//# sourceMappingURL=dropdown.js.map
|
|
5
|
+
//# sourceMappingURL=dropdown.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"dropdown.js"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
/**
|
|
4
|
+
* EmptyState, 1:1 with the uiKit `EmptyState` set (852:51897) and its `_buttonGroup`
|
|
5
|
+
* (852:51922): a centred column 350 wide (320–560), padding 16 / 16 / 20, 16 apart, radius-2xl.
|
|
6
|
+
*
|
|
7
|
+
* - icon: a 16px glyph in text/default on a bg/muted tile, 10 padding, radius-lg (36 square).
|
|
8
|
+
* - title in text/lg medium (16/24), description in Body/lg (14/21) text/muted, 8 apart, centred.
|
|
9
|
+
* - actions: a row of Buttons 8 apart: Primary + Secondary, Secondary alone, or a Tertiary
|
|
10
|
+
* "Learn more" with a trailing arrow. Pass them as `<Button>` elements.
|
|
11
|
+
* - border: ghost (none), dashed or outline, both 1px border/default.
|
|
12
|
+
*/
|
|
13
|
+
declare const emptyStateVariants: (props?: ({
|
|
14
|
+
border?: "dashed" | "ghost" | "outline" | null | undefined;
|
|
15
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
16
|
+
export interface EmptyStateProps extends Omit<React.ComponentProps<'div'>, 'title'>, VariantProps<typeof emptyStateVariants> {
|
|
17
|
+
title: React.ReactNode;
|
|
18
|
+
description?: React.ReactNode;
|
|
19
|
+
/** A 16px icon, e.g. from iconoir-react. */
|
|
20
|
+
icon?: React.ReactNode;
|
|
21
|
+
/** One or two Buttons. */
|
|
22
|
+
actions?: React.ReactNode;
|
|
23
|
+
}
|
|
24
|
+
export declare function EmptyState({ className, border, title, description, icon, actions, ...props }: EmptyStateProps): React.JSX.Element;
|
|
25
|
+
export { emptyStateVariants };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"empty-state.js"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* FileUpload, 1:1 with the uiKit `FileUpload` set (4068:3717), its `FileUploadItem` rows
|
|
4
|
+
* (4068:3453) and the `fileUpload/_icon` mark (4068:3405).
|
|
5
|
+
*
|
|
6
|
+
* The drop zone is the dashed EmptyState: a 40px bg/muted tile with a filled file and an up
|
|
7
|
+
* arrow, the title (text/base medium), what it takes (Body/md, text/muted) and Browse files
|
|
8
|
+
* (secondary), 16 apart, 32 / 24 in, radius-2xl. While files are dragged over it the zone fills
|
|
9
|
+
* bg/hover with a status/brand dashed border, the tile turns bg/card, the title says "Drop to
|
|
10
|
+
* upload" and Browse files is disabled.
|
|
11
|
+
*
|
|
12
|
+
* Under the zone, 8 apart, one row per file the app is handling (`files`):
|
|
13
|
+
* - uploading: the type icon on a 36px tile, the name and "1.0 of 2.4 MB · 40%" over a small
|
|
14
|
+
* Progress (indeterminate while `progress` is left out), Cancel on the right.
|
|
15
|
+
* - error: status/red ground and border, a red warning mark, the name, what went wrong, Remove.
|
|
16
|
+
* - done: the file as an lg Attachment, full width, one under another.
|
|
17
|
+
*
|
|
18
|
+
* Dropping or browsing checks every file against `accept` and `maxSize`. What passes goes to
|
|
19
|
+
* `onFilesAdded`; what fails goes to `onFilesRejected` with the reason, so the app can show it
|
|
20
|
+
* as an error row. The upload itself is the app's: it keeps `files` up to date.
|
|
21
|
+
*/
|
|
22
|
+
export type FileUploadStatus = 'uploading' | 'error' | 'done';
|
|
23
|
+
export interface FileUploadFile {
|
|
24
|
+
id: string;
|
|
25
|
+
name: string;
|
|
26
|
+
/** In bytes; feeds "1.0 of 2.4 MB" and the attachment's meta. */
|
|
27
|
+
size?: number;
|
|
28
|
+
status: FileUploadStatus;
|
|
29
|
+
/** 0–100 while uploading; left out, the bar runs indeterminate and the meta says "Waiting…". */
|
|
30
|
+
progress?: number;
|
|
31
|
+
/** What went wrong, for `error`. */
|
|
32
|
+
error?: React.ReactNode;
|
|
33
|
+
/** Type icon; picked from the name when left out. */
|
|
34
|
+
icon?: React.ReactNode;
|
|
35
|
+
}
|
|
36
|
+
export interface FileUploadRejection {
|
|
37
|
+
file: File;
|
|
38
|
+
reason: 'type' | 'size';
|
|
39
|
+
/** A ready message, e.g. "Type not supported" or "Larger than 10 MB". */
|
|
40
|
+
message: string;
|
|
41
|
+
}
|
|
42
|
+
export interface FileUploadProps extends Omit<React.ComponentProps<'div'>, 'title' | 'onDrop'> {
|
|
43
|
+
files?: FileUploadFile[];
|
|
44
|
+
/** As on `<input type="file">`: MIME types, `image/*` or extensions, comma separated. */
|
|
45
|
+
accept?: string;
|
|
46
|
+
/** Largest file, in bytes. */
|
|
47
|
+
maxSize?: number;
|
|
48
|
+
multiple?: boolean;
|
|
49
|
+
disabled?: boolean;
|
|
50
|
+
title?: React.ReactNode;
|
|
51
|
+
/** Shown while files are dragged over the zone. */
|
|
52
|
+
dropTitle?: React.ReactNode;
|
|
53
|
+
/** What the zone takes, e.g. "PDF, images, CSV · up to 10 MB". */
|
|
54
|
+
description?: React.ReactNode;
|
|
55
|
+
browseLabel?: string;
|
|
56
|
+
/** Called instead of opening the file picker (demos, or an app that brings its own picker). */
|
|
57
|
+
onBrowse?: () => void;
|
|
58
|
+
onFilesAdded?: (files: File[]) => void;
|
|
59
|
+
onFilesRejected?: (rejections: FileUploadRejection[]) => void;
|
|
60
|
+
/** Cancel on an uploading row. */
|
|
61
|
+
onCancel?: (file: FileUploadFile) => void;
|
|
62
|
+
/** Remove on an error row or a done chip. */
|
|
63
|
+
onRemove?: (file: FileUploadFile) => void;
|
|
64
|
+
onOpen?: (file: FileUploadFile) => void;
|
|
65
|
+
/** Shows the drag-over look (state sheets, docs). */
|
|
66
|
+
'data-force'?: 'drag';
|
|
67
|
+
}
|
|
68
|
+
export declare const formatBytes: (n: number) => string;
|
|
69
|
+
/** The type icon for a file name: PDF, spreadsheet, or a plain page. */
|
|
70
|
+
export declare function fileIconFor(name: string): React.JSX.Element;
|
|
71
|
+
export declare function FileUpload({ files, accept, maxSize, multiple, disabled, title, dropTitle, description, browseLabel, onBrowse, onFilesAdded, onFilesRejected, onCancel, onRemove, onOpen, className, ...props }: FileUploadProps): React.JSX.Element;
|
|
72
|
+
/** One file while it uploads or after it failed (FileUploadItem 4068:3453). */
|
|
73
|
+
export declare function FileUploadItem({ file, onCancel, onRemove, className, }: {
|
|
74
|
+
file: FileUploadFile;
|
|
75
|
+
onCancel?: (file: FileUploadFile) => void;
|
|
76
|
+
onRemove?: (file: FileUploadFile) => void;
|
|
77
|
+
className?: string;
|
|
78
|
+
}): React.JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
'use client';export { FileUpload, FileUploadItem, fileIconFor, formatBytes } from '../chunk-GICKPMJU.js';
|
|
2
|
+
import '../chunk-7TXHCRAG.js';
|
|
3
|
+
import '../chunk-H4NU7NPO.js';
|
|
4
|
+
import '../chunk-HNQUX43Z.js';
|
|
5
|
+
import '../chunk-H63FYCMY.js';
|
|
6
|
+
//# sourceMappingURL=file-upload.js.map
|
|
7
|
+
//# sourceMappingURL=file-upload.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"file-upload.js"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Anchored positioning for anything that floats next to an element: tooltips, chart
|
|
4
|
+
* tooltips, small hints. Built on Floating UI (the engine Radix uses for Tooltip, Popover and
|
|
5
|
+
* DropdownMenu), so every floating layer in Satin keeps the same rules:
|
|
6
|
+
*
|
|
7
|
+
* - it renders in a portal on `body`, so a card's `overflow: hidden` never cuts it off;
|
|
8
|
+
* - it flips to the other side when there's no room and slides along the edge to stay
|
|
9
|
+
* 8px inside the viewport;
|
|
10
|
+
* - its pointer follows the anchor when it slides;
|
|
11
|
+
* - it follows the anchor on scroll and resize.
|
|
12
|
+
*/
|
|
13
|
+
export type FloatingSide = 'top' | 'right' | 'bottom' | 'left';
|
|
14
|
+
export interface FloatingProps {
|
|
15
|
+
/** The element it points at. Nothing renders while it's null. */
|
|
16
|
+
anchor: Element | null;
|
|
17
|
+
side?: FloatingSide;
|
|
18
|
+
/** Gap between the anchor and the layer, pointer included. */
|
|
19
|
+
sideOffset?: number;
|
|
20
|
+
/** How close to the viewport edge it may go. */
|
|
21
|
+
collisionPadding?: number;
|
|
22
|
+
className?: string;
|
|
23
|
+
/** Gets the side it ended up on and the pointer's props (ref and position). */
|
|
24
|
+
children: (state: {
|
|
25
|
+
side: FloatingSide;
|
|
26
|
+
arrowRef: React.RefObject<HTMLElement | null>;
|
|
27
|
+
arrowStyle: React.CSSProperties;
|
|
28
|
+
}) => React.ReactNode;
|
|
29
|
+
}
|
|
30
|
+
export declare function Floating({ anchor, side, sideOffset, collisionPadding, className, children }: FloatingProps): React.ReactPortal | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"floating.js"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Form field, 1:1 with the uiKit `FormField` set (3649:17775): a label, a control slot, then a
|
|
4
|
+
* description or, when `error` is set, an error message in its place. Vertical puts the label
|
|
5
|
+
* 8px above the control; horizontal puts it in a 160px column, 24px to the left. Description
|
|
6
|
+
* and error sit 6px under the control. Disabled dims the label and description to 50% and
|
|
7
|
+
* disables the control.
|
|
8
|
+
*
|
|
9
|
+
* The control is wired through context: Input and Textarea pick up the field's id (so the
|
|
10
|
+
* label points at them), `aria-describedby` (description or error), `aria-invalid` and
|
|
11
|
+
* `disabled`. Any other control can read the same values with `useFormField()`.
|
|
12
|
+
*/
|
|
13
|
+
export interface FormFieldContextValue {
|
|
14
|
+
id: string;
|
|
15
|
+
describedBy?: string;
|
|
16
|
+
invalid: boolean;
|
|
17
|
+
disabled: boolean;
|
|
18
|
+
required: boolean;
|
|
19
|
+
}
|
|
20
|
+
/** The id, describedby, invalid, disabled and required of the surrounding FormField, if any. */
|
|
21
|
+
export declare function useFormField(): FormFieldContextValue | null;
|
|
22
|
+
export interface FormFieldProps extends Omit<React.ComponentProps<'div'>, 'children'> {
|
|
23
|
+
label: React.ReactNode;
|
|
24
|
+
description?: React.ReactNode;
|
|
25
|
+
/** An error message. It replaces the description and marks the control invalid. */
|
|
26
|
+
error?: React.ReactNode;
|
|
27
|
+
layout?: 'vertical' | 'horizontal';
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
/** Shows the required mark after the label and sets `required` on the control. */
|
|
30
|
+
required?: boolean;
|
|
31
|
+
/** The id given to the control. Generated when left out. */
|
|
32
|
+
htmlFor?: string;
|
|
33
|
+
children: React.ReactNode;
|
|
34
|
+
}
|
|
35
|
+
export declare function FormField({ label, description, error, layout, disabled, required, htmlFor, className, children, ...props }: FormFieldProps): React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"form-field.js"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* HoverCard, 1:1 with the uiKit design (🆕 context menu & hover card): a preview of a person,
|
|
4
|
+
* place or file over its link — the Popover surface (bg/popover, border/default, radius-xl, the
|
|
5
|
+
* lg shadow), 320 wide, 16px in. It opens after the pointer rests 400 ms on the trigger (the
|
|
6
|
+
* middle of NN/g's 0.3–0.5 s, so passing over a link doesn't flash it), stays while the pointer
|
|
7
|
+
* moves into it, and closes 150 ms after it leaves both. Keyboard focus on the trigger opens it.
|
|
8
|
+
*
|
|
9
|
+
* Only for extra context the page works without: anything someone needs to act on belongs in a
|
|
10
|
+
* Popover they open on purpose.
|
|
11
|
+
*/
|
|
12
|
+
export interface HoverCardProps {
|
|
13
|
+
/** The link or name it previews. Rendered with `asChild`. */
|
|
14
|
+
trigger: React.ReactNode;
|
|
15
|
+
children: React.ReactNode;
|
|
16
|
+
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
17
|
+
align?: 'start' | 'center' | 'end';
|
|
18
|
+
/** ms the pointer rests before it opens. */
|
|
19
|
+
openDelay?: number;
|
|
20
|
+
/** ms after the pointer leaves before it closes. */
|
|
21
|
+
closeDelay?: number;
|
|
22
|
+
open?: boolean;
|
|
23
|
+
defaultOpen?: boolean;
|
|
24
|
+
onOpenChange?: (open: boolean) => void;
|
|
25
|
+
container?: HTMLElement | null;
|
|
26
|
+
className?: string;
|
|
27
|
+
}
|
|
28
|
+
export declare function HoverCard({ trigger, children, side, align, openDelay, closeDelay, open, defaultOpen, onOpenChange, container, className, }: HoverCardProps): React.JSX.Element;
|
|
29
|
+
/** The hover card's surface, for previews you place yourself. */
|
|
30
|
+
export declare const hoverCardClass: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"hover-card.js"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* InputOTP, 1:1 with the uiKit design (🆕 input otp & number): a one-time code as 36×36 cells,
|
|
4
|
+
* 8px apart, in groups (3 + 3 by default) split by an 8px border/strong dash. Each cell wears the
|
|
5
|
+
* field skin (bg/field, border/default, radius-lg, shadow xs); the cell the next digit goes into
|
|
6
|
+
* gets the focus border and ring and a blinking caret while the field has focus. A digit is
|
|
7
|
+
* text/base medium. With an error every cell turns action/destructive and the message replaces the
|
|
8
|
+
* hint under the cells; label, hint and error sit like Input's. With `success` (the code checked
|
|
9
|
+
* out) every cell's border turns status/green/fg and the message, in the same colour, leads with a
|
|
10
|
+
* 16px check.
|
|
11
|
+
*
|
|
12
|
+
* The message never moves the cells: it is as wide as the cells (it wraps rather than widening
|
|
13
|
+
* the field, which would shift a centred field sideways) and keeps a 20px line even while empty,
|
|
14
|
+
* so swapping hint → "Checking…" → success or error leaves the code where it is.
|
|
15
|
+
*
|
|
16
|
+
* The field is as wide as its cells, so it centres wherever it is placed. Focus shows only on
|
|
17
|
+
* the active cell: the real input carries no ring of its own.
|
|
18
|
+
*
|
|
19
|
+
* One real <input> lies over the cells (transparent text and caret), so typing, deleting, paste
|
|
20
|
+
* and the browser's SMS autofill (`autocomplete="one-time-code"`) all work as in any field, and
|
|
21
|
+
* screen readers hear one text box. Only digits by default (`pattern`); `onComplete` fires when
|
|
22
|
+
* every cell is filled.
|
|
23
|
+
*/
|
|
24
|
+
export interface InputOTPProps {
|
|
25
|
+
/** How many characters. */
|
|
26
|
+
length?: number;
|
|
27
|
+
/** Cells per group; groups are split by a dash. 0 for one group. */
|
|
28
|
+
groupSize?: number;
|
|
29
|
+
value?: string;
|
|
30
|
+
defaultValue?: string;
|
|
31
|
+
onValueChange?: (value: string) => void;
|
|
32
|
+
/** Every cell is filled. */
|
|
33
|
+
onComplete?: (value: string) => void;
|
|
34
|
+
/** Which characters are allowed. Digits by default. */
|
|
35
|
+
pattern?: RegExp;
|
|
36
|
+
label?: React.ReactNode;
|
|
37
|
+
hint?: React.ReactNode;
|
|
38
|
+
/** An error message (replaces the hint), or `true` to mark the cells invalid without one. */
|
|
39
|
+
error?: React.ReactNode | boolean;
|
|
40
|
+
/** The code checked out: a message under the cells (replaces the hint), or `true` for green cells alone. Ignored while there is an error. */
|
|
41
|
+
success?: React.ReactNode | boolean;
|
|
42
|
+
disabled?: boolean;
|
|
43
|
+
autoFocus?: boolean;
|
|
44
|
+
id?: string;
|
|
45
|
+
name?: string;
|
|
46
|
+
'aria-label'?: string;
|
|
47
|
+
className?: string;
|
|
48
|
+
}
|
|
49
|
+
export declare function InputOTP({ length, groupSize, value: valueProp, defaultValue, onValueChange, onComplete, pattern, label, hint, error, success, disabled, autoFocus, id, name, className, ...props }: InputOTPProps): React.JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
'use client';export { InputOTP } from '../chunk-XL75JRUA.js';
|
|
2
|
+
import '../chunk-72OCFAPT.js';
|
|
3
|
+
import '../chunk-UBNHSZSE.js';
|
|
4
|
+
import '../chunk-3DINAQLL.js';
|
|
5
|
+
import '../chunk-BKZBWPUH.js';
|
|
6
|
+
import '../chunk-H63FYCMY.js';
|
|
7
|
+
//# sourceMappingURL=input-otp.js.map
|
|
8
|
+
//# sourceMappingURL=input-otp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"input-otp.js"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Input, 1:1 with the uiKit `Input` set (820:51657): a label (medium), the field, and a hint
|
|
4
|
+
* (13/19.5, muted) 8px apart. The label is 13px at every size. Three sizes: sm 28 with a 13px
|
|
5
|
+
* value, md 32 and lg 36 with 14px (lg at radius-xl), fixed whatever the theme's body size; 12px side padding,
|
|
6
|
+
* optional 16px leading and trailing icons 8px from the text.
|
|
7
|
+
*
|
|
8
|
+
* Placeholder is text/muted; a value is text/default and turns the icons from muted to
|
|
9
|
+
* default (Figma's `filled`). `error` swaps the hint for the message in action/destructive/bg
|
|
10
|
+
* and sets `aria-invalid`. Hover, focus and the error ring are styles/components/input.css.
|
|
11
|
+
*
|
|
12
|
+
* Inside a FormField, leave out `label`, `hint` and `error`: the field supplies the id,
|
|
13
|
+
* description and invalid state.
|
|
14
|
+
*/
|
|
15
|
+
export interface InputProps extends Omit<React.ComponentProps<'input'>, 'size'> {
|
|
16
|
+
label?: React.ReactNode;
|
|
17
|
+
hint?: React.ReactNode;
|
|
18
|
+
/** An error message (replaces the hint), or `true` to mark the field invalid without one. */
|
|
19
|
+
error?: React.ReactNode | boolean;
|
|
20
|
+
size?: 'sm' | 'md' | 'lg';
|
|
21
|
+
leadingIcon?: React.ReactNode;
|
|
22
|
+
trailingIcon?: React.ReactNode;
|
|
23
|
+
/** Classes for the outer wrapper (label + field + hint). `className` styles the field. */
|
|
24
|
+
wrapperClassName?: string;
|
|
25
|
+
/** Show a state without interacting, for state sheets. */
|
|
26
|
+
'data-force'?: 'hover' | 'focus';
|
|
27
|
+
}
|
|
28
|
+
export declare function Input({ label, hint, error, size, leadingIcon, trailingIcon, className, wrapperClassName, id, disabled, required, value, defaultValue, onChange, 'aria-describedby': ariaDescribedBy, 'data-force': force, ...props }: InputProps): React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"input.js"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Kbd, 1:1 with the uiKit `Kbd` set (4021:3415): one keyboard key. sm is 18px high with 4px
|
|
4
|
+
* sides, md 20px with 6px; a single character or glyph makes it an exact square, radius-sm, a 0.75px border/default edge on
|
|
5
|
+
* component/kbd/bg (bg/card in Light, bg/muted in Dark), the 11px medium Keycap glyph in
|
|
6
|
+
* text/muted. Put keys of one shortcut 2px apart, or pass `keys` and let `KbdGroup` do it.
|
|
7
|
+
*
|
|
8
|
+
* `tone="inverse"` is for keys on an inverse surface (a tooltip): a darker key on the dark pill
|
|
9
|
+
* in Light, a lighter one on the light pill in Dark.
|
|
10
|
+
*/
|
|
11
|
+
export interface KbdProps extends React.ComponentProps<'kbd'> {
|
|
12
|
+
size?: 'sm' | 'md';
|
|
13
|
+
tone?: 'default' | 'inverse';
|
|
14
|
+
}
|
|
15
|
+
export declare function Kbd({ size, tone, className, children, ...props }: KbdProps): React.JSX.Element;
|
|
16
|
+
/**
|
|
17
|
+
* Splits a shortcut into keys: modifier glyphs one by one, the rest as one key ("Esc", "K").
|
|
18
|
+
* Spaces or "+" split it explicitly ("Ctrl + K").
|
|
19
|
+
*/
|
|
20
|
+
export declare function keysOf(shortcut: string): string[];
|
|
21
|
+
export interface KbdGroupProps extends Omit<React.ComponentProps<'span'>, 'children'> {
|
|
22
|
+
/** A shortcut such as "⌘K" or "⌃⇧V", split into keys, or the keys themselves. */
|
|
23
|
+
keys: string | React.ReactNode[];
|
|
24
|
+
size?: KbdProps['size'];
|
|
25
|
+
tone?: KbdProps['tone'];
|
|
26
|
+
}
|
|
27
|
+
/** The keys of one shortcut, 2px apart. */
|
|
28
|
+
export declare function KbdGroup({ keys, size, tone, className, ...props }: KbdGroupProps): React.JSX.Element;
|
|
29
|
+
export declare const KbdArrowUp: () => React.JSX.Element;
|
|
30
|
+
export declare const KbdArrowDown: () => React.JSX.Element;
|
|
31
|
+
export declare const KbdReturn: () => React.JSX.Element;
|
|
32
|
+
export interface KbdHintProps extends Omit<React.ComponentProps<'span'>, 'children'> {
|
|
33
|
+
keys: React.ReactNode[];
|
|
34
|
+
label: React.ReactNode;
|
|
35
|
+
}
|
|
36
|
+
/** A key hint for a menu footer: keys, then what they do in 12px text/muted, 6px apart. */
|
|
37
|
+
export declare function KbdHint({ keys, label, className, ...props }: KbdHintProps): React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"kbd.js"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type ChartCardBaseProps } from './chart';
|
|
3
|
+
/**
|
|
4
|
+
* Line and Area chart, 1:1 with the uiKit `chart/lineCard` (4076:6759) and `chart/areaCard`
|
|
5
|
+
* (4070:7627), in the shared ChartCard (chart.tsx).
|
|
6
|
+
*
|
|
7
|
+
* One metric over the period: a smooth 2px line in chart/3 (monotone, so it never overshoots a
|
|
8
|
+
* point) over a 180px plot with a 32px axis gutter and 4 dashed border-subtle gridlines at nice
|
|
9
|
+
* ticks, the x labels 6px under it (at most about seven, evenly picked). `AreaCard` fills under
|
|
10
|
+
* the line with chart/3 fading from 28% to nothing at the baseline. No legend: the title says
|
|
11
|
+
* what is plotted and the KPI above gives its total.
|
|
12
|
+
*
|
|
13
|
+
* Hover (or `highlight`) picks the nearest point: a dashed border-strong drop line from it to the
|
|
14
|
+
* baseline, an 8px dot ringed in chart/3 on bg/card, the tooltip above it (date and value) and
|
|
15
|
+
* its x label in text/default. Every point is also reachable with the keyboard (arrow keys on the
|
|
16
|
+
* focused plot). When the data changes the plot fades in on its new scale, unless motion is
|
|
17
|
+
* reduced.
|
|
18
|
+
*/
|
|
19
|
+
export interface LineCardProps extends ChartCardBaseProps {
|
|
20
|
+
/** Unit after the value in the tooltip ("orders"). */
|
|
21
|
+
unit?: string;
|
|
22
|
+
/** Fill under the line. `AreaCard` sets it. */
|
|
23
|
+
area?: boolean;
|
|
24
|
+
/** Swap the plot without the fade when the data changes, as under prefers-reduced-motion. */
|
|
25
|
+
reducedMotion?: boolean;
|
|
26
|
+
}
|
|
27
|
+
export declare function LineCard({ data, formatValue, highlight, unit, area, reducedMotion, total, ...props }: LineCardProps): React.JSX.Element;
|
|
28
|
+
/** The Line chart with the gradient under its line. */
|
|
29
|
+
export declare function AreaCard(props: Omit<LineCardProps, 'area'>): React.JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use client';export { AreaCard, LineCard } from '../chunk-SHDFUXYV.js';
|
|
2
|
+
import '../chunk-DO3TBNSC.js';
|
|
3
|
+
import '../chunk-YPJYW624.js';
|
|
4
|
+
import '../chunk-Y5AYU7PK.js';
|
|
5
|
+
import '../chunk-72OCFAPT.js';
|
|
6
|
+
import '../chunk-UBNHSZSE.js';
|
|
7
|
+
import '../chunk-3DINAQLL.js';
|
|
8
|
+
import '../chunk-BKZBWPUH.js';
|
|
9
|
+
import '../chunk-O7F3CIDV.js';
|
|
10
|
+
import '../chunk-H63FYCMY.js';
|
|
11
|
+
//# sourceMappingURL=line-chart.js.map
|
|
12
|
+
//# sourceMappingURL=line-chart.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"line-chart.js"}
|