@k2b/ui 0.46.0 → 0.47.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/browser/chat/ChatDecision.js +10 -6
- package/dist/browser/chat/ChatDecision.js.map +1 -1
- package/dist/browser/content/VirtualFeed.js +26 -21
- package/dist/browser/content/VirtualFeed.js.map +1 -1
- package/dist/browser/inputs/Combobox.js +14 -6
- package/dist/browser/inputs/Combobox.js.map +1 -1
- package/dist/browser/layout/AnchoredPopover.js +2 -1
- package/dist/browser/layout/AnchoredPopover.js.map +1 -1
- package/dist/browser/layout/AppWorkspace.js +340 -440
- package/dist/browser/layout/AppWorkspace.js.map +1 -1
- package/dist/browser/layout/AppWorkspaceSidebarItemStatus.js +113 -0
- package/dist/browser/layout/AppWorkspaceSidebarItemStatus.js.map +1 -0
- package/dist/browser/layout/DetailPanel.js +1 -1
- package/dist/browser/layout/DetailPanel.js.map +1 -1
- package/dist/browser/layout/DetailSections.js +236 -132
- package/dist/browser/layout/DetailSections.js.map +1 -1
- package/dist/browser/layout/MobileShell.js +30 -13
- package/dist/browser/layout/MobileShell.js.map +1 -1
- package/dist/browser/layout/detail-sections-messages.js +4 -0
- package/dist/browser/layout/detail-sections-messages.js.map +1 -1
- package/dist/browser/layout/index.js +1 -0
- package/dist/browser/layout/index.js.map +1 -1
- package/dist/ssr/chat/ChatDecision.js +10 -6
- package/dist/ssr/chat/ChatDecision.js.map +1 -1
- package/dist/ssr/content/VirtualFeed.js +26 -21
- package/dist/ssr/content/VirtualFeed.js.map +1 -1
- package/dist/ssr/inputs/Combobox.js +6 -3
- package/dist/ssr/inputs/Combobox.js.map +1 -1
- package/dist/ssr/layout/AnchoredPopover.js +2 -1
- package/dist/ssr/layout/AnchoredPopover.js.map +1 -1
- package/dist/ssr/layout/AppWorkspace.js +61 -127
- package/dist/ssr/layout/AppWorkspace.js.map +1 -1
- package/dist/ssr/layout/AppWorkspaceSidebarItemStatus.js +76 -0
- package/dist/ssr/layout/AppWorkspaceSidebarItemStatus.js.map +1 -0
- package/dist/ssr/layout/DetailPanel.js +1 -1
- package/dist/ssr/layout/DetailPanel.js.map +1 -1
- package/dist/ssr/layout/DetailSections.js +126 -50
- package/dist/ssr/layout/DetailSections.js.map +1 -1
- package/dist/ssr/layout/MobileShell.js +16 -2
- package/dist/ssr/layout/MobileShell.js.map +1 -1
- package/dist/ssr/layout/detail-sections-messages.js +4 -0
- package/dist/ssr/layout/detail-sections-messages.js.map +1 -1
- package/dist/ssr/layout/index.js +1 -0
- package/dist/ssr/layout/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/types/chat/ChatDecision.d.ts +5 -0
- package/dist/types/inputs/Combobox.d.ts +2 -0
- package/dist/types/layout/AppWorkspace.d.ts +2 -28
- package/dist/types/layout/AppWorkspaceSidebarItemStatus.d.ts +30 -0
- package/dist/types/layout/DetailSections.d.ts +32 -2
- package/dist/types/layout/MobileShell.d.ts +12 -0
- package/dist/types/layout/detail-sections-messages.d.ts +2 -0
- package/dist/types/layout/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -19,6 +19,11 @@ export type ChatDecisionProps = {
|
|
|
19
19
|
remember?: ChatDecisionAnswer;
|
|
20
20
|
/** Turns `confirm` and `remember` off; this reason replaces `reason` in the same place. */
|
|
21
21
|
unavailable?: ChatDecisionReason;
|
|
22
|
+
/**
|
|
23
|
+
* Turns every answer off until the reason clears, such as no connection, so no answer is lost on the way; this
|
|
24
|
+
* reason replaces `reason` and `unavailable` in the same place.
|
|
25
|
+
*/
|
|
26
|
+
waiting?: ChatDecisionReason;
|
|
22
27
|
/** The result line shown in every state but `open`, usually `Chat.Outcome`. */
|
|
23
28
|
outcome?: JSX.Element;
|
|
24
29
|
/** Receives a rejected promise from an answer's `onSelect`. */
|
|
@@ -5,6 +5,8 @@ export type ComboboxOption = {
|
|
|
5
5
|
label: string;
|
|
6
6
|
description?: string;
|
|
7
7
|
icon?: string;
|
|
8
|
+
/** Shown but cannot be picked, such as someone who is already on the list; say why in `description`. */
|
|
9
|
+
disabled?: boolean;
|
|
8
10
|
};
|
|
9
11
|
export type ComboboxProps = FieldProps & {
|
|
10
12
|
readOnly?: boolean;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { type AppWorkspaceSidebarItemStatusProps } from "./AppWorkspaceSidebarItemStatus";
|
|
2
|
+
export type { AppWorkspaceSidebarItemStatusProps } from "./AppWorkspaceSidebarItemStatus";
|
|
1
3
|
import { type LinkNavigateEvent, type NavigationScrollMode } from "@k2b/ssr/nav";
|
|
2
4
|
import { type JSX } from "solid-js";
|
|
3
5
|
import { type AppWorkspaceLayoutState } from "./app-workspace-state";
|
|
@@ -361,34 +363,6 @@ export type AppWorkspaceSidebarItemActionsProps = {
|
|
|
361
363
|
children: JSX.Element;
|
|
362
364
|
visibility?: AppWorkspaceSidebarAccessoryVisibility;
|
|
363
365
|
};
|
|
364
|
-
/**
|
|
365
|
-
* Unread state for the trailing `meta` slot. Every mark keeps a fixed width,
|
|
366
|
-
* so the row keeps its height and the label its start in every state.
|
|
367
|
-
*/
|
|
368
|
-
export type AppWorkspaceSidebarItemStatusProps = {
|
|
369
|
-
/**
|
|
370
|
-
* A positive number shows a count (above 99 as "99+") and sets the label in
|
|
371
|
-
* a stronger weight; `true` shows a quiet dot for new activity that should
|
|
372
|
-
* not draw attention, such as in a muted conversation.
|
|
373
|
-
*/
|
|
374
|
-
unread?: number | boolean;
|
|
375
|
-
/** Marks unread items that mention the person with "@". */
|
|
376
|
-
mention?: boolean;
|
|
377
|
-
/**
|
|
378
|
-
* Shows a muted bell, and the item reads as set aside: its label in the muted ink without unread weight, and a
|
|
379
|
-
* mention count without its fill.
|
|
380
|
-
*/
|
|
381
|
-
muted?: boolean;
|
|
382
|
-
/**
|
|
383
|
-
* Items that wait for the person, such as requests to approve, in the unread slot instead of `unread`. `label` is
|
|
384
|
-
* the phrase a screen reader hears, for example "3 waiting". `0` stays as a muted count, for a count that dropped
|
|
385
|
-
* to zero while the row is still shown; leave the prop out when nothing waits.
|
|
386
|
-
*/
|
|
387
|
-
waiting?: {
|
|
388
|
-
count: number;
|
|
389
|
-
label: string;
|
|
390
|
-
};
|
|
391
|
-
};
|
|
392
366
|
export type AppWorkspaceNavTreeProps = {
|
|
393
367
|
children: JSX.Element;
|
|
394
368
|
ariaLabel: string;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type JSX } from "solid-js";
|
|
2
|
+
/**
|
|
3
|
+
* Unread state for the trailing `meta` slot. Every mark keeps a fixed width,
|
|
4
|
+
* so the row keeps its height and the label its start in every state.
|
|
5
|
+
*/
|
|
6
|
+
export type AppWorkspaceSidebarItemStatusProps = {
|
|
7
|
+
/**
|
|
8
|
+
* A positive number shows a count (above 99 as "99+") and sets the label in
|
|
9
|
+
* a stronger weight; `true` shows a quiet dot for new activity that should
|
|
10
|
+
* not draw attention, such as in a muted conversation.
|
|
11
|
+
*/
|
|
12
|
+
unread?: number | boolean;
|
|
13
|
+
/** Marks unread items that mention the person with "@". */
|
|
14
|
+
mention?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Shows a muted bell, and the item reads as set aside: its label in the muted ink without unread weight, and a
|
|
17
|
+
* mention count without its fill.
|
|
18
|
+
*/
|
|
19
|
+
muted?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Items that wait for the person, such as requests to approve, in the unread slot instead of `unread`. `label` is
|
|
22
|
+
* the phrase a screen reader hears, for example "3 waiting". `0` stays as a muted count, for a count that dropped
|
|
23
|
+
* to zero while the row is still shown; leave the prop out when nothing waits.
|
|
24
|
+
*/
|
|
25
|
+
waiting?: {
|
|
26
|
+
count: number;
|
|
27
|
+
label: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
export declare const AppWorkspaceSidebarItemStatus: (props: AppWorkspaceSidebarItemStatusProps) => JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type JSX } from "solid-js";
|
|
2
|
+
import type { DropdownItem } from "../actions/Dropdown";
|
|
2
3
|
import { type AvatarShape } from "../surfaces/Avatar";
|
|
3
4
|
export type DetailPresencePerson = {
|
|
4
5
|
/** Stable key, such as the account id. */
|
|
@@ -99,9 +100,25 @@ export type DetailLinkItem = {
|
|
|
99
100
|
onClick?: (event: MouseEvent) => void;
|
|
100
101
|
/** Defaults to a document. */
|
|
101
102
|
icon?: string;
|
|
103
|
+
/** Replaces the icon, such as a site's favicon. */
|
|
104
|
+
leading?: JSX.Element;
|
|
105
|
+
/** One quiet line below the title, such as where the item lives. */
|
|
106
|
+
description?: JSX.Element;
|
|
102
107
|
/** Quiet text at the end, such as the other notebook's name. */
|
|
103
108
|
trailing?: JSX.Element;
|
|
104
|
-
|
|
109
|
+
/** For a link to another site, such as `_blank` with `rel="noreferrer"`. */
|
|
110
|
+
target?: string;
|
|
111
|
+
rel?: string;
|
|
112
|
+
/** An item that cannot be opened right now, such as one the person may no longer read. */
|
|
113
|
+
disabled?: boolean;
|
|
114
|
+
} & ({
|
|
115
|
+
menuItems?: never;
|
|
116
|
+
menuLabel?: never;
|
|
117
|
+
} | {
|
|
118
|
+
/** Further commands on the item, such as "Unlink", only for people who may run them. */
|
|
119
|
+
menuItems: readonly DropdownItem[];
|
|
120
|
+
menuLabel: string;
|
|
121
|
+
});
|
|
105
122
|
export type DetailLinksProps = {
|
|
106
123
|
/** What links here. */
|
|
107
124
|
incoming: readonly DetailLinkItem[];
|
|
@@ -112,9 +129,20 @@ export type DetailLinksProps = {
|
|
|
112
129
|
/** Defaults to "Links". */
|
|
113
130
|
title?: string;
|
|
114
131
|
defaultOpen?: boolean;
|
|
132
|
+
/**
|
|
133
|
+
* `loading` while links still load after the first paint: a placeholder row keeps their place. `error` keeps the
|
|
134
|
+
* loaded rows and says that the rest failed, with `onRetry`.
|
|
135
|
+
*/
|
|
136
|
+
state?: "ready" | "loading" | "error";
|
|
137
|
+
onRetry?: () => void;
|
|
138
|
+
/** Rows after the links, such as "Add link" or "Load more", only for people who may use them. */
|
|
139
|
+
footer?: JSX.Element;
|
|
115
140
|
class?: string;
|
|
116
141
|
};
|
|
117
|
-
/**
|
|
142
|
+
/**
|
|
143
|
+
* "Linked from" and "Links to" in one section. Without links it is one row: the title and "None yet", followed by the
|
|
144
|
+
* `footer` when there is one.
|
|
145
|
+
*/
|
|
118
146
|
export declare function DetailLinks(props: DetailLinksProps): JSX.Element;
|
|
119
147
|
export type DetailProperty = {
|
|
120
148
|
id: string;
|
|
@@ -134,6 +162,8 @@ export type DetailPropertiesProps = {
|
|
|
134
162
|
summary?: JSX.Element;
|
|
135
163
|
/** Open by default only when the properties are the object's main content. */
|
|
136
164
|
defaultOpen?: boolean;
|
|
165
|
+
/** Rows after the facts, such as a command that copies the object's ID. */
|
|
166
|
+
children?: JSX.Element;
|
|
137
167
|
class?: string;
|
|
138
168
|
};
|
|
139
169
|
/** Facts about the object as label and value rows, such as created, edited, size, and the way to its history. */
|
|
@@ -18,6 +18,12 @@ export type MobileShellProps = {
|
|
|
18
18
|
* tab's page loads.
|
|
19
19
|
*/
|
|
20
20
|
scroll?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* The content is a screen of its own, such as an open chat on a phone: the footer steps aside, so the content
|
|
23
|
+
* reaches the bottom edge and pads its safe area itself. Content that opens or leaves such a screen in place calls
|
|
24
|
+
* `MobileShell.setScreen`.
|
|
25
|
+
*/
|
|
26
|
+
screen?: boolean;
|
|
21
27
|
class?: string;
|
|
22
28
|
};
|
|
23
29
|
export type MobileShellHeaderProps = {
|
|
@@ -37,6 +43,11 @@ export type MobileShellHeaderProps = {
|
|
|
37
43
|
/** Controls after the title, such as a menu. */
|
|
38
44
|
actions?: JSX.Element;
|
|
39
45
|
};
|
|
46
|
+
/**
|
|
47
|
+
* Marks the shell around `from` as showing a screen of its own, or not, after the first paint; the server renders
|
|
48
|
+
* the first state with the `screen` prop. Does nothing outside a shell.
|
|
49
|
+
*/
|
|
50
|
+
declare const setMobileShellScreen: (from: Element, screen: boolean) => void;
|
|
40
51
|
/**
|
|
41
52
|
* Keeps a mounted shell working: the footer height on the body, which the portalled toast rail reads, the room a
|
|
42
53
|
* persistent toast takes from the scroll area, the scroll area's edge fade, and immediate feedback for link taps.
|
|
@@ -86,5 +97,6 @@ declare function MobileShellSidebar(props: MobileShellSidebarProps): JSX.Element
|
|
|
86
97
|
export declare const MobileShell: typeof MobileShellRoot & {
|
|
87
98
|
Header: typeof MobileShellHeader;
|
|
88
99
|
Sidebar: typeof MobileShellSidebar;
|
|
100
|
+
setScreen: typeof setMobileShellScreen;
|
|
89
101
|
};
|
|
90
102
|
export default MobileShell;
|
|
@@ -3,6 +3,7 @@ export type { AppOverviewCardsProps, AppOverviewEmptyStateProps, AppOverviewPane
|
|
|
3
3
|
export { default as AppOverview } from "./AppOverview";
|
|
4
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";
|
|
5
5
|
export { appWorkspaceDetailElementId, default as AppWorkspace } from "./AppWorkspace";
|
|
6
|
+
export { AppWorkspaceSidebarItemStatus } from "./AppWorkspaceSidebarItemStatus";
|
|
6
7
|
export { watchAppHostWidth } from "./app-host-width";
|
|
7
8
|
export type { AppWorkspaceControllerOptions } from "./app-workspace-controller";
|
|
8
9
|
export { installAppWorkspaceController, parkWorkspaceDetailDrawers } from "./app-workspace-controller";
|