viewkitjs 0.27.0 → 0.29.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 (469) hide show
  1. package/CHANGELOG.md +178 -0
  2. package/MIGRATION.md +123 -5
  3. package/fields/dist/derived.d.ts +2 -1
  4. package/fields/dist/derived.js +9 -3
  5. package/fields/dist/entities.js +41 -3
  6. package/fields/dist/index.d.ts +1 -1
  7. package/fields/dist/index.js +1 -1
  8. package/fields/dist/messages.d.ts +8 -2
  9. package/fields/dist/messages.js +3 -0
  10. package/fields/dist/range.d.ts +6 -0
  11. package/fields/dist/range.js +8 -0
  12. package/fields/dist/registry.js +11 -1
  13. package/fields/dist/spec-changes.js +1 -0
  14. package/fields/dist/types.d.ts +23 -1
  15. package/fields/docs/guides/derived-fields.md +7 -5
  16. package/fields/docs/guides/field-types.md +2 -2
  17. package/fields/docs/guides/the-index.md +1 -1
  18. package/fields/docs/reference/fields.md +3 -1
  19. package/fields/docs/reference/types.md +3 -1
  20. package/fields/skills/viewkit/SKILL.md +1 -1
  21. package/package.json +2 -1
  22. package/postgres/dist/definitions/build.js +29 -5
  23. package/postgres/dist/definitions/label.d.ts +7 -0
  24. package/postgres/dist/definitions/label.js +9 -1
  25. package/postgres/dist/definitions/lookup.js +6 -2
  26. package/postgres/dist/definitions/place.d.ts +6 -3
  27. package/postgres/dist/definitions/rollup.js +5 -1
  28. package/postgres/dist/definitions/storage.d.ts +15 -0
  29. package/postgres/dist/definitions/storage.js +52 -1
  30. package/postgres/dist/definitions/stored.js +21 -0
  31. package/postgres/dist/phone.d.ts +13 -1
  32. package/postgres/dist/phone.js +23 -3
  33. package/postgres/dist/search-indexes.d.ts +6 -1
  34. package/postgres/dist/search-indexes.js +71 -25
  35. package/postgres/dist/search.js +3 -3
  36. package/postgres/docs/guides/definitions.md +22 -5
  37. package/postgres/docs/guides/field-map.md +5 -4
  38. package/postgres/docs/reference/definitions.md +3 -3
  39. package/postgres/docs/reference/postgres.md +1 -1
  40. package/views/dist/cells/cell-format.d.ts +3 -1
  41. package/views/dist/cells/cell-format.js +3 -3
  42. package/views/dist/cells/cell-values.js +9 -10
  43. package/views/dist/cells/use-cell-format.d.ts +8 -1
  44. package/views/dist/cells/use-cell-format.js +13 -2
  45. package/views/dist/contract.d.ts +218 -5
  46. package/views/dist/contract.js +233 -1
  47. package/views/dist/controls/alert/alert.d.ts +46 -0
  48. package/views/dist/controls/alert/alert.js +11 -0
  49. package/views/dist/controls/alert/looks.d.ts +4 -0
  50. package/views/dist/controls/alert/looks.js +19 -0
  51. package/views/dist/controls/alert/tokens.d.ts +92 -0
  52. package/views/dist/controls/alert/tokens.js +25 -0
  53. package/views/dist/controls/alert-dialog/alert-dialog.d.ts +50 -0
  54. package/views/dist/controls/alert-dialog/alert-dialog.js +67 -0
  55. package/views/dist/controls/alert-dialog/confirm.d.ts +13 -0
  56. package/views/dist/controls/alert-dialog/confirm.js +11 -0
  57. package/views/dist/controls/alert-dialog/looks.d.ts +4 -0
  58. package/views/dist/controls/alert-dialog/looks.js +17 -0
  59. package/views/dist/controls/alert-dialog/tokens.d.ts +119 -0
  60. package/views/dist/controls/alert-dialog/tokens.js +32 -0
  61. package/views/dist/controls/alert-dialog.css +95 -0
  62. package/views/dist/controls/alert.css +51 -0
  63. package/views/dist/controls/bulk-bar/bulk-bar-of.d.ts +66 -0
  64. package/views/dist/controls/bulk-bar/bulk-bar-of.js +22 -0
  65. package/views/dist/controls/bulk-bar/bulk-bar.d.ts +40 -0
  66. package/views/dist/controls/bulk-bar/bulk-bar.js +278 -0
  67. package/views/dist/controls/bulk-bar/looks.d.ts +10 -0
  68. package/views/dist/controls/bulk-bar/looks.js +14 -0
  69. package/views/dist/controls/bulk-bar/map-selection-bar.d.ts +19 -0
  70. package/views/dist/controls/bulk-bar/map-selection-bar.js +57 -0
  71. package/views/dist/controls/bulk-bar/tokens.d.ts +136 -0
  72. package/views/dist/controls/bulk-bar/tokens.js +36 -0
  73. package/views/dist/controls/bulk-bar/words.d.ts +50 -0
  74. package/views/dist/controls/bulk-bar/words.js +19 -0
  75. package/views/dist/controls/bulk-bar.css +96 -0
  76. package/views/dist/controls/button/button.js +3 -1
  77. package/views/dist/controls/button.css +5 -4
  78. package/views/dist/controls/checkbox/checkbox.js +3 -1
  79. package/views/dist/controls/checkbox.css +1 -1
  80. package/views/dist/controls/choice/tokens.d.ts +79 -0
  81. package/views/dist/controls/choice/tokens.js +22 -0
  82. package/views/dist/controls/choice.css +31 -0
  83. package/views/dist/controls/collapsible/collapsible.d.ts +39 -0
  84. package/views/dist/controls/collapsible/collapsible.js +18 -0
  85. package/views/dist/controls/collapsible/looks.d.ts +4 -0
  86. package/views/dist/controls/collapsible/looks.js +5 -0
  87. package/views/dist/controls/collapsible/map-collapse.d.ts +2 -0
  88. package/views/dist/controls/collapsible/map-collapse.js +6 -0
  89. package/views/dist/controls/collapsible/tokens.d.ts +68 -0
  90. package/views/dist/controls/collapsible/tokens.js +19 -0
  91. package/views/dist/controls/collapsible.css +83 -0
  92. package/views/dist/controls/compound-editor/looks.js +1 -1
  93. package/views/dist/controls/compound-editor/place-parts.js +5 -1
  94. package/views/dist/controls/controls.d.ts +19 -0
  95. package/views/dist/controls/controls.js +17 -0
  96. package/views/dist/controls/customize/customize.d.ts +125 -0
  97. package/views/dist/controls/customize/customize.js +243 -0
  98. package/views/dist/controls/customize/glide.d.ts +10 -0
  99. package/views/dist/controls/customize/glide.js +55 -0
  100. package/views/dist/controls/customize/looks.d.ts +13 -0
  101. package/views/dist/controls/customize/looks.js +11 -0
  102. package/views/dist/controls/customize/map-customize-body.d.ts +18 -0
  103. package/views/dist/controls/customize/map-customize-body.js +160 -0
  104. package/views/dist/controls/customize/rules.d.ts +23 -0
  105. package/views/dist/controls/customize/rules.js +19 -0
  106. package/views/dist/controls/customize/tokens.d.ts +40 -0
  107. package/views/dist/controls/customize/tokens.js +12 -0
  108. package/views/dist/controls/customize/words.d.ts +58 -0
  109. package/views/dist/controls/customize/words.js +37 -0
  110. package/views/dist/controls/customize.css +54 -0
  111. package/views/dist/controls/date-editor/date-editor.d.ts +2 -1
  112. package/views/dist/controls/date-editor/looks.js +1 -1
  113. package/views/dist/controls/date-editor/map-calendar.js +3 -1
  114. package/views/dist/controls/filter-editor/block.d.ts +31 -0
  115. package/views/dist/controls/filter-editor/block.js +27 -0
  116. package/views/dist/controls/filter-editor/filter-editor.d.ts +58 -0
  117. package/views/dist/controls/filter-editor/filter-editor.js +250 -0
  118. package/views/dist/controls/filter-editor/how.d.ts +23 -0
  119. package/views/dist/controls/filter-editor/how.js +14 -0
  120. package/views/dist/controls/filter-editor/map-filter-body.d.ts +33 -0
  121. package/views/dist/controls/filter-editor/map-filter-body.js +190 -0
  122. package/views/dist/controls/filter-editor/map-rules.d.ts +101 -0
  123. package/views/dist/controls/filter-editor/map-rules.js +304 -0
  124. package/views/dist/controls/filter-editor/parts.d.ts +46 -0
  125. package/views/dist/controls/filter-editor/parts.js +75 -0
  126. package/views/dist/controls/filter-editor/rules.d.ts +142 -0
  127. package/views/dist/controls/filter-editor/rules.js +201 -0
  128. package/views/dist/controls/filter-editor/tokens.d.ts +83 -0
  129. package/views/dist/controls/filter-editor/tokens.js +23 -0
  130. package/views/dist/controls/filter-editor/words.d.ts +74 -0
  131. package/views/dist/controls/filter-editor/words.js +46 -0
  132. package/views/dist/controls/filter-editor.css +142 -0
  133. package/views/dist/controls/group-editor/group-editor.d.ts +56 -0
  134. package/views/dist/controls/group-editor/group-editor.js +126 -0
  135. package/views/dist/controls/group-editor/map-group-body.d.ts +19 -0
  136. package/views/dist/controls/group-editor/map-group-body.js +106 -0
  137. package/views/dist/controls/group-editor/rules.d.ts +48 -0
  138. package/views/dist/controls/group-editor/rules.js +41 -0
  139. package/views/dist/controls/group-editor/tokens.d.ts +15 -0
  140. package/views/dist/controls/group-editor/tokens.js +6 -0
  141. package/views/dist/controls/group-editor/words.d.ts +39 -0
  142. package/views/dist/controls/group-editor/words.js +21 -0
  143. package/views/dist/controls/group-editor.css +20 -0
  144. package/views/dist/controls/index.d.ts +45 -3
  145. package/views/dist/controls/index.js +44 -3
  146. package/views/dist/controls/inline-input/looks.js +1 -1
  147. package/views/dist/controls/input/input.js +10 -4
  148. package/views/dist/controls/internal/editor-parts.d.ts +8 -1
  149. package/views/dist/controls/internal/editor-parts.js +5 -0
  150. package/views/dist/controls/internal/phone.d.ts +5 -4
  151. package/views/dist/controls/internal/phone.js +7 -7
  152. package/views/dist/controls/internal/scroll.js +5 -1
  153. package/views/dist/controls/internal/step-return.d.ts +9 -0
  154. package/views/dist/controls/internal/step-return.js +27 -0
  155. package/views/dist/controls/internal/typed-run.d.ts +2 -0
  156. package/views/dist/controls/internal/typed-run.js +5 -0
  157. package/views/dist/controls/links-editor/links-editor.d.ts +5 -3
  158. package/views/dist/controls/links-editor/links-editor.js +38 -17
  159. package/views/dist/controls/links-editor/map-links-body.js +4 -1
  160. package/views/dist/controls/links-editor.css +1 -1
  161. package/views/dist/controls/menu/map-menu.js +2 -2
  162. package/views/dist/controls/menu-list/menu-list.d.ts +17 -2
  163. package/views/dist/controls/menu-list/menu-list.js +25 -16
  164. package/views/dist/controls/modal/looks.d.ts +4 -0
  165. package/views/dist/controls/modal/looks.js +25 -0
  166. package/views/dist/controls/modal/modal.d.ts +69 -0
  167. package/views/dist/controls/modal/modal.js +62 -0
  168. package/views/dist/controls/modal/tokens.d.ts +192 -0
  169. package/views/dist/controls/modal/tokens.js +50 -0
  170. package/views/dist/controls/modal.css +130 -0
  171. package/views/dist/controls/notice/notice.d.ts +49 -0
  172. package/views/dist/controls/notice/notice.js +35 -0
  173. package/views/dist/controls/notice/tokens.d.ts +99 -0
  174. package/views/dist/controls/notice/tokens.js +27 -0
  175. package/views/dist/controls/notice.css +100 -0
  176. package/views/dist/controls/number-editor/looks.js +1 -1
  177. package/views/dist/controls/number-editor/number-editor.js +1 -1
  178. package/views/dist/controls/option/option.js +3 -1
  179. package/views/dist/controls/option.css +1 -1
  180. package/views/dist/controls/pane/looks.d.ts +4 -0
  181. package/views/dist/controls/pane/looks.js +11 -0
  182. package/views/dist/controls/pane/pane.d.ts +67 -0
  183. package/views/dist/controls/pane/pane.js +99 -0
  184. package/views/dist/controls/pane/state.d.ts +14 -0
  185. package/views/dist/controls/pane/state.js +7 -0
  186. package/views/dist/controls/pane/tokens.d.ts +79 -0
  187. package/views/dist/controls/pane/tokens.js +22 -0
  188. package/views/dist/controls/pane.css +104 -0
  189. package/views/dist/controls/picker/looks.js +1 -1
  190. package/views/dist/controls/picker/map-picker.d.ts +6 -2
  191. package/views/dist/controls/picker/map-picker.js +4 -2
  192. package/views/dist/controls/picker/picker.d.ts +7 -0
  193. package/views/dist/controls/picker/picker.js +57 -8
  194. package/views/dist/controls/picker/rows.d.ts +4 -2
  195. package/views/dist/controls/picker/rows.js +4 -3
  196. package/views/dist/controls/popover/map-popover.d.ts +1 -1
  197. package/views/dist/controls/popover/map-popover.js +2 -2
  198. package/views/dist/controls/popover/popover.js +2 -1
  199. package/views/dist/controls/popover.css +3 -0
  200. package/views/dist/controls/ports-host/map-ports-host.d.ts +7 -0
  201. package/views/dist/controls/ports-host/map-ports-host.js +43 -0
  202. package/views/dist/controls/press/tokens.d.ts +8 -0
  203. package/views/dist/controls/press/tokens.js +4 -0
  204. package/views/dist/controls/press.css +44 -0
  205. package/views/dist/controls/quick-filters/looks.d.ts +11 -0
  206. package/views/dist/controls/quick-filters/looks.js +9 -0
  207. package/views/dist/controls/quick-filters/map-quick-filters-body.d.ts +31 -0
  208. package/views/dist/controls/quick-filters/map-quick-filters-body.js +56 -0
  209. package/views/dist/controls/quick-filters/quick-filters.d.ts +37 -0
  210. package/views/dist/controls/quick-filters/quick-filters.js +89 -0
  211. package/views/dist/controls/quick-filters/reminder.d.ts +18 -0
  212. package/views/dist/controls/quick-filters/reminder.js +41 -0
  213. package/views/dist/controls/quick-filters/rules.d.ts +89 -0
  214. package/views/dist/controls/quick-filters/rules.js +52 -0
  215. package/views/dist/controls/quick-filters/tokens.d.ts +112 -0
  216. package/views/dist/controls/quick-filters/tokens.js +30 -0
  217. package/views/dist/controls/quick-filters/words.d.ts +25 -0
  218. package/views/dist/controls/quick-filters/words.js +13 -0
  219. package/views/dist/controls/quick-filters.css +118 -0
  220. package/views/dist/controls/sheet/bottom-sheet.d.ts +9 -4
  221. package/views/dist/controls/sheet/bottom-sheet.js +4 -4
  222. package/views/dist/controls/sheet/map-sheet.d.ts +4 -1
  223. package/views/dist/controls/sheet/map-sheet.js +19 -6
  224. package/views/dist/controls/sheet/sheet-parts.d.ts +10 -0
  225. package/views/dist/controls/sheet/sheet-parts.js +2 -0
  226. package/views/dist/controls/sort-editor/map-sort-body.d.ts +9 -0
  227. package/views/dist/controls/sort-editor/map-sort-body.js +81 -0
  228. package/views/dist/controls/sort-editor/rules.d.ts +48 -0
  229. package/views/dist/controls/sort-editor/rules.js +24 -0
  230. package/views/dist/controls/sort-editor/sort-editor.d.ts +58 -0
  231. package/views/dist/controls/sort-editor/sort-editor.js +180 -0
  232. package/views/dist/controls/sort-editor/tokens.d.ts +79 -0
  233. package/views/dist/controls/sort-editor/tokens.js +22 -0
  234. package/views/dist/controls/sort-editor/words.d.ts +48 -0
  235. package/views/dist/controls/sort-editor/words.js +25 -0
  236. package/views/dist/controls/sort-editor.css +96 -0
  237. package/views/dist/controls/switch-row/switch-row.d.ts +15 -0
  238. package/views/dist/controls/switch-row/switch-row.js +9 -0
  239. package/views/dist/controls/switch-row/tokens.d.ts +51 -0
  240. package/views/dist/controls/switch-row/tokens.js +15 -0
  241. package/views/dist/controls/switch-row.css +39 -0
  242. package/views/dist/controls/switch.css +1 -1
  243. package/views/dist/controls/tag/tag.js +3 -1
  244. package/views/dist/controls/tag-field/tag-field.d.ts +20 -0
  245. package/views/dist/controls/tag-field/tag-field.js +19 -0
  246. package/views/dist/controls/tag-field/tokens.d.ts +7 -0
  247. package/views/dist/controls/tag-field/tokens.js +4 -0
  248. package/views/dist/controls/tag-field.css +13 -0
  249. package/views/dist/controls/text-editor/looks.js +1 -1
  250. package/views/dist/controls/text-editor/text-editor.js +1 -5
  251. package/views/dist/controls/toast/toast.d.ts +79 -0
  252. package/views/dist/controls/toast/toast.js +101 -0
  253. package/views/dist/controls/toast/tokens.d.ts +100 -0
  254. package/views/dist/controls/toast/tokens.js +27 -0
  255. package/views/dist/controls/toast.css +93 -0
  256. package/views/dist/controls/tokens.js +38 -0
  257. package/views/dist/controls/toolbar/keys.d.ts +3 -0
  258. package/views/dist/controls/toolbar/keys.js +11 -0
  259. package/views/dist/controls/toolbar/looks.d.ts +10 -0
  260. package/views/dist/controls/toolbar/looks.js +40 -0
  261. package/views/dist/controls/toolbar/tokens.d.ts +28 -0
  262. package/views/dist/controls/toolbar/tokens.js +9 -0
  263. package/views/dist/controls/toolbar/toolbar.d.ts +111 -0
  264. package/views/dist/controls/toolbar/toolbar.js +370 -0
  265. package/views/dist/controls/toolbar/words.d.ts +28 -0
  266. package/views/dist/controls/toolbar/words.js +17 -0
  267. package/views/dist/controls/toolbar-button/looks.d.ts +4 -0
  268. package/views/dist/controls/toolbar-button/looks.js +21 -0
  269. package/views/dist/controls/toolbar-button/tokens.d.ts +103 -0
  270. package/views/dist/controls/toolbar-button/tokens.js +28 -0
  271. package/views/dist/controls/toolbar-button/toolbar-button.d.ts +66 -0
  272. package/views/dist/controls/toolbar-button/toolbar-button.js +51 -0
  273. package/views/dist/controls/toolbar-button.css +75 -0
  274. package/views/dist/controls/toolbar.css +65 -0
  275. package/views/dist/controls/tooltip/map-tooltip.d.ts +1 -1
  276. package/views/dist/controls/tooltip/map-tooltip.js +2 -2
  277. package/views/dist/controls/tooltip/tooltip.d.ts +3 -1
  278. package/views/dist/controls/tooltip/tooltip.js +2 -2
  279. package/views/dist/controls/values-editor/looks.js +1 -1
  280. package/views/dist/controls/values-editor/values-editor.js +7 -1
  281. package/views/dist/controls/views-list/map-views-list-body.d.ts +4 -1
  282. package/views/dist/controls/views-list/map-views-list-body.js +128 -4
  283. package/views/dist/controls/views-list/rules.d.ts +26 -0
  284. package/views/dist/controls/views-list/rules.js +63 -0
  285. package/views/dist/controls/views-list/view-menu.d.ts +84 -0
  286. package/views/dist/controls/views-list/view-menu.js +201 -0
  287. package/views/dist/controls/views-list/views-list.d.ts +8 -1
  288. package/views/dist/controls/views-list/views-list.js +18 -3
  289. package/views/dist/controls/views-list/words.d.ts +54 -0
  290. package/views/dist/controls/views-list/words.js +10 -1
  291. package/views/dist/controls/views-list.css +5 -1
  292. package/views/dist/display/date.js +5 -5
  293. package/views/dist/display/format.d.ts +6 -0
  294. package/views/dist/display/format.js +13 -2
  295. package/views/dist/display/index.d.ts +1 -1
  296. package/views/dist/display/index.js +1 -1
  297. package/views/dist/display/options.d.ts +3 -1
  298. package/views/dist/display/range.d.ts +2 -1
  299. package/views/dist/display/range.js +4 -1
  300. package/views/dist/display/use-display-options.d.ts +3 -0
  301. package/views/dist/display/use-display-options.js +10 -2
  302. package/views/dist/display/viewer.d.ts +1 -1
  303. package/views/dist/display/viewer.js +1 -1
  304. package/views/dist/editors/DateEditor.js +11 -9
  305. package/views/dist/editors/relation-panel.js +7 -1
  306. package/views/dist/editors/relation-picker.d.ts +2 -1
  307. package/views/dist/editors/relation-picker.js +4 -3
  308. package/views/dist/editors/relation-source.d.ts +4 -1
  309. package/views/dist/editors/relation-source.js +5 -2
  310. package/views/dist/field-row/editors/RowNumberEditor.js +2 -2
  311. package/views/dist/fields/number-edit.d.ts +6 -0
  312. package/views/dist/fields/number-edit.js +8 -1
  313. package/views/dist/grid/chrome/GridCellEditors.js +2 -2
  314. package/views/dist/grid/chrome/GridColumnDateSection.d.ts +4 -3
  315. package/views/dist/grid/chrome/GridColumnDateSection.js +4 -4
  316. package/views/dist/grid/chrome/GridColumnDurationSection.js +2 -2
  317. package/views/dist/grid/chrome/GridColumnMenu.js +6 -4
  318. package/views/dist/grid/chrome/GridFooter.js +2 -2
  319. package/views/dist/grid/chrome/GridHeader.js +2 -1
  320. package/views/dist/grid/chrome/GridNumberEditor.js +2 -2
  321. package/views/dist/grid/chrome/GridRowCells.js +2 -1
  322. package/views/dist/grid/chrome/GridTextEditor.js +2 -2
  323. package/views/dist/grid/chrome/grid-column-menu-items.js +4 -2
  324. package/views/dist/grid/chrome/grid-editor-layer.d.ts +5 -1
  325. package/views/dist/grid/chrome/grid-editor-layer.js +1 -0
  326. package/views/dist/grid/chrome/grid-fitted-box.d.ts +7 -1
  327. package/views/dist/grid/chrome/grid-fitted-box.js +4 -4
  328. package/views/dist/grid/chrome/useGridBandFigures.js +2 -2
  329. package/views/dist/grid/chrome/useGridFittedWidths.d.ts +3 -0
  330. package/views/dist/grid/chrome/useGridFittedWidths.js +9 -3
  331. package/views/dist/grid/chrome/useGridKeyboard.d.ts +4 -1
  332. package/views/dist/grid/chrome/useGridKeyboard.js +5 -2
  333. package/views/dist/grid/chrome/useGridTableInteractionModel.js +2 -1
  334. package/views/dist/grid/core/clipboard-model.js +9 -4
  335. package/views/dist/grid/core/commit-model.d.ts +7 -0
  336. package/views/dist/grid/core/commit-model.js +5 -1
  337. package/views/dist/grid/core/editing-controller.js +10 -2
  338. package/views/dist/grid/core/editing-model.js +3 -7
  339. package/views/dist/grid/core/undo-owner.d.ts +6 -0
  340. package/views/dist/grid/core/undo-owner.js +13 -0
  341. package/views/dist/grid/core/useGridEditing.d.ts +2 -0
  342. package/views/dist/grid/core/useGridEditing.js +4 -0
  343. package/views/dist/grid/grid.css +240 -0
  344. package/views/dist/grid/looks.d.ts +5 -1
  345. package/views/dist/grid/looks.js +20 -12
  346. package/views/dist/grid-tokens.d.ts +109 -0
  347. package/views/dist/grid-tokens.js +29 -0
  348. package/views/dist/looks/index.d.ts +10 -0
  349. package/views/dist/looks/index.js +10 -0
  350. package/views/dist/looks/pieces.js +20 -0
  351. package/views/dist/model/column-capabilities.d.ts +2 -0
  352. package/views/dist/model/column-filters.d.ts +2 -1
  353. package/views/dist/model/column-from.js +2 -2
  354. package/views/dist/model/relation-filters.d.ts +2 -0
  355. package/views/dist/panels/index.d.ts +2 -2
  356. package/views/dist/panels/index.js +2 -2
  357. package/views/dist/panels/labels.d.ts +4 -0
  358. package/views/dist/panels/labels.js +8 -0
  359. package/views/dist/panels/model.d.ts +14 -1
  360. package/views/dist/panels/quick/model.d.ts +4 -0
  361. package/views/dist/panels/react/customize-body.d.ts +12 -5
  362. package/views/dist/panels/react/customize-body.js +41 -13
  363. package/views/dist/panels/react/customize.d.ts +8 -1
  364. package/views/dist/panels/react/customize.js +11 -6
  365. package/views/dist/panels/react/filter/FilterEditor.js +6 -6
  366. package/views/dist/panels/react/filter/FilterFieldList.js +10 -2
  367. package/views/dist/panels/react/filter/PhoneFilterEditor.d.ts +8 -2
  368. package/views/dist/panels/react/filter/PhoneFilterEditor.js +12 -9
  369. package/views/dist/panels/react/filter/filter-body.d.ts +8 -5
  370. package/views/dist/panels/react/filter/filter-body.js +21 -7
  371. package/views/dist/panels/react/filter/filter-part-body.d.ts +4 -1
  372. package/views/dist/panels/react/filter/filter-part-body.js +3 -1
  373. package/views/dist/panels/react/panel-sheet.d.ts +5 -1
  374. package/views/dist/panels/react/panel-sheet.js +6 -2
  375. package/views/dist/panels/react/panel-step.d.ts +15 -0
  376. package/views/dist/panels/react/panel-step.js +27 -0
  377. package/views/dist/panels/react/quick/QuickFiltersPanel.js +1 -0
  378. package/views/dist/panels/react/sort/SortEditor.d.ts +4 -0
  379. package/views/dist/panels/react/sort/SortEditor.js +5 -2
  380. package/views/dist/panels/react/toolbar/ReadyToolbar.d.ts +18 -0
  381. package/views/dist/panels/react/toolbar/ReadyToolbar.js +93 -4
  382. package/views/dist/panels/react/toolbar/Toolbar.js +1 -1
  383. package/views/dist/panels/react/toolbar/ToolbarAsideFilter.js +2 -2
  384. package/views/dist/panels/react/toolbar/ToolbarBarFilter.js +15 -5
  385. package/views/dist/panels/react/toolbar/ToolbarFilterAdd.d.ts +16 -0
  386. package/views/dist/panels/react/toolbar/ToolbarFilterAdd.js +50 -0
  387. package/views/dist/panels/react/toolbar/ToolbarFilterSheet.js +3 -1
  388. package/views/dist/panels/react/toolbar/ToolbarFilters.d.ts +4 -1
  389. package/views/dist/panels/react/toolbar/ToolbarFilters.js +38 -23
  390. package/views/dist/panels/react/toolbar/ToolbarOptions.d.ts +12 -4
  391. package/views/dist/panels/react/toolbar/ToolbarOptions.js +6 -2
  392. package/views/dist/panels/react/toolbar/ToolbarQuickFilters.d.ts +4 -1
  393. package/views/dist/panels/react/toolbar/ToolbarQuickFilters.js +2 -2
  394. package/views/dist/panels/react/toolbar/ToolbarSortPill.d.ts +5 -0
  395. package/views/dist/panels/react/toolbar/ToolbarSortPill.js +15 -6
  396. package/views/dist/panels/react/toolbar/panel-part.d.ts +5 -1
  397. package/views/dist/panels/react/toolbar/panel-part.js +2 -2
  398. package/views/dist/panels/react/toolbar/use-filter-add.d.ts +16 -0
  399. package/views/dist/panels/react/toolbar/use-filter-add.js +32 -0
  400. package/views/dist/panels/react/view-footer.d.ts +1 -1
  401. package/views/dist/panels/react/views-row/ViewPicker.js +25 -4
  402. package/views/dist/panels/react.d.ts +1 -0
  403. package/views/dist/panels/react.js +1 -0
  404. package/views/dist/panels/settings/filter-groups.d.ts +3 -0
  405. package/views/dist/panels/settings/filter-groups.js +72 -7
  406. package/views/dist/panels/settings/filters.d.ts +5 -0
  407. package/views/dist/panels/settings/filters.js +12 -6
  408. package/views/dist/panels/settings/group-buckets.js +1 -0
  409. package/views/dist/panels/views-row/model.d.ts +10 -1
  410. package/views/dist/provider/ViewsProvider.d.ts +7 -1
  411. package/views/dist/provider/ViewsProvider.js +50 -6
  412. package/views/dist/provider/components.d.ts +178 -11
  413. package/views/dist/provider/context.d.ts +6 -0
  414. package/views/dist/provider/moment.d.ts +6 -0
  415. package/views/dist/provider/moment.js +10 -0
  416. package/views/dist/provider/ports.d.ts +18 -6
  417. package/views/dist/provider/ports.js +2 -1
  418. package/views/dist/react.d.ts +2 -2
  419. package/views/dist/react.js +1 -1
  420. package/views/dist/selection/SelectionBar.d.ts +2 -16
  421. package/views/dist/selection/SelectionBar.js +4 -1
  422. package/views/dist/selection/bar-props.d.ts +26 -0
  423. package/views/dist/selection/bar-props.js +1 -0
  424. package/views/dist/selection/index.d.ts +1 -1
  425. package/views/dist/selection/verbs.d.ts +32 -5
  426. package/views/dist/styles.css +1499 -73
  427. package/views/dist/styles.unlayered.css +1497 -70
  428. package/views/docs/contract.md +56 -23
  429. package/views/docs/controls/alert-dialog.md +37 -0
  430. package/views/docs/controls/alert.md +30 -0
  431. package/views/docs/controls/bulk-bar.md +41 -0
  432. package/views/docs/controls/choice.md +25 -0
  433. package/views/docs/controls/collapsible.md +22 -0
  434. package/views/docs/controls/customize.md +17 -0
  435. package/views/docs/controls/filter-editor.md +28 -0
  436. package/views/docs/controls/group-editor.md +11 -0
  437. package/views/docs/controls/modal.md +55 -0
  438. package/views/docs/controls/notice.md +32 -0
  439. package/views/docs/controls/pane.md +25 -0
  440. package/views/docs/controls/popover.md +2 -0
  441. package/views/docs/controls/press.md +9 -0
  442. package/views/docs/controls/quick-filters.md +35 -0
  443. package/views/docs/controls/radio.md +1 -1
  444. package/views/docs/controls/sort-editor.md +27 -0
  445. package/views/docs/controls/switch-row.md +18 -0
  446. package/views/docs/controls/tag-field.md +7 -0
  447. package/views/docs/controls/toast.md +32 -0
  448. package/views/docs/controls/toolbar-button.md +31 -0
  449. package/views/docs/controls/toolbar.md +14 -0
  450. package/views/docs/guides/atoms.md +2 -2
  451. package/views/docs/guides/cells.md +3 -3
  452. package/views/docs/guides/display.md +3 -3
  453. package/views/docs/guides/looks.md +8 -2
  454. package/views/docs/guides/ports.md +6 -6
  455. package/views/docs/guides/selection.md +5 -1
  456. package/views/docs/guides/the-grid.md +2 -2
  457. package/views/docs/guides/the-provider.md +21 -2
  458. package/views/docs/install.md +4 -1
  459. package/views/docs/reference/cells.md +3 -3
  460. package/views/docs/reference/controls.md +403 -16
  461. package/views/docs/reference/display.md +3 -2
  462. package/views/docs/reference/editors-relation.md +1 -1
  463. package/views/docs/reference/looks.md +35 -11
  464. package/views/docs/reference/panels-react.md +11 -10
  465. package/views/docs/reference/panels.md +9 -7
  466. package/views/docs/reference/react.md +20 -13
  467. package/views/docs/reference/selection.md +4 -2
  468. package/views/docs/reference/views.md +8 -6
  469. package/views/skills/views/SKILL.md +2 -2
@@ -0,0 +1,96 @@
1
+ /* The bulk bar (the Outright kit's, KIT-680; ViewKit's since VK-725, as BulkBar): what picked rows bring, Attio's, as the toolbar's
2
+ map (step 5) and canvas (rounds 8 and 15) draw it. Every value it draws with is a name ViewKit's controls read
3
+ (docs/controls/bulk-bar.md). It draws its surface, its place, its count, the room its Toast rises in, and its measuring row; what
4
+ it holds draws itself (the Toolbar, the Button). Every value a token:
5
+
6
+ .o-bulk-bar the surface, placed in the list that holds it (its nearest placed box), at its bottom centre
7
+ data-form computer · tray · pill the computer's bar, the phone's tray, or the phone's pill (Tweaks' Form)
8
+ data-shown while rows are picked; without it, it has left (display none, after its going)
9
+ .o-bulk-bar-count the computer's count: the number, Selected and ×, its edge dashed (one button, which clears)
10
+ .o-bulk-bar-number the number on the brand (the bar's own until the kit has a count badge, KIT-143); on the pill, in it
11
+ .o-bulk-bar-words the pill's count: "3 selected"
12
+ .o-bulk-bar-toasts the room its Toast rises in, just above it, as round 15 draws it over the tray
13
+ .o-bulk-bar-measure every verb out of sight, measured for what fits (bulk-bar.tsx)
14
+ --bulk-bar-bottom how far above the list's foot it stands; --bulk-bar-height, how tall it is: set once for each form, on
15
+ the bar, the room its Toast rises in and what holds the bar (its parent), which read them both
16
+ --bulk-bar-room the room it takes at its holder's foot, handed to the holder while it is shown (none when it isn't): how
17
+ far above the foot it stands, its height and a step; a list in the holder that scrolls takes it at its
18
+ foot, so its last row scrolls clear above the bar (KIT-771) */
19
+ @layer components {
20
+
21
+ /* Where it stands and how tall it is, for each form: read by the bar, by the room its Toast rises in, and by what holds the bar. */
22
+ :is(.o-bulk-bar, .o-bulk-bar-toasts), :has(> .o-bulk-bar) { --bulk-bar-bottom: calc(var(--vk-spacing) * 4); --bulk-bar-height: calc(var(--vk-spacing) * 11 + var(--vk-border-width) * 2); }
23
+ :is(.o-bulk-bar, .o-bulk-bar-toasts)[data-form="tray"], :has(> .o-bulk-bar[data-form="tray"]) {
24
+ --bulk-bar-bottom: max(var(--safe-area-bottom, env(safe-area-inset-bottom, 0px)), calc(var(--vk-spacing) * 4));
25
+ --bulk-bar-height: calc(var(--vk-spacing) * 15 + var(--vk-border-width) * 2);
26
+ }
27
+ :is(.o-bulk-bar, .o-bulk-bar-toasts)[data-form="pill"], :has(> .o-bulk-bar[data-form="pill"]) {
28
+ --bulk-bar-bottom: max(var(--safe-area-bottom, env(safe-area-inset-bottom, 0px)), calc(var(--vk-spacing) * 4));
29
+ --bulk-bar-height: calc(var(--vk-spacing) * 13);
30
+ }
31
+ /* The room it takes, handed to what holds it while it is shown, and gone with it: a list that scrolls in the holder pads its foot by
32
+ it, so its last row scrolls whole above the bar, a step clear of it (KIT-771). */
33
+ :has(> .o-bulk-bar) { --bulk-bar-room: 0; }
34
+ :has(> .o-bulk-bar[data-shown]) { --bulk-bar-room: calc(var(--bulk-bar-bottom) + var(--bulk-bar-height) + var(--vk-spacing) * 2); }
35
+
36
+ .o-bulk-bar {
37
+ position: absolute; z-index: var(--vk-layer-sticky); left: 50%; bottom: var(--bulk-bar-bottom); translate: -50% 0;
38
+ display: flex; box-sizing: border-box; width: max-content; max-width: calc(100% - var(--vk-spacing) * 8);
39
+ padding: calc(var(--vk-spacing) * 1.5);
40
+ border: var(--vk-border-width) solid var(--vk-border); border-radius: var(--vk-radius-xl);
41
+ background-color: var(--vk-overlay); box-shadow: var(--vk-shadow-lg); color: var(--vk-fg); white-space: nowrap;
42
+ opacity: 1;
43
+ }
44
+ .o-bulk-bar:not([data-shown]) { display: none; opacity: 0; translate: -50% calc(var(--vk-spacing) * 2); }
45
+
46
+ /* It comes up from just under its place and goes back down, as a popup comes. Still where a person asks for less motion. */
47
+ @media (prefers-reduced-motion: no-preference) {
48
+ .o-bulk-bar {
49
+ transition: opacity var(--vk-duration-base) var(--vk-ease-out), translate var(--vk-duration-base) var(--vk-ease-out), display var(--vk-duration-base) allow-discrete;
50
+ @starting-style { opacity: 0; translate: -50% calc(var(--vk-spacing) * 2); }
51
+ }
52
+ }
53
+
54
+ /* The count: the number on the brand, Selected, ×; its edge dashed, as Attio's. One button: a press clears the selection. */
55
+ .o-bulk-bar-count {
56
+ display: inline-flex; flex: none; align-items: center; gap: calc(var(--vk-spacing) * 2); box-sizing: border-box;
57
+ height: calc(var(--vk-spacing) * 8); margin: 0; padding-inline: calc(var(--vk-spacing) * 1.5) calc(var(--vk-spacing) * 2);
58
+ border: var(--vk-border-width) dashed var(--vk-border-input); border-radius: var(--vk-radius-lg); background-color: transparent;
59
+ color: var(--vk-fg-subtle); font: inherit; font-size: var(--vk-font-size-sm); line-height: var(--vk-line-height-sm); font-weight: var(--vk-font-weight-medium);
60
+ white-space: nowrap; cursor: pointer;
61
+ }
62
+ .o-bulk-bar-count > svg { flex: none; color: var(--vk-fg-subtlest); }
63
+ @media (hover: hover) { .o-bulk-bar-count:hover:not(:disabled) { background-color: var(--vk-neutral-hovered); } }
64
+ .o-bulk-bar-count:focus-visible { outline: var(--vk-focus-width) solid var(--vk-border-brand); outline-offset: var(--vk-focus-offset); }
65
+ .o-bulk-bar-count:disabled { color: var(--vk-fg-disabled); cursor: not-allowed; }
66
+
67
+ .o-bulk-bar-number {
68
+ display: inline-grid; place-items: center; box-sizing: border-box; min-width: calc(var(--vk-spacing) * 5); height: calc(var(--vk-spacing) * 5);
69
+ padding-inline: calc(var(--vk-spacing) * 1.25); border-radius: var(--vk-radius-sm);
70
+ background-color: var(--vk-brand); color: var(--vk-fg-on-brand);
71
+ font-size: var(--vk-font-size-xs); line-height: 1; font-weight: var(--vk-font-weight-semibold); font-variant-numeric: tabular-nums;
72
+ }
73
+
74
+ /* Every verb, out of sight and out of reach, measured as drawn, in a box of no size, so it never widens what holds the bar. */
75
+ .o-bulk-bar-measure { position: absolute; left: 0; top: 0; width: 0; height: 0; overflow: hidden; visibility: hidden; pointer-events: none; }
76
+ .o-bulk-bar-measure > div { display: flex; width: max-content; gap: calc(var(--vk-spacing) * 1.5); white-space: nowrap; }
77
+ .o-bulk-bar-measure [data-m="sep"] { display: inline-flex; }
78
+ .o-bulk-bar[data-form="tray"] .o-bulk-bar-measure > div { gap: calc(var(--vk-spacing) * 2); }
79
+
80
+ /* On a phone, the tray: the verbs at 44 on the overlay, standing just above the phone's foot. */
81
+ .o-bulk-bar[data-form="tray"] { padding: calc(var(--vk-spacing) * 2); border-radius: var(--vk-radius-2xl); box-shadow: var(--vk-shadow-menu); }
82
+
83
+ /* The pill, the other way: the count in the brand, ✕, a hairline, Actions; round. */
84
+ .o-bulk-bar[data-form="pill"] {
85
+ align-items: center; box-sizing: border-box; height: calc(var(--vk-spacing) * 13);
86
+ padding: 0 calc(var(--vk-spacing) * 1.5) 0 calc(var(--vk-spacing) * 4.5); border-radius: var(--vk-radius-full); box-shadow: var(--vk-shadow-menu);
87
+ }
88
+ .o-bulk-bar-words { flex: none; color: var(--vk-fg-subtle); font-size: var(--vk-font-size-base); line-height: var(--vk-line-height-base); }
89
+ .o-bulk-bar-words > .o-bulk-bar-number { display: inline; min-width: 0; height: auto; padding: 0; border-radius: 0; background-color: transparent; color: var(--vk-fg-accent); font-size: inherit; line-height: inherit; }
90
+
91
+ /* Its Toast rises just above it: the Toast's own room (inside), whose foot stands a step above the bar's top. */
92
+ .o-bulk-bar-toasts {
93
+ position: absolute; z-index: var(--vk-layer-sticky); inset-inline: 0; height: 0; pointer-events: none;
94
+ bottom: calc(var(--bulk-bar-bottom) + var(--bulk-bar-height) - var(--vk-spacing) * 2);
95
+ }
96
+ }
@@ -2,6 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import * as React from "react";
3
3
  import { Button as BaseButton } from "@base-ui/react/button";
4
4
  import { cx } from "../../internal/cx.js";
5
+ import { phoneMark, usePhoneForm } from "../internal/phone.js";
5
6
  import { Spinner } from "../spinner/spinner.js";
6
7
  import { buttonOwnAttrs } from "./own-look.js";
7
8
  const KIND = {
@@ -20,6 +21,7 @@ export const Button = React.forwardRef(function Button({ kind, size, shape, load
20
21
  if (process.env.NODE_ENV !== "production" && (shape === "icon" || shape === "round") && !props["aria-label"] && !props["aria-labelledby"])
21
22
  console.warn("ViewKit Button: an icon-only button needs an aria-label, the name its tooltip shows too.");
22
23
  const link = React.isValidElement(props.render) && props.render.props.href != null;
24
+ const phone = usePhoneForm();
23
25
  const linkKeys = link ? {
24
26
  role: props.role,
25
27
  onKeyDown: (e) => { if (e.key === " ")
@@ -27,7 +29,7 @@ export const Button = React.forwardRef(function Button({ kind, size, shape, load
27
29
  onKeyUp: (e) => { if (e.key === " ")
28
30
  e.preventBaseUIHandler?.(); props.onKeyUp?.(e); },
29
31
  } : {};
30
- return (_jsxs(BaseButton, { ref: ref, className: cx(buttonClass(kind, size, shape), className), "aria-busy": loading || undefined, onClick: loading ? (e) => e.preventDefault() : onClick, "data-kit": "button", ...(look ? buttonOwnAttrs(look) : {}), ...props, ...linkKeys, children: [icon != null && _jsx("span", { "data-slot": "vk-button-icon", children: icon }), children != null && _jsx("span", { "data-slot": "vk-button-label", children: children }), iconEnd != null && _jsx("span", { "data-slot": "vk-button-icon", children: iconEnd }), loading && _jsx("span", { "data-slot": "vk-button-spinner", children: _jsx(Spinner, { size: size === "sm" ? 14 : size == null || size === "md" || size === "lg" || size === "44" || size === "32x44" || size === "40x44" ? 16 : 12, label: "" }) }), _jsx("span", { className: "o-button-cut", "aria-hidden": "true", children: _jsx("span", { className: "o-smooth o-smooth-ease" }) })] }));
32
+ return (_jsxs(BaseButton, { ref: ref, className: cx(buttonClass(kind, size, shape), className), "aria-busy": loading || undefined, onClick: loading ? (e) => e.preventDefault() : onClick, "data-kit": "button", ...phoneMark(phone), ...(look ? buttonOwnAttrs(look) : {}), ...props, ...linkKeys, children: [icon != null && _jsx("span", { "data-slot": "vk-button-icon", children: icon }), children != null && _jsx("span", { "data-slot": "vk-button-label", children: children }), iconEnd != null && _jsx("span", { "data-slot": "vk-button-icon", children: iconEnd }), loading && _jsx("span", { "data-slot": "vk-button-spinner", children: _jsx(Spinner, { size: size === "sm" ? 14 : size == null || size === "md" || size === "lg" || size === "44" || size === "32x44" || size === "40x44" ? 16 : 12, label: "" }) }), _jsx("span", { className: "o-button-cut", "aria-hidden": "true", children: _jsx("span", { className: "o-smooth o-smooth-ease" }) })] }));
31
33
  });
32
34
  export function ButtonGroup({ orientation = "horizontal", className, children, ...props }) {
33
35
  return _jsx("div", { role: "group", "data-orientation": orientation, className: cx("o-button-group", className), ...props, children: children });
@@ -401,9 +401,10 @@
401
401
  .o-button[data-button-own]:is([data-button-turn="quarter"], [data-button-turn="back"]) > [data-slot="vk-button-icon"]:not(:has(~ [data-slot="vk-button-icon"])) > svg { transition: rotate var(--vk-duration-fast) var(--vk-ease-out); }
402
402
  .o-button[data-button-own][data-button-turn="quarter"][aria-expanded="true"] > [data-slot="vk-button-icon"]:not(:has(~ [data-slot="vk-button-icon"])) > svg { rotate: 90deg; }
403
403
  .o-button[data-button-own][data-button-turn="back"][aria-expanded="false"] > [data-slot="vk-button-icon"]:not(:has(~ [data-slot="vk-button-icon"])) > svg { rotate: -90deg; }
404
- /* A dot at its top end corner, saying something is on. */
405
- .o-button[data-button-own][data-button-dot="brand"]::after {
406
- content: ""; position: absolute; top: var(--vk-spacing); right: var(--vk-spacing); width: var(--vk-dot-size); height: var(--vk-dot-size);
404
+ /* A dot at its top end corner, saying something is on. Drawn with ::before, over its cut, since the pressing area takes ::after on
405
+ a phone (press.css), as the toolbar button's dot is. */
406
+ .o-button[data-button-own][data-button-dot="brand"]::before {
407
+ content: ""; position: absolute; z-index: 1; top: var(--vk-spacing); right: var(--vk-spacing); width: var(--vk-dot-size); height: var(--vk-dot-size);
407
408
  border-radius: 50%; background-color: var(--vk-brand); pointer-events: none;
408
409
  }
409
410
  /* Its words cut with … where its place is narrower than they are. Its line is as tall as its words (line-height 1), and their
@@ -452,7 +453,7 @@
452
453
  Button joined in a group or a Toolbar button joined to its neighbours (data-joined) (the outline has no corners apart left
453
454
  and right: in Chromium its squircle, as before), which paint
454
455
  themselves from their variables as before. The Button itself is never clipped: its depth, its press, its focus ring and a phone's
455
- pressing area (an app's own, its ::after) stand outside it, whole. Its ground and edge are handed to its cut (.o-button-cut, its
456
+ pressing area (press.css, its ::after) stand outside it, whole. Its ground and edge are handed to its cut (.o-button-cut, its
456
457
  last child, over its border box): the ground (::before) clipped by the outline, with the depth's inset light again inside it,
457
458
  the edge (::after) a ring along it, its foot from a corner's height up. The cut is a size container, so its layers read the
458
459
  Button's own side (100cqmin) whatever height a place gives it: the corner its radius fitted to that side as a control's is,
@@ -3,9 +3,11 @@ import * as React from "react";
3
3
  import { Checkbox as BaseCheckbox } from "@base-ui/react/checkbox";
4
4
  import { CheckboxGroup as BaseCheckboxGroup } from "@base-ui/react/checkbox-group";
5
5
  import { cx } from "../../internal/cx.js";
6
+ import { phoneMark, usePhoneForm } from "../internal/phone.js";
6
7
  const Cut = () => _jsx("span", { className: "o-check-cut o-smooth o-smooth-ease", "aria-hidden": "true" });
7
8
  export const Checkbox = React.forwardRef(function Checkbox({ label, note, row = false, card = false, className, ...props }, ref) {
8
- return (_jsxs("label", { className: cx("o-check", row && "o-check-row", card && "o-choice-card", className), "data-kit": "checkbox", children: [_jsxs(BaseCheckbox.Root, { ref: ref, className: "o-check-box", ...props, children: [_jsx(Cut, {}), _jsx(BaseCheckbox.Indicator, { keepMounted: true, className: "o-check-mark", children: _jsxs("svg", { viewBox: "0 0 24 24", strokeWidth: 2.75, "aria-hidden": "true", children: [_jsx("path", { className: "o-check-tick", d: "M5 12l5 5l10 -10", pathLength: 1 }), _jsx("path", { className: "o-check-dash", d: "M6 12h12" })] }) })] }), (label != null || note != null) && (_jsxs("span", { className: "o-choice-text", children: [label != null && _jsx("span", { className: "o-choice-label", children: label }), note != null && _jsx("span", { className: "o-choice-note", children: note })] }))] }));
9
+ const phone = usePhoneForm();
10
+ return (_jsxs("label", { className: cx("o-check", row && "o-check-row", card && "o-choice-card", className), "data-kit": "checkbox", ...phoneMark(phone), children: [_jsxs(BaseCheckbox.Root, { ref: ref, className: "o-check-box", ...props, children: [_jsx(Cut, {}), _jsx(BaseCheckbox.Indicator, { keepMounted: true, className: "o-check-mark", children: _jsxs("svg", { viewBox: "0 0 24 24", strokeWidth: 2.75, "aria-hidden": "true", children: [_jsx("path", { className: "o-check-tick", d: "M5 12l5 5l10 -10", pathLength: 1 }), _jsx("path", { className: "o-check-dash", d: "M6 12h12" })] }) })] }), (label != null || note != null) && (_jsxs("span", { className: "o-choice-text", children: [label != null && _jsx("span", { className: "o-choice-label", children: label }), note != null && _jsx("span", { className: "o-choice-note", children: note })] }))] }));
9
11
  });
10
12
  export function CheckboxMark({ className }) {
11
13
  return (_jsxs("span", { className: cx("o-check-box o-check-in-row", className), "aria-hidden": "true", children: [_jsx(Cut, {}), _jsx("span", { className: "o-check-mark", children: _jsx("svg", { viewBox: "0 0 24 24", strokeWidth: 2.75, children: _jsx("path", { className: "o-check-tick", d: "M5 12l5 5l10 -10", pathLength: 1 }) }) })] }));
@@ -71,7 +71,7 @@
71
71
  token at 0), Smooth and Round set the box apart (data-checkbox-smoothing, looks.ts). Under Smooth or The app's the box is drawn
72
72
  with the smooth outline (smooth.css), eased on its 16px side, in every browser that knows shape(); one that doesn't
73
73
  keeps the corners above, and so does Round, which paints the box as before. The box is never clipped: its focus ring and its
74
- pressing area (::after, the app's press styles) stand outside it. Its ground and edge are handed to its cut (.o-check-cut, its first
74
+ pressing area (::after, press.css) stand outside it. Its ground and edge are handed to its cut (.o-check-cut, its first
75
75
  child), over its border box: the ground (::before) clipped by the outline, the edge (::after) a ring along it, each moving as the
76
76
  box's colours do. The list's and the card's corners are the grouped choices' own. ──────────────────────────────── */
77
77
  .o-check-cut { display: none; --smooth-amount: var(--vk-corner-smoothing); }
@@ -0,0 +1,79 @@
1
+ export declare const CHOICE_TOKENS: readonly [{
2
+ readonly name: "--vk-border";
3
+ readonly kind: "colour";
4
+ readonly outright: "--border";
5
+ }, {
6
+ readonly name: "--vk-border-danger";
7
+ readonly kind: "colour";
8
+ readonly outright: "--border-danger";
9
+ }, {
10
+ readonly name: "--vk-border-selected";
11
+ readonly kind: "colour";
12
+ readonly outright: "--border-selected";
13
+ }, {
14
+ readonly name: "--vk-border-subtle";
15
+ readonly kind: "colour";
16
+ readonly outright: "--border-subtle";
17
+ }, {
18
+ readonly name: "--vk-fg";
19
+ readonly kind: "colour";
20
+ readonly outright: "--text";
21
+ }, {
22
+ readonly name: "--vk-fg-subtle";
23
+ readonly kind: "colour";
24
+ readonly outright: "--text-subtle";
25
+ }, {
26
+ readonly name: "--vk-ground";
27
+ readonly kind: "colour";
28
+ readonly outright: "--surface";
29
+ }, {
30
+ readonly name: "--vk-hovered";
31
+ readonly kind: "colour";
32
+ readonly outright: "--surface-hovered";
33
+ }, {
34
+ readonly name: "--vk-selected";
35
+ readonly kind: "colour";
36
+ readonly outright: "--surface-selected";
37
+ }, {
38
+ readonly name: "--vk-border-width";
39
+ readonly kind: "size";
40
+ readonly outright: "--border-width";
41
+ }, {
42
+ readonly name: "--vk-font-size-sm";
43
+ readonly kind: "size";
44
+ readonly outright: "--text-sm";
45
+ }, {
46
+ readonly name: "--vk-font-size-xs";
47
+ readonly kind: "size";
48
+ readonly outright: "--text-xs";
49
+ }, {
50
+ readonly name: "--vk-font-weight-medium";
51
+ readonly kind: "size";
52
+ readonly outright: "--font-weight-medium";
53
+ }, {
54
+ readonly name: "--vk-line-height-sm";
55
+ readonly kind: "size";
56
+ readonly outright: "--text-sm--line-height";
57
+ }, {
58
+ readonly name: "--vk-line-height-xs";
59
+ readonly kind: "size";
60
+ readonly outright: "--text-xs--line-height";
61
+ }, {
62
+ readonly name: "--vk-radius-lg";
63
+ readonly kind: "size";
64
+ readonly outright: "--radius-lg";
65
+ }, {
66
+ readonly name: "--vk-spacing";
67
+ readonly kind: "size";
68
+ readonly outright: "--spacing";
69
+ }, {
70
+ readonly name: "--vk-duration-fast";
71
+ readonly kind: "motion";
72
+ readonly outright: "--duration-fast";
73
+ }, {
74
+ readonly name: "--vk-ease-out";
75
+ readonly kind: "motion";
76
+ readonly outright: "--ease-out";
77
+ }];
78
+ /** The choice's words have no machinery of their own. */
79
+ export declare const CHOICE_PRIVATE: readonly [];
@@ -0,0 +1,22 @@
1
+ export const CHOICE_TOKENS = [
2
+ { name: "--vk-border", kind: "colour", outright: "--border" },
3
+ { name: "--vk-border-danger", kind: "colour", outright: "--border-danger" },
4
+ { name: "--vk-border-selected", kind: "colour", outright: "--border-selected" },
5
+ { name: "--vk-border-subtle", kind: "colour", outright: "--border-subtle" },
6
+ { name: "--vk-fg", kind: "colour", outright: "--text" },
7
+ { name: "--vk-fg-subtle", kind: "colour", outright: "--text-subtle" },
8
+ { name: "--vk-ground", kind: "colour", outright: "--surface" },
9
+ { name: "--vk-hovered", kind: "colour", outright: "--surface-hovered" },
10
+ { name: "--vk-selected", kind: "colour", outright: "--surface-selected" },
11
+ { name: "--vk-border-width", kind: "size", outright: "--border-width" },
12
+ { name: "--vk-font-size-sm", kind: "size", outright: "--text-sm" },
13
+ { name: "--vk-font-size-xs", kind: "size", outright: "--text-xs" },
14
+ { name: "--vk-font-weight-medium", kind: "size", outright: "--font-weight-medium" },
15
+ { name: "--vk-line-height-sm", kind: "size", outright: "--text-sm--line-height" },
16
+ { name: "--vk-line-height-xs", kind: "size", outright: "--text-xs--line-height" },
17
+ { name: "--vk-radius-lg", kind: "size", outright: "--radius-lg" },
18
+ { name: "--vk-spacing", kind: "size", outright: "--spacing" },
19
+ { name: "--vk-duration-fast", kind: "motion", outright: "--duration-fast" },
20
+ { name: "--vk-ease-out", kind: "motion", outright: "--ease-out" },
21
+ ];
22
+ export const CHOICE_PRIVATE = [];
@@ -0,0 +1,31 @@
1
+ /* The words beside a choice, as the Outright kit draws them (the Checkbox, the Radio, the Switch in a settings row): its label,
2
+ and an optional line under it that explains it or says why it is locked. A disabled choice greys its label (each control's
3
+ own stylesheet). A choice drawn as a card has an edge round it; the chosen one takes the selected colours.
4
+
5
+ The rules sit in the components layer, so a utility class still wins. */
6
+ @layer components {
7
+
8
+ .o-choice-text { display: grid; gap: calc(var(--vk-spacing) * 0.5); min-width: 0; }
9
+ .o-choice-label { font-size: var(--vk-font-size-sm); line-height: calc(var(--vk-font-size-sm) * var(--vk-line-height-sm)); color: var(--vk-fg); }
10
+ .o-choice-note { font-size: var(--vk-font-size-xs); line-height: calc(var(--vk-font-size-xs) * var(--vk-line-height-xs)); color: var(--vk-fg-subtle); }
11
+
12
+ /* ── A choice as a card: an edge round it, the whole card pressing it; under the pointer the hovered
13
+ ground; chosen, the selected edge and ground; off, the softer edge and no hover ─────────────────── */
14
+ .o-choice-card {
15
+ box-sizing: border-box; display: flex; width: 100%; padding: calc(var(--vk-spacing) * 3) calc(var(--vk-spacing) * 3.5);
16
+ border: var(--vk-border-width) solid var(--vk-border); border-radius: var(--vk-radius-lg); corner-shape: squircle;
17
+ background-color: var(--vk-ground); transition: background-color var(--vk-duration-fast) var(--vk-ease-out), border-color var(--vk-duration-fast) var(--vk-ease-out);
18
+ }
19
+ /* 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. */
20
+ @media (hover: hover) { .o-choice-card:hover { background-color: var(--vk-hovered); } }
21
+ .o-choice-card:has(> [data-checked]) { border-color: var(--vk-border-selected); background-color: var(--vk-selected); }
22
+ .o-choice-card:has(> [data-disabled]) { border-color: var(--vk-border-subtle); background-color: transparent; }
23
+ .o-choice-card .o-choice-label { font-weight: var(--vk-font-weight-medium); }
24
+ /* In error, the card's edge is red too. */
25
+ .o-choice-card:is(:has(> :is([aria-invalid="true"], [data-invalid])), .o-fieldset[data-invalid] *):not(:has(> [data-disabled])) { border-color: var(--vk-border-danger); }
26
+ /* Cards stand 8px apart, one under another or side by side. */
27
+ .o-radio-group:has(> .o-choice-card) { gap: calc(var(--vk-spacing) * 2); }
28
+ .o-radio-group.o-radio-row:has(> .o-choice-card) { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, calc(var(--vk-spacing) * 50)), 1fr)); }
29
+
30
+ @media (prefers-reduced-motion: reduce) { .o-choice-card { transition: none; } }
31
+ }
@@ -0,0 +1,39 @@
1
+ import * as React from "react";
2
+ export interface CollapsibleProps {
3
+ /** Open, when it is set from outside (a grid's group, a filter's details); with onOpenChange. */
4
+ open?: boolean;
5
+ /** Open at first, when it keeps its own state. */
6
+ defaultOpen?: boolean;
7
+ /** Its trigger was pressed: whether it opens or closes. */
8
+ onOpenChange?: (open: boolean) => void;
9
+ /** It can't be opened or closed: its trigger is off, and the part stays as it is. */
10
+ disabled?: boolean;
11
+ className?: string;
12
+ /** Its trigger and its part (CollapsibleTrigger, CollapsiblePanel), or the part alone when it is set open from outside. */
13
+ children: React.ReactNode;
14
+ }
15
+ /** One part that opens and closes in place, under its trigger or set open from outside. */
16
+ export declare function Collapsible({ open, defaultOpen, onOpenChange, disabled, className, children }: CollapsibleProps): import("react/jsx-runtime").JSX.Element;
17
+ export interface CollapsibleTriggerProps {
18
+ /** What opens: its name, and what it holds when that helps ("Closed deals", "12"). */
19
+ children: React.ReactNode;
20
+ /** Your own element in place of the plain row (a Button, a heading's button): it keeps its look and gains the behaviour. */
21
+ render?: React.ReactElement;
22
+ className?: string;
23
+ }
24
+ /** What opens and closes it, plain: its name after a chevron, which turns down when the part is open; 32 high, 44 on a phone. A place
25
+ * that draws its own (a heading, a Button, a row) hands it as `render`. */
26
+ export declare function CollapsibleTrigger({ children, render, className }: CollapsibleTriggerProps): import("react/jsx-runtime").JSX.Element;
27
+ export interface CollapsiblePanelProps {
28
+ children: React.ReactNode;
29
+ /** A class on what it holds, inside the box that crops. */
30
+ className?: string;
31
+ /** A class on the box that crops while it moves, so a bleed or a padding there isn't shaved (a row's outline). */
32
+ clipClassName?: string;
33
+ /** Its time in ms, opening and closing alike, where the motion names' isn't right (a grid's own). Reduced motion still wins. */
34
+ durationMs?: number;
35
+ /** It stays on the page while closed, hidden until the browser's find reaches it, which opens it. */
36
+ hiddenUntilFound?: boolean;
37
+ }
38
+ /** The part that opens and closes: the box that crops it while its height moves, and what it holds inside. */
39
+ export declare function CollapsiblePanel({ children, className, clipClassName, durationMs, hiddenUntilFound }: CollapsiblePanelProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,18 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Collapsible as BaseCollapsible } from "@base-ui/react/collapsible";
3
+ import { cx } from "../../internal/cx.js";
4
+ import { phoneMark, usePhoneForm } from "../internal/phone.js";
5
+ export function Collapsible({ open, defaultOpen, onOpenChange, disabled, className, children }) {
6
+ const phone = usePhoneForm();
7
+ return (_jsx(BaseCollapsible.Root, { open: open, defaultOpen: defaultOpen, onOpenChange: onOpenChange ? (next) => onOpenChange(next) : undefined, disabled: disabled, className: cx("o-collapsible", className), "data-kit": "collapsible", ...phoneMark(phone), children: children }));
8
+ }
9
+ const CHEVRON = "M9 6l6 6l-6 6";
10
+ export function CollapsibleTrigger({ children, render, className }) {
11
+ if (render)
12
+ return _jsx(BaseCollapsible.Trigger, { render: render, className: className, children: children });
13
+ return (_jsxs(BaseCollapsible.Trigger, { className: cx("o-collapsible-trigger", className), children: [_jsx("svg", { className: "o-collapsible-chevron", viewBox: "0 0 24 24", "aria-hidden": "true", children: _jsx("path", { d: CHEVRON }) }), children] }));
14
+ }
15
+ export function CollapsiblePanel({ children, className, clipClassName, durationMs, hiddenUntilFound }) {
16
+ const style = durationMs === undefined ? undefined : { "--o-collapsible-time": `${durationMs}ms` };
17
+ return (_jsx(BaseCollapsible.Panel, { className: cx("o-collapsible-panel", clipClassName), style: style, hiddenUntilFound: hiddenUntilFound, children: _jsx("div", { className: cx("o-collapsible-body", className), children: children }) }));
18
+ }
@@ -0,0 +1,4 @@
1
+ import type { PieceLooks } from "../../looks/looks.js";
2
+ export type CollapsibleOptionId = "content" | "curve";
3
+ /** The Collapsible's options. */
4
+ export declare const COLLAPSIBLE_LOOKS: PieceLooks<CollapsibleOptionId>;
@@ -0,0 +1,5 @@
1
+ const options = [
2
+ { id: "content", name: "Content", def: "fade", values: [{ id: "still", name: "Stands still" }, { id: "fade", name: "Fades" }, { id: "slide", name: "Slides out" }] },
3
+ { id: "curve", name: "Curve", def: "soft", values: [{ id: "soft", name: "Soft" }, { id: "sharp", name: "Sharp" }] },
4
+ ];
5
+ export const COLLAPSIBLE_LOOKS = { id: "collapsible", name: "Collapsible", options, looks: [] };
@@ -0,0 +1,2 @@
1
+ import type { ViewsCollapseProps } from "../../provider/components.js";
2
+ export declare function MapCollapse({ open, children, className, clipClassName, durationMs }: ViewsCollapseProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { Collapsible, CollapsiblePanel } from "./collapsible.js";
4
+ export function MapCollapse({ open, children, className, clipClassName, durationMs }) {
5
+ return (_jsx(Collapsible, { open: open, className: className, children: _jsx(CollapsiblePanel, { clipClassName: clipClassName, durationMs: durationMs, children: children }) }));
6
+ }
@@ -0,0 +1,68 @@
1
+ export declare const COLLAPSIBLE_TOKENS: readonly [{
2
+ readonly name: "--vk-ease-out-sharp";
3
+ readonly kind: "motion";
4
+ readonly outright: "--ease-out-sharp";
5
+ }, {
6
+ readonly name: "--vk-spacing";
7
+ readonly kind: "size";
8
+ readonly outright: "--spacing";
9
+ }, {
10
+ readonly name: "--vk-radius-sm";
11
+ readonly kind: "size";
12
+ readonly outright: "--radius-sm";
13
+ }, {
14
+ readonly name: "--vk-fg";
15
+ readonly kind: "colour";
16
+ readonly outright: "--text";
17
+ }, {
18
+ readonly name: "--vk-font-size-sm";
19
+ readonly kind: "size";
20
+ readonly outright: "--text-sm";
21
+ }, {
22
+ readonly name: "--vk-line-height-sm";
23
+ readonly kind: "size";
24
+ readonly outright: "--text-sm--line-height";
25
+ }, {
26
+ readonly name: "--vk-font-weight-medium";
27
+ readonly kind: "size";
28
+ readonly outright: "--font-weight-medium";
29
+ }, {
30
+ readonly name: "--vk-focus-width";
31
+ readonly kind: "size";
32
+ readonly outright: "--focus-width";
33
+ }, {
34
+ readonly name: "--vk-border-brand";
35
+ readonly kind: "colour";
36
+ readonly outright: "--border-focused";
37
+ }, {
38
+ readonly name: "--vk-focus-offset";
39
+ readonly kind: "size";
40
+ readonly outright: "--focus-offset";
41
+ }, {
42
+ readonly name: "--vk-fg-disabled";
43
+ readonly kind: "colour";
44
+ readonly outright: "--text-disabled";
45
+ }, {
46
+ readonly name: "--vk-fg-subtle";
47
+ readonly kind: "colour";
48
+ readonly outright: "--text-subtle";
49
+ }, {
50
+ readonly name: "--vk-duration-fast";
51
+ readonly kind: "motion";
52
+ readonly outright: "--duration-fast";
53
+ }, {
54
+ readonly name: "--vk-ease-out";
55
+ readonly kind: "motion";
56
+ readonly outright: "--ease-out";
57
+ }, {
58
+ readonly name: "--vk-duration-base";
59
+ readonly kind: "motion";
60
+ readonly outright: "--duration-base";
61
+ }, {
62
+ readonly name: "--vk-duration-slow";
63
+ readonly kind: "motion";
64
+ readonly outright: "--duration-slow";
65
+ }];
66
+ /** The Collapsible's own machinery: its times and curve, its part's height (Base UI's `--collapsible-panel-height`), the
67
+ * time an app hands (`--o-collapsible-time`) and its trigger's height. */
68
+ export declare const COLLAPSIBLE_PRIVATE: readonly ["--o-collapsible-", "--collapsible-"];
@@ -0,0 +1,19 @@
1
+ export const COLLAPSIBLE_TOKENS = [
2
+ { name: "--vk-ease-out-sharp", kind: "motion", outright: "--ease-out-sharp" },
3
+ { name: "--vk-spacing", kind: "size", outright: "--spacing" },
4
+ { name: "--vk-radius-sm", kind: "size", outright: "--radius-sm" },
5
+ { name: "--vk-fg", kind: "colour", outright: "--text" },
6
+ { name: "--vk-font-size-sm", kind: "size", outright: "--text-sm" },
7
+ { name: "--vk-line-height-sm", kind: "size", outright: "--text-sm--line-height" },
8
+ { name: "--vk-font-weight-medium", kind: "size", outright: "--font-weight-medium" },
9
+ { name: "--vk-focus-width", kind: "size", outright: "--focus-width" },
10
+ { name: "--vk-border-brand", kind: "colour", outright: "--border-focused" },
11
+ { name: "--vk-focus-offset", kind: "size", outright: "--focus-offset" },
12
+ { name: "--vk-fg-disabled", kind: "colour", outright: "--text-disabled" },
13
+ { name: "--vk-fg-subtle", kind: "colour", outright: "--text-subtle" },
14
+ { name: "--vk-duration-fast", kind: "motion", outright: "--duration-fast" },
15
+ { name: "--vk-ease-out", kind: "motion", outright: "--ease-out" },
16
+ { name: "--vk-duration-base", kind: "motion", outright: "--duration-base" },
17
+ { name: "--vk-duration-slow", kind: "motion", outright: "--duration-slow" },
18
+ ];
19
+ export const COLLAPSIBLE_PRIVATE = ["--o-collapsible-", "--collapsible-"];
@@ -0,0 +1,83 @@
1
+ /* The Collapsible. Every value it draws with is a public name (controls/collapsible/tokens.ts); this file only says which
2
+ name each part takes. Base UI marks the trigger data-panel-open while its part is open, and data-disabled; the part data-open or
3
+ data-closed, and data-starting-style and data-ending-style as it comes and goes, and gives it its height to move
4
+ to as --collapsible-panel-height. Its options (looks.ts) are data attributes on the frame or the app around
5
+ it: data-collapsible-content and data-collapsible-curve.
6
+
7
+ The rules sit in the components layer, so a utility class on it still wins. */
8
+ @layer components {
9
+
10
+ /* ── The curve everything of it moves on: ease-out, or under Curve › Sharp ease-out-sharp ──────────── */
11
+ [data-collapsible-curve="sharp"] :is(.o-collapsible-trigger, .o-collapsible-panel) { --o-collapsible-ease: var(--vk-ease-out-sharp); }
12
+
13
+ /* ── The trigger, plain (its look belongs to the place it stands in, and none wears a ground under the pointer): a chevron
14
+ before its name, text-sm at medium weight, 32 high, 44 on a phone, where a row you press is a 44px target. Under the pointer its chevron takes the text's colour; its focus
15
+ ringed. The chevron turns down while the part is open, on the part's curve and in a short part's own times:
16
+ duration-base opening, duration-fast closing ────────────────────────────────────────────────────────────────── */
17
+ .o-collapsible-trigger {
18
+ --collapsible-trigger-h: calc(var(--vk-spacing) * 8);
19
+ display: inline-flex; align-items: center; gap: calc(var(--vk-spacing) * 1.5); box-sizing: border-box;
20
+ min-height: var(--collapsible-trigger-h); margin: 0; padding: 0;
21
+ border: 0; border-radius: var(--vk-radius-sm); background-color: transparent;
22
+ color: var(--vk-fg); font: inherit; font-size: var(--vk-font-size-sm); line-height: calc(var(--vk-font-size-sm) * var(--vk-line-height-sm));
23
+ font-weight: var(--vk-font-weight-medium); text-align: left; cursor: pointer; outline: none; user-select: none;
24
+ -webkit-tap-highlight-color: transparent;
25
+ }
26
+ .o-collapsible-trigger:where([data-vk-phone], [data-vk-phone] *) { --collapsible-trigger-h: calc(var(--vk-spacing) * 11); }
27
+ .o-collapsible-trigger:focus-visible { outline: var(--vk-focus-width) solid var(--vk-border-brand); outline-offset: var(--vk-focus-offset); }
28
+ .o-collapsible-trigger[data-disabled] { color: var(--vk-fg-disabled); cursor: not-allowed; }
29
+ .o-collapsible-chevron {
30
+ flex: none; width: calc(var(--vk-spacing) * 4); height: calc(var(--vk-spacing) * 4);
31
+ fill: none; stroke: var(--vk-fg-subtle); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
32
+ transition: rotate var(--vk-duration-fast) var(--o-collapsible-ease, var(--vk-ease-out)), stroke var(--vk-duration-fast) var(--vk-ease-out);
33
+ }
34
+ .o-collapsible-trigger[data-panel-open] .o-collapsible-chevron { rotate: 90deg; transition-duration: var(--vk-duration-base), var(--vk-duration-fast); }
35
+ /* A hover only on a screen with a pointer. */
36
+ @media (hover: hover) { .o-collapsible-trigger:not([data-disabled]):hover .o-collapsible-chevron { stroke: var(--vk-fg); } }
37
+ .o-collapsible-trigger[data-disabled] .o-collapsible-chevron { stroke: var(--vk-fg-disabled); }
38
+
39
+ /* ── The part: the box that crops it while its height moves, from nothing to what it holds. It crops without
40
+ scrolling (clip, never hidden), so what sticks inside it, a grid's frozen columns, still
41
+ sticks to the scroller beyond it. Both ways it eases out: it answers the press at once and settles, as
42
+ shadcn's and Base UI's own do. Its time follows its height, between the motion names: opening from duration-base
43
+ to duration-slow, closing from duration-fast to duration-base, the longest reached at 600px tall (spacing × 150),
44
+ so a short part moves as it always did and a tall one no longer snaps. The height is Base UI's, read as a length
45
+ (--o-collapsible-h, registered at the file's end: at rest Base UI says auto, which reads as none); how far along
46
+ that 600px it stands is --o-collapsible-part, 0 to 1. A browser that can't divide one length by another keeps the
47
+ two plain times. An app's own time (durationMs) sets --o-collapsible-time for both ──────────────────────────── */
48
+ .o-collapsible-panel {
49
+ --o-collapsible-open: var(--vk-duration-base); --o-collapsible-close: var(--vk-duration-fast);
50
+ box-sizing: border-box; overflow: clip; height: var(--collapsible-panel-height);
51
+ transition: height var(--o-collapsible-time, var(--o-collapsible-open)) var(--o-collapsible-ease, var(--vk-ease-out));
52
+ }
53
+ @supports (width: calc(tan(atan2(1px, 1px)) * 1px)) {
54
+ .o-collapsible-panel {
55
+ --o-collapsible-h: var(--collapsible-panel-height);
56
+ --o-collapsible-part: min(1, tan(atan2(var(--o-collapsible-h), calc(var(--vk-spacing) * 150))));
57
+ --o-collapsible-open: calc(var(--vk-duration-base) + (var(--vk-duration-slow) - var(--vk-duration-base)) * var(--o-collapsible-part));
58
+ --o-collapsible-close: calc(var(--vk-duration-fast) + (var(--vk-duration-base) - var(--vk-duration-fast)) * var(--o-collapsible-part));
59
+ }
60
+ }
61
+ .o-collapsible-panel[data-ending-style] { transition-duration: var(--o-collapsible-time, var(--o-collapsible-close)); }
62
+ .o-collapsible-panel:is([data-starting-style], [data-ending-style]) { height: 0; }
63
+
64
+ /* ── Content: how what it holds comes and goes. Fades, the default (what nothing set draws), unless a frame picks Stands still, which draws nothing here (the box
65
+ crops it as it moves), or Slides out. Fades: it comes in with the height, in the height's own time and on its curve, and goes in
66
+ half the closing time, so the moving edge passes over nothing and never cuts a line of text. Slides out: it is
67
+ anchored to the part's lower edge, so it comes out from under its trigger and goes back under it. The part's
68
+ times reach what it holds as the variables above, which it inherits ─────────────────────────────────────────── */
69
+ .o-collapsible-body:not([data-collapsible-content="still"] *, [data-collapsible-content="slide"] *) { transition: opacity var(--o-collapsible-time, var(--o-collapsible-open)) var(--o-collapsible-ease, var(--vk-ease-out)); }
70
+ .o-collapsible-panel[data-ending-style] > .o-collapsible-body:not([data-collapsible-content="still"] *, [data-collapsible-content="slide"] *) { transition-duration: calc(var(--o-collapsible-time, var(--o-collapsible-close)) * 0.5); }
71
+ .o-collapsible-panel:is([data-starting-style], [data-ending-style]) > .o-collapsible-body:not([data-collapsible-content="still"] *, [data-collapsible-content="slide"] *) { opacity: 0; }
72
+ [data-collapsible-content="slide"] .o-collapsible-panel:not([hidden]) { display: flex; flex-direction: column; justify-content: flex-end; }
73
+ [data-collapsible-content="slide"] .o-collapsible-body { flex: none; }
74
+
75
+ /* Under reduced motion it opens and closes at once, whatever time an app gave it, and what it holds with it, framed or not: the
76
+ fade is the default with no frame, so these match every body, at the fade rules' own weight, later. */
77
+ @media (prefers-reduced-motion: reduce) {
78
+ .o-collapsible-panel, .o-collapsible-panel[data-ending-style], .o-collapsible-chevron, .o-collapsible-trigger[data-panel-open] .o-collapsible-chevron,
79
+ :root .o-collapsible-body, :root .o-collapsible-panel[data-ending-style] > .o-collapsible-body { transition: none; }
80
+ }
81
+ }
82
+ /* The part's height as a length, so a time can be worked out from it: Base UI's auto, at rest, reads as none. */
83
+ @property --o-collapsible-h { syntax: "<length>"; inherits: false; initial-value: 0px; }
@@ -11,7 +11,7 @@ export const COMPOUND_EDITOR_LOOKS = {
11
11
  options,
12
12
  looks: [
13
13
  { id: "attio", name: "Attio", picks: { boxes: "boxes", shown: "hidden", country: "last", arrows: "editing" } },
14
- { id: "mihai", name: "Mihai's", picks: { boxes: "fields", shown: "shown", country: "first", arrows: "none" } },
14
+ { id: "mihai", name: "Outright", picks: { boxes: "fields", shown: "shown", country: "first", arrows: "none" } },
15
15
  ],
16
16
  };
17
17
  export const compoundEditorWornOf = (el) => lookWornOf(COMPOUND_EDITOR_LOOKS, el, ["boxes", "shown", "country", "arrows"]);
@@ -12,6 +12,7 @@ import { countriesOf, PLACE_PARTS, placeOf, regionFor, rowsOf, streetOf, streetP
12
12
  import { QuietField, PartsRow, MIHAI_CARD } from "./row.js";
13
13
  import { blurKeeps, useHeldFocus, useShellHand } from "./keeping.js";
14
14
  import { phoneMark, usePhoneForm } from "../internal/phone.js";
15
+ import { useStepReturn } from "../internal/step-return.js";
15
16
  import { samePlaceEcho } from "./shell.js";
16
17
  import { compoundWords } from "./words.js";
17
18
  const glyph = (paths, className) => (_jsx("svg", { className: className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: paths.map((d) => _jsx("path", { d: d }, d)) }));
@@ -86,8 +87,11 @@ export function usePlaceParts(props, worn, wornAt) {
86
87
  }
87
88
  swapping.current = true;
88
89
  setList(null);
89
- setFocusTo(phone && !first ? null : "first");
90
+ setFocusTo(phone ? null : "first");
91
+ if (phone)
92
+ requestAnimationFrame(() => { swapping.current = false; });
90
93
  };
94
+ useStepReturn(root, phone && list ? [list === "countries" ? '[data-pick="country"]:is(button), [data-pick="country"] button' : '[data-pick="region"]:is(button), [data-pick="region"] button'] : []);
91
95
  const pickCountry = (code) => setDraft((d) => {
92
96
  if ((d.countryCode ?? "") === code)
93
97
  return d;