@k2b/ui 0.64.0 → 0.66.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 +47 -0
- package/dist/base.css +3 -6
- package/dist/browser/actions/ContextMenu.js +1 -3
- package/dist/browser/actions/ContextMenu.js.map +1 -1
- package/dist/browser/actions/Dropdown.js +15 -69
- package/dist/browser/actions/Dropdown.js.map +1 -1
- package/dist/browser/actions/SortableList.js +1 -1
- package/dist/browser/actions/SortableList.js.map +1 -1
- package/dist/browser/actions/ViewTabs.js +5 -9
- package/dist/browser/actions/ViewTabs.js.map +1 -1
- package/dist/browser/actions/drag-and-drop.js +1 -1
- package/dist/browser/actions/drag-and-drop.js.map +1 -1
- package/dist/browser/actions/index.js.map +1 -1
- package/dist/browser/actions/menu-sheet.js +18 -80
- package/dist/browser/actions/menu-sheet.js.map +1 -1
- package/dist/browser/content/DataTable.js +197 -285
- package/dist/browser/content/DataTable.js.map +1 -1
- package/dist/browser/content/MessageRow.js +139 -115
- package/dist/browser/content/MessageRow.js.map +1 -1
- package/dist/browser/content/ProgressPath.js +25 -30
- package/dist/browser/content/ProgressPath.js.map +1 -1
- package/dist/browser/content/index.js +0 -2
- package/dist/browser/content/index.js.map +1 -1
- package/dist/browser/feedback/dialog-core.js +0 -11
- package/dist/browser/feedback/dialog-core.js.map +1 -1
- package/dist/browser/internal/field.js +2 -2
- package/dist/browser/internal/field.js.map +1 -1
- package/dist/browser/intl/messages.js +1 -1
- package/dist/browser/intl/messages.js.map +1 -1
- package/dist/browser/layout/AppWorkspace.js +8 -16
- package/dist/browser/layout/AppWorkspace.js.map +1 -1
- package/dist/browser/layout/Breadcrumbs.js +42 -188
- package/dist/browser/layout/Breadcrumbs.js.map +1 -1
- package/dist/browser/layout/DetailPanel.js +205 -209
- package/dist/browser/layout/DetailPanel.js.map +1 -1
- package/dist/browser/layout/PanelDialog.js +88 -176
- package/dist/browser/layout/PanelDialog.js.map +1 -1
- package/dist/browser/layout/app-workspace-controller.js +5 -12
- package/dist/browser/layout/app-workspace-controller.js.map +1 -1
- package/dist/browser/layout/app-workspace-state.js +2 -2
- package/dist/browser/layout/app-workspace-state.js.map +1 -1
- package/dist/browser/layout/index.js +0 -2
- package/dist/browser/layout/index.js.map +1 -1
- package/dist/browser/layout/workspace-messages.js +2 -12
- package/dist/browser/layout/workspace-messages.js.map +1 -1
- package/dist/browser/surfaces/NoticeCard.js +57 -69
- package/dist/browser/surfaces/NoticeCard.js.map +1 -1
- package/dist/browser/surfaces/Placeholder.js +5 -17
- package/dist/browser/surfaces/Placeholder.js.map +1 -1
- package/dist/browser/surfaces/Section.js +7 -22
- package/dist/browser/surfaces/Section.js.map +1 -1
- package/dist/browser/surfaces/StatusBadge.js +1 -5
- package/dist/browser/surfaces/StatusBadge.js.map +1 -1
- package/dist/browser/surfaces/index.js +0 -4
- package/dist/browser/surfaces/index.js.map +1 -1
- package/dist/browser/v2/button.js +180 -0
- package/dist/browser/v2/button.js.map +1 -0
- package/dist/browser/v2/components.js +763 -0
- package/dist/browser/v2/components.js.map +1 -0
- package/dist/browser/v2/content.js +1107 -0
- package/dist/browser/v2/content.js.map +1 -0
- package/dist/browser/v2/controls.js +568 -0
- package/dist/browser/v2/controls.js.map +1 -0
- package/dist/browser/v2/describe.js +397 -0
- package/dist/browser/v2/describe.js.map +1 -0
- package/dist/browser/v2/index.js +25 -0
- package/dist/browser/v2/index.js.map +1 -0
- package/dist/browser/v2/layout.js +578 -0
- package/dist/browser/v2/layout.js.map +1 -0
- package/dist/browser/v2/link.js +9 -0
- package/dist/browser/v2/link.js.map +1 -0
- package/dist/browser/v2/marks.js +211 -0
- package/dist/browser/v2/marks.js.map +1 -0
- package/dist/browser/v2/states.js +180 -0
- package/dist/browser/v2/states.js.map +1 -0
- package/dist/browser/v2/structure.js +328 -0
- package/dist/browser/v2/structure.js.map +1 -0
- package/dist/browser/v2/testing/index.js +23 -0
- package/dist/browser/v2/testing/index.js.map +1 -0
- package/dist/browser/v2/testing/measure-v2-layout.js +762 -0
- package/dist/browser/v2/testing/measure-v2-layout.js.map +1 -0
- package/dist/browser/v2/testing/settled.js +52 -0
- package/dist/browser/v2/testing/settled.js.map +1 -0
- package/dist/browser/v2/tokens.js +83 -0
- package/dist/browser/v2/tokens.js.map +1 -0
- package/dist/browser/v2/types.js +24 -0
- package/dist/browser/v2/types.js.map +1 -0
- package/dist/ssr/actions/ContextMenu.js +1 -3
- package/dist/ssr/actions/ContextMenu.js.map +1 -1
- package/dist/ssr/actions/Dropdown.js +15 -69
- package/dist/ssr/actions/Dropdown.js.map +1 -1
- package/dist/ssr/actions/SortableList.js +1 -1
- package/dist/ssr/actions/SortableList.js.map +1 -1
- package/dist/ssr/actions/ViewTabs.js +5 -9
- package/dist/ssr/actions/ViewTabs.js.map +1 -1
- package/dist/ssr/actions/drag-and-drop.js +1 -1
- package/dist/ssr/actions/drag-and-drop.js.map +1 -1
- package/dist/ssr/actions/index.js.map +1 -1
- package/dist/ssr/actions/menu-sheet.js +10 -62
- package/dist/ssr/actions/menu-sheet.js.map +1 -1
- package/dist/ssr/content/DataTable.js +54 -64
- package/dist/ssr/content/DataTable.js.map +1 -1
- package/dist/ssr/content/MessageRow.js +30 -10
- package/dist/ssr/content/MessageRow.js.map +1 -1
- package/dist/ssr/content/ProgressPath.js +8 -14
- package/dist/ssr/content/ProgressPath.js.map +1 -1
- package/dist/ssr/content/index.js +0 -2
- package/dist/ssr/content/index.js.map +1 -1
- package/dist/ssr/feedback/dialog-core.js +0 -11
- package/dist/ssr/feedback/dialog-core.js.map +1 -1
- package/dist/ssr/internal/field.js +2 -2
- package/dist/ssr/internal/field.js.map +1 -1
- package/dist/ssr/intl/messages.js +1 -1
- package/dist/ssr/intl/messages.js.map +1 -1
- package/dist/ssr/layout/AppWorkspace.js +8 -16
- package/dist/ssr/layout/AppWorkspace.js.map +1 -1
- package/dist/ssr/layout/Breadcrumbs.js +26 -140
- package/dist/ssr/layout/Breadcrumbs.js.map +1 -1
- package/dist/ssr/layout/DetailPanel.js +68 -70
- package/dist/ssr/layout/DetailPanel.js.map +1 -1
- package/dist/ssr/layout/PanelDialog.js +8 -82
- package/dist/ssr/layout/PanelDialog.js.map +1 -1
- package/dist/ssr/layout/app-workspace-controller.js +5 -12
- package/dist/ssr/layout/app-workspace-controller.js.map +1 -1
- package/dist/ssr/layout/app-workspace-state.js +2 -2
- package/dist/ssr/layout/app-workspace-state.js.map +1 -1
- package/dist/ssr/layout/index.js +0 -2
- package/dist/ssr/layout/index.js.map +1 -1
- package/dist/ssr/layout/workspace-messages.js +2 -12
- package/dist/ssr/layout/workspace-messages.js.map +1 -1
- package/dist/ssr/surfaces/NoticeCard.js +5 -7
- package/dist/ssr/surfaces/NoticeCard.js.map +1 -1
- package/dist/ssr/surfaces/Placeholder.js +4 -15
- package/dist/ssr/surfaces/Placeholder.js.map +1 -1
- package/dist/ssr/surfaces/Section.js +4 -7
- package/dist/ssr/surfaces/Section.js.map +1 -1
- package/dist/ssr/surfaces/StatusBadge.js +1 -5
- package/dist/ssr/surfaces/StatusBadge.js.map +1 -1
- package/dist/ssr/surfaces/index.js +0 -4
- package/dist/ssr/surfaces/index.js.map +1 -1
- package/dist/ssr/v2/button.js +177 -0
- package/dist/ssr/v2/button.js.map +1 -0
- package/dist/ssr/v2/components.js +518 -0
- package/dist/ssr/v2/components.js.map +1 -0
- package/dist/ssr/v2/content.js +727 -0
- package/dist/ssr/v2/content.js.map +1 -0
- package/dist/ssr/v2/controls.js +268 -0
- package/dist/ssr/v2/controls.js.map +1 -0
- package/dist/ssr/v2/describe.js +397 -0
- package/dist/ssr/v2/describe.js.map +1 -0
- package/dist/ssr/v2/index.js +25 -0
- package/dist/ssr/v2/index.js.map +1 -0
- package/dist/ssr/v2/layout.js +377 -0
- package/dist/ssr/v2/layout.js.map +1 -0
- package/dist/ssr/v2/link.js +9 -0
- package/dist/ssr/v2/link.js.map +1 -0
- package/dist/ssr/v2/marks.js +126 -0
- package/dist/ssr/v2/marks.js.map +1 -0
- package/dist/ssr/v2/states.js +128 -0
- package/dist/ssr/v2/states.js.map +1 -0
- package/dist/ssr/v2/structure.js +229 -0
- package/dist/ssr/v2/structure.js.map +1 -0
- package/dist/ssr/v2/testing/index.js +23 -0
- package/dist/ssr/v2/testing/index.js.map +1 -0
- package/dist/ssr/v2/testing/measure-v2-layout.js +762 -0
- package/dist/ssr/v2/testing/measure-v2-layout.js.map +1 -0
- package/dist/ssr/v2/testing/settled.js +52 -0
- package/dist/ssr/v2/testing/settled.js.map +1 -0
- package/dist/ssr/v2/tokens.js +83 -0
- package/dist/ssr/v2/tokens.js.map +1 -0
- package/dist/ssr/v2/types.js +24 -0
- package/dist/ssr/v2/types.js.map +1 -0
- package/dist/styles.css +1 -1
- package/dist/types/actions/Dropdown.d.ts +1 -35
- package/dist/types/actions/ViewTabs.d.ts +2 -3
- package/dist/types/actions/index.d.ts +1 -1
- package/dist/types/actions/menu-sheet.d.ts +1 -3
- package/dist/types/content/DataTable.d.ts +0 -19
- package/dist/types/content/MessageRow.d.ts +11 -0
- package/dist/types/content/ProgressPath.d.ts +6 -12
- package/dist/types/content/index.d.ts +0 -2
- package/dist/types/feedback/dialog-core.d.ts +0 -5
- package/dist/types/layout/AppWorkspace.d.ts +2 -10
- package/dist/types/layout/Breadcrumbs.d.ts +5 -10
- package/dist/types/layout/PanelDialog.d.ts +0 -19
- package/dist/types/layout/app-workspace-state.d.ts +2 -2
- package/dist/types/layout/index.d.ts +1 -5
- package/dist/types/layout/workspace-messages.d.ts +0 -5
- package/dist/types/surfaces/NoticeCard.d.ts +4 -6
- package/dist/types/surfaces/Placeholder.d.ts +0 -7
- package/dist/types/surfaces/Section.d.ts +2 -8
- package/dist/types/surfaces/StatusBadge.d.ts +1 -2
- package/dist/types/surfaces/index.d.ts +1 -9
- package/dist/types/v2/button.d.ts +54 -0
- package/dist/types/v2/components.d.ts +173 -0
- package/dist/types/v2/content.d.ts +233 -0
- package/dist/types/v2/controls.d.ts +118 -0
- package/dist/types/v2/describe.d.ts +18 -0
- package/dist/types/v2/index.d.ts +22 -0
- package/dist/types/v2/layout.d.ts +124 -0
- package/dist/types/v2/link.d.ts +7 -0
- package/dist/types/v2/marks.d.ts +90 -0
- package/dist/types/v2/states.d.ts +45 -0
- package/dist/types/v2/structure.d.ts +47 -0
- package/dist/types/v2/testing/index.d.ts +16 -0
- package/dist/types/v2/testing/measure-v2-layout.d.ts +99 -0
- package/dist/types/v2/testing/settled.d.ts +13 -0
- package/dist/types/v2/tokens.d.ts +77 -0
- package/dist/types/v2/types.d.ts +44 -0
- package/dist/v2.css +3072 -0
- package/package.json +24 -10
- package/skills/k2b-ui/SKILL.md +201 -0
- package/skills/k2b-ui/images/form-1440.png +0 -0
- package/skills/k2b-ui/images/form-390.png +0 -0
- package/skills/k2b-ui/images/list-detail-1440.png +0 -0
- package/skills/k2b-ui/images/list-detail-390.png +0 -0
- package/skills/k2b-ui/images/mail-1440.png +0 -0
- package/skills/k2b-ui/images/mail-390.png +0 -0
- package/skills/k2b-ui/images/record-1440.png +0 -0
- package/skills/k2b-ui/images/record-390.png +0 -0
- package/skills/k2b-ui/images/record-groups-1440.png +0 -0
- package/skills/k2b-ui/images/record-groups-390.png +0 -0
- package/skills/k2b-ui/images/table-1440.png +0 -0
- package/skills/k2b-ui/images/table-390.png +0 -0
- package/skills/k2b-ui/recipes/form.tsx +54 -0
- package/skills/k2b-ui/recipes/list-detail.tsx +105 -0
- package/skills/k2b-ui/recipes/mail.tsx +193 -0
- package/skills/k2b-ui/recipes/record-groups.tsx +115 -0
- package/skills/k2b-ui/recipes/record.tsx +163 -0
- package/skills/k2b-ui/recipes/table.tsx +68 -0
- package/skills/k2b-ui/references/mistakes.md +162 -0
- package/skills/k2b-ui/references/primitives.md +310 -0
- package/skills/k2b-ui/references/recipes.md +101 -0
- package/skills/k2b-ui/references/seeing.md +94 -0
- package/dist/browser/actions/menu-sheet-messages.js +0 -26
- package/dist/browser/actions/menu-sheet-messages.js.map +0 -1
- package/dist/browser/actions/menu-submenu-panel.js +0 -392
- package/dist/browser/actions/menu-submenu-panel.js.map +0 -1
- package/dist/browser/content/FileName.js +0 -68
- package/dist/browser/content/FileName.js.map +0 -1
- package/dist/browser/content/TaskRow.js +0 -129
- package/dist/browser/content/TaskRow.js.map +0 -1
- package/dist/browser/content/progress-path-messages.js +0 -22
- package/dist/browser/content/progress-path-messages.js.map +0 -1
- package/dist/browser/feedback/dialog-foot.js +0 -45
- package/dist/browser/feedback/dialog-foot.js.map +0 -1
- package/dist/browser/internal/renders-something.js +0 -3
- package/dist/browser/internal/renders-something.js.map +0 -1
- package/dist/browser/layout/FloatingPill.js +0 -33
- package/dist/browser/layout/FloatingPill.js.map +0 -1
- package/dist/browser/layout/StatusRow.js +0 -174
- package/dist/browser/layout/StatusRow.js.map +0 -1
- package/dist/browser/layout/panel-dialog-error.js +0 -44
- package/dist/browser/layout/panel-dialog-error.js.map +0 -1
- package/dist/browser/layout/panel-sheet-handle.js +0 -86
- package/dist/browser/layout/panel-sheet-handle.js.map +0 -1
- package/dist/browser/layout-check.js +0 -232
- package/dist/browser/layout-check.js.map +0 -1
- package/dist/browser/surfaces/Area.js +0 -205
- package/dist/browser/surfaces/Area.js.map +0 -1
- package/dist/browser/surfaces/FactGroup.js +0 -148
- package/dist/browser/surfaces/FactGroup.js.map +0 -1
- package/dist/browser/surfaces/FieldGrid.js +0 -34
- package/dist/browser/surfaces/FieldGrid.js.map +0 -1
- package/dist/browser/surfaces/RowGroup.js +0 -82
- package/dist/browser/surfaces/RowGroup.js.map +0 -1
- package/dist/browser/surfaces/flat-block-messages.js +0 -37
- package/dist/browser/surfaces/flat-block-messages.js.map +0 -1
- package/dist/ssr/actions/menu-sheet-messages.js +0 -26
- package/dist/ssr/actions/menu-sheet-messages.js.map +0 -1
- package/dist/ssr/actions/menu-submenu-panel.js +0 -295
- package/dist/ssr/actions/menu-submenu-panel.js.map +0 -1
- package/dist/ssr/content/FileName.js +0 -46
- package/dist/ssr/content/FileName.js.map +0 -1
- package/dist/ssr/content/TaskRow.js +0 -95
- package/dist/ssr/content/TaskRow.js.map +0 -1
- package/dist/ssr/content/progress-path-messages.js +0 -22
- package/dist/ssr/content/progress-path-messages.js.map +0 -1
- package/dist/ssr/feedback/dialog-foot.js +0 -45
- package/dist/ssr/feedback/dialog-foot.js.map +0 -1
- package/dist/ssr/internal/renders-something.js +0 -3
- package/dist/ssr/internal/renders-something.js.map +0 -1
- package/dist/ssr/layout/FloatingPill.js +0 -16
- package/dist/ssr/layout/FloatingPill.js.map +0 -1
- package/dist/ssr/layout/StatusRow.js +0 -93
- package/dist/ssr/layout/StatusRow.js.map +0 -1
- package/dist/ssr/layout/panel-dialog-error.js +0 -28
- package/dist/ssr/layout/panel-dialog-error.js.map +0 -1
- package/dist/ssr/layout/panel-sheet-handle.js +0 -66
- package/dist/ssr/layout/panel-sheet-handle.js.map +0 -1
- package/dist/ssr/layout-check.js +0 -232
- package/dist/ssr/layout-check.js.map +0 -1
- package/dist/ssr/surfaces/Area.js +0 -147
- package/dist/ssr/surfaces/Area.js.map +0 -1
- package/dist/ssr/surfaces/FactGroup.js +0 -106
- package/dist/ssr/surfaces/FactGroup.js.map +0 -1
- package/dist/ssr/surfaces/FieldGrid.js +0 -22
- package/dist/ssr/surfaces/FieldGrid.js.map +0 -1
- package/dist/ssr/surfaces/RowGroup.js +0 -60
- package/dist/ssr/surfaces/RowGroup.js.map +0 -1
- package/dist/ssr/surfaces/flat-block-messages.js +0 -37
- package/dist/ssr/surfaces/flat-block-messages.js.map +0 -1
- package/dist/types/actions/menu-sheet-messages.d.ts +0 -11
- package/dist/types/actions/menu-submenu-panel.d.ts +0 -27
- package/dist/types/content/FileName.d.ts +0 -23
- package/dist/types/content/TaskRow.d.ts +0 -33
- package/dist/types/content/progress-path-messages.d.ts +0 -8
- package/dist/types/feedback/dialog-foot.d.ts +0 -9
- package/dist/types/internal/renders-something.d.ts +0 -2
- package/dist/types/layout/FloatingPill.d.ts +0 -20
- package/dist/types/layout/StatusRow.d.ts +0 -54
- package/dist/types/layout/panel-dialog-error.d.ts +0 -9
- package/dist/types/layout/panel-sheet-handle.d.ts +0 -8
- package/dist/types/layout-check.d.ts +0 -52
- package/dist/types/surfaces/Area.d.ts +0 -38
- package/dist/types/surfaces/FactGroup.d.ts +0 -33
- package/dist/types/surfaces/FieldGrid.d.ts +0 -14
- package/dist/types/surfaces/RowGroup.d.ts +0 -20
- package/dist/types/surfaces/flat-block-messages.d.ts +0 -16
|
@@ -56,20 +56,7 @@ export type DropdownAction = (DropdownActionBase & {
|
|
|
56
56
|
action?: never;
|
|
57
57
|
href?: never;
|
|
58
58
|
external?: never;
|
|
59
|
-
})
|
|
60
|
-
/**
|
|
61
|
-
* A row that opens a further menu beside it, marked with "▸" (K16). The submenu stands level with its row and turns
|
|
62
|
-
* to the other side or upwards where room ends. It opens after the pointer rests on the row for 150 ms, on click, and
|
|
63
|
-
* with Right or Enter; Left and Escape close one level. Moving the pointer towards it closes nothing. On a phone the
|
|
64
|
-
* sheet shows one level at a time, with Back at its top. A menu has at most three levels: a submenu row on the third
|
|
65
|
-
* level is not offered.
|
|
66
|
-
*/
|
|
67
|
-
export type DropdownSubmenu = DropdownActionBase & {
|
|
68
|
-
submenu: readonly DropdownItem[];
|
|
69
|
-
action?: never;
|
|
70
|
-
href?: never;
|
|
71
|
-
external?: never;
|
|
72
|
-
};
|
|
59
|
+
});
|
|
73
60
|
/** A second, smaller action at the end of a row, such as "Only" beside a checkbox; it keeps the menu open. */
|
|
74
61
|
export type DropdownSecondaryAction = {
|
|
75
62
|
label: string;
|
|
@@ -210,15 +197,6 @@ export type DropdownItemProps = {
|
|
|
210
197
|
onSelect?: () => void;
|
|
211
198
|
class?: string;
|
|
212
199
|
};
|
|
213
|
-
export type MenuContextValue = {
|
|
214
|
-
close: (restoreFocus?: boolean) => void;
|
|
215
|
-
/** `option` inside a searchable menu's list box, whose field keeps the focus. */
|
|
216
|
-
role: "menuitem" | "option";
|
|
217
|
-
/** 1 for the menu itself, 2 and 3 for its submenus. */
|
|
218
|
-
depth: number;
|
|
219
|
-
/** In a phone sheet, a submenu row shows its entries in place of the sheet's instead of a menu beside it. */
|
|
220
|
-
drill?: (item: DropdownSubmenu, row: HTMLElement) => void;
|
|
221
|
-
};
|
|
222
200
|
export declare const dropdownPosition: (trigger: Pick<DOMRect, "left" | "top" | "right" | "bottom">, menu: Pick<DOMRect, "width" | "height">, position: DropdownPosition, viewport: {
|
|
223
201
|
width: number;
|
|
224
202
|
height: number;
|
|
@@ -226,23 +204,11 @@ export declare const dropdownPosition: (trigger: Pick<DOMRect, "left" | "top" |
|
|
|
226
204
|
left: number;
|
|
227
205
|
top: number;
|
|
228
206
|
};
|
|
229
|
-
export declare const itemContent: (props: {
|
|
230
|
-
description?: string;
|
|
231
|
-
descriptionVisual?: () => JSX.Element;
|
|
232
|
-
icon?: string;
|
|
233
|
-
image?: string;
|
|
234
|
-
trailing?: JSX.Element;
|
|
235
|
-
children: JSX.Element;
|
|
236
|
-
}) => JSX.Element;
|
|
237
207
|
export declare function DropdownItem(props: DropdownItemProps): JSX.Element;
|
|
238
208
|
export declare function DropdownItems(props: {
|
|
239
209
|
items: readonly DropdownItem[];
|
|
240
210
|
close: (restoreFocus?: boolean) => void;
|
|
241
211
|
role?: "menuitem" | "option";
|
|
242
|
-
/** Internal: the level of a submenu's entries, 1 for the menu itself. */
|
|
243
|
-
depth?: number;
|
|
244
|
-
/** Internal: a phone sheet shows a submenu's entries in its own place. */
|
|
245
|
-
drill?: (item: DropdownSubmenu, row: HTMLElement) => void;
|
|
246
212
|
}): JSX.Element;
|
|
247
213
|
/**
|
|
248
214
|
* Internal: content in place of the entries, as `CommandMenu` renders its command list. It reports where the focus
|
|
@@ -21,9 +21,8 @@ export type ViewTabsProps = {
|
|
|
21
21
|
/** At most this many views before More (default 5). */
|
|
22
22
|
max?: number;
|
|
23
23
|
/**
|
|
24
|
-
* The strip shows only the views that fit its room and counts the rest in More, instead of scrolling them
|
|
25
|
-
*
|
|
26
|
-
* `false` lets the strip scroll sideways instead.
|
|
24
|
+
* The strip shows only the views that fit its room and counts the rest in More, instead of scrolling them. The open
|
|
25
|
+
* view and pinned views stay. Pair it with a larger `max` so a wide head shows more views.
|
|
27
26
|
*/
|
|
28
27
|
fit?: boolean;
|
|
29
28
|
class?: string;
|
|
@@ -11,7 +11,7 @@ export type { DisclosureProps } from "./Disclosure";
|
|
|
11
11
|
export { Disclosure } from "./Disclosure";
|
|
12
12
|
export type { DragPayload, DragSourceProps, DragStatus, DropTargetProps } from "./DragAndDrop";
|
|
13
13
|
export { activeDrag, DragSource, DropTarget, dragStatus, useKeyboardDrag } from "./DragAndDrop";
|
|
14
|
-
export type { DropdownAction, DropdownActionBase, DropdownAnchor, DropdownChoice, DropdownItemProps, DropdownPosition, DropdownProps, DropdownReturnFocus, DropdownSearch, DropdownSection,
|
|
14
|
+
export type { DropdownAction, DropdownActionBase, DropdownAnchor, DropdownChoice, DropdownItemProps, DropdownPosition, DropdownProps, DropdownReturnFocus, DropdownSearch, DropdownSection, DropdownTriggerProps, } from "./Dropdown";
|
|
15
15
|
export { Dropdown, DropdownItem, dropdownPosition } from "./Dropdown";
|
|
16
16
|
export type { DropOverlayLevel, DropOverlayProps, DropOverlayTile } from "./DropOverlay";
|
|
17
17
|
export { DropOverlay } from "./DropOverlay";
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { type JSX } from "solid-js";
|
|
2
|
-
import type { DropdownItem, DropdownSearch
|
|
2
|
+
import type { DropdownItem, DropdownSearch } from "./Dropdown";
|
|
3
3
|
export { PHONE_SHEET_QUERY, prefersMenuSheet } from "./phone-sheet";
|
|
4
4
|
export type MenuSheetOptions = {
|
|
5
5
|
/** Renders the rows: the dropdown's own `DropdownItems`, passed in so this module does not import it back. */
|
|
6
6
|
Items: (props: {
|
|
7
7
|
items: readonly DropdownItem[];
|
|
8
8
|
close: (restoreFocus?: boolean) => void;
|
|
9
|
-
depth?: number;
|
|
10
|
-
drill?: (item: DropdownSubmenu, row: HTMLElement) => void;
|
|
11
9
|
}) => JSX.Element;
|
|
12
10
|
items: readonly DropdownItem[];
|
|
13
11
|
/** Names the sheet and its menu. */
|
|
@@ -46,18 +46,6 @@ export type DataTableColumn<T> = {
|
|
|
46
46
|
* 2 below 420 px. Hidden values stay one tap away in the row's details.
|
|
47
47
|
*/
|
|
48
48
|
priority?: 1 | 2 | 3;
|
|
49
|
-
/**
|
|
50
|
-
* The name column: at least 200 px and at most 560 px wide, so a value stays beside its name on a wide screen.
|
|
51
|
-
* When the table gets narrow, columns of a lower `priority` leave before it shrinks.
|
|
52
|
-
*/
|
|
53
|
-
primary?: boolean;
|
|
54
|
-
/**
|
|
55
|
-
* Where the column's value goes when the table is a list. With any column given a role, a table narrower than
|
|
56
|
-
* 480 px shows each row as one entry of two lines: `title` on the first line, `meta` on the second in quiet text,
|
|
57
|
-
* and `end` at the right of both lines, such as a status or an amount. Give one column each role; columns without
|
|
58
|
-
* a role leave, so keep what matters in those three.
|
|
59
|
-
*/
|
|
60
|
-
list?: "title" | "meta" | "end";
|
|
61
49
|
};
|
|
62
50
|
export type DataTableSort = {
|
|
63
51
|
key: string;
|
|
@@ -144,13 +132,6 @@ export type DataTableProps<T> = {
|
|
|
144
132
|
* group's value and count, in the order the groups first appear.
|
|
145
133
|
*/
|
|
146
134
|
groupBy?: string;
|
|
147
|
-
/**
|
|
148
|
-
* Lets the person fold a group: its head becomes a disclosure button with the group's name, count, and a chevron.
|
|
149
|
-
* A folded group keeps its 36 px head; only its rows leave.
|
|
150
|
-
*/
|
|
151
|
-
collapsibleGroups?: boolean;
|
|
152
|
-
/** The keys of the groups that start folded: a group's key is its stored value as text, `""` for missing values. */
|
|
153
|
-
defaultCollapsedGroups?: readonly string[];
|
|
154
135
|
/**
|
|
155
136
|
* The host's search text. With no rows left, the table says that nothing matches it and offers to clear it
|
|
156
137
|
* through `onClearQuery`, instead of `empty`. Filter the rows with `filterRows`.
|
|
@@ -123,6 +123,17 @@ export type MessageRowProps = {
|
|
|
123
123
|
onRetry?: () => void;
|
|
124
124
|
/** Called by "Discard" next to "Retry" while `status` is `"failed"`, so both answers to a failure sit where it shows. */
|
|
125
125
|
onDiscard?: () => void;
|
|
126
|
+
/**
|
|
127
|
+
* While `status` is `"failed"`: why, shown instead of "Not sent", and one more answer beside "Retry", for example
|
|
128
|
+
* sending the message without a part that could not load.
|
|
129
|
+
*/
|
|
130
|
+
failure?: {
|
|
131
|
+
reason: string;
|
|
132
|
+
action?: {
|
|
133
|
+
label: string;
|
|
134
|
+
onSelect: () => void;
|
|
135
|
+
};
|
|
136
|
+
};
|
|
126
137
|
/**
|
|
127
138
|
* The message's menu. A quiet "…" beside the bubble opens it while the message is hovered or focused, also from the
|
|
128
139
|
* keyboard; right-click and a long press open the same menu. Showing "…" never moves the layout.
|
|
@@ -4,14 +4,9 @@ export type ProgressPathStep = {
|
|
|
4
4
|
label: string;
|
|
5
5
|
/** A quiet second line, such as the day it happened or "not yet". */
|
|
6
6
|
detail?: JSX.Element;
|
|
7
|
-
/** Whether the step happened.
|
|
7
|
+
/** Whether the step happened. Done steps show a check and a colored line to the next step. */
|
|
8
8
|
done?: boolean;
|
|
9
|
-
/**
|
|
10
|
-
* The one step the thing is at now. Its dot is a ring in the app colour, its name is bold, and screen readers hear
|
|
11
|
-
* "current step". It wins over `done` and `icon`.
|
|
12
|
-
*/
|
|
13
|
-
current?: boolean;
|
|
14
|
-
/** Tabler icon class an open step shows in its dot, such as `ti ti-truck`. */
|
|
9
|
+
/** Tabler icon class an open step shows in its circle, such as `ti ti-truck`. */
|
|
15
10
|
icon?: string;
|
|
16
11
|
};
|
|
17
12
|
export type ProgressPathProps = {
|
|
@@ -21,11 +16,10 @@ export type ProgressPathProps = {
|
|
|
21
16
|
class?: string;
|
|
22
17
|
};
|
|
23
18
|
/**
|
|
24
|
-
* The
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* @example <ProgressPath steps={[{ label: "Received", detail: "Nov 7", done: true }, { label: "Packed", detail: "today", current: true }, { label: "Shipped", detail: "not yet", icon: "ti ti-truck" }]} />
|
|
19
|
+
* The stages of one thing in order, each with a word and a quiet line, such as where an item is on its way. Done steps
|
|
20
|
+
* carry a check; the words say the state, so color is never the only signal. Wide containers lay the steps out side
|
|
21
|
+
* by side, narrow ones, such as a phone, one below the other.
|
|
22
|
+
* @example <ProgressPath steps={[{ label: "Received", detail: "Nov 7", done: true }, { label: "Shipped", detail: "not yet", icon: "ti ti-truck" }]} />
|
|
29
23
|
*/
|
|
30
24
|
export declare function ProgressPath(props: ProgressPathProps): JSX.Element;
|
|
31
25
|
export default ProgressPath;
|
|
@@ -33,7 +33,6 @@ export type { DataTableColumnType, DataTableNumberFormat, DataTableStatusState,
|
|
|
33
33
|
export { filterRows, sortRows } from "./data-table-columns";
|
|
34
34
|
export { FileBrowserPanel, type FileBrowserPanelProps, type FileSource, openFileBrowser } from "./FileBrowser";
|
|
35
35
|
export { FileGrid, type FileGridGroup, type FileGridOpenProps, type FileGridProps, type FileGridSelectableProps } from "./FileGrid";
|
|
36
|
-
export { FileName, type FileNameProps, splitFileName } from "./FileName";
|
|
37
36
|
export { default as FileTree, type FileTreeActions, type FileTreeEntry, type FileTreeProps } from "./FileTree";
|
|
38
37
|
export { type FileType, FileTypeIcon, type FileTypeIconProps, fileKindLabel, fileTypeOf } from "./FileTypeIcon";
|
|
39
38
|
export { default as FileView, type FileViewContent, type FileViewProps, type FileViewRenderer, type FileViewRendererProps, } from "./FileView";
|
|
@@ -81,7 +80,6 @@ export type { StepsProps } from "./Steps";
|
|
|
81
80
|
export { Steps } from "./Steps";
|
|
82
81
|
export type { StructuredDataPreviewMode, StructuredDataPreviewProps, StructuredDataValue } from "./StructuredDataPreview";
|
|
83
82
|
export { default as StructuredDataPreview, isStructuredDataValue } from "./StructuredDataPreview";
|
|
84
|
-
export { TaskRow, type TaskRowProps } from "./TaskRow";
|
|
85
83
|
export { ThumbnailStrip, type ThumbnailStripItem, type ThumbnailStripProps } from "./ThumbnailStrip";
|
|
86
84
|
export type { TimelineColor, TimelineController, TimelineItem, TimelineProps } from "./Timeline";
|
|
87
85
|
export { default as Timeline } from "./Timeline";
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import { type JSX } from "solid-js";
|
|
2
2
|
import { type DialogCall } from "./dialog-call";
|
|
3
|
-
/**
|
|
4
|
-
* The custom property that lifts a centered dialog frame so its footer stays put (`dialog-foot.ts`). The core clears
|
|
5
|
-
* it whenever another level shows, so each level starts centered.
|
|
6
|
-
*/
|
|
7
|
-
export declare const DIALOG_LIFT = "--k2b-dialog-lift";
|
|
8
3
|
export type DialogClose<T> = (result?: T) => void;
|
|
9
4
|
export type OpenDialogOptions = {
|
|
10
5
|
/** Override the opener's primary palette for a dialog with its own purpose, such as a global session warning. */
|
|
@@ -36,10 +36,6 @@ export type AppWorkspaceHeadProps = {
|
|
|
36
36
|
href?: string;
|
|
37
37
|
onClick?: (event: MouseEvent) => void;
|
|
38
38
|
popup?: "menu" | "dialog";
|
|
39
|
-
/** With `popup`: whether its menu or dialog is open now, for `aria-expanded`. Defaults to closed. */
|
|
40
|
-
expanded?: boolean;
|
|
41
|
-
/** Unavailable right now; a link variant stays in place and announces it with `aria-disabled`. */
|
|
42
|
-
disabled?: boolean;
|
|
43
39
|
};
|
|
44
40
|
};
|
|
45
41
|
export type AppWorkspaceProps = {
|
|
@@ -88,12 +84,8 @@ export type AppWorkspaceContentProps = {
|
|
|
88
84
|
export type AppWorkspaceMainProps = {
|
|
89
85
|
children: JSX.Element;
|
|
90
86
|
class?: string;
|
|
91
|
-
/**
|
|
92
|
-
|
|
93
|
-
* `"reading"` is a column of running text such as a note (K6, K11): no head and no status row above it, the text
|
|
94
|
-
* gets the whole height at a 720 px measure, centered; views and actions float in a `FloatingPill`.
|
|
95
|
-
*/
|
|
96
|
-
width?: "full" | "content" | "reading";
|
|
87
|
+
/** `"content"` centers the children as one reading column with the shared page width on large screens. */
|
|
88
|
+
width?: "full" | "content";
|
|
97
89
|
/**
|
|
98
90
|
* The width in px or a workspace width share that Main keeps beside the sidebar and an open Detail,
|
|
99
91
|
* from 48rem (768 px); at least the default 320. A Detail that does not fit
|
|
@@ -1,24 +1,19 @@
|
|
|
1
1
|
import { type JSX } from "solid-js";
|
|
2
2
|
export type BreadcrumbItem = {
|
|
3
3
|
label: string;
|
|
4
|
-
/** A link to this level, for a path in a page head. Without it the level calls `onSelect`. */
|
|
5
|
-
href?: string;
|
|
6
4
|
};
|
|
7
5
|
export type BreadcrumbsProps = {
|
|
8
|
-
/** The path from the top: every item but the last
|
|
6
|
+
/** The path from the top: every item but the last is a link, the last is the current place. */
|
|
9
7
|
items: readonly BreadcrumbItem[];
|
|
10
8
|
/** Names the path for assistive technology, for example "Path". */
|
|
11
9
|
label: string;
|
|
12
|
-
/** Called with the index of the
|
|
13
|
-
onSelect
|
|
10
|
+
/** Called with the index of the link that was activated; never for the current place. */
|
|
11
|
+
onSelect: (index: number) => void;
|
|
14
12
|
disabled?: boolean;
|
|
15
13
|
class?: string;
|
|
16
14
|
};
|
|
17
15
|
/**
|
|
18
|
-
* A path
|
|
19
|
-
*
|
|
20
|
-
* front levels give way first and wait behind "…", which opens them as a menu; the current level always stays and
|
|
21
|
-
* shortens with an ellipsis last. The fit runs from the server's script before hydration, so a page that never
|
|
22
|
-
* hydrates the path fits too.
|
|
16
|
+
* A path inside a dialog or panel: the levels above as blue text links, the current level as text. It stays on one
|
|
17
|
+
* line; a long path scrolls sideways with a fade on the side where more follows, and shows its end after each change.
|
|
23
18
|
*/
|
|
24
19
|
export declare function Breadcrumbs(props: BreadcrumbsProps): JSX.Element;
|
|
@@ -31,19 +31,8 @@ export type PanelDialogBodyProps = {
|
|
|
31
31
|
scrollPreserveKey?: string;
|
|
32
32
|
scrollFade?: boolean;
|
|
33
33
|
};
|
|
34
|
-
/** Why the dialog's action failed, with what follows from it, such as "Your entries stay". */
|
|
35
|
-
export type PanelDialogError = string | {
|
|
36
|
-
title: string;
|
|
37
|
-
description?: string;
|
|
38
|
-
};
|
|
39
34
|
export type PanelDialogFooterProps = {
|
|
40
35
|
children: JSX.Element;
|
|
41
|
-
/**
|
|
42
|
-
* Shows why the action failed as a tinted cell directly above the footer, edge to edge, and announces it. The
|
|
43
|
-
* footer keeps its place on the screen: the dialog grows upwards, so the button under the pointer does not move.
|
|
44
|
-
* Keep the entries; clear the error when the person tries again.
|
|
45
|
-
*/
|
|
46
|
-
error?: PanelDialogError;
|
|
47
36
|
};
|
|
48
37
|
export type PanelDialogSectionProps = {
|
|
49
38
|
title: JSX.Element;
|
|
@@ -84,28 +73,20 @@ type PanelDialogComponent = ((props: PanelDialogProps) => JSX.Element) & {
|
|
|
84
73
|
Section: (props: PanelDialogSectionProps) => JSX.Element;
|
|
85
74
|
Tabs: <T extends string>(props: PanelDialogTabsProps<T>) => JSX.Element;
|
|
86
75
|
};
|
|
87
|
-
/**
|
|
88
|
-
* The first field of the shown level, as every dialog focuses; without one, the first control on a desktop and the
|
|
89
|
-
* ring-less dialog itself on a phone sheet, whose grip would otherwise take the focus (as `BottomSheet` does).
|
|
90
|
-
*/
|
|
91
|
-
declare function panelInitialFocus(dialog: HTMLDialogElement): HTMLElement | null;
|
|
92
76
|
export declare const panelDialogPanelClass = "k2b-dialog k2b-panel-dialog-frame is-standard";
|
|
93
77
|
export declare const panelDialogOptions: {
|
|
94
78
|
panelClassName: string;
|
|
95
79
|
contentClassName: string;
|
|
96
|
-
initialFocus: typeof panelInitialFocus;
|
|
97
80
|
};
|
|
98
81
|
export declare const panelDialogWidePanelClass = "k2b-dialog k2b-panel-dialog-frame is-wide";
|
|
99
82
|
export declare const panelDialogWideOptions: {
|
|
100
83
|
panelClassName: string;
|
|
101
84
|
contentClassName: string;
|
|
102
|
-
initialFocus: typeof panelInitialFocus;
|
|
103
85
|
};
|
|
104
86
|
export declare const panelDialogFixedPanelClass = "k2b-dialog k2b-panel-dialog-frame is-fixed";
|
|
105
87
|
export declare const panelDialogFixedOptions: {
|
|
106
88
|
panelClassName: string;
|
|
107
89
|
contentClassName: string;
|
|
108
|
-
initialFocus: typeof panelInitialFocus;
|
|
109
90
|
};
|
|
110
91
|
export declare const panelDialogWorkspacePanelClass = "k2b-dialog k2b-panel-dialog-frame is-workspace";
|
|
111
92
|
export declare const panelDialogWorkspaceOptions: {
|
|
@@ -11,8 +11,8 @@ export declare const APP_WORKSPACE_SIDEBAR_COLLAPSED = 64;
|
|
|
11
11
|
export declare const APP_WORKSPACE_SIDEBAR_COLLAPSE_THRESHOLD = 128;
|
|
12
12
|
export declare const APP_WORKSPACE_SIDEBAR_MIN = 176;
|
|
13
13
|
export declare const APP_WORKSPACE_SIDEBAR_MAX = 360;
|
|
14
|
-
/** The detail
|
|
15
|
-
export declare const APP_WORKSPACE_DETAIL_DEFAULT =
|
|
14
|
+
/** The floating detail panel starts at 26 rem and keeps between 20 and 40 rem. */
|
|
15
|
+
export declare const APP_WORKSPACE_DETAIL_DEFAULT = 416;
|
|
16
16
|
export declare const APP_WORKSPACE_DETAIL_MIN = 320;
|
|
17
17
|
export declare const APP_WORKSPACE_DETAIL_MAX = 640;
|
|
18
18
|
export declare const APP_WORKSPACE_DRAWER_DEFAULT = 240;
|
|
@@ -21,8 +21,6 @@ export { DetailAccess, DetailLinks, DetailPresence, DetailPresenceSlot, DetailPr
|
|
|
21
21
|
export { DETAILS_ICON, DetailsToggle, type DetailsToggleProps } from "./DetailsToggle";
|
|
22
22
|
export type { DiscussionComposerProps, DiscussionItemProps, DiscussionListProps, DiscussionProps, DiscussionThreadProps, } from "./Discussion";
|
|
23
23
|
export { default as Discussion } from "./Discussion";
|
|
24
|
-
export type { FloatingPillProps } from "./FloatingPill";
|
|
25
|
-
export { FloatingPill } from "./FloatingPill";
|
|
26
24
|
export type { FloatingWindowClose, FloatingWindowProps, FloatingWindowState, OpenFloatingWindowOptions, } from "./FloatingWindow";
|
|
27
25
|
export { default as FloatingWindow, type FloatingWindowBounds, type FloatingWindowRect, fitFloatingWindowRect, openFloatingWindow, } from "./FloatingWindow";
|
|
28
26
|
export type { MobileShellHeaderProps, MobileShellProps, MobileShellSidebarItem, MobileShellSidebarProps } from "./MobileShell";
|
|
@@ -31,7 +29,7 @@ export { default as Navigation, type NavigationProps } from "./Navigation";
|
|
|
31
29
|
export { createNavigation, findNavigationItem, type NavigationController, type NavigationItem, type NavigationOptions, type NavigationStatus, } from "./navigation-model";
|
|
32
30
|
export type { PageTitleProps, PageTrailLink, PageTrailState } from "./PageTitle";
|
|
33
31
|
export { followPageTrail, PAGE_TRAIL_EVENT, PageTitle, PageTrailProvider, readPageTrail, setPageTrail, usePageTrail } from "./PageTitle";
|
|
34
|
-
export type { PanelDialogBodyProps,
|
|
32
|
+
export type { PanelDialogBodyProps, PanelDialogFooterProps, PanelDialogHeaderProps, PanelDialogProps, PanelDialogSectionProps, PanelDialogSurface, PanelDialogTabOption, PanelDialogTabsProps, } from "./PanelDialog";
|
|
35
33
|
export { confirmDiscardIfDirty, default as PanelDialog, panelDialogFixedOptions, panelDialogFixedPanelClass, panelDialogOptions, panelDialogPanelClass, panelDialogWideOptions, panelDialogWidePanelClass, panelDialogWorkspaceOptions, panelDialogWorkspacePanelClass, } from "./PanelDialog";
|
|
36
34
|
export type { PanelHeaderProps } from "./PanelHeader";
|
|
37
35
|
export { PanelHeader } from "./PanelHeader";
|
|
@@ -54,8 +52,6 @@ export { default as SettingsCollection } from "./SettingsCollection";
|
|
|
54
52
|
export type { SettingsModalFooterProps, SettingsModalGroupProps, SettingsModalProps, SettingsModalTabProps, SettingsModalTabTone, } from "./SettingsModal";
|
|
55
53
|
export { default as SettingsModal } from "./SettingsModal";
|
|
56
54
|
export { APP_WORKSPACE_SWITCHER_SEARCH_FROM, type AppWorkspaceSidebarSwitcherProps, type AppWorkspaceSwitcherAction, type AppWorkspaceSwitcherOption, } from "./SidebarSwitcher";
|
|
57
|
-
export type { StatusRowFact, StatusRowProps, StatusRowSelection, StatusRowState } from "./StatusRow";
|
|
58
|
-
export { StatusRow } from "./StatusRow";
|
|
59
55
|
export { measureScrollFade } from "./scroll-fade";
|
|
60
56
|
export { attachSheetHandle, type SheetHandleOptions } from "./sheet-handle";
|
|
61
57
|
export type { TabBarItem, TabBarProps } from "./TabBar";
|
|
@@ -23,11 +23,6 @@ declare const workspaceMessages: import("@k2b/stdlib").Catalog<{
|
|
|
23
23
|
sidebarAllLabel: ({ label }: {
|
|
24
24
|
label: string;
|
|
25
25
|
}) => string;
|
|
26
|
-
pathLevelsAbove: string;
|
|
27
|
-
statusNextAttempt: string;
|
|
28
|
-
statusSelected: ({ count }: {
|
|
29
|
-
count: number;
|
|
30
|
-
}) => string;
|
|
31
26
|
}>;
|
|
32
27
|
export type WorkspaceMessages = ReturnType<(typeof workspaceMessages)["resolve"]>["t"];
|
|
33
28
|
/** Resolved from the inherited render locale. */
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { type JSX } from "solid-js";
|
|
2
2
|
import type { IntentTone } from "../semantics";
|
|
3
|
-
|
|
4
|
-
export type NoticeTone = Extract<IntentTone, "neutral" | "info" | "success" | "warning" | "danger"> | "ai" | "yours";
|
|
3
|
+
export type NoticeTone = Extract<IntentTone, "neutral" | "info" | "success" | "warning" | "danger"> | "ai";
|
|
5
4
|
type NoticeCardContentProps = {
|
|
6
5
|
title: JSX.Element;
|
|
7
6
|
detail?: JSX.Element;
|
|
@@ -27,9 +26,9 @@ export type NoticeCardProps = Omit<JSX.HTMLAttributes<HTMLElement>, "children" |
|
|
|
27
26
|
*/
|
|
28
27
|
layout?: "line" | "card";
|
|
29
28
|
/**
|
|
30
|
-
* The
|
|
31
|
-
*
|
|
32
|
-
*
|
|
29
|
+
* The direct next step: one or two `Button`s or `ButtonLink`s (`size="sm"`) in one row below the text. The primary
|
|
30
|
+
* action takes the tone's button variant; a second one is `secondary`. In a `NoticeCard.Grid` row the actions of all
|
|
31
|
+
* cards share the bottom edge.
|
|
33
32
|
*/
|
|
34
33
|
actions?: JSX.Element;
|
|
35
34
|
class?: string;
|
|
@@ -39,7 +38,6 @@ export declare const NOTICE_CARD_CLASSES: {
|
|
|
39
38
|
readonly root: "k2b-notice-card";
|
|
40
39
|
readonly icon: "k2b-notice-card__icon";
|
|
41
40
|
readonly content: "k2b-notice-card__content";
|
|
42
|
-
readonly text: "k2b-notice-card__text";
|
|
43
41
|
readonly head: "k2b-notice-card__head";
|
|
44
42
|
readonly title: "k2b-notice-card__title";
|
|
45
43
|
readonly meta: "k2b-notice-card__meta";
|
|
@@ -4,8 +4,6 @@ export type PlaceholderSurface = "none" | "paper";
|
|
|
4
4
|
export type PlaceholderState = "empty" | "no-results" | "no-access" | "loading" | "error";
|
|
5
5
|
/** `compact` stacks inside a section, `inline` is one row in a list or sidebar, `panel` fills a work area. */
|
|
6
6
|
export type PlaceholderVariant = "compact" | "inline" | "panel";
|
|
7
|
-
/** The tone of the round sign; the sentence still says what it means (K8, K10). */
|
|
8
|
-
export type PlaceholderTone = "success" | "info" | "warning" | "danger";
|
|
9
7
|
export type PlaceholderProps = {
|
|
10
8
|
title?: JSX.Element;
|
|
11
9
|
description?: JSX.Element;
|
|
@@ -16,11 +14,6 @@ export type PlaceholderProps = {
|
|
|
16
14
|
surface?: PlaceholderSurface;
|
|
17
15
|
state?: PlaceholderState;
|
|
18
16
|
variant?: PlaceholderVariant;
|
|
19
|
-
/**
|
|
20
|
-
* Colours the round sign in a state tone, such as `success` with a check for "All done". The title still says it
|
|
21
|
-
* in words. Without an `icon` the tone brings its own: check, info, alert triangle, or alert circle.
|
|
22
|
-
*/
|
|
23
|
-
tone?: PlaceholderTone;
|
|
24
17
|
class?: string;
|
|
25
18
|
};
|
|
26
19
|
export default function Placeholder(props: PlaceholderProps): JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type JSX } from "solid-js";
|
|
2
|
-
/** Named after the status tokens; a tone colours the
|
|
2
|
+
/** Named after the status tokens; a tone colours the frame, the title, and the icon, never the fill. */
|
|
3
3
|
export type SectionTone = "neutral" | "success" | "warning" | "danger" | "info" | "ai";
|
|
4
4
|
/** `sm` for detail panels and other narrow columns, `md` for topics on a full page. */
|
|
5
5
|
export type SectionSize = "sm" | "md";
|
|
@@ -9,12 +9,6 @@ export type SectionState = "ready" | "loading" | "error";
|
|
|
9
9
|
type SectionBaseProps = Omit<JSX.HTMLAttributes<HTMLElement>, "title" | "children" | "class"> & {
|
|
10
10
|
title: JSX.Element;
|
|
11
11
|
icon?: string;
|
|
12
|
-
/**
|
|
13
|
-
* The colour of the section's area as a CSS colour, such as money or goods on a dense record page (K17). It sets the
|
|
14
|
-
* icon in a 20 px tile of that colour, the one place the area colour shows. Never a status hue, never near the AI
|
|
15
|
-
* plum; a `tone` wins.
|
|
16
|
-
*/
|
|
17
|
-
iconColor?: string;
|
|
18
12
|
size?: SectionSize;
|
|
19
13
|
frame?: SectionFrame;
|
|
20
14
|
tone?: SectionTone;
|
|
@@ -44,7 +38,7 @@ type SectionBaseProps = Omit<JSX.HTMLAttributes<HTMLElement>, "title" | "childre
|
|
|
44
38
|
};
|
|
45
39
|
export type SectionProps = SectionBaseProps & ({
|
|
46
40
|
children?: JSX.Element;
|
|
47
|
-
/**
|
|
41
|
+
/** Exactly one control at the end of the heading, such as "+" or one text button. */
|
|
48
42
|
actions?: JSX.Element;
|
|
49
43
|
collapsible?: false;
|
|
50
44
|
summary?: never;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { type JSX } from "solid-js";
|
|
2
|
-
|
|
3
|
-
export type StatusTone = "info" | "ok" | "warning" | "error" | "degraded" | "running" | "neutral" | "yours";
|
|
2
|
+
export type StatusTone = "info" | "ok" | "warning" | "error" | "degraded" | "running" | "neutral";
|
|
4
3
|
export type StatusBadgeProps = {
|
|
5
4
|
tone: StatusTone;
|
|
6
5
|
label: JSX.Element;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
export type { AreaProps } from "./Area";
|
|
2
|
-
export { Area } from "./Area";
|
|
3
1
|
export type { AvatarProps, AvatarRing, AvatarShape, AvatarSize, AvatarTone } from "./Avatar";
|
|
4
2
|
export { Avatar } from "./Avatar";
|
|
5
3
|
export type { AvatarFacesPerson, AvatarFacesProps, AvatarStackPerson, AvatarStackProps } from "./AvatarStack";
|
|
@@ -11,12 +9,8 @@ export type { DescriptionListItem, DescriptionListProps } from "./DescriptionLis
|
|
|
11
9
|
export { DescriptionList } from "./DescriptionList";
|
|
12
10
|
export type { DotStripProps, DotStripTone } from "./DotStrip";
|
|
13
11
|
export { DotStrip } from "./DotStrip";
|
|
14
|
-
export type { FactGroupItem, FactGroupProps } from "./FactGroup";
|
|
15
|
-
export { FactGroup } from "./FactGroup";
|
|
16
12
|
export type { FieldRowProps } from "./Field";
|
|
17
13
|
export { Field } from "./Field";
|
|
18
|
-
export type { FieldGridProps } from "./FieldGrid";
|
|
19
|
-
export { FieldGrid } from "./FieldGrid";
|
|
20
14
|
export type { LinkCardColor, LinkCardProps } from "./LinkCard";
|
|
21
15
|
export { LinkCard } from "./LinkCard";
|
|
22
16
|
export type { NotFoundStateAction, NotFoundStateProps } from "./NotFoundState";
|
|
@@ -27,7 +21,7 @@ export type { NoticeRowProps } from "./NoticeRow";
|
|
|
27
21
|
export { NoticeRow } from "./NoticeRow";
|
|
28
22
|
export type { PaperProps, PaperTag } from "./Paper";
|
|
29
23
|
export { Paper } from "./Paper";
|
|
30
|
-
export type { PlaceholderAlign, PlaceholderProps, PlaceholderState, PlaceholderSurface,
|
|
24
|
+
export type { PlaceholderAlign, PlaceholderProps, PlaceholderState, PlaceholderSurface, PlaceholderVariant, } from "./Placeholder";
|
|
31
25
|
export { default as Placeholder } from "./Placeholder";
|
|
32
26
|
export type { ProgressBarPart, ProgressBarProps, ProgressBarSegment, ProgressBarTone } from "./ProgressBar";
|
|
33
27
|
export { ProgressBar, progressBarParts } from "./ProgressBar";
|
|
@@ -36,8 +30,6 @@ export { ProgressRing } from "./ProgressRing";
|
|
|
36
30
|
export { PERSON_COLORS, personColor } from "./person-color";
|
|
37
31
|
export type { ResourceCardColor, ResourceCardProps, ResourceCardState } from "./ResourceCard";
|
|
38
32
|
export { ResourceCard } from "./ResourceCard";
|
|
39
|
-
export type { RowGroupProps } from "./RowGroup";
|
|
40
|
-
export { RowGroup } from "./RowGroup";
|
|
41
33
|
export type { SectionFrame, SectionPartProps, SectionProps, SectionSize, SectionState, SectionTone } from "./Section";
|
|
42
34
|
export { Section } from "./Section";
|
|
43
35
|
export { createDelayedLoading, type DelayedLoadingOptions, Skeleton, type SkeletonProps } from "./Skeleton";
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { type JSX } from "solid-js";
|
|
2
|
+
import type { Action, OnNavigate, Person } from "./types";
|
|
3
|
+
type ButtonBase = {
|
|
4
|
+
/**
|
|
5
|
+
* The weight of the action: `primary` filled blue (one per page), `secondary` framed (default), `ghost` without a
|
|
6
|
+
* frame, `text` a quiet text button in a head or at the end of a row. The height comes from the place.
|
|
7
|
+
*/
|
|
8
|
+
variant?: "primary" | "secondary" | "ghost" | "text";
|
|
9
|
+
/** A Tabler icon name before the label. */
|
|
10
|
+
icon?: string;
|
|
11
|
+
/** A person instead of an icon, such as the one a thread is assigned to. */
|
|
12
|
+
avatar?: Person;
|
|
13
|
+
/** A link that looks like a button. */
|
|
14
|
+
href?: string;
|
|
15
|
+
/** With `href`: opens the page in place on a plain click (see `OnNavigate`); a disabled link never calls it. */
|
|
16
|
+
onNavigate?: OnNavigate;
|
|
17
|
+
onClick?: JSX.EventHandler<HTMLElement, MouseEvent>;
|
|
18
|
+
/** The button opens a menu: a chevron after the label. */
|
|
19
|
+
menu?: boolean;
|
|
20
|
+
/** The button leads further, to a page with more: a chevron to the right after the label. */
|
|
21
|
+
forward?: boolean;
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
type?: "button" | "submit";
|
|
24
|
+
/** Stays in a head on the phone, where the other actions move into the menu. */
|
|
25
|
+
keep?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* A hint under the pointer, for a button whose words give way to its symbol in a narrow place (the bar of a
|
|
28
|
+
* selection). An icon button shows its label as the hint by itself.
|
|
29
|
+
*/
|
|
30
|
+
title?: string;
|
|
31
|
+
};
|
|
32
|
+
export type ButtonProps = ButtonBase & ({
|
|
33
|
+
children: JSX.Element;
|
|
34
|
+
label?: string;
|
|
35
|
+
} | {
|
|
36
|
+
children?: undefined;
|
|
37
|
+
/** An icon button needs a name (rule 5: wrong fails at once). */
|
|
38
|
+
label: string;
|
|
39
|
+
});
|
|
40
|
+
/** The one button: round, one height per place, a link through `href`. An icon button must have a label. */
|
|
41
|
+
export declare const Button: (props: ButtonProps) => JSX.Element;
|
|
42
|
+
/** An action as data turned into a button of the given weight; without an icon it always shows its label. */
|
|
43
|
+
export declare const ActionButton: (props: {
|
|
44
|
+
action: Action;
|
|
45
|
+
variant?: ButtonProps["variant"];
|
|
46
|
+
iconOnly?: boolean;
|
|
47
|
+
titled?: boolean;
|
|
48
|
+
}) => JSX.Element;
|
|
49
|
+
/** The copy button beside a value (internal to Facts). */
|
|
50
|
+
export declare const CopyButton: (props: {
|
|
51
|
+
label: string;
|
|
52
|
+
value: string;
|
|
53
|
+
}) => JSX.Element;
|
|
54
|
+
export {};
|