@k2b/ui 0.26.0 → 0.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/base.css +147 -2
- package/dist/browser/actions/ContextMenu.js +30 -4
- package/dist/browser/actions/ContextMenu.js.map +1 -1
- package/dist/browser/actions/Dropdown.js +184 -158
- package/dist/browser/actions/Dropdown.js.map +1 -1
- package/dist/browser/actions/GestureMenu.js +71 -138
- package/dist/browser/actions/GestureMenu.js.map +1 -1
- package/dist/browser/actions/Toolbar.js +379 -48
- package/dist/browser/actions/Toolbar.js.map +1 -1
- package/dist/browser/actions/index.js.map +1 -1
- package/dist/browser/actions/menu-rows.js +15 -0
- package/dist/browser/actions/menu-rows.js.map +1 -0
- package/dist/browser/actions/menu-sheet.js +154 -0
- package/dist/browser/actions/menu-sheet.js.map +1 -0
- package/dist/browser/actions/toolbar-messages.js +20 -0
- package/dist/browser/actions/toolbar-messages.js.map +1 -0
- package/dist/browser/chart-inspection.js +3 -0
- package/dist/browser/chart-inspection.js.map +1 -0
- package/dist/browser/chat/ChatComposer.js +1020 -431
- package/dist/browser/chat/ChatComposer.js.map +1 -1
- package/dist/browser/chat/chat-behavior.js +4 -0
- package/dist/browser/chat/chat-behavior.js.map +1 -1
- package/dist/browser/chat/chat-messages.js +33 -1
- package/dist/browser/chat/chat-messages.js.map +1 -1
- package/dist/browser/chat/command-search.js +173 -0
- package/dist/browser/chat/command-search.js.map +1 -0
- package/dist/browser/chat/composer-document.js +1 -1
- package/dist/browser/chat/composer-document.js.map +1 -1
- package/dist/browser/chat/index.js +2 -0
- package/dist/browser/chat/index.js.map +1 -1
- package/dist/browser/chat/reaction-people.js +15 -0
- package/dist/browser/chat/reaction-people.js.map +1 -0
- package/dist/browser/content/CalendarDayView.js +28 -3
- package/dist/browser/content/CalendarDayView.js.map +1 -1
- package/dist/browser/content/Chart.js +6 -15
- package/dist/browser/content/Chart.js.map +1 -1
- package/dist/browser/content/ChartSnapshotView.js +7 -10
- package/dist/browser/content/ChartSnapshotView.js.map +1 -1
- package/dist/browser/content/MessageRow.js +330 -448
- package/dist/browser/content/MessageRow.js.map +1 -1
- package/dist/browser/content/ReactionBar.js +419 -0
- package/dist/browser/content/ReactionBar.js.map +1 -0
- package/dist/browser/content/chart-inspection-core.js +557 -0
- package/dist/browser/content/chart-inspection-core.js.map +1 -0
- package/dist/browser/content/chart-inspection.js +10 -445
- package/dist/browser/content/chart-inspection.js.map +1 -1
- package/dist/browser/content/chart-line-gaps.js +1 -1
- package/dist/browser/content/chart-line-gaps.js.map +1 -1
- package/dist/browser/content/chart-snapshot.js +1 -1
- package/dist/browser/content/chart-snapshot.js.map +1 -1
- package/dist/browser/content/index.js +1 -0
- package/dist/browser/content/index.js.map +1 -1
- package/dist/browser/feedback/dialog-core.js +135 -23
- package/dist/browser/feedback/dialog-core.js.map +1 -1
- package/dist/browser/index.js +1 -0
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/input-mode.js +40 -0
- package/dist/browser/input-mode.js.map +1 -0
- package/dist/browser/inputs/Combobox.js +4 -2
- package/dist/browser/inputs/Combobox.js.map +1 -1
- package/dist/browser/inputs/FileDropTarget.js +24 -9
- package/dist/browser/inputs/FileDropTarget.js.map +1 -1
- package/dist/browser/inputs/FileInputs.js +2 -2
- package/dist/browser/inputs/FileInputs.js.map +1 -1
- package/dist/browser/inputs/SelectChip.js +52 -12
- package/dist/browser/inputs/SelectChip.js.map +1 -1
- package/dist/browser/inputs/emoji/EmojiPicker.js +13 -0
- package/dist/browser/inputs/emoji/EmojiPicker.js.map +1 -1
- package/dist/browser/inputs/file-drop.js.map +1 -1
- package/dist/browser/layout/AppWorkspace.js +708 -515
- package/dist/browser/layout/AppWorkspace.js.map +1 -1
- package/dist/browser/layout/BottomSheet.js +8 -0
- package/dist/browser/layout/BottomSheet.js.map +1 -1
- package/dist/browser/layout/DetailPanel.js +283 -197
- package/dist/browser/layout/DetailPanel.js.map +1 -1
- package/dist/browser/layout/Discussion.js +233 -185
- package/dist/browser/layout/Discussion.js.map +1 -1
- package/dist/browser/layout/TableOfContents.js +10 -2
- package/dist/browser/layout/TableOfContents.js.map +1 -1
- package/dist/browser/layout/app-workspace-controller.js +155 -23
- package/dist/browser/layout/app-workspace-controller.js.map +1 -1
- package/dist/browser/layout/app-workspace-state.js +5 -1
- package/dist/browser/layout/app-workspace-state.js.map +1 -1
- package/dist/browser/layout/detail-panel-messages.js +35 -0
- package/dist/browser/layout/detail-panel-messages.js.map +1 -0
- package/dist/browser/layout/index.js +1 -1
- package/dist/browser/layout/index.js.map +1 -1
- package/dist/browser/surfaces/Avatar.js +50 -20
- package/dist/browser/surfaces/Avatar.js.map +1 -1
- package/dist/browser/surfaces/AvatarStack.js +406 -0
- package/dist/browser/surfaces/AvatarStack.js.map +1 -0
- package/dist/browser/surfaces/avatar-messages.js +8 -2
- package/dist/browser/surfaces/avatar-messages.js.map +1 -1
- package/dist/browser/surfaces/index.js +1 -0
- package/dist/browser/surfaces/index.js.map +1 -1
- package/dist/ssr/actions/ContextMenu.js +21 -3
- package/dist/ssr/actions/ContextMenu.js.map +1 -1
- package/dist/ssr/actions/Dropdown.js +140 -72
- package/dist/ssr/actions/Dropdown.js.map +1 -1
- package/dist/ssr/actions/GestureMenu.js +52 -106
- package/dist/ssr/actions/GestureMenu.js.map +1 -1
- package/dist/ssr/actions/Toolbar.js +294 -14
- package/dist/ssr/actions/Toolbar.js.map +1 -1
- package/dist/ssr/actions/index.js.map +1 -1
- package/dist/ssr/actions/menu-rows.js +15 -0
- package/dist/ssr/actions/menu-rows.js.map +1 -0
- package/dist/ssr/actions/menu-sheet.js +138 -0
- package/dist/ssr/actions/menu-sheet.js.map +1 -0
- package/dist/ssr/actions/toolbar-messages.js +20 -0
- package/dist/ssr/actions/toolbar-messages.js.map +1 -0
- package/dist/ssr/chart-inspection.js +3 -0
- package/dist/ssr/chart-inspection.js.map +1 -0
- package/dist/ssr/chat/ChatComposer.js +604 -113
- package/dist/ssr/chat/ChatComposer.js.map +1 -1
- package/dist/ssr/chat/chat-behavior.js +4 -0
- package/dist/ssr/chat/chat-behavior.js.map +1 -1
- package/dist/ssr/chat/chat-messages.js +33 -1
- package/dist/ssr/chat/chat-messages.js.map +1 -1
- package/dist/ssr/chat/command-search.js +173 -0
- package/dist/ssr/chat/command-search.js.map +1 -0
- package/dist/ssr/chat/composer-document.js +1 -1
- package/dist/ssr/chat/composer-document.js.map +1 -1
- package/dist/ssr/chat/index.js +2 -0
- package/dist/ssr/chat/index.js.map +1 -1
- package/dist/ssr/chat/reaction-people.js +15 -0
- package/dist/ssr/chat/reaction-people.js.map +1 -0
- package/dist/ssr/content/CalendarDayView.js +28 -3
- package/dist/ssr/content/CalendarDayView.js.map +1 -1
- package/dist/ssr/content/Chart.js +6 -15
- package/dist/ssr/content/Chart.js.map +1 -1
- package/dist/ssr/content/ChartSnapshotView.js +7 -10
- package/dist/ssr/content/ChartSnapshotView.js.map +1 -1
- package/dist/ssr/content/MessageRow.js +98 -152
- package/dist/ssr/content/MessageRow.js.map +1 -1
- package/dist/ssr/content/ReactionBar.js +304 -0
- package/dist/ssr/content/ReactionBar.js.map +1 -0
- package/dist/ssr/content/chart-inspection-core.js +557 -0
- package/dist/ssr/content/chart-inspection-core.js.map +1 -0
- package/dist/ssr/content/chart-inspection.js +10 -445
- package/dist/ssr/content/chart-inspection.js.map +1 -1
- package/dist/ssr/content/chart-line-gaps.js +1 -1
- package/dist/ssr/content/chart-line-gaps.js.map +1 -1
- package/dist/ssr/content/chart-snapshot.js +1 -1
- package/dist/ssr/content/chart-snapshot.js.map +1 -1
- package/dist/ssr/content/index.js +1 -0
- package/dist/ssr/content/index.js.map +1 -1
- package/dist/ssr/feedback/dialog-core.js +135 -23
- package/dist/ssr/feedback/dialog-core.js.map +1 -1
- package/dist/ssr/index.js +1 -0
- package/dist/ssr/index.js.map +1 -1
- package/dist/ssr/input-mode.js +40 -0
- package/dist/ssr/input-mode.js.map +1 -0
- package/dist/ssr/inputs/Combobox.js +4 -2
- package/dist/ssr/inputs/Combobox.js.map +1 -1
- package/dist/ssr/inputs/FileDropTarget.js +17 -5
- package/dist/ssr/inputs/FileDropTarget.js.map +1 -1
- package/dist/ssr/inputs/FileInputs.js +2 -2
- package/dist/ssr/inputs/FileInputs.js.map +1 -1
- package/dist/ssr/inputs/SelectChip.js +44 -11
- package/dist/ssr/inputs/SelectChip.js.map +1 -1
- package/dist/ssr/inputs/emoji/EmojiPicker.js +12 -0
- package/dist/ssr/inputs/emoji/EmojiPicker.js.map +1 -1
- package/dist/ssr/inputs/file-drop.js.map +1 -1
- package/dist/ssr/layout/AppWorkspace.js +242 -105
- package/dist/ssr/layout/AppWorkspace.js.map +1 -1
- package/dist/ssr/layout/BottomSheet.js +8 -0
- package/dist/ssr/layout/BottomSheet.js.map +1 -1
- package/dist/ssr/layout/DetailPanel.js +112 -58
- package/dist/ssr/layout/DetailPanel.js.map +1 -1
- package/dist/ssr/layout/Discussion.js +63 -36
- package/dist/ssr/layout/Discussion.js.map +1 -1
- package/dist/ssr/layout/TableOfContents.js +10 -2
- package/dist/ssr/layout/TableOfContents.js.map +1 -1
- package/dist/ssr/layout/app-workspace-controller.js +155 -23
- package/dist/ssr/layout/app-workspace-controller.js.map +1 -1
- package/dist/ssr/layout/app-workspace-state.js +5 -1
- package/dist/ssr/layout/app-workspace-state.js.map +1 -1
- package/dist/ssr/layout/detail-panel-messages.js +35 -0
- package/dist/ssr/layout/detail-panel-messages.js.map +1 -0
- package/dist/ssr/layout/index.js +1 -1
- package/dist/ssr/layout/index.js.map +1 -1
- package/dist/ssr/surfaces/Avatar.js +20 -2
- package/dist/ssr/surfaces/Avatar.js.map +1 -1
- package/dist/ssr/surfaces/AvatarStack.js +286 -0
- package/dist/ssr/surfaces/AvatarStack.js.map +1 -0
- package/dist/ssr/surfaces/avatar-messages.js +8 -2
- package/dist/ssr/surfaces/avatar-messages.js.map +1 -1
- package/dist/ssr/surfaces/index.js +1 -0
- package/dist/ssr/surfaces/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/types/actions/ContextMenu.d.ts +8 -0
- package/dist/types/actions/Dropdown.d.ts +12 -5
- package/dist/types/actions/GestureMenu.d.ts +6 -4
- package/dist/types/actions/Toolbar.d.ts +20 -0
- package/dist/types/actions/index.d.ts +1 -1
- package/dist/types/actions/menu-rows.d.ts +5 -0
- package/dist/types/actions/menu-sheet.d.ts +22 -0
- package/dist/types/actions/toolbar-messages.d.ts +8 -0
- package/dist/types/chart-inspection.d.ts +2 -0
- package/dist/types/chat/ChatComposer.d.ts +51 -2
- package/dist/types/chat/chat-behavior.d.ts +4 -0
- package/dist/types/chat/chat-messages.d.ts +17 -2
- package/dist/types/chat/command-search.d.ts +41 -0
- package/dist/types/chat/index.d.ts +3 -1
- package/dist/types/chat/reaction-people.d.ts +9 -0
- package/dist/types/content/Chart.d.ts +2 -2
- package/dist/types/content/MessageRow.d.ts +3 -10
- package/dist/types/content/ReactionBar.d.ts +32 -0
- package/dist/types/content/chart-inspection-core.d.ts +61 -0
- package/dist/types/content/chart-inspection.d.ts +4 -20
- package/dist/types/content/chart-snapshot.d.ts +1 -1
- package/dist/types/content/index.d.ts +2 -1
- package/dist/types/feedback/dialog-core.d.ts +16 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/input-mode.d.ts +7 -0
- package/dist/types/inputs/FileDropTarget.d.ts +6 -3
- package/dist/types/inputs/SelectChip.d.ts +6 -0
- package/dist/types/inputs/file-drop.d.ts +2 -0
- package/dist/types/layout/AppWorkspace.d.ts +13 -1
- package/dist/types/layout/BottomSheet.d.ts +8 -0
- package/dist/types/layout/DetailPanel.d.ts +11 -0
- package/dist/types/layout/Discussion.d.ts +8 -0
- package/dist/types/layout/TableOfContents.d.ts +2 -0
- package/dist/types/layout/detail-panel-messages.d.ts +15 -0
- package/dist/types/layout/index.d.ts +1 -1
- package/dist/types/surfaces/Avatar.d.ts +12 -0
- package/dist/types/surfaces/AvatarStack.d.ts +41 -0
- package/dist/types/surfaces/avatar-messages.d.ts +3 -0
- package/dist/types/surfaces/index.d.ts +3 -1
- package/package.json +9 -4
|
@@ -21,6 +21,12 @@ export type SelectChipProps<T extends string | number = string> = ValueFieldProp
|
|
|
21
21
|
/** Exact menu width as a CSS length. Without it the menu sizes to its options, at least `10rem`. */
|
|
22
22
|
menuWidth?: string;
|
|
23
23
|
name?: string;
|
|
24
|
+
/** Shows that a change from this chip is saving: the chip stays in place with
|
|
25
|
+
* its size, cannot be opened, is marked busy, and shows a spinner where its
|
|
26
|
+
* chevron (or, icon-only, its icon) is. */
|
|
27
|
+
loading?: boolean;
|
|
28
|
+
open?: boolean;
|
|
29
|
+
onOpenChange?: (open: boolean) => void;
|
|
24
30
|
};
|
|
25
31
|
export declare function SelectChip<T extends string | number = string>(props: SelectChipProps<T>): JSX.Element;
|
|
26
32
|
export default SelectChip;
|
|
@@ -37,6 +37,8 @@ export type FileDropTargetEntry = {
|
|
|
37
37
|
region?: () => Element | undefined;
|
|
38
38
|
/** Set for regions: where the target itself is rendered; a region whose host is hidden takes no drops. */
|
|
39
39
|
host?: () => Element | undefined;
|
|
40
|
+
/** Set for specific targets that show the drop sentence themselves, so the area's overlay does not repeat it. */
|
|
41
|
+
labelled?: boolean;
|
|
40
42
|
};
|
|
41
43
|
export type FileDropHover = {
|
|
42
44
|
entry: FileDropTargetEntry;
|
|
@@ -9,7 +9,7 @@ export type AppWorkspaceProps = {
|
|
|
9
9
|
/** A host with its own phone chrome can use the full canvas below 48rem (768 px). */
|
|
10
10
|
mobileSurface?: "contained" | "flush";
|
|
11
11
|
/** Removes the workspace's own border, radius, and shadow for an overview that is the page itself.
|
|
12
|
-
* A host may frame the outermost workspace as its app card, as Cloud does from
|
|
12
|
+
* A host may frame the outermost workspace as its app card, as Cloud does from 1024 px on signed-in pages. */
|
|
13
13
|
flat?: boolean;
|
|
14
14
|
resizable?: boolean;
|
|
15
15
|
/**
|
|
@@ -41,6 +41,10 @@ export type AppWorkspaceMainProps = {
|
|
|
41
41
|
/** `"content"` centers the children as one reading column with the shared page width on large screens. */
|
|
42
42
|
width?: "full" | "content";
|
|
43
43
|
mobilePane?: string;
|
|
44
|
+
/** Levels in DOM order, shallowest first. The URL selects the deepest level by id. */
|
|
45
|
+
level?: string;
|
|
46
|
+
/** Enhanced navigation for the back step; otherwise it is a document link. */
|
|
47
|
+
onLevelNavigate?: (event: LinkNavigateEvent) => void | Promise<void>;
|
|
44
48
|
scroll?: boolean;
|
|
45
49
|
scrollFade?: boolean;
|
|
46
50
|
scrollPreserveKey?: string | false;
|
|
@@ -49,6 +53,12 @@ export type AppWorkspaceMainProps = {
|
|
|
49
53
|
export type AppWorkspaceMainPaneProps = {
|
|
50
54
|
id: string;
|
|
51
55
|
label: string;
|
|
56
|
+
/** Levels mode: URL selecting this level. Required except on the last level. */
|
|
57
|
+
href?: string;
|
|
58
|
+
/** Quiet one-line text below the level title. */
|
|
59
|
+
description?: JSX.Element;
|
|
60
|
+
/** Controls at the end of the level head. */
|
|
61
|
+
actions?: JSX.Element;
|
|
52
62
|
surface?: "default" | "navigation";
|
|
53
63
|
open?: boolean;
|
|
54
64
|
resizable?: boolean;
|
|
@@ -68,6 +78,8 @@ export type AppWorkspaceDetailProps = {
|
|
|
68
78
|
id: string;
|
|
69
79
|
class?: string;
|
|
70
80
|
width?: AppWorkspaceDetailWidth;
|
|
81
|
+
/** Below 48rem, a full page without sheet gestures for a destination such as chat info; defaults to "sheet". */
|
|
82
|
+
phone?: "sheet" | "page";
|
|
71
83
|
viewTransitionName?: string;
|
|
72
84
|
resizable?: boolean;
|
|
73
85
|
minWidth?: number;
|
|
@@ -9,6 +9,14 @@ export declare const bottomSheetOptions: {
|
|
|
9
9
|
contentClassName: string;
|
|
10
10
|
initialFocus: typeof sheetInitialFocus;
|
|
11
11
|
};
|
|
12
|
+
/** A sheet on phones and a centered dialog from 48rem up, for decisions and forms; menus keep
|
|
13
|
+
* `bottomSheetOptions`. The stylesheet picks the mode with the phone media query, so the first
|
|
14
|
+
* frame is already right and a rotation or resize switches it in place, without a remount. */
|
|
15
|
+
export declare const bottomSheetAdaptiveOptions: {
|
|
16
|
+
contentClassName: string;
|
|
17
|
+
initialFocus: typeof sheetInitialFocus;
|
|
18
|
+
panelClassName: string;
|
|
19
|
+
};
|
|
12
20
|
export type BottomSheetProps = {
|
|
13
21
|
children: JSX.Element;
|
|
14
22
|
/** Pass dialogCore's render context requestDismiss, never the completion callback. */
|
|
@@ -43,6 +43,9 @@ type DetailPanelSectionBaseProps = {
|
|
|
43
43
|
icon?: string;
|
|
44
44
|
tone?: DetailPanelTone;
|
|
45
45
|
description?: JSX.Element;
|
|
46
|
+
/** How many things the section lists, as a chip after the title; `0` reads "None yet". */
|
|
47
|
+
count?: number;
|
|
48
|
+
/** Short state after the title, such as "2 of 4 done". */
|
|
46
49
|
meta?: JSX.Element;
|
|
47
50
|
class?: string;
|
|
48
51
|
};
|
|
@@ -61,6 +64,10 @@ type DetailPanelActionBaseProps = {
|
|
|
61
64
|
leading?: JSX.Element;
|
|
62
65
|
trailing?: JSX.Element;
|
|
63
66
|
secondaryAction?: DetailPanelActionSecondary;
|
|
67
|
+
/** Marks the row of the current place, such as the section in view, in the panel's accent. */
|
|
68
|
+
current?: boolean;
|
|
69
|
+
/** Lets the title wrap to two lines instead of ending with an ellipsis. */
|
|
70
|
+
wrap?: boolean;
|
|
64
71
|
class?: string;
|
|
65
72
|
};
|
|
66
73
|
type DetailPanelActionMenuProps = {
|
|
@@ -102,5 +109,9 @@ type DetailPanelComponent = ((props: DetailPanelProps) => JSX.Element) & {
|
|
|
102
109
|
Section: (props: DetailPanelSectionProps) => JSX.Element;
|
|
103
110
|
Action: (props: DetailPanelActionProps) => JSX.Element;
|
|
104
111
|
};
|
|
112
|
+
/** A count chip, or "None yet" for zero; shared by sections and discussions. */
|
|
113
|
+
export declare const DetailPanelCount: (props: {
|
|
114
|
+
count: number;
|
|
115
|
+
}) => JSX.Element;
|
|
105
116
|
declare const DetailPanel: DetailPanelComponent;
|
|
106
117
|
export default DetailPanel;
|
|
@@ -30,6 +30,14 @@ export type DiscussionListProps = {
|
|
|
30
30
|
loadingMore?: boolean;
|
|
31
31
|
loadMoreLabel?: string;
|
|
32
32
|
onLoadMore?: () => boolean | void | Promise<boolean | void>;
|
|
33
|
+
/**
|
|
34
|
+
* Shows only the newest `fold` entries and a "Show n older" toggle above them. Expanded, the toggle reads "Show less"
|
|
35
|
+
* and earlier pages load as usual. Omit it to show every loaded entry.
|
|
36
|
+
*/
|
|
37
|
+
fold?: number;
|
|
38
|
+
/** Controls the fold, for example to reveal an older entry; `onExpandedChange` requests a change. */
|
|
39
|
+
expanded?: boolean;
|
|
40
|
+
onExpandedChange?: (expanded: boolean) => void;
|
|
33
41
|
class?: string;
|
|
34
42
|
};
|
|
35
43
|
export type DiscussionItemProps = Omit<JSX.LiHTMLAttributes<HTMLLIElement>, "children" | "class"> & {
|
|
@@ -10,6 +10,8 @@ export type TableOfContentsProps = {
|
|
|
10
10
|
title?: string;
|
|
11
11
|
/** Element whose scrolling decides the active section. Defaults to the window. */
|
|
12
12
|
scrollRoot?: MaybeAccessor<HTMLElement | undefined>;
|
|
13
|
+
/** Element that contains the section headings. Defaults to the document. */
|
|
14
|
+
contentRoot?: MaybeAccessor<HTMLElement | undefined>;
|
|
13
15
|
/** Stay in view inside the caller's layout. */
|
|
14
16
|
sticky?: boolean;
|
|
15
17
|
/** Called when another section becomes active. */
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** Counts and list folding shared by detail panel sections and discussions. */
|
|
2
|
+
declare const detailPanelMessages: import("@k2b/stdlib").Catalog<{
|
|
3
|
+
noneYet: string;
|
|
4
|
+
showOlder: ({ count }: {
|
|
5
|
+
count: number;
|
|
6
|
+
}) => string;
|
|
7
|
+
showMore: ({ count }: {
|
|
8
|
+
count: number;
|
|
9
|
+
}) => string;
|
|
10
|
+
showLess: string;
|
|
11
|
+
}>;
|
|
12
|
+
export type DetailPanelMessages = ReturnType<(typeof detailPanelMessages)["resolve"]>["t"];
|
|
13
|
+
export declare const useDetailPanelMessages: () => (() => DetailPanelMessages);
|
|
14
|
+
export declare const checkDetailPanelMessages: () => import("@k2b/stdlib").CatalogIssue[];
|
|
15
|
+
export {};
|
|
@@ -6,7 +6,7 @@ export type { AppWorkspaceControllerOptions } from "./app-workspace-controller";
|
|
|
6
6
|
export { installAppWorkspaceController } from "./app-workspace-controller";
|
|
7
7
|
export type { AppWorkspaceLayoutState, AppWorkspaceResizeKind, } from "./app-workspace-state";
|
|
8
8
|
export { APP_WORKSPACE_DETAIL_DEFAULT, APP_WORKSPACE_DETAIL_MAX, APP_WORKSPACE_DETAIL_MIN, APP_WORKSPACE_DRAWER_DEFAULT, APP_WORKSPACE_DRAWER_MAX, APP_WORKSPACE_DRAWER_MIN, APP_WORKSPACE_MAIN_MIN, APP_WORKSPACE_MAIN_MIN_HEIGHT, APP_WORKSPACE_PANE_DEFAULT, APP_WORKSPACE_PANE_MAX, APP_WORKSPACE_PANE_MIN, APP_WORKSPACE_SIDEBAR_COLLAPSE_THRESHOLD, APP_WORKSPACE_SIDEBAR_COLLAPSED, APP_WORKSPACE_SIDEBAR_DEFAULT, APP_WORKSPACE_SIDEBAR_MAX, APP_WORKSPACE_SIDEBAR_MIN, appWorkspaceLayoutStyle, appWorkspacePanelVariable, appWorkspaceResizeLimits, normalizeAppWorkspaceLayoutState, parseAppWorkspaceLayoutState, resolveAppWorkspaceSidebarWidth, safeAppWorkspacePanelId, serializeAppWorkspaceLayoutState, shouldCollapseAppWorkspaceSidebar, } from "./app-workspace-state";
|
|
9
|
-
export { type BottomSheetProps, bottomSheetOptions, default as BottomSheet } from "./BottomSheet";
|
|
9
|
+
export { type BottomSheetProps, bottomSheetAdaptiveOptions, bottomSheetOptions, default as BottomSheet } from "./BottomSheet";
|
|
10
10
|
export type { DataPanelProps } from "./DataPanel";
|
|
11
11
|
export { DataPanel } from "./DataPanel";
|
|
12
12
|
export type { DetailPanelActionButtonProps, DetailPanelActionLinkProps, DetailPanelActionProps, DetailPanelActionSecondary, DetailPanelBodyProps, DetailPanelGroupProps, DetailPanelHeaderProps, DetailPanelProps, DetailPanelSectionProps, DetailPanelSummaryProps, DetailPanelTone, } from "./DetailPanel";
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import { type JSX } from "solid-js";
|
|
2
2
|
export type AvatarSize = "xs" | "sm" | "md" | "lg" | "xl";
|
|
3
|
+
/**
|
|
4
|
+
* A status ring around the avatar: `"success"` for an active state such as someone working on a task, or an explicit
|
|
5
|
+
* color, for example a collaborator's cursor color.
|
|
6
|
+
*/
|
|
7
|
+
export type AvatarRing = "success" | {
|
|
8
|
+
color: string;
|
|
9
|
+
};
|
|
10
|
+
/** `square` marks an agent or service account; people stay round. */
|
|
11
|
+
export type AvatarShape = "circle" | "square";
|
|
3
12
|
export type AvatarProps = {
|
|
4
13
|
name: string;
|
|
5
14
|
src?: string | null;
|
|
@@ -7,6 +16,9 @@ export type AvatarProps = {
|
|
|
7
16
|
alt?: string;
|
|
8
17
|
fallback?: string;
|
|
9
18
|
size?: AvatarSize;
|
|
19
|
+
/** Draws a ring with a small transparent gap inside the avatar's own box, so the avatar keeps its size and no container clips the ring. */
|
|
20
|
+
ring?: AvatarRing;
|
|
21
|
+
shape?: AvatarShape;
|
|
10
22
|
loading?: "eager" | "lazy";
|
|
11
23
|
class?: string;
|
|
12
24
|
style?: JSX.CSSProperties | string;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { type JSX } from "solid-js";
|
|
2
|
+
import { type AvatarShape } from "./Avatar";
|
|
3
|
+
export type AvatarStackPerson = {
|
|
4
|
+
/** Stable key, such as the account id. */
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
src?: string | null;
|
|
8
|
+
/** Shown instead of initials when there is no picture. */
|
|
9
|
+
icon?: string;
|
|
10
|
+
/** `square` for agents and service accounts. */
|
|
11
|
+
shape?: AvatarShape;
|
|
12
|
+
/** A short tag after the name, such as "Agent". */
|
|
13
|
+
badge?: JSX.Element;
|
|
14
|
+
/** One line below the name; it ends with an ellipsis instead of wrapping. */
|
|
15
|
+
detail?: JSX.Element;
|
|
16
|
+
/** Icon class before `detail`. */
|
|
17
|
+
detailIcon?: string;
|
|
18
|
+
/** Short text at the end of the row, such as "2 tabs". */
|
|
19
|
+
trailing?: JSX.Element;
|
|
20
|
+
/** The person viewing: listed last, below a gap, and never in the stack. */
|
|
21
|
+
self?: boolean;
|
|
22
|
+
/** Makes the row a button. The list closes first. */
|
|
23
|
+
onSelect?: () => void;
|
|
24
|
+
};
|
|
25
|
+
export type AvatarStackProps = {
|
|
26
|
+
people: readonly AvatarStackPerson[];
|
|
27
|
+
/** Title of the list that the stack opens, such as "Here now". */
|
|
28
|
+
title: string;
|
|
29
|
+
/** Accessible name of the stack button, such as "Here now: Jana Berger and 2 more". */
|
|
30
|
+
label: string;
|
|
31
|
+
/** One quiet line below the list. */
|
|
32
|
+
hint?: JSX.Element;
|
|
33
|
+
/** Faces before "+n". Defaults to 3. */
|
|
34
|
+
max?: number;
|
|
35
|
+
class?: string;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* A few overlapping faces, then "+n", as one button. It opens the full list of people beside it, or as a bottom sheet
|
|
39
|
+
* on phones. People with `self` are listed last and never shown in the stack.
|
|
40
|
+
*/
|
|
41
|
+
export declare function AvatarStack(props: AvatarStackProps): JSX.Element;
|
|
@@ -3,6 +3,9 @@ declare const avatarMessages: import("@k2b/stdlib").Catalog<{
|
|
|
3
3
|
name: string;
|
|
4
4
|
}) => string;
|
|
5
5
|
unknownUser: string;
|
|
6
|
+
moreCount: ({ count }: {
|
|
7
|
+
count: number;
|
|
8
|
+
}) => string;
|
|
6
9
|
}>;
|
|
7
10
|
export type AvatarMessages = ReturnType<(typeof avatarMessages)["resolve"]>["t"];
|
|
8
11
|
/** Resolved from the inherited render locale. */
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
export type { AvatarProps, AvatarSize } from "./Avatar";
|
|
1
|
+
export type { AvatarProps, AvatarRing, AvatarShape, AvatarSize } from "./Avatar";
|
|
2
2
|
export { Avatar } from "./Avatar";
|
|
3
|
+
export type { AvatarStackPerson, AvatarStackProps } from "./AvatarStack";
|
|
4
|
+
export { AvatarStack } from "./AvatarStack";
|
|
3
5
|
export type { DescriptionListItem, DescriptionListProps } from "./DescriptionList";
|
|
4
6
|
export { DescriptionList } from "./DescriptionList";
|
|
5
7
|
export type { LinkCardColor, LinkCardProps } from "./LinkCard";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@k2b/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.28.0",
|
|
4
4
|
"description": "Production-ready components for SolidJS applications.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,6 +26,11 @@
|
|
|
26
26
|
"./styles.css": "./dist/styles.css",
|
|
27
27
|
"./fonts/plex.css": "./dist/plex.css",
|
|
28
28
|
"./icons/tabler.css": "./dist/tabler.css",
|
|
29
|
+
"./chart-inspection": {
|
|
30
|
+
"types": "./dist/types/chart-inspection.d.ts",
|
|
31
|
+
"browser": "./dist/browser/chart-inspection.js",
|
|
32
|
+
"default": "./dist/browser/chart-inspection.js"
|
|
33
|
+
},
|
|
29
34
|
"./package.json": "./package.json"
|
|
30
35
|
},
|
|
31
36
|
"files": [
|
|
@@ -37,7 +42,7 @@
|
|
|
37
42
|
"check:declarations": "bun run scripts/check-declarations.ts",
|
|
38
43
|
"fixture:build": "bun run build && NODE_ENV=production bun run fixture/scripts/build.ts",
|
|
39
44
|
"fixture:typecheck": "tsc -p fixture/tsconfig.json --noEmit --pretty false",
|
|
40
|
-
"test": "bun run build && bun test --path-ignore-patterns '**/*.behavior.test.*' src scripts && bun run scripts/check-packed-consumer.ts",
|
|
45
|
+
"test": "bun run build && bun test --path-ignore-patterns '**/*.behavior.test.*' src scripts test/browser.browser.test.ts && bun run scripts/check-packed-consumer.ts",
|
|
41
46
|
"typecheck": "tsc --checkers 2 -p tsconfig.json --noEmit --pretty false && bun run check:declarations && bun run typecheck:dom",
|
|
42
47
|
"typecheck:dom": "tsc -p test/tsconfig.json --noEmit --pretty false",
|
|
43
48
|
"prepack": "bun run build"
|
|
@@ -51,13 +56,13 @@
|
|
|
51
56
|
"qr-scanner": "1.4.2"
|
|
52
57
|
},
|
|
53
58
|
"peerDependencies": {
|
|
54
|
-
"@k2b/ssr": "^0.12.0 || ^0.13.0 || ^0.14.0 || ^0.15.0 || ^0.16.0",
|
|
59
|
+
"@k2b/ssr": "^0.12.0 || ^0.13.0 || ^0.14.0 || ^0.15.0 || ^0.16.0 || ^0.17.0",
|
|
55
60
|
"solid-js": "^1.9.10"
|
|
56
61
|
},
|
|
57
62
|
"devDependencies": {
|
|
58
63
|
"@babel/core": "8.0.6",
|
|
59
64
|
"@babel/preset-typescript": "8.0.1",
|
|
60
|
-
"@k2b/ssr": "0.
|
|
65
|
+
"@k2b/ssr": "0.17.0",
|
|
61
66
|
"@types/babel__core": "7.20.5",
|
|
62
67
|
"@types/bun": "1.4.2",
|
|
63
68
|
"axe-core": "4.11.0",
|