@k2b/ui 0.64.0 → 0.65.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/base.css +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/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/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/package.json +2 -7
- 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
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
import { ssrElement as _$ssrElement } from "solid-js/web";
|
|
2
|
-
import { mergeProps as _$mergeProps } from "solid-js/web";
|
|
3
|
-
import { ssrAttribute as _$ssrAttribute } from "solid-js/web";
|
|
4
|
-
import { ssr as _$ssr } from "solid-js/web";
|
|
5
|
-
import { memo as _$memo } from "solid-js/web";
|
|
6
|
-
import { escape as _$escape } from "solid-js/web";
|
|
7
|
-
import { createComponent as _$createComponent } from "solid-js/web";
|
|
8
|
-
var _tmpl$ = ["<span class=\"k2b-area__count\">", "</span>"],
|
|
9
|
-
_tmpl$2 = ["<span class=\"k2b-area__state\">", "</span>"],
|
|
10
|
-
_tmpl$3 = ["<div class=\"k2b-area__actions\">", "</div>"],
|
|
11
|
-
_tmpl$4 = ["<i", " aria-hidden=\"true\"></i>"],
|
|
12
|
-
_tmpl$5 = ["<div class=\"k2b-area__meta\">", "</div>"],
|
|
13
|
-
_tmpl$6 = ["<div class=\"k2b-area__head\"><span class=\"k2b-area__tile\" aria-hidden=\"true\">", "</span><div class=\"k2b-area__title\">", "", "</div><div class=\"k2b-area__end\">", "", "</div>", "", "</div>"],
|
|
14
|
-
_tmpl$7 = ["<div class=\"k2b-area__body k2b-divided\" id=\"", "\"", ">", "</div>"],
|
|
15
|
-
_tmpl$8 = ["<i", "></i>"],
|
|
16
|
-
_tmpl$9 = ["<p class=\"k2b-area__empty\">", "</p>"];
|
|
17
|
-
import { children, createSignal, createUniqueId, Show, splitProps } from "solid-js";
|
|
18
|
-
import { Dynamic } from "solid-js/web";
|
|
19
|
-
import { IconButton } from "../actions/Button";
|
|
20
|
-
import { rendersSomething } from "../internal/renders-something";
|
|
21
|
-
import { useFlatBlockMessages } from "./flat-block-messages";
|
|
22
|
-
/**
|
|
23
|
-
* An area (K17 "Bereich"): a thing the rows hang on, such as a stack with its lists. Open, it is a square area of its
|
|
24
|
-
* own with a 56 px head of two lines (tile, name in 14 px, state and actions at the right, a 12 px meta line) and its
|
|
25
|
-
* rows on a rail that starts on the name's text edge; areas stand 8 px apart. Closed, it is one 40 px row like a list
|
|
26
|
-
* row: name, state, count, and the chevron, without a surface or a gap. Take an area over a `RowGroup` when it exists
|
|
27
|
-
* also empty, has a state of its own, or two or more actions of its own.
|
|
28
|
-
*/
|
|
29
|
-
export function Area(props) {
|
|
30
|
-
const [local, rest] = splitProps(props, ["name", "marker", "icon", "state", "count", "actions", "meta", "children", "empty", "collapsible", "open", "defaultOpen", "onOpenChange", "level", "class"]);
|
|
31
|
-
const t = useFlatBlockMessages();
|
|
32
|
-
const id = `k2b-area-${createUniqueId()}`;
|
|
33
|
-
const [internalOpen, setInternalOpen] = createSignal(local.defaultOpen ?? true);
|
|
34
|
-
const open = () => !local.collapsible || (local.open ?? internalOpen());
|
|
35
|
-
const toggle = () => {
|
|
36
|
-
const next = !open();
|
|
37
|
-
if (local.open === undefined) setInternalOpen(next);
|
|
38
|
-
local.onOpenChange?.(next);
|
|
39
|
-
};
|
|
40
|
-
const rows = children(() => local.children);
|
|
41
|
-
const hasRows = () => rendersSomething(rows.toArray());
|
|
42
|
-
/** A click on the head's free space toggles too; its own controls keep their click. */
|
|
43
|
-
const onHeadClick = event => {
|
|
44
|
-
if (!local.collapsible || event.target.closest("button, a, input, select, textarea, label, [role='button']")) return;
|
|
45
|
-
toggle();
|
|
46
|
-
};
|
|
47
|
-
return _$ssrElement("section", _$mergeProps(rest, {
|
|
48
|
-
get ["class"]() {
|
|
49
|
-
return local.class ? `k2b-area ${local.class}` : "k2b-area";
|
|
50
|
-
},
|
|
51
|
-
get ["data-open"]() {
|
|
52
|
-
return String(open());
|
|
53
|
-
},
|
|
54
|
-
get ["data-collapsible"]() {
|
|
55
|
-
return local.collapsible ? "true" : undefined;
|
|
56
|
-
},
|
|
57
|
-
"aria-labelledby": `${id}-name`
|
|
58
|
-
}), [_$ssr(_tmpl$6, _$escape(_$createComponent(Show, {
|
|
59
|
-
get when() {
|
|
60
|
-
return local.icon;
|
|
61
|
-
},
|
|
62
|
-
get fallback() {
|
|
63
|
-
return local.marker;
|
|
64
|
-
},
|
|
65
|
-
children: icon => _$ssr(_tmpl$8, _$ssrAttribute("class", _$escape(icon(), true), false))
|
|
66
|
-
})), _$escape(_$createComponent(Dynamic, {
|
|
67
|
-
get component() {
|
|
68
|
-
return `h${local.level ?? 4}`;
|
|
69
|
-
},
|
|
70
|
-
id: `${id}-name`,
|
|
71
|
-
"class": "k2b-area__name",
|
|
72
|
-
get children() {
|
|
73
|
-
return local.name;
|
|
74
|
-
}
|
|
75
|
-
})), _$escape(_$createComponent(Show, {
|
|
76
|
-
get when() {
|
|
77
|
-
return _$memo(() => local.count !== undefined)() && !open();
|
|
78
|
-
},
|
|
79
|
-
get children() {
|
|
80
|
-
return _$ssr(_tmpl$, _$escape(local.count));
|
|
81
|
-
}
|
|
82
|
-
})), _$escape(_$createComponent(Show, {
|
|
83
|
-
get when() {
|
|
84
|
-
return local.state;
|
|
85
|
-
},
|
|
86
|
-
get children() {
|
|
87
|
-
return _$ssr(_tmpl$2, _$escape(local.state));
|
|
88
|
-
}
|
|
89
|
-
})), _$escape(_$createComponent(Show, {
|
|
90
|
-
get when() {
|
|
91
|
-
return _$memo(() => !!open())() && local.actions;
|
|
92
|
-
},
|
|
93
|
-
get children() {
|
|
94
|
-
return _$ssr(_tmpl$3, _$escape(local.actions));
|
|
95
|
-
}
|
|
96
|
-
})), _$escape(_$createComponent(Show, {
|
|
97
|
-
get when() {
|
|
98
|
-
return local.collapsible;
|
|
99
|
-
},
|
|
100
|
-
get children() {
|
|
101
|
-
return _$createComponent(IconButton, {
|
|
102
|
-
size: "sm",
|
|
103
|
-
variant: "ghost",
|
|
104
|
-
"class": "k2b-area__chevron",
|
|
105
|
-
get label() {
|
|
106
|
-
return _$memo(() => !!open())() ? t().hideArea({
|
|
107
|
-
name: local.name
|
|
108
|
-
}) : t().showArea({
|
|
109
|
-
name: local.name
|
|
110
|
-
});
|
|
111
|
-
},
|
|
112
|
-
get ["aria-expanded"]() {
|
|
113
|
-
return open();
|
|
114
|
-
},
|
|
115
|
-
"aria-controls": `${id}-body`,
|
|
116
|
-
onClick: toggle,
|
|
117
|
-
get children() {
|
|
118
|
-
return _$ssr(_tmpl$4, _$ssrAttribute("class", open() ? "ti ti-chevron-up" : "ti ti-chevron-down", false));
|
|
119
|
-
}
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
})), _$escape(_$createComponent(Show, {
|
|
123
|
-
get when() {
|
|
124
|
-
return _$memo(() => !!open())() && local.meta;
|
|
125
|
-
},
|
|
126
|
-
get children() {
|
|
127
|
-
return _$ssr(_tmpl$5, _$escape(local.meta));
|
|
128
|
-
}
|
|
129
|
-
}))), _$ssr(_tmpl$7, `${_$escape(id, true)}-body`, _$ssrAttribute("hidden", !open(), true), _$escape(_$createComponent(Show, {
|
|
130
|
-
get when() {
|
|
131
|
-
return hasRows();
|
|
132
|
-
},
|
|
133
|
-
get fallback() {
|
|
134
|
-
return _$createComponent(Show, {
|
|
135
|
-
get when() {
|
|
136
|
-
return local.empty;
|
|
137
|
-
},
|
|
138
|
-
children: empty => _$ssr(_tmpl$9, _$escape(empty()))
|
|
139
|
-
});
|
|
140
|
-
},
|
|
141
|
-
get children() {
|
|
142
|
-
return rows();
|
|
143
|
-
}
|
|
144
|
-
})))], false);
|
|
145
|
-
}
|
|
146
|
-
export default Area;
|
|
147
|
-
//# sourceMappingURL=Area.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["surfaces/Area.tsx"],"sourcesContent":["import { children, createSignal, createUniqueId, type JSX, Show, splitProps } from \"solid-js\";\nimport { Dynamic } from \"solid-js/web\";\nimport { IconButton } from \"../actions/Button\";\nimport { rendersSomething } from \"../internal/renders-something\";\nimport { useFlatBlockMessages } from \"./flat-block-messages\";\n\nexport type AreaProps = Omit<JSX.HTMLAttributes<HTMLElement>, \"children\" | \"title\"> & {\n /** The thing's name, such as \"Stack 2\". */\n name: string;\n /** A short number or code in the 20 px tile before the name, such as \"2\". Pass `icon` instead for a symbol. */\n marker?: string | number;\n /** A Tabler icon class for the tile, when the area has no number. */\n icon?: string;\n /** The area's own state, such as a `StatusBadge`; it stays in the closed row too. */\n state?: JSX.Element;\n /** How many rows hang on the area; the closed row shows it after the name. */\n count?: number;\n /** The area's own actions at the right of its head, such as framed `Button`s and icon buttons. Hidden while closed. */\n actions?: JSX.Element;\n /** One 12 px meta line under the name, such as \"3 lists · 2 of 3 photographed\". Hidden while closed. */\n meta?: JSX.Element;\n /** The rows that hang on the area, or one more `Area` (at most two levels). Never a `RowGroup`. */\n children?: JSX.Element;\n /** What an area without rows says, such as \"No list yet\"; an area exists also when it is empty. */\n empty?: JSX.Element;\n /** Lets the person close the area to one 40 px row. Only the person opens or closes it. */\n collapsible?: boolean;\n open?: boolean;\n /** Defaults to open. */\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n /** Heading level of the name; defaults to 4. */\n level?: 3 | 4 | 5;\n};\n\n/**\n * An area (K17 \"Bereich\"): a thing the rows hang on, such as a stack with its lists. Open, it is a square area of its\n * own with a 56 px head of two lines (tile, name in 14 px, state and actions at the right, a 12 px meta line) and its\n * rows on a rail that starts on the name's text edge; areas stand 8 px apart. Closed, it is one 40 px row like a list\n * row: name, state, count, and the chevron, without a surface or a gap. Take an area over a `RowGroup` when it exists\n * also empty, has a state of its own, or two or more actions of its own.\n */\nexport function Area(props: AreaProps): JSX.Element {\n const [local, rest] = splitProps(props, [\n \"name\",\n \"marker\",\n \"icon\",\n \"state\",\n \"count\",\n \"actions\",\n \"meta\",\n \"children\",\n \"empty\",\n \"collapsible\",\n \"open\",\n \"defaultOpen\",\n \"onOpenChange\",\n \"level\",\n \"class\",\n ]);\n const t = useFlatBlockMessages();\n const id = `k2b-area-${createUniqueId()}`;\n const [internalOpen, setInternalOpen] = createSignal(local.defaultOpen ?? true);\n const open = () => !local.collapsible || (local.open ?? internalOpen());\n const toggle = () => {\n const next = !open();\n if (local.open === undefined) setInternalOpen(next);\n local.onOpenChange?.(next);\n };\n const rows = children(() => local.children);\n const hasRows = () => rendersSomething(rows.toArray());\n /** A click on the head's free space toggles too; its own controls keep their click. */\n const onHeadClick = (event: MouseEvent) => {\n if (!local.collapsible || (event.target as Element).closest(\"button, a, input, select, textarea, label, [role='button']\")) return;\n toggle();\n };\n return (\n <section\n {...rest}\n class={local.class ? `k2b-area ${local.class}` : \"k2b-area\"}\n data-open={String(open())}\n data-collapsible={local.collapsible ? \"true\" : undefined}\n aria-labelledby={`${id}-name`}\n >\n {/* biome-ignore lint/a11y/noStaticElementInteractions: the chevron button is the keyboard and screen-reader control; the head's free space is a larger pointer target for the same toggle. */}\n {/* biome-ignore lint/a11y/useKeyWithClickEvents: as above. */}\n <div class=\"k2b-area__head\" onClick={onHeadClick}>\n <span class=\"k2b-area__tile\" aria-hidden=\"true\">\n <Show when={local.icon} fallback={local.marker}>\n {(icon) => <i class={icon()} />}\n </Show>\n </span>\n <div class=\"k2b-area__title\">\n <Dynamic component={`h${local.level ?? 4}`} id={`${id}-name`} class=\"k2b-area__name\">\n {local.name}\n </Dynamic>\n <Show when={local.count !== undefined && !open()}>\n <span class=\"k2b-area__count\">{local.count}</span>\n </Show>\n </div>\n <div class=\"k2b-area__end\">\n <Show when={local.state}>\n <span class=\"k2b-area__state\">{local.state}</span>\n </Show>\n <Show when={open() && local.actions}>\n <div class=\"k2b-area__actions\">{local.actions}</div>\n </Show>\n </div>\n <Show when={local.collapsible}>\n <IconButton\n size=\"sm\"\n variant=\"ghost\"\n class=\"k2b-area__chevron\"\n label={open() ? t().hideArea({ name: local.name }) : t().showArea({ name: local.name })}\n aria-expanded={open()}\n aria-controls={`${id}-body`}\n onClick={toggle}\n >\n <i class={open() ? \"ti ti-chevron-up\" : \"ti ti-chevron-down\"} aria-hidden=\"true\" />\n </IconButton>\n </Show>\n <Show when={open() && local.meta}>\n <div class=\"k2b-area__meta\">{local.meta}</div>\n </Show>\n </div>\n <div class=\"k2b-area__body k2b-divided\" id={`${id}-body`} hidden={!open()}>\n <Show when={hasRows()} fallback={<Show when={local.empty}>{(empty) => <p class=\"k2b-area__empty\">{empty()}</p>}</Show>}>\n {rows()}\n </Show>\n </div>\n </section>\n );\n}\n\nexport default Area;\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import { ssrElement as _$ssrElement } from "solid-js/web";
|
|
2
|
-
import { mergeProps as _$mergeProps } from "solid-js/web";
|
|
3
|
-
import { ssr as _$ssr } from "solid-js/web";
|
|
4
|
-
import { escape as _$escape } from "solid-js/web";
|
|
5
|
-
import { createComponent as _$createComponent } from "solid-js/web";
|
|
6
|
-
var _tmpl$ = ["<div class=\"k2b-fact-group__head\">", "", "", "</div>"],
|
|
7
|
-
_tmpl$2 = ["<dl class=\"k2b-fact-group__facts\">", "</dl>"],
|
|
8
|
-
_tmpl$3 = ["<i class=\"", "\" aria-hidden=\"true\"></i>"],
|
|
9
|
-
_tmpl$4 = "<i class=\"ti ti-pencil\" aria-hidden=\"true\"></i>",
|
|
10
|
-
_tmpl$5 = ["<small class=\"k2b-fact-group__detail\">", "</small>"],
|
|
11
|
-
_tmpl$6 = ["<div class=\"k2b-fact-group__fact\"><dt>", "</dt><dd><span class=\"k2b-fact-group__value\">", "</span>", "", "</dd></div>"],
|
|
12
|
-
_tmpl$7 = "<span class=\"k2b-fact-group__slot\" aria-hidden=\"true\"></span>";
|
|
13
|
-
import { createUniqueId, For, Show, splitProps } from "solid-js";
|
|
14
|
-
import { Dynamic } from "solid-js/web";
|
|
15
|
-
import { IconButton } from "../actions/Button";
|
|
16
|
-
import { CopyButton } from "../actions/CopyButton";
|
|
17
|
-
import { useFlatBlockMessages } from "./flat-block-messages";
|
|
18
|
-
import { useSectionMessages } from "./section-messages";
|
|
19
|
-
|
|
20
|
-
/** One fact: a quiet label and a strong value. */
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* A group of facts (K17 "Angaben-Gruppe"), quiet and at hand: a title with its symbol and one pencil, then label and
|
|
24
|
-
* value in two columns, label 12 px grey and value 13 px dark, with a copy button at values people carry elsewhere.
|
|
25
|
-
* Groups stand apart by space, without lines. Below 360 px of width the label stands above its value, so a number or
|
|
26
|
-
* an address keeps its line. Put the groups into a column of at most 400 px beside the detail column, or into it.
|
|
27
|
-
*/
|
|
28
|
-
export function FactGroup(props) {
|
|
29
|
-
const [local, rest] = splitProps(props, ["title", "icon", "items", "onEdit", "level", "class"]);
|
|
30
|
-
const t = useFlatBlockMessages();
|
|
31
|
-
const copyLabel = useSectionMessages();
|
|
32
|
-
const titleId = `k2b-fact-group-${createUniqueId()}`;
|
|
33
|
-
const copyValue = item => typeof item.copy === "string" ? item.copy : item.copy && typeof item.value === "string" ? item.value : undefined;
|
|
34
|
-
return _$ssrElement("section", _$mergeProps(rest, {
|
|
35
|
-
get ["class"]() {
|
|
36
|
-
return local.class ? `k2b-fact-group ${local.class}` : "k2b-fact-group";
|
|
37
|
-
},
|
|
38
|
-
"aria-labelledby": titleId
|
|
39
|
-
}), [_$ssr(_tmpl$, _$escape(_$createComponent(Show, {
|
|
40
|
-
get when() {
|
|
41
|
-
return local.icon;
|
|
42
|
-
},
|
|
43
|
-
children: icon => _$ssr(_tmpl$3, `${_$escape(icon(), true)} k2b-fact-group__icon`)
|
|
44
|
-
})), _$escape(_$createComponent(Dynamic, {
|
|
45
|
-
get component() {
|
|
46
|
-
return `h${local.level ?? 3}`;
|
|
47
|
-
},
|
|
48
|
-
id: titleId,
|
|
49
|
-
"class": "k2b-fact-group__title",
|
|
50
|
-
get children() {
|
|
51
|
-
return local.title;
|
|
52
|
-
}
|
|
53
|
-
})), _$escape(_$createComponent(Show, {
|
|
54
|
-
get when() {
|
|
55
|
-
return local.onEdit;
|
|
56
|
-
},
|
|
57
|
-
children: edit => _$createComponent(IconButton, {
|
|
58
|
-
size: "sm",
|
|
59
|
-
variant: "ghost",
|
|
60
|
-
"class": "k2b-fact-group__edit",
|
|
61
|
-
get label() {
|
|
62
|
-
return t().editFacts({
|
|
63
|
-
title: local.title
|
|
64
|
-
});
|
|
65
|
-
},
|
|
66
|
-
onClick: () => edit()(),
|
|
67
|
-
get children() {
|
|
68
|
-
return _$ssr(_tmpl$4);
|
|
69
|
-
}
|
|
70
|
-
})
|
|
71
|
-
}))), _$ssr(_tmpl$2, _$escape(_$createComponent(For, {
|
|
72
|
-
get each() {
|
|
73
|
-
return local.items;
|
|
74
|
-
},
|
|
75
|
-
children: item => _$ssr(_tmpl$6, _$escape(item.label), _$escape(item.value), _$escape(_$createComponent(Show, {
|
|
76
|
-
get when() {
|
|
77
|
-
return item.detail;
|
|
78
|
-
},
|
|
79
|
-
get children() {
|
|
80
|
-
return _$ssr(_tmpl$5, _$escape(item.detail));
|
|
81
|
-
}
|
|
82
|
-
})), _$escape(_$createComponent(Show, {
|
|
83
|
-
get when() {
|
|
84
|
-
return copyValue(item);
|
|
85
|
-
},
|
|
86
|
-
get fallback() {
|
|
87
|
-
return _$ssr(_tmpl$7);
|
|
88
|
-
},
|
|
89
|
-
children: value => _$createComponent(CopyButton, {
|
|
90
|
-
"class": "k2b-fact-group__copy",
|
|
91
|
-
get value() {
|
|
92
|
-
return value();
|
|
93
|
-
},
|
|
94
|
-
size: "xs",
|
|
95
|
-
iconOnly: true,
|
|
96
|
-
get label() {
|
|
97
|
-
return copyLabel().copyField({
|
|
98
|
-
label: item.label
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
})
|
|
102
|
-
})))
|
|
103
|
-
})))], false);
|
|
104
|
-
}
|
|
105
|
-
export default FactGroup;
|
|
106
|
-
//# sourceMappingURL=FactGroup.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["surfaces/FactGroup.tsx"],"sourcesContent":["import { createUniqueId, For, type JSX, Show, splitProps } from \"solid-js\";\nimport { Dynamic } from \"solid-js/web\";\nimport { IconButton } from \"../actions/Button\";\nimport { CopyButton } from \"../actions/CopyButton\";\nimport { useFlatBlockMessages } from \"./flat-block-messages\";\nimport { useSectionMessages } from \"./section-messages\";\n\n/** One fact: a quiet label and a strong value. */\nexport type FactGroupItem = {\n label: string;\n value: JSX.Element;\n /** A quiet 12 px line under the value, such as \"Default\" or \"since 6 Oct 2026\". */\n detail?: JSX.Element;\n /**\n * Shows a copy button for a value people carry elsewhere: a phone number, an email, an address, an IBAN, a code.\n * `true` copies a text `value`; a string copies that string.\n */\n copy?: boolean | string;\n};\n\nexport type FactGroupProps = Omit<JSX.HTMLAttributes<HTMLElement>, \"children\" | \"title\"> & {\n /** The group's name, such as \"Contact\" or \"Bank\". */\n title: string;\n /** A Tabler icon class before the title. */\n icon?: string;\n /** Two or more facts; a group of one value belongs into another group. A list (people) counts as a list. */\n items: readonly FactGroupItem[];\n /** The group's one pencil. It replaces \"Edit\" links on single values. */\n onEdit?: () => void;\n /** Heading level of the title; defaults to 3. */\n level?: 3 | 4;\n};\n\n/**\n * A group of facts (K17 \"Angaben-Gruppe\"), quiet and at hand: a title with its symbol and one pencil, then label and\n * value in two columns, label 12 px grey and value 13 px dark, with a copy button at values people carry elsewhere.\n * Groups stand apart by space, without lines. Below 360 px of width the label stands above its value, so a number or\n * an address keeps its line. Put the groups into a column of at most 400 px beside the detail column, or into it.\n */\nexport function FactGroup(props: FactGroupProps): JSX.Element {\n const [local, rest] = splitProps(props, [\"title\", \"icon\", \"items\", \"onEdit\", \"level\", \"class\"]);\n const t = useFlatBlockMessages();\n const copyLabel = useSectionMessages();\n const titleId = `k2b-fact-group-${createUniqueId()}`;\n const copyValue = (item: FactGroupItem) =>\n typeof item.copy === \"string\" ? item.copy : item.copy && typeof item.value === \"string\" ? item.value : undefined;\n return (\n <section {...rest} class={local.class ? `k2b-fact-group ${local.class}` : \"k2b-fact-group\"} aria-labelledby={titleId}>\n <div class=\"k2b-fact-group__head\">\n <Show when={local.icon}>{(icon) => <i class={`${icon()} k2b-fact-group__icon`} aria-hidden=\"true\" />}</Show>\n <Dynamic component={`h${local.level ?? 3}`} id={titleId} class=\"k2b-fact-group__title\">\n {local.title}\n </Dynamic>\n <Show when={local.onEdit}>\n {(edit) => (\n <IconButton\n size=\"sm\"\n variant=\"ghost\"\n class=\"k2b-fact-group__edit\"\n label={t().editFacts({ title: local.title })}\n onClick={() => edit()()}\n >\n <i class=\"ti ti-pencil\" aria-hidden=\"true\" />\n </IconButton>\n )}\n </Show>\n </div>\n <dl class=\"k2b-fact-group__facts\">\n <For each={local.items}>\n {(item) => (\n <div class=\"k2b-fact-group__fact\">\n <dt>{item.label}</dt>\n <dd>\n <span class=\"k2b-fact-group__value\">{item.value}</span>\n <Show when={item.detail}>\n <small class=\"k2b-fact-group__detail\">{item.detail}</small>\n </Show>\n {/* Inside the value, so the list holds only terms and values; without a copy button the slot stays, so\n every value of a group ends on one edge. */}\n <Show when={copyValue(item)} fallback={<span class=\"k2b-fact-group__slot\" aria-hidden=\"true\" />}>\n {(value) => (\n <CopyButton\n class=\"k2b-fact-group__copy\"\n value={value()}\n size=\"xs\"\n iconOnly\n label={copyLabel().copyField({ label: item.label })}\n />\n )}\n </Show>\n </dd>\n </div>\n )}\n </For>\n </dl>\n </section>\n );\n}\n\nexport default FactGroup;\n"],"mappings":";;;;;;;;;;;;AAAA,SAAS,cAAc,EAAE,GAAG,EAAY,IAAI,EAAE,UAAU,QAAQ,UAAU;AAC1E,SAAS,OAAO,QAAQ,cAAc;AACtC,SAAS,UAAU,QAAQ,mBAAmB;AAC9C,SAAS,UAAU,QAAQ,uBAAuB;AAClD,SAAS,oBAAoB,QAAQ,uBAAuB;AAC5D,SAAS,kBAAkB,QAAQ,oBAAoB;;AAEvD;;AA0BA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAAS,SAAS,CAAC,KAAqB,EAAe;EAC5D,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,UAAU,CAAC,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;EAC/F,MAAM,CAAC,GAAG,oBAAoB,CAAC,CAAC;EAChC,MAAM,SAAS,GAAG,kBAAkB,CAAC,CAAC;EACtC,MAAM,OAAO,GAAG,kBAAkB,cAAc,CAAC,CAAC,EAAE;EACpD,MAAM,SAAS,GAAI,IAAmB,IACpC,OAAO,IAAI,CAAC,IAAI,KAAK,QAAQ,GAAG,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,OAAO,IAAI,CAAC,KAAK,KAAK,QAAQ,GAAG,IAAI,CAAC,KAAK,GAAG,SAAS;EAClH,4CACe,IAAI;IAAA;MAAA,OAAS,KAAK,CAAC,KAAK,GAAG,kBAAkB,KAAK,CAAC,KAAK,EAAE,GAAG,gBAAgB;IAAA;IAAA,mBAAmB;EAAO,8CAE/G,IAAI;IAAA,IAAC,IAAI;MAAA,OAAE,KAAK,CAAC,IAAI;IAAA;IAAA,UAAI,IAAI,mBAAe,YAAG,IAAI,CAAC,CAAC,8BAAuB;EAAuB,gCACnG,OAAO;IAAA,IAAC,SAAS;MAAA,OAAE,IAAI,KAAK,CAAC,KAAK,IAAI,CAAC,EAAE;IAAA;IAAE,EAAE,EAAE,OAAO;IAAA;IAAA;MAAA,OACpD,KAAK,CAAC,KAAK;IAAA;EAAA,gCAEb,IAAI;IAAA,IAAC,IAAI;MAAA,OAAE,KAAK,CAAC,MAAM;IAAA;IAAA,UACpB,IAAI,sBACH,UAAU;MACT,IAAI;MACJ,OAAO;MAAA;MAAA,IAEP,KAAK;QAAA,OAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;UAAE,KAAK,EAAE,KAAK,CAAC;QAAM,CAAC,CAAC;MAAA;MAC5C,OAAO,EAAE,MAAM,IAAI,CAAC,CAAC,CAAC,CAAC;MAAA;QAAA;MAAA;IAAA;EAI1B,gDAIF,GAAG;IAAA,IAAC,IAAI;MAAA,OAAE,KAAK,CAAC,KAAK;IAAA;IAAA,UAClB,IAAI,4BAEG,IAAI,CAAC,KAAK,YAEwB,IAAI,CAAC,KAAK,8BAC9C,IAAI;MAAA,IAAC,IAAI;QAAA,OAAE,IAAI,CAAC,MAAM;MAAA;MAAA;QAAA,+BACkB,IAAI,CAAC,MAAM;MAAA;IAAA,gCAInD,IAAI;MAAA,IAAC,IAAI;QAAA,OAAE,SAAS,CAAC,IAAI,CAAC;MAAA;MAAA,IAAE,QAAQ;QAAA;MAAA;MAAA,UACjC,KAAK,sBACJ,UAAU;QAAA;QAAA,IAET,KAAK;UAAA,OAAE,KAAK,CAAC,CAAC;QAAA;QACd,IAAI;QACJ,QAAQ;QAAA,IACR,KAAK;UAAA,OAAE,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;YAAE,KAAK,EAAE,IAAI,CAAC;UAAM,CAAC,CAAC;QAAA;MAAA;IAEtD;EAIR;AAKX;AAEA,eAAe,SAAS","ignoreList":[]}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { ssrElement as _$ssrElement } from "solid-js/web";
|
|
2
|
-
import { mergeProps as _$mergeProps } from "solid-js/web";
|
|
3
|
-
import { ssr as _$ssr } from "solid-js/web";
|
|
4
|
-
import { ssrAttribute as _$ssrAttribute } from "solid-js/web";
|
|
5
|
-
import { escape as _$escape } from "solid-js/web";
|
|
6
|
-
var _tmpl$ = ["<div class=\"k2b-field-grid__row\"", ">", "</div>"];
|
|
7
|
-
import { splitProps } from "solid-js";
|
|
8
|
-
/**
|
|
9
|
-
* A row of fields on one grid (K5): every label row is 20 px, so the controls share their top edge, and help or an
|
|
10
|
-
* error grows only its own field below the control. In a column under 360 px the fields stand one under the other, so
|
|
11
|
-
* a label never runs into its neighbour (K15); three or four fields stack earlier, so no field gets narrower than 160 px.
|
|
12
|
-
*/
|
|
13
|
-
export function FieldGrid(props) {
|
|
14
|
-
const [local, rest] = splitProps(props, ["children", "columns", "class"]);
|
|
15
|
-
return _$ssrElement("div", _$mergeProps(rest, {
|
|
16
|
-
get ["class"]() {
|
|
17
|
-
return local.class ? `k2b-field-grid ${local.class}` : "k2b-field-grid";
|
|
18
|
-
}
|
|
19
|
-
}), _$ssr(_tmpl$, _$ssrAttribute("data-columns", _$escape(String(local.columns ?? 2), true), false), _$escape(local.children)), false);
|
|
20
|
-
}
|
|
21
|
-
export default FieldGrid;
|
|
22
|
-
//# sourceMappingURL=FieldGrid.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["surfaces/FieldGrid.tsx"],"sourcesContent":["import { type JSX, splitProps } from \"solid-js\";\n\nexport type FieldGridProps = Omit<JSX.HTMLAttributes<HTMLDivElement>, \"children\"> & {\n /** The fields of one row, such as `TextInput`s or `Select`s; each keeps its label, help, and error. */\n children: JSX.Element;\n /** How many fields stand side by side; defaults to 2. */\n columns?: 2 | 3 | 4;\n};\n\n/**\n * A row of fields on one grid (K5): every label row is 20 px, so the controls share their top edge, and help or an\n * error grows only its own field below the control. In a column under 360 px the fields stand one under the other, so\n * a label never runs into its neighbour (K15); three or four fields stack earlier, so no field gets narrower than 160 px.\n */\nexport function FieldGrid(props: FieldGridProps): JSX.Element {\n const [local, rest] = splitProps(props, [\"children\", \"columns\", \"class\"]);\n return (\n <div {...rest} class={local.class ? `k2b-field-grid ${local.class}` : \"k2b-field-grid\"}>\n <div class=\"k2b-field-grid__row\" data-columns={String(local.columns ?? 2)}>\n {local.children}\n </div>\n </div>\n );\n}\n\nexport default FieldGrid;\n"],"mappings":";;;;;;AAAA,SAAmB,UAAU,QAAQ,UAAU;AAS/C;AACA;AACA;AACA;AACA;AACA,OAAO,SAAS,SAAS,CAAC,KAAqB,EAAe;EAC5D,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,UAAU,CAAC,KAAK,EAAE,CAAC,UAAU,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;EACzE,wCACW,IAAI;IAAA;MAAA,OAAS,KAAK,CAAC,KAAK,GAAG,kBAAkB,KAAK,CAAC,KAAK,EAAE,GAAG,gBAAgB;IAAA;EAAA,0DACrC,MAAM,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC,0BACtE,KAAK,CAAC,QAAQ;AAIvB;AAEA,eAAe,SAAS","ignoreList":[]}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { ssrElement as _$ssrElement } from "solid-js/web";
|
|
2
|
-
import { mergeProps as _$mergeProps } from "solid-js/web";
|
|
3
|
-
import { ssr as _$ssr } from "solid-js/web";
|
|
4
|
-
import { escape as _$escape } from "solid-js/web";
|
|
5
|
-
import { createComponent as _$createComponent } from "solid-js/web";
|
|
6
|
-
var _tmpl$ = ["<span class=\"k2b-row-group__count\">", "</span>"],
|
|
7
|
-
_tmpl$2 = ["<span class=\"k2b-row-group__action\">", "</span>"],
|
|
8
|
-
_tmpl$3 = ["<div class=\"k2b-row-group__head\">", "", "", "</div>"],
|
|
9
|
-
_tmpl$4 = ["<div class=\"k2b-row-group__rows k2b-divided\">", "</div>"];
|
|
10
|
-
import { children, createUniqueId, Show, splitProps } from "solid-js";
|
|
11
|
-
import { Dynamic } from "solid-js/web";
|
|
12
|
-
import { rendersSomething } from "../internal/renders-something";
|
|
13
|
-
/**
|
|
14
|
-
* A group (K17 "Gruppe"): a sort word for the rows of one list, such as tasks by status. A 36 px head on the page's
|
|
15
|
-
* quiet ground with the name in 13 px bold, its count, and at most one action; the rows follow as they are. It
|
|
16
|
-
* disappears when it is empty. A group never stands inside an `Area`.
|
|
17
|
-
*/
|
|
18
|
-
export function RowGroup(props) {
|
|
19
|
-
const [local, rest] = splitProps(props, ["title", "count", "action", "children", "level", "class"]);
|
|
20
|
-
const rows = children(() => local.children);
|
|
21
|
-
const titleId = `k2b-row-group-${createUniqueId()}`;
|
|
22
|
-
return _$createComponent(Show, {
|
|
23
|
-
get when() {
|
|
24
|
-
return rendersSomething(rows.toArray());
|
|
25
|
-
},
|
|
26
|
-
get children() {
|
|
27
|
-
return _$ssrElement("section", _$mergeProps(rest, {
|
|
28
|
-
get ["class"]() {
|
|
29
|
-
return local.class ? `k2b-row-group ${local.class}` : "k2b-row-group";
|
|
30
|
-
},
|
|
31
|
-
"aria-labelledby": titleId
|
|
32
|
-
}), [_$ssr(_tmpl$3, _$escape(_$createComponent(Dynamic, {
|
|
33
|
-
get component() {
|
|
34
|
-
return `h${local.level ?? 4}`;
|
|
35
|
-
},
|
|
36
|
-
id: titleId,
|
|
37
|
-
"class": "k2b-row-group__title",
|
|
38
|
-
get children() {
|
|
39
|
-
return local.title;
|
|
40
|
-
}
|
|
41
|
-
})), _$escape(_$createComponent(Show, {
|
|
42
|
-
get when() {
|
|
43
|
-
return local.count !== undefined;
|
|
44
|
-
},
|
|
45
|
-
get children() {
|
|
46
|
-
return _$ssr(_tmpl$, _$escape(local.count));
|
|
47
|
-
}
|
|
48
|
-
})), _$escape(_$createComponent(Show, {
|
|
49
|
-
get when() {
|
|
50
|
-
return local.action;
|
|
51
|
-
},
|
|
52
|
-
get children() {
|
|
53
|
-
return _$ssr(_tmpl$2, _$escape(local.action));
|
|
54
|
-
}
|
|
55
|
-
}))), _$ssr(_tmpl$4, _$escape(rows()))], false);
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
export default RowGroup;
|
|
60
|
-
//# sourceMappingURL=RowGroup.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["surfaces/RowGroup.tsx"],"sourcesContent":["import { children, createUniqueId, type JSX, Show, splitProps } from \"solid-js\";\nimport { Dynamic } from \"solid-js/web\";\nimport { rendersSomething } from \"../internal/renders-something\";\n\nexport type RowGroupProps = Omit<JSX.HTMLAttributes<HTMLElement>, \"children\" | \"title\"> & {\n /** The value the rows share, such as a status, a tag, or a person. */\n title: JSX.Element;\n /** How many rows the group holds, after the title. */\n count?: number;\n /** At most one quiet control at the end of the head, such as \"+\". */\n action?: JSX.Element;\n /** The group's rows. A group without rows renders nothing. */\n children?: JSX.Element;\n /** Heading level of the title; defaults to 4. */\n level?: 3 | 4 | 5;\n};\n\n/**\n * A group (K17 \"Gruppe\"): a sort word for the rows of one list, such as tasks by status. A 36 px head on the page's\n * quiet ground with the name in 13 px bold, its count, and at most one action; the rows follow as they are. It\n * disappears when it is empty. A group never stands inside an `Area`.\n */\nexport function RowGroup(props: RowGroupProps): JSX.Element {\n const [local, rest] = splitProps(props, [\"title\", \"count\", \"action\", \"children\", \"level\", \"class\"]);\n const rows = children(() => local.children);\n const titleId = `k2b-row-group-${createUniqueId()}`;\n return (\n <Show when={rendersSomething(rows.toArray())}>\n <section {...rest} class={local.class ? `k2b-row-group ${local.class}` : \"k2b-row-group\"} aria-labelledby={titleId}>\n <div class=\"k2b-row-group__head\">\n <Dynamic component={`h${local.level ?? 4}`} id={titleId} class=\"k2b-row-group__title\">\n {local.title}\n </Dynamic>\n <Show when={local.count !== undefined}>\n <span class=\"k2b-row-group__count\">{local.count}</span>\n </Show>\n <Show when={local.action}>\n <span class=\"k2b-row-group__action\">{local.action}</span>\n </Show>\n </div>\n <div class=\"k2b-row-group__rows k2b-divided\">{rows()}</div>\n </section>\n </Show>\n );\n}\n\nexport default RowGroup;\n"],"mappings":";;;;;;;;;AAAA,SAAS,QAAQ,EAAE,cAAc,EAAY,IAAI,EAAE,UAAU,QAAQ,UAAU;AAC/E,SAAS,OAAO,QAAQ,cAAc;AACtC,SAAS,gBAAgB,QAAQ,+BAA+B;AAehE;AACA;AACA;AACA;AACA;AACA,OAAO,SAAS,QAAQ,CAAC,KAAoB,EAAe;EAC1D,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,UAAU,CAAC,KAAK,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;EACnG,MAAM,IAAI,GAAG,QAAQ,CAAC,MAAM,KAAK,CAAC,QAAQ,CAAC;EAC3C,MAAM,OAAO,GAAG,iBAAiB,cAAc,CAAC,CAAC,EAAE;EACnD,yBACG,IAAI;IAAA,IAAC,IAAI;MAAA,OAAE,gBAAgB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IAAA;IAAA;MAAA,4CAC7B,IAAI;QAAA;UAAA,OAAS,KAAK,CAAC,KAAK,GAAG,iBAAiB,KAAK,CAAC,KAAK,EAAE,GAAG,eAAe;QAAA;QAAA,mBAAmB;MAAO,+CAE7G,OAAO;QAAA,IAAC,SAAS;UAAA,OAAE,IAAI,KAAK,CAAC,KAAK,IAAI,CAAC,EAAE;QAAA;QAAE,EAAE,EAAE,OAAO;QAAA;QAAA;UAAA,OACpD,KAAK,CAAC,KAAK;QAAA;MAAA,gCAEb,IAAI;QAAA,IAAC,IAAI;UAAA,OAAE,KAAK,CAAC,KAAK,KAAK,SAAS;QAAA;QAAA;UAAA,8BACC,KAAK,CAAC,KAAK;QAAA;MAAA,gCAEhD,IAAI;QAAA,IAAC,IAAI;UAAA,OAAE,KAAK,CAAC,MAAM;QAAA;QAAA;UAAA,+BACe,KAAK,CAAC,MAAM;QAAA;MAAA,8BAGP,IAAI,CAAC,CAAC;IAAA;EAAA;AAI5D;AAEA,eAAe,QAAQ","ignoreList":[]}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { i18n } from "@k2b/stdlib";
|
|
2
|
-
import { useLocale } from "../intl/locale";
|
|
3
|
-
|
|
4
|
-
/** Words of the flat building blocks: an area's disclosure and a fact group's pencil. */
|
|
5
|
-
const flatBlockMessages = i18n.define({
|
|
6
|
-
baseLocale: "en",
|
|
7
|
-
messages: {
|
|
8
|
-
en: {
|
|
9
|
-
showArea: ({
|
|
10
|
-
name
|
|
11
|
-
}) => `Show ${name}`,
|
|
12
|
-
hideArea: ({
|
|
13
|
-
name
|
|
14
|
-
}) => `Hide ${name}`,
|
|
15
|
-
editFacts: ({
|
|
16
|
-
title
|
|
17
|
-
}) => `Edit ${title}`
|
|
18
|
-
},
|
|
19
|
-
de: {
|
|
20
|
-
showArea: ({
|
|
21
|
-
name
|
|
22
|
-
}) => `${name} aufklappen`,
|
|
23
|
-
hideArea: ({
|
|
24
|
-
name
|
|
25
|
-
}) => `${name} zuklappen`,
|
|
26
|
-
editFacts: ({
|
|
27
|
-
title
|
|
28
|
-
}) => `${title} bearbeiten`
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
export const useFlatBlockMessages = () => {
|
|
33
|
-
const locale = useLocale();
|
|
34
|
-
return () => flatBlockMessages.resolve([locale()]).t;
|
|
35
|
-
};
|
|
36
|
-
export const checkFlatBlockMessages = () => flatBlockMessages.check();
|
|
37
|
-
//# sourceMappingURL=flat-block-messages.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["surfaces/flat-block-messages.ts"],"sourcesContent":["import { i18n } from \"@k2b/stdlib\";\nimport { useLocale } from \"../intl/locale\";\n\n/** Words of the flat building blocks: an area's disclosure and a fact group's pencil. */\nconst flatBlockMessages = i18n.define({\n baseLocale: \"en\",\n messages: {\n en: {\n showArea: ({ name }: { name: string }) => `Show ${name}`,\n hideArea: ({ name }: { name: string }) => `Hide ${name}`,\n editFacts: ({ title }: { title: string }) => `Edit ${title}`,\n },\n de: {\n showArea: ({ name }) => `${name} aufklappen`,\n hideArea: ({ name }) => `${name} zuklappen`,\n editFacts: ({ title }) => `${title} bearbeiten`,\n },\n },\n});\n\nexport type FlatBlockMessages = ReturnType<(typeof flatBlockMessages)[\"resolve\"]>[\"t\"];\n\nexport const useFlatBlockMessages = (): (() => FlatBlockMessages) => {\n const locale = useLocale();\n return () => flatBlockMessages.resolve([locale()]).t;\n};\n\nexport const checkFlatBlockMessages = () => flatBlockMessages.check();\n"],"mappings":"AAAA,SAAS,IAAI,QAAQ,aAAa;AAClC,SAAS,SAAS,QAAQ,gBAAgB;;AAE1C;AACA,MAAM,iBAAiB,GAAG,IAAI,CAAC,MAAM,CAAC;EACpC,UAAU,EAAE,IAAI;EAChB,QAAQ,EAAE;IACR,EAAE,EAAE;MACF,QAAQ,EAAE,CAAC;QAAE;MAAuB,CAAC,KAAK,QAAQ,IAAI,EAAE;MACxD,QAAQ,EAAE,CAAC;QAAE;MAAuB,CAAC,KAAK,QAAQ,IAAI,EAAE;MACxD,SAAS,EAAE,CAAC;QAAE;MAAyB,CAAC,KAAK,QAAQ,KAAK;IAC5D,CAAC;IACD,EAAE,EAAE;MACF,QAAQ,EAAE,CAAC;QAAE;MAAK,CAAC,KAAK,GAAG,IAAI,aAAa;MAC5C,QAAQ,EAAE,CAAC;QAAE;MAAK,CAAC,KAAK,GAAG,IAAI,YAAY;MAC3C,SAAS,EAAE,CAAC;QAAE;MAAM,CAAC,KAAK,GAAG,KAAK;IACpC;EACF;AACF,CAAC,CAAC;AAIF,OAAO,MAAM,oBAAoB,GAAG,MAAiC;EACnE,MAAM,MAAM,GAAG,SAAS,CAAC,CAAC;EAC1B,OAAO,MAAM,iBAAiB,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACtD,CAAC;AAED,OAAO,MAAM,sBAAsB,GAAG,MAAM,iBAAiB,CAAC,KAAK,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/** The phone menu sheet's own words; they load with the sheet, so menus without one do not carry them. */
|
|
2
|
-
declare const menuSheetMessages: import("@k2b/stdlib").Catalog<{
|
|
3
|
-
menuBack: ({ menu }: {
|
|
4
|
-
menu: string;
|
|
5
|
-
}) => string;
|
|
6
|
-
}>;
|
|
7
|
-
export type MenuSheetMessages = ReturnType<(typeof menuSheetMessages)["resolve"]>["t"];
|
|
8
|
-
/** Resolved from the inherited render locale. */
|
|
9
|
-
export declare const useMenuSheetMessages: () => (() => MenuSheetMessages);
|
|
10
|
-
export declare const checkMenuSheetMessages: () => import("@k2b/stdlib").CatalogIssue[];
|
|
11
|
-
export {};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { type JSX } from "solid-js";
|
|
2
|
-
import type { DropdownItems, DropdownSubmenu, itemContent, MenuContextValue } from "./Dropdown";
|
|
3
|
-
type Box = Pick<DOMRect, "left" | "top" | "right" | "bottom">;
|
|
4
|
-
/**
|
|
5
|
-
* Where a submenu stands: beside its row, its first row level with it, on the side that has room; without room on
|
|
6
|
-
* either side it keeps to the viewport. Too low, it rises until its last row is level with its row's bottom.
|
|
7
|
-
*/
|
|
8
|
-
export declare const placeSubmenu: (row: Box, parent: Pick<DOMRect, "left" | "right">, menu: {
|
|
9
|
-
width: number;
|
|
10
|
-
height: number;
|
|
11
|
-
}, viewport: {
|
|
12
|
-
width: number;
|
|
13
|
-
height: number;
|
|
14
|
-
}, rtl?: boolean) => {
|
|
15
|
-
left: number;
|
|
16
|
-
top: number;
|
|
17
|
-
side: "left" | "right";
|
|
18
|
-
};
|
|
19
|
-
/** A row with "▸" that opens its submenu beside it, or in a phone sheet in the sheet's place (K16). */
|
|
20
|
-
export declare function SubmenuRow(props: {
|
|
21
|
-
item: DropdownSubmenu;
|
|
22
|
-
/** The level's menu: handed in, so this module needs nothing of the menu's code at run time. */
|
|
23
|
-
menu: MenuContextValue;
|
|
24
|
-
Items: typeof DropdownItems;
|
|
25
|
-
content: typeof itemContent;
|
|
26
|
-
}): JSX.Element;
|
|
27
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { type JSX } from "solid-js";
|
|
2
|
-
/**
|
|
3
|
-
* A file name split before its ending: `{ stem: "Report 2026", ext: ".pdf" }`. A name without a dot, a hidden file
|
|
4
|
-
* such as `.env`, or a name that ends in a dot has no ending. A long ending (more than ten characters after the dot)
|
|
5
|
-
* counts as part of the name, so a dotted title does not read as a file type.
|
|
6
|
-
*/
|
|
7
|
-
export declare const splitFileName: (name: string) => {
|
|
8
|
-
stem: string;
|
|
9
|
-
ext: string;
|
|
10
|
-
};
|
|
11
|
-
export type FileNameProps = Omit<JSX.HTMLAttributes<HTMLSpanElement>, "children"> & {
|
|
12
|
-
/** The whole name, ending included. */
|
|
13
|
-
name: string;
|
|
14
|
-
};
|
|
15
|
-
/**
|
|
16
|
-
* A file name on one line that shortens before its ending (K15): `Quarterly rep….pdf`. The ending always stays, and
|
|
17
|
-
* the whole name is the hint on hover and the text a screen reader reads: the visible stem and ending are two flex
|
|
18
|
-
* items, which accessible names join with a space ("Notes .txt"), so they are hidden from assistive technology and
|
|
19
|
-
* the whole name stands beside them as screen-reader text. The screen-reader text is out of the flow, so the layout
|
|
20
|
-
* stays as it was.
|
|
21
|
-
*/
|
|
22
|
-
export declare function FileName(props: FileNameProps): JSX.Element;
|
|
23
|
-
export default FileName;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { type JSX } from "solid-js";
|
|
2
|
-
export type TaskRowProps = {
|
|
3
|
-
/** Tabler icon class for the kind of task, such as `ti ti-package-export`. Decorative: the sentence names the task. */
|
|
4
|
-
icon: string;
|
|
5
|
-
/** How many things the task covers, as a chip before the sentence. Zero shows no chip; the sentence says it in words. */
|
|
6
|
-
count?: number;
|
|
7
|
-
/** The task in one sentence, such as "3 unsold items are ready for pickup". One line; a longer one ends in an ellipsis. */
|
|
8
|
-
text: string;
|
|
9
|
-
/** A quiet second line, such as the date the task is due. The row is then 52 px instead of 40 px. */
|
|
10
|
-
detail?: JSX.Element;
|
|
11
|
-
/** The action word at the end, such as "Prepare handover". It is never cut; the sentence gives way first. */
|
|
12
|
-
action: string;
|
|
13
|
-
/** Where the row leads. The row is then a link. */
|
|
14
|
-
href?: string;
|
|
15
|
-
/** What the row does when there is no `href`. The row is then a button. */
|
|
16
|
-
onClick?: (event: MouseEvent) => void;
|
|
17
|
-
/** The task cannot be started now. The row stays in place, reads as unavailable and does nothing. */
|
|
18
|
-
disabled?: boolean;
|
|
19
|
-
/**
|
|
20
|
-
* The accessible name, when the visible text alone does not say what happens. Defaults to the row's text. Start it
|
|
21
|
-
* with the visible sentence and action word, so people who speak a visible word can still reach the row.
|
|
22
|
-
*/
|
|
23
|
-
label?: string;
|
|
24
|
-
class?: string;
|
|
25
|
-
};
|
|
26
|
-
/**
|
|
27
|
-
* A task that only has a date, such as items waiting for pickup until a day: the kind as a symbol, the count as a
|
|
28
|
-
* chip, one sentence and, at the end, the action word. The whole row is one link or button. What needs someone now
|
|
29
|
-
* and has a consequence is a notice cell instead (K10), not a task row.
|
|
30
|
-
* @example <TaskRow icon="ti ti-package-export" count={3} text="Unsold items are ready for pickup" detail="until Dec 12, 2026" action="Prepare handover" href="/handover" />
|
|
31
|
-
*/
|
|
32
|
-
export declare function TaskRow(props: TaskRowProps): JSX.Element;
|
|
33
|
-
export default TaskRow;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
declare const progressPathMessages: import("@k2b/stdlib").Catalog<{
|
|
2
|
-
current: string;
|
|
3
|
-
}>;
|
|
4
|
-
export type ProgressPathMessages = ReturnType<(typeof progressPathMessages)["resolve"]>["t"];
|
|
5
|
-
/** Resolved from the inherited render locale. */
|
|
6
|
-
export declare const useProgressPathMessages: () => (() => ProgressPathMessages);
|
|
7
|
-
export declare const checkProgressPathMessages: () => import("@k2b/stdlib").CatalogIssue[];
|
|
8
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Keeps a dialog's footer where it is whenever the frame's height changes while it is open, such as when an error
|
|
3
|
-
* shows above the footer (K16): a centered frame grows down by half of the new height, so it moves up by that much
|
|
4
|
-
* and grows upwards only; it shrinks from the top as well. It never moves past the top edge: a frame at its full
|
|
5
|
-
* height scrolls its body instead. A frame that follows its content folds from its top edge on its own, a placed
|
|
6
|
-
* window keeps its place, and a sheet keeps its bottom anyway. A new window size centers the frame again.
|
|
7
|
-
* Returns a function that stops it.
|
|
8
|
-
*/
|
|
9
|
-
export declare const holdDialogFoot: (footer: HTMLElement) => (() => void) | undefined;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { JSX } from "solid-js";
|
|
2
|
-
export type FloatingPillProps = {
|
|
3
|
-
/** Names the group for assistive technology, such as "Note views and actions". */
|
|
4
|
-
label: string;
|
|
5
|
-
/** Views and actions, usually small `IconButton`s or a `SegmentedControl`; `FloatingPill.Separator` parts them. */
|
|
6
|
-
children: JSX.Element;
|
|
7
|
-
class?: string;
|
|
8
|
-
};
|
|
9
|
-
type FloatingPillComponent = ((props: FloatingPillProps) => JSX.Element) & {
|
|
10
|
-
Separator: () => JSX.Element;
|
|
11
|
-
};
|
|
12
|
-
/**
|
|
13
|
-
* The floating pill of a reading column (K6, K16): views and actions of a column that has neither head nor status
|
|
14
|
-
* row, such as a note. Place it as the first child of `AppWorkspace.Main width="reading"`. It stays at the column's
|
|
15
|
-
* top end while the text scrolls below it, and takes no room from the text. It is a `k2b-pill`, so its look, size,
|
|
16
|
-
* and round controls are the ones of every floating pill.
|
|
17
|
-
*/
|
|
18
|
-
declare const FloatingPill: FloatingPillComponent;
|
|
19
|
-
export { FloatingPill };
|
|
20
|
-
export default FloatingPill;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { type JSX } from "solid-js";
|
|
2
|
-
/** A key figure of the status row: the number (bold) and what it counts. */
|
|
3
|
-
export type StatusRowFact = {
|
|
4
|
-
value: JSX.Element;
|
|
5
|
-
label: JSX.Element;
|
|
6
|
-
};
|
|
7
|
-
/** A page-wide disturbance that needs nobody: the page tries again by itself (K10). */
|
|
8
|
-
export type StatusRowState = {
|
|
9
|
-
/** What is wrong, in a few words, such as "Sync paused". */
|
|
10
|
-
label: JSX.Element;
|
|
11
|
-
/** `warning` (the default) or `danger`; `neutral` for a quiet state such as "Offline". */
|
|
12
|
-
tone?: "neutral" | "warning" | "danger";
|
|
13
|
-
/** Tabler icon class inside the round sign, such as `ti ti-refresh`. Defaults to an alert sign. */
|
|
14
|
-
icon?: string;
|
|
15
|
-
/** The time of the next attempt as people read it, such as "14:05". Shows as "next attempt 14:05". */
|
|
16
|
-
next?: JSX.Element;
|
|
17
|
-
};
|
|
18
|
-
/** A selection in the list below: its count becomes the lead statement, its figures and actions take the places of the key figures and filters (K6). */
|
|
19
|
-
export type StatusRowSelection = {
|
|
20
|
-
/** The number of chosen items. A check and "3 selected" take the lead statement's place. */
|
|
21
|
-
count: number;
|
|
22
|
-
/** Up to three figures about the chosen items, such as their kinds or total size. */
|
|
23
|
-
facts?: readonly StatusRowFact[];
|
|
24
|
-
/** Actions on the chosen items, usually small buttons. */
|
|
25
|
-
actions?: JSX.Element;
|
|
26
|
-
};
|
|
27
|
-
export type StatusRowProps = {
|
|
28
|
-
/** The lead statement (18 px, bold): what someone wants to know here first. It is never shortened. */
|
|
29
|
-
lead: JSX.Element;
|
|
30
|
-
/** Up to three key figures. Only the first three show; the rest give way in a fixed order when space is short. */
|
|
31
|
-
facts?: readonly StatusRowFact[];
|
|
32
|
-
/** Filters at the end of the row, usually `FilterChip` elements. */
|
|
33
|
-
filters?: JSX.Element;
|
|
34
|
-
/** A disturbance of the whole page; it takes the place of the key figures, the lead statement stays. */
|
|
35
|
-
state?: StatusRowState;
|
|
36
|
-
/** A selection; its count and actions take the place of the key figures and filters. */
|
|
37
|
-
selection?: StatusRowSelection;
|
|
38
|
-
/**
|
|
39
|
-
* What is happening right now in words, announced politely to screen readers and shown in the place of the key
|
|
40
|
-
* figures, such as "Moving “Invoice 12” to Done". Drag and drop fills it while an item moves (K7).
|
|
41
|
-
*/
|
|
42
|
-
announcement?: JSX.Element;
|
|
43
|
-
/** A hairline under the row, where the row stands above a list without its own column head. */
|
|
44
|
-
line?: boolean;
|
|
45
|
-
class?: string;
|
|
46
|
-
};
|
|
47
|
-
/**
|
|
48
|
-
* The status row (K6, K10): the first line under a column's head, 52 px tall. The lead statement on the left keeps
|
|
49
|
-
* its place and size in every state. Up to three key figures follow it; on the right stand the filters. A selection
|
|
50
|
-
* shows its count and actions in the same places; a disturbance of the page shows a round sign, what is wrong, and
|
|
51
|
-
* the next attempt in the place of the key figures. It shows only data that exists already.
|
|
52
|
-
*/
|
|
53
|
-
export declare function StatusRow(props: StatusRowProps): JSX.Element;
|
|
54
|
-
export default StatusRow;
|