@k2b/ui 0.64.0 → 0.66.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (319) hide show
  1. package/README.md +47 -0
  2. package/dist/base.css +3 -6
  3. package/dist/browser/actions/ContextMenu.js +1 -3
  4. package/dist/browser/actions/ContextMenu.js.map +1 -1
  5. package/dist/browser/actions/Dropdown.js +15 -69
  6. package/dist/browser/actions/Dropdown.js.map +1 -1
  7. package/dist/browser/actions/SortableList.js +1 -1
  8. package/dist/browser/actions/SortableList.js.map +1 -1
  9. package/dist/browser/actions/ViewTabs.js +5 -9
  10. package/dist/browser/actions/ViewTabs.js.map +1 -1
  11. package/dist/browser/actions/drag-and-drop.js +1 -1
  12. package/dist/browser/actions/drag-and-drop.js.map +1 -1
  13. package/dist/browser/actions/index.js.map +1 -1
  14. package/dist/browser/actions/menu-sheet.js +18 -80
  15. package/dist/browser/actions/menu-sheet.js.map +1 -1
  16. package/dist/browser/content/DataTable.js +197 -285
  17. package/dist/browser/content/DataTable.js.map +1 -1
  18. package/dist/browser/content/MessageRow.js +139 -115
  19. package/dist/browser/content/MessageRow.js.map +1 -1
  20. package/dist/browser/content/ProgressPath.js +25 -30
  21. package/dist/browser/content/ProgressPath.js.map +1 -1
  22. package/dist/browser/content/index.js +0 -2
  23. package/dist/browser/content/index.js.map +1 -1
  24. package/dist/browser/feedback/dialog-core.js +0 -11
  25. package/dist/browser/feedback/dialog-core.js.map +1 -1
  26. package/dist/browser/internal/field.js +2 -2
  27. package/dist/browser/internal/field.js.map +1 -1
  28. package/dist/browser/intl/messages.js +1 -1
  29. package/dist/browser/intl/messages.js.map +1 -1
  30. package/dist/browser/layout/AppWorkspace.js +8 -16
  31. package/dist/browser/layout/AppWorkspace.js.map +1 -1
  32. package/dist/browser/layout/Breadcrumbs.js +42 -188
  33. package/dist/browser/layout/Breadcrumbs.js.map +1 -1
  34. package/dist/browser/layout/DetailPanel.js +205 -209
  35. package/dist/browser/layout/DetailPanel.js.map +1 -1
  36. package/dist/browser/layout/PanelDialog.js +88 -176
  37. package/dist/browser/layout/PanelDialog.js.map +1 -1
  38. package/dist/browser/layout/app-workspace-controller.js +5 -12
  39. package/dist/browser/layout/app-workspace-controller.js.map +1 -1
  40. package/dist/browser/layout/app-workspace-state.js +2 -2
  41. package/dist/browser/layout/app-workspace-state.js.map +1 -1
  42. package/dist/browser/layout/index.js +0 -2
  43. package/dist/browser/layout/index.js.map +1 -1
  44. package/dist/browser/layout/workspace-messages.js +2 -12
  45. package/dist/browser/layout/workspace-messages.js.map +1 -1
  46. package/dist/browser/surfaces/NoticeCard.js +57 -69
  47. package/dist/browser/surfaces/NoticeCard.js.map +1 -1
  48. package/dist/browser/surfaces/Placeholder.js +5 -17
  49. package/dist/browser/surfaces/Placeholder.js.map +1 -1
  50. package/dist/browser/surfaces/Section.js +7 -22
  51. package/dist/browser/surfaces/Section.js.map +1 -1
  52. package/dist/browser/surfaces/StatusBadge.js +1 -5
  53. package/dist/browser/surfaces/StatusBadge.js.map +1 -1
  54. package/dist/browser/surfaces/index.js +0 -4
  55. package/dist/browser/surfaces/index.js.map +1 -1
  56. package/dist/browser/v2/button.js +180 -0
  57. package/dist/browser/v2/button.js.map +1 -0
  58. package/dist/browser/v2/components.js +763 -0
  59. package/dist/browser/v2/components.js.map +1 -0
  60. package/dist/browser/v2/content.js +1107 -0
  61. package/dist/browser/v2/content.js.map +1 -0
  62. package/dist/browser/v2/controls.js +568 -0
  63. package/dist/browser/v2/controls.js.map +1 -0
  64. package/dist/browser/v2/describe.js +397 -0
  65. package/dist/browser/v2/describe.js.map +1 -0
  66. package/dist/browser/v2/index.js +25 -0
  67. package/dist/browser/v2/index.js.map +1 -0
  68. package/dist/browser/v2/layout.js +578 -0
  69. package/dist/browser/v2/layout.js.map +1 -0
  70. package/dist/browser/v2/link.js +9 -0
  71. package/dist/browser/v2/link.js.map +1 -0
  72. package/dist/browser/v2/marks.js +211 -0
  73. package/dist/browser/v2/marks.js.map +1 -0
  74. package/dist/browser/v2/states.js +180 -0
  75. package/dist/browser/v2/states.js.map +1 -0
  76. package/dist/browser/v2/structure.js +328 -0
  77. package/dist/browser/v2/structure.js.map +1 -0
  78. package/dist/browser/v2/testing/index.js +23 -0
  79. package/dist/browser/v2/testing/index.js.map +1 -0
  80. package/dist/browser/v2/testing/measure-v2-layout.js +762 -0
  81. package/dist/browser/v2/testing/measure-v2-layout.js.map +1 -0
  82. package/dist/browser/v2/testing/settled.js +52 -0
  83. package/dist/browser/v2/testing/settled.js.map +1 -0
  84. package/dist/browser/v2/tokens.js +83 -0
  85. package/dist/browser/v2/tokens.js.map +1 -0
  86. package/dist/browser/v2/types.js +24 -0
  87. package/dist/browser/v2/types.js.map +1 -0
  88. package/dist/ssr/actions/ContextMenu.js +1 -3
  89. package/dist/ssr/actions/ContextMenu.js.map +1 -1
  90. package/dist/ssr/actions/Dropdown.js +15 -69
  91. package/dist/ssr/actions/Dropdown.js.map +1 -1
  92. package/dist/ssr/actions/SortableList.js +1 -1
  93. package/dist/ssr/actions/SortableList.js.map +1 -1
  94. package/dist/ssr/actions/ViewTabs.js +5 -9
  95. package/dist/ssr/actions/ViewTabs.js.map +1 -1
  96. package/dist/ssr/actions/drag-and-drop.js +1 -1
  97. package/dist/ssr/actions/drag-and-drop.js.map +1 -1
  98. package/dist/ssr/actions/index.js.map +1 -1
  99. package/dist/ssr/actions/menu-sheet.js +10 -62
  100. package/dist/ssr/actions/menu-sheet.js.map +1 -1
  101. package/dist/ssr/content/DataTable.js +54 -64
  102. package/dist/ssr/content/DataTable.js.map +1 -1
  103. package/dist/ssr/content/MessageRow.js +30 -10
  104. package/dist/ssr/content/MessageRow.js.map +1 -1
  105. package/dist/ssr/content/ProgressPath.js +8 -14
  106. package/dist/ssr/content/ProgressPath.js.map +1 -1
  107. package/dist/ssr/content/index.js +0 -2
  108. package/dist/ssr/content/index.js.map +1 -1
  109. package/dist/ssr/feedback/dialog-core.js +0 -11
  110. package/dist/ssr/feedback/dialog-core.js.map +1 -1
  111. package/dist/ssr/internal/field.js +2 -2
  112. package/dist/ssr/internal/field.js.map +1 -1
  113. package/dist/ssr/intl/messages.js +1 -1
  114. package/dist/ssr/intl/messages.js.map +1 -1
  115. package/dist/ssr/layout/AppWorkspace.js +8 -16
  116. package/dist/ssr/layout/AppWorkspace.js.map +1 -1
  117. package/dist/ssr/layout/Breadcrumbs.js +26 -140
  118. package/dist/ssr/layout/Breadcrumbs.js.map +1 -1
  119. package/dist/ssr/layout/DetailPanel.js +68 -70
  120. package/dist/ssr/layout/DetailPanel.js.map +1 -1
  121. package/dist/ssr/layout/PanelDialog.js +8 -82
  122. package/dist/ssr/layout/PanelDialog.js.map +1 -1
  123. package/dist/ssr/layout/app-workspace-controller.js +5 -12
  124. package/dist/ssr/layout/app-workspace-controller.js.map +1 -1
  125. package/dist/ssr/layout/app-workspace-state.js +2 -2
  126. package/dist/ssr/layout/app-workspace-state.js.map +1 -1
  127. package/dist/ssr/layout/index.js +0 -2
  128. package/dist/ssr/layout/index.js.map +1 -1
  129. package/dist/ssr/layout/workspace-messages.js +2 -12
  130. package/dist/ssr/layout/workspace-messages.js.map +1 -1
  131. package/dist/ssr/surfaces/NoticeCard.js +5 -7
  132. package/dist/ssr/surfaces/NoticeCard.js.map +1 -1
  133. package/dist/ssr/surfaces/Placeholder.js +4 -15
  134. package/dist/ssr/surfaces/Placeholder.js.map +1 -1
  135. package/dist/ssr/surfaces/Section.js +4 -7
  136. package/dist/ssr/surfaces/Section.js.map +1 -1
  137. package/dist/ssr/surfaces/StatusBadge.js +1 -5
  138. package/dist/ssr/surfaces/StatusBadge.js.map +1 -1
  139. package/dist/ssr/surfaces/index.js +0 -4
  140. package/dist/ssr/surfaces/index.js.map +1 -1
  141. package/dist/ssr/v2/button.js +177 -0
  142. package/dist/ssr/v2/button.js.map +1 -0
  143. package/dist/ssr/v2/components.js +518 -0
  144. package/dist/ssr/v2/components.js.map +1 -0
  145. package/dist/ssr/v2/content.js +727 -0
  146. package/dist/ssr/v2/content.js.map +1 -0
  147. package/dist/ssr/v2/controls.js +268 -0
  148. package/dist/ssr/v2/controls.js.map +1 -0
  149. package/dist/ssr/v2/describe.js +397 -0
  150. package/dist/ssr/v2/describe.js.map +1 -0
  151. package/dist/ssr/v2/index.js +25 -0
  152. package/dist/ssr/v2/index.js.map +1 -0
  153. package/dist/ssr/v2/layout.js +377 -0
  154. package/dist/ssr/v2/layout.js.map +1 -0
  155. package/dist/ssr/v2/link.js +9 -0
  156. package/dist/ssr/v2/link.js.map +1 -0
  157. package/dist/ssr/v2/marks.js +126 -0
  158. package/dist/ssr/v2/marks.js.map +1 -0
  159. package/dist/ssr/v2/states.js +128 -0
  160. package/dist/ssr/v2/states.js.map +1 -0
  161. package/dist/ssr/v2/structure.js +229 -0
  162. package/dist/ssr/v2/structure.js.map +1 -0
  163. package/dist/ssr/v2/testing/index.js +23 -0
  164. package/dist/ssr/v2/testing/index.js.map +1 -0
  165. package/dist/ssr/v2/testing/measure-v2-layout.js +762 -0
  166. package/dist/ssr/v2/testing/measure-v2-layout.js.map +1 -0
  167. package/dist/ssr/v2/testing/settled.js +52 -0
  168. package/dist/ssr/v2/testing/settled.js.map +1 -0
  169. package/dist/ssr/v2/tokens.js +83 -0
  170. package/dist/ssr/v2/tokens.js.map +1 -0
  171. package/dist/ssr/v2/types.js +24 -0
  172. package/dist/ssr/v2/types.js.map +1 -0
  173. package/dist/styles.css +1 -1
  174. package/dist/types/actions/Dropdown.d.ts +1 -35
  175. package/dist/types/actions/ViewTabs.d.ts +2 -3
  176. package/dist/types/actions/index.d.ts +1 -1
  177. package/dist/types/actions/menu-sheet.d.ts +1 -3
  178. package/dist/types/content/DataTable.d.ts +0 -19
  179. package/dist/types/content/MessageRow.d.ts +11 -0
  180. package/dist/types/content/ProgressPath.d.ts +6 -12
  181. package/dist/types/content/index.d.ts +0 -2
  182. package/dist/types/feedback/dialog-core.d.ts +0 -5
  183. package/dist/types/layout/AppWorkspace.d.ts +2 -10
  184. package/dist/types/layout/Breadcrumbs.d.ts +5 -10
  185. package/dist/types/layout/PanelDialog.d.ts +0 -19
  186. package/dist/types/layout/app-workspace-state.d.ts +2 -2
  187. package/dist/types/layout/index.d.ts +1 -5
  188. package/dist/types/layout/workspace-messages.d.ts +0 -5
  189. package/dist/types/surfaces/NoticeCard.d.ts +4 -6
  190. package/dist/types/surfaces/Placeholder.d.ts +0 -7
  191. package/dist/types/surfaces/Section.d.ts +2 -8
  192. package/dist/types/surfaces/StatusBadge.d.ts +1 -2
  193. package/dist/types/surfaces/index.d.ts +1 -9
  194. package/dist/types/v2/button.d.ts +54 -0
  195. package/dist/types/v2/components.d.ts +173 -0
  196. package/dist/types/v2/content.d.ts +233 -0
  197. package/dist/types/v2/controls.d.ts +118 -0
  198. package/dist/types/v2/describe.d.ts +18 -0
  199. package/dist/types/v2/index.d.ts +22 -0
  200. package/dist/types/v2/layout.d.ts +124 -0
  201. package/dist/types/v2/link.d.ts +7 -0
  202. package/dist/types/v2/marks.d.ts +90 -0
  203. package/dist/types/v2/states.d.ts +45 -0
  204. package/dist/types/v2/structure.d.ts +47 -0
  205. package/dist/types/v2/testing/index.d.ts +16 -0
  206. package/dist/types/v2/testing/measure-v2-layout.d.ts +99 -0
  207. package/dist/types/v2/testing/settled.d.ts +13 -0
  208. package/dist/types/v2/tokens.d.ts +77 -0
  209. package/dist/types/v2/types.d.ts +44 -0
  210. package/dist/v2.css +3072 -0
  211. package/package.json +24 -10
  212. package/skills/k2b-ui/SKILL.md +201 -0
  213. package/skills/k2b-ui/images/form-1440.png +0 -0
  214. package/skills/k2b-ui/images/form-390.png +0 -0
  215. package/skills/k2b-ui/images/list-detail-1440.png +0 -0
  216. package/skills/k2b-ui/images/list-detail-390.png +0 -0
  217. package/skills/k2b-ui/images/mail-1440.png +0 -0
  218. package/skills/k2b-ui/images/mail-390.png +0 -0
  219. package/skills/k2b-ui/images/record-1440.png +0 -0
  220. package/skills/k2b-ui/images/record-390.png +0 -0
  221. package/skills/k2b-ui/images/record-groups-1440.png +0 -0
  222. package/skills/k2b-ui/images/record-groups-390.png +0 -0
  223. package/skills/k2b-ui/images/table-1440.png +0 -0
  224. package/skills/k2b-ui/images/table-390.png +0 -0
  225. package/skills/k2b-ui/recipes/form.tsx +54 -0
  226. package/skills/k2b-ui/recipes/list-detail.tsx +105 -0
  227. package/skills/k2b-ui/recipes/mail.tsx +193 -0
  228. package/skills/k2b-ui/recipes/record-groups.tsx +115 -0
  229. package/skills/k2b-ui/recipes/record.tsx +163 -0
  230. package/skills/k2b-ui/recipes/table.tsx +68 -0
  231. package/skills/k2b-ui/references/mistakes.md +162 -0
  232. package/skills/k2b-ui/references/primitives.md +310 -0
  233. package/skills/k2b-ui/references/recipes.md +101 -0
  234. package/skills/k2b-ui/references/seeing.md +94 -0
  235. package/dist/browser/actions/menu-sheet-messages.js +0 -26
  236. package/dist/browser/actions/menu-sheet-messages.js.map +0 -1
  237. package/dist/browser/actions/menu-submenu-panel.js +0 -392
  238. package/dist/browser/actions/menu-submenu-panel.js.map +0 -1
  239. package/dist/browser/content/FileName.js +0 -68
  240. package/dist/browser/content/FileName.js.map +0 -1
  241. package/dist/browser/content/TaskRow.js +0 -129
  242. package/dist/browser/content/TaskRow.js.map +0 -1
  243. package/dist/browser/content/progress-path-messages.js +0 -22
  244. package/dist/browser/content/progress-path-messages.js.map +0 -1
  245. package/dist/browser/feedback/dialog-foot.js +0 -45
  246. package/dist/browser/feedback/dialog-foot.js.map +0 -1
  247. package/dist/browser/internal/renders-something.js +0 -3
  248. package/dist/browser/internal/renders-something.js.map +0 -1
  249. package/dist/browser/layout/FloatingPill.js +0 -33
  250. package/dist/browser/layout/FloatingPill.js.map +0 -1
  251. package/dist/browser/layout/StatusRow.js +0 -174
  252. package/dist/browser/layout/StatusRow.js.map +0 -1
  253. package/dist/browser/layout/panel-dialog-error.js +0 -44
  254. package/dist/browser/layout/panel-dialog-error.js.map +0 -1
  255. package/dist/browser/layout/panel-sheet-handle.js +0 -86
  256. package/dist/browser/layout/panel-sheet-handle.js.map +0 -1
  257. package/dist/browser/layout-check.js +0 -232
  258. package/dist/browser/layout-check.js.map +0 -1
  259. package/dist/browser/surfaces/Area.js +0 -205
  260. package/dist/browser/surfaces/Area.js.map +0 -1
  261. package/dist/browser/surfaces/FactGroup.js +0 -148
  262. package/dist/browser/surfaces/FactGroup.js.map +0 -1
  263. package/dist/browser/surfaces/FieldGrid.js +0 -34
  264. package/dist/browser/surfaces/FieldGrid.js.map +0 -1
  265. package/dist/browser/surfaces/RowGroup.js +0 -82
  266. package/dist/browser/surfaces/RowGroup.js.map +0 -1
  267. package/dist/browser/surfaces/flat-block-messages.js +0 -37
  268. package/dist/browser/surfaces/flat-block-messages.js.map +0 -1
  269. package/dist/ssr/actions/menu-sheet-messages.js +0 -26
  270. package/dist/ssr/actions/menu-sheet-messages.js.map +0 -1
  271. package/dist/ssr/actions/menu-submenu-panel.js +0 -295
  272. package/dist/ssr/actions/menu-submenu-panel.js.map +0 -1
  273. package/dist/ssr/content/FileName.js +0 -46
  274. package/dist/ssr/content/FileName.js.map +0 -1
  275. package/dist/ssr/content/TaskRow.js +0 -95
  276. package/dist/ssr/content/TaskRow.js.map +0 -1
  277. package/dist/ssr/content/progress-path-messages.js +0 -22
  278. package/dist/ssr/content/progress-path-messages.js.map +0 -1
  279. package/dist/ssr/feedback/dialog-foot.js +0 -45
  280. package/dist/ssr/feedback/dialog-foot.js.map +0 -1
  281. package/dist/ssr/internal/renders-something.js +0 -3
  282. package/dist/ssr/internal/renders-something.js.map +0 -1
  283. package/dist/ssr/layout/FloatingPill.js +0 -16
  284. package/dist/ssr/layout/FloatingPill.js.map +0 -1
  285. package/dist/ssr/layout/StatusRow.js +0 -93
  286. package/dist/ssr/layout/StatusRow.js.map +0 -1
  287. package/dist/ssr/layout/panel-dialog-error.js +0 -28
  288. package/dist/ssr/layout/panel-dialog-error.js.map +0 -1
  289. package/dist/ssr/layout/panel-sheet-handle.js +0 -66
  290. package/dist/ssr/layout/panel-sheet-handle.js.map +0 -1
  291. package/dist/ssr/layout-check.js +0 -232
  292. package/dist/ssr/layout-check.js.map +0 -1
  293. package/dist/ssr/surfaces/Area.js +0 -147
  294. package/dist/ssr/surfaces/Area.js.map +0 -1
  295. package/dist/ssr/surfaces/FactGroup.js +0 -106
  296. package/dist/ssr/surfaces/FactGroup.js.map +0 -1
  297. package/dist/ssr/surfaces/FieldGrid.js +0 -22
  298. package/dist/ssr/surfaces/FieldGrid.js.map +0 -1
  299. package/dist/ssr/surfaces/RowGroup.js +0 -60
  300. package/dist/ssr/surfaces/RowGroup.js.map +0 -1
  301. package/dist/ssr/surfaces/flat-block-messages.js +0 -37
  302. package/dist/ssr/surfaces/flat-block-messages.js.map +0 -1
  303. package/dist/types/actions/menu-sheet-messages.d.ts +0 -11
  304. package/dist/types/actions/menu-submenu-panel.d.ts +0 -27
  305. package/dist/types/content/FileName.d.ts +0 -23
  306. package/dist/types/content/TaskRow.d.ts +0 -33
  307. package/dist/types/content/progress-path-messages.d.ts +0 -8
  308. package/dist/types/feedback/dialog-foot.d.ts +0 -9
  309. package/dist/types/internal/renders-something.d.ts +0 -2
  310. package/dist/types/layout/FloatingPill.d.ts +0 -20
  311. package/dist/types/layout/StatusRow.d.ts +0 -54
  312. package/dist/types/layout/panel-dialog-error.d.ts +0 -9
  313. package/dist/types/layout/panel-sheet-handle.d.ts +0 -8
  314. package/dist/types/layout-check.d.ts +0 -52
  315. package/dist/types/surfaces/Area.d.ts +0 -38
  316. package/dist/types/surfaces/FactGroup.d.ts +0 -33
  317. package/dist/types/surfaces/FieldGrid.d.ts +0 -14
  318. package/dist/types/surfaces/RowGroup.d.ts +0 -20
  319. package/dist/types/surfaces/flat-block-messages.d.ts +0 -16
@@ -7,7 +7,6 @@ import { spread as _$spread } from "solid-js/web";
7
7
  import { mergeProps as _$mergeProps } from "solid-js/web";
8
8
  import { memo as _$memo } from "solid-js/web";
9
9
  import { className as _$className } from "solid-js/web";
10
- import { style as _$style } from "solid-js/web";
11
10
  import { effect as _$effect } from "solid-js/web";
12
11
  import { getNextMarker as _$getNextMarker } from "solid-js/web";
13
12
  import { setAttribute as _$setAttribute } from "solid-js/web";
@@ -40,7 +39,7 @@ import { Button } from "../actions/Button";
40
39
  import { useUiMessages } from "../intl/messages";
41
40
  import { useDetailPanelMessages } from "../layout/detail-panel-messages";
42
41
 
43
- /** Named after the status tokens; a tone colours the symbol tile only, never the fill or the title (K8, K17). */
42
+ /** Named after the status tokens; a tone colours the frame, the title, and the icon, never the fill. */
44
43
 
45
44
  /** `sm` for detail panels and other narrow columns, `md` for topics on a full page. */
46
45
 
@@ -68,7 +67,7 @@ const Heading = props => _$createComponent(Dynamic, {
68
67
  }
69
68
  });
70
69
  const SectionRoot = props => {
71
- const [local, rest] = splitProps(props, ["title", "icon", "iconColor", "size", "frame", "tone", "restricted", "description", "count", "meta", "footer", "state", "errorMessage", "onRetry", "loadingRows", "level", "class", "children", "actions", "collapsible", "summary", "defaultOpen", "open", "onOpenChange", "disabled"]);
70
+ const [local, rest] = splitProps(props, ["title", "icon", "size", "frame", "tone", "restricted", "description", "count", "meta", "footer", "state", "errorMessage", "onRetry", "loadingRows", "level", "class", "children", "actions", "collapsible", "summary", "defaultOpen", "open", "onOpenChange", "disabled"]);
72
71
  const ui = useUiMessages();
73
72
  const counts = useDetailPanelMessages();
74
73
  const frameDefault = useContext(SectionFrameDefault);
@@ -111,21 +110,7 @@ const SectionRoot = props => {
111
110
  children: name => (() => {
112
111
  var _el$20 = _$getNextElement(_tmpl$6),
113
112
  _el$21 = _el$20.firstChild;
114
- _$effect(_p$ => {
115
- var _v$ = local.iconColor ? "" : undefined,
116
- _v$2 = local.iconColor ? {
117
- "--k2b-section-icon-color": local.iconColor
118
- } : undefined,
119
- _v$3 = name();
120
- _v$ !== _p$.e && _$setAttribute(_el$20, "data-color", _p$.e = _v$);
121
- _p$.t = _$style(_el$20, _v$2, _p$.t);
122
- _v$3 !== _p$.a && _$className(_el$21, _p$.a = _v$3);
123
- return _p$;
124
- }, {
125
- e: undefined,
126
- t: undefined,
127
- a: undefined
128
- });
113
+ _$effect(() => _$className(_el$21, name()));
129
114
  return _el$20;
130
115
  })()
131
116
  }), (() => {
@@ -308,10 +293,10 @@ const SectionRoot = props => {
308
293
  }
309
294
  })), _el$27, _co$8);
310
295
  _$effect(_p$ => {
311
- var _v$4 = open(),
312
- _v$5 = local.disabled;
313
- _v$4 !== _p$.e && _$setAttribute(_el$24, "aria-expanded", _p$.e = _v$4);
314
- _v$5 !== _p$.t && _$setProperty(_el$24, "disabled", _p$.t = _v$5);
296
+ var _v$ = open(),
297
+ _v$2 = local.disabled;
298
+ _v$ !== _p$.e && _$setAttribute(_el$24, "aria-expanded", _p$.e = _v$);
299
+ _v$2 !== _p$.t && _$setProperty(_el$24, "disabled", _p$.t = _v$2);
315
300
  return _p$;
316
301
  }, {
317
302
  e: undefined,
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["surfaces/Section.tsx"],"sourcesContent":["import { children, createContext, createEffect, createSignal, createUniqueId, For, type JSX, Show, splitProps, useContext } from \"solid-js\";\nimport { Dynamic } from \"solid-js/web\";\nimport { Button } from \"../actions/Button\";\nimport { useUiMessages } from \"../intl/messages\";\nimport { useDetailPanelMessages } from \"../layout/detail-panel-messages\";\n\n/** Named after the status tokens; a tone colours the symbol tile only, never the fill or the title (K8, K17). */\nexport type SectionTone = \"neutral\" | \"success\" | \"warning\" | \"danger\" | \"info\" | \"ai\";\n/** `sm` for detail panels and other narrow columns, `md` for topics on a full page. */\nexport type SectionSize = \"sm\" | \"md\";\n/** `line` draws the light 1 px frame; inside another frame a section always stands flat. */\nexport type SectionFrame = \"line\" | \"none\";\nexport type SectionState = \"ready\" | \"loading\" | \"error\";\n\ntype SectionBaseProps = Omit<JSX.HTMLAttributes<HTMLElement>, \"title\" | \"children\" | \"class\"> & {\n title: JSX.Element;\n icon?: string;\n /**\n * The colour of the section's area as a CSS colour, such as money or goods on a dense record page (K17). It sets the\n * icon in a 20 px tile of that colour, the one place the area colour shows. Never a status hue, never near the AI\n * plum; a `tone` wins.\n */\n iconColor?: string;\n size?: SectionSize;\n frame?: SectionFrame;\n tone?: SectionTone;\n /**\n * Marks a section that only some people see, such as \"Only with permission\": a lock and these words after the\n * title. It is part of the section's accessible name and combines with any tone.\n */\n restricted?: string;\n description?: JSX.Element;\n /** How many things the section lists, as a chip after the title; `0` reads \"None yet\". */\n count?: number;\n /** Short state after the title, such as \"2 of 4 done\". */\n meta?: JSX.Element;\n /** Commands for the whole topic, as a row of buttons at the end of the body. */\n footer?: JSX.Element;\n /** `loading` and `error` take the body's place; the heading stays where it is. */\n state?: SectionState;\n /** Says what did not load; defaults to a generic sentence. */\n errorMessage?: JSX.Element;\n /** Shows \"Try again\" in the error state. */\n onRetry?: () => void;\n /** Placeholder rows while loading, the number the loaded body usually shows. Defaults to 3. */\n loadingRows?: number;\n /** Heading level; defaults to 3, or 2 for `size=\"md\"`. */\n level?: 2 | 3;\n class?: string;\n};\n\nexport type SectionProps = SectionBaseProps &\n (\n | {\n children?: JSX.Element;\n /** At most two quiet controls at the end of the heading, such as \"+\" or text buttons; they read grey. */\n actions?: JSX.Element;\n collapsible?: false;\n summary?: never;\n defaultOpen?: never;\n open?: never;\n onOpenChange?: never;\n disabled?: never;\n }\n | {\n children: JSX.Element;\n actions?: never;\n collapsible: true;\n /** One line that says what the closed section holds, such as its newest entry; hidden while open. */\n summary?: JSX.Element;\n defaultOpen?: boolean;\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n disabled?: boolean;\n }\n );\n\nexport type SectionPartProps = {\n title: JSX.Element;\n children: JSX.Element;\n class?: string;\n};\n\ntype SectionComponent = ((props: SectionProps) => JSX.Element) & {\n Part: (props: SectionPartProps) => JSX.Element;\n};\n\nconst SectionLevel = createContext<number>(2);\n\n/**\n * The frame a section draws when it passes none. A host that frames its topics itself, such as a detail panel, sets\n * `none`; everywhere else a section is a card.\n */\nexport const SectionFrameDefault = createContext<SectionFrame>(\"line\");\n\nconst Heading = (props: { level: number; id?: string; class: string; children: JSX.Element }): JSX.Element => (\n <Dynamic component={`h${props.level}`} id={props.id} class={props.class}>\n {props.children}\n </Dynamic>\n);\n\nconst SectionRoot = (props: SectionProps): JSX.Element => {\n const [local, rest] = splitProps(props, [\n \"title\",\n \"icon\",\n \"iconColor\",\n \"size\",\n \"frame\",\n \"tone\",\n \"restricted\",\n \"description\",\n \"count\",\n \"meta\",\n \"footer\",\n \"state\",\n \"errorMessage\",\n \"onRetry\",\n \"loadingRows\",\n \"level\",\n \"class\",\n \"children\",\n \"actions\",\n \"collapsible\",\n \"summary\",\n \"defaultOpen\",\n \"open\",\n \"onOpenChange\",\n \"disabled\",\n ]);\n const ui = useUiMessages();\n const counts = useDetailPanelMessages();\n const frameDefault = useContext(SectionFrameDefault);\n const id = `k2b-section-${createUniqueId()}`;\n const titleId = `${id}-title`;\n const restrictedId = `${id}-restricted`;\n const bodyId = `${id}-body`;\n const level = () => local.level ?? (local.size === \"md\" ? 2 : 3);\n const state = () => local.state ?? \"ready\";\n const [internalOpen, setInternalOpen] = createSignal(local.defaultOpen ?? false);\n const open = () => !local.collapsible || (local.open ?? internalOpen());\n let toggleButton: HTMLButtonElement | undefined;\n let body: HTMLDivElement | undefined;\n\n const toggle = () => {\n if (local.disabled) return;\n const next = !open();\n if (local.open === undefined) setInternalOpen(next);\n local.onOpenChange?.(next);\n };\n // A parent may close the section while focus is inside it; focus then returns to the toggle instead of the page.\n createEffect(() => {\n if (open()) return;\n queueMicrotask(() => {\n const active = body?.ownerDocument.activeElement;\n if (!open() && active && body?.contains(active)) toggleButton?.focus();\n });\n });\n\n // Resolve once and only while ready: reading `children` twice would build the body twice.\n const resolved = children(() => (state() === \"ready\" ? local.children : undefined));\n // A JSX action must also be built once: checking the slot and then reading it again creates different hydration keys.\n const resolvedActions = children(() => local.actions);\n const hasBody = () => local.collapsible || state() !== \"ready\" || Boolean(resolved.toArray().length) || Boolean(local.footer);\n\n /** Icon, then the title with its count, state, and restricted marker in one row, then the description. */\n const headingRow = (title: JSX.Element, summary?: JSX.Element) => (\n <>\n <Show when={local.icon}>\n {(name) => (\n <span\n class=\"k2b-section__icon\"\n aria-hidden=\"true\"\n data-color={local.iconColor ? \"\" : undefined}\n style={local.iconColor ? { \"--k2b-section-icon-color\": local.iconColor } : undefined}\n >\n <i class={name()} />\n </span>\n )}\n </Show>\n <span class=\"k2b-section__copy\">\n <span class=\"k2b-section__heading\">\n {title}\n <Show when={local.count !== undefined}>\n <Show when={local.count! > 0} fallback={<span class=\"k2b-section__none\">{counts().noneYet}</span>}>\n <span class=\"k2b-count-chip\">{local.count}</span>\n </Show>\n </Show>\n <Show when={local.meta}>\n <span class=\"k2b-section__meta\">{local.meta}</span>\n </Show>\n <Show when={local.restricted}>\n <span class=\"k2b-section__restricted\" id={restrictedId}>\n <i class=\"ti ti-lock\" aria-hidden=\"true\" />\n {local.restricted}\n </span>\n </Show>\n {summary}\n </span>\n <Show when={local.description}>\n <span class=\"k2b-section__description\">{local.description}</span>\n </Show>\n </span>\n </>\n );\n\n return (\n <section\n {...rest}\n class={local.class ? `k2b-section ${local.class}` : \"k2b-section\"}\n data-size={local.size ?? \"sm\"}\n data-frame={local.frame ?? frameDefault}\n data-tone={local.tone && local.tone !== \"neutral\" ? local.tone : undefined}\n data-icon={local.icon ? \"true\" : undefined}\n data-collapsible={local.collapsible ? \"true\" : undefined}\n data-open={local.collapsible ? String(open()) : undefined}\n data-summary={local.collapsible && local.summary ? \"true\" : undefined}\n aria-labelledby={local.restricted ? `${titleId} ${restrictedId}` : titleId}\n aria-busy={state() === \"loading\" ? \"true\" : undefined}\n >\n <Show\n when={local.collapsible}\n fallback={\n <header class=\"k2b-section__header\">\n {headingRow(\n <Heading level={level()} id={titleId} class=\"k2b-section__title\">\n {local.title}\n </Heading>,\n )}\n <Show when={resolvedActions()}>\n <div class=\"k2b-section__actions\">{resolvedActions()}</div>\n </Show>\n </header>\n }\n >\n {/* The whole heading row is one disclosure button inside the heading, so the region keeps its name. */}\n <Heading level={level()} class=\"k2b-section__header\">\n <button\n ref={toggleButton}\n type=\"button\"\n class=\"k2b-section__toggle\"\n aria-expanded={open()}\n aria-controls={bodyId}\n disabled={local.disabled}\n // A native listener, not Solid's delegated `onClick`: delegation is registered once per document when\n // this module loads, so a section rendered into a later document (a test harness, an iframe) would\n // never toggle. The shared Button registers its delegation at render time and has no such gap.\n on:click={toggle}\n >\n {headingRow(\n <span id={titleId} class=\"k2b-section__title\">\n {local.title}\n </span>,\n <Show when={local.summary}>\n <span class=\"k2b-section__summary k2b-truncate-fade\">{local.summary}</span>\n </Show>,\n )}\n <span class=\"k2b-section__chevron\" aria-hidden=\"true\">\n <i class=\"ti ti-chevron-down\" />\n </span>\n </button>\n </Heading>\n </Show>\n <Show when={hasBody()}>\n <div ref={body} id={bodyId} class=\"k2b-section__body\" hidden={!open()}>\n <Show when={state() === \"loading\"}>\n {/* Placeholder rows at the height of loaded rows; their widths vary in CSS. */}\n <div role=\"status\">\n <span class=\"k2b-sr-only\">{ui().loading}</span>\n <For each={Array.from({ length: Math.max(1, local.loadingRows ?? 3) })}>\n {() => (\n <div class=\"k2b-section__skeleton-row\" aria-hidden=\"true\">\n <span />\n <span />\n </div>\n )}\n </For>\n </div>\n </Show>\n <Show when={state() === \"error\"}>\n <div class=\"k2b-section__error\" role=\"alert\">\n <i class=\"ti ti-alert-circle\" aria-hidden=\"true\" />\n <span>{local.errorMessage ?? ui().couldNotLoadData}</span>\n </div>\n <Show when={local.onRetry}>\n {(retry) => (\n <div class=\"k2b-section__footer\">\n <Button type=\"button\" size=\"sm\" variant=\"secondary\" onClick={() => retry()()}>\n <i class=\"ti ti-refresh\" aria-hidden=\"true\" />\n {ui().retry}\n </Button>\n </div>\n )}\n </Show>\n </Show>\n {resolved()}\n <Show when={state() === \"ready\" && local.footer}>\n <div class=\"k2b-section__footer\">{local.footer}</div>\n </Show>\n </div>\n </Show>\n </section>\n );\n};\n\n/** A sub-topic inside a section, such as \"Contact\" or \"Address\": a small heading, no frame of its own. */\nconst SectionPart = (props: SectionPartProps): JSX.Element => {\n const level = useContext(SectionLevel);\n const id = `k2b-section-part-${createUniqueId()}`;\n return (\n <div class={props.class ? `k2b-section__part ${props.class}` : \"k2b-section__part\"} role=\"group\" aria-labelledby={id}>\n <Heading level={Math.min(level + 1, 6)} id={id} class=\"k2b-section__part-title\">\n {props.title}\n </Heading>\n {props.children}\n </div>\n );\n};\n\n/**\n * One topic, in a detail panel or on a page: an icon, a title with its count, at most one control, and its\n * content. On a page a section is a card with the light 1 px frame; inside another frame, and in a detail panel, it\n * stands flat, so cards never nest.\n */\nconst SectionWithLevel = (props: SectionProps): JSX.Element => (\n // The level is provided before the body is built, so a part's heading sits one level below this section's.\n <SectionLevel.Provider value={props.level ?? (props.size === \"md\" ? 2 : 3)}>\n <SectionRoot {...props} />\n </SectionLevel.Provider>\n);\n\nexport const Section = SectionWithLevel as SectionComponent;\nSection.Part = SectionPart;\n\nexport default Section;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,QAAQ,EAAE,aAAa,EAAE,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,GAAG,EAAY,IAAI,EAAE,UAAU,EAAE,UAAU,QAAQ,UAAU;AAC3I,SAAS,OAAO,QAAQ,cAAc;AACtC,SAAS,MAAM,QAAQ,mBAAmB;AAC1C,SAAS,aAAa,QAAQ,kBAAkB;AAChD,SAAS,sBAAsB,QAAQ,iCAAiC;;AAExE;;AAEA;;AAEA;;AA6EA,MAAM,YAAY,GAAG,aAAa,CAAS,CAAC,CAAC;;AAE7C;AACA;AACA;AACA;AACA,OAAO,MAAM,mBAAmB,GAAG,aAAa,CAAe,MAAM,CAAC;AAEtE,MAAM,OAAO,GAAI,KAA2E,sBACzF,OAAO;EAAA,IAAC,SAAS;IAAA,OAAE,IAAI,KAAK,CAAC,KAAK,EAAE;EAAA;EAAA,IAAE,EAAE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AAmB,IAC3C;AAAA,kBACC,YAAY,CAAC,QAAQ;EAAA,IAAC,KAAK;IAAA,OAAE,KAAK,CAAC,KAAK,KAAK,KAAK,CAAC,IAAI,KAAK,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;EAAA;EAAA;IAAA,yBACvE,WAAW,EAAK,KAAK;EAAA;AAAA,EAEzB;AAED,OAAO,MAAM,OAAO,GAAG,gBAAoC;AAC3D,OAAO,CAAC,IAAI,GAAG,WAAW;AAE1B,eAAe,OAAO","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["surfaces/Section.tsx"],"sourcesContent":["import { children, createContext, createEffect, createSignal, createUniqueId, For, type JSX, Show, splitProps, useContext } from \"solid-js\";\nimport { Dynamic } from \"solid-js/web\";\nimport { Button } from \"../actions/Button\";\nimport { useUiMessages } from \"../intl/messages\";\nimport { useDetailPanelMessages } from \"../layout/detail-panel-messages\";\n\n/** Named after the status tokens; a tone colours the frame, the title, and the icon, never the fill. */\nexport type SectionTone = \"neutral\" | \"success\" | \"warning\" | \"danger\" | \"info\" | \"ai\";\n/** `sm` for detail panels and other narrow columns, `md` for topics on a full page. */\nexport type SectionSize = \"sm\" | \"md\";\n/** `line` draws the light 1 px frame; inside another frame a section always stands flat. */\nexport type SectionFrame = \"line\" | \"none\";\nexport type SectionState = \"ready\" | \"loading\" | \"error\";\n\ntype SectionBaseProps = Omit<JSX.HTMLAttributes<HTMLElement>, \"title\" | \"children\" | \"class\"> & {\n title: JSX.Element;\n icon?: string;\n size?: SectionSize;\n frame?: SectionFrame;\n tone?: SectionTone;\n /**\n * Marks a section that only some people see, such as \"Only with permission\": a lock and these words after the\n * title. It is part of the section's accessible name and combines with any tone.\n */\n restricted?: string;\n description?: JSX.Element;\n /** How many things the section lists, as a chip after the title; `0` reads \"None yet\". */\n count?: number;\n /** Short state after the title, such as \"2 of 4 done\". */\n meta?: JSX.Element;\n /** Commands for the whole topic, as a row of buttons at the end of the body. */\n footer?: JSX.Element;\n /** `loading` and `error` take the body's place; the heading stays where it is. */\n state?: SectionState;\n /** Says what did not load; defaults to a generic sentence. */\n errorMessage?: JSX.Element;\n /** Shows \"Try again\" in the error state. */\n onRetry?: () => void;\n /** Placeholder rows while loading, the number the loaded body usually shows. Defaults to 3. */\n loadingRows?: number;\n /** Heading level; defaults to 3, or 2 for `size=\"md\"`. */\n level?: 2 | 3;\n class?: string;\n};\n\nexport type SectionProps = SectionBaseProps &\n (\n | {\n children?: JSX.Element;\n /** Exactly one control at the end of the heading, such as \"+\" or one text button. */\n actions?: JSX.Element;\n collapsible?: false;\n summary?: never;\n defaultOpen?: never;\n open?: never;\n onOpenChange?: never;\n disabled?: never;\n }\n | {\n children: JSX.Element;\n actions?: never;\n collapsible: true;\n /** One line that says what the closed section holds, such as its newest entry; hidden while open. */\n summary?: JSX.Element;\n defaultOpen?: boolean;\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n disabled?: boolean;\n }\n );\n\nexport type SectionPartProps = {\n title: JSX.Element;\n children: JSX.Element;\n class?: string;\n};\n\ntype SectionComponent = ((props: SectionProps) => JSX.Element) & {\n Part: (props: SectionPartProps) => JSX.Element;\n};\n\nconst SectionLevel = createContext<number>(2);\n\n/**\n * The frame a section draws when it passes none. A host that frames its topics itself, such as a detail panel, sets\n * `none`; everywhere else a section is a card.\n */\nexport const SectionFrameDefault = createContext<SectionFrame>(\"line\");\n\nconst Heading = (props: { level: number; id?: string; class: string; children: JSX.Element }): JSX.Element => (\n <Dynamic component={`h${props.level}`} id={props.id} class={props.class}>\n {props.children}\n </Dynamic>\n);\n\nconst SectionRoot = (props: SectionProps): JSX.Element => {\n const [local, rest] = splitProps(props, [\n \"title\",\n \"icon\",\n \"size\",\n \"frame\",\n \"tone\",\n \"restricted\",\n \"description\",\n \"count\",\n \"meta\",\n \"footer\",\n \"state\",\n \"errorMessage\",\n \"onRetry\",\n \"loadingRows\",\n \"level\",\n \"class\",\n \"children\",\n \"actions\",\n \"collapsible\",\n \"summary\",\n \"defaultOpen\",\n \"open\",\n \"onOpenChange\",\n \"disabled\",\n ]);\n const ui = useUiMessages();\n const counts = useDetailPanelMessages();\n const frameDefault = useContext(SectionFrameDefault);\n const id = `k2b-section-${createUniqueId()}`;\n const titleId = `${id}-title`;\n const restrictedId = `${id}-restricted`;\n const bodyId = `${id}-body`;\n const level = () => local.level ?? (local.size === \"md\" ? 2 : 3);\n const state = () => local.state ?? \"ready\";\n const [internalOpen, setInternalOpen] = createSignal(local.defaultOpen ?? false);\n const open = () => !local.collapsible || (local.open ?? internalOpen());\n let toggleButton: HTMLButtonElement | undefined;\n let body: HTMLDivElement | undefined;\n\n const toggle = () => {\n if (local.disabled) return;\n const next = !open();\n if (local.open === undefined) setInternalOpen(next);\n local.onOpenChange?.(next);\n };\n // A parent may close the section while focus is inside it; focus then returns to the toggle instead of the page.\n createEffect(() => {\n if (open()) return;\n queueMicrotask(() => {\n const active = body?.ownerDocument.activeElement;\n if (!open() && active && body?.contains(active)) toggleButton?.focus();\n });\n });\n\n // Resolve once and only while ready: reading `children` twice would build the body twice.\n const resolved = children(() => (state() === \"ready\" ? local.children : undefined));\n // A JSX action must also be built once: checking the slot and then reading it again creates different hydration keys.\n const resolvedActions = children(() => local.actions);\n const hasBody = () => local.collapsible || state() !== \"ready\" || Boolean(resolved.toArray().length) || Boolean(local.footer);\n\n /** Icon, then the title with its count, state, and restricted marker in one row, then the description. */\n const headingRow = (title: JSX.Element, summary?: JSX.Element) => (\n <>\n <Show when={local.icon}>\n {(name) => (\n <span class=\"k2b-section__icon\" aria-hidden=\"true\">\n <i class={name()} />\n </span>\n )}\n </Show>\n <span class=\"k2b-section__copy\">\n <span class=\"k2b-section__heading\">\n {title}\n <Show when={local.count !== undefined}>\n <Show when={local.count! > 0} fallback={<span class=\"k2b-section__none\">{counts().noneYet}</span>}>\n <span class=\"k2b-count-chip\">{local.count}</span>\n </Show>\n </Show>\n <Show when={local.meta}>\n <span class=\"k2b-section__meta\">{local.meta}</span>\n </Show>\n <Show when={local.restricted}>\n <span class=\"k2b-section__restricted\" id={restrictedId}>\n <i class=\"ti ti-lock\" aria-hidden=\"true\" />\n {local.restricted}\n </span>\n </Show>\n {summary}\n </span>\n <Show when={local.description}>\n <span class=\"k2b-section__description\">{local.description}</span>\n </Show>\n </span>\n </>\n );\n\n return (\n <section\n {...rest}\n class={local.class ? `k2b-section ${local.class}` : \"k2b-section\"}\n data-size={local.size ?? \"sm\"}\n data-frame={local.frame ?? frameDefault}\n data-tone={local.tone && local.tone !== \"neutral\" ? local.tone : undefined}\n data-icon={local.icon ? \"true\" : undefined}\n data-collapsible={local.collapsible ? \"true\" : undefined}\n data-open={local.collapsible ? String(open()) : undefined}\n data-summary={local.collapsible && local.summary ? \"true\" : undefined}\n aria-labelledby={local.restricted ? `${titleId} ${restrictedId}` : titleId}\n aria-busy={state() === \"loading\" ? \"true\" : undefined}\n >\n <Show\n when={local.collapsible}\n fallback={\n <header class=\"k2b-section__header\">\n {headingRow(\n <Heading level={level()} id={titleId} class=\"k2b-section__title\">\n {local.title}\n </Heading>,\n )}\n <Show when={resolvedActions()}>\n <div class=\"k2b-section__actions\">{resolvedActions()}</div>\n </Show>\n </header>\n }\n >\n {/* The whole heading row is one disclosure button inside the heading, so the region keeps its name. */}\n <Heading level={level()} class=\"k2b-section__header\">\n <button\n ref={toggleButton}\n type=\"button\"\n class=\"k2b-section__toggle\"\n aria-expanded={open()}\n aria-controls={bodyId}\n disabled={local.disabled}\n // A native listener, not Solid's delegated `onClick`: delegation is registered once per document when\n // this module loads, so a section rendered into a later document (a test harness, an iframe) would\n // never toggle. The shared Button registers its delegation at render time and has no such gap.\n on:click={toggle}\n >\n {headingRow(\n <span id={titleId} class=\"k2b-section__title\">\n {local.title}\n </span>,\n <Show when={local.summary}>\n <span class=\"k2b-section__summary k2b-truncate-fade\">{local.summary}</span>\n </Show>,\n )}\n <span class=\"k2b-section__chevron\" aria-hidden=\"true\">\n <i class=\"ti ti-chevron-down\" />\n </span>\n </button>\n </Heading>\n </Show>\n <Show when={hasBody()}>\n <div ref={body} id={bodyId} class=\"k2b-section__body\" hidden={!open()}>\n <Show when={state() === \"loading\"}>\n {/* Placeholder rows at the height of loaded rows; their widths vary in CSS. */}\n <div role=\"status\">\n <span class=\"k2b-sr-only\">{ui().loading}</span>\n <For each={Array.from({ length: Math.max(1, local.loadingRows ?? 3) })}>\n {() => (\n <div class=\"k2b-section__skeleton-row\" aria-hidden=\"true\">\n <span />\n <span />\n </div>\n )}\n </For>\n </div>\n </Show>\n <Show when={state() === \"error\"}>\n <div class=\"k2b-section__error\" role=\"alert\">\n <i class=\"ti ti-alert-circle\" aria-hidden=\"true\" />\n <span>{local.errorMessage ?? ui().couldNotLoadData}</span>\n </div>\n <Show when={local.onRetry}>\n {(retry) => (\n <div class=\"k2b-section__footer\">\n <Button type=\"button\" size=\"sm\" variant=\"secondary\" onClick={() => retry()()}>\n <i class=\"ti ti-refresh\" aria-hidden=\"true\" />\n {ui().retry}\n </Button>\n </div>\n )}\n </Show>\n </Show>\n {resolved()}\n <Show when={state() === \"ready\" && local.footer}>\n <div class=\"k2b-section__footer\">{local.footer}</div>\n </Show>\n </div>\n </Show>\n </section>\n );\n};\n\n/** A sub-topic inside a section, such as \"Contact\" or \"Address\": a small heading, no frame of its own. */\nconst SectionPart = (props: SectionPartProps): JSX.Element => {\n const level = useContext(SectionLevel);\n const id = `k2b-section-part-${createUniqueId()}`;\n return (\n <div class={props.class ? `k2b-section__part ${props.class}` : \"k2b-section__part\"} role=\"group\" aria-labelledby={id}>\n <Heading level={Math.min(level + 1, 6)} id={id} class=\"k2b-section__part-title\">\n {props.title}\n </Heading>\n {props.children}\n </div>\n );\n};\n\n/**\n * One topic, in a detail panel or on a page: an icon, a title with its count, at most one control, and its\n * content. On a page a section is a card with the light 1 px frame; inside another frame, and in a detail panel, it\n * stands flat, so cards never nest.\n */\nconst SectionWithLevel = (props: SectionProps): JSX.Element => (\n // The level is provided before the body is built, so a part's heading sits one level below this section's.\n <SectionLevel.Provider value={props.level ?? (props.size === \"md\" ? 2 : 3)}>\n <SectionRoot {...props} />\n </SectionLevel.Provider>\n);\n\nexport const Section = SectionWithLevel as SectionComponent;\nSection.Part = SectionPart;\n\nexport default Section;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,QAAQ,EAAE,aAAa,EAAE,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,GAAG,EAAY,IAAI,EAAE,UAAU,EAAE,UAAU,QAAQ,UAAU;AAC3I,SAAS,OAAO,QAAQ,cAAc;AACtC,SAAS,MAAM,QAAQ,mBAAmB;AAC1C,SAAS,aAAa,QAAQ,kBAAkB;AAChD,SAAS,sBAAsB,QAAQ,iCAAiC;;AAExE;;AAEA;;AAEA;;AAuEA,MAAM,YAAY,GAAG,aAAa,CAAS,CAAC,CAAC;;AAE7C;AACA;AACA;AACA;AACA,OAAO,MAAM,mBAAmB,GAAG,aAAa,CAAe,MAAM,CAAC;AAEtE,MAAM,OAAO,GAAI,KAA2E,sBACzF,OAAO;EAAA,IAAC,SAAS;IAAA,OAAE,IAAI,KAAK,CAAC,KAAK,EAAE;EAAA;EAAA,IAAE,EAAE;IAAA,OAAE,KAAK,CAAC,EAAE;EAAA;EAAA;IAAA,OAAS,KAAK,CAAC,KAAK;EAAA;EAAA;IAAA,OACpE,KAAK,CAAC,QAAQ;EAAA;AAAA,EAElB;AAED,MAAM,WAAW,GAAI,KAAmB,IAAkB;EACxD,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,UAAU,CAAC,KAAK,EAAE,CACtC,OAAO,EACP,MAAM,EACN,MAAM,EACN,OAAO,EACP,MAAM,EACN,YAAY,EACZ,aAAa,EACb,OAAO,EACP,MAAM,EACN,QAAQ,EACR,OAAO,EACP,cAAc,EACd,SAAS,EACT,aAAa,EACb,OAAO,EACP,OAAO,EACP,UAAU,EACV,SAAS,EACT,aAAa,EACb,SAAS,EACT,aAAa,EACb,MAAM,EACN,cAAc,EACd,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,YAAY,CAAC;EACtC,MAAM,EAAE,GAAG,oBAAoB,cAAc,CAAC,CAAC,EAAE;EACjD;IAAA;MAAA;MAAA;MAAA;MAAA;IAAA,0CACoH,EAAE;IAAA,mCACjH,OAAO;MAAA,IAAC,KAAK;QAAA,OAAE,IAAI,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC,EAAE,CAAC,CAAC;MAAA;MAAE,EAAE,EAAE,EAAE;MAAA;MAAA;QAAA,OAC3C,KAAK,CAAC,KAAK;MAAA;IAAA;IAAA,uBAEb,KAAK,CAAC,QAAQ;IAAA,mCAJL,KAAK,CAAC,KAAK,GAAG,qBAAqB,KAAK,CAAC,KAAK,EAAE,GAAG,mBAAmB;IAAA;EAAA;AAOtF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,MAAM,gBAAgB,GAAI,KAAmB,IAC3C;AAAA,kBACC,YAAY,CAAC,QAAQ;EAAA,IAAC,KAAK;IAAA,OAAE,KAAK,CAAC,KAAK,KAAK,KAAK,CAAC,IAAI,KAAK,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;EAAA;EAAA;IAAA,yBACvE,WAAW,EAAK,KAAK;EAAA;AAAA,EAEzB;AAED,OAAO,MAAM,OAAO,GAAG,gBAAoC;AAC3D,OAAO,CAAC,IAAI,GAAG,WAAW;AAE1B,eAAe,OAAO","ignoreList":[]}
@@ -13,9 +13,6 @@ var _tmpl$ = /*#__PURE__*/_$template(`<span class=k2b-status-badge__label data-r
13
13
  _tmpl$5 = /*#__PURE__*/_$template(`<span class=k2b-status-badge__label>`),
14
14
  _tmpl$6 = /*#__PURE__*/_$template(`<span aria-hidden=true>`);
15
15
  import { For, Show } from "solid-js";
16
-
17
- /** `yours` is "your turn": the blue tint of an action that waits for the reader; amber `warning` is "to clarify". */
18
-
19
16
  const DEFAULT_ICONS = {
20
17
  info: "ti ti-info-circle",
21
18
  ok: "ti ti-check",
@@ -23,8 +20,7 @@ const DEFAULT_ICONS = {
23
20
  error: "ti ti-alert-circle",
24
21
  degraded: "ti ti-plug-connected-x",
25
22
  running: "ti ti-loader-2",
26
- neutral: "ti ti-alert-square-rounded",
27
- yours: "ti ti-arrow-right"
23
+ neutral: "ti ti-alert-square-rounded"
28
24
  };
29
25
  export function StatusBadge(props) {
30
26
  const variant = () => props.variant ?? "chip";
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["surfaces/StatusBadge.tsx"],"sourcesContent":["import { For, type JSX, Show } from \"solid-js\";\n\n/** `yours` is \"your turn\": the blue tint of an action that waits for the reader; amber `warning` is \"to clarify\". */\nexport type StatusTone = \"info\" | \"ok\" | \"warning\" | \"error\" | \"degraded\" | \"running\" | \"neutral\" | \"yours\";\n\nexport type StatusBadgeProps = {\n tone: StatusTone;\n label: JSX.Element;\n icon?: string | null;\n variant?: \"chip\" | \"dot\" | \"text\";\n /**\n * Every label this place can show, such as all states of a list's status. The badge keeps the width of the longest,\n * so in a right-aligned slot its dot starts at one x in every row and stays put when the state changes.\n */\n labels?: readonly string[];\n title?: string;\n class?: string;\n};\n\nconst DEFAULT_ICONS: Record<StatusTone, string> = {\n info: \"ti ti-info-circle\",\n ok: \"ti ti-check\",\n warning: \"ti ti-alert-triangle\",\n error: \"ti ti-alert-circle\",\n degraded: \"ti ti-plug-connected-x\",\n running: \"ti ti-loader-2\",\n neutral: \"ti ti-alert-square-rounded\",\n yours: \"ti ti-arrow-right\",\n};\n\nexport function StatusBadge(props: StatusBadgeProps): JSX.Element {\n const variant = () => props.variant ?? \"chip\";\n const icon = () => (props.icon === null ? undefined : (props.icon ?? DEFAULT_ICONS[props.tone]));\n return (\n <span class={`k2b-status-badge ${props.class ?? \"\"}`} data-tone={props.tone} data-variant={variant()} title={props.title}>\n <Show when={variant() !== \"dot\"} fallback={<span class=\"k2b-status-badge__dot\" aria-hidden=\"true\" />}>\n <Show when={icon()}>{(glyph) => <i class={glyph()} aria-hidden=\"true\" />}</Show>\n </Show>\n <Show when={props.labels?.length} fallback={<span class=\"k2b-status-badge__label\">{props.label}</span>}>\n <span class=\"k2b-status-badge__label\" data-reserve=\"\">\n <span>{props.label}</span>\n <For each={props.labels}>{(label) => <span aria-hidden=\"true\">{label}</span>}</For>\n </span>\n </Show>\n </span>\n );\n}\n\nexport default StatusBadge;\n"],"mappings":";;;;;;;;;;;;;;AAAA,SAAS,GAAG,EAAY,IAAI,QAAQ,UAAU;;AAE9C;;AAiBA,MAAM,aAAyC,GAAG;EAChD,IAAI,EAAE,mBAAmB;EACzB,EAAE,EAAE,aAAa;EACjB,OAAO,EAAE,sBAAsB;EAC/B,KAAK,EAAE,oBAAoB;EAC3B,QAAQ,EAAE,wBAAwB;EAClC,OAAO,EAAE,gBAAgB;EACzB,OAAO,EAAE,4BAA4B;EACrC,KAAK,EAAE;AACT,CAAC;AAED,OAAO,SAAS,WAAW,CAAC,KAAuB,EAAe;EAChE,MAAM,OAAO,GAAG,MAAM,KAAK,CAAC,OAAO,IAAI,MAAM;EAC7C,MAAM,IAAI,GAAG,MAAO,KAAK,CAAC,IAAI,KAAK,IAAI,GAAG,SAAS,GAAI,KAAK,CAAC,IAAI,IAAI,aAAa,CAAC,KAAK,CAAC,IAAI,CAAG;EAChG;IAAA;MAAA;MAAA;MAAA;MAAA;IAAA,iCAEK,IAAI;MAAA,IAAC,IAAI;QAAA,OAAE,OAAO,CAAC,CAAC,KAAK,KAAK;MAAA;MAAA,IAAE,QAAQ;QAAA;MAAA;MAAA;QAAA,yBACtC,IAAI;UAAA,IAAC,IAAI;YAAA,OAAE,IAAI,CAAC,CAAC;UAAA;UAAA,UAAI,KAAK;YAAA;YAAA,kCAAe,KAAK,CAAC,CAAC;YAAA;UAAA;QAAuB;MAAA;IAAA;IAAA,iCAEzE,IAAI;MAAA,IAAC,IAAI;QAAA,OAAE,KAAK,CAAC,MAAM,EAAE,MAAM;MAAA;MAAA,IAAE,QAAQ;QAAA;UAAA;UAAA,uBAAyC,KAAK,CAAC,KAAK;UAAA;QAAA;MAAA;MAAA;QAAA;UAAA;UAAA;UAAA;QAAA,sBAEnF,KAAK,CAAC,KAAK;QAAA,kCACjB,GAAG;UAAA,IAAC,IAAI;YAAA,OAAE,KAAK,CAAC,MAAM;UAAA;UAAA,UAAI,KAAK;YAAA;YAAA,iBAA+B,KAAK;YAAA;UAAA;QAAQ;QAAA;MAAA;IAAA;IAAA;MAAA,UAPrE,oBAAoB,KAAK,CAAC,KAAK,IAAI,EAAE,EAAE;QAAA,OAAa,KAAK,CAAC,IAAI;QAAA,OAAgB,OAAO,CAAC,CAAC;QAAA,OAAS,KAAK,CAAC,KAAK;MAAA;MAAA;MAAA;MAAA;MAAA;IAAA;MAAA;MAAA;MAAA;MAAA;IAAA;IAAA;EAAA;AAY5H;AAEA,eAAe,WAAW","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["surfaces/StatusBadge.tsx"],"sourcesContent":["import { For, type JSX, Show } from \"solid-js\";\n\nexport type StatusTone = \"info\" | \"ok\" | \"warning\" | \"error\" | \"degraded\" | \"running\" | \"neutral\";\n\nexport type StatusBadgeProps = {\n tone: StatusTone;\n label: JSX.Element;\n icon?: string | null;\n variant?: \"chip\" | \"dot\" | \"text\";\n /**\n * Every label this place can show, such as all states of a list's status. The badge keeps the width of the longest,\n * so in a right-aligned slot its dot starts at one x in every row and stays put when the state changes.\n */\n labels?: readonly string[];\n title?: string;\n class?: string;\n};\n\nconst DEFAULT_ICONS: Record<StatusTone, string> = {\n info: \"ti ti-info-circle\",\n ok: \"ti ti-check\",\n warning: \"ti ti-alert-triangle\",\n error: \"ti ti-alert-circle\",\n degraded: \"ti ti-plug-connected-x\",\n running: \"ti ti-loader-2\",\n neutral: \"ti ti-alert-square-rounded\",\n};\n\nexport function StatusBadge(props: StatusBadgeProps): JSX.Element {\n const variant = () => props.variant ?? \"chip\";\n const icon = () => (props.icon === null ? undefined : (props.icon ?? DEFAULT_ICONS[props.tone]));\n return (\n <span class={`k2b-status-badge ${props.class ?? \"\"}`} data-tone={props.tone} data-variant={variant()} title={props.title}>\n <Show when={variant() !== \"dot\"} fallback={<span class=\"k2b-status-badge__dot\" aria-hidden=\"true\" />}>\n <Show when={icon()}>{(glyph) => <i class={glyph()} aria-hidden=\"true\" />}</Show>\n </Show>\n <Show when={props.labels?.length} fallback={<span class=\"k2b-status-badge__label\">{props.label}</span>}>\n <span class=\"k2b-status-badge__label\" data-reserve=\"\">\n <span>{props.label}</span>\n <For each={props.labels}>{(label) => <span aria-hidden=\"true\">{label}</span>}</For>\n </span>\n </Show>\n </span>\n );\n}\n\nexport default StatusBadge;\n"],"mappings":";;;;;;;;;;;;;;AAAA,SAAS,GAAG,EAAY,IAAI,QAAQ,UAAU;AAkB9C,MAAM,aAAyC,GAAG;EAChD,IAAI,EAAE,mBAAmB;EACzB,EAAE,EAAE,aAAa;EACjB,OAAO,EAAE,sBAAsB;EAC/B,KAAK,EAAE,oBAAoB;EAC3B,QAAQ,EAAE,wBAAwB;EAClC,OAAO,EAAE,gBAAgB;EACzB,OAAO,EAAE;AACX,CAAC;AAED,OAAO,SAAS,WAAW,CAAC,KAAuB,EAAe;EAChE,MAAM,OAAO,GAAG,MAAM,KAAK,CAAC,OAAO,IAAI,MAAM;EAC7C,MAAM,IAAI,GAAG,MAAO,KAAK,CAAC,IAAI,KAAK,IAAI,GAAG,SAAS,GAAI,KAAK,CAAC,IAAI,IAAI,aAAa,CAAC,KAAK,CAAC,IAAI,CAAG;EAChG;IAAA;MAAA;MAAA;MAAA;MAAA;IAAA,iCAEK,IAAI;MAAA,IAAC,IAAI;QAAA,OAAE,OAAO,CAAC,CAAC,KAAK,KAAK;MAAA;MAAA,IAAE,QAAQ;QAAA;MAAA;MAAA;QAAA,yBACtC,IAAI;UAAA,IAAC,IAAI;YAAA,OAAE,IAAI,CAAC,CAAC;UAAA;UAAA,UAAI,KAAK;YAAA;YAAA,kCAAe,KAAK,CAAC,CAAC;YAAA;UAAA;QAAuB;MAAA;IAAA;IAAA,iCAEzE,IAAI;MAAA,IAAC,IAAI;QAAA,OAAE,KAAK,CAAC,MAAM,EAAE,MAAM;MAAA;MAAA,IAAE,QAAQ;QAAA;UAAA;UAAA,uBAAyC,KAAK,CAAC,KAAK;UAAA;QAAA;MAAA;MAAA;QAAA;UAAA;UAAA;UAAA;QAAA,sBAEnF,KAAK,CAAC,KAAK;QAAA,kCACjB,GAAG;UAAA,IAAC,IAAI;YAAA,OAAE,KAAK,CAAC,MAAM;UAAA;UAAA,UAAI,KAAK;YAAA;YAAA,iBAA+B,KAAK;YAAA;UAAA;QAAQ;QAAA;MAAA;IAAA;IAAA;MAAA,UAPrE,oBAAoB,KAAK,CAAC,KAAK,IAAI,EAAE,EAAE;QAAA,OAAa,KAAK,CAAC,IAAI;QAAA,OAAgB,OAAO,CAAC,CAAC;QAAA,OAAS,KAAK,CAAC,KAAK;MAAA;MAAA;MAAA;MAAA;MAAA;IAAA;MAAA;MAAA;MAAA;MAAA;IAAA;IAAA;EAAA;AAY5H;AAEA,eAAe,WAAW","ignoreList":[]}
@@ -1,13 +1,10 @@
1
- export { Area } from "./Area";
2
1
  export { Avatar } from "./Avatar";
3
2
  export { AvatarFaces, AvatarStack } from "./AvatarStack";
4
3
  export { BudgetList, budgetState } from "./BudgetList";
5
4
  export { ChangeList } from "./ChangeList";
6
5
  export { DescriptionList } from "./DescriptionList";
7
6
  export { DotStrip } from "./DotStrip";
8
- export { FactGroup } from "./FactGroup";
9
7
  export { Field } from "./Field";
10
- export { FieldGrid } from "./FieldGrid";
11
8
  export { LinkCard } from "./LinkCard";
12
9
  export { NotFoundState } from "./NotFoundState";
13
10
  export { NOTICE_CARD_CLASSES, NoticeCard } from "./NoticeCard";
@@ -18,7 +15,6 @@ export { ProgressBar, progressBarParts } from "./ProgressBar";
18
15
  export { ProgressRing } from "./ProgressRing";
19
16
  export { PERSON_COLORS, personColor } from "./person-color";
20
17
  export { ResourceCard } from "./ResourceCard";
21
- export { RowGroup } from "./RowGroup";
22
18
  export { Section } from "./Section";
23
19
  export { createDelayedLoading, Skeleton } from "./Skeleton";
24
20
  export { StatCell } from "./StatCell";
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["surfaces/index.ts"],"sourcesContent":["export type { AreaProps } from \"./Area\";\nexport { Area } from \"./Area\";\nexport type { AvatarProps, AvatarRing, AvatarShape, AvatarSize, AvatarTone } from \"./Avatar\";\nexport { Avatar } from \"./Avatar\";\nexport type { AvatarFacesPerson, AvatarFacesProps, AvatarStackPerson, AvatarStackProps } from \"./AvatarStack\";\nexport { AvatarFaces, AvatarStack } from \"./AvatarStack\";\nexport { type BudgetItem, type BudgetLevel, BudgetList, type BudgetListProps, budgetState } from \"./BudgetList\";\nexport type { ChangeListItem, ChangeListProps, ChangeTone } from \"./ChangeList\";\nexport { ChangeList } from \"./ChangeList\";\nexport type { DescriptionListItem, DescriptionListProps } from \"./DescriptionList\";\nexport { DescriptionList } from \"./DescriptionList\";\nexport type { DotStripProps, DotStripTone } from \"./DotStrip\";\nexport { DotStrip } from \"./DotStrip\";\nexport type { FactGroupItem, FactGroupProps } from \"./FactGroup\";\nexport { FactGroup } from \"./FactGroup\";\nexport type { FieldRowProps } from \"./Field\";\nexport { Field } from \"./Field\";\nexport type { FieldGridProps } from \"./FieldGrid\";\nexport { FieldGrid } from \"./FieldGrid\";\nexport type { LinkCardColor, LinkCardProps } from \"./LinkCard\";\nexport { LinkCard } from \"./LinkCard\";\nexport type { NotFoundStateAction, NotFoundStateProps } from \"./NotFoundState\";\nexport { NotFoundState } from \"./NotFoundState\";\nexport type { NoticeCardProps, NoticeGridProps, NoticeTone } from \"./NoticeCard\";\nexport { NOTICE_CARD_CLASSES, NoticeCard } from \"./NoticeCard\";\nexport type { NoticeRowProps } from \"./NoticeRow\";\nexport { NoticeRow } from \"./NoticeRow\";\nexport type { PaperProps, PaperTag } from \"./Paper\";\nexport { Paper } from \"./Paper\";\nexport type {\n PlaceholderAlign,\n PlaceholderProps,\n PlaceholderState,\n PlaceholderSurface,\n PlaceholderTone,\n PlaceholderVariant,\n} from \"./Placeholder\";\nexport { default as Placeholder } from \"./Placeholder\";\nexport type { ProgressBarPart, ProgressBarProps, ProgressBarSegment, ProgressBarTone } from \"./ProgressBar\";\nexport { ProgressBar, progressBarParts } from \"./ProgressBar\";\nexport type { ProgressRingProps, ProgressRingTone } from \"./ProgressRing\";\nexport { ProgressRing } from \"./ProgressRing\";\nexport { PERSON_COLORS, personColor } from \"./person-color\";\nexport type { ResourceCardColor, ResourceCardProps, ResourceCardState } from \"./ResourceCard\";\nexport { ResourceCard } from \"./ResourceCard\";\nexport type { RowGroupProps } from \"./RowGroup\";\nexport { RowGroup } from \"./RowGroup\";\nexport type { SectionFrame, SectionPartProps, SectionProps, SectionSize, SectionState, SectionTone } from \"./Section\";\nexport { Section } from \"./Section\";\nexport { createDelayedLoading, type DelayedLoadingOptions, Skeleton, type SkeletonProps } from \"./Skeleton\";\nexport type { StatCellAccent, StatCellCompare, StatCellDelta, StatCellProps, StatCellSize, StatCellTone } from \"./StatCell\";\nexport { StatCell } from \"./StatCell\";\nexport type {\n StatGridAction,\n StatGridColumns,\n StatGridProps,\n StatGridSize,\n StatGridSurface,\n StatGridVariant,\n} from \"./StatGrid\";\nexport { StatGrid } from \"./StatGrid\";\nexport type { StatusBadgeProps, StatusTone } from \"./StatusBadge\";\nexport { StatusBadge } from \"./StatusBadge\";\nexport type { TagProps, TagSize } from \"./Tag\";\nexport { Tag } from \"./Tag\";\n"],"mappings":"AACA,SAAS,IAAI,QAAQ,QAAQ;AAE7B,SAAS,MAAM,QAAQ,UAAU;AAEjC,SAAS,WAAW,EAAE,WAAW,QAAQ,eAAe;AACxD,SAA4C,UAAU,EAAwB,WAAW,QAAQ,cAAc;AAE/G,SAAS,UAAU,QAAQ,cAAc;AAEzC,SAAS,eAAe,QAAQ,mBAAmB;AAEnD,SAAS,QAAQ,QAAQ,YAAY;AAErC,SAAS,SAAS,QAAQ,aAAa;AAEvC,SAAS,KAAK,QAAQ,SAAS;AAE/B,SAAS,SAAS,QAAQ,aAAa;AAEvC,SAAS,QAAQ,QAAQ,YAAY;AAErC,SAAS,aAAa,QAAQ,iBAAiB;AAE/C,SAAS,mBAAmB,EAAE,UAAU,QAAQ,cAAc;AAE9D,SAAS,SAAS,QAAQ,aAAa;AAEvC,SAAS,KAAK,QAAQ,SAAS;AAS/B,SAAS,OAAO,IAAI,WAAW,QAAQ,eAAe;AAEtD,SAAS,WAAW,EAAE,gBAAgB,QAAQ,eAAe;AAE7D,SAAS,YAAY,QAAQ,gBAAgB;AAC7C,SAAS,aAAa,EAAE,WAAW,QAAQ,gBAAgB;AAE3D,SAAS,YAAY,QAAQ,gBAAgB;AAE7C,SAAS,QAAQ,QAAQ,YAAY;AAErC,SAAS,OAAO,QAAQ,WAAW;AACnC,SAAS,oBAAoB,EAA8B,QAAQ,QAA4B,YAAY;AAE3G,SAAS,QAAQ,QAAQ,YAAY;AASrC,SAAS,QAAQ,QAAQ,YAAY;AAErC,SAAS,WAAW,QAAQ,eAAe;AAE3C,SAAS,GAAG,QAAQ,OAAO","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["surfaces/index.ts"],"sourcesContent":["export type { AvatarProps, AvatarRing, AvatarShape, AvatarSize, AvatarTone } from \"./Avatar\";\nexport { Avatar } from \"./Avatar\";\nexport type { AvatarFacesPerson, AvatarFacesProps, AvatarStackPerson, AvatarStackProps } from \"./AvatarStack\";\nexport { AvatarFaces, AvatarStack } from \"./AvatarStack\";\nexport { type BudgetItem, type BudgetLevel, BudgetList, type BudgetListProps, budgetState } from \"./BudgetList\";\nexport type { ChangeListItem, ChangeListProps, ChangeTone } from \"./ChangeList\";\nexport { ChangeList } from \"./ChangeList\";\nexport type { DescriptionListItem, DescriptionListProps } from \"./DescriptionList\";\nexport { DescriptionList } from \"./DescriptionList\";\nexport type { DotStripProps, DotStripTone } from \"./DotStrip\";\nexport { DotStrip } from \"./DotStrip\";\nexport type { FieldRowProps } from \"./Field\";\nexport { Field } from \"./Field\";\nexport type { LinkCardColor, LinkCardProps } from \"./LinkCard\";\nexport { LinkCard } from \"./LinkCard\";\nexport type { NotFoundStateAction, NotFoundStateProps } from \"./NotFoundState\";\nexport { NotFoundState } from \"./NotFoundState\";\nexport type { NoticeCardProps, NoticeGridProps, NoticeTone } from \"./NoticeCard\";\nexport { NOTICE_CARD_CLASSES, NoticeCard } from \"./NoticeCard\";\nexport type { NoticeRowProps } from \"./NoticeRow\";\nexport { NoticeRow } from \"./NoticeRow\";\nexport type { PaperProps, PaperTag } from \"./Paper\";\nexport { Paper } from \"./Paper\";\nexport type {\n PlaceholderAlign,\n PlaceholderProps,\n PlaceholderState,\n PlaceholderSurface,\n PlaceholderVariant,\n} from \"./Placeholder\";\nexport { default as Placeholder } from \"./Placeholder\";\nexport type { ProgressBarPart, ProgressBarProps, ProgressBarSegment, ProgressBarTone } from \"./ProgressBar\";\nexport { ProgressBar, progressBarParts } from \"./ProgressBar\";\nexport type { ProgressRingProps, ProgressRingTone } from \"./ProgressRing\";\nexport { ProgressRing } from \"./ProgressRing\";\nexport { PERSON_COLORS, personColor } from \"./person-color\";\nexport type { ResourceCardColor, ResourceCardProps, ResourceCardState } from \"./ResourceCard\";\nexport { ResourceCard } from \"./ResourceCard\";\nexport type { SectionFrame, SectionPartProps, SectionProps, SectionSize, SectionState, SectionTone } from \"./Section\";\nexport { Section } from \"./Section\";\nexport { createDelayedLoading, type DelayedLoadingOptions, Skeleton, type SkeletonProps } from \"./Skeleton\";\nexport type { StatCellAccent, StatCellCompare, StatCellDelta, StatCellProps, StatCellSize, StatCellTone } from \"./StatCell\";\nexport { StatCell } from \"./StatCell\";\nexport type {\n StatGridAction,\n StatGridColumns,\n StatGridProps,\n StatGridSize,\n StatGridSurface,\n StatGridVariant,\n} from \"./StatGrid\";\nexport { StatGrid } from \"./StatGrid\";\nexport type { StatusBadgeProps, StatusTone } from \"./StatusBadge\";\nexport { StatusBadge } from \"./StatusBadge\";\nexport type { TagProps, TagSize } from \"./Tag\";\nexport { Tag } from \"./Tag\";\n"],"mappings":"AACA,SAAS,MAAM,QAAQ,UAAU;AAEjC,SAAS,WAAW,EAAE,WAAW,QAAQ,eAAe;AACxD,SAA4C,UAAU,EAAwB,WAAW,QAAQ,cAAc;AAE/G,SAAS,UAAU,QAAQ,cAAc;AAEzC,SAAS,eAAe,QAAQ,mBAAmB;AAEnD,SAAS,QAAQ,QAAQ,YAAY;AAErC,SAAS,KAAK,QAAQ,SAAS;AAE/B,SAAS,QAAQ,QAAQ,YAAY;AAErC,SAAS,aAAa,QAAQ,iBAAiB;AAE/C,SAAS,mBAAmB,EAAE,UAAU,QAAQ,cAAc;AAE9D,SAAS,SAAS,QAAQ,aAAa;AAEvC,SAAS,KAAK,QAAQ,SAAS;AAQ/B,SAAS,OAAO,IAAI,WAAW,QAAQ,eAAe;AAEtD,SAAS,WAAW,EAAE,gBAAgB,QAAQ,eAAe;AAE7D,SAAS,YAAY,QAAQ,gBAAgB;AAC7C,SAAS,aAAa,EAAE,WAAW,QAAQ,gBAAgB;AAE3D,SAAS,YAAY,QAAQ,gBAAgB;AAE7C,SAAS,OAAO,QAAQ,WAAW;AACnC,SAAS,oBAAoB,EAA8B,QAAQ,QAA4B,YAAY;AAE3G,SAAS,QAAQ,QAAQ,YAAY;AASrC,SAAS,QAAQ,QAAQ,YAAY;AAErC,SAAS,WAAW,QAAQ,eAAe;AAE3C,SAAS,GAAG,QAAQ,OAAO","ignoreList":[]}
@@ -0,0 +1,180 @@
1
+ import { template as _$template } from "solid-js/web";
2
+ import { mergeProps as _$mergeProps } from "solid-js/web";
3
+ import { getNextElement as _$getNextElement } from "solid-js/web";
4
+ import { insert as _$insert } from "solid-js/web";
5
+ import { createComponent as _$createComponent } from "solid-js/web";
6
+ import { memo as _$memo } from "solid-js/web";
7
+ var _tmpl$ = /*#__PURE__*/_$template(`<span class=k2-btn-label>`);
8
+ import { children as resolveChildren, Show } from "solid-js";
9
+ import { Dynamic } from "solid-js/web";
10
+ import { useUiMessages } from "../intl/messages";
11
+ import { linkOr } from "./link";
12
+ import { Avatar, Icon } from "./marks";
13
+ /** The one button: round, one height per place, a link through `href`. An icon button must have a label. */
14
+ export const Button = props => {
15
+ // the label is made once and read from here (reading `children` again would make its JSX again)
16
+ const label = resolveChildren(() => props.children);
17
+ const iconOnly = () => label() === undefined;
18
+ return (// a disabled link is an anchor without an address: it leads nowhere and takes no `onNavigate`
19
+ _$createComponent(Dynamic, {
20
+ get component() {
21
+ return _$memo(() => !!(props.disabled && props.href !== undefined))() ? "a" : linkOr(props.href, "button");
22
+ },
23
+ get href() {
24
+ return _$memo(() => !!props.disabled)() ? undefined : props.href;
25
+ },
26
+ get onNavigate() {
27
+ return _$memo(() => !!(props.disabled || props.href === undefined))() ? undefined : props.onNavigate;
28
+ },
29
+ get type() {
30
+ return _$memo(() => !!props.href)() ? undefined : props.type ?? "button";
31
+ },
32
+ get disabled() {
33
+ return _$memo(() => !!props.href)() ? undefined : props.disabled;
34
+ },
35
+ get ["aria-disabled"]() {
36
+ return props.href && props.disabled ? "true" : undefined;
37
+ },
38
+ get ["aria-label"]() {
39
+ return _$memo(() => !!iconOnly())() ? props.label : undefined;
40
+ },
41
+ get title() {
42
+ return _$memo(() => !!iconOnly())() ? props.label : props.title;
43
+ },
44
+ get ["aria-haspopup"]() {
45
+ return props.menu ? "menu" : undefined;
46
+ },
47
+ get onClick() {
48
+ return props.onClick;
49
+ },
50
+ "class": "k2-btn",
51
+ "data-k2-part": "Button",
52
+ get ["data-variant"]() {
53
+ return _$memo(() => !!(props.variant && props.variant !== "secondary"))() ? props.variant : undefined;
54
+ },
55
+ get ["data-icon-only"]() {
56
+ return iconOnly() ? "" : undefined;
57
+ },
58
+ get ["data-menu"]() {
59
+ return props.menu ? "" : undefined;
60
+ },
61
+ get ["data-keep"]() {
62
+ return props.keep ? "" : undefined;
63
+ },
64
+ get children() {
65
+ return [_$createComponent(Show, {
66
+ get when() {
67
+ return props.avatar;
68
+ },
69
+ get fallback() {
70
+ return _$createComponent(Show, {
71
+ get when() {
72
+ return props.icon;
73
+ },
74
+ children: name => _$createComponent(Icon, {
75
+ get name() {
76
+ return name();
77
+ }
78
+ })
79
+ });
80
+ },
81
+ children: person => _$createComponent(Avatar, _$mergeProps(person))
82
+ }), _$createComponent(Show, {
83
+ get when() {
84
+ return !iconOnly();
85
+ },
86
+ get children() {
87
+ var _el$ = _$getNextElement(_tmpl$);
88
+ _$insert(_el$, label);
89
+ return _el$;
90
+ }
91
+ }), _$createComponent(Show, {
92
+ get when() {
93
+ return props.menu;
94
+ },
95
+ get children() {
96
+ return _$createComponent(Icon, {
97
+ name: "chevron-down"
98
+ });
99
+ }
100
+ }), _$createComponent(Show, {
101
+ get when() {
102
+ return props.forward;
103
+ },
104
+ get children() {
105
+ return _$createComponent(Icon, {
106
+ name: "chevron-right"
107
+ });
108
+ }
109
+ })];
110
+ }
111
+ })
112
+ );
113
+ };
114
+
115
+ /** An action as data turned into a button of the given weight; without an icon it always shows its label. */
116
+ export const ActionButton = props => _$createComponent(Show, {
117
+ get when() {
118
+ return _$memo(() => !!props.iconOnly)() && props.action.icon;
119
+ },
120
+ get fallback() {
121
+ return _$createComponent(Button, {
122
+ get variant() {
123
+ return props.variant;
124
+ },
125
+ get icon() {
126
+ return props.action.icon;
127
+ },
128
+ get forward() {
129
+ return props.action.forward;
130
+ },
131
+ get title() {
132
+ return _$memo(() => !!props.titled)() ? props.action.label : undefined;
133
+ },
134
+ get href() {
135
+ return props.action.href;
136
+ },
137
+ get onNavigate() {
138
+ return props.action.onNavigate;
139
+ },
140
+ onClick: () => props.action.onClick?.(),
141
+ get children() {
142
+ return props.action.label;
143
+ }
144
+ });
145
+ },
146
+ children: icon => _$createComponent(Button, {
147
+ get variant() {
148
+ return props.variant;
149
+ },
150
+ get icon() {
151
+ return icon();
152
+ },
153
+ get label() {
154
+ return props.action.label;
155
+ },
156
+ get href() {
157
+ return props.action.href;
158
+ },
159
+ get onNavigate() {
160
+ return props.action.onNavigate;
161
+ },
162
+ onClick: () => props.action.onClick?.()
163
+ })
164
+ });
165
+
166
+ /** The copy button beside a value (internal to Facts). */
167
+ export const CopyButton = props => {
168
+ const t = useUiMessages();
169
+ return _$createComponent(Button, {
170
+ variant: "ghost",
171
+ icon: "copy",
172
+ get label() {
173
+ return `${t().copy}: ${props.label}`;
174
+ },
175
+ onClick: () => {
176
+ void navigator.clipboard?.writeText(props.value);
177
+ }
178
+ });
179
+ };
180
+ //# sourceMappingURL=button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["v2/button.tsx"],"sourcesContent":["import { type JSX, children as resolveChildren, Show } from \"solid-js\";\nimport { Dynamic } from \"solid-js/web\";\nimport { useUiMessages } from \"../intl/messages\";\nimport { linkOr } from \"./link\";\nimport { Avatar, Icon } from \"./marks\";\nimport type { Action, OnNavigate, Person } from \"./types\";\n\ntype ButtonBase = {\n /**\n * The weight of the action: `primary` filled blue (one per page), `secondary` framed (default), `ghost` without a\n * frame, `text` a quiet text button in a head or at the end of a row. The height comes from the place.\n */\n variant?: \"primary\" | \"secondary\" | \"ghost\" | \"text\";\n /** A Tabler icon name before the label. */\n icon?: string;\n /** A person instead of an icon, such as the one a thread is assigned to. */\n avatar?: Person;\n /** A link that looks like a button. */\n href?: string;\n /** With `href`: opens the page in place on a plain click (see `OnNavigate`); a disabled link never calls it. */\n onNavigate?: OnNavigate;\n onClick?: JSX.EventHandler<HTMLElement, MouseEvent>;\n /** The button opens a menu: a chevron after the label. */\n menu?: boolean;\n /** The button leads further, to a page with more: a chevron to the right after the label. */\n forward?: boolean;\n disabled?: boolean;\n type?: \"button\" | \"submit\";\n /** Stays in a head on the phone, where the other actions move into the menu. */\n keep?: boolean;\n /**\n * A hint under the pointer, for a button whose words give way to its symbol in a narrow place (the bar of a\n * selection). An icon button shows its label as the hint by itself.\n */\n title?: string;\n};\n\nexport type ButtonProps = ButtonBase &\n (\n | { children: JSX.Element; label?: string }\n | {\n children?: undefined;\n /** An icon button needs a name (rule 5: wrong fails at once). */\n label: string;\n }\n );\n\n/** The one button: round, one height per place, a link through `href`. An icon button must have a label. */\nexport const Button = (props: ButtonProps) => {\n // the label is made once and read from here (reading `children` again would make its JSX again)\n const label = resolveChildren(() => props.children);\n const iconOnly = () => label() === undefined;\n return (\n // a disabled link is an anchor without an address: it leads nowhere and takes no `onNavigate`\n <Dynamic\n component={props.disabled && props.href !== undefined ? \"a\" : linkOr(props.href, \"button\")}\n href={props.disabled ? undefined : props.href}\n onNavigate={props.disabled || props.href === undefined ? undefined : props.onNavigate}\n type={props.href ? undefined : (props.type ?? \"button\")}\n disabled={props.href ? undefined : props.disabled}\n aria-disabled={props.href && props.disabled ? \"true\" : undefined}\n aria-label={iconOnly() ? props.label : undefined}\n title={iconOnly() ? props.label : props.title}\n aria-haspopup={props.menu ? \"menu\" : undefined}\n onClick={props.onClick}\n class=\"k2-btn\"\n data-k2-part=\"Button\"\n data-variant={props.variant && props.variant !== \"secondary\" ? props.variant : undefined}\n data-icon-only={iconOnly() ? \"\" : undefined}\n data-menu={props.menu ? \"\" : undefined}\n data-keep={props.keep ? \"\" : undefined}\n >\n <>\n <Show when={props.avatar} fallback={<Show when={props.icon}>{(name) => <Icon name={name()} />}</Show>}>\n {(person) => <Avatar {...person()} />}\n </Show>\n <Show when={!iconOnly()}>\n <span class=\"k2-btn-label\">{label()}</span>\n </Show>\n <Show when={props.menu}>\n <Icon name=\"chevron-down\" />\n </Show>\n <Show when={props.forward}>\n <Icon name=\"chevron-right\" />\n </Show>\n </>\n </Dynamic>\n );\n};\n\n/** An action as data turned into a button of the given weight; without an icon it always shows its label. */\nexport const ActionButton = (props: { action: Action; variant?: ButtonProps[\"variant\"]; iconOnly?: boolean; titled?: boolean }) => (\n <Show\n when={props.iconOnly && props.action.icon}\n fallback={\n <Button\n variant={props.variant}\n icon={props.action.icon}\n forward={props.action.forward}\n title={props.titled ? props.action.label : undefined}\n href={props.action.href}\n onNavigate={props.action.onNavigate}\n onClick={() => props.action.onClick?.()}\n >\n {props.action.label}\n </Button>\n }\n >\n {(icon) => (\n <Button\n variant={props.variant}\n icon={icon()}\n label={props.action.label}\n href={props.action.href}\n onNavigate={props.action.onNavigate}\n onClick={() => props.action.onClick?.()}\n />\n )}\n </Show>\n);\n\n/** The copy button beside a value (internal to Facts). */\nexport const CopyButton = (props: { label: string; value: string }) => {\n const t = useUiMessages();\n return (\n <Button\n variant=\"ghost\"\n icon=\"copy\"\n label={`${t().copy}: ${props.label}`}\n onClick={() => {\n void navigator.clipboard?.writeText(props.value);\n }}\n />\n );\n};\n"],"mappings":";;;;;;;AAAA,SAAmB,QAAQ,IAAI,eAAe,EAAE,IAAI,QAAQ,UAAU;AACtE,SAAS,OAAO,QAAQ,cAAc;AACtC,SAAS,aAAa,QAAQ,kBAAkB;AAChD,SAAS,MAAM,QAAQ,QAAQ;AAC/B,SAAS,MAAM,EAAE,IAAI,QAAQ,SAAS;AA2CtC;AACA,OAAO,MAAM,MAAM,GAAI,KAAkB,IAAK;EAC5C;EACA,MAAM,KAAK,GAAG,eAAe,CAAC,MAAM,KAAK,CAAC,QAAQ,CAAC;EACnD,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,CAAC,KAAK,SAAS;EAC5C,QACE;IAAA,kBACC,OAAO;MAAA,IACN,SAAS;QAAA,OAAE,qBAAK,CAAC,QAAQ,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS,OAAG,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,QAAQ,CAAC;MAAA;MAAA,IAC1F,IAAI;QAAA,OAAE,oBAAK,CAAC,QAAQ,MAAG,SAAS,GAAG,KAAK,CAAC,IAAI;MAAA;MAAA,IAC7C,UAAU;QAAA,OAAE,qBAAK,CAAC,QAAQ,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS,OAAG,SAAS,GAAG,KAAK,CAAC,UAAU;MAAA;MAAA,IACrF,IAAI;QAAA,OAAE,oBAAK,CAAC,IAAI,MAAG,SAAS,GAAI,KAAK,CAAC,IAAI,IAAI,QAAS;MAAA;MAAA,IACvD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