@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
|
@@ -10,9 +10,18 @@ export interface ThemeOption {
|
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
12
|
export interface ThemeCardSelectorViewProps {
|
|
13
|
+
/**
|
|
14
|
+
* A stable hook for tests and automation.
|
|
15
|
+
*
|
|
16
|
+
* Lands on this component's root element as `data-testid`. Worth setting on
|
|
17
|
+
* anything a test drives: several dui inputs render a `contenteditable` div
|
|
18
|
+
* with a decorative placeholder span, which neither `getByPlaceholder` nor
|
|
19
|
+
* `getByRole` reliably finds.
|
|
20
|
+
*/
|
|
21
|
+
testId?: string;
|
|
13
22
|
options: ThemeOption[];
|
|
14
23
|
value: string;
|
|
15
24
|
onChange: (value: string) => void;
|
|
16
25
|
className?: string;
|
|
17
26
|
}
|
|
18
|
-
export declare function ThemeCardSelectorView({ options, value, onChange, className, }: ThemeCardSelectorViewProps): import("react").JSX.Element;
|
|
27
|
+
export declare function ThemeCardSelectorView({ testId, options, value, onChange, className, }: ThemeCardSelectorViewProps): import("react").JSX.Element;
|
|
@@ -5,6 +5,15 @@ export interface TimeWheelValue {
|
|
|
5
5
|
meridiem?: 'AM' | 'PM';
|
|
6
6
|
}
|
|
7
7
|
export interface TimeWheelViewProps {
|
|
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
|
value: TimeWheelValue;
|
|
9
18
|
onChange: (value: TimeWheelValue) => void;
|
|
10
19
|
use24Hour?: boolean;
|
|
@@ -18,4 +27,4 @@ export interface TimeWheelViewProps {
|
|
|
18
27
|
className?: string;
|
|
19
28
|
style?: React.CSSProperties;
|
|
20
29
|
}
|
|
21
|
-
export declare function TimeWheelView({ value, onChange, use24Hour, minuteStep, size, width, borderRadius, color, visibleRows, disabled, className, style, }: TimeWheelViewProps): import("react").JSX.Element;
|
|
30
|
+
export declare function TimeWheelView({ testId, value, onChange, use24Hour, minuteStep, size, width, borderRadius, color, visibleRows, disabled, className, style, }: TimeWheelViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { SelectInputSize } from './SelectInputView';
|
|
2
|
+
/** The browser's own zone, e.g. `America/Chicago`. */
|
|
3
|
+
export declare function localTimeZone(): string;
|
|
4
|
+
/** The zones this runtime knows, common ones first. Falls back to a short list. */
|
|
5
|
+
export declare function timeZoneList(): string[];
|
|
6
|
+
/** How far `timeZone` sits from UTC at `date`, in milliseconds. */
|
|
7
|
+
export declare function zoneOffsetMs(date: Date, timeZone: string): number;
|
|
8
|
+
/**
|
|
9
|
+
* A wall-clock `YYYY-MM-DDTHH:mm` read in `timeZone`, as an instant.
|
|
10
|
+
*
|
|
11
|
+
* Twice, because the offset itself depends on the instant: the first pass uses
|
|
12
|
+
* the offset at the guessed time, and near a daylight-saving change that guess
|
|
13
|
+
* can land on the wrong side of the transition. Re-deriving the offset at the
|
|
14
|
+
* corrected instant settles it.
|
|
15
|
+
*/
|
|
16
|
+
export declare function zonedToUtcMs(local: string, timeZone: string): number;
|
|
17
|
+
/** An instant as a `YYYY-MM-DDTHH:mm` wall-clock reading in `timeZone`. */
|
|
18
|
+
export declare function utcMsToZoned(ms: number, timeZone: string): string;
|
|
19
|
+
/** `UTC+05:30`, the way an offset is usually written. */
|
|
20
|
+
export declare function offsetLabel(timeZone: string, at?: Date): string;
|
|
21
|
+
export interface TimeZoneSelectViewProps {
|
|
22
|
+
/**
|
|
23
|
+
* A stable hook for tests and automation.
|
|
24
|
+
*
|
|
25
|
+
* Lands on this component's root element as `data-testid`. Worth setting on
|
|
26
|
+
* anything a test drives: several dui inputs render a `contenteditable` div
|
|
27
|
+
* with a decorative placeholder span, which neither `getByPlaceholder` nor
|
|
28
|
+
* `getByRole` reliably finds.
|
|
29
|
+
*/
|
|
30
|
+
testId?: string;
|
|
31
|
+
value: string;
|
|
32
|
+
onChange: (timeZone: string) => void;
|
|
33
|
+
size?: SelectInputSize;
|
|
34
|
+
width?: string | number;
|
|
35
|
+
color?: string;
|
|
36
|
+
disabled?: boolean;
|
|
37
|
+
className?: string;
|
|
38
|
+
style?: React.CSSProperties;
|
|
39
|
+
}
|
|
40
|
+
export declare function TimeZoneSelectView({ testId, value, onChange, size, width, color, disabled, className, style, }: TimeZoneSelectViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { ReactNode, CSSProperties } from 'react';
|
|
2
|
+
export type TogglePillVariant = 'default' | 'go';
|
|
3
|
+
export interface TogglePillViewProps {
|
|
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;
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
/** A glyph before the label. */
|
|
15
|
+
icon?: ReactNode;
|
|
16
|
+
/** Lit in the accent, with a tinted ground and a matching border. */
|
|
17
|
+
active?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* A number after the label — how many filters are on, how many are selected.
|
|
20
|
+
*
|
|
21
|
+
* Bold rather than a second chip: a count inside its own pill turns one
|
|
22
|
+
* control into two objects, and a toolbar of them stops being scannable.
|
|
23
|
+
*/
|
|
24
|
+
count?: number | string;
|
|
25
|
+
/**
|
|
26
|
+
* `go` fills the pill solid.
|
|
27
|
+
*
|
|
28
|
+
* For the one pill in a row that commits rather than toggles — Run, Apply,
|
|
29
|
+
* Export. It reads as a button among switches, which is what it is.
|
|
30
|
+
*/
|
|
31
|
+
variant?: TogglePillVariant;
|
|
32
|
+
accentColor?: string;
|
|
33
|
+
disabled?: boolean;
|
|
34
|
+
title?: string;
|
|
35
|
+
onClick?: () => void;
|
|
36
|
+
className?: string;
|
|
37
|
+
style?: CSSProperties;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* A toolbar pill: a small bordered control that is either on or off.
|
|
41
|
+
*
|
|
42
|
+
* The unit a dense toolbar is built from, where a segmented control would be
|
|
43
|
+
* wrong. A segmented control says "these are the choices, pick one"; a row of
|
|
44
|
+
* pills says "each of these is a thing you can turn on", which is what a view
|
|
45
|
+
* switch, a filter toggle and a grouping selector actually are — they are not
|
|
46
|
+
* one set, and boxing them into one implies a relationship that is not there.
|
|
47
|
+
*
|
|
48
|
+
* Off is a plain border on the panel, not a grey fill: a toolbar where every
|
|
49
|
+
* pill has a background is a wall, and the lit one no longer stands out.
|
|
50
|
+
*/
|
|
51
|
+
export declare function TogglePillView({ testId, children, icon, active, count, variant, accentColor, disabled, title, onClick, className, style, }: TogglePillViewProps): import("react").JSX.Element;
|
|
@@ -2,6 +2,15 @@ import { DuiSize } from '../../core/DuiTypes';
|
|
|
2
2
|
/** Accepts all 4 canonical sizes (maps to DuiToggle tokens). */
|
|
3
3
|
export type ToggleSwitchSize = DuiSize;
|
|
4
4
|
export interface ToggleSwitchViewProps {
|
|
5
|
+
/**
|
|
6
|
+
* A stable hook for tests and automation.
|
|
7
|
+
*
|
|
8
|
+
* Lands on this component's root element as `data-testid`. Worth setting on
|
|
9
|
+
* anything a test drives: several dui inputs render a `contenteditable` div
|
|
10
|
+
* with a decorative placeholder span, which neither `getByPlaceholder` nor
|
|
11
|
+
* `getByRole` reliably finds.
|
|
12
|
+
*/
|
|
13
|
+
testId?: string;
|
|
5
14
|
checked: boolean;
|
|
6
15
|
onChange: (checked: boolean) => void;
|
|
7
16
|
disabled?: boolean;
|
|
@@ -16,4 +25,4 @@ export interface ToggleSwitchViewProps {
|
|
|
16
25
|
/** Label text color override */
|
|
17
26
|
color?: string;
|
|
18
27
|
}
|
|
19
|
-
export declare function ToggleSwitchView({ checked, onChange, disabled, size, accentColor, label, labelPosition, className, activeColor, color, }: ToggleSwitchViewProps): import("react").JSX.Element;
|
|
28
|
+
export declare function ToggleSwitchView({ testId, checked, onChange, disabled, size, accentColor, label, labelPosition, className, activeColor, color, }: ToggleSwitchViewProps): import("react").JSX.Element;
|
|
@@ -5,6 +5,15 @@ export interface TransferItem {
|
|
|
5
5
|
label: string;
|
|
6
6
|
}
|
|
7
7
|
export interface TransferListViewProps {
|
|
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
|
items: TransferItem[];
|
|
9
18
|
/** Values currently on the right ("selected") side. */
|
|
10
19
|
value: string[];
|
|
@@ -18,4 +27,4 @@ export interface TransferListViewProps {
|
|
|
18
27
|
className?: string;
|
|
19
28
|
style?: CSSProperties;
|
|
20
29
|
}
|
|
21
|
-
export declare function TransferListView({ items, value, onChange, leftTitle, rightTitle, size, borderRadius, color, height, className, style, }: TransferListViewProps): import("react").JSX.Element;
|
|
30
|
+
export declare function TransferListView({ testId, items, value, onChange, leftTitle, rightTitle, size, borderRadius, color, height, className, style, }: TransferListViewProps): import("react").JSX.Element;
|
|
@@ -6,6 +6,15 @@ export interface TreeSelectNode {
|
|
|
6
6
|
children?: TreeSelectNode[];
|
|
7
7
|
}
|
|
8
8
|
export interface TreeSelectViewProps {
|
|
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
|
nodes: TreeSelectNode[];
|
|
10
19
|
/** Checked node ids. */
|
|
11
20
|
value: string[];
|
|
@@ -16,4 +25,4 @@ export interface TreeSelectViewProps {
|
|
|
16
25
|
style?: CSSProperties;
|
|
17
26
|
}
|
|
18
27
|
/** Checkbox-driven hierarchical select — tri-state parent checkboxes over a folder-style tree. */
|
|
19
|
-
export declare function TreeSelectView({ nodes, value, onChange, size, color, className, style, }: TreeSelectViewProps): import("react").JSX.Element;
|
|
28
|
+
export declare function TreeSelectView({ testId, nodes, value, onChange, size, color, className, style, }: TreeSelectViewProps): import("react").JSX.Element;
|
|
@@ -6,6 +6,15 @@ export interface WizardStep {
|
|
|
6
6
|
description?: string;
|
|
7
7
|
}
|
|
8
8
|
export interface WizardStepperViewProps {
|
|
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
|
steps: WizardStep[];
|
|
10
19
|
activeStep: string;
|
|
11
20
|
completedSteps?: string[];
|
|
@@ -16,4 +25,4 @@ export interface WizardStepperViewProps {
|
|
|
16
25
|
style?: CSSProperties;
|
|
17
26
|
}
|
|
18
27
|
/** Multi-step form wizard progress header — numbered step indicator pattern. Distinct from `StepperInputView` (numeric +/-). */
|
|
19
|
-
export declare function WizardStepperView({ steps, activeStep, completedSteps, onStepClick, size, color, className, style, }: WizardStepperViewProps): import("react").JSX.Element;
|
|
28
|
+
export declare function WizardStepperView({ testId, steps, activeStep, completedSteps, onStepClick, size, color, className, style, }: WizardStepperViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The path to whatever the cursor is sitting on.
|
|
3
|
+
*
|
|
4
|
+
* Reading a value out of a response and then writing the expression that
|
|
5
|
+
* selects it is a transcription job: you can see `id` on screen and still have
|
|
6
|
+
* to count array indices and retype four ancestor names to say where it lives.
|
|
7
|
+
* Right-click, and the editor says it.
|
|
8
|
+
*
|
|
9
|
+
* ── Why a scanner rather than a parse ──
|
|
10
|
+
*
|
|
11
|
+
* `JSON.parse` gives a tree with no offsets, so it cannot answer "which node is
|
|
12
|
+
* at character 4,812". It also refuses the case this is most useful in: a body
|
|
13
|
+
* being edited is malformed for as long as you are typing it, and a feature
|
|
14
|
+
* that stops working while you type is one you stop reaching for. A scanner
|
|
15
|
+
* tracks the enclosing stack as it goes and can answer from wherever it got to,
|
|
16
|
+
* whether or not the rest of the document is well formed.
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* The JSONPath of the value at `offset`, in the `$.a.b[0].c` dialect every
|
|
20
|
+
* JSONPath implementation accepts.
|
|
21
|
+
*
|
|
22
|
+
* On a key, the path names that key — asking for the path of `"total"` and
|
|
23
|
+
* getting its parent's path back would be the wrong answer to the obvious
|
|
24
|
+
* question.
|
|
25
|
+
*/
|
|
26
|
+
export declare function jsonPathAt(text: string, offset: number): string | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Every level from the root down to the cursor.
|
|
29
|
+
*
|
|
30
|
+
* The innermost path is the one usually wanted and not the one always wanted:
|
|
31
|
+
* standing on `id` you may want the object that holds it, or the array, or the
|
|
32
|
+
* collection above that — and each is a different assertion to write. Offering
|
|
33
|
+
* the whole chain costs one submenu and saves re-deriving an ancestor by hand.
|
|
34
|
+
*/
|
|
35
|
+
export declare function jsonPathLevels(text: string, offset: number): string[];
|
|
36
|
+
/**
|
|
37
|
+
* The XPath of the element containing `offset`.
|
|
38
|
+
*
|
|
39
|
+
* Attributes and text nodes resolve to their element rather than to
|
|
40
|
+
* `/a/b/@id` or `/a/b/text()`: the element is what the path is nearly always
|
|
41
|
+
* wanted for, and a path that sometimes ends in an attribute is one you have
|
|
42
|
+
* to check before pasting.
|
|
43
|
+
*/
|
|
44
|
+
export declare function xPathAt(text: string, offset: number): string | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* Every enclosing element, outermost first.
|
|
47
|
+
*
|
|
48
|
+
* The same reason as JSON, and more often wanted: an XPath is usually written
|
|
49
|
+
* against a container — `/order/items` — rather than against the leaf you
|
|
50
|
+
* happened to right-click.
|
|
51
|
+
*/
|
|
52
|
+
export declare function xPathLevels(text: string, offset: number): string[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HTML back to Markdown.
|
|
3
|
+
*
|
|
4
|
+
* The rich view is a `contenteditable` rendering of the Markdown document, so
|
|
5
|
+
* every edit has to come back the other way. This is the half where fidelity is
|
|
6
|
+
* lost if it is lost at all, which is why it is written out rather than pulled
|
|
7
|
+
* in: a dependency here is a dependency whose idea of "close enough" you inherit.
|
|
8
|
+
*
|
|
9
|
+
* It handles exactly what the toolbar can produce and what `marked` renders from
|
|
10
|
+
* the Markdown it is given: headings, paragraphs, bold, italic, strikethrough,
|
|
11
|
+
* inline and block code, links, images, bullet, ordered and task lists,
|
|
12
|
+
* blockquotes, tables and rules. Anything else — raw HTML somebody pasted — is
|
|
13
|
+
* reduced to its text, because silently emitting HTML into a Markdown document
|
|
14
|
+
* makes the next round trip worse, not better.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* Turn a contenteditable's HTML into Markdown.
|
|
18
|
+
*
|
|
19
|
+
* Blank blocks are dropped and runs of blank lines collapsed to one, because a
|
|
20
|
+
* contenteditable emits `<p><br></p>` freely and a document that grows two
|
|
21
|
+
* blank lines every time you press Enter is not one anybody would keep using.
|
|
22
|
+
*/
|
|
23
|
+
export declare function htmlToMarkdown(html: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { DuiSize } from '../../core/DuiTypes';
|
|
2
|
+
/**
|
|
3
|
+
* A filesystem path, as a chain of jump targets or as the string it always was.
|
|
4
|
+
*
|
|
5
|
+
* `BreadcrumbView` is the right component for a trail of pages, where each
|
|
6
|
+
* label is prose and the whole thing is read rather than typed. A PATH is a
|
|
7
|
+
* different object: it has a canonical text form people already know, and the
|
|
8
|
+
* fastest way to reach one you know is to type it rather than click five
|
|
9
|
+
* ancestors. Splitting a slash-separated string is also not the caller's job
|
|
10
|
+
* to repeat everywhere it shows a path.
|
|
11
|
+
*
|
|
12
|
+
* So the control has two states over one value. Double-click — or press Enter
|
|
13
|
+
* on the focused chain — swaps the segments for an input holding the raw path;
|
|
14
|
+
* Enter commits, Escape puts the chain back untouched.
|
|
15
|
+
*/
|
|
16
|
+
export interface PathBreadcrumbViewProps {
|
|
17
|
+
/** An absolute, slash-separated path. `/` renders as a single root segment. */
|
|
18
|
+
path: string;
|
|
19
|
+
/** A segment was clicked; the argument is the absolute path of that segment. */
|
|
20
|
+
onNavigate?: (path: string) => void;
|
|
21
|
+
/**
|
|
22
|
+
* A path was typed and committed.
|
|
23
|
+
*
|
|
24
|
+
* Omit to make the control read-only: with no handler there is nothing for
|
|
25
|
+
* editing to do, so the double-click does not arm and the affordance is not
|
|
26
|
+
* advertised.
|
|
27
|
+
*/
|
|
28
|
+
onSubmit?: (path: string) => void;
|
|
29
|
+
/**
|
|
30
|
+
* Editing started or stopped.
|
|
31
|
+
*
|
|
32
|
+
* The chain sizes itself to its segments; the text field wants room to type
|
|
33
|
+
* a path into. Only the layout around this control can give it that room, so
|
|
34
|
+
* it has to be told which of the two it is currently holding.
|
|
35
|
+
*/
|
|
36
|
+
onEditingChange?: (editing: boolean) => void;
|
|
37
|
+
/**
|
|
38
|
+
* Drive editing from outside, for a caller that owns a bigger hit area.
|
|
39
|
+
*
|
|
40
|
+
* The chain is as wide as its segments, which leaves most of the bar it sits
|
|
41
|
+
* in dead to a double-click — you have to hit the text. A caller that wants
|
|
42
|
+
* the whole strip to arm editing needs to be able to say so, and this makes
|
|
43
|
+
* the control optionally controlled: pass it and you own the state, omit it
|
|
44
|
+
* and it keeps its own.
|
|
45
|
+
*/
|
|
46
|
+
editing?: boolean;
|
|
47
|
+
/** Label for the leading `/`. Some filesystems want a share or drive name. */
|
|
48
|
+
rootLabel?: string;
|
|
49
|
+
/** Collapse the middle into `…` past this many segments. Default 5. */
|
|
50
|
+
maxVisible?: number;
|
|
51
|
+
size?: DuiSize;
|
|
52
|
+
/** Colour of the segment the path currently ends at. */
|
|
53
|
+
color?: string;
|
|
54
|
+
className?: string;
|
|
55
|
+
placeholder?: string;
|
|
56
|
+
}
|
|
57
|
+
export declare function PathBreadcrumbView({ path, onNavigate, onSubmit, onEditingChange, editing: editingProp, rootLabel, maxVisible, size, color, className, placeholder, }: PathBreadcrumbViewProps): import("react").JSX.Element;
|
|
58
|
+
/**
|
|
59
|
+
* `/var/lib/app` into segments that each address a real directory.
|
|
60
|
+
*
|
|
61
|
+
* Exported because the caller almost always needs the same walk for its own
|
|
62
|
+
* navigation, and two implementations of "what is the parent of this" drift.
|
|
63
|
+
*/
|
|
64
|
+
export declare function splitPath(path: string, rootLabel?: string): {
|
|
65
|
+
label: string;
|
|
66
|
+
path: string;
|
|
67
|
+
}[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -22,6 +22,31 @@ export interface SplitPanelViewProps {
|
|
|
22
22
|
onResizeEnd?: (split: number) => void;
|
|
23
23
|
/** Fired when the handle is clicked without dragging (e.g. to collapse/expand) */
|
|
24
24
|
onHandleClick?: () => void;
|
|
25
|
+
/**
|
|
26
|
+
* Show only the first panel — no second panel, no handle, no divider.
|
|
27
|
+
*
|
|
28
|
+
* The reason to use this instead of rendering `first` on its own is that the
|
|
29
|
+
* tree keeps its shape. `first` stays the same element in the same position
|
|
30
|
+
* whether or not the second panel is showing, so React reconciles it rather
|
|
31
|
+
* than unmounting it.
|
|
32
|
+
*
|
|
33
|
+
* A caller that instead swaps between `<>{content}</>` and
|
|
34
|
+
* `<SplitPanelView first={content} />` moves that subtree to a new position
|
|
35
|
+
* on every toggle, so React tears it down and builds it again — and any
|
|
36
|
+
* state inside it goes with it: a parsed file, a scroll position, a
|
|
37
|
+
* half-filled form. It looks like a layout prop and behaves like a data one.
|
|
38
|
+
*/
|
|
39
|
+
collapsed?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Which panel `collapsed` hides. Defaults to the second.
|
|
42
|
+
*
|
|
43
|
+
* A split that can only collapse one side is half a component: a details pane
|
|
44
|
+
* on the right collapses second, a sidebar or a facet rail on the left
|
|
45
|
+
* collapses first. Without this a left-hand caller has to swap `first` and
|
|
46
|
+
* `second` — which puts the panel on the wrong side — or drop the split, and
|
|
47
|
+
* lose the state the collapse existed to preserve.
|
|
48
|
+
*/
|
|
49
|
+
collapsedSide?: 'first' | 'second';
|
|
25
50
|
/**
|
|
26
51
|
* Tooltip shown on pill hover. Pass `null` to suppress.
|
|
27
52
|
* Defaults to "Double-click to reset Alt+/ / Drag to resize" with a styled kbd badge.
|
|
@@ -30,4 +55,4 @@ export interface SplitPanelViewProps {
|
|
|
30
55
|
style?: React.CSSProperties;
|
|
31
56
|
className?: string;
|
|
32
57
|
}
|
|
33
|
-
export declare function SplitPanelView({ direction, first, second, defaultSplit, split: splitProp, minFirst, minSecond, minFirstPct, minSecondPct, accentColor, onResize, onResizeEnd, onHandleClick, pillTooltip, style, className, }: SplitPanelViewProps): import("react").JSX.Element;
|
|
58
|
+
export declare function SplitPanelView({ direction, first, second, defaultSplit, split: splitProp, minFirst, minSecond, minFirstPct, minSecondPct, accentColor, onResize, onResizeEnd, onHandleClick, pillTooltip, collapsed, collapsedSide, style, className, }: SplitPanelViewProps): import("react").JSX.Element;
|
|
@@ -8,6 +8,15 @@ export interface ActionSheetItem {
|
|
|
8
8
|
onClick: () => void;
|
|
9
9
|
}
|
|
10
10
|
export interface ActionSheetViewProps {
|
|
11
|
+
/**
|
|
12
|
+
* A stable hook for tests and automation.
|
|
13
|
+
*
|
|
14
|
+
* Lands on this component's root element as `data-testid`. Worth setting on
|
|
15
|
+
* anything a test drives: several dui inputs render a `contenteditable` div
|
|
16
|
+
* with a decorative placeholder span, which neither `getByPlaceholder` nor
|
|
17
|
+
* `getByRole` reliably finds.
|
|
18
|
+
*/
|
|
19
|
+
testId?: string;
|
|
11
20
|
open: boolean;
|
|
12
21
|
onClose: () => void;
|
|
13
22
|
title?: string;
|
|
@@ -16,4 +25,4 @@ export interface ActionSheetViewProps {
|
|
|
16
25
|
size?: DuiSize;
|
|
17
26
|
className?: string;
|
|
18
27
|
}
|
|
19
|
-
export declare function ActionSheetView({ open, onClose, title, items, cancelLabel, size, className, }: ActionSheetViewProps): import('react').ReactPortal | null;
|
|
28
|
+
export declare function ActionSheetView({ testId, open, onClose, title, items, cancelLabel, size, className, }: ActionSheetViewProps): import('react').ReactPortal | null;
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import { DuiSize } from '../../core/DuiTypes';
|
|
2
2
|
export interface AlertDialogViewProps {
|
|
3
|
+
/**
|
|
4
|
+
* A stable hook for tests and automation.
|
|
5
|
+
*
|
|
6
|
+
* Lands on this component's root element as `data-testid`. Worth setting on
|
|
7
|
+
* anything a test drives: several dui inputs render a `contenteditable` div
|
|
8
|
+
* with a decorative placeholder span, which neither `getByPlaceholder` nor
|
|
9
|
+
* `getByRole` reliably finds.
|
|
10
|
+
*/
|
|
11
|
+
testId?: string;
|
|
3
12
|
open: boolean;
|
|
4
13
|
title: string;
|
|
5
14
|
message: string;
|
|
@@ -12,4 +21,4 @@ export interface AlertDialogViewProps {
|
|
|
12
21
|
className?: string;
|
|
13
22
|
}
|
|
14
23
|
/** Pre-built confirm/cancel dialog with danger styling — the standard "Are you sure?" pattern. */
|
|
15
|
-
export declare function AlertDialogView({ open, title, message, confirmLabel, cancelLabel, danger, onConfirm, onCancel, size, className, }: AlertDialogViewProps): import('react').ReactPortal | null;
|
|
24
|
+
export declare function AlertDialogView({ testId, open, title, message, confirmLabel, cancelLabel, danger, onConfirm, onCancel, size, className, }: AlertDialogViewProps): import('react').ReactPortal | null;
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { DuiSize } from '../../core/DuiTypes';
|
|
3
3
|
export interface BottomSheetViewProps {
|
|
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
|
open: boolean;
|
|
5
14
|
onClose: () => void;
|
|
6
15
|
title?: string;
|
|
@@ -11,4 +20,4 @@ export interface BottomSheetViewProps {
|
|
|
11
20
|
className?: string;
|
|
12
21
|
}
|
|
13
22
|
/** Mobile-style sheet — drag the handle down past a threshold, or fling it, to dismiss. */
|
|
14
|
-
export declare function BottomSheetView({ open, onClose, title, children, heightRatio, size, className, }: BottomSheetViewProps): import('react').ReactPortal | null;
|
|
23
|
+
export declare function BottomSheetView({ testId, open, onClose, title, children, heightRatio, size, className, }: BottomSheetViewProps): import('react').ReactPortal | null;
|
|
@@ -10,6 +10,15 @@ export interface PaletteCommand {
|
|
|
10
10
|
action: () => void;
|
|
11
11
|
}
|
|
12
12
|
export interface CommandPaletteViewProps {
|
|
13
|
+
/**
|
|
14
|
+
* A stable hook for tests and automation.
|
|
15
|
+
*
|
|
16
|
+
* Lands on this component's root element as `data-testid`. Worth setting on
|
|
17
|
+
* anything a test drives: several dui inputs render a `contenteditable` div
|
|
18
|
+
* with a decorative placeholder span, which neither `getByPlaceholder` nor
|
|
19
|
+
* `getByRole` reliably finds.
|
|
20
|
+
*/
|
|
21
|
+
testId?: string;
|
|
13
22
|
open: boolean;
|
|
14
23
|
onClose: () => void;
|
|
15
24
|
commands: PaletteCommand[];
|
|
@@ -18,4 +27,4 @@ export interface CommandPaletteViewProps {
|
|
|
18
27
|
accentColor?: string;
|
|
19
28
|
}
|
|
20
29
|
/** Cmd-K style launcher: fuzzy filter + ↑/↓/Enter/Esc keyboard navigation. */
|
|
21
|
-
export declare function CommandPaletteView({ open, onClose, commands, placeholder, emptyText, accentColor, }: CommandPaletteViewProps): import('react').ReactPortal | null;
|
|
30
|
+
export declare function CommandPaletteView({ testId, open, onClose, commands, placeholder, emptyText, accentColor, }: CommandPaletteViewProps): import('react').ReactPortal | null;
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
export interface ContextMenuItem {
|
|
2
2
|
id: string;
|
|
3
3
|
label: string;
|
|
4
|
+
/**
|
|
5
|
+
* A line under the label, for a menu whose entries need explaining.
|
|
6
|
+
*
|
|
7
|
+
* Most items do not want one — a menu of verbs reads faster without a
|
|
8
|
+
* paragraph under each. It earns its place where choosing wrongly costs
|
|
9
|
+
* something and the label alone cannot say so: an action that pauses a
|
|
10
|
+
* process, or one that is unavailable and owes the reader a reason.
|
|
11
|
+
*/
|
|
12
|
+
description?: string;
|
|
4
13
|
icon?: React.ReactNode;
|
|
5
14
|
iconColor?: string;
|
|
6
15
|
shortcut?: string;
|
|
@@ -12,6 +21,15 @@ export interface ContextMenuItem {
|
|
|
12
21
|
}
|
|
13
22
|
export type ContextMenuWidth = 'auto' | 'sm' | 'md' | 'lg' | number;
|
|
14
23
|
export interface ContextMenuViewProps {
|
|
24
|
+
/**
|
|
25
|
+
* A stable hook for tests and automation.
|
|
26
|
+
*
|
|
27
|
+
* Lands on this component's root element as `data-testid`. Worth setting on
|
|
28
|
+
* anything a test drives: several dui inputs render a `contenteditable` div
|
|
29
|
+
* with a decorative placeholder span, which neither `getByPlaceholder` nor
|
|
30
|
+
* `getByRole` reliably finds.
|
|
31
|
+
*/
|
|
32
|
+
testId?: string;
|
|
15
33
|
items: ContextMenuItem[];
|
|
16
34
|
anchorEl: HTMLElement | null;
|
|
17
35
|
open: boolean;
|
|
@@ -25,4 +43,4 @@ export interface ContextMenuViewProps {
|
|
|
25
43
|
};
|
|
26
44
|
align?: 'auto' | 'left' | 'right';
|
|
27
45
|
}
|
|
28
|
-
export declare function ContextMenuView({ items, anchorEl, open, onClose, width, rounded, matchAnchorWidth, position, align, }: ContextMenuViewProps): import('react').ReactPortal | null;
|
|
46
|
+
export declare function ContextMenuView({ testId, items, anchorEl, open, onClose, width, rounded, matchAnchorWidth, position, align, }: ContextMenuViewProps): import('react').ReactPortal | null;
|
|
@@ -2,6 +2,15 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
import { DuiSize } from '../../core/DuiTypes';
|
|
3
3
|
export type DrawerEdge = 'left' | 'right' | 'top' | 'bottom';
|
|
4
4
|
export interface DrawerViewProps {
|
|
5
|
+
/**
|
|
6
|
+
* A stable hook for tests and automation.
|
|
7
|
+
*
|
|
8
|
+
* Lands on this component's root element as `data-testid`. Worth setting on
|
|
9
|
+
* anything a test drives: several dui inputs render a `contenteditable` div
|
|
10
|
+
* with a decorative placeholder span, which neither `getByPlaceholder` nor
|
|
11
|
+
* `getByRole` reliably finds.
|
|
12
|
+
*/
|
|
13
|
+
testId?: string;
|
|
5
14
|
open: boolean;
|
|
6
15
|
onClose: () => void;
|
|
7
16
|
edge?: DrawerEdge;
|
|
@@ -12,4 +21,4 @@ export interface DrawerViewProps {
|
|
|
12
21
|
duiSize?: DuiSize;
|
|
13
22
|
className?: string;
|
|
14
23
|
}
|
|
15
|
-
export declare function DrawerView({ open, onClose, edge, title, children, size, duiSize, className, }: DrawerViewProps): import('react').ReactPortal | null;
|
|
24
|
+
export declare function DrawerView({ testId, open, onClose, edge, title, children, size, duiSize, className, }: DrawerViewProps): import('react').ReactPortal | null;
|
|
@@ -12,6 +12,18 @@ export interface InfoPopupViewProps {
|
|
|
12
12
|
footer?: string;
|
|
13
13
|
wikiLabel?: string;
|
|
14
14
|
wikiHref?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Open the docs in the host app instead of the browser.
|
|
17
|
+
*
|
|
18
|
+
* `wikiHref` assumes the documentation is a URL. An app whose docs are a
|
|
19
|
+
* panel of its own has nowhere to point one -- and inside an embedded host
|
|
20
|
+
* (a VS Code webview, an iframe with no top-level navigation) an anchor to
|
|
21
|
+
* an internal route does nothing at all, silently. Given this, the footer
|
|
22
|
+
* becomes a button and the app decides what "open the wiki" means.
|
|
23
|
+
*
|
|
24
|
+
* Takes precedence over `wikiHref` when both are given.
|
|
25
|
+
*/
|
|
26
|
+
onWikiOpen?: () => void;
|
|
15
27
|
width?: number;
|
|
16
28
|
}
|
|
17
|
-
export declare function InfoPopupView({ open, onClose, anchorEl, title, description, items, footer, wikiLabel, wikiHref, width, }: InfoPopupViewProps): import('react').ReactPortal | null;
|
|
29
|
+
export declare function InfoPopupView({ open, onClose, anchorEl, title, description, items, footer, wikiLabel, wikiHref, onWikiOpen, width, }: InfoPopupViewProps): import('react').ReactPortal | null;
|
|
@@ -1,13 +1,29 @@
|
|
|
1
|
-
export type ModalSize = 'sm' | 'md' | 'lg' | 'xl';
|
|
1
|
+
export type ModalSize = 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
|
2
2
|
/**
|
|
3
3
|
* 'popout' — centered overlay with backdrop, portalled to document.body (default)
|
|
4
4
|
* 'inline' — bare card with no backdrop, no portal; parent controls positioning
|
|
5
5
|
*/
|
|
6
6
|
export type ModalMode = 'popout' | 'inline';
|
|
7
7
|
export interface ModalViewProps {
|
|
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
|
open: boolean;
|
|
9
18
|
onClose: () => void;
|
|
10
|
-
|
|
19
|
+
/**
|
|
20
|
+
* Rendered in the header at title weight.
|
|
21
|
+
*
|
|
22
|
+
* A node rather than a string, so a header can carry two registers on one
|
|
23
|
+
* line — a subject and a quieter label for what you are doing to it — which
|
|
24
|
+
* a single styled string cannot express.
|
|
25
|
+
*/
|
|
26
|
+
title?: React.ReactNode;
|
|
11
27
|
/** Secondary text shown below the title in the header */
|
|
12
28
|
subtitle?: React.ReactNode;
|
|
13
29
|
/** Node rendered to the left of the title block — e.g. a coloured icon circle */
|
|
@@ -47,4 +63,4 @@ export interface ModalViewProps {
|
|
|
47
63
|
/** Extra styles merged onto the body div (e.g. flex column layout for nested flex children) */
|
|
48
64
|
bodyStyle?: React.CSSProperties;
|
|
49
65
|
}
|
|
50
|
-
export declare function ModalView({ open, onClose, title, subtitle, headerIcon, children, footerLeft, footerRight, size, showCloseIcon, headerColor, headerGradient, headerRight, noPadding, elevated, mode, maxHeight, height, bodyStyle, }: ModalViewProps): import("react").JSX.Element | null;
|
|
66
|
+
export declare function ModalView({ testId, open, onClose, title, subtitle, headerIcon, children, footerLeft, footerRight, size, showCloseIcon, headerColor, headerGradient, headerRight, noPadding, elevated, mode, maxHeight, height, bodyStyle, }: ModalViewProps): import("react").JSX.Element | null;
|