viewkitjs 0.30.1 → 0.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (298) hide show
  1. package/CHANGELOG.md +143 -0
  2. package/MIGRATION.md +40 -6
  3. package/README.md +1 -1
  4. package/fields/dist/query/index.d.ts +2 -0
  5. package/fields/dist/query/index.js +2 -0
  6. package/fields/dist/query/list-request.d.ts +148 -0
  7. package/fields/dist/query/list-request.js +125 -0
  8. package/fields/dist/query/saved-view.d.ts +15 -0
  9. package/fields/dist/query/saved-view.js +11 -0
  10. package/fields/dist/query/settings.d.ts +9 -0
  11. package/fields/dist/query/settings.js +9 -0
  12. package/fields/docs/reference/query.md +66 -0
  13. package/package.json +8 -2
  14. package/postgres/README.md +1 -0
  15. package/postgres/dist/handler.d.ts +53 -0
  16. package/postgres/dist/handler.js +211 -0
  17. package/postgres/dist/ids.d.ts +1 -1
  18. package/postgres/dist/ids.js +19 -1
  19. package/postgres/dist/index.d.ts +1 -0
  20. package/postgres/dist/index.js +1 -0
  21. package/postgres/dist/limits.d.ts +3 -1
  22. package/postgres/dist/limits.js +1 -1
  23. package/postgres/dist/list-fields.d.ts +10 -0
  24. package/postgres/dist/list-fields.js +36 -0
  25. package/postgres/dist/readable.d.ts +4 -0
  26. package/postgres/dist/readable.js +4 -0
  27. package/postgres/dist/refusals.d.ts +9 -2
  28. package/postgres/dist/refusals.js +6 -0
  29. package/postgres/docs/guides/field-map.md +2 -2
  30. package/postgres/docs/guides/list-handler.md +99 -0
  31. package/postgres/docs/index.md +1 -0
  32. package/postgres/docs/reference/postgres.md +11 -3
  33. package/views/README.md +2 -2
  34. package/views/dist/atoms/RowMenu.d.ts +7 -0
  35. package/views/dist/atoms/RowMenu.js +18 -16
  36. package/views/dist/atoms/carried.d.ts +5 -0
  37. package/views/dist/atoms/carried.js +7 -0
  38. package/views/dist/atoms/types.d.ts +3 -0
  39. package/views/dist/contract.d.ts +26 -6
  40. package/views/dist/contract.js +25 -0
  41. package/views/dist/controls/alert-dialog/alert-dialog.js +2 -1
  42. package/views/dist/controls/atoms.d.ts +2 -0
  43. package/views/dist/controls/atoms.js +2 -0
  44. package/views/dist/controls/avatar/avatar.d.ts +10 -4
  45. package/views/dist/controls/avatar/avatar.js +5 -3
  46. package/views/dist/controls/avatar/tokens.d.ts +104 -0
  47. package/views/dist/controls/avatar/tokens.js +26 -0
  48. package/views/dist/controls/avatar.css +46 -15
  49. package/views/dist/controls/choice/tokens.d.ts +0 -4
  50. package/views/dist/controls/choice/tokens.js +0 -1
  51. package/views/dist/controls/choice.css +3 -3
  52. package/views/dist/controls/controls.d.ts +6 -0
  53. package/views/dist/controls/controls.js +10 -2
  54. package/views/dist/controls/customize/map-customize-body.js +1 -1
  55. package/views/dist/controls/field/field.d.ts +19 -4
  56. package/views/dist/controls/field/field.js +63 -5
  57. package/views/dist/controls/field/tokens.d.ts +4 -0
  58. package/views/dist/controls/field/tokens.js +1 -0
  59. package/views/dist/controls/field.css +41 -16
  60. package/views/dist/controls/glyphs/glyphs.d.ts +10 -0
  61. package/views/dist/controls/glyphs/glyphs.js +173 -0
  62. package/views/dist/controls/index.d.ts +4 -2
  63. package/views/dist/controls/index.js +3 -1
  64. package/views/dist/controls/input/input.d.ts +12 -1
  65. package/views/dist/controls/input/input.js +10 -6
  66. package/views/dist/controls/input/save-mark.d.ts +8 -0
  67. package/views/dist/controls/input/save-mark.js +26 -0
  68. package/views/dist/controls/input/tokens.d.ts +20 -0
  69. package/views/dist/controls/input/tokens.js +5 -0
  70. package/views/dist/controls/input.css +49 -3
  71. package/views/dist/controls/internal/icons.js +10 -0
  72. package/views/dist/controls/internal/keep-focus.d.ts +2 -0
  73. package/views/dist/controls/internal/keep-focus.js +17 -0
  74. package/views/dist/controls/internal/watch-frame.d.ts +2 -0
  75. package/views/dist/controls/internal/watch-frame.js +33 -0
  76. package/views/dist/controls/markdown/map-markdown.d.ts +4 -0
  77. package/views/dist/controls/markdown/map-markdown.js +5 -0
  78. package/views/dist/controls/menu/map-menu.js +2 -2
  79. package/views/dist/controls/menu-list/menu-list.d.ts +3 -0
  80. package/views/dist/controls/menu-list/menu-list.js +5 -4
  81. package/views/dist/controls/modal/modal.js +5 -1
  82. package/views/dist/controls/pane/pane.js +2 -1
  83. package/views/dist/controls/phone-header/header-bar.d.ts +5 -1
  84. package/views/dist/controls/phone-header/header-bar.js +2 -2
  85. package/views/dist/controls/phone-header.css +11 -1
  86. package/views/dist/controls/picker/map-picker.js +3 -0
  87. package/views/dist/controls/picker/picker.d.ts +14 -0
  88. package/views/dist/controls/picker/picker.js +30 -10
  89. package/views/dist/controls/picker.css +2 -0
  90. package/views/dist/controls/popover/popover.js +2 -1
  91. package/views/dist/controls/radio/radio.d.ts +12 -3
  92. package/views/dist/controls/radio/radio.js +25 -5
  93. package/views/dist/controls/radio/tokens.d.ts +84 -0
  94. package/views/dist/controls/radio/tokens.js +21 -0
  95. package/views/dist/controls/radio.css +130 -3
  96. package/views/dist/controls/select/select.d.ts +12 -2
  97. package/views/dist/controls/select/select.js +15 -7
  98. package/views/dist/controls/select/tokens.d.ts +8 -0
  99. package/views/dist/controls/select/tokens.js +2 -0
  100. package/views/dist/controls/select.css +17 -0
  101. package/views/dist/controls/setting-row/looks.d.ts +10 -0
  102. package/views/dist/controls/setting-row/looks.js +22 -0
  103. package/views/dist/controls/setting-row/setting-row.d.ts +100 -0
  104. package/views/dist/controls/setting-row/setting-row.js +133 -0
  105. package/views/dist/controls/setting-row/tokens.d.ts +156 -0
  106. package/views/dist/controls/setting-row/tokens.js +41 -0
  107. package/views/dist/controls/setting-row.css +215 -0
  108. package/views/dist/controls/sheet/bottom-sheet.d.ts +10 -2
  109. package/views/dist/controls/sheet/bottom-sheet.js +6 -3
  110. package/views/dist/controls/sheet.css +4 -1
  111. package/views/dist/controls/sort-editor/sort-editor.js +3 -2
  112. package/views/dist/controls/sort-editor.css +8 -2
  113. package/views/dist/controls/switch-row/switch-row.d.ts +1 -15
  114. package/views/dist/controls/switch-row/switch-row.js +1 -9
  115. package/views/dist/controls/switch-row/tokens.d.ts +0 -12
  116. package/views/dist/controls/switch-row/tokens.js +0 -3
  117. package/views/dist/controls/switch-row.css +3 -7
  118. package/views/dist/controls/switch.css +17 -7
  119. package/views/dist/controls/tag/tag.d.ts +3 -1
  120. package/views/dist/controls/tag/tag.js +2 -2
  121. package/views/dist/controls/tag/tokens.d.ts +4 -0
  122. package/views/dist/controls/tag/tokens.js +1 -0
  123. package/views/dist/controls/tag-field/tag-field.d.ts +5 -1
  124. package/views/dist/controls/tag-field/tag-field.js +11 -5
  125. package/views/dist/controls/tag-field/tokens.d.ts +16 -0
  126. package/views/dist/controls/tag-field/tokens.js +4 -0
  127. package/views/dist/controls/tag-field.css +19 -0
  128. package/views/dist/controls/tag.css +2 -0
  129. package/views/dist/controls/tokens.js +2 -0
  130. package/views/dist/controls/toolbar/toolbar.d.ts +15 -3
  131. package/views/dist/controls/toolbar/toolbar.js +22 -15
  132. package/views/dist/controls/toolbar-button/atom-toolbar-button.d.ts +14 -0
  133. package/views/dist/controls/toolbar-button/atom-toolbar-button.js +51 -0
  134. package/views/dist/controls/toolbar-button/toolbar-button.d.ts +1 -1
  135. package/views/dist/controls/toolbar-button/toolbar-button.js +2 -3
  136. package/views/dist/controls/toolbar-button.css +4 -0
  137. package/views/dist/controls/toolbar.css +5 -0
  138. package/views/dist/controls/views-list/map-view-menu.d.ts +3 -0
  139. package/views/dist/controls/views-list/map-view-menu.js +25 -0
  140. package/views/dist/controls/views-list/map-views-list-body.d.ts +28 -1
  141. package/views/dist/controls/views-list/map-views-list-body.js +39 -21
  142. package/views/dist/controls/views-list/rules.d.ts +2 -0
  143. package/views/dist/controls/views-list/view-menu.d.ts +7 -0
  144. package/views/dist/controls/views-list/view-menu.js +28 -24
  145. package/views/dist/controls/views-list/words.d.ts +2 -0
  146. package/views/dist/controls/views-list/words.js +1 -1
  147. package/views/dist/editors/EditorPanel.js +2 -1
  148. package/views/dist/editors/edit-session.js +2 -5
  149. package/views/dist/field-row/FieldRow.d.ts +4 -2
  150. package/views/dist/field-row/FieldRow.js +67 -20
  151. package/views/dist/field-row/FieldRowLane.d.ts +7 -2
  152. package/views/dist/field-row/FieldRowLane.js +4 -3
  153. package/views/dist/field-row/editors/RowEditor.d.ts +12 -0
  154. package/views/dist/field-row/editors/RowEditor.js +31 -1
  155. package/views/dist/field-row/editors/RowValueListEditor.d.ts +5 -1
  156. package/views/dist/field-row/editors/RowValueListEditor.js +4 -1
  157. package/views/dist/field-row/field-row-button.d.ts +5 -0
  158. package/views/dist/field-row/field-row-button.js +2 -0
  159. package/views/dist/fields/binding.d.ts +3 -2
  160. package/views/dist/fields/binding.js +38 -5
  161. package/views/dist/grid/chrome/GridColumnMenu.d.ts +4 -2
  162. package/views/dist/grid/chrome/GridColumnMenu.js +3 -2
  163. package/views/dist/grid/chrome/GridGroupMenu.d.ts +4 -1
  164. package/views/dist/grid/chrome/GridGroupMenu.js +4 -3
  165. package/views/dist/grid/chrome/GridHeader.d.ts +4 -1
  166. package/views/dist/grid/chrome/GridHeader.js +2 -2
  167. package/views/dist/grid/chrome/GridRow.js +6 -5
  168. package/views/dist/grid/chrome/GridRowCells.js +6 -9
  169. package/views/dist/grid/chrome/GridStructure.d.ts +4 -1
  170. package/views/dist/grid/chrome/GridStructure.js +4 -4
  171. package/views/dist/grid/chrome/GridTable.js +5 -2
  172. package/views/dist/grid/chrome/grid-column-menu-items.js +1 -1
  173. package/views/dist/grid/chrome/grid-row-menu-items.d.ts +27 -3
  174. package/views/dist/grid/chrome/grid-row-menu-items.js +92 -6
  175. package/views/dist/grid/chrome/grid-row-props.d.ts +7 -2
  176. package/views/dist/grid/chrome/grid-rows-menu.js +34 -6
  177. package/views/dist/grid/chrome/grid-table-props.d.ts +38 -7
  178. package/views/dist/grid/chrome/useGridBatchApi.d.ts +3 -1
  179. package/views/dist/grid/chrome/useGridBatchApi.js +4 -2
  180. package/views/dist/grid/chrome/useGridKeyboard.d.ts +4 -2
  181. package/views/dist/grid/chrome/useGridKeyboard.js +15 -9
  182. package/views/dist/grid/chrome/useGridPendingReconciliation.js +1 -2
  183. package/views/dist/grid/chrome/useGridTableInteractionModel.d.ts +1 -1
  184. package/views/dist/grid/chrome/useGridTableInteractionModel.js +11 -5
  185. package/views/dist/grid/core/commit-model.d.ts +20 -2
  186. package/views/dist/grid/core/editing-controller.d.ts +18 -0
  187. package/views/dist/grid/core/editing-controller.js +188 -42
  188. package/views/dist/grid/core/editing-model.d.ts +3 -0
  189. package/views/dist/grid/core/editing-model.js +3 -0
  190. package/views/dist/grid/core/save-path.d.ts +24 -0
  191. package/views/dist/grid/core/save-path.js +122 -0
  192. package/views/dist/grid/core/spreadsheet-operations.d.ts +3 -0
  193. package/views/dist/grid/core/spreadsheet-operations.js +23 -0
  194. package/views/dist/grid/index.d.ts +3 -2
  195. package/views/dist/grid/index.js +1 -0
  196. package/views/dist/internal/field-rows.d.ts +26 -0
  197. package/views/dist/internal/field-rows.js +8 -0
  198. package/views/dist/internal/page-close.d.ts +7 -0
  199. package/views/dist/internal/page-close.js +43 -0
  200. package/views/dist/list/browser-views-store.d.ts +10 -0
  201. package/views/dist/list/browser-views-store.js +182 -0
  202. package/views/dist/list/index.d.ts +23 -0
  203. package/views/dist/list/index.js +8 -0
  204. package/views/dist/list/menu.d.ts +31 -0
  205. package/views/dist/list/menu.js +76 -0
  206. package/views/dist/list/parts.d.ts +6 -0
  207. package/views/dist/list/parts.js +59 -0
  208. package/views/dist/list/registry.d.ts +11 -0
  209. package/views/dist/list/registry.js +31 -0
  210. package/views/dist/list/root.d.ts +40 -0
  211. package/views/dist/list/root.js +128 -0
  212. package/views/dist/list/slot.d.ts +14 -0
  213. package/views/dist/list/slot.js +22 -0
  214. package/views/dist/list/source.d.ts +11 -0
  215. package/views/dist/list/source.js +31 -0
  216. package/views/dist/list/store.d.ts +87 -0
  217. package/views/dist/list/store.js +115 -0
  218. package/views/dist/list/toolbar.d.ts +6 -0
  219. package/views/dist/list/toolbar.js +359 -0
  220. package/views/dist/list/views-axis.d.ts +5 -0
  221. package/views/dist/list/views-axis.js +96 -0
  222. package/views/dist/list/views-store.d.ts +41 -0
  223. package/views/dist/list/views-store.js +1 -0
  224. package/views/dist/list/views.d.ts +67 -0
  225. package/views/dist/list/views.js +400 -0
  226. package/views/dist/looks/index.d.ts +1 -0
  227. package/views/dist/looks/index.js +1 -0
  228. package/views/dist/looks/pieces.js +2 -0
  229. package/views/dist/model/preferences.js +1 -1
  230. package/views/dist/model/prefs-buckets.js +1 -1
  231. package/views/dist/panels/index.d.ts +3 -1
  232. package/views/dist/panels/index.js +1 -0
  233. package/views/dist/panels/react/customize-body.js +1 -0
  234. package/views/dist/panels/react/toolbar/ReadyToolbar.d.ts +41 -4
  235. package/views/dist/panels/react/toolbar/ReadyToolbar.js +6 -326
  236. package/views/dist/panels/react/toolbar/Toolbar.d.ts +9 -1
  237. package/views/dist/panels/react/toolbar/Toolbar.js +34 -23
  238. package/views/dist/panels/react/toolbar/ToolbarButton.js +4 -1
  239. package/views/dist/panels/react/toolbar/ToolbarNew.js +1 -1
  240. package/views/dist/panels/react/toolbar/ToolbarQuickFilters.d.ts +2 -2
  241. package/views/dist/panels/react/toolbar/ToolbarQuickFilters.js +3 -1
  242. package/views/dist/panels/react/toolbar/ToolbarSearch.js +1 -1
  243. package/views/dist/panels/react/toolbar/context.d.ts +10 -2
  244. package/views/dist/panels/react/toolbar/context.js +3 -1
  245. package/views/dist/panels/react/views-row/FoldingViewRow.d.ts +1 -1
  246. package/views/dist/panels/react/views-row/FoldingViewRow.js +15 -4
  247. package/views/dist/panels/react/views-row/PillGroup.d.ts +5 -2
  248. package/views/dist/panels/react/views-row/PillGroup.js +16 -7
  249. package/views/dist/panels/react/views-row/ViewPicker.js +2 -12
  250. package/views/dist/panels/react/views-row/ViewPickerRow.d.ts +4 -2
  251. package/views/dist/panels/react/views-row/ViewPickerRow.js +9 -5
  252. package/views/dist/panels/react.d.ts +2 -2
  253. package/views/dist/panels/toolbar/edit-view.d.ts +7 -1
  254. package/views/dist/panels/toolbar/edit-view.js +14 -0
  255. package/views/dist/panels/toolbar/model.d.ts +5 -0
  256. package/views/dist/panels/toolbar/model.js +7 -3
  257. package/views/dist/panels/view-state.d.ts +5 -3
  258. package/views/dist/panels/views-row/model.d.ts +19 -2
  259. package/views/dist/panels/views-row/model.js +14 -0
  260. package/views/dist/provider/ViewsProvider.d.ts +16 -7
  261. package/views/dist/provider/ViewsProvider.js +23 -5
  262. package/views/dist/provider/components.d.ts +43 -2
  263. package/views/dist/provider/context.d.ts +2 -1
  264. package/views/dist/provider/context.js +1 -1
  265. package/views/dist/provider/ports.d.ts +19 -12
  266. package/views/dist/provider/ports.js +69 -1
  267. package/views/dist/react.d.ts +1 -1
  268. package/views/dist/styles.css +583 -61
  269. package/views/dist/styles.unlayered.css +583 -61
  270. package/views/docs/contract.md +42 -31
  271. package/views/docs/controls/avatar.md +26 -0
  272. package/views/docs/controls/choice.md +0 -1
  273. package/views/docs/controls/field.md +3 -0
  274. package/views/docs/controls/input.md +9 -0
  275. package/views/docs/controls/radio.md +33 -0
  276. package/views/docs/controls/select.md +6 -0
  277. package/views/docs/controls/setting-row.md +44 -0
  278. package/views/docs/controls/switch-row.md +0 -3
  279. package/views/docs/controls/tag-field.md +4 -0
  280. package/views/docs/controls/tag.md +1 -0
  281. package/views/docs/getting-started.md +2 -2
  282. package/views/docs/guides/atoms.md +2 -2
  283. package/views/docs/guides/columns.md +1 -1
  284. package/views/docs/guides/ports.md +1 -1
  285. package/views/docs/guides/the-grid.md +34 -7
  286. package/views/docs/guides/the-provider.md +4 -2
  287. package/views/docs/index.md +1 -0
  288. package/views/docs/reference/controls.md +54 -27
  289. package/views/docs/reference/editors-session.md +1 -1
  290. package/views/docs/reference/field-row.md +9 -1
  291. package/views/docs/reference/grid.md +14 -8
  292. package/views/docs/reference/list.md +227 -0
  293. package/views/docs/reference/looks.md +3 -0
  294. package/views/docs/reference/panels-react.md +17 -12
  295. package/views/docs/reference/panels.md +8 -5
  296. package/views/docs/reference/react.md +11 -9
  297. package/views/docs/reference/views.md +2 -2
  298. package/views/skills/views/SKILL.md +9 -6
@@ -22,6 +22,23 @@
22
22
  .o-select-2xs .o-select-chevron svg:where([data-vk-phone], [data-vk-phone] *) { width: calc(var(--vk-spacing) * 4); height: calc(var(--vk-spacing) * 4); }
23
23
  .o-select-field[data-popup-open] .o-select-chevron:not([data-arrow="right"]) { rotate: 180deg; }
24
24
 
25
+ /* ── Its label inside its box (labelAt="inside"): the box the outline Button's own (button.css draws its ground, edge, depth,
26
+ size and states), as wide as what it holds and never wider than its place; the label in the quieter words at the regular
27
+ weight, then the value in the Button's words, then a 14px chevron in them ─────────────────────────────────────────── */
28
+ .o-select.o-select-inside { width: max-content; max-width: 100%; }
29
+ .o-select-inside .o-select-field { max-width: 100%; justify-content: flex-start; gap: calc(var(--vk-spacing) * 1.5); }
30
+ /* Narrower than its words, the label and the value each end in "…" and the chevron stays inside. */
31
+ .o-select-label-in { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--vk-fg-subtle); font-weight: var(--vk-font-weight-normal); white-space: nowrap; }
32
+ .o-select-inside .o-select-value { flex: 0 1 auto; }
33
+ .o-select-inside .o-select-chevron svg { width: calc(var(--vk-spacing) * 3.5); height: calc(var(--vk-spacing) * 3.5); stroke: currentColor; }
34
+ /* On a phone (VK-968): the box the Glass button's worded pill at sm (glass-button.css draws its glass, rim, size and words), its
35
+ value then a 16px ⌄ in the quietest words; the label kept for a screen reader alone, as the Sheet it opens is titled with it. */
36
+ .o-select-inside .o-select-field:where([data-vk-phone]) { gap: var(--vk-spacing); }
37
+ .o-select-inside .o-select-field:where([data-vk-phone]) > .o-select-label-in {
38
+ position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
39
+ }
40
+ .o-select-inside .o-select-field:where([data-vk-phone]) .o-select-chevron svg { width: calc(var(--vk-spacing) * 4); height: calc(var(--vk-spacing) * 4); stroke: var(--vk-fg-subtlest); }
41
+
25
42
  /* ── Typed into: the field holds the box you type in (the group's bare control), and with several, their
26
43
  chips first, each the Option with its own ×, wrapping onto more lines as they grow; from 32px up a quiet ×
27
44
  clears it; the chevron shows every choice ───────────────────────────────────────────────────────── */
@@ -0,0 +1,10 @@
1
+ import { type PieceLooks } from "../../looks/looks.js";
2
+ export type SettingRowOptionId = "card" | "rows" | "end" | "fields" | "icon";
3
+ /** One value for every option. */
4
+ export type SettingRowPicks = Record<SettingRowOptionId, string>;
5
+ /** The setting row's options and looks. */
6
+ export declare const SETTING_ROW_LOOKS: PieceLooks<SettingRowOptionId>;
7
+ /** The options worn round `el`, each from the nearest frame that picks it; outside any frame, or a value it lacks, its default. */
8
+ export declare function settingRowWornOf(el: Element | null): SettingRowPicks;
9
+ /** The attributes the setting rows' options are set by. */
10
+ export declare const SETTING_ROW_ATTRS: string[];
@@ -0,0 +1,22 @@
1
+ import { lookWornOf } from "../../looks/looks.js";
2
+ const OUTRIGHT = { card: "outlined", rows: "snug", end: "buttons", fields: "boxes", icon: "line" };
3
+ const ATTIO = { card: "raised", rows: "roomy", end: "buttons", fields: "boxes", icon: "line" };
4
+ const LINEAR = { card: "edged", rows: "inset", end: "words", fields: "end", icon: "line" };
5
+ const options = [
6
+ { id: "card", name: "Card", device: "desktop", def: OUTRIGHT.card, values: [{ id: "outlined", name: "Outlined" }, { id: "raised", name: "Raised" }, { id: "edged", name: "Edged" }] },
7
+ { id: "rows", name: "Rows", device: "desktop", def: OUTRIGHT.rows, values: [{ id: "snug", name: "Snug" }, { id: "roomy", name: "Roomy" }, { id: "inset", name: "Inset" }] },
8
+ { id: "end", name: "End", device: "desktop", def: OUTRIGHT.end, values: [{ id: "buttons", name: "Buttons" }, { id: "words", name: "Words" }] },
9
+ { id: "fields", name: "Fields", device: "desktop", def: OUTRIGHT.fields, values: [{ id: "boxes", name: "Boxes" }, { id: "end", name: "At the end" }] },
10
+ { id: "icon", name: "Icon", device: "phone", def: OUTRIGHT.icon, values: [{ id: "line", name: "Line" }, { id: "tile", name: "Tile" }] },
11
+ ];
12
+ const looks = [
13
+ { id: "outright", name: "Outright", picks: OUTRIGHT },
14
+ { id: "attio", name: "Attio", picks: ATTIO },
15
+ { id: "linear", name: "Linear", picks: LINEAR },
16
+ ];
17
+ export const SETTING_ROW_LOOKS = { id: "setting-row", name: "Setting row", options, looks };
18
+ const IDS = options.map((o) => o.id);
19
+ export function settingRowWornOf(el) {
20
+ return lookWornOf(SETTING_ROW_LOOKS, el, IDS);
21
+ }
22
+ export const SETTING_ROW_ATTRS = IDS.map((id) => `data-setting-row-${id}`);
@@ -0,0 +1,100 @@
1
+ import * as React from "react";
2
+ import type { OptionColour } from "../option/looks.js";
3
+ import { type SelectListProps } from "../select/select.js";
4
+ import { type SwitchProps } from "../switch/switch.js";
5
+ import { type SettingRowPicks } from "./looks.js";
6
+ /** A setting row's button: its words, an icon before them, what a press does. */
7
+ export interface SettingAction {
8
+ label: string;
9
+ icon?: React.ReactNode;
10
+ onClick?: () => void;
11
+ disabled?: boolean;
12
+ /** Its icon alone, its label naming it (a pencil for Change). */
13
+ iconOnly?: boolean;
14
+ /** The Button's kind: danger where it can't be undone, outline where it can (Leave); left out, danger in the danger zone,
15
+ * outline elsewhere. */
16
+ kind?: "outline" | "danger";
17
+ }
18
+ /** A word of state before a row's control: what is true now (Connected), in a value's colour. */
19
+ export interface SettingState {
20
+ label: string;
21
+ colour?: OptionColour;
22
+ }
23
+ interface SettingRowBase {
24
+ /** The setting's name ("Weekly digest"). */
25
+ label: React.ReactNode;
26
+ /** The line under its name: what it does. */
27
+ note?: React.ReactNode;
28
+ /** An icon at the row's start: on a computer in a 32 box; on a phone a line icon, or a tile under the Icon option's Tile. */
29
+ icon?: React.ReactNode;
30
+ /** The tile's colour under the Icon option's Tile, a label colour (the palette's 700s); left out, grey. Line ignores it. */
31
+ colour?: OptionColour;
32
+ /** A mark at the row's start, as given (Google's, a team's letter). */
33
+ mark?: React.ReactNode;
34
+ /** Why it can't change: its control is shut, and this stands before it. On a phone the row fades and the reason stands in
35
+ * place of its line; a page that puts the reason in its group's note passes `true`. */
36
+ locked?: React.ReactNode;
37
+ /** A word of state: on a computer before its control, the Option in its colour (Connected, green); on a phone the grey
38
+ * value before ›, the row then the press of its action. */
39
+ state?: SettingState;
40
+ /** A lone row: one action on its own; on a computer bare, with no card; on a phone a card of its own, the row the press. */
41
+ alone?: boolean;
42
+ className?: string;
43
+ }
44
+ type No<K extends string> = {
45
+ [P in K]?: never;
46
+ };
47
+ export type SettingRowProps = SettingRowBase & (({
48
+ switch: Omit<SwitchProps, "locked">;
49
+ } & No<"select" | "action" | "onOpen" | "value">) | ({
50
+ select: Omit<SelectListProps, "label" | "size">;
51
+ } & No<"switch" | "action" | "onOpen" | "value">) | ({
52
+ action: SettingAction; /** On a computer, a value before its action, as the open kind's (an email before Change). */
53
+ value?: React.ReactNode;
54
+ } & No<"switch" | "select" | "onOpen">) | ({
55
+ onOpen: () => void;
56
+ value?: React.ReactNode;
57
+ } & No<"switch" | "select" | "action">));
58
+ export interface SettingRowsProps {
59
+ /** The danger zone's: a red edge, each row's button the Button's danger kind unless its action says outline, on a phone its
60
+ * names red. */
61
+ danger?: boolean;
62
+ /** Its form: the device's unless told (a PhoneHost screen, or below the app's line, is a phone's). */
63
+ form?: "computer" | "phone";
64
+ className?: string;
65
+ children: React.ReactNode;
66
+ }
67
+ /** The setting row's options as the frame round `el` picks them, kept up to date as they change; each its default for `null`. */
68
+ export declare function useSettingRowWorn(el: Element | null): SettingRowPicks;
69
+ /** True for a part placed in a computer's SettingRows whose Fields option is At the end: it draws as one of the card's rows (a
70
+ * Field, the kit's photo). */
71
+ export declare function useSettingRowsRow(): boolean;
72
+ /** The icon at a row's start, or beside a list's name: Line or Tile by the Icon option, the tile on `colour`. */
73
+ export declare function SettingIcon({ colour, children }: {
74
+ colour?: OptionColour;
75
+ children: React.ReactNode;
76
+ }): import("react/jsx-runtime").JSX.Element;
77
+ /** iOS's ›, 9 × 15, at a phone row's end: the setting row's, drawn by a list beside setting rows too (the kit's settings list, an
78
+ * app's own row), so one › stands on every settings page. */
79
+ export declare function SettingChevron(): import("react/jsx-runtime").JSX.Element;
80
+ /** Settings rows in a card, a line between each; `danger` the danger zone's. On a phone, Field rows' card: a Field placed in it
81
+ * is its row, beside the setting rows, its note and error under the card (VK-979). */
82
+ export declare function SettingRows({ danger, form, className, children }: SettingRowsProps): import("react/jsx-runtime").JSX.Element;
83
+ /** One setting as a row: its name and its line, its control at its end. What it holds is no row of its card: a Field its control
84
+ * draws (a Select with a note) stands as it does anywhere else. */
85
+ export declare function SettingRow(props: SettingRowProps): import("react/jsx-runtime").JSX.Element;
86
+ /** A setting with a switch: the setting row's switch kind, only its Switch switching it. */
87
+ export interface SwitchRowProps extends SwitchProps {
88
+ /** The setting's name ("Daily summary"), not the action. */
89
+ label: React.ReactNode;
90
+ /** A line under it: what it does, or why it is locked. */
91
+ note?: React.ReactNode;
92
+ }
93
+ /** A setting in a settings list: its name and a line on the left, the switch on the right, which alone switches it. */
94
+ export declare function SwitchRow({ label, note, locked, ...props }: SwitchRowProps): import("react/jsx-runtime").JSX.Element;
95
+ /** Settings rows in a bordered box, a line between each: the setting rows' card in its computer form on every device. */
96
+ export declare function SwitchRows({ className, children }: {
97
+ className?: string;
98
+ children: React.ReactNode;
99
+ }): import("react/jsx-runtime").JSX.Element;
100
+ export {};
@@ -0,0 +1,133 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { cx } from "../../internal/cx.js";
4
+ import { FieldRowsCardContext, OutOfFieldRows, SettingRowField } from "../../internal/field-rows.js";
5
+ import { Button } from "../button/button.js";
6
+ import { useFieldRowsCard } from "../field/field.js";
7
+ import { phoneMark, usePhoneForm } from "../internal/phone.js";
8
+ import { Option } from "../option/option.js";
9
+ import { Select } from "../select/select.js";
10
+ import { Switch } from "../switch/switch.js";
11
+ import { SETTING_ROW_ATTRS, settingRowWornOf } from "./looks.js";
12
+ const Rows = React.createContext(null);
13
+ const useBeforePaint = typeof window === "undefined" ? React.useEffect : React.useLayoutEffect;
14
+ const DEF = settingRowWornOf(null);
15
+ const sameWorn = (a, b) => Object.keys(a).every((k) => a[k] === b[k]);
16
+ export function useSettingRowWorn(el) {
17
+ const [worn, setWorn] = React.useState(DEF);
18
+ useBeforePaint(() => {
19
+ const read = () => setWorn((was) => { const now = settingRowWornOf(el); return sameWorn(was, now) ? was : now; });
20
+ read();
21
+ if (!el)
22
+ return;
23
+ const watch = new MutationObserver(read);
24
+ watch.observe(document.documentElement, { attributes: true, subtree: true, attributeFilter: SETTING_ROW_ATTRS });
25
+ return () => watch.disconnect();
26
+ }, [el]);
27
+ return worn;
28
+ }
29
+ export function useSettingRowsRow() {
30
+ return React.useContext(SettingRowField);
31
+ }
32
+ export function SettingIcon({ colour, children }) {
33
+ return _jsx("span", { className: "o-setting-row-icon", "data-colour": colour, "aria-hidden": "true", ...phoneMark(usePhoneForm()), children: children });
34
+ }
35
+ const PHONE_CHEVRON = (_jsx("svg", { className: "o-setting-row-chevron", "data-phone": "", viewBox: "0 0 9 15", fill: "none", stroke: "currentColor", strokeWidth: 2.2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: _jsx("path", { d: "M1.5 1.5 7.5 7.5 1.5 13.5" }) }));
36
+ export function SettingChevron() {
37
+ return PHONE_CHEVRON;
38
+ }
39
+ const CHEVRON = (_jsx("svg", { className: "o-setting-row-chevron", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: _jsx("path", { d: "M6 3.5 10.5 8 6 12.5" }) }));
40
+ export function SettingRows({ danger = false, form, className, children }) {
41
+ const phone = usePhoneForm(form), { card, foot } = useFieldRowsCard();
42
+ const [el, setEl] = React.useState(null), worn = useSettingRowWorn(phone ? null : el);
43
+ const rows = React.useMemo(() => ({ danger, phone, worn }), [danger, phone, worn]);
44
+ return (_jsxs(FieldRowsCardContext.Provider, { value: phone ? card : null, children: [_jsx(SettingRowField.Provider, { value: !phone && worn.fields === "end", children: _jsx("div", { ref: setEl, className: cx("o-setting-rows o-smooth o-smooth-ease", danger && "o-setting-rows-danger", phone && "o-field-rows", className), "data-kit": "setting-row", ...phoneMark(phone), children: _jsx(Rows.Provider, { value: rows, children: children }) }) }), phone && foot] }));
45
+ }
46
+ export function SettingRow(props) {
47
+ return _jsx(OutOfFieldRows, { children: _jsx(SettingRowOf, { ...props }) });
48
+ }
49
+ function SettingRowOf(props) {
50
+ const rows = React.useContext(Rows), device = usePhoneForm(), danger = !!rows?.danger;
51
+ const { label, note, icon, mark, locked, alone, className } = props;
52
+ const id = React.useId();
53
+ const [own, setOwn] = React.useState(null), ownWorn = useSettingRowWorn(rows || device ? null : own);
54
+ if (alone && !rows && device)
55
+ return _jsx(SettingRows, { form: "phone", children: _jsx(SettingRow, { ...props }) });
56
+ const phone = !!rows?.phone, worn = rows ? rows.worn : ownWorn, inWords = !phone && worn.end === "words";
57
+ const shut = locked != null && locked !== false;
58
+ const reason = shut && locked !== true ? locked : null;
59
+ const kind = props.switch ? "switch" : props.select ? "select" : props.action ? "action" : "open";
60
+ const begins = mark != null ? "mark" : icon != null || (phone && danger && props.action?.icon != null) ? "icon" : undefined;
61
+ const ownCard = alone && !rows && !device && worn.card === "edged";
62
+ const root = { className: cx("o-setting-row", phone && "o-field-row", props.switch && "o-switch-row", ownCard && "o-smooth o-smooth-ease", className), "data-setting-row-kind": kind,
63
+ "data-setting-row-start": begins, "data-locked": shut ? "" : undefined, "data-alone": alone ? "" : undefined, ...(rows ? {} : { ref: setOwn }) };
64
+ const start = mark ?? (icon != null ? _jsx(SettingIcon, { colour: props.colour, children: icon }) : null);
65
+ const chevron = phone ? PHONE_CHEVRON : CHEVRON;
66
+ const line = phone && reason != null ? reason : note;
67
+ const words = (_jsxs("span", { className: "o-choice-text", children: [_jsx("span", { className: "o-choice-label", id: `${id}-label`, children: label }), line != null && _jsx("span", { className: "o-choice-note", id: `${id}-note`, children: line })] }));
68
+ const why = !phone && reason != null ? _jsx("span", { className: "o-setting-row-reason", children: reason }) : null;
69
+ const name = typeof label === "string" ? label : undefined;
70
+ const s = props.state;
71
+ const said = phone || !s ? null : inWords
72
+ ? _jsxs("span", { className: "o-setting-row-said", children: [s.colour && _jsx("span", { className: "o-setting-row-dot", "data-colour": s.colour, "aria-hidden": "true" }), s.label] })
73
+ : _jsx(Option, { colour: s.colour, children: s.label });
74
+ const lead = said != null || why != null ? _jsxs(_Fragment, { children: [said, why] }) : null;
75
+ if (inWords && why != null)
76
+ return _jsxs("div", { ...root, children: [start, words, _jsxs("span", { className: "o-setting-row-end", children: [said, why] })] });
77
+ if (props.switch) {
78
+ const toggle = _jsx(Switch, { "aria-labelledby": `${id}-label`, "aria-describedby": line != null ? `${id}-note` : undefined, ...props.switch, locked: shut });
79
+ return (_jsxs("div", { ...root, children: [start, words, said == null ? _jsxs(_Fragment, { children: [why, toggle] }) : _jsxs("span", { className: "o-setting-row-end", children: [said, why, toggle] })] }));
80
+ }
81
+ if (props.select)
82
+ return _jsx(SelectRow, { root: root, start: start, words: words, why: lead, name: name, select: props.select, shut: shut, phone: phone });
83
+ if (props.action) {
84
+ const a = props.action;
85
+ if (phone) {
86
+ const off = shut || a.disabled;
87
+ if (alone)
88
+ return _jsxs("button", { type: "button", ...root, disabled: off, onClick: a.onClick, children: [start, words] });
89
+ if (danger)
90
+ return _jsxs("button", { type: "button", ...root, disabled: off, onClick: a.onClick, children: [a.icon != null ? _jsx(SettingIcon, { children: a.icon }) : start, words] });
91
+ if (props.state)
92
+ return (_jsxs("button", { type: "button", ...root, disabled: off, onClick: a.onClick, children: [start, words, _jsxs("span", { className: "o-setting-row-end", children: [_jsx("span", { className: "o-setting-row-value", children: props.state.label }), chevron] })] }));
93
+ const about = line != null ? `${id}-label ${id}-note` : `${id}-label`;
94
+ return _jsxs("div", { ...root, children: [start, words, _jsx("span", { className: "o-setting-row-end", children: _jsx("button", { type: "button", className: "o-setting-row-act", "aria-describedby": about, disabled: off, onClick: a.onClick, children: a.label }) })] });
95
+ }
96
+ const kindOf = a.kind ?? (danger ? "danger" : "outline");
97
+ const value = props.value != null ? _jsx("span", { className: "o-setting-row-value", children: props.value }) : null;
98
+ const act = inWords
99
+ ? _jsx("button", { type: "button", className: "o-setting-row-act", "data-kind": kindOf === "danger" ? "danger" : undefined, "data-icon": a.iconOnly ? "" : undefined, "aria-label": a.iconOnly ? a.label : undefined, disabled: shut || a.disabled, onClick: a.onClick, children: a.iconOnly ? a.icon : a.label })
100
+ : a.iconOnly
101
+ ? _jsx(Button, { kind: kindOf, size: "sm", shape: "icon", icon: a.icon, "aria-label": a.label, disabled: shut || a.disabled, onClick: a.onClick })
102
+ : _jsx(Button, { kind: kindOf, size: "sm", icon: a.icon, disabled: shut || a.disabled, onClick: a.onClick, children: a.label });
103
+ return (_jsxs("div", { ...root, children: [start, words, _jsxs("span", { className: "o-setting-row-end", children: [value, lead, act] })] }));
104
+ }
105
+ return (_jsxs("button", { type: "button", ...root, disabled: shut, onClick: shut ? undefined : props.onOpen, children: [start, words, _jsxs("span", { className: "o-setting-row-end", children: [lead, props.value != null && _jsx("span", { className: "o-setting-row-value", children: props.value }), chevron] })] }));
106
+ }
107
+ const firstOf = (v) => (Array.isArray(v) ? v : v == null ? [] : [v]);
108
+ function SelectRow({ root, start, words, why, name, select, shut, phone }) {
109
+ const [own, setOwn] = React.useState(select.defaultValue ?? null), [open, setOpen] = React.useState(false);
110
+ const value = select.value !== undefined ? select.value : own;
111
+ const changed = (v) => { setOwn(v); select.onValueChange?.(v); };
112
+ const field = _jsx(Select, { ...select, value: value, onValueChange: changed, size: "md", disabled: shut || select.disabled, "aria-label": select["aria-label"] ?? name, className: cx("o-setting-row-select", select.className), ...(phone ? { open, onOpenChange: setOpen } : {}) });
113
+ if (!phone)
114
+ return _jsxs("div", { ...root, children: [start, words, _jsxs("span", { className: "o-setting-row-end", children: [why, field] })] });
115
+ const shown = firstOf(value).map((v) => findItem(select.items, v)?.label ?? v);
116
+ return (_jsxs("div", { ...root, children: [_jsxs("button", { type: "button", className: "o-setting-row-press", disabled: shut || select.disabled, onClick: () => setOpen(true), children: [start, words, _jsxs("span", { className: "o-setting-row-end", children: [shown.length > 0 && _jsx("span", { className: "o-setting-row-value", children: shown.join(", ") }), PHONE_CHEVRON] })] }), _jsx("span", { hidden: true, children: field })] }));
117
+ }
118
+ const findItem = (items, v) => {
119
+ for (const i of items) {
120
+ if (i.value === v)
121
+ return i;
122
+ const deep = i.level && findItem(i.level, v);
123
+ if (deep)
124
+ return deep;
125
+ }
126
+ return undefined;
127
+ };
128
+ export function SwitchRow({ label, note, locked, ...props }) {
129
+ return _jsx(SettingRow, { label: label, note: note, locked: locked || undefined, switch: props });
130
+ }
131
+ export function SwitchRows({ className, children }) {
132
+ return _jsx(SettingRows, { form: "computer", className: cx("o-switch-rows", className), children: children });
133
+ }
@@ -0,0 +1,156 @@
1
+ export declare const SETTING_ROW_TOKENS: readonly [{
2
+ readonly name: "--vk-border";
3
+ readonly kind: "colour";
4
+ readonly outright: "--border";
5
+ }, {
6
+ readonly name: "--vk-border-subtle";
7
+ readonly kind: "colour";
8
+ readonly outright: "--border-subtle";
9
+ }, {
10
+ readonly name: "--vk-border-danger";
11
+ readonly kind: "colour";
12
+ readonly outright: "--border-danger";
13
+ }, {
14
+ readonly name: "--vk-hovered";
15
+ readonly kind: "colour";
16
+ readonly outright: "--surface-hovered";
17
+ }, {
18
+ readonly name: "--vk-raised";
19
+ readonly kind: "colour";
20
+ readonly outright: "--surface-raised";
21
+ }, {
22
+ readonly name: "--vk-danger";
23
+ readonly kind: "colour";
24
+ readonly outright: "--text-danger";
25
+ }, {
26
+ readonly name: "--vk-fg";
27
+ readonly kind: "colour";
28
+ readonly outright: "--text";
29
+ }, {
30
+ readonly name: "--vk-fg-subtle";
31
+ readonly kind: "colour";
32
+ readonly outright: "--text-subtle";
33
+ }, {
34
+ readonly name: "--vk-fg-subtlest";
35
+ readonly kind: "colour";
36
+ readonly outright: "--text-subtlest";
37
+ }, {
38
+ readonly name: "--vk-fg-brand";
39
+ readonly kind: "colour";
40
+ readonly outright: "--link";
41
+ }, {
42
+ readonly name: "--vk-border-brand";
43
+ readonly kind: "colour";
44
+ readonly outright: "--border-focused";
45
+ }, {
46
+ readonly name: "--vk-label-blue";
47
+ readonly kind: "colour";
48
+ readonly outright: "--label-blue";
49
+ }, {
50
+ readonly name: "--vk-label-green";
51
+ readonly kind: "colour";
52
+ readonly outright: "--label-green";
53
+ }, {
54
+ readonly name: "--vk-label-amber";
55
+ readonly kind: "colour";
56
+ readonly outright: "--label-amber";
57
+ }, {
58
+ readonly name: "--vk-label-red";
59
+ readonly kind: "colour";
60
+ readonly outright: "--label-red";
61
+ }, {
62
+ readonly name: "--vk-label-purple";
63
+ readonly kind: "colour";
64
+ readonly outright: "--label-purple";
65
+ }, {
66
+ readonly name: "--vk-label-pink";
67
+ readonly kind: "colour";
68
+ readonly outright: "--label-pink";
69
+ }, {
70
+ readonly name: "--vk-label-teal";
71
+ readonly kind: "colour";
72
+ readonly outright: "--label-teal";
73
+ }, {
74
+ readonly name: "--vk-fg-inverse";
75
+ readonly kind: "colour";
76
+ readonly outright: "--text-inverse";
77
+ }, {
78
+ readonly name: "--vk-neutral";
79
+ readonly kind: "colour";
80
+ readonly outright: "--background-neutral";
81
+ }, {
82
+ readonly name: "--vk-icon-disclosure";
83
+ readonly kind: "colour";
84
+ readonly outright: "--icon-disclosure";
85
+ }, {
86
+ readonly name: "--vk-border-width";
87
+ readonly kind: "size";
88
+ readonly outright: "--border-width";
89
+ }, {
90
+ readonly name: "--vk-corner-smoothing";
91
+ readonly kind: "size";
92
+ readonly outright: "--corner-smoothing";
93
+ }, {
94
+ readonly name: "--vk-font-size-sm";
95
+ readonly kind: "size";
96
+ readonly outright: "--text-sm";
97
+ }, {
98
+ readonly name: "--vk-font-size-xs";
99
+ readonly kind: "size";
100
+ readonly outright: "--text-xs";
101
+ }, {
102
+ readonly name: "--vk-focus-width";
103
+ readonly kind: "size";
104
+ readonly outright: "--focus-width";
105
+ }, {
106
+ readonly name: "--vk-focus-offset";
107
+ readonly kind: "size";
108
+ readonly outright: "--focus-offset";
109
+ }, {
110
+ readonly name: "--vk-font-weight-medium";
111
+ readonly kind: "size";
112
+ readonly outright: "--font-weight-medium";
113
+ }, {
114
+ readonly name: "--vk-line-height-sm";
115
+ readonly kind: "size";
116
+ readonly outright: "--text-sm--line-height";
117
+ }, {
118
+ readonly name: "--vk-line-height-xs";
119
+ readonly kind: "size";
120
+ readonly outright: "--text-xs--line-height";
121
+ }, {
122
+ readonly name: "--vk-radius-lg";
123
+ readonly kind: "size";
124
+ readonly outright: "--radius-lg";
125
+ }, {
126
+ readonly name: "--vk-radius-md";
127
+ readonly kind: "size";
128
+ readonly outright: "--radius-md";
129
+ }, {
130
+ readonly name: "--vk-radius-sm";
131
+ readonly kind: "size";
132
+ readonly outright: "--radius-sm";
133
+ }, {
134
+ readonly name: "--vk-radius-full";
135
+ readonly kind: "size";
136
+ readonly outright: "--radius-full";
137
+ }, {
138
+ readonly name: "--vk-spacing";
139
+ readonly kind: "size";
140
+ readonly outright: "--spacing";
141
+ }, {
142
+ readonly name: "--vk-opacity-off";
143
+ readonly kind: "size";
144
+ readonly outright: "--opacity-off";
145
+ }, {
146
+ readonly name: "--vk-duration-fast";
147
+ readonly kind: "motion";
148
+ readonly outright: "--duration-fast";
149
+ }, {
150
+ readonly name: "--vk-ease-out";
151
+ readonly kind: "motion";
152
+ readonly outright: "--ease-out";
153
+ }];
154
+ /** The card's own machinery: its edge and ground by the card picked, its rows' room by the rows picked, the size its smooth
155
+ * corner is fitted to; a tile's colour, by the colour its icon was given; and a state's dot's, by its colour. */
156
+ export declare const SETTING_ROW_PRIVATE: readonly ["--setting-rows-", "--setting-row-tile", "--setting-row-dot"];
@@ -0,0 +1,41 @@
1
+ export const SETTING_ROW_TOKENS = [
2
+ { name: "--vk-border", kind: "colour", outright: "--border" },
3
+ { name: "--vk-border-subtle", kind: "colour", outright: "--border-subtle" },
4
+ { name: "--vk-border-danger", kind: "colour", outright: "--border-danger" },
5
+ { name: "--vk-hovered", kind: "colour", outright: "--surface-hovered" },
6
+ { name: "--vk-raised", kind: "colour", outright: "--surface-raised" },
7
+ { name: "--vk-danger", kind: "colour", outright: "--text-danger" },
8
+ { name: "--vk-fg", kind: "colour", outright: "--text" },
9
+ { name: "--vk-fg-subtle", kind: "colour", outright: "--text-subtle" },
10
+ { name: "--vk-fg-subtlest", kind: "colour", outright: "--text-subtlest" },
11
+ { name: "--vk-fg-brand", kind: "colour", outright: "--link" },
12
+ { name: "--vk-border-brand", kind: "colour", outright: "--border-focused" },
13
+ { name: "--vk-label-blue", kind: "colour", outright: "--label-blue" },
14
+ { name: "--vk-label-green", kind: "colour", outright: "--label-green" },
15
+ { name: "--vk-label-amber", kind: "colour", outright: "--label-amber" },
16
+ { name: "--vk-label-red", kind: "colour", outright: "--label-red" },
17
+ { name: "--vk-label-purple", kind: "colour", outright: "--label-purple" },
18
+ { name: "--vk-label-pink", kind: "colour", outright: "--label-pink" },
19
+ { name: "--vk-label-teal", kind: "colour", outright: "--label-teal" },
20
+ { name: "--vk-fg-inverse", kind: "colour", outright: "--text-inverse" },
21
+ { name: "--vk-neutral", kind: "colour", outright: "--background-neutral" },
22
+ { name: "--vk-icon-disclosure", kind: "colour", outright: "--icon-disclosure" },
23
+ { name: "--vk-border-width", kind: "size", outright: "--border-width" },
24
+ { name: "--vk-corner-smoothing", kind: "size", outright: "--corner-smoothing" },
25
+ { name: "--vk-font-size-sm", kind: "size", outright: "--text-sm" },
26
+ { name: "--vk-font-size-xs", kind: "size", outright: "--text-xs" },
27
+ { name: "--vk-focus-width", kind: "size", outright: "--focus-width" },
28
+ { name: "--vk-focus-offset", kind: "size", outright: "--focus-offset" },
29
+ { name: "--vk-font-weight-medium", kind: "size", outright: "--font-weight-medium" },
30
+ { name: "--vk-line-height-sm", kind: "size", outright: "--text-sm--line-height" },
31
+ { name: "--vk-line-height-xs", kind: "size", outright: "--text-xs--line-height" },
32
+ { name: "--vk-radius-lg", kind: "size", outright: "--radius-lg" },
33
+ { name: "--vk-radius-md", kind: "size", outright: "--radius-md" },
34
+ { name: "--vk-radius-sm", kind: "size", outright: "--radius-sm" },
35
+ { name: "--vk-radius-full", kind: "size", outright: "--radius-full" },
36
+ { name: "--vk-spacing", kind: "size", outright: "--spacing" },
37
+ { name: "--vk-opacity-off", kind: "size", outright: "--opacity-off" },
38
+ { name: "--vk-duration-fast", kind: "motion", outright: "--duration-fast" },
39
+ { name: "--vk-ease-out", kind: "motion", outright: "--ease-out" },
40
+ ];
41
+ export const SETTING_ROW_PRIVATE = ["--setting-rows-", "--setting-row-tile", "--setting-row-dot"];