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 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`. */
1
+ /** A dashboard: the title and a line of data in the page flow, the period switch and the report in the top bar that keeps the title once it scrolls away; 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 — `collapse`, `Page.Grid`. */
2
2
  import {
3
- AppHeader,
4
3
  Badge,
5
4
  Button,
6
5
  Card,
@@ -12,8 +11,7 @@ import {
12
11
  type DataTableColumn,
13
12
  Icon,
14
13
  LinkButton,
15
- PageContent,
16
- PageToolbar,
14
+ Page,
17
15
  ProgressBar,
18
16
  type ProgressSegment,
19
17
  SegmentedControl,
@@ -158,206 +156,194 @@ export default function CardScreenExample() {
158
156
  const [period, setPeriod] = React.useState<Period>("month");
159
157
 
160
158
  return (
161
- <>
162
- {/* In an app this header fills the shell's `header` slot and carries the page: the only h1,
163
- a line of data under it and the page's tools; main has no PageContent.Header. */}
164
- <AppHeader.Root>
165
- <AppHeader.Start>
166
- <AppHeader.Title>
167
- Обзор
168
- <AppHeader.Description>Продажи и оплаты · на 8 октября, 9:40</AppHeader.Description>
169
- </AppHeader.Title>
170
- </AppHeader.Start>
171
- <AppHeader.Tools>
172
- <PageToolbar.Root aria-label="Обзор">
173
- <PageToolbar.View>
174
- <SegmentedControl.Root
175
- aria-label="Период"
176
- value={period}
177
- onValueChange={(next) => setPeriod(next as Period)}
178
- >
179
- <SegmentedControl.Item value="week">Неделя</SegmentedControl.Item>
180
- <SegmentedControl.Item value="month">Месяц</SegmentedControl.Item>
181
- <SegmentedControl.Item value="quarter">Квартал</SegmentedControl.Item>
182
- </SegmentedControl.Root>
183
- </PageToolbar.View>
184
- <PageToolbar.Actions>
185
- <Button.Root variant="soft" tone="neutral">
186
- <Button.Icon>
187
- <Icon name="action.download" />
188
- </Button.Icon>
189
- Отчёт
190
- </Button.Root>
191
- </PageToolbar.Actions>
192
- </PageToolbar.Root>
193
- </AppHeader.Tools>
194
- </AppHeader.Root>
159
+ <Page.Root>
160
+ {/* An overview: the large title in the flow; the bar keeps the period and the report in
161
+ reach and repeats the title once it scrolls away. */}
162
+ <Page.TopBar collapse>
163
+ <Page.Tools>
164
+ <SegmentedControl.Root
165
+ aria-label="Период"
166
+ value={period}
167
+ onValueChange={(next) => setPeriod(next as Period)}
168
+ >
169
+ <SegmentedControl.Item value="week">Неделя</SegmentedControl.Item>
170
+ <SegmentedControl.Item value="month">Месяц</SegmentedControl.Item>
171
+ <SegmentedControl.Item value="quarter">Квартал</SegmentedControl.Item>
172
+ </SegmentedControl.Root>
173
+ </Page.Tools>
174
+ <Page.Actions>
175
+ <Button.Root variant="soft" tone="neutral">
176
+ <Button.Icon>
177
+ <Icon name="action.download" />
178
+ </Button.Icon>
179
+ Отчёт
180
+ </Button.Root>
181
+ </Page.Actions>
182
+ </Page.TopBar>
183
+ <Page.Header>
184
+ <Page.Heading>
185
+ <Page.Title>Обзор</Page.Title>
186
+ <Page.Description>Продажи и оплаты · на 8 октября, 9:40</Page.Description>
187
+ </Page.Heading>
188
+ </Page.Header>
189
+ <Page.Body>
190
+ {/* One board: every tile of the screen in one grid, 16 apart on both axes. */}
191
+ <Page.Grid>
192
+ {KPIS[period].map((kpi) => (
193
+ <Page.Cell key={kpi.label} span={3}>
194
+ {/* Another period is another set of values: the tile cross-fades instead of flipping. */}
195
+ <Crossfade state={period}>
196
+ <Card.Root variant="stat-trend">
197
+ <Card.Label>{kpi.label}</Card.Label>
198
+ <Card.Value>{kpi.value}</Card.Value>
199
+ <Card.Delta tone={kpi.tone}>{kpi.delta}</Card.Delta>
200
+ </Card.Root>
201
+ </Crossfade>
202
+ </Page.Cell>
203
+ ))}
195
204
 
196
- <PageContent.Root>
197
- <PageContent.Body>
198
- {/* One board: every tile of the screen in one grid, 16 apart on both axes. */}
199
- <PageContent.Grid>
200
- {KPIS[period].map((kpi) => (
201
- <PageContent.Cell key={kpi.label} span={3}>
202
- {/* Another period is another set of values: the tile cross-fades instead of flipping. */}
203
- <Crossfade state={period}>
204
- <Card.Root variant="stat-trend">
205
- <Card.Label>{kpi.label}</Card.Label>
206
- <Card.Value>{kpi.value}</Card.Value>
207
- <Card.Delta tone={kpi.tone}>{kpi.delta}</Card.Delta>
208
- </Card.Root>
209
- </Crossfade>
210
- </PageContent.Cell>
211
- ))}
212
-
213
- <PageContent.Cell>
214
- <Card.Root variant="panel">
215
- <Card.Body>
216
- <Sparkline
217
- data={REVENUE[period]}
218
- label="Выручка по дням"
219
- summary="sum"
220
- formatValue={formatRubles}
221
- />
222
- </Card.Body>
223
- </Card.Root>
224
- </PageContent.Cell>
205
+ <Page.Cell>
206
+ <Card.Root variant="panel">
207
+ <Card.Body>
208
+ <Sparkline
209
+ data={REVENUE[period]}
210
+ label="Выручка по дням"
211
+ summary="sum"
212
+ formatValue={formatRubles}
213
+ />
214
+ </Card.Body>
215
+ </Card.Root>
216
+ </Page.Cell>
225
217
 
226
- {/* The chart spans two rows beside the two panels and fills their height. */}
227
- <PageContent.Cell span={8} rows={2}>
228
- <ChartFrame.Root
229
- series={BILLING_SERIES}
230
- formatValue={formatMillionsShort}
231
- rows={BILLING[period].map((row) => ({
232
- label: row.label,
233
- values: { invoiced: row.invoiced, paid: row.paid },
234
- }))}
235
- >
236
- <ChartFrame.Header>
237
- <ChartFrame.Title as="h2">Выставлено и оплачено</ChartFrame.Title>
238
- <ChartFrame.Description>Счета за период, млн ₽</ChartFrame.Description>
239
- </ChartFrame.Header>
240
- <ChartFrame.Plot
241
- height="fill"
242
- renderPlot={({ width, height, series }) => {
243
- const rows = BILLING[period];
244
- const top = Math.ceil(Math.max(...rows.map((row) => row.invoiced)));
245
- const innerH = height - BILLING_MARGIN.top - BILLING_MARGIN.bottom;
246
- const band = (width - BILLING_MARGIN.left) / rows.length;
247
- const bar = Math.min(28, (band - 16) / series.length);
248
- const y = (value: number) => BILLING_MARGIN.top + innerH * (1 - value / top);
249
- return (
250
- <svg width={width} height={height} aria-hidden="true">
251
- {[0, top / 2, top].map((tick) => (
252
- <g key={tick}>
253
- <line
254
- x1={BILLING_MARGIN.left}
255
- x2={width}
256
- y1={y(tick)}
257
- y2={y(tick)}
258
- stroke={tick === 0 ? chartColors.axis : chartColors.grid}
259
- />
260
- <text
261
- x={BILLING_MARGIN.left - 8}
262
- y={y(tick)}
263
- textAnchor="end"
264
- dominantBaseline="middle"
265
- >
266
- {tick.toLocaleString("ru-RU")}
218
+ {/* The chart spans two rows beside the two panels and fills their height. */}
219
+ <Page.Cell span={8} rows={2}>
220
+ <ChartFrame.Root
221
+ series={BILLING_SERIES}
222
+ formatValue={formatMillionsShort}
223
+ rows={BILLING[period].map((row) => ({
224
+ label: row.label,
225
+ values: { invoiced: row.invoiced, paid: row.paid },
226
+ }))}
227
+ >
228
+ <ChartFrame.Header>
229
+ <ChartFrame.Title as="h2">Выставлено и оплачено</ChartFrame.Title>
230
+ <ChartFrame.Description>Счета за период, млн ₽</ChartFrame.Description>
231
+ </ChartFrame.Header>
232
+ <ChartFrame.Plot
233
+ height="fill"
234
+ renderPlot={({ width, height, series }) => {
235
+ const rows = BILLING[period];
236
+ const top = Math.ceil(Math.max(...rows.map((row) => row.invoiced)));
237
+ const innerH = height - BILLING_MARGIN.top - BILLING_MARGIN.bottom;
238
+ const band = (width - BILLING_MARGIN.left) / rows.length;
239
+ const bar = Math.min(28, (band - 16) / series.length);
240
+ const y = (value: number) => BILLING_MARGIN.top + innerH * (1 - value / top);
241
+ return (
242
+ <svg width={width} height={height} aria-hidden="true">
243
+ {[0, top / 2, top].map((tick) => (
244
+ <g key={tick}>
245
+ <line
246
+ x1={BILLING_MARGIN.left}
247
+ x2={width}
248
+ y1={y(tick)}
249
+ y2={y(tick)}
250
+ stroke={tick === 0 ? chartColors.axis : chartColors.grid}
251
+ />
252
+ <text
253
+ x={BILLING_MARGIN.left - 8}
254
+ y={y(tick)}
255
+ textAnchor="end"
256
+ dominantBaseline="middle"
257
+ >
258
+ {tick.toLocaleString("ru-RU")}
259
+ </text>
260
+ </g>
261
+ ))}
262
+ {rows.map((row, i) => {
263
+ const center = BILLING_MARGIN.left + band * i + band / 2;
264
+ return (
265
+ <g key={row.label}>
266
+ {series.map((s, j) => {
267
+ const value = s.id === "paid" ? row.paid : row.invoiced;
268
+ return (
269
+ <rect
270
+ key={s.id}
271
+ data-hidden={s.hidden}
272
+ x={center - (bar * series.length) / 2 + bar * j}
273
+ y={y(value)}
274
+ width={bar - 2}
275
+ height={y(0) - y(value)}
276
+ rx={2}
277
+ fill={s.color}
278
+ />
279
+ );
280
+ })}
281
+ <text x={center} y={height - 4} textAnchor="middle">
282
+ {row.label}
267
283
  </text>
268
284
  </g>
269
- ))}
270
- {rows.map((row, i) => {
271
- const center = BILLING_MARGIN.left + band * i + band / 2;
272
- return (
273
- <g key={row.label}>
274
- {series.map((s, j) => {
275
- const value = s.id === "paid" ? row.paid : row.invoiced;
276
- return (
277
- <rect
278
- key={s.id}
279
- data-hidden={s.hidden}
280
- x={center - (bar * series.length) / 2 + bar * j}
281
- y={y(value)}
282
- width={bar - 2}
283
- height={y(0) - y(value)}
284
- rx={2}
285
- fill={s.color}
286
- />
287
- );
288
- })}
289
- <text x={center} y={height - 4} textAnchor="middle">
290
- {row.label}
291
- </text>
292
- </g>
293
- );
294
- })}
295
- </svg>
296
- );
297
- }}
298
- />
299
- <ChartFrame.Legend />
300
- </ChartFrame.Root>
301
- </PageContent.Cell>
285
+ );
286
+ })}
287
+ </svg>
288
+ );
289
+ }}
290
+ />
291
+ <ChartFrame.Legend />
292
+ </ChartFrame.Root>
293
+ </Page.Cell>
302
294
 
303
- <PageContent.Cell span={4}>
304
- <Card.Root variant="panel">
305
- <Card.Header>
306
- <Card.Title as="h2">План продаж</Card.Title>
307
- <Typography as="span" variant="caption" tone="muted">
308
- Октябрь
309
- </Typography>
310
- </Card.Header>
311
- <Card.Body>
312
- <div className={styles.bars}>
313
- {PLAN.map((row) => (
314
- <ProgressBar
315
- key={row.manager}
316
- value={row.value}
317
- label={row.manager}
318
- tone={row.value < 50 ? "warning" : "accent"}
319
- showValue
320
- />
321
- ))}
322
- </div>
323
- </Card.Body>
324
- </Card.Root>
325
- </PageContent.Cell>
295
+ <Page.Cell span={4}>
296
+ <Card.Root variant="panel">
297
+ <Card.Header>
298
+ <Card.Title as="h2">План продаж</Card.Title>
299
+ <Typography as="span" variant="caption" tone="muted">
300
+ Октябрь
301
+ </Typography>
302
+ </Card.Header>
303
+ <Card.Body>
304
+ <div className={styles.bars}>
305
+ {PLAN.map((row) => (
306
+ <ProgressBar
307
+ key={row.manager}
308
+ value={row.value}
309
+ label={row.manager}
310
+ tone={row.value < 50 ? "warning" : "accent"}
311
+ showValue
312
+ />
313
+ ))}
314
+ </div>
315
+ </Card.Body>
316
+ </Card.Root>
317
+ </Page.Cell>
326
318
 
327
- <PageContent.Cell span={4}>
328
- <Card.Root variant="panel">
329
- <Card.Header>
330
- <Card.Title as="h2">Дебиторка</Card.Title>
331
- <Typography as="span" variant="caption" tone="muted">
332
- 8,2 млн ₽
333
- </Typography>
334
- </Card.Header>
335
- <Card.Body>
336
- <ProgressBar
337
- segments={RECEIVABLES}
338
- label="По сроку оплаты"
339
- legend
340
- formatValue={formatMillions}
341
- />
342
- </Card.Body>
343
- </Card.Root>
344
- </PageContent.Cell>
345
- </PageContent.Grid>
319
+ <Page.Cell span={4}>
320
+ <Card.Root variant="panel">
321
+ <Card.Header>
322
+ <Card.Title as="h2">Дебиторка</Card.Title>
323
+ <Typography as="span" variant="caption" tone="muted">
324
+ 8,2 млн ₽
325
+ </Typography>
326
+ </Card.Header>
327
+ <Card.Body>
328
+ <ProgressBar
329
+ segments={RECEIVABLES}
330
+ label="По сроку оплаты"
331
+ legend
332
+ formatValue={formatMillions}
333
+ />
334
+ </Card.Body>
335
+ </Card.Root>
336
+ </Page.Cell>
337
+ </Page.Grid>
346
338
 
347
- {/* A new topic: a titled section, set off by more air than the tiles. */}
348
- <PageContent.Section label="Последние оплаты">
349
- <PageContent.Actions>
350
- <LinkButton href="#invoices">Все счета</LinkButton>
351
- </PageContent.Actions>
352
- <DataTable
353
- columns={COLUMNS}
354
- rows={PAYMENTS}
355
- getRowKey={(row) => row.id}
356
- paging="none"
357
- />
358
- </PageContent.Section>
359
- </PageContent.Body>
360
- </PageContent.Root>
361
- </>
339
+ {/* A new topic: a titled section, set off by more air than the tiles. */}
340
+ <Page.Section label="Последние оплаты">
341
+ <Page.Actions>
342
+ <LinkButton href="#invoices">Все счета</LinkButton>
343
+ </Page.Actions>
344
+ <DataTable columns={COLUMNS} rows={PAYMENTS} getRowKey={(row) => row.id} paging="none" />
345
+ </Page.Section>
346
+ </Page.Body>
347
+ </Page.Root>
362
348
  );
363
349
  }
@@ -105,7 +105,7 @@ ChartFrame.Root <figure>; surface of the depth ladder; state, serie
105
105
 
106
106
  | Prop | Type | Default | Description |
107
107
  |---|---|---|---|
108
- | `height` | `number \| "fill"` | `240`, `160` under `30rem` | Height of the plot area in px. `fill` takes the free height of a stretched panel (a `PageContent.Cell` with `rows`), the default height at least. |
108
+ | `height` | `number \| "fill"` | `240`, `160` under `30rem` | Height of the plot area in px. `fill` takes the free height of a stretched panel (a `Page.Cell` with `rows`), the default height at least. |
109
109
  | `renderPlot` | `(area: ChartFramePlotArea) => ReactNode` | — | Renders the chart at the measured `{ width, height }` with every series `{ id, label, color, hidden }` — for libraries that need explicit sizes (Chart.js, visx). |
110
110
  | `children` | `ReactNode` | — | A chart that sizes itself to its container (an SVG with a `viewBox`, `ResponsiveContainer`); it fills the area. |
111
111
  | `…rest` | `HTMLAttributes<HTMLDivElement>` | — | `className` and the other div attributes. |
@@ -1,5 +1,5 @@
1
1
  /** Revenue against the plan beside two KPI tiles: the plot takes the height of the stretched grid cell, and the plan line starts hidden until the legend turns it on — `height`, `defaultHiddenSeries`. */
2
- import { Card, ChartFrame, type ChartFrameSeries, chartColors, PageContent } from "prime-ui-kit";
2
+ import { Card, ChartFrame, type ChartFrameSeries, chartColors, Page } from "prime-ui-kit";
3
3
 
4
4
  const SERIES: ChartFrameSeries[] = [
5
5
  { id: "fact", label: "Факт" },
@@ -22,9 +22,9 @@ const formatMillions = (value: number) => `${value.toLocaleString("ru-RU")} мл
22
22
 
23
23
  export default function ChartFrameFillHeightExample() {
24
24
  return (
25
- <PageContent.Grid>
25
+ <Page.Grid>
26
26
  {/* The cell spans two rows beside the tiles; `height="fill"` takes all of it. */}
27
- <PageContent.Cell span={8} rows={2}>
27
+ <Page.Cell span={8} rows={2}>
28
28
  <ChartFrame.Root
29
29
  series={SERIES}
30
30
  defaultHiddenSeries={["plan"]}
@@ -95,23 +95,23 @@ export default function ChartFrameFillHeightExample() {
95
95
  />
96
96
  <ChartFrame.Legend />
97
97
  </ChartFrame.Root>
98
- </PageContent.Cell>
98
+ </Page.Cell>
99
99
 
100
- <PageContent.Cell span={4}>
100
+ <Page.Cell span={4}>
101
101
  <Card.Root variant="stat-trend">
102
102
  <Card.Label>Выполнение плана</Card.Label>
103
103
  <Card.Value>96%</Card.Value>
104
104
  <Card.Delta tone="warning">−4 п. п. за октябрь</Card.Delta>
105
105
  </Card.Root>
106
- </PageContent.Cell>
106
+ </Page.Cell>
107
107
 
108
- <PageContent.Cell span={4}>
108
+ <Page.Cell span={4}>
109
109
  <Card.Root variant="stat-trend">
110
110
  <Card.Label>Прогноз на год</Card.Label>
111
111
  <Card.Value>84 млн ₽</Card.Value>
112
112
  <Card.Delta>План — 86 млн ₽</Card.Delta>
113
113
  </Card.Root>
114
- </PageContent.Cell>
115
- </PageContent.Grid>
114
+ </Page.Cell>
115
+ </Page.Grid>
116
116
  );
117
117
  }
@@ -107,7 +107,7 @@ Chat.Root <div> column, fills its host; owns selection,
107
107
 
108
108
  | Prop | Type | Default | Description |
109
109
  |---|---|---|---|
110
- | `…rest` | `HTMLAttributes<HTMLDivElement>` | — | `children` (a `PageContent.BackButton`, an `Avatar`, `Chat.Title`, `Chat.Description`, `Chat.Actions`), `className`. |
110
+ | `…rest` | `HTMLAttributes<HTMLDivElement>` | — | `children` (a `Page.BackButton`, an `Avatar`, `Chat.Title`, `Chat.Description`, `Chat.Actions`), `className`. |
111
111
 
112
112
  ### Chat.Title
113
113
  `ref` → `HTMLHeadingElement`. Who the chat is with, one line that ellipsizes; it also names the message list (`aria-labelledby`).
@@ -193,7 +193,7 @@ Chat.Root <div> column, fills its host; owns selection,
193
193
  | `…rest` | `HTMLAttributes<HTMLDivElement>` | — | `children` — the actions (`Button.Root size="s"`: Переслать, Удалить), `className`. |
194
194
 
195
195
  ### Chat.Separator
196
- `ref` → `HTMLDivElement`. A date between messages (`items` add them for you) («Сегодня», «12 марта» — `formatMessageDate`): a pill in the middle that stays at the top while its day scrolls.
196
+ `ref` → `HTMLDivElement`. A date between messages (`items` add them for you) («Сегодня», «12 марта» — `formatMessageDate`): a pill a step above the bubbles that stays at the top while its day scrolls, until the next date pushes it out.
197
197
 
198
198
  | Prop | Type | Default | Description |
199
199
  |---|---|---|---|
@@ -308,7 +308,7 @@ Chat.Root <div> column, fills its host; owns selection,
308
308
  | `newMessages` | `"Новых сообщений: {count}. К последним сообщениям"` | The name of that button while new messages wait below. |
309
309
  | `typing` | `"печатает…"` | The status line of the header while the other side types. |
310
310
  | `search` | `"Поиск по переписке"` | The search button and the name of the search field. |
311
- | `searchPlaceholder` | `"Поиск по сообщениям"` | The placeholder of the search field. |
311
+ | `searchPlaceholder` | `"Поиск"` | The placeholder of the search field. |
312
312
  | `matches` | `"{index} из {count}"` | The place of the current match, counted from the newest. |
313
313
  | `noMatches` | `"Нет совпадений"` | The search found nothing. |
314
314
  | `previousMatch` | `"Предыдущее совпадение"` | The button that goes to the older match. |
@@ -337,7 +337,7 @@ Chat.Root <div> column, fills its host; owns selection,
337
337
  | [states.tsx](examples/states.tsx) | The first load of a conversation: bubble-shaped placeholders on both sides stand in the list's place, then cross-fade into the messages — `loading`. |
338
338
  | [controlled.tsx](examples/controlled.tsx) | Selection mode owned by the screen: the Select item of a message's menu starts it, a check stands beside every message, a press toggles one while the others step back, the bar counts and acts, Escape leaves — `selected`, `onSelectedChange`, `Chat.SelectionBar`. |
339
339
  | [narrow.tsx](examples/narrow.tsx) | At phone width the header keeps its actions and lets the title ellipsize, bubbles take up to 85% of the chat, long links wrap and an album keeps its layout — `Chat.Root`, `Chat.Header`, `Chat.Messages`, `Chat.Footer`. |
340
- | [screen.tsx](examples/screen.tsx) | 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`. |
340
+ | [screen.tsx](examples/screen.tsx) | 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`. |
341
341
 
342
342
  ## Mistakes
343
343
  - A header, a search bar and a scroller of your own around the messages → `Chat.Header`, `Chat.Search`, `Chat.Messages`: the chat wires typing, search, jumps and selection between them.
@@ -1,5 +1,5 @@
1
1
  /* Messenger: a work screen — the header carries the title, the page fills the app panel
2
- (`AppShell.Root fillViewport` + `PageContent.Root fill`); each pane is a card with a scrolling
2
+ (`AppShell.Root fillViewport` + `Page.Root fill`); each pane is a card with a scrolling
3
3
  region. */
4
4
 
5
5
  .paneCard {