viewkitjs 0.31.0 → 0.33.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 (449) hide show
  1. package/CHANGELOG.md +198 -0
  2. package/MIGRATION.md +40 -6
  3. package/README.md +1 -1
  4. package/fields/dist/index.d.ts +1 -1
  5. package/fields/dist/index.js +1 -1
  6. package/fields/dist/query/evaluate.d.ts +7 -0
  7. package/fields/dist/query/exact-number.d.ts +8 -2
  8. package/fields/dist/query/exact-number.js +14 -1
  9. package/fields/dist/query/index.d.ts +2 -0
  10. package/fields/dist/query/index.js +2 -0
  11. package/fields/dist/query/list-request.d.ts +148 -0
  12. package/fields/dist/query/list-request.js +125 -0
  13. package/fields/dist/query/saved-view.d.ts +15 -0
  14. package/fields/dist/query/saved-view.js +11 -0
  15. package/fields/dist/query/settings.d.ts +9 -0
  16. package/fields/dist/query/settings.js +9 -0
  17. package/fields/dist/query/sort.js +13 -10
  18. package/fields/dist/registry.js +5 -1
  19. package/fields/dist/types.d.ts +4 -1
  20. package/fields/dist/zod.d.ts +5 -0
  21. package/fields/dist/zod.js +10 -1
  22. package/fields/docs/guides/contact-values.md +12 -0
  23. package/fields/docs/guides/field-types.md +1 -1
  24. package/fields/docs/guides/queries.md +3 -1
  25. package/fields/docs/reference/fields.md +1 -0
  26. package/fields/docs/reference/query.md +66 -0
  27. package/package.json +5 -1
  28. package/postgres/README.md +1 -0
  29. package/postgres/dist/check.js +4 -1
  30. package/postgres/dist/definitions/formula-forms.js +3 -1
  31. package/postgres/dist/definitions/money.js +2 -1
  32. package/postgres/dist/handler.d.ts +53 -0
  33. package/postgres/dist/handler.js +211 -0
  34. package/postgres/dist/ids.d.ts +1 -1
  35. package/postgres/dist/ids.js +19 -1
  36. package/postgres/dist/index.d.ts +1 -0
  37. package/postgres/dist/index.js +1 -0
  38. package/postgres/dist/limits.d.ts +3 -1
  39. package/postgres/dist/limits.js +1 -1
  40. package/postgres/dist/list-fields.d.ts +10 -0
  41. package/postgres/dist/list-fields.js +36 -0
  42. package/postgres/dist/page.js +6 -3
  43. package/postgres/dist/readable.d.ts +4 -0
  44. package/postgres/dist/readable.js +4 -0
  45. package/postgres/dist/refusals.d.ts +9 -2
  46. package/postgres/dist/refusals.js +6 -0
  47. package/postgres/dist/rules.d.ts +15 -1
  48. package/postgres/dist/rules.js +16 -0
  49. package/postgres/dist/sort.js +7 -2
  50. package/postgres/docs/guides/definitions.md +1 -1
  51. package/postgres/docs/guides/field-map.md +3 -3
  52. package/postgres/docs/guides/list-handler.md +99 -0
  53. package/postgres/docs/index.md +1 -0
  54. package/postgres/docs/reference/definitions.md +1 -1
  55. package/postgres/docs/reference/postgres.md +12 -4
  56. package/views/README.md +2 -2
  57. package/views/dist/atoms/RowMenu.d.ts +7 -0
  58. package/views/dist/atoms/RowMenu.js +18 -16
  59. package/views/dist/atoms/ToolbarButton.d.ts +1 -1
  60. package/views/dist/atoms/ToolbarButton.js +4 -3
  61. package/views/dist/atoms/carried.d.ts +5 -0
  62. package/views/dist/atoms/carried.js +7 -0
  63. package/views/dist/atoms/frame-parts.d.ts +6 -0
  64. package/views/dist/atoms/frame-parts.js +15 -0
  65. package/views/dist/atoms/types.d.ts +19 -7
  66. package/views/dist/cells/cell-title.d.ts +3 -1
  67. package/views/dist/cells/cell-title.js +2 -2
  68. package/views/dist/cells/cell-values.js +2 -2
  69. package/views/dist/contract.d.ts +56 -11
  70. package/views/dist/contract.js +148 -0
  71. package/views/dist/controls/alert-dialog/alert-dialog.js +2 -1
  72. package/views/dist/controls/atoms.d.ts +2 -0
  73. package/views/dist/controls/atoms.js +2 -0
  74. package/views/dist/controls/avatar/avatar.d.ts +3 -3
  75. package/views/dist/controls/avatar/avatar.js +1 -1
  76. package/views/dist/controls/avatar/tokens.d.ts +44 -0
  77. package/views/dist/controls/avatar/tokens.js +11 -0
  78. package/views/dist/controls/avatar.css +22 -5
  79. package/views/dist/controls/button/map-button.js +2 -0
  80. package/views/dist/controls/checkbox/checkbox.d.ts +3 -2
  81. package/views/dist/controls/checkbox/checkbox.js +2 -2
  82. package/views/dist/controls/choice/tokens.d.ts +0 -4
  83. package/views/dist/controls/choice/tokens.js +0 -1
  84. package/views/dist/controls/choice.css +3 -3
  85. package/views/dist/controls/compound-editor/compound-editor.d.ts +1 -1
  86. package/views/dist/controls/compound-editor/name-parts.js +4 -4
  87. package/views/dist/controls/compound-editor/place-parts.js +19 -19
  88. package/views/dist/controls/compound-editor/range-parts.js +14 -14
  89. package/views/dist/controls/compound-editor/row.d.ts +3 -1
  90. package/views/dist/controls/compound-editor/row.js +2 -2
  91. package/views/dist/controls/controls.d.ts +8 -0
  92. package/views/dist/controls/controls.js +12 -2
  93. package/views/dist/controls/customize/customize.js +37 -35
  94. package/views/dist/controls/customize/map-customize-body.d.ts +2 -0
  95. package/views/dist/controls/customize/map-customize-body.js +5 -1
  96. package/views/dist/controls/date-editor/date-days.js +2 -2
  97. package/views/dist/controls/date-editor/date-editor.js +18 -18
  98. package/views/dist/controls/date-editor/date-parts.js +6 -6
  99. package/views/dist/controls/date-editor/map-calendar.js +1 -1
  100. package/views/dist/controls/date-editor.css +2 -2
  101. package/views/dist/controls/field/field.d.ts +22 -4
  102. package/views/dist/controls/field/field.js +63 -5
  103. package/views/dist/controls/field/tokens.d.ts +4 -0
  104. package/views/dist/controls/field/tokens.js +1 -0
  105. package/views/dist/controls/field.css +41 -16
  106. package/views/dist/controls/filter-editor/block.d.ts +2 -2
  107. package/views/dist/controls/filter-editor/block.js +5 -5
  108. package/views/dist/controls/filter-editor/filter-editor.js +31 -33
  109. package/views/dist/controls/filter-editor/how.d.ts +3 -1
  110. package/views/dist/controls/filter-editor/map-filter-body.d.ts +1 -0
  111. package/views/dist/controls/filter-editor/map-filter-body.js +7 -3
  112. package/views/dist/controls/filter-editor/map-rules.js +1 -1
  113. package/views/dist/controls/filter-editor/parts.js +2 -1
  114. package/views/dist/controls/glyphs/glyphs.d.ts +10 -0
  115. package/views/dist/controls/glyphs/glyphs.js +173 -0
  116. package/views/dist/controls/group-editor/group-editor.js +15 -13
  117. package/views/dist/controls/index.d.ts +4 -1
  118. package/views/dist/controls/index.js +3 -1
  119. package/views/dist/controls/input/input.js +6 -3
  120. package/views/dist/controls/input/map-input.js +2 -0
  121. package/views/dist/controls/input/tokens.d.ts +4 -0
  122. package/views/dist/controls/input/tokens.js +1 -0
  123. package/views/dist/controls/input.css +31 -3
  124. package/views/dist/controls/internal/editor-parts.js +1 -1
  125. package/views/dist/controls/internal/icons.js +10 -0
  126. package/views/dist/controls/internal/keep-focus.d.ts +2 -0
  127. package/views/dist/controls/internal/keep-focus.js +17 -0
  128. package/views/dist/controls/internal/map-panel-controls.d.ts +8 -0
  129. package/views/dist/controls/internal/map-panel-controls.js +20 -0
  130. package/views/dist/controls/internal/panel-controls.d.ts +50 -0
  131. package/views/dist/controls/internal/panel-controls.js +197 -0
  132. package/views/dist/controls/internal/part-slot.d.ts +12 -0
  133. package/views/dist/controls/internal/part-slot.js +5 -0
  134. package/views/dist/controls/internal/watch-frame.d.ts +2 -0
  135. package/views/dist/controls/internal/watch-frame.js +33 -0
  136. package/views/dist/controls/links-editor/links-editor.d.ts +1 -1
  137. package/views/dist/controls/links-editor/links-editor.js +27 -27
  138. package/views/dist/controls/markdown/map-markdown.d.ts +4 -0
  139. package/views/dist/controls/markdown/map-markdown.js +5 -0
  140. package/views/dist/controls/menu/map-menu.d.ts +2 -2
  141. package/views/dist/controls/menu/map-menu.js +15 -12
  142. package/views/dist/controls/menu/menu.d.ts +2 -0
  143. package/views/dist/controls/menu/menu.js +3 -3
  144. package/views/dist/controls/menu-list/menu-list.d.ts +17 -4
  145. package/views/dist/controls/menu-list/menu-list.js +27 -25
  146. package/views/dist/controls/modal/modal.js +5 -1
  147. package/views/dist/controls/notice/notice.d.ts +3 -1
  148. package/views/dist/controls/notice/notice.js +2 -2
  149. package/views/dist/controls/number-editor/number-editor.d.ts +1 -1
  150. package/views/dist/controls/number-editor/number-editor.js +13 -13
  151. package/views/dist/controls/number-field/number-field.js +5 -3
  152. package/views/dist/controls/pane/pane.d.ts +4 -2
  153. package/views/dist/controls/pane/pane.js +6 -5
  154. package/views/dist/controls/phone-header/header-bar.d.ts +5 -1
  155. package/views/dist/controls/phone-header/header-bar.js +2 -2
  156. package/views/dist/controls/phone-header.css +11 -1
  157. package/views/dist/controls/picker/map-picker.js +3 -0
  158. package/views/dist/controls/picker/picker.d.ts +16 -0
  159. package/views/dist/controls/picker/picker.js +61 -40
  160. package/views/dist/controls/picker/rows.d.ts +4 -0
  161. package/views/dist/controls/picker.css +2 -0
  162. package/views/dist/controls/popover/map-popover.d.ts +1 -1
  163. package/views/dist/controls/popover/map-popover.js +4 -2
  164. package/views/dist/controls/popover/popover.js +2 -1
  165. package/views/dist/controls/quick-filters/quick-filters.js +4 -4
  166. package/views/dist/controls/radio/radio.d.ts +8 -3
  167. package/views/dist/controls/radio/radio.js +22 -5
  168. package/views/dist/controls/radio/tokens.d.ts +44 -0
  169. package/views/dist/controls/radio/tokens.js +11 -0
  170. package/views/dist/controls/radio.css +79 -1
  171. package/views/dist/controls/select/map-select.d.ts +3 -0
  172. package/views/dist/controls/select/map-select.js +8 -0
  173. package/views/dist/controls/select/select.d.ts +7 -0
  174. package/views/dist/controls/select/select.js +12 -6
  175. package/views/dist/controls/select/tokens.d.ts +8 -0
  176. package/views/dist/controls/select/tokens.js +2 -0
  177. package/views/dist/controls/select.css +17 -0
  178. package/views/dist/controls/setting-row/looks.d.ts +1 -1
  179. package/views/dist/controls/setting-row/looks.js +9 -4
  180. package/views/dist/controls/setting-row/setting-row.d.ts +45 -10
  181. package/views/dist/controls/setting-row/setting-row.js +82 -15
  182. package/views/dist/controls/setting-row/tokens.d.ts +74 -2
  183. package/views/dist/controls/setting-row/tokens.js +19 -1
  184. package/views/dist/controls/setting-row.css +135 -14
  185. package/views/dist/controls/sheet/bottom-sheet.d.ts +14 -2
  186. package/views/dist/controls/sheet/bottom-sheet.js +6 -3
  187. package/views/dist/controls/sheet/map-sheet.js +1 -1
  188. package/views/dist/controls/sheet.css +4 -1
  189. package/views/dist/controls/sort-editor/map-sort-body.d.ts +1 -0
  190. package/views/dist/controls/sort-editor/map-sort-body.js +7 -3
  191. package/views/dist/controls/sort-editor/sort-editor.js +25 -26
  192. package/views/dist/controls/sort-editor.css +13 -2
  193. package/views/dist/controls/switch-row/tokens.d.ts +0 -12
  194. package/views/dist/controls/switch-row/tokens.js +0 -3
  195. package/views/dist/controls/switch-row.css +3 -7
  196. package/views/dist/controls/switch.css +17 -7
  197. package/views/dist/controls/tag/tag.d.ts +3 -1
  198. package/views/dist/controls/tag/tag.js +2 -2
  199. package/views/dist/controls/tag/tokens.d.ts +4 -0
  200. package/views/dist/controls/tag/tokens.js +1 -0
  201. package/views/dist/controls/tag-field/tag-field.d.ts +5 -1
  202. package/views/dist/controls/tag-field/tag-field.js +11 -5
  203. package/views/dist/controls/tag-field/tokens.d.ts +16 -0
  204. package/views/dist/controls/tag-field/tokens.js +4 -0
  205. package/views/dist/controls/tag-field.css +19 -0
  206. package/views/dist/controls/tag.css +2 -0
  207. package/views/dist/controls/text-editor/text-editor.d.ts +1 -1
  208. package/views/dist/controls/text-editor/text-editor.js +8 -8
  209. package/views/dist/controls/toolbar/toolbar.d.ts +15 -3
  210. package/views/dist/controls/toolbar/toolbar.js +22 -15
  211. package/views/dist/controls/toolbar-button/atom-toolbar-button.d.ts +14 -0
  212. package/views/dist/controls/toolbar-button/atom-toolbar-button.js +52 -0
  213. package/views/dist/controls/toolbar-button/toolbar-button.d.ts +1 -1
  214. package/views/dist/controls/toolbar-button/toolbar-button.js +2 -3
  215. package/views/dist/controls/toolbar-button.css +4 -0
  216. package/views/dist/controls/toolbar.css +5 -0
  217. package/views/dist/controls/values-editor/values-editor.d.ts +1 -1
  218. package/views/dist/controls/values-editor/values-editor.js +22 -22
  219. package/views/dist/controls/views-list/map-view-menu.d.ts +3 -0
  220. package/views/dist/controls/views-list/map-view-menu.js +25 -0
  221. package/views/dist/controls/views-list/map-views-list-body.d.ts +28 -1
  222. package/views/dist/controls/views-list/map-views-list-body.js +39 -21
  223. package/views/dist/controls/views-list/rules.d.ts +2 -0
  224. package/views/dist/controls/views-list/view-menu.d.ts +7 -0
  225. package/views/dist/controls/views-list/view-menu.js +33 -29
  226. package/views/dist/controls/views-list/views-list.js +4 -4
  227. package/views/dist/controls/views-list/words.d.ts +2 -0
  228. package/views/dist/controls/views-list/words.js +1 -1
  229. package/views/dist/editors/EditorPanel.js +3 -2
  230. package/views/dist/editors/edit-session.js +2 -5
  231. package/views/dist/field-row/FieldRow.d.ts +4 -2
  232. package/views/dist/field-row/FieldRow.js +80 -20
  233. package/views/dist/field-row/FieldRowLane.d.ts +7 -2
  234. package/views/dist/field-row/FieldRowLane.js +4 -3
  235. package/views/dist/field-row/editors/RowEditor.d.ts +12 -0
  236. package/views/dist/field-row/editors/RowEditor.js +31 -1
  237. package/views/dist/field-row/editors/RowValueListEditor.d.ts +5 -1
  238. package/views/dist/field-row/editors/RowValueListEditor.js +4 -1
  239. package/views/dist/field-row/field-row-button.d.ts +5 -0
  240. package/views/dist/field-row/field-row-button.js +2 -0
  241. package/views/dist/fields/binding.d.ts +3 -2
  242. package/views/dist/fields/binding.js +38 -5
  243. package/views/dist/fields/money.d.ts +5 -2
  244. package/views/dist/fields/money.js +14 -2
  245. package/views/dist/grid/chrome/GridColumnMenu.d.ts +4 -2
  246. package/views/dist/grid/chrome/GridColumnMenu.js +3 -2
  247. package/views/dist/grid/chrome/GridGroupMenu.d.ts +4 -1
  248. package/views/dist/grid/chrome/GridGroupMenu.js +4 -3
  249. package/views/dist/grid/chrome/GridHeader.d.ts +4 -1
  250. package/views/dist/grid/chrome/GridHeader.js +2 -2
  251. package/views/dist/grid/chrome/GridRow.js +6 -5
  252. package/views/dist/grid/chrome/GridRowCells.js +6 -9
  253. package/views/dist/grid/chrome/GridStructure.d.ts +4 -1
  254. package/views/dist/grid/chrome/GridStructure.js +4 -4
  255. package/views/dist/grid/chrome/GridTable.js +9 -3
  256. package/views/dist/grid/chrome/cell-clipboard.d.ts +4 -2
  257. package/views/dist/grid/chrome/cell-clipboard.js +2 -2
  258. package/views/dist/grid/chrome/cells.js +3 -1
  259. package/views/dist/grid/chrome/grid-column-menu-items.js +1 -1
  260. package/views/dist/grid/chrome/grid-row-menu-items.d.ts +27 -3
  261. package/views/dist/grid/chrome/grid-row-menu-items.js +93 -7
  262. package/views/dist/grid/chrome/grid-row-props.d.ts +7 -2
  263. package/views/dist/grid/chrome/grid-rows-menu.js +34 -6
  264. package/views/dist/grid/chrome/grid-table-props.d.ts +38 -7
  265. package/views/dist/grid/chrome/useGridBatchApi.d.ts +3 -1
  266. package/views/dist/grid/chrome/useGridBatchApi.js +4 -2
  267. package/views/dist/grid/chrome/useGridKeyboard.d.ts +7 -2
  268. package/views/dist/grid/chrome/useGridKeyboard.js +43 -14
  269. package/views/dist/grid/chrome/useGridPendingReconciliation.js +1 -2
  270. package/views/dist/grid/chrome/useGridTableInteractionModel.d.ts +1 -1
  271. package/views/dist/grid/chrome/useGridTableInteractionModel.js +20 -7
  272. package/views/dist/grid/core/clipboard-model.d.ts +3 -1
  273. package/views/dist/grid/core/clipboard-model.js +9 -8
  274. package/views/dist/grid/core/commit-model.d.ts +20 -2
  275. package/views/dist/grid/core/editing-controller.d.ts +21 -0
  276. package/views/dist/grid/core/editing-controller.js +194 -42
  277. package/views/dist/grid/core/editing-model.d.ts +3 -0
  278. package/views/dist/grid/core/editing-model.js +3 -0
  279. package/views/dist/grid/core/edits-sink.d.ts +19 -0
  280. package/views/dist/grid/core/edits-sink.js +2 -0
  281. package/views/dist/grid/core/save-path.d.ts +24 -0
  282. package/views/dist/grid/core/save-path.js +122 -0
  283. package/views/dist/grid/core/spreadsheet-operations.d.ts +3 -0
  284. package/views/dist/grid/core/spreadsheet-operations.js +24 -1
  285. package/views/dist/grid/core/useGridEditing.d.ts +5 -0
  286. package/views/dist/grid/core/useGridEditing.js +6 -0
  287. package/views/dist/grid/index.d.ts +3 -2
  288. package/views/dist/grid/index.js +1 -0
  289. package/views/dist/internal/field-rows.d.ts +26 -0
  290. package/views/dist/internal/field-rows.js +8 -0
  291. package/views/dist/internal/page-close.d.ts +7 -0
  292. package/views/dist/internal/page-close.js +43 -0
  293. package/views/dist/list/answer.d.ts +40 -0
  294. package/views/dist/list/answer.js +43 -0
  295. package/views/dist/list/browser-views-store.d.ts +10 -0
  296. package/views/dist/list/browser-views-store.js +182 -0
  297. package/views/dist/list/bulk-bar.d.ts +7 -0
  298. package/views/dist/list/bulk-bar.js +10 -0
  299. package/views/dist/list/columns.d.ts +24 -0
  300. package/views/dist/list/columns.js +27 -0
  301. package/views/dist/list/edits.d.ts +19 -0
  302. package/views/dist/list/edits.js +56 -0
  303. package/views/dist/list/grid.d.ts +11 -0
  304. package/views/dist/list/grid.js +76 -0
  305. package/views/dist/list/index.d.ts +36 -0
  306. package/views/dist/list/index.js +11 -0
  307. package/views/dist/list/link.d.ts +8 -0
  308. package/views/dist/list/link.js +78 -0
  309. package/views/dist/list/list.d.ts +70 -0
  310. package/views/dist/list/list.js +14 -0
  311. package/views/dist/list/menu.d.ts +31 -0
  312. package/views/dist/list/menu.js +76 -0
  313. package/views/dist/list/parts.d.ts +6 -0
  314. package/views/dist/list/parts.js +66 -0
  315. package/views/dist/list/registry.d.ts +11 -0
  316. package/views/dist/list/registry.js +31 -0
  317. package/views/dist/list/root-base.d.ts +46 -0
  318. package/views/dist/list/root-base.js +137 -0
  319. package/views/dist/list/root.d.ts +41 -0
  320. package/views/dist/list/root.js +168 -0
  321. package/views/dist/list/slot.d.ts +14 -0
  322. package/views/dist/list/slot.js +22 -0
  323. package/views/dist/list/source-answers.d.ts +39 -0
  324. package/views/dist/list/source-answers.js +225 -0
  325. package/views/dist/list/source.d.ts +11 -0
  326. package/views/dist/list/source.js +31 -0
  327. package/views/dist/list/store.d.ts +119 -0
  328. package/views/dist/list/store.js +146 -0
  329. package/views/dist/list/toolbar.d.ts +7 -0
  330. package/views/dist/list/toolbar.js +371 -0
  331. package/views/dist/list/views-axis.d.ts +5 -0
  332. package/views/dist/list/views-axis.js +98 -0
  333. package/views/dist/list/views-store.d.ts +41 -0
  334. package/views/dist/list/views-store.js +1 -0
  335. package/views/dist/list/views.d.ts +72 -0
  336. package/views/dist/list/views.js +411 -0
  337. package/views/dist/model/column-capabilities.d.ts +13 -0
  338. package/views/dist/model/column-capabilities.js +23 -2
  339. package/views/dist/model/column-schema.d.ts +11 -1
  340. package/views/dist/model/preferences.js +1 -1
  341. package/views/dist/model/prefs-buckets.js +1 -1
  342. package/views/dist/model/view-rules.js +1 -0
  343. package/views/dist/panels/index.d.ts +3 -1
  344. package/views/dist/panels/index.js +1 -0
  345. package/views/dist/panels/model.d.ts +2 -0
  346. package/views/dist/panels/react/customize-body.js +1 -0
  347. package/views/dist/panels/react/toolbar/ReadyToolbar.d.ts +47 -4
  348. package/views/dist/panels/react/toolbar/ReadyToolbar.js +6 -326
  349. package/views/dist/panels/react/toolbar/Toolbar.d.ts +17 -2
  350. package/views/dist/panels/react/toolbar/Toolbar.js +43 -23
  351. package/views/dist/panels/react/toolbar/ToolbarAdvancedFilters.js +1 -1
  352. package/views/dist/panels/react/toolbar/ToolbarAsideFilter.js +2 -2
  353. package/views/dist/panels/react/toolbar/ToolbarBarFilter.js +4 -4
  354. package/views/dist/panels/react/toolbar/ToolbarButton.js +7 -1
  355. package/views/dist/panels/react/toolbar/ToolbarFilter.js +1 -1
  356. package/views/dist/panels/react/toolbar/ToolbarFilterAdd.js +1 -1
  357. package/views/dist/panels/react/toolbar/ToolbarFilterSheet.js +1 -1
  358. package/views/dist/panels/react/toolbar/ToolbarFilters.js +2 -2
  359. package/views/dist/panels/react/toolbar/ToolbarNew.js +2 -2
  360. package/views/dist/panels/react/toolbar/ToolbarOptions.js +1 -1
  361. package/views/dist/panels/react/toolbar/ToolbarQuickFilters.d.ts +2 -2
  362. package/views/dist/panels/react/toolbar/ToolbarQuickFilters.js +3 -1
  363. package/views/dist/panels/react/toolbar/ToolbarSearch.js +1 -1
  364. package/views/dist/panels/react/toolbar/ToolbarSort.js +2 -2
  365. package/views/dist/panels/react/toolbar/ToolbarSortPill.js +6 -4
  366. package/views/dist/panels/react/toolbar/context.d.ts +20 -3
  367. package/views/dist/panels/react/toolbar/context.js +3 -1
  368. package/views/dist/panels/react/toolbar/panel-part.d.ts +4 -1
  369. package/views/dist/panels/react/toolbar/panel-part.js +5 -3
  370. package/views/dist/panels/react/views-row/FoldingViewRow.d.ts +1 -1
  371. package/views/dist/panels/react/views-row/FoldingViewRow.js +15 -4
  372. package/views/dist/panels/react/views-row/PillGroup.d.ts +5 -2
  373. package/views/dist/panels/react/views-row/PillGroup.js +16 -7
  374. package/views/dist/panels/react/views-row/ViewPicker.js +2 -12
  375. package/views/dist/panels/react/views-row/ViewPickerRow.d.ts +4 -2
  376. package/views/dist/panels/react/views-row/ViewPickerRow.js +9 -5
  377. package/views/dist/panels/react.d.ts +2 -2
  378. package/views/dist/panels/settings/filter-groups.js +6 -1
  379. package/views/dist/panels/toolbar/edit-view.d.ts +7 -1
  380. package/views/dist/panels/toolbar/edit-view.js +14 -0
  381. package/views/dist/panels/toolbar/model.d.ts +5 -0
  382. package/views/dist/panels/toolbar/model.js +7 -3
  383. package/views/dist/panels/view-state.d.ts +5 -3
  384. package/views/dist/panels/views-row/model.d.ts +19 -2
  385. package/views/dist/panels/views-row/model.js +14 -0
  386. package/views/dist/provider/ViewsProvider.d.ts +21 -8
  387. package/views/dist/provider/ViewsProvider.js +40 -5
  388. package/views/dist/provider/components.d.ts +102 -2
  389. package/views/dist/provider/components.js +1 -1
  390. package/views/dist/provider/context.d.ts +6 -2
  391. package/views/dist/provider/context.js +1 -1
  392. package/views/dist/provider/own-control.d.ts +4 -0
  393. package/views/dist/provider/own-control.js +7 -0
  394. package/views/dist/provider/ports.d.ts +19 -12
  395. package/views/dist/provider/ports.js +69 -1
  396. package/views/dist/provider/select-items.d.ts +3 -0
  397. package/views/dist/provider/select-items.js +6 -0
  398. package/views/dist/react.d.ts +4 -2
  399. package/views/dist/react.js +2 -0
  400. package/views/dist/styles.css +503 -136
  401. package/views/dist/styles.unlayered.css +503 -136
  402. package/views/docs/contract.md +292 -34
  403. package/views/docs/controls/avatar.md +11 -0
  404. package/views/docs/controls/choice.md +0 -1
  405. package/views/docs/controls/compound-editor.md +4 -0
  406. package/views/docs/controls/customize.md +6 -0
  407. package/views/docs/controls/date-editor.md +4 -0
  408. package/views/docs/controls/field.md +7 -0
  409. package/views/docs/controls/filter-editor.md +8 -0
  410. package/views/docs/controls/group-editor.md +6 -0
  411. package/views/docs/controls/input.md +5 -0
  412. package/views/docs/controls/links-editor.md +4 -0
  413. package/views/docs/controls/menu-list.md +8 -0
  414. package/views/docs/controls/menu.md +4 -0
  415. package/views/docs/controls/notice.md +4 -0
  416. package/views/docs/controls/number-editor.md +4 -0
  417. package/views/docs/controls/pane.md +4 -0
  418. package/views/docs/controls/picker.md +8 -0
  419. package/views/docs/controls/quick-filters.md +6 -0
  420. package/views/docs/controls/radio.md +20 -1
  421. package/views/docs/controls/select.md +10 -0
  422. package/views/docs/controls/setting-row.md +18 -0
  423. package/views/docs/controls/sheet.md +4 -0
  424. package/views/docs/controls/sort-editor.md +8 -0
  425. package/views/docs/controls/switch-row.md +0 -3
  426. package/views/docs/controls/tag-field.md +4 -0
  427. package/views/docs/controls/tag.md +1 -0
  428. package/views/docs/controls/text-editor.md +4 -0
  429. package/views/docs/controls/values-editor.md +4 -0
  430. package/views/docs/controls/views-list.md +6 -0
  431. package/views/docs/getting-started.md +2 -2
  432. package/views/docs/guides/atoms.md +2 -2
  433. package/views/docs/guides/columns.md +1 -1
  434. package/views/docs/guides/ports.md +1 -1
  435. package/views/docs/guides/the-grid.md +36 -9
  436. package/views/docs/guides/the-provider.md +22 -3
  437. package/views/docs/index.md +1 -0
  438. package/views/docs/reference/controls.md +41 -29
  439. package/views/docs/reference/editors-session.md +1 -1
  440. package/views/docs/reference/field-row.md +9 -1
  441. package/views/docs/reference/grid.md +15 -9
  442. package/views/docs/reference/list.md +357 -0
  443. package/views/docs/reference/looks.md +1 -1
  444. package/views/docs/reference/panels-react.md +17 -12
  445. package/views/docs/reference/panels.md +8 -5
  446. package/views/docs/reference/react.md +24 -16
  447. package/views/docs/reference/views.md +10 -6
  448. package/views/docs/reshaping.md +6 -1
  449. package/views/skills/views/SKILL.md +9 -6
@@ -1,18 +1,15 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import * as React from "react";
4
- import { Button } from "../button/button.js";
5
4
  import { FieldRows, FieldRowsRow as FieldRow } from "../field/field.js";
6
5
  import { Grip } from "../grip/grip.js";
7
6
  import { asSelect, DOTS, DOTS_LOOK, DOTS_UP, glyph, MORE_LOOK, PLUS, TRASH, useDecide, useStandingRoom, X } from "../internal/editor-parts.js";
8
7
  import { PhoneHost, phoneMark, usePhone } from "../internal/phone.js";
8
+ import { usePanelControls } from "../internal/panel-controls.js";
9
9
  import { moved, useReorder } from "../internal/reorder.js";
10
10
  import { useStepReturn } from "../internal/step-return.js";
11
- import { Menu } from "../menu/menu.js";
12
11
  import { Picker, usePicker } from "../picker/picker.js";
13
12
  import { findItem, itemLabel } from "../picker/rows.js";
14
- import { Popover } from "../popover/popover.js";
15
- import { Select } from "../select/select.js";
16
13
  import { Tooltip } from "../tooltip/tooltip.js";
17
14
  import { addSort, canAddSort, dropAside, openPlaces, putBack, repoint, SORT_MAX, takenBy } from "./rules.js";
18
15
  import { sortWords } from "./words.js";
@@ -20,10 +17,11 @@ const ASCENDING = ["M4 6l7 0", "M4 12l7 0", "M4 18l9 0", "M15 9l3 -3l3 3", "M18
20
17
  const DESCENDING = ["M4 6l9 0", "M4 12l7 0", "M4 18l7 0", "M15 15l3 3l3 -3", "M18 6l0 12"];
21
18
  const markOf = (paths) => _jsx("span", { className: "o-sort-editor-mark", children: glyph(paths) });
22
19
  const directionsOf = (w) => [
23
- { value: "ascending", label: w.ascending, as: { mark: markOf(ASCENDING) } },
24
- { value: "descending", label: w.descending, as: { mark: markOf(DESCENDING) } },
20
+ { value: "ascending", label: w.ascending, as: { mark: markOf(ASCENDING) }, slot: { slot: "vk-sort-direction-option", key: "ascending" } },
21
+ { value: "descending", label: w.descending, as: { mark: markOf(DESCENDING) }, slot: { slot: "vk-sort-direction-option", key: "descending" } },
25
22
  ];
26
23
  const isDirection = (v) => v === "ascending" || v === "descending";
24
+ const DirectionFit = ({ items }) => (_jsx("span", { className: "o-sort-editor-fit", "aria-hidden": "true", children: items.map((i) => (_jsxs("span", { className: "o-input o-input-xs o-select-field", children: [_jsxs("span", { className: "o-select-value", children: [i.mark, _jsx("span", { className: "o-list-main", children: i.label })] }), _jsx("span", { className: "o-select-chevron", children: _jsx("svg", {}) })] }, i.value))) }));
27
25
  const X_LOOK = { radius: "sm", corner: "round", edge: "none", words: "inherit", colour: "faint", icon: "16" };
28
26
  const ROWS = { cards: "one", edge: "on", height: "56", label: "none", lines: "words" };
29
27
  function fieldsFor(fields, rules, sorted, own, fieldOf) {
@@ -33,6 +31,7 @@ function fieldsFor(fields, rules, sorted, own, fieldOf) {
33
31
  export const sortableFields = (fields, rules, fieldOf, sorted = sortWords().sorted) => fieldsFor(fields, rules, sorted, undefined, fieldOf);
34
32
  export function useSortEditor(props) {
35
33
  const { label, fields, rules, onRulesChange, max = SORT_MAX, onDone, opens, fieldOf, addSort: adds = true } = props;
34
+ const { Button, Select, Menu, Popover } = usePanelControls();
36
35
  const aside = React.useMemo(() => props.aside ?? [], [props.aside]);
37
36
  const w = sortWords(props.words), search = props.search ?? w.search, DIRECTIONS = directionsOf(w);
38
37
  const words = w.picker ? { words: w.picker } : {};
@@ -110,25 +109,25 @@ export function useSortEditor(props) {
110
109
  React.useEffect(() => { if (step && step.list !== "add" && !stepRule && !(step.list === "repoint" && aside.some((a) => a.key === step.key)))
111
110
  setStep(null); }, [step, stepRule, aside]);
112
111
  const stepTitle = phone && step ? (stepRule ? nameOf(stepRule.field) : stepAside ? w.fieldNamed(stepAside.label) : step.list === "add" ? w.add : undefined) : undefined;
113
- const addButton = (size) => (_jsx(Tooltip, { label: w.max(max), reason: true, side: "top", disabled: can, children: _jsx(Button, { kind: "outline", size: size, icon: glyph(PLUS), className: "o-sort-editor-add", disabled: !can, focusableWhenDisabled: true, "aria-haspopup": phone ? undefined : "dialog", "aria-expanded": phone ? undefined : pop?.list === "add", onClick: (e) => { const at = e.currentTarget; if (phone)
112
+ const addButton = (size) => (_jsx(Tooltip, { label: w.max(max), reason: true, side: "top", disabled: can, children: _jsx(Button, { kind: "outline", size: size, icon: glyph(PLUS), className: "o-sort-editor-add", "data-slot": "vk-sort-add", disabled: !can, focusableWhenDisabled: true, "aria-haspopup": phone ? undefined : "dialog", "aria-expanded": phone ? undefined : pop?.list === "add", onClick: (e) => { const at = e.currentTarget; if (phone)
114
113
  setStep({ list: "add" });
115
114
  else
116
115
  setPop((p) => (p?.list === "add" ? null : { list: "add", rule: -1, at })); }, children: w.add }) }));
117
116
  const closePop = () => setPop(null);
118
117
  const addPicker = _jsx(Picker, { label: w.add, items: pickable(), value: null, search: search, searchShown: true, form: "computer", defaultLevel: props.level, onDone: closePop, onValueChange: (v) => { addField(v); }, ...words });
119
118
  const asideEntries = (a) => [
120
- { icon: null, label: a.why, disabled: a.why },
121
- ...(a.back != null ? [{ icon: null, label: w.putBack, onSelect: () => backOn(a.key) }] : []),
122
- { icon: glyph(TRASH), label: w.delete, danger: true, onSelect: () => drop(a.key) },
119
+ { icon: null, label: a.why, disabled: a.why, slot: { slot: "vk-sort-rule-action", key: "why" } },
120
+ ...(a.back != null ? [{ icon: null, label: w.putBack, onSelect: () => backOn(a.key), slot: { slot: "vk-sort-rule-action", key: "put-back" } }] : []),
121
+ { icon: glyph(TRASH), label: w.delete, danger: true, onSelect: () => drop(a.key), slot: { slot: "vk-sort-rule-action", key: "delete" } },
123
122
  ];
124
123
  if (phone || narrow) {
125
124
  const size = phone ? "44" : "sm";
126
125
  const more = (name) => (phone
127
- ? _jsx(Button, { kind: "quiet", shape: "icon", size: "40x44", look: DOTS_LOOK, className: "o-sort-editor-more", "aria-label": w.actionsFor(name), icon: glyph(DOTS) })
128
- : _jsx(Button, { kind: "quiet", shape: "icon", size: "xs", look: MORE_LOOK, className: "o-sort-editor-more", "aria-label": w.actionsFor(name), icon: glyph(DOTS_UP) }));
126
+ ? _jsx(Button, { kind: "quiet", shape: "icon", size: "40x44", look: DOTS_LOOK, className: "o-sort-editor-more", "data-slot": "vk-sort-rule-more", "aria-label": w.actionsFor(name), icon: glyph(DOTS) })
127
+ : _jsx(Button, { kind: "quiet", shape: "icon", size: "xs", look: MORE_LOOK, className: "o-sort-editor-more", "data-slot": "vk-sort-rule-more", "aria-label": w.actionsFor(name), icon: glyph(DOTS_UP) }));
129
128
  const ruleRow = (r, i) => {
130
129
  const name = nameOf(r.field), mark = markFor(r.field), g = gripProps(i), standing = narrow && opens?.list === "direction" && opens.rule === i;
131
- const inner = _jsxs(_Fragment, { children: [_jsxs("button", { type: "button", className: "o-sort-editor-press", ...g, onPointerDown: (e) => { dragged.current = false; setMoving(false); g.onPointerDown(e); }, "aria-haspopup": narrow ? "dialog" : undefined, "aria-expanded": narrow ? pop?.list === "direction" && pop.rule === i : undefined, onClick: (e) => {
130
+ const inner = _jsxs(_Fragment, { children: [_jsxs("button", { type: "button", className: "o-sort-editor-press", "data-slot": "vk-sort-rule-open", ...g, onPointerDown: (e) => { dragged.current = false; setMoving(false); g.onPointerDown(e); }, "aria-haspopup": narrow ? "dialog" : undefined, "aria-expanded": narrow ? pop?.list === "direction" && pop.rule === i : undefined, onClick: (e) => {
132
131
  if (dragged.current) {
133
132
  dragged.current = false;
134
133
  return;
@@ -138,39 +137,39 @@ export function useSortEditor(props) {
138
137
  setPop((p) => (p?.list === "direction" && p.rule === i ? null : { list: "direction", rule: i, at }));
139
138
  else
140
139
  setStep({ list: "direction", rule: i });
141
- }, children: [mark, _jsxs("span", { className: "o-sort-editor-words", children: [_jsx("span", { className: "o-sort-editor-name", children: name }), _jsx("span", { className: "o-sort-editor-way", children: r.direction === "ascending" ? w.ascending : w.descending })] })] }), _jsx(Menu, { label: w.sortBy(name), align: "end", entries: [{ icon: glyph(TRASH), label: w.delete, danger: true, onSelect: () => change(now.current.filter((_, k) => k !== i)) }], trigger: more(name) }), standing && shownList(DIRECTIONS, r.direction, w.direction, false)] });
140
+ }, children: [mark, _jsxs("span", { className: "o-sort-editor-words", children: [_jsx("span", { className: "o-sort-editor-name", children: name }), _jsx("span", { className: "o-sort-editor-way", children: r.direction === "ascending" ? w.ascending : w.descending })] })] }), _jsx(Menu, { label: w.sortBy(name), align: "end", entries: [{ icon: glyph(TRASH), label: w.delete, danger: true, onSelect: () => change(now.current.filter((_, k) => k !== i)), slot: { slot: "vk-sort-rule-action", key: "delete" } }], trigger: more(name) }), standing && shownList(DIRECTIONS, r.direction, w.direction, false)] });
142
141
  return phone
143
- ? _jsx(FieldRow, { as: "div", role: "listitem", className: "o-sort-editor-rule", "data-row": i, "data-lifted": liftedAt(i), style: lift(i), children: inner }, r.field)
144
- : _jsx("div", { role: "listitem", className: "o-sort-editor-rule", "data-row": i, "data-lifted": liftedAt(i), style: lift(i), children: inner }, r.field);
142
+ ? _jsx(FieldRow, { as: "div", role: "listitem", className: "o-sort-editor-rule", "data-slot": "vk-sort-rule", "data-key": r.field, "data-index": i, "data-row": i, "data-lifted": liftedAt(i), style: lift(i), children: inner }, r.field)
143
+ : _jsx("div", { role: "listitem", className: "o-sort-editor-rule", "data-slot": "vk-sort-rule", "data-key": r.field, "data-index": i, "data-row": i, "data-lifted": liftedAt(i), style: lift(i), children: inner }, r.field);
145
144
  };
146
145
  const asideRow = (a) => {
147
- const inner = _jsxs(_Fragment, { children: [_jsx("button", { type: "button", className: "o-sort-editor-press", "aria-haspopup": narrow ? "dialog" : undefined, "aria-expanded": narrow ? pop?.list === "repoint" && pop.key === a.key : undefined, onClick: (e) => { const at = e.currentTarget; if (narrow)
146
+ const inner = _jsxs(_Fragment, { children: [_jsx("button", { type: "button", className: "o-sort-editor-press", "data-slot": "vk-sort-rule-open", "aria-haspopup": narrow ? "dialog" : undefined, "aria-expanded": narrow ? pop?.list === "repoint" && pop.key === a.key : undefined, onClick: (e) => { const at = e.currentTarget; if (narrow)
148
147
  setPop((p) => (p?.list === "repoint" && p.key === a.key ? null : { list: "repoint", rule: -1, key: a.key, at }));
149
148
  else {
150
149
  repointed.current = null;
151
150
  setStep({ list: "repoint", key: a.key });
152
151
  } }, children: _jsxs("span", { className: "o-sort-editor-words", children: [_jsx("span", { className: "o-sort-editor-name", children: a.label }), _jsx("span", { className: "o-sort-editor-way", children: a.why })] }) }), _jsx(Menu, { label: w.sortBy(a.label), align: "end", entries: asideEntries(a), trigger: more(a.label) })] });
153
152
  return phone
154
- ? _jsx(FieldRow, { as: "div", role: "listitem", className: "o-sort-editor-rule o-sort-editor-aside", "data-aside": "", "data-aside-key": a.key, children: inner }, `aside-${a.key}`)
155
- : _jsx("div", { role: "listitem", className: "o-sort-editor-rule o-sort-editor-aside", "data-aside": "", "data-aside-key": a.key, children: inner }, `aside-${a.key}`);
153
+ ? _jsx(FieldRow, { as: "div", role: "listitem", className: "o-sort-editor-rule o-sort-editor-aside", "data-slot": "vk-sort-rule", "data-key": a.key, "data-aside": "", "data-aside-key": a.key, children: inner }, `aside-${a.key}`)
154
+ : _jsx("div", { role: "listitem", className: "o-sort-editor-rule o-sort-editor-aside", "data-slot": "vk-sort-rule", "data-key": a.key, "data-aside": "", "data-aside-key": a.key, children: inner }, `aside-${a.key}`);
156
155
  };
157
156
  const popRule = pop?.list === "direction" ? rules[pop.rule] : undefined;
158
157
  const popAside = pop?.list === "repoint" ? aside.find((a) => a.key === pop.key) : undefined;
159
- const body = (_jsxs("div", { ref: placeRoot, className: "o-sort-editor", "data-kit": "sort-editor", "data-sort-form": way, role: narrow ? "group" : undefined, "aria-label": narrow ? label : undefined, tabIndex: -1, style: room ? { paddingBottom: room } : undefined, ...phoneMark(!!screen || small), "data-sort-step": stepTitle !== undefined ? step?.list : undefined, children: [stepTitle !== undefined ? stepList.body : _jsxs(_Fragment, { children: [rules.length || aside.length ? (phone
160
- ? _jsxs(FieldRows, { look: ROWS, className: "o-sort-editor-card", role: "list", "aria-label": label, children: [rules.map(ruleRow), aside.map(asideRow)] })
161
- : _jsxs("div", { className: "o-sort-editor-rules", role: "list", "aria-label": label, children: [rules.map(ruleRow), aside.map(asideRow)] })) : (_jsxs("div", { className: "o-sort-editor-none", children: [_jsx("p", { className: "o-sort-editor-none-head", children: w.none }), _jsx("p", { className: "o-sort-editor-none-line", children: w.noneLine })] })), _jsxs("div", { className: "o-sort-editor-acts", children: [addButton(size), rules.length > 0 && _jsx(Button, { kind: "quiet", size: size, className: "o-sort-editor-clear", onClick: () => change([]), children: w.clearAll })] })] }), narrow && (_jsx(Popover, { open: !!pop && (pop.list === "add" || !!popRule || !!popAside), onOpenChange: (o) => { if (!o)
158
+ const body = (_jsxs("div", { ref: placeRoot, className: "o-sort-editor", "data-slot": "vk-sort", "data-kit": "sort-editor", "data-sort-form": way, role: narrow ? "group" : undefined, "aria-label": narrow ? label : undefined, tabIndex: -1, style: room ? { paddingBottom: room } : undefined, ...phoneMark(!!screen || small), "data-sort-step": stepTitle !== undefined ? step?.list : undefined, children: [stepTitle !== undefined ? stepList.body : _jsxs(_Fragment, { children: [rules.length || aside.length ? (phone
159
+ ? _jsxs(FieldRows, { look: ROWS, className: "o-sort-editor-card", "data-slot": "vk-sort-rules", role: "list", "aria-label": label, children: [rules.map(ruleRow), aside.map(asideRow)] })
160
+ : _jsxs("div", { className: "o-sort-editor-rules", "data-slot": "vk-sort-rules", role: "list", "aria-label": label, children: [rules.map(ruleRow), aside.map(asideRow)] })) : (_jsxs("div", { className: "o-sort-editor-none", "data-slot": "vk-sort-none", children: [_jsx("p", { className: "o-sort-editor-none-head", children: w.none }), _jsx("p", { className: "o-sort-editor-none-line", children: w.noneLine })] })), _jsxs("div", { className: "o-sort-editor-acts", "data-slot": "vk-sort-foot", children: [addButton(size), rules.length > 0 && _jsx(Button, { kind: "quiet", size: size, className: "o-sort-editor-clear", "data-slot": "vk-sort-clear", onClick: () => change([]), children: w.clearAll })] })] }), narrow && (_jsx(Popover, { open: !!pop && (pop.list === "add" || !!popRule || !!popAside), onOpenChange: (o) => { if (!o)
162
161
  closePop(); }, anchor: pop?.at, className: "o-sort-editor-pop", "aria-label": pop?.list === "add" ? w.add : popAside ? w.fieldNamed(popAside.label) : popRule ? nameOf(popRule.field) : label, children: pop?.list === "add"
163
162
  ? addPicker
164
163
  : popAside ? _jsx(Picker, { label: w.fieldNamed(popAside.label), items: pickable(), value: null, search: search, searchShown: true, form: "computer", defaultLevel: props.level, onDone: closePop, onValueChange: (v) => { pointAt(popAside.key)(v); closePop(); }, ...words })
165
164
  : popRule && _jsx(Picker, { label: nameOf(popRule.field), items: DIRECTIONS, value: popRule.direction, searchShown: false, form: "computer", fromHeld: true, onDone: closePop, onValueChange: turn(pop?.rule ?? -1), ...words }) }))] }));
166
165
  return { body, head: !phone ? {} : stepTitle !== undefined ? { onBack: back } : decide.head, ...(stepTitle !== undefined ? { title: stepTitle } : {}) };
167
166
  }
168
- const body = (_jsx("div", { ref: placeRoot, className: "o-sort-editor", "data-kit": "sort-editor", "data-sort-form": "computer", role: "group", "aria-label": label, tabIndex: -1, style: room ? { paddingBottom: room } : undefined, ...phoneMark(!!screen || small), children: (rules.length > 0 || aside.length > 0) && _jsxs(_Fragment, { children: [_jsxs("div", { className: "o-sort-editor-rules", role: "list", "aria-label": label, children: [rules.map((r, i) => {
167
+ const body = (_jsx("div", { ref: placeRoot, className: "o-sort-editor", "data-slot": "vk-sort", "data-kit": "sort-editor", "data-sort-form": "computer", role: "group", "aria-label": label, tabIndex: -1, style: room ? { paddingBottom: room } : undefined, ...phoneMark(!!screen || small), children: (rules.length > 0 || aside.length > 0) && _jsxs(_Fragment, { children: [_jsxs("div", { className: "o-sort-editor-rules", "data-slot": "vk-sort-rules", role: "list", "aria-label": label, children: [rules.map((r, i) => {
169
168
  const name = nameOf(r.field), g = gripProps(i), open = opens?.rule === i ? opens.list : null;
170
169
  const items = pickable(r.field);
171
- return (_jsxs("div", { role: "listitem", className: "o-sort-editor-rule", "data-row": i, "data-lifted": liftedAt(i), style: lift(i), children: [_jsx(Grip, { label: w.move(name), className: "o-sort-editor-grip", ...g }), _jsxs("div", { className: "o-sort-editor-field", children: [_jsx(Select, { size: "xs", listWidth: "rows", "aria-label": w.field, items: asSelect(items), value: r.field, search: search, "data-force": open === "field" ? "focus" : undefined, onValueChange: (v) => { if (typeof v === "string" && v !== r.field && !takenBy(now.current, v, r.field, fieldOf))
172
- change(now.current.map((x, k) => (k === i ? { ...x, field: v } : x))); } }), open === "field" && shownList(items, r.field, w.field, true)] }), _jsxs("div", { className: "o-sort-editor-direction", children: [_jsx(Select, { size: "xs", listWidth: "rows", "aria-label": w.direction, items: asSelect(DIRECTIONS), value: r.direction, "data-force": open === "direction" ? "focus" : undefined, onValueChange: turn(i) }), open === "direction" && shownList(DIRECTIONS, r.direction, w.direction, false)] }), _jsx(Button, { kind: "quiet", shape: "icon", size: "2xs", look: X_LOOK, className: "o-sort-editor-remove", "aria-label": w.remove(name), icon: glyph(X), onClick: () => remove(i) })] }, r.field));
173
- }), aside.map((a) => (_jsxs("div", { role: "listitem", className: "o-sort-editor-rule o-sort-editor-aside", "data-aside": "", "data-aside-key": a.key, children: [_jsx("span", { className: "o-sort-editor-grip-place", "aria-hidden": "true" }), _jsx("div", { className: "o-sort-editor-field", children: _jsx(Tooltip, { label: a.why, side: "bottom", children: _jsx("span", { className: "o-sort-editor-why", children: _jsx(Select, { size: "xs", listWidth: "rows", "aria-label": w.fieldNamed(a.label), items: asSelect(pickable()), value: null, placeholder: a.label, search: search, onValueChange: pointAt(a.key) }) }) }) }), _jsx("div", { className: "o-sort-editor-direction", children: _jsx(Tooltip, { label: a.why, side: "bottom", children: _jsx("span", { className: "o-sort-editor-why", children: _jsx(Select, { size: "xs", listWidth: "rows", "aria-label": w.direction, items: asSelect(DIRECTIONS), value: a.direction, disabled: true, onValueChange: () => { } }) }) }) }), _jsx(Menu, { label: w.sortBy(a.label), align: "end", entries: asideEntries(a), trigger: _jsx(Button, { kind: "quiet", shape: "icon", size: "2xs", look: X_LOOK, className: "o-sort-editor-more", "aria-label": w.actionsFor(a.label), icon: glyph(DOTS) }) })] }, `aside-${a.key}`)))] }), (adds || rules.length > 0) && _jsxs("div", { className: "o-sort-editor-foot", children: [adds && addButton("sm"), rules.length > 0 && _jsx(Button, { kind: "quiet", size: "sm", className: "o-sort-editor-clear", onClick: () => { closePop(); change([]); if (!asideNow.current.length)
170
+ return (_jsxs("div", { role: "listitem", className: "o-sort-editor-rule", "data-slot": "vk-sort-rule", "data-key": r.field, "data-index": i, "data-row": i, "data-lifted": liftedAt(i), style: lift(i), children: [_jsx(Grip, { label: w.move(name), className: "o-sort-editor-grip", "data-slot": "vk-sort-grip", ...g }), _jsxs("div", { className: "o-sort-editor-field", children: [_jsx(Select, { size: "xs", listWidth: "rows", "aria-label": w.field, "data-slot": "vk-sort-field", items: asSelect(items), value: r.field, search: search, "data-force": open === "field" ? "focus" : undefined, onValueChange: (v) => { if (typeof v === "string" && v !== r.field && !takenBy(now.current, v, r.field, fieldOf))
171
+ change(now.current.map((x, k) => (k === i ? { ...x, field: v } : x))); } }), open === "field" && shownList(items, r.field, w.field, true)] }), _jsxs("div", { className: "o-sort-editor-direction", children: [_jsx(Select, { size: "xs", listWidth: "rows", "aria-label": w.direction, "data-slot": "vk-sort-direction", items: asSelect(DIRECTIONS), value: r.direction, "data-force": open === "direction" ? "focus" : undefined, onValueChange: turn(i) }), _jsx(DirectionFit, { items: asSelect(DIRECTIONS) }), open === "direction" && shownList(DIRECTIONS, r.direction, w.direction, false)] }), _jsx(Button, { kind: "quiet", shape: "icon", size: "2xs", look: X_LOOK, className: "o-sort-editor-remove", "data-slot": "vk-sort-remove", "aria-label": w.remove(name), icon: glyph(X), onClick: () => remove(i) })] }, r.field));
172
+ }), aside.map((a) => (_jsxs("div", { role: "listitem", className: "o-sort-editor-rule o-sort-editor-aside", "data-slot": "vk-sort-rule", "data-key": a.key, "data-aside": "", "data-aside-key": a.key, children: [_jsx("span", { className: "o-sort-editor-grip-place", "aria-hidden": "true" }), _jsx("div", { className: "o-sort-editor-field", children: _jsx(Tooltip, { label: a.why, side: "bottom", children: _jsx("span", { className: "o-sort-editor-why", children: _jsx(Select, { size: "xs", listWidth: "rows", "aria-label": w.fieldNamed(a.label), "data-slot": "vk-sort-field", items: asSelect(pickable()), value: null, placeholder: a.label, search: search, onValueChange: pointAt(a.key) }) }) }) }), _jsxs("div", { className: "o-sort-editor-direction", children: [_jsx(Tooltip, { label: a.why, side: "bottom", children: _jsx("span", { className: "o-sort-editor-why", children: _jsx(Select, { size: "xs", listWidth: "rows", "aria-label": w.direction, "data-slot": "vk-sort-direction", items: asSelect(DIRECTIONS), value: a.direction, disabled: true, onValueChange: () => { } }) }) }), _jsx(DirectionFit, { items: asSelect(DIRECTIONS) })] }), _jsx(Menu, { label: w.sortBy(a.label), align: "end", entries: asideEntries(a), trigger: _jsx(Button, { kind: "quiet", shape: "icon", size: "2xs", look: X_LOOK, className: "o-sort-editor-more", "data-slot": "vk-sort-rule-more", "aria-label": w.actionsFor(a.label), icon: glyph(DOTS) }) })] }, `aside-${a.key}`)))] }), (adds || rules.length > 0) && _jsxs("div", { className: "o-sort-editor-foot", "data-slot": "vk-sort-foot", children: [adds && addButton("sm"), rules.length > 0 && _jsx(Button, { kind: "quiet", size: "sm", className: "o-sort-editor-clear", "data-slot": "vk-sort-clear", onClick: () => { closePop(); change([]); if (!asideNow.current.length)
174
173
  onDone?.(); }, children: w.clearAllSorts })] }), _jsx(Popover, { open: pop?.list === "add", onOpenChange: (o) => { if (!o)
175
174
  closePop(); }, anchor: pop?.at, className: "o-sort-editor-pop", "aria-label": w.add, children: pop?.list === "add" && addPicker })] }) }));
176
175
  return { body, head: {} };
@@ -1,7 +1,7 @@
1
1
  /* The sort editor: what a list's sort opens (KIT-623), after Attio's (the toolbar canvas's round 3 Sort board and round 11 PhoneSort
2
2
  board). Every value is a public --vk-* name (sort-editor/tokens.ts). On a computer, what the Popover holds: the rules, each a row 28 high, 8 apart (its
3
3
  grip, the field's box 208 wide, the direction's 152, ×: as wide as its two boxes need, Company › Industry and Descending whole,
4
- Mihai, 17 Nov 2026), then 12 under them its foot, the filter editor's (KIT-794): a row, Add sort at its start, Clear all sorts at
4
+ Mihai, 17 Nov 2026; the direction's wider where the app's words need it, VK-976), then 12 under them its foot, the filter editor's (KIT-794): a row, Add sort at its start, Clear all sorts at
5
5
  its end. A rule held by its grip lifts on the overlay's ground with a shadow. On a phone, what the Sheet holds: Field rows' card, each rule 56 high (its field's mark, its name
6
6
  and its direction under it, ⋯), or, with none, what it says; then Add sort and Clear all, the whole width. Its narrow form
7
7
  (KIT-672), what Customize's Sort holds in the Pane on a computer: the phone's structure at a computer's sizes (Mihai, 19 Nov
@@ -27,13 +27,24 @@
27
27
  .o-sort-editor-grip { flex: none; touch-action: none; }
28
28
  .o-sort-editor-field, .o-sort-editor-direction { position: relative; flex: none; min-width: 0; }
29
29
  .o-sort-editor-field { width: calc(var(--vk-spacing) * 52); }
30
- .o-sort-editor-direction { width: calc(var(--vk-spacing) * 38); }
30
+ /* The direction's box as wide as the longer of its two words in the app's language, whichever is picked, so the row never moves on a
31
+ turn: its field and both words drawn as its field draws them, out of sight, stand in one place, the widest setting it (VK-976).
32
+ Never under 152, so English's Descending draws as it did; never past 240, the filter editor's boxes' (filter-editor.css), a
33
+ longer word then ending in "…" (the Select's own words cut). An app's own width on the box still wins. */
34
+ .o-sort-editor-direction { display: grid; grid-template-columns: minmax(0, 1fr); min-width: calc(var(--vk-spacing) * 38); max-width: calc(var(--vk-spacing) * 60); }
35
+ .o-sort-editor-direction > :is(.o-select, .o-sort-editor-why), .o-sort-editor-fit, .o-sort-editor-fit > * { grid-area: 1 / 1; }
36
+ .o-sort-editor-fit { display: grid; height: 0; overflow: hidden; visibility: hidden; pointer-events: none; }
31
37
  .o-sort-editor-field > .o-select, .o-sort-editor-direction > .o-select { width: 100%; }
32
38
  .o-sort-editor-remove { flex: none; }
33
39
 
34
40
  /* Add sort's fields, and in the narrow form a rule's direction, in the Popover under what was pressed: as wide as its rows, never
35
41
  under 192 (the kit's w-fit and min-w-48, written here since an app compiles no utilities of ViewKit's). */
36
42
  .o-popover.o-sort-editor-pop { width: fit-content; min-width: calc(var(--vk-spacing) * 48); }
43
+ /* ViewKit's own Popover holding the rules on a computer (the ready toolbar's Sort): as wide as its rows, so each rule's grip, field,
44
+ direction and × stand inside it, never under the 288 it opens Add sort's fields at, and never past the room on screen (its own
45
+ --available-width, popover.css). Keyed on what it holds, so the fields with no rule keep their 288; an app's own Popover, or its own
46
+ width on this one, is the app's (VK-977). */
47
+ .o-popover:has(.o-sort-editor[data-sort-form="computer"]) { width: max-content; min-width: max(var(--anchor-width, 0px), calc(var(--vk-spacing) * 72)); }
37
48
 
38
49
  /* A list a page shows standing open: under what opens it, over the rules, as the Select's list stands, as wide as its rows, never
39
50
  under 192 nor its box, never past 288 (listWidth, select.css). Scoped to the editor, so it wins over the smooth list's own
@@ -6,10 +6,6 @@ export declare const SWITCH_ROW_TOKENS: readonly [{
6
6
  readonly name: "--vk-border-subtle";
7
7
  readonly kind: "colour";
8
8
  readonly outright: "--border-subtle";
9
- }, {
10
- readonly name: "--vk-hovered";
11
- readonly kind: "colour";
12
- readonly outright: "--surface-hovered";
13
9
  }, {
14
10
  readonly name: "--vk-border-width";
15
11
  readonly kind: "size";
@@ -38,14 +34,6 @@ export declare const SWITCH_ROW_TOKENS: readonly [{
38
34
  readonly name: "--vk-spacing";
39
35
  readonly kind: "size";
40
36
  readonly outright: "--spacing";
41
- }, {
42
- readonly name: "--vk-duration-fast";
43
- readonly kind: "motion";
44
- readonly outright: "--duration-fast";
45
- }, {
46
- readonly name: "--vk-ease-out";
47
- readonly kind: "motion";
48
- readonly outright: "--ease-out";
49
37
  }];
50
38
  /** The rows' card's own machinery: the size its smooth corner is fitted to. */
51
39
  export declare const SWITCH_ROW_PRIVATE: readonly ["--rows-card-"];
@@ -1,7 +1,6 @@
1
1
  export const SWITCH_ROW_TOKENS = [
2
2
  { name: "--vk-border", kind: "colour", outright: "--border" },
3
3
  { name: "--vk-border-subtle", kind: "colour", outright: "--border-subtle" },
4
- { name: "--vk-hovered", kind: "colour", outright: "--surface-hovered" },
5
4
  { name: "--vk-border-width", kind: "size", outright: "--border-width" },
6
5
  { name: "--vk-corner-smoothing", kind: "size", outright: "--corner-smoothing" },
7
6
  { name: "--vk-font-size-sm", kind: "size", outright: "--text-sm" },
@@ -9,7 +8,5 @@ export const SWITCH_ROW_TOKENS = [
9
8
  { name: "--vk-line-height-sm", kind: "size", outright: "--text-sm--line-height" },
10
9
  { name: "--vk-radius-lg", kind: "size", outright: "--radius-lg" },
11
10
  { name: "--vk-spacing", kind: "size", outright: "--spacing" },
12
- { name: "--vk-duration-fast", kind: "motion", outright: "--duration-fast" },
13
- { name: "--vk-ease-out", kind: "motion", outright: "--ease-out" },
14
11
  ];
15
12
  export const SWITCH_ROW_PRIVATE = ["--rows-card-"];
@@ -1,6 +1,6 @@
1
1
  /* The SwitchRow and SwitchRows, as the Outright kit draws them (switch-row/switch-row.tsx): a setting in a settings list, its
2
- words (choice.css) on the left and the Switch (switch.css) on the right, which reads a row under the pointer as its own
3
- hover; the rows in a bordered box.
2
+ words (choice.css) on the left and the Switch (switch.css) on the right, which alone switches it (KIT-969); the rows in a
3
+ bordered box.
4
4
 
5
5
  The rules sit in the components layer, so a utility class on a row still wins. */
6
6
  @layer components {
@@ -10,14 +10,10 @@
10
10
  .o-switch-row {
11
11
  display: flex; align-items: center; justify-content: space-between; gap: calc(var(--vk-spacing) * 4);
12
12
  padding: calc(var(--vk-spacing) * 3.5) calc(var(--vk-spacing) * 4); border-top: var(--vk-border-width) solid var(--vk-border-subtle);
13
- cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background-color var(--vk-duration-fast) var(--vk-ease-out);
13
+ -webkit-tap-highlight-color: transparent;
14
14
  }
15
15
  .o-switch-row:first-child { border-top: 0; }
16
- @media (hover: hover) { .o-switch-row:hover { background-color: var(--vk-hovered); } }
17
16
  .o-switch-row .o-choice-label { font-weight: var(--vk-font-weight-medium); }
18
- .o-switch-row:has(.o-switch[data-disabled]) { cursor: not-allowed; background-color: transparent; }
19
-
20
- @media (prefers-reduced-motion: reduce) { .o-switch-row { transition: none; } }
21
17
  /* ── The rows' card smooth: following the token corner-smoothing, drawn with the smooth outline (smooth.css) in every browser
22
18
  that knows shape(); one that doesn't keeps the corners above. Its round part is fitted to one row, as a control's is.
23
19
  Nothing stands outside it (its rows were hidden past its edge), so it is clipped itself, its rows with it, hiding nothing
@@ -66,21 +66,26 @@
66
66
  }
67
67
 
68
68
  /* ── Sizes: sm, four fifths of its shape, in dense rows. On a phone every switch but a small one draws the phone's shape, and
69
- lg draws it anywhere: Round (after iOS 18), 31 × 51 with a 27 thumb; or Capsule (after iOS 26), what nothing picked draws, 31 × 71, its thumb 27 × 41.
70
- Both on the neutral fill with no edge, whatever the computer's shape ─────────────────────────────────────────── */
69
+ lg draws it anywhere: Round (after iOS 18), 31 × 51 with a 27 thumb; or Capsule (after iOS 26's Settings, measured at 402), what
70
+ nothing picked draws, 28 × 63, its thumb 24 × 37 two in.
71
+ Both on the neutral fill with no edge, whatever the computer's shape; on a phone its thumb white, on or off, in both themes, as iOS's ── */
71
72
  .o-switch.o-switch-sm { --sw-u: 0.8; }
72
73
  .o-switch.o-switch-lg {
73
74
  --sw-h: calc(var(--vk-spacing) * 7.75); --sw-w0: calc(var(--vk-spacing) * 12.75); --sw-tw: calc(var(--vk-spacing) * 6.75); --sw-th: calc(var(--vk-spacing) * 6.75); --sw-inset: calc(var(--vk-spacing) * 0.5); --sw-bar: 100%;
74
75
  --sw-rest: var(--vk-neutral); --sw-hover: var(--vk-neutral-hovered); --sw-edge-rest: transparent; --sw-edge-hover: transparent;
75
76
  --sw-on-track: var(--sw-on); --sw-thumb-rest: var(--vk-fg-inverse); --sw-thumb-on: var(--vk-fg-on-brand); --sw-thumb-shadow: var(--vk-shadow-md); --sw-glyph-on: var(--sw-on); --sw-glyph-off: var(--vk-fg-subtle); --sw-ink: var(--vk-fg-on-brand);
76
77
  }
77
- [data-switch-phone="capsule"] .o-switch.o-switch-lg, .o-switch.o-switch-lg:not([data-switch-phone] *) { --sw-w0: calc(var(--vk-spacing) * 17.75); --sw-tw: calc(var(--vk-spacing) * 10.25); }
78
+ [data-switch-phone="capsule"] .o-switch.o-switch-lg, .o-switch.o-switch-lg:not([data-switch-phone] *) {
79
+ --sw-h: calc(var(--vk-spacing) * 7); --sw-w0: calc(var(--vk-spacing) * 15.75); --sw-tw: calc(var(--vk-spacing) * 9.25); --sw-th: calc(var(--vk-spacing) * 6); --sw-thumb-shadow: var(--vk-shadow-sm);
80
+ }
78
81
  .o-switch:not(.o-switch-sm):where([data-vk-phone], [data-vk-phone] *) {
79
82
  --sw-h: calc(var(--vk-spacing) * 7.75); --sw-w0: calc(var(--vk-spacing) * 12.75); --sw-tw: calc(var(--vk-spacing) * 6.75); --sw-th: calc(var(--vk-spacing) * 6.75); --sw-inset: calc(var(--vk-spacing) * 0.5); --sw-bar: 100%;
80
83
  --sw-rest: var(--vk-neutral); --sw-hover: var(--vk-neutral-hovered); --sw-edge-rest: transparent; --sw-edge-hover: transparent;
81
- --sw-on-track: var(--sw-on); --sw-thumb-rest: var(--vk-fg-inverse); --sw-thumb-on: var(--vk-fg-on-brand); --sw-thumb-shadow: var(--vk-shadow-md); --sw-glyph-on: var(--sw-on); --sw-glyph-off: var(--vk-fg-subtle); --sw-ink: var(--vk-fg-on-brand);
84
+ --sw-on-track: var(--sw-on); --sw-thumb-rest: var(--vk-fg-inverse); --sw-thumb-on: var(--vk-fg-inverse); --sw-thumb-shadow: var(--vk-shadow-md); --sw-glyph-on: var(--sw-on); --sw-glyph-off: var(--vk-fg-subtle); --sw-ink: var(--vk-fg-on-brand);
85
+ }
86
+ [data-switch-phone="capsule"] .o-switch:not(.o-switch-sm):where([data-vk-phone], [data-vk-phone] *), .o-switch:not(.o-switch-sm):not([data-switch-phone] *):where([data-vk-phone], [data-vk-phone] *) {
87
+ --sw-h: calc(var(--vk-spacing) * 7); --sw-w0: calc(var(--vk-spacing) * 15.75); --sw-tw: calc(var(--vk-spacing) * 9.25); --sw-th: calc(var(--vk-spacing) * 6); --sw-thumb-shadow: var(--vk-shadow-sm);
82
88
  }
83
- [data-switch-phone="capsule"] .o-switch:not(.o-switch-sm):where([data-vk-phone], [data-vk-phone] *), .o-switch:not(.o-switch-sm):not([data-switch-phone] *):where([data-vk-phone], [data-vk-phone] *) { --sw-w0: calc(var(--vk-spacing) * 17.75); --sw-tw: calc(var(--vk-spacing) * 10.25); }
84
89
 
85
90
  /* ── Motion. Stretch while held, the kit's until duration-base on ease-in-out, the thumb a spacing step longer toward
86
91
  where it is going while pressed. Spring: it runs a little past and settles. Stretch as it goes: its front edge leaves first
@@ -93,7 +98,7 @@
93
98
  /* ── Under the pointer, on the track or its row: its shape's deeper paint; on, a deeper brand ─────────────────────────── */
94
99
  /* A hover only on a screen with a pointer (iOS keeps :hover on what was last tapped); a press and the forced state stay out. */
95
100
  .o-switch[data-force="hover"]:not([data-disabled]) { --sw-off: var(--sw-hover); --sw-edge: var(--sw-edge-hover); --sw-on: var(--vk-brand-hovered); }
96
- @media (hover: hover) { :is(.o-switch:hover, .o-switch-row:hover .o-switch):not([data-disabled]) { --sw-off: var(--sw-hover); --sw-edge: var(--sw-edge-hover); --sw-on: var(--vk-brand-hovered); } }
101
+ @media (hover: hover) { .o-switch:hover:not([data-disabled]) { --sw-off: var(--sw-hover); --sw-edge: var(--sw-edge-hover); --sw-on: var(--vk-brand-hovered); } }
97
102
 
98
103
  /* ── On: the brand fills the track, the thumb crosses, its front edge in lead and its back in trail ───────────────────── */
99
104
  .o-switch[data-checked] { --sw-paint: var(--sw-on-track); --sw-ring: var(--sw-on-track); }
@@ -141,7 +146,7 @@
141
146
  colour fills it. The pointer never takes it away; focus rings it in red; disabled wins ─────────────────────────────── */
142
147
  .o-switch:is([aria-invalid="true"], [data-invalid], .o-fieldset[data-invalid] *):not([data-disabled]),
143
148
  .o-switch[data-force="hover"]:is([aria-invalid="true"], [data-invalid], .o-fieldset[data-invalid] *):not([data-disabled]) { --sw-edge: var(--vk-border-danger); --sw-on: var(--vk-danger-bold); --sw-knob-on: var(--vk-fg-inverse); }
144
- @media (hover: hover) { :is(.o-switch:hover, .o-switch-row:hover .o-switch):is([aria-invalid="true"], [data-invalid], .o-fieldset[data-invalid] *):not([data-disabled]) { --sw-edge: var(--vk-border-danger); --sw-on: var(--vk-danger-bold-hovered); --sw-knob-on: var(--vk-fg-inverse); } }
149
+ @media (hover: hover) { .o-switch:hover:is([aria-invalid="true"], [data-invalid], .o-fieldset[data-invalid] *):not([data-disabled]) { --sw-edge: var(--vk-border-danger); --sw-on: var(--vk-danger-bold-hovered); --sw-knob-on: var(--vk-fg-inverse); } }
145
150
  .o-switch[data-force="hover"][data-checked]:is([aria-invalid="true"], [data-invalid], .o-fieldset[data-invalid] *):not([data-disabled]) { --sw-on: var(--vk-danger-bold-hovered); }
146
151
  .o-switch:is(:focus-visible, [data-force="focus"]):is([aria-invalid="true"], [data-invalid], .o-fieldset[data-invalid] *) { outline-color: var(--vk-border-danger); }
147
152
 
@@ -154,6 +159,11 @@
154
159
  --sw-knob: var(--vk-fg-disabled); --sw-knob-on: var(--vk-fg-disabled); --sw-knob-shadow: none; cursor: not-allowed;
155
160
  }
156
161
  .o-switch[data-disabled][data-locked] { --sw-knob: var(--vk-fg-inverse); --sw-knob-on: var(--vk-fg-inverse); --sw-knob-shadow: var(--sw-thumb-shadow); }
162
+ /* On a phone, locked is iOS's: the switch as it stands, faded, with no lock in its thumb (KIT-972). */
163
+ .o-switch[data-disabled][data-locked]:where([data-vk-phone], [data-vk-phone] *) {
164
+ --sw-off: var(--sw-rest); --sw-edge: var(--sw-edge-rest); --sw-on: var(--vk-brand); --sw-on-track: var(--sw-on); --sw-knob: var(--sw-thumb-rest); --sw-knob-on: var(--sw-thumb-on); opacity: 0.45;
165
+ }
166
+ .o-switch[data-disabled][data-locked]:where([data-vk-phone], [data-vk-phone] *) > .o-switch-thumb > .o-switch-lock { display: none; }
157
167
 
158
168
  @media (prefers-reduced-motion: reduce) { .o-switch::before, .o-switch-thumb, .o-switch-fill, .o-switch-i, .o-switch-o, .o-switch-word { transition: none; } }
159
169
  }
@@ -6,6 +6,8 @@ export interface TagProps {
6
6
  size?: "md" | "sm";
7
7
  /** The rest of a row's tags, "+4": the same edge, the number, no icon. */
8
8
  count?: number;
9
+ /** A quiet word after its name, inside the chip, before its remove button ("main"). */
10
+ aside?: React.ReactNode;
9
11
  /** In a field: a remove button named "Remove <tag>". */
10
12
  onRemove?: () => void;
11
13
  className?: string;
@@ -13,7 +15,7 @@ export interface TagProps {
13
15
  "data-force"?: "hover" | "focus";
14
16
  }
15
17
  /** A free word in a plain edge, the tag icon in front. */
16
- export declare function Tag({ children, size, count, onRemove, className, "data-force": force }: TagProps): import("react/jsx-runtime").JSX.Element;
18
+ export declare function Tag({ children, size, count, aside, onRemove, className, "data-force": force }: TagProps): import("react/jsx-runtime").JSX.Element;
17
19
  /** A chip's cut: its first child, which draws its ground and edge with the smooth outline under Corner smoothing's Smooth,
18
20
  * the chip itself never clipped (tag.css). The Tag's and the Option's. */
19
21
  export declare function TagCut(): import("react/jsx-runtime").JSX.Element;
@@ -5,12 +5,12 @@ import { phoneMark, usePhoneForm } from "../internal/phone.js";
5
5
  const TAG = ["M7.5 7.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", "M3 6v5.172a2 2 0 0 0 .586 1.414l7.71 7.71a2.41 2.41 0 0 0 3.408 0l5.592 -5.592a2.41 2.41 0 0 0 0 -3.408l-7.71 -7.71a2 2 0 0 0 -1.414 -.586h-5.172a3 3 0 0 0 -3 3z"];
6
6
  const X = ["M18 6l-12 12", "M6 6l12 12"];
7
7
  const glyph = (paths, className, strokeWidth) => (_jsx("svg", { className: className, viewBox: "0 0 24 24", strokeWidth: strokeWidth, "aria-hidden": "true", children: paths.map((d) => _jsx("path", { d: d }, d)) }));
8
- export function Tag({ children, size = "md", count, onRemove, className, "data-force": force }) {
8
+ export function Tag({ children, size = "md", count, aside, onRemove, className, "data-force": force }) {
9
9
  const cls = cx("o-tag", size === "sm" && "o-tag-sm", count != null && "o-tag-count", className);
10
10
  if (count != null)
11
11
  return _jsxs("span", { className: cls, "data-kit": "tag", children: [_jsx(TagCut, {}), "+", count] });
12
12
  const word = typeof children === "string" ? children : undefined;
13
- return (_jsxs("span", { className: cls, title: word, "data-kit": "tag", children: [_jsx(TagCut, {}), glyph(TAG, "o-tag-icon", 2), _jsx("span", { className: "o-tag-word", children: children }), onRemove && _jsx(TagRemove, { word: word, onRemove: onRemove, force: force })] }));
13
+ return (_jsxs("span", { className: cls, title: word, "data-kit": "tag", children: [_jsx(TagCut, {}), glyph(TAG, "o-tag-icon", 2), _jsx("span", { className: "o-tag-word", children: children }), aside != null && _jsx("span", { className: "o-tag-aside", children: aside }), onRemove && _jsx(TagRemove, { word: word, onRemove: onRemove, force: force })] }));
14
14
  }
15
15
  export function TagCut() {
16
16
  return _jsx("span", { className: "o-tag-cut o-smooth o-smooth-ease", "aria-hidden": "true" });
@@ -38,6 +38,10 @@ export declare const TAG_TOKENS: readonly [{
38
38
  readonly name: "--vk-font-weight-medium";
39
39
  readonly kind: "size";
40
40
  readonly outright: "--font-weight-medium";
41
+ }, {
42
+ readonly name: "--vk-font-weight-normal";
43
+ readonly kind: "size";
44
+ readonly outright: "--font-weight-normal";
41
45
  }, {
42
46
  readonly name: "--vk-radius-md";
43
47
  readonly kind: "size";
@@ -9,6 +9,7 @@ export const TAG_TOKENS = [
9
9
  { name: "--vk-focus-width", kind: "size", outright: "--focus-width" },
10
10
  { name: "--vk-font-size-xs", kind: "size", outright: "--text-xs" },
11
11
  { name: "--vk-font-weight-medium", kind: "size", outright: "--font-weight-medium" },
12
+ { name: "--vk-font-weight-normal", kind: "size", outright: "--font-weight-normal" },
12
13
  { name: "--vk-radius-md", kind: "size", outright: "--radius-md" },
13
14
  { name: "--vk-radius-xs", kind: "size", outright: "--radius-xs" },
14
15
  { name: "--vk-spacing", kind: "size", outright: "--spacing" },
@@ -10,6 +10,10 @@ export interface TagFieldProps {
10
10
  /** Off: nothing typed in, and its tags have no remove button. */
11
11
  disabled?: boolean;
12
12
  defaultValue?: string[];
13
+ /** Tags that stay: drawn first, with no remove button, and Backspace passes them by. One missing from the value is put first. */
14
+ fixed?: string[];
15
+ /** A quiet word after a tag's name, by its name ({ EUR: "main" }). */
16
+ asides?: Record<string, React.ReactNode>;
13
17
  onValueChange?: (tags: string[]) => void;
14
18
  placeholder?: string;
15
19
  className?: string;
@@ -17,4 +21,4 @@ export interface TagFieldProps {
17
21
  "data-force"?: string;
18
22
  }
19
23
  /** Tags inside the Input's field, before the caret, in a Field with its label, note and error. */
20
- export declare function TagField({ label, note, error, disabled, defaultValue, onValueChange, placeholder, className, "data-force": force }: TagFieldProps): import("react/jsx-runtime").JSX.Element;
24
+ export declare function TagField({ label, note, error, disabled, defaultValue, fixed, asides, onValueChange, placeholder, className, "data-force": force }: TagFieldProps): import("react/jsx-runtime").JSX.Element;
@@ -1,19 +1,25 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import * as React from "react";
3
+ import { cx } from "../../internal/cx.js";
4
+ import { FieldRowsCardContext } from "../../internal/field-rows.js";
3
5
  import { Field } from "../field/field.js";
4
6
  import { Input, InputGroup } from "../input/input.js";
5
7
  import { Tag } from "../tag/tag.js";
6
- export function TagField({ label, note, error, disabled, defaultValue = [], onValueChange, placeholder = "Add a tag", className, "data-force": force }) {
7
- const [tags, setTags] = React.useState(defaultValue), [draft, setDraft] = React.useState("");
8
+ export function TagField({ label, note, error, disabled, defaultValue = [], fixed = [], asides, onValueChange, placeholder = "Add a tag", className, "data-force": force }) {
9
+ const [tags, setTags] = React.useState(() => [...fixed, ...defaultValue.filter((t) => !fixed.includes(t))]), [draft, setDraft] = React.useState("");
10
+ const loose = tags.filter((t) => !fixed.includes(t));
8
11
  const set = (next) => { setTags(next); onValueChange?.(next); };
12
+ const inRows = React.useContext(FieldRowsCardContext) != null;
9
13
  const add = () => { const w = draft.trim(); if (w && !tags.includes(w))
10
14
  set([...tags, w]); setDraft(""); };
11
- return (_jsx(Field, { label: label, note: note, error: error, disabled: disabled, className: className, children: _jsxs(InputGroup, { className: "o-tag-field", "data-force": force, children: [tags.map((t) => _jsx(Tag, { onRemove: disabled ? undefined : () => set(tags.filter((x) => x !== t)), children: t }, t)), _jsx(Input, { className: "o-tag-field-input", value: draft, placeholder: placeholder, autoComplete: "off", onChange: (e) => setDraft(e.currentTarget.value), onBlur: add, onKeyDown: (e) => {
15
+ return (_jsx(Field, { label: label, note: note, error: error, disabled: disabled, className: cx(inRows && "o-tag-field-row", className), children: _jsxs(InputGroup, { className: "o-tag-field", "data-force": force, children: [tags.map((t) => _jsx(Tag, { aside: asides?.[t], onRemove: disabled || fixed.includes(t) ? undefined : () => set(tags.filter((x) => x !== t)), children: t }, t)), _jsx(Input, { className: "o-tag-field-input", value: draft, placeholder: placeholder, autoComplete: "off", onChange: (e) => setDraft(e.currentTarget.value), onBlur: add, onKeyDown: (e) => {
12
16
  if (e.key === "Enter" || e.key === ",") {
13
17
  e.preventDefault();
14
18
  add();
15
19
  }
16
- else if (e.key === "Backspace" && !draft && tags.length)
17
- set(tags.slice(0, -1));
20
+ else if (e.key === "Backspace" && !draft && loose.length) {
21
+ const last = loose[loose.length - 1];
22
+ set(tags.filter((x) => x !== last));
23
+ }
18
24
  } })] }) }));
19
25
  }
@@ -1,4 +1,20 @@
1
1
  export declare const TAG_FIELD_TOKENS: readonly [{
2
+ readonly name: "--vk-border-width";
3
+ readonly kind: "size";
4
+ readonly outright: "--border-width";
5
+ }, {
6
+ readonly name: "--vk-font-weight-normal";
7
+ readonly kind: "size";
8
+ readonly outright: "--font-weight-normal";
9
+ }, {
10
+ readonly name: "--vk-neutral";
11
+ readonly kind: "colour";
12
+ readonly outright: "--background-neutral";
13
+ }, {
14
+ readonly name: "--vk-radius-full";
15
+ readonly kind: "size";
16
+ readonly outright: "--radius-full";
17
+ }, {
2
18
  readonly name: "--vk-spacing";
3
19
  readonly kind: "size";
4
20
  readonly outright: "--spacing";
@@ -1,4 +1,8 @@
1
1
  export const TAG_FIELD_TOKENS = [
2
+ { name: "--vk-border-width", kind: "size", outright: "--border-width" },
3
+ { name: "--vk-font-weight-normal", kind: "size", outright: "--font-weight-normal" },
4
+ { name: "--vk-neutral", kind: "colour", outright: "--background-neutral" },
5
+ { name: "--vk-radius-full", kind: "size", outright: "--radius-full" },
2
6
  { name: "--vk-spacing", kind: "size", outright: "--spacing" },
3
7
  ];
4
8
  export const TAG_FIELD_PRIVATE = [];
@@ -10,4 +10,23 @@
10
10
  .o-input.o-input-group.o-tag-field { flex-wrap: wrap; height: auto; min-height: calc(var(--vk-spacing) * 9); padding-block: calc(var(--vk-spacing) * 1.5); }
11
11
  .o-input.o-input-group.o-tag-field:where([data-vk-phone], [data-vk-phone] *) { min-height: calc(var(--vk-spacing) * 11); padding-block: calc(var(--vk-spacing) * 2.5); }
12
12
  .o-input-control.o-tag-field-input { align-self: center; min-width: calc(var(--vk-spacing) * 20); }
13
+
14
+ /* ── In a row of Field rows (VK-978; the settings canvas, round 3: look-ios.mjs .tok, .caret): the card's row as iOS draws a To
15
+ field. Its tokens fill the row from its words' inset, 6 apart, 12 above and below, wrapping as they grow, the caret after the
16
+ last (the Input typed in place, input.css). Its label names the box but stands out of sight: its place titles the group. Each
17
+ token is the Tag as iOS draws it: 30 tall, a pill on the neutral ground, no edge, no icon and no smoothing, the row's words in the normal
18
+ weight, as wide as the row lets it; its remove button stays, quiet. Its rules outweigh the box's and the phone's above, and
19
+ the Tag's own. ── */
20
+ .o-field.o-field-row.o-tag-field-row { position: relative; }
21
+ .o-tag-field-row > .o-field-row-label { position: absolute; width: var(--vk-border-width); height: var(--vk-border-width); overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
22
+ .o-input.o-input-inrow.o-tag-field.o-tag-field { flex-wrap: wrap; align-content: center; gap: calc(var(--vk-spacing) * 1.5); min-height: 0; padding-block: calc(var(--vk-spacing) * 3); }
23
+ .o-input.o-input-inrow.o-tag-field > .o-tag.o-tag {
24
+ --tag-h: calc(var(--vk-spacing) * 7.5); --tag-r: var(--vk-radius-full);
25
+ max-width: 100%; padding: 0 calc(var(--vk-spacing) * 2.5); border-radius: var(--tag-r); background-color: var(--vk-neutral); box-shadow: none;
26
+ font-size: inherit; font-weight: var(--vk-font-weight-normal);
27
+ }
28
+ /* A pill has no corner to smooth: the token paints its own ground, and its cut (the smooth ground and edge) stands down. */
29
+ .o-input-inrow.o-tag-field > .o-tag > :is(.o-tag-cut, .o-tag-icon) { display: none; }
30
+ /* Once a token stands, the caret alone after it: the placeholder only asks while the row is empty. */
31
+ .o-input-inrow.o-tag-field:has(> .o-tag) > .o-tag-field-input::placeholder { color: transparent; }
13
32
  }
@@ -20,6 +20,8 @@
20
20
  /* Its word is cropped so a long one ends in "…". The box that crops it stands as tall as the chip, never only as tall as its
21
21
  letters: at the chip's line-height of 1 the crop took the foot of every g, y and p. The word stays where it was. */
22
22
  .o-tag-word { overflow: hidden; text-overflow: ellipsis; line-height: var(--tag-h); }
23
+ /* A quiet word after its name ("main"): the quieter colour, the normal weight. */
24
+ .o-tag-aside { flex: none; color: var(--vk-fg-subtle); font-weight: var(--vk-font-weight-normal); line-height: var(--tag-h); }
23
25
  .o-tag-icon { flex: none; width: calc(var(--vk-spacing) * 3); height: calc(var(--vk-spacing) * 3); margin-left: calc(var(--vk-spacing) * -0.25); fill: none; stroke: var(--vk-fg-subtle); stroke-linecap: round; stroke-linejoin: round; }
24
26
  /* Small, in dense rows; a count for the rest, its number in the quieter colour. */
25
27
  .o-tag.o-tag-sm { --tag-h: calc(var(--vk-spacing) * 5); padding: 0 calc(var(--vk-spacing) * 1.5); }
@@ -48,7 +48,7 @@ export interface TextEditorParts {
48
48
  /** What the shell holds: on a computer what stands in the cell, on a phone what the Sheet's body holds. */
49
49
  body: React.ReactNode;
50
50
  /** On a phone, the Sheet head's ✕ (left) and ✓ (right), or on a step its back; on a computer, nothing. */
51
- head: Pick<SheetHeadProps, "left" | "right" | "onBack" | "close">;
51
+ head: Pick<SheetHeadProps, "left" | "right" | "onBack" | "backSlot" | "close">;
52
52
  /** On a phone's step, its title (Country); left out, the field's name. */
53
53
  title?: string;
54
54
  }
@@ -232,15 +232,15 @@ export function useTextEditor(props) {
232
232
  }, [root, form, place, draft, worn.box, worn.long, worn.phone, kind, long, shown]);
233
233
  if (form === "phone") {
234
234
  const step = withCountry && open;
235
- const field = withCountry ? (_jsxs(InputGroup, { size: "lg", children: [_jsxs(InputGroupAddon, { side: "start", children: [_jsx(InputGroupButton, { className: "o-text-editor-country", "aria-label": `${w.country}: ${countryName(phone.country, language)}`, iconEnd: glyph(DOWN), onClick: () => setOpen(true), children: _jsx("span", { className: "o-text-editor-country-code", children: phone.country }) }), _jsx("span", { className: "o-text-editor-dial", children: dialOf(phone.country) })] }), _jsx(Input, { ref: number, autofill: false, type: "tel", inputMode: "tel", enterKeyHint: "done", value: phone.digits, ...common, placeholder: patternOf(phone.country), spellCheck: false, onChange: (e) => movePhone({ digits: e.target.value }), onKeyDown: onKeyDown })] })) : (_jsx(Input, { ref: box, size: "lg", autofill: false, multiline: long || kind === "text", grow: long || kind === "text", className: long ? "o-text-editor-tall" : undefined, type: long || kind === "text" ? undefined : keys.type, inputMode: keys.inputMode, enterKeyHint: long ? undefined : "done", value: draft, ...common, onChange: change, onKeyDown: long ? undefined : onKeyDown }));
236
- const body = (_jsx("div", { ref: placeRoot, className: "o-text-editor", "data-kit": "text-editor", "data-text-form": "phone", ...phoneMark(!!host || small), "data-text-kind": kind, "data-text-view": step ? "country" : undefined, children: step ? countriesList : _jsx(Field, { error: refused ?? undefined, children: field }) }));
235
+ const field = withCountry ? (_jsxs(InputGroup, { size: "lg", "data-slot": "vk-text-box", children: [_jsxs(InputGroupAddon, { side: "start", children: [_jsx(InputGroupButton, { className: "o-text-editor-country", "data-slot": "vk-text-country", "aria-label": `${w.country}: ${countryName(phone.country, language)}`, iconEnd: glyph(DOWN), onClick: () => setOpen(true), children: _jsx("span", { className: "o-text-editor-country-code", children: phone.country }) }), _jsx("span", { className: "o-text-editor-dial", "data-slot": "vk-text-dial", children: dialOf(phone.country) })] }), _jsx(Input, { ref: number, autofill: false, type: "tel", inputMode: "tel", enterKeyHint: "done", value: phone.digits, ...common, placeholder: patternOf(phone.country), spellCheck: false, onChange: (e) => movePhone({ digits: e.target.value }), onKeyDown: onKeyDown })] })) : (_jsx(Input, { ref: box, size: "lg", "data-slot": "vk-text-box", autofill: false, multiline: long || kind === "text", grow: long || kind === "text", className: long ? "o-text-editor-tall" : undefined, type: long || kind === "text" ? undefined : keys.type, inputMode: keys.inputMode, enterKeyHint: long ? undefined : "done", value: draft, ...common, onChange: change, onKeyDown: long ? undefined : onKeyDown }));
236
+ const body = (_jsx("div", { ref: placeRoot, className: "o-text-editor", "data-slot": "vk-text", "data-kit": "text-editor", "data-text-form": "phone", ...phoneMark(!!host || small), "data-text-kind": kind, "data-text-view": step ? "country" : undefined, children: step ? countriesList : _jsx(Field, { error: refused ?? undefined, children: field }) }));
237
237
  if (step)
238
- return { body, head: { onBack: () => setOpen(false), close: false }, title: w.country };
238
+ return { body, head: { onBack: () => setOpen(false), backSlot: "vk-editor-back", close: false }, title: w.country };
239
239
  if (shell)
240
240
  return { body, head: {} };
241
241
  const head = {
242
- left: _jsx(SheetButton, { "aria-label": "Close", icon: glyph(X), onClick: leave }),
243
- right: _jsx(SheetButton, { kind: "primary", "aria-label": "Save", icon: glyph(TICK), onClick: keep }),
242
+ left: _jsx(SheetButton, { "data-slot": "vk-editor-close", "aria-label": "Close", icon: glyph(X), onClick: leave }),
243
+ right: _jsx(SheetButton, { "data-slot": "vk-editor-save", kind: "primary", "aria-label": "Save", icon: glyph(TICK), onClick: keep }),
244
244
  };
245
245
  return { body, head };
246
246
  }
@@ -252,8 +252,8 @@ export function useTextEditor(props) {
252
252
  return;
253
253
  keep();
254
254
  };
255
- const note = refused && _jsxs("div", { className: "o-text-editor-note", id: noteId, role: "alert", children: [glyph(["M12 8v5", "M12 16.5v.01", "M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"]), _jsx("span", { children: refused })] });
256
- const body = (_jsxs("div", { ref: placeRoot, className: "o-text-editor", "data-kit": "text-editor", "data-text-form": "computer", ...phoneMark(!!host || small), "data-text-kind": kind, "data-text-box": worn.box, "data-text-place": place, "data-refused": refused ? "" : undefined, onBlur: blur, children: [withCountry ? _jsxs(_Fragment, { children: [_jsxs(InlineInputGroup, { className: "o-text-editor-phone", "data-refused": refused ? "" : undefined, children: [_jsx(InputGroupAddon, { side: "start", children: _jsx(InputGroupButton, { className: "o-text-editor-country", look: COUNTRY, "aria-label": `${w.country}: ${countryName(phone.country, language)}`, "aria-haspopup": "listbox", "aria-expanded": open, iconEnd: glyph(DOWN), onClick: () => setOpen((o) => !o), children: _jsx("span", { className: "o-text-editor-country-code", children: phone.country }) }) }), _jsx(InputGroupAddon, { side: "start", children: _jsx("span", { className: "o-text-editor-dial", children: dialOf(phone.country) }) }), _jsx(Input, { ref: number, className: "o-text-editor-number", type: "tel", inputMode: "tel", enterKeyHint: "done", value: phone.digits, ...common, autofill: false, placeholder: patternOf(phone.country), spellCheck: false, onChange: (e) => movePhone({ digits: e.target.value }), onKeyDown: onKeyDown, "aria-invalid": refused ? true : undefined, "aria-describedby": refused ? noteId : undefined })] }), _jsx(Popover, { open: open, onOpenChange: (o, d) => {
255
+ const note = refused && _jsxs("div", { className: "o-text-editor-note", "data-slot": "vk-text-note", id: noteId, role: "alert", children: [glyph(["M12 8v5", "M12 16.5v.01", "M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"]), _jsx("span", { children: refused })] });
256
+ const body = (_jsxs("div", { ref: placeRoot, className: "o-text-editor", "data-slot": "vk-text", "data-kit": "text-editor", "data-text-form": "computer", ...phoneMark(!!host || small), "data-text-kind": kind, "data-text-box": worn.box, "data-text-place": place, "data-refused": refused ? "" : undefined, onBlur: blur, children: [withCountry ? _jsxs(_Fragment, { children: [_jsxs(InlineInputGroup, { className: "o-text-editor-phone", "data-slot": "vk-text-box", "data-refused": refused ? "" : undefined, children: [_jsx(InputGroupAddon, { side: "start", children: _jsx(InputGroupButton, { className: "o-text-editor-country", "data-slot": "vk-text-country", look: COUNTRY, "aria-label": `${w.country}: ${countryName(phone.country, language)}`, "aria-haspopup": "listbox", "aria-expanded": open, iconEnd: glyph(DOWN), onClick: () => setOpen((o) => !o), children: _jsx("span", { className: "o-text-editor-country-code", children: phone.country }) }) }), _jsx(InputGroupAddon, { side: "start", children: _jsx("span", { className: "o-text-editor-dial", "data-slot": "vk-text-dial", children: dialOf(phone.country) }) }), _jsx(Input, { ref: number, className: "o-text-editor-number", type: "tel", inputMode: "tel", enterKeyHint: "done", value: phone.digits, ...common, autofill: false, placeholder: patternOf(phone.country), spellCheck: false, onChange: (e) => movePhone({ digits: e.target.value }), onKeyDown: onKeyDown, "aria-invalid": refused ? true : undefined, "aria-describedby": refused ? noteId : undefined })] }), _jsx(Popover, { open: open, onOpenChange: (o, d) => {
257
257
  setOpen(o);
258
258
  if (shell)
259
259
  return;
@@ -262,7 +262,7 @@ export function useTextEditor(props) {
262
262
  if (!o && d.reason === "focus-out")
263
263
  requestAnimationFrame(() => { if (!root?.contains(document.activeElement))
264
264
  keep(); });
265
- }, anchor: root, side: "bottom", align: "start", sideOffset: spacingPx(1, root), onOutsidePress: (e) => (e.target instanceof Node && root?.contains(e.target) ? false : undefined), finalFocus: numberRef, style: { width: "calc(var(--vk-spacing) * 88)" }, "aria-label": w.country, children: _jsx("div", { ref: popup, children: open && countriesList }) })] }) : _jsxs(_Fragment, { children: [_jsx(InlineInput, { ref: box, multiline: true, className: "o-text-editor-box", value: draft, ...common, autofill: false, onChange: change, onKeyDown: onKeyDown, inputMode: keys.inputMode, enterKeyHint: long ? undefined : "done", "data-refused": refused ? "" : undefined, "aria-invalid": refused ? true : undefined, "aria-describedby": refused ? noteId : undefined }), _jsx("span", { ref: mirror, className: "o-text-editor-mirror", "aria-hidden": "true" })] }), note] }));
265
+ }, anchor: root, side: "bottom", align: "start", sideOffset: spacingPx(1, root), onOutsidePress: (e) => (e.target instanceof Node && root?.contains(e.target) ? false : undefined), finalFocus: numberRef, style: { width: "calc(var(--vk-spacing) * 88)" }, "aria-label": w.country, children: _jsx("div", { ref: popup, children: open && countriesList }) })] }) : _jsxs(_Fragment, { children: [_jsx(InlineInput, { ref: box, multiline: true, className: "o-text-editor-box", "data-slot": "vk-text-box", value: draft, ...common, autofill: false, onChange: change, onKeyDown: onKeyDown, inputMode: keys.inputMode, enterKeyHint: long ? undefined : "done", "data-refused": refused ? "" : undefined, "aria-invalid": refused ? true : undefined, "aria-describedby": refused ? noteId : undefined }), _jsx("span", { ref: mirror, className: "o-text-editor-mirror", "aria-hidden": "true" })] }), note] }));
266
266
  return { body, head: {} };
267
267
  }
268
268
  export function TextEditor(props) {