@salilvnair/dui 1.0.7 → 1.0.8
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/dist/assets/DuiShowcase-C18KoqHP.css +1 -0
- package/dist/assets/{DuiShowcase-CSkP-vdJ.js → DuiShowcase-DwihGCxO.js} +1377 -1359
- package/dist/assets/{index-DQdlwLhi.js → index-D9rPjVPP.js} +2 -2
- package/dist/chunks/{daakia-icons-BpwUOdSO.js → daakia-icons-DYLRx0Yi.js} +1096 -1053
- package/dist/chunks/daakia-icons-DYLRx0Yi.js.map +1 -0
- package/dist/chunks/doc-path-D2_JUEIe.js +695 -0
- package/dist/chunks/doc-path-D2_JUEIe.js.map +1 -0
- package/dist/icons/daakia-icons.d.ts +24 -0
- package/dist/index.html +1 -1
- package/dist/index.js +20939 -17293
- package/dist/index.js.map +1 -1
- package/dist/lib/components/button/AIButtonView.d.ts +10 -1
- package/dist/lib/components/button/ActionButtonView.d.ts +42 -0
- package/dist/lib/components/button/BookmarkButtonView.d.ts +10 -1
- package/dist/lib/components/button/FabView.d.ts +10 -1
- package/dist/lib/components/button/FollowButtonView.d.ts +10 -1
- package/dist/lib/components/button/HoldToConfirmView.d.ts +10 -1
- package/dist/lib/components/button/LikeButtonView.d.ts +10 -1
- package/dist/lib/components/button/MorphingIconButtonView.d.ts +10 -1
- package/dist/lib/components/button/SegmentedView.d.ts +10 -1
- package/dist/lib/components/button/ThemeToggleView.d.ts +10 -1
- package/dist/lib/components/button/VoteWidgetView.d.ts +10 -1
- package/dist/lib/components/chips/ChipView.d.ts +32 -1
- package/dist/lib/components/chips/CommandChipView.d.ts +10 -1
- package/dist/lib/components/display/BadgeChipView.d.ts +25 -0
- package/dist/lib/components/display/DonutView.d.ts +35 -0
- package/dist/lib/components/display/EmptyStateView.d.ts +33 -1
- package/dist/lib/components/display/FileBrowserView.d.ts +143 -0
- package/dist/lib/components/display/FileBrowserView.test.d.ts +1 -0
- package/dist/lib/components/display/FindingCardView.d.ts +36 -0
- package/dist/lib/components/display/FlameGraphView.d.ts +32 -0
- package/dist/lib/components/display/GroupHeaderView.d.ts +28 -0
- package/dist/lib/components/display/IssueCardSkeletonView.d.ts +28 -0
- package/dist/lib/components/display/IssueCardView.d.ts +40 -0
- package/dist/lib/components/display/LaneChartView.d.ts +46 -0
- package/dist/lib/components/display/LineDiffView.d.ts +25 -0
- package/dist/lib/components/display/PriorityMarkView.d.ts +20 -0
- package/dist/lib/components/display/SetupOptionView.d.ts +56 -0
- package/dist/lib/components/display/SunburstView.d.ts +32 -0
- package/dist/lib/components/display/SwimlaneChartView.d.ts +48 -0
- package/dist/lib/components/display/TableSkeletonView.d.ts +34 -0
- package/dist/lib/components/display/hierarchy-layout.d.ts +114 -0
- package/dist/lib/components/display/hierarchy-layout.test.d.ts +1 -0
- package/dist/lib/components/display/lane-scale.d.ts +67 -0
- package/dist/lib/components/display/lane-scale.test.d.ts +1 -0
- package/dist/lib/components/display/line-diff.d.ts +42 -0
- package/dist/lib/components/input/AvatarUploadView.d.ts +10 -1
- package/dist/lib/components/input/CalendarView.d.ts +10 -1
- package/dist/lib/components/input/CascaderView.d.ts +10 -1
- package/dist/lib/components/input/ChatInputView.d.ts +10 -1
- package/dist/lib/components/input/CheckboxView.d.ts +10 -1
- package/dist/lib/components/input/ChecklistView.d.ts +10 -1
- package/dist/lib/components/input/ColorPickerView.d.ts +10 -1
- package/dist/lib/components/input/ComboBoxView.d.ts +10 -1
- package/dist/lib/components/input/DateInputView.d.ts +10 -1
- package/dist/lib/components/input/DateRangePickerView.d.ts +10 -1
- package/dist/lib/components/input/DateTimeInputView.d.ts +10 -1
- package/dist/lib/components/input/DialKnobInputView.d.ts +10 -1
- package/dist/lib/components/input/DurationInputView.d.ts +10 -1
- package/dist/lib/components/input/EditorView.d.ts +8 -0
- package/dist/lib/components/input/EditorView.shell.d.ts +9 -1
- package/dist/lib/components/input/EmojiPickerView.d.ts +10 -1
- package/dist/lib/components/input/FeedbackWidgetView.d.ts +10 -1
- package/dist/lib/components/input/FileDropzoneView.d.ts +10 -1
- package/dist/lib/components/input/FilterInputView.d.ts +25 -0
- package/dist/lib/components/input/FloatingLabelInputView.d.ts +10 -1
- package/dist/lib/components/input/FormDataTableView.d.ts +10 -1
- package/dist/lib/components/input/GhostTypingPlaceholderView.d.ts +10 -1
- package/dist/lib/components/input/HiddenKeyValueItemView.d.ts +10 -1
- package/dist/lib/components/input/HighlightedInputView.d.ts +12 -1
- package/dist/lib/components/input/IconPickerView.d.ts +10 -1
- package/dist/lib/components/input/InlineEditTextView.d.ts +10 -1
- package/dist/lib/components/input/InviteInputView.d.ts +10 -1
- package/dist/lib/components/input/KeyValueTableRowView.d.ts +10 -1
- package/dist/lib/components/input/KeyValueTableView.d.ts +10 -1
- package/dist/lib/components/input/MarkdownEditorView.d.ts +30 -0
- package/dist/lib/components/input/MaskedInputView.d.ts +10 -1
- package/dist/lib/components/input/MentionInputView.d.ts +10 -1
- package/dist/lib/components/input/MergedInputView.d.ts +10 -1
- package/dist/lib/components/input/NpsSurveyView.d.ts +10 -1
- package/dist/lib/components/input/OtpInputView.d.ts +10 -1
- package/dist/lib/components/input/PhoneInputView.d.ts +10 -1
- package/dist/lib/components/input/PickerView.d.ts +10 -1
- package/dist/lib/components/input/PriorityPickerView.d.ts +10 -1
- package/dist/lib/components/input/RadioCardView.d.ts +10 -1
- package/dist/lib/components/input/RadioGroupView.d.ts +10 -1
- package/dist/lib/components/input/RangeSliderView.d.ts +10 -1
- package/dist/lib/components/input/RatingView.d.ts +10 -1
- package/dist/lib/components/input/RichTextToolbarView.d.ts +10 -1
- package/dist/lib/components/input/RoleSelectView.d.ts +10 -1
- package/dist/lib/components/input/SearchFieldView.d.ts +33 -0
- package/dist/lib/components/input/SegmentedControlView.d.ts +20 -1
- package/dist/lib/components/input/SelectInputView.d.ts +32 -1
- package/dist/lib/components/input/SelectTextInputView.d.ts +12 -1
- package/dist/lib/components/input/ShortcutRecorderView.d.ts +10 -1
- package/dist/lib/components/input/SliderView.d.ts +10 -1
- package/dist/lib/components/input/SpectrumSliderView.d.ts +10 -1
- package/dist/lib/components/input/StepperInputView.d.ts +10 -1
- package/dist/lib/components/input/SwatchPickerView.d.ts +38 -0
- package/dist/lib/components/input/SwitchGroupView.d.ts +10 -1
- package/dist/lib/components/input/TabView.d.ts +10 -1
- package/dist/lib/components/input/TagInputView.d.ts +10 -1
- package/dist/lib/components/input/TextInputView.d.ts +9 -0
- package/dist/lib/components/input/ThemeCardSelectorView.d.ts +10 -1
- package/dist/lib/components/input/TimeWheelView.d.ts +10 -1
- package/dist/lib/components/input/TimeZoneSelectView.d.ts +40 -0
- package/dist/lib/components/input/TimeZoneSelectView.test.d.ts +1 -0
- package/dist/lib/components/input/TogglePillView.d.ts +51 -0
- package/dist/lib/components/input/ToggleSwitchView.d.ts +10 -1
- package/dist/lib/components/input/TransferListView.d.ts +10 -1
- package/dist/lib/components/input/TreeSelectView.d.ts +10 -1
- package/dist/lib/components/input/WizardStepperView.d.ts +10 -1
- package/dist/lib/components/input/doc-path.d.ts +52 -0
- package/dist/lib/components/input/doc-path.test.d.ts +1 -0
- package/dist/lib/components/input/markdown-serialise.d.ts +23 -0
- package/dist/lib/components/input/select-position.test.d.ts +1 -0
- package/dist/lib/components/layout/PathBreadcrumbView.d.ts +67 -0
- package/dist/lib/components/layout/PathBreadcrumbView.test.d.ts +1 -0
- package/dist/lib/components/layout/SplitPanelView.d.ts +26 -1
- package/dist/lib/components/modal/ActionSheetView.d.ts +10 -1
- package/dist/lib/components/modal/AlertDialogView.d.ts +10 -1
- package/dist/lib/components/modal/BottomSheetView.d.ts +10 -1
- package/dist/lib/components/modal/CommandPaletteView.d.ts +10 -1
- package/dist/lib/components/modal/ContextMenuView.d.ts +19 -1
- package/dist/lib/components/modal/DrawerView.d.ts +10 -1
- package/dist/lib/components/modal/InfoPopupView.d.ts +13 -1
- package/dist/lib/components/modal/ModalView.d.ts +19 -3
- package/dist/lib/components/modal/NotificationCenterView.d.ts +10 -1
- package/dist/lib/components/modal/PopoverView.d.ts +10 -1
- package/dist/lib/components/modal/SheetView.d.ts +31 -0
- package/dist/lib/components/modal/SpotlightTourView.d.ts +10 -1
- package/dist/lib/components/modal/StackedToastDeckView.d.ts +10 -1
- package/dist/lib/components/modal/sheet-drag.d.ts +60 -0
- package/dist/lib/components/modal/sheet-drag.test.d.ts +1 -0
- package/dist/lib/components/tabs/PilledTabView.d.ts +10 -1
- package/dist/lib/components/tabs/TabBarView.d.ts +10 -1
- package/dist/lib/components/tabs/UnderlineTabsView.d.ts +41 -0
- package/dist/lib/components/testid.test.d.ts +1 -0
- package/dist/lib/core/IconSize.d.ts +37 -0
- package/dist/lib/core/TerminalPalette.d.ts +81 -0
- package/dist/lib/core/TerminalPaletteFile.d.ts +61 -0
- package/dist/lib/core/TerminalPaletteFile.test.d.ts +1 -0
- package/dist/lib/index.d.ts +65 -0
- package/dist/monaco-setup.js +589 -493
- package/dist/monaco-setup.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/theme/editor.js +1 -1
- package/package.json +5 -3
- package/dist/assets/DuiShowcase-CRLG9S4N.css +0 -1
- package/dist/chunks/EditorView.shell-DWGMOgiy.js +0 -510
- package/dist/chunks/EditorView.shell-DWGMOgiy.js.map +0 -1
- package/dist/chunks/daakia-icons-BpwUOdSO.js.map +0 -1
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ReactNode, CSSProperties } from 'react';
|
|
2
|
+
export interface GroupHeaderViewProps {
|
|
3
|
+
/** The group's name. Set in small caps, because it is a label not a heading. */
|
|
4
|
+
name: string;
|
|
5
|
+
/** How many are in it. */
|
|
6
|
+
count?: number | string;
|
|
7
|
+
/**
|
|
8
|
+
* What the group is worth knowing at a glance — a chip, a count of the ones
|
|
9
|
+
* that need attention.
|
|
10
|
+
*
|
|
11
|
+
* Sits after the rule, hard right, so a column of group headers puts every
|
|
12
|
+
* summary in the same place and the eye can run straight down them.
|
|
13
|
+
*/
|
|
14
|
+
summary?: ReactNode;
|
|
15
|
+
/** Tints the name — for the pile nobody owns. */
|
|
16
|
+
tone?: string;
|
|
17
|
+
className?: string;
|
|
18
|
+
style?: CSSProperties;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The line above a group of things.
|
|
22
|
+
*
|
|
23
|
+
* Name, size, a rule that eats the remaining width, and the one fact about the
|
|
24
|
+
* group worth carrying. The rule is what makes a stack of these read as
|
|
25
|
+
* sections rather than as a list with bold entries in it, and it costs nothing
|
|
26
|
+
* — it is the leftover space, drawn.
|
|
27
|
+
*/
|
|
28
|
+
export declare function GroupHeaderView({ name, count, summary, tone, className, style, }: GroupHeaderViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
export interface IssueCardSkeletonViewProps {
|
|
3
|
+
/** Leave room for the evidence strip, when the board shows screenshots. */
|
|
4
|
+
media?: boolean;
|
|
5
|
+
/**
|
|
6
|
+
* How long the title bar is, 0–1.
|
|
7
|
+
*
|
|
8
|
+
* Varied by the caller across a grid so the placeholder reads as a list of
|
|
9
|
+
* different things rather than a printed pattern — a wall of identical bars
|
|
10
|
+
* looks like a rendering bug, which is the opposite of reassuring.
|
|
11
|
+
*/
|
|
12
|
+
titleFill?: number;
|
|
13
|
+
className?: string;
|
|
14
|
+
style?: CSSProperties;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* An issue card that has not arrived yet.
|
|
18
|
+
*
|
|
19
|
+
* Deliberately the twin of IssueCardView: same padding, radius, gaps and row
|
|
20
|
+
* order, so the real card lands exactly where the placeholder stood and the
|
|
21
|
+
* grid does not jump under a cursor already on its way to a click.
|
|
22
|
+
*
|
|
23
|
+
* A skeleton rather than a spinner because the shape is the information — a
|
|
24
|
+
* reader can see a board is coming, roughly how much of it, and start moving
|
|
25
|
+
* before the data lands. A centred spinner says only "wait", and a centred
|
|
26
|
+
* panel that takes over the whole view says "something is wrong".
|
|
27
|
+
*/
|
|
28
|
+
export declare function IssueCardSkeletonView({ media, titleFill, className, style, }: IssueCardSkeletonViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ReactNode, CSSProperties } from 'react';
|
|
2
|
+
export interface IssueCardViewProps {
|
|
3
|
+
/** The identifier, shown as given — `#41`, `PROJ-8`. */
|
|
4
|
+
reference?: string;
|
|
5
|
+
title: string;
|
|
6
|
+
/**
|
|
7
|
+
* The chips beside the reference — module, environment, whatever classifies
|
|
8
|
+
* this one. Rendered by the caller so it can use the same chip component the
|
|
9
|
+
* rest of the screen uses.
|
|
10
|
+
*/
|
|
11
|
+
chips?: ReactNode;
|
|
12
|
+
/** Evidence: a screenshot strip, a thumbnail. Sits under the title. */
|
|
13
|
+
media?: ReactNode;
|
|
14
|
+
/** The left of the footer: an avatar, or the word for having no owner. */
|
|
15
|
+
owner?: ReactNode;
|
|
16
|
+
/** Beside the owner: priority, state. */
|
|
17
|
+
mark?: ReactNode;
|
|
18
|
+
/** The right of the footer: age, comment count, a stale chip. */
|
|
19
|
+
meta?: ReactNode;
|
|
20
|
+
/** Lift the card — selected, or dragged over. */
|
|
21
|
+
selected?: boolean;
|
|
22
|
+
accentColor?: string;
|
|
23
|
+
onClick?: () => void;
|
|
24
|
+
tooltip?: string;
|
|
25
|
+
className?: string;
|
|
26
|
+
style?: CSSProperties;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* One tracked item on a board — an issue, a ticket.
|
|
30
|
+
*
|
|
31
|
+
* The order is the whole component: reference and classification, then the
|
|
32
|
+
* sentence, then the evidence, then who and when. A reader who has scanned one
|
|
33
|
+
* card knows where to look on every other one, which is the only reason a board
|
|
34
|
+
* beats a table.
|
|
35
|
+
*
|
|
36
|
+
* The title is never truncated. A card whose sentence ends in an ellipsis makes
|
|
37
|
+
* you open the item to find out whether you cared, which is precisely the work
|
|
38
|
+
* the board existed to save; cards in a row may be different heights instead.
|
|
39
|
+
*/
|
|
40
|
+
export declare function IssueCardView({ reference, title, chips, media, owner, mark, meta, selected, accentColor, onClick, tooltip, className, style, }: IssueCardViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import { Span } from './lane-scale';
|
|
3
|
+
export interface LaneSeries {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
points: {
|
|
7
|
+
at: number;
|
|
8
|
+
value: number;
|
|
9
|
+
}[];
|
|
10
|
+
color?: string;
|
|
11
|
+
/** Fill under the line. Off for a series read as a level rather than a volume. */
|
|
12
|
+
filled?: boolean;
|
|
13
|
+
/** Right-hand readout — usually the latest or peak value, already formatted. */
|
|
14
|
+
readout?: string;
|
|
15
|
+
/** Draw as ticks rising from the baseline instead of a line: events, not a level. */
|
|
16
|
+
kind?: 'line' | 'ticks';
|
|
17
|
+
}
|
|
18
|
+
export interface LaneMarker {
|
|
19
|
+
at: number;
|
|
20
|
+
label?: string;
|
|
21
|
+
color?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface LaneChartViewProps {
|
|
24
|
+
series: LaneSeries[];
|
|
25
|
+
markers?: LaneMarker[];
|
|
26
|
+
laneHeight?: number;
|
|
27
|
+
/** Clamp the axis instead of deriving it from the data. */
|
|
28
|
+
window?: Span;
|
|
29
|
+
className?: string;
|
|
30
|
+
style?: CSSProperties;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Several measurements over one time axis.
|
|
34
|
+
*
|
|
35
|
+
* Telemetry read as a stack of lanes rather than one chart with many lines:
|
|
36
|
+
* heap in megabytes and CPU in percent share no y scale, and overlaying them
|
|
37
|
+
* forces either two axes or a normalisation that makes both meaningless.
|
|
38
|
+
* Separate lanes keep each series in its own units and still let the eye run
|
|
39
|
+
* a vertical line down the stack, which is the actual question — what else was
|
|
40
|
+
* happening when this happened.
|
|
41
|
+
*
|
|
42
|
+
* The axis is shared and computed across every series, for the same reason the
|
|
43
|
+
* swimlane's is: lanes scaled independently put simultaneous events in
|
|
44
|
+
* different columns.
|
|
45
|
+
*/
|
|
46
|
+
export declare function LaneChartView({ series, markers, laneHeight, window: fixedWindow, className, style, }: LaneChartViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
export interface LineDiffViewProps {
|
|
3
|
+
left: string;
|
|
4
|
+
right: string;
|
|
5
|
+
leftLabel?: string;
|
|
6
|
+
rightLabel?: string;
|
|
7
|
+
/** Shown beside the label — e.g. a filename, or "not present". */
|
|
8
|
+
leftNote?: string;
|
|
9
|
+
rightNote?: string;
|
|
10
|
+
/** A fixed height, or omit to fill a flex parent. */
|
|
11
|
+
height?: number | string;
|
|
12
|
+
/** Adds a "+n / −n" tally to each header. */
|
|
13
|
+
showTally?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Colour of the two header labels.
|
|
16
|
+
*
|
|
17
|
+
* Defaults to error on the left and success on the right, which is the
|
|
18
|
+
* convention every diff uses: what left had and right does not is a removal.
|
|
19
|
+
*/
|
|
20
|
+
leftTone?: string;
|
|
21
|
+
rightTone?: string;
|
|
22
|
+
className?: string;
|
|
23
|
+
style?: CSSProperties;
|
|
24
|
+
}
|
|
25
|
+
export declare function LineDiffView({ left, right, leftLabel, rightLabel, leftNote, rightNote, height, showTally, leftTone, rightTone, className, style, }: LineDiffViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
export type PriorityMarkLevel = 'urgent' | 'high' | 'medium' | 'low' | 'none';
|
|
3
|
+
export interface PriorityMarkViewProps {
|
|
4
|
+
level: PriorityMarkLevel;
|
|
5
|
+
/** Show the word as well as the ring. On by default. */
|
|
6
|
+
showLabel?: boolean;
|
|
7
|
+
/** Override the word — for a tracker that calls Urgent something else. */
|
|
8
|
+
label?: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
style?: CSSProperties;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* A priority, as a ring and a word.
|
|
14
|
+
*
|
|
15
|
+
* A ring rather than a filled dot, because status is already a filled dot
|
|
16
|
+
* everywhere else and the two sit side by side on the same row — two solid
|
|
17
|
+
* dots in different palettes read as one broken thing. The ring is the whole
|
|
18
|
+
* distinction, and it survives being 7px.
|
|
19
|
+
*/
|
|
20
|
+
export declare function PriorityMarkView({ level, showLabel, label, className, style, }: PriorityMarkViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { ReactNode, CSSProperties } from 'react';
|
|
2
|
+
export interface SetupOptionViewProps {
|
|
3
|
+
/** The route's name — `winget`, `Homebrew`, `Sign in with a browser`. */
|
|
4
|
+
title: string;
|
|
5
|
+
/** A short marker beside the title: `recommended`, `apt`, `needs admin`. */
|
|
6
|
+
tag?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Lift it as the one to pick.
|
|
9
|
+
*
|
|
10
|
+
* Exactly one option in a set should carry this. A screen where every card is
|
|
11
|
+
* highlighted has no recommendation on it, only decoration.
|
|
12
|
+
*/
|
|
13
|
+
recommended?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* The command to run, shown with a copy button — never a button that runs it.
|
|
16
|
+
*
|
|
17
|
+
* Installing software and authenticating are the reader's actions. A one-click
|
|
18
|
+
* "do it for me" here would be running an installer, or driving a credential
|
|
19
|
+
* flow, on somebody's behalf.
|
|
20
|
+
*/
|
|
21
|
+
command?: string;
|
|
22
|
+
/** The language for the command block. Shell by default. */
|
|
23
|
+
language?: string;
|
|
24
|
+
/**
|
|
25
|
+
* What a reader needs in order to choose THIS one over the one beside it —
|
|
26
|
+
* not what the command does, which the command already says.
|
|
27
|
+
*/
|
|
28
|
+
note?: ReactNode;
|
|
29
|
+
/** A control in the header: a link out, a picker, a button. */
|
|
30
|
+
action?: ReactNode;
|
|
31
|
+
/**
|
|
32
|
+
* The route's own controls, where a command is not the thing to show — a
|
|
33
|
+
* field to type into, a list to choose from.
|
|
34
|
+
*
|
|
35
|
+
* Sits where the command would, so a set of cards mixing the two still lines
|
|
36
|
+
* up: name, the thing you interact with, then the one line about when to
|
|
37
|
+
* pick it.
|
|
38
|
+
*/
|
|
39
|
+
children?: ReactNode;
|
|
40
|
+
accentColor?: string;
|
|
41
|
+
className?: string;
|
|
42
|
+
style?: CSSProperties;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* One way to get something set up, among several.
|
|
46
|
+
*
|
|
47
|
+
* The shape every install or sign-in screen converges on: a name, the exact
|
|
48
|
+
* thing to run, and one line on when to pick it. Fixing that order in a
|
|
49
|
+
* component keeps a grid of routes scannable — a reader compares the same part
|
|
50
|
+
* of each card rather than re-reading whole paragraphs to find the command.
|
|
51
|
+
*
|
|
52
|
+
* The card never performs the route itself. It shows what to run and lets the
|
|
53
|
+
* reader run it, which is the only honest arrangement for actions that install
|
|
54
|
+
* software or reach a credential store.
|
|
55
|
+
*/
|
|
56
|
+
export declare function SetupOptionView({ title, tag, recommended, command, language, note, action, children, accentColor, className, style, }: SetupOptionViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import { HierarchyNode, SunburstSlice } from './hierarchy-layout';
|
|
3
|
+
export interface SunburstViewProps {
|
|
4
|
+
root: HierarchyNode;
|
|
5
|
+
size?: number;
|
|
6
|
+
/** Rings drawn outward from the centre. */
|
|
7
|
+
maxDepth?: number;
|
|
8
|
+
/** Slices thinner than this share of the whole are dropped. */
|
|
9
|
+
minShare?: number;
|
|
10
|
+
accentColor?: string;
|
|
11
|
+
/** Format the value for the centre label and tooltips. */
|
|
12
|
+
format?: (value: number) => string;
|
|
13
|
+
/** Shown in the hole when nothing is hovered. */
|
|
14
|
+
centerLabel?: string;
|
|
15
|
+
onSelect?: (slice: SunburstSlice) => void;
|
|
16
|
+
className?: string;
|
|
17
|
+
style?: CSSProperties;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* A hierarchy as concentric rings.
|
|
21
|
+
*
|
|
22
|
+
* The profiler's idiom for "what is big and what is inside it": each ring is a
|
|
23
|
+
* level, each slice is sized by its share, and a child sits inside the arc of
|
|
24
|
+
* its parent. Reading outward from the centre follows containment, which is
|
|
25
|
+
* what a treemap makes you infer from adjacency instead.
|
|
26
|
+
*
|
|
27
|
+
* Hue is derived from depth and position rather than from a palette, so a
|
|
28
|
+
* hierarchy of any width gets distinguishable neighbours without the caller
|
|
29
|
+
* supplying colours. Lightness falls with depth, which is what makes the
|
|
30
|
+
* nesting legible at a glance — outer rings recede.
|
|
31
|
+
*/
|
|
32
|
+
export declare function SunburstView({ root, size, maxDepth, minShare, accentColor, format, centerLabel, onSelect, className, style, }: SunburstViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import { Span } from './lane-scale';
|
|
3
|
+
export interface SwimlaneSegment extends Span {
|
|
4
|
+
/** What state this stretch was in. Drives the colour via `colors`. */
|
|
5
|
+
state: string;
|
|
6
|
+
/** Anything the caller wants back on hover or click. */
|
|
7
|
+
meta?: unknown;
|
|
8
|
+
}
|
|
9
|
+
export interface SwimlaneRow {
|
|
10
|
+
id: string;
|
|
11
|
+
label: string;
|
|
12
|
+
segments: SwimlaneSegment[];
|
|
13
|
+
}
|
|
14
|
+
export interface SwimlaneMarker {
|
|
15
|
+
at: number;
|
|
16
|
+
label?: string;
|
|
17
|
+
color?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface SwimlaneChartViewProps {
|
|
20
|
+
rows: SwimlaneRow[];
|
|
21
|
+
/** state → colour. A state with no entry is drawn in the muted default. */
|
|
22
|
+
colors: Record<string, string>;
|
|
23
|
+
/** Vertical marks across every lane — a dump taken, a GC, a deploy. */
|
|
24
|
+
markers?: SwimlaneMarker[];
|
|
25
|
+
rowHeight?: number;
|
|
26
|
+
/** Width of the label gutter. */
|
|
27
|
+
labelWidth?: number;
|
|
28
|
+
/** Clamp the axis instead of deriving it from the data. */
|
|
29
|
+
window?: Span;
|
|
30
|
+
format?: (span: Span) => string;
|
|
31
|
+
onSelect?: (row: SwimlaneRow, segment: SwimlaneSegment) => void;
|
|
32
|
+
className?: string;
|
|
33
|
+
style?: CSSProperties;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Entities on a shared timeline, coloured by what they were doing.
|
|
37
|
+
*
|
|
38
|
+
* Threads by state, connections by lifetime, pods by phase — the shape is the
|
|
39
|
+
* same whenever the question is "what was each of these doing, and did they do
|
|
40
|
+
* it at the same time". The vertical alignment IS the information: three rows
|
|
41
|
+
* turning red within the same 40ms is a lock, and no table of states will ever
|
|
42
|
+
* show that.
|
|
43
|
+
*
|
|
44
|
+
* Every lane shares one axis, computed across all rows. Scaling lanes
|
|
45
|
+
* independently would put simultaneous events in different columns, which
|
|
46
|
+
* destroys the only thing this chart is for.
|
|
47
|
+
*/
|
|
48
|
+
export declare function SwimlaneChartView({ rows, colors, markers, rowHeight, labelWidth, window: fixedWindow, format, onSelect, className, style, }: SwimlaneChartViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
export interface TableSkeletonColumn {
|
|
3
|
+
/**
|
|
4
|
+
* A number is a fixed pixel width; a string is used as-is.
|
|
5
|
+
*
|
|
6
|
+
* `'flex'` takes the remaining space, which is how the name column in a file
|
|
7
|
+
* list behaves — the one column whose width is not known in advance.
|
|
8
|
+
*/
|
|
9
|
+
width: number | string | 'flex';
|
|
10
|
+
/** Draw this cell's bar shorter than its column, as real content usually is. */
|
|
11
|
+
fill?: number;
|
|
12
|
+
align?: 'left' | 'right';
|
|
13
|
+
}
|
|
14
|
+
export interface TableSkeletonViewProps {
|
|
15
|
+
columns: TableSkeletonColumn[];
|
|
16
|
+
/** Height of one row, matching the table this stands in for. */
|
|
17
|
+
rowHeight?: number;
|
|
18
|
+
/** Fixed row count. Omit to fill the available height. */
|
|
19
|
+
rows?: number;
|
|
20
|
+
/** A small square before the first column — a file or status icon. */
|
|
21
|
+
leadingIcon?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Fraction of the measured height to fill. Default 1.
|
|
24
|
+
*
|
|
25
|
+
* A placeholder that reaches the last pixel of the panel is claiming the
|
|
26
|
+
* list is exactly as long as the window, and when the real rows turn out to
|
|
27
|
+
* be fewer the whole thing appears to collapse. Filling part of the space
|
|
28
|
+
* says "a list is coming" without promising how much of one.
|
|
29
|
+
*/
|
|
30
|
+
fill?: number;
|
|
31
|
+
className?: string;
|
|
32
|
+
style?: CSSProperties;
|
|
33
|
+
}
|
|
34
|
+
export declare function TableSkeletonView({ columns, rowHeight, rows, leadingIcon, fill, className, style, }: TableSkeletonViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Layout maths for the hierarchical charts.
|
|
3
|
+
*
|
|
4
|
+
* Kept apart from the components because this is the part that can be wrong in
|
|
5
|
+
* ways nobody sees: an arc that is two degrees short, a row whose widths do not
|
|
6
|
+
* sum to the parent, a depth that quietly drops the deepest frames. A chart
|
|
7
|
+
* that renders is not a chart that is correct, so the arithmetic is separated
|
|
8
|
+
* out where it can be checked.
|
|
9
|
+
*/
|
|
10
|
+
/** A node in anything hierarchical — a heap, a stack, a filesystem. */
|
|
11
|
+
export interface HierarchyNode {
|
|
12
|
+
name: string;
|
|
13
|
+
/** Own size. Ignored when there are children — the parent is their sum. */
|
|
14
|
+
value?: number;
|
|
15
|
+
children?: HierarchyNode[];
|
|
16
|
+
/** Anything the caller wants back on the laid-out slice. */
|
|
17
|
+
meta?: unknown;
|
|
18
|
+
}
|
|
19
|
+
/** One laid-out ring segment. Angles are radians, clockwise from 12 o'clock. */
|
|
20
|
+
export interface SunburstSlice {
|
|
21
|
+
name: string;
|
|
22
|
+
value: number;
|
|
23
|
+
depth: number;
|
|
24
|
+
startAngle: number;
|
|
25
|
+
endAngle: number;
|
|
26
|
+
/** Share of the whole, 0–1. Useful for labelling and for hiding slivers. */
|
|
27
|
+
share: number;
|
|
28
|
+
meta?: unknown;
|
|
29
|
+
}
|
|
30
|
+
/** One laid-out flame-graph cell. x and width are fractions of the total, 0–1. */
|
|
31
|
+
export interface FlameCell {
|
|
32
|
+
name: string;
|
|
33
|
+
value: number;
|
|
34
|
+
depth: number;
|
|
35
|
+
x: number;
|
|
36
|
+
width: number;
|
|
37
|
+
meta?: unknown;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* A node's total, computed once.
|
|
41
|
+
*
|
|
42
|
+
* A leaf is its own value; a parent is the sum of its children, and its own
|
|
43
|
+
* `value` is ignored rather than added. Adding both is the classic way to get
|
|
44
|
+
* a chart whose slices exceed the circle: every level double-counts, and the
|
|
45
|
+
* error compounds with depth so it looks fine at the top and absurd at the
|
|
46
|
+
* bottom.
|
|
47
|
+
*/
|
|
48
|
+
export declare function totalOf(node: HierarchyNode): number;
|
|
49
|
+
/**
|
|
50
|
+
* Lay a hierarchy out as concentric rings.
|
|
51
|
+
*
|
|
52
|
+
* The root occupies the full circle and is not emitted — it is the hole in the
|
|
53
|
+
* middle, and drawing it would put a disc over the labels. Children divide
|
|
54
|
+
* their parent's arc in the order given, so a caller that wants them biggest
|
|
55
|
+
* first sorts before calling; this does not reorder, because for a stack the
|
|
56
|
+
* order IS the meaning.
|
|
57
|
+
*
|
|
58
|
+
* `minShare` drops slices too thin to see. They are dropped rather than
|
|
59
|
+
* merged into a sibling, and their arc is left empty: a "other" wedge invents
|
|
60
|
+
* a thing that is not in the data, and stretching the survivors to fill the
|
|
61
|
+
* gap would misstate every remaining share.
|
|
62
|
+
*/
|
|
63
|
+
export declare function sunburstLayout(root: HierarchyNode, opts?: {
|
|
64
|
+
maxDepth?: number;
|
|
65
|
+
minShare?: number;
|
|
66
|
+
}): SunburstSlice[];
|
|
67
|
+
/**
|
|
68
|
+
* Lay a hierarchy out as a flame graph.
|
|
69
|
+
*
|
|
70
|
+
* Same arithmetic as the sunburst, unrolled: each level is a row, a child's
|
|
71
|
+
* width is its share of the parent's width, and children sit directly beneath
|
|
72
|
+
* the parent they came from. The root is emitted here — in a flame graph it is
|
|
73
|
+
* the base everything stands on, and leaving it out makes the first real row
|
|
74
|
+
* look like it floats.
|
|
75
|
+
*/
|
|
76
|
+
export declare function flameLayout(root: HierarchyNode, opts?: {
|
|
77
|
+
maxDepth?: number;
|
|
78
|
+
minWidth?: number;
|
|
79
|
+
}): FlameCell[];
|
|
80
|
+
/** One laid-out donut segment. */
|
|
81
|
+
export interface DonutSlice {
|
|
82
|
+
name: string;
|
|
83
|
+
value: number;
|
|
84
|
+
startAngle: number;
|
|
85
|
+
endAngle: number;
|
|
86
|
+
share: number;
|
|
87
|
+
meta?: unknown;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* A single ring, with the tail rolled up.
|
|
91
|
+
*
|
|
92
|
+
* Unlike the sunburst this DOES gather what it drops, into an explicit
|
|
93
|
+
* "other" slice — a flat breakdown of a whole is read as a whole, and a
|
|
94
|
+
* missing wedge there reads as a rendering bug rather than as a decision.
|
|
95
|
+
* The rolled-up slice is named, so nobody mistakes it for a real category.
|
|
96
|
+
*/
|
|
97
|
+
export declare function donutLayout(items: {
|
|
98
|
+
name: string;
|
|
99
|
+
value: number;
|
|
100
|
+
meta?: unknown;
|
|
101
|
+
}[], opts?: {
|
|
102
|
+
maxSlices?: number;
|
|
103
|
+
otherLabel?: string;
|
|
104
|
+
}): DonutSlice[];
|
|
105
|
+
/**
|
|
106
|
+
* An SVG arc path for a ring segment.
|
|
107
|
+
*
|
|
108
|
+
* Written out rather than pulled from a library because it is twenty lines and
|
|
109
|
+
* the alternative is a dependency in a component library. The full-circle case
|
|
110
|
+
* is special: an arc from an angle back to the same angle draws nothing, so a
|
|
111
|
+
* lone 100% slice would vanish — which is exactly the case a donut of one
|
|
112
|
+
* dominant thing produces.
|
|
113
|
+
*/
|
|
114
|
+
export declare function arcPath(cx: number, cy: number, rInner: number, rOuter: number, startAngle: number, endAngle: number): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Time-to-pixel maths for the lane charts.
|
|
3
|
+
*
|
|
4
|
+
* Separated for the same reason as the hierarchy layout: a chart that renders
|
|
5
|
+
* is not a chart that is correct. A segment one pixel wide when it should be
|
|
6
|
+
* forty, a lane whose last event falls off the right edge, two lanes that
|
|
7
|
+
* disagree about where "now" is — all of them look like a drawing and none of
|
|
8
|
+
* them look like a bug.
|
|
9
|
+
*/
|
|
10
|
+
export interface Span {
|
|
11
|
+
/** Start, in whatever unit the caller is using. Milliseconds, usually. */
|
|
12
|
+
from: number;
|
|
13
|
+
to: number;
|
|
14
|
+
}
|
|
15
|
+
/** A span placed on the axis, as fractions of the width. */
|
|
16
|
+
export interface PlacedSpan {
|
|
17
|
+
x: number;
|
|
18
|
+
width: number;
|
|
19
|
+
/** True when the span was cut by the window rather than ending inside it. */
|
|
20
|
+
clippedStart: boolean;
|
|
21
|
+
clippedEnd: boolean;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* The window every lane shares.
|
|
25
|
+
*
|
|
26
|
+
* Computed once from all lanes rather than per lane, because a shared axis is
|
|
27
|
+
* the entire point: two lanes scaled independently put simultaneous events in
|
|
28
|
+
* different places, which is worse than not drawing them at all.
|
|
29
|
+
*/
|
|
30
|
+
export declare function windowOf(spans: Span[]): Span | null;
|
|
31
|
+
/**
|
|
32
|
+
* Place a span on the axis, clipped to the window.
|
|
33
|
+
*
|
|
34
|
+
* Returns null when the span is entirely outside, so a caller can drop it
|
|
35
|
+
* rather than draw a zero-width rectangle at the edge — which reads as an
|
|
36
|
+
* event that happened at the boundary and did not.
|
|
37
|
+
*/
|
|
38
|
+
export declare function place(span: Span, win: Span): PlacedSpan | null;
|
|
39
|
+
/** A single instant on the axis, for a marker. */
|
|
40
|
+
export declare function placeAt(at: number, win: Span): number | null;
|
|
41
|
+
/**
|
|
42
|
+
* A polyline through a series, in fractions of width and height.
|
|
43
|
+
*
|
|
44
|
+
* y is inverted here — 0 is the top in screen space and the highest value
|
|
45
|
+
* should be highest on screen. Doing that at the call site is how a chart ends
|
|
46
|
+
* up upside down in one lane and not the others.
|
|
47
|
+
*/
|
|
48
|
+
export declare function polyline(points: {
|
|
49
|
+
at: number;
|
|
50
|
+
value: number;
|
|
51
|
+
}[], win: Span, opts?: {
|
|
52
|
+
min?: number;
|
|
53
|
+
max?: number;
|
|
54
|
+
}): {
|
|
55
|
+
x: number;
|
|
56
|
+
y: number;
|
|
57
|
+
}[];
|
|
58
|
+
/** An SVG path for a polyline already in fractions, scaled to a box. */
|
|
59
|
+
export declare function pathFor(pts: {
|
|
60
|
+
x: number;
|
|
61
|
+
y: number;
|
|
62
|
+
}[], w: number, h: number): string;
|
|
63
|
+
/** The same polyline closed to the baseline, for an area fill. */
|
|
64
|
+
export declare function areaFor(pts: {
|
|
65
|
+
x: number;
|
|
66
|
+
y: number;
|
|
67
|
+
}[], w: number, h: number): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Line diff by longest common subsequence.
|
|
3
|
+
*
|
|
4
|
+
* ── Why LCS and not a line-by-line walk ──
|
|
5
|
+
*
|
|
6
|
+
* Two versions of the same text usually differ by an inserted line, and a
|
|
7
|
+
* positional comparison reports every line after the insertion as changed —
|
|
8
|
+
* which is technically true and useless. LCS finds the longest run of lines
|
|
9
|
+
* both sides agree on and marks only what is genuinely outside it, so one
|
|
10
|
+
* added line reads as one added line.
|
|
11
|
+
*
|
|
12
|
+
* ── The size guard ──
|
|
13
|
+
*
|
|
14
|
+
* The table is O(n·m) in memory. A pair of 5,000-line files is 25 million
|
|
15
|
+
* cells, which is a frozen tab rather than a diff. Past the cap the two sides
|
|
16
|
+
* are emitted whole — every line of the left as removed, every line of the
|
|
17
|
+
* right as added — which is honest about being a fallback rather than quietly
|
|
18
|
+
* returning a wrong-but-plausible diff.
|
|
19
|
+
*/
|
|
20
|
+
export type DiffOp = 'same' | 'add' | 'remove';
|
|
21
|
+
export interface DiffLine {
|
|
22
|
+
op: DiffOp;
|
|
23
|
+
/** 1-based line number on the left, or null for an added line. */
|
|
24
|
+
leftLine: number | null;
|
|
25
|
+
/** 1-based line number on the right, or null for a removed line. */
|
|
26
|
+
rightLine: number | null;
|
|
27
|
+
text: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Compare two texts line by line.
|
|
31
|
+
*
|
|
32
|
+
* Trailing whitespace is ignored when deciding whether two lines match — a
|
|
33
|
+
* file that differs only in trailing spaces has not changed — but the text
|
|
34
|
+
* returned is the original, so the diff shows what is actually there.
|
|
35
|
+
*/
|
|
36
|
+
export declare function diffLines(left: string, right: string): DiffLine[];
|
|
37
|
+
export interface DiffTally {
|
|
38
|
+
added: number;
|
|
39
|
+
removed: number;
|
|
40
|
+
same: number;
|
|
41
|
+
}
|
|
42
|
+
export declare function tallyDiff(lines: DiffLine[]): DiffTally;
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import { CSSProperties } from 'react';
|
|
2
2
|
import { DuiSize } from '../../core/DuiTypes';
|
|
3
3
|
export interface AvatarUploadViewProps {
|
|
4
|
+
/**
|
|
5
|
+
* A stable hook for tests and automation.
|
|
6
|
+
*
|
|
7
|
+
* Lands on this component's root element as `data-testid`. Worth setting on
|
|
8
|
+
* anything a test drives: several dui inputs render a `contenteditable` div
|
|
9
|
+
* with a decorative placeholder span, which neither `getByPlaceholder` nor
|
|
10
|
+
* `getByRole` reliably finds.
|
|
11
|
+
*/
|
|
12
|
+
testId?: string;
|
|
4
13
|
/** Preview image URL, or null/undefined for the empty state. */
|
|
5
14
|
src?: string | null;
|
|
6
15
|
onFileSelected: (file: File) => void;
|
|
@@ -11,4 +20,4 @@ export interface AvatarUploadViewProps {
|
|
|
11
20
|
className?: string;
|
|
12
21
|
style?: CSSProperties;
|
|
13
22
|
}
|
|
14
|
-
export declare function AvatarUploadView({ src, onFileSelected, initials, disabled, size, color, className, style, }: AvatarUploadViewProps): import("react").JSX.Element;
|
|
23
|
+
export declare function AvatarUploadView({ testId, src, onFileSelected, initials, disabled, size, color, className, style, }: AvatarUploadViewProps): import("react").JSX.Element;
|
|
@@ -5,6 +5,15 @@ export type CalendarRangeStyle = 'tint' | 'block';
|
|
|
5
5
|
/** ISO `YYYY-MM-DD` date string. */
|
|
6
6
|
export type IsoDate = string;
|
|
7
7
|
export interface CalendarViewProps {
|
|
8
|
+
/**
|
|
9
|
+
* A stable hook for tests and automation.
|
|
10
|
+
*
|
|
11
|
+
* Lands on this component's root element as `data-testid`. Worth setting on
|
|
12
|
+
* anything a test drives: several dui inputs render a `contenteditable` div
|
|
13
|
+
* with a decorative placeholder span, which neither `getByPlaceholder` nor
|
|
14
|
+
* `getByRole` reliably finds.
|
|
15
|
+
*/
|
|
16
|
+
testId?: string;
|
|
8
17
|
mode?: CalendarMode;
|
|
9
18
|
/** `single`: IsoDate | null. `range`: [IsoDate | null, IsoDate | null]. `multi`: IsoDate[]. */
|
|
10
19
|
value: IsoDate | null | [IsoDate | null, IsoDate | null] | IsoDate[];
|
|
@@ -22,4 +31,4 @@ export interface CalendarViewProps {
|
|
|
22
31
|
className?: string;
|
|
23
32
|
style?: React.CSSProperties;
|
|
24
33
|
}
|
|
25
|
-
export declare function CalendarView({ mode, value, onChange, minDate, maxDate, disabledDates, rangeStyle, size, width, borderRadius, color, className, style, }: CalendarViewProps): import("react").JSX.Element;
|
|
34
|
+
export declare function CalendarView({ testId, mode, value, onChange, minDate, maxDate, disabledDates, rangeStyle, size, width, borderRadius, color, className, style, }: CalendarViewProps): import("react").JSX.Element;
|
|
@@ -6,6 +6,15 @@ export interface CascaderOption {
|
|
|
6
6
|
children?: CascaderOption[];
|
|
7
7
|
}
|
|
8
8
|
export interface CascaderViewProps {
|
|
9
|
+
/**
|
|
10
|
+
* A stable hook for tests and automation.
|
|
11
|
+
*
|
|
12
|
+
* Lands on this component's root element as `data-testid`. Worth setting on
|
|
13
|
+
* anything a test drives: several dui inputs render a `contenteditable` div
|
|
14
|
+
* with a decorative placeholder span, which neither `getByPlaceholder` nor
|
|
15
|
+
* `getByRole` reliably finds.
|
|
16
|
+
*/
|
|
17
|
+
testId?: string;
|
|
9
18
|
options: CascaderOption[];
|
|
10
19
|
/** Selected path, e.g. ['us', 'ca', 'sf']. */
|
|
11
20
|
value: string[];
|
|
@@ -20,4 +29,4 @@ export interface CascaderViewProps {
|
|
|
20
29
|
style?: CSSProperties;
|
|
21
30
|
}
|
|
22
31
|
/** Multi-level cascading select — region/category trees. */
|
|
23
|
-
export declare function CascaderView({ options, value, onChange, placeholder, disabled, size, width, borderRadius, color, className, style, }: CascaderViewProps): import("react").JSX.Element;
|
|
32
|
+
export declare function CascaderView({ testId, options, value, onChange, placeholder, disabled, size, width, borderRadius, color, className, style, }: CascaderViewProps): import("react").JSX.Element;
|