@bridgebrew/ui 0.0.0-stage → 0.1.9

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 (411) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +39 -2
  3. package/SOURCE.md +182 -0
  4. package/dist/build.js +871 -0
  5. package/dist/theme-css.js +896 -0
  6. package/dist/themes.js +69 -0
  7. package/dist/types/build/stylesheet.d.ts +31 -0
  8. package/dist/types/components/composite/command/command.d.ts +94 -0
  9. package/dist/types/components/composite/command/index.d.ts +2 -0
  10. package/dist/types/components/composite/draft-bar/draft-bar.d.ts +12 -0
  11. package/dist/types/components/composite/draft-bar/index.d.ts +2 -0
  12. package/dist/types/components/composite/image-field/image-field.d.ts +33 -0
  13. package/dist/types/components/composite/image-field/index.d.ts +2 -0
  14. package/dist/types/components/composite/list/index.d.ts +3 -0
  15. package/dist/types/components/composite/list/list-swipe.d.ts +28 -0
  16. package/dist/types/components/composite/list/list.d.ts +95 -0
  17. package/dist/types/components/composite/picker/index.d.ts +2 -0
  18. package/dist/types/components/composite/picker/picker.d.ts +44 -0
  19. package/dist/types/components/composite/prompt-field/index.d.ts +2 -0
  20. package/dist/types/components/composite/prompt-field/prompt-field.d.ts +18 -0
  21. package/dist/types/components/composite/properties/index.d.ts +2 -0
  22. package/dist/types/components/composite/properties/properties.d.ts +24 -0
  23. package/dist/types/components/composite/snooze-menu/index.d.ts +4 -0
  24. package/dist/types/components/composite/snooze-menu/presets.d.ts +36 -0
  25. package/dist/types/components/composite/snooze-menu/snooze-menu.d.ts +27 -0
  26. package/dist/types/components/composite/tag-input/index.d.ts +2 -0
  27. package/dist/types/components/composite/tag-input/tag-input.d.ts +22 -0
  28. package/dist/types/components/composite/wizard/index.d.ts +2 -0
  29. package/dist/types/components/composite/wizard/wizard.d.ts +53 -0
  30. package/dist/types/components/core/avatar/avatar.d.ts +16 -0
  31. package/dist/types/components/core/avatar/index.d.ts +2 -0
  32. package/dist/types/components/core/badge/badge.d.ts +8 -0
  33. package/dist/types/components/core/badge/index.d.ts +2 -0
  34. package/dist/types/components/core/breadcrumb/breadcrumb.d.ts +21 -0
  35. package/dist/types/components/core/breadcrumb/index.d.ts +2 -0
  36. package/dist/types/components/core/bullets/bullets.d.ts +15 -0
  37. package/dist/types/components/core/bullets/index.d.ts +2 -0
  38. package/dist/types/components/core/button/button.d.ts +14 -0
  39. package/dist/types/components/core/button/index.d.ts +2 -0
  40. package/dist/types/components/core/card/card.d.ts +16 -0
  41. package/dist/types/components/core/card/index.d.ts +2 -0
  42. package/dist/types/components/core/checkbox/checkbox.d.ts +15 -0
  43. package/dist/types/components/core/checkbox/index.d.ts +2 -0
  44. package/dist/types/components/core/cluster/cluster.d.ts +5 -0
  45. package/dist/types/components/core/cluster/index.d.ts +1 -0
  46. package/dist/types/components/core/code-block/code-block.d.ts +18 -0
  47. package/dist/types/components/core/code-block/index.d.ts +2 -0
  48. package/dist/types/components/core/collapsible/collapsible.d.ts +8 -0
  49. package/dist/types/components/core/collapsible/index.d.ts +1 -0
  50. package/dist/types/components/core/colour-picker/colour-picker.d.ts +25 -0
  51. package/dist/types/components/core/colour-picker/index.d.ts +4 -0
  52. package/dist/types/components/core/combobox/combobox.d.ts +63 -0
  53. package/dist/types/components/core/combobox/index.d.ts +2 -0
  54. package/dist/types/components/core/detail/detail.d.ts +12 -0
  55. package/dist/types/components/core/detail/index.d.ts +1 -0
  56. package/dist/types/components/core/dialog/dialog.d.ts +43 -0
  57. package/dist/types/components/core/dialog/drag.d.ts +4 -0
  58. package/dist/types/components/core/dialog/index.d.ts +2 -0
  59. package/dist/types/components/core/drop-zone/drop-zone.d.ts +23 -0
  60. package/dist/types/components/core/drop-zone/index.d.ts +2 -0
  61. package/dist/types/components/core/dropdown-menu/dropdown-menu.d.ts +78 -0
  62. package/dist/types/components/core/dropdown-menu/index.d.ts +2 -0
  63. package/dist/types/components/core/editable-field/editable-field.d.ts +42 -0
  64. package/dist/types/components/core/editable-field/index.d.ts +2 -0
  65. package/dist/types/components/core/empty-state/empty-state.d.ts +11 -0
  66. package/dist/types/components/core/empty-state/index.d.ts +2 -0
  67. package/dist/types/components/core/field/field.d.ts +31 -0
  68. package/dist/types/components/core/field/index.d.ts +2 -0
  69. package/dist/types/components/core/icon/icon-sets.d.ts +38 -0
  70. package/dist/types/components/core/icon/icon.d.ts +14 -0
  71. package/dist/types/components/core/icon/index.d.ts +2 -0
  72. package/dist/types/components/core/input/index.d.ts +4 -0
  73. package/dist/types/components/core/input/input.d.ts +22 -0
  74. package/dist/types/components/core/input/textarea.d.ts +8 -0
  75. package/dist/types/components/core/kbd/index.d.ts +2 -0
  76. package/dist/types/components/core/kbd/kbd.d.ts +7 -0
  77. package/dist/types/components/core/label/index.d.ts +2 -0
  78. package/dist/types/components/core/label/label.d.ts +13 -0
  79. package/dist/types/components/core/main-content/index.d.ts +2 -0
  80. package/dist/types/components/core/main-content/main-content.d.ts +18 -0
  81. package/dist/types/components/core/pane/index.d.ts +1 -0
  82. package/dist/types/components/core/pane/pane.d.ts +12 -0
  83. package/dist/types/components/core/pick-menu/index.d.ts +4 -0
  84. package/dist/types/components/core/pick-menu/pick-menu.d.ts +57 -0
  85. package/dist/types/components/core/pick-menu/tag-menu.d.ts +19 -0
  86. package/dist/types/components/core/popover/index.d.ts +2 -0
  87. package/dist/types/components/core/popover/popover.d.ts +22 -0
  88. package/dist/types/components/core/progress/index.d.ts +2 -0
  89. package/dist/types/components/core/progress/progress.d.ts +13 -0
  90. package/dist/types/components/core/resizable/index.d.ts +2 -0
  91. package/dist/types/components/core/resizable/resizable.d.ts +15 -0
  92. package/dist/types/components/core/resizable/use-remembered-layout.d.ts +31 -0
  93. package/dist/types/components/core/screen-link/index.d.ts +2 -0
  94. package/dist/types/components/core/screen-link/screen-link.d.ts +52 -0
  95. package/dist/types/components/core/scroll-area/index.d.ts +2 -0
  96. package/dist/types/components/core/scroll-area/scroll-area.d.ts +13 -0
  97. package/dist/types/components/core/scroll-area/steps.d.ts +5 -0
  98. package/dist/types/components/core/section/index.d.ts +2 -0
  99. package/dist/types/components/core/section/section.d.ts +16 -0
  100. package/dist/types/components/core/segment-group/index.d.ts +2 -0
  101. package/dist/types/components/core/segment-group/segment-group.d.ts +24 -0
  102. package/dist/types/components/core/select/index.d.ts +2 -0
  103. package/dist/types/components/core/select/select.d.ts +39 -0
  104. package/dist/types/components/core/skeleton/index.d.ts +2 -0
  105. package/dist/types/components/core/skeleton/skeleton.d.ts +13 -0
  106. package/dist/types/components/core/slider/index.d.ts +2 -0
  107. package/dist/types/components/core/slider/slider.d.ts +9 -0
  108. package/dist/types/components/core/sortable/index.d.ts +2 -0
  109. package/dist/types/components/core/sortable/sortable.d.ts +53 -0
  110. package/dist/types/components/core/split-view/index.d.ts +2 -0
  111. package/dist/types/components/core/split-view/split-view.d.ts +28 -0
  112. package/dist/types/components/core/status-icon/index.d.ts +2 -0
  113. package/dist/types/components/core/status-icon/status-icon.d.ts +13 -0
  114. package/dist/types/components/core/table/collapsible-rows.d.ts +7 -0
  115. package/dist/types/components/core/table/expand-toggle.d.ts +10 -0
  116. package/dist/types/components/core/table/group-header.d.ts +14 -0
  117. package/dist/types/components/core/table/index.d.ts +8 -0
  118. package/dist/types/components/core/table/table.d.ts +31 -0
  119. package/dist/types/components/core/tabs/index.d.ts +2 -0
  120. package/dist/types/components/core/tabs/tabs.d.ts +20 -0
  121. package/dist/types/components/core/tag-pill/index.d.ts +2 -0
  122. package/dist/types/components/core/tag-pill/tag-pill.d.ts +25 -0
  123. package/dist/types/components/core/thumbnail/index.d.ts +2 -0
  124. package/dist/types/components/core/thumbnail/thumbnail.d.ts +23 -0
  125. package/dist/types/components/core/toast/index.d.ts +2 -0
  126. package/dist/types/components/core/toast/toast.d.ts +88 -0
  127. package/dist/types/components/core/toggle/index.d.ts +2 -0
  128. package/dist/types/components/core/toggle/toggle.d.ts +9 -0
  129. package/dist/types/components/core/toggle-group/index.d.ts +2 -0
  130. package/dist/types/components/core/toggle-group/toggle-group.d.ts +21 -0
  131. package/dist/types/components/core/tooltip/index.d.ts +2 -0
  132. package/dist/types/components/core/tooltip/tooltip.d.ts +33 -0
  133. package/dist/types/components/layout/multi-pane/index.d.ts +4 -0
  134. package/dist/types/components/layout/multi-pane/list-detail.d.ts +17 -0
  135. package/dist/types/components/layout/multi-pane/multi-pane.d.ts +34 -0
  136. package/dist/types/components/layout/single-pane/index.d.ts +2 -0
  137. package/dist/types/components/layout/single-pane/single-pane.d.ts +11 -0
  138. package/dist/types/components/shell/app-shell/app-shell.d.ts +12 -0
  139. package/dist/types/components/shell/app-shell/index.d.ts +2 -0
  140. package/dist/types/components/shell/sidebar/index.d.ts +2 -0
  141. package/dist/types/components/shell/sidebar/sidebar-group.d.ts +45 -0
  142. package/dist/types/components/shell/sidebar/sidebar-item.d.ts +19 -0
  143. package/dist/types/components/shell/sidebar/sidebar-resize-handle.d.ts +17 -0
  144. package/dist/types/components/shell/sidebar/sidebar-tree.d.ts +42 -0
  145. package/dist/types/components/shell/sidebar/sidebar.d.ts +27 -0
  146. package/dist/types/components/template/address-book-template/address-book-template.d.ts +15 -0
  147. package/dist/types/components/template/address-book-template/index.d.ts +2 -0
  148. package/dist/types/components/template/mail-template/index.d.ts +2 -0
  149. package/dist/types/components/template/mail-template/mail-template.d.ts +11 -0
  150. package/dist/types/components/template/use-narrow.d.ts +3 -0
  151. package/dist/types/index.d.ts +149 -0
  152. package/dist/types/kit/check-rendering.d.ts +3 -0
  153. package/dist/types/kit/kit.d.ts +76 -0
  154. package/dist/types/lib/clipboard.d.ts +5 -0
  155. package/dist/types/lib/dates.d.ts +9 -0
  156. package/dist/types/lib/json.d.ts +26 -0
  157. package/dist/types/lib/keys.d.ts +15 -0
  158. package/dist/types/lib/utils.d.ts +2 -0
  159. package/dist/types/lib/view-scope.d.ts +22 -0
  160. package/dist/types/profile/profile.d.ts +34 -0
  161. package/dist/types/theme/appearance.d.ts +31 -0
  162. package/dist/types/theme/boot.d.ts +3 -0
  163. package/dist/types/theme/client-appearance-react.d.ts +3 -0
  164. package/dist/types/theme/client-appearance.d.ts +69 -0
  165. package/dist/types/theme/generate-tokens.d.ts +45 -0
  166. package/dist/types/theme/pack-themes-react.d.ts +24 -0
  167. package/dist/types/theme/palette.d.ts +111 -0
  168. package/dist/types/theme/semantic-mapping.d.ts +28 -0
  169. package/dist/types/theme/set-theme.d.ts +30 -0
  170. package/dist/types/theme/theme-colours.d.ts +14 -0
  171. package/dist/types/theme/theme-css.d.ts +3 -0
  172. package/dist/types/theme/themes.d.ts +63 -0
  173. package/dist/types/theme/wallpaper-sheet.d.ts +16 -0
  174. package/dist/types/theme/wallpaper-theme-react.d.ts +7 -0
  175. package/dist/types/theme/wallpaper-theme.d.ts +37 -0
  176. package/package.json +87 -3
  177. package/src/build/stylesheet.ts +128 -0
  178. package/src/components/composite/command/command.meta.yaml +74 -0
  179. package/src/components/composite/command/command.tsx +939 -0
  180. package/src/components/composite/command/index.ts +17 -0
  181. package/src/components/composite/draft-bar/draft-bar.meta.yaml +19 -0
  182. package/src/components/composite/draft-bar/draft-bar.tsx +57 -0
  183. package/src/components/composite/draft-bar/index.ts +2 -0
  184. package/src/components/composite/image-field/image-field.meta.yaml +69 -0
  185. package/src/components/composite/image-field/image-field.tsx +267 -0
  186. package/src/components/composite/image-field/index.ts +2 -0
  187. package/src/components/composite/list/index.ts +18 -0
  188. package/src/components/composite/list/list-swipe.tsx +163 -0
  189. package/src/components/composite/list/list.meta.yaml +238 -0
  190. package/src/components/composite/list/list.tsx +868 -0
  191. package/src/components/composite/picker/index.ts +2 -0
  192. package/src/components/composite/picker/picker.meta.yaml +103 -0
  193. package/src/components/composite/picker/picker.tsx +276 -0
  194. package/src/components/composite/prompt-field/index.ts +2 -0
  195. package/src/components/composite/prompt-field/prompt-field.meta.yaml +60 -0
  196. package/src/components/composite/prompt-field/prompt-field.tsx +81 -0
  197. package/src/components/composite/properties/index.ts +9 -0
  198. package/src/components/composite/properties/properties.meta.yaml +56 -0
  199. package/src/components/composite/properties/properties.tsx +132 -0
  200. package/src/components/composite/snooze-menu/index.ts +11 -0
  201. package/src/components/composite/snooze-menu/presets.ts +169 -0
  202. package/src/components/composite/snooze-menu/snooze-menu.meta.yaml +58 -0
  203. package/src/components/composite/snooze-menu/snooze-menu.tsx +146 -0
  204. package/src/components/composite/tag-input/index.ts +2 -0
  205. package/src/components/composite/tag-input/tag-input.meta.yaml +51 -0
  206. package/src/components/composite/tag-input/tag-input.tsx +404 -0
  207. package/src/components/composite/wizard/index.ts +2 -0
  208. package/src/components/composite/wizard/wizard.meta.yaml +73 -0
  209. package/src/components/composite/wizard/wizard.tsx +256 -0
  210. package/src/components/core/avatar/avatar.meta.yaml +71 -0
  211. package/src/components/core/avatar/avatar.tsx +92 -0
  212. package/src/components/core/avatar/index.ts +2 -0
  213. package/src/components/core/badge/badge.meta.yaml +34 -0
  214. package/src/components/core/badge/badge.tsx +23 -0
  215. package/src/components/core/badge/index.ts +2 -0
  216. package/src/components/core/breadcrumb/breadcrumb.meta.yaml +45 -0
  217. package/src/components/core/breadcrumb/breadcrumb.tsx +110 -0
  218. package/src/components/core/breadcrumb/index.ts +2 -0
  219. package/src/components/core/bullets/bullets.meta.yaml +37 -0
  220. package/src/components/core/bullets/bullets.tsx +60 -0
  221. package/src/components/core/bullets/index.ts +2 -0
  222. package/src/components/core/button/button.meta.yaml +91 -0
  223. package/src/components/core/button/button.tsx +93 -0
  224. package/src/components/core/button/index.ts +2 -0
  225. package/src/components/core/card/card.meta.yaml +94 -0
  226. package/src/components/core/card/card.tsx +54 -0
  227. package/src/components/core/card/index.ts +2 -0
  228. package/src/components/core/checkbox/checkbox.meta.yaml +59 -0
  229. package/src/components/core/checkbox/checkbox.tsx +106 -0
  230. package/src/components/core/checkbox/index.ts +2 -0
  231. package/src/components/core/cluster/cluster.meta.yaml +4 -0
  232. package/src/components/core/cluster/cluster.tsx +17 -0
  233. package/src/components/core/cluster/index.ts +1 -0
  234. package/src/components/core/code-block/code-block.meta.yaml +30 -0
  235. package/src/components/core/code-block/code-block.tsx +93 -0
  236. package/src/components/core/code-block/index.ts +2 -0
  237. package/src/components/core/collapsible/collapsible.meta.yaml +34 -0
  238. package/src/components/core/collapsible/collapsible.tsx +54 -0
  239. package/src/components/core/collapsible/index.ts +1 -0
  240. package/src/components/core/colour-picker/colour-picker.meta.yaml +52 -0
  241. package/src/components/core/colour-picker/colour-picker.tsx +314 -0
  242. package/src/components/core/colour-picker/index.ts +4 -0
  243. package/src/components/core/combobox/combobox.meta.yaml +75 -0
  244. package/src/components/core/combobox/combobox.tsx +288 -0
  245. package/src/components/core/combobox/index.ts +2 -0
  246. package/src/components/core/detail/detail.meta.yaml +13 -0
  247. package/src/components/core/detail/detail.tsx +73 -0
  248. package/src/components/core/detail/index.ts +1 -0
  249. package/src/components/core/dialog/dialog.meta.yaml +95 -0
  250. package/src/components/core/dialog/dialog.tsx +254 -0
  251. package/src/components/core/dialog/drag.ts +40 -0
  252. package/src/components/core/dialog/index.ts +25 -0
  253. package/src/components/core/drop-zone/drop-zone.meta.yaml +55 -0
  254. package/src/components/core/drop-zone/drop-zone.tsx +146 -0
  255. package/src/components/core/drop-zone/index.ts +2 -0
  256. package/src/components/core/dropdown-menu/dropdown-menu.meta.yaml +118 -0
  257. package/src/components/core/dropdown-menu/dropdown-menu.tsx +407 -0
  258. package/src/components/core/dropdown-menu/index.ts +32 -0
  259. package/src/components/core/editable-field/editable-field.meta.yaml +120 -0
  260. package/src/components/core/editable-field/editable-field.tsx +346 -0
  261. package/src/components/core/editable-field/index.ts +2 -0
  262. package/src/components/core/empty-state/empty-state.meta.yaml +21 -0
  263. package/src/components/core/empty-state/empty-state.tsx +42 -0
  264. package/src/components/core/empty-state/index.ts +2 -0
  265. package/src/components/core/field/field.meta.yaml +37 -0
  266. package/src/components/core/field/field.tsx +100 -0
  267. package/src/components/core/field/index.ts +9 -0
  268. package/src/components/core/icon/curated-names.json +107 -0
  269. package/src/components/core/icon/icon-sets.ts +109 -0
  270. package/src/components/core/icon/icon.meta.yaml +30 -0
  271. package/src/components/core/icon/icon.tsx +93 -0
  272. package/src/components/core/icon/index.ts +2 -0
  273. package/src/components/core/input/index.ts +4 -0
  274. package/src/components/core/input/input.meta.yaml +98 -0
  275. package/src/components/core/input/input.tsx +133 -0
  276. package/src/components/core/input/textarea.meta.yaml +79 -0
  277. package/src/components/core/input/textarea.tsx +63 -0
  278. package/src/components/core/kbd/index.ts +2 -0
  279. package/src/components/core/kbd/kbd.meta.yaml +12 -0
  280. package/src/components/core/kbd/kbd.tsx +29 -0
  281. package/src/components/core/label/index.ts +2 -0
  282. package/src/components/core/label/label.meta.yaml +55 -0
  283. package/src/components/core/label/label.tsx +72 -0
  284. package/src/components/core/main-content/index.ts +2 -0
  285. package/src/components/core/main-content/main-content.meta.yaml +23 -0
  286. package/src/components/core/main-content/main-content.tsx +49 -0
  287. package/src/components/core/pane/index.ts +1 -0
  288. package/src/components/core/pane/pane.meta.yaml +13 -0
  289. package/src/components/core/pane/pane.tsx +64 -0
  290. package/src/components/core/pick-menu/index.ts +4 -0
  291. package/src/components/core/pick-menu/pick-menu.meta.yaml +36 -0
  292. package/src/components/core/pick-menu/pick-menu.tsx +348 -0
  293. package/src/components/core/pick-menu/tag-menu.meta.yaml +7 -0
  294. package/src/components/core/pick-menu/tag-menu.tsx +79 -0
  295. package/src/components/core/popover/index.ts +2 -0
  296. package/src/components/core/popover/popover.meta.yaml +16 -0
  297. package/src/components/core/popover/popover.tsx +66 -0
  298. package/src/components/core/progress/index.ts +2 -0
  299. package/src/components/core/progress/progress.meta.yaml +47 -0
  300. package/src/components/core/progress/progress.tsx +56 -0
  301. package/src/components/core/resizable/index.ts +13 -0
  302. package/src/components/core/resizable/resizable.meta.yaml +110 -0
  303. package/src/components/core/resizable/resizable.tsx +125 -0
  304. package/src/components/core/resizable/use-remembered-layout.ts +261 -0
  305. package/src/components/core/screen-link/index.ts +2 -0
  306. package/src/components/core/screen-link/screen-link.meta.yaml +34 -0
  307. package/src/components/core/screen-link/screen-link.tsx +100 -0
  308. package/src/components/core/scroll-area/index.ts +2 -0
  309. package/src/components/core/scroll-area/scroll-area.meta.yaml +72 -0
  310. package/src/components/core/scroll-area/scroll-area.tsx +95 -0
  311. package/src/components/core/scroll-area/steps.tsx +72 -0
  312. package/src/components/core/section/index.ts +2 -0
  313. package/src/components/core/section/section.meta.yaml +72 -0
  314. package/src/components/core/section/section.tsx +93 -0
  315. package/src/components/core/segment-group/index.ts +2 -0
  316. package/src/components/core/segment-group/segment-group.meta.yaml +71 -0
  317. package/src/components/core/segment-group/segment-group.tsx +166 -0
  318. package/src/components/core/select/index.ts +20 -0
  319. package/src/components/core/select/select.meta.yaml +48 -0
  320. package/src/components/core/select/select.tsx +226 -0
  321. package/src/components/core/skeleton/index.ts +2 -0
  322. package/src/components/core/skeleton/skeleton.meta.yaml +50 -0
  323. package/src/components/core/skeleton/skeleton.tsx +71 -0
  324. package/src/components/core/slider/index.ts +2 -0
  325. package/src/components/core/slider/slider.meta.yaml +55 -0
  326. package/src/components/core/slider/slider.tsx +46 -0
  327. package/src/components/core/sortable/index.ts +16 -0
  328. package/src/components/core/sortable/sortable.meta.yaml +125 -0
  329. package/src/components/core/sortable/sortable.tsx +471 -0
  330. package/src/components/core/split-view/index.ts +2 -0
  331. package/src/components/core/split-view/split-view.meta.yaml +85 -0
  332. package/src/components/core/split-view/split-view.tsx +193 -0
  333. package/src/components/core/status-icon/index.ts +2 -0
  334. package/src/components/core/status-icon/status-icon.meta.yaml +64 -0
  335. package/src/components/core/status-icon/status-icon.tsx +94 -0
  336. package/src/components/core/table/collapsible-rows.tsx +30 -0
  337. package/src/components/core/table/expand-toggle.tsx +58 -0
  338. package/src/components/core/table/group-header.tsx +35 -0
  339. package/src/components/core/table/index.ts +26 -0
  340. package/src/components/core/table/table.meta.yaml +67 -0
  341. package/src/components/core/table/table.tsx +166 -0
  342. package/src/components/core/tabs/index.ts +2 -0
  343. package/src/components/core/tabs/tabs.meta.yaml +57 -0
  344. package/src/components/core/tabs/tabs.tsx +74 -0
  345. package/src/components/core/tag-pill/index.ts +2 -0
  346. package/src/components/core/tag-pill/tag-pill.meta.yaml +19 -0
  347. package/src/components/core/tag-pill/tag-pill.tsx +102 -0
  348. package/src/components/core/thumbnail/index.ts +2 -0
  349. package/src/components/core/thumbnail/thumbnail.meta.yaml +59 -0
  350. package/src/components/core/thumbnail/thumbnail.tsx +162 -0
  351. package/src/components/core/toast/index.ts +12 -0
  352. package/src/components/core/toast/toast.meta.yaml +93 -0
  353. package/src/components/core/toast/toast.tsx +763 -0
  354. package/src/components/core/toggle/index.ts +2 -0
  355. package/src/components/core/toggle/toggle.meta.yaml +53 -0
  356. package/src/components/core/toggle/toggle.tsx +44 -0
  357. package/src/components/core/toggle-group/index.ts +2 -0
  358. package/src/components/core/toggle-group/toggle-group.meta.yaml +59 -0
  359. package/src/components/core/toggle-group/toggle-group.tsx +68 -0
  360. package/src/components/core/tooltip/index.ts +7 -0
  361. package/src/components/core/tooltip/tooltip.meta.yaml +93 -0
  362. package/src/components/core/tooltip/tooltip.tsx +198 -0
  363. package/src/components/layout/multi-pane/index.ts +4 -0
  364. package/src/components/layout/multi-pane/list-detail.tsx +45 -0
  365. package/src/components/layout/multi-pane/multi-pane.meta.yaml +67 -0
  366. package/src/components/layout/multi-pane/multi-pane.tsx +158 -0
  367. package/src/components/layout/single-pane/index.ts +2 -0
  368. package/src/components/layout/single-pane/single-pane.meta.yaml +35 -0
  369. package/src/components/layout/single-pane/single-pane.tsx +48 -0
  370. package/src/components/shell/app-shell/app-shell.meta.yaml +65 -0
  371. package/src/components/shell/app-shell/app-shell.tsx +61 -0
  372. package/src/components/shell/app-shell/index.ts +2 -0
  373. package/src/components/shell/sidebar/index.ts +35 -0
  374. package/src/components/shell/sidebar/sidebar-group.tsx +254 -0
  375. package/src/components/shell/sidebar/sidebar-item.tsx +88 -0
  376. package/src/components/shell/sidebar/sidebar-resize-handle.tsx +101 -0
  377. package/src/components/shell/sidebar/sidebar-tree.tsx +325 -0
  378. package/src/components/shell/sidebar/sidebar.meta.yaml +126 -0
  379. package/src/components/shell/sidebar/sidebar.tsx +142 -0
  380. package/src/components/template/address-book-template/address-book-template.meta.yaml +22 -0
  381. package/src/components/template/address-book-template/address-book-template.tsx +201 -0
  382. package/src/components/template/address-book-template/index.ts +2 -0
  383. package/src/components/template/mail-template/index.ts +2 -0
  384. package/src/components/template/mail-template/mail-template.meta.yaml +22 -0
  385. package/src/components/template/mail-template/mail-template.tsx +731 -0
  386. package/src/components/template/use-narrow.ts +18 -0
  387. package/src/index.ts +505 -0
  388. package/src/kit/check-rendering.tsx +130 -0
  389. package/src/kit/kit.tsx +177 -0
  390. package/src/lib/clipboard.ts +27 -0
  391. package/src/lib/dates.ts +13 -0
  392. package/src/lib/json.ts +59 -0
  393. package/src/lib/keys.ts +54 -0
  394. package/src/lib/utils.ts +12 -0
  395. package/src/lib/view-scope.tsx +60 -0
  396. package/src/profile/profile.ts +238 -0
  397. package/src/theme/appearance.ts +198 -0
  398. package/src/theme/boot.ts +6 -0
  399. package/src/theme/client-appearance-react.ts +14 -0
  400. package/src/theme/client-appearance.ts +284 -0
  401. package/src/theme/generate-tokens.ts +658 -0
  402. package/src/theme/pack-themes-react.ts +107 -0
  403. package/src/theme/palette.ts +301 -0
  404. package/src/theme/semantic-mapping.ts +165 -0
  405. package/src/theme/set-theme.ts +162 -0
  406. package/src/theme/theme-colours.ts +60 -0
  407. package/src/theme/theme-css.ts +15 -0
  408. package/src/theme/themes.ts +133 -0
  409. package/src/theme/wallpaper-sheet.ts +58 -0
  410. package/src/theme/wallpaper-theme-react.ts +60 -0
  411. package/src/theme/wallpaper-theme.ts +231 -0
@@ -0,0 +1,2 @@
1
+ export { Picker } from "./picker";
2
+ export type { PickerProps } from "./picker";
@@ -0,0 +1,103 @@
1
+ name: Picker
2
+ description: "Linear-style property menu for detail cards: a property pill (icon + label) that opens a keyboard-first menu with a search row and the options (icon, label, check, number hint). Base UI Combobox with the input inside the popup; the same data model as Combobox."
3
+ layer: composite
4
+ category: input
5
+ when_to_use:
6
+ - "For one property of a record on a detail card (status, owner, organization), edited inline"
7
+ - "For a local list or one searched on the server as the user types (filter={null})"
8
+ when_not_to_use:
9
+ - "In a form, Settings or a composer — use Select (short list) or Combobox (long or server-searched list)"
10
+ - "For several values (labels) — use TagInput; Picker is single-value"
11
+ - "For a 'create new …' option — not offered"
12
+ composition_partners:
13
+ - Icon or Avatar (itemIcon)
14
+ props:
15
+ - name: value / onValueChange
16
+ type: "Item | null / (item: Item) => void | Promise<unknown>"
17
+ required: true
18
+ description: "Controlled selection, matched by itemToKey. Escape or a click outside never picks. When onValueChange returns a promise (an async save), the picked label shows until value changes or the promise settles (a failure reverts to value)"
19
+ - name: items
20
+ type: "readonly Item[]"
21
+ required: true
22
+ description: "What the popup offers now. 5 or fewer local items: no search row (the list takes the focus)"
23
+ - name: itemToString / itemToKey
24
+ type: "(item: Item) => string"
25
+ required: true
26
+ description: "The item's label (trigger, default filter) and its identity (selected check, keys)"
27
+ - name: itemIcon
28
+ type: "(item: Item) => ReactNode"
29
+ required: false
30
+ description: "The leading icon, on the trigger and on each option (an option whose icon is null keeps an icon-sized gap). The property pill and the options mute currentColor icons (text-muted); coloured marks (Avatar, StatusIcon) set their own colours"
31
+ - name: renderItem
32
+ type: "(item: Item) => ReactNode"
33
+ required: false
34
+ description: "An option's row content; defaults to its label"
35
+ - name: onInputChange
36
+ type: "(text: string) => void"
37
+ required: false
38
+ description: "The text the user types in the search, and '' once the popup has closed: the caller fetches here"
39
+ - name: onOpenChange
40
+ type: "(open: boolean) => void"
41
+ required: false
42
+ description: "The popup opened or closed, e.g. to retry a failed load on open"
43
+ - name: filter
44
+ type: "null"
45
+ required: false
46
+ description: "null shows items unfiltered (server-searched; the search row always shows); by default 'contains', any case and accent"
47
+ - name: loading / emptyText
48
+ type: "boolean / ReactNode"
49
+ required: false
50
+ default: "false / 'No results'"
51
+ description: "Shown while the list is empty: 'Loading…' while loading, else emptyText (also for a fetch error)"
52
+ - name: searchPlaceholder / placeholder
53
+ type: "string / string"
54
+ required: false
55
+ default: "'Search…' / 'None'"
56
+ description: "The search input's placeholder (e.g. 'Change status…'; the input is labelled 'Search <aria-label>'); the trigger's muted text while value is null"
57
+ - name: size
58
+ type: "'sm' | 'default'"
59
+ required: false
60
+ default: "'default'"
61
+ description: "The property button heights (h-sm, h-md)"
62
+ - name: shape
63
+ type: "'default' | 'round'"
64
+ required: false
65
+ default: "'default'"
66
+ description: "The trigger's corner: the kit's rounded-default pill, or a round (rounded-full) one, which overrides the button's rounded-default"
67
+ - name: disabled / readOnly / aria-label / className
68
+ type: "boolean / boolean / string / string"
69
+ required: false
70
+ description: "aria-label names the property: the trigger is announced with its value ('Organization: Northwind'). readOnly (aria-readonly) shows the value without opening or hover; disabled dims and leaves the tab order; either one closes an open popup. className goes on the trigger"
71
+ examples:
72
+ - title: "Status on a detail card"
73
+ code: |
74
+ <Picker
75
+ aria-label="Status"
76
+ value={status}
77
+ onValueChange={(next) => save({ status: next.id })}
78
+ items={statuses}
79
+ itemToString={(s) => s.name}
80
+ itemToKey={(s) => s.id}
81
+ itemIcon={(s) => <Icon name={s.icon} />}
82
+ searchPlaceholder="Change status…"
83
+ />
84
+ - title: "Server-searched organization"
85
+ code: |
86
+ <Picker
87
+ aria-label="Organization"
88
+ size="sm"
89
+ value={current}
90
+ placeholder="None"
91
+ onValueChange={(org) => save(org.id)}
92
+ items={[none, ...items]}
93
+ itemToString={(org) => org.name}
94
+ itemToKey={(org) => org.id}
95
+ itemIcon={() => <Icon name="building" />}
96
+ onInputChange={setQuery}
97
+ filter={null}
98
+ loading={loading}
99
+ emptyText={error ? "Organizations could not be loaded" : "No organizations"}
100
+ searchPlaceholder="Change organization…"
101
+ />
102
+ notes: "Number keys, local items only (not with filter={null}: a server list changes as one types and a search may start with a digit): while the popup shows 10 options or fewer and the search is empty, 1–9 then 0 pick the 1st–10th option, and each row shows its hint; otherwise digits type into the search. Keys match by position (event.code Digit0–9, Numpad0–9), so the AZERTY top row works; never while composing (IME) or with Ctrl, Meta or Alt. A printable key on the closed pill opens the popup and types into its search (when it has one) instead of Base UI's typeahead, so it never picks; read-only or disabled, nothing happens. Whether the popup has a search row is decided when it opens. Picking closes and returns the focus to the trigger; Escape or a click outside closes without a change and the search is empty on the next open. Not built: a global shortcut that opens the menu (Linear's 'S'), which needs a kernel keyboard-shortcut system; multi-select; a 'create new …' option."
103
+ accessibility_notes: "Base UI combobox semantics with the input inside the popup: the trigger is role=combobox (aria-haspopup=dialog), the popup a dialog holding the search input and a listbox (aria-activedescendant); ↑↓ Home End move, Enter picks, Escape closes, Tab leaves. The number hints are aria-hidden. Label it with aria-label or a surrounding FieldLabel."
@@ -0,0 +1,276 @@
1
+ import * as React from "react";
2
+ import { Combobox as ComboboxPrimitive } from "@base-ui/react/combobox";
3
+ import { CSPProvider } from "@base-ui/react/csp-provider";
4
+
5
+ import { cn } from "../../../lib/utils";
6
+ import { buttonVariants } from "../../core/button/button";
7
+ import { ComboboxOptions, usePendingPick } from "../../core/combobox/combobox";
8
+ import { ScrollArea } from "../../core/scroll-area";
9
+ import { isComposing } from "../../../lib/keys";
10
+
11
+ // Bridge: a Linear-style property menu for detail cards, on Base UI's Combobox with the input inside the popup
12
+ // (`Trigger` = a `property` pill, `Input` in `Popup`). The same data model as `Combobox` (controlled value, caller-owned
13
+ // `items`, `filter={null}` for server search, the async pending pick) and its shared options list. Keyboard-first:
14
+ // with 10 options or fewer and no search text, 1–9 then 0 pick. A short local list (5 or fewer) has no search row: the
15
+ // list itself takes the focus, so ↑↓ Enter keep working.
16
+
17
+ interface PickerProps<Item> {
18
+ /** The selected item, or `null` (the trigger shows `placeholder`). */
19
+ value: Item | null;
20
+ /** Called with the picked item. The picked label shows until `value` changes or the returned promise settles (a
21
+ * failed save: back to `value`). */
22
+ onValueChange: (item: Item) => void | Promise<unknown>;
23
+ /** What the popup offers now. */
24
+ items: readonly Item[];
25
+ /** The item's label, shown on the trigger and matched by the default filter. */
26
+ itemToString: (item: Item) => string;
27
+ /** The item's identity, for the selected check and React keys. */
28
+ itemToKey: (item: Item) => string;
29
+ /** An option's row content; defaults to its label. */
30
+ renderItem?: (item: Item) => React.ReactNode;
31
+ /** The leading icon, on the trigger and on each option. */
32
+ itemIcon?: (item: Item) => React.ReactNode;
33
+ /** Called with the text the user types in the search, and with "" once the popup has closed. */
34
+ onInputChange?: (text: string) => void;
35
+ /** Called when the popup opens or closes (e.g. to retry a failed load on open). */
36
+ onOpenChange?: (open: boolean) => void;
37
+ /** `null` shows `items` as they are (the caller filters, e.g. on the server); by default `contains`, any case and accent. */
38
+ filter?: null;
39
+ /** While nothing is shown, "Loading…" instead of `emptyText`. */
40
+ loading?: boolean;
41
+ /** Shown when no item matches. Defaults to "No results". */
42
+ emptyText?: React.ReactNode;
43
+ /** The search input's placeholder, e.g. "Change status…". Defaults to "Search…". */
44
+ searchPlaceholder?: string;
45
+ /** Shown (muted) on the trigger while `value` is `null`. Defaults to "None". */
46
+ placeholder?: string;
47
+ disabled?: boolean;
48
+ readOnly?: boolean;
49
+ /** The `property` button heights. Defaults to `default`. */
50
+ size?: "sm" | "default";
51
+ /** The trigger's corner: the kit's `rounded-default` pill, or a `round` (rounded-full) one. */
52
+ shape?: "default" | "round";
53
+ "aria-label"?: string;
54
+ /** On the trigger. */
55
+ className?: string;
56
+ }
57
+
58
+ const DIGITS = 10;
59
+ const SEARCHLESS = 5;
60
+
61
+ function Picker<Item>({
62
+ value,
63
+ onValueChange,
64
+ items,
65
+ itemToString,
66
+ itemToKey,
67
+ renderItem,
68
+ itemIcon,
69
+ onInputChange,
70
+ onOpenChange,
71
+ filter,
72
+ loading = false,
73
+ emptyText = "No results",
74
+ searchPlaceholder = "Search…",
75
+ placeholder = "None",
76
+ disabled,
77
+ readOnly,
78
+ size = "default",
79
+ shape = "default",
80
+ "aria-label": ariaLabel,
81
+ className,
82
+ }: PickerProps<Item>) {
83
+ const { shown, onPick } = usePendingPick(value, itemToKey, onValueChange);
84
+ const [open, setOpen] = React.useState(false);
85
+ const [text, setText] = React.useState("");
86
+ const list = React.useRef<HTMLDivElement>(null);
87
+ // Whether the popup has a search row: decided at open, so the list changing under the user keeps the focus in place.
88
+ const wantsSearch = filter === null || items.length > SEARCHLESS;
89
+ const [searchable, setSearchable] = React.useState(wantsSearch);
90
+ // Digits pick local items only: a server-searched list changes as one types, and a search may start with a digit
91
+ // ("3M"). With no search text, the popup shows `items` as given (the default filter keeps them all).
92
+ const digits = filter !== null && text === "" && items.length <= DIGITS;
93
+ const locked = Boolean(readOnly || disabled);
94
+ const toggle = (next: boolean) => {
95
+ if (next) setSearchable(wantsSearch);
96
+ setOpen(next);
97
+ onOpenChange?.(next);
98
+ };
99
+ // Made read-only or disabled while open: close (Base UI no longer dismisses then).
100
+ React.useEffect(() => {
101
+ if (locked && open) toggle(false);
102
+ // Run when the read-only or disabled state changes only.
103
+ }, [locked]);
104
+ const icon = (item: Item, spacer: boolean) => {
105
+ if (!itemIcon) return null;
106
+ const node = itemIcon(item);
107
+ // An option without an icon keeps the column aligned.
108
+ if (node == null)
109
+ return spacer ? <span aria-hidden="true" className="size-4 shrink-0" /> : null;
110
+ return (
111
+ <span data-slot="picker-icon" className="flex shrink-0 items-center text-muted">
112
+ {node}
113
+ </span>
114
+ );
115
+ };
116
+ const label = shown === null ? placeholder : itemToString(shown);
117
+ return (
118
+ <ComboboxPrimitive.Root<Item>
119
+ items={items}
120
+ value={shown}
121
+ onValueChange={onPick}
122
+ open={open}
123
+ onOpenChange={toggle}
124
+ onOpenChangeComplete={(next) => {
125
+ if (next) return;
126
+ setText("");
127
+ onInputChange?.("");
128
+ }}
129
+ inputValue={text}
130
+ onInputValueChange={(next, details) => {
131
+ // Typing reaches the caller, and Base UI's clears of the search (on close, or on a reopen before that).
132
+ setText(next);
133
+ if (details.reason === "input-change") onInputChange?.(next);
134
+ else if (details.reason === "input-clear") onInputChange?.("");
135
+ }}
136
+ itemToStringLabel={itemToString}
137
+ itemToStringValue={itemToKey}
138
+ isItemEqualToValue={(a, b) => itemToKey(a) === itemToKey(b)}
139
+ {...(filter === null && { filter: null })}
140
+ disabled={disabled}
141
+ readOnly={readOnly}
142
+ >
143
+ <ComboboxPrimitive.Trigger
144
+ data-slot="picker"
145
+ // The property and its value, e.g. "Organization: Northwind".
146
+ aria-label={ariaLabel === undefined ? undefined : `${ariaLabel}: ${label}`}
147
+ aria-readonly={readOnly || undefined}
148
+ onKeyDown={(event) => {
149
+ // A printable key on the closed pill: never Base UI's typeahead (it would pick, e.g. None); it opens the
150
+ // popup instead, typed into its search when it has one.
151
+ if (
152
+ open ||
153
+ event.key.length !== 1 ||
154
+ event.key === " " ||
155
+ event.altKey ||
156
+ event.ctrlKey ||
157
+ event.metaKey
158
+ )
159
+ return;
160
+ event.preventBaseUIHandler();
161
+ event.preventDefault();
162
+ if (locked) return;
163
+ toggle(true);
164
+ if (wantsSearch) {
165
+ setText(event.key);
166
+ onInputChange?.(event.key);
167
+ }
168
+ }}
169
+ className={cn(
170
+ buttonVariants({ variant: "property", size }),
171
+ "max-w-full justify-start",
172
+ shape === "round" && "rounded-full",
173
+ readOnly && "cursor-default hover:bg-surface hover:text-secondary",
174
+ className,
175
+ )}
176
+ >
177
+ {shown === null ? (
178
+ <span data-slot="picker-value" className="min-w-0 truncate text-muted">
179
+ {placeholder}
180
+ </span>
181
+ ) : (
182
+ <>
183
+ {icon(shown, false)}
184
+ <span data-slot="picker-value" className="min-w-0 truncate">
185
+ {label}
186
+ </span>
187
+ </>
188
+ )}
189
+ </ComboboxPrimitive.Trigger>
190
+ {/* The page's CSP refuses inline <style>, as in SelectContent. */}
191
+ <CSPProvider disableStyleElements>
192
+ <ComboboxPrimitive.Portal>
193
+ <ComboboxPrimitive.Positioner sideOffset={4} align="start" className="z-50">
194
+ <ComboboxPrimitive.Popup
195
+ data-slot="picker-content"
196
+ // Without a search row, the list takes the focus: its own keys move, Enter picks, Escape closes.
197
+ initialFocus={searchable ? undefined : list}
198
+ onKeyDown={(event) => {
199
+ // By key position (`code`), so the AZERTY top row works; never while composing (IME).
200
+ const digit = /^(?:Digit|Numpad)([0-9])$/.exec(event.code)?.[1];
201
+ if (
202
+ !digits ||
203
+ locked ||
204
+ digit === undefined ||
205
+ event.altKey ||
206
+ event.ctrlKey ||
207
+ event.metaKey
208
+ )
209
+ return;
210
+ if (isComposing(event)) return;
211
+ event.preventDefault();
212
+ const item = items[(Number(digit) + 9) % 10];
213
+ if (item === undefined) return;
214
+ // Closed first: a throwing onValueChange leaves no popup open.
215
+ toggle(false);
216
+ onPick(item);
217
+ }}
218
+ className="z-50 flex min-w-[max(14rem,var(--anchor-width))] max-h-[min(var(--available-height),20rem)] flex-col bg-surface rounded-dropdown outline-none"
219
+ style={{ boxShadow: "var(--shadow-dropdown)" }}
220
+ >
221
+ {searchable && (
222
+ <>
223
+ <ComboboxPrimitive.Input
224
+ data-slot="picker-search"
225
+ aria-label={ariaLabel === undefined ? "Search" : `Search ${ariaLabel}`}
226
+ placeholder={searchPlaceholder}
227
+ // A key typed on the closed pill seeds the search: the caret goes after it.
228
+ onFocus={(event) => {
229
+ const end = event.currentTarget.value.length;
230
+ event.currentTarget.setSelectionRange(end, end);
231
+ }}
232
+ className="h-lg shrink-0 bg-transparent px-3 text-sm text-foreground outline-hidden placeholder:text-placeholder"
233
+ />
234
+ <ComboboxPrimitive.Separator
235
+ data-slot="picker-separator"
236
+ className="h-px shrink-0 bg-border"
237
+ />
238
+ </>
239
+ )}
240
+ <ScrollArea className="flex min-h-0 flex-col" viewportClassName="min-h-0 flex-1">
241
+ <div className="p-1">
242
+ <ComboboxOptions
243
+ slot="picker"
244
+ itemToString={itemToString}
245
+ itemToKey={itemToKey}
246
+ renderItem={renderItem}
247
+ loading={loading}
248
+ emptyText={emptyText}
249
+ leading={(item) => icon(item, true)}
250
+ trailing={
251
+ digits
252
+ ? (_item, index) => (
253
+ <span
254
+ data-slot="picker-hint"
255
+ aria-hidden="true"
256
+ className="w-3 shrink-0 text-right text-xs text-muted tabular-nums"
257
+ >
258
+ {(index + 1) % 10}
259
+ </span>
260
+ )
261
+ : undefined
262
+ }
263
+ listRef={list}
264
+ />
265
+ </div>
266
+ </ScrollArea>
267
+ </ComboboxPrimitive.Popup>
268
+ </ComboboxPrimitive.Positioner>
269
+ </ComboboxPrimitive.Portal>
270
+ </CSPProvider>
271
+ </ComboboxPrimitive.Root>
272
+ );
273
+ }
274
+
275
+ export { Picker };
276
+ export type { PickerProps };
@@ -0,0 +1,2 @@
1
+ export { PromptField } from "./prompt-field";
2
+ export type { PromptFieldProps } from "./prompt-field";
@@ -0,0 +1,60 @@
1
+ name: PromptField
2
+ description: "A message field and its Send button: an auto-growing Textarea, Enter sends, Shift+Enter adds a new line."
3
+ layer: composite
4
+ category: input
5
+ when_to_use:
6
+ - "For a message sent to an agent or a session (a chat prompt, a reply)"
7
+ when_not_to_use:
8
+ - "For a multiline field in a form — use Textarea"
9
+ - "For a single-line value — use Input"
10
+ composition_partners:
11
+ - Textarea (the field inside)
12
+ - Button (the Send inside)
13
+ props:
14
+ - name: value
15
+ type: string
16
+ required: true
17
+ description: "The message"
18
+ - name: onValueChange
19
+ type: "(value: string) => void"
20
+ required: true
21
+ description: "The text changed (typing, a recall)"
22
+ - name: onSubmit
23
+ type: "() => void"
24
+ required: true
25
+ description: "Enter, or Send: the value is to be sent"
26
+ - name: disabled
27
+ type: boolean
28
+ required: false
29
+ description: "Turns the field and Send off"
30
+ - name: placeholder
31
+ type: string
32
+ required: false
33
+ description: "Placeholder text shown when empty"
34
+ - name: aria-label
35
+ type: string
36
+ required: false
37
+ default: "'Message'"
38
+ description: "The field's accessible name"
39
+ - name: textareaRef
40
+ type: "React.Ref<HTMLTextAreaElement>"
41
+ required: false
42
+ description: "The Textarea inside, to focus it"
43
+ - name: className
44
+ type: string
45
+ required: false
46
+ description: "Additional CSS classes on the frame"
47
+ props_priority:
48
+ - value
49
+ - onValueChange
50
+ - onSubmit
51
+ - disabled
52
+ examples:
53
+ - title: "A chat prompt"
54
+ code: |
55
+ const [text, setText] = useState("");
56
+
57
+ <PromptField value={text} onValueChange={setText} onSubmit={() => send(text)} placeholder="Ask anything" />
58
+ anti_patterns:
59
+ - "Don't build a Textarea and a Send Button by hand for a message — use PromptField"
60
+ accessibility_notes: "Enter while composing (input method) is left to the input method. Send has aria-label='Send' and is disabled while the value is blank."
@@ -0,0 +1,81 @@
1
+ import * as React from "react";
2
+
3
+ import { cn } from "../../../lib/utils";
4
+ import { Button } from "../../core/button";
5
+ import { Icon } from "../../core/icon";
6
+ import { Textarea } from "../../core/input";
7
+ import { ScrollArea } from "../../core/scroll-area";
8
+ import { isComposing } from "../../../lib/keys";
9
+
10
+ interface PromptFieldProps {
11
+ value: string;
12
+ /** The text changed (typing, a recall). */
13
+ onValueChange: (value: string) => void;
14
+ /** Enter, or Send: the value to send. */
15
+ onSubmit: () => void;
16
+ disabled?: boolean;
17
+ placeholder?: string;
18
+ "aria-label"?: string;
19
+ className?: string;
20
+ textareaRef?: React.Ref<HTMLTextAreaElement>;
21
+ }
22
+
23
+ /** A message field and its Send: Enter submits (Shift+Enter a newline, Enter while composing is the input
24
+ * method's), Send is off while disabled or the value is blank. */
25
+ function PromptField({
26
+ value,
27
+ onValueChange,
28
+ onSubmit,
29
+ disabled,
30
+ placeholder,
31
+ "aria-label": label = "Message",
32
+ className,
33
+ textareaRef,
34
+ }: PromptFieldProps) {
35
+ const empty = !value.trim();
36
+ return (
37
+ <div
38
+ data-slot="prompt-field"
39
+ className={cn(
40
+ "box-border flex w-full flex-col gap-2 rounded-2xl border border-border bg-surface px-3 pt-2.5 pb-2 shadow-[0_4px_16px_rgb(0_0_0/0.06)]",
41
+ className,
42
+ )}
43
+ >
44
+ {/* Grown with its text, it scrolls past 240px in the kit's ScrollArea (Bridge's scrollbar, not the OS's). */}
45
+ <ScrollArea className="flex max-h-60 min-h-0 flex-col" viewportClassName="min-h-0 flex-1">
46
+ <Textarea
47
+ ref={textareaRef}
48
+ aria-label={label}
49
+ rows={1}
50
+ value={value}
51
+ placeholder={placeholder}
52
+ disabled={disabled}
53
+ className="mx-0 min-h-6 overflow-hidden px-1 text-sm leading-6 hover:bg-transparent"
54
+ onChange={(event) => onValueChange(event.currentTarget.value)}
55
+ onKeyDown={(event) => {
56
+ if (event.key === "Enter" && !event.shiftKey && !isComposing(event)) {
57
+ event.preventDefault();
58
+ onSubmit();
59
+ }
60
+ }}
61
+ />
62
+ </ScrollArea>
63
+ <div className="flex justify-end">
64
+ <Button
65
+ type="button"
66
+ variant="primary"
67
+ size="icon"
68
+ aria-label="Send"
69
+ className="rounded-full"
70
+ disabled={disabled || empty}
71
+ onClick={onSubmit}
72
+ >
73
+ <Icon name="arrow-up" size={16} strokeWidth={2.25} />
74
+ </Button>
75
+ </div>
76
+ </div>
77
+ );
78
+ }
79
+
80
+ export { PromptField };
81
+ export type { PromptFieldProps };
@@ -0,0 +1,9 @@
1
+ export {
2
+ Properties,
3
+ propertiesVariants,
4
+ PropertyRow,
5
+ propertyRowVariants,
6
+ PropertyPlaceholder,
7
+ PropertyGrid,
8
+ } from "./properties";
9
+ export type { PropertiesProps, PropertyRowProps } from "./properties";
@@ -0,0 +1,56 @@
1
+ name: Properties
2
+ description: "Key-value detail panel with fixed-width labels for displaying entity attributes in detail views."
3
+ layer: composite
4
+ category: data-display
5
+ when_to_use:
6
+ - "For displaying entity details (issue properties, user profiles, settings)"
7
+ - "For key-value pairs in side panels or detail views"
8
+ - "For property rows with interactive value controls (buttons, toggles)"
9
+ when_not_to_use:
10
+ - "For tabular data with multiple rows of the same structure — use Table"
11
+ - "For forms with input fields — use form elements directly"
12
+ - "For simple text displays — use plain markup"
13
+ composition_partners:
14
+ - Button (variant='property' as value control)
15
+ - StatusIcon (as property value)
16
+ - Label (as property value)
17
+ - Avatar (as property value)
18
+ - Toggle (as property value)
19
+ props:
20
+ - name: label
21
+ type: string
22
+ required: true
23
+ description: "Property label text (e.g. 'Status', 'Priority'). Displayed in a fixed 90px-wide column."
24
+ - name: children
25
+ type: React.ReactNode
26
+ required: false
27
+ description: "Property value content — can be text, buttons, or any React element"
28
+ props_priority:
29
+ - label
30
+ - children
31
+ examples:
32
+ - title: "Basic properties panel"
33
+ code: |
34
+ <Properties>
35
+ <PropertyRow label="Status">
36
+ <Button variant="property" size="sm">
37
+ <StatusIcon status="in-progress" size="sm" />
38
+ In Progress
39
+ </Button>
40
+ </PropertyRow>
41
+ <PropertyRow label="Priority">
42
+ <Button variant="property" size="sm">High</Button>
43
+ </PropertyRow>
44
+ <PropertyRow label="Assignee">
45
+ <Avatar name="Jane Doe" size="sm" />
46
+ </PropertyRow>
47
+ </Properties>
48
+ anti_patterns:
49
+ - "Don't override the label width (90px) — it's designed for consistent alignment across all properties"
50
+ - "Don't use PropertyRow outside of Properties container — it relies on the parent flex layout"
51
+ - "Don't put complex multi-line content in PropertyRow — it's designed for single-line values"
52
+ accessibility_notes: "Renders as div elements. The label span has a title attribute for truncated text. For screen readers, the label-value association is implicit through DOM proximity."
53
+ notes: "Sub-components: Properties (container), PropertyRow (individual key-value row). PropertyRow renders a fixed 90px label column and a flex-1 value column."
54
+ related_patterns:
55
+ - detail-panel
56
+ - crud-page