prime-ui-kit 0.14.0 → 0.15.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 (490) hide show
  1. package/README.md +13 -14
  2. package/dist/chunks/{chunk-P6ZO37JM.js → chunk-2IKH55MI.js} +1 -1
  3. package/dist/chunks/{chunk-SYEX7OVT.js → chunk-THFZIHKU.js} +276 -263
  4. package/dist/chunks/{chunk-WXKRUVSE.js → chunk-XJAVS6FH.js} +49 -48
  5. package/dist/color-picker.js +2 -2
  6. package/dist/components/dnd/Dnd.d.ts +1 -1
  7. package/dist/components/login-form/LoginForm.d.ts +5 -1
  8. package/dist/index.css +1 -1
  9. package/dist/index.js +2 -2
  10. package/dist/internal/swatch.d.ts +6 -2
  11. package/dist/layout/app-header/AppHeader.d.ts +9 -28
  12. package/dist/layout/index.d.ts +1 -1
  13. package/dist/skill/SKILL.md +9 -7
  14. package/dist/skill/api-contract.md +2 -2
  15. package/dist/skill/cheatsheet.md +9 -2
  16. package/dist/skill/checklist.md +9 -5
  17. package/dist/skill/choosing.md +7 -9
  18. package/dist/skill/components.md +5 -12
  19. package/dist/skill/composition.md +281 -54
  20. package/dist/skill/foundations.md +1 -1
  21. package/dist/skill/layouts.md +70 -37
  22. package/dist/skill/reference/components/avatar/examples/states.tsx +4 -4
  23. package/dist/skill/reference/components/badge/examples/applied-filters.tsx +13 -19
  24. package/dist/skill/reference/components/badge/examples/examples.module.css +1 -8
  25. package/dist/skill/reference/components/badge/examples/server-tags.tsx +2 -6
  26. package/dist/skill/reference/components/banner/examples/examples.module.css +1 -5
  27. package/dist/skill/reference/components/banner/examples/page-strip.tsx +16 -22
  28. package/dist/skill/reference/components/breadcrumb/COMPONENT.md +4 -3
  29. package/dist/skill/reference/components/breadcrumb/examples/ellipsis.tsx +2 -2
  30. package/dist/skill/reference/components/button-group/COMPONENT.md +2 -2
  31. package/dist/skill/reference/components/button-group/examples/in-form.tsx +22 -2
  32. package/dist/skill/reference/components/button-group/examples/states.tsx +10 -1
  33. package/dist/skill/reference/components/card/COMPONENT.md +2 -1
  34. package/dist/skill/reference/components/card/examples/screen.tsx +362 -0
  35. package/dist/skill/reference/components/card/examples/variants.tsx +15 -1
  36. package/dist/skill/reference/components/chart-frame/COMPONENT.md +2 -1
  37. package/dist/skill/reference/components/chart-frame/examples/fill-height.tsx +119 -0
  38. package/dist/skill/reference/components/chart-frame/examples/states.tsx +3 -1
  39. package/dist/skill/reference/components/chat/COMPONENT.md +3 -1
  40. package/dist/skill/reference/components/chat/examples/group-chat.tsx +15 -2
  41. package/dist/skill/reference/components/chat/examples/reactions.tsx +121 -0
  42. package/dist/skill/reference/components/chat/examples/screen.module.css +9 -0
  43. package/dist/skill/{patterns/chat.tsx → reference/components/chat/examples/screen.tsx} +170 -351
  44. package/dist/skill/reference/components/chat-list/COMPONENT.md +1 -0
  45. package/dist/skill/reference/components/chat-list/examples/links.tsx +72 -0
  46. package/dist/skill/reference/components/checkbox/COMPONENT.md +1 -1
  47. package/dist/skill/reference/components/checkbox/examples/examples.module.css +5 -1
  48. package/dist/skill/reference/components/checkbox/examples/indicator.tsx +13 -7
  49. package/dist/skill/reference/components/checkbox/examples/states.tsx +6 -1
  50. package/dist/skill/reference/components/color-field/COMPONENT.md +1 -1
  51. package/dist/skill/reference/components/color-picker/COMPONENT.md +4 -3
  52. package/dist/skill/reference/components/color-picker/examples/controlled-open.tsx +37 -0
  53. package/dist/skill/reference/components/color-picker/examples/presets.tsx +2 -2
  54. package/dist/skill/reference/components/color-picker/examples/states.tsx +23 -14
  55. package/dist/skill/reference/components/composer/COMPONENT.md +2 -1
  56. package/dist/skill/reference/components/composer/examples/attach-menu.tsx +78 -0
  57. package/dist/skill/reference/components/composer/examples/attachments.tsx +2 -2
  58. package/dist/skill/reference/components/crossfade/COMPONENT.md +1 -0
  59. package/dist/skill/reference/components/crossfade/examples/screen.tsx +197 -0
  60. package/dist/skill/reference/components/data-table/COMPONENT.md +3 -2
  61. package/dist/skill/reference/components/data-table/examples/detail-panel.tsx +36 -37
  62. package/dist/skill/reference/components/data-table/examples/examples.module.css +0 -12
  63. package/dist/skill/reference/components/data-table/examples/numeric.tsx +36 -4
  64. package/dist/skill/reference/components/data-table/examples/overview.tsx +1 -0
  65. package/dist/skill/reference/components/data-table/examples/row-open.tsx +7 -36
  66. package/dist/skill/{patterns/list-page.module.css → reference/components/data-table/examples/screen.module.css} +1 -7
  67. package/dist/skill/{patterns/list-page.tsx → reference/components/data-table/examples/screen.tsx} +84 -64
  68. package/dist/skill/reference/components/datepicker/COMPONENT.md +5 -4
  69. package/dist/skill/reference/components/datepicker/examples/examples.module.css +2 -6
  70. package/dist/skill/reference/components/datepicker/examples/in-form.tsx +47 -55
  71. package/dist/skill/reference/components/datepicker/examples/locale.tsx +35 -0
  72. package/dist/skill/reference/components/datepicker/examples/range-presets.tsx +11 -2
  73. package/dist/skill/reference/components/datepicker/examples/states.tsx +9 -1
  74. package/dist/skill/reference/components/description-list/COMPONENT.md +1 -0
  75. package/dist/skill/{patterns/detail-page.module.css → reference/components/description-list/examples/screen.module.css} +2 -9
  76. package/dist/skill/reference/components/description-list/examples/screen.tsx +214 -0
  77. package/dist/skill/reference/components/description-list/examples/structure.tsx +1 -1
  78. package/dist/skill/reference/components/digit-input/COMPONENT.md +3 -1
  79. package/dist/skill/reference/components/digit-input/examples/states.tsx +3 -1
  80. package/dist/skill/reference/components/digit-input/examples/without-focus-ring.tsx +13 -0
  81. package/dist/skill/reference/components/divider/examples/with-icon.tsx +2 -2
  82. package/dist/skill/reference/components/dnd/COMPONENT.md +4 -2
  83. package/dist/skill/reference/components/dnd/examples/drop-zones.tsx +82 -49
  84. package/dist/skill/reference/components/dnd/examples/examples.module.css +50 -0
  85. package/dist/skill/reference/components/dnd/examples/states.tsx +54 -0
  86. package/dist/skill/reference/components/dnd/examples/table.tsx +113 -0
  87. package/dist/skill/reference/components/drawer/COMPONENT.md +1 -0
  88. package/dist/skill/reference/components/drawer/examples/dismiss.tsx +5 -3
  89. package/dist/skill/reference/components/drawer/examples/examples.module.css +0 -13
  90. package/dist/skill/reference/components/drawer/examples/header-actions.tsx +5 -9
  91. package/dist/skill/reference/components/drawer/examples/overview.tsx +6 -18
  92. package/dist/skill/reference/components/drawer/examples/screen.tsx +298 -0
  93. package/dist/skill/reference/components/dropdown/examples/examples.module.css +1 -5
  94. package/dist/skill/reference/components/empty-page/COMPONENT.md +1 -1
  95. package/dist/skill/reference/components/empty-page/examples/region-error.tsx +8 -2
  96. package/dist/skill/reference/components/example-frame/COMPONENT.md +3 -2
  97. package/dist/skill/reference/components/example-frame/examples/initial-view.tsx +44 -0
  98. package/dist/skill/reference/components/field-list/COMPONENT.md +2 -1
  99. package/dist/skill/reference/components/field-list/examples/errors.tsx +5 -2
  100. package/dist/skill/{patterns/record-editor.tsx → reference/components/field-list/examples/screen.tsx} +3 -43
  101. package/dist/skill/reference/components/file-upload/COMPONENT.md +7 -6
  102. package/dist/skill/reference/components/file-upload/examples/custom-body.tsx +2 -1
  103. package/dist/skill/reference/components/file-upload/examples/examples.module.css +1 -7
  104. package/dist/skill/reference/components/file-upload/examples/file-cards.tsx +10 -1
  105. package/dist/skill/reference/components/file-upload/examples/gallery.tsx +2 -2
  106. package/dist/skill/reference/components/file-upload/examples/in-form.tsx +4 -9
  107. package/dist/skill/reference/components/file-upload/examples/overview.tsx +5 -1
  108. package/dist/skill/reference/components/file-upload/examples/row-parts.tsx +24 -1
  109. package/dist/skill/{patterns/media-library.module.css → reference/components/file-upload/examples/screen.module.css} +2 -1
  110. package/dist/skill/reference/components/file-upload/examples/screen.tsx +646 -0
  111. package/dist/skill/reference/components/file-upload/examples/states.tsx +6 -2
  112. package/dist/skill/reference/components/file-upload/examples/validation.tsx +11 -2
  113. package/dist/skill/reference/components/file-upload/examples/variants.tsx +3 -20
  114. package/dist/skill/reference/components/gantt/COMPONENT.md +2 -1
  115. package/dist/skill/reference/components/gantt/examples/screen.module.css +14 -0
  116. package/dist/skill/{patterns/schedule.tsx → reference/components/gantt/examples/screen.tsx} +174 -170
  117. package/dist/skill/reference/components/gantt/examples/states.tsx +6 -2
  118. package/dist/skill/reference/components/input/COMPONENT.md +2 -2
  119. package/dist/skill/reference/components/input/examples/examples.module.css +0 -6
  120. package/dist/skill/reference/components/input/examples/in-form.tsx +1 -9
  121. package/dist/skill/reference/components/input/examples/password-strength.tsx +34 -8
  122. package/dist/skill/reference/components/input/examples/states.tsx +6 -1
  123. package/dist/skill/reference/components/kanban/COMPONENT.md +3 -2
  124. package/dist/skill/reference/components/kanban/examples/columns.tsx +8 -5
  125. package/dist/skill/reference/components/kanban/examples/screen.module.css +17 -0
  126. package/dist/skill/{patterns/kanban-board.tsx → reference/components/kanban/examples/screen.tsx} +130 -172
  127. package/dist/skill/reference/components/kanban/examples/states.tsx +17 -6
  128. package/dist/skill/reference/components/login-form/COMPONENT.md +6 -5
  129. package/dist/skill/reference/components/login-form/examples/examples.module.css +2 -21
  130. package/dist/skill/reference/components/login-form/examples/forgot-password.tsx +28 -32
  131. package/dist/skill/reference/components/login-form/examples/narrow.tsx +1 -1
  132. package/dist/skill/reference/components/login-form/examples/overview.tsx +45 -47
  133. package/dist/skill/reference/components/login-form/examples/register.tsx +64 -68
  134. package/dist/skill/reference/components/login-form/examples/reset-password.tsx +50 -47
  135. package/dist/skill/reference/components/login-form/examples/sizes.tsx +4 -6
  136. package/dist/skill/reference/components/login-form/examples/states.tsx +53 -57
  137. package/dist/skill/reference/components/login-form/examples/structure.tsx +18 -22
  138. package/dist/skill/reference/components/login-form/examples/verification-code.tsx +41 -45
  139. package/dist/skill/reference/components/media-viewer/COMPONENT.md +1 -1
  140. package/dist/skill/reference/components/media-viewer/examples/dismiss.tsx +5 -1
  141. package/dist/skill/reference/components/message/COMPONENT.md +4 -3
  142. package/dist/skill/reference/components/message/examples/file.tsx +5 -1
  143. package/dist/skill/reference/components/message/examples/media-open.tsx +48 -0
  144. package/dist/skill/reference/components/message/examples/status.tsx +21 -3
  145. package/dist/skill/reference/components/message/examples/text-formatting.tsx +7 -1
  146. package/dist/skill/reference/components/modal/COMPONENT.md +2 -1
  147. package/dist/skill/reference/components/modal/examples/custom-container.tsx +20 -20
  148. package/dist/skill/reference/components/modal/examples/dismiss.tsx +5 -3
  149. package/dist/skill/reference/components/modal/examples/enter-key.tsx +116 -0
  150. package/dist/skill/reference/components/modal/examples/examples.module.css +7 -13
  151. package/dist/skill/reference/components/modal/examples/structure.tsx +5 -2
  152. package/dist/skill/reference/components/native-select/COMPONENT.md +1 -1
  153. package/dist/skill/reference/components/native-select/examples/states.tsx +5 -1
  154. package/dist/skill/reference/components/notification/COMPONENT.md +1 -1
  155. package/dist/skill/reference/components/notification/examples/dismiss.tsx +2 -2
  156. package/dist/skill/reference/components/page-content/COMPONENT.md +1 -0
  157. package/dist/skill/reference/components/page-content/examples/list-detail.tsx +0 -3
  158. package/dist/skill/{patterns/settings-page.tsx → reference/components/page-content/examples/screen.tsx} +3 -3
  159. package/dist/skill/reference/components/page-content/examples/variants.tsx +4 -11
  160. package/dist/skill/reference/components/page-toolbar/COMPONENT.md +17 -15
  161. package/dist/skill/reference/components/page-toolbar/examples/narrow.tsx +6 -3
  162. package/dist/skill/reference/components/pagination/examples/controlled.tsx +29 -29
  163. package/dist/skill/reference/components/pagination/examples/examples.module.css +0 -2
  164. package/dist/skill/reference/components/progress-bar/COMPONENT.md +1 -1
  165. package/dist/skill/reference/components/progress-bar/examples/segments.tsx +2 -2
  166. package/dist/skill/reference/components/progress-circle/COMPONENT.md +1 -1
  167. package/dist/skill/reference/components/progress-circle/examples/segments.tsx +8 -3
  168. package/dist/skill/reference/components/radio/COMPONENT.md +1 -0
  169. package/dist/skill/reference/components/radio/examples/examples.module.css +14 -0
  170. package/dist/skill/reference/components/radio/examples/in-form.tsx +45 -0
  171. package/dist/skill/reference/components/scroll-container/COMPONENT.md +1 -0
  172. package/dist/skill/reference/components/scroll-container/examples/auto-scroll.tsx +3 -3
  173. package/dist/skill/reference/components/scroll-container/examples/chat.tsx +3 -3
  174. package/dist/skill/reference/components/scroll-container/examples/edges.tsx +6 -3
  175. package/dist/skill/reference/components/scroll-container/examples/examples.module.css +4 -17
  176. package/dist/skill/reference/components/scroll-container/examples/load-more.tsx +51 -0
  177. package/dist/skill/reference/components/scroll-container/examples/lock.tsx +3 -5
  178. package/dist/skill/reference/components/scroll-container/examples/overscroll.tsx +3 -3
  179. package/dist/skill/reference/components/scroll-container/examples/overview.tsx +3 -3
  180. package/dist/skill/reference/components/scroll-container/examples/scrollbar.tsx +13 -7
  181. package/dist/skill/reference/components/scroll-container/examples/variants.tsx +13 -7
  182. package/dist/skill/reference/components/segmented-control/COMPONENT.md +2 -2
  183. package/dist/skill/reference/components/segmented-control/examples/in-form.tsx +5 -1
  184. package/dist/skill/reference/components/segmented-control/examples/states.tsx +10 -1
  185. package/dist/skill/reference/components/select/COMPONENT.md +1 -1
  186. package/dist/skill/reference/components/select/examples/examples.module.css +2 -7
  187. package/dist/skill/reference/components/select/examples/states.tsx +13 -1
  188. package/dist/skill/reference/components/sheet/COMPONENT.md +2 -0
  189. package/dist/skill/reference/components/sheet/examples/guard.tsx +72 -0
  190. package/dist/skill/reference/components/sheet/examples/header-actions.tsx +56 -0
  191. package/dist/skill/reference/components/slider/COMPONENT.md +2 -1
  192. package/dist/skill/reference/components/slider/examples/examples.module.css +8 -0
  193. package/dist/skill/reference/components/slider/examples/in-form.tsx +47 -0
  194. package/dist/skill/reference/components/slider/examples/states.tsx +4 -1
  195. package/dist/skill/reference/components/smart-filter/COMPONENT.md +1 -1
  196. package/dist/skill/reference/components/smart-filter/examples/controlled.tsx +3 -3
  197. package/dist/skill/reference/components/smart-filter/examples/ranges.tsx +44 -10
  198. package/dist/skill/reference/components/sparkline/COMPONENT.md +1 -1
  199. package/dist/skill/reference/components/sparkline/examples/reference.tsx +2 -1
  200. package/dist/skill/reference/components/tabs/COMPONENT.md +1 -1
  201. package/dist/skill/reference/components/tabs/examples/sizes.tsx +1 -1
  202. package/dist/skill/reference/components/tag-select/COMPONENT.md +1 -1
  203. package/dist/skill/reference/components/tag-select/examples/states.tsx +8 -1
  204. package/dist/skill/reference/components/textarea/COMPONENT.md +1 -1
  205. package/dist/skill/reference/components/textarea/examples/examples.module.css +0 -6
  206. package/dist/skill/reference/components/textarea/examples/in-form.tsx +1 -9
  207. package/dist/skill/reference/components/textarea/examples/states.tsx +2 -1
  208. package/dist/skill/reference/components/thumbnail/COMPONENT.md +2 -1
  209. package/dist/skill/reference/components/thumbnail/examples/examples.module.css +1 -1
  210. package/dist/skill/reference/components/thumbnail/examples/fit.tsx +24 -0
  211. package/dist/skill/reference/components/thumbnail/examples/video.tsx +20 -1
  212. package/dist/skill/reference/components/timeline/COMPONENT.md +1 -1
  213. package/dist/skill/reference/components/timeline/examples/links.tsx +55 -14
  214. package/dist/skill/reference/components/tooltip/COMPONENT.md +1 -1
  215. package/dist/skill/reference/components/tooltip/examples/toolbar.tsx +2 -2
  216. package/dist/skill/reference/components/typography/examples/weights.tsx +3 -0
  217. package/dist/skill/reference/components/video-note/COMPONENT.md +2 -2
  218. package/dist/skill/reference/components/video-note/examples/controlled.tsx +19 -2
  219. package/dist/skill/reference/components/video-note/examples/in-message.tsx +5 -2
  220. package/dist/skill/reference/components/visually-hidden/COMPONENT.md +2 -1
  221. package/dist/skill/reference/components/visually-hidden/examples/assertive.tsx +39 -0
  222. package/dist/skill/reference/components/voice-player/COMPONENT.md +2 -2
  223. package/dist/skill/reference/components/voice-player/examples/call-recording.tsx +19 -9
  224. package/dist/skill/reference/components/voice-player/examples/controlled.tsx +20 -3
  225. package/dist/skill/reference/layout/app-header/COMPONENT.md +46 -63
  226. package/dist/skill/reference/layout/app-header/examples/breadcrumbs.tsx +10 -9
  227. package/dist/skill/reference/layout/app-header/examples/examples.module.css +1 -1
  228. package/dist/skill/reference/layout/app-header/examples/in-app-shell.tsx +0 -1
  229. package/dist/skill/reference/layout/app-header/examples/narrow.tsx +4 -5
  230. package/dist/skill/reference/layout/app-header/examples/overview.tsx +8 -10
  231. package/dist/skill/reference/layout/app-header/examples/page-title.tsx +3 -10
  232. package/dist/skill/reference/layout/app-shell/COMPONENT.md +4 -3
  233. package/dist/skill/reference/layout/app-shell/examples/overview.tsx +15 -30
  234. package/dist/skill/reference/layout/app-shell/examples/screen.tsx +262 -0
  235. package/dist/skill/reference/layout/app-shell/examples/template.tsx +29 -9
  236. package/dist/skill/reference/layout/sidebar/COMPONENT.md +7 -4
  237. package/dist/skill/reference/layout/sidebar/examples/account.tsx +2 -2
  238. package/dist/skill/reference/layout/sidebar/examples/collapsible-groups.tsx +12 -4
  239. package/dist/skill/reference/layout/sidebar/examples/custom-part.tsx +53 -0
  240. package/dist/skill/reference/layout/sidebar/examples/examples.module.css +5 -0
  241. package/dist/skill/reference/layout/sidebar/examples/narrow.tsx +53 -0
  242. package/dist/skill/reference/layout/sidebar/examples/persist.tsx +57 -0
  243. package/dist/skill/reference/layout/sidebar/examples/router.tsx +14 -2
  244. package/dist/skill/reference/layout/sidebar/examples/structure.tsx +7 -2
  245. package/dist/skill/responsive.md +2 -2
  246. package/package.json +1 -1
  247. package/src/components/avatar/examples/states.tsx +4 -4
  248. package/src/components/badge/examples/applied-filters.tsx +13 -19
  249. package/src/components/badge/examples/examples.module.css +1 -8
  250. package/src/components/badge/examples/server-tags.tsx +2 -6
  251. package/src/components/banner/examples/examples.module.css +1 -5
  252. package/src/components/banner/examples/page-strip.tsx +16 -22
  253. package/src/components/breadcrumb/COMPONENT.md +4 -3
  254. package/src/components/breadcrumb/examples/ellipsis.tsx +2 -2
  255. package/src/components/button-group/COMPONENT.md +2 -2
  256. package/src/components/button-group/examples/in-form.tsx +22 -2
  257. package/src/components/button-group/examples/states.tsx +10 -1
  258. package/src/components/card/COMPONENT.md +2 -1
  259. package/src/components/card/examples/screen.module.css +14 -0
  260. package/src/components/card/examples/screen.tsx +362 -0
  261. package/src/components/card/examples/variants.tsx +15 -1
  262. package/src/components/chart-frame/COMPONENT.md +2 -1
  263. package/src/components/chart-frame/examples/fill-height.tsx +119 -0
  264. package/src/components/chart-frame/examples/states.tsx +3 -1
  265. package/src/components/chat/COMPONENT.md +3 -1
  266. package/src/components/chat/examples/group-chat.tsx +15 -2
  267. package/src/components/chat/examples/reactions.tsx +121 -0
  268. package/src/components/chat/examples/screen.module.css +9 -0
  269. package/src/components/chat/examples/screen.tsx +718 -0
  270. package/src/components/chat-list/COMPONENT.md +1 -0
  271. package/src/components/chat-list/examples/links.tsx +72 -0
  272. package/src/components/checkbox/COMPONENT.md +1 -1
  273. package/src/components/checkbox/examples/examples.module.css +5 -1
  274. package/src/components/checkbox/examples/indicator.tsx +13 -7
  275. package/src/components/checkbox/examples/states.tsx +6 -1
  276. package/src/components/color-field/COMPONENT.md +1 -1
  277. package/src/components/color-picker/COMPONENT.md +4 -3
  278. package/src/components/color-picker/examples/controlled-open.tsx +37 -0
  279. package/src/components/color-picker/examples/presets.tsx +2 -2
  280. package/src/components/color-picker/examples/states.tsx +23 -14
  281. package/src/components/composer/COMPONENT.md +2 -1
  282. package/src/components/composer/examples/attach-menu.tsx +78 -0
  283. package/src/components/composer/examples/attachments.tsx +2 -2
  284. package/src/components/crossfade/COMPONENT.md +1 -0
  285. package/src/components/crossfade/examples/screen.module.css +40 -0
  286. package/src/components/crossfade/examples/screen.tsx +197 -0
  287. package/src/components/data-table/COMPONENT.md +3 -2
  288. package/src/components/data-table/examples/detail-panel.tsx +36 -37
  289. package/src/components/data-table/examples/examples.module.css +0 -12
  290. package/src/components/data-table/examples/numeric.tsx +36 -4
  291. package/src/components/data-table/examples/overview.tsx +1 -0
  292. package/src/components/data-table/examples/row-open.tsx +7 -36
  293. package/src/components/data-table/examples/screen.module.css +13 -0
  294. package/src/components/data-table/examples/screen.tsx +354 -0
  295. package/src/components/datepicker/COMPONENT.md +5 -4
  296. package/src/components/datepicker/examples/examples.module.css +2 -6
  297. package/src/components/datepicker/examples/in-form.tsx +47 -55
  298. package/src/components/datepicker/examples/locale.tsx +35 -0
  299. package/src/components/datepicker/examples/range-presets.tsx +11 -2
  300. package/src/components/datepicker/examples/states.tsx +9 -1
  301. package/src/components/description-list/COMPONENT.md +1 -0
  302. package/src/components/description-list/examples/screen.module.css +64 -0
  303. package/src/components/description-list/examples/screen.tsx +214 -0
  304. package/src/components/description-list/examples/structure.tsx +1 -1
  305. package/src/components/digit-input/COMPONENT.md +3 -1
  306. package/src/components/digit-input/examples/states.tsx +3 -1
  307. package/src/components/digit-input/examples/without-focus-ring.tsx +13 -0
  308. package/src/components/divider/examples/with-icon.tsx +2 -2
  309. package/src/components/dnd/COMPONENT.md +4 -2
  310. package/src/components/dnd/examples/drop-zones.tsx +82 -49
  311. package/src/components/dnd/examples/examples.module.css +50 -0
  312. package/src/components/dnd/examples/states.tsx +54 -0
  313. package/src/components/dnd/examples/table.tsx +113 -0
  314. package/src/components/drawer/COMPONENT.md +1 -0
  315. package/src/components/drawer/examples/dismiss.tsx +5 -3
  316. package/src/components/drawer/examples/examples.module.css +0 -13
  317. package/src/components/drawer/examples/header-actions.tsx +5 -9
  318. package/src/components/drawer/examples/overview.tsx +6 -18
  319. package/src/components/drawer/examples/screen.module.css +14 -0
  320. package/src/components/drawer/examples/screen.tsx +298 -0
  321. package/src/components/dropdown/examples/examples.module.css +1 -5
  322. package/src/components/empty-page/COMPONENT.md +1 -1
  323. package/src/components/empty-page/examples/region-error.tsx +8 -2
  324. package/src/components/example-frame/COMPONENT.md +3 -2
  325. package/src/components/example-frame/examples/initial-view.tsx +44 -0
  326. package/src/components/field-list/COMPONENT.md +2 -1
  327. package/src/components/field-list/examples/errors.tsx +5 -2
  328. package/src/components/field-list/examples/screen.module.css +18 -0
  329. package/src/components/field-list/examples/screen.tsx +316 -0
  330. package/src/components/file-upload/COMPONENT.md +7 -6
  331. package/src/components/file-upload/examples/custom-body.tsx +2 -1
  332. package/src/components/file-upload/examples/examples.module.css +1 -7
  333. package/src/components/file-upload/examples/file-cards.tsx +10 -1
  334. package/src/components/file-upload/examples/gallery.tsx +2 -2
  335. package/src/components/file-upload/examples/in-form.tsx +4 -9
  336. package/src/components/file-upload/examples/overview.tsx +5 -1
  337. package/src/components/file-upload/examples/row-parts.tsx +24 -1
  338. package/src/components/file-upload/examples/screen.module.css +45 -0
  339. package/src/components/file-upload/examples/screen.tsx +646 -0
  340. package/src/components/file-upload/examples/states.tsx +6 -2
  341. package/src/components/file-upload/examples/validation.tsx +11 -2
  342. package/src/components/file-upload/examples/variants.tsx +3 -20
  343. package/src/components/gantt/COMPONENT.md +2 -1
  344. package/src/components/gantt/examples/screen.module.css +14 -0
  345. package/src/components/gantt/examples/screen.tsx +726 -0
  346. package/src/components/gantt/examples/states.tsx +6 -2
  347. package/src/components/input/COMPONENT.md +2 -2
  348. package/src/components/input/examples/examples.module.css +0 -6
  349. package/src/components/input/examples/in-form.tsx +1 -9
  350. package/src/components/input/examples/password-strength.tsx +34 -8
  351. package/src/components/input/examples/states.tsx +6 -1
  352. package/src/components/kanban/COMPONENT.md +3 -2
  353. package/src/components/kanban/examples/columns.tsx +8 -5
  354. package/src/components/kanban/examples/screen.module.css +17 -0
  355. package/src/components/kanban/examples/screen.tsx +572 -0
  356. package/src/components/kanban/examples/states.tsx +17 -6
  357. package/src/components/login-form/COMPONENT.md +6 -5
  358. package/src/components/login-form/examples/examples.module.css +2 -21
  359. package/src/components/login-form/examples/forgot-password.tsx +28 -32
  360. package/src/components/login-form/examples/narrow.tsx +1 -1
  361. package/src/components/login-form/examples/overview.tsx +45 -47
  362. package/src/components/login-form/examples/register.tsx +64 -68
  363. package/src/components/login-form/examples/reset-password.tsx +50 -47
  364. package/src/components/login-form/examples/sizes.tsx +4 -6
  365. package/src/components/login-form/examples/states.tsx +53 -57
  366. package/src/components/login-form/examples/structure.tsx +18 -22
  367. package/src/components/login-form/examples/verification-code.tsx +41 -45
  368. package/src/components/media-viewer/COMPONENT.md +1 -1
  369. package/src/components/media-viewer/examples/dismiss.tsx +5 -1
  370. package/src/components/message/COMPONENT.md +4 -3
  371. package/src/components/message/examples/file.tsx +5 -1
  372. package/src/components/message/examples/media-open.tsx +48 -0
  373. package/src/components/message/examples/status.tsx +21 -3
  374. package/src/components/message/examples/text-formatting.tsx +7 -1
  375. package/src/components/modal/COMPONENT.md +2 -1
  376. package/src/components/modal/examples/custom-container.tsx +20 -20
  377. package/src/components/modal/examples/dismiss.tsx +5 -3
  378. package/src/components/modal/examples/enter-key.tsx +116 -0
  379. package/src/components/modal/examples/examples.module.css +7 -13
  380. package/src/components/modal/examples/structure.tsx +5 -2
  381. package/src/components/native-select/COMPONENT.md +1 -1
  382. package/src/components/native-select/examples/states.tsx +5 -1
  383. package/src/components/notification/COMPONENT.md +1 -1
  384. package/src/components/notification/examples/dismiss.tsx +2 -2
  385. package/src/components/page-content/COMPONENT.md +1 -0
  386. package/src/components/page-content/examples/list-detail.tsx +0 -3
  387. package/src/components/page-content/examples/screen.module.css +27 -0
  388. package/src/components/page-content/examples/screen.tsx +196 -0
  389. package/src/components/page-content/examples/variants.tsx +4 -11
  390. package/src/components/page-toolbar/COMPONENT.md +17 -15
  391. package/src/components/page-toolbar/examples/narrow.tsx +6 -3
  392. package/src/components/pagination/examples/controlled.tsx +29 -29
  393. package/src/components/pagination/examples/examples.module.css +0 -2
  394. package/src/components/progress-bar/COMPONENT.md +1 -1
  395. package/src/components/progress-bar/examples/segments.tsx +2 -2
  396. package/src/components/progress-circle/COMPONENT.md +1 -1
  397. package/src/components/progress-circle/examples/segments.tsx +8 -3
  398. package/src/components/radio/COMPONENT.md +1 -0
  399. package/src/components/radio/examples/examples.module.css +14 -0
  400. package/src/components/radio/examples/in-form.tsx +45 -0
  401. package/src/components/scroll-container/COMPONENT.md +1 -0
  402. package/src/components/scroll-container/examples/auto-scroll.tsx +3 -3
  403. package/src/components/scroll-container/examples/chat.tsx +3 -3
  404. package/src/components/scroll-container/examples/edges.tsx +6 -3
  405. package/src/components/scroll-container/examples/examples.module.css +4 -17
  406. package/src/components/scroll-container/examples/load-more.tsx +51 -0
  407. package/src/components/scroll-container/examples/lock.tsx +3 -5
  408. package/src/components/scroll-container/examples/overscroll.tsx +3 -3
  409. package/src/components/scroll-container/examples/overview.tsx +3 -3
  410. package/src/components/scroll-container/examples/scrollbar.tsx +13 -7
  411. package/src/components/scroll-container/examples/variants.tsx +13 -7
  412. package/src/components/segmented-control/COMPONENT.md +2 -2
  413. package/src/components/segmented-control/examples/in-form.tsx +5 -1
  414. package/src/components/segmented-control/examples/states.tsx +10 -1
  415. package/src/components/select/COMPONENT.md +1 -1
  416. package/src/components/select/examples/examples.module.css +2 -7
  417. package/src/components/select/examples/states.tsx +13 -1
  418. package/src/components/sheet/COMPONENT.md +2 -0
  419. package/src/components/sheet/examples/guard.tsx +72 -0
  420. package/src/components/sheet/examples/header-actions.tsx +56 -0
  421. package/src/components/slider/COMPONENT.md +2 -1
  422. package/src/components/slider/examples/examples.module.css +8 -0
  423. package/src/components/slider/examples/in-form.tsx +47 -0
  424. package/src/components/slider/examples/states.tsx +4 -1
  425. package/src/components/smart-filter/COMPONENT.md +1 -1
  426. package/src/components/smart-filter/examples/controlled.tsx +3 -3
  427. package/src/components/smart-filter/examples/ranges.tsx +44 -10
  428. package/src/components/sparkline/COMPONENT.md +1 -1
  429. package/src/components/sparkline/examples/reference.tsx +2 -1
  430. package/src/components/tabs/COMPONENT.md +1 -1
  431. package/src/components/tabs/examples/sizes.tsx +1 -1
  432. package/src/components/tag-select/COMPONENT.md +1 -1
  433. package/src/components/tag-select/examples/states.tsx +8 -1
  434. package/src/components/textarea/COMPONENT.md +1 -1
  435. package/src/components/textarea/examples/examples.module.css +0 -6
  436. package/src/components/textarea/examples/in-form.tsx +1 -9
  437. package/src/components/textarea/examples/states.tsx +2 -1
  438. package/src/components/thumbnail/COMPONENT.md +2 -1
  439. package/src/components/thumbnail/examples/examples.module.css +1 -1
  440. package/src/components/thumbnail/examples/fit.tsx +24 -0
  441. package/src/components/thumbnail/examples/video.tsx +20 -1
  442. package/src/components/timeline/COMPONENT.md +1 -1
  443. package/src/components/timeline/examples/links.tsx +55 -14
  444. package/src/components/tooltip/COMPONENT.md +1 -1
  445. package/src/components/tooltip/examples/toolbar.tsx +2 -2
  446. package/src/components/typography/examples/weights.tsx +3 -0
  447. package/src/components/video-note/COMPONENT.md +2 -2
  448. package/src/components/video-note/examples/controlled.tsx +19 -2
  449. package/src/components/video-note/examples/in-message.tsx +5 -2
  450. package/src/components/visually-hidden/COMPONENT.md +2 -1
  451. package/src/components/visually-hidden/examples/assertive.tsx +39 -0
  452. package/src/components/voice-player/COMPONENT.md +2 -2
  453. package/src/components/voice-player/examples/call-recording.tsx +19 -9
  454. package/src/components/voice-player/examples/controlled.tsx +20 -3
  455. package/src/layout/app-header/COMPONENT.md +46 -63
  456. package/src/layout/app-header/examples/breadcrumbs.tsx +10 -9
  457. package/src/layout/app-header/examples/examples.module.css +1 -1
  458. package/src/layout/app-header/examples/in-app-shell.tsx +0 -1
  459. package/src/layout/app-header/examples/narrow.tsx +4 -5
  460. package/src/layout/app-header/examples/overview.tsx +8 -10
  461. package/src/layout/app-header/examples/page-title.tsx +3 -10
  462. package/src/layout/app-shell/COMPONENT.md +4 -3
  463. package/src/layout/app-shell/examples/overview.tsx +15 -30
  464. package/src/layout/app-shell/examples/screen.module.css +11 -0
  465. package/src/layout/app-shell/examples/screen.tsx +262 -0
  466. package/src/layout/app-shell/examples/template.tsx +29 -9
  467. package/src/layout/sidebar/COMPONENT.md +7 -4
  468. package/src/layout/sidebar/examples/account.tsx +2 -2
  469. package/src/layout/sidebar/examples/collapsible-groups.tsx +12 -4
  470. package/src/layout/sidebar/examples/custom-part.tsx +53 -0
  471. package/src/layout/sidebar/examples/examples.module.css +5 -0
  472. package/src/layout/sidebar/examples/narrow.tsx +53 -0
  473. package/src/layout/sidebar/examples/persist.tsx +57 -0
  474. package/src/layout/sidebar/examples/router.tsx +14 -2
  475. package/src/layout/sidebar/examples/structure.tsx +7 -2
  476. package/dist/skill/patterns/app-shell.tsx +0 -303
  477. package/dist/skill/patterns/chat.module.css +0 -8
  478. package/dist/skill/patterns/dashboard.tsx +0 -340
  479. package/dist/skill/patterns/detail-page.tsx +0 -206
  480. package/dist/skill/patterns/form-drawer.tsx +0 -240
  481. package/dist/skill/patterns/kanban-board.module.css +0 -28
  482. package/dist/skill/patterns/media-library.tsx +0 -637
  483. package/dist/skill/patterns/schedule.module.css +0 -22
  484. package/dist/skill/patterns/screen-states.tsx +0 -187
  485. /package/dist/skill/{patterns/dashboard.module.css → reference/components/card/examples/screen.module.css} +0 -0
  486. /package/dist/skill/{patterns/screen-states.module.css → reference/components/crossfade/examples/screen.module.css} +0 -0
  487. /package/dist/skill/{patterns/form-drawer.module.css → reference/components/drawer/examples/screen.module.css} +0 -0
  488. /package/dist/skill/{patterns/record-editor.module.css → reference/components/field-list/examples/screen.module.css} +0 -0
  489. /package/dist/skill/{patterns/settings-page.module.css → reference/components/page-content/examples/screen.module.css} +0 -0
  490. /package/dist/skill/{patterns/app-shell.module.css → reference/layout/app-shell/examples/screen.module.css} +0 -0
@@ -1,14 +1,15 @@
1
1
  # Layouts — app frame, page wrappers, auth
2
2
 
3
3
  Every screen sits in one frame: `AppShell.Root` with Nav / `AppHeader` / Main (the content panel is the page,
4
- the nav rail one layer above it) → `PageContent` (header + body). `AppShell.Main` carries the page gutters
5
- and `PageContent` spaces the page — blocks 24, a titled `PageContent.Section` 40, tiles in a
6
- `PageContent.Grid` 16 on both axes — so your code adds **no outer padding and no margins**. Your CSS only lays out the inside of a block (grids, rows) with `gap` on `--prime-space-*`.
7
- Main's top space under the header is part of the frame — 24, then 32 from 1024px: a page header starts
8
- there; never cancel it with a negative margin or a padding override.
4
+ the nav rail one layer above it). The `AppHeader` belongs to the page — it carries the page title and
5
+ the page's tools ([composition.md](composition.md#1-page-skeleton)); `PageContent` holds the body.
6
+ `AppShell.Main` carries the page gutters and `PageContent` spaces the page — blocks 24, a titled
7
+ `PageContent.Section` 40, tiles in a `PageContent.Grid` 16 on both axes — so your code adds **no outer padding and no margins**. Your CSS only lays out the inside of a block (grids, rows) with `gap` on `--prime-space-*`.
8
+ Main's top air under the header is part of the frame — 24, then 32 from 1024px: the page's first block
9
+ starts there; never cancel it with a negative margin or a padding override.
9
10
 
10
- The page recipes are whole, working screens in [patterns/](patterns/) — start from the closest one
11
- ([the list](composition.md#patterns)) and keep its skeleton. The rules behind them are in [composition.md](composition.md).
11
+ The page recipes are whole, working screens — the `screen.tsx` example of their main component
12
+ ([the list](composition.md#screens)): start from the closest one and keep its skeleton. The rules behind them are in [composition.md](composition.md).
12
13
 
13
14
  ## App frame (once per app)
14
15
 
@@ -16,18 +17,31 @@ Every `Sidebar.Item` gets a `Sidebar.ItemIcon` (in compact mode only icons remai
16
17
  `href`, or `asChild` with the router's `NavLink`; `current` marks the current page (`aria-current`), a
17
18
  router link sets it itself. Counters go in `Sidebar.ItemCount`. Below 768px the Sidebar becomes an
18
19
  off-canvas panel — the app must render a menu button that opens it, otherwise navigation is unreachable
19
- on phones. `AppHeader` is the top bar of the panel on every width: `AppHeader.MenuButton` shows itself
20
- below 768px (the Sidebar's own breakpoint), the title says where you are, `AppHeader.Search` opens the
21
- CommandMenu and folds into an icon on a narrow header. Its row is as high as the Sidebar brand row, so
22
- the brand and the title read as one line.
20
+ on phones. `AppHeader` is the top bar of the panel on every width, and its row is the page's: the
21
+ frame gives it the menu button (`AppHeader.MenuButton` shows itself below 768px, the Sidebar's own
22
+ breakpoint); each page gives it its title, a line of data, its own buttons and its tools. The row is
23
+ as high as the Sidebar brand row, so the brand and the title read as one line. Nothing app-wide goes
24
+ into it — no global search, no notifications: the header row is per page.
23
25
 
24
26
  ```tsx
25
27
  import { AppHeader, AppShell, Icon, NotificationProvider, Sidebar } from "prime-ui-kit";
26
28
  import { type ReactNode, useState } from "react";
27
29
 
28
- type AppLayoutProps = { title: string; onSearch: () => void; children: ReactNode };
29
-
30
- export function AppLayout({ title, onSearch, children }: AppLayoutProps) {
30
+ type AppLayoutProps = {
31
+ /** The page title — the page's h1; leave it out on a document page (its title is in main). */
32
+ title?: ReactNode;
33
+ /** One line of data under the title. */
34
+ description?: ReactNode;
35
+ /** The path up on a nested record: a `Breadcrumb.Root`. */
36
+ path?: ReactNode;
37
+ /** The page's own buttons in the title row. */
38
+ actions?: ReactNode;
39
+ /** The page's tools: a `PageToolbar.Root`. */
40
+ tools?: ReactNode;
41
+ children: ReactNode;
42
+ };
43
+
44
+ export function AppLayout({ title, description, path, actions, tools, children }: AppLayoutProps) {
31
45
  const [menuOpen, setMenuOpen] = useState(false);
32
46
  return (
33
47
  <NotificationProvider>
@@ -79,10 +93,21 @@ export function AppLayout({ title, onSearch, children }: AppLayoutProps) {
79
93
  <AppHeader.Root>
80
94
  <AppHeader.Start>
81
95
  <AppHeader.MenuButton aria-expanded={menuOpen} onClick={() => setMenuOpen(true)} />
82
- <AppHeader.Title>{title}</AppHeader.Title>
96
+ {path ? (
97
+ <>
98
+ {path}
99
+ <AppHeader.Separator />
100
+ </>
101
+ ) : null}
102
+ {title ? (
103
+ <AppHeader.Title>
104
+ {title}
105
+ {description ? <AppHeader.Description>{description}</AppHeader.Description> : null}
106
+ </AppHeader.Title>
107
+ ) : null}
83
108
  </AppHeader.Start>
84
- {/* Opens the app's CommandMenu; bind ⌘K to the same handler. */}
85
- <AppHeader.Search onClick={onSearch}>Поиск заказов и клиентов</AppHeader.Search>
109
+ {actions ? <AppHeader.Actions>{actions}</AppHeader.Actions> : null}
110
+ {tools ? <AppHeader.Tools>{tools}</AppHeader.Tools> : null}
86
111
  </AppHeader.Root>
87
112
  <AppShell.Main>{children}</AppShell.Main>
88
113
  </AppShell.Root>
@@ -91,6 +116,11 @@ export function AppLayout({ title, onSearch, children }: AppLayoutProps) {
91
116
  }
92
117
  ```
93
118
 
119
+ Each page renders `AppLayout` with its own header content:
120
+ `<AppLayout title="Заказы" description="128 в работе · 6 ждут оплаты" tools={<OrdersToolbar />}>`.
121
+ A document page (settings, a long form, help) passes no `title` and opens its body with
122
+ `PageContent.Header`.
123
+
94
124
  Phone navigation for 2–6 main sections is a `BottomNav.Root` in `AppShell.Footer` (the last child of
95
125
  `AppShell.Root`, or the Template `footer` prop) — never in Main, never `position: fixed`, never behind
96
126
  your own media query. The shell hides the footer while the Sidebar rail is on screen and shows it
@@ -101,21 +131,19 @@ Next.js App Router: the package is marked `"use client"`, but a server component
101
131
  `"use client"` and render them from `app/layout.tsx` and the pages; import `bundle.css` in the root
102
132
  layout and put `data-theme` on `<html>` there.
103
133
 
104
- A nested record page keeps its `Breadcrumb` at the top of `PageContent.Header`, above the title
105
- ([patterns/detail-page.tsx](patterns/detail-page.tsx)) — not in `AppHeader`. `AppHeader.Actions` holds at most notifications, the account and one primary action; page
106
- actions stay in `PageContent.Actions`. With `offCanvas="always"` pass `show="always"` to the menu button.
107
-
108
- ### The page title in the header
134
+ A nested record page puts the path up before its title in the header — `Breadcrumb` (the list it
135
+ belongs to), `AppHeader.Separator`, `AppHeader.Title` with the record's name and its status as
136
+ the description ([the detail page](reference/components/description-list/examples/screen.tsx)). With
137
+ `offCanvas="always"` pass `show="always"` to the menu button.
109
138
 
110
- A page that wants all its height for the work (a board, a chat, a dense register) may drop the
111
- heading row in main and let the header carry the page — one or the other, never both:
139
+ ### The page's tools in the header
112
140
 
113
- - `AppHeader.Title as="h1"` is the page's only `<h1>` (the description stays outside its name);
114
- main then has no `PageContent.Header`.
115
- - The page's tools — sections, the period, filters, the page's primary action — go into
116
- `AppHeader.Tools` as a `PageToolbar.Root`: the header's second row, full width, sticky with it. The
117
- toolbar lays itself out from that width (one row when wide, two on a phone), so the tools wrap
118
- under the title instead of squeezing it. `AppHeader.Actions` keeps notifications and the account.
141
+ The page's tools — its own search and filters, sections, the period or view, the primary action —
142
+ go into `AppHeader.Tools` as a `PageToolbar.Root`: the header's second row, full width, sticky with
143
+ it. The toolbar lays itself out from that width (one row when wide, stacked rows on a phone, the
144
+ primary action on its own row when the search would be squeezed), so the tools wrap under the title
145
+ instead of squeezing it. `AppHeader.Actions` keeps the page's other buttons (export, a more menu) in
146
+ the title row.
119
147
 
120
148
  ```tsx
121
149
  import { AppHeader, Button, Icon, PageToolbar, SegmentedControl } from "prime-ui-kit";
@@ -126,7 +154,10 @@ export function DealsHeader({ view, onViewChange }: DealsHeaderProps) {
126
154
  return (
127
155
  <AppHeader.Root>
128
156
  <AppHeader.Start>
129
- <AppHeader.Title as="h1">Сделки</AppHeader.Title>
157
+ <AppHeader.Title>
158
+ Сделки
159
+ <AppHeader.Description>7 сделок в работе · 6 461 750 ₽</AppHeader.Description>
160
+ </AppHeader.Title>
130
161
  </AppHeader.Start>
131
162
  <AppHeader.Tools>
132
163
  <PageToolbar.Root aria-label="Сделки">
@@ -181,11 +212,13 @@ from what people do, not from how the backend is split. The full guide with the
181
212
 
182
213
  ## Page wrapper
183
214
 
184
- - App pages with actions (dashboard, list, detail): `PageContent.Page` — the full width of the panel.
185
- - Settings and long forms: `PageContent.Root maxWidth="wide"` with a `PageContent.Section layout="aside"`
186
- (heading column + panel) per section ([patterns/settings-page.tsx](patterns/settings-page.tsx)), or `maxWidth="readable"` for a single
215
+ - App pages (dashboard, list, detail, a board): `PageContent.Page` — the full width of the panel; the
216
+ page's title and tools are in its `AppHeader`, the body starts with its first block.
217
+ - Document pages — settings and long forms: `PageContent.Root maxWidth="wide"` with `PageContent.Header`
218
+ (the page's h1) and a `PageContent.Section layout="aside"`
219
+ (heading column + panel) per section ([the settings page](reference/components/page-content/examples/screen.tsx)), or `maxWidth="readable"` for a single
187
220
  narrow column of fields.
188
- - Long reading text (terms, help): `PageContent.Root maxWidth="readable"`.
221
+ - Long reading text (terms, help): `PageContent.Root maxWidth="readable"` with `PageContent.Header`.
189
222
  - A page as high as the panel (a log, a board, a chat): `AppShell.Root fillViewport` +
190
223
  `PageContent.Root fill`; the body passes its free height to a filling child — DataTable
191
224
  `scrollHeight="fill"`, Crossfade `fill`, `PageContent.Split`. Never compute heights from `100vh`.
@@ -196,9 +229,9 @@ from what people do, not from how the backend is split. The full guide with the
196
229
  (`anchor="end"` for a thread). The records in the list pane are a `List` (`current` on the open
197
230
  one). Details that open over a table and close again are a Drawer instead.
198
231
 
199
- ## Which pattern to start from
232
+ ## Which screen to start from
200
233
 
201
- The table of screens and their patterns lives in [composition.md](composition.md#patterns).
234
+ The table of screens lives in [composition.md](composition.md#screens).
202
235
 
203
236
  A short form (≤ 4 fields: rename, invite, confirm with a reason) belongs in a `Modal` with the same
204
237
  form rules: `Modal.Body` holds the `<form id>`, `Modal.Footer` holds Cancel + submit with `form={id}`
@@ -7,7 +7,7 @@ export default function AvatarStatesExample() {
7
7
  return (
8
8
  <div>
9
9
  <div>
10
- <Avatar.Root size="xl" color="green">
10
+ <Avatar.Root color="green">
11
11
  <Avatar.Image src={PHOTO} alt="Михаил Котов" />
12
12
  <Avatar.Fallback>МК</Avatar.Fallback>
13
13
  </Avatar.Root>
@@ -16,7 +16,7 @@ export default function AvatarStatesExample() {
16
16
  </Typography>
17
17
  </div>
18
18
  <div>
19
- <Avatar.Root size="xl" color="orange">
19
+ <Avatar.Root color="orange">
20
20
  <Avatar.Image src="https://example.com/missing-avatar.png" alt="Сергей Лебедев" />
21
21
  <Avatar.Fallback>СЛ</Avatar.Fallback>
22
22
  </Avatar.Root>
@@ -25,9 +25,9 @@ export default function AvatarStatesExample() {
25
25
  </Typography>
26
26
  </div>
27
27
  <div>
28
- <Avatar.Root size="xl" aria-label="Гость">
28
+ <Avatar.Root aria-label="Гость">
29
29
  <Avatar.Fallback>
30
- <Icon name="field.email" />
30
+ <Icon name="object.user" />
31
31
  </Avatar.Fallback>
32
32
  </Avatar.Root>
33
33
  <Typography as="span" variant="caption" tone="muted">
@@ -8,23 +8,9 @@ const INITIAL = ["Москва", "Санкт-Петербург", "Есть в
8
8
 
9
9
  export default function BadgeAppliedFiltersExample() {
10
10
  const [filters, setFilters] = React.useState(INITIAL);
11
- const titleId = React.useId();
12
11
 
13
12
  return (
14
- <section className={styles.filters} aria-labelledby={titleId}>
15
- <div className={styles.filtersHeader}>
16
- <Typography as="h3" variant="title-s" id={titleId}>
17
- Фильтры
18
- </Typography>
19
- <Button.Root
20
- variant="ghost"
21
- tone="neutral"
22
- size="s"
23
- onClick={() => setFilters(filters.length > 0 ? [] : INITIAL)}
24
- >
25
- {filters.length > 0 ? "Сбросить все" : "Вернуть"}
26
- </Button.Root>
27
- </div>
13
+ <div className={styles.filters}>
28
14
  {filters.length > 0 ? (
29
15
  <div className={styles.badges}>
30
16
  {filters.map((label) => (
@@ -36,12 +22,20 @@ export default function BadgeAppliedFiltersExample() {
36
22
  {label}
37
23
  </Badge.Root>
38
24
  ))}
25
+ <Button.Root variant="ghost" tone="neutral" size="s" onClick={() => setFilters([])}>
26
+ Сбросить все
27
+ </Button.Root>
39
28
  </div>
40
29
  ) : (
41
- <Typography variant="body-s" tone="muted">
42
- Фильтры не выбраны — показаны все товары.
43
- </Typography>
30
+ <div className={styles.badges}>
31
+ <Typography variant="body-s" tone="muted">
32
+ Фильтры не выбраны — показаны все товары.
33
+ </Typography>
34
+ <Button.Root variant="ghost" tone="neutral" size="s" onClick={() => setFilters(INITIAL)}>
35
+ Вернуть
36
+ </Button.Root>
37
+ </div>
44
38
  )}
45
- </section>
39
+ </div>
46
40
  );
47
41
  }
@@ -10,20 +10,13 @@
10
10
  width: min(100%, var(--prime-modal-width-m));
11
11
  }
12
12
 
13
- /* applied-filters.tsx: a filter panel above a list. */
13
+ /* applied-filters.tsx, server-tags.tsx: a row of badges above a list. */
14
14
  .filters {
15
15
  display: grid;
16
16
  gap: var(--prime-space-3);
17
17
  width: min(100%, var(--prime-modal-width-s));
18
18
  }
19
19
 
20
- .filtersHeader {
21
- display: flex;
22
- align-items: center;
23
- justify-content: space-between;
24
- gap: var(--prime-space-3);
25
- }
26
-
27
20
  .badges {
28
21
  display: flex;
29
22
  flex-wrap: wrap;
@@ -19,13 +19,9 @@ function deleteTag(tag: string) {
19
19
  export default function BadgeServerTagsExample() {
20
20
  const [tags, setTags] = React.useState(TAGS);
21
21
  const [failure, setFailure] = React.useState<string | null>(null);
22
- const titleId = React.useId();
23
22
 
24
23
  return (
25
- <section className={styles.filters} aria-labelledby={titleId}>
26
- <Typography as="h3" variant="title-s" id={titleId}>
27
- Теги заказа № 4821
28
- </Typography>
24
+ <div className={styles.filters}>
29
25
  <div className={styles.badges}>
30
26
  {tags.map((tag) => (
31
27
  <Badge.Root
@@ -56,6 +52,6 @@ export default function BadgeServerTagsExample() {
56
52
  {failure}
57
53
  </Typography>
58
54
  ) : null}
59
- </section>
55
+ </div>
60
56
  );
61
57
  }
@@ -8,7 +8,7 @@
8
8
  min-width: 0;
9
9
  }
10
10
 
11
- /* placement.tsx: a page frame above a card. */
11
+ /* page-strip.tsx: the page strip above a card with an inset banner. */
12
12
  .sections {
13
13
  display: flex;
14
14
  flex-direction: column;
@@ -17,10 +17,6 @@
17
17
  min-width: 0;
18
18
  }
19
19
 
20
- .pageBody {
21
- padding: var(--prime-space-5) var(--prime-space-4) var(--prime-space-8);
22
- }
23
-
24
20
  /* narrow.tsx: a 320px column; the banner's container query moves actions under the text. */
25
21
  .narrow {
26
22
  width: min(100%, calc(var(--prime-space-20) * 4));
@@ -1,32 +1,26 @@
1
1
  /** An edge-to-edge strip above a page and a rounded block inside a card — `placement`. */
2
- import { Banner, Button, Card, Icon, Typography } from "prime-ui-kit";
2
+ import { Banner, Button, Card, Icon } from "prime-ui-kit";
3
3
 
4
4
  import styles from "./examples.module.css";
5
5
 
6
6
  export default function BannerPageStripExample() {
7
7
  return (
8
8
  <div className={styles.sections}>
9
- <Card.Root>
10
- <Banner.Root
11
- tone="warning"
12
- placement="page"
13
- role="region"
14
- aria-label="Пробный период"
15
- onDismiss={() => undefined}
16
- >
17
- <Banner.Content>
18
- <Banner.Icon>
19
- <Icon name="status.warning" />
20
- </Banner.Icon>
21
- <Banner.Title>Пробный период закончится 12 октября</Banner.Title>
22
- </Banner.Content>
23
- </Banner.Root>
24
- <div className={styles.pageBody}>
25
- <Typography as="h3" variant="heading-s">
26
- Отчёты
27
- </Typography>
28
- </div>
29
- </Card.Root>
9
+ {/* In an app the strip stands first in the page, edge to edge above its content. */}
10
+ <Banner.Root
11
+ tone="warning"
12
+ placement="page"
13
+ role="region"
14
+ aria-label="Пробный период"
15
+ onDismiss={() => undefined}
16
+ >
17
+ <Banner.Content>
18
+ <Banner.Icon>
19
+ <Icon name="status.warning" />
20
+ </Banner.Icon>
21
+ <Banner.Title>Пробный период закончится 12 октября</Banner.Title>
22
+ </Banner.Content>
23
+ </Banner.Root>
30
24
  <Card.Root variant="panel">
31
25
  <Card.Header>
32
26
  <Card.Title>Оплата</Card.Title>
@@ -85,13 +85,14 @@ Use links for every ancestor and `current` on the last item; `s` above a `headin
85
85
  |---|---|---|
86
86
  | current | `current` | `aria-current="page"` on the text span, or on the link when the item has `href` |
87
87
  | hover / focus-visible on links | pointer / keyboard | text → primary; focus ring from LinkButton |
88
- | truncation | width | each level truncates with an ellipsis, max width `2 × --prime-space-24` (192; `--prime-space-24 + --prime-space-6`, 120, in a container below 30rem); the last item shrinks last |
88
+ | truncation | width | each level truncates with an ellipsis, max width `2 × --prime-space-24` (192; `--prime-space-24 + --prime-space-6`, 120, when its container is below 30rem — its own for 3+ levels, the nearest one above for 1–2); the last item shrinks last |
89
89
  | auto-collapse | 3+ levels and a container `< 30rem` | `data-collapsible="true"`; middle levels are `display: none` and replaced by «… ›», whose hidden text (`labels.ellipsis`) names them |
90
90
 
91
91
  Root attributes: `data-size`, `data-collapsible` (`"true"` / `"false"`).
92
92
 
93
93
  ## Layout & spacing
94
- - The root is a size container (`container-type: inline-size`, `inline-size: 100%`): inside a flex row give it `flex: 1 1 auto; min-width: 0`.
94
+ - A path of 1–2 levels takes its content width (at most the row), so in a flex row — the `AppHeader` start, before `AppHeader.Separator` and the title — what follows stands right after it. A path of 3+ levels is a size container (`container-type: inline-size`, `inline-size: 100%`) that folds its middle levels by its own width: inside a flex row give it `flex: 1 1 auto; min-width: 0`.
95
+ - In an `AppHeader` the path up holds the list a record belongs to (1–2 levels); the record itself is the `AppHeader.Title` after the separator, not the breadcrumb's `current` item.
95
96
  - Above a page title: `gap: var(--prime-space-2)` between the trail and the title row.
96
97
  - The list never wraps. Chevrons sit inside each level after the first, in the placeholder text color, at the tier icon size.
97
98
 
@@ -124,7 +125,7 @@ Root attributes: `data-size`, `data-collapsible` (`"true"` / `"false"`).
124
125
  | [sizes.tsx](examples/sizes.tsx) | Every size tier; text and chevrons follow the control tier — `size`. |
125
126
  | [with-icon.tsx](examples/with-icon.tsx) | The root level as a home icon; a link without text is named for screen readers — `aria-label`. |
126
127
  | [overflow.tsx](examples/overflow.tsx) | A long path: levels truncate, and in a 320px container the middle ones collapse into «…», which screen readers announce as hidden levels — `Breadcrumb.Item`, `current`. |
127
- | [ellipsis.tsx](examples/ellipsis.tsx) | Levels skipped on purpose shown as «…» with hidden text for screen readers — `Breadcrumb.Ellipsis`. |
128
+ | [ellipsis.tsx](examples/ellipsis.tsx) | Levels skipped on purpose shown as «…» whose hidden text names them for screen readers — `Breadcrumb.Ellipsis`, `labels`. |
128
129
 
129
130
  ## Mistakes
130
131
  - Separators by hand between items → the root draws the chevrons.
@@ -1,9 +1,9 @@
1
- /** Levels skipped on purpose shown as «…» with hidden text for screen readers — `Breadcrumb.Ellipsis`. */
1
+ /** Levels skipped on purpose shown as «…» whose hidden text names them for screen readers — `Breadcrumb.Ellipsis`, `labels`. */
2
2
  import { Breadcrumb } from "prime-ui-kit";
3
3
 
4
4
  export default function BreadcrumbEllipsisExample() {
5
5
  return (
6
- <Breadcrumb.Root>
6
+ <Breadcrumb.Root labels={{ ellipsis: "Скрытые разделы: Мебель, Офисные кресла" }}>
7
7
  <Breadcrumb.Item href="#catalog">Каталог</Breadcrumb.Item>
8
8
  <Breadcrumb.Ellipsis />
9
9
  <Breadcrumb.Item current>Кресло «Оптима»</Breadcrumb.Item>
@@ -152,12 +152,12 @@ Group attributes: `data-size`, `data-orientation="vertical"` (only when vertical
152
152
  |---|---|
153
153
  | [overview.tsx](examples/overview.tsx) | Related actions joined into one bar with a group name — `aria-label`. |
154
154
  | [sizes.tsx](examples/sizes.tsx) | Every size tier, 28 to 48 px high, set once on the root — `size`. |
155
- | [states.tsx](examples/states.tsx) | A plain segment, a toggled one and a disabled one — `pressed`, `disabled`. |
155
+ | [states.tsx](examples/states.tsx) | A plain segment, a toggled one, a disabled one and a group in error — `pressed`, `disabled`, `invalid`. |
156
156
  | [with-icon.tsx](examples/with-icon.tsx) | An icon before the label and square icon-only segments — `ButtonGroup.Icon`, `aria-label`. |
157
157
  | [orientation.tsx](examples/orientation.tsx) | A row of segments and a column of related options — `orientation`. |
158
158
  | [full-width.tsx](examples/full-width.tsx) | The group fills its column and the segments share the width equally — `fullWidth`. |
159
159
  | [controlled.tsx](examples/controlled.tsx) | One of several: the active segment lives in parent state and gets `pressed`. |
160
- | [in-form.tsx](examples/in-form.tsx) | A task form: the priority toggles are a labelled field checked on submit, and native submit and reset segments sit in one group — `label`, `required`, `error`, `type`. |
160
+ | [in-form.tsx](examples/in-form.tsx) | A task form: the priority toggles are a labelled field checked on submit, an optional reminder, and native submit and reset segments in one group — `label`, `required`, `hint`, `error`, `optional`, `type`. |
161
161
 
162
162
  ## Mistakes
163
163
  - `size` on each `ButtonGroup.Item` → set `size` once on `Root`.
@@ -1,4 +1,4 @@
1
- /** A task form: the priority toggles are a labelled field checked on submit, and native submit and reset segments sit in one group — `label`, `required`, `error`, `type`. */
1
+ /** A task form: the priority toggles are a labelled field checked on submit, an optional reminder, and native submit and reset segments in one group — `label`, `required`, `hint`, `error`, `optional`, `type`. */
2
2
  import { ButtonGroup, Input } from "prime-ui-kit";
3
3
  import * as React from "react";
4
4
 
@@ -10,8 +10,11 @@ const PRIORITIES = [
10
10
  { value: "high", label: "Высокий" },
11
11
  ];
12
12
 
13
+ const REMINDERS = ["За час", "За день"];
14
+
13
15
  export default function ButtonGroupInFormExample() {
14
16
  const [priority, setPriority] = React.useState("");
17
+ const [reminder, setReminder] = React.useState("");
15
18
  const [error, setError] = React.useState<string>();
16
19
 
17
20
  return (
@@ -24,6 +27,7 @@ export default function ButtonGroupInFormExample() {
24
27
  }}
25
28
  onReset={() => {
26
29
  setPriority("");
30
+ setReminder("");
27
31
  setError(undefined);
28
32
  }}
29
33
  >
@@ -32,7 +36,12 @@ export default function ButtonGroupInFormExample() {
32
36
  <Input.Field name="title" defaultValue="Подготовить акт сверки для «Северного ветра»" />
33
37
  </Input.Wrapper>
34
38
  </Input.Root>
35
- <ButtonGroup.Root label="Приоритет" required error={error}>
39
+ <ButtonGroup.Root
40
+ label="Приоритет"
41
+ required
42
+ hint="Высокий поднимает задачу в начало списка"
43
+ error={error}
44
+ >
36
45
  {PRIORITIES.map((option) => (
37
46
  <ButtonGroup.Item
38
47
  key={option.value}
@@ -46,6 +55,17 @@ export default function ButtonGroupInFormExample() {
46
55
  </ButtonGroup.Item>
47
56
  ))}
48
57
  </ButtonGroup.Root>
58
+ <ButtonGroup.Root label="Напомнить" optional>
59
+ {REMINDERS.map((option) => (
60
+ <ButtonGroup.Item
61
+ key={option}
62
+ pressed={reminder === option}
63
+ onClick={() => setReminder(reminder === option ? "" : option)}
64
+ >
65
+ {option}
66
+ </ButtonGroup.Item>
67
+ ))}
68
+ </ButtonGroup.Root>
49
69
  <ButtonGroup.Root aria-label="Создать задачу или очистить форму">
50
70
  <ButtonGroup.Item type="submit">Создать</ButtonGroup.Item>
51
71
  <ButtonGroup.Item type="reset">Очистить</ButtonGroup.Item>
@@ -1,4 +1,4 @@
1
- /** A plain segment, a toggled one and a disabled one — `pressed`, `disabled`. */
1
+ /** A plain segment, a toggled one, a disabled one and a group in error — `pressed`, `disabled`, `invalid`. */
2
2
  import { ButtonGroup, Typography } from "prime-ui-kit";
3
3
 
4
4
  export default function ButtonGroupStatesExample() {
@@ -28,6 +28,15 @@ export default function ButtonGroupStatesExample() {
28
28
  disabled
29
29
  </Typography>
30
30
  </div>
31
+ <div>
32
+ <ButtonGroup.Root aria-label="Статус задачи" invalid>
33
+ <ButtonGroup.Item>Открыта</ButtonGroup.Item>
34
+ <ButtonGroup.Item>В работе</ButtonGroup.Item>
35
+ </ButtonGroup.Root>
36
+ <Typography as="span" variant="caption" tone="muted">
37
+ invalid
38
+ </Typography>
39
+ </div>
31
40
  </div>
32
41
  );
33
42
  }
@@ -194,13 +194,14 @@ No `labels`.
194
194
  | Example | Shows |
195
195
  |---|---|
196
196
  | [overview.tsx](examples/overview.tsx) | A company settings panel: a header, fields on the surface fill and buttons in the footer — `Card.Header`, `Card.Body`, `Card.Footer`. |
197
- | [variants.tsx](examples/variants.tsx) | KPI templates: an icon tile with a value, a badge with a value in the header row, and a large value with its change and a reference line — `variant`, `Card.Delta`, `Card.Meta`. |
197
+ | [variants.tsx](examples/variants.tsx) | KPI templates: an icon tile with a value, a badge with a value in the header row, and a large value with its change in every tone and a reference line — `variant`, `Card.Delta`, `tone`, `Card.Meta`. |
198
198
  | [kpi-media.tsx](examples/kpi-media.tsx) | A KPI with a sparkline or a fill level in the bottom slot of `mini` — `Card.Media`. |
199
199
  | [panel-chart.tsx](examples/panel-chart.tsx) | A chart widget: a header with a short description and a period switch, and a Sparkline with the period total over its chart — `Card.Header`, `Card.Description`, `Card.Body`. |
200
200
  | [interactive.tsx](examples/interactive.tsx) | Whole cards as links to their reports: one tab stop each, a lift on hover, a press and the focus ring — `asChild`. |
201
201
  | [content-templates.tsx](examples/content-templates.tsx) | Content templates: a call to action, an events list and a campaign tile with a cover — `Card.Footer`, `Card.List`, `Card.Media`. |
202
202
  | [flat.tsx](examples/flat.tsx) | A flat tile without the raised shadow next to the default one, for dense grids — `flat`. |
203
203
  | [narrow.tsx](examples/narrow.tsx) | The card is a size container: the split template stacks its cells below 22rem and the trend value shrinks below 20rem — `variant`. |
204
+ | [screen.tsx](examples/screen.tsx) | A dashboard: the title, a line of data, the period switch and the report in the app header; one grid of KPI tiles that cross-fade to the new period, a revenue trend, invoiced against paid beside two panels, and the latest payments with a link to the list — `AppHeader.Tools`, `PageContent.Grid`. |
204
205
 
205
206
  ## Mistakes
206
207
  - A `<div>` with a border styled as a card → use `Card.Root`; depth comes from fill, not lines.