prime-ui-kit 0.16.0 → 0.17.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 (315) hide show
  1. package/README.md +14 -18
  2. package/dist/chunks/{chunk-4PSQ64S4.js → chunk-7WWZYGRC.js} +3697 -3738
  3. package/dist/chunks/{chunk-6TPHKCUJ.js → chunk-A4WE3UNC.js} +27340 -26893
  4. package/dist/chunks/{chunk-A7OQWH6R.js → chunk-PRP4B6OG.js} +1 -1
  5. package/dist/chunks/{chunk-HDBQICPW.js → chunk-SVFWPLNW.js} +49 -20
  6. package/dist/color-picker.d.ts +1 -1
  7. package/dist/color-picker.js +3 -3
  8. package/dist/components/breadcrumb/Breadcrumb.d.ts +1 -1
  9. package/dist/components/chart-frame/ChartFrame.d.ts +1 -1
  10. package/dist/components/chat/ChatRows.d.ts +5 -1
  11. package/dist/components/color-picker/ColorPicker.d.ts +18 -1
  12. package/dist/components/data-table/DataTable.d.ts +1 -1
  13. package/dist/components/index.d.ts +0 -4
  14. package/dist/components/pagination/Pagination.d.ts +5 -1
  15. package/dist/components/popover/Popover.d.ts +1 -1
  16. package/dist/components/slider/Slider.d.ts +1 -1
  17. package/dist/components/smart-filter/SmartFilter.d.ts +4 -5
  18. package/dist/icon-set.js +2 -2
  19. package/dist/index.css +1 -1
  20. package/dist/index.js +5 -9
  21. package/dist/internal/barPlan.d.ts +44 -0
  22. package/dist/internal/overlay/FloatingPanel.d.ts +1 -1
  23. package/dist/internal/overlay/focus.d.ts +3 -2
  24. package/dist/internal/parts.d.ts +1 -1
  25. package/dist/internal/slot.d.ts +0 -30
  26. package/dist/layout/app-shell/AppShell.d.ts +19 -38
  27. package/dist/layout/index.d.ts +3 -3
  28. package/dist/layout/page/Page.d.ts +263 -0
  29. package/dist/layout/sidebar/Sidebar.d.ts +1 -1
  30. package/dist/skill/SKILL.md +10 -10
  31. package/dist/skill/anti-slop.md +101 -5
  32. package/dist/skill/api-contract.md +1 -1
  33. package/dist/skill/cheatsheet.md +27 -22
  34. package/dist/skill/checklist.md +7 -3
  35. package/dist/skill/choosing.md +9 -8
  36. package/dist/skill/components.md +3 -5
  37. package/dist/skill/composition.md +177 -152
  38. package/dist/skill/foundations.md +9 -9
  39. package/dist/skill/layouts.md +39 -98
  40. package/dist/skill/reference/components/avatar/COMPONENT.md +2 -2
  41. package/dist/skill/reference/components/avatar/examples/team-group.tsx +1 -1
  42. package/dist/skill/reference/components/banner/COMPONENT.md +4 -4
  43. package/dist/skill/reference/components/banner/examples/examples.module.css +6 -1
  44. package/dist/skill/reference/components/banner/examples/page-strip.tsx +24 -22
  45. package/dist/skill/reference/components/breadcrumb/COMPONENT.md +9 -8
  46. package/dist/skill/reference/components/button/COMPONENT.md +1 -0
  47. package/dist/skill/reference/components/button/examples/hold-to-confirm.tsx +1 -1
  48. package/dist/skill/reference/components/button/examples/on-colored-host.tsx +8 -8
  49. package/dist/skill/reference/components/card/COMPONENT.md +7 -7
  50. package/dist/skill/reference/components/card/examples/screen.module.css +1 -1
  51. package/dist/skill/reference/components/card/examples/screen.tsx +184 -198
  52. package/dist/skill/reference/components/chart-frame/COMPONENT.md +1 -1
  53. package/dist/skill/reference/components/chart-frame/examples/fill-height.tsx +9 -9
  54. package/dist/skill/reference/components/chat/COMPONENT.md +4 -4
  55. package/dist/skill/reference/components/chat/examples/screen.module.css +1 -1
  56. package/dist/skill/reference/components/chat/examples/screen.tsx +110 -117
  57. package/dist/skill/reference/components/chat-list/COMPONENT.md +2 -2
  58. package/dist/skill/reference/components/chat-list/examples/controlled.tsx +2 -2
  59. package/dist/skill/reference/components/chat-list/examples/examples.module.css +8 -0
  60. package/dist/skill/reference/components/checkbox/examples/examples.module.css +3 -2
  61. package/dist/skill/reference/components/code-block/COMPONENT.md +1 -1
  62. package/dist/skill/reference/components/code-block/examples/color-scheme.tsx +2 -4
  63. package/dist/skill/reference/components/code-block/examples/examples.module.css +0 -11
  64. package/dist/skill/reference/components/color-picker/COMPONENT.md +18 -7
  65. package/dist/skill/reference/components/color-picker/examples/examples.module.css +2 -5
  66. package/dist/skill/reference/components/color-picker/examples/overview.tsx +5 -10
  67. package/dist/skill/reference/components/color-picker/examples/sizes.tsx +4 -8
  68. package/dist/skill/reference/components/crossfade/COMPONENT.md +2 -2
  69. package/dist/skill/reference/components/crossfade/examples/screen.tsx +107 -112
  70. package/dist/skill/reference/components/data-table/COMPONENT.md +5 -5
  71. package/dist/skill/reference/components/data-table/examples/examples.module.css +9 -0
  72. package/dist/skill/reference/components/data-table/examples/screen.tsx +42 -52
  73. package/dist/skill/reference/components/data-table/examples/server.tsx +6 -2
  74. package/dist/skill/reference/components/datepicker/examples/examples.module.css +6 -0
  75. package/dist/skill/reference/components/datepicker/examples/inline-panel.tsx +3 -1
  76. package/dist/skill/reference/components/description-list/COMPONENT.md +1 -1
  77. package/dist/skill/reference/components/description-list/examples/screen.tsx +120 -127
  78. package/dist/skill/reference/components/digit-input/examples/grouped.tsx +4 -4
  79. package/dist/skill/reference/components/digit-input/examples/validation.tsx +1 -1
  80. package/dist/skill/reference/components/divider/COMPONENT.md +2 -2
  81. package/dist/skill/reference/components/divider/examples/examples.module.css +4 -1
  82. package/dist/skill/reference/components/divider/examples/vertical.tsx +22 -9
  83. package/dist/skill/reference/components/dnd/examples/examples.module.css +3 -1
  84. package/dist/skill/reference/components/drawer/COMPONENT.md +1 -1
  85. package/dist/skill/reference/components/drawer/examples/placement.tsx +26 -31
  86. package/dist/skill/reference/components/drawer/examples/screen.tsx +137 -160
  87. package/dist/skill/reference/components/dropdown/COMPONENT.md +1 -1
  88. package/dist/skill/reference/components/example-frame/COMPONENT.md +3 -3
  89. package/dist/skill/reference/components/field-list/examples/screen.module.css +1 -1
  90. package/dist/skill/reference/components/field-list/examples/screen.tsx +19 -19
  91. package/dist/skill/reference/components/fieldset/COMPONENT.md +1 -1
  92. package/dist/skill/reference/components/fieldset/examples/states.tsx +1 -1
  93. package/dist/skill/reference/components/file-upload/COMPONENT.md +1 -1
  94. package/dist/skill/reference/components/file-upload/examples/screen.module.css +2 -2
  95. package/dist/skill/reference/components/file-upload/examples/screen.tsx +65 -81
  96. package/dist/skill/reference/components/gallery/COMPONENT.md +1 -0
  97. package/dist/skill/reference/components/gantt/COMPONENT.md +1 -1
  98. package/dist/skill/reference/components/gantt/examples/screen.module.css +1 -1
  99. package/dist/skill/reference/components/gantt/examples/screen.tsx +55 -73
  100. package/dist/skill/reference/components/hint/examples/examples.module.css +10 -1
  101. package/dist/skill/reference/components/hint/examples/overview.tsx +1 -1
  102. package/dist/skill/reference/components/kanban/COMPONENT.md +1 -1
  103. package/dist/skill/reference/components/kanban/examples/screen.module.css +1 -1
  104. package/dist/skill/reference/components/kanban/examples/screen.tsx +50 -65
  105. package/dist/skill/reference/components/kbd/COMPONENT.md +1 -1
  106. package/dist/skill/reference/components/label/examples/examples.module.css +12 -1
  107. package/dist/skill/reference/components/label/examples/overview.tsx +1 -1
  108. package/dist/skill/reference/components/list/COMPONENT.md +3 -3
  109. package/dist/skill/reference/components/media-viewer/examples/controlled.tsx +16 -16
  110. package/dist/skill/reference/components/media-viewer/examples/examples.module.css +1 -3
  111. package/dist/skill/reference/components/pagination/COMPONENT.md +11 -3
  112. package/dist/skill/reference/components/pagination/examples/controlled.tsx +2 -1
  113. package/dist/skill/reference/components/popover/COMPONENT.md +3 -2
  114. package/dist/skill/reference/components/popover/examples/width.tsx +13 -1
  115. package/dist/skill/reference/components/slider/COMPONENT.md +3 -3
  116. package/dist/skill/reference/components/slider/examples/states.tsx +14 -10
  117. package/dist/skill/reference/components/smart-filter/COMPONENT.md +13 -13
  118. package/dist/skill/reference/components/smart-filter/examples/examples.module.css +3 -0
  119. package/dist/skill/reference/components/smart-filter/examples/many-values.tsx +12 -8
  120. package/dist/skill/reference/components/smart-filter/examples/sizes.tsx +7 -3
  121. package/dist/skill/reference/components/sparkline/COMPONENT.md +1 -0
  122. package/dist/skill/reference/components/sparkline/examples/curve.tsx +16 -11
  123. package/dist/skill/reference/components/sparkline/examples/states.tsx +14 -10
  124. package/dist/skill/reference/components/switch/COMPONENT.md +1 -1
  125. package/dist/skill/reference/components/tabs/COMPONENT.md +1 -1
  126. package/dist/skill/reference/components/typography/COMPONENT.md +2 -2
  127. package/dist/skill/reference/foundation.md +15 -11
  128. package/dist/skill/reference/layout/app-shell/COMPONENT.md +25 -38
  129. package/dist/skill/reference/layout/app-shell/examples/footer.tsx +10 -10
  130. package/dist/skill/reference/layout/app-shell/examples/overview.tsx +20 -22
  131. package/dist/skill/reference/layout/app-shell/examples/screen.module.css +2 -2
  132. package/dist/skill/reference/layout/app-shell/examples/screen.tsx +25 -30
  133. package/dist/skill/reference/layout/app-shell/examples/template.tsx +13 -17
  134. package/dist/skill/reference/layout/bottom-nav/COMPONENT.md +3 -3
  135. package/dist/skill/reference/layout/bottom-nav/examples/floating-action.tsx +10 -19
  136. package/dist/skill/reference/layout/bottom-nav/examples/floating.tsx +10 -19
  137. package/dist/skill/reference/layout/bottom-nav/examples/in-app-shell.tsx +11 -19
  138. package/dist/skill/reference/layout/page/COMPONENT.md +353 -0
  139. package/dist/skill/reference/layout/page/examples/actions-collapse.tsx +45 -0
  140. package/dist/skill/reference/layout/page/examples/collapse.tsx +68 -0
  141. package/dist/skill/reference/{components/page-content → layout/page}/examples/examples.module.css +33 -4
  142. package/{src/components/page-content → dist/skill/reference/layout/page}/examples/grid.tsx +15 -15
  143. package/dist/skill/reference/{components/page-content → layout/page}/examples/list-detail.tsx +14 -14
  144. package/dist/skill/reference/layout/page/examples/narrow.tsx +75 -0
  145. package/dist/skill/reference/layout/page/examples/overview.tsx +57 -0
  146. package/dist/skill/reference/{components/page-content → layout/page}/examples/screen.module.css +1 -1
  147. package/{src/components/page-content → dist/skill/reference/layout/page}/examples/screen.tsx +29 -19
  148. package/dist/skill/reference/{components/page-content → layout/page}/examples/sections.tsx +17 -24
  149. package/dist/skill/reference/layout/page/examples/structure.tsx +41 -0
  150. package/dist/skill/reference/{components/page-toolbar/examples/narrow.tsx → layout/page/examples/tools.tsx} +38 -35
  151. package/dist/skill/reference/layout/page/examples/top-bar.tsx +85 -0
  152. package/dist/skill/reference/{components/page-content → layout/page}/examples/variants.tsx +7 -7
  153. package/dist/skill/reference/layout/sidebar/COMPONENT.md +5 -4
  154. package/dist/skill/reference/layout/sidebar/examples/dismiss.tsx +10 -7
  155. package/dist/skill/reference/layout/sidebar/examples/narrow.tsx +11 -8
  156. package/dist/skill/responsive.md +88 -74
  157. package/dist/tokens/layers.d.ts +2 -0
  158. package/dist/tokens/primitives.d.ts +12 -2
  159. package/dist/tokens/semantic.d.ts +7 -0
  160. package/dist/tokens/themes/dark.d.ts +7 -2
  161. package/package.json +2 -2
  162. package/src/components/avatar/COMPONENT.md +2 -2
  163. package/src/components/avatar/examples/team-group.tsx +1 -1
  164. package/src/components/banner/COMPONENT.md +4 -4
  165. package/src/components/banner/examples/examples.module.css +6 -1
  166. package/src/components/banner/examples/page-strip.tsx +24 -22
  167. package/src/components/breadcrumb/COMPONENT.md +9 -8
  168. package/src/components/button/COMPONENT.md +1 -0
  169. package/src/components/button/examples/hold-to-confirm.tsx +1 -1
  170. package/src/components/button/examples/on-colored-host.tsx +8 -8
  171. package/src/components/card/COMPONENT.md +7 -7
  172. package/src/components/card/examples/screen.module.css +1 -1
  173. package/src/components/card/examples/screen.tsx +184 -198
  174. package/src/components/chart-frame/COMPONENT.md +1 -1
  175. package/src/components/chart-frame/examples/fill-height.tsx +9 -9
  176. package/src/components/chat/COMPONENT.md +4 -4
  177. package/src/components/chat/examples/screen.module.css +1 -1
  178. package/src/components/chat/examples/screen.tsx +110 -117
  179. package/src/components/chat-list/COMPONENT.md +2 -2
  180. package/src/components/chat-list/examples/controlled.tsx +2 -2
  181. package/src/components/chat-list/examples/examples.module.css +8 -0
  182. package/src/components/checkbox/examples/examples.module.css +3 -2
  183. package/src/components/code-block/COMPONENT.md +1 -1
  184. package/src/components/code-block/examples/color-scheme.tsx +2 -4
  185. package/src/components/code-block/examples/examples.module.css +0 -11
  186. package/src/components/color-picker/COMPONENT.md +18 -7
  187. package/src/components/color-picker/examples/examples.module.css +2 -5
  188. package/src/components/color-picker/examples/overview.tsx +5 -10
  189. package/src/components/color-picker/examples/sizes.tsx +4 -8
  190. package/src/components/crossfade/COMPONENT.md +2 -2
  191. package/src/components/crossfade/examples/screen.tsx +107 -112
  192. package/src/components/data-table/COMPONENT.md +5 -5
  193. package/src/components/data-table/examples/examples.module.css +9 -0
  194. package/src/components/data-table/examples/screen.tsx +42 -52
  195. package/src/components/data-table/examples/server.tsx +6 -2
  196. package/src/components/datepicker/examples/examples.module.css +6 -0
  197. package/src/components/datepicker/examples/inline-panel.tsx +3 -1
  198. package/src/components/description-list/COMPONENT.md +1 -1
  199. package/src/components/description-list/examples/screen.tsx +120 -127
  200. package/src/components/digit-input/examples/grouped.tsx +4 -4
  201. package/src/components/digit-input/examples/validation.tsx +1 -1
  202. package/src/components/divider/COMPONENT.md +2 -2
  203. package/src/components/divider/examples/examples.module.css +4 -1
  204. package/src/components/divider/examples/vertical.tsx +22 -9
  205. package/src/components/dnd/examples/examples.module.css +3 -1
  206. package/src/components/drawer/COMPONENT.md +1 -1
  207. package/src/components/drawer/examples/placement.tsx +26 -31
  208. package/src/components/drawer/examples/screen.tsx +137 -160
  209. package/src/components/dropdown/COMPONENT.md +1 -1
  210. package/src/components/example-frame/COMPONENT.md +3 -3
  211. package/src/components/field-list/examples/screen.module.css +1 -1
  212. package/src/components/field-list/examples/screen.tsx +19 -19
  213. package/src/components/fieldset/COMPONENT.md +1 -1
  214. package/src/components/fieldset/examples/states.tsx +1 -1
  215. package/src/components/file-upload/COMPONENT.md +1 -1
  216. package/src/components/file-upload/examples/screen.module.css +2 -2
  217. package/src/components/file-upload/examples/screen.tsx +65 -81
  218. package/src/components/gallery/COMPONENT.md +1 -0
  219. package/src/components/gantt/COMPONENT.md +1 -1
  220. package/src/components/gantt/examples/screen.module.css +1 -1
  221. package/src/components/gantt/examples/screen.tsx +55 -73
  222. package/src/components/hint/examples/examples.module.css +10 -1
  223. package/src/components/hint/examples/overview.tsx +1 -1
  224. package/src/components/kanban/COMPONENT.md +1 -1
  225. package/src/components/kanban/examples/screen.module.css +1 -1
  226. package/src/components/kanban/examples/screen.tsx +50 -65
  227. package/src/components/kbd/COMPONENT.md +1 -1
  228. package/src/components/label/examples/examples.module.css +12 -1
  229. package/src/components/label/examples/overview.tsx +1 -1
  230. package/src/components/list/COMPONENT.md +3 -3
  231. package/src/components/media-viewer/examples/controlled.tsx +16 -16
  232. package/src/components/media-viewer/examples/examples.module.css +1 -3
  233. package/src/components/pagination/COMPONENT.md +11 -3
  234. package/src/components/pagination/examples/controlled.tsx +2 -1
  235. package/src/components/popover/COMPONENT.md +3 -2
  236. package/src/components/popover/examples/width.tsx +13 -1
  237. package/src/components/slider/COMPONENT.md +3 -3
  238. package/src/components/slider/examples/states.tsx +14 -10
  239. package/src/components/smart-filter/COMPONENT.md +13 -13
  240. package/src/components/smart-filter/examples/examples.module.css +3 -0
  241. package/src/components/smart-filter/examples/many-values.tsx +12 -8
  242. package/src/components/smart-filter/examples/sizes.tsx +7 -3
  243. package/src/components/sparkline/COMPONENT.md +1 -0
  244. package/src/components/sparkline/examples/curve.tsx +16 -11
  245. package/src/components/sparkline/examples/states.tsx +14 -10
  246. package/src/components/switch/COMPONENT.md +1 -1
  247. package/src/components/tabs/COMPONENT.md +1 -1
  248. package/src/components/typography/COMPONENT.md +2 -2
  249. package/src/layout/app-shell/COMPONENT.md +25 -38
  250. package/src/layout/app-shell/examples/footer.tsx +10 -10
  251. package/src/layout/app-shell/examples/overview.tsx +20 -22
  252. package/src/layout/app-shell/examples/screen.module.css +2 -2
  253. package/src/layout/app-shell/examples/screen.tsx +25 -30
  254. package/src/layout/app-shell/examples/template.tsx +13 -17
  255. package/src/layout/bottom-nav/COMPONENT.md +3 -3
  256. package/src/layout/bottom-nav/examples/floating-action.tsx +10 -19
  257. package/src/layout/bottom-nav/examples/floating.tsx +10 -19
  258. package/src/layout/bottom-nav/examples/in-app-shell.tsx +11 -19
  259. package/src/layout/page/COMPONENT.md +353 -0
  260. package/src/layout/page/examples/actions-collapse.tsx +45 -0
  261. package/src/layout/page/examples/collapse.tsx +68 -0
  262. package/src/{components/page-content → layout/page}/examples/examples.module.css +33 -4
  263. package/{dist/skill/reference/components/page-content → src/layout/page}/examples/grid.tsx +15 -15
  264. package/src/{components/page-content → layout/page}/examples/list-detail.tsx +14 -14
  265. package/src/layout/page/examples/narrow.tsx +75 -0
  266. package/src/layout/page/examples/overview.tsx +57 -0
  267. package/src/{components/page-content → layout/page}/examples/screen.module.css +1 -1
  268. package/{dist/skill/reference/components/page-content → src/layout/page}/examples/screen.tsx +29 -19
  269. package/src/{components/page-content → layout/page}/examples/sections.tsx +17 -24
  270. package/src/layout/page/examples/structure.tsx +41 -0
  271. package/src/{components/page-toolbar/examples/narrow.tsx → layout/page/examples/tools.tsx} +38 -35
  272. package/src/layout/page/examples/top-bar.tsx +85 -0
  273. package/src/{components/page-content → layout/page}/examples/variants.tsx +7 -7
  274. package/src/layout/sidebar/COMPONENT.md +5 -4
  275. package/src/layout/sidebar/examples/dismiss.tsx +10 -7
  276. package/src/layout/sidebar/examples/narrow.tsx +11 -8
  277. package/src/styles/theme-dark.css +12 -10
  278. package/src/styles/theme-light.css +3 -0
  279. package/src/styles/tokens.css +3 -1
  280. package/dist/components/page-content/PageContent.d.ts +0 -192
  281. package/dist/components/page-toolbar/PageToolbar.d.ts +0 -55
  282. package/dist/layout/app-header/AppHeader.d.ts +0 -118
  283. package/dist/skill/reference/components/page-content/COMPONENT.md +0 -264
  284. package/dist/skill/reference/components/page-content/examples/narrow.tsx +0 -25
  285. package/dist/skill/reference/components/page-content/examples/overview.tsx +0 -41
  286. package/dist/skill/reference/components/page-toolbar/COMPONENT.md +0 -147
  287. package/dist/skill/reference/components/page-toolbar/examples/examples.module.css +0 -16
  288. package/dist/skill/reference/components/page-toolbar/examples/overview.tsx +0 -113
  289. package/dist/skill/reference/components/page-toolbar/examples/save-changes.tsx +0 -43
  290. package/dist/skill/reference/components/page-toolbar/examples/without-search.tsx +0 -60
  291. package/dist/skill/reference/layout/app-header/COMPONENT.md +0 -187
  292. package/dist/skill/reference/layout/app-header/examples/breadcrumbs.tsx +0 -37
  293. package/dist/skill/reference/layout/app-header/examples/examples.module.css +0 -28
  294. package/dist/skill/reference/layout/app-header/examples/in-app-shell.tsx +0 -67
  295. package/dist/skill/reference/layout/app-header/examples/narrow.tsx +0 -66
  296. package/dist/skill/reference/layout/app-header/examples/overview.tsx +0 -34
  297. package/dist/skill/reference/layout/app-header/examples/page-title.tsx +0 -78
  298. package/dist/skill/reference/layout/app-shell/examples/contained.tsx +0 -30
  299. package/src/components/page-content/COMPONENT.md +0 -264
  300. package/src/components/page-content/examples/narrow.tsx +0 -25
  301. package/src/components/page-content/examples/overview.tsx +0 -41
  302. package/src/components/page-toolbar/COMPONENT.md +0 -147
  303. package/src/components/page-toolbar/examples/examples.module.css +0 -16
  304. package/src/components/page-toolbar/examples/overview.tsx +0 -113
  305. package/src/components/page-toolbar/examples/save-changes.tsx +0 -43
  306. package/src/components/page-toolbar/examples/without-search.tsx +0 -60
  307. package/src/layout/app-header/COMPONENT.md +0 -187
  308. package/src/layout/app-header/examples/breadcrumbs.tsx +0 -37
  309. package/src/layout/app-header/examples/examples.module.css +0 -28
  310. package/src/layout/app-header/examples/in-app-shell.tsx +0 -67
  311. package/src/layout/app-header/examples/narrow.tsx +0 -66
  312. package/src/layout/app-header/examples/overview.tsx +0 -34
  313. package/src/layout/app-header/examples/page-title.tsx +0 -78
  314. package/src/layout/app-shell/examples/contained.tsx +0 -30
  315. package/dist/chunks/{chunk-U3Q2I3MY.js → chunk-2ODXLPW3.js} +2 -2
@@ -1,6 +1,5 @@
1
- /** A support messenger as a work screen: the title and the unread count in the app header, the dialogs with a search over them beside the conversation (one pane at a time on a phone), history that loads above as you scroll up, the unread band, reply and edit from the menu, the typing signal both ways, unread counts from what was seen, and the Composer whose messages rise into the list while the client answers — `items`, `renderMessage`, `hasOlder`, `onLoadOlder`, `typing`. */
1
+ /** A support messenger as a work screen: the title and the unread count in its top bar, the dialogs with a search over them beside the conversation (one pane at a time on a phone), history that loads above as you scroll up, the unread band, reply and edit from the menu, the typing signal both ways, unread counts from what was seen, and the Composer whose messages rise into the list while the client answers — `items`, `renderMessage`, `hasOlder`, `onLoadOlder`, `typing`. */
2
2
  import {
3
- AppHeader,
4
3
  Avatar,
5
4
  Card,
6
5
  Chat,
@@ -16,7 +15,7 @@ import {
16
15
  Icon,
17
16
  Message,
18
17
  type MessageStatus,
19
- PageContent,
18
+ Page,
20
19
  type UploadContext,
21
20
  useUploadQueue,
22
21
  VoicePlayer,
@@ -573,123 +572,117 @@ export default function ChatScreenExample() {
573
572
  };
574
573
 
575
574
  return (
576
- <>
577
- {/* A work screen: in an app this header fills the shell's `header` slot and carries the page —
578
- the only h1 and one line of data; main has no PageContent.Header. */}
579
- <AppHeader.Root>
580
- <AppHeader.Start>
581
- <AppHeader.Title>
582
- Поддержка
583
- <AppHeader.Description>{unreadLabel(unreadTotal)}</AppHeader.Description>
584
- </AppHeader.Title>
585
- </AppHeader.Start>
586
- </AppHeader.Root>
587
-
588
- <PageContent.Root fill>
589
- <PageContent.Body>
590
- <PageContent.Split
591
- open={dialogId !== null}
592
- onOpenChange={(next) => {
593
- if (!next) setDialogId(null);
594
- }}
595
- >
596
- <PageContent.Panel kind="list">
597
- <Card.Root className={styles.paneCard}>
598
- <ChatList.Root
599
- items={foundDialogs}
600
- getKey={(item) => item.id}
601
- value={dialogId}
602
- onValueChange={setDialogId}
603
- search={dialogQuery}
604
- onSearchChange={setDialogQuery}
575
+ <Page.Root fill>
576
+ {/* A work screen titles itself in its top bar: the only h1 and one line of data. */}
577
+ <Page.TopBar>
578
+ <Page.Heading>
579
+ <Page.Title>Поддержка</Page.Title>
580
+ <Page.Description>{unreadLabel(unreadTotal)}</Page.Description>
581
+ </Page.Heading>
582
+ </Page.TopBar>
583
+ <Page.Body>
584
+ <Page.Split
585
+ open={dialogId !== null}
586
+ onOpenChange={(next) => {
587
+ if (!next) setDialogId(null);
588
+ }}
589
+ >
590
+ <Page.List>
591
+ <Card.Root className={styles.paneCard}>
592
+ <ChatList.Root
593
+ items={foundDialogs}
594
+ getKey={(item) => item.id}
595
+ value={dialogId}
596
+ onValueChange={setDialogId}
597
+ search={dialogQuery}
598
+ onSearchChange={setDialogQuery}
599
+ now={NOW}
600
+ renderItem={(item) => {
601
+ const last = lastOf(item);
602
+ return (
603
+ <ChatList.Item
604
+ time={last?.sentAt ?? item.at}
605
+ status={last?.from === "me" ? last.status : undefined}
606
+ unread={unread[item.id] ?? 0}
607
+ typing={item.id === dialogId && clientTyping}
608
+ >
609
+ <ChatList.ItemIcon>
610
+ <Avatar.Root color={hueOf(item.id)}>
611
+ <Avatar.Fallback>{item.initials}</Avatar.Fallback>
612
+ {item.id === "vector" ? <Avatar.Status status="online" /> : null}
613
+ </Avatar.Root>
614
+ </ChatList.ItemIcon>
615
+ <ChatList.ItemText>{item.name}</ChatList.ItemText>
616
+ <ChatList.ItemDescription author={last?.from === "me" ? "Вы" : undefined}>
617
+ {previewOf(item)}
618
+ </ChatList.ItemDescription>
619
+ </ChatList.Item>
620
+ );
621
+ }}
622
+ />
623
+ </Card.Root>
624
+ </Page.List>
625
+
626
+ <Page.Detail>
627
+ <Card.Root className={styles.paneCard}>
628
+ <Chat.Root typing={clientTyping}>
629
+ <Chat.Header>
630
+ <Page.BackButton />
631
+ <Avatar.Root color={hueOf(dialog.id)}>
632
+ <Avatar.Fallback>{dialog.initials}</Avatar.Fallback>
633
+ {dialog.id === "vector" ? <Avatar.Status status="online" /> : null}
634
+ </Avatar.Root>
635
+ <Chat.Title>{dialog.name}</Chat.Title>
636
+ <Chat.Description>{dialog.contact}</Chat.Description>
637
+ <Chat.Actions>
638
+ <Chat.SearchButton />
639
+ </Chat.Actions>
640
+ </Chat.Header>
641
+ <Chat.Search />
642
+ <Chat.Messages
643
+ loading={loadedId !== dialogId}
644
+ items={messages}
645
+ getKey={(message) => message.id}
646
+ getAuthor={(message) => message.from}
647
+ getDate={(message) => message.sentAt}
648
+ renderMessage={renderMessage}
649
+ unread={FIRST_UNREAD}
605
650
  now={NOW}
606
- renderItem={(item) => {
607
- const last = lastOf(item);
608
- return (
609
- <ChatList.Item
610
- time={last?.sentAt ?? item.at}
611
- status={last?.from === "me" ? last.status : undefined}
612
- unread={unread[item.id] ?? 0}
613
- typing={item.id === dialogId && clientTyping}
614
- >
615
- <ChatList.ItemIcon>
616
- <Avatar.Root color={hueOf(item.id)}>
617
- <Avatar.Fallback>{item.initials}</Avatar.Fallback>
618
- {item.id === "vector" ? <Avatar.Status status="online" /> : null}
619
- </Avatar.Root>
620
- </ChatList.ItemIcon>
621
- <ChatList.ItemText>{item.name}</ChatList.ItemText>
622
- <ChatList.ItemDescription author={last?.from === "me" ? "Вы" : undefined}>
623
- {previewOf(item)}
624
- </ChatList.ItemDescription>
625
- </ChatList.Item>
626
- );
651
+ hasOlder={hasOlder}
652
+ onLoadOlder={loadOlder}
653
+ onNewMessage={(_, { direction }) => {
654
+ if (direction !== "incoming" || !dialogId) return;
655
+ setUnread((current) => ({
656
+ ...current,
657
+ [dialogId]: (current[dialogId] ?? 0) + 1,
658
+ }));
659
+ }}
660
+ onRead={(values) => {
661
+ if (!dialogId) return;
662
+ setUnread((current) => ({
663
+ ...current,
664
+ [dialogId]: Math.max(0, (current[dialogId] ?? 0) - values.length),
665
+ }));
627
666
  }}
628
667
  />
629
- </Card.Root>
630
- </PageContent.Panel>
631
-
632
- <PageContent.Panel kind="detail">
633
- <Card.Root className={styles.paneCard}>
634
- <Chat.Root typing={clientTyping}>
635
- <Chat.Header>
636
- <PageContent.BackButton />
637
- <Avatar.Root color={hueOf(dialog.id)}>
638
- <Avatar.Fallback>{dialog.initials}</Avatar.Fallback>
639
- {dialog.id === "vector" ? <Avatar.Status status="online" /> : null}
640
- </Avatar.Root>
641
- <Chat.Title>{dialog.name}</Chat.Title>
642
- <Chat.Description>{dialog.contact}</Chat.Description>
643
- <Chat.Actions>
644
- <Chat.SearchButton />
645
- </Chat.Actions>
646
- </Chat.Header>
647
- <Chat.Search />
648
- <Chat.Messages
649
- loading={loadedId !== dialogId}
650
- items={messages}
651
- getKey={(message) => message.id}
652
- getAuthor={(message) => message.from}
653
- getDate={(message) => message.sentAt}
654
- renderMessage={renderMessage}
655
- unread={FIRST_UNREAD}
656
- now={NOW}
657
- hasOlder={hasOlder}
658
- onLoadOlder={loadOlder}
659
- onNewMessage={(_, { direction }) => {
660
- if (direction !== "incoming" || !dialogId) return;
661
- setUnread((current) => ({
662
- ...current,
663
- [dialogId]: (current[dialogId] ?? 0) + 1,
664
- }));
665
- }}
666
- onRead={(values) => {
667
- if (!dialogId) return;
668
- setUnread((current) => ({
669
- ...current,
670
- [dialogId]: Math.max(0, (current[dialogId] ?? 0) - values.length),
671
- }));
672
- }}
668
+ <Chat.Footer>
669
+ <ChatComposer
670
+ replyTo={replyTo}
671
+ replyAuthor={dialog.contactTo}
672
+ editing={editing}
673
+ onReplyDismiss={() => setReplyTo(null)}
674
+ onEditDismiss={() => setEditing(null)}
675
+ onEditLast={editLast}
676
+ onPost={post}
677
+ onSave={save}
678
+ onActivityChange={reportActivity}
673
679
  />
674
- <Chat.Footer>
675
- <ChatComposer
676
- replyTo={replyTo}
677
- replyAuthor={dialog.contactTo}
678
- editing={editing}
679
- onReplyDismiss={() => setReplyTo(null)}
680
- onEditDismiss={() => setEditing(null)}
681
- onEditLast={editLast}
682
- onPost={post}
683
- onSave={save}
684
- onActivityChange={reportActivity}
685
- />
686
- </Chat.Footer>
687
- </Chat.Root>
688
- </Card.Root>
689
- </PageContent.Panel>
690
- </PageContent.Split>
691
- </PageContent.Body>
692
- </PageContent.Root>
693
- </>
680
+ </Chat.Footer>
681
+ </Chat.Root>
682
+ </Card.Root>
683
+ </Page.Detail>
684
+ </Page.Split>
685
+ </Page.Body>
686
+ </Page.Root>
694
687
  );
695
688
  }
@@ -171,7 +171,7 @@ The search field takes the tier too; counts are one tier down (the Badge's own r
171
171
  Root attribute: `data-size`. Every motion honours reduced motion (durations collapse, glides and ghosts are skipped).
172
172
 
173
173
  ## Layout & spacing
174
- - The root is a flex column that fills its host's height: put it straight into a `Card.Root` or a `PageContent.Panel kind="list"` pane with a height; the scroller takes the rest under the search field.
174
+ - The root is a flex column that fills its host's height: put it straight into a `Card.Root` or a `Page.List` pane with a height; the scroller takes the rest under the search field.
175
175
  - One inset all round, the panel's 4px: the search field and the rows stand 4px from every edge of the host, so in a card (radius 12) their 8px corners follow the card's (nested radius = outer − padding). Rows stand 4px apart (a margin inside each `<li>`, so the virtual window measures rows with their space); the last row's margin is the inset below it.
176
176
  - A row: avatar · name and preview · time over the counts. The name and the preview truncate; glyphs, the time and the counts never do.
177
177
  - From 100 dialogs only the rows around the view render; spacers hold the rest of the height. The row with the Tab stop and the row with an open menu stay rendered.
@@ -259,4 +259,4 @@ Root attribute: `data-size`. Every motion honours reduced motion (durations coll
259
259
 
260
260
  ## Related
261
261
  - **Built from:** [List](../list/COMPONENT.md) (rows, current fill, focus, touch height), [Input](../input/COMPONENT.md) (search), [ScrollContainer](../scroll-container/COMPONENT.md), [Crossfade](../crossfade/COMPONENT.md), [Skeleton](../skeleton/COMPONENT.md), [EmptyPage](../empty-page/COMPONENT.md), [Badge](../badge/COMPONENT.md) (counts), [Dropdown](../dropdown/COMPONENT.md) (row menu), [VisuallyHidden](../visually-hidden/COMPONENT.md), `useFlipList` (the glide of a new order)
262
- - **See also:** [Chat](../chat/COMPONENT.md), [Message](../message/COMPONENT.md), [Avatar](../avatar/COMPONENT.md), [PageContent](../page-content/COMPONENT.md), [ConfirmDialog](../confirm-dialog/COMPONENT.md)
262
+ - **See also:** [Chat](../chat/COMPONENT.md), [Message](../message/COMPONENT.md), [Avatar](../avatar/COMPONENT.md), [Page](../../layout/page/COMPONENT.md), [ConfirmDialog](../confirm-dialog/COMPONENT.md)
@@ -56,7 +56,7 @@ export default function ChatListControlledExample() {
56
56
  const dialog = dialogs.find((item) => item.id === dialogId);
57
57
 
58
58
  return (
59
- <div className={styles.stage}>
59
+ <div className={styles.screen}>
60
60
  <div className={styles.bar}>
61
61
  <Button.Root
62
62
  variant="soft"
@@ -93,7 +93,7 @@ export default function ChatListControlledExample() {
93
93
  <Card.Root>
94
94
  <Card.Body>
95
95
  <Typography variant="body-m" tone={dialog ? "default" : "muted"}>
96
- {dialog ? `Открыт диалог: ${dialog.name}` : "Выберите диалог слева"}
96
+ {dialog ? `Открыт диалог: ${dialog.name}` : "Выберите диалог в списке"}
97
97
  </Typography>
98
98
  </Card.Body>
99
99
  </Card.Root>
@@ -29,6 +29,14 @@
29
29
  gap: var(--prime-space-2);
30
30
  }
31
31
 
32
+ /* controlled: a list + detail screen, as wide as the preview gives (no pane cap). */
33
+ .screen {
34
+ display: flex;
35
+ flex-direction: column;
36
+ gap: var(--prime-space-3);
37
+ inline-size: 100%;
38
+ }
39
+
32
40
  /* controlled: the list beside the open dialog; they stack in a narrow column. */
33
41
  .split {
34
42
  display: flex;
@@ -19,12 +19,13 @@
19
19
  width: min(100%, var(--prime-layout-form-width-s));
20
20
  }
21
21
 
22
- /* indicator.tsx: selectable tiles in a fluid grid. */
22
+ /* indicator.tsx: selectable tiles in a fluid grid; a column holds a whole module name (a tile
23
+ label stays on one line), so a narrow column stacks the tiles instead of truncating them. */
23
24
  .tiles {
24
25
  display: grid;
25
26
  grid-template-columns: repeat(
26
27
  auto-fit,
27
- minmax(min(100%, var(--prime-layout-tile-min-width)), 1fr)
28
+ minmax(min(100%, calc(var(--prime-layout-tile-min-width) * 1.5)), 1fr)
28
29
  );
29
30
  gap: var(--prime-space-4);
30
31
  width: 100%;
@@ -69,7 +69,7 @@ Syntax tokens: keywords purple (weight 500), strings teal, numbers orange, JSX t
69
69
  ## Layout & spacing
70
70
  - `max-width: 100%`; the block takes the column width and long lines scroll horizontally inside it (`white-space: pre`, tab size 2), with the kit's thin scrollbar.
71
71
  - Heading / text → code block: space step 2–4 (8–16px).
72
- - Constrain the column (PageContent `maxWidth="readable"` for docs), not the block.
72
+ - Constrain the column (`Page.Root maxWidth="readable"` for docs), not the block.
73
73
 
74
74
  ## Accessibility
75
75
 
@@ -1,16 +1,14 @@
1
1
  /** A block fixed to one scheme looks the same in both page themes — `colorScheme`. */
2
2
  import { CodeBlock } from "prime-ui-kit";
3
3
 
4
- import styles from "./examples.module.css";
5
-
6
4
  const SAMPLE = `const retries = 3; // повторы при ошибке сети
7
5
  export const isReady = (status: "idle" | "busy") => status === "idle";`;
8
6
 
9
7
  export default function CodeBlockColorSchemeExample() {
10
8
  return (
11
- <div className={styles.grid}>
9
+ <>
12
10
  <CodeBlock code={SAMPLE} colorScheme="light" aria-label="Светлая схема" />
13
11
  <CodeBlock code={SAMPLE} colorScheme="dark" aria-label="Тёмная схема" />
14
- </div>
12
+ </>
15
13
  );
16
14
  }
@@ -6,17 +6,6 @@
6
6
  min-width: 0;
7
7
  }
8
8
 
9
- /* color-scheme.tsx: two blocks side by side, stacked when narrow. */
10
- .grid {
11
- display: grid;
12
- grid-template-columns: repeat(
13
- auto-fit,
14
- minmax(min(100%, var(--prime-layout-tile-min-width)), 1fr)
15
- );
16
- gap: var(--prime-space-4);
17
- width: 100%;
18
- }
19
-
20
9
  /* narrow.tsx: a column narrower than the line. */
21
10
  .narrow {
22
11
  width: min(100%, var(--prime-layout-form-width-s));
@@ -31,7 +31,8 @@ in `prime-ui-kit/bundle.css`. `ColorPresets` stays in the main entry and needs n
31
31
  ```
32
32
  ColorPicker.Root shared Color + value format (no DOM)
33
33
  ├─ ColorPicker.HexInput kit Input bound to the hex of the current color
34
- ├─ ColorPicker.TriggerSwatch square of the current color for a trigger button
34
+ │ └─ ColorPicker.SwatchButton end segment of the field box: the current color, opens a panel
35
+ ├─ ColorPicker.TriggerSwatch square of the current color for your own trigger button
35
36
  └─ ColorPicker.Panel vertical stack, optional raised surface
36
37
  ├─ ColorPicker.FormatSelect kit Select: HSL / RGB / Hex
37
38
  ├─ ColorPicker.Area 2D area (4:3)
@@ -87,8 +88,16 @@ No DOM. Holds the color (React Aria `ColorPicker`) and the value format for ever
87
88
  | `hint` | `ReactNode` | — | Help text under the field. Hidden while `error` is shown. |
88
89
  | `error` | `ReactNode` | — | Error message in the hint slot; marks the field invalid. |
89
90
  | `focusRing` | `boolean` | `true` | `false` hides only the visual focus ring of the fields (`data-focus-ring="false"`); focus, keyboard and ARIA stay. |
91
+ | `children` | `ReactNode` | — | End segments of the field box after the value: `ColorPicker.SwatchButton` (in a `Popover.Trigger`), so the hex and its swatch read as one field. |
90
92
  | `…rest` | `Omit<HTMLAttributes<HTMLDivElement>, "id" \| "children" \| "defaultValue" \| "defaultChecked" \| "onChange">` | — | `className`, `data-*` and the other attributes of the field frame `<div>` (field-root rule: `className`, `ref` and the rest → frame, `id` → control). |
91
93
 
94
+ ### ColorPicker.SwatchButton
95
+ `ref` → `HTMLButtonElement`. The current color as a button segment at the end of `HexInput`: full field height, named `labels.palette`, with a tooltip. Wrap it in `Popover.Trigger` to open the panel.
96
+
97
+ | Prop | Type | Default | Description |
98
+ |---|---|---|---|
99
+ | `…rest` | `Omit<ButtonHTMLAttributes<HTMLButtonElement>, "aria-label" \| "children">` | — | `className`, `disabled`, `onClick` and the other attributes of the `<button>`. |
100
+
92
101
  ### ColorPicker.TriggerSwatch
93
102
  `ref` → `HTMLSpanElement`. A square of the current color for a trigger button (`aria-hidden`); follows the host icon size, e.g. inside `Button.Icon`.
94
103
 
@@ -245,7 +254,7 @@ No `variant` / `tone` / `color`.
245
254
  | `l` | 40px, 28px swatches | spacious forms | |
246
255
  | `xl` | 48px, 32px swatches | touch-first screens | |
247
256
 
248
- **Sizes:** `ColorPresets.SwatchButton` is a square of the control height, so it lines up with an Input of the same size; HexInput + a square soft `Button.Root` of the same `size` with `TriggerSwatch` inside `Button.Icon` match too. Area, sliders and the channel strip have no size axis (always tier `m`).
257
+ **Sizes:** `ColorPresets.SwatchButton` is a square of the control height, so it lines up with an Input of the same size; `ColorPicker.SwatchButton` is a segment inside HexInput, so it takes the field's tier with it. Area, sliders and the channel strip have no size axis (always tier `m`).
249
258
 
250
259
  ### Flags
251
260
  | Value | Looks like | Use when | Default |
@@ -277,7 +286,7 @@ There is no `disabled` on `ColorPicker.Root` — disable parts individually. Con
277
286
 
278
287
  ## Layout & spacing
279
288
  - Panel width comes from the layout: a popover or a column wide enough for the area and four channel fields.
280
- - Field + trigger row: a small gap, `align-items: flex-end` so the trigger aligns with the field box under a label.
289
+ - Hex field + palette trigger: `ColorPicker.SwatchButton` as a child of `HexInput` — one field box, the swatch a full-height segment at its end; no row of your own.
281
290
  - Panel parts gap: 12px (`--prime-space-3`) from `ColorPicker.Panel`.
282
291
  - ColorPresets.Content `align="auto"`: a trigger near the end of the screen lines up the panel's end edge and the panel grows toward the start, and the other way near the start; a fixed `align` still flips at the screen edge.
283
292
  - ColorPresets grid: one row for up to 8 presets (+ «no color»), else rows of 8 (`columns` overrides); a panel narrower than the row wraps the swatches into balanced rows (16 → 8 + 8, never 14 + 2). On a coarse pointer every swatch grows to the 44 px touch target and the grid wraps into more rows, so it still fits a 320px panel; the arrow keys walk the rows on screen.
@@ -300,7 +309,7 @@ There is no `disabled` on `ColorPicker.Root` — disable parts individually. Con
300
309
  <!-- Generated from api.ts by `bun run docs:build`. Edit api.ts, not this section. -->
301
310
 
302
311
  - Area and sliders are React Aria primitives with their own `role="slider"` names.
303
- - `TriggerSwatch` and `ColorPresets.Swatch` are `aria-hidden` — give the trigger button an `aria-label` (`ColorPresets.Trigger` names its element «`labels.trigger`: <color name>» unless the element has its own `aria-label`).
312
+ - `SwatchButton` is a button named `labels.palette` with a tooltip. `TriggerSwatch` and `ColorPresets.Swatch` are `aria-hidden` — give the trigger button an `aria-label` (`ColorPresets.Trigger` names its element «`labels.trigger`: <color name>» unless the element has its own `aria-label`).
304
313
  - `ColorPicker.Swatches` is a `role="radiogroup"` (ColorSwatches): name it with `label` or `aria-label`.
305
314
  - The ColorPresets grid is `role="listbox"` with `role="option"` swatches (roving tabindex), named by the Content `label` or `labels.list`.
306
315
  - Channel fields are named by `labels` (`hue`, `red`…); HexInput by its label (`labels.hex` by default).
@@ -315,6 +324,7 @@ There is no `disabled` on `ColorPicker.Root` — disable parts individually. Con
315
324
  | `format` | `"Формат значений цвета"` | Name of `ColorPicker.FormatSelect`. |
316
325
  | `eyeDropper` | `"Пипетка"` | Name of `ColorPicker.EyeDropperButton`. |
317
326
  | `hex` | `"Hex"` | Hex field of `ChannelStrip` and the default `HexInput` label. |
327
+ | `palette` | `"Открыть палитру"` | Name and tooltip of `ColorPicker.SwatchButton`. |
318
328
  | `hue` | `"Оттенок, градусы"` | Hue channel field. |
319
329
  | `saturation` | `"Насыщенность, проценты"` | Saturation channel field. |
320
330
  | `lightness` | `"Яркость, проценты"` | Lightness channel field. |
@@ -349,8 +359,8 @@ There is no `disabled` on `ColorPicker.Root` — disable parts individually. Con
349
359
  ## Examples
350
360
  | Example | Shows |
351
361
  |---|---|
352
- | [overview.tsx](examples/overview.tsx) | A color field: a hex value and a swatch button that opens the picker panel — `ColorPicker.HexInput`, `ColorPicker.TriggerSwatch`. |
353
- | [sizes.tsx](examples/sizes.tsx) | Every tier of the picker: the hex field and a swatch button inside take it from the root — `size`. |
362
+ | [overview.tsx](examples/overview.tsx) | A color field: a hex value and a swatch segment at its end that opens the picker panel — `ColorPicker.HexInput`, `ColorPicker.SwatchButton`. |
363
+ | [sizes.tsx](examples/sizes.tsx) | Every tier of the picker: the hex field and its swatch segment take it from the root — `size`. |
354
364
  | [states.tsx](examples/states.tsx) | A disabled area, hue slider and preset trigger keep showing the color but take no input — `disabled`. |
355
365
  | [validation.tsx](examples/validation.tsx) | A button color checked live: a too light color shakes in an error that leaves once the color is darker; a hint under the other field, invalid text reverts on blur — `hint`, `error`. |
356
366
  | [panel.tsx](examples/panel.tsx) | The full raised panel and its part order: format, area, hue and alpha sliders, channels, brand swatches — `ColorPicker.Panel`, `surface`, `ColorPicker.Swatches`. |
@@ -369,8 +379,9 @@ There is no `disabled` on `ColorPicker.Root` — disable parts individually. Con
369
379
  - `surface="raised"` inside a Popover → use the default `none`.
370
380
  - Expecting `ColorPresets` to return a `Color` → it returns the preset string (or `null`).
371
381
  - `<ColorPresets.Trigger onKeyDown={…}>` or `className` on the Trigger → it is a slot with no props of its own; put them on the child element.
382
+ - A hex field and a separate swatch `Button` side by side in your own row → put `ColorPicker.SwatchButton` inside `HexInput`.
372
383
  - `<ColorPresets.Trigger />` with no child → put `ColorPresets.SwatchButton` (or your Button) inside it.
373
384
 
374
385
  ## Related
375
- - **Built from:** [Input](../input/COMPONENT.md) (`HexInput`), [Label](../label/COMPONENT.md) and [Hint](../hint/COMPONENT.md) (the `HexInput` label, hint and error), [Select](../select/COMPONENT.md) (`FormatSelect`), [Button](../button/COMPONENT.md) (`EyeDropperButton`), [ColorSwatches](../color-swatches/COMPONENT.md) (`Swatches`), [Popover](../popover/COMPONENT.md) (`ColorPresets.Root`, `ColorPresets.Content`), `Icon` (pipette), [VisuallyHidden](../visually-hidden/COMPONENT.md)
386
+ - **Built from:** [Input](../input/COMPONENT.md) (`HexInput`; its field action segment for `SwatchButton`), [Tooltip](../tooltip/COMPONENT.md) (`SwatchButton`), [Label](../label/COMPONENT.md) and [Hint](../hint/COMPONENT.md) (the `HexInput` label, hint and error), [Select](../select/COMPONENT.md) (`FormatSelect`), [Button](../button/COMPONENT.md) (`EyeDropperButton`), [ColorSwatches](../color-swatches/COMPONENT.md) (`Swatches`), [Popover](../popover/COMPONENT.md) (`ColorPresets.Root`, `ColorPresets.Content`), `Icon` (pipette), [VisuallyHidden](../visually-hidden/COMPONENT.md)
376
387
  - **See also:** [ColorField](../color-field/COMPONENT.md), [ColorSwatches](../color-swatches/COMPONENT.md), [TagSelect](../tag-select/COMPONENT.md)
@@ -9,11 +9,8 @@
9
9
  max-width: 100%;
10
10
  }
11
11
 
12
- /* Hex field + swatch button of the same tier, bottom-aligned with the field box. */
13
- .fieldRow {
14
- display: flex;
15
- align-items: flex-end;
16
- gap: var(--prime-space-2);
12
+ /* overview.tsx: the hex field with its swatch segment at a field's width. */
13
+ .field {
17
14
  width: var(--prime-layout-min-width);
18
15
  max-width: 100%;
19
16
  }
@@ -1,5 +1,5 @@
1
- /** A color field: a hex value and a swatch button that opens the picker panel — `ColorPicker.HexInput`, `ColorPicker.TriggerSwatch`. */
2
- import { Button, Popover } from "prime-ui-kit";
1
+ /** A color field: a hex value and a swatch segment at its end that opens the picker panel — `ColorPicker.HexInput`, `ColorPicker.SwatchButton`. */
2
+ import { Popover } from "prime-ui-kit";
3
3
  import { ColorPicker } from "prime-ui-kit/color-picker";
4
4
 
5
5
  import styles from "./examples.module.css";
@@ -7,15 +7,10 @@ import styles from "./examples.module.css";
7
7
  export default function ColorPickerOverviewExample() {
8
8
  return (
9
9
  <ColorPicker.Root defaultValue="#5b5bd6">
10
- <div className={styles.fieldRow}>
11
- <ColorPicker.HexInput label="Акцентный цвет" />
10
+ <ColorPicker.HexInput label="Акцентный цвет" className={styles.field}>
12
11
  <Popover.Root>
13
12
  <Popover.Trigger>
14
- <Button.Root variant="soft" tone="neutral" aria-label="Открыть палитру">
15
- <Button.Icon>
16
- <ColorPicker.TriggerSwatch />
17
- </Button.Icon>
18
- </Button.Root>
13
+ <ColorPicker.SwatchButton />
19
14
  </Popover.Trigger>
20
15
  <Popover.Content>
21
16
  <ColorPicker.Panel className={styles.panel}>
@@ -31,7 +26,7 @@ export default function ColorPickerOverviewExample() {
31
26
  </ColorPicker.Panel>
32
27
  </Popover.Content>
33
28
  </Popover.Root>
34
- </div>
29
+ </ColorPicker.HexInput>
35
30
  </ColorPicker.Root>
36
31
  );
37
32
  }
@@ -1,5 +1,4 @@
1
- /** Every tier of the picker: the hex field and a swatch button inside take it from the root — `size`. */
2
- import { Button } from "prime-ui-kit";
1
+ /** Every tier of the picker: the hex field and its swatch segment take it from the root — `size`. */
3
2
  import { ColorPicker } from "prime-ui-kit/color-picker";
4
3
 
5
4
  const SIZES = ["xs", "s", "m", "l", "xl"] as const;
@@ -10,12 +9,9 @@ export default function ColorPickerSizesExample() {
10
9
  {SIZES.map((size) => (
11
10
  <div key={size}>
12
11
  <ColorPicker.Root defaultValue="#0090ff" size={size}>
13
- <ColorPicker.HexInput label={size} />
14
- <Button.Root variant="soft" tone="neutral" aria-label="Открыть палитру">
15
- <Button.Icon>
16
- <ColorPicker.TriggerSwatch />
17
- </Button.Icon>
18
- </Button.Root>
12
+ <ColorPicker.HexInput label={size}>
13
+ <ColorPicker.SwatchButton />
14
+ </ColorPicker.HexInput>
19
15
  </ColorPicker.Root>
20
16
  </div>
21
17
  ))}
@@ -79,7 +79,7 @@ Motion is opacity only, so nothing shifts under the pointer; the leaving content
79
79
 
80
80
  ## Layout & spacing
81
81
  - No padding, gap or fill of its own: it sits where the swapped content would sit (inside `Card.Body`, a page section, a panel).
82
- - Width follows the parent; height is the current content's height except while gliding — or, with `fill`, the parent's height (the parent needs one: a flex or grid column with a height, `PageContent.Root fill`).
82
+ - Width follows the parent; height is the current content's height except while gliding — or, with `fill`, the parent's height (the parent needs one: a flex or grid column with a height, `Page.Root fill`).
83
83
  - An empty Crossfade has no box: an optional block above a list keeps the page rhythm whether it is there or not.
84
84
  - The loading state is a `Skeleton` with the geometry of the data it stands for (same rows, same line heights), so the swap to data changes neither layout nor height.
85
85
 
@@ -108,7 +108,7 @@ No `labels`.
108
108
  | [overview.tsx](examples/overview.tsx) | A card region that cross-fades between loading, data, empty and error and glides to the new height — `state`. |
109
109
  | [record-switch.tsx](examples/record-switch.tsx) | A detail panel keyed by the record id: picking another client cross-fades the details of a different height — `state`. |
110
110
  | [fill.tsx](examples/fill.tsx) | A deal board that fills its panel's height while it swaps between loading and data, and a notice slot above it that takes no room while empty — `fill`, `state`. |
111
- | [screen.tsx](examples/screen.tsx) | Screen states: the title and the date of the statement in the app header, a page-level error in a Banner with a retry, a region loading with a Skeleton of its rows and a table skeleton, the table error in place and a first-run EmptyPage; regions cross-fade between states — `state`. |
111
+ | [screen.tsx](examples/screen.tsx) | Screen states: the title and the date of the statement in its top bar, a page-level error in a Banner with a retry, a region loading with a Skeleton of its rows and a table skeleton, the table error in place and a first-run EmptyPage; regions cross-fade between states — `state`. |
112
112
 
113
113
  ## Mistakes
114
114
  - A new `state` on every data refresh (`state={Date.now()}`) → key by what the region shows, not by when it was fetched.