@openwarelabs/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/README.md +9 -8
- package/dist/components/Calendar/Calendar.d.cts +58 -0
- package/dist/components/Calendar/Calendar.d.ts +58 -0
- package/dist/components/Calendar/DateRangePicker.d.cts +39 -0
- package/dist/components/Calendar/DateRangePicker.d.ts +39 -0
- package/dist/components/Calendar/RangeCalendar.d.cts +38 -0
- package/dist/components/Calendar/RangeCalendar.d.ts +38 -0
- package/dist/components/Calendar/dates.d.cts +13 -0
- package/dist/components/Calendar/dates.d.ts +13 -0
- package/dist/components/ColorPicker/ColorArea.d.cts +44 -0
- package/dist/components/ColorPicker/ColorArea.d.ts +44 -0
- package/dist/components/ColorPicker/ColorSlider.d.cts +53 -0
- package/dist/components/ColorPicker/ColorSlider.d.ts +53 -0
- package/dist/components/ColorPicker/ColorSwatchPicker.d.cts +43 -0
- package/dist/components/ColorPicker/ColorSwatchPicker.d.ts +43 -0
- package/dist/components/ColorPicker/color.d.cts +91 -0
- package/dist/components/ColorPicker/color.d.ts +91 -0
- package/dist/components/DateField/DateField.d.cts +47 -0
- package/dist/components/DateField/DateField.d.ts +47 -0
- package/dist/components/DateField/SegmentedField.d.cts +63 -0
- package/dist/components/DateField/SegmentedField.d.ts +63 -0
- package/dist/components/DateField/TimeField.d.cts +52 -0
- package/dist/components/DateField/TimeField.d.ts +52 -0
- package/dist/components/Field/Field.d.cts +17 -5
- package/dist/components/Field/Field.d.ts +17 -5
- package/dist/components/FileDropZone/FileDropZone.d.cts +1 -1
- package/dist/components/FileDropZone/FileDropZone.d.ts +1 -1
- package/dist/components/Form/Form.d.cts +63 -0
- package/dist/components/Form/Form.d.ts +63 -0
- package/dist/components/InputOTP/InputOTP.d.cts +7 -1
- package/dist/components/InputOTP/InputOTP.d.ts +7 -1
- package/dist/components/ListBox/ListBox.d.cts +65 -0
- package/dist/components/ListBox/ListBox.d.ts +65 -0
- package/dist/components/Meter/Meter.d.cts +62 -0
- package/dist/components/Meter/Meter.d.ts +62 -0
- package/dist/components/Slider/Slider.d.cts +7 -1
- package/dist/components/Slider/Slider.d.ts +7 -1
- package/dist/components/ToggleButtonGroup/ToggleButtonGroup.d.cts +74 -0
- package/dist/components/ToggleButtonGroup/ToggleButtonGroup.d.ts +74 -0
- package/dist/components/Toolbar/Toolbar.d.cts +36 -0
- package/dist/components/Toolbar/Toolbar.d.ts +36 -0
- package/dist/components.css +1007 -12
- package/dist/index.cjs +3999 -1261
- package/dist/index.cjs.map +4 -4
- package/dist/index.d.cts +25 -0
- package/dist/index.d.ts +25 -0
- package/dist/index.js +3955 -1191
- package/dist/index.js.map +4 -4
- package/dist/openware-ui.iife.js +6 -6
- package/dist/styles.css +1007 -12
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -50,18 +50,19 @@ import { Button, Field, Input, Toaster, toast } from "@openwarelabs/ui";
|
|
|
50
50
|
|
|
51
51
|
## Components
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
83 components, each with a page in the docs.
|
|
54
54
|
|
|
55
55
|
| Group | Components |
|
|
56
56
|
| --- | --- |
|
|
57
|
-
| Typography | `Text` (each style on the Typography page as a variant: hero to caption, code and kbd; tones, `truncate`, `as`) |
|
|
58
|
-
|
|
|
59
|
-
|
|
|
60
|
-
|
|
|
61
|
-
|
|
|
57
|
+
| Typography | `Text` (each style on the Typography page as a variant: hero to caption, code and kbd; tones, `truncate`, `as`), `Link`, `Kbd`, `Code`, `CodeBlock`, `Snippet` |
|
|
58
|
+
| Actions | `Button` (primary, secondary, ghost, danger; sm, md, lg; `loading`; `shape="pill"`), `buttonClassName()` for links, `ButtonGroup`, `CloseButton`, `CopyButton`, `ToggleButton`, `SegmentedControl`, `ToggleButtonGroup` (one or several on), `Toolbar` + `ToolbarSeparator` (arrow keys across its controls) |
|
|
59
|
+
| Inputs | `Form` (the browser's checks, your own and the server's errors, under each field; `useFormStatus`), `Field`, `Fieldset`, `Input` (start and end content), `Textarea` (`autoGrow`), `NumberField`, `SearchField`, `InputOTP`, `ColorField`, `DateField` and `TimeField` (typed in segments, in the locale's order) |
|
|
60
|
+
| Choices | `Checkbox`, `CheckboxGroup`, `RadioGroup` (plain or cards), `Switch`, `Select`, `Combobox`, `Slider` (one value or a range), `ChoiceCard`, `ListBox` (one or many, on the page) |
|
|
61
|
+
| Pickers | `Calendar`, `DatePicker`, `RangeCalendar`, `DateRangePicker` (with presets), `ColorPicker`, `ColorArea`, `ColorSlider`, `ColorSwatchPicker`, `FileDropZone` |
|
|
62
|
+
| Feedback | `Alert`, `Badge`, `ProgressBar`, `ProgressCircle`, `Meter` (an amount in a range, toned by thresholds), `Spinner`, `Skeleton`, `SkeletonRows`, `Toaster` + `toast()` (sonner: stacked, swipeable, with actions and promises), `Tooltip` |
|
|
62
63
|
| Overlays | `Dialog`, `ConfirmDialog`, `Drawer`, `Popover`, `Menu` + `MenuItem`, `CommandPalette` |
|
|
63
|
-
| Navigation | `Tabs`, `Accordion`, `Disclosure`, `Breadcrumbs`, `
|
|
64
|
-
| Data display | `Table` (sorting, selection), `Stat`, `FileTree`, `EmptyState`, `Tag`, `ColorSwatch`, `Avatar`, `AvatarGroup`, `User
|
|
64
|
+
| Navigation | `Tabs`, `Accordion`, `Disclosure`, `Breadcrumbs`, `Pagination`, `Steps`, `NavList` + `NavItem` |
|
|
65
|
+
| Data display | `Table` (sorting, selection), `Stat`, `FileTree`, `EmptyState`, `Tag`, `ColorSwatch`, `Avatar`, `AvatarGroup`, `User` |
|
|
65
66
|
| Layout | `Card`, `SettingsRow`, `Stack`, `Separator`, `ScrollShadow`, `VisuallyHidden` |
|
|
66
67
|
| Marketing | `SiteHeader`, `SectionHeading`, `Chip`, `DotGrid` |
|
|
67
68
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type KeyboardEvent, type Ref } from "react";
|
|
1
2
|
import { type ISODate } from "./dates.cjs";
|
|
2
3
|
export interface CalendarProps {
|
|
3
4
|
/** The chosen date as "YYYY-MM-DD", or "" for none. */
|
|
@@ -29,3 +30,60 @@ export interface CalendarHandle {
|
|
|
29
30
|
* (with Shift, by year), Home and End to the week's ends. Today is marked with a brass dot.
|
|
30
31
|
*/
|
|
31
32
|
export declare const Calendar: import("react").ForwardRefExoticComponent<CalendarProps & import("react").RefAttributes<CalendarHandle>>;
|
|
33
|
+
/** Whether the month before `first` has a day on or after `min`. */
|
|
34
|
+
export declare function canShowBefore(first: ISODate, min: ISODate | undefined): boolean;
|
|
35
|
+
/** Whether the month after `last` (the first of the last month shown) has a day on or before `max`. */
|
|
36
|
+
export declare function canShowAfter(last: ISODate, max: ISODate | undefined): boolean;
|
|
37
|
+
/** Where a key moves the focus from `date`: a day, a week, the week's ends, a month (with Shift, a year). */
|
|
38
|
+
export declare function dateForKey(event: KeyboardEvent<HTMLElement>, date: ISODate, weekStartsOn: 0 | 1): ISODate | undefined;
|
|
39
|
+
/** Which way the month changed since the last render, so the new one slides in from that side. */
|
|
40
|
+
export declare function useSlide(month: number): "next" | "previous" | undefined;
|
|
41
|
+
interface MonthNavButton {
|
|
42
|
+
disabled: boolean;
|
|
43
|
+
onClick(): void;
|
|
44
|
+
}
|
|
45
|
+
export interface MonthHeaderProps {
|
|
46
|
+
/** The first day of the month shown. */
|
|
47
|
+
month: ISODate;
|
|
48
|
+
locale?: string;
|
|
49
|
+
slide?: "next" | "previous";
|
|
50
|
+
/** The previous-month button, or null for an empty space of the same size. */
|
|
51
|
+
previous: MonthNavButton | null;
|
|
52
|
+
/** The next-month button, or null for an empty space of the same size. */
|
|
53
|
+
next: MonthNavButton | null;
|
|
54
|
+
}
|
|
55
|
+
/** The month's name between the previous- and next-month buttons. */
|
|
56
|
+
export declare function MonthHeader({ month, locale, slide, previous, next }: MonthHeaderProps): import("react").JSX.Element;
|
|
57
|
+
export interface MonthGridProps {
|
|
58
|
+
/** The first day of the month shown. */
|
|
59
|
+
month: ISODate;
|
|
60
|
+
/** The day that takes Tab focus (roving tabindex). */
|
|
61
|
+
focused: ISODate;
|
|
62
|
+
today: ISODate;
|
|
63
|
+
locale?: string;
|
|
64
|
+
weekStartsOn: 0 | 1;
|
|
65
|
+
slide?: "next" | "previous";
|
|
66
|
+
/** Leaves the days of the months either side empty, for months shown side by side. */
|
|
67
|
+
hideOutsideDays?: boolean;
|
|
68
|
+
isDisabled(date: ISODate): boolean;
|
|
69
|
+
/** aria-selected on the day's cell. */
|
|
70
|
+
isSelected(date: ISODate): boolean;
|
|
71
|
+
/** Fills the day with the primary colour. */
|
|
72
|
+
isFilled(date: ISODate): boolean;
|
|
73
|
+
/** Extra classes for a day's cell; `column` is 0 to 6 across the week. */
|
|
74
|
+
cellClassName?(date: ISODate, column: number): string | undefined;
|
|
75
|
+
/** Extra classes for a day's button. */
|
|
76
|
+
dayClassName?(date: ISODate): string | undefined;
|
|
77
|
+
/** Extra attributes for a day's button. */
|
|
78
|
+
dayProps?(date: ISODate): {
|
|
79
|
+
"aria-describedby"?: string;
|
|
80
|
+
};
|
|
81
|
+
onChoose(date: ISODate): void;
|
|
82
|
+
onDayKeyDown(event: KeyboardEvent<HTMLButtonElement>, date: ISODate): void;
|
|
83
|
+
onDayFocus(date: ISODate): void;
|
|
84
|
+
onDayPointerEnter?(date: ISODate): void;
|
|
85
|
+
gridRef?: Ref<HTMLTableElement>;
|
|
86
|
+
}
|
|
87
|
+
/** One month as a grid of day buttons: six weeks, weekday names above, each day read out in full. */
|
|
88
|
+
export declare function MonthGrid({ month, focused, today, locale, weekStartsOn, slide, hideOutsideDays, isDisabled, isSelected, isFilled, cellClassName, dayClassName, dayProps, onChoose, onDayKeyDown, onDayFocus, onDayPointerEnter, gridRef, }: MonthGridProps): import("react").JSX.Element;
|
|
89
|
+
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type KeyboardEvent, type Ref } from "react";
|
|
1
2
|
import { type ISODate } from "./dates.js";
|
|
2
3
|
export interface CalendarProps {
|
|
3
4
|
/** The chosen date as "YYYY-MM-DD", or "" for none. */
|
|
@@ -29,3 +30,60 @@ export interface CalendarHandle {
|
|
|
29
30
|
* (with Shift, by year), Home and End to the week's ends. Today is marked with a brass dot.
|
|
30
31
|
*/
|
|
31
32
|
export declare const Calendar: import("react").ForwardRefExoticComponent<CalendarProps & import("react").RefAttributes<CalendarHandle>>;
|
|
33
|
+
/** Whether the month before `first` has a day on or after `min`. */
|
|
34
|
+
export declare function canShowBefore(first: ISODate, min: ISODate | undefined): boolean;
|
|
35
|
+
/** Whether the month after `last` (the first of the last month shown) has a day on or before `max`. */
|
|
36
|
+
export declare function canShowAfter(last: ISODate, max: ISODate | undefined): boolean;
|
|
37
|
+
/** Where a key moves the focus from `date`: a day, a week, the week's ends, a month (with Shift, a year). */
|
|
38
|
+
export declare function dateForKey(event: KeyboardEvent<HTMLElement>, date: ISODate, weekStartsOn: 0 | 1): ISODate | undefined;
|
|
39
|
+
/** Which way the month changed since the last render, so the new one slides in from that side. */
|
|
40
|
+
export declare function useSlide(month: number): "next" | "previous" | undefined;
|
|
41
|
+
interface MonthNavButton {
|
|
42
|
+
disabled: boolean;
|
|
43
|
+
onClick(): void;
|
|
44
|
+
}
|
|
45
|
+
export interface MonthHeaderProps {
|
|
46
|
+
/** The first day of the month shown. */
|
|
47
|
+
month: ISODate;
|
|
48
|
+
locale?: string;
|
|
49
|
+
slide?: "next" | "previous";
|
|
50
|
+
/** The previous-month button, or null for an empty space of the same size. */
|
|
51
|
+
previous: MonthNavButton | null;
|
|
52
|
+
/** The next-month button, or null for an empty space of the same size. */
|
|
53
|
+
next: MonthNavButton | null;
|
|
54
|
+
}
|
|
55
|
+
/** The month's name between the previous- and next-month buttons. */
|
|
56
|
+
export declare function MonthHeader({ month, locale, slide, previous, next }: MonthHeaderProps): import("react").JSX.Element;
|
|
57
|
+
export interface MonthGridProps {
|
|
58
|
+
/** The first day of the month shown. */
|
|
59
|
+
month: ISODate;
|
|
60
|
+
/** The day that takes Tab focus (roving tabindex). */
|
|
61
|
+
focused: ISODate;
|
|
62
|
+
today: ISODate;
|
|
63
|
+
locale?: string;
|
|
64
|
+
weekStartsOn: 0 | 1;
|
|
65
|
+
slide?: "next" | "previous";
|
|
66
|
+
/** Leaves the days of the months either side empty, for months shown side by side. */
|
|
67
|
+
hideOutsideDays?: boolean;
|
|
68
|
+
isDisabled(date: ISODate): boolean;
|
|
69
|
+
/** aria-selected on the day's cell. */
|
|
70
|
+
isSelected(date: ISODate): boolean;
|
|
71
|
+
/** Fills the day with the primary colour. */
|
|
72
|
+
isFilled(date: ISODate): boolean;
|
|
73
|
+
/** Extra classes for a day's cell; `column` is 0 to 6 across the week. */
|
|
74
|
+
cellClassName?(date: ISODate, column: number): string | undefined;
|
|
75
|
+
/** Extra classes for a day's button. */
|
|
76
|
+
dayClassName?(date: ISODate): string | undefined;
|
|
77
|
+
/** Extra attributes for a day's button. */
|
|
78
|
+
dayProps?(date: ISODate): {
|
|
79
|
+
"aria-describedby"?: string;
|
|
80
|
+
};
|
|
81
|
+
onChoose(date: ISODate): void;
|
|
82
|
+
onDayKeyDown(event: KeyboardEvent<HTMLButtonElement>, date: ISODate): void;
|
|
83
|
+
onDayFocus(date: ISODate): void;
|
|
84
|
+
onDayPointerEnter?(date: ISODate): void;
|
|
85
|
+
gridRef?: Ref<HTMLTableElement>;
|
|
86
|
+
}
|
|
87
|
+
/** One month as a grid of day buttons: six weeks, weekday names above, each day read out in full. */
|
|
88
|
+
export declare function MonthGrid({ month, focused, today, locale, weekStartsOn, slide, hideOutsideDays, isDisabled, isSelected, isFilled, cellClassName, dayClassName, dayProps, onChoose, onDayKeyDown, onDayFocus, onDayPointerEnter, gridRef, }: MonthGridProps): import("react").JSX.Element;
|
|
89
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { type DateRange, type RangeCalendarProps } from "./RangeCalendar.cjs";
|
|
2
|
+
/** A named range to pick in one go, such as "Last 7 days". */
|
|
3
|
+
export interface DateRangePreset {
|
|
4
|
+
/** What the list shows, in sentence case. */
|
|
5
|
+
label: string;
|
|
6
|
+
range: DateRange;
|
|
7
|
+
}
|
|
8
|
+
export interface DateRangePickerProps extends Omit<RangeCalendarProps, "autoFocus" | "className" | "visibleMonths"> {
|
|
9
|
+
/** Ranges to pick in one go, listed beside the calendar: "Last 7 days", "This month". */
|
|
10
|
+
presets?: DateRangePreset[];
|
|
11
|
+
/** How many months the calendar shows side by side. Phones always get one.
|
|
12
|
+
* @default 2 */
|
|
13
|
+
visibleMonths?: 1 | 2;
|
|
14
|
+
/** Shown when no range is chosen.
|
|
15
|
+
* @default "Pick dates" */
|
|
16
|
+
placeholder?: string;
|
|
17
|
+
/** How each date is written in the field; dates the two ends share are written once, as in "3 – 9 Oct 2026".
|
|
18
|
+
* @default { dateStyle: "medium" } */
|
|
19
|
+
formatOptions?: Intl.DateTimeFormatOptions;
|
|
20
|
+
/** md is 40px tall, sm 32px.
|
|
21
|
+
* @default "md" */
|
|
22
|
+
size?: "sm" | "md";
|
|
23
|
+
/** @default false */
|
|
24
|
+
isInvalid?: boolean;
|
|
25
|
+
/** @default false */
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
/** For the field's button, so a label can point at it. */
|
|
28
|
+
id?: string;
|
|
29
|
+
"aria-label"?: string;
|
|
30
|
+
"aria-labelledby"?: string;
|
|
31
|
+
"aria-describedby"?: string;
|
|
32
|
+
/** Classes for the field, e.g. a width. */
|
|
33
|
+
className?: string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* A field that opens a two-month RangeCalendar, with optional presets beside it. Picking the second day, or a preset,
|
|
37
|
+
* closes it; Escape closes it without changing anything. Once there's a range, a clear button empties it.
|
|
38
|
+
*/
|
|
39
|
+
export declare const DateRangePicker: import("react").ForwardRefExoticComponent<DateRangePickerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { type DateRange, type RangeCalendarProps } from "./RangeCalendar.js";
|
|
2
|
+
/** A named range to pick in one go, such as "Last 7 days". */
|
|
3
|
+
export interface DateRangePreset {
|
|
4
|
+
/** What the list shows, in sentence case. */
|
|
5
|
+
label: string;
|
|
6
|
+
range: DateRange;
|
|
7
|
+
}
|
|
8
|
+
export interface DateRangePickerProps extends Omit<RangeCalendarProps, "autoFocus" | "className" | "visibleMonths"> {
|
|
9
|
+
/** Ranges to pick in one go, listed beside the calendar: "Last 7 days", "This month". */
|
|
10
|
+
presets?: DateRangePreset[];
|
|
11
|
+
/** How many months the calendar shows side by side. Phones always get one.
|
|
12
|
+
* @default 2 */
|
|
13
|
+
visibleMonths?: 1 | 2;
|
|
14
|
+
/** Shown when no range is chosen.
|
|
15
|
+
* @default "Pick dates" */
|
|
16
|
+
placeholder?: string;
|
|
17
|
+
/** How each date is written in the field; dates the two ends share are written once, as in "3 – 9 Oct 2026".
|
|
18
|
+
* @default { dateStyle: "medium" } */
|
|
19
|
+
formatOptions?: Intl.DateTimeFormatOptions;
|
|
20
|
+
/** md is 40px tall, sm 32px.
|
|
21
|
+
* @default "md" */
|
|
22
|
+
size?: "sm" | "md";
|
|
23
|
+
/** @default false */
|
|
24
|
+
isInvalid?: boolean;
|
|
25
|
+
/** @default false */
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
/** For the field's button, so a label can point at it. */
|
|
28
|
+
id?: string;
|
|
29
|
+
"aria-label"?: string;
|
|
30
|
+
"aria-labelledby"?: string;
|
|
31
|
+
"aria-describedby"?: string;
|
|
32
|
+
/** Classes for the field, e.g. a width. */
|
|
33
|
+
className?: string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* A field that opens a two-month RangeCalendar, with optional presets beside it. Picking the second day, or a preset,
|
|
37
|
+
* closes it; Escape closes it without changing anything. Once there's a range, a clear button empties it.
|
|
38
|
+
*/
|
|
39
|
+
export declare const DateRangePicker: import("react").ForwardRefExoticComponent<DateRangePickerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { type CalendarHandle } from "./Calendar.cjs";
|
|
2
|
+
import { type ISODate } from "./dates.cjs";
|
|
3
|
+
/** A range of days, both ends included, as "YYYY-MM-DD". */
|
|
4
|
+
export interface DateRange {
|
|
5
|
+
start: ISODate;
|
|
6
|
+
end: ISODate;
|
|
7
|
+
}
|
|
8
|
+
export interface RangeCalendarProps {
|
|
9
|
+
/** The chosen range, or null for none. */
|
|
10
|
+
value?: DateRange | null;
|
|
11
|
+
/** @default null */
|
|
12
|
+
defaultValue?: DateRange | null;
|
|
13
|
+
/** Called once both ends are picked, with the earlier day as the start. */
|
|
14
|
+
onChange?(range: DateRange | null): void;
|
|
15
|
+
/** The earliest day either end can be, "YYYY-MM-DD". */
|
|
16
|
+
min?: ISODate;
|
|
17
|
+
/** The latest day either end can be. */
|
|
18
|
+
max?: ISODate;
|
|
19
|
+
/** Return true for days that can't be an end of the range, such as weekends. A range can still run across them. */
|
|
20
|
+
isDateDisabled?(date: ISODate): boolean;
|
|
21
|
+
/** Month and day names follow this locale, e.g. "en-IE", "de-CH". Defaults to the browser's. */
|
|
22
|
+
locale?: string;
|
|
23
|
+
/** 1 starts weeks on Monday, 0 on Sunday.
|
|
24
|
+
* @default 1 */
|
|
25
|
+
weekStartsOn?: 0 | 1;
|
|
26
|
+
/** How many months show side by side. Two stack when there isn't room for both.
|
|
27
|
+
* @default 1 */
|
|
28
|
+
visibleMonths?: 1 | 2;
|
|
29
|
+
/** Focus the range's start (or today) on mount, for use in a popover.
|
|
30
|
+
* @default false */
|
|
31
|
+
autoFocus?: boolean;
|
|
32
|
+
className?: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Month grids for picking a range of days. The first pick sets the start and the range follows the pointer or the
|
|
36
|
+
* focus until the second pick sets the end; Escape drops a half-picked range. The keys move as in Calendar.
|
|
37
|
+
*/
|
|
38
|
+
export declare const RangeCalendar: import("react").ForwardRefExoticComponent<RangeCalendarProps & import("react").RefAttributes<CalendarHandle>>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { type CalendarHandle } from "./Calendar.js";
|
|
2
|
+
import { type ISODate } from "./dates.js";
|
|
3
|
+
/** A range of days, both ends included, as "YYYY-MM-DD". */
|
|
4
|
+
export interface DateRange {
|
|
5
|
+
start: ISODate;
|
|
6
|
+
end: ISODate;
|
|
7
|
+
}
|
|
8
|
+
export interface RangeCalendarProps {
|
|
9
|
+
/** The chosen range, or null for none. */
|
|
10
|
+
value?: DateRange | null;
|
|
11
|
+
/** @default null */
|
|
12
|
+
defaultValue?: DateRange | null;
|
|
13
|
+
/** Called once both ends are picked, with the earlier day as the start. */
|
|
14
|
+
onChange?(range: DateRange | null): void;
|
|
15
|
+
/** The earliest day either end can be, "YYYY-MM-DD". */
|
|
16
|
+
min?: ISODate;
|
|
17
|
+
/** The latest day either end can be. */
|
|
18
|
+
max?: ISODate;
|
|
19
|
+
/** Return true for days that can't be an end of the range, such as weekends. A range can still run across them. */
|
|
20
|
+
isDateDisabled?(date: ISODate): boolean;
|
|
21
|
+
/** Month and day names follow this locale, e.g. "en-IE", "de-CH". Defaults to the browser's. */
|
|
22
|
+
locale?: string;
|
|
23
|
+
/** 1 starts weeks on Monday, 0 on Sunday.
|
|
24
|
+
* @default 1 */
|
|
25
|
+
weekStartsOn?: 0 | 1;
|
|
26
|
+
/** How many months show side by side. Two stack when there isn't room for both.
|
|
27
|
+
* @default 1 */
|
|
28
|
+
visibleMonths?: 1 | 2;
|
|
29
|
+
/** Focus the range's start (or today) on mount, for use in a popover.
|
|
30
|
+
* @default false */
|
|
31
|
+
autoFocus?: boolean;
|
|
32
|
+
className?: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Month grids for picking a range of days. The first pick sets the start and the range follows the pointer or the
|
|
36
|
+
* focus until the second pick sets the end; Escape drops a half-picked range. The keys move as in Calendar.
|
|
37
|
+
*/
|
|
38
|
+
export declare const RangeCalendar: import("react").ForwardRefExoticComponent<RangeCalendarProps & import("react").RefAttributes<CalendarHandle>>;
|
|
@@ -13,3 +13,16 @@ export declare function addMonths(iso: ISODate, months: number): ISODate;
|
|
|
13
13
|
export declare function weekday(iso: ISODate): number;
|
|
14
14
|
export declare function toDate(iso: ISODate): Date;
|
|
15
15
|
export declare function formatDate(iso: ISODate, locale: string | undefined, options: Intl.DateTimeFormatOptions): string;
|
|
16
|
+
/**
|
|
17
|
+
* Two dates as one range in the locale, sharing what they have in common: "3 – 9 Oct 2026", "28 Sept – 4 Oct 2026".
|
|
18
|
+
* The same day twice is written once.
|
|
19
|
+
*/
|
|
20
|
+
export declare function formatDateRange(start: ISODate, end: ISODate, locale: string | undefined, options: Intl.DateTimeFormatOptions): string;
|
|
21
|
+
/** Keeps a date between min and max, when they're given. */
|
|
22
|
+
export declare function clampDate(date: ISODate, min: ISODate | undefined, max: ISODate | undefined): ISODate;
|
|
23
|
+
/** The first day of the month a date falls in. */
|
|
24
|
+
export declare function startOfMonth(iso: ISODate): ISODate;
|
|
25
|
+
/** Months counted from year 0, so two months can be compared and subtracted. */
|
|
26
|
+
export declare function monthIndex(iso: ISODate): number;
|
|
27
|
+
/** The six weeks a month grid shows for the month starting on `first`, each starting on `weekStartsOn`. */
|
|
28
|
+
export declare function monthWeeks(first: ISODate, weekStartsOn: 0 | 1): ISODate[][];
|
|
@@ -13,3 +13,16 @@ export declare function addMonths(iso: ISODate, months: number): ISODate;
|
|
|
13
13
|
export declare function weekday(iso: ISODate): number;
|
|
14
14
|
export declare function toDate(iso: ISODate): Date;
|
|
15
15
|
export declare function formatDate(iso: ISODate, locale: string | undefined, options: Intl.DateTimeFormatOptions): string;
|
|
16
|
+
/**
|
|
17
|
+
* Two dates as one range in the locale, sharing what they have in common: "3 – 9 Oct 2026", "28 Sept – 4 Oct 2026".
|
|
18
|
+
* The same day twice is written once.
|
|
19
|
+
*/
|
|
20
|
+
export declare function formatDateRange(start: ISODate, end: ISODate, locale: string | undefined, options: Intl.DateTimeFormatOptions): string;
|
|
21
|
+
/** Keeps a date between min and max, when they're given. */
|
|
22
|
+
export declare function clampDate(date: ISODate, min: ISODate | undefined, max: ISODate | undefined): ISODate;
|
|
23
|
+
/** The first day of the month a date falls in. */
|
|
24
|
+
export declare function startOfMonth(iso: ISODate): ISODate;
|
|
25
|
+
/** Months counted from year 0, so two months can be compared and subtracted. */
|
|
26
|
+
export declare function monthIndex(iso: ISODate): number;
|
|
27
|
+
/** The six weeks a month grid shows for the month starting on `first`, each starting on `weekStartsOn`. */
|
|
28
|
+
export declare function monthWeeks(first: ISODate, weekStartsOn: 0 | 1): ISODate[][];
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export interface ColorAreaProps {
|
|
2
|
+
/** The colour as hex, "#0d9488". Given with alpha ("#0d9488cc"), it keeps the alpha. */
|
|
3
|
+
value?: string;
|
|
4
|
+
/** The starting colour when uncontrolled.
|
|
5
|
+
* @default "#312c7e" */
|
|
6
|
+
defaultValue?: string;
|
|
7
|
+
/** Called with a lowercase hex as the person drags or presses the arrow keys. */
|
|
8
|
+
onChange?(color: string): void;
|
|
9
|
+
/** Called when the person lets go or releases the key, for work too slow to do on every move. */
|
|
10
|
+
onChangeEnd?(color: string): void;
|
|
11
|
+
/** The hue to show while the colour is a grey, which has none of its own. Pass a hue ColorSlider's `onHueChange`
|
|
12
|
+
* value here to keep the two in step on greys. Without it, the area keeps the last hue it had. */
|
|
13
|
+
hue?: number;
|
|
14
|
+
/** Pixels, or any CSS width. It never grows past its container.
|
|
15
|
+
* @default 232 */
|
|
16
|
+
width?: number | string;
|
|
17
|
+
/** Pixels, or any CSS height.
|
|
18
|
+
* @default 152 */
|
|
19
|
+
height?: number | string;
|
|
20
|
+
/** Fades it; the pointer and the keys do nothing.
|
|
21
|
+
* @default false */
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
/** The locale for the percentages screen readers hear. Defaults to the browser's. */
|
|
24
|
+
locale?: string;
|
|
25
|
+
/** The form field name; the hex is submitted under it. */
|
|
26
|
+
name?: string;
|
|
27
|
+
/** Names the area for screen readers; its two sliders are "Saturation" and "Brightness" within it.
|
|
28
|
+
* @default "Colour" */
|
|
29
|
+
"aria-label"?: string;
|
|
30
|
+
/** Names the area by a visible label's id, in place of aria-label. */
|
|
31
|
+
"aria-labelledby"?: string;
|
|
32
|
+
/** Ids of a hint or an error, read out after each slider's value. */
|
|
33
|
+
"aria-describedby"?: string;
|
|
34
|
+
/** The group's id. */
|
|
35
|
+
id?: string;
|
|
36
|
+
/** Classes for the area, e.g. a size. */
|
|
37
|
+
className?: string;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* A square of one hue: saturation across, brightness up and down. Drag the thumb, or use the arrow keys.
|
|
41
|
+
* To screen readers it's two sliders, saturation and brightness, each reading out the colour.
|
|
42
|
+
* The ref is the saturation slider's input, for focusing it.
|
|
43
|
+
*/
|
|
44
|
+
export declare const ColorArea: import("react").ForwardRefExoticComponent<ColorAreaProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export interface ColorAreaProps {
|
|
2
|
+
/** The colour as hex, "#0d9488". Given with alpha ("#0d9488cc"), it keeps the alpha. */
|
|
3
|
+
value?: string;
|
|
4
|
+
/** The starting colour when uncontrolled.
|
|
5
|
+
* @default "#312c7e" */
|
|
6
|
+
defaultValue?: string;
|
|
7
|
+
/** Called with a lowercase hex as the person drags or presses the arrow keys. */
|
|
8
|
+
onChange?(color: string): void;
|
|
9
|
+
/** Called when the person lets go or releases the key, for work too slow to do on every move. */
|
|
10
|
+
onChangeEnd?(color: string): void;
|
|
11
|
+
/** The hue to show while the colour is a grey, which has none of its own. Pass a hue ColorSlider's `onHueChange`
|
|
12
|
+
* value here to keep the two in step on greys. Without it, the area keeps the last hue it had. */
|
|
13
|
+
hue?: number;
|
|
14
|
+
/** Pixels, or any CSS width. It never grows past its container.
|
|
15
|
+
* @default 232 */
|
|
16
|
+
width?: number | string;
|
|
17
|
+
/** Pixels, or any CSS height.
|
|
18
|
+
* @default 152 */
|
|
19
|
+
height?: number | string;
|
|
20
|
+
/** Fades it; the pointer and the keys do nothing.
|
|
21
|
+
* @default false */
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
/** The locale for the percentages screen readers hear. Defaults to the browser's. */
|
|
24
|
+
locale?: string;
|
|
25
|
+
/** The form field name; the hex is submitted under it. */
|
|
26
|
+
name?: string;
|
|
27
|
+
/** Names the area for screen readers; its two sliders are "Saturation" and "Brightness" within it.
|
|
28
|
+
* @default "Colour" */
|
|
29
|
+
"aria-label"?: string;
|
|
30
|
+
/** Names the area by a visible label's id, in place of aria-label. */
|
|
31
|
+
"aria-labelledby"?: string;
|
|
32
|
+
/** Ids of a hint or an error, read out after each slider's value. */
|
|
33
|
+
"aria-describedby"?: string;
|
|
34
|
+
/** The group's id. */
|
|
35
|
+
id?: string;
|
|
36
|
+
/** Classes for the area, e.g. a size. */
|
|
37
|
+
className?: string;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* A square of one hue: saturation across, brightness up and down. Drag the thumb, or use the arrow keys.
|
|
41
|
+
* To screen readers it's two sliders, saturation and brightness, each reading out the colour.
|
|
42
|
+
* The ref is the saturation slider's input, for focusing it.
|
|
43
|
+
*/
|
|
44
|
+
export declare const ColorArea: import("react").ForwardRefExoticComponent<ColorAreaProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
/** A channel a ColorSlider changes: HSL's hue, saturation or lightness, the alpha, or red, green or blue. */
|
|
3
|
+
export type ColorChannel = "hue" | "saturation" | "lightness" | "alpha" | "red" | "green" | "blue";
|
|
4
|
+
export interface ColorSliderProps {
|
|
5
|
+
/** The channel it changes. Saturation and lightness are HSL's; the track shows the channel's range for the current colour. */
|
|
6
|
+
channel: ColorChannel;
|
|
7
|
+
/** The colour as hex. The alpha channel takes and returns "#rrggbbaa"; the others keep any alpha they're given. */
|
|
8
|
+
value?: string;
|
|
9
|
+
/** The starting colour when uncontrolled.
|
|
10
|
+
* @default "#312c7e" */
|
|
11
|
+
defaultValue?: string;
|
|
12
|
+
/** Called with a lowercase hex as the person drags or presses the arrow keys. */
|
|
13
|
+
onChange?(color: string): void;
|
|
14
|
+
/** Called when the person lets go or releases the key, for work too slow to do on every move. */
|
|
15
|
+
onChangeEnd?(color: string): void;
|
|
16
|
+
/** The hue to show while the colour is a grey, which has none of its own. Without it, the slider keeps the last hue it had. */
|
|
17
|
+
hue?: number;
|
|
18
|
+
/** Called with the hue as a hue slider moves, including over a grey, whose hex doesn't change. Pass it on to a
|
|
19
|
+
* ColorArea's `hue` to keep the two in step. */
|
|
20
|
+
onHueChange?(hue: number): void;
|
|
21
|
+
/** Shown above the track, and names the slider for screen readers. */
|
|
22
|
+
label?: ReactNode;
|
|
23
|
+
/** Shows the channel's value (174°, 72%, or 0 to 255 for red, green and blue) at the right of the label.
|
|
24
|
+
* Defaults to true when there's a label. */
|
|
25
|
+
showValue?: boolean;
|
|
26
|
+
/** A vertical slider is 152px tall, a ColorArea's height; set another with CSS.
|
|
27
|
+
* @default "horizontal" */
|
|
28
|
+
orientation?: "horizontal" | "vertical";
|
|
29
|
+
/** Fades it; the pointer and the keys do nothing.
|
|
30
|
+
* @default false */
|
|
31
|
+
disabled?: boolean;
|
|
32
|
+
/** The locale for the value shown and read out. Defaults to the browser's. */
|
|
33
|
+
locale?: string;
|
|
34
|
+
/** The form field name; the hex is submitted under it. */
|
|
35
|
+
name?: string;
|
|
36
|
+
/** Names the slider when there's no label. Defaults to the channel's name ("Hue", "Opacity"), unless aria-labelledby
|
|
37
|
+
* or a Field names it. */
|
|
38
|
+
"aria-label"?: string;
|
|
39
|
+
/** Names the slider by a visible label's id. */
|
|
40
|
+
"aria-labelledby"?: string;
|
|
41
|
+
/** Ids of a hint or an error, read out after the value; a Field sets it. */
|
|
42
|
+
"aria-describedby"?: string;
|
|
43
|
+
/** The input's id; a Field sets it so its label names the slider. */
|
|
44
|
+
id?: string;
|
|
45
|
+
/** Classes for the slider's outer element, e.g. a height for a vertical one. */
|
|
46
|
+
className?: string;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Changes one channel of a colour by dragging, over a track that shows that channel's range: a hue slider, an
|
|
50
|
+
* opacity slider over a checkerboard, or red, green and blue. It works with the keyboard like Slider.
|
|
51
|
+
* The ref is its input, for focusing it.
|
|
52
|
+
*/
|
|
53
|
+
export declare const ColorSlider: import("react").ForwardRefExoticComponent<ColorSliderProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
/** A channel a ColorSlider changes: HSL's hue, saturation or lightness, the alpha, or red, green or blue. */
|
|
3
|
+
export type ColorChannel = "hue" | "saturation" | "lightness" | "alpha" | "red" | "green" | "blue";
|
|
4
|
+
export interface ColorSliderProps {
|
|
5
|
+
/** The channel it changes. Saturation and lightness are HSL's; the track shows the channel's range for the current colour. */
|
|
6
|
+
channel: ColorChannel;
|
|
7
|
+
/** The colour as hex. The alpha channel takes and returns "#rrggbbaa"; the others keep any alpha they're given. */
|
|
8
|
+
value?: string;
|
|
9
|
+
/** The starting colour when uncontrolled.
|
|
10
|
+
* @default "#312c7e" */
|
|
11
|
+
defaultValue?: string;
|
|
12
|
+
/** Called with a lowercase hex as the person drags or presses the arrow keys. */
|
|
13
|
+
onChange?(color: string): void;
|
|
14
|
+
/** Called when the person lets go or releases the key, for work too slow to do on every move. */
|
|
15
|
+
onChangeEnd?(color: string): void;
|
|
16
|
+
/** The hue to show while the colour is a grey, which has none of its own. Without it, the slider keeps the last hue it had. */
|
|
17
|
+
hue?: number;
|
|
18
|
+
/** Called with the hue as a hue slider moves, including over a grey, whose hex doesn't change. Pass it on to a
|
|
19
|
+
* ColorArea's `hue` to keep the two in step. */
|
|
20
|
+
onHueChange?(hue: number): void;
|
|
21
|
+
/** Shown above the track, and names the slider for screen readers. */
|
|
22
|
+
label?: ReactNode;
|
|
23
|
+
/** Shows the channel's value (174°, 72%, or 0 to 255 for red, green and blue) at the right of the label.
|
|
24
|
+
* Defaults to true when there's a label. */
|
|
25
|
+
showValue?: boolean;
|
|
26
|
+
/** A vertical slider is 152px tall, a ColorArea's height; set another with CSS.
|
|
27
|
+
* @default "horizontal" */
|
|
28
|
+
orientation?: "horizontal" | "vertical";
|
|
29
|
+
/** Fades it; the pointer and the keys do nothing.
|
|
30
|
+
* @default false */
|
|
31
|
+
disabled?: boolean;
|
|
32
|
+
/** The locale for the value shown and read out. Defaults to the browser's. */
|
|
33
|
+
locale?: string;
|
|
34
|
+
/** The form field name; the hex is submitted under it. */
|
|
35
|
+
name?: string;
|
|
36
|
+
/** Names the slider when there's no label. Defaults to the channel's name ("Hue", "Opacity"), unless aria-labelledby
|
|
37
|
+
* or a Field names it. */
|
|
38
|
+
"aria-label"?: string;
|
|
39
|
+
/** Names the slider by a visible label's id. */
|
|
40
|
+
"aria-labelledby"?: string;
|
|
41
|
+
/** Ids of a hint or an error, read out after the value; a Field sets it. */
|
|
42
|
+
"aria-describedby"?: string;
|
|
43
|
+
/** The input's id; a Field sets it so its label names the slider. */
|
|
44
|
+
id?: string;
|
|
45
|
+
/** Classes for the slider's outer element, e.g. a height for a vertical one. */
|
|
46
|
+
className?: string;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Changes one channel of a colour by dragging, over a track that shows that channel's range: a hue slider, an
|
|
50
|
+
* opacity slider over a checkerboard, or red, green and blue. It works with the keyboard like Slider.
|
|
51
|
+
* The ref is its input, for focusing it.
|
|
52
|
+
*/
|
|
53
|
+
export declare const ColorSlider: import("react").ForwardRefExoticComponent<ColorSliderProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export interface ColorSwatchPickerOption {
|
|
2
|
+
/** A hex colour: "#312c7e". */
|
|
3
|
+
value: string;
|
|
4
|
+
/** The colour's name, read out and shown on hover: "Midnight". Defaults to a description, like "dark indigo". */
|
|
5
|
+
label?: string;
|
|
6
|
+
/** Shown faded and skipped by the arrow keys, e.g. a colour another label has taken. */
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface ColorSwatchPickerProps {
|
|
10
|
+
/** The colours to choose from: hex strings, or { value, label } to give them names. */
|
|
11
|
+
options: Array<string | ColorSwatchPickerOption>;
|
|
12
|
+
/** The chosen colour. It matches an option whatever its case or length (#abc, #aabbcc). */
|
|
13
|
+
value?: string;
|
|
14
|
+
/** The starting colour when uncontrolled. Defaults to none. */
|
|
15
|
+
defaultValue?: string;
|
|
16
|
+
/** Called with the chosen option's value, as written in `options`. */
|
|
17
|
+
onChange?(color: string): void;
|
|
18
|
+
/** sm 24px, md 32px swatches.
|
|
19
|
+
* @default "md" */
|
|
20
|
+
size?: "sm" | "md";
|
|
21
|
+
/** @default "square" */
|
|
22
|
+
shape?: "square" | "circle";
|
|
23
|
+
/** Fades every swatch and takes the picker out of the tab order.
|
|
24
|
+
* @default false */
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
/** The form field name; the chosen colour is submitted under it. */
|
|
27
|
+
name?: string;
|
|
28
|
+
/** Names the group for screen readers, e.g. "Label colour". */
|
|
29
|
+
"aria-label"?: string;
|
|
30
|
+
/** Names the group by a visible heading's id, in place of aria-label. */
|
|
31
|
+
"aria-labelledby"?: string;
|
|
32
|
+
/** Ids of a hint or an error, read out with the group. */
|
|
33
|
+
"aria-describedby"?: string;
|
|
34
|
+
/** The group's id. */
|
|
35
|
+
id?: string;
|
|
36
|
+
/** Classes for the group, e.g. a width that sets where the rows wrap. */
|
|
37
|
+
className?: string;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Picks one colour from a set of swatches, in rows that wrap. It's a radio group: Tab moves into it, onto the chosen
|
|
41
|
+
* swatch, and the arrow keys move and choose. The chosen swatch has a ring and a check mark.
|
|
42
|
+
*/
|
|
43
|
+
export declare const ColorSwatchPicker: import("react").ForwardRefExoticComponent<ColorSwatchPickerProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export interface ColorSwatchPickerOption {
|
|
2
|
+
/** A hex colour: "#312c7e". */
|
|
3
|
+
value: string;
|
|
4
|
+
/** The colour's name, read out and shown on hover: "Midnight". Defaults to a description, like "dark indigo". */
|
|
5
|
+
label?: string;
|
|
6
|
+
/** Shown faded and skipped by the arrow keys, e.g. a colour another label has taken. */
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface ColorSwatchPickerProps {
|
|
10
|
+
/** The colours to choose from: hex strings, or { value, label } to give them names. */
|
|
11
|
+
options: Array<string | ColorSwatchPickerOption>;
|
|
12
|
+
/** The chosen colour. It matches an option whatever its case or length (#abc, #aabbcc). */
|
|
13
|
+
value?: string;
|
|
14
|
+
/** The starting colour when uncontrolled. Defaults to none. */
|
|
15
|
+
defaultValue?: string;
|
|
16
|
+
/** Called with the chosen option's value, as written in `options`. */
|
|
17
|
+
onChange?(color: string): void;
|
|
18
|
+
/** sm 24px, md 32px swatches.
|
|
19
|
+
* @default "md" */
|
|
20
|
+
size?: "sm" | "md";
|
|
21
|
+
/** @default "square" */
|
|
22
|
+
shape?: "square" | "circle";
|
|
23
|
+
/** Fades every swatch and takes the picker out of the tab order.
|
|
24
|
+
* @default false */
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
/** The form field name; the chosen colour is submitted under it. */
|
|
27
|
+
name?: string;
|
|
28
|
+
/** Names the group for screen readers, e.g. "Label colour". */
|
|
29
|
+
"aria-label"?: string;
|
|
30
|
+
/** Names the group by a visible heading's id, in place of aria-label. */
|
|
31
|
+
"aria-labelledby"?: string;
|
|
32
|
+
/** Ids of a hint or an error, read out with the group. */
|
|
33
|
+
"aria-describedby"?: string;
|
|
34
|
+
/** The group's id. */
|
|
35
|
+
id?: string;
|
|
36
|
+
/** Classes for the group, e.g. a width that sets where the rows wrap. */
|
|
37
|
+
className?: string;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Picks one colour from a set of swatches, in rows that wrap. It's a radio group: Tab moves into it, onto the chosen
|
|
41
|
+
* swatch, and the arrow keys move and choose. The chosen swatch has a ring and a check mark.
|
|
42
|
+
*/
|
|
43
|
+
export declare const ColorSwatchPicker: import("react").ForwardRefExoticComponent<ColorSwatchPickerProps & import("react").RefAttributes<HTMLDivElement>>;
|