viewkitjs 0.31.0 → 0.32.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 (289) hide show
  1. package/CHANGELOG.md +129 -0
  2. package/MIGRATION.md +40 -6
  3. package/README.md +1 -1
  4. package/fields/dist/query/index.d.ts +2 -0
  5. package/fields/dist/query/index.js +2 -0
  6. package/fields/dist/query/list-request.d.ts +148 -0
  7. package/fields/dist/query/list-request.js +125 -0
  8. package/fields/dist/query/saved-view.d.ts +15 -0
  9. package/fields/dist/query/saved-view.js +11 -0
  10. package/fields/dist/query/settings.d.ts +9 -0
  11. package/fields/dist/query/settings.js +9 -0
  12. package/fields/docs/reference/query.md +66 -0
  13. package/package.json +5 -1
  14. package/postgres/README.md +1 -0
  15. package/postgres/dist/handler.d.ts +53 -0
  16. package/postgres/dist/handler.js +211 -0
  17. package/postgres/dist/ids.d.ts +1 -1
  18. package/postgres/dist/ids.js +19 -1
  19. package/postgres/dist/index.d.ts +1 -0
  20. package/postgres/dist/index.js +1 -0
  21. package/postgres/dist/limits.d.ts +3 -1
  22. package/postgres/dist/limits.js +1 -1
  23. package/postgres/dist/list-fields.d.ts +10 -0
  24. package/postgres/dist/list-fields.js +36 -0
  25. package/postgres/dist/readable.d.ts +4 -0
  26. package/postgres/dist/readable.js +4 -0
  27. package/postgres/dist/refusals.d.ts +9 -2
  28. package/postgres/dist/refusals.js +6 -0
  29. package/postgres/docs/guides/field-map.md +2 -2
  30. package/postgres/docs/guides/list-handler.md +99 -0
  31. package/postgres/docs/index.md +1 -0
  32. package/postgres/docs/reference/postgres.md +11 -3
  33. package/views/README.md +2 -2
  34. package/views/dist/atoms/RowMenu.d.ts +7 -0
  35. package/views/dist/atoms/RowMenu.js +18 -16
  36. package/views/dist/atoms/carried.d.ts +5 -0
  37. package/views/dist/atoms/carried.js +7 -0
  38. package/views/dist/atoms/types.d.ts +3 -0
  39. package/views/dist/contract.d.ts +26 -6
  40. package/views/dist/contract.js +25 -0
  41. package/views/dist/controls/alert-dialog/alert-dialog.js +2 -1
  42. package/views/dist/controls/atoms.d.ts +2 -0
  43. package/views/dist/controls/atoms.js +2 -0
  44. package/views/dist/controls/avatar/avatar.d.ts +3 -3
  45. package/views/dist/controls/avatar/avatar.js +1 -1
  46. package/views/dist/controls/avatar/tokens.d.ts +44 -0
  47. package/views/dist/controls/avatar/tokens.js +11 -0
  48. package/views/dist/controls/avatar.css +22 -5
  49. package/views/dist/controls/choice/tokens.d.ts +0 -4
  50. package/views/dist/controls/choice/tokens.js +0 -1
  51. package/views/dist/controls/choice.css +3 -3
  52. package/views/dist/controls/controls.d.ts +6 -0
  53. package/views/dist/controls/controls.js +10 -2
  54. package/views/dist/controls/customize/map-customize-body.js +1 -1
  55. package/views/dist/controls/field/field.d.ts +19 -4
  56. package/views/dist/controls/field/field.js +63 -5
  57. package/views/dist/controls/field/tokens.d.ts +4 -0
  58. package/views/dist/controls/field/tokens.js +1 -0
  59. package/views/dist/controls/field.css +41 -16
  60. package/views/dist/controls/glyphs/glyphs.d.ts +10 -0
  61. package/views/dist/controls/glyphs/glyphs.js +173 -0
  62. package/views/dist/controls/index.d.ts +2 -1
  63. package/views/dist/controls/index.js +2 -1
  64. package/views/dist/controls/input/input.js +5 -2
  65. package/views/dist/controls/input/tokens.d.ts +4 -0
  66. package/views/dist/controls/input/tokens.js +1 -0
  67. package/views/dist/controls/input.css +31 -3
  68. package/views/dist/controls/internal/icons.js +10 -0
  69. package/views/dist/controls/internal/keep-focus.d.ts +2 -0
  70. package/views/dist/controls/internal/keep-focus.js +17 -0
  71. package/views/dist/controls/internal/watch-frame.d.ts +2 -0
  72. package/views/dist/controls/internal/watch-frame.js +33 -0
  73. package/views/dist/controls/markdown/map-markdown.d.ts +4 -0
  74. package/views/dist/controls/markdown/map-markdown.js +5 -0
  75. package/views/dist/controls/menu/map-menu.js +2 -2
  76. package/views/dist/controls/menu-list/menu-list.d.ts +3 -0
  77. package/views/dist/controls/menu-list/menu-list.js +5 -4
  78. package/views/dist/controls/modal/modal.js +5 -1
  79. package/views/dist/controls/pane/pane.js +2 -1
  80. package/views/dist/controls/phone-header/header-bar.d.ts +5 -1
  81. package/views/dist/controls/phone-header/header-bar.js +2 -2
  82. package/views/dist/controls/phone-header.css +11 -1
  83. package/views/dist/controls/picker/map-picker.js +3 -0
  84. package/views/dist/controls/picker/picker.d.ts +14 -0
  85. package/views/dist/controls/picker/picker.js +30 -10
  86. package/views/dist/controls/picker.css +2 -0
  87. package/views/dist/controls/popover/popover.js +2 -1
  88. package/views/dist/controls/radio/radio.d.ts +5 -3
  89. package/views/dist/controls/radio/radio.js +18 -2
  90. package/views/dist/controls/radio/tokens.d.ts +44 -0
  91. package/views/dist/controls/radio/tokens.js +11 -0
  92. package/views/dist/controls/radio.css +79 -1
  93. package/views/dist/controls/select/select.d.ts +4 -0
  94. package/views/dist/controls/select/select.js +11 -5
  95. package/views/dist/controls/select/tokens.d.ts +8 -0
  96. package/views/dist/controls/select/tokens.js +2 -0
  97. package/views/dist/controls/select.css +17 -0
  98. package/views/dist/controls/setting-row/looks.d.ts +1 -1
  99. package/views/dist/controls/setting-row/looks.js +9 -4
  100. package/views/dist/controls/setting-row/setting-row.d.ts +45 -10
  101. package/views/dist/controls/setting-row/setting-row.js +82 -15
  102. package/views/dist/controls/setting-row/tokens.d.ts +74 -2
  103. package/views/dist/controls/setting-row/tokens.js +19 -1
  104. package/views/dist/controls/setting-row.css +135 -14
  105. package/views/dist/controls/sheet/bottom-sheet.d.ts +10 -2
  106. package/views/dist/controls/sheet/bottom-sheet.js +6 -3
  107. package/views/dist/controls/sheet.css +4 -1
  108. package/views/dist/controls/sort-editor/sort-editor.js +3 -2
  109. package/views/dist/controls/sort-editor.css +8 -2
  110. package/views/dist/controls/switch-row/tokens.d.ts +0 -12
  111. package/views/dist/controls/switch-row/tokens.js +0 -3
  112. package/views/dist/controls/switch-row.css +3 -7
  113. package/views/dist/controls/switch.css +17 -7
  114. package/views/dist/controls/tag/tag.d.ts +3 -1
  115. package/views/dist/controls/tag/tag.js +2 -2
  116. package/views/dist/controls/tag/tokens.d.ts +4 -0
  117. package/views/dist/controls/tag/tokens.js +1 -0
  118. package/views/dist/controls/tag-field/tag-field.d.ts +5 -1
  119. package/views/dist/controls/tag-field/tag-field.js +11 -5
  120. package/views/dist/controls/tag-field/tokens.d.ts +16 -0
  121. package/views/dist/controls/tag-field/tokens.js +4 -0
  122. package/views/dist/controls/tag-field.css +19 -0
  123. package/views/dist/controls/tag.css +2 -0
  124. package/views/dist/controls/toolbar/toolbar.d.ts +15 -3
  125. package/views/dist/controls/toolbar/toolbar.js +22 -15
  126. package/views/dist/controls/toolbar-button/atom-toolbar-button.d.ts +14 -0
  127. package/views/dist/controls/toolbar-button/atom-toolbar-button.js +51 -0
  128. package/views/dist/controls/toolbar-button/toolbar-button.d.ts +1 -1
  129. package/views/dist/controls/toolbar-button/toolbar-button.js +2 -3
  130. package/views/dist/controls/toolbar-button.css +4 -0
  131. package/views/dist/controls/toolbar.css +5 -0
  132. package/views/dist/controls/views-list/map-view-menu.d.ts +3 -0
  133. package/views/dist/controls/views-list/map-view-menu.js +25 -0
  134. package/views/dist/controls/views-list/map-views-list-body.d.ts +28 -1
  135. package/views/dist/controls/views-list/map-views-list-body.js +39 -21
  136. package/views/dist/controls/views-list/rules.d.ts +2 -0
  137. package/views/dist/controls/views-list/view-menu.d.ts +7 -0
  138. package/views/dist/controls/views-list/view-menu.js +28 -24
  139. package/views/dist/controls/views-list/words.d.ts +2 -0
  140. package/views/dist/controls/views-list/words.js +1 -1
  141. package/views/dist/editors/EditorPanel.js +2 -1
  142. package/views/dist/editors/edit-session.js +2 -5
  143. package/views/dist/field-row/FieldRow.d.ts +4 -2
  144. package/views/dist/field-row/FieldRow.js +67 -20
  145. package/views/dist/field-row/FieldRowLane.d.ts +7 -2
  146. package/views/dist/field-row/FieldRowLane.js +4 -3
  147. package/views/dist/field-row/editors/RowEditor.d.ts +12 -0
  148. package/views/dist/field-row/editors/RowEditor.js +31 -1
  149. package/views/dist/field-row/editors/RowValueListEditor.d.ts +5 -1
  150. package/views/dist/field-row/editors/RowValueListEditor.js +4 -1
  151. package/views/dist/field-row/field-row-button.d.ts +5 -0
  152. package/views/dist/field-row/field-row-button.js +2 -0
  153. package/views/dist/fields/binding.d.ts +3 -2
  154. package/views/dist/fields/binding.js +38 -5
  155. package/views/dist/grid/chrome/GridColumnMenu.d.ts +4 -2
  156. package/views/dist/grid/chrome/GridColumnMenu.js +3 -2
  157. package/views/dist/grid/chrome/GridGroupMenu.d.ts +4 -1
  158. package/views/dist/grid/chrome/GridGroupMenu.js +4 -3
  159. package/views/dist/grid/chrome/GridHeader.d.ts +4 -1
  160. package/views/dist/grid/chrome/GridHeader.js +2 -2
  161. package/views/dist/grid/chrome/GridRow.js +6 -5
  162. package/views/dist/grid/chrome/GridRowCells.js +6 -9
  163. package/views/dist/grid/chrome/GridStructure.d.ts +4 -1
  164. package/views/dist/grid/chrome/GridStructure.js +4 -4
  165. package/views/dist/grid/chrome/GridTable.js +5 -2
  166. package/views/dist/grid/chrome/grid-column-menu-items.js +1 -1
  167. package/views/dist/grid/chrome/grid-row-menu-items.d.ts +27 -3
  168. package/views/dist/grid/chrome/grid-row-menu-items.js +92 -6
  169. package/views/dist/grid/chrome/grid-row-props.d.ts +7 -2
  170. package/views/dist/grid/chrome/grid-rows-menu.js +34 -6
  171. package/views/dist/grid/chrome/grid-table-props.d.ts +38 -7
  172. package/views/dist/grid/chrome/useGridBatchApi.d.ts +3 -1
  173. package/views/dist/grid/chrome/useGridBatchApi.js +4 -2
  174. package/views/dist/grid/chrome/useGridKeyboard.d.ts +4 -2
  175. package/views/dist/grid/chrome/useGridKeyboard.js +15 -9
  176. package/views/dist/grid/chrome/useGridPendingReconciliation.js +1 -2
  177. package/views/dist/grid/chrome/useGridTableInteractionModel.d.ts +1 -1
  178. package/views/dist/grid/chrome/useGridTableInteractionModel.js +11 -5
  179. package/views/dist/grid/core/commit-model.d.ts +20 -2
  180. package/views/dist/grid/core/editing-controller.d.ts +18 -0
  181. package/views/dist/grid/core/editing-controller.js +188 -42
  182. package/views/dist/grid/core/editing-model.d.ts +3 -0
  183. package/views/dist/grid/core/editing-model.js +3 -0
  184. package/views/dist/grid/core/save-path.d.ts +24 -0
  185. package/views/dist/grid/core/save-path.js +122 -0
  186. package/views/dist/grid/core/spreadsheet-operations.d.ts +3 -0
  187. package/views/dist/grid/core/spreadsheet-operations.js +23 -0
  188. package/views/dist/grid/index.d.ts +3 -2
  189. package/views/dist/grid/index.js +1 -0
  190. package/views/dist/internal/field-rows.d.ts +26 -0
  191. package/views/dist/internal/field-rows.js +8 -0
  192. package/views/dist/internal/page-close.d.ts +7 -0
  193. package/views/dist/internal/page-close.js +43 -0
  194. package/views/dist/list/browser-views-store.d.ts +10 -0
  195. package/views/dist/list/browser-views-store.js +182 -0
  196. package/views/dist/list/index.d.ts +23 -0
  197. package/views/dist/list/index.js +8 -0
  198. package/views/dist/list/menu.d.ts +31 -0
  199. package/views/dist/list/menu.js +76 -0
  200. package/views/dist/list/parts.d.ts +6 -0
  201. package/views/dist/list/parts.js +59 -0
  202. package/views/dist/list/registry.d.ts +11 -0
  203. package/views/dist/list/registry.js +31 -0
  204. package/views/dist/list/root.d.ts +40 -0
  205. package/views/dist/list/root.js +128 -0
  206. package/views/dist/list/slot.d.ts +14 -0
  207. package/views/dist/list/slot.js +22 -0
  208. package/views/dist/list/source.d.ts +11 -0
  209. package/views/dist/list/source.js +31 -0
  210. package/views/dist/list/store.d.ts +87 -0
  211. package/views/dist/list/store.js +115 -0
  212. package/views/dist/list/toolbar.d.ts +6 -0
  213. package/views/dist/list/toolbar.js +359 -0
  214. package/views/dist/list/views-axis.d.ts +5 -0
  215. package/views/dist/list/views-axis.js +96 -0
  216. package/views/dist/list/views-store.d.ts +41 -0
  217. package/views/dist/list/views-store.js +1 -0
  218. package/views/dist/list/views.d.ts +67 -0
  219. package/views/dist/list/views.js +400 -0
  220. package/views/dist/model/preferences.js +1 -1
  221. package/views/dist/model/prefs-buckets.js +1 -1
  222. package/views/dist/panels/index.d.ts +3 -1
  223. package/views/dist/panels/index.js +1 -0
  224. package/views/dist/panels/react/customize-body.js +1 -0
  225. package/views/dist/panels/react/toolbar/ReadyToolbar.d.ts +41 -4
  226. package/views/dist/panels/react/toolbar/ReadyToolbar.js +6 -326
  227. package/views/dist/panels/react/toolbar/Toolbar.d.ts +9 -1
  228. package/views/dist/panels/react/toolbar/Toolbar.js +34 -23
  229. package/views/dist/panels/react/toolbar/ToolbarButton.js +4 -1
  230. package/views/dist/panels/react/toolbar/ToolbarNew.js +1 -1
  231. package/views/dist/panels/react/toolbar/ToolbarQuickFilters.d.ts +2 -2
  232. package/views/dist/panels/react/toolbar/ToolbarQuickFilters.js +3 -1
  233. package/views/dist/panels/react/toolbar/ToolbarSearch.js +1 -1
  234. package/views/dist/panels/react/toolbar/context.d.ts +10 -2
  235. package/views/dist/panels/react/toolbar/context.js +3 -1
  236. package/views/dist/panels/react/views-row/FoldingViewRow.d.ts +1 -1
  237. package/views/dist/panels/react/views-row/FoldingViewRow.js +15 -4
  238. package/views/dist/panels/react/views-row/PillGroup.d.ts +5 -2
  239. package/views/dist/panels/react/views-row/PillGroup.js +16 -7
  240. package/views/dist/panels/react/views-row/ViewPicker.js +2 -12
  241. package/views/dist/panels/react/views-row/ViewPickerRow.d.ts +4 -2
  242. package/views/dist/panels/react/views-row/ViewPickerRow.js +9 -5
  243. package/views/dist/panels/react.d.ts +2 -2
  244. package/views/dist/panels/toolbar/edit-view.d.ts +7 -1
  245. package/views/dist/panels/toolbar/edit-view.js +14 -0
  246. package/views/dist/panels/toolbar/model.d.ts +5 -0
  247. package/views/dist/panels/toolbar/model.js +7 -3
  248. package/views/dist/panels/view-state.d.ts +5 -3
  249. package/views/dist/panels/views-row/model.d.ts +19 -2
  250. package/views/dist/panels/views-row/model.js +14 -0
  251. package/views/dist/provider/ViewsProvider.d.ts +16 -7
  252. package/views/dist/provider/ViewsProvider.js +23 -5
  253. package/views/dist/provider/components.d.ts +43 -2
  254. package/views/dist/provider/context.d.ts +2 -1
  255. package/views/dist/provider/context.js +1 -1
  256. package/views/dist/provider/ports.d.ts +19 -12
  257. package/views/dist/provider/ports.js +69 -1
  258. package/views/dist/react.d.ts +1 -1
  259. package/views/dist/styles.css +418 -59
  260. package/views/dist/styles.unlayered.css +418 -59
  261. package/views/docs/contract.md +42 -31
  262. package/views/docs/controls/avatar.md +11 -0
  263. package/views/docs/controls/choice.md +0 -1
  264. package/views/docs/controls/field.md +3 -0
  265. package/views/docs/controls/input.md +1 -0
  266. package/views/docs/controls/radio.md +16 -1
  267. package/views/docs/controls/select.md +2 -0
  268. package/views/docs/controls/setting-row.md +18 -0
  269. package/views/docs/controls/switch-row.md +0 -3
  270. package/views/docs/controls/tag-field.md +4 -0
  271. package/views/docs/controls/tag.md +1 -0
  272. package/views/docs/getting-started.md +2 -2
  273. package/views/docs/guides/atoms.md +2 -2
  274. package/views/docs/guides/columns.md +1 -1
  275. package/views/docs/guides/ports.md +1 -1
  276. package/views/docs/guides/the-grid.md +34 -7
  277. package/views/docs/guides/the-provider.md +4 -2
  278. package/views/docs/index.md +1 -0
  279. package/views/docs/reference/controls.md +35 -25
  280. package/views/docs/reference/editors-session.md +1 -1
  281. package/views/docs/reference/field-row.md +9 -1
  282. package/views/docs/reference/grid.md +14 -8
  283. package/views/docs/reference/list.md +227 -0
  284. package/views/docs/reference/looks.md +1 -1
  285. package/views/docs/reference/panels-react.md +17 -12
  286. package/views/docs/reference/panels.md +8 -5
  287. package/views/docs/reference/react.md +11 -9
  288. package/views/docs/reference/views.md +2 -2
  289. package/views/skills/views/SKILL.md +9 -6
@@ -0,0 +1,173 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { Spinner } from "../spinner/spinner.js";
4
+ function glyph(paths, filled = false) {
5
+ return function ViewsGlyph({ className }) {
6
+ return (_jsx("svg", { className: className, viewBox: "0 0 24 24", fill: filled ? "currentColor" : "none", stroke: filled ? "none" : "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: paths.map((d) => _jsx("path", { d: d }, d)) }));
7
+ };
8
+ }
9
+ const IconAdjustments = glyph(["M14 6m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0", "M4 6l8 0", "M16 6l4 0", "M8 12m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0", "M4 12l2 0", "M10 12l10 0", "M17 18m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0", "M4 18l11 0", "M19 18l1 0"]);
10
+ const IconDotsVertical = glyph(["M11 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", "M11 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", "M11 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"]);
11
+ const IconLayout = glyph(["M4 4m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v1a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z", "M4 13m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v3a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z", "M14 4m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z"]);
12
+ const IconColumns = glyph(["M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z", "M12 4l0 16"]);
13
+ const IconDownload = glyph(["M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2", "M7 11l5 5l5 -5", "M12 4l0 12"]);
14
+ const IconShare = glyph(["M6 12m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0", "M18 6m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0", "M18 18m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0", "M8.7 10.7l6.6 -3.4", "M8.7 13.3l6.6 3.4"]);
15
+ const IconFilter = glyph(["M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z"]);
16
+ function ViewsLoading({ className }) {
17
+ return _jsx(Spinner, { className: className, label: "" });
18
+ }
19
+ const IconLetterT = glyph(["M6 4l12 0", "M12 4l0 16"]);
20
+ const IconAlignLeft = glyph(["M4 6l16 0", "M4 12l10 0", "M4 18l14 0"]);
21
+ const IconHash = glyph(["M5 9l14 0", "M5 15l14 0", "M11 4l-4 16", "M17 4l-4 16"]);
22
+ const IconPercentage = glyph(["M16 17a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", "M6 7a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", "M6 18l12 -12"]);
23
+ const IconCurrencyDollar = glyph(["M16.7 8a3 3 0 0 0 -2.7 -2h-4a3 3 0 0 0 0 6h4a3 3 0 0 1 0 6h-4a3 3 0 0 1 -2.7 -2", "M12 3v3m0 12v3"]);
24
+ const IconCalendar = glyph(["M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12", "M16 3v4", "M8 3v4", "M4 11h16", "M11 15h1", "M12 15v3"]);
25
+ const IconCalendarTime = glyph(["M11.795 21h-6.795a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v4", "M14 18a4 4 0 1 0 8 0a4 4 0 1 0 -8 0", "M15 3v4", "M7 3v4", "M3 11h16", "M18 16.496v1.504l1 1"]);
26
+ const IconHourglass = glyph(["M6.5 7h11", "M6.5 17h11", "M6 20v-2a6 6 0 1 1 12 0v2a1 1 0 0 1 -1 1h-10a1 1 0 0 1 -1 -1", "M6 4v2a6 6 0 1 0 12 0v-2a1 1 0 0 0 -1 -1h-10a1 1 0 0 0 -1 1"]);
27
+ const IconToggleLeft = glyph(["M6 12a2 2 0 1 0 4 0a2 2 0 1 0 -4 0", "M2 12a6 6 0 0 1 6 -6h8a6 6 0 0 1 6 6a6 6 0 0 1 -6 6h-8a6 6 0 0 1 -6 -6"]);
28
+ const IconSelector = glyph(["M8 9l4 -4l4 4", "M16 15l-4 4l-4 -4"]);
29
+ const IconCircleDot = glyph(["M11 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", "M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"]);
30
+ const IconTags = glyph(["M3 8v4.172a2 2 0 0 0 .586 1.414l5.71 5.71a2.41 2.41 0 0 0 3.408 0l3.592 -3.592a2.41 2.41 0 0 0 0 -3.408l-5.71 -5.71a2 2 0 0 0 -1.414 -.586h-4.172a2 2 0 0 0 -2 2", "M18 19l1.592 -1.592a4.82 4.82 0 0 0 0 -6.816l-4.592 -4.592", "M7 10h-.01"]);
31
+ const IconArrowsLeftRight = glyph(["M21 17l-18 0", "M6 10l-3 -3l3 -3", "M3 7l18 0", "M18 20l3 -3l-3 -3"]);
32
+ const IconUser = glyph(["M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0", "M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"]);
33
+ const IconLink = glyph(["M9 15l6 -6", "M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464", "M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463"]);
34
+ const IconWorld = glyph(["M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0", "M3.6 9h16.8", "M3.6 15h16.8", "M11.5 3a17 17 0 0 0 0 18", "M12.5 3a17 17 0 0 1 0 18"]);
35
+ const IconMail = glyph(["M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10", "M3 7l9 6l9 -6"]);
36
+ const IconPhone = glyph(["M5 4h4l2 5l-2.5 1.5a11 11 0 0 0 5 5l1.5 -2.5l5 2v4a2 2 0 0 1 -2 2a16 16 0 0 1 -15 -15a2 2 0 0 1 2 -2"]);
37
+ const IconMapPin = glyph(["M9 11a3 3 0 1 0 6 0a3 3 0 0 0 -6 0", "M17.657 16.657l-4.243 4.243a2 2 0 0 1 -2.827 0l-4.244 -4.243a8 8 0 1 1 11.314 0"]);
38
+ const IconId = glyph(["M3 7a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v10a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3l0 -10", "M7 10a2 2 0 1 0 4 0a2 2 0 1 0 -4 0", "M15 8l2 0", "M15 12l2 0", "M7 16l10 0"]);
39
+ const IconUserCircle = glyph(["M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0", "M9 10a3 3 0 1 0 6 0a3 3 0 1 0 -6 0", "M6.168 18.849a4 4 0 0 1 3.832 -2.849h4a4 4 0 0 1 3.834 2.855"]);
40
+ const IconTextCaption = glyph(["M4 15h16", "M4 5a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -4", "M4 20h12"]);
41
+ const IconArrowsHorizontal = glyph(["M7 8l-4 4l4 4", "M17 8l4 4l-4 4", "M3 12l18 0"]);
42
+ const IconSearch = glyph(["M3 10a7 7 0 1 0 14 0a7 7 0 1 0 -14 0", "M21 21l-6 -6"]);
43
+ const IconSum = glyph(["M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2"]);
44
+ const IconMathFunction = glyph(["M3 19a2 2 0 0 0 2 2c2 0 2 -4 3 -9s1 -9 3 -9a2 2 0 0 1 2 2", "M5 12h6", "M15 12l6 6", "M15 18l6 -6"]);
45
+ const IconCalculator = glyph(["M4 5a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -14", "M8 8a1 1 0 0 1 1 -1h6a1 1 0 0 1 1 1v1a1 1 0 0 1 -1 1h-6a1 1 0 0 1 -1 -1l0 -1", "M8 14l0 .01", "M12 14l0 .01", "M16 14l0 .01", "M8 17l0 .01", "M12 17l0 .01", "M16 17l0 .01"]);
46
+ const IconBolt = glyph(["M13 3l0 7l6 0l-8 11l0 -7l-6 0l8 -11"]);
47
+ const IconKey = glyph(["M16.555 3.843l3.602 3.602a2.877 2.877 0 0 1 0 4.069l-2.643 2.643a2.877 2.877 0 0 1 -4.069 0l-.301 -.301l-6.558 6.558a2 2 0 0 1 -1.239 .578l-.175 .008h-1.172a1 1 0 0 1 -.993 -.883l-.007 -.117v-1.172a2 2 0 0 1 .467 -1.284l.119 -.13l.414 -.414h2v-2h2v-2l2.144 -2.144l-.301 -.301a2.877 2.877 0 0 1 0 -4.069l2.643 -2.643a2.877 2.877 0 0 1 4.069 0", "M15 9h.01"]);
48
+ const IconSettings = glyph(["M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065", "M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0"]);
49
+ const IconPlus = glyph(["M12 5l0 14", "M5 12l14 0"]);
50
+ const IconPencil = glyph(["M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4", "M13.5 6.5l4 4"]);
51
+ const IconTrash = glyph(["M4 7l16 0", "M10 11l0 6", "M14 11l0 6", "M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12", "M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3"]);
52
+ const IconCopy = glyph(["M7 9.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667l0 -8.666", "M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1"]);
53
+ const IconCut = glyph(["M4 17a3 3 0 1 0 6 0a3 3 0 1 0 -6 0", "M14 17a3 3 0 1 0 6 0a3 3 0 1 0 -6 0", "M9.15 14.85l8.85 -10.85", "M6 4l8.85 10.85"]);
54
+ const IconClipboard = glyph(["M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-2", "M9 5a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2"]);
55
+ const IconEraser = glyph(["M19 20h-10.5l-4.21 -4.3a1 1 0 0 1 0 -1.41l10 -10a1 1 0 0 1 1.41 0l5 5a1 1 0 0 1 0 1.41l-9.2 9.3", "M18 13.3l-6.3 -6.3"]);
56
+ const IconEyeOff = glyph(["M10.585 10.587a2 2 0 0 0 2.829 2.828", "M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87", "M3 3l18 18"]);
57
+ const IconEye = glyph(["M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0", "M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6"]);
58
+ const IconLock = glyph(["M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6", "M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0", "M8 11v-4a4 4 0 1 1 8 0v4"]);
59
+ const IconPin = glyph(["M15 4.5l-4 4l-4 1.5l-1.5 1.5l7 7l1.5 -1.5l1.5 -4l4 -4", "M9 15l-4.5 4.5", "M14.5 4l5.5 5.5"]);
60
+ const IconTextWrap = glyph(["M4 6l16 0", "M4 18l5 0", "M4 12h13a3 3 0 0 1 0 6h-4l2 -2m0 4l-2 -2"]);
61
+ const IconDots = glyph(["M4 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", "M11 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", "M18 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"]);
62
+ const IconX = glyph(["M18 6l-12 12", "M6 6l12 12"]);
63
+ const IconCheck = glyph(["M5 12l5 5l10 -10"]);
64
+ const IconAlertTriangle = glyph(["M12 9v4", "M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0", "M12 16h.01"]);
65
+ const IconGripVertical = glyph(["M8 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", "M8 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", "M8 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", "M14 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", "M14 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", "M14 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"]);
66
+ const IconArrowUpRight = glyph(["M17 7l-10 10", "M8 7l9 0l0 9"]);
67
+ const IconSquareCheck = glyph(["M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14", "M9 12l2 2l4 -4"]);
68
+ const IconChevronDown = glyph(["M6 9l6 6l6 -6"]);
69
+ const IconChevronRight = glyph(["M9 6l6 6l-6 6"]);
70
+ const IconCaretDownFilled = glyph(["M18 9c.852 0 1.297 .986 .783 1.623l-.076 .084l-6 6a1 1 0 0 1 -1.32 .083l-.094 -.083l-6 -6l-.083 -.094l-.054 -.077l-.054 -.096l-.017 -.036l-.027 -.067l-.032 -.108l-.01 -.053l-.01 -.06l-.004 -.057v-.118l.005 -.058l.009 -.06l.01 -.052l.032 -.108l.027 -.067l.07 -.132l.065 -.09l.073 -.081l.094 -.083l.077 -.054l.096 -.054l.036 -.017l.067 -.027l.108 -.032l.053 -.01l.06 -.01l.057 -.004l12.059 -.002z"], true);
71
+ const IconCaretRightFilled = glyph(["M9 6c0 -.852 .986 -1.297 1.623 -.783l.084 .076l6 6a1 1 0 0 1 .083 1.32l-.083 .094l-6 6l-.094 .083l-.077 .054l-.096 .054l-.036 .017l-.067 .027l-.108 .032l-.053 .01l-.06 .01l-.057 .004l-.059 .002l-.059 -.002l-.058 -.005l-.06 -.009l-.052 -.01l-.108 -.032l-.067 -.027l-.132 -.07l-.09 -.065l-.081 -.073l-.083 -.094l-.054 -.077l-.054 -.096l-.017 -.036l-.027 -.067l-.032 -.108l-.01 -.053l-.01 -.06l-.004 -.057l-.002 -12.059z"], true);
72
+ const IconArrowUp = glyph(["M12 5l0 14", "M18 11l-6 -6", "M6 11l6 -6"]);
73
+ const IconArrowDown = glyph(["M12 5l0 14", "M18 13l-6 6", "M6 13l6 6"]);
74
+ const IconCornerDownLeft = glyph(["M18 6v6a3 3 0 0 1 -3 3h-10l4 -4m0 8l-4 -4"]);
75
+ const IconClock = glyph(["M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0", "M12 7v5l3 3"]);
76
+ const IconProgress = glyph(["M10 20.777a8.942 8.942 0 0 1 -2.48 -.969", "M14 3.223a9.003 9.003 0 0 1 0 17.554", "M4.579 17.093a8.961 8.961 0 0 1 -1.227 -2.592", "M3.124 10.5c.16 -.95 .468 -1.85 .9 -2.675l.169 -.305", "M6.907 4.579a8.954 8.954 0 0 1 3.093 -1.356"]);
77
+ const IconArrowLeft = glyph(["M5 12l14 0", "M5 12l6 6", "M5 12l6 -6"]);
78
+ const IconArrowRight = glyph(["M5 12l14 0", "M13 18l6 -6", "M13 6l6 6"]);
79
+ const IconLayoutRows = glyph(["M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12", "M4 12l16 0"]);
80
+ const IconArrowsSort = glyph(["M3 9l4 -4l4 4m-4 -4v14", "M21 15l-4 4l-4 -4m4 4v-14"]);
81
+ const IconSortAscending = glyph(["M4 6l7 0", "M4 12l7 0", "M4 18l9 0", "M15 9l3 -3l3 3", "M18 6l0 12"]);
82
+ const IconSortDescending = glyph(["M4 6l9 0", "M4 12l7 0", "M4 18l7 0", "M15 15l3 3l3 -3", "M18 6l0 12"]);
83
+ const IconRotate = glyph(["M19.95 11a8 8 0 1 0 -.5 4m.5 5v-5h-5"]);
84
+ export const CONTROL_ICONS = {
85
+ text: IconLetterT,
86
+ longText: IconAlignLeft,
87
+ number: IconHash,
88
+ percent: IconPercentage,
89
+ currency: IconCurrencyDollar,
90
+ date: IconCalendar,
91
+ datetime: IconCalendarTime,
92
+ duration: IconHourglass,
93
+ boolean: IconToggleLeft,
94
+ select: IconSelector,
95
+ status: IconCircleDot,
96
+ multiselect: IconTags,
97
+ relation: IconArrowsLeftRight,
98
+ user: IconUser,
99
+ url: IconLink,
100
+ domain: IconWorld,
101
+ email: IconMail,
102
+ phone: IconPhone,
103
+ location: IconMapPin,
104
+ name: IconId,
105
+ actor: IconUserCircle,
106
+ rich_text: IconTextCaption,
107
+ range: IconArrowsHorizontal,
108
+ lookup: IconSearch,
109
+ rollup: IconSum,
110
+ formula: IconMathFunction,
111
+ computed: IconCalculator,
112
+ automation: IconBolt,
113
+ apiKey: IconKey,
114
+ system: IconSettings,
115
+ add: IconPlus,
116
+ edit: IconPencil,
117
+ delete: IconTrash,
118
+ copy: IconCopy,
119
+ cut: IconCut,
120
+ paste: IconClipboard,
121
+ clear: IconEraser,
122
+ hide: IconEyeOff,
123
+ show: IconEye,
124
+ lock: IconLock,
125
+ pin: IconPin,
126
+ wrap: IconTextWrap,
127
+ more: IconDots,
128
+ close: IconX,
129
+ check: IconCheck,
130
+ warning: IconAlertTriangle,
131
+ drag: IconGripVertical,
132
+ resize: IconArrowsHorizontal,
133
+ open: IconArrowUpRight,
134
+ selectRow: IconSquareCheck,
135
+ chevronDown: IconChevronDown,
136
+ chevronRight: IconChevronRight,
137
+ caretDown: IconCaretDownFilled,
138
+ caretRight: IconCaretRightFilled,
139
+ sortAsc: IconArrowUp,
140
+ sortDesc: IconArrowDown,
141
+ enter: IconCornerDownLeft,
142
+ calendar: IconCalendar,
143
+ time: IconClock,
144
+ progress: IconProgress,
145
+ moveLeft: IconArrowLeft,
146
+ moveRight: IconArrowRight,
147
+ group: IconLayoutRows,
148
+ clearSort: IconArrowsSort,
149
+ sortRowsUp: IconSortAscending,
150
+ sortRowsDown: IconSortDescending,
151
+ search: IconSearch,
152
+ reset: IconRotate,
153
+ options: IconAdjustments,
154
+ person: IconUser,
155
+ moreVertical: IconDotsVertical,
156
+ layout: IconLayout,
157
+ columns: IconColumns,
158
+ sort: IconArrowsSort,
159
+ back: IconArrowLeft,
160
+ copyLink: IconLink,
161
+ export: IconDownload,
162
+ share: IconShare,
163
+ loading: ViewsLoading,
164
+ filter: IconFilter,
165
+ filterStatus: IconCircleDot,
166
+ filterCategory: IconSelector,
167
+ filterMetric: IconHash,
168
+ };
169
+ const BY_NAME = CONTROL_ICONS;
170
+ export function MapAppIcon({ name, className }) {
171
+ const Glyph = Object.hasOwn(BY_NAME, name) ? BY_NAME[name] : undefined;
172
+ return Glyph ? _jsx(Glyph, { className: className }) : null;
173
+ }
@@ -9,6 +9,7 @@ export { Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonClass
9
9
  export { leadingGlyph } from "./button/map-button.js";
10
10
  export { buttonOwnAttrs, buttonOwnOptions, type ButtonOwnLook } from "./button/own-look.js";
11
11
  export { LoadingBar, Spinner, type LoadingBarProps, type SpinnerProps } from "./spinner/spinner.js";
12
+ export { CONTROL_ICONS } from "./glyphs/glyphs.js";
12
13
  export { POPUP_HOST, popupHostOf } from "./internal/popup-host.js";
13
14
  export type { Anchor } from "./internal/anchor.js";
14
15
  export { Scrollbar } from "./scrollbar/scrollbar.js";
@@ -130,5 +131,5 @@ export { LinksEditor, useLinksEditor, type LinksEditorAction, type LinksEditorLe
130
131
  export { found, heldOf, leadAfter, offered, removed, said, saidShort, setValue, ticked, type LinkChoice, type LinkField, type LinkFieldKind, type LinkValue, } from "./links-editor/links.js";
131
132
  export { LINKS_EDITOR_WORDS, linksWords, type LinksEditorWords } from "./links-editor/words.js";
132
133
  export { TagField, type TagFieldProps } from "./tag-field/tag-field.js";
133
- export { SettingRow, SettingRows, SwitchRow, SwitchRows, type SettingAction, type SettingRowProps, type SettingRowsProps, type SwitchRowProps } from "./setting-row/setting-row.js";
134
+ export { SettingChevron, SettingIcon, SettingRow, SettingRows, SwitchRow, SwitchRows, useSettingRowWorn, useSettingRowsRow, type SettingAction, type SettingRowProps, type SettingRowsProps, type SettingState, type SwitchRowProps } from "./setting-row/setting-row.js";
134
135
  export { SETTING_ROW_ATTRS, settingRowWornOf } from "./setting-row/looks.js";
@@ -4,6 +4,7 @@ export { Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonClass
4
4
  export { leadingGlyph } from "./button/map-button.js";
5
5
  export { buttonOwnAttrs, buttonOwnOptions } from "./button/own-look.js";
6
6
  export { LoadingBar, Spinner } from "./spinner/spinner.js";
7
+ export { CONTROL_ICONS } from "./glyphs/glyphs.js";
7
8
  export { POPUP_HOST, popupHostOf } from "./internal/popup-host.js";
8
9
  export { Scrollbar } from "./scrollbar/scrollbar.js";
9
10
  export { Kbd } from "./kbd/kbd.js";
@@ -122,5 +123,5 @@ export { LinksEditor, useLinksEditor, } from "./links-editor/links-editor.js";
122
123
  export { found, heldOf, leadAfter, offered, removed, said, saidShort, setValue, ticked, } from "./links-editor/links.js";
123
124
  export { LINKS_EDITOR_WORDS, linksWords } from "./links-editor/words.js";
124
125
  export { TagField } from "./tag-field/tag-field.js";
125
- export { SettingRow, SettingRows, SwitchRow, SwitchRows } from "./setting-row/setting-row.js";
126
+ export { SettingChevron, SettingIcon, SettingRow, SettingRows, SwitchRow, SwitchRows, useSettingRowWorn, useSettingRowsRow } from "./setting-row/setting-row.js";
126
127
  export { SETTING_ROW_ATTRS, settingRowWornOf } from "./setting-row/looks.js";
@@ -4,6 +4,7 @@ import { Input as BaseInput } from "@base-ui/react/input";
4
4
  import { Combobox as BaseCombobox } from "@base-ui/react/combobox";
5
5
  import { cx } from "../../internal/cx.js";
6
6
  import { Button } from "../button/button.js";
7
+ import { InFieldRow } from "../../internal/field-rows.js";
7
8
  import { phoneMark, usePhoneForm } from "../internal/phone.js";
8
9
  import { useAutofill } from "./autofill.js";
9
10
  import { inputOwnAttrs, kindLook } from "./looks.js";
@@ -80,6 +81,7 @@ function useKeptCursor(el, type) {
80
81
  export const Input = React.forwardRef(function Input({ size = "md", numeric = false, multiline = false, grow = false, maxLines, minLines, lines: linesGiven, autofill = true, look: lookGiven, chrome = "field", fills = true, combobox = false, saving = false, saved = false, className, style, ...props }, ref) {
81
82
  const fill = useAutofill(), look = kindLook(chrome, lookGiven), phone = usePhoneForm();
82
83
  const group = React.useContext(InGroup), grouped = group != null;
84
+ const inRow = React.useContext(InFieldRow) && chrome === "field";
83
85
  const lines = linesGiven ?? look?.lines ?? group?.lines;
84
86
  const long = multiline && !combobox;
85
87
  const bare = grouped || chrome === "bare", field = !bare, set = long && lines != null, grows = long && !set && (field ? grow : bare);
@@ -102,7 +104,7 @@ export const Input = React.forwardRef(function Input({ size = "md", numeric = fa
102
104
  if (field) {
103
105
  const { "data-force": force, ...rest } = props;
104
106
  props = rest;
105
- return (_jsxs("span", { className: cx("o-input o-input-lone o-smooth o-smooth-ease", sized(size), long && "o-input-long", grows && "o-input-grow", className), style: start || style ? { ...start, ...style } : undefined, "data-kit": "input", ...phoneMark(phone), ...(force != null ? { "data-force": force } : {}), ...(look ? inputOwnAttrs(look) : {}), onMouseDown: (e) => {
107
+ return (_jsxs("span", { className: cx("o-input o-input-lone", inRow ? "o-input-inrow" : "o-smooth o-smooth-ease", sized(size), long && "o-input-long", grows && "o-input-grow", className), style: start || style ? { ...start, ...style } : undefined, "data-kit": "input", ...phoneMark(phone), ...(force != null ? { "data-force": force } : {}), ...(look ? inputOwnAttrs(look) : {}), onMouseDown: (e) => {
106
108
  const box = own.current;
107
109
  if (e.target !== e.currentTarget || !box || box.disabled)
108
110
  return;
@@ -120,9 +122,10 @@ export const Input = React.forwardRef(function Input({ size = "md", numeric = fa
120
122
  });
121
123
  export function InputGroup({ size = "md", look: lookGiven, chrome, saving = false, saved = false, className, children, onMouseDown, ...props }) {
122
124
  const look = kindLook(chrome, lookGiven), phone = usePhoneForm();
125
+ const inRow = React.useContext(InFieldRow) && (chrome ?? "field") === "field";
123
126
  const tall = React.Children.toArray(children).some((c) => React.isValidElement(c)
124
127
  && ((c.type === Input && c.props.multiline) || (c.type === InputGroupAddon && (c.props.side === "top" || c.props.side === "bottom"))));
125
- return (_jsx(InGroup.Provider, { value: { size, cell: false, lines: look?.lines }, children: _jsxs("div", { role: "group", className: cx("o-input o-input-group o-smooth o-smooth-ease", sized(size), tall && "o-input-long", className), ...phoneMark(phone), ...(look ? inputOwnAttrs(look) : {}), onMouseDown: (e) => { onMouseDown?.(e); pressGroup(e); }, ...(saving ? { "aria-busy": true } : {}), ...props, children: [children, _jsx(SaveMark, { saving: saving, saved: saved })] }) }));
128
+ return (_jsx(InGroup.Provider, { value: { size, cell: false, lines: look?.lines }, children: _jsxs("div", { role: "group", className: cx("o-input o-input-group", inRow ? "o-input-inrow" : "o-smooth o-smooth-ease", sized(size), tall && "o-input-long", className), ...phoneMark(phone), ...(look ? inputOwnAttrs(look) : {}), onMouseDown: (e) => { onMouseDown?.(e); pressGroup(e); }, ...(saving ? { "aria-busy": true } : {}), ...props, children: [children, _jsx(SaveMark, { saving: saving, saved: saved })] }) }));
126
129
  }
127
130
  export function InputGroupAddon({ side = "start", flush = false, className, children, ...props }) {
128
131
  return _jsx("div", { "data-side": side, ...(flush ? { "data-flush": "" } : {}), className: cx("o-input-addon", className), ...props, children: children });
@@ -58,6 +58,10 @@ export declare const INPUT_TOKENS: readonly [{
58
58
  readonly name: "--vk-fg";
59
59
  readonly kind: "colour";
60
60
  readonly outright: "--text";
61
+ }, {
62
+ readonly name: "--vk-fg-brand";
63
+ readonly kind: "colour";
64
+ readonly outright: "--link";
61
65
  }, {
62
66
  readonly name: "--vk-fg-disabled";
63
67
  readonly kind: "colour";
@@ -14,6 +14,7 @@ export const INPUT_TOKENS = [
14
14
  { name: "--vk-ease-in", kind: "motion", outright: "--ease-in" },
15
15
  { name: "--vk-ease-out", kind: "motion", outright: "--ease-out" },
16
16
  { name: "--vk-fg", kind: "colour", outright: "--text" },
17
+ { name: "--vk-fg-brand", kind: "colour", outright: "--link" },
17
18
  { name: "--vk-fg-disabled", kind: "colour", outright: "--text-disabled" },
18
19
  { name: "--vk-fg-subtle", kind: "colour", outright: "--text-subtle" },
19
20
  { name: "--vk-fg-subtlest", kind: "colour", outright: "--text-subtlest" },
@@ -65,10 +65,11 @@
65
65
  /* Disabled: a softer edge, a grey fill, no lift. */
66
66
  .o-input:is(:disabled, [data-disabled], :where(:has(.o-input-control:is(:disabled, [data-disabled])))) { --input-edge: var(--vk-border-subtle); --input-ground: var(--vk-neutral); box-shadow: none; color: var(--vk-fg-disabled); cursor: not-allowed; }
67
67
 
68
- /* Read-only: what it holds can be read, chosen and copied, not changed: a soft edge and no lift; it still
69
- takes the focus, and the pointer changes nothing. One that opens something is a
70
- box to press, not words to copy, and keeps a resting field's edge and lift. */
68
+ /* Read-only: what it holds can be read, chosen and copied, not changed: it stands sunken, its words subtle (KIT-938), in
69
+ focus too, with a soft edge and no lift at rest; it still takes the focus, and the pointer changes nothing. One that opens
70
+ something is a box to press, not words to copy, and keeps a resting field's ground, edge and lift. */
71
71
  .o-input:is([readonly], :where(:has(.o-input-control[readonly]))) { cursor: default; }
72
+ .o-input:is([readonly], :where(:has(.o-input-control[readonly]))):where(:not([aria-haspopup], :has(.o-input-control[aria-haspopup]))) { --input-ground: var(--vk-sunken); color: var(--vk-fg-subtle); }
72
73
  .o-input:is([readonly], :where(:has(.o-input-control[readonly]))):where(:not(:focus-visible, [data-force="focus"], [data-popup-open], [aria-haspopup], :has(:is(.o-input-control:focus-visible, .o-input-segment:focus, .o-input-control[aria-haspopup])))) { --input-edge: var(--vk-border-subtle); box-shadow: none; }
73
74
 
74
75
  /* ── The options a design picks (input/looks.ts) ─────────────────────────────────────────────────────
@@ -367,4 +368,31 @@ textarea.o-input-control.o-input-lines { flex: none; min-height: 0; max-height:
367
368
  @keyframes o-input-saved-leave { to { opacity: 0; } }
368
369
  @media (prefers-reduced-motion: reduce) { .o-input-save[data-save="saved"] { animation-duration: 1ms; } }
369
370
 
371
+ /* ── In a row of Field rows (VK-960; the settings canvas, round 3: look-ios.mjs .fv, .caret, .saved, .act): a Field placed in
372
+ Field rows is the card's row, and its Input or InputGroup stands typed in place there, as iOS's Settings draws a value beside
373
+ its label. No box in any state: no edge, ground, ring, lift or smooth outline, nor a size's height or padding; its words the
374
+ row's, in the text colour, the caret in the brand, a value wider than it cut with "…" at rest. Read-only, in the quietest text
375
+ with no caret. An InputGroup's start words are the value's prefix, in the quietest text and right against it; its end button
376
+ (copy) in the brand, 12 after the value, out of the way while the save mark stands there. The save mark (Saving, Saved) 12
377
+ after the value: its words 14, its check 16, the Spinner 18. The row lays it out (field.css): the value takes what the label
378
+ leaves, and the save mark and the end button never leave the row. Three classes, so no state or look of the box reaches it. */
379
+ .o-input.o-input-inrow.o-input-inrow {
380
+ flex: 1; align-self: stretch; height: auto; min-width: 0; padding: 0; border: 0 none; border-radius: 0; background: none; box-shadow: none; outline: none;
381
+ --input-pad-block: 0px; --input-pad-inline: 0px; --input-group-gap: 0px;
382
+ color: var(--vk-fg); font: inherit; caret-color: var(--vk-fg-brand); transition: none;
383
+ }
384
+ .o-input-inrow > .o-input-control { text-overflow: ellipsis; }
385
+ .o-input-inrow:has(> .o-input-control[readonly]) { color: var(--vk-fg-subtlest); caret-color: transparent; }
386
+ .o-input-inrow:is([data-disabled], :has(> .o-input-control:is(:disabled, [data-disabled]))) { color: var(--vk-fg-disabled); }
387
+ .o-input-inrow > .o-input-addon[data-side="start"] { color: var(--vk-fg-subtlest); }
388
+ .o-input-inrow > .o-input-addon[data-side="end"] { margin-inline-start: calc(var(--vk-spacing) * 3); }
389
+ .o-input-inrow > .o-input-addon[data-side="end"] .o-button.o-button { color: var(--vk-fg-brand); }
390
+ .o-input-inrow:has(> .o-input-save) > .o-input-addon[data-side="end"] { display: none; }
391
+ .o-input-inrow > .o-input-save.o-input-save {
392
+ margin-inline-start: calc(var(--vk-spacing) * 3); padding-inline-end: 0; gap: var(--vk-spacing);
393
+ font-size: var(--vk-font-size-sm); line-height: calc(var(--vk-font-size-sm) * var(--vk-line-height-sm));
394
+ }
395
+ .o-input-inrow > .o-input-save[data-save="saved"] > svg { width: calc(var(--vk-spacing) * 4); height: calc(var(--vk-spacing) * 4); }
396
+ .o-input-inrow > .o-input-save[data-save="saving"] svg { width: calc(var(--vk-spacing) * 4.5); height: calc(var(--vk-spacing) * 4.5); }
397
+
370
398
  }
@@ -2,6 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  const PATHS = {
3
3
  plus: ["M12 5l0 14", "M5 12l14 0"],
4
4
  down: ["M6 9l6 6l6 -6"],
5
+ "arrow-down": ["M12 5l0 14", "M18 13l-6 6", "M6 13l6 6"],
5
6
  trash: ["M4 7l16 0", "M10 11l0 6", "M14 11l0 6", "M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12", "M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3"],
6
7
  dots: ["M4 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", "M11 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", "M18 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"],
7
8
  x: ["M18 6l-12 12", "M6 6l12 12"],
@@ -48,6 +49,15 @@ const PATHS = {
48
49
  list: ["M9 6l11 0", "M9 12l11 0", "M9 18l11 0", "M5 6l0 .01", "M5 12l0 .01", "M5 18l0 .01"],
49
50
  pin: ["M15 4.5l-4 4l-4 1.5l-1.5 1.5l7 7l1.5 -1.5l1.5 -4l4 -4", "M9 15l-4.5 4.5", "M14.5 4l5.5 5.5"],
50
51
  bell: ["M10 5a2 2 0 1 1 4 0a7 7 0 0 1 4 6v3a4 4 0 0 0 2 3h-16a4 4 0 0 0 2 -3v-3a7 7 0 0 1 4 -6", "M9 17v1a3 3 0 0 0 6 0v-1"],
52
+ archive: ["M3 4m0 2a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v0a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2z", "M5 8v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-10", "M10 12l4 0"],
53
+ "user-plus": ["M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0", "M16 19h6", "M19 16v6", "M6 21v-2a4 4 0 0 1 4 -4h4"],
54
+ share: ["M8 9h-1a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-8a2 2 0 0 0 -2 -2h-1", "M12 14v-11", "M9 6l3 -3l3 3"],
55
+ key: ["M16.555 3.843l3.602 3.602a2.877 2.877 0 0 1 0 4.069l-2.643 2.643a2.877 2.877 0 0 1 -4.069 0l-.301 -.301l-6.558 6.558a2 2 0 0 1 -1.239 .578l-.175 .008h-1.172a1 1 0 0 1 -.993 -.883l-.007 -.117v-1.172a2 2 0 0 1 .467 -1.284l.119 -.13l.414 -.414h2v-2h2v-2l2.144 -2.144l-.301 -.301a2.877 2.877 0 0 1 0 -4.069l2.643 -2.643a2.877 2.877 0 0 1 4.069 0z", "M15 9h.01"],
56
+ bot: ["M6 6a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v4a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z", "M12 2v2", "M9 12v9", "M15 12v9", "M5 16l4 -2", "M15 14l4 2", "M9 18h6", "M10 8v.01", "M14 8v.01"],
57
+ layers: ["M12 4l-8 4l8 4l8 -4l-8 -4", "M4 12l8 4l8 -4", "M4 16l8 4l8 -4"],
58
+ sliders: ["M4 6l8 0", "M16 6l4 0", "M14 4v4", "M4 12l2 0", "M10 12l10 0", "M8 10v4", "M4 18l11 0", "M19 18l1 0", "M17 16v4"],
59
+ lock: ["M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6z", "M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0", "M8 11v-4a4 4 0 1 1 8 0v4"],
60
+ "dots-vertical": ["M11 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", "M11 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", "M11 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"],
51
61
  "star-filled": ["M8.243 7.34l-6.38 .925l-.113 .023a1 1 0 0 0 -.44 1.684l4.622 4.499l-1.09 6.355l-.013 .11a1 1 0 0 0 1.464 .944l5.706 -3l5.693 3l.1 .046a1 1 0 0 0 1.352 -1.1l-1.091 -6.355l4.624 -4.5l.078 -.085a1 1 0 0 0 -.633 -1.62l-6.38 -.926l-2.852 -5.78a1 1 0 0 0 -1.794 0l-2.853 5.78z"],
52
62
  "pin-filled": ["M15.113 3.21l.094 .083l5.5 5.5a1 1 0 0 1 -1.175 1.59l-3.172 3.171l-1.424 3.797a1 1 0 0 1 -.158 .277l-.07 .08l-1.5 1.5a1 1 0 0 1 -1.32 .082l-.095 -.083l-2.793 -2.792l-3.793 3.792a1 1 0 0 1 -1.497 -1.32l.083 -.094l3.792 -3.793l-2.792 -2.793a1 1 0 0 1 -.083 -1.32l.083 -.094l1.5 -1.5a1 1 0 0 1 .258 -.187l.098 -.042l3.796 -1.425l3.171 -3.17a1 1 0 0 1 1.497 -1.26z"],
53
63
  "bell-filled": ["M14.235 19c.865 0 1.322 1.024 .745 1.668a3.992 3.992 0 0 1 -2.98 1.332a3.992 3.992 0 0 1 -2.98 -1.332c-.552 -.616 -.158 -1.579 .634 -1.661l.11 -.006h4.471z", "M12 2c1.358 0 2.506 .903 2.875 2.141l.046 .171l.008 .043a8.013 8.013 0 0 1 4.024 6.069l.028 .287l.019 .289v2.931l.021 .136a3 3 0 0 0 1.143 1.847l.167 .117l.162 .099c.86 .487 .56 1.766 -.377 1.864l-.116 .006h-16c-1.028 0 -1.387 -1.364 -.493 -1.87a3 3 0 0 0 1.472 -2.063l.021 -.143l.001 -2.97a8 8 0 0 1 3.821 -6.454l.248 -.146l.01 -.043a3.003 3.003 0 0 1 2.562 -2.29l.182 -.017l.176 -.004z"],
@@ -0,0 +1,2 @@
1
+ /** Keeps the focus inside `popup` when a focused element in it leaves the page. The Sheet's and the Modal's. */
2
+ export declare function useKeptFocus(popup: HTMLElement | null): void;
@@ -0,0 +1,17 @@
1
+ import * as React from "react";
2
+ export function useKeptFocus(popup) {
3
+ React.useLayoutEffect(() => {
4
+ if (!popup)
5
+ return;
6
+ const doc = popup.ownerDocument;
7
+ const keep = (e) => {
8
+ const left = e.target;
9
+ if (e.relatedTarget || !left || typeof left.focus !== "function" || left === popup || !popup.contains(left) || !doc.hasFocus())
10
+ return;
11
+ queueMicrotask(() => { if (!left.isConnected && doc.activeElement === doc.body && popup.isConnected)
12
+ popup.focus({ preventScroll: true }); });
13
+ };
14
+ popup.addEventListener("focusout", keep, true);
15
+ return () => popup.removeEventListener("focusout", keep, true);
16
+ }, [popup]);
17
+ }
@@ -0,0 +1,2 @@
1
+ /** Calls `read` whenever one of `attrs` changes anywhere on the page; returns what stops it. */
2
+ export declare function watchFrame(attrs: readonly string[], read: () => void): () => void;
@@ -0,0 +1,33 @@
1
+ const readers = new Set();
2
+ let watch = null;
3
+ let watched = new Set();
4
+ function tell(changes) {
5
+ for (const r of [...readers])
6
+ if (changes.some((c) => c.attributeName != null && r.attrs.includes(c.attributeName)))
7
+ r.read();
8
+ }
9
+ function connect() {
10
+ const pending = watch?.takeRecords() ?? [];
11
+ watch?.disconnect();
12
+ watch = null;
13
+ if (pending.length)
14
+ tell(pending);
15
+ if (!readers.size) {
16
+ watched = new Set();
17
+ return;
18
+ }
19
+ watched = new Set([...readers].flatMap((r) => r.attrs));
20
+ watch = new MutationObserver(tell);
21
+ watch.observe(document.documentElement, { attributes: true, subtree: true, attributeFilter: [...watched] });
22
+ }
23
+ export function watchFrame(attrs, read) {
24
+ const reader = { attrs, read };
25
+ readers.add(reader);
26
+ if (!watch || attrs.some((a) => !watched.has(a)))
27
+ connect();
28
+ return () => {
29
+ readers.delete(reader);
30
+ if (!readers.size)
31
+ connect();
32
+ };
33
+ }
@@ -0,0 +1,4 @@
1
+ export declare function MapMarkdown({ source, className }: {
2
+ source: string;
3
+ className?: string;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ const KEEP_LINES = { whiteSpace: "pre-wrap", overflowWrap: "anywhere" };
3
+ export function MapMarkdown({ source, className }) {
4
+ return (_jsx("div", { className: className, style: KEEP_LINES, children: source }));
5
+ }
@@ -37,12 +37,12 @@ export function menuEntries(items, notNow = NO_REASON) {
37
37
  else if (item.children)
38
38
  out.push(ticks ? { kind: "pick", heading: item.label, ...choiceOf(ticks) } : { kind: "group", heading: item.label, entries: menuEntries(item.children, notNow) });
39
39
  else if (item.checked !== undefined)
40
- out.push({ kind: "check", label: item.label, checked: item.checked, onCheckedChange: () => item.onSelect?.(), disabled: item.disabled ? item.disabledReason ?? notNow : undefined });
40
+ out.push({ kind: "check", label: item.label, ...(item.icon != null && { icon: item.icon }), checked: item.checked, onCheckedChange: () => item.onSelect?.(), disabled: item.disabled ? item.disabledReason ?? notNow : undefined });
41
41
  else if (item.href)
42
42
  out.push({ kind: "link", icon: item.icon ?? null, label: item.label, href: item.href, onSelect: () => item.onSelect?.() });
43
43
  else
44
44
  out.push({ icon: item.icon ?? null, label: item.label, onSelect: item.onSelect, danger: item.destructive, disabled: item.disabled ? item.disabledReason ?? notNow : undefined,
45
- keys: item.shortcut ? [item.shortcut] : undefined });
45
+ keys: item.shortcut ? [item.shortcut] : undefined, ...(item.render && { body: item.render() }) });
46
46
  }
47
47
  return out;
48
48
  }
@@ -101,6 +101,9 @@ type MenuAction = {
101
101
  onSelect?: () => void;
102
102
  /** How many it holds, at its end in the quietest colour (a tab's count under More), or a Spinner while that loads. */
103
103
  count?: React.ReactNode;
104
+ /** The row's inside drawn by the app, in place of its icon, name, keys and count; `label` stays its name to a screen reader
105
+ * and to typing. Never a phone's tile. */
106
+ body?: React.ReactNode;
104
107
  };
105
108
  /** What its rows stand on, as worn around `el`. */
106
109
  export declare const menuListRowsOf: (el: Element | null) => string;
@@ -53,7 +53,7 @@ const rowToggle = (t) => t ? (_jsx(Toggle, { kind: "quiet", shape: "icon", size:
53
53
  const rowOpen = (name, glyphOf, onOpen) => name ? (_jsx(Button, { kind: "quiet", shape: "icon", size: "xs", className: "o-menu-open", tabIndex: -1, "aria-label": name, icon: glyphOf, onMouseDown: keepRow, onClick: (ev) => { ev.stopPropagation(); onOpen?.(); } })) : null;
54
54
  const part = (id, p) => (id ? `${id}-${p}` : undefined);
55
55
  const named = (id) => ["n", "v", "k", "c"].map((p) => `${id}-${p}`).join(" ");
56
- const actionBody = (e, id) => (_jsxs(_Fragment, { children: [e.icon, _jsx("span", { className: "o-menu-name", id: part(id, "n"), children: e.label }), e.keys && _jsx("span", { className: "o-menu-keys", id: part(id, "k"), children: e.keys.map((k) => _jsx("kbd", { children: k }, k)) }), e.count != null && _jsx("span", { className: "o-menu-count", id: part(id, "c"), children: e.count })] }));
56
+ const actionBody = (e, id) => e.body !== undefined ? _jsx("span", { className: "o-menu-name", id: part(id, "n"), children: e.body }) : (_jsxs(_Fragment, { children: [e.icon, _jsx("span", { className: "o-menu-name", id: part(id, "n"), children: e.label }), e.keys && _jsx("span", { className: "o-menu-keys", id: part(id, "k"), children: e.keys.map((k) => _jsx("kbd", { children: k }, k)) }), e.count != null && _jsx("span", { className: "o-menu-count", id: part(id, "c"), children: e.count })] }));
57
57
  const linkBody = (e, id) => _jsxs(_Fragment, { children: [e.icon, _jsx("span", { className: "o-menu-name", id: part(id, "n"), children: e.label }), e.external && strokeGlyph(AWAY, "o-menu-away")] });
58
58
  const checkBody = (e, id) => _jsxs(_Fragment, { children: [_jsx(CheckboxMark, {}), _jsx("span", { className: "o-menu-name", id: part(id, "n"), children: e.label })] });
59
59
  const actionsBody = (e, id) => _jsxs(_Fragment, { children: [e.icon, _jsx("span", { className: "o-menu-name", id: part(id, "n"), children: e.label }), e.detail != null && _jsx("span", { className: "o-menu-value", id: part(id, "v"), "data-on": e.inForce ? "" : undefined, children: e.detail }), strokeGlyph(MORE, "o-menu-more")] });
@@ -103,7 +103,7 @@ export function MenuListRows({ entries, host }) {
103
103
  return (_jsxs(BaseMenu.Group, { children: [e.heading && _jsx(BaseMenu.GroupLabel, { className: "o-list-heading", children: e.heading }), _jsx(BaseMenu.RadioGroup, { value: e.value, onValueChange: (v) => e.onChoose?.(v), children: e.choices.map((c) => _jsx(BaseMenu.RadioItem, { value: c.value, closeOnClick: true, className: "o-list-row o-smooth o-smooth-ease o-menu-row", children: choiceBody(c) }, c.value)) })] }, i));
104
104
  if (e.kind === "choices")
105
105
  return (_jsx(Sub, { trigger: choicesBody(e), host: host, children: _jsx(BaseMenu.RadioGroup, { value: e.value, onValueChange: (v) => e.onChoose?.(v), children: e.choices.map((c) => _jsx(BaseMenu.RadioItem, { value: c.value, label: c.label, closeOnClick: true, className: "o-list-row o-smooth o-smooth-ease o-menu-row", children: choiceBody(c) }, c.value)) }) }, i));
106
- return _jsx(BaseMenu.Item, { label: e.label, className: rowClass(e), disabled: !!e.disabled, title: e.disabled, onClick: e.onSelect, children: actionBody(e) }, i);
106
+ return _jsx(BaseMenu.Item, { label: e.label, "aria-label": e.body !== undefined ? e.label : undefined, className: rowClass(e), disabled: !!e.disabled, title: e.disabled, onClick: e.onSelect, children: actionBody(e) }, i);
107
107
  }) });
108
108
  }
109
109
  export function MenuListShown({ entries, label, open, on = [], className }) {
@@ -292,7 +292,7 @@ export function MenuListPanelRows({ label, entries, onOpen, ticks = "box", onMov
292
292
  export function tilesOf(entries, allRows) {
293
293
  if (allRows)
294
294
  return { entries };
295
- const plain = entries.filter((e) => (e.kind === undefined || e.kind === "action") && !e.danger && !e.disabled && e.count == null).slice(0, 4);
295
+ const plain = entries.filter((e) => (e.kind === undefined || e.kind === "action") && !e.danger && !e.disabled && e.count == null && e.body === undefined).slice(0, 4);
296
296
  if (plain.length < 3)
297
297
  return { entries };
298
298
  return { tiles: plain.map((e) => ({ icon: e.icon, label: e.label, onSelect: e.onSelect })), entries: entries.filter((e) => !plain.includes(e)) };
@@ -347,7 +347,8 @@ function PhoneRow({ row, onOpen, move, room, ticks = "switch", words = MENU_LIST
347
347
  return _jsxs(BaseButton, { className: "o-menu-list-row", ...mv, ...how, onClick: () => onOpen?.(row), children: [lead, body(row), endOf(row), glyph(MORE, "o-menu-list-more")] });
348
348
  if (row.kind === "choices")
349
349
  return (_jsxs(BaseButton, { className: "o-menu-list-row", ...mv, ...how, onClick: () => onOpen?.(row), children: [lead, body(row), endOf(row), _jsx("span", { className: "o-menu-list-value", children: row.detail ?? row.choices.find((c) => c.value === row.value)?.label }), glyph(MORE, "o-menu-list-more")] }));
350
- return _jsxs(BaseButton, { className: cx("o-menu-list-row", row.danger && "o-menu-list-danger"), ...mv, ...how, disabled: !!row.disabled, onClick: row.onSelect, children: [lead, body(row, row.disabled), endOf(row)] });
350
+ const own = "body" in row && row.body !== undefined ? _jsxs("span", { className: "o-menu-list-name", children: [row.body, row.disabled != null && _jsx("span", { className: "o-menu-list-note", children: row.disabled })] }) : null;
351
+ return _jsxs(BaseButton, { className: cx("o-menu-list-row", row.danger && "o-menu-list-danger"), ...mv, ...how, disabled: !!row.disabled, onClick: row.onSelect, "aria-label": own ? row.label : undefined, children: [lead, own ?? body(row, row.disabled), own ? null : endOf(row)] });
351
352
  }
352
353
  export function MenuListRow({ label, value, onSelect, className }) {
353
354
  return _jsxs(BaseButton, { className: cx("o-menu-list-row", className), onClick: onSelect, children: [_jsx("span", { className: "o-menu-list-name", children: _jsx("span", { children: label }) }), _jsx("span", { className: "o-menu-list-value", children: value })] });
@@ -3,7 +3,9 @@ import * as React from "react";
3
3
  import { Dialog as BaseDialog } from "@base-ui/react/dialog";
4
4
  import { AlertDialog } from "../alert-dialog/alert-dialog.js";
5
5
  import { Button } from "../button/button.js";
6
+ import { useKeptFocus } from "../internal/keep-focus.js";
6
7
  import { PhoneHost, usePhone } from "../internal/phone.js";
8
+ import { OutOfFieldRows } from "../../internal/field-rows.js";
7
9
  import { usePopupHost } from "../internal/popup-host.js";
8
10
  import { Notice } from "../notice/notice.js";
9
11
  import { Scrollbar } from "../scrollbar/scrollbar.js";
@@ -38,6 +40,8 @@ export function Modal({ open, onOpenChange, title, mark, path, onOpenAsPage, siz
38
40
  const [overPopup, setOverPopup] = React.useState(false);
39
41
  React.useLayoutEffect(() => { setOverPopup(!!ref.current?.closest('[data-kit="popover"]')); }, []);
40
42
  const over = overPopup ? "" : undefined;
43
+ const [popup, setPopup] = React.useState(null);
44
+ useKeptFocus(popup);
41
45
  const leave = () => { if (saving)
42
46
  return; if (dirty)
43
47
  setAsking(true);
@@ -58,5 +62,5 @@ export function Modal({ open, onOpenChange, title, mark, path, onOpenAsPage, siz
58
62
  return (_jsxs(_Fragment, { children: [_jsx("span", { ref: ref, hidden: true }), _jsxs(Sheet, { open: open, onOpenChange: (o) => { if (!o)
59
63
  leave(); }, label: title, form: "full", container: where, standing: standing, children: [_jsx(SheetHead, { title: title, left: _jsx(SheetButton, { "aria-label": cancel, icon: glyph(X), onClick: leave, disabled: saving }), right: foot !== "none" && action ? _jsx(SheetButton, { kind: "primary", "aria-label": action.label, icon: glyph(CHECK), onClick: act, disabled: saving || action.disabled }) : _jsx("span", {}) }), _jsxs(SheetBody, { children: [notice, children] }), guard] })] }));
60
64
  return (_jsxs(_Fragment, { children: [_jsx("span", { ref: ref, hidden: true }), _jsx(BaseDialog.Root, { open: open, onOpenChange: (o) => { if (!o)
61
- leave(); }, ...(standing ? { modal: false, disablePointerDismissal: true } : {}), children: _jsxs(BaseDialog.Portal, { container: where, children: [_jsx(BaseDialog.Backdrop, { className: "o-modal-backdrop", "data-over-popup": over }), _jsx(BaseDialog.Viewport, { className: "o-modal-viewport", "data-over-popup": over, children: _jsxs(BaseDialog.Popup, { className: "o-modal", "data-kit": "modal", "data-width": size, "aria-busy": saving || undefined, initialFocus: standing ? false : () => body.current?.querySelector("input:not([type=hidden]), textarea, [role='combobox'], .o-select-field") ?? true, children: [_jsxs("div", { className: "o-modal-cut o-smooth", children: [_jsxs("header", { className: "o-modal-head", children: [mark != null && _jsx("span", { className: "o-modal-mark", "aria-hidden": "true", children: mark }), path && _jsxs("span", { className: "o-modal-path", children: [_jsxs("span", { className: "o-modal-chip", children: [path.icon, _jsx("span", { className: "o-modal-chip-word", children: path.label })] }), glyph(NEXT)] }), _jsx(BaseDialog.Title, { className: "o-modal-title", children: title }), _jsxs("span", { className: "o-modal-tools", children: [onOpenAsPage && _jsx(Button, { kind: "quiet", shape: "icon", size: "xs", "aria-label": said.openAsPage, icon: glyph(EXPAND), onClick: onOpenAsPage }), _jsx(Button, { kind: "quiet", shape: "icon", size: "xs", "aria-label": said.close, icon: glyph(X), disabled: saving, onClick: leave })] })] }), _jsxs("div", { ref: body, className: "o-modal-body", children: [notice, children] }), _jsx(Scrollbar, { drawn: true }), foot !== "none" && (_jsxs("footer", { className: "o-modal-foot", children: [footStart != null && _jsx("span", { className: "o-modal-start", children: footStart }), _jsxs("span", { className: "o-modal-end", children: [foot === "both" && _jsx(Button, { className: "o-modal-cancel", disabled: saving, onClick: leave, children: cancel }), action && _jsx(Button, { kind: action.kind ?? "primary", loading: saving, disabled: action.disabled, onClick: act, children: action.label })] })] }))] }), guard] }) })] }) })] }));
65
+ leave(); }, ...(standing ? { modal: false, disablePointerDismissal: true } : {}), children: _jsxs(BaseDialog.Portal, { container: where, children: [_jsx(BaseDialog.Backdrop, { className: "o-modal-backdrop", "data-over-popup": over }), _jsx(BaseDialog.Viewport, { className: "o-modal-viewport", "data-over-popup": over, children: _jsxs(BaseDialog.Popup, { ref: setPopup, className: "o-modal", "data-kit": "modal", "data-width": size, "aria-busy": saving || undefined, initialFocus: standing ? false : () => body.current?.querySelector("input:not([type=hidden]), textarea, [role='combobox'], .o-select-field") ?? true, children: [_jsxs("div", { className: "o-modal-cut o-smooth", children: [_jsxs("header", { className: "o-modal-head", children: [mark != null && _jsx("span", { className: "o-modal-mark", "aria-hidden": "true", children: mark }), path && _jsxs("span", { className: "o-modal-path", children: [_jsxs("span", { className: "o-modal-chip", children: [path.icon, _jsx("span", { className: "o-modal-chip-word", children: path.label })] }), glyph(NEXT)] }), _jsx(BaseDialog.Title, { className: "o-modal-title", children: title }), _jsxs("span", { className: "o-modal-tools", children: [onOpenAsPage && _jsx(Button, { kind: "quiet", shape: "icon", size: "xs", "aria-label": said.openAsPage, icon: glyph(EXPAND), onClick: onOpenAsPage }), _jsx(Button, { kind: "quiet", shape: "icon", size: "xs", "aria-label": said.close, icon: glyph(X), disabled: saving, onClick: leave })] })] }), _jsx("div", { ref: body, className: "o-modal-body", children: _jsxs(OutOfFieldRows, { children: [notice, children] }) }), _jsx(Scrollbar, { drawn: true }), foot !== "none" && (_jsxs("footer", { className: "o-modal-foot", children: [footStart != null && _jsx("span", { className: "o-modal-start", children: footStart }), _jsxs("span", { className: "o-modal-end", children: [foot === "both" && _jsx(Button, { className: "o-modal-cancel", disabled: saving, onClick: leave, children: cancel }), action && _jsx(Button, { kind: action.kind ?? "primary", loading: saving, disabled: action.disabled, onClick: act, children: action.label })] })] }))] }), guard] }) })] }) })] }));
62
66
  }
@@ -2,6 +2,7 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
2
2
  import * as React from "react";
3
3
  import { Dialog } from "@base-ui/react/dialog";
4
4
  import { cx } from "../../internal/cx.js";
5
+ import { OutOfFieldRows } from "../../internal/field-rows.js";
5
6
  import { closeReasonOf } from "../internal/close-reason.js";
6
7
  import { Scrollbar } from "../scrollbar/scrollbar.js";
7
8
  import { paneAfter } from "./state.js";
@@ -61,7 +62,7 @@ export function Pane({ open, onOpenChange, container, opener, initialFocus = tru
61
62
  };
62
63
  if (!container)
63
64
  return null;
64
- return (_jsx(Dialog.Root, { open: open, onOpenChange: change, modal: false, disablePointerDismissal: true, children: _jsx(Dialog.Portal, { container: container, className: "o-pane-portal", children: _jsx(Dialog.Popup, { ref: popup, className: cx("o-pane", className), "data-kit": "pane", "aria-label": label, initialFocus: initialFocus ? popup : false, finalFocus: backTo, children: _jsx("div", { className: "o-pane-cut o-smooth", children: _jsx(InPane.Provider, { value: true, children: children }) }) }) }) }));
65
+ return (_jsx(Dialog.Root, { open: open, onOpenChange: change, modal: false, disablePointerDismissal: true, children: _jsx(Dialog.Portal, { container: container, className: "o-pane-portal", children: _jsx(Dialog.Popup, { ref: popup, className: cx("o-pane", className), "data-kit": "pane", "aria-label": label, initialFocus: initialFocus ? popup : false, finalFocus: backTo, children: _jsx("div", { className: "o-pane-cut o-smooth", children: _jsx(InPane.Provider, { value: true, children: _jsx(OutOfFieldRows, { children: children }) }) }) }) }) }));
65
66
  }
66
67
  export const InPane = React.createContext(false);
67
68
  export function PaneHead({ children, className }) {
@@ -4,6 +4,10 @@ export interface HeaderBarProps extends Omit<React.HTMLAttributes<HTMLDivElement
4
4
  left?: React.ReactNode;
5
5
  /** What stands in its middle: the title. */
6
6
  title: React.ReactNode;
7
+ /** A record's mark (a company's square, a person's face: the Avatar at 24), standing before the title and never shrinking, the
8
+ * title cut with … beside it; the two stand together, centred or at the left as `titleAt` says. Hidden from a screen reader:
9
+ * the title says the name. */
10
+ mark?: React.ReactNode;
7
11
  /** A quieter second line under the title: a page's or a sheet's description. */
8
12
  description?: React.ReactNode;
9
13
  /** The element that draws the description when it must be the caller's own (a sheet's Base UI Dialog.Description); a span by
@@ -15,4 +19,4 @@ export interface HeaderBarProps extends Omit<React.HTMLAttributes<HTMLDivElement
15
19
  right?: React.ReactNode;
16
20
  }
17
21
  /** The phone's header: a left place, the title and a right place, on the soft edge, over what scrolls. */
18
- export declare function HeaderBar({ left, title, description, descriptionRender, titleAt, right, className, ...props }: HeaderBarProps): import("react/jsx-runtime").JSX.Element;
22
+ export declare function HeaderBar({ left, title, mark, description, descriptionRender, titleAt, right, className, ...props }: HeaderBarProps): import("react/jsx-runtime").JSX.Element;
@@ -3,7 +3,7 @@ import { useRender } from "@base-ui/react/use-render";
3
3
  import { cx } from "../../internal/cx.js";
4
4
  import { GlassButtonGroup } from "../glass-button/glass-button.js";
5
5
  import { SoftEdge } from "./soft-edge.js";
6
- export function HeaderBar({ left, title, description, descriptionRender, titleAt = "center", right, className, ...props }) {
6
+ export function HeaderBar({ left, title, mark, description, descriptionRender, titleAt = "center", right, className, ...props }) {
7
7
  const shown = useRender({ defaultTagName: "span", render: descriptionRender, props: { className: "o-hd-bar-description", children: description } });
8
- return (_jsxs("div", { className: cx("o-hd-bar", className), "data-title-at": titleAt === "left" ? "left" : undefined, ...props, children: [_jsx(SoftEdge, { className: "o-hd-bar-edge" }), _jsx("span", { className: "o-hd-bar-side", children: left }), _jsxs("span", { className: "o-hd-bar-title", children: [title, description != null && shown] }), _jsx(GlassButtonGroup, { className: "o-hd-bar-side", children: right })] }));
8
+ return (_jsxs("div", { className: cx("o-hd-bar", className), "data-title-at": titleAt === "left" ? "left" : undefined, "data-mark": mark != null ? "" : undefined, ...props, children: [_jsx(SoftEdge, { className: "o-hd-bar-edge" }), _jsx("span", { className: "o-hd-bar-side", children: left }), _jsxs("span", { className: "o-hd-bar-title", children: [mark != null && _jsx("span", { className: "o-hd-bar-mark", "aria-hidden": "true", children: mark }), title, description != null && shown] }), _jsx(GlassButtonGroup, { className: "o-hd-bar-side", children: right })] }));
9
9
  }