tensile 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 +409 -0
- package/THIRD_PARTY_NOTICES +93 -0
- package/dist/CalendarView.d.ts +20 -0
- package/dist/Check.d.ts +4 -0
- package/dist/Expand.d.ts +34 -0
- package/dist/Menu.d.ts +18 -0
- package/dist/Modal.d.ts +14 -0
- package/dist/SeekBar.d.ts +20 -0
- package/dist/Sheet.d.ts +12 -0
- package/dist/SliderTrack.d.ts +18 -0
- package/dist/calendar.d.ts +12 -0
- package/dist/color.d.ts +16 -0
- package/dist/components/actions/ActionMenu.d.ts +12 -0
- package/dist/components/actions/Button.d.ts +12 -0
- package/dist/components/actions/CommandPalette.d.ts +15 -0
- package/dist/components/actions/CopyButton.d.ts +8 -0
- package/dist/components/actions/HoldButton.d.ts +11 -0
- package/dist/components/actions/IconButton.d.ts +5 -0
- package/dist/components/actions/MorphButton.d.ts +6 -0
- package/dist/components/actions/SelectionBar.d.ts +12 -0
- package/dist/components/actions/SwipeButton.d.ts +9 -0
- package/dist/components/actions/Toolbar.d.ts +7 -0
- package/dist/components/data-display/Avatar.d.ts +14 -0
- package/dist/components/data-display/AvatarGroup.d.ts +15 -0
- package/dist/components/data-display/BarChart.d.ts +13 -0
- package/dist/components/data-display/DataTable.d.ts +32 -0
- package/dist/components/data-display/DescriptionList.d.ts +8 -0
- package/dist/components/data-display/DonutChart.d.ts +17 -0
- package/dist/components/data-display/Icon.d.ts +9 -0
- package/dist/components/data-display/Kbd.d.ts +2 -0
- package/dist/components/data-display/LineChart.d.ts +13 -0
- package/dist/components/data-display/List.d.ts +16 -0
- package/dist/components/data-display/NumberTicker.d.ts +6 -0
- package/dist/components/data-display/StatTile.d.ts +15 -0
- package/dist/components/data-display/Table.d.ts +27 -0
- package/dist/components/data-display/Tag.d.ts +9 -0
- package/dist/components/data-display/Timeline.d.ts +13 -0
- package/dist/components/data-display/TreeView.d.ts +18 -0
- package/dist/components/feedback/Alert.d.ts +7 -0
- package/dist/components/feedback/Badge.d.ts +9 -0
- package/dist/components/feedback/EmptyState.d.ts +8 -0
- package/dist/components/feedback/LoadingState.d.ts +6 -0
- package/dist/components/feedback/NotificationList.d.ts +21 -0
- package/dist/components/feedback/ProgressBar.d.ts +8 -0
- package/dist/components/feedback/ProgressRing.d.ts +10 -0
- package/dist/components/feedback/Skeleton.d.ts +5 -0
- package/dist/components/feedback/Spinner.d.ts +7 -0
- package/dist/components/feedback/StatusBadge.d.ts +6 -0
- package/dist/components/feedback/Toast.d.ts +6 -0
- package/dist/components/feedback/ToastStack.d.ts +13 -0
- package/dist/components/inputs/Checkbox.d.ts +7 -0
- package/dist/components/inputs/CheckboxGroup.d.ts +15 -0
- package/dist/components/inputs/ColorPicker.d.ts +16 -0
- package/dist/components/inputs/ColorSwatches.d.ts +16 -0
- package/dist/components/inputs/Combobox.d.ts +18 -0
- package/dist/components/inputs/DatePicker.d.ts +6 -0
- package/dist/components/inputs/DateRangePicker.d.ts +9 -0
- package/dist/components/inputs/EditableText.d.ts +9 -0
- package/dist/components/inputs/Field.d.ts +52 -0
- package/dist/components/inputs/Fieldset.d.ts +9 -0
- package/dist/components/inputs/FileUpload.d.ts +16 -0
- package/dist/components/inputs/Input.d.ts +7 -0
- package/dist/components/inputs/MultiSelect.d.ts +20 -0
- package/dist/components/inputs/NumberInput.d.ts +11 -0
- package/dist/components/inputs/NumberStepper.d.ts +17 -0
- package/dist/components/inputs/OTPInput.d.ts +15 -0
- package/dist/components/inputs/PasswordInput.d.ts +6 -0
- package/dist/components/inputs/RadioGroup.d.ts +17 -0
- package/dist/components/inputs/RangeSlider.d.ts +16 -0
- package/dist/components/inputs/Rating.d.ts +17 -0
- package/dist/components/inputs/SearchField.d.ts +11 -0
- package/dist/components/inputs/Select.d.ts +18 -0
- package/dist/components/inputs/Slider.d.ts +15 -0
- package/dist/components/inputs/TagInput.d.ts +13 -0
- package/dist/components/inputs/TextField.d.ts +7 -0
- package/dist/components/inputs/Textarea.d.ts +5 -0
- package/dist/components/inputs/ThemeToggle.d.ts +9 -0
- package/dist/components/inputs/TimePicker.d.ts +27 -0
- package/dist/components/inputs/TimeWheel.d.ts +25 -0
- package/dist/components/inputs/Toggle.d.ts +7 -0
- package/dist/components/inputs/ToggleGroup.d.ts +15 -0
- package/dist/components/layout/Accordion.d.ts +12 -0
- package/dist/components/layout/AppShell.d.ts +12 -0
- package/dist/components/layout/Card.d.ts +5 -0
- package/dist/components/layout/ExpandableCard.d.ts +14 -0
- package/dist/components/layout/Footer.d.ts +14 -0
- package/dist/components/layout/Header.d.ts +16 -0
- package/dist/components/layout/PageHeader.d.ts +8 -0
- package/dist/components/layout/Separator.d.ts +5 -0
- package/dist/components/layout/SplitPane.d.ts +12 -0
- package/dist/components/media/Carousel.d.ts +24 -0
- package/dist/components/media/CompareSlider.d.ts +14 -0
- package/dist/components/media/Image.d.ts +8 -0
- package/dist/components/media/Lightbox.d.ts +15 -0
- package/dist/components/media/MusicPlayer.d.ts +16 -0
- package/dist/components/media/VideoControls.d.ts +21 -0
- package/dist/components/media/VolumeSlider.d.ts +10 -0
- package/dist/components/media/WaveformScrubber.d.ts +13 -0
- package/dist/components/navigation/Breadcrumbs.d.ts +19 -0
- package/dist/components/navigation/CollapsibleSidebar.d.ts +21 -0
- package/dist/components/navigation/Link.d.ts +12 -0
- package/dist/components/navigation/PageDots.d.ts +11 -0
- package/dist/components/navigation/Pagination.d.ts +18 -0
- package/dist/components/navigation/SegmentedTabs.d.ts +13 -0
- package/dist/components/navigation/SidebarNav.d.ts +17 -0
- package/dist/components/navigation/TabBar.d.ts +14 -0
- package/dist/components/navigation/Tabs.d.ts +14 -0
- package/dist/components/navigation/UnderlineTabs.d.ts +18 -0
- package/dist/components/navigation/WizardSteps.d.ts +16 -0
- package/dist/components/overlays/AlertDialog.d.ts +12 -0
- package/dist/components/overlays/BottomSheet.d.ts +9 -0
- package/dist/components/overlays/ContextMenu.d.ts +9 -0
- package/dist/components/overlays/Dialog.d.ts +12 -0
- package/dist/components/overlays/Drawer.d.ts +10 -0
- package/dist/components/overlays/Island.d.ts +17 -0
- package/dist/components/overlays/Popover.d.ts +19 -0
- package/dist/components/overlays/Tooltip.d.ts +19 -0
- package/dist/drag.d.ts +15 -0
- package/dist/focus.d.ts +2 -0
- package/dist/geist-cyrillic-ext-wght-normal.woff2 +0 -0
- package/dist/geist-cyrillic-wght-normal.woff2 +0 -0
- package/dist/geist-latin-ext-wght-normal.woff2 +0 -0
- package/dist/geist-latin-wght-normal.woff2 +0 -0
- package/dist/geist-vietnamese-wght-normal.woff2 +0 -0
- package/dist/icons.d.ts +12 -0
- package/dist/index.d.ts +105 -0
- package/dist/index.js +7972 -0
- package/dist/list.d.ts +18 -0
- package/dist/overlay.d.ts +22 -0
- package/dist/playback.d.ts +4 -0
- package/dist/reset.css +2 -0
- package/dist/springs.d.ts +27 -0
- package/dist/styles.css +2 -0
- package/dist/useSize.d.ts +7 -0
- package/dist/useWidth.d.ts +2 -0
- package/package.json +64 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type CalendarViewProps } from "../../CalendarView";
|
|
2
|
+
export type DatePickerProps = Omit<CalendarViewProps, "isSelected" | "onDayHover" | "selection" | "multiple"> & {
|
|
3
|
+
name?: string;
|
|
4
|
+
className?: string;
|
|
5
|
+
};
|
|
6
|
+
export declare function DatePicker({ value, onValueChange, name, disabled, className, ...props }: DatePickerProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type DateRange } from "../../calendar";
|
|
2
|
+
import type { DatePickerProps } from "./DatePicker";
|
|
3
|
+
export type DateRangePickerProps = Omit<DatePickerProps, "value" | "onValueChange" | "name"> & {
|
|
4
|
+
value: DateRange | null;
|
|
5
|
+
onValueChange: (value: DateRange) => void;
|
|
6
|
+
startName?: string;
|
|
7
|
+
endName?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare function DateRangePicker({ value, onValueChange, firstDayOfWeek, startName, endName, disabled, className, ...props }: DateRangePickerProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type EditableTextProps = {
|
|
2
|
+
value: string;
|
|
3
|
+
onValueChange: (value: string) => void;
|
|
4
|
+
label: string;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
editLabel?: (label: string, value: string) => string;
|
|
7
|
+
className?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare function EditableText({ value, onValueChange, label, placeholder, editLabel, className, }: EditableTextProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export type FieldProps = {
|
|
2
|
+
label: string;
|
|
3
|
+
description?: React.ReactNode;
|
|
4
|
+
error?: string;
|
|
5
|
+
required?: boolean;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
/** Where text controls (Input, Textarea, Select, Combobox, MultiSelect, TagInput) show the label and the error: inside their shape, the label floating up while focused or filled, or above and below it. Other controls always use above. */
|
|
8
|
+
labelPlacement?: "inside" | "above";
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
className?: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const FieldContext: import("react").Context<{
|
|
13
|
+
id?: string;
|
|
14
|
+
labelId?: string;
|
|
15
|
+
describedBy?: string;
|
|
16
|
+
invalid?: boolean;
|
|
17
|
+
required?: boolean;
|
|
18
|
+
disabled: boolean;
|
|
19
|
+
/** With `labelPlacement="inside"`: the label as drawn (with the required mark) and the error, for a text control to draw inside its shape. */
|
|
20
|
+
inside?: {
|
|
21
|
+
label: string;
|
|
22
|
+
error?: string;
|
|
23
|
+
};
|
|
24
|
+
} | null>;
|
|
25
|
+
/** The enclosing `Field`'s ids and state for its control, or null outside one; directly inside a `Fieldset`, only `disabled`. */
|
|
26
|
+
export declare function useField(): {
|
|
27
|
+
id?: string;
|
|
28
|
+
labelId?: string;
|
|
29
|
+
describedBy?: string;
|
|
30
|
+
invalid?: boolean;
|
|
31
|
+
required?: boolean;
|
|
32
|
+
disabled: boolean;
|
|
33
|
+
/** With `labelPlacement="inside"`: the label as drawn (with the required mark) and the error, for a text control to draw inside its shape. */
|
|
34
|
+
inside?: {
|
|
35
|
+
label: string;
|
|
36
|
+
error?: string;
|
|
37
|
+
};
|
|
38
|
+
} | null;
|
|
39
|
+
/** A text control's label, resting where the value goes and floating above it while `floated`; `className` places it. */
|
|
40
|
+
export declare function FloatingLabel({ floated, className, children, "aria-hidden": hidden, }: {
|
|
41
|
+
floated: boolean;
|
|
42
|
+
className: string;
|
|
43
|
+
children: React.ReactNode;
|
|
44
|
+
"aria-hidden"?: boolean;
|
|
45
|
+
}): import("react").JSX.Element;
|
|
46
|
+
/** The line and the blur-swapped error under a text control's value, inside its shape, which grows to show them. */
|
|
47
|
+
export declare function ErrorRow({ id, error, "aria-hidden": hidden }: {
|
|
48
|
+
id?: string;
|
|
49
|
+
error?: string;
|
|
50
|
+
"aria-hidden"?: boolean;
|
|
51
|
+
}): import("react").JSX.Element;
|
|
52
|
+
export declare function Field({ label, description, error, required, disabled, labelPlacement, children, className, }: FieldProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type FieldsetProps = {
|
|
2
|
+
legend: string;
|
|
3
|
+
description?: React.ReactNode;
|
|
4
|
+
error?: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
className?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare function Fieldset({ legend, description, error, disabled, children, className }: FieldsetProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type FileUploadProps = {
|
|
2
|
+
status: "idle" | "uploading" | "done";
|
|
3
|
+
/** 0..1 */
|
|
4
|
+
progress: number;
|
|
5
|
+
/** Called with the files the user picked or dropped. Start the upload here and set `status` and `progress`. */
|
|
6
|
+
onFiles: (files: File[]) => void;
|
|
7
|
+
label?: string;
|
|
8
|
+
uploadingLabel?: (name: string) => string;
|
|
9
|
+
formatProgress?: (progress: number) => string;
|
|
10
|
+
doneLabel?: string;
|
|
11
|
+
accept?: string;
|
|
12
|
+
multiple?: boolean;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
className?: string;
|
|
15
|
+
};
|
|
16
|
+
export declare function FileUpload({ status, progress, onFiles, label, uploadingLabel, formatProgress, doneLabel, accept, multiple, disabled, className, }: FileUploadProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type InputProps = Omit<React.ComponentProps<"input">, "value" | "onChange"> & {
|
|
2
|
+
value: string;
|
|
3
|
+
onValueChange: (value: string) => void;
|
|
4
|
+
leading?: React.ReactNode;
|
|
5
|
+
trailing?: React.ReactNode;
|
|
6
|
+
};
|
|
7
|
+
export declare function Input({ value, onValueChange, leading, trailing, id, required, disabled, onFocus, onBlur, "aria-labelledby": labelledBy, "aria-describedby": describedBy, "aria-invalid": invalid, className, style, ...props }: InputProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type MultiSelectProps = {
|
|
2
|
+
options: {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
icon?: React.ReactNode;
|
|
6
|
+
}[];
|
|
7
|
+
value: string[];
|
|
8
|
+
onValueChange: (value: string[]) => void;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
label?: string;
|
|
11
|
+
emptyText?: string;
|
|
12
|
+
/** The pill's text for the selected labels, in option order. */
|
|
13
|
+
summary?: (labels: string[]) => string;
|
|
14
|
+
id?: string;
|
|
15
|
+
name?: string;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
required?: boolean;
|
|
18
|
+
className?: string;
|
|
19
|
+
};
|
|
20
|
+
export declare function MultiSelect({ options, value, onValueChange, placeholder, label, emptyText, summary, id, name, disabled, required, className, }: MultiSelectProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type InputProps } from "./Input";
|
|
2
|
+
export type NumberInputProps = Omit<InputProps, "value" | "onValueChange" | "type" | "min" | "max" | "step"> & {
|
|
3
|
+
value: number | null;
|
|
4
|
+
onValueChange: (value: number | null) => void;
|
|
5
|
+
min?: number;
|
|
6
|
+
max?: number;
|
|
7
|
+
step?: number;
|
|
8
|
+
formatValue?: (value: number) => string;
|
|
9
|
+
parseValue?: (text: string) => number | null;
|
|
10
|
+
};
|
|
11
|
+
export declare function NumberInput({ value, onValueChange, min, max, step, formatValue, parseValue, inputMode, name, form, disabled, readOnly, onFocus, onBlur, onKeyDown, ...props }: NumberInputProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type NumberStepperProps = {
|
|
2
|
+
value: number;
|
|
3
|
+
onValueChange: (value: number) => void;
|
|
4
|
+
min?: number;
|
|
5
|
+
max?: number;
|
|
6
|
+
step?: number;
|
|
7
|
+
formatValue?: (value: number) => string;
|
|
8
|
+
label?: string;
|
|
9
|
+
decreaseLabel?: string;
|
|
10
|
+
increaseLabel?: string;
|
|
11
|
+
id?: string;
|
|
12
|
+
name?: string;
|
|
13
|
+
required?: boolean;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
className?: string;
|
|
16
|
+
};
|
|
17
|
+
export declare function NumberStepper({ value, onValueChange, min, max, step, formatValue, label, decreaseLabel, increaseLabel, id, name, required, disabled, className, }: NumberStepperProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type OTPInputProps = {
|
|
2
|
+
value: string;
|
|
3
|
+
onValueChange: (value: string) => void;
|
|
4
|
+
/** Number of digits in the code. */
|
|
5
|
+
length?: number;
|
|
6
|
+
label?: string;
|
|
7
|
+
/** Names each cell, given its position from 1 and the number of digits. */
|
|
8
|
+
cellLabel?: (position: number, length: number) => string;
|
|
9
|
+
id?: string;
|
|
10
|
+
name?: string;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
required?: boolean;
|
|
13
|
+
className?: string;
|
|
14
|
+
};
|
|
15
|
+
export declare function OTPInput({ value, onValueChange, length, label, cellLabel, id, name, disabled, required, className, }: OTPInputProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type InputProps } from "./Input";
|
|
2
|
+
export type PasswordInputProps = InputProps & {
|
|
3
|
+
showLabel?: string;
|
|
4
|
+
hideLabel?: string;
|
|
5
|
+
};
|
|
6
|
+
export declare function PasswordInput({ autoComplete, showLabel, hideLabel, disabled, trailing, ...props }: PasswordInputProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type RadioGroupProps = {
|
|
2
|
+
options: {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
icon?: React.ReactNode;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}[];
|
|
8
|
+
value: string | null;
|
|
9
|
+
onValueChange: (value: string) => void;
|
|
10
|
+
label?: string;
|
|
11
|
+
id?: string;
|
|
12
|
+
name?: string;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
required?: boolean;
|
|
15
|
+
className?: string;
|
|
16
|
+
};
|
|
17
|
+
export declare function RadioGroup({ options, value, onValueChange, label, id, name, disabled, required, className, }: RadioGroupProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type RangeSliderProps = {
|
|
2
|
+
value: [number, number];
|
|
3
|
+
onValueChange: (value: [number, number]) => void;
|
|
4
|
+
min?: number;
|
|
5
|
+
max?: number;
|
|
6
|
+
step?: number;
|
|
7
|
+
formatValue?: (value: number) => string;
|
|
8
|
+
lowerLabel?: string;
|
|
9
|
+
upperLabel?: string;
|
|
10
|
+
id?: string;
|
|
11
|
+
name?: string;
|
|
12
|
+
required?: boolean;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
className?: string;
|
|
15
|
+
};
|
|
16
|
+
export declare function RangeSlider({ value, onValueChange, min, max, step, formatValue, lowerLabel, upperLabel, id, name, required, disabled, className, }: RangeSliderProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type RatingProps = {
|
|
2
|
+
/** Whole stars, from 0 to `count`. */
|
|
3
|
+
value: number;
|
|
4
|
+
onValueChange: (value: number) => void;
|
|
5
|
+
/** Number of stars. */
|
|
6
|
+
count?: number;
|
|
7
|
+
label?: string;
|
|
8
|
+
/** Screen reader text for the value. */
|
|
9
|
+
valueLabel?: (value: number, count: number) => string;
|
|
10
|
+
readOnly?: boolean;
|
|
11
|
+
id?: string;
|
|
12
|
+
name?: string;
|
|
13
|
+
required?: boolean;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
className?: string;
|
|
16
|
+
};
|
|
17
|
+
export declare function Rating({ value, onValueChange, count, label, valueLabel, readOnly, id, name, required, disabled, className, }: RatingProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type SearchFieldProps = {
|
|
2
|
+
value: string;
|
|
3
|
+
onValueChange: (value: string) => void;
|
|
4
|
+
label?: string;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
openLabel?: string;
|
|
7
|
+
clearLabel?: string;
|
|
8
|
+
name?: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
};
|
|
11
|
+
export declare function SearchField({ value, onValueChange, label, placeholder, openLabel, clearLabel, name, className, }: SearchFieldProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type SelectProps = {
|
|
2
|
+
options: {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
icon?: React.ReactNode;
|
|
6
|
+
}[];
|
|
7
|
+
value: string | null;
|
|
8
|
+
onValueChange: (value: string) => void;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
label?: string;
|
|
11
|
+
emptyText?: string;
|
|
12
|
+
id?: string;
|
|
13
|
+
name?: string;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
required?: boolean;
|
|
16
|
+
className?: string;
|
|
17
|
+
};
|
|
18
|
+
export declare function Select({ options, value, onValueChange, placeholder, label, emptyText, id, name, disabled, required, className, }: SelectProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type SliderProps = {
|
|
2
|
+
value: number;
|
|
3
|
+
onValueChange: (value: number) => void;
|
|
4
|
+
min?: number;
|
|
5
|
+
max?: number;
|
|
6
|
+
step?: number;
|
|
7
|
+
formatValue?: (value: number) => string;
|
|
8
|
+
label?: string;
|
|
9
|
+
id?: string;
|
|
10
|
+
name?: string;
|
|
11
|
+
required?: boolean;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
className?: string;
|
|
14
|
+
};
|
|
15
|
+
export declare function Slider({ value, onValueChange, min, max, step, formatValue, label, id, name, required, disabled, className, }: SliderProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type TagInputProps = {
|
|
2
|
+
value: string[];
|
|
3
|
+
onValueChange: (value: string[]) => void;
|
|
4
|
+
label?: string;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
removeLabel?: (tag: string) => string;
|
|
7
|
+
id?: string;
|
|
8
|
+
name?: string;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
required?: boolean;
|
|
11
|
+
className?: string;
|
|
12
|
+
};
|
|
13
|
+
export declare function TagInput({ value, onValueChange, label, placeholder, removeLabel, id, name, disabled, required, className, }: TagInputProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type TextFieldProps = Omit<React.ComponentProps<"input">, "value" | "onChange" | "placeholder"> & {
|
|
2
|
+
value: string;
|
|
3
|
+
onValueChange: (value: string) => void;
|
|
4
|
+
label?: string;
|
|
5
|
+
error?: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function TextField({ value, onValueChange, label, error, onFocus, onBlur, "aria-describedby": describedBy, "aria-invalid": invalid, className, style, ...props }: TextFieldProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type TextareaProps = Omit<React.ComponentProps<"textarea">, "value" | "onChange"> & {
|
|
2
|
+
value: string;
|
|
3
|
+
onValueChange: (value: string) => void;
|
|
4
|
+
};
|
|
5
|
+
export declare function Textarea({ value, onValueChange, rows, id, required, disabled, onFocus, onBlur, "aria-labelledby": labelledBy, "aria-describedby": describedBy, "aria-invalid": invalid, className, style, ...props }: TextareaProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type ThemeToggleProps = {
|
|
2
|
+
value: "light" | "dark";
|
|
3
|
+
onValueChange: (value: "light" | "dark") => void;
|
|
4
|
+
label?: string;
|
|
5
|
+
name?: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
className?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare function ThemeToggle({ value, onValueChange, label, name, disabled, className, }: ThemeToggleProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
type Time = {
|
|
2
|
+
hours: number;
|
|
3
|
+
minutes: number;
|
|
4
|
+
};
|
|
5
|
+
export type TimePickerProps = {
|
|
6
|
+
/** Hours 0–23, or null while no time is chosen. */
|
|
7
|
+
value: Time | null;
|
|
8
|
+
onValueChange: (value: Time) => void;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
label?: string;
|
|
11
|
+
formatTime?: (value: Time) => string;
|
|
12
|
+
/** Minutes between two rows of the minutes wheel. */
|
|
13
|
+
minuteStep?: number;
|
|
14
|
+
formatNumber?: (value: number) => string;
|
|
15
|
+
amLabel?: string;
|
|
16
|
+
pmLabel?: string;
|
|
17
|
+
hoursLabel?: string;
|
|
18
|
+
minutesLabel?: string;
|
|
19
|
+
periodLabel?: string;
|
|
20
|
+
id?: string;
|
|
21
|
+
name?: string;
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
required?: boolean;
|
|
24
|
+
className?: string;
|
|
25
|
+
};
|
|
26
|
+
export declare function TimePicker({ value, onValueChange, placeholder, label, formatTime, minuteStep, formatNumber, amLabel, pmLabel, hoursLabel, minutesLabel, periodLabel, id, name, disabled, required, className, }: TimePickerProps): import("react").JSX.Element;
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
type Time = {
|
|
2
|
+
hours: number;
|
|
3
|
+
minutes: number;
|
|
4
|
+
};
|
|
5
|
+
export type TimeWheelProps = {
|
|
6
|
+
/** Hours 0–23; the wheels show them as 12, 1–11 and AM or PM. */
|
|
7
|
+
value: Time;
|
|
8
|
+
onValueChange: (value: Time) => void;
|
|
9
|
+
/** Minutes between two rows of the minutes wheel. */
|
|
10
|
+
minuteStep?: number;
|
|
11
|
+
formatNumber?: (value: number) => string;
|
|
12
|
+
amLabel?: string;
|
|
13
|
+
pmLabel?: string;
|
|
14
|
+
label?: string;
|
|
15
|
+
hoursLabel?: string;
|
|
16
|
+
minutesLabel?: string;
|
|
17
|
+
periodLabel?: string;
|
|
18
|
+
id?: string;
|
|
19
|
+
name?: string;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
required?: boolean;
|
|
22
|
+
className?: string;
|
|
23
|
+
};
|
|
24
|
+
export declare function TimeWheel({ value, onValueChange, minuteStep, formatNumber, amLabel, pmLabel, label, hoursLabel, minutesLabel, periodLabel, id, name, disabled, required, className, }: TimeWheelProps): import("react").JSX.Element;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type ToggleProps = Omit<React.ComponentProps<"input">, "type" | "checked" | "onChange" | "children"> & {
|
|
2
|
+
checked: boolean;
|
|
3
|
+
onCheckedChange: (checked: boolean) => void;
|
|
4
|
+
label?: string;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
};
|
|
7
|
+
export declare function Toggle({ checked, onCheckedChange, label, children, id, required, disabled, "aria-label": ariaLabel, "aria-labelledby": labelledBy, "aria-describedby": describedBy, "aria-invalid": invalid, className, ...props }: ToggleProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type ToggleGroupProps = {
|
|
2
|
+
options: {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
icon?: React.ReactNode;
|
|
6
|
+
}[];
|
|
7
|
+
value: string[];
|
|
8
|
+
onValueChange: (value: string[]) => void;
|
|
9
|
+
label?: string;
|
|
10
|
+
id?: string;
|
|
11
|
+
name?: string;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
className?: string;
|
|
14
|
+
};
|
|
15
|
+
export declare function ToggleGroup({ options, value, onValueChange, label, id, name, disabled, className }: ToggleGroupProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type AccordionProps = {
|
|
2
|
+
items: {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
content: React.ReactNode;
|
|
6
|
+
icon?: React.ReactNode;
|
|
7
|
+
}[];
|
|
8
|
+
value: string | null;
|
|
9
|
+
onValueChange: (value: string | null) => void;
|
|
10
|
+
className?: string;
|
|
11
|
+
};
|
|
12
|
+
export declare function Accordion({ items, value, onValueChange, className }: AccordionProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type AppShellProps = {
|
|
2
|
+
/** A full-height column beside the page from 1024 px up, staying in view while the page scrolls; hidden below. */
|
|
3
|
+
sidebar?: React.ReactNode;
|
|
4
|
+
/** At the top of the page column. */
|
|
5
|
+
header?: React.ReactNode;
|
|
6
|
+
/** Fixed to the bottom below 1024 px; hidden from there up. */
|
|
7
|
+
mobileNav?: React.ReactNode;
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
skipLabel?: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
};
|
|
12
|
+
export declare function AppShell({ sidebar, header, mobileNav, children, skipLabel, className }: AppShellProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type ExpandableCardProps = {
|
|
2
|
+
title: string;
|
|
3
|
+
subtitle: string;
|
|
4
|
+
/** Picture shown in the card and the detail's header; it fills a square box that the card rounds. */
|
|
5
|
+
visual: React.ReactNode;
|
|
6
|
+
/** Body of the detail view, below its header. */
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
open: boolean;
|
|
9
|
+
onOpenChange: (open: boolean) => void;
|
|
10
|
+
openLabel?: (title: string) => string;
|
|
11
|
+
closeLabel?: string;
|
|
12
|
+
className?: string;
|
|
13
|
+
};
|
|
14
|
+
export declare function ExpandableCard({ title, subtitle, visual, children, open, onOpenChange, openLabel, closeLabel, className, }: ExpandableCardProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type FooterProps = {
|
|
2
|
+
groups: {
|
|
3
|
+
title: string;
|
|
4
|
+
links: {
|
|
5
|
+
label: string;
|
|
6
|
+
href: string;
|
|
7
|
+
}[];
|
|
8
|
+
}[];
|
|
9
|
+
note?: React.ReactNode;
|
|
10
|
+
/** Names the footer's link navigation. */
|
|
11
|
+
label?: string;
|
|
12
|
+
className?: string;
|
|
13
|
+
};
|
|
14
|
+
export declare function Footer({ groups, note, label, className }: FooterProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type HeaderProps = {
|
|
2
|
+
brand: React.ReactNode;
|
|
3
|
+
links: {
|
|
4
|
+
label: string;
|
|
5
|
+
href: string;
|
|
6
|
+
}[];
|
|
7
|
+
/** The current page's `href`. */
|
|
8
|
+
value: string;
|
|
9
|
+
actions?: React.ReactNode;
|
|
10
|
+
/** Names the menu button and titles the drawer it opens. */
|
|
11
|
+
menuLabel?: string;
|
|
12
|
+
navLabel?: string;
|
|
13
|
+
closeLabel?: string;
|
|
14
|
+
className?: string;
|
|
15
|
+
};
|
|
16
|
+
export declare function Header({ brand, links, value, actions, menuLabel, navLabel, closeLabel, className, }: HeaderProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type PageHeaderProps = {
|
|
2
|
+
title: React.ReactNode;
|
|
3
|
+
description?: React.ReactNode;
|
|
4
|
+
breadcrumbs?: React.ReactNode;
|
|
5
|
+
actions?: React.ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare function PageHeader({ title, description, breadcrumbs, actions, className }: PageHeaderProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type SeparatorProps = React.ComponentProps<"hr"> & {
|
|
2
|
+
/** Vertical stretches to the height of its flex or grid row. */
|
|
3
|
+
orientation?: "horizontal" | "vertical";
|
|
4
|
+
};
|
|
5
|
+
export declare function Separator({ orientation, className, ...props }: SeparatorProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type SplitPaneProps = {
|
|
2
|
+
left: React.ReactNode;
|
|
3
|
+
right: React.ReactNode;
|
|
4
|
+
/** Where the divider sits, as a fraction of the width from the left: 0..1. */
|
|
5
|
+
value: number;
|
|
6
|
+
onValueChange: (value: number) => void;
|
|
7
|
+
min?: number;
|
|
8
|
+
max?: number;
|
|
9
|
+
label?: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
};
|
|
12
|
+
export declare function SplitPane({ left, right, value, onValueChange, min, max, label, className }: SplitPaneProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export type CarouselProps = {
|
|
2
|
+
slides: {
|
|
3
|
+
label: string;
|
|
4
|
+
content: React.ReactNode;
|
|
5
|
+
}[];
|
|
6
|
+
/** The selected slide, from 0. */
|
|
7
|
+
value: number;
|
|
8
|
+
onValueChange: (value: number) => void;
|
|
9
|
+
/** CSS width of each slide; "80%" or "min(320px, 80%)" shows the neighbours. */
|
|
10
|
+
slideWidth?: string;
|
|
11
|
+
/** Where the current slide sits when it's narrower than the carousel. */
|
|
12
|
+
align?: "center" | "start";
|
|
13
|
+
/** "visible" keeps the slides past the carousel's edges visible; the page is expected to clip them. */
|
|
14
|
+
overflow?: "clip" | "visible";
|
|
15
|
+
/** "center": arrows around the dots below; "end": dots at the start of the row below, arrows at its end; "sides": arrows over the current slide's edges. */
|
|
16
|
+
controls?: "center" | "end" | "sides";
|
|
17
|
+
label?: string;
|
|
18
|
+
previousLabel?: string;
|
|
19
|
+
nextLabel?: string;
|
|
20
|
+
/** A slide's position in each slide's name and the dots' value text; `n` counts from 1. */
|
|
21
|
+
slideLabel?: (n: number, count: number) => string;
|
|
22
|
+
className?: string;
|
|
23
|
+
};
|
|
24
|
+
export declare function Carousel({ slides, value, onValueChange, slideWidth, align, overflow, controls, label, previousLabel, nextLabel, slideLabel, className, }: CarouselProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type CompareSliderProps = {
|
|
2
|
+
/** Left of the divider: any node that fills the frame, e.g. an img with size-full object-cover. */
|
|
3
|
+
before: React.ReactNode;
|
|
4
|
+
after: React.ReactNode;
|
|
5
|
+
/** Divider position from the left, 0..1 */
|
|
6
|
+
value: number;
|
|
7
|
+
onValueChange: (value: number) => void;
|
|
8
|
+
beforeLabel?: string;
|
|
9
|
+
afterLabel?: string;
|
|
10
|
+
/** The handle's accessible name. */
|
|
11
|
+
label?: string;
|
|
12
|
+
className?: string;
|
|
13
|
+
};
|
|
14
|
+
export declare function CompareSlider({ before, after, value, onValueChange, beforeLabel, afterLabel, label, className, }: CompareSliderProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type ImageProps = React.ComponentProps<"img"> & {
|
|
2
|
+
alt: string;
|
|
3
|
+
/** Shown, centered, in place of the image if it fails to load. */
|
|
4
|
+
fallback?: React.ReactNode;
|
|
5
|
+
/** Sizes and rounds the box, e.g. `aspect-video w-full rounded-card`; the image covers it. */
|
|
6
|
+
className?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare function Image({ fallback, onLoad, onError, className, ...props }: ImageProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type LightboxProps = {
|
|
2
|
+
/** Each image fills a square thumbnail and a 3:2 full view, e.g. an img with size-full object-cover; its label is its accessible name. */
|
|
3
|
+
images: {
|
|
4
|
+
label: string;
|
|
5
|
+
image: React.ReactNode;
|
|
6
|
+
}[];
|
|
7
|
+
/** Index of the open image, or null when closed. */
|
|
8
|
+
value: number | null;
|
|
9
|
+
onValueChange: (value: number | null) => void;
|
|
10
|
+
closeLabel?: string;
|
|
11
|
+
previousLabel?: string;
|
|
12
|
+
nextLabel?: string;
|
|
13
|
+
className?: string;
|
|
14
|
+
};
|
|
15
|
+
export declare function Lightbox({ images, value, onValueChange, closeLabel, previousLabel, nextLabel, className, }: LightboxProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type MusicPlayerProps = {
|
|
2
|
+
title: string;
|
|
3
|
+
artist: string;
|
|
4
|
+
/** Track length in seconds. */
|
|
5
|
+
duration: number;
|
|
6
|
+
expanded: boolean;
|
|
7
|
+
onExpandedChange: (expanded: boolean) => void;
|
|
8
|
+
openLabel?: (title: string) => string;
|
|
9
|
+
minimizeLabel?: string;
|
|
10
|
+
playLabel?: string;
|
|
11
|
+
pauseLabel?: string;
|
|
12
|
+
seekLabel?: string;
|
|
13
|
+
formatTime?: (seconds: number) => string;
|
|
14
|
+
className?: string;
|
|
15
|
+
};
|
|
16
|
+
export declare function MusicPlayer({ title, artist, duration, expanded, onExpandedChange, openLabel, minimizeLabel, playLabel, pauseLabel, seekLabel, formatTime, className, }: MusicPlayerProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type VideoControlsProps = {
|
|
2
|
+
/** Video length in seconds. */
|
|
3
|
+
duration: number;
|
|
4
|
+
playing: boolean;
|
|
5
|
+
onPlayingChange: (playing: boolean) => void;
|
|
6
|
+
/** Position in seconds. */
|
|
7
|
+
currentTime: number;
|
|
8
|
+
onCurrentTimeChange: (currentTime: number) => void;
|
|
9
|
+
/** 0..1 */
|
|
10
|
+
volume: number;
|
|
11
|
+
onVolumeChange: (volume: number) => void;
|
|
12
|
+
/** Called with true when a seek drag starts and false when it ends, so playback can wait while scrubbing. */
|
|
13
|
+
onScrubChange?: (scrubbing: boolean) => void;
|
|
14
|
+
playLabel?: string;
|
|
15
|
+
pauseLabel?: string;
|
|
16
|
+
seekLabel?: string;
|
|
17
|
+
volumeLabel?: string;
|
|
18
|
+
formatTime?: (seconds: number) => string;
|
|
19
|
+
className?: string;
|
|
20
|
+
};
|
|
21
|
+
export declare function VideoControls({ duration, playing, onPlayingChange, currentTime, onCurrentTimeChange, volume, onVolumeChange, onScrubChange, playLabel, pauseLabel, seekLabel, volumeLabel, formatTime, className, }: VideoControlsProps): import("react").JSX.Element;
|