@openwarelabs/ui 0.14.1 → 0.16.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 +5 -5
- package/dist/components/ActivityHeatmap/ActivityHeatmap.d.cts +8 -0
- package/dist/components/ActivityHeatmap/ActivityHeatmap.d.ts +8 -0
- package/dist/components/ActivityHeatmap/ActivityHeatmap.types.d.cts +73 -0
- package/dist/components/ActivityHeatmap/ActivityHeatmap.types.d.ts +73 -0
- package/dist/components/DiffViewer/DiffViewer.d.cts +8 -0
- package/dist/components/DiffViewer/DiffViewer.d.ts +8 -0
- package/dist/components/DiffViewer/DiffViewer.types.d.cts +131 -0
- package/dist/components/DiffViewer/DiffViewer.types.d.ts +131 -0
- package/dist/components/DiffViewer/diff.d.cts +10 -0
- package/dist/components/DiffViewer/diff.d.ts +10 -0
- package/dist/components/InlineEdit/InlineEdit.d.cts +8 -0
- package/dist/components/InlineEdit/InlineEdit.d.ts +8 -0
- package/dist/components/InlineEdit/InlineEdit.types.d.cts +74 -0
- package/dist/components/InlineEdit/InlineEdit.types.d.ts +74 -0
- package/dist/components/Markdown/Markdown.d.cts +8 -0
- package/dist/components/Markdown/Markdown.d.ts +8 -0
- package/dist/components/Markdown/Markdown.types.d.cts +59 -0
- package/dist/components/Markdown/Markdown.types.d.ts +59 -0
- package/dist/components/MediaPlayer/MediaPlayer.d.cts +8 -0
- package/dist/components/MediaPlayer/MediaPlayer.d.ts +8 -0
- package/dist/components/MediaPlayer/MediaPlayer.types.d.cts +109 -0
- package/dist/components/MediaPlayer/MediaPlayer.types.d.ts +109 -0
- package/dist/components/MentionInput/MentionInput.d.cts +9 -0
- package/dist/components/MentionInput/MentionInput.d.ts +9 -0
- package/dist/components/MentionInput/MentionInput.types.d.cts +125 -0
- package/dist/components/MentionInput/MentionInput.types.d.ts +125 -0
- package/dist/components/MentionInput/useMentions.d.cts +8 -0
- package/dist/components/MentionInput/useMentions.d.ts +8 -0
- package/dist/components/NavigationMenu/NavigationMenu.d.cts +14 -0
- package/dist/components/NavigationMenu/NavigationMenu.d.ts +14 -0
- package/dist/components/NavigationMenu/NavigationMenu.types.d.cts +84 -0
- package/dist/components/NavigationMenu/NavigationMenu.types.d.ts +84 -0
- package/dist/components/NotificationCenter/NotificationCenter.d.cts +12 -0
- package/dist/components/NotificationCenter/NotificationCenter.d.ts +12 -0
- package/dist/components/NotificationCenter/NotificationCenter.types.d.cts +129 -0
- package/dist/components/NotificationCenter/NotificationCenter.types.d.ts +129 -0
- package/dist/components/QRCode/QRCode.d.cts +18 -0
- package/dist/components/QRCode/QRCode.d.ts +18 -0
- package/dist/components/QRCode/QRCode.types.d.cts +53 -0
- package/dist/components/QRCode/QRCode.types.d.ts +53 -0
- package/dist/components/QRCode/qr.d.cts +8 -0
- package/dist/components/QRCode/qr.d.ts +8 -0
- package/dist/components/SignaturePad/SignaturePad.d.cts +8 -0
- package/dist/components/SignaturePad/SignaturePad.d.ts +8 -0
- package/dist/components/SignaturePad/SignaturePad.types.d.cts +102 -0
- package/dist/components/SignaturePad/SignaturePad.types.d.ts +102 -0
- package/dist/components/SortableList/SortableList.d.cts +7 -0
- package/dist/components/SortableList/SortableList.d.ts +7 -0
- package/dist/components/SortableList/SortableList.types.d.cts +82 -0
- package/dist/components/SortableList/SortableList.types.d.ts +82 -0
- package/dist/components/TransferList/TransferList.d.cts +7 -0
- package/dist/components/TransferList/TransferList.d.ts +7 -0
- package/dist/components/TransferList/TransferList.types.d.cts +75 -0
- package/dist/components/TransferList/TransferList.types.d.ts +75 -0
- package/dist/components/TreeView/TreeView.d.cts +8 -0
- package/dist/components/TreeView/TreeView.d.ts +8 -0
- package/dist/components/TreeView/TreeView.types.d.cts +88 -0
- package/dist/components/TreeView/TreeView.types.d.ts +88 -0
- package/dist/components/UploadList/UploadList.d.cts +9 -0
- package/dist/components/UploadList/UploadList.d.ts +9 -0
- package/dist/components/UploadList/UploadList.types.d.cts +113 -0
- package/dist/components/UploadList/UploadList.types.d.ts +113 -0
- package/dist/components/UploadList/useUploadQueue.d.cts +8 -0
- package/dist/components/UploadList/useUploadQueue.d.ts +8 -0
- package/dist/components/VirtualList/VirtualList.d.cts +9 -0
- package/dist/components/VirtualList/VirtualList.d.ts +9 -0
- package/dist/components/VirtualList/VirtualList.types.d.cts +80 -0
- package/dist/components/VirtualList/VirtualList.types.d.ts +80 -0
- package/dist/components/VirtualList/useVirtualizer.d.cts +60 -0
- package/dist/components/VirtualList/useVirtualizer.d.ts +60 -0
- package/dist/components.css +1840 -113
- package/dist/index.cjs +6770 -2144
- package/dist/index.cjs.map +4 -4
- package/dist/index.d.cts +32 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.js +6790 -2124
- package/dist/index.js.map +4 -4
- package/dist/openware-ui.iife.js +24 -8
- package/dist/styles.css +1840 -113
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -58,17 +58,17 @@ import { Button, Field, Input, Toaster, toast } from "@openwarelabs/ui";
|
|
|
58
58
|
|
|
59
59
|
| Group | Components |
|
|
60
60
|
| --- | --- |
|
|
61
|
-
| 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`, `Prose` (styles rendered Markdown or HTML, at chat or article size) |
|
|
61
|
+
| 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`, `Prose` (styles rendered Markdown or HTML, at chat or article size), `InlineEdit` (text you click to edit in place; Enter saves, Escape cancels, async saves) |
|
|
62
62
|
| 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) |
|
|
63
63
|
| 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), `TagInput` (several values as tags, typed or picked from suggestions), `PasswordInput` (show and hide, a strength meter, a checklist of rules; `passwordStrength()`) |
|
|
64
|
-
| Choices | `Checkbox`, `CheckboxGroup`, `RadioGroup` (plain or cards), `Switch`, `Select`, `Combobox`, `Slider` (one value or a range), `Rating` (pick a score or show one), `ChoiceCard`, `ListBox` (one or many, on the page) |
|
|
64
|
+
| Choices | `Checkbox`, `CheckboxGroup`, `RadioGroup` (plain or cards), `Switch`, `Select`, `Combobox`, `Slider` (one value or a range), `Rating` (pick a score or show one), `ChoiceCard`, `ListBox` (one or many, on the page), `TreeView` (rows that open, select or check, with children loaded on demand) |
|
|
65
65
|
| Pickers | `Calendar`, `DatePicker`, `RangeCalendar`, `DateRangePicker` (with presets), `ColorPicker`, `ColorArea`, `ColorSlider`, `ColorSwatchPicker`, `FileDropZone` |
|
|
66
66
|
| 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`, `Banner` (an announcement bar across the top, dismissible and remembered) |
|
|
67
|
-
| Overlays | `Dialog`, `ConfirmDialog`, `Drawer`, `Popover`, `HoverCard` (a preview when the pointer rests on a link), `Menu` + `MenuItem`, `CommandPalette`, `ContextMenu` (right-click, long press or Shift+F10, with the same items), `Tour` (steps that point at parts of the page, with an optional spotlight) + `Coachmark` |
|
|
67
|
+
| Overlays | `Dialog`, `ConfirmDialog`, `Drawer`, `Popover`, `HoverCard` (a preview when the pointer rests on a link), `Menu` + `MenuItem`, `CommandPalette`, `ContextMenu` (right-click, long press or Shift+F10, with the same items), `Tour` (steps that point at parts of the page, with an optional spotlight) + `Coachmark`, `NavigationMenu` + `NavigationMenuItem` + `NavigationMenuLink` (a site's top nav with dropdown panels and mega-menus) |
|
|
68
68
|
| Navigation | `Tabs`, `Accordion`, `Disclosure`, `Breadcrumbs`, `Pagination`, `Steps`, `NavList` + `NavItem` |
|
|
69
|
-
| Data display | `Table` (sorting, selection), `Stat`, `FileTree`, `EmptyState`, `Tag`, `ColorSwatch`, `Avatar`, `AvatarGroup`, `User`, `Image` (a placeholder while it loads, a fallback if it fails, `ratio`, `caption`), `Timeline` + `TimelineItem`, `DescriptionList` + `DescriptionItem`, `Carousel` + `CarouselSlide` (scroll-snap, arrows, dots, autoplay) |
|
|
69
|
+
| Data display | `Table` (sorting, selection), `Stat`, `FileTree`, `EmptyState`, `Tag`, `ColorSwatch`, `Avatar`, `AvatarGroup`, `User`, `Image` (a placeholder while it loads, a fallback if it fails, `ratio`, `caption`), `Timeline` + `TimelineItem`, `DescriptionList` + `DescriptionItem`, `Carousel` + `CarouselSlide` (scroll-snap, arrows, dots, autoplay), `SortableList` (reorder by dragging or with the keyboard) |
|
|
70
70
|
| AI | `PromptInput` (attachments, stop while streaming) + `PromptSuggestion`, `ChatConversation` (follows the newest message, jump to latest), `ChatMessage` + `ChatMessageActions`, `ChatLoader`, `ChatTool` (a tool call with its status, input, output and approval), `ChainOfThought`, `ChatSource` + `ChatSources`, `TextShimmer` |
|
|
71
|
-
| Layout | `Card`, `SettingsRow`, `Stack`, `Separator`, `ScrollShadow`, `VisuallyHidden`, `AspectRatio`, `Splitter` + `SplitterPanel` + `SplitterHandle` (panels you resize by dragging or with the arrow keys, collapsible, remembered) |
|
|
71
|
+
| Layout | `Card`, `SettingsRow`, `Stack`, `Separator`, `ScrollShadow`, `VisuallyHidden`, `AspectRatio`, `Splitter` + `SplitterPanel` + `SplitterHandle` (panels you resize by dragging or with the arrow keys, collapsible, remembered), `VirtualList` (renders only the rows in view, for 10,000 rows, logs and infinite feeds) |
|
|
72
72
|
| Marketing | `SiteHeader`, `SectionHeading`, `Chip`, `DotGrid` |
|
|
73
73
|
|
|
74
74
|
Hooks for your own components: `useControllableState`, `useFloating` (top-layer positioning that flips), `usePresence` (keeps a layer mounted while it animates out), `useDismiss`, `useModalDialog`, `useMenuKeyboard`. Every prop is typed and described, so your editor explains it on hover.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ActivityHeatmapProps } from "./ActivityHeatmap.types.cjs";
|
|
2
|
+
export type { ActivityHeatmapDay, ActivityHeatmapLabels, ActivityHeatmapProps } from "./ActivityHeatmap.types.cjs";
|
|
3
|
+
/**
|
|
4
|
+
* A GitHub-style calendar of daily counts: a column per week, a row per weekday, each day shaded by its count.
|
|
5
|
+
* It's a grid with one focusable day: the arrow keys move by day and week, and each day is read out in full,
|
|
6
|
+
* with a tooltip showing the number. It scrolls sideways inside itself, starting at the latest week.
|
|
7
|
+
*/
|
|
8
|
+
export declare function ActivityHeatmap({ data, label, start, end, weekStartsOn, levels, thresholds, color, locale, formatTooltip, onDayClick, cellSize, showLegend, labels: labelsProp, className, }: ActivityHeatmapProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ActivityHeatmapProps } from "./ActivityHeatmap.types.js";
|
|
2
|
+
export type { ActivityHeatmapDay, ActivityHeatmapLabels, ActivityHeatmapProps } from "./ActivityHeatmap.types.js";
|
|
3
|
+
/**
|
|
4
|
+
* A GitHub-style calendar of daily counts: a column per week, a row per weekday, each day shaded by its count.
|
|
5
|
+
* It's a grid with one focusable day: the arrow keys move by day and week, and each day is read out in full,
|
|
6
|
+
* with a tooltip showing the number. It scrolls sideways inside itself, starting at the latest week.
|
|
7
|
+
*/
|
|
8
|
+
export declare function ActivityHeatmap({ data, label, start, end, weekStartsOn, levels, thresholds, color, locale, formatTooltip, onDayClick, cellSize, showLegend, labels: labelsProp, className, }: ActivityHeatmapProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { ISODate } from "../Calendar/dates.cjs";
|
|
3
|
+
import type { ChartColor } from "../Chart/Chart.types.cjs";
|
|
4
|
+
/** One day's number: `{ date: "2026-03-03", count: 12 }`. */
|
|
5
|
+
export interface ActivityHeatmapDay {
|
|
6
|
+
/** The day, as "YYYY-MM-DD". */
|
|
7
|
+
date: ISODate;
|
|
8
|
+
/** How many things happened that day. Days left out count as 0. */
|
|
9
|
+
count: number;
|
|
10
|
+
}
|
|
11
|
+
export interface ActivityHeatmapLabels {
|
|
12
|
+
/** A day's number in words, in the tooltip, the cell's name and the summary.
|
|
13
|
+
* @default (count) => "No contributions", "1 contribution", "12 contributions" */
|
|
14
|
+
count?(count: number): string;
|
|
15
|
+
/** A cell's name for screen readers, from its count in words and its full date.
|
|
16
|
+
* @default (count, date) => `${count} on ${date}`, e.g. "12 contributions on Tuesday, 3 March 2026" */
|
|
17
|
+
day?(count: string, date: string): string;
|
|
18
|
+
/** What a screen reader hears before the grid: the total, and the busiest day when there is one.
|
|
19
|
+
* @default "1,204 contributions in total. The busiest day was Tuesday, 3 March 2026, with 42 contributions." */
|
|
20
|
+
summary?(total: string, busiest?: {
|
|
21
|
+
date: string;
|
|
22
|
+
count: string;
|
|
23
|
+
}): string;
|
|
24
|
+
/** The word before the legend's swatches. @default "Less" */
|
|
25
|
+
less?: string;
|
|
26
|
+
/** The word after them. @default "More" */
|
|
27
|
+
more?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface ActivityHeatmapProps {
|
|
30
|
+
/** The numbers, one entry per day, in any order. Days with no entry show as empty; two entries for a day add up. */
|
|
31
|
+
data: ActivityHeatmapDay[];
|
|
32
|
+
/** What it shows, e.g. "Commits in the last year". It names the grid for screen readers. */
|
|
33
|
+
label: string;
|
|
34
|
+
/** The first day shown, "YYYY-MM-DD". @default 52 weeks before `end` */
|
|
35
|
+
start?: ISODate;
|
|
36
|
+
/** The last day shown, "YYYY-MM-DD". @default today */
|
|
37
|
+
end?: ISODate;
|
|
38
|
+
/** 1 starts each column on Monday, 0 on Sunday. @default the locale's first day of the week */
|
|
39
|
+
weekStartsOn?: 0 | 1;
|
|
40
|
+
/** How many shades, counting the empty one: 5 is empty and four steps up to the busiest day. Ignored with `thresholds`.
|
|
41
|
+
* @default 5 */
|
|
42
|
+
levels?: number;
|
|
43
|
+
/**
|
|
44
|
+
* The lowest count for each shade above empty, rising, e.g. `[1, 5, 10, 20]`: 1–4 is the lightest, 20 and over the
|
|
45
|
+
* darkest. @default `levels - 1` equal steps up to the busiest day
|
|
46
|
+
*/
|
|
47
|
+
thresholds?: number[];
|
|
48
|
+
/** A chart palette slot (1–8) or any CSS colour, such as `"var(--ow-primary)"`. The shades are mixed from it and the
|
|
49
|
+
* empty colour, so they follow the theme. @default 1 */
|
|
50
|
+
color?: ChartColor;
|
|
51
|
+
/** Month and weekday names, dates and numbers follow this locale, e.g. "en-IE". @default the browser's */
|
|
52
|
+
locale?: string;
|
|
53
|
+
/** The tooltip for the hovered or focused day. @default its count and date, e.g. "12 contributions on Tue, 3 Mar 2026" */
|
|
54
|
+
formatTooltip?(day: ActivityHeatmapDay): ReactNode;
|
|
55
|
+
/** Makes each day a button: called with the day when it's clicked, or Enter or Space is pressed on it. */
|
|
56
|
+
onDayClick?(day: ActivityHeatmapDay): void;
|
|
57
|
+
/** The side of each square in pixels; the gap between them is a quarter of it. @default 12 */
|
|
58
|
+
cellSize?: number;
|
|
59
|
+
/** Shows "Less ▢▢▢▢▢ More" under the grid. @default true */
|
|
60
|
+
showLegend?: boolean;
|
|
61
|
+
/** The words it uses, for other languages. */
|
|
62
|
+
labels?: ActivityHeatmapLabels;
|
|
63
|
+
className?: string;
|
|
64
|
+
}
|
|
65
|
+
/** What `Intl.Locale` says about a locale's week, where the browser supports it: 1 is Monday … 7 is Sunday. Internal. */
|
|
66
|
+
export interface LocaleWeekInfo {
|
|
67
|
+
getWeekInfo?(): {
|
|
68
|
+
firstDay: number;
|
|
69
|
+
};
|
|
70
|
+
weekInfo?: {
|
|
71
|
+
firstDay: number;
|
|
72
|
+
};
|
|
73
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { ISODate } from "../Calendar/dates.js";
|
|
3
|
+
import type { ChartColor } from "../Chart/Chart.types.js";
|
|
4
|
+
/** One day's number: `{ date: "2026-03-03", count: 12 }`. */
|
|
5
|
+
export interface ActivityHeatmapDay {
|
|
6
|
+
/** The day, as "YYYY-MM-DD". */
|
|
7
|
+
date: ISODate;
|
|
8
|
+
/** How many things happened that day. Days left out count as 0. */
|
|
9
|
+
count: number;
|
|
10
|
+
}
|
|
11
|
+
export interface ActivityHeatmapLabels {
|
|
12
|
+
/** A day's number in words, in the tooltip, the cell's name and the summary.
|
|
13
|
+
* @default (count) => "No contributions", "1 contribution", "12 contributions" */
|
|
14
|
+
count?(count: number): string;
|
|
15
|
+
/** A cell's name for screen readers, from its count in words and its full date.
|
|
16
|
+
* @default (count, date) => `${count} on ${date}`, e.g. "12 contributions on Tuesday, 3 March 2026" */
|
|
17
|
+
day?(count: string, date: string): string;
|
|
18
|
+
/** What a screen reader hears before the grid: the total, and the busiest day when there is one.
|
|
19
|
+
* @default "1,204 contributions in total. The busiest day was Tuesday, 3 March 2026, with 42 contributions." */
|
|
20
|
+
summary?(total: string, busiest?: {
|
|
21
|
+
date: string;
|
|
22
|
+
count: string;
|
|
23
|
+
}): string;
|
|
24
|
+
/** The word before the legend's swatches. @default "Less" */
|
|
25
|
+
less?: string;
|
|
26
|
+
/** The word after them. @default "More" */
|
|
27
|
+
more?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface ActivityHeatmapProps {
|
|
30
|
+
/** The numbers, one entry per day, in any order. Days with no entry show as empty; two entries for a day add up. */
|
|
31
|
+
data: ActivityHeatmapDay[];
|
|
32
|
+
/** What it shows, e.g. "Commits in the last year". It names the grid for screen readers. */
|
|
33
|
+
label: string;
|
|
34
|
+
/** The first day shown, "YYYY-MM-DD". @default 52 weeks before `end` */
|
|
35
|
+
start?: ISODate;
|
|
36
|
+
/** The last day shown, "YYYY-MM-DD". @default today */
|
|
37
|
+
end?: ISODate;
|
|
38
|
+
/** 1 starts each column on Monday, 0 on Sunday. @default the locale's first day of the week */
|
|
39
|
+
weekStartsOn?: 0 | 1;
|
|
40
|
+
/** How many shades, counting the empty one: 5 is empty and four steps up to the busiest day. Ignored with `thresholds`.
|
|
41
|
+
* @default 5 */
|
|
42
|
+
levels?: number;
|
|
43
|
+
/**
|
|
44
|
+
* The lowest count for each shade above empty, rising, e.g. `[1, 5, 10, 20]`: 1–4 is the lightest, 20 and over the
|
|
45
|
+
* darkest. @default `levels - 1` equal steps up to the busiest day
|
|
46
|
+
*/
|
|
47
|
+
thresholds?: number[];
|
|
48
|
+
/** A chart palette slot (1–8) or any CSS colour, such as `"var(--ow-primary)"`. The shades are mixed from it and the
|
|
49
|
+
* empty colour, so they follow the theme. @default 1 */
|
|
50
|
+
color?: ChartColor;
|
|
51
|
+
/** Month and weekday names, dates and numbers follow this locale, e.g. "en-IE". @default the browser's */
|
|
52
|
+
locale?: string;
|
|
53
|
+
/** The tooltip for the hovered or focused day. @default its count and date, e.g. "12 contributions on Tue, 3 Mar 2026" */
|
|
54
|
+
formatTooltip?(day: ActivityHeatmapDay): ReactNode;
|
|
55
|
+
/** Makes each day a button: called with the day when it's clicked, or Enter or Space is pressed on it. */
|
|
56
|
+
onDayClick?(day: ActivityHeatmapDay): void;
|
|
57
|
+
/** The side of each square in pixels; the gap between them is a quarter of it. @default 12 */
|
|
58
|
+
cellSize?: number;
|
|
59
|
+
/** Shows "Less ▢▢▢▢▢ More" under the grid. @default true */
|
|
60
|
+
showLegend?: boolean;
|
|
61
|
+
/** The words it uses, for other languages. */
|
|
62
|
+
labels?: ActivityHeatmapLabels;
|
|
63
|
+
className?: string;
|
|
64
|
+
}
|
|
65
|
+
/** What `Intl.Locale` says about a locale's week, where the browser supports it: 1 is Monday … 7 is Sunday. Internal. */
|
|
66
|
+
export interface LocaleWeekInfo {
|
|
67
|
+
getWeekInfo?(): {
|
|
68
|
+
firstDay: number;
|
|
69
|
+
};
|
|
70
|
+
weekInfo?: {
|
|
71
|
+
firstDay: number;
|
|
72
|
+
};
|
|
73
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { DiffViewerProps } from "./DiffViewer.types.cjs";
|
|
2
|
+
export type { DiffViewerLabels, DiffViewerProps } from "./DiffViewer.types.cjs";
|
|
3
|
+
/**
|
|
4
|
+
* A code diff on the code block's night ground: from two versions of a text or from a unified patch, shown unified or
|
|
5
|
+
* side by side. Changed lines are tinted green or red with a "+" or "−" and read out as "Added" or "Removed"; the
|
|
6
|
+
* words that changed within them are marked; long runs of unchanged lines fold into buttons that show them.
|
|
7
|
+
*/
|
|
8
|
+
export declare function DiffViewer({ oldValue, newValue, patch, view, splitMinWidth, language, filename, oldFilename, context, wrap, showLineNumbers, wordDiff, copyable, maxHeight, labels: labelsProp, className, ...props }: DiffViewerProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { DiffViewerProps } from "./DiffViewer.types.js";
|
|
2
|
+
export type { DiffViewerLabels, DiffViewerProps } from "./DiffViewer.types.js";
|
|
3
|
+
/**
|
|
4
|
+
* A code diff on the code block's night ground: from two versions of a text or from a unified patch, shown unified or
|
|
5
|
+
* side by side. Changed lines are tinted green or red with a "+" or "−" and read out as "Added" or "Removed"; the
|
|
6
|
+
* words that changed within them are marked; long runs of unchanged lines fold into buttons that show them.
|
|
7
|
+
*/
|
|
8
|
+
export declare function DiffViewer({ oldValue, newValue, patch, view, splitMinWidth, language, filename, oldFilename, context, wrap, showLineNumbers, wordDiff, copyable, maxHeight, labels: labelsProp, className, ...props }: DiffViewerProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "react";
|
|
2
|
+
export interface DiffViewerLabels {
|
|
3
|
+
/** Read before each added line, which is otherwise only green with a "+".
|
|
4
|
+
* @default "Added" */
|
|
5
|
+
added?: string;
|
|
6
|
+
/** Read before each removed line.
|
|
7
|
+
* @default "Removed" */
|
|
8
|
+
removed?: string;
|
|
9
|
+
/** The header of the old line numbers' column, read by screen readers as they move through the table.
|
|
10
|
+
* @default "Old line" */
|
|
11
|
+
oldLine?: string;
|
|
12
|
+
/** The header of the new line numbers' column.
|
|
13
|
+
* @default "New line" */
|
|
14
|
+
newLine?: string;
|
|
15
|
+
/** The header of the lines' column in the unified view.
|
|
16
|
+
* @default "Line" */
|
|
17
|
+
line?: string;
|
|
18
|
+
/** The header of the old version's column in the split view.
|
|
19
|
+
* @default "Before" */
|
|
20
|
+
before?: string;
|
|
21
|
+
/** The header of the new version's column in the split view.
|
|
22
|
+
* @default "After" */
|
|
23
|
+
after?: string;
|
|
24
|
+
/** Names the table with the counts that show as "+3 −1".
|
|
25
|
+
* @default (added, removed) => `${added} lines added, ${removed} removed` */
|
|
26
|
+
summary?(added: number, removed: number): string;
|
|
27
|
+
/** The button that shows a collapsed run of unchanged lines.
|
|
28
|
+
* @default (count) => `Show ${count} unchanged lines` */
|
|
29
|
+
expand?(count: number): string;
|
|
30
|
+
/** The copy button's label.
|
|
31
|
+
* @default "Copy" */
|
|
32
|
+
copy?: string;
|
|
33
|
+
/** Shown when the two versions are the same.
|
|
34
|
+
* @default "No changes" */
|
|
35
|
+
noChanges?: string;
|
|
36
|
+
/** Read between the old and new name of a renamed file, for the "→" between them.
|
|
37
|
+
* @default "renamed to" */
|
|
38
|
+
renamed?: string;
|
|
39
|
+
}
|
|
40
|
+
export interface DiffViewerProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
|
|
41
|
+
/** The text before the change. Pass it with `newValue`, and the diff is worked out line by line. */
|
|
42
|
+
oldValue?: string;
|
|
43
|
+
/** The text after the change. */
|
|
44
|
+
newValue?: string;
|
|
45
|
+
/** A unified diff instead, as `git diff` prints it: its hunks and `@@` headers, and one file or several. */
|
|
46
|
+
patch?: string;
|
|
47
|
+
/** `unified` shows the lines one above the other; `split` puts the old version beside the new one, and wraps long
|
|
48
|
+
* lines so the two sides stay level.
|
|
49
|
+
* @default "unified" */
|
|
50
|
+
view?: "unified" | "split";
|
|
51
|
+
/** Below this width (pixels) a split view shows unified, as there isn't room for two columns. 0 keeps it split.
|
|
52
|
+
* @default 500 */
|
|
53
|
+
splitMinWidth?: number;
|
|
54
|
+
/** Shown on the right of the header, e.g. "tsx". */
|
|
55
|
+
language?: string;
|
|
56
|
+
/** The file's name in the header. With a `patch`, it's read from the patch unless you set it. */
|
|
57
|
+
filename?: string;
|
|
58
|
+
/** The name it had before, for a renamed file: shown as "old → new". */
|
|
59
|
+
oldFilename?: string;
|
|
60
|
+
/** How many unchanged lines show around each change. Longer runs of unchanged lines collapse to a button that
|
|
61
|
+
* shows them. `Infinity` shows every line.
|
|
62
|
+
* @default 3 */
|
|
63
|
+
context?: number;
|
|
64
|
+
/** Wraps long lines in the unified view instead of scrolling sideways. The split view always wraps.
|
|
65
|
+
* @default false */
|
|
66
|
+
wrap?: boolean;
|
|
67
|
+
/** @default true */
|
|
68
|
+
showLineNumbers?: boolean;
|
|
69
|
+
/** Marks the words that changed within a changed line.
|
|
70
|
+
* @default true */
|
|
71
|
+
wordDiff?: boolean;
|
|
72
|
+
/** Shows a copy button in the header. It copies `newValue`, or the file's part of the `patch`.
|
|
73
|
+
* @default true */
|
|
74
|
+
copyable?: boolean;
|
|
75
|
+
/** Scrolls each file past this height (pixels). */
|
|
76
|
+
maxHeight?: number;
|
|
77
|
+
/** The words it uses, for other languages. */
|
|
78
|
+
labels?: DiffViewerLabels;
|
|
79
|
+
}
|
|
80
|
+
/** A run of text within a changed line, and whether it's one of the words that changed. Internal. */
|
|
81
|
+
export interface DiffSegment {
|
|
82
|
+
text: string;
|
|
83
|
+
changed: boolean;
|
|
84
|
+
}
|
|
85
|
+
/** One line of a diff: unchanged, added, removed, or a patch's `@@` hunk header. Internal. */
|
|
86
|
+
export interface DiffLine {
|
|
87
|
+
type: "same" | "add" | "del" | "hunk";
|
|
88
|
+
text: string;
|
|
89
|
+
/** Its number in the old version, if it's in it. */
|
|
90
|
+
oldNo?: number;
|
|
91
|
+
/** Its number in the new version, if it's in it. */
|
|
92
|
+
newNo?: number;
|
|
93
|
+
/** The words that changed, when it pairs with a line on the other side. */
|
|
94
|
+
words?: DiffSegment[];
|
|
95
|
+
}
|
|
96
|
+
/** One file of a diff, worked out from two strings or read from a patch. Internal. */
|
|
97
|
+
export interface DiffFile {
|
|
98
|
+
oldName?: string;
|
|
99
|
+
newName?: string;
|
|
100
|
+
lines: DiffLine[];
|
|
101
|
+
/** What the copy button copies. */
|
|
102
|
+
text: string;
|
|
103
|
+
}
|
|
104
|
+
/** What a diff shows, row by row: a line, a run of unchanged lines collapsed to a button (`gap` is the first one's
|
|
105
|
+
* index), or in a split view a pair of lines side by side. Internal. */
|
|
106
|
+
export type DiffRow = {
|
|
107
|
+
kind: "line";
|
|
108
|
+
line: DiffLine;
|
|
109
|
+
reveal?: number;
|
|
110
|
+
} | {
|
|
111
|
+
kind: "gap";
|
|
112
|
+
gap: number;
|
|
113
|
+
count: number;
|
|
114
|
+
} | {
|
|
115
|
+
kind: "pair";
|
|
116
|
+
left?: DiffLine;
|
|
117
|
+
right?: DiffLine;
|
|
118
|
+
reveal?: number;
|
|
119
|
+
};
|
|
120
|
+
/** What each file's table is given. Internal. */
|
|
121
|
+
export interface DiffTableProps {
|
|
122
|
+
file: DiffFile;
|
|
123
|
+
split: boolean;
|
|
124
|
+
context: number;
|
|
125
|
+
wrap: boolean;
|
|
126
|
+
showLineNumbers: boolean;
|
|
127
|
+
copyable: boolean;
|
|
128
|
+
language?: string;
|
|
129
|
+
maxHeight?: number;
|
|
130
|
+
labels: Required<DiffViewerLabels>;
|
|
131
|
+
}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "react";
|
|
2
|
+
export interface DiffViewerLabels {
|
|
3
|
+
/** Read before each added line, which is otherwise only green with a "+".
|
|
4
|
+
* @default "Added" */
|
|
5
|
+
added?: string;
|
|
6
|
+
/** Read before each removed line.
|
|
7
|
+
* @default "Removed" */
|
|
8
|
+
removed?: string;
|
|
9
|
+
/** The header of the old line numbers' column, read by screen readers as they move through the table.
|
|
10
|
+
* @default "Old line" */
|
|
11
|
+
oldLine?: string;
|
|
12
|
+
/** The header of the new line numbers' column.
|
|
13
|
+
* @default "New line" */
|
|
14
|
+
newLine?: string;
|
|
15
|
+
/** The header of the lines' column in the unified view.
|
|
16
|
+
* @default "Line" */
|
|
17
|
+
line?: string;
|
|
18
|
+
/** The header of the old version's column in the split view.
|
|
19
|
+
* @default "Before" */
|
|
20
|
+
before?: string;
|
|
21
|
+
/** The header of the new version's column in the split view.
|
|
22
|
+
* @default "After" */
|
|
23
|
+
after?: string;
|
|
24
|
+
/** Names the table with the counts that show as "+3 −1".
|
|
25
|
+
* @default (added, removed) => `${added} lines added, ${removed} removed` */
|
|
26
|
+
summary?(added: number, removed: number): string;
|
|
27
|
+
/** The button that shows a collapsed run of unchanged lines.
|
|
28
|
+
* @default (count) => `Show ${count} unchanged lines` */
|
|
29
|
+
expand?(count: number): string;
|
|
30
|
+
/** The copy button's label.
|
|
31
|
+
* @default "Copy" */
|
|
32
|
+
copy?: string;
|
|
33
|
+
/** Shown when the two versions are the same.
|
|
34
|
+
* @default "No changes" */
|
|
35
|
+
noChanges?: string;
|
|
36
|
+
/** Read between the old and new name of a renamed file, for the "→" between them.
|
|
37
|
+
* @default "renamed to" */
|
|
38
|
+
renamed?: string;
|
|
39
|
+
}
|
|
40
|
+
export interface DiffViewerProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
|
|
41
|
+
/** The text before the change. Pass it with `newValue`, and the diff is worked out line by line. */
|
|
42
|
+
oldValue?: string;
|
|
43
|
+
/** The text after the change. */
|
|
44
|
+
newValue?: string;
|
|
45
|
+
/** A unified diff instead, as `git diff` prints it: its hunks and `@@` headers, and one file or several. */
|
|
46
|
+
patch?: string;
|
|
47
|
+
/** `unified` shows the lines one above the other; `split` puts the old version beside the new one, and wraps long
|
|
48
|
+
* lines so the two sides stay level.
|
|
49
|
+
* @default "unified" */
|
|
50
|
+
view?: "unified" | "split";
|
|
51
|
+
/** Below this width (pixels) a split view shows unified, as there isn't room for two columns. 0 keeps it split.
|
|
52
|
+
* @default 500 */
|
|
53
|
+
splitMinWidth?: number;
|
|
54
|
+
/** Shown on the right of the header, e.g. "tsx". */
|
|
55
|
+
language?: string;
|
|
56
|
+
/** The file's name in the header. With a `patch`, it's read from the patch unless you set it. */
|
|
57
|
+
filename?: string;
|
|
58
|
+
/** The name it had before, for a renamed file: shown as "old → new". */
|
|
59
|
+
oldFilename?: string;
|
|
60
|
+
/** How many unchanged lines show around each change. Longer runs of unchanged lines collapse to a button that
|
|
61
|
+
* shows them. `Infinity` shows every line.
|
|
62
|
+
* @default 3 */
|
|
63
|
+
context?: number;
|
|
64
|
+
/** Wraps long lines in the unified view instead of scrolling sideways. The split view always wraps.
|
|
65
|
+
* @default false */
|
|
66
|
+
wrap?: boolean;
|
|
67
|
+
/** @default true */
|
|
68
|
+
showLineNumbers?: boolean;
|
|
69
|
+
/** Marks the words that changed within a changed line.
|
|
70
|
+
* @default true */
|
|
71
|
+
wordDiff?: boolean;
|
|
72
|
+
/** Shows a copy button in the header. It copies `newValue`, or the file's part of the `patch`.
|
|
73
|
+
* @default true */
|
|
74
|
+
copyable?: boolean;
|
|
75
|
+
/** Scrolls each file past this height (pixels). */
|
|
76
|
+
maxHeight?: number;
|
|
77
|
+
/** The words it uses, for other languages. */
|
|
78
|
+
labels?: DiffViewerLabels;
|
|
79
|
+
}
|
|
80
|
+
/** A run of text within a changed line, and whether it's one of the words that changed. Internal. */
|
|
81
|
+
export interface DiffSegment {
|
|
82
|
+
text: string;
|
|
83
|
+
changed: boolean;
|
|
84
|
+
}
|
|
85
|
+
/** One line of a diff: unchanged, added, removed, or a patch's `@@` hunk header. Internal. */
|
|
86
|
+
export interface DiffLine {
|
|
87
|
+
type: "same" | "add" | "del" | "hunk";
|
|
88
|
+
text: string;
|
|
89
|
+
/** Its number in the old version, if it's in it. */
|
|
90
|
+
oldNo?: number;
|
|
91
|
+
/** Its number in the new version, if it's in it. */
|
|
92
|
+
newNo?: number;
|
|
93
|
+
/** The words that changed, when it pairs with a line on the other side. */
|
|
94
|
+
words?: DiffSegment[];
|
|
95
|
+
}
|
|
96
|
+
/** One file of a diff, worked out from two strings or read from a patch. Internal. */
|
|
97
|
+
export interface DiffFile {
|
|
98
|
+
oldName?: string;
|
|
99
|
+
newName?: string;
|
|
100
|
+
lines: DiffLine[];
|
|
101
|
+
/** What the copy button copies. */
|
|
102
|
+
text: string;
|
|
103
|
+
}
|
|
104
|
+
/** What a diff shows, row by row: a line, a run of unchanged lines collapsed to a button (`gap` is the first one's
|
|
105
|
+
* index), or in a split view a pair of lines side by side. Internal. */
|
|
106
|
+
export type DiffRow = {
|
|
107
|
+
kind: "line";
|
|
108
|
+
line: DiffLine;
|
|
109
|
+
reveal?: number;
|
|
110
|
+
} | {
|
|
111
|
+
kind: "gap";
|
|
112
|
+
gap: number;
|
|
113
|
+
count: number;
|
|
114
|
+
} | {
|
|
115
|
+
kind: "pair";
|
|
116
|
+
left?: DiffLine;
|
|
117
|
+
right?: DiffLine;
|
|
118
|
+
reveal?: number;
|
|
119
|
+
};
|
|
120
|
+
/** What each file's table is given. Internal. */
|
|
121
|
+
export interface DiffTableProps {
|
|
122
|
+
file: DiffFile;
|
|
123
|
+
split: boolean;
|
|
124
|
+
context: number;
|
|
125
|
+
wrap: boolean;
|
|
126
|
+
showLineNumbers: boolean;
|
|
127
|
+
copyable: boolean;
|
|
128
|
+
language?: string;
|
|
129
|
+
maxHeight?: number;
|
|
130
|
+
labels: Required<DiffViewerLabels>;
|
|
131
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { DiffFile, DiffLine, DiffRow } from "./DiffViewer.types.cjs";
|
|
2
|
+
/** The line-by-line diff of two texts. */
|
|
3
|
+
export declare function diffText(oldValue: string, newValue: string, words: boolean): DiffLine[];
|
|
4
|
+
/** Reads a unified diff: its files, their hunks and lines. Anything else (a commit message, index lines) is skipped. */
|
|
5
|
+
export declare function parsePatch(patch: string, words: boolean): DiffFile[];
|
|
6
|
+
/**
|
|
7
|
+
* The rows a file shows: its lines, with runs of unchanged lines beyond `context` of a change folded into a gap,
|
|
8
|
+
* unless that gap was opened. A file's first and last runs only keep the lines next to a change.
|
|
9
|
+
*/
|
|
10
|
+
export declare function toRows(lines: DiffLine[], context: number, opened: number[], split: boolean): DiffRow[];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { DiffFile, DiffLine, DiffRow } from "./DiffViewer.types.js";
|
|
2
|
+
/** The line-by-line diff of two texts. */
|
|
3
|
+
export declare function diffText(oldValue: string, newValue: string, words: boolean): DiffLine[];
|
|
4
|
+
/** Reads a unified diff: its files, their hunks and lines. Anything else (a commit message, index lines) is skipped. */
|
|
5
|
+
export declare function parsePatch(patch: string, words: boolean): DiffFile[];
|
|
6
|
+
/**
|
|
7
|
+
* The rows a file shows: its lines, with runs of unchanged lines beyond `context` of a change folded into a gap,
|
|
8
|
+
* unless that gap was opened. A file's first and last runs only keep the lines next to a change.
|
|
9
|
+
*/
|
|
10
|
+
export declare function toRows(lines: DiffLine[], context: number, opened: number[], split: boolean): DiffRow[];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { InlineEditProps } from "./InlineEdit.types.cjs";
|
|
2
|
+
export type { InlineEditLabels, InlineEditProps } from "./InlineEdit.types.cjs";
|
|
3
|
+
/**
|
|
4
|
+
* Text that people click, or focus and press Enter, to edit where it is: a project's name, a title, a value in a
|
|
5
|
+
* settings row. Enter saves and Escape cancels; focus goes back to the text either way. `onSave` can return a Promise:
|
|
6
|
+
* the editor stays open while it runs, and shows its error if it fails.
|
|
7
|
+
*/
|
|
8
|
+
export declare function InlineEdit({ value, defaultValue, onSave, onCancel, label, placeholder, multiline, validate, required, maxLength, textVariant, saveOnBlur, showActions, editing, defaultEditing, onEditingChange, selectOnFocus, disabled, readOnly, labels: labelsProp, id, className, }: InlineEditProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { InlineEditProps } from "./InlineEdit.types.js";
|
|
2
|
+
export type { InlineEditLabels, InlineEditProps } from "./InlineEdit.types.js";
|
|
3
|
+
/**
|
|
4
|
+
* Text that people click, or focus and press Enter, to edit where it is: a project's name, a title, a value in a
|
|
5
|
+
* settings row. Enter saves and Escape cancels; focus goes back to the text either way. `onSave` can return a Promise:
|
|
6
|
+
* the editor stays open while it runs, and shows its error if it fails.
|
|
7
|
+
*/
|
|
8
|
+
export declare function InlineEdit({ value, defaultValue, onSave, onCancel, label, placeholder, multiline, validate, required, maxLength, textVariant, saveOnBlur, showActions, editing, defaultEditing, onEditingChange, selectOnFocus, disabled, readOnly, labels: labelsProp, id, className, }: InlineEditProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { TextVariant } from "../Text/Text.cjs";
|
|
2
|
+
export interface InlineEditLabels {
|
|
3
|
+
/** Names the text's button, given `label`. @default (label) => `Edit ${label.toLowerCase()}` */
|
|
4
|
+
edit?(label: string): string;
|
|
5
|
+
/** The Save button, with `showActions`. @default "Save" */
|
|
6
|
+
save?: string;
|
|
7
|
+
/** The Cancel button, with `showActions`. @default "Cancel" */
|
|
8
|
+
cancel?: string;
|
|
9
|
+
/** Read out while a slow `onSave` runs. @default "Saving" */
|
|
10
|
+
saving?: string;
|
|
11
|
+
/** Shown when a `required` value is left empty. @default "This can't be empty." */
|
|
12
|
+
required?: string;
|
|
13
|
+
/** Shown when `onSave` fails without a message of its own. @default "Couldn't save. Try again." */
|
|
14
|
+
failed?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface InlineEditProps {
|
|
17
|
+
/** The text, when you control it. Update it in `onSave`. */
|
|
18
|
+
value?: string;
|
|
19
|
+
/** The text at first, when it keeps the text itself.
|
|
20
|
+
* @default "" */
|
|
21
|
+
defaultValue?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Called with the new text when people save a change (not when they save it unchanged). Return a Promise to keep
|
|
24
|
+
* the editor open, showing that it's saving, until it settles; if it rejects or throws, its message is shown and
|
|
25
|
+
* the editor stays open to try again.
|
|
26
|
+
*/
|
|
27
|
+
onSave?(value: string): void | Promise<unknown>;
|
|
28
|
+
/** Called when people cancel an edit, with Escape, the Cancel button or, without `saveOnBlur`, by leaving it. */
|
|
29
|
+
onCancel?(): void;
|
|
30
|
+
/** What the text is, such as "Project name": the editor's name, and the button's ("Edit project name"). Required. */
|
|
31
|
+
label: string;
|
|
32
|
+
/** Shown, muted, when the text is empty, and in the empty editor.
|
|
33
|
+
* @default label */
|
|
34
|
+
placeholder?: string;
|
|
35
|
+
/** Edits in a Textarea that grows with the text: Enter adds a line, and Ctrl+Enter or ⌘Enter saves.
|
|
36
|
+
* @default false */
|
|
37
|
+
multiline?: boolean;
|
|
38
|
+
/** Checks the text before it's saved; return a message to show instead of saving, or undefined when it's fine. */
|
|
39
|
+
validate?(value: string): string | undefined;
|
|
40
|
+
/** Refuses to save empty text (or only spaces), with `labels.required`.
|
|
41
|
+
* @default false */
|
|
42
|
+
required?: boolean;
|
|
43
|
+
/** The most characters it takes. */
|
|
44
|
+
maxLength?: number;
|
|
45
|
+
/** A Text style for the text and the editor, so it can be a heading or a caption. Left out, it takes the font around it. */
|
|
46
|
+
textVariant?: TextVariant;
|
|
47
|
+
/** Leaving the editor saves. When false, leaving it cancels.
|
|
48
|
+
* @default true */
|
|
49
|
+
saveOnBlur?: boolean;
|
|
50
|
+
/** Shows Save and Cancel buttons beside the editor.
|
|
51
|
+
* @default false */
|
|
52
|
+
showActions?: boolean;
|
|
53
|
+
/** Whether it's editing, when you control it. */
|
|
54
|
+
editing?: boolean;
|
|
55
|
+
/** Whether it starts out editing, when it controls that itself.
|
|
56
|
+
* @default false */
|
|
57
|
+
defaultEditing?: boolean;
|
|
58
|
+
/** Called when it starts or stops editing. */
|
|
59
|
+
onEditingChange?(editing: boolean): void;
|
|
60
|
+
/** Selects all the text when the editor opens, to type over it. Otherwise the caret goes at the end.
|
|
61
|
+
* @default false */
|
|
62
|
+
selectOnFocus?: boolean;
|
|
63
|
+
/** Shows the text dimmed, and it can't be edited or focused.
|
|
64
|
+
* @default false */
|
|
65
|
+
disabled?: boolean;
|
|
66
|
+
/** Shows the text plainly, as text, with nothing to click.
|
|
67
|
+
* @default false */
|
|
68
|
+
readOnly?: boolean;
|
|
69
|
+
/** The words it uses, for other languages. */
|
|
70
|
+
labels?: InlineEditLabels;
|
|
71
|
+
/** The display button's id. */
|
|
72
|
+
id?: string;
|
|
73
|
+
className?: string;
|
|
74
|
+
}
|