@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.
Files changed (214) hide show
  1. package/dist/base.css +3 -6
  2. package/dist/browser/actions/ContextMenu.js +1 -3
  3. package/dist/browser/actions/ContextMenu.js.map +1 -1
  4. package/dist/browser/actions/Dropdown.js +15 -69
  5. package/dist/browser/actions/Dropdown.js.map +1 -1
  6. package/dist/browser/actions/SortableList.js +1 -1
  7. package/dist/browser/actions/SortableList.js.map +1 -1
  8. package/dist/browser/actions/ViewTabs.js +5 -9
  9. package/dist/browser/actions/ViewTabs.js.map +1 -1
  10. package/dist/browser/actions/drag-and-drop.js +1 -1
  11. package/dist/browser/actions/drag-and-drop.js.map +1 -1
  12. package/dist/browser/actions/index.js.map +1 -1
  13. package/dist/browser/actions/menu-sheet.js +18 -80
  14. package/dist/browser/actions/menu-sheet.js.map +1 -1
  15. package/dist/browser/content/DataTable.js +197 -285
  16. package/dist/browser/content/DataTable.js.map +1 -1
  17. package/dist/browser/content/MessageRow.js +139 -115
  18. package/dist/browser/content/MessageRow.js.map +1 -1
  19. package/dist/browser/content/ProgressPath.js +25 -30
  20. package/dist/browser/content/ProgressPath.js.map +1 -1
  21. package/dist/browser/content/index.js +0 -2
  22. package/dist/browser/content/index.js.map +1 -1
  23. package/dist/browser/feedback/dialog-core.js +0 -11
  24. package/dist/browser/feedback/dialog-core.js.map +1 -1
  25. package/dist/browser/internal/field.js +2 -2
  26. package/dist/browser/internal/field.js.map +1 -1
  27. package/dist/browser/intl/messages.js +1 -1
  28. package/dist/browser/intl/messages.js.map +1 -1
  29. package/dist/browser/layout/AppWorkspace.js +8 -16
  30. package/dist/browser/layout/AppWorkspace.js.map +1 -1
  31. package/dist/browser/layout/Breadcrumbs.js +42 -188
  32. package/dist/browser/layout/Breadcrumbs.js.map +1 -1
  33. package/dist/browser/layout/DetailPanel.js +205 -209
  34. package/dist/browser/layout/DetailPanel.js.map +1 -1
  35. package/dist/browser/layout/PanelDialog.js +88 -176
  36. package/dist/browser/layout/PanelDialog.js.map +1 -1
  37. package/dist/browser/layout/app-workspace-controller.js +5 -12
  38. package/dist/browser/layout/app-workspace-controller.js.map +1 -1
  39. package/dist/browser/layout/app-workspace-state.js +2 -2
  40. package/dist/browser/layout/app-workspace-state.js.map +1 -1
  41. package/dist/browser/layout/index.js +0 -2
  42. package/dist/browser/layout/index.js.map +1 -1
  43. package/dist/browser/layout/workspace-messages.js +2 -12
  44. package/dist/browser/layout/workspace-messages.js.map +1 -1
  45. package/dist/browser/surfaces/NoticeCard.js +57 -69
  46. package/dist/browser/surfaces/NoticeCard.js.map +1 -1
  47. package/dist/browser/surfaces/Placeholder.js +5 -17
  48. package/dist/browser/surfaces/Placeholder.js.map +1 -1
  49. package/dist/browser/surfaces/Section.js +7 -22
  50. package/dist/browser/surfaces/Section.js.map +1 -1
  51. package/dist/browser/surfaces/StatusBadge.js +1 -5
  52. package/dist/browser/surfaces/StatusBadge.js.map +1 -1
  53. package/dist/browser/surfaces/index.js +0 -4
  54. package/dist/browser/surfaces/index.js.map +1 -1
  55. package/dist/ssr/actions/ContextMenu.js +1 -3
  56. package/dist/ssr/actions/ContextMenu.js.map +1 -1
  57. package/dist/ssr/actions/Dropdown.js +15 -69
  58. package/dist/ssr/actions/Dropdown.js.map +1 -1
  59. package/dist/ssr/actions/SortableList.js +1 -1
  60. package/dist/ssr/actions/SortableList.js.map +1 -1
  61. package/dist/ssr/actions/ViewTabs.js +5 -9
  62. package/dist/ssr/actions/ViewTabs.js.map +1 -1
  63. package/dist/ssr/actions/drag-and-drop.js +1 -1
  64. package/dist/ssr/actions/drag-and-drop.js.map +1 -1
  65. package/dist/ssr/actions/index.js.map +1 -1
  66. package/dist/ssr/actions/menu-sheet.js +10 -62
  67. package/dist/ssr/actions/menu-sheet.js.map +1 -1
  68. package/dist/ssr/content/DataTable.js +54 -64
  69. package/dist/ssr/content/DataTable.js.map +1 -1
  70. package/dist/ssr/content/MessageRow.js +30 -10
  71. package/dist/ssr/content/MessageRow.js.map +1 -1
  72. package/dist/ssr/content/ProgressPath.js +8 -14
  73. package/dist/ssr/content/ProgressPath.js.map +1 -1
  74. package/dist/ssr/content/index.js +0 -2
  75. package/dist/ssr/content/index.js.map +1 -1
  76. package/dist/ssr/feedback/dialog-core.js +0 -11
  77. package/dist/ssr/feedback/dialog-core.js.map +1 -1
  78. package/dist/ssr/internal/field.js +2 -2
  79. package/dist/ssr/internal/field.js.map +1 -1
  80. package/dist/ssr/intl/messages.js +1 -1
  81. package/dist/ssr/intl/messages.js.map +1 -1
  82. package/dist/ssr/layout/AppWorkspace.js +8 -16
  83. package/dist/ssr/layout/AppWorkspace.js.map +1 -1
  84. package/dist/ssr/layout/Breadcrumbs.js +26 -140
  85. package/dist/ssr/layout/Breadcrumbs.js.map +1 -1
  86. package/dist/ssr/layout/DetailPanel.js +68 -70
  87. package/dist/ssr/layout/DetailPanel.js.map +1 -1
  88. package/dist/ssr/layout/PanelDialog.js +8 -82
  89. package/dist/ssr/layout/PanelDialog.js.map +1 -1
  90. package/dist/ssr/layout/app-workspace-controller.js +5 -12
  91. package/dist/ssr/layout/app-workspace-controller.js.map +1 -1
  92. package/dist/ssr/layout/app-workspace-state.js +2 -2
  93. package/dist/ssr/layout/app-workspace-state.js.map +1 -1
  94. package/dist/ssr/layout/index.js +0 -2
  95. package/dist/ssr/layout/index.js.map +1 -1
  96. package/dist/ssr/layout/workspace-messages.js +2 -12
  97. package/dist/ssr/layout/workspace-messages.js.map +1 -1
  98. package/dist/ssr/surfaces/NoticeCard.js +5 -7
  99. package/dist/ssr/surfaces/NoticeCard.js.map +1 -1
  100. package/dist/ssr/surfaces/Placeholder.js +4 -15
  101. package/dist/ssr/surfaces/Placeholder.js.map +1 -1
  102. package/dist/ssr/surfaces/Section.js +4 -7
  103. package/dist/ssr/surfaces/Section.js.map +1 -1
  104. package/dist/ssr/surfaces/StatusBadge.js +1 -5
  105. package/dist/ssr/surfaces/StatusBadge.js.map +1 -1
  106. package/dist/ssr/surfaces/index.js +0 -4
  107. package/dist/ssr/surfaces/index.js.map +1 -1
  108. package/dist/styles.css +1 -1
  109. package/dist/types/actions/Dropdown.d.ts +1 -35
  110. package/dist/types/actions/ViewTabs.d.ts +2 -3
  111. package/dist/types/actions/index.d.ts +1 -1
  112. package/dist/types/actions/menu-sheet.d.ts +1 -3
  113. package/dist/types/content/DataTable.d.ts +0 -19
  114. package/dist/types/content/MessageRow.d.ts +11 -0
  115. package/dist/types/content/ProgressPath.d.ts +6 -12
  116. package/dist/types/content/index.d.ts +0 -2
  117. package/dist/types/feedback/dialog-core.d.ts +0 -5
  118. package/dist/types/layout/AppWorkspace.d.ts +2 -10
  119. package/dist/types/layout/Breadcrumbs.d.ts +5 -10
  120. package/dist/types/layout/PanelDialog.d.ts +0 -19
  121. package/dist/types/layout/app-workspace-state.d.ts +2 -2
  122. package/dist/types/layout/index.d.ts +1 -5
  123. package/dist/types/layout/workspace-messages.d.ts +0 -5
  124. package/dist/types/surfaces/NoticeCard.d.ts +4 -6
  125. package/dist/types/surfaces/Placeholder.d.ts +0 -7
  126. package/dist/types/surfaces/Section.d.ts +2 -8
  127. package/dist/types/surfaces/StatusBadge.d.ts +1 -2
  128. package/dist/types/surfaces/index.d.ts +1 -9
  129. package/package.json +2 -7
  130. package/dist/browser/actions/menu-sheet-messages.js +0 -26
  131. package/dist/browser/actions/menu-sheet-messages.js.map +0 -1
  132. package/dist/browser/actions/menu-submenu-panel.js +0 -392
  133. package/dist/browser/actions/menu-submenu-panel.js.map +0 -1
  134. package/dist/browser/content/FileName.js +0 -68
  135. package/dist/browser/content/FileName.js.map +0 -1
  136. package/dist/browser/content/TaskRow.js +0 -129
  137. package/dist/browser/content/TaskRow.js.map +0 -1
  138. package/dist/browser/content/progress-path-messages.js +0 -22
  139. package/dist/browser/content/progress-path-messages.js.map +0 -1
  140. package/dist/browser/feedback/dialog-foot.js +0 -45
  141. package/dist/browser/feedback/dialog-foot.js.map +0 -1
  142. package/dist/browser/internal/renders-something.js +0 -3
  143. package/dist/browser/internal/renders-something.js.map +0 -1
  144. package/dist/browser/layout/FloatingPill.js +0 -33
  145. package/dist/browser/layout/FloatingPill.js.map +0 -1
  146. package/dist/browser/layout/StatusRow.js +0 -174
  147. package/dist/browser/layout/StatusRow.js.map +0 -1
  148. package/dist/browser/layout/panel-dialog-error.js +0 -44
  149. package/dist/browser/layout/panel-dialog-error.js.map +0 -1
  150. package/dist/browser/layout/panel-sheet-handle.js +0 -86
  151. package/dist/browser/layout/panel-sheet-handle.js.map +0 -1
  152. package/dist/browser/layout-check.js +0 -232
  153. package/dist/browser/layout-check.js.map +0 -1
  154. package/dist/browser/surfaces/Area.js +0 -205
  155. package/dist/browser/surfaces/Area.js.map +0 -1
  156. package/dist/browser/surfaces/FactGroup.js +0 -148
  157. package/dist/browser/surfaces/FactGroup.js.map +0 -1
  158. package/dist/browser/surfaces/FieldGrid.js +0 -34
  159. package/dist/browser/surfaces/FieldGrid.js.map +0 -1
  160. package/dist/browser/surfaces/RowGroup.js +0 -82
  161. package/dist/browser/surfaces/RowGroup.js.map +0 -1
  162. package/dist/browser/surfaces/flat-block-messages.js +0 -37
  163. package/dist/browser/surfaces/flat-block-messages.js.map +0 -1
  164. package/dist/ssr/actions/menu-sheet-messages.js +0 -26
  165. package/dist/ssr/actions/menu-sheet-messages.js.map +0 -1
  166. package/dist/ssr/actions/menu-submenu-panel.js +0 -295
  167. package/dist/ssr/actions/menu-submenu-panel.js.map +0 -1
  168. package/dist/ssr/content/FileName.js +0 -46
  169. package/dist/ssr/content/FileName.js.map +0 -1
  170. package/dist/ssr/content/TaskRow.js +0 -95
  171. package/dist/ssr/content/TaskRow.js.map +0 -1
  172. package/dist/ssr/content/progress-path-messages.js +0 -22
  173. package/dist/ssr/content/progress-path-messages.js.map +0 -1
  174. package/dist/ssr/feedback/dialog-foot.js +0 -45
  175. package/dist/ssr/feedback/dialog-foot.js.map +0 -1
  176. package/dist/ssr/internal/renders-something.js +0 -3
  177. package/dist/ssr/internal/renders-something.js.map +0 -1
  178. package/dist/ssr/layout/FloatingPill.js +0 -16
  179. package/dist/ssr/layout/FloatingPill.js.map +0 -1
  180. package/dist/ssr/layout/StatusRow.js +0 -93
  181. package/dist/ssr/layout/StatusRow.js.map +0 -1
  182. package/dist/ssr/layout/panel-dialog-error.js +0 -28
  183. package/dist/ssr/layout/panel-dialog-error.js.map +0 -1
  184. package/dist/ssr/layout/panel-sheet-handle.js +0 -66
  185. package/dist/ssr/layout/panel-sheet-handle.js.map +0 -1
  186. package/dist/ssr/layout-check.js +0 -232
  187. package/dist/ssr/layout-check.js.map +0 -1
  188. package/dist/ssr/surfaces/Area.js +0 -147
  189. package/dist/ssr/surfaces/Area.js.map +0 -1
  190. package/dist/ssr/surfaces/FactGroup.js +0 -106
  191. package/dist/ssr/surfaces/FactGroup.js.map +0 -1
  192. package/dist/ssr/surfaces/FieldGrid.js +0 -22
  193. package/dist/ssr/surfaces/FieldGrid.js.map +0 -1
  194. package/dist/ssr/surfaces/RowGroup.js +0 -60
  195. package/dist/ssr/surfaces/RowGroup.js.map +0 -1
  196. package/dist/ssr/surfaces/flat-block-messages.js +0 -37
  197. package/dist/ssr/surfaces/flat-block-messages.js.map +0 -1
  198. package/dist/types/actions/menu-sheet-messages.d.ts +0 -11
  199. package/dist/types/actions/menu-submenu-panel.d.ts +0 -27
  200. package/dist/types/content/FileName.d.ts +0 -23
  201. package/dist/types/content/TaskRow.d.ts +0 -33
  202. package/dist/types/content/progress-path-messages.d.ts +0 -8
  203. package/dist/types/feedback/dialog-foot.d.ts +0 -9
  204. package/dist/types/internal/renders-something.d.ts +0 -2
  205. package/dist/types/layout/FloatingPill.d.ts +0 -20
  206. package/dist/types/layout/StatusRow.d.ts +0 -54
  207. package/dist/types/layout/panel-dialog-error.d.ts +0 -9
  208. package/dist/types/layout/panel-sheet-handle.d.ts +0 -8
  209. package/dist/types/layout-check.d.ts +0 -52
  210. package/dist/types/surfaces/Area.d.ts +0 -38
  211. package/dist/types/surfaces/FactGroup.d.ts +0 -33
  212. package/dist/types/surfaces/FieldGrid.d.ts +0 -14
  213. package/dist/types/surfaces/RowGroup.d.ts +0 -20
  214. package/dist/types/surfaces/flat-block-messages.d.ts +0 -16
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":["layout/FloatingPill.tsx"],"sourcesContent":["import type { JSX } from \"solid-js\";\n\nexport type FloatingPillProps = {\n /** Names the group for assistive technology, such as \"Note views and actions\". */\n label: string;\n /** Views and actions, usually small `IconButton`s or a `SegmentedControl`; `FloatingPill.Separator` parts them. */\n children: JSX.Element;\n class?: string;\n};\n\ntype FloatingPillComponent = ((props: FloatingPillProps) => JSX.Element) & { Separator: () => JSX.Element };\n\n/**\n * The floating pill of a reading column (K6, K16): views and actions of a column that has neither head nor status\n * row, such as a note. Place it as the first child of `AppWorkspace.Main width=\"reading\"`. It stays at the column's\n * top end while the text scrolls below it, and takes no room from the text. It is a `k2b-pill`, so its look, size,\n * and round controls are the ones of every floating pill.\n */\nconst FloatingPill = ((props: FloatingPillProps) => (\n <div class={`k2b-pill k2b-floating-pill${props.class ? ` ${props.class}` : \"\"}`} role=\"group\" aria-label={props.label}>\n {props.children}\n </div>\n)) as FloatingPillComponent;\n\nFloatingPill.Separator = () => <span class=\"k2b-floating-pill__separator\" aria-hidden=\"true\" />;\n\nexport { FloatingPill };\nexport default FloatingPill;\n"],"mappings":";;;;;AAYA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,YAAY,GAAK,KAAwB,kBACjC,6BAA6B,KAAK,CAAC,KAAK,GAAG,aAAI,KAAK,CAAC,KAAK,SAAE,GAAG,EAAE,EAAE,wCAA2B,KAAK,CAAC,KAAK,0BAClH,KAAK,CAAC,QAAQ,EAEQ;AAE3B,YAAY,CAAC,SAAS,GAAG,oBAAsE;AAE/F,SAAS,YAAY;AACrB,eAAe,YAAY","ignoreList":[]}
@@ -1,93 +0,0 @@
1
- import { ssr as _$ssr } from "solid-js/web";
2
- import { memo as _$memo } from "solid-js/web";
3
- import { createComponent as _$createComponent } 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$ = ["<span class=\"k2b-status-row__announcement\">", "</span>"],
7
- _tmpl$2 = ["<div class=\"k2b-status-row__end\">", "</div>"],
8
- _tmpl$3 = ["<div class=\"", "\"", "><p class=\"k2b-status-row__lead\">", "</p><div class=\"k2b-status-row__middle\">", "", "", "</div>", "<span class=\"k2b-sr-only\" aria-live=\"polite\" aria-atomic=\"true\">", "</span></div>"],
9
- _tmpl$4 = "<i class=\"ti ti-check\" aria-hidden=\"true\"></i>",
10
- _tmpl$5 = ["<span class=\"k2b-status-row__fact\"><b>", "</b> ", "</span>"],
11
- _tmpl$6 = ["<span class=\"k2b-status-row__next\"><span class=\"k2b-status-row__next-label\">", "</span><time class=\"k2b-status-row__time\">", "</time></span>"],
12
- _tmpl$7 = ["<span class=\"k2b-status-row__state\"", "><span class=\"k2b-status-row__sign\" aria-hidden=\"true\"><i", "></i></span><b>", "</b>", "</span>"];
13
- import { For, Show } from "solid-js";
14
- import { useWorkspaceMessages } from "./workspace-messages";
15
-
16
- /** A key figure of the status row: the number (bold) and what it counts. */
17
-
18
- /** A page-wide disturbance that needs nobody: the page tries again by itself (K10). */
19
-
20
- /** 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). */
21
-
22
- const present = value => value !== undefined && value !== null && value !== false && value !== "";
23
-
24
- /** The state's hint in words, when its label and time are plain text: what is wrong and the next attempt. */
25
- const stateHint = (state, nextAttempt) => {
26
- const label = state.label;
27
- const next = state.next;
28
- if (typeof label !== "string") return undefined;
29
- if (!present(next)) return label;
30
- return typeof next === "string" ? `${label} · ${nextAttempt} ${next}` : undefined;
31
- };
32
-
33
- /**
34
- * The status row (K6, K10): the first line under a column's head, 52 px tall. The lead statement on the left keeps
35
- * its place and size in every state. Up to three key figures follow it; on the right stand the filters. A selection
36
- * shows its count and actions in the same places; a disturbance of the page shows a round sign, what is wrong, and
37
- * the next attempt in the place of the key figures. It shows only data that exists already.
38
- */
39
- export function StatusRow(props) {
40
- const messages = useWorkspaceMessages();
41
- const mode = () => props.selection ? "selection" : present(props.announcement) ? "announcement" : props.state ? "state" : "facts";
42
- return _$ssr(_tmpl$3, `k2b-status-row${props.class ? ` ${_$escape(props.class, true)}` : ""}`, _$ssrAttribute("data-mode", _$escape(mode(), true), false) + _$ssrAttribute("data-tone", mode() === "state" ? _$escape(props.state?.tone ?? "warning", true) : _$escape(undefined, true), false) + _$ssrAttribute("data-line", props.line ? "" : _$escape(undefined, true), false), _$escape(_$createComponent(Show, {
43
- get when() {
44
- return props.selection;
45
- },
46
- get fallback() {
47
- return props.lead;
48
- },
49
- children: selection => [_$ssr(_tmpl$4), " ", messages().statusSelected({
50
- count: selection().count
51
- })]
52
- })), _$escape(_$createComponent(Show, {
53
- get when() {
54
- return mode() === "facts" || mode() === "selection";
55
- },
56
- get children() {
57
- return _$createComponent(For, {
58
- get each() {
59
- return ((mode() === "selection" ? props.selection?.facts : props.facts) ?? []).slice(0, 3);
60
- },
61
- children: fact => _$ssr(_tmpl$5, _$escape(fact.value), _$escape(fact.label))
62
- });
63
- }
64
- })), _$escape(_$createComponent(Show, {
65
- get when() {
66
- return _$memo(() => mode() === "state")() && props.state;
67
- },
68
- children: state => _$ssr(_tmpl$7, _$ssrAttribute("title", _$escape(stateHint(state(), messages().statusNextAttempt), true), false), _$ssrAttribute("class", _$escape(state().icon ?? "ti ti-alert-triangle", true), false), _$escape(state().label), _$escape(_$createComponent(Show, {
69
- get when() {
70
- return present(state().next);
71
- },
72
- get children() {
73
- return _$ssr(_tmpl$6, _$escape(messages().statusNextAttempt), _$escape(state().next));
74
- }
75
- })))
76
- })), _$escape(_$createComponent(Show, {
77
- get when() {
78
- return mode() === "announcement";
79
- },
80
- get children() {
81
- return _$ssr(_tmpl$, _$escape(props.announcement));
82
- }
83
- })), _$escape(_$createComponent(Show, {
84
- get when() {
85
- return _$memo(() => mode() === "selection")() ? present(props.selection?.actions) : present(props.filters);
86
- },
87
- get children() {
88
- return _$ssr(_tmpl$2, mode() === "selection" ? _$escape(props.selection?.actions) : _$escape(props.filters));
89
- }
90
- })), _$escape(props.announcement));
91
- }
92
- export default StatusRow;
93
- //# sourceMappingURL=StatusRow.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":["layout/StatusRow.tsx"],"sourcesContent":["import { For, type JSX, Show } from \"solid-js\";\nimport { useWorkspaceMessages } from \"./workspace-messages\";\n\n/** A key figure of the status row: the number (bold) and what it counts. */\nexport type StatusRowFact = { value: JSX.Element; label: JSX.Element };\n\n/** A page-wide disturbance that needs nobody: the page tries again by itself (K10). */\nexport type StatusRowState = {\n /** What is wrong, in a few words, such as \"Sync paused\". */\n label: JSX.Element;\n /** `warning` (the default) or `danger`; `neutral` for a quiet state such as \"Offline\". */\n tone?: \"neutral\" | \"warning\" | \"danger\";\n /** Tabler icon class inside the round sign, such as `ti ti-refresh`. Defaults to an alert sign. */\n icon?: string;\n /** The time of the next attempt as people read it, such as \"14:05\". Shows as \"next attempt 14:05\". */\n next?: JSX.Element;\n};\n\n/** 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). */\nexport type StatusRowSelection = {\n /** The number of chosen items. A check and \"3 selected\" take the lead statement's place. */\n count: number;\n /** Up to three figures about the chosen items, such as their kinds or total size. */\n facts?: readonly StatusRowFact[];\n /** Actions on the chosen items, usually small buttons. */\n actions?: JSX.Element;\n};\n\nexport type StatusRowProps = {\n /** The lead statement (18 px, bold): what someone wants to know here first. It is never shortened. */\n lead: JSX.Element;\n /** Up to three key figures. Only the first three show; the rest give way in a fixed order when space is short. */\n facts?: readonly StatusRowFact[];\n /** Filters at the end of the row, usually `FilterChip` elements. */\n filters?: JSX.Element;\n /** A disturbance of the whole page; it takes the place of the key figures, the lead statement stays. */\n state?: StatusRowState;\n /** A selection; its count and actions take the place of the key figures and filters. */\n selection?: StatusRowSelection;\n /**\n * What is happening right now in words, announced politely to screen readers and shown in the place of the key\n * figures, such as \"Moving “Invoice 12” to Done\". Drag and drop fills it while an item moves (K7).\n */\n announcement?: JSX.Element;\n /** A hairline under the row, where the row stands above a list without its own column head. */\n line?: boolean;\n class?: string;\n};\n\nconst present = (value: unknown) => value !== undefined && value !== null && value !== false && value !== \"\";\n\n/** The state's hint in words, when its label and time are plain text: what is wrong and the next attempt. */\nconst stateHint = (state: StatusRowState, nextAttempt: string): string | undefined => {\n const label = state.label;\n const next = state.next;\n if (typeof label !== \"string\") return undefined;\n if (!present(next)) return label;\n return typeof next === \"string\" ? `${label} · ${nextAttempt} ${next}` : undefined;\n};\n\n/**\n * The status row (K6, K10): the first line under a column's head, 52 px tall. The lead statement on the left keeps\n * its place and size in every state. Up to three key figures follow it; on the right stand the filters. A selection\n * shows its count and actions in the same places; a disturbance of the page shows a round sign, what is wrong, and\n * the next attempt in the place of the key figures. It shows only data that exists already.\n */\nexport function StatusRow(props: StatusRowProps): JSX.Element {\n const messages = useWorkspaceMessages();\n const mode = () => (props.selection ? \"selection\" : present(props.announcement) ? \"announcement\" : props.state ? \"state\" : \"facts\");\n return (\n <div\n class={`k2b-status-row${props.class ? ` ${props.class}` : \"\"}`}\n data-mode={mode()}\n data-tone={mode() === \"state\" ? (props.state?.tone ?? \"warning\") : undefined}\n data-line={props.line ? \"\" : undefined}\n >\n <p class=\"k2b-status-row__lead\">\n <Show when={props.selection} fallback={props.lead}>\n {(selection) => (\n <>\n <i class=\"ti ti-check\" aria-hidden=\"true\" /> {messages().statusSelected({ count: selection().count })}\n </>\n )}\n </Show>\n </p>\n <div class=\"k2b-status-row__middle\">\n <Show when={mode() === \"facts\" || mode() === \"selection\"}>\n <For each={((mode() === \"selection\" ? props.selection?.facts : props.facts) ?? []).slice(0, 3)}>\n {(fact) => (\n <span class=\"k2b-status-row__fact\">\n <b>{fact.value}</b> {fact.label}\n </span>\n )}\n </For>\n </Show>\n <Show when={mode() === \"state\" && props.state}>\n {(state) => (\n <span\n class=\"k2b-status-row__state\"\n // The whole state stays readable when its label shortens (K15): the hint carries it with its time.\n title={stateHint(state(), messages().statusNextAttempt)}\n >\n <span class=\"k2b-status-row__sign\" aria-hidden=\"true\">\n <i class={state().icon ?? \"ti ti-alert-triangle\"} />\n </span>\n <b>{state().label}</b>\n <Show when={present(state().next)}>\n <span class=\"k2b-status-row__next\">\n <span class=\"k2b-status-row__next-label\">{messages().statusNextAttempt}</span>\n <time class=\"k2b-status-row__time\">{state().next}</time>\n </span>\n </Show>\n </span>\n )}\n </Show>\n <Show when={mode() === \"announcement\"}>\n <span class=\"k2b-status-row__announcement\">{props.announcement}</span>\n </Show>\n </div>\n <Show when={mode() === \"selection\" ? present(props.selection?.actions) : present(props.filters)}>\n <div class=\"k2b-status-row__end\">{mode() === \"selection\" ? props.selection?.actions : props.filters}</div>\n </Show>\n {/* The live region exists from the first frame, so the first announcement is heard. */}\n <span class=\"k2b-sr-only\" aria-live=\"polite\" aria-atomic=\"true\">\n {props.announcement}\n </span>\n </div>\n );\n}\n\nexport default StatusRow;\n"],"mappings":";;;;;;;;;;;;AAAA,SAAS,GAAG,EAAY,IAAI,QAAQ,UAAU;AAC9C,SAAS,oBAAoB,QAAQ,sBAAsB;;AAE3D;;AAGA;;AAYA;;AA+BA,MAAM,OAAO,GAAI,KAAc,IAAK,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,KAAK,IAAI,KAAK,KAAK,EAAE;;AAE5G;AACA,MAAM,SAAS,GAAG,CAAC,KAAqB,EAAE,WAAmB,KAAyB;EACpF,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK;EACzB,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI;EACvB,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,OAAO,SAAS;EAC/C,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,OAA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AAE,CAAC,CAAC;QAAA;QAAA,UAC1F,IAAI,4BAEE,IAAI,CAAC,KAAK,YAAO,IAAI,CAAC,KAAK;MAElC;IAAA;EAAA,gCAGJ,IAAI;IAAA,IAAC,IAAI;MAAA,OAAE,iBAAI,CAAC,CAAC,KAAK,OAAO,OAAI,KAAK,CAAC,KAAK;IAAA;IAAA,UACzC,KAAK,oDAII,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,iBAAiB,CAAC,kDAG3C,KAAK,CAAC,CAAC,CAAC,IAAI,IAAI,sBAAsB,0BAE9C,KAAK,CAAC,CAAC,CAAC,KAAK,8BAChB,IAAI;MAAA,IAAC,IAAI;QAAA,OAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;MAAA;MAAA;QAAA,+BAEa,QAAQ,CAAC,CAAC,CAAC,iBAAiB,YAClC,KAAK,CAAC,CAAC,CAAC,IAAI;MAAA;IAAA;EAIvD,gCAEF,IAAI;IAAA,IAAC,IAAI;MAAA,OAAE,IAAI,CAAC,CAAC,KAAK,cAAc;IAAA;IAAA;MAAA,8BACS,KAAK,CAAC,YAAY;IAAA;EAAA,gCAGjE,IAAI;IAAA,IAAC,IAAI;MAAA,OAAE,iBAAI,CAAC,CAAC,KAAK,WAAW,MAAG,OAAO,CAAC,KAAK,CAAC,SAAS,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC;IAAA;IAAA;MAAA,sBAC3D,IAAI,CAAC,CAAC,KAAK,WAAW,YAAG,KAAK,CAAC,SAAS,EAAE,OAAO,aAAG,KAAK,CAAC,OAAO;IAAA;EAAA,cAIlG,KAAK,CAAC,YAAY;AAI3B;AAEA,eAAe,SAAS","ignoreList":[]}
@@ -1,28 +0,0 @@
1
- import { ssr as _$ssr } from "solid-js/web";
2
- import { escape as _$escape } from "solid-js/web";
3
- import { createComponent as _$createComponent } from "solid-js/web";
4
- var _tmpl$ = ["<div class=\"k2b-panel-dialog__error\" role=\"alert\"><i class=\"ti ti-circle-x\" aria-hidden=\"true\"></i><div class=\"k2b-panel-dialog__error-copy\"><strong>", "</strong>", "</div></div>"],
5
- _tmpl$2 = ["<p>", "</p>"];
6
- import { Show } from "solid-js";
7
- const text = error => typeof error === "string" ? {
8
- title: error
9
- } : error?.title ? error : undefined;
10
-
11
- /**
12
- * The tinted cell of a dialog error, the footer's first row (K10, K16). It loads with the first error, so dialogs
13
- * without one carry none of it; the footer holds its place while the cell comes and goes (`dialog-foot.ts`).
14
- */
15
- export function PanelDialogErrorCell(props) {
16
- return _$createComponent(Show, {
17
- get when() {
18
- return text(props.error());
19
- },
20
- children: error => _$ssr(_tmpl$, _$escape(error().title), _$escape(_$createComponent(Show, {
21
- get when() {
22
- return error().description;
23
- },
24
- children: detail => _$ssr(_tmpl$2, _$escape(detail()))
25
- })))
26
- });
27
- }
28
- //# sourceMappingURL=panel-dialog-error.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":["layout/panel-dialog-error.tsx"],"sourcesContent":["import { type JSX, Show } from \"solid-js\";\nimport type { PanelDialogError } from \"./PanelDialog\";\n\nconst text = (error: PanelDialogError | undefined) => (typeof error === \"string\" ? { title: error } : error?.title ? error : undefined);\n\n/**\n * The tinted cell of a dialog error, the footer's first row (K10, K16). It loads with the first error, so dialogs\n * without one carry none of it; the footer holds its place while the cell comes and goes (`dialog-foot.ts`).\n */\nexport function PanelDialogErrorCell(props: { error: () => PanelDialogError | undefined }): JSX.Element {\n return (\n <Show when={text(props.error())}>\n {(error) => (\n <div class=\"k2b-panel-dialog__error\" role=\"alert\">\n <i class=\"ti ti-circle-x\" aria-hidden=\"true\" />\n <div class=\"k2b-panel-dialog__error-copy\">\n <strong>{error().title}</strong>\n <Show when={error().description}>{(detail) => <p>{detail()}</p>}</Show>\n </div>\n </div>\n )}\n </Show>\n );\n}\n"],"mappings":";;;;;AAAA,SAAmB,IAAI,QAAQ,UAAU;AAGzC,MAAM,IAAI,GAAI,KAAmC,IAAM,OAAO,KAAK,KAAK,QAAQ,GAAG;EAAE,KAAK,EAAE;AAAM,CAAC,GAAG,KAAK,EAAE,KAAK,GAAG,KAAK,GAAG,SAAU;;AAEvI;AACA;AACA;AACA;AACA,OAAO,SAAS,oBAAoB,CAAC,KAAoD,EAAe;EACtG,yBACG,IAAI;IAAA,IAAC,IAAI;MAAA,OAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;IAAA;IAAA,UAC3B,KAAK,2BAIQ,KAAK,CAAC,CAAC,CAAC,KAAK,8BACrB,IAAI;MAAA,IAAC,IAAI;QAAA,OAAE,KAAK,CAAC,CAAC,CAAC,WAAW;MAAA;MAAA,UAAI,MAAM,4BAAS,MAAM,CAAC,CAAC;IAAK;EAGpE;AAGP","ignoreList":[]}
@@ -1,66 +0,0 @@
1
- import { ssr as _$ssr } from "solid-js/web";
2
- import { ssrAttribute as _$ssrAttribute } from "solid-js/web";
3
- import { escape as _$escape } from "solid-js/web";
4
- var _tmpl$ = ["<button type=\"button\" class=\"k2b-bottom-sheet__handle\"", "><span aria-hidden=\"true\"></span></button>"];
5
- import { onCleanup, onMount } from "solid-js";
6
- import { suppressTextSelection } from "../internal/text-selection";
7
- import { useUiMessages } from "../intl/messages";
8
- import { attachSheetMotion } from "./sheet-motion";
9
-
10
- /**
11
- * Asks the dialog to close as Escape does, through its cancel event: its cancel behavior and guard decide. The promise
12
- * settles a frame later only if the sheet is still shown, so a guard that keeps it brings it back; a closed sheet
13
- * fades where it is.
14
- */
15
- const requestClose = (frame, panel) => new Promise(resolve => {
16
- frame.dispatchEvent(new Event("cancel", {
17
- cancelable: true
18
- }));
19
- requestAnimationFrame(() => {
20
- if (frame.open && panel.isConnected && panel.offsetParent !== null) resolve();
21
- });
22
- });
23
-
24
- /**
25
- * The grip of a `PanelDialog` that opened as a sheet below 48rem (K13, K16): the finger pulls the sheet down to close
26
- * it, a tap closes it, and it moves like a `BottomSheet`. `PanelDialog` renders it only when it opens on a phone.
27
- */
28
- export function PanelSheetHandle(props) {
29
- const messages = useUiMessages();
30
- let handle;
31
- let motion;
32
- let releaseTextSelection;
33
- onMount(() => {
34
- const panel = handle.parentElement;
35
- if (!panel) return;
36
- const own = attachSheetMotion({
37
- frame: props.frame,
38
- panel,
39
- handle,
40
- detents: false,
41
- canDismiss: () => true,
42
- dismiss: () => requestClose(props.frame, panel)
43
- });
44
- motion = own;
45
- queueMicrotask(() => own.open());
46
- // Turned to 48rem and wider, the dialog is centered again: the sheet's motion lets go of the frame.
47
- const wide = window.matchMedia("(min-width: 48rem)");
48
- const release = () => {
49
- if (!wide.matches) return;
50
- motion?.dispose();
51
- motion = undefined;
52
- };
53
- wide.addEventListener("change", release);
54
- onCleanup(() => wide.removeEventListener("change", release));
55
- });
56
- onCleanup(() => {
57
- releaseTextSelection?.();
58
- motion?.dispose();
59
- });
60
- const release = () => {
61
- releaseTextSelection?.();
62
- releaseTextSelection = undefined;
63
- };
64
- return _$ssr(_tmpl$, _$ssrAttribute("aria-label", _$escape(messages().close, true), false));
65
- }
66
- //# sourceMappingURL=panel-sheet-handle.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":["layout/panel-sheet-handle.tsx"],"sourcesContent":["import { type JSX, onCleanup, onMount } from \"solid-js\";\nimport { suppressTextSelection } from \"../internal/text-selection\";\nimport { useUiMessages } from \"../intl/messages\";\nimport { attachSheetMotion, type SheetMotion } from \"./sheet-motion\";\n\n/**\n * Asks the dialog to close as Escape does, through its cancel event: its cancel behavior and guard decide. The promise\n * settles a frame later only if the sheet is still shown, so a guard that keeps it brings it back; a closed sheet\n * fades where it is.\n */\nconst requestClose = (frame: HTMLDialogElement, panel: HTMLElement) =>\n new Promise<void>((resolve) => {\n frame.dispatchEvent(new Event(\"cancel\", { cancelable: true }));\n requestAnimationFrame(() => {\n if (frame.open && panel.isConnected && panel.offsetParent !== null) resolve();\n });\n });\n\n/**\n * The grip of a `PanelDialog` that opened as a sheet below 48rem (K13, K16): the finger pulls the sheet down to close\n * it, a tap closes it, and it moves like a `BottomSheet`. `PanelDialog` renders it only when it opens on a phone.\n */\nexport function PanelSheetHandle(props: { frame: HTMLDialogElement }): JSX.Element {\n const messages = useUiMessages();\n let handle!: HTMLButtonElement;\n let motion: SheetMotion | undefined;\n let releaseTextSelection: (() => void) | undefined;\n onMount(() => {\n const panel = handle.parentElement;\n if (!panel) return;\n const own = attachSheetMotion({\n frame: props.frame,\n panel,\n handle,\n detents: false,\n canDismiss: () => true,\n dismiss: () => requestClose(props.frame, panel),\n });\n motion = own;\n queueMicrotask(() => own.open());\n // Turned to 48rem and wider, the dialog is centered again: the sheet's motion lets go of the frame.\n const wide = window.matchMedia(\"(min-width: 48rem)\");\n const release = () => {\n if (!wide.matches) return;\n motion?.dispose();\n motion = undefined;\n };\n wide.addEventListener(\"change\", release);\n onCleanup(() => wide.removeEventListener(\"change\", release));\n });\n onCleanup(() => {\n releaseTextSelection?.();\n motion?.dispose();\n });\n const release = () => {\n releaseTextSelection?.();\n releaseTextSelection = undefined;\n };\n return (\n <button\n ref={handle}\n type=\"button\"\n class=\"k2b-bottom-sheet__handle\"\n aria-label={messages().close}\n onPointerDown={(event) => {\n if (!event.isPrimary || event.button !== 0) return;\n release();\n releaseTextSelection = suppressTextSelection(event.pointerId);\n }}\n onPointerUp={release}\n onPointerCancel={release}\n onClick={() => motion?.press()}\n >\n <span aria-hidden=\"true\" />\n </button>\n );\n}\n"],"mappings":";;;;AAAA,SAAmB,SAAS,EAAE,OAAO,QAAQ,UAAU;AACvD,SAAS,qBAAqB,QAAQ,4BAA4B;AAClE,SAAS,aAAa,QAAQ,kBAAkB;AAChD,SAAS,iBAAiB,QAA0B,gBAAgB;;AAEpE;AACA;AACA;AACA;AACA;AACA,MAAM,YAAY,GAAG,CAAC,KAAwB,EAAE,KAAkB,KAChE,IAAI,OAAO,CAAQ,OAAO,IAAK;EAC7B,KAAK,CAAC,aAAa,CAAC,IAAI,KAAK,C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AAG,CAAC;IACxB,MAAM,EAAE,OAAO,CAAC,CAAC;EACnB,CAAC,CAAC;EACF,MAAM,OAAO,GAAG,MAAM;IACpB,oBAAoB,GAAG,CAAC;IACxB,oBAAoB,GAAG,SAAS;EAClC,CAAC;EACD,2DAKgB,QAAQ,CAAC,CAAC,CAAC,KAAK;AAalC","ignoreList":[]}
@@ -1,232 +0,0 @@
1
- /**
2
- * The layout self-check of Cloud flach (K15), the mockups' `?check=1` as a function for browser tests. It finds
3
- * siblings in a flex or grid box that overlap, content that spills out of its box, text that is cut without an
4
- * ellipsis or a fade, a double line (two parallel visible borders that touch or lie at most 1 px apart, also across
5
- * components; "one line, one owner", K2), a line break by scrollbar, and a page that scrolls sideways.
6
- *
7
- * A line break by scrollbar (Valentin 21.11.: "dass durch eine Scrollbar plötzlich Platz eingenommen wird und dann
8
- * Linien nicht mehr verbunden sind in einer Tabelle") is a head cell that does not stand over its body cells within
9
- * 0.5 px, also when head and body sit in two tables, or a gap between neighbouring head cells, so a line through the
10
- * head breaks.
11
- *
12
- * It runs in the page: pass it to Playwright's `page.evaluate`, so it closes over nothing and needs no other module.
13
- * Check each width in its own test:
14
- *
15
- * ```ts
16
- * import { layoutProblems } from "@k2b/ui/layout-check";
17
- *
18
- * for (const width of [390, 768, 1440, 1920])
19
- * test(`${width} px: nothing overlaps, spills, or is cut`, async () => {
20
- * await page.setViewportSize({ width, height: 900 });
21
- * expect((await page.evaluate(layoutProblems, { root: "#app" })).problems).toEqual([]);
22
- * });
23
- * ```
24
- *
25
- * Limits, as in the mockups: it does not see what runs out of the bottom of a scroll area, nor what a floating layer
26
- * covers; a review checks those. A box whose children overlap on purpose (an avatar stack) is listed in `ignore`, or
27
- * carries `data-layout-check="skip"`. A touch hit area (an empty, invisible, positioned `::before` or `::after` that
28
- * reaches past a small control) is no spill and no cut; it needs no exception.
29
- */
30
-
31
- export function layoutProblems(options = {}) {
32
- const root = options.root ? document.querySelector(options.root) : document.body;
33
- if (!root) return {
34
- overlap: [],
35
- spill: [],
36
- cut: [],
37
- double: [],
38
- scrollbar: [],
39
- sideways: false,
40
- problems: [`no element matches ${options.root}`]
41
- };
42
- const ignore = options.ignore ?? ".k2b-avatar-stack, [data-layout-check='skip']";
43
- const slack = options.slack ?? 7;
44
- // A visually hidden box (1 px, clipped, such as `.k2b-sr-only` or a head the sidebar makes redundant) keeps its
45
- // content for screen readers on purpose; nothing inside it is laid out for the eye.
46
- const hidden = new Map();
47
- const visuallyHidden = element => {
48
- if (!element || element === document.documentElement) return false;
49
- const known = hidden.get(element);
50
- if (known !== undefined) return known;
51
- const style = getComputedStyle(element);
52
- const rect = element.getBoundingClientRect();
53
- // A clipped or overflow-hidden box of at most 1 px, such as `.k2b-sr-only` or the primary action's label in a head.
54
- const clipped = (style.clipPath === "inset(50%)" || style.clip === "rect(0px, 0px, 0px, 0px)" || ["hidden", "clip"].includes(style.overflowX)) && (rect.width <= 1 || rect.height <= 1);
55
- const result = clipped || visuallyHidden(element.parentElement);
56
- hidden.set(element, result);
57
- return result;
58
- };
59
- const seen = element => {
60
- const rect = element.getBoundingClientRect();
61
- return rect.width > 0 && rect.height > 0 && element.checkVisibility({
62
- visibilityProperty: true,
63
- opacityProperty: true
64
- }) && !visuallyHidden(element);
65
- };
66
- // A box that sticks or floats lies above the flow on purpose.
67
- const inFlow = element => !["absolute", "fixed", "sticky"].includes(getComputedStyle(element).position);
68
- // `display: contents` boxes draw nothing; their children take part in the layout.
69
- const drawn = element => getComputedStyle(element).display === "contents" ? Array.from(element.children).flatMap(drawn) : [element];
70
- const name = element => {
71
- const probe = element.getAttribute("data-probe");
72
- if (probe) return `[data-probe="${probe}"]`;
73
- const classes = typeof element.className === "string" ? element.className.trim().split(/\s+/).filter(Boolean).slice(0, 3) : [];
74
- const text = element.textContent?.trim().replace(/\s+/g, " ").slice(0, 24);
75
- return `${element.tagName.toLowerCase()}${classes.map(c => `.${c}`).join("")}${text ? ` "${text}"` : ""}`;
76
- };
77
- // A touch hit area is an empty, invisible, positioned pseudo-element that reaches past its control on purpose, such as
78
- // the 44 px tap area of a small button on a coarse pointer. Overflow that only hit areas cause is no spill and no cut.
79
- // Any other positioned pseudo-element that draws (text, a fill, a border, a shadow) still counts.
80
- const transparent = color => color === "transparent" || /^rgba\(.*,\s*0\)$/.test(color);
81
- const drawsBeyond = element => ["::before", "::after"].some(which => {
82
- const pseudo = getComputedStyle(element, which);
83
- if (pseudo.content === "none" || pseudo.content === "normal" || !["absolute", "fixed"].includes(pseudo.position)) return false;
84
- const drawn = pseudo.content !== '""' || !transparent(pseudo.backgroundColor) || pseudo.backgroundImage !== "none" || pseudo.boxShadow !== "none" || ["Top", "Right", "Bottom", "Left"].some(side => Number.parseFloat(pseudo.getPropertyValue(`border-${side.toLowerCase()}-width`)) > 0);
85
- return drawn;
86
- });
87
- const onlyHitAreas = box => {
88
- const own = box.getBoundingClientRect();
89
- const left = own.left + box.clientLeft - slack;
90
- const right = own.left + box.clientLeft + box.clientWidth + slack;
91
- // What a person sees: every element and every run of text, except what a visually hidden box keeps for screen
92
- // readers (its text runs on unclipped in the layout, but nobody sees it, so it is no reason to report a hit area).
93
- const reaches = Array.from(box.querySelectorAll("*")).filter(element => !visuallyHidden(element)).map(element => element.getBoundingClientRect());
94
- const texts = document.createTreeWalker(box, NodeFilter.SHOW_TEXT);
95
- for (let text = texts.nextNode(); text; text = texts.nextNode()) {
96
- if (!text.textContent?.trim() || visuallyHidden(text.parentElement)) continue;
97
- const range = document.createRange();
98
- range.selectNodeContents(text);
99
- reaches.push(range.getBoundingClientRect());
100
- }
101
- if (reaches.some(rect => rect.width > 0 && (rect.left < left || rect.right > right))) return false;
102
- return ![box, ...Array.from(box.querySelectorAll("*"))].some(drawsBeyond);
103
- };
104
- const found = {
105
- overlap: [],
106
- spill: [],
107
- cut: []
108
- };
109
- for (const box of [root, ...Array.from(root.querySelectorAll("*"))]) {
110
- if (!(box instanceof HTMLElement) || !seen(box) || box.closest(ignore)) continue;
111
- const style = getComputedStyle(box);
112
- if (/flex|grid/.test(style.display)) {
113
- const children = Array.from(box.children).flatMap(drawn)
114
- // An ignored box also takes no part as a sibling, such as a grip that lies over its column on purpose (K13).
115
- .filter(child => seen(child) && inFlow(child) && !child.matches(ignore));
116
- for (const [index, a] of children.entries()) for (const b of children.slice(index + 1)) {
117
- const x = a.getBoundingClientRect();
118
- const y = b.getBoundingClientRect();
119
- const width = Math.min(x.right, y.right) - Math.max(x.left, y.left);
120
- const height = Math.min(x.bottom, y.bottom) - Math.max(x.top, y.top);
121
- if (width > 1.5 && height > 1.5) found.overlap.push(`${name(b)} overlaps ${name(a)} by ${Math.round(width)}x${Math.round(height)}`);
122
- }
123
- }
124
- // Text for screen readers only (a 1 px clipped box, such as `.k2b-sr-only`) is hidden on purpose, not cut.
125
- if (box.clientWidth > 1 && box.clientHeight > 1 && box.scrollWidth > box.clientWidth + slack && !onlyHitAreas(box)) {
126
- const masked = style.maskImage !== "none" && style.maskImage !== "";
127
- // Only a sideways scroller lets a person reach content that is too wide. `overflow-y: auto` alone already
128
- // computes `overflow-x` to auto; an explicit `overflow-x: hidden` beside it cuts the content.
129
- const scrolls = style.overflowX === "auto" || style.overflowX === "scroll";
130
- if (style.overflowX === "visible") found.spill.push(`${name(box)} spills ${box.scrollWidth - box.clientWidth} px out of its box`);else if (!scrolls && style.textOverflow !== "ellipsis" && !masked) found.cut.push(`${name(box)} is cut by ${box.scrollWidth - box.clientWidth} px without an ellipsis or a fade`);
131
- }
132
- }
133
- // Double lines: every visible border side is a band; two parallel bands of different elements that overlap along
134
- // their length and lie at most 1 px apart across it read as one thick or doubled line. Only `border-*` counts, with
135
- // a width above 0, a drawing style, and a colour that is not transparent: focus rings and outlines are no borders.
136
-
137
- const bands = {
138
- horizontal: [],
139
- vertical: []
140
- };
141
- for (const element of [root, ...Array.from(root.querySelectorAll("*"))]) {
142
- if (!seen(element) || element.closest(ignore)) continue;
143
- const style = getComputedStyle(element);
144
- const rect = element.getBoundingClientRect();
145
- for (const side of ["top", "bottom", "left", "right"]) {
146
- const width = Number.parseFloat(style.getPropertyValue(`border-${side}-width`));
147
- const line = style.getPropertyValue(`border-${side}-style`);
148
- const color = style.getPropertyValue(`border-${side}-color`).replace(/\s+/g, "");
149
- if (!(width > 0) || line === "none" || line === "hidden" || color === "transparent" || /,0\)$|\/0\)$/.test(color)) continue;
150
- if (side === "top") bands.horizontal.push({
151
- element,
152
- side,
153
- across0: rect.top,
154
- across1: rect.top + width,
155
- along0: rect.left,
156
- along1: rect.right
157
- });
158
- if (side === "bottom") bands.horizontal.push({
159
- element,
160
- side,
161
- across0: rect.bottom - width,
162
- across1: rect.bottom,
163
- along0: rect.left,
164
- along1: rect.right
165
- });
166
- if (side === "left") bands.vertical.push({
167
- element,
168
- side,
169
- across0: rect.left,
170
- across1: rect.left + width,
171
- along0: rect.top,
172
- along1: rect.bottom
173
- });
174
- if (side === "right") bands.vertical.push({
175
- element,
176
- side,
177
- across0: rect.right - width,
178
- across1: rect.right,
179
- along0: rect.top,
180
- along1: rect.bottom
181
- });
182
- }
183
- }
184
- // Cells of a collapsed table share one border; the engine reports it on both.
185
- const collapsedPair = (a, b) => {
186
- const table = a.closest("table");
187
- return !!table && table === b.closest("table") && getComputedStyle(table).borderCollapse === "collapse";
188
- };
189
- const double = [];
190
- for (const list of [bands.horizontal, bands.vertical]) {
191
- list.sort((a, b) => a.across0 - b.across0);
192
- for (const [index, a] of list.entries()) for (const b of list.slice(index + 1)) {
193
- if (b.across0 - a.across1 > 1) break;
194
- if (a.element === b.element || collapsedPair(a.element, b.element)) continue;
195
- const shared = Math.min(a.along1, b.along1) - Math.max(a.along0, b.along0);
196
- if (shared > 1) double.push(`double line: ${name(a.element)} ${a.side} and ${name(b.element)} ${b.side} at ${Math.round(a.across0)} px over ${Math.round(shared)} px`);
197
- }
198
- }
199
- // Line break by scrollbar: the cells of a head row and of a body row with as many cells share their edges. A table
200
- // with a head and no body rows is a head of its own; its body is the next table with rows and no head.
201
- const scrollbar = [];
202
- const shownCells = row => Array.from(row.children).filter(cell => seen(cell));
203
- const plainRow = (row, count) => seen(row) && shownCells(row).length === count && shownCells(row).every(cell => cell.colSpan <= 1);
204
- const tables = Array.from(root.querySelectorAll("table")).filter(table => seen(table) && !table.closest(ignore));
205
- for (const [index, table] of tables.entries()) {
206
- const head = table.querySelector(":scope > thead > tr");
207
- if (!head || !seen(head)) continue;
208
- const cells = shownCells(head);
209
- if (cells.length === 0) continue;
210
- const bodyOf = owner => Array.from(owner.querySelectorAll(":scope > tbody > tr")).find(row => plainRow(row, cells.length));
211
- const body = bodyOf(table) ?? tables.slice(index + 1).filter(next => !next.querySelector(":scope > thead > tr")).map(bodyOf).find(Boolean);
212
- const edges = cells.map(cell => cell.getBoundingClientRect());
213
- for (let k = 1; k < edges.length; k++) if (edges[k].left - edges[k - 1].right > 0.5) scrollbar.push(`line break by scrollbar: ${name(table)} head line has a ${Math.round(edges[k].left - edges[k - 1].right)} px gap before column ${k + 1}`);
214
- if (!body) continue;
215
- const below = shownCells(body).map(cell => cell.getBoundingClientRect());
216
- for (const [k, top] of edges.entries()) {
217
- const shift = Math.max(Math.abs(top.left - below[k].left), Math.abs(top.right - below[k].right));
218
- if (shift > 0.5) scrollbar.push(`line break by scrollbar: column ${k + 1} of ${name(table)} stands ${Math.round(shift * 10) / 10} px off its body cells`);
219
- }
220
- }
221
- const page = document.scrollingElement ?? document.documentElement;
222
- const sideways = page.scrollWidth > window.innerWidth + 1;
223
- const problems = [...found.overlap, ...found.spill, ...found.cut, ...double, ...scrollbar, ...(sideways ? [`the page scrolls sideways (${page.scrollWidth} px)`] : [])];
224
- return {
225
- ...found,
226
- double,
227
- scrollbar,
228
- sideways,
229
- problems
230
- };
231
- }
232
- //# sourceMappingURL=layout-check.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":["layout-check.ts"],"sourcesContent":["/**\n * The layout self-check of Cloud flach (K15), the mockups' `?check=1` as a function for browser tests. It finds\n * siblings in a flex or grid box that overlap, content that spills out of its box, text that is cut without an\n * ellipsis or a fade, a double line (two parallel visible borders that touch or lie at most 1 px apart, also across\n * components; \"one line, one owner\", K2), a line break by scrollbar, and a page that scrolls sideways.\n *\n * A line break by scrollbar (Valentin 21.11.: \"dass durch eine Scrollbar plötzlich Platz eingenommen wird und dann\n * Linien nicht mehr verbunden sind in einer Tabelle\") is a head cell that does not stand over its body cells within\n * 0.5 px, also when head and body sit in two tables, or a gap between neighbouring head cells, so a line through the\n * head breaks.\n *\n * It runs in the page: pass it to Playwright's `page.evaluate`, so it closes over nothing and needs no other module.\n * Check each width in its own test:\n *\n * ```ts\n * import { layoutProblems } from \"@k2b/ui/layout-check\";\n *\n * for (const width of [390, 768, 1440, 1920])\n * test(`${width} px: nothing overlaps, spills, or is cut`, async () => {\n * await page.setViewportSize({ width, height: 900 });\n * expect((await page.evaluate(layoutProblems, { root: \"#app\" })).problems).toEqual([]);\n * });\n * ```\n *\n * Limits, as in the mockups: it does not see what runs out of the bottom of a scroll area, nor what a floating layer\n * covers; a review checks those. A box whose children overlap on purpose (an avatar stack) is listed in `ignore`, or\n * carries `data-layout-check=\"skip\"`. A touch hit area (an empty, invisible, positioned `::before` or `::after` that\n * reaches past a small control) is no spill and no cut; it needs no exception.\n */\n\nexport type LayoutProblemOptions = {\n /** The element to check; the whole document by default. */\n root?: string;\n /** Boxes whose children overlap or clip on purpose, or that lie over a sibling on purpose; they and everything inside them are skipped. */\n ignore?: string;\n /**\n * How far content may reach past its box before it counts, in px. 7 as in the mockups: an icon button at a column\n * edge is pulled out by 6 px on purpose (K5).\n */\n slack?: number;\n};\n\nexport type LayoutProblems = {\n overlap: string[];\n spill: string[];\n cut: string[];\n double: string[];\n /** Head and body columns that do not line up, or a head line with a gap: the scrollbar took room in one of them. */\n scrollbar: string[];\n sideways: boolean;\n /** Every problem as one readable line; empty when the page is clean. */\n problems: string[];\n};\n\nexport function layoutProblems(options: LayoutProblemOptions = {}): LayoutProblems {\n const root = options.root ? document.querySelector(options.root) : document.body;\n if (!root)\n return {\n overlap: [],\n spill: [],\n cut: [],\n double: [],\n scrollbar: [],\n sideways: false,\n problems: [`no element matches ${options.root}`],\n };\n const ignore = options.ignore ?? \".k2b-avatar-stack, [data-layout-check='skip']\";\n const slack = options.slack ?? 7;\n // A visually hidden box (1 px, clipped, such as `.k2b-sr-only` or a head the sidebar makes redundant) keeps its\n // content for screen readers on purpose; nothing inside it is laid out for the eye.\n const hidden = new Map<Element, boolean>();\n const visuallyHidden = (element: Element | null): boolean => {\n if (!element || element === document.documentElement) return false;\n const known = hidden.get(element);\n if (known !== undefined) return known;\n const style = getComputedStyle(element);\n const rect = element.getBoundingClientRect();\n // A clipped or overflow-hidden box of at most 1 px, such as `.k2b-sr-only` or the primary action's label in a head.\n const clipped =\n (style.clipPath === \"inset(50%)\" || style.clip === \"rect(0px, 0px, 0px, 0px)\" || [\"hidden\", \"clip\"].includes(style.overflowX)) &&\n (rect.width <= 1 || rect.height <= 1);\n const result = clipped || visuallyHidden(element.parentElement);\n hidden.set(element, result);\n return result;\n };\n const seen = (element: Element) => {\n const rect = element.getBoundingClientRect();\n return (\n rect.width > 0 &&\n rect.height > 0 &&\n element.checkVisibility({ visibilityProperty: true, opacityProperty: true }) &&\n !visuallyHidden(element)\n );\n };\n // A box that sticks or floats lies above the flow on purpose.\n const inFlow = (element: Element) => ![\"absolute\", \"fixed\", \"sticky\"].includes(getComputedStyle(element).position);\n // `display: contents` boxes draw nothing; their children take part in the layout.\n const drawn = (element: Element): Element[] =>\n getComputedStyle(element).display === \"contents\" ? Array.from(element.children).flatMap(drawn) : [element];\n const name = (element: Element) => {\n const probe = element.getAttribute(\"data-probe\");\n if (probe) return `[data-probe=\"${probe}\"]`;\n const classes = typeof element.className === \"string\" ? element.className.trim().split(/\\s+/).filter(Boolean).slice(0, 3) : [];\n const text = element.textContent?.trim().replace(/\\s+/g, \" \").slice(0, 24);\n return `${element.tagName.toLowerCase()}${classes.map((c) => `.${c}`).join(\"\")}${text ? ` \"${text}\"` : \"\"}`;\n };\n // A touch hit area is an empty, invisible, positioned pseudo-element that reaches past its control on purpose, such as\n // the 44 px tap area of a small button on a coarse pointer. Overflow that only hit areas cause is no spill and no cut.\n // Any other positioned pseudo-element that draws (text, a fill, a border, a shadow) still counts.\n const transparent = (color: string) => color === \"transparent\" || /^rgba\\(.*,\\s*0\\)$/.test(color);\n const drawsBeyond = (element: Element) =>\n ([\"::before\", \"::after\"] as const).some((which) => {\n const pseudo = getComputedStyle(element, which);\n if (pseudo.content === \"none\" || pseudo.content === \"normal\" || ![\"absolute\", \"fixed\"].includes(pseudo.position)) return false;\n const drawn =\n pseudo.content !== '\"\"' ||\n !transparent(pseudo.backgroundColor) ||\n pseudo.backgroundImage !== \"none\" ||\n pseudo.boxShadow !== \"none\" ||\n [\"Top\", \"Right\", \"Bottom\", \"Left\"].some(\n (side) => Number.parseFloat(pseudo.getPropertyValue(`border-${side.toLowerCase()}-width`)) > 0,\n );\n return drawn;\n });\n const onlyHitAreas = (box: HTMLElement) => {\n const own = box.getBoundingClientRect();\n const left = own.left + box.clientLeft - slack;\n const right = own.left + box.clientLeft + box.clientWidth + slack;\n // What a person sees: every element and every run of text, except what a visually hidden box keeps for screen\n // readers (its text runs on unclipped in the layout, but nobody sees it, so it is no reason to report a hit area).\n const reaches = Array.from(box.querySelectorAll(\"*\"))\n .filter((element) => !visuallyHidden(element))\n .map((element) => element.getBoundingClientRect());\n const texts = document.createTreeWalker(box, NodeFilter.SHOW_TEXT);\n for (let text = texts.nextNode(); text; text = texts.nextNode()) {\n if (!text.textContent?.trim() || visuallyHidden(text.parentElement)) continue;\n const range = document.createRange();\n range.selectNodeContents(text);\n reaches.push(range.getBoundingClientRect());\n }\n if (reaches.some((rect) => rect.width > 0 && (rect.left < left || rect.right > right))) return false;\n return ![box, ...Array.from(box.querySelectorAll(\"*\"))].some(drawsBeyond);\n };\n const found = { overlap: [] as string[], spill: [] as string[], cut: [] as string[] };\n for (const box of [root, ...Array.from(root.querySelectorAll(\"*\"))]) {\n if (!(box instanceof HTMLElement) || !seen(box) || box.closest(ignore)) continue;\n const style = getComputedStyle(box);\n if (/flex|grid/.test(style.display)) {\n const children = Array.from(box.children)\n .flatMap(drawn)\n // An ignored box also takes no part as a sibling, such as a grip that lies over its column on purpose (K13).\n .filter((child) => seen(child) && inFlow(child) && !child.matches(ignore));\n for (const [index, a] of children.entries())\n for (const b of children.slice(index + 1)) {\n const x = a.getBoundingClientRect();\n const y = b.getBoundingClientRect();\n const width = Math.min(x.right, y.right) - Math.max(x.left, y.left);\n const height = Math.min(x.bottom, y.bottom) - Math.max(x.top, y.top);\n if (width > 1.5 && height > 1.5)\n found.overlap.push(`${name(b)} overlaps ${name(a)} by ${Math.round(width)}x${Math.round(height)}`);\n }\n }\n // Text for screen readers only (a 1 px clipped box, such as `.k2b-sr-only`) is hidden on purpose, not cut.\n if (box.clientWidth > 1 && box.clientHeight > 1 && box.scrollWidth > box.clientWidth + slack && !onlyHitAreas(box)) {\n const masked = style.maskImage !== \"none\" && style.maskImage !== \"\";\n // Only a sideways scroller lets a person reach content that is too wide. `overflow-y: auto` alone already\n // computes `overflow-x` to auto; an explicit `overflow-x: hidden` beside it cuts the content.\n const scrolls = style.overflowX === \"auto\" || style.overflowX === \"scroll\";\n if (style.overflowX === \"visible\") found.spill.push(`${name(box)} spills ${box.scrollWidth - box.clientWidth} px out of its box`);\n else if (!scrolls && style.textOverflow !== \"ellipsis\" && !masked)\n found.cut.push(`${name(box)} is cut by ${box.scrollWidth - box.clientWidth} px without an ellipsis or a fade`);\n }\n }\n // Double lines: every visible border side is a band; two parallel bands of different elements that overlap along\n // their length and lie at most 1 px apart across it read as one thick or doubled line. Only `border-*` counts, with\n // a width above 0, a drawing style, and a colour that is not transparent: focus rings and outlines are no borders.\n type Band = { element: Element; side: string; across0: number; across1: number; along0: number; along1: number };\n const bands = { horizontal: [] as Band[], vertical: [] as Band[] };\n for (const element of [root, ...Array.from(root.querySelectorAll(\"*\"))]) {\n if (!seen(element) || element.closest(ignore)) continue;\n const style = getComputedStyle(element);\n const rect = element.getBoundingClientRect();\n for (const side of [\"top\", \"bottom\", \"left\", \"right\"] as const) {\n const width = Number.parseFloat(style.getPropertyValue(`border-${side}-width`));\n const line = style.getPropertyValue(`border-${side}-style`);\n const color = style.getPropertyValue(`border-${side}-color`).replace(/\\s+/g, \"\");\n if (!(width > 0) || line === \"none\" || line === \"hidden\" || color === \"transparent\" || /,0\\)$|\\/0\\)$/.test(color)) continue;\n if (side === \"top\")\n bands.horizontal.push({ element, side, across0: rect.top, across1: rect.top + width, along0: rect.left, along1: rect.right });\n if (side === \"bottom\")\n bands.horizontal.push({ element, side, across0: rect.bottom - width, across1: rect.bottom, along0: rect.left, along1: rect.right });\n if (side === \"left\")\n bands.vertical.push({ element, side, across0: rect.left, across1: rect.left + width, along0: rect.top, along1: rect.bottom });\n if (side === \"right\")\n bands.vertical.push({ element, side, across0: rect.right - width, across1: rect.right, along0: rect.top, along1: rect.bottom });\n }\n }\n // Cells of a collapsed table share one border; the engine reports it on both.\n const collapsedPair = (a: Element, b: Element) => {\n const table = a.closest(\"table\");\n return !!table && table === b.closest(\"table\") && getComputedStyle(table).borderCollapse === \"collapse\";\n };\n const double: string[] = [];\n for (const list of [bands.horizontal, bands.vertical]) {\n list.sort((a, b) => a.across0 - b.across0);\n for (const [index, a] of list.entries())\n for (const b of list.slice(index + 1)) {\n if (b.across0 - a.across1 > 1) break;\n if (a.element === b.element || collapsedPair(a.element, b.element)) continue;\n const shared = Math.min(a.along1, b.along1) - Math.max(a.along0, b.along0);\n if (shared > 1)\n double.push(\n `double line: ${name(a.element)} ${a.side} and ${name(b.element)} ${b.side} at ${Math.round(a.across0)} px over ${Math.round(shared)} px`,\n );\n }\n }\n // Line break by scrollbar: the cells of a head row and of a body row with as many cells share their edges. A table\n // with a head and no body rows is a head of its own; its body is the next table with rows and no head.\n const scrollbar: string[] = [];\n const shownCells = (row: Element) => Array.from(row.children).filter((cell) => seen(cell));\n const plainRow = (row: Element, count: number) =>\n seen(row) && shownCells(row).length === count && shownCells(row).every((cell) => (cell as HTMLTableCellElement).colSpan <= 1);\n const tables = Array.from(root.querySelectorAll(\"table\")).filter((table) => seen(table) && !table.closest(ignore));\n for (const [index, table] of tables.entries()) {\n const head = table.querySelector(\":scope > thead > tr\");\n if (!head || !seen(head)) continue;\n const cells = shownCells(head);\n if (cells.length === 0) continue;\n const bodyOf = (owner: Element) => Array.from(owner.querySelectorAll(\":scope > tbody > tr\")).find((row) => plainRow(row, cells.length));\n const body =\n bodyOf(table) ??\n tables\n .slice(index + 1)\n .filter((next) => !next.querySelector(\":scope > thead > tr\"))\n .map(bodyOf)\n .find(Boolean);\n const edges = cells.map((cell) => cell.getBoundingClientRect());\n for (let k = 1; k < edges.length; k++)\n if (edges[k]!.left - edges[k - 1]!.right > 0.5)\n scrollbar.push(\n `line break by scrollbar: ${name(table)} head line has a ${Math.round(edges[k]!.left - edges[k - 1]!.right)} px gap before column ${k + 1}`,\n );\n if (!body) continue;\n const below = shownCells(body).map((cell) => cell.getBoundingClientRect());\n for (const [k, top] of edges.entries()) {\n const shift = Math.max(Math.abs(top.left - below[k]!.left), Math.abs(top.right - below[k]!.right));\n if (shift > 0.5)\n scrollbar.push(\n `line break by scrollbar: column ${k + 1} of ${name(table)} stands ${Math.round(shift * 10) / 10} px off its body cells`,\n );\n }\n }\n const page = document.scrollingElement ?? document.documentElement;\n const sideways = page.scrollWidth > window.innerWidth + 1;\n const problems = [\n ...found.overlap,\n ...found.spill,\n ...found.cut,\n ...double,\n ...scrollbar,\n ...(sideways ? [`the page scrolls sideways (${page.scrollWidth} px)`] : []),\n ];\n return { ...found, double, scrollbar, sideways, problems };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AA0BA,OAAO,SAAS,cAAc,CAAC,OA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