@k2b/ui 0.32.0 → 0.34.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/dist/base.css +14 -1
- package/dist/browser/actions/ContextMenu.js +13 -0
- package/dist/browser/actions/ContextMenu.js.map +1 -1
- package/dist/browser/actions/Dropdown.js +173 -102
- package/dist/browser/actions/Dropdown.js.map +1 -1
- package/dist/browser/actions/FilterChip.js +113 -56
- package/dist/browser/actions/FilterChip.js.map +1 -1
- package/dist/browser/actions/SelectionToolbar.js +129 -0
- package/dist/browser/actions/SelectionToolbar.js.map +1 -0
- package/dist/browser/actions/filter-messages.js +26 -2
- package/dist/browser/actions/filter-messages.js.map +1 -1
- package/dist/browser/actions/index.js +1 -0
- package/dist/browser/actions/index.js.map +1 -1
- package/dist/browser/actions/menu-rows.js +23 -3
- package/dist/browser/actions/menu-rows.js.map +1 -1
- package/dist/browser/actions/menu-sheet.js +2 -7
- package/dist/browser/actions/menu-sheet.js.map +1 -1
- package/dist/browser/charts.js +6 -0
- package/dist/browser/charts.js.map +1 -0
- package/dist/browser/chat/ChatComposer.js +616 -421
- package/dist/browser/chat/ChatComposer.js.map +1 -1
- package/dist/browser/chat/chat-messages.js +18 -0
- package/dist/browser/chat/chat-messages.js.map +1 -1
- package/dist/browser/chat/composer-document.js +19 -0
- package/dist/browser/chat/composer-document.js.map +1 -1
- package/dist/browser/chat/index.js.map +1 -1
- package/dist/browser/content/Calendar.js +39 -29
- package/dist/browser/content/Calendar.js.map +1 -1
- package/dist/browser/content/CalendarDayView.js +159 -165
- package/dist/browser/content/CalendarDayView.js.map +1 -1
- package/dist/browser/content/Chart.js +8 -0
- package/dist/browser/content/Chart.js.map +1 -1
- package/dist/browser/content/FileGrid.js +231 -9
- package/dist/browser/content/FileGrid.js.map +1 -1
- package/dist/browser/content/FileTypeIcon.js +15 -0
- package/dist/browser/content/FileTypeIcon.js.map +1 -1
- package/dist/browser/content/FileView.js +11 -4
- package/dist/browser/content/FileView.js.map +1 -1
- package/dist/browser/content/MessageRow.js +627 -343
- package/dist/browser/content/MessageRow.js.map +1 -1
- package/dist/browser/content/ReactionBar.js +20 -1
- package/dist/browser/content/ReactionBar.js.map +1 -1
- package/dist/browser/content/calendar-day-scroll.js +4 -3
- package/dist/browser/content/calendar-day-scroll.js.map +1 -1
- package/dist/browser/content/chart-bar.js +476 -0
- package/dist/browser/content/chart-bar.js.map +1 -0
- package/dist/browser/content/file-list-messages.js +52 -0
- package/dist/browser/content/file-list-messages.js.map +1 -0
- package/dist/browser/content/index.js +2 -2
- package/dist/browser/content/index.js.map +1 -1
- package/dist/browser/feedback/Tooltip.js +31 -14
- package/dist/browser/feedback/Tooltip.js.map +1 -1
- package/dist/browser/feedback/dialog-core.js +6 -0
- package/dist/browser/feedback/dialog-core.js.map +1 -1
- package/dist/browser/inputs/ChoiceList.js +178 -0
- package/dist/browser/inputs/ChoiceList.js.map +1 -0
- package/dist/browser/inputs/ChoiceSlider.js +314 -0
- package/dist/browser/inputs/ChoiceSlider.js.map +1 -0
- package/dist/browser/inputs/ChoiceTiles.js +135 -0
- package/dist/browser/inputs/ChoiceTiles.js.map +1 -0
- package/dist/browser/inputs/ColorChoices.js +120 -0
- package/dist/browser/inputs/ColorChoices.js.map +1 -0
- package/dist/browser/inputs/QrScanner.js +95 -13
- package/dist/browser/inputs/QrScanner.js.map +1 -1
- package/dist/browser/inputs/TextInput.js +19 -14
- package/dist/browser/inputs/TextInput.js.map +1 -1
- package/dist/browser/inputs/index.js +4 -0
- package/dist/browser/inputs/index.js.map +1 -1
- package/dist/browser/inputs/qr-messages.js +2 -0
- package/dist/browser/inputs/qr-messages.js.map +1 -1
- package/dist/browser/internal/radio-keys.js +13 -0
- package/dist/browser/internal/radio-keys.js.map +1 -0
- package/dist/browser/intl/shortcut-messages.js +4 -0
- package/dist/browser/intl/shortcut-messages.js.map +1 -1
- package/dist/browser/intl/shortcut.js +4 -0
- package/dist/browser/intl/shortcut.js.map +1 -1
- package/dist/browser/layout/AnchoredPopover.js +180 -0
- package/dist/browser/layout/AnchoredPopover.js.map +1 -0
- package/dist/browser/layout/AppWorkspace.js +684 -532
- package/dist/browser/layout/AppWorkspace.js.map +1 -1
- package/dist/browser/layout/DetailPanel.js +443 -333
- package/dist/browser/layout/DetailPanel.js.map +1 -1
- package/dist/browser/layout/MobileShell.js +231 -42
- package/dist/browser/layout/MobileShell.js.map +1 -1
- package/dist/browser/layout/Settings.js +283 -175
- package/dist/browser/layout/Settings.js.map +1 -1
- package/dist/browser/layout/SidebarRailHint.js +79 -0
- package/dist/browser/layout/SidebarRailHint.js.map +1 -0
- package/dist/browser/layout/SidebarSwitcher.js +79 -66
- package/dist/browser/layout/SidebarSwitcher.js.map +1 -1
- package/dist/browser/layout/TabBar.js +18 -4
- package/dist/browser/layout/TabBar.js.map +1 -1
- package/dist/browser/layout/app-workspace-controller.js +11 -4
- package/dist/browser/layout/app-workspace-controller.js.map +1 -1
- package/dist/browser/layout/detail-panel-messages.js +4 -2
- package/dist/browser/layout/detail-panel-messages.js.map +1 -1
- package/dist/browser/layout/index.js +3 -1
- package/dist/browser/layout/index.js.map +1 -1
- package/dist/browser/layout/scroll-fade.js +32 -5
- package/dist/browser/layout/scroll-fade.js.map +1 -1
- package/dist/browser/layout/settings-messages.js +26 -2
- package/dist/browser/layout/settings-messages.js.map +1 -1
- package/dist/browser/surfaces/Avatar.js +2 -14
- package/dist/browser/surfaces/Avatar.js.map +1 -1
- package/dist/browser/surfaces/DotStrip.js +70 -0
- package/dist/browser/surfaces/DotStrip.js.map +1 -0
- package/dist/browser/surfaces/NoticeCard.js +46 -30
- package/dist/browser/surfaces/NoticeCard.js.map +1 -1
- package/dist/browser/surfaces/ProgressRing.js +3 -0
- package/dist/browser/surfaces/ProgressRing.js.map +1 -1
- package/dist/browser/surfaces/ResourceCard.js +125 -68
- package/dist/browser/surfaces/ResourceCard.js.map +1 -1
- package/dist/browser/surfaces/index.js +2 -0
- package/dist/browser/surfaces/index.js.map +1 -1
- package/dist/browser/surfaces/person-color.js +18 -0
- package/dist/browser/surfaces/person-color.js.map +1 -0
- package/dist/browser/surfaces/resource-messages.js +8 -4
- package/dist/browser/surfaces/resource-messages.js.map +1 -1
- package/dist/browser/widgets/Widget.js +3 -2
- package/dist/browser/widgets/Widget.js.map +1 -1
- package/dist/ssr/actions/ContextMenu.js +9 -0
- package/dist/ssr/actions/ContextMenu.js.map +1 -1
- package/dist/ssr/actions/Dropdown.js +65 -31
- package/dist/ssr/actions/Dropdown.js.map +1 -1
- package/dist/ssr/actions/FilterChip.js +67 -16
- package/dist/ssr/actions/FilterChip.js.map +1 -1
- package/dist/ssr/actions/SelectionToolbar.js +104 -0
- package/dist/ssr/actions/SelectionToolbar.js.map +1 -0
- package/dist/ssr/actions/filter-messages.js +26 -2
- package/dist/ssr/actions/filter-messages.js.map +1 -1
- package/dist/ssr/actions/index.js +1 -0
- package/dist/ssr/actions/index.js.map +1 -1
- package/dist/ssr/actions/menu-rows.js +23 -3
- package/dist/ssr/actions/menu-rows.js.map +1 -1
- package/dist/ssr/actions/menu-sheet.js +2 -7
- package/dist/ssr/actions/menu-sheet.js.map +1 -1
- package/dist/ssr/charts.js +6 -0
- package/dist/ssr/charts.js.map +1 -0
- package/dist/ssr/chat/ChatComposer.js +184 -76
- package/dist/ssr/chat/ChatComposer.js.map +1 -1
- package/dist/ssr/chat/chat-messages.js +18 -0
- package/dist/ssr/chat/chat-messages.js.map +1 -1
- package/dist/ssr/chat/composer-document.js +19 -0
- package/dist/ssr/chat/composer-document.js.map +1 -1
- package/dist/ssr/chat/index.js.map +1 -1
- package/dist/ssr/content/Calendar.js +40 -31
- package/dist/ssr/content/Calendar.js.map +1 -1
- package/dist/ssr/content/CalendarDayView.js +40 -48
- package/dist/ssr/content/CalendarDayView.js.map +1 -1
- package/dist/ssr/content/Chart.js +8 -0
- package/dist/ssr/content/Chart.js.map +1 -1
- package/dist/ssr/content/FileGrid.js +132 -5
- package/dist/ssr/content/FileGrid.js.map +1 -1
- package/dist/ssr/content/FileTypeIcon.js +15 -0
- package/dist/ssr/content/FileTypeIcon.js.map +1 -1
- package/dist/ssr/content/FileView.js +11 -4
- package/dist/ssr/content/FileView.js.map +1 -1
- package/dist/ssr/content/MessageRow.js +274 -91
- package/dist/ssr/content/MessageRow.js.map +1 -1
- package/dist/ssr/content/ReactionBar.js +20 -1
- package/dist/ssr/content/ReactionBar.js.map +1 -1
- package/dist/ssr/content/calendar-day-scroll.js +4 -3
- package/dist/ssr/content/calendar-day-scroll.js.map +1 -1
- package/dist/ssr/content/chart-bar.js +476 -0
- package/dist/ssr/content/chart-bar.js.map +1 -0
- package/dist/ssr/content/file-list-messages.js +52 -0
- package/dist/ssr/content/file-list-messages.js.map +1 -0
- package/dist/ssr/content/index.js +2 -2
- package/dist/ssr/content/index.js.map +1 -1
- package/dist/ssr/feedback/Tooltip.js +31 -14
- package/dist/ssr/feedback/Tooltip.js.map +1 -1
- package/dist/ssr/feedback/dialog-core.js +6 -0
- package/dist/ssr/feedback/dialog-core.js.map +1 -1
- package/dist/ssr/inputs/ChoiceList.js +95 -0
- package/dist/ssr/inputs/ChoiceList.js.map +1 -0
- package/dist/ssr/inputs/ChoiceSlider.js +191 -0
- package/dist/ssr/inputs/ChoiceSlider.js.map +1 -0
- package/dist/ssr/inputs/ChoiceTiles.js +61 -0
- package/dist/ssr/inputs/ChoiceTiles.js.map +1 -0
- package/dist/ssr/inputs/ColorChoices.js +60 -0
- package/dist/ssr/inputs/ColorChoices.js.map +1 -0
- package/dist/ssr/inputs/QrScanner.js +89 -10
- package/dist/ssr/inputs/QrScanner.js.map +1 -1
- package/dist/ssr/inputs/TextInput.js +17 -2
- package/dist/ssr/inputs/TextInput.js.map +1 -1
- package/dist/ssr/inputs/index.js +4 -0
- package/dist/ssr/inputs/index.js.map +1 -1
- package/dist/ssr/inputs/qr-messages.js +2 -0
- package/dist/ssr/inputs/qr-messages.js.map +1 -1
- package/dist/ssr/internal/radio-keys.js +13 -0
- package/dist/ssr/internal/radio-keys.js.map +1 -0
- package/dist/ssr/intl/shortcut-messages.js +4 -0
- package/dist/ssr/intl/shortcut-messages.js.map +1 -1
- package/dist/ssr/intl/shortcut.js +4 -0
- package/dist/ssr/intl/shortcut.js.map +1 -1
- package/dist/ssr/layout/AnchoredPopover.js +142 -0
- package/dist/ssr/layout/AnchoredPopover.js.map +1 -0
- package/dist/ssr/layout/AppWorkspace.js +287 -141
- package/dist/ssr/layout/AppWorkspace.js.map +1 -1
- package/dist/ssr/layout/DetailPanel.js +181 -108
- package/dist/ssr/layout/DetailPanel.js.map +1 -1
- package/dist/ssr/layout/MobileShell.js +118 -24
- package/dist/ssr/layout/MobileShell.js.map +1 -1
- package/dist/ssr/layout/Settings.js +122 -45
- package/dist/ssr/layout/Settings.js.map +1 -1
- package/dist/ssr/layout/SidebarRailHint.js +79 -0
- package/dist/ssr/layout/SidebarRailHint.js.map +1 -0
- package/dist/ssr/layout/SidebarSwitcher.js +13 -3
- package/dist/ssr/layout/SidebarSwitcher.js.map +1 -1
- package/dist/ssr/layout/TabBar.js +11 -3
- package/dist/ssr/layout/TabBar.js.map +1 -1
- package/dist/ssr/layout/app-workspace-controller.js +11 -4
- package/dist/ssr/layout/app-workspace-controller.js.map +1 -1
- package/dist/ssr/layout/detail-panel-messages.js +4 -2
- package/dist/ssr/layout/detail-panel-messages.js.map +1 -1
- package/dist/ssr/layout/index.js +3 -1
- package/dist/ssr/layout/index.js.map +1 -1
- package/dist/ssr/layout/scroll-fade.js +32 -5
- package/dist/ssr/layout/scroll-fade.js.map +1 -1
- package/dist/ssr/layout/settings-messages.js +26 -2
- package/dist/ssr/layout/settings-messages.js.map +1 -1
- package/dist/ssr/surfaces/Avatar.js +2 -14
- package/dist/ssr/surfaces/Avatar.js.map +1 -1
- package/dist/ssr/surfaces/DotStrip.js +31 -0
- package/dist/ssr/surfaces/DotStrip.js.map +1 -0
- package/dist/ssr/surfaces/NoticeCard.js +21 -12
- package/dist/ssr/surfaces/NoticeCard.js.map +1 -1
- package/dist/ssr/surfaces/ProgressRing.js +3 -0
- package/dist/ssr/surfaces/ProgressRing.js.map +1 -1
- package/dist/ssr/surfaces/ResourceCard.js +40 -15
- package/dist/ssr/surfaces/ResourceCard.js.map +1 -1
- package/dist/ssr/surfaces/index.js +2 -0
- package/dist/ssr/surfaces/index.js.map +1 -1
- package/dist/ssr/surfaces/person-color.js +18 -0
- package/dist/ssr/surfaces/person-color.js.map +1 -0
- package/dist/ssr/surfaces/resource-messages.js +8 -4
- package/dist/ssr/surfaces/resource-messages.js.map +1 -1
- package/dist/ssr/widgets/Widget.js +3 -2
- package/dist/ssr/widgets/Widget.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/types/actions/ContextMenu.d.ts +5 -0
- package/dist/types/actions/Dropdown.d.ts +19 -0
- package/dist/types/actions/FilterChip.d.ts +11 -0
- package/dist/types/actions/SelectionToolbar.d.ts +38 -0
- package/dist/types/actions/filter-messages.d.ts +12 -0
- package/dist/types/actions/index.d.ts +2 -0
- package/dist/types/actions/menu-rows.d.ts +7 -2
- package/dist/types/charts.d.ts +5 -0
- package/dist/types/chat/ChatComposer.d.ts +28 -0
- package/dist/types/chat/chat-messages.d.ts +9 -0
- package/dist/types/chat/composer-document.d.ts +5 -0
- package/dist/types/chat/index.d.ts +1 -1
- package/dist/types/content/Calendar.d.ts +7 -0
- package/dist/types/content/Chart.d.ts +2 -1
- package/dist/types/content/FileGrid.d.ts +43 -3
- package/dist/types/content/FileTypeIcon.d.ts +10 -0
- package/dist/types/content/FileView.d.ts +5 -1
- package/dist/types/content/MessageRow.d.ts +66 -2
- package/dist/types/content/calendar-day-scroll.d.ts +2 -1
- package/dist/types/content/chart-bar.d.ts +60 -0
- package/dist/types/content/file-list-messages.d.ts +24 -0
- package/dist/types/content/index.d.ts +4 -4
- package/dist/types/feedback/Tooltip.d.ts +8 -2
- package/dist/types/feedback/dialog-core.d.ts +3 -0
- package/dist/types/inputs/ChoiceList.d.ts +28 -0
- package/dist/types/inputs/ChoiceSlider.d.ts +36 -0
- package/dist/types/inputs/ChoiceTiles.d.ts +25 -0
- package/dist/types/inputs/ColorChoices.d.ts +19 -0
- package/dist/types/inputs/index.d.ts +8 -0
- package/dist/types/inputs/qr-messages.d.ts +1 -0
- package/dist/types/internal/radio-keys.d.ts +5 -0
- package/dist/types/intl/shortcut-messages.d.ts +2 -0
- package/dist/types/layout/AnchoredPopover.d.ts +31 -0
- package/dist/types/layout/AppWorkspace.d.ts +12 -0
- package/dist/types/layout/DetailPanel.d.ts +17 -0
- package/dist/types/layout/MobileShell.d.ts +55 -5
- package/dist/types/layout/Settings.d.ts +22 -0
- package/dist/types/layout/SidebarRailHint.d.ts +26 -0
- package/dist/types/layout/TabBar.d.ts +5 -0
- package/dist/types/layout/detail-panel-messages.d.ts +1 -0
- package/dist/types/layout/index.d.ts +5 -3
- package/dist/types/layout/scroll-fade.d.ts +5 -0
- package/dist/types/layout/settings-messages.d.ts +12 -0
- package/dist/types/surfaces/DotStrip.d.ts +22 -0
- package/dist/types/surfaces/NoticeCard.d.ts +3 -0
- package/dist/types/surfaces/ProgressRing.d.ts +2 -1
- package/dist/types/surfaces/ResourceCard.d.ts +9 -0
- package/dist/types/surfaces/index.d.ts +4 -1
- package/dist/types/surfaces/person-color.d.ts +10 -0
- package/dist/types/surfaces/resource-messages.d.ts +2 -0
- package/dist/types/widgets/Widget.d.ts +3 -2
- package/package.json +7 -2
|
@@ -24,9 +24,9 @@ export { default as DataTable } from "./DataTable";
|
|
|
24
24
|
export type { DocCodeHighlighter, DocCodeProps, DocConcept, DocNoteVariant, DocRow } from "./Docs";
|
|
25
25
|
export { DocCode, DocConceptGrid, DocInlineCode, DocLead, DocNote, DocPage, DocRows, DocSection } from "./Docs";
|
|
26
26
|
export { FileBrowserPanel, type FileBrowserPanelProps, type FileSource, openFileBrowser } from "./FileBrowser";
|
|
27
|
-
export { FileGrid, type FileGridProps } from "./FileGrid";
|
|
27
|
+
export { FileGrid, type FileGridGroup, type FileGridOpenProps, type FileGridProps, type FileGridSelectableProps } from "./FileGrid";
|
|
28
28
|
export { default as FileTree, type FileTreeActions, type FileTreeEntry, type FileTreeProps } from "./FileTree";
|
|
29
|
-
export { type FileType, FileTypeIcon, type FileTypeIconProps, fileTypeOf } from "./FileTypeIcon";
|
|
29
|
+
export { type FileType, FileTypeIcon, type FileTypeIconProps, fileKindLabel, fileTypeOf } from "./FileTypeIcon";
|
|
30
30
|
export { canPreviewFile, default as FileView, type FileViewContent, type FileViewFile, type FileViewPreviewKind, type FileViewProps, type FileViewRenderer, type FileViewRendererProps, formatFileViewSize, getFileViewPreviewKind, } from "./FileView";
|
|
31
31
|
export type { KbdProps } from "./Kbd";
|
|
32
32
|
export { Kbd } from "./Kbd";
|
|
@@ -40,8 +40,8 @@ export { MapAttribution } from "./MapAttribution";
|
|
|
40
40
|
export { MapView } from "./MapView";
|
|
41
41
|
export { MapViewFrame } from "./MapViewFrame";
|
|
42
42
|
export { default as MarkdownView, type MarkdownRenderOptions, type MarkdownViewProps, renderSafeMarkdown } from "./MarkdownView";
|
|
43
|
-
export type { MessageGroupEntry, MessageRowAction, MessageRowAttachment, MessageRowAuthor, MessageRowFile, MessageRowMedia, MessageRowProgress, MessageRowProps, MessageRowQuote, MessageRowReaction, MessageRowStatus, MessageRowThread, MessageSystemRowProps, } from "./MessageRow";
|
|
44
|
-
export { MessageRow, MessageSystemRow, startsMessageGroup } from "./MessageRow";
|
|
43
|
+
export type { MessageEventGroupProps, MessageEventRowProps, MessageGroupEntry, MessageRowAction, MessageRowAttachment, MessageRowAuthor, MessageRowFile, MessageRowMedia, MessageRowOrigin, MessageRowProgress, MessageRowProps, MessageRowQuote, MessageRowReaction, MessageRowStatus, MessageRowThread, MessageSystemRowProps, } from "./MessageRow";
|
|
44
|
+
export { MessageEventGroup, MessageEventRow, MessageRow, MessageSystemRow, startsMessageGroup } from "./MessageRow";
|
|
45
45
|
export { type MapPaletteColors, type MapTheme, mapPalette } from "./map-palette";
|
|
46
46
|
export { type MapStyleOptions, mapAttribution, mapStyle } from "./map-style";
|
|
47
47
|
export type { MapViewArea, MapViewFit, MapViewFrameProps, MapViewLine, MapViewLineTone, MapViewMarker, MapViewOwnLocation, MapViewPoint, MapViewProps, MapViewStyle, MapViewStyleSource, MapViewTone, } from "./map-view-types";
|
|
@@ -6,9 +6,15 @@ export type TooltipProps = {
|
|
|
6
6
|
placement?: TooltipPlacement;
|
|
7
7
|
delay?: number;
|
|
8
8
|
disabled?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* The element whose keyboard focus opens the hint, when a container holds
|
|
11
|
+
* the focus instead of `target` (a tree item around its row). Defaults to
|
|
12
|
+
* `target`.
|
|
13
|
+
*/
|
|
14
|
+
focusTarget?: () => HTMLElement | undefined;
|
|
9
15
|
};
|
|
10
|
-
export type TooltipAnchorProps = Omit<JSX.HTMLAttributes<HTMLSpanElement>, "content"> & Omit<TooltipProps, "target">;
|
|
11
|
-
export type TooltipTriggerProps = Omit<JSX.ButtonHTMLAttributes<HTMLButtonElement>, "content"> & Omit<TooltipProps, "target">;
|
|
16
|
+
export type TooltipAnchorProps = Omit<JSX.HTMLAttributes<HTMLSpanElement>, "content"> & Omit<TooltipProps, "target" | "focusTarget">;
|
|
17
|
+
export type TooltipTriggerProps = Omit<JSX.ButtonHTMLAttributes<HTMLButtonElement>, "content"> & Omit<TooltipProps, "target" | "focusTarget">;
|
|
12
18
|
/**
|
|
13
19
|
* The hint an icon-only control shows by default: its label, unless the caller
|
|
14
20
|
* passes its own `tooltip` (or `false`) or an enclosing Tooltip.Anchor already
|
|
@@ -8,6 +8,9 @@ export type OpenDialogOptions = {
|
|
|
8
8
|
initialFocus?: "first-input" | "none" | ((dialog: HTMLDialogElement) => HTMLElement | null);
|
|
9
9
|
cancelBehavior?: "resolve-undefined" | "ignore";
|
|
10
10
|
ariaLabel?: string;
|
|
11
|
+
ariaDescribedBy?: string;
|
|
12
|
+
/** Use for a consequential confirmation that requires a response. Defaults to dialog. */
|
|
13
|
+
role?: "dialog" | "alertdialog";
|
|
11
14
|
/**
|
|
12
15
|
* Add a same-URL history entry while the dialog is open, so the browser's or the phone's Back closes the dialog
|
|
13
16
|
* instead of leaving the page. Normally closing the dialog removes the entry again; the returned promise settles after that.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type JSX } from "solid-js";
|
|
2
|
+
import type { ValueFieldProps } from "./field-contract";
|
|
3
|
+
export type ChoiceListOption<T extends string = string> = {
|
|
4
|
+
value: T;
|
|
5
|
+
label: string;
|
|
6
|
+
/** One sentence on what the choice means. */
|
|
7
|
+
description?: string;
|
|
8
|
+
/** A quiet tag after the label, such as "Default" for the choice that applies without one. */
|
|
9
|
+
marker?: string;
|
|
10
|
+
};
|
|
11
|
+
export type ChoiceListProps<T extends string = string> = Omit<ValueFieldProps<T | null>, "onValueChange" | "onValueCommit"> & {
|
|
12
|
+
options: readonly ChoiceListOption<T>[];
|
|
13
|
+
/** The chosen value is being saved: a spinner beside its label, and the group is busy. Choosing again is still possible. */
|
|
14
|
+
busy?: boolean;
|
|
15
|
+
/** Busy spinner's name for screen readers, such as "Saving". */
|
|
16
|
+
busyLabel?: string;
|
|
17
|
+
/** Follow-up controls for the chosen option, shown under it and indented to its text, such as a duration. */
|
|
18
|
+
details?: JSX.Element;
|
|
19
|
+
onValueChange?: (value: T) => void;
|
|
20
|
+
onValueCommit?: (value: T) => void;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* A labeled single choice shown as a short list of rows, each with a radio, a label and one sentence on what it
|
|
24
|
+
* means, for a few choices whose consequences need words. Choosing changes only paint, so no row moves; `details`
|
|
25
|
+
* opens under the chosen row. Use `ChoiceChips` for quick picks without explanation, `RichSelect` for longer lists
|
|
26
|
+
* in a dropdown, and `ChoiceTiles` when a preview decides.
|
|
27
|
+
*/
|
|
28
|
+
export declare function ChoiceList<T extends string = string>(props: ChoiceListProps<T>): JSX.Element;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type JSX } from "solid-js";
|
|
2
|
+
import { type MaybeAccessor } from "./field-contract";
|
|
3
|
+
export type ChoiceSliderOption = {
|
|
4
|
+
value: string;
|
|
5
|
+
label: string;
|
|
6
|
+
/** One short line shown below the label line while this stop is active. */
|
|
7
|
+
description?: string;
|
|
8
|
+
/** Makes the stop unavailable. The text replaces the description when someone reaches the stop. */
|
|
9
|
+
disabledReason?: string;
|
|
10
|
+
/** Spoken value; defaults to the label and the description or reason. */
|
|
11
|
+
valueText?: string;
|
|
12
|
+
};
|
|
13
|
+
export type ChoiceSliderProps = {
|
|
14
|
+
options: readonly ChoiceSliderOption[];
|
|
15
|
+
/** The chosen stop. `null` shows no thumb, for a choice that is none of the stops. */
|
|
16
|
+
value: MaybeAccessor<string | null>;
|
|
17
|
+
/** A person released the thumb on a stop or moved to one with the keyboard. */
|
|
18
|
+
onValueChange?: (value: string) => void;
|
|
19
|
+
/** The stop the slider shows while someone drags or arrows through it; `null` when it shows `value` again. */
|
|
20
|
+
onActiveChange?: (value: string | null) => void;
|
|
21
|
+
/** Line text while no stop is chosen. */
|
|
22
|
+
description?: string;
|
|
23
|
+
"aria-label"?: string;
|
|
24
|
+
"aria-labelledby"?: string;
|
|
25
|
+
id?: string;
|
|
26
|
+
class?: string;
|
|
27
|
+
disabled?: boolean;
|
|
28
|
+
/** `lg` gives a 44 px track and a 28 px thumb for touch sheets. */
|
|
29
|
+
size?: "md" | "lg";
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* A slider over a few named stops. The fixed line above the track always shows
|
|
33
|
+
* the active stop's description, or why a stop cannot be chosen; its height
|
|
34
|
+
* never changes. Unavailable stops stay visible and are skipped.
|
|
35
|
+
*/
|
|
36
|
+
export declare function ChoiceSlider(props: ChoiceSliderProps): JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type JSX } from "solid-js";
|
|
2
|
+
import type { ValueFieldProps } from "./field-contract";
|
|
3
|
+
export type ChoiceTileOption<T extends string = string> = {
|
|
4
|
+
value: T;
|
|
5
|
+
label: string;
|
|
6
|
+
/** What the choice looks like, such as a preview image; decorative, the label names the choice. */
|
|
7
|
+
visual: JSX.Element;
|
|
8
|
+
/** A short state under the label, such as "Active"; keeps its line, so tiles never change height. */
|
|
9
|
+
status?: string;
|
|
10
|
+
};
|
|
11
|
+
export type ChoiceTilesProps<T extends string = string> = Omit<ValueFieldProps<T | null>, "onValueChange" | "onValueCommit"> & {
|
|
12
|
+
options: readonly ChoiceTileOption<T>[];
|
|
13
|
+
/** `grid`: preview over label in as many columns as fit. `row`: preview beside label in one row, stacked on phones. */
|
|
14
|
+
layout?: "grid" | "row";
|
|
15
|
+
/** The choice is kept but has no visible effect right now; previews are dimmed, choosing still works. */
|
|
16
|
+
dimmed?: boolean;
|
|
17
|
+
onValueChange?: (value: T) => void;
|
|
18
|
+
onValueCommit?: (value: T) => void;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* A labeled single choice shown as tiles with a preview, for picking how something looks: a face shape, a frame, a
|
|
22
|
+
* kind of picture. Every tile keeps its size when chosen, so nothing moves. Use `ChoiceChips` for text choices and
|
|
23
|
+
* `ColorChoices` for named colours.
|
|
24
|
+
*/
|
|
25
|
+
export declare function ChoiceTiles<T extends string = string>(props: ChoiceTilesProps<T>): JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type JSX } from "solid-js";
|
|
2
|
+
import type { ValueFieldProps } from "./field-contract";
|
|
3
|
+
export type ColorChoiceOption<T extends string = string> = {
|
|
4
|
+
value: T;
|
|
5
|
+
/** The colour's name; screen readers and the tooltip use it, so colour is never the only signal. */
|
|
6
|
+
label: string;
|
|
7
|
+
/** Any CSS colour. */
|
|
8
|
+
color: string;
|
|
9
|
+
};
|
|
10
|
+
export type ColorChoicesProps<T extends string = string> = Omit<ValueFieldProps<T | null>, "onValueChange" | "onValueCommit"> & {
|
|
11
|
+
options: readonly ColorChoiceOption<T>[];
|
|
12
|
+
onValueChange?: (value: T) => void;
|
|
13
|
+
onValueCommit?: (value: T) => void;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* A labeled single choice from a fixed palette of named colours, shown as round swatches. Use `ColorInput` when any
|
|
17
|
+
* colour is allowed.
|
|
18
|
+
*/
|
|
19
|
+
export declare function ColorChoices<T extends string = string>(props: ColorChoicesProps<T>): JSX.Element;
|
|
@@ -10,6 +10,14 @@ export type { ChoiceChipOption, ChoiceChipsProps } from "./ChoiceChips";
|
|
|
10
10
|
export { ChoiceChips } from "./ChoiceChips";
|
|
11
11
|
export type { ColorInputProps, PinInputProps, SliderProps, } from "./ChoiceInputs";
|
|
12
12
|
export { ColorInput, PinInput, Slider } from "./ChoiceInputs";
|
|
13
|
+
export type { ChoiceListOption, ChoiceListProps } from "./ChoiceList";
|
|
14
|
+
export { ChoiceList } from "./ChoiceList";
|
|
15
|
+
export type { ChoiceSliderOption, ChoiceSliderProps } from "./ChoiceSlider";
|
|
16
|
+
export { ChoiceSlider } from "./ChoiceSlider";
|
|
17
|
+
export type { ChoiceTileOption, ChoiceTilesProps } from "./ChoiceTiles";
|
|
18
|
+
export { ChoiceTiles } from "./ChoiceTiles";
|
|
19
|
+
export type { ColorChoiceOption, ColorChoicesProps } from "./ColorChoices";
|
|
20
|
+
export { ColorChoices } from "./ColorChoices";
|
|
13
21
|
export type { ComboboxOption, ComboboxProps } from "./Combobox";
|
|
14
22
|
export { Combobox } from "./Combobox";
|
|
15
23
|
export type { ChoiceOption, ChoiceOptionsLoader } from "./choice";
|
|
@@ -2,6 +2,7 @@ declare const qrMessages: import("@k2b/stdlib").Catalog<{
|
|
|
2
2
|
qrCameraPreview: string;
|
|
3
3
|
qrCameraStarting: string;
|
|
4
4
|
qrCameraInstructions: string;
|
|
5
|
+
qrCameraStalled: string;
|
|
5
6
|
qrCameraPrivacy: string;
|
|
6
7
|
}>;
|
|
7
8
|
export type QrMessages = ReturnType<(typeof qrMessages)["resolve"]>["t"];
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Roving focus for a single-choice radio group: arrows move and select with wrapping, Home and End select the first
|
|
3
|
+
* and last option. Returns the index to select, or `undefined` for keys the group does not handle.
|
|
4
|
+
*/
|
|
5
|
+
export declare const radioKeyTarget: (key: string, index: number, count: number) => number | undefined;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type JSX } from "solid-js";
|
|
2
|
+
export type AnchoredPopoverProps = {
|
|
3
|
+
/** The control the panel belongs to. The panel is open while this is set. */
|
|
4
|
+
anchor: HTMLElement | null | undefined;
|
|
5
|
+
/** Called on Escape, a click outside, another press of the anchor, and when the anchor leaves the page. */
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
/** The panel's accessible name; it is a non-modal dialog. */
|
|
8
|
+
label: string;
|
|
9
|
+
children: JSX.Element;
|
|
10
|
+
/** Which edge lines up with the anchor. Defaults to `end`, like a menu at the end of a toolbar. */
|
|
11
|
+
align?: "start" | "end";
|
|
12
|
+
/** The side tried first; the panel flips only when the other side has more room. Defaults to `below`. */
|
|
13
|
+
side?: "below" | "above";
|
|
14
|
+
/**
|
|
15
|
+
* The tallest the panel gets while open, in px, such as a list it can switch to. The side is chosen for this height
|
|
16
|
+
* and kept, so a panel that grows never flips. Defaults to its height when it opens.
|
|
17
|
+
*/
|
|
18
|
+
plannedHeight?: number;
|
|
19
|
+
/** Width of the panel on wide screens, such as `21rem`. On a phone it is a bottom sheet across the screen. */
|
|
20
|
+
width?: string;
|
|
21
|
+
/** Moves the focus into the panel when it opens; defaults to the panel itself. */
|
|
22
|
+
initialFocus?: () => HTMLElement | null | undefined;
|
|
23
|
+
class?: string;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* A panel anchored to a control, for content that is more than a menu, such as a card with a slider. It opens on the
|
|
27
|
+
* side with room and keeps that side while open, so a panel that changes its content never jumps to the other side.
|
|
28
|
+
* Escape, a click outside and another press of the anchor close it; the focus returns to where it was. On a phone it
|
|
29
|
+
* is a bottom sheet.
|
|
30
|
+
*/
|
|
31
|
+
export declare function AnchoredPopover(props: AnchoredPopoverProps): JSX.Element;
|
|
@@ -91,6 +91,8 @@ export type AppWorkspaceMainPaneProps = {
|
|
|
91
91
|
href?: string;
|
|
92
92
|
/** Quiet one-line text below the level title. */
|
|
93
93
|
description?: JSX.Element;
|
|
94
|
+
/** Levels mode: a small mark before the level title, such as the colour dot of the object's container. */
|
|
95
|
+
lead?: JSX.Element;
|
|
94
96
|
/** Controls at the end of the level head. */
|
|
95
97
|
actions?: JSX.Element;
|
|
96
98
|
surface?: "default" | "navigation";
|
|
@@ -98,6 +100,11 @@ export type AppWorkspaceMainPaneProps = {
|
|
|
98
100
|
resizable?: boolean;
|
|
99
101
|
resizeShadow?: boolean;
|
|
100
102
|
defaultSize?: number | AppWorkspaceWidthShare;
|
|
103
|
+
/**
|
|
104
|
+
* The narrowest width in px, also for a person resizing it. Levels mode: the level needs it to be shown; when the
|
|
105
|
+
* deepest levels do not fit side by side at their minimum widths, the shallowest of them gives way, so a wide list
|
|
106
|
+
* pushes earlier columns aside.
|
|
107
|
+
*/
|
|
101
108
|
minSize?: number;
|
|
102
109
|
maxSize?: number;
|
|
103
110
|
class?: string;
|
|
@@ -396,6 +403,11 @@ export type AppWorkspaceNavTreeItemProps = {
|
|
|
396
403
|
class?: string;
|
|
397
404
|
/** With the tree's `onMove`, the item can change its place among its siblings. Other items keep theirs, and no item moves past them. */
|
|
398
405
|
movable?: boolean;
|
|
406
|
+
/**
|
|
407
|
+
* Shows the item as a branch before its children are rendered, for a tree that loads a branch when it opens. The
|
|
408
|
+
* application renders the children, or a row that says they load, once the item is expanded.
|
|
409
|
+
*/
|
|
410
|
+
hasChildren?: boolean;
|
|
399
411
|
onDragEnter?: JSX.EventHandlerUnion<HTMLDivElement, DragEvent>;
|
|
400
412
|
onDragOver?: JSX.EventHandlerUnion<HTMLDivElement, DragEvent>;
|
|
401
413
|
onDragLeave?: JSX.EventHandlerUnion<HTMLDivElement, DragEvent>;
|
|
@@ -8,9 +8,18 @@ export type DetailPanelProps = {
|
|
|
8
8
|
class?: string;
|
|
9
9
|
};
|
|
10
10
|
type DetailPanelHeaderBaseProps = {
|
|
11
|
+
/** A short line above the title that names what is shown, such as "Conversation", followed by its state. */
|
|
12
|
+
kind?: JSX.Element;
|
|
11
13
|
title: JSX.Element;
|
|
12
14
|
subtitle?: JSX.Element;
|
|
13
15
|
meta?: JSX.Element;
|
|
16
|
+
/**
|
|
17
|
+
* The resource's "…" menu, shown before `actions`. Pass every less frequent command on the shown resource here,
|
|
18
|
+
* so each panel opens its menu from the same place; an empty list shows no button.
|
|
19
|
+
*/
|
|
20
|
+
menu?: readonly DropdownItem[];
|
|
21
|
+
/** Accessible name of the "…" button. Defaults to "More actions". */
|
|
22
|
+
menuLabel?: string;
|
|
14
23
|
actions?: JSX.Element;
|
|
15
24
|
primaryActions?: JSX.Element;
|
|
16
25
|
class?: string;
|
|
@@ -37,6 +46,11 @@ export type DetailPanelSummaryProps = {
|
|
|
37
46
|
export type DetailPanelGroupProps = {
|
|
38
47
|
children: JSX.Element;
|
|
39
48
|
label?: string;
|
|
49
|
+
/**
|
|
50
|
+
* A visible quiet title, such as "More about this conversation". Its sections then stand flush as rows below
|
|
51
|
+
* it, which suits collapsed secondary sections with a `summary`.
|
|
52
|
+
*/
|
|
53
|
+
title?: JSX.Element;
|
|
40
54
|
class?: string;
|
|
41
55
|
};
|
|
42
56
|
export type DetailPanelTone = "accent" | "neutral" | "success" | "warning" | "danger";
|
|
@@ -90,6 +104,7 @@ export type DetailPanelSectionProps = DetailPanelSectionBaseProps & ({
|
|
|
90
104
|
children?: JSX.Element;
|
|
91
105
|
actions?: JSX.Element;
|
|
92
106
|
collapsible?: false;
|
|
107
|
+
summary?: never;
|
|
93
108
|
defaultOpen?: never;
|
|
94
109
|
open?: never;
|
|
95
110
|
onOpenChange?: never;
|
|
@@ -98,6 +113,8 @@ export type DetailPanelSectionProps = DetailPanelSectionBaseProps & ({
|
|
|
98
113
|
children: JSX.Element;
|
|
99
114
|
actions?: never;
|
|
100
115
|
collapsible: true;
|
|
116
|
+
/** One line that says what the closed section holds, such as its newest entry; hidden while open. */
|
|
117
|
+
summary?: JSX.Element;
|
|
101
118
|
defaultOpen?: boolean;
|
|
102
119
|
open?: boolean;
|
|
103
120
|
onOpenChange?: (open: boolean) => void;
|
|
@@ -1,20 +1,38 @@
|
|
|
1
1
|
import { type JSX } from "solid-js";
|
|
2
|
+
import type { TabBarItem } from "./TabBar";
|
|
2
3
|
export type MobileShellProps = {
|
|
3
4
|
/** Usually `MobileShell.Header`; it sits above the scroll area and pads the top safe area. */
|
|
4
|
-
header
|
|
5
|
+
header?: JSX.Element;
|
|
5
6
|
/** Usually a `TabBar`; it sits below the scroll area and pads the bottom safe area itself. */
|
|
6
7
|
footer?: JSX.Element;
|
|
8
|
+
/**
|
|
9
|
+
* Usually `MobileShell.Sidebar` with the footer's destinations and more. From 48rem of window width it stands at
|
|
10
|
+
* the start edge and the footer goes; below, it is not shown. The server renders both, so CSS alone decides.
|
|
11
|
+
*/
|
|
12
|
+
sidebar?: JSX.Element;
|
|
7
13
|
/** The page content, inside the shell's only scroll area. */
|
|
8
14
|
children: JSX.Element;
|
|
15
|
+
/**
|
|
16
|
+
* `false` for content that brings its own heads and scroll areas, such as `AppWorkspace.Main` levels: it fills the
|
|
17
|
+
* main area without the shell's scroll area, and the header shows only as the frame of the next page while a tapped
|
|
18
|
+
* tab's page loads.
|
|
19
|
+
*/
|
|
20
|
+
scroll?: boolean;
|
|
9
21
|
class?: string;
|
|
10
22
|
};
|
|
11
23
|
export type MobileShellHeaderProps = {
|
|
12
24
|
title: string;
|
|
13
|
-
/**
|
|
25
|
+
/** The title while the shell shows its sidebar, which already names the app; `title` by default. */
|
|
26
|
+
sidebarTitle?: string;
|
|
27
|
+
/**
|
|
28
|
+
* A Back control before the title: a link with `href`, otherwise a button. `withSidebar: false` hides it while the
|
|
29
|
+
* shell shows its sidebar, for a way back to a destination the sidebar lists.
|
|
30
|
+
*/
|
|
14
31
|
back?: {
|
|
15
32
|
href?: string;
|
|
16
33
|
onClick?: () => void;
|
|
17
34
|
label: string;
|
|
35
|
+
withSidebar?: boolean;
|
|
18
36
|
};
|
|
19
37
|
/** Controls after the title, such as a menu. */
|
|
20
38
|
actions?: JSX.Element;
|
|
@@ -29,12 +47,44 @@ export type MobileShellHeaderProps = {
|
|
|
29
47
|
export declare function observeMobileShell(root: HTMLElement): () => void;
|
|
30
48
|
declare function MobileShellRoot(props: MobileShellProps): JSX.Element;
|
|
31
49
|
declare function MobileShellHeader(props: MobileShellHeaderProps): JSX.Element;
|
|
50
|
+
export type MobileShellSidebarItem = TabBarItem & {
|
|
51
|
+
/**
|
|
52
|
+
* A quiet count after the label, such as open tasks: a number (0 shows nothing) or an element that renders one. The
|
|
53
|
+
* item's `badge`, which calls for attention, takes its place.
|
|
54
|
+
*/
|
|
55
|
+
count?: number | JSX.Element;
|
|
56
|
+
};
|
|
57
|
+
export type MobileShellSidebarProps = {
|
|
58
|
+
/** Accessible name of the navigation landmark; usually the tab bar's. */
|
|
59
|
+
label: string;
|
|
60
|
+
/** The app's name in the sidebar's head. */
|
|
61
|
+
title: string;
|
|
62
|
+
/** Address of the app's logo before the name; decorative, the name says it. */
|
|
63
|
+
logo?: string;
|
|
64
|
+
/** Destinations at the top, such as Start. */
|
|
65
|
+
items: readonly MobileShellSidebarItem[];
|
|
66
|
+
/** Named groups below them, such as the apps; a group without items is left out. */
|
|
67
|
+
sections?: readonly {
|
|
68
|
+
title: string;
|
|
69
|
+
items: readonly MobileShellSidebarItem[];
|
|
70
|
+
}[];
|
|
71
|
+
/** Destinations at the bottom edge, such as Settings. */
|
|
72
|
+
footer?: readonly MobileShellSidebarItem[];
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* The navigation of a touch app on a wide screen, in `MobileShell`'s `sidebar`: the app's name, then its destinations
|
|
76
|
+
* as 44 px rows with icon and label, the open one in the action colour. A press shows the item's page frame at once,
|
|
77
|
+
* as on a tab, and the row of a loading page pulses.
|
|
78
|
+
*/
|
|
79
|
+
declare function MobileShellSidebar(props: MobileShellSidebarProps): JSX.Element;
|
|
32
80
|
/**
|
|
33
|
-
* The full-screen frame of a phone app: a header, one scroll area, and an optional footer such as a `TabBar`.
|
|
34
|
-
*
|
|
35
|
-
*
|
|
81
|
+
* The full-screen frame of a phone app: a header, one scroll area, and an optional footer such as a `TabBar`. With a
|
|
82
|
+
* `sidebar`, a window of 48rem and wider shows the sidebar at the start edge instead of the footer, and the toast rail
|
|
83
|
+
* stays in the area beside it. While it is mounted, the document itself never scrolls, pinch zoom and rubber-banding
|
|
84
|
+
* are off, and the toast rail sits above the footer. Mount one per page, as the page's layout.
|
|
36
85
|
*/
|
|
37
86
|
export declare const MobileShell: typeof MobileShellRoot & {
|
|
38
87
|
Header: typeof MobileShellHeader;
|
|
88
|
+
Sidebar: typeof MobileShellSidebar;
|
|
39
89
|
};
|
|
40
90
|
export default MobileShell;
|
|
@@ -3,6 +3,8 @@ import { type ButtonVariant } from "../actions/Button";
|
|
|
3
3
|
import type { MaybeAccessor } from "../inputs/field-contract";
|
|
4
4
|
export type SettingsPageProps = {
|
|
5
5
|
title: JSX.Element;
|
|
6
|
+
/** False when a surrounding head already shows the title, such as a workspace level; the actions move to the footer. */
|
|
7
|
+
header?: boolean;
|
|
6
8
|
subtitle?: JSX.Element;
|
|
7
9
|
icon?: string;
|
|
8
10
|
actions?: JSX.Element;
|
|
@@ -69,4 +71,24 @@ export type SettingsSaveBarProps = {
|
|
|
69
71
|
export declare function SettingsSaveBar(props: SettingsSaveBarProps): JSX.Element;
|
|
70
72
|
export type SettingsPanelFooterProps = SettingsSaveBarProps;
|
|
71
73
|
export declare function SettingsPanelFooter(props: SettingsPanelFooterProps): JSX.Element;
|
|
74
|
+
export type SaveStatusState = "saved" | "draft" | "saving" | "failed" | "invalid" | "unknown" | "readonly";
|
|
75
|
+
export type SaveStatusProps = {
|
|
76
|
+
/** What the person's values are now: saved, a draft with changes, being saved, or a problem that kept them unsaved. */
|
|
77
|
+
state: MaybeAccessor<SaveStatusState>;
|
|
78
|
+
/** Formatted time of the last save, shown with `saved`. */
|
|
79
|
+
savedAt?: MaybeAccessor<string | undefined>;
|
|
80
|
+
/** Fields to check, shown with `invalid`. Default 1. */
|
|
81
|
+
invalidCount?: MaybeAccessor<number>;
|
|
82
|
+
/** With both handlers, Discard and Save follow the status while there is something to save. */
|
|
83
|
+
onDiscard?: () => void;
|
|
84
|
+
onSave?: () => void;
|
|
85
|
+
saveLabel?: string;
|
|
86
|
+
saveDisabled?: MaybeAccessor<boolean>;
|
|
87
|
+
class?: string;
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* The save status of a settings form at one fixed place, usually the head of its column. It reserves its width, so
|
|
91
|
+
* a change of state never moves the title or the buttons beside it. Problems with one field stay at that field.
|
|
92
|
+
*/
|
|
93
|
+
export declare function SaveStatus(props: SaveStatusProps): JSX.Element;
|
|
72
94
|
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type JSX } from "solid-js";
|
|
2
|
+
/**
|
|
3
|
+
* True while `element` sits in the collapsed sidebar rail, which shows icons
|
|
4
|
+
* without labels. The stylesheet sets `--k2b-sidebar-rail` exactly where it
|
|
5
|
+
* collapses the sidebar, so this follows the same container width and state.
|
|
6
|
+
*/
|
|
7
|
+
export declare const inSidebarRail: (element: Element | undefined) => boolean;
|
|
8
|
+
/**
|
|
9
|
+
* A sidebar entry's name, or its `title`, in the hint the Cloud app rail uses.
|
|
10
|
+
* In the collapsed rail it names the icon beside it at once. Elsewhere it
|
|
11
|
+
* shows above the entry with the usual delay, and only when it says more than
|
|
12
|
+
* the visible label: a label cut off, or a title with details. A native
|
|
13
|
+
* `title` on `target` gives way to it, so no hint shows twice.
|
|
14
|
+
*/
|
|
15
|
+
export declare function SidebarRailHint(props: {
|
|
16
|
+
target: () => HTMLElement | undefined;
|
|
17
|
+
label: string | undefined;
|
|
18
|
+
/** The element that holds keyboard focus for the entry, when that is not `target`. */
|
|
19
|
+
focusTarget?: () => HTMLElement | undefined;
|
|
20
|
+
/** The visible label text inside `target`. */
|
|
21
|
+
labelSelector: string;
|
|
22
|
+
/** The entry renders a native `title`, which the hint replaces from the first hover or focus. */
|
|
23
|
+
titled?: boolean;
|
|
24
|
+
/** Called once the hint takes over; the entry stops rendering its native `title`. */
|
|
25
|
+
onArm?: () => void;
|
|
26
|
+
}): JSX.Element;
|
|
@@ -9,6 +9,11 @@ export type TabBarItem = {
|
|
|
9
9
|
title?: string;
|
|
10
10
|
/** The page this item leads to is open. */
|
|
11
11
|
current?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* A mark at the icon's corner that calls for attention, such as an unread count. Its element names the count for
|
|
14
|
+
* screen readers; an empty one takes no space.
|
|
15
|
+
*/
|
|
16
|
+
badge?: JSX.Element;
|
|
12
17
|
};
|
|
13
18
|
export type TabBarProps = {
|
|
14
19
|
/** Accessible name of the navigation landmark. */
|
|
@@ -8,6 +8,7 @@ declare const detailPanelMessages: import("@k2b/stdlib").Catalog<{
|
|
|
8
8
|
count: number;
|
|
9
9
|
}) => string;
|
|
10
10
|
showLess: string;
|
|
11
|
+
moreActions: string;
|
|
11
12
|
}>;
|
|
12
13
|
export type DetailPanelMessages = ReturnType<(typeof detailPanelMessages)["resolve"]>["t"];
|
|
13
14
|
export declare const useDetailPanelMessages: () => (() => DetailPanelMessages);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { AnchoredPopover, type AnchoredPopoverProps } from "./AnchoredPopover";
|
|
1
2
|
export type { AppOverviewCardsProps, AppOverviewEmptyStateProps, AppOverviewPanelProps, AppOverviewProps, } from "./AppOverview";
|
|
2
3
|
export { default as AppOverview } from "./AppOverview";
|
|
3
4
|
export type { AppWorkspaceBottomDrawerHeight, AppWorkspaceBottomDrawerProps, AppWorkspaceContentProps, AppWorkspaceDetailProps, AppWorkspaceDetailWidth, AppWorkspaceHeadProps, AppWorkspaceMainPaneProps, AppWorkspaceMainProps, AppWorkspaceNavTreeItemProps, AppWorkspaceNavTreeMove, AppWorkspaceNavTreeProps, AppWorkspaceProps, AppWorkspaceSidebarAccessoryVisibility, AppWorkspaceSidebarBodyProps, AppWorkspaceSidebarIconActionProps, AppWorkspaceSidebarIconActionTone, AppWorkspaceSidebarIconGridProps, AppWorkspaceSidebarItemActionProps, AppWorkspaceSidebarItemActionsProps, AppWorkspaceSidebarItemIconProps, AppWorkspaceSidebarItemLabelProps, AppWorkspaceSidebarItemMetaProps, AppWorkspaceSidebarItemProps, AppWorkspaceSidebarItemStatusProps, AppWorkspaceSidebarItemTone, AppWorkspaceSidebarProps, AppWorkspaceSidebarSectionProps, AppWorkspaceSidebarVisibility, AppWorkspaceWidthShare, } from "./AppWorkspace";
|
|
@@ -16,7 +17,7 @@ export type { DiscussionComposerProps, DiscussionItemProps, DiscussionListProps,
|
|
|
16
17
|
export { default as Discussion } from "./Discussion";
|
|
17
18
|
export type { FloatingWindowClose, FloatingWindowProps, OpenFloatingWindowOptions, } from "./FloatingWindow";
|
|
18
19
|
export { default as FloatingWindow, type FloatingWindowRect, fitFloatingWindowRect, openFloatingWindow, } from "./FloatingWindow";
|
|
19
|
-
export type { MobileShellHeaderProps, MobileShellProps } from "./MobileShell";
|
|
20
|
+
export type { MobileShellHeaderProps, MobileShellProps, MobileShellSidebarItem, MobileShellSidebarProps } from "./MobileShell";
|
|
20
21
|
export { default as MobileShell, observeMobileShell } from "./MobileShell";
|
|
21
22
|
export { default as Navigation, type NavigationProps } from "./Navigation";
|
|
22
23
|
export { createNavigation, findNavigationItem, type NavigationController, type NavigationItem, type NavigationOptions, type NavigationStatus, } from "./navigation-model";
|
|
@@ -37,13 +38,14 @@ export { default as ResizeSeparator, type ResizeSeparatorProps } from "./ResizeS
|
|
|
37
38
|
export { attachResizeSeparator, type ResizeSeparatorOptions } from "./resize-separator";
|
|
38
39
|
export type { ScrollAreaProps } from "./ScrollArea";
|
|
39
40
|
export { default as ScrollArea } from "./ScrollArea";
|
|
40
|
-
export type { SettingsFieldControlProps, SettingsFieldProps, SettingsGroupActionProps, SettingsGroupProps, SettingsPageProps, SettingsPanelFooterProps, SettingsSaveBarProps, SettingsSectionProps, } from "./Settings";
|
|
41
|
-
export { readSettingsError, SettingsField, SettingsGroup, SettingsPage, SettingsPanelFooter, SettingsSaveBar, SettingsSection, sameSettingValue, } from "./Settings";
|
|
41
|
+
export type { SaveStatusProps, SaveStatusState, SettingsFieldControlProps, SettingsFieldProps, SettingsGroupActionProps, SettingsGroupProps, SettingsPageProps, SettingsPanelFooterProps, SettingsSaveBarProps, SettingsSectionProps, } from "./Settings";
|
|
42
|
+
export { readSettingsError, SaveStatus, SettingsField, SettingsGroup, SettingsPage, SettingsPanelFooter, SettingsSaveBar, SettingsSection, sameSettingValue, } from "./Settings";
|
|
42
43
|
export type { SettingsCollectionActionProps, SettingsCollectionItemActionsProps, SettingsCollectionItemProps, SettingsCollectionItemReorderProps, SettingsCollectionItemStatusProps, SettingsCollectionProps, } from "./SettingsCollection";
|
|
43
44
|
export { default as SettingsCollection } from "./SettingsCollection";
|
|
44
45
|
export type { SettingsModalFooterProps, SettingsModalGroupProps, SettingsModalProps, SettingsModalTabProps, SettingsModalTabTone, } from "./SettingsModal";
|
|
45
46
|
export { default as SettingsModal } from "./SettingsModal";
|
|
46
47
|
export { APP_WORKSPACE_SWITCHER_SEARCH_FROM, type AppWorkspaceSidebarSwitcherProps, type AppWorkspaceSwitcherAction, type AppWorkspaceSwitcherOption, } from "./SidebarSwitcher";
|
|
48
|
+
export { measureScrollFade } from "./scroll-fade";
|
|
47
49
|
export type { TabBarItem, TabBarProps } from "./TabBar";
|
|
48
50
|
export { default as TabBar } from "./TabBar";
|
|
49
51
|
export type { TableOfContentsItem, TableOfContentsProps } from "./TableOfContents";
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
/** Self-contained because the sidebar inline script embeds its source. */
|
|
2
2
|
export declare function scrollFadeEdges(body: HTMLElement): "top" | "bottom" | "both" | undefined;
|
|
3
|
+
/**
|
|
4
|
+
* Measures an observed scrollport's fades now instead of at the end of the frame. Call it before reading the fades in
|
|
5
|
+
* the same frame as a change of the scrollport's content, as an editor does when it keeps its cursor clear of them.
|
|
6
|
+
*/
|
|
7
|
+
export declare function measureScrollFade(element: HTMLElement): void;
|
|
3
8
|
export declare function createScrollFade(element: () => HTMLElement | undefined, enabled: () => boolean): void;
|
|
4
9
|
/** Enrich only explicitly marked UI scrollports, including SSR and later navigation. */
|
|
5
10
|
export declare function installScrollFades(root: Document | HTMLElement): () => void;
|
|
@@ -11,12 +11,24 @@ declare const settingsMessages: import("@k2b/stdlib").Catalog<{
|
|
|
11
11
|
label: string;
|
|
12
12
|
}) => string;
|
|
13
13
|
saveChanges: string;
|
|
14
|
+
save: string;
|
|
14
15
|
saving: string;
|
|
15
16
|
unsaved: string;
|
|
16
17
|
unsavedChangeLabel: ({ count }: {
|
|
17
18
|
count: number;
|
|
18
19
|
}) => string;
|
|
19
20
|
noUnsavedChanges: string;
|
|
21
|
+
statusSaved: string;
|
|
22
|
+
statusSavedAt: ({ time }: {
|
|
23
|
+
time: string;
|
|
24
|
+
}) => string;
|
|
25
|
+
statusDraft: string;
|
|
26
|
+
statusFailed: string;
|
|
27
|
+
statusInvalid: ({ count }: {
|
|
28
|
+
count: number;
|
|
29
|
+
}) => string;
|
|
30
|
+
statusUnknown: string;
|
|
31
|
+
statusReadOnly: string;
|
|
20
32
|
}>;
|
|
21
33
|
export type SettingsMessages = ReturnType<(typeof settingsMessages)["resolve"]>["t"];
|
|
22
34
|
/** Resolved from the inherited render locale. */
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type JSX } from "solid-js";
|
|
2
|
+
/** `accent` = the app colour (it worked), `ai` = came from AI, `muted` = nothing happened. */
|
|
3
|
+
export type DotStripTone = "accent" | "warning" | "danger" | "ai" | "muted";
|
|
4
|
+
export type DotStripProps = {
|
|
5
|
+
/** Outcomes in order, left to right. */
|
|
6
|
+
dots: readonly DotStripTone[];
|
|
7
|
+
/** Total slots. Slots after `dots` show as empty rings, so a growing strip keeps its size. Defaults to `dots.length`. */
|
|
8
|
+
length?: number;
|
|
9
|
+
/** Shows every slot as a quiet placeholder, for "nothing checked yet". */
|
|
10
|
+
waiting?: boolean;
|
|
11
|
+
/** Index of the dot that belongs to the item shown next to the strip. */
|
|
12
|
+
selected?: number | null;
|
|
13
|
+
size?: "md" | "lg";
|
|
14
|
+
/** Dots per row; more wrap into further rows of the same width. Defaults to one row. */
|
|
15
|
+
columns?: number;
|
|
16
|
+
/** Names the strip and its counts, for example "Last 50 mails: 17 matched, 6 skipped, 27 not". */
|
|
17
|
+
label: string;
|
|
18
|
+
class?: string;
|
|
19
|
+
};
|
|
20
|
+
/** A fixed-size row of outcome dots: the last runs, checks or mails at a glance. */
|
|
21
|
+
export declare function DotStrip(props: DotStripProps): JSX.Element;
|
|
22
|
+
export default DotStrip;
|
|
@@ -14,11 +14,14 @@ type NoticeCardContentProps = {
|
|
|
14
14
|
};
|
|
15
15
|
export type NoticeCardProps = Omit<JSX.HTMLAttributes<HTMLElement>, "children" | "class" | "title"> & NoticeCardContentProps & {
|
|
16
16
|
tone?: NoticeTone;
|
|
17
|
+
/** A Tabler icon class. Turns the notice into a compact status line whose icon and text take the tone colour. */
|
|
18
|
+
icon?: string;
|
|
17
19
|
class?: string;
|
|
18
20
|
bodyClass?: string;
|
|
19
21
|
};
|
|
20
22
|
export declare const NOTICE_CARD_CLASSES: {
|
|
21
23
|
readonly root: "k2b-notice-card";
|
|
24
|
+
readonly icon: "k2b-notice-card__icon";
|
|
22
25
|
readonly content: "k2b-notice-card__content";
|
|
23
26
|
readonly head: "k2b-notice-card__head";
|
|
24
27
|
readonly title: "k2b-notice-card__title";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type JSX } from "solid-js";
|
|
2
2
|
import type { IntentTone } from "../semantics";
|
|
3
|
-
|
|
3
|
+
/** `accent` draws the ring in the app's own colour, for progress that belongs to the app rather than to a state. */
|
|
4
|
+
export type ProgressRingTone = Extract<IntentTone, "info" | "warning" | "danger"> | "accent";
|
|
4
5
|
export type ProgressRingProps = {
|
|
5
6
|
value: number;
|
|
6
7
|
tone?: ProgressRingTone;
|