@uisatin/ui 0.3.0 → 0.4.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/CHANGELOG.md +13 -0
- package/{chunk-UZ4DXU6W.js → chunk-3VVO5MY5.js} +4 -4
- package/{chunk-EF5GT4OG.js → chunk-47DDBME3.js} +3 -3
- package/{chunk-JBKBRAC4.js → chunk-5663JVE5.js} +3 -3
- package/chunk-67CBFB6Y.js +99 -0
- package/{chunk-T6L32XXH.js → chunk-6DWLTGRQ.js} +30 -7
- package/{chunk-S7QHBVPX.js → chunk-6GNMUJQ4.js} +3 -3
- package/{chunk-Z7S2KQZS.js → chunk-6JTSZAGO.js} +1 -1
- package/chunk-6RLSRMB5.js +14 -0
- package/{chunk-GI2SMFZL.js → chunk-6Y6CY2DP.js} +1 -1
- package/{chunk-XUOSJMEJ.js → chunk-7NV53EL5.js} +1 -1
- package/{chunk-LFGUJHFF.js → chunk-7SVMERPH.js} +2 -2
- package/chunk-A52HUWVM.js +24 -0
- package/chunk-AKEZCWNW.js +29 -0
- package/{chunk-NH3EHMIL.js → chunk-APRVUOD6.js} +1 -1
- package/{chunk-DPYIBFQD.js → chunk-C435UD7V.js} +4 -3
- package/{chunk-5XTUFBZI.js → chunk-C6WRJ7DG.js} +1 -1
- package/{chunk-X66KTATQ.js → chunk-CQFAMWZI.js} +2 -2
- package/{chunk-YJK4MGSI.js → chunk-DAKVTPYZ.js} +4 -4
- package/{chunk-W472DBMT.js → chunk-DMZW4LGU.js} +3 -3
- package/chunk-EBZHGRM5.js +46 -0
- package/{chunk-O46O6LFQ.js → chunk-EHEXE2UV.js} +20 -1
- package/{chunk-UCCNXGLG.js → chunk-EQAFDIPE.js} +9 -7
- package/{chunk-LB37KTJH.js → chunk-EXKSKYG3.js} +2 -2
- package/chunk-FB6DG3LR.js +35 -0
- package/chunk-GH2DEOGO.js +67 -0
- package/{chunk-J7RMFN54.js → chunk-GKDMCY2S.js} +1 -1
- package/chunk-GTFUAA6H.js +42 -0
- package/{chunk-SAYNV7B3.js → chunk-HI6QIG55.js} +4 -4
- package/{chunk-SDOTDMYG.js → chunk-HZV7EXGU.js} +2 -2
- package/{chunk-RHQHDYTE.js → chunk-IKJIR6VL.js} +2 -2
- package/{chunk-ISYKZCPJ.js → chunk-INJWE2LD.js} +2 -2
- package/chunk-J5UQPROI.js +56 -0
- package/{chunk-5725MFGQ.js → chunk-JCR5TWTF.js} +4 -4
- package/chunk-JKOBDLP3.js +25 -0
- package/{chunk-FAJ3OVL4.js → chunk-JR3VVDV6.js} +1 -1
- package/{chunk-CVNRZ2YV.js → chunk-JYGCZWET.js} +1 -1
- package/{chunk-SPGUZMCC.js → chunk-K5G5OEV5.js} +2 -2
- package/{chunk-GMETYACH.js → chunk-KDU7AT2T.js} +2 -2
- package/chunk-KITXKIYW.js +104 -0
- package/{chunk-JYOZUQNU.js → chunk-KQNA22D3.js} +2 -2
- package/{chunk-OURZQM27.js → chunk-L5PPN42A.js} +11 -4
- package/{chunk-HK6WINL6.js → chunk-LAOE6Y57.js} +3 -3
- package/{chunk-ZBZ3ZQRB.js → chunk-LI5VYDLN.js} +4 -4
- package/{chunk-M2HEVFQ3.js → chunk-LKSFTNPF.js} +1 -1
- package/chunk-LLW3X4ZJ.js +39 -0
- package/{chunk-5KTBSMQU.js → chunk-LWRB4DED.js} +1 -1
- package/{chunk-LB7Z6BSK.js → chunk-M7RILZVW.js} +6 -6
- package/{chunk-674SRBZK.js → chunk-MOGWOUCN.js} +3 -3
- package/chunk-NCIRJ5V2.js +108 -0
- package/{chunk-SSOFFQ5T.js → chunk-NTSU44FY.js} +8 -1
- package/{chunk-BR2B4OIT.js → chunk-P36KBUYD.js} +3 -3
- package/{chunk-3DHJXU45.js → chunk-P6RHT2VM.js} +1 -1
- package/{chunk-WLQD5BN2.js → chunk-PD2KD5OR.js} +1 -1
- package/{chunk-OVKPPXK5.js → chunk-PP46SY7M.js} +2 -2
- package/{chunk-FB5HTCO2.js → chunk-PTK4QAOQ.js} +4 -4
- package/{chunk-IKO3GQFE.js → chunk-Q7KVC5B4.js} +3 -3
- package/{chunk-UUCVRIVP.js → chunk-R3DTMBDT.js} +3 -3
- package/{chunk-UGIVCXGN.js → chunk-R4KPFBMK.js} +1 -1
- package/{chunk-XH56JGYC.js → chunk-R5TQ3HNB.js} +1 -1
- package/chunk-RFSPJECL.js +84 -0
- package/chunk-RPL6FRVX.js +88 -0
- package/{chunk-SZJIVBOD.js → chunk-STYOBAC7.js} +3 -3
- package/{chunk-W4RDTP6W.js → chunk-SVUWR3HD.js} +3 -3
- package/{chunk-7Q76HLRQ.js → chunk-T7P3OEBP.js} +4 -4
- package/{chunk-TT2N5752.js → chunk-TB3ZRV3Y.js} +2 -2
- package/{chunk-BN7FDKCJ.js → chunk-TOY6YPTG.js} +2 -2
- package/{chunk-PHNR6ZQ7.js → chunk-U6X6ODDJ.js} +2 -2
- package/{chunk-6VKV36OK.js → chunk-UAJ6M34K.js} +4 -4
- package/{chunk-PD6YPFYN.js → chunk-W2EH6RY5.js} +1 -1
- package/{chunk-X2GNMNZQ.js → chunk-W2QQQWNE.js} +2 -2
- package/{chunk-JCXI7VQL.js → chunk-WALANB3V.js} +2 -2
- package/{chunk-NL574STL.js → chunk-WCUR44O6.js} +2 -2
- package/{chunk-PUWSL5XW.js → chunk-WJYJMX5S.js} +1 -1
- package/{chunk-AIMQNLPY.js → chunk-WZSLDYUU.js} +6 -29
- package/chunk-XU6JJDMZ.js +117 -0
- package/{chunk-57QEOCDZ.js → chunk-XWPH7C2W.js} +1 -1
- package/{chunk-73Z7NMQQ.js → chunk-YXWXSRXG.js} +5 -5
- package/{chunk-CGOH5IYX.js → chunk-YY236ZSJ.js} +3 -3
- package/components/accordion.js +2 -2
- package/components/action-button.d.ts +37 -0
- package/components/action-button.js +5 -0
- package/components/agent-loading.js +2 -2
- package/components/agent-picker.js +5 -4
- package/components/agent-suggestion.js +5 -5
- package/components/alert.d.ts +37 -0
- package/components/alert.js +5 -0
- package/components/announcement-bar.js +6 -5
- package/components/attachment.js +5 -4
- package/components/avatar.js +4 -4
- package/components/badge.js +2 -2
- package/components/banner.js +5 -3
- package/components/bar-chart.js +9 -9
- package/components/breadcrumb.js +5 -5
- package/components/button-group.d.ts +26 -0
- package/components/button-group.js +5 -0
- package/components/button.d.ts +13 -1
- package/components/button.js +4 -2
- package/components/card.js +5 -3
- package/components/channel-chart.js +9 -9
- package/components/chart.js +8 -8
- package/components/checkbox.js +2 -2
- package/components/chip.js +2 -2
- package/components/citations.js +4 -4
- package/components/code-block.js +5 -3
- package/components/combobox.js +10 -9
- package/components/command-menu.js +5 -5
- package/components/context-menu.js +5 -5
- package/components/cookie-consent.js +5 -3
- package/components/date-picker.js +9 -8
- package/components/decision-card.js +6 -5
- package/components/dialog.d.ts +2 -7
- package/components/dialog.js +6 -4
- package/components/donut-chart.js +9 -9
- package/components/dot.js +2 -2
- package/components/dropdown.js +4 -4
- package/components/empty-state.js +2 -2
- package/components/field-group.d.ts +27 -0
- package/components/field-group.js +3 -0
- package/components/file-upload.js +7 -6
- package/components/form-field.d.ts +38 -1
- package/components/form-field.js +2 -2
- package/components/form.d.ts +47 -0
- package/components/form.js +3 -0
- package/components/hover-card.js +2 -2
- package/components/input-group.d.ts +21 -0
- package/components/input-group.js +6 -0
- package/components/input-otp.js +7 -7
- package/components/input.d.ts +5 -1
- package/components/input.js +3 -3
- package/components/kbd.js +2 -2
- package/components/labels.d.ts +7 -0
- package/components/labels.js +1 -1
- package/components/line-chart.js +10 -10
- package/components/link.d.ts +20 -0
- package/components/link.js +3 -0
- package/components/list.d.ts +46 -0
- package/components/list.js +2 -0
- package/components/message-actions.js +5 -4
- package/components/message.js +8 -7
- package/components/number-input.js +7 -7
- package/components/pagination.js +5 -3
- package/components/password-input.d.ts +16 -0
- package/components/password-input.js +7 -0
- package/components/popover.js +3 -3
- package/components/progress.js +2 -2
- package/components/prompt-bar.js +6 -5
- package/components/radio.js +2 -2
- package/components/search-bar.js +3 -3
- package/components/segmented-control.js +2 -2
- package/components/select.d.ts +2 -1
- package/components/select.js +6 -6
- package/components/selectable-card.d.ts +37 -0
- package/components/selectable-card.js +2 -0
- package/components/selectable-checkbox.d.ts +14 -0
- package/components/selectable-checkbox.js +4 -0
- package/components/selectable-radio.d.ts +16 -0
- package/components/selectable-radio.js +3 -0
- package/components/separator.d.ts +18 -0
- package/components/separator.js +2 -0
- package/components/sheet.js +7 -5
- package/components/sidebar.js +2 -2
- package/components/skeleton.js +2 -2
- package/components/slider.js +7 -7
- package/components/spinner.d.ts +18 -0
- package/components/spinner.js +3 -0
- package/components/split-button.d.ts +24 -0
- package/components/split-button.js +8 -0
- package/components/streaming-text.js +2 -2
- package/components/switch.js +2 -2
- package/components/table.js +4 -4
- package/components/tabs.js +2 -2
- package/components/textarea.js +3 -3
- package/components/thinking.js +3 -3
- package/components/toast.js +5 -4
- package/components/toggle.js +2 -2
- package/components/tooltip.js +3 -3
- package/index.d.ts +16 -2
- package/index.js +79 -64
- package/lib/utils.js +1 -1
- package/package.json +1 -1
- package/styles.css +1 -1
- package/chunk-VUOAPWTF.js +0 -86
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type FormContextValue } from './form-field.js';
|
|
3
|
+
/**
|
|
4
|
+
* Form: a `<form>` that lays out FormFields, FieldGroups and FormSections and sets them once.
|
|
5
|
+
*
|
|
6
|
+
* - `layout` places every field's label above its control (vertical) or in a 160px column to the
|
|
7
|
+
* left (horizontal, for settings pages); a field's own `layout` still wins.
|
|
8
|
+
* - `errors` holds messages by field `name` (`{ email: 'Enter an email' }`); each FormField or
|
|
9
|
+
* FieldGroup with that `name` shows its message and marks its control invalid. Feed it from
|
|
10
|
+
* your own validation, a server response, or a form library (`errors.email?.message`).
|
|
11
|
+
* - After a submit, and whenever errors appear where there were none, focus moves to the first
|
|
12
|
+
* invalid control, so a screen reader and the keyboard land on what needs fixing.
|
|
13
|
+
* - `disabled` greys out and disables every field and button inside (a native fieldset), for a
|
|
14
|
+
* form that is saving or read-only.
|
|
15
|
+
* - `onSubmitValues` hands over the values as an object (repeated names become arrays) and
|
|
16
|
+
* prevents the page reload; plain `onSubmit` works as usual.
|
|
17
|
+
*/
|
|
18
|
+
export type FormValues = Record<string, FormDataEntryValue | FormDataEntryValue[]>;
|
|
19
|
+
export interface FormProps extends React.ComponentProps<'form'> {
|
|
20
|
+
layout?: 'vertical' | 'horizontal';
|
|
21
|
+
/** Error messages by field `name`. */
|
|
22
|
+
errors?: FormContextValue['errors'];
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
/** Called on submit with the form's values; the default submit (a page load) is prevented. */
|
|
25
|
+
onSubmitValues?: (values: FormValues, event: React.FormEvent<HTMLFormElement>) => void;
|
|
26
|
+
}
|
|
27
|
+
/** The form's values as an object; a name that appears more than once (checkboxes) becomes an array. */
|
|
28
|
+
export declare function formValues(form: HTMLFormElement): FormValues;
|
|
29
|
+
export declare function Form({ layout, errors, disabled, onSubmit, onSubmitValues, noValidate, className, children, ref, ...props }: FormProps): React.JSX.Element;
|
|
30
|
+
/**
|
|
31
|
+
* A titled part of a longer form (Profile, Notifications): a 16px title, an optional
|
|
32
|
+
* description, then its fields. Sections after the first are set off by a rule.
|
|
33
|
+
*/
|
|
34
|
+
export interface FormSectionProps extends Omit<React.ComponentProps<'section'>, 'title'> {
|
|
35
|
+
title: React.ReactNode;
|
|
36
|
+
description?: React.ReactNode;
|
|
37
|
+
}
|
|
38
|
+
export declare function FormSection({ title, description, className, children, ...props }: FormSectionProps): React.JSX.Element;
|
|
39
|
+
/**
|
|
40
|
+
* The form's buttons, usually a ButtonGroup or a Cancel + Submit pair. `align="end"` (default)
|
|
41
|
+
* puts them on the right; `start` lines them up with the controls, past the label column in a
|
|
42
|
+
* horizontal form; `between` pushes the first child left (Delete) and the rest right.
|
|
43
|
+
*/
|
|
44
|
+
export interface FormActionsProps extends React.ComponentProps<'div'> {
|
|
45
|
+
align?: 'start' | 'end' | 'between';
|
|
46
|
+
}
|
|
47
|
+
export declare function FormActions({ align, className, ...props }: FormActionsProps): React.JSX.Element;
|
package/components/hover-card.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use client';export { HoverCard, hoverCardClass } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
'use client';export { HoverCard, hoverCardClass } from '../chunk-W2EH6RY5.js';
|
|
2
|
+
import '../chunk-EHEXE2UV.js';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* InputGroup: a field joined with what belongs to it, in one block: an addon before or after
|
|
4
|
+
* (`https://`, `.satin.dev`, a currency), a Select (country code, unit), or a Button (Copy,
|
|
5
|
+
* Send, Subscribe). The inner corners go square and neighbours share one 1px border; the
|
|
6
|
+
* focused field comes to the front so its ring is whole.
|
|
7
|
+
*
|
|
8
|
+
* `size` sizes every part to the same height: Inputs and Selects take it, Buttons take the
|
|
9
|
+
* matching button size (sm 28 → md, md 32 → lg, lg 36 → xl) and secondary by default. In a
|
|
10
|
+
* group a button draws its outline as a border, like the field, so both read the same height.
|
|
11
|
+
*
|
|
12
|
+
* Text that sits inside the field belongs on the Input itself (`leadingText`, `trailingText`,
|
|
13
|
+
* icons); an addon is for a separate, boxed segment. Wrap the group in a FormField for the
|
|
14
|
+
* label, description and error: the field inside picks them up.
|
|
15
|
+
*/
|
|
16
|
+
export interface InputGroupProps extends React.ComponentProps<'div'> {
|
|
17
|
+
size?: 'sm' | 'md' | 'lg';
|
|
18
|
+
}
|
|
19
|
+
export declare function InputGroup({ size, className, ...props }: InputGroupProps): React.JSX.Element;
|
|
20
|
+
/** A boxed segment of an InputGroup: text (`https://`, `€`), an icon, or a Kbd. */
|
|
21
|
+
export declare function InputGroupAddon({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
package/components/input-otp.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
'use client';export { InputOTP } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
6
|
-
import '../chunk-
|
|
7
|
-
import '../chunk-
|
|
1
|
+
'use client';export { InputOTP } from '../chunk-PP46SY7M.js';
|
|
2
|
+
import '../chunk-EQAFDIPE.js';
|
|
3
|
+
import '../chunk-KITXKIYW.js';
|
|
4
|
+
import '../chunk-P36KBUYD.js';
|
|
5
|
+
import '../chunk-XWPH7C2W.js';
|
|
6
|
+
import '../chunk-NTSU44FY.js';
|
|
7
|
+
import '../chunk-EHEXE2UV.js';
|
package/components/input.d.ts
CHANGED
|
@@ -20,9 +20,13 @@ export interface InputProps extends Omit<React.ComponentProps<'input'>, 'size'>
|
|
|
20
20
|
size?: 'sm' | 'md' | 'lg';
|
|
21
21
|
leadingIcon?: React.ReactNode;
|
|
22
22
|
trailingIcon?: React.ReactNode;
|
|
23
|
+
/** Muted text inside the field before the value: `$`, `https://`. */
|
|
24
|
+
leadingText?: React.ReactNode;
|
|
25
|
+
/** Muted text inside the field after the value: `USD`, `.satin.dev`, a counter. */
|
|
26
|
+
trailingText?: React.ReactNode;
|
|
23
27
|
/** Classes for the outer wrapper (label + field + hint). `className` styles the field. */
|
|
24
28
|
wrapperClassName?: string;
|
|
25
29
|
/** Show a state without interacting, for state sheets. */
|
|
26
30
|
'data-force'?: 'hover' | 'focus';
|
|
27
31
|
}
|
|
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;
|
|
32
|
+
export declare function Input({ label, hint, error, size: ownSize, leadingIcon, trailingIcon, leadingText, trailingText, className, wrapperClassName, id, disabled, required, value, defaultValue, onChange, 'aria-describedby': ariaDescribedBy, 'data-force': force, ...props }: InputProps): React.JSX.Element;
|
package/components/input.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
'use client';export { Input } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
1
|
+
'use client';export { Input } from '../chunk-L5PPN42A.js';
|
|
2
|
+
import '../chunk-KITXKIYW.js';
|
|
3
|
+
import '../chunk-EHEXE2UV.js';
|
package/components/kbd.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use client';export { Kbd, KbdArrowDown, KbdArrowUp, KbdGroup, KbdHint, KbdReturn, keysOf } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
'use client';export { Kbd, KbdArrowDown, KbdArrowUp, KbdGroup, KbdHint, KbdReturn, keysOf } from '../chunk-XWPH7C2W.js';
|
|
2
|
+
import '../chunk-EHEXE2UV.js';
|
package/components/labels.d.ts
CHANGED
|
@@ -67,6 +67,13 @@ export declare const defaultLabels: {
|
|
|
67
67
|
navigate: string;
|
|
68
68
|
openItem: string;
|
|
69
69
|
source: string;
|
|
70
|
+
moreOptions: string;
|
|
71
|
+
loading: string;
|
|
72
|
+
submit: string;
|
|
73
|
+
done: string;
|
|
74
|
+
opensInNewTab: string;
|
|
75
|
+
showPassword: string;
|
|
76
|
+
hidePassword: string;
|
|
70
77
|
};
|
|
71
78
|
export type SatinLabelSet = typeof defaultLabels;
|
|
72
79
|
export interface SatinLabelsProps {
|
package/components/labels.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use client';export { SatinLabels, defaultLabels, useSatinLabels } from '../chunk-
|
|
1
|
+
'use client';export { SatinLabels, defaultLabels, useSatinLabels } from '../chunk-NTSU44FY.js';
|
package/components/line-chart.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
'use client';export { AreaCard, LineCard } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
1
|
+
'use client';export { AreaCard, LineCard } from '../chunk-5663JVE5.js';
|
|
2
|
+
import '../chunk-INJWE2LD.js';
|
|
3
|
+
import '../chunk-LI5VYDLN.js';
|
|
4
4
|
import '../chunk-ZHFIWDGF.js';
|
|
5
|
-
import '../chunk-
|
|
6
|
-
import '../chunk-
|
|
7
|
-
import '../chunk-
|
|
8
|
-
import '../chunk-
|
|
9
|
-
import '../chunk-
|
|
10
|
-
import '../chunk-
|
|
11
|
-
import '../chunk-
|
|
5
|
+
import '../chunk-EQAFDIPE.js';
|
|
6
|
+
import '../chunk-KITXKIYW.js';
|
|
7
|
+
import '../chunk-P36KBUYD.js';
|
|
8
|
+
import '../chunk-XWPH7C2W.js';
|
|
9
|
+
import '../chunk-7NV53EL5.js';
|
|
10
|
+
import '../chunk-NTSU44FY.js';
|
|
11
|
+
import '../chunk-EHEXE2UV.js';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Link: text that goes somewhere. Calm by default: the text colour with a border/strong
|
|
4
|
+
* underline that takes the text colour on hover, so a paragraph full of links stays readable.
|
|
5
|
+
* `brand` colours it for the one link that should stand out; `muted` is for footers and meta
|
|
6
|
+
* lines and only underlines on hover. Focus draws the 2px focus ring around it.
|
|
7
|
+
*
|
|
8
|
+
* `external` (on by itself with `target="_blank"`) adds a 12px ↗ after the text, says
|
|
9
|
+
* "(opens in a new tab)" to screen readers and sets `rel="noopener noreferrer"`.
|
|
10
|
+
*
|
|
11
|
+
* For a router's link (Next.js, React Router) pass `asChild` and put it inside: it gets the
|
|
12
|
+
* styles, the router keeps the navigation.
|
|
13
|
+
*/
|
|
14
|
+
export interface LinkProps extends React.ComponentProps<'a'> {
|
|
15
|
+
variant?: 'default' | 'brand' | 'muted';
|
|
16
|
+
underline?: 'always' | 'hover' | 'none';
|
|
17
|
+
external?: boolean;
|
|
18
|
+
asChild?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export declare function Link({ variant, underline, external, asChild, target, rel, className, children, ...props }: LinkProps): React.JSX.Element;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Item: one row of a list. The thing almost every screen repeats: a person, a file, a project,
|
|
4
|
+
* a setting, a search result, a notification. Left to right:
|
|
5
|
+
*
|
|
6
|
+
* - `icon` in a 32px muted tile (28 at sm), or `media` as it is (an Avatar, a thumbnail);
|
|
7
|
+
* - `title` (13px medium) over `description` (13px muted), each on one line, cut with an ellipsis;
|
|
8
|
+
* `children` go under them for anything longer (Chips, a Progress);
|
|
9
|
+
* - `meta` on the right in muted 13px: a time, a size, a Badge, a Kbd;
|
|
10
|
+
* - `actions` at the far right: Buttons, a Switch, a DropdownMenu `⋯`.
|
|
11
|
+
*
|
|
12
|
+
* With `href` (or `onClick`) the row is a link (or a button) and the whole row is its target,
|
|
13
|
+
* with a hover and a focus ring; `actions` stay their own controls on top of it. `selected`
|
|
14
|
+
* marks the current row. Rows go in a `List`, or stand alone with `variant="outline"`.
|
|
15
|
+
*/
|
|
16
|
+
export interface ItemProps extends Omit<React.ComponentProps<'div'>, 'title' | 'onClick'> {
|
|
17
|
+
title: React.ReactNode;
|
|
18
|
+
description?: React.ReactNode;
|
|
19
|
+
/** A glyph shown in a muted tile. */
|
|
20
|
+
icon?: React.ReactNode;
|
|
21
|
+
/** Shown as is, in place of the tile: an Avatar, an image. */
|
|
22
|
+
media?: React.ReactNode;
|
|
23
|
+
meta?: React.ReactNode;
|
|
24
|
+
actions?: React.ReactNode;
|
|
25
|
+
href?: string;
|
|
26
|
+
/** Link target, e.g. `_blank`. */
|
|
27
|
+
target?: string;
|
|
28
|
+
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
29
|
+
selected?: boolean;
|
|
30
|
+
disabled?: boolean;
|
|
31
|
+
size?: 'sm' | 'md';
|
|
32
|
+
/** `outline` draws a card border, for a row on its own. Rows in a List take the List's look. */
|
|
33
|
+
variant?: 'plain' | 'outline';
|
|
34
|
+
}
|
|
35
|
+
export declare function Item({ title, description, icon, media, meta, actions, href, target, onClick, selected, disabled, size: ownSize, variant, className, children, ...props }: ItemProps): React.JSX.Element;
|
|
36
|
+
/**
|
|
37
|
+
* List: Items under each other. `plain` (default) keeps them apart by 2px with rounded hovers,
|
|
38
|
+
* for menus of links and search results; `divided` runs a rule between rows, edge to edge, for
|
|
39
|
+
* feeds and settings; `card` puts the divided rows in a bordered card. `size` is passed to every
|
|
40
|
+
* Item. It's a `ul`; give it an `aria-label` when the heading above doesn't name it.
|
|
41
|
+
*/
|
|
42
|
+
export interface ListProps extends React.ComponentProps<'ul'> {
|
|
43
|
+
variant?: 'plain' | 'divided' | 'card';
|
|
44
|
+
size?: 'sm' | 'md';
|
|
45
|
+
}
|
|
46
|
+
export declare function List({ variant, size, className, ...props }: ListProps): React.JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
'use client';export { MessageActions } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
1
|
+
'use client';export { MessageActions } from '../chunk-STYOBAC7.js';
|
|
2
|
+
import '../chunk-6DWLTGRQ.js';
|
|
3
|
+
import '../chunk-AKEZCWNW.js';
|
|
4
|
+
import '../chunk-NTSU44FY.js';
|
|
5
|
+
import '../chunk-EHEXE2UV.js';
|
package/components/message.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
'use client';export { Message } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
6
|
-
import '../chunk-
|
|
7
|
-
import '../chunk-
|
|
1
|
+
'use client';export { Message } from '../chunk-6GNMUJQ4.js';
|
|
2
|
+
import '../chunk-WCUR44O6.js';
|
|
3
|
+
import '../chunk-STYOBAC7.js';
|
|
4
|
+
import '../chunk-R4KPFBMK.js';
|
|
5
|
+
import '../chunk-6DWLTGRQ.js';
|
|
6
|
+
import '../chunk-AKEZCWNW.js';
|
|
7
|
+
import '../chunk-NTSU44FY.js';
|
|
8
|
+
import '../chunk-EHEXE2UV.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
'use client';export { NumberInput } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
6
|
-
import '../chunk-
|
|
7
|
-
import '../chunk-
|
|
1
|
+
'use client';export { NumberInput } from '../chunk-MOGWOUCN.js';
|
|
2
|
+
import '../chunk-EQAFDIPE.js';
|
|
3
|
+
import '../chunk-KITXKIYW.js';
|
|
4
|
+
import '../chunk-P36KBUYD.js';
|
|
5
|
+
import '../chunk-XWPH7C2W.js';
|
|
6
|
+
import '../chunk-NTSU44FY.js';
|
|
7
|
+
import '../chunk-EHEXE2UV.js';
|
package/components/pagination.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
'use client';export { Pagination, paginationRange } from '../chunk-
|
|
1
|
+
'use client';export { Pagination, paginationRange } from '../chunk-TB3ZRV3Y.js';
|
|
2
2
|
import '../chunk-XETMIETJ.js';
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
3
|
+
import '../chunk-6DWLTGRQ.js';
|
|
4
|
+
import '../chunk-AKEZCWNW.js';
|
|
5
|
+
import '../chunk-NTSU44FY.js';
|
|
6
|
+
import '../chunk-EHEXE2UV.js';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type InputProps } from './input.js';
|
|
3
|
+
/**
|
|
4
|
+
* PasswordInput: an Input of type password with a show / hide button in the trailing slot.
|
|
5
|
+
* The button is an xs tertiary icon button named "Show password" / "Hide password" (from
|
|
6
|
+
* SatinLabels) with `aria-pressed`, and showing the password never moves the caret or the
|
|
7
|
+
* focus. `autoComplete` defaults to `current-password`; pass `new-password` on sign-up.
|
|
8
|
+
*
|
|
9
|
+
* Everything else is Input: sizes, `leadingIcon`, `hint`, `error`, and FormField wiring.
|
|
10
|
+
*/
|
|
11
|
+
export interface PasswordInputProps extends Omit<InputProps, 'type' | 'trailingIcon' | 'trailingText'> {
|
|
12
|
+
/** Show the password; leave out to let the button control it. */
|
|
13
|
+
visible?: boolean;
|
|
14
|
+
onVisibleChange?: (visible: boolean) => void;
|
|
15
|
+
}
|
|
16
|
+
export declare function PasswordInput({ visible, onVisibleChange, autoComplete, disabled, ...props }: PasswordInputProps): React.JSX.Element;
|
package/components/popover.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
'use client';export { Popover, PopoverClose, PopoverPanel } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
1
|
+
'use client';export { Popover, PopoverClose, PopoverPanel } from '../chunk-7SVMERPH.js';
|
|
2
|
+
import '../chunk-NTSU44FY.js';
|
|
3
|
+
import '../chunk-EHEXE2UV.js';
|
package/components/progress.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use client';export { Progress } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
'use client';export { Progress } from '../chunk-LKSFTNPF.js';
|
|
2
|
+
import '../chunk-EHEXE2UV.js';
|
package/components/prompt-bar.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
'use client';export { PromptBar, defaultActions } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
1
|
+
'use client';export { PromptBar, defaultActions } from '../chunk-JCR5TWTF.js';
|
|
2
|
+
import '../chunk-XWPH7C2W.js';
|
|
3
|
+
import '../chunk-6DWLTGRQ.js';
|
|
4
|
+
import '../chunk-AKEZCWNW.js';
|
|
5
|
+
import '../chunk-NTSU44FY.js';
|
|
6
|
+
import '../chunk-EHEXE2UV.js';
|
package/components/radio.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use client';export { Radio, RadioGroup } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
'use client';export { Radio, RadioGroup } from '../chunk-EXKSKYG3.js';
|
|
2
|
+
import '../chunk-EHEXE2UV.js';
|
package/components/search-bar.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
'use client';export { SearchBar } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
1
|
+
'use client';export { SearchBar } from '../chunk-K5G5OEV5.js';
|
|
2
|
+
import '../chunk-XWPH7C2W.js';
|
|
3
|
+
import '../chunk-EHEXE2UV.js';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
'use client';export { SegmentedControl } from '../chunk-
|
|
1
|
+
'use client';export { SegmentedControl } from '../chunk-JYGCZWET.js';
|
|
2
2
|
import '../chunk-XETMIETJ.js';
|
|
3
|
-
import '../chunk-
|
|
3
|
+
import '../chunk-EHEXE2UV.js';
|
package/components/select.d.ts
CHANGED
|
@@ -82,6 +82,7 @@ export declare function useFieldChrome({ id, disabled, error, hint, }: {
|
|
|
82
82
|
disabled: boolean;
|
|
83
83
|
invalid: boolean;
|
|
84
84
|
required: boolean | undefined;
|
|
85
|
+
name: string | undefined;
|
|
85
86
|
describedBy: string | undefined;
|
|
86
87
|
message: React.ReactNode;
|
|
87
88
|
messageId: string | undefined;
|
|
@@ -102,4 +103,4 @@ export declare function FieldChrome({ label, action, chrome, className, children
|
|
|
102
103
|
export declare function SelectChevron({ className }: {
|
|
103
104
|
className?: string;
|
|
104
105
|
}): React.JSX.Element;
|
|
105
|
-
export declare function Select({ options, value, defaultValue, onValueChange, placeholder, label, hint, error, size, leadingIcon, layout, iconSize, disabled, required, name, id, open, defaultOpen, onOpenChange, container, wrapperClassName, className, 'data-force': force, 'aria-describedby': describedBy, ...props }: SelectProps): React.JSX.Element;
|
|
106
|
+
export declare function Select({ options, value, defaultValue, onValueChange, placeholder, label, hint, error, size: ownSize, leadingIcon, layout, iconSize, disabled, required, name, id, open, defaultOpen, onOpenChange, container, wrapperClassName, className, 'data-force': force, 'aria-describedby': describedBy, ...props }: SelectProps): React.JSX.Element;
|
package/components/select.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
'use client';export { FieldChrome, Select, SelectChevron, isOptionGroups, useFieldChrome } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
6
|
-
import '../chunk-
|
|
1
|
+
'use client';export { FieldChrome, Select, SelectChevron, isOptionGroups, useFieldChrome } from '../chunk-EQAFDIPE.js';
|
|
2
|
+
import '../chunk-KITXKIYW.js';
|
|
3
|
+
import '../chunk-P36KBUYD.js';
|
|
4
|
+
import '../chunk-XWPH7C2W.js';
|
|
5
|
+
import '../chunk-NTSU44FY.js';
|
|
6
|
+
import '../chunk-EHEXE2UV.js';
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* SelectableCard: what SelectableRadio and SelectableCheckbox share. A card with an optional
|
|
4
|
+
* icon and a title over a description; the card's border shows the state
|
|
5
|
+
* (styles/components.css): border/default, border/strong on hover, an action/primary border
|
|
6
|
+
* with a 1px ring of the same when selected, the focus ring around the whole card.
|
|
7
|
+
*
|
|
8
|
+
* `icon` is a 16px glyph in a square muted tile as tall as the title and description; it takes
|
|
9
|
+
* the text colour once the card is selected. `children` go under the description (a price,
|
|
10
|
+
* Badges). Two sizes, the padding even on every side, every size on the scale:
|
|
11
|
+
*
|
|
12
|
+
* - `md` (default): 12px padding, radius-xl, 12px gap. Title 14/18 medium as in Banner, 2px,
|
|
13
|
+
* description in the theme's body size on a 20px line, muted: 40px of text, a 40px tile.
|
|
14
|
+
* - `sm`: 8px padding, radius-lg, 10px gap. Title 13/18 medium over a 13/18 description:
|
|
15
|
+
* 36px of text, a 36px tile.
|
|
16
|
+
* - A title alone is one 20px line next to a 20px tile.
|
|
17
|
+
*/
|
|
18
|
+
export interface SelectableCardBaseProps {
|
|
19
|
+
title: React.ReactNode;
|
|
20
|
+
description?: React.ReactNode;
|
|
21
|
+
/** A 16px glyph, shown in a tile as tall as the title and description. */
|
|
22
|
+
icon?: React.ReactNode;
|
|
23
|
+
size?: 'sm' | 'md';
|
|
24
|
+
className?: string;
|
|
25
|
+
/** Extra content under the description. */
|
|
26
|
+
children?: React.ReactNode;
|
|
27
|
+
}
|
|
28
|
+
/** @internal The icon tile and the text of a selectable card. */
|
|
29
|
+
export declare function SelectableCardBody({ id, title, description, icon, size, children, }: Omit<SelectableCardBaseProps, 'className'> & {
|
|
30
|
+
id: string;
|
|
31
|
+
}): React.JSX.Element;
|
|
32
|
+
/** The ids SelectableRadio and SelectableCheckbox give the control, title and description. */
|
|
33
|
+
export declare function useSelectableIds(id: string | undefined, description: React.ReactNode): {
|
|
34
|
+
controlId: string;
|
|
35
|
+
'aria-labelledby': string;
|
|
36
|
+
'aria-describedby': string | undefined;
|
|
37
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type CheckboxProps } from './checkbox.js';
|
|
3
|
+
import { type SelectableCardBaseProps } from './selectable-card.js';
|
|
4
|
+
/**
|
|
5
|
+
* SelectableCheckbox: a Checkbox as a whole card, for picking several options that each need a
|
|
6
|
+
* line of explanation or an icon: integrations to connect, tools an agent may use, add-ons.
|
|
7
|
+
* The card is the checkbox's `<label>`, so a click anywhere on it toggles the box, which sits
|
|
8
|
+
* at the card's right edge, on the middle of the title's first line. Checked cards take the
|
|
9
|
+
* action/primary border. Lay them out in a grid, or a FieldGroup with `variant="choices"` for
|
|
10
|
+
* one legend and one error.
|
|
11
|
+
*/
|
|
12
|
+
export interface SelectableCheckboxProps extends Omit<CheckboxProps, 'label' | 'description' | 'placement' | 'title' | 'children'>, SelectableCardBaseProps {
|
|
13
|
+
}
|
|
14
|
+
export declare function SelectableCheckbox({ title, description, icon, size, className, children, id, ...props }: SelectableCheckboxProps): React.JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { RadioGroup as RadioGroupPrimitive } from 'radix-ui';
|
|
3
|
+
import { type SelectableCardBaseProps } from './selectable-card.js';
|
|
4
|
+
/**
|
|
5
|
+
* SelectableRadio: one option of a RadioGroup drawn as a whole card, with no radio circle: the
|
|
6
|
+
* card itself is the radio (`role="radio"`), and the selected one is the card with the
|
|
7
|
+
* action/primary border. For choices that need a line of explanation or an icon: plans,
|
|
8
|
+
* roles, the mode an agent runs in.
|
|
9
|
+
*
|
|
10
|
+
* Put the cards in a `RadioGroup`, which owns the value: a click or Space picks a card, arrow
|
|
11
|
+
* keys move between them, Tab enters and leaves the group. `icon` adds a 16px glyph in a tile
|
|
12
|
+
* as tall as the title and description.
|
|
13
|
+
*/
|
|
14
|
+
export interface SelectableRadioProps extends Omit<React.ComponentProps<typeof RadioGroupPrimitive.Item>, 'title' | 'children' | 'asChild'>, SelectableCardBaseProps {
|
|
15
|
+
}
|
|
16
|
+
export declare function SelectableRadio({ title, description, icon, size, className, children, id, ...props }: SelectableRadioProps): React.JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Separator: a 1px rule in border/default between blocks of content, across (horizontal) or
|
|
4
|
+
* down (vertical, as tall as its row).
|
|
5
|
+
*
|
|
6
|
+
* With a `label` it becomes a rule with a word in the middle ("or" between sign-in options,
|
|
7
|
+
* "Today" in a feed), 13px muted, 12px from the lines on either side.
|
|
8
|
+
*
|
|
9
|
+
* Most rules are only visual, so it is `decorative` by default and screen readers skip it;
|
|
10
|
+
* set `decorative={false}` when it really splits the content into parts (`role="separator"`).
|
|
11
|
+
*/
|
|
12
|
+
export interface SeparatorProps extends React.ComponentProps<'div'> {
|
|
13
|
+
orientation?: 'horizontal' | 'vertical';
|
|
14
|
+
decorative?: boolean;
|
|
15
|
+
/** A word in the middle of a horizontal rule. */
|
|
16
|
+
label?: React.ReactNode;
|
|
17
|
+
}
|
|
18
|
+
export declare function Separator({ orientation, decorative, label, className, ...props }: SeparatorProps): React.JSX.Element;
|
package/components/sheet.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
'use client';export { Sheet, SheetClose } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
1
|
+
'use client';export { Sheet, SheetClose } from '../chunk-DAKVTPYZ.js';
|
|
2
|
+
import '../chunk-WZSLDYUU.js';
|
|
3
|
+
import '../chunk-RPL6FRVX.js';
|
|
4
|
+
import '../chunk-6DWLTGRQ.js';
|
|
5
|
+
import '../chunk-AKEZCWNW.js';
|
|
6
|
+
import '../chunk-NTSU44FY.js';
|
|
7
|
+
import '../chunk-EHEXE2UV.js';
|
package/components/sidebar.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use client';export { Sidebar, SidebarGroup, SidebarItem, SidebarSubGroup, SidebarSubItem } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
'use client';export { Sidebar, SidebarGroup, SidebarItem, SidebarSubGroup, SidebarSubItem } from '../chunk-WJYJMX5S.js';
|
|
2
|
+
import '../chunk-EHEXE2UV.js';
|
package/components/skeleton.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use client';export { Skeleton } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
'use client';export { Skeleton } from '../chunk-GKDMCY2S.js';
|
|
2
|
+
import '../chunk-EHEXE2UV.js';
|
package/components/slider.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
'use client';export { Slider } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
6
|
-
import '../chunk-
|
|
7
|
-
import '../chunk-
|
|
1
|
+
'use client';export { Slider } from '../chunk-PTK4QAOQ.js';
|
|
2
|
+
import '../chunk-L5PPN42A.js';
|
|
3
|
+
import '../chunk-KDU7AT2T.js';
|
|
4
|
+
import '../chunk-KITXKIYW.js';
|
|
5
|
+
import '../chunk-XWPH7C2W.js';
|
|
6
|
+
import '../chunk-NTSU44FY.js';
|
|
7
|
+
import '../chunk-EHEXE2UV.js';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Spinner: something is on its way and there's no telling how far along it is (for that, use
|
|
4
|
+
* Progress). A 1.5px ring at 20% under a quarter arc in the current colour, so it takes the
|
|
5
|
+
* colour of the text or button it sits in. Sizes follow the icon scale: xs 12, sm 14, md 16,
|
|
6
|
+
* lg 20. It turns once every 800ms, and still turns (at half speed) under reduced motion, since
|
|
7
|
+
* a stopped arc reads as stuck.
|
|
8
|
+
*
|
|
9
|
+
* On its own it is a `role="status"` named "Loading" (or `label`). Inside something that
|
|
10
|
+
* already says it's busy (a loading Button, a row with its own text) pass `label={null}` and it
|
|
11
|
+
* is hidden from screen readers.
|
|
12
|
+
*/
|
|
13
|
+
export interface SpinnerProps extends Omit<React.ComponentProps<'span'>, 'children'> {
|
|
14
|
+
size?: 'xs' | 'sm' | 'md' | 'lg';
|
|
15
|
+
/** What's loading, for screen readers. `null` hides the spinner from them. */
|
|
16
|
+
label?: string | null;
|
|
17
|
+
}
|
|
18
|
+
export declare function Spinner({ size, label, className, ...props }: SpinnerProps): React.JSX.Element;
|